@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.
Files changed (200) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/README.md +34 -17
  3. package/dist/acp-model-probe.d.ts +6 -4
  4. package/dist/acp-model-probe.js +3 -3
  5. package/dist/agent-protocol/acp/account-failure.d.ts +4 -2
  6. package/dist/agent-protocol/acp/account-failure.js +1 -1
  7. package/dist/agent-protocol/acp/json.d.ts +6 -6
  8. package/dist/agent-protocol/acp/json.js +3 -3
  9. package/dist/agent-protocol/acp/models.d.ts +10 -5
  10. package/dist/agent-protocol/acp/models.js +32 -31
  11. package/dist/agent-protocol/acp/session-params.d.ts +3 -1
  12. package/dist/agent-protocol/acp/session-params.js +2 -1
  13. package/dist/agent-protocol/acp/session.d.ts +28 -22
  14. package/dist/agent-protocol/acp/session.js +181 -147
  15. package/dist/agent-protocol/acp/text-suppression.d.ts +1 -1
  16. package/dist/agent-protocol/acp/text-suppression.js +1 -1
  17. package/dist/agent-protocol/acp/types.d.ts +3 -2
  18. package/dist/agent-protocol/acp/updates.d.ts +11 -11
  19. package/dist/agent-protocol/acp/updates.js +2 -2
  20. package/dist/agent-protocol/core/json-line-stream.d.ts +24 -8
  21. package/dist/agent-protocol/core/json-line-stream.js +8 -8
  22. package/dist/agent-protocol/pi-rpc/events.d.ts +5 -1
  23. package/dist/agent-protocol/pi-rpc/events.js +36 -36
  24. package/dist/agent-protocol/pi-rpc/internal.d.ts +4 -1
  25. package/dist/agent-protocol/pi-rpc/models.d.ts +3 -1
  26. package/dist/agent-protocol/pi-rpc/models.js +1 -1
  27. package/dist/agent-protocol/pi-rpc/session.d.ts +1 -1
  28. package/dist/agent-protocol/pi-rpc/session.js +33 -32
  29. package/dist/amr-model-cache.d.ts +12 -4
  30. package/dist/amr-model-cache.js +17 -21
  31. package/dist/amr-profile-resolver.d.ts +3 -1
  32. package/dist/anthropic-live-models.js +0 -0
  33. package/dist/artifact-taxonomy.d.ts +6 -2
  34. package/dist/auth.d.ts +52 -15
  35. package/dist/auth.js +36 -36
  36. package/dist/claude-code-models.js +2 -2
  37. package/dist/claude-stream.d.ts +22 -3
  38. package/dist/claude-stream.js +24 -8
  39. package/dist/copilot-stream.d.ts +7 -3
  40. package/dist/copilot-stream.js +3 -3
  41. package/dist/defs/aider.d.ts +8 -1
  42. package/dist/defs/aider.js +2 -2
  43. package/dist/defs/amp.d.ts +8 -1
  44. package/dist/defs/amp.js +2 -2
  45. package/dist/defs/amr.d.ts +22 -6
  46. package/dist/defs/amr.js +23 -23
  47. package/dist/defs/antigravity.d.ts +15 -4
  48. package/dist/defs/antigravity.js +9 -8
  49. package/dist/defs/auggie.d.ts +4 -1
  50. package/dist/defs/auggie.js +1 -1
  51. package/dist/defs/claude.d.ts +12 -2
  52. package/dist/defs/claude.js +5 -5
  53. package/dist/defs/cline.d.ts +4 -1
  54. package/dist/defs/cline.js +1 -1
  55. package/dist/defs/codebuddy.d.ts +8 -1
  56. package/dist/defs/codebuddy.js +2 -2
  57. package/dist/defs/codex.d.ts +18 -4
  58. package/dist/defs/codex.js +7 -7
  59. package/dist/defs/copilot.d.ts +8 -1
  60. package/dist/defs/copilot.js +2 -2
  61. package/dist/defs/crush.d.ts +8 -1
  62. package/dist/defs/crush.js +1 -1
  63. package/dist/defs/cursor-agent.d.ts +14 -3
  64. package/dist/defs/cursor-agent.js +5 -5
  65. package/dist/defs/deepseek.d.ts +8 -1
  66. package/dist/defs/deepseek.js +2 -2
  67. package/dist/defs/devin.d.ts +12 -2
  68. package/dist/defs/devin.js +3 -3
  69. package/dist/defs/droid.d.ts +8 -1
  70. package/dist/defs/droid.js +1 -1
  71. package/dist/defs/gemini.d.ts +8 -1
  72. package/dist/defs/gemini.js +1 -1
  73. package/dist/defs/goose.d.ts +4 -1
  74. package/dist/defs/goose.js +1 -1
  75. package/dist/defs/grok-build.d.ts +11 -2
  76. package/dist/defs/grok-build.js +3 -3
  77. package/dist/defs/hermes.d.ts +4 -1
  78. package/dist/defs/hermes.js +2 -2
  79. package/dist/defs/kilo.d.ts +4 -1
  80. package/dist/defs/kilo.js +2 -2
  81. package/dist/defs/kimi.d.ts +4 -1
  82. package/dist/defs/kimi.js +2 -2
  83. package/dist/defs/kiro.d.ts +4 -1
  84. package/dist/defs/kiro.js +2 -2
  85. package/dist/defs/mimo.d.ts +8 -1
  86. package/dist/defs/mimo.js +2 -2
  87. package/dist/defs/opencode.d.ts +9 -2
  88. package/dist/defs/opencode.js +2 -2
  89. package/dist/defs/pi.d.ts +12 -2
  90. package/dist/defs/pi.js +9 -9
  91. package/dist/defs/qoder.d.ts +8 -1
  92. package/dist/defs/qoder.js +2 -2
  93. package/dist/defs/qwen.d.ts +8 -1
  94. package/dist/defs/qwen.js +2 -2
  95. package/dist/defs/reasonix.d.ts +4 -1
  96. package/dist/defs/reasonix.js +3 -3
  97. package/dist/defs/shared.d.ts +4 -2
  98. package/dist/defs/shared.js +2 -2
  99. package/dist/defs/trae-cli.d.ts +12 -2
  100. package/dist/defs/trae-cli.js +3 -3
  101. package/dist/defs/vibe.d.ts +4 -1
  102. package/dist/defs/vibe.js +2 -2
  103. package/dist/detection.d.ts +19 -4
  104. package/dist/detection.js +33 -33
  105. package/dist/diagnostics.d.ts +14 -3
  106. package/dist/diagnostics.js +5 -5
  107. package/dist/env.d.ts +16 -4
  108. package/dist/env.js +7 -7
  109. package/dist/executables.d.ts +24 -8
  110. package/dist/executables.js +13 -13
  111. package/dist/index.d.ts +228 -4
  112. package/dist/index.js +230 -6
  113. package/dist/invocation.d.ts +6 -1
  114. package/dist/invocation.js +2 -2
  115. package/dist/json-event-stream.d.ts +7 -2
  116. package/dist/json-event-stream.js +3 -3
  117. package/dist/launch.d.ts +12 -2
  118. package/dist/launch.js +3 -3
  119. package/dist/log-file.d.ts +4 -1
  120. package/dist/log-file.js +2 -2
  121. package/dist/mcp.d.ts +6 -3
  122. package/dist/mcp.js +1 -1
  123. package/dist/metadata.d.ts +7 -3
  124. package/dist/metadata.js +1 -1
  125. package/dist/mmd-routes.d.ts +22 -6
  126. package/dist/mmd-routes.js +14 -14
  127. package/dist/model-catalog-cache.d.ts +50 -0
  128. package/dist/model-catalog-cache.js +61 -0
  129. package/dist/model-loading-state.d.ts +10 -0
  130. package/dist/model-loading-state.js +23 -0
  131. package/dist/model-registry.d.ts +28 -7
  132. package/dist/model-registry.js +11 -8
  133. package/dist/models.d.ts +31 -6
  134. package/dist/models.js +6 -6
  135. package/dist/opencode-log.d.ts +12 -4
  136. package/dist/opencode-log.js +8 -8
  137. package/dist/paths.d.ts +6 -2
  138. package/dist/paths.js +3 -3
  139. package/dist/pi-models.d.ts +3 -1
  140. package/dist/pi-models.js +2 -2
  141. package/dist/prompt-budget.d.ts +17 -4
  142. package/dist/prompt-budget.js +3 -3
  143. package/dist/prompt-file.d.ts +5 -1
  144. package/dist/prompt-file.js +1 -1
  145. package/dist/providers/aihubmix.d.ts +34 -9
  146. package/dist/providers/aihubmix.js +26 -26
  147. package/dist/providers/anthropic-messages.d.ts +77 -20
  148. package/dist/providers/anthropic-messages.js +53 -50
  149. package/dist/providers/azure-chat.d.ts +21 -7
  150. package/dist/providers/azure-chat.js +18 -16
  151. package/dist/providers/connection-guard.d.ts +45 -31
  152. package/dist/providers/connection-guard.js +40 -143
  153. package/dist/providers/connection-test.d.ts +1 -1
  154. package/dist/providers/connection-test.js +13 -30
  155. package/dist/providers/elevenlabs.d.ts +7 -2
  156. package/dist/providers/elevenlabs.js +4 -4
  157. package/dist/providers/google-messages.d.ts +44 -10
  158. package/dist/providers/google-messages.js +36 -34
  159. package/dist/providers/google-schema.d.ts +26 -0
  160. package/dist/providers/google-schema.js +253 -0
  161. package/dist/providers/google.d.ts +21 -6
  162. package/dist/providers/google.js +10 -10
  163. package/dist/providers/index.d.ts +3 -2
  164. package/dist/providers/index.js +3 -2
  165. package/dist/providers/model-catalog.d.ts +1 -1
  166. package/dist/providers/model-catalog.js +14 -27
  167. package/dist/providers/oauth-callback-server.d.ts +1 -1
  168. package/dist/providers/oauth-callback-server.js +3 -2
  169. package/dist/providers/oauth-credentials.d.ts +7 -1
  170. package/dist/providers/oauth-credentials.js +5 -5
  171. package/dist/providers/oauth-provider.d.ts +2 -2
  172. package/dist/providers/oauth-provider.js +20 -25
  173. package/dist/providers/oauth-tokens.d.ts +26 -6
  174. package/dist/providers/oauth-tokens.js +9 -9
  175. package/dist/providers/ollama-chat.d.ts +66 -31
  176. package/dist/providers/ollama-chat.js +64 -61
  177. package/dist/providers/openai-chat.d.ts +77 -22
  178. package/dist/providers/openai-chat.js +71 -67
  179. package/dist/providers/pkce.d.ts +33 -20
  180. package/dist/providers/pkce.js +75 -146
  181. package/dist/providers/sse-decode.d.ts +3 -1
  182. package/dist/providers/sse-decode.js +1 -1
  183. package/dist/providers/token-params.d.ts +16 -5
  184. package/dist/providers/token-params.js +6 -6
  185. package/dist/providers/tool-turn-types.d.ts +94 -0
  186. package/dist/providers/tool-turn-types.js +2 -0
  187. package/dist/providers/tool-turn.d.ts +10 -0
  188. package/dist/providers/tool-turn.js +258 -0
  189. package/dist/qoder-stream.d.ts +7 -3
  190. package/dist/qoder-stream.js +3 -3
  191. package/dist/registry.d.ts +6 -2
  192. package/dist/registry.js +4 -4
  193. package/dist/resolution.d.ts +5 -1
  194. package/dist/resolution.js +3 -3
  195. package/dist/role-marker-guard.d.ts +9 -5
  196. package/dist/role-marker-guard.js +5 -5
  197. package/dist/terminal-launch.d.ts +6 -1
  198. package/dist/terminal-launch.js +2 -2
  199. package/dist/types.d.ts +22 -6
  200. 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 `source-map.md`). */
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 (set on the daemon process or via Settings → CLI 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
- env,
199
- timeout: AMR_MODELS_TIMEOUT_MS,
200
- maxBuffer: 1024 * 1024,
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
- // `source-map.md`'s 2026-07-22 entry) instead of forced via a test,
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
- env,
231
- timeout: AMR_MODELS_TIMEOUT_MS,
232
- maxBuffer: 1024 * 1024,
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 `source-map.md`.
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: string): string;
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: string): RuntimeModelOption[] | null;
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: string, _imagePaths: string[], _extra?: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined, runtimeContext?: import("../types.js").RuntimeContext | undefined) => string[];
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;
@@ -1,4 +1,5 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/antigravity.ts` (import path adjusted only). See `source-map.md`. */
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 `source-map.md`.
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.replace(OAUTH_URL_PATTERN, OAUTH_URL_PLACEHOLDER);
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
- // (`TOVU_ENV_PASSTHROUGH_PROBE`) straight out of its own `process.env` — no config field, no
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
- // `tovu` entry to their real `~/.gemini/config/mcp_config.json` (confirmed still the one real
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
@@ -3,7 +3,10 @@ export declare const auggieAgentDef: {
3
3
  name: string;
4
4
  bin: string;
5
5
  versionArgs: string[];
6
- fetchModels: (resolvedBin: string, env: import("../types.js").RuntimeEnv) => Promise<import("../types.js").RuntimeModelOption[]>;
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;
@@ -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,
@@ -18,12 +18,22 @@ export declare const claudeAgentDef: {
18
18
  };
19
19
  fallbackModels: import("../types.js").RuntimeModelOption[];
20
20
  fallbackModelsAssertedAt: string;
21
- fetchModels: (resolvedBin: string, env: import("../types.js").RuntimeEnv) => Promise<import("../types.js").RuntimeModelOption[] | null>;
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: (_prompt: string, _imagePaths: string[], extraAllowedDirs?: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined, runtimeContext?: import("../types.js").RuntimeContext | undefined) => string[];
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;
@@ -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 `source-map.md`.
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 Tovu host), so loading it eagerly is cheap. Documented at
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).
@@ -3,7 +3,10 @@ export declare const clineAgentDef: {
3
3
  name: string;
4
4
  bin: string;
5
5
  versionArgs: string[];
6
- fetchModels: (resolvedBin: string, env: import("../types.js").RuntimeEnv) => Promise<import("../types.js").RuntimeModelOption[]>;
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;
@@ -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,
@@ -14,7 +14,14 @@ export declare const codebuddyAgentDef: {
14
14
  id: string;
15
15
  label: string;
16
16
  }[];
17
- buildArgs: (_prompt: string, _imagePaths: string[], extraAllowedDirs?: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined, runtimeContext?: import("../types.js").RuntimeContext | undefined) => string[];
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;
@@ -1,4 +1,4 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/codebuddy.ts` (import path adjusted only). See `source-map.md`. */
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
@@ -1,5 +1,7 @@
1
1
  import type { RuntimeModelOption, RuntimeReasoningOption } from '../types.js';
