@symerian/symi 2.0.2 → 2.0.3

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 (75) hide show
  1. package/dist/{accounts-tNElYrCH.js → accounts-CI6zQTJj.js} +14 -14
  2. package/dist/{accounts-qtxJ-6em.js → accounts-CJR8j_Kq.js} +1 -1
  3. package/dist/{accounts-CWktKM8a.js → accounts-ChTFYj8Q.js} +1 -1
  4. package/dist/{active-listener-C9r8ZB9m.js → active-listener-D6sXIjAg.js} +1 -1
  5. package/dist/{agent-scope-BxoUQqgM.js → agent-scope-Bw1Ed8W9.js} +3 -3
  6. package/dist/{audio-preflight-DL5FZnXU.js → audio-preflight-C1uyo4vM.js} +29 -29
  7. package/dist/{bindings-B7Ke6LJi.js → bindings-BU2hsBd9.js} +2 -2
  8. package/dist/build-info.json +3 -3
  9. package/dist/bundled/boot-md/handler.js +53 -53
  10. package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
  11. package/dist/bundled/command-logger/handler.js +1 -1
  12. package/dist/bundled/session-memory/handler.js +53 -53
  13. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  14. package/dist/{channel-activity-CsM_hJ_s.js → channel-activity-C9-gaquj.js} +1 -1
  15. package/dist/{chrome-DuXtddnV.js → chrome-CTMkDHCZ.js} +20 -20
  16. package/dist/{chunk-BW5f05BR.js → chunk-ClbN9Pqy.js} +1 -1
  17. package/dist/{command-format-BaxDnULz.js → command-format-UKHV-j0K.js} +1 -1
  18. package/dist/{commands-registry-CurvwtTw.js → commands-registry-D1zSleL6.js} +4 -4
  19. package/dist/{config-CwDeZVre.js → config-B4Di8ISR.js} +12 -12
  20. package/dist/{deliver-D7lL85xc.js → deliver-CtTfl32o.js} +20 -20
  21. package/dist/{diagnostic-CI0kRQkt.js → diagnostic-C3nsWaw3.js} +1 -1
  22. package/dist/{frontmatter-C_bv_0P8.js → frontmatter-DPlG6yha.js} +2 -2
  23. package/dist/{gemini-auth-DDojfpIT.js → gemini-auth-BBWa_f-c.js} +1 -1
  24. package/dist/{github-copilot-token-C_qUP7p5.js → github-copilot-token-DJqsJ2-r.js} +7 -7
  25. package/dist/{image-Bw9ZjAgJ.js → image-WVlJkWYO.js} +4 -4
  26. package/dist/{image-ops-CvJzsyvE.js → image-ops-S8-8dAhx.js} +1 -1
  27. package/dist/{ir-DccrnjsE.js → ir-CbFUkv_T.js} +4 -4
  28. package/dist/llm-slug-generator.js +53 -53
  29. package/dist/{local-roots-DMwIh5cS.js → local-roots-C7OCYACU.js} +5 -5
  30. package/dist/{login-B6HY_3uV.js → login-CLnFYUir.js} +7 -7
  31. package/dist/{login-qr-cno8SVBt.js → login-qr-N6iHqtov.js} +12 -12
  32. package/dist/{manager-BmXaGyON.js → manager-BSlYwG4Q.js} +13 -13
  33. package/dist/{manifest-registry-D0IQ3WuX.js → manifest-registry-CneMHk0N.js} +19 -19
  34. package/dist/{markdown-tables-iMQQZu4Q.js → markdown-tables-DSHvnTLx.js} +1 -1
  35. package/dist/{message-channel-Dz5lr5b0.js → message-channel-DbsRltF2.js} +1 -1
  36. package/dist/{model-auth-Cbvnb5vf.js → model-auth-B55liYhg.js} +9 -9
  37. package/dist/{outbound-DnUbG06K.js → outbound-Bc4wVSZG.js} +7 -7
  38. package/dist/{outbound-attachment-DjNDa3zn.js → outbound-attachment-Co2diKdP.js} +2 -2
  39. package/dist/{paths-DLyHUt31.js → paths-Cb87-LzP.js} +1 -1
  40. package/dist/{paths-Cce4PUkG.js → paths-CySxpNhH.js} +5 -5
  41. package/dist/{pi-auth-json-C7Sd8IAl.js → pi-auth-json-b4xaJSBk.js} +8 -8
  42. package/dist/{pi-embedded-helpers-CMPwkzmk.js → pi-embedded-helpers-CCMgxLVl.js} +52 -52
  43. package/dist/{pi-embedded-4Uw7vlcF.js → pi-embedded-vSF1ziRD.js} +162 -162
  44. package/dist/{plugins-DQYI3Fr-.js → plugins-C4C9637U.js} +9 -9
  45. package/dist/{pw-ai-DQ6HUvz0.js → pw-ai-DMa09vvy.js} +11 -11
  46. package/dist/{qmd-manager-QHUP-_em.js → qmd-manager-DdZh9PHs.js} +7 -7
  47. package/dist/{registry-CK4e9hn8.js → registry-DP24za6g.js} +17 -17
  48. package/dist/{replies-CdijMW_S.js → replies-CoV8InBa.js} +3 -3
  49. package/dist/{reply-prefix-XlyuyChD.js → reply-prefix-CtL0omgM.js} +1 -1
  50. package/dist/{resolve-route-CZ-1eqw0.js → resolve-route-BVikmvWO.js} +4 -4
  51. package/dist/{retry-Cly39XZB.js → retry-dGG-MbxL.js} +1 -1
  52. package/dist/{runner-Duym_W6W.js → runner-CseBozoP.js} +9 -9
  53. package/dist/{send-BtxXqho0.js → send-BK3EV4tO.js} +6 -6
  54. package/dist/{send-Iv1YQSmf.js → send-Bh5ssTkU.js} +18 -18
  55. package/dist/{send-CFMDO5ON.js → send-C00dpYCF.js} +6 -6
  56. package/dist/{send-OoNECFaf.js → send-DrUqe5-S.js} +7 -7
  57. package/dist/{send-D0qx7lbT.js → send-i0x7Ywhx.js} +10 -10
  58. package/dist/{session-wQ18mpJ_.js → session-BFFxC5wi.js} +8 -8
  59. package/dist/{skill-commands-CY3SUdWj.js → skill-commands-SDwv3aAY.js} +9 -9
  60. package/dist/{skills-BFekKL7i.js → skills-o5WVqM4V.js} +21 -21
  61. package/dist/{sqlite-DRbx2dhW.js → sqlite-6H6Zw1cs.js} +4 -4
  62. package/dist/{store-C0wvOkae.js → store-vVE6N2mH.js} +2 -2
  63. package/dist/{subsystem-Bs9YvKLa.js → subsystem-DgpxyDQ_.js} +1 -1
  64. package/dist/{tables-DuZspiBu.js → tables-BIWsCKXJ.js} +1 -1
  65. package/dist/{target-errors-Be1SwYlW.js → target-errors-DyItGyW9.js} +2 -2
  66. package/dist/{thinking-CdlENGRW.js → thinking-Ni0HF-w6.js} +5 -5
  67. package/dist/{tokens-H1H1LiSQ.js → tokens-c_SLAkVb.js} +1 -1
  68. package/dist/{tool-images-DXB7tqWi.js → tool-images-DBCfXdli.js} +2 -2
  69. package/dist/{tool-loop-detection-Cs8_HCsx.js → tool-loop-detection-Bbc9OPFR.js} +3 -3
  70. package/dist/{web-B-ZZCPiM.js → web-95LpH1_H.js} +57 -57
  71. package/dist/{whatsapp-actions-Bc0X_rVM.js → whatsapp-actions-On9mu-j8.js} +23 -23
  72. package/dist/{workspace-wAaHI8-5.js → workspace-CbvamIU6.js} +6 -6
  73. package/docs/reference/templates/AGENTS.md +12 -0
  74. package/docs/reference/templates/SYMICORE.md +2 -0
  75. package/package.json +1 -1
