@jini-ai/agent-runtime 0.6.15-rc.1 → 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 +38 -47
- 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 +19 -45
- package/dist/types.d.ts +8 -27
- package/package.json +14 -8
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
function record(value) {
|
|
2
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value) ? value : {};
|
|
3
|
+
}
|
|
4
|
+
/** Native edits record paths, never patches or complete document contents. */
|
|
5
|
+
function nativeTool({ name, parameters }, _options = {}) {
|
|
6
|
+
if (name === 'run_command')
|
|
7
|
+
return { name: 'Bash', input: { command: parameters.CommandLine } };
|
|
8
|
+
if (name === 'write_to_file')
|
|
9
|
+
return { name: 'Write', input: { file_path: parameters.TargetFile } };
|
|
10
|
+
if (name === 'replace_file_content' || name === 'multi_replace_file_content') {
|
|
11
|
+
return { name: 'Edit', input: { file_path: parameters.TargetFile } };
|
|
12
|
+
}
|
|
13
|
+
return { name, input: parameters };
|
|
14
|
+
}
|
|
15
|
+
/** ACTIVE and DONE can describe the same call; a DONE-only receipt must also be audited. */
|
|
16
|
+
function toolStep({ step, emit, state }, _options = {}) {
|
|
17
|
+
if (typeof step.conversation_id !== 'string' || typeof step.step_index !== 'number')
|
|
18
|
+
return;
|
|
19
|
+
const info = record(step.tool_info);
|
|
20
|
+
const name = info.name ?? step.tool_name;
|
|
21
|
+
if (typeof name !== 'string')
|
|
22
|
+
return;
|
|
23
|
+
// A tool-name-only ACTIVE frame cannot supply the command/path yet; wait for its receipt.
|
|
24
|
+
if (info.parameters === undefined && step.state !== 'DONE')
|
|
25
|
+
return;
|
|
26
|
+
const id = `${step.conversation_id}:${step.step_index}`;
|
|
27
|
+
if (!state.toolUses.has(id)) {
|
|
28
|
+
state.toolUses.add(id);
|
|
29
|
+
emit({ type: 'tool_use', id, ...nativeTool({ name, parameters: record(info.parameters) }) });
|
|
30
|
+
}
|
|
31
|
+
toolResult({ step, info, id, emit, state });
|
|
32
|
+
}
|
|
33
|
+
function toolResult({ step, info, id, emit, state }, _options = {}) {
|
|
34
|
+
if (step.state !== 'DONE' || state.toolResults.has(id))
|
|
35
|
+
return;
|
|
36
|
+
state.toolResults.add(id);
|
|
37
|
+
const error = record(info.error);
|
|
38
|
+
const content = typeof error.message === 'string' ? error.message : info.output;
|
|
39
|
+
emit({ type: 'tool_result', toolUseId: id, content: typeof content === 'string' ? content : '',
|
|
40
|
+
isError: info.error !== undefined && info.error !== null });
|
|
41
|
+
}
|
|
42
|
+
function responseText({ text, emit, state }, _options = {}) {
|
|
43
|
+
if (typeof text !== 'string' || text.length === 0)
|
|
44
|
+
return;
|
|
45
|
+
state.textEmitted = true;
|
|
46
|
+
emit({ type: 'text_delta', delta: text });
|
|
47
|
+
}
|
|
48
|
+
/** The terminal response repeats streamed deltas. Errors must survive even on exit zero. */
|
|
49
|
+
function terminalResult({ result, emit, state }, _options = {}) {
|
|
50
|
+
if (!state.textEmitted)
|
|
51
|
+
responseText({ text: result.response, emit, state });
|
|
52
|
+
if (result.status !== 'SUCCESS') {
|
|
53
|
+
emit({ type: 'error', message: typeof result.error === 'string' ? result.error : 'Antigravity did not complete the turn.' });
|
|
54
|
+
}
|
|
55
|
+
if (result.usage !== undefined) {
|
|
56
|
+
const usage = record(result.usage);
|
|
57
|
+
emit({ type: 'usage', usage: { input_tokens: usage.input_tokens, output_tokens: usage.output_tokens,
|
|
58
|
+
thought_tokens: usage.thinking_tokens, cached_read_tokens: usage.cache_read_tokens } });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** Translate real tool receipts through the shared tool_use/tool_result audit channel.
|
|
62
|
+
* Pure except for the caller-owned parser state and event sink. O(1) per frame.
|
|
63
|
+
*/
|
|
64
|
+
export function handleAntigravityEvent({ frame, emit, state }, _options = {}) {
|
|
65
|
+
const obj = record(frame);
|
|
66
|
+
if (obj.event === 'init') {
|
|
67
|
+
emit({ type: 'status', label: 'initializing', model: record(obj.init).model });
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
if (obj.event === 'result') {
|
|
71
|
+
terminalResult({ result: record(obj.result), emit, state });
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
if (obj.event !== 'step_update')
|
|
75
|
+
return false;
|
|
76
|
+
const step = record(obj.step_update);
|
|
77
|
+
if (step.step_type === 'agent_response')
|
|
78
|
+
responseText({ text: step.text_delta, emit, state });
|
|
79
|
+
if (step.step_type === 'tool')
|
|
80
|
+
toolStep({ step, emit, state });
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=antigravity-event-stream.js.map
|
|
@@ -66,7 +66,11 @@ export declare const antigravityAgentDef: {
|
|
|
66
66
|
runtimeContext?: RuntimeContext;
|
|
67
67
|
} | undefined) => string[];
|
|
68
68
|
maxPromptArgBytes: number;
|
|
69
|
+
fullCliAccessOnly: true;
|
|
70
|
+
fullCliAccessNote: string;
|
|
69
71
|
streamFormat: string;
|
|
72
|
+
eventParser: string;
|
|
73
|
+
supportsNativeToolAccess: false;
|
|
70
74
|
needsAgentLogFile: true;
|
|
71
75
|
stdoutPolicy: {
|
|
72
76
|
buffering: "until-close";
|
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";
|