@ai-agent-forge/agent-forge 0.88.2 → 0.88.4

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 (460) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/bundled-plugins/agent-loop-policy/agent-forge.json +1 -1
  4. package/bundled-plugins/agent-loop-policy/plugin.json +1 -1
  5. package/bundled-plugins/coding-tools/agent-forge.json +1 -1
  6. package/bundled-plugins/coding-tools/plugin.json +1 -1
  7. package/bundled-plugins/compaction-policy/agent-forge.json +1 -1
  8. package/bundled-plugins/compaction-policy/plugin.json +1 -1
  9. package/bundled-plugins/overflow-policy/agent-forge.json +1 -1
  10. package/bundled-plugins/overflow-policy/plugin.json +1 -1
  11. package/bundled-plugins/provider-failover/agent-forge.json +1 -1
  12. package/bundled-plugins/provider-failover/plugin.json +1 -1
  13. package/bundled-plugins/retry-policy/agent-forge.json +1 -1
  14. package/bundled-plugins/retry-policy/plugin.json +1 -1
  15. package/dist/artifacts/paged-read.d.ts +6 -1
  16. package/dist/artifacts/paged-read.d.ts.map +1 -1
  17. package/dist/artifacts/paged-read.js.map +1 -1
  18. package/dist/bundle/.build-manifest.json +244 -234
  19. package/dist/bundle/chunks/{anthropic-messages-PLAKXR73.js → anthropic-messages-3FJHRAJL.js} +2 -2
  20. package/dist/bundle/chunks/anthropic.js +1 -1
  21. package/dist/bundle/chunks/{azure-openai-responses-OUWQ2AZD.js → azure-openai-responses-GCL47IDS.js} +1 -1
  22. package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
  23. package/dist/bundle/chunks/{chunk-6F5JWGKE.js → chunk-32YDZI4J.js} +1 -1
  24. package/dist/bundle/chunks/{chunk-LSP24WNH.js → chunk-755VNWIF.js} +12 -12
  25. package/dist/bundle/chunks/{chunk-DRQDKNXA.js → chunk-BVVSHK6W.js} +1 -1
  26. package/dist/bundle/chunks/{chunk-HTC5K5SM.js → chunk-HEL6TAWE.js} +95 -90
  27. package/dist/bundle/chunks/{chunk-6R7UI4IY.js → chunk-QDLOMKF6.js} +1 -1
  28. package/dist/bundle/chunks/{chunk-44I47ACN.js → chunk-V3ACW7VD.js} +1 -1
  29. package/dist/bundle/chunks/{google-generative-ai-DLII6DAT.js → google-generative-ai-6BMXWA44.js} +1 -1
  30. package/dist/bundle/chunks/{google-vertex-G7BZL7GM.js → google-vertex-6H7NLRTK.js} +1 -1
  31. package/dist/bundle/chunks/image-resize-worker.js +1 -1
  32. package/dist/bundle/chunks/{mistral-conversations-JXUK24ID.js → mistral-conversations-IXUHSFSJ.js} +1 -1
  33. package/dist/bundle/chunks/{openai-codex-responses-5GSGFIPG.js → openai-codex-responses-YHUAEVCM.js} +1 -1
  34. package/dist/bundle/chunks/openai-codex.js +1 -1
  35. package/dist/bundle/chunks/{openai-completions-EI2I6DTG.js → openai-completions-ULQCFC72.js} +1 -1
  36. package/dist/bundle/chunks/openai-responses-NLLAJDPS.js +2 -0
  37. package/dist/bundle/chunks/{openrouter-images-G4GQRUSG.js → openrouter-images-GZZQZXMS.js} +1 -1
  38. package/dist/bundle/chunks/openrouter.js +1 -1
  39. package/dist/bundle/chunks/{pi-messages-PWU2VJMR.js → pi-messages-EJTI2EJ3.js} +1 -1
  40. package/dist/bundle/chunks/virtual-modules-TQWEGNNZ.js +5 -0
  41. package/dist/bundle/cli.js +1 -1
  42. package/dist/bundle/client.js +1 -1
  43. package/dist/bundle/index.js +1 -1
  44. package/dist/bundle/rpc-entry.js +1 -1
  45. package/dist/cli/args.d.ts +0 -1
  46. package/dist/cli/args.d.ts.map +1 -1
  47. package/dist/cli/args.js +1 -4
  48. package/dist/cli/args.js.map +1 -1
  49. package/dist/cli/config-selector.d.ts.map +1 -1
  50. package/dist/cli/config-selector.js +1 -1
  51. package/dist/cli/config-selector.js.map +1 -1
  52. package/dist/cli/experimental/cli.d.ts +3 -3
  53. package/dist/cli/experimental/cli.d.ts.map +1 -1
  54. package/dist/cli/experimental/cli.js +2 -2
  55. package/dist/cli/experimental/cli.js.map +1 -1
  56. package/dist/cli/experimental/commands/agent-forge.d.ts +15 -0
  57. package/dist/cli/experimental/commands/agent-forge.d.ts.map +1 -0
  58. package/dist/cli/experimental/commands/{pi.js → agent-forge.js} +4 -4
  59. package/dist/cli/experimental/commands/agent-forge.js.map +1 -0
  60. package/dist/cli/startup-ui.d.ts.map +1 -1
  61. package/dist/cli/startup-ui.js +1 -1
  62. package/dist/cli/startup-ui.js.map +1 -1
  63. package/dist/config.d.ts +4 -4
  64. package/dist/config.d.ts.map +1 -1
  65. package/dist/config.js +7 -7
  66. package/dist/config.js.map +1 -1
  67. package/dist/core/agent-forge-manifest.d.ts +7 -0
  68. package/dist/core/agent-forge-manifest.d.ts.map +1 -0
  69. package/dist/core/{pi-manifest.js → agent-forge-manifest.js} +4 -4
  70. package/dist/core/agent-forge-manifest.js.map +1 -0
  71. package/dist/core/agent-session-compaction.d.ts +1 -1
  72. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  73. package/dist/core/agent-session-compaction.js +3 -3
  74. package/dist/core/agent-session-compaction.js.map +1 -1
  75. package/dist/core/agent-session-lifecycle.d.ts.map +1 -1
  76. package/dist/core/agent-session-lifecycle.js +12 -1
  77. package/dist/core/agent-session-lifecycle.js.map +1 -1
  78. package/dist/core/agent-session-projection.d.ts.map +1 -1
  79. package/dist/core/agent-session-projection.js +3 -3
  80. package/dist/core/agent-session-projection.js.map +1 -1
  81. package/dist/core/agent-session-services.d.ts +1 -1
  82. package/dist/core/agent-session-services.d.ts.map +1 -1
  83. package/dist/core/agent-session-services.js +1 -1
  84. package/dist/core/agent-session-services.js.map +1 -1
  85. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  86. package/dist/core/compaction/branch-summarization.js +1 -1
  87. package/dist/core/compaction/branch-summarization.js.map +1 -1
  88. package/dist/core/experimental.d.ts.map +1 -1
  89. package/dist/core/experimental.js +1 -3
  90. package/dist/core/experimental.js.map +1 -1
  91. package/dist/core/extensions/capability-plugin.d.ts.map +1 -1
  92. package/dist/core/extensions/capability-plugin.js +15 -8
  93. package/dist/core/extensions/capability-plugin.js.map +1 -1
  94. package/dist/core/extensions/capability-runtime-store.d.ts +20 -1
  95. package/dist/core/extensions/capability-runtime-store.d.ts.map +1 -1
  96. package/dist/core/extensions/capability-runtime-store.js +67 -0
  97. package/dist/core/extensions/capability-runtime-store.js.map +1 -1
  98. package/dist/core/extensions/capability-runtime-types.d.ts +14 -0
  99. package/dist/core/extensions/capability-runtime-types.d.ts.map +1 -1
  100. package/dist/core/extensions/capability-runtime-types.js +7 -1
  101. package/dist/core/extensions/capability-runtime-types.js.map +1 -1
  102. package/dist/core/extensions/capability-runtime.d.ts.map +1 -1
  103. package/dist/core/extensions/capability-runtime.js +144 -42
  104. package/dist/core/extensions/capability-runtime.js.map +1 -1
  105. package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
  106. package/dist/core/extensions/virtual-modules.js +12 -4
  107. package/dist/core/extensions/virtual-modules.js.map +1 -1
  108. package/dist/core/facade/coding-agent-facade.d.ts +1 -1
  109. package/dist/core/facade/coding-agent-facade.d.ts.map +1 -1
  110. package/dist/core/facade/coding-agent-facade.js +1 -1
  111. package/dist/core/facade/coding-agent-facade.js.map +1 -1
  112. package/dist/core/i18n/locales/zh-cn/core-contract-final.d.ts +1 -1
  113. package/dist/core/i18n/locales/zh-cn/core-contract-final.d.ts.map +1 -1
  114. package/dist/core/i18n/locales/zh-cn/core-contract-final.js +3 -3
  115. package/dist/core/i18n/locales/zh-cn/core-contract-final.js.map +1 -1
  116. package/dist/core/i18n/locales/zh-cn/core-contract-plugins.d.ts.map +1 -1
  117. package/dist/core/i18n/locales/zh-cn/core-contract-plugins.js +1 -1
  118. package/dist/core/i18n/locales/zh-cn/core-contract-plugins.js.map +1 -1
  119. package/dist/core/i18n/locales/zh-cn/core-errors.d.ts.map +1 -1
  120. package/dist/core/i18n/locales/zh-cn/core-errors.js +1 -1
  121. package/dist/core/i18n/locales/zh-cn/core-errors.js.map +1 -1
  122. package/dist/core/i18n/locales/zh-cn/tui-components-misc.d.ts.map +1 -1
  123. package/dist/core/i18n/locales/zh-cn/tui-components-misc.js +2 -0
  124. package/dist/core/i18n/locales/zh-cn/tui-components-misc.js.map +1 -1
  125. package/dist/core/model-resolver.d.ts +2 -0
  126. package/dist/core/model-resolver.d.ts.map +1 -1
  127. package/dist/core/model-resolver.js +4 -1
  128. package/dist/core/model-resolver.js.map +1 -1
  129. package/dist/core/package-resource-collection.d.ts.map +1 -1
  130. package/dist/core/package-resource-collection.js +5 -5
  131. package/dist/core/package-resource-collection.js.map +1 -1
  132. package/dist/core/provider-composer.d.ts.map +1 -1
  133. package/dist/core/provider-composer.js +3 -3
  134. package/dist/core/provider-composer.js.map +1 -1
  135. package/dist/core/resource-loader.d.ts.map +1 -1
  136. package/dist/core/resource-loader.js +1 -1
  137. package/dist/core/resource-loader.js.map +1 -1
  138. package/dist/core/sdk.d.ts +1 -1
  139. package/dist/core/sdk.d.ts.map +1 -1
  140. package/dist/core/sdk.js +6 -7
  141. package/dist/core/sdk.js.map +1 -1
  142. package/dist/core/session-manager.d.ts.map +1 -1
  143. package/dist/core/session-manager.js +4 -4
  144. package/dist/core/session-manager.js.map +1 -1
  145. package/dist/core/settings-manager.d.ts.map +1 -1
  146. package/dist/core/settings-manager.js +5 -10
  147. package/dist/core/settings-manager.js.map +1 -1
  148. package/dist/core/timings.d.ts.map +1 -1
  149. package/dist/core/timings.js +1 -3
  150. package/dist/core/timings.js.map +1 -1
  151. package/dist/core/tools/render-utils.d.ts +1 -1
  152. package/dist/core/tools/render-utils.d.ts.map +1 -1
  153. package/dist/core/tools/render-utils.js.map +1 -1
  154. package/dist/core/tools/tool-definition.d.ts +1 -1
  155. package/dist/core/tools/tool-definition.d.ts.map +1 -1
  156. package/dist/core/tools/tool-definition.js.map +1 -1
  157. package/dist/core/trace-retention.d.ts +16 -1
  158. package/dist/core/trace-retention.d.ts.map +1 -1
  159. package/dist/core/trace-retention.js +43 -20
  160. package/dist/core/trace-retention.js.map +1 -1
  161. package/dist/export-html/ansi-to-html.d.ts.map +1 -0
  162. package/dist/export-html/ansi-to-html.js.map +1 -0
  163. package/dist/{core/export-html → export-html}/index.d.ts +1 -1
  164. package/dist/export-html/index.d.ts.map +1 -0
  165. package/dist/{core/export-html → export-html}/index.js +5 -5
  166. package/dist/export-html/index.js.map +1 -0
  167. package/dist/{core/export-html → export-html}/tool-renderer.d.ts +2 -2
  168. package/dist/export-html/tool-renderer.d.ts.map +1 -0
  169. package/dist/export-html/tool-renderer.js.map +1 -0
  170. package/dist/{modes/interactive → host}/model-catalog-refresh.d.ts +1 -1
  171. package/dist/host/model-catalog-refresh.d.ts.map +1 -0
  172. package/dist/{modes/interactive → host}/model-catalog-refresh.js +1 -1
  173. package/dist/host/model-catalog-refresh.js.map +1 -0
  174. package/dist/index.d.ts +5 -5
  175. package/dist/index.d.ts.map +1 -1
  176. package/dist/index.js +12 -12
  177. package/dist/index.js.map +1 -1
  178. package/dist/main.d.ts.map +1 -1
  179. package/dist/main.js +25 -14
  180. package/dist/main.js.map +1 -1
  181. package/dist/modes/interactive/components/agents-view.d.ts.map +1 -1
  182. package/dist/modes/interactive/components/agents-view.js +1 -1
  183. package/dist/modes/interactive/components/agents-view.js.map +1 -1
  184. package/dist/modes/interactive/components/armin.d.ts.map +1 -1
  185. package/dist/modes/interactive/components/armin.js +1 -1
  186. package/dist/modes/interactive/components/armin.js.map +1 -1
  187. package/dist/modes/interactive/components/assistant-message.d.ts +3 -0
  188. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  189. package/dist/modes/interactive/components/assistant-message.js +83 -24
  190. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  191. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  192. package/dist/modes/interactive/components/bash-execution.js +1 -1
  193. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  194. package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
  195. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
  196. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  197. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  198. package/dist/modes/interactive/components/branch-summary-message.js +1 -1
  199. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  200. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  201. package/dist/modes/interactive/components/compaction-summary-message.js +1 -1
  202. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  203. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  204. package/dist/modes/interactive/components/config-selector.js +1 -1
  205. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  206. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  207. package/dist/modes/interactive/components/custom-entry.js +1 -1
  208. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  209. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  210. package/dist/modes/interactive/components/custom-message.js +1 -1
  211. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  212. package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
  213. package/dist/modes/interactive/components/daxnuts.js +1 -1
  214. package/dist/modes/interactive/components/daxnuts.js.map +1 -1
  215. package/dist/modes/interactive/components/dialog-editor.d.ts.map +1 -1
  216. package/dist/modes/interactive/components/dialog-editor.js +1 -1
  217. package/dist/modes/interactive/components/dialog-editor.js.map +1 -1
  218. package/dist/modes/interactive/components/dialog-input.d.ts.map +1 -1
  219. package/dist/modes/interactive/components/dialog-input.js +1 -1
  220. package/dist/modes/interactive/components/dialog-input.js.map +1 -1
  221. package/dist/modes/interactive/components/dialog-selector.d.ts.map +1 -1
  222. package/dist/modes/interactive/components/dialog-selector.js +1 -1
  223. package/dist/modes/interactive/components/dialog-selector.js.map +1 -1
  224. package/dist/modes/interactive/components/diff.d.ts.map +1 -1
  225. package/dist/modes/interactive/components/diff.js +1 -1
  226. package/dist/modes/interactive/components/diff.js.map +1 -1
  227. package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
  228. package/dist/modes/interactive/components/dynamic-border.js +1 -1
  229. package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
  230. package/dist/modes/interactive/components/first-time-setup.d.ts +1 -1
  231. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
  232. package/dist/modes/interactive/components/first-time-setup.js +1 -1
  233. package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
  234. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  235. package/dist/modes/interactive/components/footer.js +1 -1
  236. package/dist/modes/interactive/components/footer.js.map +1 -1
  237. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
  238. package/dist/modes/interactive/components/keybinding-hints.js +1 -1
  239. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
  240. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  241. package/dist/modes/interactive/components/login-dialog.js +1 -1
  242. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  243. package/dist/modes/interactive/components/mermaid.d.ts +1 -1
  244. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
  245. package/dist/modes/interactive/components/mermaid.js.map +1 -1
  246. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  247. package/dist/modes/interactive/components/model-selector.js +2 -2
  248. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  249. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  250. package/dist/modes/interactive/components/oauth-selector.js +1 -1
  251. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  252. package/dist/modes/interactive/components/plugin-manager-entry.d.ts.map +1 -1
  253. package/dist/modes/interactive/components/plugin-manager-entry.js +1 -1
  254. package/dist/modes/interactive/components/plugin-manager-entry.js.map +1 -1
  255. package/dist/modes/interactive/components/plugin-selection-entry.d.ts.map +1 -1
  256. package/dist/modes/interactive/components/plugin-selection-entry.js +1 -1
  257. package/dist/modes/interactive/components/plugin-selection-entry.js.map +1 -1
  258. package/dist/modes/interactive/components/queue-manager-selector.d.ts.map +1 -1
  259. package/dist/modes/interactive/components/queue-manager-selector.js +1 -1
  260. package/dist/modes/interactive/components/queue-manager-selector.js.map +1 -1
  261. package/dist/modes/interactive/components/render-types.d.ts +1 -1
  262. package/dist/modes/interactive/components/render-types.d.ts.map +1 -1
  263. package/dist/modes/interactive/components/render-types.js.map +1 -1
  264. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  265. package/dist/modes/interactive/components/scoped-models-selector.js +1 -1
  266. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  267. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  268. package/dist/modes/interactive/components/session-selector.js +2 -2
  269. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  270. package/dist/modes/interactive/components/settings-selector.d.ts +1 -1
  271. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  272. package/dist/modes/interactive/components/settings-selector.js +1 -1
  273. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  274. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
  275. package/dist/modes/interactive/components/settings-submenu.js +1 -1
  276. package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
  277. package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
  278. package/dist/modes/interactive/components/show-images-selector.js +1 -1
  279. package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
  280. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  281. package/dist/modes/interactive/components/skill-invocation-message.js +1 -1
  282. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  283. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  284. package/dist/modes/interactive/components/status-indicator.js +1 -1
  285. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  286. package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
  287. package/dist/modes/interactive/components/theme-selector.js +1 -1
  288. package/dist/modes/interactive/components/theme-selector.js.map +1 -1
  289. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  290. package/dist/modes/interactive/components/thinking-selector.js +1 -1
  291. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  292. package/dist/modes/interactive/components/tool-execution.d.ts +2 -0
  293. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  294. package/dist/modes/interactive/components/tool-execution.js +96 -4
  295. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  296. package/dist/modes/interactive/components/tool-run-group.d.ts.map +1 -1
  297. package/dist/modes/interactive/components/tool-run-group.js +1 -1
  298. package/dist/modes/interactive/components/tool-run-group.js.map +1 -1
  299. package/dist/modes/interactive/components/tree-list.d.ts.map +1 -1
  300. package/dist/modes/interactive/components/tree-list.js +1 -1
  301. package/dist/modes/interactive/components/tree-list.js.map +1 -1
  302. package/dist/modes/interactive/components/tree-render.d.ts.map +1 -1
  303. package/dist/modes/interactive/components/tree-render.js +1 -1
  304. package/dist/modes/interactive/components/tree-render.js.map +1 -1
  305. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  306. package/dist/modes/interactive/components/tree-selector.js +1 -1
  307. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  308. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  309. package/dist/modes/interactive/components/user-message-selector.js +1 -1
  310. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  311. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  312. package/dist/modes/interactive/components/user-message.js +1 -1
  313. package/dist/modes/interactive/components/user-message.js.map +1 -1
  314. package/dist/modes/interactive/components/workflow-view.d.ts.map +1 -1
  315. package/dist/modes/interactive/components/workflow-view.js +1 -1
  316. package/dist/modes/interactive/components/workflow-view.js.map +1 -1
  317. package/dist/modes/interactive/interactive-auth.d.ts +1 -1
  318. package/dist/modes/interactive/interactive-auth.d.ts.map +1 -1
  319. package/dist/modes/interactive/interactive-auth.js +1 -1
  320. package/dist/modes/interactive/interactive-auth.js.map +1 -1
  321. package/dist/modes/interactive/interactive-commands.d.ts +123 -6
  322. package/dist/modes/interactive/interactive-commands.d.ts.map +1 -1
  323. package/dist/modes/interactive/interactive-commands.js +691 -4
  324. package/dist/modes/interactive/interactive-commands.js.map +1 -1
  325. package/dist/modes/interactive/interactive-events.d.ts +174 -0
  326. package/dist/modes/interactive/interactive-events.d.ts.map +1 -0
  327. package/dist/modes/interactive/interactive-events.js +704 -0
  328. package/dist/modes/interactive/interactive-events.js.map +1 -0
  329. package/dist/modes/interactive/interactive-format.d.ts.map +1 -1
  330. package/dist/modes/interactive/interactive-format.js +1 -1
  331. package/dist/modes/interactive/interactive-format.js.map +1 -1
  332. package/dist/modes/interactive/interactive-lifecycle.d.ts +94 -0
  333. package/dist/modes/interactive/interactive-lifecycle.d.ts.map +1 -0
  334. package/dist/modes/interactive/interactive-lifecycle.js +177 -0
  335. package/dist/modes/interactive/interactive-lifecycle.js.map +1 -0
  336. package/dist/modes/interactive/interactive-mode.d.ts +240 -133
  337. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  338. package/dist/modes/interactive/interactive-mode.js +251 -2159
  339. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  340. package/dist/modes/interactive/interactive-queues.d.ts +96 -0
  341. package/dist/modes/interactive/interactive-queues.d.ts.map +1 -0
  342. package/dist/modes/interactive/interactive-queues.js +183 -0
  343. package/dist/modes/interactive/interactive-queues.js.map +1 -0
  344. package/dist/modes/interactive/interactive-selectors.d.ts +95 -5
  345. package/dist/modes/interactive/interactive-selectors.d.ts.map +1 -1
  346. package/dist/modes/interactive/interactive-selectors.js +517 -6
  347. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  348. package/dist/modes/interactive/startup-services.d.ts +31 -0
  349. package/dist/modes/interactive/startup-services.d.ts.map +1 -0
  350. package/dist/modes/interactive/startup-services.js +123 -0
  351. package/dist/modes/interactive/startup-services.js.map +1 -0
  352. package/dist/modes/memory-preheat.d.ts +11 -0
  353. package/dist/modes/memory-preheat.d.ts.map +1 -0
  354. package/dist/modes/memory-preheat.js +20 -0
  355. package/dist/modes/memory-preheat.js.map +1 -0
  356. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  357. package/dist/modes/rpc/rpc-mode.js +3 -1
  358. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  359. package/dist/plugins/ecosystem/node-package-install-host.d.ts +9 -1
  360. package/dist/plugins/ecosystem/node-package-install-host.d.ts.map +1 -1
  361. package/dist/plugins/ecosystem/node-package-install-host.js +79 -0
  362. package/dist/plugins/ecosystem/node-package-install-host.js.map +1 -1
  363. package/dist/remote/server-assembly.d.ts.map +1 -1
  364. package/dist/remote/server-assembly.js +7 -2
  365. package/dist/remote/server-assembly.js.map +1 -1
  366. package/dist/suites/builtin-suites.d.ts.map +1 -0
  367. package/dist/suites/builtin-suites.js.map +1 -0
  368. package/dist/suites/resolved-agent-profile.d.ts.map +1 -0
  369. package/dist/suites/resolved-agent-profile.js.map +1 -0
  370. package/dist/suites/suite-lifecycle.d.ts.map +1 -0
  371. package/dist/suites/suite-lifecycle.js.map +1 -0
  372. package/dist/suites/suite-loader.d.ts.map +1 -0
  373. package/dist/suites/suite-loader.js.map +1 -0
  374. package/dist/{modes/interactive/theme → theme}/dark.json +1 -1
  375. package/dist/{modes/interactive/theme → theme}/light.json +1 -1
  376. package/dist/{modes/interactive/theme → theme}/theme-controller.d.ts +1 -1
  377. package/dist/theme/theme-controller.d.ts.map +1 -0
  378. package/dist/{modes/interactive/theme → theme}/theme-controller.js +1 -1
  379. package/dist/theme/theme-controller.js.map +1 -0
  380. package/dist/{modes/interactive/theme → theme}/theme.d.ts +1 -1
  381. package/dist/theme/theme.d.ts.map +1 -0
  382. package/dist/{modes/interactive/theme → theme}/theme.js +5 -5
  383. package/dist/theme/theme.js.map +1 -0
  384. package/docs/compaction.md +7 -7
  385. package/docs/environment-variables.md +10 -4
  386. package/docs/keybindings.md +3 -3
  387. package/docs/models.md +17 -17
  388. package/docs/packages.md +1 -1
  389. package/docs/prompt-templates.md +1 -1
  390. package/docs/rpc.md +2 -2
  391. package/docs/sdk.md +5 -5
  392. package/docs/session-format.md +3 -3
  393. package/docs/settings.md +15 -1
  394. package/docs/shell-aliases.md +1 -1
  395. package/docs/skills.md +1 -1
  396. package/docs/terminal-setup.md +17 -17
  397. package/docs/themes.md +5 -5
  398. package/docs/tmux.md +4 -4
  399. package/docs/tui.md +1 -1
  400. package/docs/usage.md +292 -292
  401. package/docs/windows.md +1 -1
  402. package/examples/extensions/bash-spawn-hook/index.ts +1 -1
  403. package/examples/extensions/dynamic-resources/dynamic.json +1 -1
  404. package/examples/extensions/mcp-stdio/index.d.ts +64 -0
  405. package/examples/extensions/mcp-stdio/index.d.ts.map +1 -0
  406. package/examples/extensions/mcp-stdio/index.js +292 -0
  407. package/examples/extensions/mcp-stdio/index.js.map +1 -0
  408. package/examples/extensions/with-deps/package-lock.json +2 -2
  409. package/examples/extensions/with-deps/package.json +1 -6
  410. package/examples/extensions/with-deps/plugin.json +1 -1
  411. package/package.json +2 -2
  412. package/dist/bundle/chunks/openai-responses-AUJQ3NWT.js +0 -2
  413. package/dist/bundle/chunks/virtual-modules-MRXD3RWG.js +0 -5
  414. package/dist/cli/experimental/commands/pi.d.ts +0 -15
  415. package/dist/cli/experimental/commands/pi.d.ts.map +0 -1
  416. package/dist/cli/experimental/commands/pi.js.map +0 -1
  417. package/dist/core/export-html/ansi-to-html.d.ts.map +0 -1
  418. package/dist/core/export-html/ansi-to-html.js.map +0 -1
  419. package/dist/core/export-html/index.d.ts.map +0 -1
  420. package/dist/core/export-html/index.js.map +0 -1
  421. package/dist/core/export-html/tool-renderer.d.ts.map +0 -1
  422. package/dist/core/export-html/tool-renderer.js.map +0 -1
  423. package/dist/core/pi-manifest.d.ts +0 -7
  424. package/dist/core/pi-manifest.d.ts.map +0 -1
  425. package/dist/core/pi-manifest.js.map +0 -1
  426. package/dist/modes/interactive/model-catalog-refresh.d.ts.map +0 -1
  427. package/dist/modes/interactive/model-catalog-refresh.js.map +0 -1
  428. package/dist/modes/interactive/theme/theme-controller.d.ts.map +0 -1
  429. package/dist/modes/interactive/theme/theme-controller.js.map +0 -1
  430. package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
  431. package/dist/modes/interactive/theme/theme.js.map +0 -1
  432. package/dist/profiles/builtin-suites.d.ts.map +0 -1
  433. package/dist/profiles/builtin-suites.js.map +0 -1
  434. package/dist/profiles/resolved-agent-profile.d.ts.map +0 -1
  435. package/dist/profiles/resolved-agent-profile.js.map +0 -1
  436. package/dist/profiles/suite-lifecycle.d.ts.map +0 -1
  437. package/dist/profiles/suite-lifecycle.js.map +0 -1
  438. package/dist/profiles/suite-loader.d.ts.map +0 -1
  439. package/dist/profiles/suite-loader.js.map +0 -1
  440. package/dist/utils/deprecation.d.ts +0 -4
  441. package/dist/utils/deprecation.d.ts.map +0 -1
  442. package/dist/utils/deprecation.js +0 -13
  443. package/dist/utils/deprecation.js.map +0 -1
  444. /package/dist/{core/export-html → export-html}/ansi-to-html.d.ts +0 -0
  445. /package/dist/{core/export-html → export-html}/ansi-to-html.js +0 -0
  446. /package/dist/{core/export-html → export-html}/template.css +0 -0
  447. /package/dist/{core/export-html → export-html}/template.html +0 -0
  448. /package/dist/{core/export-html → export-html}/template.js +0 -0
  449. /package/dist/{core/export-html → export-html}/tool-renderer.js +0 -0
  450. /package/dist/{core/export-html → export-html}/vendor/highlight.min.js +0 -0
  451. /package/dist/{core/export-html → export-html}/vendor/marked.min.js +0 -0
  452. /package/dist/{profiles → suites}/builtin-suites.d.ts +0 -0
  453. /package/dist/{profiles → suites}/builtin-suites.js +0 -0
  454. /package/dist/{profiles → suites}/resolved-agent-profile.d.ts +0 -0
  455. /package/dist/{profiles → suites}/resolved-agent-profile.js +0 -0
  456. /package/dist/{profiles → suites}/suite-lifecycle.d.ts +0 -0
  457. /package/dist/{profiles → suites}/suite-lifecycle.js +0 -0
  458. /package/dist/{profiles → suites}/suite-loader.d.ts +0 -0
  459. /package/dist/{profiles → suites}/suite-loader.js +0 -0
  460. /package/dist/{modes/interactive/theme → theme}/theme-schema.json +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-modules.d.ts","sourceRoot":"","sources":["../../../src/core/extensions/virtual-modules.ts"],"names":[],"mappings":"AAiDA,kFAAkF;AAClF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA8CnD,CAAC","sourcesContent":["// Virtual modules the host supplies to installed capability plugins through\n// jiti: install-store copies ship no node_modules (npm tarballs never include\n// dependencies), so their bare imports resolve against the host's own copies.\n// The imports below MUST stay static so the Node bundle and the Bun binary\n// embed the modules; the file itself is loaded lazily by capability-plugin.ts\n// (upstream pi 40c256ccc parity) so importing the loader costs nothing until\n// the first plugin load.\n//\n// The full key list below is the host module supply contract (D-082 ruling 3;\n// registry entry `plugin.host-module-supply`): any capability plugin may\n// declare and import these exact specifiers. Adding or removing a supplied\n// specifier must update HOST_SUPPLIED_PLUGIN_SPECIFIERS in\n// scripts/check-plugin-boundary.mjs and the root tsconfig.json paths in the\n// same change (sync enforced by test/host-module-supply.test.ts).\nimport * as aiCompat from \"@agent-forge/ai/compat\";\nimport * as pluginSdk from \"@agent-forge/plugin-sdk\";\nimport * as pluginSdkSessionLineage from \"@agent-forge/plugin-sdk/session-lineage\";\nimport * as protocolSubagent from \"@agent-forge/protocol/subagent\";\nimport * as tui from \"@agent-forge/tui\";\nimport * as typebox from \"typebox\";\nimport * as typeboxValue from \"typebox/value\";\n// Same undici copy the http-dispatcher already bundles: plugin packages\n// declare it pinned but installed tarballs carry no node_modules, so the\n// image-generation plugin's proxy-aware fetch resolves to this namespace.\nimport * as undici from \"undici\";\nimport * as hostDiff from \"../../modes/interactive/components/diff.ts\";\nimport * as hostKeybindingHints from \"../../modes/interactive/components/keybinding-hints.ts\";\nimport * as hostVisualTruncate from \"../../modes/interactive/components/visual-truncate.ts\";\nimport * as hostTheme from \"../../modes/interactive/theme/theme.ts\";\nimport * as hostAnsi from \"../../utils/ansi.ts\";\nimport * as hostChildProcess from \"../../utils/child-process.ts\";\nimport * as hostImageProcess from \"../../utils/image-process.ts\";\nimport * as hostMime from \"../../utils/mime.ts\";\nimport * as hostPaths from \"../../utils/paths.ts\";\nimport * as hostShell from \"../../utils/shell.ts\";\nimport * as hostText from \"../../utils/text.ts\";\nimport * as hostToolsManager from \"../../utils/tools-manager.ts\";\nimport * as hostCompaction from \"../compaction/index.ts\";\nimport * as hostI18n from \"../i18n/index.ts\";\nimport * as hostBashOperations from \"../tools/bash-operations.ts\";\nimport * as hostEditDiff from \"../tools/edit-diff.ts\";\nimport * as hostFileMutationQueue from \"../tools/file-mutation-queue.ts\";\nimport * as hostOutputAccumulator from \"../tools/output-accumulator.ts\";\nimport * as hostPathUtils from \"../tools/path-utils.ts\";\nimport * as hostReadmePath from \"../tools/readme-path.ts\";\nimport * as hostRenderUtils from \"../tools/render-utils.ts\";\nimport * as hostToolDefinition from \"../tools/tool-definition.ts\";\nimport * as hostTruncate from \"../tools/truncate.ts\";\n\n/** Modules available to capability plugins via the jiti virtualModules option. */\nexport const VIRTUAL_MODULES: Record<string, unknown> = {\n\t\"@agent-forge/plugin-sdk\": pluginSdk,\n\t\"@agent-forge/plugin-sdk/session-lineage\": pluginSdkSessionLineage,\n\t\"@agent-forge/protocol/subagent\": protocolSubagent,\n\ttypebox,\n\t\"typebox/value\": typeboxValue,\n\t// 0.85.13 regression fix (0.85.14): the image-generation plugin's\n\t// undici dependency (EnvHttpProxyAgent proxy support) resolved to\n\t// nowhere in the install-store shape and the plugin failed to load\n\t// (\"Cannot find module 'undici'\"). Virtual module = the host's own\n\t// copy, identical in the bundle and Bun binary forms; red-verified\n\t// by test/plugin-virtual-undici.test.ts.\n\tundici,\n\t// Host module supply contract (D-082): rendering and tool-support modules\n\t// for capability plugins (coding-tools first). Contract notes live in the\n\t// file header; the sync gate is test/host-module-supply.test.ts. The host\n\t// namespaces are spread into plain objects: jiti's CJS interop touches the\n\t// module namespace's `default` property, and vitest's namespace proxies for\n\t// inlined source modules (including vi.mock replacements) throw on a\n\t// missing `default`, which failed the whole plugin entry import.\n\t\"@agent-forge/tui\": { ...tui },\n\t// D-082 批 3:默认策略插件的运行时依赖供给(ai 兼容层分类器、压缩摘要执行机制)。\n\t\"@agent-forge/ai/compat\": { ...aiCompat },\n\t\"@agent-forge/host/compaction\": { ...hostCompaction },\n\t\"@agent-forge/host/i18n\": { ...hostI18n },\n\t\"@agent-forge/host/theme\": { ...hostTheme },\n\t\"@agent-forge/host/keybinding-hints\": { ...hostKeybindingHints },\n\t\"@agent-forge/host/visual-truncate\": { ...hostVisualTruncate },\n\t\"@agent-forge/host/diff\": { ...hostDiff },\n\t\"@agent-forge/host/render-utils\": { ...hostRenderUtils },\n\t\"@agent-forge/host/tool-definition\": { ...hostToolDefinition },\n\t\"@agent-forge/host/truncate\": { ...hostTruncate },\n\t\"@agent-forge/host/edit-diff\": { ...hostEditDiff },\n\t\"@agent-forge/host/file-mutation-queue\": { ...hostFileMutationQueue },\n\t\"@agent-forge/host/output-accumulator\": { ...hostOutputAccumulator },\n\t\"@agent-forge/host/path-utils\": { ...hostPathUtils },\n\t\"@agent-forge/host/readme-path\": { ...hostReadmePath },\n\t\"@agent-forge/host/paths\": { ...hostPaths },\n\t\"@agent-forge/host/shell\": { ...hostShell },\n\t\"@agent-forge/host/text\": { ...hostText },\n\t\"@agent-forge/host/ansi\": { ...hostAnsi },\n\t\"@agent-forge/host/mime\": { ...hostMime },\n\t\"@agent-forge/host/image-process\": { ...hostImageProcess },\n\t\"@agent-forge/host/child-process\": { ...hostChildProcess },\n\t\"@agent-forge/host/tools-manager\": { ...hostToolsManager },\n\t\"@agent-forge/host/bash-operations\": { ...hostBashOperations },\n};\n"]}
