wednesdayai 0.5.0 → 0.5.1-dev.2

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 (171) hide show
  1. package/dist/{agent-scope-DaYoimRo.js → agent-scope-VTjBKG-0.js} +3 -3
  2. package/dist/{agent-turn-runner-B9ZpICYG.js → agent-turn-runner-CZilDjoa.js} +4 -4
  3. package/dist/{agent-turn-runner-D17nO0vK.js → agent-turn-runner-DGW1XTSZ.js} +6 -6
  4. package/dist/{api-key-rotation-CFBqEjJo.js → api-key-rotation-C7Uer3wX.js} +2 -2
  5. package/dist/{audio-preflight-IAvClu-y.js → audio-preflight-5kfGz36M.js} +29 -29
  6. package/dist/{audio-preflight-0IORdIpv.js → audio-preflight-CyoX7lif.js} +5 -5
  7. package/dist/{audio-transcription-runner-XF9vtq2K.js → audio-transcription-runner-6owLZL6w.js} +1 -1
  8. package/dist/{audio-transcription-runner-DO37G4ea.js → audio-transcription-runner-CBRRwnRT.js} +26 -26
  9. package/dist/build-info.json +4 -4
  10. package/dist/bundled/boot-md/handler.js +60 -60
  11. package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
  12. package/dist/bundled/command-logger/handler.js +2 -2
  13. package/dist/bundled/session-journal/handler.js +60 -60
  14. package/dist/bundled/session-memory/handler.js +60 -60
  15. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  16. package/dist/{channel-activity-osbmoIZV.js → channel-activity-CgARXGuN.js} +3 -3
  17. package/dist/{chat-content-D9t717tu.js → chat-content-CjKyPXfO.js} +34 -34
  18. package/dist/{chat-content-CF94bdqd.js → chat-content-Dp_TK_pI.js} +3 -3
  19. package/dist/{chrome-Bz--jRWP.js → chrome-C9hAxf3E.js} +5 -5
  20. package/dist/{chrome-Cb_eHwXe.js → chrome-DKYaSdXE.js} +23 -23
  21. package/dist/{chunk-BGAIfwvG.js → chunk-CmQRdRrT.js} +3 -3
  22. package/dist/{command-queue-Blj57uZh.js → command-queue-DiOM6aJb.js} +1 -1
  23. package/dist/{command-queue-CHDYFklA.js → command-queue-arMRWvX5.js} +1 -1
  24. package/dist/{commands-registry-CHyanyMK.js → commands-registry-Bpqy7T_m.js} +2 -2
  25. package/dist/{deliver-ItqNbpAj.js → deliver-DGxrgy4y.js} +1 -1
  26. package/dist/{deliver-B1z53DPr.js → deliver-hdhBsluU.js} +29 -29
  27. package/dist/{diagnostic-DHSjiKQ1.js → diagnostic-DWnW43D8.js} +5 -5
  28. package/dist/{diagnostic-BsxoGiFO.js → diagnostic-f8CKHXWb.js} +1 -1
  29. package/dist/{errors-CCOle-CH.js → errors-h4QgDEJU.js} +1 -1
  30. package/dist/extensionAPI.js +12 -12
  31. package/dist/{fetch-CJta9EH3.js → fetch-BkWHUyJz.js} +8 -8
  32. package/dist/{fetch-guard-CnaMeBGo.js → fetch-guard-BUJnD_0T.js} +3 -3
  33. package/dist/{frontmatter-DlRD-Jnx.js → frontmatter-IfoWyoLV.js} +3 -3
  34. package/dist/{fs-safe-DpdLT3fB.js → fs-safe-joAzTKB9.js} +26 -26
  35. package/dist/{image-ops-YU6OONEl.js → image-ops-d6AhYSNh.js} +1 -1
  36. package/dist/{ir-BdHn6F6Y.js → ir-B0cUtyev.js} +5 -5
  37. package/dist/{legacy-names-me5dD9PP.js → legacy-names-Dh4RlQMQ.js} +1 -1
  38. package/dist/llm-slug-generator.js +60 -60
  39. package/dist/{logger-BrQxLcMY.js → logger-vVASmiVr.js} +1 -1
  40. package/dist/{manager-xwMosvyt.js → manager-SEkHJEk4.js} +18 -18
  41. package/dist/{markdown-tables-BVgH365V.js → markdown-tables-pw9wiTpN.js} +2 -2
  42. package/dist/{model-selection-CYypdqr8.js → model-selection-BTxcwzNF.js} +83 -83
  43. package/dist/{models-config-D7vsT5RL.js → models-config-CrYtS7l_.js} +2 -2
  44. package/dist/{outbound-attachment-C_QOYkXN.js → outbound-attachment-ecpn937X.js} +2 -2
  45. package/dist/{outbound-message-hooks-BYTh0d2Q.js → outbound-message-hooks-BA0MXlRL.js} +5 -5
  46. package/dist/{path-alias-guards-BdGLz9X0.js → path-alias-guards-BzCkdlOk.js} +1 -1
  47. package/dist/{pi-embedded-BtqsPDuE.js → pi-embedded-C3a3mJgO.js} +272 -272
  48. package/dist/{pi-embedded-D6nR71l7.js → pi-embedded-cc9FvjV6.js} +28 -28
  49. package/dist/{pi-embedded-utils-C-iiawNt.js → pi-embedded-utils-Bu-pLHgt.js} +3 -3
  50. package/dist/{pi-embedded-utils-Bb82klSc.js → pi-embedded-utils-DKfjTsdf.js} +1 -1
  51. package/dist/{pi-model-discovery-fTAJjO1L.js → pi-model-discovery-BHTeo1nC.js} +7 -7
  52. package/dist/plugin-sdk/{agent-turn-execute-R1HDfkzv.js → agent-turn-execute-5UY7VtoM.js} +12 -12
  53. package/dist/plugin-sdk/{agent-turn-runner-BJKm0xiy.js → agent-turn-runner-Cn8kBLTA.js} +4 -4
  54. package/dist/plugin-sdk/{audio-preflight-BB1yTgKL.js → audio-preflight-DmcETAqz.js} +5 -5
  55. package/dist/plugin-sdk/{audio-transcription-runner-reKaz0zD.js → audio-transcription-runner-CmY7S8fK.js} +1 -1
  56. package/dist/plugin-sdk/{chrome-WLpY6l2E.js → chrome-6h5M_drY.js} +8 -8
  57. package/dist/plugin-sdk/{command-queue-CAp1zb7F.js → command-queue-DIuk1L2E.js} +1 -1
  58. package/dist/plugin-sdk/{deliver-DlvbM-qn.js → deliver-C9GFYFwr.js} +1 -1
  59. package/dist/plugin-sdk/{deliver-BmT0wV-k.js → deliver-DPfI8dVE.js} +3 -3
  60. package/dist/plugin-sdk/{diagnostic-RXIEvDQf.js → diagnostic-DRY8-0JL.js} +1 -1
  61. package/dist/plugin-sdk/{pi-embedded-helpers-21OqohWy.js → pi-embedded-helpers-D5vYvfne.js} +3 -3
  62. package/dist/plugin-sdk/{pi-embedded-utils-BW2p1kKO.js → pi-embedded-utils-CGDgVtzV.js} +1 -1
  63. package/dist/plugin-sdk/{provider-dispatcher-rwnQ0CEc.js → provider-dispatcher-DryAXJsi.js} +12 -12
  64. package/dist/plugin-sdk/{provider-image-3obRwbTZ.js → provider-image-CVcMld07.js} +4 -4
  65. package/dist/plugin-sdk/{provider-image-B68yYRAm.js → provider-image-Df0uD0Oe.js} +1 -1
  66. package/dist/plugin-sdk/{pw-ai-CSRaN1ac.js → pw-ai-DMALp-EA.js} +1 -1
  67. package/dist/plugin-sdk/{runs-5hM5yurH.js → runs-BASRXkuM.js} +3 -3
  68. package/dist/plugin-sdk/{runs-DvLuGamE.js → runs-yMaO6qGS.js} +5 -5
  69. package/dist/plugin-sdk/{send-Zxl5JOn5.js → send-BqbtJqgu.js} +1 -1
  70. package/dist/plugin-sdk/{send-CzwcnXPR.js → send-CmZ4gvBw.js} +2 -2
  71. package/dist/plugin-sdk/{subagent-registry-Y727Of1U.js → subagent-registry-GgT4DYT1.js} +12 -12
  72. package/dist/plugin-sdk/testing.js +12 -12
  73. package/dist/plugin-sdk/{tools-joKDe6rw.js → tools-Bigk4qN-.js} +32 -32
  74. package/dist/{provider-image-Do7qMZhI.js → provider-image-BZgdxPq1.js} +1 -1
  75. package/dist/{provider-image-DEcMOAkN.js → provider-image-BoLaTMGA.js} +6 -6
  76. package/dist/{proxy-DaAwoyLn.js → proxy-CPi-EHQf.js} +1 -1
  77. package/dist/{proxy-env-DbK61KfJ.js → proxy-env-D-BYfN9f.js} +1 -1
  78. package/dist/{proxy-fetch-DfICXirF.js → proxy-fetch-SAeVJOzX.js} +1 -1
  79. package/dist/{pw-ai-BPTONp50.js → pw-ai-BX6tMIuu.js} +14 -14
  80. package/dist/{pw-ai-vX880pfn.js → pw-ai-ZhKSFpfJ.js} +1 -1
  81. package/dist/{qmd-manager-BwE9yS9R.js → qmd-manager-D8ak7kq1.js} +12 -12
  82. package/dist/{query-expansion-D98bVcfg.js → query-expansion-Cfj6kuQN.js} +13 -13
  83. package/dist/{recorder-DsunFllM.js → recorder-9g0HAfTV.js} +2 -2
  84. package/dist/{redact-CO0RqVMz.js → redact-CteA3IBL.js} +1 -1
  85. package/dist/{replies-pB9HCyld.js → replies-BbIj7g9M.js} +5 -5
  86. package/dist/{reply-directives-mulrKdb0.js → reply-directives-DBlsFghT.js} +2 -2
  87. package/dist/{reply-prefix-JmOFNTVH.js → reply-prefix-B4-hQLj2.js} +1 -1
  88. package/dist/{resolve-route-5h1UlQhK.js → resolve-route-BVQQmyE-.js} +5 -5
  89. package/dist/{runs-DEhpITiC.js → runs-Dar4NRlC.js} +3 -3
  90. package/dist/{runs-CYEm5TJX.js → runs-n_IyEnjI.js} +9 -9
  91. package/dist/{send-Bcmcrt2M.js → send-BaBji8OV.js} +6 -6
  92. package/dist/{send-CaxLshmb.js → send-Blzch_-J.js} +6 -6
  93. package/dist/{send-i_w4A0N2.js → send-D3AqPouq.js} +7 -7
  94. package/dist/{send-LdGFidPd.js → send-D4CyRJfb.js} +8 -8
  95. package/dist/{send-mGol3d2c.js → send-Owye3CdT.js} +27 -27
  96. package/dist/{send-C4CkAZXl.js → send-tEYUiTsj.js} +1 -1
  97. package/dist/{session-meta-CmQ6a7H5.js → session-meta-n_Hhzi0B.js} +1 -1
  98. package/dist/{sessions-ZdGPevHF.js → sessions-C8YjZYd5.js} +5 -5
  99. package/dist/{skill-commands-XRDXSro6.js → skill-commands-DyocWgx1.js} +8 -8
  100. package/dist/{skills-CXVcffYI.js → skills-BNWKnQc8.js} +21 -21
  101. package/dist/{store-CYs-lya8.js → store-BkbDrlDX.js} +7 -7
  102. package/dist/{subsystem-Bv4j-uIg.js → subsystem-D_zHSy02.js} +67 -67
  103. package/dist/{tables-BbGV4Ys1.js → tables-B_gp2rXG.js} +1 -1
  104. package/dist/{tokens-BdntrBR4.js → tokens-B3OPeQh5.js} +1 -1
  105. package/dist/{tool-loop-detection-CdZfb_CR.js → tool-loop-detection-ST5jhih3.js} +2 -2
  106. package/dist/{user-run-recording-Dr98Mjnd.js → user-run-recording-CMwTVvoc.js} +2 -2
  107. package/dist/{workspace-yHh5Lf7Z.js → workspace-CkXKTYV4.js} +27 -27
  108. package/extensions/acpx/package.json +1 -1
  109. package/extensions/anthropic/package.json +1 -1
  110. package/extensions/bifrost/package.json +1 -1
  111. package/extensions/bluebubbles/package.json +1 -1
  112. package/extensions/copilot-proxy/package.json +1 -1
  113. package/extensions/deepgram/package.json +1 -1
  114. package/extensions/deepinfra/package.json +1 -1
  115. package/extensions/diagnostics-otel/package.json +1 -1
  116. package/extensions/diffs/package.json +1 -1
  117. package/extensions/discord/package.json +1 -1
  118. package/extensions/dream-cycle/package.json +1 -1
  119. package/extensions/elevenlabs/package.json +1 -1
  120. package/extensions/feishu/package.json +1 -1
  121. package/extensions/gemini-search/package.json +1 -1
  122. package/extensions/google/package.json +1 -1
  123. package/extensions/google-gemini-cli-auth/package.json +1 -1
  124. package/extensions/googlechat/package.json +1 -1
  125. package/extensions/grok-search/package.json +1 -1
  126. package/extensions/groq/package.json +1 -1
  127. package/extensions/imessage/package.json +1 -1
  128. package/extensions/irc/package.json +1 -1
  129. package/extensions/kimi-search/package.json +1 -1
  130. package/extensions/learning-core/package.json +1 -1
  131. package/extensions/line/package.json +1 -1
  132. package/extensions/llm-task/package.json +1 -1
  133. package/extensions/lobster/package.json +1 -1
  134. package/extensions/matrix/CHANGELOG.md +6 -0
  135. package/extensions/matrix/package.json +1 -1
  136. package/extensions/mattermost/package.json +1 -1
  137. package/extensions/memory-core/package.json +1 -1
  138. package/extensions/memory-lancedb/package.json +1 -1
  139. package/extensions/minimax/package.json +1 -1
  140. package/extensions/minimax-portal-auth/package.json +1 -1
  141. package/extensions/mistral/package.json +1 -1
  142. package/extensions/moonshot/package.json +1 -1
  143. package/extensions/msteams/CHANGELOG.md +6 -0
  144. package/extensions/msteams/package.json +1 -1
  145. package/extensions/nextcloud-talk/package.json +1 -1
  146. package/extensions/nostr/CHANGELOG.md +6 -0
  147. package/extensions/nostr/package.json +1 -1
  148. package/extensions/open-prose/package.json +1 -1
  149. package/extensions/openai/package.json +1 -1
  150. package/extensions/openai-realtime/package.json +1 -1
  151. package/extensions/openrouter/package.json +1 -1
  152. package/extensions/perplexity-search/package.json +1 -1
  153. package/extensions/searxng-search/package.json +1 -1
  154. package/extensions/signal/package.json +1 -1
  155. package/extensions/slack/package.json +1 -1
  156. package/extensions/synology-chat/package.json +1 -1
  157. package/extensions/telegram/package.json +1 -1
  158. package/extensions/tlon/package.json +1 -1
  159. package/extensions/twitch/CHANGELOG.md +6 -0
  160. package/extensions/twitch/package.json +1 -1
  161. package/extensions/voice-call/CHANGELOG.md +6 -0
  162. package/extensions/voice-call/package.json +1 -1
  163. package/extensions/whatsapp/package.json +1 -1
  164. package/extensions/zai/package.json +1 -1
  165. package/extensions/zalo/CHANGELOG.md +6 -0
  166. package/extensions/zalo/package.json +1 -1
  167. package/extensions/zalouser/CHANGELOG.md +6 -0
  168. package/extensions/zalouser/package.json +1 -1
  169. package/package.json +1 -1
  170. package/dist/github-copilot-token-DYYKoDuV.js +0 -106
  171. package/dist/paths-BIDPYPVC.js +0 -233
