@jini-ai/agent-runtime 0.3.0 → 0.3.1

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.
Files changed (54) hide show
  1. package/dist/auth.js +1 -1
  2. package/dist/capabilities.d.ts +1 -1
  3. package/dist/claude-stream.d.ts +1 -1
  4. package/dist/claude-stream.js +1 -1
  5. package/dist/defs/antigravity.d.ts +1 -28
  6. package/dist/defs/antigravity.d.ts.map +1 -1
  7. package/dist/defs/antigravity.js +94 -246
  8. package/dist/defs/antigravity.js.map +1 -1
  9. package/dist/defs/claude.d.ts +5 -0
  10. package/dist/defs/claude.d.ts.map +1 -1
  11. package/dist/defs/claude.js +12 -9
  12. package/dist/defs/claude.js.map +1 -1
  13. package/dist/defs/opencode.d.ts +4 -0
  14. package/dist/defs/opencode.d.ts.map +1 -1
  15. package/dist/defs/opencode.js +19 -0
  16. package/dist/defs/opencode.js.map +1 -1
  17. package/dist/defs/pi.d.ts +4 -0
  18. package/dist/defs/pi.d.ts.map +1 -1
  19. package/dist/defs/pi.js +10 -3
  20. package/dist/defs/pi.js.map +1 -1
  21. package/dist/defs/reasonix.d.ts +4 -0
  22. package/dist/defs/reasonix.d.ts.map +1 -1
  23. package/dist/defs/reasonix.js +16 -6
  24. package/dist/defs/reasonix.js.map +1 -1
  25. package/dist/env.js +1 -1
  26. package/dist/executables.js +1 -1
  27. package/dist/invocation.js +1 -1
  28. package/dist/json-event-stream.d.ts.map +1 -1
  29. package/dist/json-event-stream.js +63 -0
  30. package/dist/json-event-stream.js.map +1 -1
  31. package/dist/launch.js +1 -1
  32. package/dist/mcp.d.ts +1 -1
  33. package/dist/metadata.d.ts +1 -1
  34. package/dist/mmd-routes.js +1 -1
  35. package/dist/models.d.ts +1 -1
  36. package/dist/opencode-log.js +1 -1
  37. package/dist/paths.js +1 -1
  38. package/dist/prompt-augmenter.d.ts +1 -1
  39. package/dist/prompt-augmenter.js +1 -1
  40. package/dist/prompt-budget.d.ts +1 -1
  41. package/dist/prompt-file.js +1 -1
  42. package/dist/providers/anthropic-messages.d.ts +1 -1
  43. package/dist/providers/anthropic-messages.js +1 -1
  44. package/dist/qoder-stream.d.ts +1 -1
  45. package/dist/qoder-stream.js +1 -1
  46. package/dist/registry.d.ts +16 -0
  47. package/dist/registry.d.ts.map +1 -1
  48. package/dist/registry.js +19 -1
  49. package/dist/registry.js.map +1 -1
  50. package/dist/resolution.js +1 -1
  51. package/dist/terminal-launch.js +1 -1
  52. package/dist/types.d.ts +13 -3
  53. package/dist/types.d.ts.map +1 -1
  54. package/package.json +3 -3
package/dist/auth.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * agent CLI is authenticated, and text-based classification of a CLI's raw
6
6
  * error output into auth/rate-limit/upstream failure classes.
7
7
  *
8
- * Ported from OD's `apps/daemon/src/runtimes/auth/auth.ts` with one
8
+ * Ported from OD's `apps/daemon/src/runtimes/auth.ts` with one
9
9
  * de-branding change: the five guidance-text functions
10
10
  * (`cursorAuthGuidance`, `deepseekAuthGuidance`, `antigravityAuthGuidance`,
11
11
  * `antigravityQuotaGuidance`, `reasonixAuthGuidance`, `claudeAuthGuidance`)
@@ -2,7 +2,7 @@
2
2
  * @module capabilities
3
3
  *
4
4
  * Per-agent `--help`-probed capability flags, cached by agent id. Ported
5
- * verbatim from OD's `apps/daemon/src/runtimes/core/capabilities.ts`.
5
+ * verbatim from OD's `apps/daemon/src/runtimes/capabilities.ts`.
6
6
  */
7
7
  import type { RuntimeCapabilityMap } from './types.js';
8
8
  export declare const agentCapabilities: Map<string, RuntimeCapabilityMap>;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @module claude-stream
3
3
  *
4
- * Ported verbatim from OD's `apps/daemon/src/runtimes/stream/claude-stream.ts`
4
+ * Ported verbatim from OD's `apps/daemon/src/runtimes/claude-stream.ts`
5
5
  * (only the `role-marker-guard` import path changed — it now resolves
6
6
  * within this package instead of two directories up). See `source-map.md`.
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @module claude-stream
3
3
  *
4
- * Ported verbatim from OD's `apps/daemon/src/runtimes/stream/claude-stream.ts`
4
+ * Ported verbatim from OD's `apps/daemon/src/runtimes/claude-stream.ts`
5
5
  * (only the `role-marker-guard` import path changed — it now resolves
6
6
  * within this package instead of two directories up). See `source-map.md`.
