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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/bundled-plugins/agent-loop-policy/agent-forge.json +1 -1
  4. package/bundled-plugins/agent-loop-policy/plugin.json +1 -1
  5. package/bundled-plugins/coding-tools/agent-forge.json +1 -1
  6. package/bundled-plugins/coding-tools/plugin.json +1 -1
  7. package/bundled-plugins/compaction-policy/agent-forge.json +1 -1
  8. package/bundled-plugins/compaction-policy/plugin.json +1 -1
  9. package/bundled-plugins/overflow-policy/agent-forge.json +1 -1
  10. package/bundled-plugins/overflow-policy/plugin.json +1 -1
  11. package/bundled-plugins/provider-failover/agent-forge.json +1 -1
  12. package/bundled-plugins/provider-failover/plugin.json +1 -1
  13. package/bundled-plugins/retry-policy/agent-forge.json +1 -1
  14. package/bundled-plugins/retry-policy/plugin.json +1 -1
  15. package/dist/artifacts/paged-read.d.ts +6 -1
  16. package/dist/artifacts/paged-read.d.ts.map +1 -1
  17. package/dist/artifacts/paged-read.js.map +1 -1
  18. package/dist/bundle/.build-manifest.json +244 -234
  19. package/dist/bundle/chunks/{anthropic-messages-PLAKXR73.js → anthropic-messages-3FJHRAJL.js} +2 -2
  20. package/dist/bundle/chunks/anthropic.js +1 -1
  21. package/dist/bundle/chunks/{azure-openai-responses-OUWQ2AZD.js → azure-openai-responses-GCL47IDS.js} +1 -1
  22. package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
  23. package/dist/bundle/chunks/{chunk-6F5JWGKE.js → chunk-32YDZI4J.js} +1 -1
  24. package/dist/bundle/chunks/{chunk-LSP24WNH.js → chunk-755VNWIF.js} +12 -12
  25. package/dist/bundle/chunks/{chunk-DRQDKNXA.js → chunk-BVVSHK6W.js} +1 -1
  26. package/dist/bundle/chunks/{chunk-HTC5K5SM.js → chunk-HEL6TAWE.js} +95 -90
  27. package/dist/bundle/chunks/{chunk-6R7UI4IY.js → chunk-QDLOMKF6.js} +1 -1
  28. package/dist/bundle/chunks/{chunk-44I47ACN.js → chunk-V3ACW7VD.js} +1 -1
  29. package/dist/bundle/chunks/{google-generative-ai-DLII6DAT.js → google-generative-ai-6BMXWA44.js} +1 -1
  30. package/dist/bundle/chunks/{google-vertex-G7BZL7GM.js → google-vertex-6H7NLRTK.js} +1 -1
  31. package/dist/bundle/chunks/image-resize-worker.js +1 -1
  32. package/dist/bundle/chunks/{mistral-conversations-JXUK24ID.js → mistral-conversations-IXUHSFSJ.js} +1 -1
  33. package/dist/bundle/chunks/{openai-codex-responses-5GSGFIPG.js → openai-codex-responses-YHUAEVCM.js} +1 -1
  34. package/dist/bundle/chunks/openai-codex.js +1 -1
  35. package/dist/bundle/chunks/{openai-completions-EI2I6DTG.js → openai-completions-ULQCFC72.js} +1 -1
  36. package/dist/bundle/chunks/openai-responses-NLLAJDPS.js +2 -0
  37. package/dist/bundle/chunks/{openrouter-images-G4GQRUSG.js → openrouter-images-GZZQZXMS.js} +1 -1
  38. package/dist/bundle/chunks/openrouter.js +1 -1
  39. package/dist/bundle/chunks/{pi-messages-PWU2VJMR.js → pi-messages-EJTI2EJ3.js} +1 -1
  40. package/dist/bundle/chunks/virtual-modules-TQWEGNNZ.js +5 -0
  41. package/dist/bundle/cli.js +1 -1
  42. package/dist/bundle/client.js +1 -1
  43. package/dist/bundle/index.js +1 -1
  44. package/dist/bundle/rpc-entry.js +1 -1
  45. package/dist/cli/args.d.ts +0 -1
  46. package/dist/cli/args.d.ts.map +1 -1
  47. package/dist/cli/args.js +1 -4
  48. package/dist/cli/args.js.map +1 -1
  49. package/dist/cli/config-selector.d.ts.map +1 -1
  50. package/dist/cli/config-selector.js +1 -1
  51. package/dist/cli/config-selector.js.map +1 -1
  52. package/dist/cli/experimental/cli.d.ts +3 -3
  53. package/dist/cli/experimental/cli.d.ts.map +1 -1
  54. package/dist/cli/experimental/cli.js +2 -2
  55. package/dist/cli/experimental/cli.js.map +1 -1
  56. package/dist/cli/experimental/commands/agent-forge.d.ts +15 -0
  57. package/dist/cli/experimental/commands/agent-forge.d.ts.map +1 -0
  58. package/dist/cli/experimental/commands/{pi.js → agent-forge.js} +4 -4
  59. package/dist/cli/experimental/commands/agent-forge.js.map +1 -0
  60. package/dist/cli/startup-ui.d.ts.map +1 -1
  61. package/dist/cli/startup-ui.js +1 -1
  62. package/dist/cli/startup-ui.js.map +1 -1
  63. package/dist/config.d.ts +4 -4
  64. package/dist/config.d.ts.map +1 -1
  65. package/dist/config.js +7 -7
  66. package/dist/config.js.map +1 -1
  67. package/dist/core/agent-forge-manifest.d.ts +7 -0
  68. package/dist/core/agent-forge-manifest.d.ts.map +1 -0
  69. package/dist/core/{pi-manifest.js → agent-forge-manifest.js} +4 -4
  70. package/dist/core/agent-forge-manifest.js.map +1 -0
  71. package/dist/core/agent-session-compaction.d.ts +1 -1
  72. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  73. package/dist/core/agent-session-compaction.js +3 -3
  74. package/dist/core/agent-session-compaction.js.map +1 -1
  75. package/dist/core/agent-session-lifecycle.d.ts.map +1 -1
  76. package/dist/core/agent-session-lifecycle.js +12 -1
  77. package/dist/core/agent-session-lifecycle.js.map +1 -1
  78. package/dist/core/agent-session-projection.d.ts.map +1 -1
  79. package/dist/core/agent-session-projection.js +3 -3
  80. package/dist/core/agent-session-projection.js.map +1 -1
  81. package/dist/core/agent-session-services.d.ts +1 -1
  82. package/dist/core/agent-session-services.d.ts.map +1 -1
  83. package/dist/core/agent-session-services.js +1 -1
  84. package/dist/core/agent-session-services.js.map +1 -1
  85. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  86. package/dist/core/compaction/branch-summarization.js +1 -1
  87. package/dist/core/compaction/branch-summarization.js.map +1 -1
  88. package/dist/core/experimental.d.ts.map +1 -1
  89. package/dist/core/experimental.js +1 -3
  90. package/dist/core/experimental.js.map +1 -1
  91. package/dist/core/extensions/capability-plugin.d.ts.map +1 -1
  92. package/dist/core/extensions/capability-plugin.js +15 -8
  93. package/dist/core/extensions/capability-plugin.js.map +1 -1
  94. package/dist/core/extensions/capability-runtime-store.d.ts +20 -1
  95. package/dist/core/extensions/capability-runtime-store.d.ts.map +1 -1
  96. package/dist/core/extensions/capability-runtime-store.js +67 -0
  97. package/dist/core/extensions/capability-runtime-store.js.map +1 -1
  98. package/dist/core/extensions/capability-runtime-types.d.ts +14 -0
  99. package/dist/core/extensions/capability-runtime-types.d.ts.map +1 -1
  100. package/dist/core/extensions/capability-runtime-types.js +7 -1
  101. package/dist/core/extensions/capability-runtime-types.js.map +1 -1
  102. package/dist/core/extensions/capability-runtime.d.ts.map +1 -1
  103. package/dist/core/extensions/capability-runtime.js +144 -42
  104. package/dist/core/extensions/capability-runtime.js.map +1 -1
  105. package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
  106. package/dist/core/extensions/virtual-modules.js +12 -4
  107. package/dist/core/extensions/virtual-modules.js.map +1 -1
  108. package/dist/core/facade/coding-agent-facade.d.ts +1 -1
  109. package/dist/core/facade/coding-agent-facade.d.ts.map +1 -1
  110. package/dist/core/facade/coding-agent-facade.js +1 -1
  111. package/dist/core/facade/coding-agent-facade.js.map +1 -1
  112. package/dist/core/i18n/locales/zh-cn/core-contract-final.d.ts +1 -1
  113. package/dist/core/i18n/locales/zh-cn/core-contract-final.d.ts.map +1 -1
  114. package/dist/core/i18n/locales/zh-cn/core-contract-final.js +3 -3
  115. package/dist/core/i18n/locales/zh-cn/core-contract-final.js.map +1 -1
  116. package/dist/core/i18n/locales/zh-cn/core-contract-plugins.d.ts.map +1 -1
  117. package/dist/core/i18n/locales/zh-cn/core-contract-plugins.js +1 -1
  118. package/dist/core/i18n/locales/zh-cn/core-contract-plugins.js.map +1 -1
  119. package/dist/core/i18n/locales/zh-cn/core-errors.d.ts.map +1 -1
  120. package/dist/core/i18n/locales/zh-cn/core-errors.js +1 -1
  121. package/dist/core/i18n/locales/zh-cn/core-errors.js.map +1 -1
  122. package/dist/core/i18n/locales/zh-cn/tui-components-misc.d.ts.map +1 -1
  123. package/dist/core/i18n/locales/zh-cn/tui-components-misc.js +2 -0
  124. package/dist/core/i18n/locales/zh-cn/tui-components-misc.js.map +1 -1
  125. package/dist/core/model-resolver.d.ts +2 -0
  126. package/dist/core/model-resolver.d.ts.map +1 -1
  127. package/dist/core/model-resolver.js +4 -1
  128. package/dist/core/model-resolver.js.map +1 -1
  129. package/dist/core/package-resource-collection.d.ts.map +1 -1
  130. package/dist/core/package-resource-collection.js +5 -5
  131. package/dist/core/package-resource-collection.js.map +1 -1
  132. package/dist/core/provider-composer.d.ts.map +1 -1
  133. package/dist/core/provider-composer.js +3 -3
  134. package/dist/core/provider-composer.js.map +1 -1
  135. package/dist/core/resource-loader.d.ts.map +1 -1
  136. package/dist/core/resource-loader.js +1 -1
  137. package/dist/core/resource-loader.js.map +1 -1
  138. package/dist/core/sdk.d.ts +1 -1
  139. package/dist/core/sdk.d.ts.map +1 -1
  140. package/dist/core/sdk.js +6 -7
  141. package/dist/core/sdk.js.map +1 -1
  142. package/dist/core/session-manager.d.ts.map +1 -1
  143. package/dist/core/session-manager.js +4 -4
  144. package/dist/core/session-manager.js.map +1 -1
  145. package/dist/core/settings-manager.d.ts.map +1 -1
  146. package/dist/core/settings-manager.js +5 -10
  147. package/dist/core/settings-manager.js.map +1 -1
  148. package/dist/core/timings.d.ts.map +1 -1
  149. package/dist/core/timings.js +1 -3
  150. package/dist/core/timings.js.map +1 -1
  151. package/dist/core/tools/render-utils.d.ts +1 -1
  152. package/dist/core/tools/render-utils.d.ts.map +1 -1
  153. package/dist/core/tools/render-utils.js.map +1 -1
  154. package/dist/core/tools/tool-definition.d.ts +1 -1
  155. package/dist/core/tools/tool-definition.d.ts.map +1 -1
  156. package/dist/core/tools/tool-definition.js.map +1 -1
  157. package/dist/core/trace-retention.d.ts +16 -1
  158. package/dist/core/trace-retention.d.ts.map +1 -1
  159. package/dist/core/trace-retention.js +43 -20
  160. package/dist/core/trace-retention.js.map +1 -1
  161. package/dist/export-html/ansi-to-html.d.ts.map +1 -0
  162. package/dist/export-html/ansi-to-html.js.map +1 -0
  163. package/dist/{core/export-html → export-html}/index.d.ts +1 -1
  164. package/dist/export-html/index.d.ts.map +1 -0
  165. package/dist/{core/export-html → export-html}/index.js +5 -5
  166. package/dist/export-html/index.js.map +1 -0
  167. package/dist/{core/export-html → export-html}/tool-renderer.d.ts +2 -2
  168. package/dist/export-html/tool-renderer.d.ts.map +1 -0
  169. package/dist/export-html/tool-renderer.js.map +1 -0
  170. package/dist/{modes/interactive → host}/model-catalog-refresh.d.ts +1 -1
  171. package/dist/host/model-catalog-refresh.d.ts.map +1 -0
  172. package/dist/{modes/interactive → host}/model-catalog-refresh.js +1 -1
  173. package/dist/host/model-catalog-refresh.js.map +1 -0
  174. package/dist/index.d.ts +5 -5
  175. package/dist/index.d.ts.map +1 -1
  176. package/dist/index.js +12 -12
  177. package/dist/index.js.map +1 -1
  178. package/dist/main.d.ts.map +1 -1
  179. package/dist/main.js +25 -14
  180. package/dist/main.js.map +1 -1
  181. package/dist/modes/interactive/components/agents-view.d.ts.map +1 -1
  182. package/dist/modes/interactive/components/agents-view.js +1 -1
  183. package/dist/modes/interactive/components/agents-view.js.map +1 -1
  184. package/dist/modes/interactive/components/armin.d.ts.map +1 -1
  185. package/dist/modes/interactive/components/armin.js +1 -1
  186. package/dist/modes/interactive/components/armin.js.map +1 -1
  187. package/dist/modes/interactive/components/assistant-message.d.ts +3 -0
  188. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  189. package/dist/modes/interactive/components/assistant-message.js +83 -24
  190. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  191. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  192. package/dist/modes/interactive/components/bash-execution.js +1 -1
  193. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  194. package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
  195. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
  196. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  197. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  198. package/dist/modes/interactive/components/branch-summary-message.js +1 -1
  199. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  200. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  201. package/dist/modes/interactive/components/compaction-summary-message.js +1 -1
  202. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  203. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  204. package/dist/modes/interactive/components/config-selector.js +1 -1
  205. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  206. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  207. package/dist/modes/interactive/components/custom-entry.js +1 -1
  208. package/dist/modes/interactive/components/custom-entry.js.map +1 -1
  209. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  210. package/dist/modes/interactive/components/custom-message.js +1 -1
  211. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  212. package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
  213. package/dist/modes/interactive/components/daxnuts.js +1 -1
  214. package/dist/modes/interactive/components/daxnuts.js.map +1 -1
  215. package/dist/modes/interactive/components/dialog-editor.d.ts.map +1 -1
  216. package/dist/modes/interactive/components/dialog-editor.js +1 -1
  217. package/dist/modes/interactive/components/dialog-editor.js.map +1 -1
  218. package/dist/modes/interactive/components/dialog-input.d.ts.map +1 -1
  219. package/dist/modes/interactive/components/dialog-input.js +1 -1
  220. package/dist/modes/interactive/components/dialog-input.js.map +1 -1
  221. package/dist/modes/interactive/components/dialog-selector.d.ts.map +1 -1
  222. package/dist/modes/interactive/components/dialog-selector.js +1 -1
  223. package/dist/modes/interactive/components/dialog-selector.js.map +1 -1
  224. package/dist/modes/interactive/components/diff.d.ts.map +1 -1
  225. package/dist/modes/interactive/components/diff.js +1 -1
  226. package/dist/modes/interactive/components/diff.js.map +1 -1
  227. package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
  228. package/dist/modes/interactive/components/dynamic-border.js +1 -1
  229. package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
  230. package/dist/modes/interactive/components/first-time-setup.d.ts +1 -1
  231. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
  232. package/dist/modes/interactive/components/first-time-setup.js +1 -1
  233. package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
  234. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  235. package/dist/modes/interactive/components/footer.js +1 -1
  236. package/dist/modes/interactive/components/footer.js.map +1 -1
  237. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
  238. package/dist/modes/interactive/components/keybinding-hints.js +1 -1
  239. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
  240. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  241. package/dist/modes/interactive/components/login-dialog.js +1 -1
  242. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  243. package/dist/modes/interactive/components/mermaid.d.ts +1 -1
  244. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
  245. package/dist/modes/interactive/components/mermaid.js.map +1 -1
  246. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  247. package/dist/modes/interactive/components/model-selector.js +2 -2
  248. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  249. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  250. package/dist/modes/interactive/components/oauth-selector.js +1 -1
  251. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  252. package/dist/modes/interactive/components/plugin-manager-entry.d.ts.map +1 -1
  253. package/dist/modes/interactive/components/plugin-manager-entry.js +1 -1
  254. package/dist/modes/interactive/components/plugin-manager-entry.js.map +1 -1
  255. package/dist/modes/interactive/components/plugin-selection-entry.d.ts.map +1 -1
  256. package/dist/modes/interactive/components/plugin-selection-entry.js +1 -1
  257. package/dist/modes/interactive/components/plugin-selection-entry.js.map +1 -1
  258. package/dist/modes/interactive/components/queue-manager-selector.d.ts.map +1 -1
  259. package/dist/modes/interactive/components/queue-manager-selector.js +1 -1
  260. package/dist/modes/interactive/components/queue-manager-selector.js.map +1 -1
  261. package/dist/modes/interactive/components/render-types.d.ts +1 -1
  262. package/dist/modes/interactive/components/render-types.d.ts.map +1 -1
  263. package/dist/modes/interactive/components/render-types.js.map +1 -1
  264. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  265. package/dist/modes/interactive/components/scoped-models-selector.js +1 -1
  266. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  267. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  268. package/dist/modes/interactive/components/session-selector.js +2 -2
  269. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  270. package/dist/modes/interactive/components/settings-selector.d.ts +1 -1
  271. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  272. package/dist/modes/interactive/components/settings-selector.js +1 -1
  273. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  274. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
  275. package/dist/modes/interactive/components/settings-submenu.js +1 -1
  276. package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
  277. package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
  278. package/dist/modes/interactive/components/show-images-selector.js +1 -1
  279. package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
  280. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  281. package/dist/modes/interactive/components/skill-invocation-message.js +1 -1
  282. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  283. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  284. package/dist/modes/interactive/components/status-indicator.js +1 -1
  285. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  286. package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
  287. package/dist/modes/interactive/components/theme-selector.js +1 -1
  288. package/dist/modes/interactive/components/theme-selector.js.map +1 -1
  289. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  290. package/dist/modes/interactive/components/thinking-selector.js +1 -1
  291. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  292. package/dist/modes/interactive/components/tool-execution.d.ts +2 -0
  293. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  294. package/dist/modes/interactive/components/tool-execution.js +96 -4
  295. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  296. package/dist/modes/interactive/components/tool-run-group.d.ts.map +1 -1
  297. package/dist/modes/interactive/components/tool-run-group.js +1 -1
  298. package/dist/modes/interactive/components/tool-run-group.js.map +1 -1
  299. package/dist/modes/interactive/components/tree-list.d.ts.map +1 -1
  300. package/dist/modes/interactive/components/tree-list.js +1 -1
  301. package/dist/modes/interactive/components/tree-list.js.map +1 -1
  302. package/dist/modes/interactive/components/tree-render.d.ts.map +1 -1
  303. package/dist/modes/interactive/components/tree-render.js +1 -1
  304. package/dist/modes/interactive/components/tree-render.js.map +1 -1
  305. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  306. package/dist/modes/interactive/components/tree-selector.js +1 -1
  307. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  308. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  309. package/dist/modes/interactive/components/user-message-selector.js +1 -1
  310. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  311. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  312. package/dist/modes/interactive/components/user-message.js +1 -1
  313. package/dist/modes/interactive/components/user-message.js.map +1 -1
  314. package/dist/modes/interactive/components/workflow-view.d.ts.map +1 -1
  315. package/dist/modes/interactive/components/workflow-view.js +1 -1
  316. package/dist/modes/interactive/components/workflow-view.js.map +1 -1
  317. package/dist/modes/interactive/interactive-auth.d.ts +1 -1
  318. package/dist/modes/interactive/interactive-auth.d.ts.map +1 -1
  319. package/dist/modes/interactive/interactive-auth.js +1 -1
  320. package/dist/modes/interactive/interactive-auth.js.map +1 -1
  321. package/dist/modes/interactive/interactive-commands.d.ts +123 -6
  322. package/dist/modes/interactive/interactive-commands.d.ts.map +1 -1
  323. package/dist/modes/interactive/interactive-commands.js +691 -4
  324. package/dist/modes/interactive/interactive-commands.js.map +1 -1
  325. package/dist/modes/interactive/interactive-events.d.ts +174 -0
  326. package/dist/modes/interactive/interactive-events.d.ts.map +1 -0
  327. package/dist/modes/interactive/interactive-events.js +704 -0
  328. package/dist/modes/interactive/interactive-events.js.map +1 -0
  329. package/dist/modes/interactive/interactive-format.d.ts.map +1 -1
  330. package/dist/modes/interactive/interactive-format.js +1 -1
  331. package/dist/modes/interactive/interactive-format.js.map +1 -1
  332. package/dist/modes/interactive/interactive-lifecycle.d.ts +94 -0
  333. package/dist/modes/interactive/interactive-lifecycle.d.ts.map +1 -0
  334. package/dist/modes/interactive/interactive-lifecycle.js +177 -0
  335. package/dist/modes/interactive/interactive-lifecycle.js.map +1 -0
  336. package/dist/modes/interactive/interactive-mode.d.ts +240 -133
  337. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  338. package/dist/modes/interactive/interactive-mode.js +251 -2159
  339. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  340. package/dist/modes/interactive/interactive-queues.d.ts +96 -0
  341. package/dist/modes/interactive/interactive-queues.d.ts.map +1 -0
  342. package/dist/modes/interactive/interactive-queues.js +183 -0
  343. package/dist/modes/interactive/interactive-queues.js.map +1 -0
  344. package/dist/modes/interactive/interactive-selectors.d.ts +95 -5
  345. package/dist/modes/interactive/interactive-selectors.d.ts.map +1 -1
  346. package/dist/modes/interactive/interactive-selectors.js +517 -6
  347. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  348. package/dist/modes/interactive/startup-services.d.ts +31 -0
  349. package/dist/modes/interactive/startup-services.d.ts.map +1 -0
  350. package/dist/modes/interactive/startup-services.js +123 -0
  351. package/dist/modes/interactive/startup-services.js.map +1 -0
  352. package/dist/modes/memory-preheat.d.ts +11 -0
  353. package/dist/modes/memory-preheat.d.ts.map +1 -0
  354. package/dist/modes/memory-preheat.js +20 -0
  355. package/dist/modes/memory-preheat.js.map +1 -0
  356. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  357. package/dist/modes/rpc/rpc-mode.js +3 -1
  358. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  359. package/dist/plugins/ecosystem/node-package-install-host.d.ts +9 -1
  360. package/dist/plugins/ecosystem/node-package-install-host.d.ts.map +1 -1
  361. package/dist/plugins/ecosystem/node-package-install-host.js +79 -0
  362. package/dist/plugins/ecosystem/node-package-install-host.js.map +1 -1
  363. package/dist/remote/server-assembly.d.ts.map +1 -1
  364. package/dist/remote/server-assembly.js +7 -2
  365. package/dist/remote/server-assembly.js.map +1 -1
  366. package/dist/suites/builtin-suites.d.ts.map +1 -0
  367. package/dist/suites/builtin-suites.js.map +1 -0
  368. package/dist/suites/resolved-agent-profile.d.ts.map +1 -0
  369. package/dist/suites/resolved-agent-profile.js.map +1 -0
  370. package/dist/suites/suite-lifecycle.d.ts.map +1 -0
  371. package/dist/suites/suite-lifecycle.js.map +1 -0
  372. package/dist/suites/suite-loader.d.ts.map +1 -0
  373. package/dist/suites/suite-loader.js.map +1 -0
  374. package/dist/{modes/interactive/theme → theme}/dark.json +1 -1
  375. package/dist/{modes/interactive/theme → theme}/light.json +1 -1
  376. package/dist/{modes/interactive/theme → theme}/theme-controller.d.ts +1 -1
  377. package/dist/theme/theme-controller.d.ts.map +1 -0
  378. package/dist/{modes/interactive/theme → theme}/theme-controller.js +1 -1
  379. package/dist/theme/theme-controller.js.map +1 -0
  380. package/dist/{modes/interactive/theme → theme}/theme.d.ts +1 -1
  381. package/dist/theme/theme.d.ts.map +1 -0
  382. package/dist/{modes/interactive/theme → theme}/theme.js +5 -5
  383. package/dist/theme/theme.js.map +1 -0
  384. package/docs/compaction.md +7 -7
  385. package/docs/environment-variables.md +10 -4
  386. package/docs/keybindings.md +3 -3
  387. package/docs/models.md +17 -17
  388. package/docs/packages.md +1 -1
  389. package/docs/prompt-templates.md +1 -1
  390. package/docs/rpc.md +2 -2
  391. package/docs/sdk.md +5 -5
  392. package/docs/session-format.md +3 -3
  393. package/docs/settings.md +15 -1
  394. package/docs/shell-aliases.md +1 -1
  395. package/docs/skills.md +1 -1
  396. package/docs/terminal-setup.md +17 -17
  397. package/docs/themes.md +5 -5
  398. package/docs/tmux.md +4 -4
  399. package/docs/tui.md +1 -1
  400. package/docs/usage.md +292 -292
  401. package/docs/windows.md +1 -1
  402. package/examples/extensions/bash-spawn-hook/index.ts +1 -1
  403. package/examples/extensions/dynamic-resources/dynamic.json +1 -1
  404. package/examples/extensions/mcp-stdio/index.d.ts +64 -0
  405. package/examples/extensions/mcp-stdio/index.d.ts.map +1 -0
  406. package/examples/extensions/mcp-stdio/index.js +292 -0
  407. package/examples/extensions/mcp-stdio/index.js.map +1 -0
  408. package/examples/extensions/with-deps/package-lock.json +2 -2
  409. package/examples/extensions/with-deps/package.json +1 -6
  410. package/examples/extensions/with-deps/plugin.json +1 -1
  411. package/package.json +2 -2
  412. package/dist/bundle/chunks/openai-responses-AUJQ3NWT.js +0 -2
  413. package/dist/bundle/chunks/virtual-modules-MRXD3RWG.js +0 -5
  414. package/dist/cli/experimental/commands/pi.d.ts +0 -15
  415. package/dist/cli/experimental/commands/pi.d.ts.map +0 -1
  416. package/dist/cli/experimental/commands/pi.js.map +0 -1
  417. package/dist/core/export-html/ansi-to-html.d.ts.map +0 -1
  418. package/dist/core/export-html/ansi-to-html.js.map +0 -1
  419. package/dist/core/export-html/index.d.ts.map +0 -1
  420. package/dist/core/export-html/index.js.map +0 -1
  421. package/dist/core/export-html/tool-renderer.d.ts.map +0 -1
  422. package/dist/core/export-html/tool-renderer.js.map +0 -1
  423. package/dist/core/pi-manifest.d.ts +0 -7
  424. package/dist/core/pi-manifest.d.ts.map +0 -1
  425. package/dist/core/pi-manifest.js.map +0 -1
  426. package/dist/modes/interactive/model-catalog-refresh.d.ts.map +0 -1
  427. package/dist/modes/interactive/model-catalog-refresh.js.map +0 -1
  428. package/dist/modes/interactive/theme/theme-controller.d.ts.map +0 -1
  429. package/dist/modes/interactive/theme/theme-controller.js.map +0 -1
  430. package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
  431. package/dist/modes/interactive/theme/theme.js.map +0 -1
  432. package/dist/profiles/builtin-suites.d.ts.map +0 -1
  433. package/dist/profiles/builtin-suites.js.map +0 -1
  434. package/dist/profiles/resolved-agent-profile.d.ts.map +0 -1
  435. package/dist/profiles/resolved-agent-profile.js.map +0 -1
  436. package/dist/profiles/suite-lifecycle.d.ts.map +0 -1
  437. package/dist/profiles/suite-lifecycle.js.map +0 -1
  438. package/dist/profiles/suite-loader.d.ts.map +0 -1
  439. package/dist/profiles/suite-loader.js.map +0 -1
  440. package/dist/utils/deprecation.d.ts +0 -4
  441. package/dist/utils/deprecation.d.ts.map +0 -1
  442. package/dist/utils/deprecation.js +0 -13
  443. package/dist/utils/deprecation.js.map +0 -1
  444. /package/dist/{core/export-html → export-html}/ansi-to-html.d.ts +0 -0
  445. /package/dist/{core/export-html → export-html}/ansi-to-html.js +0 -0
  446. /package/dist/{core/export-html → export-html}/template.css +0 -0
  447. /package/dist/{core/export-html → export-html}/template.html +0 -0
  448. /package/dist/{core/export-html → export-html}/template.js +0 -0
  449. /package/dist/{core/export-html → export-html}/tool-renderer.js +0 -0
  450. /package/dist/{core/export-html → export-html}/vendor/highlight.min.js +0 -0
  451. /package/dist/{core/export-html → export-html}/vendor/marked.min.js +0 -0
  452. /package/dist/{profiles → suites}/builtin-suites.d.ts +0 -0
  453. /package/dist/{profiles → suites}/builtin-suites.js +0 -0
  454. /package/dist/{profiles → suites}/resolved-agent-profile.d.ts +0 -0
  455. /package/dist/{profiles → suites}/resolved-agent-profile.js +0 -0
  456. /package/dist/{profiles → suites}/suite-lifecycle.d.ts +0 -0
  457. /package/dist/{profiles → suites}/suite-lifecycle.js +0 -0
  458. /package/dist/{profiles → suites}/suite-loader.d.ts +0 -0
  459. /package/dist/{profiles → suites}/suite-loader.js +0 -0
  460. /package/dist/{modes/interactive/theme → theme}/theme-schema.json +0 -0
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Queue management for interactive mode (拆分 slice 3,
3
+ * docs/plans/interactive-mode拆分计划.md): the follow-up/dequeue entry points,
4
+ * the /queue, /dequeue, and /queue-list command faces, the merged
5
+ * pending-messages display under the editor, and the compaction queue
6
+ * (messages held back while compaction is running).
7
+ *
8
+ * InteractiveMode implements QueuesHost and keeps same-name delegate methods so
9
+ * prototype-level tests, the command dispatch table, and the selector surface
10
+ * keep working; the functions below receive the mode through QueuesHost.
11
+ * restoreQueuedMessagesToEditor stays on the mode (the Esc interrupt path and
12
+ * the selectors call it), and the queue manager overlay stays in
13
+ * ./interactive-selectors.ts — this module reaches it only through the host
14
+ * method (host.showQueueManagerSelector), so no sibling module imports another.
15
+ *
16
+ * Internal collaboration interface (same pattern as AuthUiHost): not a plugin
17
+ * API and not exported from the package root.
18
+ */
19
+ import type { Container, EditorComponent, TUI } from "@agent-forge/tui";
20
+ import type { CodingAgentFacadeV1 } from "../../core/facade/index.ts";
21
+ import type { AppKeybinding } from "../../core/keybindings.ts";
22
+ /** A message held back while compaction is running (steer or follow-up). */
23
+ export type CompactionQueuedMessage = {
24
+ text: string;
25
+ mode: "steer" | "followUp";
26
+ };
27
+ /**
28
+ * Host surface InteractiveMode exposes to this module: the queue entry points
29
+ * (which stay on the mode for dispatch and prototype-level tests), the editor
30
+ * and pending-messages containers, the stable facade, and the compaction queue
31
+ * state (which lives on the mode because renderCurrentSessionState resets it).
32
+ *
33
+ * Internal collaboration interface (same pattern as AuthUiHost): not a plugin
34
+ * API and not exported from the package root.
35
+ */
36
+ export interface QueuesHost {
37
+ ui: TUI;
38
+ editor: EditorComponent;
39
+ /** Stable facade (阶段 1 slice 1). */
40
+ facade: CodingAgentFacadeV1;
41
+ pendingMessagesContainer: Container;
42
+ /** Compaction queue state; reset by the mode's renderCurrentSessionState. */
43
+ compactionQueuedMessages: CompactionQueuedMessage[];
44
+ showStatus(message: string): void;
45
+ showError(message: string): void;
46
+ /** Restores queued messages into the editor; stays on the mode (Esc + selectors). */
47
+ restoreQueuedMessagesToEditor(options?: {
48
+ abort?: boolean;
49
+ /** Interrupt grading (设计 子代理运行时 §4.2): false aborts the turn
50
+ * without cancelling background agent tasks. */
51
+ cancelAgentTasks?: boolean;
52
+ currentText?: string;
53
+ }): number;
54
+ /** Capitalized display string for an app keybinding action (./interactive-commands.ts). */
55
+ getAppKeyDisplay(action: AppKeybinding): string;
56
+ /** Queue manager overlay; the implementation stays in ./interactive-selectors.ts. */
57
+ showQueueManagerSelector(): void;
58
+ handleFollowUp(explicitText?: string): Promise<void>;
59
+ handleDequeue(): void;
60
+ getAllQueuedMessages(): {
61
+ steering: string[];
62
+ followUp: string[];
63
+ };
64
+ updatePendingMessagesDisplay(): void;
65
+ queueCompactionMessage(text: string, mode: "steer" | "followUp"): void;
66
+ }
67
+ export declare function handleFollowUp(host: QueuesHost, explicitText?: string): Promise<void>;
68
+ export declare function handleDequeue(host: QueuesHost): void;
69
+ /** /queue command host face (single-entry iron law): queues the given text for after the current run. A bare /queue cannot mirror the keybinding — the editor buffer is cleared on submit before the command runs — so it prints usage instead of silently doing nothing. */
70
+ export declare function handleQueueCommand(host: QueuesHost, text: string | undefined): Promise<void>;
71
+ /** /dequeue command host face: restore queued messages back to the editor. */
72
+ export declare function handleDequeueCommand(host: QueuesHost): void;
73
+ /** /queue-list command host face: open the queued-message manager selector. Both queues empty is a status message, not an empty overlay. */
74
+ export declare function handleQueueListCommand(host: QueuesHost): void;
75
+ /**
76
+ * Get all queued messages (read-only).
77
+ * Combines session queue and compaction queue.
78
+ */
79
+ export declare function getAllQueuedMessages(host: QueuesHost): {
80
+ steering: string[];
81
+ followUp: string[];
82
+ };
83
+ /**
84
+ * Clear all queued messages and return their contents.
85
+ * Clears both session queue and compaction queue.
86
+ */
87
+ export declare function clearAllQueues(host: QueuesHost): {
88
+ steering: string[];
89
+ followUp: string[];
90
+ };
91
+ export declare function updatePendingMessagesDisplay(host: QueuesHost): void;
92
+ export declare function queueCompactionMessage(host: QueuesHost, text: string, mode: "steer" | "followUp"): void;
93
+ export declare function flushCompactionQueue(host: QueuesHost, options?: {
94
+ willRetry?: boolean;
95
+ }): Promise<void>;
96
+ //# sourceMappingURL=interactive-queues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactive-queues.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-queues.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/D,4EAA4E;AAC5E,MAAM,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,UAAU,CAAC;CAC3B,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU;IAC1B,EAAE,EAAE,GAAG,CAAC;IACR,MAAM,EAAE,eAAe,CAAC;IACxB,wCAAoC;IACpC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,wBAAwB,EAAE,SAAS,CAAC;IACpC,6EAA6E;IAC7E,wBAAwB,EAAE,uBAAuB,EAAE,CAAC;IAEpD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,qFAAqF;IACrF,6BAA6B,CAAC,OAAO,CAAC,EAAE;QACvC,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB;wDACgD;QAChD,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,WAA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E,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAa3F;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAmBnE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAMvG;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA4D7G","sourcesContent":["/**\n * Queue management for interactive mode (拆分 slice 3,\n * docs/plans/interactive-mode拆分计划.md): the follow-up/dequeue entry points,\n * the /queue, /dequeue, and /queue-list command faces, the merged\n * pending-messages display under the editor, and the compaction queue\n * (messages held back while compaction is running).\n *\n * InteractiveMode implements QueuesHost and keeps same-name delegate methods so\n * prototype-level tests, the command dispatch table, and the selector surface\n * keep working; the functions below receive the mode through QueuesHost.\n * restoreQueuedMessagesToEditor stays on the mode (the Esc interrupt path and\n * the selectors call it), and the queue manager overlay stays in\n * ./interactive-selectors.ts — this module reaches it only through the host\n * method (host.showQueueManagerSelector), so no sibling module imports another.\n *\n * Internal collaboration interface (same pattern as AuthUiHost): not a plugin\n * API and not exported from the package root.\n */\nimport type { Container, EditorComponent, TUI } from \"@agent-forge/tui\";\nimport { Spacer, TruncatedText } from \"@agent-forge/tui\";\nimport type { CodingAgentFacadeV1 } from \"../../core/facade/index.ts\";\nimport { t } from \"../../core/i18n/index.ts\";\nimport type { AppKeybinding } from \"../../core/keybindings.ts\";\nimport { theme } from \"../../theme/theme.ts\";\n\n/** A message held back while compaction is running (steer or follow-up). */\nexport type CompactionQueuedMessage = {\n\ttext: string;\n\tmode: \"steer\" | \"followUp\";\n};\n\n/**\n * Host surface InteractiveMode exposes to this module: the queue entry points\n * (which stay on the mode for dispatch and prototype-level tests), the editor\n * and pending-messages containers, the stable facade, and the compaction queue\n * state (which lives on the mode because renderCurrentSessionState resets it).\n *\n * Internal collaboration interface (same pattern as AuthUiHost): not a plugin\n * API and not exported from the package root.\n */\nexport interface QueuesHost {\n\tui: TUI;\n\teditor: EditorComponent;\n\t/** Stable facade (阶段 1 slice 1). */\n\tfacade: CodingAgentFacadeV1;\n\tpendingMessagesContainer: Container;\n\t/** Compaction queue state; reset by the mode's renderCurrentSessionState. */\n\tcompactionQueuedMessages: CompactionQueuedMessage[];\n\n\tshowStatus(message: string): void;\n\tshowError(message: string): void;\n\t/** Restores queued messages into the editor; stays on the mode (Esc + selectors). */\n\trestoreQueuedMessagesToEditor(options?: {\n\t\tabort?: boolean;\n\t\t/** Interrupt grading (设计 子代理运行时 §4.2): false aborts the turn\n\t\t * without cancelling background agent tasks. */\n\t\tcancelAgentTasks?: boolean;\n\t\tcurrentText?: string;\n\t}): number;\n\t/** Capitalized display string for an app keybinding action (./interactive-commands.ts). */\n\tgetAppKeyDisplay(action: AppKeybinding): string;\n\t/** Queue manager overlay; the implementation stays in ./interactive-selectors.ts. */\n\tshowQueueManagerSelector(): void;\n\thandleFollowUp(explicitText?: string): Promise<void>;\n\thandleDequeue(): void;\n\tgetAllQueuedMessages(): { steering: string[]; followUp: string[] };\n\tupdatePendingMessagesDisplay(): void;\n\tqueueCompactionMessage(text: string, mode: \"steer\" | \"followUp\"): void;\n}\n\nexport async function handleFollowUp(host: QueuesHost, explicitText?: string): Promise<void> {\n\tconst text = (explicitText ?? host.editor.getExpandedText?.() ?? host.editor.getText()).trim();\n\tif (!text) return;\n\n\t// Queue input during compaction (extension commands execute immediately)\n\tif (host.facade.isCompacting()) {\n\t\thost.queueCompactionMessage(text, \"followUp\");\n\t\treturn;\n\t}\n\n\t// Alt+Enter queues a follow-up message (waits until agent finishes)\n\t// This handles extension commands (execute immediately), prompt template expansion, and queueing\n\tif (host.facade.isStreaming()) {\n\t\t// An explicit /queue <text> argument must not touch the editor draft.\n\t\tif (explicitText === undefined) {\n\t\t\thost.editor.addToHistory?.(text);\n\t\t\thost.editor.setText(\"\");\n\t\t}\n\t\tawait host.facade.prompt(text, { streamingBehavior: \"followUp\" });\n\t\thost.updatePendingMessagesDisplay();\n\t\thost.ui.requestRender();\n\t}\n\t// If not streaming, Alt+Enter acts like regular Enter (trigger onSubmit)\n\telse if (host.editor.onSubmit) {\n\t\tif (explicitText === undefined) host.editor.setText(\"\");\n\t\thost.editor.onSubmit(text);\n\t}\n}\n\nexport function handleDequeue(host: QueuesHost): void {\n\tconst restored = host.restoreQueuedMessagesToEditor();\n\tif (restored === 0) {\n\t\thost.showStatus(t(\"No queued messages to restore\"));\n\t} else if (restored === 1) {\n\t\thost.showStatus(t(\"Restored {count} queued message to editor\", { count: restored }));\n\t} else {\n\t\thost.showStatus(t(\"Restored {count} queued messages to editor\", { count: restored }));\n\t}\n}\n\n/** /queue command host face (single-entry iron law): queues the given text for after the current run. A bare /queue cannot mirror the keybinding — the editor buffer is cleared on submit before the command runs — so it prints usage instead of silently doing nothing. */\nexport function handleQueueCommand(host: QueuesHost, text: string | undefined): Promise<void> {\n\tif (text === undefined || text.trim() === \"\") {\n\t\thost.showStatus(t(\"Usage: /queue <text>\"));\n\t\treturn Promise.resolve();\n\t}\n\treturn host.handleFollowUp(text);\n}\n\n/** /dequeue command host face: restore queued messages back to the editor. */\nexport function handleDequeueCommand(host: QueuesHost): void {\n\thost.handleDequeue();\n}\n\n/** /queue-list command host face: open the queued-message manager selector. Both queues empty is a status message, not an empty overlay. */\nexport function handleQueueListCommand(host: QueuesHost): void {\n\tconst steering = host.facade.getSteeringMessages();\n\tconst followUp = host.facade.getFollowUpMessages();\n\tif (steering.length === 0 && followUp.length === 0) {\n\t\thost.showStatus(t(\"No queued messages to manage\"));\n\t\treturn;\n\t}\n\thost.showQueueManagerSelector();\n}\n\n/**\n * Get all queued messages (read-only).\n * Combines session queue and compaction queue.\n */\nexport function getAllQueuedMessages(host: QueuesHost): { steering: string[]; followUp: string[] } {\n\treturn {\n\t\tsteering: [\n\t\t\t...host.facade.getSteeringMessages(),\n\t\t\t...host.compactionQueuedMessages.filter((msg) => msg.mode === \"steer\").map((msg) => msg.text),\n\t\t],\n\t\tfollowUp: [\n\t\t\t...host.facade.getFollowUpMessages(),\n\t\t\t...host.compactionQueuedMessages.filter((msg) => msg.mode === \"followUp\").map((msg) => msg.text),\n\t\t],\n\t};\n}\n\n/**\n * Clear all queued messages and return their contents.\n * Clears both session queue and compaction queue.\n */\nexport function clearAllQueues(host: QueuesHost): { steering: string[]; followUp: string[] } {\n\tconst { steering, followUp } = host.facade.clearQueue();\n\tconst compactionSteering = host.compactionQueuedMessages\n\t\t.filter((msg) => msg.mode === \"steer\")\n\t\t.map((msg) => msg.text);\n\tconst compactionFollowUp = host.compactionQueuedMessages\n\t\t.filter((msg) => msg.mode === \"followUp\")\n\t\t.map((msg) => msg.text);\n\thost.compactionQueuedMessages = [];\n\treturn {\n\t\tsteering: [...steering, ...compactionSteering],\n\t\tfollowUp: [...followUp, ...compactionFollowUp],\n\t};\n}\n\nexport function updatePendingMessagesDisplay(host: QueuesHost): void {\n\thost.pendingMessagesContainer.clear();\n\tconst { steering: steeringMessages, followUp: followUpMessages } = host.getAllQueuedMessages();\n\tif (steeringMessages.length > 0 || followUpMessages.length > 0) {\n\t\thost.pendingMessagesContainer.addChild(new Spacer(1));\n\t\tfor (const message of steeringMessages) {\n\t\t\tconst text = theme.fg(\"dim\", t(\"Steering: {message}\", { message }));\n\t\t\thost.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));\n\t\t}\n\t\tfor (const message of followUpMessages) {\n\t\t\tconst text = theme.fg(\"dim\", t(\"Follow-up: {message}\", { message }));\n\t\t\thost.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));\n\t\t}\n\t\t// The dequeue keybinding's shipped default was cleared (iron law):\n\t\t// /queue's sibling command is the discoverable entry.\n\t\tconst dequeueHint = host.getAppKeyDisplay(\"app.message.dequeue\") || \"/dequeue\";\n\t\tconst hintText = theme.fg(\"dim\", t(\"↳ {key} to edit all queued messages\", { key: dequeueHint }));\n\t\thost.pendingMessagesContainer.addChild(new TruncatedText(hintText, 1, 0));\n\t}\n}\n\nexport function queueCompactionMessage(host: QueuesHost, text: string, mode: \"steer\" | \"followUp\"): void {\n\thost.compactionQueuedMessages.push({ text, mode });\n\thost.editor.addToHistory?.(text);\n\thost.editor.setText(\"\");\n\thost.updatePendingMessagesDisplay();\n\thost.showStatus(t(\"Queued message for after compaction\"));\n}\n\nexport async function flushCompactionQueue(host: QueuesHost, options?: { willRetry?: boolean }): Promise<void> {\n\tif (host.compactionQueuedMessages.length === 0) {\n\t\treturn;\n\t}\n\n\tconst queuedMessages = [...host.compactionQueuedMessages];\n\thost.compactionQueuedMessages = [];\n\thost.updatePendingMessagesDisplay();\n\n\tconst restoreQueue = (error: unknown) => {\n\t\thost.facade.clearQueue();\n\t\thost.compactionQueuedMessages = queuedMessages;\n\t\thost.updatePendingMessagesDisplay();\n\t\thost.showError(\n\t\t\tqueuedMessages.length > 1\n\t\t\t\t? t(\"Failed to send queued messages: {error}\", {\n\t\t\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t\t\t})\n\t\t\t\t: t(\"Failed to send queued message: {error}\", {\n\t\t\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t\t\t}),\n\t\t);\n\t};\n\n\ttry {\n\t\tif (options?.willRetry) {\n\t\t\t// When retry is pending, queue messages for the retry turn\n\t\t\tfor (const message of queuedMessages) {\n\t\t\t\tif (message.mode === \"followUp\") {\n\t\t\t\t\tawait host.facade.followUp(message.text);\n\t\t\t\t} else {\n\t\t\t\t\tawait host.facade.steer(message.text);\n\t\t\t\t}\n\t\t\t}\n\t\t\thost.updatePendingMessagesDisplay();\n\t\t\treturn;\n\t\t}\n\n\t\tconst [firstPrompt, ...rest] = queuedMessages;\n\n\t\t// Start a prompt when idle, or queue it into a run still finishing compaction.\n\t\tconst promptPromise = host.facade\n\t\t\t.prompt(firstPrompt.text, { streamingBehavior: firstPrompt.mode })\n\t\t\t.catch((error) => {\n\t\t\t\trestoreQueue(error);\n\t\t\t});\n\n\t\t// Queue remaining messages\n\t\tfor (const message of rest) {\n\t\t\tif (message.mode === \"followUp\") {\n\t\t\t\tawait host.facade.followUp(message.text);\n\t\t\t} else {\n\t\t\t\tawait host.facade.steer(message.text);\n\t\t\t}\n\t\t}\n\t\thost.updatePendingMessagesDisplay();\n\t\tvoid promptPromise;\n\t} catch (error) {\n\t\trestoreQueue(error);\n\t}\n}\n"]}
@@ -0,0 +1,183 @@
1
+ import { Spacer, TruncatedText } from "@agent-forge/tui";
2
+ import { t } from "../../core/i18n/index.js";
3
+ import { theme } from "../../theme/theme.js";
4
+ export async function handleFollowUp(host, explicitText) {
5
+ const text = (explicitText ?? host.editor.getExpandedText?.() ?? host.editor.getText()).trim();
6
+ if (!text)
7
+ return;
8
+ // Queue input during compaction (extension commands execute immediately)
9
+ if (host.facade.isCompacting()) {
10
+ host.queueCompactionMessage(text, "followUp");
11
+ return;
12
+ }
13
+ // Alt+Enter queues a follow-up message (waits until agent finishes)
14
+ // This handles extension commands (execute immediately), prompt template expansion, and queueing
15
+ if (host.facade.isStreaming()) {
16
+ // An explicit /queue <text> argument must not touch the editor draft.
17
+ if (explicitText === undefined) {
18
+ host.editor.addToHistory?.(text);
19
+ host.editor.setText("");
20
+ }
21
+ await host.facade.prompt(text, { streamingBehavior: "followUp" });
22
+ host.updatePendingMessagesDisplay();
23
+ host.ui.requestRender();
24
+ }
25
+ // If not streaming, Alt+Enter acts like regular Enter (trigger onSubmit)
26
+ else if (host.editor.onSubmit) {
27
+ if (explicitText === undefined)
28
+ host.editor.setText("");
29
+ host.editor.onSubmit(text);
30
+ }
31
+ }
32
+ export function handleDequeue(host) {
33
+ const restored = host.restoreQueuedMessagesToEditor();
34
+ if (restored === 0) {
35
+ host.showStatus(t("No queued messages to restore"));
36
+ }
37
+ else if (restored === 1) {
38
+ host.showStatus(t("Restored {count} queued message to editor", { count: restored }));
39
+ }
40
+ else {
41
+ host.showStatus(t("Restored {count} queued messages to editor", { count: restored }));
42
+ }
43
+ }
44
+ /** /queue command host face (single-entry iron law): queues the given text for after the current run. A bare /queue cannot mirror the keybinding — the editor buffer is cleared on submit before the command runs — so it prints usage instead of silently doing nothing. */
45
+ export function handleQueueCommand(host, text) {
46
+ if (text === undefined || text.trim() === "") {
47
+ host.showStatus(t("Usage: /queue <text>"));
48
+ return Promise.resolve();
49
+ }
50
+ return host.handleFollowUp(text);
51
+ }
52
+ /** /dequeue command host face: restore queued messages back to the editor. */
53
+ export function handleDequeueCommand(host) {
54
+ host.handleDequeue();
55
+ }
56
+ /** /queue-list command host face: open the queued-message manager selector. Both queues empty is a status message, not an empty overlay. */
57
+ export function handleQueueListCommand(host) {
58
+ const steering = host.facade.getSteeringMessages();
59
+ const followUp = host.facade.getFollowUpMessages();
60
+ if (steering.length === 0 && followUp.length === 0) {
61
+ host.showStatus(t("No queued messages to manage"));
62
+ return;
63
+ }
64
+ host.showQueueManagerSelector();
65
+ }
66
+ /**
67
+ * Get all queued messages (read-only).
68
+ * Combines session queue and compaction queue.
69
+ */
70
+ export function getAllQueuedMessages(host) {
71
+ return {
72
+ steering: [
73
+ ...host.facade.getSteeringMessages(),
74
+ ...host.compactionQueuedMessages.filter((msg) => msg.mode === "steer").map((msg) => msg.text),
75
+ ],
76
+ followUp: [
77
+ ...host.facade.getFollowUpMessages(),
78
+ ...host.compactionQueuedMessages.filter((msg) => msg.mode === "followUp").map((msg) => msg.text),
79
+ ],
80
+ };
81
+ }
82
+ /**
83
+ * Clear all queued messages and return their contents.
84
+ * Clears both session queue and compaction queue.
85
+ */
86
+ export function clearAllQueues(host) {
87
+ const { steering, followUp } = host.facade.clearQueue();
88
+ const compactionSteering = host.compactionQueuedMessages
89
+ .filter((msg) => msg.mode === "steer")
90
+ .map((msg) => msg.text);
91
+ const compactionFollowUp = host.compactionQueuedMessages
92
+ .filter((msg) => msg.mode === "followUp")
93
+ .map((msg) => msg.text);
94
+ host.compactionQueuedMessages = [];
95
+ return {
96
+ steering: [...steering, ...compactionSteering],
97
+ followUp: [...followUp, ...compactionFollowUp],
98
+ };
99
+ }
100
+ export function updatePendingMessagesDisplay(host) {
101
+ host.pendingMessagesContainer.clear();
102
+ const { steering: steeringMessages, followUp: followUpMessages } = host.getAllQueuedMessages();
103
+ if (steeringMessages.length > 0 || followUpMessages.length > 0) {
104
+ host.pendingMessagesContainer.addChild(new Spacer(1));
105
+ for (const message of steeringMessages) {
106
+ const text = theme.fg("dim", t("Steering: {message}", { message }));
107
+ host.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));
108
+ }
109
+ for (const message of followUpMessages) {
110
+ const text = theme.fg("dim", t("Follow-up: {message}", { message }));
111
+ host.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));
112
+ }
113
+ // The dequeue keybinding's shipped default was cleared (iron law):
114
+ // /queue's sibling command is the discoverable entry.
115
+ const dequeueHint = host.getAppKeyDisplay("app.message.dequeue") || "/dequeue";
116
+ const hintText = theme.fg("dim", t("↳ {key} to edit all queued messages", { key: dequeueHint }));
117
+ host.pendingMessagesContainer.addChild(new TruncatedText(hintText, 1, 0));
118
+ }
119
+ }
120
+ export function queueCompactionMessage(host, text, mode) {
121
+ host.compactionQueuedMessages.push({ text, mode });
122
+ host.editor.addToHistory?.(text);
123
+ host.editor.setText("");
124
+ host.updatePendingMessagesDisplay();
125
+ host.showStatus(t("Queued message for after compaction"));
126
+ }
127
+ export async function flushCompactionQueue(host, options) {
128
+ if (host.compactionQueuedMessages.length === 0) {
129
+ return;
130
+ }
131
+ const queuedMessages = [...host.compactionQueuedMessages];
132
+ host.compactionQueuedMessages = [];
133
+ host.updatePendingMessagesDisplay();
134
+ const restoreQueue = (error) => {
135
+ host.facade.clearQueue();
136
+ host.compactionQueuedMessages = queuedMessages;
137
+ host.updatePendingMessagesDisplay();
138
+ host.showError(queuedMessages.length > 1
139
+ ? t("Failed to send queued messages: {error}", {
140
+ error: error instanceof Error ? error.message : String(error),
141
+ })
142
+ : t("Failed to send queued message: {error}", {
143
+ error: error instanceof Error ? error.message : String(error),
144
+ }));
145
+ };
146
+ try {
147
+ if (options?.willRetry) {
148
+ // When retry is pending, queue messages for the retry turn
149
+ for (const message of queuedMessages) {
150
+ if (message.mode === "followUp") {
151
+ await host.facade.followUp(message.text);
152
+ }
153
+ else {
154
+ await host.facade.steer(message.text);
155
+ }
156
+ }
157
+ host.updatePendingMessagesDisplay();
158
+ return;
159
+ }
160
+ const [firstPrompt, ...rest] = queuedMessages;
161
+ // Start a prompt when idle, or queue it into a run still finishing compaction.
162
+ const promptPromise = host.facade
163
+ .prompt(firstPrompt.text, { streamingBehavior: firstPrompt.mode })
164
+ .catch((error) => {
165
+ restoreQueue(error);
166
+ });
167
+ // Queue remaining messages
168
+ for (const message of rest) {
169
+ if (message.mode === "followUp") {
170
+ await host.facade.followUp(message.text);
171
+ }
172
+ else {
173
+ await host.facade.steer(message.text);
174
+ }
175
+ }
176
+ host.updatePendingMessagesDisplay();
177
+ void promptPromise;
178
+ }
179
+ catch (error) {
180
+ restoreQueue(error);
181
+ }
182
+ }
183
+ //# sourceMappingURL=interactive-queues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactive-queues.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-queues.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,CAAC,EAAE,MAAM,0BAA0B,CAAC;AAE7C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AA+C7C,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAgB,EAAE,YAAqB,EAAiB;IAC5F,MAAM,IAAI,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO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AE,CAAC;gBACjC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC1C,CAAC;iBAAM,CAAC;gBACP,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACvC,CAAC;QACF,CAAC;QACD,IAAI,CAAC,4BAA4B,EAAE,CAAC;QACpC,KAAK,aAAa,CAAC;IACpB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,YAAY,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;AAAA,CACD","sourcesContent":["/**\n * Queue management for interactive mode (拆分 slice 3,\n * docs/plans/interactive-mode拆分计划.md): the follow-up/dequeue entry points,\n * the /queue, /dequeue, and /queue-list command faces, the merged\n * pending-messages display under the editor, and the compaction queue\n * (messages held back while compaction is running).\n *\n * InteractiveMode implements QueuesHost and keeps same-name delegate methods so\n * prototype-level tests, the command dispatch table, and the selector surface\n * keep working; the functions below receive the mode through QueuesHost.\n * restoreQueuedMessagesToEditor stays on the mode (the Esc interrupt path and\n * the selectors call it), and the queue manager overlay stays in\n * ./interactive-selectors.ts — this module reaches it only through the host\n * method (host.showQueueManagerSelector), so no sibling module imports another.\n *\n * Internal collaboration interface (same pattern as AuthUiHost): not a plugin\n * API and not exported from the package root.\n */\nimport type { Container, EditorComponent, TUI } from \"@agent-forge/tui\";\nimport { Spacer, TruncatedText } from \"@agent-forge/tui\";\nimport type { CodingAgentFacadeV1 } from \"../../core/facade/index.ts\";\nimport { t } from \"../../core/i18n/index.ts\";\nimport type { AppKeybinding } from \"../../core/keybindings.ts\";\nimport { theme } from \"../../theme/theme.ts\";\n\n/** A message held back while compaction is running (steer or follow-up). */\nexport type CompactionQueuedMessage = {\n\ttext: string;\n\tmode: \"steer\" | \"followUp\";\n};\n\n/**\n * Host surface InteractiveMode exposes to this module: the queue entry points\n * (which stay on the mode for dispatch and prototype-level tests), the editor\n * and pending-messages containers, the stable facade, and the compaction queue\n * state (which lives on the mode because renderCurrentSessionState resets it).\n *\n * Internal collaboration interface (same pattern as AuthUiHost): not a plugin\n * API and not exported from the package root.\n */\nexport interface QueuesHost {\n\tui: TUI;\n\teditor: EditorComponent;\n\t/** Stable facade (阶段 1 slice 1). */\n\tfacade: CodingAgentFacadeV1;\n\tpendingMessagesContainer: Container;\n\t/** Compaction queue state; reset by the mode's renderCurrentSessionState. */\n\tcompactionQueuedMessages: CompactionQueuedMessage[];\n\n\tshowStatus(message: string): void;\n\tshowError(message: string): void;\n\t/** Restores queued messages into the editor; stays on the mode (Esc + selectors). */\n\trestoreQueuedMessagesToEditor(options?: {\n\t\tabort?: boolean;\n\t\t/** Interrupt grading (设计 子代理运行时 §4.2): false aborts the turn\n\t\t * without cancelling background agent tasks. */\n\t\tcancelAgentTasks?: boolean;\n\t\tcurrentText?: string;\n\t}): number;\n\t/** Capitalized display string for an app keybinding action (./interactive-commands.ts). */\n\tgetAppKeyDisplay(action: AppKeybinding): string;\n\t/** Queue manager overlay; the implementation stays in ./interactive-selectors.ts. */\n\tshowQueueManagerSelector(): void;\n\thandleFollowUp(explicitText?: string): Promise<void>;\n\thandleDequeue(): void;\n\tgetAllQueuedMessages(): { steering: string[]; followUp: string[] };\n\tupdatePendingMessagesDisplay(): void;\n\tqueueCompactionMessage(text: string, mode: \"steer\" | \"followUp\"): void;\n}\n\nexport async function handleFollowUp(host: QueuesHost, explicitText?: string): Promise<void> {\n\tconst text = (explicitText ?? host.editor.getExpandedText?.() ?? host.editor.getText()).trim();\n\tif (!text) return;\n\n\t// Queue input during compaction (extension commands execute immediately)\n\tif (host.facade.isCompacting()) {\n\t\thost.queueCompactionMessage(text, \"followUp\");\n\t\treturn;\n\t}\n\n\t// Alt+Enter queues a follow-up message (waits until agent finishes)\n\t// This handles extension commands (execute immediately), prompt template expansion, and queueing\n\tif (host.facade.isStreaming()) {\n\t\t// An explicit /queue <text> argument must not touch the editor draft.\n\t\tif (explicitText === undefined) {\n\t\t\thost.editor.addToHistory?.(text);\n\t\t\thost.editor.setText(\"\");\n\t\t}\n\t\tawait host.facade.prompt(text, { streamingBehavior: \"followUp\" });\n\t\thost.updatePendingMessagesDisplay();\n\t\thost.ui.requestRender();\n\t}\n\t// If not streaming, Alt+Enter acts like regular Enter (trigger onSubmit)\n\telse if (host.editor.onSubmit) {\n\t\tif (explicitText === undefined) host.editor.setText(\"\");\n\t\thost.editor.onSubmit(text);\n\t}\n}\n\nexport function handleDequeue(host: QueuesHost): void {\n\tconst restored = host.restoreQueuedMessagesToEditor();\n\tif (restored === 0) {\n\t\thost.showStatus(t(\"No queued messages to restore\"));\n\t} else if (restored === 1) {\n\t\thost.showStatus(t(\"Restored {count} queued message to editor\", { count: restored }));\n\t} else {\n\t\thost.showStatus(t(\"Restored {count} queued messages to editor\", { count: restored }));\n\t}\n}\n\n/** /queue command host face (single-entry iron law): queues the given text for after the current run. A bare /queue cannot mirror the keybinding — the editor buffer is cleared on submit before the command runs — so it prints usage instead of silently doing nothing. */\nexport function handleQueueCommand(host: QueuesHost, text: string | undefined): Promise<void> {\n\tif (text === undefined || text.trim() === \"\") {\n\t\thost.showStatus(t(\"Usage: /queue <text>\"));\n\t\treturn Promise.resolve();\n\t}\n\treturn host.handleFollowUp(text);\n}\n\n/** /dequeue command host face: restore queued messages back to the editor. */\nexport function handleDequeueCommand(host: QueuesHost): void {\n\thost.handleDequeue();\n}\n\n/** /queue-list command host face: open the queued-message manager selector. Both queues empty is a status message, not an empty overlay. */\nexport function handleQueueListCommand(host: QueuesHost): void {\n\tconst steering = host.facade.getSteeringMessages();\n\tconst followUp = host.facade.getFollowUpMessages();\n\tif (steering.length === 0 && followUp.length === 0) {\n\t\thost.showStatus(t(\"No queued messages to manage\"));\n\t\treturn;\n\t}\n\thost.showQueueManagerSelector();\n}\n\n/**\n * Get all queued messages (read-only).\n * Combines session queue and compaction queue.\n */\nexport function getAllQueuedMessages(host: QueuesHost): { steering: string[]; followUp: string[] } {\n\treturn {\n\t\tsteering: [\n\t\t\t...host.facade.getSteeringMessages(),\n\t\t\t...host.compactionQueuedMessages.filter((msg) => msg.mode === \"steer\").map((msg) => msg.text),\n\t\t],\n\t\tfollowUp: [\n\t\t\t...host.facade.getFollowUpMessages(),\n\t\t\t...host.compactionQueuedMessages.filter((msg) => msg.mode === \"followUp\").map((msg) => msg.text),\n\t\t],\n\t};\n}\n\n/**\n * Clear all queued messages and return their contents.\n * Clears both session queue and compaction queue.\n */\nexport function clearAllQueues(host: QueuesHost): { steering: string[]; followUp: string[] } {\n\tconst { steering, followUp } = host.facade.clearQueue();\n\tconst compactionSteering = host.compactionQueuedMessages\n\t\t.filter((msg) => msg.mode === \"steer\")\n\t\t.map((msg) => msg.text);\n\tconst compactionFollowUp = host.compactionQueuedMessages\n\t\t.filter((msg) => msg.mode === \"followUp\")\n\t\t.map((msg) => msg.text);\n\thost.compactionQueuedMessages = [];\n\treturn {\n\t\tsteering: [...steering, ...compactionSteering],\n\t\tfollowUp: [...followUp, ...compactionFollowUp],\n\t};\n}\n\nexport function updatePendingMessagesDisplay(host: QueuesHost): void {\n\thost.pendingMessagesContainer.clear();\n\tconst { steering: steeringMessages, followUp: followUpMessages } = host.getAllQueuedMessages();\n\tif (steeringMessages.length > 0 || followUpMessages.length > 0) {\n\t\thost.pendingMessagesContainer.addChild(new Spacer(1));\n\t\tfor (const message of steeringMessages) {\n\t\t\tconst text = theme.fg(\"dim\", t(\"Steering: {message}\", { message }));\n\t\t\thost.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));\n\t\t}\n\t\tfor (const message of followUpMessages) {\n\t\t\tconst text = theme.fg(\"dim\", t(\"Follow-up: {message}\", { message }));\n\t\t\thost.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));\n\t\t}\n\t\t// The dequeue keybinding's shipped default was cleared (iron law):\n\t\t// /queue's sibling command is the discoverable entry.\n\t\tconst dequeueHint = host.getAppKeyDisplay(\"app.message.dequeue\") || \"/dequeue\";\n\t\tconst hintText = theme.fg(\"dim\", t(\"↳ {key} to edit all queued messages\", { key: dequeueHint }));\n\t\thost.pendingMessagesContainer.addChild(new TruncatedText(hintText, 1, 0));\n\t}\n}\n\nexport function queueCompactionMessage(host: QueuesHost, text: string, mode: \"steer\" | \"followUp\"): void {\n\thost.compactionQueuedMessages.push({ text, mode });\n\thost.editor.addToHistory?.(text);\n\thost.editor.setText(\"\");\n\thost.updatePendingMessagesDisplay();\n\thost.showStatus(t(\"Queued message for after compaction\"));\n}\n\nexport async function flushCompactionQueue(host: QueuesHost, options?: { willRetry?: boolean }): Promise<void> {\n\tif (host.compactionQueuedMessages.length === 0) {\n\t\treturn;\n\t}\n\n\tconst queuedMessages = [...host.compactionQueuedMessages];\n\thost.compactionQueuedMessages = [];\n\thost.updatePendingMessagesDisplay();\n\n\tconst restoreQueue = (error: unknown) => {\n\t\thost.facade.clearQueue();\n\t\thost.compactionQueuedMessages = queuedMessages;\n\t\thost.updatePendingMessagesDisplay();\n\t\thost.showError(\n\t\t\tqueuedMessages.length > 1\n\t\t\t\t? t(\"Failed to send queued messages: {error}\", {\n\t\t\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t\t\t})\n\t\t\t\t: t(\"Failed to send queued message: {error}\", {\n\t\t\t\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t\t\t\t}),\n\t\t);\n\t};\n\n\ttry {\n\t\tif (options?.willRetry) {\n\t\t\t// When retry is pending, queue messages for the retry turn\n\t\t\tfor (const message of queuedMessages) {\n\t\t\t\tif (message.mode === \"followUp\") {\n\t\t\t\t\tawait host.facade.followUp(message.text);\n\t\t\t\t} else {\n\t\t\t\t\tawait host.facade.steer(message.text);\n\t\t\t\t}\n\t\t\t}\n\t\t\thost.updatePendingMessagesDisplay();\n\t\t\treturn;\n\t\t}\n\n\t\tconst [firstPrompt, ...rest] = queuedMessages;\n\n\t\t// Start a prompt when idle, or queue it into a run still finishing compaction.\n\t\tconst promptPromise = host.facade\n\t\t\t.prompt(firstPrompt.text, { streamingBehavior: firstPrompt.mode })\n\t\t\t.catch((error) => {\n\t\t\t\trestoreQueue(error);\n\t\t\t});\n\n\t\t// Queue remaining messages\n\t\tfor (const message of rest) {\n\t\t\tif (message.mode === \"followUp\") {\n\t\t\t\tawait host.facade.followUp(message.text);\n\t\t\t} else {\n\t\t\t\tawait host.facade.steer(message.text);\n\t\t\t}\n\t\t}\n\t\thost.updatePendingMessagesDisplay();\n\t\tvoid promptPromise;\n\t} catch (error) {\n\t\trestoreQueue(error);\n\t}\n}\n"]}
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * Selectors for interactive mode (S5 slice 5): the suite, thinking, model,
3
- * scoped-models, user-message fork, and clone selectors.
3
+ * scoped-models, user-message fork, and clone selectors. The 拆分 slice 2
4
+ * (docs/plans/interactive-mode拆分计划.md) moved the settings selector, the
5
+ * workflow/agents views, the tree/session selectors, session resume, and the
6
+ * startup-suite recovery selector into this module as well.
4
7
  *
