wednesdayai 0.4.12-dev.708 → 0.4.12-dev.709

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 (161) hide show
  1. package/dist/{agent-scope-DxKPMu8w.js → agent-scope-cbxkoURo.js} +3 -3
  2. package/dist/{agent-turn-runner-Bo-14dCk.js → agent-turn-runner-BGEMB9i7.js} +5 -5
  3. package/dist/{api-key-rotation-MCks5z9E.js → api-key-rotation-Di-Xv7dE.js} +2 -2
  4. package/dist/{audio-preflight-D-jX_3PI.js → audio-preflight-B2oeH152.js} +27 -27
  5. package/dist/{audio-transcription-runner-z8iu9ZW_.js → audio-transcription-runner-D1gaKiYc.js} +11 -11
  6. package/dist/build-info.json +3 -3
  7. package/dist/bundled/boot-md/handler.js +58 -58
  8. package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
  9. package/dist/bundled/command-logger/handler.js +2 -2
  10. package/dist/bundled/session-journal/handler.js +58 -58
  11. package/dist/bundled/session-memory/handler.js +58 -58
  12. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  13. package/dist/{channel-activity-CSc4nhSd.js → channel-activity-rKX7OerG.js} +3 -3
  14. package/dist/{chrome-DsAfEH5c.js → chrome-DFRVroOs.js} +15 -15
  15. package/dist/{chunk-c1jvtxVA.js → chunk-B7KZoDXm.js} +3 -3
  16. package/dist/{command-queue-BkU8VL2o.js → command-queue-DZsc5M2W.js} +1 -1
  17. package/dist/{command-registry-b8VeqJpJ.js → command-registry-XVw7Umb-.js} +4 -4
  18. package/dist/{commands-registry-K0xWPmkW.js → commands-registry-CeUqKxlW.js} +2 -2
  19. package/dist/{completion-cli-eM5rgTAp.js → completion-cli-Cs6_r67M.js} +1 -1
  20. package/dist/{completion-cli-SMlq8SpJ.js → completion-cli-OG8408r3.js} +2 -2
  21. package/dist/{deliver-CKX3D5Qb.js → deliver-D9ZlDeeK.js} +24 -24
  22. package/dist/{diagnostic-CwxQVPgP.js → diagnostic-BQTUSnsG.js} +5 -5
  23. package/dist/{doctor-completion-CVSivX8q.js → doctor-completion-DHGYwnha.js} +1 -1
  24. package/dist/{doctor-completion-DSkCajIl.js → doctor-completion-DHzAQdU5.js} +1 -1
  25. package/dist/entry.js +2 -2
  26. package/dist/{fetch-D0fPm94V.js → fetch-BRLmqIUZ.js} +8 -8
  27. package/dist/{fetch-guard-DGkoJpgm.js → fetch-guard-DaQ-LaL5.js} +3 -3
  28. package/dist/{frontmatter-saAwiKEb.js → frontmatter-PMByWrfP.js} +5 -5
  29. package/dist/{fs-safe-LRpYbPaA.js → fs-safe-DwICJjkN.js} +4 -4
  30. package/dist/{gateway-cli-90-omfdt.js → gateway-cli-0mPia-yK.js} +18 -1
  31. package/dist/{gateway-cli-CilhVdIf.js → gateway-cli-DZZF_m3l.js} +18 -1
  32. package/dist/{github-copilot-token-zGOMIGSh.js → github-copilot-token-WSjo05vB.js} +7 -7
  33. package/dist/{image-ops-D_fm2PuR.js → image-ops-O8pHxo7i.js} +1 -1
  34. package/dist/index.js +1 -1
  35. package/dist/{ir-CM-jZPvD.js → ir-BdrsYTip.js} +5 -5
  36. package/dist/{legacy-names-vLJrYADD.js → legacy-names-CLlrMq8r.js} +1 -1
  37. package/dist/llm-slug-generator.js +58 -58
  38. package/dist/{logger-a0-zAY5a.js → logger-DNehzD_s.js} +1 -1
  39. package/dist/{manager-D8_WeA0B.js → manager-Dha79IeT.js} +12 -12
  40. package/dist/{markdown-tables-DDy0mHfA.js → markdown-tables-CPpxzad4.js} +2 -2
  41. package/dist/{model-selection-C8cuSPJ6.js → model-selection-CpVr-61V.js} +86 -86
  42. package/dist/{onboard-DSm2g3vN.js → onboard-8QmY5qtC.js} +1 -1
  43. package/dist/{onboard-DqwoTpU5.js → onboard-BwuGjbN2.js} +1 -1
  44. package/dist/{onboarding-CbkMsexm.js → onboarding-BeCgp92Z.js} +1 -1
  45. package/dist/{onboarding-BA0mgN0_.js → onboarding-BwJssndg.js} +1 -1
  46. package/dist/{onboarding.finalize-GSMxZGDr.js → onboarding.finalize-Dl0NbVZ8.js} +3 -3
  47. package/dist/{onboarding.finalize-DmqP9pws.js → onboarding.finalize-GThlsTQx.js} +4 -4
  48. package/dist/{outbound-attachment-BqwSHCKk.js → outbound-attachment-DrSw_Ksh.js} +2 -2
  49. package/dist/{outbound-message-hooks-B2Lq5cjw.js → outbound-message-hooks-BclU8TMt.js} +4 -4
  50. package/dist/{path-alias-guards-Zj-NwKjV.js → path-alias-guards-Cd5yHmTq.js} +1 -1
  51. package/dist/{paths-C6TxBCvO.js → paths-Cvc9EM8Y.js} +5 -5
  52. package/dist/{pi-embedded-BruS0ZnZ.js → pi-embedded-JPR-Maki.js} +169 -169
  53. package/dist/{pi-embedded-helpers-BYrpALPI.js → pi-embedded-helpers-C-hJQ8AQ.js} +24 -24
  54. package/dist/{pi-embedded-utils-B-HQafgJ.js → pi-embedded-utils-DPMX1Kdc.js} +3 -3
  55. package/dist/{pi-model-discovery-DoljOCVG.js → pi-model-discovery-ynxqOQma.js} +7 -7
  56. package/dist/{program-BR_-31Ib.js → program-DAwSVRFz.js} +2 -2
  57. package/dist/{program-context-DqNMfWhq.js → program-context-B3m_Vhb8.js} +6 -6
  58. package/dist/{prompt-select-styled-Cft7TSRk.js → prompt-select-styled-DGKn-Jnb.js} +1 -1
  59. package/dist/{prompt-select-styled-D0PhzQ3o.js → prompt-select-styled-DWcT6TS3.js} +1 -1
  60. package/dist/{provider-image-BGFyw5bc.js → provider-image-CjgTKy78.js} +5 -5
  61. package/dist/{proxy-fWL7CKDP.js → proxy-C9sq6M-h.js} +1 -1
  62. package/dist/{proxy-env-Bp4LRKl9.js → proxy-env-BL6Wl2NH.js} +2 -2
  63. package/dist/{proxy-fetch-DCI0KuH6.js → proxy-fetch-CK5AQAYw.js} +1 -1
  64. package/dist/{pw-ai-CYVcKfKX.js → pw-ai-DM-YIw_o.js} +14 -14
  65. package/dist/{qmd-manager-xNXMqudI.js → qmd-manager-fdxSsmnA.js} +10 -10
  66. package/dist/{query-expansion-DwSgrk0v.js → query-expansion-Dm2XbrYk.js} +5 -5
  67. package/dist/{recorder-DHFOr5-p.js → recorder--EPc-GsC.js} +4 -4
  68. package/dist/{redact-DZne_lu8.js → redact-BOHmCPP_.js} +1 -1
  69. package/dist/{register.maintenance-Dgcu5Nb-.js → register.maintenance-B0E0HWS3.js} +5 -5
  70. package/dist/{register.maintenance-BFoMS877.js → register.maintenance-Cde6wAYK.js} +4 -4
  71. package/dist/{register.onboard-9IafuGo3.js → register.onboard-BpTumYaA.js} +2 -2
  72. package/dist/{register.onboard-CWxGOIeC.js → register.onboard-BzLofY35.js} +2 -2
  73. package/dist/{register.setup-Bawf4MtR.js → register.setup-C9FYWtwC.js} +2 -2
  74. package/dist/{register.setup-CpH51l_z.js → register.setup-mxq7ayTY.js} +2 -2
  75. package/dist/{register.subclis-CHB5C1GR.js → register.subclis-DyqB2k1U.js} +3 -3
  76. package/dist/{replies-czd0p1_N.js → replies-zGU1jl6b.js} +4 -4
  77. package/dist/{reply-directives-v0ld56O3.js → reply-directives-BpvtuQ6W.js} +2 -2
  78. package/dist/{reply-prefix-DVkNDBNe.js → reply-prefix-C7WlN3qm.js} +1 -1
  79. package/dist/{resolve-route-Bx05SNin.js → resolve-route-BuurQ_RE.js} +5 -5
  80. package/dist/{run-main-BShsJ2ew.js → run-main-WS7QF27g.js} +3 -3
  81. package/dist/{run-with-concurrency-BXDCD4Tu.js → run-with-concurrency-4jh_yc-4.js} +4 -4
  82. package/dist/{runs-BIIlPzkU.js → runs-ysBHYx8g.js} +8 -8
  83. package/dist/{send-CDhxZ4gL.js → send-AlsHHAwq.js} +7 -7
  84. package/dist/{send-BHu4zHcK.js → send-B8TQjDLF.js} +6 -6
  85. package/dist/{send-DB64Q7ia.js → send-CdkJHvhd.js} +6 -6
  86. package/dist/{send-Bx7VMqkE.js → send-D5oa8eVL.js} +8 -8
  87. package/dist/{send-D1vxqVJJ.js → send-DDzPcUw9.js} +27 -27
  88. package/dist/{session-meta-D3RTAsqe.js → session-meta-BM6rSCmn.js} +2 -2
  89. package/dist/{skill-commands-D7C-ROwS.js → skill-commands-C_W-vMXu.js} +9 -9
  90. package/dist/{skills-Dz90ga_I.js → skills-Bn7terph.js} +21 -21
  91. package/dist/{store-gQ6FSjVk.js → store-xxN6qyAh.js} +2 -2
  92. package/dist/{subsystem-CPYnUTN4.js → subsystem-BCjklMkJ.js} +64 -64
  93. package/dist/{tables-DHp8qKo9.js → tables-CjRug-NJ.js} +1 -1
  94. package/dist/{tokens-9BPY4SaX.js → tokens-9Mla_HDp.js} +1 -1
  95. package/dist/{tool-loop-detection-C1fqyXXD.js → tool-loop-detection-8uvf8mSd.js} +2 -2
  96. package/dist/{update-cli-_yxN7Iuk.js → update-cli-BrR0aq-I.js} +4 -4
  97. package/dist/{update-cli-pxJZTMTe.js → update-cli-CjIUOznW.js} +5 -5
  98. package/dist/{user-run-recording-BCrEbuKq.js → user-run-recording-B6Tm0B7M.js} +2 -2
  99. package/dist/{workspace-B707AGIc.js → workspace-Dbn4gFdH.js} +9 -9
  100. package/extensions/acpx/package.json +1 -1
  101. package/extensions/anthropic/package.json +1 -1
  102. package/extensions/bifrost/package.json +1 -1
  103. package/extensions/bluebubbles/package.json +1 -1
  104. package/extensions/copilot-proxy/package.json +1 -1
  105. package/extensions/deepgram/package.json +1 -1
  106. package/extensions/deepinfra/package.json +1 -1
  107. package/extensions/diagnostics-otel/package.json +1 -1
  108. package/extensions/diffs/package.json +1 -1
  109. package/extensions/discord/package.json +1 -1
  110. package/extensions/dream-cycle/package.json +1 -1
  111. package/extensions/elevenlabs/package.json +1 -1
  112. package/extensions/feishu/package.json +1 -1
  113. package/extensions/gemini-search/package.json +1 -1
  114. package/extensions/google/package.json +1 -1
  115. package/extensions/google-gemini-cli-auth/package.json +1 -1
  116. package/extensions/googlechat/package.json +1 -1
  117. package/extensions/grok-search/package.json +1 -1
  118. package/extensions/groq/package.json +1 -1
  119. package/extensions/imessage/package.json +1 -1
  120. package/extensions/irc/package.json +1 -1
  121. package/extensions/kimi-search/package.json +1 -1
  122. package/extensions/learning-core/package.json +1 -1
  123. package/extensions/line/package.json +1 -1
  124. package/extensions/llm-task/package.json +1 -1
  125. package/extensions/lobster/package.json +1 -1
  126. package/extensions/matrix/CHANGELOG.md +1 -1
  127. package/extensions/matrix/package.json +1 -1
  128. package/extensions/mattermost/package.json +1 -1
  129. package/extensions/memory-core/package.json +1 -1
  130. package/extensions/memory-lancedb/package.json +1 -1
  131. package/extensions/minimax/package.json +1 -1
  132. package/extensions/minimax-portal-auth/package.json +1 -1
  133. package/extensions/mistral/package.json +1 -1
  134. package/extensions/moonshot/package.json +1 -1
  135. package/extensions/msteams/CHANGELOG.md +1 -1
  136. package/extensions/msteams/package.json +1 -1
  137. package/extensions/nextcloud-talk/package.json +1 -1
  138. package/extensions/nostr/CHANGELOG.md +1 -1
  139. package/extensions/nostr/package.json +1 -1
  140. package/extensions/open-prose/package.json +1 -1
  141. package/extensions/openai/package.json +1 -1
  142. package/extensions/openai-realtime/package.json +1 -1
  143. package/extensions/openrouter/package.json +1 -1
  144. package/extensions/perplexity-search/package.json +1 -1
  145. package/extensions/searxng-search/package.json +1 -1
  146. package/extensions/signal/package.json +1 -1
  147. package/extensions/slack/package.json +1 -1
  148. package/extensions/synology-chat/package.json +1 -1
  149. package/extensions/telegram/package.json +1 -1
  150. package/extensions/tlon/package.json +1 -1
  151. package/extensions/twitch/CHANGELOG.md +1 -1
  152. package/extensions/twitch/package.json +1 -1
  153. package/extensions/voice-call/CHANGELOG.md +1 -1
  154. package/extensions/voice-call/package.json +1 -1
  155. package/extensions/whatsapp/package.json +1 -1
  156. package/extensions/zai/package.json +1 -1
  157. package/extensions/zalo/CHANGELOG.md +1 -1
  158. package/extensions/zalo/package.json +1 -1
  159. package/extensions/zalouser/CHANGELOG.md +1 -1
  160. package/extensions/zalouser/package.json +1 -1
  161. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { H as isPathInside, V as isNotFoundPathError, Z as CONFIG_DIR, mt as resolvePreferredOpenClawTmpDir, t as createSubsystemLogger } from "./subsystem-CPYnUTN4.js";
