@jini-ai/agent-runtime 0.6.15-rc.2 → 0.6.15
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/agent-protocol/acp/rpc.js +4 -8
- package/dist/agent-protocol/acp/session.js +33 -37
- package/dist/agent-protocol/acp/text-suppression.js +10 -7
- package/dist/agent-protocol/acp/updates.js +4 -5
- package/dist/agent-protocol/core/json-line-stream.d.ts +6 -3
- package/dist/agent-protocol/core/json-line-stream.js +9 -10
- package/dist/agent-protocol/pi-rpc/events.js +27 -27
- package/dist/agent-protocol/pi-rpc/models.js +13 -11
- package/dist/agent-protocol/pi-rpc/session.js +7 -7
- package/dist/ai-trace/classify.js +4 -1
- package/dist/ai-trace/sinks.js +19 -3
- package/dist/ai-trace/usage.js +3 -1
- package/dist/anthropic-live-models.js +0 -0
- package/dist/auth.js +20 -17
- package/dist/claude-code-models.js +29 -17
- package/dist/claude-filesystem-policy.d.ts +4 -3
- package/dist/claude-filesystem-policy.js +39 -12
- package/dist/claude-stream.js +65 -47
- package/dist/copilot-stream.js +14 -11
- package/dist/core/model-discovery-shared.js +4 -2
- package/dist/core/omit-keys.d.ts +7 -0
- package/dist/core/omit-keys.js +12 -0
- package/dist/defs/aider.d.ts +1 -1
- package/dist/defs/amp.d.ts +1 -1
- package/dist/defs/amr.js +5 -9
- package/dist/defs/antigravity-event-stream.d.ts +19 -0
- package/dist/defs/antigravity-event-stream.js +83 -0
- package/dist/defs/antigravity.d.ts +4 -0
- package/dist/defs/antigravity.js +27 -15
- package/dist/defs/auggie.d.ts +3 -3
- package/dist/defs/claude.d.ts +3 -3
- package/dist/defs/cline.d.ts +3 -3
- package/dist/defs/codebuddy.d.ts +1 -1
- package/dist/defs/codex.js +3 -2
- package/dist/defs/copilot.d.ts +1 -1
- package/dist/defs/crush.d.ts +1 -1
- package/dist/defs/cursor-agent.d.ts +3 -1
- package/dist/defs/cursor-agent.js +8 -6
- package/dist/defs/deepseek.d.ts +1 -1
- package/dist/defs/devin.d.ts +3 -3
- package/dist/defs/droid.d.ts +1 -1
- package/dist/defs/goose.d.ts +3 -3
- package/dist/defs/grok-build.js +7 -5
- package/dist/defs/hermes.d.ts +3 -3
- package/dist/defs/kilo.d.ts +3 -3
- package/dist/defs/kimi.d.ts +3 -3
- package/dist/defs/kiro.d.ts +3 -3
- package/dist/defs/mimo.d.ts +1 -1
- package/dist/defs/opencode.d.ts +1 -1
- package/dist/defs/pi.d.ts +1 -1
- package/dist/defs/qoder.d.ts +1 -1
- package/dist/defs/qwen.d.ts +1 -1
- package/dist/defs/reasonix.d.ts +3 -3
- package/dist/defs/trae-cli.d.ts +3 -3
- package/dist/defs/vibe.d.ts +3 -3
- package/dist/detection.js +22 -2
- package/dist/json-event-stream.d.ts +1 -2
- package/dist/json-event-stream.js +10 -9
- package/dist/launch.js +2 -1
- package/dist/model-catalog-cache.js +6 -4
- package/dist/model-contracts.d.ts +29 -0
- package/dist/model-contracts.js +2 -0
- package/dist/model-discovery-adapters.js +44 -19
- package/dist/model-discovery-config.js +8 -4
- package/dist/model-discovery-types.d.ts +2 -2
- package/dist/model-discovery-yaml.d.ts +9 -0
- package/dist/model-discovery-yaml.js +98 -0
- package/dist/model-discovery.js +10 -3
- package/dist/model-registry.js +2 -1
- package/dist/native-tool-policy.d.ts +28 -0
- package/dist/native-tool-policy.js +42 -0
- package/dist/opencode-log.js +13 -10
- package/dist/pi-models.js +13 -11
- package/dist/probe-scheduler.js +13 -5
- package/dist/providers/aihubmix.js +6 -7
- package/dist/providers/anthropic-messages.d.ts +6 -3
- package/dist/providers/anthropic-messages.js +21 -23
- package/dist/providers/azure-chat.d.ts +1 -1
- package/dist/providers/azure-chat.js +7 -10
- package/dist/providers/connection-guard.js +2 -1
- package/dist/providers/connection-test.js +16 -10
- package/dist/providers/google-messages.d.ts +1 -1
- package/dist/providers/google-messages.js +33 -35
- package/dist/providers/google.js +3 -4
- package/dist/providers/model-catalog.js +10 -7
- package/dist/providers/ollama-chat.d.ts +0 -8
- package/dist/providers/ollama-chat.js +17 -19
- package/dist/providers/openai-chat.d.ts +6 -3
- package/dist/providers/openai-chat.js +24 -22
- package/dist/providers/operation-schema.d.ts +2 -3
- package/dist/providers/operation-schema.js +25 -22
- package/dist/providers/provider-tool-policy.d.ts +13 -0
- package/dist/providers/provider-tool-policy.js +2 -0
- package/dist/providers/tool-loop-verdict.d.ts +22 -0
- package/dist/providers/tool-loop-verdict.js +17 -0
- package/dist/providers/tool-turn-types.d.ts +2 -12
- package/dist/providers/tool-turn.js +7 -2
- package/dist/types.d.ts +8 -27
- package/package.json +14 -8
package/dist/defs/antigravity.js
CHANGED
|
@@ -49,14 +49,14 @@ const OAUTH_URL_PATTERN = new RegExp([
|
|
|
49
49
|
// Google's own OAuth 2.0 authorization host — the endpoint agy actually
|
|
50
50
|
// prints. Host-anchored rather than path-anchored so an upstream move
|
|
51
51
|
// from `/o/oauth2/auth` to any other path on that host still redacts.
|
|
52
|
-
String.raw `https?://accounts\.google\.com
|
|
52
|
+
String.raw `https?://accounts\.google\.com/[^\s"]*`,
|
|
53
53
|
// Any other absolute URL carrying an OAuth request's or a bearer
|
|
54
54
|
// credential's hallmark query parameter, so a future change of identity
|
|
55
55
|
// provider degrades to "redacted" instead of "leaked". Deliberately keyed
|
|
56
56
|
// on the parameter names rather than on the word "oauth" appearing
|
|
57
57
|
// somewhere in the URL, which would also eat ordinary documentation links
|
|
58
58
|
// an assistant reply might legitimately contain.
|
|
59
|
-
String.raw `https
|
|
59
|
+
String.raw `https?://[^\s"]*[?&](?:client_id|code_challenge|code_verifier|access_token|id_token|refresh_token)=[^\s"]*`,
|
|
60
60
|
].join('|'), 'gi');
|
|
61
61
|
/** What a redacted URL is replaced with. Deliberately says *what* was removed, so the surrounding "Please visit the URL to log in:" text does not read as truncated output. */
|
|
62
62
|
const OAUTH_URL_PLACEHOLDER = '[redacted sign-in URL]';
|
|
@@ -106,18 +106,11 @@ export function parseAgyModels({ stdout }) {
|
|
|
106
106
|
const out = [DEFAULT_MODEL_OPTION];
|
|
107
107
|
const seen = new Set([DEFAULT_MODEL_OPTION.id]);
|
|
108
108
|
for (const line of lines) {
|
|
109
|
-
|
|
109
|
+
const row = antigravityModelRow(line);
|
|
110
|
+
if (!row || seen.has(row.id))
|
|
110
111
|
continue;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
continue;
|
|
114
|
-
// `line` is already trimmed, so a tab inside it always has a non-blank character on each
|
|
115
|
-
// side: neither the id nor the label can come out empty here.
|
|
116
|
-
const id = line.slice(0, tabIndex).trim();
|
|
117
|
-
if (seen.has(id))
|
|
118
|
-
continue;
|
|
119
|
-
seen.add(id);
|
|
120
|
-
out.push({ id, label: line.slice(tabIndex + 1).trim() });
|
|
112
|
+
seen.add(row.id);
|
|
113
|
+
out.push(row);
|
|
121
114
|
}
|
|
122
115
|
return out.length > 1 ? out : null;
|
|
123
116
|
}
|
|
@@ -241,14 +234,22 @@ export const antigravityAgentDef = {
|
|
|
241
234
|
// - `agy -p '<prompt>'` -> the prompt actually lands.
|
|
242
235
|
// So the prompt rides argv as `-p`'s value. That is also why this def is
|
|
243
236
|
// argv-budgeted (`maxPromptArgBytes` below) rather than `promptViaStdin`.
|
|
244
|
-
return [...skipPermissionsArgs({ options }), ...modelArgs({ options }), ...logFileArgs({ runtimeContext }), '-p', prompt];
|
|
237
|
+
return ['--output-format', 'stream-json', ...skipPermissionsArgs({ options }), ...modelArgs({ options }), ...logFileArgs({ runtimeContext }), '-p', prompt];
|
|
245
238
|
},
|
|
246
239
|
// agy takes its prompt on argv (see `buildArgs`), so this def is
|
|
247
240
|
// argv-budgeted like the other plain-stream argv adapters (aider,
|
|
248
241
|
// deepseek) rather than `promptViaStdin`. Without one of these three
|
|
249
242
|
// fields `assessAgentExecutorCompatibility` rejects the def outright.
|
|
250
243
|
maxPromptArgBytes: 30_000,
|
|
251
|
-
|
|
244
|
+
// Structured receipts enable native-tool auditing; they do not enforce an OFF switch.
|
|
245
|
+
// agy's CLI reference exposes no run-scoped settings/permission/MCP override. Global settings
|
|
246
|
+
// writes race other runs, and relocating HOME breaks auth, so audited output alone cannot grant this.
|
|
247
|
+
// Owner 2026-10-29 supersedes the interim refusal: eligible owners always use full access.
|
|
248
|
+
fullCliAccessOnly: true,
|
|
249
|
+
fullCliAccessNote: "Gemini (Antigravity) always runs with full access to this computer, like running it in your own terminal. Pick Claude or Codex if you want the tool limits.",
|
|
250
|
+
streamFormat: 'json-event-stream',
|
|
251
|
+
eventParser: 'antigravity',
|
|
252
|
+
supportsNativeToolAccess: false,
|
|
252
253
|
// `buildArgs` above already consumes `runtimeContext.agentLogFilePath` when
|
|
253
254
|
// the caller supplies one; this is what asks it to. Print mode never
|
|
254
255
|
// echoes auth/quota failures on stdout, so post-exit log inspection is the
|
|
@@ -328,4 +329,15 @@ export const antigravityAgentDef = {
|
|
|
328
329
|
// default 5m).
|
|
329
330
|
externalMcpInjection: 'env-passthrough',
|
|
330
331
|
};
|
|
332
|
+
/** One `id<TAB>label` row of `agy models`, or `null` for the progress banner and tab-less lines. */
|
|
333
|
+
function antigravityModelRow(line) {
|
|
334
|
+
if (/^fetching available models\.\.\.$/i.test(line))
|
|
335
|
+
return null;
|
|
336
|
+
const tabIndex = line.indexOf('\t');
|
|
337
|
+
if (tabIndex === -1)
|
|
338
|
+
return null;
|
|
339
|
+
// `line` is already trimmed, so a tab inside it always has a non-blank character on each
|
|
340
|
+
// side: neither the id nor the label can come out empty here.
|
|
341
|
+
return { id: line.slice(0, tabIndex).trim(), label: line.slice(tabIndex + 1).trim() };
|
|
342
|
+
}
|
|
331
343
|
//# sourceMappingURL=antigravity.js.map
|
package/dist/defs/auggie.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare const auggieAgentDef: {
|
|
|
5
5
|
versionArgs: string[];
|
|
6
6
|
fetchModels: ({ resolvedBin, env }: {
|
|
7
7
|
resolvedBin: string;
|
|
8
|
-
env: import("../
|
|
8
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
9
9
|
}, { acpModelProbe }?: {
|
|
10
10
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
11
|
-
} | undefined) => Promise<import("../
|
|
12
|
-
fallbackModels: import("../
|
|
11
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
12
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
13
13
|
buildArgs: () => string[];
|
|
14
14
|
streamFormat: string;
|
|
15
15
|
externalMcpInjection: "acp-merge";
|
package/dist/defs/claude.d.ts
CHANGED
|
@@ -21,12 +21,12 @@ export declare const claudeAgentDef: {
|
|
|
21
21
|
'--setting-sources': string;
|
|
22
22
|
'--chrome': string;
|
|
23
23
|
};
|
|
24
|
-
fallbackModels: import("../
|
|
24
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
25
25
|
fallbackModelsAssertedAt: string;
|
|
26
26
|
fetchModels: ({ resolvedBin, env }: {
|
|
27
27
|
resolvedBin: string;
|
|
28
|
-
env: import("../
|
|
29
|
-
}) => Promise<import("../
|
|
28
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
29
|
+
}) => Promise<import("../model-contracts.js").RuntimeModelOption[] | null>;
|
|
30
30
|
reasoningOptions: {
|
|
31
31
|
id: string;
|
|
32
32
|
label: string;
|
package/dist/defs/cline.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare const clineAgentDef: {
|
|
|
5
5
|
versionArgs: string[];
|
|
6
6
|
fetchModels: ({ resolvedBin, env }: {
|
|
7
7
|
resolvedBin: string;
|
|
8
|
-
env: import("../
|
|
8
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
9
9
|
}, { acpModelProbe }?: {
|
|
10
10
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
11
|
-
} | undefined) => Promise<import("../
|
|
12
|
-
fallbackModels: import("../
|
|
11
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
12
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
13
13
|
buildArgs: () => string[];
|
|
14
14
|
streamFormat: string;
|
|
15
15
|
externalMcpInjection: "acp-merge";
|
package/dist/defs/codebuddy.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const codebuddyAgentDef: {
|
|
|
9
9
|
'--include-partial-messages': string;
|
|
10
10
|
'--add-dir': string;
|
|
11
11
|
};
|
|
12
|
-
fallbackModels: import("../
|
|
12
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
13
13
|
reasoningOptions: {
|
|
14
14
|
id: string;
|
|
15
15
|
label: string;
|
package/dist/defs/codex.js
CHANGED
|
@@ -314,6 +314,7 @@ export const codexAgentDef = {
|
|
|
314
314
|
fallbackModels: [
|
|
315
315
|
DEFAULT_MODEL_OPTION,
|
|
316
316
|
{ id: 'gpt-6.1-sol', label: 'GPT-6.1 Sol' },
|
|
317
|
+
{ id: 'gpt-6.1-terra', label: 'GPT-6.1 Terra' },
|
|
317
318
|
{ id: 'gpt-6-sol', label: 'GPT-6 Sol' },
|
|
318
319
|
{ id: 'gpt-6-luna', label: 'GPT-6 Luna' },
|
|
319
320
|
{ id: 'gpt-6-astra', label: 'gpt-6-astra' },
|
|
@@ -335,9 +336,9 @@ export const codexAgentDef = {
|
|
|
335
336
|
{ id: 'o3', label: 'o3' },
|
|
336
337
|
{ id: 'o4-mini', label: 'o4-mini' },
|
|
337
338
|
],
|
|
338
|
-
// Asserted against
|
|
339
|
+
// Asserted against the dispatch's live Codex catalog evidence (2026-10-29). See
|
|
339
340
|
// `RuntimeAgentDef.fallbackModelsAssertedAt` and `scripts/check-model-fallback-freshness.ts`.
|
|
340
|
-
fallbackModelsAssertedAt: '2026-10-
|
|
341
|
+
fallbackModelsAssertedAt: '2026-10-29',
|
|
341
342
|
// The OLD-CLI path only. A Codex build new enough to answer `debug models` gets its effort list
|
|
342
343
|
// derived from that catalog instead (see `deriveReasoningOptions` below), which is what makes
|
|
343
344
|
// `max` and `ultra` reachable. This list is deliberately NOT widened to match: it is what a build
|
package/dist/defs/copilot.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const copilotAgentDef: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
|
-
fallbackModels: import("../
|
|
6
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
7
7
|
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
8
8
|
prompt: string;
|
|
9
9
|
imagePaths: string[];
|
package/dist/defs/crush.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const crushAgentDef: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
|
-
fallbackModels: import("../
|
|
6
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
7
7
|
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
8
8
|
prompt: string;
|
|
9
9
|
imagePaths: string[];
|
|
@@ -39,7 +39,9 @@ export declare const cursorAgentDef: {
|
|
|
39
39
|
context: import("../model-discovery-types.js").ModelDiscoveryContext;
|
|
40
40
|
}, optionalArgs?: {
|
|
41
41
|
signal?: AbortSignal;
|
|
42
|
-
force
|
|
42
|
+
force
|
|
43
|
+
/** Approval flags: `--force` always, `--trust` only when this build's `--help` probe saw it. */
|
|
44
|
+
?: boolean;
|
|
43
45
|
staleWhileRevalidate?: boolean;
|
|
44
46
|
deps?: import("../model-discovery-types.js").ModelDiscoveryDeps;
|
|
45
47
|
}): Promise<import("../model-discovery-types.js").ModelCatalogSnapshot>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { createAgentModelDiscovery } from '../model-discovery-native.js';
|
|
2
2
|
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
3
3
|
import { agentCapabilities } from '../capabilities.js';
|
|
4
|
+
/** Agent id, binary name and event-parser key: one string for all three. */
|
|
5
|
+
const CURSOR_AGENT_ID = 'cursor-agent';
|
|
4
6
|
/** One `<id>` or `<id> - <label>` listing line; header lines and non-id lines yield null. */
|
|
5
7
|
function parseCursorAgentModelLine(line) {
|
|
6
8
|
if (/^(available models|models)$/i.test(line))
|
|
7
9
|
return null;
|
|
8
|
-
const match = line.match(/^([A-Za-z0-9][A-Za-z0-9._/:@-]*)(?:\s+-\s+(
|
|
10
|
+
const match = line.match(/^([A-Za-z0-9][A-Za-z0-9._/:@-]*)(?:\s+-\s+(\S.*))?$/);
|
|
9
11
|
if (!match)
|
|
10
12
|
return null;
|
|
11
13
|
// The id group is mandatory and non-empty whenever the pattern matched.
|
|
@@ -48,7 +50,7 @@ function bypassArgs(options) {
|
|
|
48
50
|
// withhold.
|
|
49
51
|
if (options.permissionMode === 'restricted')
|
|
50
52
|
return [];
|
|
51
|
-
const caps = (options.capabilities ?? agentCapabilities.get(
|
|
53
|
+
const caps = (options.capabilities ?? agentCapabilities.get(CURSOR_AGENT_ID)) || {};
|
|
52
54
|
// `--trust` grants workspace trust in headless runs, but only newer
|
|
53
55
|
// cursor-agent builds accept it; older ones exit 1 with "unknown option"
|
|
54
56
|
// (issue #4461). Pass it only when the `--help` probe saw it.
|
|
@@ -56,10 +58,10 @@ function bypassArgs(options) {
|
|
|
56
58
|
}
|
|
57
59
|
export const cursorAgentDef = {
|
|
58
60
|
// UNVERIFIED live integration locally; source/category and limits are documented in model-discovery-adapters.ts.
|
|
59
|
-
...createAgentModelDiscovery(
|
|
60
|
-
id:
|
|
61
|
+
...createAgentModelDiscovery(CURSOR_AGENT_ID, { fallbackModels: () => cursorAgentDef.fallbackModels, args: ['models'], parse: parseCursorAgentListing }),
|
|
62
|
+
id: CURSOR_AGENT_ID,
|
|
61
63
|
name: 'Cursor Agent',
|
|
62
|
-
bin:
|
|
64
|
+
bin: CURSOR_AGENT_ID,
|
|
63
65
|
versionArgs: ['--version'],
|
|
64
66
|
helpArgs: ['--help'],
|
|
65
67
|
capabilityFlags: {
|
|
@@ -99,7 +101,7 @@ export const cursorAgentDef = {
|
|
|
99
101
|
],
|
|
100
102
|
promptViaStdin: true,
|
|
101
103
|
streamFormat: 'json-event-stream',
|
|
102
|
-
eventParser:
|
|
104
|
+
eventParser: CURSOR_AGENT_ID,
|
|
103
105
|
// `cursor-agent status` is a cheap, side-effect-free auth check. Declaring
|
|
104
106
|
// it here is what makes detection surface an "auth required" badge for
|
|
105
107
|
// Cursor Agent (the generalized probe only runs for adapters that opt in).
|
package/dist/defs/deepseek.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const deepseekAgentDef: {
|
|
|
4
4
|
bin: string;
|
|
5
5
|
fallbackBins: string[];
|
|
6
6
|
versionArgs: string[];
|
|
7
|
-
fallbackModels: import("../
|
|
7
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
8
8
|
buildArgs: ({ prompt, imagePaths: _imagePaths }: {
|
|
9
9
|
prompt: string;
|
|
10
10
|
imagePaths: string[];
|
package/dist/defs/devin.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare const devinAgentDef: {
|
|
|
5
5
|
versionArgs: string[];
|
|
6
6
|
fetchModels: ({ resolvedBin, env }: {
|
|
7
7
|
resolvedBin: string;
|
|
8
|
-
env: import("../
|
|
8
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
9
9
|
}, { acpModelProbe }?: {
|
|
10
10
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
11
|
-
} | undefined) => Promise<import("../
|
|
12
|
-
fallbackModels: import("../
|
|
11
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
12
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
13
13
|
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
14
14
|
prompt: string;
|
|
15
15
|
imagePaths: string[];
|
package/dist/defs/droid.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const droidAgentDef: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
|
-
fallbackModels: import("../
|
|
6
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
7
7
|
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
8
8
|
prompt: string;
|
|
9
9
|
imagePaths: string[];
|
package/dist/defs/goose.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare const gooseAgentDef: {
|
|
|
5
5
|
versionArgs: string[];
|
|
6
6
|
fetchModels: ({ resolvedBin, env }: {
|
|
7
7
|
resolvedBin: string;
|
|
8
|
-
env: import("../
|
|
8
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
9
9
|
}, { acpModelProbe }?: {
|
|
10
10
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
11
|
-
} | undefined) => Promise<import("../
|
|
12
|
-
fallbackModels: import("../
|
|
11
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
12
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
13
13
|
buildArgs: () => string[];
|
|
14
14
|
streamFormat: string;
|
|
15
15
|
externalMcpInjection: "acp-merge";
|
package/dist/defs/grok-build.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { createAgentModelDiscovery } from '../model-discovery-native.js';
|
|
2
2
|
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
3
|
+
/** Agent id, binary name and the routing-mode default model id. */
|
|
4
|
+
const GROK_BUILD_ID = 'grok-build';
|
|
3
5
|
const GROK_MODEL_ID_RE = /^(?:[*•-]\s*|(?=grok-))([a-z0-9][a-z0-9./_:@\[\]-]*)(?:\s+\(default\))?\s*$/i;
|
|
4
6
|
export function parseGrokBuildModels({ stdout }) {
|
|
5
7
|
const seen = new Set();
|
|
@@ -10,12 +12,12 @@ export function parseGrokBuildModels({ stdout }) {
|
|
|
10
12
|
if (!id || seen.has(id))
|
|
11
13
|
continue;
|
|
12
14
|
seen.add(id);
|
|
13
|
-
out.push({ id, label: id, identityKind: /^(?:xai\/)?grok-/i.test(id) && id !==
|
|
15
|
+
out.push({ id, label: id, identityKind: /^(?:xai\/)?grok-/i.test(id) && id !== GROK_BUILD_ID ? 'concrete' : 'routing-mode' });
|
|
14
16
|
}
|
|
15
17
|
return out;
|
|
16
18
|
}
|
|
17
19
|
function grokModelSupportsReasoningEffort(model) {
|
|
18
|
-
if (!model || model === DEFAULT_MODEL_OPTION.id || model ===
|
|
20
|
+
if (!model || model === DEFAULT_MODEL_OPTION.id || model === GROK_BUILD_ID)
|
|
19
21
|
return false;
|
|
20
22
|
return /reasoning/i.test(model);
|
|
21
23
|
}
|
|
@@ -41,8 +43,8 @@ function grokModelSupportsReasoningEffort(model) {
|
|
|
41
43
|
// tool_use streaming). Upgrading to a `grok-stream-json` event parser is
|
|
42
44
|
// follow-up work once the format is stable enough to lock in.
|
|
43
45
|
export const grokBuildAgentDef = {
|
|
44
|
-
...createAgentModelDiscovery(
|
|
45
|
-
id:
|
|
46
|
+
...createAgentModelDiscovery(GROK_BUILD_ID, { fallbackModels: () => grokBuildAgentDef.fallbackModels, args: ['models'], parse: (input) => grokBuildAgentDef.listModels.parse(input) }),
|
|
47
|
+
id: GROK_BUILD_ID,
|
|
46
48
|
name: 'Grok Build',
|
|
47
49
|
bin: 'grok',
|
|
48
50
|
versionArgs: ['--version'],
|
|
@@ -57,7 +59,7 @@ export const grokBuildAgentDef = {
|
|
|
57
59
|
},
|
|
58
60
|
fallbackModels: [
|
|
59
61
|
DEFAULT_MODEL_OPTION,
|
|
60
|
-
{ id:
|
|
62
|
+
{ id: GROK_BUILD_ID, label: 'grok-build (xAI · default)' },
|
|
61
63
|
{ id: 'grok-4.3', label: 'grok-4.3 (xAI)' },
|
|
62
64
|
{ id: 'grok-4.20-reasoning', label: 'grok-4.20-reasoning (xAI · deep)' },
|
|
63
65
|
{
|
package/dist/defs/hermes.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare const hermesAgentDef: {
|
|
|
5
5
|
versionArgs: string[];
|
|
6
6
|
fetchModels: ({ resolvedBin, env }: {
|
|
7
7
|
resolvedBin: string;
|
|
8
|
-
env: import("../
|
|
8
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
9
9
|
}, { acpModelProbe }?: {
|
|
10
10
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
11
|
-
} | undefined) => Promise<import("../
|
|
12
|
-
fallbackModels: import("../
|
|
11
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
12
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
13
13
|
buildArgs: () => string[];
|
|
14
14
|
streamFormat: string;
|
|
15
15
|
mcpDiscovery: string;
|
package/dist/defs/kilo.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare const kiloAgentDef: {
|
|
|
5
5
|
versionArgs: string[];
|
|
6
6
|
fetchModels: ({ resolvedBin, env }: {
|
|
7
7
|
resolvedBin: string;
|
|
8
|
-
env: import("../
|
|
8
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
9
9
|
}, { acpModelProbe }?: {
|
|
10
10
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
11
|
-
} | undefined) => Promise<import("../
|
|
12
|
-
fallbackModels: import("../
|
|
11
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
12
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
13
13
|
buildArgs: () => string[];
|
|
14
14
|
streamFormat: string;
|
|
15
15
|
externalMcpInjection: "acp-merge";
|
package/dist/defs/kimi.d.ts
CHANGED
|
@@ -3,13 +3,13 @@ export declare const kimiAgentDef: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
|
-
fallbackModels: import("../
|
|
6
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
7
7
|
fetchModels: ({ resolvedBin, env }: {
|
|
8
8
|
resolvedBin: string;
|
|
9
|
-
env: import("../
|
|
9
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
10
10
|
}, { acpModelProbe }?: {
|
|
11
11
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
12
|
-
} | undefined) => Promise<import("../
|
|
12
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
13
13
|
buildArgs: () => string[];
|
|
14
14
|
streamFormat: string;
|
|
15
15
|
mcpDiscovery: string;
|
package/dist/defs/kiro.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare const kiroAgentDef: {
|
|
|
5
5
|
versionArgs: string[];
|
|
6
6
|
fetchModels: ({ resolvedBin, env }: {
|
|
7
7
|
resolvedBin: string;
|
|
8
|
-
env: import("../
|
|
8
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
9
9
|
}, { acpModelProbe }?: {
|
|
10
10
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
11
|
-
} | undefined) => Promise<import("../
|
|
12
|
-
fallbackModels: import("../
|
|
11
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
12
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
13
13
|
buildArgs: () => string[];
|
|
14
14
|
streamFormat: string;
|
|
15
15
|
externalMcpInjection: "acp-merge";
|
package/dist/defs/mimo.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const mimoAgentDef: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
|
-
fallbackModels: import("../
|
|
6
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
7
7
|
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
8
8
|
prompt: string;
|
|
9
9
|
imagePaths: string[];
|
package/dist/defs/opencode.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const opencodeAgentDef: {
|
|
|
15
15
|
parse: typeof parseLineSeparatedModels;
|
|
16
16
|
timeoutMs: number;
|
|
17
17
|
};
|
|
18
|
-
fallbackModels: import("../
|
|
18
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
19
19
|
fallbackModelsAssertedAt: string;
|
|
20
20
|
buildArgs: (_requiredArgs: {
|
|
21
21
|
prompt: string;
|
package/dist/defs/pi.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const piAgentDef: {
|
|
|
7
7
|
versionProbeTimeoutMs: number;
|
|
8
8
|
fetchModels: ({ resolvedBin, env }: {
|
|
9
9
|
resolvedBin: string;
|
|
10
|
-
env: import("../
|
|
10
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
11
11
|
}) => Promise<RuntimeModelOption[] | null>;
|
|
12
12
|
fallbackModels: RuntimeModelOption[];
|
|
13
13
|
fallbackModelsAssertedAt: string;
|
package/dist/defs/qoder.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const qoderAgentDef: {
|
|
|
4
4
|
name: string;
|
|
5
5
|
bin: string;
|
|
6
6
|
versionArgs: string[];
|
|
7
|
-
fallbackModels: import("../
|
|
7
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
8
8
|
buildArgs: ({ imagePaths }: {
|
|
9
9
|
prompt: string;
|
|
10
10
|
imagePaths: string[];
|
package/dist/defs/qwen.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const qwenAgentDef: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
|
-
fallbackModels: import("../
|
|
6
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
7
7
|
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
8
8
|
prompt: string;
|
|
9
9
|
imagePaths: string[];
|
package/dist/defs/reasonix.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ export declare const reasonixAgentDef: {
|
|
|
6
6
|
versionArgs: string[];
|
|
7
7
|
fetchModels: ({ resolvedBin, env }: {
|
|
8
8
|
resolvedBin: string;
|
|
9
|
-
env: import("../
|
|
9
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
10
10
|
}, { acpModelProbe }?: {
|
|
11
11
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
12
|
-
} | undefined) => Promise<import("../
|
|
12
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
13
13
|
buildArgs: () => string[];
|
|
14
14
|
streamFormat: string;
|
|
15
15
|
mcpDiscovery: string;
|
|
@@ -23,7 +23,7 @@ export declare const reasonixAgentDef: {
|
|
|
23
23
|
strategy: "env-var";
|
|
24
24
|
varName: string;
|
|
25
25
|
};
|
|
26
|
-
fallbackModels: import("../
|
|
26
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
27
27
|
installUrl: string;
|
|
28
28
|
docsUrl: string;
|
|
29
29
|
discoverModels(requiredArgs: {
|
package/dist/defs/trae-cli.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export declare const traeCliAgentDef: {
|
|
|
6
6
|
versionProbeTimeoutMs: number;
|
|
7
7
|
fetchModels: ({ resolvedBin, env }: {
|
|
8
8
|
resolvedBin: string;
|
|
9
|
-
env: import("../
|
|
9
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
10
10
|
}, { acpModelProbe }?: {
|
|
11
11
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
12
|
-
} | undefined) => Promise<import("../
|
|
13
|
-
fallbackModels: import("../
|
|
12
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
13
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
14
14
|
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
15
15
|
prompt: string;
|
|
16
16
|
imagePaths: string[];
|
package/dist/defs/vibe.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export declare const vibeAgentDef: {
|
|
|
5
5
|
versionArgs: string[];
|
|
6
6
|
fetchModels: ({ resolvedBin, env }: {
|
|
7
7
|
resolvedBin: string;
|
|
8
|
-
env: import("../
|
|
8
|
+
env: import("../model-contracts.js").RuntimeEnv;
|
|
9
9
|
}, { acpModelProbe }?: {
|
|
10
10
|
acpModelProbe?: import("../types.js").AcpModelProbe;
|
|
11
|
-
} | undefined) => Promise<import("../
|
|
12
|
-
fallbackModels: import("../
|
|
11
|
+
} | undefined) => Promise<import("../model-contracts.js").RuntimeModelOption[]>;
|
|
12
|
+
fallbackModels: import("../model-contracts.js").RuntimeModelOption[];
|
|
13
13
|
buildArgs: () => never[];
|
|
14
14
|
streamFormat: string;
|
|
15
15
|
externalMcpInjection: "acp-merge";
|
package/dist/detection.js
CHANGED
|
@@ -25,6 +25,7 @@ import { spawnEnvForAgent } from './env.js';
|
|
|
25
25
|
import { probeAgentAuthStatus } from './auth.js';
|
|
26
26
|
import { noopAmrProfileResolver } from './amr-profile-resolver.js';
|
|
27
27
|
import { buildAuthDiagnostic, buildExecutableDiagnostic, buildNotInvocableDiagnostic } from './diagnostics.js';
|
|
28
|
+
import { omitKeys } from './core/omit-keys.js';
|
|
28
29
|
async function fetchModels({ def, resolvedBin, env, deps }, { context, version, force } = {}) {
|
|
29
30
|
const scope = context ?? { executable: resolvedBin, env, cwd: process.cwd(), ...(version !== undefined ? { version } : {}) };
|
|
30
31
|
const options = { deps, ...(force ? { force: true } : {}) };
|
|
@@ -305,8 +306,27 @@ function stripFns(def) {
|
|
|
305
306
|
// matter extra because they carry closures — `JSON.stringify` would drop
|
|
306
307
|
// the functions but keep their enclosing objects, publishing a misleading
|
|
307
308
|
// `{"buffering":"until-close"}` / `{}` instead of omitting them.
|
|
308
|
-
|
|
309
|
-
|
|
309
|
+
return omitKeys(def, [
|
|
310
|
+
'discoverModels',
|
|
311
|
+
'resolveDefaultModel',
|
|
312
|
+
'buildArgs',
|
|
313
|
+
'listModels',
|
|
314
|
+
'fetchModels',
|
|
315
|
+
'deriveReasoningOptions',
|
|
316
|
+
'fallbackModels',
|
|
317
|
+
'fallbackModelsAssertedAt',
|
|
318
|
+
'helpArgs',
|
|
319
|
+
'capabilityFlags',
|
|
320
|
+
'fallbackBins',
|
|
321
|
+
'versionProbeTimeoutMs',
|
|
322
|
+
'maxPromptArgBytes',
|
|
323
|
+
'env',
|
|
324
|
+
'inactivityTimeoutMs',
|
|
325
|
+
'authProbe',
|
|
326
|
+
'needsAgentLogFile',
|
|
327
|
+
'stdoutPolicy',
|
|
328
|
+
'runtimeLock',
|
|
329
|
+
]);
|
|
310
330
|
}
|
|
311
331
|
/** Cache executable/version/help/auth per host and effective launch; only expired catalogs refresh.
|
|
312
332
|
* Explicit force queues after the current scan, so a rescan cannot overlap its predecessor.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
type StreamEvent = Record<string, unknown>;
|
|
2
2
|
type StreamEventHandler = (event: StreamEvent) => void;
|
|
3
|
-
type ParserKind = string;
|
|
4
3
|
export declare function createJsonEventStreamHandler({ kind, onEvent }: {
|
|
5
|
-
kind:
|
|
4
|
+
kind: string;
|
|
6
5
|
onEvent: StreamEventHandler;
|
|
7
6
|
}): {
|
|
8
7
|
feed: ({ chunk }: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @module json-event-stream
|
|
2
2
|
* Multi-CLI JSON event parsing with per-handler stream state. */
|
|
3
3
|
import { sanitizeUntrustedText } from '@jini-ai/core/text';
|
|
4
|
+
import { handleAntigravityEvent } from './defs/antigravity-event-stream.js';
|
|
4
5
|
function isRecord(value) {
|
|
5
6
|
return value != null && typeof value === 'object' && !Array.isArray(value);
|
|
6
7
|
}
|
|
@@ -418,7 +419,7 @@ function normalizeTodoStatus(value) {
|
|
|
418
419
|
const rule = TODO_STATUS_RULES.find((candidate) => candidate.exact.includes(status) || candidate.prefixes.some((prefix) => status.startsWith(prefix)));
|
|
419
420
|
return rule ? rule.status : 'pending';
|
|
420
421
|
}
|
|
421
|
-
/**
|
|
422
|
+
/** Text fields of a to-do item in precedence order; the first string-typed one wins, even when empty. */
|
|
422
423
|
const TODO_CONTENT_FIELDS = ['content', 'label', 'description', 'text'];
|
|
423
424
|
function todoFromItem(raw) {
|
|
424
425
|
if (!isRecord(raw))
|
|
@@ -519,11 +520,7 @@ function flushPendingArtifactText(state, onEvent) {
|
|
|
519
520
|
function isFileWriteToolUse(toolName, input) {
|
|
520
521
|
if (!isRecord(input))
|
|
521
522
|
return false;
|
|
522
|
-
const path =
|
|
523
|
-
? input.file_path
|
|
524
|
-
: typeof input.path === 'string'
|
|
525
|
-
? input.path
|
|
526
|
-
: '';
|
|
523
|
+
const path = [input.file_path, input.path].find((value) => typeof value === 'string') ?? '';
|
|
527
524
|
const writesFile = toolName === 'write_file' ||
|
|
528
525
|
toolName === 'write' ||
|
|
529
526
|
toolName === 'replace' ||
|
|
@@ -663,13 +660,15 @@ function handleCodexItemUpdated(item, onEvent, state) {
|
|
|
663
660
|
function completeCodexFileChange(item, onEvent, state) {
|
|
664
661
|
// Codex reports direct patches as file_change, rather than command_execution. Surface paths
|
|
665
662
|
// through the SAME native-tool event channel so audit sees edits without persisting patches.
|
|
666
|
-
if (
|
|
667
|
-
|
|
663
|
+
if (claimCodexToolUse(state, item.id))
|
|
664
|
+
emitCodexFileChange(item, onEvent);
|
|
665
|
+
return true;
|
|
666
|
+
}
|
|
667
|
+
function emitCodexFileChange(item, onEvent) {
|
|
668
668
|
const changes = Array.isArray(item.changes) ? item.changes : [];
|
|
669
669
|
onEvent({ type: 'tool_use', id: item.id, name: 'apply_patch',
|
|
670
670
|
input: { paths: changes.filter(isRecord).map(change => change.path).filter(path => typeof path === 'string') } });
|
|
671
671
|
onEvent({ type: 'tool_result', toolUseId: item.id, content: 'File change reported by Codex.', isError: item.status === 'failed' });
|
|
672
|
-
return true;
|
|
673
672
|
}
|
|
674
673
|
function completeCodexCommand(item, onEvent, state) {
|
|
675
674
|
resetCodexAgentMessageBoundary(state);
|
|
@@ -938,6 +937,7 @@ function emitModelReceipts(obj, onEvent) {
|
|
|
938
937
|
}
|
|
939
938
|
}
|
|
940
939
|
const PARSERS_BY_KIND = new Map([
|
|
940
|
+
['antigravity', (frame, emit, state) => handleAntigravityEvent({ frame, emit, state: state.antigravity })],
|
|
941
941
|
['opencode', handleOpenCodeEvent],
|
|
942
942
|
['legacy-google-stream-json', handleLegacyGoogleStreamEvent],
|
|
943
943
|
['kimi', handleKimiEvent],
|
|
@@ -947,6 +947,7 @@ const PARSERS_BY_KIND = new Map([
|
|
|
947
947
|
export function createJsonEventStreamHandler({ kind, onEvent }) {
|
|
948
948
|
let buffer = '';
|
|
949
949
|
const state = {
|
|
950
|
+
antigravity: { textEmitted: false, toolUses: new Set(), toolResults: new Set() },
|
|
950
951
|
cursorTextSoFar: '',
|
|
951
952
|
cursorTurnStart: 0,
|
|
952
953
|
openCodeToolUses: new Set(),
|