@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.
- 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/antigravity.d.ts +1 -28
- package/dist/defs/antigravity.d.ts.map +1 -1
- package/dist/defs/antigravity.js +94 -246
- 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/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/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 +13 -3
- package/dist/types.d.ts.map +1 -1
- 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
|
|
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`)
|
package/dist/capabilities.d.ts
CHANGED
|
@@ -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/
|
|
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>;
|
package/dist/claude-stream.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module claude-stream
|
|
3
3
|
*
|
|
4
|
-
* Ported verbatim from OD's `apps/daemon/src/runtimes/
|
|
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
|
*
|
package/dist/claude-stream.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module claude-stream
|
|
3
3
|
*
|
|
4
|
-
* Ported verbatim from OD's `apps/daemon/src/runtimes/
|
|
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":"
|
|
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"}
|
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
|
|
@@ -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: '
|
|
264
|
-
{ id: '
|
|
265
|
-
{ id: '
|
|
266
|
-
{ id: '
|
|
267
|
-
{ id: '
|
|
268
|
-
{
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
},
|
|
272
|
-
{ id: '
|
|
273
|
-
{ id: '
|
|
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.
|
|
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.
|
|
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
|
-
//
|
|
353
|
-
//
|
|
354
|
-
//
|
|
355
|
-
//
|
|
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
|
-
//
|
|
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.
|
|
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)
|
|
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,
|
|
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;IAC1E,iDAAiD;IACjD,MAAM,CAAC,GAAG,CAAA,oGAAoG;CAC/G,CAAC,IAAI,CAAC,GAAG,CAAC,EACX,IAAI,CACL,CAAC;AAEF,+KAA+K;AAC/K,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAEvD;;;;;;;;;;;;;;;GAeG;AACH,MAAM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+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
|