@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,288 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
activityMonitor
|
|
4
|
+
} from "./chunk-DAPBPCBP.js";
|
|
5
|
+
import {
|
|
6
|
+
getWebSearchConfigPath
|
|
7
|
+
} from "./chunk-VRB2IYGG.js";
|
|
8
|
+
import "./chunk-BRJX2PRC.js";
|
|
9
|
+
|
|
10
|
+
// packages/coding-agent/dist/builtin-extensions/pi-web-access/openai-search.js
|
|
11
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
12
|
+
var OPENAI_RESPONSES_URL = "https://api.openai.com/v1/responses", CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses", CONFIG_PATH = getWebSearchConfigPath(), SEARCH_TIMEOUT_MS = 6e4, AUTH_MODEL_CANDIDATES = [
|
|
13
|
+
{ provider: "openai-codex", models: ["gpt-5.4", "gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.2", "gpt-5.2-codex"] },
|
|
14
|
+
{ provider: "openai", models: ["gpt-5.4", "gpt-5.2", "gpt-4.1-mini", "gpt-4o"] }
|
|
15
|
+
], cachedConfig = null;
|
|
16
|
+
function loadConfig() {
|
|
17
|
+
if (cachedConfig)
|
|
18
|
+
return cachedConfig;
|
|
19
|
+
if (!existsSync(CONFIG_PATH))
|
|
20
|
+
return cachedConfig = {}, cachedConfig;
|
|
21
|
+
let raw = readFileSync(CONFIG_PATH, "utf-8");
|
|
22
|
+
try {
|
|
23
|
+
return cachedConfig = JSON.parse(raw), cachedConfig;
|
|
24
|
+
} catch (err) {
|
|
25
|
+
let message = err instanceof Error ? err.message : String(err);
|
|
26
|
+
throw new Error(`Failed to parse ${CONFIG_PATH}: ${message}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function normalizeApiKey(value) {
|
|
30
|
+
if (typeof value != "string")
|
|
31
|
+
return null;
|
|
32
|
+
let normalized = value.trim();
|
|
33
|
+
return normalized.length > 0 ? normalized : null;
|
|
34
|
+
}
|
|
35
|
+
function normalizeDomain(value) {
|
|
36
|
+
let input = value.trim().toLowerCase();
|
|
37
|
+
if (!input || (input.startsWith("-") && (input = input.slice(1).trim()), !input))
|
|
38
|
+
return null;
|
|
39
|
+
try {
|
|
40
|
+
input = (input.includes("://") ? new URL(input) : new URL(`https://${input}`)).hostname;
|
|
41
|
+
} catch {
|
|
42
|
+
input = input.split("/")[0]?.split(":")[0] ?? "";
|
|
43
|
+
}
|
|
44
|
+
return input = input.replace(/^\.+|\.+$/g, ""), /^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i.test(input) ? input : null;
|
|
45
|
+
}
|
|
46
|
+
function normalizeDomainFilters(domainFilter) {
|
|
47
|
+
if (!domainFilter?.length)
|
|
48
|
+
return null;
|
|
49
|
+
let allowedDomains = [], blockedDomains = [];
|
|
50
|
+
for (let raw of domainFilter) {
|
|
51
|
+
let domain = normalizeDomain(raw);
|
|
52
|
+
if (!domain)
|
|
53
|
+
continue;
|
|
54
|
+
let target = raw.trim().startsWith("-") ? blockedDomains : allowedDomains;
|
|
55
|
+
target.includes(domain) || target.push(domain);
|
|
56
|
+
}
|
|
57
|
+
return allowedDomains.length > 0 || blockedDomains.length > 0 ? {
|
|
58
|
+
...allowedDomains.length > 0 ? { allowedDomains: allowedDomains.slice(0, 100) } : {},
|
|
59
|
+
...blockedDomains.length > 0 ? { blockedDomains: blockedDomains.slice(0, 100) } : {}
|
|
60
|
+
} : null;
|
|
61
|
+
}
|
|
62
|
+
function decodeJwtPayload(token) {
|
|
63
|
+
let parts = token.split(".");
|
|
64
|
+
if (parts.length !== 3 || !parts[1])
|
|
65
|
+
return null;
|
|
66
|
+
try {
|
|
67
|
+
let padded = parts[1].replace(/-/g, "+").replace(/_/g, "/").padEnd(Math.ceil(parts[1].length / 4) * 4, "="), parsed = JSON.parse(Buffer.from(padded, "base64").toString("utf8"));
|
|
68
|
+
return parsed && typeof parsed == "object" ? parsed : null;
|
|
69
|
+
} catch {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function isCodexJwt(token) {
|
|
74
|
+
return !!decodeJwtPayload(token)?.["https://api.openai.com/auth"];
|
|
75
|
+
}
|
|
76
|
+
function extractAccountId(token) {
|
|
77
|
+
let auth = decodeJwtPayload(token)?.["https://api.openai.com/auth"];
|
|
78
|
+
if (!auth || typeof auth != "object")
|
|
79
|
+
return;
|
|
80
|
+
let id = auth.chatgpt_account_id;
|
|
81
|
+
return typeof id == "string" && id.trim().length > 0 ? id.trim() : void 0;
|
|
82
|
+
}
|
|
83
|
+
async function resolveOpenAIAuth(ctx) {
|
|
84
|
+
if (ctx) {
|
|
85
|
+
let { getModel } = await import("@ashx-j/lunr-ai/compat");
|
|
86
|
+
for (let candidate of AUTH_MODEL_CANDIDATES)
|
|
87
|
+
for (let modelId of candidate.models) {
|
|
88
|
+
let model = getModel(candidate.provider, modelId);
|
|
89
|
+
if (model)
|
|
90
|
+
try {
|
|
91
|
+
let resolved = await ctx.modelRegistry.getApiKeyAndHeaders(model);
|
|
92
|
+
if (resolved.ok && resolved.apiKey)
|
|
93
|
+
return {
|
|
94
|
+
provider: candidate.provider,
|
|
95
|
+
apiKey: resolved.apiKey,
|
|
96
|
+
model: modelId,
|
|
97
|
+
headers: resolved.headers ?? {}
|
|
98
|
+
};
|
|
99
|
+
} catch {
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
let apiKey = normalizeApiKey(process.env.OPENAI_API_KEY) ?? normalizeApiKey(loadConfig().openaiApiKey);
|
|
104
|
+
return apiKey ? { provider: "openai", apiKey, model: "gpt-5.4", headers: {} } : void 0;
|
|
105
|
+
}
|
|
106
|
+
async function isOpenAISearchAvailable(ctx) {
|
|
107
|
+
return !!await resolveOpenAIAuth(ctx);
|
|
108
|
+
}
|
|
109
|
+
function buildInstructions(options) {
|
|
110
|
+
let lines = [
|
|
111
|
+
"Search the web and return a concise answer grounded only in the web results.",
|
|
112
|
+
"Include clickable source citations in the response text when possible."
|
|
113
|
+
];
|
|
114
|
+
if (options.recencyFilter) {
|
|
115
|
+
let labels = {
|
|
116
|
+
day: "past 24 hours",
|
|
117
|
+
week: "past week",
|
|
118
|
+
month: "past month",
|
|
119
|
+
year: "past year"
|
|
120
|
+
};
|
|
121
|
+
lines.push(`Prefer sources from the ${labels[options.recencyFilter]}.`);
|
|
122
|
+
}
|
|
123
|
+
typeof options.numResults == "number" && Number.isFinite(options.numResults) && options.numResults > 0 && lines.push(`Prefer around ${Math.min(Math.floor(options.numResults), 20)} distinct sources.`);
|
|
124
|
+
let filters = normalizeDomainFilters(options.domainFilter);
|
|
125
|
+
return filters?.allowedDomains?.length && lines.push(`Only use sources from: ${filters.allowedDomains.join(", ")}.`), filters?.blockedDomains?.length && lines.push(`Do not use sources from: ${filters.blockedDomains.join(", ")}.`), lines.join(" ");
|
|
126
|
+
}
|
|
127
|
+
function buildWebSearchTool(options) {
|
|
128
|
+
let tool = { type: "web_search" }, filters = normalizeDomainFilters(options.domainFilter);
|
|
129
|
+
return filters && (tool.filters = {
|
|
130
|
+
...filters.allowedDomains ? { allowed_domains: filters.allowedDomains } : {},
|
|
131
|
+
...filters.blockedDomains ? { blocked_domains: filters.blockedDomains } : {}
|
|
132
|
+
}), tool;
|
|
133
|
+
}
|
|
134
|
+
async function parseOpenAIResponse(response) {
|
|
135
|
+
let text = await response.text(), trimmed = text.trim();
|
|
136
|
+
if (trimmed.startsWith("{") || trimmed.startsWith("["))
|
|
137
|
+
try {
|
|
138
|
+
let parsed = JSON.parse(trimmed);
|
|
139
|
+
return Array.isArray(parsed) ? { output: parsed } : parsed && typeof parsed == "object" ? parsed : { output: [] };
|
|
140
|
+
} catch (err) {
|
|
141
|
+
let message = err instanceof Error ? err.message : String(err);
|
|
142
|
+
throw new Error(`OpenAI API returned invalid JSON: ${message}`);
|
|
143
|
+
}
|
|
144
|
+
let outputItems = [], completedResponse = null;
|
|
145
|
+
for (let line of text.split(`
|
|
146
|
+
`)) {
|
|
147
|
+
if (!line.startsWith("data: "))
|
|
148
|
+
continue;
|
|
149
|
+
let data = line.slice(6).trim();
|
|
150
|
+
if (!(!data || data === "[DONE]"))
|
|
151
|
+
try {
|
|
152
|
+
let parsed = JSON.parse(data);
|
|
153
|
+
parsed.type === "response.output_item.done" && parsed.item && outputItems.push(parsed.item), (parsed.type === "response.done" || parsed.type === "response.completed") && parsed.response && typeof parsed.response == "object" && (completedResponse = parsed.response);
|
|
154
|
+
} catch {
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (completedResponse)
|
|
158
|
+
return (Array.isArray(completedResponse.output) ? completedResponse.output : []).length > 0 ? completedResponse : { ...completedResponse, output: outputItems };
|
|
159
|
+
if (outputItems.length > 0)
|
|
160
|
+
return { output: outputItems };
|
|
161
|
+
throw new Error("OpenAI API returned no parseable response output");
|
|
162
|
+
}
|
|
163
|
+
function cleanSourceUrl(rawUrl) {
|
|
164
|
+
try {
|
|
165
|
+
let url = new URL(rawUrl);
|
|
166
|
+
return url.searchParams.get("utm_source") === "openai" && url.searchParams.delete("utm_source"), url.toString();
|
|
167
|
+
} catch {
|
|
168
|
+
return rawUrl.replace(/[?&]utm_source=openai$/, "");
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
function extractSnippetAround(text, start, end) {
|
|
172
|
+
if (typeof start != "number" || typeof end != "number" || !text)
|
|
173
|
+
return "";
|
|
174
|
+
let before = Math.max(0, start - 100), after = Math.min(text.length, end + 100), snippet = text.slice(before, after).replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").trim();
|
|
175
|
+
return snippet.length > 300 ? `${snippet.slice(0, 297)}...` : snippet;
|
|
176
|
+
}
|
|
177
|
+
function addResult(results, seen, url, title, snippet = "") {
|
|
178
|
+
if (typeof url != "string" || url.trim().length === 0)
|
|
179
|
+
return;
|
|
180
|
+
let cleanUrl = cleanSourceUrl(url);
|
|
181
|
+
seen.has(cleanUrl) || (seen.add(cleanUrl), results.push({
|
|
182
|
+
title: typeof title == "string" && title.trim().length > 0 ? title : cleanUrl,
|
|
183
|
+
url: cleanUrl,
|
|
184
|
+
snippet
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
function extractSearchResults(output, numResults) {
|
|
188
|
+
let results = [], seenUrls = /* @__PURE__ */ new Set();
|
|
189
|
+
for (let item of output) {
|
|
190
|
+
if (!item || typeof item != "object" || item.type !== "message")
|
|
191
|
+
continue;
|
|
192
|
+
let content = item.content;
|
|
193
|
+
if (Array.isArray(content))
|
|
194
|
+
for (let part of content) {
|
|
195
|
+
if (!part || typeof part != "object")
|
|
196
|
+
continue;
|
|
197
|
+
let text = typeof part.text == "string" ? part.text : "", annotations = part.annotations;
|
|
198
|
+
if (Array.isArray(annotations))
|
|
199
|
+
for (let annotation of annotations)
|
|
200
|
+
!annotation || typeof annotation != "object" || annotation.type !== "url_citation" || addResult(results, seenUrls, annotation.url, annotation.title, extractSnippetAround(text, annotation.start_index, annotation.end_index));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
for (let item of output) {
|
|
204
|
+
if (!item || typeof item != "object" || item.type !== "web_search_call")
|
|
205
|
+
continue;
|
|
206
|
+
let value = item, sourceGroups = [value.action && typeof value.action == "object" ? value.action.sources : void 0, value.sources, value.results];
|
|
207
|
+
for (let group of sourceGroups)
|
|
208
|
+
if (Array.isArray(group))
|
|
209
|
+
for (let source of group) {
|
|
210
|
+
if (!source || typeof source != "object")
|
|
211
|
+
continue;
|
|
212
|
+
let record = source;
|
|
213
|
+
addResult(results, seenUrls, record.url ?? record.source_website_url, record.title ?? record.caption);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return typeof numResults == "number" && Number.isFinite(numResults) && numResults > 0 ? results.slice(0, Math.min(Math.floor(numResults), 20)) : results;
|
|
217
|
+
}
|
|
218
|
+
function extractAnswer(output) {
|
|
219
|
+
let parts = [];
|
|
220
|
+
for (let item of output) {
|
|
221
|
+
if (!item || typeof item != "object" || item.type !== "message")
|
|
222
|
+
continue;
|
|
223
|
+
let content = item.content;
|
|
224
|
+
if (Array.isArray(content))
|
|
225
|
+
for (let part of content) {
|
|
226
|
+
if (!part || typeof part != "object")
|
|
227
|
+
continue;
|
|
228
|
+
let text = part.text;
|
|
229
|
+
typeof text == "string" && text.trim().length > 0 && parts.push(text);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return parts.join(`
|
|
233
|
+
`).trim();
|
|
234
|
+
}
|
|
235
|
+
async function searchWithOpenAI(query, options = {}, ctx) {
|
|
236
|
+
let auth = await resolveOpenAIAuth(ctx);
|
|
237
|
+
if (!auth)
|
|
238
|
+
throw new Error(`OpenAI web search unavailable. Either:
|
|
239
|
+
1. Use /login to sign in with a Codex subscription
|
|
240
|
+
2. Create ${CONFIG_PATH} with { "openaiApiKey": "your-key" }
|
|
241
|
+
3. Set OPENAI_API_KEY environment variable`);
|
|
242
|
+
let activityId = activityMonitor.logStart({ type: "api", query }), headers = {
|
|
243
|
+
...auth.headers,
|
|
244
|
+
Authorization: `Bearer ${auth.apiKey}`,
|
|
245
|
+
"Content-Type": "application/json",
|
|
246
|
+
"OpenAI-Beta": "responses=experimental"
|
|
247
|
+
}, useCodexEndpoint = auth.provider === "openai-codex" || isCodexJwt(auth.apiKey);
|
|
248
|
+
if (useCodexEndpoint) {
|
|
249
|
+
let accountId = extractAccountId(auth.apiKey);
|
|
250
|
+
accountId && (headers["chatgpt-account-id"] = accountId), headers.originator = "pi";
|
|
251
|
+
}
|
|
252
|
+
let body = {
|
|
253
|
+
model: auth.model,
|
|
254
|
+
instructions: buildInstructions(options),
|
|
255
|
+
input: [{ role: "user", content: [{ type: "input_text", text: query }] }],
|
|
256
|
+
tools: [buildWebSearchTool(options)],
|
|
257
|
+
include: ["web_search_call.action.sources"],
|
|
258
|
+
store: !1,
|
|
259
|
+
stream: !0,
|
|
260
|
+
tool_choice: "required",
|
|
261
|
+
parallel_tool_calls: !0
|
|
262
|
+
};
|
|
263
|
+
try {
|
|
264
|
+
let response = await fetch(useCodexEndpoint ? CODEX_RESPONSES_URL : OPENAI_RESPONSES_URL, {
|
|
265
|
+
method: "POST",
|
|
266
|
+
headers,
|
|
267
|
+
body: JSON.stringify(body),
|
|
268
|
+
signal: options.signal ? AbortSignal.any([AbortSignal.timeout(SEARCH_TIMEOUT_MS), options.signal]) : AbortSignal.timeout(SEARCH_TIMEOUT_MS)
|
|
269
|
+
});
|
|
270
|
+
if (!response.ok) {
|
|
271
|
+
activityMonitor.logError(activityId, `HTTP ${response.status}`);
|
|
272
|
+
let errorText = await response.text();
|
|
273
|
+
throw new Error(`OpenAI API error ${response.status}: ${errorText.slice(0, 300)}`);
|
|
274
|
+
}
|
|
275
|
+
let parsed = await parseOpenAIResponse(response), output = Array.isArray(parsed.output) ? parsed.output : [], answer = extractAnswer(output), results = extractSearchResults(output, options.numResults);
|
|
276
|
+
if (!answer && results.length === 0)
|
|
277
|
+
throw new Error("OpenAI web_search returned no answer or sources");
|
|
278
|
+
return activityMonitor.logComplete(activityId, response.status), { answer, results };
|
|
279
|
+
} catch (err) {
|
|
280
|
+
let message = err instanceof Error ? err.message : String(err);
|
|
281
|
+
throw message.toLowerCase().includes("abort") ? activityMonitor.logComplete(activityId, 0) : activityMonitor.logError(activityId, message), err;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
export {
|
|
285
|
+
isOpenAISearchAvailable,
|
|
286
|
+
resolveOpenAIAuth,
|
|
287
|
+
searchWithOpenAI
|
|
288
|
+
};
|