wednesdayai 0.5.1-dev.36 → 0.5.1-dev.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/{agent-scope-cTY4-zRz.js → agent-scope-CoIdVzmg.js} +3 -3
  2. package/dist/{agent-turn-runner-JxDS9bU_.js → agent-turn-runner-CiEPY6RO.js} +2 -2
  3. package/dist/{agent-turn-runner-7LQU6Fut.js → agent-turn-runner-DKwd_tAc.js} +6 -6
  4. package/dist/{api-key-rotation-BCh_J5f6.js → api-key-rotation-CoKWzuyV.js} +2 -2
  5. package/dist/{audio-preflight-C9EHsVrE.js → audio-preflight-BV83ctbI.js} +23 -23
  6. package/dist/{audio-preflight-Cxyte-N3.js → audio-preflight-CKFGJslr.js} +3 -3
  7. package/dist/{audio-transcription-runner-CoyogVcx.js → audio-transcription-runner-B-MEt_yD.js} +1 -1
  8. package/dist/{audio-transcription-runner-DXlkPfwW.js → audio-transcription-runner-DRUTJgZh.js} +25 -25
  9. package/dist/build-info.json +3 -3
  10. package/dist/bundled/boot-md/handler.js +50 -50
  11. package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
  12. package/dist/bundled/command-logger/handler.js +2 -2
  13. package/dist/bundled/session-journal/handler.js +50 -50
  14. package/dist/bundled/session-memory/handler.js +50 -50
  15. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  16. package/dist/{chat-content-Cafge7N8.js → chat-content-01nUeO9I.js} +3 -3
  17. package/dist/{chat-content-Csm95kDY.js → chat-content-B2kNxQ3a.js} +39 -39
  18. package/dist/{chrome-H5-7mQ4m.js → chrome-DgDNUC2A.js} +4 -4
  19. package/dist/{chrome-D-DfD0Cv.js → chrome-kwiyU0Mr.js} +31 -31
  20. package/dist/{chunk-zortZzCP.js → chunk-BRJHaAd6.js} +3 -3
  21. package/dist/{command-queue-DfL4YmGb.js → command-queue-CRm1AADE.js} +1 -1
  22. package/dist/{commands-registry-Vo5C1XbD.js → commands-registry-D3lOVOa7.js} +2 -2
  23. package/dist/{deliver-BKt_OVTK.js → deliver-BoOCdGXY.js} +28 -28
  24. package/dist/{deliver-x22mTRDq.js → deliver-CgFkiA4Z.js} +1 -1
  25. package/dist/{diagnostic-8jsvSbYs.js → diagnostic-BSnQ1U_E.js} +3 -3
  26. package/dist/{errors-muW4vMSB.js → errors-CgPgYfWg.js} +1 -1
  27. package/dist/extensionAPI.js +6 -6
  28. package/dist/{fetch-Ciq99DHJ.js → fetch-BBi5dEoV.js} +8 -8
  29. package/dist/{fetch-B9Tca1cY.js → fetch-BrwJHFZR.js} +1 -1
  30. package/dist/{fetch-guard-DaJwMbcY.js → fetch-guard-BcLYPGi1.js} +2 -2
  31. package/dist/{frontmatter-BzlMEBkz.js → frontmatter-DQTIIgFI.js} +5 -5
  32. package/dist/{fs-safe-CDfp5e8Q.js → fs-safe-CRbowDkj.js} +26 -26
  33. package/dist/{ir-BczXO28b.js → ir-D___VWlp.js} +4 -4
  34. package/dist/{json-files-CNVg1Wi5.js → json-files-CurKd8gy.js} +28 -28
  35. package/dist/{legacy-names-CRCLZarD.js → legacy-names-D7ywm6_7.js} +1 -1
  36. package/dist/llm-slug-generator.js +50 -50
  37. package/dist/{manager-ywiQQ5nv.js → manager-yAtdyPwQ.js} +18 -18
  38. package/dist/{markdown-tables-CmGUH7Wy.js → markdown-tables-DfqPFbkZ.js} +2 -2
  39. package/dist/{model-selection-BJZFC8fA.js → model-selection-B7FYf8Fo.js} +83 -83
  40. package/dist/{outbound-attachment-BXAhY7Q6.js → outbound-attachment-BJq1brbB.js} +2 -2
  41. package/dist/{outbound-message-hooks-CjfNIFcN.js → outbound-message-hooks-Dl2zci3u.js} +5 -5
  42. package/dist/{path-alias-guards-BV6CR8H3.js → path-alias-guards-nWrE5acE.js} +1 -1
  43. package/dist/{pi-embedded-BzjQS2tl.js → pi-embedded-BAKd4NmP.js} +18 -18
  44. package/dist/{pi-embedded-D6Ti_RiY.js → pi-embedded-_YhHvi3M.js} +258 -258
  45. package/dist/{pi-model-discovery-PH-bhX7g.js → pi-model-discovery-CusLASy5.js} +7 -7
  46. package/dist/plugin-sdk/provider-media-understanding.js +7 -7
  47. package/dist/{proxy-env-DXcKRnns.js → proxy-env-DrmTb0QW.js} +1 -1
  48. package/dist/{pw-ai-ByUzz5o2.js → pw-ai-BKN66RLi.js} +13 -13
  49. package/dist/{pw-ai-qlENNDHC.js → pw-ai-CPIjXEgJ.js} +1 -1
  50. package/dist/{qmd-manager-CPPURYfg.js → qmd-manager-BYC9bX-E.js} +12 -12
  51. package/dist/{qmd-scope-dd_YbPG-.js → qmd-scope-D6tMcgqR.js} +1 -1
  52. package/dist/{query-expansion-0S2l-J2-.js → query-expansion-CnQI0IeV.js} +13 -13
  53. package/dist/{recorder-CrrhLZt5.js → recorder-B7dhxQ62.js} +2 -2
  54. package/dist/{redact-BkE4uRXu.js → redact-CysJDryP.js} +1 -1
  55. package/dist/{replies-j6q2EArA.js → replies-CP8xbTSR.js} +5 -5
  56. package/dist/{reply-prefix-BCu_i91I.js → reply-prefix-C7r81KLS.js} +1 -1
  57. package/dist/{resolve-route-WUZ7lH6L.js → resolve-route-BvD1w4_v.js} +4 -4
  58. package/dist/{send-lY0a6iA2.js → send-4WdiWuFu.js} +8 -8
  59. package/dist/{send-CFG2EYja.js → send-BZv91SjC.js} +6 -6
  60. package/dist/{send-80rMjd6V.js → send-CjR30q4U.js} +8 -8
  61. package/dist/{send-D1aXT71a.js → send-bmlVFiBl.js} +7 -7
  62. package/dist/{session-meta-BjRAI6ON.js → session-meta-BeqTuIFU.js} +1 -1
  63. package/dist/{sessions-B6iaKddN.js → sessions-BjSGNjb0.js} +5 -5
  64. package/dist/{skill-commands-BG0ravVA.js → skill-commands-CcrQquVr.js} +8 -8
  65. package/dist/{store-BXWb__DD.js → store-DniD8E6a.js} +7 -7
  66. package/dist/{tables-CBpS5G91.js → tables-BbmkAuhA.js} +1 -1
  67. package/dist/{tokens-Q7TMdIpT.js → tokens-C2ll8wSq.js} +1 -1
  68. package/dist/{tool-loop-detection-CVIDnpv_.js → tool-loop-detection-B0Jj6y2H.js} +2 -2
  69. package/dist/{user-run-recording-DNsWtMOn.js → user-run-recording-COpooN64.js} +2 -2
  70. package/dist/{workspace-D8z8s1Xz.js → workspace-xnzx7wEV.js} +26 -26
  71. package/extensions/acpx/package.json +1 -1
  72. package/extensions/anthropic/package.json +1 -1
  73. package/extensions/bifrost/package.json +1 -1
  74. package/extensions/bluebubbles/package.json +1 -1
  75. package/extensions/copilot-proxy/package.json +1 -1
  76. package/extensions/deepgram/package.json +1 -1
  77. package/extensions/deepinfra/package.json +1 -1
  78. package/extensions/diagnostics-otel/package.json +1 -1
  79. package/extensions/diffs/package.json +1 -1
  80. package/extensions/discord/package.json +1 -1
  81. package/extensions/dream-cycle/package.json +1 -1
  82. package/extensions/elevenlabs/package.json +1 -1
  83. package/extensions/feishu/package.json +1 -1
  84. package/extensions/gemini-search/package.json +1 -1
  85. package/extensions/google/package.json +1 -1
  86. package/extensions/google-gemini-cli-auth/package.json +1 -1
  87. package/extensions/googlechat/package.json +1 -1
  88. package/extensions/grok-search/package.json +1 -1
  89. package/extensions/groq/package.json +1 -1
  90. package/extensions/imessage/package.json +1 -1
  91. package/extensions/irc/package.json +1 -1
  92. package/extensions/kimi-search/package.json +1 -1
  93. package/extensions/kokoro/package.json +1 -1
  94. package/extensions/learning-core/package.json +1 -1
  95. package/extensions/line/package.json +1 -1
  96. package/extensions/llm-task/package.json +1 -1
  97. package/extensions/lobster/package.json +1 -1
  98. package/extensions/matrix/CHANGELOG.md +1 -1
  99. package/extensions/matrix/package.json +1 -1
  100. package/extensions/mattermost/package.json +1 -1
  101. package/extensions/memory-core/package.json +1 -1
  102. package/extensions/memory-lancedb/package.json +1 -1
  103. package/extensions/minimax/package.json +1 -1
  104. package/extensions/minimax-portal-auth/package.json +1 -1
  105. package/extensions/mistral/package.json +1 -1
  106. package/extensions/moonshot/package.json +1 -1
  107. package/extensions/msteams/CHANGELOG.md +1 -1
  108. package/extensions/msteams/package.json +1 -1
  109. package/extensions/nextcloud-talk/package.json +1 -1
  110. package/extensions/nostr/CHANGELOG.md +1 -1
  111. package/extensions/nostr/package.json +1 -1
  112. package/extensions/open-prose/package.json +1 -1
  113. package/extensions/openai/package.json +1 -1
  114. package/extensions/openai-realtime/package.json +1 -1
  115. package/extensions/openrouter/package.json +1 -1
  116. package/extensions/perplexity-search/package.json +1 -1
  117. package/extensions/searxng-search/package.json +1 -1
  118. package/extensions/signal/package.json +1 -1
  119. package/extensions/slack/package.json +1 -1
  120. package/extensions/synology-chat/package.json +1 -1
  121. package/extensions/telegram/package.json +1 -1
  122. package/extensions/tlon/package.json +1 -1
  123. package/extensions/twitch/CHANGELOG.md +1 -1
  124. package/extensions/twitch/package.json +1 -1
  125. package/extensions/ui-surfaces/package.json +1 -1
  126. package/extensions/voice-call/CHANGELOG.md +1 -1
  127. package/extensions/voice-call/package.json +1 -1
  128. package/extensions/whatsapp/package.json +1 -1
  129. package/extensions/zai/package.json +1 -1
  130. package/extensions/zalo/CHANGELOG.md +1 -1
  131. package/extensions/zalo/package.json +1 -1
  132. package/extensions/zalouser/CHANGELOG.md +1 -1
  133. package/extensions/zalouser/package.json +1 -1
  134. package/package.json +1 -1
  135. package/dist/github-copilot-token-DrVydgnY.js +0 -106
  136. package/dist/paths-BIDPYPVC.js +0 -233
  137. package/dist/subsystem-BOg9wqSC.js +0 -2777
