@ashx-j/lunr 0.2.17 → 0.2.18

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 +19 -1
  2. package/README.md +2 -1
  3. package/dist/builtin-extensions/ashxj-thinking.d.ts +1 -0
  4. package/dist/builtin-extensions/ashxj-thinking.d.ts.map +1 -1
  5. package/dist/builtin-extensions/ashxj-thinking.js +44 -19
  6. package/dist/builtin-extensions/ashxj-thinking.js.map +1 -1
  7. package/dist/builtin-extensions/ashxj-tui.d.ts +2 -2
  8. package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
  9. package/dist/builtin-extensions/ashxj-tui.js +8 -11
  10. package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
  11. package/dist/builtin-extensions/index.d.ts.map +1 -1
  12. package/dist/builtin-extensions/index.js +2 -1
  13. package/dist/builtin-extensions/index.js.map +1 -1
  14. package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts +4 -0
  15. package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
  16. package/dist/builtin-extensions/pi-lsp-extension/src/index.js +172 -171
  17. package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
  18. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts +50 -0
  19. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts.map +1 -0
  20. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js +131 -0
  21. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js.map +1 -0
  22. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts +7 -0
  23. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts.map +1 -0
  24. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js +211 -0
  25. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js.map +1 -0
  26. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts +0 -5
  27. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
  28. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +0 -202
  29. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js.map +1 -1
  30. package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
  31. package/dist/builtin-extensions/pi-mcp-adapter/index.js +276 -109
  32. package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
  33. package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts +4 -1
  34. package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts.map +1 -1
  35. package/dist/builtin-extensions/pi-mcp-adapter/init.js +10 -3
  36. package/dist/builtin-extensions/pi-mcp-adapter/init.js.map +1 -1
  37. package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.d.ts.map +1 -1
  38. package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js +6 -1
  39. package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js.map +1 -1
  40. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts +6 -1
  41. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts.map +1 -1
  42. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js +33 -8
  43. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js.map +1 -1
  44. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts.map +1 -1
  45. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js +2 -1
  46. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js.map +1 -1
  47. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts +1 -1
  48. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts.map +1 -1
  49. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js +1 -1
  50. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js.map +1 -1
  51. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +1 -1
  52. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  53. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +68 -15
  54. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  55. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts +1 -1
  56. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
  57. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +5 -2
  58. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
  59. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.d.ts.map +1 -1
  60. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js +1 -1
  61. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js.map +1 -1
  62. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +1 -1
  63. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
  64. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +1 -1
  65. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
  66. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -1
  67. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
  68. package/dist/builtin-extensions/pi-subagents/src/tui/render.js +72 -31
  69. package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
  70. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts +1 -1
  71. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts.map +1 -1
  72. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js +2 -1
  73. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js.map +1 -1
  74. package/dist/builtin-extensions/pi-web-access/extract.d.ts.map +1 -1
  75. package/dist/builtin-extensions/pi-web-access/extract.js +105 -54
  76. package/dist/builtin-extensions/pi-web-access/extract.js.map +1 -1
  77. package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts +1 -1
  78. package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts.map +1 -1
  79. package/dist/builtin-extensions/pi-web-access/gemini-search.js +82 -65
  80. package/dist/builtin-extensions/pi-web-access/gemini-search.js.map +1 -1
  81. package/dist/builtin-extensions/pi-web-access/github-extract.d.ts.map +1 -1
  82. package/dist/builtin-extensions/pi-web-access/github-extract.js +2 -0
  83. package/dist/builtin-extensions/pi-web-access/github-extract.js.map +1 -1
  84. package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
  85. package/dist/builtin-extensions/pi-web-access/index.js +259 -168
  86. package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
  87. package/dist/builtin-extensions/pi-web-access/lazy.d.ts +18 -0
  88. package/dist/builtin-extensions/pi-web-access/lazy.d.ts.map +1 -0
  89. package/dist/builtin-extensions/pi-web-access/lazy.js +19 -0
  90. package/dist/builtin-extensions/pi-web-access/lazy.js.map +1 -0
  91. package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts +6 -0
  92. package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts.map +1 -0
  93. package/dist/builtin-extensions/pi-web-access/session-cleanup.js +17 -0
  94. package/dist/builtin-extensions/pi-web-access/session-cleanup.js.map +1 -0
  95. package/dist/cli-runtime.d.ts +3 -0
  96. package/dist/cli-runtime.d.ts.map +1 -0
  97. package/dist/cli-runtime.js +72 -0
  98. package/dist/cli-runtime.js.map +1 -0
  99. package/dist/cli.d.ts.map +1 -1
  100. package/dist/cli.js +11 -60
  101. package/dist/cli.js.map +1 -1
  102. package/dist/config.d.ts +1 -0
  103. package/dist/config.d.ts.map +1 -1
  104. package/dist/config.js +1 -0
  105. package/dist/config.js.map +1 -1
  106. package/dist/core/agent-session.d.ts.map +1 -1
  107. package/dist/core/agent-session.js +6 -3
  108. package/dist/core/agent-session.js.map +1 -1
  109. package/dist/core/extensions/host-static.d.ts.map +1 -1
  110. package/dist/core/extensions/host-static.js +34 -12
  111. package/dist/core/extensions/host-static.js.map +1 -1
  112. package/dist/core/extensions/loader.d.ts +1 -2
  113. package/dist/core/extensions/loader.d.ts.map +1 -1
  114. package/dist/core/extensions/loader.js +10 -64
  115. package/dist/core/extensions/loader.js.map +1 -1
  116. package/dist/core/keybindings.d.ts +2 -2
  117. package/dist/core/keybindings.d.ts.map +1 -1
  118. package/dist/core/keybindings.js +2 -2
  119. package/dist/core/keybindings.js.map +1 -1
  120. package/dist/core/package-manager.d.ts.map +1 -1
  121. package/dist/core/package-manager.js +1 -1
  122. package/dist/core/package-manager.js.map +1 -1
  123. package/dist/core/sdk.d.ts +1 -1
  124. package/dist/core/sdk.d.ts.map +1 -1
  125. package/dist/core/sdk.js +1 -1
  126. package/dist/core/sdk.js.map +1 -1
  127. package/dist/core/timings.d.ts +2 -1
  128. package/dist/core/timings.d.ts.map +1 -1
  129. package/dist/core/timings.js +17 -2
  130. package/dist/core/timings.js.map +1 -1
  131. package/dist/gateway/agent-bridge.d.ts +6 -1
  132. package/dist/gateway/agent-bridge.d.ts.map +1 -1
  133. package/dist/gateway/agent-bridge.js +23 -6
  134. package/dist/gateway/agent-bridge.js.map +1 -1
  135. package/dist/gateway/cron.d.ts +1 -1
  136. package/dist/gateway/cron.d.ts.map +1 -1
  137. package/dist/gateway/cron.js +3 -1
  138. package/dist/gateway/cron.js.map +1 -1
  139. package/dist/main.d.ts.map +1 -1
  140. package/dist/main.js +20 -14
  141. package/dist/main.js.map +1 -1
  142. package/dist/modes/interactive/injected-context.d.ts +2 -0
  143. package/dist/modes/interactive/injected-context.d.ts.map +1 -0
  144. package/dist/modes/interactive/injected-context.js +7 -0
  145. package/dist/modes/interactive/injected-context.js.map +1 -0
  146. package/dist/modes/interactive/interactive-mode.d.ts +2 -0
  147. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  148. package/dist/modes/interactive/interactive-mode.js +32 -8
  149. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  150. package/dist/modes/interactive/thinking-level-slash.d.ts +4 -0
  151. package/dist/modes/interactive/thinking-level-slash.d.ts.map +1 -0
  152. package/dist/modes/interactive/thinking-level-slash.js +23 -0
  153. package/dist/modes/interactive/thinking-level-slash.js.map +1 -0
  154. package/dist/node-runtime/agent-session-services-35WNVGMR.js +36 -0
  155. package/dist/node-runtime/benchmark-request-UC7PD3V3.js +57 -0
  156. package/dist/node-runtime/brave-UWDA3I22.js +143 -0
  157. package/dist/node-runtime/builtin-extensions-QATGXENO.js +28 -0
  158. package/dist/node-runtime/chunk-2SJB2AWP.js +47 -0
  159. package/dist/node-runtime/chunk-3NMWLTPV.js +64 -0
  160. package/dist/node-runtime/chunk-3WFAEVKS.js +115 -0
  161. package/dist/node-runtime/chunk-3X3KZKMI.js +49 -0
  162. package/dist/node-runtime/chunk-4CSFRBCN.js +7558 -0
  163. package/dist/node-runtime/chunk-4DJ6HEGH.js +296 -0
  164. package/dist/node-runtime/chunk-4HXHDDCF.js +16 -0
  165. package/dist/node-runtime/chunk-4I23VTC4.js +429 -0
  166. package/dist/node-runtime/chunk-4TLO4PO2.js +3427 -0
  167. package/dist/node-runtime/chunk-4ZWGEEAS.js +69 -0
  168. package/dist/node-runtime/chunk-53YJI7JU.js +137 -0
  169. package/dist/node-runtime/chunk-5EFIU3OM.js +295 -0
  170. package/dist/node-runtime/chunk-6BEIBLQ3.js +53 -0
  171. package/dist/node-runtime/chunk-6KDIOJL3.js +72 -0
  172. package/dist/node-runtime/chunk-7N3YHTYF.js +26 -0
  173. package/dist/node-runtime/chunk-7NBZ5P7I.js +24 -0
  174. package/dist/node-runtime/chunk-AD6VXAO7.js +342 -0
  175. package/dist/node-runtime/chunk-ARC4KOTI.js +11178 -0
  176. package/dist/node-runtime/chunk-AROOY4BB.js +173 -0
  177. package/dist/node-runtime/chunk-ATGA2WLC.js +5646 -0
  178. package/dist/node-runtime/chunk-AUXVGBO4.js +19 -0
  179. package/dist/node-runtime/chunk-AY6CAJSL.js +30 -0
  180. package/dist/node-runtime/chunk-BHO7O6E5.js +296 -0
  181. package/dist/node-runtime/chunk-BI3DHYCN.js +8845 -0
  182. package/dist/node-runtime/chunk-BOHIDQT4.js +21 -0
  183. package/dist/node-runtime/chunk-BRJX2PRC.js +53 -0
  184. package/dist/node-runtime/chunk-CBGB57XT.js +20211 -0
  185. package/dist/node-runtime/chunk-CCZJ3PYY.js +17 -0
  186. package/dist/node-runtime/chunk-CGBXPL3E.js +1171 -0
  187. package/dist/node-runtime/chunk-CJECDQKP.js +19 -0
  188. package/dist/node-runtime/chunk-CSFI6YXL.js +130 -0
  189. package/dist/node-runtime/chunk-DAPBPCBP.js +53 -0
  190. package/dist/node-runtime/chunk-DDWHZ633.js +37 -0
  191. package/dist/node-runtime/chunk-DMMTJQMQ.js +43 -0
  192. package/dist/node-runtime/chunk-DVGWF6A2.js +1180 -0
  193. package/dist/node-runtime/chunk-EBF6COVM.js +1734 -0
  194. package/dist/node-runtime/chunk-FQMM2EZ2.js +248 -0
  195. package/dist/node-runtime/chunk-FVDOXRUD.js +96 -0
  196. package/dist/node-runtime/chunk-G4P75AIS.js +9471 -0
  197. package/dist/node-runtime/chunk-G6LRAP36.js +105 -0
  198. package/dist/node-runtime/chunk-GKLEQ3I4.js +860 -0
  199. package/dist/node-runtime/chunk-H2EOZYMP.js +57 -0
  200. package/dist/node-runtime/chunk-HQCKFM2O.js +56 -0
  201. package/dist/node-runtime/chunk-HYHJIRDW.js +19 -0
  202. package/dist/node-runtime/chunk-I6R76AG7.js +22 -0
  203. package/dist/node-runtime/chunk-IRPJXI6U.js +1269 -0
  204. package/dist/node-runtime/chunk-J26TSGDL.js +633 -0
  205. package/dist/node-runtime/chunk-JZQ7F36T.js +610 -0
  206. package/dist/node-runtime/chunk-KBKMCJDU.js +126 -0
  207. package/dist/node-runtime/chunk-KWA4OC2J.js +100 -0
  208. package/dist/node-runtime/chunk-M3LZLQW2.js +98 -0
  209. package/dist/node-runtime/chunk-MCUNIRD5.js +8388 -0
  210. package/dist/node-runtime/chunk-NI6OTSBH.js +966 -0
  211. package/dist/node-runtime/chunk-NUIFPZWX.js +209 -0
  212. package/dist/node-runtime/chunk-OBMWP3I5.js +68 -0
  213. package/dist/node-runtime/chunk-OCVIXVTZ.js +88 -0
  214. package/dist/node-runtime/chunk-OPEK5RRY.js +466 -0
  215. package/dist/node-runtime/chunk-OR4L3IB2.js +42 -0
  216. package/dist/node-runtime/chunk-PL6JKXWI.js +3622 -0
  217. package/dist/node-runtime/chunk-PNJSG3IZ.js +807 -0
  218. package/dist/node-runtime/chunk-PVCDKGR6.js +55 -0
  219. package/dist/node-runtime/chunk-Q4Q6D4IY.js +364 -0
  220. package/dist/node-runtime/chunk-Q5ZU2VRT.js +83 -0
  221. package/dist/node-runtime/chunk-QFWG2RVL.js +5477 -0
  222. package/dist/node-runtime/chunk-QZMODZQ2.js +305 -0
  223. package/dist/node-runtime/chunk-R5EDISSV.js +375 -0
  224. package/dist/node-runtime/chunk-RNBHABBA.js +986 -0
  225. package/dist/node-runtime/chunk-RQ2Q5IYR.js +72 -0
  226. package/dist/node-runtime/chunk-RRIZE6QQ.js +17 -0
  227. package/dist/node-runtime/chunk-SN6G4OU6.js +4753 -0
  228. package/dist/node-runtime/chunk-STERBGUB.js +949 -0
  229. package/dist/node-runtime/chunk-UWQYRSYQ.js +8973 -0
  230. package/dist/node-runtime/chunk-VRB2IYGG.js +53 -0
  231. package/dist/node-runtime/chunk-VSELYKWU.js +772 -0
  232. package/dist/node-runtime/chunk-W3CVH5RX.js +62 -0
  233. package/dist/node-runtime/chunk-WJVFOIB5.js +24921 -0
  234. package/dist/node-runtime/chunk-WKDK4C5P.js +2834 -0
  235. package/dist/node-runtime/chunk-XATUM2HK.js +46 -0
  236. package/dist/node-runtime/chunk-XBWPBZBN.js +125 -0
  237. package/dist/node-runtime/chunk-XTHQ7XR7.js +509 -0
  238. package/dist/node-runtime/chunk-ZBV7FAHG.js +1345 -0
  239. package/dist/node-runtime/cli-runtime.js +80 -0
  240. package/dist/node-runtime/clipboard-OZ63BBC6.js +12 -0
  241. package/dist/node-runtime/clipboard-image-7QR6GXVA.js +13 -0
  242. package/dist/node-runtime/command-AAV3YRR5.js +13 -0
  243. package/dist/node-runtime/commands-MV5KOZ64.js +291 -0
  244. package/dist/node-runtime/config-QDD5PUE2.js +73 -0
  245. package/dist/node-runtime/curator-server-XCM43VEF.js +3816 -0
  246. package/dist/node-runtime/customize-XEXL2DGQ.js +12 -0
  247. package/dist/node-runtime/direct-tool-executor-BK7CLEBX.js +188 -0
  248. package/dist/node-runtime/exa-LL64QZR2.js +329 -0
  249. package/dist/node-runtime/export-html-TEXVV5RP.js +150 -0
  250. package/dist/node-runtime/extension-input-O4HSAEM4.js +14 -0
  251. package/dist/node-runtime/extension-selector-X5FCX43D.js +14 -0
  252. package/dist/node-runtime/extract-XLQSJN4V.js +17 -0
  253. package/dist/node-runtime/file-sync-HCOP2QVF.js +117 -0
  254. package/dist/node-runtime/gateway-OAC4OBBL.js +2137 -0
  255. package/dist/node-runtime/gemini-api-QE7ANVDZ.js +29 -0
  256. package/dist/node-runtime/gemini-search-U7SUMPQA.js +330 -0
  257. package/dist/node-runtime/gemini-url-context-PXWCBQHK.js +103 -0
  258. package/dist/node-runtime/gemini-web-MM446SEH.js +14 -0
  259. package/dist/node-runtime/github-extract-F64RZOEA.js +619 -0
  260. package/dist/node-runtime/goal-NJEE5CTU.js +1831 -0
  261. package/dist/node-runtime/index.js +859 -0
  262. package/dist/node-runtime/init-3C7Z24OI.js +28 -0
  263. package/dist/node-runtime/install-cli-EXMJQESX.js +308 -0
  264. package/dist/node-runtime/interactive-mode-2SZUO53H.js +56 -0
  265. package/dist/node-runtime/interactive-view-S6J3QHEF.js +247 -0
  266. package/dist/node-runtime/lsp-manager-3ASUSO4T.js +1104 -0
  267. package/dist/node-runtime/lunr-cron-AUUYP4N4.js +272 -0
  268. package/dist/node-runtime/main.js +54 -0
  269. package/dist/node-runtime/mcp-auth-flow-QIXHW6QN.js +32 -0
  270. package/dist/node-runtime/mcp-panel-IIGMXQGP.js +501 -0
  271. package/dist/node-runtime/mcp-setup-panel-FEK7663I.js +355 -0
  272. package/dist/node-runtime/memory-cap-3S4XRLNP.js +20 -0
  273. package/dist/node-runtime/model-tiers-NJLHUEGK.js +20 -0
  274. package/dist/node-runtime/openai-search-B3MSNCQA.js +288 -0
  275. package/dist/node-runtime/package-manager-cli-7RKSZGEN.js +749 -0
  276. package/dist/node-runtime/parallel-AI2MNSCU.js +265 -0
  277. package/dist/node-runtime/parser-manager-TQHWYDH7.js +152 -0
  278. package/dist/node-runtime/pdf-extract-IPE6H4HP.js +57 -0
  279. package/dist/node-runtime/perplexity-QVJW3I35.js +12 -0
  280. package/dist/node-runtime/pi-intercom-EEMBGQID.js +2215 -0
  281. package/dist/node-runtime/pi-mcp-adapter-GUFZWW54.js +428 -0
  282. package/dist/node-runtime/pi-ollama-cloud-2F3Y2QNM.js +1440 -0
  283. package/dist/node-runtime/pi-prompt-template-model-QWTCGLJU.js +3946 -0
  284. package/dist/node-runtime/pi-subagents-7YJ3I4VE.js +6048 -0
  285. package/dist/node-runtime/pi-web-access-2CQGFLT2.js +1867 -0
  286. package/dist/node-runtime/print-mode-XSFM26EL.js +12 -0
  287. package/dist/node-runtime/proxy-modes-V6YVFH3C.js +685 -0
  288. package/dist/node-runtime/rpc-entry.js +62 -0
  289. package/dist/node-runtime/rpc-mode-W5ZTLTMZ.js +13 -0
  290. package/dist/node-runtime/runtime-bridges-3RKBDLNA.js +14 -0
  291. package/dist/node-runtime/session-manager-E7AREDTV.js +33 -0
  292. package/dist/node-runtime/session-selector-FJ7M2AIX.js +14 -0
  293. package/dist/node-runtime/settings-manager-GHPTUN7R.js +21 -0
  294. package/dist/node-runtime/src-BPQFJR76.js +2427 -0
  295. package/dist/node-runtime/subagent-executor-5Q5A4HJ2.js +8499 -0
  296. package/dist/node-runtime/summary-review-YSMXKITO.js +228 -0
  297. package/dist/node-runtime/tavily-WEZFVFP7.js +154 -0
  298. package/dist/node-runtime/timings-UAD5BEAS.js +16 -0
  299. package/dist/node-runtime/tool-renderer-MV5O452K.js +204 -0
  300. package/dist/node-runtime/update-cli-L3JIBH2U.js +70 -0
  301. package/dist/node-runtime/v4-5MNC3H7G.js +424 -0
  302. package/dist/node-runtime/video-extract-OYT5WKS5.js +304 -0
  303. package/dist/node-runtime/workspace-index-6DBXSTJ6.js +163 -0
  304. package/dist/node-runtime/youtube-extract-TQYKGFGS.js +264 -0
  305. package/dist/rpc.d.ts +3 -0
  306. package/dist/rpc.d.ts.map +1 -0
  307. package/dist/rpc.js +18 -0
  308. package/dist/rpc.js.map +1 -0
  309. package/dist/startup/benchmark-request.d.ts +3 -0
  310. package/dist/startup/benchmark-request.d.ts.map +1 -0
  311. package/dist/startup/benchmark-request.js +65 -0
  312. package/dist/startup/benchmark-request.js.map +1 -0
  313. package/dist/startup/interactive-view.d.ts.map +1 -1
  314. package/dist/startup/interactive-view.js +1 -2
  315. package/dist/startup/interactive-view.js.map +1 -1
  316. package/dist/startup/startup-milestones.d.ts +1 -1
  317. package/dist/startup/startup-milestones.d.ts.map +1 -1
  318. package/dist/startup/startup-milestones.js.map +1 -1
  319. package/dist/utils/await-with-abort.d.ts +2 -0
  320. package/dist/utils/await-with-abort.d.ts.map +1 -0
  321. package/dist/utils/await-with-abort.js +19 -0
  322. package/dist/utils/await-with-abort.js.map +1 -0
  323. package/docs/development.md +5 -1
  324. package/docs/features.md +2 -2
  325. package/docs/interactive-startup.md +95 -48
  326. package/docs/keybindings.md +2 -2
  327. package/docs/terminal-setup.md +1 -1
  328. package/docs/usage.md +1 -1
  329. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  330. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  331. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  332. package/examples/extensions/gondolin/package-lock.json +2 -2
  333. package/examples/extensions/gondolin/package.json +1 -1
  334. package/examples/extensions/hidden-thinking-label.ts +1 -1
  335. package/examples/extensions/sandbox/package-lock.json +2 -2
  336. package/examples/extensions/sandbox/package.json +1 -1
  337. package/examples/extensions/with-deps/package-lock.json +2 -2
  338. package/examples/extensions/with-deps/package.json +1 -1
  339. package/package.json +8 -8
