@ashx-j/lunr-dev 0.2.13-dev.8.1 → 0.2.16-dev.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/dist/builtin-extensions/ashxj-tui.d.ts +14 -0
  3. package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
  4. package/dist/builtin-extensions/ashxj-tui.js +37 -3
  5. package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
  6. package/dist/builtin-extensions/index.d.ts +1 -15
  7. package/dist/builtin-extensions/index.d.ts.map +1 -1
  8. package/dist/builtin-extensions/index.js +7 -21
  9. package/dist/builtin-extensions/index.js.map +1 -1
  10. package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.d.ts.map +1 -1
  11. package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js +6 -2
  12. package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js.map +1 -1
  13. package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts +4 -0
  14. package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
  15. package/dist/builtin-extensions/pi-lsp-extension/src/index.js +163 -169
  16. package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
  17. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts +46 -0
  18. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts.map +1 -0
  19. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js +109 -0
  20. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js.map +1 -0
  21. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts +7 -0
  22. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts.map +1 -0
  23. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js +211 -0
  24. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js.map +1 -0
  25. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts +0 -5
  26. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
  27. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +0 -202
  28. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js.map +1 -1
  29. package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
  30. package/dist/builtin-extensions/pi-mcp-adapter/index.js +251 -94
  31. package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
  32. package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts +4 -1
  33. package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts.map +1 -1
  34. package/dist/builtin-extensions/pi-mcp-adapter/init.js +10 -3
  35. package/dist/builtin-extensions/pi-mcp-adapter/init.js.map +1 -1
  36. package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.d.ts.map +1 -1
  37. package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js +6 -1
  38. package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js.map +1 -1
  39. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts.map +1 -1
  40. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js +2 -1
  41. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js.map +1 -1
  42. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts +1 -1
  43. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts.map +1 -1
  44. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js +1 -1
  45. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js.map +1 -1
  46. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +1 -1
  47. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  48. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +38 -14
  49. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  50. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.d.ts.map +1 -1
  51. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js +1 -1
  52. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js.map +1 -1
  53. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +1 -1
  54. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
  55. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +1 -1
  56. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
  57. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +1 -1
  58. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
  59. package/dist/builtin-extensions/pi-subagents/src/tui/render.js +2 -1
  60. package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
  61. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts +1 -1
  62. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts.map +1 -1
  63. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js +2 -1
  64. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js.map +1 -1
  65. package/dist/builtin-extensions/pi-web-access/extract.d.ts.map +1 -1
  66. package/dist/builtin-extensions/pi-web-access/extract.js +105 -54
  67. package/dist/builtin-extensions/pi-web-access/extract.js.map +1 -1
  68. package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts +1 -1
  69. package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts.map +1 -1
  70. package/dist/builtin-extensions/pi-web-access/gemini-search.js +82 -65
  71. package/dist/builtin-extensions/pi-web-access/gemini-search.js.map +1 -1
  72. package/dist/builtin-extensions/pi-web-access/github-extract.d.ts.map +1 -1
  73. package/dist/builtin-extensions/pi-web-access/github-extract.js +2 -0
  74. package/dist/builtin-extensions/pi-web-access/github-extract.js.map +1 -1
  75. package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
  76. package/dist/builtin-extensions/pi-web-access/index.js +167 -77
  77. package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
  78. package/dist/builtin-extensions/pi-web-access/lazy.d.ts +18 -0
  79. package/dist/builtin-extensions/pi-web-access/lazy.d.ts.map +1 -0
  80. package/dist/builtin-extensions/pi-web-access/lazy.js +19 -0
  81. package/dist/builtin-extensions/pi-web-access/lazy.js.map +1 -0
  82. package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts +6 -0
  83. package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts.map +1 -0
  84. package/dist/builtin-extensions/pi-web-access/session-cleanup.js +17 -0
  85. package/dist/builtin-extensions/pi-web-access/session-cleanup.js.map +1 -0
  86. package/dist/catalog/publication.json +12 -12
  87. package/dist/cli-runtime.d.ts +3 -0
  88. package/dist/cli-runtime.d.ts.map +1 -0
  89. package/dist/cli-runtime.js +73 -0
  90. package/dist/cli-runtime.js.map +1 -0
  91. package/dist/cli.d.ts.map +1 -1
  92. package/dist/cli.js +14 -53
  93. package/dist/cli.js.map +1 -1
  94. package/dist/config.d.ts +1 -0
  95. package/dist/config.d.ts.map +1 -1
  96. package/dist/config.js +1 -0
  97. package/dist/config.js.map +1 -1
  98. package/dist/core/agent-session.d.ts +3 -0
  99. package/dist/core/agent-session.d.ts.map +1 -1
  100. package/dist/core/agent-session.js +56 -12
  101. package/dist/core/agent-session.js.map +1 -1
  102. package/dist/core/compaction/compaction.d.ts.map +1 -1
  103. package/dist/core/compaction/compaction.js +10 -5
  104. package/dist/core/compaction/compaction.js.map +1 -1
  105. package/dist/core/extensions/host-static.d.ts.map +1 -1
  106. package/dist/core/extensions/host-static.js +34 -12
  107. package/dist/core/extensions/host-static.js.map +1 -1
  108. package/dist/core/extensions/loader.d.ts +1 -2
  109. package/dist/core/extensions/loader.d.ts.map +1 -1
  110. package/dist/core/extensions/loader.js +10 -64
  111. package/dist/core/extensions/loader.js.map +1 -1
  112. package/dist/core/extensions/types.d.ts +2 -2
  113. package/dist/core/extensions/types.d.ts.map +1 -1
  114. package/dist/core/extensions/types.js.map +1 -1
  115. package/dist/core/footer-data-provider.d.ts.map +1 -1
  116. package/dist/core/footer-data-provider.js +2 -0
  117. package/dist/core/footer-data-provider.js.map +1 -1
  118. package/dist/core/permissions.d.ts +0 -2
  119. package/dist/core/permissions.d.ts.map +1 -1
  120. package/dist/core/permissions.js +10 -18
  121. package/dist/core/permissions.js.map +1 -1
  122. package/dist/core/sdk.d.ts +1 -1
  123. package/dist/core/sdk.d.ts.map +1 -1
  124. package/dist/core/sdk.js +1 -1
  125. package/dist/core/sdk.js.map +1 -1
  126. package/dist/core/slash-commands.d.ts.map +1 -1
  127. package/dist/core/slash-commands.js +0 -1
  128. package/dist/core/slash-commands.js.map +1 -1
  129. package/dist/core/timings.d.ts +2 -1
  130. package/dist/core/timings.d.ts.map +1 -1
  131. package/dist/core/timings.js +17 -2
  132. package/dist/core/timings.js.map +1 -1
  133. package/dist/gateway/commands.d.ts +1 -1
  134. package/dist/gateway/commands.d.ts.map +1 -1
  135. package/dist/gateway/commands.js +1 -18
  136. package/dist/gateway/commands.js.map +1 -1
  137. package/dist/main.d.ts +2 -2
  138. package/dist/main.d.ts.map +1 -1
  139. package/dist/main.js +57 -48
  140. package/dist/main.js.map +1 -1
  141. package/dist/modes/interactive/interactive-mode.d.ts +12 -21
  142. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  143. package/dist/modes/interactive/interactive-mode.js +120 -144
  144. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  145. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  146. package/dist/modes/interactive/theme/theme.js +95 -84
  147. package/dist/modes/interactive/theme/theme.js.map +1 -1
  148. package/dist/node-runtime/agent-session-services-IFJMSX7Z.js +36 -0
  149. package/dist/node-runtime/benchmark-request-UC7PD3V3.js +57 -0
  150. package/dist/node-runtime/brave-UWDA3I22.js +143 -0
  151. package/dist/node-runtime/builtin-extensions-LYZ3BFWQ.js +28 -0
  152. package/dist/node-runtime/chunk-2QKLKMKC.js +173 -0
  153. package/dist/node-runtime/chunk-3GHXVUAK.js +21 -0
  154. package/dist/node-runtime/chunk-3RCWXWAY.js +466 -0
  155. package/dist/node-runtime/chunk-3WFAEVKS.js +115 -0
  156. package/dist/node-runtime/chunk-3X3KZKMI.js +49 -0
  157. package/dist/node-runtime/chunk-4HXHDDCF.js +16 -0
  158. package/dist/node-runtime/chunk-4TLO4PO2.js +3427 -0
  159. package/dist/node-runtime/chunk-4ZWGEEAS.js +69 -0
  160. package/dist/node-runtime/chunk-53YJI7JU.js +137 -0
  161. package/dist/node-runtime/chunk-5P7PZMRU.js +610 -0
  162. package/dist/node-runtime/chunk-7N3YHTYF.js +26 -0
  163. package/dist/node-runtime/chunk-7NBZ5P7I.js +24 -0
  164. package/dist/node-runtime/chunk-A2KQXUJD.js +105 -0
  165. package/dist/node-runtime/chunk-AD6VXAO7.js +342 -0
  166. package/dist/node-runtime/chunk-AHSTJBIB.js +64 -0
  167. package/dist/node-runtime/chunk-AJX357CL.js +20211 -0
  168. package/dist/node-runtime/chunk-ARC4KOTI.js +11178 -0
  169. package/dist/node-runtime/chunk-AUXVGBO4.js +19 -0
  170. package/dist/node-runtime/chunk-AY6CAJSL.js +30 -0
  171. package/dist/node-runtime/chunk-BHO7O6E5.js +296 -0
  172. package/dist/node-runtime/chunk-BI3DHYCN.js +8845 -0
  173. package/dist/node-runtime/chunk-BR7YDUKA.js +109 -0
  174. package/dist/node-runtime/chunk-BRJX2PRC.js +53 -0
  175. package/dist/node-runtime/chunk-C4O2RSQQ.js +37 -0
  176. package/dist/node-runtime/chunk-CCZJ3PYY.js +17 -0
  177. package/dist/node-runtime/chunk-CDFZEWPU.js +8388 -0
  178. package/dist/node-runtime/chunk-CGBXPL3E.js +1171 -0
  179. package/dist/node-runtime/chunk-CJECDQKP.js +19 -0
  180. package/dist/node-runtime/chunk-DAPBPCBP.js +53 -0
  181. package/dist/node-runtime/chunk-DDGMHUOW.js +305 -0
  182. package/dist/node-runtime/chunk-DMMTJQMQ.js +43 -0
  183. package/dist/node-runtime/chunk-DVGWF6A2.js +1180 -0
  184. package/dist/node-runtime/chunk-ECD5L7YI.js +1369 -0
  185. package/dist/node-runtime/chunk-EDBJNRSM.js +46 -0
  186. package/dist/node-runtime/chunk-F4VQFJI2.js +1269 -0
  187. package/dist/node-runtime/chunk-FVDOXRUD.js +96 -0
  188. package/dist/node-runtime/chunk-GZQHMEWL.js +126 -0
  189. package/dist/node-runtime/chunk-H2EOZYMP.js +57 -0
  190. package/dist/node-runtime/chunk-HQCKFM2O.js +56 -0
  191. package/dist/node-runtime/chunk-HYHJIRDW.js +19 -0
  192. package/dist/node-runtime/chunk-I6R76AG7.js +22 -0
  193. package/dist/node-runtime/chunk-IPA627GP.js +296 -0
  194. package/dist/node-runtime/chunk-JHYKXIMM.js +378 -0
  195. package/dist/node-runtime/chunk-KKSIVROT.js +88 -0
  196. package/dist/node-runtime/chunk-LZAW4ZX3.js +633 -0
  197. package/dist/node-runtime/chunk-M3LZLQW2.js +98 -0
  198. package/dist/node-runtime/chunk-MGWCVY6Y.js +47 -0
  199. package/dist/node-runtime/chunk-MJQDX3BA.js +72 -0
  200. package/dist/node-runtime/chunk-MKKH27PH.js +8956 -0
  201. package/dist/node-runtime/chunk-MX3GJNXJ.js +986 -0
  202. package/dist/node-runtime/chunk-N77MY65L.js +966 -0
  203. package/dist/node-runtime/chunk-NUIFPZWX.js +209 -0
  204. package/dist/node-runtime/chunk-OBMWP3I5.js +68 -0
  205. package/dist/node-runtime/chunk-OR4L3IB2.js +42 -0
  206. package/dist/node-runtime/chunk-PBC2Y6GS.js +903 -0
  207. package/dist/node-runtime/chunk-PCGNAY2O.js +1324 -0
  208. package/dist/node-runtime/chunk-PCIGF2XK.js +250 -0
  209. package/dist/node-runtime/chunk-PGAJ5MO5.js +7558 -0
  210. package/dist/node-runtime/chunk-PL6JKXWI.js +3622 -0
  211. package/dist/node-runtime/chunk-PVCDKGR6.js +55 -0
  212. package/dist/node-runtime/chunk-Q4Q6D4IY.js +364 -0
  213. package/dist/node-runtime/chunk-Q5ZU2VRT.js +83 -0
  214. package/dist/node-runtime/chunk-QFWG2RVL.js +5477 -0
  215. package/dist/node-runtime/chunk-QH42CDX3.js +9451 -0
  216. package/dist/node-runtime/chunk-RQ2Q5IYR.js +72 -0
  217. package/dist/node-runtime/chunk-RQ5DNUNG.js +429 -0
  218. package/dist/node-runtime/chunk-RRIZE6QQ.js +17 -0
  219. package/dist/node-runtime/chunk-SN6G4OU6.js +4753 -0
  220. package/dist/node-runtime/chunk-SWSN6HAB.js +53 -0
  221. package/dist/node-runtime/chunk-TQNSPERU.js +949 -0
  222. package/dist/node-runtime/chunk-VRB2IYGG.js +53 -0
  223. package/dist/node-runtime/chunk-VSELYKWU.js +772 -0
  224. package/dist/node-runtime/chunk-W3CVH5RX.js +62 -0
  225. package/dist/node-runtime/chunk-WJVFOIB5.js +24921 -0
  226. package/dist/node-runtime/chunk-WOVTOV5P.js +5653 -0
  227. package/dist/node-runtime/chunk-XBWPBZBN.js +125 -0
  228. package/dist/node-runtime/chunk-XTHQ7XR7.js +509 -0
  229. package/dist/node-runtime/chunk-YF63P5ZT.js +864 -0
  230. package/dist/node-runtime/chunk-YSKSB3BJ.js +295 -0
  231. package/dist/node-runtime/chunk-ZCHMJ34K.js +130 -0
  232. package/dist/node-runtime/chunk-ZKMFUD3Q.js +2834 -0
  233. package/dist/node-runtime/cli-runtime.js +81 -0
  234. package/dist/node-runtime/clipboard-OZ63BBC6.js +12 -0
  235. package/dist/node-runtime/clipboard-image-7QR6GXVA.js +13 -0
  236. package/dist/node-runtime/command-L3LAHDIH.js +13 -0
  237. package/dist/node-runtime/commands-RL5YBW5I.js +291 -0
  238. package/dist/node-runtime/config-FMEOZSWE.js +77 -0
  239. package/dist/node-runtime/curator-server-XCM43VEF.js +3816 -0
  240. package/dist/node-runtime/customize-XEXL2DGQ.js +12 -0
  241. package/dist/node-runtime/direct-tool-executor-JVDXTO7A.js +188 -0
  242. package/dist/node-runtime/exa-LL64QZR2.js +329 -0
  243. package/dist/node-runtime/export-html-KR26FOUZ.js +150 -0
  244. package/dist/node-runtime/extension-input-RV5N6APL.js +14 -0
  245. package/dist/node-runtime/extension-selector-CPD5LWDD.js +14 -0
  246. package/dist/node-runtime/extract-XLQSJN4V.js +17 -0
  247. package/dist/node-runtime/file-sync-HCOP2QVF.js +117 -0
  248. package/dist/node-runtime/gateway-X2TI5X7F.js +2484 -0
  249. package/dist/node-runtime/gemini-api-QE7ANVDZ.js +29 -0
  250. package/dist/node-runtime/gemini-search-U7SUMPQA.js +330 -0
  251. package/dist/node-runtime/gemini-url-context-PXWCBQHK.js +103 -0
  252. package/dist/node-runtime/gemini-web-MM446SEH.js +14 -0
  253. package/dist/node-runtime/github-extract-F64RZOEA.js +619 -0
  254. package/dist/node-runtime/goal-CZQ7FFQJ.js +1831 -0
  255. package/dist/node-runtime/index.js +859 -0
  256. package/dist/node-runtime/init-NJV2T55N.js +28 -0
  257. package/dist/node-runtime/install-cli-TH7IJJQQ.js +308 -0
  258. package/dist/node-runtime/interactive-mode-KOM35YF2.js +56 -0
  259. package/dist/node-runtime/interactive-view-U6OILKF3.js +249 -0
  260. package/dist/node-runtime/lsp-manager-3ASUSO4T.js +1104 -0
  261. package/dist/node-runtime/lunr-cron-YJ5UHYRD.js +268 -0
  262. package/dist/node-runtime/main.js +54 -0
  263. package/dist/node-runtime/mcp-auth-flow-QIXHW6QN.js +32 -0
  264. package/dist/node-runtime/mcp-panel-IIGMXQGP.js +501 -0
  265. package/dist/node-runtime/mcp-setup-panel-FEK7663I.js +355 -0
  266. package/dist/node-runtime/memory-cap-3S4XRLNP.js +20 -0
  267. package/dist/node-runtime/model-tiers-NJLHUEGK.js +20 -0
  268. package/dist/node-runtime/openai-search-B3MSNCQA.js +288 -0
  269. package/dist/node-runtime/package-manager-cli-TZZHJCVI.js +749 -0
  270. package/dist/node-runtime/parallel-AI2MNSCU.js +265 -0
  271. package/dist/node-runtime/parser-manager-TQHWYDH7.js +152 -0
  272. package/dist/node-runtime/pdf-extract-IPE6H4HP.js +57 -0
  273. package/dist/node-runtime/perplexity-QVJW3I35.js +12 -0
  274. package/dist/node-runtime/pi-intercom-EEMBGQID.js +2215 -0
  275. package/dist/node-runtime/pi-mcp-adapter-QFB37AVN.js +422 -0
  276. package/dist/node-runtime/pi-ollama-cloud-4VZRMULP.js +1440 -0
  277. package/dist/node-runtime/pi-prompt-template-model-4QT4LLXF.js +3946 -0
  278. package/dist/node-runtime/pi-subagents-7XJ4H53P.js +6023 -0
  279. package/dist/node-runtime/pi-web-access-DPGAVKOA.js +1864 -0
  280. package/dist/node-runtime/print-mode-VWIRFDAC.js +12 -0
  281. package/dist/node-runtime/proxy-modes-HEEFK4KC.js +685 -0
  282. package/dist/node-runtime/rpc-entry.js +62 -0
  283. package/dist/node-runtime/rpc-mode-SJNSOA4G.js +13 -0
  284. package/dist/node-runtime/runtime-bridges-PPHNBFWL.js +14 -0
  285. package/dist/node-runtime/session-manager-MQNBYACL.js +35 -0
  286. package/dist/node-runtime/session-selector-5AZLJS6U.js +14 -0
  287. package/dist/node-runtime/settings-manager-5LF2VQWC.js +21 -0
  288. package/dist/node-runtime/src-Y7JSCK64.js +2407 -0
  289. package/dist/node-runtime/subagent-executor-5RNDEPIJ.js +8483 -0
  290. package/dist/node-runtime/summary-review-YSMXKITO.js +228 -0
  291. package/dist/node-runtime/tavily-WEZFVFP7.js +154 -0
  292. package/dist/node-runtime/timings-UAD5BEAS.js +16 -0
  293. package/dist/node-runtime/tool-renderer-MV5O452K.js +204 -0
  294. package/dist/node-runtime/update-cli-A253SZ7P.js +73 -0
  295. package/dist/node-runtime/v4-5MNC3H7G.js +424 -0
  296. package/dist/node-runtime/video-extract-OYT5WKS5.js +304 -0
  297. package/dist/node-runtime/workspace-index-6DBXSTJ6.js +163 -0
  298. package/dist/node-runtime/youtube-extract-TQYKGFGS.js +264 -0
  299. package/dist/startup/benchmark-request.d.ts +3 -0
  300. package/dist/startup/benchmark-request.d.ts.map +1 -0
  301. package/dist/startup/benchmark-request.js +65 -0
  302. package/dist/startup/benchmark-request.js.map +1 -0
  303. package/dist/startup/interactive-view.d.ts +55 -0
  304. package/dist/startup/interactive-view.d.ts.map +1 -0
  305. package/dist/startup/interactive-view.js +332 -0
  306. package/dist/startup/interactive-view.js.map +1 -0
  307. package/dist/startup/launch-routing.d.ts.map +1 -1
  308. package/dist/startup/launch-routing.js +9 -10
  309. package/dist/startup/launch-routing.js.map +1 -1
  310. package/dist/startup/startup-milestones.d.ts +1 -1
  311. package/dist/startup/startup-milestones.d.ts.map +1 -1
  312. package/dist/startup/startup-milestones.js +3 -2
  313. package/dist/startup/startup-milestones.js.map +1 -1
  314. package/dist/utils/await-with-abort.d.ts +2 -0
  315. package/dist/utils/await-with-abort.d.ts.map +1 -0
  316. package/dist/utils/await-with-abort.js +19 -0
  317. package/dist/utils/await-with-abort.js.map +1 -0
  318. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  319. package/dist/utils/syntax-highlight.js +10 -4
  320. package/dist/utils/syntax-highlight.js.map +1 -1
  321. package/docs/compaction.md +5 -3
  322. package/docs/development.md +5 -1
  323. package/docs/features.md +0 -1
  324. package/docs/interactive-startup.md +98 -0
  325. package/docs/usage.md +0 -1
  326. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  327. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  328. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  329. package/examples/extensions/gondolin/package-lock.json +2 -2
  330. package/examples/extensions/gondolin/package.json +1 -1
  331. package/examples/extensions/sandbox/package-lock.json +2 -2
  332. package/examples/extensions/sandbox/package.json +1 -1
  333. package/examples/extensions/with-deps/package-lock.json +2 -2
  334. package/examples/extensions/with-deps/package.json +1 -1
  335. package/package.json +20 -20
  336. package/dist/core/swarm.d.ts +0 -23
  337. package/dist/core/swarm.d.ts.map +0 -1
  338. package/dist/core/swarm.js +0 -45
  339. package/dist/core/swarm.js.map +0 -1
