super-dsh 0.1.6 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -3
- package/agent-agy/cordis.patch.yml +7 -4
- package/agent-agy/dist/agent.d.ts +12 -11
- package/agent-agy/dist/agy-auth-gateway.d.ts +124 -0
- package/agent-agy/dist/agy-auth-gateway.js +233 -0
- package/agent-agy/dist/agy-auth.d.ts +153 -0
- package/agent-agy/dist/agy-auth.js +179 -0
- package/agent-agy/dist/agy-cli-client.d.ts +39 -9
- package/agent-agy/dist/agy-cli-client.js +82 -18
- package/agent-agy/dist/agy-store.d.ts +8 -0
- package/agent-agy/dist/index.d.ts +46 -16
- package/agent-agy/dist/index.js +82 -56
- package/agent-agy/dist/models.d.ts +70 -0
- package/agent-agy/dist/models.js +102 -3
- package/agent-agy/package.json +7 -5
- package/agent-agy-sdk/cordis.patch.yml +58 -0
- package/agent-agy-sdk/dist/adapter.d.ts +15 -0
- package/agent-agy-sdk/dist/adapter.js +42 -0
- package/agent-agy-sdk/dist/agent-preset-agy.d.ts +27 -0
- package/agent-agy-sdk/dist/agent-preset-agy.js +32 -0
- package/agent-agy-sdk/dist/agent.d.ts +138 -0
- package/agent-agy-sdk/dist/agent.js +494 -0
- package/{agent-agy → agent-agy-sdk}/dist/agy-client.d.ts +26 -6
- package/{agent-agy → agent-agy-sdk}/dist/agy-client.js +43 -25
- package/agent-agy-sdk/dist/agy-sessions.d.ts +25 -0
- package/agent-agy-sdk/dist/agy-sessions.js +107 -0
- package/agent-agy-sdk/dist/agy-store.d.ts +39 -0
- package/agent-agy-sdk/dist/agy-store.js +83 -0
- package/agent-agy-sdk/dist/inbox.d.ts +26 -0
- package/agent-agy-sdk/dist/inbox.js +53 -0
- package/agent-agy-sdk/dist/index.d.ts +93 -0
- package/agent-agy-sdk/dist/index.js +476 -0
- package/agent-agy-sdk/dist/models.d.ts +41 -0
- package/agent-agy-sdk/dist/models.js +74 -0
- package/agent-agy-sdk/dist/sdk-venv.d.ts +76 -0
- package/agent-agy-sdk/dist/sdk-venv.js +173 -0
- package/agent-agy-sdk/dist/world-plugin.d.ts +10 -0
- package/agent-agy-sdk/dist/world-plugin.js +82 -0
- package/agent-agy-sdk/package.json +64 -0
- package/agent-codex/README.md +141 -36
- package/agent-codex/cordis.patch.yml +14 -10
- package/agent-codex/dist/adapter.js +64 -28
- package/agent-codex/dist/agent.js +255 -81
- package/agent-codex/dist/app-server-approvals.js +165 -0
- package/agent-codex/dist/app-server-client.js +723 -0
- package/agent-codex/dist/app-server-events.js +432 -0
- package/agent-codex/dist/app-server-protocol.js +95 -0
- package/agent-codex/dist/app-server-wire.js +299 -0
- package/agent-codex/dist/codex-launch.js +78 -0
- package/agent-codex/dist/codex-native-config.js +392 -0
- package/agent-codex/dist/codex-provider-gateway.js +402 -0
- package/agent-codex/dist/codex-providers.js +376 -0
- package/agent-codex/dist/codex-route.js +86 -0
- package/agent-codex/dist/index.js +256 -115
- package/agent-codex/dist/permission.js +75 -1
- package/agent-codex/package.json +1 -2
- package/agent-codex-sdk/README.md +79 -0
- package/agent-codex-sdk/cordis.patch.yml +81 -0
- package/agent-codex-sdk/dist/adapter.js +91 -0
- package/agent-codex-sdk/dist/agent-preset-codex.js +32 -0
- package/agent-codex-sdk/dist/agent.js +1085 -0
- package/agent-codex-sdk/dist/codex-native-config.js +392 -0
- package/agent-codex-sdk/dist/codex-provider-gateway.js +402 -0
- package/agent-codex-sdk/dist/codex-providers.js +376 -0
- package/agent-codex-sdk/dist/codex-route.js +86 -0
- package/{agent-codex/dist/codex-client.js → agent-codex-sdk/dist/codex-sdk-client.js} +253 -32
- package/agent-codex-sdk/dist/codex-sdk-launch.js +92 -0
- package/agent-codex-sdk/dist/codex-store.js +180 -0
- package/agent-codex-sdk/dist/inbox.js +53 -0
- package/agent-codex-sdk/dist/index.js +739 -0
- package/agent-codex-sdk/dist/permission.js +71 -0
- package/agent-codex-sdk/dist/sdk-runtime.js +307 -0
- package/agent-codex-sdk/dist/session-map.js +167 -0
- package/agent-codex-sdk/dist/world-plugin.js +93 -0
- package/agent-codex-sdk/package.json +79 -0
- package/agent-codex-sdk/scripts/fetch-sdk-runtime.mjs +57 -0
- package/agent-omp/README.md +72 -55
- package/agent-omp/dist/agent.js +36 -11
- package/agent-omp/dist/index.js +92 -52
- package/agent-omp/dist/lazy-rpc.js +11 -4
- package/agent-omp/dist/omp-cli.js +114 -97
- package/agent-omp/dist/omp-store.js +12 -4
- package/agent-omp/dist/permission.js +70 -5
- package/agent-omp/dist/rpc-client.js +409 -0
- package/agent-omp/dist/world-plugin.js +36 -3
- package/agent-omp/package.json +2 -6
- package/agent-omp-sdk/README.md +103 -0
- package/agent-omp-sdk/cordis.patch.yml +108 -0
- package/agent-omp-sdk/dist/adapter.d.ts +21 -0
- package/agent-omp-sdk/dist/adapter.js +36 -0
- package/agent-omp-sdk/dist/agent-preset-omp.d.ts +31 -0
- package/agent-omp-sdk/dist/agent-preset-omp.js +32 -0
- package/agent-omp-sdk/dist/agent.d.ts +64 -0
- package/agent-omp-sdk/dist/agent.js +1178 -0
- package/agent-omp-sdk/dist/discovery.d.ts +57 -0
- package/agent-omp-sdk/dist/discovery.js +116 -0
- package/agent-omp-sdk/dist/inbox.d.ts +28 -0
- package/agent-omp-sdk/dist/inbox.js +53 -0
- package/agent-omp-sdk/dist/index.d.ts +60 -0
- package/agent-omp-sdk/dist/index.js +632 -0
- package/agent-omp-sdk/dist/knobs.d.ts +34 -0
- package/agent-omp-sdk/dist/knobs.js +50 -0
- package/agent-omp-sdk/dist/lazy-rpc.d.ts +98 -0
- package/agent-omp-sdk/dist/lazy-rpc.js +178 -0
- package/agent-omp-sdk/dist/mobile/zoom-guard.d.ts +187 -0
- package/agent-omp-sdk/dist/mobile/zoom-guard.js +294 -0
- package/agent-omp-sdk/dist/mobile-boot.d.ts +49 -0
- package/agent-omp-sdk/dist/mobile-boot.js +38 -0
- package/agent-omp-sdk/dist/models.d.ts +39 -0
- package/agent-omp-sdk/dist/models.js +299 -0
- package/agent-omp-sdk/dist/omp-cli.d.ts +67 -0
- package/agent-omp-sdk/dist/omp-cli.js +164 -0
- package/agent-omp-sdk/dist/omp-disk-discovery.d.ts +27 -0
- package/agent-omp-sdk/dist/omp-disk-discovery.js +178 -0
- package/agent-omp-sdk/dist/omp-executable.d.ts +2 -0
- package/agent-omp-sdk/dist/omp-executable.js +30 -0
- package/agent-omp-sdk/dist/omp-store.d.ts +134 -0
- package/agent-omp-sdk/dist/omp-store.js +526 -0
- package/agent-omp-sdk/dist/pairing.d.ts +7 -0
- package/agent-omp-sdk/dist/pairing.js +45 -0
- package/agent-omp-sdk/dist/permission.d.ts +138 -0
- package/agent-omp-sdk/dist/permission.js +161 -0
- package/agent-omp-sdk/dist/protocol.d.ts +189 -0
- package/agent-omp-sdk/dist/rpc-types.d.ts +77 -0
- package/agent-omp-sdk/dist/rpc-types.js +1 -0
- package/agent-omp-sdk/dist/sdk-client.d.ts +160 -0
- package/{agent-omp → agent-omp-sdk}/dist/sdk-client.js +108 -56
- package/agent-omp-sdk/dist/sdk-runtime.d.ts +211 -0
- package/agent-omp-sdk/dist/sdk-runtime.js +418 -0
- package/agent-omp-sdk/dist/sidecar-client.d.ts +87 -0
- package/agent-omp-sdk/dist/sidecar-client.js +197 -0
- package/agent-omp-sdk/dist/store/adapter.d.ts +17 -0
- package/agent-omp-sdk/dist/store/adapter.js +47 -0
- package/agent-omp-sdk/dist/store/db.d.ts +70 -0
- package/agent-omp-sdk/dist/store/db.js +210 -0
- package/agent-omp-sdk/dist/store/index.d.ts +23 -0
- package/agent-omp-sdk/dist/store/index.js +59 -0
- package/agent-omp-sdk/dist/store/reconcile.d.ts +15 -0
- package/agent-omp-sdk/dist/store/reconcile.js +51 -0
- package/agent-omp-sdk/dist/store/schema.d.ts +8 -0
- package/agent-omp-sdk/dist/store/schema.js +40 -0
- package/agent-omp-sdk/dist/transport.d.ts +49 -0
- package/agent-omp-sdk/dist/transport.js +35 -0
- package/agent-omp-sdk/dist/world-home.d.ts +4 -0
- package/agent-omp-sdk/dist/world-home.js +23 -0
- package/agent-omp-sdk/dist/world-plugin.d.ts +10 -0
- package/agent-omp-sdk/dist/world-plugin.js +137 -0
- package/agent-omp-sdk/package.json +87 -0
- package/client/index.js +1794 -287
- package/cordis.patch.yml +80 -0
- package/package.json +23 -8
- package/superd-hub/dist/a2a-delivery.d.ts +189 -0
- package/superd-hub/dist/a2a-delivery.js +240 -0
- package/superd-hub/dist/a2a-host.d.ts +76 -0
- package/superd-hub/dist/a2a-host.js +145 -0
- package/superd-hub/dist/a2a-ingest.d.ts +31 -0
- package/superd-hub/dist/a2a-ingest.js +636 -0
- package/superd-hub/dist/a2a-log.d.ts +17 -0
- package/superd-hub/dist/a2a-log.js +42 -0
- package/superd-hub/dist/a2a-row.d.ts +65 -0
- package/superd-hub/dist/a2a-row.js +162 -0
- package/superd-hub/dist/a2a-service.d.ts +357 -0
- package/superd-hub/dist/a2a-service.js +980 -0
- package/superd-hub/dist/a2a-wire.d.ts +220 -0
- package/superd-hub/dist/a2a-wire.js +305 -0
- package/superd-hub/dist/agent-ids.d.ts +10 -0
- package/superd-hub/dist/agent-ids.js +68 -0
- package/superd-hub/dist/agent-roster.d.ts +29 -18
- package/superd-hub/dist/agent-roster.js +54 -15
- package/superd-hub/dist/agent-status.d.ts +119 -0
- package/superd-hub/dist/agent-status.js +386 -0
- package/superd-hub/dist/client/agent-settings.d.ts +156 -0
- package/superd-hub/dist/client/agent-settings.js +229 -0
- package/superd-hub/dist/client/mesh-api.d.ts +134 -0
- package/superd-hub/dist/client/mesh-api.js +219 -0
- package/superd-hub/dist/client/mesh-groups.d.ts +63 -0
- package/superd-hub/dist/client/mesh-groups.js +66 -0
- package/superd-hub/dist/client/roster.d.ts +48 -0
- package/superd-hub/dist/client/roster.js +102 -0
- package/superd-hub/dist/client/runtime-settings-api.d.ts +76 -0
- package/superd-hub/dist/client/runtime-settings-api.js +137 -0
- package/superd-hub/dist/client/switch.d.ts +165 -0
- package/superd-hub/dist/client/switch.js +295 -0
- package/superd-hub/dist/exec-pty-channel.d.ts +58 -0
- package/superd-hub/dist/exec-pty-channel.js +162 -0
- package/superd-hub/dist/exec-pty-framing.d.ts +32 -0
- package/superd-hub/dist/exec-pty-framing.js +81 -0
- package/superd-hub/dist/exec-pty-rpc.d.ts +21 -0
- package/superd-hub/dist/exec-pty-rpc.js +128 -0
- package/superd-hub/dist/exec-pty-session.d.ts +76 -0
- package/superd-hub/dist/exec-pty-session.js +234 -0
- package/superd-hub/dist/exec.d.ts +56 -0
- package/superd-hub/dist/exec.js +225 -0
- package/superd-hub/dist/gateway.d.ts +39 -2
- package/superd-hub/dist/gateway.js +62 -3
- package/superd-hub/dist/hub-tool.d.ts +174 -0
- package/superd-hub/dist/hub-tool.js +464 -0
- package/superd-hub/dist/index.d.ts +15 -1
- package/superd-hub/dist/index.js +16 -0
- package/superd-hub/dist/machines.d.ts +45 -0
- package/superd-hub/dist/machines.js +125 -0
- package/superd-hub/dist/mesh-federate.d.ts +138 -0
- package/superd-hub/dist/mesh-federate.js +223 -0
- package/superd-hub/dist/mesh-gateway.d.ts +67 -0
- package/superd-hub/dist/mesh-gateway.js +408 -0
- package/superd-hub/dist/mesh-link.d.ts +274 -0
- package/superd-hub/dist/mesh-link.js +441 -0
- package/superd-hub/dist/mesh-rpc.d.ts +123 -0
- package/superd-hub/dist/mesh-rpc.js +250 -0
- package/superd-hub/dist/mux-client.d.ts +71 -0
- package/superd-hub/dist/mux-client.js +281 -0
- package/superd-hub/dist/pack-version.d.ts +2 -0
- package/superd-hub/dist/pack-version.js +30 -0
- package/superd-hub/dist/roster.d.ts +6 -0
- package/superd-hub/dist/rpc.d.ts +18 -2
- package/superd-hub/dist/rpc.js +34 -4
- package/superd-hub/dist/spawn-world.js +3 -1
- package/superd-hub/dist/switch-core.d.ts +62 -25
- package/superd-hub/dist/switch-core.js +53 -30
- package/superd-hub/dist/system-head.d.ts +22 -12
- package/superd-hub/dist/system-head.js +100 -84
- package/superd-hub/dist/wire-endpoints.d.ts +264 -0
- package/superd-hub/dist/wire-endpoints.js +180 -0
- package/superd-hub/lib/client/index.js +1794 -287
- package/superd-hub/package.json +11 -2
- package/agent-agy/dist/agent-preset-projection.d.ts +0 -31
- package/agent-agy/dist/agent-preset-projection.js +0 -33
- package/agent-claude/dist/agent-preset-projection.js +0 -30
- package/agent-codex/dist/agent-preset-projection.js +0 -37
- package/agent-codex/dist/app-home.js +0 -65
- package/agent-codex/dist/models.js +0 -152
- package/agent-codex/dist/spike.js +0 -46
- package/agent-hermes/dist/agent-preset-projection.js +0 -34
- package/agent-omp/dist/agent-preset-projection.js +0 -36
- package/agent-omp/dist/app-home.js +0 -86
- package/agent-omp/dist/sidecar-client.js +0 -195
- package/agent-pi/dist/agent-preset-projection.js +0 -29
- package/superd-hub/dist/client-shim.d.ts +0 -28
- package/superd-hub/dist/client-shim.js +0 -251
- package/superd-hub/dist/index-pass.d.ts +0 -22
- package/superd-hub/dist/index-pass.js +0 -47
- package/superd-hub/dist/labels.d.ts +0 -45
- package/superd-hub/dist/labels.js +0 -83
- /package/{agent-agy → agent-agy-sdk}/bridge/agy_bridge.py +0 -0
- /package/{agent-agy → agent-agy-sdk}/bridge/gemini_openai_server.mjs +0 -0
- /package/{agent-codex/dist/codex-events.js → agent-codex-sdk/dist/codex-sdk-events.js} +0 -0
- /package/{agent-omp → agent-omp-sdk}/dist/protocol.js +0 -0
- /package/{agent-omp → agent-omp-sdk}/sidecar/main.ts +0 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agy-auth.ts — the CLI adapter's auth-form detection, fallback ladder, and
|
|
3
|
+
* the mutation it applies to the user's LOCAL Antigravity configuration.
|
|
4
|
+
*
|
|
5
|
+
* The Antigravity CLI has four auth channels (dev-rules §16a, re-probed
|
|
6
|
+
* 2026-10-02 against `agy` 1.2.14):
|
|
7
|
+
*
|
|
8
|
+
* 1. account sign-in default, `cloudcode-pa.googleapis.com`; the token
|
|
9
|
+
* lives in the freedesktop Secret Service keyring
|
|
10
|
+
* (`gnome-keyring-daemon`, `org.freedesktop.secrets`,
|
|
11
|
+
* entry `service=gemini username=antigravity`) with a
|
|
12
|
+
* file fallback at `~/.gemini/antigravity-cli/
|
|
13
|
+
* antigravity-oauth-token`;
|
|
14
|
+
* 2. Gemini API key `modelProvider: "gemini"` in the CLI's settings.json
|
|
15
|
+
* + `GEMINI_API_KEY` in the launch environment
|
|
16
|
+
* (+ optional `GOOGLE_GEMINI_BASE_URL`);
|
|
17
|
+
* 3. ADC `AGY_ADC_AUTH=1` — `adc_auth.go` reports
|
|
18
|
+
* "authenticated via adc (effective: adc)". Credentials
|
|
19
|
+
* are `~/.config/gcloud/application_default_credentials
|
|
20
|
+
* .json` (or a GCE metadata server). NOT the keyring;
|
|
21
|
+
* 4. BYO gateway `AGY_LLM_GATEWAY_*` (out of scope; see the spec).
|
|
22
|
+
*
|
|
23
|
+
* user ruling 2026-10-02 (supersedes the dev-rules §5 "never write the native
|
|
24
|
+
* home" default for THIS adapter, under §12 per-adapter discretion):
|
|
25
|
+
*
|
|
26
|
+
* 「拥抱用户自己的使用环境」 — this adapter is deliberately the configuration
|
|
27
|
+
* surface for the user's LOCAL Antigravity. Selecting a form here really does
|
|
28
|
+
* rewrite their `~/.gemini/antigravity-cli/settings.json`, so the TUI they
|
|
29
|
+
* already use keeps working afterwards. Paths are hard-coded relative to the
|
|
30
|
+
* user's home for exactly that reason.
|
|
31
|
+
*
|
|
32
|
+
* Fallback order (same ruling) = Gemini API key → OAuth → ADC. OAuth stays a
|
|
33
|
+
* PLACEHOLDER this round: no eligible account exists to characterise the
|
|
34
|
+
* native fields a real sign-in stores, so nothing reports it present.
|
|
35
|
+
*
|
|
36
|
+
* Pure: every probe result is injected, so `node --test` pins the ladder; the
|
|
37
|
+
* one filesystem-touching helper (`nativeSettingsPath`) is a pure path fold.
|
|
38
|
+
*
|
|
39
|
+
* @module agent-agy/agy-auth
|
|
40
|
+
*/
|
|
41
|
+
import { statSync } from "node:fs";
|
|
42
|
+
import { join } from "node:path";
|
|
43
|
+
/** Declared fallback order (user ruling 2026-10-02). Exported for the UI. */
|
|
44
|
+
export const AGY_AUTH_ORDER = ["apiKey", "oauth", "adc"];
|
|
45
|
+
/** Human labels, shared by the Hub settings panel and diagnostics. */
|
|
46
|
+
export const AGY_AUTH_LABELS = {
|
|
47
|
+
apiKey: "Gemini API key",
|
|
48
|
+
oauth: "OAuth (account sign-in)",
|
|
49
|
+
adc: "ADC (Vertex)",
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* The CLI's own app-data directory, hard-coded under the USER's home — the
|
|
53
|
+
* native Antigravity config we deliberately share with the TUI.
|
|
54
|
+
*
|
|
55
|
+
* @param realHome - the user's real `$HOME` (never an isolated override).
|
|
56
|
+
* @returns the absolute app-data directory.
|
|
57
|
+
*/
|
|
58
|
+
export function nativeCliDir(realHome) {
|
|
59
|
+
return join(realHome, ".gemini", "antigravity-cli");
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The CLI's settings file. The binary documents the auth flip here: "To switch
|
|
63
|
+
* back to signing in, remove `modelProvider` from settings.json and restart
|
|
64
|
+
* the CLI."
|
|
65
|
+
*
|
|
66
|
+
* @param realHome - the user's real `$HOME`.
|
|
67
|
+
* @returns the absolute settings.json path.
|
|
68
|
+
*/
|
|
69
|
+
export function nativeSettingsPath(realHome) {
|
|
70
|
+
return join(nativeCliDir(realHome), "settings.json");
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The credential file the CLI writes when a Google account signs in. This is
|
|
74
|
+
* the **Agent Platform** plane: `auth_method: "gcp"`, a `project_id`, and an
|
|
75
|
+
* access/refresh token pair. It is the backend the interactive TUI uses.
|
|
76
|
+
*
|
|
77
|
+
* @param realHome - the user's real `$HOME`.
|
|
78
|
+
* @returns the absolute path of the CLI's stored sign-in credential.
|
|
79
|
+
*/
|
|
80
|
+
export function signinTokenPath(realHome) {
|
|
81
|
+
return join(nativeCliDir(realHome), "antigravity-oauth-token");
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Is the CLI's own Google sign-in in place?
|
|
85
|
+
*
|
|
86
|
+
* Measured 2026-10-02 (this machine): headless CLI reads this plane first, and
|
|
87
|
+
* when it is present the transport works with NO Gemini API key, NO
|
|
88
|
+
* `AGY_ADC_AUTH`, and NO `modelProvider` in settings — the run reaches
|
|
89
|
+
* `result.status: SUCCESS`.
|
|
90
|
+
*
|
|
91
|
+
* This is what the auth ladder's middle rung means in practice: not a
|
|
92
|
+
* placeholder, but "let the CLI use the account it is already signed in as".
|
|
93
|
+
* It therefore must be DETECTED rather than assumed absent: treating it as
|
|
94
|
+
* permanently unavailable is what pushed the ladder onto ADC, whose project
|
|
95
|
+
* has `cloudcode-pa` disabled, and the adapter could never start a turn.
|
|
96
|
+
*
|
|
97
|
+
* @param realHome - the user's real `$HOME`.
|
|
98
|
+
* @returns whether a non-empty sign-in credential is on disk.
|
|
99
|
+
*/
|
|
100
|
+
export function hasSigninCredential(realHome) {
|
|
101
|
+
try {
|
|
102
|
+
return statSync(signinTokenPath(realHome)).size > 0;
|
|
103
|
+
}
|
|
104
|
+
catch {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* The settings.json change one form needs.
|
|
110
|
+
*
|
|
111
|
+
* Key mode pins the Gemini provider. ADC and OAuth need the DEFAULT backend, so
|
|
112
|
+
* `modelProvider` must be actively REMOVED — merely not setting it would leave
|
|
113
|
+
* a previously selected key mode in force and the TUI stuck on "Gemini API key"
|
|
114
|
+
* with no key exported.
|
|
115
|
+
*
|
|
116
|
+
* @param mode - the effective form.
|
|
117
|
+
* @returns the mutation to apply.
|
|
118
|
+
*/
|
|
119
|
+
export function authSettingsMutation(mode) {
|
|
120
|
+
return mode === "apiKey"
|
|
121
|
+
? { set: { modelProvider: "gemini" }, remove: [] }
|
|
122
|
+
: { set: {}, remove: ["modelProvider"] };
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Is this mode usable at all right now?
|
|
126
|
+
*
|
|
127
|
+
* @param availability - probe result.
|
|
128
|
+
* @param mode - the form to test.
|
|
129
|
+
* @returns whether the form is present.
|
|
130
|
+
*/
|
|
131
|
+
export function authAvailable(availability, mode) {
|
|
132
|
+
return availability[mode];
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Resolve the effective mode: an explicit selection wins when that form is
|
|
136
|
+
* actually present; otherwise the ladder supplies the first available form.
|
|
137
|
+
* Nothing present ⇒ `undefined` (the caller gates into onboarding).
|
|
138
|
+
*
|
|
139
|
+
* A stale selection (user picked API key, key later removed) deliberately
|
|
140
|
+
* falls through to the ladder instead of failing — the adapter must not wedge
|
|
141
|
+
* on config that no longer matches the machine.
|
|
142
|
+
*
|
|
143
|
+
* @param availability - probe result.
|
|
144
|
+
* @param selected - the user's persisted choice, when any.
|
|
145
|
+
* @returns the effective form, or `undefined` when nothing is available.
|
|
146
|
+
*/
|
|
147
|
+
export function resolveAuthMode(availability, selected) {
|
|
148
|
+
if (selected !== undefined && authAvailable(availability, selected))
|
|
149
|
+
return selected;
|
|
150
|
+
return AGY_AUTH_ORDER.find((mode) => authAvailable(availability, mode));
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The environment additions the spawned CLI needs for one mode.
|
|
154
|
+
*
|
|
155
|
+
* `AGY_CLI_DISABLE_AUTO_UPDATE=1` rides every mode: the CLI silently
|
|
156
|
+
* self-updated 1.2.12 → 1.2.14 on this machine on 2026-10-02, which makes any
|
|
157
|
+
* acceptance run unreproducible.
|
|
158
|
+
*
|
|
159
|
+
* NOTE there is no HOME handling here at all: the adapter runs the CLI against
|
|
160
|
+
* the user's REAL home in every mode. Isolating HOME (the previous design) both
|
|
161
|
+
* hid the very settings.json we now maintain and silently destroyed ADC
|
|
162
|
+
* (`$HOME/.config/gcloud`) and the keyring — which is how this adapter
|
|
163
|
+
* previously mis-concluded "the CLI cannot use ADC".
|
|
164
|
+
*
|
|
165
|
+
* @param mode - the effective form.
|
|
166
|
+
* @param apiKey - the resolved key (env or adapter state); empty ⇒ omitted.
|
|
167
|
+
* @returns env entries to ADD to the child's environment.
|
|
168
|
+
*/
|
|
169
|
+
export function authChildEnv(mode, apiKey) {
|
|
170
|
+
const env = { AGY_CLI_DISABLE_AUTO_UPDATE: "1" };
|
|
171
|
+
if (mode === "adc") {
|
|
172
|
+
env.AGY_ADC_AUTH = "1";
|
|
173
|
+
return env;
|
|
174
|
+
}
|
|
175
|
+
if (mode === "apiKey" && apiKey !== undefined && apiKey !== "") {
|
|
176
|
+
env.GEMINI_API_KEY = apiKey;
|
|
177
|
+
}
|
|
178
|
+
return env;
|
|
179
|
+
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Same surface as AgyBridgeClient so AgyAgent needs no changes.
|
|
17
17
|
*/
|
|
18
|
+
import { type AgyAuthMode, type AgySettingsMutation } from "./agy-auth.js";
|
|
18
19
|
export interface AgyCliOptions {
|
|
19
20
|
/** Key or a resolver (onboarding-saved keys become visible at first spawn). */
|
|
20
21
|
apiKey: string | (() => string | undefined);
|
|
@@ -34,14 +35,18 @@ export interface AgyCliOptions {
|
|
|
34
35
|
skipPermissions?: boolean;
|
|
35
36
|
/** agy binary override (tests point at a mock). */
|
|
36
37
|
agyBin?: string;
|
|
37
|
-
/** Native CLI settings dir override (tests; prod: ~/.gemini). */
|
|
38
|
-
nativeCliHome?: string;
|
|
39
38
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
39
|
+
* The USER's real home. The CLI always runs against it (never an isolated
|
|
40
|
+
* override), and this is where the native Antigravity settings we maintain
|
|
41
|
+
* live — see the module header for the 2026-10-02 「拥抱用户自己的使用环境」
|
|
42
|
+
* ruling.
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
realHome?: string;
|
|
45
|
+
/**
|
|
46
|
+
* The resolved auth form (agy-auth.ts). Absent defaults to `apiKey`, so an
|
|
47
|
+
* unconfigured machine still reaches the §17 onboarding path.
|
|
48
|
+
*/
|
|
49
|
+
authMode?: AgyAuthMode;
|
|
45
50
|
spawnAttempts?: number;
|
|
46
51
|
trace?: (...parts: unknown[]) => void;
|
|
47
52
|
}
|
|
@@ -81,8 +86,21 @@ export type CliEvent = {
|
|
|
81
86
|
error: string;
|
|
82
87
|
recoverable: boolean;
|
|
83
88
|
};
|
|
84
|
-
/**
|
|
85
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Apply one auth form's mutation to the user's LOCAL Antigravity settings.
|
|
91
|
+
*
|
|
92
|
+
* user ruling 2026-10-02 (「拥抱用户自己的使用环境」): this adapter is
|
|
93
|
+
* deliberately the configuration surface for the user's own Antigravity, so it
|
|
94
|
+
* really does rewrite their `~/.gemini/antigravity-cli/settings.json` — pick
|
|
95
|
+
* Gemini API key here and their TUI runs on the Gemini API key too; pick ADC or
|
|
96
|
+
* OAuth and the `modelProvider` pin is REMOVED so the TUI falls back to the
|
|
97
|
+
* default backend. Idempotent, and a no-op when the file already matches.
|
|
98
|
+
*
|
|
99
|
+
* @param realHome - the user's real `$HOME` (never an isolated override).
|
|
100
|
+
* @param mutation - keys to set and keys to remove.
|
|
101
|
+
* @returns `true` when the file changed on disk.
|
|
102
|
+
*/
|
|
103
|
+
export declare function applyAgySettings(realHome: string, mutation: AgySettingsMutation): boolean;
|
|
86
104
|
export declare class AgyCliClient {
|
|
87
105
|
private child?;
|
|
88
106
|
private buffer;
|
|
@@ -121,8 +139,20 @@ export declare class AgyCliClient {
|
|
|
121
139
|
total_tokens: number;
|
|
122
140
|
} | undefined;
|
|
123
141
|
private lastUsageValue;
|
|
124
|
-
|
|
142
|
+
/** The user's real home (the CLI and the settings we maintain both live here). */
|
|
143
|
+
private realHome;
|
|
125
144
|
private spawnCli;
|
|
145
|
+
/**
|
|
146
|
+
* Bounded tail of what the CLI said OUTSIDE its structured stream: stderr,
|
|
147
|
+
* plus stdout lines that were not JSONL frames. The CLI announces refusals
|
|
148
|
+
* this way and then exits (or reports a failed result), so dropping these
|
|
149
|
+
* lines is what turns every failure into "unknown error".
|
|
150
|
+
*/
|
|
151
|
+
private diagnostics;
|
|
152
|
+
/** Record one diagnostic line, keeping only a short tail. */
|
|
153
|
+
private noteDiagnostic;
|
|
154
|
+
/** Append the recorded CLI diagnostics to a failure message, once. */
|
|
155
|
+
private withDiagnostics;
|
|
126
156
|
private consume;
|
|
127
157
|
private consumeStep;
|
|
128
158
|
private dispatch;
|
|
@@ -18,11 +18,23 @@
|
|
|
18
18
|
import { spawn } from "node:child_process";
|
|
19
19
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
20
20
|
import { join } from "node:path";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
import { authChildEnv, authSettingsMutation, nativeSettingsPath, } from "./agy-auth.js";
|
|
22
|
+
/**
|
|
23
|
+
* Apply one auth form's mutation to the user's LOCAL Antigravity settings.
|
|
24
|
+
*
|
|
25
|
+
* user ruling 2026-10-02 (「拥抱用户自己的使用环境」): this adapter is
|
|
26
|
+
* deliberately the configuration surface for the user's own Antigravity, so it
|
|
27
|
+
* really does rewrite their `~/.gemini/antigravity-cli/settings.json` — pick
|
|
28
|
+
* Gemini API key here and their TUI runs on the Gemini API key too; pick ADC or
|
|
29
|
+
* OAuth and the `modelProvider` pin is REMOVED so the TUI falls back to the
|
|
30
|
+
* default backend. Idempotent, and a no-op when the file already matches.
|
|
31
|
+
*
|
|
32
|
+
* @param realHome - the user's real `$HOME` (never an isolated override).
|
|
33
|
+
* @param mutation - keys to set and keys to remove.
|
|
34
|
+
* @returns `true` when the file changed on disk.
|
|
35
|
+
*/
|
|
36
|
+
export function applyAgySettings(realHome, mutation) {
|
|
37
|
+
const p = nativeSettingsPath(realHome);
|
|
26
38
|
let settings = {};
|
|
27
39
|
if (existsSync(p)) {
|
|
28
40
|
try {
|
|
@@ -32,10 +44,15 @@ export function ensureCliKeyMode(nativeCliHome) {
|
|
|
32
44
|
settings = {};
|
|
33
45
|
}
|
|
34
46
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
const before = JSON.stringify(settings);
|
|
48
|
+
for (const key of mutation.remove)
|
|
49
|
+
delete settings[key];
|
|
50
|
+
Object.assign(settings, mutation.set);
|
|
51
|
+
if (JSON.stringify(settings) === before)
|
|
52
|
+
return false;
|
|
53
|
+
mkdirSync(join(p, ".."), { recursive: true });
|
|
38
54
|
writeFileSync(p, JSON.stringify(settings, null, 2) + "\n");
|
|
55
|
+
return true;
|
|
39
56
|
}
|
|
40
57
|
export class AgyCliClient {
|
|
41
58
|
child;
|
|
@@ -66,13 +83,21 @@ export class AgyCliClient {
|
|
|
66
83
|
return this.lastUsageValue;
|
|
67
84
|
}
|
|
68
85
|
lastUsageValue;
|
|
69
|
-
|
|
70
|
-
|
|
86
|
+
/** The user's real home (the CLI and the settings we maintain both live here). */
|
|
87
|
+
realHome() {
|
|
88
|
+
return this.opts.realHome ?? process.env.HOME ?? "";
|
|
71
89
|
}
|
|
72
90
|
spawnCli() {
|
|
73
91
|
if (this.child || this.dead)
|
|
74
92
|
return;
|
|
75
|
-
|
|
93
|
+
const mode = this.opts.authMode ?? "apiKey";
|
|
94
|
+
// Only key mode patches settings (`modelProvider: "gemini"`); ADC and OAuth
|
|
95
|
+
// need the DEFAULT backend, where that key must be ABSENT — the binary
|
|
96
|
+
// documents the flip: "To switch back to signing in, remove modelProvider
|
|
97
|
+
// from settings.json and restart the CLI". Per the 2026-10-02 ruling this
|
|
98
|
+
// lands in the USER's real native settings, so their TUI behaves the same
|
|
99
|
+
// way afterwards (「拥抱用户自己的使用环境」).
|
|
100
|
+
applyAgySettings(this.realHome(), authSettingsMutation(mode));
|
|
76
101
|
const attempts = this.opts.spawnAttempts ?? 3;
|
|
77
102
|
const agyBin = this.opts.agyBin ?? "agy";
|
|
78
103
|
// Order matters: --print swallows the next token as a prompt value
|
|
@@ -96,11 +121,16 @@ export class AgyCliClient {
|
|
|
96
121
|
for (let attempt = 1; attempt <= attempts; attempt++) {
|
|
97
122
|
try {
|
|
98
123
|
const key = typeof this.opts.apiKey === "function" ? this.opts.apiKey() : this.opts.apiKey;
|
|
99
|
-
if (!key)
|
|
124
|
+
if (mode === "apiKey" && !key)
|
|
100
125
|
throw new Error("agy cli: no GEMINI_API_KEY resolved");
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
126
|
+
// The auth ladder rides the child env (agy-auth.ts): AGY_ADC_AUTH for
|
|
127
|
+
// ADC, the key for key mode, and the auto-update pin on EVERY mode.
|
|
128
|
+
// NO_PROXY keeps the dev3 loopback bridge reachable.
|
|
129
|
+
const env = { ...process.env, NO_PROXY: "127.0.0.1,localhost", ...authChildEnv(mode, key) };
|
|
130
|
+
// No HOME override, ever: the settings we just maintained live at
|
|
131
|
+
// `$HOME/.gemini`, ADC at `$HOME/.config/gcloud`, and the sign-in token
|
|
132
|
+
// in the keyring — isolating HOME destroys all three. That was the
|
|
133
|
+
// 2026-10-02 bug behind "the CLI cannot use ADC".
|
|
104
134
|
if (this.opts.proxy) {
|
|
105
135
|
env.HTTPS_PROXY = this.opts.proxy;
|
|
106
136
|
env.HTTPS_PROXY = this.opts.proxy;
|
|
@@ -119,12 +149,45 @@ export class AgyCliClient {
|
|
|
119
149
|
child.stdout.setEncoding("utf8");
|
|
120
150
|
child.stdout.on("data", (d) => this.consume(d));
|
|
121
151
|
child.stderr.setEncoding("utf8");
|
|
122
|
-
child.stderr.on("data", (d) =>
|
|
152
|
+
child.stderr.on("data", (d) => {
|
|
153
|
+
this.opts.trace?.("[agy stderr]", d.trimEnd());
|
|
154
|
+
this.noteDiagnostic(d);
|
|
155
|
+
});
|
|
123
156
|
child.on("exit", (code) => {
|
|
124
157
|
this.child = undefined;
|
|
125
|
-
|
|
158
|
+
// The CLI reports its refusals on stderr / as non-JSON stdout lines and
|
|
159
|
+
// then exits non-zero. Those lines ARE the diagnosis ("--effort is not
|
|
160
|
+
// supported for model …", "Eligibility check failed: …"), so the exit
|
|
161
|
+
// error carries them: an opaque "exited code=1" leaves the user with a
|
|
162
|
+
// dead turn and nothing to act on.
|
|
163
|
+
this.dispatch({ event: "error", error: this.withDiagnostics(`agy exited code=${code}`), recoverable: !this.dead });
|
|
126
164
|
});
|
|
127
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Bounded tail of what the CLI said OUTSIDE its structured stream: stderr,
|
|
168
|
+
* plus stdout lines that were not JSONL frames. The CLI announces refusals
|
|
169
|
+
* this way and then exits (or reports a failed result), so dropping these
|
|
170
|
+
* lines is what turns every failure into "unknown error".
|
|
171
|
+
*/
|
|
172
|
+
diagnostics = [];
|
|
173
|
+
/** Record one diagnostic line, keeping only a short tail. */
|
|
174
|
+
noteDiagnostic(chunk) {
|
|
175
|
+
for (const raw of chunk.split("\n")) {
|
|
176
|
+
const line = raw.trim();
|
|
177
|
+
if (line === "")
|
|
178
|
+
continue;
|
|
179
|
+
this.diagnostics.push(line);
|
|
180
|
+
}
|
|
181
|
+
// A chatty child must not grow this without bound mid-turn.
|
|
182
|
+
if (this.diagnostics.length > 12)
|
|
183
|
+
this.diagnostics = this.diagnostics.slice(-12);
|
|
184
|
+
}
|
|
185
|
+
/** Append the recorded CLI diagnostics to a failure message, once. */
|
|
186
|
+
withDiagnostics(message) {
|
|
187
|
+
const tail = this.diagnostics.join(" | ");
|
|
188
|
+
this.diagnostics = [];
|
|
189
|
+
return tail === "" ? message : `${message}: ${tail}`;
|
|
190
|
+
}
|
|
128
191
|
consume(data) {
|
|
129
192
|
this.buffer += data;
|
|
130
193
|
let idx;
|
|
@@ -138,6 +201,7 @@ export class AgyCliClient {
|
|
|
138
201
|
parsed = JSON.parse(line);
|
|
139
202
|
}
|
|
140
203
|
catch (err) {
|
|
204
|
+
this.noteDiagnostic(line);
|
|
141
205
|
this.opts.trace?.("bad agy json:", line.slice(0, 120), err);
|
|
142
206
|
continue;
|
|
143
207
|
}
|
|
@@ -154,7 +218,7 @@ export class AgyCliClient {
|
|
|
154
218
|
if (r?.conversation_id)
|
|
155
219
|
this.conversationIdValue = r.conversation_id;
|
|
156
220
|
if (r?.status !== "SUCCESS") {
|
|
157
|
-
this.dispatch({ event: "error", error: r?.error ?? `agy result status=${r?.status}
|
|
221
|
+
this.dispatch({ event: "error", error: this.withDiagnostics(r?.error ?? `agy result status=${r?.status}`), recoverable: false });
|
|
158
222
|
}
|
|
159
223
|
else {
|
|
160
224
|
this.dispatch({ event: "done", conversation_id: this.conversationIdValue, turn_ms: 0 });
|
|
@@ -9,11 +9,19 @@
|
|
|
9
9
|
* injectable so tests use fixtures instead of env knobs (prod path has no
|
|
10
10
|
* redirection).
|
|
11
11
|
*/
|
|
12
|
+
import type { AgyAuthMode } from "./agy-auth.js";
|
|
12
13
|
export interface AgyAdapterState {
|
|
13
14
|
/** Gemini API key the user pasted through the onboarding session. */
|
|
14
15
|
apiKey?: string;
|
|
15
16
|
/** Cached default model slug (from native settings or catalog head). */
|
|
16
17
|
defaultModel?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The user's explicit auth-form choice for the CLI transport (the Hub's
|
|
20
|
+
* single-select). Absent ⇒ the agy-auth ladder decides. A stale choice (the
|
|
21
|
+
* form is gone from the machine) deliberately falls through to the ladder
|
|
22
|
+
* rather than wedging the adapter.
|
|
23
|
+
*/
|
|
24
|
+
authMode?: AgyAuthMode;
|
|
17
25
|
}
|
|
18
26
|
export declare function adapterStatePath(worldHome: string): string;
|
|
19
27
|
export declare function readAdapterState(worldHome: string): AgyAdapterState;
|
|
@@ -1,25 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agent-agy provider — Google Antigravity provider plugin for DeepSeek Harness
|
|
3
|
+
* (Super D, consumer-first line, 2026-09-18).
|
|
4
|
+
*
|
|
5
|
+
* An `AgentFactory` that drives an `AgyCliClient` — the user's OWN Antigravity
|
|
6
|
+
* CLI in headless stream-json mode. 2026-10-02 ruling 「拥抱用户自己的使用环境」:
|
|
7
|
+
* the adapter shares the user's real `~/.gemini` (native settings.json), their
|
|
8
|
+
* ADC (`~/.config/gcloud`), and their keyring, instead of isolating a HOME the
|
|
9
|
+
* CLI never had. The SDK/bridge transport lives in its own opt-in package,
|
|
10
|
+
* `@pgmi-builds/agent-agy-sdk`.
|
|
11
|
+
*
|
|
12
|
+
* Session identity ("mapping only"): the DSH session id is the authority,
|
|
13
|
+
* supplied by the harness. The CLI conversation id materializes after the
|
|
14
|
+
* first turn, so the pairing is persisted in `<worldHome>/dsh-sessions.json`
|
|
15
|
+
* (agy-sessions.ts). Resume resolves that record and fails CLOSED
|
|
16
|
+
* (CONVERSATION_NOT_FOUND) when no conversation is recorded. The DSH session
|
|
17
|
+
* log is the transcript authority, written through the upstream
|
|
18
|
+
* `sessionPersistence` service (hermes create/resume transaction shape).
|
|
19
|
+
*/
|
|
1
20
|
import { Context, Service } from "@deepseek-ai/cordis";
|
|
2
21
|
import type { AgentFactory, AgentHandle, CreateAgentOptions, ResumeAgentOptions } from "@deepseek-ai/dsh-agent";
|
|
3
22
|
/** Test/override knobs for the bridge child (prod: all unset). */
|
|
4
23
|
export interface AgyProviderOptions {
|
|
5
|
-
bridgePath?: string;
|
|
6
|
-
pythonBin?: string;
|
|
7
24
|
spawnAttempts?: number;
|
|
8
25
|
/** Native home override for tests (prod: ~/.gemini, read-only). */
|
|
9
26
|
nativeHome?: string;
|
|
10
|
-
/** Vertex project/location override (ADC mode). Default: gcloud CLI config. */
|
|
11
|
-
project?: string;
|
|
12
|
-
location?: string;
|
|
13
|
-
/** Tool-approval posture surfaced to every session's bridge start frame. */
|
|
14
|
-
approvalMode?: "allow" | "ask";
|
|
15
27
|
/** danger-full-access → CLI --dangerously-skip-permissions (default: true, patch default preset). */
|
|
16
28
|
skipPermissions?: boolean;
|
|
17
29
|
/** agy binary override (CLI path tests). */
|
|
18
30
|
agyBin?: string;
|
|
19
31
|
/** Forward proxy for the geo-fenced Gemini API (CLI path; dev3 gost). */
|
|
20
32
|
proxy?: string;
|
|
21
|
-
/**
|
|
22
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The USER's real home (default `$HOME`). The CLI always runs against it —
|
|
35
|
+
* 2026-10-02 ruling: the adapter shares the user's own Antigravity
|
|
36
|
+
* configuration (settings.json, ADC, keyring) instead of isolating it. The
|
|
37
|
+
* old isolated-HOME knob was removed with that ruling: it both hid the
|
|
38
|
+
* settings.json we maintain and silently destroyed ADC + the keyring.
|
|
39
|
+
*/
|
|
40
|
+
realHome?: string;
|
|
23
41
|
}
|
|
24
42
|
export declare class AgyProvider extends Service implements AgentFactory {
|
|
25
43
|
static inject: string[];
|
|
@@ -30,6 +48,8 @@ export declare class AgyProvider extends Service implements AgentFactory {
|
|
|
30
48
|
private readonly opts;
|
|
31
49
|
private defaultModelKey;
|
|
32
50
|
constructor(ctx: Context, opts?: AgyProviderOptions);
|
|
51
|
+
/** Which auth forms are present on this machine right now (probe, not choice). */
|
|
52
|
+
private authAvailability;
|
|
33
53
|
/** The world's DSH home: boot-provided dshHomePath first, env last. */
|
|
34
54
|
private resolveHome;
|
|
35
55
|
/** Effective Gemini API key: adapter state first, then the environment. */
|
|
@@ -46,7 +66,7 @@ export declare class AgyProvider extends Service implements AgentFactory {
|
|
|
46
66
|
private resolveDefaultModel;
|
|
47
67
|
/** Static route: provider `agy` + the resolved default (or the explicit ask).
|
|
48
68
|
* The selected model id (`slug` or `slug@level`) rides in `options.model`
|
|
49
|
-
* so
|
|
69
|
+
* so cliOptions can forward slug+thinkingLevel to the CLI child. */
|
|
50
70
|
private sessionAgentOptions;
|
|
51
71
|
private requirePersistence;
|
|
52
72
|
private agentRuntime;
|
|
@@ -58,12 +78,24 @@ export declare class AgyProvider extends Service implements AgentFactory {
|
|
|
58
78
|
createAgent(ownerCtx: Context, options: CreateAgentOptions): Promise<AgentHandle>;
|
|
59
79
|
resume(ownerCtx: Context, options: ResumeAgentOptions): Promise<AgentHandle>;
|
|
60
80
|
/**
|
|
61
|
-
* Live transport
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
81
|
+
* Live transport: CLI-ONLY (2026-10-02 user ruling).
|
|
82
|
+
*
|
|
83
|
+
* The SDK/bridge route moved to its own package
|
|
84
|
+
* (`@pgmi-builds/agent-agy-sdk`, delivered disabled by default): the product
|
|
85
|
+
* case is that the user ALREADY runs Antigravity, so the CLI reuses that
|
|
86
|
+
* environment for free while the SDK is an opt-in extra. Auth-form selection
|
|
87
|
+
* still rides the agy-auth ladder.
|
|
65
88
|
*/
|
|
66
89
|
private createLiveClient;
|
|
90
|
+
/**
|
|
91
|
+
* The auth form this machine should use: an explicitly selected, actually
|
|
92
|
+
* available form wins; otherwise the ladder Gemini API key → OAuth → ADC
|
|
93
|
+
* (user ruling 2026-10-02). OAuth is a placeholder this round — no eligible
|
|
94
|
+
* account exists to characterise which native fields a real sign-in stores —
|
|
95
|
+
* so nothing reports it present and it can never win. Falls back to `apiKey`
|
|
96
|
+
* so an unconfigured machine still reaches the §17 onboarding path.
|
|
97
|
+
*/
|
|
98
|
+
private effectiveAuthMode;
|
|
67
99
|
/**
|
|
68
100
|
* The effective permission preset this provider was mounted with. The
|
|
69
101
|
* cordis.patch.yml default is danger-full-access; a patch-level override
|
|
@@ -73,8 +105,6 @@ export declare class AgyProvider extends Service implements AgentFactory {
|
|
|
73
105
|
private currentPermissionPreset;
|
|
74
106
|
/** CLI transport options: key-first default is the cheapest live pair. */
|
|
75
107
|
private cliOptions;
|
|
76
|
-
/** Bridge child options: world cwd + overrides; the api key rides the start config. */
|
|
77
|
-
private clientOptions;
|
|
78
108
|
private createStoredSession;
|
|
79
109
|
}
|
|
80
110
|
export default AgyProvider;
|