7
7
  *
@@ -1,15 +1,3 @@
1
- import type { RuntimeLock } from '../types.js';
2
- export declare function writeAntigravityModelSelection(label: string, settingsPath?: string): void;
3
- export declare function acquireAntigravityModelLock(): Promise<() => void>;
4
- export declare function _resetAntigravityModelLockForTests(): void;
5
- export interface WaitForAgyModelOptions {
6
- timeoutMs?: number;
7
- pollIntervalMs?: number;
8
- readFile?: (path: string) => Promise<string>;
9
- now?: () => number;
10
- abortSignal?: AbortSignal;
11
- }
12
- export declare function waitForAgyToReadModel(logFilePath: string, expectedModel: string, options?: WaitForAgyModelOptions): Promise<boolean>;
13
1
  /**
14
2
  * Redacts any OAuth sign-in URL from agy's buffered print-mode stdout,
15
3
  * leaving all other output byte-identical.
@@ -27,21 +15,6 @@ export declare function waitForAgyToReadModel(logFilePath: string, expectedModel
27
15
  * @overallScore 100/100
28
16
  */
29
17
  export declare function redactAntigravityAuthUrls(fullText: string): string;
30
- /**
31
- * Adapts the module-level `acquireAntigravityModelLock` /
32
- * `waitForAgyToReadModel` pair to the caller-facing {@link RuntimeLock}
33
- * contract. A thin adapter, deliberately: the mutex and the log-polling
34
- * handoff detector are the existing, separately-tested functions above, and
35
- * this adds no serialization logic of its own.
36
- *
37
- * The one policy decision it does make — skipping the lock entirely when no
38
- * concrete model was selected — mirrors `buildArgs`'s own
39
- * `options.model && options.model !== DEFAULT_MODEL_OPTION.id` guard exactly.
40
- * The lock guards the `settings.json` write, so when that write will not
41
- * happen there is nothing to serialize, and holding the chain anyway would
42
- * make a `'default'`-model run queue behind an unrelated one for no benefit.
43
- */
44
- export declare const antigravityModelLock: RuntimeLock;
45
18
  export declare const antigravityAgentDef: {
46
19
  id: string;
47
20
  name: string;
@@ -57,8 +30,8 @@ export declare const antigravityAgentDef: {
57
30
  buffering: "until-close";
58
31
  sanitize: typeof redactAntigravityAuthUrls;
59
32
  };
60
- runtimeLock: RuntimeLock;
61
33
  installUrl: string;
62
34
  docsUrl: string;
35
+ externalMcpInjection: "env-passthrough";
63
36
  };
64
37
  //# sourceMappingURL=antigravity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../src/defs/antigravity.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAmB,WAAW,EAAmB,MAAM,aAAa,CAAC;AAoCjF,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,MAAM,EACb,YAAY,GAAE,MAAkC,GAC/C,IAAI,CAgBN;AAeD,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC,CAevE;AAKD,wBAAgB,kCAAkC,IAAI,IAAI,CAEzD;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAE7C,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IASnB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAgBD,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,OAAO,CAAC,CAwClB;AAuCD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAElE;AAeD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,EAAE,WAgClC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;CAgJL,CAAC"}
1
+ {"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../src/defs/antigravity.ts"],"names":[],"mappings":"AAqEA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;CAoKL,CAAC"}
@@ -1,146 +1,32 @@
1
1
  /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/antigravity.ts` (import path adjusted only). See `source-map.md`. */
2
- import { existsSync, mkdirSync, readFileSync, writeFileSync, } from 'node:fs';
3
- import { readFile as fsReadFile } from 'node:fs/promises';
4
- import { homedir } from 'node:os';
5
- import { dirname, join } from 'node:path';
6
2
  import { DEFAULT_MODEL_OPTION } from './shared.js';
7
- // `agy` v1.0.3 still has no `--model` flag (upstream issue #35), but the
8
- // TUI's Switch-Model picker writes the choice to its settings.json, and
9
- // every `agy -p` invocation re-reads that file on startup verified by
10
- // capturing the `--log-file` line `Propagating selected model override to
11
- // backend: label="<model>"`. So we can route OD's model picker through
12
- // settings.json: when the user picks a concrete model in Settings, the
13
- // daemon writes the label into agy's settings.json right before spawn,
14
- // and the resulting print-mode run uses that model.
3
+ // `agy` v1.1.24 has a real `--model <id>` flag (`agy --help`: "Model for the current CLI
4
+ // session") plus a machine-readable `agy models` subcommand that lists every selectable model as
5
+ // a stable `<slug>\t<label>` pair both verified live, neither true of the v1.0.3 this file used
6
+ // to target (upstream issue #35, closed by the flag's addition). That retires the
7
+ // settings.json-write-then-poll-the-log workaround this file used to carry (see git history for
8
+ // `writeAntigravityModelSelection`/`antigravityModelLock`/`waitForAgyToReadModel`, and the
9
+ // process-global race across concurrent runs it existed to serialize): the model rides argv on
10
+ // `buildArgs` below instead, exactly like every other flag this def emits, and there is nothing
11
+ // left to lock.
15
12
  //
