wednesdayai 0.5.1-dev.25 → 0.5.1-dev.27

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.
Files changed (160) hide show
  1. package/dist/{agent-scope-BKsGMXqc.js → agent-scope-DCgndASv.js} +3 -3
  2. package/dist/{agent-turn-runner-LKV3FMwQ.js → agent-turn-runner-CX7rX8by.js} +6 -6
  3. package/dist/{api-key-rotation-DZNFm4xG.js → api-key-rotation-dv2YbGr8.js} +2 -2
  4. package/dist/{audio-preflight-DQous9JR.js → audio-preflight-Qwb3oAbc.js} +29 -29
  5. package/dist/{audio-transcription-runner-BK3cV_ad.js → audio-transcription-runner-C4eHWIy0.js} +26 -26
  6. package/dist/build-info.json +3 -3
  7. package/dist/bundled/boot-md/handler.js +60 -60
  8. package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
  9. package/dist/bundled/command-logger/handler.js +2 -2
  10. package/dist/bundled/session-journal/handler.js +60 -60
  11. package/dist/bundled/session-memory/handler.js +60 -60
  12. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  13. package/dist/{channel-activity-BAxUpg5h.js → channel-activity-Kn1_ykXE.js} +3 -3
  14. package/dist/{chat-content-BWkiC3u3.js → chat-content-CX7Bfpgy.js} +34 -34
  15. package/dist/{chrome-Dzgbe0zH.js → chrome-Bukcguhv.js} +31 -31
  16. package/dist/{chunk-Bvf22vTh.js → chunk-CEygNI3g.js} +3 -3
  17. package/dist/{command-queue-BOMFLCHM.js → command-queue-DOzYI9q4.js} +1 -1
  18. package/dist/{commands-registry-Da3c0MbL.js → commands-registry-Cof4HjvY.js} +2 -2
  19. package/dist/config.js +9 -9
  20. package/dist/{deliver-CJjQbaJE.js → deliver-BaTG7V5x.js} +29 -29
  21. package/dist/{diagnostic-Dn_o8RGN.js → diagnostic-DMrDenZI.js} +5 -5
  22. package/dist/{errors-1FTZDNVR.js → errors-COs_vQr3.js} +1 -1
  23. package/dist/{fetch-CnDdghbc.js → fetch-B1ohBh6A.js} +8 -8
  24. package/dist/{fetch-guard-B6BYdjiQ.js → fetch-guard-BXzVwvnJ.js} +3 -3
  25. package/dist/{frontmatter-DvbDhvt1.js → frontmatter-Cw_6jMAR.js} +3 -3
  26. package/dist/{fs-safe-IYMDplSg.js → fs-safe-BK5ALzKD.js} +26 -26
  27. package/dist/github-copilot-token-DYYKoDuV.js +106 -0
  28. package/dist/{image-ops-BuzZGoUm.js → image-ops-C-5VgbLB.js} +1 -1
  29. package/dist/{ir-CBsM7qoP.js → ir-DioI2VyB.js} +5 -5
  30. package/dist/{legacy-names-Ckds5WWe.js → legacy-names-CghFcfry.js} +1 -1
  31. package/dist/llm-slug-generator.js +60 -60
  32. package/dist/{logger-BeXVb5cn.js → logger-J4xjy-6D.js} +1 -1
  33. package/dist/{manager-BujYLKny.js → manager-D728Thsn.js} +18 -18
  34. package/dist/{markdown-tables-WuCFdPlC.js → markdown-tables-DfLMw9ti.js} +2 -2
  35. package/dist/{model-selection-CHi8o17y.js → model-selection-BHGpQSa9.js} +83 -83
  36. package/dist/{models-config-CAlyknIh.js → models-config-CJUMccZW.js} +2 -2
  37. package/dist/{outbound-attachment-C6mfyze2.js → outbound-attachment-DtVXUXnX.js} +2 -2
  38. package/dist/{outbound-message-hooks-jUzcd2OQ.js → outbound-message-hooks-7ErHCBLv.js} +5 -5
  39. package/dist/{path-alias-guards-BgOxr6f8.js → path-alias-guards-E9ntDORB.js} +1 -1
  40. package/dist/paths-BIDPYPVC.js +233 -0
  41. package/dist/{pi-embedded-aOKwlbog.js → pi-embedded-DpTacVAX.js} +277 -277
  42. package/dist/{pi-embedded-utils-BGvDJMAA.js → pi-embedded-utils-BAaHvb5G.js} +3 -3
  43. package/dist/{pi-model-discovery-CYfRyzsD.js → pi-model-discovery-BaH_6win.js} +7 -7
  44. package/dist/plugin-sdk/{agent-turn-execute-C6g1y27e.js → agent-turn-execute-Dg4sVJSk.js} +12 -12
  45. package/dist/plugin-sdk/{agent-turn-runner-BkP71ySA.js → agent-turn-runner-CD9Y0Gsf.js} +4 -4
  46. package/dist/plugin-sdk/{audio-preflight-CsMLbzm_.js → audio-preflight-GgmY1Zte.js} +5 -5
  47. package/dist/plugin-sdk/{audio-transcription-runner-2bpzZm3F.js → audio-transcription-runner-0gef4Ef0.js} +1 -1
  48. package/dist/plugin-sdk/{chat-content-CCOQCwrz.js → chat-content-Dpzf2nbZ.js} +3 -3
  49. package/dist/plugin-sdk/{chrome-C2bUQR0d.js → chrome-D9DwZOSC.js} +8 -8
  50. package/dist/plugin-sdk/{command-queue-J0ZpvnYU.js → command-queue-Cm8QKC0F.js} +1 -1
  51. package/dist/plugin-sdk/{deliver-CT3Lk2kq.js → deliver-CZVPDUrt.js} +1 -1
  52. package/dist/plugin-sdk/{deliver-dkNTCb3Z.js → deliver-D6hs0zDt.js} +3 -3
  53. package/dist/plugin-sdk/{diagnostic-C-Clqb63.js → diagnostic-Bi52EuT5.js} +1 -1
  54. package/dist/plugin-sdk/{monitor-BHeL2-is.js → monitor-BrUwRgsT.js} +32 -32
  55. package/dist/plugin-sdk/{pi-embedded-utils-BmeLQMRx.js → pi-embedded-utils-CeNVVYT3.js} +1 -1
  56. package/dist/plugin-sdk/{provider-dispatcher-BkEWKVLB.js → provider-dispatcher-Bx_RMlu-.js} +12 -12
  57. package/dist/plugin-sdk/{provider-image-QDVfXKph.js → provider-image-CBXOs7yQ.js} +4 -4
  58. package/dist/plugin-sdk/{provider-image-BSV8WjkR.js → provider-image-DH8Jro3J.js} +1 -1
  59. package/dist/plugin-sdk/{pw-ai-QlS2E2LB.js → pw-ai-BP4Kwaqc.js} +1 -1
  60. package/dist/plugin-sdk/{runs-8iACp6xv.js → runs-C1Lvxfri.js} +3 -3
  61. package/dist/plugin-sdk/{runs-D0UdtKVI.js → runs-DG49eFuR.js} +5 -5
  62. package/dist/plugin-sdk/{send-BP8o2l4w.js → send-BguPpGBL.js} +2 -2
  63. package/dist/plugin-sdk/{send-CYZi6dwK.js → send-CcEF6VcP.js} +1 -1
  64. package/dist/plugin-sdk/{subagent-registry-DA50ITkO.js → subagent-registry-B4EmS6cu.js} +12 -12
  65. package/dist/plugin-sdk/testing.js +12 -12
  66. package/dist/{provider-image-CNBkTbhu.js → provider-image-BSkZoSBN.js} +6 -6
  67. package/dist/{proxy-Ds4gxPy8.js → proxy-CrSpy5Aw.js} +1 -1
  68. package/dist/{proxy-env-DAf-b2bM.js → proxy-env-BxR4m86L.js} +1 -1
  69. package/dist/{proxy-fetch-M3YAp_Kv.js → proxy-fetch-g109vqdt.js} +1 -1
  70. package/dist/{pw-ai-BcibeG9a.js → pw-ai-CNTt9O_x.js} +14 -14
  71. package/dist/{qmd-manager-C3UBJiCk.js → qmd-manager-CU9iEql0.js} +12 -12
  72. package/dist/{query-expansion-BT5lS0um.js → query-expansion-B_2rETEo.js} +13 -13
  73. package/dist/{recorder-B08vNxya.js → recorder-Clg9Kbqu.js} +2 -2
  74. package/dist/{redact-CKI6SufO.js → redact-DpE5Tg36.js} +1 -1
  75. package/dist/{replies-BHkXhmOj.js → replies-Cty02S3t.js} +5 -5
  76. package/dist/{reply-directives-DkfwzHl4.js → reply-directives-BIh2AkNd.js} +2 -2
  77. package/dist/{reply-prefix-DS2s69iC.js → reply-prefix-C-DjHvQK.js} +1 -1
  78. package/dist/{resolve-route-DxuZn3_M.js → resolve-route-DKZiteo6.js} +5 -5
  79. package/dist/{runs-DFvW_PVw.js → runs-6Q7RU60m.js} +9 -9
  80. package/dist/{send-D2WSE41A.js → send-Bf4geLyV.js} +8 -8
  81. package/dist/{send-mILKKt54.js → send-CsDSBjFo.js} +6 -6
  82. package/dist/{send-yIxOvEiz.js → send-DQvfLvpJ.js} +6 -6
  83. package/dist/{send-2aTk7PU-.js → send-VDe5tGbO.js} +28 -28
  84. package/dist/{send-odd2G3DX.js → send-bwKTbNlJ.js} +7 -7
  85. package/dist/{session-meta-B8B6RwSE.js → session-meta-5XI6vLtM.js} +1 -1
  86. package/dist/{sessions-DC7A0bw-.js → sessions-DF9biCmh.js} +5 -5
  87. package/dist/{skill-commands-DdVSQNce.js → skill-commands-CAOvM2sb.js} +8 -8
  88. package/dist/{skills-BXMjgvRl.js → skills-VN1CJK6W.js} +21 -21
  89. package/dist/{store-BVdeIl7N.js → store-HgGweM4u.js} +7 -7
  90. package/dist/subsystem-BZy3aWdW.js +2761 -0
  91. package/dist/{tables-yHwb0GsI.js → tables-DkwNUhx1.js} +1 -1
  92. package/dist/{tokens-CXBau-U0.js → tokens-PMai9bNL.js} +1 -1
  93. package/dist/{tool-loop-detection-Bw8B0hV3.js → tool-loop-detection-BqyMjpvr.js} +2 -2
  94. package/dist/{user-run-recording-8MZq1Us4.js → user-run-recording-B1HujJiT.js} +2 -2
  95. package/dist/{workspace-DK2ZEkpT.js → workspace-Bj1Jegt-.js} +27 -27
  96. package/extensions/acpx/package.json +1 -1
  97. package/extensions/anthropic/package.json +1 -1
  98. package/extensions/bifrost/package.json +1 -1
  99. package/extensions/bluebubbles/package.json +1 -1
  100. package/extensions/copilot-proxy/package.json +1 -1
  101. package/extensions/deepgram/package.json +1 -1
  102. package/extensions/deepinfra/package.json +1 -1
  103. package/extensions/diagnostics-otel/package.json +1 -1
  104. package/extensions/diffs/package.json +1 -1
  105. package/extensions/discord/package.json +1 -1
  106. package/extensions/dream-cycle/package.json +1 -1
  107. package/extensions/elevenlabs/package.json +1 -1
  108. package/extensions/feishu/package.json +1 -1
  109. package/extensions/gemini-search/package.json +1 -1
  110. package/extensions/google/package.json +1 -1
  111. package/extensions/google-gemini-cli-auth/package.json +1 -1
  112. package/extensions/googlechat/package.json +1 -1
  113. package/extensions/grok-search/package.json +1 -1
  114. package/extensions/groq/package.json +1 -1
  115. package/extensions/imessage/package.json +1 -1
  116. package/extensions/irc/package.json +1 -1
  117. package/extensions/kimi-search/package.json +1 -1
  118. package/extensions/learning-core/package.json +1 -1
  119. package/extensions/line/package.json +1 -1
  120. package/extensions/llm-task/package.json +1 -1
  121. package/extensions/lobster/package.json +1 -1
  122. package/extensions/matrix/CHANGELOG.md +1 -1
  123. package/extensions/matrix/package.json +1 -1
  124. package/extensions/mattermost/package.json +1 -1
  125. package/extensions/memory-core/package.json +1 -1
  126. package/extensions/memory-lancedb/package.json +1 -1
  127. package/extensions/minimax/package.json +1 -1
  128. package/extensions/minimax-portal-auth/package.json +1 -1
  129. package/extensions/mistral/package.json +1 -1
  130. package/extensions/moonshot/package.json +1 -1
  131. package/extensions/msteams/CHANGELOG.md +1 -1
  132. package/extensions/msteams/package.json +1 -1
  133. package/extensions/nextcloud-talk/package.json +1 -1
  134. package/extensions/nostr/CHANGELOG.md +1 -1
  135. package/extensions/nostr/package.json +1 -1
  136. package/extensions/open-prose/package.json +1 -1
  137. package/extensions/openai/package.json +1 -1
  138. package/extensions/openai-realtime/package.json +1 -1
  139. package/extensions/openrouter/package.json +1 -1
  140. package/extensions/perplexity-search/package.json +1 -1
  141. package/extensions/searxng-search/package.json +1 -1
  142. package/extensions/signal/package.json +1 -1
  143. package/extensions/slack/package.json +1 -1
  144. package/extensions/synology-chat/package.json +1 -1
  145. package/extensions/telegram/package.json +1 -1
  146. package/extensions/tlon/package.json +1 -1
  147. package/extensions/twitch/CHANGELOG.md +1 -1
  148. package/extensions/twitch/package.json +1 -1
  149. package/extensions/ui-surfaces/package.json +1 -1
  150. package/extensions/voice-call/CHANGELOG.md +1 -1
  151. package/extensions/voice-call/package.json +1 -1
  152. package/extensions/whatsapp/package.json +1 -1
  153. package/extensions/zai/package.json +1 -1
  154. package/extensions/zalo/CHANGELOG.md +1 -1
  155. package/extensions/zalo/package.json +1 -1
  156. package/extensions/zalouser/CHANGELOG.md +1 -1
  157. package/extensions/zalouser/package.json +1 -1
  158. package/package.json +6 -3
  159. package/scripts/install.ps1 +329 -0
  160. package/scripts/install.sh +2479 -0