1
+ {"version":3,"file":"virtual-modules.d.ts","sourceRoot":"","sources":["../../../src/core/extensions/virtual-modules.ts"],"names":[],"mappings":"AAqDA,kFAAkF;AAClF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAkDnD,CAAC","sourcesContent":["// Virtual modules the host supplies to installed capability plugins through\n// jiti: npm tarballs never include dependencies, and the install host skips\n// these host-supplied specifiers when materializing runtime dependencies into\n// a store copy (node-package-install-host), so their bare imports always\n// resolve against the host's own copies.\n// The imports below MUST stay static so the Node bundle and the Bun binary\n// embed the modules; the file itself is loaded lazily by capability-plugin.ts\n// (upstream pi 40c256ccc parity) so importing the loader costs nothing until\n// the first plugin load.\n//\n// The full key list below is the host module supply contract (D-082 ruling 3;\n// registry entry `plugin.host-module-supply`): any capability plugin may\n// declare and import these exact specifiers. Adding or removing a supplied\n// specifier must update HOST_SUPPLIED_PLUGIN_SPECIFIERS in\n// scripts/check-plugin-boundary.mjs and the root tsconfig.json paths in the\n// same change (sync enforced by test/host-module-supply.test.ts).\nimport * as aiCompat from \"@agent-forge/ai/compat\";\nimport * as pluginSdk from \"@agent-forge/plugin-sdk\";\nimport * as pluginSdkSessionLineage from \"@agent-forge/plugin-sdk/session-lineage\";\nimport * as protocol from \"@agent-forge/protocol\";\nimport * as protocolSubagent from \"@agent-forge/protocol/subagent\";\nimport * as tui from \"@agent-forge/tui\";\nimport * as typebox from \"typebox\";\nimport * as typeboxValue from \"typebox/value\";\n// Same undici copy the http-dispatcher already bundles: plugin packages\n// declare it pinned but undici stays host-supplied (the install-time\n// dependency materialization skips host-supplied specifiers), so the\n// image-generation plugin's proxy-aware fetch resolves to this namespace.\nimport * as undici from \"undici\";\nimport * as hostDiff from \"../../modes/interactive/components/diff.ts\";\nimport * as hostKeybindingHints from \"../../modes/interactive/components/keybinding-hints.ts\";\nimport * as hostVisualTruncate from \"../../modes/interactive/components/visual-truncate.ts\";\nimport * as hostTheme from \"../../theme/theme.ts\";\nimport * as hostAnsi from \"../../utils/ansi.ts\";\nimport * as hostChildProcess from \"../../utils/child-process.ts\";\nimport * as hostImageProcess from \"../../utils/image-process.ts\";\nimport * as hostMime from \"../../utils/mime.ts\";\nimport * as hostPaths from \"../../utils/paths.ts\";\nimport * as hostShell from \"../../utils/shell.ts\";\nimport * as hostText from \"../../utils/text.ts\";\nimport * as hostToolsManager from \"../../utils/tools-manager.ts\";\nimport * as hostCompaction from \"../compaction/index.ts\";\nimport * as hostI18n from \"../i18n/index.ts\";\nimport * as hostBashOperations from \"../tools/bash-operations.ts\";\nimport * as hostEditDiff from \"../tools/edit-diff.ts\";\nimport * as hostFileMutationQueue from \"../tools/file-mutation-queue.ts\";\nimport * as hostOutputAccumulator from \"../tools/output-accumulator.ts\";\nimport * as hostPathUtils from \"../tools/path-utils.ts\";\nimport * as hostReadmePath from \"../tools/readme-path.ts\";\nimport * as hostRenderUtils from \"../tools/render-utils.ts\";\nimport * as hostToolDefinition from \"../tools/tool-definition.ts\";\nimport * as hostTruncate from \"../tools/truncate.ts\";\n\n/** Modules available to capability plugins via the jiti virtualModules option. */\nexport const VIRTUAL_MODULES: Record<string, unknown> = {\n\t\"@agent-forge/plugin-sdk\": pluginSdk,\n\t\"@agent-forge/plugin-sdk/session-lineage\": pluginSdkSessionLineage,\n\t\"@agent-forge/protocol/subagent\": protocolSubagent,\n\t// 记忆插件 Slice B2 起 inference-{client,protocol}.ts import 根说明符\n\t// (FrameDecoder/encodeFrame/decodeCbor)——protocol 属宿主供给面, 安装物化\n\t// 时跳过、tarball 也不含依赖树, 缺此条即 plugin_load_failed (0.88.2 安装链回归, 2026-10-07 修复)。\n\t\"@agent-forge/protocol\": protocol,\n\ttypebox,\n\t\"typebox/value\": typeboxValue,\n\t// 0.85.13 regression fix (0.85.14): the image-generation plugin's\n\t// undici dependency (EnvHttpProxyAgent proxy support) resolved to\n\t// nowhere in the install-store shape and the plugin failed to load\n\t// (\"Cannot find module 'undici'\"). Virtual module = the host's own\n\t// copy, identical in the bundle and Bun binary forms; red-verified\n\t// by test/plugin-virtual-undici.test.ts.\n\tundici,\n\t// Host module supply contract (D-082): rendering and tool-support modules\n\t// for capability plugins (coding-tools first). Contract notes live in the\n\t// file header; the sync gate is test/host-module-supply.test.ts. The host\n\t// namespaces are spread into plain objects: jiti's CJS interop touches the\n\t// module namespace's `default` property, and vitest's namespace proxies for\n\t// inlined source modules (including vi.mock replacements) throw on a\n\t// missing `default`, which failed the whole plugin entry import.\n\t\"@agent-forge/tui\": { ...tui },\n\t// D-082 批 3:默认策略插件的运行时依赖供给(ai 兼容层分类器、压缩摘要执行机制)。\n\t\"@agent-forge/ai/compat\": { ...aiCompat },\n\t\"@agent-forge/host/compaction\": { ...hostCompaction },\n\t\"@agent-forge/host/i18n\": { ...hostI18n },\n\t\"@agent-forge/host/theme\": { ...hostTheme },\n\t\"@agent-forge/host/keybinding-hints\": { ...hostKeybindingHints },\n\t\"@agent-forge/host/visual-truncate\": { ...hostVisualTruncate },\n\t\"@agent-forge/host/diff\": { ...hostDiff },\n\t\"@agent-forge/host/render-utils\": { ...hostRenderUtils },\n\t\"@agent-forge/host/tool-definition\": { ...hostToolDefinition },\n\t\"@agent-forge/host/truncate\": { ...hostTruncate },\n\t\"@agent-forge/host/edit-diff\": { ...hostEditDiff },\n\t\"@agent-forge/host/file-mutation-queue\": { ...hostFileMutationQueue },\n\t\"@agent-forge/host/output-accumulator\": { ...hostOutputAccumulator },\n\t\"@agent-forge/host/path-utils\": { ...hostPathUtils },\n\t\"@agent-forge/host/readme-path\": { ...hostReadmePath },\n\t\"@agent-forge/host/paths\": { ...hostPaths },\n\t\"@agent-forge/host/shell\": { ...hostShell },\n\t\"@agent-forge/host/text\": { ...hostText },\n\t\"@agent-forge/host/ansi\": { ...hostAnsi },\n\t\"@agent-forge/host/mime\": { ...hostMime },\n\t\"@agent-forge/host/image-process\": { ...hostImageProcess },\n\t\"@agent-forge/host/child-process\": { ...hostChildProcess },\n\t\"@agent-forge/host/tools-manager\": { ...hostToolsManager },\n\t\"@agent-forge/host/bash-operations\": { ...hostBashOperations },\n};\n"]}
@@ -1,6 +1,8 @@
1
1
  // Virtual modules the host supplies to installed capability plugins through
2
- // jiti: install-store copies ship no node_modules (npm tarballs never include
3
- // dependencies), so their bare imports resolve against the host's own copies.
2
+ // jiti: npm tarballs never include dependencies, and the install host skips
3
+ // these host-supplied specifiers when materializing runtime dependencies into
4
+ // a store copy (node-package-install-host), so their bare imports always
5
+ // resolve against the host's own copies.
4
6
  // The imports below MUST stay static so the Node bundle and the Bun binary
5
7
  // embed the modules; the file itself is loaded lazily by capability-plugin.ts
6
8
  // (upstream pi 40c256ccc parity) so importing the loader costs nothing until
@@ -15,18 +17,20 @@
15
17
  import * as aiCompat from "@agent-forge/ai/compat";
16
18
  import * as pluginSdk from "@agent-forge/plugin-sdk";
17
19
  import * as pluginSdkSessionLineage from "@agent-forge/plugin-sdk/session-lineage";
20
+ import * as protocol from "@agent-forge/protocol";
18
21
  import * as protocolSubagent from "@agent-forge/protocol/subagent";
19
22
  import * as tui from "@agent-forge/tui";
20
23
  import * as typebox from "typebox";
21
24
  import * as typeboxValue from "typebox/value";
22
25
  // Same undici copy the http-dispatcher already bundles: plugin packages
23
- // declare it pinned but installed tarballs carry no node_modules, so the
26
+ // declare it pinned but undici stays host-supplied (the install-time
27
+ // dependency materialization skips host-supplied specifiers), so the
24
28
  // image-generation plugin's proxy-aware fetch resolves to this namespace.
25
29
  import * as undici from "undici";
26
30
  import * as hostDiff from "../../modes/interactive/components/diff.js";
27
31
  import * as hostKeybindingHints from "../../modes/interactive/components/keybinding-hints.js";
28
32
  import * as hostVisualTruncate from "../../modes/interactive/components/visual-truncate.js";
29
- import * as hostTheme from "../../modes/interactive/theme/theme.js";
33
+ import * as hostTheme from "../../theme/theme.js";
30
34
  import * as hostAnsi from "../../utils/ansi.js";
31
35
  import * as hostChildProcess from "../../utils/child-process.js";
32
36
  import * as hostImageProcess from "../../utils/image-process.js";
