@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.
- package/CHANGELOG.md +25 -1
- package/README.md +2 -1
- package/dist/builtin-extensions/ashxj-thinking.d.ts +1 -0
- package/dist/builtin-extensions/ashxj-thinking.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-thinking.js +44 -19
- package/dist/builtin-extensions/ashxj-thinking.js.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.d.ts +2 -2
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +8 -11
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +2 -1
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts +4 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js +172 -171
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts +50 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js +131 -0
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js.map +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts +7 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js +211 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tool-executor.js.map +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts +0 -5
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +0 -202
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.js +276 -109
- package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts +4 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/init.js +10 -3
- package/dist/builtin-extensions/pi-mcp-adapter/init.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js +6 -1
- package/dist/builtin-extensions/pi-mcp-adapter/metadata-cache.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts +6 -1
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js +33 -8
- package/dist/builtin-extensions/pi-mcp-adapter/server-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js +2 -1
- package/dist/builtin-extensions/pi-prompt-template-model/prompt-loader.js.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js +1 -1
- package/dist/builtin-extensions/pi-prompt-template-model/tool-manager.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +68 -15
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +6 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +5 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.d.ts +10 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.js +38 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/request-params.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +3 -16
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/fork-context.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +72 -31
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/review.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/extract.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/extract.js +105 -54
- package/dist/builtin-extensions/pi-web-access/extract.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts +1 -1
- package/dist/builtin-extensions/pi-web-access/gemini-search.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/gemini-search.js +82 -65
- package/dist/builtin-extensions/pi-web-access/gemini-search.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/github-extract.js +2 -0
- package/dist/builtin-extensions/pi-web-access/github-extract.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.js +259 -168
- package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/lazy.d.ts +18 -0
- package/dist/builtin-extensions/pi-web-access/lazy.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-web-access/lazy.js +19 -0
- package/dist/builtin-extensions/pi-web-access/lazy.js.map +1 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts +6 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.js +17 -0
- package/dist/builtin-extensions/pi-web-access/session-cleanup.js.map +1 -0
- package/dist/cli-runtime.d.ts +3 -0
- package/dist/cli-runtime.d.ts.map +1 -0
- package/dist/cli-runtime.js +72 -0
- package/dist/cli-runtime.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +11 -60
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +6 -3
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/host-static.d.ts.map +1 -1
- package/dist/core/extensions/host-static.js +34 -12
- package/dist/core/extensions/host-static.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -2
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +10 -64
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/keybindings.d.ts +2 -2
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +2 -2
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +1 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/sdk.d.ts +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/timings.d.ts +2 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js +17 -2
- package/dist/core/timings.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts +6 -1
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +23 -6
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/cron.d.ts +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +3 -1
- package/dist/gateway/cron.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +20 -14
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/injected-context.d.ts +2 -0
- package/dist/modes/interactive/injected-context.d.ts.map +1 -0
- package/dist/modes/interactive/injected-context.js +7 -0
- package/dist/modes/interactive/injected-context.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +32 -8
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/thinking-level-slash.d.ts +4 -0
- package/dist/modes/interactive/thinking-level-slash.d.ts.map +1 -0
- package/dist/modes/interactive/thinking-level-slash.js +23 -0
- package/dist/modes/interactive/thinking-level-slash.js.map +1 -0
- package/dist/node-runtime/agent-session-services-35WNVGMR.js +36 -0
- package/dist/node-runtime/benchmark-request-UC7PD3V3.js +57 -0
- package/dist/node-runtime/brave-UWDA3I22.js +143 -0
- package/dist/node-runtime/builtin-extensions-QATGXENO.js +28 -0
- package/dist/node-runtime/chunk-2SJB2AWP.js +47 -0
- package/dist/node-runtime/chunk-3NMWLTPV.js +64 -0
- package/dist/node-runtime/chunk-3WFAEVKS.js +115 -0
- package/dist/node-runtime/chunk-3X3KZKMI.js +49 -0
- package/dist/node-runtime/chunk-4CSFRBCN.js +7558 -0
- package/dist/node-runtime/chunk-4DJ6HEGH.js +296 -0
- package/dist/node-runtime/chunk-4HXHDDCF.js +16 -0
- package/dist/node-runtime/chunk-4I23VTC4.js +429 -0
- package/dist/node-runtime/chunk-4TLO4PO2.js +3427 -0
- package/dist/node-runtime/chunk-4ZWGEEAS.js +69 -0
- package/dist/node-runtime/chunk-53YJI7JU.js +137 -0
- package/dist/node-runtime/chunk-5EFIU3OM.js +295 -0
- package/dist/node-runtime/chunk-6BEIBLQ3.js +53 -0
- package/dist/node-runtime/chunk-6KDIOJL3.js +72 -0
- package/dist/node-runtime/chunk-7N3YHTYF.js +26 -0
- package/dist/node-runtime/chunk-7NBZ5P7I.js +24 -0
- package/dist/node-runtime/chunk-AD6VXAO7.js +342 -0
- package/dist/node-runtime/chunk-ARC4KOTI.js +11178 -0
- package/dist/node-runtime/chunk-AROOY4BB.js +173 -0
- package/dist/node-runtime/chunk-ATGA2WLC.js +5646 -0
- package/dist/node-runtime/chunk-AUXVGBO4.js +19 -0
- package/dist/node-runtime/chunk-AY6CAJSL.js +30 -0
- package/dist/node-runtime/chunk-BHO7O6E5.js +296 -0
- package/dist/node-runtime/chunk-BI3DHYCN.js +8845 -0
- package/dist/node-runtime/chunk-BOHIDQT4.js +21 -0
- package/dist/node-runtime/chunk-BRJX2PRC.js +53 -0
- package/dist/node-runtime/chunk-CBGB57XT.js +20211 -0
- package/dist/node-runtime/chunk-CCZJ3PYY.js +17 -0
- package/dist/node-runtime/chunk-CGBXPL3E.js +1171 -0
- package/dist/node-runtime/chunk-CJECDQKP.js +19 -0
- package/dist/node-runtime/chunk-CSFI6YXL.js +130 -0
- package/dist/node-runtime/chunk-DAPBPCBP.js +53 -0
- package/dist/node-runtime/chunk-DDWHZ633.js +37 -0
- package/dist/node-runtime/chunk-DMMTJQMQ.js +43 -0
- package/dist/node-runtime/chunk-DVGWF6A2.js +1180 -0
- package/dist/node-runtime/chunk-EBF6COVM.js +1734 -0
- package/dist/node-runtime/chunk-FQMM2EZ2.js +248 -0
- package/dist/node-runtime/chunk-FVDOXRUD.js +96 -0
- package/dist/node-runtime/chunk-G4P75AIS.js +9471 -0
- package/dist/node-runtime/chunk-G6LRAP36.js +105 -0
- package/dist/node-runtime/chunk-GKLEQ3I4.js +860 -0
- package/dist/node-runtime/chunk-H2EOZYMP.js +57 -0
- package/dist/node-runtime/chunk-HQCKFM2O.js +56 -0
- package/dist/node-runtime/chunk-HYHJIRDW.js +19 -0
- package/dist/node-runtime/chunk-I6R76AG7.js +22 -0
- package/dist/node-runtime/chunk-IRPJXI6U.js +1269 -0
- package/dist/node-runtime/chunk-J26TSGDL.js +633 -0
- package/dist/node-runtime/chunk-JZQ7F36T.js +610 -0
- package/dist/node-runtime/chunk-KBKMCJDU.js +126 -0
- package/dist/node-runtime/chunk-KWA4OC2J.js +100 -0
- package/dist/node-runtime/chunk-M3LZLQW2.js +98 -0
- package/dist/node-runtime/chunk-MCUNIRD5.js +8388 -0
- package/dist/node-runtime/chunk-NI6OTSBH.js +966 -0
- package/dist/node-runtime/chunk-NUIFPZWX.js +209 -0
- package/dist/node-runtime/chunk-OBMWP3I5.js +68 -0
- package/dist/node-runtime/chunk-OCVIXVTZ.js +88 -0
- package/dist/node-runtime/chunk-OPEK5RRY.js +466 -0
- package/dist/node-runtime/chunk-OR4L3IB2.js +42 -0
- package/dist/node-runtime/chunk-PL6JKXWI.js +3622 -0
- package/dist/node-runtime/chunk-PNJSG3IZ.js +807 -0
- package/dist/node-runtime/chunk-PVCDKGR6.js +55 -0
- package/dist/node-runtime/chunk-Q4Q6D4IY.js +364 -0
- package/dist/node-runtime/chunk-Q5ZU2VRT.js +83 -0
- package/dist/node-runtime/chunk-QFWG2RVL.js +5477 -0
- package/dist/node-runtime/chunk-QZMODZQ2.js +305 -0
- package/dist/node-runtime/chunk-R5EDISSV.js +375 -0
- package/dist/node-runtime/chunk-RNBHABBA.js +986 -0
- package/dist/node-runtime/chunk-RQ2Q5IYR.js +72 -0
- package/dist/node-runtime/chunk-RRIZE6QQ.js +17 -0
- package/dist/node-runtime/chunk-SN6G4OU6.js +4753 -0
- package/dist/node-runtime/chunk-STERBGUB.js +949 -0
- package/dist/node-runtime/chunk-UWQYRSYQ.js +8973 -0
- package/dist/node-runtime/chunk-VRB2IYGG.js +53 -0
- package/dist/node-runtime/chunk-VSELYKWU.js +772 -0
- package/dist/node-runtime/chunk-W3CVH5RX.js +62 -0
- package/dist/node-runtime/chunk-WJVFOIB5.js +24921 -0
- package/dist/node-runtime/chunk-WKDK4C5P.js +2834 -0
- package/dist/node-runtime/chunk-XATUM2HK.js +46 -0
- package/dist/node-runtime/chunk-XBWPBZBN.js +125 -0
- package/dist/node-runtime/chunk-XTHQ7XR7.js +509 -0
- package/dist/node-runtime/chunk-ZBV7FAHG.js +1345 -0
- package/dist/node-runtime/cli-runtime.js +80 -0
- package/dist/node-runtime/clipboard-OZ63BBC6.js +12 -0
- package/dist/node-runtime/clipboard-image-7QR6GXVA.js +13 -0
- package/dist/node-runtime/command-AAV3YRR5.js +13 -0
- package/dist/node-runtime/commands-MV5KOZ64.js +291 -0
- package/dist/node-runtime/config-QDD5PUE2.js +73 -0
- package/dist/node-runtime/curator-server-XCM43VEF.js +3816 -0
- package/dist/node-runtime/customize-XEXL2DGQ.js +12 -0
- package/dist/node-runtime/direct-tool-executor-BK7CLEBX.js +188 -0
- package/dist/node-runtime/exa-LL64QZR2.js +329 -0
- package/dist/node-runtime/export-html-TEXVV5RP.js +150 -0
- package/dist/node-runtime/extension-input-O4HSAEM4.js +14 -0
- package/dist/node-runtime/extension-selector-X5FCX43D.js +14 -0
- package/dist/node-runtime/extract-XLQSJN4V.js +17 -0
- package/dist/node-runtime/file-sync-HCOP2QVF.js +117 -0
- package/dist/node-runtime/gateway-OAC4OBBL.js +2137 -0
- package/dist/node-runtime/gemini-api-QE7ANVDZ.js +29 -0
- package/dist/node-runtime/gemini-search-U7SUMPQA.js +330 -0
- package/dist/node-runtime/gemini-url-context-PXWCBQHK.js +103 -0
- package/dist/node-runtime/gemini-web-MM446SEH.js +14 -0
- package/dist/node-runtime/github-extract-F64RZOEA.js +619 -0
- package/dist/node-runtime/goal-NJEE5CTU.js +1831 -0
- package/dist/node-runtime/index.js +859 -0
- package/dist/node-runtime/init-3C7Z24OI.js +28 -0
- package/dist/node-runtime/install-cli-EXMJQESX.js +308 -0
- package/dist/node-runtime/interactive-mode-2SZUO53H.js +56 -0
- package/dist/node-runtime/interactive-view-S6J3QHEF.js +247 -0
- package/dist/node-runtime/lsp-manager-3ASUSO4T.js +1104 -0
- package/dist/node-runtime/lunr-cron-AUUYP4N4.js +272 -0
- package/dist/node-runtime/main.js +54 -0
- package/dist/node-runtime/mcp-auth-flow-QIXHW6QN.js +32 -0
- package/dist/node-runtime/mcp-panel-IIGMXQGP.js +501 -0
- package/dist/node-runtime/mcp-setup-panel-FEK7663I.js +355 -0
- package/dist/node-runtime/memory-cap-3S4XRLNP.js +20 -0
- package/dist/node-runtime/model-tiers-NJLHUEGK.js +20 -0
- package/dist/node-runtime/openai-search-B3MSNCQA.js +288 -0
- package/dist/node-runtime/package-manager-cli-7RKSZGEN.js +749 -0
- package/dist/node-runtime/parallel-AI2MNSCU.js +265 -0
- package/dist/node-runtime/parser-manager-TQHWYDH7.js +152 -0
- package/dist/node-runtime/pdf-extract-IPE6H4HP.js +57 -0
- package/dist/node-runtime/perplexity-QVJW3I35.js +12 -0
- package/dist/node-runtime/pi-intercom-EEMBGQID.js +2215 -0
- package/dist/node-runtime/pi-mcp-adapter-GUFZWW54.js +428 -0
- package/dist/node-runtime/pi-ollama-cloud-2F3Y2QNM.js +1440 -0
- package/dist/node-runtime/pi-prompt-template-model-QWTCGLJU.js +3946 -0
- package/dist/node-runtime/pi-subagents-7YJ3I4VE.js +6048 -0
- package/dist/node-runtime/pi-web-access-2CQGFLT2.js +1867 -0
- package/dist/node-runtime/print-mode-XSFM26EL.js +12 -0
- package/dist/node-runtime/proxy-modes-V6YVFH3C.js +685 -0
- package/dist/node-runtime/rpc-entry.js +62 -0
- package/dist/node-runtime/rpc-mode-W5ZTLTMZ.js +13 -0
- package/dist/node-runtime/runtime-bridges-3RKBDLNA.js +14 -0
- package/dist/node-runtime/session-manager-E7AREDTV.js +33 -0
- package/dist/node-runtime/session-selector-FJ7M2AIX.js +14 -0
- package/dist/node-runtime/settings-manager-GHPTUN7R.js +21 -0
- package/dist/node-runtime/src-BPQFJR76.js +2427 -0
- package/dist/node-runtime/subagent-executor-5Q5A4HJ2.js +8499 -0
- package/dist/node-runtime/summary-review-YSMXKITO.js +228 -0
- package/dist/node-runtime/tavily-WEZFVFP7.js +154 -0
- package/dist/node-runtime/timings-UAD5BEAS.js +16 -0
- package/dist/node-runtime/tool-renderer-MV5O452K.js +204 -0
- package/dist/node-runtime/update-cli-L3JIBH2U.js +70 -0
- package/dist/node-runtime/v4-5MNC3H7G.js +424 -0
- package/dist/node-runtime/video-extract-OYT5WKS5.js +304 -0
- package/dist/node-runtime/workspace-index-6DBXSTJ6.js +163 -0
- package/dist/node-runtime/youtube-extract-TQYKGFGS.js +264 -0
- package/dist/rpc.d.ts +3 -0
- package/dist/rpc.d.ts.map +1 -0
- package/dist/rpc.js +18 -0
- package/dist/rpc.js.map +1 -0
- package/dist/startup/benchmark-request.d.ts +3 -0
- package/dist/startup/benchmark-request.d.ts.map +1 -0
- package/dist/startup/benchmark-request.js +65 -0
- package/dist/startup/benchmark-request.js.map +1 -0
- package/dist/startup/interactive-view.d.ts.map +1 -1
- package/dist/startup/interactive-view.js +1 -2
- package/dist/startup/interactive-view.js.map +1 -1
- package/dist/startup/startup-milestones.d.ts +1 -1
- package/dist/startup/startup-milestones.d.ts.map +1 -1
- package/dist/startup/startup-milestones.js.map +1 -1
- package/dist/utils/await-with-abort.d.ts +2 -0
- package/dist/utils/await-with-abort.d.ts.map +1 -0
- package/dist/utils/await-with-abort.js +19 -0
- package/dist/utils/await-with-abort.js.map +1 -0
- package/docs/development.md +5 -1
- package/docs/features.md +2 -2
- package/docs/interactive-startup.md +95 -48
- package/docs/keybindings.md +2 -2
- package/docs/terminal-setup.md +1 -1
- package/docs/usage.md +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/hidden-thinking-label.ts +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
flushMetadataCache,
|
|
4
|
+
getFailureAgeSeconds,
|
|
5
|
+
initializeMcp,
|
|
6
|
+
isTuiMode,
|
|
7
|
+
lazyConnect,
|
|
8
|
+
updateMetadataCache,
|
|
9
|
+
updateServerMetadata,
|
|
10
|
+
updateStatusBar
|
|
11
|
+
} from "./chunk-UWQYRSYQ.js";
|
|
12
|
+
import "./chunk-VSELYKWU.js";
|
|
13
|
+
import "./chunk-4TLO4PO2.js";
|
|
14
|
+
import "./chunk-4HXHDDCF.js";
|
|
15
|
+
import "./chunk-BI3DHYCN.js";
|
|
16
|
+
import "./chunk-ARC4KOTI.js";
|
|
17
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
18
|
+
import "./chunk-BRJX2PRC.js";
|
|
19
|
+
export {
|
|
20
|
+
flushMetadataCache,
|
|
21
|
+
getFailureAgeSeconds,
|
|
22
|
+
initializeMcp,
|
|
23
|
+
isTuiMode,
|
|
24
|
+
lazyConnect,
|
|
25
|
+
updateMetadataCache,
|
|
26
|
+
updateServerMetadata,
|
|
27
|
+
updateStatusBar
|
|
28
|
+
};
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
FEATURE_CATALOG,
|
|
4
|
+
FEATURE_HANDLERS,
|
|
5
|
+
appendInstallLog,
|
|
6
|
+
applyFeatureFlags,
|
|
7
|
+
getFeatureSpec,
|
|
8
|
+
isProductUninstallArgv,
|
|
9
|
+
loadGatewayConfig,
|
|
10
|
+
loadInstallFeatures,
|
|
11
|
+
parseFeatureFlags,
|
|
12
|
+
saveInstallFeatures
|
|
13
|
+
} from "./chunk-4I23VTC4.js";
|
|
14
|
+
import {
|
|
15
|
+
APP_NAME,
|
|
16
|
+
NPM_CLI_PACKAGE,
|
|
17
|
+
VERSION,
|
|
18
|
+
getAgentDir
|
|
19
|
+
} from "./chunk-FQMM2EZ2.js";
|
|
20
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
21
|
+
import "./chunk-BRJX2PRC.js";
|
|
22
|
+
|
|
23
|
+
// packages/coding-agent/dist/cli/install-cli.js
|
|
24
|
+
import { existsSync as existsSync2, rmSync } from "node:fs";
|
|
25
|
+
import { join as join2 } from "node:path";
|
|
26
|
+
import { createInterface } from "node:readline";
|
|
27
|
+
|
|
28
|
+
// packages/coding-agent/dist/core/install-layout.js
|
|
29
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
30
|
+
import { homedir } from "node:os";
|
|
31
|
+
import { join } from "node:path";
|
|
32
|
+
function defaultInstallPrefix() {
|
|
33
|
+
return join(homedir(), ".lunr");
|
|
34
|
+
}
|
|
35
|
+
function installLayoutPath() {
|
|
36
|
+
return join(getAgentDir(), "install-layout.json");
|
|
37
|
+
}
|
|
38
|
+
function loadInstallLayout() {
|
|
39
|
+
let path = installLayoutPath();
|
|
40
|
+
if (existsSync(path))
|
|
41
|
+
try {
|
|
42
|
+
let raw = JSON.parse(readFileSync(path, "utf-8"));
|
|
43
|
+
return raw.schemaVersion !== 1 || typeof raw.prefix != "string" || typeof raw.argv0 != "string" || typeof raw.version != "string" ? void 0 : {
|
|
44
|
+
schemaVersion: 1,
|
|
45
|
+
prefix: raw.prefix,
|
|
46
|
+
method: "binary",
|
|
47
|
+
argv0: raw.argv0,
|
|
48
|
+
version: raw.version
|
|
49
|
+
};
|
|
50
|
+
} catch {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function resolveInstallPrefix() {
|
|
55
|
+
let env = process.env.LUNR_PREFIX?.trim();
|
|
56
|
+
return env || (loadInstallLayout()?.prefix ?? defaultInstallPrefix());
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// packages/coding-agent/dist/cli/read-secret.js
|
|
60
|
+
async function readSecret(prompt) {
|
|
61
|
+
let stdin = process.stdin;
|
|
62
|
+
if (!stdin.isTTY || typeof stdin.setRawMode != "function") {
|
|
63
|
+
console.error("set LUNR_TELEGRAM_BOT_TOKEN / LUNR_DISCORD_BOT_TOKEN or re-run from a terminal.");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
process.stderr.write(`${prompt}
|
|
67
|
+
Token: `), stdin.setRawMode(!0), stdin.resume(), stdin.setEncoding("utf8");
|
|
68
|
+
try {
|
|
69
|
+
return await new Promise((resolve, reject) => {
|
|
70
|
+
let buf = "", onData = (chunk) => {
|
|
71
|
+
for (let ch of chunk) {
|
|
72
|
+
if (ch === "") {
|
|
73
|
+
cleanup(), process.stderr.write(`
|
|
74
|
+
`), process.exit(130);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (ch === "\r" || ch === `
|
|
78
|
+
`) {
|
|
79
|
+
cleanup(), process.stderr.write(`********
|
|
80
|
+
`), resolve(buf.length === 0 ? void 0 : buf);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (ch === "\x7F" || ch === "\b") {
|
|
84
|
+
buf = buf.slice(0, -1);
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
ch >= " " && (buf += ch);
|
|
88
|
+
}
|
|
89
|
+
}, cleanup = () => {
|
|
90
|
+
stdin.off("data", onData), stdin.off("error", onError);
|
|
91
|
+
}, onError = (err) => {
|
|
92
|
+
cleanup(), reject(err);
|
|
93
|
+
};
|
|
94
|
+
stdin.on("data", onData), stdin.on("error", onError);
|
|
95
|
+
});
|
|
96
|
+
} finally {
|
|
97
|
+
typeof stdin.setRawMode == "function" && stdin.setRawMode(!1), stdin.pause();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// packages/coding-agent/dist/cli/install-cli.js
|
|
102
|
+
function printSetupHelp() {
|
|
103
|
+
console.log(`${APP_NAME} setup [--yes] [--feature <id>] [--no-feature <id>] [--set <id.option>=<value>] [--reconfigure]
|
|
104
|
+
|
|
105
|
+
First-run / reconfigure optional features.
|
|
106
|
+
|
|
107
|
+
${APP_NAME} features list
|
|
108
|
+
${APP_NAME} features enable <id> [--set <id.option>=<value>]...
|
|
109
|
+
${APP_NAME} features disable <id> [--purge-secrets]
|
|
110
|
+
${APP_NAME} uninstall [--purge] [--yes] Remove this ${APP_NAME} install (keeps agent dir unless --purge)
|
|
111
|
+
${APP_NAME} uninstall <source> [-l] Remove an extension package (alias for remove)
|
|
112
|
+
`);
|
|
113
|
+
}
|
|
114
|
+
function printFeaturesHelp() {
|
|
115
|
+
console.log(`${APP_NAME} features list
|
|
116
|
+
${APP_NAME} features enable <id> [--set <id.option>=<value>]...
|
|
117
|
+
${APP_NAME} features disable <id> [--purge-secrets]
|
|
118
|
+
`);
|
|
119
|
+
}
|
|
120
|
+
async function askYesNo(prompt, defaultYes) {
|
|
121
|
+
if (!process.stdin.isTTY)
|
|
122
|
+
return defaultYes;
|
|
123
|
+
let rl = createInterface({ input: process.stdin, output: process.stdout }), suffix = defaultYes ? "[Y/n]" : "[y/N]", answer = await new Promise((resolve) => {
|
|
124
|
+
rl.question(`${prompt} ${suffix} `, resolve);
|
|
125
|
+
});
|
|
126
|
+
rl.close();
|
|
127
|
+
let trimmed = answer.trim().toLowerCase();
|
|
128
|
+
return trimmed === "" ? defaultYes : trimmed === "y" || trimmed === "yes";
|
|
129
|
+
}
|
|
130
|
+
function fileTokenAlreadySet(optionId) {
|
|
131
|
+
let cfg = loadGatewayConfig();
|
|
132
|
+
return optionId === "telegram-token" ? !!cfg.telegram.token : optionId === "discord-token" ? !!cfg.discord.token : !1;
|
|
133
|
+
}
|
|
134
|
+
async function collectSecretsForFeature(id, secrets) {
|
|
135
|
+
let spec = getFeatureSpec(id);
|
|
136
|
+
if (spec)
|
|
137
|
+
for (let option of spec.options) {
|
|
138
|
+
if (option.type !== "secret")
|
|
139
|
+
continue;
|
|
140
|
+
if (fileTokenAlreadySet(option.id)) {
|
|
141
|
+
console.log(` ${option.id}: token already set`);
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
let value = await readSecret(option.prompt);
|
|
145
|
+
value && (secrets[option.id] = value);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
async function runSetup(argv) {
|
|
149
|
+
let parsed = parseFeatureFlags(argv);
|
|
150
|
+
if (!parsed.ok)
|
|
151
|
+
return console.error(parsed.error), printSetupHelp(), 2;
|
|
152
|
+
if (!parsed.yes && !process.stdin.isTTY)
|
|
153
|
+
return console.error("non-interactive setup requires --yes"), printSetupHelp(), 2;
|
|
154
|
+
let current = loadInstallFeatures(), next = current, secrets = {};
|
|
155
|
+
if (parsed.yes) {
|
|
156
|
+
let applied = applyFeatureFlags(current, parsed);
|
|
157
|
+
if (!applied.ok)
|
|
158
|
+
return console.error(applied.error), applied.exitCode;
|
|
159
|
+
next = applied.next;
|
|
160
|
+
for (let id of applied.enabledIds) {
|
|
161
|
+
let prev = current.features[id], state = next.features[id];
|
|
162
|
+
state && await FEATURE_HANDLERS[id].apply({
|
|
163
|
+
previous: prev,
|
|
164
|
+
next: state,
|
|
165
|
+
secrets: applied.secrets,
|
|
166
|
+
nonInteractive: !0
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
for (let id of applied.disabledIds)
|
|
170
|
+
await FEATURE_HANDLERS[id].disable({ purgeSecrets: !1 });
|
|
171
|
+
} else {
|
|
172
|
+
console.log(`lunR ${VERSION} setup
|
|
173
|
+
`);
|
|
174
|
+
let layout = loadInstallLayout();
|
|
175
|
+
layout && (console.log(`Install location: ${join2(layout.prefix, "versions", layout.version)}`), console.log(`Command: ${layout.argv0}
|
|
176
|
+
`)), console.log("Optional features");
|
|
177
|
+
for (let spec of FEATURE_CATALOG) {
|
|
178
|
+
let existing = current.features[spec.id], defaultEnabled = existing?.enabled ?? spec.defaultEnabled;
|
|
179
|
+
console.log(` ${spec.title}`), console.log(` ${spec.summary}`);
|
|
180
|
+
let enable = await askYesNo(" Enable?", defaultEnabled);
|
|
181
|
+
if (next.features[spec.id] = {
|
|
182
|
+
enabled: enable,
|
|
183
|
+
options: { ...existing?.options }
|
|
184
|
+
}, !enable) {
|
|
185
|
+
await FEATURE_HANDLERS[spec.id].disable({ purgeSecrets: !1 });
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
for (let option of spec.options)
|
|
189
|
+
if (option.type === "boolean") {
|
|
190
|
+
let currentBool = typeof existing?.options[option.id] == "boolean" ? existing.options[option.id] : option.default ?? !1, value = await askYesNo(` ${option.prompt}`, currentBool);
|
|
191
|
+
next.features[spec.id].options[option.id] = value;
|
|
192
|
+
}
|
|
193
|
+
await collectSecretsForFeature(spec.id, secrets), await FEATURE_HANDLERS[spec.id].apply({
|
|
194
|
+
previous: existing,
|
|
195
|
+
next: next.features[spec.id],
|
|
196
|
+
secrets,
|
|
197
|
+
nonInteractive: !1
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
next = {
|
|
201
|
+
...next,
|
|
202
|
+
installerVersion: VERSION,
|
|
203
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
204
|
+
installedAt: next.installedAt || (/* @__PURE__ */ new Date()).toISOString()
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
return saveInstallFeatures(next), appendInstallLog(`setup installerVersion=${VERSION}`), console.log(`Writing ${getAgentDir()}/install-features.json`), console.log(`
|
|
208
|
+
Next:`), console.log(` 1. Restart this shell (or add ${resolveInstallPrefix()}/bin to PATH)`), console.log(` 2. Run: ${APP_NAME}`), console.log(" 3. In the TUI: /login"), 0;
|
|
209
|
+
}
|
|
210
|
+
async function runFeatures(argv) {
|
|
211
|
+
let [sub, ...rest] = argv;
|
|
212
|
+
if (!sub || sub === "list") {
|
|
213
|
+
let file = loadInstallFeatures();
|
|
214
|
+
for (let spec of FEATURE_CATALOG) {
|
|
215
|
+
let enabled = file.features[spec.id]?.enabled ?? spec.defaultEnabled;
|
|
216
|
+
console.log(`${spec.id}: ${enabled ? "enabled" : "disabled"} \u2014 ${spec.summary}`);
|
|
217
|
+
}
|
|
218
|
+
return 0;
|
|
219
|
+
}
|
|
220
|
+
if (sub === "enable") {
|
|
221
|
+
let id = rest[0];
|
|
222
|
+
if (!id || !getFeatureSpec(id))
|
|
223
|
+
return console.error(id ? `unknown feature ${id}` : "features enable requires an id"), printFeaturesHelp(), 2;
|
|
224
|
+
let flagArgv = ["--feature", id, ...rest.slice(1)], parsed = parseFeatureFlags(flagArgv);
|
|
225
|
+
if (!parsed.ok)
|
|
226
|
+
return console.error(parsed.error), 2;
|
|
227
|
+
!parsed.yes && !process.stdin.isTTY && rest.slice(1).length;
|
|
228
|
+
let current = loadInstallFeatures(), applied = applyFeatureFlags(current, parsed);
|
|
229
|
+
if (!applied.ok)
|
|
230
|
+
return console.error(applied.error), applied.exitCode;
|
|
231
|
+
let secrets = { ...applied.secrets };
|
|
232
|
+
if (process.stdin.isTTY && !parsed.yes) {
|
|
233
|
+
let spec = getFeatureSpec(id);
|
|
234
|
+
if (spec) {
|
|
235
|
+
for (let option of spec.options) {
|
|
236
|
+
if (option.type !== "boolean" || applied.next.features[id]?.options[option.id] !== void 0)
|
|
237
|
+
continue;
|
|
238
|
+
let currentBool = typeof current.features[id]?.options[option.id] == "boolean" ? current.features[id].options[option.id] : option.default ?? !1, value = await askYesNo(` ${option.prompt}`, currentBool), state2 = applied.next.features[id] ?? { enabled: !0, options: {} };
|
|
239
|
+
state2.options[option.id] = value, applied.next.features[id] = state2;
|
|
240
|
+
}
|
|
241
|
+
await collectSecretsForFeature(id, secrets);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
let state = applied.next.features[id];
|
|
245
|
+
return state && await FEATURE_HANDLERS[id].apply({
|
|
246
|
+
previous: current.features[id],
|
|
247
|
+
next: state,
|
|
248
|
+
secrets,
|
|
249
|
+
nonInteractive: parsed.yes || !process.stdin.isTTY
|
|
250
|
+
}), saveInstallFeatures(applied.next), appendInstallLog(`features enable ${id}`), console.log(`enabled ${id}`), 0;
|
|
251
|
+
}
|
|
252
|
+
if (sub === "disable") {
|
|
253
|
+
let id = rest[0];
|
|
254
|
+
if (!id || !getFeatureSpec(id))
|
|
255
|
+
return console.error(id ? `unknown feature ${id}` : "features disable requires an id"), printFeaturesHelp(), 2;
|
|
256
|
+
let purgeSecrets = rest.includes("--purge-secrets"), current = loadInstallFeatures(), prev = current.features[id];
|
|
257
|
+
return current.features[id] = { enabled: !1, options: { ...prev?.options } }, current.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), await FEATURE_HANDLERS[id].disable({ purgeSecrets }), saveInstallFeatures(current), appendInstallLog(`features disable ${id}`), console.log(`disabled ${id}`), 0;
|
|
258
|
+
}
|
|
259
|
+
return sub === "--help" || sub === "-h" ? (printFeaturesHelp(), 0) : (console.error(`unknown features subcommand ${sub}`), printFeaturesHelp(), 2);
|
|
260
|
+
}
|
|
261
|
+
function parseUninstallFlags(argv) {
|
|
262
|
+
return {
|
|
263
|
+
purge: argv.includes("--purge"),
|
|
264
|
+
yes: argv.includes("--yes") || argv.includes("-y")
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
function isBinaryLayoutInstall() {
|
|
268
|
+
return loadInstallLayout() !== void 0;
|
|
269
|
+
}
|
|
270
|
+
async function runProductUninstall(argv) {
|
|
271
|
+
let { purge, yes } = parseUninstallFlags(argv), agentDir = getAgentDir();
|
|
272
|
+
if (!isBinaryLayoutInstall()) {
|
|
273
|
+
if (console.log("This looks like an npm install. Remove the CLI with:"), console.log(` npm rm -g ${NPM_CLI_PACKAGE}`), purge) {
|
|
274
|
+
if (!yes && !process.stdin.isTTY)
|
|
275
|
+
return console.error("non-interactive --purge requires --yes"), 2;
|
|
276
|
+
if (!yes && !await askYesNo(`Also delete ${agentDir}? This cannot be undone.`, !1))
|
|
277
|
+
return console.log("aborted"), 1;
|
|
278
|
+
existsSync2(agentDir) && rmSync(agentDir, { recursive: !0, force: !0 }), console.log(`purged ${agentDir}`);
|
|
279
|
+
} else
|
|
280
|
+
console.log(`sessions, auth, and gateway config kept in ${agentDir}`), console.log("Add --purge to delete that directory.");
|
|
281
|
+
return appendInstallLog(`uninstall npm purge=${purge}`), 0;
|
|
282
|
+
}
|
|
283
|
+
let prefix = resolveInstallPrefix();
|
|
284
|
+
if (purge && !yes) {
|
|
285
|
+
if (!process.stdin.isTTY)
|
|
286
|
+
return console.error("non-interactive --purge requires --yes"), 2;
|
|
287
|
+
if (!await askYesNo(`Delete ${prefix} and ${agentDir}? This cannot be undone.`, !1))
|
|
288
|
+
return console.log("aborted"), 1;
|
|
289
|
+
}
|
|
290
|
+
let versions = join2(prefix, "versions"), bin = join2(prefix, "bin");
|
|
291
|
+
if (existsSync2(versions) && rmSync(versions, { recursive: !0, force: !0 }), existsSync2(bin) && rmSync(bin, { recursive: !0, force: !0 }), console.log(`removed ${versions} and ${bin}`), purge) {
|
|
292
|
+
if (existsSync2(agentDir) && rmSync(agentDir, { recursive: !0, force: !0 }), existsSync2(prefix))
|
|
293
|
+
try {
|
|
294
|
+
rmSync(prefix, { recursive: !0, force: !0 });
|
|
295
|
+
} catch {
|
|
296
|
+
}
|
|
297
|
+
console.log(`purged ${agentDir}`);
|
|
298
|
+
} else
|
|
299
|
+
console.log(`sessions, auth, and gateway config kept in ${agentDir}`);
|
|
300
|
+
return console.log("Remove the PATH line from your shell profile if you added one."), appendInstallLog(`uninstall purge=${purge}`), 0;
|
|
301
|
+
}
|
|
302
|
+
async function handleInstallCli(args) {
|
|
303
|
+
let [verb, ...rest] = args;
|
|
304
|
+
return verb === "setup" ? (process.exitCode = await runSetup(rest), !0) : verb === "features" ? (process.exitCode = await runFeatures(rest), !0) : verb === "uninstall" && isProductUninstallArgv(rest) ? (process.exitCode = await runProductUninstall(rest), !0) : !1;
|
|
305
|
+
}
|
|
306
|
+
export {
|
|
307
|
+
handleInstallCli
|
|
308
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
InteractiveMode,
|
|
4
|
+
formatResumeCommand,
|
|
5
|
+
startInteractiveToolInstalls
|
|
6
|
+
} from "./chunk-G4P75AIS.js";
|
|
7
|
+
import "./chunk-G6LRAP36.js";
|
|
8
|
+
import "./chunk-KWA4OC2J.js";
|
|
9
|
+
import "./chunk-Q5ZU2VRT.js";
|
|
10
|
+
import "./chunk-NUIFPZWX.js";
|
|
11
|
+
import "./chunk-6BEIBLQ3.js";
|
|
12
|
+
import "./chunk-7N3YHTYF.js";
|
|
13
|
+
import "./chunk-AROOY4BB.js";
|
|
14
|
+
import "./chunk-ATGA2WLC.js";
|
|
15
|
+
import "./chunk-STERBGUB.js";
|
|
16
|
+
import "./chunk-4CSFRBCN.js";
|
|
17
|
+
import "./chunk-OBMWP3I5.js";
|
|
18
|
+
import "./chunk-DVGWF6A2.js";
|
|
19
|
+
import "./chunk-QFWG2RVL.js";
|
|
20
|
+
import "./chunk-CGBXPL3E.js";
|
|
21
|
+
import "./chunk-WKDK4C5P.js";
|
|
22
|
+
import "./chunk-53YJI7JU.js";
|
|
23
|
+
import "./chunk-KBKMCJDU.js";
|
|
24
|
+
import "./chunk-CSFI6YXL.js";
|
|
25
|
+
import "./chunk-CBGB57XT.js";
|
|
26
|
+
import "./chunk-GKLEQ3I4.js";
|
|
27
|
+
import "./chunk-FVDOXRUD.js";
|
|
28
|
+
import "./chunk-W3CVH5RX.js";
|
|
29
|
+
import "./chunk-PNJSG3IZ.js";
|
|
30
|
+
import "./chunk-AD6VXAO7.js";
|
|
31
|
+
import "./chunk-J26TSGDL.js";
|
|
32
|
+
import "./chunk-M3LZLQW2.js";
|
|
33
|
+
import "./chunk-RQ2Q5IYR.js";
|
|
34
|
+
import "./chunk-H2EOZYMP.js";
|
|
35
|
+
import "./chunk-PVCDKGR6.js";
|
|
36
|
+
import "./chunk-OR4L3IB2.js";
|
|
37
|
+
import "./chunk-HQCKFM2O.js";
|
|
38
|
+
import "./chunk-AY6CAJSL.js";
|
|
39
|
+
import "./chunk-QZMODZQ2.js";
|
|
40
|
+
import "./chunk-CCZJ3PYY.js";
|
|
41
|
+
import "./chunk-6KDIOJL3.js";
|
|
42
|
+
import "./chunk-2SJB2AWP.js";
|
|
43
|
+
import "./chunk-I6R76AG7.js";
|
|
44
|
+
import "./chunk-JZQ7F36T.js";
|
|
45
|
+
import "./chunk-5EFIU3OM.js";
|
|
46
|
+
import "./chunk-BOHIDQT4.js";
|
|
47
|
+
import "./chunk-DDWHZ633.js";
|
|
48
|
+
import "./chunk-RNBHABBA.js";
|
|
49
|
+
import "./chunk-FQMM2EZ2.js";
|
|
50
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
51
|
+
import "./chunk-BRJX2PRC.js";
|
|
52
|
+
export {
|
|
53
|
+
InteractiveMode,
|
|
54
|
+
formatResumeCommand,
|
|
55
|
+
startInteractiveToolInstalls
|
|
56
|
+
};
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
BootScreenComponent,
|
|
4
|
+
registerPermissionModeBridge
|
|
5
|
+
} from "./chunk-6BEIBLQ3.js";
|
|
6
|
+
import {
|
|
7
|
+
getChatboxEditor,
|
|
8
|
+
renderStatsLine,
|
|
9
|
+
thinkingThemeToken
|
|
10
|
+
} from "./chunk-R5EDISSV.js";
|
|
11
|
+
import "./chunk-H2EOZYMP.js";
|
|
12
|
+
import {
|
|
13
|
+
markStartupMilestone
|
|
14
|
+
} from "./chunk-CCZJ3PYY.js";
|
|
15
|
+
import {
|
|
16
|
+
KeybindingsManager
|
|
17
|
+
} from "./chunk-5EFIU3OM.js";
|
|
18
|
+
import {
|
|
19
|
+
getEditorTheme,
|
|
20
|
+
getThemeName,
|
|
21
|
+
initTheme,
|
|
22
|
+
theme
|
|
23
|
+
} from "./chunk-RNBHABBA.js";
|
|
24
|
+
import {
|
|
25
|
+
APP_NAME,
|
|
26
|
+
VERSION,
|
|
27
|
+
getAgentDir
|
|
28
|
+
} from "./chunk-FQMM2EZ2.js";
|
|
29
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
30
|
+
import "./chunk-BRJX2PRC.js";
|
|
31
|
+
|
|
32
|
+
// packages/coding-agent/dist/startup/interactive-view.js
|
|
33
|
+
import * as crypto from "node:crypto";
|
|
34
|
+
import * as fs from "node:fs";
|
|
35
|
+
import * as os from "node:os";
|
|
36
|
+
import * as path from "node:path";
|
|
37
|
+
import { Container, isFocusable, ProcessTerminal, Spacer, setKeybindings, Text, TUI } from "@ashx-j/lunr-tui";
|
|
38
|
+
function readDisplaySettings() {
|
|
39
|
+
try {
|
|
40
|
+
let value = JSON.parse(fs.readFileSync(path.join(getAgentDir(), "settings.json"), "utf8"));
|
|
41
|
+
return value && typeof value == "object" && !Array.isArray(value) ? value : {};
|
|
42
|
+
} catch {
|
|
43
|
+
return {};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
var StartupProcessTerminal = class extends ProcessTerminal {
|
|
47
|
+
watchForFirstFrame = !1;
|
|
48
|
+
firstFrameCallback;
|
|
49
|
+
setFirstFrameCallback(callback) {
|
|
50
|
+
this.firstFrameCallback = callback, this.watchForFirstFrame = !0;
|
|
51
|
+
}
|
|
52
|
+
start(onInput, onResize) {
|
|
53
|
+
super.start(onInput, onResize), markStartupMilestone("input_handler_armed"), process.stdin.isTTY && markStartupMilestone("raw_mode_active");
|
|
54
|
+
}
|
|
55
|
+
write(data) {
|
|
56
|
+
super.write(data), this.watchForFirstFrame && data.includes("\x1B[?2026l") && (this.watchForFirstFrame = !1, markStartupMilestone("first_frame_committed"), this.firstFrameCallback?.());
|
|
57
|
+
}
|
|
58
|
+
}, InteractiveView = class {
|
|
59
|
+
ui;
|
|
60
|
+
editor;
|
|
61
|
+
keybindings;
|
|
62
|
+
submitRequested = !1;
|
|
63
|
+
inputUnsubscribe;
|
|
64
|
+
modalActive = !1;
|
|
65
|
+
terminal;
|
|
66
|
+
status = new Text("", 1, 0);
|
|
67
|
+
header;
|
|
68
|
+
footer;
|
|
69
|
+
statusContainer = new Container();
|
|
70
|
+
editorContainer = new Container();
|
|
71
|
+
firstFramePromise;
|
|
72
|
+
resolveFirstFrame;
|
|
73
|
+
exitPromise;
|
|
74
|
+
resolveExit;
|
|
75
|
+
started = !1;
|
|
76
|
+
handedOff = !1;
|
|
77
|
+
exitRequested = !1;
|
|
78
|
+
lastClearAt = 0;
|
|
79
|
+
currentEditor = () => this.editor;
|
|
80
|
+
constructor() {
|
|
81
|
+
let settings = readDisplaySettings(), permission = settings.defaultPermissionMode;
|
|
82
|
+
registerPermissionModeBridge(() => permission === "auto" || permission === "yolo" || permission === "plan" ? permission : "manual"), initTheme(typeof settings.theme == "string" ? settings.theme : void 0), this.terminal = new StartupProcessTerminal(), this.ui = new TUI(this.terminal, settings.showHardwareCursor), this.ui.setClearOnShrink(settings.terminal?.clearOnShrink ?? !1), this.keybindings = KeybindingsManager.create(), setKeybindings(this.keybindings);
|
|
83
|
+
let ctx = {
|
|
84
|
+
mode: "tui",
|
|
85
|
+
hasUI: !0,
|
|
86
|
+
model: settings.defaultModel ? { id: settings.defaultModel, provider: settings.defaultProvider } : void 0,
|
|
87
|
+
sessionManager: { getEntries: () => [] },
|
|
88
|
+
getContextUsage: () => {
|
|
89
|
+
},
|
|
90
|
+
ui: { theme, setEditorComponent() {
|
|
91
|
+
}, setFooter() {
|
|
92
|
+
} }
|
|
93
|
+
}, effort = settings.defaultThinkingLevel ?? "off";
|
|
94
|
+
this.editor = getChatboxEditor(this.ui, getEditorTheme(), this.keybindings, ctx, {
|
|
95
|
+
getThinkingLevel: () => effort,
|
|
96
|
+
on() {
|
|
97
|
+
}
|
|
98
|
+
}), this.editor.borderColor = (text) => theme.fg(thinkingThemeToken(effort), text), this.editor.disableSubmit = !0, this.header = settings.quietStartup ? new Text("", 0, 0) : new BootScreenComponent(theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${VERSION}`), [
|
|
99
|
+
{ label: "directory", value: process.cwd() },
|
|
100
|
+
{ label: "config", value: getAgentDir() },
|
|
101
|
+
{ label: "theme", value: getThemeName() }
|
|
102
|
+
]), this.footer = {
|
|
103
|
+
invalidate() {
|
|
104
|
+
},
|
|
105
|
+
render: (width) => renderStatsLine(width, ctx, theme, {
|
|
106
|
+
getGitBranch: () => null,
|
|
107
|
+
getExtensionStatuses: () => /* @__PURE__ */ new Map(),
|
|
108
|
+
getAvailableProviderCount: () => 0,
|
|
109
|
+
onBranchChange: () => () => {
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
}, this.editorContainer.addChild(this.editor), this.statusContainer.addChild(this.status), this.firstFramePromise = new Promise((resolve) => {
|
|
113
|
+
this.resolveFirstFrame = resolve;
|
|
114
|
+
}), this.exitPromise = new Promise((resolve) => {
|
|
115
|
+
this.resolveExit = resolve;
|
|
116
|
+
}), this.terminal.setFirstFrameCallback(this.resolveFirstFrame), this.installInputHandlers();
|
|
117
|
+
}
|
|
118
|
+
get isExitRequested() {
|
|
119
|
+
return this.exitRequested;
|
|
120
|
+
}
|
|
121
|
+
start() {
|
|
122
|
+
this.started || (this.restoreLayout(), this.ui.setAlternateScreen(!0), this.ui.start(), this.started = !0);
|
|
123
|
+
}
|
|
124
|
+
pause() {
|
|
125
|
+
!this.started || this.handedOff || (this.ui.stop(), this.started = !1);
|
|
126
|
+
}
|
|
127
|
+
resume() {
|
|
128
|
+
this.started || this.handedOff || this.exitRequested || (this.restoreLayout(), this.ui.start(), this.started = !0);
|
|
129
|
+
}
|
|
130
|
+
waitForFirstFrame() {
|
|
131
|
+
return this.firstFramePromise;
|
|
132
|
+
}
|
|
133
|
+
waitForExit() {
|
|
134
|
+
return this.exitPromise;
|
|
135
|
+
}
|
|
136
|
+
binding() {
|
|
137
|
+
return this.handedOff = !0, this;
|
|
138
|
+
}
|
|
139
|
+
setCurrentEditor(getEditor) {
|
|
140
|
+
this.currentEditor = getEditor;
|
|
141
|
+
}
|
|
142
|
+
/** Called only after the normal submit handler and all extensions are ready. */
|
|
143
|
+
activate() {
|
|
144
|
+
this.exitRequested || (this.inputUnsubscribe?.(), this.inputUnsubscribe = void 0, this.editor.onPasteImage = void 0, this.editor.disableSubmit = !1, this.status.setText(""), this.submitRequested && (this.submitRequested = !1, this.currentEditor().handleInput("\r")), this.ui.requestRender());
|
|
145
|
+
}
|
|
146
|
+
showError(error) {
|
|
147
|
+
let message = error instanceof Error ? error.message : String(error);
|
|
148
|
+
this.status.setText(`Startup failed: ${message}
|
|
149
|
+
Your draft is intact. Press Ctrl+C twice or Ctrl+D on an empty draft to exit.`), this.editor.disableSubmit = !0, this.statusContainer.clear(), this.statusContainer.addChild(this.status), this.ui.requestRender();
|
|
150
|
+
}
|
|
151
|
+
async fail(error) {
|
|
152
|
+
if (this.showError(error), process.env.PI_STARTUP_BENCHMARK === "1") {
|
|
153
|
+
this.stop();
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
await this.exitPromise;
|
|
157
|
+
}
|
|
158
|
+
stop() {
|
|
159
|
+
this.exitRequested || (this.exitRequested = !0, this.started && (this.ui.stop(), this.started = !1), this.inputUnsubscribe?.(), this.resolveFirstFrame(), this.resolveExit());
|
|
160
|
+
}
|
|
161
|
+
async select(title, options) {
|
|
162
|
+
let { ExtensionSelectorComponent } = await import("./extension-selector-X5FCX43D.js");
|
|
163
|
+
return new Promise((resolve) => {
|
|
164
|
+
let settled = !1, finish = (value) => {
|
|
165
|
+
settled || (settled = !0, this.restoreLayout(), resolve(value));
|
|
166
|
+
}, selector = new ExtensionSelectorComponent(title, options.map((option) => option.label), (label) => finish(options.find((option) => option.label === label)?.value), () => finish(void 0), { tui: this.ui });
|
|
167
|
+
this.showModal(selector, selector);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
async confirm(title, message) {
|
|
171
|
+
return await this.select(`${title}
|
|
172
|
+
${message}`, [
|
|
173
|
+
{ label: "Yes", value: !0 },
|
|
174
|
+
{ label: "No", value: !1 }
|
|
175
|
+
]) ?? !1;
|
|
176
|
+
}
|
|
177
|
+
async input(title, placeholder) {
|
|
178
|
+
let { ExtensionInputComponent } = await import("./extension-input-O4HSAEM4.js");
|
|
179
|
+
return new Promise((resolve) => {
|
|
180
|
+
let settled = !1, finish = (value) => {
|
|
181
|
+
settled || (settled = !0, input.dispose(), this.restoreLayout(), resolve(value));
|
|
182
|
+
}, input = new ExtensionInputComponent(title, placeholder, finish, () => finish(void 0), {
|
|
183
|
+
tui: this.ui
|
|
184
|
+
});
|
|
185
|
+
this.showModal(input, input);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
async selectSession(currentSessionsLoader, allSessionsLoader) {
|
|
189
|
+
let { SessionSelectorComponent } = await import("./session-selector-FJ7M2AIX.js");
|
|
190
|
+
return new Promise((resolve) => {
|
|
191
|
+
let settled = !1, finish = (path2) => {
|
|
192
|
+
settled || (settled = !0, this.restoreLayout(), resolve(path2));
|
|
193
|
+
}, selector = new SessionSelectorComponent(currentSessionsLoader, allSessionsLoader, (path2) => finish(path2), () => finish(null), () => this.stop(), () => this.ui.requestRender(), { showRenameHint: !1, keybindings: this.keybindings });
|
|
194
|
+
this.showModal(selector, selector.getSessionList());
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
showModal(component, focus) {
|
|
198
|
+
this.modalActive = !0, this.ui.pinFrom(null), this.ui.clear(), this.ui.addChild(component), this.ui.setFocus(focus), this.ui.requestRender(!0);
|
|
199
|
+
}
|
|
200
|
+
restoreLayout() {
|
|
201
|
+
this.modalActive = !1, this.ui.pinFrom(null), this.ui.clear(), this.ui.addChild(new Spacer(1)), this.ui.addChild(this.header), this.ui.addChild(new Spacer(1)), this.ui.addChild(this.statusContainer), this.ui.addChild(this.editorContainer), this.ui.addChild(this.footer), this.ui.pinFrom(this.editorContainer), this.ui.setFocus(this.editor), this.ui.requestRender(!0);
|
|
202
|
+
}
|
|
203
|
+
installInputHandlers() {
|
|
204
|
+
this.editor.onAction("app.clear", () => {
|
|
205
|
+
let now = Date.now();
|
|
206
|
+
if (this.editor.getText().length === 0 && now - this.lastClearAt < 500) {
|
|
207
|
+
this.stop();
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
this.editor.setText(""), this.lastClearAt = now;
|
|
211
|
+
}), this.editor.onCtrlD = () => this.stop(), this.editor.onPasteImage = () => {
|
|
212
|
+
this.pasteClipboard();
|
|
213
|
+
}, this.inputUnsubscribe = this.ui.addInputListener((data) => {
|
|
214
|
+
let editor = this.currentEditor();
|
|
215
|
+
if (!(this.modalActive || !isFocusable(editor) || !editor.focused)) {
|
|
216
|
+
if (this.keybindings.matches(data, "tui.input.submit"))
|
|
217
|
+
return this.submitRequested = editor.getText().trim().length > 0, { consume: !0 };
|
|
218
|
+
(this.keybindings.matches(data, "app.interrupt") || this.keybindings.matches(data, "app.clear")) && (this.submitRequested = !1);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
async pasteClipboard() {
|
|
223
|
+
try {
|
|
224
|
+
let [{ readClipboardText }, { extensionForImageMimeType, readClipboardImage }] = await Promise.all([
|
|
225
|
+
import("./clipboard-OZ63BBC6.js"),
|
|
226
|
+
import("./clipboard-image-7QR6GXVA.js")
|
|
227
|
+
]), image = await readClipboardImage();
|
|
228
|
+
if (image) {
|
|
229
|
+
let extension = extensionForImageMimeType(image.mimeType) ?? "png", filePath = path.join(os.tmpdir(), `lunr-clipboard-${crypto.randomUUID()}.${extension}`);
|
|
230
|
+
fs.writeFileSync(filePath, Buffer.from(image.bytes)), this.editor.insertImageMarker({ path: filePath, mimeType: image.mimeType }), this.ui.requestRender();
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
let text = await readClipboardText();
|
|
234
|
+
if (text) {
|
|
235
|
+
this.editor.insertTextAtCursor(text), this.ui.requestRender();
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
this.status.setText("Clipboard contains no image or text.");
|
|
239
|
+
} catch (error) {
|
|
240
|
+
this.status.setText(`Clipboard paste failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
241
|
+
}
|
|
242
|
+
this.ui.requestRender();
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
export {
|
|
246
|
+
InteractiveView
|
|
247
|
+
};
|