@ashx-j/lunr 0.2.17 → 0.2.19

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 (330) hide show
  1. package/CHANGELOG.md +26 -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/index.d.ts.map +1 -1
  8. package/dist/builtin-extensions/index.js +2 -1
  9. package/dist/builtin-extensions/index.js.map +1 -1
  10. package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts +4 -0
  11. package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
  12. package/dist/builtin-extensions/pi-lsp-extension/src/index.js +172 -171
  13. package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
  14. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts +50 -0
  15. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts.map +1 -0
  16. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js +131 -0
  17. package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js.map +1 -0
  18. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts +7 -0
  19. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts.map +1 -0
  20. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js +211 -0
  21. package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js.map +1 -0
  22. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts +0 -5
  23. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
  24. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +0 -202
  25. package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js.map +1 -1
  26. package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
  27. package/dist/builtin-extensions/pi-mcp-adapter/index.js +276 -109
  28. package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
  29. package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts +4 -1
  30. package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts.map +1 -1
  31. package/dist/builtin-extensions/pi-mcp-adapter/init.js +10 -3
  32. package/dist/builtin-extensions/pi-mcp-adapter/init.js.map +1 -1
  33. package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.d.ts.map +1 -1
  34. package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js +6 -1
  35. package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js.map +1 -1
  36. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts +6 -1
  37. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts.map +1 -1
  38. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js +33 -8
  39. package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js.map +1 -1
  40. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts.map +1 -1
  41. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js +2 -1
  42. package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js.map +1 -1
  43. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts +1 -1
  44. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts.map +1 -1
  45. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js +1 -1
  46. package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js.map +1 -1
  47. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +1 -1
  48. package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
  49. package/dist/builtin-extensions/pi-subagents/src/extension/index.js +68 -15
  50. package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
  51. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts +1 -1
  52. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
  53. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +5 -2
  54. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
  55. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.d.ts.map +1 -1
  56. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js +1 -1
  57. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js.map +1 -1
  58. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +1 -1
  59. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
  60. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +1 -1
  61. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
  62. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -1
  63. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
  64. package/dist/builtin-extensions/pi-subagents/src/tui/render.js +72 -31
  65. package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
  66. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts +1 -1
  67. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts.map +1 -1
  68. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js +2 -1
  69. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js.map +1 -1
  70. package/dist/builtin-extensions/pi-web-access/extract.d.ts.map +1 -1
  71. package/dist/builtin-extensions/pi-web-access/extract.js +105 -54
  72. package/dist/builtin-extensions/pi-web-access/extract.js.map +1 -1
  73. package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts +1 -1
  74. package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts.map +1 -1
  75. package/dist/builtin-extensions/pi-web-access/gemini-search.js +82 -65
  76. package/dist/builtin-extensions/pi-web-access/gemini-search.js.map +1 -1
  77. package/dist/builtin-extensions/pi-web-access/github-extract.d.ts.map +1 -1
  78. package/dist/builtin-extensions/pi-web-access/github-extract.js +2 -0
  79. package/dist/builtin-extensions/pi-web-access/github-extract.js.map +1 -1
  80. package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
  81. package/dist/builtin-extensions/pi-web-access/index.js +259 -168
  82. package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
  83. package/dist/builtin-extensions/pi-web-access/lazy.d.ts +18 -0
  84. package/dist/builtin-extensions/pi-web-access/lazy.d.ts.map +1 -0
  85. package/dist/builtin-extensions/pi-web-access/lazy.js +19 -0
  86. package/dist/builtin-extensions/pi-web-access/lazy.js.map +1 -0
  87. package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts +6 -0
  88. package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts.map +1 -0
  89. package/dist/builtin-extensions/pi-web-access/session-cleanup.js +17 -0
  90. package/dist/builtin-extensions/pi-web-access/session-cleanup.js.map +1 -0
  91. package/dist/cli-runtime.d.ts +3 -0
  92. package/dist/cli-runtime.d.ts.map +1 -0
  93. package/dist/cli-runtime.js +72 -0
  94. package/dist/cli-runtime.js.map +1 -0
  95. package/dist/cli.d.ts.map +1 -1
  96. package/dist/cli.js +11 -60
  97. package/dist/cli.js.map +1 -1
  98. package/dist/config.d.ts +1 -0
  99. package/dist/config.d.ts.map +1 -1
  100. package/dist/config.js +1 -0
  101. package/dist/config.js.map +1 -1
  102. package/dist/core/agent-session.d.ts.map +1 -1
  103. package/dist/core/agent-session.js +6 -3
  104. package/dist/core/agent-session.js.map +1 -1
  105. package/dist/core/extensions/host-static.d.ts.map +1 -1
  106. package/dist/core/extensions/host-static.js +34 -12
  107. package/dist/core/extensions/host-static.js.map +1 -1
  108. package/dist/core/extensions/loader.d.ts +1 -2
  109. package/dist/core/extensions/loader.d.ts.map +1 -1
  110. package/dist/core/extensions/loader.js +10 -64
  111. package/dist/core/extensions/loader.js.map +1 -1
  112. package/dist/core/keybindings.d.ts +2 -2
  113. package/dist/core/keybindings.d.ts.map +1 -1
  114. package/dist/core/keybindings.js +2 -2
  115. package/dist/core/keybindings.js.map +1 -1
  116. package/dist/core/package-manager.d.ts.map +1 -1
  117. package/dist/core/package-manager.js +1 -1
  118. package/dist/core/package-manager.js.map +1 -1
  119. package/dist/core/sdk.d.ts +1 -1
  120. package/dist/core/sdk.d.ts.map +1 -1
  121. package/dist/core/sdk.js +1 -1
  122. package/dist/core/sdk.js.map +1 -1
  123. package/dist/core/timings.d.ts +2 -1
  124. package/dist/core/timings.d.ts.map +1 -1
  125. package/dist/core/timings.js +17 -2
  126. package/dist/core/timings.js.map +1 -1
  127. package/dist/gateway/agent-bridge.d.ts +6 -1
  128. package/dist/gateway/agent-bridge.d.ts.map +1 -1
  129. package/dist/gateway/agent-bridge.js +23 -6
  130. package/dist/gateway/agent-bridge.js.map +1 -1
  131. package/dist/gateway/cron.d.ts +1 -1
  132. package/dist/gateway/cron.d.ts.map +1 -1
  133. package/dist/gateway/cron.js +3 -1
  134. package/dist/gateway/cron.js.map +1 -1
  135. package/dist/main.d.ts.map +1 -1
  136. package/dist/main.js +20 -14
  137. package/dist/main.js.map +1 -1
  138. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  139. package/dist/modes/interactive/interactive-mode.js +10 -8
  140. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  141. package/dist/modes/interactive/thinking-level-slash.d.ts +4 -0
  142. package/dist/modes/interactive/thinking-level-slash.d.ts.map +1 -0
  143. package/dist/modes/interactive/thinking-level-slash.js +23 -0
  144. package/dist/modes/interactive/thinking-level-slash.js.map +1 -0
  145. package/dist/node-runtime/agent-session-services-35WNVGMR.js +36 -0
  146. package/dist/node-runtime/benchmark-request-UC7PD3V3.js +57 -0
  147. package/dist/node-runtime/brave-UWDA3I22.js +143 -0
  148. package/dist/node-runtime/builtin-extensions-322XDDEM.js +28 -0
  149. package/dist/node-runtime/chunk-2SJB2AWP.js +47 -0
  150. package/dist/node-runtime/chunk-3NMWLTPV.js +64 -0
  151. package/dist/node-runtime/chunk-3WFAEVKS.js +115 -0
  152. package/dist/node-runtime/chunk-3X3KZKMI.js +49 -0
  153. package/dist/node-runtime/chunk-4CSFRBCN.js +7558 -0
  154. package/dist/node-runtime/chunk-4DJ6HEGH.js +296 -0
  155. package/dist/node-runtime/chunk-4FX25LWP.js +1345 -0
  156. package/dist/node-runtime/chunk-4HXHDDCF.js +16 -0
  157. package/dist/node-runtime/chunk-4I23VTC4.js +429 -0
  158. package/dist/node-runtime/chunk-4TLO4PO2.js +3427 -0
  159. package/dist/node-runtime/chunk-4ZWGEEAS.js +69 -0
  160. package/dist/node-runtime/chunk-53YJI7JU.js +137 -0
  161. package/dist/node-runtime/chunk-5EFIU3OM.js +295 -0
  162. package/dist/node-runtime/chunk-6BEIBLQ3.js +53 -0
  163. package/dist/node-runtime/chunk-6KDIOJL3.js +72 -0
  164. package/dist/node-runtime/chunk-7N3YHTYF.js +26 -0
  165. package/dist/node-runtime/chunk-7NBZ5P7I.js +24 -0
  166. package/dist/node-runtime/chunk-AD6VXAO7.js +342 -0
  167. package/dist/node-runtime/chunk-ARC4KOTI.js +11178 -0
  168. package/dist/node-runtime/chunk-AROOY4BB.js +173 -0
  169. package/dist/node-runtime/chunk-ATGA2WLC.js +5646 -0
  170. package/dist/node-runtime/chunk-AUXVGBO4.js +19 -0
  171. package/dist/node-runtime/chunk-AY6CAJSL.js +30 -0
  172. package/dist/node-runtime/chunk-BHO7O6E5.js +296 -0
  173. package/dist/node-runtime/chunk-BI3DHYCN.js +8845 -0
  174. package/dist/node-runtime/chunk-BOHIDQT4.js +21 -0
  175. package/dist/node-runtime/chunk-BRJX2PRC.js +53 -0
  176. package/dist/node-runtime/chunk-CBGB57XT.js +20211 -0
  177. package/dist/node-runtime/chunk-CCZJ3PYY.js +17 -0
  178. package/dist/node-runtime/chunk-CGBXPL3E.js +1171 -0
  179. package/dist/node-runtime/chunk-CJECDQKP.js +19 -0
  180. package/dist/node-runtime/chunk-CSFI6YXL.js +130 -0
  181. package/dist/node-runtime/chunk-DAPBPCBP.js +53 -0
  182. package/dist/node-runtime/chunk-DDWHZ633.js +37 -0
  183. package/dist/node-runtime/chunk-DMMTJQMQ.js +43 -0
  184. package/dist/node-runtime/chunk-DVGWF6A2.js +1180 -0
  185. package/dist/node-runtime/chunk-FQMM2EZ2.js +248 -0
  186. package/dist/node-runtime/chunk-FVDOXRUD.js +96 -0
  187. package/dist/node-runtime/chunk-G6LRAP36.js +105 -0
  188. package/dist/node-runtime/chunk-GKLEQ3I4.js +860 -0
  189. package/dist/node-runtime/chunk-H2EOZYMP.js +57 -0
  190. package/dist/node-runtime/chunk-HQCKFM2O.js +56 -0
  191. package/dist/node-runtime/chunk-HYHJIRDW.js +19 -0
  192. package/dist/node-runtime/chunk-I6R76AG7.js +22 -0
  193. package/dist/node-runtime/chunk-IRPJXI6U.js +1269 -0
  194. package/dist/node-runtime/chunk-J26TSGDL.js +633 -0
  195. package/dist/node-runtime/chunk-JHYKXIMM.js +378 -0
  196. package/dist/node-runtime/chunk-JZQ7F36T.js +610 -0
  197. package/dist/node-runtime/chunk-KBKMCJDU.js +126 -0
  198. package/dist/node-runtime/chunk-KWA4OC2J.js +100 -0
  199. package/dist/node-runtime/chunk-M3LZLQW2.js +98 -0
  200. package/dist/node-runtime/chunk-MCUNIRD5.js +8388 -0
  201. package/dist/node-runtime/chunk-NUIFPZWX.js +209 -0
  202. package/dist/node-runtime/chunk-OBMWP3I5.js +68 -0
  203. package/dist/node-runtime/chunk-OCVIXVTZ.js +88 -0
  204. package/dist/node-runtime/chunk-OPEK5RRY.js +466 -0
  205. package/dist/node-runtime/chunk-OR4L3IB2.js +42 -0
  206. package/dist/node-runtime/chunk-PL6JKXWI.js +3622 -0
  207. package/dist/node-runtime/chunk-PNJSG3IZ.js +807 -0
  208. package/dist/node-runtime/chunk-PVCDKGR6.js +55 -0
  209. package/dist/node-runtime/chunk-Q4Q6D4IY.js +364 -0
  210. package/dist/node-runtime/chunk-Q5ZU2VRT.js +83 -0
  211. package/dist/node-runtime/chunk-QFWG2RVL.js +5477 -0
  212. package/dist/node-runtime/chunk-QZMODZQ2.js +305 -0
  213. package/dist/node-runtime/chunk-RNBHABBA.js +986 -0
  214. package/dist/node-runtime/chunk-RQ2Q5IYR.js +72 -0
  215. package/dist/node-runtime/chunk-RRIZE6QQ.js +17 -0
  216. package/dist/node-runtime/chunk-SN6G4OU6.js +4753 -0
  217. package/dist/node-runtime/chunk-STERBGUB.js +949 -0
  218. package/dist/node-runtime/chunk-TFBIJTM3.js +966 -0
  219. package/dist/node-runtime/chunk-TXHKBRHZ.js +9450 -0
  220. package/dist/node-runtime/chunk-UWQYRSYQ.js +8973 -0
  221. package/dist/node-runtime/chunk-VRB2IYGG.js +53 -0
  222. package/dist/node-runtime/chunk-VSELYKWU.js +772 -0
  223. package/dist/node-runtime/chunk-W3CVH5RX.js +62 -0
  224. package/dist/node-runtime/chunk-WJVFOIB5.js +24921 -0
  225. package/dist/node-runtime/chunk-WKDK4C5P.js +2834 -0
  226. package/dist/node-runtime/chunk-XATUM2HK.js +46 -0
  227. package/dist/node-runtime/chunk-XBWPBZBN.js +125 -0
  228. package/dist/node-runtime/chunk-XTHQ7XR7.js +509 -0
  229. package/dist/node-runtime/chunk-ZRCBN365.js +1734 -0
  230. package/dist/node-runtime/cli-runtime.js +80 -0
  231. package/dist/node-runtime/clipboard-OZ63BBC6.js +12 -0
  232. package/dist/node-runtime/clipboard-image-7QR6GXVA.js +13 -0
  233. package/dist/node-runtime/command-DWUM5X3U.js +13 -0
  234. package/dist/node-runtime/commands-MV5KOZ64.js +291 -0
  235. package/dist/node-runtime/config-QDD5PUE2.js +73 -0
  236. package/dist/node-runtime/curator-server-XCM43VEF.js +3816 -0
  237. package/dist/node-runtime/customize-XEXL2DGQ.js +12 -0
  238. package/dist/node-runtime/direct-tool-executor-BK7CLEBX.js +188 -0
  239. package/dist/node-runtime/exa-LL64QZR2.js +329 -0
  240. package/dist/node-runtime/export-html-TEXVV5RP.js +150 -0
  241. package/dist/node-runtime/extension-input-O4HSAEM4.js +14 -0
  242. package/dist/node-runtime/extension-selector-X5FCX43D.js +14 -0
  243. package/dist/node-runtime/extract-XLQSJN4V.js +17 -0
  244. package/dist/node-runtime/file-sync-HCOP2QVF.js +117 -0
  245. package/dist/node-runtime/gateway-UZXMFGWY.js +2137 -0
  246. package/dist/node-runtime/gemini-api-QE7ANVDZ.js +29 -0
  247. package/dist/node-runtime/gemini-search-U7SUMPQA.js +330 -0
  248. package/dist/node-runtime/gemini-url-context-PXWCBQHK.js +103 -0
  249. package/dist/node-runtime/gemini-web-MM446SEH.js +14 -0
  250. package/dist/node-runtime/github-extract-F64RZOEA.js +619 -0
  251. package/dist/node-runtime/goal-NJEE5CTU.js +1831 -0
  252. package/dist/node-runtime/index.js +859 -0
  253. package/dist/node-runtime/init-3C7Z24OI.js +28 -0
  254. package/dist/node-runtime/install-cli-EXMJQESX.js +308 -0
  255. package/dist/node-runtime/interactive-mode-QT5IKGQ5.js +56 -0
  256. package/dist/node-runtime/interactive-view-ILS6TAN5.js +247 -0
  257. package/dist/node-runtime/lsp-manager-3ASUSO4T.js +1104 -0
  258. package/dist/node-runtime/lunr-cron-QPBTKBGI.js +272 -0
  259. package/dist/node-runtime/main.js +54 -0
  260. package/dist/node-runtime/mcp-auth-flow-QIXHW6QN.js +32 -0
  261. package/dist/node-runtime/mcp-panel-IIGMXQGP.js +501 -0
  262. package/dist/node-runtime/mcp-setup-panel-FEK7663I.js +355 -0
  263. package/dist/node-runtime/memory-cap-3S4XRLNP.js +20 -0
  264. package/dist/node-runtime/model-tiers-NJLHUEGK.js +20 -0
  265. package/dist/node-runtime/openai-search-B3MSNCQA.js +288 -0
  266. package/dist/node-runtime/package-manager-cli-7RKSZGEN.js +749 -0
  267. package/dist/node-runtime/parallel-AI2MNSCU.js +265 -0
  268. package/dist/node-runtime/parser-manager-TQHWYDH7.js +152 -0
  269. package/dist/node-runtime/pdf-extract-IPE6H4HP.js +57 -0
  270. package/dist/node-runtime/perplexity-QVJW3I35.js +12 -0
  271. package/dist/node-runtime/pi-intercom-EEMBGQID.js +2215 -0
  272. package/dist/node-runtime/pi-mcp-adapter-GUFZWW54.js +428 -0
  273. package/dist/node-runtime/pi-ollama-cloud-2F3Y2QNM.js +1440 -0
  274. package/dist/node-runtime/pi-prompt-template-model-QWTCGLJU.js +3946 -0
  275. package/dist/node-runtime/pi-subagents-7YJ3I4VE.js +6048 -0
  276. package/dist/node-runtime/pi-web-access-2CQGFLT2.js +1867 -0
  277. package/dist/node-runtime/print-mode-XSFM26EL.js +12 -0
  278. package/dist/node-runtime/proxy-modes-V6YVFH3C.js +685 -0
  279. package/dist/node-runtime/rpc-entry.js +62 -0
  280. package/dist/node-runtime/rpc-mode-W5ZTLTMZ.js +13 -0
  281. package/dist/node-runtime/runtime-bridges-3RKBDLNA.js +14 -0
  282. package/dist/node-runtime/session-manager-E7AREDTV.js +33 -0
  283. package/dist/node-runtime/session-selector-FJ7M2AIX.js +14 -0
  284. package/dist/node-runtime/settings-manager-GHPTUN7R.js +21 -0
  285. package/dist/node-runtime/src-BPQFJR76.js +2427 -0
  286. package/dist/node-runtime/subagent-executor-5Q5A4HJ2.js +8499 -0
  287. package/dist/node-runtime/summary-review-YSMXKITO.js +228 -0
  288. package/dist/node-runtime/tavily-WEZFVFP7.js +154 -0
  289. package/dist/node-runtime/timings-UAD5BEAS.js +16 -0
  290. package/dist/node-runtime/tool-renderer-MV5O452K.js +204 -0
  291. package/dist/node-runtime/update-cli-L3JIBH2U.js +70 -0
  292. package/dist/node-runtime/v4-5MNC3H7G.js +424 -0
  293. package/dist/node-runtime/video-extract-OYT5WKS5.js +304 -0
  294. package/dist/node-runtime/workspace-index-6DBXSTJ6.js +163 -0
  295. package/dist/node-runtime/youtube-extract-TQYKGFGS.js +264 -0
  296. package/dist/rpc.d.ts +3 -0
  297. package/dist/rpc.d.ts.map +1 -0
  298. package/dist/rpc.js +18 -0
  299. package/dist/rpc.js.map +1 -0
  300. package/dist/startup/benchmark-request.d.ts +3 -0
  301. package/dist/startup/benchmark-request.d.ts.map +1 -0
  302. package/dist/startup/benchmark-request.js +65 -0
  303. package/dist/startup/benchmark-request.js.map +1 -0
  304. package/dist/startup/interactive-view.d.ts.map +1 -1
  305. package/dist/startup/interactive-view.js +1 -2
  306. package/dist/startup/interactive-view.js.map +1 -1
  307. package/dist/startup/startup-milestones.d.ts +1 -1
  308. package/dist/startup/startup-milestones.d.ts.map +1 -1
  309. package/dist/startup/startup-milestones.js.map +1 -1
  310. package/dist/utils/await-with-abort.d.ts +2 -0
  311. package/dist/utils/await-with-abort.d.ts.map +1 -0
  312. package/dist/utils/await-with-abort.js +19 -0
  313. package/dist/utils/await-with-abort.js.map +1 -0
  314. package/docs/development.md +5 -1
  315. package/docs/features.md +2 -2
  316. package/docs/interactive-startup.md +95 -48
  317. package/docs/keybindings.md +2 -2
  318. package/docs/terminal-setup.md +1 -1
  319. package/docs/usage.md +1 -1
  320. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  321. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  322. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  323. package/examples/extensions/gondolin/package-lock.json +2 -2
  324. package/examples/extensions/gondolin/package.json +1 -1
  325. package/examples/extensions/hidden-thinking-label.ts +1 -1
  326. package/examples/extensions/sandbox/package-lock.json +2 -2
  327. package/examples/extensions/sandbox/package.json +1 -1
  328. package/examples/extensions/with-deps/package-lock.json +2 -2
  329. package/examples/extensions/with-deps/package.json +1 -1
  330. package/package.json +8 -8
