Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
fix(computer): keep Computers without agy compatible with older Agent Services
jeffrey8e9bd496a602
diff --git a/apps/computer/local-daemon/README.md b/apps/computer/local-daemon/README.mdindex e3402758..b20189ae 100644--- a/apps/computer/local-daemon/README.md+++ b/apps/computer/local-daemon/README.md@@ -265,7 +265,12 @@ for a browser sign-in when signed out.and ends the turn with `end_turn`. With no structured signal, such a Runcompletes and the Room shows the text.- History reads, provider prepare, Local Skill scans and local models do not- support Antigravity.+ support Antigravity, so Agent Memory skips Antigravity Agents.+- The Gateway hello leaves out the Antigravity diagnostic while `agy` is not+ installed, so such a Computer still connects to an Agent Service released+ before Antigravity support. Once `agy` is installed, the Agent Service must+ run this release first. The control API and `runtime check` keep reporting+ Antigravity as not installed.## Frozen sourcediff --git a/apps/computer/local-daemon/cmd/linger-computer-daemon/main.go b/apps/computer/local-daemon/cmd/linger-computer-daemon/main.goindex 276dd413..6a81e4e7 100644--- a/apps/computer/local-daemon/cmd/linger-computer-daemon/main.go+++ b/apps/computer/local-daemon/cmd/linger-computer-daemon/main.go@@ -169,7 +169,7 @@ func run(args []string) (resultErr error) {return err}logRuntimeDiagnostics(discovered.Diagnostics)- diagnostics, err := provider.DiagnosticsJSON(discovered.Diagnostics)+ diagnostics, err := provider.DiagnosticsJSON(provider.GatewayDiagnostics(discovered.Diagnostics))if err != nil {return err}@@ -385,7 +385,7 @@ func run(args []string) (resultErr error) {RuntimeDiagnostics: diagnostics, WorkspaceGrants: encodedGrants,StateDirectory: computer.StateDirectory,RuntimeHomeRoot: filepath.Join(computer.StateDirectory, "runtime-homes"),- RuntimeObservations: runtimeObservations(computer, discovered.Diagnostics, runtimeObservationRevision),+ RuntimeObservations: runtimeObservations(computer, provider.GatewayDiagnostics(discovered.Diagnostics), runtimeObservationRevision),OnModelUnavailable: inventory.reject,ControlPlane: transport.GatewayControlPlane{URL: computer.GatewayURL, BearerToken: computer.GatewayToken},IdentityStore: transport.IdentityFileStore{Path: filepath.Join(computer.StateDirectory, "daemon-identity.json")},@@ -660,7 +660,7 @@ func (i *runtimeInventory) publishLocked(ctx context.Context) error {if i.daemon == nil {return nil}- visible := i.rejected.Filter(i.diagnostics)+ visible := i.rejected.Filter(provider.GatewayDiagnostics(i.diagnostics))encoded, err := provider.DiagnosticsJSON(visible)if err != nil {return errdiff --git a/apps/computer/local-daemon/internal/provider/antigravity_probe.go b/apps/computer/local-daemon/internal/provider/antigravity_probe.goindex 85f1ffef..2085659d 100644--- a/apps/computer/local-daemon/internal/provider/antigravity_probe.go+++ b/apps/computer/local-daemon/internal/provider/antigravity_probe.go@@ -25,7 +25,7 @@ func probeAntigravityAuthentication(ctx context.Context, executable string, enviif probe.AuthenticationRequired {return runtimeProbeOutcome{Status: "authentication_required", Code: "RUNTIME_AUTHENTICATION_REQUIRED", Message: "Open agy and sign in with Google, or set GEMINI_API_KEY, as the Computer user"}}- return runtimeProbeOutcome{Status: "ready"}+ return runtimeProbeOutcome{Status: "ready", catalog: &probe.Models}}// antigravityLiveReply runs the live-check prompt as one ACP turn in HOME.diff --git a/apps/computer/local-daemon/internal/provider/discovery.go b/apps/computer/local-daemon/internal/provider/discovery.goindex 2434e255..19135c6a 100644--- a/apps/computer/local-daemon/internal/provider/discovery.go+++ b/apps/computer/local-daemon/internal/provider/discovery.go@@ -202,7 +202,7 @@ func diagnose(ctx context.Context, kind, executable, protocol string, options DicatalogAllowed := outcome.Status == "ready" || ((kind == "codex" || kind == "pi") && outcome.Status == "authentication_required")if catalogAllowed {catalogCtx, stop := context.WithTimeout(ctx, budget)- observation.Models, observation.ModelCatalogError = discoverRuntimeModels(catalogCtx, kind, canonical, environment)+ observation.Models, observation.ModelCatalogError = probedRuntimeModels(catalogCtx, kind, canonical, environment, outcome)if observation.ModelCatalogError == "" {getModelLink := newGetModelLink(catalogCtx, kind, environment)for i := range observation.Models {@@ -247,8 +247,20 @@ func versionProbeTimedOut(err error) bool {return false}+// probedRuntimeModels uses the catalog the probe already read, or discovers+// it.+func probedRuntimeModels(ctx context.Context, kind, executable string, environment map[string]string, outcome runtimeProbeOutcome) ([]RuntimeModel, string) {+ if outcome.catalog != nil {+ return catalogModels(*outcome.catalog, nil)+ }+ return discoverRuntimeModels(ctx, kind, executable, environment)+}+func discoverRuntimeModels(ctx context.Context, kind, executable string, environment map[string]string) ([]RuntimeModel, string) {- catalog, err := native.DiscoverModels(ctx, kind, native.NewInvocation(executable, nil).WithEnvironment(environment))+ return catalogModels(native.DiscoverModels(ctx, kind, native.NewInvocation(executable, nil).WithEnvironment(environment)))+}++func catalogModels(catalog native.ModelList, err error) ([]RuntimeModel, string) {if err == nil {models := normalizeRuntimeModels(catalog.Models)if len(models) > 0 || len(catalog.Models) == 0 {@@ -340,6 +352,21 @@ func resolveExecutableEntry(ctx context.Context, kind, name string, options Disc// macOS desktop apps ship their CLI inside the bundle, outside PATH.var applicationBundles = map[string]string{"codex": "Codex.app", "claude": "Claude.app"}+// GatewayDiagnostics drops the Antigravity diagnostic when `agy` is not+// installed. An Agent Service released before Antigravity support rejects a+// runner.hello that names it, so a Computer without `agy` stays able to+// connect to one. The control API keeps the full list.+func GatewayDiagnostics(observations []RuntimeDiagnostic) []RuntimeDiagnostic {+ kept := slices.DeleteFunc(slices.Clone(observations), func(observation RuntimeDiagnostic) bool {+ return observation.Type == "antigravity" && observation.Status == "not_installed"+ })+ // The hello requires at least one diagnostic.+ if len(kept) == 0 {+ return observations+ }+ return kept+}+func canonicalExecutable(path string) (string, error) {if !filepath.IsAbs(path) {return "", os.ErrNotExistdiff --git a/apps/computer/local-daemon/internal/provider/discovery_test.go b/apps/computer/local-daemon/internal/provider/discovery_test.goindex f761c4fc..0f2ec94f 100644--- a/apps/computer/local-daemon/internal/provider/discovery_test.go+++ b/apps/computer/local-daemon/internal/provider/discovery_test.go@@ -449,3 +449,18 @@ exit 0t.Fatal("Claude stream protocol probe did not run")}}++func TestGatewayDiagnosticsLeaveOutAnAntigravityThatIsNotInstalled(t *testing.T) {+ codex := RuntimeDiagnostic{Type: "codex", Status: "ready"}+ missing := RuntimeDiagnostic{Type: "antigravity", Status: "not_installed"}+ signedOut := RuntimeDiagnostic{Type: "antigravity", Status: "authentication_required"}+ if got := GatewayDiagnostics([]RuntimeDiagnostic{codex, missing}); len(got) != 1 || got[0].Type != "codex" {+ t.Fatalf("missing Antigravity was sent: %+v", got)+ }+ if got := GatewayDiagnostics([]RuntimeDiagnostic{codex, signedOut}); len(got) != 2 {+ t.Fatalf("installed Antigravity was dropped: %+v", got)+ }+ if got := GatewayDiagnostics([]RuntimeDiagnostic{missing}); len(got) != 1 {+ t.Fatalf("the only diagnostic was dropped: %+v", got)+ }+}diff --git a/apps/computer/local-daemon/internal/provider/protocol_probe.go b/apps/computer/local-daemon/internal/provider/protocol_probe.goindex 0b19954c..5b406f9b 100644--- a/apps/computer/local-daemon/internal/provider/protocol_probe.go+++ b/apps/computer/local-daemon/internal/provider/protocol_probe.go@@ -30,6 +30,9 @@ type runtimeProbeOutcome struct {Code stringMessage stringprotocolVerified bool+ // catalog is the model list an authentication probe already read, so+ // discovery does not start the Runtime a second time for it.+ catalog *native.ModelList}func probeRuntime(ctx context.Context, runtimeType, executable string, environment map[string]string, timeout time.Duration, version string, runtimeHomeRoot ...string) runtimeProbeOutcome {diff --git a/apps/computer/local-daemon/internal/provider/runtime_monitor.go b/apps/computer/local-daemon/internal/provider/runtime_monitor.goindex e14c4b4a..22d61fa6 100644--- a/apps/computer/local-daemon/internal/provider/runtime_monitor.go+++ b/apps/computer/local-daemon/internal/provider/runtime_monitor.go@@ -215,7 +215,7 @@ func refreshRuntimeAuthentication(ctx context.Context, current DiscoveryResult,}if (diagnostic.Type == "pi" || diagnostic.Type == "antigravity") && diagnostic.Status == "ready" {catalogCtx, cancel := context.WithTimeout(ctx, boundedAuthTimeout(options.Timeout))- diagnostic.Models, diagnostic.ModelCatalogError = discoverRuntimeModels(catalogCtx, diagnostic.Type, diagnostic.ExecutablePath, environment)+ diagnostic.Models, diagnostic.ModelCatalogError = probedRuntimeModels(catalogCtx, diagnostic.Type, diagnostic.ExecutablePath, environment, outcome)cancel()if diagnostic.ModelCatalogError != "" {diagnostic.Status, diagnostic.authProbeFailed = "error", falsediff --git a/apps/node-services/src/agent/AGENTS.md b/apps/node-services/src/agent/AGENTS.mdindex 890f7359..ec9fd2f0 100644--- a/apps/node-services/src/agent/AGENTS.md+++ b/apps/node-services/src/agent/AGENTS.md@@ -33,11 +33,12 @@ take precedence.- Keep model/provider behavior behind the existing runtime interfaces. The onlyexception is `src/runtime-model-call.ts`: a stateless prompt on the owner'sAgent Runtime (Codex, Claude or Pi, using its default model) through the- Daemon's one-shot `model.invoke`. Antigravity has no `model.invoke`, so an- Antigravity owner's call runs on Claude on the same Computer, or on Codex- when only Codex is ready. It serves tool-less service work such as Agent+ Daemon's one-shot `model.invoke`, for tool-less service work such as AgentMemory, also used by Memory, by the LLM Wiki, and exposed- to TeamHub as `POST /v1/model-calls`.+ to TeamHub as `POST /v1/model-calls`. Antigravity has no `model.invoke`, so+ a call for an Antigravity owner runs on Claude on the same Computer, or on+ Codex when only Codex is ready. Agent Memory skips Antigravity Agents,+ because it reads native history that Antigravity does not expose.It is not a Runtime turn and never creates a Context, Local Run, orOperation. Callers name an owner (or an Agent placement) and a reasoningeffort; never add a model name, gateway, or model environment variable. Pidiff --git a/apps/node-services/src/agent/agent-features/agent-memory/coordinator.ts b/apps/node-services/src/agent/agent-features/agent-memory/coordinator.tsindex a3d123c6..21074d3b 100644--- a/apps/node-services/src/agent/agent-features/agent-memory/coordinator.ts+++ b/apps/node-services/src/agent/agent-features/agent-memory/coordinator.ts@@ -145,7 +145,7 @@ export class AgentMemoryCoordinator {*/canReadHistory?: (computerId: string,- runtimeType: "codex" | "claude" | "pi" | "antigravity",+ runtimeType: "codex" | "claude" | "pi",) => boolean;now?: () => number;},diff --git a/apps/node-services/src/agent/agent-features/agent-memory/services.ts b/apps/node-services/src/agent/agent-features/agent-memory/services.tsindex f01b4040..8d908762 100644--- a/apps/node-services/src/agent/agent-features/agent-memory/services.ts+++ b/apps/node-services/src/agent/agent-features/agent-memory/services.ts@@ -31,7 +31,7 @@ export interface AgentMemoryServicesOptions {*/readonly canReadHistory?: (computerId: string,- runtimeType: "codex" | "claude" | "pi" | "antigravity",+ runtimeType: "codex" | "claude" | "pi",) => boolean;readonly now?: () => number;}diff --git a/apps/node-services/tests/agent/runner-gateway/go-local-daemon-process.test.ts b/apps/node-services/tests/agent/runner-gateway/go-local-daemon-process.test.tsindex a6d4a842..ce1f38c7 100644--- a/apps/node-services/tests/agent/runner-gateway/go-local-daemon-process.test.ts+++ b/apps/node-services/tests/agent/runner-gateway/go-local-daemon-process.test.ts@@ -1122,7 +1122,8 @@ processTest();}const registrations = connections.at(-1)?.hello.runtime_registrations;- expect(registrations).toHaveLength(4);+ // Antigravity is not installed here, so the hello leaves it out.+ expect(registrations).toHaveLength(3);const claude = registrations?.find(({ provider_type }) => provider_type === "claude",);