@ai-agent-forge/agent-forge 0.88.1 → 0.88.3

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 (518) hide show
  1. package/CHANGELOG.md +71 -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 +283 -263
  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-Z72JWUZ4.js → chunk-32YDZI4J.js} +1 -1
  24. package/dist/bundle/chunks/{chunk-AQLNTW2B.js → chunk-755VNWIF.js} +17 -16
  25. package/dist/bundle/chunks/{chunk-LZOEQITZ.js → chunk-B42Y2VME.js} +120 -104
  26. package/dist/bundle/chunks/{chunk-DRQDKNXA.js → chunk-BVVSHK6W.js} +1 -1
  27. package/dist/bundle/chunks/{chunk-6R7UI4IY.js → chunk-QDLOMKF6.js} +1 -1
  28. package/dist/bundle/chunks/{chunk-D3ARGZFR.js → chunk-V3ACW7VD.js} +3 -3
  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 +3 -3
  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/plugin-command.d.ts.map +1 -1
  61. package/dist/cli/plugin-command.js +8 -2
  62. package/dist/cli/plugin-command.js.map +1 -1
  63. package/dist/cli/startup-ui.d.ts.map +1 -1
  64. package/dist/cli/startup-ui.js +1 -1
  65. package/dist/cli/startup-ui.js.map +1 -1
  66. package/dist/config.d.ts +4 -4
  67. package/dist/config.d.ts.map +1 -1
  68. package/dist/config.js +7 -7
  69. package/dist/config.js.map +1 -1
  70. package/dist/core/agent-forge-manifest.d.ts +7 -0
  71. package/dist/core/agent-forge-manifest.d.ts.map +1 -0
  72. package/dist/core/{pi-manifest.js → agent-forge-manifest.js} +4 -4
  73. package/dist/core/agent-forge-manifest.js.map +1 -0
  74. package/dist/core/agent-session-compaction.d.ts +1 -1
  75. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  76. package/dist/core/agent-session-compaction.js +3 -3
  77. package/dist/core/agent-session-compaction.js.map +1 -1
  78. package/dist/core/agent-session-internal.d.ts +2 -0
  79. package/dist/core/agent-session-internal.d.ts.map +1 -1
  80. package/dist/core/agent-session-internal.js.map +1 -1
  81. package/dist/core/agent-session-lifecycle.d.ts.map +1 -1
  82. package/dist/core/agent-session-lifecycle.js +12 -1
  83. package/dist/core/agent-session-lifecycle.js.map +1 -1
  84. package/dist/core/agent-session-projection.d.ts.map +1 -1
  85. package/dist/core/agent-session-projection.js +3 -3
  86. package/dist/core/agent-session-projection.js.map +1 -1
  87. package/dist/core/agent-session-services.d.ts +3 -1
  88. package/dist/core/agent-session-services.d.ts.map +1 -1
  89. package/dist/core/agent-session-services.js +2 -1
  90. package/dist/core/agent-session-services.js.map +1 -1
  91. package/dist/core/agent-session-store.d.ts.map +1 -1
  92. package/dist/core/agent-session-store.js +6 -1
  93. package/dist/core/agent-session-store.js.map +1 -1
  94. package/dist/core/agent-session-tools.d.ts.map +1 -1
  95. package/dist/core/agent-session-tools.js +13 -0
  96. package/dist/core/agent-session-tools.js.map +1 -1
  97. package/dist/core/agent-session.d.ts +24 -0
  98. package/dist/core/agent-session.d.ts.map +1 -1
  99. package/dist/core/agent-session.js +58 -4
  100. package/dist/core/agent-session.js.map +1 -1
  101. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  102. package/dist/core/compaction/branch-summarization.js +1 -1
  103. package/dist/core/compaction/branch-summarization.js.map +1 -1
  104. package/dist/core/experimental.d.ts.map +1 -1
  105. package/dist/core/experimental.js +1 -3
  106. package/dist/core/experimental.js.map +1 -1
  107. package/dist/core/extensions/capability-runtime-store.d.ts +20 -1
  108. package/dist/core/extensions/capability-runtime-store.d.ts.map +1 -1
  109. package/dist/core/extensions/capability-runtime-store.js +67 -0
  110. package/dist/core/extensions/capability-runtime-store.js.map +1 -1
  111. package/dist/core/extensions/capability-runtime-types.d.ts +14 -0
  112. package/dist/core/extensions/capability-runtime-types.d.ts.map +1 -1
  113. package/dist/core/extensions/capability-runtime-types.js +7 -1
  114. package/dist/core/extensions/capability-runtime-types.js.map +1 -1
  115. package/dist/core/extensions/capability-runtime.d.ts.map +1 -1
  116. package/dist/core/extensions/capability-runtime.js +144 -42
  117. package/dist/core/extensions/capability-runtime.js.map +1 -1
  118. package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
  119. package/dist/core/extensions/virtual-modules.js +6 -1
  120. package/dist/core/extensions/virtual-modules.js.map +1 -1
  121. package/dist/core/facade/coding-agent-facade.d.ts +1 -1
  122. package/dist/core/facade/coding-agent-facade.d.ts.map +1 -1
  123. package/dist/core/facade/coding-agent-facade.js +1 -1
  124. package/dist/core/facade/coding-agent-facade.js.map +1 -1
  125. package/dist/core/i18n/locales/zh-cn/cli.d.ts.map +1 -1
  126. package/dist/core/i18n/locales/zh-cn/cli.js +2 -0
  127. package/dist/core/i18n/locales/zh-cn/cli.js.map +1 -1
  128. package/dist/core/i18n/locales/zh-cn/core-contract-final.d.ts +1 -1
  129. package/dist/core/i18n/locales/zh-cn/core-contract-final.d.ts.map +1 -1
  130. package/dist/core/i18n/locales/zh-cn/core-contract-final.js +3 -3
  131. package/dist/core/i18n/locales/zh-cn/core-contract-final.js.map +1 -1
  132. package/dist/core/i18n/locales/zh-cn/core-contract-plugins.d.ts.map +1 -1
  133. package/dist/core/i18n/locales/zh-cn/core-contract-plugins.js +1 -1
  134. package/dist/core/i18n/locales/zh-cn/core-contract-plugins.js.map +1 -1
  135. package/dist/core/i18n/locales/zh-cn/core-errors.d.ts.map +1 -1
  136. package/dist/core/i18n/locales/zh-cn/core-errors.js +1 -1
  137. package/dist/core/i18n/locales/zh-cn/core-errors.js.map +1 -1
  138. package/dist/core/i18n/locales/zh-cn/index.d.ts.map +1 -1
  139. package/dist/core/i18n/locales/zh-cn/index.js +2 -0
  140. package/dist/core/i18n/locales/zh-cn/index.js.map +1 -1
  141. package/dist/core/i18n/locales/zh-cn/interactive-mode.d.ts.map +1 -1
  142. package/dist/core/i18n/locales/zh-cn/interactive-mode.js +5 -0
  143. package/dist/core/i18n/locales/zh-cn/interactive-mode.js.map +1 -1
  144. package/dist/core/i18n/locales/zh-cn/session-cleanup.d.ts +7 -0
  145. package/dist/core/i18n/locales/zh-cn/session-cleanup.d.ts.map +1 -0
  146. package/dist/core/i18n/locales/zh-cn/session-cleanup.js +15 -0
  147. package/dist/core/i18n/locales/zh-cn/session-cleanup.js.map +1 -0
  148. package/dist/core/i18n/locales/zh-cn/slash-commands.d.ts.map +1 -1
  149. package/dist/core/i18n/locales/zh-cn/slash-commands.js +1 -0
  150. package/dist/core/i18n/locales/zh-cn/slash-commands.js.map +1 -1
  151. package/dist/core/i18n/locales/zh-cn/tui-components-misc.d.ts.map +1 -1
  152. package/dist/core/i18n/locales/zh-cn/tui-components-misc.js +2 -0
  153. package/dist/core/i18n/locales/zh-cn/tui-components-misc.js.map +1 -1
  154. package/dist/core/model-resolver.d.ts +2 -0
  155. package/dist/core/model-resolver.d.ts.map +1 -1
  156. package/dist/core/model-resolver.js +4 -1
  157. package/dist/core/model-resolver.js.map +1 -1
  158. package/dist/core/package-resource-collection.d.ts.map +1 -1
  159. package/dist/core/package-resource-collection.js +5 -5
  160. package/dist/core/package-resource-collection.js.map +1 -1
  161. package/dist/core/provider-composer.d.ts.map +1 -1
  162. package/dist/core/provider-composer.js +3 -3
  163. package/dist/core/provider-composer.js.map +1 -1
  164. package/dist/core/resource-loader.d.ts.map +1 -1
  165. package/dist/core/resource-loader.js +1 -1
  166. package/dist/core/resource-loader.js.map +1 -1
  167. package/dist/core/sdk.d.ts +1 -1
  168. package/dist/core/sdk.d.ts.map +1 -1
  169. package/dist/core/sdk.js +30 -8
  170. package/dist/core/sdk.js.map +1 -1
  171. package/dist/core/session-cleanup.d.ts +49 -0
  172. package/dist/core/session-cleanup.d.ts.map +1 -0
  173. package/dist/core/session-cleanup.js +159 -0
  174. package/dist/core/session-cleanup.js.map +1 -0
  175. package/dist/core/session-index.d.ts +75 -0
  176. package/dist/core/session-index.d.ts.map +1 -0
  177. package/dist/core/session-index.js +455 -0
  178. package/dist/core/session-index.js.map +1 -0
  179. package/dist/core/session-manager.d.ts +9 -0
  180. package/dist/core/session-manager.d.ts.map +1 -1
  181. package/dist/core/session-manager.js +206 -51
  182. package/dist/core/session-manager.js.map +1 -1
  183. package/dist/core/settings-manager.d.ts.map +1 -1
  184. package/dist/core/settings-manager.js +5 -10
  185. package/dist/core/settings-manager.js.map +1 -1
  186. package/dist/core/slash-commands.d.ts.map +1 -1
  187. package/dist/core/slash-commands.js +5 -0
  188. package/dist/core/slash-commands.js.map +1 -1
  189. package/dist/core/system-prompt.d.ts.map +1 -1
  190. package/dist/core/system-prompt.js +12 -1
  191. package/dist/core/system-prompt.js.map +1 -1
  192. package/dist/core/timings.d.ts.map +1 -1
  193. package/dist/core/timings.js +1 -3
  194. package/dist/core/timings.js.map +1 -1
  195. package/dist/core/tools/capability-mount.d.ts +40 -0
  196. package/dist/core/tools/capability-mount.d.ts.map +1 -0
  197. package/dist/core/tools/capability-mount.js +112 -0
  198. package/dist/core/tools/capability-mount.js.map +1 -0
  199. package/dist/core/tools/render-utils.d.ts +1 -1
  200. package/dist/core/tools/render-utils.d.ts.map +1 -1
  201. package/dist/core/tools/render-utils.js.map +1 -1
  202. package/dist/core/tools/tool-definition.d.ts +1 -1
  203. package/dist/core/tools/tool-definition.d.ts.map +1 -1
  204. package/dist/core/tools/tool-definition.js.map +1 -1
  205. package/dist/core/trace-retention.d.ts +16 -1
  206. package/dist/core/trace-retention.d.ts.map +1 -1
  207. package/dist/core/trace-retention.js +43 -20
  208. package/dist/core/trace-retention.js.map +1 -1
  209. package/dist/export-html/ansi-to-html.d.ts.map +1 -0
  210. package/dist/export-html/ansi-to-html.js.map +1 -0
  211. package/dist/{core/export-html → export-html}/index.d.ts +1 -1
  212. package/dist/export-html/index.d.ts.map +1 -0
  213. package/dist/{core/export-html → export-html}/index.js +5 -5
  214. package/dist/export-html/index.js.map +1 -0
  215. package/dist/{core/export-html → export-html}/tool-renderer.d.ts +2 -2
  216. package/dist/export-html/tool-renderer.d.ts.map +1 -0
  217. package/dist/export-html/tool-renderer.js.map +1 -0
  218. package/dist/{modes/interactive → host}/model-catalog-refresh.d.ts +1 -1
  219. package/dist/host/model-catalog-refresh.d.ts.map +1 -0
  220. package/dist/{modes/interactive → host}/model-catalog-refresh.js +1 -1
  221. package/dist/host/model-catalog-refresh.js.map +1 -0
  222. package/dist/index.d.ts +5 -5
  223. package/dist/index.d.ts.map +1 -1
  224. package/dist/index.js +12 -12
  225. package/dist/index.js.map +1 -1
  226. package/dist/main.d.ts.map +1 -1
  227. package/dist/main.js +26 -14
  228. package/dist/main.js.map +1 -1
  229. package/dist/modes/interactive/components/agents-view.d.ts.map +1 -1
  230. package/dist/modes/interactive/components/agents-view.js +1 -1
  231. package/dist/modes/interactive/components/agents-view.js.map +1 -1
  232. package/dist/modes/interactive/components/armin.d.ts.map +1 -1
  233. package/dist/modes/interactive/components/armin.js +1 -1
  234. package/dist/modes/interactive/components/armin.js.map +1 -1
  235. package/dist/modes/interactive/components/assistant-message.d.ts +6 -0
  236. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  237. package/dist/modes/interactive/components/assistant-message.js +108 -27
  238. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  239. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  240. package/dist/modes/interactive/components/bash-execution.js +1 -1
  241. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  242. package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
  243. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
  244. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  245. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  246. package/dist/modes/interactive/components/branch-summary-message.js +1 -1
  247. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  248. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  249. package/dist/modes/interactive/components/compaction-summary-message.js +1 -1
  250. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  251. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  252. package/dist/modes/interactive/components/config-selector.js +1 -1
  253. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  254. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  255. package/dist/modes/interactive/components/custom-entry.js +1 -1
  256. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  257. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  258. package/dist/modes/interactive/components/custom-message.js +1 -1
  259. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  260. package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
  261. package/dist/modes/interactive/components/daxnuts.js +1 -1
  262. package/dist/modes/interactive/components/daxnuts.js.map +1 -1
  263. package/dist/modes/interactive/components/dialog-editor.d.ts.map +1 -1
  264. package/dist/modes/interactive/components/dialog-editor.js +1 -1
  265. package/dist/modes/interactive/components/dialog-editor.js.map +1 -1
  266. package/dist/modes/interactive/components/dialog-input.d.ts.map +1 -1
  267. package/dist/modes/interactive/components/dialog-input.js +1 -1
  268. package/dist/modes/interactive/components/dialog-input.js.map +1 -1
  269. package/dist/modes/interactive/components/dialog-selector.d.ts.map +1 -1
  270. package/dist/modes/interactive/components/dialog-selector.js +1 -1
  271. package/dist/modes/interactive/components/dialog-selector.js.map +1 -1
  272. package/dist/modes/interactive/components/diff.d.ts.map +1 -1
  273. package/dist/modes/interactive/components/diff.js +1 -1
  274. package/dist/modes/interactive/components/diff.js.map +1 -1
  275. package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
  276. package/dist/modes/interactive/components/dynamic-border.js +1 -1
  277. package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
  278. package/dist/modes/interactive/components/first-time-setup.d.ts +1 -1
  279. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
  280. package/dist/modes/interactive/components/first-time-setup.js +1 -1
  281. package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
  282. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  283. package/dist/modes/interactive/components/footer.js +1 -1
  284. package/dist/modes/interactive/components/footer.js.map +1 -1
  285. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
  286. package/dist/modes/interactive/components/keybinding-hints.js +1 -1
  287. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
  288. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  289. package/dist/modes/interactive/components/login-dialog.js +1 -1
  290. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  291. package/dist/modes/interactive/components/mermaid.d.ts +1 -1
  292. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
  293. package/dist/modes/interactive/components/mermaid.js.map +1 -1
  294. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  295. package/dist/modes/interactive/components/model-selector.js +2 -2
  296. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  297. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  298. package/dist/modes/interactive/components/oauth-selector.js +1 -1
  299. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  300. package/dist/modes/interactive/components/plugin-manager-entry.d.ts.map +1 -1
  301. package/dist/modes/interactive/components/plugin-manager-entry.js +1 -1
  302. package/dist/modes/interactive/components/plugin-manager-entry.js.map +1 -1
  303. package/dist/modes/interactive/components/plugin-selection-entry.d.ts.map +1 -1
  304. package/dist/modes/interactive/components/plugin-selection-entry.js +1 -1
  305. package/dist/modes/interactive/components/plugin-selection-entry.js.map +1 -1
  306. package/dist/modes/interactive/components/queue-manager-selector.d.ts.map +1 -1
  307. package/dist/modes/interactive/components/queue-manager-selector.js +1 -1
  308. package/dist/modes/interactive/components/queue-manager-selector.js.map +1 -1
  309. package/dist/modes/interactive/components/render-types.d.ts +1 -1
  310. package/dist/modes/interactive/components/render-types.d.ts.map +1 -1
  311. package/dist/modes/interactive/components/render-types.js.map +1 -1
  312. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  313. package/dist/modes/interactive/components/scoped-models-selector.js +1 -1
  314. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  315. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
  316. package/dist/modes/interactive/components/session-selector-search.js +5 -1
  317. package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
  318. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  319. package/dist/modes/interactive/components/session-selector.js +11 -2
  320. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  321. package/dist/modes/interactive/components/settings-selector.d.ts +1 -1
  322. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  323. package/dist/modes/interactive/components/settings-selector.js +1 -1
  324. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  325. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
  326. package/dist/modes/interactive/components/settings-submenu.js +1 -1
  327. package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
  328. package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
  329. package/dist/modes/interactive/components/show-images-selector.js +1 -1
  330. package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
  331. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  332. package/dist/modes/interactive/components/skill-invocation-message.js +1 -1
  333. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  334. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  335. package/dist/modes/interactive/components/status-indicator.js +1 -1
  336. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  337. package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
  338. package/dist/modes/interactive/components/theme-selector.js +1 -1
  339. package/dist/modes/interactive/components/theme-selector.js.map +1 -1
  340. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  341. package/dist/modes/interactive/components/thinking-selector.js +1 -1
  342. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  343. package/dist/modes/interactive/components/tool-execution.d.ts +19 -0
  344. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  345. package/dist/modes/interactive/components/tool-execution.js +139 -4
  346. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  347. package/dist/modes/interactive/components/tool-run-group.d.ts +44 -0
  348. package/dist/modes/interactive/components/tool-run-group.d.ts.map +1 -0
  349. package/dist/modes/interactive/components/tool-run-group.js +121 -0
  350. package/dist/modes/interactive/components/tool-run-group.js.map +1 -0
  351. package/dist/modes/interactive/components/tree-list.d.ts.map +1 -1
  352. package/dist/modes/interactive/components/tree-list.js +1 -1
  353. package/dist/modes/interactive/components/tree-list.js.map +1 -1
  354. package/dist/modes/interactive/components/tree-render.d.ts.map +1 -1
  355. package/dist/modes/interactive/components/tree-render.js +1 -1
  356. package/dist/modes/interactive/components/tree-render.js.map +1 -1
  357. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  358. package/dist/modes/interactive/components/tree-selector.js +1 -1
  359. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  360. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  361. package/dist/modes/interactive/components/user-message-selector.js +1 -1
  362. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  363. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  364. package/dist/modes/interactive/components/user-message.js +1 -1
  365. package/dist/modes/interactive/components/user-message.js.map +1 -1
  366. package/dist/modes/interactive/components/workflow-view.d.ts.map +1 -1
  367. package/dist/modes/interactive/components/workflow-view.js +1 -1
  368. package/dist/modes/interactive/components/workflow-view.js.map +1 -1
  369. package/dist/modes/interactive/interactive-auth.d.ts +1 -1
  370. package/dist/modes/interactive/interactive-auth.d.ts.map +1 -1
  371. package/dist/modes/interactive/interactive-auth.js +1 -1
  372. package/dist/modes/interactive/interactive-auth.js.map +1 -1
  373. package/dist/modes/interactive/interactive-commands.d.ts +125 -6
  374. package/dist/modes/interactive/interactive-commands.d.ts.map +1 -1
  375. package/dist/modes/interactive/interactive-commands.js +698 -4
  376. package/dist/modes/interactive/interactive-commands.js.map +1 -1
  377. package/dist/modes/interactive/interactive-events.d.ts +174 -0
  378. package/dist/modes/interactive/interactive-events.d.ts.map +1 -0
  379. package/dist/modes/interactive/interactive-events.js +704 -0
  380. package/dist/modes/interactive/interactive-events.js.map +1 -0
  381. package/dist/modes/interactive/interactive-format.d.ts.map +1 -1
  382. package/dist/modes/interactive/interactive-format.js +1 -1
  383. package/dist/modes/interactive/interactive-format.js.map +1 -1
  384. package/dist/modes/interactive/interactive-lifecycle.d.ts +94 -0
  385. package/dist/modes/interactive/interactive-lifecycle.d.ts.map +1 -0
  386. package/dist/modes/interactive/interactive-lifecycle.js +177 -0
  387. package/dist/modes/interactive/interactive-lifecycle.js.map +1 -0
  388. package/dist/modes/interactive/interactive-mode.d.ts +254 -129
  389. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  390. package/dist/modes/interactive/interactive-mode.js +275 -2101
  391. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  392. package/dist/modes/interactive/interactive-queues.d.ts +96 -0
  393. package/dist/modes/interactive/interactive-queues.d.ts.map +1 -0
  394. package/dist/modes/interactive/interactive-queues.js +183 -0
  395. package/dist/modes/interactive/interactive-queues.js.map +1 -0
  396. package/dist/modes/interactive/interactive-selectors.d.ts +95 -5
  397. package/dist/modes/interactive/interactive-selectors.d.ts.map +1 -1
  398. package/dist/modes/interactive/interactive-selectors.js +517 -6
  399. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  400. package/dist/modes/interactive/startup-services.d.ts +31 -0
  401. package/dist/modes/interactive/startup-services.d.ts.map +1 -0
  402. package/dist/modes/interactive/startup-services.js +123 -0
  403. package/dist/modes/interactive/startup-services.js.map +1 -0
  404. package/dist/modes/memory-preheat.d.ts +11 -0
  405. package/dist/modes/memory-preheat.d.ts.map +1 -0
  406. package/dist/modes/memory-preheat.js +20 -0
  407. package/dist/modes/memory-preheat.js.map +1 -0
  408. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  409. package/dist/modes/rpc/rpc-mode.js +3 -1
  410. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  411. package/dist/plugins/ecosystem/cli.d.ts.map +1 -1
  412. package/dist/plugins/ecosystem/cli.js +6 -3
  413. package/dist/plugins/ecosystem/cli.js.map +1 -1
  414. package/dist/plugins/ecosystem/node-plugin-bootstrap.d.ts +7 -1
  415. package/dist/plugins/ecosystem/node-plugin-bootstrap.d.ts.map +1 -1
  416. package/dist/plugins/ecosystem/node-plugin-bootstrap.js +50 -3
  417. package/dist/plugins/ecosystem/node-plugin-bootstrap.js.map +1 -1
  418. package/dist/plugins/ecosystem/plugin-bootstrap.d.ts +28 -16
  419. package/dist/plugins/ecosystem/plugin-bootstrap.d.ts.map +1 -1
  420. package/dist/plugins/ecosystem/plugin-bootstrap.js +35 -33
  421. package/dist/plugins/ecosystem/plugin-bootstrap.js.map +1 -1
  422. package/dist/profile/plugin-profiles.d.ts +1 -1
  423. package/dist/profile/plugin-profiles.d.ts.map +1 -1
  424. package/dist/profile/plugin-profiles.js +18 -0
  425. package/dist/profile/plugin-profiles.js.map +1 -1
  426. package/dist/remote/server-assembly.d.ts.map +1 -1
  427. package/dist/remote/server-assembly.js +7 -2
  428. package/dist/remote/server-assembly.js.map +1 -1
  429. package/dist/{profiles → suites}/builtin-suites.d.ts +14 -4
  430. package/dist/suites/builtin-suites.d.ts.map +1 -0
  431. package/dist/{profiles → suites}/builtin-suites.js +20 -5
  432. package/dist/suites/builtin-suites.js.map +1 -0
  433. package/dist/suites/resolved-agent-profile.d.ts.map +1 -0
  434. package/dist/suites/resolved-agent-profile.js.map +1 -0
  435. package/dist/suites/suite-lifecycle.d.ts.map +1 -0
  436. package/dist/suites/suite-lifecycle.js.map +1 -0
  437. package/dist/suites/suite-loader.d.ts.map +1 -0
  438. package/dist/suites/suite-loader.js.map +1 -0
  439. package/dist/{modes/interactive/theme → theme}/dark.json +1 -1
  440. package/dist/{modes/interactive/theme → theme}/light.json +1 -1
  441. package/dist/{modes/interactive/theme → theme}/theme-controller.d.ts +1 -1
  442. package/dist/theme/theme-controller.d.ts.map +1 -0
  443. package/dist/{modes/interactive/theme → theme}/theme-controller.js +1 -1
  444. package/dist/theme/theme-controller.js.map +1 -0
  445. package/dist/{modes/interactive/theme → theme}/theme.d.ts +1 -1
  446. package/dist/theme/theme.d.ts.map +1 -0
  447. package/dist/{modes/interactive/theme → theme}/theme.js +5 -5
  448. package/dist/theme/theme.js.map +1 -0
  449. package/docs/compaction.md +7 -7
  450. package/docs/environment-variables.md +10 -4
  451. package/docs/keybindings.md +3 -3
  452. package/docs/models.md +17 -17
  453. package/docs/packages.md +1 -1
  454. package/docs/prompt-templates.md +1 -1
  455. package/docs/rpc.md +2 -2
  456. package/docs/sdk.md +5 -5
  457. package/docs/session-format.md +3 -3
  458. package/docs/settings.md +368 -354
  459. package/docs/shell-aliases.md +1 -1
  460. package/docs/skills.md +1 -1
  461. package/docs/terminal-setup.md +17 -17
  462. package/docs/themes.md +5 -5
  463. package/docs/tmux.md +4 -4
  464. package/docs/tui.md +1 -1
  465. package/docs/windows.md +1 -1
  466. package/examples/extensions/bash-spawn-hook/index.ts +1 -1
  467. package/examples/extensions/dynamic-resources/dynamic.json +1 -1
  468. package/examples/extensions/with-deps/package-lock.json +2 -2
  469. package/examples/extensions/with-deps/package.json +1 -6
  470. package/examples/extensions/with-deps/plugin.json +1 -1
  471. package/package.json +2 -2
  472. package/dist/bundle/chunks/openai-responses-AUJQ3NWT.js +0 -2
  473. package/dist/bundle/chunks/virtual-modules-WF6WRHP7.js +0 -5
  474. package/dist/cli/experimental/commands/pi.d.ts +0 -15
  475. package/dist/cli/experimental/commands/pi.d.ts.map +0 -1
  476. package/dist/cli/experimental/commands/pi.js.map +0 -1
  477. package/dist/core/export-html/ansi-to-html.d.ts.map +0 -1
  478. package/dist/core/export-html/ansi-to-html.js.map +0 -1
  479. package/dist/core/export-html/index.d.ts.map +0 -1
  480. package/dist/core/export-html/index.js.map +0 -1
  481. package/dist/core/export-html/tool-renderer.d.ts.map +0 -1
  482. package/dist/core/export-html/tool-renderer.js.map +0 -1
  483. package/dist/core/pi-manifest.d.ts +0 -7
  484. package/dist/core/pi-manifest.d.ts.map +0 -1
  485. package/dist/core/pi-manifest.js.map +0 -1
  486. package/dist/modes/interactive/model-catalog-refresh.d.ts.map +0 -1
  487. package/dist/modes/interactive/model-catalog-refresh.js.map +0 -1
  488. package/dist/modes/interactive/theme/theme-controller.d.ts.map +0 -1
  489. package/dist/modes/interactive/theme/theme-controller.js.map +0 -1
  490. package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
  491. package/dist/modes/interactive/theme/theme.js.map +0 -1
  492. package/dist/profiles/builtin-suites.d.ts.map +0 -1
  493. package/dist/profiles/builtin-suites.js.map +0 -1
  494. package/dist/profiles/resolved-agent-profile.d.ts.map +0 -1
  495. package/dist/profiles/resolved-agent-profile.js.map +0 -1
  496. package/dist/profiles/suite-lifecycle.d.ts.map +0 -1
  497. package/dist/profiles/suite-lifecycle.js.map +0 -1
  498. package/dist/profiles/suite-loader.d.ts.map +0 -1
  499. package/dist/profiles/suite-loader.js.map +0 -1
  500. package/dist/utils/deprecation.d.ts +0 -4
  501. package/dist/utils/deprecation.d.ts.map +0 -1
  502. package/dist/utils/deprecation.js +0 -13
  503. package/dist/utils/deprecation.js.map +0 -1
  504. /package/dist/{core/export-html → export-html}/ansi-to-html.d.ts +0 -0
  505. /package/dist/{core/export-html → export-html}/ansi-to-html.js +0 -0
  506. /package/dist/{core/export-html → export-html}/template.css +0 -0
  507. /package/dist/{core/export-html → export-html}/template.html +0 -0
  508. /package/dist/{core/export-html → export-html}/template.js +0 -0
  509. /package/dist/{core/export-html → export-html}/tool-renderer.js +0 -0
  510. /package/dist/{core/export-html → export-html}/vendor/highlight.min.js +0 -0
  511. /package/dist/{core/export-html → export-html}/vendor/marked.min.js +0 -0
  512. /package/dist/{profiles → suites}/resolved-agent-profile.d.ts +0 -0
  513. /package/dist/{profiles → suites}/resolved-agent-profile.js +0 -0
  514. /package/dist/{profiles → suites}/suite-lifecycle.d.ts +0 -0
  515. /package/dist/{profiles → suites}/suite-lifecycle.js +0 -0
  516. /package/dist/{profiles → suites}/suite-loader.d.ts +0 -0
  517. /package/dist/{profiles → suites}/suite-loader.js +0 -0
  518. /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":"AAkDA,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: 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 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 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 \"../../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)——安装店副本无 node_modules,\n\t// 缺此条即 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"]}
