@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
@@ -3,9 +3,19 @@ export declare const devinAgentDef: {
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
- buildArgs: (_prompt: string, _imagePaths: string[], _extra: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined) => string[];
11
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
12
+ prompt: string;
13
+ imagePaths: string[];
14
+ }, { extraAllowedDirs: _extra, options }?: {
15
+ extraAllowedDirs?: string[];
16
+ options?: import("../types.js").RuntimeBuildOptions;
17
+ runtimeContext?: import("../types.js").RuntimeContext;
18
+ } | undefined) => string[];
9
19
  streamFormat: string;
10
20
  externalMcpInjection: "acp-merge";
11
21
  imageDelivery: "native";
@@ -1,11 +1,11 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/devin.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/devin.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import { detectAcpModels, DEFAULT_MODEL_OPTION } from './shared.js';
3
3
  export const devinAgentDef = {
4
4
  id: 'devin',
5
5
  name: 'Devin for Terminal',
6
6
  bin: 'devin',
7
7
  versionArgs: ['--version'],
8
- fetchModels: async (resolvedBin, env) => detectAcpModels({
8
+ fetchModels: async ({ resolvedBin, env }) => (({ bin, args, ...optionalArgs }) => detectAcpModels({ bin, args }, optionalArgs))({
9
9
  bin: resolvedBin,
10
10
  args: [
11
11
  '--permission-mode',
@@ -38,7 +38,7 @@ export const devinAgentDef = {
38
38
  // the CLI falls back to its own built-in default mode and to respecting workspace
39
39
  // trust — the conservative side of each flag, without this def having to name a
40
40
  // safe-mode string it cannot verify against the installed `devin` build.
41
- buildArgs: (_prompt, _imagePaths, _extra, options = {}) => options.permissionMode === 'restricted'
41
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra, options = {} } = {}) => options.permissionMode === 'restricted'
42
42
  ? ['acp']
43
43
  : ['--permission-mode', 'dangerous', '--respect-workspace-trust', 'false', 'acp'],
44
44
  streamFormat: 'acp-json-rpc',
@@ -4,7 +4,14 @@ export declare const droidAgentDef: {
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
  };
@@ -20,7 +20,7 @@ export const droidAgentDef = {
20
20
  bin: 'droid',
21
21
  versionArgs: ['--version'],
22
22
  fallbackModels: [DEFAULT_MODEL_OPTION],
23
- buildArgs: (_prompt, _imagePaths, _extra, options = {}) => {
23
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra, options = {} } = {}) => {
24
24
  const args = ['exec', '--output-format', 'text'];
25
25
  // See `RuntimeBuildOptions.permissionMode`'s doc: bypass is the default (unchanged
26
26
  // behavior); a restricted run keeps `droid exec`'s own read-only default.
@@ -9,7 +9,14 @@ export declare const geminiAgentDef: {
9
9
  "--skip-trust": string;
10
10
  };
11
11
  fallbackModels: import("../types.js").RuntimeModelOption[];
12
- buildArgs: (_prompt: string, _imagePaths: string[], extraAllowedDirs?: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined) => string[];
12
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
13
+ prompt: string;
14
+ imagePaths: string[];
15
+ }, { extraAllowedDirs, options }?: {
16
+ extraAllowedDirs?: string[];
17
+ options?: import("../types.js").RuntimeBuildOptions;
18
+ runtimeContext?: import("../types.js").RuntimeContext;
19
+ } | undefined) => string[];
13
20
  promptViaStdin: true;
14
21
  streamFormat: string;
15
22
  eventParser: string;
@@ -52,7 +52,7 @@ export const geminiAgentDef = {
52
52
  { id: 'gemini-2.5-pro', label: 'gemini-2.5-pro' },
53
53
  { id: 'gemini-2.5-flash', label: 'gemini-2.5-flash' },
54
54
  ],
55
- buildArgs: (_prompt, _imagePaths, extraAllowedDirs = [], options = {}) => {
55
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs = [], options = {} } = {}) => {
56
56
  const args = ['--output-format', 'stream-json'];
57
57
  if (agentCapabilities.get('gemini')?.skipTrust) {
58
58
  args.push(SKIP_TRUST_FLAG);
@@ -3,7 +3,10 @@ export declare const gooseAgentDef: {
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;
@@ -15,7 +15,7 @@ export const gooseAgentDef = {
15
15
  name: 'goose',
16
16
  bin: 'goose',
17
17
  versionArgs: ['--version'],
18
- fetchModels: async (resolvedBin, env) => detectAcpModels({
18
+ fetchModels: async ({ resolvedBin, env }) => (({ bin, args, ...optionalArgs }) => detectAcpModels({ bin, args }, optionalArgs))({
19
19
  bin: resolvedBin,
20
20
  args: ['acp'],
21
21
  env,
@@ -1,5 +1,7 @@
1
1
  import type { RuntimeModelOption } from '../types.js';
2
- export declare function parseGrokBuildModels(stdout: string): RuntimeModelOption[];
2
+ export declare function parseGrokBuildModels({ stdout }: {
3
+ stdout: string;
4
+ }): RuntimeModelOption[];
3
5
  export declare const grokBuildAgentDef: {
4
6
  id: string;
5
7
  name: string;
@@ -12,7 +14,14 @@ export declare const grokBuildAgentDef: {
12
14
  parse: typeof parseGrokBuildModels;
13
15
  };
14
16
  fallbackModels: RuntimeModelOption[];
15
- buildArgs: (_prompt: string, _imagePaths: string[], _extra?: 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: _extra, options, runtimeContext }?: {
21
+ extraAllowedDirs?: string[];
22
+ options?: import("../types.js").RuntimeBuildOptions;
23
+ runtimeContext?: import("../types.js").RuntimeContext;
24
+ } | undefined) => string[];
16
25
  reasoningOptions: {
17
26
  id: string;
18
27
  label: string;
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Ported from OD's `apps/daemon/src/runtimes/defs/grok-build.ts` with
3
3
  * several product-named comment mentions reworded to generic
4
- * host-application phrasing (no behavior change; see `source-map.md` for
4
+ * host-application phrasing (no behavior change; see `archived provenance ledger` for
5
5
  * the exact original wording).
6
6
  */
7
7
  import { DEFAULT_MODEL_OPTION } from './shared.js';
8
8
  const GROK_MODEL_ID_RE = /^\*?\s*-?\s*(grok-[a-z0-9][a-z0-9._-]*)(?:\s+\(default\))?\s*$/i;
9
- export function parseGrokBuildModels(stdout) {
9
+ export function parseGrokBuildModels({ stdout }) {
10
10
  const seen = new Set();
11
11
  const out = [DEFAULT_MODEL_OPTION];
12
12
  for (const rawLine of String(stdout || '').split('\n')) {
@@ -76,7 +76,7 @@ export const grokBuildAgentDef = {
76
76
  // Grok Build CLI v0.1.212+ enforces `-p, --single <PROMPT>` as
77
77
  // value-required, while a host's composed prompts can exceed safe argv
78
78
  // budgets. Use the CLI's explicit prompt-file transport instead.
79
- buildArgs: (_prompt, _imagePaths, _extra = [], options = {}, runtimeContext = {}) => {
79
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra = [], options = {}, runtimeContext = {} } = {}) => {
80
80
  if (!runtimeContext.promptFilePath) {
81
81
  throw new Error('grok-build requires runtimeContext.promptFilePath');
82
82
  }
@@ -3,7 +3,10 @@ export declare const hermesAgentDef: {
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;
@@ -1,11 +1,11 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/hermes.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/hermes.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import { detectAcpModels, DEFAULT_MODEL_OPTION } from './shared.js';
3
3
  export const hermesAgentDef = {
4
4
  id: 'hermes',
5
5
  name: 'Hermes',
6
6
  bin: 'hermes',
7
7
  versionArgs: ['--version'],
8
- fetchModels: async (resolvedBin, env) => detectAcpModels({
8
+ fetchModels: async ({ resolvedBin, env }) => (({ bin, args, ...optionalArgs }) => detectAcpModels({ bin, args }, optionalArgs))({
9
9
  bin: resolvedBin,
10
10
  args: ['acp', '--accept-hooks'],
11
11
  env,
@@ -3,7 +3,10 @@ export declare const kiloAgentDef: {
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;
package/dist/defs/kilo.js CHANGED
@@ -1,11 +1,11 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/kilo.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/kilo.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import { detectAcpModels, DEFAULT_MODEL_OPTION } from './shared.js';
3
3
  export const kiloAgentDef = {
4
4
  id: 'kilo',
5
5
  name: 'Kilo',
6
6
  bin: 'kilo',
7
7
  versionArgs: ['--version'],
8
- fetchModels: async (resolvedBin, env) => detectAcpModels({
8
+ fetchModels: async ({ resolvedBin, env }) => (({ bin, args, ...optionalArgs }) => detectAcpModels({ bin, args }, optionalArgs))({
9
9
  bin: resolvedBin,
10
10
  args: ['acp'],
11
11
  env,
@@ -4,7 +4,10 @@ export declare const kimiAgentDef: {
4
4
  bin: string;
5
5
  versionArgs: string[];
6
6
  fallbackModels: import("../types.js").RuntimeModelOption[];
7
- fetchModels: (resolvedBin: string, env: import("../types.js").RuntimeEnv) => Promise<import("../types.js").RuntimeModelOption[]>;
7
+ fetchModels: ({ resolvedBin, env }: {
8
+ resolvedBin: string;
9
+ env: import("../types.js").RuntimeEnv;
10
+ }) => Promise<import("../types.js").RuntimeModelOption[]>;
8
11
  buildArgs: () => string[];
9
12
  streamFormat: string;
10
13
  mcpDiscovery: string;
package/dist/defs/kimi.js CHANGED
@@ -1,4 +1,4 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/kimi.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/kimi.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import { detectAcpModels, DEFAULT_MODEL_OPTION } from './shared.js';
3
3
  export const kimiAgentDef = {
4
4
  id: 'kimi',
@@ -11,7 +11,7 @@ export const kimiAgentDef = {
11
11
  { id: 'moonshot-v1-8k', label: 'moonshot-v1-8k' },
12
12
  { id: 'moonshot-v1-32k', label: 'moonshot-v1-32k' },
13
13
  ],
14
- fetchModels: async (resolvedBin, env) => detectAcpModels({
14
+ fetchModels: async ({ resolvedBin, env }) => (({ bin, args, ...optionalArgs }) => detectAcpModels({ bin, args }, optionalArgs))({
15
15
  bin: resolvedBin,
16
16
  args: ['acp'],
17
17
  env,
@@ -3,7 +3,10 @@ export declare const kiroAgentDef: {
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;
package/dist/defs/kiro.js CHANGED
@@ -1,11 +1,11 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/kiro.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/kiro.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import { detectAcpModels, DEFAULT_MODEL_OPTION } from './shared.js';
3
3
  export const kiroAgentDef = {
4
4
  id: 'kiro',
5
5
  name: 'Kiro CLI',
6
6
  bin: 'kiro-cli',
7
7
  versionArgs: ['--version'],
8
- fetchModels: async (resolvedBin, env) => detectAcpModels({
8
+ fetchModels: async ({ resolvedBin, env }) => (({ bin, args, ...optionalArgs }) => detectAcpModels({ bin, args }, optionalArgs))({
9
9
  bin: resolvedBin,
10
10
  args: ['acp'],
11
11
  env,
@@ -4,7 +4,14 @@ export declare const mimoAgentDef: {
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
  eventParser: string;
package/dist/defs/mimo.js CHANGED
@@ -1,4 +1,4 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/mimo.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/mimo.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import { DEFAULT_MODEL_OPTION } from './shared.js';
3
3
  export const mimoAgentDef = {
4
4
  id: 'mimo',
@@ -6,7 +6,7 @@ export const mimoAgentDef = {
6
6
  bin: 'mimo',
7
7
  versionArgs: ['--version'],
8
8
  fallbackModels: [DEFAULT_MODEL_OPTION],
9
- buildArgs: (_prompt, _imagePaths, _extra, options = {}) => {
9
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra, options = {} } = {}) => {
10
10
  const args = ['run', '--format', 'json'];
11
11
  if (options.model && options.model !== 'default') {
12
12
  args.push('--model', options.model);
@@ -1,4 +1,4 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/opencode.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/opencode.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import { parseLineSeparatedModels } from './shared.js';
3
3
  export declare const opencodeAgentDef: {
4
4
  id: string;
@@ -17,7 +17,14 @@ export declare const opencodeAgentDef: {
17
17
  };
18
18
  fallbackModels: import("../types.js").RuntimeModelOption[];
19
19
  fallbackModelsAssertedAt: string;
20
- buildArgs: (_prompt: string, _imagePaths: string[], _extra: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined, runtimeContext?: import("../types.js").RuntimeContext | undefined) => string[];
20
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
21
+ prompt: string;
22
+ imagePaths: string[];
23
+ }, { extraAllowedDirs: _extra, options, runtimeContext }?: {
24
+ extraAllowedDirs?: string[];
25
+ options?: import("../types.js").RuntimeBuildOptions;
26
+ runtimeContext?: import("../types.js").RuntimeContext;
27
+ } | undefined) => string[];
21
28
  promptViaStdin: true;
22
29
  resumesSessionViaCli: true;
23
30
  capturesSessionIdFromStream: true;
@@ -1,4 +1,4 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/opencode.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/opencode.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import { DEFAULT_MODEL_OPTION, parseLineSeparatedModels } from './shared.js';
3
3
  import { agentCapabilities } from '../capabilities.js';
4
4
  const SKIP_PERMISSIONS_FLAG = '--dangerously-skip-permissions';
@@ -47,7 +47,7 @@ export const opencodeAgentDef = {
47
47
  // avoid Windows `spawn ENAMETOOLONG` while preserving OpenCode's
48
48
  // structured stream. A literal `-` is parsed as a positional message by
49
49
  // OpenCode 1.14.x and can surface as "Session not found".
50
- buildArgs: (_prompt, _imagePaths, _extra, options = {}, runtimeContext = {}) => {
50
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra, options = {}, runtimeContext = {} } = {}) => {
51
51
  const args = [
52
52
  'run',
53
53
  '--format',
package/dist/defs/pi.d.ts CHANGED
@@ -4,14 +4,24 @@ export declare const piAgentDef: {
4
4
  bin: string;
5
5
  versionArgs: string[];
6
6
  versionProbeTimeoutMs: number;
7
- fetchModels: (resolvedBin: string, env: import("../types.js").RuntimeEnv) => Promise<import("../types.js").RuntimeModelOption[] | null>;
7
+ fetchModels: ({ resolvedBin, env }: {
8
+ resolvedBin: string;
9
+ env: import("../types.js").RuntimeEnv;
10
+ }) => Promise<import("../types.js").RuntimeModelOption[] | null>;
8
11
  fallbackModels: import("../types.js").RuntimeModelOption[];
9
12
  fallbackModelsAssertedAt: string;
10
13
  reasoningOptions: {
11
14
  id: string;
12
15
  label: string;
13
16
  }[];
14
- 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[];
15
25
  promptViaStdin: true;
16
26
  streamFormat: string;
17
27
  imageDelivery: "native";
package/dist/defs/pi.js CHANGED
@@ -1,4 +1,4 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/pi.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/pi.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import path from 'node:path';
3
3
  import { DEFAULT_MODEL_OPTION, execAgentFile, parsePiModels } from './shared.js';
4
4
  export const piAgentDef = {
@@ -13,14 +13,14 @@ export const piAgentDef = {
13
13
  versionProbeTimeoutMs: 15_000,
14
14
  // `pi --list-models` prints a TSV table to stderr (not stdout),
15
15
  // so we use a custom fetchModels that reads stderr.
16
- fetchModels: async (resolvedBin, env) => {
16
+ fetchModels: async ({ resolvedBin, env }) => {
17
17
  try {
18
- const { stderr } = await execAgentFile(resolvedBin, ['--list-models'], {
19
- env,
20
- timeout: 60_000, // Windows: 20s exceeded under parallel detection load
21
- maxBuffer: 8 * 1024 * 1024,
22
- });
23
- const parsed = parsePiModels(stderr);
18
+ const { stderr } = await execAgentFile({ command: resolvedBin, args: ['--list-models'] }, { options: {
19
+ env,
20
+ timeout: 60_000, // Windows: 20s exceeded under parallel detection load
21
+ maxBuffer: 8 * 1024 * 1024,
22
+ } });
23
+ const parsed = parsePiModels({ stdout: stderr });
24
24
  if (!parsed || parsed.length === 0)
25
25
  return null;
26
26
  return parsed;
@@ -64,7 +64,7 @@ export const piAgentDef = {
64
64
  // pi's RPC mode drives the entire conversation over stdio JSON-RPC.
65
65
  // The daemon sends a `prompt` command and pi streams back typed events.
66
66
  // No prompt in argv — avoids ENAMETOOLONG and keeps the protocol clean.
67
- buildArgs: (_prompt, _imagePaths, extraAllowedDirs = [], options = {}, runtimeContext = {}) => {
67
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs = [], options = {}, runtimeContext = {} } = {}) => {
68
68
  const args = ['--mode', 'rpc'];
69
69
  if (options.model && options.model !== 'default') {
70
70
  // pi --model accepts patterns ("sonnet", "anthropic/claude-sonnet-4-5",
@@ -4,7 +4,14 @@ export declare const qoderAgentDef: {
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, runtimeContext?: import("../types.js").RuntimeContext | undefined) => string[];
7
+ buildArgs: ({ prompt: _prompt, imagePaths }: {
8
+ prompt: string;
9
+ imagePaths: string[];
10
+ }, { extraAllowedDirs, options, runtimeContext }?: {
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
  imageDelivery: "native";
@@ -1,4 +1,4 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/qoder.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/qoder.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import path from 'node:path';
3
3
  import { DEFAULT_MODEL_OPTION } from './shared.js';
4
4
  export const qoderAgentDef = {
@@ -23,7 +23,7 @@ export const qoderAgentDef = {
23
23
  // QODER_PERSONAL_ACCESS_TOKEN for automation. Do not add that token to
24
24
  // static adapter env; unlike Gemini's workspace trust flag it is a user
25
25
  // secret and already flows through the inherited process environment.
26
- buildArgs: (_prompt, imagePaths, extraAllowedDirs = [], options = {}, runtimeContext = {}) => {
26
+ buildArgs: ({ prompt: _prompt, imagePaths }, { extraAllowedDirs = [], options = {}, runtimeContext = {} } = {}) => {
27
27
  const args = [
28
28
  '-p',
29
29
  '--output-format',
@@ -4,7 +4,14 @@ export declare const qwenAgentDef: {
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
  };
package/dist/defs/qwen.js CHANGED
@@ -1,4 +1,4 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/qwen.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/qwen.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import { DEFAULT_MODEL_OPTION } from './shared.js';
3
3
  export const qwenAgentDef = {
4
4
  id: 'qwen',
@@ -15,7 +15,7 @@ export const qwenAgentDef = {
15
15
  // Gemini-CLI fork and supports the same `--yolo` non-interactive mode.
16
16
  // Qwen Code reads from piped stdin when no positional prompt is supplied.
17
17
  // Current Qwen treats/rejects a bare `-` rather than needing it as a stdin sentinel.
18
- buildArgs: (_prompt, _imagePaths, _extra, options = {}) => {
18
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra, options = {} } = {}) => {
19
19
  const args = [];
20
20
  // See `RuntimeBuildOptions.permissionMode`'s doc: bypass is the default (unchanged
21
21
  // behavior) unless a caller explicitly opts into a restricted run.
@@ -4,7 +4,10 @@ export declare const reasonixAgentDef: {
4
4
  bin: string;
5
5
  fallbackBins: string[];
6
6
  versionArgs: string[];
7
- fetchModels: (resolvedBin: string, env: import("../types.js").RuntimeEnv) => Promise<import("../types.js").RuntimeModelOption[]>;
7
+ fetchModels: ({ resolvedBin, env }: {
8
+ resolvedBin: string;
9
+ env: import("../types.js").RuntimeEnv;
10
+ }) => Promise<import("../types.js").RuntimeModelOption[]>;
8
11
  buildArgs: () => string[];
9
12
  streamFormat: string;
10
13
  mcpDiscovery: string;
@@ -4,7 +4,7 @@
4
4
  * product-specific system-prompt block via
5
5
  * `env.REASONIX_ACP_SYSTEM_APPEND` — a `DESIGN_INSTRUCTIONS` constant that
6
6
  * literally named the host product and instructed the model to wrap output
7
- * in that product's own artifact-tag convention (see `source-map.md` for
7
+ * in that product's own artifact-tag convention (see `archived provenance ledger` for
8
8
  * the exact original text). That is genuine product-specific prompt
9
9
  * content baked into what's supposed to be a pure declarative def literal,
10
10
  * not the generic ACP-transport config the rest of this file is. It is
@@ -19,7 +19,7 @@
19
19
  * central dispatch every def's overlay delivery goes through) and
20
20
  * `computeChildEnv`, not through this file's own static `env` object
21
21
  * below (that one is fixed at def-load time, computed once; the overlay
22
- * varies per run and per host). See `source-map.md`.
22
+ * varies per run and per host). See `archived provenance ledger`.
23
23
  */
24
24
  import os from 'node:os';
25
25
  import path from 'node:path';
@@ -40,7 +40,7 @@ export const reasonixAgentDef = {
40
40
  bin: 'reasonix',
41
41
  fallbackBins: ['dsnix'],
42
42
  versionArgs: ['--version'],
43
- fetchModels: async (resolvedBin, env) => detectAcpModels({
43
+ fetchModels: async ({ resolvedBin, env }) => (({ bin, args, ...optionalArgs }) => detectAcpModels({ bin, args }, optionalArgs))({
44
44
  bin: resolvedBin,
45
45
  args: ['acp'],
46
46
  env,
@@ -10,7 +10,7 @@
10
10
  * Ported from OD's `apps/daemon/src/runtimes/defs/shared.ts` — the origin
11
11
  * imported `detectAcpModels` from `../../acp.js` and `parsePiModels` from
12
12
  * `../../pi-rpc.js` directly; here they come from this package's own
13
- * port/vendor modules instead. See `source-map.md`.
13
+ * port/vendor modules instead. See `archived provenance ledger`.
14
14
  */
15
15
  import { detectAcpModels } from '../acp-model-probe.js';
16
16
  import { parsePiModels } from '../pi-models.js';
@@ -49,5 +49,7 @@ export { detectAcpModels, parsePiModels, execAgentFile, DEFAULT_MODEL_OPTION };
49
49
  */
50
50
  export declare function buildClaudeMcpConfigArgs(runtimeContext: RuntimeContext): string[];
51
51
  export declare function clampCodexReasoning(modelId: string | null | undefined, effort: string | null | undefined): string | null | undefined;
52
- export declare function parseLineSeparatedModels(stdout: string): RuntimeModelOption[];
52
+ export declare function parseLineSeparatedModels({ stdout }: {
53
+ stdout: string;
54
+ }): RuntimeModelOption[];
53
55
  //# sourceMappingURL=shared.d.ts.map
@@ -10,7 +10,7 @@
10
10
  * Ported from OD's `apps/daemon/src/runtimes/defs/shared.ts` — the origin
11
11
  * imported `detectAcpModels` from `../../acp.js` and `parsePiModels` from
12
12
  * `../../pi-rpc.js` directly; here they come from this package's own
13
- * port/vendor modules instead. See `source-map.md`.
13
+ * port/vendor modules instead. See `archived provenance ledger`.
14
14
  */
15
15
  import { detectAcpModels } from '../acp-model-probe.js';
16
16
  import { parsePiModels } from '../pi-models.js';
@@ -74,7 +74,7 @@ export function clampCodexReasoning(modelId, effort) {
74
74
  }
75
75
  // Parse one-id-per-line stdout from `<cli> models` and prepend the synthetic
76
76
  // default option. Used by opencode / cursor-agent.
77
- export function parseLineSeparatedModels(stdout) {
77
+ export function parseLineSeparatedModels({ stdout }) {
78
78
  const ids = String(stdout || '')
79
79
  .split('\n')
80
80
  .map((line) => line.trim())
@@ -4,9 +4,19 @@ export declare const traeCliAgentDef: {
4
4
  bin: string;
5
5
  versionArgs: string[];
6
6
  versionProbeTimeoutMs: number;
7
- fetchModels: (resolvedBin: string, env: import("../types.js").RuntimeEnv) => Promise<import("../types.js").RuntimeModelOption[]>;
7
+ fetchModels: ({ resolvedBin, env }: {
8
+ resolvedBin: string;
9
+ env: import("../types.js").RuntimeEnv;
10
+ }) => Promise<import("../types.js").RuntimeModelOption[]>;
8
11
  fallbackModels: import("../types.js").RuntimeModelOption[];
9
- buildArgs: (_prompt: string, _imagePaths: string[], _extra: string[] | undefined, options?: import("../types.js").RuntimeBuildOptions | undefined) => string[];
12
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }: {
13
+ prompt: string;
14
+ imagePaths: string[];
15
+ }, { extraAllowedDirs: _extra, options }?: {
16
+ extraAllowedDirs?: string[];
17
+ options?: import("../types.js").RuntimeBuildOptions;
18
+ runtimeContext?: import("../types.js").RuntimeContext;
19
+ } | undefined) => string[];
10
20
  streamFormat: string;
11
21
  mcpDiscovery: string;
12
22
  externalMcpInjection: "acp-merge";
@@ -1,4 +1,4 @@
1
- /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/trae-cli.ts` (import path adjusted only). See `source-map.md`. */
1
+ /** Ported verbatim from OD's `apps/daemon/src/runtimes/defs/trae-cli.ts` (import path adjusted only). See `archived provenance ledger`. */
2
2
  import { detectAcpModels, DEFAULT_MODEL_OPTION } from './shared.js';
3
3
  export const traeCliAgentDef = {
4
4
  id: 'trae-cli',
@@ -6,7 +6,7 @@ export const traeCliAgentDef = {
6
6
  bin: 'traecli',
7
7
  versionArgs: ['--version'],
8
8
  versionProbeTimeoutMs: 10_000,
9
- fetchModels: async (resolvedBin, env) => detectAcpModels({
9
+ fetchModels: async ({ resolvedBin, env }) => (({ bin, args, ...optionalArgs }) => detectAcpModels({ bin, args }, optionalArgs))({
10
10
  bin: resolvedBin,
11
11
  args: ['acp', 'serve'],
12
12
  env,
@@ -16,7 +16,7 @@ export const traeCliAgentDef = {
16
16
  fallbackModels: [DEFAULT_MODEL_OPTION],
17
17
  // See `RuntimeBuildOptions.permissionMode`'s doc: bypass is the default (unchanged
18
18
  // behavior) unless a caller explicitly opts into a restricted run.
19
- buildArgs: (_prompt, _imagePaths, _extra, options = {}) => options.permissionMode === 'restricted' ? ['acp', 'serve'] : ['acp', 'serve', '--yolo'],
19
+ buildArgs: ({ prompt: _prompt, imagePaths: _imagePaths }, { extraAllowedDirs: _extra, options = {} } = {}) => options.permissionMode === 'restricted' ? ['acp', 'serve'] : ['acp', 'serve', '--yolo'],
20
20
  streamFormat: 'acp-json-rpc',
21
21
  mcpDiscovery: 'mature-acp',
22
22
  externalMcpInjection: 'acp-merge',