2
- export declare function parseCodexDebugModels(stdout: string): RuntimeModelOption[] | null;
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: readonly RuntimeModelOption[]): RuntimeReasoningOption[] | null;
20
- export declare function codexNeedsDangerFullAccessSandbox(platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): boolean;
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: (_prompt: string, imagePaths: string[], extraAllowedDirs?: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined, runtimeContext?: import("../types.js").RuntimeContext | undefined) => string[];
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;
@@ -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
- * `source-map.md` for the exact original names.
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 `source-map.md` for the full verification transcript.
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
@@ -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: (_prompt: string, _imagePaths: string[], extraAllowedDirs?: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined) => string[];
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;
@@ -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 `source-map.md` for the exact original
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
@@ -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: (_prompt: string, _imagePaths: string[], _extra: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined) => string[];
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
  };
@@ -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: string): RuntimeModelOption[] | null;
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: string) => RuntimeModelOption[] | null;
17
+ parse: ({ stdout }: {
18
+ stdout: string;
19
+ }) => RuntimeModelOption[] | null;
16
20
  };
17
21
  fallbackModels: RuntimeModelOption[];
18
- buildArgs: (_prompt: string, _imagePaths: string[], _extra: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined, runtimeContext?: import("../types.js").RuntimeContext | undefined) => string[];
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 `source-map.md`. */
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');
@@ -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: string, _imagePaths: string[], _extra: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined) => string[];
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
  };
@@ -1,4 +1,4 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/deepseek.ts` (import path adjusted only). See `source-map.md`. */
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);