@@ -1,21 +1,21 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { l as resolveDefaultAgentId } from "./agent-scope-cTY4-zRz.js";
3
- import { l as resolveStateDir } from "./paths-BIDPYPVC.js";
4
- import { t as createSubsystemLogger } from "./subsystem-BOg9wqSC.js";
5
- import { F as normalizeAgentId, G as normalizeAccountId, I as normalizeMainKey, K as normalizeOptionalAccountId, tt as parseAgentSessionKey } from "./workspace-D8z8s1Xz.js";
6
- import { $n as getChannelPlugin, Gt as getActivePluginRegistryVersion, Kn as resolveStorePath, On as updateSessionStoreEntry, U as loadConfig, Ut as getActivePluginRegistry, Xn as getChannelDock, bn as loadSessionStore, fn as getConversationReadQuery, pa as resolveOpenClawAgentDir, tr as normalizeChannelId, un as StorageReadAccessError, yn as listConfiguredSessionStorageAgentIds } from "./model-selection-BJZFC8fA.js";
7
- import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-Q7TMdIpT.js";
8
- import { L as resolveMainSessionKey, Nt as getGlobalHookRunner, P as canonicalizeMainSessionAlias, a as resolveMirroredTranscriptText, at as eventOrder, i as appendAssistantMessageToSessionTranscript, jt as hasInterSessionUserProvenance, o as parseInlineDirectives } from "./sessions-B6iaKddN.js";
2
+ import { l as resolveDefaultAgentId } from "./agent-scope-CoIdVzmg.js";
3
+ import { l as resolveStateDir } from "./paths-B_gs59ga.js";
4
+ import { t as createSubsystemLogger } from "./subsystem-DynBFcQj.js";
5
+ import { F as normalizeAgentId, G as normalizeAccountId, I as normalizeMainKey, K as normalizeOptionalAccountId, tt as parseAgentSessionKey } from "./workspace-xnzx7wEV.js";
6
+ import { $n as getChannelPlugin, Gt as getActivePluginRegistryVersion, Kn as resolveStorePath, On as updateSessionStoreEntry, U as loadConfig, Ut as getActivePluginRegistry, Xn as getChannelDock, bn as loadSessionStore, fn as getConversationReadQuery, pa as resolveOpenClawAgentDir, tr as normalizeChannelId, un as StorageReadAccessError, yn as listConfiguredSessionStorageAgentIds } from "./model-selection-B7FYf8Fo.js";
7
+ import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-C2ll8wSq.js";
8
+ import { L as resolveMainSessionKey, Nt as getGlobalHookRunner, P as canonicalizeMainSessionAlias, a as resolveMirroredTranscriptText, at as eventOrder, i as appendAssistantMessageToSessionTranscript, jt as hasInterSessionUserProvenance, o as parseInlineDirectives } from "./sessions-BjSGNjb0.js";
9
9
  import { n as generateSecureUuid } from "./secure-random-BDA1WAvZ.js";
