wednesdayai 0.6.1-dev.27 → 0.6.1-dev.28

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 (185) hide show
  1. package/dist/{agent-CQhgyAis.js → agent-BDuI5Zvc.js} +26 -26
  2. package/dist/{agent-Y_2aRBZH.js → agent-BW-Yan08.js} +11 -11
  3. package/dist/{agent-turn-runner-faZvyYiv.js → agent-turn-runner-BfXiXNe2.js} +6 -6
  4. package/dist/{agent-turn-runner-ClBJoKQQ.js → agent-turn-runner-CHm-I95T.js} +5 -5
  5. package/dist/build-info.json +3 -3
  6. package/dist/bundled/boot-md/handler.js +32 -32
  7. package/dist/bundled/bootstrap-extra-files/handler.js +4 -4
  8. package/dist/bundled/command-logger/handler.js +2 -2
  9. package/dist/bundled/session-journal/handler.js +31 -31
  10. package/dist/bundled/session-memory/handler.js +31 -31
  11. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  12. package/dist/{chrome-B3nEcesV.js → chrome-CKy31bWh.js} +32 -32
  13. package/dist/{chrome-DLbFTDQE.js → chrome-Ct9vb6SC.js} +12 -12
  14. package/dist/{command-queue-BSbitNdP.js → command-queue-AIWqKnVD.js} +1 -1
  15. package/dist/{command-queue-BijpV9rd.js → command-queue-CNStMA4Y.js} +1 -1
  16. package/dist/control-ui-v2/assets/{AgentsView-DVvw6PTU.js → AgentsView-3Qsr3xnf.js} +1 -1
  17. package/dist/control-ui-v2/assets/{AutomationsView-CxjmPRdI.js → AutomationsView-DkBzPKKQ.js} +1 -1
  18. package/dist/control-ui-v2/assets/Badge-CB5TWfdz.js +1 -0
  19. package/dist/control-ui-v2/assets/{Button-DL76WqX4.js → Button-CGdLofSY.js} +1 -1
  20. package/dist/control-ui-v2/assets/{ChannelsView-BDcVzQIM.js → ChannelsView-BRb8eYyh.js} +1 -1
  21. package/dist/control-ui-v2/assets/{ConfigForm-CbvOdyOA.js → ConfigForm-D8_bqW8x.js} +1 -1
  22. package/dist/control-ui-v2/assets/{ConfirmDialog-DGHQXUr5.js → ConfirmDialog-B7aotBjN.js} +1 -1
  23. package/dist/control-ui-v2/assets/{DataTable-lEkd1R85.js → DataTable-CSi930kO.js} +1 -1
  24. package/dist/control-ui-v2/assets/{DebugView-CHHmLv3x.js → DebugView-8cZqh6FQ.js} +1 -1
  25. package/dist/control-ui-v2/assets/{Dialog-rIrrCPSu.js → Dialog-CQE8Pvh6.js} +1 -1
  26. package/dist/control-ui-v2/assets/{DreamsView-uQSpm1S4.js → DreamsView-B0KzP2OM.js} +1 -1
  27. package/dist/control-ui-v2/assets/{EntityLink-AEBgCNQX.js → EntityLink-BO2oG3y8.js} +1 -1
  28. package/dist/control-ui-v2/assets/{FilterPills-HxAXXDO8.js → FilterPills-9pNaAyrL.js} +1 -1
  29. package/dist/control-ui-v2/assets/{InstancesView-Svk7C7AX.js → InstancesView-BbunCxYg.js} +1 -1
  30. package/dist/control-ui-v2/assets/{LearningView-CWqWycCM.js → LearningView-CEqD48Ll.js} +1 -1
  31. package/dist/control-ui-v2/assets/{LogsView-D7kaR6es.js → LogsView-fcI0vxkz.js} +1 -1
  32. package/dist/control-ui-v2/assets/{NodesView-CqKA1XAX.js → NodesView-BONHE7EP.js} +1 -1
  33. package/dist/control-ui-v2/assets/{OverviewView-Dz3YnxWP.js → OverviewView-BpynJnjy.js} +1 -1
  34. package/dist/control-ui-v2/assets/{Panel-CyfpswdJ.js → Panel-9wOynsWc.js} +1 -1
  35. package/dist/control-ui-v2/assets/{PluginMount-C1HeSpS9.js → PluginMount-6N20-nhI.js} +1 -1
  36. package/dist/control-ui-v2/assets/{PluginPageView-Dap5OwAt.js → PluginPageView-DZ3bh805.js} +1 -1
  37. package/dist/control-ui-v2/assets/{PluginPanels-DdDZQ_Dn.js → PluginPanels-DulRlgcm.js} +1 -1
  38. package/dist/control-ui-v2/assets/{RunsView-CQXkKsIZ.js → RunsView-dcBTwtFX.js} +1 -1
  39. package/dist/control-ui-v2/assets/{SessionsView-Bs9UqOQr.js → SessionsView-CZuTvckb.js} +1 -1
  40. package/dist/control-ui-v2/assets/{SettingsView-BhorzAw5.js → SettingsView-BTcubWvr.js} +1 -1
  41. package/dist/control-ui-v2/assets/{SkillsView-ClzUjPU-.js → SkillsView-Bj7lvW23.js} +1 -1
  42. package/dist/control-ui-v2/assets/{Stat-BruDi6qc.js → Stat-BZwg1PGE.js} +1 -1
  43. package/dist/control-ui-v2/assets/{StatusDot-Cij-6nH8.js → StatusDot-DHhJ1VpB.js} +1 -1
  44. package/dist/control-ui-v2/assets/{StorageView-BYgvfNcg.js → StorageView-B5cF1lld.js} +1 -1
  45. package/dist/control-ui-v2/assets/{UpdatedAgo-DWSnE4WG.js → UpdatedAgo-Dw3kxb2x.js} +1 -1
  46. package/dist/control-ui-v2/assets/{UsageView-C_ezU9jy.js → UsageView-DBZ1WkEI.js} +1 -1
  47. package/dist/control-ui-v2/assets/{config-store-27hOx1yp.js → config-store-XvvVJ8Fq.js} +1 -1
  48. package/dist/control-ui-v2/assets/{format-dlOOV12I.js → format-CGs6a1G6.js} +1 -1
  49. package/dist/control-ui-v2/assets/gateway-features-BZH74_Oc.js +1 -0
  50. package/dist/control-ui-v2/assets/{index-OijNknZs.js → index-BvXiY83i.js} +1 -1
  51. package/dist/control-ui-v2/assets/{links-C1sAzVEH.js → links-DlVrQOFC.js} +2 -2
  52. package/dist/control-ui-v2/assets/{run-rows-BYCIH1Sn.js → run-rows-Au2UUkD7.js} +1 -1
  53. package/dist/control-ui-v2/assets/{runs-store-DLIlHRM6.js → runs-store-DXgNPFWM.js} +1 -1
  54. package/dist/control-ui-v2/assets/{use-gateway-query-CF94JYnM.js → use-gateway-query-D25QZANO.js} +1 -1
  55. package/dist/control-ui-v2/index.html +7 -7
  56. package/dist/{deliver-CY4Fs4RX.js → deliver-DsuMPE0S.js} +28 -28
  57. package/dist/{deliver-xfGDp6XD.js → deliver-DxVojbH7.js} +6 -6
  58. package/dist/{diagnostic-S8OX1Eq2.js → diagnostic-C4pLNG6a.js} +1 -1
  59. package/dist/{diagnostic-BZYYYnMx.js → diagnostic-DJ11ZJIJ.js} +3 -3
  60. package/dist/{errors-BRYMqzPb.js → errors-0-at0aYV.js} +1 -1
  61. package/dist/extensionAPI.js +24 -24
  62. package/dist/{fences-Dtk43Q2a.js → fences-Z8d1dj8p.js} +16 -16
  63. package/dist/{fences-DbKcVN_n.js → fences-j5vzXLXf.js} +1 -1
  64. package/dist/{fetch-guard-UCuiKQ5E.js → fetch-guard-BQ-NMG7L.js} +2 -2
  65. package/dist/{fetch-guard-DuBGo4VE.js → fetch-guard-BaBd9ZVm.js} +2 -2
  66. package/dist/{frontmatter-DHBTRDiB.js → frontmatter-CzhUc9Ri.js} +5 -5
  67. package/dist/{fs-safe-Bk4Thq7a.js → fs-safe-Bd1xxVwv.js} +1 -1
  68. package/dist/{fs-safe-CyG0wflg.js → fs-safe-DMWtsz4J.js} +26 -26
  69. package/dist/{legacy-names-6uH6aLhq.js → legacy-names-chsmo2vs.js} +26 -26
  70. package/dist/llm-slug-generator.js +31 -31
  71. package/dist/{manager-BvLLls5L.js → manager-B4xc1xN6.js} +16 -16
  72. package/dist/{manager-Cf3W8LKj.js → manager-CD-sBxdS.js} +3 -3
  73. package/dist/{model-selection-Ca4WCV4n.js → model-selection-CYS--Nqz.js} +1 -1
  74. package/dist/{model-selection-CbMZx9fR.js → model-selection-Ds5bEVQ2.js} +82 -82
  75. package/dist/{nudge-DelcKR7z.js → nudge-CKFTN2YI.js} +9 -9
  76. package/dist/{nudge-Dd9wU1K5.js → nudge-DZuNGDE_.js} +32 -32
  77. package/dist/{outbound-attachment-CKATrxgO.js → outbound-attachment-BsEApkFu.js} +9 -9
  78. package/dist/{outbound-attachment-Btl5f-Lu.js → outbound-attachment-DHLTkCuI.js} +4 -4
  79. package/dist/{pi-embedded-ApthdT0k.js → pi-embedded-C8SqFziv.js} +40 -40
  80. package/dist/{pi-embedded-D-4wht-f.js → pi-embedded-yXKiYEGf.js} +229 -229
  81. package/dist/{pi-model-discovery-Dgbp4zjx.js → pi-model-discovery-CtfGh_up.js} +7 -7
  82. package/dist/{pi-model-discovery-D-D_mngz.js → pi-model-discovery-De5Z6lro.js} +1 -1
  83. package/dist/{proxy-env-v_oj7Urd.js → proxy-env-D4WYaw6X.js} +1 -1
  84. package/dist/{proxy-env-BRG1LWK1.js → proxy-env-DPCNy_X3.js} +1 -1
  85. package/dist/{pw-ai-BH-MmrGa.js → pw-ai-BmuDO1HM.js} +5 -5
  86. package/dist/{pw-ai-DK4N7_nV.js → pw-ai-ohfJZ9jX.js} +11 -11
  87. package/dist/{qmd-manager-Cdz2xlNp.js → qmd-manager-2dro3Ccn.js} +9 -9
  88. package/dist/{qmd-manager-NT_CKYQG.js → qmd-manager-CgZ9ng9u.js} +4 -4
  89. package/dist/{qmd-scope-CyWbQgiS.js → qmd-scope-DMUA3Vq9.js} +1 -1
  90. package/dist/{qmd-scope-hzI66flw.js → qmd-scope-RFd-g5Qi.js} +1 -1
  91. package/dist/{query-expansion-CPkdZdty.js → query-expansion-DQ8zm-TE.js} +1 -1
  92. package/dist/{query-expansion-feTsk3WF.js → query-expansion-GZKwviqQ.js} +13 -13
  93. package/dist/{recorder-DCGoPaKG.js → recorder-DA5NY6nl.js} +1 -1
  94. package/dist/{recorder-C3f7IlHZ.js → recorder-dKE74HOC.js} +2 -2
  95. package/dist/{redact-C4XKILzo.js → redact-LOuk7TRy.js} +1 -1
  96. package/dist/{reply-directives-BjV2MFIq.js → reply-directives-8FtYI79u.js} +9 -9
  97. package/dist/{reply-directives-ToqsETSh.js → reply-directives-CE9WoRyW.js} +49 -49
  98. package/dist/{runs-CPjMwHXQ.js → runs-BIabbRe5.js} +8 -8
  99. package/dist/{runs-D7qs08K3.js → runs-Dw8BeXyu.js} +5 -5
  100. package/dist/{send-BnVk7V-5.js → send-BQzswQlt.js} +5 -5
  101. package/dist/{send-DDBl5H1k.js → send-BTp_lz-m.js} +4 -4
  102. package/dist/{send-B9huC0Lk.js → send-CWcFiq7U.js} +3 -3
  103. package/dist/{send-Cj5zKV3M.js → send-DW_8PsC0.js} +4 -4
  104. package/dist/{sessions-zel35iDK.js → sessions-Bz8mUwgo.js} +5 -5
  105. package/dist/{sessions-CXuFR_IY.js → sessions-DKv9bCbi.js} +1 -1
  106. package/dist/{subsystem-DoQFckDJ.js → subsystem-cFv2jJm-.js} +71 -71
  107. package/dist/{tool-loop-detection-CtOkwPJY.js → tool-loop-detection-9fAxiikd.js} +2 -2
  108. package/dist/{user-run-recording-BVpLQDqe.js → user-run-recording-C1LRU5Lb.js} +2 -2
  109. package/dist/{user-run-recording-C10wwXyW.js → user-run-recording-CWRiZJsh.js} +1 -1
  110. package/dist/web-client/assets/{hast-util-from-dom-CvePVP6E.js → hast-util-from-dom-BoP9fB2c.js} +1 -1
  111. package/dist/web-client/assets/{hast-util-to-mdast-CwugKdbc.js → hast-util-to-mdast-Bo07nYTv.js} +1 -1
  112. package/dist/web-client/assets/{index-CFHLAWrp.js → index-CwqOe0fG.js} +2 -2
  113. package/dist/web-client/index.html +1 -1
  114. package/dist/{ws-2U5gNvRt.js → ws-Do6yaRWR.js} +1 -1
  115. package/dist/{ws-DrXm3NWZ.js → ws-Dt2EocLN.js} +1 -1
  116. package/extensions/a2a/package.json +1 -1
  117. package/extensions/acpx/package.json +1 -1
  118. package/extensions/anthropic/package.json +1 -1
  119. package/extensions/bifrost/package.json +1 -1
  120. package/extensions/bluebubbles/package.json +1 -1
  121. package/extensions/copilot-proxy/package.json +1 -1
  122. package/extensions/deepgram/package.json +1 -1
  123. package/extensions/deepinfra/package.json +1 -1
  124. package/extensions/diagnostics-otel/package.json +1 -1
  125. package/extensions/diffs/package.json +1 -1
  126. package/extensions/discord/package.json +1 -1
  127. package/extensions/dream-cycle/package.json +1 -1
  128. package/extensions/elevenlabs/package.json +1 -1
  129. package/extensions/feishu/package.json +1 -1
  130. package/extensions/gemini-search/package.json +1 -1
  131. package/extensions/google/package.json +1 -1
  132. package/extensions/google-gemini-cli-auth/package.json +1 -1
  133. package/extensions/googlechat/package.json +1 -1
  134. package/extensions/grok-search/package.json +1 -1
  135. package/extensions/groq/package.json +1 -1
  136. package/extensions/identity-oidc/package.json +1 -1
  137. package/extensions/imessage/package.json +1 -1
  138. package/extensions/irc/package.json +1 -1
  139. package/extensions/kimi-search/package.json +1 -1
  140. package/extensions/kokoro/package.json +1 -1
  141. package/extensions/learning-core/package.json +1 -1
  142. package/extensions/line/package.json +1 -1
  143. package/extensions/llm-task/package.json +1 -1
  144. package/extensions/lobster/package.json +1 -1
  145. package/extensions/matrix/CHANGELOG.md +1 -1
  146. package/extensions/matrix/package.json +1 -1
  147. package/extensions/mattermost/package.json +1 -1
  148. package/extensions/memory-core/package.json +1 -1
  149. package/extensions/memory-lancedb/package.json +1 -1
  150. package/extensions/minimax/package.json +1 -1
  151. package/extensions/minimax-portal-auth/package.json +1 -1
  152. package/extensions/mistral/package.json +1 -1
  153. package/extensions/moonshot/package.json +1 -1
  154. package/extensions/msteams/CHANGELOG.md +1 -1
  155. package/extensions/msteams/package.json +1 -1
  156. package/extensions/nextcloud-talk/package.json +1 -1
  157. package/extensions/nostr/CHANGELOG.md +1 -1
  158. package/extensions/nostr/package.json +1 -1
  159. package/extensions/open-prose/package.json +1 -1
  160. package/extensions/openai/package.json +1 -1
  161. package/extensions/openai-realtime/package.json +1 -1
  162. package/extensions/openrouter/package.json +1 -1
  163. package/extensions/perplexity-search/package.json +1 -1
  164. package/extensions/searxng-search/package.json +1 -1
  165. package/extensions/signal/package.json +1 -1
  166. package/extensions/slack/package.json +1 -1
  167. package/extensions/synology-chat/package.json +1 -1
  168. package/extensions/telegram/package.json +1 -1
  169. package/extensions/tlon/package.json +1 -1
  170. package/extensions/twitch/CHANGELOG.md +1 -1
  171. package/extensions/twitch/package.json +1 -1
  172. package/extensions/ui-surfaces/package.json +1 -1
  173. package/extensions/voice-call/CHANGELOG.md +1 -1
  174. package/extensions/voice-call/package.json +1 -1
  175. package/extensions/whatsapp/package.json +1 -1
  176. package/extensions/zai/package.json +1 -1
  177. package/extensions/zalo/CHANGELOG.md +1 -1
  178. package/extensions/zalo/package.json +1 -1
  179. package/extensions/zalouser/CHANGELOG.md +1 -1
  180. package/extensions/zalouser/package.json +1 -1
  181. package/package.json +1 -1
  182. package/dist/control-ui-v2/assets/Badge-4n2tRQ02.js +0 -1
  183. package/dist/control-ui-v2/assets/gateway-features-BIj6-KTX.js +0 -1
  184. package/dist/github-copilot-token-Bm6yG6tw.js +0 -106
  185. package/dist/paths-BIDPYPVC.js +0 -233
