@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,96 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/coding-agent/dist/core/messages.js
|
|
4
|
+
var COMPACTION_SUMMARY_PREFIX = `The conversation history before this point was compacted into the following summary:
|
|
5
|
+
|
|
6
|
+
<summary>
|
|
7
|
+
`, COMPACTION_SUMMARY_SUFFIX = `
|
|
8
|
+
</summary>`, BRANCH_SUMMARY_PREFIX = `The following is a summary of a branch that this conversation came back from:
|
|
9
|
+
|
|
10
|
+
<summary>
|
|
11
|
+
`, BRANCH_SUMMARY_SUFFIX = "</summary>";
|
|
12
|
+
function bashExecutionToText(msg) {
|
|
13
|
+
let text = `Ran \`${msg.command}\`
|
|
14
|
+
`;
|
|
15
|
+
return msg.output ? text += `\`\`\`
|
|
16
|
+
${msg.output}
|
|
17
|
+
\`\`\`` : text += "(no output)", msg.cancelled ? text += `
|
|
18
|
+
|
|
19
|
+
(command cancelled)` : msg.exitCode !== null && msg.exitCode !== void 0 && msg.exitCode !== 0 && (text += `
|
|
20
|
+
|
|
21
|
+
Command exited with code ${msg.exitCode}`), msg.truncated && msg.fullOutputPath && (text += `
|
|
22
|
+
|
|
23
|
+
[Output truncated. Full output: ${msg.fullOutputPath}]`), text;
|
|
24
|
+
}
|
|
25
|
+
function createBranchSummaryMessage(summary, fromId, timestamp) {
|
|
26
|
+
return {
|
|
27
|
+
role: "branchSummary",
|
|
28
|
+
summary,
|
|
29
|
+
fromId,
|
|
30
|
+
timestamp: new Date(timestamp).getTime()
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function createCompactionSummaryMessage(summary, tokensBefore, timestamp) {
|
|
34
|
+
return {
|
|
35
|
+
role: "compactionSummary",
|
|
36
|
+
summary,
|
|
37
|
+
tokensBefore,
|
|
38
|
+
timestamp: new Date(timestamp).getTime()
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function createCustomMessage(customType, content, display, details, timestamp) {
|
|
42
|
+
return {
|
|
43
|
+
role: "custom",
|
|
44
|
+
customType,
|
|
45
|
+
content,
|
|
46
|
+
display,
|
|
47
|
+
details,
|
|
48
|
+
timestamp: new Date(timestamp).getTime()
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function convertToLlm(messages) {
|
|
52
|
+
return messages.map((m) => {
|
|
53
|
+
switch (m.role) {
|
|
54
|
+
case "bashExecution":
|
|
55
|
+
return m.excludeFromContext ? void 0 : {
|
|
56
|
+
role: "user",
|
|
57
|
+
content: [{ type: "text", text: bashExecutionToText(m) }],
|
|
58
|
+
timestamp: m.timestamp
|
|
59
|
+
};
|
|
60
|
+
case "custom":
|
|
61
|
+
return {
|
|
62
|
+
role: "user",
|
|
63
|
+
content: typeof m.content == "string" ? [{ type: "text", text: m.content }] : m.content,
|
|
64
|
+
timestamp: m.timestamp
|
|
65
|
+
};
|
|
66
|
+
case "branchSummary":
|
|
67
|
+
return {
|
|
68
|
+
role: "user",
|
|
69
|
+
content: [{ type: "text", text: BRANCH_SUMMARY_PREFIX + m.summary + BRANCH_SUMMARY_SUFFIX }],
|
|
70
|
+
timestamp: m.timestamp
|
|
71
|
+
};
|
|
72
|
+
case "compactionSummary":
|
|
73
|
+
return {
|
|
74
|
+
role: "user",
|
|
75
|
+
content: [
|
|
76
|
+
{ type: "text", text: COMPACTION_SUMMARY_PREFIX + m.summary + COMPACTION_SUMMARY_SUFFIX }
|
|
77
|
+
],
|
|
78
|
+
timestamp: m.timestamp
|
|
79
|
+
};
|
|
80
|
+
case "user":
|
|
81
|
+
case "assistant":
|
|
82
|
+
case "toolResult":
|
|
83
|
+
return m;
|
|
84
|
+
default:
|
|
85
|
+
let _exhaustiveCheck = m;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
}).filter((m) => m !== void 0);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
createBranchSummaryMessage,
|
|
93
|
+
createCompactionSummaryMessage,
|
|
94
|
+
createCustomMessage,
|
|
95
|
+
convertToLlm
|
|
96
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
sanitizeBinaryOutput
|
|
4
|
+
} from "./chunk-ZCHMJ34K.js";
|
|
5
|
+
import {
|
|
6
|
+
resolvePath
|
|
7
|
+
} from "./chunk-PCIGF2XK.js";
|
|
8
|
+
|
|
9
|
+
// packages/coding-agent/dist/core/tools/render-utils.js
|
|
10
|
+
import * as os from "node:os";
|
|
11
|
+
import { basename } from "node:path";
|
|
12
|
+
import { pathToFileURL } from "node:url";
|
|
13
|
+
import { getCapabilities, getImageDimensions, hyperlink, imageFallback } from "@ashx-j/lunr-tui";
|
|
14
|
+
|
|
15
|
+
// packages/coding-agent/dist/utils/ansi.js
|
|
16
|
+
function ansiRegex({ onlyFirst = !1 } = {}) {
|
|
17
|
+
let pattern = "(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
18
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
19
|
+
}
|
|
20
|
+
var regex = ansiRegex();
|
|
21
|
+
function stripAnsi(value) {
|
|
22
|
+
if (typeof value != "string")
|
|
23
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof value}\``);
|
|
24
|
+
return !value.includes("\x1B") && !value.includes("\x9B") ? value : value.replace(regex, "");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// packages/coding-agent/dist/core/tools/render-utils.js
|
|
28
|
+
function shortenPath(path) {
|
|
29
|
+
if (typeof path != "string")
|
|
30
|
+
return "";
|
|
31
|
+
let home = os.homedir();
|
|
32
|
+
return path.startsWith(home) ? `~${path.slice(home.length)}` : path;
|
|
33
|
+
}
|
|
34
|
+
function linkPath(styledText, rawPath, cwd) {
|
|
35
|
+
if (!getCapabilities().hyperlinks)
|
|
36
|
+
return styledText;
|
|
37
|
+
let absolutePath = resolvePath(rawPath, cwd);
|
|
38
|
+
return hyperlink(styledText, pathToFileURL(absolutePath).href);
|
|
39
|
+
}
|
|
40
|
+
function str(value) {
|
|
41
|
+
return typeof value == "string" ? value : value == null ? "" : null;
|
|
42
|
+
}
|
|
43
|
+
function replaceTabs(text) {
|
|
44
|
+
return text.replace(/\t/g, " ");
|
|
45
|
+
}
|
|
46
|
+
function normalizeDisplayText(text) {
|
|
47
|
+
return text.replace(/\r/g, "");
|
|
48
|
+
}
|
|
49
|
+
function getTextOutput(result, showImages) {
|
|
50
|
+
if (!result)
|
|
51
|
+
return "";
|
|
52
|
+
let textBlocks = result.content.filter((c) => c.type === "text"), imageBlocks = result.content.filter((c) => c.type === "image"), output = textBlocks.map((c) => sanitizeBinaryOutput(stripAnsi(c.text || "")).replace(/\r/g, "")).join(`
|
|
53
|
+
`), caps = getCapabilities();
|
|
54
|
+
if (imageBlocks.length > 0 && (!caps.images || !showImages)) {
|
|
55
|
+
let imageIndicators = imageBlocks.map((img) => {
|
|
56
|
+
let mimeType = img.mimeType ?? "image/unknown", dims = img.data && img.mimeType ? getImageDimensions(img.data, img.mimeType) ?? void 0 : void 0;
|
|
57
|
+
return imageFallback(mimeType, dims);
|
|
58
|
+
}).join(`
|
|
59
|
+
`);
|
|
60
|
+
output = output ? `${output}
|
|
61
|
+
${imageIndicators}` : imageIndicators;
|
|
62
|
+
}
|
|
63
|
+
return output;
|
|
64
|
+
}
|
|
65
|
+
function invalidArgText(theme) {
|
|
66
|
+
return theme.fg("error", "[invalid arg]");
|
|
67
|
+
}
|
|
68
|
+
function toolGroupRole(continuation, followed) {
|
|
69
|
+
return !continuation && followed ? "first" : continuation && followed ? "middle" : continuation && !followed ? "last" : "singleton";
|
|
70
|
+
}
|
|
71
|
+
function toolGroupTree(context) {
|
|
72
|
+
return !context.expanded;
|
|
73
|
+
}
|
|
74
|
+
function formatGroupedCall(opts) {
|
|
75
|
+
let detail = opts.detail?.trim() ? opts.detail : "";
|
|
76
|
+
if (!((opts.tree ?? opts.compact === !0) && opts.role !== "singleton" && detail.length > 0))
|
|
77
|
+
return detail ? `${opts.dot} ${opts.title} ${detail}` : `${opts.dot} ${opts.title}`;
|
|
78
|
+
let branch = opts.role === "last" ? "\u2514\u2500" : "\u251C\u2500";
|
|
79
|
+
return opts.role === "first" ? `${opts.dot} ${opts.title}
|
|
80
|
+
${branch} ${detail}` : ` ${branch} ${detail}`;
|
|
81
|
+
}
|
|
82
|
+
function toolStatusDot(state, theme) {
|
|
83
|
+
return theme.fg(state === "pending" ? "muted" : state, "\u25CF");
|
|
84
|
+
}
|
|
85
|
+
function toolStatusDotFromContext(context, theme) {
|
|
86
|
+
return toolStatusDot(context.isPartial ? "pending" : context.isError ? "error" : "success", theme);
|
|
87
|
+
}
|
|
88
|
+
function renderToolPath(rawPath, theme, cwd, options) {
|
|
89
|
+
if (rawPath === null)
|
|
90
|
+
return invalidArgText(theme);
|
|
91
|
+
let value = rawPath || options?.emptyFallback;
|
|
92
|
+
return value ? linkPath(theme.fg("accent", shortenPath(value)), value, cwd) : theme.fg("toolOutput", "...");
|
|
93
|
+
}
|
|
94
|
+
function renderToolFileName(rawPath, theme, cwd) {
|
|
95
|
+
if (rawPath === null)
|
|
96
|
+
return invalidArgText(theme);
|
|
97
|
+
if (!rawPath)
|
|
98
|
+
return theme.fg("toolOutput", "...");
|
|
99
|
+
let name = basename(rawPath) || rawPath;
|
|
100
|
+
return linkPath(theme.fg("accent", name), rawPath, cwd);
|
|
101
|
+
}
|
|
102
|
+
function renderCollapsedSearchPath(rawPath, theme, cwd) {
|
|
103
|
+
if (rawPath === null)
|
|
104
|
+
return invalidArgText(theme);
|
|
105
|
+
let value = rawPath.trim();
|
|
106
|
+
if (!(!value || value === "." || value === "./"))
|
|
107
|
+
return renderToolFileName(value, theme, cwd);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export {
|
|
111
|
+
stripAnsi,
|
|
112
|
+
shortenPath,
|
|
113
|
+
str,
|
|
114
|
+
replaceTabs,
|
|
115
|
+
normalizeDisplayText,
|
|
116
|
+
getTextOutput,
|
|
117
|
+
invalidArgText,
|
|
118
|
+
toolGroupRole,
|
|
119
|
+
toolGroupTree,
|
|
120
|
+
formatGroupedCall,
|
|
121
|
+
toolStatusDot,
|
|
122
|
+
toolStatusDotFromContext,
|
|
123
|
+
renderToolPath,
|
|
124
|
+
renderToolFileName,
|
|
125
|
+
renderCollapsedSearchPath
|
|
126
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/coding-agent/dist/modes/interactive/components/custom-editor.js
|
|
4
|
+
import { Editor } from "@ashx-j/lunr-tui";
|
|
5
|
+
var CustomEditor = class extends Editor {
|
|
6
|
+
keybindings;
|
|
7
|
+
actionHandlers = /* @__PURE__ */ new Map();
|
|
8
|
+
// Special handlers that can be dynamically replaced
|
|
9
|
+
onEscape;
|
|
10
|
+
onCtrlD;
|
|
11
|
+
onPasteImage;
|
|
12
|
+
/** Handler for extension-registered shortcuts. Returns true if handled. */
|
|
13
|
+
onExtensionShortcut;
|
|
14
|
+
constructor(tui, theme, keybindings, options) {
|
|
15
|
+
super(tui, theme, options), this.keybindings = keybindings;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Register a handler for an app action.
|
|
19
|
+
*/
|
|
20
|
+
onAction(action, handler) {
|
|
21
|
+
this.actionHandlers.set(action, handler);
|
|
22
|
+
}
|
|
23
|
+
handleInput(data) {
|
|
24
|
+
if (!this.onExtensionShortcut?.(data)) {
|
|
25
|
+
if (this.keybindings.matches(data, "app.clipboard.pasteImage")) {
|
|
26
|
+
(this.onPasteImage ?? this.actionHandlers.get("app.clipboard.pasteImage"))?.();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (this.keybindings.matches(data, "app.interrupt")) {
|
|
30
|
+
if (!this.isShowingAutocomplete()) {
|
|
31
|
+
let handler = this.onEscape ?? this.actionHandlers.get("app.interrupt");
|
|
32
|
+
if (handler) {
|
|
33
|
+
handler();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
super.handleInput(data);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (this.keybindings.matches(data, "app.exit") && this.getText().length === 0) {
|
|
41
|
+
let handler = this.onCtrlD ?? this.actionHandlers.get("app.exit");
|
|
42
|
+
handler && handler();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
for (let [action, handler] of this.actionHandlers)
|
|
46
|
+
if (action !== "app.interrupt" && action !== "app.exit" && this.keybindings.matches(data, action)) {
|
|
47
|
+
handler();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
super.handleInput(data);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
CustomEditor
|
|
57
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/coding-agent/dist/core/customize.js
|
|
4
|
+
var CUSTOMIZE_BRIDGE_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/customize"), activeSettingsManager, bridge = {
|
|
5
|
+
getOpenAIFastMode() {
|
|
6
|
+
return activeSettingsManager?.getOpenAIFastMode() ?? !1;
|
|
7
|
+
},
|
|
8
|
+
getFooterMcp() {
|
|
9
|
+
return activeSettingsManager?.getFooterMcp() ?? !0;
|
|
10
|
+
},
|
|
11
|
+
getFooterLsp() {
|
|
12
|
+
return activeSettingsManager?.getFooterLsp() ?? !1;
|
|
13
|
+
},
|
|
14
|
+
getFooterContext() {
|
|
15
|
+
return activeSettingsManager?.getFooterContext() ?? !0;
|
|
16
|
+
},
|
|
17
|
+
getFooterTokens() {
|
|
18
|
+
return activeSettingsManager?.getFooterTokens() ?? !0;
|
|
19
|
+
},
|
|
20
|
+
getFooterCacheHitRate() {
|
|
21
|
+
return activeSettingsManager?.getFooterCacheHitRate() ?? !0;
|
|
22
|
+
},
|
|
23
|
+
getFooterTps() {
|
|
24
|
+
return activeSettingsManager?.getFooterTps() ?? !0;
|
|
25
|
+
},
|
|
26
|
+
getFooterStatuses() {
|
|
27
|
+
return activeSettingsManager?.getFooterStatuses() ?? !0;
|
|
28
|
+
},
|
|
29
|
+
getFooterGit() {
|
|
30
|
+
return activeSettingsManager?.getFooterGit() ?? !0;
|
|
31
|
+
},
|
|
32
|
+
getFooterPlan() {
|
|
33
|
+
return activeSettingsManager?.getFooterPlan() ?? !0;
|
|
34
|
+
},
|
|
35
|
+
getFooterPlanBar() {
|
|
36
|
+
return activeSettingsManager?.getFooterPlanBar() ?? !0;
|
|
37
|
+
},
|
|
38
|
+
getHideThinkingBlock() {
|
|
39
|
+
return activeSettingsManager?.getHideThinkingBlock() ?? !1;
|
|
40
|
+
},
|
|
41
|
+
setHideThinkingBlock(hide) {
|
|
42
|
+
activeSettingsManager?.setHideThinkingBlock(hide);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
function registerCustomizeBridge(settingsManager) {
|
|
46
|
+
activeSettingsManager = settingsManager, globalThis[CUSTOMIZE_BRIDGE_SYMBOL] = bridge;
|
|
47
|
+
}
|
|
48
|
+
function getCustomizeBridge() {
|
|
49
|
+
return globalThis[CUSTOMIZE_BRIDGE_SYMBOL];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
CUSTOMIZE_BRIDGE_SYMBOL,
|
|
54
|
+
registerCustomizeBridge,
|
|
55
|
+
getCustomizeBridge
|
|
56
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/coding-agent/dist/builtin-extensions/pi-mcp-adapter/panel-keys.js
|
|
4
|
+
import { matchesKey } from "@ashx-j/lunr-tui";
|
|
5
|
+
function createPanelKeys(keybindings) {
|
|
6
|
+
return keybindings ? {
|
|
7
|
+
selectUp: (data) => keybindings.matches(data, "tui.select.up"),
|
|
8
|
+
selectDown: (data) => keybindings.matches(data, "tui.select.down"),
|
|
9
|
+
selectConfirm: (data) => keybindings.matches(data, "tui.select.confirm")
|
|
10
|
+
} : {
|
|
11
|
+
selectUp: (data) => matchesKey(data, "up"),
|
|
12
|
+
selectDown: (data) => matchesKey(data, "down"),
|
|
13
|
+
selectConfirm: (data) => matchesKey(data, "return")
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
createPanelKeys
|
|
19
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/coding-agent/dist/modes/interactive/components/countdown-timer.js
|
|
4
|
+
var CountdownTimer = class {
|
|
5
|
+
intervalId;
|
|
6
|
+
remainingSeconds;
|
|
7
|
+
tui;
|
|
8
|
+
onTick;
|
|
9
|
+
onExpire;
|
|
10
|
+
constructor(timeoutMs, tui, onTick, onExpire) {
|
|
11
|
+
this.tui = tui, this.onTick = onTick, this.onExpire = onExpire, this.remainingSeconds = Math.ceil(timeoutMs / 1e3), this.onTick(this.remainingSeconds), this.intervalId = setInterval(() => {
|
|
12
|
+
this.remainingSeconds--, this.onTick(this.remainingSeconds), this.tui?.requestRender(), this.remainingSeconds <= 0 && (this.dispose(), this.onExpire());
|
|
13
|
+
}, 1e3);
|
|
14
|
+
}
|
|
15
|
+
dispose() {
|
|
16
|
+
this.intervalId && (clearInterval(this.intervalId), this.intervalId = void 0);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
CountdownTimer
|
|
22
|
+
};
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
areExperimentalFeaturesEnabled,
|
|
4
|
+
getProjectTrustOptions,
|
|
5
|
+
hasTrustRequiringProjectResources
|
|
6
|
+
} from "./chunk-2QKLKMKC.js";
|
|
7
|
+
import {
|
|
8
|
+
DefaultPackageManager,
|
|
9
|
+
emitProjectTrustEvent
|
|
10
|
+
} from "./chunk-PGAJ5MO5.js";
|
|
11
|
+
import {
|
|
12
|
+
SettingsManager
|
|
13
|
+
} from "./chunk-AJX357CL.js";
|
|
14
|
+
import {
|
|
15
|
+
ExtensionSelectorComponent
|
|
16
|
+
} from "./chunk-MJQDX3BA.js";
|
|
17
|
+
import {
|
|
18
|
+
ExtensionInputComponent
|
|
19
|
+
} from "./chunk-MGWCVY6Y.js";
|
|
20
|
+
import {
|
|
21
|
+
KeybindingsManager
|
|
22
|
+
} from "./chunk-YSKSB3BJ.js";
|
|
23
|
+
import {
|
|
24
|
+
DynamicBorder
|
|
25
|
+
} from "./chunk-3GHXVUAK.js";
|
|
26
|
+
import {
|
|
27
|
+
keyHint,
|
|
28
|
+
rawKeyHint
|
|
29
|
+
} from "./chunk-C4O2RSQQ.js";
|
|
30
|
+
import {
|
|
31
|
+
detectTerminalBackgroundFromEnv,
|
|
32
|
+
detectTerminalThemeForAuto,
|
|
33
|
+
initTheme,
|
|
34
|
+
loadThemeFromPath,
|
|
35
|
+
parseAutoThemeSetting,
|
|
36
|
+
resolveThemeSetting,
|
|
37
|
+
setRegisteredThemes,
|
|
38
|
+
setTheme,
|
|
39
|
+
theme
|
|
40
|
+
} from "./chunk-MX3GJNXJ.js";
|
|
41
|
+
import {
|
|
42
|
+
APP_NAME,
|
|
43
|
+
CONFIG_DIR_NAME,
|
|
44
|
+
ENV_AGENT_DIR,
|
|
45
|
+
PACKAGE_NAME,
|
|
46
|
+
getAgentDir,
|
|
47
|
+
getSettingsPath
|
|
48
|
+
} from "./chunk-PCIGF2XK.js";
|
|
49
|
+
|
|
50
|
+
// packages/coding-agent/dist/cli/startup-ui.js
|
|
51
|
+
import { ProcessTerminal, setKeybindings, TUI } from "@ashx-j/lunr-tui";
|
|
52
|
+
import { existsSync } from "fs";
|
|
53
|
+
|
|
54
|
+
// packages/coding-agent/dist/modes/interactive/components/first-time-setup.js
|
|
55
|
+
import { Container, getKeybindings, Spacer, Text } from "@ashx-j/lunr-tui";
|
|
56
|
+
var THEME_OPTIONS = [{ value: "moon", label: "Moon" }], ANALYTICS_OPTIONS = [
|
|
57
|
+
{ value: !0, label: "Share anonymous usage data" },
|
|
58
|
+
{ value: !1, label: "Don't share" }
|
|
59
|
+
], SETUP_LOGO_LINES = ["\u2588\u2588\u2588\u2588\u2588\u2588", "\u2588\u2588 \u2588\u2588", "\u2588\u2588\u2588\u2588 \u2588\u2588", "\u2588\u2588 \u2588\u2588"], FirstTimeSetupComponent = class extends Container {
|
|
60
|
+
step = "theme";
|
|
61
|
+
themeIndex;
|
|
62
|
+
analyticsIndex = 0;
|
|
63
|
+
options;
|
|
64
|
+
constructor(options) {
|
|
65
|
+
super(), this.options = options, this.themeIndex = Math.max(0, THEME_OPTIONS.findIndex((option) => option.value === options.detectedTheme)), this.update();
|
|
66
|
+
}
|
|
67
|
+
// Rebuild the whole dialog on every change so theme previews recolor all text.
|
|
68
|
+
update() {
|
|
69
|
+
this.clear(), this.addChild(new DynamicBorder()), this.addChild(new Spacer(1)), this.addChild(new Text(theme.fg("accent", SETUP_LOGO_LINES.join(`
|
|
70
|
+
`)), 1, 0)), this.addChild(new Spacer(1)), this.addChild(new Text(theme.fg("accent", theme.bold("Welcome to lunR.")), 1, 0)), this.addChild(new Spacer(1)), this.step === "theme" ? (this.addChild(new Text(theme.fg("text", "Pick a theme."), 1, 0)), this.addChild(new Text(theme.fg("muted", `Detected system appearance: ${this.options.detectedTheme}`), 1, 0)), this.addChild(new Spacer(1)), this.addOptionList(THEME_OPTIONS.map((option) => option.label), this.themeIndex)) : (this.addChild(new Text(theme.fg("text", "Opt-in to anonymous usage data sharing?"), 1, 0)), this.addChild(new Text(theme.fg("muted", `Opting in stores a tracking identifier in settings.json and enables anonymous
|
|
71
|
+
usage analytics. This helps us to better debug, reproduce, and resolve issues
|
|
72
|
+
and bugs within lunR. You can observe what is shared using /privacy and make
|
|
73
|
+
changes anytime in settings.json.`), 1, 0)), this.addChild(new Spacer(1)), this.addOptionList(ANALYTICS_OPTIONS.map((option) => option.label), this.analyticsIndex)), this.addChild(new Spacer(1)), this.addChild(new Text(rawKeyHint("\u2191\u2193", "navigate") + " " + keyHint("tui.select.confirm", this.step === "theme" ? "continue" : "finish") + " " + keyHint("tui.select.cancel", "skip setup"), 1, 0)), this.addChild(new Spacer(1)), this.addChild(new DynamicBorder());
|
|
74
|
+
}
|
|
75
|
+
addOptionList(labels, selectedIndex) {
|
|
76
|
+
for (let i = 0; i < labels.length; i++) {
|
|
77
|
+
let isSelected = i === selectedIndex, prefix = isSelected ? theme.fg("accent", "\u2192 ") : " ", label = isSelected ? theme.fg("accent", labels[i]) : theme.fg("text", labels[i]);
|
|
78
|
+
this.addChild(new Text(`${prefix}${label}`, 1, 0));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
moveSelection(delta) {
|
|
82
|
+
if (this.step === "theme") {
|
|
83
|
+
let next = Math.max(0, Math.min(THEME_OPTIONS.length - 1, this.themeIndex + delta));
|
|
84
|
+
next !== this.themeIndex && (this.themeIndex = next, this.options.onThemePreview(THEME_OPTIONS[this.themeIndex].value));
|
|
85
|
+
} else
|
|
86
|
+
this.analyticsIndex = Math.max(0, Math.min(ANALYTICS_OPTIONS.length - 1, this.analyticsIndex + delta));
|
|
87
|
+
this.update();
|
|
88
|
+
}
|
|
89
|
+
handleInput(keyData) {
|
|
90
|
+
let kb = getKeybindings();
|
|
91
|
+
kb.matches(keyData, "tui.select.up") || keyData === "k" ? this.moveSelection(-1) : kb.matches(keyData, "tui.select.down") || keyData === "j" ? this.moveSelection(1) : kb.matches(keyData, "tui.select.confirm") || keyData === `
|
|
92
|
+
` ? this.step === "theme" ? (this.step = "analytics", this.update()) : this.options.onSubmit({
|
|
93
|
+
theme: THEME_OPTIONS[this.themeIndex].value,
|
|
94
|
+
shareAnalytics: ANALYTICS_OPTIONS[this.analyticsIndex].value
|
|
95
|
+
}) : kb.matches(keyData, "tui.select.cancel") && this.options.onCancel();
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// packages/coding-agent/dist/cli/startup-ui.js
|
|
100
|
+
var OFFICIAL_PACKAGE_NAME = "@ashx-j/lunr-dev", OFFICIAL_APP_NAME = "pi", OFFICIAL_CONFIG_DIR_NAME = ".pi", LUNR_APP_NAME = "lunr", LUNR_CONFIG_DIR_NAME = ".lunr";
|
|
101
|
+
function isOfficialDistribution({ packageName, appName, configDirName }) {
|
|
102
|
+
return packageName === OFFICIAL_PACKAGE_NAME && (appName === OFFICIAL_APP_NAME && configDirName === OFFICIAL_CONFIG_DIR_NAME || appName === LUNR_APP_NAME && configDirName === LUNR_CONFIG_DIR_NAME);
|
|
103
|
+
}
|
|
104
|
+
function loadThemes(resources) {
|
|
105
|
+
let themes = [], seen = /* @__PURE__ */ new Set();
|
|
106
|
+
for (let resource of resources)
|
|
107
|
+
if (resource.enabled)
|
|
108
|
+
try {
|
|
109
|
+
let loadedTheme = loadThemeFromPath(resource.path);
|
|
110
|
+
if (loadedTheme.name) {
|
|
111
|
+
if (seen.has(loadedTheme.name))
|
|
112
|
+
continue;
|
|
113
|
+
seen.add(loadedTheme.name);
|
|
114
|
+
}
|
|
115
|
+
themes.push(loadedTheme);
|
|
116
|
+
} catch {
|
|
117
|
+
}
|
|
118
|
+
return themes;
|
|
119
|
+
}
|
|
120
|
+
async function loadStartupThemes(settingsManager) {
|
|
121
|
+
let globalSettingsManager = SettingsManager.inMemory(settingsManager.getGlobalSettings(), {
|
|
122
|
+
projectTrusted: !1
|
|
123
|
+
}), resolvedPaths = await new DefaultPackageManager({
|
|
124
|
+
cwd: process.cwd(),
|
|
125
|
+
agentDir: getAgentDir(),
|
|
126
|
+
settingsManager: globalSettingsManager
|
|
127
|
+
}).resolve(async () => "skip");
|
|
128
|
+
return loadThemes(resolvedPaths.themes);
|
|
129
|
+
}
|
|
130
|
+
async function createStartupTui(settingsManager) {
|
|
131
|
+
setRegisteredThemes(await loadStartupThemes(settingsManager));
|
|
132
|
+
let terminalTheme = detectTerminalBackgroundFromEnv().theme;
|
|
133
|
+
initTheme(resolveThemeSetting(settingsManager.getThemeSetting(), terminalTheme) ?? terminalTheme), setKeybindings(KeybindingsManager.create());
|
|
134
|
+
let ui = new TUI(new ProcessTerminal(), settingsManager.getShowHardwareCursor());
|
|
135
|
+
return ui.setClearOnShrink(settingsManager.getClearOnShrink()), ui;
|
|
136
|
+
}
|
|
137
|
+
function startStartupTui(ui, settingsManager) {
|
|
138
|
+
ui.start(), applyDetectedStartupTheme(ui, settingsManager);
|
|
139
|
+
}
|
|
140
|
+
async function applyDetectedStartupTheme(ui, settingsManager) {
|
|
141
|
+
let themeSetting = settingsManager.getThemeSetting();
|
|
142
|
+
if (themeSetting && !parseAutoThemeSetting(themeSetting))
|
|
143
|
+
return;
|
|
144
|
+
let terminalTheme = await detectTerminalThemeForAuto({ ui, timeoutMs: 100 });
|
|
145
|
+
setTheme(resolveThemeSetting(themeSetting, terminalTheme) ?? terminalTheme), ui.invalidate(), ui.requestRender();
|
|
146
|
+
}
|
|
147
|
+
async function clearStartupTui(ui) {
|
|
148
|
+
ui.clear(), ui.requestRender(), await new Promise((resolve) => setTimeout(resolve, 25));
|
|
149
|
+
}
|
|
150
|
+
function shouldRunFirstTimeSetup(settingsPath = getSettingsPath()) {
|
|
151
|
+
return !isOfficialDistribution({
|
|
152
|
+
packageName: PACKAGE_NAME,
|
|
153
|
+
appName: APP_NAME,
|
|
154
|
+
configDirName: CONFIG_DIR_NAME
|
|
155
|
+
}) || !areExperimentalFeaturesEnabled() || process.env[ENV_AGENT_DIR] ? !1 : !existsSync(settingsPath);
|
|
156
|
+
}
|
|
157
|
+
async function showStartupSelector(settingsManager, title, options) {
|
|
158
|
+
let ui = await createStartupTui(settingsManager);
|
|
159
|
+
return new Promise((resolve) => {
|
|
160
|
+
let settled = !1, finish = async (result) => {
|
|
161
|
+
settled || (settled = !0, await clearStartupTui(ui), ui.stop(), resolve(result));
|
|
162
|
+
}, selector = new ExtensionSelectorComponent(title, options.map((option) => option.label), (option) => {
|
|
163
|
+
finish(options.find((entry) => entry.label === option)?.value);
|
|
164
|
+
}, () => {
|
|
165
|
+
finish(void 0);
|
|
166
|
+
}, { tui: ui });
|
|
167
|
+
ui.addChild(selector), ui.setFocus(selector), startStartupTui(ui, settingsManager);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
async function showFirstTimeSetup(settingsManager) {
|
|
171
|
+
let ui = await createStartupTui(settingsManager);
|
|
172
|
+
return new Promise((resolve) => {
|
|
173
|
+
let settled = !1, finish = async (result) => {
|
|
174
|
+
settled || (settled = !0, result && (settingsManager.setTheme(result.theme), settingsManager.setEnableAnalytics(result.shareAnalytics), await settingsManager.flush()), await clearStartupTui(ui), ui.stop(), resolve());
|
|
175
|
+
};
|
|
176
|
+
(async () => {
|
|
177
|
+
ui.start();
|
|
178
|
+
let detectedTheme = await detectTerminalThemeForAuto({ ui, timeoutMs: 100 });
|
|
179
|
+
setTheme(detectedTheme);
|
|
180
|
+
let component = new FirstTimeSetupComponent({
|
|
181
|
+
detectedTheme,
|
|
182
|
+
onThemePreview: (themeName) => {
|
|
183
|
+
setTheme(themeName), ui.requestRender();
|
|
184
|
+
},
|
|
185
|
+
onSubmit: (result) => {
|
|
186
|
+
finish(result);
|
|
187
|
+
},
|
|
188
|
+
onCancel: () => {
|
|
189
|
+
finish(void 0);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
ui.addChild(component), ui.setFocus(component), ui.requestRender();
|
|
193
|
+
})();
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
async function showStartupInput(settingsManager, title, placeholder) {
|
|
197
|
+
let ui = await createStartupTui(settingsManager);
|
|
198
|
+
return new Promise((resolve) => {
|
|
199
|
+
let settled = !1, finish = async (result) => {
|
|
200
|
+
settled || (settled = !0, input.dispose(), await clearStartupTui(ui), ui.stop(), resolve(result));
|
|
201
|
+
}, input = new ExtensionInputComponent(title, placeholder, (value) => {
|
|
202
|
+
finish(value);
|
|
203
|
+
}, () => {
|
|
204
|
+
finish(void 0);
|
|
205
|
+
}, {
|
|
206
|
+
tui: ui
|
|
207
|
+
});
|
|
208
|
+
ui.addChild(input), ui.setFocus(input), startStartupTui(ui, settingsManager);
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// packages/coding-agent/dist/cli/project-trust.js
|
|
213
|
+
import chalk from "chalk";
|
|
214
|
+
function createProjectTrustContext(options) {
|
|
215
|
+
return {
|
|
216
|
+
cwd: options.cwd,
|
|
217
|
+
mode: options.mode === "interactive" ? "tui" : options.mode,
|
|
218
|
+
hasUI: options.hasUI,
|
|
219
|
+
ui: {
|
|
220
|
+
select: async (title, selectOptions) => {
|
|
221
|
+
if (options.hasUI && options.mode === "interactive")
|
|
222
|
+
return showStartupSelector(options.settingsManager, title, selectOptions.map((option) => ({ label: option, value: option })));
|
|
223
|
+
},
|
|
224
|
+
confirm: async (title, message) => !options.hasUI || options.mode !== "interactive" ? !1 : await showStartupSelector(options.settingsManager, `${title}
|
|
225
|
+
${message}`, [
|
|
226
|
+
{ label: "Yes", value: !0 },
|
|
227
|
+
{ label: "No", value: !1 }
|
|
228
|
+
]) ?? !1,
|
|
229
|
+
input: async (title, placeholder) => {
|
|
230
|
+
if (options.hasUI && options.mode === "interactive")
|
|
231
|
+
return showStartupInput(options.settingsManager, title, placeholder);
|
|
232
|
+
},
|
|
233
|
+
notify: (message, type = "info") => {
|
|
234
|
+
if (options.mode !== "interactive") {
|
|
235
|
+
let color = type === "error" ? chalk.red : type === "warning" ? chalk.yellow : chalk.cyan;
|
|
236
|
+
console.error(color(message));
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// packages/coding-agent/dist/core/project-trust.js
|
|
244
|
+
function formatProjectTrustPrompt(cwd) {
|
|
245
|
+
return `Trust project folder?
|
|
246
|
+
${cwd}
|
|
247
|
+
|
|
248
|
+
This allows ${APP_NAME} to load ${CONFIG_DIR_NAME} settings and resources, install missing project packages, and execute project extensions.`;
|
|
249
|
+
}
|
|
250
|
+
async function selectProjectTrustOption(cwd, ctx) {
|
|
251
|
+
let options = getProjectTrustOptions(cwd, { includeSessionOnly: !0 }), selected = await ctx.ui.select(formatProjectTrustPrompt(cwd), options.map((option) => option.label));
|
|
252
|
+
return options.find((option) => option.label === selected);
|
|
253
|
+
}
|
|
254
|
+
function saveProjectTrustPromptResult(trustStore, result) {
|
|
255
|
+
result.updates.length > 0 && trustStore.setMany(result.updates);
|
|
256
|
+
}
|
|
257
|
+
async function resolveProjectTrusted(options) {
|
|
258
|
+
if (options.trustOverride !== void 0)
|
|
259
|
+
return options.trustOverride;
|
|
260
|
+
if (!hasTrustRequiringProjectResources(options.cwd))
|
|
261
|
+
return !0;
|
|
262
|
+
if (options.extensionsResult) {
|
|
263
|
+
let { result, errors } = await emitProjectTrustEvent(options.extensionsResult, { type: "project_trust", cwd: options.cwd }, options.projectTrustContext);
|
|
264
|
+
for (let error of errors)
|
|
265
|
+
options.onExtensionError?.(`Extension "${error.extensionPath}" project_trust error: ${error.error}`);
|
|
266
|
+
if (result) {
|
|
267
|
+
let trusted = result.trusted === "yes";
|
|
268
|
+
return result.remember === !0 && options.trustStore.set(options.cwd, trusted), trusted;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
let decision = options.trustStore.get(options.cwd);
|
|
272
|
+
if (decision !== null)
|
|
273
|
+
return decision;
|
|
274
|
+
switch (options.defaultProjectTrust ?? "ask") {
|
|
275
|
+
case "always":
|
|
276
|
+
return !0;
|
|
277
|
+
case "never":
|
|
278
|
+
return !1;
|
|
279
|
+
case "ask":
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
if (!options.projectTrustContext.hasUI)
|
|
283
|
+
return !1;
|
|
284
|
+
let selected = await selectProjectTrustOption(options.cwd, options.projectTrustContext);
|
|
285
|
+
return selected !== void 0 ? (saveProjectTrustPromptResult(options.trustStore, selected), selected.trusted) : !1;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export {
|
|
289
|
+
createStartupTui,
|
|
290
|
+
startStartupTui,
|
|
291
|
+
shouldRunFirstTimeSetup,
|
|
292
|
+
showStartupSelector,
|
|
293
|
+
showFirstTimeSetup,
|
|
294
|
+
createProjectTrustContext,
|
|
295
|
+
resolveProjectTrusted
|
|
296
|
+
};
|