@bitseek/claw 1.3.5 → 1.3.6

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 (115) hide show
  1. package/dist/{accounts-DMvETf-t.js → accounts-Bwq1wvds.js} +1 -1
  2. package/dist/{accounts-BTexwKe8.js → accounts-CX1yOBOk.js} +1 -1
  3. package/dist/{accounts-ubG6irXZ.js → accounts-CaiECgq3.js} +16 -16
  4. package/dist/{active-listener-Hd9sOu9T.js → active-listener-neKWQsOO.js} +1 -1
  5. package/dist/{agent-scope-C6hps0r3.js → agent-scope-CTbRzU1C.js} +4 -4
  6. package/dist/{api-key-rotation-Cv5_SG_o.js → api-key-rotation-BbZD-rsQ.js} +2 -2
  7. package/dist/{audio-preflight-C2pZmbnM.js → audio-preflight-C5Crv38h.js} +39 -39
  8. package/dist/{audio-transcription-runner-CQ4BMvGX.js → audio-transcription-runner-eVtEKUPC.js} +11 -11
  9. package/dist/{bindings-CsIiIjqN.js → bindings-Daa-Etag.js} +2 -2
  10. package/dist/build-info.json +2 -2
  11. package/dist/bundled/boot-md/handler.js +65 -65
  12. package/dist/bundled/bootstrap-extra-files/handler.js +7 -7
  13. package/dist/bundled/command-logger/handler.js +2 -2
  14. package/dist/bundled/session-memory/handler.js +65 -65
  15. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  16. package/dist/{channel-activity-Dwc2BBvs.js → channel-activity-D0BHmeoE.js} +3 -3
  17. package/dist/{chrome-DWfXErGH.js → chrome-BRjY_MCc.js} +26 -26
  18. package/dist/{chunk-2ZxftpDd.js → chunk-Dfkbh8wX.js} +1 -1
  19. package/dist/{command-registry-DshPN0jE.js → command-registry-BSN6zVlZ.js} +5 -5
  20. package/dist/{commands-registry-CTkboeeC.js → commands-registry-NyRDVN7s.js} +5 -5
  21. package/dist/{completion-cli-BD1Wf-K1.js → completion-cli-BDeiV4p9.js} +1 -1
  22. package/dist/{completion-cli-Ds2kVMMx.js → completion-cli-lZ6S6oKA.js} +2 -2
  23. package/dist/{deliver-zrYSWfQ5.js → deliver-DlLNT2iR.js} +22 -22
  24. package/dist/{diagnostic-BO1GQJJf.js → diagnostic-DpOlXoSr.js} +2 -2
  25. package/dist/{dock-Bm23mfim.js → dock-DXlPVrMo.js} +6 -6
  26. package/dist/{doctor-completion-DpsPIdur.js → doctor-completion-BKCOmkBi.js} +1 -1
  27. package/dist/{doctor-completion-f2gLNSUa.js → doctor-completion-Bim4XRFT.js} +1 -1
  28. package/dist/entry.js +2 -2
  29. package/dist/{env-DNMZEG57.js → env-Bn6pmvjK.js} +2 -2
  30. package/dist/{errors-B11yhRo6.js → errors-Ct2kCLWx.js} +1 -1
  31. package/dist/{fetch-4RonjgqX.js → fetch-2cO0rj7X.js} +5 -5
  32. package/dist/{fetch-guard-B1EGEHan.js → fetch-guard-iigSYt3Q.js} +2 -2
  33. package/dist/{frontmatter-D6vByAHn.js → frontmatter-rlCI8Hmw.js} +2 -2
  34. package/dist/{fs-safe-C77EShMC.js → fs-safe-CM9EhGvi.js} +4 -4
  35. package/dist/{gateway-cli-3rP04OO5.js → gateway-cli-8DmbQc9V.js} +1 -1
  36. package/dist/{gateway-cli-CbVaqoxB.js → gateway-cli-CDgld1qp.js} +1 -1
  37. package/dist/{github-copilot-token-DLGN-8YS.js → github-copilot-token-CPjAmbfr.js} +7 -7
  38. package/dist/{image-DnxYCkHO.js → image-BWlmyhr-.js} +6 -6
  39. package/dist/{image-ops-DCpyia_K.js → image-ops-jvmQoiyw.js} +1 -1
  40. package/dist/index.js +1 -1
  41. package/dist/{internal-hooks-yQe6H47q.js → internal-hooks-oLQ2m8YT.js} +1 -1
  42. package/dist/{ir-DcDVAFj3.js → ir-pR36nI-3.js} +6 -6
  43. package/dist/llm-slug-generator.js +65 -65
  44. package/dist/{logger-BlH5MJiV.js → logger-DelEB7MK.js} +1 -1
  45. package/dist/{login-CgEHUE7h.js → login-Cm2zDfEU.js} +6 -6
  46. package/dist/{login-qr-DUJfhbUe.js → login-qr-iS1jPDpP.js} +13 -13
  47. package/dist/{manager-tozHviEd.js → manager-BX3KtavU.js} +15 -15
  48. package/dist/{markdown-tables-BHONoo6S.js → markdown-tables-pfs_NCNh.js} +1 -1
  49. package/dist/{message-channel-pbgFFUNm.js → message-channel-DB68nc40.js} +1 -1
  50. package/dist/{model-selection-D_Si2Ict.js → model-selection-DfZMxaX3.js} +44 -44
  51. package/dist/{onboard-qD3I6PJW.js → onboard-BcaFvsav.js} +1 -1
  52. package/dist/{onboard-CE9V4Lb7.js → onboard-sKY5jwsH.js} +1 -1
  53. package/dist/{onboarding-CjwEj4uN.js → onboarding-BRfS3PSa.js} +1 -1
  54. package/dist/{onboarding-_GD-DZHG.js → onboarding-JNyox6ZE.js} +1 -1
  55. package/dist/{onboarding.finalize-B5hA5lV8.js → onboarding.finalize-CG9tTRyw.js} +3 -3
  56. package/dist/{onboarding.finalize-kX5lNpGT.js → onboarding.finalize-hBg4b8IC.js} +4 -4
  57. package/dist/{outbound-9rXkgGZM.js → outbound-N9_vLIGT.js} +7 -7
  58. package/dist/{outbound-attachment-Cy8rvvJE.js → outbound-attachment-CEt49GWZ.js} +2 -2
  59. package/dist/{path-alias-guards-Cpb5gMG6.js → path-alias-guards-xY_GOJVd.js} +1 -1
  60. package/dist/{paths-BHEVctLd.js → paths-Bi8MJ8NM.js} +3 -3
  61. package/dist/{paths-aGRLvQx9.js → paths-DKuX7-1L.js} +5 -5
  62. package/dist/{pi-embedded-BQqt592d.js → pi-embedded-CDXssetE.js} +187 -187
  63. package/dist/{pi-embedded-helpers-Bo7e-QzJ.js → pi-embedded-helpers-DSPiPpLM.js} +29 -29
  64. package/dist/{pi-model-discovery-DA46fxhD.js → pi-model-discovery-N7o4F93J.js} +7 -7
  65. package/dist/{plugins-CJoaoIHc.js → plugins-D63QYxW6.js} +11 -11
  66. package/dist/{program-BTBw45uK.js → program-B_-eFyJE.js} +2 -2
  67. package/dist/{program-context-CqvVc2Bn.js → program-context-BJQXRZ1w.js} +7 -7
  68. package/dist/{prompt-select-styled-DK1SacDX.js → prompt-select-styled-QH4mD93d.js} +1 -1
  69. package/dist/{prompt-select-styled-7VZwhnhd.js → prompt-select-styled-asxoqY78.js} +1 -1
  70. package/dist/{proxy-env-ynOWOBHx.js → proxy-env-Drg9J503.js} +1 -1
  71. package/dist/{proxy-fetch-xlbVQYN_.js → proxy-fetch-AvkSvetA.js} +1 -1
  72. package/dist/{proxy-DfJJLvch.js → proxy-jINniQBi.js} +1 -1
  73. package/dist/{pw-ai-Cu3cnNF0.js → pw-ai-gDXxKGzT.js} +17 -17
  74. package/dist/{qmd-manager-n4jauq3A.js → qmd-manager-DXbV8CPG.js} +11 -11
  75. package/dist/{query-expansion-CdDUaBcQ.js → query-expansion-C0A4WwZX.js} +5 -5
  76. package/dist/{redact-CaZQhKzI.js → redact-BC9R18Uw.js} +1 -1
  77. package/dist/{register.init-BXkISfms.js → register.init-BdPckTb9.js} +12 -3
  78. package/dist/{register.init-BvMr7cj9.js → register.init-CNKrbvCo.js} +12 -3
  79. package/dist/{register.maintenance-qjXr4IGe.js → register.maintenance-B0nZqqML.js} +4 -4
  80. package/dist/{register.maintenance-FKHpDu3E.js → register.maintenance-DvWoKstb.js} +5 -5
  81. package/dist/{register.onboard-BzpyjklK.js → register.onboard-B1-O21vU.js} +2 -2
  82. package/dist/{register.onboard--_sGklZ6.js → register.onboard-DOhvWYV7.js} +2 -2
  83. package/dist/{register.setup-qYawYgIM.js → register.setup-KPZYo_I1.js} +2 -2
  84. package/dist/{register.setup-Degyv4Bj.js → register.setup-ixDBzvTR.js} +2 -2
  85. package/dist/{register.subclis-DkDc3aKk.js → register.subclis-BSGvOwqU.js} +3 -3
  86. package/dist/{registry-CJCkqTms.js → registry-C2GEGa2t.js} +3 -3
  87. package/dist/{replies-D6zARd6r.js → replies-B6I1tT5t.js} +3 -3
  88. package/dist/{reply-prefix-DK1i6bCJ.js → reply-prefix-9mzt89Cf.js} +1 -1
  89. package/dist/{resolve-route-C5hVstLo.js → resolve-route-BNElrVxR.js} +4 -4
  90. package/dist/{retry-DTeP7C3h.js → retry-Ayb7e4XG.js} +1 -1
  91. package/dist/{run-main-VaM4RFaa.js → run-main-CdI1kXKr.js} +3 -3
  92. package/dist/{send-CcQZM0c7.js → send-B6QQ8XfC.js} +8 -8
  93. package/dist/{send--Gq-Uh-l.js → send-BMzVXosN.js} +7 -7
  94. package/dist/{send-DcL81tZr.js → send-BQETStDl.js} +10 -10
  95. package/dist/{send-D2zYssqK.js → send-Buidj_8L.js} +27 -27
  96. package/dist/{send-BpyiQEov.js → send-DC_e_Iev.js} +6 -6
  97. package/dist/{session-xKPVUYQP.js → session-TVb8hgJP.js} +9 -9
  98. package/dist/{session-meta-BbCwXniv.js → session-meta-DAMj6ZRX.js} +2 -2
  99. package/dist/{sessions-D7EjW0sG.js → sessions-Ck4ZR4dY.js} +31 -31
  100. package/dist/{skill-commands-Cea3CZFF.js → skill-commands-KesfMtZ9.js} +9 -9
  101. package/dist/{skills-BttlqUXr.js → skills-BYmEoxNo.js} +22 -22
  102. package/dist/{store-B7PaqfvZ.js → store-KLMMBnKE.js} +2 -2
  103. package/dist/{subsystem-BRjuJbbM.js → subsystem-CAatx5oo.js} +14 -14
  104. package/dist/{tables-BJ0XAman.js → tables-DqechQWF.js} +1 -1
  105. package/dist/{target-errors-Dad0aUFR.js → target-errors-C-KolUyX.js} +2 -2
  106. package/dist/{tokens-B9EDT4jv.js → tokens-BvzZdrVJ.js} +1 -1
  107. package/dist/{tool-images-ArXzv82F.js → tool-images-DiKIlElg.js} +2 -2
  108. package/dist/{tool-loop-detection-CLoYKYIq.js → tool-loop-detection-C4V990MS.js} +3 -3
  109. package/dist/{update-cli-Do4BIFSd.js → update-cli-CfeiDzYx.js} +4 -4
  110. package/dist/{update-cli-CWS0bKZV.js → update-cli-DKmrzt8l.js} +5 -5
  111. package/dist/{utils-BFZnl-5N.js → utils-Bo1RFF0l.js} +6 -6
  112. package/dist/{web-C5gLi1bN.js → web-BPI4HIht.js} +69 -69
  113. package/dist/{whatsapp-actions-Be9uvUUL.js → whatsapp-actions-Bf61u88d.js} +28 -28
  114. package/dist/{workspace-D6mrCnXi.js → workspace-CswOYN9T.js} +21 -21
  115. package/package.json +1 -1