@@ -1,17 +1,17 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { Da as resolveSessionAgentId, Gn as resolveStorePath, Mn as getConfiguredSessionStorageRuntime, Nn as listConfiguredSessionStorageAgentIds, On as loadSessionStore, Sn as updateSessionStoreEntry, V as loadConfig, Yt as getActivePluginRegistryVersion, Zi as resolveOpenClawAgentDir, _ as resolveImplicitBedrockProvider, g as normalizeProviders, ga as listAgentEntries, gn as getConversationReadQuery, ir as getChannelDock, lr as normalizeChannelId, ma as isAgentUserFacing, mn as StorageReadAccessError, qt as getActivePluginRegistry, sr as getChannelPlugin, v as resolveImplicitCopilotProvider, wa as resolveDefaultAgentId, y as resolveImplicitProviders } from "./model-selection-CbMZx9fR.js";
3
- import { l as resolveStateDir } from "./paths-BIDPYPVC.js";
4
- import { G as applyConfigEnvVars, f as logVerbose, rt as isRecord, t as createSubsystemLogger } from "./subsystem-DoQFckDJ.js";
5
- import { $ as normalizeAccountId, H as normalizeAgentId, U as normalizeMainKey, et as normalizeOptionalAccountId, lt as parseAgentSessionKey, n as createInternalHookEvent, o as triggerInternalHook } from "./legacy-names-6uH6aLhq.js";
6
- import { _ as isMessagingToolDuplicate, r as extractTextFromChatContent, t as parseReplyDirectives } from "./reply-directives-ToqsETSh.js";
7
- import { Jt as buildPluginTurnIdentity, L as resolveMainSessionKey, Lt as hasInterSessionUserProvenance, P as canonicalizeMainSessionAlias, a as resolveMirroredTranscriptText, dt as eventOrder, i as appendAssistantMessageToSessionTranscript, o as parseInlineDirectives, qt as buildPluginRuntimeIdentity, zt as getGlobalHookRunner } from "./sessions-zel35iDK.js";
2
+ import { Da as resolveSessionAgentId, Gn as resolveStorePath, Mn as getConfiguredSessionStorageRuntime, Nn as listConfiguredSessionStorageAgentIds, On as loadSessionStore, Sn as updateSessionStoreEntry, V as loadConfig, Yt as getActivePluginRegistryVersion, Zi as resolveOpenClawAgentDir, _ as resolveImplicitBedrockProvider, g as normalizeProviders, ga as listAgentEntries, gn as getConversationReadQuery, ir as getChannelDock, lr as normalizeChannelId, ma as isAgentUserFacing, mn as StorageReadAccessError, qt as getActivePluginRegistry, sr as getChannelPlugin, v as resolveImplicitCopilotProvider, wa as resolveDefaultAgentId, y as resolveImplicitProviders } from "./model-selection-Ds5bEVQ2.js";
3
+ import { l as resolveStateDir } from "./paths-B_gs59ga.js";
4
+ import { G as applyConfigEnvVars, f as logVerbose, rt as isRecord, t as createSubsystemLogger } from "./subsystem-cFv2jJm-.js";
5
+ import { $ as normalizeAccountId, H as normalizeAgentId, U as normalizeMainKey, et as normalizeOptionalAccountId, lt as parseAgentSessionKey, n as createInternalHookEvent, o as triggerInternalHook } from "./legacy-names-chsmo2vs.js";
6
+ import { _ as isMessagingToolDuplicate, r as extractTextFromChatContent, t as parseReplyDirectives } from "./reply-directives-CE9WoRyW.js";
7
+ import { Jt as buildPluginTurnIdentity, L as resolveMainSessionKey, Lt as hasInterSessionUserProvenance, P as canonicalizeMainSessionAlias, a as resolveMirroredTranscriptText, dt as eventOrder, i as appendAssistantMessageToSessionTranscript, o as parseInlineDirectives, qt as buildPluginRuntimeIdentity, zt as getGlobalHookRunner } from "./sessions-Bz8mUwgo.js";
8
8
  import { n as generateSecureUuid } from "./secure-random-CSsVRTTy.js";
