@ashx-j/lunr-dev 0.2.13-dev.8.1 → 0.2.19-dev.10.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 +60 -1
- package/README.md +7 -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 +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 +8 -21
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-computer-use.d.ts +3 -0
- package/dist/builtin-extensions/lunr-computer-use.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-computer-use.js +157 -0
- package/dist/builtin-extensions/lunr-computer-use.js.map +1 -0
- 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 +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/runs/shared/child-tools.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.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/catalog/publication.json +12 -12
- 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-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -1
- package/dist/core/agent-session-services.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/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/computer-use/adapter.d.ts +23 -0
- package/dist/core/computer-use/adapter.d.ts.map +1 -0
- package/dist/core/computer-use/adapter.js +116 -0
- package/dist/core/computer-use/adapter.js.map +1 -0
- package/dist/core/computer-use/lease.d.ts +18 -0
- package/dist/core/computer-use/lease.d.ts.map +1 -0
- package/dist/core/computer-use/lease.js +129 -0
- package/dist/core/computer-use/lease.js.map +1 -0
- package/dist/core/computer-use/macos-runtime.d.ts +14 -0
- package/dist/core/computer-use/macos-runtime.d.ts.map +1 -0
- package/dist/core/computer-use/macos-runtime.js +148 -0
- package/dist/core/computer-use/macos-runtime.js.map +1 -0
- package/dist/core/computer-use/policy.d.ts +19 -0
- package/dist/core/computer-use/policy.d.ts.map +1 -0
- package/dist/core/computer-use/policy.js +66 -0
- package/dist/core/computer-use/policy.js.map +1 -0
- package/dist/core/computer-use/release.generated.d.ts +31 -0
- package/dist/core/computer-use/release.generated.d.ts.map +1 -0
- package/dist/core/computer-use/release.generated.js +36 -0
- package/dist/core/computer-use/release.generated.js.map +1 -0
- package/dist/core/computer-use/runtime.d.ts +13 -0
- package/dist/core/computer-use/runtime.d.ts.map +1 -0
- package/dist/core/computer-use/runtime.js +158 -0
- package/dist/core/computer-use/runtime.js.map +1 -0
- package/dist/core/computer-use/schemas.d.ts +88 -0
- package/dist/core/computer-use/schemas.d.ts.map +1 -0
- package/dist/core/computer-use/schemas.js +80 -0
- package/dist/core/computer-use/schemas.js.map +1 -0
- package/dist/core/computer-use/windows-desktop.d.ts +3 -0
- package/dist/core/computer-use/windows-desktop.d.ts.map +1 -0
- package/dist/core/computer-use/windows-desktop.js +48 -0
- package/dist/core/computer-use/windows-desktop.js.map +1 -0
- package/dist/core/computer-use/workflow.d.ts +24 -0
- package/dist/core/computer-use/workflow.d.ts.map +1 -0
- package/dist/core/computer-use/workflow.js +330 -0
- package/dist/core/computer-use/workflow.js.map +1 -0
- 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/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/model-runtime.d.ts +0 -3
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +1 -10
- package/dist/core/model-runtime.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/permissions.d.ts +1 -3
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +33 -25
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +9 -0
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/rollback.d.ts.map +1 -1
- package/dist/core/rollback.js +13 -90
- package/dist/core/rollback.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/session-manager.d.ts +0 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +21 -79
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +6 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +19 -0
- package/dist/core/settings-manager.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/dev-cli.js +0 -0
- 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/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/gateway/cron.d.ts +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +23 -7
- package/dist/gateway/cron.js.map +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +57 -48
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +4 -2
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +23 -32
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/processes-selector.d.ts +2 -3
- package/dist/modes/interactive/components/processes-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/processes-selector.js +5 -10
- package/dist/modes/interactive/components/processes-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +4 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +20 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +12 -21
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +138 -152
- 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/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/adapter-AZMY335J.js +279 -0
- package/dist/node-runtime/agent-session-services-RSGP5GDN.js +39 -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-7STLFW3A.js +29 -0
- package/dist/node-runtime/chunk-2IDTZAG5.js +1415 -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-4SJWFTUP.js +24 -0
- package/dist/node-runtime/chunk-4ZWGEEAS.js +69 -0
- package/dist/node-runtime/chunk-53YJI7JU.js +137 -0
- package/dist/node-runtime/chunk-5NWQCSKR.js +19218 -0
- package/dist/node-runtime/chunk-5OLJGVCB.js +68 -0
- package/dist/node-runtime/chunk-5Q45AVQG.js +108 -0
- package/dist/node-runtime/chunk-5SQDLSZJ.js +949 -0
- package/dist/node-runtime/chunk-6SPPH4FY.js +1269 -0
- package/dist/node-runtime/chunk-6UB6NKA3.js +860 -0
- package/dist/node-runtime/chunk-7AFOFSDY.js +105 -0
- package/dist/node-runtime/chunk-7N3YHTYF.js +26 -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-BKAZ6BKX.js +2185 -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-CGBXPL3E.js +1171 -0
- package/dist/node-runtime/chunk-CH6OL6P2.js +295 -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-EH2LJQPM.js +64 -0
- package/dist/node-runtime/chunk-EHMBW7FA.js +772 -0
- package/dist/node-runtime/chunk-FLYMHKCS.js +966 -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-HRS4HMDX.js +610 -0
- package/dist/node-runtime/chunk-HYHJIRDW.js +19 -0
- package/dist/node-runtime/chunk-I6R76AG7.js +22 -0
- package/dist/node-runtime/chunk-ISQDQIZN.js +296 -0
- package/dist/node-runtime/chunk-J7QGQD45.js +24921 -0
- package/dist/node-runtime/chunk-JHYKXIMM.js +378 -0
- package/dist/node-runtime/chunk-JT6YCS5B.js +5648 -0
- package/dist/node-runtime/chunk-JZHEUQRL.js +180 -0
- package/dist/node-runtime/chunk-K72NVGUB.js +2834 -0
- package/dist/node-runtime/chunk-KKSIVROT.js +88 -0
- package/dist/node-runtime/chunk-LCACDWHJ.js +1743 -0
- package/dist/node-runtime/chunk-LTXUQJI4.js +173 -0
- package/dist/node-runtime/chunk-LWJXTA6Z.js +6814 -0
- package/dist/node-runtime/chunk-M3LZLQW2.js +98 -0
- package/dist/node-runtime/chunk-MGSB2C3M.js +46 -0
- package/dist/node-runtime/chunk-MGWCVY6Y.js +47 -0
- package/dist/node-runtime/chunk-MJQDX3BA.js +72 -0
- package/dist/node-runtime/chunk-MUMMMTW4.js +8392 -0
- package/dist/node-runtime/chunk-MX3GJNXJ.js +986 -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-OTT6JMPU.js +807 -0
- package/dist/node-runtime/chunk-PCIGF2XK.js +250 -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-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-T5GM5BFH.js +7558 -0
- package/dist/node-runtime/chunk-TAP7QTUT.js +1346 -0
- package/dist/node-runtime/chunk-U6C7VTR5.js +2033 -0
- package/dist/node-runtime/chunk-URD2SLIT.js +1019 -0
- package/dist/node-runtime/chunk-VRB2IYGG.js +53 -0
- package/dist/node-runtime/chunk-W3CVH5RX.js +62 -0
- package/dist/node-runtime/chunk-W7S2REEG.js +9478 -0
- package/dist/node-runtime/chunk-XBWPBZBN.js +125 -0
- package/dist/node-runtime/chunk-XTHQ7XR7.js +509 -0
- package/dist/node-runtime/chunk-ZCHMJ34K.js +130 -0
- package/dist/node-runtime/chunk-ZRDIMBEQ.js +651 -0
- package/dist/node-runtime/chunk-ZSEZY3II.js +247 -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-6UXQ6XZN.js +13 -0
- package/dist/node-runtime/commands-LGR5VT5X.js +293 -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-TDJS7TBD.js +191 -0
- package/dist/node-runtime/exa-LL64QZR2.js +329 -0
- package/dist/node-runtime/export-html-E4DT6ZJQ.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-IUCVZCWC.js +17 -0
- package/dist/node-runtime/file-sync-HCOP2QVF.js +117 -0
- package/dist/node-runtime/gateway-3OLC4GQN.js +2139 -0
- package/dist/node-runtime/gemini-api-QE7ANVDZ.js +29 -0
- package/dist/node-runtime/gemini-search-NCIDF7NE.js +330 -0
- package/dist/node-runtime/gemini-url-context-OKIN7AIP.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/image-resize-6ZPBFMWW.js +11 -0
- package/dist/node-runtime/index.js +863 -0
- package/dist/node-runtime/init-EKE277AG.js +30 -0
- package/dist/node-runtime/install-cli-TH7IJJQQ.js +308 -0
- package/dist/node-runtime/interactive-mode-S5M26CQ7.js +59 -0
- package/dist/node-runtime/interactive-view-N6F4KUIT.js +247 -0
- package/dist/node-runtime/lsp-manager-3ASUSO4T.js +1104 -0
- package/dist/node-runtime/lunr-computer-use-4X3KUNF4.js +206 -0
- package/dist/node-runtime/lunr-cron-KKBOGAEF.js +274 -0
- package/dist/node-runtime/main.js +57 -0
- package/dist/node-runtime/mcp-auth-flow-YL6RWPYG.js +33 -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-C4EJOO5Q.js +751 -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-DPTJGAAL.js +428 -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-VKCLYIBY.js +6050 -0
- package/dist/node-runtime/pi-web-access-BV6DSZOP.js +1867 -0
- package/dist/node-runtime/print-mode-VWIRFDAC.js +12 -0
- package/dist/node-runtime/proxy-modes-R64LU6WZ.js +688 -0
- package/dist/node-runtime/rpc-entry.js +65 -0
- package/dist/node-runtime/rpc-mode-SJNSOA4G.js +13 -0
- package/dist/node-runtime/runtime-3SB5ATHQ.js +21 -0
- package/dist/node-runtime/runtime-bridges-UJ5WJJLN.js +14 -0
- package/dist/node-runtime/session-manager-QEMZBMTM.js +33 -0
- package/dist/node-runtime/session-selector-URVJLOTK.js +14 -0
- package/dist/node-runtime/settings-manager-K6IPIQTI.js +23 -0
- package/dist/node-runtime/src-GPFAU3N6.js +2427 -0
- package/dist/node-runtime/subagent-executor-EFLTO32A.js +8501 -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-I6OVDRPL.js +75 -0
- package/dist/node-runtime/v4-5MNC3H7G.js +424 -0
- package/dist/node-runtime/video-extract-ETA5RA7U.js +304 -0
- package/dist/node-runtime/workflow-SA34S4VX.js +325 -0
- package/dist/node-runtime/workspace-index-6DBXSTJ6.js +163 -0
- package/dist/node-runtime/youtube-extract-SRVGNN26.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-shell.d.ts → interactive-view.d.ts} +18 -18
- package/dist/startup/interactive-view.d.ts.map +1 -0
- package/dist/startup/{interactive-shell.js → interactive-view.js} +119 -52
- 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/computer-use.md +277 -0
- package/docs/development.md +5 -33
- package/docs/features.md +2 -3
- package/docs/interactive-startup.md +105 -0
- package/docs/keybindings.md +2 -2
- package/docs/terminal-setup.md +1 -1
- package/docs/usage.md +1 -2
- 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/install-lock/package-lock.json +3827 -0
- package/install-lock/package.json +18 -0
- package/native/computer-use/LICENSE.md +21 -0
- package/npm-shrinkwrap.json +3808 -0
- package/package.json +30 -24
- 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
- package/dist/startup/interactive-shell.d.ts.map +0 -1
- package/dist/startup/interactive-shell.js.map +0 -1
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
createPanelKeys
|
|
4
|
+
} from "./chunk-HYHJIRDW.js";
|
|
5
|
+
import "./chunk-BRJX2PRC.js";
|
|
6
|
+
|
|
7
|
+
// packages/coding-agent/dist/builtin-extensions/pi-mcp-adapter/mcp-setup-panel.js
|
|
8
|
+
import { matchesKey, truncateToWidth, visibleWidth } from "@ashx-j/lunr-tui";
|
|
9
|
+
var DEFAULT_THEME = {
|
|
10
|
+
border: "2",
|
|
11
|
+
title: "36",
|
|
12
|
+
selected: "32",
|
|
13
|
+
hint: "2",
|
|
14
|
+
success: "32",
|
|
15
|
+
warning: "33",
|
|
16
|
+
muted: "2;3"
|
|
17
|
+
};
|
|
18
|
+
function fg(code, text) {
|
|
19
|
+
return code ? `\x1B[${code}m${text}\x1B[0m` : text;
|
|
20
|
+
}
|
|
21
|
+
function wrapText(text, width) {
|
|
22
|
+
if (width <= 8)
|
|
23
|
+
return [text];
|
|
24
|
+
let words = text.split(/\s+/).filter(Boolean), lines = [], current = "";
|
|
25
|
+
for (let word of words) {
|
|
26
|
+
let candidate = current ? `${current} ${word}` : word;
|
|
27
|
+
if (visibleWidth(candidate) <= width) {
|
|
28
|
+
current = candidate;
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
current && lines.push(current), current = word;
|
|
32
|
+
}
|
|
33
|
+
return current && lines.push(current), lines.length > 0 ? lines : [""];
|
|
34
|
+
}
|
|
35
|
+
var McpSetupPanel = class _McpSetupPanel {
|
|
36
|
+
discovery;
|
|
37
|
+
callbacks;
|
|
38
|
+
options;
|
|
39
|
+
done;
|
|
40
|
+
screen;
|
|
41
|
+
actionCursor = 0;
|
|
42
|
+
importCursor = 0;
|
|
43
|
+
pathCursor = 0;
|
|
44
|
+
selectedImports = /* @__PURE__ */ new Set();
|
|
45
|
+
busy = !1;
|
|
46
|
+
notice = null;
|
|
47
|
+
tui;
|
|
48
|
+
t = DEFAULT_THEME;
|
|
49
|
+
keys;
|
|
50
|
+
inactivityTimeout = null;
|
|
51
|
+
static INACTIVITY_MS = 6e4;
|
|
52
|
+
constructor(discovery, callbacks, options, tui, done) {
|
|
53
|
+
this.discovery = discovery, this.callbacks = callbacks, this.options = options, this.done = done, this.tui = tui, this.keys = createPanelKeys(options.keybindings), this.screen = options.mode;
|
|
54
|
+
for (let entry of discovery.imports)
|
|
55
|
+
this.selectedImports.add(entry.kind);
|
|
56
|
+
this.resetInactivityTimeout();
|
|
57
|
+
}
|
|
58
|
+
resetInactivityTimeout() {
|
|
59
|
+
this.inactivityTimeout && clearTimeout(this.inactivityTimeout), this.inactivityTimeout = setTimeout(() => {
|
|
60
|
+
this.cleanup(), this.done();
|
|
61
|
+
}, _McpSetupPanel.INACTIVITY_MS);
|
|
62
|
+
}
|
|
63
|
+
cleanup() {
|
|
64
|
+
this.inactivityTimeout && (clearTimeout(this.inactivityTimeout), this.inactivityTimeout = null);
|
|
65
|
+
}
|
|
66
|
+
getActions() {
|
|
67
|
+
let actions = [];
|
|
68
|
+
return this.screen === "empty" && actions.push({ id: "run-setup", label: "Run setup", description: "Inspect detected configs, adopt imports, and scaffold a minimal `.mcp.json`." }), this.discovery.imports.length > 0 && actions.push({ id: "adopt-imports", label: "Adopt detected compatibility imports", description: `Choose which host-specific MCP configs Pi should import into its own override file. ${this.discovery.imports.length} source${this.discovery.imports.length === 1 ? "" : "s"} found.` }), actions.push({ id: "view-example", label: "View example `.mcp.json`", description: "Preview a working shared MCP config you can paste or adapt." }), this.discovery.sources.some((source) => source.id === "shared-project" && source.exists) || actions.push({ id: "scaffold-project", label: "Scaffold project `.mcp.json`", description: "Write a minimal project config using the standard shared MCP file path, then reload Pi." }), actions.push({ id: "show-precedence", label: "Explain config precedence", description: "Show the read order and where Pi writes compatibility settings." }), this.getDetectedPaths().length > 0 && actions.push({ id: "open-paths", label: "Open detected config paths", description: "Browse the actual config files that Pi discovered on this machine." }), !this.discovery.repoPrompt.configured && this.discovery.repoPrompt.executablePath && this.discovery.repoPrompt.targetPath && this.discovery.repoPrompt.entry && this.discovery.repoPrompt.serverName && actions.push({ id: "add-repoprompt", label: "Add RepoPrompt to shared MCP config", description: "Write a standard MCP entry for RepoPrompt to the recommended shared target, then reload MCP in-session." }), actions.push({ id: "close", label: "Close", description: "Exit the onboarding flow." }), actions;
|
|
69
|
+
}
|
|
70
|
+
getDetectedPaths() {
|
|
71
|
+
let paths = [
|
|
72
|
+
...this.discovery.sources.filter((source) => source.exists).map((source) => source.path),
|
|
73
|
+
...this.discovery.imports.map((entry) => entry.path)
|
|
74
|
+
];
|
|
75
|
+
return [...new Set(paths)];
|
|
76
|
+
}
|
|
77
|
+
getSelectedAction() {
|
|
78
|
+
return this.getActions()[this.actionCursor] ?? null;
|
|
79
|
+
}
|
|
80
|
+
handleInput(data) {
|
|
81
|
+
if (this.resetInactivityTimeout(), this.busy || (this.notice = null), matchesKey(data, "ctrl+c")) {
|
|
82
|
+
this.cleanup(), this.done();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (matchesKey(data, "escape")) {
|
|
86
|
+
if (this.screen === "imports" || this.screen === "paths") {
|
|
87
|
+
this.screen = this.discovery.hasAnyConfig ? "setup" : "empty", this.tui.requestRender();
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.cleanup(), this.done();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (this.busy)
|
|
94
|
+
return;
|
|
95
|
+
if (this.screen === "imports") {
|
|
96
|
+
this.handleImportsInput(data);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (this.screen === "paths") {
|
|
100
|
+
this.handlePathsInput(data);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
let actions = this.getActions();
|
|
104
|
+
if (this.keys.selectUp(data)) {
|
|
105
|
+
this.actionCursor = Math.max(0, this.actionCursor - 1), this.tui.requestRender();
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (this.keys.selectDown(data)) {
|
|
109
|
+
this.actionCursor = Math.min(actions.length - 1, this.actionCursor + 1), this.tui.requestRender();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (this.keys.selectConfirm(data)) {
|
|
113
|
+
let selected = this.getSelectedAction();
|
|
114
|
+
selected && this.runAction(selected.id);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
handleImportsInput(data) {
|
|
118
|
+
let imports = this.discovery.imports;
|
|
119
|
+
if (this.keys.selectUp(data)) {
|
|
120
|
+
this.importCursor = Math.max(0, this.importCursor - 1), this.tui.requestRender();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (this.keys.selectDown(data)) {
|
|
124
|
+
this.importCursor = Math.min(imports.length - 1, this.importCursor + 1), this.tui.requestRender();
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (matchesKey(data, "space")) {
|
|
128
|
+
let current = imports[this.importCursor];
|
|
129
|
+
if (!current)
|
|
130
|
+
return;
|
|
131
|
+
this.selectedImports.has(current.kind) ? this.selectedImports.delete(current.kind) : this.selectedImports.add(current.kind), this.tui.requestRender();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.keys.selectConfirm(data) && this.applySelectedImports();
|
|
135
|
+
}
|
|
136
|
+
handlePathsInput(data) {
|
|
137
|
+
let paths = this.getDetectedPaths();
|
|
138
|
+
if (this.keys.selectUp(data)) {
|
|
139
|
+
this.pathCursor = Math.max(0, this.pathCursor - 1), this.tui.requestRender();
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (this.keys.selectDown(data)) {
|
|
143
|
+
this.pathCursor = Math.min(paths.length - 1, this.pathCursor + 1), this.tui.requestRender();
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (this.keys.selectConfirm(data)) {
|
|
147
|
+
let selected = paths[this.pathCursor];
|
|
148
|
+
if (!selected)
|
|
149
|
+
return;
|
|
150
|
+
this.runBusy(async () => {
|
|
151
|
+
await this.callbacks.openPath(selected), this.notice = { text: `Opened ${selected}`, tone: "success" };
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
async runAction(action) {
|
|
156
|
+
if (action === "run-setup") {
|
|
157
|
+
this.screen = "setup", this.actionCursor = 0, this.tui.requestRender();
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
if (action === "adopt-imports") {
|
|
161
|
+
this.screen = "imports", this.importCursor = 0, this.tui.requestRender();
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (action === "open-paths") {
|
|
165
|
+
this.screen = "paths", this.pathCursor = 0, this.tui.requestRender();
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (action === "scaffold-project") {
|
|
169
|
+
await this.runBusy(async () => {
|
|
170
|
+
let result = await this.callbacks.scaffoldProjectConfig();
|
|
171
|
+
this.callbacks.markSetupCompleted(), this.notice = { text: `Wrote starter config to ${result.path}. Pi will reload after this panel closes.`, tone: "success" };
|
|
172
|
+
});
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (action === "add-repoprompt") {
|
|
176
|
+
await this.runBusy(async () => {
|
|
177
|
+
let result = await this.callbacks.addRepoPrompt();
|
|
178
|
+
this.callbacks.markSetupCompleted(), this.notice = { text: `Added ${result.serverName} to ${result.path}. Pi will reload after this panel closes.`, tone: "success" };
|
|
179
|
+
});
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
if (action === "close") {
|
|
183
|
+
this.cleanup(), this.done();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
this.notice = { text: "Review the details below. Press Enter on an action with a side effect to apply it.", tone: "muted" }, this.tui.requestRender();
|
|
187
|
+
}
|
|
188
|
+
async applySelectedImports() {
|
|
189
|
+
let selected = this.discovery.imports.filter((entry) => this.selectedImports.has(entry.kind)).map((entry) => entry.kind);
|
|
190
|
+
if (selected.length === 0) {
|
|
191
|
+
this.notice = { text: "Select at least one compatibility import first.", tone: "warning" }, this.tui.requestRender();
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
await this.runBusy(async () => {
|
|
195
|
+
let result = await this.callbacks.adoptImports(selected);
|
|
196
|
+
this.callbacks.markSetupCompleted(), this.notice = result.added.length > 0 ? { text: `Added ${result.added.join(", ")} to ${result.path}. Pi will reload after this panel closes.`, tone: "success" } : { text: `No changes needed in ${result.path}.`, tone: "muted" }, this.screen = this.discovery.hasAnyConfig ? "setup" : "empty", this.actionCursor = 0;
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
async runBusy(fn) {
|
|
200
|
+
this.busy = !0, this.notice = { text: "Working...", tone: "muted" }, this.tui.requestRender();
|
|
201
|
+
try {
|
|
202
|
+
await fn();
|
|
203
|
+
} catch (error) {
|
|
204
|
+
this.notice = {
|
|
205
|
+
text: error instanceof Error ? error.message : String(error),
|
|
206
|
+
tone: "warning"
|
|
207
|
+
};
|
|
208
|
+
} finally {
|
|
209
|
+
this.busy = !1, this.tui.requestRender();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
render(width) {
|
|
213
|
+
let innerW = Math.max(40, width - 2), lines = [], border = fg(this.t.border, "\u2500".repeat(innerW));
|
|
214
|
+
if (lines.push(`\u250C${border}\u2510`), lines.push(this.padLine(fg(this.t.title, "MCP setup"), innerW)), lines.push(this.padLine(this.discoverySummaryLine(), innerW)), lines.push(this.padLine(fg(this.t.muted, this.secondarySummaryLine()), innerW)), lines.push(this.padLine("", innerW)), this.notice) {
|
|
215
|
+
let tone = this.notice.tone === "success" ? this.t.success : this.notice.tone === "warning" ? this.t.warning : this.t.hint;
|
|
216
|
+
for (let line of wrapText(this.notice.text, innerW - 6))
|
|
217
|
+
lines.push(this.padLine(fg(tone, line), innerW));
|
|
218
|
+
lines.push(this.padLine("", innerW));
|
|
219
|
+
}
|
|
220
|
+
return lines.push(`\u251C${border}\u2524`), this.screen === "imports" ? lines.push(...this.renderImports(innerW)) : this.screen === "paths" ? lines.push(...this.renderPaths(innerW)) : lines.push(...this.renderActions(innerW)), lines.push(`\u2514${border}\u2518`), lines;
|
|
221
|
+
}
|
|
222
|
+
renderActions(innerW) {
|
|
223
|
+
let lines = [], actions = this.getActions();
|
|
224
|
+
for (let index = 0; index < actions.length; index++) {
|
|
225
|
+
let action = actions[index], cursor = index === this.actionCursor ? fg(this.t.selected, "\u203A") : " ";
|
|
226
|
+
lines.push(this.padLine(`${cursor} ${truncateToWidth(action.label, innerW - 4)}`, innerW));
|
|
227
|
+
}
|
|
228
|
+
lines.push(this.padLine("", innerW));
|
|
229
|
+
let preview = this.getActionPreview(this.getSelectedAction()?.id ?? "view-example");
|
|
230
|
+
for (let line of preview)
|
|
231
|
+
lines.push(this.padLine(line, innerW));
|
|
232
|
+
return lines.push(this.padLine("", innerW)), lines.push(this.padLine(fg(this.t.muted, "Enter selects, Esc goes back, Ctrl+C closes."), innerW)), lines;
|
|
233
|
+
}
|
|
234
|
+
renderImports(innerW) {
|
|
235
|
+
let lines = [];
|
|
236
|
+
lines.push(this.padLine("Select compatibility imports. Space toggles, Enter saves, Esc goes back.", innerW)), lines.push(this.padLine("", innerW));
|
|
237
|
+
for (let index = 0; index < this.discovery.imports.length; index++) {
|
|
238
|
+
let entry = this.discovery.imports[index], selected2 = this.selectedImports.has(entry.kind) ? "[x]" : "[ ]", cursor = index === this.importCursor ? fg(this.t.selected, "\u203A") : " ";
|
|
239
|
+
lines.push(this.padLine(`${cursor} ${selected2} ${entry.kind} ${entry.path}`, innerW));
|
|
240
|
+
}
|
|
241
|
+
lines.push(this.padLine("", innerW));
|
|
242
|
+
let selected = this.discovery.imports.filter((entry) => this.selectedImports.has(entry.kind)).map((entry) => entry.kind), preview = this.callbacks.previewImports(selected);
|
|
243
|
+
for (let line of this.formatWritePreview("Compatibility import write preview", preview))
|
|
244
|
+
lines.push(this.padLine(line, innerW));
|
|
245
|
+
return lines;
|
|
246
|
+
}
|
|
247
|
+
renderPaths(innerW) {
|
|
248
|
+
let lines = [];
|
|
249
|
+
lines.push(this.padLine("Select a detected config path to open. Enter opens it, Esc goes back.", innerW)), lines.push(this.padLine("", innerW));
|
|
250
|
+
let paths = this.getDetectedPaths();
|
|
251
|
+
for (let index = 0; index < paths.length; index++) {
|
|
252
|
+
let cursor = index === this.pathCursor ? fg(this.t.selected, "\u203A") : " ";
|
|
253
|
+
lines.push(this.padLine(`${cursor} ${paths[index]}`, innerW));
|
|
254
|
+
}
|
|
255
|
+
return lines;
|
|
256
|
+
}
|
|
257
|
+
discoverySummaryLine() {
|
|
258
|
+
if (!this.discovery.hasAnyConfig)
|
|
259
|
+
return fg(this.t.warning, this.options.onboardingState.setupCompleted ? "No MCP servers are active right now." : "No MCP config is active yet.");
|
|
260
|
+
if (this.discovery.totalServerCount === 0 && (this.discovery.imports.length > 0 || this.discovery.repoPrompt.executablePath))
|
|
261
|
+
return fg(this.t.warning, "Pi found MCP-related setup options, but none are active in Pi yet.");
|
|
262
|
+
let shared = this.discovery.sources.filter((source) => source.kind === "shared" && source.serverCount > 0).length, piOwned = this.discovery.sources.filter((source) => source.kind === "pi" && source.serverCount > 0).length;
|
|
263
|
+
return fg(this.t.hint, `Detected ${this.discovery.totalServerCount} configured servers across ${shared} shared and ${piOwned} Pi-owned source${shared + piOwned === 1 ? "" : "s"}.`);
|
|
264
|
+
}
|
|
265
|
+
secondarySummaryLine() {
|
|
266
|
+
return this.discovery.hasAnyConfig ? this.discovery.totalServerCount === 0 && this.discovery.imports.length > 0 ? `Detected ${this.discovery.imports.length} compatibility import source${this.discovery.imports.length === 1 ? "" : "s"}. Adopt them into Pi or inspect the underlying files.` : "Shared MCP files are preferred. Pi-owned files are only for compatibility imports and adapter-specific overrides." : "Create a shared `.mcp.json`, adopt host imports, or quick-add RepoPrompt from this screen.";
|
|
267
|
+
}
|
|
268
|
+
getActionPreview(action) {
|
|
269
|
+
switch (action) {
|
|
270
|
+
case "run-setup":
|
|
271
|
+
return this.formatPreview([
|
|
272
|
+
"Run setup to adopt host-specific imports, inspect detected paths, and scaffold a minimal `.mcp.json` if needed."
|
|
273
|
+
]);
|
|
274
|
+
case "adopt-imports":
|
|
275
|
+
return this.formatWritePreview("Compatibility import write preview", this.callbacks.previewImports(this.discovery.imports.filter((entry) => this.selectedImports.has(entry.kind)).map((entry) => entry.kind)), [
|
|
276
|
+
`Detected imports: ${this.discovery.imports.map((entry) => `${entry.kind} (${entry.serverCount} servers)`).join(", ")}`,
|
|
277
|
+
"Selected imports are written into the Pi agent dir config as Pi-owned compatibility state."
|
|
278
|
+
]);
|
|
279
|
+
case "view-example":
|
|
280
|
+
return this.formatPreview([
|
|
281
|
+
"Example shared `.mcp.json`:",
|
|
282
|
+
"{",
|
|
283
|
+
' "mcpServers": {',
|
|
284
|
+
' "chrome-devtools": {',
|
|
285
|
+
' "command": "npx",',
|
|
286
|
+
' "args": ["-y", "chrome-devtools-mcp@latest"]',
|
|
287
|
+
" }",
|
|
288
|
+
" }",
|
|
289
|
+
"}",
|
|
290
|
+
"",
|
|
291
|
+
"Use Scaffold project `.mcp.json` when you want a safe empty shell instead of a live example server."
|
|
292
|
+
]);
|
|
293
|
+
case "show-precedence":
|
|
294
|
+
return this.formatPreview([
|
|
295
|
+
"Read order:",
|
|
296
|
+
"1. ~/.config/mcp/mcp.json",
|
|
297
|
+
"2. <Pi agent dir>/mcp.json",
|
|
298
|
+
"3. .mcp.json",
|
|
299
|
+
"4. .lunr/mcp.json (legacy read fallback: .pi/mcp.json)",
|
|
300
|
+
// lunr: was ".pi/mcp.json"
|
|
301
|
+
"Pi writes compatibility imports and adapter-only overrides to Pi-owned files."
|
|
302
|
+
]);
|
|
303
|
+
case "open-paths":
|
|
304
|
+
return this.formatPreview(this.getDetectedPaths().length > 0 ? ["Detected paths:", ...this.getDetectedPaths()] : ["No config paths were detected."]);
|
|
305
|
+
case "add-repoprompt": {
|
|
306
|
+
let repoPrompt = this.discovery.repoPrompt, preview = this.callbacks.previewRepoPrompt();
|
|
307
|
+
return preview ? this.formatWritePreview("RepoPrompt write preview", preview, [
|
|
308
|
+
`Executable: ${repoPrompt.executablePath ?? "not found"}`,
|
|
309
|
+
`Target: ${repoPrompt.targetPath ?? "n/a"}`,
|
|
310
|
+
`Server name: ${repoPrompt.serverName ?? "repoprompt"}`
|
|
311
|
+
]) : this.formatPreview(["RepoPrompt is not available to add from this setup screen."]);
|
|
312
|
+
}
|
|
313
|
+
case "scaffold-project":
|
|
314
|
+
return this.formatWritePreview("Starter project `.mcp.json` write preview", this.callbacks.previewStarterProject(), [
|
|
315
|
+
"This writes a minimal `.mcp.json` in the current project using the shared MCP layout.",
|
|
316
|
+
"It intentionally avoids adding a fake placeholder server that would fail on first reload."
|
|
317
|
+
]);
|
|
318
|
+
default:
|
|
319
|
+
return this.formatPreview(["Close the setup flow."]);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
formatPreview(lines) {
|
|
323
|
+
let preview = [];
|
|
324
|
+
for (let line of lines)
|
|
325
|
+
preview.push(...wrapText(line, 74));
|
|
326
|
+
return preview;
|
|
327
|
+
}
|
|
328
|
+
formatWritePreview(title, preview, intro = []) {
|
|
329
|
+
let lines = [];
|
|
330
|
+
for (let line of intro)
|
|
331
|
+
lines.push(...wrapText(line, 74));
|
|
332
|
+
intro.length > 0 && lines.push(""), lines.push(...wrapText(`${title}: ${preview.path}`, 74)), lines.push(...wrapText(preview.existed ? "Existing file detected. Showing exact before/after diff." : "New file will be created. Showing exact content diff.", 74)), lines.push("");
|
|
333
|
+
let diffLines = preview.diffText.split(`
|
|
334
|
+
`), maxLines = 18, shown = diffLines.slice(0, maxLines);
|
|
335
|
+
for (let line of shown)
|
|
336
|
+
lines.push(...wrapText(line, 74));
|
|
337
|
+
return diffLines.length > maxLines && lines.push(...wrapText(`\u2026 ${diffLines.length - maxLines} more diff line${diffLines.length - maxLines === 1 ? "" : "s"}`, 74)), lines;
|
|
338
|
+
}
|
|
339
|
+
padLine(text, innerW) {
|
|
340
|
+
let contentW = Math.max(0, innerW - 4), fitted = truncateToWidth(text, contentW, "\u2026", !0), plainWidth = visibleWidth(fitted), padding = Math.max(0, contentW - plainWidth);
|
|
341
|
+
return `\u2502${" ".repeat(2)}${fitted}${" ".repeat(padding)}${" ".repeat(2)}\u2502`;
|
|
342
|
+
}
|
|
343
|
+
invalidate() {
|
|
344
|
+
}
|
|
345
|
+
dispose() {
|
|
346
|
+
this.cleanup();
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
function createMcpSetupPanel(discovery, callbacks, options, tui, done) {
|
|
350
|
+
return new McpSetupPanel(discovery, callbacks, options, tui, done);
|
|
351
|
+
}
|
|
352
|
+
export {
|
|
353
|
+
McpSetupPanel,
|
|
354
|
+
createMcpSetupPanel
|
|
355
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
MEMORY_CAP_BRIDGE_SYMBOL,
|
|
4
|
+
MEMORY_CHAR_CAP_DEFAULT,
|
|
5
|
+
MEMORY_CHAR_CAP_MAX,
|
|
6
|
+
MEMORY_CHAR_CAP_MIN,
|
|
7
|
+
MEMORY_TOOL_NAMES,
|
|
8
|
+
getMemoryCapBridge,
|
|
9
|
+
registerMemoryCapBridge
|
|
10
|
+
} from "./chunk-AY6CAJSL.js";
|
|
11
|
+
import "./chunk-BRJX2PRC.js";
|
|
12
|
+
export {
|
|
13
|
+
MEMORY_CAP_BRIDGE_SYMBOL,
|
|
14
|
+
MEMORY_CHAR_CAP_DEFAULT,
|
|
15
|
+
MEMORY_CHAR_CAP_MAX,
|
|
16
|
+
MEMORY_CHAR_CAP_MIN,
|
|
17
|
+
MEMORY_TOOL_NAMES,
|
|
18
|
+
getMemoryCapBridge,
|
|
19
|
+
registerMemoryCapBridge
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
MODEL_TIERS_BRIDGE_SYMBOL,
|
|
4
|
+
TIER_NAMES,
|
|
5
|
+
getModelTiersBridge,
|
|
6
|
+
getTierModel,
|
|
7
|
+
getTierThinking,
|
|
8
|
+
isTierModeEnabled,
|
|
9
|
+
registerModelTierBridge
|
|
10
|
+
} from "./chunk-W3CVH5RX.js";
|
|
11
|
+
import "./chunk-BRJX2PRC.js";
|
|
12
|
+
export {
|
|
13
|
+
MODEL_TIERS_BRIDGE_SYMBOL,
|
|
14
|
+
TIER_NAMES,
|
|
15
|
+
getModelTiersBridge,
|
|
16
|
+
getTierModel,
|
|
17
|
+
getTierThinking,
|
|
18
|
+
isTierModeEnabled,
|
|
19
|
+
registerModelTierBridge
|
|
20
|
+
};
|