@@ -1,90 +1,90 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { c as resolveDefaultAgentId, d as resolveSessionAgentId, f as resolveSessionAgentIds, g as toAgentModelListLike, h as resolveAgentModelPrimaryValue, i as resolveAgentDir, l as resolveEffectiveModelFallbacks, m as resolveAgentModelFallbackValues, n as listAgentIds, o as resolveAgentSkillsFilter, r as resolveAgentConfig, s as resolveAgentWorkspaceDir, t as hasConfiguredModelFallbacks, u as resolveRunModelFallbacksOverride } from "./agent-scope-C6hps0r3.js";
3
- import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, n as STATE_DIR, p as resolveCliName, r as resolveConfigPath } from "./paths-aGRLvQx9.js";
4
- import { C as normalizeLogLevel, E as consumeRootOptionToken, T as FLAG_TERMINATOR, _ as isRich, a as clearActiveProgressLine, c as danger, f as setVerbose, g as colorize, h as warn, i as defaultRuntime, o as registerActiveProgressLine, p as shouldLogVerbose, r as createNonExitingRuntime, s as unregisterActiveProgressLine, t as createSubsystemLogger, u as logVerbose, v as theme, w as resolvePreferredOpenClawTmpDir, y as getChildLogger } from "./subsystem-BRjuJbbM.js";
2
+ import { c as resolveDefaultAgentId, d as resolveSessionAgentId, f as resolveSessionAgentIds, g as toAgentModelListLike, h as resolveAgentModelPrimaryValue, i as resolveAgentDir, l as resolveEffectiveModelFallbacks, m as resolveAgentModelFallbackValues, n as listAgentIds, o as resolveAgentSkillsFilter, r as resolveAgentConfig, s as resolveAgentWorkspaceDir, t as hasConfiguredModelFallbacks, u as resolveRunModelFallbacksOverride } from "./agent-scope-CTbRzU1C.js";
3
+ import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, n as STATE_DIR, p as resolveCliName, r as resolveConfigPath } from "./paths-DKuX7-1L.js";
4
+ import { C as normalizeLogLevel, E as consumeRootOptionToken, T as FLAG_TERMINATOR, _ as isRich, a as clearActiveProgressLine, c as danger, f as setVerbose, g as colorize, h as warn, i as defaultRuntime, o as registerActiveProgressLine, p as shouldLogVerbose, r as createNonExitingRuntime, s as unregisterActiveProgressLine, t as createSubsystemLogger, u as logVerbose, v as theme, w as resolvePreferredOpenClawTmpDir, y as getChildLogger } from "./subsystem-CAatx5oo.js";
5
5
  import { C as resolveThreadParentSessionKey, S as parseAgentSessionKey, _ as deriveSessionChatType, b as isCronSessionKey, c as normalizeAgentId, d as resolveThreadSessionKeys, f as sanitizeAgentId, g as isBlockedObjectKey, h as normalizeOptionalAccountId, l as normalizeMainKey, m as normalizeAccountId$2, o as classifySessionKeyShape, p as DEFAULT_ACCOUNT_ID, r as buildAgentMainSessionKey, s as isValidAgentId, t as DEFAULT_AGENT_ID, u as resolveAgentIdFromSessionKey, v as getSubagentDepth, x as isSubagentSessionKey, y as isAcpSessionKey } from "./session-key-a6av96Fj.js";
6
- import { C as isPlainObject, S as truncateUtf16Safe, _ as shortenHomeInString, a as ensureDir$3, b as sliceUtf16Safe, c as isRecord$1, d as normalizeE164, h as resolveUserPath, o as escapeRegExp, r as clampInt, s as formatTerminalLink, t as CONFIG_DIR, v as shortenHomePath, y as sleep$1 } from "./utils-BFZnl-5N.js";
7
- import { C as openBoundaryFileSync, M as normalizeWindowsPathForComparison, S as openBoundaryFile, a as DEFAULT_IDENTITY_FILENAME, b as spawnWithFallback, f as loadWorkspaceBootstrapFiles, g as resolveOpenClawPackageRoot, l as ensureAgentWorkspace, m as resolveWorkspaceAttachmentsRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as runCommandWithTimeout, y as runExec } from "./workspace-D6mrCnXi.js";
8
- import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-BlH5MJiV.js";
9
- import { $t as extractShellWrapperInlineCommand, A as resolveApiKeyForProvider, An as withFileLock, At as resolveEffectiveEnableState, B as resolveApiKeyForProfile, Bn as DEFAULT_PROVIDER, Bt as getTrustedSafeBinDirs, C as buildAssistantMessage, Cn as resolveOwnerDisplaySetting, Ct as validateJsonSchemaValue, D as getApiKeyForModel, Dn as ensureAuthProfileStore, Dt as safeStatSync, E as buildUsageWithNoCost, En as markAuthProfileGood, Et as isPathInside, F as getSoonestCooldownExpiry, Ft as unsetConfigOverride, G as resolveConfigSnapshotHash, Gt as analyzeShellCommand, H as loadConfig, Ht as listWritableExplicitTrustedSafeBinDirs, I as isProfileInCooldown, In as normalizeSecretInput, It as getConfigValueAtPath, J as TELEGRAM_COMMAND_NAME_PATTERN, Jt as splitCommandChain, K as writeConfigFile, Kt as buildEnforcedShellCommand, L as markAuthProfileFailure, Ln as splitTrailingAuthProfile, Lt as parseConfigPath, M as resolveModelAuthMode, Mt as getConfigOverrides, Nt as resetConfigOverrides, O as getCustomProviderApiKey, On as resolveAuthStorePathForDisplay, Ot as applyTestPluginDefaults, P as resolveAuthProfileOrder, Pn as resolveAuthProfileDisplayLabel, Pt as setConfigOverride, Q as isInboundPathAllowed, Qt as resolveCommandResolutionFromArgv, R as markAuthProfileUsed, Rn as DEFAULT_CONTEXT_TOKENS, Rt as setConfigValueAtPath, S as createOllamaStreamFn, Sn as isDangerousHostEnvVarName, St as isSupportedLocalAvatarExtension, T as buildStreamErrorAssistantMessage, Tn as listProfilesForProvider, Tt as discoverOpenClawPlugins, U as readConfigFileSnapshot, Ut as normalizeTrustedSafeBinDirs, Vt as isTrustedSafeBinPath, Wt as validateSafeBinArgv, X as resolveTelegramCustomCommands, Xt as matchAllowlist, Y as normalizeTelegramCommandName, Yt as DEFAULT_SAFE_BINS, Zt as resolveAllowlistCandidatePath, _n as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, a as isCliProvider, an as SAFE_BIN_PROFILES, at as parseDurationMs, bn as getShellPathFromLoginShell, bt as isAvatarHttpUrl, c as normalizeProviderId, cn as applyMergePatch, d as resolveDefaultModelForAgent, dn as resolveDiscordPreviewStreamMode, en as isDispatchWrapperExecutable, et as resolveIMessageAttachmentRoots, f as resolveModelRefFromString, fn as resolveSlackNativeStreaming, h as resolveThinkingDefault, i as findNormalizedProviderValue, in as splitShellArgs, j as resolveEnvApiKey, jt as resolveMemorySlotDecision, k as requireApiKey, kn as resolveOpenClawAgentDir, kt as normalizePluginsConfig, ln as isSafeExecutableValue, m as resolveSubagentSpawnModelSelection, n as buildConfiguredAllowlistKeys, nn as unwrapKnownDispatchWrapperInvocation, nt as normalizeScpRemoteHost, o as modelKey, on as normalizeSafeBinProfileFixtures, p as resolveReasoningDefault, pn as resolveSlackStreamingMode, q as validateConfigObjectWithPlugins, qt as isWindowsPlatform, r as buildModelAliasIndex, rn as unwrapKnownShellMultiplexerInvocation, rt as parseNonNegativeByteSize, s as normalizeModelRef$2, sn as resolveSafeBinProfiles, t as buildAllowedModelSet, tn as isShellWrapperExecutable, tt as resolveIMessageRemoteAttachmentRoots, u as resolveConfiguredModelRef, un as mapStreamingModeToSlackLegacyDraftStreamMode, vn as resolveAgentMaxConcurrent, vt as AVATAR_MAX_BYTES, w as buildAssistantMessageWithZeroUsage, wn as dedupeProfileIds, wt as loadPluginManifestRegistry, x as OLLAMA_NATIVE_BASE_URL, xn as resolveShellEnvFallbackTimeoutMs, xt as isPathWithinRoot, yn as VERSION, yt as isAvatarDataUrl, z as resolveProfilesUnavailableReason, zn as DEFAULT_MODEL, zt as unsetConfigValueAtPath } from "./model-selection-D_Si2Ict.js";
10
- import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-DLGN-8YS.js";
11
- import { n as formatCliCommand, t as isTruthyEnvValue } from "./env-DNMZEG57.js";
6
+ import { C as isPlainObject, S as truncateUtf16Safe, _ as shortenHomeInString, a as ensureDir$3, b as sliceUtf16Safe, c as isRecord$1, d as normalizeE164, h as resolveUserPath, o as escapeRegExp, r as clampInt, s as formatTerminalLink, t as CONFIG_DIR, v as shortenHomePath, y as sleep$1 } from "./utils-Bo1RFF0l.js";
7
+ import { C as openBoundaryFileSync, M as normalizeWindowsPathForComparison, S as openBoundaryFile, a as DEFAULT_IDENTITY_FILENAME, b as spawnWithFallback, f as loadWorkspaceBootstrapFiles, g as resolveOpenClawPackageRoot, l as ensureAgentWorkspace, m as resolveWorkspaceAttachmentsRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as runCommandWithTimeout, y as runExec } from "./workspace-CswOYN9T.js";
8
+ import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-DelEB7MK.js";
9
+ import { $t as extractShellWrapperInlineCommand, A as resolveApiKeyForProvider, An as withFileLock, At as resolveEffectiveEnableState, B as resolveApiKeyForProfile, Bn as DEFAULT_PROVIDER, Bt as getTrustedSafeBinDirs, C as buildAssistantMessage, Cn as resolveOwnerDisplaySetting, Ct as validateJsonSchemaValue, D as getApiKeyForModel, Dn as ensureAuthProfileStore, Dt as safeStatSync, E as buildUsageWithNoCost, En as markAuthProfileGood, Et as isPathInside, F as getSoonestCooldownExpiry, Ft as unsetConfigOverride, G as resolveConfigSnapshotHash, Gt as analyzeShellCommand, H as loadConfig, Ht as listWritableExplicitTrustedSafeBinDirs, I as isProfileInCooldown, In as normalizeSecretInput, It as getConfigValueAtPath, J as TELEGRAM_COMMAND_NAME_PATTERN, Jt as splitCommandChain, K as writeConfigFile, Kt as buildEnforcedShellCommand, L as markAuthProfileFailure, Ln as splitTrailingAuthProfile, Lt as parseConfigPath, M as resolveModelAuthMode, Mt as getConfigOverrides, Nt as resetConfigOverrides, O as getCustomProviderApiKey, On as resolveAuthStorePathForDisplay, Ot as applyTestPluginDefaults, P as resolveAuthProfileOrder, Pn as resolveAuthProfileDisplayLabel, Pt as setConfigOverride, Q as isInboundPathAllowed, Qt as resolveCommandResolutionFromArgv, R as markAuthProfileUsed, Rn as DEFAULT_CONTEXT_TOKENS, Rt as setConfigValueAtPath, S as createOllamaStreamFn, Sn as isDangerousHostEnvVarName, St as isSupportedLocalAvatarExtension, T as buildStreamErrorAssistantMessage, Tn as listProfilesForProvider, Tt as discoverOpenClawPlugins, U as readConfigFileSnapshot, Ut as normalizeTrustedSafeBinDirs, Vt as isTrustedSafeBinPath, Wt as validateSafeBinArgv, X as resolveTelegramCustomCommands, Xt as matchAllowlist, Y as normalizeTelegramCommandName, Yt as DEFAULT_SAFE_BINS, Zt as resolveAllowlistCandidatePath, _n as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, a as isCliProvider, an as SAFE_BIN_PROFILES, at as parseDurationMs, bn as getShellPathFromLoginShell, bt as isAvatarHttpUrl, c as normalizeProviderId, cn as applyMergePatch, d as resolveDefaultModelForAgent, dn as resolveDiscordPreviewStreamMode, en as isDispatchWrapperExecutable, et as resolveIMessageAttachmentRoots, f as resolveModelRefFromString, fn as resolveSlackNativeStreaming, h as resolveThinkingDefault, i as findNormalizedProviderValue, in as splitShellArgs, j as resolveEnvApiKey, jt as resolveMemorySlotDecision, k as requireApiKey, kn as resolveOpenClawAgentDir, kt as normalizePluginsConfig, ln as isSafeExecutableValue, m as resolveSubagentSpawnModelSelection, n as buildConfiguredAllowlistKeys, nn as unwrapKnownDispatchWrapperInvocation, nt as normalizeScpRemoteHost, o as modelKey, on as normalizeSafeBinProfileFixtures, p as resolveReasoningDefault, pn as resolveSlackStreamingMode, q as validateConfigObjectWithPlugins, qt as isWindowsPlatform, r as buildModelAliasIndex, rn as unwrapKnownShellMultiplexerInvocation, rt as parseNonNegativeByteSize, s as normalizeModelRef$2, sn as resolveSafeBinProfiles, t as buildAllowedModelSet, tn as isShellWrapperExecutable, tt as resolveIMessageRemoteAttachmentRoots, u as resolveConfiguredModelRef, un as mapStreamingModeToSlackLegacyDraftStreamMode, vn as resolveAgentMaxConcurrent, vt as AVATAR_MAX_BYTES, w as buildAssistantMessageWithZeroUsage, wn as dedupeProfileIds, wt as loadPluginManifestRegistry, x as OLLAMA_NATIVE_BASE_URL, xn as resolveShellEnvFallbackTimeoutMs, xt as isPathWithinRoot, yn as VERSION, yt as isAvatarDataUrl, z as resolveProfilesUnavailableReason, zn as DEFAULT_MODEL, zt as unsetConfigValueAtPath } from "./model-selection-DfZMxaX3.js";
10
+ import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-CPjAmbfr.js";
11
+ import { n as formatCliCommand, t as isTruthyEnvValue } from "./env-Bn6pmvjK.js";
12
12
  import { t as parseBooleanValue$1 } from "./boolean-mcn6kL0s.js";