9
- import { i as hasErrnoCode } from "./errors-BRYMqzPb.js";
10
- import { S as getAgentScopedMediaLocalRoots, a as resolveMarkdownTableMode, f as chunkMarkdownTextWithMode, h as resolveChunkDelivery, u as chunkByParagraph, v as resolveTextChunkLimit } from "./outbound-attachment-CKATrxgO.js";
11
- import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-BnVk7V-5.js";
9
+ import { i as hasErrnoCode } from "./errors-0-at0aYV.js";
10
+ import { S as getAgentScopedMediaLocalRoots, a as resolveMarkdownTableMode, f as chunkMarkdownTextWithMode, h as resolveChunkDelivery, u as chunkByParagraph, v as resolveTextChunkLimit } from "./outbound-attachment-BsEApkFu.js";
11
+ import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-BQzswQlt.js";
12
12
  import path from "node:path";
13
- import fs from "node:fs";
14
- import fs$1 from "node:fs/promises";
13
+ import syncFs from "node:fs";
14
+ import fs from "node:fs/promises";
15
15
  import { createHash } from "node:crypto";
16
16
  import { setTimeout } from "node:timers/promises";
17
17
 
@@ -103,7 +103,7 @@ function mergeProviders(params) {
103
103
  }
104
104
  async function readJson(pathname) {
105
105
  try {
106
- const raw = await fs$1.readFile(pathname, "utf8");
106
+ const raw = await fs.readFile(pathname, "utf8");
107
107
  return JSON.parse(raw);
108
108
  } catch {
109
109
  return null;
@@ -163,7 +163,7 @@ async function resolveProvidersForMode(params) {
163
163
  }
164
164
  async function readRawFile(pathname) {
165
165
  try {
166
- return await fs$1.readFile(pathname, "utf8");
166
+ return await fs.readFile(pathname, "utf8");
167
167
  } catch {
168
168
  return "";
169
169
  }
@@ -195,11 +195,11 @@ async function ensureOpenClawModelsJson(config, agentDirOverride) {
195
195
  agentDir,
196
196
  wrote: false
197
197
  };
198
- await fs$1.mkdir(agentDir, {
198
+ await fs.mkdir(agentDir, {
199
199
  recursive: true,
200
200
  mode: 448
201
201
  });
202
- await fs$1.writeFile(targetPath, next, { mode: 384 });
202
+ await fs.writeFile(targetPath, next, { mode: 384 });
203
203
  return {
204
204
  agentDir,
205
205
  wrote: true
@@ -690,7 +690,7 @@ function ensureContextWindowCacheLoaded() {
690
690
  await ensureOpenClawModelsJson(cfg);
691
691
  } catch {}
692
692
  try {
693
- const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-Dgbp4zjx.js").then((n) => n.r);
693
+ const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-CtfGh_up.js").then((n) => n.r);
694
694
  const agentDir = resolveOpenClawAgentDir();
695
695
  const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
696
696
  applyDiscoveredContextWindows({
@@ -927,7 +927,7 @@ function listExistingAgentIdsFromDisk() {
927
927
  const root = resolveStateDir();
928
928
  const agentsDir = path.join(root, "agents");
929
929
  try {
930
- return fs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
930
+ return syncFs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
931
931
  } catch {
932
932
  return [];
933
933
  }
@@ -1461,11 +1461,11 @@ function resolveFailedDir(stateDir) {
1461
1461
  /** Ensure the queue directory (and failed/ subdirectory) exist. */
1462
1462
  async function ensureQueueDir(stateDir) {
1463
1463
  const queueDir = resolveQueueDir(stateDir);
1464
- await fs.promises.mkdir(queueDir, {
1464
+ await syncFs.promises.mkdir(queueDir, {
1465
1465
  recursive: true,
1466
1466
  mode: 448
1467
1467
  });
1468
- await fs.promises.mkdir(resolveFailedDir(stateDir), {
1468
+ await syncFs.promises.mkdir(resolveFailedDir(stateDir), {
1469
1469
  recursive: true,
1470
1470
  mode: 448
1471
1471
  });
@@ -1495,18 +1495,18 @@ async function enqueueDelivery(params, stateDir) {
1495
1495
  const filePath = path.join(queueDir, `${id}.json`);
1496
1496
  const tmp = `${filePath}.${process.pid}.tmp`;
1497
1497
  const json = JSON.stringify(entry, null, 2);
1498
- await fs.promises.writeFile(tmp, json, {
1498
+ await syncFs.promises.writeFile(tmp, json, {
1499
1499
  encoding: "utf-8",
1500
1500
  mode: 384
1501
1501
  });
1502
- await fs.promises.rename(tmp, filePath);
1502
+ await syncFs.promises.rename(tmp, filePath);
1503
1503
  return id;
1504
1504
  }
1505
1505
  /** Remove a successfully delivered entry from the queue. */
1506
1506
  async function ackDelivery(id, stateDir) {
1507
1507
  const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
1508
1508
  try {
1509
- await fs.promises.unlink(filePath);
1509
+ await syncFs.promises.unlink(filePath);
1510
1510
  } catch (err) {
1511
1511
  if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) !== "ENOENT") throw err;
1512
1512
  }
@@ -1533,22 +1533,22 @@ async function failDelivery(id, error, stateDir) {
1533
1533
  return serializeByKey(filePath, () => failDeliveryWrite(filePath, error));
1534
1534
  }
1535
1535
  async function failDeliveryWrite(filePath, error) {
1536
- const raw = await fs.promises.readFile(filePath, "utf-8");
1536
+ const raw = await syncFs.promises.readFile(filePath, "utf-8");
1537
1537
  const entry = JSON.parse(raw);
1538
1538
  entry.retryCount += 1;
1539
1539
  entry.lastAttemptAt = Date.now();
1540
1540
  entry.lastError = error;
1541
1541
  const tmp = `${filePath}.${process.pid}.tmp`;
1542
- await fs.promises.writeFile(tmp, JSON.stringify(entry, null, 2), {
1542
+ await syncFs.promises.writeFile(tmp, JSON.stringify(entry, null, 2), {
1543
1543
  encoding: "utf-8",
1544
1544
  mode: 384
1545
1545
  });
1546
- await fs.promises.rename(tmp, filePath);
1546
+ await syncFs.promises.rename(tmp, filePath);
1547
1547
  }
1548
1548
  /** Read a queue entry raw; null when the file is missing. */
1549
1549
  async function readEntryFile(filePath) {
1550
1550
  try {
1551
- const raw = await fs.promises.readFile(filePath, "utf-8");
1551
+ const raw = await syncFs.promises.readFile(filePath, "utf-8");
1552
1552
  return JSON.parse(raw);
1553
1553
  } catch (err) {
1554
1554
  if (hasErrnoCode(err, "ENOENT")) return null;
@@ -1570,11 +1570,11 @@ function markDeliveryPhase(filePath, transition) {
1570
1570
  const next = transition(entry);
1571
1571
  if (!next.advanced) return next;
1572
1572
  const tmp = `${filePath}.${process.pid}.tmp`;
1573
- await fs.promises.writeFile(tmp, JSON.stringify(next.entry, null, 2), {
1573
+ await syncFs.promises.writeFile(tmp, JSON.stringify(next.entry, null, 2), {
1574
1574
  encoding: "utf-8",
1575
1575
  mode: 384
1576
1576
  });
1577
- await fs.promises.rename(tmp, filePath);
1577
+ await syncFs.promises.rename(tmp, filePath);
1578
1578
  return next;
1579
1579
  });
1580
1580
  }
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { Aa as resolveSessionAgentId, Da as resolveDefaultAgentId, En as updateSessionStoreEntry, In as getConfiguredSessionStorageRuntime, Jt as getActivePluginRegistry, Ln as listConfiguredSessionStorageAgentIds, Mn as loadSessionStore, So as normalizeOptionalAccountId, V as loadConfig, Xt as getActivePluginRegistryVersion, Yn as resolveStorePath, _ as resolveImplicitBedrockProvider, _n as StorageReadAccessError, cr as getChannelDock, do as normalizeMainKey, dr as getChannelPlugin, g as normalizeProviders, gn as triggerInternalHook, hn as createInternalHookEvent, jo as parseAgentSessionKey, na as resolveOpenClawAgentDir, pr as normalizeChannelId, uo as normalizeAgentId, v as resolveImplicitCopilotProvider, xa as listAgentEntries, xo as normalizeAccountId, y as resolveImplicitProviders, ya as isAgentUserFacing, yn as getConversationReadQuery } from "./model-selection-Ca4WCV4n.js";
2
+ import { Aa as resolveSessionAgentId, Da as resolveDefaultAgentId, En as updateSessionStoreEntry, In as getConfiguredSessionStorageRuntime, Jt as getActivePluginRegistry, Ln as listConfiguredSessionStorageAgentIds, Mn as loadSessionStore, So as normalizeOptionalAccountId, V as loadConfig, Xt as getActivePluginRegistryVersion, Yn as resolveStorePath, _ as resolveImplicitBedrockProvider, _n as StorageReadAccessError, cr as getChannelDock, do as normalizeMainKey, dr as getChannelPlugin, g as normalizeProviders, gn as triggerInternalHook, hn as createInternalHookEvent, jo as parseAgentSessionKey, na as resolveOpenClawAgentDir, pr as normalizeChannelId, uo as normalizeAgentId, v as resolveImplicitCopilotProvider, xa as listAgentEntries, xo as normalizeAccountId, y as resolveImplicitProviders, ya as isAgentUserFacing, yn as getConversationReadQuery } from "./model-selection-CYS--Nqz.js";
3
3
  import { l as resolveStateDir } from "./paths-B_gs59ga.js";
4
4
  import { G as applyConfigEnvVars, f as logVerbose, rt as isRecord, t as createSubsystemLogger } from "./subsystem-DynBFcQj.js";
5
- import { _ as isMessagingToolDuplicate, r as extractTextFromChatContent, t as parseReplyDirectives } from "./reply-directives-BjV2MFIq.js";
6
- import { Jt as buildPluginTurnIdentity, L as resolveMainSessionKey, P as canonicalizeMainSessionAlias, a as resolveMirroredTranscriptText, dt as eventOrder, i as appendAssistantMessageToSessionTranscript, o as parseInlineDirectives, qt as buildPluginRuntimeIdentity, zt as getGlobalHookRunner } from "./sessions-CXuFR_IY.js";
5
+ import { _ as isMessagingToolDuplicate, r as extractTextFromChatContent, t as parseReplyDirectives } from "./reply-directives-8FtYI79u.js";
6
+ import { Jt as buildPluginTurnIdentity, L as resolveMainSessionKey, P as canonicalizeMainSessionAlias, a as resolveMirroredTranscriptText, dt as eventOrder, i as appendAssistantMessageToSessionTranscript, o as parseInlineDirectives, qt as buildPluginRuntimeIdentity, zt as getGlobalHookRunner } from "./sessions-DKv9bCbi.js";
7
7
  import { n as generateSecureUuid } from "./secure-random-gljjQeWv.js";
8
8
  import { i as hasErrnoCode } from "./errors-yyPKpoXR.js";
9
- import { S as getAgentScopedMediaLocalRoots, a as resolveMarkdownTableMode, f as chunkMarkdownTextWithMode, h as resolveChunkDelivery, u as chunkByParagraph, v as resolveTextChunkLimit } from "./outbound-attachment-Btl5f-Lu.js";
10
- import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-Cj5zKV3M.js";
9
+ import { S as getAgentScopedMediaLocalRoots, a as resolveMarkdownTableMode, f as chunkMarkdownTextWithMode, h as resolveChunkDelivery, u as chunkByParagraph, v as resolveTextChunkLimit } from "./outbound-attachment-DHLTkCuI.js";
10
+ import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-DW_8PsC0.js";
11
11
  import path from "node:path";
12
12
  import syncFs from "node:fs";
13
13
  import fs from "node:fs/promises";
@@ -669,7 +669,7 @@ function ensureContextWindowCacheLoaded() {
669
669
  await ensureOpenClawModelsJson(cfg);
670
670
  } catch {}
671
671
  try {
672
- const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-D-D_mngz.js").then((n) => n.r);
672
+ const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-De5Z6lro.js").then((n) => n.r);
673
673
  const agentDir = resolveOpenClawAgentDir();
674
674
  const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
675
675
  applyDiscoveredContextWindows({
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { po as resolveAgentIdFromSessionKey } from "./model-selection-Ca4WCV4n.js";
2
+ import { po as resolveAgentIdFromSessionKey } from "./model-selection-CYS--Nqz.js";
3
3
  import { t as createSubsystemLogger } from "./subsystem-DynBFcQj.js";
4
4
  import { n as resolveProcessScopedMap } from "./plain-object-Doc_YkH1.js";
5
5
  import { t as emitDiagnosticEvent } from "./diagnostic-events-q1w77c25.js";
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { t as createSubsystemLogger } from "./subsystem-DoQFckDJ.js";
2
+ import { t as createSubsystemLogger } from "./subsystem-cFv2jJm-.js";
3
3
  import { n as resolveProcessScopedMap } from "./plain-object-Doc_YkH1.js";
4
- import { G as resolveAgentIdFromSessionKey } from "./legacy-names-6uH6aLhq.js";
4
+ import { G as resolveAgentIdFromSessionKey } from "./legacy-names-chsmo2vs.js";
5
5
  import { t as emitDiagnosticEvent } from "./diagnostic-events-RfJYFlJM.js";
6
6
  import { a as recordTurnDuration, i as recordSessionChannelCorrelation, r as getDiagnosticSessionState, t as diagnosticSessionStates } from "./diagnostic-session-state-Di8oqY0E.js";
7
7
  import { t as redactIdentifier } from "./redact-identifier-bNChjxxW.js";
8
- import { t as redactSensitiveText } from "./redact-C4XKILzo.js";
8
+ import { t as redactSensitiveText } from "./redact-LOuk7TRy.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-C4XKILzo.js";
1
+ import { t as redactSensitiveText } from "./redact-LOuk7TRy.js";
2
2
 
3
3
  //#region src/infra/errors.ts
4
4
  function extractErrorCode(err) {
@@ -1,33 +1,33 @@
1
- import { Ba as ensureAgentWorkspace, Cn as saveSessionStore, Ea as resolveAgentWorkspaceDir, Gn as resolveSessionFilePath, Mn as loadSessionStore, Yn as resolveStorePath, ga as DEFAULT_PROVIDER, h as resolveThinkingDefault, ha as DEFAULT_MODEL, wa as resolveAgentDir } from "./model-selection-Ca4WCV4n.js";
1
+ import { Ba as ensureAgentWorkspace, Cn as saveSessionStore, Ea as resolveAgentWorkspaceDir, Gn as resolveSessionFilePath, Mn as loadSessionStore, Yn as resolveStorePath, ga as DEFAULT_PROVIDER, h as resolveThinkingDefault, ha as DEFAULT_MODEL, wa as resolveAgentDir } from "./model-selection-CYS--Nqz.js";
2
2
  import "./paths-B_gs59ga.js";
3
3
  import "./subsystem-DynBFcQj.js";
4
- import { C as resolveAgentTimeoutMs, M as resolveAgentIdentity, t as runEmbeddedPiAgent } from "./pi-embedded-ApthdT0k.js";
4
+ import { C as resolveAgentTimeoutMs, M as resolveAgentIdentity, t as runEmbeddedPiAgent } from "./pi-embedded-C8SqFziv.js";
5
5
  import "./github-copilot-token-C-29TbW-.js";
6
- import "./reply-directives-BjV2MFIq.js";
6
+ import "./reply-directives-8FtYI79u.js";
7
7
  import "./diagnostic-events-q1w77c25.js";
8
- import "./sessions-CXuFR_IY.js";
9
- import "./diagnostic-S8OX1Eq2.js";
8
+ import "./sessions-DKv9bCbi.js";
9
+ import "./diagnostic-C4pLNG6a.js";
10
10
  import "./diagnostic-session-state-jW46P4IL.js";
11
11
  import "./redact-CEFvBGJg.js";
12
- import "./command-queue-BijpV9rd.js";
13
- import "./fences-DbKcVN_n.js";
14
- import "./pi-model-discovery-D-D_mngz.js";
15
- import "./deliver-xfGDp6XD.js";
16
- import "./chrome-DLbFTDQE.js";
17
- import "./ws-2U5gNvRt.js";
18
- import "./fs-safe-Bk4Thq7a.js";
12
+ import "./command-queue-CNStMA4Y.js";
13
+ import "./fences-j5vzXLXf.js";
14
+ import "./pi-model-discovery-De5Z6lro.js";
15
+ import "./deliver-DxVojbH7.js";
16
+ import "./chrome-Ct9vb6SC.js";
17
+ import "./ws-Dt2EocLN.js";
18
+ import "./fs-safe-Bd1xxVwv.js";
19
19
  import "./errors-yyPKpoXR.js";
20
- import "./proxy-env-BRG1LWK1.js";
21
- import "./nudge-DelcKR7z.js";
22
- import "./runs-D7qs08K3.js";
23
- import "./outbound-attachment-Btl5f-Lu.js";
24
- import "./fetch-guard-UCuiKQ5E.js";
25
- import "./manager-Cf3W8LKj.js";
26
- import "./user-run-recording-C10wwXyW.js";
27
- import "./recorder-DCGoPaKG.js";
28
- import "./agent-turn-runner-ClBJoKQQ.js";
29
- import "./send-Cj5zKV3M.js";
30
- import "./send-B9huC0Lk.js";
31
- import "./query-expansion-CPkdZdty.js";
20
+ import "./proxy-env-DPCNy_X3.js";
21
+ import "./nudge-CKFTN2YI.js";
22
+ import "./runs-Dw8BeXyu.js";
23
+ import "./outbound-attachment-DHLTkCuI.js";
24
+ import "./fetch-guard-BQ-NMG7L.js";
25
+ import "./manager-CD-sBxdS.js";
26
+ import "./user-run-recording-CWRiZJsh.js";
27
+ import "./recorder-DA5NY6nl.js";
28
+ import "./agent-turn-runner-CHm-I95T.js";
29
+ import "./send-DW_8PsC0.js";
30
+ import "./send-CWcFiq7U.js";
31
+ import "./query-expansion-DQ8zm-TE.js";
32
32
 
33
33
  export { DEFAULT_MODEL, DEFAULT_PROVIDER, ensureAgentWorkspace, loadSessionStore, resolveAgentDir, resolveAgentIdentity, resolveAgentTimeoutMs, resolveAgentWorkspaceDir, resolveSessionFilePath, resolveStorePath, resolveThinkingDefault, runEmbeddedPiAgent, saveSessionStore };
@@ -1,8 +1,8 @@
1
- import { ot as resolveConfigDir } from "./subsystem-DoQFckDJ.js";
2
- import { w as runExec } from "./legacy-names-6uH6aLhq.js";
1
+ import { ot as resolveConfigDir } from "./subsystem-cFv2jJm-.js";
2
+ import { w as runExec } from "./legacy-names-chsmo2vs.js";
3
3
  import path from "node:path";
4
4
  import os from "node:os";
5
- import fs$1 from "node:fs/promises";
5
+ import fs from "node:fs/promises";
6
6
  import crypto from "node:crypto";
7
7
  import { fileTypeFromBuffer } from "file-type";
8
8
  import { pipeline } from "node:stream/promises";
@@ -160,7 +160,7 @@ const MEDIA_FILE_MODE = 420;
160
160
  async function setMediaFileMode(filePath) {
161
161
  if (process.platform === "win32") return;
162
162
  try {
163
- await fs$1.chmod(filePath, MEDIA_FILE_MODE);
163
+ await fs.chmod(filePath, MEDIA_FILE_MODE);
164
164
  } catch (err) {
165
165
  const code = err && typeof err === "object" && "code" in err ? String(err.code) : "";
166
166
  if ([
@@ -187,7 +187,7 @@ function getMediaDir() {
187
187
  }
188
188
  async function ensureMediaDir() {
189
189
  const mediaDir = resolveMediaDir();
190
- await fs$1.mkdir(mediaDir, {
190
+ await fs.mkdir(mediaDir, {
191
191
  recursive: true,
192
192
  mode: 448
193
193
  });
@@ -196,7 +196,7 @@ async function ensureMediaDir() {
196
196
  async function saveMediaBuffer(buffer, contentType, subdir = "inbound", maxBytes = MAX_BYTES, originalFilename) {
197
197
  if (buffer.byteLength > maxBytes) throw new Error(`Media exceeds ${(maxBytes / (1024 * 1024)).toFixed(0)}MB limit`);
198
198
  const dir = path.join(resolveMediaDir(), subdir);
199
- await fs$1.mkdir(dir, {
199
+ await fs.mkdir(dir, {
200
200
  recursive: true,
201
201
  mode: 448
202
202
  });
@@ -216,7 +216,7 @@ async function saveMediaBuffer(buffer, contentType, subdir = "inbound", maxBytes
216
216
  id = sanitized ? `${sanitized}---${uuid}${ext}` : `${uuid}${ext}`;
217
217
  } else id = ext ? `${uuid}${ext}` : uuid;
218
218
  const dest = path.join(dir, id);
219
- await fs$1.writeFile(dest, buffer, { mode: MEDIA_FILE_MODE });
219
+ await fs.writeFile(dest, buffer, { mode: MEDIA_FILE_MODE });
220
220
  await setMediaFileMode(dest);
221
221
  return {
222
222
  id,
@@ -312,11 +312,11 @@ function readJpegExifOrientation(buffer) {
312
312
  return null;
313
313
  }
314
314
  async function withTempDir(fn) {
315
- const dir = await fs$1.mkdtemp(path.join(os.tmpdir(), "openclaw-img-"));
315
+ const dir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-img-"));
316
316
  try {
317
317
  return await fn(dir);
318
318
  } finally {
319
- await fs$1.rm(dir, {
319
+ await fs.rm(dir, {
320
320
  recursive: true,
321
321
  force: true
322
322
  }).catch(() => {});
@@ -325,7 +325,7 @@ async function withTempDir(fn) {
325
325
  async function sipsMetadataFromBuffer(buffer) {
326
326
  return await withTempDir(async (dir) => {
327
327
  const input = path.join(dir, "in.img");
328
- await fs$1.writeFile(input, buffer);
328
+ await fs.writeFile(input, buffer);
329
329
  const { stdout } = await runExec("/usr/bin/sips", [
330
330
  "-g",
331
331
  "pixelWidth",
@@ -353,7 +353,7 @@ async function sipsResizeToJpeg(params) {
353
353
  return await withTempDir(async (dir) => {
354
354
  const input = path.join(dir, "in.img");
355
355
  const output = path.join(dir, "out.jpg");
356
- await fs$1.writeFile(input, params.buffer);
356
+ await fs.writeFile(input, params.buffer);
357
357
  await runExec("/usr/bin/sips", [
358
358
  "-Z",
359
359
  String(Math.max(1, Math.round(params.maxSide))),
@@ -370,14 +370,14 @@ async function sipsResizeToJpeg(params) {
370
370
  timeoutMs: 2e4,
371
371
  maxBuffer: 1024 * 1024
372
372
  });
373
- return await fs$1.readFile(output);
373
+ return await fs.readFile(output);
374
374
  });
375
375
  }
376
376
  async function sipsConvertToJpeg(buffer) {
377
377
  return await withTempDir(async (dir) => {
378
378
  const input = path.join(dir, "in.heic");
379
379
  const output = path.join(dir, "out.jpg");
380
- await fs$1.writeFile(input, buffer);
380
+ await fs.writeFile(input, buffer);
381
381
  await runExec("/usr/bin/sips", [
382
382
  "-s",
383
383
  "format",
@@ -389,7 +389,7 @@ async function sipsConvertToJpeg(buffer) {
389
389
  timeoutMs: 2e4,
390
390
  maxBuffer: 1024 * 1024
391
391
  });
392
- return await fs$1.readFile(output);
392
+ return await fs.readFile(output);
393
393
  });
394
394
  }
395
395
  async function getImageMetadata(buffer) {
@@ -440,7 +440,7 @@ async function sipsApplyOrientation(buffer, orientation) {
440
440
  return await withTempDir(async (dir) => {
441
441
  const input = path.join(dir, "in.jpg");
442
442
  const output = path.join(dir, "out.jpg");
443
- await fs$1.writeFile(input, buffer);
443
+ await fs.writeFile(input, buffer);
444
444
  await runExec("/usr/bin/sips", [
445
445
  ...ops,
446
446
  input,
@@ -450,7 +450,7 @@ async function sipsApplyOrientation(buffer, orientation) {
450
450
  timeoutMs: 2e4,
451
451
  maxBuffer: 1024 * 1024
452
452
  });
453
- return await fs$1.readFile(output);
453
+ return await fs.readFile(output);
454
454
  });
455
455
  }
456
456
  async function resizeToJpeg(params) {
@@ -1,4 +1,4 @@
1
- import { Ka as runExec } from "./model-selection-Ca4WCV4n.js";
1
+ import { Ka as runExec } from "./model-selection-CYS--Nqz.js";
2
2
  import { ot as resolveConfigDir } from "./subsystem-DynBFcQj.js";
3
3
  import path from "node:path";
4
4
  import os from "node:os";
@@ -1,5 +1,5 @@
1
- import { Xa as logInfo, Za as logWarn } from "./model-selection-Ca4WCV4n.js";
2
- import { c as resolvePinnedHostnameWithPolicy, i as createPinnedDispatcher, n as SsrFBlockedError, o as isPrivateIpAddress, r as closeDispatcher, t as hasProxyEnvConfigured } from "./proxy-env-BRG1LWK1.js";
1
+ import { Xa as logInfo, Za as logWarn } from "./model-selection-CYS--Nqz.js";
2
+ import { c as resolvePinnedHostnameWithPolicy, i as createPinnedDispatcher, n as SsrFBlockedError, o as isPrivateIpAddress, r as closeDispatcher, t as hasProxyEnvConfigured } from "./proxy-env-DPCNy_X3.js";
3
3
  import { EnvHttpProxyAgent, FormData, fetch as fetch$1 } from "undici";
4
4
 
5
5
  //#region src/utils/fetch-timeout.ts
@@ -1,5 +1,5 @@
1
- import { O as logInfo, k as logWarn } from "./legacy-names-6uH6aLhq.js";
2
- import { c as resolvePinnedHostnameWithPolicy, i as createPinnedDispatcher, n as SsrFBlockedError, o as isPrivateIpAddress, r as closeDispatcher, t as hasProxyEnvConfigured } from "./proxy-env-v_oj7Urd.js";
1
+ import { O as logInfo, k as logWarn } from "./legacy-names-chsmo2vs.js";
2
+ import { c as resolvePinnedHostnameWithPolicy, i as createPinnedDispatcher, n as SsrFBlockedError, o as isPrivateIpAddress, r as closeDispatcher, t as hasProxyEnvConfigured } from "./proxy-env-D4WYaw6X.js";
3
3
  import { EnvHttpProxyAgent, FormData, fetch as fetch$1 } from "undici";
4
4
 
5
5
  //#region src/utils/fetch-timeout.ts
@@ -1,7 +1,7 @@
1
- import { s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-6uH6aLhq.js";
1
+ import { s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-chsmo2vs.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,4 +1,4 @@
1
- import { Za as logWarn } from "./model-selection-Ca4WCV4n.js";
1
+ import { Za as logWarn } from "./model-selection-CYS--Nqz.js";
2
2
  import { u as expandHomePrefix } from "./paths-B_gs59ga.js";
3
3
  import { B as hasNodeErrorCode, H as isPathInside, I as sameFileIdentity, L as BOUNDARY_PATH_ALIAS_POLICIES, R as resolveBoundaryPath, U as isSymlinkOpenError, V as isNotFoundPathError } from "./subsystem-DynBFcQj.js";
4
4
  import path from "node:path";
@@ -1,10 +1,10 @@
1
- import { u as expandHomePrefix } from "./paths-BIDPYPVC.js";
2
- import { B as hasNodeErrorCode, H as isPathInside, I as sameFileIdentity, L as BOUNDARY_PATH_ALIAS_POLICIES, R as resolveBoundaryPath, U as isSymlinkOpenError, V as isNotFoundPathError } from "./subsystem-DoQFckDJ.js";
3
- import { k as logWarn } from "./legacy-names-6uH6aLhq.js";
1
+ import { u as expandHomePrefix } from "./paths-B_gs59ga.js";
2
+ import { B as hasNodeErrorCode, H as isPathInside, I as sameFileIdentity, L as BOUNDARY_PATH_ALIAS_POLICIES, R as resolveBoundaryPath, U as isSymlinkOpenError, V as isNotFoundPathError } from "./subsystem-cFv2jJm-.js";
3
+ import { k as logWarn } from "./legacy-names-chsmo2vs.js";
4
4
  import path from "node:path";
5
5
  import { constants } from "node:fs";
6
6
  import os from "node:os";
7
- import fs$1 from "node:fs/promises";
7
+ import fs from "node:fs/promises";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { pipeline } from "node:stream/promises";
10
10
 
@@ -13,7 +13,7 @@ async function assertNoHardlinkedFinalPath(params) {
13
13
  if (params.allowFinalHardlinkForUnlink) return;
14
14
  let stat;
15
15
  try {
16
- stat = await fs$1.stat(params.filePath);
16
+ stat = await fs.stat(params.filePath);
17
17
  } catch (err) {
18
18
  if (isNotFoundPathError(err)) return;
19
19
  throw err;
@@ -62,19 +62,19 @@ const ensureTrailingSep = (value) => value.endsWith(path.sep) ? value : value +
62
62
  async function expandRelativePathWithHome(relativePath) {
63
63
  let home = process.env.HOME || process.env.USERPROFILE || os.homedir();
64
64
  try {
65
- home = await fs$1.realpath(home);
65
+ home = await fs.realpath(home);
66
66
  } catch {}
67
67
  return expandHomePrefix(relativePath, { home });
68
68
  }
69
69
  async function openVerifiedLocalFile(filePath, options) {
70
70
  try {
71
- if ((await fs$1.lstat(filePath)).isDirectory()) throw new SafeOpenError("not-file", "not a file");
71
+ if ((await fs.lstat(filePath)).isDirectory()) throw new SafeOpenError("not-file", "not a file");
72
72
  } catch (err) {
73
73
  if (err instanceof SafeOpenError) throw err;
74
74
  }
75
75
  let handle;
76
76
  try {
77
- handle = await fs$1.open(filePath, OPEN_READ_FLAGS);
77
+ handle = await fs.open(filePath, OPEN_READ_FLAGS);
78
78
  } catch (err) {
79
79
  if (isNotFoundPathError(err)) throw new SafeOpenError("not-found", "file not found");
80
80
  if (isSymlinkOpenError(err)) throw new SafeOpenError("symlink", "symlink open blocked", { cause: err });
@@ -82,13 +82,13 @@ async function openVerifiedLocalFile(filePath, options) {
82
82
  throw err;
83
83
  }
84
84
  try {
85
- const [stat, lstat] = await Promise.all([handle.stat(), fs$1.lstat(filePath)]);
85
+ const [stat, lstat] = await Promise.all([handle.stat(), fs.lstat(filePath)]);
86
86
  if (lstat.isSymbolicLink()) throw new SafeOpenError("symlink", "symlink not allowed");
87
87
  if (!stat.isFile()) throw new SafeOpenError("not-file", "not a file");
88
88
  if (options?.rejectHardlinks && stat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
89
89
  if (!sameFileIdentity(stat, lstat)) throw new SafeOpenError("path-mismatch", "path changed during read");
90
- const realPath = await fs$1.realpath(filePath);
91
- const realStat = await fs$1.stat(realPath);
90
+ const realPath = await fs.realpath(filePath);
91
+ const realStat = await fs.stat(realPath);
92
92
  if (options?.rejectHardlinks && realStat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
93
93
  if (!sameFileIdentity(stat, realStat)) throw new SafeOpenError("path-mismatch", "path mismatch");
94
94
  return {
@@ -106,7 +106,7 @@ async function openVerifiedLocalFile(filePath, options) {
106
106
  async function resolvePathWithinRoot(params) {
107
107
  let rootReal;
108
108
  try {
109
- rootReal = await fs$1.realpath(params.rootDir);
109
+ rootReal = await fs.realpath(params.rootDir);
110
110
  } catch (err) {
111
111
  if (isNotFoundPathError(err)) throw new SafeOpenError("not-found", "root dir not found");
112
112
  throw err;
@@ -207,7 +207,7 @@ function buildAtomicWriteTempPath(targetPath) {
207
207
  return path.join(dir, `.${base}.${process.pid}.${randomUUID()}.tmp`);
208
208
  }
209
209
  async function writeTempFileForAtomicReplace(params) {
210
- const tempHandle = await fs$1.open(params.tempPath, OPEN_WRITE_CREATE_FLAGS, params.mode);
210
+ const tempHandle = await fs.open(params.tempPath, OPEN_WRITE_CREATE_FLAGS, params.mode);
211
211
  try {
212
212
  if (typeof params.data === "string") await tempHandle.writeFile(params.data, params.encoding ?? "utf8");
213
213
  else await tempHandle.writeFile(params.data);
@@ -217,7 +217,7 @@ async function writeTempFileForAtomicReplace(params) {
217
217
  }
218
218
  }
219
219
  async function verifyAtomicWriteResult(params) {
220
- const rootWithSep = ensureTrailingSep(await fs$1.realpath(params.rootDir));
220
+ const rootWithSep = ensureTrailingSep(await fs.realpath(params.rootDir));
221
221
  const opened = await openVerifiedLocalFile(params.targetPath, { rejectHardlinks: true });
222
222
  try {
223
223
  if (!sameFileIdentity(opened.stat, params.expectedStat)) throw new SafeOpenError("path-mismatch", "path changed during write");
@@ -228,13 +228,13 @@ async function verifyAtomicWriteResult(params) {
228
228
  }
229
229
  async function resolveOpenedFileRealPathForHandle(handle, ioPath) {
230
230
  try {
231
- return await fs$1.realpath(ioPath);
231
+ return await fs.realpath(ioPath);
232
232
  } catch (err) {
233
233
  if (!isNotFoundPathError(err)) throw err;
234
234
  }
235
235
  const fdCandidates = process.platform === "linux" ? [`/proc/self/fd/${handle.fd}`, `/dev/fd/${handle.fd}`] : process.platform === "win32" ? [] : [`/dev/fd/${handle.fd}`];
236
236
  for (const fdPath of fdCandidates) try {
237
- return await fs$1.realpath(fdPath);
237
+ return await fs.realpath(fdPath);
238
238
  } catch {}
239
239
  throw new SafeOpenError("path-mismatch", "unable to resolve opened file path");
240
240
  }
@@ -249,10 +249,10 @@ async function openWritableFileWithinRoot(params) {
249
249
  } catch (err) {
250
250
  throw new SafeOpenError("invalid-path", "path alias escape blocked", { cause: err });
251
251
  }
252
- if (params.mkdir !== false) await fs$1.mkdir(path.dirname(resolved), { recursive: true });
252
+ if (params.mkdir !== false) await fs.mkdir(path.dirname(resolved), { recursive: true });
253
253
  let ioPath = resolved;
254
254
  try {
255
- const resolvedRealPath = await fs$1.realpath(resolved);
255
+ const resolvedRealPath = await fs.realpath(resolved);
256
256
  if (!isPathInside(rootWithSep, resolvedRealPath)) throw new SafeOpenError("outside-workspace", "file is outside workspace root");
257
257
  ioPath = resolvedRealPath;
258
258
  } catch (err) {
@@ -264,10 +264,10 @@ async function openWritableFileWithinRoot(params) {
264
264
  let createdForWrite = false;
265
265
  try {
266
266
  try {
267
- handle = await fs$1.open(ioPath, OPEN_WRITE_EXISTING_FLAGS, fileMode);
267
+ handle = await fs.open(ioPath, OPEN_WRITE_EXISTING_FLAGS, fileMode);
268
268
  } catch (err) {
269
269
  if (!isNotFoundPathError(err)) throw err;
270
- handle = await fs$1.open(ioPath, OPEN_WRITE_CREATE_FLAGS, fileMode);
270
+ handle = await fs.open(ioPath, OPEN_WRITE_CREATE_FLAGS, fileMode);
271
271
  createdForWrite = true;
272
272
  }
273
273
  } catch (err) {
@@ -281,7 +281,7 @@ async function openWritableFileWithinRoot(params) {
281
281
  if (!stat.isFile()) throw new SafeOpenError("invalid-path", "path is not a regular file under root");
282
282
  if (stat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
283
283
  try {
284
- const lstat = await fs$1.lstat(ioPath);
284
+ const lstat = await fs.lstat(ioPath);
285
285
  if (lstat.isSymbolicLink() || !lstat.isFile()) throw new SafeOpenError("invalid-path", "path is not a regular file under root");
286
286
  if (!sameFileIdentity(stat, lstat)) throw new SafeOpenError("path-mismatch", "path changed during write");
287
287
  } catch (err) {
@@ -289,7 +289,7 @@ async function openWritableFileWithinRoot(params) {
289
289
  }
290
290
  const realPath = await resolveOpenedFileRealPathForHandle(handle, ioPath);
291
291
  openedRealPath = realPath;
292
- const realStat = await fs$1.stat(realPath);
292
+ const realStat = await fs.stat(realPath);
293
293
  if (!sameFileIdentity(stat, realStat)) throw new SafeOpenError("path-mismatch", "path mismatch");
294
294
  if (realStat.nlink > 1) throw new SafeOpenError("invalid-path", "hardlinked path not allowed");
295
295
  if (!isPathInside(rootWithSep, realPath)) throw new SafeOpenError("outside-workspace", "file is outside workspace root");
@@ -304,7 +304,7 @@ async function openWritableFileWithinRoot(params) {
304
304
  const cleanupCreatedPath = createdForWrite && err instanceof SafeOpenError;
305
305
  const cleanupPath = openedRealPath ?? ioPath;
306
306
  await handle.close().catch(() => {});
307
- if (cleanupCreatedPath) await fs$1.rm(cleanupPath, { force: true }).catch(() => {});
307
+ if (cleanupCreatedPath) await fs.rm(cleanupPath, { force: true }).catch(() => {});
308
308
  throw err;
309
309
  }
310
310
  }
@@ -327,7 +327,7 @@ async function writeFileWithinRoot(params) {
327
327
  encoding: params.encoding,
328
328
  mode: targetMode || 384
329
329
  });
330
- await fs$1.rename(tempPath, destinationPath);
330
+ await fs.rename(tempPath, destinationPath);
331
331
  tempPath = null;
332
332
  try {
333
333
  await verifyAtomicWriteResult({
@@ -340,7 +340,7 @@ async function writeFileWithinRoot(params) {
340
340
  throw err;
341
341
  }
342
342
  } finally {
343
- if (tempPath) await fs$1.rm(tempPath, { force: true }).catch(() => {});
343
+ if (tempPath) await fs.rm(tempPath, { force: true }).catch(() => {});
344
344
  }
345
345
  }
346
346
  async function copyFileWithinRoot(params) {
@@ -368,7 +368,7 @@ async function copyFileWithinRoot(params) {
368
368
  });
369
369
  await pipeline(sourceStream, targetStream);
370
370
  } catch (err) {
371
- if (target?.createdForWrite) await fs$1.rm(target.openedRealPath, { force: true }).catch(() => {});
371
+ if (target?.createdForWrite) await fs.rm(target.openedRealPath, { force: true }).catch(() => {});
372
372
  throw err;
373
373
  } finally {
374
374
  if (!sourceClosedByStream) await source.handle.close().catch(() => {});