@jini-ai/agent-runtime 0.3.10 → 0.4.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/CHANGELOG.md +108 -0
- package/README.md +34 -17
- package/dist/acp-model-probe.d.ts +6 -4
- package/dist/acp-model-probe.js +3 -3
- package/dist/agent-protocol/acp/account-failure.d.ts +4 -2
- package/dist/agent-protocol/acp/account-failure.js +1 -1
- package/dist/agent-protocol/acp/json.d.ts +6 -6
- package/dist/agent-protocol/acp/json.js +3 -3
- package/dist/agent-protocol/acp/models.d.ts +10 -5
- package/dist/agent-protocol/acp/models.js +32 -31
- package/dist/agent-protocol/acp/session-params.d.ts +3 -1
- package/dist/agent-protocol/acp/session-params.js +2 -1
- package/dist/agent-protocol/acp/session.d.ts +28 -22
- package/dist/agent-protocol/acp/session.js +181 -147
- package/dist/agent-protocol/acp/text-suppression.d.ts +1 -1
- package/dist/agent-protocol/acp/text-suppression.js +1 -1
- package/dist/agent-protocol/acp/types.d.ts +3 -2
- package/dist/agent-protocol/acp/updates.d.ts +11 -11
- package/dist/agent-protocol/acp/updates.js +2 -2
- package/dist/agent-protocol/core/json-line-stream.d.ts +24 -8
- package/dist/agent-protocol/core/json-line-stream.js +8 -8
- package/dist/agent-protocol/pi-rpc/events.d.ts +5 -1
- package/dist/agent-protocol/pi-rpc/events.js +36 -36
- package/dist/agent-protocol/pi-rpc/internal.d.ts +4 -1
- package/dist/agent-protocol/pi-rpc/models.d.ts +3 -1
- package/dist/agent-protocol/pi-rpc/models.js +1 -1
- package/dist/agent-protocol/pi-rpc/session.d.ts +1 -1
- package/dist/agent-protocol/pi-rpc/session.js +33 -32
- package/dist/amr-model-cache.d.ts +12 -4
- package/dist/amr-model-cache.js +17 -21
- package/dist/amr-profile-resolver.d.ts +3 -1
- package/dist/anthropic-live-models.js +0 -0
- package/dist/artifact-taxonomy.d.ts +6 -2
- package/dist/auth.d.ts +52 -15
- package/dist/auth.js +36 -36
- package/dist/claude-code-models.js +2 -2
- package/dist/claude-stream.d.ts +22 -3
- package/dist/claude-stream.js +24 -8
- package/dist/copilot-stream.d.ts +7 -3
- package/dist/copilot-stream.js +3 -3
- package/dist/defs/aider.d.ts +8 -1
- package/dist/defs/aider.js +2 -2
- package/dist/defs/amp.d.ts +8 -1
- package/dist/defs/amp.js +2 -2
- package/dist/defs/amr.d.ts +22 -6
- package/dist/defs/amr.js +23 -23
- package/dist/defs/antigravity.d.ts +15 -4
- package/dist/defs/antigravity.js +9 -8
- package/dist/defs/auggie.d.ts +4 -1
- package/dist/defs/auggie.js +1 -1
- package/dist/defs/claude.d.ts +12 -2
- package/dist/defs/claude.js +5 -5
- package/dist/defs/cline.d.ts +4 -1
- package/dist/defs/cline.js +1 -1
- package/dist/defs/codebuddy.d.ts +8 -1
- package/dist/defs/codebuddy.js +2 -2
- package/dist/defs/codex.d.ts +18 -4
- package/dist/defs/codex.js +7 -7
- package/dist/defs/copilot.d.ts +8 -1
- package/dist/defs/copilot.js +2 -2
- package/dist/defs/crush.d.ts +8 -1
- package/dist/defs/crush.js +1 -1
- package/dist/defs/cursor-agent.d.ts +14 -3
- package/dist/defs/cursor-agent.js +5 -5
- package/dist/defs/deepseek.d.ts +8 -1
- package/dist/defs/deepseek.js +2 -2
- package/dist/defs/devin.d.ts +12 -2
- package/dist/defs/devin.js +3 -3
- package/dist/defs/droid.d.ts +8 -1
- package/dist/defs/droid.js +1 -1
- package/dist/defs/gemini.d.ts +8 -1
- package/dist/defs/gemini.js +1 -1
- package/dist/defs/goose.d.ts +4 -1
- package/dist/defs/goose.js +1 -1
- package/dist/defs/grok-build.d.ts +11 -2
- package/dist/defs/grok-build.js +3 -3
- package/dist/defs/hermes.d.ts +4 -1
- package/dist/defs/hermes.js +2 -2
- package/dist/defs/kilo.d.ts +4 -1
- package/dist/defs/kilo.js +2 -2
- package/dist/defs/kimi.d.ts +4 -1
- package/dist/defs/kimi.js +2 -2
- package/dist/defs/kiro.d.ts +4 -1
- package/dist/defs/kiro.js +2 -2
- package/dist/defs/mimo.d.ts +8 -1
- package/dist/defs/mimo.js +2 -2
- package/dist/defs/opencode.d.ts +9 -2
- package/dist/defs/opencode.js +2 -2
- package/dist/defs/pi.d.ts +12 -2
- package/dist/defs/pi.js +9 -9
- package/dist/defs/qoder.d.ts +8 -1
- package/dist/defs/qoder.js +2 -2
- package/dist/defs/qwen.d.ts +8 -1
- package/dist/defs/qwen.js +2 -2
- package/dist/defs/reasonix.d.ts +4 -1
- package/dist/defs/reasonix.js +3 -3
- package/dist/defs/shared.d.ts +4 -2
- package/dist/defs/shared.js +2 -2
- package/dist/defs/trae-cli.d.ts +12 -2
- package/dist/defs/trae-cli.js +3 -3
- package/dist/defs/vibe.d.ts +4 -1
- package/dist/defs/vibe.js +2 -2
- package/dist/detection.d.ts +19 -4
- package/dist/detection.js +33 -33
- package/dist/diagnostics.d.ts +14 -3
- package/dist/diagnostics.js +5 -5
- package/dist/env.d.ts +16 -4
- package/dist/env.js +7 -7
- package/dist/executables.d.ts +24 -8
- package/dist/executables.js +13 -13
- package/dist/index.d.ts +228 -4
- package/dist/index.js +230 -6
- package/dist/invocation.d.ts +6 -1
- package/dist/invocation.js +2 -2
- package/dist/json-event-stream.d.ts +7 -2
- package/dist/json-event-stream.js +3 -3
- package/dist/launch.d.ts +12 -2
- package/dist/launch.js +3 -3
- package/dist/log-file.d.ts +4 -1
- package/dist/log-file.js +2 -2
- package/dist/mcp.d.ts +6 -3
- package/dist/mcp.js +1 -1
- package/dist/metadata.d.ts +7 -3
- package/dist/metadata.js +1 -1
- package/dist/mmd-routes.d.ts +22 -6
- package/dist/mmd-routes.js +14 -14
- package/dist/model-catalog-cache.d.ts +50 -0
- package/dist/model-catalog-cache.js +61 -0
- package/dist/model-loading-state.d.ts +10 -0
- package/dist/model-loading-state.js +23 -0
- package/dist/model-registry.d.ts +28 -7
- package/dist/model-registry.js +11 -8
- package/dist/models.d.ts +31 -6
- package/dist/models.js +6 -6
- package/dist/opencode-log.d.ts +12 -4
- package/dist/opencode-log.js +8 -8
- package/dist/paths.d.ts +6 -2
- package/dist/paths.js +3 -3
- package/dist/pi-models.d.ts +3 -1
- package/dist/pi-models.js +2 -2
- package/dist/prompt-budget.d.ts +17 -4
- package/dist/prompt-budget.js +3 -3
- package/dist/prompt-file.d.ts +5 -1
- package/dist/prompt-file.js +1 -1
- package/dist/providers/aihubmix.d.ts +34 -9
- package/dist/providers/aihubmix.js +26 -26
- package/dist/providers/anthropic-messages.d.ts +77 -20
- package/dist/providers/anthropic-messages.js +53 -50
- package/dist/providers/azure-chat.d.ts +21 -7
- package/dist/providers/azure-chat.js +18 -16
- package/dist/providers/connection-guard.d.ts +45 -31
- package/dist/providers/connection-guard.js +40 -143
- package/dist/providers/connection-test.d.ts +1 -1
- package/dist/providers/connection-test.js +13 -30
- package/dist/providers/elevenlabs.d.ts +7 -2
- package/dist/providers/elevenlabs.js +4 -4
- package/dist/providers/google-messages.d.ts +44 -10
- package/dist/providers/google-messages.js +36 -34
- package/dist/providers/google-schema.d.ts +26 -0
- package/dist/providers/google-schema.js +253 -0
- package/dist/providers/google.d.ts +21 -6
- package/dist/providers/google.js +10 -10
- package/dist/providers/index.d.ts +3 -2
- package/dist/providers/index.js +3 -2
- package/dist/providers/model-catalog.d.ts +1 -1
- package/dist/providers/model-catalog.js +14 -27
- package/dist/providers/oauth-callback-server.d.ts +1 -1
- package/dist/providers/oauth-callback-server.js +3 -2
- package/dist/providers/oauth-credentials.d.ts +7 -1
- package/dist/providers/oauth-credentials.js +5 -5
- package/dist/providers/oauth-provider.d.ts +2 -2
- package/dist/providers/oauth-provider.js +20 -25
- package/dist/providers/oauth-tokens.d.ts +26 -6
- package/dist/providers/oauth-tokens.js +9 -9
- package/dist/providers/ollama-chat.d.ts +66 -31
- package/dist/providers/ollama-chat.js +64 -61
- package/dist/providers/openai-chat.d.ts +77 -22
- package/dist/providers/openai-chat.js +71 -67
- package/dist/providers/pkce.d.ts +33 -20
- package/dist/providers/pkce.js +75 -146
- package/dist/providers/sse-decode.d.ts +3 -1
- package/dist/providers/sse-decode.js +1 -1
- package/dist/providers/token-params.d.ts +16 -5
- package/dist/providers/token-params.js +6 -6
- package/dist/providers/tool-turn-types.d.ts +94 -0
- package/dist/providers/tool-turn-types.js +2 -0
- package/dist/providers/tool-turn.d.ts +10 -0
- package/dist/providers/tool-turn.js +258 -0
- package/dist/qoder-stream.d.ts +7 -3
- package/dist/qoder-stream.js +3 -3
- package/dist/registry.d.ts +6 -2
- package/dist/registry.js +4 -4
- package/dist/resolution.d.ts +5 -1
- package/dist/resolution.js +3 -3
- package/dist/role-marker-guard.d.ts +9 -5
- package/dist/role-marker-guard.js +5 -5
- package/dist/terminal-launch.d.ts +6 -1
- package/dist/terminal-launch.js +2 -2
- package/dist/types.d.ts +22 -6
- package/package.json +43 -4
package/dist/defs/amr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Ported from OD's `apps/daemon/src/runtimes/defs/amr.ts` (two de-branded comments; see `
|
|
1
|
+
/** Ported from OD's `apps/daemon/src/runtimes/defs/amr.ts` (two de-branded comments; see `archived provenance ledger`). */
|
|
2
2
|
import { execAgentFile } from './shared.js';
|
|
3
3
|
const AMR_MODELS_TIMEOUT_MS = 10_000;
|
|
4
4
|
const AMR_MODELS_RETRY_DELAYS_MS = [250, 750];
|
|
@@ -11,7 +11,7 @@ const PREFERRED_AMR_CHAT_MODEL_ORDER = [
|
|
|
11
11
|
const PREFERRED_AMR_CHAT_MODEL_RANK = new Map(PREFERRED_AMR_CHAT_MODEL_ORDER.map((id, index) => [id, index]));
|
|
12
12
|
// AMR is the vela CLI's ACP stdio mode. `vela agent run --runtime opencode`
|
|
13
13
|
// starts a private OpenCode server and forwards stream-json over ACP JSON-RPC.
|
|
14
|
-
// Required env (
|
|
14
|
+
// Required env (supplied by the host process environment):
|
|
15
15
|
// VELA_RUNTIME_KEY — OpenRouter (or compatible) API key
|
|
16
16
|
// VELA_LINK_URL — OpenAI-compatible endpoint, e.g. https://openrouter.ai/api/v1
|
|
17
17
|
// VELA_OPENCODE_BIN — optional; absolute path to opencode when not on PATH
|
|
@@ -30,7 +30,7 @@ const PREFERRED_AMR_CHAT_MODEL_RANK = new Map(PREFERRED_AMR_CHAT_MODEL_ORDER.map
|
|
|
30
30
|
// the link-facing slug (`deepseek-v3.2` / `glm-5.1`), so this adapter
|
|
31
31
|
// normalizes those public ids at the spawn boundary until Vela exposes
|
|
32
32
|
// canonical ACP ids directly.
|
|
33
|
-
export function normalizeVelaModelId(rawId) {
|
|
33
|
+
export function normalizeVelaModelId({ rawId }) {
|
|
34
34
|
const trimmed = rawId.trim();
|
|
35
35
|
if (!trimmed)
|
|
36
36
|
return null;
|
|
@@ -108,7 +108,7 @@ function isVelaChatModelId(modelId) {
|
|
|
108
108
|
return false;
|
|
109
109
|
return true;
|
|
110
110
|
}
|
|
111
|
-
export function parseVelaModels(stdout) {
|
|
111
|
+
export function parseVelaModels({ stdout }) {
|
|
112
112
|
const seen = new Set();
|
|
113
113
|
const models = [];
|
|
114
114
|
for (const line of String(stdout || '').split('\n')) {
|
|
@@ -118,7 +118,7 @@ export function parseVelaModels(stdout) {
|
|
|
118
118
|
// `trimmed` is already non-empty and has no leading whitespace (checked
|
|
119
119
|
// above), so its first whitespace-split token is always non-empty too.
|
|
120
120
|
const rawId = trimmed.split(/\s+/)[0];
|
|
121
|
-
const id = normalizeVelaModelId(rawId);
|
|
121
|
+
const id = normalizeVelaModelId({ rawId: rawId });
|
|
122
122
|
if (!id || seen.has(id) || !isVelaChatModelId(id))
|
|
123
123
|
continue;
|
|
124
124
|
seen.add(id);
|
|
@@ -126,7 +126,7 @@ export function parseVelaModels(stdout) {
|
|
|
126
126
|
}
|
|
127
127
|
return orderAmrChatModels(models);
|
|
128
128
|
}
|
|
129
|
-
export function parseVelaModelJson(stdout, expectedSource) {
|
|
129
|
+
export function parseVelaModelJson({ stdout, expectedSource }) {
|
|
130
130
|
let parsed;
|
|
131
131
|
try {
|
|
132
132
|
parsed = JSON.parse(stdout);
|
|
@@ -193,15 +193,15 @@ function isRetriableVelaModelsError(error) {
|
|
|
193
193
|
'504',
|
|
194
194
|
].some((pattern) => message.includes(pattern));
|
|
195
195
|
}
|
|
196
|
-
export async function fetchVelaPresetModels(resolvedBin, env) {
|
|
197
|
-
const { stdout } = await execAgentFile(resolvedBin, ['model', 'preset', '--format', 'json'], {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return parseVelaModelJson(String(stdout), 'preset');
|
|
196
|
+
export async function fetchVelaPresetModels({ resolvedBin, env }) {
|
|
197
|
+
const { stdout } = await execAgentFile({ command: resolvedBin, args: ['model', 'preset', '--format', 'json'] }, { options: {
|
|
198
|
+
env,
|
|
199
|
+
timeout: AMR_MODELS_TIMEOUT_MS,
|
|
200
|
+
maxBuffer: 1024 * 1024,
|
|
201
|
+
} });
|
|
202
|
+
return parseVelaModelJson({ stdout: String(stdout), expectedSource: 'preset' });
|
|
203
203
|
}
|
|
204
|
-
export async function fetchVelaRemoteModelsWithRetry(resolvedBin, env) {
|
|
204
|
+
export async function fetchVelaRemoteModelsWithRetry({ resolvedBin, env }) {
|
|
205
205
|
// The internal exhaustion check below (`attempt === AMR_MODELS_RETRY_DELAYS_MS.length`)
|
|
206
206
|
// always throws on the last allowed attempt — strictly before the `for`
|
|
207
207
|
// condition itself would ever end the loop — so there's no way to fall
|
|
@@ -222,16 +222,16 @@ export async function fetchVelaRemoteModelsWithRetry(resolvedBin, env) {
|
|
|
222
222
|
// below) can never execute — v8/istanbul still instruments it because
|
|
223
223
|
// it can't prove an arbitrary `for(;;)` terminates, but the real control
|
|
224
224
|
// flow genuinely never reaches it. Documented here (and in
|
|
225
|
-
// `
|
|
225
|
+
// `archived provenance ledger`'s 2026-07-22 entry) instead of forced via a test,
|
|
226
226
|
// per this repo's no-`/* v8 ignore */` standard.
|
|
227
227
|
for (let attempt = 0;; attempt += 1) {
|
|
228
228
|
try {
|
|
229
|
-
const { stdout } = await execAgentFile(resolvedBin, ['model', 'list', '--format', 'json'], {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
return parseVelaModelJson(String(stdout), 'remote');
|
|
229
|
+
const { stdout } = await execAgentFile({ command: resolvedBin, args: ['model', 'list', '--format', 'json'] }, { options: {
|
|
230
|
+
env,
|
|
231
|
+
timeout: AMR_MODELS_TIMEOUT_MS,
|
|
232
|
+
maxBuffer: 1024 * 1024,
|
|
233
|
+
} });
|
|
234
|
+
return parseVelaModelJson({ stdout: String(stdout), expectedSource: 'remote' });
|
|
235
235
|
}
|
|
236
236
|
catch (error) {
|
|
237
237
|
if (attempt === AMR_MODELS_RETRY_DELAYS_MS.length ||
|
|
@@ -248,8 +248,8 @@ export async function fetchVelaRemoteModelsWithRetry(resolvedBin, env) {
|
|
|
248
248
|
* contract rather than a separate HTTP call. Returns total available balance
|
|
249
249
|
* and the real membership tier.
|
|
250
250
|
*/
|
|
251
|
-
export async function fetchVelaBillingSummary(resolvedBin, env) {
|
|
252
|
-
const { stdout } = await execAgentFile(resolvedBin, ['billing', 'summary', '--format', 'json'], { env, timeout: AMR_MODELS_TIMEOUT_MS, maxBuffer: 1024 * 1024 });
|
|
251
|
+
export async function fetchVelaBillingSummary({ resolvedBin, env }) {
|
|
252
|
+
const { stdout } = await execAgentFile({ command: resolvedBin, args: ['billing', 'summary', '--format', 'json'] }, { options: { env, timeout: AMR_MODELS_TIMEOUT_MS, maxBuffer: 1024 * 1024 } });
|
|
253
253
|
const data = JSON.parse(String(stdout));
|
|
254
254
|
// Use `balanceUsd` — the same field the console wallet page renders as the
|
|
255
255
|
// headline "余额" — so the two surfaces always agree. Fall back to the total
|
|
@@ -8,14 +8,16 @@ import type { RuntimeModelOption } from '../types.js';
|
|
|
8
8
|
* already has an owner — `auth.ts`'s `classifyAgentAuthFailure` /
|
|
9
9
|
* `isAntigravityAuthFailureText`, consumed by whatever surfaces a structured
|
|
10
10
|
* auth error — and duplicating the decision here would mean this def silently
|
|
11
|
-
* rewrites assistant text into instructions. See `
|
|
11
|
+
* rewrites assistant text into instructions. See `archived provenance ledger`.
|
|
12
12
|
*
|
|
13
13
|
* @param fullText - The concatenation of every stdout chunk agy produced.
|
|
14
14
|
* @returns The same text with every sign-in URL replaced by a placeholder.
|
|
15
15
|
* @complexity O(n) in the buffered text length.
|
|
16
16
|
* @overallScore 100/100
|
|
17
17
|
*/
|
|
18
|
-
export declare function redactAntigravityAuthUrls(fullText
|
|
18
|
+
export declare function redactAntigravityAuthUrls({ fullText }: {
|
|
19
|
+
fullText: string;
|
|
20
|
+
}): string;
|
|
19
21
|
/**
|
|
20
22
|
* Parses `agy models`' stdout into the shared `RuntimeModelOption[]` shape.
|
|
21
23
|
*
|
|
@@ -33,7 +35,9 @@ export declare function redactAntigravityAuthUrls(fullText: string): string;
|
|
|
33
35
|
* as an empty array: fall back to `fallbackModels`.
|
|
34
36
|
* @complexity O(n) in the stdout length.
|
|
35
37
|
*/
|
|
36
|
-
export declare function parseAgyModels(stdout
|
|
38
|
+
export declare function parseAgyModels({ stdout }: {
|
|
39
|
+
stdout: string;
|
|
40
|
+
}): RuntimeModelOption[] | null;
|
|
37
41
|
export declare const antigravityAgentDef: {
|
|
38
42
|
id: string;
|
|
39
43
|
name: string;
|
|
@@ -52,7 +56,14 @@ export declare const antigravityAgentDef: {
|
|
|
52
56
|
label: string;
|
|
53
57
|
}[];
|
|
54
58
|
};
|
|
55
|
-
buildArgs: (prompt
|
|
59
|
+
buildArgs: ({ prompt, imagePaths: _imagePaths }: {
|
|
60
|
+
prompt: string;
|
|
61
|
+
imagePaths: string[];
|
|
62
|
+
}, { extraAllowedDirs: _extra, options, runtimeContext }?: {
|
|
63
|
+
extraAllowedDirs?: string[];
|
|
64
|
+
options?: import("../types.js").RuntimeBuildOptions;
|
|
65
|
+
runtimeContext?: import("../types.js").RuntimeContext;
|
|
66
|
+
} | undefined) => string[];
|
|
56
67
|
maxPromptArgBytes: number;
|
|
57
68
|
streamFormat: string;
|
|
58
69
|
needsAgentLogFile: true;
|
package/dist/defs/antigravity.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/antigravity.ts` (import path adjusted only). See `
|
|
1
|
+
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/antigravity.ts` (import path adjusted only). See `archived provenance ledger`. */
|
|
2
|
+
import { redactOAuthUrls } from '@jini-ai/oauth';
|
|
2
3
|
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
3
4
|
// `agy` v1.1.24 has a real `--model <id>` flag (`agy --help`: "Model for the current CLI
|
|
4
5
|
// session") plus a machine-readable `agy models` subcommand that lists every selectable model as
|
|
@@ -68,15 +69,15 @@ const OAUTH_URL_PLACEHOLDER = '[redacted sign-in URL]';
|
|
|
68
69
|
* already has an owner — `auth.ts`'s `classifyAgentAuthFailure` /
|
|
69
70
|
* `isAntigravityAuthFailureText`, consumed by whatever surfaces a structured
|
|
70
71
|
* auth error — and duplicating the decision here would mean this def silently
|
|
71
|
-
* rewrites assistant text into instructions. See `
|
|
72
|
+
* rewrites assistant text into instructions. See `archived provenance ledger`.
|
|
72
73
|
*
|
|
73
74
|
* @param fullText - The concatenation of every stdout chunk agy produced.
|
|
74
75
|
* @returns The same text with every sign-in URL replaced by a placeholder.
|
|
75
76
|
* @complexity O(n) in the buffered text length.
|
|
76
77
|
* @overallScore 100/100
|
|
77
78
|
*/
|
|
78
|
-
export function redactAntigravityAuthUrls(fullText) {
|
|
79
|
-
return fullText
|
|
79
|
+
export function redactAntigravityAuthUrls({ fullText }) {
|
|
80
|
+
return redactOAuthUrls({ text: fullText, pattern: OAUTH_URL_PATTERN, replacement: OAUTH_URL_PLACEHOLDER });
|
|
80
81
|
}
|
|
81
82
|
/**
|
|
82
83
|
* Parses `agy models`' stdout into the shared `RuntimeModelOption[]` shape.
|
|
@@ -95,7 +96,7 @@ export function redactAntigravityAuthUrls(fullText) {
|
|
|
95
96
|
* as an empty array: fall back to `fallbackModels`.
|
|
96
97
|
* @complexity O(n) in the stdout length.
|
|
97
98
|
*/
|
|
98
|
-
export function parseAgyModels(stdout) {
|
|
99
|
+
export function parseAgyModels({ stdout }) {
|
|
99
100
|
const lines = String(stdout || '')
|
|
100
101
|
.split('\n')
|
|
101
102
|
.map((line) => line.trim())
|
|
@@ -184,7 +185,7 @@ export const antigravityAgentDef = {
|
|
|
184
185
|
// apps/web/src/providers/daemon.ts). The stronger OVERRIDE block
|
|
185
186
|
// composed in server.ts gives a second line of defense for weak
|
|
186
187
|
// plain-stream models like Gemini 3.5 Flash.
|
|
187
|
-
buildArgs: (prompt, _imagePaths, _extra = [], options = {}, runtimeContext = {}) => {
|
|
188
|
+
buildArgs: ({ prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra = [], options = {}, runtimeContext = {} } = {}) => {
|
|
188
189
|
// `-p` is a Go `flag`-package flag that TAKES THE PROMPT AS ITS VALUE,
|
|
189
190
|
// not a boolean switch followed by a positional prompt, and agy has no
|
|
190
191
|
// stdin sentinel under the default `--input-format text`. Verified
|
|
@@ -251,12 +252,12 @@ export const antigravityAgentDef = {
|
|
|
251
252
|
//
|
|
252
253
|
// - Proven with a probe MCP server registered under a relocated `HOME`'s
|
|
253
254
|
// `.gemini/config/mcp_config.json`: booted under `agy -p`, it read a marker variable
|
|
254
|
-
//
|
|
255
|
+
// straight out of its own `process.env` — no config field, no
|
|
255
256
|
// argv, nothing but inherited environment. Full MCP handshake observed on the same run:
|
|
256
257
|
// `server/discover` → `initialize` → `notifications/initialized` → `tools/list`
|
|
257
258
|
// (protocolVersion `2025-11-25`, clientInfo `antigravity-client`).
|
|
258
259
|
// - That makes the registration itself a STATIC, one-time operation — the operator adds one
|
|
259
|
-
//
|
|
260
|
+
// bridge entry to their real `~/.gemini/config/mcp_config.json` (confirmed still the one real
|
|
260
261
|
// mechanism; see the probes below) with a bare, env-free `command` pointing at this package's
|
|
261
262
|
// own `jini-mcp` bin, resolving its credential from the environment at spawn time instead of
|
|
262
263
|
// a baked-in value. No per-spawn config mutation, no lock, no restore discipline — the exact
|
package/dist/defs/auggie.d.ts
CHANGED
|
@@ -3,7 +3,10 @@ export declare const auggieAgentDef: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
|
-
fetchModels: (resolvedBin
|
|
6
|
+
fetchModels: ({ resolvedBin, env }: {
|
|
7
|
+
resolvedBin: string;
|
|
8
|
+
env: import("../types.js").RuntimeEnv;
|
|
9
|
+
}) => Promise<import("../types.js").RuntimeModelOption[]>;
|
|
7
10
|
fallbackModels: import("../types.js").RuntimeModelOption[];
|
|
8
11
|
buildArgs: () => string[];
|
|
9
12
|
streamFormat: string;
|
package/dist/defs/auggie.js
CHANGED
|
@@ -12,7 +12,7 @@ export const auggieAgentDef = {
|
|
|
12
12
|
name: 'Auggie CLI',
|
|
13
13
|
bin: 'auggie',
|
|
14
14
|
versionArgs: ['--version'],
|
|
15
|
-
fetchModels: async (resolvedBin, env) => detectAcpModels({
|
|
15
|
+
fetchModels: async ({ resolvedBin, env }) => (({ bin, args, ...optionalArgs }) => detectAcpModels({ bin, args }, optionalArgs))({
|
|
16
16
|
bin: resolvedBin,
|
|
17
17
|
args: ['--acp'],
|
|
18
18
|
env,
|
package/dist/defs/claude.d.ts
CHANGED
|
@@ -18,12 +18,22 @@ export declare const claudeAgentDef: {
|
|
|
18
18
|
};
|
|
19
19
|
fallbackModels: import("../types.js").RuntimeModelOption[];
|
|
20
20
|
fallbackModelsAssertedAt: string;
|
|
21
|
-
fetchModels: (resolvedBin
|
|
21
|
+
fetchModels: ({ resolvedBin, env }: {
|
|
22
|
+
resolvedBin: string;
|
|
23
|
+
env: import("../types.js").RuntimeEnv;
|
|
24
|
+
}) => Promise<import("../types.js").RuntimeModelOption[] | null>;
|
|
22
25
|
reasoningOptions: {
|
|
23
26
|
id: string;
|
|
24
27
|
label: string;
|
|
25
28
|
}[];
|
|
26
|
-
buildArgs: (
|
|
29
|
+
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
30
|
+
prompt: string;
|
|
31
|
+
imagePaths: string[];
|
|
32
|
+
}, { extraAllowedDirs, options, runtimeContext }?: {
|
|
33
|
+
extraAllowedDirs?: string[];
|
|
34
|
+
options?: import("../types.js").RuntimeBuildOptions;
|
|
35
|
+
runtimeContext?: import("../types.js").RuntimeContext;
|
|
36
|
+
} | undefined) => string[];
|
|
27
37
|
promptViaStdin: true;
|
|
28
38
|
promptInputFormat: "stream-json";
|
|
29
39
|
streamFormat: string;
|
package/dist/defs/claude.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Ported verbatim from OD's `apps/daemon/src/runtimes/defs/claude.ts` (import
|
|
3
|
-
* path adjusted only). See `
|
|
3
|
+
* path adjusted only). See `archived provenance ledger`.
|
|
4
4
|
*
|
|
5
5
|
* **Image delivery (added 2026-08-03):** `buildArgs` below takes an
|
|
6
6
|
* `_imagePaths` parameter but never references it — the Claude Code CLI has
|
|
@@ -132,8 +132,8 @@ export const claudeAgentDef = {
|
|
|
132
132
|
// `~/.claude.json`'s server-fetched `additionalModelOptionsCache`. See
|
|
133
133
|
// `RuntimeAgentDef.fallbackModelsAssertedAt` and `scripts/check-model-fallback-freshness.ts`.
|
|
134
134
|
fallbackModelsAssertedAt: '2026-09-05',
|
|
135
|
-
fetchModels: async (resolvedBin, env) => {
|
|
136
|
-
const routed = await loadMmdRouteModels(env, CLAUDE_FALLBACK_MODELS);
|
|
135
|
+
fetchModels: async ({ resolvedBin, env }) => {
|
|
136
|
+
const routed = await loadMmdRouteModels({ env: env, fallbackModels: CLAUDE_FALLBACK_MODELS });
|
|
137
137
|
if (routed)
|
|
138
138
|
return routed;
|
|
139
139
|
const [fromCli, fromApi] = await Promise.all([
|
|
@@ -166,7 +166,7 @@ export const claudeAgentDef = {
|
|
|
166
166
|
// prompt reads the prompt from stdin under `--input-format text` (the
|
|
167
167
|
// default), which has no length cap. Mirrors the codex/gemini/opencode/
|
|
168
168
|
// cursor/qwen entries below.
|
|
169
|
-
buildArgs: (_prompt, _imagePaths, extraAllowedDirs = [], options = {}, runtimeContext = {}) => {
|
|
169
|
+
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs = [], options = {}, runtimeContext = {} } = {}) => {
|
|
170
170
|
const caps = agentCapabilities.get('claude') || {};
|
|
171
171
|
// `--input-format stream-json` lets the daemon stream multiple JSONL
|
|
172
172
|
// messages into stdin instead of closing it after the initial prompt,
|
|
@@ -260,7 +260,7 @@ export const claudeAgentDef = {
|
|
|
260
260
|
// Load MCP tools up front instead of deferring them behind the CLI's ToolSearch tool.
|
|
261
261
|
// Deferral cost every run one extra model round (a `select:` ToolSearch call, ~3 s) before its
|
|
262
262
|
// first real tool call, while the run's MCP set is only what the daemon stages
|
|
263
|
-
// (`--strict-mcp-config`; 11 tools for the
|
|
263
|
+
// (`--strict-mcp-config`; 11 tools for the originating host), so loading it eagerly is cheap. Documented at
|
|
264
264
|
// code.claude.com/docs/en/mcp ("`false` — All MCP tools loaded upfront, no deferral"); verified
|
|
265
265
|
// in the installed 2.1.283 binary (a defined-falsy value selects the "standard" tool mode).
|
|
266
266
|
// A default only: a run's own env can still set ENABLE_TOOL_SEARCH (see agent-executor).
|
package/dist/defs/cline.d.ts
CHANGED
|
@@ -3,7 +3,10 @@ export declare const clineAgentDef: {
|
|
|
3
3
|
name: string;
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
|
-
fetchModels: (resolvedBin
|
|
6
|
+
fetchModels: ({ resolvedBin, env }: {
|
|
7
|
+
resolvedBin: string;
|
|
8
|
+
env: import("../types.js").RuntimeEnv;
|
|
9
|
+
}) => Promise<import("../types.js").RuntimeModelOption[]>;
|
|
7
10
|
fallbackModels: import("../types.js").RuntimeModelOption[];
|
|
8
11
|
buildArgs: () => string[];
|
|
9
12
|
streamFormat: string;
|
package/dist/defs/cline.js
CHANGED
|
@@ -14,7 +14,7 @@ export const clineAgentDef = {
|
|
|
14
14
|
name: 'Cline',
|
|
15
15
|
bin: 'cline',
|
|
16
16
|
versionArgs: ['--version'],
|
|
17
|
-
fetchModels: async (resolvedBin, env) => detectAcpModels({
|
|
17
|
+
fetchModels: async ({ resolvedBin, env }) => (({ bin, args, ...optionalArgs }) => detectAcpModels({ bin, args }, optionalArgs))({
|
|
18
18
|
bin: resolvedBin,
|
|
19
19
|
args: ['--acp'],
|
|
20
20
|
env,
|
package/dist/defs/codebuddy.d.ts
CHANGED
|
@@ -14,7 +14,14 @@ export declare const codebuddyAgentDef: {
|
|
|
14
14
|
id: string;
|
|
15
15
|
label: string;
|
|
16
16
|
}[];
|
|
17
|
-
buildArgs: (
|
|
17
|
+
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
18
|
+
prompt: string;
|
|
19
|
+
imagePaths: string[];
|
|
20
|
+
}, { extraAllowedDirs, options, runtimeContext }?: {
|
|
21
|
+
extraAllowedDirs?: string[];
|
|
22
|
+
options?: import("../types.js").RuntimeBuildOptions;
|
|
23
|
+
runtimeContext?: import("../types.js").RuntimeContext;
|
|
24
|
+
} | undefined) => string[];
|
|
18
25
|
promptViaStdin: true;
|
|
19
26
|
promptInputFormat: "stream-json";
|
|
20
27
|
streamFormat: string;
|
package/dist/defs/codebuddy.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/codebuddy.ts` (import path adjusted only). See `
|
|
1
|
+
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/codebuddy.ts` (import path adjusted only). See `archived provenance ledger`. */
|
|
2
2
|
import { agentCapabilities } from '../capabilities.js';
|
|
3
3
|
import { buildClaudeMcpConfigArgs, DEFAULT_MODEL_OPTION } from './shared.js';
|
|
4
4
|
// Codebuddy Code (https://www.codebuddy.cn) — a Claude Code–compatible CLI
|
|
@@ -76,7 +76,7 @@ export const codebuddyAgentDef = {
|
|
|
76
76
|
{ id: 'xhigh', label: 'XHigh' },
|
|
77
77
|
{ id: 'max', label: 'Max' },
|
|
78
78
|
],
|
|
79
|
-
buildArgs: (_prompt, _imagePaths, extraAllowedDirs = [], options = {}, runtimeContext = {}) => {
|
|
79
|
+
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs = [], options = {}, runtimeContext = {} } = {}) => {
|
|
80
80
|
const caps = agentCapabilities.get('codebuddy') || {};
|
|
81
81
|
// Same stdin strategy as Claude Code: `--input-format stream-json`
|
|
82
82
|
// enables JSONL stdin so the daemon can answer AskUserQuestion tool
|
package/dist/defs/codex.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { RuntimeModelOption, RuntimeReasoningOption } from '../types.js';
|
|
2
|
-
export declare function parseCodexDebugModels(stdout
|
|
2
|
+
export declare function parseCodexDebugModels({ stdout }: {
|
|
3
|
+
stdout: string;
|
|
4
|
+
}): RuntimeModelOption[] | null;
|
|
3
5
|
/**
|
|
4
6
|
* Collapses the per-model effort levels on a fetched model list into the single agent-level list a
|
|
5
7
|
* picker renders, in first-seen catalog order, behind the `default` sentinel.
|
|
@@ -16,8 +18,13 @@ export declare function parseCodexDebugModels(stdout: string): RuntimeModelOptio
|
|
|
16
18
|
* static list rather than replace it with an empty one.
|
|
17
19
|
* @complexity O(n·m) over n models and their m levels.
|
|
18
20
|
*/
|
|
19
|
-
export declare function unionModelReasoningOptions(models
|
|
20
|
-
|
|
21
|
+
export declare function unionModelReasoningOptions({ models }: {
|
|
22
|
+
models: readonly RuntimeModelOption[];
|
|
23
|
+
}): RuntimeReasoningOption[] | null;
|
|
24
|
+
export declare function codexNeedsDangerFullAccessSandbox({}: {}, { platform, env }?: {
|
|
25
|
+
platform?: NodeJS.Platform;
|
|
26
|
+
env?: NodeJS.ProcessEnv;
|
|
27
|
+
}): boolean;
|
|
21
28
|
export declare const codexAgentDef: {
|
|
22
29
|
id: string;
|
|
23
30
|
name: string;
|
|
@@ -39,7 +46,14 @@ export declare const codexAgentDef: {
|
|
|
39
46
|
label: string;
|
|
40
47
|
}[];
|
|
41
48
|
deriveReasoningOptions: typeof unionModelReasoningOptions;
|
|
42
|
-
buildArgs: (
|
|
49
|
+
buildArgs: ({ prompt: _prompt, imagePaths }: {
|
|
50
|
+
prompt: string;
|
|
51
|
+
imagePaths: string[];
|
|
52
|
+
}, { extraAllowedDirs, options, runtimeContext }?: {
|
|
53
|
+
extraAllowedDirs?: string[];
|
|
54
|
+
options?: import("../types.js").RuntimeBuildOptions;
|
|
55
|
+
runtimeContext?: import("../types.js").RuntimeContext;
|
|
56
|
+
} | undefined) => string[];
|
|
43
57
|
promptViaStdin: true;
|
|
44
58
|
resumesSessionViaCli: true;
|
|
45
59
|
capturesSessionIdFromStream: true;
|
package/dist/defs/codex.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* product-prefixed) are renamed to `CODEX_SANDBOX_MODE` /
|
|
5
5
|
* `CODEX_DISABLE_PLUGINS` — these are already codex-adapter-scoped
|
|
6
6
|
* operator knobs, so no product namespacing is needed. See
|
|
7
|
-
* `
|
|
7
|
+
* `archived provenance ledger` for the exact original names.
|
|
8
8
|
*/
|
|
9
9
|
import { DEFAULT_MODEL_OPTION, clampCodexReasoning } from './shared.js';
|
|
10
10
|
/**
|
|
@@ -125,7 +125,7 @@ function codexCatalogRow(raw, takenIds) {
|
|
|
125
125
|
const reasoning = parseCodexEntryReasoning(entry.supported_reasoning_levels);
|
|
126
126
|
return { id, label: codexEntryLabel(entry, id), ...(reasoning ? { reasoning } : {}) };
|
|
127
127
|
}
|
|
128
|
-
export function parseCodexDebugModels(stdout) {
|
|
128
|
+
export function parseCodexDebugModels({ stdout }) {
|
|
129
129
|
const models = readCodexCatalogEntries(stdout);
|
|
130
130
|
if (!models)
|
|
131
131
|
return null;
|
|
@@ -156,7 +156,7 @@ export function parseCodexDebugModels(stdout) {
|
|
|
156
156
|
* static list rather than replace it with an empty one.
|
|
157
157
|
* @complexity O(n·m) over n models and their m levels.
|
|
158
158
|
*/
|
|
159
|
-
export function unionModelReasoningOptions(models) {
|
|
159
|
+
export function unionModelReasoningOptions({ models }) {
|
|
160
160
|
const seen = new Set();
|
|
161
161
|
const out = [];
|
|
162
162
|
for (const model of models) {
|
|
@@ -169,7 +169,7 @@ export function unionModelReasoningOptions(models) {
|
|
|
169
169
|
}
|
|
170
170
|
return out.length > 0 ? [{ id: 'default', label: 'Default' }, ...out] : null;
|
|
171
171
|
}
|
|
172
|
-
export function codexNeedsDangerFullAccessSandbox(platform = process.platform, env = process.env) {
|
|
172
|
+
export function codexNeedsDangerFullAccessSandbox({}, { platform = process.platform, env = process.env } = {}) {
|
|
173
173
|
// Operator override for deployments where Codex cannot create its
|
|
174
174
|
// workspace-write sandbox, for example unprivileged Linux containers.
|
|
175
175
|
// Only danger-full-access is accepted; unknown values keep the default path.
|
|
@@ -251,14 +251,14 @@ export const codexAgentDef = {
|
|
|
251
251
|
// `error: unexpected argument '-' found` and the agent exits with
|
|
252
252
|
// code 2 before any prompt is read. The pipe alone is sufficient for
|
|
253
253
|
// stdin delivery.
|
|
254
|
-
buildArgs: (_prompt, imagePaths, extraAllowedDirs = [], options = {}, runtimeContext = {}) => {
|
|
254
|
+
buildArgs: ({ prompt: _prompt, imagePaths }, { extraAllowedDirs = [], options = {}, runtimeContext = {} } = {}) => {
|
|
255
255
|
// Codex CLI's `workspace-write` sandbox blocks shell invocations on
|
|
256
256
|
// Windows ("powershell.exe ... rejected: blocked by policy"),
|
|
257
257
|
// because Codex has no working OS-level sandbox on Windows and falls
|
|
258
258
|
// back to a coarse policy that rejects any shell. macOS (Seatbelt)
|
|
259
259
|
// and Linux (Landlock+seccomp) keep workspace-write because their
|
|
260
260
|
// sandbox enforcement permits shell while restricting writes.
|
|
261
|
-
const needsDangerFullAccess = codexNeedsDangerFullAccessSandbox();
|
|
261
|
+
const needsDangerFullAccess = codexNeedsDangerFullAccessSandbox({});
|
|
262
262
|
// Capture-style resume: when the caller has a stored Codex thread id
|
|
263
263
|
// for this conversation it asks the CLI to continue that session
|
|
264
264
|
// with `exec resume <thread_id>` instead of `exec` (a fresh
|
|
@@ -399,7 +399,7 @@ export const codexAgentDef = {
|
|
|
399
399
|
// that keeps the operator's real config untouched by routine daemon spawns.
|
|
400
400
|
//
|
|
401
401
|
// See `@jini-ai/daemon`'s `agent-executor.ts` (`prepareCodexHomeForRun`, `buildCodexHomeConfigToml`)
|
|
402
|
-
// for the staging/cleanup implementation and `
|
|
402
|
+
// for the staging/cleanup implementation and `archived provenance ledger` for the full verification transcript.
|
|
403
403
|
externalMcpInjection: 'codex-toml',
|
|
404
404
|
};
|
|
405
405
|
//# sourceMappingURL=codex.js.map
|
package/dist/defs/copilot.d.ts
CHANGED
|
@@ -4,7 +4,14 @@ export declare const copilotAgentDef: {
|
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
6
|
fallbackModels: import("../types.js").RuntimeModelOption[];
|
|
7
|
-
buildArgs: (
|
|
7
|
+
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
8
|
+
prompt: string;
|
|
9
|
+
imagePaths: string[];
|
|
10
|
+
}, { extraAllowedDirs, options }?: {
|
|
11
|
+
extraAllowedDirs?: string[];
|
|
12
|
+
options?: import("../types.js").RuntimeBuildOptions;
|
|
13
|
+
runtimeContext?: import("../types.js").RuntimeContext;
|
|
14
|
+
} | undefined) => string[];
|
|
8
15
|
promptViaStdin: true;
|
|
9
16
|
streamFormat: string;
|
|
10
17
|
inactivityTimeoutMs: number;
|
package/dist/defs/copilot.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* product-prefixed operator-override env var name replaced with generic
|
|
6
6
|
* phrasing (this package's `types.ts` already documents
|
|
7
7
|
* `inactivityTimeoutMs` as "callers may still allow an operator override
|
|
8
|
-
* via their own env var"). See `
|
|
8
|
+
* via their own env var"). See `archived provenance ledger` for the exact original
|
|
9
9
|
* wording.
|
|
10
10
|
*/
|
|
11
11
|
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
@@ -57,7 +57,7 @@ export const copilotAgentDef = {
|
|
|
57
57
|
{ id: 'claude-sonnet-4.6', label: 'Claude Sonnet 4.6' },
|
|
58
58
|
{ id: 'gpt-5.2', label: 'GPT-5.2' },
|
|
59
59
|
],
|
|
60
|
-
buildArgs: (_prompt, _imagePaths, extraAllowedDirs = [], options = {}) => {
|
|
60
|
+
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs = [], options = {} } = {}) => {
|
|
61
61
|
const args = [
|
|
62
62
|
// See `RuntimeBuildOptions.permissionMode`'s doc: bypass is the default (unchanged
|
|
63
63
|
// behavior) unless a caller explicitly opts into a restricted run, in which case
|
package/dist/defs/crush.d.ts
CHANGED
|
@@ -4,7 +4,14 @@ export declare const crushAgentDef: {
|
|
|
4
4
|
bin: string;
|
|
5
5
|
versionArgs: string[];
|
|
6
6
|
fallbackModels: import("../types.js").RuntimeModelOption[];
|
|
7
|
-
buildArgs: (
|
|
7
|
+
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
8
|
+
prompt: string;
|
|
9
|
+
imagePaths: string[];
|
|
10
|
+
}, { extraAllowedDirs: _extra, options }?: {
|
|
11
|
+
extraAllowedDirs?: string[];
|
|
12
|
+
options?: import("../types.js").RuntimeBuildOptions;
|
|
13
|
+
runtimeContext?: import("../types.js").RuntimeContext;
|
|
14
|
+
} | undefined) => string[];
|
|
8
15
|
promptViaStdin: true;
|
|
9
16
|
streamFormat: string;
|
|
10
17
|
};
|
package/dist/defs/crush.js
CHANGED
|
@@ -19,7 +19,7 @@ export const crushAgentDef = {
|
|
|
19
19
|
// Models come from the providers the user configured in Crush; there is no stable default
|
|
20
20
|
// list to ship, so the picker offers the CLI default and accepts any typed id.
|
|
21
21
|
fallbackModels: [DEFAULT_MODEL_OPTION],
|
|
22
|
-
buildArgs: (_prompt, _imagePaths, _extra, options = {}) => {
|
|
22
|
+
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra, options = {} } = {}) => {
|
|
23
23
|
const args = ['run', '--quiet'];
|
|
24
24
|
// See `RuntimeBuildOptions.permissionMode`'s doc: bypass is the default (unchanged
|
|
25
25
|
// behavior) unless a caller explicitly opts into a restricted run.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { RuntimeModelOption } from '../types.js';
|
|
2
|
-
export declare function parseCursorAgentModels(stdout
|
|
2
|
+
export declare function parseCursorAgentModels({ stdout }: {
|
|
3
|
+
stdout: string;
|
|
4
|
+
}): RuntimeModelOption[] | null;
|
|
3
5
|
export declare const cursorAgentDef: {
|
|
4
6
|
id: string;
|
|
5
7
|
name: string;
|
|
@@ -12,10 +14,19 @@ export declare const cursorAgentDef: {
|
|
|
12
14
|
listModels: {
|
|
13
15
|
args: string[];
|
|
14
16
|
timeoutMs: number;
|
|
15
|
-
parse: (stdout:
|
|
17
|
+
parse: ({ stdout }: {
|
|
18
|
+
stdout: string;
|
|
19
|
+
}) => RuntimeModelOption[] | null;
|
|
16
20
|
};
|
|
17
21
|
fallbackModels: RuntimeModelOption[];
|
|
18
|
-
buildArgs: (
|
|
22
|
+
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
|
|
23
|
+
prompt: string;
|
|
24
|
+
imagePaths: string[];
|
|
25
|
+
}, { extraAllowedDirs: _extra, options, runtimeContext }?: {
|
|
26
|
+
extraAllowedDirs?: string[];
|
|
27
|
+
options?: import("../types.js").RuntimeBuildOptions;
|
|
28
|
+
runtimeContext?: import("../types.js").RuntimeContext;
|
|
29
|
+
} | undefined) => string[];
|
|
19
30
|
promptViaStdin: true;
|
|
20
31
|
streamFormat: string;
|
|
21
32
|
eventParser: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/cursor-agent.ts` (import path adjusted only). See `
|
|
1
|
+
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/cursor-agent.ts` (import path adjusted only). See `archived provenance ledger`. */
|
|
2
2
|
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
3
3
|
import { agentCapabilities } from '../capabilities.js';
|
|
4
|
-
export function parseCursorAgentModels(stdout) {
|
|
4
|
+
export function parseCursorAgentModels({ stdout }) {
|
|
5
5
|
const lines = String(stdout || '')
|
|
6
6
|
.split('\n')
|
|
7
7
|
.map((line) => line.trim())
|
|
@@ -46,11 +46,11 @@ export const cursorAgentDef = {
|
|
|
46
46
|
listModels: {
|
|
47
47
|
args: ['models'],
|
|
48
48
|
timeoutMs: 5000,
|
|
49
|
-
parse: (stdout) => {
|
|
49
|
+
parse: ({ stdout }) => {
|
|
50
50
|
const trimmed = String(stdout || '').trim();
|
|
51
51
|
if (!trimmed || /no models available/i.test(trimmed))
|
|
52
52
|
return null;
|
|
53
|
-
return parseCursorAgentModels(trimmed);
|
|
53
|
+
return parseCursorAgentModels({ stdout: trimmed });
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
fallbackModels: [
|
|
@@ -64,7 +64,7 @@ export const cursorAgentDef = {
|
|
|
64
64
|
// Passing it makes the CLI treat the dash as the literal user prompt,
|
|
65
65
|
// which then surfaces as "your message only contains '-'". Keep stdin
|
|
66
66
|
// piped for prompt delivery, but do not append a fake prompt arg.
|
|
67
|
-
buildArgs: (_prompt, _imagePaths, _extra, options = {}, runtimeContext = {}) => {
|
|
67
|
+
buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra, options = {}, runtimeContext = {} } = {}) => {
|
|
68
68
|
const caps = agentCapabilities.get('cursor-agent') || {};
|
|
69
69
|
const args = [];
|
|
70
70
|
args.push('--print', '--output-format', 'stream-json', '--stream-partial-output');
|
package/dist/defs/deepseek.d.ts
CHANGED
|
@@ -5,7 +5,14 @@ export declare const deepseekAgentDef: {
|
|
|
5
5
|
fallbackBins: string[];
|
|
6
6
|
versionArgs: string[];
|
|
7
7
|
fallbackModels: import("../types.js").RuntimeModelOption[];
|
|
8
|
-
buildArgs: (prompt
|
|
8
|
+
buildArgs: ({ prompt, imagePaths: _imagePaths }: {
|
|
9
|
+
prompt: string;
|
|
10
|
+
imagePaths: string[];
|
|
11
|
+
}, { extraAllowedDirs: _extra, options }?: {
|
|
12
|
+
extraAllowedDirs?: string[];
|
|
13
|
+
options?: import("../types.js").RuntimeBuildOptions;
|
|
14
|
+
runtimeContext?: import("../types.js").RuntimeContext;
|
|
15
|
+
} | undefined) => string[];
|
|
9
16
|
maxPromptArgBytes: number;
|
|
10
17
|
streamFormat: string;
|
|
11
18
|
};
|
package/dist/defs/deepseek.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/deepseek.ts` (import path adjusted only). See `
|
|
1
|
+
/** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/deepseek.ts` (import path adjusted only). See `archived provenance ledger`. */
|
|
2
2
|
import { DEFAULT_MODEL_OPTION } from './shared.js';
|
|
3
3
|
export const deepseekAgentDef = {
|
|
4
4
|
id: 'deepseek',
|
|
@@ -28,7 +28,7 @@ export const deepseekAgentDef = {
|
|
|
28
28
|
// hang the run. Streaming is plain text on stdout (tool calls go to
|
|
29
29
|
// stderr); skipping `--json` keeps deltas streaming live instead of
|
|
30
30
|
// batched into one trailing summary object at end-of-turn.
|
|
31
|
-
buildArgs: (prompt, _imagePaths, _extra, options = {}) => {
|
|
31
|
+
buildArgs: ({ prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra, options = {} } = {}) => {
|
|
32
32
|
const args = ['exec', '--auto'];
|
|
33
33
|
if (options.model && options.model !== 'default') {
|
|
34
34
|
args.push('--model', options.model);
|