13
- import { a as triggerInternalHook, t as createInternalHookEvent } from "./internal-hooks-yQe6H47q.js";
14
- import { _ as getPluginCommandSpecs, a as normalizeAnyChannelId, c as getActivePluginRegistry, d as requireActivePluginRegistry, f as setActivePluginRegistry, g as executePluginCommand, h as clearPluginCommands, i as listChatChannels, l as getActivePluginRegistryKey, m as normalizePluginHttpPath, n as CHAT_CHANNEL_ORDER, o as normalizeChannelId$1, p as createPluginRegistry, r as getChatChannelMeta, s as normalizeChatChannelId, v as listPluginCommands, y as matchPluginCommand } from "./registry-CJCkqTms.js";
13
+ import { a as triggerInternalHook, t as createInternalHookEvent } from "./internal-hooks-oLQ2m8YT.js";
14
+ import { _ as getPluginCommandSpecs, a as normalizeAnyChannelId, c as getActivePluginRegistry, d as requireActivePluginRegistry, f as setActivePluginRegistry, g as executePluginCommand, h as clearPluginCommands, i as listChatChannels, l as getActivePluginRegistryKey, m as normalizePluginHttpPath, n as CHAT_CHANNEL_ORDER, o as normalizeChannelId$1, p as createPluginRegistry, r as getChatChannelMeta, s as normalizeChatChannelId, v as listPluginCommands, y as matchPluginCommand } from "./registry-C2GEGa2t.js";
15
15
  import { n as MANIFEST_KEY } from "./legacy-names-CaxS8pq2.js";
16
- import { a as resolveChannelGroupRequireMention, c as normalizeHyphenSlug, i as resolveChannelGroupPolicy, l as normalizeStringEntries, n as listChannelDocks, o as resolveChannelGroupToolsPolicy, r as normalizeSignalMessagingTarget, s as normalizeAtHashSlug, t as getChannelDock, u as normalizeStringEntriesLower } from "./dock-Bm23mfim.js";
16
+ import { a as resolveChannelGroupRequireMention, c as normalizeHyphenSlug, i as resolveChannelGroupPolicy, l as normalizeStringEntries, n as listChannelDocks, o as resolveChannelGroupToolsPolicy, r as normalizeSignalMessagingTarget, s as normalizeAtHashSlug, t as getChannelDock, u as normalizeStringEntriesLower } from "./dock-DXlPVrMo.js";
17
17
  import { t as runTasksWithConcurrency } from "./run-with-concurrency-NY-gTuzr.js";
18
- import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-B9EDT4jv.js";
19
- import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, f as resolveSlackReplyToMode, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$2, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-CJoaoIHc.js";
20
- import { a as logWebSelfId, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, o as logoutWeb, t as hasAnyWhatsAppAuth, u as readWebSelfId } from "./accounts-ubG6irXZ.js";
18
+ import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-BvzZdrVJ.js";
19
+ import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, f as resolveSlackReplyToMode, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$2, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-D63QYxW6.js";
20
+ import { a as logWebSelfId, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, o as logoutWeb, t as hasAnyWhatsAppAuth, u as readWebSelfId } from "./accounts-CaiECgq3.js";
21
21
  import { t as resolveAccountEntry } from "./account-lookup-JrULBwdR.js";
22
22
  import { t as normalizeChatType } from "./chat-type-DKb2TlGZ.js";
23
- import { t as buildChannelAccountBindings } from "./bindings-CsIiIjqN.js";
24
- import { a as createSlackWebClient, c as validateSlackBlocksArray, d as resolveSlackChannelId, i as normalizeSlackOutboundText, l as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack, u as parseSlackTarget } from "./send-CcQZM0c7.js";
25
- import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as isDiscordGroupAllowedByPolicy, d as parseDiscordModalCustomId, dt as resolveDiscordAllowListMatch, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordChannelConfigWithFallback, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordOwnerAccess, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as normalizeDiscordAllowList, m as resolveDiscordComponentEntry, mt as resolveDiscordMemberAccessState, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordGuildEntry, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordSlug, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-DcL81tZr.js";
23
+ import { t as buildChannelAccountBindings } from "./bindings-Daa-Etag.js";
24
+ import { a as createSlackWebClient, c as validateSlackBlocksArray, d as resolveSlackChannelId, i as normalizeSlackOutboundText, l as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack, u as parseSlackTarget } from "./send-B6QQ8XfC.js";
25
+ import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as isDiscordGroupAllowedByPolicy, d as parseDiscordModalCustomId, dt as resolveDiscordAllowListMatch, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordChannelConfigWithFallback, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordOwnerAccess, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as normalizeDiscordAllowList, m as resolveDiscordComponentEntry, mt as resolveDiscordMemberAccessState, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordGuildEntry, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordSlug, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-BQETStDl.js";
26
26
  import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-CY3Mg7Dp.js";
27
- import { A as initializeGlobalHookRunner, C as shouldSuppressReasoningPayload, D as normalizeChannelTargetInput, E as buildTargetResolverSignature, O as normalizeTargetForProvider, S as shouldSuppressMessagingToolReplies, T as resolveReplyToMode, _ as applyReplyTagsToPayload, a as normalizeOutboundPayloadsForJson, b as filterMessagingToolMediaDuplicates, c as parseReplyDirectives, d as toInternalMessagePreprocessedContext, f as toInternalMessageReceivedContext, g as fireAndForgetHook, h as toPluginMessageReceivedEvent, i as normalizeOutboundPayloads, k as getGlobalHookRunner, l as splitMediaFromOutput, m as toPluginMessageContext, o as normalizeReplyPayloadsForDelivery, p as toInternalMessageTranscribedContext, r as formatOutboundPayloadLog, s as throwIfAborted, t as deliverOutboundPayloads, u as deriveInboundMessageHookContext, v as applyReplyThreading, w as createReplyToModeFilterForChannel, x as isRenderablePayload, y as filterMessagingToolDuplicates } from "./deliver-zrYSWfQ5.js";
28
- import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-BO1GQJJf.js";
27
+ import { A as initializeGlobalHookRunner, C as shouldSuppressReasoningPayload, D as normalizeChannelTargetInput, E as buildTargetResolverSignature, O as normalizeTargetForProvider, S as shouldSuppressMessagingToolReplies, T as resolveReplyToMode, _ as applyReplyTagsToPayload, a as normalizeOutboundPayloadsForJson, b as filterMessagingToolMediaDuplicates, c as parseReplyDirectives, d as toInternalMessagePreprocessedContext, f as toInternalMessageReceivedContext, g as fireAndForgetHook, h as toPluginMessageReceivedEvent, i as normalizeOutboundPayloads, k as getGlobalHookRunner, l as splitMediaFromOutput, m as toPluginMessageContext, o as normalizeReplyPayloadsForDelivery, p as toInternalMessageTranscribedContext, r as formatOutboundPayloadLog, s as throwIfAborted, t as deliverOutboundPayloads, u as deriveInboundMessageHookContext, v as applyReplyThreading, w as createReplyToModeFilterForChannel, x as isRenderablePayload, y as filterMessagingToolDuplicates } from "./deliver-DlLNT2iR.js";
28
+ import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-DpOlXoSr.js";
29
29
  import { r as getDiagnosticSessionState } from "./diagnostic-session-state-DBPrVBk3.js";
