@ashx-j/lunr-dev 0.2.16-dev.9.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 +32 -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/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +1 -0
- 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/pi-lsp-extension/src/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js +10 -3
- package/dist/builtin-extensions/pi-lsp-extension/src/index.js.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts +5 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.js +26 -4
- package/dist/builtin-extensions/pi-lsp-extension/src/runtime.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 +37 -27
- package/dist/builtin-extensions/pi-mcp-adapter/index.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-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +52 -23
- 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/tui/render.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +70 -30
- package/dist/builtin-extensions/pi-subagents/src/tui/render.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 +103 -102
- package/dist/builtin-extensions/pi-web-access/index.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/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/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 -1
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +23 -7
- 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/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/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/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/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.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +18 -8
- package/dist/modes/interactive/interactive-mode.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-IFJMSX7Z.js → agent-session-services-RSGP5GDN.js} +15 -12
- package/dist/node-runtime/{builtin-extensions-LYZ3BFWQ.js → builtin-extensions-7STLFW3A.js} +4 -3
- package/dist/node-runtime/chunk-2IDTZAG5.js +1415 -0
- package/dist/node-runtime/{chunk-7NBZ5P7I.js → chunk-4SJWFTUP.js} +1 -1
- package/dist/node-runtime/{chunk-AJX357CL.js → chunk-5NWQCSKR.js} +20 -1013
- package/dist/node-runtime/chunk-5OLJGVCB.js +68 -0
- package/dist/node-runtime/chunk-5Q45AVQG.js +108 -0
- package/dist/node-runtime/{chunk-TQNSPERU.js → chunk-5SQDLSZJ.js} +1 -1
- package/dist/node-runtime/{chunk-F4VQFJI2.js → chunk-6SPPH4FY.js} +4 -4
- package/dist/node-runtime/{chunk-PBC2Y6GS.js → chunk-6UB6NKA3.js} +29 -72
- package/dist/node-runtime/{chunk-A2KQXUJD.js → chunk-7AFOFSDY.js} +1 -1
- package/dist/node-runtime/chunk-BKAZ6BKX.js +2185 -0
- package/dist/node-runtime/{chunk-AHSTJBIB.js → chunk-EH2LJQPM.js} +4 -4
- package/dist/node-runtime/{chunk-N77MY65L.js → chunk-FLYMHKCS.js} +25 -25
- package/dist/node-runtime/{chunk-5P7PZMRU.js → chunk-HRS4HMDX.js} +1 -1
- package/dist/node-runtime/{chunk-IPA627GP.js → chunk-ISQDQIZN.js} +4 -4
- package/dist/node-runtime/{chunk-WJVFOIB5.js → chunk-J7QGQD45.js} +1 -1
- package/dist/node-runtime/{chunk-WOVTOV5P.js → chunk-JT6YCS5B.js} +29 -34
- package/dist/node-runtime/chunk-JZHEUQRL.js +180 -0
- package/dist/node-runtime/{chunk-ZKMFUD3Q.js → chunk-K72NVGUB.js} +3 -3
- package/dist/node-runtime/{chunk-ECD5L7YI.js → chunk-LCACDWHJ.js} +389 -15
- package/dist/node-runtime/{chunk-2QKLKMKC.js → chunk-LTXUQJI4.js} +1 -1
- package/dist/node-runtime/{chunk-MKKH27PH.js → chunk-LWJXTA6Z.js} +274 -2416
- package/dist/node-runtime/{chunk-EDBJNRSM.js → chunk-MGSB2C3M.js} +1 -1
- package/dist/node-runtime/{chunk-CDFZEWPU.js → chunk-MUMMMTW4.js} +6 -2
- package/dist/node-runtime/{chunk-YF63P5ZT.js → chunk-OTT6JMPU.js} +10 -67
- package/dist/node-runtime/{chunk-PGAJ5MO5.js → chunk-T5GM5BFH.js} +1 -1
- package/dist/node-runtime/{chunk-PCGNAY2O.js → chunk-TAP7QTUT.js} +38 -16
- package/dist/node-runtime/{chunk-4TLO4PO2.js → chunk-U6C7VTR5.js} +7 -1401
- package/dist/node-runtime/chunk-URD2SLIT.js +1019 -0
- package/dist/node-runtime/{chunk-QH42CDX3.js → chunk-W7S2REEG.js} +111 -84
- package/dist/node-runtime/{chunk-LZAW4ZX3.js → chunk-ZRDIMBEQ.js} +27 -9
- package/dist/node-runtime/{chunk-AD6VXAO7.js → chunk-ZSEZY3II.js} +5 -100
- package/dist/node-runtime/cli-runtime.js +1 -1
- package/dist/node-runtime/{command-L3LAHDIH.js → command-6UXQ6XZN.js} +1 -1
- package/dist/node-runtime/{commands-RL5YBW5I.js → commands-LGR5VT5X.js} +6 -4
- package/dist/node-runtime/{direct-tool-executor-JVDXTO7A.js → direct-tool-executor-TDJS7TBD.js} +9 -6
- package/dist/node-runtime/{export-html-KR26FOUZ.js → export-html-E4DT6ZJQ.js} +1 -1
- package/dist/node-runtime/{extract-XLQSJN4V.js → extract-IUCVZCWC.js} +2 -2
- package/dist/node-runtime/{gateway-X2TI5X7F.js → gateway-3OLC4GQN.js} +22 -367
- package/dist/node-runtime/{gemini-search-U7SUMPQA.js → gemini-search-NCIDF7NE.js} +1 -1
- package/dist/node-runtime/{gemini-url-context-PXWCBQHK.js → gemini-url-context-OKIN7AIP.js} +2 -2
- package/dist/node-runtime/image-resize-6ZPBFMWW.js +11 -0
- package/dist/node-runtime/index.js +53 -49
- package/dist/node-runtime/{init-NJV2T55N.js → init-EKE277AG.js} +6 -4
- package/dist/node-runtime/{interactive-mode-KOM35YF2.js → interactive-mode-S5M26CQ7.js} +20 -17
- package/dist/node-runtime/{interactive-view-U6OILKF3.js → interactive-view-N6F4KUIT.js} +3 -5
- package/dist/node-runtime/lunr-computer-use-4X3KUNF4.js +206 -0
- package/dist/node-runtime/{lunr-cron-YJ5UHYRD.js → lunr-cron-KKBOGAEF.js} +7 -1
- package/dist/node-runtime/main.js +24 -21
- package/dist/node-runtime/{mcp-auth-flow-QIXHW6QN.js → mcp-auth-flow-YL6RWPYG.js} +2 -1
- package/dist/node-runtime/{package-manager-cli-TZZHJCVI.js → package-manager-cli-C4EJOO5Q.js} +8 -6
- package/dist/node-runtime/{pi-mcp-adapter-QFB37AVN.js → pi-mcp-adapter-DPTJGAAL.js} +33 -27
- package/dist/node-runtime/{pi-subagents-7XJ4H53P.js → pi-subagents-VKCLYIBY.js} +103 -76
- package/dist/node-runtime/{pi-web-access-DPGAVKOA.js → pi-web-access-BV6DSZOP.js} +72 -69
- package/dist/node-runtime/{proxy-modes-HEEFK4KC.js → proxy-modes-R64LU6WZ.js} +12 -9
- package/dist/node-runtime/rpc-entry.js +24 -21
- package/dist/node-runtime/runtime-3SB5ATHQ.js +21 -0
- package/dist/node-runtime/{runtime-bridges-PPHNBFWL.js → runtime-bridges-UJ5WJJLN.js} +3 -3
- package/dist/node-runtime/{session-manager-MQNBYACL.js → session-manager-QEMZBMTM.js} +3 -5
- package/dist/node-runtime/{session-selector-5AZLJS6U.js → session-selector-URVJLOTK.js} +2 -2
- package/dist/node-runtime/{settings-manager-5LF2VQWC.js → settings-manager-K6IPIQTI.js} +3 -1
- package/dist/node-runtime/{src-Y7JSCK64.js → src-GPFAU3N6.js} +30 -10
- package/dist/node-runtime/{subagent-executor-5RNDEPIJ.js → subagent-executor-EFLTO32A.js} +39 -21
- package/dist/node-runtime/{update-cli-A253SZ7P.js → update-cli-I6OVDRPL.js} +3 -1
- package/dist/node-runtime/{video-extract-OYT5WKS5.js → video-extract-ETA5RA7U.js} +2 -2
- package/dist/node-runtime/workflow-SA34S4VX.js +325 -0
- package/dist/node-runtime/{youtube-extract-TQYKGFGS.js → youtube-extract-SRVGNN26.js} +2 -2
- 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/interactive-view.d.ts.map +1 -1
- package/dist/startup/interactive-view.js +1 -2
- package/dist/startup/interactive-view.js.map +1 -1
- package/docs/computer-use.md +277 -0
- package/docs/development.md +0 -32
- package/docs/features.md +2 -2
- package/docs/interactive-startup.md +10 -3
- package/docs/keybindings.md +2 -2
- package/docs/terminal-setup.md +1 -1
- package/docs/usage.md +1 -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/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 +16 -10
- package/dist/startup/interactive-shell.d.ts +0 -55
- package/dist/startup/interactive-shell.d.ts.map +0 -1
- package/dist/startup/interactive-shell.js +0 -264
- package/dist/startup/interactive-shell.js.map +0 -1
- package/dist/node-runtime/{chunk-YSKSB3BJ.js → chunk-CH6OL6P2.js} +2 -2
- package/dist/node-runtime/{chunk-VSELYKWU.js → chunk-EHMBW7FA.js} +3 -3
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
isRollbackSessionForceEnabled,
|
|
8
8
|
registerUsageServiceBridge
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
registerCustomizeBridge
|
|
12
|
-
} from "./chunk-HQCKFM2O.js";
|
|
9
|
+
} from "./chunk-OTT6JMPU.js";
|
|
13
10
|
import {
|
|
14
11
|
registerMemoryCapBridge
|
|
15
12
|
} from "./chunk-AY6CAJSL.js";
|
|
13
|
+
import {
|
|
14
|
+
registerCustomizeBridge
|
|
15
|
+
} from "./chunk-HQCKFM2O.js";
|
|
16
16
|
|
|
17
17
|
// packages/coding-agent/dist/core/settings-tools-bridge.js
|
|
18
18
|
var SETTINGS_TOOLS_BRIDGE_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/settings-tools"), activeSettingsManager, sessionIdProvider;
|
|
@@ -2,7 +2,7 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
|
|
|
2
2
|
import {
|
|
3
3
|
lightBuiltinExtensions,
|
|
4
4
|
loadAllBuiltinExtensions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TAP7QTUT.js";
|
|
6
6
|
import {
|
|
7
7
|
createProjectTrustContext,
|
|
8
8
|
createStartupTui,
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
showFirstTimeSetup,
|
|
12
12
|
showStartupSelector,
|
|
13
13
|
startStartupTui
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ISQDQIZN.js";
|
|
15
15
|
import {
|
|
16
16
|
ProjectTrustStore,
|
|
17
17
|
hasTrustRequiringProjectResources
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LTXUQJI4.js";
|
|
19
19
|
import {
|
|
20
20
|
applyInheritedSubagentPermissions
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MGSB2C3M.js";
|
|
22
22
|
import {
|
|
23
23
|
MissingSessionCwdError,
|
|
24
24
|
createAgentSessionFromServices,
|
|
@@ -27,22 +27,22 @@ import {
|
|
|
27
27
|
formatMissingSessionCwdPrompt,
|
|
28
28
|
formatNoModelsAvailableMessage,
|
|
29
29
|
getMissingSessionCwdIssue
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
resolveCliModel,
|
|
33
|
-
resolveModelScope
|
|
34
|
-
} from "./chunk-TQNSPERU.js";
|
|
30
|
+
} from "./chunk-JT6YCS5B.js";
|
|
35
31
|
import {
|
|
36
32
|
restoreStdout,
|
|
37
33
|
takeOverStdout
|
|
38
34
|
} from "./chunk-OBMWP3I5.js";
|
|
35
|
+
import {
|
|
36
|
+
resolveCliModel,
|
|
37
|
+
resolveModelScope
|
|
38
|
+
} from "./chunk-5SQDLSZJ.js";
|
|
39
39
|
import {
|
|
40
40
|
detectSupportedImageMimeTypeFromFile,
|
|
41
41
|
resolveReadPath
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-K72NVGUB.js";
|
|
43
43
|
import {
|
|
44
44
|
processImage
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-5Q45AVQG.js";
|
|
46
46
|
import {
|
|
47
47
|
migrateLegacyGlobalInstructions
|
|
48
48
|
} from "./chunk-M3LZLQW2.js";
|
|
@@ -50,17 +50,20 @@ import {
|
|
|
50
50
|
SettingsManager,
|
|
51
51
|
applyHttpProxySettings,
|
|
52
52
|
configureHttpDispatcher
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-5NWQCSKR.js";
|
|
54
54
|
import {
|
|
55
55
|
SessionManager,
|
|
56
56
|
assertValidSessionId
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-6UB6NKA3.js";
|
|
58
58
|
import {
|
|
59
59
|
bindRuntimeBridges
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-EH2LJQPM.js";
|
|
61
61
|
import {
|
|
62
62
|
registerModelTierBridge
|
|
63
63
|
} from "./chunk-W3CVH5RX.js";
|
|
64
|
+
import {
|
|
65
|
+
registerMemoryCapBridge
|
|
66
|
+
} from "./chunk-AY6CAJSL.js";
|
|
64
67
|
import {
|
|
65
68
|
printTimings,
|
|
66
69
|
resetTimings,
|
|
@@ -69,9 +72,6 @@ import {
|
|
|
69
72
|
import {
|
|
70
73
|
registerCustomizeBridge
|
|
71
74
|
} from "./chunk-HQCKFM2O.js";
|
|
72
|
-
import {
|
|
73
|
-
registerMemoryCapBridge
|
|
74
|
-
} from "./chunk-AY6CAJSL.js";
|
|
75
75
|
import {
|
|
76
76
|
parseArgs,
|
|
77
77
|
printHelp
|
|
@@ -81,11 +81,11 @@ import {
|
|
|
81
81
|
} from "./chunk-CCZJ3PYY.js";
|
|
82
82
|
import {
|
|
83
83
|
SessionSelectorComponent
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-HRS4HMDX.js";
|
|
85
85
|
import {
|
|
86
86
|
KeybindingsManager,
|
|
87
87
|
migrateKeybindingsConfig
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-CH6OL6P2.js";
|
|
89
89
|
import {
|
|
90
90
|
initTheme,
|
|
91
91
|
stopThemeWatcher
|
|
@@ -725,12 +725,12 @@ async function main(args, options) {
|
|
|
725
725
|
return;
|
|
726
726
|
}
|
|
727
727
|
if (args[0] === "update") {
|
|
728
|
-
let { handleUpdateCli } = await import("./update-cli-
|
|
728
|
+
let { handleUpdateCli } = await import("./update-cli-I6OVDRPL.js");
|
|
729
729
|
if (await handleUpdateCli(args))
|
|
730
730
|
return;
|
|
731
731
|
}
|
|
732
732
|
if (["install", "remove", "uninstall", "list", "config"].includes(args[0])) {
|
|
733
|
-
let { handleConfigCommand, handlePackageCommand } = await import("./package-manager-cli-
|
|
733
|
+
let { handleConfigCommand, handlePackageCommand } = await import("./package-manager-cli-C4EJOO5Q.js");
|
|
734
734
|
if (await handlePackageCommand(args, { extensionFactories: options?.extensionFactories })) {
|
|
735
735
|
process.exit(process.exitCode ?? 0);
|
|
736
736
|
return;
|
|
@@ -739,7 +739,7 @@ async function main(args, options) {
|
|
|
739
739
|
return;
|
|
740
740
|
}
|
|
741
741
|
if (args[0] === "gateway") {
|
|
742
|
-
let { handleGatewayCommand } = await import("./command-
|
|
742
|
+
let { handleGatewayCommand } = await import("./command-6UXQ6XZN.js");
|
|
743
743
|
if (await handleGatewayCommand(args))
|
|
744
744
|
return;
|
|
745
745
|
}
|
|
@@ -754,7 +754,7 @@ async function main(args, options) {
|
|
|
754
754
|
if (time("parseArgs"), parsed.version && (console.log(VERSION), process.exit(0)), parsed.export) {
|
|
755
755
|
let result;
|
|
756
756
|
try {
|
|
757
|
-
let { exportFromFile } = await import("./export-html-
|
|
757
|
+
let { exportFromFile } = await import("./export-html-E4DT6ZJQ.js"), outputPath = parsed.messages.length > 0 ? parsed.messages[0] : void 0;
|
|
758
758
|
result = await exportFromFile(parsed.export, outputPath);
|
|
759
759
|
} catch (error) {
|
|
760
760
|
let message = error instanceof Error ? error.message : "Failed to export session";
|
|
@@ -762,7 +762,7 @@ async function main(args, options) {
|
|
|
762
762
|
}
|
|
763
763
|
console.log(`Exported to: ${result}`), process.exit(0);
|
|
764
764
|
}
|
|
765
|
-
let appMode = resolveAppMode(parsed, process.stdin.isTTY, process.stdout.isTTY), interactiveModeImport = appMode === "interactive" ? import("./interactive-mode-
|
|
765
|
+
let appMode = resolveAppMode(parsed, process.stdin.isTTY, process.stdout.isTTY), interactiveModeImport = appMode === "interactive" ? import("./interactive-mode-S5M26CQ7.js") : void 0, startupView = appMode === "interactive" ? options?.startupView : void 0;
|
|
766
766
|
options?.startupView && !startupView && options.startupView.stop(), applyInheritedSubagentPermissions(), appMode !== "interactive" && !isPlainRuntimeMetadataCommand(parsed) && takeOverStdout(), parsed.mode === "rpc" && parsed.fileArgs.length > 0 && (console.error(chalk4.red("Error: @file arguments are not supported in RPC mode")), process.exit(1)), validateForkFlags(parsed), validateSessionIdFlags(parsed);
|
|
767
767
|
let { migratedAuthProviders: migratedProviders, deprecationWarnings } = runMigrations(cwd);
|
|
768
768
|
time("runMigrations");
|
|
@@ -924,7 +924,7 @@ ${EXTENSION_LOAD_FAILURE_HINT}` : "";
|
|
|
924
924
|
} else if (appMode === "interactive") {
|
|
925
925
|
let [{ InteractiveMode }, { loadDeferredBuiltinExtensions }] = await Promise.all([
|
|
926
926
|
interactiveModeImport,
|
|
927
|
-
import("./builtin-extensions-
|
|
927
|
+
import("./builtin-extensions-7STLFW3A.js")
|
|
928
928
|
]), interactiveMode = new InteractiveMode(runtime, {
|
|
929
929
|
migratedProviders,
|
|
930
930
|
modelFallbackMessage,
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
areExperimentalFeaturesEnabled,
|
|
4
4
|
getProjectTrustOptions,
|
|
5
5
|
hasTrustRequiringProjectResources
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LTXUQJI4.js";
|
|
7
7
|
import {
|
|
8
8
|
DefaultPackageManager,
|
|
9
9
|
emitProjectTrustEvent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-T5GM5BFH.js";
|
|
11
11
|
import {
|
|
12
12
|
SettingsManager
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5NWQCSKR.js";
|
|
14
14
|
import {
|
|
15
15
|
ExtensionSelectorComponent
|
|
16
16
|
} from "./chunk-MJQDX3BA.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-MGWCVY6Y.js";
|
|
20
20
|
import {
|
|
21
21
|
KeybindingsManager
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CH6OL6P2.js";
|
|
23
23
|
import {
|
|
24
24
|
DynamicBorder
|
|
25
25
|
} from "./chunk-3GHXVUAK.js";
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
DefaultResourceLoader,
|
|
4
|
+
ExtensionRunner,
|
|
5
|
+
createSyntheticSourceInfo,
|
|
6
|
+
emitSessionShutdownEvent,
|
|
7
|
+
expandPromptTemplate,
|
|
8
|
+
formatSkillsForPrompt
|
|
9
|
+
} from "./chunk-T5GM5BFH.js";
|
|
2
10
|
import {
|
|
3
11
|
DEFAULT_THINKING_LEVEL,
|
|
4
12
|
calculateContextTokens,
|
|
@@ -10,15 +18,7 @@ import {
|
|
|
10
18
|
generateBranchSummary,
|
|
11
19
|
prepareCompaction,
|
|
12
20
|
shouldCompact
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import {
|
|
15
|
-
DefaultResourceLoader,
|
|
16
|
-
ExtensionRunner,
|
|
17
|
-
createSyntheticSourceInfo,
|
|
18
|
-
emitSessionShutdownEvent,
|
|
19
|
-
expandPromptTemplate,
|
|
20
|
-
formatSkillsForPrompt
|
|
21
|
-
} from "./chunk-PGAJ5MO5.js";
|
|
21
|
+
} from "./chunk-5SQDLSZJ.js";
|
|
22
22
|
import {
|
|
23
23
|
stripFrontmatter
|
|
24
24
|
} from "./chunk-QFWG2RVL.js";
|
|
@@ -27,14 +27,7 @@ import {
|
|
|
27
27
|
createLocalBashOperations,
|
|
28
28
|
createToolDefinitionFromAgentTool,
|
|
29
29
|
wrapToolDefinition
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
gateToolCall
|
|
33
|
-
} from "./chunk-LZAW4ZX3.js";
|
|
34
|
-
import {
|
|
35
|
-
isUserInstructionsPath,
|
|
36
|
-
loadSelectedUserInstructions
|
|
37
|
-
} from "./chunk-M3LZLQW2.js";
|
|
30
|
+
} from "./chunk-K72NVGUB.js";
|
|
38
31
|
import {
|
|
39
32
|
DEFAULT_MAX_BYTES,
|
|
40
33
|
truncateTail
|
|
@@ -47,29 +40,38 @@ import {
|
|
|
47
40
|
sanitizeBinaryOutput
|
|
48
41
|
} from "./chunk-ZCHMJ34K.js";
|
|
49
42
|
import {
|
|
50
|
-
|
|
43
|
+
gateToolCall
|
|
44
|
+
} from "./chunk-ZRDIMBEQ.js";
|
|
45
|
+
import {
|
|
46
|
+
isUserInstructionsPath,
|
|
47
|
+
loadSelectedUserInstructions
|
|
48
|
+
} from "./chunk-M3LZLQW2.js";
|
|
49
|
+
import {
|
|
50
|
+
SettingsManager
|
|
51
|
+
} from "./chunk-5NWQCSKR.js";
|
|
52
|
+
import {
|
|
51
53
|
require_proper_lockfile
|
|
52
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-URD2SLIT.js";
|
|
53
55
|
import {
|
|
54
56
|
CURRENT_SESSION_VERSION,
|
|
55
57
|
SessionManager,
|
|
56
58
|
getDefaultSessionDir,
|
|
57
59
|
getLatestCompactionEntry
|
|
58
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-6UB6NKA3.js";
|
|
59
61
|
import {
|
|
60
62
|
convertToLlm
|
|
61
63
|
} from "./chunk-FVDOXRUD.js";
|
|
62
64
|
import {
|
|
63
65
|
clearPlanUsageCache,
|
|
64
66
|
rollbackSnapshotBeforeWrite
|
|
65
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-OTT6JMPU.js";
|
|
68
|
+
import {
|
|
69
|
+
MEMORY_TOOL_NAMES
|
|
70
|
+
} from "./chunk-AY6CAJSL.js";
|
|
66
71
|
import {
|
|
67
72
|
measureStartup,
|
|
68
73
|
time
|
|
69
74
|
} from "./chunk-PVCDKGR6.js";
|
|
70
|
-
import {
|
|
71
|
-
MEMORY_TOOL_NAMES
|
|
72
|
-
} from "./chunk-AY6CAJSL.js";
|
|
73
75
|
import {
|
|
74
76
|
getThemeByName,
|
|
75
77
|
theme
|
|
@@ -2420,15 +2422,8 @@ var ModelRuntime = class _ModelRuntime {
|
|
|
2420
2422
|
this.models = createModels({ credentials, modelsStore }), this.rebuildProviders();
|
|
2421
2423
|
}
|
|
2422
2424
|
static async create(options = {}) {
|
|
2423
|
-
return _ModelRuntime.createInternal(options, !0);
|
|
2424
|
-
}
|
|
2425
|
-
/** @internal Agent-session hydration registers extension providers before the first refresh. */
|
|
2426
|
-
static async createForAgentSession(options = {}) {
|
|
2427
|
-
return _ModelRuntime.createInternal(options, !1);
|
|
2428
|
-
}
|
|
2429
|
-
static async createInternal(options, refreshOnCreate) {
|
|
2430
2425
|
let rawStore = options.credentials ?? AuthStorage.create(options.authPath), grokHomeDisabled = options.grokHome === null || options.grokHome === void 0 && options.credentials !== void 0, grokHome = grokHomeDisabled ? void 0 : options.grokHome ?? void 0, baseStore = grokHomeDisabled ? rawStore : wrapXaiGrokCliCredentials(rawStore, { grokHome }), credentials = new RuntimeCredentials(baseStore), subscriptionManager = options.subscriptions ?? (options.credentials && !options.authPath ? SubscriptionManager.inMemory(baseStore) : SubscriptionManager.create(baseStore, options.authPath ? join7(dirname5(options.authPath), "subscriptions.json") : void 0)), modelsPath = options.modelsPath === null ? void 0 : options.modelsPath ?? join7(getAgentDir(), "models.json"), config = await ModelConfig.load(modelsPath), modelsStore = options.modelsStore ?? (modelsPath ? new FileModelsStore(options.modelsStorePath ?? join7(dirname5(modelsPath), "models-store.json")) : new InMemoryCodingAgentModelsStore()), providers = builtinProviderCatalog.builtinProviders(), catalogDir = modelsPath ? dirname5(modelsPath) : options.authPath ? dirname5(options.authPath) : void 0, runtime = new _ModelRuntime(credentials, config, modelsPath, modelsStore, providers, options.allowModelNetwork ?? process.env.PI_OFFLINE === void 0, subscriptionManager, catalogDir, grokHome);
|
|
2431
|
-
return runtime.configureRadiusProviders(), runtime.rebuildProviders(),
|
|
2426
|
+
return runtime.configureRadiusProviders(), runtime.rebuildProviders(), await runtime.refresh({ allowNetwork: !1 }), runtime;
|
|
2432
2427
|
}
|
|
2433
2428
|
configureRadiusProviders() {
|
|
2434
2429
|
this.builtins.clear();
|
|
@@ -5095,7 +5090,7 @@ ${command}` : command;
|
|
|
5095
5090
|
*/
|
|
5096
5091
|
async exportToHtml(outputPath) {
|
|
5097
5092
|
let [{ exportSessionToHtml }, { createToolHtmlRenderer }] = await Promise.all([
|
|
5098
|
-
import("./export-html-
|
|
5093
|
+
import("./export-html-E4DT6ZJQ.js"),
|
|
5099
5094
|
import("./tool-renderer-MV5O452K.js")
|
|
5100
5095
|
]), configuredThemeName = this.settingsManager.getTheme(), themeName = configuredThemeName && getThemeByName(configuredThemeName) ? configuredThemeName : void 0, toolRenderer = createToolHtmlRenderer({
|
|
5101
5096
|
getToolDefinition: (name) => this.getToolDefinition(name),
|
|
@@ -5576,7 +5571,7 @@ function applyExtensionFlagValues(resourceLoader, extensionFlagValues) {
|
|
|
5576
5571
|
}), diagnostics;
|
|
5577
5572
|
}
|
|
5578
5573
|
async function createAgentSessionServices(options) {
|
|
5579
|
-
let cwd = resolvePath(options.cwd), agentDir = options.agentDir ? resolvePath(options.agentDir) : getAgentDir(), modelRuntime = options.modelRuntime ?? await ModelRuntime.
|
|
5574
|
+
let cwd = resolvePath(options.cwd), agentDir = options.agentDir ? resolvePath(options.agentDir) : getAgentDir(), modelRuntime = options.modelRuntime ?? await ModelRuntime.create({
|
|
5580
5575
|
authPath: join13(agentDir, "auth.json"),
|
|
5581
5576
|
modelsPath: join13(agentDir, "models.json")
|
|
5582
5577
|
});
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
require_proper_lockfile
|
|
4
|
+
} from "./chunk-URD2SLIT.js";
|
|
5
|
+
import {
|
|
6
|
+
getPackageDir
|
|
7
|
+
} from "./chunk-PCIGF2XK.js";
|
|
8
|
+
import {
|
|
9
|
+
__toESM
|
|
10
|
+
} from "./chunk-BRJX2PRC.js";
|
|
11
|
+
|
|
12
|
+
// packages/coding-agent/dist/core/computer-use/runtime.js
|
|
13
|
+
var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
|
|
14
|
+
import { execFile } from "node:child_process";
|
|
15
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
16
|
+
import { createReadStream } from "node:fs";
|
|
17
|
+
import { lstat, mkdir, readdir, readFile, readlink, realpath, rename, rm } from "node:fs/promises";
|
|
18
|
+
import { createRequire } from "node:module";
|
|
19
|
+
import { userInfo } from "node:os";
|
|
20
|
+
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
21
|
+
import { promisify } from "node:util";
|
|
22
|
+
|
|
23
|
+
// packages/coding-agent/dist/core/computer-use/release.generated.js
|
|
24
|
+
var computerRelease = {
|
|
25
|
+
version: "0.28.1",
|
|
26
|
+
tag: "cua-driver-rs-v0.28.1",
|
|
27
|
+
sourceCommit: "d8028a7943087ee258dc1b4d19dc12a7cd27669c",
|
|
28
|
+
repository: "https://github.com/trycua/cua",
|
|
29
|
+
prerelease: !0,
|
|
30
|
+
approval: "development-only; production release not approved",
|
|
31
|
+
artifacts: [
|
|
32
|
+
{
|
|
33
|
+
platform: "win32",
|
|
34
|
+
arch: "x64",
|
|
35
|
+
packageName: "@ashx-j/lunr-computer-win32-x64",
|
|
36
|
+
name: "cua-driver-rs-0.28.1-windows-x86_64-binary.zip",
|
|
37
|
+
bytes: 28930759,
|
|
38
|
+
sha256: "ab90418a54f84102f549cde4537daef3a0e20ba8254b7e24524a50fc5f4174d3"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
platform: "win32",
|
|
42
|
+
arch: "arm64",
|
|
43
|
+
packageName: "@ashx-j/lunr-computer-win32-arm64",
|
|
44
|
+
name: "cua-driver-rs-0.28.1-windows-arm64-binary.zip",
|
|
45
|
+
bytes: 27246194,
|
|
46
|
+
sha256: "d260e6110e029680d543d317f3c3c09569475f8d65855fcedda202e2ee989bf0"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
platform: "darwin",
|
|
50
|
+
arch: "arm64",
|
|
51
|
+
packageName: "@ashx-j/lunr-computer-darwin-arm64",
|
|
52
|
+
name: "cua-driver-rs-0.28.1-darwin-arm64.tar.gz",
|
|
53
|
+
bytes: 70074352,
|
|
54
|
+
sha256: "b3cb3781feb9855dfcdd616bc5c9c8e627453e3e16a073c1446326691a549b24"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// packages/coding-agent/dist/core/computer-use/runtime.js
|
|
60
|
+
var exec = promisify(execFile), CUA_VERSION = computerRelease.version;
|
|
61
|
+
async function resolveRuntimeArchive(packageDirectory = getPackageDir(), platform = process.platform, arch = process.arch) {
|
|
62
|
+
let payload = computerRelease.artifacts.find((item) => item.platform === platform && item.arch === arch);
|
|
63
|
+
if (!payload)
|
|
64
|
+
throw new Error("Computer use is unsupported on this platform or architecture.");
|
|
65
|
+
let archive = join(packageDirectory, "native", "computer-use", payload.name);
|
|
66
|
+
try {
|
|
67
|
+
await lstat(archive);
|
|
68
|
+
} catch (error) {
|
|
69
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT"))
|
|
70
|
+
throw error;
|
|
71
|
+
let manifestPath;
|
|
72
|
+
try {
|
|
73
|
+
manifestPath = createRequire(join(packageDirectory, "package.json")).resolve(`${payload.packageName}/package.json`);
|
|
74
|
+
} catch {
|
|
75
|
+
throw new Error("Computer-use payload is missing. Reinstall lunR with optional dependencies enabled. No runtime was downloaded.");
|
|
76
|
+
}
|
|
77
|
+
let manifest = JSON.parse(await readFile(manifestPath, "utf8")), cli = JSON.parse(await readFile(join(packageDirectory, "package.json"), "utf8"));
|
|
78
|
+
if (manifest.name !== payload.packageName || manifest.version !== cli.version)
|
|
79
|
+
throw new Error("Computer-use payload package version does not match lunR. Reinstall lunR with optional dependencies enabled.");
|
|
80
|
+
archive = join(dirname(manifestPath), payload.name);
|
|
81
|
+
}
|
|
82
|
+
let info = await lstat(archive);
|
|
83
|
+
if (!info.isFile() || info.isSymbolicLink() || info.size !== payload.bytes)
|
|
84
|
+
throw new Error("Bundled computer-use archive is not a regular file of the pinned size.");
|
|
85
|
+
return { archive, sha256: payload.sha256 };
|
|
86
|
+
}
|
|
87
|
+
function runtimeEnvironment(inherited = process.env) {
|
|
88
|
+
return {
|
|
89
|
+
...Object.fromEntries(Object.entries(inherited).filter((entry) => entry[1] !== void 0 && !entry[0].toUpperCase().startsWith("CUA_"))),
|
|
90
|
+
CUA_DRIVER_RS_TELEMETRY_ENABLED: "false",
|
|
91
|
+
CUA_DRIVER_RS_UPDATE_CHECK: "false",
|
|
92
|
+
CUA_DRIVER_PERMISSION_MODE: "standard",
|
|
93
|
+
CUA_DRIVER_DISABLE_UNRESTRICTED: "true"
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
async function digest(path, signal) {
|
|
97
|
+
let hash = createHash("sha256");
|
|
98
|
+
for await (let chunk of createReadStream(path, { signal }))
|
|
99
|
+
hash.update(chunk);
|
|
100
|
+
return hash.digest("hex");
|
|
101
|
+
}
|
|
102
|
+
async function assertOwnedPath(path) {
|
|
103
|
+
let current = resolve(path);
|
|
104
|
+
for (; ; ) {
|
|
105
|
+
try {
|
|
106
|
+
if ((await lstat(current)).isSymbolicLink() || resolve(await realpath(current)).toLowerCase() !== current.toLowerCase())
|
|
107
|
+
throw new Error(`Computer runtime path redirects elsewhere: ${current}`);
|
|
108
|
+
} catch (error) {
|
|
109
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT"))
|
|
110
|
+
throw error;
|
|
111
|
+
}
|
|
112
|
+
let parent = dirname(current);
|
|
113
|
+
if (parent === current)
|
|
114
|
+
return;
|
|
115
|
+
current = parent;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async function runtimeInventory(root, signal) {
|
|
119
|
+
let inventory = {};
|
|
120
|
+
async function walk(path) {
|
|
121
|
+
for (let item of await readdir(path, { withFileTypes: !0 })) {
|
|
122
|
+
let entry = join(path, item.name), key = relative(root, entry);
|
|
123
|
+
if (item.isSymbolicLink()) {
|
|
124
|
+
let target = await readlink(entry), resolved = relative(root, resolve(dirname(entry), target));
|
|
125
|
+
if (isAbsolute(target) || resolved === ".." || resolved.startsWith(`..${process.platform === "win32" ? "\\" : "/"}`) || isAbsolute(resolved))
|
|
126
|
+
throw new Error("Runtime symlink escapes its bundle.");
|
|
127
|
+
inventory[key] = `link:${target}`;
|
|
128
|
+
} else if (item.isDirectory())
|
|
129
|
+
await assertOwnedPath(entry), inventory[key] = "directory", await walk(entry);
|
|
130
|
+
else if (item.isFile())
|
|
131
|
+
await assertOwnedPath(entry), inventory[key] = await digest(entry, signal);
|
|
132
|
+
else
|
|
133
|
+
throw new Error("Unexpected runtime filesystem entry.");
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return await walk(root), Object.fromEntries(Object.entries(inventory).sort(([a], [b]) => a.localeCompare(b)));
|
|
137
|
+
}
|
|
138
|
+
async function installRuntime(signal) {
|
|
139
|
+
signal?.throwIfAborted();
|
|
140
|
+
let platform = `${process.platform}-${process.arch}`, { archive, sha256 } = await resolveRuntimeArchive();
|
|
141
|
+
if (process.platform === "win32" && process.env.SESSIONNAME === "Services")
|
|
142
|
+
throw new Error("Computer use requires a logged-in interactive desktop.");
|
|
143
|
+
if (await digest(archive, signal) !== sha256)
|
|
144
|
+
throw new Error("Bundled computer-use archive failed SHA-256 verification.");
|
|
145
|
+
let root = join(userInfo().homedir, ".lunr", "desktop");
|
|
146
|
+
await assertOwnedPath(root), await mkdir(root, { recursive: !0, mode: 448 });
|
|
147
|
+
let release = await import_proper_lockfile.default.lock(root, { retries: 0, stale: 12e4 }), temporary = join(root, `extract-${randomUUID()}`), destination = join(root, `runtime-${platform}`);
|
|
148
|
+
try {
|
|
149
|
+
await assertOwnedPath(destination), await mkdir(temporary, { mode: 448 }), await exec(process.platform === "win32" ? join(process.env.SystemRoot ?? "C:\\Windows", "System32", "tar.exe") : "/usr/bin/tar", ["-xf", archive, "-C", temporary], {
|
|
150
|
+
timeout: 3e4,
|
|
151
|
+
windowsHide: !0,
|
|
152
|
+
signal
|
|
153
|
+
});
|
|
154
|
+
let extracted = process.platform === "darwin" ? join(temporary, `cua-driver-rs-${CUA_VERSION}-darwin-arm64`) : temporary, expected = await runtimeInventory(extracted, signal);
|
|
155
|
+
try {
|
|
156
|
+
if (await lstat(destination), JSON.stringify(await runtimeInventory(destination, signal)) !== JSON.stringify(expected))
|
|
157
|
+
throw new Error("Cached computer runtime differs from the verified archive. Remove the inactive lunR runtime directory before reinstalling; it was not executed or overwritten.");
|
|
158
|
+
} catch (error) {
|
|
159
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT"))
|
|
160
|
+
throw error;
|
|
161
|
+
await rename(extracted, destination);
|
|
162
|
+
}
|
|
163
|
+
if (signal?.throwIfAborted(), process.platform === "darwin") {
|
|
164
|
+
let app = join(destination, "CuaDriver.app");
|
|
165
|
+
return await exec("/usr/bin/codesign", ["--verify", "--deep", "--strict", app], { timeout: 15e3, signal }), { app, command: join(app, "Contents", "MacOS", "cua-driver") };
|
|
166
|
+
}
|
|
167
|
+
return { command: join(destination, "cua-driver.exe") };
|
|
168
|
+
} finally {
|
|
169
|
+
await rm(temporary, { recursive: !0, force: !0 }), await release();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export {
|
|
174
|
+
CUA_VERSION,
|
|
175
|
+
resolveRuntimeArchive,
|
|
176
|
+
runtimeEnvironment,
|
|
177
|
+
assertOwnedPath,
|
|
178
|
+
runtimeInventory,
|
|
179
|
+
installRuntime
|
|
180
|
+
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
processImage
|
|
4
|
-
} from "./chunk-AD6VXAO7.js";
|
|
5
2
|
import {
|
|
6
3
|
DEFAULT_MAX_BYTES,
|
|
7
4
|
DEFAULT_MAX_LINES,
|
|
@@ -32,6 +29,9 @@ import {
|
|
|
32
29
|
trackDetachedChildPid,
|
|
33
30
|
untrackDetachedChildPid
|
|
34
31
|
} from "./chunk-ZCHMJ34K.js";
|
|
32
|
+
import {
|
|
33
|
+
processImage
|
|
34
|
+
} from "./chunk-5Q45AVQG.js";
|
|
35
35
|
import {
|
|
36
36
|
keyHint
|
|
37
37
|
} from "./chunk-C4O2RSQQ.js";
|