10
- import { i as getAgentScopedMediaLocalRoots } from "./fetch-Ciq99DHJ.js";
11
- import { n as ensureOpenClawModelsJson, o as isMessagingToolDuplicate, t as extractTextFromChatContent } from "./chat-content-Csm95kDY.js";
12
- import { i as hasErrnoCode } from "./errors-muW4vMSB.js";
13
- import { c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, m as parseFenceSpans, n as chunkByParagraph } from "./chunk-zortZzCP.js";
14
- import { n as resolveMarkdownTableMode } from "./markdown-tables-CmGUH7Wy.js";
15
- import { d as resolveOutboundSessionId, n as createMessageSentEmitter, t as applyMessageSendingHook } from "./outbound-message-hooks-CjfNIFcN.js";
16
- import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-80rMjd6V.js";
10
+ import { i as getAgentScopedMediaLocalRoots } from "./fetch-BBi5dEoV.js";
11
+ import { n as ensureOpenClawModelsJson, o as isMessagingToolDuplicate, t as extractTextFromChatContent } from "./chat-content-B2kNxQ3a.js";
12
+ import { i as hasErrnoCode } from "./errors-CgPgYfWg.js";
13
+ import { c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, m as parseFenceSpans, n as chunkByParagraph } from "./chunk-BRJHaAd6.js";
14
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-DfqPFbkZ.js";
15
+ import { d as resolveOutboundSessionId, n as createMessageSentEmitter, t as applyMessageSendingHook } from "./outbound-message-hooks-Dl2zci3u.js";
16
+ import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-CjR30q4U.js";
17
17
  import path from "node:path";
18
- import fs from "node:fs";
18
+ import syncFs from "node:fs";
19
19
  import { createHash } from "node:crypto";
20
20
  import { setTimeout } from "node:timers/promises";
21
21
 
@@ -371,7 +371,7 @@ function ensureContextWindowCacheLoaded() {
371
371
  await ensureOpenClawModelsJson(cfg);
372
372
  } catch {}
