@bitseek/claw 1.1.0-beta.2 → 1.2.0

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 (84) hide show
  1. package/dist/{accounts-CX1yOBOk.js → accounts-BTexwKe8.js} +1 -1
  2. package/dist/{accounts-DZqwa5NK.js → accounts-CFz9Jc5d.js} +1 -1
  3. package/dist/{accounts-CaiECgq3.js → accounts-ubG6irXZ.js} +16 -16
  4. package/dist/{active-listener-neKWQsOO.js → active-listener-Hd9sOu9T.js} +1 -1
  5. package/dist/{agent-scope-CTbRzU1C.js → agent-scope-C6hps0r3.js} +4 -4
  6. package/dist/{api-key-rotation-BTSy5kZN.js → api-key-rotation-WzOC5dTW.js} +2 -2
  7. package/dist/{audio-preflight-DZWb0ozj.js → audio-preflight-BWOdDA2n.js} +39 -39
  8. package/dist/{audio-transcription-runner-2dp0SxL3.js → audio-transcription-runner-DaoqvWoi.js} +11 -11
  9. package/dist/{bindings-Daa-Etag.js → bindings-CsIiIjqN.js} +2 -2
  10. package/dist/build-info.json +3 -3
  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-Btz1t5_1.js → channel-activity-D81g48kD.js} +3 -3
  17. package/dist/{chrome-DX1blHAJ.js → chrome-CjTE-vWv.js} +18 -18
  18. package/dist/{chunk-DEkdXze6.js → chunk-DtYb6TYl.js} +1 -1
  19. package/dist/{commands-registry-BQkQRhEo.js → commands-registry-NIsv9Z4R.js} +5 -5
  20. package/dist/{deliver-C82Egs0W.js → deliver-xY3h9X6N.js} +22 -22
  21. package/dist/{diagnostic-DpOlXoSr.js → diagnostic-BO1GQJJf.js} +2 -2
  22. package/dist/{dock-DWqb4ufG.js → dock-Cr9V9V1V.js} +6 -6
  23. package/dist/{env-Bn6pmvjK.js → env-DNMZEG57.js} +2 -2
  24. package/dist/{errors-azBrKJmF.js → errors-DEkWxItM.js} +1 -1
  25. package/dist/{fetch-B82CeaHJ.js → fetch--iXu7oa7.js} +5 -5
  26. package/dist/{fetch-guard-CCLWHwu7.js → fetch-guard-CNvY0vzQ.js} +2 -2
  27. package/dist/{frontmatter-5U1LYLH9.js → frontmatter-DIRc-IR1.js} +2 -2
  28. package/dist/{fs-safe-BDR6eQAw.js → fs-safe-D8x_nIIA.js} +4 -4
  29. package/dist/{github-copilot-token-CPjAmbfr.js → github-copilot-token-DLGN-8YS.js} +7 -7
  30. package/dist/{image-BQ1JgwZu.js → image-DCyaYY2d.js} +6 -6
  31. package/dist/{image-ops-jvmQoiyw.js → image-ops-DCpyia_K.js} +1 -1
  32. package/dist/{internal-hooks-oLQ2m8YT.js → internal-hooks-yQe6H47q.js} +1 -1
  33. package/dist/{ir-BODD8g-I.js → ir-BZUjdf-6.js} +6 -6
  34. package/dist/llm-slug-generator.js +65 -65
  35. package/dist/{logger-DelEB7MK.js → logger-BlH5MJiV.js} +1 -1
  36. package/dist/{login-Cm2zDfEU.js → login-CgEHUE7h.js} +6 -6
  37. package/dist/{login-qr-iS1jPDpP.js → login-qr-DUJfhbUe.js} +13 -13
  38. package/dist/{manager-DdzkWOvc.js → manager-BNuB9clC.js} +15 -15
  39. package/dist/{markdown-tables-pfs_NCNh.js → markdown-tables-BHONoo6S.js} +1 -1
  40. package/dist/{message-channel-POuk6EOq.js → message-channel-Dl8dSs0T.js} +1 -1
  41. package/dist/{model-selection-DfZMxaX3.js → model-selection-D_Si2Ict.js} +44 -44
  42. package/dist/{outbound-4q4mbU-Z.js → outbound-DOVV_R6m.js} +7 -7
  43. package/dist/{outbound-attachment-CBCp1oVQ.js → outbound-attachment-C7sJLSnv.js} +2 -2
  44. package/dist/{path-alias-guards-DfQIjfhB.js → path-alias-guards-CKjKIhQ3.js} +1 -1
  45. package/dist/{paths-BZO1jkK2.js → paths-Cpu0XgUj.js} +3 -3
  46. package/dist/{paths-DKuX7-1L.js → paths-aGRLvQx9.js} +5 -5
  47. package/dist/{pi-embedded-DiUmkZyz.js → pi-embedded-DE3hb87F.js} +178 -178
  48. package/dist/{pi-embedded-helpers-CuwhW4u9.js → pi-embedded-helpers-CMTVhLjq.js} +29 -29
  49. package/dist/{pi-model-discovery-COjkql-U.js → pi-model-discovery-DCIw1y1c.js} +7 -7
  50. package/dist/{plugins-D63QYxW6.js → plugins-CJoaoIHc.js} +11 -11
  51. package/dist/{proxy-jINniQBi.js → proxy-DfJJLvch.js} +1 -1
  52. package/dist/{proxy-env-vYAjKL5q.js → proxy-env-BnDt8j9F.js} +1 -1
  53. package/dist/{proxy-fetch-AvkSvetA.js → proxy-fetch-xlbVQYN_.js} +1 -1
  54. package/dist/{pw-ai-BLNiRUPI.js → pw-ai-DGwA7iCM.js} +17 -17
  55. package/dist/{qmd-manager-BBKfRzj-.js → qmd-manager-CeN3N992.js} +11 -11
  56. package/dist/{query-expansion-2BrixCA2.js → query-expansion-CGnW4Mk_.js} +5 -5
  57. package/dist/{redact-uUggP88O.js → redact-ScShueoF.js} +1 -1
  58. package/dist/{registry-C2GEGa2t.js → registry-CJCkqTms.js} +3 -3
  59. package/dist/{replies-yAf6dFeT.js → replies-BFYGUEKu.js} +3 -3
  60. package/dist/{reply-prefix-9mzt89Cf.js → reply-prefix-DK1i6bCJ.js} +1 -1
  61. package/dist/{resolve-route-BNElrVxR.js → resolve-route-C5hVstLo.js} +4 -4
  62. package/dist/{retry-Ayb7e4XG.js → retry-DTeP7C3h.js} +1 -1
  63. package/dist/{send-Bclgg0Ur.js → send-B4pSMBHk.js} +8 -8
  64. package/dist/{send-Bjaa69Cy.js → send-BqKSZyIb.js} +27 -27
  65. package/dist/{send-DYY51FOR.js → send-CN0f1Yst.js} +6 -6
  66. package/dist/{send-Cp0yQi_p.js → send-V3fEVmLq.js} +10 -10
  67. package/dist/{send-DQ7hIAIK.js → send-XAO1mk64.js} +7 -7
  68. package/dist/{session-meta-CyQWVUk4.js → session-meta-Cqv55kSk.js} +2 -2
  69. package/dist/{session-TVb8hgJP.js → session-xKPVUYQP.js} +9 -9
  70. package/dist/{sessions-3jroJwu7.js → sessions-CA_BydGA.js} +31 -31
  71. package/dist/{skill-commands-CSr9_48V.js → skill-commands-CZFmIM-s.js} +9 -9
  72. package/dist/{skills-B82IjVxn.js → skills-DMmr25nW.js} +22 -22
  73. package/dist/{store-DhC72KqW.js → store-C8KgeMt2.js} +2 -2
  74. package/dist/{subsystem-CAatx5oo.js → subsystem-BRjuJbbM.js} +14 -14
  75. package/dist/{tables-Bfh_TnCf.js → tables-BKnPZssn.js} +1 -1
  76. package/dist/{target-errors-CGYXYvSZ.js → target-errors-B9Jzop3d.js} +2 -2
  77. package/dist/{tokens-BvzZdrVJ.js → tokens-B9EDT4jv.js} +1 -1
  78. package/dist/{tool-images-CqsWnc1k.js → tool-images-ffdfBx0b.js} +2 -2
  79. package/dist/{tool-loop-detection-C4V990MS.js → tool-loop-detection-CLoYKYIq.js} +3 -3
  80. package/dist/{utils-Bo1RFF0l.js → utils-BFZnl-5N.js} +6 -6
  81. package/dist/{web-DsAoa63g.js → web-B2_c07KN.js} +69 -69
  82. package/dist/{whatsapp-actions-DXjy9m41.js → whatsapp-actions-CHt12z-f.js} +28 -28
  83. package/dist/{workspace-CswOYN9T.js → workspace-D6mrCnXi.js} +21 -21
  84. 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-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";
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";
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-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";
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";
12
12
  import { t as parseBooleanValue$1 } from "./boolean-mcn6kL0s.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";
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";
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-DWqb4ufG.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-Cr9V9V1V.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-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";
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";
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-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-Bclgg0Ur.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-Cp0yQi_p.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-B4pSMBHk.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-V3fEVmLq.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-C82Egs0W.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";
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-xY3h9X6N.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";
29
29
  import { r as getDiagnosticSessionState } from "./diagnostic-session-state-DBPrVBk3.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-Bjaa69Cy.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 { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-COjkql-U.js";