@@ -0,0 +1,69 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+
3
+ // packages/coding-agent/dist/builtin-extensions/pi-web-access/summary-model-scope.js
4
+ import { existsSync, readFileSync } from "node:fs";
5
+ import { homedir } from "node:os";
6
+ import { join } from "node:path";
7
+ var THINKING_LEVELS = /* @__PURE__ */ new Set(["off", "minimal", "low", "medium", "high", "xhigh"]);
8
+ function getAgentDir() {
9
+ return process.env.PI_CODING_AGENT_DIR || join(homedir(), ".lunr", "agent");
10
+ }
11
+ function readSettings(path) {
12
+ if (!existsSync(path))
13
+ return {};
14
+ let raw = readFileSync(path, "utf8");
15
+ try {
16
+ return JSON.parse(raw);
17
+ } catch (err) {
18
+ let message = err instanceof Error ? err.message : String(err);
19
+ throw new Error(`Failed to parse ${path}: ${message}`);
20
+ }
21
+ }
22
+ function loadEnabledModelPatterns(ctx) {
23
+ let globalSettings = readSettings(join(getAgentDir(), "settings.json")), projectSettings = ctx.isProjectTrusted() ? readSettings(join(ctx.cwd, ".lunr", "settings.json")) : {}, value = Object.hasOwn(projectSettings, "enabledModels") ? projectSettings.enabledModels : globalSettings.enabledModels;
24
+ if (value === void 0)
25
+ return null;
26
+ if (!Array.isArray(value))
27
+ throw new Error("enabledModels must be an array");
28
+ return value.filter((item) => typeof item == "string").map((item) => item.trim()).filter(Boolean);
29
+ }
30
+ function summaryModelValue(model) {
31
+ return `${model.provider}/${model.id}`;
32
+ }
33
+ function stripThinkingSuffix(pattern) {
34
+ let index = pattern.lastIndexOf(":");
35
+ if (index < 0)
36
+ return pattern;
37
+ let suffix = pattern.slice(index + 1);
38
+ return THINKING_LEVELS.has(suffix) ? pattern.slice(0, index) : pattern;
39
+ }
40
+ function globToRegExp(pattern) {
41
+ let source = "^";
42
+ for (let char of pattern)
43
+ char === "*" ? source += ".*" : char === "?" ? source += "." : source += char.replace(/[|\\{}()[\]^$+?.]/g, "\\$&");
44
+ return new RegExp(`${source}$`, "i");
45
+ }
46
+ function modelMatchesEnabledPatterns(model, patterns) {
47
+ if (patterns === null)
48
+ return !0;
49
+ let value = summaryModelValue(model).toLowerCase(), id = model.id.toLowerCase();
50
+ for (let rawPattern of patterns) {
51
+ let pattern = stripThinkingSuffix(rawPattern.trim()).toLowerCase();
52
+ if (pattern) {
53
+ if (pattern.includes("*") || pattern.includes("?")) {
54
+ let regex = globToRegExp(pattern);
55
+ if (regex.test(value) || regex.test(id))
56
+ return !0;
57
+ continue;
58
+ }
59
+ if (pattern === value || pattern === id)
60
+ return !0;
61
+ }
62
+ }
63
+ return !1;
64
+ }
65
+
66
+ export {
67
+ loadEnabledModelPatterns,
68
+ modelMatchesEnabledPatterns
69
+ };
@@ -0,0 +1,137 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+
3
+ // packages/coding-agent/dist/core/tools/truncate.js
4
+ var DEFAULT_MAX_LINES = 2e3, DEFAULT_MAX_BYTES = 51200;
5
+ function splitLinesForCounting(content) {
6
+ if (content.length === 0)
7
+ return [];
8
+ let lines = content.split(`
9
+ `);
10
+ return content.endsWith(`
11
+ `) && lines.pop(), lines;
12
+ }
13
+ function formatSize(bytes) {
14
+ return bytes < 1024 ? `${bytes}B` : bytes < 1024 * 1024 ? `${(bytes / 1024).toFixed(1)}KB` : `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
15
+ }
16
+ function truncateHead(content, options = {}) {
17
+ let maxLines = options.maxLines ?? 2e3, maxBytes = options.maxBytes ?? 51200, totalBytes = Buffer.byteLength(content, "utf-8"), lines = splitLinesForCounting(content), totalLines = lines.length;
18
+ if (totalLines <= maxLines && totalBytes <= maxBytes)
19
+ return {
20
+ content,
21
+ truncated: !1,
22
+ truncatedBy: null,
23
+ totalLines,
24
+ totalBytes,
25
+ outputLines: totalLines,
26
+ outputBytes: totalBytes,
27
+ lastLinePartial: !1,
28
+ firstLineExceedsLimit: !1,
29
+ maxLines,
30
+ maxBytes
31
+ };
32
+ if (Buffer.byteLength(lines[0], "utf-8") > maxBytes)
33
+ return {
34
+ content: "",
35
+ truncated: !0,
36
+ truncatedBy: "bytes",
37
+ totalLines,
38
+ totalBytes,
39
+ outputLines: 0,
40
+ outputBytes: 0,
41
+ lastLinePartial: !1,
42
+ firstLineExceedsLimit: !0,
43
+ maxLines,
44
+ maxBytes
45
+ };
46
+ let outputLinesArr = [], outputBytesCount = 0, truncatedBy = "lines";
47
+ for (let i = 0; i < lines.length && i < maxLines; i++) {
48
+ let line = lines[i], lineBytes = Buffer.byteLength(line, "utf-8") + (i > 0 ? 1 : 0);
49
+ if (outputBytesCount + lineBytes > maxBytes) {
50
+ truncatedBy = "bytes";
51
+ break;
52
+ }
53
+ outputLinesArr.push(line), outputBytesCount += lineBytes;
54
+ }
55
+ outputLinesArr.length >= maxLines && outputBytesCount <= maxBytes && (truncatedBy = "lines");
56
+ let outputContent = outputLinesArr.join(`
57
+ `), finalOutputBytes = Buffer.byteLength(outputContent, "utf-8");
58
+ return {
59
+ content: outputContent,
60
+ truncated: !0,
61
+ truncatedBy,
62
+ totalLines,
63
+ totalBytes,
64
+ outputLines: outputLinesArr.length,
65
+ outputBytes: finalOutputBytes,
66
+ lastLinePartial: !1,
67
+ firstLineExceedsLimit: !1,
68
+ maxLines,
69
+ maxBytes
70
+ };
71
+ }
72
+ function truncateTail(content, options = {}) {
73
+ let maxLines = options.maxLines ?? 2e3, maxBytes = options.maxBytes ?? 51200, totalBytes = Buffer.byteLength(content, "utf-8"), lines = splitLinesForCounting(content), totalLines = lines.length;
74
+ if (totalLines <= maxLines && totalBytes <= maxBytes)
75
+ return {
76
+ content,
77
+ truncated: !1,
78
+ truncatedBy: null,
79
+ totalLines,
80
+ totalBytes,
81
+ outputLines: totalLines,
82
+ outputBytes: totalBytes,
83
+ lastLinePartial: !1,
84
+ firstLineExceedsLimit: !1,
85
+ maxLines,
86
+ maxBytes
87
+ };
88
+ let outputLinesArr = [], outputBytesCount = 0, truncatedBy = "lines", lastLinePartial = !1;
89
+ for (let i = lines.length - 1; i >= 0 && outputLinesArr.length < maxLines; i--) {
90
+ let line = lines[i], lineBytes = Buffer.byteLength(line, "utf-8") + (outputLinesArr.length > 0 ? 1 : 0);
91
+ if (outputBytesCount + lineBytes > maxBytes) {
92
+ if (truncatedBy = "bytes", outputLinesArr.length === 0) {
93
+ let truncatedLine = truncateStringToBytesFromEnd(line, maxBytes);
94
+ outputLinesArr.unshift(truncatedLine), outputBytesCount = Buffer.byteLength(truncatedLine, "utf-8"), lastLinePartial = !0;
95
+ }
96
+ break;
97
+ }
98
+ outputLinesArr.unshift(line), outputBytesCount += lineBytes;
99
+ }
100
+ outputLinesArr.length >= maxLines && outputBytesCount <= maxBytes && (truncatedBy = "lines");
101
+ let outputContent = outputLinesArr.join(`
102
+ `), finalOutputBytes = Buffer.byteLength(outputContent, "utf-8");
103
+ return {
104
+ content: outputContent,
105
+ truncated: !0,
106
+ truncatedBy,
107
+ totalLines,
108
+ totalBytes,
109
+ outputLines: outputLinesArr.length,
110
+ outputBytes: finalOutputBytes,
111
+ lastLinePartial,
112
+ firstLineExceedsLimit: !1,
113
+ maxLines,
114
+ maxBytes
115
+ };
116
+ }
117
+ function truncateStringToBytesFromEnd(str, maxBytes) {
118
+ let buf = Buffer.from(str, "utf-8");
119
+ if (buf.length <= maxBytes)
120
+ return str;
121
+ let start = buf.length - maxBytes;
122
+ for (; start < buf.length && (buf[start] & 192) === 128; )
123
+ start++;
124
+ return buf.slice(start).toString("utf-8");
125
+ }
126
+ function truncateLine(line, maxChars = 500) {
127
+ return line.length <= maxChars ? { text: line, wasTruncated: !1 } : { text: `${line.slice(0, maxChars)}... [truncated]`, wasTruncated: !0 };
128
+ }
129
+
130
+ export {
131
+ DEFAULT_MAX_LINES,
132
+ DEFAULT_MAX_BYTES,
133
+ formatSize,
134
+ truncateHead,
135
+ truncateTail,
136
+ truncateLine
137
+ };
@@ -0,0 +1,295 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ getAgentDir
4
+ } from "./chunk-FQMM2EZ2.js";
5
+
6
+ // packages/coding-agent/dist/core/keybindings.js
7
+ import { TUI_KEYBINDINGS, KeybindingsManager as TuiKeybindingsManager } from "@ashx-j/lunr-tui";
8
+ import { existsSync, readFileSync } from "fs";
9
+ import { join } from "path";
10
+ var KEYBINDINGS = {
11
+ ...TUI_KEYBINDINGS,
12
+ "app.interrupt": { defaultKeys: "escape", description: "Cancel or abort" },
13
+ "app.clear": { defaultKeys: "ctrl+c", description: "Clear editor" },
14
+ "app.exit": { defaultKeys: "ctrl+d", description: "Exit when editor is empty" },
15
+ "app.suspend": {
16
+ defaultKeys: process.platform === "win32" ? [] : "ctrl+z",
17
+ description: "Suspend to background"
18
+ },
19
+ "app.thinking.cycle": {
20
+ defaultKeys: "ctrl+t",
21
+ description: "Cycle thinking level"
22
+ },
23
+ "app.mode.cycle": {
24
+ defaultKeys: "shift+tab",
25
+ description: "Cycle permission mode"
26
+ },
27
+ "app.model.cycleForward": {
28
+ defaultKeys: "ctrl+p",
29
+ description: "Cycle to next model"
30
+ },
31
+ "app.model.cycleBackward": {
32
+ defaultKeys: "shift+ctrl+p",
33
+ description: "Cycle to previous model"
34
+ },
35
+ "app.model.select": { defaultKeys: "ctrl+l", description: "Open model selector" },
36
+ "app.tools.expand": { defaultKeys: [], description: "Toggle tool output (unbound; click a card instead)" },
37
+ "app.chat.pageUp": {
38
+ defaultKeys: ["shift+pageUp", "ctrl+up"],
39
+ description: "Scroll chat up"
40
+ },
41
+ "app.chat.pageDown": {
42
+ defaultKeys: ["shift+pageDown", "ctrl+down"],
43
+ description: "Scroll chat down"
44
+ },
45
+ "app.thinking.toggle": {
46
+ defaultKeys: [],
47
+ description: "Toggle thinking blocks"
48
+ },
49
+ "app.session.toggleNamedFilter": {
50
+ defaultKeys: "ctrl+n",
51
+ description: "Toggle named session filter"
52
+ },
53
+ "app.editor.external": {
54
+ defaultKeys: "ctrl+g",
55
+ description: "Open external editor"
56
+ },
57
+ "app.message.copy": {
58
+ defaultKeys: "ctrl+x",
59
+ description: "Copy message to clipboard"
60
+ },
61
+ "app.message.followUp": {
62
+ defaultKeys: "alt+enter",
63
+ description: "Queue follow-up message"
64
+ },
65
+ "app.message.dequeue": {
66
+ defaultKeys: "alt+up",
67
+ description: "Restore queued messages"
68
+ },
69
+ "app.clipboard.pasteImage": {
70
+ defaultKeys: process.platform === "win32" ? "alt+v" : "ctrl+v",
71
+ description: "Paste image from clipboard (text fallback)"
72
+ },
73
+ "app.session.new": { defaultKeys: [], description: "Start a new session" },
74
+ "app.session.tree": { defaultKeys: [], description: "Open session tree" },
75
+ "app.session.fork": { defaultKeys: [], description: "Fork current session" },
76
+ "app.session.resume": { defaultKeys: [], description: "Resume a session" },
77
+ "app.tree.foldOrUp": {
78
+ defaultKeys: process.platform === "darwin" ? ["alt+left", "ctrl+left"] : ["ctrl+left", "alt+left"],
79
+ description: "Fold tree branch or move up"
80
+ },
81
+ "app.tree.unfoldOrDown": {
82
+ defaultKeys: process.platform === "darwin" ? ["alt+right", "ctrl+right"] : ["ctrl+right", "alt+right"],
83
+ description: "Unfold tree branch or move down"
84
+ },
85
+ "app.tree.editLabel": {
86
+ defaultKeys: "shift+l",
87
+ description: "Edit tree label"
88
+ },
89
+ "app.tree.toggleLabelTimestamp": {
90
+ defaultKeys: "shift+t",
91
+ description: "Toggle tree label timestamps"
92
+ },
93
+ "app.session.togglePath": {
94
+ defaultKeys: "ctrl+p",
95
+ description: "Toggle session path display"
96
+ },
97
+ "app.session.toggleSort": {
98
+ defaultKeys: "ctrl+s",
99
+ description: "Toggle session sort mode"
100
+ },
101
+ "app.session.rename": {
102
+ defaultKeys: "ctrl+r",
103
+ description: "Rename session"
104
+ },
105
+ "app.session.delete": {
106
+ defaultKeys: "ctrl+d",
107
+ description: "Delete session"
108
+ },
109
+ "app.session.deleteNoninvasive": {
110
+ defaultKeys: "ctrl+backspace",
111
+ description: "Delete session when query is empty"
112
+ },
113
+ "app.models.save": {
114
+ defaultKeys: "ctrl+s",
115
+ description: "Save model selection"
116
+ },
117
+ "app.models.enableAll": {
118
+ defaultKeys: "ctrl+a",
119
+ description: "Enable all models"
120
+ },
121
+ "app.models.clearAll": {
122
+ defaultKeys: "ctrl+x",
123
+ description: "Clear all models"
124
+ },
125
+ "app.models.toggleProvider": {
126
+ defaultKeys: "ctrl+p",
127
+ description: "Toggle all models for provider"
128
+ },
129
+ "app.models.reorderUp": {
130
+ defaultKeys: "alt+up",
131
+ description: "Move model up in order"
132
+ },
133
+ "app.models.reorderDown": {
134
+ defaultKeys: "alt+down",
135
+ description: "Move model down in order"
136
+ },
137
+ "app.tree.filter.default": {
138
+ defaultKeys: "ctrl+d",
139
+ description: "Tree filter: default view"
140
+ },
141
+ "app.tree.filter.noTools": {
142
+ defaultKeys: "ctrl+t",
143
+ description: "Tree filter: hide tool results"
144
+ },
145
+ "app.tree.filter.userOnly": {
146
+ defaultKeys: "ctrl+u",
147
+ description: "Tree filter: user messages only"
148
+ },
149
+ "app.tree.filter.labeledOnly": {
150
+ defaultKeys: "ctrl+l",
151
+ description: "Tree filter: labeled entries only"
152
+ },
153
+ "app.tree.filter.all": {
154
+ defaultKeys: "ctrl+a",
155
+ description: "Tree filter: show all entries"
156
+ },
157
+ "app.tree.filter.cycleForward": {
158
+ defaultKeys: "ctrl+o",
159
+ description: "Tree filter: cycle forward"
160
+ },
161
+ "app.tree.filter.cycleBackward": {
162
+ defaultKeys: "shift+ctrl+o",
163
+ description: "Tree filter: cycle backward"
164
+ }
165
+ }, KEYBINDING_NAME_MIGRATIONS = {
166
+ cursorUp: "tui.editor.cursorUp",
167
+ cursorDown: "tui.editor.cursorDown",
168
+ cursorLeft: "tui.editor.cursorLeft",
169
+ cursorRight: "tui.editor.cursorRight",
170
+ cursorWordLeft: "tui.editor.cursorWordLeft",
171
+ cursorWordRight: "tui.editor.cursorWordRight",
172
+ cursorLineStart: "tui.editor.cursorLineStart",
173
+ cursorLineEnd: "tui.editor.cursorLineEnd",
174
+ jumpForward: "tui.editor.jumpForward",
175
+ jumpBackward: "tui.editor.jumpBackward",
176
+ pageUp: "tui.editor.pageUp",
177
+ pageDown: "tui.editor.pageDown",
178
+ deleteCharBackward: "tui.editor.deleteCharBackward",
179
+ deleteCharForward: "tui.editor.deleteCharForward",
180
+ deleteWordBackward: "tui.editor.deleteWordBackward",
181
+ deleteWordForward: "tui.editor.deleteWordForward",
182
+ deleteToLineStart: "tui.editor.deleteToLineStart",
183
+ deleteToLineEnd: "tui.editor.deleteToLineEnd",
184
+ yank: "tui.editor.yank",
185
+ yankPop: "tui.editor.yankPop",
186
+ undo: "tui.editor.undo",
187
+ newLine: "tui.input.newLine",
188
+ submit: "tui.input.submit",
189
+ tab: "tui.input.tab",
190
+ copy: "tui.input.copy",
191
+ selectUp: "tui.select.up",
192
+ selectDown: "tui.select.down",
193
+ selectPageUp: "tui.select.pageUp",
194
+ selectPageDown: "tui.select.pageDown",
195
+ selectConfirm: "tui.select.confirm",
196
+ selectCancel: "tui.select.cancel",
197
+ interrupt: "app.interrupt",
198
+ clear: "app.clear",
199
+ exit: "app.exit",
200
+ suspend: "app.suspend",
201
+ cycleThinkingLevel: "app.thinking.cycle",
202
+ cyclePermissionMode: "app.mode.cycle",
203
+ cycleModelForward: "app.model.cycleForward",
204
+ cycleModelBackward: "app.model.cycleBackward",
205
+ selectModel: "app.model.select",
206
+ expandTools: "app.tools.expand",
207
+ toggleThinking: "app.thinking.toggle",
208
+ toggleSessionNamedFilter: "app.session.toggleNamedFilter",
209
+ externalEditor: "app.editor.external",
210
+ followUp: "app.message.followUp",
211
+ dequeue: "app.message.dequeue",
212
+ pasteImage: "app.clipboard.pasteImage",
213
+ newSession: "app.session.new",
214
+ tree: "app.session.tree",
215
+ fork: "app.session.fork",
216
+ resume: "app.session.resume",
217
+ treeFoldOrUp: "app.tree.foldOrUp",
218
+ treeUnfoldOrDown: "app.tree.unfoldOrDown",
219
+ treeEditLabel: "app.tree.editLabel",
220
+ treeToggleLabelTimestamp: "app.tree.toggleLabelTimestamp",
221
+ toggleSessionPath: "app.session.togglePath",
222
+ toggleSessionSort: "app.session.toggleSort",
223
+ renameSession: "app.session.rename",
224
+ deleteSession: "app.session.delete",
225
+ deleteSessionNoninvasive: "app.session.deleteNoninvasive"
226
+ };
227
+ function isLegacyKeybindingName(key) {
228
+ return key in KEYBINDING_NAME_MIGRATIONS;
229
+ }
230
+ function toKeybindingsConfig(value) {
231
+ let config = {};
232
+ for (let [key, binding] of Object.entries(value)) {
233
+ if (typeof binding == "string") {
234
+ config[key] = binding;
235
+ continue;
236
+ }
237
+ Array.isArray(binding) && binding.every((entry) => typeof entry == "string") && (config[key] = binding);
238
+ }
239
+ return config;
240
+ }
241
+ function migrateKeybindingsConfig(rawConfig) {
242
+ let config = {}, migrated = !1;
243
+ for (let [key, value] of Object.entries(rawConfig)) {
244
+ let nextKey = isLegacyKeybindingName(key) ? KEYBINDING_NAME_MIGRATIONS[key] : key;
245
+ if (nextKey !== key && (migrated = !0), key !== nextKey && Object.hasOwn(rawConfig, nextKey)) {
246
+ migrated = !0;
247
+ continue;
248
+ }
249
+ config[nextKey] = value;
250
+ }
251
+ return { config: orderKeybindingsConfig(config), migrated };
252
+ }
253
+ function orderKeybindingsConfig(config) {
254
+ let ordered = {};
255
+ for (let keybinding of Object.keys(KEYBINDINGS))
256
+ Object.hasOwn(config, keybinding) && (ordered[keybinding] = config[keybinding]);
257
+ let extras = Object.keys(config).filter((key) => !Object.hasOwn(ordered, key)).sort();
258
+ for (let key of extras)
259
+ ordered[key] = config[key];
260
+ return ordered;
261
+ }
262
+ function loadRawConfig(path) {
263
+ if (existsSync(path))
264
+ try {
265
+ let parsed = JSON.parse(readFileSync(path, "utf-8"));
266
+ return typeof parsed != "object" || parsed === null ? void 0 : parsed;
267
+ } catch {
268
+ return;
269
+ }
270
+ }
271
+ var KeybindingsManager = class _KeybindingsManager extends TuiKeybindingsManager {
272
+ configPath;
273
+ constructor(userBindings = {}, configPath) {
274
+ super(KEYBINDINGS, userBindings), this.configPath = configPath;
275
+ }
276
+ static create(agentDir = getAgentDir()) {
277
+ let configPath = join(agentDir, "keybindings.json"), userBindings = _KeybindingsManager.loadFromFile(configPath);
278
+ return new _KeybindingsManager(userBindings, configPath);
279
+ }
280
+ reload() {
281
+ this.configPath && this.setUserBindings(_KeybindingsManager.loadFromFile(this.configPath));
282
+ }
283
+ getEffectiveConfig() {
284
+ return this.getResolvedBindings();
285
+ }
286
+ static loadFromFile(path) {
287
+ let rawConfig = loadRawConfig(path);
288
+ return rawConfig ? toKeybindingsConfig(migrateKeybindingsConfig(rawConfig).config) : {};
289
+ }
290
+ };
291
+
292
+ export {
293
+ migrateKeybindingsConfig,
294
+ KeybindingsManager
295
+ };
@@ -0,0 +1,53 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ theme
4
+ } from "./chunk-RNBHABBA.js";
5
+
6
+ // packages/coding-agent/dist/core/permission-mode.js
7
+ var PERMISSION_MODE_BRIDGE_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/permission-mode"), getModeFn, bridge = {
8
+ getMode() {
9
+ return getModeFn?.();
10
+ }
11
+ };
12
+ function registerPermissionModeBridge(getMode) {
13
+ getModeFn = getMode, globalThis[PERMISSION_MODE_BRIDGE_SYMBOL] = bridge;
14
+ }
15
+
16
+ // packages/coding-agent/dist/modes/interactive/components/boot-screen.js
17
+ import { truncateToWidth, visibleWidth } from "@ashx-j/lunr-tui";
18
+ var BootScreenComponent = class {
19
+ /** Pre-styled first line of the details column (logo + version). */
20
+ header;
21
+ rows;
22
+ constructor(header, rows) {
23
+ this.header = header, this.rows = rows;
24
+ }
25
+ /** lunr: allow refreshing rows on session replacement so the model row stays current. */
26
+ updateRows(rows) {
27
+ this.rows = rows, this.invalidate?.();
28
+ }
29
+ invalidate() {
30
+ }
31
+ render(width) {
32
+ if (width < 12)
33
+ return this.renderContent().map((line) => truncateToWidth(line, width));
34
+ let content = this.renderContent().map((line) => truncateToWidth(line, width - 4)), boxWidth = Math.max(...content.map((line) => visibleWidth(line))) + 4, innerWidth = boxWidth - 4, border = (s) => theme.fg("white", s), rail = (line) => {
35
+ let pad = Math.max(0, innerWidth - visibleWidth(line));
36
+ return border("\u2502 ") + line + " ".repeat(pad) + border(" \u2502");
37
+ }, top = border(`\u256D${"\u2500".repeat(boxWidth - 2)}\u256E`), bottom = border(`\u2570${"\u2500".repeat(boxWidth - 2)}\u256F`);
38
+ return [top, ...content.map(rail), bottom];
39
+ }
40
+ renderContent() {
41
+ let lines = [this.header];
42
+ for (let { label, value } of this.rows) {
43
+ let labelText = `${label}:`;
44
+ lines.push(`${theme.fg("dim", labelText)} ${theme.fg("text", value)}`);
45
+ }
46
+ return lines;
47
+ }
48
+ };
49
+
50
+ export {
51
+ registerPermissionModeBridge,
52
+ BootScreenComponent
53
+ };
@@ -0,0 +1,72 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ CountdownTimer
4
+ } from "./chunk-I6R76AG7.js";
5
+ import {
6
+ DynamicBorder
7
+ } from "./chunk-BOHIDQT4.js";
8
+ import {
9
+ keyHint,
10
+ rawKeyHint
11
+ } from "./chunk-DDWHZ633.js";
12
+ import {
13
+ theme
14
+ } from "./chunk-RNBHABBA.js";
15
+
16
+ // packages/coding-agent/dist/modes/interactive/components/extension-selector.js
17
+ import { Container, getKeybindings, Spacer, Text } from "@ashx-j/lunr-tui";
18
+ var ExtensionSelectorComponent = class extends Container {
19
+ options;
20
+ selectedIndex = 0;
21
+ listContainer;
22
+ onSelectCallback;
23
+ onCancelCallback;
24
+ titleText;
25
+ baseTitle;
26
+ countdown;
27
+ onToggleToolsExpanded;
28
+ /** lunr: allow setting the initial selection (e.g. default to Cancel for disclaimers). */
29
+ setSelectedIndex(index) {
30
+ this.selectedIndex = Math.max(0, Math.min(index, this.options.length - 1)), this.updateList();
31
+ }
32
+ constructor(title, options, onSelect, onCancel, opts) {
33
+ super(), this.options = options, this.onSelectCallback = onSelect, this.onCancelCallback = onCancel, this.onToggleToolsExpanded = opts?.onToggleToolsExpanded, this.baseTitle = title, this.addChild(new DynamicBorder()), this.addChild(new Spacer(1)), this.titleText = new Text(theme.fg("accent", theme.bold(title)), 1, 0), this.addChild(this.titleText), this.addChild(new Spacer(1)), opts?.message && (this.addChild(new Text(theme.fg("text", opts.message), 1, 0)), this.addChild(new Spacer(1))), opts?.timeout && opts.timeout > 0 && opts.tui && (this.countdown = new CountdownTimer(opts.timeout, opts.tui, (s) => this.titleText.setText(theme.fg("accent", theme.bold(`${this.baseTitle} (${s}s)`))), () => this.onCancelCallback())), this.listContainer = new Container(), this.addChild(this.listContainer), this.addChild(new Spacer(1)), this.addChild(new Text(rawKeyHint("\u2191\u2193", "navigate") + " " + rawKeyHint("1-9", "choose") + " " + keyHint("tui.select.confirm", "select") + " " + keyHint("tui.select.cancel", "cancel"), 1, 0)), this.addChild(new Spacer(1)), this.addChild(new DynamicBorder()), this.updateList();
34
+ }
35
+ updateList() {
36
+ this.listContainer.clear();
37
+ for (let i = 0; i < this.options.length; i++) {
38
+ let text = i === this.selectedIndex ? theme.fg("accent", "\u2192 ") + theme.fg("accent", this.options[i]) : ` ${theme.fg("text", this.options[i])}`;
39
+ this.listContainer.addChild(new Text(text, 1, 0));
40
+ }
41
+ }
42
+ handleInput(keyData) {
43
+ let kb = getKeybindings();
44
+ if (kb.matches(keyData, "app.tools.expand"))
45
+ this.onToggleToolsExpanded?.();
46
+ else if (kb.matches(keyData, "tui.select.up") || keyData === "k")
47
+ this.selectedIndex = Math.max(0, this.selectedIndex - 1), this.updateList();
48
+ else if (kb.matches(keyData, "tui.select.down") || keyData === "j")
49
+ this.selectedIndex = Math.min(this.options.length - 1, this.selectedIndex + 1), this.updateList();
50
+ else if (kb.matches(keyData, "tui.select.confirm") || keyData === `
51
+ `) {
52
+ let selected = this.options[this.selectedIndex];
53
+ selected && this.onSelectCallback(selected);
54
+ } else if (kb.matches(keyData, "tui.select.cancel"))
55
+ this.onCancelCallback();
56
+ else if (/^[1-9]$/.test(keyData)) {
57
+ let index = Number(keyData) - 1;
58
+ if (index < this.options.length) {
59
+ this.selectedIndex = index, this.updateList();
60
+ let selected = this.options[this.selectedIndex];
61
+ selected && this.onSelectCallback(selected);
62
+ }
63
+ }
64
+ }
65
+ dispose() {
66
+ this.countdown?.dispose();
67
+ }
68
+ };
69
+
70
+ export {
71
+ ExtensionSelectorComponent
72
+ };
@@ -0,0 +1,26 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+
3
+ // packages/coding-agent/dist/core/permission-mode-control.js
4
+ var PERMISSION_MODE_CONTROL_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/permission-mode-control");
5
+ function nextModeForGoal(current, event, saved) {
6
+ return event === "enter" ? current === "auto" ? { mode: "auto", saved } : saved !== void 0 ? { mode: current, saved } : { mode: "auto", saved: current } : current === "auto" && saved !== void 0 ? { mode: saved, saved: void 0 } : { mode: current, saved: void 0 };
7
+ }
8
+ function registerPermissionModeControlBridge(bridge) {
9
+ globalThis[PERMISSION_MODE_CONTROL_SYMBOL] = bridge;
10
+ }
11
+ function getPermissionModeControlBridge() {
12
+ return globalThis[PERMISSION_MODE_CONTROL_SYMBOL];
13
+ }
14
+ function enterGoalAuto() {
15
+ getPermissionModeControlBridge()?.enterGoalAuto();
16
+ }
17
+ function leaveGoalAuto() {
18
+ getPermissionModeControlBridge()?.leaveGoalAuto();
19
+ }
20
+
21
+ export {
22
+ nextModeForGoal,
23
+ registerPermissionModeControlBridge,
24
+ enterGoalAuto,
25
+ leaveGoalAuto
26
+ };
@@ -0,0 +1,24 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+
3
+ // packages/coding-agent/dist/builtin-extensions/pi-web-access/lazy.js
4
+ var loadExtract = () => import("./extract-XLQSJN4V.js"), loadGeminiSearch = () => import("./gemini-search-U7SUMPQA.js"), loadCuratorServer = () => import("./curator-server-XCM43VEF.js"), loadSummaryReview = () => import("./summary-review-YSMXKITO.js"), loadGeminiWeb = () => import("./gemini-web-MM446SEH.js"), loadGeminiApi = () => import("./gemini-api-QE7ANVDZ.js"), loadOpenAISearch = () => import("./openai-search-B3MSNCQA.js"), loadBrave = () => import("./brave-UWDA3I22.js"), loadParallel = () => import("./parallel-AI2MNSCU.js"), loadTavily = () => import("./tavily-WEZFVFP7.js"), loadPerplexity = () => import("./perplexity-QVJW3I35.js"), loadExa = () => import("./exa-LL64QZR2.js"), loadGithubExtract = () => import("./github-extract-F64RZOEA.js"), loadPdfExtract = () => import("./pdf-extract-IPE6H4HP.js"), loadYoutubeExtract = () => import("./youtube-extract-TQYKGFGS.js"), loadVideoExtract = () => import("./video-extract-OYT5WKS5.js"), loadGeminiUrlContext = () => import("./gemini-url-context-PXWCBQHK.js");
5
+
6
+ export {
7
+ loadExtract,
8
+ loadGeminiSearch,
9
+ loadCuratorServer,
10
+ loadSummaryReview,
11
+ loadGeminiWeb,
12
+ loadGeminiApi,
13
+ loadOpenAISearch,
14
+ loadBrave,
15
+ loadParallel,
16
+ loadTavily,
17
+ loadPerplexity,
18
+ loadExa,
19
+ loadGithubExtract,
20
+ loadPdfExtract,
21
+ loadYoutubeExtract,
22
+ loadVideoExtract,
23
+ loadGeminiUrlContext
24
+ };