@@ -1,75 +1,75 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-Cce4PUkG.js";
2
+ import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CySxpNhH.js";
3
3
  import { _ as isCronSessionKey, b as resolveThreadParentSessionKey, c as normalizeMainKey, d as sanitizeAgentId, f as DEFAULT_ACCOUNT_ID, g as isAcpSessionKey, h as getSubagentDepth, l as resolveAgentIdFromSessionKey, o as classifySessionKeyShape, p as normalizeAccountId$2, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, u as resolveThreadSessionKeys, v as isSubagentSessionKey, y as parseAgentSessionKey } from "./session-key-BCzIW1Y2.js";
4
- import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-CK4e9hn8.js";
5
- import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-BxoUQqgM.js";
6
- import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-Bs9YvKLa.js";
7
- import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-wAaHI8-5.js";
8
- import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-H1H1LiSQ.js";
9
- import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, 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$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-DQYI3Fr-.js";
10
- import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-tNElYrCH.js";
4
+ import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-DP24za6g.js";
5
+ import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-Bw1Ed8W9.js";
6
+ import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-DgpxyDQ_.js";
7
+ import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-CbvamIU6.js";
8
+ import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-c_SLAkVb.js";
9
+ import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, 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$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-C4C9637U.js";
10
+ import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-CI6zQTJj.js";
11
11
  import { t as normalizeChatType } from "./chat-type-C_KiWNAH.js";
12
12
  import { t as parseBooleanValue$1 } from "./boolean-B8-BqKGQ.js";
13
- import { n as resolveCliName, r as isTruthyEnvValue, t as formatCliCommand } from "./command-format-BaxDnULz.js";
14
- import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-BtxXqho0.js";
15
- 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 allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, 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-D0qx7lbT.js";
16
- import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-D7lL85xc.js";
17
- 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-CI0kRQkt.js";
13
+ import { n as resolveCliName, r as isTruthyEnvValue, t as formatCliCommand } from "./command-format-UKHV-j0K.js";
14
+ import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-BK3EV4tO.js";
15
+ 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 allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, 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-i0x7Ywhx.js";
16
+ import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-CtTfl32o.js";
17
+ 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-C3nsWaw3.js";
18
18
  import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Bxo4UHOL.js";
19
- import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-CWktKM8a.js";
20
- import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-Iv1YQSmf.js";
21
- import { d as detectMime, f as extensionForMime, g as isGifMedia, h as isAudioFileName, i as getImageMetadata, m as imageMimeFromFormat, s as resizeToJpeg, x as mediaKindFromMime, y as MAX_IMAGE_BYTES } from "./image-ops-CvJzsyvE.js";
22
- import { A as normalizeProviderId, C as buildAllowedModelSet, D as isCliProvider, E as findNormalizedProviderValue, F as resolveSubagentSpawnModelSelection, G as DEFAULT_MODEL, H as OLLAMA_NATIVE_BASE_URL, I as resolveThinkingDefault, J as normalizeSecretInput, K as DEFAULT_PROVIDER, M as resolveConfiguredModelRef, N as resolveDefaultModelForAgent, O as modelKey, P as resolveModelRefFromString, T as buildModelAliasIndex, U as createOllamaStreamFn, W as DEFAULT_CONTEXT_TOKENS, Y as getShellPathFromLoginShell, Z as resolveShellEnvFallbackTimeoutMs, _ as ensureAuthProfileStore, a as resolveEnvApiKey, b as withFileLock, c as resolveAuthProfileOrder, d as markAuthProfileFailure, f as markAuthProfileUsed, g as markAuthProfileGood, h as listProfilesForProvider, i as resolveApiKeyForProvider, k as normalizeModelRef$2, l as getSoonestCooldownExpiry, m as dedupeProfileIds, n as getCustomProviderApiKey, o as resolveModelAuthMode, p as resolveApiKeyForProfile, q as resolveAuthProfileDisplayLabel, r as requireApiKey, t as getApiKeyForModel, u as isProfileInCooldown, v as resolveAuthStorePathForDisplay, w as buildConfiguredAllowlistKeys, y as resolveSymiAgentDir } from "./model-auth-Cbvnb5vf.js";
23
- import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-C_qUP7p5.js";
19
+ import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-ChTFYj8Q.js";
20
+ import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-Bh5ssTkU.js";
21
+ import { d as detectMime, f as extensionForMime, g as isGifMedia, h as isAudioFileName, i as getImageMetadata, m as imageMimeFromFormat, s as resizeToJpeg, x as mediaKindFromMime, y as MAX_IMAGE_BYTES } from "./image-ops-S8-8dAhx.js";
22
+ import { A as normalizeProviderId, C as buildAllowedModelSet, D as isCliProvider, E as findNormalizedProviderValue, F as resolveSubagentSpawnModelSelection, G as DEFAULT_MODEL, H as OLLAMA_NATIVE_BASE_URL, I as resolveThinkingDefault, J as normalizeSecretInput, K as DEFAULT_PROVIDER, M as resolveConfiguredModelRef, N as resolveDefaultModelForAgent, O as modelKey, P as resolveModelRefFromString, T as buildModelAliasIndex, U as createOllamaStreamFn, W as DEFAULT_CONTEXT_TOKENS, Y as getShellPathFromLoginShell, Z as resolveShellEnvFallbackTimeoutMs, _ as ensureAuthProfileStore, a as resolveEnvApiKey, b as withFileLock, c as resolveAuthProfileOrder, d as markAuthProfileFailure, f as markAuthProfileUsed, g as markAuthProfileGood, h as listProfilesForProvider, i as resolveApiKeyForProvider, k as normalizeModelRef$2, l as getSoonestCooldownExpiry, m as dedupeProfileIds, n as getCustomProviderApiKey, o as resolveModelAuthMode, p as resolveApiKeyForProfile, q as resolveAuthProfileDisplayLabel, r as requireApiKey, t as getApiKeyForModel, u as isProfileInCooldown, v as resolveAuthStorePathForDisplay, w as buildConfiguredAllowlistKeys, y as resolveSymiAgentDir } from "./model-auth-B55liYhg.js";
23
+ import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-DJqsJ2-r.js";
24
24
  import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-DaNAekda.js";
25
- 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-Dz5lr5b0.js";
26
- import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-CMPwkzmk.js";
27
- import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-CwDeZVre.js";
28
- import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-D0IQ3WuX.js";
29
- import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-DuXtddnV.js";
30
- 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-BFekKL7i.js";
25
+ 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-DbsRltF2.js";
26
+ import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-CCMgxLVl.js";
27
+ import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-B4Di8ISR.js";
28
+ import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-CneMHk0N.js";
29
+ import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-CTMkDHCZ.js";
30
+ 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-o5WVqM4V.js";
31
31
  import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-BoQgnc8X.js";
32
32
  import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-BTMDZjHT.js";
33
- import { n as getMediaDir, r as saveMediaBuffer } from "./store-C0wvOkae.js";
34
- import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-CdlENGRW.js";
33
+ import { n as getMediaDir, r as saveMediaBuffer } from "./store-vVE6N2mH.js";
34
+ import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-Ni0HF-w6.js";
35
35
  import { n as resolveConversationLabel } from "./conversation-label-DXUkoKcB.js";
36
- import { t as resolveIMessageAccount } from "./accounts-qtxJ-6em.js";
37
- import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DLyHUt31.js";
36
+ import { t as resolveIMessageAccount } from "./accounts-CJR8j_Kq.js";
37
+ import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-Cb87-LzP.js";
38
38
  import { t as emitSessionTranscriptUpdate } from "./transcript-events-DDYvbmRV.js";