5
8
  * InteractiveMode implements SelectorsHost and keeps same-name delegate
6
9
  * methods so prototype-level tests and the command dispatch table keep
@@ -8,19 +11,31 @@
8
11
  * mount every overlay through the host's selector surface (host.showSelector),
9
12
  * mirroring the AuthUiHost pattern in ./interactive-auth.ts. Model snapshot,
10
13
  * catalog-refresh, and facade access go through narrow host accessors (D-048:
11
- * facade projections) so this module never reads session internals directly.
14
+ * facade projections) so this module never reads session internals directly;
15
+ * the one session touchpoint (transport application) goes through the
16
+ * curated AgentSessionHostSurface (host.session.host.setTransport).
12
17
  *
13
18
  * Internal collaboration interface (same pattern as AuthUiHost): not a plugin
14
19
  * API and not exported from the package root.
15
20
  */
16
21
  import type { ThinkingLevel } from "@agent-forge/agent-core";
17
22
  import type { Api, Model } from "@agent-forge/ai/compat";
18
- import type { Component, EditorComponent, TUI } from "@agent-forge/tui";
23
+ import type { Component, EditorComponent, TUI, TuiMainScreen } from "@agent-forge/tui";
24
+ import { Container, TuiAltScreen } from "@agent-forge/tui";
25
+ import type { AgentSession } from "../../core/agent-session.ts";
19
26
  import type { ForkableUserMessage } from "../../core/agent-session-projection.ts";
