@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,279 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
CUA_VERSION,
|
|
4
|
+
installRuntime,
|
|
5
|
+
runtimeEnvironment
|
|
6
|
+
} from "./chunk-JZHEUQRL.js";
|
|
7
|
+
import {
|
|
8
|
+
Client,
|
|
9
|
+
StdioClientTransport
|
|
10
|
+
} from "./chunk-LWJXTA6Z.js";
|
|
11
|
+
import "./chunk-2IDTZAG5.js";
|
|
12
|
+
import "./chunk-BI3DHYCN.js";
|
|
13
|
+
import "./chunk-URD2SLIT.js";
|
|
14
|
+
import "./chunk-PCIGF2XK.js";
|
|
15
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
16
|
+
import "./chunk-BRJX2PRC.js";
|
|
17
|
+
|
|
18
|
+
// packages/coding-agent/dist/core/computer-use/adapter.js
|
|
19
|
+
import { mkdir, mkdtemp as mkdtemp2, realpath as realpath2, rm as rm2 } from "node:fs/promises";
|
|
20
|
+
import { tmpdir as tmpdir2 } from "node:os";
|
|
21
|
+
import { join as join3 } from "node:path";
|
|
22
|
+
import { setTimeout as delay2 } from "node:timers/promises";
|
|
23
|
+
|
|
24
|
+
// packages/coding-agent/dist/core/computer-use/macos-runtime.js
|
|
25
|
+
import { execFile, spawn } from "node:child_process";
|
|
26
|
+
import { constants } from "node:fs";
|
|
27
|
+
import { mkdtemp, open, realpath, rm } from "node:fs/promises";
|
|
28
|
+
import { connect } from "node:net";
|
|
29
|
+
import { tmpdir } from "node:os";
|
|
30
|
+
import { join } from "node:path";
|
|
31
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
32
|
+
import { promisify } from "node:util";
|
|
33
|
+
var exec = promisify(execFile);
|
|
34
|
+
function macLaunchArguments(app, socket, home, lifetime) {
|
|
35
|
+
let environment = {
|
|
36
|
+
HOME: home,
|
|
37
|
+
...Object.fromEntries(Object.entries(runtimeEnvironment()).filter(([name]) => name.startsWith("CUA_")))
|
|
38
|
+
};
|
|
39
|
+
return [
|
|
40
|
+
"-n",
|
|
41
|
+
"-g",
|
|
42
|
+
"-W",
|
|
43
|
+
"-a",
|
|
44
|
+
app,
|
|
45
|
+
"--stdin",
|
|
46
|
+
lifetime,
|
|
47
|
+
...Object.entries(environment).flatMap(([name, value]) => ["--env", `${name}=${value}`]),
|
|
48
|
+
"--args",
|
|
49
|
+
"serve",
|
|
50
|
+
"--embedded",
|
|
51
|
+
"--parent-liveness-stdio",
|
|
52
|
+
"--socket",
|
|
53
|
+
socket,
|
|
54
|
+
"--permission-mode",
|
|
55
|
+
"standard",
|
|
56
|
+
"--no-overlay"
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
function request(socket, method, args) {
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
let stream = connect(socket), buffer = "";
|
|
62
|
+
stream.setTimeout(1e3, () => stream.destroy(new Error("Private computer endpoint timed out."))), stream.on("error", reject), stream.on("connect", () => stream.write(`${JSON.stringify({ method, args })}
|
|
63
|
+
`)), stream.on("data", (chunk) => {
|
|
64
|
+
if (buffer += chunk.toString(), buffer.length > 65536) {
|
|
65
|
+
stream.destroy(new Error("Invalid private endpoint metadata."));
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (buffer.includes(`
|
|
69
|
+
`)) {
|
|
70
|
+
try {
|
|
71
|
+
let reply = JSON.parse(buffer.slice(0, buffer.indexOf(`
|
|
72
|
+
`)));
|
|
73
|
+
if (!reply || typeof reply != "object" || !("result" in reply) || !reply.result || typeof reply.result != "object")
|
|
74
|
+
throw new Error("Private endpoint refused metadata.");
|
|
75
|
+
resolve(Object.fromEntries(Object.entries(reply.result)));
|
|
76
|
+
} catch (error) {
|
|
77
|
+
reject(error);
|
|
78
|
+
}
|
|
79
|
+
stream.destroy();
|
|
80
|
+
}
|
|
81
|
+
}), stream.on("end", () => reject(new Error("Private computer endpoint closed.")));
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
var MacRuntime = class {
|
|
85
|
+
directory;
|
|
86
|
+
lifetime;
|
|
87
|
+
exited;
|
|
88
|
+
pid;
|
|
89
|
+
get processId() {
|
|
90
|
+
return this.pid;
|
|
91
|
+
}
|
|
92
|
+
socket;
|
|
93
|
+
closing;
|
|
94
|
+
async start(app, signal) {
|
|
95
|
+
let directory = await mkdtemp(join(await realpath(tmpdir()), "lunr-cua-"));
|
|
96
|
+
this.directory = directory;
|
|
97
|
+
let socket = join(directory, "driver.sock");
|
|
98
|
+
this.socket = socket;
|
|
99
|
+
let lifetime = join(directory, "lifetime");
|
|
100
|
+
await exec("/usr/bin/mkfifo", ["-m", "600", lifetime], { timeout: 5e3, signal }), this.lifetime = await open(lifetime, constants.O_RDWR), signal.throwIfAborted();
|
|
101
|
+
let launcher = spawn("/usr/bin/open", macLaunchArguments(app, socket, directory, lifetime), {
|
|
102
|
+
env: runtimeEnvironment(),
|
|
103
|
+
stdio: "ignore"
|
|
104
|
+
});
|
|
105
|
+
this.exited = new Promise((resolve, reject) => {
|
|
106
|
+
launcher.once("error", reject), launcher.once("exit", (code) => code === 0 ? resolve() : reject(new Error(`LaunchServices exited ${code}.`)));
|
|
107
|
+
}), this.exited.catch(() => {
|
|
108
|
+
});
|
|
109
|
+
let deadline = Date.now() + 15e3;
|
|
110
|
+
for (; Date.now() < deadline; ) {
|
|
111
|
+
signal.throwIfAborted();
|
|
112
|
+
try {
|
|
113
|
+
let metadata = await request(socket, "metadata");
|
|
114
|
+
if (metadata.driver_version !== CUA_VERSION || metadata.embedded !== !0 || typeof metadata.pid != "number" || metadata.pid < 1)
|
|
115
|
+
throw new Error("Private runtime has incompatible metadata.");
|
|
116
|
+
return this.pid = metadata.pid, socket;
|
|
117
|
+
} catch {
|
|
118
|
+
await Promise.race([
|
|
119
|
+
delay(100, void 0, { signal }),
|
|
120
|
+
this.exited.then(() => {
|
|
121
|
+
throw new Error("Computer app exited during startup.");
|
|
122
|
+
})
|
|
123
|
+
]);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
throw new Error("Private macOS runtime startup timed out. Check CuaDriver Accessibility and Screen Recording grants.");
|
|
127
|
+
}
|
|
128
|
+
close() {
|
|
129
|
+
return this.closing ??= this.stop(), this.closing;
|
|
130
|
+
}
|
|
131
|
+
async stop() {
|
|
132
|
+
if (await this.lifetime?.close(), this.lifetime = void 0, this.socket && this.pid && await request(this.socket, "shutdown_if_pid", { expected_pid: this.pid }).catch(() => {
|
|
133
|
+
}), this.exited) {
|
|
134
|
+
let timeout = new AbortController();
|
|
135
|
+
try {
|
|
136
|
+
await Promise.race([
|
|
137
|
+
this.exited,
|
|
138
|
+
delay(1e4, void 0, { signal: timeout.signal }).then(() => {
|
|
139
|
+
throw new Error("Owned macOS app shutdown is unconfirmed. Desktop lease retained.");
|
|
140
|
+
})
|
|
141
|
+
]);
|
|
142
|
+
} finally {
|
|
143
|
+
timeout.abort();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
this.directory && await rm(this.directory, { recursive: !0, force: !0 });
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
// packages/coding-agent/dist/core/computer-use/windows-desktop.js
|
|
151
|
+
import { execFile as execFile2 } from "node:child_process";
|
|
152
|
+
import { join as join2 } from "node:path";
|
|
153
|
+
import { promisify as promisify2 } from "node:util";
|
|
154
|
+
var exec2 = promisify2(execFile2), WINDOWS_DESKTOP_PROBE = `
|
|
155
|
+
$ErrorActionPreference = 'Stop'
|
|
156
|
+
Add-Type -TypeDefinition @'
|
|
157
|
+
using System;
|
|
158
|
+
using System.Diagnostics;
|
|
159
|
+
using System.Runtime.InteropServices;
|
|
160
|
+
using System.Text;
|
|
161
|
+
public static class LunrDesktopProbe {
|
|
162
|
+
[DllImport("user32.dll", SetLastError=true)] static extern IntPtr OpenInputDesktop(uint flags, bool inherit, uint access);
|
|
163
|
+
[DllImport("user32.dll")] static extern bool CloseDesktop(IntPtr desktop);
|
|
164
|
+
[DllImport("user32.dll", CharSet=CharSet.Unicode, SetLastError=true)] static extern bool GetUserObjectInformation(IntPtr handle, int index, StringBuilder info, uint length, out uint needed);
|
|
165
|
+
[DllImport("wtsapi32.dll", SetLastError=true)] static extern bool WTSQuerySessionInformation(IntPtr server, int session, int info, out IntPtr buffer, out uint bytes);
|
|
166
|
+
[DllImport("wtsapi32.dll")] static extern void WTSFreeMemory(IntPtr buffer);
|
|
167
|
+
public static bool Ready() {
|
|
168
|
+
int session = Process.GetCurrentProcess().SessionId;
|
|
169
|
+
if (session == 0) return false;
|
|
170
|
+
IntPtr buffer; uint bytes;
|
|
171
|
+
if (!WTSQuerySessionInformation(IntPtr.Zero, session, 8, out buffer, out bytes)) return false;
|
|
172
|
+
try { if (bytes < 4 || Marshal.ReadInt32(buffer) != 0) return false; }
|
|
173
|
+
finally { WTSFreeMemory(buffer); }
|
|
174
|
+
IntPtr desktop = OpenInputDesktop(0, false, 1);
|
|
175
|
+
if (desktop == IntPtr.Zero) return false;
|
|
176
|
+
try {
|
|
177
|
+
var name = new StringBuilder(256); uint needed;
|
|
178
|
+
return GetUserObjectInformation(desktop, 2, name, 512, out needed) && name.ToString() == "Default";
|
|
179
|
+
} finally { CloseDesktop(desktop); }
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
'@
|
|
183
|
+
if ([LunrDesktopProbe]::Ready()) { 'ready' } else { 'unavailable' }
|
|
184
|
+
`;
|
|
185
|
+
async function assertInteractiveDesktop(signal) {
|
|
186
|
+
if (process.platform !== "win32")
|
|
187
|
+
return;
|
|
188
|
+
let command = join2(process.env.SystemRoot ?? "C:\\Windows", "System32", "WindowsPowerShell", "v1.0", "powershell.exe"), { stdout } = await exec2(command, ["-NoProfile", "-NonInteractive", "-Command", WINDOWS_DESKTOP_PROBE], {
|
|
189
|
+
timeout: 5e3,
|
|
190
|
+
windowsHide: !0,
|
|
191
|
+
signal
|
|
192
|
+
});
|
|
193
|
+
if (stdout.trim() !== "ready")
|
|
194
|
+
throw new Error("Computer use requires an active, unlocked Windows desktop. No login, unlock, or elevation is attempted.");
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// packages/coding-agent/dist/core/computer-use/adapter.js
|
|
198
|
+
var CuaAdapter = class {
|
|
199
|
+
client;
|
|
200
|
+
transport;
|
|
201
|
+
mac;
|
|
202
|
+
stateDirectory;
|
|
203
|
+
connecting;
|
|
204
|
+
closing;
|
|
205
|
+
abort = new AbortController();
|
|
206
|
+
processObserver;
|
|
207
|
+
setProcessObserver(observer) {
|
|
208
|
+
this.processObserver = observer;
|
|
209
|
+
}
|
|
210
|
+
async connect(signal) {
|
|
211
|
+
let { command, app } = await installRuntime(signal);
|
|
212
|
+
signal.throwIfAborted();
|
|
213
|
+
let args = ["mcp", "--direct", "--embedded", "--no-overlay"];
|
|
214
|
+
app && (this.mac = new MacRuntime(), args = ["mcp", "--embedded", "--socket", await this.mac.start(app, signal), "--no-overlay"]), signal.throwIfAborted();
|
|
215
|
+
let state = await mkdtemp2(join3(await realpath2(tmpdir2()), "lunr-cua-client-"));
|
|
216
|
+
this.stateDirectory = state;
|
|
217
|
+
let appData = join3(state, "AppData");
|
|
218
|
+
if (await mkdir(appData), signal.throwIfAborted(), this.transport = new StdioClientTransport({
|
|
219
|
+
command,
|
|
220
|
+
args,
|
|
221
|
+
stderr: "pipe",
|
|
222
|
+
env: {
|
|
223
|
+
...runtimeEnvironment(),
|
|
224
|
+
HOME: state,
|
|
225
|
+
USERPROFILE: state,
|
|
226
|
+
APPDATA: appData,
|
|
227
|
+
LOCALAPPDATA: appData,
|
|
228
|
+
XDG_CONFIG_HOME: appData,
|
|
229
|
+
XDG_STATE_HOME: appData
|
|
230
|
+
}
|
|
231
|
+
}), this.transport.stderr?.on("data", () => {
|
|
232
|
+
}), this.client = new Client({ name: "lunr-computer-use", version: CUA_VERSION }), await this.client.connect(this.transport, { timeout: 15e3, signal }), signal.throwIfAborted(), this.client.getServerVersion()?.version !== CUA_VERSION)
|
|
233
|
+
throw new Error("Computer runtime version mismatch.");
|
|
234
|
+
let pids = [this.transport.pid, ...this.mac ? [this.mac.processId] : []];
|
|
235
|
+
for (let pid of pids) {
|
|
236
|
+
if (typeof pid != "number" || !Number.isInteger(pid) || pid < 1)
|
|
237
|
+
throw new Error("Computer runtime process identity is missing. Input refused.");
|
|
238
|
+
await this.processObserver?.(pid);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
async call(name, args, signal) {
|
|
242
|
+
let combined = AbortSignal.any([this.abort.signal, ...signal ? [signal] : []]);
|
|
243
|
+
combined.throwIfAborted();
|
|
244
|
+
try {
|
|
245
|
+
if (await assertInteractiveDesktop(combined), combined.throwIfAborted(), this.connecting ??= this.connect(AbortSignal.any([combined, AbortSignal.timeout(6e4)])), await this.connecting, combined.throwIfAborted(), !this.client)
|
|
246
|
+
throw new Error("Computer connection closed.");
|
|
247
|
+
return await this.client.callTool({ name, arguments: args }, void 0, { timeout: 15e3, signal: combined });
|
|
248
|
+
} catch (error) {
|
|
249
|
+
throw await this.close(), error;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
close() {
|
|
253
|
+
return this.abort.abort(), this.closing ??= this.stop(), this.closing;
|
|
254
|
+
}
|
|
255
|
+
async stop() {
|
|
256
|
+
await this.connecting?.catch(() => {
|
|
257
|
+
});
|
|
258
|
+
let pid = this.transport?.pid;
|
|
259
|
+
if (await this.client?.close(), await this.transport?.close(), pid) {
|
|
260
|
+
let deadline = Date.now() + 5e3;
|
|
261
|
+
for (; ; ) {
|
|
262
|
+
try {
|
|
263
|
+
process.kill(pid, 0);
|
|
264
|
+
} catch (error) {
|
|
265
|
+
if (error instanceof Error && "code" in error && error.code === "ESRCH")
|
|
266
|
+
break;
|
|
267
|
+
throw error;
|
|
268
|
+
}
|
|
269
|
+
if (Date.now() >= deadline)
|
|
270
|
+
throw new Error("Owned computer process shutdown is unconfirmed. Desktop lease retained.");
|
|
271
|
+
await delay2(50);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
await this.mac?.close(), this.stateDirectory && await rm2(this.stateDirectory, { recursive: !0, force: !0 }), this.client = void 0, this.transport = void 0;
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
export {
|
|
278
|
+
CuaAdapter
|
|
279
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
createAgentSessionFromServices,
|
|
4
|
+
createAgentSessionServices
|
|
5
|
+
} from "./chunk-JT6YCS5B.js";
|
|
6
|
+
import "./chunk-T5GM5BFH.js";
|
|
7
|
+
import "./chunk-OBMWP3I5.js";
|
|
8
|
+
import "./chunk-DVGWF6A2.js";
|
|
9
|
+
import "./chunk-5SQDLSZJ.js";
|
|
10
|
+
import "./chunk-QFWG2RVL.js";
|
|
11
|
+
import "./chunk-CGBXPL3E.js";
|
|
12
|
+
import "./chunk-K72NVGUB.js";
|
|
13
|
+
import "./chunk-53YJI7JU.js";
|
|
14
|
+
import "./chunk-GZQHMEWL.js";
|
|
15
|
+
import "./chunk-ZCHMJ34K.js";
|
|
16
|
+
import "./chunk-5Q45AVQG.js";
|
|
17
|
+
import "./chunk-ZRDIMBEQ.js";
|
|
18
|
+
import "./chunk-M3LZLQW2.js";
|
|
19
|
+
import "./chunk-5NWQCSKR.js";
|
|
20
|
+
import "./chunk-URD2SLIT.js";
|
|
21
|
+
import "./chunk-5OLJGVCB.js";
|
|
22
|
+
import "./chunk-6UB6NKA3.js";
|
|
23
|
+
import "./chunk-FVDOXRUD.js";
|
|
24
|
+
import "./chunk-OTT6JMPU.js";
|
|
25
|
+
import "./chunk-AY6CAJSL.js";
|
|
26
|
+
import "./chunk-PVCDKGR6.js";
|
|
27
|
+
import "./chunk-OR4L3IB2.js";
|
|
28
|
+
import "./chunk-ZSEZY3II.js";
|
|
29
|
+
import "./chunk-RQ2Q5IYR.js";
|
|
30
|
+
import "./chunk-DDGMHUOW.js";
|
|
31
|
+
import "./chunk-C4O2RSQQ.js";
|
|
32
|
+
import "./chunk-MX3GJNXJ.js";
|
|
33
|
+
import "./chunk-PCIGF2XK.js";
|
|
34
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
35
|
+
import "./chunk-BRJX2PRC.js";
|
|
36
|
+
export {
|
|
37
|
+
createAgentSessionFromServices,
|
|
38
|
+
createAgentSessionServices
|
|
39
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
markStartupMilestone
|
|
4
|
+
} from "./chunk-CCZJ3PYY.js";
|
|
5
|
+
import "./chunk-BRJX2PRC.js";
|
|
6
|
+
|
|
7
|
+
// packages/coding-agent/dist/startup/benchmark-request.js
|
|
8
|
+
import { createHash } from "node:crypto";
|
|
9
|
+
import { createFauxCore, fauxAssistantMessage, fauxToolCall } from "@ashx-j/lunr-ai";
|
|
10
|
+
function prepareBenchmarkRequest(session) {
|
|
11
|
+
session.setSessionName("Startup benchmark");
|
|
12
|
+
let faux = createFauxCore({ provider: "lunr-startup-benchmark" }), toolUrl = process.env.PI_STARTUP_BENCHMARK_TOOL_URL;
|
|
13
|
+
if (toolUrl && new URL(toolUrl).hostname !== "127.0.0.1")
|
|
14
|
+
throw new Error("Startup tool fixture must be local");
|
|
15
|
+
let requestedTool = process.env.PI_STARTUP_BENCHMARK_TOOL, toolCall = toolUrl ? fauxToolCall("fetch_content", { url: toolUrl }) : void 0;
|
|
16
|
+
if (requestedTool === "mcp")
|
|
17
|
+
toolCall = fauxToolCall("mcp", {});
|
|
18
|
+
else if (requestedTool === "subagent")
|
|
19
|
+
toolCall = fauxToolCall("subagent", { action: "status", view: "fleet" });
|
|
20
|
+
else if (requestedTool === "lsp")
|
|
21
|
+
toolCall = fauxToolCall("code_overview", { path: "." });
|
|
22
|
+
else if (requestedTool)
|
|
23
|
+
throw new Error(`Unknown startup fixture tool: ${requestedTool}`);
|
|
24
|
+
return faux.setResponses([
|
|
25
|
+
(context) => {
|
|
26
|
+
markStartupMilestone("first_request_dispatched");
|
|
27
|
+
let expected = session.agent.state.tools.map((tool) => tool.name).sort(), actual = context.tools?.map((tool) => tool.name).sort() ?? [];
|
|
28
|
+
if (JSON.stringify(actual) !== JSON.stringify(expected) || !context.systemPrompt)
|
|
29
|
+
throw new Error("Startup request lost registered tools or instructions");
|
|
30
|
+
let toolSchemaHash = createHash("sha256").update(JSON.stringify(context.tools)).digest("hex");
|
|
31
|
+
return process.stderr.write(`LUNR_STARTUP_REQUEST ${JSON.stringify({ tools: actual, toolSchemaHash, hasSystemPrompt: !0 })}
|
|
32
|
+
`), toolCall ? fauxAssistantMessage([toolCall], { stopReason: "toolUse" }) : fauxAssistantMessage("startup-request-ok");
|
|
33
|
+
},
|
|
34
|
+
(context) => {
|
|
35
|
+
let result = context.messages.at(-1);
|
|
36
|
+
if (result?.role !== "toolResult" || result.isError || result.toolName !== toolCall?.name || toolUrl && !JSON.stringify(result.content).includes("This local article verifies") || requestedTool === "lsp" && !JSON.stringify(result.content).includes("increment"))
|
|
37
|
+
throw new Error(`Startup tool ${toolCall?.name} did not complete its local fixture: ${JSON.stringify(result?.content)}`);
|
|
38
|
+
return markStartupMilestone("first_tool_completed"), fauxAssistantMessage("startup-request-ok");
|
|
39
|
+
}
|
|
40
|
+
]), session.modelRuntime.registerProvider("lunr-startup-benchmark", {
|
|
41
|
+
api: faux.api,
|
|
42
|
+
apiKey: "local-benchmark-only",
|
|
43
|
+
models: faux.models,
|
|
44
|
+
streamSimple: faux.streamSimple
|
|
45
|
+
}), session.agent.state.model = faux.getModel(), async () => {
|
|
46
|
+
await session.prompt(toolCall ? "Use the local startup fixture tool." : "Reply with startup-request-ok. Do not use tools.");
|
|
47
|
+
let last = session.state.messages.at(-1);
|
|
48
|
+
if (last?.role !== "assistant" || last.stopReason === "error" || faux.state.callCount !== (toolCall ? 2 : 1)) {
|
|
49
|
+
let error = new Error(`Startup benchmark did not complete its local provider request: ${last?.role === "assistant" ? last.errorMessage ?? last.stopReason : last?.role}, calls=${faux.state.callCount}`);
|
|
50
|
+
throw console.error(error.message), error;
|
|
51
|
+
}
|
|
52
|
+
markStartupMilestone("first_response_completed");
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
prepareBenchmarkRequest
|
|
57
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
activityMonitor
|
|
4
|
+
} from "./chunk-DAPBPCBP.js";
|
|
5
|
+
import {
|
|
6
|
+
getWebSearchConfigPath
|
|
7
|
+
} from "./chunk-VRB2IYGG.js";
|
|
8
|
+
import "./chunk-BRJX2PRC.js";
|
|
9
|
+
|
|
10
|
+
// packages/coding-agent/dist/builtin-extensions/pi-web-access/brave.js
|
|
11
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
12
|
+
var BRAVE_API_URL = "https://api.search.brave.com/res/v1/web/search", CONFIG_PATH = getWebSearchConfigPath(), SEARCH_TIMEOUT_MS = 3e4, cachedConfig = null;
|
|
13
|
+
function loadConfig() {
|
|
14
|
+
if (cachedConfig)
|
|
15
|
+
return cachedConfig;
|
|
16
|
+
if (!existsSync(CONFIG_PATH))
|
|
17
|
+
return cachedConfig = {}, cachedConfig;
|
|
18
|
+
let raw = readFileSync(CONFIG_PATH, "utf-8");
|
|
19
|
+
try {
|
|
20
|
+
return cachedConfig = JSON.parse(raw), cachedConfig;
|
|
21
|
+
} catch (err) {
|
|
22
|
+
let message = err instanceof Error ? err.message : String(err);
|
|
23
|
+
throw new Error(`Failed to parse ${CONFIG_PATH}: ${message}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function normalizeApiKey(value) {
|
|
27
|
+
if (typeof value != "string")
|
|
28
|
+
return null;
|
|
29
|
+
let normalized = value.trim();
|
|
30
|
+
return normalized.length > 0 ? normalized : null;
|
|
31
|
+
}
|
|
32
|
+
function getApiKey() {
|
|
33
|
+
return normalizeApiKey(process.env.BRAVE_API_KEY) ?? normalizeApiKey(loadConfig().braveApiKey);
|
|
34
|
+
}
|
|
35
|
+
function normalizeCount(value) {
|
|
36
|
+
return typeof value != "number" || !Number.isFinite(value) ? 5 : Math.max(1, Math.min(Math.floor(value), 20));
|
|
37
|
+
}
|
|
38
|
+
function normalizeDomain(value) {
|
|
39
|
+
let input = value.trim().toLowerCase();
|
|
40
|
+
if (!input || (input.startsWith("-") && (input = input.slice(1).trim()), !input))
|
|
41
|
+
return null;
|
|
42
|
+
try {
|
|
43
|
+
input = (input.includes("://") ? new URL(input) : new URL(`https://${input}`)).hostname;
|
|
44
|
+
} catch {
|
|
45
|
+
input = input.split("/")[0]?.split(":")[0] ?? "";
|
|
46
|
+
}
|
|
47
|
+
return input = input.replace(/^\.+|\.+$/g, ""), /^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i.test(input) ? input : null;
|
|
48
|
+
}
|
|
49
|
+
function normalizeDomainFilters(domainFilter) {
|
|
50
|
+
let filters = { allowed: [], blocked: [] };
|
|
51
|
+
if (!domainFilter?.length)
|
|
52
|
+
return filters;
|
|
53
|
+
for (let raw of domainFilter) {
|
|
54
|
+
let domain = normalizeDomain(raw);
|
|
55
|
+
if (!domain)
|
|
56
|
+
continue;
|
|
57
|
+
let target = raw.trim().startsWith("-") ? filters.blocked : filters.allowed;
|
|
58
|
+
target.includes(domain) || target.push(domain);
|
|
59
|
+
}
|
|
60
|
+
return filters;
|
|
61
|
+
}
|
|
62
|
+
function buildBraveQuery(query, domainFilter) {
|
|
63
|
+
let filters = normalizeDomainFilters(domainFilter), parts = [query];
|
|
64
|
+
filters.allowed.length === 1 ? parts.push(`site:${filters.allowed[0]}`) : filters.allowed.length > 1 && parts.push(filters.allowed.map((domain) => `site:${domain}`).join(" OR "));
|
|
65
|
+
for (let domain of filters.blocked)
|
|
66
|
+
parts.push(`NOT site:${domain}`);
|
|
67
|
+
return parts.join(" ");
|
|
68
|
+
}
|
|
69
|
+
function hostMatchesDomain(hostname, domain) {
|
|
70
|
+
return hostname === domain || hostname.endsWith(`.${domain}`);
|
|
71
|
+
}
|
|
72
|
+
function matchesDomainFilters(url, filters) {
|
|
73
|
+
if (filters.allowed.length === 0 && filters.blocked.length === 0)
|
|
74
|
+
return !0;
|
|
75
|
+
let hostname = "";
|
|
76
|
+
try {
|
|
77
|
+
hostname = new URL(url).hostname.toLowerCase();
|
|
78
|
+
} catch {
|
|
79
|
+
return !1;
|
|
80
|
+
}
|
|
81
|
+
return filters.allowed.length > 0 && !filters.allowed.some((domain) => hostMatchesDomain(hostname, domain)) ? !1 : !filters.blocked.some((domain) => hostMatchesDomain(hostname, domain));
|
|
82
|
+
}
|
|
83
|
+
function isBraveAvailable() {
|
|
84
|
+
return !!getApiKey();
|
|
85
|
+
}
|
|
86
|
+
async function searchWithBrave(query, options = {}) {
|
|
87
|
+
let apiKey = getApiKey();
|
|
88
|
+
if (!apiKey)
|
|
89
|
+
throw new Error(`Brave Search API key not found. Either:
|
|
90
|
+
1. Create ${CONFIG_PATH} with { "braveApiKey": "your-key" }
|
|
91
|
+
2. Set BRAVE_API_KEY environment variable
|
|
92
|
+
Get a key at https://brave.com/search/api/`);
|
|
93
|
+
let numResults = normalizeCount(options.numResults), domainFilters = normalizeDomainFilters(options.domainFilter), searchQuery = buildBraveQuery(query, options.domainFilter), activityId = activityMonitor.logStart({ type: "api", query: searchQuery }), params = new URLSearchParams({
|
|
94
|
+
q: searchQuery,
|
|
95
|
+
count: String(options.domainFilter?.length ? 20 : numResults)
|
|
96
|
+
});
|
|
97
|
+
if (options.recencyFilter) {
|
|
98
|
+
let freshness = {
|
|
99
|
+
day: "pd",
|
|
100
|
+
week: "pw",
|
|
101
|
+
month: "pm",
|
|
102
|
+
year: "py"
|
|
103
|
+
}[options.recencyFilter];
|
|
104
|
+
freshness && params.set("freshness", freshness);
|
|
105
|
+
}
|
|
106
|
+
try {
|
|
107
|
+
let response = await fetch(`${BRAVE_API_URL}?${params.toString()}`, {
|
|
108
|
+
method: "GET",
|
|
109
|
+
headers: {
|
|
110
|
+
"X-Subscription-Token": apiKey,
|
|
111
|
+
Accept: "application/json",
|
|
112
|
+
"Accept-Encoding": "gzip"
|
|
113
|
+
},
|
|
114
|
+
signal: options.signal ? AbortSignal.any([AbortSignal.timeout(SEARCH_TIMEOUT_MS), options.signal]) : AbortSignal.timeout(SEARCH_TIMEOUT_MS)
|
|
115
|
+
});
|
|
116
|
+
if (!response.ok) {
|
|
117
|
+
activityMonitor.logError(activityId, `HTTP ${response.status}`);
|
|
118
|
+
let errorText = await response.text();
|
|
119
|
+
throw new Error(`Brave Search API error ${response.status}: ${errorText.slice(0, 300)}`);
|
|
120
|
+
}
|
|
121
|
+
let data = await response.json();
|
|
122
|
+
activityMonitor.logComplete(activityId, response.status);
|
|
123
|
+
let results = [];
|
|
124
|
+
for (let item of data.web?.results ?? [])
|
|
125
|
+
if (!(!item.url || !matchesDomainFilters(item.url, domainFilters)) && (results.push({
|
|
126
|
+
title: item.title || item.url,
|
|
127
|
+
url: item.url,
|
|
128
|
+
snippet: item.description || ""
|
|
129
|
+
}), results.length >= numResults))
|
|
130
|
+
break;
|
|
131
|
+
return { answer: results.map((result) => result.snippet ? `${result.snippet}
|
|
132
|
+
Source: ${result.title} (${result.url})` : `Source: ${result.title} (${result.url})`).join(`
|
|
133
|
+
|
|
134
|
+
`), results };
|
|
135
|
+
} catch (err) {
|
|
136
|
+
let message = err instanceof Error ? err.message : String(err);
|
|
137
|
+
throw message.toLowerCase().includes("abort") ? activityMonitor.logComplete(activityId, 0) : activityMonitor.logError(activityId, message), err;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export {
|
|
141
|
+
isBraveAvailable,
|
|
142
|
+
searchWithBrave
|
|
143
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
DEFERRED_BUILTIN_EXTENSION_NAMES,
|
|
4
|
+
DEFERRED_BUILTIN_FLAGS,
|
|
5
|
+
builtinExtensions,
|
|
6
|
+
lightBuiltinExtensions,
|
|
7
|
+
loadAllBuiltinExtensions,
|
|
8
|
+
loadDeferredBuiltinExtensions
|
|
9
|
+
} from "./chunk-TAP7QTUT.js";
|
|
10
|
+
import "./chunk-PL6JKXWI.js";
|
|
11
|
+
import "./chunk-ZRDIMBEQ.js";
|
|
12
|
+
import "./chunk-M3LZLQW2.js";
|
|
13
|
+
import "./chunk-5OLJGVCB.js";
|
|
14
|
+
import "./chunk-JHYKXIMM.js";
|
|
15
|
+
import "./chunk-H2EOZYMP.js";
|
|
16
|
+
import "./chunk-PVCDKGR6.js";
|
|
17
|
+
import "./chunk-C4O2RSQQ.js";
|
|
18
|
+
import "./chunk-MX3GJNXJ.js";
|
|
19
|
+
import "./chunk-PCIGF2XK.js";
|
|
20
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
21
|
+
import "./chunk-BRJX2PRC.js";
|
|
22
|
+
export {
|
|
23
|
+
DEFERRED_BUILTIN_EXTENSION_NAMES,
|
|
24
|
+
DEFERRED_BUILTIN_FLAGS,
|
|
25
|
+
builtinExtensions,
|
|
26
|
+
lightBuiltinExtensions,
|
|
27
|
+
loadAllBuiltinExtensions,
|
|
28
|
+
loadDeferredBuiltinExtensions
|
|
29
|
+
};
|