373
373
  try {
374
- const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-PH-bhX7g.js").then((n) => n.r);
374
+ const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-CusLASy5.js").then((n) => n.r);
375
375
  const agentDir = resolveOpenClawAgentDir();
376
376
  const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
377
377
  applyDiscoveredContextWindows({
@@ -871,7 +871,7 @@ function listExistingAgentIdsFromDisk() {
871
871
  const root = resolveStateDir();
872
872
  const agentsDir = path.join(root, "agents");
873
873
  try {
874
- return fs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
874
+ return syncFs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
875
875
  } catch {
876
876
  return [];
877
877
  }
@@ -1072,11 +1072,11 @@ function resolveFailedDir(stateDir) {
1072
1072
  /** Ensure the queue directory (and failed/ subdirectory) exist. */
1073
1073
  async function ensureQueueDir(stateDir) {
1074
1074
  const queueDir = resolveQueueDir(stateDir);
1075
- await fs.promises.mkdir(queueDir, {
1075
+ await syncFs.promises.mkdir(queueDir, {
1076
1076
  recursive: true,
1077
1077
  mode: 448
1078
1078
  });
1079
- await fs.promises.mkdir(resolveFailedDir(stateDir), {
1079
+ await syncFs.promises.mkdir(resolveFailedDir(stateDir), {
1080
1080
  recursive: true,
1081
1081
  mode: 448
1082
1082
  });
@@ -1106,18 +1106,18 @@ async function enqueueDelivery(params, stateDir) {
1106
1106
  const filePath = path.join(queueDir, `${id}.json`);
1107
1107
  const tmp = `${filePath}.${process.pid}.tmp`;
1108
1108
  const json = JSON.stringify(entry, null, 2);
1109
- await fs.promises.writeFile(tmp, json, {
1109
+ await syncFs.promises.writeFile(tmp, json, {
1110
1110
  encoding: "utf-8",
1111
1111
  mode: 384
1112
1112
  });
1113
- await fs.promises.rename(tmp, filePath);
1113
+ await syncFs.promises.rename(tmp, filePath);
1114
1114
  return id;
1115
1115
  }
1116
1116
  /** Remove a successfully delivered entry from the queue. */
1117
1117
  async function ackDelivery(id, stateDir) {
1118
1118
  const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
1119
1119
  try {
1120
- await fs.promises.unlink(filePath);
1120
+ await syncFs.promises.unlink(filePath);
1121
1121
  } catch (err) {
1122
1122
  if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) !== "ENOENT") throw err;
1123
1123
  }
@@ -1144,22 +1144,22 @@ async function failDelivery(id, error, stateDir) {
1144
1144
  return serializeByKey(filePath, () => failDeliveryWrite(filePath, error));
1145
1145
  }
1146
1146
  async function failDeliveryWrite(filePath, error) {
1147
- const raw = await fs.promises.readFile(filePath, "utf-8");
1147
+ const raw = await syncFs.promises.readFile(filePath, "utf-8");
1148
1148
  const entry = JSON.parse(raw);
1149
1149
  entry.retryCount += 1;
1150
1150
  entry.lastAttemptAt = Date.now();
1151
1151
  entry.lastError = error;
1152
1152
  const tmp = `${filePath}.${process.pid}.tmp`;
1153
- await fs.promises.writeFile(tmp, JSON.stringify(entry, null, 2), {
1153
+ await syncFs.promises.writeFile(tmp, JSON.stringify(entry, null, 2), {
1154
1154
  encoding: "utf-8",
1155
1155
  mode: 384
1156
1156
  });
1157
- await fs.promises.rename(tmp, filePath);
1157
+ await syncFs.promises.rename(tmp, filePath);
1158
1158
  }
1159
1159
  /** Read a queue entry raw; null when the file is missing. */
1160
1160
  async function readEntryFile(filePath) {
1161
1161
  try {
1162
- const raw = await fs.promises.readFile(filePath, "utf-8");
1162
+ const raw = await syncFs.promises.readFile(filePath, "utf-8");
1163
1163
  return JSON.parse(raw);
1164
1164
  } catch (err) {
1165
1165
  if (hasErrnoCode(err, "ENOENT")) return null;
@@ -1181,11 +1181,11 @@ function markDeliveryPhase(filePath, transition) {
1181
1181
  const next = transition(entry);
1182
1182
  if (!next.advanced) return next;
1183
1183
  const tmp = `${filePath}.${process.pid}.tmp`;
1184
- await fs.promises.writeFile(tmp, JSON.stringify(next.entry, null, 2), {
1184
+ await syncFs.promises.writeFile(tmp, JSON.stringify(next.entry, null, 2), {
1185
1185
  encoding: "utf-8",
1186
1186
  mode: 384
1187
1187
  });
1188
- await fs.promises.rename(tmp, filePath);
1188
+ await syncFs.promises.rename(tmp, filePath);
1189
1189
  return next;
1190
1190
  });
1191
1191
  }
@@ -7,7 +7,7 @@ import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-D81t1p
7
7
  import { L as resolveMainSessionKey, Nt as getGlobalHookRunner, P as canonicalizeMainSessionAlias, a as resolveMirroredTranscriptText, at as eventOrder, i as appendAssistantMessageToSessionTranscript, o as parseInlineDirectives } from "./sessions-DpewQpWj.js";
8
8
  import { n as generateSecureUuid } from "./secure-random-CXrBi7Jq.js";
9
9
  import { i as getAgentScopedMediaLocalRoots } from "./fetch-EMfyKQ8c.js";
10
- import { n as ensureOpenClawModelsJson, o as isMessagingToolDuplicate, t as extractTextFromChatContent } from "./chat-content-Cafge7N8.js";
10
+ import { n as ensureOpenClawModelsJson, o as isMessagingToolDuplicate, t as extractTextFromChatContent } from "./chat-content-01nUeO9I.js";
11
11
  import { i as hasErrnoCode } from "./errors-CwBnqLdW.js";
12
12
  import { c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, m as parseFenceSpans, n as chunkByParagraph } from "./chunk-B1kH1hpV.js";
13
13
  import { n as resolveMarkdownTableMode } from "./markdown-tables-D9rvkGhN.js";
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { t as createSubsystemLogger } from "./subsystem-BOg9wqSC.js";
2
+ import { t as createSubsystemLogger } from "./subsystem-DynBFcQj.js";
3
3
  import { n as resolveProcessScopedMap } from "./plain-object-Doc_YkH1.js";
4
- import { L as resolveAgentIdFromSessionKey } from "./workspace-D8z8s1Xz.js";
4
+ import { L as resolveAgentIdFromSessionKey } from "./workspace-xnzx7wEV.js";
5
5
  import { t as emitDiagnosticEvent } from "./diagnostic-events-BTSwhIfk.js";
6
6
  import { a as recordTurnDuration, i as recordSessionChannelCorrelation, r as getDiagnosticSessionState, t as diagnosticSessionStates } from "./diagnostic-session-state-DJQj3Ka7.js";
7
7
  import { t as redactIdentifier } from "./redact-identifier-C_VCQ34e.js";
8
- import { t as redactSensitiveText } from "./redact-BkE4uRXu.js";
8
+ import { t as redactSensitiveText } from "./redact-CysJDryP.js";
9
9
  import { createHash } from "node:crypto";
10
10
 
11
11
  //#region src/agents/command-poll-backoff.ts
@@ -1,4 +1,4 @@
1
- import { t as redactSensitiveText } from "./redact-BkE4uRXu.js";
1
+ import { t as redactSensitiveText } from "./redact-CysJDryP.js";
2
2
 
3
3
  //#region src/infra/errors.ts
4
4
  function extractErrorCode(err) {
@@ -7,7 +7,7 @@ import "./github-copilot-token-BJeEWDJb.js";
7
7
  import "./send-CGdfXpKz.js";
8
8
  import "./send-B_ZucklA.js";
9
9
  import "./tokens-D81t1pbF.js";
10
- import { a as resolveAgentTimeoutMs, t as runEmbeddedPiAgent } from "./pi-embedded-BzjQS2tl.js";
10
+ import { a as resolveAgentTimeoutMs, t as runEmbeddedPiAgent } from "./pi-embedded-BAKd4NmP.js";
11
11
  import "./sessions-DpewQpWj.js";
12
12
  import "./diagnostic-events-DMwgeRgr.js";
13
13
  import "./diagnostic-XckGznW_.js";
@@ -16,8 +16,8 @@ import "./redact-DsVjtfGq.js";
16
16
  import "./command-queue-K_AfPnin.js";
17
17
  import "./fetch-EMfyKQ8c.js";
18
18
  import "./pi-model-discovery-DvJxbshP.js";
19
- import "./chat-content-Cafge7N8.js";
20
- import "./chrome-H5-7mQ4m.js";
19
+ import "./chat-content-01nUeO9I.js";
20
+ import "./chrome-kwiyU0Mr.js";
21
21
  import "./json-files-BATYfXx7.js";
22
22
  import "./path-alias-guards-DQnGmIZb.js";
23
23
  import "./errors-CwBnqLdW.js";
@@ -26,7 +26,7 @@ import "./proxy-env-Bs474VeG.js";
26
26
  import "./store-C61Zp9wj.js";
27
27
  import "./fetch-guard-BEeIyqsn.js";
28
28
  import "./thinking-BOHpxvdU.js";
29
- import "./audio-transcription-runner-CoyogVcx.js";
29
+ import "./audio-transcription-runner-B-MEt_yD.js";
30
30
  import "./api-key-rotation-CzNIm6xw.js";
31
31
  import "./chunk-B1kH1hpV.js";
32
32
  import "./markdown-tables-D9rvkGhN.js";
@@ -35,10 +35,10 @@ import "./render-DSLzcBxk.js";
35
35
  import "./commands-registry-HSwuwV_9.js";
36
36
  import "./user-run-recording-B2ufmO0r.js";
37
37
  import "./recorder-BOR-jLfu.js";
38
- import "./agent-turn-runner-JxDS9bU_.js";
38
+ import "./agent-turn-runner-CiEPY6RO.js";
39
39
  import "./skill-commands-Bcc0IOwG.js";
40
40
  import "./outbound-message-hooks-DYzUasBA.js";
41
- import "./deliver-x22mTRDq.js";
41
+ import "./deliver-CgFkiA4Z.js";
42
42
  import "./fetch-wfPHbAnw.js";
43
43
  import "./tables-CNp0EK8h.js";
44
44
  import "./send-D6i2jgso.js";
@@ -1,12 +1,12 @@
1
- import { c as resolveAgentWorkspaceDir } from "./agent-scope-cTY4-zRz.js";
2
- import { l as resolveStateDir } from "./paths-BIDPYPVC.js";
3
- import { mt as resolvePreferredOpenClawTmpDir } from "./subsystem-BOg9wqSC.js";
1
+ import { c as resolveAgentWorkspaceDir } from "./agent-scope-CoIdVzmg.js";
2
+ import { l as resolveStateDir } from "./paths-B_gs59ga.js";
3
+ import { mt as resolvePreferredOpenClawTmpDir } from "./subsystem-DynBFcQj.js";
4
4
  import { n as resolveProcessScopedMap } from "./plain-object-Doc_YkH1.js";
5
- import { _ as runExec } from "./workspace-D8z8s1Xz.js";
6
- import { U as loadConfig } from "./model-selection-BJZFC8fA.js";
7
- import { t as redactSensitiveText } from "./redact-BkE4uRXu.js";
8
- import { n as formatErrorChainMessage } from "./errors-muW4vMSB.js";
9
- import { n as withStrictGuardedFetchMode, s as resolveNetworkSsrFPolicy, t as fetchWithSsrFGuard } from "./fetch-guard-DaJwMbcY.js";
5
+ import { _ as runExec } from "./workspace-xnzx7wEV.js";
6
+ import { U as loadConfig } from "./model-selection-B7FYf8Fo.js";
7
+ import { t as redactSensitiveText } from "./redact-CysJDryP.js";
8
+ import { n as formatErrorChainMessage } from "./errors-CgPgYfWg.js";
9
+ import { n as withStrictGuardedFetchMode, s as resolveNetworkSsrFPolicy, t as fetchWithSsrFGuard } from "./fetch-guard-BcLYPGi1.js";
10
10
  import path from "node:path";
11
11
  import os from "node:os";
12
12
  import fs from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { a as bindAbortRelay } from "./fetch-guard-DaJwMbcY.js";
1
+ import { a as bindAbortRelay } from "./fetch-guard-BcLYPGi1.js";
2
2
 
3
3
  //#region src/infra/fetch.ts
4
4
  const wrapFetchWithAbortSignalMarker = Symbol.for("openclaw.fetch.abort-signal-wrapped");
@@ -1,5 +1,5 @@
1
- import { S as logWarn, x as logInfo } from "./workspace-D8z8s1Xz.js";
2
- import { c as resolvePinnedHostnameWithPolicy, i as createPinnedDispatcher, n as SsrFBlockedError, o as isPrivateIpAddress, r as closeDispatcher, t as hasProxyEnvConfigured } from "./proxy-env-DXcKRnns.js";
1
+ import { S as logWarn, x as logInfo } from "./workspace-xnzx7wEV.js";
2
+ import { c as resolvePinnedHostnameWithPolicy, i as createPinnedDispatcher, n as SsrFBlockedError, o as isPrivateIpAddress, r as closeDispatcher, t as hasProxyEnvConfigured } from "./proxy-env-DrmTb0QW.js";
3
3
  import { EnvHttpProxyAgent, FormData, ProxyAgent, fetch as fetch$1 } from "undici";
4
4
 
5
5
  //#region src/infra/net/ssrf-config.ts
@@ -1,7 +1,7 @@
1
- import { s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-CRCLZarD.js";
1
+ import { s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-D7ywm6_7.js";
2
2
  import path from "node:path";
3
- import fs from "node:fs";
4
- import json5 from "json5";
3
+ import syncFs from "node:fs";
4
+ import JSON5 from "json5";
5
5
  import YAML from "yaml";
6
6
 
7
7
  //#region src/shared/config-eval.ts
@@ -92,7 +92,7 @@ function hasBinary(bin) {
92
92
  for (const part of parts) for (const ext of extensions) {
93
93
  const candidate = path.join(part, bin + ext);
94
94
  try {
95
- fs.accessSync(candidate, fs.constants.X_OK);
95
+ syncFs.accessSync(candidate, syncFs.constants.X_OK);
96
96
  hasBinaryCache.set(bin, true);
97
97
  return true;
98
98
  } catch {}
@@ -258,7 +258,7 @@ function resolveOpenClawManifestBlock(params) {
258
258
  const raw = getFrontmatterString(params.frontmatter, params.key ?? "metadata");
259
259
  if (!raw) return;
260
260
  try {
261
- const parsed = json5.parse(raw);
261
+ const parsed = JSON5.parse(raw);
262
262
  if (!parsed || typeof parsed !== "object") return;
263
263
  return readManifestNamespace(parsed);
264
264
  } catch {
@@ -1,11 +1,11 @@
1
- import { u as expandHomePrefix } from "./paths-BIDPYPVC.js";
2
- import { B as hasNodeErrorCode, H as isPathInside, I as sameFileIdentity, U as isSymlinkOpenError, V as isNotFoundPathError } from "./subsystem-BOg9wqSC.js";
3
- import { S as logWarn } from "./workspace-D8z8s1Xz.js";
4
- import { n as assertNoPathAliasEscape } from "./path-alias-guards-BV6CR8H3.js";
1
+ import { u as expandHomePrefix } from "./paths-B_gs59ga.js";
2
+ import { B as hasNodeErrorCode, H as isPathInside, I as sameFileIdentity, U as isSymlinkOpenError, V as isNotFoundPathError } from "./subsystem-DynBFcQj.js";
3
+ import { S as logWarn } from "./workspace-xnzx7wEV.js";
4
+ import { n as assertNoPathAliasEscape } from "./path-alias-guards-nWrE5acE.js";
5
5
  import path from "node:path";
6
6
  import { constants } from "node:fs";
7
7
  import os from "node:os";
8
- import fs$1 from "node:fs/promises";
8
+ import fs from "node:fs/promises";
9
9
  import { randomUUID } from "node:crypto";
10
10
  import { pipeline } from "node:stream/promises";
11
11
 
@@ -25,19 +25,19 @@ const ensureTrailingSep = (value) => value.endsWith(path.sep) ? value : value +
25
25
  async function expandRelativePathWithHome(relativePath) {
26
26
  let home = process.env.HOME || process.env.USERPROFILE || os.homedir();
27
27
  try {
28
- home = await fs$1.realpath(home);
28
+ home = await fs.realpath(home);
29
29
  } catch {}
30
30
  return expandHomePrefix(relativePath, { home });
31
31
  }
32
32
  async function openVerifiedLocalFile(filePath, options) {
33
33
  try {
34
- if ((await fs$1.lstat(filePath)).isDirectory()) throw new SafeOpenError("not-file", "not a file");
34
+ if ((await fs.lstat(filePath)).isDirectory()) throw new SafeOpenError("not-file", "not a file");
35
35
  } catch (err) {
36
36
  if (err instanceof SafeOpenError) throw err;
37
37
  }
38
38
  let handle;
39
39
  try {
40
- handle = await fs$1.open(filePath, OPEN_READ_FLAGS);
40
+ handle = await fs.open(filePath, OPEN_READ_FLAGS);
41
41
  } catch (err) {
42
42
  if (isNotFoundPathError(err)) throw new SafeOpenError("not-found", "file not found");
43
43
  if (isSymlinkOpenError(err)) throw new SafeOpenError("symlink", "symlink open blocked", { cause: err });
@@ -45,13 +45,13 @@ async function openVerifiedLocalFile(filePath, options) {
45
45
  throw err;
46
46
  }
47
47
  try {
48
- const [stat, lstat] = await Promise.all([handle.stat(), fs$1.lstat(filePath)]);
48
+ const [stat, lstat] = await Promise.all([handle.stat(), fs.lstat(filePath)]);
49
49
  if (lstat.isSymbolicLink()) throw new SafeOpenError("symlink", "symlink not allowed");
50
50
  if (!stat.isFile()) throw new SafeOpenError("not-file", "not a file");
51
51
  if (options?.rejectHardlinks && stat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
52
52
  if (!sameFileIdentity(stat, lstat)) throw new SafeOpenError("path-mismatch", "path changed during read");
53
- const realPath = await fs$1.realpath(filePath);
54
- const realStat = await fs$1.stat(realPath);
53
+ const realPath = await fs.realpath(filePath);
54
+ const realStat = await fs.stat(realPath);
55
55
  if (options?.rejectHardlinks && realStat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
56
56
  if (!sameFileIdentity(stat, realStat)) throw new SafeOpenError("path-mismatch", "path mismatch");
57
57
  return {
@@ -69,7 +69,7 @@ async function openVerifiedLocalFile(filePath, options) {
69
69
  async function resolvePathWithinRoot(params) {
70
70
  let rootReal;
71
71
  try {
72
- rootReal = await fs$1.realpath(params.rootDir);
72
+ rootReal = await fs.realpath(params.rootDir);
73
73
  } catch (err) {
74
74
  if (isNotFoundPathError(err)) throw new SafeOpenError("not-found", "root dir not found");
75
75
  throw err;
@@ -170,7 +170,7 @@ function buildAtomicWriteTempPath(targetPath) {
170
170
  return path.join(dir, `.${base}.${process.pid}.${randomUUID()}.tmp`);
171
171
  }
172
172
  async function writeTempFileForAtomicReplace(params) {
173
- const tempHandle = await fs$1.open(params.tempPath, OPEN_WRITE_CREATE_FLAGS, params.mode);
173
+ const tempHandle = await fs.open(params.tempPath, OPEN_WRITE_CREATE_FLAGS, params.mode);
174
174
  try {
175
175
  if (typeof params.data === "string") await tempHandle.writeFile(params.data, params.encoding ?? "utf8");
176
176
  else await tempHandle.writeFile(params.data);
@@ -180,7 +180,7 @@ async function writeTempFileForAtomicReplace(params) {
180
180
  }
181
181
  }
182
182
  async function verifyAtomicWriteResult(params) {
183
- const rootWithSep = ensureTrailingSep(await fs$1.realpath(params.rootDir));
183
+ const rootWithSep = ensureTrailingSep(await fs.realpath(params.rootDir));
184
184
  const opened = await openVerifiedLocalFile(params.targetPath, { rejectHardlinks: true });
185
185
  try {
186
186
  if (!sameFileIdentity(opened.stat, params.expectedStat)) throw new SafeOpenError("path-mismatch", "path changed during write");
@@ -191,13 +191,13 @@ async function verifyAtomicWriteResult(params) {
191
191
  }
192
192
  async function resolveOpenedFileRealPathForHandle(handle, ioPath) {
193
193
  try {
194
- return await fs$1.realpath(ioPath);
194
+ return await fs.realpath(ioPath);
195
195
  } catch (err) {
196
196
  if (!isNotFoundPathError(err)) throw err;
197
197
  }
198
198
  const fdCandidates = process.platform === "linux" ? [`/proc/self/fd/${handle.fd}`, `/dev/fd/${handle.fd}`] : process.platform === "win32" ? [] : [`/dev/fd/${handle.fd}`];
199
199
  for (const fdPath of fdCandidates) try {
200
- return await fs$1.realpath(fdPath);
200
+ return await fs.realpath(fdPath);
201
201
  } catch {}
202
202
  throw new SafeOpenError("path-mismatch", "unable to resolve opened file path");
203
203
  }
@@ -212,10 +212,10 @@ async function openWritableFileWithinRoot(params) {
212
212
  } catch (err) {
213
213
  throw new SafeOpenError("invalid-path", "path alias escape blocked", { cause: err });
214
214
  }
215
- if (params.mkdir !== false) await fs$1.mkdir(path.dirname(resolved), { recursive: true });
215
+ if (params.mkdir !== false) await fs.mkdir(path.dirname(resolved), { recursive: true });
216
216
  let ioPath = resolved;
217
217
  try {
218
- const resolvedRealPath = await fs$1.realpath(resolved);
218
+ const resolvedRealPath = await fs.realpath(resolved);
219
219
  if (!isPathInside(rootWithSep, resolvedRealPath)) throw new SafeOpenError("outside-workspace", "file is outside workspace root");
220
220
  ioPath = resolvedRealPath;
221
221
  } catch (err) {
@@ -227,10 +227,10 @@ async function openWritableFileWithinRoot(params) {
227
227
  let createdForWrite = false;
228
228
  try {
229
229
  try {
230
- handle = await fs$1.open(ioPath, OPEN_WRITE_EXISTING_FLAGS, fileMode);
230
+ handle = await fs.open(ioPath, OPEN_WRITE_EXISTING_FLAGS, fileMode);
231
231
  } catch (err) {
232
232
  if (!isNotFoundPathError(err)) throw err;
233
- handle = await fs$1.open(ioPath, OPEN_WRITE_CREATE_FLAGS, fileMode);
233
+ handle = await fs.open(ioPath, OPEN_WRITE_CREATE_FLAGS, fileMode);
234
234
  createdForWrite = true;
235
235
  }
236
236
  } catch (err) {
@@ -244,7 +244,7 @@ async function openWritableFileWithinRoot(params) {
244
244
  if (!stat.isFile()) throw new SafeOpenError("invalid-path", "path is not a regular file under root");
245
245
  if (stat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
246
246
  try {
247
- const lstat = await fs$1.lstat(ioPath);
247
+ const lstat = await fs.lstat(ioPath);
248
248
  if (lstat.isSymbolicLink() || !lstat.isFile()) throw new SafeOpenError("invalid-path", "path is not a regular file under root");
249
249
  if (!sameFileIdentity(stat, lstat)) throw new SafeOpenError("path-mismatch", "path changed during write");
250
250
  } catch (err) {
@@ -252,7 +252,7 @@ async function openWritableFileWithinRoot(params) {
252
252
  }
253
253
  const realPath = await resolveOpenedFileRealPathForHandle(handle, ioPath);
254
254
  openedRealPath = realPath;
255
- const realStat = await fs$1.stat(realPath);
255
+ const realStat = await fs.stat(realPath);
256
256
  if (!sameFileIdentity(stat, realStat)) throw new SafeOpenError("path-mismatch", "path mismatch");
257
257
  if (realStat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
258
258
  if (!isPathInside(rootWithSep, realPath)) throw new SafeOpenError("outside-workspace", "file is outside workspace root");
@@ -267,7 +267,7 @@ async function openWritableFileWithinRoot(params) {
267
267
  const cleanupCreatedPath = createdForWrite && err instanceof SafeOpenError;
268
268
  const cleanupPath = openedRealPath ?? ioPath;
269
269
  await handle.close().catch(() => {});
270
- if (cleanupCreatedPath) await fs$1.rm(cleanupPath, { force: true }).catch(() => {});
270
+ if (cleanupCreatedPath) await fs.rm(cleanupPath, { force: true }).catch(() => {});
271
271
  throw err;
272
272
  }
273
273
  }
@@ -290,7 +290,7 @@ async function writeFileWithinRoot(params) {
290
290
  encoding: params.encoding,
291
291
  mode: targetMode || 384
292
292
  });
293
- await fs$1.rename(tempPath, destinationPath);
293
+ await fs.rename(tempPath, destinationPath);
294
294
  tempPath = null;
295
295
  try {
296
296
  await verifyAtomicWriteResult({
@@ -303,7 +303,7 @@ async function writeFileWithinRoot(params) {
303
303
  throw err;
304
304
  }
305
305
  } finally {
306
- if (tempPath) await fs$1.rm(tempPath, { force: true }).catch(() => {});
306
+ if (tempPath) await fs.rm(tempPath, { force: true }).catch(() => {});
307
307
  }
308
308
  }
309
309
  async function copyFileWithinRoot(params) {
@@ -331,7 +331,7 @@ async function copyFileWithinRoot(params) {
331
331
  });
332
332
  await pipeline(sourceStream, targetStream);
333
333
  } catch (err) {
334
- if (target?.createdForWrite) await fs$1.rm(target.openedRealPath, { force: true }).catch(() => {});
334
+ if (target?.createdForWrite) await fs.rm(target.openedRealPath, { force: true }).catch(() => {});
335
335
  throw err;
336
336
  } finally {
337
337
  if (!sourceClosedByStream) await source.handle.close().catch(() => {});
@@ -1,7 +1,7 @@
1
- import { f as logVerbose, h as shouldLogVerbose, st as resolveUserPath } from "./subsystem-BOg9wqSC.js";
2
- import { a as getDefaultMediaLocalRoots, c as convertHeicToJpeg, d as optimizeImageToPng, f as resizeToJpeg, m as extensionForMime, n as fetchRemoteMedia, p as detectMime, u as hasAlphaChannel, v as kindFromMime, x as maxBytesForKind } from "./fetch-Ciq99DHJ.js";
3
- import { o as readLocalFileSafely, t as SafeOpenError } from "./fs-safe-CDfp5e8Q.js";
4
- import { a as chunkText } from "./chunk-zortZzCP.js";
1
+ import { f as logVerbose, h as shouldLogVerbose, st as resolveUserPath } from "./subsystem-DynBFcQj.js";
2
+ import { a as getDefaultMediaLocalRoots, c as convertHeicToJpeg, d as optimizeImageToPng, f as resizeToJpeg, m as extensionForMime, n as fetchRemoteMedia, p as detectMime, u as hasAlphaChannel, v as kindFromMime, x as maxBytesForKind } from "./fetch-BBi5dEoV.js";
3
+ import { o as readLocalFileSafely, t as SafeOpenError } from "./fs-safe-CRbowDkj.js";
4
+ import { a as chunkText } from "./chunk-BRJHaAd6.js";
5
5
  import path from "node:path";
6
6
  import fs from "node:fs/promises";
7
7
  import { fileURLToPath } from "node:url";
@@ -1,14 +1,14 @@
1
- import { m as normalizeSkillFilter } from "./agent-scope-cTY4-zRz.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-BOg9wqSC.js";
1
+ import { m as normalizeSkillFilter } from "./agent-scope-CoIdVzmg.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-DynBFcQj.js";
3
3
  import { n as resolveProcessScopedMap } from "./plain-object-Doc_YkH1.js";
4
- import { h as resolveOpenClawPackageRootSync } from "./workspace-D8z8s1Xz.js";
5
- import { At as resolveMemorySlotDecision, Ot as normalizePluginsConfig, Sa as normalizeResolvedSecretInputString, kt as resolveEffectiveEnableState, wt as loadPluginManifestRegistry } from "./model-selection-BJZFC8fA.js";
6
- 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-BzlMEBkz.js";
7
- import { n as assertNoPathAliasEscape } from "./path-alias-guards-BV6CR8H3.js";
4
+ import { h as resolveOpenClawPackageRootSync } from "./workspace-xnzx7wEV.js";
5
+ import { At as resolveMemorySlotDecision, Ot as normalizePluginsConfig, Sa as normalizeResolvedSecretInputString, kt as resolveEffectiveEnableState, wt as loadPluginManifestRegistry } from "./model-selection-B7FYf8Fo.js";
6
+ 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-DQTIIgFI.js";
7
+ import { n as assertNoPathAliasEscape } from "./path-alias-guards-nWrE5acE.js";
8
8
  import path from "node:path";
9
- import fs from "node:fs";
9
+ import syncFs from "node:fs";
10
10
  import os from "node:os";
11
- import fs$1 from "node:fs/promises";
11
+ import fs from "node:fs/promises";
12
12
  import { URL as URL$1, fileURLToPath } from "node:url";
13
13
  import { randomUUID } from "node:crypto";
14
14
  import { formatSkillsForPrompt, loadSkillsFromDir } from "@mariozechner/pi-coding-agent";
@@ -545,13 +545,13 @@ function shortPath(value) {
545
545
  //#region src/agents/skills/bundled-dir.ts
546
546
  function looksLikeSkillsDir(dir) {
547
547
  try {
548
- const entries = fs.readdirSync(dir, { withFileTypes: true });
548
+ const entries = syncFs.readdirSync(dir, { withFileTypes: true });
549
549
  for (const entry of entries) {
550
550
  if (entry.name.startsWith(".")) continue;
551
551
  const fullPath = path.join(dir, entry.name);
552
552
  if (entry.isFile() && entry.name.endsWith(".md")) return true;
553
553
  if (entry.isDirectory()) {
554
- if (fs.existsSync(path.join(fullPath, "SKILL.md"))) return true;
554
+ if (syncFs.existsSync(path.join(fullPath, "SKILL.md"))) return true;
555
555
  }
556
556
  }
557
557
  } catch {
@@ -566,7 +566,7 @@ function resolveBundledSkillsDir(opts = {}) {
566
566
  const execPath = opts.execPath ?? process.execPath;
567
567
  const execDir = path.dirname(execPath);
568
568
  const sibling = path.join(execDir, "skills");
569
- if (fs.existsSync(sibling)) return sibling;
569
+ if (syncFs.existsSync(sibling)) return sibling;
570
570
  } catch {}
571
571
  try {
572
572
  const moduleUrl = opts.moduleUrl ?? import.meta.url;
@@ -629,7 +629,7 @@ function resolvePluginSkillDirs(params) {
629
629
  const trimmed = raw.trim();
630
630
  if (!trimmed) continue;
631
631
  const candidate = path.resolve(record.rootDir, trimmed);
632
- if (!fs.existsSync(candidate)) {
632
+ if (!syncFs.existsSync(candidate)) {
633
633
  log.warn(`plugin skill path not found (${record.id}): ${candidate}`);
634
634
  continue;
635
635
  }
@@ -660,7 +660,7 @@ async function serializeByKey(key, task) {
660
660
 
661
661
  //#endregion
662
662
  //#region src/agents/skills/workspace.ts
663
- const fsp = fs.promises;
663
+ const fsp = syncFs.promises;
664
664
  const skillsLogger = createSubsystemLogger("skills");
665
665
  const skillCommandDebugOnceState = resolveProcessScopedMap(Symbol.for("openclaw.agents.skills.workspace.skillCommandDebugOnce"));
666
666
  const skillCommandDebugOnce = skillCommandDebugOnceState.get("value") ?? /* @__PURE__ */ new Set();
@@ -739,7 +739,7 @@ function resolveSkillsLimits(config) {
739
739
  }
740
740
  function listChildDirectories(dir) {
741
741
  try {
742
- const entries = fs.readdirSync(dir, { withFileTypes: true });
742
+ const entries = syncFs.readdirSync(dir, { withFileTypes: true });
743
743
  const dirs = [];
744
744
  for (const entry of entries) {
745
745
  if (entry.name.startsWith(".")) continue;
@@ -750,7 +750,7 @@ function listChildDirectories(dir) {
750
750
  continue;
751
751
  }
752
752
  if (entry.isSymbolicLink()) try {
753
- if (fs.statSync(fullPath).isDirectory()) dirs.push(entry.name);
753
+ if (syncFs.statSync(fullPath).isDirectory()) dirs.push(entry.name);
754
754
  } catch {}
755
755
  }
756
756
  return dirs;
@@ -761,7 +761,7 @@ function listChildDirectories(dir) {
761
761
  function resolveNestedSkillsRoot(dir, opts) {
762
762
  const nested = path.join(dir, "skills");
763
763
  try {
764
- if (!fs.existsSync(nested) || !fs.statSync(nested).isDirectory()) return { baseDir: dir };
764
+ if (!syncFs.existsSync(nested) || !syncFs.statSync(nested).isDirectory()) return { baseDir: dir };
765
765
  } catch {
766
766
  return { baseDir: dir };
767
767
  }
@@ -770,7 +770,7 @@ function resolveNestedSkillsRoot(dir, opts) {
770
770
  const toScan = scanLimit === 0 ? [] : nestedDirs.slice(0, Math.min(nestedDirs.length, scanLimit));
771
771
  for (const name of toScan) {
772
772
  const skillMd = path.join(nested, name, "SKILL.md");
773
- if (fs.existsSync(skillMd)) return {
773
+ if (syncFs.existsSync(skillMd)) return {
774
774
  baseDir: nested,
775
775
  note: `Detected nested skills root at ${nested}`
776
776
  };
@@ -790,9 +790,9 @@ function loadSkillEntries(workspaceDir, opts) {
790
790
  const loadSkills = (params) => {
791
791
  const baseDir = resolveNestedSkillsRoot(params.dir, { maxEntriesToScan: limits.maxCandidatesPerRoot }).baseDir;
792
792
  const rootSkillMd = path.join(baseDir, "SKILL.md");
793
- if (fs.existsSync(rootSkillMd)) {
793
+ if (syncFs.existsSync(rootSkillMd)) {
794
794
  try {
795
- const size = fs.statSync(rootSkillMd).size;
795
+ const size = syncFs.statSync(rootSkillMd).size;
796
796
  if (size > limits.maxSkillFileBytes) {
797
797
  skillsLogger.warn("Skipping skills root due to oversized SKILL.md.", {
798
798
  dir: baseDir,
@@ -831,9 +831,9 @@ function loadSkillEntries(workspaceDir, opts) {
831
831
  for (const name of limitedChildren) {
832
832
  const skillDir = path.join(baseDir, name);
833
833
  const skillMd = path.join(skillDir, "SKILL.md");
834
- if (!fs.existsSync(skillMd)) continue;
834
+ if (!syncFs.existsSync(skillMd)) continue;
835
835
  try {
836
- const size = fs.statSync(skillMd).size;
836
+ const size = syncFs.statSync(skillMd).size;
837
837
  if (size > limits.maxSkillFileBytes) {
838
838
  skillsLogger.warn("Skipping skill due to oversized SKILL.md.", {
839
839
  skill: name,
@@ -901,7 +901,7 @@ function loadSkillEntries(workspaceDir, opts) {
901
901
  return Array.from(merged.values()).map((skill) => {
902
902
  let frontmatter = {};
903
903
  try {
904
- frontmatter = parseFrontmatter(fs.readFileSync(skill.filePath, "utf-8"));
904
+ frontmatter = parseFrontmatter(syncFs.readFileSync(skill.filePath, "utf-8"));
905
905
  } catch {}
906
906
  return {
907
907
  skill,
@@ -1139,7 +1139,7 @@ function buildWorkspaceSkillCommandSpecs(workspaceDir, opts) {
1139
1139
  //#region src/infra/json-files.ts
1140
1140
  async function readJsonFile(filePath) {
1141
1141
  try {
1142
- const raw = await fs$1.readFile(filePath, "utf8");
1142
+ const raw = await fs.readFile(filePath, "utf8");
1143
1143
  return JSON.parse(raw);
1144
1144
  } catch {
1145
1145
  return null;
@@ -1154,7 +1154,7 @@ async function writeJsonAtomic(filePath, value, options) {
1154
1154
  }
1155
1155
  async function chmodIfSupported(filePath, mode) {
1156
1156
  try {
1157
- await fs$1.chmod(filePath, mode);
1157
+ await fs.chmod(filePath, mode);
1158
1158
  } catch (err) {
1159
1159
  if (process.platform === "win32") return;
1160
1160
  throw err;
@@ -1165,18 +1165,18 @@ async function writeTextAtomic(filePath, content, options) {
1165
1165
  const payload = options?.appendTrailingNewline && !content.endsWith("\n") ? `${content}\n` : content;
1166
1166
  const mkdirOptions = { recursive: true };
1167
1167
  if (typeof options?.ensureDirMode === "number") mkdirOptions.mode = options.ensureDirMode;
1168
- await fs$1.mkdir(path.dirname(filePath), mkdirOptions);
1168
+ await fs.mkdir(path.dirname(filePath), mkdirOptions);
1169
1169
  const tmp = `${filePath}.${randomUUID()}.tmp`;
1170
1170
  try {
1171
- await fs$1.writeFile(tmp, payload, {
1171
+ await fs.writeFile(tmp, payload, {
1172
1172
  encoding: "utf8",
1173
1173
  mode
1174
1174
  });
1175
1175
  await chmodIfSupported(tmp, mode);
1176
- await fs$1.rename(tmp, filePath);
1176
+ await fs.rename(tmp, filePath);
1177
1177
  await chmodIfSupported(filePath, mode);
1178
1178
  } finally {
1179
- await fs$1.rm(tmp, { force: true }).catch(() => void 0);
1179
+ await fs.rm(tmp, { force: true }).catch(() => void 0);
1180
1180
  }
1181
1181
  }
1182
1182
  function createAsyncLock() {