39
- import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-DXB7tqWi.js";
40
- import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-Bw9ZjAgJ.js";
41
- import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-XlyuyChD.js";
42
- import { n as resolveMemorySearchConfig } from "./manager-BmXaGyON.js";
43
- import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-DRbx2dhW.js";
44
- import { n as retryAsync } from "./retry-Cly39XZB.js";
45
- import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-Be1SwYlW.js";
46
- 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-BW5f05BR.js";
47
- import { n as resolveMarkdownTableMode } from "./markdown-tables-iMQQZu4Q.js";
39
+ import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-DBCfXdli.js";
40
+ import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-WVlJkWYO.js";
41
+ import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-CtL0omgM.js";
42
+ import { n as resolveMemorySearchConfig } from "./manager-BSlYwG4Q.js";
43
+ import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-6H6Zw1cs.js";
44
+ import { n as retryAsync } from "./retry-dGG-MbxL.js";
45
+ import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-DyItGyW9.js";
46
+ 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-ClbN9Pqy.js";
47
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-DSHvnTLx.js";
48
48
  import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-DL3f_O53.js";
49
- import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-DMwIh5cS.js";
50
- import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-DccrnjsE.js";
51
- import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-CurvwtTw.js";
52
- import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-CY3SUdWj.js";
49
+ import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-C7OCYACU.js";
50
+ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-CbFUkv_T.js";
51
+ import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-D1zSleL6.js";
52
+ import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-SDwv3aAY.js";
53
53
  import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-BlHX0H3E.js";
54
- import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-Duym_W6W.js";
54
+ import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-CseBozoP.js";
55
55
  import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-Bso4i15F.js";
56
56
  import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-Bup9wS1y.js";
57
- import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-CsM_hJ_s.js";
57
+ import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-C9-gaquj.js";
58
58
  import { n as normalizePollInput } from "./polls-CCuCaqgv.js";
59
- import { t as convertMarkdownTables } from "./tables-DuZspiBu.js";
60
- import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-CFMDO5ON.js";
61
- 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-OoNECFaf.js";
62
- import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-CZ-1eqw0.js";
59
+ import { t as convertMarkdownTables } from "./tables-BIWsCKXJ.js";
60
+ import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-C00dpYCF.js";
61
+ 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-DrUqe5-S.js";
62
+ import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-BVikmvWO.js";
63
63
  import { t as makeProxyFetch } from "./proxy-CBJ1upuz.js";
64
- import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CdijMW_S.js";
65
- import { t as getActiveWebListener } from "./active-listener-C9r8ZB9m.js";
64
+ import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CoV8InBa.js";
65
+ import { t as getActiveWebListener } from "./active-listener-D6sXIjAg.js";
66
66
  import { createRequire } from "node:module";
67
- import * as fs$2 from "node:fs/promises";
67
+ import * as fs$1 from "node:fs/promises";
68
68
  import fs from "node:fs/promises";
69
69
  import os, { homedir } from "node:os";
70
70
  import * as path$1 from "node:path";
71
71
  import path from "node:path";
72
- import fs$1, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
72
+ import fsSync, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
73
73
  import JSON5 from "json5";
74
74
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
75
75
  import { inspect, promisify } from "node:util";
@@ -81,7 +81,7 @@ import { EdgeTTS } from "node-edge-tts";
81
81
  import AjvPkg from "ajv";
82
82
  import { createServer } from "node:http";
83
83
  import { ProxyAgent, fetch as fetch$1 } from "undici";
84
- import WebSocket, { WebSocket as WebSocket$1 } from "ws";
84
+ import WebSocket$1, { WebSocket } from "ws";
85
85
  import { Buffer as Buffer$1 } from "node:buffer";
86
86
  import { createJiti } from "jiti";
87
87
  import { Type } from "@sinclair/typebox";