27
+ import type { ReplacedSessionContext } from "../../core/agent-session-runtime.ts";
28
+ import type { InteractionDialogOptions } from "../../core/extensions/index.ts";
20
29
  import type { CodingAgentFacadeV1, CodingAgentRuntimeFacadeV1 } from "../../core/facade/index.ts";
21
- import type { SettingsManager } from "../../core/settings-manager.ts";
30
+ import type { KeybindingsManager } from "../../core/keybindings.ts";
31
+ import { MissingSessionCwdError } from "../../core/session-cwd.ts";
32
+ import type { SettingsManager, TuiMode } from "../../core/settings-manager.ts";
33
+ import { type ModelCatalogRuntime } from "../../host/model-catalog-refresh.ts";
34
+ import type { InteractiveThemeController } from "../../theme/theme-controller.ts";
35
+ import { AssistantMessageComponent } from "./components/assistant-message.ts";
36
+ import type { CustomEditor } from "./components/custom-editor.ts";
22
37
  import type { FooterComponent } from "./components/footer.ts";
23
- import { type ModelCatalogRuntime } from "./model-catalog-refresh.ts";
38
+ import { type StatusIndicator } from "./components/status-indicator.ts";
24
39
  /** Mount description accepted by the host's selector surface. */
25
40
  interface SelectorMount {
26
41
  component: Component;
@@ -68,6 +83,48 @@ export interface SelectorsHost {
68
83
  provider: string;
69
84
  id: string;
70
85
  }): void;
