@ashx-j/lunr 0.2.22 → 0.2.24

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 (277) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/README.md +15 -13
  3. package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
  4. package/dist/builtin-extensions/ashxj-tui.js +2 -2
  5. package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
  6. package/dist/builtin-extensions/lunr-browser.d.ts +7 -1
  7. package/dist/builtin-extensions/lunr-browser.d.ts.map +1 -1
  8. package/dist/builtin-extensions/lunr-browser.js +116 -3
  9. package/dist/builtin-extensions/lunr-browser.js.map +1 -1
  10. package/dist/builtin-extensions/lunr-plan-tools.d.ts +7 -7
  11. package/dist/builtin-extensions/lunr-plan-tools.d.ts.map +1 -1
  12. package/dist/builtin-extensions/lunr-plan-tools.js +12 -12
  13. package/dist/builtin-extensions/lunr-plan-tools.js.map +1 -1
  14. package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
  15. package/dist/builtin-extensions/pi-intercom/index.js +2 -0
  16. package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
  17. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
  18. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +1 -0
  19. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js.map +1 -1
  20. package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
  21. package/dist/builtin-extensions/pi-mcp-adapter/index.js +1 -1
  22. package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
  23. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  24. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +1 -1
  25. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  26. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
  27. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +1 -1
  28. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
  29. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -4
  30. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
  31. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +6 -4
  32. package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
  33. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts +2 -0
  34. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts.map +1 -1
  35. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js +6 -3
  36. package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js.map +1 -1
  37. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -1
  38. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js +7 -2
  39. package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
  40. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts +2 -0
  41. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
  42. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +4 -0
  43. package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
  44. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
  45. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +1 -1
  46. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
  47. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts +2 -0
  48. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -1
  49. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js +9 -0
  50. package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
  51. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
  52. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +41 -3
  53. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
  54. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts +1 -0
  55. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
  56. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +5 -1
  57. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
  58. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
  59. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +3 -2
  60. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
  61. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
  62. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +23 -0
  63. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
  64. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +1 -1
  65. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -1
  66. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +1 -1
  67. package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -1
  68. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +2 -0
  69. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
  70. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +17 -15
  71. package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
  72. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
  73. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +3 -1
  74. package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
  75. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -1
  76. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +2 -2
  77. package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -1
  78. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +1 -0
  79. package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
  80. package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
  81. package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts +1 -1
  82. package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts.map +1 -1
  83. package/dist/builtin-extensions/pi-subagents/src/tui/communication.js +3 -2
  84. package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -1
  85. package/dist/core/agent-session.d.ts +20 -1
  86. package/dist/core/agent-session.d.ts.map +1 -1
  87. package/dist/core/agent-session.js +235 -107
  88. package/dist/core/agent-session.js.map +1 -1
  89. package/dist/core/browser/schema.d.ts +1 -1
  90. package/dist/core/browser/schema.d.ts.map +1 -1
  91. package/dist/core/browser/schema.js +1 -1
  92. package/dist/core/browser/schema.js.map +1 -1
  93. package/dist/core/catalog-cache-scope.d.ts.map +1 -1
  94. package/dist/core/catalog-cache-scope.js +3 -1
  95. package/dist/core/catalog-cache-scope.js.map +1 -1
  96. package/dist/core/model-runtime.d.ts.map +1 -1
  97. package/dist/core/model-runtime.js +3 -2
  98. package/dist/core/model-runtime.js.map +1 -1
  99. package/dist/core/permissions.d.ts +16 -23
  100. package/dist/core/permissions.d.ts.map +1 -1
  101. package/dist/core/permissions.js +66 -141
  102. package/dist/core/permissions.js.map +1 -1
  103. package/dist/core/plan-mode.d.ts +10 -12
  104. package/dist/core/plan-mode.d.ts.map +1 -1
  105. package/dist/core/plan-mode.js +16 -18
  106. package/dist/core/plan-mode.js.map +1 -1
  107. package/dist/core/runtime-bridges.d.ts.map +1 -1
  108. package/dist/core/runtime-bridges.js +2 -0
  109. package/dist/core/runtime-bridges.js.map +1 -1
  110. package/dist/core/sdk.d.ts.map +1 -1
  111. package/dist/core/sdk.js +13 -6
  112. package/dist/core/sdk.js.map +1 -1
  113. package/dist/core/session-manager.d.ts.map +1 -1
  114. package/dist/core/session-manager.js +9 -2
  115. package/dist/core/session-manager.js.map +1 -1
  116. package/dist/core/settings-manager.d.ts +13 -1
  117. package/dist/core/settings-manager.d.ts.map +1 -1
  118. package/dist/core/settings-manager.js +49 -1
  119. package/dist/core/settings-manager.js.map +1 -1
  120. package/dist/core/slash-commands.d.ts.map +1 -1
  121. package/dist/core/slash-commands.js +4 -4
  122. package/dist/core/slash-commands.js.map +1 -1
  123. package/dist/core/subagent-permission-inherit.d.ts +6 -10
  124. package/dist/core/subagent-permission-inherit.d.ts.map +1 -1
  125. package/dist/core/subagent-permission-inherit.js +14 -14
  126. package/dist/core/subagent-permission-inherit.js.map +1 -1
  127. package/dist/core/subagent-wait-interruption.d.ts +11 -0
  128. package/dist/core/subagent-wait-interruption.d.ts.map +1 -0
  129. package/dist/core/subagent-wait-interruption.js +19 -0
  130. package/dist/core/subagent-wait-interruption.js.map +1 -0
  131. package/dist/core/system-prompt.d.ts +2 -0
  132. package/dist/core/system-prompt.d.ts.map +1 -1
  133. package/dist/core/system-prompt.js +11 -4
  134. package/dist/core/system-prompt.js.map +1 -1
  135. package/dist/core/tools/render-utils.d.ts +3 -3
  136. package/dist/core/tools/render-utils.d.ts.map +1 -1
  137. package/dist/core/tools/render-utils.js +3 -3
  138. package/dist/core/tools/render-utils.js.map +1 -1
  139. package/dist/gateway/adapters/discord.d.ts.map +1 -1
  140. package/dist/gateway/adapters/discord.js +1 -1
  141. package/dist/gateway/adapters/discord.js.map +1 -1
  142. package/dist/gateway/approval.d.ts +2 -6
  143. package/dist/gateway/approval.d.ts.map +1 -1
  144. package/dist/gateway/approval.js +3 -7
  145. package/dist/gateway/approval.js.map +1 -1
  146. package/dist/gateway/mobile-commands.d.ts.map +1 -1
  147. package/dist/gateway/mobile-commands.js +12 -11
  148. package/dist/gateway/mobile-commands.js.map +1 -1
  149. package/dist/gateway/router.d.ts.map +1 -1
  150. package/dist/gateway/router.js +1 -1
  151. package/dist/gateway/router.js.map +1 -1
  152. package/dist/main.d.ts.map +1 -1
  153. package/dist/main.js +1 -2
  154. package/dist/main.js.map +1 -1
  155. package/dist/modes/interactive/components/assistant-message.d.ts +10 -2
  156. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  157. package/dist/modes/interactive/components/assistant-message.js +29 -5
  158. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  159. package/dist/modes/interactive/components/copyable-text.d.ts +2 -6
  160. package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -1
  161. package/dist/modes/interactive/components/copyable-text.js +26 -35
  162. package/dist/modes/interactive/components/copyable-text.js.map +1 -1
  163. package/dist/modes/interactive/components/settings-selector.d.ts +7 -1
  164. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  165. package/dist/modes/interactive/components/settings-selector.js +36 -3
  166. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  167. package/dist/modes/interactive/components/thinking-tail.d.ts +9 -2
  168. package/dist/modes/interactive/components/thinking-tail.d.ts.map +1 -1
  169. package/dist/modes/interactive/components/thinking-tail.js +43 -1
  170. package/dist/modes/interactive/components/thinking-tail.js.map +1 -1
  171. package/dist/modes/interactive/components/tool-execution.d.ts +5 -3
  172. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  173. package/dist/modes/interactive/components/tool-execution.js +44 -45
  174. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  175. package/dist/modes/interactive/interactive-mode.d.ts +7 -2
  176. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  177. package/dist/modes/interactive/interactive-mode.js +194 -129
  178. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  179. package/dist/modes/interactive/theme/theme.d.ts +1 -0
  180. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  181. package/dist/modes/interactive/theme/theme.js +23 -0
  182. package/dist/modes/interactive/theme/theme.js.map +1 -1
  183. package/dist/node-runtime/{agent-session-services-NQ6GKOIK.js → agent-session-services-IEF7LQWD.js} +12 -13
  184. package/dist/node-runtime/{builtin-extensions-GVC6IFDU.js → builtin-extensions-EBAWTH4M.js} +5 -5
  185. package/dist/node-runtime/{chunk-XLTL257W.js → chunk-2KIPT4HJ.js} +5 -1
  186. package/dist/node-runtime/{chunk-IWOWXRWU.js → chunk-5Q3EHOHI.js} +21 -21
  187. package/dist/node-runtime/{chunk-6B2POMK7.js → chunk-6VYZ5UFP.js} +1 -1
  188. package/dist/node-runtime/{chunk-TQGPP4SC.js → chunk-CDVHZOOK.js} +1 -1
  189. package/dist/node-runtime/{chunk-TDL7UWJ7.js → chunk-DE2JB6J5.js} +189 -70
  190. package/dist/node-runtime/{chunk-YJMMG7C6.js → chunk-DSIKTUPW.js} +1 -1
  191. package/dist/node-runtime/{chunk-IQIEU7SB.js → chunk-F4FLTQKV.js} +2 -2
  192. package/dist/node-runtime/{chunk-GMHJCCEN.js → chunk-FU6OODRZ.js} +4 -1
  193. package/dist/node-runtime/{chunk-5BNJ4JUH.js → chunk-GJ2RDBRL.js} +1 -1
  194. package/dist/node-runtime/{chunk-GNN7H3B7.js → chunk-GS42T6MX.js} +1 -1
  195. package/dist/node-runtime/{chunk-OFKSVRV7.js → chunk-GYIXXQAO.js} +1 -1
  196. package/dist/node-runtime/{chunk-BX2RB477.js → chunk-HFVZUPFJ.js} +1 -1
  197. package/dist/node-runtime/{chunk-PC2Z5TKZ.js → chunk-HMBGROQK.js} +3 -3
  198. package/dist/node-runtime/{chunk-AZJHNQKQ.js → chunk-I54LGHWM.js} +1 -1
  199. package/dist/node-runtime/{chunk-IVXYUAJE.js → chunk-IF24A3FH.js} +1 -1
  200. package/dist/node-runtime/{chunk-VJPTNWAP.js → chunk-IGV54Q5V.js} +3 -3
  201. package/dist/node-runtime/{chunk-QDGKKKUM.js → chunk-K5AGHH57.js} +18 -13
  202. package/dist/node-runtime/{chunk-GS66LV4M.js → chunk-KJ6DWS3K.js} +4 -4
  203. package/dist/node-runtime/{chunk-EQ63ANHL.js → chunk-L3LX4SNR.js} +310 -192
  204. package/dist/node-runtime/{chunk-VSELYKWU.js → chunk-LWYIVUGV.js} +2 -1
  205. package/dist/node-runtime/{chunk-JHYKXIMM.js → chunk-MPKSOJBT.js} +1 -1
  206. package/dist/node-runtime/{chunk-UAFLNHSH.js → chunk-OF7PWMG4.js} +8 -8
  207. package/dist/node-runtime/{chunk-CSUZVNYE.js → chunk-OVX6X377.js} +10 -6
  208. package/dist/node-runtime/{chunk-ORH324EP.js → chunk-PCEW76PM.js} +3 -3
  209. package/dist/node-runtime/{chunk-6427XAWG.js → chunk-QH6YL7VK.js} +3 -3
  210. package/dist/node-runtime/{chunk-LMBNLFXQ.js → chunk-QM43FEAE.js} +15 -15
  211. package/dist/node-runtime/{chunk-7QWNYZDI.js → chunk-RDDAZOMU.js} +16 -0
  212. package/dist/node-runtime/{chunk-WADV2VDS.js → chunk-RORY2HMJ.js} +46 -5
  213. package/dist/node-runtime/{chunk-H3XF4UVQ.js → chunk-RWTKOC3B.js} +1 -1
  214. package/dist/node-runtime/{chunk-V2A7CEXK.js → chunk-WHLRAGUQ.js} +13 -12
  215. package/dist/node-runtime/{chunk-GJSAD4AB.js → chunk-Y73WPE6S.js} +17 -17
  216. package/dist/node-runtime/{chunk-VSSXXL36.js → chunk-YDO2F2IA.js} +2 -2
  217. package/dist/node-runtime/{chunk-BFNXONG3.js → chunk-YVI6L6LU.js} +5 -5
  218. package/dist/node-runtime/{chunk-5D7LC2ZQ.js → chunk-ZXSGTGJ6.js} +54 -85
  219. package/dist/node-runtime/cli-runtime.js +1 -1
  220. package/dist/node-runtime/{command-3JHHXOPX.js → command-7BG7VVTS.js} +3 -3
  221. package/dist/node-runtime/{commands-KAMO2T6P.js → commands-NZLSOHPE.js} +2 -2
  222. package/dist/node-runtime/{commands-2JVNFGMQ.js → commands-QFDKNQTL.js} +9 -9
  223. package/dist/node-runtime/{direct-tool-executor-YAVOLDFY.js → direct-tool-executor-77GW4F5P.js} +3 -3
  224. package/dist/node-runtime/{export-html-KBFVV63J.js → export-html-VM4J2MNR.js} +2 -2
  225. package/dist/node-runtime/{extension-input-K24TVKVW.js → extension-input-E7BJZ35H.js} +4 -4
  226. package/dist/node-runtime/{extension-selector-SPNF7EDR.js → extension-selector-WU42XDTU.js} +4 -4
  227. package/dist/node-runtime/{gateway-VFO6SFKK.js → gateway-TWR3N65G.js} +14 -14
  228. package/dist/node-runtime/index.js +26 -27
  229. package/dist/node-runtime/{init-X2LIUB2H.js → init-HS6NQXSK.js} +2 -2
  230. package/dist/node-runtime/{install-cli-C3CF7O7N.js → install-cli-VAP6KBFN.js} +1 -1
  231. package/dist/node-runtime/{interactive-mode-LOM6AIF6.js → interactive-mode-6J5VZ2TT.js} +19 -20
  232. package/dist/node-runtime/{interactive-view-IDSCPPK7.js → interactive-view-NGFAMHPW.js} +7 -7
  233. package/dist/node-runtime/lunr-browser-J5ZZYVGM.js +174 -0
  234. package/dist/node-runtime/{lunr-cron-BKHGNBKT.js → lunr-cron-CXOL37AL.js} +7 -7
  235. package/dist/node-runtime/main.js +22 -23
  236. package/dist/node-runtime/{mobile-commands-HMP25WBC.js → mobile-commands-VTBM5DSZ.js} +6 -6
  237. package/dist/node-runtime/{model-runtime-PLQKAG4B.js → model-runtime-OO5HFLWE.js} +1 -1
  238. package/dist/node-runtime/{package-manager-cli-VCK4E2RC.js → package-manager-cli-ZLW5DZXF.js} +9 -10
  239. package/dist/node-runtime/{pi-intercom-HBPK5HSJ.js → pi-intercom-QM53RLTS.js} +2 -0
  240. package/dist/node-runtime/{pi-mcp-adapter-E6WULBKF.js → pi-mcp-adapter-5UKBZP44.js} +7 -6
  241. package/dist/node-runtime/{pi-subagents-FEUDLJOE.js → pi-subagents-XPCLLKIM.js} +65 -21
  242. package/dist/node-runtime/{proxy-modes-OSQCWRBI.js → proxy-modes-LGEUYD7R.js} +3 -3
  243. package/dist/node-runtime/rpc-entry.js +22 -23
  244. package/dist/node-runtime/{rpc-mode-P5ODXPEG.js → rpc-mode-O3XV4SID.js} +2 -2
  245. package/dist/node-runtime/{runtime-bridges-3XUQ46XW.js → runtime-bridges-QYXUX2TG.js} +8 -1
  246. package/dist/node-runtime/{session-handoff-HC7R5E24.js → session-handoff-GWARVEWT.js} +2 -2
  247. package/dist/node-runtime/{session-manager-CFN4UFM2.js → session-manager-JB5J6XBN.js} +1 -1
  248. package/dist/node-runtime/{session-selector-LHRMJOKT.js → session-selector-GIM4DHQ2.js} +4 -4
  249. package/dist/node-runtime/{settings-manager-UUZ6NUXI.js → settings-manager-WCQDUVQB.js} +7 -4
  250. package/dist/node-runtime/{setup-NRXVZBLJ.js → setup-YRBKH2LD.js} +2 -2
  251. package/dist/node-runtime/{subagent-executor-MLUMBWCP.js → subagent-executor-OTNISDQU.js} +47 -10
  252. package/dist/node-runtime/{theme-U7IGOA7O.js → theme-UOO5RVFN.js} +1 -1
  253. package/dist/node-runtime/{update-cli-4TP25CNW.js → update-cli-VBR2777K.js} +1 -2
  254. package/dist/startup/interactive-view.d.ts.map +1 -1
  255. package/dist/startup/interactive-view.js +5 -1
  256. package/dist/startup/interactive-view.js.map +1 -1
  257. package/docs/browser.md +1 -1
  258. package/docs/features.md +17 -14
  259. package/docs/index.md +1 -1
  260. package/docs/keybindings.md +1 -1
  261. package/docs/providers.md +6 -2
  262. package/docs/quickstart.md +2 -2
  263. package/docs/settings.md +2 -1
  264. package/docs/usage.md +6 -6
  265. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  266. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  267. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  268. package/examples/extensions/gondolin/package-lock.json +2 -2
  269. package/examples/extensions/gondolin/package.json +1 -1
  270. package/examples/extensions/plan-mode/README.md +1 -1
  271. package/examples/extensions/sandbox/package-lock.json +2 -2
  272. package/examples/extensions/sandbox/package.json +1 -1
  273. package/examples/extensions/with-deps/package-lock.json +2 -2
  274. package/examples/extensions/with-deps/package.json +1 -1
  275. package/package.json +4 -4
  276. package/dist/node-runtime/chunk-LISUTZS3.js +0 -19
  277. package/dist/node-runtime/lunr-browser-YNW7FTYX.js +0 -87
