@armadra/agent 0.7.3 → 0.7.5

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 (179) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/CHANGELOG.zh-CN.md +48 -0
  3. package/dist/agent/retry.d.ts +14 -5
  4. package/dist/agent/retry.js +30 -8
  5. package/dist/agent/session-cache-key.d.ts +8 -0
  6. package/dist/agent/session-cache-key.js +46 -0
  7. package/dist/agent/session-cache.d.ts +2 -3
  8. package/dist/agent/session-cache.js +19 -37
  9. package/dist/agent/session-classifier.d.ts +3 -2
  10. package/dist/agent/session-classifier.js +36 -10
  11. package/dist/agent/session-compaction.d.ts +24 -5
  12. package/dist/agent/session-compaction.js +54 -20
  13. package/dist/agent/session-core.d.ts +2 -0
  14. package/dist/agent/session-run.d.ts +12 -0
  15. package/dist/agent/session-run.js +29 -10
  16. package/dist/agent/session-subagent.d.ts +8 -1
  17. package/dist/agent/session-subagent.js +37 -14
  18. package/dist/agent/session-sync.d.ts +8 -2
  19. package/dist/agent/session-sync.js +7 -10
  20. package/dist/agent/session-tools.js +3 -2
  21. package/dist/agent/subagent-fork.d.ts +67 -0
  22. package/dist/agent/subagent-fork.js +87 -0
  23. package/dist/agent/subagent-registry.d.ts +2 -2
  24. package/dist/agent/subagent-registry.js +2 -2
  25. package/dist/agent/tool-availability.d.ts +8 -0
  26. package/dist/agent/tool-availability.js +8 -0
  27. package/dist/agent/tool-runner.js +13 -4
  28. package/dist/agent/worktree.d.ts +8 -0
  29. package/dist/agent/worktree.js +51 -4
  30. package/dist/agents/parse.js +6 -1
  31. package/dist/agents/task-record.js +3 -0
  32. package/dist/agents/types.d.ts +2 -0
  33. package/dist/ai/apis/anthropic-messages.js +10 -5
  34. package/dist/ai/apis/anthropic-request.d.ts +2 -1
  35. package/dist/ai/apis/anthropic-request.js +15 -4
  36. package/dist/ai/apis/cache-params.js +2 -1
  37. package/dist/ai/apis/google-generative-ai.js +4 -2
  38. package/dist/ai/apis/google-request.js +2 -1
  39. package/dist/ai/apis/max-tokens.d.ts +42 -0
  40. package/dist/ai/apis/max-tokens.js +121 -0
  41. package/dist/ai/apis/openai-completions.js +10 -5
  42. package/dist/ai/apis/openai-request.js +4 -2
  43. package/dist/ai/apis/openai-responses-request.js +3 -2
  44. package/dist/ai/apis/openai-responses.js +9 -5
  45. package/dist/ai/apis/shared.d.ts +3 -1
  46. package/dist/ai/apis/shared.js +21 -3
  47. package/dist/ai/cache/fingerprint.d.ts +4 -1
  48. package/dist/ai/cache/fingerprint.js +18 -1
  49. package/dist/ai/cache/miss.d.ts +2 -1
  50. package/dist/ai/cache/miss.js +9 -3
  51. package/dist/ai/cache/reporting.js +5 -1
  52. package/dist/ai/cache/types.d.ts +10 -2
  53. package/dist/ai/cache/warmer.d.ts +6 -1
  54. package/dist/ai/cache/warmer.js +7 -0
  55. package/dist/ai/context.d.ts +12 -4
  56. package/dist/ai/context.js +43 -24
  57. package/dist/ai/fake/fake-provider.d.ts +8 -1
  58. package/dist/ai/fake/fake-provider.js +19 -7
  59. package/dist/ai/fake/fake-script.d.ts +2 -0
  60. package/dist/ai/http.d.ts +17 -9
  61. package/dist/ai/http.js +33 -13
  62. package/dist/ai/image-intern.d.ts +29 -0
  63. package/dist/ai/image-intern.js +58 -0
  64. package/dist/ai/json-body.d.ts +63 -0
  65. package/dist/ai/json-body.js +286 -0
  66. package/dist/ai/overflow.js +5 -0
  67. package/dist/ai/providers/catalog-data.js +13 -13
  68. package/dist/ai/providers/catalog.d.ts +33 -0
  69. package/dist/ai/providers/catalog.js +105 -6
  70. package/dist/ai/providers/enrich.d.ts +13 -3
  71. package/dist/ai/providers/enrich.js +87 -31
  72. package/dist/ai/sse.d.ts +3 -2
  73. package/dist/ai/sse.js +3 -2
  74. package/dist/ai/types.d.ts +9 -2
  75. package/dist/bundle/ama.cjs +3637 -1973
  76. package/dist/cli/bootstrap.js +13 -5
  77. package/dist/cli/compose-agents.js +3 -0
  78. package/dist/cli/compose-extensions.js +2 -0
  79. package/dist/cli/compose-request.d.ts +20 -0
  80. package/dist/cli/compose-request.js +37 -0
  81. package/dist/cli/compose-session.js +2 -2
  82. package/dist/cli/deps.d.ts +1 -1
  83. package/dist/cli/subcommands/model-meta.d.ts +2 -1
  84. package/dist/cli/subcommands/model-meta.js +3 -2
  85. package/dist/codemode/host-side.d.ts +11 -4
  86. package/dist/codemode/host-side.js +25 -6
  87. package/dist/codemode/tool.d.ts +2 -0
  88. package/dist/codemode/tool.js +4 -0
  89. package/dist/config/json-schema.js +9 -2
  90. package/dist/config/key-docs.js +13 -4
  91. package/dist/config/schema-w5.js +9 -1
  92. package/dist/config/schema.d.ts +1 -1
  93. package/dist/config/schema.js +19 -3
  94. package/dist/config/settings-registry.js +6 -0
  95. package/dist/config/types-w5.d.ts +2 -0
  96. package/dist/config/types.d.ts +19 -1
  97. package/dist/config/types.js +4 -0
  98. package/dist/i18n/catalog.d.ts +13 -2
  99. package/dist/i18n/messages/cli.d.ts +2 -0
  100. package/dist/i18n/messages/cli.js +2 -0
  101. package/dist/i18n/messages/config-keys.d.ts +10 -0
  102. package/dist/i18n/messages/config-keys.js +12 -2
  103. package/dist/i18n/messages/config.d.ts +14 -0
  104. package/dist/i18n/messages/config.js +4 -0
  105. package/dist/i18n/messages/errors.d.ts +3 -2
  106. package/dist/i18n/messages/errors.js +15 -2
  107. package/dist/i18n/messages/report.d.ts +2 -0
  108. package/dist/i18n/messages/report.js +2 -0
  109. package/dist/i18n/messages/settings.d.ts +4 -0
  110. package/dist/i18n/messages/settings.js +6 -2
  111. package/dist/i18n/messages/subcommands.d.ts +2 -2
  112. package/dist/i18n/messages/subcommands.js +4 -2
  113. package/dist/modes/acp/acp-server.js +30 -18
  114. package/dist/modes/acp/acp-sessions.d.ts +22 -0
  115. package/dist/modes/acp/acp-sessions.js +68 -0
  116. package/dist/modes/context-report.js +3 -2
  117. package/dist/modes/print/json-event.d.ts +12 -1
  118. package/dist/modes/print/json-event.js +48 -1
  119. package/dist/modes/rpc/rpc-mode.d.ts +1 -0
  120. package/dist/modes/rpc/rpc-mode.js +9 -2
  121. package/dist/modes/session-report.d.ts +1 -1
  122. package/dist/modes/session-report.js +12 -6
  123. package/dist/rpc.d.ts +5 -2
  124. package/dist/session/line-reader.d.ts +28 -0
  125. package/dist/session/line-reader.js +82 -0
  126. package/dist/session/list.d.ts +14 -0
  127. package/dist/session/list.js +150 -0
  128. package/dist/session/manager.d.ts +23 -3
  129. package/dist/session/manager.js +91 -62
  130. package/dist/session/migrate.d.ts +2 -1
  131. package/dist/session/migrate.js +2 -1
  132. package/dist/session/offload.d.ts +51 -0
  133. package/dist/session/offload.js +195 -0
  134. package/dist/session/projection.d.ts +16 -3
  135. package/dist/session/projection.js +96 -29
  136. package/dist/session/scan.d.ts +3 -3
  137. package/dist/session/scan.js +9 -18
  138. package/dist/session/store.d.ts +15 -4
  139. package/dist/session/store.js +54 -38
  140. package/dist/session/types.d.ts +7 -2
  141. package/dist/tools/bash.d.ts +1 -1
  142. package/dist/tools/bash.js +5 -4
  143. package/dist/tools/glob.d.ts +2 -2
  144. package/dist/tools/glob.js +2 -2
  145. package/dist/tools/grep.js +4 -6
  146. package/dist/tools/image-file.js +2 -1
  147. package/dist/tools/read-lines.d.ts +71 -0
  148. package/dist/tools/read-lines.js +224 -0
  149. package/dist/tools/read.d.ts +6 -2
  150. package/dist/tools/read.js +47 -27
  151. package/dist/tools/task.d.ts +9 -0
  152. package/dist/tools/task.js +21 -8
  153. package/dist/tools/truncate.d.ts +7 -0
  154. package/dist/tools/truncate.js +11 -0
  155. package/dist/tools/types.d.ts +13 -0
  156. package/dist/trace/build-index.js +13 -1
  157. package/dist/tui/ansi.d.ts +2 -0
  158. package/dist/tui/ansi.js +7 -3
  159. package/dist/tui/components/editor-buffer.js +2 -2
  160. package/dist/tui/components/editor.js +5 -6
  161. package/dist/tui/keys.js +2 -2
  162. package/dist/tui/stdin-buffer.js +3 -3
  163. package/docs/acp.md +8 -1
  164. package/docs/agents.md +42 -6
  165. package/docs/codemode.md +4 -2
  166. package/docs/en/acp.md +3 -2
  167. package/docs/en/host-api.md +1 -1
  168. package/docs/en/permissions.md +2 -2
  169. package/docs/en/providers.md +54 -20
  170. package/docs/en/rpc.md +23 -7
  171. package/docs/en/sessions.md +4 -2
  172. package/docs/en/tui.md +2 -2
  173. package/docs/permissions.md +4 -1
  174. package/docs/providers.md +85 -22
  175. package/docs/rpc.md +22 -6
  176. package/docs/session-format.md +13 -2
  177. package/docs/sessions.md +3 -1
  178. package/docs/tui.md +1 -1
  179. package/package.json +2 -2