@@ -38,7 +38,6 @@ import { getSearchCuratorSetting, setSearchCuratorSetting } from "../../core/sea
38
38
  import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
39
39
  import { SessionManager, sessionEntryToContextMessages } from "../../core/session-manager.js";
40
40
  import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
41
- import { buildSwarmPrompt } from "../../core/swarm.js";
42
41
  import { time } from "../../core/timings.js";
43
42
  import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
44
43
  import { checkForUpdate, markUpdateNotified } from "../../core/update-check.js";
@@ -227,9 +226,6 @@ export class InteractiveMode {
227
226
  stopCatalogRefresh;
228
227
  onInputCallback;
229
228
  pendingUserInputs = [];
230
- startupUserInputs = [];
231
- startedFromShell;
232
- deferredStartupEditorFactory;
233
229
  stagedSubmitImages;
234
230
  fallbackImageAttachments = new Map();
235
231
  activeStatusIndicator = undefined;
@@ -275,8 +271,6 @@ export class InteractiveMode {
275
271
  signalCleanupHandlers = [];
276
272
  // Track if editor is in bash mode (text starts with !)
277
273
  isBashMode = false;
278
- // Track whether a /swarm orchestration turn is in flight (footer status)
279
- swarmMode = false;
280
274
  // lunr: mode in effect before the current plan stretch. Used by approve / `/plan off`
281
275
  // / `/plan <text>` to leave plan. Shift+Tab and `/mode` pick the destination themselves.
282
276
  previousPermissionMode;
@@ -294,6 +288,7 @@ export class InteractiveMode {
294
288
  pendingBashComponents = [];
295
289
  // Auto-compaction state
296
290
  autoCompactionEscapeHandler;
291
+ pendingCompactionRender;
297
292
  // Auto-retry state
298
293
  retryEscapeHandler;
299
294
  // Messages queued while compaction is running
@@ -322,8 +317,9 @@ export class InteractiveMode {
322
317
  autoTrustOnReloadCwd;
323
318
  themeController;
324
319
  deferredBuiltinsAttached = false;
320
+ startupReadyPromise;
321
+ startupFeatureError;
325
322
  deferredBuiltinAttachPromise;
326
- promptBarrierPromise;
327
323
  // Convenience accessors
328
324
  get session() {
329
325
  return this.runtimeHost.session;
@@ -363,9 +359,7 @@ export class InteractiveMode {
363
359
  this.syncPermissionModeEffects(this.settingsManager.getDefaultPermissionMode());
364
360
  });
365
361
  this.version = VERSION;
366
- const startupShell = options.startupShellBinding;
367
- this.startedFromShell = startupShell !== undefined;
368
- this.ui = startupShell?.ui ?? new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
362
+ this.ui = options.startupView?.ui ?? new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
369
363
  this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
370
364
  // lunr: register the permission-mode footer bridge (provider-side: InteractiveMode owns the state).
371
365
  registerPermissionModeBridge(() => getPermissionMode());
@@ -376,25 +370,29 @@ export class InteractiveMode {
376
370
  // lunr: reset permission mode to configured default on startup.
377
371
  resetPermissions(this.settingsManager.getDefaultPermissionMode());
378
372
  this.headerContainer = new Container();
373
+ if (options.startupView) {
374
+ this.headerContainer.addChild(new Spacer(1));
375
+ this.headerContainer.addChild(options.startupView.header);
376
+ this.customFooter = options.startupView.footer;
377
+ }
379
378
  this.loadedResourcesContainer = new Container();
380
379
  this.chatContainer = new Container();
381
380
  this.pendingMessagesContainer = new Container();
382
- this.statusContainer = new Container();
381
+ this.statusContainer = options.startupView?.statusContainer ?? new Container();
383
382
  this.widgetContainerAbove = new Container();
384
383
  this.widgetContainerBelow = new Container();
385
- this.keybindings = startupShell?.keybindings ?? KeybindingsManager.create();
384
+ this.keybindings = options.startupView?.keybindings ?? KeybindingsManager.create();
386
385
  setKeybindings(this.keybindings);
387
386
  const editorPaddingX = this.settingsManager.getEditorPaddingX();
388
387
  const autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();
389
388
  this.defaultEditor =
390
- startupShell?.editor ??
389
+ options.startupView?.editor ??
391
390
  new CustomEditor(this.ui, getEditorTheme(), this.keybindings, {
392
391
  paddingX: editorPaddingX,
393
392
  autocompleteMaxVisible,
394
393
  });
395
- this.defaultEditor.setPaddingX(editorPaddingX);
396
- this.defaultEditor.setAutocompleteMaxVisible(autocompleteMaxVisible);
397
394
  this.editor = this.defaultEditor;
395
+ options.startupView?.setCurrentEditor(() => this.editor);
398
396
  this.editorContainer = new Container();
399
397
  this.editorContainer.addChild(this.editor);
400
398
  this.footerDataProvider = new FooterDataProvider(this.sessionManager.getCwd());
@@ -556,14 +554,11 @@ export class InteractiveMode {
556
554
  if (this.isInitialized)
557
555
  return;
558
556
  this.registerSignalHandlers();
559
- const startupBenchmark = process.env.PI_STARTUP_BENCHMARK === "1";
560
557
  this.fdPath = getToolPath("fd") ?? undefined;
561
- const toolMaintenance = startupBenchmark
562
- ? Promise.resolve()
563
- : startInteractiveToolInstalls(this.fdPath, (fdPath) => {
564
- this.fdPath = fdPath;
565
- this.setupAutocompleteProvider();
566
- });
558
+ void startInteractiveToolInstalls(this.fdPath, (fdPath) => {
559
+ this.fdPath = fdPath;
560
+ this.setupAutocompleteProvider();
561
+ });
567
562
  time("ensureTools");
568
563
  if (this.session.scopedModels.length > 0 && (this.options.verbose || !this.settingsManager.getQuietStartup())) {
569
564
  const modelList = this.session.scopedModels
@@ -578,7 +573,7 @@ export class InteractiveMode {
578
573
  : "";
579
574
  console.log(theme.fg("dim", `Model scope: ${modelList}${cycleHint}`));
580
575
  }
581
- if (this.startedFromShell) {
576
+ if (this.options.startupView) {
582
577
  this.ui.pinFrom(null);
583
578
  this.ui.clear();
584
579
  }
@@ -593,28 +588,20 @@ export class InteractiveMode {
593
588
  this.ui.addChild(this.widgetContainerAbove);
594
589
  this.ui.addChild(this.editorContainer);
595
590
  this.ui.addChild(this.widgetContainerBelow);
596
- this.ui.addChild(this.footer);
591
+ this.ui.addChild(this.customFooter ?? this.footer);
597
592
  this.ui.setFocus(this.editor);
598
- this.setupKeyHandlers();
599
- const startupSubmissions = this.options.startupShellBinding?.pendingSubmissions.splice(0) ?? [];
600
- this.startupUserInputs.push(...startupSubmissions.map(async ({ text, attachments }) => ({
601
- text,
602
- images: await this.loadImageAttachments(attachments),
603
- })));
604
- this.setupEditorSubmitHandler();
605
593
  this.ui.pinFrom(this.widgetContainerAbove);
594
+ this.setupKeyHandlers();
595
+ if (!this.options.startupView)
596
+ this.setupEditorSubmitHandler();
606
597
  this.ui.setAlternateScreen(true);
607
- if (this.startedFromShell) {
608
- this.ui.requestRender(true);
609
- }
610
- else {
598
+ // Start the UI before initializing extensions so session_start handlers can use interactive dialogs
599
+ if (!this.options.startupView)
611
600
  this.ui.start();
612
- }
613
601
  this.isInitialized = true;
614
602
  time("ui.start");
615
- const updateMaintenance = startupBenchmark ? Promise.resolve() : this.maybeNotifyCliUpdate();
616
- if (!startupBenchmark)
617
- this.startPlanUsagePolling();
603
+ void this.maybeNotifyCliUpdate();
604
+ this.startPlanUsagePolling();
618
605
  // lunr: register the permission approval dialog handler so manual mode can prompt.
619
606
  registerApprovalHandler(async (req) => {
620
607
  if (req.kind === "large-subagent-launch") {
@@ -638,6 +625,7 @@ export class InteractiveMode {
638
625
  setRollbackWarningHandler((msg) => this.showStatus(msg));
639
626
  this.syncPermissionModeEffects(this.settingsManager.getDefaultPermissionMode());
640
627
  await this.themeController.applyFromSettings();
628
+ this.headerContainer.clear();
641
629
  // Add boot screen header (unless silenced)
642
630
  if (this.options.verbose || !this.settingsManager.getQuietStartup()) {
643
631
  const header = theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
@@ -657,21 +645,32 @@ export class InteractiveMode {
657
645
  await this.rebindCurrentSession();
658
646
  time("rebindCurrentSession");
659
647
  this.renderInitialMessages();
660
- for (const diagnostic of this.options.startupDiagnostics ?? []) {
661
- if (diagnostic.type === "warning")
662
- this.showWarning(diagnostic.message);
663
- else
664
- this.showStatus(diagnostic.message);
665
- }
648
+ this.ui.requestRender();
649
+ for (const diagnostic of this.options.startupDiagnostics ?? [])
650
+ this.showStatus(diagnostic.message);
666
651
  for (const warning of this.options.deprecationWarnings ?? [])
667
652
  this.showWarning(warning);
668
653
  this.deferredBuiltinAttachPromise = this.attachDeferredBuiltinExtensions();
669
- this.promptBarrierPromise = this.deferredBuiltinAttachPromise.then(() => {
670
- time("attachDeferredBuiltins");
671
- markStartupMilestone("prompt_barrier_open");
672
- }, () => {
654
+ this.startupReadyPromise = this.deferredBuiltinAttachPromise.then(() => {
655
+ if (!this.isInitialized)
656
+ return;
657
+ if (this.startupFeatureError)
658
+ throw this.startupFeatureError;
659
+ if (this.options.startupView) {
660
+ this.setupEditorSubmitHandler();
661
+ // Extensions can replace the editor. Wire its submit callback after readiness as well.
662
+ this.editor.onSubmit = this.defaultEditor.onSubmit;
663
+ this.options.startupView.activate();
664
+ }
673
665
  time("attachDeferredBuiltins");
674
666
  markStartupMilestone("prompt_barrier_open");
667
+ void this.options.deferredMaintenance?.();
668
+ });
669
+ void this.startupReadyPromise.catch((error) => {
670
+ if (this.options.startupView)
671
+ this.options.startupView.showError(error);
672
+ else
673
+ this.showError(String(error));
675
674
  });
676
675
  // Set up theme file watcher
677
676
  onThemeChange(() => {
@@ -681,47 +680,40 @@ export class InteractiveMode {
681
680
  });
682
681
  // Set up git branch watcher (uses provider instead of footer)
683
682
  this.footerDataProvider.onBranchChange(() => {
684
- this.ui.requestPaint();
683
+ this.ui.requestRender();
685
684
  });
686
- const providerMaintenance = startupBenchmark
687
- ? Promise.resolve()
688
- : this.updateAvailableProviderCount().then(() => {
689
- time("updateAvailableProviderCount");
690
- });
691
- const callerMaintenance = startupBenchmark
692
- ? Promise.resolve()
693
- : this.waitForPromptBarrier().then(() => this.options.deferredMaintenance?.());
694
- if (!startupBenchmark)
695
- void this.waitForPromptBarrier().then(() => {
696
- if (!this.isInitialized)
697
- return;
698
- this.stopCatalogRefresh = startCatalogRefreshPolling({
699
- refresh: (signal) => this.session.modelRuntime.refreshIfStale({ signal }),
700
- isBusy: () => this.session.isStreaming,
701
- onUpdate: () => {
702
- this.session.refreshModelFromRegistry();
703
- this.footer.invalidate();
704
- },
705
- });
685
+ // Cache-only footer snapshot. Do not hold time-to-type on it.
686
+ void this.updateAvailableProviderCount().then(() => {
687
+ time("updateAvailableProviderCount");
688
+ });
689
+ void this.waitForDeferredBuiltins().then(() => {
690
+ if (!this.isInitialized)
691
+ return;
692
+ this.stopCatalogRefresh = startCatalogRefreshPolling({
693
+ refresh: (signal) => this.session.modelRuntime.refreshIfStale({ signal }),
694
+ isBusy: () => this.session.isStreaming,
695
+ onUpdate: () => {
696
+ this.session.refreshModelFromRegistry();
697
+ this.footer.invalidate();
698
+ },
706
699
  });
707
- void Promise.allSettled([toolMaintenance, updateMaintenance, providerMaintenance, callerMaintenance]).then(() => {
708
- markStartupMilestone("deferred_maintenance_idle");
709
700
  });
710
701
  }
702
+ async waitForStartupReady() {
703
+ await this.startupReadyPromise;
704
+ }
705
+ /** Wait until deferred builtins have attached (or were skipped). */
711
706
  async waitForDeferredBuiltins() {
712
- if (this.deferredBuiltinAttachPromise)
707
+ if (this.deferredBuiltinAttachPromise) {
713
708
  await this.deferredBuiltinAttachPromise;
714
- }
715
- async waitForPromptBarrier() {
716
- if (this.promptBarrierPromise)
717
- await this.promptBarrierPromise;
709
+ }
718
710
  }
719
711
  planUsageTimer;
720
712
  startPlanUsagePolling() {
721
713
  const bridge = getUsageServiceBridge();
722
714
  if (!bridge)
723
715
  return;
724
- bridge.setOnUpdate(() => this.ui.requestPaint());
716
+ bridge.setOnUpdate(() => this.ui.requestRender());
725
717
  const tick = () => {
726
718
  const provider = this.session.model?.provider;
727
719
  if (provider)
@@ -769,6 +761,7 @@ export class InteractiveMode {
769
761
  if (!this.isInitialized) {
770
762
  await this.init();
771
763
  }
764
+ await this.waitForStartupReady();
772
765
  // Check tmux keyboard setup asynchronously
773
766
  this.checkTmuxKeyboardSetup().then((warning) => {
774
767
  if (warning) {
@@ -1307,7 +1300,7 @@ export class InteractiveMode {
1307
1300
  * Initialize the extension system with TUI-based UI context.
1308
1301
  */
1309
1302
  async awaitDeferredBuiltinsForPrompt() {
1310
- await this.waitForPromptBarrier();
1303
+ await this.waitForDeferredBuiltins();
1311
1304
  }
1312
1305
  async promptAfterDeferredBuiltins(text, options) {
1313
1306
  await this.awaitDeferredBuiltinsForPrompt();
@@ -1323,24 +1316,24 @@ export class InteractiveMode {
1323
1316
  }
1324
1317
  this.setExtensionStatus("deferred-builtins", "loading tools…");
1325
1318
  try {
1326
- const { extensions, failures } = await this.options.deferredBuiltinFactories();
1327
- if (extensions.length > 0) {
1328
- this.options.onDeferredBuiltinsAttached?.(extensions);
1329
- await this.session.attachInlineExtensions(extensions);
1330
- this.setupAutocompleteProvider();
1331
- this.setupExtensionShortcuts(this.session.extensionRunner);
1332
- this.showLoadedResources({ force: false, showDiagnosticsWhenQuiet: true });
1333
- }
1334
- if (failures.length > 0) {
1335
- this.showError(`Failed to load deferred extensions: ${failures.map(({ name }) => name).join(", ")}`);
1336
- }
1319
+ const factories = await this.options.deferredBuiltinFactories();
1320
+ this.deferredBuiltinsAttached = true;
1321
+ if (factories.length === 0)
1322
+ return;
1323
+ this.options.onDeferredBuiltinsAttached?.(factories);
1324
+ await this.session.attachInlineExtensions(factories);
1325
+ this.setupAutocompleteProvider();
1326
+ this.setupExtensionShortcuts(this.session.extensionRunner);
1327
+ this.showLoadedResources({ force: false, showDiagnosticsWhenQuiet: true });
1337
1328
  }
1338
1329
  catch (error) {
1330
+ this.deferredBuiltinsAttached = false;
1339
1331
  const message = error instanceof Error ? error.message : String(error);
1332
+ if (this.options.startupView)
1333
+ this.startupFeatureError = new Error(message);
1340
1334
  this.showError(`Failed to load deferred extensions: ${message}`);
1341
1335
  }
1342
1336
  finally {
1343
- this.deferredBuiltinsAttached = true;
1344
1337
  this.setExtensionStatus("deferred-builtins", undefined);
1345
1338
  }
1346
1339
  }
@@ -1490,6 +1483,7 @@ export class InteractiveMode {
1490
1483
  this.chatContainer.clear();
1491
1484
  this.pendingMessagesContainer.clear();
1492
1485
  this.compactionQueuedMessages = [];
1486
+ this.pendingCompactionRender = undefined;
1493
1487
  this.stopSmoothStreaming();
1494
1488
  this.streamingComponent = undefined;
1495
1489
  this.streamingMessage = undefined;
@@ -1996,12 +1990,9 @@ export class InteractiveMode {
1996
1990
  */
1997
1991
  setCustomEditorComponent(factory) {
1998
1992
  this.editorComponentFactory = factory;
1993
+ // Save text from current editor before switching
1999
1994
  const currentText = this.editor.getText();
2000
- if (this.startedFromShell && factory && currentText.length > 0) {
2001
- this.deferredStartupEditorFactory = factory;
2002
- return;
2003
- }
2004
- this.deferredStartupEditorFactory = undefined;
1995
+ const startupImages = this.options.startupView ? this.editor.getPendingImages?.() : undefined;
2005
1996
  this.editorContainer.clear();
2006
1997
  if (factory) {
2007
1998
  // Create the custom editor with tui, theme, and keybindings
@@ -2010,7 +2001,16 @@ export class InteractiveMode {
2010
2001
  newEditor.onSubmit = this.defaultEditor.onSubmit;
2011
2002
  newEditor.onChange = this.defaultEditor.onChange;
2012
2003
  // Copy text from previous editor
2013
- newEditor.setText(currentText);
2004
+ if (newEditor !== this.editor) {
2005
+ newEditor.setText(currentText);
2006
+ if (startupImages?.length) {
2007
+ if (newEditor.restoreImageMarkers)
2008
+ newEditor.restoreImageMarkers(startupImages);
2009
+ else
2010
+ for (const image of startupImages)
2011
+ this.fallbackImageAttachments.set(image.id, image);
2012
+ }
2013
+ }
2014
2014
  // Copy appearance settings if supported
2015
2015
  if (newEditor.borderColor !== undefined) {
2016
2016
  newEditor.borderColor = this.defaultEditor.borderColor;
@@ -2025,7 +2025,9 @@ export class InteractiveMode {
2025
2025
  // If extending CustomEditor, copy app-level handlers
2026
2026
  // Use duck typing since instanceof fails across jiti module boundaries
2027
2027
  const customEditor = newEditor;
2028
- if ("actionHandlers" in customEditor && customEditor.actionHandlers instanceof Map) {
2028
+ if (newEditor !== this.defaultEditor &&
2029
+ "actionHandlers" in customEditor &&
2030
+ customEditor.actionHandlers instanceof Map) {
2029
2031
  if (!customEditor.onEscape) {
2030
2032
  customEditor.onEscape = () => this.defaultEditor.onEscape?.();
2031
2033
  }
@@ -2044,20 +2046,14 @@ export class InteractiveMode {
2044
2046
  }
2045
2047
  else {
2046
2048
  // Restore default editor with text from custom editor
2047
- this.defaultEditor.setText(currentText);
2049
+ if (this.editor !== this.defaultEditor)
2050
+ this.defaultEditor.setText(currentText);
2048
2051
  this.editor = this.defaultEditor;
2049
2052
  }
2050
2053
  this.editorContainer.addChild(this.editor);
2051
2054
  this.ui.setFocus(this.editor);
2052
2055
  this.ui.requestRender();
2053
2056
  }
2054
- activateDeferredStartupEditor() {
2055
- const factory = this.deferredStartupEditorFactory;
2056
- if (!factory || this.editor.getText().length > 0)
2057
- return;
2058
- this.deferredStartupEditorFactory = undefined;
2059
- this.setCustomEditorComponent(factory);
2060
- }
2061
2057
  /**
2062
2058
  * Show a notification for extensions.
2063
2059
  */
@@ -2381,7 +2377,6 @@ export class InteractiveMode {
2381
2377
  return;
2382
2378
  }
2383
2379
  const images = this.consumeStagedSubmitImages() ?? (await this.loadImageAttachments(this.takeSubmittedImages(text)));
2384
- this.activateDeferredStartupEditor();
2385
2380
  this.ui.setChatScroll(0);
2386
2381
  // Handle commands
2387
2382
  if (text === "/paste-image") {
@@ -2554,12 +2549,6 @@ export class InteractiveMode {
2554
2549
  await this.handleInitCommand();
2555
2550
  return;
2556
2551
  }
2557
- if (text === "/swarm" || text.startsWith("/swarm ")) {
2558
- const task = text.startsWith("/swarm ") ? text.slice(7).trim() : "";
2559
- this.editor.setText("");
2560
- await this.handleSwarmCommand(task);
2561
- return;
2562
- }
2563
2552
  if (text === "/debug") {
2564
2553
  this.handleDebugCommand();
2565
2554
  this.editor.setText("");
@@ -2957,16 +2946,17 @@ export class InteractiveMode {
2957
2946
  this.streamingMessage = undefined;
2958
2947
  }
2959
2948
  this.pendingTools.clear();
2960
- if (this.swarmMode) {
2961
- this.swarmMode = false;
2962
- this.setExtensionStatus("swarm", undefined);
2963
- }
2964
2949
  this.maybeAutoNameSession();
2965
2950
  // lunr: capture tree-scope changes at turn boundary (bash side-effects).
2966
2951
  captureTreeChanges(this.sessionManager.getCwd(), this.sessionManager.getSessionId());
2967
2952
  this.ui.requestRender();
2968
2953
  break;
2969
2954
  case "agent_settled":
2955
+ if (this.pendingCompactionRender) {
2956
+ const result = this.pendingCompactionRender;
2957
+ this.pendingCompactionRender = undefined;
2958
+ this.renderCompactionResult(result);
2959
+ }
2970
2960
  await this.checkShutdownRequested();
2971
2961
  break;
2972
2962
  case "compaction_start": {
@@ -3000,10 +2990,12 @@ export class InteractiveMode {
3000
2990
  }
3001
2991
  }
3002
2992
  else if (event.result) {
3003
- this.chatContainer.clear();
3004
- this.rebuildChatFromMessages();
3005
- this.addMessageToChat(createCompactionSummaryMessage(event.result.summary, event.result.tokensBefore, new Date().toISOString()));
3006
- this.footer.invalidate();
2993
+ if (this.session.isIdle) {
2994
+ this.renderCompactionResult(event.result);
2995
+ }
2996
+ else {
2997
+ this.pendingCompactionRender = event.result;
2998
+ }
3007
2999
  }
3008
3000
  else if (event.errorMessage) {
3009
3001
  if (event.reason === "manual") {
@@ -3332,9 +3324,6 @@ export class InteractiveMode {
3332
3324
  this.chatContainer.addChild(new Text(theme.fg("warning", `This project is not trusted. Project ${CONFIG_DIR_NAME} resources and packages are ignored. Use /trust to save a trust decision, then restart pi.`), 1, 0));
3333
3325
  }
3334
3326
  async getUserInput() {
3335
- const startupInput = this.startupUserInputs.shift();
3336
- if (startupInput !== undefined)
3337
- return startupInput;
3338
3327
  const queuedInput = this.pendingUserInputs.shift();
3339
3328
  if (queuedInput !== undefined) {
3340
3329
  return queuedInput;
@@ -3360,7 +3349,6 @@ export class InteractiveMode {
3360
3349
  }
3361
3350
  else {
3362
3351
  this.clearEditor();
3363
- this.activateDeferredStartupEditor();
3364
3352
  this.lastSigintTime = now;
3365
3353
  }
3366
3354
  }
@@ -3861,6 +3849,12 @@ export class InteractiveMode {
3861
3849
  const commandName = spaceIndex === -1 ? text.slice(1) : text.slice(1, spaceIndex);
3862
3850
  return !!extensionRunner.getCommand(commandName);
3863
3851
  }
3852
+ renderCompactionResult(result) {
3853
+ this.chatContainer.clear();
3854
+ this.rebuildChatFromMessages();
3855
+ this.addMessageToChat(createCompactionSummaryMessage(result.summary, result.tokensBefore, new Date().toISOString()));
3856
+ this.footer.invalidate();
3857
+ }
3864
3858
  async flushCompactionQueue(options) {
3865
3859
  if (this.compactionQueuedMessages.length === 0) {
3866
3860
  return;
@@ -5599,24 +5593,6 @@ export class InteractiveMode {
5599
5593
  await this.sendUserMessageAfterDeferredBuiltins(prompt);
5600
5594
  this.showStatus("AGENTS.md is being generated — run /reload when it finishes to load it into context.");
5601
5595
  }
5602
- async handleSwarmCommand(task) {
5603
- if (task.length === 0) {
5604
- if (this.swarmMode) {
5605
- this.showStatus("Swarm mode is active — run /subagents-fleet to monitor the fleet.");
5606
- }
5607
- else {
5608
- this.showStatus("Usage: /swarm <task> — decomposes the task across parallel subagents. Monitor with /subagents-fleet.");
5609
- }
5610
- return;
5611
- }
5612
- if (this.session.isStreaming) {
5613
- this.showWarning("Wait for the current response to finish before running /swarm.");
5614
- return;
5615
- }
5616
- this.swarmMode = true;
5617
- this.setExtensionStatus("swarm", "swarm");
5618
- await this.sendUserMessageAfterDeferredBuiltins(buildSwarmPrompt(task));
5619
- }
5620
5596
  // lunr: /undo and /edit rewind the same session via navigateTree (no fork).
5621
5597
  // /undo leaves the editor alone; /edit pastes the undone user text. /redo
5622
5598
  // pops the previous leaf and navigates back.
@@ -6460,7 +6436,7 @@ export class InteractiveMode {
6460
6436
  this.showSelector((done) => {
6461
6437
  const component = new ProcessesSelectorComponent(() => {
6462
6438
  done();
6463
- }, () => this.ui.requestPaint());
6439
+ });
6464
6440
  return { component, focus: component };
6465
6441
  });
6466
6442
  }