@ashx-j/lunr 0.2.16 → 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 (349) hide show
  1. package/CHANGELOG.md +25 -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/extension/schemas.d.ts.map +1 -1
  56. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +6 -2
  57. package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
  58. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts +1 -1
  59. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
  60. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +5 -2
  61. package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
  62. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.d.ts +10 -0
  63. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.d.ts.map +1 -0
  64. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.js +38 -0
  65. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.js.map +1 -0
  66. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
  67. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +3 -16
  68. package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
  69. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.d.ts.map +1 -1
  70. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js +1 -1
  71. package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js.map +1 -1
  72. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +1 -1
  73. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
  74. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +1 -1
  75. package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
  76. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -1
  77. package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
  78. package/dist/builtin-extensions/pi-subagents/src/tui/render.js +72 -31
  79. package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
  80. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts +1 -1
  81. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts.map +1 -1
  82. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js +2 -1
  83. package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js.map +1 -1
  84. package/dist/builtin-extensions/pi-web-access/extract.d.ts.map +1 -1
  85. package/dist/builtin-extensions/pi-web-access/extract.js +105 -54
  86. package/dist/builtin-extensions/pi-web-access/extract.js.map +1 -1
  87. package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts +1 -1
  88. package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts.map +1 -1
  89. package/dist/builtin-extensions/pi-web-access/gemini-search.js +82 -65
  90. package/dist/builtin-extensions/pi-web-access/gemini-search.js.map +1 -1
  91. package/dist/builtin-extensions/pi-web-access/github-extract.d.ts.map +1 -1
  92. package/dist/builtin-extensions/pi-web-access/github-extract.js +2 -0
  93. package/dist/builtin-extensions/pi-web-access/github-extract.js.map +1 -1
  94. package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
  95. package/dist/builtin-extensions/pi-web-access/index.js +259 -168
  96. package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
  97. package/dist/builtin-extensions/pi-web-access/lazy.d.ts +18 -0
  98. package/dist/builtin-extensions/pi-web-access/lazy.d.ts.map +1 -0
  99. package/dist/builtin-extensions/pi-web-access/lazy.js +19 -0
  100. package/dist/builtin-extensions/pi-web-access/lazy.js.map +1 -0
  101. package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts +6 -0
  102. package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts.map +1 -0
  103. package/dist/builtin-extensions/pi-web-access/session-cleanup.js +17 -0
  104. package/dist/builtin-extensions/pi-web-access/session-cleanup.js.map +1 -0
  105. package/dist/cli-runtime.d.ts +3 -0
  106. package/dist/cli-runtime.d.ts.map +1 -0
  107. package/dist/cli-runtime.js +72 -0
  108. package/dist/cli-runtime.js.map +1 -0
  109. package/dist/cli.d.ts.map +1 -1
  110. package/dist/cli.js +11 -60
  111. package/dist/cli.js.map +1 -1
  112. package/dist/config.d.ts +1 -0
  113. package/dist/config.d.ts.map +1 -1
  114. package/dist/config.js +1 -0
  115. package/dist/config.js.map +1 -1
  116. package/dist/core/agent-session.d.ts.map +1 -1
  117. package/dist/core/agent-session.js +6 -3
  118. package/dist/core/agent-session.js.map +1 -1
  119. package/dist/core/extensions/host-static.d.ts.map +1 -1
  120. package/dist/core/extensions/host-static.js +34 -12
  121. package/dist/core/extensions/host-static.js.map +1 -1
  122. package/dist/core/extensions/loader.d.ts +1 -2
  123. package/dist/core/extensions/loader.d.ts.map +1 -1
  124. package/dist/core/extensions/loader.js +10 -64
  125. package/dist/core/extensions/loader.js.map +1 -1
  126. package/dist/core/keybindings.d.ts +2 -2
  127. package/dist/core/keybindings.d.ts.map +1 -1
  128. package/dist/core/keybindings.js +2 -2
  129. package/dist/core/keybindings.js.map +1 -1
  130. package/dist/core/package-manager.d.ts.map +1 -1
  131. package/dist/core/package-manager.js +1 -1
  132. package/dist/core/package-manager.js.map +1 -1
  133. package/dist/core/sdk.d.ts +1 -1
  134. package/dist/core/sdk.d.ts.map +1 -1
  135. package/dist/core/sdk.js +1 -1
  136. package/dist/core/sdk.js.map +1 -1
  137. package/dist/core/timings.d.ts +2 -1
  138. package/dist/core/timings.d.ts.map +1 -1
  139. package/dist/core/timings.js +17 -2
  140. package/dist/core/timings.js.map +1 -1
  141. package/dist/gateway/agent-bridge.d.ts +6 -1
  142. package/dist/gateway/agent-bridge.d.ts.map +1 -1
  143. package/dist/gateway/agent-bridge.js +23 -6
  144. package/dist/gateway/agent-bridge.js.map +1 -1
  145. package/dist/gateway/cron.d.ts +1 -1
  146. package/dist/gateway/cron.d.ts.map +1 -1
  147. package/dist/gateway/cron.js +3 -1
  148. package/dist/gateway/cron.js.map +1 -1
  149. package/dist/main.d.ts.map +1 -1
  150. package/dist/main.js +20 -14
  151. package/dist/main.js.map +1 -1
  152. package/dist/modes/interactive/injected-context.d.ts +2 -0
  153. package/dist/modes/interactive/injected-context.d.ts.map +1 -0
  154. package/dist/modes/interactive/injected-context.js +7 -0
  155. package/dist/modes/interactive/injected-context.js.map +1 -0
  156. package/dist/modes/interactive/interactive-mode.d.ts +2 -0
  157. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  158. package/dist/modes/interactive/interactive-mode.js +32 -8
  159. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  160. package/dist/modes/interactive/thinking-level-slash.d.ts +4 -0
  161. package/dist/modes/interactive/thinking-level-slash.d.ts.map +1 -0
  162. package/dist/modes/interactive/thinking-level-slash.js +23 -0
  163. package/dist/modes/interactive/thinking-level-slash.js.map +1 -0
  164. package/dist/node-runtime/agent-session-services-35WNVGMR.js +36 -0
  165. package/dist/node-runtime/benchmark-request-UC7PD3V3.js +57 -0
  166. package/dist/node-runtime/brave-UWDA3I22.js +143 -0
  167. package/dist/node-runtime/builtin-extensions-QATGXENO.js +28 -0
  168. package/dist/node-runtime/chunk-2SJB2AWP.js +47 -0
  169. package/dist/node-runtime/chunk-3NMWLTPV.js +64 -0
  170. package/dist/node-runtime/chunk-3WFAEVKS.js +115 -0
  171. package/dist/node-runtime/chunk-3X3KZKMI.js +49 -0
  172. package/dist/node-runtime/chunk-4CSFRBCN.js +7558 -0
  173. package/dist/node-runtime/chunk-4DJ6HEGH.js +296 -0
  174. package/dist/node-runtime/chunk-4HXHDDCF.js +16 -0
  175. package/dist/node-runtime/chunk-4I23VTC4.js +429 -0
  176. package/dist/node-runtime/chunk-4TLO4PO2.js +3427 -0
  177. package/dist/node-runtime/chunk-4ZWGEEAS.js +69 -0
  178. package/dist/node-runtime/chunk-53YJI7JU.js +137 -0
  179. package/dist/node-runtime/chunk-5EFIU3OM.js +295 -0
  180. package/dist/node-runtime/chunk-6BEIBLQ3.js +53 -0
  181. package/dist/node-runtime/chunk-6KDIOJL3.js +72 -0
  182. package/dist/node-runtime/chunk-7N3YHTYF.js +26 -0
  183. package/dist/node-runtime/chunk-7NBZ5P7I.js +24 -0
  184. package/dist/node-runtime/chunk-AD6VXAO7.js +342 -0
  185. package/dist/node-runtime/chunk-ARC4KOTI.js +11178 -0
  186. package/dist/node-runtime/chunk-AROOY4BB.js +173 -0
  187. package/dist/node-runtime/chunk-ATGA2WLC.js +5646 -0
  188. package/dist/node-runtime/chunk-AUXVGBO4.js +19 -0
  189. package/dist/node-runtime/chunk-AY6CAJSL.js +30 -0
  190. package/dist/node-runtime/chunk-BHO7O6E5.js +296 -0
  191. package/dist/node-runtime/chunk-BI3DHYCN.js +8845 -0
  192. package/dist/node-runtime/chunk-BOHIDQT4.js +21 -0
  193. package/dist/node-runtime/chunk-BRJX2PRC.js +53 -0
  194. package/dist/node-runtime/chunk-CBGB57XT.js +20211 -0
  195. package/dist/node-runtime/chunk-CCZJ3PYY.js +17 -0
  196. package/dist/node-runtime/chunk-CGBXPL3E.js +1171 -0
  197. package/dist/node-runtime/chunk-CJECDQKP.js +19 -0
  198. package/dist/node-runtime/chunk-CSFI6YXL.js +130 -0
  199. package/dist/node-runtime/chunk-DAPBPCBP.js +53 -0
  200. package/dist/node-runtime/chunk-DDWHZ633.js +37 -0
  201. package/dist/node-runtime/chunk-DMMTJQMQ.js +43 -0
  202. package/dist/node-runtime/chunk-DVGWF6A2.js +1180 -0
  203. package/dist/node-runtime/chunk-EBF6COVM.js +1734 -0
  204. package/dist/node-runtime/chunk-FQMM2EZ2.js +248 -0
  205. package/dist/node-runtime/chunk-FVDOXRUD.js +96 -0
  206. package/dist/node-runtime/chunk-G4P75AIS.js +9471 -0
  207. package/dist/node-runtime/chunk-G6LRAP36.js +105 -0
  208. package/dist/node-runtime/chunk-GKLEQ3I4.js +860 -0
  209. package/dist/node-runtime/chunk-H2EOZYMP.js +57 -0
  210. package/dist/node-runtime/chunk-HQCKFM2O.js +56 -0
  211. package/dist/node-runtime/chunk-HYHJIRDW.js +19 -0
  212. package/dist/node-runtime/chunk-I6R76AG7.js +22 -0
  213. package/dist/node-runtime/chunk-IRPJXI6U.js +1269 -0
  214. package/dist/node-runtime/chunk-J26TSGDL.js +633 -0
  215. package/dist/node-runtime/chunk-JZQ7F36T.js +610 -0
  216. package/dist/node-runtime/chunk-KBKMCJDU.js +126 -0
  217. package/dist/node-runtime/chunk-KWA4OC2J.js +100 -0
  218. package/dist/node-runtime/chunk-M3LZLQW2.js +98 -0
  219. package/dist/node-runtime/chunk-MCUNIRD5.js +8388 -0
  220. package/dist/node-runtime/chunk-NI6OTSBH.js +966 -0
  221. package/dist/node-runtime/chunk-NUIFPZWX.js +209 -0
  222. package/dist/node-runtime/chunk-OBMWP3I5.js +68 -0
  223. package/dist/node-runtime/chunk-OCVIXVTZ.js +88 -0
  224. package/dist/node-runtime/chunk-OPEK5RRY.js +466 -0
  225. package/dist/node-runtime/chunk-OR4L3IB2.js +42 -0
  226. package/dist/node-runtime/chunk-PL6JKXWI.js +3622 -0
  227. package/dist/node-runtime/chunk-PNJSG3IZ.js +807 -0
  228. package/dist/node-runtime/chunk-PVCDKGR6.js +55 -0
  229. package/dist/node-runtime/chunk-Q4Q6D4IY.js +364 -0
  230. package/dist/node-runtime/chunk-Q5ZU2VRT.js +83 -0
  231. package/dist/node-runtime/chunk-QFWG2RVL.js +5477 -0
  232. package/dist/node-runtime/chunk-QZMODZQ2.js +305 -0
  233. package/dist/node-runtime/chunk-R5EDISSV.js +375 -0
  234. package/dist/node-runtime/chunk-RNBHABBA.js +986 -0
  235. package/dist/node-runtime/chunk-RQ2Q5IYR.js +72 -0
  236. package/dist/node-runtime/chunk-RRIZE6QQ.js +17 -0
  237. package/dist/node-runtime/chunk-SN6G4OU6.js +4753 -0
  238. package/dist/node-runtime/chunk-STERBGUB.js +949 -0
  239. package/dist/node-runtime/chunk-UWQYRSYQ.js +8973 -0
  240. package/dist/node-runtime/chunk-VRB2IYGG.js +53 -0
  241. package/dist/node-runtime/chunk-VSELYKWU.js +772 -0
  242. package/dist/node-runtime/chunk-W3CVH5RX.js +62 -0
  243. package/dist/node-runtime/chunk-WJVFOIB5.js +24921 -0
  244. package/dist/node-runtime/chunk-WKDK4C5P.js +2834 -0
  245. package/dist/node-runtime/chunk-XATUM2HK.js +46 -0
  246. package/dist/node-runtime/chunk-XBWPBZBN.js +125 -0
  247. package/dist/node-runtime/chunk-XTHQ7XR7.js +509 -0
  248. package/dist/node-runtime/chunk-ZBV7FAHG.js +1345 -0
  249. package/dist/node-runtime/cli-runtime.js +80 -0
  250. package/dist/node-runtime/clipboard-OZ63BBC6.js +12 -0
  251. package/dist/node-runtime/clipboard-image-7QR6GXVA.js +13 -0
  252. package/dist/node-runtime/command-AAV3YRR5.js +13 -0
  253. package/dist/node-runtime/commands-MV5KOZ64.js +291 -0
  254. package/dist/node-runtime/config-QDD5PUE2.js +73 -0
  255. package/dist/node-runtime/curator-server-XCM43VEF.js +3816 -0
  256. package/dist/node-runtime/customize-XEXL2DGQ.js +12 -0
  257. package/dist/node-runtime/direct-tool-executor-BK7CLEBX.js +188 -0
  258. package/dist/node-runtime/exa-LL64QZR2.js +329 -0
  259. package/dist/node-runtime/export-html-TEXVV5RP.js +150 -0
  260. package/dist/node-runtime/extension-input-O4HSAEM4.js +14 -0
  261. package/dist/node-runtime/extension-selector-X5FCX43D.js +14 -0
  262. package/dist/node-runtime/extract-XLQSJN4V.js +17 -0
  263. package/dist/node-runtime/file-sync-HCOP2QVF.js +117 -0
  264. package/dist/node-runtime/gateway-OAC4OBBL.js +2137 -0
  265. package/dist/node-runtime/gemini-api-QE7ANVDZ.js +29 -0
  266. package/dist/node-runtime/gemini-search-U7SUMPQA.js +330 -0
  267. package/dist/node-runtime/gemini-url-context-PXWCBQHK.js +103 -0
  268. package/dist/node-runtime/gemini-web-MM446SEH.js +14 -0
  269. package/dist/node-runtime/github-extract-F64RZOEA.js +619 -0
  270. package/dist/node-runtime/goal-NJEE5CTU.js +1831 -0
  271. package/dist/node-runtime/index.js +859 -0
  272. package/dist/node-runtime/init-3C7Z24OI.js +28 -0
  273. package/dist/node-runtime/install-cli-EXMJQESX.js +308 -0
  274. package/dist/node-runtime/interactive-mode-2SZUO53H.js +56 -0
  275. package/dist/node-runtime/interactive-view-S6J3QHEF.js +247 -0
  276. package/dist/node-runtime/lsp-manager-3ASUSO4T.js +1104 -0
  277. package/dist/node-runtime/lunr-cron-AUUYP4N4.js +272 -0
  278. package/dist/node-runtime/main.js +54 -0
  279. package/dist/node-runtime/mcp-auth-flow-QIXHW6QN.js +32 -0
  280. package/dist/node-runtime/mcp-panel-IIGMXQGP.js +501 -0
  281. package/dist/node-runtime/mcp-setup-panel-FEK7663I.js +355 -0
  282. package/dist/node-runtime/memory-cap-3S4XRLNP.js +20 -0
  283. package/dist/node-runtime/model-tiers-NJLHUEGK.js +20 -0
  284. package/dist/node-runtime/openai-search-B3MSNCQA.js +288 -0
  285. package/dist/node-runtime/package-manager-cli-7RKSZGEN.js +749 -0
  286. package/dist/node-runtime/parallel-AI2MNSCU.js +265 -0
  287. package/dist/node-runtime/parser-manager-TQHWYDH7.js +152 -0
  288. package/dist/node-runtime/pdf-extract-IPE6H4HP.js +57 -0
  289. package/dist/node-runtime/perplexity-QVJW3I35.js +12 -0
  290. package/dist/node-runtime/pi-intercom-EEMBGQID.js +2215 -0
  291. package/dist/node-runtime/pi-mcp-adapter-GUFZWW54.js +428 -0
  292. package/dist/node-runtime/pi-ollama-cloud-2F3Y2QNM.js +1440 -0
  293. package/dist/node-runtime/pi-prompt-template-model-QWTCGLJU.js +3946 -0
  294. package/dist/node-runtime/pi-subagents-7YJ3I4VE.js +6048 -0
  295. package/dist/node-runtime/pi-web-access-2CQGFLT2.js +1867 -0
  296. package/dist/node-runtime/print-mode-XSFM26EL.js +12 -0
  297. package/dist/node-runtime/proxy-modes-V6YVFH3C.js +685 -0
  298. package/dist/node-runtime/rpc-entry.js +62 -0
  299. package/dist/node-runtime/rpc-mode-W5ZTLTMZ.js +13 -0
  300. package/dist/node-runtime/runtime-bridges-3RKBDLNA.js +14 -0
  301. package/dist/node-runtime/session-manager-E7AREDTV.js +33 -0
  302. package/dist/node-runtime/session-selector-FJ7M2AIX.js +14 -0
  303. package/dist/node-runtime/settings-manager-GHPTUN7R.js +21 -0
  304. package/dist/node-runtime/src-BPQFJR76.js +2427 -0
  305. package/dist/node-runtime/subagent-executor-5Q5A4HJ2.js +8499 -0
  306. package/dist/node-runtime/summary-review-YSMXKITO.js +228 -0
  307. package/dist/node-runtime/tavily-WEZFVFP7.js +154 -0
  308. package/dist/node-runtime/timings-UAD5BEAS.js +16 -0
  309. package/dist/node-runtime/tool-renderer-MV5O452K.js +204 -0
  310. package/dist/node-runtime/update-cli-L3JIBH2U.js +70 -0
  311. package/dist/node-runtime/v4-5MNC3H7G.js +424 -0
  312. package/dist/node-runtime/video-extract-OYT5WKS5.js +304 -0
  313. package/dist/node-runtime/workspace-index-6DBXSTJ6.js +163 -0
  314. package/dist/node-runtime/youtube-extract-TQYKGFGS.js +264 -0
  315. package/dist/rpc.d.ts +3 -0
  316. package/dist/rpc.d.ts.map +1 -0
  317. package/dist/rpc.js +18 -0
  318. package/dist/rpc.js.map +1 -0
  319. package/dist/startup/benchmark-request.d.ts +3 -0
  320. package/dist/startup/benchmark-request.d.ts.map +1 -0
  321. package/dist/startup/benchmark-request.js +65 -0
  322. package/dist/startup/benchmark-request.js.map +1 -0
  323. package/dist/startup/interactive-view.d.ts.map +1 -1
  324. package/dist/startup/interactive-view.js +1 -2
  325. package/dist/startup/interactive-view.js.map +1 -1
  326. package/dist/startup/startup-milestones.d.ts +1 -1
  327. package/dist/startup/startup-milestones.d.ts.map +1 -1
  328. package/dist/startup/startup-milestones.js.map +1 -1
  329. package/dist/utils/await-with-abort.d.ts +2 -0
  330. package/dist/utils/await-with-abort.d.ts.map +1 -0
  331. package/dist/utils/await-with-abort.js +19 -0
  332. package/dist/utils/await-with-abort.js.map +1 -0
  333. package/docs/development.md +5 -1
  334. package/docs/features.md +2 -2
  335. package/docs/interactive-startup.md +95 -48
  336. package/docs/keybindings.md +2 -2
  337. package/docs/terminal-setup.md +1 -1
  338. package/docs/usage.md +1 -1
  339. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  340. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  341. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  342. package/examples/extensions/gondolin/package-lock.json +2 -2
  343. package/examples/extensions/gondolin/package.json +1 -1
  344. package/examples/extensions/hidden-thinking-label.ts +1 -1
  345. package/examples/extensions/sandbox/package-lock.json +2 -2
  346. package/examples/extensions/sandbox/package.json +1 -1
  347. package/examples/extensions/with-deps/package-lock.json +2 -2
  348. package/examples/extensions/with-deps/package.json +1 -1
  349. package/package.json +8 -8
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
3
+ import {
4
+ parseArgs
5
+ } from "./chunk-QZMODZQ2.js";
6
+ import {
7
+ markStartupMilestone
8
+ } from "./chunk-CCZJ3PYY.js";
9
+ import {
10
+ isNodeBundle
11
+ } from "./chunk-FQMM2EZ2.js";
12
+ import "./chunk-Q4Q6D4IY.js";
13
+ import "./chunk-BRJX2PRC.js";
14
+
15
+ // packages/coding-agent/dist/cli-runtime.js
16
+ import { enableCompileCache } from "node:module";
17
+ import { homedir } from "node:os";
18
+ import { join } from "node:path";
19
+
20
+ // packages/coding-agent/dist/startup/launch-routing.js
21
+ var DEFERRED_COMMANDS = /* @__PURE__ */ new Set([
22
+ "config",
23
+ "features",
24
+ "gateway",
25
+ "install",
26
+ "list",
27
+ "remove",
28
+ "setup",
29
+ "uninstall",
30
+ "update"
31
+ ]);
32
+ function resolvePreloadLaunchMode(args2, environment) {
33
+ if (DEFERRED_COMMANDS.has(args2[0] ?? ""))
34
+ return "deferred";
35
+ let parsed = parseArgs([...args2]);
36
+ return parsed.help || parsed.version || parsed.print || parsed.export || parsed.listModels !== void 0 || parsed.mode === "rpc" || parsed.mode === "json" ? "deferred" : environment.startupBenchmark || environment.stdinIsTTY && environment.stdoutIsTTY ? "interactive" : "deferred";
37
+ }
38
+
39
+ // packages/coding-agent/dist/cli-runtime.js
40
+ markStartupMilestone("process_entry");
41
+ process.title = "lunr";
42
+ process.stdout.isTTY && process.stdout.write("\x1B]0;lunr\x07");
43
+ if (!isNodeBundle)
44
+ try {
45
+ let agentDir = process.env.PI_CODING_AGENT_DIR?.trim() || join(homedir(), ".lunr", "agent");
46
+ enableCompileCache(join(agentDir, "compile-cache"));
47
+ } catch {
48
+ }
49
+ process.env.PI_CODING_AGENT = "true";
50
+ process.emitWarning = (() => {
51
+ });
52
+ var args = process.argv.slice(2), startupBenchmark = process.env.PI_STARTUP_BENCHMARK === "1", preloadMode = resolvePreloadLaunchMode(args, {
53
+ stdinIsTTY: process.stdin.isTTY === !0,
54
+ stdoutIsTTY: process.stdout.isTTY === !0,
55
+ startupBenchmark
56
+ });
57
+ markStartupMilestone("mode_routed");
58
+ var startupView;
59
+ if (preloadMode === "interactive") {
60
+ let { InteractiveView } = await import("./interactive-view-S6J3QHEF.js");
61
+ startupView = new InteractiveView(), startupView.start(), await startupView.waitForFirstFrame(), startupView.isExitRequested && process.exit(0);
62
+ }
63
+ var startRuntime = async () => {
64
+ let importStarted = performance.now();
65
+ try {
66
+ let [{ APP_NAME }, { main }, { noteImportMain }] = await Promise.all([
67
+ import("./config-QDD5PUE2.js"),
68
+ import("./main.js"),
69
+ import("./timings-UAD5BEAS.js")
70
+ ]);
71
+ noteImportMain(performance.now() - importStarted), process.title = APP_NAME, await main(args, { startupView });
72
+ } catch (error) {
73
+ if (startupBenchmark && console.error(error), startupView && !startupView.isExitRequested)
74
+ process.exitCode = 1, await startupView.fail(error);
75
+ else
76
+ throw error;
77
+ }
78
+ };
79
+ process.once("exit", () => startupView?.stop());
80
+ startupView ? (await Promise.race([startRuntime(), startupView.waitForExit()]), startupView.isExitRequested && process.exit(process.exitCode ?? 0)) : await startRuntime();
@@ -0,0 +1,12 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ copyToClipboard,
4
+ readClipboardText
5
+ } from "./chunk-Q5ZU2VRT.js";
6
+ import "./chunk-NUIFPZWX.js";
7
+ import "./chunk-RQ2Q5IYR.js";
8
+ import "./chunk-BRJX2PRC.js";
9
+ export {
10
+ copyToClipboard,
11
+ readClipboardText
12
+ };
@@ -0,0 +1,13 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ extensionForImageMimeType,
4
+ isWaylandSession,
5
+ readClipboardImage
6
+ } from "./chunk-NUIFPZWX.js";
7
+ import "./chunk-RQ2Q5IYR.js";
8
+ import "./chunk-BRJX2PRC.js";
9
+ export {
10
+ extensionForImageMimeType,
11
+ isWaylandSession,
12
+ readClipboardImage
13
+ };
@@ -0,0 +1,13 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import "./chunk-BRJX2PRC.js";
3
+
4
+ // packages/coding-agent/dist/gateway/command.js
5
+ async function handleGatewayCommand(args) {
6
+ if (args[0] !== "gateway")
7
+ return !1;
8
+ let { runGateway } = await import("./gateway-OAC4OBBL.js"), code = await runGateway(args.slice(1));
9
+ return process.exitCode = code, !0;
10
+ }
11
+ export {
12
+ handleGatewayCommand
13
+ };
@@ -0,0 +1,291 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ buildToolMetadata,
4
+ getFailureAgeSeconds,
5
+ lazyConnect,
6
+ updateMetadataCache,
7
+ updateStatusBar
8
+ } from "./chunk-UWQYRSYQ.js";
9
+ import {
10
+ ensureCompatibilityImports,
11
+ getMcpDiscoverySummary,
12
+ getServerProvenance,
13
+ loadMetadataCache,
14
+ openPath,
15
+ previewCompatibilityImports,
16
+ previewSharedServerEntry,
17
+ previewStarterProjectConfig,
18
+ writeDirectToolsConfig,
19
+ writeSharedServerEntry,
20
+ writeStarterProjectConfig
21
+ } from "./chunk-VSELYKWU.js";
22
+ import {
23
+ authenticate,
24
+ getAuthForUrl,
25
+ removeAuth,
26
+ supportsOAuth
27
+ } from "./chunk-4TLO4PO2.js";
28
+ import {
29
+ getAgentPath
30
+ } from "./chunk-4HXHDDCF.js";
31
+ import "./chunk-BI3DHYCN.js";
32
+ import "./chunk-ARC4KOTI.js";
33
+ import "./chunk-Q4Q6D4IY.js";
34
+ import "./chunk-BRJX2PRC.js";
35
+
36
+ // packages/coding-agent/dist/builtin-extensions/pi-mcp-adapter/onboarding-state.js
37
+ import { existsSync, mkdirSync, readFileSync, writeFileSync, renameSync } from "node:fs";
38
+ import { dirname } from "node:path";
39
+ var DEFAULT_STATE = {
40
+ version: 1,
41
+ sharedConfigHintShown: !1,
42
+ setupCompleted: !1
43
+ };
44
+ function getOnboardingStatePath() {
45
+ return getAgentPath("mcp-onboarding.json");
46
+ }
47
+ function loadOnboardingState() {
48
+ let path = getOnboardingStatePath();
49
+ if (!existsSync(path))
50
+ return { ...DEFAULT_STATE };
51
+ try {
52
+ let raw = JSON.parse(readFileSync(path, "utf-8"));
53
+ return !raw || typeof raw != "object" ? { ...DEFAULT_STATE } : {
54
+ version: 1,
55
+ sharedConfigHintShown: raw.sharedConfigHintShown === !0,
56
+ setupCompleted: raw.setupCompleted === !0,
57
+ lastDiscoveryFingerprint: typeof raw.lastDiscoveryFingerprint == "string" ? raw.lastDiscoveryFingerprint : void 0
58
+ };
59
+ } catch {
60
+ return { ...DEFAULT_STATE };
61
+ }
62
+ }
63
+ function saveOnboardingState(state) {
64
+ let path = getOnboardingStatePath();
65
+ mkdirSync(dirname(path), { recursive: !0 });
66
+ let tmpPath = `${path}.${process.pid}.tmp`;
67
+ writeFileSync(tmpPath, `${JSON.stringify(state, null, 2)}
68
+ `, "utf-8"), renameSync(tmpPath, path);
69
+ }
70
+ function updateOnboardingState(updater) {
71
+ let next = updater(loadOnboardingState());
72
+ return saveOnboardingState(next), next;
73
+ }
74
+ function markSharedConfigHintShown(fingerprint) {
75
+ return updateOnboardingState((state) => ({
76
+ ...state,
77
+ sharedConfigHintShown: !0,
78
+ lastDiscoveryFingerprint: fingerprint ?? state.lastDiscoveryFingerprint
79
+ }));
80
+ }
81
+ function markSetupCompleted(fingerprint) {
82
+ return updateOnboardingState((state) => ({
83
+ ...state,
84
+ setupCompleted: !0,
85
+ lastDiscoveryFingerprint: fingerprint ?? state.lastDiscoveryFingerprint
86
+ }));
87
+ }
88
+
89
+ // packages/coding-agent/dist/builtin-extensions/pi-mcp-adapter/commands.js
90
+ async function showStatus(state, ctx) {
91
+ if (!ctx.hasUI)
92
+ return;
93
+ let lines = ["MCP Server Status:", ""];
94
+ for (let name of Object.keys(state.config.mcpServers)) {
95
+ let connection = state.manager.getConnection(name), metadata = state.toolMetadata.get(name), toolCount = metadata?.length ?? 0, failedAgo = getFailureAgeSeconds(state, name), status = "not connected", statusIcon = "\u25CB", failed = !1;
96
+ connection?.status === "connected" ? (status = "connected", statusIcon = "\u2713") : connection?.status === "needs-auth" ? (status = "needs auth", statusIcon = "\u26A0") : failedAgo !== null ? (status = `failed ${failedAgo}s ago`, statusIcon = "\u2717", failed = !0) : metadata !== void 0 && (status = "cached");
97
+ let toolSuffix = failed ? "" : ` (${toolCount} tools${status === "cached" ? ", cached" : ""})`;
98
+ lines.push(`${statusIcon} ${name}: ${status}${toolSuffix}`);
99
+ }
100
+ Object.keys(state.config.mcpServers).length === 0 && (lines.push("No MCP servers configured"), lines.push("Run /mcp setup to adopt imports or scaffold a starter .mcp.json")), ctx.ui.notify(lines.join(`
101
+ `), "info");
102
+ }
103
+ async function showTools(state, ctx) {
104
+ if (!ctx.hasUI)
105
+ return;
106
+ let allTools = [...state.toolMetadata.values()].flat().map((m) => m.name);
107
+ if (allTools.length === 0) {
108
+ ctx.ui.notify("No MCP tools available", "info");
109
+ return;
110
+ }
111
+ let lines = [
112
+ "MCP Tools:",
113
+ "",
114
+ ...allTools.map((t) => ` ${t}`),
115
+ "",
116
+ `Total: ${allTools.length} tools`
117
+ ];
118
+ ctx.ui.notify(lines.join(`
119
+ `), "info");
120
+ }
121
+ async function reconnectServers(state, ctx, targetServer) {
122
+ if (targetServer && !state.config.mcpServers[targetServer]) {
123
+ ctx.hasUI && ctx.ui.notify(`Server "${targetServer}" not found in config`, "error");
124
+ return;
125
+ }
126
+ let entries = targetServer ? [[targetServer, state.config.mcpServers[targetServer]]] : Object.entries(state.config.mcpServers);
127
+ for (let [name, definition] of entries)
128
+ try {
129
+ await state.manager.close(name);
130
+ let connection = await state.manager.connect(name, definition);
131
+ if (connection.status === "needs-auth") {
132
+ ctx.hasUI && ctx.ui.notify(`MCP: ${name} requires OAuth. Run /mcp-auth ${name} first.`, "warning");
133
+ continue;
134
+ }
135
+ let prefix = state.config.settings?.toolPrefix ?? "server", { metadata, failedTools } = buildToolMetadata(connection.tools, connection.resources, definition, name, prefix);
136
+ state.toolMetadata.set(name, metadata), updateMetadataCache(state, name), state.failureTracker.delete(name), ctx.hasUI && (ctx.ui.notify(`MCP: Reconnected to ${name} (${connection.tools.length} tools, ${connection.resources.length} resources)`, "info"), failedTools.length > 0 && ctx.ui.notify(`MCP: ${name} - ${failedTools.length} tools skipped`, "warning"));
137
+ } catch (error) {
138
+ let message = error instanceof Error ? error.message : String(error);
139
+ state.failureTracker.set(name, Date.now()), ctx.hasUI && ctx.ui.notify(`MCP: Failed to reconnect to ${name}: ${message}`, "error");
140
+ }
141
+ updateStatusBar(state);
142
+ }
143
+ async function authenticateServer(serverName, config, ctx) {
144
+ if (!ctx.hasUI)
145
+ return { ok: !1, message: "OAuth authentication requires an interactive session." };
146
+ let definition = config.mcpServers[serverName];
147
+ if (!definition) {
148
+ let message = `Server "${serverName}" not found in config`;
149
+ return ctx.ui.notify(message, "error"), { ok: !1, message };
150
+ }
151
+ if (!supportsOAuth(definition)) {
152
+ let message = `Server "${serverName}" does not use OAuth authentication. Set "auth": "oauth" or omit auth for auto-detection.`;
153
+ return ctx.ui.notify(`Server "${serverName}" does not use OAuth authentication.
154
+ Set "auth": "oauth" or omit auth for auto-detection.`, "error"), { ok: !1, message };
155
+ }
156
+ if (!definition.url) {
157
+ let message = `Server "${serverName}" has no URL configured (OAuth requires HTTP transport)`;
158
+ return ctx.ui.notify(message, "error"), { ok: !1, message };
159
+ }
160
+ try {
161
+ if (ctx.ui.setStatus("mcp-auth", `Authenticating ${serverName}...`), await authenticate(serverName, definition.url, definition, {
162
+ onAuthorizationUrl: (authorizationUrl) => {
163
+ ctx.ui.notify(`Open this URL to authenticate ${serverName}:
164
+
165
+ ${authorizationUrl}
166
+
167
+ After approving, return to Pi; the local callback will complete automatically.`, "info");
168
+ }
169
+ }) === "authenticated") {
170
+ let message2 = `OAuth authentication successful for "${serverName}"! Run /mcp reconnect ${serverName} to connect with the new token.`;
171
+ return ctx.ui.notify(`OAuth authentication successful for "${serverName}"!
172
+ Run /mcp reconnect ${serverName} to connect with the new token.`, "info"), { ok: !0, message: message2 };
173
+ }
174
+ let message = `OAuth authentication failed for "${serverName}".`;
175
+ return ctx.ui.notify(message, "error"), { ok: !1, message };
176
+ } catch (error) {
177
+ let message = error instanceof Error ? error.message : String(error);
178
+ return ctx.ui.notify(`Failed to authenticate "${serverName}": ${message}`, "error"), { ok: !1, message };
179
+ } finally {
180
+ ctx.ui.setStatus("mcp-auth", void 0);
181
+ }
182
+ }
183
+ async function logoutServer(serverName, state, ctx) {
184
+ if (!state.config.mcpServers[serverName]) {
185
+ let message2 = `Server "${serverName}" not found in config`;
186
+ return ctx.hasUI && ctx.ui.notify(message2, "error"), { ok: !1, message: message2 };
187
+ }
188
+ await removeAuth(serverName), await state.manager.close(serverName), updateStatusBar(state);
189
+ let message = `OAuth credentials cleared for "${serverName}". Run /mcp-auth ${serverName} to authenticate again.`;
190
+ return ctx.hasUI && ctx.ui.notify(message, "info"), { ok: !0, message };
191
+ }
192
+ function buildSharedConfigNoticeLines(configOverridePath, cwd) {
193
+ let discovery = getMcpDiscoverySummary(configOverridePath, cwd), onboardingState = loadOnboardingState();
194
+ return !discovery.hasSharedServers || onboardingState.sharedConfigHintShown ? { lines: [], fingerprint: null } : {
195
+ lines: [
196
+ `Using standard MCP config from ${discovery.sources.filter((source) => source.kind === "shared" && source.serverCount > 0).map((source) => source.path).join(", ")}.`,
197
+ "Pi only writes compatibility imports and adapter-specific overrides into Pi-owned files when needed."
198
+ ],
199
+ fingerprint: discovery.fingerprint
200
+ };
201
+ }
202
+ async function openMcpSetup(_state, pi, ctx, configOverridePath, mode = "setup") {
203
+ if (!ctx.hasUI)
204
+ return { configChanged: !1 };
205
+ let discovery = getMcpDiscoverySummary(configOverridePath, ctx.cwd), onboardingState = loadOnboardingState(), { createMcpSetupPanel } = await import("./mcp-setup-panel-FEK7663I.js"), configChanged = !1, callbacks = {
206
+ previewImports: (imports) => previewCompatibilityImports(imports, configOverridePath),
207
+ previewStarterProject: () => previewStarterProjectConfig(ctx.cwd),
208
+ previewRepoPrompt: () => {
209
+ let repoPrompt = getMcpDiscoverySummary(configOverridePath, ctx.cwd).repoPrompt;
210
+ return !repoPrompt.entry || !repoPrompt.targetPath || !repoPrompt.serverName ? null : previewSharedServerEntry(repoPrompt.targetPath, repoPrompt.serverName, repoPrompt.entry);
211
+ },
212
+ adoptImports: async (imports) => {
213
+ let result = ensureCompatibilityImports(imports, configOverridePath);
214
+ return result.added.length > 0 && (configChanged = !0), result;
215
+ },
216
+ scaffoldProjectConfig: async () => {
217
+ let path = writeStarterProjectConfig(ctx.cwd);
218
+ return configChanged = !0, { path };
219
+ },
220
+ addRepoPrompt: async () => {
221
+ let repoPrompt = getMcpDiscoverySummary(configOverridePath, ctx.cwd).repoPrompt;
222
+ if (!repoPrompt.entry || !repoPrompt.targetPath || !repoPrompt.serverName)
223
+ throw new Error("RepoPrompt is not available to add from this setup screen.");
224
+ let path = writeSharedServerEntry(repoPrompt.targetPath, repoPrompt.serverName, repoPrompt.entry);
225
+ return configChanged = !0, { path, serverName: repoPrompt.serverName };
226
+ },
227
+ openPath: async (targetPath) => {
228
+ await openPath(pi, targetPath);
229
+ },
230
+ markSetupCompleted: () => {
231
+ markSetupCompleted(discovery.fingerprint);
232
+ }
233
+ };
234
+ return new Promise((resolve) => {
235
+ ctx.ui.custom((tui, _theme, keybindings, done) => createMcpSetupPanel(discovery, callbacks, { mode, onboardingState, keybindings }, tui, () => {
236
+ done(void 0), resolve({ configChanged });
237
+ }), { overlay: !0, overlayOptions: { anchor: "center", width: 92 } });
238
+ });
239
+ }
240
+ function buildMcpPanelCallbacks(state, config, ctx) {
241
+ return {
242
+ reconnect: (serverName) => lazyConnect(state, serverName),
243
+ canAuthenticate: (serverName) => {
244
+ let definition = config.mcpServers[serverName];
245
+ return definition ? supportsOAuth(definition) : !1;
246
+ },
247
+ authenticate: (serverName) => authenticateServer(serverName, config, ctx),
248
+ getConnectionStatus: (serverName) => {
249
+ let definition = config.mcpServers[serverName], connection = state.manager.getConnection(serverName);
250
+ return connection?.status === "needs-auth" || definition?.auth === "oauth" && definition.url && definition.oauth !== !1 && definition.oauth?.grantType !== "client_credentials" && !getAuthForUrl(serverName, definition.url)?.tokens ? "needs-auth" : connection?.status === "connected" ? "connected" : getFailureAgeSeconds(state, serverName) !== null ? "failed" : "idle";
251
+ },
252
+ refreshCacheAfterReconnect: (serverName) => loadMetadataCache()?.servers?.[serverName] ?? null
253
+ };
254
+ }
255
+ async function openMcpPanel(state, pi, ctx, configOverridePath) {
256
+ if (Object.keys(state.config.mcpServers).length === 0)
257
+ return openMcpSetup(state, pi, ctx, configOverridePath, "empty");
258
+ let config = state.config, cache = loadMetadataCache(), configPath = pi.getFlag("mcp-config") ?? configOverridePath, provenanceMap = getServerProvenance(configPath, ctx.cwd), { lines: noticeLines, fingerprint } = buildSharedConfigNoticeLines(configPath, ctx.cwd), callbacks = buildMcpPanelCallbacks(state, config, ctx), { createMcpPanel } = await import("./mcp-panel-IIGMXQGP.js"), configChanged = !1;
259
+ return await new Promise((resolve) => {
260
+ ctx.ui.custom((tui, _theme, keybindings, done) => createMcpPanel(config, cache, provenanceMap, callbacks, tui, (result) => {
261
+ !result.cancelled && result.changes.size > 0 && (writeDirectToolsConfig(result.changes, provenanceMap, config), configChanged = !0, ctx.ui.notify("Direct tools updated. Pi will reload after this panel closes.", "info")), done(void 0), resolve();
262
+ }, { noticeLines, keybindings }), { overlay: !0, overlayOptions: { anchor: "center", width: 82 } });
263
+ }), noticeLines.length > 0 && fingerprint && markSharedConfigHintShown(fingerprint), { configChanged };
264
+ }
265
+ async function openMcpAuthPanel(state, pi, ctx, configOverridePath) {
266
+ if (!ctx.hasUI)
267
+ return { configChanged: !1 };
268
+ let config = state.config;
269
+ if (Object.entries(config.mcpServers).filter(([, definition]) => supportsOAuth(definition)).length === 0)
270
+ return ctx.ui.notify("No OAuth-capable MCP servers are configured.", "warning"), { configChanged: !1 };
271
+ let cache = loadMetadataCache(), configPath = pi.getFlag("mcp-config") ?? configOverridePath, provenanceMap = getServerProvenance(configPath, ctx.cwd), callbacks = buildMcpPanelCallbacks(state, config, ctx), { createMcpPanel } = await import("./mcp-panel-IIGMXQGP.js");
272
+ return await new Promise((resolve) => {
273
+ ctx.ui.custom((tui, _theme, keybindings, done) => createMcpPanel(config, cache, provenanceMap, callbacks, tui, () => {
274
+ done(void 0), resolve();
275
+ }, {
276
+ authOnly: !0,
277
+ keybindings,
278
+ noticeLines: ["Select an OAuth MCP server and press Enter or ctrl+a to authenticate."]
279
+ }), { overlay: !0, overlayOptions: { anchor: "center", width: 82 } });
280
+ }), { configChanged: !1 };
281
+ }
282
+ export {
283
+ authenticateServer,
284
+ logoutServer,
285
+ openMcpAuthPanel,
286
+ openMcpPanel,
287
+ openMcpSetup,
288
+ reconnectServers,
289
+ showStatus,
290
+ showTools
291
+ };
@@ -0,0 +1,73 @@
1
+ import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
+ import {
3
+ APP_NAME,
4
+ APP_TITLE,
5
+ CONFIG_DIR_NAME,
6
+ ENV_AGENT_DIR,
7
+ ENV_SESSION_DIR,
8
+ NPM_CLI_PACKAGE,
9
+ PACKAGE_NAME,
10
+ VERSION,
11
+ appendDebugLog,
12
+ expandTildePath,
13
+ getAgentDir,
14
+ getAuthPath,
15
+ getBinDir,
16
+ getBundledInteractiveAssetPath,
17
+ getCustomThemesDir,
18
+ getDebugLogPath,
19
+ getDocsPath,
20
+ getExamplesPath,
21
+ getExportTemplateDir,
22
+ getInteractiveAssetsDir,
23
+ getModelsPath,
24
+ getPackageDir,
25
+ getPackageJsonPath,
26
+ getPromptsDir,
27
+ getReadmePath,
28
+ getSessionsDir,
29
+ getSettingsPath,
30
+ getShareViewerUrl,
31
+ getThemesDir,
32
+ getToolsDir,
33
+ isBunBinary,
34
+ isBunRuntime,
35
+ isNodeBundle
36
+ } from "./chunk-FQMM2EZ2.js";
37
+ import "./chunk-Q4Q6D4IY.js";
38
+ import "./chunk-BRJX2PRC.js";
39
+ export {
40
+ APP_NAME,
41
+ APP_TITLE,
42
+ CONFIG_DIR_NAME,
43
+ ENV_AGENT_DIR,
44
+ ENV_SESSION_DIR,
45
+ NPM_CLI_PACKAGE,
46
+ PACKAGE_NAME,
47
+ VERSION,
48
+ appendDebugLog,
49
+ expandTildePath,
50
+ getAgentDir,
51
+ getAuthPath,
52
+ getBinDir,
53
+ getBundledInteractiveAssetPath,
54
+ getCustomThemesDir,
55
+ getDebugLogPath,
56
+ getDocsPath,
57
+ getExamplesPath,
58
+ getExportTemplateDir,
59
+ getInteractiveAssetsDir,
60
+ getModelsPath,
61
+ getPackageDir,
62
+ getPackageJsonPath,
63
+ getPromptsDir,
64
+ getReadmePath,
65
+ getSessionsDir,
66
+ getSettingsPath,
67
+ getShareViewerUrl,
68
+ getThemesDir,
69
+ getToolsDir,
70
+ isBunBinary,
71
+ isBunRuntime,
72
+ isNodeBundle
73
+ };