86
+ /** Live session; only its curated AgentSessionHostSurface (setTransport) is consumed here. */
87
+ readonly session: AgentSession;
88
+ /** Default editor instance (distinct from `editor` while overlays are mounted). */
89
+ defaultEditor: CustomEditor;
90
+ chatContainer: Container;
91
+ statusContainer: Container;
92
+ /** Active status indicator; TUI-mode and clear-on-shrink callbacks branch on it. */
93
+ activeStatusIndicator: StatusIndicator | undefined;
94
+ /** Streaming assistant message component, present while a response renders. */
95
+ streamingComponent: AssistantMessageComponent | undefined;
96
+ /** Active renderer; fullscreen settings callbacks probe for TuiAltScreen. */
97
+ renderer: TuiMainScreen | TuiAltScreen;
98
+ keybindings: KeybindingsManager;
99
+ themeController: InteractiveThemeController;
100
+ hideThinkingBlock: boolean;
101
+ outputPad: number;
102
+ switchTuiMode(mode: TuiMode, restoreProgress?: boolean, startRenderer?: boolean): boolean;
103
+ applyFullscreenScrollbarSetting(): void;
104
+ updateThinkingBlockVisibility(): void;
105
+ rebuildChatFromMessages(): void;
106
+ renderInitialMessages(): void;
107
+ showStatusIndicator(indicator: StatusIndicator): void;
108
+ clearStatusIndicator(kind?: StatusIndicator["kind"]): void;
109
+ restoreQueuedMessagesToEditor(options?: {
110
+ abort?: boolean;
111
+ cancelAgentTasks?: boolean;
112
+ currentText?: string;
113
+ }): number;
114
+ flushCompactionQueue(options?: {
115
+ willRetry?: boolean;
116
+ }): Promise<void>;
117
+ showDialogSelector(title: string, options: string[], opts?: InteractionDialogOptions): Promise<string | undefined>;
118
+ showDialogEditor(title: string, prefill?: string): Promise<string | undefined>;
119
+ /** Session-suite binding read, cached per path (设计 §10.1). */
120
+ readSessionSuiteId(sessionPath: string): string | undefined;
121
+ /** Cross-suite resume detection; stays on the mode (the startup path calls it too). */
122
+ detectCrossSuiteResume(): void;
123
+ shutdown(options?: {
124
+ fromSignal?: boolean;
125
+ }): Promise<void>;
126
+ handleFatalRuntimeError(title: string, error: unknown): Promise<never>;
127
+ promptForMissingSessionCwd(error: MissingSessionCwdError): Promise<string | undefined>;
71
128
  }
