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,11 +1,11 @@
1
- import { m as normalizeSkillFilter } from "./agent-scope-DaYoimRo.js";
2
- import { H as isPathInside, K as isDangerousHostEnvVarName, N as isPathInsideWithRealpath, Z as CONFIG_DIR, mt as resolvePreferredOpenClawTmpDir, st as resolveUserPath, t as createSubsystemLogger } from "./subsystem-Bv4j-uIg.js";
3
- import { h as resolveOpenClawPackageRootSync } from "./workspace-yHh5Lf7Z.js";
4
- import { At as normalizePluginsConfig, Et as loadPluginManifestRegistry, Mt as resolveMemorySlotDecision, Ta as normalizeResolvedSecretInputString, jt as resolveEffectiveEnableState } from "./model-selection-CYypdqr8.js";
5
- import { a as resolveOpenClawManifestBlock, c as resolveOpenClawManifestRequires, d as hasBinary, f as isConfigPathTruthyWithDefaults, i as parseOpenClawManifestInstallBase, l as parseFrontmatterBlock, n as normalizeStringList, o as resolveOpenClawManifestInstall, r as parseFrontmatterBool, s as resolveOpenClawManifestOs, t as getFrontmatterString, u as evaluateRuntimeEligibility } from "./frontmatter-DlRD-Jnx.js";
6
- import { n as assertNoPathAliasEscape } from "./path-alias-guards-BdGLz9X0.js";
1
+ import { m as normalizeSkillFilter } from "./agent-scope-VTjBKG-0.js";
2
+ import { H as isPathInside, K as isDangerousHostEnvVarName, N as isPathInsideWithRealpath, Z as CONFIG_DIR, mt as resolvePreferredOpenClawTmpDir, st as resolveUserPath, t as createSubsystemLogger } from "./subsystem-D_zHSy02.js";
3
+ import { h as resolveOpenClawPackageRootSync } from "./workspace-CkXKTYV4.js";
4
+ import { At as normalizePluginsConfig, Et as loadPluginManifestRegistry, Mt as resolveMemorySlotDecision, Ta as normalizeResolvedSecretInputString, jt as resolveEffectiveEnableState } from "./model-selection-BTxcwzNF.js";
5
+ import { a as resolveOpenClawManifestBlock, c as resolveOpenClawManifestRequires, d as hasBinary, f as isConfigPathTruthyWithDefaults, i as parseOpenClawManifestInstallBase, l as parseFrontmatterBlock, n as normalizeStringList, o as resolveOpenClawManifestInstall, r as parseFrontmatterBool, s as resolveOpenClawManifestOs, t as getFrontmatterString, u as evaluateRuntimeEligibility } from "./frontmatter-IfoWyoLV.js";
6
+ import { n as assertNoPathAliasEscape } from "./path-alias-guards-BzCkdlOk.js";
7
7
  import path from "node:path";
8
- import fs from "node:fs";
8
+ import syncFs from "node:fs";
9
9
  import os from "node:os";
10
10
  import { URL as URL$1, fileURLToPath } from "node:url";
11
11
  import { formatSkillsForPrompt, loadSkillsFromDir } from "@mariozechner/pi-coding-agent";
