wednesdayai 0.4.12-dev.721 → 0.4.12-dev.722
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-cbxkoURo.js → agent-scope-DxKPMu8w.js} +3 -3
- package/dist/{agent-turn-runner-CXf6g-6f.js → agent-turn-runner-LlrD6k2x.js} +5 -5
- package/dist/{api-key-rotation-BMnyfyGD.js → api-key-rotation-Br7_jaAV.js} +2 -2
- package/dist/{artifacts-DUhYSSmK.js → artifacts-QHme-vnS.js} +4 -4
- package/dist/{audio-preflight-ifCgpG3c.js → audio-preflight-B_5sTSyb.js} +27 -27
- package/dist/{audio-transcription-runner-ipSQoPp8.js → audio-transcription-runner-XFfvRPXl.js} +11 -11
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +58 -58
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-journal/handler.js +58 -58
- package/dist/bundled/session-memory/handler.js +58 -58
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-BJHm_pDV.js → channel-activity-DNq7LYjU.js} +3 -3
- package/dist/{chrome-DTJprCGv.js → chrome-FHxGdLnd.js} +15 -15
- package/dist/{chunk-eNEsWhab.js → chunk-BhntPUH_.js} +3 -3
- package/dist/{command-queue-smA8JaO_.js → command-queue-CkNuNlmY.js} +1 -1
- package/dist/{commands-registry-DdQg21ct.js → commands-registry-DC0fovy_.js} +2 -2
- package/dist/config.js +9 -9
- package/dist/daemon-cli.js +7 -7
- package/dist/{deliver-CVWbwPkb.js → deliver-CXqNQ8yi.js} +24 -24
- package/dist/{diagnostic-DI-K8155.js → diagnostic-Bbg-zObh.js} +5 -5
- package/dist/{fetch-BzXaK9px.js → fetch-BoHKSk-O.js} +8 -8
- package/dist/{fetch-guard-0mkjBgri.js → fetch-guard-TJjLK0FV.js} +3 -3
- package/dist/{frontmatter-PMByWrfP.js → frontmatter-saAwiKEb.js} +5 -5
- package/dist/{fs-safe-DwICJjkN.js → fs-safe-LRpYbPaA.js} +4 -4
- package/dist/{github-copilot-token-WSjo05vB.js → github-copilot-token-zGOMIGSh.js} +7 -7
- package/dist/{image-ops-O8pHxo7i.js → image-ops-D_fm2PuR.js} +1 -1
- package/dist/{ir-fzpdYPWw.js → ir-C4MMLUJr.js} +5 -5
- package/dist/{legacy-names-CLlrMq8r.js → legacy-names-vLJrYADD.js} +1 -1
- package/dist/llm-slug-generator.js +58 -58
- package/dist/{logger-DNehzD_s.js → logger-a0-zAY5a.js} +1 -1
- package/dist/{manager-DH-MILAU.js → manager-DdA_cy40.js} +12 -12
- package/dist/{markdown-tables-UWspJNAH.js → markdown-tables-Dd7jV1JF.js} +2 -2
- package/dist/{model-selection-9qbqwsOT.js → model-selection-CdZITU0t.js} +86 -86
- package/dist/{outbound-attachment-DVKqk30B.js → outbound-attachment-CqtMGpsJ.js} +2 -2
- package/dist/{outbound-message-hooks-S_VhlJs3.js → outbound-message-hooks-RBQbGzGm.js} +4 -4
- package/dist/{path-alias-guards-Cd5yHmTq.js → path-alias-guards-Zj-NwKjV.js} +1 -1
- package/dist/{paths-Cvc9EM8Y.js → paths-C6TxBCvO.js} +5 -5
- package/dist/{pi-embedded-maiK_yr9.js → pi-embedded-COs_yO7U.js} +169 -169
- package/dist/{pi-embedded-helpers-5JApWu7A.js → pi-embedded-helpers-BYLOFsUc.js} +24 -24
- package/dist/{pi-embedded-utils-kHMmP2Xh.js → pi-embedded-utils-DOtaZ7KV.js} +3 -3
- package/dist/{pi-model-discovery-CsC6yTDG.js → pi-model-discovery-B9KKtGuw.js} +7 -7
- package/dist/plugin-sdk/{agent-scope-BQYVQxfQ.js → agent-scope-DU8uJiiv.js} +2 -2
- package/dist/plugin-sdk/agent-turn-execute-DoRgVKVO.js +61 -0
- package/dist/plugin-sdk/{agent-turn-runner-CqIBwx4o.js → agent-turn-runner-pU0RGvg6.js} +6 -6
- package/dist/plugin-sdk/{api-key-rotation-BW3rq9Tg.js → api-key-rotation-Oe0hkmVQ.js} +2 -2
- package/dist/plugin-sdk/{artifacts-C8xK4Y3e.js → artifacts-Dk-7TtTn.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-BVO3xBbT.js → audio-preflight-8hRbl8Io.js} +22 -22
- package/dist/plugin-sdk/{audio-transcription-runner-DXiOiQMw.js → audio-transcription-runner-CUsZFiEA.js} +11 -11
- package/dist/plugin-sdk/{auth-profiles-CIKTWees.js → auth-profiles-OgKl-vr-.js} +5 -5
- package/dist/plugin-sdk/{channel-activity-Ck83U_es.js → channel-activity-OIauZrkN.js} +3 -3
- package/dist/plugin-sdk/{chrome-DDIL8pIX.js → chrome-VZ0Zuu2w.js} +12 -12
- package/dist/plugin-sdk/{chunk-D6yDhUpF.js → chunk-BWz-lIzS.js} +4 -4
- package/dist/plugin-sdk/{command-queue-Cveon04f.js → command-queue-CbgNIrv6.js} +2 -2
- package/dist/plugin-sdk/{commands-registry-DuwlD_aI.js → commands-registry-XW2hmbAE.js} +3 -3
- package/dist/plugin-sdk/{deliver-BD3gpFAY.js → deliver-B7W4NNsR.js} +11 -11
- package/dist/plugin-sdk/deliver-CJP9TznW.js +32 -0
- package/dist/plugin-sdk/{diagnostic-BhLorIrS.js → diagnostic-BRUM6uNI.js} +7 -7
- package/dist/plugin-sdk/{diagnostic-session-state-BjuWxrAM.js → diagnostic-session-state-BsHrQ7U3.js} +1 -1
- package/dist/plugin-sdk/{fetch-D1jXg-ju.js → fetch-C1vgNaXJ.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-DnwfMurj.js → fetch-guard-B2Wnl9Vi.js} +4 -4
- package/dist/plugin-sdk/{fetch-DFZXuu3W.js → fetch-hEreHolP.js} +7 -7
- package/dist/plugin-sdk/{fetch-timeout-D7XVWfxj.js → fetch-timeout-A1m6BOhm.js} +1 -1
- package/dist/plugin-sdk/{fs-safe-BQ5cHy9G.js → fs-safe-ClebEeLz.js} +3 -3
- package/dist/plugin-sdk/{image-ops-0TjWNKUx.js → image-ops-Bm03YsK2.js} +1 -1
- package/dist/plugin-sdk/{inbound-context-Bfr5DkdO.js → inbound-context-Cmgtf5my.js} +1 -1
- package/dist/plugin-sdk/{ir-CbL0sVL2.js → ir-1CthVxHv.js} +5 -5
- package/dist/plugin-sdk/{logger-D5s3kiib.js → logger-BkzoyfHW.js} +1 -1
- package/dist/plugin-sdk/{manager-CHBt3PC-.js → manager-C4CJpRd9.js} +8 -8
- package/dist/plugin-sdk/manager-CPcI0Fhz.js +16 -0
- package/dist/plugin-sdk/{markdown-tables-CBGsimjo.js → markdown-tables-DZM4NfLU.js} +3 -3
- package/dist/plugin-sdk/{outbound-attachment-C5x2htXW.js → outbound-attachment-GMgXpDQm.js} +2 -2
- package/dist/plugin-sdk/{outbound-message-hooks-2YmJP9k-.js → outbound-message-hooks-BUHUdpjM.js} +3 -3
- package/dist/plugin-sdk/{path-alias-guards-BIPHhakQ.js → path-alias-guards-Dft7g-_v.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-D74AHWBs.js → pi-embedded-helpers-B-OOYT64.js} +11 -11
- package/dist/plugin-sdk/{pi-embedded-utils-DQaOun1y.js → pi-embedded-utils-BoSGTbYO.js} +3 -3
- package/dist/plugin-sdk/{pi-model-discovery-C37z3zkx.js → pi-model-discovery-DF6l-F8s.js} +2 -2
- package/dist/plugin-sdk/provider-dispatcher-CNLIHg-v.js +61 -0
- package/dist/plugin-sdk/provider-image-L_SRDPHU.js +22 -0
- package/dist/plugin-sdk/{provider-image-Cy9HRMER.js → provider-image-zNa1Cccq.js} +5 -5
- package/dist/plugin-sdk/{proxy-CjNR_U3u.js → proxy-CXI1ycJj.js} +2 -2
- package/dist/plugin-sdk/{proxy-env-ubutfW07.js → proxy-env-B3rQCyUO.js} +2 -2
- package/dist/plugin-sdk/{proxy-fetch-Cv4b428x.js → proxy-fetch-CNBkczcW.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-DlM8D_uP.js → pw-ai-JJrE-B1e.js} +10 -10
- package/dist/plugin-sdk/{qmd-manager-Bv5B9pi9.js → qmd-manager-CkQhKIXI.js} +8 -8
- package/dist/plugin-sdk/{query-expansion-CWwH9pqd.js → query-expansion-DjZsVofz.js} +3 -3
- package/dist/plugin-sdk/{recorder-C3qdhG-p.js → recorder-BU_faNrp.js} +4 -4
- package/dist/{redact-BOHmCPP_.js → plugin-sdk/redact-CdcLrd0n.js} +1 -1
- package/dist/plugin-sdk/{registry-BXmLBUZj.js → registry-tm0HFWKN.js} +7 -7
- package/dist/plugin-sdk/replies-BFjGWAPs.js +25 -0
- package/dist/plugin-sdk/{replies-CjeAGcJx.js → replies-CS2GXrd-.js} +4 -4
- package/dist/plugin-sdk/{reply-directives-OuX5Mba_.js → reply-directives-hfOVgXpA.js} +2 -2
- package/dist/plugin-sdk/{reply-prefix-C83iSHUo.js → reply-prefix-BKQgC6Vj.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-BLBv69wV.js → resolve-route-tqQv32nr.js} +5 -5
- package/dist/plugin-sdk/runs-CPA1-H-2.js +25 -0
- package/dist/plugin-sdk/{runs-B4G4Txj3.js → runs-H2FY7UEk.js} +8 -8
- package/dist/plugin-sdk/{send-BwoWjRrJ.js → send-BMhuEEtY.js} +9 -9
- package/dist/plugin-sdk/{send-BUAw8fe4.js → send-BjR1QHnz.js} +7 -7
- package/dist/plugin-sdk/{send-B2Kip2qd.js → send-CEtGyK32.js} +8 -8
- package/dist/plugin-sdk/{send-Tg5PT6ci.js → send-CF3PEjRy.js} +14 -14
- package/dist/plugin-sdk/send-CRtSAH8I.js +25 -0
- package/dist/plugin-sdk/send-CzxwgKvR.js +27 -0
- package/dist/plugin-sdk/{send-D_2cxLLi.js → send-DUJMd2d7.js} +20 -20
- package/dist/plugin-sdk/{send-CfSEKKlU.js → send-DdPdUcD0.js} +6 -6
- package/dist/plugin-sdk/send-DuCB2xbl.js +23 -0
- package/dist/plugin-sdk/send-DyYaWr3E.js +24 -0
- package/dist/plugin-sdk/{session-meta-D3W538Wj.js → session-meta-oR-S9C5J.js} +3 -3
- package/dist/plugin-sdk/{skill-commands-ByVQek_m.js → skill-commands-Bh43SlDc.js} +6 -6
- package/dist/plugin-sdk/{skills-BGgry_YW.js → skills-CatBv8W4.js} +6 -6
- package/dist/plugin-sdk/{store-C6ZLKWUS.js → store-6JKvp2Zu.js} +2 -2
- package/dist/plugin-sdk/subagent-registry-CAdT47aY.js +61 -0
- package/dist/plugin-sdk/{subsystem-0F3fEqJW.js → subsystem-CchgWuXK.js} +4 -4
- package/dist/plugin-sdk/{tables-BCSRuiq_.js → tables-BPCP4CpE.js} +1 -1
- package/dist/plugin-sdk/testing.js +55 -55
- package/dist/plugin-sdk/{tokens-O0pGqOuf.js → tokens-Cioh8xR5.js} +1 -1
- package/dist/plugin-sdk/{tool-loop-detection-BG8uP1aD.js → tool-loop-detection-BN0lIxLx.js} +1 -1
- package/dist/plugin-sdk/{tools-Sk-IqHBP.js → tools-3raTfdu5.js} +102 -102
- package/dist/plugin-sdk/{user-run-recording-iS-qLIN9.js → user-run-recording-DlpzQk0X.js} +3 -3
- package/dist/{provider-image-Cb4z6zUu.js → provider-image-BllyLBJM.js} +5 -5
- package/dist/{proxy-env-i0jn5uxB.js → proxy-env-CzGKpJY_.js} +2 -2
- package/dist/{proxy-C9sq6M-h.js → proxy-fWL7CKDP.js} +1 -1
- package/dist/{proxy-fetch-CK5AQAYw.js → proxy-fetch-DCI0KuH6.js} +1 -1
- package/dist/{pw-ai-DziGw6Jy.js → pw-ai-CXSJw34w.js} +14 -14
- package/dist/{qmd-manager-p036XU01.js → qmd-manager-BwZ0V5fL.js} +10 -10
- package/dist/{query-expansion-30x7RlZY.js → query-expansion-31VWpPCz.js} +5 -5
- package/dist/{recorder-C_ViZLf1.js → recorder-DNRxe9C8.js} +4 -4
- package/dist/{plugin-sdk/redact-BEcZiZI1.js → redact-DZne_lu8.js} +1 -1
- package/dist/{replies-BsctLhfp.js → replies-NkETqb6B.js} +4 -4
- package/dist/{reply-directives-D9wYtPPy.js → reply-directives-DGITtNUL.js} +2 -2
- package/dist/{reply-prefix-C7WlN3qm.js → reply-prefix-DVkNDBNe.js} +1 -1
- package/dist/{resolve-route-BV8k5qjX.js → resolve-route-jDAjkfZE.js} +5 -5
- package/dist/{runs-ucQd8Fc-.js → runs-DGWNXyKA.js} +8 -8
- package/dist/{send-Tx-ew59_.js → send-CNLmncRW.js} +6 -6
- package/dist/{send-TscXeVY8.js → send-DEFcgo-1.js} +27 -27
- package/dist/{send-BGps2i_C.js → send-Do1AlhD5.js} +8 -8
- package/dist/{send-BiDcVZSc.js → send-Dq8ChBfS.js} +6 -6
- package/dist/{send-Ba3pDq6E.js → send-ENMm5qbW.js} +7 -7
- package/dist/{session-meta-DH__PMKt.js → session-meta-DuK_BrWT.js} +2 -2
- package/dist/{skill-commands-CRZajtK_.js → skill-commands-BhMQp_i8.js} +9 -9
- package/dist/{skills-DOc6uEd1.js → skills-ckuLxkyg.js} +21 -21
- package/dist/{store-xxN6qyAh.js → store-gQ6FSjVk.js} +2 -2
- package/dist/{subsystem-BCjklMkJ.js → subsystem-CPYnUTN4.js} +64 -64
- package/dist/{tables-o3ZpyPWV.js → tables-DEyD0zuy.js} +1 -1
- package/dist/{tokens-9Mla_HDp.js → tokens-9BPY4SaX.js} +1 -1
- package/dist/{tool-loop-detection-8uvf8mSd.js → tool-loop-detection-C1fqyXXD.js} +2 -2
- package/dist/{user-run-recording-CAk1Ketk.js → user-run-recording-B0XAAUwL.js} +2 -2
- package/dist/{workspace-Dbn4gFdH.js → workspace-B707AGIc.js} +9 -9
- 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/elevenlabs/src/streaming-speech-provider-faults.test.ts +2 -2
- package/extensions/elevenlabs/src/streaming-speech-provider.test.ts +19 -5
- package/extensions/elevenlabs/src/streaming-speech-provider.ts +3 -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/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/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/plugin-sdk/agent-turn-execute-BRJa_EBt.js +0 -61
- package/dist/plugin-sdk/deliver-DZoYhDxC.js +0 -32
- package/dist/plugin-sdk/manager-Bqpqu2GS.js +0 -16
- package/dist/plugin-sdk/provider-dispatcher-NB8R-FyS.js +0 -61
- package/dist/plugin-sdk/provider-image-g3vmjlkZ.js +0 -22
- package/dist/plugin-sdk/replies-0gHRQjbA.js +0 -25
- package/dist/plugin-sdk/runs-Dzlj-BO5.js +0 -25
- package/dist/plugin-sdk/send-COofA0BG.js +0 -23
- package/dist/plugin-sdk/send-DHNKlQPv.js +0 -27
- package/dist/plugin-sdk/send-NUHfC-G_.js +0 -25
- package/dist/plugin-sdk/send-Tm5-7bLz.js +0 -24
- package/dist/plugin-sdk/subagent-registry-B5xaoVWq.js +0 -61
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { d as resolveRequiredHomeDir, l as expandHomePrefix, r as resolveConfigPath, u as resolveEffectiveHomeDir } from "./paths-
|
|
1
|
+
import { d as resolveRequiredHomeDir, l as expandHomePrefix, r as resolveConfigPath, u as resolveEffectiveHomeDir } from "./paths-C6TxBCvO.js";
|
|
2
2
|
import { t as isPlainObject } from "./plain-object-CLm2c5Nu.js";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
|
-
import
|
|
6
|
+
import syncFs from "node:fs";
|
|
7
7
|
import chalk, { Chalk } from "chalk";
|
|
8
8
|
import { Logger } from "tslog";
|
|
9
|
-
import
|
|
9
|
+
import json5 from "json5";
|
|
10
10
|
import util, { promisify } from "node:util";
|
|
11
11
|
import zlib from "node:zlib";
|
|
12
12
|
|
|
@@ -57,15 +57,15 @@ function getCommandPathInternal(argv, depth, opts) {
|
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/infra/tmp-openclaw-dir.ts
|
|
59
59
|
const POSIX_OPENCLAW_TMP_DIR = "/tmp/openclaw";
|
|
60
|
-
const TMP_DIR_ACCESS_MODE =
|
|
60
|
+
const TMP_DIR_ACCESS_MODE = syncFs.constants.W_OK | syncFs.constants.X_OK;
|
|
61
61
|
function isNodeErrorWithCode(err, code) {
|
|
62
62
|
return typeof err === "object" && err !== null && "code" in err && err.code === code;
|
|
63
63
|
}
|
|
64
64
|
function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
65
|
-
const accessSync = options.accessSync ??
|
|
66
|
-
const chmodSync = options.chmodSync ??
|
|
67
|
-
const lstatSync = options.lstatSync ??
|
|
68
|
-
const mkdirSync = options.mkdirSync ??
|
|
65
|
+
const accessSync = options.accessSync ?? syncFs.accessSync;
|
|
66
|
+
const chmodSync = options.chmodSync ?? syncFs.chmodSync;
|
|
67
|
+
const lstatSync = options.lstatSync ?? syncFs.lstatSync;
|
|
68
|
+
const mkdirSync = options.mkdirSync ?? syncFs.mkdirSync;
|
|
69
69
|
const warn = options.warn ?? ((message) => console.warn(message));
|
|
70
70
|
const getuid = options.getuid ?? (() => {
|
|
71
71
|
try {
|
|
@@ -156,14 +156,14 @@ function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region src/utils.ts
|
|
158
158
|
async function ensureDir(dir) {
|
|
159
|
-
await
|
|
159
|
+
await syncFs.promises.mkdir(dir, { recursive: true });
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
162
|
* Check if a file or directory exists at the given path.
|
|
163
163
|
*/
|
|
164
164
|
async function pathExists$1(targetPath) {
|
|
165
165
|
try {
|
|
166
|
-
await
|
|
166
|
+
await syncFs.promises.access(targetPath);
|
|
167
167
|
return true;
|
|
168
168
|
} catch {
|
|
169
169
|
return false;
|
|
@@ -253,7 +253,7 @@ function resolveConfigDir(env = process.env, homedir = os.homedir) {
|
|
|
253
253
|
if (override) return resolveUserPath(override);
|
|
254
254
|
const newDir = path.join(resolveRequiredHomeDir(env, homedir), ".openclaw");
|
|
255
255
|
try {
|
|
256
|
-
if (
|
|
256
|
+
if (syncFs.existsSync(newDir)) return newDir;
|
|
257
257
|
} catch {}
|
|
258
258
|
return newDir;
|
|
259
259
|
}
|
|
@@ -851,7 +851,7 @@ function resolveBoundaryPathLexicalSync(params) {
|
|
|
851
851
|
rootCanonicalPath: params.rootCanonicalPath,
|
|
852
852
|
resolveParams: params.params,
|
|
853
853
|
absolutePath: params.absolutePath,
|
|
854
|
-
read: (cursor) =>
|
|
854
|
+
read: (cursor) => syncFs.lstatSync(cursor)
|
|
855
855
|
});
|
|
856
856
|
if (isPromiseLike(maybeStat)) throw new Error("Unexpected async lexical stat");
|
|
857
857
|
const stat = maybeStat;
|
|
@@ -997,15 +997,15 @@ function resolvePathViaExistingAncestorSync(targetPath) {
|
|
|
997
997
|
const normalized = path.resolve(targetPath);
|
|
998
998
|
let cursor = normalized;
|
|
999
999
|
const missingSuffix = [];
|
|
1000
|
-
while (!isFilesystemRoot(cursor) && !
|
|
1000
|
+
while (!isFilesystemRoot(cursor) && !syncFs.existsSync(cursor)) {
|
|
1001
1001
|
missingSuffix.unshift(path.basename(cursor));
|
|
1002
1002
|
const parent = path.dirname(cursor);
|
|
1003
1003
|
if (parent === cursor) break;
|
|
1004
1004
|
cursor = parent;
|
|
1005
1005
|
}
|
|
1006
|
-
if (!
|
|
1006
|
+
if (!syncFs.existsSync(cursor)) return normalized;
|
|
1007
1007
|
try {
|
|
1008
|
-
const resolvedAncestor = path.resolve(
|
|
1008
|
+
const resolvedAncestor = path.resolve(syncFs.realpathSync(cursor));
|
|
1009
1009
|
if (missingSuffix.length === 0) return resolvedAncestor;
|
|
1010
1010
|
return path.resolve(resolvedAncestor, ...missingSuffix);
|
|
1011
1011
|
} catch {
|
|
@@ -1030,7 +1030,7 @@ function getPathKindSync(absolutePath, preserveFinalSymlink) {
|
|
|
1030
1030
|
try {
|
|
1031
1031
|
return {
|
|
1032
1032
|
exists: true,
|
|
1033
|
-
kind: toResolvedKind(preserveFinalSymlink ?
|
|
1033
|
+
kind: toResolvedKind(preserveFinalSymlink ? syncFs.lstatSync(absolutePath) : syncFs.statSync(absolutePath))
|
|
1034
1034
|
};
|
|
1035
1035
|
} catch (error) {
|
|
1036
1036
|
if (isNotFoundPathError(error)) return {
|
|
@@ -1090,10 +1090,10 @@ async function resolveSymlinkHopPath(symlinkPath) {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
function resolveSymlinkHopPathSync(symlinkPath) {
|
|
1092
1092
|
try {
|
|
1093
|
-
return path.resolve(
|
|
1093
|
+
return path.resolve(syncFs.realpathSync(symlinkPath));
|
|
1094
1094
|
} catch (error) {
|
|
1095
1095
|
if (!isNotFoundPathError(error)) throw error;
|
|
1096
|
-
const linkTarget =
|
|
1096
|
+
const linkTarget = syncFs.readlinkSync(symlinkPath);
|
|
1097
1097
|
return resolvePathViaExistingAncestorSync(path.resolve(path.dirname(symlinkPath), linkTarget));
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
@@ -1119,7 +1119,7 @@ function sameFileIdentity(left, right) {
|
|
|
1119
1119
|
return sameFileIdentity$1(left, right);
|
|
1120
1120
|
}
|
|
1121
1121
|
function openVerifiedFileSync(params) {
|
|
1122
|
-
const ioFs = params.ioFs ??
|
|
1122
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
1123
1123
|
const allowedType = params.allowedType ?? "file";
|
|
1124
1124
|
const openReadFlags = ioFs.constants.O_RDONLY | (typeof ioFs.constants.O_NOFOLLOW === "number" ? ioFs.constants.O_NOFOLLOW : 0);
|
|
1125
1125
|
let fd = null;
|
|
@@ -1196,7 +1196,7 @@ function canUseBoundaryFileOpen(ioFs) {
|
|
|
1196
1196
|
return typeof ioFs.openSync === "function" && typeof ioFs.closeSync === "function" && typeof ioFs.fstatSync === "function" && typeof ioFs.lstatSync === "function" && typeof ioFs.realpathSync === "function" && typeof ioFs.readFileSync === "function" && typeof ioFs.constants === "object" && ioFs.constants !== null;
|
|
1197
1197
|
}
|
|
1198
1198
|
function openBoundaryFileSync(params) {
|
|
1199
|
-
const ioFs = params.ioFs ??
|
|
1199
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
1200
1200
|
const resolved = resolveBoundaryFilePathGeneric({
|
|
1201
1201
|
absolutePath: params.absolutePath,
|
|
1202
1202
|
resolve: (absolutePath) => resolveBoundaryPathSync({
|
|
@@ -1247,7 +1247,7 @@ function finalizeBoundaryFileOpen(params) {
|
|
|
1247
1247
|
});
|
|
1248
1248
|
}
|
|
1249
1249
|
async function openBoundaryFile(params) {
|
|
1250
|
-
const ioFs = params.ioFs ??
|
|
1250
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
1251
1251
|
const maybeResolved = resolveBoundaryFilePathGeneric({
|
|
1252
1252
|
absolutePath: params.absolutePath,
|
|
1253
1253
|
resolve: (absolutePath) => resolveBoundaryPath({
|
|
@@ -1302,7 +1302,7 @@ function isPathInside(basePath, candidatePath) {
|
|
|
1302
1302
|
}
|
|
1303
1303
|
function safeRealpathSync(filePath) {
|
|
1304
1304
|
try {
|
|
1305
|
-
return
|
|
1305
|
+
return syncFs.realpathSync(filePath);
|
|
1306
1306
|
} catch {
|
|
1307
1307
|
return null;
|
|
1308
1308
|
}
|
|
@@ -1423,7 +1423,7 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
1423
1423
|
const normalized = path.normalize(resolved);
|
|
1424
1424
|
if (!isPathInside(this.rootDir, normalized)) throw new ConfigIncludeError(`Include path escapes config directory: ${includePath} (root: ${this.rootDir})`, includePath);
|
|
1425
1425
|
try {
|
|
1426
|
-
const real =
|
|
1426
|
+
const real = syncFs.realpathSync(normalized);
|
|
1427
1427
|
if (!isPathInside(this.rootRealDir, real)) throw new ConfigIncludeError(`Include path resolves outside config directory (symlink): ${includePath} (root: ${this.rootDir})`, includePath);
|
|
1428
1428
|
} catch (err) {
|
|
1429
1429
|
if (err instanceof ConfigIncludeError) throw err;
|
|
@@ -1465,13 +1465,13 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
1465
1465
|
};
|
|
1466
1466
|
function safeRealpath(target) {
|
|
1467
1467
|
try {
|
|
1468
|
-
return
|
|
1468
|
+
return syncFs.realpathSync(target);
|
|
1469
1469
|
} catch {
|
|
1470
1470
|
return target;
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
1473
|
function readConfigIncludeFileWithGuards(params) {
|
|
1474
|
-
const ioFs = params.ioFs ??
|
|
1474
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
1475
1475
|
const maxBytes = params.maxBytes ?? MAX_INCLUDE_FILE_BYTES;
|
|
1476
1476
|
if (!canUseBoundaryFileOpen(ioFs)) return ioFs.readFileSync(params.resolvedPath, "utf-8");
|
|
1477
1477
|
const opened = openBoundaryFileSync({
|
|
@@ -1494,13 +1494,13 @@ function readConfigIncludeFileWithGuards(params) {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
const defaultResolver = {
|
|
1497
|
-
readFile: (p) =>
|
|
1497
|
+
readFile: (p) => syncFs.readFileSync(p, "utf-8"),
|
|
1498
1498
|
readFileWithGuards: ({ includePath, resolvedPath, rootRealDir }) => readConfigIncludeFileWithGuards({
|
|
1499
1499
|
includePath,
|
|
1500
1500
|
resolvedPath,
|
|
1501
1501
|
rootRealDir
|
|
1502
1502
|
}),
|
|
1503
|
-
parseJson: (raw) =>
|
|
1503
|
+
parseJson: (raw) => json5.parse(raw)
|
|
1504
1504
|
};
|
|
1505
1505
|
/**
|
|
1506
1506
|
* Resolves all $include directives in a parsed config object.
|
|
@@ -1555,16 +1555,16 @@ function normalizeConfigPaths(cfg) {
|
|
|
1555
1555
|
function readLoggingConfig() {
|
|
1556
1556
|
const configPath = resolveConfigPath();
|
|
1557
1557
|
try {
|
|
1558
|
-
if (!
|
|
1559
|
-
const raw =
|
|
1560
|
-
const resolvedIncludes = resolveConfigIncludes(
|
|
1561
|
-
readFile: (candidate) =>
|
|
1558
|
+
if (!syncFs.existsSync(configPath)) return;
|
|
1559
|
+
const raw = syncFs.readFileSync(configPath, "utf-8");
|
|
1560
|
+
const resolvedIncludes = resolveConfigIncludes(json5.parse(raw), configPath, {
|
|
1561
|
+
readFile: (candidate) => syncFs.readFileSync(candidate, "utf-8"),
|
|
1562
1562
|
readFileWithGuards: ({ includePath, resolvedPath, rootRealDir }) => readConfigIncludeFileWithGuards({
|
|
1563
1563
|
includePath,
|
|
1564
1564
|
resolvedPath,
|
|
1565
1565
|
rootRealDir
|
|
1566
1566
|
}),
|
|
1567
|
-
parseJson: (includeRaw) =>
|
|
1567
|
+
parseJson: (includeRaw) => json5.parse(includeRaw)
|
|
1568
1568
|
});
|
|
1569
1569
|
if (resolvedIncludes && typeof resolvedIncludes === "object" && "env" in resolvedIncludes) applyConfigEnvVars(resolvedIncludes);
|
|
1570
1570
|
const resolvedConfig = resolveConfigEnvVars(resolvedIncludes);
|
|
@@ -1748,7 +1748,7 @@ function rotateFileLog(filePath, policy, options = {}) {
|
|
|
1748
1748
|
skipped: true
|
|
1749
1749
|
};
|
|
1750
1750
|
if (policy.maxBackups <= 0) {
|
|
1751
|
-
|
|
1751
|
+
syncFs.rmSync(filePath, { force: true });
|
|
1752
1752
|
return {
|
|
1753
1753
|
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1754
1754
|
compressed: policy.compress === "gzip"
|
|
@@ -1757,9 +1757,9 @@ function rotateFileLog(filePath, policy, options = {}) {
|
|
|
1757
1757
|
rotateExistingBackups(filePath, policy.maxBackups);
|
|
1758
1758
|
const backup = `${filePath}.1${policy.compress === "gzip" ? ".gz" : ""}`;
|
|
1759
1759
|
if (policy.compress === "gzip") {
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
} else
|
|
1760
|
+
syncFs.writeFileSync(backup, zlib.gzipSync(syncFs.readFileSync(filePath)), { mode: options.fileMode });
|
|
1761
|
+
syncFs.rmSync(filePath, { force: true });
|
|
1762
|
+
} else syncFs.renameSync(filePath, backup);
|
|
1763
1763
|
pruneExcessBackups(filePath, policy.maxBackups);
|
|
1764
1764
|
return {
|
|
1765
1765
|
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -1808,7 +1808,7 @@ function appendWithState(state, line, opts) {
|
|
|
1808
1808
|
async function appendNowAsync(state, policy, line, queuedBytes, opts) {
|
|
1809
1809
|
try {
|
|
1810
1810
|
state.activeOperation = "append";
|
|
1811
|
-
await
|
|
1811
|
+
await syncFs.promises.mkdir(path.dirname(policy.file), { recursive: true });
|
|
1812
1812
|
const currentBytes = await currentFileBytesAsync(policy.file);
|
|
1813
1813
|
if (currentBytes + queuedBytes > policy.maxFileBytes && currentBytes > 0) {
|
|
1814
1814
|
state.activeOperation = "rotate";
|
|
@@ -1817,13 +1817,13 @@ async function appendNowAsync(state, policy, line, queuedBytes, opts) {
|
|
|
1817
1817
|
strict: opts.strict
|
|
1818
1818
|
});
|
|
1819
1819
|
const rotationLine = state.lastRotation ? opts.onRotate?.(state.lastRotation) : void 0;
|
|
1820
|
-
if (rotationLine) await
|
|
1820
|
+
if (rotationLine) await syncFs.promises.appendFile(policy.file, rotationLine, {
|
|
1821
1821
|
encoding: "utf8",
|
|
1822
1822
|
mode: opts.fileMode
|
|
1823
1823
|
});
|
|
1824
1824
|
}
|
|
1825
1825
|
state.activeOperation = "append";
|
|
1826
|
-
await
|
|
1826
|
+
await syncFs.promises.appendFile(policy.file, line, {
|
|
1827
1827
|
encoding: "utf8",
|
|
1828
1828
|
mode: opts.fileMode
|
|
1829
1829
|
});
|
|
@@ -1838,7 +1838,7 @@ async function appendNowAsync(state, policy, line, queuedBytes, opts) {
|
|
|
1838
1838
|
function appendNow(state, policy, line, queuedBytes, opts) {
|
|
1839
1839
|
try {
|
|
1840
1840
|
state.activeOperation = "append";
|
|
1841
|
-
|
|
1841
|
+
syncFs.mkdirSync(path.dirname(policy.file), { recursive: true });
|
|
1842
1842
|
const currentBytes = currentFileBytes(policy.file);
|
|
1843
1843
|
if (currentBytes + queuedBytes > policy.maxFileBytes && currentBytes > 0) {
|
|
1844
1844
|
state.activeOperation = "rotate";
|
|
@@ -1847,13 +1847,13 @@ function appendNow(state, policy, line, queuedBytes, opts) {
|
|
|
1847
1847
|
strict: opts.strict
|
|
1848
1848
|
});
|
|
1849
1849
|
const rotationLine = state.lastRotation ? opts.onRotate?.(state.lastRotation) : void 0;
|
|
1850
|
-
if (rotationLine)
|
|
1850
|
+
if (rotationLine) syncFs.appendFileSync(policy.file, rotationLine, {
|
|
1851
1851
|
encoding: "utf8",
|
|
1852
1852
|
mode: opts.fileMode
|
|
1853
1853
|
});
|
|
1854
1854
|
}
|
|
1855
1855
|
state.activeOperation = "append";
|
|
1856
|
-
|
|
1856
|
+
syncFs.appendFileSync(policy.file, line, {
|
|
1857
1857
|
encoding: "utf8",
|
|
1858
1858
|
mode: opts.fileMode
|
|
1859
1859
|
});
|
|
@@ -1888,7 +1888,7 @@ async function rotateFileLogAsync(filePath, policy, options = {}) {
|
|
|
1888
1888
|
skipped: true
|
|
1889
1889
|
};
|
|
1890
1890
|
if (policy.maxBackups <= 0) {
|
|
1891
|
-
await
|
|
1891
|
+
await syncFs.promises.rm(filePath, { force: true });
|
|
1892
1892
|
return {
|
|
1893
1893
|
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1894
1894
|
compressed: policy.compress === "gzip"
|
|
@@ -1897,9 +1897,9 @@ async function rotateFileLogAsync(filePath, policy, options = {}) {
|
|
|
1897
1897
|
await rotateExistingBackupsAsync(filePath, policy.maxBackups);
|
|
1898
1898
|
const backup = `${filePath}.1${policy.compress === "gzip" ? ".gz" : ""}`;
|
|
1899
1899
|
if (policy.compress === "gzip") {
|
|
1900
|
-
await
|
|
1901
|
-
await
|
|
1902
|
-
} else await
|
|
1900
|
+
await syncFs.promises.writeFile(backup, await gzipAsync(await syncFs.promises.readFile(filePath)), { mode: options.fileMode });
|
|
1901
|
+
await syncFs.promises.rm(filePath, { force: true });
|
|
1902
|
+
} else await syncFs.promises.rename(filePath, backup);
|
|
1903
1903
|
await pruneExcessBackupsAsync(filePath, policy.maxBackups);
|
|
1904
1904
|
return {
|
|
1905
1905
|
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -1918,39 +1918,39 @@ async function rotateFileLogAsync(filePath, policy, options = {}) {
|
|
|
1918
1918
|
function rotateExistingBackups(filePath, maxBackups) {
|
|
1919
1919
|
for (const backup of listBackupEntries(filePath).toSorted((a, b) => b.slot - a.slot)) {
|
|
1920
1920
|
if (backup.slot >= maxBackups) {
|
|
1921
|
-
|
|
1921
|
+
syncFs.rmSync(backup.path, { force: true });
|
|
1922
1922
|
continue;
|
|
1923
1923
|
}
|
|
1924
1924
|
const target = `${filePath}.${backup.slot + 1}${backup.suffix}`;
|
|
1925
|
-
|
|
1926
|
-
|
|
1925
|
+
syncFs.rmSync(target, { force: true });
|
|
1926
|
+
syncFs.renameSync(backup.path, target);
|
|
1927
1927
|
}
|
|
1928
1928
|
}
|
|
1929
1929
|
async function rotateExistingBackupsAsync(filePath, maxBackups) {
|
|
1930
1930
|
for (const backup of (await listBackupEntriesAsync(filePath)).toSorted((a, b) => b.slot - a.slot)) {
|
|
1931
1931
|
if (backup.slot >= maxBackups) {
|
|
1932
|
-
await
|
|
1932
|
+
await syncFs.promises.rm(backup.path, { force: true });
|
|
1933
1933
|
continue;
|
|
1934
1934
|
}
|
|
1935
1935
|
const target = `${filePath}.${backup.slot + 1}${backup.suffix}`;
|
|
1936
|
-
await
|
|
1937
|
-
await
|
|
1936
|
+
await syncFs.promises.rm(target, { force: true });
|
|
1937
|
+
await syncFs.promises.rename(backup.path, target);
|
|
1938
1938
|
}
|
|
1939
1939
|
}
|
|
1940
1940
|
function pruneExcessBackups(filePath, maxBackups) {
|
|
1941
1941
|
const retained = listBackupEntries(filePath).toSorted((a, b) => a.slot - b.slot || b.mtimeMs - a.mtimeMs);
|
|
1942
|
-
for (const backup of retained.slice(maxBackups))
|
|
1942
|
+
for (const backup of retained.slice(maxBackups)) syncFs.rmSync(backup.path, { force: true });
|
|
1943
1943
|
}
|
|
1944
1944
|
async function pruneExcessBackupsAsync(filePath, maxBackups) {
|
|
1945
1945
|
const retained = (await listBackupEntriesAsync(filePath)).toSorted((a, b) => a.slot - b.slot || b.mtimeMs - a.mtimeMs);
|
|
1946
|
-
for (const backup of retained.slice(maxBackups)) await
|
|
1946
|
+
for (const backup of retained.slice(maxBackups)) await syncFs.promises.rm(backup.path, { force: true });
|
|
1947
1947
|
}
|
|
1948
1948
|
function listBackupEntries(filePath) {
|
|
1949
1949
|
const dir = path.dirname(filePath);
|
|
1950
1950
|
const base = path.basename(filePath).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1951
1951
|
let names = [];
|
|
1952
1952
|
try {
|
|
1953
|
-
names =
|
|
1953
|
+
names = syncFs.readdirSync(dir);
|
|
1954
1954
|
} catch {
|
|
1955
1955
|
return [];
|
|
1956
1956
|
}
|
|
@@ -1961,7 +1961,7 @@ function listBackupEntries(filePath) {
|
|
|
1961
1961
|
const backupPath = path.join(dir, name);
|
|
1962
1962
|
let mtimeMs = 0;
|
|
1963
1963
|
try {
|
|
1964
|
-
mtimeMs =
|
|
1964
|
+
mtimeMs = syncFs.statSync(backupPath).mtimeMs;
|
|
1965
1965
|
} catch {
|
|
1966
1966
|
return [];
|
|
1967
1967
|
}
|
|
@@ -1978,7 +1978,7 @@ async function listBackupEntriesAsync(filePath) {
|
|
|
1978
1978
|
const base = path.basename(filePath).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1979
1979
|
let names = [];
|
|
1980
1980
|
try {
|
|
1981
|
-
names = await
|
|
1981
|
+
names = await syncFs.promises.readdir(dir);
|
|
1982
1982
|
} catch {
|
|
1983
1983
|
return [];
|
|
1984
1984
|
}
|
|
@@ -1988,7 +1988,7 @@ async function listBackupEntriesAsync(filePath) {
|
|
|
1988
1988
|
if (!match) return null;
|
|
1989
1989
|
const backupPath = path.join(dir, name);
|
|
1990
1990
|
try {
|
|
1991
|
-
const stat = await
|
|
1991
|
+
const stat = await syncFs.promises.stat(backupPath);
|
|
1992
1992
|
return {
|
|
1993
1993
|
path: backupPath,
|
|
1994
1994
|
slot: Number(match[1]),
|
|
@@ -2002,14 +2002,14 @@ async function listBackupEntriesAsync(filePath) {
|
|
|
2002
2002
|
}
|
|
2003
2003
|
function currentFileBytes(filePath) {
|
|
2004
2004
|
try {
|
|
2005
|
-
return
|
|
2005
|
+
return syncFs.statSync(filePath).size;
|
|
2006
2006
|
} catch {
|
|
2007
2007
|
return 0;
|
|
2008
2008
|
}
|
|
2009
2009
|
}
|
|
2010
2010
|
async function currentFileBytesAsync(filePath) {
|
|
2011
2011
|
try {
|
|
2012
|
-
return (await
|
|
2012
|
+
return (await syncFs.promises.stat(filePath)).size;
|
|
2013
2013
|
} catch {
|
|
2014
2014
|
return 0;
|
|
2015
2015
|
}
|
|
@@ -2158,7 +2158,7 @@ function buildLogger(settings) {
|
|
|
2158
2158
|
for (const transport of externalTransports) attachExternalTransport(logger, transport);
|
|
2159
2159
|
return logger;
|
|
2160
2160
|
}
|
|
2161
|
-
|
|
2161
|
+
syncFs.mkdirSync(path.dirname(settings.file), { recursive: true });
|
|
2162
2162
|
if (isRollingPath(settings.file)) pruneOldRollingLogs(path.dirname(settings.file));
|
|
2163
2163
|
const primaryPolicy = resolveFileLogProfile(settings.writerConfig, "primary", {
|
|
2164
2164
|
file: settings.file,
|
|
@@ -2229,7 +2229,7 @@ function isRollingPath(file) {
|
|
|
2229
2229
|
}
|
|
2230
2230
|
function pruneOldRollingLogs(dir) {
|
|
2231
2231
|
try {
|
|
2232
|
-
const entries =
|
|
2232
|
+
const entries = syncFs.readdirSync(dir, { withFileTypes: true });
|
|
2233
2233
|
const cutoff = Date.now() - MAX_LOG_AGE_MS;
|
|
2234
2234
|
for (const entry of entries) {
|
|
2235
2235
|
if (!entry.isFile()) continue;
|
|
@@ -2237,13 +2237,13 @@ function pruneOldRollingLogs(dir) {
|
|
|
2237
2237
|
const backupDateMs = rollingBackupDateMs(entry.name);
|
|
2238
2238
|
if (backupDateMs !== null) {
|
|
2239
2239
|
if (backupDateMs < cutoff) try {
|
|
2240
|
-
|
|
2240
|
+
syncFs.rmSync(fullPath, { force: true });
|
|
2241
2241
|
} catch {}
|
|
2242
2242
|
continue;
|
|
2243
2243
|
}
|
|
2244
2244
|
if (!entry.name.startsWith(`${LOG_PREFIX}-`) || !entry.name.endsWith(LOG_SUFFIX)) continue;
|
|
2245
2245
|
try {
|
|
2246
|
-
if (
|
|
2246
|
+
if (syncFs.statSync(fullPath).mtimeMs < cutoff) syncFs.rmSync(fullPath, { force: true });
|
|
2247
2247
|
} catch {}
|
|
2248
2248
|
}
|
|
2249
2249
|
} catch {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./paths-
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
1
|
+
import "./paths-C6TxBCvO.js";
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-CPYnUTN4.js";
|
|
3
3
|
import { t as isPlainObject } from "./plain-object-CLm2c5Nu.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-CPYnUTN4.js";
|
|
3
3
|
import { t as CommandLane } from "./lanes-DTaUAkeG.js";
|
|
4
|
-
import { a as resolveSessionRunStore, i as summarizeSessionRunPrompt, n as deriveSessionRunId, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-
|
|
4
|
+
import { a as resolveSessionRunStore, i as summarizeSessionRunPrompt, n as deriveSessionRunId, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-DNRxe9C8.js";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
|
|
7
7
|
//#region src/agents/lanes.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as resolveRequiredHomeDir } from "./paths-
|
|
2
|
-
import { P as openBoundaryFile, at as pathExists, h as shouldLogVerbose, j as isBlockedObjectKey, st as resolveUserPath, u as danger } from "./subsystem-
|
|
3
|
-
import { n as logError, t as logDebug } from "./logger-
|
|
1
|
+
import { d as resolveRequiredHomeDir } from "./paths-C6TxBCvO.js";
|
|
2
|
+
import { P as openBoundaryFile, at as pathExists, h as shouldLogVerbose, j as isBlockedObjectKey, st as resolveUserPath, u as danger } from "./subsystem-CPYnUTN4.js";
|
|
3
|
+
import { n as logError, t as logDebug } from "./logger-a0-zAY5a.js";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import
|
|
7
|
+
import syncFs from "node:fs";
|
|
8
8
|
import { promisify } from "node:util";
|
|
9
9
|
import { execFile, spawn } from "node:child_process";
|
|
10
10
|
import process$1 from "node:process";
|
|
@@ -458,7 +458,7 @@ function resolveNpmArgvForWindows(argv) {
|
|
|
458
458
|
if (!cliName) return null;
|
|
459
459
|
const nodeDir = path.dirname(process$1.execPath);
|
|
460
460
|
const cliPath = path.join(nodeDir, "node_modules", "npm", "bin", cliName);
|
|
461
|
-
if (!
|
|
461
|
+
if (!syncFs.existsSync(cliPath)) return null;
|
|
462
462
|
return [
|
|
463
463
|
process$1.execPath,
|
|
464
464
|
cliPath,
|
|
@@ -663,7 +663,7 @@ async function readPackageName(dir) {
|
|
|
663
663
|
}
|
|
664
664
|
function readPackageNameSync(dir) {
|
|
665
665
|
try {
|
|
666
|
-
const raw =
|
|
666
|
+
const raw = syncFs.readFileSync(path.join(dir, "package.json"), "utf-8");
|
|
667
667
|
const parsed = JSON.parse(raw);
|
|
668
668
|
return typeof parsed.name === "string" ? parsed.name : null;
|
|
669
669
|
} catch {
|
|
@@ -691,7 +691,7 @@ function candidateDirsFromArgv1(argv1) {
|
|
|
691
691
|
const normalized = path.resolve(argv1);
|
|
692
692
|
const candidates = [path.dirname(normalized)];
|
|
693
693
|
try {
|
|
694
|
-
const resolved =
|
|
694
|
+
const resolved = syncFs.realpathSync(normalized);
|
|
695
695
|
if (resolved !== normalized) candidates.push(path.dirname(resolved));
|
|
696
696
|
} catch {}
|
|
697
697
|
const parts = normalized.split(path.sep);
|
|
@@ -791,7 +791,7 @@ function workspaceFileIdentity(stat, canonicalPath) {
|
|
|
791
791
|
}
|
|
792
792
|
function closeFileQuietlySync(fd) {
|
|
793
793
|
try {
|
|
794
|
-
|
|
794
|
+
syncFs.closeSync(fd);
|
|
795
795
|
} catch {}
|
|
796
796
|
}
|
|
797
797
|
async function readWorkspaceFileWithGuards(params) {
|
|
@@ -816,7 +816,7 @@ async function readWorkspaceFileWithGuards(params) {
|
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
818
|
try {
|
|
819
|
-
const content =
|
|
819
|
+
const content = syncFs.readFileSync(opened.fd, "utf-8");
|
|
820
820
|
workspaceFileCache.set(params.filePath, {
|
|
821
821
|
content,
|
|
822
822
|
identity
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wednesdayai/deepinfra",
|
|
3
|
-
"version": "0.4.12-dev.
|
|
3
|
+
"version": "0.4.12-dev.722+896a08cc1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "DeepInfra media understanding: Whisper audio transcription via the DeepInfra OpenAI-compatible API.",
|
|
6
6
|
"type": "module",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/dream-cycle",
|
|
3
|
-
"version": "0.4.12-dev.
|
|
3
|
+
"version": "0.4.12-dev.722+896a08cc1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "WednesdayAI dream-cycle engine — idle-time sleep stages, contemplation, adaptation, crystallisation",
|
|
6
6
|
"type": "module",
|
|
@@ -245,7 +245,7 @@ describe("ElevenLabs stream-input fault fencing", () => {
|
|
|
245
245
|
fakeWs.emit("open");
|
|
246
246
|
const frames = fakeWs.sent.map((raw) => JSON.parse(raw) as Record<string, unknown>);
|
|
247
247
|
expect(frames.at(-1)).toEqual({ text: "" });
|
|
248
|
-
expect(frames[1]).toMatchObject({ text: "queued clause", try_trigger_generation: true });
|
|
248
|
+
expect(frames[1]).toMatchObject({ text: "queued clause ", try_trigger_generation: true });
|
|
249
249
|
stream.close();
|
|
250
250
|
});
|
|
251
251
|
it("treats a missing bufferedAmount as capacity, including at the watermark boundary", () => {
|
|
@@ -352,7 +352,7 @@ describe("elevenLabsStreamingSpeechProvider.openStream", () => {
|
|
|
352
352
|
inactivityTimeout = url.searchParams.get("inactivity_timeout");
|
|
353
353
|
socket.on("message", (data) => {
|
|
354
354
|
const msg = JSON.parse(data.toString("utf8")) as { text?: string };
|
|
355
|
-
if (msg.text === "Hi") {
|
|
355
|
+
if (msg.text === "Hi ") {
|
|
356
356
|
socket.send(JSON.stringify({ audio: Buffer.from([9]).toString("base64") }));
|
|
357
357
|
}
|
|
358
358
|
});
|