@@ -1,18 +1,18 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { _ as toAgentModelListLike, a as resolveAgentEffectiveModelPrimary, c as resolveAgentWorkspaceDir, g as resolveAgentModelPrimaryValue, l as resolveDefaultAgentId, n as listAgentIds, r as resolveAgentConfig } from "./agent-scope-BKsGMXqc.js";
3
- import { c as resolveOAuthPath, f as resolveRequiredHomeDir, i as resolveDefaultConfigCandidates, l as resolveStateDir, r as resolveConfigPath, s as resolveOAuthDir, t as DEFAULT_GATEWAY_PORT, u as expandHomePrefix } from "./paths-B_gs59ga.js";
4
- import { A as resolveConfigIncludes, D as ConfigIncludeError, E as normalizeConfigPaths, F as openBoundaryFileSync, G as applyConfigEnvVars, H as isPathInside$2, J as MissingEnvVarError, M as isPathInside$1, O as INCLUDE_KEY, X as resolveConfigEnvVars, Y as containsEnvVarReference, b as getChildLogger, dt as sleep, f as logVerbose, it as normalizeE164, j as isBlockedObjectKey, k as readConfigIncludeFileWithGuards, n as stripAnsi, ot as resolveConfigDir, q as sanitizeHostExecEnv, rt as isRecord$3, st as resolveUserPath, t as createSubsystemLogger, tt as escapeRegExp, w as createFileLogWriter } from "./subsystem-BaT-AAVZ.js";
2
+ import { _ as toAgentModelListLike, a as resolveAgentEffectiveModelPrimary, c as resolveAgentWorkspaceDir, g as resolveAgentModelPrimaryValue, l as resolveDefaultAgentId, n as listAgentIds, r as resolveAgentConfig } from "./agent-scope-DCgndASv.js";
3
+ import { c as resolveOAuthPath, f as resolveRequiredHomeDir, i as resolveDefaultConfigCandidates, l as resolveStateDir, r as resolveConfigPath, s as resolveOAuthDir, t as DEFAULT_GATEWAY_PORT, u as expandHomePrefix } from "./paths-BIDPYPVC.js";
4
+ import { A as resolveConfigIncludes, D as ConfigIncludeError, E as normalizeConfigPaths, F as openBoundaryFileSync, G as applyConfigEnvVars, H as isPathInside$2, J as MissingEnvVarError, M as isPathInside$1, O as INCLUDE_KEY, X as resolveConfigEnvVars, Y as containsEnvVarReference, b as getChildLogger, dt as sleep, f as logVerbose, it as normalizeE164, j as isBlockedObjectKey, k as readConfigIncludeFileWithGuards, n as stripAnsi, ot as resolveConfigDir, q as sanitizeHostExecEnv, rt as isRecord$3, st as resolveUserPath, t as createSubsystemLogger, tt as escapeRegExp, w as createFileLogWriter } from "./subsystem-BZy3aWdW.js";
5
5
  import { t as isPlainObject$2 } from "./plain-object-CLm2c5Nu.js";