@@ -542,13 +542,13 @@ function shortPath(value) {
542
542
  //#region src/agents/skills/bundled-dir.ts
543
543
  function looksLikeSkillsDir(dir) {
544
544
  try {
545
- const entries = fs.readdirSync(dir, { withFileTypes: true });
545
+ const entries = syncFs.readdirSync(dir, { withFileTypes: true });
546
546
  for (const entry of entries) {
547
547
  if (entry.name.startsWith(".")) continue;
548
548
  const fullPath = path.join(dir, entry.name);
549
549
  if (entry.isFile() && entry.name.endsWith(".md")) return true;
550
550
  if (entry.isDirectory()) {
551
- if (fs.existsSync(path.join(fullPath, "SKILL.md"))) return true;
551
+ if (syncFs.existsSync(path.join(fullPath, "SKILL.md"))) return true;
552
552
  }
553
553
  }
554
554
  } catch {
@@ -563,7 +563,7 @@ function resolveBundledSkillsDir(opts = {}) {
563
563
  const execPath = opts.execPath ?? process.execPath;
564
564
  const execDir = path.dirname(execPath);
565
565
  const sibling = path.join(execDir, "skills");
566
- if (fs.existsSync(sibling)) return sibling;
566
+ if (syncFs.existsSync(sibling)) return sibling;
567
567
  } catch {}
568
568
  try {
569
569
  const moduleUrl = opts.moduleUrl ?? import.meta.url;
@@ -626,7 +626,7 @@ function resolvePluginSkillDirs(params) {
626
626
  const trimmed = raw.trim();
627
627
  if (!trimmed) continue;
628
628
  const candidate = path.resolve(record.rootDir, trimmed);
629
- if (!fs.existsSync(candidate)) {
629
+ if (!syncFs.existsSync(candidate)) {
630
630
  log.warn(`plugin skill path not found (${record.id}): ${candidate}`);
631
631
  continue;
632
632
  }
@@ -657,7 +657,7 @@ async function serializeByKey(key, task) {
657
657
 
658
658
  //#endregion
659
659
  //#region src/agents/skills/workspace.ts
660
- const fsp = fs.promises;
660
+ const fsp = syncFs.promises;
661
661
  const skillsLogger = createSubsystemLogger("skills");
662
662
  const skillCommandDebugOnce = /* @__PURE__ */ new Set();
663
663
  /**
@@ -734,7 +734,7 @@ function resolveSkillsLimits(config) {
734
734
  }
735
735
  function listChildDirectories(dir) {
736
736
  try {
737
- const entries = fs.readdirSync(dir, { withFileTypes: true });
737
+ const entries = syncFs.readdirSync(dir, { withFileTypes: true });
738
738
  const dirs = [];
739
739
  for (const entry of entries) {
740
740
  if (entry.name.startsWith(".")) continue;
@@ -745,7 +745,7 @@ function listChildDirectories(dir) {
745
745
  continue;
746
746
  }
747
747
  if (entry.isSymbolicLink()) try {
748
- if (fs.statSync(fullPath).isDirectory()) dirs.push(entry.name);
748
+ if (syncFs.statSync(fullPath).isDirectory()) dirs.push(entry.name);
749
749
  } catch {}
750
750
  }
751
751
  return dirs;
@@ -756,7 +756,7 @@ function listChildDirectories(dir) {
756
756
  function resolveNestedSkillsRoot(dir, opts) {
757
757
  const nested = path.join(dir, "skills");
758
758
  try {
759
- if (!fs.existsSync(nested) || !fs.statSync(nested).isDirectory()) return { baseDir: dir };
759
+ if (!syncFs.existsSync(nested) || !syncFs.statSync(nested).isDirectory()) return { baseDir: dir };
760
760
  } catch {
761
761
  return { baseDir: dir };
762
762
  }
@@ -765,7 +765,7 @@ function resolveNestedSkillsRoot(dir, opts) {
765
765
  const toScan = scanLimit === 0 ? [] : nestedDirs.slice(0, Math.min(nestedDirs.length, scanLimit));
766
766
  for (const name of toScan) {
767
767
  const skillMd = path.join(nested, name, "SKILL.md");
768
- if (fs.existsSync(skillMd)) return {
768
+ if (syncFs.existsSync(skillMd)) return {
769
769
  baseDir: nested,
770
770
  note: `Detected nested skills root at ${nested}`
771
771
  };
@@ -785,9 +785,9 @@ function loadSkillEntries(workspaceDir, opts) {
785
785
  const loadSkills = (params) => {
786
786
  const baseDir = resolveNestedSkillsRoot(params.dir, { maxEntriesToScan: limits.maxCandidatesPerRoot }).baseDir;
787
787
  const rootSkillMd = path.join(baseDir, "SKILL.md");
788
- if (fs.existsSync(rootSkillMd)) {
788
+ if (syncFs.existsSync(rootSkillMd)) {
789
789
  try {
790
- const size = fs.statSync(rootSkillMd).size;
790
+ const size = syncFs.statSync(rootSkillMd).size;
791
791
  if (size > limits.maxSkillFileBytes) {
792
792
  skillsLogger.warn("Skipping skills root due to oversized SKILL.md.", {
793
793
  dir: baseDir,
@@ -826,9 +826,9 @@ function loadSkillEntries(workspaceDir, opts) {
826
826
  for (const name of limitedChildren) {
827
827
  const skillDir = path.join(baseDir, name);
828
828
  const skillMd = path.join(skillDir, "SKILL.md");
829
- if (!fs.existsSync(skillMd)) continue;
829
+ if (!syncFs.existsSync(skillMd)) continue;
830
830
  try {
831
- const size = fs.statSync(skillMd).size;
831
+ const size = syncFs.statSync(skillMd).size;
832
832
  if (size > limits.maxSkillFileBytes) {
833
833
  skillsLogger.warn("Skipping skill due to oversized SKILL.md.", {
834
834
  skill: name,
@@ -896,7 +896,7 @@ function loadSkillEntries(workspaceDir, opts) {
896
896
  return Array.from(merged.values()).map((skill) => {
897
897
  let frontmatter = {};
898
898
  try {
899
- frontmatter = parseFrontmatter(fs.readFileSync(skill.filePath, "utf-8"));
899
+ frontmatter = parseFrontmatter(syncFs.readFileSync(skill.filePath, "utf-8"));
900
900
  } catch {}
901
901
  return {
902
902
  skill,
@@ -1,7 +1,7 @@
1
- import { ot as resolveConfigDir } from "./subsystem-Bv4j-uIg.js";
2
- import { c as detectMime, l as extensionForMime } from "./image-ops-YU6OONEl.js";
1
+ import { ot as resolveConfigDir } from "./subsystem-D_zHSy02.js";
2
+ import { c as detectMime, l as extensionForMime } from "./image-ops-d6AhYSNh.js";
3
3
  import path from "node:path";
4
- import fs$1 from "node:fs/promises";
4
+ import fs from "node:fs/promises";
5
5
  import crypto from "node:crypto";
6
6
  import { pipeline } from "node:stream/promises";
7
7
 
@@ -14,7 +14,7 @@ const MEDIA_FILE_MODE = 420;
14
14
  async function setMediaFileMode(filePath) {
15
15
  if (process.platform === "win32") return;
16
16
  try {
17
- await fs$1.chmod(filePath, MEDIA_FILE_MODE);
17
+ await fs.chmod(filePath, MEDIA_FILE_MODE);
18
18
  } catch (err) {
19
19
  const code = err && typeof err === "object" && "code" in err ? String(err.code) : "";
20
20
  if ([
@@ -41,7 +41,7 @@ function getMediaDir() {
41
41
  }
42
42
  async function ensureMediaDir() {
43
43
  const mediaDir = resolveMediaDir();
44
- await fs$1.mkdir(mediaDir, {
44
+ await fs.mkdir(mediaDir, {
45
45
  recursive: true,
46
46
  mode: 448
47
47
  });
@@ -50,7 +50,7 @@ async function ensureMediaDir() {
50
50
  async function saveMediaBuffer(buffer, contentType, subdir = "inbound", maxBytes = MAX_BYTES, originalFilename) {
51
51
  if (buffer.byteLength > maxBytes) throw new Error(`Media exceeds ${(maxBytes / (1024 * 1024)).toFixed(0)}MB limit`);
52
52
  const dir = path.join(resolveMediaDir(), subdir);
53
- await fs$1.mkdir(dir, {
53
+ await fs.mkdir(dir, {
54
54
  recursive: true,
55
55
  mode: 448
56
56
  });
@@ -70,7 +70,7 @@ async function saveMediaBuffer(buffer, contentType, subdir = "inbound", maxBytes
70
70
  id = sanitized ? `${sanitized}---${uuid}${ext}` : `${uuid}${ext}`;
71
71
  } else id = ext ? `${uuid}${ext}` : uuid;
72
72
  const dest = path.join(dir, id);
73
- await fs$1.writeFile(dest, buffer, { mode: MEDIA_FILE_MODE });
73
+ await fs.writeFile(dest, buffer, { mode: MEDIA_FILE_MODE });
74
74
  await setMediaFileMode(dest);
75
75
  return {
76
76
  id,
@@ -1,12 +1,12 @@
1
- import { d as resolveEffectiveHomeDir, f as resolveRequiredHomeDir, r as resolveConfigPath, u as expandHomePrefix } from "./paths-BIDPYPVC.js";
1
+ import { d as resolveEffectiveHomeDir, f as resolveRequiredHomeDir, r as resolveConfigPath, u as expandHomePrefix } from "./paths-B_gs59ga.js";
2
2
  import { t as isPlainObject } from "./plain-object-CLm2c5Nu.js";
3
3
  import path from "node:path";
4
- import fs from "node:fs";
4
+ import syncFs from "node:fs";
5
5
  import os from "node:os";
6
6
  import chalk, { Chalk } from "chalk";
7
7
  import { Logger } from "tslog";
8
8
  import json5 from "json5";
9
- import fs$1 from "node:fs/promises";
9
+ import fs from "node:fs/promises";
10
10
  import util, { promisify } from "node:util";
11
11
  import zlib from "node:zlib";
12
12
 
@@ -57,15 +57,15 @@ function getCommandPathInternal(argv, depth, opts) {
57
57
  //#endregion
58
58
  //#region src/infra/tmp-openclaw-dir.ts
59
59
  const POSIX_OPENCLAW_TMP_DIR = "/tmp/openclaw";
60
- const TMP_DIR_ACCESS_MODE = fs.constants.W_OK | fs.constants.X_OK;
60
+ const TMP_DIR_ACCESS_MODE = syncFs.constants.W_OK | syncFs.constants.X_OK;
61
61
  function isNodeErrorWithCode(err, code) {
62
62
  return typeof err === "object" && err !== null && "code" in err && err.code === code;
63
63
  }
64
64
  function resolvePreferredOpenClawTmpDir(options = {}) {
65
- const accessSync = options.accessSync ?? fs.accessSync;
66
- const chmodSync = options.chmodSync ?? fs.chmodSync;
67
- const lstatSync = options.lstatSync ?? fs.lstatSync;
68
- const mkdirSync = options.mkdirSync ?? fs.mkdirSync;
65
+ const accessSync = options.accessSync ?? syncFs.accessSync;
66
+ const chmodSync = options.chmodSync ?? syncFs.chmodSync;
67
+ const lstatSync = options.lstatSync ?? syncFs.lstatSync;
68
+ const mkdirSync = options.mkdirSync ?? syncFs.mkdirSync;
69
69
  const warn = options.warn ?? ((message) => console.warn(message));
70
70
  const getuid = options.getuid ?? (() => {
71
71
  try {
@@ -156,14 +156,14 @@ function resolvePreferredOpenClawTmpDir(options = {}) {
156
156
  //#endregion
157
157
  //#region src/utils.ts
158
158
  async function ensureDir(dir) {
159
- await fs.promises.mkdir(dir, { recursive: true });
159
+ await syncFs.promises.mkdir(dir, { recursive: true });
160
160
  }
161
161
  /**
162
162
  * Check if a file or directory exists at the given path.
163
163
  */
164
164
  async function pathExists$1(targetPath) {
165
165
  try {
166
- await fs.promises.access(targetPath);
166
+ await syncFs.promises.access(targetPath);
167
167
  return true;
168
168
  } catch {
169
169
  return false;
@@ -253,7 +253,7 @@ function resolveConfigDir(env = process.env, homedir = os.homedir) {
253
253
  if (override) return resolveUserPath(override);
254
254
  const newDir = path.join(resolveRequiredHomeDir(env, homedir), ".openclaw");
255
255
  try {
256
- if (fs.existsSync(newDir)) return newDir;
256
+ if (syncFs.existsSync(newDir)) return newDir;
257
257
  } catch {}
258
258
  return newDir;
259
259
  }
@@ -814,7 +814,7 @@ async function resolveBoundaryPathLexicalAsync(params) {
814
814
  const stat = await readLexicalStat({
815
815
  ...sharedStepParams,
816
816
  missingFromIndex: idx,
817
- read: (cursor) => fs$1.lstat(cursor)
817
+ read: (cursor) => fs.lstat(cursor)
818
818
  });
819
819
  if (!stat) break;
820
820
  const disposition = handleLexicalStatDisposition({
@@ -851,7 +851,7 @@ function resolveBoundaryPathLexicalSync(params) {
851
851
  rootCanonicalPath: params.rootCanonicalPath,
852
852
  resolveParams: params.params,
853
853
  absolutePath: params.absolutePath,
854
- read: (cursor) => fs.lstatSync(cursor)
854
+ read: (cursor) => syncFs.lstatSync(cursor)
855
855
  });
856
856
  if (isPromiseLike(maybeStat)) throw new Error("Unexpected async lexical stat");
857
857
  const stat = maybeStat;
@@ -986,7 +986,7 @@ async function resolvePathViaExistingAncestor(targetPath) {
986
986
  }
987
987
  if (!await pathExists(cursor)) return normalized;
988
988
  try {
989
- const resolvedAncestor = path.resolve(await fs$1.realpath(cursor));
989
+ const resolvedAncestor = path.resolve(await fs.realpath(cursor));
990
990
  if (missingSuffix.length === 0) return resolvedAncestor;
991
991
  return path.resolve(resolvedAncestor, ...missingSuffix);
992
992
  } catch {
@@ -997,15 +997,15 @@ function resolvePathViaExistingAncestorSync(targetPath) {
997
997
  const normalized = path.resolve(targetPath);
998
998
  let cursor = normalized;
999
999
  const missingSuffix = [];
1000
- while (!isFilesystemRoot(cursor) && !fs.existsSync(cursor)) {
1000
+ while (!isFilesystemRoot(cursor) && !syncFs.existsSync(cursor)) {
1001
1001
  missingSuffix.unshift(path.basename(cursor));
1002
1002
  const parent = path.dirname(cursor);
1003
1003
  if (parent === cursor) break;
1004
1004
  cursor = parent;
1005
1005
  }
1006
- if (!fs.existsSync(cursor)) return normalized;
1006
+ if (!syncFs.existsSync(cursor)) return normalized;
1007
1007
  try {
1008
- const resolvedAncestor = path.resolve(fs.realpathSync(cursor));
1008
+ const resolvedAncestor = path.resolve(syncFs.realpathSync(cursor));
1009
1009
  if (missingSuffix.length === 0) return resolvedAncestor;
1010
1010
  return path.resolve(resolvedAncestor, ...missingSuffix);
1011
1011
  } catch {
@@ -1016,7 +1016,7 @@ async function getPathKind(absolutePath, preserveFinalSymlink) {
1016
1016
  try {
1017
1017
  return {
1018
1018
  exists: true,
1019
- kind: toResolvedKind(preserveFinalSymlink ? await fs$1.lstat(absolutePath) : await fs$1.stat(absolutePath))
1019
+ kind: toResolvedKind(preserveFinalSymlink ? await fs.lstat(absolutePath) : await fs.stat(absolutePath))
1020
1020
  };
1021
1021
  } catch (error) {
1022
1022
  if (isNotFoundPathError(error)) return {
@@ -1030,7 +1030,7 @@ function getPathKindSync(absolutePath, preserveFinalSymlink) {
1030
1030
  try {
1031
1031
  return {
1032
1032
  exists: true,
1033
- kind: toResolvedKind(preserveFinalSymlink ? fs.lstatSync(absolutePath) : fs.statSync(absolutePath))
1033
+ kind: toResolvedKind(preserveFinalSymlink ? syncFs.lstatSync(absolutePath) : syncFs.statSync(absolutePath))
1034
1034
  };
1035
1035
  } catch (error) {
1036
1036
  if (isNotFoundPathError(error)) return {
@@ -1072,7 +1072,7 @@ function isFilesystemRoot(candidate) {
1072
1072
  }
1073
1073
  async function pathExists(targetPath) {
1074
1074
  try {
1075
- await fs$1.lstat(targetPath);
1075
+ await fs.lstat(targetPath);
1076
1076
  return true;
1077
1077
  } catch (error) {
1078
1078
  if (isNotFoundPathError(error)) return false;
@@ -1081,19 +1081,19 @@ async function pathExists(targetPath) {
1081
1081
  }
1082
1082
  async function resolveSymlinkHopPath(symlinkPath) {
1083
1083
  try {
1084
- return path.resolve(await fs$1.realpath(symlinkPath));
1084
+ return path.resolve(await fs.realpath(symlinkPath));
1085
1085
  } catch (error) {
1086
1086
  if (!isNotFoundPathError(error)) throw error;
1087
- const linkTarget = await fs$1.readlink(symlinkPath);
1087
+ const linkTarget = await fs.readlink(symlinkPath);
1088
1088
  return resolvePathViaExistingAncestor(path.resolve(path.dirname(symlinkPath), linkTarget));
1089
1089
  }
1090
1090
  }
1091
1091
  function resolveSymlinkHopPathSync(symlinkPath) {
1092
1092
  try {
1093
- return path.resolve(fs.realpathSync(symlinkPath));
1093
+ return path.resolve(syncFs.realpathSync(symlinkPath));
1094
1094
  } catch (error) {
1095
1095
  if (!isNotFoundPathError(error)) throw error;
1096
- const linkTarget = fs.readlinkSync(symlinkPath);
1096
+ const linkTarget = syncFs.readlinkSync(symlinkPath);
1097
1097
  return resolvePathViaExistingAncestorSync(path.resolve(path.dirname(symlinkPath), linkTarget));
1098
1098
  }
1099
1099
  }
@@ -1119,7 +1119,7 @@ function sameFileIdentity(left, right) {
1119
1119
  return sameFileIdentity$1(left, right);
1120
1120
  }
1121
1121
  function openVerifiedFileSync(params) {
1122
- const ioFs = params.ioFs ?? fs;
1122
+ const ioFs = params.ioFs ?? syncFs;
1123
1123
  const allowedType = params.allowedType ?? "file";
1124
1124
  const openReadFlags = ioFs.constants.O_RDONLY | (typeof ioFs.constants.O_NOFOLLOW === "number" ? ioFs.constants.O_NOFOLLOW : 0);
1125
1125
  let fd = null;
@@ -1196,7 +1196,7 @@ function canUseBoundaryFileOpen(ioFs) {
1196
1196
  return typeof ioFs.openSync === "function" && typeof ioFs.closeSync === "function" && typeof ioFs.fstatSync === "function" && typeof ioFs.lstatSync === "function" && typeof ioFs.realpathSync === "function" && typeof ioFs.readFileSync === "function" && typeof ioFs.constants === "object" && ioFs.constants !== null;
1197
1197
  }
1198
1198
  function openBoundaryFileSync(params) {
1199
- const ioFs = params.ioFs ?? fs;
1199
+ const ioFs = params.ioFs ?? syncFs;
1200
1200
  const resolved = resolveBoundaryFilePathGeneric({
1201
1201
  absolutePath: params.absolutePath,
1202
1202
  resolve: (absolutePath) => resolveBoundaryPathSync({
@@ -1247,7 +1247,7 @@ function finalizeBoundaryFileOpen(params) {
1247
1247
  });
1248
1248
  }
1249
1249
  async function openBoundaryFile(params) {
1250
- const ioFs = params.ioFs ?? fs;
1250
+ const ioFs = params.ioFs ?? syncFs;
1251
1251
  const maybeResolved = resolveBoundaryFilePathGeneric({
1252
1252
  absolutePath: params.absolutePath,
1253
1253
  resolve: (absolutePath) => resolveBoundaryPath({
@@ -1302,7 +1302,7 @@ function isPathInside(basePath, candidatePath) {
1302
1302
  }
1303
1303
  function safeRealpathSync(filePath) {
1304
1304
  try {
1305
- return fs.realpathSync(filePath);
1305
+ return syncFs.realpathSync(filePath);
1306
1306
  } catch {
1307
1307
  return null;
1308
1308
  }
@@ -1423,7 +1423,7 @@ var IncludeProcessor = class IncludeProcessor {
1423
1423
  const normalized = path.normalize(resolved);
1424
1424
  if (!isPathInside(this.rootDir, normalized)) throw new ConfigIncludeError(`Include path escapes config directory: ${includePath} (root: ${this.rootDir})`, includePath);
1425
1425
  try {
1426
- const real = fs.realpathSync(normalized);
1426
+ const real = syncFs.realpathSync(normalized);
1427
1427
  if (!isPathInside(this.rootRealDir, real)) throw new ConfigIncludeError(`Include path resolves outside config directory (symlink): ${includePath} (root: ${this.rootDir})`, includePath);
1428
1428
  } catch (err) {
1429
1429
  if (err instanceof ConfigIncludeError) throw err;
@@ -1465,13 +1465,13 @@ var IncludeProcessor = class IncludeProcessor {
1465
1465
  };
1466
1466
  function safeRealpath(target) {
1467
1467
  try {
1468
- return fs.realpathSync(target);
1468
+ return syncFs.realpathSync(target);
1469
1469
  } catch {
1470
1470
  return target;
1471
1471
  }
1472
1472
  }
1473
1473
  function readConfigIncludeFileWithGuards(params) {
1474
- const ioFs = params.ioFs ?? fs;
1474
+ const ioFs = params.ioFs ?? syncFs;
1475
1475
  const maxBytes = params.maxBytes ?? MAX_INCLUDE_FILE_BYTES;
1476
1476
  if (!canUseBoundaryFileOpen(ioFs)) return ioFs.readFileSync(params.resolvedPath, "utf-8");
1477
1477
  const opened = openBoundaryFileSync({
@@ -1494,7 +1494,7 @@ function readConfigIncludeFileWithGuards(params) {
1494
1494
  }
1495
1495
  }
1496
1496
  const defaultResolver = {
1497
- readFile: (p) => fs.readFileSync(p, "utf-8"),
1497
+ readFile: (p) => syncFs.readFileSync(p, "utf-8"),
1498
1498
  readFileWithGuards: ({ includePath, resolvedPath, rootRealDir }) => readConfigIncludeFileWithGuards({
1499
1499
  includePath,
1500
1500
  resolvedPath,
@@ -1555,10 +1555,10 @@ function normalizeConfigPaths(cfg) {
1555
1555
  function readLoggingConfig() {
1556
1556
  const configPath = resolveConfigPath();
1557
1557
  try {
1558
- if (!fs.existsSync(configPath)) return;
1559
- const raw = fs.readFileSync(configPath, "utf-8");
1558
+ if (!syncFs.existsSync(configPath)) return;
1559
+ const raw = syncFs.readFileSync(configPath, "utf-8");
1560
1560
  const resolvedIncludes = resolveConfigIncludes(json5.parse(raw), configPath, {
1561
- readFile: (candidate) => fs.readFileSync(candidate, "utf-8"),
1561
+ readFile: (candidate) => syncFs.readFileSync(candidate, "utf-8"),
1562
1562
  readFileWithGuards: ({ includePath, resolvedPath, rootRealDir }) => readConfigIncludeFileWithGuards({
1563
1563
  includePath,
1564
1564
  resolvedPath,
@@ -1748,7 +1748,7 @@ function rotateFileLog(filePath, policy, options = {}) {
1748
1748
  skipped: true
1749
1749
  };
1750
1750
  if (policy.maxBackups <= 0) {
1751
- fs.rmSync(filePath, { force: true });
1751
+ syncFs.rmSync(filePath, { force: true });
1752
1752
  return {
1753
1753
  at: (/* @__PURE__ */ new Date()).toISOString(),
1754
1754
  compressed: policy.compress === "gzip"
@@ -1757,9 +1757,9 @@ function rotateFileLog(filePath, policy, options = {}) {
1757
1757
  rotateExistingBackups(filePath, policy.maxBackups);
1758
1758
  const backup = `${filePath}.1${policy.compress === "gzip" ? ".gz" : ""}`;
1759
1759
  if (policy.compress === "gzip") {
1760
- fs.writeFileSync(backup, zlib.gzipSync(fs.readFileSync(filePath)), { mode: options.fileMode });
1761
- fs.rmSync(filePath, { force: true });
1762
- } else fs.renameSync(filePath, backup);
1760
+ syncFs.writeFileSync(backup, zlib.gzipSync(syncFs.readFileSync(filePath)), { mode: options.fileMode });
1761
+ syncFs.rmSync(filePath, { force: true });
1762
+ } else syncFs.renameSync(filePath, backup);
1763
1763
  pruneExcessBackups(filePath, policy.maxBackups);
1764
1764
  return {
1765
1765
  at: (/* @__PURE__ */ new Date()).toISOString(),
@@ -1808,7 +1808,7 @@ function appendWithState(state, line, opts) {
1808
1808
  async function appendNowAsync(state, policy, line, queuedBytes, opts) {
1809
1809
  try {
1810
1810
  state.activeOperation = "append";
1811
- await fs.promises.mkdir(path.dirname(policy.file), { recursive: true });
1811
+ await syncFs.promises.mkdir(path.dirname(policy.file), { recursive: true });
1812
1812
  const currentBytes = await currentFileBytesAsync(policy.file);
1813
1813
  if (currentBytes + queuedBytes > policy.maxFileBytes && currentBytes > 0) {
1814
1814
  state.activeOperation = "rotate";
@@ -1817,13 +1817,13 @@ async function appendNowAsync(state, policy, line, queuedBytes, opts) {
1817
1817
  strict: opts.strict
1818
1818
  });
1819
1819
  const rotationLine = state.lastRotation ? opts.onRotate?.(state.lastRotation) : void 0;
1820
- if (rotationLine) await fs.promises.appendFile(policy.file, rotationLine, {
1820
+ if (rotationLine) await syncFs.promises.appendFile(policy.file, rotationLine, {
1821
1821
  encoding: "utf8",
1822
1822
  mode: opts.fileMode
1823
1823
  });
1824
1824
  }
1825
1825
  state.activeOperation = "append";
1826
- await fs.promises.appendFile(policy.file, line, {
1826
+ await syncFs.promises.appendFile(policy.file, line, {
1827
1827
  encoding: "utf8",
1828
1828
  mode: opts.fileMode
1829
1829
  });
@@ -1838,7 +1838,7 @@ async function appendNowAsync(state, policy, line, queuedBytes, opts) {
1838
1838
  function appendNow(state, policy, line, queuedBytes, opts) {
1839
1839
  try {
1840
1840
  state.activeOperation = "append";
1841
- fs.mkdirSync(path.dirname(policy.file), { recursive: true });
1841
+ syncFs.mkdirSync(path.dirname(policy.file), { recursive: true });
1842
1842
  const currentBytes = currentFileBytes(policy.file);
1843
1843
  if (currentBytes + queuedBytes > policy.maxFileBytes && currentBytes > 0) {
1844
1844
  state.activeOperation = "rotate";
@@ -1847,13 +1847,13 @@ function appendNow(state, policy, line, queuedBytes, opts) {
1847
1847
  strict: opts.strict
1848
1848
  });
1849
1849
  const rotationLine = state.lastRotation ? opts.onRotate?.(state.lastRotation) : void 0;
1850
- if (rotationLine) fs.appendFileSync(policy.file, rotationLine, {
1850
+ if (rotationLine) syncFs.appendFileSync(policy.file, rotationLine, {
1851
1851
  encoding: "utf8",
1852
1852
  mode: opts.fileMode
1853
1853
  });
1854
1854
  }
1855
1855
  state.activeOperation = "append";
1856
- fs.appendFileSync(policy.file, line, {
1856
+ syncFs.appendFileSync(policy.file, line, {
1857
1857
  encoding: "utf8",
1858
1858
  mode: opts.fileMode
1859
1859
  });
@@ -1888,7 +1888,7 @@ async function rotateFileLogAsync(filePath, policy, options = {}) {
1888
1888
  skipped: true
1889
1889
  };
1890
1890
  if (policy.maxBackups <= 0) {
1891
- await fs.promises.rm(filePath, { force: true });
1891
+ await syncFs.promises.rm(filePath, { force: true });
1892
1892
  return {
1893
1893
  at: (/* @__PURE__ */ new Date()).toISOString(),
1894
1894
  compressed: policy.compress === "gzip"
@@ -1897,9 +1897,9 @@ async function rotateFileLogAsync(filePath, policy, options = {}) {
1897
1897
  await rotateExistingBackupsAsync(filePath, policy.maxBackups);
1898
1898
  const backup = `${filePath}.1${policy.compress === "gzip" ? ".gz" : ""}`;
1899
1899
  if (policy.compress === "gzip") {
1900
- await fs.promises.writeFile(backup, await gzipAsync(await fs.promises.readFile(filePath)), { mode: options.fileMode });
1901
- await fs.promises.rm(filePath, { force: true });
1902
- } else await fs.promises.rename(filePath, backup);
1900
+ await syncFs.promises.writeFile(backup, await gzipAsync(await syncFs.promises.readFile(filePath)), { mode: options.fileMode });
1901
+ await syncFs.promises.rm(filePath, { force: true });
1902
+ } else await syncFs.promises.rename(filePath, backup);
1903
1903
  await pruneExcessBackupsAsync(filePath, policy.maxBackups);
1904
1904
  return {
1905
1905
  at: (/* @__PURE__ */ new Date()).toISOString(),
@@ -1918,39 +1918,39 @@ async function rotateFileLogAsync(filePath, policy, options = {}) {
1918
1918
  function rotateExistingBackups(filePath, maxBackups) {
1919
1919
  for (const backup of listBackupEntries(filePath).toSorted((a, b) => b.slot - a.slot)) {
1920
1920
  if (backup.slot >= maxBackups) {
1921
- fs.rmSync(backup.path, { force: true });
1921
+ syncFs.rmSync(backup.path, { force: true });
1922
1922
  continue;
1923
1923
  }
1924
1924
  const target = `${filePath}.${backup.slot + 1}${backup.suffix}`;
1925
- fs.rmSync(target, { force: true });
1926
- fs.renameSync(backup.path, target);
1925
+ syncFs.rmSync(target, { force: true });
1926
+ syncFs.renameSync(backup.path, target);
1927
1927
  }
1928
1928
  }
1929
1929
  async function rotateExistingBackupsAsync(filePath, maxBackups) {
1930
1930
  for (const backup of (await listBackupEntriesAsync(filePath)).toSorted((a, b) => b.slot - a.slot)) {
1931
1931
  if (backup.slot >= maxBackups) {
1932
- await fs.promises.rm(backup.path, { force: true });
1932
+ await syncFs.promises.rm(backup.path, { force: true });
1933
1933
  continue;
1934
1934
  }
1935
1935
  const target = `${filePath}.${backup.slot + 1}${backup.suffix}`;
1936
- await fs.promises.rm(target, { force: true });
1937
- await fs.promises.rename(backup.path, target);
1936
+ await syncFs.promises.rm(target, { force: true });
1937
+ await syncFs.promises.rename(backup.path, target);
1938
1938
  }
1939
1939
  }
1940
1940
  function pruneExcessBackups(filePath, maxBackups) {
1941
1941
  const retained = listBackupEntries(filePath).toSorted((a, b) => a.slot - b.slot || b.mtimeMs - a.mtimeMs);
1942
- for (const backup of retained.slice(maxBackups)) fs.rmSync(backup.path, { force: true });
1942
+ for (const backup of retained.slice(maxBackups)) syncFs.rmSync(backup.path, { force: true });
1943
1943
  }
1944
1944
  async function pruneExcessBackupsAsync(filePath, maxBackups) {
1945
1945
  const retained = (await listBackupEntriesAsync(filePath)).toSorted((a, b) => a.slot - b.slot || b.mtimeMs - a.mtimeMs);
1946
- for (const backup of retained.slice(maxBackups)) await fs.promises.rm(backup.path, { force: true });
1946
+ for (const backup of retained.slice(maxBackups)) await syncFs.promises.rm(backup.path, { force: true });
1947
1947
  }
1948
1948
  function listBackupEntries(filePath) {
1949
1949
  const dir = path.dirname(filePath);
1950
1950
  const base = path.basename(filePath).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1951
1951
  let names = [];
1952
1952
  try {
1953
- names = fs.readdirSync(dir);
1953
+ names = syncFs.readdirSync(dir);
1954
1954
  } catch {
1955
1955
  return [];
1956
1956
  }
@@ -1961,7 +1961,7 @@ function listBackupEntries(filePath) {
1961
1961
  const backupPath = path.join(dir, name);
1962
1962
  let mtimeMs = 0;
1963
1963
  try {
1964
- mtimeMs = fs.statSync(backupPath).mtimeMs;
1964
+ mtimeMs = syncFs.statSync(backupPath).mtimeMs;
1965
1965
  } catch {
1966
1966
  return [];
1967
1967
  }
@@ -1978,7 +1978,7 @@ async function listBackupEntriesAsync(filePath) {
1978
1978
  const base = path.basename(filePath).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1979
1979
  let names = [];
1980
1980
  try {
1981
- names = await fs.promises.readdir(dir);
1981
+ names = await syncFs.promises.readdir(dir);
1982
1982
  } catch {
1983
1983
  return [];
1984
1984
  }
@@ -1988,7 +1988,7 @@ async function listBackupEntriesAsync(filePath) {
1988
1988
  if (!match) return null;
1989
1989
  const backupPath = path.join(dir, name);
1990
1990
  try {
1991
- const stat = await fs.promises.stat(backupPath);
1991
+ const stat = await syncFs.promises.stat(backupPath);
1992
1992
  return {
1993
1993
  path: backupPath,
1994
1994
  slot: Number(match[1]),
@@ -2002,14 +2002,14 @@ async function listBackupEntriesAsync(filePath) {
2002
2002
  }
2003
2003
  function currentFileBytes(filePath) {
2004
2004
  try {
2005
- return fs.statSync(filePath).size;
2005
+ return syncFs.statSync(filePath).size;
2006
2006
  } catch {
2007
2007
  return 0;
2008
2008
  }
2009
2009
  }
2010
2010
  async function currentFileBytesAsync(filePath) {
2011
2011
  try {
2012
- return (await fs.promises.stat(filePath)).size;
2012
+ return (await syncFs.promises.stat(filePath)).size;
2013
2013
  } catch {
2014
2014
  return 0;
2015
2015
  }
@@ -2158,7 +2158,7 @@ function buildLogger(settings) {
2158
2158
  for (const transport of externalTransports) attachExternalTransport(logger, transport);
2159
2159
  return logger;
2160
2160
  }
2161
- fs.mkdirSync(path.dirname(settings.file), { recursive: true });
2161
+ syncFs.mkdirSync(path.dirname(settings.file), { recursive: true });
2162
2162
  if (isRollingPath(settings.file)) pruneOldRollingLogs(path.dirname(settings.file));
2163
2163
  const primaryPolicy = resolveFileLogProfile(settings.writerConfig, "primary", {
2164
2164
  file: settings.file,
@@ -2229,7 +2229,7 @@ function isRollingPath(file) {
2229
2229
  }
2230
2230
  function pruneOldRollingLogs(dir) {
2231
2231
  try {
2232
- const entries = fs.readdirSync(dir, { withFileTypes: true });
2232
+ const entries = syncFs.readdirSync(dir, { withFileTypes: true });
2233
2233
  const cutoff = Date.now() - MAX_LOG_AGE_MS;
2234
2234
  for (const entry of entries) {
2235
2235
  if (!entry.isFile()) continue;
@@ -2237,13 +2237,13 @@ function pruneOldRollingLogs(dir) {
2237
2237
  const backupDateMs = rollingBackupDateMs(entry.name);
2238
2238
  if (backupDateMs !== null) {
2239
2239
  if (backupDateMs < cutoff) try {
2240
- fs.rmSync(fullPath, { force: true });
2240
+ syncFs.rmSync(fullPath, { force: true });
2241
2241
  } catch {}
2242
2242
  continue;
2243
2243
  }
2244
2244
  if (!entry.name.startsWith(`${LOG_PREFIX}-`) || !entry.name.endsWith(LOG_SUFFIX)) continue;
2245
2245
  try {
2246
- if (fs.statSync(fullPath).mtimeMs < cutoff) fs.rmSync(fullPath, { force: true });
2246
+ if (syncFs.statSync(fullPath).mtimeMs < cutoff) syncFs.rmSync(fullPath, { force: true });
2247
2247
  } catch {}
2248
2248
  }
2249
2249
  } catch {}
@@ -1,4 +1,4 @@
1
- import { r as markdownToIRWithMeta } from "./ir-BdHn6F6Y.js";
1
+ import { r as markdownToIRWithMeta } from "./ir-B0cUtyev.js";
2
2
  import { t as renderMarkdownWithMarkers } from "./render-2Ztmr_V0.js";
3
3
 
4
4
  //#region src/markdown/tables.ts
@@ -1,4 +1,4 @@
1
- import { tt as escapeRegExp } from "./subsystem-Bv4j-uIg.js";
1
+ import { tt as escapeRegExp } from "./subsystem-D_zHSy02.js";
2
2
 
3
3
  //#region src/auto-reply/tokens.ts
4
4
  const HEARTBEAT_TOKEN = "HEARTBEAT_OK";
@@ -1,5 +1,5 @@
1
- import "./paths-BIDPYPVC.js";
2
- import { t as createSubsystemLogger } from "./subsystem-Bv4j-uIg.js";
1
+ import "./paths-B_gs59ga.js";
2
+ import { t as createSubsystemLogger } from "./subsystem-D_zHSy02.js";
3
3
  import { t as isPlainObject } from "./plain-object-CLm2c5Nu.js";
4
4
  import { createHash } from "node:crypto";
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { t as createSubsystemLogger } from "./subsystem-Bv4j-uIg.js";
2
+ import { t as createSubsystemLogger } from "./subsystem-D_zHSy02.js";
3
3
  import { t as CommandLane } from "./lanes-DTaUAkeG.js";
4
- import { i as summarizeSessionRunPrompt, n as deriveSessionRunId, o as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-DsunFllM.js";
4
+ import { i as summarizeSessionRunPrompt, n as deriveSessionRunId, o as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-9g0HAfTV.js";
5
5
  import { randomUUID } from "node:crypto";
6
6
 
7
7
  //#region src/agents/lanes.ts