@@ -0,0 +1,859 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ ArminComponent,
4
+ AssistantMessageComponent,
5
+ BashExecutionComponent,
6
+ BorderedLoader,
7
+ BranchSummaryMessageComponent,
8
+ CompactionSummaryMessageComponent,
9
+ CustomMessageComponent,
10
+ ExtensionEditorComponent,
11
+ FooterComponent,
12
+ InteractiveMode,
13
+ LoginDialogComponent,
14
+ ModelSelectorComponent,
15
+ OAuthSelectorComponent,
16
+ SettingsSelectorComponent,
17
+ SkillInvocationMessageComponent,
18
+ ToolExecutionComponent,
19
+ TreeSelectorComponent,
20
+ UserMessageComponent,
21
+ UserMessageSelectorComponent
22
+ } from "./chunk-G4P75AIS.js";
23
+ import "./chunk-G6LRAP36.js";
24
+ import {
25
+ attachJsonlLineReader,
26
+ runRpcMode,
27
+ serializeJsonLine
28
+ } from "./chunk-OPEK5RRY.js";
29
+ import {
30
+ runPrintMode
31
+ } from "./chunk-OCVIXVTZ.js";
32
+ import "./chunk-KWA4OC2J.js";
33
+ import {
34
+ copyToClipboard
35
+ } from "./chunk-Q5ZU2VRT.js";
36
+ import "./chunk-NUIFPZWX.js";
37
+ import "./chunk-6BEIBLQ3.js";
38
+ import "./chunk-7N3YHTYF.js";
39
+ import {
40
+ main
41
+ } from "./chunk-NI6OTSBH.js";
42
+ import "./chunk-ZBV7FAHG.js";
43
+ import "./chunk-4DJ6HEGH.js";
44
+ import {
45
+ ProjectTrustStore,
46
+ hasTrustRequiringProjectResources
47
+ } from "./chunk-AROOY4BB.js";
48
+ import "./chunk-XATUM2HK.js";
49
+ import {
50
+ AgentSession,
51
+ AgentSessionRuntime,
52
+ AuthStorage,
53
+ ModelRegistry,
54
+ ModelRuntime,
55
+ createAgentSession,
56
+ createAgentSessionFromServices,
57
+ createAgentSessionRuntime,
58
+ createAgentSessionServices,
59
+ parseSkillBlock,
60
+ readStoredCredential,
61
+ wrapRegisteredTool,
62
+ wrapRegisteredTools
63
+ } from "./chunk-ATGA2WLC.js";
64
+ import {
65
+ DEFAULT_COMPACTION_SETTINGS,
66
+ calculateContextTokens,
67
+ collectEntriesForBranchSummary,
68
+ compact,
69
+ estimateTokens,
70
+ findCutPoint,
71
+ findTurnStartIndex,
72
+ generateBranchSummary,
73
+ generateSummary,
74
+ getLastAssistantUsage,
75
+ prepareBranchEntries,
76
+ resolveCliModel,
77
+ resolveModelScopeWithDiagnostics,
78
+ serializeConversation,
79
+ shouldCompact
80
+ } from "./chunk-STERBGUB.js";
81
+ import {
82
+ DefaultPackageManager,
83
+ DefaultResourceLoader,
84
+ ExtensionRunner,
85
+ createEventBus,
86
+ createExtensionRuntime,
87
+ createSyntheticSourceInfo,
88
+ discoverAndLoadExtensions,
89
+ formatSkillsForPrompt,
90
+ loadProjectContextFiles,
91
+ loadSkills,
92
+ loadSkillsFromDir
93
+ } from "./chunk-4CSFRBCN.js";
94
+ import "./chunk-OBMWP3I5.js";
95
+ import "./chunk-DVGWF6A2.js";
96
+ import {
97
+ parseFrontmatter,
98
+ stripFrontmatter
99
+ } from "./chunk-QFWG2RVL.js";
100
+ import "./chunk-CGBXPL3E.js";
101
+ import {
102
+ createBashTool,
103
+ createBashToolDefinition,
104
+ createCodingTools,
105
+ createEditTool,
106
+ createEditToolDefinition,
107
+ createFindTool,
108
+ createFindToolDefinition,
109
+ createGrepTool,
110
+ createGrepToolDefinition,
111
+ createLocalBashOperations,
112
+ createLsTool,
113
+ createLsToolDefinition,
114
+ createReadOnlyTools,
115
+ createReadTool,
116
+ createReadToolDefinition,
117
+ createWriteTool,
118
+ createWriteToolDefinition,
119
+ generateDiffString,
120
+ generateUnifiedPatch,
121
+ renderDiff,
122
+ truncateToVisualLines,
123
+ withFileMutationQueue
124
+ } from "./chunk-WKDK4C5P.js";
125
+ import {
126
+ DEFAULT_MAX_BYTES,
127
+ DEFAULT_MAX_LINES,
128
+ formatSize,
129
+ truncateHead,
130
+ truncateLine,
131
+ truncateTail
132
+ } from "./chunk-53YJI7JU.js";
133
+ import "./chunk-KBKMCJDU.js";
134
+ import {
135
+ getShellConfig
136
+ } from "./chunk-CSFI6YXL.js";
137
+ import {
138
+ SettingsManager
139
+ } from "./chunk-CBGB57XT.js";
140
+ import {
141
+ CURRENT_SESSION_VERSION,
142
+ SessionManager,
143
+ buildContextEntries,
144
+ buildSessionContext,
145
+ getLatestCompactionEntry,
146
+ migrateSessionEntries,
147
+ parseSessionEntries,
148
+ sessionEntryToContextMessages
149
+ } from "./chunk-GKLEQ3I4.js";
150
+ import {
151
+ convertToLlm
152
+ } from "./chunk-FVDOXRUD.js";
153
+ import "./chunk-3NMWLTPV.js";
154
+ import "./chunk-W3CVH5RX.js";
155
+ import "./chunk-PNJSG3IZ.js";
156
+ import "./chunk-PL6JKXWI.js";
157
+ import {
158
+ convertToPng,
159
+ formatDimensionNote,
160
+ resizeImage
161
+ } from "./chunk-AD6VXAO7.js";
162
+ import "./chunk-J26TSGDL.js";
163
+ import "./chunk-M3LZLQW2.js";
164
+ import "./chunk-RQ2Q5IYR.js";
165
+ import "./chunk-R5EDISSV.js";
166
+ import {
167
+ CustomEditor
168
+ } from "./chunk-H2EOZYMP.js";
169
+ import "./chunk-PVCDKGR6.js";
170
+ import {
171
+ defineTool,
172
+ isBashToolResult,
173
+ isEditToolResult,
174
+ isFindToolResult,
175
+ isGrepToolResult,
176
+ isLsToolResult,
177
+ isReadToolResult,
178
+ isToolCallEventType,
179
+ isWriteToolResult
180
+ } from "./chunk-OR4L3IB2.js";
181
+ import "./chunk-HQCKFM2O.js";
182
+ import "./chunk-AY6CAJSL.js";
183
+ import {
184
+ parseArgs
185
+ } from "./chunk-QZMODZQ2.js";
186
+ import "./chunk-CCZJ3PYY.js";
187
+ import {
188
+ ExtensionSelectorComponent
189
+ } from "./chunk-6KDIOJL3.js";
190
+ import {
191
+ ExtensionInputComponent
192
+ } from "./chunk-2SJB2AWP.js";
193
+ import "./chunk-I6R76AG7.js";
194
+ import {
195
+ SessionSelectorComponent
196
+ } from "./chunk-JZQ7F36T.js";
197
+ import "./chunk-5EFIU3OM.js";
198
+ import {
199
+ DynamicBorder
200
+ } from "./chunk-BOHIDQT4.js";
201
+ import {
202
+ keyHint,
203
+ keyText,
204
+ rawKeyHint
205
+ } from "./chunk-DDWHZ633.js";
206
+ import {
207
+ Theme,
208
+ getAvailableThemes,
209
+ getLanguageFromPath,
210
+ getMarkdownTheme,
211
+ getSelectListTheme,
212
+ getSettingsListTheme,
213
+ highlightCode,
214
+ initTheme
215
+ } from "./chunk-RNBHABBA.js";
216
+ import {
217
+ CONFIG_DIR_NAME,
218
+ VERSION,
219
+ getAgentDir,
220
+ getDocsPath,
221
+ getExamplesPath,
222
+ getPackageDir,
223
+ getReadmePath
224
+ } from "./chunk-FQMM2EZ2.js";
225
+ import "./chunk-Q4Q6D4IY.js";
226
+ import "./chunk-BRJX2PRC.js";
227
+
228
+ // packages/coding-agent/dist/modes/rpc/rpc-client.js
229
+ import { spawn } from "node:child_process";
230
+ var RpcClient = class {
231
+ process = null;
232
+ stopReadingStdout = null;
233
+ eventListeners = [];
234
+ pendingRequests = /* @__PURE__ */ new Map();
235
+ requestId = 0;
236
+ stderr = "";
237
+ exitError = null;
238
+ options;
239
+ constructor(options = {}) {
240
+ this.options = options;
241
+ }
242
+ /**
243
+ * Start the RPC agent process.
244
+ */
245
+ async start() {
246
+ if (this.process)
247
+ throw new Error("Client already started");
248
+ this.exitError = null;
249
+ let cliPath = this.options.cliPath ?? "dist/cli.js", args = ["--mode", "rpc"];
250
+ this.options.provider && args.push("--provider", this.options.provider), this.options.model && args.push("--model", this.options.model), this.options.args && args.push(...this.options.args);
251
+ let childProcess = spawn("node", [cliPath, ...args], {
252
+ cwd: this.options.cwd,
253
+ env: { ...process.env, ...this.options.env },
254
+ stdio: ["pipe", "pipe", "pipe"]
255
+ });
256
+ if (this.process = childProcess, childProcess.stderr?.on("data", (data) => {
257
+ this.stderr += data.toString(), process.stderr.write(data);
258
+ }), childProcess.once("exit", (code, signal) => {
259
+ if (this.process !== childProcess)
260
+ return;
261
+ let error = this.createProcessExitError(code, signal);
262
+ this.exitError = error, this.rejectPendingRequests(error);
263
+ }), childProcess.once("error", (error) => {
264
+ if (this.process !== childProcess)
265
+ return;
266
+ let processError = new Error(`Agent process error: ${error.message}. Stderr: ${this.stderr}`);
267
+ this.exitError = processError, this.rejectPendingRequests(processError);
268
+ }), childProcess.stdin?.on("error", (error) => {
269
+ if (this.process !== childProcess)
270
+ return;
271
+ let stdinError = this.exitError ?? new Error(`Agent process stdin error: ${error.message}. Stderr: ${this.stderr}`);
272
+ this.exitError = stdinError, this.rejectPendingRequests(stdinError);
273
+ }), this.stopReadingStdout = attachJsonlLineReader(childProcess.stdout, (line) => {
274
+ this.handleLine(line);
275
+ }), await new Promise((resolve) => setTimeout(resolve, 100)), this.process.exitCode !== null) {
276
+ let error = this.exitError ?? this.createProcessExitError(this.process.exitCode, this.process.signalCode);
277
+ throw this.exitError = error, error;
278
+ }
279
+ }
280
+ /**
281
+ * Stop the RPC agent process.
282
+ */
283
+ async stop() {
284
+ this.process && (this.stopReadingStdout?.(), this.stopReadingStdout = null, this.process.kill("SIGTERM"), await new Promise((resolve) => {
285
+ let timeout = setTimeout(() => {
286
+ this.process?.kill("SIGKILL"), resolve();
287
+ }, 1e3);
288
+ this.process?.on("exit", () => {
289
+ clearTimeout(timeout), resolve();
290
+ });
291
+ }), this.process = null, this.pendingRequests.clear());
292
+ }
293
+ /**
294
+ * Subscribe to agent events.
295
+ */
296
+ onEvent(listener) {
297
+ return this.eventListeners.push(listener), () => {
298
+ let index = this.eventListeners.indexOf(listener);
299
+ index !== -1 && this.eventListeners.splice(index, 1);
300
+ };
301
+ }
302
+ /**
303
+ * Get collected stderr output (useful for debugging).
304
+ */
305
+ getStderr() {
306
+ return this.stderr;
307
+ }
308
+ // =========================================================================
309
+ // Command Methods
310
+ // =========================================================================
311
+ /**
312
+ * Send a prompt to the agent.
313
+ * Returns immediately after sending; use onEvent() to receive streaming events.
314
+ * Use waitForIdle() to wait for completion.
315
+ */
316
+ async prompt(message, images) {
317
+ await this.send({ type: "prompt", message, images });
318
+ }
319
+ /**
320
+ * Queue a steering message to interrupt the agent mid-run.
321
+ */
322
+ async steer(message, images) {
323
+ await this.send({ type: "steer", message, images });
324
+ }
325
+ /**
326
+ * Queue a follow-up message to be processed after the agent finishes.
327
+ */
328
+ async followUp(message, images) {
329
+ await this.send({ type: "follow_up", message, images });
330
+ }
331
+ /**
332
+ * Abort current operation.
333
+ */
334
+ async abort() {
335
+ await this.send({ type: "abort" });
336
+ }
337
+ /**
338
+ * Start a new session, optionally with parent tracking.
339
+ * @param parentSession - Optional parent session path for lineage tracking
340
+ * @returns Object with `cancelled: true` if an extension cancelled the new session
341
+ */
342
+ async newSession(parentSession) {
343
+ let response = await this.send({ type: "new_session", parentSession });
344
+ return this.getData(response);
345
+ }
346
+ /**
347
+ * Get current session state.
348
+ */
349
+ async getState() {
350
+ let response = await this.send({ type: "get_state" });
351
+ return this.getData(response);
352
+ }
353
+ /**
354
+ * Set model by provider and ID.
355
+ */
356
+ async setModel(provider, modelId) {
357
+ let response = await this.send({ type: "set_model", provider, modelId });
358
+ return this.getData(response);
359
+ }
360
+ /**
361
+ * Cycle to next model.
362
+ */
363
+ async cycleModel() {
364
+ let response = await this.send({ type: "cycle_model" });
365
+ return this.getData(response);
366
+ }
367
+ /**
368
+ * Get list of available models.
369
+ */
370
+ async getAvailableModels() {
371
+ let response = await this.send({ type: "get_available_models" });
372
+ return this.getData(response).models;
373
+ }
374
+ /**
375
+ * Set thinking level.
376
+ */
377
+ async setThinkingLevel(level) {
378
+ await this.send({ type: "set_thinking_level", level });
379
+ }
380
+ /**
381
+ * Cycle thinking level.
382
+ */
383
+ async cycleThinkingLevel() {
384
+ let response = await this.send({ type: "cycle_thinking_level" });
385
+ return this.getData(response);
386
+ }
387
+ /**
388
+ * Set steering mode.
389
+ */
390
+ async setSteeringMode(mode) {
391
+ await this.send({ type: "set_steering_mode", mode });
392
+ }
393
+ /**
394
+ * Set follow-up mode.
395
+ */
396
+ async setFollowUpMode(mode) {
397
+ await this.send({ type: "set_follow_up_mode", mode });
398
+ }
399
+ /**
400
+ * Compact session context.
401
+ */
402
+ async compact(customInstructions) {
403
+ let response = await this.send({ type: "compact", customInstructions });
404
+ return this.getData(response);
405
+ }
406
+ /**
407
+ * Set auto-compaction enabled/disabled.
408
+ */
409
+ async setAutoCompaction(enabled) {
410
+ await this.send({ type: "set_auto_compaction", enabled });
411
+ }
412
+ /**
413
+ * Set auto-retry enabled/disabled.
414
+ */
415
+ async setAutoRetry(enabled) {
416
+ await this.send({ type: "set_auto_retry", enabled });
417
+ }
418
+ /**
419
+ * Abort in-progress retry.
420
+ */
421
+ async abortRetry() {
422
+ await this.send({ type: "abort_retry" });
423
+ }
424
+ /**
425
+ * Execute a bash command.
426
+ */
427
+ async bash(command) {
428
+ let response = await this.send({ type: "bash", command });
429
+ return this.getData(response);
430
+ }
431
+ /**
432
+ * Abort running bash command.
433
+ */
434
+ async abortBash() {
435
+ await this.send({ type: "abort_bash" });
436
+ }
437
+ /**
438
+ * Get session statistics.
439
+ */
440
+ async getSessionStats() {
441
+ let response = await this.send({ type: "get_session_stats" });
442
+ return this.getData(response);
443
+ }
444
+ /**
445
+ * Export session to HTML.
446
+ */
447
+ async exportHtml(outputPath) {
448
+ let response = await this.send({ type: "export_html", outputPath });
449
+ return this.getData(response);
450
+ }
451
+ /**
452
+ * Switch to a different session file.
453
+ * @returns Object with `cancelled: true` if an extension cancelled the switch
454
+ */
455
+ async switchSession(sessionPath) {
456
+ let response = await this.send({ type: "switch_session", sessionPath });
457
+ return this.getData(response);
458
+ }
459
+ /**
460
+ * Fork from a specific message.
461
+ * @returns Object with `text` (the message text) and `cancelled` (if extension cancelled)
462
+ */
463
+ async fork(entryId) {
464
+ let response = await this.send({ type: "fork", entryId });
465
+ return this.getData(response);
466
+ }
467
+ /**
468
+ * Clone the current active branch into a new session.
469
+ * @returns Object with `cancelled: true` if an extension cancelled the clone
470
+ */
471
+ async clone() {
472
+ let response = await this.send({ type: "clone" });
473
+ return this.getData(response);
474
+ }
475
+ /**
476
+ * Get messages available for forking.
477
+ */
478
+ async getForkMessages() {
479
+ let response = await this.send({ type: "get_fork_messages" });
480
+ return this.getData(response).messages;
481
+ }
482
+ /**
483
+ * Get session entries in append order, optionally only those after the `since` entry id.
484
+ */
485
+ async getEntries(since) {
486
+ let response = await this.send({ type: "get_entries", since });
487
+ return this.getData(response);
488
+ }
489
+ /**
490
+ * Get the session entry tree.
491
+ */
492
+ async getTree() {
493
+ let response = await this.send({ type: "get_tree" });
494
+ return this.getData(response);
495
+ }
496
+ /**
497
+ * Get text of last assistant message.
498
+ */
499
+ async getLastAssistantText() {
500
+ let response = await this.send({ type: "get_last_assistant_text" });
501
+ return this.getData(response).text;
502
+ }
503
+ /**
504
+ * Set the session display name.
505
+ */
506
+ async setSessionName(name) {
507
+ await this.send({ type: "set_session_name", name });
508
+ }
509
+ /**
510
+ * Get all messages in the session.
511
+ */
512
+ async getMessages() {
513
+ let response = await this.send({ type: "get_messages" });
514
+ return this.getData(response).messages;
515
+ }
516
+ /**
517
+ * Get available commands (extension commands, prompt templates, skills).
518
+ */
519
+ async getCommands() {
520
+ let response = await this.send({ type: "get_commands" });
521
+ return this.getData(response).commands;
522
+ }
523
+ // =========================================================================
524
+ // Helpers
525
+ // =========================================================================
526
+ /**
527
+ * Wait for agent to become idle (no streaming).
528
+ * Resolves when agent_settled event is received.
529
+ */
530
+ waitForIdle(timeout = 6e4) {
531
+ return new Promise((resolve, reject) => {
532
+ let timer = setTimeout(() => {
533
+ unsubscribe(), reject(new Error(`Timeout waiting for agent to become idle. Stderr: ${this.stderr}`));
534
+ }, timeout), unsubscribe = this.onEvent((event) => {
535
+ event.type === "agent_settled" && (clearTimeout(timer), unsubscribe(), resolve());
536
+ });
537
+ });
538
+ }
539
+ /**
540
+ * Collect events until agent becomes idle.
541
+ */
542
+ collectEvents(timeout = 6e4) {
543
+ return new Promise((resolve, reject) => {
544
+ let events = [], timer = setTimeout(() => {
545
+ unsubscribe(), reject(new Error(`Timeout collecting events. Stderr: ${this.stderr}`));
546
+ }, timeout), unsubscribe = this.onEvent((event) => {
547
+ events.push(event), event.type === "agent_settled" && (clearTimeout(timer), unsubscribe(), resolve(events));
548
+ });
549
+ });
550
+ }
551
+ /**
552
+ * Send prompt and wait for completion, returning all events.
553
+ */
554
+ async promptAndWait(message, images, timeout = 6e4) {
555
+ let eventsPromise = this.collectEvents(timeout);
556
+ return await this.prompt(message, images), eventsPromise;
557
+ }
558
+ // =========================================================================
559
+ // Internal
560
+ // =========================================================================
561
+ handleLine(line) {
562
+ try {
563
+ let data = JSON.parse(line);
564
+ if (data.type === "response" && data.id && this.pendingRequests.has(data.id)) {
565
+ let pending = this.pendingRequests.get(data.id);
566
+ this.pendingRequests.delete(data.id), pending.resolve(data);
567
+ return;
568
+ }
569
+ for (let listener of this.eventListeners)
570
+ listener(data);
571
+ } catch {
572
+ }
573
+ }
574
+ createProcessExitError(code, signal) {
575
+ return new Error(`Agent process exited (code=${code} signal=${signal}). Stderr: ${this.stderr}`);
576
+ }
577
+ rejectPendingRequests(error) {
578
+ for (let pending of this.pendingRequests.values())
579
+ pending.reject(error);
580
+ this.pendingRequests.clear();
581
+ }
582
+ async send(command) {
583
+ let childProcess = this.process, stdin = childProcess?.stdin;
584
+ if (!childProcess || !stdin)
585
+ throw new Error("Client not started");
586
+ if (this.exitError)
587
+ throw this.exitError;
588
+ if (childProcess.exitCode !== null) {
589
+ let error = this.createProcessExitError(childProcess.exitCode, childProcess.signalCode);
590
+ throw this.exitError = error, error;
591
+ }
592
+ if (stdin.destroyed || !stdin.writable) {
593
+ let error = new Error(`Agent process stdin is not writable. Stderr: ${this.stderr}`);
594
+ throw this.exitError = error, error;
595
+ }
596
+ let id = `req_${++this.requestId}`, fullCommand = { ...command, id };
597
+ return new Promise((resolve, reject) => {
598
+ let timeout = setTimeout(() => {
599
+ this.pendingRequests.delete(id), reject(new Error(`Timeout waiting for response to ${command.type}. Stderr: ${this.stderr}`));
600
+ }, 3e4);
601
+ this.pendingRequests.set(id, {
602
+ resolve: (response) => {
603
+ clearTimeout(timeout), resolve(response);
604
+ },
605
+ reject: (error) => {
606
+ clearTimeout(timeout), reject(error);
607
+ }
608
+ });
609
+ try {
610
+ stdin.write(serializeJsonLine(fullCommand));
611
+ } catch (error) {
612
+ let writeError = error instanceof Error ? error : new Error(String(error)), pending = this.pendingRequests.get(id);
613
+ this.pendingRequests.delete(id), pending?.reject(writeError);
614
+ }
615
+ });
616
+ }
617
+ getData(response) {
618
+ if (!response.success) {
619
+ let errorResponse = response;
620
+ throw new Error(errorResponse.error);
621
+ }
622
+ return response.data;
623
+ }
624
+ };
625
+
626
+ // packages/coding-agent/dist/modes/interactive/components/show-images-selector.js
627
+ import { Container, SelectList } from "@ashx-j/lunr-tui";
628
+ var SHOW_IMAGES_SELECT_LIST_LAYOUT = {
629
+ minPrimaryColumnWidth: 12,
630
+ maxPrimaryColumnWidth: 32
631
+ }, ShowImagesSelectorComponent = class extends Container {
632
+ selectList;
633
+ constructor(currentValue, onSelect, onCancel) {
634
+ super();
635
+ let items = [
636
+ { value: "yes", label: "Yes", description: "Show images inline in terminal" },
637
+ { value: "no", label: "No", description: "Show text placeholder instead" }
638
+ ];
639
+ this.addChild(new DynamicBorder()), this.selectList = new SelectList(items, 5, getSelectListTheme(), SHOW_IMAGES_SELECT_LIST_LAYOUT), this.selectList.setSelectedIndex(currentValue ? 0 : 1), this.selectList.onSelect = (item) => {
640
+ onSelect(item.value === "yes");
641
+ }, this.selectList.onCancel = () => {
642
+ onCancel();
643
+ }, this.addChild(this.selectList), this.addChild(new DynamicBorder());
644
+ }
645
+ getSelectList() {
646
+ return this.selectList;
647
+ }
648
+ };
649
+
650
+ // packages/coding-agent/dist/modes/interactive/components/theme-selector.js
651
+ import { Container as Container2, SelectList as SelectList2 } from "@ashx-j/lunr-tui";
652
+ var THEME_SELECT_LIST_LAYOUT = {
653
+ minPrimaryColumnWidth: 12,
654
+ maxPrimaryColumnWidth: 32
655
+ }, ThemeSelectorComponent = class extends Container2 {
656
+ selectList;
657
+ onPreview;
658
+ constructor(currentTheme, onSelect, onCancel, onPreview) {
659
+ super(), this.onPreview = onPreview;
660
+ let themes = getAvailableThemes(), themeItems = themes.map((name) => ({
661
+ value: name,
662
+ label: name,
663
+ description: name === currentTheme ? "(current)" : void 0
664
+ }));
665
+ this.addChild(new DynamicBorder()), this.selectList = new SelectList2(themeItems, 10, getSelectListTheme(), THEME_SELECT_LIST_LAYOUT);
666
+ let currentIndex = themes.indexOf(currentTheme);
667
+ currentIndex !== -1 && this.selectList.setSelectedIndex(currentIndex), this.selectList.onSelect = (item) => {
668
+ onSelect(item.value);
669
+ }, this.selectList.onCancel = () => {
670
+ onCancel();
671
+ }, this.selectList.onSelectionChange = (item) => {
672
+ this.onPreview(item.value);
673
+ }, this.addChild(this.selectList), this.addChild(new DynamicBorder());
674
+ }
675
+ getSelectList() {
676
+ return this.selectList;
677
+ }
678
+ };
679
+
680
+ // packages/coding-agent/dist/modes/interactive/components/thinking-selector.js
681
+ import { Container as Container3, SelectList as SelectList3 } from "@ashx-j/lunr-tui";
682
+ var THINKING_SELECT_LIST_LAYOUT = {
683
+ minPrimaryColumnWidth: 12,
684
+ maxPrimaryColumnWidth: 32
685
+ }, LEVEL_DESCRIPTIONS = {
686
+ off: "No reasoning",
687
+ minimal: "Very brief reasoning",
688
+ low: "Light reasoning",
689
+ medium: "Moderate reasoning",
690
+ high: "Deep reasoning",
691
+ xhigh: "Extra-high reasoning",
692
+ max: "Maximum reasoning"
693
+ }, ThinkingSelectorComponent = class extends Container3 {
694
+ selectList;
695
+ constructor(currentLevel, availableLevels, onSelect, onCancel) {
696
+ super();
697
+ let thinkingLevels = availableLevels.map((level) => ({
698
+ value: level,
699
+ label: level,
700
+ description: LEVEL_DESCRIPTIONS[level]
701
+ }));
702
+ this.addChild(new DynamicBorder()), this.selectList = new SelectList3(thinkingLevels, thinkingLevels.length, getSelectListTheme(), THINKING_SELECT_LIST_LAYOUT);
703
+ let currentIndex = thinkingLevels.findIndex((item) => item.value === currentLevel);
704
+ currentIndex !== -1 && this.selectList.setSelectedIndex(currentIndex), this.selectList.onSelect = (item) => {
705
+ onSelect(item.value);
706
+ }, this.selectList.onCancel = () => {
707
+ onCancel();
708
+ }, this.addChild(this.selectList), this.addChild(new DynamicBorder());
709
+ }
710
+ getSelectList() {
711
+ return this.selectList;
712
+ }
713
+ };
714
+ export {
715
+ AgentSession,
716
+ AgentSessionRuntime,
717
+ ArminComponent,
718
+ AssistantMessageComponent,
719
+ AuthStorage,
720
+ BashExecutionComponent,
721
+ BorderedLoader,
722
+ BranchSummaryMessageComponent,
723
+ CONFIG_DIR_NAME,
724
+ CURRENT_SESSION_VERSION,
725
+ CompactionSummaryMessageComponent,
726
+ CustomEditor,
727
+ CustomMessageComponent,
728
+ DEFAULT_COMPACTION_SETTINGS,
729
+ DEFAULT_MAX_BYTES,
730
+ DEFAULT_MAX_LINES,
731
+ DefaultPackageManager,
732
+ DefaultResourceLoader,
733
+ DynamicBorder,
734
+ ExtensionEditorComponent,
735
+ ExtensionInputComponent,
736
+ ExtensionRunner,
737
+ ExtensionSelectorComponent,
738
+ FooterComponent,
739
+ InteractiveMode,
740
+ LoginDialogComponent,
741
+ ModelRegistry,
742
+ ModelRuntime,
743
+ ModelSelectorComponent,
744
+ OAuthSelectorComponent,
745
+ ProjectTrustStore,
746
+ RpcClient,
747
+ SessionManager,
748
+ SessionSelectorComponent,
749
+ SettingsManager,
750
+ SettingsSelectorComponent,
751
+ ShowImagesSelectorComponent,
752
+ SkillInvocationMessageComponent,
753
+ Theme,
754
+ ThemeSelectorComponent,
755
+ ThinkingSelectorComponent,
756
+ ToolExecutionComponent,
757
+ TreeSelectorComponent,
758
+ UserMessageComponent,
759
+ UserMessageSelectorComponent,
760
+ VERSION,
761
+ buildContextEntries,
762
+ buildSessionContext,
763
+ calculateContextTokens,
764
+ collectEntriesForBranchSummary,
765
+ compact,
766
+ convertToLlm,
767
+ convertToPng,
768
+ copyToClipboard,
769
+ createAgentSession,
770
+ createAgentSessionFromServices,
771
+ createAgentSessionRuntime,
772
+ createAgentSessionServices,
773
+ createBashTool,
774
+ createBashToolDefinition,
775
+ createCodingTools,
776
+ createEditTool,
777
+ createEditToolDefinition,
778
+ createEventBus,
779
+ createExtensionRuntime,
780
+ createFindTool,
781
+ createFindToolDefinition,
782
+ createGrepTool,
783
+ createGrepToolDefinition,
784
+ createLocalBashOperations,
785
+ createLsTool,
786
+ createLsToolDefinition,
787
+ createReadOnlyTools,
788
+ createReadTool,
789
+ createReadToolDefinition,
790
+ createSyntheticSourceInfo,
791
+ createWriteTool,
792
+ createWriteToolDefinition,
793
+ defineTool,
794
+ discoverAndLoadExtensions,
795
+ estimateTokens,
796
+ findCutPoint,
797
+ findTurnStartIndex,
798
+ formatDimensionNote,
799
+ formatSize,
800
+ formatSkillsForPrompt,
801
+ generateBranchSummary,
802
+ generateDiffString,
803
+ generateSummary,
804
+ generateUnifiedPatch,
805
+ getAgentDir,
806
+ getDocsPath,
807
+ getExamplesPath,
808
+ getLanguageFromPath,
809
+ getLastAssistantUsage,
810
+ getLatestCompactionEntry,
811
+ getMarkdownTheme,
812
+ getPackageDir,
813
+ getReadmePath,
814
+ getSelectListTheme,
815
+ getSettingsListTheme,
816
+ getShellConfig,
817
+ hasTrustRequiringProjectResources,
818
+ highlightCode,
819
+ initTheme,
820
+ isBashToolResult,
821
+ isEditToolResult,
822
+ isFindToolResult,
823
+ isGrepToolResult,
824
+ isLsToolResult,
825
+ isReadToolResult,
826
+ isToolCallEventType,
827
+ isWriteToolResult,
828
+ keyHint,
829
+ keyText,
830
+ loadProjectContextFiles,
831
+ loadSkills,
832
+ loadSkillsFromDir,
833
+ main,
834
+ migrateSessionEntries,
835
+ parseArgs,
836
+ parseFrontmatter,
837
+ parseSessionEntries,
838
+ parseSkillBlock,
839
+ prepareBranchEntries,
840
+ rawKeyHint,
841
+ readStoredCredential,
842
+ renderDiff,
843
+ resizeImage,
844
+ resolveCliModel,
845
+ resolveModelScopeWithDiagnostics,
846
+ runPrintMode,
847
+ runRpcMode,
848
+ serializeConversation,
849
+ sessionEntryToContextMessages,
850
+ shouldCompact,
851
+ stripFrontmatter,
852
+ truncateHead,
853
+ truncateLine,
854
+ truncateTail,
855
+ truncateToVisualLines,
856
+ withFileMutationQueue,
857
+ wrapRegisteredTool,
858
+ wrapRegisteredTools
859
+ };