2
- import { Ct as normalizeIpAddress, J as loadConfig, St as isPrivateOrLoopbackIpAddress, vt as isIpInCidr, xt as isLoopbackIpAddress } from "./model-selection-C8cuSPJ6.js";
3
- import { c as resolvePinnedHostnameWithPolicy, g as isErrno, s as isPrivateNetworkAllowedByPolicy, t as hasProxyEnvConfigured } from "./proxy-env-Bp4LRKl9.js";
4
- import { i as openFileWithinRoot, t as SafeOpenError } from "./fs-safe-LRpYbPaA.js";
1
+ import { H as isPathInside, V as isNotFoundPathError, Z as CONFIG_DIR, mt as resolvePreferredOpenClawTmpDir, t as createSubsystemLogger } from "./subsystem-BCjklMkJ.js";
2
+ import { Ct as normalizeIpAddress, J as loadConfig, St as isPrivateOrLoopbackIpAddress, vt as isIpInCidr, xt as isLoopbackIpAddress } from "./model-selection-CpVr-61V.js";
3
+ import { c as resolvePinnedHostnameWithPolicy, g as isErrno, s as isPrivateNetworkAllowedByPolicy, t as hasProxyEnvConfigured } from "./proxy-env-BL6Wl2NH.js";
4
+ import { i as openFileWithinRoot, t as SafeOpenError } from "./fs-safe-DwICJjkN.js";
5
5
  import fs from "node:fs/promises";