@@ -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-DaYoimRo.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-Bv4j-uIg.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-VTjBKG-0.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-D_zHSy02.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, S as RAW_PEER_KEY_PREFIX, V as normalizeAccountId$1, Z as parseAgentSessionKey, _ as runExec, j as normalizeAgentId, y as DEFAULT_AGENT_ID } from "./workspace-yHh5Lf7Z.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-me5dD9PP.js";
6
+ import { B as DEFAULT_ACCOUNT_ID, H as normalizeOptionalAccountId, O as expandIdentityLinksToMatchKeys, S as RAW_PEER_KEY_PREFIX, V as normalizeAccountId$1, Z as parseAgentSessionKey, _ as runExec, j as normalizeAgentId, y as DEFAULT_AGENT_ID } from "./workspace-CkXKTYV4.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-Dh4RlQMQ.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 fs from "node:fs";
12
+ import syncFs from "node:fs";
13
13
  import os, { userInfo } from "node:os";
14
14
  import json5 from "json5";
15
- import fs$1 from "node:fs/promises";
15
+ import fs 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 fs.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
278
+ return syncFs.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 = fs.readFileSync(`/proc/${pid}/stat`, "utf8");
305
+ const stat = syncFs.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
- fs.readFileSync(`/proc/${pid}/stat`, "utf8");
373
+ syncFs.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 = fs.readFileSync("/proc/uptime", "utf8");
381
+ const raw = syncFs.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$1.readFile(lockPath, "utf8");
449
+ const raw = await fs.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$1.chmod(filePath, mode);
466
+ await fs.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$1.mkdir(dir, { recursive: true });
475
+ if (options.directoryMode === void 0) await fs.mkdir(dir, { recursive: true });
476
476
  else {
477
- await fs$1.mkdir(dir, {
477
+ await fs.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$1.realpath(dir);
483
+ const realDir = await fs.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$1.stat(lockPath);
498
+ const stat = await fs.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$1.rm(current.lockPath, { force: true });
522
+ await fs.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$1.open(lockPath, "wx");
545
+ const handle = await fs.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$1.rm(lockPath, { force: true }).catch(() => void 0);
554
+ await fs.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$1.rm(lockPath, { force: true }).catch(() => void 0);
570
+ await fs.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 (fs.existsSync(pathname)) return;
736
+ if (syncFs.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
- fs.unlinkSync(legacyPath);
999
+ syncFs.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 (!fs.existsSync(globalEnvPath)) return;
1187
+ if (!syncFs.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 = fs.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
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));
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$1.lstat(targetPath);
1778
+ const lst = await fs.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$1.stat(targetPath);
1817
+ const target = await fs.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$1.realpath(effectivePath);
2099
+ effectivePath = await fs.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$1.readFile(secureFilePath, { signal: abortController.signal }), timeoutPromise]);
2147
+ const payload = await Promise.race([fs.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 ?? fs;
2773
+ const fsImpl = deps.fs ?? syncFs;
2774
2774
  const osImpl = deps.os ?? os;
2775
2775
  const pathImpl = deps.path ?? path;
2776
2776
  const home = osImpl.homedir();
@@ -5057,7 +5057,7 @@ function normalizeMatchTarget(value) {
5057
5057
  }
5058
5058
  function tryRealpath(value) {
5059
5059
  try {
5060
- return fs.realpathSync(value);
5060
+ return syncFs.realpathSync(value);
5061
5061
  } catch {
5062
5062
  return null;
5063
5063
  }
@@ -5610,8 +5610,8 @@ function resolveWindowsExecutableExtensions(executable, env) {
5610
5610
  }
5611
5611
  function isExecutableFile(filePath) {
5612
5612
  try {
5613
- if (!fs.statSync(filePath).isFile()) return false;
5614
- if (process.platform !== "win32") fs.accessSync(filePath, fs.constants.X_OK);
5613
+ if (!syncFs.statSync(filePath).isFile()) return false;
5614
+ if (process.platform !== "win32") syncFs.accessSync(filePath, syncFs.constants.X_OK);
5615
5615
  return true;
5616
5616
  } catch {
5617
5617
  return false;
@@ -5650,7 +5650,7 @@ const DEFAULT_SAFE_BINS = [
5650
5650
  function tryResolveRealpath(filePath) {
5651
5651
  if (!filePath) return;
5652
5652
  try {
5653
- return fs.realpathSync(filePath);
5653
+ return syncFs.realpathSync(filePath);
5654
5654
  } catch {
5655
5655
  return;
5656
5656
  }
@@ -6525,7 +6525,7 @@ function listWritableExplicitTrustedSafeBinDirs(entries) {
6525
6525
  for (const dir of resolved) {
6526
6526
  let stat;
6527
6527
  try {
6528
- stat = fs.statSync(dir);
6528
+ stat = syncFs.statSync(dir);
6529
6529
  } catch {
6530
6530
  continue;
6531
6531
  }
@@ -7179,7 +7179,7 @@ async function releaseHeldLock(normalizedSessionFile, held, opts = {}) {
7179
7179
  await held.handle.close();
7180
7180
  } catch {}
7181
7181
  try {
7182
- await fs$1.rm(held.lockPath, { force: true });
7182
+ await fs.rm(held.lockPath, { force: true });
7183
7183
  } catch {}
7184
7184
  })();
7185
7185
  try {
@@ -7199,7 +7199,7 @@ function releaseAllLocksSync() {
7199
7199
  if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
7200
7200
  } catch {}
7201
7201
  try {
7202
- fs.rmSync(held.lockPath, { force: true });
7202
+ syncFs.rmSync(held.lockPath, { force: true });
7203
7203
  } catch {}
7204
7204
  HELD_LOCKS.delete(sessionFile);
7205
7205
  }
@@ -7258,7 +7258,7 @@ function registerCleanupHandlers() {
7258
7258
  }
7259
7259
  async function readLockPayload(lockPath) {
7260
7260
  try {
7261
- const raw = await fs$1.readFile(lockPath, "utf8");
7261
+ const raw = await fs.readFile(lockPath, "utf8");
7262
7262
  const parsed = JSON.parse(raw);
7263
7263
  const payload = {};
7264
7264
  if (isValidLockNumber(parsed.pid) && parsed.pid > 0) payload.pid = parsed.pid;
@@ -7302,7 +7302,7 @@ async function shouldReclaimContendedLockFile(lockPath, details, staleMs, nowMs)
7302
7302
  if (!details.stale) return false;
7303
7303
  if (!lockInspectionNeedsMtimeStaleFallback(details)) return true;
7304
7304
  try {
7305
- const stat = await fs$1.stat(lockPath);
7305
+ const stat = await fs.stat(lockPath);
7306
7306
  return Math.max(0, nowMs - stat.mtimeMs) > staleMs;
7307
7307
  } catch (error) {
7308
7308
  return error?.code !== "ENOENT";
@@ -7320,10 +7320,10 @@ async function acquireSessionWriteLockWithProcessIdentity(params, processIdentit
7320
7320
  const maxHoldMs = resolvePositiveMs(params.maxHoldMs, DEFAULT_MAX_HOLD_MS);
7321
7321
  const sessionFile = path.resolve(params.sessionFile);
7322
7322
  const sessionDir = path.dirname(sessionFile);
7323
- await fs$1.mkdir(sessionDir, { recursive: true });
7323
+ await fs.mkdir(sessionDir, { recursive: true });
7324
7324
  let normalizedDir = sessionDir;
7325
7325
  try {
7326
- normalizedDir = await fs$1.realpath(sessionDir);
7326
+ normalizedDir = await fs.realpath(sessionDir);
7327
7327
  } catch {}
7328
7328
  const normalizedSessionFile = path.join(normalizedDir, path.basename(sessionFile));
7329
7329
  const lockPath = `${normalizedSessionFile}.lock`;
@@ -7341,7 +7341,7 @@ async function acquireSessionWriteLockWithProcessIdentity(params, processIdentit
7341
7341
  attempt += 1;
7342
7342
  let handle = null;
7343
7343
  try {
7344
- handle = await fs$1.open(lockPath, "wx");
7344
+ handle = await fs.open(lockPath, "wx");
7345
7345
  const createdAt = (/* @__PURE__ */ new Date()).toISOString();
7346
7346
  const starttime = processIdentity.getProcessStartTime(process.pid);
7347
7347
  const lockPayload = {
@@ -7367,7 +7367,7 @@ async function acquireSessionWriteLockWithProcessIdentity(params, processIdentit
7367
7367
  await handle.close();
7368
7368
  } catch {}
7369
7369
  try {
7370
- await fs$1.rm(lockPath, { force: true });
7370
+ await fs.rm(lockPath, { force: true });
7371
7371
  } catch {}
7372
7372
  }
7373
7373
  if (err.code !== "EEXIST") throw err;
@@ -7382,7 +7382,7 @@ async function acquireSessionWriteLockWithProcessIdentity(params, processIdentit
7382
7382
  stale: true,
7383
7383
  staleReasons: inspected.staleReasons.includes("orphan-self-pid") ? inspected.staleReasons : [...inspected.staleReasons, "orphan-self-pid"]
7384
7384
  } : inspected, staleMs, nowMs)) {
7385
- await fs$1.rm(lockPath, { force: true });
7385
+ await fs.rm(lockPath, { force: true });
7386
7386
  continue;
7387
7387
  }
7388
7388
  const delay = Math.min(1e3, 50 * attempt);
@@ -7586,7 +7586,7 @@ function isCacheEnabled(ttlMs) {
7586
7586
  }
7587
7587
  function getFileStatSnapshot(filePath) {
7588
7588
  try {
7589
- const stats = fs.statSync(filePath);
7589
+ const stats = syncFs.statSync(filePath);
7590
7590
  return {
7591
7591
  mtimeMs: stats.mtimeMs,
7592
7592
  sizeBytes: stats.size
@@ -8071,7 +8071,7 @@ const credsSaveQueues = resolveProcessScopedMap(Symbol.for("openclaw.webCredsSav
8071
8071
  function canonicalWebAuthDir(authDir) {
8072
8072
  const resolvedAuthDir = resolveUserPath(authDir);
8073
8073
  try {
8074
- return fs.realpathSync.native(resolvedAuthDir);
8074
+ return syncFs.realpathSync.native(resolvedAuthDir);
8075
8075
  } catch (err) {
8076
8076
  if (err.code === "ENOENT") return resolvedAuthDir;
8077
8077
  throw err;
@@ -8086,7 +8086,7 @@ function isWebAuthBeingCleared(authDir) {
8086
8086
  }
8087
8087
  function statFileSync(filePath) {
8088
8088
  try {
8089
- return fs.statSync(filePath);
8089
+ return syncFs.statSync(filePath);
8090
8090
  } catch {
8091
8091
  return null;
8092
8092
  }
@@ -8098,7 +8098,7 @@ function hasWebCredsSync(authDir) {
8098
8098
  const resolvedAuthDir = resolveUserPath(authDir);
8099
8099
  maybeRestoreCredsFromBackup(resolvedAuthDir);
8100
8100
  try {
8101
- const stats = fs.statSync(resolveWebCredsPath(resolvedAuthDir));
8101
+ const stats = syncFs.statSync(resolveWebCredsPath(resolvedAuthDir));
8102
8102
  return stats.isFile() && stats.size > 1;
8103
8103
  } catch {
8104
8104
  return false;
@@ -8106,10 +8106,10 @@ function hasWebCredsSync(authDir) {
8106
8106
  }
8107
8107
  function readCredsJsonRaw(filePath) {
8108
8108
  try {
8109
- if (!fs.existsSync(filePath)) return null;
8110
- const stats = fs.statSync(filePath);
8109
+ if (!syncFs.existsSync(filePath)) return null;
8110
+ const stats = syncFs.statSync(filePath);
8111
8111
  if (!stats.isFile() || stats.size <= 1) return null;
8112
- return fs.readFileSync(filePath, "utf-8");
8112
+ return syncFs.readFileSync(filePath, "utf-8");
8113
8113
  } catch {
8114
8114
  return null;
8115
8115
  }
@@ -8134,12 +8134,12 @@ function maybeRestoreCredsFromBackup(authDir) {
8134
8134
  const backupRaw = readCredsJsonRaw(backupPath);
8135
8135
  const backupStats = statFileSync(backupPath);
8136
8136
  if (!backupStats?.isFile() || !backupRaw || !isParseableJson(backupRaw)) return;
8137
- fs.copyFileSync(backupPath, credsPath);
8137
+ syncFs.copyFileSync(backupPath, credsPath);
8138
8138
  try {
8139
- fs.chmodSync(credsPath, 384);
8139
+ syncFs.chmodSync(credsPath, 384);
8140
8140
  } catch {}
8141
8141
  try {
8142
- fs.utimesSync(credsPath, backupStats.atime, backupStats.mtime);
8142
+ syncFs.utimesSync(credsPath, backupStats.atime, backupStats.mtime);
8143
8143
  } catch {}
8144
8144
  logger.warn({ credsPath }, "restored corrupted WhatsApp creds.json from backup");
8145
8145
  } catch {}
@@ -8159,7 +8159,7 @@ function listWhatsAppAuthDirs(cfg) {
8159
8159
  accountId
8160
8160
  }).authDir);
8161
8161
  try {
8162
- const entries = fs.readdirSync(whatsappDir, { withFileTypes: true });
8162
+ const entries = syncFs.readdirSync(whatsappDir, { withFileTypes: true });
8163
8163
  for (const entry of entries) {
8164
8164
  if (!entry.isDirectory()) continue;
8165
8165
  authDirs.add(path.join(whatsappDir, entry.name));
@@ -8181,7 +8181,7 @@ function resolveLegacyAuthDir() {
8181
8181
  }
8182
8182
  function legacyAuthExists(authDir) {
8183
8183
  try {
8184
- return fs.existsSync(path.join(authDir, "creds.json"));
8184
+ return syncFs.existsSync(path.join(authDir, "creds.json"));
8185
8185
  } catch {
8186
8186
  return false;
8187
8187
  }
@@ -8545,7 +8545,7 @@ function resolveTelegramToken(cfg, opts = {}) {
8545
8545
  const accountCfg = resolveAccountCfg(accountId !== DEFAULT_ACCOUNT_ID ? accountId : DEFAULT_ACCOUNT_ID);
8546
8546
  const accountTokenFile = accountCfg?.tokenFile?.trim();
8547
8547
  if (accountTokenFile) {
8548
- if (!fs.existsSync(accountTokenFile)) {
8548
+ if (!syncFs.existsSync(accountTokenFile)) {
8549
8549
  opts.logMissingFile?.(`channels.telegram.accounts.${accountId}.tokenFile not found: ${accountTokenFile}`);
8550
8550
  return {
8551
8551
  token: "",
@@ -8553,7 +8553,7 @@ function resolveTelegramToken(cfg, opts = {}) {
8553
8553
  };
8554
8554
  }
8555
8555
  try {
8556
- const token = fs.readFileSync(accountTokenFile, "utf-8").trim();
8556
+ const token = syncFs.readFileSync(accountTokenFile, "utf-8").trim();
8557
8557
  if (token) return {
8558
8558
  token,
8559
8559
  source: "tokenFile"
@@ -8581,7 +8581,7 @@ function resolveTelegramToken(cfg, opts = {}) {
8581
8581
  const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
8582
8582
  const tokenFile = telegramCfg?.tokenFile?.trim();
8583
8583
  if (tokenFile) {
8584
- if (!fs.existsSync(tokenFile)) {
8584
+ if (!syncFs.existsSync(tokenFile)) {
8585
8585
  opts.logMissingFile?.(`channels.telegram.tokenFile not found: ${tokenFile}`);
8586
8586
  return {
8587
8587
  token: "",
@@ -8589,7 +8589,7 @@ function resolveTelegramToken(cfg, opts = {}) {
8589
8589
  };
8590
8590
  }
8591
8591
  try {
8592
- const token = fs.readFileSync(tokenFile, "utf-8").trim();
8592
+ const token = syncFs.readFileSync(tokenFile, "utf-8").trim();
8593
8593
  if (token) return {
8594
8594
  token,
8595
8595
  source: "tokenFile"
@@ -9611,7 +9611,7 @@ function resolveStructuralSessionFallbackPath(candidateAbsPath, expectedAgentId)
9611
9611
  }
9612
9612
  function safeRealpathSync$1(filePath) {
9613
9613
  try {
9614
- return fs.realpathSync(filePath);
9614
+ return syncFs.realpathSync(filePath);
9615
9615
  } catch {
9616
9616
  return;
9617
9617
  }
@@ -10579,7 +10579,7 @@ function loadSessionStoreFromDisk(storePath, opts = {}) {
10579
10579
  const maxReadAttempts = process.platform === "win32" ? 3 : 1;
10580
10580
  const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
10581
10581
  for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
10582
- const raw = fs.readFileSync(storePath, "utf-8");
10582
+ const raw = syncFs.readFileSync(storePath, "utf-8");
10583
10583
  if (raw.length === 0 && attempt < maxReadAttempts - 1) {
10584
10584
  Atomics.wait(retryBuf, 0, 0, 50);
10585
10585
  continue;
@@ -12548,13 +12548,13 @@ function resolveBundledPluginsDir() {
12548
12548
  try {
12549
12549
  const execDir = path.dirname(process.execPath);
12550
12550
  const sibling = path.join(execDir, "extensions");
12551
- if (fs.existsSync(sibling)) return sibling;
12551
+ if (syncFs.existsSync(sibling)) return sibling;
12552
12552
  } catch {}
12553
12553
  try {
12554
12554
  let cursor = path.dirname(fileURLToPath(import.meta.url));
12555
12555
  for (let i = 0; i < 6; i += 1) {
12556
12556
  const candidate = path.join(cursor, "extensions");
12557
- if (fs.existsSync(candidate) && fs.existsSync(path.join(cursor, "package.json"))) return candidate;
12557
+ if (syncFs.existsSync(candidate) && syncFs.existsSync(path.join(cursor, "package.json"))) return candidate;
12558
12558
  const parent = path.dirname(cursor);
12559
12559
  if (parent === cursor) break;
12560
12560
  cursor = parent;
@@ -12623,7 +12623,7 @@ function parseSessionConsumers(raw) {
12623
12623
  function resolvePluginManifestPath(rootDir) {
12624
12624
  for (const filename of PLUGIN_MANIFEST_FILENAMES) {
12625
12625
  const candidate = path.join(rootDir, filename);
12626
- if (fs.existsSync(candidate)) return candidate;
12626
+ if (syncFs.existsSync(candidate)) return candidate;
12627
12627
  }
12628
12628
  return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
12629
12629
  }
@@ -12649,7 +12649,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
12649
12649
  }
12650
12650
  let raw;
12651
12651
  try {
12652
- raw = JSON.parse(fs.readFileSync(opened.fd, "utf-8"));
12652
+ raw = JSON.parse(syncFs.readFileSync(opened.fd, "utf-8"));
12653
12653
  } catch (err) {
12654
12654
  return {
12655
12655
  ok: false,
@@ -12657,7 +12657,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
12657
12657
  manifestPath
12658
12658
  };
12659
12659
  } finally {
12660
- fs.closeSync(opened.fd);
12660
+ syncFs.closeSync(opened.fd);
12661
12661
  }
12662
12662
  return {
12663
12663
  ...loadPluginManifestFromObject(raw, rejectHardlinks),
@@ -12825,7 +12825,7 @@ function safeRealpathSync(targetPath, cache) {
12825
12825
  const cached = cache?.get(targetPath);
12826
12826
  if (cached) return cached;
12827
12827
  try {
12828
- const resolved = fs.realpathSync(targetPath);
12828
+ const resolved = syncFs.realpathSync(targetPath);
12829
12829
  cache?.set(targetPath, resolved);
12830
12830
  return resolved;
12831
12831
  } catch {
@@ -12834,7 +12834,7 @@ function safeRealpathSync(targetPath, cache) {
12834
12834
  }
12835
12835
  function safeStatSync(targetPath) {
12836
12836
  try {
12837
- return fs.statSync(targetPath);
12837
+ return syncFs.statSync(targetPath);
12838
12838
  } catch {
12839
12839
  return null;
12840
12840
  }
@@ -12966,12 +12966,12 @@ function readPackageManifest(dir, rejectHardlinks = true) {
12966
12966
  });
12967
12967
  if (!opened.ok) return null;
12968
12968
  try {
12969
- const raw = fs.readFileSync(opened.fd, "utf-8");
12969
+ const raw = syncFs.readFileSync(opened.fd, "utf-8");
12970
12970
  return JSON.parse(raw);
12971
12971
  } catch {
12972
12972
  return null;
12973
12973
  } finally {
12974
- fs.closeSync(opened.fd);
12974
+ syncFs.closeSync(opened.fd);
12975
12975
  }
12976
12976
  }
12977
12977
  function deriveIdHint(params) {
@@ -13039,14 +13039,14 @@ function resolvePackageEntrySource(params) {
13039
13039
  return null;
13040
13040
  }
13041
13041
  const safeSource = opened.path;
13042
- fs.closeSync(opened.fd);
13042
+ syncFs.closeSync(opened.fd);
13043
13043
  return safeSource;
13044
13044
  }
13045
13045
  function discoverInDirectory(params) {
13046
- if (!fs.existsSync(params.dir)) return;
13046
+ if (!syncFs.existsSync(params.dir)) return;
13047
13047
  let entries = [];
13048
13048
  try {
13049
- entries = fs.readdirSync(params.dir, { withFileTypes: true });
13049
+ entries = syncFs.readdirSync(params.dir, { withFileTypes: true });
13050
13050
  } catch (err) {
13051
13051
  params.diagnostics.push({
13052
13052
  level: "warn",
@@ -13109,7 +13109,7 @@ function discoverInDirectory(params) {
13109
13109
  }
13110
13110
  continue;
13111
13111
  }
13112
- const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => fs.existsSync(candidate));
13112
+ const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => syncFs.existsSync(candidate));
13113
13113
  if (indexFile && isExtensionFile(indexFile)) addCandidate({
13114
13114
  candidates: params.candidates,
13115
13115
  diagnostics: params.diagnostics,
@@ -13127,7 +13127,7 @@ function discoverInDirectory(params) {
13127
13127
  }
13128
13128
  function discoverFromPath(params) {
13129
13129
  const resolved = resolveUserPath(params.rawPath);
13130
- if (!fs.existsSync(resolved)) {
13130
+ if (!syncFs.existsSync(resolved)) {
13131
13131
  params.diagnostics.push({
13132
13132
  level: "error",
13133
13133
  code: "PLUGIN_LOAD_ERROR",
@@ -13136,7 +13136,7 @@ function discoverFromPath(params) {
13136
13136
  });
13137
13137
  return;
13138
13138
  }
13139
- const stat = fs.statSync(resolved);
13139
+ const stat = syncFs.statSync(resolved);
13140
13140
  if (stat.isFile()) {
13141
13141
  if (!isExtensionFile(resolved)) {
13142
13142
  params.diagnostics.push({
@@ -13196,7 +13196,7 @@ function discoverFromPath(params) {
13196
13196
  }
13197
13197
  return;
13198
13198
  }
13199
- const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => fs.existsSync(candidate));
13199
+ const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => syncFs.existsSync(candidate));
13200
13200
  if (indexFile && isExtensionFile(indexFile)) {
13201
13201
  addCandidate({
13202
13202
  candidates: params.candidates,
@@ -13583,7 +13583,7 @@ function buildCacheKey$1(params) {
13583
13583
  }
13584
13584
  function safeStatMtimeMs(filePath) {
13585
13585
  try {
13586
- return fs.statSync(filePath).mtimeMs;
13586
+ return syncFs.statSync(filePath).mtimeMs;
13587
13587
  } catch {
13588
13588
  return null;
13589
13589
  }
@@ -18864,7 +18864,7 @@ function validateConfigObjectWithPluginsBase(raw, opts) {
18864
18864
  };
18865
18865
  const buildManifestSchemaCacheKey = (manifestPath) => {
18866
18866
  try {
18867
- const mtimeMs = fs.statSync(manifestPath).mtimeMs;
18867
+ const mtimeMs = syncFs.statSync(manifestPath).mtimeMs;
18868
18868
  return mtimeMs ? `${manifestPath}:${mtimeMs}` : manifestPath;
18869
18869
  } catch {
18870
18870
  return manifestPath;
@@ -18889,7 +18889,7 @@ function validateConfigObjectWithPluginsBase(raw, opts) {
18889
18889
  manifestRoot = record.sourcePath;
18890
18890
  } else if (sources.size === 0) {
18891
18891
  const bundledDir = resolveBundledPluginsDir();
18892
- if (bundledDir && fs.existsSync(bundledDir)) {
18892
+ if (bundledDir && syncFs.existsSync(bundledDir)) {
18893
18893
  const realSourcePath = safeRealpathSync(resolveUserPath(record.sourcePath), bundledInstallRealpathCache);
18894
18894
  const realBundledDir = safeRealpathSync(bundledDir, bundledInstallRealpathCache) ?? bundledDir;
18895
18895
  if (!realSourcePath || !isPathWithinRoot(realBundledDir, realSourcePath)) {
@@ -19624,7 +19624,7 @@ function resolveConfigPathForDeps(deps) {
19624
19624
  }
19625
19625
  function normalizeDeps(overrides = {}) {
19626
19626
  return {
19627
- fs: overrides.fs ?? fs,
19627
+ fs: overrides.fs ?? syncFs,
19628
19628
  json5: overrides.json5 ?? json5,
19629
19629
  env: overrides.env ?? process.env,
19630
19630
  homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
@@ -1,5 +1,5 @@
1
- import { G as applyConfigEnvVars, rt as isRecord } from "./subsystem-Bv4j-uIg.js";
2
- import { U as loadConfig, _ as resolveImplicitBedrockProvider, g as normalizeProviders, ha as resolveOpenClawAgentDir, v as resolveImplicitCopilotProvider, y as resolveImplicitProviders } from "./model-selection-CYypdqr8.js";
1
+ import { G as applyConfigEnvVars, rt as isRecord } from "./subsystem-D_zHSy02.js";
2
+ import { U as loadConfig, _ as resolveImplicitBedrockProvider, g as normalizeProviders, ha as resolveOpenClawAgentDir, v as resolveImplicitCopilotProvider, y as resolveImplicitProviders } from "./model-selection-BTxcwzNF.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-CYs-lya8.js";
2
- import { a as loadWebMedia } from "./ir-BdHn6F6Y.js";
1
+ import { i as saveMediaBuffer } from "./store-BkbDrlDX.js";
2
+ import { a as loadWebMedia } from "./ir-B0cUtyev.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-DaYoimRo.js";
2
- import { f as logVerbose, t as createSubsystemLogger } from "./subsystem-Bv4j-uIg.js";
3
- import { hn as getConfiguredSessionStorageRuntime } from "./model-selection-CYypdqr8.js";
4
- import { n as createInternalHookEvent, o as triggerInternalHook } from "./legacy-names-me5dD9PP.js";
5
- import { _t as buildPluginRuntimeIdentity, vt as buildPluginTurnIdentity } from "./sessions-ZdGPevHF.js";
1
+ import { f as resolveSessionAgentId } from "./agent-scope-VTjBKG-0.js";
2
+ import { f as logVerbose, t as createSubsystemLogger } from "./subsystem-D_zHSy02.js";
3
+ import { hn as getConfiguredSessionStorageRuntime } from "./model-selection-BTxcwzNF.js";
4
+ import { n as createInternalHookEvent, o as triggerInternalHook } from "./legacy-names-Dh4RlQMQ.js";
5
+ import { _t as buildPluginRuntimeIdentity, vt as buildPluginTurnIdentity } from "./sessions-C8YjZYd5.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-Bv4j-uIg.js";
1
+ import { L as BOUNDARY_PATH_ALIAS_POLICIES, R as resolveBoundaryPath, V as isNotFoundPathError } from "./subsystem-D_zHSy02.js";
2
2
  import os from "node:os";
3
3
  import fs from "node:fs/promises";
4
4