16
- // Two ids the picker exposes are special:
17
- // - 'default' : leave settings.json untouched, so agy keeps
18
- // whatever the user last picked in its own TUI.
19
- // (Respects user choice when they switch models
20
- // from `agy` directly.)
21
- // - any other id : the literal display label agy expects (e.g.
22
- // "Gemini 3.1 Pro (High)", "Claude Sonnet 4.6
23
- // (Thinking)"). We persist it before spawn.
13
+ // Two cases `buildArgs` treats specially:
14
+ // - `DEFAULT_MODEL_OPTION.id` ('default') or no model at all: omit `--model` entirely, so agy
15
+ // keeps whatever it would otherwise default to (its own TUI's last pick, or its own default).
16
+ // - any other id: one of the stable slugs below (e.g. `gemini-3.1-pro-high`), passed verbatim as
17
+ // `--model`'s value.
24
18
  //
25
- // `supportsCustomModel: false` because the label set is a server-side
26
- // enum a typed id agy doesn't recognise resolves to a silent
27
- // `availableModels` cache miss + empty print-mode output, which surfaces
28
- // to the user as a generic "empty response" error.
19
+ // `supportsCustomModel: false` because the model set is still a server-side enum, not free text —
20
+ // but the failure mode for an id outside it changed for the better: `agy --model <bogus> -p ...`
21
+ // now prints a loud `Error: invalid model selection ...` plus the full list of valid models
22
+ // (verified live), rather than the old settings.json path's silent `availableModels` cache miss +
23
+ // empty print-mode output. Kept `false` anyway: nothing here validates a typed id before spawn, so
24
+ // letting a UI send arbitrary text would just move that same failure into production instead of
25
+ // preventing it — `isKnownModel` (`../models.ts`) is what actually gates a caller-supplied id
26
+ // against this list before it ever reaches `buildArgs`.
29
27
  //
30
- // The 8 model labels mirror what `Switch Model` in agy's TUI lists for
31
- // consumer-tier accounts as of 2026-05-28. The set is small and stable
32
- // enough to ship statically until upstream adds a programmatic
33
- // `agy models` subcommand (also tracked under issue #35).
34
- const ANTIGRAVITY_SETTINGS_PATH = join(homedir(), '.gemini', 'antigravity-cli', 'settings.json');
35
- export function writeAntigravityModelSelection(label, settingsPath = ANTIGRAVITY_SETTINGS_PATH) {
36
- let existing = {};
37
- if (existsSync(settingsPath)) {
38
- try {
39
- const parsed = JSON.parse(readFileSync(settingsPath, 'utf8'));
40
- if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
41
- existing = parsed;
42
- }
43
- }
44
- catch {
45
- // Corrupt JSON — fall through and rewrite the file from scratch so
46
- // the next spawn starts from a known-good state.
47
- }
48
- }
49
- existing.model = label;
50
- mkdirSync(dirname(settingsPath), { recursive: true });
51
- writeFileSync(settingsPath, `${JSON.stringify(existing, null, 2)}\n`);
52
- }
53
- // Per-process serialization for write-settings → spawn → agy-reads
54
- // cycles on antigravity. `~/.gemini/antigravity-cli/settings.json` is
55
- // process-global, so two OD runs that both pick concrete (non-default)
56
- // models can race: run A writes model A, spawn A starts, run B writes
57
- // model B before A's agy has read settings.json — A then executes on
58
- // model B. The daemon serialises non-default antigravity spawns
59
- // through this chain: each acquire awaits the previous release, and
60
- // each release fires only after the spawned agy actually emits
61
- // `Propagating selected model override to backend: label="<X>"` in
62
- // its `--log-file` (which is the upstream signal that settings.json
63
- // has been read).
64
- let antigravityLockChain = Promise.resolve();
65
- export async function acquireAntigravityModelLock() {
66
- const previous = antigravityLockChain;
67
- // Definite-assignment assertion (`!`), not a `() => {}` fallback default:
68
- // the ECMAScript spec guarantees a `Promise` executor runs synchronously,
69
- // immediately, during construction — `release = resolve` below has
70
- // already run by the time `new Promise(...)` returns, so a fallback
71
- // no-op default would be assigned, coverage-instrumented, and never once
72
- // invoked. Removing it drops that dead function instead of padding a
73
- // test around code that cannot execute.
74
- let release;
75
- antigravityLockChain = new Promise((resolve) => {
76
- release = resolve;
77
- });
78
- await previous;
79
- return release;
80
- }
81
- // Visible for tests. Resets the module-level lock chain so a test that
82
- // installed a hanging acquirer can release it without leaking state to
83
- // subsequent test cases. Production code never calls this.
84
- export function _resetAntigravityModelLockForTests() {
85
- antigravityLockChain = Promise.resolve();
86
- }
87
- // Polls agy's `--log-file` for the line
88
- // `Propagating selected model override to backend: label="<expectedModel>"`
89
- // which `model_config_manager.go` emits once agy has finished reading
90
- // `~/.gemini/antigravity-cli/settings.json` and sent the model
91
- // override to the upstream backend. Returns true on observed signal,
92
- // false on timeout OR abort. Never throws — a missing log file is
93
- // treated as "not yet seen" so the polling loop keeps retrying until
94
- // either the deadline or the abort signal fires.
95
- //
96
- // IMPORTANT: callers MUST NOT use a `false` return as a "go ahead and
97
- // release the settings.json lock" signal — false means "I gave up
98
- // polling," not "agy definitely didn't read this." Release the lock
99
- // only on (a) a `true` return, OR (b) child exit. See server.ts for
100
- // the wiring.
101
- export async function waitForAgyToReadModel(logFilePath, expectedModel, options = {}) {
102
- const timeoutMs = options.timeoutMs ?? 15_000;
103
- const pollIntervalMs = options.pollIntervalMs ?? 250;
104
- const readFile = options.readFile ?? ((path) => fsReadFile(path, 'utf8'));
105
- const now = options.now ?? Date.now;
106
- const abortSignal = options.abortSignal;
107
- if (abortSignal?.aborted)
108
- return false;
109
- const escaped = expectedModel.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
110
- const pattern = new RegExp(`Propagating selected model override to backend: label="${escaped}"`);
111
- const deadline = now() + timeoutMs;
112
- while (now() < deadline) {
113
- if (abortSignal?.aborted)
114
- return false;
115
- try {
116
- const content = await readFile(logFilePath);
117
- if (pattern.test(content))
118
- return true;
119
- }
120
- catch {
121
- // Log file may not have appeared yet; keep polling.
122
- }
123
- if (now() >= deadline)
124
- break;
125
- await new Promise((resolve) => {
126
- const onAbort = () => {
127
- clearTimeout(timer);
128
- resolve();
129
- };
130
- // `{ once: true }` only detaches the listener on the abort path. When the
131
- // timer wins instead — the common case, once per poll — the listener would
132
- // stay attached to a signal that outlives this iteration, so a default
133
- // 15s/250ms run accumulates ~60 of them on the same AbortSignal before the
134
- // process exits. Detach explicitly on the timer path too.
135
- const timer = setTimeout(() => {
136
- abortSignal?.removeEventListener('abort', onAbort);
137
- resolve();
138
- }, pollIntervalMs);
139
- abortSignal?.addEventListener('abort', onAbort, { once: true });
140
- });
141
- }
142
- return false;
143
- }
28
+ // The 14 slugs/labels below are `agy models`' full live output as of agy v1.1.24 (2026-09-02), not
29
+ // a hand-maintained guess re-run `agy models` to refresh if upstream's catalog changes.
144
30
  // `agy -p` prints an interactive OAuth sign-in URL to **stdout** and then
