wednesdayai 0.5.1-dev.36 → 0.5.1-dev.37
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/dist/{agent-scope-cTY4-zRz.js → agent-scope-CoIdVzmg.js} +3 -3
- package/dist/{agent-turn-runner-JxDS9bU_.js → agent-turn-runner-CiEPY6RO.js} +2 -2
- package/dist/{agent-turn-runner-7LQU6Fut.js → agent-turn-runner-DKwd_tAc.js} +6 -6
- package/dist/{api-key-rotation-BCh_J5f6.js → api-key-rotation-CoKWzuyV.js} +2 -2
- package/dist/{audio-preflight-C9EHsVrE.js → audio-preflight-BV83ctbI.js} +23 -23
- package/dist/{audio-preflight-Cxyte-N3.js → audio-preflight-CKFGJslr.js} +3 -3
- package/dist/{audio-transcription-runner-CoyogVcx.js → audio-transcription-runner-B-MEt_yD.js} +1 -1
- package/dist/{audio-transcription-runner-DXlkPfwW.js → audio-transcription-runner-DRUTJgZh.js} +25 -25
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +50 -50
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-journal/handler.js +50 -50
- package/dist/bundled/session-memory/handler.js +50 -50
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{chat-content-Cafge7N8.js → chat-content-01nUeO9I.js} +3 -3
- package/dist/{chat-content-Csm95kDY.js → chat-content-B2kNxQ3a.js} +39 -39
- package/dist/{chrome-H5-7mQ4m.js → chrome-DgDNUC2A.js} +4 -4
- package/dist/{chrome-D-DfD0Cv.js → chrome-kwiyU0Mr.js} +31 -31
- package/dist/{chunk-zortZzCP.js → chunk-BRJHaAd6.js} +3 -3
- package/dist/{command-queue-DfL4YmGb.js → command-queue-CRm1AADE.js} +1 -1
- package/dist/{commands-registry-Vo5C1XbD.js → commands-registry-D3lOVOa7.js} +2 -2
- package/dist/{deliver-BKt_OVTK.js → deliver-BoOCdGXY.js} +28 -28
- package/dist/{deliver-x22mTRDq.js → deliver-CgFkiA4Z.js} +1 -1
- package/dist/{diagnostic-8jsvSbYs.js → diagnostic-BSnQ1U_E.js} +3 -3
- package/dist/{errors-muW4vMSB.js → errors-CgPgYfWg.js} +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{fetch-Ciq99DHJ.js → fetch-BBi5dEoV.js} +8 -8
- package/dist/{fetch-B9Tca1cY.js → fetch-BrwJHFZR.js} +1 -1
- package/dist/{fetch-guard-DaJwMbcY.js → fetch-guard-BcLYPGi1.js} +2 -2
- package/dist/{frontmatter-BzlMEBkz.js → frontmatter-DQTIIgFI.js} +5 -5
- package/dist/{fs-safe-CDfp5e8Q.js → fs-safe-CRbowDkj.js} +26 -26
- package/dist/{ir-BczXO28b.js → ir-D___VWlp.js} +4 -4
- package/dist/{json-files-CNVg1Wi5.js → json-files-CurKd8gy.js} +28 -28
- package/dist/{legacy-names-CRCLZarD.js → legacy-names-D7ywm6_7.js} +1 -1
- package/dist/llm-slug-generator.js +50 -50
- package/dist/{manager-ywiQQ5nv.js → manager-yAtdyPwQ.js} +18 -18
- package/dist/{markdown-tables-CmGUH7Wy.js → markdown-tables-DfqPFbkZ.js} +2 -2
- package/dist/{model-selection-BJZFC8fA.js → model-selection-B7FYf8Fo.js} +83 -83
- package/dist/{outbound-attachment-BXAhY7Q6.js → outbound-attachment-BJq1brbB.js} +2 -2
- package/dist/{outbound-message-hooks-CjfNIFcN.js → outbound-message-hooks-Dl2zci3u.js} +5 -5
- package/dist/{path-alias-guards-BV6CR8H3.js → path-alias-guards-nWrE5acE.js} +1 -1
- package/dist/{pi-embedded-BzjQS2tl.js → pi-embedded-BAKd4NmP.js} +18 -18
- package/dist/{pi-embedded-D6Ti_RiY.js → pi-embedded-_YhHvi3M.js} +258 -258
- package/dist/{pi-model-discovery-PH-bhX7g.js → pi-model-discovery-CusLASy5.js} +7 -7
- package/dist/plugin-sdk/provider-media-understanding.js +7 -7
- package/dist/{proxy-env-DXcKRnns.js → proxy-env-DrmTb0QW.js} +1 -1
- package/dist/{pw-ai-ByUzz5o2.js → pw-ai-BKN66RLi.js} +13 -13
- package/dist/{pw-ai-qlENNDHC.js → pw-ai-CPIjXEgJ.js} +1 -1
- package/dist/{qmd-manager-CPPURYfg.js → qmd-manager-BYC9bX-E.js} +12 -12
- package/dist/{qmd-scope-dd_YbPG-.js → qmd-scope-D6tMcgqR.js} +1 -1
- package/dist/{query-expansion-0S2l-J2-.js → query-expansion-CnQI0IeV.js} +13 -13
- package/dist/{recorder-CrrhLZt5.js → recorder-B7dhxQ62.js} +2 -2
- package/dist/{redact-BkE4uRXu.js → redact-CysJDryP.js} +1 -1
- package/dist/{replies-j6q2EArA.js → replies-CP8xbTSR.js} +5 -5
- package/dist/{reply-prefix-BCu_i91I.js → reply-prefix-C7r81KLS.js} +1 -1
- package/dist/{resolve-route-WUZ7lH6L.js → resolve-route-BvD1w4_v.js} +4 -4
- package/dist/{send-lY0a6iA2.js → send-4WdiWuFu.js} +8 -8
- package/dist/{send-CFG2EYja.js → send-BZv91SjC.js} +6 -6
- package/dist/{send-80rMjd6V.js → send-CjR30q4U.js} +8 -8
- package/dist/{send-D1aXT71a.js → send-bmlVFiBl.js} +7 -7
- package/dist/{session-meta-BjRAI6ON.js → session-meta-BeqTuIFU.js} +1 -1
- package/dist/{sessions-B6iaKddN.js → sessions-BjSGNjb0.js} +5 -5
- package/dist/{skill-commands-BG0ravVA.js → skill-commands-CcrQquVr.js} +8 -8
- package/dist/{store-BXWb__DD.js → store-DniD8E6a.js} +7 -7
- package/dist/{tables-CBpS5G91.js → tables-BbmkAuhA.js} +1 -1
- package/dist/{tokens-Q7TMdIpT.js → tokens-C2ll8wSq.js} +1 -1
- package/dist/{tool-loop-detection-CVIDnpv_.js → tool-loop-detection-B0Jj6y2H.js} +2 -2
- package/dist/{user-run-recording-DNsWtMOn.js → user-run-recording-COpooN64.js} +2 -2
- package/dist/{workspace-D8z8s1Xz.js → workspace-xnzx7wEV.js} +26 -26
- package/extensions/acpx/package.json +1 -1
- package/extensions/anthropic/package.json +1 -1
- package/extensions/bifrost/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/deepgram/package.json +1 -1
- package/extensions/deepinfra/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diffs/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/dream-cycle/package.json +1 -1
- package/extensions/elevenlabs/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/gemini-search/package.json +1 -1
- package/extensions/google/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/grok-search/package.json +1 -1
- package/extensions/groq/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/kimi-search/package.json +1 -1
- package/extensions/kokoro/package.json +1 -1
- package/extensions/learning-core/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +1 -1
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/mistral/package.json +1 -1
- package/extensions/moonshot/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +1 -1
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +1 -1
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/openai/package.json +1 -1
- package/extensions/openai-realtime/package.json +1 -1
- package/extensions/openrouter/package.json +1 -1
- package/extensions/perplexity-search/package.json +1 -1
- package/extensions/searxng-search/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +1 -1
- package/extensions/twitch/package.json +1 -1
- package/extensions/ui-surfaces/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +1 -1
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zai/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +1 -1
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +1 -1
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/github-copilot-token-DrVydgnY.js +0 -106
- package/dist/paths-BIDPYPVC.js +0 -233
- package/dist/subsystem-BOg9wqSC.js +0 -2777
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { c as resolveAgentWorkspaceDir } from "../../agent-scope-
|
|
2
|
-
import { l as resolveStateDir } from "../../paths-
|
|
3
|
-
import { t as createSubsystemLogger } from "../../subsystem-
|
|
4
|
-
import { L as resolveAgentIdFromSessionKey } from "../../workspace-
|
|
5
|
-
import "../../model-selection-
|
|
6
|
-
import "../../github-copilot-token-
|
|
7
|
-
import "../../legacy-names-
|
|
8
|
-
import "../../send-
|
|
9
|
-
import "../../send-
|
|
10
|
-
import "../../tokens-
|
|
11
|
-
import "../../pi-embedded-
|
|
12
|
-
import "../../sessions-
|
|
1
|
+
import { c as resolveAgentWorkspaceDir } from "../../agent-scope-CoIdVzmg.js";
|
|
2
|
+
import { l as resolveStateDir } from "../../paths-B_gs59ga.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "../../subsystem-DynBFcQj.js";
|
|
4
|
+
import { L as resolveAgentIdFromSessionKey } from "../../workspace-xnzx7wEV.js";
|
|
5
|
+
import "../../model-selection-B7FYf8Fo.js";
|
|
6
|
+
import "../../github-copilot-token-BJeEWDJb.js";
|
|
7
|
+
import "../../legacy-names-D7ywm6_7.js";
|
|
8
|
+
import "../../send-bmlVFiBl.js";
|
|
9
|
+
import "../../send-4WdiWuFu.js";
|
|
10
|
+
import "../../tokens-C2ll8wSq.js";
|
|
11
|
+
import "../../pi-embedded-_YhHvi3M.js";
|
|
12
|
+
import "../../sessions-BjSGNjb0.js";
|
|
13
13
|
import "../../diagnostic-events-BTSwhIfk.js";
|
|
14
|
-
import "../../diagnostic-
|
|
14
|
+
import "../../diagnostic-BSnQ1U_E.js";
|
|
15
15
|
import "../../diagnostic-session-state-DJQj3Ka7.js";
|
|
16
|
-
import "../../redact-
|
|
17
|
-
import "../../command-queue-
|
|
18
|
-
import "../../fetch-
|
|
19
|
-
import "../../pi-model-discovery-
|
|
20
|
-
import "../../chat-content-
|
|
21
|
-
import "../../chrome-
|
|
22
|
-
import "../../frontmatter-
|
|
23
|
-
import "../../json-files-
|
|
24
|
-
import "../../path-alias-guards-
|
|
25
|
-
import "../../errors-
|
|
26
|
-
import { c as writeFileWithinRoot } from "../../fs-safe-
|
|
27
|
-
import "../../proxy-env-
|
|
28
|
-
import "../../store-
|
|
29
|
-
import "../../fetch-guard-
|
|
16
|
+
import "../../redact-CysJDryP.js";
|
|
17
|
+
import "../../command-queue-CRm1AADE.js";
|
|
18
|
+
import "../../fetch-BBi5dEoV.js";
|
|
19
|
+
import "../../pi-model-discovery-CusLASy5.js";
|
|
20
|
+
import "../../chat-content-B2kNxQ3a.js";
|
|
21
|
+
import "../../chrome-DgDNUC2A.js";
|
|
22
|
+
import "../../frontmatter-DQTIIgFI.js";
|
|
23
|
+
import "../../json-files-CurKd8gy.js";
|
|
24
|
+
import "../../path-alias-guards-nWrE5acE.js";
|
|
25
|
+
import "../../errors-CgPgYfWg.js";
|
|
26
|
+
import { c as writeFileWithinRoot } from "../../fs-safe-CRbowDkj.js";
|
|
27
|
+
import "../../proxy-env-DrmTb0QW.js";
|
|
28
|
+
import "../../store-DniD8E6a.js";
|
|
29
|
+
import "../../fetch-guard-BcLYPGi1.js";
|
|
30
30
|
import "../../thinking-CwmtMy_H.js";
|
|
31
|
-
import "../../audio-transcription-runner-
|
|
32
|
-
import "../../api-key-rotation-
|
|
33
|
-
import "../../reply-prefix-
|
|
34
|
-
import "../../chunk-
|
|
35
|
-
import "../../markdown-tables-
|
|
36
|
-
import "../../ir-
|
|
31
|
+
import "../../audio-transcription-runner-DRUTJgZh.js";
|
|
32
|
+
import "../../api-key-rotation-CoKWzuyV.js";
|
|
33
|
+
import "../../reply-prefix-C7r81KLS.js";
|
|
34
|
+
import "../../chunk-BRJHaAd6.js";
|
|
35
|
+
import "../../markdown-tables-DfqPFbkZ.js";
|
|
36
|
+
import "../../ir-D___VWlp.js";
|
|
37
37
|
import "../../render-TpKSK5RV.js";
|
|
38
|
-
import "../../commands-registry-
|
|
39
|
-
import "../../user-run-recording-
|
|
40
|
-
import "../../recorder-
|
|
41
|
-
import "../../agent-turn-runner-
|
|
42
|
-
import "../../skill-commands-
|
|
43
|
-
import "../../outbound-message-hooks-
|
|
44
|
-
import { C as readFullTranscriptEntriesFromBackend, S as formatSessionMessageLines, w as transcriptEntriesToMessages } from "../../deliver-
|
|
45
|
-
import "../../fetch-
|
|
46
|
-
import "../../tables-
|
|
47
|
-
import "../../send-
|
|
48
|
-
import "../../outbound-attachment-
|
|
49
|
-
import "../../send-
|
|
50
|
-
import "../../resolve-route-
|
|
51
|
-
import "../../session-meta-
|
|
52
|
-
import "../../replies-
|
|
53
|
-
import "../../manager-
|
|
54
|
-
import "../../query-expansion-
|
|
38
|
+
import "../../commands-registry-D3lOVOa7.js";
|
|
39
|
+
import "../../user-run-recording-COpooN64.js";
|
|
40
|
+
import "../../recorder-B7dhxQ62.js";
|
|
41
|
+
import "../../agent-turn-runner-DKwd_tAc.js";
|
|
42
|
+
import "../../skill-commands-CcrQquVr.js";
|
|
43
|
+
import "../../outbound-message-hooks-Dl2zci3u.js";
|
|
44
|
+
import { C as readFullTranscriptEntriesFromBackend, S as formatSessionMessageLines, w as transcriptEntriesToMessages } from "../../deliver-BoOCdGXY.js";
|
|
45
|
+
import "../../fetch-BrwJHFZR.js";
|
|
46
|
+
import "../../tables-BbmkAuhA.js";
|
|
47
|
+
import "../../send-CjR30q4U.js";
|
|
48
|
+
import "../../outbound-attachment-BJq1brbB.js";
|
|
49
|
+
import "../../send-BZv91SjC.js";
|
|
50
|
+
import "../../resolve-route-BvD1w4_v.js";
|
|
51
|
+
import "../../session-meta-BeqTuIFU.js";
|
|
52
|
+
import "../../replies-CP8xbTSR.js";
|
|
53
|
+
import "../../manager-yAtdyPwQ.js";
|
|
54
|
+
import "../../query-expansion-CnQI0IeV.js";
|
|
55
55
|
import { generateSlugViaLLM } from "../../llm-slug-generator.js";
|
|
56
56
|
import { t as resolveHookConfig } from "../../config-D3XCQLL1.js";
|
|
57
57
|
import path from "node:path";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
cb1246dd02566313050c9511759fee6d93cbb43e60a8e9eee36bb89fa9c097d2
|
|
@@ -5,7 +5,7 @@ import { $i as resolveSecretRefValues, Ft as CHANNEL_IDS, H as createConfigIO, K
|
|
|
5
5
|
import { F as resolveAgentMainSessionKey, P as canonicalizeMainSessionAlias, kt as sanitizeToolCallIdsForCloudCodeAssist } from "./sessions-DpewQpWj.js";
|
|
6
6
|
import { t as generateSecureToken } from "./secure-random-CXrBi7Jq.js";
|
|
7
7
|
import { f as resizeToJpeg, l as getImageMetadata, o as IMAGE_REDUCE_QUALITY_STEPS, s as buildImageResizeSideGrid } from "./fetch-EMfyKQ8c.js";
|
|
8
|
-
import { C as ensureChromeExtensionRelayServer, D as PROFILE_POST_RESTART_WS_TIMEOUT_MS, E as PROFILE_ATTACH_RETRY_TIMEOUT_MS, G as DEFAULT_BROWSER_EVALUATE_ENABLED, H as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, I as resolveWritablePathWithinRoot, J as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, K as DEFAULT_OPENCLAW_BROWSER_COLOR, M as DEFAULT_TRACE_DIR, N as DEFAULT_UPLOAD_DIR, O as resolveCdpReachabilityTimeouts, P as resolveExistingPathsWithinRoot, R as normalizeBrowserFormField, T as CDP_JSON_NEW_TIMEOUT_MS, U as DEFAULT_AI_SNAPSHOT_MAX_CHARS, V as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, W as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, _ as withBrowserNavigationPolicy, a as resolveOpenClawUserDataDir, b as fetchOk, c as resolveBrowserExecutableForPlatform, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, i as launchOpenClawChrome, j as DEFAULT_DOWNLOAD_DIR, l as captureScreenshot, m as InvalidBrowserNavigationUrlError, n as isChromeCdpReady, o as stopOpenClawChrome, p as snapshotAria, q as DEFAULT_OPENCLAW_BROWSER_ENABLED, r as isChromeReachable, u as createTargetViaCdp, v as appendCdpPath, w as stopChromeExtensionRelayServer, y as fetchJson, z as isLoopbackHost } from "./chrome-
|
|
8
|
+
import { C as ensureChromeExtensionRelayServer, D as PROFILE_POST_RESTART_WS_TIMEOUT_MS, E as PROFILE_ATTACH_RETRY_TIMEOUT_MS, G as DEFAULT_BROWSER_EVALUATE_ENABLED, H as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, I as resolveWritablePathWithinRoot, J as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, K as DEFAULT_OPENCLAW_BROWSER_COLOR, M as DEFAULT_TRACE_DIR, N as DEFAULT_UPLOAD_DIR, O as resolveCdpReachabilityTimeouts, P as resolveExistingPathsWithinRoot, R as normalizeBrowserFormField, T as CDP_JSON_NEW_TIMEOUT_MS, U as DEFAULT_AI_SNAPSHOT_MAX_CHARS, V as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, W as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, _ as withBrowserNavigationPolicy, a as resolveOpenClawUserDataDir, b as fetchOk, c as resolveBrowserExecutableForPlatform, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, i as launchOpenClawChrome, j as DEFAULT_DOWNLOAD_DIR, l as captureScreenshot, m as InvalidBrowserNavigationUrlError, n as isChromeCdpReady, o as stopOpenClawChrome, p as snapshotAria, q as DEFAULT_OPENCLAW_BROWSER_ENABLED, r as isChromeReachable, u as createTargetViaCdp, v as appendCdpPath, w as stopChromeExtensionRelayServer, y as fetchJson, z as isLoopbackHost } from "./chrome-kwiyU0Mr.js";
|
|
9
9
|
import { l as syncSkillsToWorkspace, m as resolveSandboxPath, p as resolveSandboxInputPath, r as writeJsonAtomic, v as sanitizeEnvVars } from "./json-files-BATYfXx7.js";
|
|
10
10
|
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-DQnGmIZb.js";
|
|
11
11
|
import { r as formatErrorMessage, t as extractErrorCode } from "./errors-CwBnqLdW.js";
|
|
@@ -1268,7 +1268,7 @@ function isModuleNotFoundError(err) {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
async function loadPwAiModule(mode) {
|
|
1270
1270
|
try {
|
|
1271
|
-
return await import("./pw-ai-
|
|
1271
|
+
return await import("./pw-ai-CPIjXEgJ.js");
|
|
1272
1272
|
} catch (err) {
|
|
1273
1273
|
if (mode === "soft") return null;
|
|
1274
1274
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -3633,7 +3633,7 @@ function createProfileAvailability({ opts, profile, state, getProfileState, setP
|
|
|
3633
3633
|
//#region src/browser/server-context.reset.ts
|
|
3634
3634
|
async function closePlaywrightBrowserConnection() {
|
|
3635
3635
|
try {
|
|
3636
|
-
await (await import("./pw-ai-
|
|
3636
|
+
await (await import("./pw-ai-CPIjXEgJ.js")).closePlaywrightBrowserConnection();
|
|
3637
3637
|
} catch {}
|
|
3638
3638
|
}
|
|
3639
3639
|
function createProfileResetOps({ profile, getProfileState, stopRunningBrowser, isHttpReachable, resolveOpenClawUserDataDir }) {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { f as resolveSessionAgentId, r as resolveAgentConfig } from "./agent-scope-
|
|
2
|
-
import { n as STATE_DIR, o as resolveGatewayPort } from "./paths-
|
|
3
|
-
import { G as applyConfigEnvVars, P as openBoundaryFile, o as defaultRuntime, pt as truncateUtf16Safe, rt as isRecord$1, st as resolveUserPath, t as createSubsystemLogger, z as resolvePathViaExistingAncestorSync } from "./subsystem-
|
|
4
|
-
import { F as normalizeAgentId, L as resolveAgentIdFromSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_USER_FILENAME, i as DEFAULT_HEARTBEAT_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME } from "./workspace-
|
|
5
|
-
import { Ca as resolveSecretInputRef, H as createConfigIO, K as writeConfigFile, Pt as CHANNEL_IDS, U as loadConfig, Yi as resolveSecretRefValues, _ as resolveImplicitBedrockProvider, ea as secretRefKey, g as normalizeProviders, pa as resolveOpenClawAgentDir, qr as acquireSessionWriteLock, rt as getBlockedNetworkModeReason, v as resolveImplicitCopilotProvider, vr as formatCliCommand, y as resolveImplicitProviders } from "./model-selection-
|
|
6
|
-
import { s as parseBooleanValue } from "./legacy-names-
|
|
7
|
-
import { F as resolveAgentMainSessionKey, P as canonicalizeMainSessionAlias, kt as sanitizeToolCallIdsForCloudCodeAssist } from "./sessions-
|
|
1
|
+
import { f as resolveSessionAgentId, r as resolveAgentConfig } from "./agent-scope-CoIdVzmg.js";
|
|
2
|
+
import { n as STATE_DIR, o as resolveGatewayPort } from "./paths-B_gs59ga.js";
|
|
3
|
+
import { G as applyConfigEnvVars, P as openBoundaryFile, o as defaultRuntime, pt as truncateUtf16Safe, rt as isRecord$1, st as resolveUserPath, t as createSubsystemLogger, z as resolvePathViaExistingAncestorSync } from "./subsystem-DynBFcQj.js";
|
|
4
|
+
import { F as normalizeAgentId, L as resolveAgentIdFromSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_USER_FILENAME, i as DEFAULT_HEARTBEAT_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME } from "./workspace-xnzx7wEV.js";
|
|
5
|
+
import { Ca as resolveSecretInputRef, H as createConfigIO, K as writeConfigFile, Pt as CHANNEL_IDS, U as loadConfig, Yi as resolveSecretRefValues, _ as resolveImplicitBedrockProvider, ea as secretRefKey, g as normalizeProviders, pa as resolveOpenClawAgentDir, qr as acquireSessionWriteLock, rt as getBlockedNetworkModeReason, v as resolveImplicitCopilotProvider, vr as formatCliCommand, y as resolveImplicitProviders } from "./model-selection-B7FYf8Fo.js";
|
|
6
|
+
import { s as parseBooleanValue } from "./legacy-names-D7ywm6_7.js";
|
|
7
|
+
import { F as resolveAgentMainSessionKey, P as canonicalizeMainSessionAlias, kt as sanitizeToolCallIdsForCloudCodeAssist } from "./sessions-BjSGNjb0.js";
|
|
8
8
|
import { t as generateSecureToken } from "./secure-random-BDA1WAvZ.js";
|
|
9
|
-
import { f as resizeToJpeg, l as getImageMetadata, o as IMAGE_REDUCE_QUALITY_STEPS, s as buildImageResizeSideGrid } from "./fetch-
|
|
10
|
-
import { C as ensureChromeExtensionRelayServer, D as PROFILE_POST_RESTART_WS_TIMEOUT_MS, E as PROFILE_ATTACH_RETRY_TIMEOUT_MS, G as DEFAULT_BROWSER_EVALUATE_ENABLED, H as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, I as resolveWritablePathWithinRoot, J as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, K as DEFAULT_OPENCLAW_BROWSER_COLOR, M as DEFAULT_TRACE_DIR, N as DEFAULT_UPLOAD_DIR, O as resolveCdpReachabilityTimeouts, P as resolveExistingPathsWithinRoot, R as normalizeBrowserFormField, T as CDP_JSON_NEW_TIMEOUT_MS, U as DEFAULT_AI_SNAPSHOT_MAX_CHARS, V as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, W as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, _ as withBrowserNavigationPolicy, a as resolveOpenClawUserDataDir, b as fetchOk, c as resolveBrowserExecutableForPlatform, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, i as launchOpenClawChrome, j as DEFAULT_DOWNLOAD_DIR, l as captureScreenshot, m as InvalidBrowserNavigationUrlError, n as isChromeCdpReady, o as stopOpenClawChrome, p as snapshotAria, q as DEFAULT_OPENCLAW_BROWSER_ENABLED, r as isChromeReachable, u as createTargetViaCdp, v as appendCdpPath, w as stopChromeExtensionRelayServer, y as fetchJson, z as isLoopbackHost } from "./chrome-
|
|
11
|
-
import { l as syncSkillsToWorkspace, m as resolveSandboxPath, p as resolveSandboxInputPath, r as writeJsonAtomic, v as sanitizeEnvVars } from "./json-files-
|
|
12
|
-
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-
|
|
13
|
-
import { r as formatErrorMessage, t as extractErrorCode } from "./errors-
|
|
14
|
-
import { n as SsrFBlockedError } from "./proxy-env-
|
|
15
|
-
import { i as saveMediaBuffer, n as ensureMediaDir } from "./store-
|
|
16
|
-
import { s as resolveNetworkSsrFPolicy } from "./fetch-guard-
|
|
9
|
+
import { f as resizeToJpeg, l as getImageMetadata, o as IMAGE_REDUCE_QUALITY_STEPS, s as buildImageResizeSideGrid } from "./fetch-BBi5dEoV.js";
|
|
10
|
+
import { C as ensureChromeExtensionRelayServer, D as PROFILE_POST_RESTART_WS_TIMEOUT_MS, E as PROFILE_ATTACH_RETRY_TIMEOUT_MS, G as DEFAULT_BROWSER_EVALUATE_ENABLED, H as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, I as resolveWritablePathWithinRoot, J as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, K as DEFAULT_OPENCLAW_BROWSER_COLOR, M as DEFAULT_TRACE_DIR, N as DEFAULT_UPLOAD_DIR, O as resolveCdpReachabilityTimeouts, P as resolveExistingPathsWithinRoot, R as normalizeBrowserFormField, T as CDP_JSON_NEW_TIMEOUT_MS, U as DEFAULT_AI_SNAPSHOT_MAX_CHARS, V as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, W as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, _ as withBrowserNavigationPolicy, a as resolveOpenClawUserDataDir, b as fetchOk, c as resolveBrowserExecutableForPlatform, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, i as launchOpenClawChrome, j as DEFAULT_DOWNLOAD_DIR, l as captureScreenshot, m as InvalidBrowserNavigationUrlError, n as isChromeCdpReady, o as stopOpenClawChrome, p as snapshotAria, q as DEFAULT_OPENCLAW_BROWSER_ENABLED, r as isChromeReachable, u as createTargetViaCdp, v as appendCdpPath, w as stopChromeExtensionRelayServer, y as fetchJson, z as isLoopbackHost } from "./chrome-DgDNUC2A.js";
|
|
11
|
+
import { l as syncSkillsToWorkspace, m as resolveSandboxPath, p as resolveSandboxInputPath, r as writeJsonAtomic, v as sanitizeEnvVars } from "./json-files-CurKd8gy.js";
|
|
12
|
+
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-nWrE5acE.js";
|
|
13
|
+
import { r as formatErrorMessage, t as extractErrorCode } from "./errors-CgPgYfWg.js";
|
|
14
|
+
import { n as SsrFBlockedError } from "./proxy-env-DrmTb0QW.js";
|
|
15
|
+
import { i as saveMediaBuffer, n as ensureMediaDir } from "./store-DniD8E6a.js";
|
|
16
|
+
import { s as resolveNetworkSsrFPolicy } from "./fetch-guard-BcLYPGi1.js";
|
|
17
17
|
import { n as resolveWindowsSpawnProgram, t as materializeWindowsSpawnProgram } from "./windows-spawn-Dxm0ejq_.js";
|
|
18
18
|
import { o as normalizeThinkLevel } from "./thinking-CwmtMy_H.js";
|
|
19
19
|
import path, { posix } from "node:path";
|
|
20
|
-
import
|
|
20
|
+
import syncFs, { existsSync } from "node:fs";
|
|
21
21
|
import os from "node:os";
|
|
22
|
-
import fs
|
|
22
|
+
import fs from "node:fs/promises";
|
|
23
23
|
import { spawn } from "node:child_process";
|
|
24
24
|
import crypto, { createHash, timingSafeEqual } from "node:crypto";
|
|
25
25
|
import express from "express";
|
|
@@ -1270,7 +1270,7 @@ function isModuleNotFoundError(err) {
|
|
|
1270
1270
|
}
|
|
1271
1271
|
async function loadPwAiModule(mode) {
|
|
1272
1272
|
try {
|
|
1273
|
-
return await import("./pw-ai-
|
|
1273
|
+
return await import("./pw-ai-BKN66RLi.js");
|
|
1274
1274
|
} catch (err) {
|
|
1275
1275
|
if (mode === "soft") return null;
|
|
1276
1276
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -1428,7 +1428,7 @@ async function withPlaywrightRouteContext(params) {
|
|
|
1428
1428
|
//#endregion
|
|
1429
1429
|
//#region src/browser/routes/output-paths.ts
|
|
1430
1430
|
async function ensureOutputRootDir(rootDir) {
|
|
1431
|
-
await fs
|
|
1431
|
+
await fs.mkdir(rootDir, { recursive: true });
|
|
1432
1432
|
}
|
|
1433
1433
|
async function resolveWritableOutputPathOrRespond(params) {
|
|
1434
1434
|
if (params.ensureRootDir) await ensureOutputRootDir(params.rootDir);
|
|
@@ -3046,11 +3046,11 @@ async function movePathToTrash(targetPath) {
|
|
|
3046
3046
|
return targetPath;
|
|
3047
3047
|
} catch {
|
|
3048
3048
|
const trashDir = path.join(os.homedir(), ".Trash");
|
|
3049
|
-
|
|
3049
|
+
syncFs.mkdirSync(trashDir, { recursive: true });
|
|
3050
3050
|
const base = path.basename(targetPath);
|
|
3051
3051
|
let dest = path.join(trashDir, `${base}-${Date.now()}`);
|
|
3052
|
-
if (
|
|
3053
|
-
|
|
3052
|
+
if (syncFs.existsSync(dest)) dest = path.join(trashDir, `${base}-${Date.now()}-${generateSecureToken(6)}`);
|
|
3053
|
+
syncFs.renameSync(targetPath, dest);
|
|
3054
3054
|
return dest;
|
|
3055
3055
|
}
|
|
3056
3056
|
}
|
|
@@ -3137,7 +3137,7 @@ function createBrowserProfilesService(ctx) {
|
|
|
3137
3137
|
} catch {}
|
|
3138
3138
|
const userDataDir = resolveOpenClawUserDataDir(name);
|
|
3139
3139
|
const profileDir = path.dirname(userDataDir);
|
|
3140
|
-
if (
|
|
3140
|
+
if (syncFs.existsSync(profileDir)) {
|
|
3141
3141
|
await movePathToTrash(profileDir);
|
|
3142
3142
|
deleted = true;
|
|
3143
3143
|
}
|
|
@@ -3635,7 +3635,7 @@ function createProfileAvailability({ opts, profile, state, getProfileState, setP
|
|
|
3635
3635
|
//#region src/browser/server-context.reset.ts
|
|
3636
3636
|
async function closePlaywrightBrowserConnection() {
|
|
3637
3637
|
try {
|
|
3638
|
-
await (await import("./pw-ai-
|
|
3638
|
+
await (await import("./pw-ai-BKN66RLi.js")).closePlaywrightBrowserConnection();
|
|
3639
3639
|
} catch {}
|
|
3640
3640
|
}
|
|
3641
3641
|
function createProfileResetOps({ profile, getProfileState, stopRunningBrowser, isHttpReachable, resolveOpenClawUserDataDir }) {
|
|
@@ -3653,7 +3653,7 @@ function createProfileResetOps({ profile, getProfileState, stopRunningBrowser, i
|
|
|
3653
3653
|
if (await isHttpReachable(300) && !profileState.running) await closePlaywrightBrowserConnection();
|
|
3654
3654
|
if (profileState.running) await stopRunningBrowser();
|
|
3655
3655
|
await closePlaywrightBrowserConnection();
|
|
3656
|
-
if (!
|
|
3656
|
+
if (!syncFs.existsSync(userDataDir)) return {
|
|
3657
3657
|
moved: false,
|
|
3658
3658
|
from: userDataDir
|
|
3659
3659
|
};
|
|
@@ -4345,7 +4345,7 @@ async function withRegistryLock(registryPath, fn) {
|
|
|
4345
4345
|
}
|
|
4346
4346
|
async function readRegistryFromFile(registryPath, mode) {
|
|
4347
4347
|
try {
|
|
4348
|
-
const raw = await fs
|
|
4348
|
+
const raw = await fs.readFile(registryPath, "utf-8");
|
|
4349
4349
|
const parsed = JSON.parse(raw);
|
|
4350
4350
|
if (isRegistryFile(parsed)) return parsed;
|
|
4351
4351
|
if (mode === "fallback") return { entries: [] };
|
|
@@ -5716,7 +5716,7 @@ var SandboxFsBridgeImpl = class {
|
|
|
5716
5716
|
if (guarded.reason !== "path") {
|
|
5717
5717
|
if (!(options.allowedType === "directory" && this.pathIsExistingDirectory(target.hostPath))) throw guarded.error instanceof Error ? guarded.error : /* @__PURE__ */ new Error(`Sandbox boundary checks failed; cannot ${options.action}: ${target.containerPath}`);
|
|
5718
5718
|
}
|
|
5719
|
-
} else
|
|
5719
|
+
} else syncFs.closeSync(guarded.fd);
|
|
5720
5720
|
const canonicalContainerPath = await this.resolveCanonicalContainerPath({
|
|
5721
5721
|
containerPath: target.containerPath,
|
|
5722
5722
|
allowFinalSymlinkForUnlink: options.aliasPolicy?.allowFinalSymlinkForUnlink === true
|
|
@@ -5727,7 +5727,7 @@ var SandboxFsBridgeImpl = class {
|
|
|
5727
5727
|
}
|
|
5728
5728
|
pathIsExistingDirectory(hostPath) {
|
|
5729
5729
|
try {
|
|
5730
|
-
return
|
|
5730
|
+
return syncFs.statSync(hostPath).isDirectory();
|
|
5731
5731
|
} catch {
|
|
5732
5732
|
return false;
|
|
5733
5733
|
}
|
|
@@ -5969,7 +5969,7 @@ function formatSandboxToolPolicyBlockedMessage(params) {
|
|
|
5969
5969
|
//#endregion
|
|
5970
5970
|
//#region src/agents/sandbox/workspace.ts
|
|
5971
5971
|
async function ensureSandboxWorkspace(workspaceDir, seedFrom, skipBootstrap) {
|
|
5972
|
-
await fs
|
|
5972
|
+
await fs.mkdir(workspaceDir, { recursive: true });
|
|
5973
5973
|
if (seedFrom) {
|
|
5974
5974
|
const seed = resolveUserPath(seedFrom);
|
|
5975
5975
|
const files = [
|
|
@@ -5985,7 +5985,7 @@ async function ensureSandboxWorkspace(workspaceDir, seedFrom, skipBootstrap) {
|
|
|
5985
5985
|
const src = path.join(seed, name);
|
|
5986
5986
|
const dest = path.join(workspaceDir, name);
|
|
5987
5987
|
try {
|
|
5988
|
-
await fs
|
|
5988
|
+
await fs.access(dest);
|
|
5989
5989
|
} catch {
|
|
5990
5990
|
try {
|
|
5991
5991
|
const opened = await openBoundaryFile({
|
|
@@ -5995,13 +5995,13 @@ async function ensureSandboxWorkspace(workspaceDir, seedFrom, skipBootstrap) {
|
|
|
5995
5995
|
});
|
|
5996
5996
|
if (!opened.ok) continue;
|
|
5997
5997
|
try {
|
|
5998
|
-
const content =
|
|
5999
|
-
await fs
|
|
5998
|
+
const content = syncFs.readFileSync(opened.fd, "utf-8");
|
|
5999
|
+
await fs.writeFile(dest, content, {
|
|
6000
6000
|
encoding: "utf-8",
|
|
6001
6001
|
flag: "wx"
|
|
6002
6002
|
});
|
|
6003
6003
|
} finally {
|
|
6004
|
-
|
|
6004
|
+
syncFs.closeSync(opened.fd);
|
|
6005
6005
|
}
|
|
6006
6006
|
} catch {}
|
|
6007
6007
|
}
|
|
@@ -6035,7 +6035,7 @@ async function ensureSandboxWorkspaceLayout(params) {
|
|
|
6035
6035
|
const message = error instanceof Error ? error.message : JSON.stringify(error);
|
|
6036
6036
|
defaultRuntime.error?.(`Sandbox skill sync failed: ${message}`);
|
|
6037
6037
|
}
|
|
6038
|
-
} else await fs
|
|
6038
|
+
} else await fs.mkdir(workspaceDir, { recursive: true });
|
|
6039
6039
|
return {
|
|
6040
6040
|
agentWorkspaceDir,
|
|
6041
6041
|
scopeKey,
|
|
@@ -6045,7 +6045,7 @@ async function ensureSandboxWorkspaceLayout(params) {
|
|
|
6045
6045
|
}
|
|
6046
6046
|
async function resolveSandboxDockerUser(params) {
|
|
6047
6047
|
if (params.docker.user?.trim()) return params.docker;
|
|
6048
|
-
const stat = params.stat ?? ((workspaceDir) => fs
|
|
6048
|
+
const stat = params.stat ?? ((workspaceDir) => fs.stat(workspaceDir));
|
|
6049
6049
|
try {
|
|
6050
6050
|
const workspaceStat = await stat(params.workspaceDir);
|
|
6051
6051
|
const uid = Number.isInteger(workspaceStat.uid) ? workspaceStat.uid : null;
|
|
@@ -7413,7 +7413,7 @@ function mergeProviders(params) {
|
|
|
7413
7413
|
}
|
|
7414
7414
|
async function readJson(pathname) {
|
|
7415
7415
|
try {
|
|
7416
|
-
const raw = await fs
|
|
7416
|
+
const raw = await fs.readFile(pathname, "utf8");
|
|
7417
7417
|
return JSON.parse(raw);
|
|
7418
7418
|
} catch {
|
|
7419
7419
|
return null;
|
|
@@ -7473,7 +7473,7 @@ async function resolveProvidersForMode(params) {
|
|
|
7473
7473
|
}
|
|
7474
7474
|
async function readRawFile(pathname) {
|
|
7475
7475
|
try {
|
|
7476
|
-
return await fs
|
|
7476
|
+
return await fs.readFile(pathname, "utf8");
|
|
7477
7477
|
} catch {
|
|
7478
7478
|
return "";
|
|
7479
7479
|
}
|
|
@@ -7505,11 +7505,11 @@ async function ensureOpenClawModelsJson(config, agentDirOverride) {
|
|
|
7505
7505
|
agentDir,
|
|
7506
7506
|
wrote: false
|
|
7507
7507
|
};
|
|
7508
|
-
await fs
|
|
7508
|
+
await fs.mkdir(agentDir, {
|
|
7509
7509
|
recursive: true,
|
|
7510
7510
|
mode: 448
|
|
7511
7511
|
});
|
|
7512
|
-
await fs
|
|
7512
|
+
await fs.writeFile(targetPath, next, { mode: 384 });
|
|
7513
7513
|
return {
|
|
7514
7514
|
agentDir,
|
|
7515
7515
|
wrote: true
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { H as isPathInside, V as isNotFoundPathError, Z as CONFIG_DIR, mt as resolvePreferredOpenClawTmpDir, t as createSubsystemLogger } from "./subsystem-DynBFcQj.js";
|
|
2
|
-
import { U as loadConfig, dt as isLoopbackIpAddress, ft as isPrivateOrLoopbackIpAddress, pt as normalizeIpAddress } from "./model-selection-
|
|
3
|
-
import { a as isErrno } from "./errors-
|
|
4
|
-
import { i as openFileWithinRoot, t as SafeOpenError } from "./fs-safe-
|
|
5
|
-
import { c as resolvePinnedHostnameWithPolicy, s as isPrivateNetworkAllowedByPolicy, t as hasProxyEnvConfigured } from "./proxy-env-
|
|
2
|
+
import { U as loadConfig, dt as isLoopbackIpAddress, ft as isPrivateOrLoopbackIpAddress, pt as normalizeIpAddress } from "./model-selection-B7FYf8Fo.js";
|
|
3
|
+
import { a as isErrno } from "./errors-CgPgYfWg.js";
|
|
4
|
+
import { i as openFileWithinRoot, t as SafeOpenError } from "./fs-safe-CRbowDkj.js";
|
|
5
|
+
import { c as resolvePinnedHostnameWithPolicy, s as isPrivateNetworkAllowedByPolicy, t as hasProxyEnvConfigured } from "./proxy-env-DrmTb0QW.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import syncFs from "node:fs";
|
|
8
8
|
import os from "node:os";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { H as isPathInside, V as isNotFoundPathError, Z as CONFIG_DIR, mt as resolvePreferredOpenClawTmpDir, t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { U as loadConfig, dt as isLoopbackIpAddress, ft as isPrivateOrLoopbackIpAddress, pt as normalizeIpAddress } from "./model-selection-
|
|
3
|
-
import { a as isErrno } from "./errors-
|
|
4
|
-
import { i as openFileWithinRoot, t as SafeOpenError } from "./fs-safe-
|
|
5
|
-
import { c as resolvePinnedHostnameWithPolicy, s as isPrivateNetworkAllowedByPolicy, t as hasProxyEnvConfigured } from "./proxy-env-
|
|
1
|
+
import { H as isPathInside, V as isNotFoundPathError, Z as CONFIG_DIR, mt as resolvePreferredOpenClawTmpDir, t as createSubsystemLogger } from "./subsystem-DynBFcQj.js";
|
|
2
|
+
import { U as loadConfig, dt as isLoopbackIpAddress, ft as isPrivateOrLoopbackIpAddress, pt as normalizeIpAddress } from "./model-selection-DZBq95qz.js";
|
|
3
|
+
import { a as isErrno } from "./errors-CwBnqLdW.js";
|
|
4
|
+
import { i as openFileWithinRoot, t as SafeOpenError } from "./fs-safe-C3HfjrHy.js";
|
|
5
|
+
import { c as resolvePinnedHostnameWithPolicy, s as isPrivateNetworkAllowedByPolicy, t as hasProxyEnvConfigured } from "./proxy-env-Bs474VeG.js";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import
|
|
7
|
+
import syncFs from "node:fs";
|
|
8
8
|
import os from "node:os";
|
|
9
|
-
import fs
|
|
9
|
+
import fs from "node:fs/promises";
|
|
10
10
|
import { execFileSync, spawn } from "node:child_process";
|
|
11
11
|
import { createHmac } from "node:crypto";
|
|
12
12
|
import net from "node:net";
|
|
13
13
|
import http, { createServer } from "node:http";
|
|
14
14
|
import https from "node:https";
|
|
15
|
-
import WebSocket, { WebSocketServer } from "ws";
|
|
15
|
+
import WebSocket$1, { WebSocketServer } from "ws";
|
|
16
16
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
17
17
|
|
|
18
18
|
//#region src/browser/constants.ts
|
|
@@ -146,28 +146,28 @@ function invalidPath(scopeLabel) {
|
|
|
146
146
|
}
|
|
147
147
|
async function resolveRealPathIfExists(targetPath) {
|
|
148
148
|
try {
|
|
149
|
-
return await fs
|
|
149
|
+
return await fs.realpath(targetPath);
|
|
150
150
|
} catch {
|
|
151
151
|
return;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
async function resolveTrustedRootRealPath(rootDir) {
|
|
155
155
|
try {
|
|
156
|
-
const rootLstat = await fs
|
|
156
|
+
const rootLstat = await fs.lstat(rootDir);
|
|
157
157
|
if (!rootLstat.isDirectory() || rootLstat.isSymbolicLink()) return;
|
|
158
|
-
return await fs
|
|
158
|
+
return await fs.realpath(rootDir);
|
|
159
159
|
} catch {
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
async function validateCanonicalPathWithinRoot(params) {
|
|
164
164
|
try {
|
|
165
|
-
const candidateLstat = await fs
|
|
165
|
+
const candidateLstat = await fs.lstat(params.candidatePath);
|
|
166
166
|
if (candidateLstat.isSymbolicLink()) return "invalid";
|
|
167
167
|
if (params.expect === "directory" && !candidateLstat.isDirectory()) return "invalid";
|
|
168
168
|
if (params.expect === "file" && !candidateLstat.isFile()) return "invalid";
|
|
169
169
|
if (params.expect === "file" && candidateLstat.nlink > 1) return "invalid";
|
|
170
|
-
const candidateRealPath = await fs
|
|
170
|
+
const candidateRealPath = await fs.realpath(params.candidatePath);
|
|
171
171
|
return isPathInside(params.rootRealPath, candidateRealPath) ? "ok" : "invalid";
|
|
172
172
|
} catch (err) {
|
|
173
173
|
return isNotFoundPathError(err) ? "not-found" : "invalid";
|
|
@@ -245,7 +245,7 @@ async function resolveCheckedPathsWithinRoot(params) {
|
|
|
245
245
|
};
|
|
246
246
|
if (!rootRealPath || !raw || !path.isAbsolute(raw)) return lexicalPathResult;
|
|
247
247
|
try {
|
|
248
|
-
const resolvedExistingPath = await fs
|
|
248
|
+
const resolvedExistingPath = await fs.realpath(raw);
|
|
249
249
|
const relativePath = path.relative(rootRealPath, resolvedExistingPath);
|
|
250
250
|
if (!isInRoot(relativePath)) return lexicalPathResult;
|
|
251
251
|
return {
|
|
@@ -591,7 +591,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
591
591
|
let extensionWs = null;
|
|
592
592
|
const cdpClients = /* @__PURE__ */ new Set();
|
|
593
593
|
const connectedTargets = /* @__PURE__ */ new Map();
|
|
594
|
-
const extensionConnected = () => extensionWs?.readyState === WebSocket.OPEN;
|
|
594
|
+
const extensionConnected = () => extensionWs?.readyState === WebSocket$1.OPEN;
|
|
595
595
|
const hasConnectedTargets = () => connectedTargets.size > 0;
|
|
596
596
|
let extensionDisconnectCleanupTimer = null;
|
|
597
597
|
const extensionReconnectWaiters = /* @__PURE__ */ new Set();
|
|
@@ -643,7 +643,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
643
643
|
let nextExtensionId = 1;
|
|
644
644
|
const sendToExtension = async (payload) => {
|
|
645
645
|
const ws = extensionWs;
|
|
646
|
-
if (!ws || ws.readyState !== WebSocket.OPEN) throw new Error("Chrome extension not connected");
|
|
646
|
+
if (!ws || ws.readyState !== WebSocket$1.OPEN) throw new Error("Chrome extension not connected");
|
|
647
647
|
ws.send(JSON.stringify(payload));
|
|
648
648
|
return await new Promise((resolve, reject) => {
|
|
649
649
|
const timer = setTimeout(() => {
|
|
@@ -660,12 +660,12 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
660
660
|
const broadcastToCdpClients = (evt) => {
|
|
661
661
|
const msg = JSON.stringify(evt);
|
|
662
662
|
for (const ws of cdpClients) {
|
|
663
|
-
if (ws.readyState !== WebSocket.OPEN) continue;
|
|
663
|
+
if (ws.readyState !== WebSocket$1.OPEN) continue;
|
|
664
664
|
ws.send(msg);
|
|
665
665
|
}
|
|
666
666
|
};
|
|
667
667
|
const sendResponseToCdp = (ws, res) => {
|
|
668
|
-
if (ws.readyState !== WebSocket.OPEN) return;
|
|
668
|
+
if (ws.readyState !== WebSocket$1.OPEN) return;
|
|
669
669
|
ws.send(JSON.stringify(res));
|
|
670
670
|
};
|
|
671
671
|
const dropConnectedTargetSession = (sessionId) => {
|
|
@@ -919,7 +919,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
919
919
|
rejectUpgrade(socket, 401, "Unauthorized");
|
|
920
920
|
return;
|
|
921
921
|
}
|
|
922
|
-
if (extensionWs && extensionWs.readyState !== WebSocket.OPEN) {
|
|
922
|
+
if (extensionWs && extensionWs.readyState !== WebSocket$1.OPEN) {
|
|
923
923
|
try {
|
|
924
924
|
extensionWs.terminate();
|
|
925
925
|
} catch {}
|
|
@@ -952,7 +952,7 @@ async function ensureChromeExtensionRelayServer(opts) {
|
|
|
952
952
|
clearExtensionDisconnectCleanupTimer();
|
|
953
953
|
flushExtensionReconnectWaiters(true);
|
|
954
954
|
const ping = setInterval(() => {
|
|
955
|
-
if (ws.readyState !== WebSocket.OPEN) return;
|
|
955
|
+
if (ws.readyState !== WebSocket$1.OPEN) return;
|
|
956
956
|
ws.send(JSON.stringify({ method: "ping" }));
|
|
957
957
|
}, 5e3);
|
|
958
958
|
ws.on("message", (data) => {
|
|
@@ -1308,7 +1308,7 @@ function openCdpWebSocket(wsUrl, opts) {
|
|
|
1308
1308
|
const headers = getHeadersWithAuth(wsUrl, opts?.headers ?? {});
|
|
1309
1309
|
const handshakeTimeoutMs = typeof opts?.handshakeTimeoutMs === "number" && Number.isFinite(opts.handshakeTimeoutMs) ? Math.max(1, Math.floor(opts.handshakeTimeoutMs)) : CDP_WS_HANDSHAKE_TIMEOUT_MS;
|
|
1310
1310
|
const agent = getDirectAgentForCdp(wsUrl);
|
|
1311
|
-
return new WebSocket(wsUrl, {
|
|
1311
|
+
return new WebSocket$1(wsUrl, {
|
|
1312
1312
|
handshakeTimeout: handshakeTimeoutMs,
|
|
1313
1313
|
...Object.keys(headers).length ? { headers } : {},
|
|
1314
1314
|
...agent ? { agent } : {}
|
|
@@ -1593,7 +1593,7 @@ const CHROMIUM_EXE_NAMES = new Set([
|
|
|
1593
1593
|
]);
|
|
1594
1594
|
function exists$1(filePath) {
|
|
1595
1595
|
try {
|
|
1596
|
-
return
|
|
1596
|
+
return syncFs.existsSync(filePath);
|
|
1597
1597
|
} catch {
|
|
1598
1598
|
return false;
|
|
1599
1599
|
}
|
|
@@ -1736,7 +1736,7 @@ function findDesktopFilePath(desktopId) {
|
|
|
1736
1736
|
}
|
|
1737
1737
|
function readDesktopExecLine(desktopPath) {
|
|
1738
1738
|
try {
|
|
1739
|
-
const lines =
|
|
1739
|
+
const lines = syncFs.readFileSync(desktopPath, "utf8").split(/\r?\n/);
|
|
1740
1740
|
for (const line of lines) if (line.startsWith("Exec=")) return line.slice(5).trim();
|
|
1741
1741
|
} catch {}
|
|
1742
1742
|
return null;
|
|
@@ -1994,7 +1994,7 @@ function resolveBrowserExecutableForPlatform(resolved, platform) {
|
|
|
1994
1994
|
const LSOF_CANDIDATES = process.platform === "darwin" ? ["/usr/sbin/lsof", "/usr/bin/lsof"] : ["/usr/bin/lsof", "/usr/sbin/lsof"];
|
|
1995
1995
|
function resolveLsofCommandSync() {
|
|
1996
1996
|
for (const candidate of LSOF_CANDIDATES) try {
|
|
1997
|
-
|
|
1997
|
+
syncFs.accessSync(candidate, syncFs.constants.X_OK);
|
|
1998
1998
|
return candidate;
|
|
1999
1999
|
} catch {}
|
|
2000
2000
|
return "lsof";
|
|
@@ -2039,8 +2039,8 @@ function decoratedMarkerPath(userDataDir) {
|
|
|
2039
2039
|
}
|
|
2040
2040
|
function safeReadJson(filePath) {
|
|
2041
2041
|
try {
|
|
2042
|
-
if (!
|
|
2043
|
-
const raw =
|
|
2042
|
+
if (!syncFs.existsSync(filePath)) return null;
|
|
2043
|
+
const raw = syncFs.readFileSync(filePath, "utf-8");
|
|
2044
2044
|
const parsed = JSON.parse(raw);
|
|
2045
2045
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
|
|
2046
2046
|
return parsed;
|
|
@@ -2049,8 +2049,8 @@ function safeReadJson(filePath) {
|
|
|
2049
2049
|
}
|
|
2050
2050
|
}
|
|
2051
2051
|
function safeWriteJson(filePath, data) {
|
|
2052
|
-
|
|
2053
|
-
|
|
2052
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
2053
|
+
syncFs.writeFileSync(filePath, JSON.stringify(data, null, 2));
|
|
2054
2054
|
}
|
|
2055
2055
|
function setDeep(obj, keys, value) {
|
|
2056
2056
|
let node = obj;
|
|
@@ -2177,7 +2177,7 @@ function decorateOpenClawProfile(userDataDir, opts) {
|
|
|
2177
2177
|
}
|
|
2178
2178
|
safeWriteJson(preferencesPath, prefs);
|
|
2179
2179
|
try {
|
|
2180
|
-
|
|
2180
|
+
syncFs.writeFileSync(decoratedMarkerPath(userDataDir), `${Date.now()}\n`, "utf-8");
|
|
2181
2181
|
} catch {}
|
|
2182
2182
|
}
|
|
2183
2183
|
function ensureProfileCleanExit(userDataDir) {
|
|
@@ -2193,7 +2193,7 @@ function ensureProfileCleanExit(userDataDir) {
|
|
|
2193
2193
|
const log = createSubsystemLogger("browser").child("chrome");
|
|
2194
2194
|
function exists(filePath) {
|
|
2195
2195
|
try {
|
|
2196
|
-
return
|
|
2196
|
+
return syncFs.existsSync(filePath);
|
|
2197
2197
|
} catch {
|
|
2198
2198
|
return false;
|
|
2199
2199
|
}
|
|
@@ -2291,7 +2291,7 @@ async function launchOpenClawChrome(resolved, profile) {
|
|
|
2291
2291
|
const exe = resolveBrowserExecutable(resolved);
|
|
2292
2292
|
if (!exe) throw new Error("No supported browser found (Chrome/Brave/Edge/Chromium on macOS, Linux, or Windows).");
|
|
2293
2293
|
const userDataDir = resolveOpenClawUserDataDir(profile.name);
|
|
2294
|
-
|
|
2294
|
+
syncFs.mkdirSync(userDataDir, { recursive: true });
|
|
2295
2295
|
const needsDecorate = !isProfileDecorated(userDataDir, profile.name, (profile.color ?? DEFAULT_OPENCLAW_BROWSER_COLOR).toUpperCase());
|
|
2296
2296
|
const spawnOnce = () => {
|
|
2297
2297
|
const args = [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { i as chunkTextByBreakResolver, r as avoidTrailingHighSurrogateBreak, t as createSubsystemLogger } from "./subsystem-
|
|
2
|
+
import { i as chunkTextByBreakResolver, r as avoidTrailingHighSurrogateBreak, t as createSubsystemLogger } from "./subsystem-DynBFcQj.js";
|
|
3
3
|
import { n as resolveProcessScopedMap } from "./plain-object-Doc_YkH1.js";
|
|
4
|
-
import { G as normalizeAccountId } from "./workspace-
|
|
5
|
-
import { Or as resolveAccountEntry, Pr as INTERNAL_MESSAGE_CHANNEL } from "./model-selection-
|
|
4
|
+
import { G as normalizeAccountId } from "./workspace-xnzx7wEV.js";
|
|
5
|
+
import { Or as resolveAccountEntry, Pr as INTERNAL_MESSAGE_CHANNEL } from "./model-selection-B7FYf8Fo.js";
|
|
6
6
|
|
|
7
7
|
//#region src/markdown/fences.ts
|
|
8
8
|
function parseFenceSpans(buffer) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { a as logLaneTaskCompleted, i as logLaneEnqueue, r as logLaneDequeue, t as diag } from "./diagnostic-
|
|
2
|
+
import { a as logLaneTaskCompleted, i as logLaneEnqueue, r as logLaneDequeue, t as diag } from "./diagnostic-BSnQ1U_E.js";
|
|
3
3
|
import { t as CommandLane } from "./lanes-DBBnME5O.js";
|
|
4
4
|
|
|
5
5
|
//#region src/process/command-queue.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { tt as escapeRegExp } from "./subsystem-
|
|
2
|
+
import { tt as escapeRegExp } from "./subsystem-DynBFcQj.js";
|
|
3
3
|
import { n as resolveProcessScopedMap, t as isPlainObject } from "./plain-object-Doc_YkH1.js";
|
|
4
|
-
import { Da as DEFAULT_PROVIDER, Ea as DEFAULT_MODEL, Ut as getActivePluginRegistry, Zn as listChannelDocks, tr as normalizeChannelId, u as resolveConfiguredModelRef } from "./model-selection-
|
|
4
|
+
import { Da as DEFAULT_PROVIDER, Ea as DEFAULT_MODEL, Ut as getActivePluginRegistry, Zn as listChannelDocks, tr as normalizeChannelId, u as resolveConfiguredModelRef } from "./model-selection-B7FYf8Fo.js";
|
|
5
5
|
import { r as listThinkingLevels } from "./thinking-CwmtMy_H.js";
|
|
6
6
|
|
|
7
7
|
//#region src/config/commands.ts
|