super-dsh 0.1.9 → 0.1.10-e
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-claude/dist/adapter.js +106 -31
- package/agent-claude/dist/agent.js +154 -17
- package/agent-claude/dist/claude-client.js +84 -43
- package/agent-claude/dist/claude-launch.js +101 -0
- package/agent-claude/dist/claude-native-config.js +169 -0
- package/agent-claude/dist/claude-provider-gateway.js +340 -0
- package/agent-claude/dist/claude-providers.js +391 -0
- package/agent-claude/dist/claude-route.js +152 -0
- package/agent-claude/dist/index.js +214 -37
- package/agent-claude/dist/models.js +14 -0
- package/agent-claude/dist/sdk-runtime.js +320 -0
- package/agent-claude/package.json +6 -4
- 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 +1204 -93
- package/cordis.patch.yml +64 -0
- package/package.json +17 -8
- package/superd-hub/dist/client/agent-settings.d.ts +210 -0
- package/superd-hub/dist/client/agent-settings.js +300 -0
- package/superd-hub/dist/client/roster.js +6 -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/lib/client/index.js +1204 -93
- package/agent-codex/dist/models.js +0 -152
- package/agent-omp/dist/sidecar-client.js +0 -195
- /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
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* Discipline (agent-adapter-dev-rules §14-i / §16a):
|
|
6
6
|
* - LAZY: no python child until the first real prompt. `start` config is
|
|
7
7
|
* buffered and flushed with the first `prompt` (one round trip).
|
|
8
|
+
* - LAZY VENV (2026-10-02 ruling): the durable Python venv is fetched on that
|
|
9
|
+
* same first use, into the world home — never at install time (sdk-venv.ts).
|
|
8
10
|
* - Transient spawn failures retry in-place up to AGY_SPAWN_ATTEMPTS (3);
|
|
9
11
|
* prompt-level errors are surfaced, never auto-retried.
|
|
10
12
|
* - The agy CLI is never invoked; auth is transparent (api_key param or ADC
|
|
@@ -23,8 +25,17 @@ export interface AgyClientOptions {
|
|
|
23
25
|
location?: string;
|
|
24
26
|
workspaces?: string[];
|
|
25
27
|
saveDir?: string;
|
|
26
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Python interpreter override. Set → the durable venv is NOT fetched
|
|
30
|
+
* (tests point this at `process.execPath` for the mock bridge; an operator
|
|
31
|
+
* can point it at an interpreter that already has the SDK).
|
|
32
|
+
*/
|
|
27
33
|
pythonBin?: string;
|
|
34
|
+
/**
|
|
35
|
+
* World home anchoring the durable SDK venv (`<worldHome>/sdk-venv`). Absent
|
|
36
|
+
* ⇒ the venv root falls back to `$DSH_HOME/agents/agy-sdk`.
|
|
37
|
+
*/
|
|
38
|
+
worldHome?: string;
|
|
28
39
|
/** Bridge script override (tests point this at a mock). */
|
|
29
40
|
bridgePath?: string;
|
|
30
41
|
spawnAttempts?: number;
|
|
@@ -128,6 +139,8 @@ export declare class AgyBridgeClient {
|
|
|
128
139
|
}) => void): void;
|
|
129
140
|
private dead;
|
|
130
141
|
private startedSent;
|
|
142
|
+
/** In-flight first-use bootstrap (venv fetch + spawn); cleared when it settles. */
|
|
143
|
+
private spawnPromise;
|
|
131
144
|
private lastUsageValue;
|
|
132
145
|
/** Per-turn token usage from the bridge (undefined when the bridge skipped it). */
|
|
133
146
|
get lastUsage(): AgyTurnUsage | undefined;
|
|
@@ -137,9 +150,18 @@ export declare class AgyBridgeClient {
|
|
|
137
150
|
constructor(opts?: AgyClientOptions);
|
|
138
151
|
get conversationId(): string;
|
|
139
152
|
private resolveBridgePath;
|
|
140
|
-
/**
|
|
141
|
-
private
|
|
142
|
-
|
|
153
|
+
/** The world home anchoring the durable venv (default `$DSH_HOME/agents/agy-sdk`). */
|
|
154
|
+
private worldHome;
|
|
155
|
+
/**
|
|
156
|
+
* Resolve the interpreter and spawn the child, once.
|
|
157
|
+
*
|
|
158
|
+
* Interpreter precedence: explicit `pythonBin` (tests / operator override) →
|
|
159
|
+
* `AGY_PYTHON` → the durable world-home venv, fetched on this first use.
|
|
160
|
+
* Concurrent first turns share one in-flight bootstrap.
|
|
161
|
+
*/
|
|
162
|
+
private ensureChild;
|
|
163
|
+
private spawnOnce;
|
|
164
|
+
private spawnWith;
|
|
143
165
|
private consume;
|
|
144
166
|
private dispatch;
|
|
145
167
|
private nextEvent;
|
|
@@ -156,5 +178,3 @@ export declare class AgyBridgeClient {
|
|
|
156
178
|
turn(text: string): AsyncGenerator<string, string, void>;
|
|
157
179
|
close(): Promise<void>;
|
|
158
180
|
}
|
|
159
|
-
/** Convenience: read the venv python path recorded by scripts/setup-venv.sh. */
|
|
160
|
-
export declare function resolveVenvPython(worldHome: string): string | undefined;
|
|
@@ -5,15 +5,18 @@
|
|
|
5
5
|
* Discipline (agent-adapter-dev-rules §14-i / §16a):
|
|
6
6
|
* - LAZY: no python child until the first real prompt. `start` config is
|
|
7
7
|
* buffered and flushed with the first `prompt` (one round trip).
|
|
8
|
+
* - LAZY VENV (2026-10-02 ruling): the durable Python venv is fetched on that
|
|
9
|
+
* same first use, into the world home — never at install time (sdk-venv.ts).
|
|
8
10
|
* - Transient spawn failures retry in-place up to AGY_SPAWN_ATTEMPTS (3);
|
|
9
11
|
* prompt-level errors are surfaced, never auto-retried.
|
|
10
12
|
* - The agy CLI is never invoked; auth is transparent (api_key param or ADC
|
|
11
13
|
* environment picked up by the SDK itself).
|
|
12
14
|
*/
|
|
13
15
|
import { spawn } from "node:child_process";
|
|
14
|
-
import { existsSync
|
|
16
|
+
import { existsSync } from "node:fs";
|
|
15
17
|
import { dirname, join } from "node:path";
|
|
16
18
|
import { fileURLToPath } from "node:url";
|
|
19
|
+
import { ensureSdkVenv, resolveSdkPython } from "./sdk-venv.js";
|
|
17
20
|
const BRIDGE_RELATIVE = join("bridge", "agy_bridge.py");
|
|
18
21
|
export class AgyBridgeClient {
|
|
19
22
|
child;
|
|
@@ -30,6 +33,8 @@ export class AgyBridgeClient {
|
|
|
30
33
|
setToolEventHandler(handler) { }
|
|
31
34
|
dead = false;
|
|
32
35
|
startedSent = false;
|
|
36
|
+
/** In-flight first-use bootstrap (venv fetch + spawn); cleared when it settles. */
|
|
37
|
+
spawnPromise;
|
|
33
38
|
lastUsageValue = undefined;
|
|
34
39
|
/** Per-turn token usage from the bridge (undefined when the bridge skipped it). */
|
|
35
40
|
get lastUsage() {
|
|
@@ -59,25 +64,46 @@ export class AgyBridgeClient {
|
|
|
59
64
|
}
|
|
60
65
|
throw new Error(`agy bridge script not found (${BRIDGE_RELATIVE})`);
|
|
61
66
|
}
|
|
62
|
-
/**
|
|
63
|
-
|
|
67
|
+
/** The world home anchoring the durable venv (default `$DSH_HOME/agents/agy-sdk`). */
|
|
68
|
+
worldHome() {
|
|
69
|
+
if (this.opts.worldHome)
|
|
70
|
+
return this.opts.worldHome;
|
|
71
|
+
const dshHome = process.env.DSH_HOME;
|
|
72
|
+
if (typeof dshHome === "string" && dshHome !== "")
|
|
73
|
+
return join(dshHome, "agents", "agy-sdk");
|
|
74
|
+
return join(process.env.HOME ?? "", ".dsh", "agents", "agy-sdk");
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Resolve the interpreter and spawn the child, once.
|
|
78
|
+
*
|
|
79
|
+
* Interpreter precedence: explicit `pythonBin` (tests / operator override) →
|
|
80
|
+
* `AGY_PYTHON` → the durable world-home venv, fetched on this first use.
|
|
81
|
+
* Concurrent first turns share one in-flight bootstrap.
|
|
82
|
+
*/
|
|
83
|
+
ensureChild() {
|
|
84
|
+
if (this.child || this.dead)
|
|
85
|
+
return Promise.resolve();
|
|
86
|
+
this.spawnPromise ??= this.spawnOnce();
|
|
87
|
+
return this.spawnPromise;
|
|
88
|
+
}
|
|
89
|
+
async spawnOnce() {
|
|
64
90
|
try {
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
|
|
91
|
+
const worldHome = this.worldHome();
|
|
92
|
+
const pythonBin = this.opts.pythonBin
|
|
93
|
+
?? process.env.AGY_PYTHON
|
|
94
|
+
?? resolveSdkPython(worldHome)
|
|
95
|
+
?? await ensureSdkVenv(worldHome, {
|
|
96
|
+
...(this.opts.trace === undefined ? {} : { trace: this.opts.trace }),
|
|
97
|
+
});
|
|
98
|
+
if (!this.child && !this.dead)
|
|
99
|
+
this.spawnWith(pythonBin);
|
|
68
100
|
}
|
|
69
|
-
|
|
70
|
-
|
|
101
|
+
finally {
|
|
102
|
+
this.spawnPromise = undefined;
|
|
71
103
|
}
|
|
72
104
|
}
|
|
73
|
-
|
|
74
|
-
if (this.child || this.dead)
|
|
75
|
-
return;
|
|
105
|
+
spawnWith(pythonBin) {
|
|
76
106
|
const attempts = this.opts.spawnAttempts ?? 3;
|
|
77
|
-
const pythonBin = this.opts.pythonBin
|
|
78
|
-
?? this.resolvePackagedVenvPython()
|
|
79
|
-
?? process.env.AGY_PYTHON
|
|
80
|
-
?? "python3";
|
|
81
107
|
const bridgePath = this.resolveBridgePath();
|
|
82
108
|
for (let attempt = 1; attempt <= attempts; attempt++) {
|
|
83
109
|
try {
|
|
@@ -152,7 +178,7 @@ export class AgyBridgeClient {
|
|
|
152
178
|
}
|
|
153
179
|
/** Ping round trip (spawns the bridge if needed — use for liveness probes). */
|
|
154
180
|
async ping() {
|
|
155
|
-
this.
|
|
181
|
+
await this.ensureChild();
|
|
156
182
|
this.send({ op: "ping" });
|
|
157
183
|
await this.expect("pong");
|
|
158
184
|
}
|
|
@@ -162,7 +188,7 @@ export class AgyBridgeClient {
|
|
|
162
188
|
* Yields streamed text chunks; resolves with the full turn text.
|
|
163
189
|
*/
|
|
164
190
|
async *turn(text) {
|
|
165
|
-
this.
|
|
191
|
+
await this.ensureChild();
|
|
166
192
|
if (!this.startedSent) {
|
|
167
193
|
this.send({
|
|
168
194
|
op: "start",
|
|
@@ -242,11 +268,3 @@ export class AgyBridgeClient {
|
|
|
242
268
|
this.child = undefined;
|
|
243
269
|
}
|
|
244
270
|
}
|
|
245
|
-
/** Convenience: read the venv python path recorded by scripts/setup-venv.sh. */
|
|
246
|
-
export function resolveVenvPython(worldHome) {
|
|
247
|
-
const p = join(worldHome, "agy-venv-python.txt");
|
|
248
|
-
if (!existsSync(p))
|
|
249
|
-
return undefined;
|
|
250
|
-
const v = readFileSync(p, "utf8").trim();
|
|
251
|
-
return v || undefined;
|
|
252
|
-
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Prod homes that must never be resolved into (repo red line). */
|
|
2
|
+
/** One persisted DSH → Antigravity conversation pairing. */
|
|
3
|
+
export interface AgySessionRecord {
|
|
4
|
+
/** The SDK conversation id; `null` until the first turn materializes it. */
|
|
5
|
+
readonly conversationId: string | null;
|
|
6
|
+
/** The cwd the bridge session was (or is to be) spawned in. */
|
|
7
|
+
readonly cwd: string;
|
|
8
|
+
/** Epoch ms of the DSH session's creation. */
|
|
9
|
+
readonly createdAt: number;
|
|
10
|
+
/** Record-only permission preset at create, when one was known. */
|
|
11
|
+
readonly preset: string | null;
|
|
12
|
+
}
|
|
13
|
+
export type AgySessionMap = Record<string, AgySessionRecord>;
|
|
14
|
+
/**
|
|
15
|
+
* The adapter's DSH-side world home. Form-A (boot home = DSH home root) nests
|
|
16
|
+
* `agents/agy`; Form-B (already `<root>/agents/agy`) passes through.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveAgyWorldHome(home?: string): string;
|
|
19
|
+
export declare function sessionMapPath(home?: string): string;
|
|
20
|
+
/** Read the map. Fail-soft: missing or malformed file reads as `{}`. */
|
|
21
|
+
export declare function readSessionMap(home?: string): AgySessionMap;
|
|
22
|
+
/** One session's record, or `undefined` when the id is unknown. */
|
|
23
|
+
export declare function sessionRecord(home: string | undefined, dshSessionId: string): AgySessionRecord | undefined;
|
|
24
|
+
/** Insert or merge one record, persisted atomically (temp file + rename). */
|
|
25
|
+
export declare function upsertSession(home: string | undefined, dshSessionId: string, patch: Partial<AgySessionRecord>): AgySessionRecord;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSH-session ↔ Antigravity-conversation identity map (the "mapping only"
|
|
3
|
+
* model, mirroring hermes-store.ts; 2026-09-18).
|
|
4
|
+
*
|
|
5
|
+
* The DSH session id is the authority. The SDK's `conversationId` only
|
|
6
|
+
* materializes after the first turn (first bridge prompt), so the pairing is
|
|
7
|
+
* persisted in the adapter's DSH-side app dir — `<worldHome>/dsh-sessions.json`
|
|
8
|
+
* (never the runtime's native `~/.gemini`). Mapping only: resume resolves the
|
|
9
|
+
* record or fails closed; native conversation storage is never scanned.
|
|
10
|
+
*
|
|
11
|
+
* Shape: `{ "<dshSessionId>": { conversationId, cwd, createdAt, preset } }` —
|
|
12
|
+
* `conversationId` is `null` until the first turn materializes it.
|
|
13
|
+
*/
|
|
14
|
+
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
15
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
16
|
+
/**
|
|
17
|
+
* The adapter's DSH-side world home. Form-A (boot home = DSH home root) nests
|
|
18
|
+
* `agents/agy`; Form-B (already `<root>/agents/agy`) passes through.
|
|
19
|
+
*/
|
|
20
|
+
export function resolveAgyWorldHome(home) {
|
|
21
|
+
const base = resolve(home ?? process.env.DSH_HOME ?? join(process.cwd(), ".tests", "superd"));
|
|
22
|
+
const dir = basename(base) === "agy" && basename(dirname(base)) === "agents" ? base : join(base, "agents", "agy");
|
|
23
|
+
return dir;
|
|
24
|
+
}
|
|
25
|
+
export function sessionMapPath(home) {
|
|
26
|
+
return join(resolveAgyWorldHome(home), "dsh-sessions.json");
|
|
27
|
+
}
|
|
28
|
+
/** Read the map. Fail-soft: missing or malformed file reads as `{}`. */
|
|
29
|
+
export function readSessionMap(home) {
|
|
30
|
+
let raw;
|
|
31
|
+
try {
|
|
32
|
+
raw = readFileSync(sessionMapPath(home), "utf8");
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
let parsed;
|
|
38
|
+
try {
|
|
39
|
+
parsed = JSON.parse(raw);
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
|
|
45
|
+
return {};
|
|
46
|
+
const out = {};
|
|
47
|
+
for (const [id, value] of Object.entries(parsed)) {
|
|
48
|
+
const record = coerceRecord(value);
|
|
49
|
+
if (record !== undefined)
|
|
50
|
+
out[id] = record;
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
function coerceRecord(value) {
|
|
55
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
56
|
+
return undefined;
|
|
57
|
+
const raw = value;
|
|
58
|
+
const cwd = raw["cwd"];
|
|
59
|
+
const createdAt = raw["createdAt"];
|
|
60
|
+
if (typeof cwd !== "string" || cwd === "")
|
|
61
|
+
return undefined;
|
|
62
|
+
const conversationId = raw["conversationId"];
|
|
63
|
+
const preset = raw["preset"];
|
|
64
|
+
return {
|
|
65
|
+
conversationId: typeof conversationId === "string" && conversationId !== "" ? conversationId : null,
|
|
66
|
+
cwd,
|
|
67
|
+
createdAt: typeof createdAt === "number" && Number.isFinite(createdAt) ? createdAt : 0,
|
|
68
|
+
preset: typeof preset === "string" && preset !== "" ? preset : null,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/** One session's record, or `undefined` when the id is unknown. */
|
|
72
|
+
export function sessionRecord(home, dshSessionId) {
|
|
73
|
+
return readSessionMap(home)[dshSessionId];
|
|
74
|
+
}
|
|
75
|
+
/** Insert or merge one record, persisted atomically (temp file + rename). */
|
|
76
|
+
export function upsertSession(home, dshSessionId, patch) {
|
|
77
|
+
const path = sessionMapPath(home);
|
|
78
|
+
const map = readSessionMap(home);
|
|
79
|
+
const previous = map[dshSessionId];
|
|
80
|
+
const next = {
|
|
81
|
+
conversationId: patch.conversationId !== undefined ? patch.conversationId : previous?.conversationId ?? null,
|
|
82
|
+
cwd: patch.cwd !== undefined ? patch.cwd : previous?.cwd ?? "",
|
|
83
|
+
createdAt: patch.createdAt !== undefined ? patch.createdAt : previous?.createdAt ?? Date.now(),
|
|
84
|
+
preset: patch.preset !== undefined ? patch.preset : previous?.preset ?? null,
|
|
85
|
+
};
|
|
86
|
+
map[dshSessionId] = next;
|
|
87
|
+
writeMapAtomic(path, map);
|
|
88
|
+
return next;
|
|
89
|
+
}
|
|
90
|
+
function writeMapAtomic(path, map) {
|
|
91
|
+
const dir = dirname(path);
|
|
92
|
+
mkdirSync(dir, { recursive: true });
|
|
93
|
+
const temp = `${path}.${process.pid}.${Date.now()}.tmp`;
|
|
94
|
+
writeFileSync(temp, `${JSON.stringify(map, null, 2)}\n`, { encoding: "utf8", mode: 0o600 });
|
|
95
|
+
try {
|
|
96
|
+
renameSync(temp, path);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
try {
|
|
100
|
+
rmSync(temp, { force: true });
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
// The rename failure is primary.
|
|
104
|
+
}
|
|
105
|
+
throw error;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agy-store.ts — adapter-owned state + native-home read-only access.
|
|
3
|
+
*
|
|
4
|
+
* Home discipline (agent-adapter-dev-rules §5/§13/§16a):
|
|
5
|
+
* - Adapter state (Gemini API key, cached default model) lives in the WORLD
|
|
6
|
+
* DSH home: `<worldHome>/agy-adapter.json`. Never written into `~/.gemini`.
|
|
7
|
+
* - The native home (`~/.gemini`) is READ-ONLY for us: default model comes
|
|
8
|
+
* from `~/.gemini/antigravity-cli/settings.json` (`model` field). Paths are
|
|
9
|
+
* injectable so tests use fixtures instead of env knobs (prod path has no
|
|
10
|
+
* redirection).
|
|
11
|
+
*/
|
|
12
|
+
export interface AgyAdapterState {
|
|
13
|
+
/** Gemini API key the user pasted through the onboarding session. */
|
|
14
|
+
apiKey?: string;
|
|
15
|
+
/** Cached default model slug (from native settings or catalog head). */
|
|
16
|
+
defaultModel?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function adapterStatePath(worldHome: string): string;
|
|
19
|
+
export declare function readAdapterState(worldHome: string): AgyAdapterState;
|
|
20
|
+
export declare function writeAdapterState(worldHome: string, state: AgyAdapterState): void;
|
|
21
|
+
/**
|
|
22
|
+
* ADC evidence probe: the SDK picks up Application Default Credentials on its
|
|
23
|
+
* own, so their mere existence satisfies auth (§16a transparency). Checks the
|
|
24
|
+
* two standard sources — the env-pointed service-account key and the gcloud
|
|
25
|
+
* user ADC file. Read-only; paths injectable for tests.
|
|
26
|
+
*/
|
|
27
|
+
export declare function hasAdcEvidence(env: NodeJS.ProcessEnv, home: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Read the gcloud CLI default project (ADC companion): the SDK's Vertex
|
|
30
|
+
* endpoint needs an explicit project when no api_key is given. Parses
|
|
31
|
+
* `~/.config/gcloud/configurations/config_default` (read-only, fixture-friendly).
|
|
32
|
+
*/
|
|
33
|
+
export declare function readGcloudProject(home: string): string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Default model as the agy TUI would report it. Read-only probe of the
|
|
36
|
+
* native home; missing file / missing field → undefined (caller falls back
|
|
37
|
+
* to the static catalog head).
|
|
38
|
+
*/
|
|
39
|
+
export declare function readNativeDefaultModel(nativeHome: string): string | undefined;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agy-store.ts — adapter-owned state + native-home read-only access.
|
|
3
|
+
*
|
|
4
|
+
* Home discipline (agent-adapter-dev-rules §5/§13/§16a):
|
|
5
|
+
* - Adapter state (Gemini API key, cached default model) lives in the WORLD
|
|
6
|
+
* DSH home: `<worldHome>/agy-adapter.json`. Never written into `~/.gemini`.
|
|
7
|
+
* - The native home (`~/.gemini`) is READ-ONLY for us: default model comes
|
|
8
|
+
* from `~/.gemini/antigravity-cli/settings.json` (`model` field). Paths are
|
|
9
|
+
* injectable so tests use fixtures instead of env knobs (prod path has no
|
|
10
|
+
* redirection).
|
|
11
|
+
*/
|
|
12
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
export function adapterStatePath(worldHome) {
|
|
15
|
+
return join(worldHome, "agy-adapter.json");
|
|
16
|
+
}
|
|
17
|
+
export function readAdapterState(worldHome) {
|
|
18
|
+
const p = adapterStatePath(worldHome);
|
|
19
|
+
if (!existsSync(p))
|
|
20
|
+
return {};
|
|
21
|
+
try {
|
|
22
|
+
const parsed = JSON.parse(readFileSync(p, "utf8"));
|
|
23
|
+
return typeof parsed === "object" && parsed !== null ? parsed : {};
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function writeAdapterState(worldHome, state) {
|
|
30
|
+
writeFileSync(adapterStatePath(worldHome), JSON.stringify(state, null, 2) + "\n");
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* ADC evidence probe: the SDK picks up Application Default Credentials on its
|
|
34
|
+
* own, so their mere existence satisfies auth (§16a transparency). Checks the
|
|
35
|
+
* two standard sources — the env-pointed service-account key and the gcloud
|
|
36
|
+
* user ADC file. Read-only; paths injectable for tests.
|
|
37
|
+
*/
|
|
38
|
+
export function hasAdcEvidence(env, home) {
|
|
39
|
+
const fromEnv = env.GOOGLE_APPLICATION_CREDENTIALS;
|
|
40
|
+
if (typeof fromEnv === "string" && fromEnv !== "" && existsSync(fromEnv))
|
|
41
|
+
return true;
|
|
42
|
+
return existsSync(join(home, ".config", "gcloud", "application_default_credentials.json"));
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Read the gcloud CLI default project (ADC companion): the SDK's Vertex
|
|
46
|
+
* endpoint needs an explicit project when no api_key is given. Parses
|
|
47
|
+
* `~/.config/gcloud/configurations/config_default` (read-only, fixture-friendly).
|
|
48
|
+
*/
|
|
49
|
+
export function readGcloudProject(home) {
|
|
50
|
+
const p = join(home, ".config", "gcloud", "configurations", "config_default");
|
|
51
|
+
if (!existsSync(p))
|
|
52
|
+
return undefined;
|
|
53
|
+
try {
|
|
54
|
+
for (const line of readFileSync(p, "utf8").split("\n")) {
|
|
55
|
+
const m = /^\s*project\s*=\s*(\S+)\s*$/.exec(line);
|
|
56
|
+
if (m)
|
|
57
|
+
return m[1];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
/* fall through */
|
|
62
|
+
}
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Default model as the agy TUI would report it. Read-only probe of the
|
|
67
|
+
* native home; missing file / missing field → undefined (caller falls back
|
|
68
|
+
* to the static catalog head).
|
|
69
|
+
*/
|
|
70
|
+
export function readNativeDefaultModel(nativeHome) {
|
|
71
|
+
const p = join(nativeHome, "antigravity-cli", "settings.json");
|
|
72
|
+
if (!existsSync(p))
|
|
73
|
+
return undefined;
|
|
74
|
+
try {
|
|
75
|
+
const parsed = JSON.parse(readFileSync(p, "utf8"));
|
|
76
|
+
return typeof parsed.model === "string" && parsed.model.length > 0
|
|
77
|
+
? parsed.model
|
|
78
|
+
: undefined;
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal in-memory inbox for the Hermes agent shim.
|
|
3
|
+
*
|
|
4
|
+
* The 0.1.5 `dsh-agent` contract exposes the inbox as an interface
|
|
5
|
+
* (`Inbox` in `runtime-types`); the durable projection-backed implementation
|
|
6
|
+
* (`ReactLoopInbox`) lives inside the (disabled) `dsh-agent-loop`. Hermes owns
|
|
7
|
+
* its own transcript and the adapter delivers messages directly to the Hermes
|
|
8
|
+
* client (`HermesAgent.#deliver`), so this inbox is never queued into — it
|
|
9
|
+
* exists to satisfy the `Agent` interface's `inbox` surface with correct
|
|
10
|
+
* (empty) semantics: `nextTurn`/`nextStep` stay empty and every mutation is
|
|
11
|
+
* a faithful in-memory splice.
|
|
12
|
+
*/
|
|
13
|
+
import type { Inbox as InboxContract, InboxTarget } from "@deepseek-ai/dsh-agent";
|
|
14
|
+
import type { UserMessage } from "@deepseek-ai/dsh-session";
|
|
15
|
+
import type { MessageId } from "@deepseek-ai/dsh-llm";
|
|
16
|
+
export declare class Inbox implements InboxContract {
|
|
17
|
+
#private;
|
|
18
|
+
get nextTurn(): readonly UserMessage[];
|
|
19
|
+
get nextStep(): readonly UserMessage[];
|
|
20
|
+
clear(): void;
|
|
21
|
+
append(target: InboxTarget, message: UserMessage): void;
|
|
22
|
+
prepend(target: InboxTarget, message: UserMessage): void;
|
|
23
|
+
replace(messageId: MessageId, newMessage: UserMessage): boolean;
|
|
24
|
+
remove(messageId: MessageId): boolean;
|
|
25
|
+
splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];
|
|
26
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export class Inbox {
|
|
2
|
+
#nextTurn = [];
|
|
3
|
+
#nextStep = [];
|
|
4
|
+
get nextTurn() {
|
|
5
|
+
return this.#nextTurn;
|
|
6
|
+
}
|
|
7
|
+
get nextStep() {
|
|
8
|
+
return this.#nextStep;
|
|
9
|
+
}
|
|
10
|
+
clear() {
|
|
11
|
+
this.#nextTurn = [];
|
|
12
|
+
this.#nextStep = [];
|
|
13
|
+
}
|
|
14
|
+
append(target, message) {
|
|
15
|
+
this.#list(target).push(message);
|
|
16
|
+
}
|
|
17
|
+
prepend(target, message) {
|
|
18
|
+
this.#list(target).unshift(message);
|
|
19
|
+
}
|
|
20
|
+
replace(messageId, newMessage) {
|
|
21
|
+
const list = this.#find(messageId);
|
|
22
|
+
if (list === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
const index = list.findIndex((message) => message.id === messageId);
|
|
25
|
+
if (index < 0)
|
|
26
|
+
return false;
|
|
27
|
+
list.splice(index, 1, newMessage);
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
remove(messageId) {
|
|
31
|
+
const list = this.#find(messageId);
|
|
32
|
+
if (list === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
const index = list.findIndex((message) => message.id === messageId);
|
|
35
|
+
if (index < 0)
|
|
36
|
+
return false;
|
|
37
|
+
list.splice(index, 1);
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
splice(target, start, deleteCount, inserted) {
|
|
41
|
+
return this.#list(target).splice(start, deleteCount, ...inserted);
|
|
42
|
+
}
|
|
43
|
+
#list(target) {
|
|
44
|
+
return target === "next-turn" ? this.#nextTurn : this.#nextStep;
|
|
45
|
+
}
|
|
46
|
+
#find(messageId) {
|
|
47
|
+
if (this.#nextTurn.some((message) => message.id === messageId))
|
|
48
|
+
return this.#nextTurn;
|
|
49
|
+
if (this.#nextStep.some((message) => message.id === messageId))
|
|
50
|
+
return this.#nextStep;
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agent-agy-sdk provider — Google Antigravity provider plugin for DeepSeek
|
|
3
|
+
* Harness (Super D, opt-in SDK line, 2026-10-02 split).
|
|
4
|
+
*
|
|
5
|
+
* The SDK half of the Antigravity split. An `AgentFactory` that drives an
|
|
6
|
+
* `AgyBridgeClient` (the Python google-antigravity SDK bridge child —
|
|
7
|
+
* localharness materializes inside it on the FIRST prompt, so create/resume
|
|
8
|
+
* spawn nothing). Auth is consumer-first: a Gemini API key persisted in the
|
|
9
|
+
* adapter's world-home state, or ADC via the environment (the SDK picks it up;
|
|
10
|
+
* this package NEVER invokes the agy CLI — dev-rules §16a). The CLI transport
|
|
11
|
+
* is the sibling package `@pgmi-builds/agent-agy`.
|
|
12
|
+
*
|
|
13
|
+
* Session identity ("mapping only"): the DSH session id is the authority,
|
|
14
|
+
* supplied by the harness. The SDK conversation id materializes after the
|
|
15
|
+
* first turn, so the pairing is persisted in `<worldHome>/dsh-sessions.json`
|
|
16
|
+
* (agy-sessions.ts). Resume resolves that record and fails CLOSED
|
|
17
|
+
* (CONVERSATION_NOT_FOUND) when no conversation is recorded. The DSH session
|
|
18
|
+
* log is the transcript authority, written through the upstream
|
|
19
|
+
* `sessionPersistence` service (hermes create/resume transaction shape).
|
|
20
|
+
*
|
|
21
|
+
* Deployment (2026-10-02 user ruling): the composite ships this row DISABLED
|
|
22
|
+
* and the package declares NO Python dependency and no postinstall — the
|
|
23
|
+
* durable venv under the world home is fetched lazily on first real use
|
|
24
|
+
* (sdk-venv.ts).
|
|
25
|
+
*/
|
|
26
|
+
import { Context, Service } from "@deepseek-ai/cordis";
|
|
27
|
+
import type { AgentFactory, AgentHandle, CreateAgentOptions, ResumeAgentOptions } from "@deepseek-ai/dsh-agent";
|
|
28
|
+
/** Test/override knobs for the bridge child (prod: all unset). */
|
|
29
|
+
export interface AgyProviderOptions {
|
|
30
|
+
bridgePath?: string;
|
|
31
|
+
pythonBin?: string;
|
|
32
|
+
spawnAttempts?: number;
|
|
33
|
+
/** Native home override for tests (prod: ~/.gemini, read-only). */
|
|
34
|
+
nativeHome?: string;
|
|
35
|
+
/** Vertex project/location override (ADC mode). Default: gcloud CLI config. */
|
|
36
|
+
project?: string;
|
|
37
|
+
location?: string;
|
|
38
|
+
/** Tool-approval posture surfaced to every session's bridge start frame. */
|
|
39
|
+
approvalMode?: "allow" | "ask";
|
|
40
|
+
}
|
|
41
|
+
export declare class AgyProvider extends Service implements AgentFactory {
|
|
42
|
+
static inject: string[];
|
|
43
|
+
/** Plain holder — prevents Cordis re-tracing the factory's ctx through a caller shadow. */
|
|
44
|
+
private readonly runtime;
|
|
45
|
+
/** The world's DSH home — anchors adapter-owned state (session map, api-key state). */
|
|
46
|
+
private readonly home;
|
|
47
|
+
private readonly opts;
|
|
48
|
+
private defaultModelKey;
|
|
49
|
+
constructor(ctx: Context, opts?: AgyProviderOptions);
|
|
50
|
+
/** The world's DSH home: boot-provided dshHomePath first, env last. */
|
|
51
|
+
private resolveHome;
|
|
52
|
+
/** Effective Gemini API key: adapter state first, then the environment. */
|
|
53
|
+
private resolveApiKey;
|
|
54
|
+
/**
|
|
55
|
+
* Auth evidence for the §17 onboarding gate: an API key (state or env) OR
|
|
56
|
+
* ADC evidence is enough — the SDK consumes either transparently, so a user
|
|
57
|
+
* with gcloud ADC must NOT be pushed into key onboarding.
|
|
58
|
+
*/
|
|
59
|
+
private hasAuthEvidence;
|
|
60
|
+
/** Default model id: adapter state → native TUI default (slug-normalized) → catalog head. */
|
|
61
|
+
private resolveDefaultModelId;
|
|
62
|
+
/** Legacy slug-only default (default-model push keeps slug form). */
|
|
63
|
+
private resolveDefaultModel;
|
|
64
|
+
/** Static route: provider `agy` + the resolved default (or the explicit ask).
|
|
65
|
+
* The selected model id (`slug` or `slug@level`) rides in `options.model`
|
|
66
|
+
* so clientOptions can forward slug+thinkingLevel to the bridge start frame. */
|
|
67
|
+
private sessionAgentOptions;
|
|
68
|
+
private requirePersistence;
|
|
69
|
+
private agentRuntime;
|
|
70
|
+
/** Persist the Dash↔conversation pairing once the first turn materializes it. */
|
|
71
|
+
private readonly followConversationId;
|
|
72
|
+
private registerModelCatalog;
|
|
73
|
+
/** Push the resolved default model into the world's `agentDefaultModel`. */
|
|
74
|
+
private registerDefaultModel;
|
|
75
|
+
createAgent(ownerCtx: Context, options: CreateAgentOptions): Promise<AgentHandle>;
|
|
76
|
+
resume(ownerCtx: Context, options: ResumeAgentOptions): Promise<AgentHandle>;
|
|
77
|
+
/**
|
|
78
|
+
* Live transport: SDK-ONLY (2026-10-02 user ruling).
|
|
79
|
+
*
|
|
80
|
+
* This package is the opt-in SDK half of the Antigravity split: it drives the
|
|
81
|
+
* Python google-antigravity SDK through the JSONL bridge and NEVER invokes the
|
|
82
|
+
* user's `agy` CLI (that transport is `@pgmi-builds/agent-agy`).
|
|
83
|
+
* Auth (§16a transparency): a key from adapter state / `GEMINI_API_KEY` rides
|
|
84
|
+
* the start frame; without one the SDK falls back to ADC (Vertex, project read
|
|
85
|
+
* from the gcloud default). Neither ⇒ the §17 onboarding branch answers the
|
|
86
|
+
* first turn locally, before anything spawns.
|
|
87
|
+
*/
|
|
88
|
+
private createLiveClient;
|
|
89
|
+
/** Bridge child options: world cwd + overrides; the api key rides the start config. */
|
|
90
|
+
private clientOptions;
|
|
91
|
+
private createStoredSession;
|
|
92
|
+
}
|
|
93
|
+
export default AgyProvider;
|