@@ -51,6 +55,10 @@ export const VIRTUAL_MODULES = {
51
55
  "@agent-forge/plugin-sdk": pluginSdk,
52
56
  "@agent-forge/plugin-sdk/session-lineage": pluginSdkSessionLineage,
53
57
  "@agent-forge/protocol/subagent": protocolSubagent,
58
+ // 记忆插件 Slice B2 起 inference-{client,protocol}.ts import 根说明符
59
+ // (FrameDecoder/encodeFrame/decodeCbor)——protocol 属宿主供给面, 安装物化
60
+ // 时跳过、tarball 也不含依赖树, 缺此条即 plugin_load_failed (0.88.2 安装链回归, 2026-10-07 修复)。
61
+ "@agent-forge/protocol": protocol,
54
62
  typebox,
55
63
  "typebox/value": typeboxValue,
56
64
  // 0.85.13 regression fix (0.85.14): the image-generation plugin's
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-modules.js","sourceRoot":"","sources":["../../../src/core/extensions/virtual-modules.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,2EAA2E;AAC3E,8EAA8E;AAC9E,6EAA6E;AAC7E,yBAAyB;AACzB,EAAE;AACF,8EAA8E;AAC9E,yEAAyE;AACzE,2EAA2E;AAC3E,2DAA2D;AAC3D,4EAA4E;AAC5E,kEAAkE;AAClE,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,uBAAuB,MAAM,yCAAyC,CAAC;AACnF,OAAO,KAAK,gBAAgB,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,wEAAwE;AACxE,yEAAyE;AACzE,0EAA0E;AAC1E,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,4CAA4C,CAAC;AACvE,OAAO,KAAK,mBAAmB,MAAM,wDAAwD,CAAC;AAC9F,OAAO,KAAK,kBAAkB,MAAM,uDAAuD,CAAC;AAC5F,OAAO,KAAK,SAAS,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,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jE,kBAAkB,EAAE,EAAE,GAAG,GAAG,EAAE;IAC9B,oHAAgD;IAChD,wBAAwB,EAAE,EAAE,GAAG,QAAQ,EAAE;IACzC,8BAA8B,EAAE,EAAE,GAAG,cAAc,EAAE;IACrD,wBAAwB,EAAE,EAAE,GAAG,QAAQ,EAAE;IACzC,yBAAyB,EAAE,EAAE,GAAG,SAAS,EAAE;IAC3C,oCAAoC,EAAE,EAAE,GAAG,mBAAmB,EAAE;IAChE,mCAAmC,EAAE,EAAE,GAAG,kBAAkB,EAAE;IAC9D,wBAAwB,EAAE,EAAE,GAAG,QAAQ,EAAE;IACzC,gCAAgC,EAAE,EAAE,GAAG,eAAe,EAAE;IACxD,mCAAmC,EAAE,EAAE,GAAG,kBAAkB,EAAE;IAC9D,4BAA4B,EAAE,EAAE,GAAG,YAAY,EAAE;IACjD,6BAA6B,EAAE,EAAE,GAAG,YAAY,EAAE;IAClD,uCAAuC,EAAE,EAAE,GAAG,qBAAqB,EAAE;IACrE,sCAAsC,EAAE,EAAE,GAAG,qBAAqB,EAAE;IACpE,8BAA8B,EAAE,EAAE,GAAG,aAAa,EAAE;IACpD,+BAA+B,EAAE,EAAE,GAAG,cAAc,EAAE;IACtD,yBAAyB,EAAE,EAAE,GAAG,SAAS,EAAE;IAC3C,yBAAyB,EAAE,EAAE,GAAG,SAAS,EAAE;IAC3C,wBAAwB,EAAE,EAAE,GAAG,QAAQ,EAAE;IACzC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,EAAE;IACzC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,EAAE;IACzC,iCAAiC,EAAE,EAAE,GAAG,gBAAgB,EAAE;IAC1D,iCAAiC,EAAE,EAAE,GAAG,gBAAgB,EAAE;IAC1D,iCAAiC,EAAE,EAAE,GAAG,gBAAgB,EAAE;IAC1D,mCAAmC,EAAE,EAAE,GAAG,kBAAkB,EAAE;CAC9D,CAAC","sourcesContent":["// Virtual modules the host supplies to installed capability plugins through\n// jiti: install-store copies ship no node_modules (npm tarballs never include\n// dependencies), so their bare imports resolve against the host's own copies.\n// The imports below MUST stay static so the Node bundle and the Bun binary\n// embed the modules; the file itself is loaded lazily by capability-plugin.ts\n// (upstream pi 40c256ccc parity) so importing the loader costs nothing until\n// the first plugin load.\n//\n// The full key list below is the host module supply contract (D-082 ruling 3;\n// registry entry `plugin.host-module-supply`): any capability plugin may\n// declare and import these exact specifiers. Adding or removing a supplied\n// specifier must update HOST_SUPPLIED_PLUGIN_SPECIFIERS in\n// scripts/check-plugin-boundary.mjs and the root tsconfig.json paths in the\n// same change (sync enforced by test/host-module-supply.test.ts).\nimport * as aiCompat from \"@agent-forge/ai/compat\";\nimport * as pluginSdk from \"@agent-forge/plugin-sdk\";\nimport * as pluginSdkSessionLineage from \"@agent-forge/plugin-sdk/session-lineage\";\nimport * as protocolSubagent from \"@agent-forge/protocol/subagent\";\nimport * as tui from \"@agent-forge/tui\";\nimport * as typebox from \"typebox\";\nimport * as typeboxValue from \"typebox/value\";\n// Same undici copy the http-dispatcher already bundles: plugin packages\n// declare it pinned but installed tarballs carry no node_modules, so the\n// image-generation plugin's proxy-aware fetch resolves to this namespace.\nimport * as undici from \"undici\";\nimport * as hostDiff from \"../../modes/interactive/components/diff.ts\";\nimport * as hostKeybindingHints from \"../../modes/interactive/components/keybinding-hints.ts\";\nimport * as hostVisualTruncate from \"../../modes/interactive/components/visual-truncate.ts\";\nimport * as hostTheme from \"../../modes/interactive/theme/theme.ts\";\nimport * as hostAnsi from \"../../utils/ansi.ts\";\nimport * as hostChildProcess from \"../../utils/child-process.ts\";\nimport * as hostImageProcess from \"../../utils/image-process.ts\";\nimport * as hostMime from \"../../utils/mime.ts\";\nimport * as hostPaths from \"../../utils/paths.ts\";\nimport * as hostShell from \"../../utils/shell.ts\";\nimport * as hostText from \"../../utils/text.ts\";\nimport * as hostToolsManager from \"../../utils/tools-manager.ts\";\nimport * as hostCompaction from \"../compaction/index.ts\";\nimport * as hostI18n from \"../i18n/index.ts\";\nimport * as hostBashOperations from \"../tools/bash-operations.ts\";\nimport * as hostEditDiff from \"../tools/edit-diff.ts\";\nimport * as hostFileMutationQueue from \"../tools/file-mutation-queue.ts\";\nimport * as hostOutputAccumulator from \"../tools/output-accumulator.ts\";\nimport * as hostPathUtils from \"../tools/path-utils.ts\";\nimport * as hostReadmePath from \"../tools/readme-path.ts\";\nimport * as hostRenderUtils from \"../tools/render-utils.ts\";\nimport * as hostToolDefinition from \"../tools/tool-definition.ts\";\nimport * as hostTruncate from \"../tools/truncate.ts\";\n\n/** Modules available to capability plugins via the jiti virtualModules option. */\nexport const VIRTUAL_MODULES: Record<string, unknown> = {\n\t\"@agent-forge/plugin-sdk\": pluginSdk,\n\t\"@agent-forge/plugin-sdk/session-lineage\": pluginSdkSessionLineage,\n\t\"@agent-forge/protocol/subagent\": protocolSubagent,\n\ttypebox,\n\t\"typebox/value\": typeboxValue,\n\t// 0.85.13 regression fix (0.85.14): the image-generation plugin's\n\t// undici dependency (EnvHttpProxyAgent proxy support) resolved to\n\t// nowhere in the install-store shape and the plugin failed to load\n\t// (\"Cannot find module 'undici'\"). Virtual module = the host's own\n\t// copy, identical in the bundle and Bun binary forms; red-verified\n\t// by test/plugin-virtual-undici.test.ts.\n\tundici,\n\t// Host module supply contract (D-082): rendering and tool-support modules\n\t// for capability plugins (coding-tools first). Contract notes live in the\n\t// file header; the sync gate is test/host-module-supply.test.ts. The host\n\t// namespaces are spread into plain objects: jiti's CJS interop touches the\n\t// module namespace's `default` property, and vitest's namespace proxies for\n\t// inlined source modules (including vi.mock replacements) throw on a\n\t// missing `default`, which failed the whole plugin entry import.\n\t\"@agent-forge/tui\": { ...tui },\n\t// D-082 批 3:默认策略插件的运行时依赖供给(ai 兼容层分类器、压缩摘要执行机制)。\n\t\"@agent-forge/ai/compat\": { ...aiCompat },\n\t\"@agent-forge/host/compaction\": { ...hostCompaction },\n\t\"@agent-forge/host/i18n\": { ...hostI18n },\n\t\"@agent-forge/host/theme\": { ...hostTheme },\n\t\"@agent-forge/host/keybinding-hints\": { ...hostKeybindingHints },\n\t\"@agent-forge/host/visual-truncate\": { ...hostVisualTruncate },\n\t\"@agent-forge/host/diff\": { ...hostDiff },\n\t\"@agent-forge/host/render-utils\": { ...hostRenderUtils },\n\t\"@agent-forge/host/tool-definition\": { ...hostToolDefinition },\n\t\"@agent-forge/host/truncate\": { ...hostTruncate },\n\t\"@agent-forge/host/edit-diff\": { ...hostEditDiff },\n\t\"@agent-forge/host/file-mutation-queue\": { ...hostFileMutationQueue },\n\t\"@agent-forge/host/output-accumulator\": { ...hostOutputAccumulator },\n\t\"@agent-forge/host/path-utils\": { ...hostPathUtils },\n\t\"@agent-forge/host/readme-path\": { ...hostReadmePath },\n\t\"@agent-forge/host/paths\": { ...hostPaths },\n\t\"@agent-forge/host/shell\": { ...hostShell },\n\t\"@agent-forge/host/text\": { ...hostText },\n\t\"@agent-forge/host/ansi\": { ...hostAnsi },\n\t\"@agent-forge/host/mime\": { ...hostMime },\n\t\"@agent-forge/host/image-process\": { ...hostImageProcess },\n\t\"@agent-forge/host/child-process\": { ...hostChildProcess },\n\t\"@agent-forge/host/tools-manager\": { ...hostToolsManager },\n\t\"@agent-forge/host/bash-operations\": { ...hostBashOperations },\n};\n"]}
1
+ {"version":3,"file":"virtual-modules.js","sourceRoot":"","sources":["../../../src/core/extensions/virtual-modules.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,4EAA4E;AAC5E,8EAA8E;AAC9E,yEAAyE;AACzE,yCAAyC;AACzC,2EAA2E;AAC3E,8EAA8E;AAC9E,6EAA6E;AAC7E,yBAAyB;AACzB,EAAE;AACF,8EAA8E;AAC9E,yEAAyE;AACzE,2EAA2E;AAC3E,2DAA2D;AAC3D,4EAA4E;AAC5E,kEAAkE;AAClE,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,uBAAuB,MAAM,yCAAyC,CAAC;AAC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AAE,GAAG,qBAAqB,EAAE;IACpE,8BAA8B,EAAE,EAAE,GAAG,aAAa,EAAE;IACpD,+BAA+B,EAAE,EAAE,GAAG,cAAc,EAAE;IACtD,yBAAyB,EAAE,EAAE,GAAG,SAAS,EAAE;IAC3C,yBAAyB,EAAE,EAAE,GAAG,SAAS,EAAE;IAC3C,wBAAwB,EAAE,EAAE,GAAG,QAAQ,EAAE;IACzC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,EAAE;IACzC,wBAAwB,EAAE,EAAE,GAAG,QAAQ,EAAE;IACzC,iCAAiC,EAAE,EAAE,GAAG,gBAAgB,EAAE;IAC1D,iCAAiC,EAAE,EAAE,GAAG,gBAAgB,EAAE;IAC1D,iCAAiC,EAAE,EAAE,GAAG,gBAAgB,EAAE;IAC1D,mCAAmC,EAAE,EAAE,GAAG,kBAAkB,EAAE;CAC9D,CAAC","sourcesContent":["// Virtual modules the host supplies to installed capability plugins through\n// jiti: npm tarballs never include dependencies, and the install host skips\n// these host-supplied specifiers when materializing runtime dependencies into\n// a store copy (node-package-install-host), so their bare imports always\n// resolve against the host's own copies.\n// The imports below MUST stay static so the Node bundle and the Bun binary\n// embed the modules; the file itself is loaded lazily by capability-plugin.ts\n// (upstream pi 40c256ccc parity) so importing the loader costs nothing until\n// the first plugin load.\n//\n// The full key list below is the host module supply contract (D-082 ruling 3;\n// registry entry `plugin.host-module-supply`): any capability plugin may\n// declare and import these exact specifiers. Adding or removing a supplied\n// specifier must update HOST_SUPPLIED_PLUGIN_SPECIFIERS in\n// scripts/check-plugin-boundary.mjs and the root tsconfig.json paths in the\n// same change (sync enforced by test/host-module-supply.test.ts).\nimport * as aiCompat from \"@agent-forge/ai/compat\";\nimport * as pluginSdk from \"@agent-forge/plugin-sdk\";\nimport * as pluginSdkSessionLineage from \"@agent-forge/plugin-sdk/session-lineage\";\nimport * as protocol from \"@agent-forge/protocol\";\nimport * as protocolSubagent from \"@agent-forge/protocol/subagent\";\nimport * as tui from \"@agent-forge/tui\";\nimport * as typebox from \"typebox\";\nimport * as typeboxValue from \"typebox/value\";\n// Same undici copy the http-dispatcher already bundles: plugin packages\n// declare it pinned but undici stays host-supplied (the install-time\n// dependency materialization skips host-supplied specifiers), so the\n// image-generation plugin's proxy-aware fetch resolves to this namespace.\nimport * as undici from \"undici\";\nimport * as hostDiff from \"../../modes/interactive/components/diff.ts\";\nimport * as hostKeybindingHints from \"../../modes/interactive/components/keybinding-hints.ts\";\nimport * as hostVisualTruncate from \"../../modes/interactive/components/visual-truncate.ts\";\nimport * as hostTheme from \"../../theme/theme.ts\";\nimport * as hostAnsi from \"../../utils/ansi.ts\";\nimport * as hostChildProcess from \"../../utils/child-process.ts\";\nimport * as hostImageProcess from \"../../utils/image-process.ts\";\nimport * as hostMime from \"../../utils/mime.ts\";\nimport * as hostPaths from \"../../utils/paths.ts\";\nimport * as hostShell from \"../../utils/shell.ts\";\nimport * as hostText from \"../../utils/text.ts\";\nimport * as hostToolsManager from \"../../utils/tools-manager.ts\";\nimport * as hostCompaction from \"../compaction/index.ts\";\nimport * as hostI18n from \"../i18n/index.ts\";\nimport * as hostBashOperations from \"../tools/bash-operations.ts\";\nimport * as hostEditDiff from \"../tools/edit-diff.ts\";\nimport * as hostFileMutationQueue from \"../tools/file-mutation-queue.ts\";\nimport * as hostOutputAccumulator from \"../tools/output-accumulator.ts\";\nimport * as hostPathUtils from \"../tools/path-utils.ts\";\nimport * as hostReadmePath from \"../tools/readme-path.ts\";\nimport * as hostRenderUtils from \"../tools/render-utils.ts\";\nimport * as hostToolDefinition from \"../tools/tool-definition.ts\";\nimport * as hostTruncate from \"../tools/truncate.ts\";\n\n/** Modules available to capability plugins via the jiti virtualModules option. */\nexport const VIRTUAL_MODULES: Record<string, unknown> = {\n\t\"@agent-forge/plugin-sdk\": pluginSdk,\n\t\"@agent-forge/plugin-sdk/session-lineage\": pluginSdkSessionLineage,\n\t\"@agent-forge/protocol/subagent\": protocolSubagent,\n\t// 记忆插件 Slice B2 起 inference-{client,protocol}.ts import 根说明符\n\t// (FrameDecoder/encodeFrame/decodeCbor)——protocol 属宿主供给面, 安装物化\n\t// 时跳过、tarball 也不含依赖树, 缺此条即 plugin_load_failed (0.88.2 安装链回归, 2026-10-07 修复)。\n\t\"@agent-forge/protocol\": protocol,\n\ttypebox,\n\t\"typebox/value\": typeboxValue,\n\t// 0.85.13 regression fix (0.85.14): the image-generation plugin's\n\t// undici dependency (EnvHttpProxyAgent proxy support) resolved to\n\t// nowhere in the install-store shape and the plugin failed to load\n\t// (\"Cannot find module 'undici'\"). Virtual module = the host's own\n\t// copy, identical in the bundle and Bun binary forms; red-verified\n\t// by test/plugin-virtual-undici.test.ts.\n\tundici,\n\t// Host module supply contract (D-082): rendering and tool-support modules\n\t// for capability plugins (coding-tools first). Contract notes live in the\n\t// file header; the sync gate is test/host-module-supply.test.ts. The host\n\t// namespaces are spread into plain objects: jiti's CJS interop touches the\n\t// module namespace's `default` property, and vitest's namespace proxies for\n\t// inlined source modules (including vi.mock replacements) throw on a\n\t// missing `default`, which failed the whole plugin entry import.\n\t\"@agent-forge/tui\": { ...tui },\n\t// D-082 批 3:默认策略插件的运行时依赖供给(ai 兼容层分类器、压缩摘要执行机制)。\n\t\"@agent-forge/ai/compat\": { ...aiCompat },\n\t\"@agent-forge/host/compaction\": { ...hostCompaction },\n\t\"@agent-forge/host/i18n\": { ...hostI18n },\n\t\"@agent-forge/host/theme\": { ...hostTheme },\n\t\"@agent-forge/host/keybinding-hints\": { ...hostKeybindingHints },\n\t\"@agent-forge/host/visual-truncate\": { ...hostVisualTruncate },\n\t\"@agent-forge/host/diff\": { ...hostDiff },\n\t\"@agent-forge/host/render-utils\": { ...hostRenderUtils },\n\t\"@agent-forge/host/tool-definition\": { ...hostToolDefinition },\n\t\"@agent-forge/host/truncate\": { ...hostTruncate },\n\t\"@agent-forge/host/edit-diff\": { ...hostEditDiff },\n\t\"@agent-forge/host/file-mutation-queue\": { ...hostFileMutationQueue },\n\t\"@agent-forge/host/output-accumulator\": { ...hostOutputAccumulator },\n\t\"@agent-forge/host/path-utils\": { ...hostPathUtils },\n\t\"@agent-forge/host/readme-path\": { ...hostReadmePath },\n\t\"@agent-forge/host/paths\": { ...hostPaths },\n\t\"@agent-forge/host/shell\": { ...hostShell },\n\t\"@agent-forge/host/text\": { ...hostText },\n\t\"@agent-forge/host/ansi\": { ...hostAnsi },\n\t\"@agent-forge/host/mime\": { ...hostMime },\n\t\"@agent-forge/host/image-process\": { ...hostImageProcess },\n\t\"@agent-forge/host/child-process\": { ...hostChildProcess },\n\t\"@agent-forge/host/tools-manager\": { ...hostToolsManager },\n\t\"@agent-forge/host/bash-operations\": { ...hostBashOperations },\n};\n"]}
@@ -16,7 +16,7 @@
16
16
  import type { AgentState, ThinkingLevel } from "@agent-forge/agent-core";
17
17
  import type { AuthCheck, AuthResult, ImageContent } from "@agent-forge/ai";
18
18
  import type { Api, Model } from "@agent-forge/ai/compat";
19
- import type { ModelCatalogRuntime } from "../../modes/interactive/model-catalog-refresh.ts";
19
+ import type { ModelCatalogRuntime } from "../../host/model-catalog-refresh.ts";
20
20
  import type { AgentSession, AgentSessionEventListener, ModelCycleResult, ModelMutationOptions, PromptOptions, QueuedInputDisposition, SessionStats } from "../agent-session.ts";
21
21
  import type { CompactionCancelledResult } from "../agent-session-compaction.ts";
22
22
  import type { ForkableUserMessage } from "../agent-session-projection.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"coding-agent-facade.d.ts","sourceRoot":"","sources":["../../../src/core/facade/coding-agent-facade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,m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G,SAAS,CAAC,CAAC;IACrE;;;;OAIG;IACH,mBAAmB,IAAI,gBAAgB,CAAC;IACxC;;;;;OAKG;IACH,iBAAiB,IAAI,YAAY,EAAE,CAAC;IAGpC;;;;;OAKG;IACH,mBAAmB,IAAI,gBAAgB,CAAC;IAIxC,uDAAuD;IACvD,mBAAmB,IAAI,SAAS,MAAM,EAAE,CAAC;IACzC,uDAAuD;IACvD,mBAAmB,IAAI,SAAS,MAAM,EAAE,CAAC;IAIzC,8CAA8C;IAC9C,eAAe,IAAI,MAAM,CAAC;IAC1B,+CAA+C;IAC/C,aAAa,IAAI,OAAO,CAAC;IACzB,iDAAiD;IACjD,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAG3C,2CAA2C;IAC3C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED,+FAA+F;AAC/F,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,YAAY,GAAG,mBAAmB,CAkGlF","sourcesContent":["/**\n * Stable facade v1: a read-only mirror plus pass-through run control and\n * session write paths over one AgentSession.\n *\n * Design: docs/design/稳定门面统一入口设计.md (§2.5 阶段 0 实际面, §2.6 slice 1\n * 读面, §2.7 slice 2 读面, §2.8 阶段 2 写面, §2.9 阶段 3 RPC 面, §3 API 面 v1,\n * §4 阶段 0/1/2/3). Every member is a pure delegate onto the wrapped\n * AgentSession or its existing curated surfaces (`getSessionAPI()`, `host`).\n * No new behavior, no policy, no state of its own. Product entry points\n * (TUI/CLI/RPC/Embedded) migrate onto this surface in later phases;\n * AgentSession stays the internal adapter behind it.\n *\n * Scope: in-package stable surface for those product entry points. It is not\n * exported from the package root and is not a cross-package public contract.\n */\n\nimport type { AgentState, ThinkingLevel } from \"@agent-forge/agent-core\";\nimport type { AuthCheck, AuthResult, ImageContent } from \"@agent-forge/ai\";\nimport type { Api, Model } from \"@agent-forge/ai/compat\";\nimport type { ModelCatalogRuntime } from \"../../modes/interactive/model-catalog-refresh.ts\";\nimport { readSessionSuiteBinding } from \"../../profiles/suite-loader.ts\";\nimport type {\n\tAgentSession,\n\tAgentSessionEventListener,\n\tModelCycleResult,\n\tModelMutationOptions,\n\tPromptOptions,\n\tQueuedInputDisposition,\n\tSessionStats,\n} from \"../agent-session.ts\";\nimport type { CompactionCancelledResult } from \"../agent-session-compaction.ts\";\nimport type { ForkableUserMessage } from \"../agent-session-projection.ts\";\nimport type { BashResult } from \"../bash-executor.ts\";\nimport type { ModelPriceSource } from \"../cache-stats.ts\";\nimport type { CompactionResult } from \"../compaction/index.ts\";\nimport type { ResourceDiagnostic } from \"../diagnostics.ts\";\nimport type { ContextUsage, PromptOutcome, SessionAPI } from \"../extensions/public-api.ts\";\nimport type { InputSource } from \"../input-source.ts\";\nimport type { ModelRuntime } from \"../model-runtime.ts\";\nimport type { PromptTemplate } from \"../prompt-templates.ts\";\nimport type { ThemeMetaV1 } from \"../resource-loader.ts\";\nimport type { BranchSummaryEntry, SessionEntry, SessionHeader, SessionTreeNode } from \"../session-manager.ts\";\nimport type { Skill } from \"../skills.ts\";\nimport type { BashOperations } from \"../tools/bash-operations.ts\";\nimport type { ToolDefinition } from \"../tools/tool-definition.ts\";\n\n/** Prompt options for the facade. Identical to AgentSession PromptOptions. */\nexport type CodingAgentFacadePromptOptionsV1 = PromptOptions;\n\n/**\n * Narrow credential/provider auth projection (D-048): the TUI auth surface\n * only. Covers exactly the seven methods the auth host consumes\n * (`getProviders`/`getProvider`/`getProviderAuthStatus`/`isUsingOAuth`/\n * `listCredentials`/`login`/`logout`); the full ModelRuntime never leaks to\n * the host. The credential-management CapabilityAPI semantics question stays\n * open (D-047 裁决 3); this narrows the TUI host path without deciding it.\n */\nexport type ModelAuthRuntime = Pick<\n\tModelRuntime,\n\t\"getProviders\" | \"getProvider\" | \"getProviderAuthStatus\" | \"isUsingOAuth\" | \"listCredentials\" | \"login\" | \"logout\"\n>;\n\n/**\n * Stable facade v1: the consumption surface for product hosts, versioned per\n * repo convention (EmbeddedSdkBindingV1 precedent). Members are pass-throughs\n * onto the wrapped AgentSession; new members must extend the facade design\n * doc first (门面腐化 guard, 设计 §6).\n */\nexport interface CodingAgentFacadeV1 {\n\treadonly version: 1;\n\n\t// --- Run control ---\n\t/**\n\t * Delegates to AgentSession.prompt(). The full PromptOptions pass through,\n\t * including the internal RPC preflight hook (`preflightResult`) that RPC\n\t * mode uses to observe prompt acceptance (阶段 3, 设计 §2.9).\n\t */\n\tprompt(text: string, options?: CodingAgentFacadePromptOptionsV1): Promise<PromptOutcome>;\n\t/** Delegates to AgentSession.steer(). */\n\tsteer(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.abort(); `cancelAgentTasks: false` stops the\n\t * current turn without cancelling background agent tasks (设计 子代理运行时\n\t * §4.2 中断分级,2026-10-02 — the TUI Esc path always passes false). */\n\tabort(options?: { cancelAgentTasks?: boolean }): Promise<void>;\n\t/** Delegates to AgentSession.abortAgentTasks(): cancel every background agent\n\t * task without aborting the current turn (/stop-agents execution face). */\n\tabortAgentTasks(): void;\n\t/** Delegates to AgentSession.getActiveAgentTaskCount(). */\n\tgetActiveAgentTaskCount(): number;\n\t/** Delegates to AgentSession.waitForIdle(). */\n\twaitForIdle(): Promise<void>;\n\n\t// --- Session write paths ---\n\t/** Delegates to AgentSession.compact(). */\n\tcompact(customInstructions?: string): Promise<CompactionResult | CompactionCancelledResult>;\n\t/** Delegates to AgentSession.navigateTree(). */\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;\n\t/** Delegates to AgentSession.reload(). */\n\treload(options?: { beforeSessionStart?: () => void | Promise<void> }): Promise<void>;\n\t/** Delegates to AgentSession.setModel(). */\n\tsetModel(model: Model<Api>, options?: ModelMutationOptions): Promise<void>;\n\t/** Delegates to AgentSession.setThinkingLevel(). */\n\tsetThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;\n\t/** Delegates to AgentSession.setActiveToolsByName(). */\n\tsetActiveToolsByName(toolNames: string[]): void;\n\t/**\n\t * Queued-message read view, composed from AgentSession.getSteeringMessages()\n\t * and AgentSession.getFollowUpMessages(). AgentSession has no single\n\t * getQueuedMessages(); the shape mirrors clearQueue()'s return value.\n\t */\n\tgetQueuedMessages(): { steering: readonly string[]; followUp: readonly string[] };\n\t/** Delegates to AgentSession.clearQueue(). */\n\tclearQueue(): { steering: string[]; followUp: string[] };\n\t/** Delegates to AgentSession.reorderQueuedMessages(): indices refer to the\n\t * queued display lists; a stale or out-of-bounds move returns false. */\n\treorderQueuedMessages(queue: \"steer\" | \"followUp\", from: number, to: number): boolean;\n\t/** Delegates to AgentSession.removeQueuedMessageAt(): removes by queued\n\t * display list index; a stale index returns null. */\n\tremoveQueuedMessageAt(queue: \"steer\" | \"followUp\", index: number): string | null;\n\t/** Delegates to AgentSession.recordSuiteMismatch(). */\n\trecordSuiteMismatch(originalSuiteId: string, currentSuiteId: string): void;\n\t/** Delegates to AgentSession.getSessionAPI(). */\n\tgetSessionAPI(): SessionAPI;\n\n\t// --- Read-only mirror ---\n\t/** Delegates to AgentSession.isIdle. */\n\tisIdle(): boolean;\n\t/** Mirrors AgentSession.state verbatim (phase 0; a projected state view is a later phase, 设计 §3). */\n\tgetState(): AgentState;\n\t/** Delegates to AgentSession.model. */\n\tgetModel(): Model<Api> | undefined;\n\t/** Delegates to AgentSession.getActiveToolNames(). */\n\tgetToolNames(): string[];\n\t/** Delegates to AgentSession.sessionId (via SessionAPI.getSessionId semantics). */\n\tgetSessionId(): string;\n\t/**\n\t * Suite id from the session-suite binding entry (设计 §10.1), read through\n\t * SessionAPI.getBranchEntries(). Undefined when the session carries no\n\t * suite binding.\n\t */\n\tgetSuiteId(): string | undefined;\n\t/** Delegates to AgentSession.sessionManager.getHeader(). SessionManager itself never leaks. */\n\tgetHeader(): SessionHeader | null;\n\t/** Delegates to AgentSession.subscribe(). Event types pass through verbatim (设计 §3). */\n\tsubscribe(listener: AgentSessionEventListener): () => void;\n\t/**\n\t * Invoked after each raw agent event is delivered to session processing;\n\t * the listener is awaited serially by the agent loop and participates in\n\t * run settlement. Exists for stdout backpressure pacing (D-046); the raw\n\t * event payload and abort signal are deliberately not exposed.\n\t */\n\tsubscribeRawEventGate(listener: () => void | Promise<void>): () => void;\n\n\t// --- Read surface (phase 1 slice 1, TUI display/selector reads, 设计 §2.6) ---\n\t/** Delegates to AgentSession.sessionName (which reads sessionManager.getSessionName()). */\n\tgetSessionName(): string | undefined;\n\t/** Delegates to AgentSession.isCompacting: a compaction or branch summarization is running (session level). */\n\tisCompacting(): boolean;\n\t/**\n\t * Delegates to AgentSession.isStreaming: an agent run is active at the\n\t * session level. Distinct from AgentState.isStreaming (agent-level stream\n\t * flag); do not interchange the two.\n\t */\n\tisStreaming(): boolean;\n\t/** Delegates to AgentSession.getContextUsage(). */\n\tgetContextUsage(): ContextUsage | undefined;\n\t/** Delegates to AgentSession.systemPrompt (effective prompt, including per-turn extension modifications). */\n\tgetSystemPrompt(): string;\n\t/** Delegates to AgentSession.scopedModels. Read view only; setScopedModels stays a phase 2 write path. */\n\tgetScopedModels(): ReadonlyArray<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\t/** Delegates to SessionManager.getTree() on the wrapped session. SessionManager itself never leaks. */\n\tgetTree(): SessionTreeNode[];\n\t/** Delegates to SessionManager.getLeafId() on the wrapped session. SessionManager itself never leaks. */\n\tgetLeafId(): string | null;\n\n\t// --- Read surface (phase 1 slice 2, TUI display/selector cluster convergence, 设计 §2.7) ---\n\t/** Delegates to AgentSession.promptTemplates (file-based prompt templates). */\n\tgetPromptTemplates(): ReadonlyArray<PromptTemplate>;\n\t/** Delegates to AgentSession.getToolDefinition(name): the registered tool definition by name, for diagnostics/rendering. */\n\tgetToolDefinition(name: string): ToolDefinition | undefined;\n\t/** Delegates to SessionManager.getCwd() on the wrapped session; identical to host.cwd. SessionManager itself never leaks. */\n\tgetCwd(): string;\n\t/** Delegates to SessionManager.getEntries() on the wrapped session; identical to host.entries. SessionManager itself never leaks. */\n\tgetEntries(): SessionEntry[];\n\t/** Delegates to AgentSession.pendingMessageCount: queued steering + follow-up message count. */\n\tgetPendingMessageCount(): number;\n\n\t// --- Write surface (phase 2, TUI write path convergence, 设计 §2.8) ---\n\t/** Delegates to AgentSession.followUp(). */\n\tfollowUp(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.setScopedModels(). */\n\tsetScopedModels(scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>): void;\n\t/** Delegates to AgentSession.cycleModel(). */\n\tcycleModel(\n\t\tdirection?: \"forward\" | \"backward\",\n\t\toptions?: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t/** Delegates to AgentSession.cycleThinkingLevel(). */\n\tcycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;\n\t/** Delegates to AgentSession.setSteeringMode(). */\n\tsetSteeringMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setFollowUpMode(). */\n\tsetFollowUpMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setSessionName(). */\n\tsetSessionName(name: string): void;\n\t/** Delegates to AgentSession.abortBash(). */\n\tabortBash(): void;\n\t/** Delegates to AgentSession.abortCompaction(). */\n\tabortCompaction(): void;\n\t/** Delegates to AgentSession.abortRetry(). */\n\tabortRetry(): void;\n\t/** Delegates to AgentSession.abortBranchSummary(). */\n\tabortBranchSummary(): void;\n\t/** Delegates to AgentSession.captureBashEpoch(). */\n\tcaptureBashEpoch(): number;\n\t/** Delegates to AgentSession.isBashEpochCurrent(). */\n\tisBashEpochCurrent(epoch: number): boolean;\n\t/** Delegates to AgentSession.emitUserBash(): dispatches the user.bash lifecycle facts. */\n\temitUserBash(excludeFromContext: boolean): void;\n\t/** Delegates to AgentSession.executeBash(). */\n\texecuteBash(\n\t\tcommand: string,\n\t\tonChunk?: (chunk: string) => void,\n\t\toptions?: { excludeFromContext?: boolean; id?: string; operations?: BashOperations },\n\t): Promise<BashResult>;\n\t/** Delegates to AgentSession.recordBashResult(). */\n\trecordBashResult(\n\t\tcommand: string,\n\t\tresult: BashResult,\n\t\toptions?: { excludeFromContext?: boolean; epoch?: number },\n\t): void;\n\n\t// --- Read surface (phase 3, RPC host state reads, 设计 §2.9) ---\n\t/** Delegates to AgentSession.thinkingLevel. */\n\tgetThinkingLevel(): ThinkingLevel;\n\t/** Delegates to AgentSession.steeringMode. */\n\tgetSteeringMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.followUpMode. */\n\tgetFollowUpMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.sessionFile. */\n\tgetSessionFile(): string | undefined;\n\t/** Delegates to AgentSession.getAvailableThinkingLevels(). */\n\tgetAvailableThinkingLevels(): ThinkingLevel[];\n\t/** Delegates to AgentSession.getUserMessagesForForking(). */\n\tgetUserMessagesForForking(): ForkableUserMessage[];\n\t/** Delegates to AgentSession.getLastAssistantText(). */\n\tgetLastAssistantText(): string | undefined;\n\t/** Delegates to AgentSession.getSessionStats(). */\n\tgetSessionStats(): SessionStats;\n\n\t// --- Write surface (phase 3, RPC host writes, 设计 §2.9) ---\n\t/** Delegates to AgentSession.exportToHtml(), including the themeName option. */\n\texportToHtml(outputPath?: string, options?: { themeName?: string }): Promise<string>;\n\n\t// --- Session write path (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Delegates to SessionManager.appendLabelChange() on the wrapped session.\n\t * TUI tree selector label rename write point; SessionAPI has no label write.\n\t */\n\tappendLabelChange(entryId: string, label: string | undefined): string;\n\n\t// --- Resource read surface (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Clean read projections over the wrapped session's resource loader. Skills/\n\t * prompts/agents-files results pass through verbatim; themes and extensions\n\t * are the metadata projections (themes as ThemeMetaV1 without the modes\n\t * Theme class; loader registration maps and the shared runtime never\n\t * leak). Guard reason: TUI startup listing/autocomplete/diagnostics\n\t * consume these read points directly; SessionAPI/CapabilityAPI are\n\t * capability-side contracts with no host display projections.\n\t */\n\t/** Delegates to ResourceLoader.getSkills() on the wrapped session. */\n\tgetSkills(): { skills: Skill[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getPrompts() on the wrapped session. */\n\tgetPrompts(): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getThemes() on the wrapped session. */\n\tgetThemes(): { themes: ThemeMetaV1[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getAgentsFiles() on the wrapped session. */\n\tgetAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> };\n\t/** Delegates to ResourceLoader.getSystemPromptSource() on the wrapped session. */\n\tgetSystemPromptSource(): { path: string } | undefined;\n\t/** Delegates to ResourceLoader.getAppendSystemPromptSources() on the wrapped session. */\n\tgetAppendSystemPromptSources(): Array<{ path: string }>;\n\n\t// --- Model/catalog/context read surface (v1 修订, D-047: TUI direct session reads zeroed) ---\n\t/** Delegates to ModelRuntime.getAvailableSnapshot() on the wrapped session (D-047); ModelRuntime itself never leaks. */\n\tgetAvailableModels(): readonly Model<Api>[];\n\t/** Delegates to ModelRuntime.isUsingSubscription() on the wrapped session (D-047). */\n\tisUsingSubscription(providerId: string): boolean;\n\t/** Delegates to ModelRuntime.getError() on the wrapped session (D-047). */\n\tgetModelsError(): string | undefined;\n\t/**\n\t * Narrow `ModelCatalogRuntime` projection of the wrapped session's\n\t * ModelRuntime for the shared catalog-refresh coordinator (D-047). A\n\t * projection, not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelCatalog(): ModelCatalogRuntime;\n\t/** Delegates to ModelRuntime.checkAuth() on the wrapped session (D-047). */\n\tcheckProviderAuth(providerId: string): Promise<AuthCheck | undefined>;\n\t/** Delegates to ModelRuntime.getAuth() on the wrapped session (D-047). */\n\tgetProviderAuth(providerId: string): Promise<AuthResult | undefined>;\n\t/**\n\t * Narrow `ModelPriceSource` projection of the wrapped session's\n\t * ModelRuntime for the cache-stats pure functions (D-047). A projection,\n\t * not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelPriceSource(): ModelPriceSource;\n\t/**\n\t * Delegates to SessionManager.buildContextEntries() on the wrapped session\n\t * (D-047; delegation restored by the D-047 regression fix — the\n\t * incrementally maintained byId index is required for correct context\n\t * paths after a compaction commit). SessionManager itself never leaks.\n\t */\n\tgetContextEntries(): SessionEntry[];\n\n\t// --- Credential/provider auth read surface (v1 修订, D-048: TUI auth host path) ---\n\t/**\n\t * Narrow `ModelAuthRuntime` projection of the wrapped session's ModelRuntime\n\t * for the TUI auth surface (D-048). A projection, not a wrapper: the full\n\t * runtime never leaks. The credential-management CapabilityAPI semantics\n\t * question stays open (D-047 裁决 3); this only narrows the TUI host path.\n\t */\n\tgetModelAuthRuntime(): ModelAuthRuntime;\n\n\t// --- Session stats/text read surface (v1 修订, B-S2b③-S3a: TUI direct\n\t// session stats/text read cluster convergence) ---\n\t/** Delegates to AgentSession.getSteeringMessages(). */\n\tgetSteeringMessages(): readonly string[];\n\t/** Delegates to AgentSession.getFollowUpMessages(). */\n\tgetFollowUpMessages(): readonly string[];\n\n\t// --- Status/settings + export read surface (v1 修订, B-S2b③-S3b+c: TUI\n\t// status/settings/export cluster direct session read convergence) ---\n\t/** Delegates to AgentSession.retryAttempt. */\n\tgetRetryAttempt(): number;\n\t/** Delegates to AgentSession.isBashRunning. */\n\tisBashRunning(): boolean;\n\t/** Delegates to AgentSession.exportToJsonl(). */\n\texportToJsonl(outputPath?: string): string;\n\n\t// --- Lifecycle ---\n\t/** Delegates to AgentSession.dispose(). */\n\tdispose(): Promise<void>;\n}\n\n/** Creates a facade v1 view over one AgentSession. Pure wrapper: holds no state of its own. */\nexport function createCodingAgentFacade(session: AgentSession): CodingAgentFacadeV1 {\n\treturn {\n\t\tversion: 1,\n\t\tprompt: (text, options) => session.prompt(text, options),\n\t\tsteer: (text, images, options) => session.steer(text, images, options),\n\t\tabort: (options) => session.abort(undefined, options),\n\t\tabortAgentTasks: () => session.abortAgentTasks(),\n\t\tgetActiveAgentTaskCount: () => session.getActiveAgentTaskCount(),\n\t\twaitForIdle: () => session.waitForIdle(),\n\t\tcompact: (customInstructions) => session.compact(customInstructions),\n\t\tnavigateTree: (targetId, options) => session.navigateTree(targetId, options),\n\t\treload: (options) => session.reload(options),\n\t\tsetModel: (model, options) => session.setModel(model, options),\n\t\tsetThinkingLevel: (level, options) => session.setThinkingLevel(level, options),\n\t\tsetActiveToolsByName: (toolNames) => session.setActiveToolsByName(toolNames),\n\t\tgetQueuedMessages: () => ({\n\t\t\tsteering: session.getSteeringMessages(),\n\t\t\tfollowUp: session.getFollowUpMessages(),\n\t\t}),\n\t\tclearQueue: () => session.clearQueue(),\n\t\treorderQueuedMessages: (queue, from, to) => session.reorderQueuedMessages(queue, from, to),\n\t\tremoveQueuedMessageAt: (queue, index) => session.removeQueuedMessageAt(queue, index),\n\t\trecordSuiteMismatch: (originalSuiteId, currentSuiteId) =>\n\t\t\tsession.recordSuiteMismatch(originalSuiteId, currentSuiteId),\n\t\tgetSessionAPI: () => session.getSessionAPI(),\n\t\tisIdle: () => session.isIdle,\n\t\tgetState: () => session.state,\n\t\tgetModel: () => session.model,\n\t\tgetToolNames: () => session.getActiveToolNames(),\n\t\tgetSessionId: () => session.sessionId,\n\t\tgetHeader: () => session.sessionManager.getHeader(),\n\t\tsubscribe: (listener) => session.subscribe(listener),\n\t\tsubscribeRawEventGate: (listener) => session.agent.subscribe(() => listener()),\n\t\tgetSessionName: () => session.sessionName,\n\t\tisCompacting: () => session.isCompacting,\n\t\tisStreaming: () => session.isStreaming,\n\t\tgetContextUsage: () => session.getContextUsage(),\n\t\tgetSystemPrompt: () => session.systemPrompt,\n\t\tgetScopedModels: () => session.scopedModels,\n\t\tgetTree: () => session.sessionManager.getTree(),\n\t\tgetLeafId: () => session.sessionManager.getLeafId(),\n\t\tgetPromptTemplates: () => session.promptTemplates,\n\t\tgetToolDefinition: (name) => session.getToolDefinition(name),\n\t\tgetCwd: () => session.sessionManager.getCwd(),\n\t\tgetEntries: () => session.sessionManager.getEntries(),\n\t\tgetPendingMessageCount: () => session.pendingMessageCount,\n\t\tfollowUp: (text, images, options) => session.followUp(text, images, options),\n\t\tsetScopedModels: (scopedModels) => session.setScopedModels(scopedModels),\n\t\tcycleModel: (direction, options) => session.cycleModel(direction, options),\n\t\tcycleThinkingLevel: (options) => session.cycleThinkingLevel(options),\n\t\tsetSteeringMode: (mode) => session.setSteeringMode(mode),\n\t\tsetFollowUpMode: (mode) => session.setFollowUpMode(mode),\n\t\tsetSessionName: (name) => session.setSessionName(name),\n\t\tabortBash: () => session.abortBash(),\n\t\tabortCompaction: () => session.abortCompaction(),\n\t\tabortRetry: () => session.abortRetry(),\n\t\tabortBranchSummary: () => session.abortBranchSummary(),\n\t\tcaptureBashEpoch: () => session.captureBashEpoch(),\n\t\tisBashEpochCurrent: (epoch) => session.isBashEpochCurrent(epoch),\n\t\temitUserBash: (excludeFromContext) => session.emitUserBash(excludeFromContext),\n\t\texecuteBash: (command, onChunk, options) => session.executeBash(command, onChunk, options),\n\t\trecordBashResult: (command, result, options) => session.recordBashResult(command, result, options),\n\t\tgetThinkingLevel: () => session.thinkingLevel,\n\t\tgetSteeringMode: () => session.steeringMode,\n\t\tgetFollowUpMode: () => session.followUpMode,\n\t\tgetSessionFile: () => session.sessionFile,\n\t\tgetAvailableThinkingLevels: () => session.getAvailableThinkingLevels(),\n\t\tgetUserMessagesForForking: () => session.getUserMessagesForForking(),\n\t\tgetLastAssistantText: () => session.getLastAssistantText(),\n\t\tgetSessionStats: () => session.getSessionStats(),\n\t\texportToHtml: (outputPath, options) => session.exportToHtml(outputPath, options),\n\t\tappendLabelChange: (entryId, label) => session.sessionManager.appendLabelChange(entryId, label),\n\t\tgetSkills: () => session.resourceLoader.getSkills(),\n\t\tgetPrompts: () => session.resourceLoader.getPrompts(),\n\t\tgetThemes: () => session.resourceLoader.getThemes(),\n\t\tgetAgentsFiles: () => session.resourceLoader.getAgentsFiles(),\n\t\tgetSystemPromptSource: () => session.resourceLoader.getSystemPromptSource(),\n\t\tgetAppendSystemPromptSources: () => session.resourceLoader.getAppendSystemPromptSources(),\n\t\tgetSuiteId: () => readSessionSuiteBinding(session.getSessionAPI().getBranchEntries())?.suiteId,\n\t\tgetAvailableModels: () => session.modelRuntime.getAvailableSnapshot(),\n\t\tisUsingSubscription: (providerId) => session.modelRuntime.isUsingSubscription(providerId),\n\t\tgetModelsError: () => session.modelRuntime.getError(),\n\t\tgetModelCatalog: () => session.modelRuntime,\n\t\tcheckProviderAuth: (providerId) => session.modelRuntime.checkAuth(providerId),\n\t\tgetProviderAuth: (providerId) => session.modelRuntime.getAuth(providerId),\n\t\tgetModelPriceSource: () => session.modelRuntime,\n\t\tgetModelAuthRuntime: () => session.modelRuntime,\n\t\t// Delegates to the SessionManager method: its incrementally maintained\n\t\t// byId index walks the full entry graph, which rebuild-from-entries\n\t\t// diverges from after a compaction commit (D-047 regression fix).\n\t\tgetContextEntries: () => session.sessionManager.buildContextEntries(),\n\t\tgetSteeringMessages: () => session.getSteeringMessages(),\n\t\tgetFollowUpMessages: () => session.getFollowUpMessages(),\n\t\tgetRetryAttempt: () => session.retryAttempt,\n\t\tisBashRunning: () => session.isBashRunning,\n\t\texportToJsonl: (outputPath) => session.exportToJsonl(outputPath),\n\t\tdispose: () => session.dispose(),\n\t};\n}\n"]}