72
129
  export declare function handleSuiteCommand(host: SelectorsHost, suiteId?: string): void;
73
130
  export declare function showSuiteSelector(host: SelectorsHost, availableSuites: readonly string[]): void;
@@ -98,5 +155,38 @@ export declare function showUserMessageSelector(host: SelectorsHost): void;
98
155
  */
99
156
  export declare function showQueueManagerSelector(host: SelectorsHost): void;
100
157
  export declare function handleCloneCommand(host: SelectorsHost): Promise<void>;
158
+ export declare function showSettingsSelector(host: SelectorsHost): void;
159
+ /**
160
+ * Workflow overlay (§9 L2/L3): read-only panorama + transition log from
161
+ * `workflow.state`/`workflow.transition` entries. Actions are forwarded to
162
+ * the editor as reviewable text; the main agent executes them via
163
+ * workflow_advance (rendering and execution stay separated).
164
+ */
165
+ export declare function showWorkflowView(host: SelectorsHost): void;
166
+ /**
167
+ * Subagent session browser (/agents): read-only list + detail of this
168
+ * session's subagent transcripts from the D-060 §3 on-disk store — the same
169
+ * parent-scoped summary source as the subagent_list model tool (only this
170
+ * session's children, newest first). Detail entries load lazily per
171
+ * session; a failed load renders inside the view instead of throwing.
172
+ */
173
+ export declare function showAgentsView(host: SelectorsHost): void;
174
+ export declare function showTreeSelector(host: SelectorsHost, initialSelectedId?: string): void;
175
+ export declare function showSessionSelector(host: SelectorsHost): void;
176
+ export declare function handleResumeSession(host: SelectorsHost, sessionPath: string, options?: {
177
+ withSession?: (ctx: ReplacedSessionContext) => Promise<void>;
178
+ }): Promise<{
179
+ cancelled: boolean;
180
+ }>;
181
+ /**
182
+ * Interactive recovery for an unresolved startup suite id (设计 §9): pick a
183
+ * suite, persist it as the project setting, then rebuild the session with
184
+ * the selected suite via the same /new assembly path. Cancelling keeps the
185
+ * fallback assembly the runtime started with.
186
+ */
187
+ export declare function showStartupSuiteSelector(host: SelectorsHost, pending: {
188
+ requestedId: string;
189
+ available: readonly string[];
190
+ }): Promise<void>;
101
191
  export {};
102
192
  //# sourceMappingURL=interactive-selectors.d.ts.map