@@ -3144,7 +3144,7 @@ async function resolveSymiDocsPath(params) {
3144
3144
  const workspaceDir = params.workspaceDir?.trim();
3145
3145
  if (workspaceDir) {
3146
3146
  const workspaceDocs = path.join(workspaceDir, "docs");
3147
- if (fs$1.existsSync(workspaceDocs)) return workspaceDocs;
3147
+ if (fsSync.existsSync(workspaceDocs)) return workspaceDocs;
3148
3148
  }
3149
3149
  const packageRoot = await resolveSymiPackageRoot({
3150
3150
  cwd: params.cwd,
@@ -3153,7 +3153,7 @@ async function resolveSymiDocsPath(params) {
3153
3153
  });
3154
3154
  if (!packageRoot) return null;
3155
3155
  const packageDocs = path.join(packageRoot, "docs");
3156
- return fs$1.existsSync(packageDocs) ? packageDocs : null;
3156
+ return fsSync.existsSync(packageDocs) ? packageDocs : null;
3157
3157
  }
3158
3158
 
3159
3159
  //#endregion
@@ -3462,7 +3462,7 @@ async function getMemorySearchManager(params) {
3462
3462
  if (cached) return { manager: cached };
3463
3463
  }
3464
3464
  try {
3465
- const { QmdMemoryManager } = await import("./qmd-manager-QHUP-_em.js");
3465
+ const { QmdMemoryManager } = await import("./qmd-manager-DdZh9PHs.js");
3466
3466
  const primary = await QmdMemoryManager.create({
3467
3467
  cfg: params.cfg,
3468
3468
  agentId: params.agentId,
@@ -3474,7 +3474,7 @@ async function getMemorySearchManager(params) {
3474
3474
  const wrapper = new FallbackMemoryManager({
3475
3475
  primary,
3476
3476
  fallbackFactory: async () => {
3477
- const { MemoryIndexManager } = await import("./manager-BmXaGyON.js").then((n) => n.t);
3477
+ const { MemoryIndexManager } = await import("./manager-BSlYwG4Q.js").then((n) => n.t);
3478
3478
  return await MemoryIndexManager.get(params);
3479
3479
  }
3480
3480
  }, () => QMD_MANAGER_CACHE.delete(cacheKey));
@@ -3487,7 +3487,7 @@ async function getMemorySearchManager(params) {
3487
3487
  }
3488
3488
  }
3489
3489
  try {
3490
- const { MemoryIndexManager } = await import("./manager-BmXaGyON.js").then((n) => n.t);
3490
+ const { MemoryIndexManager } = await import("./manager-BSlYwG4Q.js").then((n) => n.t);
3491
3491
  return { manager: await MemoryIndexManager.get(params) };
3492
3492
  } catch (err) {
3493
3493
  return {
@@ -4175,7 +4175,7 @@ function resolveDefaultIdentityPath() {
4175
4175
  return path.join(resolveStateDir(), "identity", "device.json");
4176
4176
  }
4177
4177
  function ensureDir$2(filePath) {
4178
- fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
4178
+ fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
4179
4179
  }
4180
4180
  const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
4181
4181
  function base64UrlEncode(buf) {
@@ -4211,8 +4211,8 @@ function generateIdentity() {
4211
4211
  }
4212
4212
  function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
4213
4213
  try {
4214
- if (fs$1.existsSync(filePath)) {
4215
- const raw = fs$1.readFileSync(filePath, "utf8");
4214
+ if (fsSync.existsSync(filePath)) {
4215
+ const raw = fsSync.readFileSync(filePath, "utf8");
4216
4216
  const parsed = JSON.parse(raw);
4217
4217
  if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
4218
4218
  const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
@@ -4221,9 +4221,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
4221
4221
  ...parsed,
4222
4222
  deviceId: derivedId
4223
4223
  };
4224
- fs$1.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
4224
+ fsSync.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
4225
4225
  try {
4226
- fs$1.chmodSync(filePath, 384);
4226
+ fsSync.chmodSync(filePath, 384);
4227
4227
  } catch {}
4228
4228
  return {
4229
4229
  deviceId: derivedId,
@@ -4248,9 +4248,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
4248
4248
  privateKeyPem: identity.privateKeyPem,
4249
4249
  createdAtMs: Date.now()
4250
4250
  };
4251
- fs$1.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
4251
+ fsSync.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
4252
4252
  try {
4253
- fs$1.chmodSync(filePath, 384);
4253
+ fsSync.chmodSync(filePath, 384);
4254
4254
  } catch {}
4255
4255
  return identity;
4256
4256
  }
@@ -4400,8 +4400,8 @@ function resolveDeviceAuthPath(env = process.env) {
4400
4400
  }
4401
4401
  function readStore(filePath) {
4402
4402
  try {
4403
- if (!fs$1.existsSync(filePath)) return null;
4404
- const raw = fs$1.readFileSync(filePath, "utf8");
4403
+ if (!fsSync.existsSync(filePath)) return null;
4404
+ const raw = fsSync.readFileSync(filePath, "utf8");
4405
4405
  const parsed = JSON.parse(raw);
4406
4406
  if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
4407
4407
  if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
@@ -4411,10 +4411,10 @@ function readStore(filePath) {
4411
4411
  }
4412
4412
  }
4413
4413
  function writeStore(filePath, store) {
4414
- fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
4415
- fs$1.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
4414
+ fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
4415
+ fsSync.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
4416
4416
  try {
4417
- fs$1.chmodSync(filePath, 384);
4417
+ fsSync.chmodSync(filePath, 384);
4418
4418
  } catch {}
4419
4419
  }
4420
4420
  function loadDeviceAuthToken(params) {
@@ -5715,7 +5715,7 @@ var GatewayClient = class {
5715
5715
  if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
5716
5716
  });
5717
5717
  }
5718
- this.ws = new WebSocket$1(url, wsOptions);
5718
+ this.ws = new WebSocket(url, wsOptions);
5719
5719
  this.ws.on("open", () => {
5720
5720
  if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
5721
5721
  const tlsError = this.validateTlsFingerprint();
@@ -5934,7 +5934,7 @@ var GatewayClient = class {
5934
5934
  return null;
5935
5935
  }
5936
5936
  async request(method, params, opts) {
5937
- if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
5937
+ if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
5938
5938
  const id = randomUUID();
5939
5939
  const frame = {
5940
5940
  type: "req",
@@ -7200,7 +7200,7 @@ async function routeReply(params) {
7200
7200
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
7201
7201
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
7202
7202
  try {
7203
- const { deliverOutboundPayloads } = await import("./deliver-D7lL85xc.js").then((n) => n.n);
7203
+ const { deliverOutboundPayloads } = await import("./deliver-CtTfl32o.js").then((n) => n.n);
7204
7204
  return {
7205
7205
  ok: true,
7206
7206
  messageId: (await deliverOutboundPayloads({
@@ -7596,7 +7596,7 @@ function normalizeSessionKey(value) {
7596
7596
  }
7597
7597
  function readSessionStore(storePath) {
7598
7598
  try {
7599
- const raw = fs$1.readFileSync(storePath, "utf-8");
7599
+ const raw = fsSync.readFileSync(storePath, "utf-8");
7600
7600
  const parsed = JSON5.parse(raw);
7601
7601
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
7602
7602
  } catch {}
@@ -12653,7 +12653,7 @@ async function createModelSelectionState(params) {
12653
12653
  }
12654
12654
  }
12655
12655
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
12656
- const { ensureAuthProfileStore } = await import("./model-auth-Cbvnb5vf.js").then((n) => n.s);
12656
+ const { ensureAuthProfileStore } = await import("./model-auth-B55liYhg.js").then((n) => n.s);
12657
12657
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
12658
12658
  const providerKey = normalizeProviderId(provider);
12659
12659
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -15026,8 +15026,8 @@ const DEFAULT_SAFE_BINS = [
15026
15026
  ];
15027
15027
  function isExecutableFile(filePath) {
15028
15028
  try {
15029
- if (!fs$1.statSync(filePath).isFile()) return false;
15030
- if (process.platform !== "win32") fs$1.accessSync(filePath, fs$1.constants.X_OK);
15029
+ if (!fsSync.statSync(filePath).isFile()) return false;
15030
+ if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
15031
15031
  return true;
15032
15032
  } catch {
15033
15033
  return false;
@@ -15065,7 +15065,7 @@ function normalizeMatchTarget(value) {
15065
15065
  }
15066
15066
  function tryRealpath(value) {
15067
15067
  try {
15068
- return fs$1.realpathSync(value);
15068
+ return fsSync.realpathSync(value);
15069
15069
  } catch {
15070
15070
  return null;
15071
15071
  }
@@ -16297,7 +16297,7 @@ function mergeLegacyAgent(current, legacy) {
16297
16297
  }
16298
16298
  function ensureDir$1(filePath) {
16299
16299
  const dir = path.dirname(filePath);
16300
- fs$1.mkdirSync(dir, { recursive: true });
16300
+ fsSync.mkdirSync(dir, { recursive: true });
16301
16301
  }
16302
16302
  function coerceAllowlistEntries(allowlist) {
16303
16303
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -16367,11 +16367,11 @@ function generateToken() {
16367
16367
  function loadExecApprovals() {
16368
16368
  const filePath = resolveExecApprovalsPath();
16369
16369
  try {
16370
- if (!fs$1.existsSync(filePath)) return normalizeExecApprovals({
16370
+ if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
16371
16371
  version: 1,
16372
16372
  agents: {}
16373
16373
  });
16374
- const raw = fs$1.readFileSync(filePath, "utf8");
16374
+ const raw = fsSync.readFileSync(filePath, "utf8");
16375
16375
  const parsed = JSON.parse(raw);
16376
16376
  if (parsed?.version !== 1) return normalizeExecApprovals({
16377
16377
  version: 1,
@@ -16388,9 +16388,9 @@ function loadExecApprovals() {
16388
16388
  function saveExecApprovals(file) {
16389
16389
  const filePath = resolveExecApprovalsPath();
16390
16390
  ensureDir$1(filePath);
16391
- fs$1.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
16391
+ fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
16392
16392
  try {
16393
- fs$1.chmodSync(filePath, 384);
16393
+ fsSync.chmodSync(filePath, 384);
16394
16394
  } catch {}
16395
16395
  }
16396
16396
  function ensureExecApprovals() {
@@ -16711,7 +16711,7 @@ function resolvePowerShellPath() {
16711
16711
  const systemRoot = process.env.SystemRoot || process.env.WINDIR;
16712
16712
  if (systemRoot) {
16713
16713
  const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
16714
- if (fs$1.existsSync(candidate)) return candidate;
16714
+ if (fsSync.existsSync(candidate)) return candidate;
16715
16715
  }
16716
16716
  return "powershell.exe";
16717
16717
  }
@@ -16749,7 +16749,7 @@ function resolveShellFromPath(name) {
16749
16749
  for (const entry of entries) {
16750
16750
  const candidate = path.join(entry, name);
16751
16751
  try {
16752
- fs$1.accessSync(candidate, fs$1.constants.X_OK);
16752
+ fsSync.accessSync(candidate, fsSync.constants.X_OK);
16753
16753
  return candidate;
16754
16754
  } catch {}
16755
16755
  }
@@ -19861,7 +19861,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
19861
19861
  function hasGitMarker(repoRoot) {
19862
19862
  const gitPath = path.join(repoRoot, ".git");
19863
19863
  try {
19864
- const stat = fs$1.statSync(gitPath);
19864
+ const stat = fsSync.statSync(gitPath);
19865
19865
  return stat.isDirectory() || stat.isFile();
19866
19866
  } catch {
19867
19867
  return false;
@@ -19873,10 +19873,10 @@ function findGitRoot(startDir, opts = {}) {
19873
19873
  function resolveGitDirFromMarker(repoRoot) {
19874
19874
  const gitPath = path.join(repoRoot, ".git");
19875
19875
  try {
19876
- const stat = fs$1.statSync(gitPath);
19876
+ const stat = fsSync.statSync(gitPath);
19877
19877
  if (stat.isDirectory()) return gitPath;
19878
19878
  if (!stat.isFile()) return null;
19879
- const match = fs$1.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
19879
+ const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
19880
19880
  if (!match?.[1]) return null;
19881
19881
  return path.resolve(repoRoot, match[1].trim());
19882
19882
  } catch {
@@ -19943,7 +19943,7 @@ const resolveCommitHash = (options = {}) => {
19943
19943
  cachedCommit = null;
19944
19944
  return cachedCommit;
19945
19945
  }
19946
- const head = fs$1.readFileSync(headPath, "utf-8").trim();
19946
+ const head = fsSync.readFileSync(headPath, "utf-8").trim();
19947
19947
  if (!head) {
19948
19948
  cachedCommit = null;
19949
19949
  return cachedCommit;
@@ -19951,7 +19951,7 @@ const resolveCommitHash = (options = {}) => {
19951
19951
  if (head.startsWith("ref:")) {
19952
19952
  const ref = head.replace(/^ref:\s*/i, "").trim();
19953
19953
  const refPath = path.resolve(path.dirname(headPath), ref);
19954
- cachedCommit = formatCommit(fs$1.readFileSync(refPath, "utf-8").trim());
19954
+ cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
19955
19955
  return cachedCommit;
19956
19956
  }
19957
19957
  cachedCommit = formatCommit(head);
@@ -20155,9 +20155,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
20155
20155
  } catch {
20156
20156
  return;
20157
20157
  }
20158
- if (!fs$1.existsSync(logPath)) return;
20158
+ if (!fsSync.existsSync(logPath)) return;
20159
20159
  try {
20160
- const lines = fs$1.readFileSync(logPath, "utf-8").split(/\n+/);
20160
+ const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
20161
20161
  let input = 0;
20162
20162
  let output = 0;
20163
20163
  let promptTokens = 0;
@@ -21397,7 +21397,7 @@ function resolveRepoRoot(params) {
21397
21397
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
21398
21398
  if (configured) try {
21399
21399
  const resolved = path.resolve(configured);
21400
- if (fs$1.statSync(resolved).isDirectory()) return resolved;
21400
+ if (fsSync.statSync(resolved).isDirectory()) return resolved;
21401
21401
  } catch {}
21402
21402
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
21403
21403
  const seen = /* @__PURE__ */ new Set();
@@ -22159,7 +22159,7 @@ async function buildContextReply(params) {
22159
22159
  //#region src/auto-reply/reply/commands-export-session.ts
22160
22160
  const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
22161
22161
  function loadTemplate(fileName) {
22162
- return fs$1.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
22162
+ return fsSync.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
22163
22163
  }
22164
22164
  function generateHtml(sessionData) {
22165
22165
  const template = loadTemplate("template.html");
@@ -22233,7 +22233,7 @@ async function buildExportSessionReply(params) {
22233
22233
  } catch (err) {
22234
22234
  return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
22235
22235
  }
22236
- if (!fs$1.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
22236
+ if (!fsSync.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
22237
22237
  const sessionManager = SessionManager.open(sessionFile);
22238
22238
  const entries = sessionManager.getEntries();
22239
22239
  const header = sessionManager.getHeader();
@@ -22254,8 +22254,8 @@ async function buildExportSessionReply(params) {
22254
22254
  const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
22255
22255
  const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
22256
22256
  const outputDir = path.dirname(outputPath);
22257
- if (!fs$1.existsSync(outputDir)) fs$1.mkdirSync(outputDir, { recursive: true });
22258
- fs$1.writeFileSync(outputPath, html, "utf-8");
22257
+ if (!fsSync.existsSync(outputDir)) fsSync.mkdirSync(outputDir, { recursive: true });
22258
+ fsSync.writeFileSync(outputPath, html, "utf-8");
22259
22259
  const relativePath = path.relative(params.workspaceDir, outputPath);
22260
22260
  return { text: [
22261
22261
  "✅ Session exported!",
@@ -22369,8 +22369,8 @@ function resolveZaiApiKey() {
22369
22369
  }
22370
22370
  try {
22371
22371
  const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
22372
- if (!fs$1.existsSync(authPath)) return;
22373
- const data = JSON.parse(fs$1.readFileSync(authPath, "utf-8"));
22372
+ if (!fsSync.existsSync(authPath)) return;
22373
+ const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
22374
22374
  return data["z-ai"]?.access || data.zai?.access;
22375
22375
  } catch {
22376
22376
  return;
@@ -23935,7 +23935,7 @@ function shouldPersistAnyBindingState() {
23935
23935
  }
23936
23936
  function shouldPersistBindingMutations() {
23937
23937
  if (shouldPersistAnyBindingState()) return true;
23938
- return fs$1.existsSync(resolveThreadBindingsPath());
23938
+ return fsSync.existsSync(resolveThreadBindingsPath());
23939
23939
  }
23940
23940
  function saveBindingsToDisk(params = {}) {
23941
23941
  if (!params.force && !shouldPersistAnyBindingState()) return;
@@ -24923,7 +24923,7 @@ const applyCostTotal = (totals, costTotal) => {
24923
24923
  totals.totalCost += costTotal;
24924
24924
  };
24925
24925
  async function* readJsonlRecords(filePath) {
24926
- const fileStream = fs$1.createReadStream(filePath, { encoding: "utf-8" });
24926
+ const fileStream = fsSync.createReadStream(filePath, { encoding: "utf-8" });
24927
24927
  const rl = readline.createInterface({
24928
24928
  input: fileStream,
24929
24929
  crlfDelay: Infinity
@@ -24995,10 +24995,10 @@ async function loadCostUsageSummary(params) {
24995
24995
  const dailyMap = /* @__PURE__ */ new Map();
24996
24996
  const totals = emptyTotals();
24997
24997
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
24998
- const entries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
24998
+ const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
24999
24999
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
25000
25000
  const filePath = path.join(sessionsDir, entry.name);
25001
- const stats = await fs$1.promises.stat(filePath).catch(() => null);
25001
+ const stats = await fsSync.promises.stat(filePath).catch(() => null);
25002
25002
  if (!stats) return null;
25003
25003
  if (stats.mtimeMs < sinceTime) return null;
25004
25004
  return filePath;
@@ -25031,7 +25031,7 @@ async function loadCostUsageSummary(params) {
25031
25031
  }
25032
25032
  async function loadSessionCostSummary(params) {
25033
25033
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
25034
- if (!sessionFile || !fs$1.existsSync(sessionFile)) return null;
25034
+ if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
25035
25035
  const totals = emptyTotals();
25036
25036
  let firstActivity;
25037
25037
  let lastActivity;
@@ -29237,7 +29237,7 @@ function asBoolean(value) {
29237
29237
  }
29238
29238
  function resolveTempPathParts(opts) {
29239
29239
  const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
29240
- if (!opts.tmpDir) fs$1.mkdirSync(tmpDir, {
29240
+ if (!opts.tmpDir) fsSync.mkdirSync(tmpDir, {
29241
29241
  recursive: true,
29242
29242
  mode: 448
29243
29243
  });
@@ -29303,7 +29303,7 @@ async function writeUrlToFile(filePath, url) {
29303
29303
  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}`);
29304
29304
  const body = res.body;
29305
29305
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
29306
- const fileHandle = await fs$2.open(filePath, "w");
29306
+ const fileHandle = await fs$1.open(filePath, "w");
29307
29307
  let bytes = 0;
29308
29308
  let thrown;
29309
29309
  try {
@@ -29322,7 +29322,7 @@ async function writeUrlToFile(filePath, url) {
29322
29322
  await fileHandle.close();
29323
29323
  }
29324
29324
  if (thrown) {
29325
- await fs$2.unlink(filePath).catch(() => {});
29325
+ await fs$1.unlink(filePath).catch(() => {});
29326
29326
  throw thrown;
29327
29327
  }
29328
29328
  return {
@@ -29332,7 +29332,7 @@ async function writeUrlToFile(filePath, url) {
29332
29332
  }
29333
29333
  async function writeBase64ToFile(filePath, base64) {
29334
29334
  const buf = Buffer.from(base64, "base64");
29335
- await fs$2.writeFile(filePath, buf);
29335
+ await fs$1.writeFile(filePath, buf);
29336
29336
  return {
29337
29337
  path: filePath,
29338
29338
  bytes: buf.length
@@ -34697,7 +34697,7 @@ function listExistingAgentIdsFromDisk() {
34697
34697
  const root = resolveStateDir();
34698
34698
  const agentsDir = path.join(root, "agents");
34699
34699
  try {
34700
- return fs$1.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
34700
+ return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
34701
34701
  } catch {
34702
34702
  return [];
34703
34703
  }
@@ -39732,7 +39732,7 @@ async function runAgentTurnWithFallback(params) {
39732
39732
  if (corruptedSessionId) {
39733
39733
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
39734
39734
  try {
39735
- fs$1.unlinkSync(transcriptPath);
39735
+ fsSync.unlinkSync(transcriptPath);
39736
39736
  } catch {}
39737
39737
  }
39738
39738
  delete params.activeSessionStore[sessionKey];
@@ -40437,9 +40437,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
40437
40437
  * Returns messages from the last N lines (default 100).
40438
40438
  */
40439
40439
  function readSessionMessages(sessionFile, maxLines = 100) {
40440
- if (!fs$1.existsSync(sessionFile)) return [];
40440
+ if (!fsSync.existsSync(sessionFile)) return [];
40441
40441
  try {
40442
- const recentLines = fs$1.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
40442
+ const recentLines = fsSync.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
40443
40443
  const messages = [];
40444
40444
  for (const line of recentLines) try {
40445
40445
  const entry = JSON.parse(line);
@@ -40480,8 +40480,8 @@ const MAX_CONTEXT_CHARS = 3e3;
40480
40480
  async function readPostCompactionContext(workspaceDir) {
40481
40481
  const agentsPath = path.join(workspaceDir, "AGENTS.md");
40482
40482
  try {
40483
- if (!fs$1.existsSync(agentsPath)) return null;
40484
- const sections = extractSections(await fs$1.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
40483
+ if (!fsSync.existsSync(agentsPath)) return null;
40484
+ const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
40485
40485
  if (sections.length === 0) return null;
40486
40486
  const combined = sections.join("\n\n");
40487
40487
  return "[Post-compaction context refresh]\n\nSession was just compacted. The conversation summary above is a hint, NOT a substitute for your startup sequence. Execute your Session Startup sequence now — read the required files before responding to the user.\n\nCritical rules from AGENTS.md:\n\n" + (combined.length > MAX_CONTEXT_CHARS ? combined.slice(0, MAX_CONTEXT_CHARS) + "\n...[truncated]..." : combined);
@@ -40685,7 +40685,7 @@ async function runReplyAgent(params) {
40685
40685
  if (resolved) transcriptCandidates.add(resolved);
40686
40686
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
40687
40687
  for (const candidate of transcriptCandidates) try {
40688
- fs$1.unlinkSync(candidate);
40688
+ fsSync.unlinkSync(candidate);
40689
40689
  } catch {}
40690
40690
  }
40691
40691
  return true;
@@ -41573,7 +41573,7 @@ async function deliverSessionMaintenanceWarning(params) {
41573
41573
  return;
41574
41574
  }
41575
41575
  try {
41576
- const { deliverOutboundPayloads } = await import("./deliver-D7lL85xc.js").then((n) => n.n);
41576
+ const { deliverOutboundPayloads } = await import("./deliver-CtTfl32o.js").then((n) => n.n);
41577
41577
  await deliverOutboundPayloads({
41578
41578
  cfg: params.cfg,
41579
41579
  channel,
@@ -41599,7 +41599,7 @@ function forkSessionFromParent(params) {
41599
41599
  agentId: params.agentId,
41600
41600
  sessionsDir: params.sessionsDir
41601
41601
  });
41602
- if (!parentSessionFile || !fs$1.existsSync(parentSessionFile)) return null;
41602
+ if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
41603
41603
  try {
41604
41604
  const manager = SessionManager.open(parentSessionFile);
41605
41605
  const leafId = manager.getLeafId();
@@ -41623,7 +41623,7 @@ function forkSessionFromParent(params) {
41623
41623
  cwd: manager.getCwd(),
41624
41624
  parentSession: parentSessionFile
41625
41625
  };
41626
- fs$1.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
41626
+ fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
41627
41627
  return {
41628
41628
  sessionId,
41629
41629
  sessionFile
@@ -45016,7 +45016,7 @@ async function describeStickerImage(params) {
45016
45016
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
45017
45017
  try {
45018
45018
  const buffer = await fs.readFile(imagePath);
45019
- const { describeImageWithModel } = await import("./image-Bw9ZjAgJ.js").then((n) => n.n);
45019
+ const { describeImageWithModel } = await import("./image-WVlJkWYO.js").then((n) => n.n);
45020
45020
  return (await describeImageWithModel({
45021
45021
  buffer,
45022
45022
  fileName: "sticker.webp",
@@ -45439,7 +45439,7 @@ function createWhatsAppLoginTool() {
45439
45439
  force: Type.Optional(Type.Boolean())
45440
45440
  }),
45441
45441
  execute: async (_toolCallId, args) => {
45442
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-cno8SVBt.js");
45442
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-N6iHqtov.js");
45443
45443
  if ((args?.action ?? "start") === "wait") {
45444
45444
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
45445
45445
  return {
@@ -45721,7 +45721,7 @@ async function withMemoryManagerForAgent(params) {
45721
45721
  }
45722
45722
  async function checkReadableFile(pathname) {
45723
45723
  try {
45724
- await fs.access(pathname, fs$1.constants.R_OK);
45724
+ await fs.access(pathname, fsSync.constants.R_OK);
45725
45725
  return { exists: true };
45726
45726
  } catch (err) {
45727
45727
  const code = err.code;
@@ -45780,7 +45780,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
45780
45780
  }
45781
45781
  let dirReadable = null;
45782
45782
  try {
45783
- await fs.access(memoryDir, fs$1.constants.R_OK);
45783
+ await fs.access(memoryDir, fsSync.constants.R_OK);
45784
45784
  dirReadable = true;
45785
45785
  } catch (err) {
45786
45786
  const code = err.code;
@@ -47477,7 +47477,7 @@ async function preflightDiscordMessage(params) {
47477
47477
  let preflightTranscript;
47478
47478
  const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
47479
47479
  if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
47480
- const { transcribeFirstAudio } = await import("./audio-preflight-DL5FZnXU.js");
47480
+ const { transcribeFirstAudio } = await import("./audio-preflight-C1uyo4vM.js");
47481
47481
  const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
47482
47482
  if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
47483
47483
  ctx: {
@@ -48440,7 +48440,7 @@ function identityHasValues(identity) {
48440
48440
  }
48441
48441
  function loadIdentityFromFile(identityPath) {
48442
48442
  try {
48443
- const parsed = parseIdentityMarkdown(fs$1.readFileSync(identityPath, "utf-8"));
48443
+ const parsed = parseIdentityMarkdown(fsSync.readFileSync(identityPath, "utf-8"));
48444
48444
  if (!identityHasValues(parsed)) return null;
48445
48445
  return parsed;
48446
48446
  } catch {
@@ -48479,7 +48479,7 @@ function isDataAvatar(value) {
48479
48479
  }
48480
48480
  function resolveExistingPath(value) {
48481
48481
  try {
48482
- return fs$1.realpathSync(value);
48482
+ return fsSync.realpathSync(value);
48483
48483
  } catch {
48484
48484
  return path.resolve(value);
48485
48485
  }
@@ -48503,7 +48503,7 @@ function resolveLocalAvatarPath(params) {
48503
48503
  reason: "unsupported_extension"
48504
48504
  };
48505
48505
  try {
48506
- if (!fs$1.statSync(realPath).isFile()) return {
48506
+ if (!fsSync.statSync(realPath).isFile()) return {
48507
48507
  ok: false,
48508
48508
  reason: "missing"
48509
48509
  };
@@ -49366,7 +49366,7 @@ function sanitizeRecentModels(models, limit) {
49366
49366
  }
49367
49367
  async function readJsonFileWithFallback(filePath, fallback) {
49368
49368
  try {
49369
- const raw = await fs$1.promises.readFile(filePath, "utf-8");
49369
+ const raw = await fsSync.promises.readFile(filePath, "utf-8");
49370
49370
  return {
49371
49371
  value: JSON.parse(raw),
49372
49372
  exists: true
@@ -49384,14 +49384,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
49384
49384
  }
49385
49385
  async function writeJsonFileAtomically(filePath, value) {
49386
49386
  const dir = path.dirname(filePath);
49387
- await fs$1.promises.mkdir(dir, {
49387
+ await fsSync.promises.mkdir(dir, {
49388
49388
  recursive: true,
49389
49389
  mode: 448
49390
49390
  });
49391
49391
  const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
49392
- await fs$1.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
49393
- await fs$1.promises.chmod(tmp, 384);
49394
- await fs$1.promises.rename(tmp, filePath);
49392
+ await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
49393
+ await fsSync.promises.chmod(tmp, 384);
49394
+ await fsSync.promises.rename(tmp, filePath);
49395
49395
  }
49396
49396
  async function readPreferencesStore(filePath) {
49397
49397
  const { value } = await readJsonFileWithFallback(filePath, {
@@ -51483,27 +51483,27 @@ function isVoiceChannelType(type) {
51483
51483
  function createDefaultDeps() {
51484
51484
  return {
51485
51485
  sendMessageWhatsApp: async (...args) => {
51486
- const { sendMessageWhatsApp } = await import("./web-B-ZZCPiM.js");
51486
+ const { sendMessageWhatsApp } = await import("./web-95LpH1_H.js");
51487
51487
  return await sendMessageWhatsApp(...args);
51488
51488
  },
51489
51489
  sendMessageTelegram: async (...args) => {
51490
- const { sendMessageTelegram } = await import("./send-Iv1YQSmf.js").then((n) => n.l);
51490
+ const { sendMessageTelegram } = await import("./send-Bh5ssTkU.js").then((n) => n.l);
51491
51491
  return await sendMessageTelegram(...args);
51492
51492
  },
51493
51493
  sendMessageDiscord: async (...args) => {
51494
- const { sendMessageDiscord } = await import("./send-D0qx7lbT.js").then((n) => n.t);
51494
+ const { sendMessageDiscord } = await import("./send-i0x7Ywhx.js").then((n) => n.t);
51495
51495
  return await sendMessageDiscord(...args);
51496
51496
  },
51497
51497
  sendMessageSlack: async (...args) => {
51498
- const { sendMessageSlack } = await import("./send-BtxXqho0.js").then((n) => n.n);
51498
+ const { sendMessageSlack } = await import("./send-BK3EV4tO.js").then((n) => n.n);
51499
51499
  return await sendMessageSlack(...args);
51500
51500
  },
51501
51501
  sendMessageSignal: async (...args) => {
51502
- const { sendMessageSignal } = await import("./send-CFMDO5ON.js").then((n) => n.i);
51502
+ const { sendMessageSignal } = await import("./send-C00dpYCF.js").then((n) => n.i);
51503
51503
  return await sendMessageSignal(...args);
51504
51504
  },
51505
51505
  sendMessageIMessage: async (...args) => {
51506
- const { sendMessageIMessage } = await import("./send-OoNECFaf.js").then((n) => n.n);
51506
+ const { sendMessageIMessage } = await import("./send-DrUqe5-S.js").then((n) => n.n);
51507
51507
  return await sendMessageIMessage(...args);
51508
51508
  }
51509
51509
  };
@@ -54387,7 +54387,7 @@ function createDiscordGatewayPlugin(params) {
54387
54387
  super(options);
54388
54388
  }
54389
54389
  createWebSocket(url) {
54390
- return new WebSocket(url, { agent });
54390
+ return new WebSocket$1(url, { agent });
54391
54391
  }
54392
54392
  }
54393
54393
  return new ProxyGatewayPlugin();
@@ -56381,7 +56381,7 @@ async function monitorIMessageProvider(opts = {}) {
56381
56381
  function readFileIfExists(filePath) {
56382
56382
  if (!filePath) return;
56383
56383
  try {
56384
- return fs$1.readFileSync(filePath, "utf-8").trim();
56384
+ return fsSync.readFileSync(filePath, "utf-8").trim();
56385
56385
  } catch {
56386
56386
  return;
56387
56387
  }
@@ -56942,7 +56942,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
56942
56942
  prefix: "line-media",
56943
56943
  extension: getExtensionForContentType(contentType)
56944
56944
  });
56945
- await fs$1.promises.writeFile(filePath, buffer);
56945
+ await fsSync.promises.writeFile(filePath, buffer);
56946
56946
  logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
56947
56947
  return {
56948
56948
  path: filePath,
@@ -61929,7 +61929,7 @@ function readSlackExternalArgMenuToken(raw) {
61929
61929
  }
61930
61930
  let commandsRegistry;
61931
61931
  async function getCommandsRegistry() {
61932
- if (!commandsRegistry) commandsRegistry = await import("./commands-registry-CurvwtTw.js").then((n) => n.n);
61932
+ if (!commandsRegistry) commandsRegistry = await import("./commands-registry-D1zSleL6.js").then((n) => n.n);
61933
61933
  return commandsRegistry;
61934
61934
  }
61935
61935
  function encodeSlackCommandArgValue(parts) {
@@ -62271,11 +62271,11 @@ async function registerSlackMonitorSlashCommands(params) {
62271
62271
  const channelName = channelInfo?.name;
62272
62272
  const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
62273
62273
  const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
62274
- import("./resolve-route-CZ-1eqw0.js").then((n) => n.r),
62274
+ import("./resolve-route-BVikmvWO.js").then((n) => n.r),
62275
62275
  import("./inbound-context-BlHX0H3E.js").then((n) => n.n),
62276
62276
  Promise.resolve().then(() => provider_dispatcher_exports)
62277
62277
  ]);
62278
- const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-DXUkoKcB.js").then((n) => n.t), import("./reply-prefix-XlyuyChD.js").then((n) => n.n)]);
62278
+ const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-DXUkoKcB.js").then((n) => n.t), import("./reply-prefix-CtL0omgM.js").then((n) => n.n)]);
62279
62279
  const route = resolveAgentRoute({
62280
62280
  cfg,
62281
62281
  channel: "slack",
@@ -62332,9 +62332,9 @@ async function registerSlackMonitorSlashCommands(params) {
62332
62332
  });
62333
62333
  const deliverSlashPayloads = async (replies) => {
62334
62334
  const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
62335
- import("./replies-CdijMW_S.js").then((n) => n.r),
62336
- import("./chunk-BW5f05BR.js").then((n) => n.s),
62337
- import("./markdown-tables-iMQQZu4Q.js").then((n) => n.t)
62335
+ import("./replies-CoV8InBa.js").then((n) => n.r),
62336
+ import("./chunk-ClbN9Pqy.js").then((n) => n.s),
62337
+ import("./markdown-tables-DSHvnTLx.js").then((n) => n.t)
62338
62338
  ]);
62339
62339
  await deliverSlackSlashReplies({
62340
62340
  replies,
@@ -62387,7 +62387,7 @@ async function registerSlackMonitorSlashCommands(params) {
62387
62387
  let nativeCommands = [];
62388
62388
  if (nativeEnabled) {
62389
62389
  reg = await getCommandsRegistry();
62390
- const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-CY3SUdWj.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
62390
+ const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-SDwv3aAY.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
62391
62391
  nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
62392
62392
  skillCommands,
62393
62393
  provider: "slack"
@@ -64605,7 +64605,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
64605
64605
  const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
64606
64606
  let preflightTranscript;
64607
64607
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
64608
- const { transcribeFirstAudio } = await import("./audio-preflight-DL5FZnXU.js");
64608
+ const { transcribeFirstAudio } = await import("./audio-preflight-C1uyo4vM.js");
64609
64609
  preflightTranscript = await transcribeFirstAudio({
64610
64610
  ctx: {
64611
64611
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -66750,23 +66750,23 @@ let webLoginQrPromise = null;
66750
66750
  let webChannelPromise = null;
66751
66751
  let whatsappActionsPromise = null;
66752
66752
  function loadWebOutbound() {
66753
- webOutboundPromise ??= import("./outbound-DnUbG06K.js").then((n) => n.t);
66753
+ webOutboundPromise ??= import("./outbound-Bc4wVSZG.js").then((n) => n.t);
66754
66754
  return webOutboundPromise;
66755
66755
  }
66756
66756
  function loadWebLogin() {
66757
- webLoginPromise ??= import("./login-B6HY_3uV.js").then((n) => n.n);
66757
+ webLoginPromise ??= import("./login-CLnFYUir.js").then((n) => n.n);
66758
66758
  return webLoginPromise;
66759
66759
  }
66760
66760
  function loadWebLoginQr() {
66761
- webLoginQrPromise ??= import("./login-qr-cno8SVBt.js");
66761
+ webLoginQrPromise ??= import("./login-qr-N6iHqtov.js");
66762
66762
  return webLoginQrPromise;
66763
66763
  }
66764
66764
  function loadWebChannel() {
66765
- webChannelPromise ??= import("./web-B-ZZCPiM.js");
66765
+ webChannelPromise ??= import("./web-95LpH1_H.js");
66766
66766
  return webChannelPromise;
66767
66767
  }
66768
66768
  function loadWhatsAppActions() {
66769
- whatsappActionsPromise ??= import("./whatsapp-actions-Bc0X_rVM.js");
66769
+ whatsappActionsPromise ??= import("./whatsapp-actions-On9mu-j8.js");
66770
66770
  return whatsappActionsPromise;
66771
66771
  }
66772
66772
  function createPluginRuntime() {
@@ -66987,7 +66987,7 @@ const resolvePluginSdkAliasFile = (params) => {
66987
66987
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
66988
66988
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
66989
66989
  const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
66990
- for (const candidate of orderedCandidates) if (fs$1.existsSync(candidate)) return candidate;
66990
+ for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
66991
66991
  const parent = path.dirname(cursor);
66992
66992
  if (parent === cursor) break;
66993
66993
  cursor = parent;
@@ -68045,7 +68045,7 @@ async function recordLoopOutcome(args) {
68045
68045
  if (!args.ctx?.sessionKey) return;
68046
68046
  try {
68047
68047
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bxo4UHOL.js").then((n) => n.n);
68048
- const { recordToolCallOutcome } = await import("./tool-loop-detection-Cs8_HCsx.js");
68048
+ const { recordToolCallOutcome } = await import("./tool-loop-detection-Bbc9OPFR.js");
68049
68049
  recordToolCallOutcome(getDiagnosticSessionState({
68050
68050
  sessionKey: args.ctx.sessionKey,
68051
68051
  sessionId: args.ctx?.agentId
@@ -68066,8 +68066,8 @@ async function runBeforeToolCallHook(args) {
68066
68066
  const params = args.params;
68067
68067
  if (args.ctx?.sessionKey) {
68068
68068
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bxo4UHOL.js").then((n) => n.n);
68069
- const { logToolLoopAction } = await import("./diagnostic-CI0kRQkt.js").then((n) => n.n);
68070
- const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-Cs8_HCsx.js");
68069
+ const { logToolLoopAction } = await import("./diagnostic-C3nsWaw3.js").then((n) => n.n);
68070
+ const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-Bbc9OPFR.js");
68071
68071
  const sessionState = getDiagnosticSessionState({
68072
68072
  sessionKey: args.ctx.sessionKey,
68073
68073
  sessionId: args.ctx?.agentId
@@ -70596,8 +70596,8 @@ async function readWorkspaceContextForSummary() {
70596
70596
  const workspaceDir = process.cwd();
70597
70597
  const agentsPath = path.join(workspaceDir, "AGENTS.md");
70598
70598
  try {
70599
- if (!fs$1.existsSync(agentsPath)) return "";
70600
- const sections = extractSections(await fs$1.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
70599
+ if (!fsSync.existsSync(agentsPath)) return "";
70600
+ const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
70601
70601
  if (sections.length === 0) return "";
70602
70602
  const combined = sections.join("\n\n");
70603
70603
  return `\n\n<workspace-critical-rules>\n${combined.length > MAX_SUMMARY_CONTEXT_CHARS ? combined.slice(0, MAX_SUMMARY_CONTEXT_CHARS) + "\n...[truncated]..." : combined}\n</workspace-critical-rules>`;
@@ -71928,7 +71928,7 @@ async function compactEmbeddedPiSessionDirect(params) {
71928
71928
  if (!apiKeyInfo.apiKey) {
71929
71929
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
71930
71930
  } else if (model.provider === "github-copilot") {
71931
- const { resolveCopilotApiToken } = await import("./github-copilot-token-C_qUP7p5.js").then((n) => n.n);
71931
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-DJqsJ2-r.js").then((n) => n.n);
71932
71932
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
71933
71933
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
71934
71934
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
@@ -73148,11 +73148,11 @@ function appendRawStream(payload) {
73148
73148
  if (!rawStreamReady) {
73149
73149
  rawStreamReady = true;
73150
73150
  try {
73151
- fs$1.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
73151
+ fsSync.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
73152
73152
  } catch {}
73153
73153
  }
73154
73154
  try {
73155
- fs$1.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
73155
+ fsSync.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
73156
73156
  } catch {}
73157
73157
  }
73158
73158
 
@@ -76372,7 +76372,7 @@ async function runEmbeddedPiAgent(params) {
76372
76372
  return;
76373
76373
  }
76374
76374
  if (model.provider === "github-copilot") {
76375
- const { resolveCopilotApiToken } = await import("./github-copilot-token-C_qUP7p5.js").then((n) => n.n);
76375
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-DJqsJ2-r.js").then((n) => n.n);
76376
76376
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
76377
76377
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
76378
76378
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);