@@ -31,7 +31,7 @@ import { getModelTiersBridge } from "../../core/model-tiers.js";
31
31
  import { registerPermissionModeBridge } from "../../core/permission-mode.js";
32
32
  import { nextModeForGoal, registerPermissionModeControlBridge } from "../../core/permission-mode-control.js";
33
33
  import { AUTO_MODE_ADDENDUM, getPermissionMode, nextPermissionMode, registerApprovalHandler, resetPermissions, restorePermissionModeAfterPlan, setPermissionMode, } from "../../core/permissions.js";
34
- import { PLAN_MODE_ADDENDUM } from "../../core/plan-mode.js";
34
+ import { READ_ONLY_MODE_ADDENDUM } from "../../core/plan-mode.js";
35
35
  import * as processRegistry from "../../core/process-registry.js";
36
36
  import { captureTreeChanges, clearRollback, disableRollbackForSession, enableRollbackForSession, initRollback, isRollbackEnabled, isRollbackSessionForceEnabled, migrateRollbackSession, peekRollbackTurnsConsumed, beginTurn as rollbackBeginTurn, rollbackLastTurn, setRollbackWarningHandler, } from "../../core/rollback.js";
37
37
  import { getSearchCuratorSetting, setSearchCuratorSetting } from "../../core/search-curator.js";