1
+ {"version":3,"file":"coding-agent-facade.d.ts","sourceRoot":"","sources":["../../../src/core/facade/coding-agent-facade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACzE,OA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IAC5E,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IACtE,0EAA0E;IAC1E,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IACrE;;;;OAIG;IACH,mBAAmB,IAAI,gBAAgB,CAAC;IACxC;;;;;OAKG;IACH,iBAAiB,IAAI,YAAY,EAAE,CAAC;IAGpC;;;;;OAKG;IACH,mBAAmB,IAAI,gBAAgB,CAAC;IAIxC,uDAAuD;IACvD,mBAAmB,IAAI,SAAS,MAAM,EAAE,CAAC;IACzC,uDAAuD;IACvD,mBAAmB,IAAI,SAAS,MAAM,EAAE,CAAC;IAIzC,8CAA8C;IAC9C,eAAe,IAAI,MAAM,CAAC;IAC1B,+CAA+C;IAC/C,aAAa,IAAI,OAAO,CAAC;IACzB,iDAAiD;IACjD,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAG3C,2CAA2C;IAC3C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED,+FAA+F;AAC/F,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,YAAY,GAAG,mBAAmB,CAkGlF","sourcesContent":["/**\n * Stable facade v1: a read-only mirror plus pass-through run control and\n * session write paths over one AgentSession.\n *\n * Design: docs/design/稳定门面统一入口设计.md (§2.5 阶段 0 实际面, §2.6 slice 1\n * 读面, §2.7 slice 2 读面, §2.8 阶段 2 写面, §2.9 阶段 3 RPC 面, §3 API 面 v1,\n * §4 阶段 0/1/2/3). Every member is a pure delegate onto the wrapped\n * AgentSession or its existing curated surfaces (`getSessionAPI()`, `host`).\n * No new behavior, no policy, no state of its own. Product entry points\n * (TUI/CLI/RPC/Embedded) migrate onto this surface in later phases;\n * AgentSession stays the internal adapter behind it.\n *\n * Scope: in-package stable surface for those product entry points. It is not\n * exported from the package root and is not a cross-package public contract.\n */\n\nimport type { AgentState, ThinkingLevel } from \"@agent-forge/agent-core\";\nimport type { AuthCheck, AuthResult, ImageContent } from \"@agent-forge/ai\";\nimport type { Api, Model } from \"@agent-forge/ai/compat\";\nimport type { ModelCatalogRuntime } from \"../../host/model-catalog-refresh.ts\";\nimport { readSessionSuiteBinding } from \"../../suites/suite-loader.ts\";\nimport type {\n\tAgentSession,\n\tAgentSessionEventListener,\n\tModelCycleResult,\n\tModelMutationOptions,\n\tPromptOptions,\n\tQueuedInputDisposition,\n\tSessionStats,\n} from \"../agent-session.ts\";\nimport type { CompactionCancelledResult } from \"../agent-session-compaction.ts\";\nimport type { ForkableUserMessage } from \"../agent-session-projection.ts\";\nimport type { BashResult } from \"../bash-executor.ts\";\nimport type { ModelPriceSource } from \"../cache-stats.ts\";\nimport type { CompactionResult } from \"../compaction/index.ts\";\nimport type { ResourceDiagnostic } from \"../diagnostics.ts\";\nimport type { ContextUsage, PromptOutcome, SessionAPI } from \"../extensions/public-api.ts\";\nimport type { InputSource } from \"../input-source.ts\";\nimport type { ModelRuntime } from \"../model-runtime.ts\";\nimport type { PromptTemplate } from \"../prompt-templates.ts\";\nimport type { ThemeMetaV1 } from \"../resource-loader.ts\";\nimport type { BranchSummaryEntry, SessionEntry, SessionHeader, SessionTreeNode } from \"../session-manager.ts\";\nimport type { Skill } from \"../skills.ts\";\nimport type { BashOperations } from \"../tools/bash-operations.ts\";\nimport type { ToolDefinition } from \"../tools/tool-definition.ts\";\n\n/** Prompt options for the facade. Identical to AgentSession PromptOptions. */\nexport type CodingAgentFacadePromptOptionsV1 = PromptOptions;\n\n/**\n * Narrow credential/provider auth projection (D-048): the TUI auth surface\n * only. Covers exactly the seven methods the auth host consumes\n * (`getProviders`/`getProvider`/`getProviderAuthStatus`/`isUsingOAuth`/\n * `listCredentials`/`login`/`logout`); the full ModelRuntime never leaks to\n * the host. The credential-management CapabilityAPI semantics question stays\n * open (D-047 裁决 3); this narrows the TUI host path without deciding it.\n */\nexport type ModelAuthRuntime = Pick<\n\tModelRuntime,\n\t\"getProviders\" | \"getProvider\" | \"getProviderAuthStatus\" | \"isUsingOAuth\" | \"listCredentials\" | \"login\" | \"logout\"\n>;\n\n/**\n * Stable facade v1: the consumption surface for product hosts, versioned per\n * repo convention (EmbeddedSdkBindingV1 precedent). Members are pass-throughs\n * onto the wrapped AgentSession; new members must extend the facade design\n * doc first (门面腐化 guard, 设计 §6).\n */\nexport interface CodingAgentFacadeV1 {\n\treadonly version: 1;\n\n\t// --- Run control ---\n\t/**\n\t * Delegates to AgentSession.prompt(). The full PromptOptions pass through,\n\t * including the internal RPC preflight hook (`preflightResult`) that RPC\n\t * mode uses to observe prompt acceptance (阶段 3, 设计 §2.9).\n\t */\n\tprompt(text: string, options?: CodingAgentFacadePromptOptionsV1): Promise<PromptOutcome>;\n\t/** Delegates to AgentSession.steer(). */\n\tsteer(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.abort(); `cancelAgentTasks: false` stops the\n\t * current turn without cancelling background agent tasks (设计 子代理运行时\n\t * §4.2 中断分级,2026-10-02 — the TUI Esc path always passes false). */\n\tabort(options?: { cancelAgentTasks?: boolean }): Promise<void>;\n\t/** Delegates to AgentSession.abortAgentTasks(): cancel every background agent\n\t * task without aborting the current turn (/stop-agents execution face). */\n\tabortAgentTasks(): void;\n\t/** Delegates to AgentSession.getActiveAgentTaskCount(). */\n\tgetActiveAgentTaskCount(): number;\n\t/** Delegates to AgentSession.waitForIdle(). */\n\twaitForIdle(): Promise<void>;\n\n\t// --- Session write paths ---\n\t/** Delegates to AgentSession.compact(). */\n\tcompact(customInstructions?: string): Promise<CompactionResult | CompactionCancelledResult>;\n\t/** Delegates to AgentSession.navigateTree(). */\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;\n\t/** Delegates to AgentSession.reload(). */\n\treload(options?: { beforeSessionStart?: () => void | Promise<void> }): Promise<void>;\n\t/** Delegates to AgentSession.setModel(). */\n\tsetModel(model: Model<Api>, options?: ModelMutationOptions): Promise<void>;\n\t/** Delegates to AgentSession.setThinkingLevel(). */\n\tsetThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;\n\t/** Delegates to AgentSession.setActiveToolsByName(). */\n\tsetActiveToolsByName(toolNames: string[]): void;\n\t/**\n\t * Queued-message read view, composed from AgentSession.getSteeringMessages()\n\t * and AgentSession.getFollowUpMessages(). AgentSession has no single\n\t * getQueuedMessages(); the shape mirrors clearQueue()'s return value.\n\t */\n\tgetQueuedMessages(): { steering: readonly string[]; followUp: readonly string[] };\n\t/** Delegates to AgentSession.clearQueue(). */\n\tclearQueue(): { steering: string[]; followUp: string[] };\n\t/** Delegates to AgentSession.reorderQueuedMessages(): indices refer to the\n\t * queued display lists; a stale or out-of-bounds move returns false. */\n\treorderQueuedMessages(queue: \"steer\" | \"followUp\", from: number, to: number): boolean;\n\t/** Delegates to AgentSession.removeQueuedMessageAt(): removes by queued\n\t * display list index; a stale index returns null. */\n\tremoveQueuedMessageAt(queue: \"steer\" | \"followUp\", index: number): string | null;\n\t/** Delegates to AgentSession.recordSuiteMismatch(). */\n\trecordSuiteMismatch(originalSuiteId: string, currentSuiteId: string): void;\n\t/** Delegates to AgentSession.getSessionAPI(). */\n\tgetSessionAPI(): SessionAPI;\n\n\t// --- Read-only mirror ---\n\t/** Delegates to AgentSession.isIdle. */\n\tisIdle(): boolean;\n\t/** Mirrors AgentSession.state verbatim (phase 0; a projected state view is a later phase, 设计 §3). */\n\tgetState(): AgentState;\n\t/** Delegates to AgentSession.model. */\n\tgetModel(): Model<Api> | undefined;\n\t/** Delegates to AgentSession.getActiveToolNames(). */\n\tgetToolNames(): string[];\n\t/** Delegates to AgentSession.sessionId (via SessionAPI.getSessionId semantics). */\n\tgetSessionId(): string;\n\t/**\n\t * Suite id from the session-suite binding entry (设计 §10.1), read through\n\t * SessionAPI.getBranchEntries(). Undefined when the session carries no\n\t * suite binding.\n\t */\n\tgetSuiteId(): string | undefined;\n\t/** Delegates to AgentSession.sessionManager.getHeader(). SessionManager itself never leaks. */\n\tgetHeader(): SessionHeader | null;\n\t/** Delegates to AgentSession.subscribe(). Event types pass through verbatim (设计 §3). */\n\tsubscribe(listener: AgentSessionEventListener): () => void;\n\t/**\n\t * Invoked after each raw agent event is delivered to session processing;\n\t * the listener is awaited serially by the agent loop and participates in\n\t * run settlement. Exists for stdout backpressure pacing (D-046); the raw\n\t * event payload and abort signal are deliberately not exposed.\n\t */\n\tsubscribeRawEventGate(listener: () => void | Promise<void>): () => void;\n\n\t// --- Read surface (phase 1 slice 1, TUI display/selector reads, 设计 §2.6) ---\n\t/** Delegates to AgentSession.sessionName (which reads sessionManager.getSessionName()). */\n\tgetSessionName(): string | undefined;\n\t/** Delegates to AgentSession.isCompacting: a compaction or branch summarization is running (session level). */\n\tisCompacting(): boolean;\n\t/**\n\t * Delegates to AgentSession.isStreaming: an agent run is active at the\n\t * session level. Distinct from AgentState.isStreaming (agent-level stream\n\t * flag); do not interchange the two.\n\t */\n\tisStreaming(): boolean;\n\t/** Delegates to AgentSession.getContextUsage(). */\n\tgetContextUsage(): ContextUsage | undefined;\n\t/** Delegates to AgentSession.systemPrompt (effective prompt, including per-turn extension modifications). */\n\tgetSystemPrompt(): string;\n\t/** Delegates to AgentSession.scopedModels. Read view only; setScopedModels stays a phase 2 write path. */\n\tgetScopedModels(): ReadonlyArray<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\t/** Delegates to SessionManager.getTree() on the wrapped session. SessionManager itself never leaks. */\n\tgetTree(): SessionTreeNode[];\n\t/** Delegates to SessionManager.getLeafId() on the wrapped session. SessionManager itself never leaks. */\n\tgetLeafId(): string | null;\n\n\t// --- Read surface (phase 1 slice 2, TUI display/selector cluster convergence, 设计 §2.7) ---\n\t/** Delegates to AgentSession.promptTemplates (file-based prompt templates). */\n\tgetPromptTemplates(): ReadonlyArray<PromptTemplate>;\n\t/** Delegates to AgentSession.getToolDefinition(name): the registered tool definition by name, for diagnostics/rendering. */\n\tgetToolDefinition(name: string): ToolDefinition | undefined;\n\t/** Delegates to SessionManager.getCwd() on the wrapped session; identical to host.cwd. SessionManager itself never leaks. */\n\tgetCwd(): string;\n\t/** Delegates to SessionManager.getEntries() on the wrapped session; identical to host.entries. SessionManager itself never leaks. */\n\tgetEntries(): SessionEntry[];\n\t/** Delegates to AgentSession.pendingMessageCount: queued steering + follow-up message count. */\n\tgetPendingMessageCount(): number;\n\n\t// --- Write surface (phase 2, TUI write path convergence, 设计 §2.8) ---\n\t/** Delegates to AgentSession.followUp(). */\n\tfollowUp(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.setScopedModels(). */\n\tsetScopedModels(scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>): void;\n\t/** Delegates to AgentSession.cycleModel(). */\n\tcycleModel(\n\t\tdirection?: \"forward\" | \"backward\",\n\t\toptions?: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t/** Delegates to AgentSession.cycleThinkingLevel(). */\n\tcycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;\n\t/** Delegates to AgentSession.setSteeringMode(). */\n\tsetSteeringMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setFollowUpMode(). */\n\tsetFollowUpMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setSessionName(). */\n\tsetSessionName(name: string): void;\n\t/** Delegates to AgentSession.abortBash(). */\n\tabortBash(): void;\n\t/** Delegates to AgentSession.abortCompaction(). */\n\tabortCompaction(): void;\n\t/** Delegates to AgentSession.abortRetry(). */\n\tabortRetry(): void;\n\t/** Delegates to AgentSession.abortBranchSummary(). */\n\tabortBranchSummary(): void;\n\t/** Delegates to AgentSession.captureBashEpoch(). */\n\tcaptureBashEpoch(): number;\n\t/** Delegates to AgentSession.isBashEpochCurrent(). */\n\tisBashEpochCurrent(epoch: number): boolean;\n\t/** Delegates to AgentSession.emitUserBash(): dispatches the user.bash lifecycle facts. */\n\temitUserBash(excludeFromContext: boolean): void;\n\t/** Delegates to AgentSession.executeBash(). */\n\texecuteBash(\n\t\tcommand: string,\n\t\tonChunk?: (chunk: string) => void,\n\t\toptions?: { excludeFromContext?: boolean; id?: string; operations?: BashOperations },\n\t): Promise<BashResult>;\n\t/** Delegates to AgentSession.recordBashResult(). */\n\trecordBashResult(\n\t\tcommand: string,\n\t\tresult: BashResult,\n\t\toptions?: { excludeFromContext?: boolean; epoch?: number },\n\t): void;\n\n\t// --- Read surface (phase 3, RPC host state reads, 设计 §2.9) ---\n\t/** Delegates to AgentSession.thinkingLevel. */\n\tgetThinkingLevel(): ThinkingLevel;\n\t/** Delegates to AgentSession.steeringMode. */\n\tgetSteeringMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.followUpMode. */\n\tgetFollowUpMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.sessionFile. */\n\tgetSessionFile(): string | undefined;\n\t/** Delegates to AgentSession.getAvailableThinkingLevels(). */\n\tgetAvailableThinkingLevels(): ThinkingLevel[];\n\t/** Delegates to AgentSession.getUserMessagesForForking(). */\n\tgetUserMessagesForForking(): ForkableUserMessage[];\n\t/** Delegates to AgentSession.getLastAssistantText(). */\n\tgetLastAssistantText(): string | undefined;\n\t/** Delegates to AgentSession.getSessionStats(). */\n\tgetSessionStats(): SessionStats;\n\n\t// --- Write surface (phase 3, RPC host writes, 设计 §2.9) ---\n\t/** Delegates to AgentSession.exportToHtml(), including the themeName option. */\n\texportToHtml(outputPath?: string, options?: { themeName?: string }): Promise<string>;\n\n\t// --- Session write path (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Delegates to SessionManager.appendLabelChange() on the wrapped session.\n\t * TUI tree selector label rename write point; SessionAPI has no label write.\n\t */\n\tappendLabelChange(entryId: string, label: string | undefined): string;\n\n\t// --- Resource read surface (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Clean read projections over the wrapped session's resource loader. Skills/\n\t * prompts/agents-files results pass through verbatim; themes and extensions\n\t * are the metadata projections (themes as ThemeMetaV1 without the modes\n\t * Theme class; loader registration maps and the shared runtime never\n\t * leak). Guard reason: TUI startup listing/autocomplete/diagnostics\n\t * consume these read points directly; SessionAPI/CapabilityAPI are\n\t * capability-side contracts with no host display projections.\n\t */\n\t/** Delegates to ResourceLoader.getSkills() on the wrapped session. */\n\tgetSkills(): { skills: Skill[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getPrompts() on the wrapped session. */\n\tgetPrompts(): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getThemes() on the wrapped session. */\n\tgetThemes(): { themes: ThemeMetaV1[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getAgentsFiles() on the wrapped session. */\n\tgetAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> };\n\t/** Delegates to ResourceLoader.getSystemPromptSource() on the wrapped session. */\n\tgetSystemPromptSource(): { path: string } | undefined;\n\t/** Delegates to ResourceLoader.getAppendSystemPromptSources() on the wrapped session. */\n\tgetAppendSystemPromptSources(): Array<{ path: string }>;\n\n\t// --- Model/catalog/context read surface (v1 修订, D-047: TUI direct session reads zeroed) ---\n\t/** Delegates to ModelRuntime.getAvailableSnapshot() on the wrapped session (D-047); ModelRuntime itself never leaks. */\n\tgetAvailableModels(): readonly Model<Api>[];\n\t/** Delegates to ModelRuntime.isUsingSubscription() on the wrapped session (D-047). */\n\tisUsingSubscription(providerId: string): boolean;\n\t/** Delegates to ModelRuntime.getError() on the wrapped session (D-047). */\n\tgetModelsError(): string | undefined;\n\t/**\n\t * Narrow `ModelCatalogRuntime` projection of the wrapped session's\n\t * ModelRuntime for the shared catalog-refresh coordinator (D-047). A\n\t * projection, not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelCatalog(): ModelCatalogRuntime;\n\t/** Delegates to ModelRuntime.checkAuth() on the wrapped session (D-047). */\n\tcheckProviderAuth(providerId: string): Promise<AuthCheck | undefined>;\n\t/** Delegates to ModelRuntime.getAuth() on the wrapped session (D-047). */\n\tgetProviderAuth(providerId: string): Promise<AuthResult | undefined>;\n\t/**\n\t * Narrow `ModelPriceSource` projection of the wrapped session's\n\t * ModelRuntime for the cache-stats pure functions (D-047). A projection,\n\t * not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelPriceSource(): ModelPriceSource;\n\t/**\n\t * Delegates to SessionManager.buildContextEntries() on the wrapped session\n\t * (D-047; delegation restored by the D-047 regression fix — the\n\t * incrementally maintained byId index is required for correct context\n\t * paths after a compaction commit). SessionManager itself never leaks.\n\t */\n\tgetContextEntries(): SessionEntry[];\n\n\t// --- Credential/provider auth read surface (v1 修订, D-048: TUI auth host path) ---\n\t/**\n\t * Narrow `ModelAuthRuntime` projection of the wrapped session's ModelRuntime\n\t * for the TUI auth surface (D-048). A projection, not a wrapper: the full\n\t * runtime never leaks. The credential-management CapabilityAPI semantics\n\t * question stays open (D-047 裁决 3); this only narrows the TUI host path.\n\t */\n\tgetModelAuthRuntime(): ModelAuthRuntime;\n\n\t// --- Session stats/text read surface (v1 修订, B-S2b③-S3a: TUI direct\n\t// session stats/text read cluster convergence) ---\n\t/** Delegates to AgentSession.getSteeringMessages(). */\n\tgetSteeringMessages(): readonly string[];\n\t/** Delegates to AgentSession.getFollowUpMessages(). */\n\tgetFollowUpMessages(): readonly string[];\n\n\t// --- Status/settings + export read surface (v1 修订, B-S2b③-S3b+c: TUI\n\t// status/settings/export cluster direct session read convergence) ---\n\t/** Delegates to AgentSession.retryAttempt. */\n\tgetRetryAttempt(): number;\n\t/** Delegates to AgentSession.isBashRunning. */\n\tisBashRunning(): boolean;\n\t/** Delegates to AgentSession.exportToJsonl(). */\n\texportToJsonl(outputPath?: string): string;\n\n\t// --- Lifecycle ---\n\t/** Delegates to AgentSession.dispose(). */\n\tdispose(): Promise<void>;\n}\n\n/** Creates a facade v1 view over one AgentSession. Pure wrapper: holds no state of its own. */\nexport function createCodingAgentFacade(session: AgentSession): CodingAgentFacadeV1 {\n\treturn {\n\t\tversion: 1,\n\t\tprompt: (text, options) => session.prompt(text, options),\n\t\tsteer: (text, images, options) => session.steer(text, images, options),\n\t\tabort: (options) => session.abort(undefined, options),\n\t\tabortAgentTasks: () => session.abortAgentTasks(),\n\t\tgetActiveAgentTaskCount: () => session.getActiveAgentTaskCount(),\n\t\twaitForIdle: () => session.waitForIdle(),\n\t\tcompact: (customInstructions) => session.compact(customInstructions),\n\t\tnavigateTree: (targetId, options) => session.navigateTree(targetId, options),\n\t\treload: (options) => session.reload(options),\n\t\tsetModel: (model, options) => session.setModel(model, options),\n\t\tsetThinkingLevel: (level, options) => session.setThinkingLevel(level, options),\n\t\tsetActiveToolsByName: (toolNames) => session.setActiveToolsByName(toolNames),\n\t\tgetQueuedMessages: () => ({\n\t\t\tsteering: session.getSteeringMessages(),\n\t\t\tfollowUp: session.getFollowUpMessages(),\n\t\t}),\n\t\tclearQueue: () => session.clearQueue(),\n\t\treorderQueuedMessages: (queue, from, to) => session.reorderQueuedMessages(queue, from, to),\n\t\tremoveQueuedMessageAt: (queue, index) => session.removeQueuedMessageAt(queue, index),\n\t\trecordSuiteMismatch: (originalSuiteId, currentSuiteId) =>\n\t\t\tsession.recordSuiteMismatch(originalSuiteId, currentSuiteId),\n\t\tgetSessionAPI: () => session.getSessionAPI(),\n\t\tisIdle: () => session.isIdle,\n\t\tgetState: () => session.state,\n\t\tgetModel: () => session.model,\n\t\tgetToolNames: () => session.getActiveToolNames(),\n\t\tgetSessionId: () => session.sessionId,\n\t\tgetHeader: () => session.sessionManager.getHeader(),\n\t\tsubscribe: (listener) => session.subscribe(listener),\n\t\tsubscribeRawEventGate: (listener) => session.agent.subscribe(() => listener()),\n\t\tgetSessionName: () => session.sessionName,\n\t\tisCompacting: () => session.isCompacting,\n\t\tisStreaming: () => session.isStreaming,\n\t\tgetContextUsage: () => session.getContextUsage(),\n\t\tgetSystemPrompt: () => session.systemPrompt,\n\t\tgetScopedModels: () => session.scopedModels,\n\t\tgetTree: () => session.sessionManager.getTree(),\n\t\tgetLeafId: () => session.sessionManager.getLeafId(),\n\t\tgetPromptTemplates: () => session.promptTemplates,\n\t\tgetToolDefinition: (name) => session.getToolDefinition(name),\n\t\tgetCwd: () => session.sessionManager.getCwd(),\n\t\tgetEntries: () => session.sessionManager.getEntries(),\n\t\tgetPendingMessageCount: () => session.pendingMessageCount,\n\t\tfollowUp: (text, images, options) => session.followUp(text, images, options),\n\t\tsetScopedModels: (scopedModels) => session.setScopedModels(scopedModels),\n\t\tcycleModel: (direction, options) => session.cycleModel(direction, options),\n\t\tcycleThinkingLevel: (options) => session.cycleThinkingLevel(options),\n\t\tsetSteeringMode: (mode) => session.setSteeringMode(mode),\n\t\tsetFollowUpMode: (mode) => session.setFollowUpMode(mode),\n\t\tsetSessionName: (name) => session.setSessionName(name),\n\t\tabortBash: () => session.abortBash(),\n\t\tabortCompaction: () => session.abortCompaction(),\n\t\tabortRetry: () => session.abortRetry(),\n\t\tabortBranchSummary: () => session.abortBranchSummary(),\n\t\tcaptureBashEpoch: () => session.captureBashEpoch(),\n\t\tisBashEpochCurrent: (epoch) => session.isBashEpochCurrent(epoch),\n\t\temitUserBash: (excludeFromContext) => session.emitUserBash(excludeFromContext),\n\t\texecuteBash: (command, onChunk, options) => session.executeBash(command, onChunk, options),\n\t\trecordBashResult: (command, result, options) => session.recordBashResult(command, result, options),\n\t\tgetThinkingLevel: () => session.thinkingLevel,\n\t\tgetSteeringMode: () => session.steeringMode,\n\t\tgetFollowUpMode: () => session.followUpMode,\n\t\tgetSessionFile: () => session.sessionFile,\n\t\tgetAvailableThinkingLevels: () => session.getAvailableThinkingLevels(),\n\t\tgetUserMessagesForForking: () => session.getUserMessagesForForking(),\n\t\tgetLastAssistantText: () => session.getLastAssistantText(),\n\t\tgetSessionStats: () => session.getSessionStats(),\n\t\texportToHtml: (outputPath, options) => session.exportToHtml(outputPath, options),\n\t\tappendLabelChange: (entryId, label) => session.sessionManager.appendLabelChange(entryId, label),\n\t\tgetSkills: () => session.resourceLoader.getSkills(),\n\t\tgetPrompts: () => session.resourceLoader.getPrompts(),\n\t\tgetThemes: () => session.resourceLoader.getThemes(),\n\t\tgetAgentsFiles: () => session.resourceLoader.getAgentsFiles(),\n\t\tgetSystemPromptSource: () => session.resourceLoader.getSystemPromptSource(),\n\t\tgetAppendSystemPromptSources: () => session.resourceLoader.getAppendSystemPromptSources(),\n\t\tgetSuiteId: () => readSessionSuiteBinding(session.getSessionAPI().getBranchEntries())?.suiteId,\n\t\tgetAvailableModels: () => session.modelRuntime.getAvailableSnapshot(),\n\t\tisUsingSubscription: (providerId) => session.modelRuntime.isUsingSubscription(providerId),\n\t\tgetModelsError: () => session.modelRuntime.getError(),\n\t\tgetModelCatalog: () => session.modelRuntime,\n\t\tcheckProviderAuth: (providerId) => session.modelRuntime.checkAuth(providerId),\n\t\tgetProviderAuth: (providerId) => session.modelRuntime.getAuth(providerId),\n\t\tgetModelPriceSource: () => session.modelRuntime,\n\t\tgetModelAuthRuntime: () => session.modelRuntime,\n\t\t// Delegates to the SessionManager method: its incrementally maintained\n\t\t// byId index walks the full entry graph, which rebuild-from-entries\n\t\t// diverges from after a compaction commit (D-047 regression fix).\n\t\tgetContextEntries: () => session.sessionManager.buildContextEntries(),\n\t\tgetSteeringMessages: () => session.getSteeringMessages(),\n\t\tgetFollowUpMessages: () => session.getFollowUpMessages(),\n\t\tgetRetryAttempt: () => session.retryAttempt,\n\t\tisBashRunning: () => session.isBashRunning,\n\t\texportToJsonl: (outputPath) => session.exportToJsonl(outputPath),\n\t\tdispose: () => session.dispose(),\n\t};\n}\n"]}
@@ -13,7 +13,7 @@
13
13
  * Scope: in-package stable surface for those product entry points. It is not
14
14
  * exported from the package root and is not a cross-package public contract.
15
15
  */
16
- import { readSessionSuiteBinding } from "../../profiles/suite-loader.js";
16
+ import { readSessionSuiteBinding } from "../../suites/suite-loader.js";
17
17
  /** Creates a facade v1 view over one AgentSession. Pure wrapper: holds no state of its own. */
18
18
  export function createCodingAgentFacade(session) {
19
19
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"coding-agent-facade.js","sourceRoot":"","sources":["../../../src/core/facade/coding-agent-facade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAwUzE,+FAA+F;AAC/F,MAAM,UAAU,uBAAuB,CAAC,OAAqB,EAAuB;IACnF,OAAO;QACN,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC;QACxD,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC;QACtE,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC;QACrD,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE;QAChD,uBAAuB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,uBAAuB,EAAE;QAChE,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE;QACxC,OAAO,EAAE,CAAC,kBAAkB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC;QACpE,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC5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AAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC;QAChE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;KAChC,CAAC;AAAA,CACF","sourcesContent":["/**\n * Stable facade v1: a read-only mirror plus pass-through run control and\n * session write paths over one AgentSession.\n *\n * Design: docs/design/稳定门面统一入口设计.md (§2.5 阶段 0 实际面, §2.6 slice 1\n * 读面, §2.7 slice 2 读面, §2.8 阶段 2 写面, §2.9 阶段 3 RPC 面, §3 API 面 v1,\n * §4 阶段 0/1/2/3). Every member is a pure delegate onto the wrapped\n * AgentSession or its existing curated surfaces (`getSessionAPI()`, `host`).\n * No new behavior, no policy, no state of its own. Product entry points\n * (TUI/CLI/RPC/Embedded) migrate onto this surface in later phases;\n * AgentSession stays the internal adapter behind it.\n *\n * Scope: in-package stable surface for those product entry points. It is not\n * exported from the package root and is not a cross-package public contract.\n */\n\nimport type { AgentState, ThinkingLevel } from \"@agent-forge/agent-core\";\nimport type { AuthCheck, AuthResult, ImageContent } from \"@agent-forge/ai\";\nimport type { Api, Model } from \"@agent-forge/ai/compat\";\nimport type { ModelCatalogRuntime } from \"../../modes/interactive/model-catalog-refresh.ts\";\nimport { readSessionSuiteBinding } from \"../../profiles/suite-loader.ts\";\nimport type {\n\tAgentSession,\n\tAgentSessionEventListener,\n\tModelCycleResult,\n\tModelMutationOptions,\n\tPromptOptions,\n\tQueuedInputDisposition,\n\tSessionStats,\n} from \"../agent-session.ts\";\nimport type { CompactionCancelledResult } from \"../agent-session-compaction.ts\";\nimport type { ForkableUserMessage } from \"../agent-session-projection.ts\";\nimport type { BashResult } from \"../bash-executor.ts\";\nimport type { ModelPriceSource } from \"../cache-stats.ts\";\nimport type { CompactionResult } from \"../compaction/index.ts\";\nimport type { ResourceDiagnostic } from \"../diagnostics.ts\";\nimport type { ContextUsage, PromptOutcome, SessionAPI } from \"../extensions/public-api.ts\";\nimport type { InputSource } from \"../input-source.ts\";\nimport type { ModelRuntime } from \"../model-runtime.ts\";\nimport type { PromptTemplate } from \"../prompt-templates.ts\";\nimport type { ThemeMetaV1 } from \"../resource-loader.ts\";\nimport type { BranchSummaryEntry, SessionEntry, SessionHeader, SessionTreeNode } from \"../session-manager.ts\";\nimport type { Skill } from \"../skills.ts\";\nimport type { BashOperations } from \"../tools/bash-operations.ts\";\nimport type { ToolDefinition } from \"../tools/tool-definition.ts\";\n\n/** Prompt options for the facade. Identical to AgentSession PromptOptions. */\nexport type CodingAgentFacadePromptOptionsV1 = PromptOptions;\n\n/**\n * Narrow credential/provider auth projection (D-048): the TUI auth surface\n * only. Covers exactly the seven methods the auth host consumes\n * (`getProviders`/`getProvider`/`getProviderAuthStatus`/`isUsingOAuth`/\n * `listCredentials`/`login`/`logout`); the full ModelRuntime never leaks to\n * the host. The credential-management CapabilityAPI semantics question stays\n * open (D-047 裁决 3); this narrows the TUI host path without deciding it.\n */\nexport type ModelAuthRuntime = Pick<\n\tModelRuntime,\n\t\"getProviders\" | \"getProvider\" | \"getProviderAuthStatus\" | \"isUsingOAuth\" | \"listCredentials\" | \"login\" | \"logout\"\n>;\n\n/**\n * Stable facade v1: the consumption surface for product hosts, versioned per\n * repo convention (EmbeddedSdkBindingV1 precedent). Members are pass-throughs\n * onto the wrapped AgentSession; new members must extend the facade design\n * doc first (门面腐化 guard, 设计 §6).\n */\nexport interface CodingAgentFacadeV1 {\n\treadonly version: 1;\n\n\t// --- Run control ---\n\t/**\n\t * Delegates to AgentSession.prompt(). The full PromptOptions pass through,\n\t * including the internal RPC preflight hook (`preflightResult`) that RPC\n\t * mode uses to observe prompt acceptance (阶段 3, 设计 §2.9).\n\t */\n\tprompt(text: string, options?: CodingAgentFacadePromptOptionsV1): Promise<PromptOutcome>;\n\t/** Delegates to AgentSession.steer(). */\n\tsteer(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.abort(); `cancelAgentTasks: false` stops the\n\t * current turn without cancelling background agent tasks (设计 子代理运行时\n\t * §4.2 中断分级,2026-10-02 — the TUI Esc path always passes false). */\n\tabort(options?: { cancelAgentTasks?: boolean }): Promise<void>;\n\t/** Delegates to AgentSession.abortAgentTasks(): cancel every background agent\n\t * task without aborting the current turn (/stop-agents execution face). */\n\tabortAgentTasks(): void;\n\t/** Delegates to AgentSession.getActiveAgentTaskCount(). */\n\tgetActiveAgentTaskCount(): number;\n\t/** Delegates to AgentSession.waitForIdle(). */\n\twaitForIdle(): Promise<void>;\n\n\t// --- Session write paths ---\n\t/** Delegates to AgentSession.compact(). */\n\tcompact(customInstructions?: string): Promise<CompactionResult | CompactionCancelledResult>;\n\t/** Delegates to AgentSession.navigateTree(). */\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;\n\t/** Delegates to AgentSession.reload(). */\n\treload(options?: { beforeSessionStart?: () => void | Promise<void> }): Promise<void>;\n\t/** Delegates to AgentSession.setModel(). */\n\tsetModel(model: Model<Api>, options?: ModelMutationOptions): Promise<void>;\n\t/** Delegates to AgentSession.setThinkingLevel(). */\n\tsetThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;\n\t/** Delegates to AgentSession.setActiveToolsByName(). */\n\tsetActiveToolsByName(toolNames: string[]): void;\n\t/**\n\t * Queued-message read view, composed from AgentSession.getSteeringMessages()\n\t * and AgentSession.getFollowUpMessages(). AgentSession has no single\n\t * getQueuedMessages(); the shape mirrors clearQueue()'s return value.\n\t */\n\tgetQueuedMessages(): { steering: readonly string[]; followUp: readonly string[] };\n\t/** Delegates to AgentSession.clearQueue(). */\n\tclearQueue(): { steering: string[]; followUp: string[] };\n\t/** Delegates to AgentSession.reorderQueuedMessages(): indices refer to the\n\t * queued display lists; a stale or out-of-bounds move returns false. */\n\treorderQueuedMessages(queue: \"steer\" | \"followUp\", from: number, to: number): boolean;\n\t/** Delegates to AgentSession.removeQueuedMessageAt(): removes by queued\n\t * display list index; a stale index returns null. */\n\tremoveQueuedMessageAt(queue: \"steer\" | \"followUp\", index: number): string | null;\n\t/** Delegates to AgentSession.recordSuiteMismatch(). */\n\trecordSuiteMismatch(originalSuiteId: string, currentSuiteId: string): void;\n\t/** Delegates to AgentSession.getSessionAPI(). */\n\tgetSessionAPI(): SessionAPI;\n\n\t// --- Read-only mirror ---\n\t/** Delegates to AgentSession.isIdle. */\n\tisIdle(): boolean;\n\t/** Mirrors AgentSession.state verbatim (phase 0; a projected state view is a later phase, 设计 §3). */\n\tgetState(): AgentState;\n\t/** Delegates to AgentSession.model. */\n\tgetModel(): Model<Api> | undefined;\n\t/** Delegates to AgentSession.getActiveToolNames(). */\n\tgetToolNames(): string[];\n\t/** Delegates to AgentSession.sessionId (via SessionAPI.getSessionId semantics). */\n\tgetSessionId(): string;\n\t/**\n\t * Suite id from the session-suite binding entry (设计 §10.1), read through\n\t * SessionAPI.getBranchEntries(). Undefined when the session carries no\n\t * suite binding.\n\t */\n\tgetSuiteId(): string | undefined;\n\t/** Delegates to AgentSession.sessionManager.getHeader(). SessionManager itself never leaks. */\n\tgetHeader(): SessionHeader | null;\n\t/** Delegates to AgentSession.subscribe(). Event types pass through verbatim (设计 §3). */\n\tsubscribe(listener: AgentSessionEventListener): () => void;\n\t/**\n\t * Invoked after each raw agent event is delivered to session processing;\n\t * the listener is awaited serially by the agent loop and participates in\n\t * run settlement. Exists for stdout backpressure pacing (D-046); the raw\n\t * event payload and abort signal are deliberately not exposed.\n\t */\n\tsubscribeRawEventGate(listener: () => void | Promise<void>): () => void;\n\n\t// --- Read surface (phase 1 slice 1, TUI display/selector reads, 设计 §2.6) ---\n\t/** Delegates to AgentSession.sessionName (which reads sessionManager.getSessionName()). */\n\tgetSessionName(): string | undefined;\n\t/** Delegates to AgentSession.isCompacting: a compaction or branch summarization is running (session level). */\n\tisCompacting(): boolean;\n\t/**\n\t * Delegates to AgentSession.isStreaming: an agent run is active at the\n\t * session level. Distinct from AgentState.isStreaming (agent-level stream\n\t * flag); do not interchange the two.\n\t */\n\tisStreaming(): boolean;\n\t/** Delegates to AgentSession.getContextUsage(). */\n\tgetContextUsage(): ContextUsage | undefined;\n\t/** Delegates to AgentSession.systemPrompt (effective prompt, including per-turn extension modifications). */\n\tgetSystemPrompt(): string;\n\t/** Delegates to AgentSession.scopedModels. Read view only; setScopedModels stays a phase 2 write path. */\n\tgetScopedModels(): ReadonlyArray<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\t/** Delegates to SessionManager.getTree() on the wrapped session. SessionManager itself never leaks. */\n\tgetTree(): SessionTreeNode[];\n\t/** Delegates to SessionManager.getLeafId() on the wrapped session. SessionManager itself never leaks. */\n\tgetLeafId(): string | null;\n\n\t// --- Read surface (phase 1 slice 2, TUI display/selector cluster convergence, 设计 §2.7) ---\n\t/** Delegates to AgentSession.promptTemplates (file-based prompt templates). */\n\tgetPromptTemplates(): ReadonlyArray<PromptTemplate>;\n\t/** Delegates to AgentSession.getToolDefinition(name): the registered tool definition by name, for diagnostics/rendering. */\n\tgetToolDefinition(name: string): ToolDefinition | undefined;\n\t/** Delegates to SessionManager.getCwd() on the wrapped session; identical to host.cwd. SessionManager itself never leaks. */\n\tgetCwd(): string;\n\t/** Delegates to SessionManager.getEntries() on the wrapped session; identical to host.entries. SessionManager itself never leaks. */\n\tgetEntries(): SessionEntry[];\n\t/** Delegates to AgentSession.pendingMessageCount: queued steering + follow-up message count. */\n\tgetPendingMessageCount(): number;\n\n\t// --- Write surface (phase 2, TUI write path convergence, 设计 §2.8) ---\n\t/** Delegates to AgentSession.followUp(). */\n\tfollowUp(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.setScopedModels(). */\n\tsetScopedModels(scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>): void;\n\t/** Delegates to AgentSession.cycleModel(). */\n\tcycleModel(\n\t\tdirection?: \"forward\" | \"backward\",\n\t\toptions?: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t/** Delegates to AgentSession.cycleThinkingLevel(). */\n\tcycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;\n\t/** Delegates to AgentSession.setSteeringMode(). */\n\tsetSteeringMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setFollowUpMode(). */\n\tsetFollowUpMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setSessionName(). */\n\tsetSessionName(name: string): void;\n\t/** Delegates to AgentSession.abortBash(). */\n\tabortBash(): void;\n\t/** Delegates to AgentSession.abortCompaction(). */\n\tabortCompaction(): void;\n\t/** Delegates to AgentSession.abortRetry(). */\n\tabortRetry(): void;\n\t/** Delegates to AgentSession.abortBranchSummary(). */\n\tabortBranchSummary(): void;\n\t/** Delegates to AgentSession.captureBashEpoch(). */\n\tcaptureBashEpoch(): number;\n\t/** Delegates to AgentSession.isBashEpochCurrent(). */\n\tisBashEpochCurrent(epoch: number): boolean;\n\t/** Delegates to AgentSession.emitUserBash(): dispatches the user.bash lifecycle facts. */\n\temitUserBash(excludeFromContext: boolean): void;\n\t/** Delegates to AgentSession.executeBash(). */\n\texecuteBash(\n\t\tcommand: string,\n\t\tonChunk?: (chunk: string) => void,\n\t\toptions?: { excludeFromContext?: boolean; id?: string; operations?: BashOperations },\n\t): Promise<BashResult>;\n\t/** Delegates to AgentSession.recordBashResult(). */\n\trecordBashResult(\n\t\tcommand: string,\n\t\tresult: BashResult,\n\t\toptions?: { excludeFromContext?: boolean; epoch?: number },\n\t): void;\n\n\t// --- Read surface (phase 3, RPC host state reads, 设计 §2.9) ---\n\t/** Delegates to AgentSession.thinkingLevel. */\n\tgetThinkingLevel(): ThinkingLevel;\n\t/** Delegates to AgentSession.steeringMode. */\n\tgetSteeringMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.followUpMode. */\n\tgetFollowUpMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.sessionFile. */\n\tgetSessionFile(): string | undefined;\n\t/** Delegates to AgentSession.getAvailableThinkingLevels(). */\n\tgetAvailableThinkingLevels(): ThinkingLevel[];\n\t/** Delegates to AgentSession.getUserMessagesForForking(). */\n\tgetUserMessagesForForking(): ForkableUserMessage[];\n\t/** Delegates to AgentSession.getLastAssistantText(). */\n\tgetLastAssistantText(): string | undefined;\n\t/** Delegates to AgentSession.getSessionStats(). */\n\tgetSessionStats(): SessionStats;\n\n\t// --- Write surface (phase 3, RPC host writes, 设计 §2.9) ---\n\t/** Delegates to AgentSession.exportToHtml(), including the themeName option. */\n\texportToHtml(outputPath?: string, options?: { themeName?: string }): Promise<string>;\n\n\t// --- Session write path (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Delegates to SessionManager.appendLabelChange() on the wrapped session.\n\t * TUI tree selector label rename write point; SessionAPI has no label write.\n\t */\n\tappendLabelChange(entryId: string, label: string | undefined): string;\n\n\t// --- Resource read surface (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Clean read projections over the wrapped session's resource loader. Skills/\n\t * prompts/agents-files results pass through verbatim; themes and extensions\n\t * are the metadata projections (themes as ThemeMetaV1 without the modes\n\t * Theme class; loader registration maps and the shared runtime never\n\t * leak). Guard reason: TUI startup listing/autocomplete/diagnostics\n\t * consume these read points directly; SessionAPI/CapabilityAPI are\n\t * capability-side contracts with no host display projections.\n\t */\n\t/** Delegates to ResourceLoader.getSkills() on the wrapped session. */\n\tgetSkills(): { skills: Skill[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getPrompts() on the wrapped session. */\n\tgetPrompts(): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getThemes() on the wrapped session. */\n\tgetThemes(): { themes: ThemeMetaV1[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getAgentsFiles() on the wrapped session. */\n\tgetAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> };\n\t/** Delegates to ResourceLoader.getSystemPromptSource() on the wrapped session. */\n\tgetSystemPromptSource(): { path: string } | undefined;\n\t/** Delegates to ResourceLoader.getAppendSystemPromptSources() on the wrapped session. */\n\tgetAppendSystemPromptSources(): Array<{ path: string }>;\n\n\t// --- Model/catalog/context read surface (v1 修订, D-047: TUI direct session reads zeroed) ---\n\t/** Delegates to ModelRuntime.getAvailableSnapshot() on the wrapped session (D-047); ModelRuntime itself never leaks. */\n\tgetAvailableModels(): readonly Model<Api>[];\n\t/** Delegates to ModelRuntime.isUsingSubscription() on the wrapped session (D-047). */\n\tisUsingSubscription(providerId: string): boolean;\n\t/** Delegates to ModelRuntime.getError() on the wrapped session (D-047). */\n\tgetModelsError(): string | undefined;\n\t/**\n\t * Narrow `ModelCatalogRuntime` projection of the wrapped session's\n\t * ModelRuntime for the shared catalog-refresh coordinator (D-047). A\n\t * projection, not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelCatalog(): ModelCatalogRuntime;\n\t/** Delegates to ModelRuntime.checkAuth() on the wrapped session (D-047). */\n\tcheckProviderAuth(providerId: string): Promise<AuthCheck | undefined>;\n\t/** Delegates to ModelRuntime.getAuth() on the wrapped session (D-047). */\n\tgetProviderAuth(providerId: string): Promise<AuthResult | undefined>;\n\t/**\n\t * Narrow `ModelPriceSource` projection of the wrapped session's\n\t * ModelRuntime for the cache-stats pure functions (D-047). A projection,\n\t * not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelPriceSource(): ModelPriceSource;\n\t/**\n\t * Delegates to SessionManager.buildContextEntries() on the wrapped session\n\t * (D-047; delegation restored by the D-047 regression fix — the\n\t * incrementally maintained byId index is required for correct context\n\t * paths after a compaction commit). SessionManager itself never leaks.\n\t */\n\tgetContextEntries(): SessionEntry[];\n\n\t// --- Credential/provider auth read surface (v1 修订, D-048: TUI auth host path) ---\n\t/**\n\t * Narrow `ModelAuthRuntime` projection of the wrapped session's ModelRuntime\n\t * for the TUI auth surface (D-048). A projection, not a wrapper: the full\n\t * runtime never leaks. The credential-management CapabilityAPI semantics\n\t * question stays open (D-047 裁决 3); this only narrows the TUI host path.\n\t */\n\tgetModelAuthRuntime(): ModelAuthRuntime;\n\n\t// --- Session stats/text read surface (v1 修订, B-S2b③-S3a: TUI direct\n\t// session stats/text read cluster convergence) ---\n\t/** Delegates to AgentSession.getSteeringMessages(). */\n\tgetSteeringMessages(): readonly string[];\n\t/** Delegates to AgentSession.getFollowUpMessages(). */\n\tgetFollowUpMessages(): readonly string[];\n\n\t// --- Status/settings + export read surface (v1 修订, B-S2b③-S3b+c: TUI\n\t// status/settings/export cluster direct session read convergence) ---\n\t/** Delegates to AgentSession.retryAttempt. */\n\tgetRetryAttempt(): number;\n\t/** Delegates to AgentSession.isBashRunning. */\n\tisBashRunning(): boolean;\n\t/** Delegates to AgentSession.exportToJsonl(). */\n\texportToJsonl(outputPath?: string): string;\n\n\t// --- Lifecycle ---\n\t/** Delegates to AgentSession.dispose(). */\n\tdispose(): Promise<void>;\n}\n\n/** Creates a facade v1 view over one AgentSession. Pure wrapper: holds no state of its own. */\nexport function createCodingAgentFacade(session: AgentSession): CodingAgentFacadeV1 {\n\treturn {\n\t\tversion: 1,\n\t\tprompt: (text, options) => session.prompt(text, options),\n\t\tsteer: (text, images, options) => session.steer(text, images, options),\n\t\tabort: (options) => session.abort(undefined, options),\n\t\tabortAgentTasks: () => session.abortAgentTasks(),\n\t\tgetActiveAgentTaskCount: () => session.getActiveAgentTaskCount(),\n\t\twaitForIdle: () => session.waitForIdle(),\n\t\tcompact: (customInstructions) => session.compact(customInstructions),\n\t\tnavigateTree: (targetId, options) => session.navigateTree(targetId, options),\n\t\treload: (options) => session.reload(options),\n\t\tsetModel: (model, options) => session.setModel(model, options),\n\t\tsetThinkingLevel: (level, options) => session.setThinkingLevel(level, options),\n\t\tsetActiveToolsByName: (toolNames) => session.setActiveToolsByName(toolNames),\n\t\tgetQueuedMessages: () => ({\n\t\t\tsteering: session.getSteeringMessages(),\n\t\t\tfollowUp: session.getFollowUpMessages(),\n\t\t}),\n\t\tclearQueue: () => session.clearQueue(),\n\t\treorderQueuedMessages: (queue, from, to) => session.reorderQueuedMessages(queue, from, to),\n\t\tremoveQueuedMessageAt: (queue, index) => session.removeQueuedMessageAt(queue, index),\n\t\trecordSuiteMismatch: (originalSuiteId, currentSuiteId) =>\n\t\t\tsession.recordSuiteMismatch(originalSuiteId, currentSuiteId),\n\t\tgetSessionAPI: () => session.getSessionAPI(),\n\t\tisIdle: () => session.isIdle,\n\t\tgetState: () => session.state,\n\t\tgetModel: () => session.model,\n\t\tgetToolNames: () => session.getActiveToolNames(),\n\t\tgetSessionId: () => session.sessionId,\n\t\tgetHeader: () => session.sessionManager.getHeader(),\n\t\tsubscribe: (listener) => session.subscribe(listener),\n\t\tsubscribeRawEventGate: (listener) => session.agent.subscribe(() => listener()),\n\t\tgetSessionName: () => session.sessionName,\n\t\tisCompacting: () => session.isCompacting,\n\t\tisStreaming: () => session.isStreaming,\n\t\tgetContextUsage: () => session.getContextUsage(),\n\t\tgetSystemPrompt: () => session.systemPrompt,\n\t\tgetScopedModels: () => session.scopedModels,\n\t\tgetTree: () => session.sessionManager.getTree(),\n\t\tgetLeafId: () => session.sessionManager.getLeafId(),\n\t\tgetPromptTemplates: () => session.promptTemplates,\n\t\tgetToolDefinition: (name) => session.getToolDefinition(name),\n\t\tgetCwd: () => session.sessionManager.getCwd(),\n\t\tgetEntries: () => session.sessionManager.getEntries(),\n\t\tgetPendingMessageCount: () => session.pendingMessageCount,\n\t\tfollowUp: (text, images, options) => session.followUp(text, images, options),\n\t\tsetScopedModels: (scopedModels) => session.setScopedModels(scopedModels),\n\t\tcycleModel: (direction, options) => session.cycleModel(direction, options),\n\t\tcycleThinkingLevel: (options) => session.cycleThinkingLevel(options),\n\t\tsetSteeringMode: (mode) => session.setSteeringMode(mode),\n\t\tsetFollowUpMode: (mode) => session.setFollowUpMode(mode),\n\t\tsetSessionName: (name) => session.setSessionName(name),\n\t\tabortBash: () => session.abortBash(),\n\t\tabortCompaction: () => session.abortCompaction(),\n\t\tabortRetry: () => session.abortRetry(),\n\t\tabortBranchSummary: () => session.abortBranchSummary(),\n\t\tcaptureBashEpoch: () => session.captureBashEpoch(),\n\t\tisBashEpochCurrent: (epoch) => session.isBashEpochCurrent(epoch),\n\t\temitUserBash: (excludeFromContext) => session.emitUserBash(excludeFromContext),\n\t\texecuteBash: (command, onChunk, options) => session.executeBash(command, onChunk, options),\n\t\trecordBashResult: (command, result, options) => session.recordBashResult(command, result, options),\n\t\tgetThinkingLevel: () => session.thinkingLevel,\n\t\tgetSteeringMode: () => session.steeringMode,\n\t\tgetFollowUpMode: () => session.followUpMode,\n\t\tgetSessionFile: () => session.sessionFile,\n\t\tgetAvailableThinkingLevels: () => session.getAvailableThinkingLevels(),\n\t\tgetUserMessagesForForking: () => session.getUserMessagesForForking(),\n\t\tgetLastAssistantText: () => session.getLastAssistantText(),\n\t\tgetSessionStats: () => session.getSessionStats(),\n\t\texportToHtml: (outputPath, options) => session.exportToHtml(outputPath, options),\n\t\tappendLabelChange: (entryId, label) => session.sessionManager.appendLabelChange(entryId, label),\n\t\tgetSkills: () => session.resourceLoader.getSkills(),\n\t\tgetPrompts: () => session.resourceLoader.getPrompts(),\n\t\tgetThemes: () => session.resourceLoader.getThemes(),\n\t\tgetAgentsFiles: () => session.resourceLoader.getAgentsFiles(),\n\t\tgetSystemPromptSource: () => session.resourceLoader.getSystemPromptSource(),\n\t\tgetAppendSystemPromptSources: () => session.resourceLoader.getAppendSystemPromptSources(),\n\t\tgetSuiteId: () => readSessionSuiteBinding(session.getSessionAPI().getBranchEntries())?.suiteId,\n\t\tgetAvailableModels: () => session.modelRuntime.getAvailableSnapshot(),\n\t\tisUsingSubscription: (providerId) => session.modelRuntime.isUsingSubscription(providerId),\n\t\tgetModelsError: () => session.modelRuntime.getError(),\n\t\tgetModelCatalog: () => session.modelRuntime,\n\t\tcheckProviderAuth: (providerId) => session.modelRuntime.checkAuth(providerId),\n\t\tgetProviderAuth: (providerId) => session.modelRuntime.getAuth(providerId),\n\t\tgetModelPriceSource: () => session.modelRuntime,\n\t\tgetModelAuthRuntime: () => session.modelRuntime,\n\t\t// Delegates to the SessionManager method: its incrementally maintained\n\t\t// byId index walks the full entry graph, which rebuild-from-entries\n\t\t// diverges from after a compaction commit (D-047 regression fix).\n\t\tgetContextEntries: () => session.sessionManager.buildContextEntries(),\n\t\tgetSteeringMessages: () => session.getSteeringMessages(),\n\t\tgetFollowUpMessages: () => session.getFollowUpMessages(),\n\t\tgetRetryAttempt: () => session.retryAttempt,\n\t\tisBashRunning: () => session.isBashRunning,\n\t\texportToJsonl: (outputPath) => session.exportToJsonl(outputPath),\n\t\tdispose: () => session.dispose(),\n\t};\n}\n"]}
1
+ {"version":3,"file":"coding-agent-facade.js","sourceRoot":"","sources":["../../../src/core/facade/coding-agent-facade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAwUvE,+FAA+F;AAC/F,MAAM,UAAU,uBAAuB,CAAC,OAAqB,EAAuB;IACnF,OAAO;QACN,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC;QACxD,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC;QACtE,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC;QACrD,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE;QAChD,uBAAuB,EAAE,GAAG,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AAC,mBAAmB,EAAE;QACrE,mBAAmB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,mBAAmB,EAAE;QACxD,mBAAmB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,mBAAmB,EAAE;QACxD,eAAe,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY;QAC3C,aAAa,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,aAAa;QAC1C,aAAa,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC;QAChE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;KAChC,CAAC;AAAA,CACF","sourcesContent":["/**\n * Stable facade v1: a read-only mirror plus pass-through run control and\n * session write paths over one AgentSession.\n *\n * Design: docs/design/稳定门面统一入口设计.md (§2.5 阶段 0 实际面, §2.6 slice 1\n * 读面, §2.7 slice 2 读面, §2.8 阶段 2 写面, §2.9 阶段 3 RPC 面, §3 API 面 v1,\n * §4 阶段 0/1/2/3). Every member is a pure delegate onto the wrapped\n * AgentSession or its existing curated surfaces (`getSessionAPI()`, `host`).\n * No new behavior, no policy, no state of its own. Product entry points\n * (TUI/CLI/RPC/Embedded) migrate onto this surface in later phases;\n * AgentSession stays the internal adapter behind it.\n *\n * Scope: in-package stable surface for those product entry points. It is not\n * exported from the package root and is not a cross-package public contract.\n */\n\nimport type { AgentState, ThinkingLevel } from \"@agent-forge/agent-core\";\nimport type { AuthCheck, AuthResult, ImageContent } from \"@agent-forge/ai\";\nimport type { Api, Model } from \"@agent-forge/ai/compat\";\nimport type { ModelCatalogRuntime } from \"../../host/model-catalog-refresh.ts\";\nimport { readSessionSuiteBinding } from \"../../suites/suite-loader.ts\";\nimport type {\n\tAgentSession,\n\tAgentSessionEventListener,\n\tModelCycleResult,\n\tModelMutationOptions,\n\tPromptOptions,\n\tQueuedInputDisposition,\n\tSessionStats,\n} from \"../agent-session.ts\";\nimport type { CompactionCancelledResult } from \"../agent-session-compaction.ts\";\nimport type { ForkableUserMessage } from \"../agent-session-projection.ts\";\nimport type { BashResult } from \"../bash-executor.ts\";\nimport type { ModelPriceSource } from \"../cache-stats.ts\";\nimport type { CompactionResult } from \"../compaction/index.ts\";\nimport type { ResourceDiagnostic } from \"../diagnostics.ts\";\nimport type { ContextUsage, PromptOutcome, SessionAPI } from \"../extensions/public-api.ts\";\nimport type { InputSource } from \"../input-source.ts\";\nimport type { ModelRuntime } from \"../model-runtime.ts\";\nimport type { PromptTemplate } from \"../prompt-templates.ts\";\nimport type { ThemeMetaV1 } from \"../resource-loader.ts\";\nimport type { BranchSummaryEntry, SessionEntry, SessionHeader, SessionTreeNode } from \"../session-manager.ts\";\nimport type { Skill } from \"../skills.ts\";\nimport type { BashOperations } from \"../tools/bash-operations.ts\";\nimport type { ToolDefinition } from \"../tools/tool-definition.ts\";\n\n/** Prompt options for the facade. Identical to AgentSession PromptOptions. */\nexport type CodingAgentFacadePromptOptionsV1 = PromptOptions;\n\n/**\n * Narrow credential/provider auth projection (D-048): the TUI auth surface\n * only. Covers exactly the seven methods the auth host consumes\n * (`getProviders`/`getProvider`/`getProviderAuthStatus`/`isUsingOAuth`/\n * `listCredentials`/`login`/`logout`); the full ModelRuntime never leaks to\n * the host. The credential-management CapabilityAPI semantics question stays\n * open (D-047 裁决 3); this narrows the TUI host path without deciding it.\n */\nexport type ModelAuthRuntime = Pick<\n\tModelRuntime,\n\t\"getProviders\" | \"getProvider\" | \"getProviderAuthStatus\" | \"isUsingOAuth\" | \"listCredentials\" | \"login\" | \"logout\"\n>;\n\n/**\n * Stable facade v1: the consumption surface for product hosts, versioned per\n * repo convention (EmbeddedSdkBindingV1 precedent). Members are pass-throughs\n * onto the wrapped AgentSession; new members must extend the facade design\n * doc first (门面腐化 guard, 设计 §6).\n */\nexport interface CodingAgentFacadeV1 {\n\treadonly version: 1;\n\n\t// --- Run control ---\n\t/**\n\t * Delegates to AgentSession.prompt(). The full PromptOptions pass through,\n\t * including the internal RPC preflight hook (`preflightResult`) that RPC\n\t * mode uses to observe prompt acceptance (阶段 3, 设计 §2.9).\n\t */\n\tprompt(text: string, options?: CodingAgentFacadePromptOptionsV1): Promise<PromptOutcome>;\n\t/** Delegates to AgentSession.steer(). */\n\tsteer(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.abort(); `cancelAgentTasks: false` stops the\n\t * current turn without cancelling background agent tasks (设计 子代理运行时\n\t * §4.2 中断分级,2026-10-02 — the TUI Esc path always passes false). */\n\tabort(options?: { cancelAgentTasks?: boolean }): Promise<void>;\n\t/** Delegates to AgentSession.abortAgentTasks(): cancel every background agent\n\t * task without aborting the current turn (/stop-agents execution face). */\n\tabortAgentTasks(): void;\n\t/** Delegates to AgentSession.getActiveAgentTaskCount(). */\n\tgetActiveAgentTaskCount(): number;\n\t/** Delegates to AgentSession.waitForIdle(). */\n\twaitForIdle(): Promise<void>;\n\n\t// --- Session write paths ---\n\t/** Delegates to AgentSession.compact(). */\n\tcompact(customInstructions?: string): Promise<CompactionResult | CompactionCancelledResult>;\n\t/** Delegates to AgentSession.navigateTree(). */\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;\n\t/** Delegates to AgentSession.reload(). */\n\treload(options?: { beforeSessionStart?: () => void | Promise<void> }): Promise<void>;\n\t/** Delegates to AgentSession.setModel(). */\n\tsetModel(model: Model<Api>, options?: ModelMutationOptions): Promise<void>;\n\t/** Delegates to AgentSession.setThinkingLevel(). */\n\tsetThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;\n\t/** Delegates to AgentSession.setActiveToolsByName(). */\n\tsetActiveToolsByName(toolNames: string[]): void;\n\t/**\n\t * Queued-message read view, composed from AgentSession.getSteeringMessages()\n\t * and AgentSession.getFollowUpMessages(). AgentSession has no single\n\t * getQueuedMessages(); the shape mirrors clearQueue()'s return value.\n\t */\n\tgetQueuedMessages(): { steering: readonly string[]; followUp: readonly string[] };\n\t/** Delegates to AgentSession.clearQueue(). */\n\tclearQueue(): { steering: string[]; followUp: string[] };\n\t/** Delegates to AgentSession.reorderQueuedMessages(): indices refer to the\n\t * queued display lists; a stale or out-of-bounds move returns false. */\n\treorderQueuedMessages(queue: \"steer\" | \"followUp\", from: number, to: number): boolean;\n\t/** Delegates to AgentSession.removeQueuedMessageAt(): removes by queued\n\t * display list index; a stale index returns null. */\n\tremoveQueuedMessageAt(queue: \"steer\" | \"followUp\", index: number): string | null;\n\t/** Delegates to AgentSession.recordSuiteMismatch(). */\n\trecordSuiteMismatch(originalSuiteId: string, currentSuiteId: string): void;\n\t/** Delegates to AgentSession.getSessionAPI(). */\n\tgetSessionAPI(): SessionAPI;\n\n\t// --- Read-only mirror ---\n\t/** Delegates to AgentSession.isIdle. */\n\tisIdle(): boolean;\n\t/** Mirrors AgentSession.state verbatim (phase 0; a projected state view is a later phase, 设计 §3). */\n\tgetState(): AgentState;\n\t/** Delegates to AgentSession.model. */\n\tgetModel(): Model<Api> | undefined;\n\t/** Delegates to AgentSession.getActiveToolNames(). */\n\tgetToolNames(): string[];\n\t/** Delegates to AgentSession.sessionId (via SessionAPI.getSessionId semantics). */\n\tgetSessionId(): string;\n\t/**\n\t * Suite id from the session-suite binding entry (设计 §10.1), read through\n\t * SessionAPI.getBranchEntries(). Undefined when the session carries no\n\t * suite binding.\n\t */\n\tgetSuiteId(): string | undefined;\n\t/** Delegates to AgentSession.sessionManager.getHeader(). SessionManager itself never leaks. */\n\tgetHeader(): SessionHeader | null;\n\t/** Delegates to AgentSession.subscribe(). Event types pass through verbatim (设计 §3). */\n\tsubscribe(listener: AgentSessionEventListener): () => void;\n\t/**\n\t * Invoked after each raw agent event is delivered to session processing;\n\t * the listener is awaited serially by the agent loop and participates in\n\t * run settlement. Exists for stdout backpressure pacing (D-046); the raw\n\t * event payload and abort signal are deliberately not exposed.\n\t */\n\tsubscribeRawEventGate(listener: () => void | Promise<void>): () => void;\n\n\t// --- Read surface (phase 1 slice 1, TUI display/selector reads, 设计 §2.6) ---\n\t/** Delegates to AgentSession.sessionName (which reads sessionManager.getSessionName()). */\n\tgetSessionName(): string | undefined;\n\t/** Delegates to AgentSession.isCompacting: a compaction or branch summarization is running (session level). */\n\tisCompacting(): boolean;\n\t/**\n\t * Delegates to AgentSession.isStreaming: an agent run is active at the\n\t * session level. Distinct from AgentState.isStreaming (agent-level stream\n\t * flag); do not interchange the two.\n\t */\n\tisStreaming(): boolean;\n\t/** Delegates to AgentSession.getContextUsage(). */\n\tgetContextUsage(): ContextUsage | undefined;\n\t/** Delegates to AgentSession.systemPrompt (effective prompt, including per-turn extension modifications). */\n\tgetSystemPrompt(): string;\n\t/** Delegates to AgentSession.scopedModels. Read view only; setScopedModels stays a phase 2 write path. */\n\tgetScopedModels(): ReadonlyArray<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\t/** Delegates to SessionManager.getTree() on the wrapped session. SessionManager itself never leaks. */\n\tgetTree(): SessionTreeNode[];\n\t/** Delegates to SessionManager.getLeafId() on the wrapped session. SessionManager itself never leaks. */\n\tgetLeafId(): string | null;\n\n\t// --- Read surface (phase 1 slice 2, TUI display/selector cluster convergence, 设计 §2.7) ---\n\t/** Delegates to AgentSession.promptTemplates (file-based prompt templates). */\n\tgetPromptTemplates(): ReadonlyArray<PromptTemplate>;\n\t/** Delegates to AgentSession.getToolDefinition(name): the registered tool definition by name, for diagnostics/rendering. */\n\tgetToolDefinition(name: string): ToolDefinition | undefined;\n\t/** Delegates to SessionManager.getCwd() on the wrapped session; identical to host.cwd. SessionManager itself never leaks. */\n\tgetCwd(): string;\n\t/** Delegates to SessionManager.getEntries() on the wrapped session; identical to host.entries. SessionManager itself never leaks. */\n\tgetEntries(): SessionEntry[];\n\t/** Delegates to AgentSession.pendingMessageCount: queued steering + follow-up message count. */\n\tgetPendingMessageCount(): number;\n\n\t// --- Write surface (phase 2, TUI write path convergence, 设计 §2.8) ---\n\t/** Delegates to AgentSession.followUp(). */\n\tfollowUp(text: string, images?: ImageContent[], options?: { source?: InputSource }): Promise<QueuedInputDisposition>;\n\t/** Delegates to AgentSession.setScopedModels(). */\n\tsetScopedModels(scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>): void;\n\t/** Delegates to AgentSession.cycleModel(). */\n\tcycleModel(\n\t\tdirection?: \"forward\" | \"backward\",\n\t\toptions?: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t/** Delegates to AgentSession.cycleThinkingLevel(). */\n\tcycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;\n\t/** Delegates to AgentSession.setSteeringMode(). */\n\tsetSteeringMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setFollowUpMode(). */\n\tsetFollowUpMode(mode: \"all\" | \"one-at-a-time\"): void;\n\t/** Delegates to AgentSession.setSessionName(). */\n\tsetSessionName(name: string): void;\n\t/** Delegates to AgentSession.abortBash(). */\n\tabortBash(): void;\n\t/** Delegates to AgentSession.abortCompaction(). */\n\tabortCompaction(): void;\n\t/** Delegates to AgentSession.abortRetry(). */\n\tabortRetry(): void;\n\t/** Delegates to AgentSession.abortBranchSummary(). */\n\tabortBranchSummary(): void;\n\t/** Delegates to AgentSession.captureBashEpoch(). */\n\tcaptureBashEpoch(): number;\n\t/** Delegates to AgentSession.isBashEpochCurrent(). */\n\tisBashEpochCurrent(epoch: number): boolean;\n\t/** Delegates to AgentSession.emitUserBash(): dispatches the user.bash lifecycle facts. */\n\temitUserBash(excludeFromContext: boolean): void;\n\t/** Delegates to AgentSession.executeBash(). */\n\texecuteBash(\n\t\tcommand: string,\n\t\tonChunk?: (chunk: string) => void,\n\t\toptions?: { excludeFromContext?: boolean; id?: string; operations?: BashOperations },\n\t): Promise<BashResult>;\n\t/** Delegates to AgentSession.recordBashResult(). */\n\trecordBashResult(\n\t\tcommand: string,\n\t\tresult: BashResult,\n\t\toptions?: { excludeFromContext?: boolean; epoch?: number },\n\t): void;\n\n\t// --- Read surface (phase 3, RPC host state reads, 设计 §2.9) ---\n\t/** Delegates to AgentSession.thinkingLevel. */\n\tgetThinkingLevel(): ThinkingLevel;\n\t/** Delegates to AgentSession.steeringMode. */\n\tgetSteeringMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.followUpMode. */\n\tgetFollowUpMode(): \"all\" | \"one-at-a-time\";\n\t/** Delegates to AgentSession.sessionFile. */\n\tgetSessionFile(): string | undefined;\n\t/** Delegates to AgentSession.getAvailableThinkingLevels(). */\n\tgetAvailableThinkingLevels(): ThinkingLevel[];\n\t/** Delegates to AgentSession.getUserMessagesForForking(). */\n\tgetUserMessagesForForking(): ForkableUserMessage[];\n\t/** Delegates to AgentSession.getLastAssistantText(). */\n\tgetLastAssistantText(): string | undefined;\n\t/** Delegates to AgentSession.getSessionStats(). */\n\tgetSessionStats(): SessionStats;\n\n\t// --- Write surface (phase 3, RPC host writes, 设计 §2.9) ---\n\t/** Delegates to AgentSession.exportToHtml(), including the themeName option. */\n\texportToHtml(outputPath?: string, options?: { themeName?: string }): Promise<string>;\n\n\t// --- Session write path (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Delegates to SessionManager.appendLabelChange() on the wrapped session.\n\t * TUI tree selector label rename write point; SessionAPI has no label write.\n\t */\n\tappendLabelChange(entryId: string, label: string | undefined): string;\n\n\t// --- Resource read surface (阶段 4 slice 3 v1 修订, D-041) ---\n\t/**\n\t * Clean read projections over the wrapped session's resource loader. Skills/\n\t * prompts/agents-files results pass through verbatim; themes and extensions\n\t * are the metadata projections (themes as ThemeMetaV1 without the modes\n\t * Theme class; loader registration maps and the shared runtime never\n\t * leak). Guard reason: TUI startup listing/autocomplete/diagnostics\n\t * consume these read points directly; SessionAPI/CapabilityAPI are\n\t * capability-side contracts with no host display projections.\n\t */\n\t/** Delegates to ResourceLoader.getSkills() on the wrapped session. */\n\tgetSkills(): { skills: Skill[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getPrompts() on the wrapped session. */\n\tgetPrompts(): { prompts: PromptTemplate[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getThemes() on the wrapped session. */\n\tgetThemes(): { themes: ThemeMetaV1[]; diagnostics: ResourceDiagnostic[] };\n\t/** Delegates to ResourceLoader.getAgentsFiles() on the wrapped session. */\n\tgetAgentsFiles(): { agentsFiles: Array<{ path: string; content: string }> };\n\t/** Delegates to ResourceLoader.getSystemPromptSource() on the wrapped session. */\n\tgetSystemPromptSource(): { path: string } | undefined;\n\t/** Delegates to ResourceLoader.getAppendSystemPromptSources() on the wrapped session. */\n\tgetAppendSystemPromptSources(): Array<{ path: string }>;\n\n\t// --- Model/catalog/context read surface (v1 修订, D-047: TUI direct session reads zeroed) ---\n\t/** Delegates to ModelRuntime.getAvailableSnapshot() on the wrapped session (D-047); ModelRuntime itself never leaks. */\n\tgetAvailableModels(): readonly Model<Api>[];\n\t/** Delegates to ModelRuntime.isUsingSubscription() on the wrapped session (D-047). */\n\tisUsingSubscription(providerId: string): boolean;\n\t/** Delegates to ModelRuntime.getError() on the wrapped session (D-047). */\n\tgetModelsError(): string | undefined;\n\t/**\n\t * Narrow `ModelCatalogRuntime` projection of the wrapped session's\n\t * ModelRuntime for the shared catalog-refresh coordinator (D-047). A\n\t * projection, not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelCatalog(): ModelCatalogRuntime;\n\t/** Delegates to ModelRuntime.checkAuth() on the wrapped session (D-047). */\n\tcheckProviderAuth(providerId: string): Promise<AuthCheck | undefined>;\n\t/** Delegates to ModelRuntime.getAuth() on the wrapped session (D-047). */\n\tgetProviderAuth(providerId: string): Promise<AuthResult | undefined>;\n\t/**\n\t * Narrow `ModelPriceSource` projection of the wrapped session's\n\t * ModelRuntime for the cache-stats pure functions (D-047). A projection,\n\t * not a wrapper: the full runtime never leaks.\n\t */\n\tgetModelPriceSource(): ModelPriceSource;\n\t/**\n\t * Delegates to SessionManager.buildContextEntries() on the wrapped session\n\t * (D-047; delegation restored by the D-047 regression fix — the\n\t * incrementally maintained byId index is required for correct context\n\t * paths after a compaction commit). SessionManager itself never leaks.\n\t */\n\tgetContextEntries(): SessionEntry[];\n\n\t// --- Credential/provider auth read surface (v1 修订, D-048: TUI auth host path) ---\n\t/**\n\t * Narrow `ModelAuthRuntime` projection of the wrapped session's ModelRuntime\n\t * for the TUI auth surface (D-048). A projection, not a wrapper: the full\n\t * runtime never leaks. The credential-management CapabilityAPI semantics\n\t * question stays open (D-047 裁决 3); this only narrows the TUI host path.\n\t */\n\tgetModelAuthRuntime(): ModelAuthRuntime;\n\n\t// --- Session stats/text read surface (v1 修订, B-S2b③-S3a: TUI direct\n\t// session stats/text read cluster convergence) ---\n\t/** Delegates to AgentSession.getSteeringMessages(). */\n\tgetSteeringMessages(): readonly string[];\n\t/** Delegates to AgentSession.getFollowUpMessages(). */\n\tgetFollowUpMessages(): readonly string[];\n\n\t// --- Status/settings + export read surface (v1 修订, B-S2b③-S3b+c: TUI\n\t// status/settings/export cluster direct session read convergence) ---\n\t/** Delegates to AgentSession.retryAttempt. */\n\tgetRetryAttempt(): number;\n\t/** Delegates to AgentSession.isBashRunning. */\n\tisBashRunning(): boolean;\n\t/** Delegates to AgentSession.exportToJsonl(). */\n\texportToJsonl(outputPath?: string): string;\n\n\t// --- Lifecycle ---\n\t/** Delegates to AgentSession.dispose(). */\n\tdispose(): Promise<void>;\n}\n\n/** Creates a facade v1 view over one AgentSession. Pure wrapper: holds no state of its own. */\nexport function createCodingAgentFacade(session: AgentSession): CodingAgentFacadeV1 {\n\treturn {\n\t\tversion: 1,\n\t\tprompt: (text, options) => session.prompt(text, options),\n\t\tsteer: (text, images, options) => session.steer(text, images, options),\n\t\tabort: (options) => session.abort(undefined, options),\n\t\tabortAgentTasks: () => session.abortAgentTasks(),\n\t\tgetActiveAgentTaskCount: () => session.getActiveAgentTaskCount(),\n\t\twaitForIdle: () => session.waitForIdle(),\n\t\tcompact: (customInstructions) => session.compact(customInstructions),\n\t\tnavigateTree: (targetId, options) => session.navigateTree(targetId, options),\n\t\treload: (options) => session.reload(options),\n\t\tsetModel: (model, options) => session.setModel(model, options),\n\t\tsetThinkingLevel: (level, options) => session.setThinkingLevel(level, options),\n\t\tsetActiveToolsByName: (toolNames) => session.setActiveToolsByName(toolNames),\n\t\tgetQueuedMessages: () => ({\n\t\t\tsteering: session.getSteeringMessages(),\n\t\t\tfollowUp: session.getFollowUpMessages(),\n\t\t}),\n\t\tclearQueue: () => session.clearQueue(),\n\t\treorderQueuedMessages: (queue, from, to) => session.reorderQueuedMessages(queue, from, to),\n\t\tremoveQueuedMessageAt: (queue, index) => session.removeQueuedMessageAt(queue, index),\n\t\trecordSuiteMismatch: (originalSuiteId, currentSuiteId) =>\n\t\t\tsession.recordSuiteMismatch(originalSuiteId, currentSuiteId),\n\t\tgetSessionAPI: () => session.getSessionAPI(),\n\t\tisIdle: () => session.isIdle,\n\t\tgetState: () => session.state,\n\t\tgetModel: () => session.model,\n\t\tgetToolNames: () => session.getActiveToolNames(),\n\t\tgetSessionId: () => session.sessionId,\n\t\tgetHeader: () => session.sessionManager.getHeader(),\n\t\tsubscribe: (listener) => session.subscribe(listener),\n\t\tsubscribeRawEventGate: (listener) => session.agent.subscribe(() => listener()),\n\t\tgetSessionName: () => session.sessionName,\n\t\tisCompacting: () => session.isCompacting,\n\t\tisStreaming: () => session.isStreaming,\n\t\tgetContextUsage: () => session.getContextUsage(),\n\t\tgetSystemPrompt: () => session.systemPrompt,\n\t\tgetScopedModels: () => session.scopedModels,\n\t\tgetTree: () => session.sessionManager.getTree(),\n\t\tgetLeafId: () => session.sessionManager.getLeafId(),\n\t\tgetPromptTemplates: () => session.promptTemplates,\n\t\tgetToolDefinition: (name) => session.getToolDefinition(name),\n\t\tgetCwd: () => session.sessionManager.getCwd(),\n\t\tgetEntries: () => session.sessionManager.getEntries(),\n\t\tgetPendingMessageCount: () => session.pendingMessageCount,\n\t\tfollowUp: (text, images, options) => session.followUp(text, images, options),\n\t\tsetScopedModels: (scopedModels) => session.setScopedModels(scopedModels),\n\t\tcycleModel: (direction, options) => session.cycleModel(direction, options),\n\t\tcycleThinkingLevel: (options) => session.cycleThinkingLevel(options),\n\t\tsetSteeringMode: (mode) => session.setSteeringMode(mode),\n\t\tsetFollowUpMode: (mode) => session.setFollowUpMode(mode),\n\t\tsetSessionName: (name) => session.setSessionName(name),\n\t\tabortBash: () => session.abortBash(),\n\t\tabortCompaction: () => session.abortCompaction(),\n\t\tabortRetry: () => session.abortRetry(),\n\t\tabortBranchSummary: () => session.abortBranchSummary(),\n\t\tcaptureBashEpoch: () => session.captureBashEpoch(),\n\t\tisBashEpochCurrent: (epoch) => session.isBashEpochCurrent(epoch),\n\t\temitUserBash: (excludeFromContext) => session.emitUserBash(excludeFromContext),\n\t\texecuteBash: (command, onChunk, options) => session.executeBash(command, onChunk, options),\n\t\trecordBashResult: (command, result, options) => session.recordBashResult(command, result, options),\n\t\tgetThinkingLevel: () => session.thinkingLevel,\n\t\tgetSteeringMode: () => session.steeringMode,\n\t\tgetFollowUpMode: () => session.followUpMode,\n\t\tgetSessionFile: () => session.sessionFile,\n\t\tgetAvailableThinkingLevels: () => session.getAvailableThinkingLevels(),\n\t\tgetUserMessagesForForking: () => session.getUserMessagesForForking(),\n\t\tgetLastAssistantText: () => session.getLastAssistantText(),\n\t\tgetSessionStats: () => session.getSessionStats(),\n\t\texportToHtml: (outputPath, options) => session.exportToHtml(outputPath, options),\n\t\tappendLabelChange: (entryId, label) => session.sessionManager.appendLabelChange(entryId, label),\n\t\tgetSkills: () => session.resourceLoader.getSkills(),\n\t\tgetPrompts: () => session.resourceLoader.getPrompts(),\n\t\tgetThemes: () => session.resourceLoader.getThemes(),\n\t\tgetAgentsFiles: () => session.resourceLoader.getAgentsFiles(),\n\t\tgetSystemPromptSource: () => session.resourceLoader.getSystemPromptSource(),\n\t\tgetAppendSystemPromptSources: () => session.resourceLoader.getAppendSystemPromptSources(),\n\t\tgetSuiteId: () => readSessionSuiteBinding(session.getSessionAPI().getBranchEntries())?.suiteId,\n\t\tgetAvailableModels: () => session.modelRuntime.getAvailableSnapshot(),\n\t\tisUsingSubscription: (providerId) => session.modelRuntime.isUsingSubscription(providerId),\n\t\tgetModelsError: () => session.modelRuntime.getError(),\n\t\tgetModelCatalog: () => session.modelRuntime,\n\t\tcheckProviderAuth: (providerId) => session.modelRuntime.checkAuth(providerId),\n\t\tgetProviderAuth: (providerId) => session.modelRuntime.getAuth(providerId),\n\t\tgetModelPriceSource: () => session.modelRuntime,\n\t\tgetModelAuthRuntime: () => session.modelRuntime,\n\t\t// Delegates to the SessionManager method: its incrementally maintained\n\t\t// byId index walks the full entry graph, which rebuild-from-entries\n\t\t// diverges from after a compaction commit (D-047 regression fix).\n\t\tgetContextEntries: () => session.sessionManager.buildContextEntries(),\n\t\tgetSteeringMessages: () => session.getSteeringMessages(),\n\t\tgetFollowUpMessages: () => session.getFollowUpMessages(),\n\t\tgetRetryAttempt: () => session.retryAttempt,\n\t\tisBashRunning: () => session.isBashRunning,\n\t\texportToJsonl: (outputPath) => session.exportToJsonl(outputPath),\n\t\tdispose: () => session.dispose(),\n\t};\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 批次⑨收尾域词典(docs/design/国际化与本地化.md §词典结构):批次⑨abc
3
3
  * 精确对账后发现的最后一批散布 throw——artifacts、client/remote-session、
4
- * main.ts 子任务护栏、profiles/suite-loader、remote/server-entry 与
4
+ * main.ts 子任务护栏、suites/suite-loader、remote/server-entry 与
5
5
  * session-source、share、testing 工具。至此 agent-forge 包内可译 throw 清零
6
6
  * (豁免清单见设计文档 §1 非目标 6-9)。
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"core-contract-final.d.ts","sourceRoot":"","sources":["../../../../../src/core/i18n/locales/zh-cn/core-contract-final.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA+DpD,CAAC","sourcesContent":["/**\n * 批次⑨收尾域词典(docs/design/国际化与本地化.md §词典结构):批次⑨abc\n * 精确对账后发现的最后一批散布 throw——artifacts、client/remote-session、\n * main.ts 子任务护栏、profiles/suite-loader、remote/server-entry 与\n * session-source、share、testing 工具。至此 agent-forge 包内可译 throw 清零\n * (豁免清单见设计文档 §1 非目标 6-9)。\n */\nexport const coreContractFinal: Record<string, string> = {\n\t// --- artifacts/artifact-store.ts ---\n\t\"Artifact not found: {artifactId}\": \"找不到制品:{artifactId}\",\n\t\"Artifact {artifactId} belongs to a different session\": \"制品 {artifactId} 属于另一个会话\",\n\t\"Artifact {artifactId} lifecycle has ended: {reason}\": \"制品 {artifactId} 生命周期已结束:{reason}\",\n\t\"Artifact {artifactId} lifecycle has already ended\": \"制品 {artifactId} 生命周期已经结束\",\n\n\t// --- client/remote-session.ts ---\n\t\"Session cannot accept input during {phase} phase\": \"会话处于 {phase} 阶段,不能接受输入\",\n\t\"Cannot {operation} a session while session is {phase}\": \"会话处于 {phase} 状态,无法执行 {operation}\",\n\t\"Session {id} did not provide a snapshot\": \"会话 {id} 未提供快照\",\n\t\"Remote session is disposed\": \"远程会话已销毁\",\n\t\"Remote session is busy with {operation}\": \"远程会话正忙于 {operation}\",\n\t\"Cannot {description} while session is {phase}\": \"会话处于 {phase} 状态,无法 {description}\",\n\n\t// --- main.ts ---\n\t\"agent task child profile model {model} is not among the runner's scoped models{available}\":\n\t\t\"agent task 子 profile 模型 {model} 不在 runner 的作用域模型内{available}\",\n\t\"resume target {resumeId} is not a persisted child of session {parentId}\":\n\t\t\"resume 目标 {resumeId} 不是会话 {parentId} 的已持久化子会话\",\n\n\t// --- profiles/suite-loader.ts ---\n\t\"Invalid suite.json at {path}: {errors}. Fix the file, or delete the suite workspace directory {dir} and recreate it.\":\n\t\t\"{path} 的 suite.json 无效:{errors}。请修复该文件,或删除 suite 工作区目录 {dir} 后重建。\",\n\n\t// --- remote/server-entry.ts / session-source.ts ---\n\t\"Unknown or unavailable model: {provider}/{id}\": \"未知或不可用的模型:{provider}/{id}\",\n\t\"Remote server requires a session source or sessionSourceOptions\":\n\t\t\"远程服务器需要 session source 或 sessionSourceOptions\",\n\t'cwd \"{cwd}\" is outside the configured workspace roots: [{roots}]':\n\t\t'cwd \"{cwd}\" 在配置的工作区根目录之外:[{roots}]',\n\t\"Cannot create session: cwd does not exist: {cwd}\": \"无法创建会话:cwd 不存在:{cwd}\",\n\t\"Cannot create session: cwd is not a directory: {cwd}\": \"无法创建会话:cwd 不是目录:{cwd}\",\n\t\"Session not found: {id}\": \"找不到会话:{id}\",\n\n\t// --- share/session-share.ts ---\n\t\"Share not found: {shareId}\": \"找不到分享:{shareId}\",\n\t\"Share {shareId} has already been revoked\": \"分享 {shareId} 已被撤销\",\n\n\t// --- testing/ ---\n\t\"Runtime-only delivery queue {name} must be a positive safe integer\": \"仅运行时的投递队列 {name} 必须是正的安全整数\",\n\t\"Session plugin testkit plugin API handles expire after session reload; access the current runtime directly\":\n\t\t\"会话插件 testkit 的插件 API 句柄在会话重载后过期;请直接访问当前运行时\",\n\t\"Session plugin testkit has no loaded plugin: {pluginId}\": \"会话插件 testkit 没有已加载的插件:{pluginId}\",\n\t\"Session plugin testkit has {count} unused faux response\": \"会话插件 testkit 有 {count} 个未使用的 faux 响应\",\n\t\"Session plugin testkit has {count} unused faux responses\": \"会话插件 testkit 有 {count} 个未使用的 faux 响应\",\n\t\"Session plugin testkit repeat count must be a positive integer\": \"会话插件 testkit 的重复次数必须是正整数\",\n\t\"Session plugin testkit transcript diverged on run {run}\": \"会话插件 testkit 的转录在第 {run} 次运行出现分歧\",\n\t\"Plugin testkit manifestRoot must be a non-empty string\": \"插件 testkit 的 manifestRoot 必须是非空字符串\",\n\t\"Plugin testkit repeat count must be a positive integer\": \"插件 testkit 的重复次数必须是正整数\",\n\t\"Plugin testkit transcript diverged on run {run}\": \"插件 testkit 的转录在第 {run} 次运行出现分歧\",\n\n\t// --- profiles/suite-loader.ts .profile-lock.json 校验 ---\n\t\".profile-lock.json must be a JSON object\": \".profile-lock.json 必须是 JSON 对象\",\n\t\".profile-lock.json identity must be a JSON object\": \".profile-lock.json 的 identity 必须是 JSON 对象\",\n\t\".profile-lock.json identity must carry profileId/profileVersion/manifestDigest/capabilityVersions\":\n\t\t\".profile-lock.json 的 identity 必须携带 profileId/profileVersion/manifestDigest/capabilityVersions\",\n\t\".profile-lock.json identity.capabilityVersions entries must be objects\":\n\t\t\".profile-lock.json 的 identity.capabilityVersions 条目必须是对象\",\n\t\".profile-lock.json identity.capabilityVersions entries must carry id/version\":\n\t\t\".profile-lock.json 的 identity.capabilityVersions 条目必须携带 id/version\",\n\t\".profile-lock.json must carry lockedAt/lockedBy/generation\":\n\t\t\".profile-lock.json 必须携带 lockedAt/lockedBy/generation\",\n};\n"]}
1
+ {"version":3,"file":"core-contract-final.d.ts","sourceRoot":"","sources":["../../../../../src/core/i18n/locales/zh-cn/core-contract-final.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA+DpD,CAAC","sourcesContent":["/**\n * 批次⑨收尾域词典(docs/design/国际化与本地化.md §词典结构):批次⑨abc\n * 精确对账后发现的最后一批散布 throw——artifacts、client/remote-session、\n * main.ts 子任务护栏、suites/suite-loader、remote/server-entry 与\n * session-source、share、testing 工具。至此 agent-forge 包内可译 throw 清零\n * (豁免清单见设计文档 §1 非目标 6-9)。\n */\nexport const coreContractFinal: Record<string, string> = {\n\t// --- artifacts/artifact-store.ts ---\n\t\"Artifact not found: {artifactId}\": \"找不到制品:{artifactId}\",\n\t\"Artifact {artifactId} belongs to a different session\": \"制品 {artifactId} 属于另一个会话\",\n\t\"Artifact {artifactId} lifecycle has ended: {reason}\": \"制品 {artifactId} 生命周期已结束:{reason}\",\n\t\"Artifact {artifactId} lifecycle has already ended\": \"制品 {artifactId} 生命周期已经结束\",\n\n\t// --- client/remote-session.ts ---\n\t\"Session cannot accept input during {phase} phase\": \"会话处于 {phase} 阶段,不能接受输入\",\n\t\"Cannot {operation} a session while session is {phase}\": \"会话处于 {phase} 状态,无法执行 {operation}\",\n\t\"Session {id} did not provide a snapshot\": \"会话 {id} 未提供快照\",\n\t\"Remote session is disposed\": \"远程会话已销毁\",\n\t\"Remote session is busy with {operation}\": \"远程会话正忙于 {operation}\",\n\t\"Cannot {description} while session is {phase}\": \"会话处于 {phase} 状态,无法 {description}\",\n\n\t// --- main.ts ---\n\t\"agent task child profile model {model} is not among the runner's scoped models{available}\":\n\t\t\"agent task 子 profile 模型 {model} 不在 runner 的作用域模型内{available}\",\n\t\"resume target {resumeId} is not a persisted child of session {parentId}\":\n\t\t\"resume 目标 {resumeId} 不是会话 {parentId} 的已持久化子会话\",\n\n\t// --- suites/suite-loader.ts ---\n\t\"Invalid suite.json at {path}: {errors}. Fix the file, or delete the suite workspace directory {dir} and recreate it.\":\n\t\t\"{path} 的 suite.json 无效:{errors}。请修复该文件,或删除 suite 工作区目录 {dir} 后重建。\",\n\n\t// --- remote/server-entry.ts / session-source.ts ---\n\t\"Unknown or unavailable model: {provider}/{id}\": \"未知或不可用的模型:{provider}/{id}\",\n\t\"Remote server requires a session source or sessionSourceOptions\":\n\t\t\"远程服务器需要 session source 或 sessionSourceOptions\",\n\t'cwd \"{cwd}\" is outside the configured workspace roots: [{roots}]':\n\t\t'cwd \"{cwd}\" 在配置的工作区根目录之外:[{roots}]',\n\t\"Cannot create session: cwd does not exist: {cwd}\": \"无法创建会话:cwd 不存在:{cwd}\",\n\t\"Cannot create session: cwd is not a directory: {cwd}\": \"无法创建会话:cwd 不是目录:{cwd}\",\n\t\"Session not found: {id}\": \"找不到会话:{id}\",\n\n\t// --- share/session-share.ts ---\n\t\"Share not found: {shareId}\": \"找不到分享:{shareId}\",\n\t\"Share {shareId} has already been revoked\": \"分享 {shareId} 已被撤销\",\n\n\t// --- testing/ ---\n\t\"Runtime-only delivery queue {name} must be a positive safe integer\": \"仅运行时的投递队列 {name} 必须是正的安全整数\",\n\t\"Session plugin testkit plugin API handles expire after session reload; access the current runtime directly\":\n\t\t\"会话插件 testkit 的插件 API 句柄在会话重载后过期;请直接访问当前运行时\",\n\t\"Session plugin testkit has no loaded plugin: {pluginId}\": \"会话插件 testkit 没有已加载的插件:{pluginId}\",\n\t\"Session plugin testkit has {count} unused faux response\": \"会话插件 testkit 有 {count} 个未使用的 faux 响应\",\n\t\"Session plugin testkit has {count} unused faux responses\": \"会话插件 testkit 有 {count} 个未使用的 faux 响应\",\n\t\"Session plugin testkit repeat count must be a positive integer\": \"会话插件 testkit 的重复次数必须是正整数\",\n\t\"Session plugin testkit transcript diverged on run {run}\": \"会话插件 testkit 的转录在第 {run} 次运行出现分歧\",\n\t\"Plugin testkit manifestRoot must be a non-empty string\": \"插件 testkit 的 manifestRoot 必须是非空字符串\",\n\t\"Plugin testkit repeat count must be a positive integer\": \"插件 testkit 的重复次数必须是正整数\",\n\t\"Plugin testkit transcript diverged on run {run}\": \"插件 testkit 的转录在第 {run} 次运行出现分歧\",\n\n\t// --- suites/suite-loader.ts .profile-lock.json 校验 ---\n\t\".profile-lock.json must be a JSON object\": \".profile-lock.json 必须是 JSON 对象\",\n\t\".profile-lock.json identity must be a JSON object\": \".profile-lock.json 的 identity 必须是 JSON 对象\",\n\t\".profile-lock.json identity must carry profileId/profileVersion/manifestDigest/capabilityVersions\":\n\t\t\".profile-lock.json 的 identity 必须携带 profileId/profileVersion/manifestDigest/capabilityVersions\",\n\t\".profile-lock.json identity.capabilityVersions entries must be objects\":\n\t\t\".profile-lock.json 的 identity.capabilityVersions 条目必须是对象\",\n\t\".profile-lock.json identity.capabilityVersions entries must carry id/version\":\n\t\t\".profile-lock.json 的 identity.capabilityVersions 条目必须携带 id/version\",\n\t\".profile-lock.json must carry lockedAt/lockedBy/generation\":\n\t\t\".profile-lock.json 必须携带 lockedAt/lockedBy/generation\",\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 批次⑨收尾域词典(docs/design/国际化与本地化.md §词典结构):批次⑨abc
3
3
  * 精确对账后发现的最后一批散布 throw——artifacts、client/remote-session、
4
- * main.ts 子任务护栏、profiles/suite-loader、remote/server-entry 与
4
+ * main.ts 子任务护栏、suites/suite-loader、remote/server-entry 与
5
5
  * session-source、share、testing 工具。至此 agent-forge 包内可译 throw 清零
6
6
  * (豁免清单见设计文档 §1 非目标 6-9)。
7
7
  */
@@ -21,7 +21,7 @@ export const coreContractFinal = {
21
21
  // --- main.ts ---
22
22
  "agent task child profile model {model} is not among the runner's scoped models{available}": "agent task 子 profile 模型 {model} 不在 runner 的作用域模型内{available}",
23
23
  "resume target {resumeId} is not a persisted child of session {parentId}": "resume 目标 {resumeId} 不是会话 {parentId} 的已持久化子会话",
24
- // --- profiles/suite-loader.ts ---
24
+ // --- suites/suite-loader.ts ---
25
25
  "Invalid suite.json at {path}: {errors}. Fix the file, or delete the suite workspace directory {dir} and recreate it.": "{path} 的 suite.json 无效:{errors}。请修复该文件,或删除 suite 工作区目录 {dir} 后重建。",
26
26
  // --- remote/server-entry.ts / session-source.ts ---
27
27
  "Unknown or unavailable model: {provider}/{id}": "未知或不可用的模型:{provider}/{id}",
@@ -44,7 +44,7 @@ export const coreContractFinal = {
44
44
  "Plugin testkit manifestRoot must be a non-empty string": "插件 testkit 的 manifestRoot 必须是非空字符串",
45
45
  "Plugin testkit repeat count must be a positive integer": "插件 testkit 的重复次数必须是正整数",
46
46
  "Plugin testkit transcript diverged on run {run}": "插件 testkit 的转录在第 {run} 次运行出现分歧",
47
- // --- profiles/suite-loader.ts .profile-lock.json 校验 ---
47
+ // --- suites/suite-loader.ts .profile-lock.json 校验 ---
48
48
  ".profile-lock.json must be a JSON object": ".profile-lock.json 必须是 JSON 对象",
49
49
  ".profile-lock.json identity must be a JSON object": ".profile-lock.json 的 identity 必须是 JSON 对象",
50
50
  ".profile-lock.json identity must carry profileId/profileVersion/manifestDigest/capabilityVersions": ".profile-lock.json 的 identity 必须携带 profileId/profileVersion/manifestDigest/capabilityVersions",