@jini-ai/agent-runtime 0.3.0 → 0.3.2
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/dist/auth.js +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/claude-stream.d.ts +1 -1
- package/dist/claude-stream.js +1 -1
- package/dist/defs/aider.d.ts.map +1 -1
- package/dist/defs/aider.js +0 -7
- package/dist/defs/aider.js.map +1 -1
- package/dist/defs/amp.d.ts.map +1 -1
- package/dist/defs/amp.js +0 -9
- package/dist/defs/amp.js.map +1 -1
- package/dist/defs/amr.d.ts +0 -1
- package/dist/defs/amr.d.ts.map +1 -1
- package/dist/defs/amr.js +0 -7
- package/dist/defs/amr.js.map +1 -1
- package/dist/defs/antigravity.d.ts +29 -26
- package/dist/defs/antigravity.d.ts.map +1 -1
- package/dist/defs/antigravity.js +158 -243
- package/dist/defs/antigravity.js.map +1 -1
- package/dist/defs/claude.d.ts +5 -0
- package/dist/defs/claude.d.ts.map +1 -1
- package/dist/defs/claude.js +12 -9
- package/dist/defs/claude.js.map +1 -1
- package/dist/defs/codex.d.ts +2 -1
- package/dist/defs/codex.d.ts.map +1 -1
- package/dist/defs/codex.js +23 -1
- package/dist/defs/codex.js.map +1 -1
- package/dist/defs/copilot.d.ts.map +1 -1
- package/dist/defs/copilot.js +0 -11
- package/dist/defs/copilot.js.map +1 -1
- package/dist/defs/cursor-agent.d.ts.map +1 -1
- package/dist/defs/cursor-agent.js +0 -11
- package/dist/defs/cursor-agent.js.map +1 -1
- package/dist/defs/deepseek.d.ts.map +1 -1
- package/dist/defs/deepseek.js +0 -12
- package/dist/defs/deepseek.js.map +1 -1
- package/dist/defs/grok-build.d.ts.map +1 -1
- package/dist/defs/grok-build.js +0 -10
- package/dist/defs/grok-build.js.map +1 -1
- package/dist/defs/opencode.d.ts +4 -0
- package/dist/defs/opencode.d.ts.map +1 -1
- package/dist/defs/opencode.js +19 -0
- package/dist/defs/opencode.js.map +1 -1
- package/dist/defs/pi.d.ts +4 -0
- package/dist/defs/pi.d.ts.map +1 -1
- package/dist/defs/pi.js +10 -3
- package/dist/defs/pi.js.map +1 -1
- package/dist/defs/qoder.d.ts.map +1 -1
- package/dist/defs/qoder.js +0 -11
- package/dist/defs/qoder.js.map +1 -1
- package/dist/defs/qwen.d.ts.map +1 -1
- package/dist/defs/qwen.js +0 -9
- package/dist/defs/qwen.js.map +1 -1
- package/dist/defs/reasonix.d.ts +4 -0
- package/dist/defs/reasonix.d.ts.map +1 -1
- package/dist/defs/reasonix.js +16 -6
- package/dist/defs/reasonix.js.map +1 -1
- package/dist/env.js +1 -1
- package/dist/executables.js +1 -1
- package/dist/invocation.js +1 -1
- package/dist/json-event-stream.d.ts.map +1 -1
- package/dist/json-event-stream.js +63 -0
- package/dist/json-event-stream.js.map +1 -1
- package/dist/launch.js +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/metadata.d.ts +1 -1
- package/dist/mmd-routes.js +1 -1
- package/dist/models.d.ts +1 -1
- package/dist/opencode-log.js +1 -1
- package/dist/paths.js +1 -1
- package/dist/prompt-augmenter.d.ts +1 -1
- package/dist/prompt-augmenter.js +1 -1
- package/dist/prompt-budget.d.ts +1 -1
- package/dist/prompt-file.js +1 -1
- package/dist/providers/anthropic-messages.d.ts +1 -1
- package/dist/providers/anthropic-messages.js +1 -1
- package/dist/qoder-stream.d.ts +1 -1
- package/dist/qoder-stream.js +1 -1
- package/dist/registry.d.ts +16 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +19 -1
- package/dist/registry.js.map +1 -1
- package/dist/resolution.js +1 -1
- package/dist/terminal-launch.js +1 -1
- package/dist/types.d.ts +57 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/defs/antigravity.js
CHANGED
|
@@ -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.
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
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
|
|
17
|
-
// - 'default'
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
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
|
|
26
|
-
//
|
|
27
|
-
// `
|
|
28
|
-
//
|
|
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
|
|
31
|
-
//
|
|
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
|
|
@@ -193,86 +79,95 @@ export function redactAntigravityAuthUrls(fullText) {
|
|
|
193
79
|
return fullText.replace(OAUTH_URL_PATTERN, OAUTH_URL_PLACEHOLDER);
|
|
194
80
|
}
|
|
195
81
|
/**
|
|
196
|
-
*
|
|
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.
|
|
82
|
+
* Parses `agy models`' stdout into the shared `RuntimeModelOption[]` shape.
|
|
214
83
|
*
|
|
215
|
-
* The
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
84
|
+
* The CLI's real output (agy v1.1.24, verified live — see this file's header
|
|
85
|
+
* comment for the exact captured transcript) is one `Fetching available
|
|
86
|
+
* models...` progress line followed by one `<slug>\t<label>` pair per line.
|
|
87
|
+
* Each data line is split on the FIRST tab only, so a label that itself
|
|
88
|
+
* contains a tab or extra whitespace never bleeds into the id.
|
|
89
|
+
*
|
|
90
|
+
* @param stdout - Raw stdout from `agy models`.
|
|
91
|
+
* @returns The synthetic default option prepended to every parsed entry, or
|
|
92
|
+
* `null` when no real entry was found (empty stdout, or only the progress
|
|
93
|
+
* line survives filtering) — mirrors `parseCursorAgentModels`'s same-shape
|
|
94
|
+
* null contract, which `detection.ts#fetchModels` already treats the same
|
|
95
|
+
* as an empty array: fall back to `fallbackModels`.
|
|
96
|
+
* @complexity O(n) in the stdout length.
|
|
221
97
|
*/
|
|
222
|
-
export
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
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
|
-
};
|
|
98
|
+
export function parseAgyModels(stdout) {
|
|
99
|
+
const lines = String(stdout || '')
|
|
100
|
+
.split('\n')
|
|
101
|
+
.map((line) => line.trim())
|
|
102
|
+
.filter((line) => line.length > 0);
|
|
103
|
+
if (lines.length === 0)
|
|
104
|
+
return null;
|
|
105
|
+
const out = [DEFAULT_MODEL_OPTION];
|
|
106
|
+
const seen = new Set([DEFAULT_MODEL_OPTION.id]);
|
|
107
|
+
for (const line of lines) {
|
|
108
|
+
if (/^fetching available models\.\.\.$/i.test(line))
|
|
109
|
+
continue;
|
|
110
|
+
const tabIndex = line.indexOf('\t');
|
|
111
|
+
if (tabIndex === -1)
|
|
112
|
+
continue;
|
|
113
|
+
const id = line.slice(0, tabIndex).trim();
|
|
114
|
+
if (!id || seen.has(id))
|
|
115
|
+
continue;
|
|
116
|
+
seen.add(id);
|
|
117
|
+
const label = line.slice(tabIndex + 1).trim();
|
|
118
|
+
out.push({ id, label: label || id });
|
|
119
|
+
}
|
|
120
|
+
return out.length > 1 ? out : null;
|
|
121
|
+
}
|
|
256
122
|
export const antigravityAgentDef = {
|
|
257
123
|
id: 'antigravity',
|
|
258
124
|
name: 'Antigravity',
|
|
259
125
|
bin: 'agy',
|
|
260
126
|
versionArgs: ['--version'],
|
|
127
|
+
// `agy models` does a real network fetch (its own stdout says "Fetching
|
|
128
|
+
// available models..."), so this gets a longer budget than codex's 5s
|
|
129
|
+
// local-cache read — 10s to absorb ordinary network latency without
|
|
130
|
+
// making every detection pass wait needlessly long on a slow/offline run
|
|
131
|
+
// (`detection.ts#fetchModels` falls back to `fallbackModels` on timeout).
|
|
132
|
+
listModels: {
|
|
133
|
+
args: ['models'],
|
|
134
|
+
parse: parseAgyModels,
|
|
135
|
+
timeoutMs: 10_000,
|
|
136
|
+
},
|
|
261
137
|
fallbackModels: [
|
|
262
138
|
DEFAULT_MODEL_OPTION,
|
|
263
|
-
{ id: '
|
|
264
|
-
{ id: '
|
|
265
|
-
{ id: '
|
|
266
|
-
{ id: '
|
|
267
|
-
{ id: '
|
|
268
|
-
{
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
},
|
|
272
|
-
{ id: '
|
|
273
|
-
{ id: '
|
|
139
|
+
{ id: 'gemini-3.8-flash-high', label: 'Gemini 3.8 Flash (High)' },
|
|
140
|
+
{ id: 'gemini-3.8-flash-medium', label: 'Gemini 3.8 Flash (Medium)' },
|
|
141
|
+
{ id: 'gemini-3.8-flash-low', label: 'Gemini 3.8 Flash (Low)' },
|
|
142
|
+
{ id: 'gemini-3.7-flash-high', label: 'Gemini 3.7 Flash (High)' },
|
|
143
|
+
{ id: 'gemini-3.7-flash-medium', label: 'Gemini 3.7 Flash (Medium)' },
|
|
144
|
+
{ id: 'gemini-3.7-flash-low', label: 'Gemini 3.7 Flash (Low)' },
|
|
145
|
+
{ id: 'gemini-3.6-flash-high', label: 'Gemini 3.6 Flash (High)' },
|
|
146
|
+
{ id: 'gemini-3.6-flash-medium', label: 'Gemini 3.6 Flash (Medium)' },
|
|
147
|
+
{ id: 'gemini-3.6-flash-low', label: 'Gemini 3.6 Flash (Low)' },
|
|
148
|
+
{ id: 'gemini-3.1-pro-high', label: 'Gemini 3.1 Pro (High)' },
|
|
149
|
+
{ id: 'gemini-3.1-pro-low', label: 'Gemini 3.1 Pro (Low)' },
|
|
150
|
+
{ id: 'claude-sonnet-4-6', label: 'Claude Sonnet 4.6 (Thinking)' },
|
|
151
|
+
{ id: 'claude-opus-4-6-thinking', label: 'Claude Opus 4.6 (Thinking)' },
|
|
152
|
+
{ id: 'gpt-oss-120b-medium', label: 'GPT-OSS 120B (Medium)' },
|
|
274
153
|
],
|
|
275
154
|
supportsCustomModel: false,
|
|
155
|
+
// agy has no `--effort`-shaped flag: reasoning effort is a trailing `-high`/
|
|
156
|
+
// `-medium`/`-low` on the model slug `--model` already carries (see the
|
|
157
|
+
// `fallbackModels` list above, which is `agy models`' real output). So this
|
|
158
|
+
// def declares the suffix VOCABULARY only — see `types.ts`'s
|
|
159
|
+
// `RuntimeReasoningInModelId` for why the per-base-model availability is
|
|
160
|
+
// derived from the model list instead of enumerated here, and why
|
|
161
|
+
// `-thinking` on `claude-opus-4-6-thinking` must not be read as a level.
|
|
162
|
+
// `buildArgs` below is deliberately unchanged: the effort is already inside
|
|
163
|
+
// `--model`'s value, so there is no second argv to emit.
|
|
164
|
+
reasoningInModelId: {
|
|
165
|
+
levels: [
|
|
166
|
+
{ id: 'high', label: 'High' },
|
|
167
|
+
{ id: 'medium', label: 'Medium' },
|
|
168
|
+
{ id: 'low', label: 'Low' },
|
|
169
|
+
],
|
|
170
|
+
},
|
|
276
171
|
// We deliberately do NOT opt into `resumesSessionViaCli` / agy's `-c`
|
|
277
172
|
// resume flag on follow-up turns. Tested both shapes; `-c` activates
|
|
278
173
|
// agy's internal agentic loop (multi-step model retries, tool calls,
|
|
@@ -290,9 +185,6 @@ export const antigravityAgentDef = {
|
|
|
290
185
|
// composed in server.ts gives a second line of defense for weak
|
|
291
186
|
// plain-stream models like Gemini 3.5 Flash.
|
|
292
187
|
buildArgs: (prompt, _imagePaths, _extra = [], options = {}, runtimeContext = {}) => {
|
|
293
|
-
if (options.model && options.model !== DEFAULT_MODEL_OPTION.id) {
|
|
294
|
-
writeAntigravityModelSelection(options.model, runtimeContext.antigravitySettingsPath);
|
|
295
|
-
}
|
|
296
188
|
// `-p` is a Go `flag`-package flag that TAKES THE PROMPT AS ITS VALUE,
|
|
297
189
|
// not a boolean switch followed by a positional prompt, and agy has no
|
|
298
190
|
// stdin sentinel under the default `--input-format text`. Verified
|
|
@@ -306,18 +198,23 @@ export const antigravityAgentDef = {
|
|
|
306
198
|
// So the prompt rides argv as `-p`'s value. That is also why this def is
|
|
307
199
|
// argv-budgeted (`maxPromptArgBytes` below) rather than `promptViaStdin`.
|
|
308
200
|
const args = [];
|
|
201
|
+
// `--model` is the same kind of Go flag as `--log-file`/`-p`: its value is
|
|
202
|
+
// whatever argv token immediately follows it, so it too must be pushed
|
|
203
|
+
// before `-p` (always last — see below). Verified live against agy
|
|
204
|
+
// v1.1.24: `agy --model <slug> -p '<prompt>'` runs that one print-mode
|
|
205
|
+
// turn on the named model, and combining it with `--log-file` works the
|
|
206
|
+
// same way — relative order between `--model` and `--log-file` doesn't
|
|
207
|
+
// matter (each independently consumes exactly the one token after it),
|
|
208
|
+
// only that both precede `-p`.
|
|
209
|
+
if (options.model && options.model !== DEFAULT_MODEL_OPTION.id) {
|
|
210
|
+
args.push('--model', options.model);
|
|
211
|
+
}
|
|
309
212
|
// Always opt into `--log-file` when the daemon supplied a path so
|
|
310
213
|
// it can post-exit grep for the actual upstream failure shape
|
|
311
214
|
// (auth missing vs quota reached vs upstream error) — without it
|
|
312
215
|
// the chat surfaces a generic "empty response" because print mode
|
|
313
216
|
// never echoes those errors on stdout. See server.ts empty-output
|
|
314
217
|
// 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
218
|
if (runtimeContext.agentLogFilePath) {
|
|
322
219
|
args.push('--log-file', runtimeContext.agentLogFilePath);
|
|
323
220
|
}
|
|
@@ -331,13 +228,10 @@ export const antigravityAgentDef = {
|
|
|
331
228
|
maxPromptArgBytes: 30_000,
|
|
332
229
|
streamFormat: 'plain',
|
|
333
230
|
// `buildArgs` above already consumes `runtimeContext.agentLogFilePath` when
|
|
334
|
-
// the caller supplies one; this is what asks it to.
|
|
335
|
-
//
|
|
336
|
-
//
|
|
337
|
-
//
|
|
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.
|
|
231
|
+
// the caller supplies one; this is what asks it to. Print mode never
|
|
232
|
+
// echoes auth/quota failures on stdout, so post-exit log inspection is the
|
|
233
|
+
// only way to tell those two apart — see server.ts's empty-output guard
|
|
234
|
+
// for the consumer.
|
|
341
235
|
needsAgentLogFile: true,
|
|
342
236
|
// The one adapter in this package that must not stream live — see
|
|
343
237
|
// `redactAntigravityAuthUrls`'s comment for the OAuth-URL-on-stdout-plus-
|
|
@@ -346,13 +240,36 @@ export const antigravityAgentDef = {
|
|
|
346
240
|
// and keeps streaming per chunk; aider's and deepseek's own comments call
|
|
347
241
|
// that live cadence out as deliberate.
|
|
348
242
|
stdoutPolicy: { buffering: 'until-close', sanitize: redactAntigravityAuthUrls },
|
|
349
|
-
runtimeLock: antigravityModelLock,
|
|
350
243
|
installUrl: 'https://antigravity.google/cli',
|
|
351
244
|
docsUrl: 'https://antigravity.google/docs/cli-overview',
|
|
352
|
-
//
|
|
353
|
-
//
|
|
354
|
-
//
|
|
355
|
-
//
|
|
245
|
+
// `externalMcpInjection: 'env-passthrough'` — the prior verdict here ("no safe, run-scoped
|
|
246
|
+
// delivery mechanism exists") stood as long as the only candidates were a per-run config
|
|
247
|
+
// flag/relocatable home dir, neither of which `agy` has (see the probes below, still accurate).
|
|
248
|
+
// What flips the verdict is a THIRD property, verified live and not previously tested: `agy`
|
|
249
|
+
// passes its own parent process environment through to the stdio MCP server children it spawns
|
|
250
|
+
// for servers already sitting in its persistent global registry.
|
|
251
|
+
//
|
|
252
|
+
// - Proven with a probe MCP server registered under a relocated `HOME`'s
|
|
253
|
+
// `.gemini/config/mcp_config.json`: booted under `agy -p`, it read a marker variable
|
|
254
|
+
// (`TOVU_ENV_PASSTHROUGH_PROBE`) straight out of its own `process.env` — no config field, no
|
|
255
|
+
// argv, nothing but inherited environment. Full MCP handshake observed on the same run:
|
|
256
|
+
// `server/discover` → `initialize` → `notifications/initialized` → `tools/list`
|
|
257
|
+
// (protocolVersion `2025-11-25`, clientInfo `antigravity-client`).
|
|
258
|
+
// - That makes the registration itself a STATIC, one-time operation — the operator adds one
|
|
259
|
+
// `tovu` entry to their real `~/.gemini/config/mcp_config.json` (confirmed still the one real
|
|
260
|
+
// mechanism; see the probes below) with a bare, env-free `command` pointing at this package's
|
|
261
|
+
// own `jini-mcp` bin, resolving its credential from the environment at spawn time instead of
|
|
262
|
+
// a baked-in value. No per-spawn config mutation, no lock, no restore discipline — the exact
|
|
263
|
+
// "safe, run-scoped delivery" gap the old verdict cited is closed by inheritance, not by
|
|
264
|
+
// relocation.
|
|
265
|
+
// - So this def's job shrinks to exactly what `'env-passthrough'` describes in `types.ts`: put
|
|
266
|
+
// the bridge entry's `JINI_RUN_ID`/`JINI_DAEMON_URL`/`JINI_DAEMON_TOKEN` onto `agy`'s OWN
|
|
267
|
+
// spawn env (done centrally by `@jini-ai/daemon`'s `computeChildEnv`, not by this def's
|
|
268
|
+
// `buildArgs`), and `agy` carries them the rest of the way to the already-registered server on
|
|
269
|
+
// its own.
|
|
270
|
+
//
|
|
271
|
+
// The prior probes into a per-run/relocatable mechanism remain accurate and are kept as the
|
|
272
|
+
// record of what does NOT work, so a future reader does not re-walk the same dead ends:
|
|
356
273
|
//
|
|
357
274
|
// - No per-run config-path flag. `agy --help` and `agy mcp add --help` were read in full: `mcp
|
|
358
275
|
// add/remove/list/enable/disable` only mutate the PERSISTENT global registry — there is no
|
|
@@ -361,7 +278,9 @@ export const antigravityAgentDef = {
|
|
|
361
278
|
// every all-caps `*HOME*`/`*_DIR`/`*_PATH`/`XDG_*` token found nothing naming a relocatable
|
|
362
279
|
// config/data root for Antigravity or Gemini specifically — only the generic `HOME` (relocating
|
|
363
280
|
// 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).
|
|
281
|
+
// an "explicit, run-scoped delivery" by any reasonable reading). Also why the passthrough probe
|
|
282
|
+
// above used a relocated `HOME` only to prove inheritance in isolation — production spawns
|
|
283
|
+
// always use the operator's real `HOME`, since relocating it breaks `agy`'s own auth.
|
|
365
284
|
// - The workspace-relative `.agents/mcp_config.json` this comment used to cite as unverified is
|
|
366
285
|
// now verified NOT to be what it looked like: a project dir was seeded with a real
|
|
367
286
|
// `.agents/mcp_config.json` entry, then `agy mcp list` (run from that cwd) showed only the
|
|
@@ -372,21 +291,17 @@ export const antigravityAgentDef = {
|
|
|
372
291
|
// distinct project. Best read: `.agents/mcp_config.json` belongs to the Antigravity IDE
|
|
373
292
|
// extension's own project layer, a different consumer than the bare `agy` CLI binary this
|
|
374
293
|
// daemon actually spawns — not a mechanism reachable from a plain `agy -p` invocation at all.
|
|
375
|
-
//
|
|
376
|
-
//
|
|
377
|
-
//
|
|
378
|
-
//
|
|
379
|
-
//
|
|
380
|
-
//
|
|
381
|
-
//
|
|
382
|
-
//
|
|
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.
|
|
294
|
+
// Confirmed independently upstream: antigravity-cli issue #60 (open, no maintainer response)
|
|
295
|
+
// reports the identical "project-local mcp_config.json is read but ignored" symptom.
|
|
296
|
+
// - `~/.gemini/config/mcp_config.json` (global, JSON, `{"mcpServers":{"<name>":{"command":...}}}`,
|
|
297
|
+
// confirmed by reading the operator's own file read-only after backing it up) has no relocation
|
|
298
|
+
// path — but per the passthrough finding above, this def never needs to write to it at all
|
|
299
|
+
// outside the one-time operator registration, so the shared-file race a prior version of this
|
|
300
|
+
// comment warned about (a second race alongside the now-deleted settings.json model lock) never
|
|
301
|
+
// materializes: nothing here mutates that file per run.
|
|
388
302
|
//
|
|
389
303
|
// No hang was observed on any of these probes (all completed in well under `--print-timeout`'s
|
|
390
|
-
// default 5m)
|
|
304
|
+
// default 5m).
|
|
305
|
+
externalMcpInjection: 'env-passthrough',
|
|
391
306
|
};
|
|
392
307
|
//# sourceMappingURL=antigravity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/defs/antigravity.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,OAAO,
|
|
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;IAC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AAE,gCAAgC;IAC5C,OAAO,EAAE,8CAA8C;IACvD,2FAA2F;IAC3F,yFAAyF;IACzF,gGAAgG;IAChG,6FAA6F;IAC7F,+FAA+F;IAC/F,iEAAiE;IACjE,EAAE;IACF,2EAA2E;IAC3E,yFAAyF;IACzF,iGAAiG;IACjG,4FAA4F;IAC5F,oFAAoF;IACpF,uEAAuE;IACvE,8FAA8F;IAC9F,kGAAkG;IAClG,kGAAkG;IAClG,iGAAiG;IACjG,iGAAiG;IACjG,6FAA6F;IAC7F,kBAAkB;IAClB,iGAAiG;IACjG,8FAA8F;IAC9F,4FAA4F;IAC5F,mGAAmG;IACnG,eAAe;IACf,EAAE;IACF,4FAA4F;IAC5F,wFAAwF;IACxF,EAAE;IACF,iGAAiG;IACjG,+FAA+F;IAC/F,8FAA8F;IAC9F,mGAAmG;IACnG,gGAAgG;IAChG,oGAAoG;IACpG,qGAAqG;IACrG,oGAAoG;IACpG,+FAA+F;IAC/F,0FAA0F;IAC1F,kGAAkG;IAClG,uFAAuF;IACvF,+FAA+F;IAC/F,iGAAiG;IACjG,iGAAiG;IACjG,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"}
|
package/dist/defs/claude.d.ts
CHANGED
|
@@ -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
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/defs/claude.ts"],"names":[],"mappings":"AA6DA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwIA,CAAC"}
|
package/dist/defs/claude.js
CHANGED
|
@@ -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
|
-
//
|
|
143
|
-
// `
|
|
144
|
-
//
|
|
145
|
-
// with exit 1, which kills the chat rather than
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|