6
- import { B as DEFAULT_ACCOUNT_ID, H as normalizeOptionalAccountId, O as expandIdentityLinksToMatchKeys, Q as parseAgentSessionKey, S as RAW_PEER_KEY_PREFIX, V as normalizeAccountId$1, _ as runExec, j as normalizeAgentId, y as DEFAULT_AGENT_ID } from "./workspace-DK2ZEkpT.js";
7
- import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-DHoyZ4I0.js";
8
- import { a as registerInternalHook, s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-Ckds5WWe.js";
6
+ import { B as DEFAULT_ACCOUNT_ID, H as normalizeOptionalAccountId, O as expandIdentityLinksToMatchKeys, Q as parseAgentSessionKey, S as RAW_PEER_KEY_PREFIX, V as normalizeAccountId$1, _ as runExec, j as normalizeAgentId, y as DEFAULT_AGENT_ID } from "./workspace-Bj1Jegt-.js";
7
+ import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-DYYKoDuV.js";
8
+ import { a as registerInternalHook, s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-CghFcfry.js";
9
9
  import { n as resolveConversationLabel, r as normalizeChatType } from "./conversation-label-CrORLc0j.js";
10
10
  import { createRequire } from "node:module";
11
11
  import path from "node:path";
12
- import syncFs from "node:fs";
12
+ import fs from "node:fs";
13
13
  import os, { userInfo } from "node:os";
14
14
  import JSON5 from "json5";
15
- import fs from "node:fs/promises";
15
+ import fs$1 from "node:fs/promises";
16
16
  import util, { isDeepStrictEqual } from "node:util";
17
17
  import { execFileSync, spawn } from "node:child_process";
18
18
  import { fileURLToPath } from "node:url";
@@ -275,7 +275,7 @@ function isValidPid(pid) {
275
275
  function isZombieProcess(pid) {
276
276
  if (process.platform !== "linux") return false;
277
277
  try {
278
- return syncFs.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
278
+ return fs.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
279
279
  } catch {
280
280
  return false;
281
281
  }
@@ -302,7 +302,7 @@ function getProcessStartTime(pid) {
302
302
  if (process.platform !== "linux") return null;
303
303
  if (!isValidPid(pid)) return null;
304
304
  try {
305
- const stat = syncFs.readFileSync(`/proc/${pid}/stat`, "utf8");
305
+ const stat = fs.readFileSync(`/proc/${pid}/stat`, "utf8");
306
306
  const commEndIndex = stat.lastIndexOf(")");
307
307
  if (commEndIndex < 0) return null;
308
308
  const fields = stat.slice(commEndIndex + 1).trimStart().split(/\s+/);
@@ -370,7 +370,7 @@ function readLinuxProcessElapsedSeconds(pid) {
370
370
  const starttimeTicks = getProcessStartTime(pid);
371
371
  if (starttimeTicks === null) {
372
372
  try {
373
- syncFs.readFileSync(`/proc/${pid}/stat`, "utf8");
373
+ fs.readFileSync(`/proc/${pid}/stat`, "utf8");
374
374
  } catch (err) {
375
375
  return err.code === "ENOENT" ? null : "unknown";
376
376
  }
@@ -378,7 +378,7 @@ function readLinuxProcessElapsedSeconds(pid) {
378
378
  }
379
379
  let uptimeSeconds;
380
380
  try {
381
- const raw = syncFs.readFileSync("/proc/uptime", "utf8");
381
+ const raw = fs.readFileSync("/proc/uptime", "utf8");
382
382
  uptimeSeconds = Number.parseFloat(raw.split(" ")[0] ?? "");
383
383
  } catch {
384
384
  return "unknown";
@@ -446,7 +446,7 @@ function isCreatedAtStale(createdAt, staleMs) {
446
446
  }
447
447
  async function readLockPayload$1(lockPath) {
448
448
  try {
449
- const raw = await fs.readFile(lockPath, "utf8");
449
+ const raw = await fs$1.readFile(lockPath, "utf8");
450
450
  const parsed = JSON.parse(raw);
451
451
  if (typeof parsed.pid !== "number" || typeof parsed.createdAt !== "string") return null;
452
452
  const payload = {
@@ -463,7 +463,7 @@ async function readLockPayload$1(lockPath) {
463
463
  }
464
464
  async function chmodIfSupported(filePath, mode) {
465
465
  try {
466
- await fs.chmod(filePath, mode);
466
+ await fs$1.chmod(filePath, mode);
467
467
  } catch (err) {
468
468
  if (process.platform === "win32") return;
469
469
  throw err;
@@ -472,15 +472,15 @@ async function chmodIfSupported(filePath, mode) {
472
472
  async function resolveNormalizedFilePath(filePath, options) {
473
473
  const resolved = path.resolve(filePath);
474
474
  const dir = path.dirname(resolved);
475
- if (options.directoryMode === void 0) await fs.mkdir(dir, { recursive: true });
475
+ if (options.directoryMode === void 0) await fs$1.mkdir(dir, { recursive: true });
476
476
  else {
477
- await fs.mkdir(dir, {
477
+ await fs$1.mkdir(dir, {
478
478
  recursive: true,
479
479
  mode: options.directoryMode
480
480
  });
481
481
  await chmodIfSupported(dir, options.directoryMode);
482
482
  }
483
- const realDir = await fs.realpath(dir);
483
+ const realDir = await fs$1.realpath(dir);
484
484
  return path.join(realDir, path.basename(resolved));
485
485
  }
486
486
  async function isStaleLock(lockPath, staleMs) {
@@ -495,7 +495,7 @@ async function isStaleLock(lockPath, staleMs) {
495
495
  return false;
496
496
  }
497
497
  try {
498
- const stat = await fs.stat(lockPath);
498
+ const stat = await fs$1.stat(lockPath);
499
499
  return Date.now() - stat.mtimeMs > staleMs;
500
500
  } catch {
501
501
  return true;
@@ -519,7 +519,7 @@ async function releaseHeldLock$1(normalizedFile) {
519
519
  throw emitLockReleaseWarning("close", current.lockPath, err);
520
520
  }
521
521
  try {
522
- await fs.rm(current.lockPath, { force: true });
522
+ await fs$1.rm(current.lockPath, { force: true });
523
523
  } catch (err) {
524
524
  current.count = 1;
525
525
  throw emitLockReleaseWarning("remove", current.lockPath, err);
@@ -542,7 +542,7 @@ async function acquireFileLock(filePath, options) {
542
542
  let attempt = 0;
543
543
  let staleReclaims = 0;
544
544
  while (attempt < attempts) try {
545
- const handle = await fs.open(lockPath, "wx");
545
+ const handle = await fs$1.open(lockPath, "wx");
546
546
  try {
547
547
  await handle.writeFile(JSON.stringify({
548
548
  pid: process.pid,
@@ -551,7 +551,7 @@ async function acquireFileLock(filePath, options) {
551
551
  }, null, 2), "utf8");
552
552
  } catch (writeErr) {
553
553
  await handle.close().catch(() => void 0);
554
- await fs.rm(lockPath, { force: true }).catch(() => void 0);
554
+ await fs$1.rm(lockPath, { force: true }).catch(() => void 0);
555
555
  throw writeErr;
556
556
  }
557
557
  HELD_LOCKS$1.set(normalizedFile, {
@@ -567,7 +567,7 @@ async function acquireFileLock(filePath, options) {
567
567
  } catch (err) {
568
568
  if (err.code !== "EEXIST") throw err;
569
569
  if (await isStaleLock(lockPath, options.stale)) {
570
- await fs.rm(lockPath, { force: true }).catch(() => void 0);
570
+ await fs$1.rm(lockPath, { force: true }).catch(() => void 0);
571
571
  if (staleReclaims < attempts) {
572
572
  staleReclaims += 1;
573
573
  continue;
@@ -733,7 +733,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
733
733
  return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
734
734
  }
735
735
  function ensureAuthStoreFile(pathname) {
736
- if (syncFs.existsSync(pathname)) return;
736
+ if (fs.existsSync(pathname)) return;
737
737
  saveJsonFile(pathname, {
738
738
  version: AUTH_STORE_VERSION,
739
739
  profiles: {}
@@ -996,7 +996,7 @@ function loadAuthProfileStoreForAgent(agentDir, options) {
996
996
  if (shouldWrite && legacy !== null) {
997
997
  const legacyPath = resolveLegacyAuthStorePath(agentDir);
998
998
  try {
999
- syncFs.unlinkSync(legacyPath);
999
+ fs.unlinkSync(legacyPath);
1000
1000
  } catch (err) {
1001
1001
  if (err?.code !== "ENOENT") log$13.warn("failed to delete legacy auth.json after migration", {
1002
1002
  err,
@@ -1184,7 +1184,7 @@ function loadDotEnv(opts) {
1184
1184
  const quiet = opts?.quiet ?? true;
1185
1185
  dotenv.config({ quiet });
1186
1186
  const globalEnvPath = path.join(resolveConfigDir(process.env), ".env");
1187
- if (!syncFs.existsSync(globalEnvPath)) return;
1187
+ if (!fs.existsSync(globalEnvPath)) return;
1188
1188
  dotenv.config({
1189
1189
  quiet,
1190
1190
  path: globalEnvPath,
@@ -1222,7 +1222,7 @@ function resolveTimeoutMs(timeoutMs) {
1222
1222
  function readEtcShells() {
1223
1223
  if (cachedEtcShells !== void 0) return cachedEtcShells;
1224
1224
  try {
1225
- const entries = syncFs.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
1225
+ const entries = fs.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
1226
1226
  cachedEtcShells = new Set(entries);
1227
1227
  } catch {
1228
1228
  cachedEtcShells = null;
@@ -1775,7 +1775,7 @@ function formatWindowsAclSummary(summary) {
1775
1775
  //#region src/security/audit-fs.ts
1776
1776
  async function safeStat(targetPath) {
1777
1777
  try {
1778
- const lst = await fs.lstat(targetPath);
1778
+ const lst = await fs$1.lstat(targetPath);
1779
1779
  return {
1780
1780
  ok: true,
1781
1781
  isSymlink: lst.isSymbolicLink(),
@@ -1814,7 +1814,7 @@ async function inspectPathPermissions(targetPath, opts) {
1814
1814
  let effectiveMode = st.mode;
1815
1815
  let effectiveIsDir = st.isDir;
1816
1816
  if (st.isSymlink) try {
1817
- const target = await fs.stat(targetPath);
1817
+ const target = await fs$1.stat(targetPath);
1818
1818
  effectiveMode = typeof target.mode === "number" ? target.mode : st.mode;
1819
1819
  effectiveIsDir = target.isDirectory();
1820
1820
  } catch {}
@@ -2096,7 +2096,7 @@ async function assertSecurePath(params) {
2096
2096
  if (stat.isSymlink) {
2097
2097
  if (!params.allowSymlinkPath) throw new Error(`${params.label} must not be a symlink: ${effectivePath}`);
2098
2098
  try {
2099
- effectivePath = await fs.realpath(effectivePath);
2099
+ effectivePath = await fs$1.realpath(effectivePath);
2100
2100
  } catch {
2101
2101
  throw new Error(`${params.label} symlink target is not readable: ${params.targetPath}`);
2102
2102
  }
@@ -2144,7 +2144,7 @@ async function readFileProviderPayload(params) {
2144
2144
  }, timeoutMs);
2145
2145
  });
2146
2146
  try {
2147
- const payload = await Promise.race([fs.readFile(secureFilePath, { signal: abortController.signal }), timeoutPromise]);
2147
+ const payload = await Promise.race([fs$1.readFile(secureFilePath, { signal: abortController.signal }), timeoutPromise]);
2148
2148
  if (payload.byteLength > maxBytes) throw new Error(`File provider "${params.providerName}" exceeded maxBytes (${maxBytes}).`);
2149
2149
  const text = payload.toString("utf8");
2150
2150
  if (params.providerConfig.mode === "singleValue") return text.replace(/\r?\n$/, "");
@@ -2770,7 +2770,7 @@ function resolveActiveTalkProviderConfig(talk) {
2770
2770
  };
2771
2771
  }
2772
2772
  function readTalkApiKeyFromProfile(deps = {}) {
2773
- const fsImpl = deps.fs ?? syncFs;
2773
+ const fsImpl = deps.fs ?? fs;
2774
2774
  const osImpl = deps.os ?? os;
2775
2775
  const pathImpl = deps.path ?? path;
2776
2776
  const home = osImpl.homedir();
@@ -5250,7 +5250,7 @@ function normalizeMatchTarget(value) {
5250
5250
  }
5251
5251
  function tryRealpath(value) {
5252
5252
  try {
5253
- return syncFs.realpathSync(value);
5253
+ return fs.realpathSync(value);
5254
5254
  } catch {
5255
5255
  return null;
5256
5256
  }
@@ -5803,8 +5803,8 @@ function resolveWindowsExecutableExtensions(executable, env) {
5803
5803
  }
5804
5804
  function isExecutableFile(filePath) {
5805
5805
  try {
5806
- if (!syncFs.statSync(filePath).isFile()) return false;
5807
- if (process.platform !== "win32") syncFs.accessSync(filePath, syncFs.constants.X_OK);
5806
+ if (!fs.statSync(filePath).isFile()) return false;
5807
+ if (process.platform !== "win32") fs.accessSync(filePath, fs.constants.X_OK);
5808
5808
  return true;
5809
5809
  } catch {
5810
5810
  return false;
@@ -5843,7 +5843,7 @@ const DEFAULT_SAFE_BINS = [
5843
5843
  function tryResolveRealpath(filePath) {
5844
5844
  if (!filePath) return;
5845
5845
  try {
5846
- return syncFs.realpathSync(filePath);
5846
+ return fs.realpathSync(filePath);
5847
5847
  } catch {
5848
5848
  return;
5849
5849
  }
@@ -6718,7 +6718,7 @@ function listWritableExplicitTrustedSafeBinDirs(entries) {
6718
6718
  for (const dir of resolved) {
6719
6719
  let stat;
6720
6720
  try {
6721
- stat = syncFs.statSync(dir);
6721
+ stat = fs.statSync(dir);
6722
6722
  } catch {
6723
6723
  continue;
6724
6724
  }
@@ -7395,7 +7395,7 @@ async function releaseHeldLock(normalizedSessionFile, held, opts = {}) {
7395
7395
  await held.handle.close();
7396
7396
  } catch {}
7397
7397
  try {
7398
- await fs.rm(held.lockPath, { force: true });
7398
+ await fs$1.rm(held.lockPath, { force: true });
7399
7399
  } catch {}
7400
7400
  })();
7401
7401
  try {
@@ -7415,7 +7415,7 @@ function releaseAllLocksSync() {
7415
7415
  if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
7416
7416
  } catch {}
7417
7417
  try {
7418
- syncFs.rmSync(held.lockPath, { force: true });
7418
+ fs.rmSync(held.lockPath, { force: true });
7419
7419
  } catch {}
7420
7420
  HELD_LOCKS.delete(sessionFile);
7421
7421
  }
@@ -7474,7 +7474,7 @@ function registerCleanupHandlers() {
7474
7474
  }
7475
7475
  async function readLockPayload(lockPath) {
7476
7476
  try {
7477
- const raw = await fs.readFile(lockPath, "utf8");
7477
+ const raw = await fs$1.readFile(lockPath, "utf8");
7478
7478
  const parsed = JSON.parse(raw);
7479
7479
  const payload = {};
7480
7480
  if (isValidLockNumber(parsed.pid) && parsed.pid > 0) payload.pid = parsed.pid;
@@ -7518,7 +7518,7 @@ async function shouldReclaimContendedLockFile(lockPath, details, staleMs, nowMs)
7518
7518
  if (!details.stale) return false;
7519
7519
  if (!lockInspectionNeedsMtimeStaleFallback(details)) return true;
7520
7520
  try {
7521
- const stat = await fs.stat(lockPath);
7521
+ const stat = await fs$1.stat(lockPath);
7522
7522
  return Math.max(0, nowMs - stat.mtimeMs) > staleMs;
7523
7523
  } catch (error) {
7524
7524
  return error?.code !== "ENOENT";
@@ -7536,10 +7536,10 @@ async function acquireSessionWriteLockWithProcessIdentity(params, processIdentit
7536
7536
  const maxHoldMs = resolvePositiveMs(params.maxHoldMs, DEFAULT_MAX_HOLD_MS);
7537
7537
  const sessionFile = path.resolve(params.sessionFile);
7538
7538
  const sessionDir = path.dirname(sessionFile);
7539
- await fs.mkdir(sessionDir, { recursive: true });
7539
+ await fs$1.mkdir(sessionDir, { recursive: true });
7540
7540
  let normalizedDir = sessionDir;
7541
7541
  try {
7542
- normalizedDir = await fs.realpath(sessionDir);
7542
+ normalizedDir = await fs$1.realpath(sessionDir);
7543
7543
  } catch {}
7544
7544
  const normalizedSessionFile = path.join(normalizedDir, path.basename(sessionFile));
7545
7545
  const lockPath = `${normalizedSessionFile}.lock`;
@@ -7557,7 +7557,7 @@ async function acquireSessionWriteLockWithProcessIdentity(params, processIdentit
7557
7557
  attempt += 1;
7558
7558
  let handle = null;
7559
7559
  try {
7560
- handle = await fs.open(lockPath, "wx");
7560
+ handle = await fs$1.open(lockPath, "wx");
7561
7561
  const createdAt = (/* @__PURE__ */ new Date()).toISOString();
7562
7562
  const starttime = processIdentity.getProcessStartTime(process.pid);
7563
7563
  const lockPayload = {
@@ -7583,7 +7583,7 @@ async function acquireSessionWriteLockWithProcessIdentity(params, processIdentit
7583
7583
  await handle.close();
7584
7584
  } catch {}
7585
7585
  try {
7586
- await fs.rm(lockPath, { force: true });
7586
+ await fs$1.rm(lockPath, { force: true });
7587
7587
  } catch {}
7588
7588
  }
7589
7589
  if (err.code !== "EEXIST") throw err;
@@ -7598,7 +7598,7 @@ async function acquireSessionWriteLockWithProcessIdentity(params, processIdentit
7598
7598
  stale: true,
7599
7599
  staleReasons: inspected.staleReasons.includes("orphan-self-pid") ? inspected.staleReasons : [...inspected.staleReasons, "orphan-self-pid"]
7600
7600
  } : inspected, staleMs, nowMs)) {
7601
- await fs.rm(lockPath, { force: true });
7601
+ await fs$1.rm(lockPath, { force: true });
7602
7602
  continue;
7603
7603
  }
7604
7604
  const delay = Math.min(1e3, 50 * attempt);
@@ -7803,7 +7803,7 @@ function isCacheEnabled(ttlMs) {
7803
7803
  }
7804
7804
  function getFileStatSnapshot(filePath) {
7805
7805
  try {
7806
- const stats = syncFs.statSync(filePath);
7806
+ const stats = fs.statSync(filePath);
7807
7807
  return {
7808
7808
  mtimeMs: stats.mtimeMs,
7809
7809
  sizeBytes: stats.size
@@ -8288,7 +8288,7 @@ const credsSaveQueues = resolveProcessScopedMap(Symbol.for("openclaw.webCredsSav
8288
8288
  function canonicalWebAuthDir(authDir) {
8289
8289
  const resolvedAuthDir = resolveUserPath(authDir);
8290
8290
  try {
8291
- return syncFs.realpathSync.native(resolvedAuthDir);
8291
+ return fs.realpathSync.native(resolvedAuthDir);
8292
8292
  } catch (err) {
8293
8293
  if (err.code === "ENOENT") return resolvedAuthDir;
8294
8294
  throw err;
@@ -8303,7 +8303,7 @@ function isWebAuthBeingCleared(authDir) {
8303
8303
  }
8304
8304
  function statFileSync(filePath) {
8305
8305
  try {
8306
- return syncFs.statSync(filePath);
8306
+ return fs.statSync(filePath);
8307
8307
  } catch {
8308
8308
  return null;
8309
8309
  }
@@ -8315,7 +8315,7 @@ function hasWebCredsSync(authDir) {
8315
8315
  const resolvedAuthDir = resolveUserPath(authDir);
8316
8316
  maybeRestoreCredsFromBackup(resolvedAuthDir);
8317
8317
  try {
8318
- const stats = syncFs.statSync(resolveWebCredsPath(resolvedAuthDir));
8318
+ const stats = fs.statSync(resolveWebCredsPath(resolvedAuthDir));
8319
8319
  return stats.isFile() && stats.size > 1;
8320
8320
  } catch {
8321
8321
  return false;
@@ -8323,10 +8323,10 @@ function hasWebCredsSync(authDir) {
8323
8323
  }
8324
8324
  function readCredsJsonRaw(filePath) {
8325
8325
  try {
8326
- if (!syncFs.existsSync(filePath)) return null;
8327
- const stats = syncFs.statSync(filePath);
8326
+ if (!fs.existsSync(filePath)) return null;
8327
+ const stats = fs.statSync(filePath);
8328
8328
  if (!stats.isFile() || stats.size <= 1) return null;
8329
- return syncFs.readFileSync(filePath, "utf-8");
8329
+ return fs.readFileSync(filePath, "utf-8");
8330
8330
  } catch {
8331
8331
  return null;
8332
8332
  }
@@ -8351,12 +8351,12 @@ function maybeRestoreCredsFromBackup(authDir) {
8351
8351
  const backupRaw = readCredsJsonRaw(backupPath);
8352
8352
  const backupStats = statFileSync(backupPath);
8353
8353
  if (!backupStats?.isFile() || !backupRaw || !isParseableJson(backupRaw)) return;
8354
- syncFs.copyFileSync(backupPath, credsPath);
8354
+ fs.copyFileSync(backupPath, credsPath);
8355
8355
  try {
8356
- syncFs.chmodSync(credsPath, 384);
8356
+ fs.chmodSync(credsPath, 384);
8357
8357
  } catch {}
8358
8358
  try {
8359
- syncFs.utimesSync(credsPath, backupStats.atime, backupStats.mtime);
8359
+ fs.utimesSync(credsPath, backupStats.atime, backupStats.mtime);
8360
8360
  } catch {}
8361
8361
  logger.warn({ credsPath }, "restored corrupted WhatsApp creds.json from backup");
8362
8362
  } catch {}
@@ -8376,7 +8376,7 @@ function listWhatsAppAuthDirs(cfg) {
8376
8376
  accountId
8377
8377
  }).authDir);
8378
8378
  try {
8379
- const entries = syncFs.readdirSync(whatsappDir, { withFileTypes: true });
8379
+ const entries = fs.readdirSync(whatsappDir, { withFileTypes: true });
8380
8380
  for (const entry of entries) {
8381
8381
  if (!entry.isDirectory()) continue;
8382
8382
  authDirs.add(path.join(whatsappDir, entry.name));
@@ -8398,7 +8398,7 @@ function resolveLegacyAuthDir() {
8398
8398
  }
8399
8399
  function legacyAuthExists(authDir) {
8400
8400
  try {
8401
- return syncFs.existsSync(path.join(authDir, "creds.json"));
8401
+ return fs.existsSync(path.join(authDir, "creds.json"));
8402
8402
  } catch {
8403
8403
  return false;
8404
8404
  }
@@ -8762,7 +8762,7 @@ function resolveTelegramToken(cfg, opts = {}) {
8762
8762
  const accountCfg = resolveAccountCfg(accountId !== DEFAULT_ACCOUNT_ID ? accountId : DEFAULT_ACCOUNT_ID);
8763
8763
  const accountTokenFile = accountCfg?.tokenFile?.trim();
8764
8764
  if (accountTokenFile) {
8765
- if (!syncFs.existsSync(accountTokenFile)) {
8765
+ if (!fs.existsSync(accountTokenFile)) {
8766
8766
  opts.logMissingFile?.(`channels.telegram.accounts.${accountId}.tokenFile not found: ${accountTokenFile}`);
8767
8767
  return {
8768
8768
  token: "",
@@ -8770,7 +8770,7 @@ function resolveTelegramToken(cfg, opts = {}) {
8770
8770
  };
8771
8771
  }
8772
8772
  try {
8773
- const token = syncFs.readFileSync(accountTokenFile, "utf-8").trim();
8773
+ const token = fs.readFileSync(accountTokenFile, "utf-8").trim();
8774
8774
  if (token) return {
8775
8775
  token,
8776
8776
  source: "tokenFile"
@@ -8798,7 +8798,7 @@ function resolveTelegramToken(cfg, opts = {}) {
8798
8798
  const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
8799
8799
  const tokenFile = telegramCfg?.tokenFile?.trim();
8800
8800
  if (tokenFile) {
8801
- if (!syncFs.existsSync(tokenFile)) {
8801
+ if (!fs.existsSync(tokenFile)) {
8802
8802
  opts.logMissingFile?.(`channels.telegram.tokenFile not found: ${tokenFile}`);
8803
8803
  return {
8804
8804
  token: "",
@@ -8806,7 +8806,7 @@ function resolveTelegramToken(cfg, opts = {}) {
8806
8806
  };
8807
8807
  }
8808
8808
  try {
8809
- const token = syncFs.readFileSync(tokenFile, "utf-8").trim();
8809
+ const token = fs.readFileSync(tokenFile, "utf-8").trim();
8810
8810
  if (token) return {
8811
8811
  token,
8812
8812
  source: "tokenFile"
@@ -9828,7 +9828,7 @@ function resolveStructuralSessionFallbackPath(candidateAbsPath, expectedAgentId)
9828
9828
  }
9829
9829
  function safeRealpathSync$1(filePath) {
9830
9830
  try {
9831
- return syncFs.realpathSync(filePath);
9831
+ return fs.realpathSync(filePath);
9832
9832
  } catch {
9833
9833
  return;
9834
9834
  }
@@ -10796,7 +10796,7 @@ function loadSessionStoreFromDisk(storePath, opts = {}) {
10796
10796
  const maxReadAttempts = process.platform === "win32" ? 3 : 1;
10797
10797
  const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
10798
10798
  for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
10799
- const raw = syncFs.readFileSync(storePath, "utf-8");
10799
+ const raw = fs.readFileSync(storePath, "utf-8");
10800
10800
  if (raw.length === 0 && attempt < maxReadAttempts - 1) {
10801
10801
  Atomics.wait(retryBuf, 0, 0, 50);
10802
10802
  continue;
@@ -12855,13 +12855,13 @@ function resolveBundledPluginsDir() {
12855
12855
  try {
12856
12856
  const execDir = path.dirname(process.execPath);
12857
12857
  const sibling = path.join(execDir, "extensions");
12858
- if (syncFs.existsSync(sibling)) return sibling;
12858
+ if (fs.existsSync(sibling)) return sibling;
12859
12859
  } catch {}
12860
12860
  try {
12861
12861
  let cursor = path.dirname(fileURLToPath(import.meta.url));
12862
12862
  for (let i = 0; i < 6; i += 1) {
12863
12863
  const candidate = path.join(cursor, "extensions");
12864
- if (syncFs.existsSync(candidate) && syncFs.existsSync(path.join(cursor, "package.json"))) return candidate;
12864
+ if (fs.existsSync(candidate) && fs.existsSync(path.join(cursor, "package.json"))) return candidate;
12865
12865
  const parent = path.dirname(cursor);
12866
12866
  if (parent === cursor) break;
12867
12867
  cursor = parent;
@@ -12930,7 +12930,7 @@ function parseSessionConsumers(raw) {
12930
12930
  function resolvePluginManifestPath(rootDir) {
12931
12931
  for (const filename of PLUGIN_MANIFEST_FILENAMES) {
12932
12932
  const candidate = path.join(rootDir, filename);
12933
- if (syncFs.existsSync(candidate)) return candidate;
12933
+ if (fs.existsSync(candidate)) return candidate;
12934
12934
  }
12935
12935
  return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
12936
12936
  }
@@ -12956,7 +12956,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
12956
12956
  }
12957
12957
  let raw;
12958
12958
  try {
12959
- raw = JSON.parse(syncFs.readFileSync(opened.fd, "utf-8"));
12959
+ raw = JSON.parse(fs.readFileSync(opened.fd, "utf-8"));
12960
12960
  } catch (err) {
12961
12961
  return {
12962
12962
  ok: false,
@@ -12964,7 +12964,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
12964
12964
  manifestPath
12965
12965
  };
12966
12966
  } finally {
12967
- syncFs.closeSync(opened.fd);
12967
+ fs.closeSync(opened.fd);
12968
12968
  }
12969
12969
  return {
12970
12970
  ...loadPluginManifestFromObject(raw, rejectHardlinks),
@@ -13132,7 +13132,7 @@ function safeRealpathSync(targetPath, cache) {
13132
13132
  const cached = cache?.get(targetPath);
13133
13133
  if (cached) return cached;
13134
13134
  try {
13135
- const resolved = syncFs.realpathSync(targetPath);
13135
+ const resolved = fs.realpathSync(targetPath);
13136
13136
  cache?.set(targetPath, resolved);
13137
13137
  return resolved;
13138
13138
  } catch {
@@ -13141,7 +13141,7 @@ function safeRealpathSync(targetPath, cache) {
13141
13141
  }
13142
13142
  function safeStatSync(targetPath) {
13143
13143
  try {
13144
- return syncFs.statSync(targetPath);
13144
+ return fs.statSync(targetPath);
13145
13145
  } catch {
13146
13146
  return null;
13147
13147
  }
@@ -13273,12 +13273,12 @@ function readPackageManifest(dir, rejectHardlinks = true) {
13273
13273
  });
13274
13274
  if (!opened.ok) return null;
13275
13275
  try {
13276
- const raw = syncFs.readFileSync(opened.fd, "utf-8");
13276
+ const raw = fs.readFileSync(opened.fd, "utf-8");
13277
13277
  return JSON.parse(raw);
13278
13278
  } catch {
13279
13279
  return null;
13280
13280
  } finally {
13281
- syncFs.closeSync(opened.fd);
13281
+ fs.closeSync(opened.fd);
13282
13282
  }
13283
13283
  }
13284
13284
  function deriveIdHint(params) {
@@ -13346,14 +13346,14 @@ function resolvePackageEntrySource(params) {
13346
13346
  return null;
13347
13347
  }
13348
13348
  const safeSource = opened.path;
13349
- syncFs.closeSync(opened.fd);
13349
+ fs.closeSync(opened.fd);
13350
13350
  return safeSource;
13351
13351
  }
13352
13352
  function discoverInDirectory(params) {
13353
- if (!syncFs.existsSync(params.dir)) return;
13353
+ if (!fs.existsSync(params.dir)) return;
13354
13354
  let entries = [];
13355
13355
  try {
13356
- entries = syncFs.readdirSync(params.dir, { withFileTypes: true });
13356
+ entries = fs.readdirSync(params.dir, { withFileTypes: true });
13357
13357
  } catch (err) {
13358
13358
  params.diagnostics.push({
13359
13359
  level: "warn",
@@ -13416,7 +13416,7 @@ function discoverInDirectory(params) {
13416
13416
  }
13417
13417
  continue;
13418
13418
  }
13419
- const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => syncFs.existsSync(candidate));
13419
+ const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => fs.existsSync(candidate));
13420
13420
  if (indexFile && isExtensionFile(indexFile)) addCandidate({
13421
13421
  candidates: params.candidates,
13422
13422
  diagnostics: params.diagnostics,
@@ -13434,7 +13434,7 @@ function discoverInDirectory(params) {
13434
13434
  }
13435
13435
  function discoverFromPath(params) {
13436
13436
  const resolved = resolveUserPath(params.rawPath);
13437
- if (!syncFs.existsSync(resolved)) {
13437
+ if (!fs.existsSync(resolved)) {
13438
13438
  params.diagnostics.push({
13439
13439
  level: "error",
13440
13440
  code: "PLUGIN_LOAD_ERROR",
@@ -13443,7 +13443,7 @@ function discoverFromPath(params) {
13443
13443
  });
13444
13444
  return;
13445
13445
  }
13446
- const stat = syncFs.statSync(resolved);
13446
+ const stat = fs.statSync(resolved);
13447
13447
  if (stat.isFile()) {
13448
13448
  if (!isExtensionFile(resolved)) {
13449
13449
  params.diagnostics.push({
@@ -13503,7 +13503,7 @@ function discoverFromPath(params) {
13503
13503
  }
13504
13504
  return;
13505
13505
  }
13506
- const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => syncFs.existsSync(candidate));
13506
+ const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => fs.existsSync(candidate));
13507
13507
  if (indexFile && isExtensionFile(indexFile)) {
13508
13508
  addCandidate({
13509
13509
  candidates: params.candidates,
@@ -13890,7 +13890,7 @@ function buildCacheKey$1(params) {
13890
13890
  }
13891
13891
  function safeStatMtimeMs(filePath) {
13892
13892
  try {
13893
- return syncFs.statSync(filePath).mtimeMs;
13893
+ return fs.statSync(filePath).mtimeMs;
13894
13894
  } catch {
13895
13895
  return null;
13896
13896
  }
@@ -19037,7 +19037,7 @@ function validateConfigObjectWithPluginsBase(raw, opts) {
19037
19037
  };
19038
19038
  const buildManifestSchemaCacheKey = (manifestPath) => {
19039
19039
  try {
19040
- const mtimeMs = syncFs.statSync(manifestPath).mtimeMs;
19040
+ const mtimeMs = fs.statSync(manifestPath).mtimeMs;
19041
19041
  return mtimeMs ? `${manifestPath}:${mtimeMs}` : manifestPath;
19042
19042
  } catch {
19043
19043
  return manifestPath;
@@ -19062,7 +19062,7 @@ function validateConfigObjectWithPluginsBase(raw, opts) {
19062
19062
  manifestRoot = record.sourcePath;
19063
19063
  } else if (sources.size === 0) {
19064
19064
  const bundledDir = resolveBundledPluginsDir();
19065
- if (bundledDir && syncFs.existsSync(bundledDir)) {
19065
+ if (bundledDir && fs.existsSync(bundledDir)) {
19066
19066
  const realSourcePath = safeRealpathSync(resolveUserPath(record.sourcePath), bundledInstallRealpathCache);
19067
19067
  const realBundledDir = safeRealpathSync(bundledDir, bundledInstallRealpathCache) ?? bundledDir;
19068
19068
  if (!realSourcePath || !isPathWithinRoot(realBundledDir, realSourcePath)) {
@@ -19797,7 +19797,7 @@ function resolveConfigPathForDeps(deps) {
19797
19797
  }
19798
19798
  function normalizeDeps(overrides = {}) {
19799
19799
  return {
19800
- fs: overrides.fs ?? syncFs,
19800
+ fs: overrides.fs ?? fs,
19801
19801
  json5: overrides.json5 ?? JSON5,
19802
19802
  env: overrides.env ?? process.env,
19803
19803
  homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
@@ -1,5 +1,5 @@
1
- import { G as applyConfigEnvVars, rt as isRecord } from "./subsystem-BaT-AAVZ.js";
2
- import { U as loadConfig, _ as resolveImplicitBedrockProvider, g as normalizeProviders, ga as resolveOpenClawAgentDir, v as resolveImplicitCopilotProvider, y as resolveImplicitProviders } from "./model-selection-CHi8o17y.js";
1
+ import { G as applyConfigEnvVars, rt as isRecord } from "./subsystem-BZy3aWdW.js";
2
+ import { U as loadConfig, _ as resolveImplicitBedrockProvider, g as normalizeProviders, ga as resolveOpenClawAgentDir, v as resolveImplicitCopilotProvider, y as resolveImplicitProviders } from "./model-selection-BHGpQSa9.js";
3
3
  import path from "node:path";
4
4
  import fs from "node:fs/promises";
5
5
 
@@ -1,5 +1,5 @@
1
- import { i as saveMediaBuffer } from "./store-BVdeIl7N.js";
2
- import { a as loadWebMedia } from "./ir-CBsM7qoP.js";
1
+ import { i as saveMediaBuffer } from "./store-HgGweM4u.js";
2
+ import { a as loadWebMedia } from "./ir-DioI2VyB.js";
3
3
  import { t as buildOutboundMediaLoadOptions } from "./load-options-CkQ1z00p.js";
4
4
 
5
5
  //#region src/media/outbound-attachment.ts
@@ -1,8 +1,8 @@
1
- import { f as resolveSessionAgentId } from "./agent-scope-BKsGMXqc.js";
2
- import { f as logVerbose, t as createSubsystemLogger } from "./subsystem-BaT-AAVZ.js";
3
- import { hn as getConfiguredSessionStorageRuntime } from "./model-selection-CHi8o17y.js";
4
- import { n as createInternalHookEvent, o as triggerInternalHook } from "./legacy-names-Ckds5WWe.js";
5
- import { Bt as buildPluginTurnIdentity, zt as buildPluginRuntimeIdentity } from "./sessions-DC7A0bw-.js";
1
+ import { f as resolveSessionAgentId } from "./agent-scope-DCgndASv.js";
2
+ import { f as logVerbose, t as createSubsystemLogger } from "./subsystem-BZy3aWdW.js";
3
+ import { hn as getConfiguredSessionStorageRuntime } from "./model-selection-BHGpQSa9.js";
4
+ import { n as createInternalHookEvent, o as triggerInternalHook } from "./legacy-names-CghFcfry.js";
5
+ import { Bt as buildPluginTurnIdentity, zt as buildPluginRuntimeIdentity } from "./sessions-DF9biCmh.js";
6
6
 
7
7
  //#region src/infra/outbound/session-context.ts
8
8
  const log$1 = createSubsystemLogger("outbound/session-context");
@@ -1,4 +1,4 @@
1
- import { L as BOUNDARY_PATH_ALIAS_POLICIES, R as resolveBoundaryPath, V as isNotFoundPathError } from "./subsystem-BaT-AAVZ.js";
1
+ import { L as BOUNDARY_PATH_ALIAS_POLICIES, R as resolveBoundaryPath, V as isNotFoundPathError } from "./subsystem-BZy3aWdW.js";
2
2
  import os from "node:os";
3
3
  import fs from "node:fs/promises";
4
4