@@ -47,6 +47,10 @@ export const DEFAULT_CACHE_CONFIG = Object.freeze({
47
47
  missNotices: true,
48
48
  warmSubagents: false,
49
49
  });
50
+ /** [ME-C0] `compaction.contextBudget` 的下限。 */
51
+ export const MIN_CONTEXT_BUDGET = 32_768;
52
+ /** [ME-C0] `request.streamIdleTimeoutMs` 的缺省(毫秒)。 */
53
+ export const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 180_000;
50
54
  export const CHECKPOINT_MODES = ["tools", "shadow-git", "off"];
51
55
  export const DEFAULT_CHECKPOINTS_CONFIG = Object.freeze({
52
56
  mode: "tools",
@@ -158,6 +158,7 @@ declare const en: {
158
158
  invalidCacheWarming: (value: string) => string;
159
159
  invalidCacheRetention: (value: string) => string;
160
160
  invalidIdleTimeout: (value: string) => string;
161
+ invalidStreamIdleTimeout: (value: string) => string;
161
162
  notSessionManager: string;
162
163
  apiNotImplemented: (ref: string, api: string, viaOpenrouter: boolean) => string;
163
164
  appendToolFailed: (name: string, message: string) => string;
@@ -361,7 +362,7 @@ declare const en: {
361
362
  image: string;
362
363
  channels: (names: readonly string[]) => string;
363
364
  price: string;
364
- sources: (parts: readonly string[], match: string | undefined, noTools: boolean) => string;
365
+ sources: (parts: readonly string[], match: string | undefined, noTools: boolean, catalog?: string) => string;
365
366
  };
366
367
  cacheProbe: {
367
368
  adviceSilent: (provider: string, cacheFieldPresent: boolean) => string;
@@ -1198,6 +1199,7 @@ declare const en: {
1198
1199
  missModel: string;
1199
1200
  missTools: string;
1200
1201
  missSystem: string;
1202
+ missSystemSections: (sections: string) => string;
1201
1203
  missPrefix: string;
1202
1204
  missEvicted: string;
1203
1205
  missNotice: (reason: string, tokens: string, cost: string | undefined) => string;
@@ -1352,6 +1354,7 @@ declare const en: {
1352
1354
  "compaction.enabled": string;
1353
1355
  "compaction.reserveTokens": string;
1354
1356
  "compaction.keepRecentTokens": string;
1357
+ "compaction.contextBudget": string;
1355
1358
  "compaction.prune": string;
1356
1359
  "compaction.prune.keepResults": string;
1357
1360
  "compaction.prune.clearAtLeast": string;
@@ -1371,6 +1374,7 @@ declare const en: {
1371
1374
  "codemode.mode": string;
1372
1375
  "codemode.inlineBudget": string;
1373
1376
  "codemode.requireStrict": string;
1377
+ "codemode.maxHeapMb": string;
1374
1378
  hooks: string;
1375
1379
  "hooks.timeoutMs": string;
1376
1380
  ui: string;
@@ -1410,6 +1414,7 @@ declare const en: {
1410
1414
  cache: string;
1411
1415
  request: string;
1412
1416
  "request.idleTimeoutMs": string;
1417
+ "request.streamIdleTimeoutMs": string;
1413
1418
  "cache.warming": string;
1414
1419
  "cache.retention": string;
1415
1420
  "cache.minSavingsUsd": string;
@@ -1439,6 +1444,7 @@ declare const en: {
1439
1444
  subagents: string;
1440
1445
  "subagents.maxConcurrent": string;
1441
1446
  "subagents.maxPending": string;
1447
+ "subagents.retainSessions": string;
1442
1448
  "subagents.defaultModel": string;
1443
1449
  "subagents.background": string;
1444
1450
  "subagents.autoBackgroundAfterMs": string;
@@ -1476,6 +1482,7 @@ declare const en: {
1476
1482
  "models.enabled": string;
1477
1483
  fallbackModel: string;
1478
1484
  "limits.maxTurns": string;
1485
+ "compaction.contextBudget": string;
1479
1486
  "limits.maxCostUsd": string;
1480
1487
  "ui.replyLanguage": string;
1481
1488
  "ui.agentBar": string;
@@ -1499,6 +1506,7 @@ declare const en: {
1499
1506
  stringArray: string;
1500
1507
  array: string;
1501
1508
  modelsDev: string;
1509
+ catalog: string;
1502
1510
  modelsEnabled: string;
1503
1511
  noChannels: string;
1504
1512
  unknownChannelOf: (name: string, available: readonly string[]) => string;
@@ -1577,6 +1585,7 @@ declare const en: {
1577
1585
  input: string;
1578
1586
  modelChannels: string;
1579
1587
  modelsDev: string;
1588
+ modelCatalog: string;
1580
1589
  baseUrl: string;
1581
1590
  channelApiKey: string;
1582
1591
  apiKey: string;
@@ -1761,7 +1770,7 @@ declare const en: {
1761
1770
  lookupFailure: (ref: string, reason: Extract<import("../index.js").ModelLookup, {
1762
1771
  ok: false;
1763
1772
  }>["reason"], list: string, hasCandidates: boolean) => string;
1764
- source: (source: import("../ai/providers/enrich.js").FieldSource) => string;
1773
+ source: (source: import("../ai/providers/enrich.js").FieldSource | "catalog-alias") => string;
1765
1774
  unmatched: string;
1766
1775
  match: (kind: import("../ai/providers/models-dev.js").MatchKind, ref: string, normalized: string | undefined) => string;
1767
1776
  consensus: (key: string, entries: number, groups: number, best: number, signature: string) => string;
@@ -2172,6 +2181,7 @@ declare const en: {
2172
2181
  "compaction.enabled": string;
2173
2182
  "compaction.reserveTokens": string;
2174
2183
  "compaction.keepRecentTokens": string;
2184
+ "compaction.contextBudget": string;
2175
2185
  "compaction.prune.keepResults": string;
2176
2186
  "compaction.prune.clearAtLeast": string;
2177
2187
  "cache.warming": string;
@@ -2180,6 +2190,7 @@ declare const en: {
2180
2190
  "cache.missNotices": string;
2181
2191
  "cache.warmSubagents": string;
2182
2192
  "request.idleTimeoutMs": string;
2193
+ "request.streamIdleTimeoutMs": string;
2183
2194
  "retry.enabled": string;
2184
2195
  "retry.maxRetries": string;
2185
2196
  "retry.baseDelayMs": string;
@@ -156,6 +156,7 @@ export declare const en: {
156
156
  invalidCacheWarming: (value: string) => string;
157
157
  invalidCacheRetention: (value: string) => string;
158
158
  invalidIdleTimeout: (value: string) => string;
159
+ invalidStreamIdleTimeout: (value: string) => string;
159
160
  notSessionManager: string;
160
161
  apiNotImplemented: (ref: string, api: string, viaOpenrouter: boolean) => string;
161
162
  appendToolFailed: (name: string, message: string) => string;
@@ -321,6 +322,7 @@ export declare const zh: {
321
322
  invalidCacheWarming: (value: string) => string;
322
323
  invalidCacheRetention: (value: string) => string;
323
324
  invalidIdleTimeout: (value: string) => string;
325
+ invalidStreamIdleTimeout: (value: string) => string;
324
326
  notSessionManager: string;
325
327
  apiNotImplemented: (ref: string, api: string, viaOpenrouter: boolean) => string;
326
328
  appendToolFailed: (name: string, message: string) => string;
@@ -144,6 +144,7 @@ export const en = {
144
144
  invalidCacheWarming: (value) => `AMA_CACHE_WARMING=${value} is invalid (off | streaming | idle), ignored`,
145
145
  invalidCacheRetention: (value) => `AMA_CACHE_RETENTION=${value} is invalid (none | short | long), ignored`,
146
146
  invalidIdleTimeout: (value) => `AMA_IDLE_TIMEOUT_MS=${value} is invalid (expected milliseconds ≥ 0), ignored`,
147
+ invalidStreamIdleTimeout: (value) => `AMA_STREAM_IDLE_TIMEOUT_MS=${value} is invalid (expected milliseconds ≥ 0), ignored`,
147
148
  notSessionManager: "The composition root only accepts SessionManager instances (created by sessions.open)",
148
149
  apiNotImplemented: (ref, api, viaOpenrouter) => `Protocol ${api} of model ${ref} is not implemented yet` +
149
150
  (viaOpenrouter ? "; go through openrouter for now" : ""),
@@ -294,6 +295,7 @@ export const zh = {
294
295
  invalidCacheWarming: (value) => `AMA_CACHE_WARMING=${value} 无效(off | streaming | idle),已忽略`,
295
296
  invalidCacheRetention: (value) => `AMA_CACHE_RETENTION=${value} 无效(none | short | long),已忽略`,
296
297
  invalidIdleTimeout: (value) => `AMA_IDLE_TIMEOUT_MS=${value} 无效(应为不小于 0 的毫秒数),已忽略`,
298
+ invalidStreamIdleTimeout: (value) => `AMA_STREAM_IDLE_TIMEOUT_MS=${value} 无效(应为不小于 0 的毫秒数),已忽略`,
297
299
  notSessionManager: "组装根只接受 SessionManager 实例(由 sessions.open 创建)",
298
300
  apiNotImplemented: (ref, api, viaOpenrouter) => `模型 ${ref} 的协议 ${api} 尚未实现` + (viaOpenrouter ? ";过渡期请经 openrouter 调用" : ""),
299
301
  appendToolFailed: (name, message) => `追加工具 ${name} 失败:${message}`,
@@ -23,6 +23,7 @@ export declare const en: {
23
23
  "compaction.enabled": string;
24
24
  "compaction.reserveTokens": string;
25
25
  "compaction.keepRecentTokens": string;
26
+ "compaction.contextBudget": string;
26
27
  "compaction.prune": string;
27
28
  "compaction.prune.keepResults": string;
28
29
  "compaction.prune.clearAtLeast": string;
@@ -42,6 +43,7 @@ export declare const en: {
42
43
  "codemode.mode": string;
43
44
  "codemode.inlineBudget": string;
44
45
  "codemode.requireStrict": string;
46
+ "codemode.maxHeapMb": string;
45
47
  hooks: string;
46
48
  "hooks.timeoutMs": string;
47
49
  ui: string;
@@ -81,6 +83,7 @@ export declare const en: {
81
83
  cache: string;
82
84
  request: string;
83
85
  "request.idleTimeoutMs": string;
86
+ "request.streamIdleTimeoutMs": string;
84
87
  "cache.warming": string;
85
88
  "cache.retention": string;
86
89
  "cache.minSavingsUsd": string;
@@ -110,6 +113,7 @@ export declare const en: {
110
113
  subagents: string;
111
114
  "subagents.maxConcurrent": string;
112
115
  "subagents.maxPending": string;
116
+ "subagents.retainSessions": string;
113
117
  "subagents.defaultModel": string;
114
118
  "subagents.background": string;
115
119
  "subagents.autoBackgroundAfterMs": string;
@@ -147,6 +151,7 @@ export declare const en: {
147
151
  "models.enabled": string;
148
152
  fallbackModel: string;
149
153
  "limits.maxTurns": string;
154
+ "compaction.contextBudget": string;
150
155
  "limits.maxCostUsd": string;
151
156
  "ui.replyLanguage": string;
152
157
  "ui.agentBar": string;
@@ -172,6 +177,7 @@ export declare const zh: {
172
177
  "compaction.enabled": string;
173
178
  "compaction.reserveTokens": string;
174
179
  "compaction.keepRecentTokens": string;
180
+ "compaction.contextBudget": string;
175
181
  "compaction.prune": string;
176
182
  "compaction.prune.keepResults": string;
177
183
  "compaction.prune.clearAtLeast": string;
@@ -191,6 +197,7 @@ export declare const zh: {
191
197
  "codemode.mode": string;
192
198
  "codemode.inlineBudget": string;
193
199
  "codemode.requireStrict": string;
200
+ "codemode.maxHeapMb": string;
194
201
  hooks: string;
195
202
  "hooks.timeoutMs": string;
196
203
  ui: string;
@@ -230,6 +237,7 @@ export declare const zh: {
230
237
  cache: string;
231
238
  request: string;
232
239
  "request.idleTimeoutMs": string;
240
+ "request.streamIdleTimeoutMs": string;
233
241
  "cache.warming": string;
234
242
  "cache.retention": string;
235
243
  "cache.minSavingsUsd": string;
@@ -259,6 +267,7 @@ export declare const zh: {
259
267
  subagents: string;
260
268
  "subagents.maxConcurrent": string;
261
269
  "subagents.maxPending": string;
270
+ "subagents.retainSessions": string;
262
271
  "subagents.defaultModel": string;
263
272
  "subagents.background": string;
264
273
  "subagents.autoBackgroundAfterMs": string;
@@ -296,6 +305,7 @@ export declare const zh: {
296
305
  "models.enabled": string;
297
306
  fallbackModel: string;
298
307
  "limits.maxTurns": string;
308
+ "compaction.contextBudget": string;
299
309
  "limits.maxCostUsd": string;
300
310
  "ui.replyLanguage": string;
301
311
  "ui.agentBar": string;
@@ -23,6 +23,7 @@ const dynamicDefaultsEn = {
23
23
  "models.enabled": "unset: /model shows every model of configured providers",
24
24
  fallbackModel: "unset: no fallback",
25
25
  "limits.maxTurns": "unset: unlimited",
26
+ "compaction.contextBudget": "unset: the model's context window",
26
27
  "limits.maxCostUsd": "unset: unlimited",
27
28
  "ui.replyLanguage": "unset: no reply-language rule is appended (zero-byte change)",
28
29
  "ui.agentBar": "auto (embedding hosts turn it off in their profile)",
@@ -46,6 +47,7 @@ const dynamicDefaultsZh = {
46
47
  "models.enabled": "不设:/model 显示已配置供应商的全部模型",
47
48
  fallbackModel: "不设:不回退",
48
49
  "limits.maxTurns": "不设:不限",
50
+ "compaction.contextBudget": "不设:模型的上下文窗口",
49
51
  "limits.maxCostUsd": "不设:不限",
50
52
  "ui.replyLanguage": "不设:不追加回复语言规则(零字节变化)",
51
53
  "ui.agentBar": "auto(嵌入宿主要关在自己的 profile 写 off)",
@@ -70,6 +72,7 @@ const keysEn = {
70
72
  "compaction.enabled": "Compact automatically when the context nears its limit",
71
73
  "compaction.reserveTokens": "Tokens reserved for the reply; compaction starts when less is left",
72
74
  "compaction.keepRecentTokens": "Tokens of recent messages kept verbatim when compacting",
75
+ "compaction.contextBudget": "Soft context window (tokens, at least 32768): pruning, compaction and context-pressure notices use min(model window, this value); lower it to keep long sessions cheaper on large-window models",
73
76
  "compaction.prune": "Tier-one pruning (old tool results replaced with placeholders); user level only (effective from wave 5 W5-H1)",
74
77
  "compaction.prune.keepResults": "Keep the most recent N tool results unpruned",
75
78
  "compaction.prune.clearAtLeast": "Prune only when at least this many tokens are saved (avoids breaking the cache too often); auto = max(20000, 0.1 × context budget)",
@@ -89,6 +92,7 @@ const keysEn = {
89
92
  "codemode.mode": "off | on | only; when unset it follows the preset: default → on (Node ≥ 25; Node 22 / 24 → off), codemode-only → only, minimal / coordinator → off; project level only accepts off",
90
93
  "codemode.inlineBudget": "Budget (estimated tokens) for inlining tool declarations in the description in only mode; beyond it only names are listed",
91
94
  "codemode.requireStrict": "true: disable codemode when the runtime Node does not isolate the network (Node 22 / 24)",
95
+ "codemode.maxHeapMb": "V8 heap limit (MB) for the script child process; a script that exceeds it ends with an error; 0 sets no limit",
92
96
  hooks: "Hook settings (the hooks themselves live in hooks.json)",
93
97
  "hooks.timeoutMs": "Default timeout for a single hook command (ms)",
94
98
  ui: "Terminal interface",
@@ -127,7 +131,8 @@ const keysEn = {
127
131
  "skills.dirs": "Extra skill directories; accumulated across levels",
128
132
  cache: "Prompt caching; the whole section is user level only",
129
133
  request: "Model requests; the whole section is user level / profile only",
130
- "request.idleTimeoutMs": "Stream idle timeout (ms): waiting longer for headers or between two chunks counts as stuck and is retried as a retryable error; 0 disables; AMA_IDLE_TIMEOUT_MS overrides",
134
+ "request.idleTimeoutMs": "Response idle timeout (ms): waiting longer than this for the response headers counts as stuck and is retried as a retryable error (gaps inside the stream use request.streamIdleTimeoutMs); 0 disables; AMA_IDLE_TIMEOUT_MS overrides",
135
+ "request.streamIdleTimeoutMs": "Idle limit between two chunks once the stream has started (ms); longer than the header wait because reasoning endpoints can stay silent while thinking; 0 disables; AMA_STREAM_IDLE_TIMEOUT_MS overrides",
131
136
  "cache.warming": "Warming: off disables, streaming warms while generating, idle also warms while idle",
132
137
  "cache.retention": "Cache retention tier: none, short, long (when the provider supports it)",
133
138
  "cache.minSavingsUsd": "Minimum expected savings (USD) for warming",
@@ -157,6 +162,7 @@ const keysEn = {
157
162
  subagents: "ama's own task sub-sessions; user level only except background / autoBackgroundAfterMs (effective from wave 5 W5-G)",
158
163
  "subagents.maxConcurrent": "Sub-sessions running at the same time",
159
164
  "subagents.maxPending": "Queue limit; task fails beyond it",
165
+ "subagents.retainSessions": "Finished sub-sessions kept in memory (least recently used first out); others reopen from their session file when continued",
160
166
  "subagents.defaultModel": "Default sub-session model provider/model[@channel]",
161
167
  "subagents.background": "Whether task runs in the background by default: auto = background in the TUI / RPC / ACP and foreground with -p; always / never are fixed. The call argument and the agent type's background: override it; user, project and host level",
162
168
  "subagents.autoBackgroundAfterMs": "Move a foreground task to the background after it has run this many milliseconds; 0 disables; user and project level",
@@ -194,6 +200,7 @@ const keysZh = {
194
200
  "compaction.enabled": "上下文接近上限时自动压缩",
195
201
  "compaction.reserveTokens": "为回复预留的 token;剩余不足时触发压缩",
196
202
  "compaction.keepRecentTokens": "压缩时原样保留的最近消息 token",
203
+ "compaction.contextBudget": "软窗口(token,至少 32768):裁剪、压缩与上下文余量提示按 min(模型窗口, 它) 计算;大窗口模型调低它可让长会话更省钱",
197
204
  "compaction.prune": "档一裁剪(旧工具结果换成占位);只认用户级(第五波 W5-H1 起生效)",
198
205
  "compaction.prune.keepResults": "保留最近 N 个工具结果不裁",
199
206
  "compaction.prune.clearAtLeast": "一次至少能省这么多 token 才裁(避免频繁打断缓存);auto = max(20000, 0.1 × 上下文预算)",
@@ -213,6 +220,7 @@ const keysZh = {
213
220
  "codemode.mode": "off | on | only;不写时跟随预设:default → on(Node ≥ 25;Node 22 / 24 → off)、codemode-only → only、minimal / coordinator → off;项目级只接受 off",
214
221
  "codemode.inlineBudget": "only 模式在描述里内联工具声明的预算(估算 token),超出只列名字",
215
222
  "codemode.requireStrict": "true:运行时 Node 不隔离网络(Node 22 / 24)时直接禁用 codemode",
223
+ "codemode.maxHeapMb": "脚本子进程的 V8 堆上限(MB),超出时脚本以错误结束;0 不设上限",
216
224
  hooks: "Hook 设置(Hook 本身写在 hooks.json)",
217
225
  "hooks.timeoutMs": "单个 Hook 命令的缺省超时(毫秒)",
218
226
  ui: "终端界面",
@@ -251,7 +259,8 @@ const keysZh = {
251
259
  "skills.dirs": "追加的 Skill 目录;各层累加",
252
260
  cache: "提示缓存;整段只认用户级",
253
261
  request: "模型请求;整段只认用户级 / profile",
254
- "request.idleTimeoutMs": "流空闲超时(毫秒):等响应头或两块数据之间超过即判卡住并按可重试错误重试;0 关闭;AMA_IDLE_TIMEOUT_MS 覆盖",
262
+ "request.idleTimeoutMs": "响应头等待超时(毫秒):等响应头超过即判卡住并按可重试错误重试(流中两块数据之间由 request.streamIdleTimeoutMs 管);0 关闭;AMA_IDLE_TIMEOUT_MS 覆盖",
263
+ "request.streamIdleTimeoutMs": "流开始后两块数据之间的空闲上限(毫秒);比等响应头宽,因为推理端点思考时可能长时间没有字节;0 关闭;AMA_STREAM_IDLE_TIMEOUT_MS 覆盖",
255
264
  "cache.warming": "保温:off 关闭,streaming 生成期间保温,idle 空闲时也保温",
256
265
  "cache.retention": "缓存时长档:none、short、long(供应商支持时)",
257
266
  "cache.minSavingsUsd": "保温的最低期望节省(美元)",
@@ -281,6 +290,7 @@ const keysZh = {
281
290
  subagents: "ama 自己的 task 子会话;除 background / autoBackgroundAfterMs 外只认用户级(第五波 W5-G 起生效)",
282
291
  "subagents.maxConcurrent": "同时运行的子会话数",
283
292
  "subagents.maxPending": "排队上限,超出时 task 报错",
293
+ "subagents.retainSessions": "内存中保留的已结束子会话数(最久未用的先释放),其余续聊时从会话文件重开",
284
294
  "subagents.defaultModel": "子会话缺省模型 provider/model[@channel]",
285
295
  "subagents.background": "task 缺省是否后台:auto = TUI / RPC / ACP 下后台、-p 下前台;always / never 固定。调用参数与类型定义的 background: 优先;用户、项目、宿主级都认",
286
296
  "subagents.autoBackgroundAfterMs": "前台任务运行超过该毫秒数自动转后台;0 关闭;用户、项目级都认",
@@ -23,6 +23,7 @@ export declare const en: {
23
23
  "compaction.enabled": string;
24
24
  "compaction.reserveTokens": string;
25
25
  "compaction.keepRecentTokens": string;
26
+ "compaction.contextBudget": string;
26
27
  "compaction.prune": string;
27
28
  "compaction.prune.keepResults": string;
28
29
  "compaction.prune.clearAtLeast": string;
@@ -42,6 +43,7 @@ export declare const en: {
42
43
  "codemode.mode": string;
43
44
  "codemode.inlineBudget": string;
44
45
  "codemode.requireStrict": string;
46
+ "codemode.maxHeapMb": string;
45
47
  hooks: string;
46
48
  "hooks.timeoutMs": string;
47
49
  ui: string;
@@ -81,6 +83,7 @@ export declare const en: {
81
83
  cache: string;
82
84
  request: string;
83
85
  "request.idleTimeoutMs": string;
86
+ "request.streamIdleTimeoutMs": string;
84
87
  "cache.warming": string;
85
88
  "cache.retention": string;
86
89
  "cache.minSavingsUsd": string;
@@ -110,6 +113,7 @@ export declare const en: {
110
113
  subagents: string;
111
114
  "subagents.maxConcurrent": string;
112
115
  "subagents.maxPending": string;
116
+ "subagents.retainSessions": string;
113
117
  "subagents.defaultModel": string;
114
118
  "subagents.background": string;
115
119
  "subagents.autoBackgroundAfterMs": string;
@@ -147,6 +151,7 @@ export declare const en: {
147
151
  "models.enabled": string;
148
152
  fallbackModel: string;
149
153
  "limits.maxTurns": string;
154
+ "compaction.contextBudget": string;
150
155
  "limits.maxCostUsd": string;
151
156
  "ui.replyLanguage": string;
152
157
  "ui.agentBar": string;
@@ -171,6 +176,7 @@ export declare const en: {
171
176
  stringArray: string;
172
177
  array: string;
173
178
  modelsDev: string;
179
+ catalog: string;
174
180
  modelsEnabled: string;
175
181
  noChannels: string;
176
182
  unknownChannelOf: (name: string, available: readonly string[]) => string;
@@ -257,6 +263,7 @@ export declare const en: {
257
263
  input: string;
258
264
  modelChannels: string;
259
265
  modelsDev: string;
266
+ modelCatalog: string;
260
267
  baseUrl: string;
261
268
  channelApiKey: string;
262
269
  apiKey: string;
@@ -284,6 +291,7 @@ export declare const zh: {
284
291
  "compaction.enabled": string;
285
292
  "compaction.reserveTokens": string;
286
293
  "compaction.keepRecentTokens": string;
294
+ "compaction.contextBudget": string;
287
295
  "compaction.prune": string;
288
296
  "compaction.prune.keepResults": string;
289
297
  "compaction.prune.clearAtLeast": string;
@@ -303,6 +311,7 @@ export declare const zh: {
303
311
  "codemode.mode": string;
304
312
  "codemode.inlineBudget": string;
305
313
  "codemode.requireStrict": string;
314
+ "codemode.maxHeapMb": string;
306
315
  hooks: string;
307
316
  "hooks.timeoutMs": string;
308
317
  ui: string;
@@ -342,6 +351,7 @@ export declare const zh: {
342
351
  cache: string;
343
352
  request: string;
344
353
  "request.idleTimeoutMs": string;
354
+ "request.streamIdleTimeoutMs": string;
345
355
  "cache.warming": string;
346
356
  "cache.retention": string;
347
357
  "cache.minSavingsUsd": string;
@@ -371,6 +381,7 @@ export declare const zh: {
371
381
  subagents: string;
372
382
  "subagents.maxConcurrent": string;
373
383
  "subagents.maxPending": string;
384
+ "subagents.retainSessions": string;
374
385
  "subagents.defaultModel": string;
375
386
  "subagents.background": string;
376
387
  "subagents.autoBackgroundAfterMs": string;
@@ -408,6 +419,7 @@ export declare const zh: {
408
419
  "models.enabled": string;
409
420
  fallbackModel: string;
410
421
  "limits.maxTurns": string;
422
+ "compaction.contextBudget": string;
411
423
  "limits.maxCostUsd": string;
412
424
  "ui.replyLanguage": string;
413
425
  "ui.agentBar": string;
@@ -431,6 +443,7 @@ export declare const zh: {
431
443
  stringArray: string;
432
444
  array: string;
433
445
  modelsDev: string;
446
+ catalog: string;
434
447
  modelsEnabled: string;
435
448
  noChannels: string;
436
449
  unknownChannelOf: (name: string, available: readonly string[]) => string;
@@ -509,6 +522,7 @@ export declare const zh: {
509
522
  input: string;
510
523
  modelChannels: string;
511
524
  modelsDev: string;
525
+ modelCatalog: string;
512
526
  baseUrl: string;
513
527
  channelApiKey: string;
514
528
  apiKey: string;
@@ -25,6 +25,7 @@ export const en = {
25
25
  stringArray: "should be an array of strings",
26
26
  array: "should be an array",
27
27
  modelsDev: `should be "provider/model" or false`,
28
+ catalog: `should be "provider/model" or false`,
28
29
  modelsEnabled: `should be "provider/model[@channel]" or "provider/*"`,
29
30
  noChannels: "the provider has no channels",
30
31
  unknownChannelOf: (name, available) => `channel "${name}" does not exist (available: ${available.join(", ")})`,
@@ -117,6 +118,7 @@ export const en = {
117
118
  input: '["text"] or ["text", "image"] (accepts images)',
118
119
  modelChannels: "Channels the model is mounted on; the first is preferred",
119
120
  modelsDev: 'models.dev entry "provider/model"; false disables enrichment',
121
+ modelCatalog: 'Built-in catalog entry "provider/model" whose intrinsic properties this model inherits; matched by id alias when unset; false disables',
120
122
  baseUrl: "Endpoint address",
121
123
  channelApiKey: "$ENV / ${ENV} / !command / literal; defaults to the provider's key",
122
124
  apiKey: "$ENV / ${ENV} / !command / literal",
@@ -145,6 +147,7 @@ export const zh = {
145
147
  stringArray: "应为字符串数组",
146
148
  array: "应为数组",
147
149
  modelsDev: `应为 "provider/model" 或 false`,
150
+ catalog: `应为 "provider/model" 或 false`,
148
151
  modelsEnabled: `应为 "provider/model[@channel]" 或 "provider/*"`,
149
152
  noChannels: "供应商没有 channels",
150
153
  unknownChannelOf: (name, available) => `渠道 "${name}" 不存在(可用:${available.join(", ")})`,
@@ -229,6 +232,7 @@ export const zh = {
229
232
  input: '["text"] 或 ["text", "image"](收图片)',
230
233
  modelChannels: "挂载的渠道,第一个是首选",
231
234
  modelsDev: 'models.dev 条目 "provider/model";false 关闭补全',
235
+ modelCatalog: '继承其固有属性的内置目录条目 "provider/model";不写时按 id 别名自动匹配;false 关闭',
232
236
  baseUrl: "接口地址",
233
237
  channelApiKey: "$ENV / ${ENV} / !command / 字面量;缺省用供应商的 key",
234
238
  apiKey: "$ENV / ${ENV} / !command / 字面量",
@@ -25,7 +25,8 @@ export declare const en: {
25
25
  lookupFailure: (ref: string, reason: Extract<ModelLookup, {
26
26
  ok: false;
27
27
  }>["reason"], list: string, hasCandidates: boolean) => string;
28
- source: (source: FieldSource) => string;
28
+ /** [ME-C0] `catalog-alias`:中转 / 自定义模型按 id 匹配内置目录后继承的字段(ME-D 起使用)。 */
29
+ source: (source: FieldSource | "catalog-alias") => string;
29
30
  unmatched: string;
30
31
  match: (kind: MatchKind, ref: string, normalized: string | undefined) => string;
31
32
  consensus: (key: string, entries: number, groups: number, best: number, signature: string) => string;
@@ -59,7 +60,7 @@ export declare const zh: {
59
60
  };
60
61
  models: {
61
62
  lookupFailure: (ref: string, reason: "not_found" | "ambiguous" | "provider_not_found" | "channel_not_found", list: string, hasCandidates: boolean) => string;
62
- source: (source: FieldSource) => "config" | "目录" | "缺省" | "models.dev";
63
+ source: (source: FieldSource) => "config" | "目录" | "缺省" | "models.dev" | "目录(按 id 匹配)";
63
64
  unmatched: string;
64
65
  match: (kind: MatchKind, ref: string, normalized: string | undefined) => string;
65
66
  consensus: (key: string, entries: number, groups: number, best: number, signature: string) => string;
@@ -49,7 +49,14 @@ export const en = {
49
49
  : `model not found: ${ref} (ama models list shows available models)`;
50
50
  }
51
51
  },
52
- source: (source) => source === "catalog" ? "catalog" : source === "default" ? "default" : source,
52
+ /** [ME-C0] `catalog-alias`:中转 / 自定义模型按 id 匹配内置目录后继承的字段(ME-D 起使用)。 */
53
+ source: (source) => source === "catalog"
54
+ ? "catalog"
55
+ : source === "catalog-alias"
56
+ ? "catalog (via id)"
57
+ : source === "default"
58
+ ? "default"
59
+ : source,
53
60
  unmatched: "unmatched",
54
61
  match: (kind, ref, normalized) => {
55
62
  const label = {
@@ -124,7 +131,13 @@ export const zh = {
124
131
  : `模型不存在:${ref}(ama models list 查看可用模型)`;
125
132
  }
126
133
  },
127
- source: (source) => (source === "catalog" ? "目录" : source === "default" ? "缺省" : source),
134
+ source: (source) => source === "catalog"
135
+ ? "目录"
136
+ : source === "catalog-alias"
137
+ ? "目录(按 id 匹配)"
138
+ : source === "default"
139
+ ? "缺省"
140
+ : source,
128
141
  unmatched: "未匹配",
129
142
  match: (kind, ref, normalized) => {
130
143
  const label = {
@@ -144,6 +144,7 @@ export declare const en: {
144
144
  missModel: string;
145
145
  missTools: string;
146
146
  missSystem: string;
147
+ missSystemSections: (sections: string) => string;
147
148
  missPrefix: string;
148
149
  missEvicted: string;
149
150
  missNotice: (reason: string, tokens: string, cost: string | undefined) => string;
@@ -387,6 +388,7 @@ export declare const zh: {
387
388
  missModel: string;
388
389
  missTools: string;
389
390
  missSystem: string;
391
+ missSystemSections: (sections: string) => string;
390
392
  missPrefix: string;
391
393
  missEvicted: string;
392
394
  missNotice: (reason: string, tokens: string, cost: string | undefined) => string;
@@ -113,6 +113,7 @@ export const en = {
113
113
  missModel: "after switching model",
114
114
  missTools: "tool list changed",
115
115
  missSystem: "system prompt changed",
116
+ missSystemSections: (sections) => `system prompt changed: ${sections}`,
116
117
  missPrefix: "prefix changed",
117
118
  missEvicted: "evicted by the server",
118
119
  missNotice: (reason, tokens, cost) => `Cache miss (${reason}): re-billed ${tokens} tokens${cost === undefined ? "" : ` (about ${cost})`}`,
@@ -362,6 +363,7 @@ export const zh = {
362
363
  missModel: "切换模型后",
363
364
  missTools: "工具表变化",
364
365
  missSystem: "系统提示变化",
366
+ missSystemSections: (sections) => `系统提示变化:${sections}`,
365
367
  missPrefix: "前缀变化",
366
368
  missEvicted: "服务端已淘汰",
367
369
  missNotice: (reason, tokens, cost) => `缓存未命中(${reason}):重计费 ${tokens} token${cost === undefined ? "" : `(约 ${cost})`}`,
@@ -58,6 +58,7 @@ export declare const en: {
58
58
  "compaction.enabled": string;
59
59
  "compaction.reserveTokens": string;
60
60
  "compaction.keepRecentTokens": string;
61
+ "compaction.contextBudget": string;
61
62
  "compaction.prune.keepResults": string;
62
63
  "compaction.prune.clearAtLeast": string;
63
64
  "cache.warming": string;
@@ -66,6 +67,7 @@ export declare const en: {
66
67
  "cache.missNotices": string;
67
68
  "cache.warmSubagents": string;
68
69
  "request.idleTimeoutMs": string;
70
+ "request.streamIdleTimeoutMs": string;
69
71
  "retry.enabled": string;
70
72
  "retry.maxRetries": string;
71
73
  "retry.baseDelayMs": string;
@@ -237,6 +239,7 @@ export declare const zh: {
237
239
  "compaction.enabled": string;
238
240
  "compaction.reserveTokens": string;
239
241
  "compaction.keepRecentTokens": string;
242
+ "compaction.contextBudget": string;
240
243
  "compaction.prune.keepResults": string;
241
244
  "compaction.prune.clearAtLeast": string;
242
245
  "cache.warming": string;
@@ -245,6 +248,7 @@ export declare const zh: {
245
248
  "cache.missNotices": string;
246
249
  "cache.warmSubagents": string;
247
250
  "request.idleTimeoutMs": string;
251
+ "request.streamIdleTimeoutMs": string;
248
252
  "retry.enabled": string;
249
253
  "retry.maxRetries": string;
250
254
  "retry.baseDelayMs": string;
@@ -58,6 +58,7 @@ export const en = {
58
58
  "compaction.enabled": "Auto compaction",
59
59
  "compaction.reserveTokens": "Reserve tokens",
60
60
  "compaction.keepRecentTokens": "Keep recent tokens",
61
+ "compaction.contextBudget": "Context budget",
61
62
  "compaction.prune.keepResults": "Prune: keep results",
62
63
  "compaction.prune.clearAtLeast": "Prune: clear at least",
63
64
  "cache.warming": "Cache warming",
@@ -65,7 +66,8 @@ export const en = {
65
66
  "cache.minSavingsUsd": "Warming min savings ($)",
66
67
  "cache.missNotices": "Cache miss notices",
67
68
  "cache.warmSubagents": "Warm subagents",
68
- "request.idleTimeoutMs": "Stream idle timeout (ms)",
69
+ "request.idleTimeoutMs": "Response idle timeout (ms)",
70
+ "request.streamIdleTimeoutMs": "In-stream idle timeout (ms)",
69
71
  "retry.enabled": "Auto retry",
70
72
  "retry.maxRetries": "Max retries",
71
73
  "retry.baseDelayMs": "Retry base delay (ms)",
@@ -231,6 +233,7 @@ export const zh = {
231
233
  "compaction.enabled": "自动压缩",
232
234
  "compaction.reserveTokens": "预留 token",
233
235
  "compaction.keepRecentTokens": "保留最近 token",
236
+ "compaction.contextBudget": "上下文预算",
234
237
  "compaction.prune.keepResults": "裁剪:保留结果数",
235
238
  "compaction.prune.clearAtLeast": "裁剪:至少省",
236
239
  "cache.warming": "缓存保温",
@@ -238,7 +241,8 @@ export const zh = {
238
241
  "cache.minSavingsUsd": "保温最低节省(美元)",
239
242
  "cache.missNotices": "未命中提示",
240
243
  "cache.warmSubagents": "子会话保温",
241
- "request.idleTimeoutMs": "流空闲超时(毫秒)",
244
+ "request.idleTimeoutMs": "响应头等待超时(毫秒)",
245
+ "request.streamIdleTimeoutMs": "流中空闲超时(毫秒)",
242
246
  "retry.enabled": "自动重试",
243
247
  "retry.maxRetries": "最多重试次数",
244
248
  "retry.baseDelayMs": "重试首次等待(毫秒)",
@@ -192,7 +192,7 @@ export declare const en: {
192
192
  image: string;
193
193
  channels: (names: readonly string[]) => string;
194
194
  price: string;
195
- sources: (parts: readonly string[], match: string | undefined, noTools: boolean) => string;
195
+ sources: (parts: readonly string[], match: string | undefined, noTools: boolean, catalog?: string) => string;
196
196
  };
197
197
  cacheProbe: {
198
198
  adviceSilent: (provider: string, cacheFieldPresent: boolean) => string;
@@ -478,7 +478,7 @@ export declare const zh: {
478
478
  image: string;
479
479
  channels: (names: readonly string[]) => string;
480
480
  price: string;
481
- sources: (parts: readonly string[], match: string | undefined, noTools: boolean) => string;
481
+ sources: (parts: readonly string[], match: string | undefined, noTools: boolean, catalog: string | undefined) => string;
482
482
  };
483
483
  cacheProbe: {
484
484
  adviceSilent: (provider: string, cacheFieldPresent: boolean) => string;
@@ -196,7 +196,8 @@ export const en = {
196
196
  image: "images",
197
197
  channels: (names) => `channels ${names.join(",")}`,
198
198
  price: "price",
199
- sources: (parts, match, noTools) => `sources ${parts.join(" · ")}` +
199
+ sources: (parts, match, noTools, catalog) => `sources ${parts.join(" · ")}` +
200
+ (catalog !== undefined ? `; catalog ${catalog}` : "") +
200
201
  (match !== undefined ? `; models.dev ${match}` : "") +
201
202
  (noTools ? "; no tool calling" : ""),
202
203
  },
@@ -429,7 +430,8 @@ export const zh = {
429
430
  image: "图片",
430
431
  channels: (names) => `渠道 ${names.join(",")}`,
431
432
  price: "价格",
432
- sources: (parts, match, noTools) => `来源 ${parts.join(" · ")}` +
433
+ sources: (parts, match, noTools, catalog) => `来源 ${parts.join(" · ")}` +
434
+ (catalog !== undefined ? `;目录 ${catalog}` : "") +
433
435
  (match !== undefined ? `;models.dev ${match}` : "") +
434
436
  (noTools ? ";不支持工具调用" : ""),
435
437
  },