30
- import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-BTexwKe8.js";
31
- import { $ as readChannelAllowFromStore, A as describeReplyTarget, B as resolveTelegramStreamMode, C as buildSenderLabel, D as buildTelegramParentPeer, E as buildTelegramGroupPeerId, F as resolveTelegramDirectPeerId, G as resolveSenderAllowMatch$1, H as isSenderAllowed$1, I as resolveTelegramForumThreadId, J as mergeDmAllowFromSources, K as firstDefined$1, L as resolveTelegramGroupAllowFromContext, M as extractTelegramLocation, N as hasBotMention, O as buildTelegramThreadParams, P as normalizeForwardedContext, Q as addChannelAllowFromStoreEntry, R as resolveTelegramMediaPlaceholder, S as buildGroupLabel, T as buildTelegramGroupFrom, U as normalizeAllowFrom$2, V as resolveTelegramThreadSpec, W as normalizeDmAllowFromWithStore$1, X as formatLocationText, Y as resolveGroupAllowFromSources, Z as toLocationContext, _ as resolveTelegramFetch, a as reactMessageTelegram, at as listPairingChannels, b as loadCronStore, c as sendStickerTelegram, ct as resolveTelegramTargetChatType, d as wasSentByBot, et as removeChannelAllowFromStoreEntry, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, it as getPairingAdapter, j as expandTextLinks, k as buildTypingThreadParams, m as markdownToTelegramHtml, n as createForumTopicTelegram, nt as readJsonFileWithFallback, o as sendMessageTelegram, ot as isVoiceCompatibleAudio, p as markdownToTelegramChunks, q as isSenderIdAllowed, r as deleteMessageTelegram, rt as writeJsonFileAtomically, s as sendPollTelegram, st as parseTelegramTarget, t as buildInlineKeyboard, tt as upsertChannelPairingRequest, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildSenderName, x as resolveCronStorePath, y as withTelegramApiErrorLogging, z as resolveTelegramReplyId } from "./send-D2zYssqK.js";
32
- import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-DCpyia_K.js";
33
- import { _ as resolveAttachmentKind, a as resolveAutoImageModel, b as modelSupportsVision, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, h as registerUnhandledRejectionHandler, i as normalizeMediaAttachments, l as resolveConcurrency, m as buildRandomTempFilePath, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as findModelInCatalog, x as resolveAliasedOpenAiCompatibleModelId, y as loadModelCatalog } from "./audio-transcription-runner-CQ4BMvGX.js";
34
- import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-DA46fxhD.js";
35
- import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-pbgFFUNm.js";
36
- import { $ as mergeAlsoAllowPolicy, A as isRawApiErrorPayload, B as registerBrowserRoutes, C as isCloudCodeAssistFormatError, D as isFailoverErrorMessage, E as isFailoverAssistantError, F as sanitizeUserFacingText, G as resolveBrowserControlAuth, H as resolveProfile, I as ensureSandboxWorkspaceForSession, J as resolveSandboxConfigForAgent, K as resolveGatewayCredentialsFromConfig, L as resolveSandboxContext, M as isTransientHttpError, N as parseImageDimensionError, O as isLikelyContextOverflowError, P as parseImageSizeError, Q as expandPolicyWithPluginGroups, R as resolveSandboxRuntimeStatus, S as isBillingAssistantError, T as isContextOverflowError, U as getBridgeAuthForPort, V as resolveBrowserConfig, W as ensureBrowserControlAuth, X as buildPluginToolGroups, Y as applyOwnerOnlyToolPolicy, Z as collectExplicitAllowlist, _ as formatBillingErrorMessage, a as isMessagingToolDuplicateNormalized, at as matchesAnyGlobPattern, b as isAuthAssistantError, c as extractToolCallsFromAssistant, ct as resolveBootstrapMaxChars, d as downgradeOpenAIFunctionCallReasoningPairs, et as stripPluginOnlyAllowlist, f as downgradeOpenAIReasoningBlocks, g as formatAssistantErrorText, h as classifyFailoverReason, it as compileGlobPatterns, j as isTimeoutErrorMessage, k as isRateLimitAssistantError, l as extractToolResultId, lt as resolveBootstrapTotalMaxChars, m as BILLING_ERROR_USER_MESSAGE, n as validateGeminiTurns, nt as normalizeToolName, o as normalizeTextForComparison, ot as buildBootstrapContextFiles, p as isGoogleModelApi, q as trimToUndefined$1, r as pickFallbackThinkingLevel, rt as resolveToolProfilePolicy, s as sanitizeSessionMessagesImages, st as ensureSessionHeader, t as validateAnthropicTurns, tt as expandToolGroups, u as sanitizeToolCallIdsForCloudCodeAssist, ut as sanitizeGoogleTurnOrdering, v as formatRawAssistantErrorForUi, w as isCompactionFailureError, x as isAuthPermanentErrorMessage, y as getApiErrorPayloadFingerprint, z as createBrowserRouteContext } from "./pi-embedded-helpers-Bo7e-QzJ.js";
37
- import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, U as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-DWfXErGH.js";
38
- import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-BttlqUXr.js";
39
- import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-Cpb5gMG6.js";
40
- import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-CaZQhKzI.js";
41
- import { i as formatUncaughtError, o as readErrorName, r as formatErrorMessage } from "./errors-B11yhRo6.js";
42
- import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-C77EShMC.js";
43
- import { a as isBlockedHostnameOrIp, c as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-ynOWOBHx.js";
44
- import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-B7PaqfvZ.js";
30
+ import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-CX1yOBOk.js";
31
+ import { $ as readChannelAllowFromStore, A as describeReplyTarget, B as resolveTelegramStreamMode, C as buildSenderLabel, D as buildTelegramParentPeer, E as buildTelegramGroupPeerId, F as resolveTelegramDirectPeerId, G as resolveSenderAllowMatch$1, H as isSenderAllowed$1, I as resolveTelegramForumThreadId, J as mergeDmAllowFromSources, K as firstDefined$1, L as resolveTelegramGroupAllowFromContext, M as extractTelegramLocation, N as hasBotMention, O as buildTelegramThreadParams, P as normalizeForwardedContext, Q as addChannelAllowFromStoreEntry, R as resolveTelegramMediaPlaceholder, S as buildGroupLabel, T as buildTelegramGroupFrom, U as normalizeAllowFrom$2, V as resolveTelegramThreadSpec, W as normalizeDmAllowFromWithStore$1, X as formatLocationText, Y as resolveGroupAllowFromSources, Z as toLocationContext, _ as resolveTelegramFetch, a as reactMessageTelegram, at as listPairingChannels, b as loadCronStore, c as sendStickerTelegram, ct as resolveTelegramTargetChatType, d as wasSentByBot, et as removeChannelAllowFromStoreEntry, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, it as getPairingAdapter, j as expandTextLinks, k as buildTypingThreadParams, m as markdownToTelegramHtml, n as createForumTopicTelegram, nt as readJsonFileWithFallback, o as sendMessageTelegram, ot as isVoiceCompatibleAudio, p as markdownToTelegramChunks, q as isSenderIdAllowed, r as deleteMessageTelegram, rt as writeJsonFileAtomically, s as sendPollTelegram, st as parseTelegramTarget, t as buildInlineKeyboard, tt as upsertChannelPairingRequest, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildSenderName, x as resolveCronStorePath, y as withTelegramApiErrorLogging, z as resolveTelegramReplyId } from "./send-Buidj_8L.js";
32
+ import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-jvmQoiyw.js";
33
+ import { _ as resolveAttachmentKind, a as resolveAutoImageModel, b as modelSupportsVision, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, h as registerUnhandledRejectionHandler, i as normalizeMediaAttachments, l as resolveConcurrency, m as buildRandomTempFilePath, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as findModelInCatalog, x as resolveAliasedOpenAiCompatibleModelId, y as loadModelCatalog } from "./audio-transcription-runner-eVtEKUPC.js";
34
+ import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-N7o4F93J.js";
35
+ import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-DB68nc40.js";
36
+ import { $ as mergeAlsoAllowPolicy, A as isRawApiErrorPayload, B as registerBrowserRoutes, C as isCloudCodeAssistFormatError, D as isFailoverErrorMessage, E as isFailoverAssistantError, F as sanitizeUserFacingText, G as resolveBrowserControlAuth, H as resolveProfile, I as ensureSandboxWorkspaceForSession, J as resolveSandboxConfigForAgent, K as resolveGatewayCredentialsFromConfig, L as resolveSandboxContext, M as isTransientHttpError, N as parseImageDimensionError, O as isLikelyContextOverflowError, P as parseImageSizeError, Q as expandPolicyWithPluginGroups, R as resolveSandboxRuntimeStatus, S as isBillingAssistantError, T as isContextOverflowError, U as getBridgeAuthForPort, V as resolveBrowserConfig, W as ensureBrowserControlAuth, X as buildPluginToolGroups, Y as applyOwnerOnlyToolPolicy, Z as collectExplicitAllowlist, _ as formatBillingErrorMessage, a as isMessagingToolDuplicateNormalized, at as matchesAnyGlobPattern, b as isAuthAssistantError, c as extractToolCallsFromAssistant, ct as resolveBootstrapMaxChars, d as downgradeOpenAIFunctionCallReasoningPairs, et as stripPluginOnlyAllowlist, f as downgradeOpenAIReasoningBlocks, g as formatAssistantErrorText, h as classifyFailoverReason, it as compileGlobPatterns, j as isTimeoutErrorMessage, k as isRateLimitAssistantError, l as extractToolResultId, lt as resolveBootstrapTotalMaxChars, m as BILLING_ERROR_USER_MESSAGE, n as validateGeminiTurns, nt as normalizeToolName, o as normalizeTextForComparison, ot as buildBootstrapContextFiles, p as isGoogleModelApi, q as trimToUndefined$1, r as pickFallbackThinkingLevel, rt as resolveToolProfilePolicy, s as sanitizeSessionMessagesImages, st as ensureSessionHeader, t as validateAnthropicTurns, tt as expandToolGroups, u as sanitizeToolCallIdsForCloudCodeAssist, ut as sanitizeGoogleTurnOrdering, v as formatRawAssistantErrorForUi, w as isCompactionFailureError, x as isAuthPermanentErrorMessage, y as getApiErrorPayloadFingerprint, z as createBrowserRouteContext } from "./pi-embedded-helpers-DSPiPpLM.js";
37
+ import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, U as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-BRjY_MCc.js";
38
+ import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-BYmEoxNo.js";
39
+ import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-xY_GOJVd.js";
40
+ import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-BC9R18Uw.js";
41
+ import { i as formatUncaughtError, o as readErrorName, r as formatErrorMessage } from "./errors-Ct2kCLWx.js";
42
+ import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-CM9EhGvi.js";
43
+ import { a as isBlockedHostnameOrIp, c as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-Drg9J503.js";
44
+ import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-KLMMBnKE.js";
45
45
  import { n as readJsonFile, r as writeJsonAtomic, t as createAsyncLock } from "./json-files-BpxTFudd.js";
46
- import { A as resolveSessionKey, B as canonicalizeMainSessionAlias, C as extractToolCallNames, D as hasInterSessionUserProvenance, E as applyInputProvenanceToUserMessage, F as resolveThreadFlag, G as resolveGroupSessionKey, H as resolveExplicitAgentSessionKey, I as DEFAULT_RESET_TRIGGERS, K as acquireSessionWriteLock, L as mergeSessionEntry, M as resolveChannelResetConfig, N as resolveSessionResetPolicy, O as normalizeInputProvenance, P as resolveSessionResetType, R as resolveFreshSessionTotalTokens, S as countToolResults, T as INPUT_PROVENANCE_KIND_VALUES, U as resolveMainSessionKey, W as deriveSessionMetaPatch, _ as normalizeDeliveryContext, a as resolveAndPersistSessionFile, b as archiveSessionTranscripts, c as recordSessionMetaFromInbound, d as updateSessionStoreEntry, f as isCacheEnabled, g as mergeDeliveryContext, h as deliveryContextKey, j as evaluateSessionFreshness, k as jsonUtf8Bytes, l as updateLastRoute, m as deliveryContextFromSession, n as parseSessionThreadInfo, o as loadSessionStore, p as resolveCacheTtlMs$1, q as resolveSessionLockMaxHoldFromTimeout, r as appendAssistantMessageToSessionTranscript, s as readSessionUpdatedAt, t as extractDeliveryInfo, u as updateSessionStore, v as normalizeSessionDeliveryFields, w as parseInlineDirectives$1, x as capArrayByJsonBytes, y as normalizeAccountId$3, z as setSessionRuntimeModel } from "./sessions-D7EjW0sG.js";
46
+ import { A as resolveSessionKey, B as canonicalizeMainSessionAlias, C as extractToolCallNames, D as hasInterSessionUserProvenance, E as applyInputProvenanceToUserMessage, F as resolveThreadFlag, G as resolveGroupSessionKey, H as resolveExplicitAgentSessionKey, I as DEFAULT_RESET_TRIGGERS, K as acquireSessionWriteLock, L as mergeSessionEntry, M as resolveChannelResetConfig, N as resolveSessionResetPolicy, O as normalizeInputProvenance, P as resolveSessionResetType, R as resolveFreshSessionTotalTokens, S as countToolResults, T as INPUT_PROVENANCE_KIND_VALUES, U as resolveMainSessionKey, W as deriveSessionMetaPatch, _ as normalizeDeliveryContext, a as resolveAndPersistSessionFile, b as archiveSessionTranscripts, c as recordSessionMetaFromInbound, d as updateSessionStoreEntry, f as isCacheEnabled, g as mergeDeliveryContext, h as deliveryContextKey, j as evaluateSessionFreshness, k as jsonUtf8Bytes, l as updateLastRoute, m as deliveryContextFromSession, n as parseSessionThreadInfo, o as loadSessionStore, p as resolveCacheTtlMs$1, q as resolveSessionLockMaxHoldFromTimeout, r as appendAssistantMessageToSessionTranscript, s as readSessionUpdatedAt, t as extractDeliveryInfo, u as updateSessionStore, v as normalizeSessionDeliveryFields, w as parseInlineDirectives$1, x as capArrayByJsonBytes, y as normalizeAccountId$3, z as setSessionRuntimeModel } from "./sessions-Ck4ZR4dY.js";
47
47
  import { n as resolveConversationLabel } from "./conversation-label-Dyk7sOSM.js";
48
- import { t as resolveIMessageAccount } from "./accounts-DMvETf-t.js";
49
- import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-BHEVctLd.js";
48
+ import { t as resolveIMessageAccount } from "./accounts-Bwq1wvds.js";
49
+ import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-Bi8MJ8NM.js";
50
50
  import { n as onSessionTranscriptUpdate, t as emitSessionTranscriptUpdate } from "./transcript-events-ByYgonIF.js";
51
- import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-ArXzv82F.js";
51
+ import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-DiKIlElg.js";
52
52
  import { a as normalizeReasoningLevel, c as normalizeVerboseLevel, i as normalizeElevatedLevel, l as resolveResponseUsageMode, n as formatXHighModelHint, o as normalizeThinkLevel, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking } from "./thinking-BcOnJa2q.js";
53
- import { C as extractTextFromChatContent, S as isInsideCode, T as ensureOpenClawModelsJson, _ as stripThinkingTagsFromText, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantThinking, d as formatReasoningMessage, f as inferToolMetaFromArgs, g as stripMinimaxToolCallXml, h as stripDowngradedToolCallText, i as coerceImageModelConfig, l as extractThinkingFromTaggedStream, m as promoteThinkingTagsToBlocks, o as resolveProviderVisionModelFromConfig, p as isAssistantMessage, r as coerceImageAssistantText, s as extractAssistantText$1, u as extractThinkingFromTaggedText, v as formatToolSummary, w as minimaxUnderstandImage, x as findCodeRegions, y as resolveToolDisplay } from "./image-DnxYCkHO.js";
54
- import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-4RonjgqX.js";
53
+ import { C as extractTextFromChatContent, S as isInsideCode, T as ensureOpenClawModelsJson, _ as stripThinkingTagsFromText, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantThinking, d as formatReasoningMessage, f as inferToolMetaFromArgs, g as stripMinimaxToolCallXml, h as stripDowngradedToolCallText, i as coerceImageModelConfig, l as extractThinkingFromTaggedStream, m as promoteThinkingTagsToBlocks, o as resolveProviderVisionModelFromConfig, p as isAssistantMessage, r as coerceImageAssistantText, s as extractAssistantText$1, u as extractThinkingFromTaggedText, v as formatToolSummary, w as minimaxUnderstandImage, x as findCodeRegions, y as resolveToolDisplay } from "./image-BWlmyhr-.js";
54
+ import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-2cO0rj7X.js";
55
55
  import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-CYFFedEH.js";
56
- import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-B1EGEHan.js";
57
- import { t as makeProxyFetch } from "./proxy-fetch-xlbVQYN_.js";
58
- import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-DK1i6bCJ.js";
59
- import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-2ZxftpDd.js";
60
- import { n as resolveMarkdownTableMode } from "./markdown-tables-BHONoo6S.js";
61
- import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-DcDVAFj3.js";
62
- import { a as ToolInputError, c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-Dad0aUFR.js";
63
- import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-CTkboeeC.js";
64
- import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-Cea3CZFF.js";
56
+ import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-iigSYt3Q.js";
57
+ import { t as makeProxyFetch } from "./proxy-fetch-AvkSvetA.js";
58
+ import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-9mzt89Cf.js";
59
+ import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-Dfkbh8wX.js";
60
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
61
+ import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-pR36nI-3.js";
62
+ import { a as ToolInputError, c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-C-KolUyX.js";
63
+ import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-NyRDVN7s.js";
64
+ import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-KesfMtZ9.js";
65
65
  import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-CTd41MBO.js";
66
66
  import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-CIXnD4u2.js";
67
- import { n as retryAsync } from "./retry-DTeP7C3h.js";
67
+ import { n as retryAsync } from "./retry-Ayb7e4XG.js";
68
68
  import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-DYqTwyb3.js";
69
- import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-Dwc2BBvs.js";
69
+ import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-D0BHmeoE.js";
70
70
  import { t as buildOutboundMediaLoadOptions } from "./load-options-xFTRYZAO.js";
71
71
  import { n as normalizePollInput } from "./polls-an_kOejR.js";
72
- import { t as convertMarkdownTables } from "./tables-BJ0XAman.js";
73
- import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-BpyiQEov.js";
74
- import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send--Gq-Uh-l.js";
75
- import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-C5hVstLo.js";
76
- import { i as redactIdentifier, t as getActiveWebListener } from "./active-listener-Hd9sOu9T.js";
77
- import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-D6zARd6r.js";
78
- import { t as recordInboundSessionMetaSafe } from "./session-meta-BbCwXniv.js";
79
- import { n as resolveMemorySearchConfig } from "./manager-tozHviEd.js";
80
- import { f as listMemoryFiles, p as normalizeExtraMemoryPaths } from "./query-expansion-CdDUaBcQ.js";
72
+ import { t as convertMarkdownTables } from "./tables-DqechQWF.js";
73
+ import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-DC_e_Iev.js";
74
+ import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-BMzVXosN.js";
75
+ import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-BNElrVxR.js";
76
+ import { i as redactIdentifier, t as getActiveWebListener } from "./active-listener-neKWQsOO.js";
77
+ import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-B6I1tT5t.js";
78
+ import { t as recordInboundSessionMetaSafe } from "./session-meta-DAMj6ZRX.js";
79
+ import { n as resolveMemorySearchConfig } from "./manager-BX3KtavU.js";
80
+ import { f as listMemoryFiles, p as normalizeExtraMemoryPaths } from "./query-expansion-C0A4WwZX.js";
81
81
  import { createRequire } from "node:module";
82
- import * as fs$1 from "node:fs/promises";
82
+ import * as fs$2 from "node:fs/promises";
83
83
  import fs from "node:fs/promises";
84
84
  import os, { homedir } from "node:os";
85
85
  import * as path$1 from "node:path";
86
86
  import path, { isAbsolute } from "node:path";
87
- import syncFs, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
87
+ import fs$1, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
88
88
  import JSON5 from "json5";
89
89
  import { inspect, promisify } from "node:util";
90
90
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
@@ -95,7 +95,7 @@ import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, Setting
95
95
  import { EdgeTTS } from "node-edge-tts";
96
96
  import { createServer } from "node:http";
97
97
  import { ProxyAgent, fetch as fetch$1 } from "undici";
98
- import WebSocket$1, { WebSocket } from "ws";
98
+ import WebSocket, { WebSocket as WebSocket$1 } from "ws";
99
99
  import { Buffer as Buffer$1 } from "node:buffer";
100
100
  import { createJiti } from "jiti";
101
101
  import AjvPkg from "ajv";
@@ -3334,7 +3334,7 @@ async function resolveOpenClawDocsPath(params) {
3334
3334
  const workspaceDir = params.workspaceDir?.trim();
3335
3335
  if (workspaceDir) {
3336
3336
  const workspaceDocs = path.join(workspaceDir, "docs");
3337
- if (syncFs.existsSync(workspaceDocs)) return workspaceDocs;
3337
+ if (fs$1.existsSync(workspaceDocs)) return workspaceDocs;
3338
3338
  }
3339
3339
  const packageRoot = await resolveOpenClawPackageRoot({
3340
3340
  cwd: params.cwd,
@@ -3343,7 +3343,7 @@ async function resolveOpenClawDocsPath(params) {
3343
3343
  });
3344
3344
  if (!packageRoot) return null;
3345
3345
  const packageDocs = path.join(packageRoot, "docs");
3346
- return syncFs.existsSync(packageDocs) ? packageDocs : null;
3346
+ return fs$1.existsSync(packageDocs) ? packageDocs : null;
3347
3347
  }
3348
3348
 
3349
3349
  //#endregion
@@ -6394,7 +6394,7 @@ function resolveDefaultIdentityPath() {
6394
6394
  return path.join(resolveStateDir(), "identity", "device.json");
6395
6395
  }
6396
6396
  function ensureDir$2(filePath) {
6397
- syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
6397
+ fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
6398
6398
  }
6399
6399
  const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
6400
6400
  function base64UrlEncode(buf) {
@@ -6430,8 +6430,8 @@ function generateIdentity() {
6430
6430
  }
6431
6431
  function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
6432
6432
  try {
6433
- if (syncFs.existsSync(filePath)) {
6434
- const raw = syncFs.readFileSync(filePath, "utf8");
6433
+ if (fs$1.existsSync(filePath)) {
6434
+ const raw = fs$1.readFileSync(filePath, "utf8");
6435
6435
  const parsed = JSON.parse(raw);
6436
6436
  if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
6437
6437
  const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
@@ -6440,9 +6440,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
6440
6440
  ...parsed,
6441
6441
  deviceId: derivedId
6442
6442
  };
6443
- syncFs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
6443
+ fs$1.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
6444
6444
  try {
6445
- syncFs.chmodSync(filePath, 384);
6445
+ fs$1.chmodSync(filePath, 384);
6446
6446
  } catch {}
6447
6447
  return {
6448
6448
  deviceId: derivedId,
@@ -6467,9 +6467,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
6467
6467
  privateKeyPem: identity.privateKeyPem,
6468
6468
  createdAtMs: Date.now()
6469
6469
  };
6470
- syncFs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
6470
+ fs$1.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
6471
6471
  try {
6472
- syncFs.chmodSync(filePath, 384);
6472
+ fs$1.chmodSync(filePath, 384);
6473
6473
  } catch {}
6474
6474
  return identity;
6475
6475
  }
@@ -6661,8 +6661,8 @@ function resolveDeviceAuthPath(env = process.env) {
6661
6661
  }
6662
6662
  function readStore(filePath) {
6663
6663
  try {
6664
- if (!syncFs.existsSync(filePath)) return null;
6665
- const raw = syncFs.readFileSync(filePath, "utf8");
6664
+ if (!fs$1.existsSync(filePath)) return null;
6665
+ const raw = fs$1.readFileSync(filePath, "utf8");
6666
6666
  const parsed = JSON.parse(raw);
6667
6667
  if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
6668
6668
  if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
@@ -6672,10 +6672,10 @@ function readStore(filePath) {
6672
6672
  }
6673
6673
  }
6674
6674
  function writeStore(filePath, store) {
6675
- syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
6676
- syncFs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
6675
+ fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
6676
+ fs$1.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
6677
6677
  try {
6678
- syncFs.chmodSync(filePath, 384);
6678
+ fs$1.chmodSync(filePath, 384);
6679
6679
  } catch {}
6680
6680
  }
6681
6681
  function loadDeviceAuthToken(params) {
@@ -8197,7 +8197,7 @@ var GatewayClient = class {
8197
8197
  if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
8198
8198
  });
8199
8199
  }
8200
- this.ws = new WebSocket(url, wsOptions);
8200
+ this.ws = new WebSocket$1(url, wsOptions);
8201
8201
  this.ws.on("open", () => {
8202
8202
  if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
8203
8203
  const tlsError = this.validateTlsFingerprint();
@@ -8393,7 +8393,7 @@ var GatewayClient = class {
8393
8393
  const connectChallengeTimeoutMs = typeof rawConnectDelayMs === "number" && Number.isFinite(rawConnectDelayMs) ? Math.max(250, Math.min(1e4, rawConnectDelayMs)) : 2e3;
8394
8394
  if (this.connectTimer) clearTimeout(this.connectTimer);
8395
8395
  this.connectTimer = setTimeout(() => {
8396
- if (this.connectSent || this.ws?.readyState !== WebSocket.OPEN) return;
8396
+ if (this.connectSent || this.ws?.readyState !== WebSocket$1.OPEN) return;
8397
8397
  this.opts.onConnectError?.(/* @__PURE__ */ new Error("gateway connect challenge timeout"));
8398
8398
  this.ws?.close(1008, "connect challenge timeout");
8399
8399
  }, connectChallengeTimeoutMs);
@@ -8435,7 +8435,7 @@ var GatewayClient = class {
8435
8435
  return null;
8436
8436
  }
8437
8437
  async request(method, params, opts) {
8438
- if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
8438
+ if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
8439
8439
  const id = randomUUID();
8440
8440
  const frame = {
8441
8441
  type: "req",
@@ -9715,7 +9715,7 @@ async function routeReply(params) {
9715
9715
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
9716
9716
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
9717
9717
  try {
9718
- const { deliverOutboundPayloads } = await import("./deliver-zrYSWfQ5.js").then((n) => n.n);
9718
+ const { deliverOutboundPayloads } = await import("./deliver-DlLNT2iR.js").then((n) => n.n);
9719
9719
  const outboundSession = buildOutboundSessionContext({
9720
9720
  cfg,
9721
9721
  agentId: resolvedAgentId,
@@ -10359,7 +10359,7 @@ function normalizeSessionKey(value) {
10359
10359
  }
10360
10360
  function readSessionStore(storePath) {
10361
10361
  try {
10362
- const raw = syncFs.readFileSync(storePath, "utf-8");
10362
+ const raw = fs$1.readFileSync(storePath, "utf-8");
10363
10363
  const parsed = JSON5.parse(raw);
10364
10364
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
10365
10365
  } catch {}
@@ -14273,7 +14273,7 @@ async function sendTranscriptEcho(params) {
14273
14273
  }
14274
14274
  const text = formatEchoTranscript(transcript, params.format ?? DEFAULT_ECHO_TRANSCRIPT_FORMAT);
14275
14275
  try {
14276
- const { deliverOutboundPayloads } = await import("./deliver-zrYSWfQ5.js").then((n) => n.n);
14276
+ const { deliverOutboundPayloads } = await import("./deliver-DlLNT2iR.js").then((n) => n.n);
14277
14277
  await deliverOutboundPayloads({
14278
14278
  cfg,
14279
14279
  channel: normalizedChannel,
@@ -17888,7 +17888,7 @@ function mergeLegacyAgent(current, legacy) {
17888
17888
  }
17889
17889
  function ensureDir$1(filePath) {
17890
17890
  const dir = path.dirname(filePath);
17891
- syncFs.mkdirSync(dir, { recursive: true });
17891
+ fs$1.mkdirSync(dir, { recursive: true });
17892
17892
  }
17893
17893
  function coerceAllowlistEntries(allowlist) {
17894
17894
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -17958,11 +17958,11 @@ function generateToken() {
17958
17958
  function loadExecApprovals() {
17959
17959
  const filePath = resolveExecApprovalsPath();
17960
17960
  try {
17961
- if (!syncFs.existsSync(filePath)) return normalizeExecApprovals({
17961
+ if (!fs$1.existsSync(filePath)) return normalizeExecApprovals({
17962
17962
  version: 1,
17963
17963
  agents: {}
17964
17964
  });
17965
- const raw = syncFs.readFileSync(filePath, "utf8");
17965
+ const raw = fs$1.readFileSync(filePath, "utf8");
17966
17966
  const parsed = JSON.parse(raw);
17967
17967
  if (parsed?.version !== 1) return normalizeExecApprovals({
17968
17968
  version: 1,
@@ -17979,9 +17979,9 @@ function loadExecApprovals() {
17979
17979
  function saveExecApprovals(file) {
17980
17980
  const filePath = resolveExecApprovalsPath();
17981
17981
  ensureDir$1(filePath);
17982
- syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
17982
+ fs$1.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
17983
17983
  try {
17984
- syncFs.chmodSync(filePath, 384);
17984
+ fs$1.chmodSync(filePath, 384);
17985
17985
  } catch {}
17986
17986
  }
17987
17987
  function ensureExecApprovals() {
@@ -18478,18 +18478,18 @@ function drainSystemEventEntries(sessionKey) {
18478
18478
  function resolvePowerShellPath() {
18479
18479
  const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
18480
18480
  const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
18481
- if (syncFs.existsSync(pwsh7)) return pwsh7;
18481
+ if (fs$1.existsSync(pwsh7)) return pwsh7;
18482
18482
  const programW6432 = process.env.ProgramW6432;
18483
18483
  if (programW6432 && programW6432 !== programFiles) {
18484
18484
  const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
18485
- if (syncFs.existsSync(pwsh7Alt)) return pwsh7Alt;
18485
+ if (fs$1.existsSync(pwsh7Alt)) return pwsh7Alt;
18486
18486
  }
18487
18487
  const pwshInPath = resolveShellFromPath("pwsh");
18488
18488
  if (pwshInPath) return pwshInPath;
18489
18489
  const systemRoot = process.env.SystemRoot || process.env.WINDIR;
18490
18490
  if (systemRoot) {
18491
18491
  const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
18492
- if (syncFs.existsSync(candidate)) return candidate;
18492
+ if (fs$1.existsSync(candidate)) return candidate;
18493
18493
  }
18494
18494
  return "powershell.exe";
18495
18495
  }
@@ -18527,7 +18527,7 @@ function resolveShellFromPath(name) {
18527
18527
  for (const entry of entries) {
18528
18528
  const candidate = path.join(entry, name);
18529
18529
  try {
18530
- syncFs.accessSync(candidate, syncFs.constants.X_OK);
18530
+ fs$1.accessSync(candidate, fs$1.constants.X_OK);
18531
18531
  return candidate;
18532
18532
  } catch {}
18533
18533
  }
@@ -22001,7 +22001,7 @@ function ensureContextWindowCacheLoaded() {
22001
22001
  await ensureOpenClawModelsJson(cfg);
22002
22002
  } catch {}
22003
22003
  try {
22004
- const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-DA46fxhD.js").then((n) => n.r);
22004
+ const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-N7o4F93J.js").then((n) => n.r);
22005
22005
  const agentDir = resolveOpenClawAgentDir();
22006
22006
  const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
22007
22007
  applyDiscoveredContextWindows({
@@ -22173,7 +22173,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
22173
22173
  function hasGitMarker(repoRoot) {
22174
22174
  const gitPath = path.join(repoRoot, ".git");
22175
22175
  try {
22176
- const stat = syncFs.statSync(gitPath);
22176
+ const stat = fs$1.statSync(gitPath);
22177
22177
  return stat.isDirectory() || stat.isFile();
22178
22178
  } catch {
22179
22179
  return false;
@@ -22185,10 +22185,10 @@ function findGitRoot(startDir, opts = {}) {
22185
22185
  function resolveGitDirFromMarker(repoRoot) {
22186
22186
  const gitPath = path.join(repoRoot, ".git");
22187
22187
  try {
22188
- const stat = syncFs.statSync(gitPath);
22188
+ const stat = fs$1.statSync(gitPath);
22189
22189
  if (stat.isDirectory()) return gitPath;
22190
22190
  if (!stat.isFile()) return null;
22191
- const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22191
+ const match = fs$1.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22192
22192
  if (!match?.[1]) return null;
22193
22193
  return path.resolve(repoRoot, match[1].trim());
22194
22194
  } catch {
@@ -22255,7 +22255,7 @@ const resolveCommitHash = (options = {}) => {
22255
22255
  cachedCommit = null;
22256
22256
  return cachedCommit;
22257
22257
  }
22258
- const head = syncFs.readFileSync(headPath, "utf-8").trim();
22258
+ const head = fs$1.readFileSync(headPath, "utf-8").trim();
22259
22259
  if (!head) {
22260
22260
  cachedCommit = null;
22261
22261
  return cachedCommit;
@@ -22263,7 +22263,7 @@ const resolveCommitHash = (options = {}) => {
22263
22263
  if (head.startsWith("ref:")) {
22264
22264
  const ref = head.replace(/^ref:\s*/i, "").trim();
22265
22265
  const refPath = path.resolve(path.dirname(headPath), ref);
22266
- cachedCommit = formatCommit(syncFs.readFileSync(refPath, "utf-8").trim());
22266
+ cachedCommit = formatCommit(fs$1.readFileSync(refPath, "utf-8").trim());
22267
22267
  return cachedCommit;
22268
22268
  }
22269
22269
  cachedCommit = formatCommit(head);
@@ -22523,17 +22523,17 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
22523
22523
  } catch {
22524
22524
  return;
22525
22525
  }
22526
- if (!syncFs.existsSync(logPath)) return;
22526
+ if (!fs$1.existsSync(logPath)) return;
22527
22527
  try {
22528
22528
  const TAIL_BYTES = 8192;
22529
- const stat = syncFs.statSync(logPath);
22529
+ const stat = fs$1.statSync(logPath);
22530
22530
  const offset = Math.max(0, stat.size - TAIL_BYTES);
22531
22531
  const buf = Buffer.alloc(Math.min(TAIL_BYTES, stat.size));
22532
- const fd = syncFs.openSync(logPath, "r");
22532
+ const fd = fs$1.openSync(logPath, "r");
22533
22533
  try {
22534
- syncFs.readSync(fd, buf, 0, buf.length, offset);
22534
+ fs$1.readSync(fd, buf, 0, buf.length, offset);
22535
22535
  } finally {
22536
- syncFs.closeSync(fd);
22536
+ fs$1.closeSync(fd);
22537
22537
  }
22538
22538
  const tail = buf.toString("utf-8");
22539
22539
  const lines = (offset > 0 ? tail.slice(tail.indexOf("\n") + 1) : tail).split(/\n+/);
@@ -23888,7 +23888,7 @@ function resolveRepoRoot(params) {
23888
23888
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
23889
23889
  if (configured) try {
23890
23890
  const resolved = path.resolve(configured);
23891
- if (syncFs.statSync(resolved).isDirectory()) return resolved;
23891
+ if (fs$1.statSync(resolved).isDirectory()) return resolved;
23892
23892
  } catch {}
23893
23893
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
23894
23894
  const seen = /* @__PURE__ */ new Set();
@@ -24656,7 +24656,7 @@ async function buildContextReply(params) {
24656
24656
  //#region src/auto-reply/reply/commands-export-session.ts
24657
24657
  const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
24658
24658
  function loadTemplate(fileName) {
24659
- return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
24659
+ return fs$1.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
24660
24660
  }
24661
24661
  function generateHtml(sessionData) {
24662
24662
  const template = loadTemplate("template.html");
@@ -24730,7 +24730,7 @@ async function buildExportSessionReply(params) {
24730
24730
  } catch (err) {
24731
24731
  return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
24732
24732
  }
24733
- if (!syncFs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
24733
+ if (!fs$1.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
24734
24734
  const sessionManager = SessionManager.open(sessionFile);
24735
24735
  const entries = sessionManager.getEntries();
24736
24736
  const header = sessionManager.getHeader();
@@ -24751,8 +24751,8 @@ async function buildExportSessionReply(params) {
24751
24751
  const defaultFileName = `openclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
24752
24752
  const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
24753
24753
  const outputDir = path.dirname(outputPath);
24754
- if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
24755
- syncFs.writeFileSync(outputPath, html, "utf-8");
24754
+ if (!fs$1.existsSync(outputDir)) fs$1.mkdirSync(outputDir, { recursive: true });
24755
+ fs$1.writeFileSync(outputPath, html, "utf-8");
24756
24756
  const relativePath = path.relative(params.workspaceDir, outputPath);
24757
24757
  return { text: [
24758
24758
  "✅ Session exported!",
@@ -24927,8 +24927,8 @@ function resolveZaiApiKey() {
24927
24927
  }
24928
24928
  try {
24929
24929
  const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
24930
- if (!syncFs.existsSync(authPath)) return;
24931
- const data = JSON.parse(syncFs.readFileSync(authPath, "utf-8"));
24930
+ if (!fs$1.existsSync(authPath)) return;
24931
+ const data = JSON.parse(fs$1.readFileSync(authPath, "utf-8"));
24932
24932
  return data["z-ai"]?.access || data.zai?.access;
24933
24933
  } catch {
24934
24934
  return;
@@ -26747,7 +26747,7 @@ function shouldPersistAnyBindingState() {
26747
26747
  }
26748
26748
  function shouldPersistBindingMutations() {
26749
26749
  if (shouldPersistAnyBindingState()) return true;
26750
- return syncFs.existsSync(resolveThreadBindingsPath());
26750
+ return fs$1.existsSync(resolveThreadBindingsPath());
26751
26751
  }
26752
26752
  function saveBindingsToDisk(params = {}) {
26753
26753
  if (!params.force && !shouldPersistAnyBindingState()) return;
@@ -28011,7 +28011,7 @@ const applyCostTotal = (totals, costTotal) => {
28011
28011
  totals.totalCost += costTotal;
28012
28012
  };
28013
28013
  async function* readJsonlRecords(filePath) {
28014
- const fileStream = syncFs.createReadStream(filePath, { encoding: "utf-8" });
28014
+ const fileStream = fs$1.createReadStream(filePath, { encoding: "utf-8" });
28015
28015
  const rl = readline.createInterface({
28016
28016
  input: fileStream,
28017
28017
  crlfDelay: Infinity
@@ -28083,10 +28083,10 @@ async function loadCostUsageSummary(params) {
28083
28083
  const dailyMap = /* @__PURE__ */ new Map();
28084
28084
  const totals = emptyTotals();
28085
28085
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
28086
- const entries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
28086
+ const entries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
28087
28087
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
28088
28088
  const filePath = path.join(sessionsDir, entry.name);
28089
- const stats = await syncFs.promises.stat(filePath).catch(() => null);
28089
+ const stats = await fs$1.promises.stat(filePath).catch(() => null);
28090
28090
  if (!stats) return null;
28091
28091
  if (stats.mtimeMs < sinceTime) return null;
28092
28092
  return filePath;
@@ -28119,7 +28119,7 @@ async function loadCostUsageSummary(params) {
28119
28119
  }
28120
28120
  async function loadSessionCostSummary(params) {
28121
28121
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
28122
- if (!sessionFile || !syncFs.existsSync(sessionFile)) return null;
28122
+ if (!sessionFile || !fs$1.existsSync(sessionFile)) return null;
28123
28123
  const totals = emptyTotals();
28124
28124
  let firstActivity;
28125
28125
  let lastActivity;
@@ -30615,7 +30615,7 @@ async function createModelSelectionState(params) {
30615
30615
  }
30616
30616
  }
30617
30617
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
30618
- const { ensureAuthProfileStore } = await import("./model-selection-D_Si2Ict.js").then((n) => n.N);
30618
+ const { ensureAuthProfileStore } = await import("./model-selection-DfZMxaX3.js").then((n) => n.N);
30619
30619
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
30620
30620
  const providerKey = normalizeProviderId(provider);
30621
30621
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -34276,7 +34276,7 @@ function asBoolean(value) {
34276
34276
  }
34277
34277
  function resolveTempPathParts(opts) {
34278
34278
  const tmpDir = opts.tmpDir ?? resolvePreferredOpenClawTmpDir();
34279
- if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
34279
+ if (!opts.tmpDir) fs$1.mkdirSync(tmpDir, {
34280
34280
  recursive: true,
34281
34281
  mode: 448
34282
34282
  });
@@ -34362,7 +34362,7 @@ async function writeUrlToFile(filePath, url, opts) {
34362
34362
  if (typeof contentLength === "number" && Number.isFinite(contentLength) && contentLength > MAX_CAMERA_URL_DOWNLOAD_BYTES) throw new Error(`writeUrlToFile: content-length ${contentLength} exceeds max ${MAX_CAMERA_URL_DOWNLOAD_BYTES}`);
34363
34363
  const body = res.body;
34364
34364
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
34365
- const fileHandle = await fs$1.open(filePath, "w");
34365
+ const fileHandle = await fs$2.open(filePath, "w");
34366
34366
  let thrown;
34367
34367
  try {
34368
34368
  const reader = body.getReader();
@@ -34380,7 +34380,7 @@ async function writeUrlToFile(filePath, url, opts) {
34380
34380
  await fileHandle.close();
34381
34381
  }
34382
34382
  if (thrown) {
34383
- await fs$1.unlink(filePath).catch(() => {});
34383
+ await fs$2.unlink(filePath).catch(() => {});
34384
34384
  throw thrown;
34385
34385
  }
34386
34386
  } finally {
@@ -34393,7 +34393,7 @@ async function writeUrlToFile(filePath, url, opts) {
34393
34393
  }
34394
34394
  async function writeBase64ToFile(filePath, base64) {
34395
34395
  const buf = Buffer.from(base64, "base64");
34396
- await fs$1.writeFile(filePath, buf);
34396
+ await fs$2.writeFile(filePath, buf);
34397
34397
  return {
34398
34398
  path: filePath,
34399
34399
  bytes: buf.length
@@ -37438,9 +37438,9 @@ function loadExternalCatalogEntries(options) {
37438
37438
  const entries = [];
37439
37439
  for (const rawPath of paths) {
37440
37440
  const resolved = resolveUserPath(rawPath);
37441
- if (!syncFs.existsSync(resolved)) continue;
37441
+ if (!fs$1.existsSync(resolved)) continue;
37442
37442
  try {
37443
- const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
37443
+ const payload = JSON.parse(fs$1.readFileSync(resolved, "utf-8"));
37444
37444
  entries.push(...parseCatalogEntries(payload));
37445
37445
  } catch {}
37446
37446
  }
@@ -41154,7 +41154,7 @@ function listExistingAgentIdsFromDisk() {
41154
41154
  const root = resolveStateDir();
41155
41155
  const agentsDir = path.join(root, "agents");
41156
41156
  try {
41157
- return syncFs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
41157
+ return fs$1.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
41158
41158
  } catch {
41159
41159
  return [];
41160
41160
  }
@@ -47079,7 +47079,7 @@ async function runAgentTurnWithFallback(params) {
47079
47079
  if (corruptedSessionId) {
47080
47080
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
47081
47081
  try {
47082
- syncFs.unlinkSync(transcriptPath);
47082
+ fs$1.unlinkSync(transcriptPath);
47083
47083
  } catch {}
47084
47084
  }
47085
47085
  delete params.activeSessionStore[sessionKey];
@@ -47880,7 +47880,7 @@ async function readSessionLogSnapshot(params) {
47880
47880
  if (!logPath) return {};
47881
47881
  const snapshot = {};
47882
47882
  if (params.includeByteSize) try {
47883
- const stat = await syncFs.promises.stat(logPath);
47883
+ const stat = await fs$1.promises.stat(logPath);
47884
47884
  const size = Math.floor(stat.size);
47885
47885
  snapshot.byteSize = Number.isFinite(size) && size >= 0 ? size : void 0;
47886
47886
  } catch {
@@ -47894,7 +47894,7 @@ async function readSessionLogSnapshot(params) {
47894
47894
  return snapshot;
47895
47895
  }
47896
47896
  async function readLastNonzeroUsageFromSessionLog(logPath) {
47897
- const handle = await syncFs.promises.open(logPath, "r");
47897
+ const handle = await fs$1.promises.open(logPath, "r");
47898
47898
  try {
47899
47899
  let position = (await handle.stat()).size;
47900
47900
  let leadingPartial = "";
@@ -48565,9 +48565,9 @@ async function readPostCompactionContext(workspaceDir) {
48565
48565
  if (!opened.ok) return null;
48566
48566
  const sections = extractSections((() => {
48567
48567
  try {
48568
- return syncFs.readFileSync(opened.fd, "utf-8");
48568
+ return fs$1.readFileSync(opened.fd, "utf-8");
48569
48569
  } finally {
48570
- syncFs.closeSync(opened.fd);
48570
+ fs$1.closeSync(opened.fd);
48571
48571
  }
48572
48572
  })(), ["Session Startup", "Red Lines"]);
48573
48573
  if (sections.length === 0) return null;
@@ -48782,7 +48782,7 @@ async function runReplyAgent(params) {
48782
48782
  if (resolved) transcriptCandidates.add(resolved);
48783
48783
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
48784
48784
  for (const candidate of transcriptCandidates) try {
48785
- syncFs.unlinkSync(candidate);
48785
+ fs$1.unlinkSync(candidate);
48786
48786
  } catch {}
48787
48787
  }
48788
48788
  return true;
@@ -49773,7 +49773,7 @@ async function deliverSessionMaintenanceWarning(params) {
49773
49773
  return;
49774
49774
  }
49775
49775
  try {
49776
- const { deliverOutboundPayloads } = await import("./deliver-zrYSWfQ5.js").then((n) => n.n);
49776
+ const { deliverOutboundPayloads } = await import("./deliver-DlLNT2iR.js").then((n) => n.n);
49777
49777
  const outboundSession = buildOutboundSessionContext({
49778
49778
  cfg: params.cfg,
49779
49779
  sessionKey: params.sessionKey
@@ -49911,7 +49911,7 @@ function forkSessionFromParent(params) {
49911
49911
  agentId: params.agentId,
49912
49912
  sessionsDir: params.sessionsDir
49913
49913
  });
49914
- if (!parentSessionFile || !syncFs.existsSync(parentSessionFile)) return null;
49914
+ if (!parentSessionFile || !fs$1.existsSync(parentSessionFile)) return null;
49915
49915
  try {
49916
49916
  const manager = SessionManager.open(parentSessionFile);
49917
49917
  const leafId = manager.getLeafId();
@@ -49935,7 +49935,7 @@ function forkSessionFromParent(params) {
49935
49935
  cwd: manager.getCwd(),
49936
49936
  parentSession: parentSessionFile
49937
49937
  };
49938
- syncFs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
49938
+ fs$1.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
49939
49939
  return {
49940
49940
  sessionId,
49941
49941
  sessionFile
@@ -54715,7 +54715,7 @@ async function describeStickerImage(params) {
54715
54715
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
54716
54716
  try {
54717
54717
  const buffer = await fs.readFile(imagePath);
54718
- const { describeImageWithModel } = await import("./image-DnxYCkHO.js").then((n) => n.n);
54718
+ const { describeImageWithModel } = await import("./image-BWlmyhr-.js").then((n) => n.n);
54719
54719
  return (await describeImageWithModel({
54720
54720
  buffer,
54721
54721
  fileName: "sticker.webp",
@@ -56469,7 +56469,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
56469
56469
  const needsPreflightTranscription = !params.isDirectMessage && params.shouldRequireMention && hasAudioAttachment && !hasTypedText && params.mentionRegexes.length > 0;
56470
56470
  let transcript;
56471
56471
  if (needsPreflightTranscription) try {
56472
- const { transcribeFirstAudio } = await import("./audio-preflight-C2pZmbnM.js");
56472
+ const { transcribeFirstAudio } = await import("./audio-preflight-C5Crv38h.js");
56473
56473
  const audioUrls = audioAttachments.map((att) => att.url).filter((url) => typeof url === "string" && url.length > 0);
56474
56474
  if (audioUrls.length > 0) transcript = await transcribeFirstAudio({
56475
56475
  ctx: {
@@ -57924,7 +57924,7 @@ function identityHasValues(identity) {
57924
57924
  }
57925
57925
  function loadIdentityFromFile(identityPath) {
57926
57926
  try {
57927
- const parsed = parseIdentityMarkdown(syncFs.readFileSync(identityPath, "utf-8"));
57927
+ const parsed = parseIdentityMarkdown(fs$1.readFileSync(identityPath, "utf-8"));
57928
57928
  if (!identityHasValues(parsed)) return null;
57929
57929
  return parsed;
57930
57930
  } catch {
@@ -57948,7 +57948,7 @@ function resolveAvatarSource(cfg, agentId) {
57948
57948
  }
57949
57949
  function resolveExistingPath(value) {
57950
57950
  try {
57951
- return syncFs.realpathSync(value);
57951
+ return fs$1.realpathSync(value);
57952
57952
  } catch {
57953
57953
  return path.resolve(value);
57954
57954
  }
@@ -57966,7 +57966,7 @@ function resolveLocalAvatarPath(params) {
57966
57966
  reason: "unsupported_extension"
57967
57967
  };
57968
57968
  try {
57969
- const stat = syncFs.statSync(realPath);
57969
+ const stat = fs$1.statSync(realPath);
57970
57970
  if (!stat.isFile()) return {
57971
57971
  ok: false,
57972
57972
  reason: "missing"
@@ -61011,27 +61011,27 @@ function createOutboundSendDepsFromCliSource(deps) {
61011
61011
  function createDefaultDeps() {
61012
61012
  return {
61013
61013
  sendMessageWhatsApp: async (...args) => {
61014
- const { sendMessageWhatsApp } = await import("./web-C5gLi1bN.js");
61014
+ const { sendMessageWhatsApp } = await import("./web-BPI4HIht.js");
61015
61015
  return await sendMessageWhatsApp(...args);
61016
61016
  },
61017
61017
  sendMessageTelegram: async (...args) => {
61018
- const { sendMessageTelegram } = await import("./send-D2zYssqK.js").then((n) => n.l);
61018
+ const { sendMessageTelegram } = await import("./send-Buidj_8L.js").then((n) => n.l);
61019
61019
  return await sendMessageTelegram(...args);
61020
61020
  },
61021
61021
  sendMessageDiscord: async (...args) => {
61022
- const { sendMessageDiscord } = await import("./send-DcL81tZr.js").then((n) => n.t);
61022
+ const { sendMessageDiscord } = await import("./send-BQETStDl.js").then((n) => n.t);
61023
61023
  return await sendMessageDiscord(...args);
61024
61024
  },
61025
61025
  sendMessageSlack: async (...args) => {
61026
- const { sendMessageSlack } = await import("./send-CcQZM0c7.js").then((n) => n.n);
61026
+ const { sendMessageSlack } = await import("./send-B6QQ8XfC.js").then((n) => n.n);
61027
61027
  return await sendMessageSlack(...args);
61028
61028
  },
61029
61029
  sendMessageSignal: async (...args) => {
61030
- const { sendMessageSignal } = await import("./send-BpyiQEov.js").then((n) => n.i);
61030
+ const { sendMessageSignal } = await import("./send-DC_e_Iev.js").then((n) => n.i);
61031
61031
  return await sendMessageSignal(...args);
61032
61032
  },
61033
61033
  sendMessageIMessage: async (...args) => {
61034
- const { sendMessageIMessage } = await import("./send--Gq-Uh-l.js").then((n) => n.n);
61034
+ const { sendMessageIMessage } = await import("./send-BMzVXosN.js").then((n) => n.n);
61035
61035
  return await sendMessageIMessage(...args);
61036
61036
  }
61037
61037
  };
@@ -64459,7 +64459,7 @@ function createDiscordGatewayPlugin(params) {
64459
64459
  return super.registerClient(client);
64460
64460
  }
64461
64461
  createWebSocket(url) {
64462
- return new WebSocket$1(url, { agent: wsAgent });
64462
+ return new WebSocket(url, { agent: wsAgent });
64463
64463
  }
64464
64464
  }
64465
64465
  return new ProxyGatewayPlugin();
@@ -66837,7 +66837,7 @@ async function monitorIMessageProvider(opts = {}) {
66837
66837
  function readFileIfExists(filePath) {
66838
66838
  if (!filePath) return;
66839
66839
  try {
66840
- return syncFs.readFileSync(filePath, "utf-8").trim();
66840
+ return fs$1.readFileSync(filePath, "utf-8").trim();
66841
66841
  } catch {
66842
66842
  return;
66843
66843
  }
@@ -67451,7 +67451,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
67451
67451
  prefix: "line-media",
67452
67452
  extension: getExtensionForContentType(contentType)
67453
67453
  });
67454
- await syncFs.promises.writeFile(filePath, buffer);
67454
+ await fs$1.promises.writeFile(filePath, buffer);
67455
67455
  logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
67456
67456
  return {
67457
67457
  path: filePath,
@@ -73124,7 +73124,7 @@ function readSlackExternalArgMenuToken(raw) {
73124
73124
  }
73125
73125
  let commandsRegistry;
73126
73126
  async function getCommandsRegistry() {
73127
- if (!commandsRegistry) commandsRegistry = await import("./commands-registry-CTkboeeC.js").then((n) => n.n);
73127
+ if (!commandsRegistry) commandsRegistry = await import("./commands-registry-NyRDVN7s.js").then((n) => n.n);
73128
73128
  return commandsRegistry;
73129
73129
  }
73130
73130
  function encodeSlackCommandArgValue(parts) {
@@ -73454,14 +73454,14 @@ async function registerSlackMonitorSlashCommands(params) {
73454
73454
  const channelName = channelInfo?.name;
73455
73455
  const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
73456
73456
  const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
73457
- import("./resolve-route-C5hVstLo.js").then((n) => n.r),
73457
+ import("./resolve-route-BNElrVxR.js").then((n) => n.r),
73458
73458
  import("./inbound-context-CTd41MBO.js").then((n) => n.n),
73459
73459
  Promise.resolve().then(() => provider_dispatcher_exports)
73460
73460
  ]);
73461
73461
  const [{ resolveConversationLabel }, { createReplyPrefixOptions }, { recordInboundSessionMetaSafe }] = await Promise.all([
73462
73462
  import("./conversation-label-Dyk7sOSM.js").then((n) => n.t),
73463
- import("./reply-prefix-DK1i6bCJ.js").then((n) => n.n),
73464
- import("./session-meta-BbCwXniv.js").then((n) => n.n)
73463
+ import("./reply-prefix-9mzt89Cf.js").then((n) => n.n),
73464
+ import("./session-meta-DAMj6ZRX.js").then((n) => n.n)
73465
73465
  ]);
73466
73466
  const route = resolveAgentRoute({
73467
73467
  cfg,
@@ -73526,9 +73526,9 @@ async function registerSlackMonitorSlashCommands(params) {
73526
73526
  });
73527
73527
  const deliverSlashPayloads = async (replies) => {
73528
73528
  const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
73529
- import("./replies-D6zARd6r.js").then((n) => n.r),
73530
- import("./chunk-2ZxftpDd.js").then((n) => n.s),
73531
- import("./markdown-tables-BHONoo6S.js").then((n) => n.t)
73529
+ import("./replies-B6I1tT5t.js").then((n) => n.r),
73530
+ import("./chunk-Dfkbh8wX.js").then((n) => n.s),
73531
+ import("./markdown-tables-pfs_NCNh.js").then((n) => n.t)
73532
73532
  ]);
73533
73533
  await deliverSlackSlashReplies({
73534
73534
  replies,
@@ -73581,7 +73581,7 @@ async function registerSlackMonitorSlashCommands(params) {
73581
73581
  let nativeCommands = [];
73582
73582
  if (nativeEnabled) {
73583
73583
  reg = await getCommandsRegistry();
73584
- const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-Cea3CZFF.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
73584
+ const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-KesfMtZ9.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
73585
73585
  nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
73586
73586
  skillCommands,
73587
73587
  provider: "slack"
@@ -74167,7 +74167,7 @@ async function auditTelegramGroupMembership(params) {
74167
74167
  groups: [],
74168
74168
  elapsedMs: Date.now() - started
74169
74169
  };
74170
- const fetcher = params.proxyUrl ? (await import("./proxy-DfJJLvch.js").then((n) => n.t)).makeProxyFetch(params.proxyUrl) : fetch;
74170
+ const fetcher = params.proxyUrl ? (await import("./proxy-jINniQBi.js").then((n) => n.t)).makeProxyFetch(params.proxyUrl) : fetch;
74171
74171
  const { fetchWithTimeout } = await import("./fetch-timeout-CYFFedEH.js").then((n) => n.r);
74172
74172
  const base = `${TELEGRAM_API_BASE$1}/bot${token}`;
74173
74173
  const groups = [];
@@ -76490,7 +76490,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
76490
76490
  const disableAudioPreflight = firstDefined$1(topicConfig?.disableAudioPreflight, groupConfig?.disableAudioPreflight) === true;
76491
76491
  let preflightTranscript;
76492
76492
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0 && !disableAudioPreflight) try {
76493
- const { transcribeFirstAudio } = await import("./audio-preflight-C2pZmbnM.js");
76493
+ const { transcribeFirstAudio } = await import("./audio-preflight-C5Crv38h.js");
76494
76494
  preflightTranscript = await transcribeFirstAudio({
76495
76495
  ctx: {
76496
76496
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -79188,7 +79188,7 @@ function createWhatsAppLoginTool() {
79188
79188
  force: Type.Optional(Type.Boolean())
79189
79189
  }),
79190
79190
  execute: async (_toolCallId, args) => {
79191
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-DUJfhbUe.js");
79191
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-iS1jPDpP.js");
79192
79192
  if ((args?.action ?? "start") === "wait") {
79193
79193
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
79194
79194
  return {
@@ -79263,23 +79263,23 @@ let webLoginQrPromise = null;
79263
79263
  let webChannelPromise = null;
79264
79264
  let whatsappActionsPromise = null;
79265
79265
  function loadWebOutbound() {
79266
- webOutboundPromise ??= import("./outbound-9rXkgGZM.js").then((n) => n.t);
79266
+ webOutboundPromise ??= import("./outbound-N9_vLIGT.js").then((n) => n.t);
79267
79267
  return webOutboundPromise;
79268
79268
  }
79269
79269
  function loadWebLogin() {
79270
- webLoginPromise ??= import("./login-CgEHUE7h.js").then((n) => n.n);
79270
+ webLoginPromise ??= import("./login-Cm2zDfEU.js").then((n) => n.n);
79271
79271
  return webLoginPromise;
79272
79272
  }
79273
79273
  function loadWebLoginQr() {
79274
- webLoginQrPromise ??= import("./login-qr-DUJfhbUe.js");
79274
+ webLoginQrPromise ??= import("./login-qr-iS1jPDpP.js");
79275
79275
  return webLoginQrPromise;
79276
79276
  }
79277
79277
  function loadWebChannel() {
79278
- webChannelPromise ??= import("./web-C5gLi1bN.js");
79278
+ webChannelPromise ??= import("./web-BPI4HIht.js");
79279
79279
  return webChannelPromise;
79280
79280
  }
79281
79281
  function loadWhatsAppActions() {
79282
- whatsappActionsPromise ??= import("./whatsapp-actions-Be9uvUUL.js");
79282
+ whatsappActionsPromise ??= import("./whatsapp-actions-Bf61u88d.js");
79283
79283
  return whatsappActionsPromise;
79284
79284
  }
79285
79285
  function createRuntimeWhatsApp() {
@@ -79729,7 +79729,7 @@ async function getMemorySearchManager(params) {
79729
79729
  if (cached) return { manager: cached };
79730
79730
  }
79731
79731
  try {
79732
- const { QmdMemoryManager } = await import("./qmd-manager-n4jauq3A.js");
79732
+ const { QmdMemoryManager } = await import("./qmd-manager-DXbV8CPG.js");
79733
79733
  const primary = await QmdMemoryManager.create({
79734
79734
  cfg: params.cfg,
79735
79735
  agentId: params.agentId,
@@ -79741,7 +79741,7 @@ async function getMemorySearchManager(params) {
79741
79741
  const wrapper = new FallbackMemoryManager({
79742
79742
  primary,
79743
79743
  fallbackFactory: async () => {
79744
- const { MemoryIndexManager } = await import("./manager-tozHviEd.js").then((n) => n.t);
79744
+ const { MemoryIndexManager } = await import("./manager-BX3KtavU.js").then((n) => n.t);
79745
79745
  return await MemoryIndexManager.get(params);
79746
79746
  }
79747
79747
  }, () => {
@@ -79756,7 +79756,7 @@ async function getMemorySearchManager(params) {
79756
79756
  }
79757
79757
  }
79758
79758
  try {
79759
- const { MemoryIndexManager } = await import("./manager-tozHviEd.js").then((n) => n.t);
79759
+ const { MemoryIndexManager } = await import("./manager-BX3KtavU.js").then((n) => n.t);
79760
79760
  return { manager: await MemoryIndexManager.get(params) };
79761
79761
  } catch (err) {
79762
79762
  return {
@@ -80283,7 +80283,7 @@ async function withMemoryManagerForAgent(params) {
80283
80283
  }
80284
80284
  async function checkReadableFile(pathname) {
80285
80285
  try {
80286
- await fs.access(pathname, syncFs.constants.R_OK);
80286
+ await fs.access(pathname, fs$1.constants.R_OK);
80287
80287
  return { exists: true };
80288
80288
  } catch (err) {
80289
80289
  const code = err.code;
@@ -80342,7 +80342,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
80342
80342
  }
80343
80343
  let dirReadable = null;
80344
80344
  try {
80345
- await fs.access(memoryDir, syncFs.constants.R_OK);
80345
+ await fs.access(memoryDir, fs$1.constants.R_OK);
80346
80346
  dirReadable = true;
80347
80347
  } catch (err) {
80348
80348
  const code = err.code;
@@ -80788,7 +80788,7 @@ const resolvePluginSdkAliasFile = (params) => {
80788
80788
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
80789
80789
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
80790
80790
  const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
80791
- for (const candidate of orderedCandidates) if (syncFs.existsSync(candidate)) return candidate;
80791
+ for (const candidate of orderedCandidates) if (fs$1.existsSync(candidate)) return candidate;
80792
80792
  const parent = path.dirname(cursor);
80793
80793
  if (parent === cursor) break;
80794
80794
  cursor = parent;
@@ -81125,7 +81125,7 @@ function loadOpenClawPlugins(options = {}) {
81125
81125
  continue;
81126
81126
  }
81127
81127
  const safeSource = opened.path;
81128
- syncFs.closeSync(opened.fd);
81128
+ fs$1.closeSync(opened.fd);
81129
81129
  let mod = null;
81130
81130
  try {
81131
81131
  mod = getJiti()(safeSource);
@@ -81243,7 +81243,7 @@ function loadOpenClawPlugins(options = {}) {
81243
81243
  }
81244
81244
  function safeRealpathOrResolve(value) {
81245
81245
  try {
81246
- return syncFs.realpathSync(value);
81246
+ return fs$1.realpathSync(value);
81247
81247
  } catch {
81248
81248
  return path.resolve(value);
81249
81249
  }
@@ -81682,9 +81682,9 @@ function resolvePatchFileOps(options) {
81682
81682
  });
81683
81683
  assertBoundaryRead(opened, filePath);
81684
81684
  try {
81685
- return syncFs.readFileSync(opened.fd, "utf8");
81685
+ return fs$1.readFileSync(opened.fd, "utf8");
81686
81686
  } finally {
81687
- syncFs.closeSync(opened.fd);
81687
+ fs$1.closeSync(opened.fd);
81688
81688
  }
81689
81689
  },
81690
81690
  writeFile: async (filePath, content) => {
@@ -81980,7 +81980,7 @@ async function recordLoopOutcome(args) {
81980
81980
  if (!args.ctx?.sessionKey) return;
81981
81981
  try {
81982
81982
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-DBPrVBk3.js").then((n) => n.n);
81983
- const { recordToolCallOutcome } = await import("./tool-loop-detection-CLoYKYIq.js");
81983
+ const { recordToolCallOutcome } = await import("./tool-loop-detection-C4V990MS.js");
81984
81984
  recordToolCallOutcome(getDiagnosticSessionState({
81985
81985
  sessionKey: args.ctx.sessionKey,
81986
81986
  sessionId: args.ctx?.agentId
@@ -82001,8 +82001,8 @@ async function runBeforeToolCallHook(args) {
82001
82001
  const params = args.params;
82002
82002
  if (args.ctx?.sessionKey) {
82003
82003
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-DBPrVBk3.js").then((n) => n.n);
82004
- const { logToolLoopAction } = await import("./diagnostic-BO1GQJJf.js").then((n) => n.n);
82005
- const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-CLoYKYIq.js");
82004
+ const { logToolLoopAction } = await import("./diagnostic-DpOlXoSr.js").then((n) => n.n);
82005
+ const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-C4V990MS.js");
82006
82006
  const sessionState = getDiagnosticSessionState({
82007
82007
  sessionKey: args.ctx.sessionKey,
82008
82008
  sessionId: args.ctx?.agentId
@@ -84487,9 +84487,9 @@ async function readWorkspaceContextForSummary() {
84487
84487
  if (!opened.ok) return "";
84488
84488
  const sections = extractSections((() => {
84489
84489
  try {
84490
- return syncFs.readFileSync(opened.fd, "utf-8");
84490
+ return fs$1.readFileSync(opened.fd, "utf-8");
84491
84491
  } finally {
84492
- syncFs.closeSync(opened.fd);
84492
+ fs$1.closeSync(opened.fd);
84493
84493
  }
84494
84494
  })(), ["Session Startup", "Red Lines"]);
84495
84495
  if (sections.length === 0) return "";
@@ -85836,7 +85836,7 @@ async function compactEmbeddedPiSessionDirect(params) {
85836
85836
  if (!apiKeyInfo.apiKey) {
85837
85837
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
85838
85838
  } else if (model.provider === "github-copilot") {
85839
- const { resolveCopilotApiToken } = await import("./github-copilot-token-DLGN-8YS.js").then((n) => n.n);
85839
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-CPjAmbfr.js").then((n) => n.n);
85840
85840
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
85841
85841
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
85842
85842
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
@@ -87086,7 +87086,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
87086
87086
  * Throws if the connection is not open.
87087
87087
  */
87088
87088
  send(event) {
87089
- if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error(`OpenAIWebSocketManager: cannot send — connection is not open (readyState=${this.ws?.readyState ?? "no socket"})`);
87089
+ if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error(`OpenAIWebSocketManager: cannot send — connection is not open (readyState=${this.ws?.readyState ?? "no socket"})`);
87090
87090
  this.ws.send(JSON.stringify(event));
87091
87091
  }
87092
87092
  /**
@@ -87103,7 +87103,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
87103
87103
  * Returns true if the WebSocket is currently open and ready to send.
87104
87104
  */
87105
87105
  isConnected() {
87106
- return this.ws !== null && this.ws.readyState === WebSocket$1.OPEN;
87106
+ return this.ws !== null && this.ws.readyState === WebSocket.OPEN;
87107
87107
  }
87108
87108
  /**
87109
87109
  * Permanently closes the WebSocket connection and disables auto-reconnect.
@@ -87113,7 +87113,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
87113
87113
  this._cancelRetryTimer();
87114
87114
  if (this.ws) {
87115
87115
  this.ws.removeAllListeners();
87116
- if (this.ws.readyState === WebSocket$1.OPEN || this.ws.readyState === WebSocket$1.CONNECTING) this.ws.close(1e3, "Client closed");
87116
+ if (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING) this.ws.close(1e3, "Client closed");
87117
87117
  this.ws = null;
87118
87118
  }
87119
87119
  }
@@ -87123,7 +87123,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
87123
87123
  reject(/* @__PURE__ */ new Error("OpenAIWebSocketManager: apiKey is required before connecting."));
87124
87124
  return;
87125
87125
  }
87126
- const socket = new WebSocket$1(this.wsUrl, { headers: {
87126
+ const socket = new WebSocket(this.wsUrl, { headers: {
87127
87127
  Authorization: `Bearer ${this.apiKey}`,
87128
87128
  "OpenAI-Beta": "responses-websocket=v1"
87129
87129
  } });
@@ -88089,11 +88089,11 @@ function appendRawStream(payload) {
88089
88089
  if (!rawStreamReady) {
88090
88090
  rawStreamReady = true;
88091
88091
  try {
88092
- syncFs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
88092
+ fs$1.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
88093
88093
  } catch {}
88094
88094
  }
88095
88095
  try {
88096
- syncFs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
88096
+ fs$1.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
88097
88097
  } catch {}
88098
88098
  }
88099
88099
 
@@ -91603,7 +91603,7 @@ async function runEmbeddedPiAgent(params) {
91603
91603
  await copilotTokenState.refreshInFlight;
91604
91604
  return;
91605
91605
  }
91606
- const { resolveCopilotApiToken } = await import("./github-copilot-token-DLGN-8YS.js").then((n) => n.n);
91606
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-CPjAmbfr.js").then((n) => n.n);
91607
91607
  copilotTokenState.refreshInFlight = (async () => {
91608
91608
  const githubToken = copilotTokenState.githubToken.trim();
91609
91609
  if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
@@ -91695,7 +91695,7 @@ async function runEmbeddedPiAgent(params) {
91695
91695
  return;
91696
91696
  }
91697
91697
  if (model.provider === "github-copilot") {
91698
- const { resolveCopilotApiToken } = await import("./github-copilot-token-DLGN-8YS.js").then((n) => n.n);
91698
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-CPjAmbfr.js").then((n) => n.n);
91699
91699
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
91700
91700
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
91701
91701
  if (copilotTokenState) {