145
31
  // exits **0** when the keyring entry is missing or expired, so a driver that
146
32
  // streams stdout live shows that URL to the user as if it were the model's
@@ -192,67 +78,6 @@ const OAUTH_URL_PLACEHOLDER = '[redacted sign-in URL]';
192
78
  export function redactAntigravityAuthUrls(fullText) {
193
79
  return fullText.replace(OAUTH_URL_PATTERN, OAUTH_URL_PLACEHOLDER);
194
80
  }
195
- /**
196
- * Resolves when `signal` aborts (immediately if it already has). Used instead
197
- * of a never-settling `new Promise(() => {})` so a long-lived caller does not
198
- * accumulate one permanently-pending promise, plus its captured closure, per
199
- * run.
200
- */
201
- function waitUntilAborted(signal) {
202
- if (signal.aborted)
203
- return Promise.resolve();
204
- return new Promise((resolve) => {
205
- signal.addEventListener('abort', () => resolve(), { once: true });
206
- });
207
- }
208
- /**
209
- * Adapts the module-level `acquireAntigravityModelLock` /
210
- * `waitForAgyToReadModel` pair to the caller-facing {@link RuntimeLock}
211
- * contract. A thin adapter, deliberately: the mutex and the log-polling
212
- * handoff detector are the existing, separately-tested functions above, and
213
- * this adds no serialization logic of its own.
214
- *
215
- * The one policy decision it does make — skipping the lock entirely when no
216
- * concrete model was selected — mirrors `buildArgs`'s own
217
- * `options.model && options.model !== DEFAULT_MODEL_OPTION.id` guard exactly.
218
- * The lock guards the `settings.json` write, so when that write will not
219
- * happen there is nothing to serialize, and holding the chain anyway would
220
- * make a `'default'`-model run queue behind an unrelated one for no benefit.
221
- */
222
- export const antigravityModelLock = {
223
- acquire: async ({ model }) => {
224
- if (!model || model === DEFAULT_MODEL_OPTION.id) {
225
- // No settings.json write this spawn — hand back an inert hold rather
226
- // than joining the chain. `release` must still exist and still be
227
- // idempotent: the caller calls it on both handoff and process exit
228
- // without knowing which kind of hold it got.
229
- return { release: () => { } };
230
- }
231
- const release = await acquireAntigravityModelLock();
232
- return {
233
- release,
234
- waitForHandoff: async ({ logFilePath, processExited }) => {
235
- if (logFilePath !== undefined) {
236
- const observed = await waitForAgyToReadModel(logFilePath, model, {
237
- abortSignal: processExited,
238
- });
239
- if (observed)
240
- return;
241
- }
242
- // Reached when either there is no `--log-file` to watch (no
243
- // observable propagation signal exists at all), or the watcher
244
- // stopped without seeing the line. Neither is evidence that agy
245
- // failed to read settings.json — `waitForAgyToReadModel`'s `false`
246
- // means "stopped polling" (see its own doc). Resolving here would
247
- // release the lock while a cold-starting agy may still be about to
248
- // read the file, reopening exactly the race this lock closes. So
249
- // hand the release decision back to process exit, the only event
250
- // that proves agy can no longer read it.
251
- await waitUntilAborted(processExited);
252
- },
253
- };
254
- },
255
- };
256
81
  export const antigravityAgentDef = {
257
82
  id: 'antigravity',
258
83
  name: 'Antigravity',
@@ -260,17 +85,20 @@ export const antigravityAgentDef = {
260
85
  versionArgs: ['--version'],
261
86
  fallbackModels: [
262
87
  DEFAULT_MODEL_OPTION,
263
- { id: 'Gemini 3.1 Pro (High)', label: 'Gemini 3.1 Pro (High)' },
264
- { id: 'Gemini 3.1 Pro (Low)', label: 'Gemini 3.1 Pro (Low)' },
265
- { id: 'Gemini 3.5 Flash (High)', label: 'Gemini 3.5 Flash (High)' },
266
- { id: 'Gemini 3.5 Flash (Medium)', label: 'Gemini 3.5 Flash (Medium)' },
267
- { id: 'Gemini 3.5 Flash (Low)', label: 'Gemini 3.5 Flash (Low)' },
268
- {
269
- id: 'Claude Sonnet 4.6 (Thinking)',
270
- label: 'Claude Sonnet 4.6 (Thinking)',
271
- },
272
- { id: 'Claude Opus 4.6 (Thinking)', label: 'Claude Opus 4.6 (Thinking)' },
273
- { id: 'GPT-OSS 120B (Medium)', label: 'GPT-OSS 120B (Medium)' },
88
+ { id: 'gemini-3.8-flash-high', label: 'Gemini 3.8 Flash (High)' },
89
+ { id: 'gemini-3.8-flash-medium', label: 'Gemini 3.8 Flash (Medium)' },
90
+ { id: 'gemini-3.8-flash-low', label: 'Gemini 3.8 Flash (Low)' },
91
+ { id: 'gemini-3.7-flash-high', label: 'Gemini 3.7 Flash (High)' },
92
+ { id: 'gemini-3.7-flash-medium', label: 'Gemini 3.7 Flash (Medium)' },
93
+ { id: 'gemini-3.7-flash-low', label: 'Gemini 3.7 Flash (Low)' },
94
+ { id: 'gemini-3.6-flash-high', label: 'Gemini 3.6 Flash (High)' },
95
+ { id: 'gemini-3.6-flash-medium', label: 'Gemini 3.6 Flash (Medium)' },
96
+ { id: 'gemini-3.6-flash-low', label: 'Gemini 3.6 Flash (Low)' },
97
+ { id: 'gemini-3.1-pro-high', label: 'Gemini 3.1 Pro (High)' },
98
+ { id: 'gemini-3.1-pro-low', label: 'Gemini 3.1 Pro (Low)' },
99
+ { id: 'claude-sonnet-4-6', label: 'Claude Sonnet 4.6 (Thinking)' },
100
+ { id: 'claude-opus-4-6-thinking', label: 'Claude Opus 4.6 (Thinking)' },
101
+ { id: 'gpt-oss-120b-medium', label: 'GPT-OSS 120B (Medium)' },
274
102
  ],
275
103
  supportsCustomModel: false,
276
104
  // We deliberately do NOT opt into `resumesSessionViaCli` / agy's `-c`
@@ -290,9 +118,6 @@ export const antigravityAgentDef = {
290
118
  // composed in server.ts gives a second line of defense for weak
291
119
  // plain-stream models like Gemini 3.5 Flash.
292
120
  buildArgs: (prompt, _imagePaths, _extra = [], options = {}, runtimeContext = {}) => {
293
- if (options.model && options.model !== DEFAULT_MODEL_OPTION.id) {
294
- writeAntigravityModelSelection(options.model, runtimeContext.antigravitySettingsPath);
295
- }
296
121
  // `-p` is a Go `flag`-package flag that TAKES THE PROMPT AS ITS VALUE,
297
122
  // not a boolean switch followed by a positional prompt, and agy has no
298
123
  // stdin sentinel under the default `--input-format text`. Verified
@@ -306,18 +131,23 @@ export const antigravityAgentDef = {
306
131
  // So the prompt rides argv as `-p`'s value. That is also why this def is
307
132
  // argv-budgeted (`maxPromptArgBytes` below) rather than `promptViaStdin`.
308
133
  const args = [];
134
+ // `--model` is the same kind of Go flag as `--log-file`/`-p`: its value is
135
+ // whatever argv token immediately follows it, so it too must be pushed
136
+ // before `-p` (always last — see below). Verified live against agy
137
+ // v1.1.24: `agy --model <slug> -p '<prompt>'` runs that one print-mode
138
+ // turn on the named model, and combining it with `--log-file` works the
139
+ // same way — relative order between `--model` and `--log-file` doesn't
140
+ // matter (each independently consumes exactly the one token after it),
141
+ // only that both precede `-p`.
142
+ if (options.model && options.model !== DEFAULT_MODEL_OPTION.id) {
143
+ args.push('--model', options.model);
144
+ }
309
145
  // Always opt into `--log-file` when the daemon supplied a path so
310
146
  // it can post-exit grep for the actual upstream failure shape
311
147
  // (auth missing vs quota reached vs upstream error) — without it
312
148
  // the chat surfaces a generic "empty response" because print mode
313
149
  // never echoes those errors on stdout. See server.ts empty-output
314
150
  // guard for the consumer.
315
- //
316
- // Flag order is load-bearing: `--log-file` must precede `-p`, since
317
- // everything after `-p` is consumed as its value. `agy --log-file /tmp/x
318
- // -p '<prompt>'` captures the diagnostic log, including `Propagating
319
- // selected model override to backend: label="<model>"` and auth/quota
320
- // failures.
321
151
  if (runtimeContext.agentLogFilePath) {
322
152
  args.push('--log-file', runtimeContext.agentLogFilePath);
323
153
  }
@@ -331,13 +161,10 @@ export const antigravityAgentDef = {
331
161
  maxPromptArgBytes: 30_000,
332
162
  streamFormat: 'plain',
333
163
  // `buildArgs` above already consumes `runtimeContext.agentLogFilePath` when
334
- // the caller supplies one; this is what asks it to. Two distinct things
335
- // depend on the log file, which is why it is not merely a diagnostic nicety
336
- // for this adapter:
337
- // - `runtimeLock`'s handoff detector polls it for agy's own
338
- // "Propagating selected model override to backend" line;
339
- // - print mode never echoes auth/quota failures on stdout, so post-exit
340
- // log inspection is the only way to tell those two apart.
164
+ // the caller supplies one; this is what asks it to. Print mode never
165
+ // echoes auth/quota failures on stdout, so post-exit log inspection is the
166
+ // only way to tell those two apart — see server.ts's empty-output guard
167
+ // for the consumer.
341
168
  needsAgentLogFile: true,
342
169
  // The one adapter in this package that must not stream live — see
343
170
  // `redactAntigravityAuthUrls`'s comment for the OAuth-URL-on-stdout-plus-
@@ -346,13 +173,36 @@ export const antigravityAgentDef = {
346
173
  // and keeps streaming per chunk; aider's and deepseek's own comments call
347
174
  // that live cadence out as deliberate.
348
175
  stdoutPolicy: { buffering: 'until-close', sanitize: redactAntigravityAuthUrls },
349
- runtimeLock: antigravityModelLock,
350
176
  installUrl: 'https://antigravity.google/cli',
351
177
  docsUrl: 'https://antigravity.google/docs/cli-overview',
352
- // Deliberately left with no `externalMcpInjection` — investigated for a Codex-style relocation
353
- // strategy (see `codex.ts`'s `'codex-toml'`) and rejected for lack of a safe, run-scoped delivery
354
- // mechanism, not for lack of trying. Evidence, gathered live against the installed CLI (`agy`
355
- // v1.1.22), not from docs alone:
178
+ // `externalMcpInjection: 'env-passthrough'` — the prior verdict here ("no safe, run-scoped
179
+ // delivery mechanism exists") stood as long as the only candidates were a per-run config
180
+ // flag/relocatable home dir, neither of which `agy` has (see the probes below, still accurate).
181
+ // What flips the verdict is a THIRD property, verified live and not previously tested: `agy`
182
+ // passes its own parent process environment through to the stdio MCP server children it spawns
183
+ // for servers already sitting in its persistent global registry.
184
+ //
185
+ // - Proven with a probe MCP server registered under a relocated `HOME`'s
186
+ // `.gemini/config/mcp_config.json`: booted under `agy -p`, it read a marker variable
187
+ // (`TOVU_ENV_PASSTHROUGH_PROBE`) straight out of its own `process.env` — no config field, no
188
+ // argv, nothing but inherited environment. Full MCP handshake observed on the same run:
189
+ // `server/discover` → `initialize` → `notifications/initialized` → `tools/list`
190
+ // (protocolVersion `2025-11-25`, clientInfo `antigravity-client`).
191
+ // - That makes the registration itself a STATIC, one-time operation — the operator adds one
192
+ // `tovu` entry to their real `~/.gemini/config/mcp_config.json` (confirmed still the one real
193
+ // mechanism; see the probes below) with a bare, env-free `command` pointing at this package's
194
+ // own `jini-mcp` bin, resolving its credential from the environment at spawn time instead of
195
+ // a baked-in value. No per-spawn config mutation, no lock, no restore discipline — the exact
196
+ // "safe, run-scoped delivery" gap the old verdict cited is closed by inheritance, not by
197
+ // relocation.
198
+ // - So this def's job shrinks to exactly what `'env-passthrough'` describes in `types.ts`: put
199
+ // the bridge entry's `JINI_RUN_ID`/`JINI_DAEMON_URL`/`JINI_DAEMON_TOKEN` onto `agy`'s OWN
200
+ // spawn env (done centrally by `@jini-ai/daemon`'s `computeChildEnv`, not by this def's
201
+ // `buildArgs`), and `agy` carries them the rest of the way to the already-registered server on
202
+ // its own.
203
+ //
204
+ // The prior probes into a per-run/relocatable mechanism remain accurate and are kept as the
205
+ // record of what does NOT work, so a future reader does not re-walk the same dead ends:
356
206
  //
357
207
  // - No per-run config-path flag. `agy --help` and `agy mcp add --help` were read in full: `mcp
358
208
  // add/remove/list/enable/disable` only mutate the PERSISTENT global registry — there is no
@@ -361,7 +211,9 @@ export const antigravityAgentDef = {
361
211
  // every all-caps `*HOME*`/`*_DIR`/`*_PATH`/`XDG_*` token found nothing naming a relocatable
362
212
  // config/data root for Antigravity or Gemini specifically — only the generic `HOME` (relocating
363
213
  // that would redirect the ENTIRE user profile for the child, not a scoped config dir, and is not
364
- // an "explicit, run-scoped delivery" by any reasonable reading).
214
+ // an "explicit, run-scoped delivery" by any reasonable reading). Also why the passthrough probe
215
+ // above used a relocated `HOME` only to prove inheritance in isolation — production spawns
216
+ // always use the operator's real `HOME`, since relocating it breaks `agy`'s own auth.
365
217
  // - The workspace-relative `.agents/mcp_config.json` this comment used to cite as unverified is
366
218
  // now verified NOT to be what it looked like: a project dir was seeded with a real
367
219
  // `.agents/mcp_config.json` entry, then `agy mcp list` (run from that cwd) showed only the
@@ -372,21 +224,17 @@ export const antigravityAgentDef = {
372
224
  // distinct project. Best read: `.agents/mcp_config.json` belongs to the Antigravity IDE
373
225
  // extension's own project layer, a different consumer than the bare `agy` CLI binary this
374
226
  // daemon actually spawns — not a mechanism reachable from a plain `agy -p` invocation at all.
375
- // - The one mechanism that IS real `~/.gemini/config/mcp_config.json` (global, JSON,
376
- // `{"mcpServers":{"<name>":{"command":...}}}`, confirmed by reading the operator's own file
377
- // read-only after backing it up) — has no relocation path, so using it means mutating the
378
- // operator's real shared config on every spawn. That is the exact class of side effect
379
- // `codex.ts`'s doc rejected the `-c`-override approach for, made concretely worse here: this
380
- // def already fights a real cross-run race on `settings.json` for model selection
381
- // (`antigravityModelLock` above), and a second shared-file race for MCP config would need its
382
- // own serialization/merge/restore discipline with its own live verification — not a strategy
383
- // bolted onto this one on a guess. Also relevant: this same `agy -p` run, on the SAME machine,
384
- // left `~/.gemini/trustedFolders.json` and `~/.gemini/projects.json` byte-identical
385
- // before/after (unlike Codex's `config.toml`, which does grow a project-tracking entry per
386
- // run) — headless print mode does not even register the folder as a project, reinforcing that
387
- // nothing here is scoped per-invocation the way `CODEX_HOME` is.
227
+ // Confirmed independently upstream: antigravity-cli issue #60 (open, no maintainer response)
228
+ // reports the identical "project-local mcp_config.json is read but ignored" symptom.
229
+ // - `~/.gemini/config/mcp_config.json` (global, JSON, `{"mcpServers":{"<name>":{"command":...}}}`,
230
+ // confirmed by reading the operator's own file read-only after backing it up) has no relocation
231
+ // path but per the passthrough finding above, this def never needs to write to it at all
232
+ // outside the one-time operator registration, so the shared-file race a prior version of this
233
+ // comment warned about (a second race alongside the now-deleted settings.json model lock) never
234
+ // materializes: nothing here mutates that file per run.
388
235
  //
389
236
  // No hang was observed on any of these probes (all completed in well under `--print-timeout`'s
390
- // default 5m), so the blocker is "no safe delivery mechanism exists", not "the mechanism hangs".
237
+ // default 5m).
238
+ externalMcpInjection: 'env-passthrough',
391
239
  };
392
240
  //# sourceMappingURL=antigravity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/defs/antigravity.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,o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AAkG;IAClG,yFAAyF;IACzF,gGAAgG;IAChG,8FAA8F;IAC9F,2FAA2F;IAC3F,iGAAiG;IACjG,sFAAsF;IACtF,kGAAkG;IAClG,iGAAiG;IACjG,mGAAmG;IACnG,wFAAwF;IACxF,+FAA+F;IAC/F,kGAAkG;IAClG,qEAAqE;IACrE,EAAE;IACF,+FAA+F;IAC/F,iGAAiG;CACxE,CAAC"}
1
+ {"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/defs/antigravity.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD,yFAAyF;AACzF,iGAAiG;AACjG,kGAAkG;AAClG,kFAAkF;AAClF,gGAAgG;AAChG,2FAA2F;AAC3F,+FAA+F;AAC/F,gGAAgG;AAChG,gBAAgB;AAChB,EAAE;AACF,0CAA0C;AAC1C,gGAAgG;AAChG,kGAAkG;AAClG,mGAAmG;AACnG,yBAAyB;AACzB,EAAE;AACF,kGAAkG;AAClG,iGAAiG;AACjG,4FAA4F;AAC5F,kGAAkG;AAClG,mGAAmG;AACnG,gGAAgG;AAChG,8FAA8F;AAC9F,wDAAwD;AACxD,EAAE;AACF,mGAAmG;AACnG,0FAA0F;AAE1F,0EAA0E;AAC1E,6EAA6E;AAC7E,2EAA2E;AAC3E,sDAAsD;AACtD,8EAA8E;AAC9E,6EAA6E;AAC7E,uBAAuB;AACvB,6EAA6E;AAC7E,qDAAqD;AACrD,uEAAuE;AACvE,uEAAuE;AACvE,EAAE;AACF,0EAA0E;AAC1E,4EAA4E;AAC5E,mBAAmB;AACnB,6DAA6D;AAC7D,4FAA4F;AAC5F,MAAM,iBAAiB,GAAG,IAAI,MAAM,CAClC;IACE,wEAAwE;IACxE,sEAAsE;IACtE,sEAAsE;IACtE,MAAM,CAAC,GAAG,CAAA,oCAAoC;IAC9C,iEAAiE;IACjE,wEAAwE;IACxE,0EAA0E;IAC1E,mEAAmE;IACnE,0EAA0E;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,oGAAoG;IACpG,gGAAgG;IAChG,4FAA4F;IAC5F,8FAA8F;IAC9F,kGAAkG;IAClG,iGAAiG;IACjG,yFAAyF;IACzF,qGAAqG;IACrG,oGAAoG;IACpG,+FAA+F;IAC/F,kGAAkG;IAClG,oGAAoG;IACpG,4DAA4D;IAC5D,EAAE;IACF,+FAA+F;IAC/F,eAAe;IACf,oBAAoB,EAAE,iBAAiB;CACd,CAAC"}
@@ -26,6 +26,11 @@ export declare const claudeAgentDef: {
26
26
  promptInputFormat: "stream-json";
27
27
  streamFormat: string;
28
28
  externalMcpInjection: "claude-mcp-json";
29
+ systemPromptDelivery: {
30
+ strategy: "append-flag";
31
+ flag: string;
32
+ capabilityKey: string;
33
+ };
29
34
  resumesSessionViaCli: true;
30
35
  imageDelivery: "prompt-path";
31
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/defs/claude.ts"],"names":[],"mappings":"AA6DA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuIA,CAAC"}
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/defs/claude.ts"],"names":[],"mappings":"AA6DA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwIA,CAAC"}
@@ -139,15 +139,13 @@ export const claudeAgentDef = {
139
139
  if (dirs.length > 0 && caps.addDir !== false) {
140
140
  args.push('--add-dir', ...dirs);
141
141
  }
142
- // Appended, never replaces the CLI's own default system prompt — see
143
- // `RuntimeBuildOptions.systemPromptOverlay`'s doc. Same probe-gate reasoning as
144
- // `--include-partial-messages`/`--effort` above: an older build rejects an unknown option
145
- // with exit 1, which kills the chat rather than degrading it.
146
- if (caps.appendSystemPrompt !== false
147
- && typeof options.systemPromptOverlay === 'string'
148
- && options.systemPromptOverlay.length > 0) {
149
- args.push('--append-system-prompt', options.systemPromptOverlay);
150
- }
142
+ // `--append-system-prompt` delivery now lives outside this function — see
143
+ // `systemPromptDelivery` below and `@jini-ai/daemon`'s `resolveSystemPromptOverlayDelivery`
144
+ // (the single dispatch point for every def, not just this one). The probe-gate reasoning
145
+ // (an older build rejects an unknown option with exit 1, which kills the chat rather than
146
+ // degrading it) is preserved there via `capabilityKey: 'appendSystemPrompt'`, read from the
147
+ // same `capabilityFlags` probe above — moving the *call site* changed nothing about the gate
148
+ // itself.
151
149
  // Continue Claude's own CLI session across turns so it keeps its
152
150
  // working memory (files read, edits made, tool history) instead of
153
151
  // re-deriving everything from the rendered transcript each turn.
@@ -179,6 +177,11 @@ export const claudeAgentDef = {
179
177
  // so the daemon writes the user's external MCP servers there before
180
178
  // launching (server.ts handles the cwd guard).
181
179
  externalMcpInjection: 'claude-mcp-json',
180
+ // Formerly inline in `buildArgs` above (see the comment there) — moved to the declarative
181
+ // shape every def now uses to receive `RuntimeBuildOptions.systemPromptOverlay`. Same flag,
182
+ // same probe gate (`capabilityFlags['--append-system-prompt']` above), same "append, never
183
+ // replace" behavior as before this moved.
184
+ systemPromptDelivery: { strategy: 'append-flag', flag: '--append-system-prompt', capabilityKey: 'appendSystemPrompt' },
182
185
  resumesSessionViaCli: true,
183
186
  // See this file's module doc's "Image delivery" section — the CLI reads
184
187
  // a local file once its path is named in the prompt, so the daemon