@@ -123,9 +123,9 @@ function isDeadTerminalError(error) {
123
123
  const code = error.code;
124
124
  return code !== undefined && DEAD_TERMINAL_ERROR_CODES.has(code);
125
125
  }
126
- const ANTHROPIC_SUBSCRIPTION_AUTH_WARNING = "Anthropic subscription auth is active. Third-party harness usage draws from extra usage and is billed per token, not your Claude plan limits. Manage extra usage at https://claude.ai/settings/usage.";
126
+ const ANTHROPIC_SUBSCRIPTION_AUTH_WARNING = "Claude Code handles Anthropic subscription authentication. lunR retains tool execution and conversation state. Check your Claude account for usage and any extra charges.";
127
127
  // lunr: pre-connection ToS disclaimer for Anthropic subscription (OAuth) accounts.
128
- const ANTHROPIC_TOS_DISCLAIMER = "Connecting an Anthropic subscription (Claude Pro/Max) account to lunR may violate Anthropic's Terms of Service (https://www.anthropic.com/legal/consumer-terms). Third-party harness usage also draws from paid extra usage, not your plan limits. Continue?";
128
+ const ANTHROPIC_TOS_DISCLAIMER = "Connecting an Anthropic subscription through Claude Code may be subject to Anthropic's Terms of Service (https://www.anthropic.com/legal/consumer-terms). Claude Code authenticates each lunR generation; lunR keeps its own tools and history. Continue?";
129
129
  const INIT_PROMPT = `Analyze this codebase and write a starter AGENTS.md in the project root.
130
130
  Scan: package manifests, directory layout, build/test/lint scripts, CI config,
131
131
  existing README/docs. Include only: project purpose (one paragraph), build &
@@ -257,8 +257,10 @@ export class InteractiveMode {
257
257
  streamingTargetMessage = undefined;
258
258
  streamingDisplayedLength = 0;
259
259
  smoothStreamingTimer = undefined;
260
+ thinkingAnimationTimer;
260
261
  // Tool execution tracking: toolCallId -> component
261
262
  pendingTools = new Map();
263
+ browserActivityComponent;
262
264
  // Tool output expansion state
263
265
  toolOutputExpanded = false;
264
266
  // Thinking block visibility state
@@ -277,8 +279,7 @@ export class InteractiveMode {
277
279
  signalCleanupHandlers = [];
278
280
  // Track if editor is in bash mode (text starts with !)
279
281
  isBashMode = false;
280
- // lunr: mode in effect before the current plan stretch. Used by approve / `/plan off`
281
- // / `/plan <text>` to leave plan. Shift+Tab and `/mode` pick the destination themselves.
282
+ // Restore the previous mode after approving a plan or leaving read-only via /plan.
282
283
  previousPermissionMode;
283
284
  // lunr: mode in effect before `/goal` forced session auto. Dedicated so it cannot
284
285
  // collide with plan restore.
@@ -609,23 +610,22 @@ export class InteractiveMode {
609
610
  time("ui.start");
610
611
  void this.maybeNotifyCliUpdate();
611
612
  this.startPlanUsagePolling();
612
- // lunr: register the permission approval dialog handler so manual mode can prompt.
613
+ // Plans and large subagent launches use distinct approval dialogs.
613
614
  registerApprovalHandler(async (req) => {
614
615
  if (req.kind === "large-subagent-launch") {
615
616
  return this.showLargeSubagentLaunchApprovalDialog(req);
616
617
  }
617
- // lunr: plan approval (present_plan tool). Any approve leaves plan mode —
618
- // restore runs BEFORE resolving so the model's next tool call already
619
- // has full access. Decline keeps plan mode active.
618
+ // Approval restores writing access before the model's next tool call.
620
619
  if (req.kind === "plan") {
621
620
  const resp = await this.showPlanApprovalDialog(req.detail);
622
621
  const decision = typeof resp === "string" ? resp : resp.decision;
623
622
  if (decision !== "reject") {
624
- this.applyPermissionMode(this.restoreTargetAfterPlan());
623
+ const target = this.restoreTargetAfterPlan();
624
+ this.applyPermissionMode(target === "read-only" ? "yolo" : target);
625
625
  }
626
626
  return resp;
627
627
  }
628
- return this.showApprovalDialog(req);
628
+ return "reject";
629
629
  });
630
630
  // lunr: initialize rollback service for this session.
631
631
  initRollback(this.settingsManager, this.sessionManager.getSessionId());
@@ -1386,7 +1386,7 @@ export class InteractiveMode {
1386
1386
  if (result.cancelled) {
1387
1387
  return { cancelled: true };
1388
1388
  }
1389
- this.chatContainer.clear();
1389
+ this.clearChatContainer();
1390
1390
  this.renderInitialMessages();
1391
1391
  if (result.editorText && !this.editor.getText().trim()) {
1392
1392
  this.restoreEditorFromTreeResult(result);
@@ -1505,7 +1505,7 @@ export class InteractiveMode {
1505
1505
  renderCurrentSessionState() {
1506
1506
  this.ui.setChatScroll(0);
1507
1507
  this.loadedResourcesContainer.clear();
1508
- this.chatContainer.clear();
1508
+ this.clearChatContainer();
1509
1509
  this.pendingMessagesContainer.clear();
1510
1510
  this.compactionQueuedMessages = [];
1511
1511
  this.pendingCompactionRender = undefined;
@@ -2457,7 +2457,7 @@ export class InteractiveMode {
2457
2457
  if (text &&
2458
2458
  !this.runtimeHost.isDetached &&
2459
2459
  (!text.startsWith("/") ||
2460
- /^\/(?:model|thinking|effort|reasoning|off|minimal|low|medium|high|xhigh|max|mode|plan|manual|yolo|auto|name|title|undo|edit|redo|tree|compact)(?:\s|$)/.test(text))) {
2460
+ /^\/(?:model|thinking|effort|reasoning|off|minimal|low|medium|high|xhigh|max|mode|plan|read|yolo|auto|name|title|undo|edit|redo|tree|compact)(?:\s|$)/.test(text))) {
2461
2461
  recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
2462
2462
  }
2463
2463
  if (!text) {
@@ -2583,9 +2583,9 @@ export class InteractiveMode {
2583
2583
  this.handleModeCommand(text === "/mode" ? "" : text.slice(6).trim());
2584
2584
  return;
2585
2585
  }
2586
- if (text === "/manual" || text === "/yolo" || text === "/auto") {
2586
+ if (text === "/read" || text === "/yolo" || text === "/auto") {
2587
2587
  this.editor.setText("");
2588
- this.applyPermissionMode(text.slice(1));
2588
+ this.applyPermissionMode(text === "/read" ? "read-only" : text.slice(1));
2589
2589
  return;
2590
2590
  }
2591
2591
  if (text === "/processes") {
@@ -2687,15 +2687,30 @@ export class InteractiveMode {
2687
2687
  }
2688
2688
  return;
2689
2689
  }
2690
- // If streaming, use prompt() with steer behavior
2691
- // This handles extension commands (execute immediately), prompt template expansion, and queueing
2692
- if (this.session.isStreaming) {
2693
- this.editor.addToHistory?.(text);
2694
- this.editor.setText("");
2695
- await this.promptAfterDeferredBuiltins(text, { streamingBehavior: "steer", images });
2696
- this.updatePendingMessagesDisplay();
2697
- this.ui.requestRender();
2698
- return;
2690
+ // While streaming or settling a wait handoff, reserve normal Enter for subagent_wait when possible.
2691
+ // Extension commands keep their existing path.
2692
+ if (this.session.isStreaming || this.session.isWaitPromptHandoffActive) {
2693
+ if (!this.isExtensionCommand(text)) {
2694
+ await this.awaitDeferredBuiltinsForPrompt();
2695
+ const handoff = await this.session.interruptSubagentWaitWithPrompt(text, { images });
2696
+ if (handoff) {
2697
+ this.editor.addToHistory?.(text);
2698
+ this.editor.setText("");
2699
+ void handoff.completion.catch((error) => {
2700
+ this.showError(error instanceof Error ? error.message : String(error));
2701
+ });
2702
+ this.ui.requestRender();
2703
+ return;
2704
+ }
2705
+ }
2706
+ if (this.session.isStreaming) {
2707
+ this.editor.addToHistory?.(text);
2708
+ this.editor.setText("");
2709
+ await this.promptAfterDeferredBuiltins(text, { streamingBehavior: "steer", images });
2710
+ this.updatePendingMessagesDisplay();
2711
+ this.ui.requestRender();
2712
+ return;
2713
+ }
2699
2714
  }
2700
2715
  // Normal message submission
2701
2716
  // First, move any pending bash components to chat
@@ -2714,6 +2729,18 @@ export class InteractiveMode {
2714
2729
  getSmoothStreamingOptions() {
2715
2730
  return { hideThinking: this.hideThinkingBlock };
2716
2731
  }
2732
+ setThinkingAnimation(active) {
2733
+ if (!active) {
2734
+ if (this.thinkingAnimationTimer)
2735
+ clearInterval(this.thinkingAnimationTimer);
2736
+ this.thinkingAnimationTimer = undefined;
2737
+ return;
2738
+ }
2739
+ if (this.thinkingAnimationTimer)
2740
+ return;
2741
+ this.thinkingAnimationTimer = setInterval(() => this.ui.requestRender(), 33);
2742
+ this.thinkingAnimationTimer.unref?.();
2743
+ }
2717
2744
  clearSmoothStreamingTimer() {
2718
2745
  if (this.smoothStreamingTimer) {
2719
2746
  clearInterval(this.smoothStreamingTimer);
@@ -2754,12 +2781,9 @@ export class InteractiveMode {
2754
2781
  if (content.type !== "toolCall" || !revealedIds.has(content.id))
2755
2782
  continue;
2756
2783
  if (!this.pendingTools.has(content.id)) {
2757
- const component = new ToolExecutionComponent(content.name, content.id, content.arguments, {
2758
- showImages: this.settingsManager.getShowImages(),
2759
- imageWidthCells: this.settingsManager.getImageWidthCells(),
2760
- }, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
2761
- component.setExpanded(this.toolOutputExpanded);
2762
- this.addToolComponentToChat(component);
2784
+ const component = content.name === "browser" && this.browserActivityComponent
2785
+ ? this.browserActivityComponent
2786
+ : this.createToolExecutionComponent(content.name, content.id, content.arguments);
2763
2787
  this.pendingTools.set(content.id, component);
2764
2788
  }
2765
2789
  else {
@@ -2794,6 +2818,7 @@ export class InteractiveMode {
2794
2818
  }
2795
2819
  }
2796
2820
  stopSmoothStreaming() {
2821
+ this.setThinkingAnimation(false);
2797
2822
  this.clearSmoothStreamingTimer();
2798
2823
  this.streamingTargetMessage = undefined;
2799
2824
  this.streamingDisplayedLength = 0;
@@ -2833,6 +2858,7 @@ export class InteractiveMode {
2833
2858
  switch (event.type) {
2834
2859
  case "agent_start":
2835
2860
  this.pendingTools.clear();
2861
+ this.browserActivityComponent = undefined;
2836
2862
  if (this.settingsManager.getShowTerminalProgress()) {
2837
2863
  this.ui.terminal.setProgress(true);
2838
2864
  }
@@ -2885,7 +2911,11 @@ export class InteractiveMode {
2885
2911
  this.ui.requestRender();
2886
2912
  }
2887
2913
  else if (event.message.role === "assistant") {
2888
- this.streamingComponent = new AssistantMessageComponent(undefined, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse, { requestRender: () => this.ui.requestRender() });
2914
+ this.streamingComponent = new AssistantMessageComponent(undefined, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse, {
2915
+ requestRender: () => this.ui.requestRender(),
2916
+ reasoningDisplay: this.settingsManager.getReasoningDisplay(),
2917
+ onThinkingAnimationChange: (active) => this.setThinkingAnimation(active),
2918
+ });
2889
2919
  // lunr: collapsible reasoning — fresh timing array for this message.
2890
2920
  this.thinkingRunTimings = [];
2891
2921
  this.streamingComponent.setThinkingTimings(this.thinkingRunTimings);
@@ -2992,14 +3022,12 @@ export class InteractiveMode {
2992
3022
  }
2993
3023
  let component = this.pendingTools.get(event.toolCallId);
2994
3024
  if (!component) {
2995
- component = new ToolExecutionComponent(event.toolName, event.toolCallId, event.args, {
2996
- showImages: this.settingsManager.getShowImages(),
2997
- imageWidthCells: this.settingsManager.getImageWidthCells(),
2998
- }, this.getRegisteredToolDefinition(event.toolName), this.ui, this.sessionManager.getCwd());
2999
- component.setExpanded(this.toolOutputExpanded);
3000
- this.addToolComponentToChat(component);
3025
+ component = this.createToolExecutionComponent(event.toolName, event.toolCallId, event.args);
3001
3026
  this.pendingTools.set(event.toolCallId, component);
3002
3027
  }
3028
+ else if (event.toolName === "browser" && !component.matchesToolCall(event.toolCallId)) {
3029
+ component.beginNextExecution(event.toolCallId, event.args);
3030
+ }
3003
3031
  component.markExecutionStarted();
3004
3032
  this.ui.requestRender();
3005
3033
  break;
@@ -3034,6 +3062,7 @@ export class InteractiveMode {
3034
3062
  this.streamingMessage = undefined;
3035
3063
  }
3036
3064
  this.pendingTools.clear();
3065
+ this.browserActivityComponent = undefined;
3037
3066
  this.maybeAutoNameSession();
3038
3067
  // lunr: capture tree-scope changes at turn boundary (bash side-effects).
3039
3068
  captureTreeChanges(this.sessionManager.getCwd(), this.sessionManager.getSessionId());
@@ -3252,7 +3281,10 @@ export class InteractiveMode {
3252
3281
  break;
3253
3282
  }
3254
3283
  case "assistant": {
3255
- const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse, { requestRender: () => this.ui.requestRender() });
3284
+ const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.thinkingCollapse, {
3285
+ requestRender: () => this.ui.requestRender(),
3286
+ reasoningDisplay: this.settingsManager.getReasoningDisplay(),
3287
+ });
3256
3288
  // lunr: collapsible reasoning — re-attach live timings when this
3257
3289
  // message was streamed in this session (undefined = history).
3258
3290
  assistantComponent.setThinkingTimings(this.thinkingTimingsByMessage.get(message));
@@ -3272,6 +3304,7 @@ export class InteractiveMode {
3272
3304
  }
3273
3305
  renderSessionItems(items, options = {}) {
3274
3306
  this.pendingTools.clear();
3307
+ let browserActivityComponent;
3275
3308
  const renderedPendingTools = new Map();
3276
3309
  // Cache-miss notices are not persisted; re-derive them from the full entry
3277
3310
  // list and re-inject them after the assistant messages that paid for them.
@@ -3294,12 +3327,20 @@ export class InteractiveMode {
3294
3327
  // Render tool call components
3295
3328
  for (const content of message.content) {
3296
3329
  if (content.type === "toolCall") {
3297
- const component = new ToolExecutionComponent(content.name, content.id, content.arguments, {
3298
- showImages: this.settingsManager.getShowImages(),
3299
- imageWidthCells: this.settingsManager.getImageWidthCells(),
3300
- }, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
3301
- component.setExpanded(this.toolOutputExpanded);
3302
- this.addToolComponentToChat(component);
3330
+ let component = content.name === "browser" ? browserActivityComponent : undefined;
3331
+ if (component) {
3332
+ component.beginNextExecution(content.id, content.arguments);
3333
+ }
3334
+ else {
3335
+ component = new ToolExecutionComponent(content.name, content.id, content.arguments, {
3336
+ showImages: this.settingsManager.getShowImages(),
3337
+ imageWidthCells: this.settingsManager.getImageWidthCells(),
3338
+ }, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
3339
+ component.setExpanded(this.toolOutputExpanded);
3340
+ this.addToolComponentToChat(component);
3341
+ if (content.name === "browser")
3342
+ browserActivityComponent = component;
3343
+ }
3303
3344
  if (message.stopReason === "aborted" || message.stopReason === "error") {
3304
3345
  let errorMessage;
3305
3346
  if (message.stopReason === "aborted") {
@@ -3334,6 +3375,8 @@ export class InteractiveMode {
3334
3375
  }
3335
3376
  }
3336
3377
  else {
3378
+ if (message.role === "user")
3379
+ browserActivityComponent = undefined;
3337
3380
  // All other messages use standard rendering
3338
3381
  this.addMessageToChat(message, options);
3339
3382
  }
@@ -3424,7 +3467,7 @@ export class InteractiveMode {
3424
3467
  });
3425
3468
  }
3426
3469
  rebuildChatFromMessages() {
3427
- this.chatContainer.clear();
3470
+ this.clearChatContainer();
3428
3471
  this.renderSessionEntries(this.sessionManager.buildContextEntries());
3429
3472
  }
3430
3473
  // =========================================================================
@@ -3755,6 +3798,32 @@ export class InteractiveMode {
3755
3798
  globalThis[Symbol.for("@lunr/tools-expanded-changed")]?.(expanded);
3756
3799
  this.ui.requestRender();
3757
3800
  }
3801
+ createToolExecutionComponent(toolName, toolCallId, args) {
3802
+ if (toolName === "browser" && this.browserActivityComponent) {
3803
+ this.browserActivityComponent.beginNextExecution(toolCallId, args);
3804
+ return this.browserActivityComponent;
3805
+ }
3806
+ const component = new ToolExecutionComponent(toolName, toolCallId, args, {
3807
+ showImages: this.settingsManager.getShowImages(),
3808
+ imageWidthCells: this.settingsManager.getImageWidthCells(),
3809
+ }, this.getRegisteredToolDefinition(toolName), this.ui, this.sessionManager.getCwd());
3810
+ component.setExpanded(this.toolOutputExpanded);
3811
+ this.addToolComponentToChat(component);
3812
+ if (toolName === "browser")
3813
+ this.browserActivityComponent = component;
3814
+ return component;
3815
+ }
3816
+ disposeChatToolComponents() {
3817
+ for (const child of this.chatContainer.children) {
3818
+ if (child instanceof ToolExecutionComponent)
3819
+ child.dispose();
3820
+ }
3821
+ this.browserActivityComponent = undefined;
3822
+ }
3823
+ clearChatContainer() {
3824
+ this.disposeChatToolComponents();
3825
+ this.chatContainer.clear();
3826
+ }
3758
3827
  // lunr: consecutive same-tool grouping — a tool component appended right after
3759
3828
  // another component for the SAME tool becomes a group continuation (no top
3760
3829
  // spacer / top pad); the previous card drops its bottom pad. Mixed neighbors
@@ -3768,7 +3837,6 @@ export class InteractiveMode {
3768
3837
  this.hideThinkingBlock = !this.hideThinkingBlock;
3769
3838
  this.settingsManager.setHideThinkingBlock(this.hideThinkingBlock);
3770
3839
  // Rebuild chat from session messages
3771
- this.chatContainer.clear();
3772
3840
  this.rebuildChatFromMessages();
3773
3841
  // If streaming, re-add the streaming component with updated visibility and re-render.
3774
3842
  // Re-slice to the current revealed length so hide-thinking does not dump the tail.
@@ -3946,7 +4014,6 @@ export class InteractiveMode {
3946
4014
  return !!extensionRunner.getCommand(commandName);
3947
4015
  }
3948
4016
  renderCompactionResult(result) {
3949
- this.chatContainer.clear();
3950
4017
  this.rebuildChatFromMessages();
3951
4018
  this.addMessageToChat(createCompactionSummaryMessage(result.summary, result.tokensBefore, new Date().toISOString()));
3952
4019
  this.footer.invalidate();
@@ -4072,6 +4139,7 @@ export class InteractiveMode {
4072
4139
  availableThemes: getAvailableThemes(),
4073
4140
  hideThinkingBlock: this.hideThinkingBlock,
4074
4141
  thinkingCollapse: this.thinkingCollapse,
4142
+ reasoningDisplay: this.settingsManager.getReasoningDisplay(),
4075
4143
  cacheRetention: this.settingsManager.getCacheRetention() ?? "short",
4076
4144
  doubleEscapeAction: this.settingsManager.getDoubleEscapeAction(),
4077
4145
  treeFilterMode: this.settingsManager.getTreeFilterMode(),
@@ -4092,6 +4160,8 @@ export class InteractiveMode {
4092
4160
  globalInstructionsPath: getGlobalInstructionsPath(getAgentDir()),
4093
4161
  modelInstructionsPath: getModelInstructionsPath(getAgentDir(), this.session.model?.id ?? "no-model-selected"),
4094
4162
  confirmLargeSubagentLaunches: this.settingsManager.getConfirmLargeSubagentLaunches(),
4163
+ subagentCommunicationEnabled: this.settingsManager.getSubagentCommunicationEnabled(),
4164
+ automaticSubagentDelegation: this.settingsManager.getAutomaticSubagentDelegation(),
4095
4165
  browserEnabled: this.settingsManager.getBrowserEnabled(),
4096
4166
  memoryEnabled: this.settingsManager.getMemoryEnabled(),
4097
4167
  memoryCharCap: this.settingsManager.getMemoryCharCap(),
@@ -4185,7 +4255,6 @@ export class InteractiveMode {
4185
4255
  child.setHideThinkingBlock(hidden);
4186
4256
  }
4187
4257
  }
4188
- this.chatContainer.clear();
4189
4258
  this.rebuildChatFromMessages();
4190
4259
  },
4191
4260
  onThinkingCollapseChange: (collapse) => {
@@ -4196,9 +4265,17 @@ export class InteractiveMode {
4196
4265
  child.setThinkingCollapse(collapse);
4197
4266
  }
4198
4267
  }
4199
- this.chatContainer.clear();
4200
4268
  this.rebuildChatFromMessages();
4201
4269
  },
4270
+ onReasoningDisplayChange: (display) => {
4271
+ this.settingsManager.setReasoningDisplay(display);
4272
+ for (const child of this.chatContainer.children) {
4273
+ if (child instanceof AssistantMessageComponent) {
4274
+ child.setReasoningDisplay(this.settingsManager.getReasoningDisplay());
4275
+ }
4276
+ }
4277
+ this.ui.requestRender();
4278
+ },
4202
4279
  onShowCacheMissNoticesChange: (shown) => {
4203
4280
  this.settingsManager.setShowCacheMissNotices(shown);
4204
4281
  this.rebuildChatFromMessages();
@@ -4294,6 +4371,13 @@ export class InteractiveMode {
4294
4371
  onConfirmLargeSubagentLaunchesChange: (enabled) => {
4295
4372
  this.settingsManager.setConfirmLargeSubagentLaunches(enabled);
4296
4373
  },
4374
+ onSubagentCommunicationChange: (enabled) => {
4375
+ this.settingsManager.setSubagentCommunicationEnabled(enabled);
4376
+ },
4377
+ onAutomaticSubagentDelegationChange: (enabled) => {
4378
+ this.settingsManager.setAutomaticSubagentDelegation(enabled);
4379
+ this.session.refreshToolRegistry();
4380
+ },
4297
4381
  getTierThinkingLevels: (tier) => {
4298
4382
  const model = this.resolveModelReference(this.settingsManager.getTierModel(tier));
4299
4383
  if (model)
@@ -4935,7 +5019,7 @@ export class InteractiveMode {
4935
5019
  return;
4936
5020
  }
4937
5021
  // Update UI
4938
- this.chatContainer.clear();
5022
+ this.clearChatContainer();
4939
5023
  this.renderInitialMessages();
4940
5024
  if (result.editorText && !this.editor.getText().trim()) {
4941
5025
  this.restoreEditorFromTreeResult(result);
@@ -5079,7 +5163,8 @@ export class InteractiveMode {
5079
5163
  // lunr: providers with a multi-key pool list one entry per subscription plus an
5080
5164
  // "all subscriptions" entry, encoding the target as "<providerId>#<subId|all>".
5081
5165
  const options = [];
5082
- for (const { providerId, type } of await this.session.modelRuntime.listCredentials()) {
5166
+ for (const { providerId, type: credentialType } of await this.session.modelRuntime.listCredentials()) {
5167
+ const type = credentialType === "external_claude_code" ? "oauth" : credentialType;
5083
5168
  const name = this.session.modelRuntime.getProvider(providerId)?.name ?? providerId;
5084
5169
  const status = { type, source: "stored credential" };
5085
5170
  if (type === "api_key") {
@@ -5693,6 +5778,32 @@ export class InteractiveMode {
5693
5778
  signal: dialog.signal,
5694
5779
  prompt: (prompt) => this.showAuthPrompt(dialog, prompt),
5695
5780
  notify: (event) => this.notifyAuthDialog(dialog, event),
5781
+ handoff: async (command, args, env) => {
5782
+ this.ui.stop();
5783
+ try {
5784
+ await new Promise((resolve, reject) => {
5785
+ const child = spawn(command, [...args], { stdio: "inherit", env, windowsHide: false });
5786
+ const abort = () => child.kill();
5787
+ dialog.signal.addEventListener("abort", abort, { once: true });
5788
+ if (dialog.signal.aborted)
5789
+ abort();
5790
+ child.once("error", (error) => {
5791
+ dialog.signal.removeEventListener("abort", abort);
5792
+ reject(error);
5793
+ });
5794
+ child.once("close", (code) => {
5795
+ dialog.signal.removeEventListener("abort", abort);
5796
+ if (code === 0)
5797
+ resolve();
5798
+ else
5799
+ reject(new Error("Claude Code login did not complete"));
5800
+ });
5801
+ });
5802
+ }
5803
+ finally {
5804
+ this.ui.start();
5805
+ }
5806
+ },
5696
5807
  });
5697
5808
  }
5698
5809
  async showLoginDialog(providerId, providerName) {
@@ -5795,7 +5906,7 @@ export class InteractiveMode {
5795
5906
  if (leafId) {
5796
5907
  this.redoStack.push(leafId);
5797
5908
  }
5798
- this.chatContainer.clear();
5909
+ this.clearChatContainer();
5799
5910
  this.renderInitialMessages();
5800
5911
  void this.flushCompactionQueue({ willRetry: false });
5801
5912
  return { editorText: result.editorText, editorImages: result.editorImages };
@@ -5838,7 +5949,7 @@ export class InteractiveMode {
5838
5949
  this.showStatus("Navigation cancelled");
5839
5950
  return;
5840
5951
  }
5841
- this.chatContainer.clear();
5952
+ this.clearChatContainer();
5842
5953
  this.renderInitialMessages();
5843
5954
  if (result.editorText && !this.editor.getText().trim()) {
5844
5955
  this.restoreEditorFromTreeResult(result);
@@ -6358,76 +6469,58 @@ export class InteractiveMode {
6358
6469
  this.chatContainer.addChild(new Text(lines.join("\n"), 1, 0));
6359
6470
  this.ui.requestRender();
6360
6471
  }
6361
- // lunr: /plan — shortcut onto the plan permission mode (not a second state machine).
6472
+ // /plan is a shortcut into read-only mode for planning.
6362
6473
  async handlePlanCommand(args) {
6363
6474
  const sub = args.toLowerCase();
6364
- const inPlan = getPermissionMode() === "plan";
6475
+ const inReadOnly = getPermissionMode() === "read-only";
6365
6476
  if (sub === "status") {
6366
- this.showStatus(inPlan
6367
- ? "Plan mode is active — edit/write and mutating bash are blocked. /plan off to implement."
6368
- : `Permission mode: ${getPermissionMode()}.`);
6477
+ this.showStatus(inReadOnly ? "Read mode is active. /plan off to leave it." : `Permission mode: ${getPermissionMode()}.`);
6369
6478
  return;
6370
6479
  }
6371
- // lunr: `/plan <text>` — any arg other than on/off/status is task text.
6372
- // While not in plan: enter plan and send. While in plan: restore previous
6373
- // mode and send with full tool access ("looks good, go implement it").
6374
6480
  if (sub !== "" && sub !== "on" && sub !== "off") {
6375
- if (inPlan) {
6376
- this.applyPermissionMode(this.restoreTargetAfterPlan());
6377
- }
6378
- else {
6379
- this.applyPermissionMode("plan");
6380
- }
6381
- await this.sendUserMessageAfterDeferredBuiltins(args);
6481
+ if (!inReadOnly)
6482
+ this.applyPermissionMode("read-only");
6483
+ await this.sendUserMessageAfterDeferredBuiltins(`Create a plan for: ${args}`);
6382
6484
  return;
6383
6485
  }
6384
- const next = sub === "" ? !inPlan : sub === "on";
6385
- if (next === inPlan) {
6386
- this.showStatus(next ? "Plan mode is already active." : "Plan mode is already off.");
6486
+ const next = sub !== "off";
6487
+ if (next === inReadOnly) {
6488
+ this.showStatus(next ? "Read mode is already active." : "Read mode is already off.");
6387
6489
  return;
6388
6490
  }
6389
- if (next) {
6390
- this.applyPermissionMode("plan");
6391
- }
6392
- else {
6393
- this.applyPermissionMode(this.restoreTargetAfterPlan());
6394
- }
6491
+ this.applyPermissionMode(next ? "read-only" : this.restoreTargetAfterPlan());
6395
6492
  }
6396
- // lunr: /mode — permission mode selector (manual / yolo / plan / auto). Per-session only.
6397
6493
  handleModeCommand(args) {
6398
6494
  const sub = args.toLowerCase();
6399
6495
  if (sub === "status") {
6400
- this.showStatus(`Permission mode: ${getPermissionMode()}`);
6496
+ this.showStatus(`Permission mode: ${getPermissionMode() === "read-only" ? "read" : getPermissionMode()}`);
6401
6497
  return;
6402
6498
  }
6403
- if (sub === "manual" || sub === "yolo" || sub === "plan" || sub === "auto") {
6404
- this.applyPermissionMode(sub);
6499
+ if (sub === "yolo" || sub === "auto" || sub === "read-only" || sub === "read") {
6500
+ this.applyPermissionMode(sub === "read" ? "read-only" : sub);
6405
6501
  return;
6406
6502
  }
6407
6503
  if (sub !== "") {
6408
- this.showStatus("Usage: /mode [manual|yolo|plan|auto] — bare /mode opens the selector.");
6504
+ this.showStatus("Usage: /mode [yolo|auto|read] — bare /mode opens the selector.");
6409
6505
  return;
6410
6506
  }
6411
6507
  const options = [
6412
- "Manual — approve every action",
6413
6508
  "YOLO — auto-approve tools, agent may still ask",
6414
- "Plan — read-only; present a plan for approval",
6415
6509
  "Auto — fully autonomous, no questions",
6510
+ "Read — inspect without making changes",
6416
6511
  ];
6417
6512
  void this.showExtensionSelector("Permission mode", options).then((choice) => {
6418
6513
  if (!choice)
6419
6514
  return;
6420
- if (choice.startsWith("Manual"))
6421
- this.applyPermissionMode("manual");
6422
- else if (choice.startsWith("YOLO"))
6515
+ if (choice.startsWith("YOLO"))
6423
6516
  this.applyPermissionMode("yolo");
6424
- else if (choice.startsWith("Plan"))
6425
- this.applyPermissionMode("plan");
6426
6517
  else if (choice.startsWith("Auto"))
6427
6518
  this.applyPermissionMode("auto");
6519
+ else if (choice.startsWith("Read"))
6520
+ this.applyPermissionMode("read-only");
6428
6521
  });
6429
6522
  }
6430
- /** Destination when leaving plan via approve / `/plan off` / `/plan <text>`. */
6523
+ /** Destination after plan approval or /plan off. */
6431
6524
  restoreTargetAfterPlan() {
6432
6525
  return restorePermissionModeAfterPlan(this.previousPermissionMode, this.settingsManager.getDefaultPermissionMode());
6433
6526
  }
@@ -6436,8 +6529,8 @@ export class InteractiveMode {
6436
6529
  if (this.runtimeHost.isDetached || this.transferInProgress)
6437
6530
  return;
6438
6531
  this.sessionManager.setPermissionMode(mode);
6439
- if (mode === "plan") {
6440
- this.session.setSystemPromptAppend(PLAN_MODE_ADDENDUM);
6532
+ if (mode === "read-only") {
6533
+ this.session.setSystemPromptAppend(READ_ONLY_MODE_ADDENDUM);
6441
6534
  }
6442
6535
  else if (mode === "auto") {
6443
6536
  this.session.setSystemPromptAppend(AUTO_MODE_ADDENDUM);
@@ -6468,13 +6561,13 @@ export class InteractiveMode {
6468
6561
  this.sessionManager.setPermissionMode(mode);
6469
6562
  recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
6470
6563
  const prev = getPermissionMode();
6471
- if (mode === "plan" && prev !== "plan") {
6564
+ if (mode === "read-only" && prev !== "read-only") {
6472
6565
  this.previousPermissionMode = prev;
6473
6566
  }
6474
6567
  setPermissionMode(mode);
6475
6568
  this.ui.requestRender();
6476
- if (mode === "plan") {
6477
- this.session.setSystemPromptAppend(PLAN_MODE_ADDENDUM);
6569
+ if (mode === "read-only") {
6570
+ this.session.setSystemPromptAppend(READ_ONLY_MODE_ADDENDUM);
6478
6571
  }
6479
6572
  else if (mode === "auto") {
6480
6573
  this.session.setSystemPromptAppend(AUTO_MODE_ADDENDUM);
@@ -6493,43 +6586,13 @@ export class InteractiveMode {
6493
6586
  if (mode === "auto" && prev !== "auto") {
6494
6587
  this.showStatus("Auto mode active — fully autonomous. Rollback enabled for this session.");
6495
6588
  }
6496
- else if (mode === "plan") {
6497
- this.showStatus("Plan mode active — edit/write and mutating bash are blocked. /plan off to implement.");
6589
+ else if (mode === "read-only") {
6590
+ this.showStatus("Read mode active. Changes are blocked.");
6498
6591
  }
6499
6592
  else {
6500
6593
  this.showStatus(`Permission mode: ${mode}`);
6501
6594
  }
6502
6595
  }
6503
- // lunr: approval dialog for manual permission mode.
6504
- // lunr: adds "Switch to auto" / "Switch to yolo" at the bottom so users can
6505
- // escape manual approval mid-turn without a separate /mode round-trip.
6506
- async showApprovalDialog(req) {
6507
- return new Promise((resolve) => {
6508
- this.showSelector((done) => {
6509
- const selector = new ExtensionSelectorComponent(`Approve ${req.action}?`, ["Approve once", "Approve for session", "Reject", "Switch to auto", "Switch to yolo"], (option) => {
6510
- done();
6511
- if (option === "Approve once")
6512
- resolve("once");
6513
- else if (option === "Approve for session")
6514
- resolve("session");
6515
- else if (option === "Switch to auto") {
6516
- this.applyPermissionMode("auto");
6517
- resolve("once");
6518
- }
6519
- else if (option === "Switch to yolo") {
6520
- this.applyPermissionMode("yolo");
6521
- resolve("once");
6522
- }
6523
- else
6524
- resolve("reject");
6525
- }, () => {
6526
- done();
6527
- resolve("reject");
6528
- }, { message: req.detail.slice(0, 500) });
6529
- return { component: selector, focus: selector };
6530
- });
6531
- });
6532
- }
6533
6596
  // Approval dialog for one subagent call launching more than two children.
6534
6597
  // "Reject with feedback" collects a one-line
6535
6598
  // reason that becomes the block reason the model sees, so it can adjust the plan.
@@ -6558,7 +6621,7 @@ export class InteractiveMode {
6558
6621
  });
6559
6622
  });
6560
6623
  }
6561
- // lunr: approval dialog for present_plan (plan mode). The "with feedback"
6624
+ // Approval dialog for present_plan (read-only mode). The "with feedback"
6562
6625
  // options collect a one-line note via showExtensionInput that becomes part of
6563
6626
  // the result text the model sees. Esc/close counts as Decline.
6564
6627
  showPlanInChat(summary) {
@@ -6949,6 +7012,7 @@ ${toggleThinking ? `| \`${toggleThinking}\` | Toggle thinking block visibility |
6949
7012
  }
6950
7013
  }
6951
7014
  stop() {
7015
+ this.setThinkingAnimation(false);
6952
7016
  this.stopCatalogRefresh?.();
6953
7017
  this.stopCatalogRefresh = undefined;
6954
7018
  if (this.settingsManager.getShowTerminalProgress()) {
@@ -6959,6 +7023,7 @@ ${toggleThinking ? `| \`${toggleThinking}\` | Toggle thinking block visibility |
6959
7023
  this.clearExtensionTerminalInputListeners();
6960
7024
  this.footer.dispose();
6961
7025
  this.footerDataProvider.dispose();
7026
+ this.disposeChatToolComponents();
6962
7027
  if (this.unsubscribe) {
6963
7028
  this.unsubscribe();
6964
7029
  }