@@ -15,6 +15,7 @@
15
15
  import * as aiCompat from "@agent-forge/ai/compat";
16
16
  import * as pluginSdk from "@agent-forge/plugin-sdk";
17
17
  import * as pluginSdkSessionLineage from "@agent-forge/plugin-sdk/session-lineage";
18
+ import * as protocol from "@agent-forge/protocol";
18
19
  import * as protocolSubagent from "@agent-forge/protocol/subagent";
19
20
  import * as tui from "@agent-forge/tui";
20
21
  import * as typebox from "typebox";
@@ -26,7 +27,7 @@ import * as undici from "undici";
26
27
  import * as hostDiff from "../../modes/interactive/components/diff.js";
27
28
  import * as hostKeybindingHints from "../../modes/interactive/components/keybinding-hints.js";
28
29
  import * as hostVisualTruncate from "../../modes/interactive/components/visual-truncate.js";
29
- import * as hostTheme from "../../modes/interactive/theme/theme.js";
30
+ import * as hostTheme from "../../theme/theme.js";
30
31
  import * as hostAnsi from "../../utils/ansi.js";
31
32
  import * as hostChildProcess from "../../utils/child-process.js";
32
33
  import * as hostImageProcess from "../../utils/image-process.js";
@@ -51,6 +52,10 @@ export const VIRTUAL_MODULES = {
51
52
  "@agent-forge/plugin-sdk": pluginSdk,
52
53
  "@agent-forge/plugin-sdk/session-lineage": pluginSdkSessionLineage,
53
54
  "@agent-forge/protocol/subagent": protocolSubagent,
55
+ // 记忆插件 Slice B2 起 inference-{client,protocol}.ts import 根说明符
56
+ // (FrameDecoder/encodeFrame/decodeCbor)——安装店副本无 node_modules,
57
+ // 缺此条即 plugin_load_failed (0.88.2 安装链回归, 2026-10-07 修复)。
58
+ "@agent-forge/protocol": protocol,
54
59
  typebox,
55
60
  "typebox/value": typeboxValue,
56
61
  // 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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AAE,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,8EAA8E;AAC9E,8EAA8E;AAC9E,2EAA2E;AAC3E,8EAA8E;AAC9E,6EAA6E;AAC7E,yBAAyB;AACzB,EAAE;AACF,8EAA8E;AA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CAAmC,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 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 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 \"../../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)——安装店副本无 node_modules,\n\t// 缺此条即 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,iBAAi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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 \"../../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":"A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AC3E,cAAc,IAAI,MAAM,GAAG,SAAS,CAAC;IACrC;;;;OAIG;IACH,eAAe,IAAI,mBAAmB,CAAC;IACvC,4EAA4E;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,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AY;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 \"../../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,E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;QAC/C,uEAAuE;QACvE,oEAAoE;QACpE,kEAAkE;QAClE,iBAAiB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,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"]}