@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,4 @@
|
|
|
1
|
+
import type { AutocompleteProvider } from "@ashx-j/lunr-tui";
|
|
2
|
+
export declare const THINKING_LEVEL_SLASH_NAMES: Set<string>;
|
|
3
|
+
export declare function wrapThinkingLevelSlashCommands(inner: AutocompleteProvider, getLevels: () => readonly string[]): AutocompleteProvider;
|
|
4
|
+
//# sourceMappingURL=thinking-level-slash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinking-level-slash.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/thinking-level-slash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,eAAO,MAAM,0BAA0B,aAAuE,CAAC;AAE/G,wBAAgB,8BAA8B,CAC7C,KAAK,EAAE,oBAAoB,EAC3B,SAAS,EAAE,MAAM,SAAS,MAAM,EAAE,GAChC,oBAAoB,CAmBtB","sourcesContent":["import type { AutocompleteProvider } from \"@ashx-j/lunr-tui\";\n\nexport const THINKING_LEVEL_SLASH_NAMES = new Set([\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"]);\n\nexport function wrapThinkingLevelSlashCommands(\n\tinner: AutocompleteProvider,\n\tgetLevels: () => readonly string[],\n): AutocompleteProvider {\n\treturn {\n\t\ttriggerCharacters: inner.triggerCharacters,\n\t\tasync getSuggestions(lines, cursorLine, cursorCol, options) {\n\t\t\tconst result = await inner.getSuggestions(lines, cursorLine, cursorCol, options);\n\t\t\tif (!result) return result;\n\t\t\tconst textBefore = (lines[cursorLine] || \"\").slice(0, cursorCol);\n\t\t\tif (!textBefore.startsWith(\"/\") || textBefore.includes(\" \")) return result;\n\t\t\tconst allowed = new Set(getLevels());\n\t\t\tconst items = result.items.filter(\n\t\t\t\t(item) => !THINKING_LEVEL_SLASH_NAMES.has(item.value) || allowed.has(item.value),\n\t\t\t);\n\t\t\tif (items.length === 0) return null;\n\t\t\treturn { ...result, items };\n\t\t},\n\t\tapplyCompletion(lines, cursorLine, cursorCol, item, prefix) {\n\t\t\treturn inner.applyCompletion(lines, cursorLine, cursorCol, item, prefix);\n\t\t},\n\t};\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const THINKING_LEVEL_SLASH_NAMES = new Set(["off", "minimal", "low", "medium", "high", "xhigh", "max"]);
|
|
2
|
+
export function wrapThinkingLevelSlashCommands(inner, getLevels) {
|
|
3
|
+
return {
|
|
4
|
+
triggerCharacters: inner.triggerCharacters,
|
|
5
|
+
async getSuggestions(lines, cursorLine, cursorCol, options) {
|
|
6
|
+
const result = await inner.getSuggestions(lines, cursorLine, cursorCol, options);
|
|
7
|
+
if (!result)
|
|
8
|
+
return result;
|
|
9
|
+
const textBefore = (lines[cursorLine] || "").slice(0, cursorCol);
|
|
10
|
+
if (!textBefore.startsWith("/") || textBefore.includes(" "))
|
|
11
|
+
return result;
|
|
12
|
+
const allowed = new Set(getLevels());
|
|
13
|
+
const items = result.items.filter((item) => !THINKING_LEVEL_SLASH_NAMES.has(item.value) || allowed.has(item.value));
|
|
14
|
+
if (items.length === 0)
|
|
15
|
+
return null;
|
|
16
|
+
return { ...result, items };
|
|
17
|
+
},
|
|
18
|
+
applyCompletion(lines, cursorLine, cursorCol, item, prefix) {
|
|
19
|
+
return inner.applyCompletion(lines, cursorLine, cursorCol, item, prefix);
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=thinking-level-slash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinking-level-slash.js","sourceRoot":"","sources":["../../../src/modes/interactive/thinking-level-slash.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAE/G,MAAM,UAAU,8BAA8B,CAC7C,KAA2B,EAC3B,SAAkC,EACX;IACvB,OAAO;QACN,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;QAC1C,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE;YAC3D,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;YACjF,IAAI,CAAC,MAAM;gBAAE,OAAO,MAAM,CAAC;YAC3B,MAAM,UAAU,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;YACjE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAAE,OAAO,MAAM,CAAC;YAC3E,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;YACrC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAChC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,0BAA0B,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAChF,CAAC;YACF,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YACpC,OAAO,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC;QAAA,CAC5B;QACD,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;YAC3D,OAAO,KAAK,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAAA,CACzE;KACD,CAAC;AAAA,CACF","sourcesContent":["import type { AutocompleteProvider } from \"@ashx-j/lunr-tui\";\n\nexport const THINKING_LEVEL_SLASH_NAMES = new Set([\"off\", \"minimal\", \"low\", \"medium\", \"high\", \"xhigh\", \"max\"]);\n\nexport function wrapThinkingLevelSlashCommands(\n\tinner: AutocompleteProvider,\n\tgetLevels: () => readonly string[],\n): AutocompleteProvider {\n\treturn {\n\t\ttriggerCharacters: inner.triggerCharacters,\n\t\tasync getSuggestions(lines, cursorLine, cursorCol, options) {\n\t\t\tconst result = await inner.getSuggestions(lines, cursorLine, cursorCol, options);\n\t\t\tif (!result) return result;\n\t\t\tconst textBefore = (lines[cursorLine] || \"\").slice(0, cursorCol);\n\t\t\tif (!textBefore.startsWith(\"/\") || textBefore.includes(\" \")) return result;\n\t\t\tconst allowed = new Set(getLevels());\n\t\t\tconst items = result.items.filter(\n\t\t\t\t(item) => !THINKING_LEVEL_SLASH_NAMES.has(item.value) || allowed.has(item.value),\n\t\t\t);\n\t\t\tif (items.length === 0) return null;\n\t\t\treturn { ...result, items };\n\t\t},\n\t\tapplyCompletion(lines, cursorLine, cursorCol, item, prefix) {\n\t\t\treturn inner.applyCompletion(lines, cursorLine, cursorCol, item, prefix);\n\t\t},\n\t};\n}\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
createAgentSessionFromServices,
|
|
4
|
+
createAgentSessionServices
|
|
5
|
+
} from "./chunk-ATGA2WLC.js";
|
|
6
|
+
import "./chunk-STERBGUB.js";
|
|
7
|
+
import "./chunk-4CSFRBCN.js";
|
|
8
|
+
import "./chunk-OBMWP3I5.js";
|
|
9
|
+
import "./chunk-DVGWF6A2.js";
|
|
10
|
+
import "./chunk-QFWG2RVL.js";
|
|
11
|
+
import "./chunk-CGBXPL3E.js";
|
|
12
|
+
import "./chunk-WKDK4C5P.js";
|
|
13
|
+
import "./chunk-53YJI7JU.js";
|
|
14
|
+
import "./chunk-KBKMCJDU.js";
|
|
15
|
+
import "./chunk-CSFI6YXL.js";
|
|
16
|
+
import "./chunk-CBGB57XT.js";
|
|
17
|
+
import "./chunk-GKLEQ3I4.js";
|
|
18
|
+
import "./chunk-FVDOXRUD.js";
|
|
19
|
+
import "./chunk-PNJSG3IZ.js";
|
|
20
|
+
import "./chunk-AD6VXAO7.js";
|
|
21
|
+
import "./chunk-J26TSGDL.js";
|
|
22
|
+
import "./chunk-M3LZLQW2.js";
|
|
23
|
+
import "./chunk-RQ2Q5IYR.js";
|
|
24
|
+
import "./chunk-PVCDKGR6.js";
|
|
25
|
+
import "./chunk-OR4L3IB2.js";
|
|
26
|
+
import "./chunk-AY6CAJSL.js";
|
|
27
|
+
import "./chunk-QZMODZQ2.js";
|
|
28
|
+
import "./chunk-DDWHZ633.js";
|
|
29
|
+
import "./chunk-RNBHABBA.js";
|
|
30
|
+
import "./chunk-FQMM2EZ2.js";
|
|
31
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
32
|
+
import "./chunk-BRJX2PRC.js";
|
|
33
|
+
export {
|
|
34
|
+
createAgentSessionFromServices,
|
|
35
|
+
createAgentSessionServices
|
|
36
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
markStartupMilestone
|
|
4
|
+
} from "./chunk-CCZJ3PYY.js";
|
|
5
|
+
import "./chunk-BRJX2PRC.js";
|
|
6
|
+
|
|
7
|
+
// packages/coding-agent/dist/startup/benchmark-request.js
|
|
8
|
+
import { createHash } from "node:crypto";
|
|
9
|
+
import { createFauxCore, fauxAssistantMessage, fauxToolCall } from "@ashx-j/lunr-ai";
|
|
10
|
+
function prepareBenchmarkRequest(session) {
|
|
11
|
+
session.setSessionName("Startup benchmark");
|
|
12
|
+
let faux = createFauxCore({ provider: "lunr-startup-benchmark" }), toolUrl = process.env.PI_STARTUP_BENCHMARK_TOOL_URL;
|
|
13
|
+
if (toolUrl && new URL(toolUrl).hostname !== "127.0.0.1")
|
|
14
|
+
throw new Error("Startup tool fixture must be local");
|
|
15
|
+
let requestedTool = process.env.PI_STARTUP_BENCHMARK_TOOL, toolCall = toolUrl ? fauxToolCall("fetch_content", { url: toolUrl }) : void 0;
|
|
16
|
+
if (requestedTool === "mcp")
|
|
17
|
+
toolCall = fauxToolCall("mcp", {});
|
|
18
|
+
else if (requestedTool === "subagent")
|
|
19
|
+
toolCall = fauxToolCall("subagent", { action: "status", view: "fleet" });
|
|
20
|
+
else if (requestedTool === "lsp")
|
|
21
|
+
toolCall = fauxToolCall("code_overview", { path: "." });
|
|
22
|
+
else if (requestedTool)
|
|
23
|
+
throw new Error(`Unknown startup fixture tool: ${requestedTool}`);
|
|
24
|
+
return faux.setResponses([
|
|
25
|
+
(context) => {
|
|
26
|
+
markStartupMilestone("first_request_dispatched");
|
|
27
|
+
let expected = session.agent.state.tools.map((tool) => tool.name).sort(), actual = context.tools?.map((tool) => tool.name).sort() ?? [];
|
|
28
|
+
if (JSON.stringify(actual) !== JSON.stringify(expected) || !context.systemPrompt)
|
|
29
|
+
throw new Error("Startup request lost registered tools or instructions");
|
|
30
|
+
let toolSchemaHash = createHash("sha256").update(JSON.stringify(context.tools)).digest("hex");
|
|
31
|
+
return process.stderr.write(`LUNR_STARTUP_REQUEST ${JSON.stringify({ tools: actual, toolSchemaHash, hasSystemPrompt: !0 })}
|
|
32
|
+
`), toolCall ? fauxAssistantMessage([toolCall], { stopReason: "toolUse" }) : fauxAssistantMessage("startup-request-ok");
|
|
33
|
+
},
|
|
34
|
+
(context) => {
|
|
35
|
+
let result = context.messages.at(-1);
|
|
36
|
+
if (result?.role !== "toolResult" || result.isError || result.toolName !== toolCall?.name || toolUrl && !JSON.stringify(result.content).includes("This local article verifies") || requestedTool === "lsp" && !JSON.stringify(result.content).includes("increment"))
|
|
37
|
+
throw new Error(`Startup tool ${toolCall?.name} did not complete its local fixture: ${JSON.stringify(result?.content)}`);
|
|
38
|
+
return markStartupMilestone("first_tool_completed"), fauxAssistantMessage("startup-request-ok");
|
|
39
|
+
}
|
|
40
|
+
]), session.modelRuntime.registerProvider("lunr-startup-benchmark", {
|
|
41
|
+
api: faux.api,
|
|
42
|
+
apiKey: "local-benchmark-only",
|
|
43
|
+
models: faux.models,
|
|
44
|
+
streamSimple: faux.streamSimple
|
|
45
|
+
}), session.agent.state.model = faux.getModel(), async () => {
|
|
46
|
+
await session.prompt(toolCall ? "Use the local startup fixture tool." : "Reply with startup-request-ok. Do not use tools.");
|
|
47
|
+
let last = session.state.messages.at(-1);
|
|
48
|
+
if (last?.role !== "assistant" || last.stopReason === "error" || faux.state.callCount !== (toolCall ? 2 : 1)) {
|
|
49
|
+
let error = new Error(`Startup benchmark did not complete its local provider request: ${last?.role === "assistant" ? last.errorMessage ?? last.stopReason : last?.role}, calls=${faux.state.callCount}`);
|
|
50
|
+
throw console.error(error.message), error;
|
|
51
|
+
}
|
|
52
|
+
markStartupMilestone("first_response_completed");
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
prepareBenchmarkRequest
|
|
57
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
activityMonitor
|
|
4
|
+
} from "./chunk-DAPBPCBP.js";
|
|
5
|
+
import {
|
|
6
|
+
getWebSearchConfigPath
|
|
7
|
+
} from "./chunk-VRB2IYGG.js";
|
|
8
|
+
import "./chunk-BRJX2PRC.js";
|
|
9
|
+
|
|
10
|
+
// packages/coding-agent/dist/builtin-extensions/pi-web-access/brave.js
|
|
11
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
12
|
+
var BRAVE_API_URL = "https://api.search.brave.com/res/v1/web/search", CONFIG_PATH = getWebSearchConfigPath(), SEARCH_TIMEOUT_MS = 3e4, cachedConfig = null;
|
|
13
|
+
function loadConfig() {
|
|
14
|
+
if (cachedConfig)
|
|
15
|
+
return cachedConfig;
|
|
16
|
+
if (!existsSync(CONFIG_PATH))
|
|
17
|
+
return cachedConfig = {}, cachedConfig;
|
|
18
|
+
let raw = readFileSync(CONFIG_PATH, "utf-8");
|
|
19
|
+
try {
|
|
20
|
+
return cachedConfig = JSON.parse(raw), cachedConfig;
|
|
21
|
+
} catch (err) {
|
|
22
|
+
let message = err instanceof Error ? err.message : String(err);
|
|
23
|
+
throw new Error(`Failed to parse ${CONFIG_PATH}: ${message}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function normalizeApiKey(value) {
|
|
27
|
+
if (typeof value != "string")
|
|
28
|
+
return null;
|
|
29
|
+
let normalized = value.trim();
|
|
30
|
+
return normalized.length > 0 ? normalized : null;
|
|
31
|
+
}
|
|
32
|
+
function getApiKey() {
|
|
33
|
+
return normalizeApiKey(process.env.BRAVE_API_KEY) ?? normalizeApiKey(loadConfig().braveApiKey);
|
|
34
|
+
}
|
|
35
|
+
function normalizeCount(value) {
|
|
36
|
+
return typeof value != "number" || !Number.isFinite(value) ? 5 : Math.max(1, Math.min(Math.floor(value), 20));
|
|
37
|
+
}
|
|
38
|
+
function normalizeDomain(value) {
|
|
39
|
+
let input = value.trim().toLowerCase();
|
|
40
|
+
if (!input || (input.startsWith("-") && (input = input.slice(1).trim()), !input))
|
|
41
|
+
return null;
|
|
42
|
+
try {
|
|
43
|
+
input = (input.includes("://") ? new URL(input) : new URL(`https://${input}`)).hostname;
|
|
44
|
+
} catch {
|
|
45
|
+
input = input.split("/")[0]?.split(":")[0] ?? "";
|
|
46
|
+
}
|
|
47
|
+
return input = input.replace(/^\.+|\.+$/g, ""), /^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i.test(input) ? input : null;
|
|
48
|
+
}
|
|
49
|
+
function normalizeDomainFilters(domainFilter) {
|
|
50
|
+
let filters = { allowed: [], blocked: [] };
|
|
51
|
+
if (!domainFilter?.length)
|
|
52
|
+
return filters;
|
|
53
|
+
for (let raw of domainFilter) {
|
|
54
|
+
let domain = normalizeDomain(raw);
|
|
55
|
+
if (!domain)
|
|
56
|
+
continue;
|
|
57
|
+
let target = raw.trim().startsWith("-") ? filters.blocked : filters.allowed;
|
|
58
|
+
target.includes(domain) || target.push(domain);
|
|
59
|
+
}
|
|
60
|
+
return filters;
|
|
61
|
+
}
|
|
62
|
+
function buildBraveQuery(query, domainFilter) {
|
|
63
|
+
let filters = normalizeDomainFilters(domainFilter), parts = [query];
|
|
64
|
+
filters.allowed.length === 1 ? parts.push(`site:${filters.allowed[0]}`) : filters.allowed.length > 1 && parts.push(filters.allowed.map((domain) => `site:${domain}`).join(" OR "));
|
|
65
|
+
for (let domain of filters.blocked)
|
|
66
|
+
parts.push(`NOT site:${domain}`);
|
|
67
|
+
return parts.join(" ");
|
|
68
|
+
}
|
|
69
|
+
function hostMatchesDomain(hostname, domain) {
|
|
70
|
+
return hostname === domain || hostname.endsWith(`.${domain}`);
|
|
71
|
+
}
|
|
72
|
+
function matchesDomainFilters(url, filters) {
|
|
73
|
+
if (filters.allowed.length === 0 && filters.blocked.length === 0)
|
|
74
|
+
return !0;
|
|
75
|
+
let hostname = "";
|
|
76
|
+
try {
|
|
77
|
+
hostname = new URL(url).hostname.toLowerCase();
|
|
78
|
+
} catch {
|
|
79
|
+
return !1;
|
|
80
|
+
}
|
|
81
|
+
return filters.allowed.length > 0 && !filters.allowed.some((domain) => hostMatchesDomain(hostname, domain)) ? !1 : !filters.blocked.some((domain) => hostMatchesDomain(hostname, domain));
|
|
82
|
+
}
|
|
83
|
+
function isBraveAvailable() {
|
|
84
|
+
return !!getApiKey();
|
|
85
|
+
}
|
|
86
|
+
async function searchWithBrave(query, options = {}) {
|
|
87
|
+
let apiKey = getApiKey();
|
|
88
|
+
if (!apiKey)
|
|
89
|
+
throw new Error(`Brave Search API key not found. Either:
|
|
90
|
+
1. Create ${CONFIG_PATH} with { "braveApiKey": "your-key" }
|
|
91
|
+
2. Set BRAVE_API_KEY environment variable
|
|
92
|
+
Get a key at https://brave.com/search/api/`);
|
|
93
|
+
let numResults = normalizeCount(options.numResults), domainFilters = normalizeDomainFilters(options.domainFilter), searchQuery = buildBraveQuery(query, options.domainFilter), activityId = activityMonitor.logStart({ type: "api", query: searchQuery }), params = new URLSearchParams({
|
|
94
|
+
q: searchQuery,
|
|
95
|
+
count: String(options.domainFilter?.length ? 20 : numResults)
|
|
96
|
+
});
|
|
97
|
+
if (options.recencyFilter) {
|
|
98
|
+
let freshness = {
|
|
99
|
+
day: "pd",
|
|
100
|
+
week: "pw",
|
|
101
|
+
month: "pm",
|
|
102
|
+
year: "py"
|
|
103
|
+
}[options.recencyFilter];
|
|
104
|
+
freshness && params.set("freshness", freshness);
|
|
105
|
+
}
|
|
106
|
+
try {
|
|
107
|
+
let response = await fetch(`${BRAVE_API_URL}?${params.toString()}`, {
|
|
108
|
+
method: "GET",
|
|
109
|
+
headers: {
|
|
110
|
+
"X-Subscription-Token": apiKey,
|
|
111
|
+
Accept: "application/json",
|
|
112
|
+
"Accept-Encoding": "gzip"
|
|
113
|
+
},
|
|
114
|
+
signal: options.signal ? AbortSignal.any([AbortSignal.timeout(SEARCH_TIMEOUT_MS), options.signal]) : AbortSignal.timeout(SEARCH_TIMEOUT_MS)
|
|
115
|
+
});
|
|
116
|
+
if (!response.ok) {
|
|
117
|
+
activityMonitor.logError(activityId, `HTTP ${response.status}`);
|
|
118
|
+
let errorText = await response.text();
|
|
119
|
+
throw new Error(`Brave Search API error ${response.status}: ${errorText.slice(0, 300)}`);
|
|
120
|
+
}
|
|
121
|
+
let data = await response.json();
|
|
122
|
+
activityMonitor.logComplete(activityId, response.status);
|
|
123
|
+
let results = [];
|
|
124
|
+
for (let item of data.web?.results ?? [])
|
|
125
|
+
if (!(!item.url || !matchesDomainFilters(item.url, domainFilters)) && (results.push({
|
|
126
|
+
title: item.title || item.url,
|
|
127
|
+
url: item.url,
|
|
128
|
+
snippet: item.description || ""
|
|
129
|
+
}), results.length >= numResults))
|
|
130
|
+
break;
|
|
131
|
+
return { answer: results.map((result) => result.snippet ? `${result.snippet}
|
|
132
|
+
Source: ${result.title} (${result.url})` : `Source: ${result.title} (${result.url})`).join(`
|
|
133
|
+
|
|
134
|
+
`), results };
|
|
135
|
+
} catch (err) {
|
|
136
|
+
let message = err instanceof Error ? err.message : String(err);
|
|
137
|
+
throw message.toLowerCase().includes("abort") ? activityMonitor.logComplete(activityId, 0) : activityMonitor.logError(activityId, message), err;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export {
|
|
141
|
+
isBraveAvailable,
|
|
142
|
+
searchWithBrave
|
|
143
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
DEFERRED_BUILTIN_EXTENSION_NAMES,
|
|
4
|
+
DEFERRED_BUILTIN_FLAGS,
|
|
5
|
+
builtinExtensions,
|
|
6
|
+
lightBuiltinExtensions,
|
|
7
|
+
loadAllBuiltinExtensions,
|
|
8
|
+
loadDeferredBuiltinExtensions
|
|
9
|
+
} from "./chunk-ZBV7FAHG.js";
|
|
10
|
+
import "./chunk-PL6JKXWI.js";
|
|
11
|
+
import "./chunk-J26TSGDL.js";
|
|
12
|
+
import "./chunk-M3LZLQW2.js";
|
|
13
|
+
import "./chunk-R5EDISSV.js";
|
|
14
|
+
import "./chunk-H2EOZYMP.js";
|
|
15
|
+
import "./chunk-PVCDKGR6.js";
|
|
16
|
+
import "./chunk-DDWHZ633.js";
|
|
17
|
+
import "./chunk-RNBHABBA.js";
|
|
18
|
+
import "./chunk-FQMM2EZ2.js";
|
|
19
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
20
|
+
import "./chunk-BRJX2PRC.js";
|
|
21
|
+
export {
|
|
22
|
+
DEFERRED_BUILTIN_EXTENSION_NAMES,
|
|
23
|
+
DEFERRED_BUILTIN_FLAGS,
|
|
24
|
+
builtinExtensions,
|
|
25
|
+
lightBuiltinExtensions,
|
|
26
|
+
loadAllBuiltinExtensions,
|
|
27
|
+
loadDeferredBuiltinExtensions
|
|
28
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
CountdownTimer
|
|
4
|
+
} from "./chunk-I6R76AG7.js";
|
|
5
|
+
import {
|
|
6
|
+
DynamicBorder
|
|
7
|
+
} from "./chunk-BOHIDQT4.js";
|
|
8
|
+
import {
|
|
9
|
+
keyHint
|
|
10
|
+
} from "./chunk-DDWHZ633.js";
|
|
11
|
+
import {
|
|
12
|
+
theme
|
|
13
|
+
} from "./chunk-RNBHABBA.js";
|
|
14
|
+
|
|
15
|
+
// packages/coding-agent/dist/modes/interactive/components/extension-input.js
|
|
16
|
+
import { Container, getKeybindings, Input, Spacer, Text } from "@ashx-j/lunr-tui";
|
|
17
|
+
var ExtensionInputComponent = class extends Container {
|
|
18
|
+
input;
|
|
19
|
+
onSubmitCallback;
|
|
20
|
+
onCancelCallback;
|
|
21
|
+
titleText;
|
|
22
|
+
baseTitle;
|
|
23
|
+
countdown;
|
|
24
|
+
// Focusable implementation - propagate to input for IME cursor positioning
|
|
25
|
+
_focused = !1;
|
|
26
|
+
get focused() {
|
|
27
|
+
return this._focused;
|
|
28
|
+
}
|
|
29
|
+
set focused(value) {
|
|
30
|
+
this._focused = value, this.input.focused = value;
|
|
31
|
+
}
|
|
32
|
+
constructor(title, _placeholder, onSubmit, onCancel, opts) {
|
|
33
|
+
super(), this.onSubmitCallback = onSubmit, this.onCancelCallback = onCancel, this.baseTitle = title, this.addChild(new DynamicBorder()), this.addChild(new Spacer(1)), this.titleText = new Text(theme.fg("accent", title), 1, 0), this.addChild(this.titleText), this.addChild(new Spacer(1)), opts?.timeout && opts.timeout > 0 && opts.tui && (this.countdown = new CountdownTimer(opts.timeout, opts.tui, (s) => this.titleText.setText(theme.fg("accent", `${this.baseTitle} (${s}s)`)), () => this.onCancelCallback())), this.input = new Input(), this.addChild(this.input), this.addChild(new Spacer(1)), this.addChild(new Text(`${keyHint("tui.select.confirm", "submit")} ${keyHint("tui.select.cancel", "cancel")}`, 1, 0)), this.addChild(new Spacer(1)), this.addChild(new DynamicBorder());
|
|
34
|
+
}
|
|
35
|
+
handleInput(keyData) {
|
|
36
|
+
let kb = getKeybindings();
|
|
37
|
+
kb.matches(keyData, "tui.select.confirm") || keyData === `
|
|
38
|
+
` ? this.onSubmitCallback(this.input.getValue()) : kb.matches(keyData, "tui.select.cancel") ? this.onCancelCallback() : this.input.handleInput(keyData);
|
|
39
|
+
}
|
|
40
|
+
dispose() {
|
|
41
|
+
this.countdown?.dispose();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
ExtensionInputComponent
|
|
47
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
getModelTiersBridge,
|
|
4
|
+
registerModelTierBridge
|
|
5
|
+
} from "./chunk-W3CVH5RX.js";
|
|
6
|
+
import {
|
|
7
|
+
isRollbackSessionForceEnabled,
|
|
8
|
+
registerUsageServiceBridge
|
|
9
|
+
} from "./chunk-PNJSG3IZ.js";
|
|
10
|
+
import {
|
|
11
|
+
registerCustomizeBridge
|
|
12
|
+
} from "./chunk-HQCKFM2O.js";
|
|
13
|
+
import {
|
|
14
|
+
registerMemoryCapBridge
|
|
15
|
+
} from "./chunk-AY6CAJSL.js";
|
|
16
|
+
|
|
17
|
+
// packages/coding-agent/dist/core/settings-tools-bridge.js
|
|
18
|
+
var SETTINGS_TOOLS_BRIDGE_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/settings-tools"), activeSettingsManager, sessionIdProvider;
|
|
19
|
+
function manager() {
|
|
20
|
+
if (!activeSettingsManager)
|
|
21
|
+
throw new Error("Settings are unavailable in this runtime. Reload lunR and try again.");
|
|
22
|
+
return activeSettingsManager;
|
|
23
|
+
}
|
|
24
|
+
var bridge = {
|
|
25
|
+
getModelTiers: () => manager().getModelTiers(),
|
|
26
|
+
setModelTiers(update) {
|
|
27
|
+
let settings = manager();
|
|
28
|
+
update.enabled !== void 0 && settings.setModelTiersEnabled(update.enabled);
|
|
29
|
+
for (let tier of ["light", "standard", "heavy"]) {
|
|
30
|
+
let model = update[tier];
|
|
31
|
+
model !== void 0 && settings.setTierModel(tier, model);
|
|
32
|
+
let key = `${tier}Thinking`;
|
|
33
|
+
update[key] !== void 0 && settings.setTierThinking(tier, update[key] ?? void 0);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
getAutoManageSubscriptions: () => manager().getAutoManageSubscriptions(),
|
|
37
|
+
setAutoManageSubscriptions: (enabled) => manager().setAutoManageSubscriptions(enabled),
|
|
38
|
+
getRollback: () => ({
|
|
39
|
+
enabled: manager().getRollbackEnabled(),
|
|
40
|
+
turns: manager().getRollbackTurns(),
|
|
41
|
+
capture: manager().getRollbackCapture(),
|
|
42
|
+
scope: manager().getRollbackScope(),
|
|
43
|
+
forcedByAuto: isRollbackSessionForceEnabled(sessionIdProvider?.())
|
|
44
|
+
}),
|
|
45
|
+
setRollback(update) {
|
|
46
|
+
let settings = manager();
|
|
47
|
+
update.enabled !== void 0 && settings.setRollbackEnabled(update.enabled), update.turns !== void 0 && settings.setRollbackTurns(update.turns), update.capture !== void 0 && settings.setRollbackCapture(update.capture), update.scope !== void 0 && settings.setRollbackScope(update.scope);
|
|
48
|
+
},
|
|
49
|
+
getSessionRetentionDays: () => manager().getSessionRetentionDays(),
|
|
50
|
+
setSessionRetentionDays: (days) => manager().setSessionRetentionDays(days)
|
|
51
|
+
};
|
|
52
|
+
function registerSettingsToolsBridge(settingsManager, getSessionId) {
|
|
53
|
+
activeSettingsManager = settingsManager, sessionIdProvider = getSessionId, globalThis[SETTINGS_TOOLS_BRIDGE_SYMBOL] = bridge;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// packages/coding-agent/dist/core/runtime-bridges.js
|
|
57
|
+
function bindRuntimeBridges({ session, services }) {
|
|
58
|
+
let { settingsManager, modelRuntime } = services;
|
|
59
|
+
registerModelTierBridge(settingsManager), getModelTiersBridge()?.setParentThinkingProvider(() => session.thinkingLevel), registerMemoryCapBridge(settingsManager), registerCustomizeBridge(settingsManager), registerUsageServiceBridge(modelRuntime, settingsManager), registerSettingsToolsBridge(settingsManager, () => session.sessionId);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export {
|
|
63
|
+
bindRuntimeBridges
|
|
64
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
getWebSearchConfigPath
|
|
4
|
+
} from "./chunk-VRB2IYGG.js";
|
|
5
|
+
|
|
6
|
+
// packages/coding-agent/dist/builtin-extensions/pi-web-access/gemini-api.js
|
|
7
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
8
|
+
var DEFAULT_API_HOST = "https://generativelanguage.googleapis.com", API_VERSION = "v1beta", API_BASE = `${DEFAULT_API_HOST}/${API_VERSION}`, CONFIG_PATH = getWebSearchConfigPath(), DEFAULT_MODEL = "gemini-3-flash-preview", cachedConfig = null;
|
|
9
|
+
function loadConfig() {
|
|
10
|
+
if (cachedConfig)
|
|
11
|
+
return cachedConfig;
|
|
12
|
+
if (!existsSync(CONFIG_PATH))
|
|
13
|
+
return cachedConfig = {}, cachedConfig;
|
|
14
|
+
let raw = readFileSync(CONFIG_PATH, "utf-8");
|
|
15
|
+
try {
|
|
16
|
+
return cachedConfig = JSON.parse(raw), cachedConfig;
|
|
17
|
+
} catch (err) {
|
|
18
|
+
let message = err instanceof Error ? err.message : String(err);
|
|
19
|
+
throw new Error(`Failed to parse ${CONFIG_PATH}: ${message}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function withTimeout(signal, timeoutMs) {
|
|
23
|
+
let timeout = AbortSignal.timeout(timeoutMs);
|
|
24
|
+
return signal ? AbortSignal.any([signal, timeout]) : timeout;
|
|
25
|
+
}
|
|
26
|
+
function normalizeApiKey(value) {
|
|
27
|
+
if (typeof value != "string")
|
|
28
|
+
return null;
|
|
29
|
+
let normalized = value.trim();
|
|
30
|
+
return normalized.length > 0 ? normalized : null;
|
|
31
|
+
}
|
|
32
|
+
function normalizeBaseUrl(value) {
|
|
33
|
+
if (typeof value != "string")
|
|
34
|
+
return null;
|
|
35
|
+
let normalized = value.trim().replace(/\/+$/, "");
|
|
36
|
+
return normalized.length > 0 ? normalized : null;
|
|
37
|
+
}
|
|
38
|
+
function isCloudflareGateway() {
|
|
39
|
+
return getApiHost().includes("gateway.ai.cloudflare.com");
|
|
40
|
+
}
|
|
41
|
+
function getApiKey() {
|
|
42
|
+
return normalizeApiKey(process.env.GEMINI_API_KEY) ?? normalizeApiKey(loadConfig().geminiApiKey);
|
|
43
|
+
}
|
|
44
|
+
function getApiHost() {
|
|
45
|
+
return normalizeBaseUrl(process.env.GOOGLE_GEMINI_BASE_URL) ?? normalizeBaseUrl(loadConfig().geminiBaseUrl) ?? DEFAULT_API_HOST;
|
|
46
|
+
}
|
|
47
|
+
function getVersionedApiBase() {
|
|
48
|
+
return `${getApiHost()}/${API_VERSION}`;
|
|
49
|
+
}
|
|
50
|
+
function buildKeyParam(apiKey) {
|
|
51
|
+
return !apiKey || isCloudflareGateway() ? "" : `?key=${apiKey}`;
|
|
52
|
+
}
|
|
53
|
+
function getCloudflareApiKey() {
|
|
54
|
+
return normalizeApiKey(process.env.CLOUDFLARE_API_KEY) ?? normalizeApiKey(loadConfig().cloudflareApiKey);
|
|
55
|
+
}
|
|
56
|
+
function isGatewayConfigured() {
|
|
57
|
+
return isCloudflareGateway() && getCloudflareApiKey() !== null;
|
|
58
|
+
}
|
|
59
|
+
function buildAuthHeaders() {
|
|
60
|
+
if (!isCloudflareGateway())
|
|
61
|
+
return {};
|
|
62
|
+
let cloudflareApiKey = getCloudflareApiKey();
|
|
63
|
+
return cloudflareApiKey ? { "cf-aig-authorization": `Bearer ${cloudflareApiKey}` } : {};
|
|
64
|
+
}
|
|
65
|
+
function isGeminiApiAvailable() {
|
|
66
|
+
return getApiKey() !== null || isGatewayConfigured();
|
|
67
|
+
}
|
|
68
|
+
async function queryGeminiApiWithVideo(prompt, videoUri, options = {}) {
|
|
69
|
+
let apiKey = getApiKey();
|
|
70
|
+
if (!apiKey && !isGatewayConfigured())
|
|
71
|
+
throw new Error(`Gemini API not configured. Either:
|
|
72
|
+
1. Set GEMINI_API_KEY in ${CONFIG_PATH}
|
|
73
|
+
2. Set GOOGLE_GEMINI_BASE_URL + CLOUDFLARE_API_KEY for Cloudflare AI Gateway routing`);
|
|
74
|
+
let model = options.model ?? DEFAULT_MODEL, signal = withTimeout(options.signal, options.timeoutMs ?? 12e4), url = `${getVersionedApiBase()}/models/${model}:generateContent${buildKeyParam(apiKey)}`, fileData = { fileUri: videoUri };
|
|
75
|
+
options.mimeType && (fileData.mimeType = options.mimeType);
|
|
76
|
+
let body = {
|
|
77
|
+
contents: [
|
|
78
|
+
{
|
|
79
|
+
role: "user",
|
|
80
|
+
parts: [
|
|
81
|
+
{ fileData },
|
|
82
|
+
{ text: prompt }
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}, res = await fetch(url, {
|
|
87
|
+
method: "POST",
|
|
88
|
+
headers: { "Content-Type": "application/json", ...buildAuthHeaders() },
|
|
89
|
+
body: JSON.stringify(body),
|
|
90
|
+
signal
|
|
91
|
+
});
|
|
92
|
+
if (!res.ok) {
|
|
93
|
+
let errorText = await res.text();
|
|
94
|
+
throw new Error(`Gemini API error ${res.status}: ${errorText.slice(0, 300)}`);
|
|
95
|
+
}
|
|
96
|
+
let text = (await res.json()).candidates?.[0]?.content?.parts?.map((p) => p.text).filter(Boolean).join(`
|
|
97
|
+
`);
|
|
98
|
+
if (!text)
|
|
99
|
+
throw new Error("Gemini API returned empty response");
|
|
100
|
+
return text;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export {
|
|
104
|
+
API_BASE,
|
|
105
|
+
DEFAULT_MODEL,
|
|
106
|
+
getApiKey,
|
|
107
|
+
getApiHost,
|
|
108
|
+
getVersionedApiBase,
|
|
109
|
+
buildKeyParam,
|
|
110
|
+
getCloudflareApiKey,
|
|
111
|
+
isGatewayConfigured,
|
|
112
|
+
buildAuthHeaders,
|
|
113
|
+
isGeminiApiAvailable,
|
|
114
|
+
queryGeminiApiWithVideo
|
|
115
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/coding-agent/dist/builtin-extensions/pi-lsp-extension/src/shared/language-map.js
|
|
4
|
+
var EXT_TO_LANGUAGE = {
|
|
5
|
+
".ts": "typescript",
|
|
6
|
+
".tsx": "typescriptreact",
|
|
7
|
+
".js": "javascript",
|
|
8
|
+
".jsx": "javascriptreact",
|
|
9
|
+
".mts": "typescript",
|
|
10
|
+
".mjs": "javascript",
|
|
11
|
+
".cts": "typescript",
|
|
12
|
+
".cjs": "javascript",
|
|
13
|
+
".rs": "rust",
|
|
14
|
+
".py": "python",
|
|
15
|
+
".go": "go",
|
|
16
|
+
".java": "java",
|
|
17
|
+
".c": "c",
|
|
18
|
+
".h": "c",
|
|
19
|
+
".cpp": "cpp",
|
|
20
|
+
".cc": "cpp",
|
|
21
|
+
".hpp": "cpp",
|
|
22
|
+
".cs": "csharp",
|
|
23
|
+
".rb": "ruby",
|
|
24
|
+
".kt": "kotlin",
|
|
25
|
+
".kts": "kotlin",
|
|
26
|
+
".scala": "scala",
|
|
27
|
+
".ex": "elixir",
|
|
28
|
+
".exs": "elixir",
|
|
29
|
+
".lua": "lua",
|
|
30
|
+
".sh": "bash",
|
|
31
|
+
".bash": "bash",
|
|
32
|
+
".zsh": "bash",
|
|
33
|
+
".swift": "swift",
|
|
34
|
+
".zig": "zig",
|
|
35
|
+
".json": "json",
|
|
36
|
+
".html": "html",
|
|
37
|
+
".htm": "html",
|
|
38
|
+
".css": "css",
|
|
39
|
+
".vue": "vue",
|
|
40
|
+
".php": "php"
|
|
41
|
+
};
|
|
42
|
+
function getLanguageIdFromPath(filePath) {
|
|
43
|
+
let ext = filePath.match(/\.[^.]+$/)?.[0]?.toLowerCase();
|
|
44
|
+
return ext ? EXT_TO_LANGUAGE[ext] : void 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
getLanguageIdFromPath
|
|
49
|
+
};
|