@ashx-j/lunr-dev 0.2.13-dev.7.1 → 0.2.16-dev.9.1
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 +29 -1
- package/dist/builtin-extensions/ashxj-tui.d.ts +14 -0
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +37 -3
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- package/dist/builtin-extensions/index.d.ts +1 -15
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +7 -21
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js +6 -2
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.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 +163 -169
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts +46 -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 +109 -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 +251 -94
- 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-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 +38 -14
- package/dist/builtin-extensions/pi-subagents/src/extension/index.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 +1 -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 +2 -1
- 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 +167 -77
- 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/catalog/models.json +1 -1
- package/dist/catalog/providers/amazon-bedrock.json +1 -1
- package/dist/catalog/providers/azure-openai-responses.json +1 -1
- package/dist/catalog/providers/fireworks.json +1 -1
- package/dist/catalog/providers/github-copilot.json +1 -1
- package/dist/catalog/providers/openai-codex.json +1 -1
- package/dist/catalog/providers/openai.json +1 -1
- package/dist/catalog/providers/opencode.json +1 -1
- package/dist/catalog/providers/openrouter.json +1 -1
- package/dist/catalog/providers/vercel-ai-gateway.json +1 -1
- package/dist/catalog/publication.json +131 -3
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +1 -0
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli-runtime.d.ts +3 -0
- package/dist/cli-runtime.d.ts.map +1 -0
- package/dist/cli-runtime.js +73 -0
- package/dist/cli-runtime.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +14 -53
- 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 +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +56 -12
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/catalog-cache-scope.d.ts +3 -0
- package/dist/core/catalog-cache-scope.d.ts.map +1 -0
- package/dist/core/catalog-cache-scope.js +12 -0
- package/dist/core/catalog-cache-scope.js.map +1 -0
- package/dist/core/catalog-merge.d.ts +2 -0
- package/dist/core/catalog-merge.d.ts.map +1 -1
- package/dist/core/catalog-merge.js +29 -2
- package/dist/core/catalog-merge.js.map +1 -1
- package/dist/core/catalog-refresh-polling.d.ts +8 -0
- package/dist/core/catalog-refresh-polling.d.ts.map +1 -0
- package/dist/core/catalog-refresh-polling.js +30 -0
- package/dist/core/catalog-refresh-polling.js.map +1 -0
- package/dist/core/codex-catalog.d.ts +3 -0
- package/dist/core/codex-catalog.d.ts.map +1 -0
- package/dist/core/codex-catalog.js +15 -0
- package/dist/core/codex-catalog.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +10 -5
- package/dist/core/compaction/compaction.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/extensions/types.d.ts +2 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +2 -0
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/live-catalog.d.ts +5 -2
- package/dist/core/live-catalog.d.ts.map +1 -1
- package/dist/core/live-catalog.js +108 -27
- package/dist/core/live-catalog.js.map +1 -1
- package/dist/core/model-runtime.d.ts +8 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +64 -12
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/official-catalog.d.ts +4 -0
- package/dist/core/official-catalog.d.ts.map +1 -1
- package/dist/core/official-catalog.js +86 -21
- package/dist/core/official-catalog.js.map +1 -1
- package/dist/core/permissions.d.ts +0 -2
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +10 -18
- package/dist/core/permissions.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/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +0 -1
- package/dist/core/slash-commands.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/commands.d.ts +1 -1
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +1 -18
- package/dist/gateway/commands.js.map +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +66 -48
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +4 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +13 -22
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +141 -207
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +95 -84
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/node-runtime/agent-session-services-IFJMSX7Z.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-LYZ3BFWQ.js +28 -0
- package/dist/node-runtime/chunk-2QKLKMKC.js +173 -0
- package/dist/node-runtime/chunk-3GHXVUAK.js +21 -0
- package/dist/node-runtime/chunk-3RCWXWAY.js +466 -0
- package/dist/node-runtime/chunk-3WFAEVKS.js +115 -0
- package/dist/node-runtime/chunk-3X3KZKMI.js +49 -0
- package/dist/node-runtime/chunk-4HXHDDCF.js +16 -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-5P7PZMRU.js +610 -0
- package/dist/node-runtime/chunk-7N3YHTYF.js +26 -0
- package/dist/node-runtime/chunk-7NBZ5P7I.js +24 -0
- package/dist/node-runtime/chunk-A2KQXUJD.js +105 -0
- package/dist/node-runtime/chunk-AD6VXAO7.js +342 -0
- package/dist/node-runtime/chunk-AHSTJBIB.js +64 -0
- package/dist/node-runtime/chunk-AJX357CL.js +20211 -0
- package/dist/node-runtime/chunk-ARC4KOTI.js +11178 -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-BR7YDUKA.js +109 -0
- package/dist/node-runtime/chunk-BRJX2PRC.js +53 -0
- package/dist/node-runtime/chunk-C4O2RSQQ.js +37 -0
- package/dist/node-runtime/chunk-CCZJ3PYY.js +17 -0
- package/dist/node-runtime/chunk-CDFZEWPU.js +8388 -0
- package/dist/node-runtime/chunk-CGBXPL3E.js +1171 -0
- package/dist/node-runtime/chunk-CJECDQKP.js +19 -0
- package/dist/node-runtime/chunk-DAPBPCBP.js +53 -0
- package/dist/node-runtime/chunk-DDGMHUOW.js +305 -0
- package/dist/node-runtime/chunk-DMMTJQMQ.js +43 -0
- package/dist/node-runtime/chunk-DVGWF6A2.js +1180 -0
- package/dist/node-runtime/chunk-ECD5L7YI.js +1369 -0
- package/dist/node-runtime/chunk-EDBJNRSM.js +46 -0
- package/dist/node-runtime/chunk-F4VQFJI2.js +1269 -0
- package/dist/node-runtime/chunk-FVDOXRUD.js +96 -0
- package/dist/node-runtime/chunk-GZQHMEWL.js +126 -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-IPA627GP.js +296 -0
- package/dist/node-runtime/chunk-JHYKXIMM.js +378 -0
- package/dist/node-runtime/chunk-KKSIVROT.js +88 -0
- package/dist/node-runtime/chunk-LZAW4ZX3.js +633 -0
- package/dist/node-runtime/chunk-M3LZLQW2.js +98 -0
- package/dist/node-runtime/chunk-MGWCVY6Y.js +47 -0
- package/dist/node-runtime/chunk-MJQDX3BA.js +72 -0
- package/dist/node-runtime/chunk-MKKH27PH.js +8956 -0
- package/dist/node-runtime/chunk-MX3GJNXJ.js +986 -0
- package/dist/node-runtime/chunk-N77MY65L.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-OR4L3IB2.js +42 -0
- package/dist/node-runtime/chunk-PBC2Y6GS.js +903 -0
- package/dist/node-runtime/chunk-PCGNAY2O.js +1324 -0
- package/dist/node-runtime/chunk-PCIGF2XK.js +250 -0
- package/dist/node-runtime/chunk-PGAJ5MO5.js +7558 -0
- package/dist/node-runtime/chunk-PL6JKXWI.js +3622 -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-QH42CDX3.js +9451 -0
- package/dist/node-runtime/chunk-RQ2Q5IYR.js +72 -0
- package/dist/node-runtime/chunk-RQ5DNUNG.js +429 -0
- package/dist/node-runtime/chunk-RRIZE6QQ.js +17 -0
- package/dist/node-runtime/chunk-SN6G4OU6.js +4753 -0
- package/dist/node-runtime/chunk-SWSN6HAB.js +53 -0
- package/dist/node-runtime/chunk-TQNSPERU.js +949 -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-WOVTOV5P.js +5653 -0
- package/dist/node-runtime/chunk-XBWPBZBN.js +125 -0
- package/dist/node-runtime/chunk-XTHQ7XR7.js +509 -0
- package/dist/node-runtime/chunk-YF63P5ZT.js +864 -0
- package/dist/node-runtime/chunk-YSKSB3BJ.js +295 -0
- package/dist/node-runtime/chunk-ZCHMJ34K.js +130 -0
- package/dist/node-runtime/chunk-ZKMFUD3Q.js +2834 -0
- package/dist/node-runtime/cli-runtime.js +81 -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-L3LAHDIH.js +13 -0
- package/dist/node-runtime/commands-RL5YBW5I.js +291 -0
- package/dist/node-runtime/config-FMEOZSWE.js +77 -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-JVDXTO7A.js +188 -0
- package/dist/node-runtime/exa-LL64QZR2.js +329 -0
- package/dist/node-runtime/export-html-KR26FOUZ.js +150 -0
- package/dist/node-runtime/extension-input-RV5N6APL.js +14 -0
- package/dist/node-runtime/extension-selector-CPD5LWDD.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-X2TI5X7F.js +2484 -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-CZQ7FFQJ.js +1831 -0
- package/dist/node-runtime/index.js +859 -0
- package/dist/node-runtime/init-NJV2T55N.js +28 -0
- package/dist/node-runtime/install-cli-TH7IJJQQ.js +308 -0
- package/dist/node-runtime/interactive-mode-KOM35YF2.js +56 -0
- package/dist/node-runtime/interactive-view-U6OILKF3.js +249 -0
- package/dist/node-runtime/lsp-manager-3ASUSO4T.js +1104 -0
- package/dist/node-runtime/lunr-cron-YJ5UHYRD.js +268 -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-TZZHJCVI.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-QFB37AVN.js +422 -0
- package/dist/node-runtime/pi-ollama-cloud-4VZRMULP.js +1440 -0
- package/dist/node-runtime/pi-prompt-template-model-4QT4LLXF.js +3946 -0
- package/dist/node-runtime/pi-subagents-7XJ4H53P.js +6023 -0
- package/dist/node-runtime/pi-web-access-DPGAVKOA.js +1864 -0
- package/dist/node-runtime/print-mode-VWIRFDAC.js +12 -0
- package/dist/node-runtime/proxy-modes-HEEFK4KC.js +685 -0
- package/dist/node-runtime/rpc-entry.js +62 -0
- package/dist/node-runtime/rpc-mode-SJNSOA4G.js +13 -0
- package/dist/node-runtime/runtime-bridges-PPHNBFWL.js +14 -0
- package/dist/node-runtime/session-manager-MQNBYACL.js +35 -0
- package/dist/node-runtime/session-selector-5AZLJS6U.js +14 -0
- package/dist/node-runtime/settings-manager-5LF2VQWC.js +21 -0
- package/dist/node-runtime/src-Y7JSCK64.js +2407 -0
- package/dist/node-runtime/subagent-executor-5RNDEPIJ.js +8483 -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-A253SZ7P.js +73 -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/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 +55 -0
- package/dist/startup/interactive-view.d.ts.map +1 -0
- package/dist/startup/interactive-view.js +332 -0
- package/dist/startup/interactive-view.js.map +1 -0
- package/dist/startup/launch-routing.d.ts.map +1 -1
- package/dist/startup/launch-routing.js +9 -10
- package/dist/startup/launch-routing.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 +3 -2
- 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/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +10 -4
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/docs/compaction.md +5 -3
- package/docs/development.md +5 -1
- package/docs/features.md +0 -1
- package/docs/interactive-startup.md +98 -0
- package/docs/model-catalog.md +29 -0
- package/docs/usage.md +0 -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/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 +20 -20
- package/dist/core/swarm.d.ts +0 -23
- package/dist/core/swarm.d.ts.map +0 -1
- package/dist/core/swarm.js +0 -45
- package/dist/core/swarm.js.map +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
parseArgs
|
|
5
|
+
} from "./chunk-DDGMHUOW.js";
|
|
6
|
+
import {
|
|
7
|
+
markStartupMilestone
|
|
8
|
+
} from "./chunk-CCZJ3PYY.js";
|
|
9
|
+
import {
|
|
10
|
+
isNodeBundle
|
|
11
|
+
} from "./chunk-PCIGF2XK.js";
|
|
12
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
13
|
+
import "./chunk-BRJX2PRC.js";
|
|
14
|
+
|
|
15
|
+
// packages/coding-agent/dist/cli-runtime.js
|
|
16
|
+
import { enableCompileCache } from "node:module";
|
|
17
|
+
import { homedir } from "node:os";
|
|
18
|
+
import { join } from "node:path";
|
|
19
|
+
|
|
20
|
+
// packages/coding-agent/dist/startup/launch-routing.js
|
|
21
|
+
var DEFERRED_COMMANDS = /* @__PURE__ */ new Set([
|
|
22
|
+
"config",
|
|
23
|
+
"features",
|
|
24
|
+
"gateway",
|
|
25
|
+
"install",
|
|
26
|
+
"list",
|
|
27
|
+
"remove",
|
|
28
|
+
"setup",
|
|
29
|
+
"uninstall",
|
|
30
|
+
"update"
|
|
31
|
+
]);
|
|
32
|
+
function resolvePreloadLaunchMode(args2, environment) {
|
|
33
|
+
if (DEFERRED_COMMANDS.has(args2[0] ?? ""))
|
|
34
|
+
return "deferred";
|
|
35
|
+
let parsed = parseArgs([...args2]);
|
|
36
|
+
return parsed.help || parsed.version || parsed.print || parsed.export || parsed.listModels !== void 0 || parsed.mode === "rpc" || parsed.mode === "json" ? "deferred" : environment.startupBenchmark || environment.stdinIsTTY && environment.stdoutIsTTY ? "interactive" : "deferred";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// packages/coding-agent/dist/cli-runtime.js
|
|
40
|
+
markStartupMilestone("process_entry");
|
|
41
|
+
var startupAppName = process.env.PI_CODING_AGENT_DEV === "1" ? "lunr-dev" : "lunr";
|
|
42
|
+
process.title = startupAppName;
|
|
43
|
+
process.stdout.isTTY && process.stdout.write(`\x1B]0;${startupAppName}\x07`);
|
|
44
|
+
if (!isNodeBundle)
|
|
45
|
+
try {
|
|
46
|
+
let agentDir = process.env.PI_CODING_AGENT_DIR?.trim() || join(homedir(), ".lunr", "agent");
|
|
47
|
+
enableCompileCache(join(agentDir, "compile-cache"));
|
|
48
|
+
} catch {
|
|
49
|
+
}
|
|
50
|
+
process.env.PI_CODING_AGENT = "true";
|
|
51
|
+
process.emitWarning = (() => {
|
|
52
|
+
});
|
|
53
|
+
var args = process.argv.slice(2), startupBenchmark = process.env.PI_STARTUP_BENCHMARK === "1", preloadMode = resolvePreloadLaunchMode(args, {
|
|
54
|
+
stdinIsTTY: process.stdin.isTTY === !0,
|
|
55
|
+
stdoutIsTTY: process.stdout.isTTY === !0,
|
|
56
|
+
startupBenchmark
|
|
57
|
+
});
|
|
58
|
+
markStartupMilestone("mode_routed");
|
|
59
|
+
var startupView;
|
|
60
|
+
if (preloadMode === "interactive") {
|
|
61
|
+
let { InteractiveView } = await import("./interactive-view-U6OILKF3.js");
|
|
62
|
+
startupView = new InteractiveView(), startupView.start(), await startupView.waitForFirstFrame(), startupView.isExitRequested && process.exit(0);
|
|
63
|
+
}
|
|
64
|
+
var startRuntime = async () => {
|
|
65
|
+
let importStarted = performance.now();
|
|
66
|
+
try {
|
|
67
|
+
let [{ APP_NAME }, { main }, { noteImportMain }] = await Promise.all([
|
|
68
|
+
import("./config-FMEOZSWE.js"),
|
|
69
|
+
import("./main.js"),
|
|
70
|
+
import("./timings-UAD5BEAS.js")
|
|
71
|
+
]);
|
|
72
|
+
noteImportMain(performance.now() - importStarted), process.title = APP_NAME, await main(args, { startupView });
|
|
73
|
+
} catch (error) {
|
|
74
|
+
if (startupBenchmark && console.error(error), startupView && !startupView.isExitRequested)
|
|
75
|
+
process.exitCode = 1, await startupView.fail(error);
|
|
76
|
+
else
|
|
77
|
+
throw error;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
process.once("exit", () => startupView?.stop());
|
|
81
|
+
startupView ? (await Promise.race([startRuntime(), startupView.waitForExit()]), startupView.isExitRequested && process.exit(process.exitCode ?? 0)) : await startRuntime();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
copyToClipboard,
|
|
4
|
+
readClipboardText
|
|
5
|
+
} from "./chunk-Q5ZU2VRT.js";
|
|
6
|
+
import "./chunk-NUIFPZWX.js";
|
|
7
|
+
import "./chunk-RQ2Q5IYR.js";
|
|
8
|
+
import "./chunk-BRJX2PRC.js";
|
|
9
|
+
export {
|
|
10
|
+
copyToClipboard,
|
|
11
|
+
readClipboardText
|
|
12
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
extensionForImageMimeType,
|
|
4
|
+
isWaylandSession,
|
|
5
|
+
readClipboardImage
|
|
6
|
+
} from "./chunk-NUIFPZWX.js";
|
|
7
|
+
import "./chunk-RQ2Q5IYR.js";
|
|
8
|
+
import "./chunk-BRJX2PRC.js";
|
|
9
|
+
export {
|
|
10
|
+
extensionForImageMimeType,
|
|
11
|
+
isWaylandSession,
|
|
12
|
+
readClipboardImage
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import "./chunk-BRJX2PRC.js";
|
|
3
|
+
|
|
4
|
+
// packages/coding-agent/dist/gateway/command.js
|
|
5
|
+
async function handleGatewayCommand(args) {
|
|
6
|
+
if (args[0] !== "gateway")
|
|
7
|
+
return !1;
|
|
8
|
+
let { runGateway } = await import("./gateway-X2TI5X7F.js"), code = await runGateway(args.slice(1));
|
|
9
|
+
return process.exitCode = code, !0;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
handleGatewayCommand
|
|
13
|
+
};
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
buildToolMetadata,
|
|
4
|
+
getFailureAgeSeconds,
|
|
5
|
+
lazyConnect,
|
|
6
|
+
updateMetadataCache,
|
|
7
|
+
updateStatusBar
|
|
8
|
+
} from "./chunk-MKKH27PH.js";
|
|
9
|
+
import {
|
|
10
|
+
ensureCompatibilityImports,
|
|
11
|
+
getMcpDiscoverySummary,
|
|
12
|
+
getServerProvenance,
|
|
13
|
+
loadMetadataCache,
|
|
14
|
+
openPath,
|
|
15
|
+
previewCompatibilityImports,
|
|
16
|
+
previewSharedServerEntry,
|
|
17
|
+
previewStarterProjectConfig,
|
|
18
|
+
writeDirectToolsConfig,
|
|
19
|
+
writeSharedServerEntry,
|
|
20
|
+
writeStarterProjectConfig
|
|
21
|
+
} from "./chunk-VSELYKWU.js";
|
|
22
|
+
import {
|
|
23
|
+
authenticate,
|
|
24
|
+
getAuthForUrl,
|
|
25
|
+
removeAuth,
|
|
26
|
+
supportsOAuth
|
|
27
|
+
} from "./chunk-4TLO4PO2.js";
|
|
28
|
+
import {
|
|
29
|
+
getAgentPath
|
|
30
|
+
} from "./chunk-4HXHDDCF.js";
|
|
31
|
+
import "./chunk-BI3DHYCN.js";
|
|
32
|
+
import "./chunk-ARC4KOTI.js";
|
|
33
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
34
|
+
import "./chunk-BRJX2PRC.js";
|
|
35
|
+
|
|
36
|
+
// packages/coding-agent/dist/builtin-extensions/pi-mcp-adapter/onboarding-state.js
|
|
37
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync, renameSync } from "node:fs";
|
|
38
|
+
import { dirname } from "node:path";
|
|
39
|
+
var DEFAULT_STATE = {
|
|
40
|
+
version: 1,
|
|
41
|
+
sharedConfigHintShown: !1,
|
|
42
|
+
setupCompleted: !1
|
|
43
|
+
};
|
|
44
|
+
function getOnboardingStatePath() {
|
|
45
|
+
return getAgentPath("mcp-onboarding.json");
|
|
46
|
+
}
|
|
47
|
+
function loadOnboardingState() {
|
|
48
|
+
let path = getOnboardingStatePath();
|
|
49
|
+
if (!existsSync(path))
|
|
50
|
+
return { ...DEFAULT_STATE };
|
|
51
|
+
try {
|
|
52
|
+
let raw = JSON.parse(readFileSync(path, "utf-8"));
|
|
53
|
+
return !raw || typeof raw != "object" ? { ...DEFAULT_STATE } : {
|
|
54
|
+
version: 1,
|
|
55
|
+
sharedConfigHintShown: raw.sharedConfigHintShown === !0,
|
|
56
|
+
setupCompleted: raw.setupCompleted === !0,
|
|
57
|
+
lastDiscoveryFingerprint: typeof raw.lastDiscoveryFingerprint == "string" ? raw.lastDiscoveryFingerprint : void 0
|
|
58
|
+
};
|
|
59
|
+
} catch {
|
|
60
|
+
return { ...DEFAULT_STATE };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function saveOnboardingState(state) {
|
|
64
|
+
let path = getOnboardingStatePath();
|
|
65
|
+
mkdirSync(dirname(path), { recursive: !0 });
|
|
66
|
+
let tmpPath = `${path}.${process.pid}.tmp`;
|
|
67
|
+
writeFileSync(tmpPath, `${JSON.stringify(state, null, 2)}
|
|
68
|
+
`, "utf-8"), renameSync(tmpPath, path);
|
|
69
|
+
}
|
|
70
|
+
function updateOnboardingState(updater) {
|
|
71
|
+
let next = updater(loadOnboardingState());
|
|
72
|
+
return saveOnboardingState(next), next;
|
|
73
|
+
}
|
|
74
|
+
function markSharedConfigHintShown(fingerprint) {
|
|
75
|
+
return updateOnboardingState((state) => ({
|
|
76
|
+
...state,
|
|
77
|
+
sharedConfigHintShown: !0,
|
|
78
|
+
lastDiscoveryFingerprint: fingerprint ?? state.lastDiscoveryFingerprint
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
function markSetupCompleted(fingerprint) {
|
|
82
|
+
return updateOnboardingState((state) => ({
|
|
83
|
+
...state,
|
|
84
|
+
setupCompleted: !0,
|
|
85
|
+
lastDiscoveryFingerprint: fingerprint ?? state.lastDiscoveryFingerprint
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// packages/coding-agent/dist/builtin-extensions/pi-mcp-adapter/commands.js
|
|
90
|
+
async function showStatus(state, ctx) {
|
|
91
|
+
if (!ctx.hasUI)
|
|
92
|
+
return;
|
|
93
|
+
let lines = ["MCP Server Status:", ""];
|
|
94
|
+
for (let name of Object.keys(state.config.mcpServers)) {
|
|
95
|
+
let connection = state.manager.getConnection(name), metadata = state.toolMetadata.get(name), toolCount = metadata?.length ?? 0, failedAgo = getFailureAgeSeconds(state, name), status = "not connected", statusIcon = "\u25CB", failed = !1;
|
|
96
|
+
connection?.status === "connected" ? (status = "connected", statusIcon = "\u2713") : connection?.status === "needs-auth" ? (status = "needs auth", statusIcon = "\u26A0") : failedAgo !== null ? (status = `failed ${failedAgo}s ago`, statusIcon = "\u2717", failed = !0) : metadata !== void 0 && (status = "cached");
|
|
97
|
+
let toolSuffix = failed ? "" : ` (${toolCount} tools${status === "cached" ? ", cached" : ""})`;
|
|
98
|
+
lines.push(`${statusIcon} ${name}: ${status}${toolSuffix}`);
|
|
99
|
+
}
|
|
100
|
+
Object.keys(state.config.mcpServers).length === 0 && (lines.push("No MCP servers configured"), lines.push("Run /mcp setup to adopt imports or scaffold a starter .mcp.json")), ctx.ui.notify(lines.join(`
|
|
101
|
+
`), "info");
|
|
102
|
+
}
|
|
103
|
+
async function showTools(state, ctx) {
|
|
104
|
+
if (!ctx.hasUI)
|
|
105
|
+
return;
|
|
106
|
+
let allTools = [...state.toolMetadata.values()].flat().map((m) => m.name);
|
|
107
|
+
if (allTools.length === 0) {
|
|
108
|
+
ctx.ui.notify("No MCP tools available", "info");
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
let lines = [
|
|
112
|
+
"MCP Tools:",
|
|
113
|
+
"",
|
|
114
|
+
...allTools.map((t) => ` ${t}`),
|
|
115
|
+
"",
|
|
116
|
+
`Total: ${allTools.length} tools`
|
|
117
|
+
];
|
|
118
|
+
ctx.ui.notify(lines.join(`
|
|
119
|
+
`), "info");
|
|
120
|
+
}
|
|
121
|
+
async function reconnectServers(state, ctx, targetServer) {
|
|
122
|
+
if (targetServer && !state.config.mcpServers[targetServer]) {
|
|
123
|
+
ctx.hasUI && ctx.ui.notify(`Server "${targetServer}" not found in config`, "error");
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
let entries = targetServer ? [[targetServer, state.config.mcpServers[targetServer]]] : Object.entries(state.config.mcpServers);
|
|
127
|
+
for (let [name, definition] of entries)
|
|
128
|
+
try {
|
|
129
|
+
await state.manager.close(name);
|
|
130
|
+
let connection = await state.manager.connect(name, definition);
|
|
131
|
+
if (connection.status === "needs-auth") {
|
|
132
|
+
ctx.hasUI && ctx.ui.notify(`MCP: ${name} requires OAuth. Run /mcp-auth ${name} first.`, "warning");
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
let prefix = state.config.settings?.toolPrefix ?? "server", { metadata, failedTools } = buildToolMetadata(connection.tools, connection.resources, definition, name, prefix);
|
|
136
|
+
state.toolMetadata.set(name, metadata), updateMetadataCache(state, name), state.failureTracker.delete(name), ctx.hasUI && (ctx.ui.notify(`MCP: Reconnected to ${name} (${connection.tools.length} tools, ${connection.resources.length} resources)`, "info"), failedTools.length > 0 && ctx.ui.notify(`MCP: ${name} - ${failedTools.length} tools skipped`, "warning"));
|
|
137
|
+
} catch (error) {
|
|
138
|
+
let message = error instanceof Error ? error.message : String(error);
|
|
139
|
+
state.failureTracker.set(name, Date.now()), ctx.hasUI && ctx.ui.notify(`MCP: Failed to reconnect to ${name}: ${message}`, "error");
|
|
140
|
+
}
|
|
141
|
+
updateStatusBar(state);
|
|
142
|
+
}
|
|
143
|
+
async function authenticateServer(serverName, config, ctx) {
|
|
144
|
+
if (!ctx.hasUI)
|
|
145
|
+
return { ok: !1, message: "OAuth authentication requires an interactive session." };
|
|
146
|
+
let definition = config.mcpServers[serverName];
|
|
147
|
+
if (!definition) {
|
|
148
|
+
let message = `Server "${serverName}" not found in config`;
|
|
149
|
+
return ctx.ui.notify(message, "error"), { ok: !1, message };
|
|
150
|
+
}
|
|
151
|
+
if (!supportsOAuth(definition)) {
|
|
152
|
+
let message = `Server "${serverName}" does not use OAuth authentication. Set "auth": "oauth" or omit auth for auto-detection.`;
|
|
153
|
+
return ctx.ui.notify(`Server "${serverName}" does not use OAuth authentication.
|
|
154
|
+
Set "auth": "oauth" or omit auth for auto-detection.`, "error"), { ok: !1, message };
|
|
155
|
+
}
|
|
156
|
+
if (!definition.url) {
|
|
157
|
+
let message = `Server "${serverName}" has no URL configured (OAuth requires HTTP transport)`;
|
|
158
|
+
return ctx.ui.notify(message, "error"), { ok: !1, message };
|
|
159
|
+
}
|
|
160
|
+
try {
|
|
161
|
+
if (ctx.ui.setStatus("mcp-auth", `Authenticating ${serverName}...`), await authenticate(serverName, definition.url, definition, {
|
|
162
|
+
onAuthorizationUrl: (authorizationUrl) => {
|
|
163
|
+
ctx.ui.notify(`Open this URL to authenticate ${serverName}:
|
|
164
|
+
|
|
165
|
+
${authorizationUrl}
|
|
166
|
+
|
|
167
|
+
After approving, return to Pi; the local callback will complete automatically.`, "info");
|
|
168
|
+
}
|
|
169
|
+
}) === "authenticated") {
|
|
170
|
+
let message2 = `OAuth authentication successful for "${serverName}"! Run /mcp reconnect ${serverName} to connect with the new token.`;
|
|
171
|
+
return ctx.ui.notify(`OAuth authentication successful for "${serverName}"!
|
|
172
|
+
Run /mcp reconnect ${serverName} to connect with the new token.`, "info"), { ok: !0, message: message2 };
|
|
173
|
+
}
|
|
174
|
+
let message = `OAuth authentication failed for "${serverName}".`;
|
|
175
|
+
return ctx.ui.notify(message, "error"), { ok: !1, message };
|
|
176
|
+
} catch (error) {
|
|
177
|
+
let message = error instanceof Error ? error.message : String(error);
|
|
178
|
+
return ctx.ui.notify(`Failed to authenticate "${serverName}": ${message}`, "error"), { ok: !1, message };
|
|
179
|
+
} finally {
|
|
180
|
+
ctx.ui.setStatus("mcp-auth", void 0);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
async function logoutServer(serverName, state, ctx) {
|
|
184
|
+
if (!state.config.mcpServers[serverName]) {
|
|
185
|
+
let message2 = `Server "${serverName}" not found in config`;
|
|
186
|
+
return ctx.hasUI && ctx.ui.notify(message2, "error"), { ok: !1, message: message2 };
|
|
187
|
+
}
|
|
188
|
+
await removeAuth(serverName), await state.manager.close(serverName), updateStatusBar(state);
|
|
189
|
+
let message = `OAuth credentials cleared for "${serverName}". Run /mcp-auth ${serverName} to authenticate again.`;
|
|
190
|
+
return ctx.hasUI && ctx.ui.notify(message, "info"), { ok: !0, message };
|
|
191
|
+
}
|
|
192
|
+
function buildSharedConfigNoticeLines(configOverridePath, cwd) {
|
|
193
|
+
let discovery = getMcpDiscoverySummary(configOverridePath, cwd), onboardingState = loadOnboardingState();
|
|
194
|
+
return !discovery.hasSharedServers || onboardingState.sharedConfigHintShown ? { lines: [], fingerprint: null } : {
|
|
195
|
+
lines: [
|
|
196
|
+
`Using standard MCP config from ${discovery.sources.filter((source) => source.kind === "shared" && source.serverCount > 0).map((source) => source.path).join(", ")}.`,
|
|
197
|
+
"Pi only writes compatibility imports and adapter-specific overrides into Pi-owned files when needed."
|
|
198
|
+
],
|
|
199
|
+
fingerprint: discovery.fingerprint
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
async function openMcpSetup(_state, pi, ctx, configOverridePath, mode = "setup") {
|
|
203
|
+
if (!ctx.hasUI)
|
|
204
|
+
return { configChanged: !1 };
|
|
205
|
+
let discovery = getMcpDiscoverySummary(configOverridePath, ctx.cwd), onboardingState = loadOnboardingState(), { createMcpSetupPanel } = await import("./mcp-setup-panel-FEK7663I.js"), configChanged = !1, callbacks = {
|
|
206
|
+
previewImports: (imports) => previewCompatibilityImports(imports, configOverridePath),
|
|
207
|
+
previewStarterProject: () => previewStarterProjectConfig(ctx.cwd),
|
|
208
|
+
previewRepoPrompt: () => {
|
|
209
|
+
let repoPrompt = getMcpDiscoverySummary(configOverridePath, ctx.cwd).repoPrompt;
|
|
210
|
+
return !repoPrompt.entry || !repoPrompt.targetPath || !repoPrompt.serverName ? null : previewSharedServerEntry(repoPrompt.targetPath, repoPrompt.serverName, repoPrompt.entry);
|
|
211
|
+
},
|
|
212
|
+
adoptImports: async (imports) => {
|
|
213
|
+
let result = ensureCompatibilityImports(imports, configOverridePath);
|
|
214
|
+
return result.added.length > 0 && (configChanged = !0), result;
|
|
215
|
+
},
|
|
216
|
+
scaffoldProjectConfig: async () => {
|
|
217
|
+
let path = writeStarterProjectConfig(ctx.cwd);
|
|
218
|
+
return configChanged = !0, { path };
|
|
219
|
+
},
|
|
220
|
+
addRepoPrompt: async () => {
|
|
221
|
+
let repoPrompt = getMcpDiscoverySummary(configOverridePath, ctx.cwd).repoPrompt;
|
|
222
|
+
if (!repoPrompt.entry || !repoPrompt.targetPath || !repoPrompt.serverName)
|
|
223
|
+
throw new Error("RepoPrompt is not available to add from this setup screen.");
|
|
224
|
+
let path = writeSharedServerEntry(repoPrompt.targetPath, repoPrompt.serverName, repoPrompt.entry);
|
|
225
|
+
return configChanged = !0, { path, serverName: repoPrompt.serverName };
|
|
226
|
+
},
|
|
227
|
+
openPath: async (targetPath) => {
|
|
228
|
+
await openPath(pi, targetPath);
|
|
229
|
+
},
|
|
230
|
+
markSetupCompleted: () => {
|
|
231
|
+
markSetupCompleted(discovery.fingerprint);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
return new Promise((resolve) => {
|
|
235
|
+
ctx.ui.custom((tui, _theme, keybindings, done) => createMcpSetupPanel(discovery, callbacks, { mode, onboardingState, keybindings }, tui, () => {
|
|
236
|
+
done(void 0), resolve({ configChanged });
|
|
237
|
+
}), { overlay: !0, overlayOptions: { anchor: "center", width: 92 } });
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function buildMcpPanelCallbacks(state, config, ctx) {
|
|
241
|
+
return {
|
|
242
|
+
reconnect: (serverName) => lazyConnect(state, serverName),
|
|
243
|
+
canAuthenticate: (serverName) => {
|
|
244
|
+
let definition = config.mcpServers[serverName];
|
|
245
|
+
return definition ? supportsOAuth(definition) : !1;
|
|
246
|
+
},
|
|
247
|
+
authenticate: (serverName) => authenticateServer(serverName, config, ctx),
|
|
248
|
+
getConnectionStatus: (serverName) => {
|
|
249
|
+
let definition = config.mcpServers[serverName], connection = state.manager.getConnection(serverName);
|
|
250
|
+
return connection?.status === "needs-auth" || definition?.auth === "oauth" && definition.url && definition.oauth !== !1 && definition.oauth?.grantType !== "client_credentials" && !getAuthForUrl(serverName, definition.url)?.tokens ? "needs-auth" : connection?.status === "connected" ? "connected" : getFailureAgeSeconds(state, serverName) !== null ? "failed" : "idle";
|
|
251
|
+
},
|
|
252
|
+
refreshCacheAfterReconnect: (serverName) => loadMetadataCache()?.servers?.[serverName] ?? null
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
async function openMcpPanel(state, pi, ctx, configOverridePath) {
|
|
256
|
+
if (Object.keys(state.config.mcpServers).length === 0)
|
|
257
|
+
return openMcpSetup(state, pi, ctx, configOverridePath, "empty");
|
|
258
|
+
let config = state.config, cache = loadMetadataCache(), configPath = pi.getFlag("mcp-config") ?? configOverridePath, provenanceMap = getServerProvenance(configPath, ctx.cwd), { lines: noticeLines, fingerprint } = buildSharedConfigNoticeLines(configPath, ctx.cwd), callbacks = buildMcpPanelCallbacks(state, config, ctx), { createMcpPanel } = await import("./mcp-panel-IIGMXQGP.js"), configChanged = !1;
|
|
259
|
+
return await new Promise((resolve) => {
|
|
260
|
+
ctx.ui.custom((tui, _theme, keybindings, done) => createMcpPanel(config, cache, provenanceMap, callbacks, tui, (result) => {
|
|
261
|
+
!result.cancelled && result.changes.size > 0 && (writeDirectToolsConfig(result.changes, provenanceMap, config), configChanged = !0, ctx.ui.notify("Direct tools updated. Pi will reload after this panel closes.", "info")), done(void 0), resolve();
|
|
262
|
+
}, { noticeLines, keybindings }), { overlay: !0, overlayOptions: { anchor: "center", width: 82 } });
|
|
263
|
+
}), noticeLines.length > 0 && fingerprint && markSharedConfigHintShown(fingerprint), { configChanged };
|
|
264
|
+
}
|
|
265
|
+
async function openMcpAuthPanel(state, pi, ctx, configOverridePath) {
|
|
266
|
+
if (!ctx.hasUI)
|
|
267
|
+
return { configChanged: !1 };
|
|
268
|
+
let config = state.config;
|
|
269
|
+
if (Object.entries(config.mcpServers).filter(([, definition]) => supportsOAuth(definition)).length === 0)
|
|
270
|
+
return ctx.ui.notify("No OAuth-capable MCP servers are configured.", "warning"), { configChanged: !1 };
|
|
271
|
+
let cache = loadMetadataCache(), configPath = pi.getFlag("mcp-config") ?? configOverridePath, provenanceMap = getServerProvenance(configPath, ctx.cwd), callbacks = buildMcpPanelCallbacks(state, config, ctx), { createMcpPanel } = await import("./mcp-panel-IIGMXQGP.js");
|
|
272
|
+
return await new Promise((resolve) => {
|
|
273
|
+
ctx.ui.custom((tui, _theme, keybindings, done) => createMcpPanel(config, cache, provenanceMap, callbacks, tui, () => {
|
|
274
|
+
done(void 0), resolve();
|
|
275
|
+
}, {
|
|
276
|
+
authOnly: !0,
|
|
277
|
+
keybindings,
|
|
278
|
+
noticeLines: ["Select an OAuth MCP server and press Enter or ctrl+a to authenticate."]
|
|
279
|
+
}), { overlay: !0, overlayOptions: { anchor: "center", width: 82 } });
|
|
280
|
+
}), { configChanged: !1 };
|
|
281
|
+
}
|
|
282
|
+
export {
|
|
283
|
+
authenticateServer,
|
|
284
|
+
logoutServer,
|
|
285
|
+
openMcpAuthPanel,
|
|
286
|
+
openMcpPanel,
|
|
287
|
+
openMcpSetup,
|
|
288
|
+
reconnectServers,
|
|
289
|
+
showStatus,
|
|
290
|
+
showTools
|
|
291
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
APP_NAME,
|
|
4
|
+
APP_TITLE,
|
|
5
|
+
CONFIG_DIR_NAME,
|
|
6
|
+
DEV_NPM_CLI_PACKAGE,
|
|
7
|
+
ENV_AGENT_DIR,
|
|
8
|
+
ENV_SESSION_DIR,
|
|
9
|
+
NPM_CLI_PACKAGE,
|
|
10
|
+
PACKAGE_NAME,
|
|
11
|
+
STABLE_NPM_CLI_PACKAGE,
|
|
12
|
+
VERSION,
|
|
13
|
+
appendDebugLog,
|
|
14
|
+
expandTildePath,
|
|
15
|
+
getAgentDir,
|
|
16
|
+
getAuthPath,
|
|
17
|
+
getBinDir,
|
|
18
|
+
getBundledInteractiveAssetPath,
|
|
19
|
+
getCustomThemesDir,
|
|
20
|
+
getDebugLogPath,
|
|
21
|
+
getDocsPath,
|
|
22
|
+
getExamplesPath,
|
|
23
|
+
getExportTemplateDir,
|
|
24
|
+
getInteractiveAssetsDir,
|
|
25
|
+
getModelsPath,
|
|
26
|
+
getPackageDir,
|
|
27
|
+
getPackageJsonPath,
|
|
28
|
+
getPromptsDir,
|
|
29
|
+
getReadmePath,
|
|
30
|
+
getSessionsDir,
|
|
31
|
+
getSettingsPath,
|
|
32
|
+
getShareViewerUrl,
|
|
33
|
+
getThemesDir,
|
|
34
|
+
getToolsDir,
|
|
35
|
+
isBunBinary,
|
|
36
|
+
isBunRuntime,
|
|
37
|
+
isNodeBundle
|
|
38
|
+
} from "./chunk-PCIGF2XK.js";
|
|
39
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
40
|
+
import "./chunk-BRJX2PRC.js";
|
|
41
|
+
export {
|
|
42
|
+
APP_NAME,
|
|
43
|
+
APP_TITLE,
|
|
44
|
+
CONFIG_DIR_NAME,
|
|
45
|
+
DEV_NPM_CLI_PACKAGE,
|
|
46
|
+
ENV_AGENT_DIR,
|
|
47
|
+
ENV_SESSION_DIR,
|
|
48
|
+
NPM_CLI_PACKAGE,
|
|
49
|
+
PACKAGE_NAME,
|
|
50
|
+
STABLE_NPM_CLI_PACKAGE,
|
|
51
|
+
VERSION,
|
|
52
|
+
appendDebugLog,
|
|
53
|
+
expandTildePath,
|
|
54
|
+
getAgentDir,
|
|
55
|
+
getAuthPath,
|
|
56
|
+
getBinDir,
|
|
57
|
+
getBundledInteractiveAssetPath,
|
|
58
|
+
getCustomThemesDir,
|
|
59
|
+
getDebugLogPath,
|
|
60
|
+
getDocsPath,
|
|
61
|
+
getExamplesPath,
|
|
62
|
+
getExportTemplateDir,
|
|
63
|
+
getInteractiveAssetsDir,
|
|
64
|
+
getModelsPath,
|
|
65
|
+
getPackageDir,
|
|
66
|
+
getPackageJsonPath,
|
|
67
|
+
getPromptsDir,
|
|
68
|
+
getReadmePath,
|
|
69
|
+
getSessionsDir,
|
|
70
|
+
getSettingsPath,
|
|
71
|
+
getShareViewerUrl,
|
|
72
|
+
getThemesDir,
|
|
73
|
+
getToolsDir,
|
|
74
|
+
isBunBinary,
|
|
75
|
+
isBunRuntime,
|
|
76
|
+
isNodeBundle
|
|
77
|
+
};
|