34
- 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-POuk6EOq.js";
35
- 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-CuwhW4u9.js";
36
- 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-DX1blHAJ.js";
37
- 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-B82IjVxn.js";
38
- import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-DfQIjfhB.js";
39
- import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-uUggP88O.js";
40
- import { i as formatUncaughtError, o as readErrorName, r as formatErrorMessage } from "./errors-azBrKJmF.js";
41
- import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-BDR6eQAw.js";
42
- import { a as isBlockedHostnameOrIp, c as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-vYAjKL5q.js";
43
- import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-DhC72KqW.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-BqKSZyIb.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 { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-DCIw1y1c.js";
34
+ 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-Dl8dSs0T.js";
35
+ 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-CMTVhLjq.js";
36
+ 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-CjTE-vWv.js";
37
+ 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-DMmr25nW.js";
38
+ import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-CKjKIhQ3.js";
39
+ import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-ScShueoF.js";
40
+ import { i as formatUncaughtError, o as readErrorName, r as formatErrorMessage } from "./errors-DEkWxItM.js";
41
+ import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-D8x_nIIA.js";
42
+ import { a as isBlockedHostnameOrIp, c as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-BnDt8j9F.js";
43
+ import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-C8KgeMt2.js";
44
44
  import { n as readJsonFile, r as writeJsonAtomic, t as createAsyncLock } from "./json-files-JTS4WE3P.js";
45
- 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-3jroJwu7.js";
45
+ 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-CA_BydGA.js";
46
46
  import { n as resolveConversationLabel } from "./conversation-label-CEQUZyFY.js";
47
- import { t as resolveIMessageAccount } from "./accounts-DZqwa5NK.js";
48
- import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-BZO1jkK2.js";
47
+ import { t as resolveIMessageAccount } from "./accounts-CFz9Jc5d.js";
48
+ import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-Cpu0XgUj.js";
49
49
  import { n as onSessionTranscriptUpdate, t as emitSessionTranscriptUpdate } from "./transcript-events-Cso7-m1w.js";
50
- import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-CqsWnc1k.js";
50
+ import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-ffdfBx0b.js";
51
51
  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-FnAYAFD8.js";
52
- 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-BQ1JgwZu.js";
53
- 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, y as loadModelCatalog } from "./audio-transcription-runner-2dp0SxL3.js";
54
- import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-B82CeaHJ.js";
52
+ 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-DCyaYY2d.js";
53
+ 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, y as loadModelCatalog } from "./audio-transcription-runner-DaoqvWoi.js";
54
+ import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch--iXu7oa7.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-CCLWHwu7.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-DEkdXze6.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-BODD8g-I.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-CGYXYvSZ.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-BQkQRhEo.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-CSr9_48V.js";
56
+ import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-CNvY0vzQ.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-DtYb6TYl.js";
60
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-BHONoo6S.js";
61
+ import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-BZUjdf-6.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-B9Jzop3d.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-NIsv9Z4R.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-CZFmIM-s.js";
65
65
  import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-D4jdbLFJ.js";
66
66
  import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-CIXnD4u2.js";
67
- import { n as retryAsync } from "./retry-Ayb7e4XG.js";
67
+ import { n as retryAsync } from "./retry-DTeP7C3h.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-Btz1t5_1.js";
69
+ import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-D81g48kD.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-Bfh_TnCf.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-DYY51FOR.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-DQ7hIAIK.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-yAf6dFeT.js";
78
- import { t as recordInboundSessionMetaSafe } from "./session-meta-CyQWVUk4.js";
79
- import { n as resolveMemorySearchConfig } from "./manager-DdzkWOvc.js";
80
- import { f as listMemoryFiles, p as normalizeExtraMemoryPaths } from "./query-expansion-2BrixCA2.js";
72
+ import { t as convertMarkdownTables } from "./tables-BKnPZssn.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-CN0f1Yst.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-XAO1mk64.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-BFYGUEKu.js";
78
+ import { t as recordInboundSessionMetaSafe } from "./session-meta-Cqv55kSk.js";
79
+ import { n as resolveMemorySearchConfig } from "./manager-BNuB9clC.js";
80
+ import { f as listMemoryFiles, p as normalizeExtraMemoryPaths } from "./query-expansion-CGnW4Mk_.js";
81
81
  import { createRequire } from "node:module";
82
- import * as fs$2 from "node:fs/promises";
82
+ import * as fs$1 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 fs$1, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
87
+ import syncFs, { 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";
@@ -3302,7 +3302,7 @@ async function resolveOpenClawDocsPath(params) {
3302
3302
  const workspaceDir = params.workspaceDir?.trim();
3303
3303
  if (workspaceDir) {
3304
3304
  const workspaceDocs = path.join(workspaceDir, "docs");
3305
- if (fs$1.existsSync(workspaceDocs)) return workspaceDocs;
3305
+ if (syncFs.existsSync(workspaceDocs)) return workspaceDocs;
3306
3306
  }
3307
3307
  const packageRoot = await resolveOpenClawPackageRoot({
3308
3308
  cwd: params.cwd,
@@ -3311,7 +3311,7 @@ async function resolveOpenClawDocsPath(params) {
3311
3311
  });
3312
3312
  if (!packageRoot) return null;
3313
3313
  const packageDocs = path.join(packageRoot, "docs");
3314
- return fs$1.existsSync(packageDocs) ? packageDocs : null;
3314
+ return syncFs.existsSync(packageDocs) ? packageDocs : null;
3315
3315
  }
3316
3316
 
3317
3317
  //#endregion
@@ -6362,7 +6362,7 @@ function resolveDefaultIdentityPath() {
6362
6362
  return path.join(resolveStateDir(), "identity", "device.json");
6363
6363
  }
6364
6364
  function ensureDir$2(filePath) {
6365
- fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
6365
+ syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
6366
6366
  }
6367
6367
  const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
6368
6368
  function base64UrlEncode(buf) {
@@ -6398,8 +6398,8 @@ function generateIdentity() {
6398
6398
  }
6399
6399
  function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
6400
6400
  try {
6401
- if (fs$1.existsSync(filePath)) {
6402
- const raw = fs$1.readFileSync(filePath, "utf8");
6401
+ if (syncFs.existsSync(filePath)) {
6402
+ const raw = syncFs.readFileSync(filePath, "utf8");
6403
6403
  const parsed = JSON.parse(raw);
6404
6404
  if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
6405
6405
  const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
@@ -6408,9 +6408,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
6408
6408
  ...parsed,
6409
6409
  deviceId: derivedId
6410
6410
  };
6411
- fs$1.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
6411
+ syncFs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
6412
6412
  try {
6413
- fs$1.chmodSync(filePath, 384);
6413
+ syncFs.chmodSync(filePath, 384);
6414
6414
  } catch {}
6415
6415
  return {
6416
6416
  deviceId: derivedId,
@@ -6435,9 +6435,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
6435
6435
  privateKeyPem: identity.privateKeyPem,
6436
6436
  createdAtMs: Date.now()
6437
6437
  };
6438
- fs$1.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
6438
+ syncFs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
6439
6439
  try {
6440
- fs$1.chmodSync(filePath, 384);
6440
+ syncFs.chmodSync(filePath, 384);
6441
6441
  } catch {}
6442
6442
  return identity;
6443
6443
  }
@@ -6629,8 +6629,8 @@ function resolveDeviceAuthPath(env = process.env) {
6629
6629
  }
6630
6630
  function readStore(filePath) {
6631
6631
  try {
6632
- if (!fs$1.existsSync(filePath)) return null;
6633
- const raw = fs$1.readFileSync(filePath, "utf8");
6632
+ if (!syncFs.existsSync(filePath)) return null;
6633
+ const raw = syncFs.readFileSync(filePath, "utf8");
6634
6634
  const parsed = JSON.parse(raw);
6635
6635
  if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
6636
6636
  if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
@@ -6640,10 +6640,10 @@ function readStore(filePath) {
6640
6640
  }
6641
6641
  }
6642
6642
  function writeStore(filePath, store) {
6643
- fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
6644
- fs$1.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
6643
+ syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
6644
+ syncFs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
6645
6645
  try {
6646
- fs$1.chmodSync(filePath, 384);
6646
+ syncFs.chmodSync(filePath, 384);
6647
6647
  } catch {}
6648
6648
  }
6649
6649
  function loadDeviceAuthToken(params) {
@@ -9683,7 +9683,7 @@ async function routeReply(params) {
9683
9683
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
9684
9684
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
9685
9685
  try {
9686
- const { deliverOutboundPayloads } = await import("./deliver-C82Egs0W.js").then((n) => n.n);
9686
+ const { deliverOutboundPayloads } = await import("./deliver-xY3h9X6N.js").then((n) => n.n);
9687
9687
  const outboundSession = buildOutboundSessionContext({
9688
9688
  cfg,
9689
9689
  agentId: resolvedAgentId,
@@ -10327,7 +10327,7 @@ function normalizeSessionKey(value) {
10327
10327
  }
10328
10328
  function readSessionStore(storePath) {
10329
10329
  try {
10330
- const raw = fs$1.readFileSync(storePath, "utf-8");
10330
+ const raw = syncFs.readFileSync(storePath, "utf-8");
10331
10331
  const parsed = JSON5.parse(raw);
10332
10332
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
10333
10333
  } catch {}
@@ -14241,7 +14241,7 @@ async function sendTranscriptEcho(params) {
14241
14241
  }
14242
14242
  const text = formatEchoTranscript(transcript, params.format ?? DEFAULT_ECHO_TRANSCRIPT_FORMAT);
14243
14243
  try {
14244
- const { deliverOutboundPayloads } = await import("./deliver-C82Egs0W.js").then((n) => n.n);
14244
+ const { deliverOutboundPayloads } = await import("./deliver-xY3h9X6N.js").then((n) => n.n);
14245
14245
  await deliverOutboundPayloads({
14246
14246
  cfg,
14247
14247
  channel: normalizedChannel,
@@ -17856,7 +17856,7 @@ function mergeLegacyAgent(current, legacy) {
17856
17856
  }
17857
17857
  function ensureDir$1(filePath) {
17858
17858
  const dir = path.dirname(filePath);
17859
- fs$1.mkdirSync(dir, { recursive: true });
17859
+ syncFs.mkdirSync(dir, { recursive: true });
17860
17860
  }
17861
17861
  function coerceAllowlistEntries(allowlist) {
17862
17862
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -17926,11 +17926,11 @@ function generateToken() {
17926
17926
  function loadExecApprovals() {
17927
17927
  const filePath = resolveExecApprovalsPath();
17928
17928
  try {
17929
- if (!fs$1.existsSync(filePath)) return normalizeExecApprovals({
17929
+ if (!syncFs.existsSync(filePath)) return normalizeExecApprovals({
17930
17930
  version: 1,
17931
17931
  agents: {}
17932
17932
  });
17933
- const raw = fs$1.readFileSync(filePath, "utf8");
17933
+ const raw = syncFs.readFileSync(filePath, "utf8");
17934
17934
  const parsed = JSON.parse(raw);
17935
17935
  if (parsed?.version !== 1) return normalizeExecApprovals({
17936
17936
  version: 1,
@@ -17947,9 +17947,9 @@ function loadExecApprovals() {
17947
17947
  function saveExecApprovals(file) {
17948
17948
  const filePath = resolveExecApprovalsPath();
17949
17949
  ensureDir$1(filePath);
17950
- fs$1.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
17950
+ syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
17951
17951
  try {
17952
- fs$1.chmodSync(filePath, 384);
17952
+ syncFs.chmodSync(filePath, 384);
17953
17953
  } catch {}
17954
17954
  }
17955
17955
  function ensureExecApprovals() {
@@ -18446,18 +18446,18 @@ function drainSystemEventEntries(sessionKey) {
18446
18446
  function resolvePowerShellPath() {
18447
18447
  const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
18448
18448
  const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
18449
- if (fs$1.existsSync(pwsh7)) return pwsh7;
18449
+ if (syncFs.existsSync(pwsh7)) return pwsh7;
18450
18450
  const programW6432 = process.env.ProgramW6432;
18451
18451
  if (programW6432 && programW6432 !== programFiles) {
18452
18452
  const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
18453
- if (fs$1.existsSync(pwsh7Alt)) return pwsh7Alt;
18453
+ if (syncFs.existsSync(pwsh7Alt)) return pwsh7Alt;
18454
18454
  }
18455
18455
  const pwshInPath = resolveShellFromPath("pwsh");
18456
18456
  if (pwshInPath) return pwshInPath;
18457
18457
  const systemRoot = process.env.SystemRoot || process.env.WINDIR;
18458
18458
  if (systemRoot) {
18459
18459
  const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
18460
- if (fs$1.existsSync(candidate)) return candidate;
18460
+ if (syncFs.existsSync(candidate)) return candidate;
18461
18461
  }
18462
18462
  return "powershell.exe";
18463
18463
  }
@@ -18495,7 +18495,7 @@ function resolveShellFromPath(name) {
18495
18495
  for (const entry of entries) {
18496
18496
  const candidate = path.join(entry, name);
18497
18497
  try {
18498
- fs$1.accessSync(candidate, fs$1.constants.X_OK);
18498
+ syncFs.accessSync(candidate, syncFs.constants.X_OK);
18499
18499
  return candidate;
18500
18500
  } catch {}
18501
18501
  }
@@ -21939,7 +21939,7 @@ function ensureContextWindowCacheLoaded() {
21939
21939
  await ensureOpenClawModelsJson(cfg);
21940
21940
  } catch {}
21941
21941
  try {
21942
- const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-COjkql-U.js").then((n) => n.r);
21942
+ const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-DCIw1y1c.js").then((n) => n.r);
21943
21943
  const agentDir = resolveOpenClawAgentDir();
21944
21944
  const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
21945
21945
  applyDiscoveredContextWindows({
@@ -22095,7 +22095,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
22095
22095
  function hasGitMarker(repoRoot) {
22096
22096
  const gitPath = path.join(repoRoot, ".git");
22097
22097
  try {
22098
- const stat = fs$1.statSync(gitPath);
22098
+ const stat = syncFs.statSync(gitPath);
22099
22099
  return stat.isDirectory() || stat.isFile();
22100
22100
  } catch {
22101
22101
  return false;
@@ -22107,10 +22107,10 @@ function findGitRoot(startDir, opts = {}) {
22107
22107
  function resolveGitDirFromMarker(repoRoot) {
22108
22108
  const gitPath = path.join(repoRoot, ".git");
22109
22109
  try {
22110
- const stat = fs$1.statSync(gitPath);
22110
+ const stat = syncFs.statSync(gitPath);
22111
22111
  if (stat.isDirectory()) return gitPath;
22112
22112
  if (!stat.isFile()) return null;
22113
- const match = fs$1.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22113
+ const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22114
22114
  if (!match?.[1]) return null;
22115
22115
  return path.resolve(repoRoot, match[1].trim());
22116
22116
  } catch {
@@ -22177,7 +22177,7 @@ const resolveCommitHash = (options = {}) => {
22177
22177
  cachedCommit = null;
22178
22178
  return cachedCommit;
22179
22179
  }
22180
- const head = fs$1.readFileSync(headPath, "utf-8").trim();
22180
+ const head = syncFs.readFileSync(headPath, "utf-8").trim();
22181
22181
  if (!head) {
22182
22182
  cachedCommit = null;
22183
22183
  return cachedCommit;
@@ -22185,7 +22185,7 @@ const resolveCommitHash = (options = {}) => {
22185
22185
  if (head.startsWith("ref:")) {
22186
22186
  const ref = head.replace(/^ref:\s*/i, "").trim();
22187
22187
  const refPath = path.resolve(path.dirname(headPath), ref);
22188
- cachedCommit = formatCommit(fs$1.readFileSync(refPath, "utf-8").trim());
22188
+ cachedCommit = formatCommit(syncFs.readFileSync(refPath, "utf-8").trim());
22189
22189
  return cachedCommit;
22190
22190
  }
22191
22191
  cachedCommit = formatCommit(head);
@@ -22445,17 +22445,17 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
22445
22445
  } catch {
22446
22446
  return;
22447
22447
  }
22448
- if (!fs$1.existsSync(logPath)) return;
22448
+ if (!syncFs.existsSync(logPath)) return;
22449
22449
  try {
22450
22450
  const TAIL_BYTES = 8192;
22451
- const stat = fs$1.statSync(logPath);
22451
+ const stat = syncFs.statSync(logPath);
22452
22452
  const offset = Math.max(0, stat.size - TAIL_BYTES);
22453
22453
  const buf = Buffer.alloc(Math.min(TAIL_BYTES, stat.size));
22454
- const fd = fs$1.openSync(logPath, "r");
22454
+ const fd = syncFs.openSync(logPath, "r");
22455
22455
  try {
22456
- fs$1.readSync(fd, buf, 0, buf.length, offset);
22456
+ syncFs.readSync(fd, buf, 0, buf.length, offset);
22457
22457
  } finally {
22458
- fs$1.closeSync(fd);
22458
+ syncFs.closeSync(fd);
22459
22459
  }
22460
22460
  const tail = buf.toString("utf-8");
22461
22461
  const lines = (offset > 0 ? tail.slice(tail.indexOf("\n") + 1) : tail).split(/\n+/);
@@ -23810,7 +23810,7 @@ function resolveRepoRoot(params) {
23810
23810
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
23811
23811
  if (configured) try {
23812
23812
  const resolved = path.resolve(configured);
23813
- if (fs$1.statSync(resolved).isDirectory()) return resolved;
23813
+ if (syncFs.statSync(resolved).isDirectory()) return resolved;
23814
23814
  } catch {}
23815
23815
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
23816
23816
  const seen = /* @__PURE__ */ new Set();
@@ -24578,7 +24578,7 @@ async function buildContextReply(params) {
24578
24578
  //#region src/auto-reply/reply/commands-export-session.ts
24579
24579
  const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
24580
24580
  function loadTemplate(fileName) {
24581
- return fs$1.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
24581
+ return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
24582
24582
  }
24583
24583
  function generateHtml(sessionData) {
24584
24584
  const template = loadTemplate("template.html");
@@ -24652,7 +24652,7 @@ async function buildExportSessionReply(params) {
24652
24652
  } catch (err) {
24653
24653
  return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
24654
24654
  }
24655
- if (!fs$1.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
24655
+ if (!syncFs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
24656
24656
  const sessionManager = SessionManager.open(sessionFile);
24657
24657
  const entries = sessionManager.getEntries();
24658
24658
  const header = sessionManager.getHeader();
@@ -24673,8 +24673,8 @@ async function buildExportSessionReply(params) {
24673
24673
  const defaultFileName = `openclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
24674
24674
  const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
24675
24675
  const outputDir = path.dirname(outputPath);
24676
- if (!fs$1.existsSync(outputDir)) fs$1.mkdirSync(outputDir, { recursive: true });
24677
- fs$1.writeFileSync(outputPath, html, "utf-8");
24676
+ if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
24677
+ syncFs.writeFileSync(outputPath, html, "utf-8");
24678
24678
  const relativePath = path.relative(params.workspaceDir, outputPath);
24679
24679
  return { text: [
24680
24680
  "✅ Session exported!",
@@ -24849,8 +24849,8 @@ function resolveZaiApiKey() {
24849
24849
  }
24850
24850
  try {
24851
24851
  const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
24852
- if (!fs$1.existsSync(authPath)) return;
24853
- const data = JSON.parse(fs$1.readFileSync(authPath, "utf-8"));
24852
+ if (!syncFs.existsSync(authPath)) return;
24853
+ const data = JSON.parse(syncFs.readFileSync(authPath, "utf-8"));
24854
24854
  return data["z-ai"]?.access || data.zai?.access;
24855
24855
  } catch {
24856
24856
  return;
@@ -26669,7 +26669,7 @@ function shouldPersistAnyBindingState() {
26669
26669
  }
26670
26670
  function shouldPersistBindingMutations() {
26671
26671
  if (shouldPersistAnyBindingState()) return true;
26672
- return fs$1.existsSync(resolveThreadBindingsPath());
26672
+ return syncFs.existsSync(resolveThreadBindingsPath());
26673
26673
  }
26674
26674
  function saveBindingsToDisk(params = {}) {
26675
26675
  if (!params.force && !shouldPersistAnyBindingState()) return;
@@ -27933,7 +27933,7 @@ const applyCostTotal = (totals, costTotal) => {
27933
27933
  totals.totalCost += costTotal;
27934
27934
  };
27935
27935
  async function* readJsonlRecords(filePath) {
27936
- const fileStream = fs$1.createReadStream(filePath, { encoding: "utf-8" });
27936
+ const fileStream = syncFs.createReadStream(filePath, { encoding: "utf-8" });
27937
27937
  const rl = readline.createInterface({
27938
27938
  input: fileStream,
27939
27939
  crlfDelay: Infinity
@@ -28005,10 +28005,10 @@ async function loadCostUsageSummary(params) {
28005
28005
  const dailyMap = /* @__PURE__ */ new Map();
28006
28006
  const totals = emptyTotals();
28007
28007
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
28008
- const entries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
28008
+ const entries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
28009
28009
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
28010
28010
  const filePath = path.join(sessionsDir, entry.name);
28011
- const stats = await fs$1.promises.stat(filePath).catch(() => null);
28011
+ const stats = await syncFs.promises.stat(filePath).catch(() => null);
28012
28012
  if (!stats) return null;
28013
28013
  if (stats.mtimeMs < sinceTime) return null;
28014
28014
  return filePath;
@@ -28041,7 +28041,7 @@ async function loadCostUsageSummary(params) {
28041
28041
  }
28042
28042
  async function loadSessionCostSummary(params) {
28043
28043
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
28044
- if (!sessionFile || !fs$1.existsSync(sessionFile)) return null;
28044
+ if (!sessionFile || !syncFs.existsSync(sessionFile)) return null;
28045
28045
  const totals = emptyTotals();
28046
28046
  let firstActivity;
28047
28047
  let lastActivity;
@@ -30537,7 +30537,7 @@ async function createModelSelectionState(params) {
30537
30537
  }
30538
30538
  }
30539
30539
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
30540
- const { ensureAuthProfileStore } = await import("./model-selection-DfZMxaX3.js").then((n) => n.N);
30540
+ const { ensureAuthProfileStore } = await import("./model-selection-D_Si2Ict.js").then((n) => n.N);
30541
30541
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
30542
30542
  const providerKey = normalizeProviderId(provider);
30543
30543
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -34198,7 +34198,7 @@ function asBoolean(value) {
34198
34198
  }
34199
34199
  function resolveTempPathParts(opts) {
34200
34200
  const tmpDir = opts.tmpDir ?? resolvePreferredOpenClawTmpDir();
34201
- if (!opts.tmpDir) fs$1.mkdirSync(tmpDir, {
34201
+ if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
34202
34202
  recursive: true,
34203
34203
  mode: 448
34204
34204
  });
@@ -34284,7 +34284,7 @@ async function writeUrlToFile(filePath, url, opts) {
34284
34284
  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}`);
34285
34285
  const body = res.body;
34286
34286
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
34287
- const fileHandle = await fs$2.open(filePath, "w");
34287
+ const fileHandle = await fs$1.open(filePath, "w");
34288
34288
  let thrown;
34289
34289
  try {
34290
34290
  const reader = body.getReader();
@@ -34302,7 +34302,7 @@ async function writeUrlToFile(filePath, url, opts) {
34302
34302
  await fileHandle.close();
34303
34303
  }
34304
34304
  if (thrown) {
34305
- await fs$2.unlink(filePath).catch(() => {});
34305
+ await fs$1.unlink(filePath).catch(() => {});
34306
34306
  throw thrown;
34307
34307
  }
34308
34308
  } finally {
@@ -34315,7 +34315,7 @@ async function writeUrlToFile(filePath, url, opts) {
34315
34315
  }
34316
34316
  async function writeBase64ToFile(filePath, base64) {
34317
34317
  const buf = Buffer.from(base64, "base64");
34318
- await fs$2.writeFile(filePath, buf);
34318
+ await fs$1.writeFile(filePath, buf);
34319
34319
  return {
34320
34320
  path: filePath,
34321
34321
  bytes: buf.length
@@ -37360,9 +37360,9 @@ function loadExternalCatalogEntries(options) {
37360
37360
  const entries = [];
37361
37361
  for (const rawPath of paths) {
37362
37362
  const resolved = resolveUserPath(rawPath);
37363
- if (!fs$1.existsSync(resolved)) continue;
37363
+ if (!syncFs.existsSync(resolved)) continue;
37364
37364
  try {
37365
- const payload = JSON.parse(fs$1.readFileSync(resolved, "utf-8"));
37365
+ const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
37366
37366
  entries.push(...parseCatalogEntries(payload));
37367
37367
  } catch {}
37368
37368
  }
@@ -41076,7 +41076,7 @@ function listExistingAgentIdsFromDisk() {
41076
41076
  const root = resolveStateDir();
41077
41077
  const agentsDir = path.join(root, "agents");
41078
41078
  try {
41079
- return fs$1.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
41079
+ return syncFs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
41080
41080
  } catch {
41081
41081
  return [];
41082
41082
  }
@@ -47001,7 +47001,7 @@ async function runAgentTurnWithFallback(params) {
47001
47001
  if (corruptedSessionId) {
47002
47002
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
47003
47003
  try {
47004
- fs$1.unlinkSync(transcriptPath);
47004
+ syncFs.unlinkSync(transcriptPath);
47005
47005
  } catch {}
47006
47006
  }
47007
47007
  delete params.activeSessionStore[sessionKey];
@@ -47802,7 +47802,7 @@ async function readSessionLogSnapshot(params) {
47802
47802
  if (!logPath) return {};
47803
47803
  const snapshot = {};
47804
47804
  if (params.includeByteSize) try {
47805
- const stat = await fs$1.promises.stat(logPath);
47805
+ const stat = await syncFs.promises.stat(logPath);
47806
47806
  const size = Math.floor(stat.size);
47807
47807
  snapshot.byteSize = Number.isFinite(size) && size >= 0 ? size : void 0;
47808
47808
  } catch {
@@ -47816,7 +47816,7 @@ async function readSessionLogSnapshot(params) {
47816
47816
  return snapshot;
47817
47817
  }
47818
47818
  async function readLastNonzeroUsageFromSessionLog(logPath) {
47819
- const handle = await fs$1.promises.open(logPath, "r");
47819
+ const handle = await syncFs.promises.open(logPath, "r");
47820
47820
  try {
47821
47821
  let position = (await handle.stat()).size;
47822
47822
  let leadingPartial = "";
@@ -48487,9 +48487,9 @@ async function readPostCompactionContext(workspaceDir) {
48487
48487
  if (!opened.ok) return null;
48488
48488
  const sections = extractSections((() => {
48489
48489
  try {
48490
- return fs$1.readFileSync(opened.fd, "utf-8");
48490
+ return syncFs.readFileSync(opened.fd, "utf-8");
48491
48491
  } finally {
48492
- fs$1.closeSync(opened.fd);
48492
+ syncFs.closeSync(opened.fd);
48493
48493
  }
48494
48494
  })(), ["Session Startup", "Red Lines"]);
48495
48495
  if (sections.length === 0) return null;
@@ -48704,7 +48704,7 @@ async function runReplyAgent(params) {
48704
48704
  if (resolved) transcriptCandidates.add(resolved);
48705
48705
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
48706
48706
  for (const candidate of transcriptCandidates) try {
48707
- fs$1.unlinkSync(candidate);
48707
+ syncFs.unlinkSync(candidate);
48708
48708
  } catch {}
48709
48709
  }
48710
48710
  return true;
@@ -49695,7 +49695,7 @@ async function deliverSessionMaintenanceWarning(params) {
49695
49695
  return;
49696
49696
  }
49697
49697
  try {
49698
- const { deliverOutboundPayloads } = await import("./deliver-C82Egs0W.js").then((n) => n.n);
49698
+ const { deliverOutboundPayloads } = await import("./deliver-xY3h9X6N.js").then((n) => n.n);
49699
49699
  const outboundSession = buildOutboundSessionContext({
49700
49700
  cfg: params.cfg,
49701
49701
  sessionKey: params.sessionKey
@@ -49833,7 +49833,7 @@ function forkSessionFromParent(params) {
49833
49833
  agentId: params.agentId,
49834
49834
  sessionsDir: params.sessionsDir
49835
49835
  });
49836
- if (!parentSessionFile || !fs$1.existsSync(parentSessionFile)) return null;
49836
+ if (!parentSessionFile || !syncFs.existsSync(parentSessionFile)) return null;
49837
49837
  try {
49838
49838
  const manager = SessionManager.open(parentSessionFile);
49839
49839
  const leafId = manager.getLeafId();
@@ -49857,7 +49857,7 @@ function forkSessionFromParent(params) {
49857
49857
  cwd: manager.getCwd(),
49858
49858
  parentSession: parentSessionFile
49859
49859
  };
49860
- fs$1.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
49860
+ syncFs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
49861
49861
  return {
49862
49862
  sessionId,
49863
49863
  sessionFile
@@ -54637,7 +54637,7 @@ async function describeStickerImage(params) {
54637
54637
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
54638
54638
  try {
54639
54639
  const buffer = await fs.readFile(imagePath);
54640
- const { describeImageWithModel } = await import("./image-BQ1JgwZu.js").then((n) => n.n);
54640
+ const { describeImageWithModel } = await import("./image-DCyaYY2d.js").then((n) => n.n);
54641
54641
  return (await describeImageWithModel({
54642
54642
  buffer,
54643
54643
  fileName: "sticker.webp",
@@ -56391,7 +56391,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
56391
56391
  const needsPreflightTranscription = !params.isDirectMessage && params.shouldRequireMention && hasAudioAttachment && !hasTypedText && params.mentionRegexes.length > 0;
56392
56392
  let transcript;
56393
56393
  if (needsPreflightTranscription) try {
56394
- const { transcribeFirstAudio } = await import("./audio-preflight-DZWb0ozj.js");
56394
+ const { transcribeFirstAudio } = await import("./audio-preflight-BWOdDA2n.js");
56395
56395
  const audioUrls = audioAttachments.map((att) => att.url).filter((url) => typeof url === "string" && url.length > 0);
56396
56396
  if (audioUrls.length > 0) transcript = await transcribeFirstAudio({
56397
56397
  ctx: {
@@ -57846,7 +57846,7 @@ function identityHasValues(identity) {
57846
57846
  }
57847
57847
  function loadIdentityFromFile(identityPath) {
57848
57848
  try {
57849
- const parsed = parseIdentityMarkdown(fs$1.readFileSync(identityPath, "utf-8"));
57849
+ const parsed = parseIdentityMarkdown(syncFs.readFileSync(identityPath, "utf-8"));
57850
57850
  if (!identityHasValues(parsed)) return null;
57851
57851
  return parsed;
57852
57852
  } catch {
@@ -57870,7 +57870,7 @@ function resolveAvatarSource(cfg, agentId) {
57870
57870
  }
57871
57871
  function resolveExistingPath(value) {
57872
57872
  try {
57873
- return fs$1.realpathSync(value);
57873
+ return syncFs.realpathSync(value);
57874
57874
  } catch {
57875
57875
  return path.resolve(value);
57876
57876
  }
@@ -57888,7 +57888,7 @@ function resolveLocalAvatarPath(params) {
57888
57888
  reason: "unsupported_extension"
57889
57889
  };
57890
57890
  try {
57891
- const stat = fs$1.statSync(realPath);
57891
+ const stat = syncFs.statSync(realPath);
57892
57892
  if (!stat.isFile()) return {
57893
57893
  ok: false,
57894
57894
  reason: "missing"
@@ -60933,27 +60933,27 @@ function createOutboundSendDepsFromCliSource(deps) {
60933
60933
  function createDefaultDeps() {
60934
60934
  return {
60935
60935
  sendMessageWhatsApp: async (...args) => {
60936
- const { sendMessageWhatsApp } = await import("./web-DsAoa63g.js");
60936
+ const { sendMessageWhatsApp } = await import("./web-B2_c07KN.js");
60937
60937
  return await sendMessageWhatsApp(...args);
60938
60938
  },
60939
60939
  sendMessageTelegram: async (...args) => {
60940
- const { sendMessageTelegram } = await import("./send-Bjaa69Cy.js").then((n) => n.l);
60940
+ const { sendMessageTelegram } = await import("./send-BqKSZyIb.js").then((n) => n.l);
60941
60941
  return await sendMessageTelegram(...args);
60942
60942
  },
60943
60943
  sendMessageDiscord: async (...args) => {
60944
- const { sendMessageDiscord } = await import("./send-Cp0yQi_p.js").then((n) => n.t);
60944
+ const { sendMessageDiscord } = await import("./send-V3fEVmLq.js").then((n) => n.t);
60945
60945
  return await sendMessageDiscord(...args);
60946
60946
  },
60947
60947
  sendMessageSlack: async (...args) => {
60948
- const { sendMessageSlack } = await import("./send-Bclgg0Ur.js").then((n) => n.n);
60948
+ const { sendMessageSlack } = await import("./send-B4pSMBHk.js").then((n) => n.n);
60949
60949
  return await sendMessageSlack(...args);
60950
60950
  },
60951
60951
  sendMessageSignal: async (...args) => {
60952
- const { sendMessageSignal } = await import("./send-DYY51FOR.js").then((n) => n.i);
60952
+ const { sendMessageSignal } = await import("./send-CN0f1Yst.js").then((n) => n.i);
60953
60953
  return await sendMessageSignal(...args);
60954
60954
  },
60955
60955
  sendMessageIMessage: async (...args) => {
60956
- const { sendMessageIMessage } = await import("./send-DQ7hIAIK.js").then((n) => n.n);
60956
+ const { sendMessageIMessage } = await import("./send-XAO1mk64.js").then((n) => n.n);
60957
60957
  return await sendMessageIMessage(...args);
60958
60958
  }
60959
60959
  };
@@ -66759,7 +66759,7 @@ async function monitorIMessageProvider(opts = {}) {
66759
66759
  function readFileIfExists(filePath) {
66760
66760
  if (!filePath) return;
66761
66761
  try {
66762
- return fs$1.readFileSync(filePath, "utf-8").trim();
66762
+ return syncFs.readFileSync(filePath, "utf-8").trim();
66763
66763
  } catch {
66764
66764
  return;
66765
66765
  }
@@ -67373,7 +67373,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
67373
67373
  prefix: "line-media",
67374
67374
  extension: getExtensionForContentType(contentType)
67375
67375
  });
67376
- await fs$1.promises.writeFile(filePath, buffer);
67376
+ await syncFs.promises.writeFile(filePath, buffer);
67377
67377
  logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
67378
67378
  return {
67379
67379
  path: filePath,
@@ -73046,7 +73046,7 @@ function readSlackExternalArgMenuToken(raw) {
73046
73046
  }
73047
73047
  let commandsRegistry;
73048
73048
  async function getCommandsRegistry() {
73049
- if (!commandsRegistry) commandsRegistry = await import("./commands-registry-BQkQRhEo.js").then((n) => n.n);
73049
+ if (!commandsRegistry) commandsRegistry = await import("./commands-registry-NIsv9Z4R.js").then((n) => n.n);
73050
73050
  return commandsRegistry;
73051
73051
  }
73052
73052
  function encodeSlackCommandArgValue(parts) {
@@ -73376,14 +73376,14 @@ async function registerSlackMonitorSlashCommands(params) {
73376
73376
  const channelName = channelInfo?.name;
73377
73377
  const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
73378
73378
  const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
73379
- import("./resolve-route-BNElrVxR.js").then((n) => n.r),
73379
+ import("./resolve-route-C5hVstLo.js").then((n) => n.r),
73380
73380
  import("./inbound-context-D4jdbLFJ.js").then((n) => n.n),
73381
73381
  Promise.resolve().then(() => provider_dispatcher_exports)
73382
73382
  ]);
73383
73383
  const [{ resolveConversationLabel }, { createReplyPrefixOptions }, { recordInboundSessionMetaSafe }] = await Promise.all([
73384
73384
  import("./conversation-label-CEQUZyFY.js").then((n) => n.t),
73385
- import("./reply-prefix-9mzt89Cf.js").then((n) => n.n),
73386
- import("./session-meta-CyQWVUk4.js").then((n) => n.n)
73385
+ import("./reply-prefix-DK1i6bCJ.js").then((n) => n.n),
73386
+ import("./session-meta-Cqv55kSk.js").then((n) => n.n)
73387
73387
  ]);
73388
73388
  const route = resolveAgentRoute({
73389
73389
  cfg,
@@ -73448,9 +73448,9 @@ async function registerSlackMonitorSlashCommands(params) {
73448
73448
  });
73449
73449
  const deliverSlashPayloads = async (replies) => {
73450
73450
  const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
73451
- import("./replies-yAf6dFeT.js").then((n) => n.r),
73452
- import("./chunk-DEkdXze6.js").then((n) => n.s),
73453
- import("./markdown-tables-pfs_NCNh.js").then((n) => n.t)
73451
+ import("./replies-BFYGUEKu.js").then((n) => n.r),
73452
+ import("./chunk-DtYb6TYl.js").then((n) => n.s),
73453
+ import("./markdown-tables-BHONoo6S.js").then((n) => n.t)
73454
73454
  ]);
73455
73455
  await deliverSlackSlashReplies({
73456
73456
  replies,
@@ -73503,7 +73503,7 @@ async function registerSlackMonitorSlashCommands(params) {
73503
73503
  let nativeCommands = [];
73504
73504
  if (nativeEnabled) {
73505
73505
  reg = await getCommandsRegistry();
73506
- const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-CSr9_48V.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
73506
+ const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-CZFmIM-s.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
73507
73507
  nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
73508
73508
  skillCommands,
73509
73509
  provider: "slack"
@@ -74089,7 +74089,7 @@ async function auditTelegramGroupMembership(params) {
74089
74089
  groups: [],
74090
74090
  elapsedMs: Date.now() - started
74091
74091
  };
74092
- const fetcher = params.proxyUrl ? (await import("./proxy-jINniQBi.js").then((n) => n.t)).makeProxyFetch(params.proxyUrl) : fetch;
74092
+ const fetcher = params.proxyUrl ? (await import("./proxy-DfJJLvch.js").then((n) => n.t)).makeProxyFetch(params.proxyUrl) : fetch;
74093
74093
  const { fetchWithTimeout } = await import("./fetch-timeout-CYFFedEH.js").then((n) => n.r);
74094
74094
  const base = `${TELEGRAM_API_BASE$1}/bot${token}`;
74095
74095
  const groups = [];
@@ -76412,7 +76412,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
76412
76412
  const disableAudioPreflight = firstDefined$1(topicConfig?.disableAudioPreflight, groupConfig?.disableAudioPreflight) === true;
76413
76413
  let preflightTranscript;
76414
76414
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0 && !disableAudioPreflight) try {
76415
- const { transcribeFirstAudio } = await import("./audio-preflight-DZWb0ozj.js");
76415
+ const { transcribeFirstAudio } = await import("./audio-preflight-BWOdDA2n.js");
76416
76416
  preflightTranscript = await transcribeFirstAudio({
76417
76417
  ctx: {
76418
76418
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -79110,7 +79110,7 @@ function createWhatsAppLoginTool() {
79110
79110
  force: Type.Optional(Type.Boolean())
79111
79111
  }),
79112
79112
  execute: async (_toolCallId, args) => {
79113
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-iS1jPDpP.js");
79113
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-DUJfhbUe.js");
79114
79114
  if ((args?.action ?? "start") === "wait") {
79115
79115
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
79116
79116
  return {
@@ -79185,23 +79185,23 @@ let webLoginQrPromise = null;
79185
79185
  let webChannelPromise = null;
79186
79186
  let whatsappActionsPromise = null;
79187
79187
  function loadWebOutbound() {
79188
- webOutboundPromise ??= import("./outbound-4q4mbU-Z.js").then((n) => n.t);
79188
+ webOutboundPromise ??= import("./outbound-DOVV_R6m.js").then((n) => n.t);
79189
79189
  return webOutboundPromise;
79190
79190
  }
79191
79191
  function loadWebLogin() {
79192
- webLoginPromise ??= import("./login-Cm2zDfEU.js").then((n) => n.n);
79192
+ webLoginPromise ??= import("./login-CgEHUE7h.js").then((n) => n.n);
79193
79193
  return webLoginPromise;
79194
79194
  }
79195
79195
  function loadWebLoginQr() {
79196
- webLoginQrPromise ??= import("./login-qr-iS1jPDpP.js");
79196
+ webLoginQrPromise ??= import("./login-qr-DUJfhbUe.js");
79197
79197
  return webLoginQrPromise;
79198
79198
  }
79199
79199
  function loadWebChannel() {
79200
- webChannelPromise ??= import("./web-DsAoa63g.js");
79200
+ webChannelPromise ??= import("./web-B2_c07KN.js");
79201
79201
  return webChannelPromise;
79202
79202
  }
79203
79203
  function loadWhatsAppActions() {
79204
- whatsappActionsPromise ??= import("./whatsapp-actions-DXjy9m41.js");
79204
+ whatsappActionsPromise ??= import("./whatsapp-actions-CHt12z-f.js");
79205
79205
  return whatsappActionsPromise;
79206
79206
  }
79207
79207
  function createRuntimeWhatsApp() {
@@ -79651,7 +79651,7 @@ async function getMemorySearchManager(params) {
79651
79651
  if (cached) return { manager: cached };
79652
79652
  }
79653
79653
  try {
79654
- const { QmdMemoryManager } = await import("./qmd-manager-BBKfRzj-.js");
79654
+ const { QmdMemoryManager } = await import("./qmd-manager-CeN3N992.js");
79655
79655
  const primary = await QmdMemoryManager.create({
79656
79656
  cfg: params.cfg,
79657
79657
  agentId: params.agentId,
@@ -79663,7 +79663,7 @@ async function getMemorySearchManager(params) {
79663
79663
  const wrapper = new FallbackMemoryManager({
79664
79664
  primary,
79665
79665
  fallbackFactory: async () => {
79666
- const { MemoryIndexManager } = await import("./manager-DdzkWOvc.js").then((n) => n.t);
79666
+ const { MemoryIndexManager } = await import("./manager-BNuB9clC.js").then((n) => n.t);
79667
79667
  return await MemoryIndexManager.get(params);
79668
79668
  }
79669
79669
  }, () => {
@@ -79678,7 +79678,7 @@ async function getMemorySearchManager(params) {
79678
79678
  }
79679
79679
  }
79680
79680
  try {
79681
- const { MemoryIndexManager } = await import("./manager-DdzkWOvc.js").then((n) => n.t);
79681
+ const { MemoryIndexManager } = await import("./manager-BNuB9clC.js").then((n) => n.t);
79682
79682
  return { manager: await MemoryIndexManager.get(params) };
79683
79683
  } catch (err) {
79684
79684
  return {
@@ -80205,7 +80205,7 @@ async function withMemoryManagerForAgent(params) {
80205
80205
  }
80206
80206
  async function checkReadableFile(pathname) {
80207
80207
  try {
80208
- await fs.access(pathname, fs$1.constants.R_OK);
80208
+ await fs.access(pathname, syncFs.constants.R_OK);
80209
80209
  return { exists: true };
80210
80210
  } catch (err) {
80211
80211
  const code = err.code;
@@ -80264,7 +80264,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
80264
80264
  }
80265
80265
  let dirReadable = null;
80266
80266
  try {
80267
- await fs.access(memoryDir, fs$1.constants.R_OK);
80267
+ await fs.access(memoryDir, syncFs.constants.R_OK);
80268
80268
  dirReadable = true;
80269
80269
  } catch (err) {
80270
80270
  const code = err.code;
@@ -80710,7 +80710,7 @@ const resolvePluginSdkAliasFile = (params) => {
80710
80710
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
80711
80711
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
80712
80712
  const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
80713
- for (const candidate of orderedCandidates) if (fs$1.existsSync(candidate)) return candidate;
80713
+ for (const candidate of orderedCandidates) if (syncFs.existsSync(candidate)) return candidate;
80714
80714
  const parent = path.dirname(cursor);
80715
80715
  if (parent === cursor) break;
80716
80716
  cursor = parent;
@@ -81047,7 +81047,7 @@ function loadOpenClawPlugins(options = {}) {
81047
81047
  continue;
81048
81048
  }
81049
81049
  const safeSource = opened.path;
81050
- fs$1.closeSync(opened.fd);
81050
+ syncFs.closeSync(opened.fd);
81051
81051
  let mod = null;
81052
81052
  try {
81053
81053
  mod = getJiti()(safeSource);
@@ -81165,7 +81165,7 @@ function loadOpenClawPlugins(options = {}) {
81165
81165
  }
81166
81166
  function safeRealpathOrResolve(value) {
81167
81167
  try {
81168
- return fs$1.realpathSync(value);
81168
+ return syncFs.realpathSync(value);
81169
81169
  } catch {
81170
81170
  return path.resolve(value);
81171
81171
  }
@@ -81604,9 +81604,9 @@ function resolvePatchFileOps(options) {
81604
81604
  });
81605
81605
  assertBoundaryRead(opened, filePath);
81606
81606
  try {
81607
- return fs$1.readFileSync(opened.fd, "utf8");
81607
+ return syncFs.readFileSync(opened.fd, "utf8");
81608
81608
  } finally {
81609
- fs$1.closeSync(opened.fd);
81609
+ syncFs.closeSync(opened.fd);
81610
81610
  }
81611
81611
  },
81612
81612
  writeFile: async (filePath, content) => {
@@ -81902,7 +81902,7 @@ async function recordLoopOutcome(args) {
81902
81902
  if (!args.ctx?.sessionKey) return;
81903
81903
  try {
81904
81904
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-DBPrVBk3.js").then((n) => n.n);
81905
- const { recordToolCallOutcome } = await import("./tool-loop-detection-C4V990MS.js");
81905
+ const { recordToolCallOutcome } = await import("./tool-loop-detection-CLoYKYIq.js");
81906
81906
  recordToolCallOutcome(getDiagnosticSessionState({
81907
81907
  sessionKey: args.ctx.sessionKey,
81908
81908
  sessionId: args.ctx?.agentId
@@ -81923,8 +81923,8 @@ async function runBeforeToolCallHook(args) {
81923
81923
  const params = args.params;
81924
81924
  if (args.ctx?.sessionKey) {
81925
81925
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-DBPrVBk3.js").then((n) => n.n);
81926
- const { logToolLoopAction } = await import("./diagnostic-DpOlXoSr.js").then((n) => n.n);
81927
- const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-C4V990MS.js");
81926
+ const { logToolLoopAction } = await import("./diagnostic-BO1GQJJf.js").then((n) => n.n);
81927
+ const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-CLoYKYIq.js");
81928
81928
  const sessionState = getDiagnosticSessionState({
81929
81929
  sessionKey: args.ctx.sessionKey,
81930
81930
  sessionId: args.ctx?.agentId
@@ -84399,9 +84399,9 @@ async function readWorkspaceContextForSummary() {
84399
84399
  if (!opened.ok) return "";
84400
84400
  const sections = extractSections((() => {
84401
84401
  try {
84402
- return fs$1.readFileSync(opened.fd, "utf-8");
84402
+ return syncFs.readFileSync(opened.fd, "utf-8");
84403
84403
  } finally {
84404
- fs$1.closeSync(opened.fd);
84404
+ syncFs.closeSync(opened.fd);
84405
84405
  }
84406
84406
  })(), ["Session Startup", "Red Lines"]);
84407
84407
  if (sections.length === 0) return "";
@@ -85748,7 +85748,7 @@ async function compactEmbeddedPiSessionDirect(params) {
85748
85748
  if (!apiKeyInfo.apiKey) {
85749
85749
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
85750
85750
  } else if (model.provider === "github-copilot") {
85751
- const { resolveCopilotApiToken } = await import("./github-copilot-token-CPjAmbfr.js").then((n) => n.n);
85751
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-DLGN-8YS.js").then((n) => n.n);
85752
85752
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
85753
85753
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
85754
85754
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
@@ -87973,11 +87973,11 @@ function appendRawStream(payload) {
87973
87973
  if (!rawStreamReady) {
87974
87974
  rawStreamReady = true;
87975
87975
  try {
87976
- fs$1.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
87976
+ syncFs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
87977
87977
  } catch {}
87978
87978
  }
87979
87979
  try {
87980
- fs$1.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
87980
+ syncFs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
87981
87981
  } catch {}
87982
87982
  }
87983
87983
 
@@ -91486,7 +91486,7 @@ async function runEmbeddedPiAgent(params) {
91486
91486
  await copilotTokenState.refreshInFlight;
91487
91487
  return;
91488
91488
  }
91489
- const { resolveCopilotApiToken } = await import("./github-copilot-token-CPjAmbfr.js").then((n) => n.n);
91489
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-DLGN-8YS.js").then((n) => n.n);
91490
91490
  copilotTokenState.refreshInFlight = (async () => {
91491
91491
  const githubToken = copilotTokenState.githubToken.trim();
91492
91492
  if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
@@ -91578,7 +91578,7 @@ async function runEmbeddedPiAgent(params) {
91578
91578
  return;
91579
91579
  }
91580
91580
  if (model.provider === "github-copilot") {
91581
- const { resolveCopilotApiToken } = await import("./github-copilot-token-CPjAmbfr.js").then((n) => n.n);
91581
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-DLGN-8YS.js").then((n) => n.n);
91582
91582
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
91583
91583
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
91584
91584
  if (copilotTokenState) {