6
6
  import os from "node:os";
7
7
  import path from "node:path";
8
- import syncFs from "node:fs";
8
+ import fs$1 from "node:fs";
9
9
  import { execFileSync, spawn } from "node:child_process";
10
10
  import { createHmac } from "node:crypto";
11
11
  import net from "node:net";
@@ -1649,7 +1649,7 @@ const CHROMIUM_EXE_NAMES = new Set([
1649
1649
  ]);
1650
1650
  function exists$1(filePath) {
1651
1651
  try {
1652
- return syncFs.existsSync(filePath);
1652
+ return fs$1.existsSync(filePath);
1653
1653
  } catch {
1654
1654
  return false;
1655
1655
  }
@@ -1792,7 +1792,7 @@ function findDesktopFilePath(desktopId) {
1792
1792
  }
1793
1793
  function readDesktopExecLine(desktopPath) {
1794
1794
  try {
1795
- const lines = syncFs.readFileSync(desktopPath, "utf8").split(/\r?\n/);
1795
+ const lines = fs$1.readFileSync(desktopPath, "utf8").split(/\r?\n/);
1796
1796
  for (const line of lines) if (line.startsWith("Exec=")) return line.slice(5).trim();
1797
1797
  } catch {}
1798
1798
  return null;
@@ -2050,7 +2050,7 @@ function resolveBrowserExecutableForPlatform(resolved, platform) {
2050
2050
  const LSOF_CANDIDATES = process.platform === "darwin" ? ["/usr/sbin/lsof", "/usr/bin/lsof"] : ["/usr/bin/lsof", "/usr/sbin/lsof"];
2051
2051
  function resolveLsofCommandSync() {
2052
2052
  for (const candidate of LSOF_CANDIDATES) try {
2053
- syncFs.accessSync(candidate, syncFs.constants.X_OK);
2053
+ fs$1.accessSync(candidate, fs$1.constants.X_OK);
2054
2054
  return candidate;
2055
2055
  } catch {}
2056
2056
  return "lsof";
@@ -2095,8 +2095,8 @@ function decoratedMarkerPath(userDataDir) {
2095
2095
  }
2096
2096
  function safeReadJson(filePath) {
2097
2097
  try {
2098
- if (!syncFs.existsSync(filePath)) return null;
2099
- const raw = syncFs.readFileSync(filePath, "utf-8");
2098
+ if (!fs$1.existsSync(filePath)) return null;
2099
+ const raw = fs$1.readFileSync(filePath, "utf-8");
2100
2100
  const parsed = JSON.parse(raw);
2101
2101
  if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
2102
2102
  return parsed;
@@ -2105,8 +2105,8 @@ function safeReadJson(filePath) {
2105
2105
  }
2106
2106
  }
2107
2107
  function safeWriteJson(filePath, data) {
2108
- syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
2109
- syncFs.writeFileSync(filePath, JSON.stringify(data, null, 2));
2108
+ fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
2109
+ fs$1.writeFileSync(filePath, JSON.stringify(data, null, 2));
2110
2110
  }
2111
2111
  function setDeep(obj, keys, value) {
2112
2112
  let node = obj;
@@ -2233,7 +2233,7 @@ function decorateOpenClawProfile(userDataDir, opts) {
2233
2233
  }
2234
2234
  safeWriteJson(preferencesPath, prefs);
2235
2235
  try {
2236
- syncFs.writeFileSync(decoratedMarkerPath(userDataDir), `${Date.now()}\n`, "utf-8");
2236
+ fs$1.writeFileSync(decoratedMarkerPath(userDataDir), `${Date.now()}\n`, "utf-8");
2237
2237
  } catch {}
2238
2238
  }
2239
2239
  function ensureProfileCleanExit(userDataDir) {
@@ -2249,7 +2249,7 @@ function ensureProfileCleanExit(userDataDir) {
2249
2249
  const log = createSubsystemLogger("browser").child("chrome");
2250
2250
  function exists(filePath) {
2251
2251
  try {
2252
- return syncFs.existsSync(filePath);
2252
+ return fs$1.existsSync(filePath);
2253
2253
  } catch {
2254
2254
  return false;
2255
2255
  }
@@ -2347,7 +2347,7 @@ async function launchOpenClawChrome(resolved, profile) {
2347
2347
  const exe = resolveBrowserExecutable(resolved);
2348
2348
  if (!exe) throw new Error("No supported browser found (Chrome/Brave/Edge/Chromium on macOS, Linux, or Windows).");
2349
2349
  const userDataDir = resolveOpenClawUserDataDir(profile.name);
2350
- syncFs.mkdirSync(userDataDir, { recursive: true });
2350
+ fs$1.mkdirSync(userDataDir, { recursive: true });
2351
2351
  const needsDecorate = !isProfileDecorated(userDataDir, profile.name, (profile.color ?? DEFAULT_OPENCLAW_BROWSER_COLOR).toUpperCase());
2352
2352
  const spawnOnce = () => {
2353
2353
  const args = [
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { i as chunkTextByBreakResolver, r as avoidTrailingHighSurrogateBreak, t as createSubsystemLogger } from "./subsystem-CPYnUTN4.js";
3
- import { L as normalizeAccountId } from "./workspace-B707AGIc.js";
4
- import { Si as resolveAccountEntry, wi as INTERNAL_MESSAGE_CHANNEL } from "./model-selection-C8cuSPJ6.js";
2
+ import { i as chunkTextByBreakResolver, r as avoidTrailingHighSurrogateBreak, t as createSubsystemLogger } from "./subsystem-BCjklMkJ.js";
3
+ import { L as normalizeAccountId } from "./workspace-Dbn4gFdH.js";
4
+ import { Si as resolveAccountEntry, wi as INTERNAL_MESSAGE_CHANNEL } from "./model-selection-CpVr-61V.js";
5
5
  import { n as isSafeFenceBreak, r as parseFenceSpans, t as findFenceSpanAt } from "./fences-DHXKaTRv.js";
6
6
 
7
7
  //#region src/auto-reply/chunk.ts
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { a as logLaneTaskCompleted, i as logLaneEnqueue, r as logLaneDequeue, t as diag } from "./diagnostic-CwxQVPgP.js";
2
+ import { a as logLaneTaskCompleted, i as logLaneEnqueue, r as logLaneDequeue, t as diag } from "./diagnostic-BQTUSnsG.js";
3
3
  import { t as CommandLane } from "./lanes-DTaUAkeG.js";
4
4
 
5
5
  //#region src/process/command-queue.ts
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
2
  import { Lt as hasHelpOrVersion, Pt as getPrimaryCommand } from "./globals-ZyVsnNcg.js";
3
- import { i as registerSubCliCommands, o as removeCommandByName, s as reparseProgramFromActionArgs } from "./register.subclis-CHB5C1GR.js";
3
+ import { i as registerSubCliCommands, o as removeCommandByName, s as reparseProgramFromActionArgs } from "./register.subclis-DyqB2k1U.js";
4
4
 
5
5
  //#region src/cli/program/command-registry.ts
6
6
  var command_registry_exports = /* @__PURE__ */ __exportAll({
@@ -22,7 +22,7 @@ const coreEntries = [
22
22
  hasSubcommands: false
23
23
  }],
24
24
  register: async ({ program }) => {
25
- (await import("./register.setup-Bawf4MtR.js")).registerSetupCommand(program);
25
+ (await import("./register.setup-C9FYWtwC.js")).registerSetupCommand(program);
26
26
  }
27
27
  },
28
28
  {
@@ -32,7 +32,7 @@ const coreEntries = [
32
32
  hasSubcommands: false
33
33
  }],
34
34
  register: async ({ program }) => {
35
- (await import("./register.onboard-CWxGOIeC.js")).registerOnboardCommand(program);
35
+ (await import("./register.onboard-BzLofY35.js")).registerOnboardCommand(program);
36
36
  }
37
37
  },
38
38
  {
@@ -79,7 +79,7 @@ const coreEntries = [
79
79
  }
80
80
  ],
81
81
  register: async ({ program }) => {
82
- (await import("./register.maintenance-Dgcu5Nb-.js")).registerMaintenanceCommands(program);
82
+ (await import("./register.maintenance-B0E0HWS3.js")).registerMaintenanceCommands(program);
83
83
  }
84
84
  },
85
85
  {
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { tt as escapeRegExp } from "./subsystem-CPYnUTN4.js";
2
+ import { tt as escapeRegExp } from "./subsystem-BCjklMkJ.js";
3
3
  import { t as isPlainObject } from "./plain-object-CLm2c5Nu.js";
4
- import { Gr as normalizeChannelId, Zt as getActivePluginRegistry, co as DEFAULT_PROVIDER, qr as listChannelDocks, so as DEFAULT_MODEL, u as resolveConfiguredModelRef } from "./model-selection-C8cuSPJ6.js";
4
+ import { Gr as normalizeChannelId, Zt as getActivePluginRegistry, co as DEFAULT_PROVIDER, qr as listChannelDocks, so as DEFAULT_MODEL, u as resolveConfiguredModelRef } from "./model-selection-CpVr-61V.js";
5
5
  import { r as listThinkingLevels } from "./thinking-CwmtMy_H.js";
6
6
 
7
7
  //#region src/config/commands.ts
@@ -3,7 +3,7 @@ import { g as resolveStateDir } from "./paths-BBP4yd-2.js";
3
3
  import { I as theme, p as pathExists } from "./utils-CMEUUHmM.js";
4
4
  import { i as routeLogsToStderr } from "./subsystem-DDZBycwS.js";
5
5
  import { t as formatDocsLink } from "./links-BhLGjTwm.js";
6
- import { a as registerCoreCliByName, c as getSubCliEntries, l as registerSubCliByName, r as getCoreCliCommandNames, t as getProgramContext } from "./program-context-DqNMfWhq.js";
6
+ import { a as registerCoreCliByName, c as getSubCliEntries, l as registerSubCliByName, r as getCoreCliCommandNames, t as getProgramContext } from "./program-context-B3m_Vhb8.js";
7
7
  import os from "node:os";
8
8
  import path from "node:path";
9
9
  import fs from "node:fs/promises";
@@ -3,8 +3,8 @@ import { p as theme, vt as pathExists } from "./globals-ZyVsnNcg.js";
3
3
  import { g as resolveStateDir } from "./paths-BMo6kTge.js";
4
4
  import { i as routeLogsToStderr } from "./subsystem-DLKs6VzZ.js";
5
5
  import { t as formatDocsLink } from "./links-BZDTcdHU.js";
6
- import { n as getSubCliEntries, r as registerSubCliByName } from "./register.subclis-CHB5C1GR.js";
7
- import { i as registerCoreCliByName, n as getCoreCliCommandNames } from "./command-registry-b8VeqJpJ.js";
6
+ import { n as getSubCliEntries, r as registerSubCliByName } from "./register.subclis-DyqB2k1U.js";
7
+ import { i as registerCoreCliByName, n as getCoreCliCommandNames } from "./command-registry-XVw7Umb-.js";
8
8
  import { t as getProgramContext } from "./program-context-DFqiHyZ3.js";
9
9
  import os from "node:os";
10
10
  import path from "node:path";
@@ -1,19 +1,19 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { c as resolveStateDir } from "./paths-C6TxBCvO.js";
3
- import { t as createSubsystemLogger } from "./subsystem-CPYnUTN4.js";
4
- import { L as normalizeAccountId, R as normalizeOptionalAccountId } from "./workspace-B707AGIc.js";
5
- import { $t as getActivePluginRegistryVersion, Gr as normalizeChannelId, In as parseInlineDirectives, Jn as appendAssistantMessageToSessionTranscript, Kr as getChannelDock, Ur as getChannelPlugin, Yn as resolveMirroredTranscriptText, Zt as getActivePluginRegistry } from "./model-selection-C8cuSPJ6.js";
2
+ import { c as resolveStateDir } from "./paths-Cvc9EM8Y.js";
3
+ import { t as createSubsystemLogger } from "./subsystem-BCjklMkJ.js";
4
+ import { L as normalizeAccountId, R as normalizeOptionalAccountId } from "./workspace-Dbn4gFdH.js";
5
+ import { $t as getActivePluginRegistryVersion, Gr as normalizeChannelId, In as parseInlineDirectives, Jn as appendAssistantMessageToSessionTranscript, Kr as getChannelDock, Ur as getChannelPlugin, Yn as resolveMirroredTranscriptText, Zt as getActivePluginRegistry } from "./model-selection-CpVr-61V.js";
6
6
  import { n as generateSecureUuid } from "./secure-random-BDA1WAvZ.js";
7
- import { d as resolveOutboundSessionId, f as getGlobalHookRunner, n as createMessageSentEmitter, t as applyMessageSendingHook } from "./outbound-message-hooks-B2Lq5cjw.js";
8
- import { i as isMessagingToolDuplicate } from "./pi-embedded-helpers-BYrpALPI.js";
9
- import { h as hasErrnoCode } from "./proxy-env-Bp4LRKl9.js";
10
- import { i as getAgentScopedMediaLocalRoots } from "./fetch-D0fPm94V.js";
11
- import { c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, n as chunkByParagraph } from "./chunk-c1jvtxVA.js";
12
- import { n as resolveMarkdownTableMode } from "./markdown-tables-DDy0mHfA.js";
13
- import { t as parseReplyDirectives } from "./reply-directives-v0ld56O3.js";
14
- import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-DB64Q7ia.js";
7
+ import { d as resolveOutboundSessionId, f as getGlobalHookRunner, n as createMessageSentEmitter, t as applyMessageSendingHook } from "./outbound-message-hooks-BclU8TMt.js";
8
+ import { i as isMessagingToolDuplicate } from "./pi-embedded-helpers-C-hJQ8AQ.js";
9
+ import { h as hasErrnoCode } from "./proxy-env-BL6Wl2NH.js";
10
+ import { i as getAgentScopedMediaLocalRoots } from "./fetch-BRLmqIUZ.js";
11
+ import { c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, n as chunkByParagraph } from "./chunk-B7KZoDXm.js";
12
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-CPpxzad4.js";
13
+ import { t as parseReplyDirectives } from "./reply-directives-BpvtuQ6W.js";
14
+ import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-CdkJHvhd.js";
15
15
  import path from "node:path";
16
- import syncFs from "node:fs";
16
+ import fs from "node:fs";
17
17
  import { createHash } from "node:crypto";
18
18
 
19
19
  //#region src/infra/outbound/target-normalization.ts
@@ -304,11 +304,11 @@ function resolveFailedDir(stateDir) {
304
304
  /** Ensure the queue directory (and failed/ subdirectory) exist. */
305
305
  async function ensureQueueDir(stateDir) {
306
306
  const queueDir = resolveQueueDir(stateDir);
307
- await syncFs.promises.mkdir(queueDir, {
307
+ await fs.promises.mkdir(queueDir, {
308
308
  recursive: true,
309
309
  mode: 448
310
310
  });
311
- await syncFs.promises.mkdir(resolveFailedDir(stateDir), {
311
+ await fs.promises.mkdir(resolveFailedDir(stateDir), {
312
312
  recursive: true,
313
313
  mode: 448
314
314
  });
@@ -338,18 +338,18 @@ async function enqueueDelivery(params, stateDir) {
338
338
  const filePath = path.join(queueDir, `${id}.json`);
339
339
  const tmp = `${filePath}.${process.pid}.tmp`;
340
340
  const json = JSON.stringify(entry, null, 2);
341
- await syncFs.promises.writeFile(tmp, json, {
341
+ await fs.promises.writeFile(tmp, json, {
342
342
  encoding: "utf-8",
343
343
  mode: 384
344
344
  });
345
- await syncFs.promises.rename(tmp, filePath);
345
+ await fs.promises.rename(tmp, filePath);
346
346
  return id;
347
347
  }
348
348
  /** Remove a successfully delivered entry from the queue. */
349
349
  async function ackDelivery(id, stateDir) {
350
350
  const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
351
351
  try {
352
- await syncFs.promises.unlink(filePath);
352
+ await fs.promises.unlink(filePath);
353
353
  } catch (err) {
354
354
  if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) !== "ENOENT") throw err;
355
355
  }
@@ -376,22 +376,22 @@ async function failDelivery(id, error, stateDir) {
376
376
  return serializeByKey(filePath, () => failDeliveryWrite(filePath, error));
377
377
  }
378
378
  async function failDeliveryWrite(filePath, error) {
379
- const raw = await syncFs.promises.readFile(filePath, "utf-8");
379
+ const raw = await fs.promises.readFile(filePath, "utf-8");
380
380
  const entry = JSON.parse(raw);
381
381
  entry.retryCount += 1;
382
382
  entry.lastAttemptAt = Date.now();
383
383
  entry.lastError = error;
384
384
  const tmp = `${filePath}.${process.pid}.tmp`;
385
- await syncFs.promises.writeFile(tmp, JSON.stringify(entry, null, 2), {
385
+ await fs.promises.writeFile(tmp, JSON.stringify(entry, null, 2), {
386
386
  encoding: "utf-8",
387
387
  mode: 384
388
388
  });
389
- await syncFs.promises.rename(tmp, filePath);
389
+ await fs.promises.rename(tmp, filePath);
390
390
  }
391
391
  /** Read a queue entry raw; null when the file is missing. */
392
392
  async function readEntryFile(filePath) {
393
393
  try {
394
- const raw = await syncFs.promises.readFile(filePath, "utf-8");
394
+ const raw = await fs.promises.readFile(filePath, "utf-8");
395
395
  return JSON.parse(raw);
396
396
  } catch (err) {
397
397
  if (hasErrnoCode(err, "ENOENT")) return null;
@@ -413,11 +413,11 @@ function markDeliveryPhase(filePath, transition) {
413
413
  const next = transition(entry);
414
414
  if (!next.advanced) return next;
415
415
  const tmp = `${filePath}.${process.pid}.tmp`;
416
- await syncFs.promises.writeFile(tmp, JSON.stringify(next.entry, null, 2), {
416
+ await fs.promises.writeFile(tmp, JSON.stringify(next.entry, null, 2), {
417
417
  encoding: "utf-8",
418
418
  mode: 384
419
419
  });
420
- await syncFs.promises.rename(tmp, filePath);
420
+ await fs.promises.rename(tmp, filePath);
421
421
  return next;
422
422
  });
423
423
  }
@@ -1,10 +1,10 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { t as createSubsystemLogger } from "./subsystem-CPYnUTN4.js";
3
- import { k as resolveAgentIdFromSessionKey } from "./workspace-B707AGIc.js";
4
- import { J as loadConfig, yr as emitDiagnosticEvent } from "./model-selection-C8cuSPJ6.js";
2
+ import { t as createSubsystemLogger } from "./subsystem-BCjklMkJ.js";
3
+ import { k as resolveAgentIdFromSessionKey } from "./workspace-Dbn4gFdH.js";
4
+ import { J as loadConfig, yr as emitDiagnosticEvent } from "./model-selection-CpVr-61V.js";
5
5
  import { a as recordSessionChannelCorrelation, i as pruneDiagnosticSessionStates, o as recordTurnDuration, r as getDiagnosticSessionState, s as redactChannelCorrelation, t as diagnosticSessionStates } from "./diagnostic-session-state-Bnyx-w0F.js";
6
6
  import { t as redactIdentifier } from "./redact-identifier-WYElxwAZ.js";
7
- import { t as redactSensitiveText } from "./redact-DZne_lu8.js";
7
+ import { t as redactSensitiveText } from "./redact-BOHmCPP_.js";
8
8
  import { createHash } from "node:crypto";
9
9
 
10
10
  //#region src/agents/command-poll-backoff.ts
@@ -836,7 +836,7 @@ function startDiagnosticHeartbeat(config) {
836
836
  if (ageMs > stuckSessionAbortMs && state.queueDepth > 0 && !state.capturedEnd && !state.abortDispatched && state.sessionId) {
837
837
  state.abortDispatched = true;
838
838
  diag.warn(`stuck-session abort: sessionId=${state.sessionId} progressAge=${Math.round(ageMs / 1e3)}s threshold=${Math.round(stuckSessionAbortMs / 1e3)}s queueDepth=${state.queueDepth}`);
839
- import("./runs-BIIlPzkU.js").then((n) => n.o).then(({ abortEmbeddedPiRun }) => {
839
+ import("./runs-ysBHYx8g.js").then((n) => n.o).then(({ abortEmbeddedPiRun }) => {
840
840
  if (state.sessionId && state.abortDispatched) abortEmbeddedPiRun(state.sessionId);
841
841
  }).catch((err) => {
842
842
  diag.warn(`stuck-session abort import failed: ${String(err)}`);
@@ -1,7 +1,7 @@
1
1
  import { n as resolveOpenClawPackageRoot } from "./openclaw-root-BGUYWYDG.js";
2
2
  import { r as resolveCliName } from "./command-format-dyB8APhj.js";
3
3
  import { t as note } from "./note-DCbCarQS.js";
4
- import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-eM5rgTAp.js";
4
+ import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-Cs6_r67M.js";
5
5
  import path from "node:path";
6
6
  import { spawnSync } from "node:child_process";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { n as resolveOpenClawPackageRoot } from "./openclaw-root-B6Tk0FH8.js";
2
2
  import { r as resolveCliName } from "./command-format-N4aQiv3X.js";
3
3
  import { t as note } from "./note-CWaaN_Hi.js";
4
- import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-SMlq8SpJ.js";
4
+ import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-OG8408r3.js";
5
5
  import { spawnSync } from "node:child_process";
6
6
  import path from "node:path";
7
7
 
package/dist/entry.js CHANGED
@@ -380,7 +380,7 @@ if (!isMainModule({
380
380
  }
381
381
  function tryHandleRootHelpFastPath(argv) {
382
382
  if (!isRootHelpInvocation(argv)) return false;
383
- import("./program-BR_-31Ib.js").then(({ buildProgram }) => {
383
+ import("./program-DAwSVRFz.js").then(({ buildProgram }) => {
384
384
  buildProgram().outputHelp();
385
385
  }).catch((error) => {
386
386
  console.error("[openclaw] Failed to display help:", error instanceof Error ? error.stack ?? error.message : error);
@@ -399,7 +399,7 @@ if (!isMainModule({
399
399
  applyCliProfileEnv({ profile: parsed.profile });
400
400
  process$1.argv = parsed.argv;
401
401
  }
402
- if (!tryHandleRootVersionFastPath(process$1.argv) && !tryHandleRootHelpFastPath(process$1.argv)) import("./run-main-BShsJ2ew.js").then(({ runCli }) => runCli(process$1.argv)).then(() => flushStdio()).then(() => process$1.exit(process$1.exitCode ?? 0)).catch(async (error) => {
402
+ if (!tryHandleRootVersionFastPath(process$1.argv) && !tryHandleRootHelpFastPath(process$1.argv)) import("./run-main-WS7QF27g.js").then(({ runCli }) => runCli(process$1.argv)).then(() => flushStdio()).then(() => process$1.exit(process$1.exitCode ?? 0)).catch(async (error) => {
403
403
  console.error("[openclaw] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
404
404
  await flushStdio();
405
405
  process$1.exit(process$1.exitCode ?? 1);
@@ -1,12 +1,12 @@
1
- import { c as resolveAgentWorkspaceDir } from "./agent-scope-DxKPMu8w.js";
2
- import { c as resolveStateDir } from "./paths-C6TxBCvO.js";
3
- import { mt as resolvePreferredOpenClawTmpDir } from "./subsystem-CPYnUTN4.js";
4
- import { J as loadConfig } from "./model-selection-C8cuSPJ6.js";
5
- import { t as redactSensitiveText } from "./redact-DZne_lu8.js";
6
- import { c as detectMime, l as extensionForMime } from "./image-ops-D_fm2PuR.js";
7
- import { f as formatErrorChainMessage } from "./proxy-env-Bp4LRKl9.js";
1
+ import { c as resolveAgentWorkspaceDir } from "./agent-scope-cbxkoURo.js";
2
+ import { c as resolveStateDir } from "./paths-Cvc9EM8Y.js";
3
+ import { mt as resolvePreferredOpenClawTmpDir } from "./subsystem-BCjklMkJ.js";
4
+ import { J as loadConfig } from "./model-selection-CpVr-61V.js";
5
+ import { t as redactSensitiveText } from "./redact-BOHmCPP_.js";
6
+ import { c as detectMime, l as extensionForMime } from "./image-ops-O8pHxo7i.js";
7
+ import { f as formatErrorChainMessage } from "./proxy-env-BL6Wl2NH.js";
8
8
  import { t as resolveNetworkSsrFPolicy } from "./ssrf-config-CNiEVKpL.js";
9
- import { n as withStrictGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-DGkoJpgm.js";
9
+ import { n as withStrictGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-DaQ-LaL5.js";
10
10
  import path from "node:path";
11
11
 
12
12
  //#region src/media/local-roots.ts
@@ -1,7 +1,7 @@
1
- import { i as logWarn, r as logInfo } from "./logger-a0-zAY5a.js";
2
- import { c as resolvePinnedHostnameWithPolicy, i as createPinnedDispatcher, n as SsrFBlockedError, o as isPrivateIpAddress, r as closeDispatcher, t as hasProxyEnvConfigured } from "./proxy-env-Bp4LRKl9.js";
1
+ import { i as logWarn, r as logInfo } from "./logger-DNehzD_s.js";
2
+ import { c as resolvePinnedHostnameWithPolicy, i as createPinnedDispatcher, n as SsrFBlockedError, o as isPrivateIpAddress, r as closeDispatcher, t as hasProxyEnvConfigured } from "./proxy-env-BL6Wl2NH.js";
3
3
  import { t as bindAbortRelay } from "./fetch-timeout-BfPtlUW6.js";
4
- import { t as isNpmUndiciDispatchingFetch } from "./proxy-fetch-DCI0KuH6.js";
4
+ import { t as isNpmUndiciDispatchingFetch } from "./proxy-fetch-CK5AQAYw.js";
5
5
  import { EnvHttpProxyAgent, FormData, fetch } from "undici";
6
6
 
7
7
  //#region src/infra/net/form-data.ts
@@ -1,7 +1,7 @@
1
- import { s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-vLJrYADD.js";
1
+ import { s as parseBooleanValue, t as readManifestNamespace } from "./legacy-names-CLlrMq8r.js";
2
2
  import path from "node:path";
3
- import syncFs from "node:fs";
4
- import json5 from "json5";
3
+ import fs 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
- syncFs.accessSync(candidate, syncFs.constants.X_OK);
95
+ fs.accessSync(candidate, fs.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,7 +1,7 @@
1
- import { l as expandHomePrefix } from "./paths-C6TxBCvO.js";
2
- import { B as hasNodeErrorCode, H as isPathInside, I as sameFileIdentity, U as isSymlinkOpenError, V as isNotFoundPathError } from "./subsystem-CPYnUTN4.js";
3
- import { i as logWarn } from "./logger-a0-zAY5a.js";
4
- import { n as assertNoPathAliasEscape } from "./path-alias-guards-Zj-NwKjV.js";
1
+ import { l as expandHomePrefix } from "./paths-Cvc9EM8Y.js";
2
+ import { B as hasNodeErrorCode, H as isPathInside, I as sameFileIdentity, U as isSymlinkOpenError, V as isNotFoundPathError } from "./subsystem-BCjklMkJ.js";
3
+ import { i as logWarn } from "./logger-DNehzD_s.js";
4
+ import { n as assertNoPathAliasEscape } from "./path-alias-guards-Cd5yHmTq.js";
5
5
  import fs from "node:fs/promises";
6
6
  import os from "node:os";
7
7
  import path from "node:path";
@@ -169,7 +169,7 @@ import { h as normalizeUpdateChannel, l as DEFAULT_PACKAGE_CHANNEL, n as checkUp
169
169
  import { t as reconcileBundledInstalls } from "./reconcile-bundled-ox-y3Yc9.js";
170
170
  import { a as resolveCommandSecretsFromActiveRuntimeSnapshot, i as prepareSecretsRuntimeSnapshot, n as clearSecretsRuntimeSnapshot, r as getActiveSecretsRuntimeSnapshot, t as activateSecretsRuntimeSnapshot } from "./runtime-CJE9alsl.js";
171
171
  import "./onboarding.secret-input-CsF4Gvtt.js";
172
- import { t as runOnboardingWizard } from "./onboarding-CbkMsexm.js";
172
+ import { t as runOnboardingWizard } from "./onboarding-BeCgp92Z.js";
173
173
  import { a as computeJobNextRunAtMs, c as findJobOrThrow, d as recomputeNextRuns, f as recomputeNextRunsForMaintenance, h as produceCronAgentTurn, i as applyJobPatch, l as isJobDue, m as resolveJobPayloadTextForMain, o as createJob, p as recordScheduleComputeError, r as resolveStaleClaimAdoptionMs, s as cronShapeSupportsIdentity, t as CRON_HEARTBEAT_ADAPTER_ID, u as nextWakeAtMs } from "./recovery-adapter-CPQ9-014.js";
174
174
  import { a as sendApnsAlert, c as parseMessageWithAttachments, d as shouldLogWs, f as summarizeAgentEventForWsLog, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, p as setGatewayWsLogStyle, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration, u as logWs } from "./push-apns-BkRmEyg_.js";
175
175
  import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-BzuIKryU.js";
@@ -4242,6 +4242,8 @@ async function stopGmailWatcher() {
4242
4242
 
4243
4243
  //#endregion
4244
4244
  //#region src/gateway/server-close.ts
4245
+ /** Grace period before unresponsive wss sockets are terminated during transport close. */
4246
+ const WSS_CLOSE_GRACE_TIMEOUT_MS = 5e3;
4245
4247
  function createGatewayTransportCloseHandler(params) {
4246
4248
  let closePromise = null;
4247
4249
  return (opts) => {
@@ -4271,6 +4273,13 @@ function createGatewayTransportCloseHandler(params) {
4271
4273
  client.socket.close(1012, "service restart");
4272
4274
  } catch {}
4273
4275
  params.clients.clear();
4276
+ for (const ws of params.wss.clients) try {
4277
+ ws.close(1012, "service restart");
4278
+ } catch {
4279
+ try {
4280
+ ws.terminate();
4281
+ } catch {}
4282
+ }
4274
4283
  const extensionClosePromise = new Promise((resolve) => params.wssBrowserExtension.close(() => resolve()));
4275
4284
  for (const ws of params.wssBrowserExtension.clients) try {
4276
4285
  ws.close(1001, "gateway restarting");
@@ -4282,7 +4291,14 @@ function createGatewayTransportCloseHandler(params) {
4282
4291
  } catch {
4283
4292
  ws.terminate();
4284
4293
  }
4294
+ const terminateTimer = setTimeout(() => {
4295
+ for (const ws of params.wss.clients) try {
4296
+ ws.terminate();
4297
+ } catch {}
4298
+ }, WSS_CLOSE_GRACE_TIMEOUT_MS);
4299
+ terminateTimer.unref?.();
4285
4300
  await new Promise((resolve) => params.wss.close(() => resolve()));
4301
+ clearTimeout(terminateTimer);
4286
4302
  await extensionClosePromise;
4287
4303
  const servers = params.httpServers && params.httpServers.length > 0 ? params.httpServers : [params.httpServer];
4288
4304
  for (const server of servers) {
@@ -28299,6 +28315,7 @@ function attachGatewayWsConnectionHandler(params) {
28299
28315
  };
28300
28316
  if (!client) (isNoisySwiftPmHelperClose(requestUserAgent, remoteAddr) ? logWsControl.debug : logWsControl.warn)(`closed before connect conn=${connId} remote=${remoteAddr ?? "?"} fwd=${logForwardedFor || "n/a"} origin=${logOrigin || "n/a"} host=${logHost || "n/a"} ua=${logUserAgent || "n/a"} code=${code ?? "n/a"} reason=${logReason || "n/a"}`, closeContext);
28301
28317
  if (client && isWebchatClient(client.connect.client)) logWsControl.info(`webchat disconnected code=${code} reason=${logReason || "n/a"} conn=${connId}`);
28318
+ else if (client && isUserClientId(client.connect.client?.id)) logWsControl.info(`user-client disconnected code=${code} reason=${logReason || "n/a"} conn=${connId} durationMs=${durationMs}`);
28302
28319
  if (client?.presenceKey) {
28303
28320
  upsertPresence(client.presenceKey, { reason: "disconnect" });
28304
28321
  broadcastPresenceSnapshot({
@@ -169,7 +169,7 @@ import { h as normalizeUpdateChannel, l as DEFAULT_PACKAGE_CHANNEL, n as checkUp
169
169
  import { t as reconcileBundledInstalls } from "./reconcile-bundled-CID18l98.js";
170
170
  import { a as resolveCommandSecretsFromActiveRuntimeSnapshot, i as prepareSecretsRuntimeSnapshot, n as clearSecretsRuntimeSnapshot, r as getActiveSecretsRuntimeSnapshot, t as activateSecretsRuntimeSnapshot } from "./runtime-9LahO95o.js";
171
171
  import "./onboarding.secret-input-COacoKk4.js";
172
- import { t as runOnboardingWizard } from "./onboarding-BA0mgN0_.js";
172
+ import { t as runOnboardingWizard } from "./onboarding-BwJssndg.js";
173
173
  import { a as computeJobNextRunAtMs, c as findJobOrThrow, d as recomputeNextRuns, f as recomputeNextRunsForMaintenance, h as produceCronAgentTurn, i as applyJobPatch, l as isJobDue, m as resolveJobPayloadTextForMain, o as createJob, p as recordScheduleComputeError, r as resolveStaleClaimAdoptionMs, s as cronShapeSupportsIdentity, t as CRON_HEARTBEAT_ADAPTER_ID, u as nextWakeAtMs } from "./recovery-adapter-BzWwvpIt.js";
174
174
  import { a as sendApnsAlert, c as parseMessageWithAttachments, d as shouldLogWs, f as summarizeAgentEventForWsLog, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, p as setGatewayWsLogStyle, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration, u as logWs } from "./push-apns-CImyrKnK.js";
175
175
  import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-BHeyVrvS.js";
@@ -4241,6 +4241,8 @@ async function stopGmailWatcher() {
4241
4241
 
4242
4242
  //#endregion
4243
4243
  //#region src/gateway/server-close.ts
4244
+ /** Grace period before unresponsive wss sockets are terminated during transport close. */
4245
+ const WSS_CLOSE_GRACE_TIMEOUT_MS = 5e3;
4244
4246
  function createGatewayTransportCloseHandler(params) {
4245
4247
  let closePromise = null;
4246
4248
  return (opts) => {
@@ -4270,6 +4272,13 @@ function createGatewayTransportCloseHandler(params) {
4270
4272
  client.socket.close(1012, "service restart");
4271
4273
  } catch {}
4272
4274
  params.clients.clear();
4275
+ for (const ws of params.wss.clients) try {
4276
+ ws.close(1012, "service restart");
4277
+ } catch {
4278
+ try {
4279
+ ws.terminate();
4280
+ } catch {}
4281
+ }
4273
4282
  const extensionClosePromise = new Promise((resolve) => params.wssBrowserExtension.close(() => resolve()));
4274
4283
  for (const ws of params.wssBrowserExtension.clients) try {
4275
4284
  ws.close(1001, "gateway restarting");
@@ -4281,7 +4290,14 @@ function createGatewayTransportCloseHandler(params) {
4281
4290
  } catch {
4282
4291
  ws.terminate();
4283
4292
  }
4293
+ const terminateTimer = setTimeout(() => {
4294
+ for (const ws of params.wss.clients) try {
4295
+ ws.terminate();
4296
+ } catch {}
4297
+ }, WSS_CLOSE_GRACE_TIMEOUT_MS);
4298
+ terminateTimer.unref?.();
4284
4299
  await new Promise((resolve) => params.wss.close(() => resolve()));
4300
+ clearTimeout(terminateTimer);
4285
4301
  await extensionClosePromise;
4286
4302
  const servers = params.httpServers && params.httpServers.length > 0 ? params.httpServers : [params.httpServer];
4287
4303
  for (const server of servers) {
@@ -28298,6 +28314,7 @@ function attachGatewayWsConnectionHandler(params) {
28298
28314
  };
28299
28315
  if (!client) (isNoisySwiftPmHelperClose(requestUserAgent, remoteAddr) ? logWsControl.debug : logWsControl.warn)(`closed before connect conn=${connId} remote=${remoteAddr ?? "?"} fwd=${logForwardedFor || "n/a"} origin=${logOrigin || "n/a"} host=${logHost || "n/a"} ua=${logUserAgent || "n/a"} code=${code ?? "n/a"} reason=${logReason || "n/a"}`, closeContext);
28300
28316
  if (client && isWebchatClient(client.connect.client)) logWsControl.info(`webchat disconnected code=${code} reason=${logReason || "n/a"} conn=${connId}`);
28317
+ else if (client && isUserClientId(client.connect.client?.id)) logWsControl.info(`user-client disconnected code=${code} reason=${logReason || "n/a"} conn=${connId} durationMs=${durationMs}`);
28301
28318
  if (client?.presenceKey) {
28302
28319
  upsertPresence(client.presenceKey, { reason: "disconnect" });
28303
28320
  broadcastPresenceSnapshot({
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { c as resolveStateDir } from "./paths-C6TxBCvO.js";
2
+ import { c as resolveStateDir } from "./paths-Cvc9EM8Y.js";
3
3
  import path from "node:path";
4
- import syncFs from "node:fs";
4
+ import fs from "node:fs";
5
5
 
6
6
  //#region src/infra/json-file.ts
7
7
  function loadJsonFile(pathname) {
8
8
  try {
9
- if (!syncFs.existsSync(pathname)) return;
10
- const raw = syncFs.readFileSync(pathname, "utf8");
9
+ if (!fs.existsSync(pathname)) return;
10
+ const raw = fs.readFileSync(pathname, "utf8");
11
11
  return JSON.parse(raw);
12
12
  } catch {
13
13
  return;
@@ -15,12 +15,12 @@ function loadJsonFile(pathname) {
15
15
  }
16
16
  function saveJsonFile(pathname, data) {
17
17
  const dir = path.dirname(pathname);
18
- if (!syncFs.existsSync(dir)) syncFs.mkdirSync(dir, {
18
+ if (!fs.existsSync(dir)) fs.mkdirSync(dir, {
19
19
  recursive: true,
20
20
  mode: 448
21
21
  });
22
- syncFs.writeFileSync(pathname, `${JSON.stringify(data, null, 2)}\n`, "utf8");
23
- syncFs.chmodSync(pathname, 384);
22
+ fs.writeFileSync(pathname, `${JSON.stringify(data, null, 2)}\n`, "utf8");
23
+ fs.chmodSync(pathname, 384);
24
24
  }
25
25
 
26
26
  //#endregion
@@ -1,4 +1,4 @@
1
- import { _ as runExec } from "./workspace-B707AGIc.js";
1
+ import { _ as runExec } from "./workspace-Dbn4gFdH.js";
2
2
  import fs from "node:fs/promises";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
package/dist/index.js CHANGED
@@ -123,7 +123,7 @@ import { t as isMainModule } from "./is-main-KU6jxc5L.js";
123
123
  import { t as ensureOpenClawCliOnPath } from "./path-env-IcDKkMPr.js";
124
124
  import { t as assertSupportedRuntime } from "./runtime-guard-DYUXYZIl.js";
125
125
  import "./ports-D_63qWVA.js";
126
- import { i as getCoreCliCommandsWithSubcommands, n as setProgramContext, o as registerProgramCommands, s as getSubCliCommandsWithSubcommands } from "./program-context-DqNMfWhq.js";
126
+ import { i as getCoreCliCommandsWithSubcommands, n as setProgramContext, o as registerProgramCommands, s as getSubCliCommandsWithSubcommands } from "./program-context-B3m_Vhb8.js";
127
127
  import "./plugin-registry-MKJBY7FX.js";
128
128
  import { n as resolveCliChannelOptions } from "./channel-options-6Ftz_M2y.js";
129
129
  import process$1 from "node:process";
@@ -1,8 +1,8 @@
1
- import { f as logVerbose, h as shouldLogVerbose, st as resolveUserPath } from "./subsystem-CPYnUTN4.js";
2
- import { _ as maxBytesForKind, a as hasAlphaChannel, c as detectMime, l as extensionForMime, m as kindFromMime, o as optimizeImageToPng, r as convertHeicToJpeg, s as resizeToJpeg } from "./image-ops-D_fm2PuR.js";
3
- import { o as readLocalFileSafely, t as SafeOpenError } from "./fs-safe-LRpYbPaA.js";
4
- import { a as getDefaultMediaLocalRoots, n as fetchRemoteMedia } from "./fetch-D0fPm94V.js";
5
- import { a as chunkText } from "./chunk-c1jvtxVA.js";
1
+ import { f as logVerbose, h as shouldLogVerbose, st as resolveUserPath } from "./subsystem-BCjklMkJ.js";
2
+ import { _ as maxBytesForKind, a as hasAlphaChannel, c as detectMime, l as extensionForMime, m as kindFromMime, o as optimizeImageToPng, r as convertHeicToJpeg, s as resizeToJpeg } from "./image-ops-O8pHxo7i.js";
3
+ import { o as readLocalFileSafely, t as SafeOpenError } from "./fs-safe-DwICJjkN.js";
4
+ import { a as getDefaultMediaLocalRoots, n as fetchRemoteMedia } from "./fetch-BRLmqIUZ.js";
5
+ import { a as chunkText } from "./chunk-B7KZoDXm.js";
6
6
  import fs from "node:fs/promises";
7
7
  import path from "node:path";
8
8
  import { fileURLToPath } from "node:url";
@@ -1,4 +1,4 @@
1
- import { t as createSubsystemLogger } from "./subsystem-CPYnUTN4.js";
1
+ import { t as createSubsystemLogger } from "./subsystem-BCjklMkJ.js";
2
2
 
3
3
  //#region src/utils/boolean.ts
4
4
  const DEFAULT_TRUTHY = [