@symerian/symi 2.3.4 → 2.4.1

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 (170) 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/{agents-E_Ere0qU.js → agents-BrpbYYTb.js} +4 -4
  7. package/dist/{agents.config-Cv_wsBXL.js → agents.config-Bf8u_0ts.js} +1 -1
  8. package/dist/{agents.config-DJTb7Jka.js → agents.config-j4SWyB6K.js} +1 -1
  9. package/dist/{audio-preflight-O3ASWbaG.js → audio-preflight-BkIfnmpi.js} +29 -29
  10. package/dist/{auth-choice-B3D_jLQw.js → auth-choice-BYB9fJiu.js} +1 -1
  11. package/dist/{auth-choice-D8ynWABO.js → auth-choice-DlrjQI-v.js} +1 -1
  12. package/dist/{banner-ChYzCy5p.js → banner-DRJJmkv1.js} +1 -1
  13. package/dist/{bindings-B7Ke6LJi.js → bindings-BU2hsBd9.js} +2 -2
  14. package/dist/build-info.json +3 -3
  15. package/dist/bundled/boot-md/handler.js +53 -53
  16. package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
  17. package/dist/bundled/command-logger/handler.js +1 -1
  18. package/dist/bundled/session-memory/handler.js +53 -53
  19. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  20. package/dist/{channel-activity-CsM_hJ_s.js → channel-activity-C9-gaquj.js} +1 -1
  21. package/dist/{channel-options-BYUiEgev.js → channel-options-BQz0F4El.js} +1 -1
  22. package/dist/{channel-options-CMNzHg4p.js → channel-options-CxSIp3x-.js} +1 -1
  23. package/dist/{channel-web-C-HLPbLL.js → channel-web-BY4lhNxW.js} +1 -1
  24. package/dist/{channels-cli-CyhXPEWq.js → channels-cli--rkhLJvR.js} +4 -4
  25. package/dist/{channels-cli-CcCmH-Tp.js → channels-cli-B5Nj_nHr.js} +4 -4
  26. package/dist/{chrome-BFekevcE.js → chrome-CxSAp8x3.js} +20 -20
  27. package/dist/{chunk-BW5f05BR.js → chunk-ClbN9Pqy.js} +1 -1
  28. package/dist/{cli-Cp-NQ7yu.js → cli-CATf6JAq.js} +1 -1
  29. package/dist/{cli-Gcuf3NTF.js → cli-Ds6poYQ6.js} +1 -1
  30. package/dist/{command-format-BaxDnULz.js → command-format-UKHV-j0K.js} +1 -1
  31. package/dist/{command-registry-Cvr_dlLY.js → command-registry-DXt0PsFy.js} +9 -9
  32. package/dist/{commands-registry-D7CTCQPm.js → commands-registry-VSmULp-g.js} +4 -4
  33. package/dist/{completion-cli-DaOHSXM3.js → completion-cli-BsSDzZNA.js} +1 -1
  34. package/dist/{completion-cli-DDlYn0ya.js → completion-cli-CPMOXTf2.js} +2 -2
  35. package/dist/{config-cli-CmUPAVUz.js → config-cli-B_KCvdli.js} +1 -1
  36. package/dist/{config-cli-BcuAsDOu.js → config-cli-C_GarUko.js} +1 -1
  37. package/dist/{config-DRbjHIwD.js → config-eEaJddXj.js} +12 -12
  38. package/dist/{configure-Ctwt1377.js → configure-CM-z8YCS.js} +3 -3
  39. package/dist/{configure-OxYdT2hU.js → configure-vfmJApU8.js} +3 -3
  40. package/dist/{deliver-CvCK5Mm9.js → deliver-BA7ZN3iM.js} +20 -20
  41. package/dist/{diagnostic-CI0kRQkt.js → diagnostic-C3nsWaw3.js} +1 -1
  42. package/dist/{doctor-completion-D7ShsgUp.js → doctor-completion-8qbLmeX0.js} +1 -1
  43. package/dist/{doctor-completion-Dw78bQaQ.js → doctor-completion-Dnxn_-ov.js} +1 -1
  44. package/dist/entry.js +1 -1
  45. package/dist/extensionAPI.js +1 -1
  46. package/dist/{frontmatter-C_bv_0P8.js → frontmatter-DPlG6yha.js} +2 -2
  47. package/dist/{gateway-cli-D7nxPtEc.js → gateway-cli-DKDpOBp-.js} +9 -9
  48. package/dist/{gateway-cli-Bd7u0krH.js → gateway-cli-XIsXoJZ3.js} +9 -9
  49. package/dist/{gemini-auth-CdSPHuLl.js → gemini-auth-CF48hUR9.js} +1 -1
  50. package/dist/{github-copilot-token-C_qUP7p5.js → github-copilot-token-DJqsJ2-r.js} +7 -7
  51. package/dist/{glass-ui-ws-CzH0ikhI.js → glass-ui-ws-Be_AOhp7.js} +7 -7
  52. package/dist/{glass-ui-ws-DBivjzVA.js → glass-ui-ws-Z_wtGa_A.js} +7 -7
  53. package/dist/{health-rR61mwm3.js → health-BBGgp_dC.js} +1 -1
  54. package/dist/{health-BSOMI4B6.js → health-BmaWws9G.js} +1 -1
  55. package/dist/{hooks-cli-dS4fMEKE.js → hooks-cli-C5eV9sxP.js} +2 -2
  56. package/dist/{hooks-cli-BbiA-gGi.js → hooks-cli-W_aoP9nb.js} +2 -2
  57. package/dist/{image-B0wGflxA.js → image-BGmVDkkw.js} +4 -4
  58. package/dist/{image-ops-CvJzsyvE.js → image-ops-S8-8dAhx.js} +1 -1
  59. package/dist/index.js +6 -6
  60. package/dist/{ir-DccrnjsE.js → ir-CbFUkv_T.js} +4 -4
  61. package/dist/llm-slug-generator.js +53 -53
  62. package/dist/{local-roots-DMwIh5cS.js → local-roots-C7OCYACU.js} +5 -5
  63. package/dist/{login-CwCoxapk.js → login-B8uiUAnV.js} +7 -7
  64. package/dist/{login-qr-Batf3PT5.js → login-qr-CIZk8uKX.js} +12 -12
  65. package/dist/{manager-D_LwXbc6.js → manager-BoLr3xR_.js} +13 -13
  66. package/dist/{manifest-registry-D0IQ3WuX.js → manifest-registry-CneMHk0N.js} +19 -19
  67. package/dist/{markdown-tables-iMQQZu4Q.js → markdown-tables-DSHvnTLx.js} +1 -1
  68. package/dist/{message-channel-Dz5lr5b0.js → message-channel-DbsRltF2.js} +1 -1
  69. package/dist/{model-auth-DK43VicI.js → model-auth-CwOuTuXl.js} +9 -9
  70. package/dist/{models-DqE1s0YL.js → models-COaQWNz5.js} +2 -2
  71. package/dist/{models-cli-6v9jkDxp.js → models-cli-DH17yK8M.js} +3 -3
  72. package/dist/{models-cli-BWC7jYp4.js → models-cli-DeG1qheS.js} +2 -2
  73. package/dist/{onboard-Bxoibs4p.js → onboard-CXOUIg28.js} +2 -2
  74. package/dist/{onboard-BUEYf2m9.js → onboard-DBeHwdks.js} +2 -2
  75. package/dist/{onboard-channels-C3UYzZNC.js → onboard-channels-BCUkNB26.js} +1 -1
  76. package/dist/{onboard-channels-af6Cu6fT.js → onboard-channels-D93AAHMd.js} +1 -1
  77. package/dist/{onboarding-DW-7o6Ln.js → onboarding-C58wjONa.js} +3 -3
  78. package/dist/{onboarding-CDdMZbov.js → onboarding-Dfjn2-9q.js} +3 -3
  79. package/dist/{onboarding.finalize-29jsMLO2.js → onboarding.finalize-7r1HYXWd.js} +6 -6
  80. package/dist/{onboarding.finalize-BI70KOeI.js → onboarding.finalize-DGD56sXW.js} +5 -5
  81. package/dist/{outbound-attachment-DjNDa3zn.js → outbound-attachment-Co2diKdP.js} +2 -2
  82. package/dist/{outbound-D4fN_ZlE.js → outbound-opDNxv-l.js} +7 -7
  83. package/dist/{paths-DLyHUt31.js → paths-Cb87-LzP.js} +1 -1
  84. package/dist/{paths-Cce4PUkG.js → paths-CySxpNhH.js} +5 -5
  85. package/dist/{pi-auth-json-0SYBFZTt.js → pi-auth-json-DPWPoruO.js} +8 -8
  86. package/dist/{pi-embedded-PkSwAmVq.js → pi-embedded-B6uRrG1f.js} +355 -328
  87. package/dist/{pi-embedded-JXvD5-F-.js → pi-embedded-CAJ6egA1.js} +195 -168
  88. package/dist/{pi-embedded-helpers-DLFjnVBb.js → pi-embedded-helpers-DEEaCvEp.js} +52 -52
  89. package/dist/{plugin-registry-Reem6P3K.js → plugin-registry-C0iHnZ7j.js} +1 -1
  90. package/dist/{plugin-registry-B7AdPXfF.js → plugin-registry-D_BAH1V5.js} +1 -1
  91. package/dist/plugin-sdk/agents/model-aware-stream.d.ts +41 -0
  92. package/dist/plugin-sdk/agents/pi-embedded-runner/extra-params.d.ts +19 -0
  93. package/dist/plugin-sdk/agents/stream-monitor.d.ts +62 -0
  94. package/dist/plugin-sdk/{channel-web-CM7A3Y7G.js → channel-web-ilY3YUmF.js} +1 -1
  95. package/dist/plugin-sdk/index.js +2 -2
  96. package/dist/plugin-sdk/{reply-CDloTGFF.js → reply-CSgeVqcV.js} +195 -168
  97. package/dist/plugin-sdk/{web-CWNoMlnF.js → web-BVg5EjiY.js} +2 -2
  98. package/dist/{plugins-DQYI3Fr-.js → plugins-C4C9637U.js} +9 -9
  99. package/dist/{plugins-cli-V8mTTTnD.js → plugins-cli-BhOXY_Ay.js} +2 -2
  100. package/dist/{plugins-cli-B-6wVg3A.js → plugins-cli-LqQNHF1I.js} +2 -2
  101. package/dist/{program-DBtlRiFS.js → program-CutjuJj0.js} +7 -7
  102. package/dist/{program-context-BHPNVgg2.js → program-context-qVc_lsLV.js} +17 -17
  103. package/dist/{prompt-select-styled-Bh-zAqW1.js → prompt-select-styled-BCHe7Fks.js} +4 -4
  104. package/dist/{prompt-select-styled-Cup1c9RJ.js → prompt-select-styled-C0yn8YjW.js} +4 -4
  105. package/dist/{provider-auth-helpers-CiuLdUK3.js → provider-auth-helpers-BzczCfh8.js} +1 -1
  106. package/dist/{provider-auth-helpers-BNmU48Ez.js → provider-auth-helpers-Ds_HwlgY.js} +1 -1
  107. package/dist/{push-apns-9zUNNHgy.js → push-apns-CT8-VcK5.js} +1 -1
  108. package/dist/{push-apns-8VJkVSdh.js → push-apns-DvcqkHld.js} +1 -1
  109. package/dist/{pw-ai-BnAKvSuw.js → pw-ai-DhwRiS06.js} +11 -11
  110. package/dist/{qmd-manager-QHUP-_em.js → qmd-manager-DdZh9PHs.js} +7 -7
  111. package/dist/{register.agent-BtNmleKV.js → register.agent-DMvHFw16.js} +6 -6
  112. package/dist/{register.agent-DnglG42G.js → register.agent-yoXoJ_5O.js} +5 -5
  113. package/dist/{register.configure-CLW9tdE4.js → register.configure-B8UDTEcS.js} +6 -6
  114. package/dist/{register.configure-DfQOfV1W.js → register.configure-BqrNBkwZ.js} +6 -6
  115. package/dist/{register.maintenance-jFYcRLEN.js → register.maintenance-D1MuIUlv.js} +7 -7
  116. package/dist/{register.maintenance-BQfMsgo7.js → register.maintenance-DMLPFSKI.js} +8 -8
  117. package/dist/{register.message-DUsBvFSF.js → register.message-BnLBwUw9.js} +2 -2
  118. package/dist/{register.message-BhoZYcqM.js → register.message-CgtrjEFw.js} +2 -2
  119. package/dist/{register.onboard-BBwhoeoE.js → register.onboard-CXHhSH4B.js} +4 -4
  120. package/dist/{register.onboard-DQOkpYBY.js → register.onboard-D1X2dUGZ.js} +4 -4
  121. package/dist/{register.setup-Ca6khTSz.js → register.setup-DFDb5BDi.js} +4 -4
  122. package/dist/{register.setup-6jlL3L1h.js → register.setup-Q58lN0TV.js} +4 -4
  123. package/dist/{register.status-health-sessions-DQDXZYI3.js → register.status-health-sessions-CP7JWQHw.js} +3 -3
  124. package/dist/{register.status-health-sessions-DsYNMl06.js → register.status-health-sessions-DhTfQ530.js} +3 -3
  125. package/dist/{register.subclis-DJf3ihsW.js → register.subclis-CrTXa8cj.js} +9 -9
  126. package/dist/{registry-CK4e9hn8.js → registry-DP24za6g.js} +17 -17
  127. package/dist/{replies-BIX_isV7.js → replies-DpPvWiGF.js} +3 -3
  128. package/dist/{reply-DSjeqLEz.js → reply-DkwaBRX-.js} +195 -168
  129. package/dist/{reply-prefix-XlyuyChD.js → reply-prefix-CtL0omgM.js} +1 -1
  130. package/dist/{resolve-route-CZ-1eqw0.js → resolve-route-BVikmvWO.js} +4 -4
  131. package/dist/{retry-Cly39XZB.js → retry-dGG-MbxL.js} +1 -1
  132. package/dist/{run-main-B2coomPj.js → run-main-BLKPL_vM.js} +14 -14
  133. package/dist/{runner-odEv83vv.js → runner-B_KP4voe.js} +9 -9
  134. package/dist/{send-DeFniOjh.js → send-CHEOWVc8.js} +6 -6
  135. package/dist/{send-WyRqb4WD.js → send-DbcLJb0P.js} +7 -7
  136. package/dist/{send-B1u-LrcS.js → send-DeEosX8F.js} +18 -18
  137. package/dist/{send-CiTGOvEc.js → send-DwKJK3sM.js} +10 -10
  138. package/dist/{send-DW96zgDL.js → send-zSarozV2.js} +6 -6
  139. package/dist/{server-methods-QNBQbsvr.js → server-methods-CbeCo-6O.js} +7 -7
  140. package/dist/{server-methods-DHo5e8Gj.js → server-methods-EQ0JkHOg.js} +7 -7
  141. package/dist/{server-node-events-D_S0NRCQ.js → server-node-events-C1FDqJb9.js} +2 -2
  142. package/dist/{server-node-events-CJOo8WcL.js → server-node-events-CBHpc_25.js} +2 -2
  143. package/dist/{session-SM36BTsl.js → session-DV1MNlbV.js} +8 -8
  144. package/dist/{skill-commands-BJMb_psG.js → skill-commands-D610IKhm.js} +9 -9
  145. package/dist/{skills-BFekKL7i.js → skills-o5WVqM4V.js} +21 -21
  146. package/dist/{sqlite-DRbx2dhW.js → sqlite-6H6Zw1cs.js} +4 -4
  147. package/dist/{status-B8yaGk2o.js → status-B1r3Wp0-.js} +2 -2
  148. package/dist/{status-D_J6qcC1.js → status-Cksz7z4T.js} +1 -1
  149. package/dist/{status-4DaGE8j5.js → status-CnogoaI_.js} +2 -2
  150. package/dist/{status-kfEtYX22.js → status-jVJSC_Ga.js} +1 -1
  151. package/dist/{store-C0wvOkae.js → store-vVE6N2mH.js} +2 -2
  152. package/dist/{subagent-registry-CyW0EDWw.js → subagent-registry-Jwg44JMf.js} +195 -168
  153. package/dist/{subsystem-Bs9YvKLa.js → subsystem-DgpxyDQ_.js} +1 -1
  154. package/dist/{tables-DuZspiBu.js → tables-BIWsCKXJ.js} +1 -1
  155. package/dist/{target-errors-Be1SwYlW.js → target-errors-DyItGyW9.js} +2 -2
  156. package/dist/{thinking-CdlENGRW.js → thinking-Ni0HF-w6.js} +5 -5
  157. package/dist/{tokens-H1H1LiSQ.js → tokens-c_SLAkVb.js} +1 -1
  158. package/dist/{tool-images-DXB7tqWi.js → tool-images-DBCfXdli.js} +2 -2
  159. package/dist/{tool-loop-detection-Cs8_HCsx.js → tool-loop-detection-Bbc9OPFR.js} +3 -3
  160. package/dist/{update-cli-C-ZGqknl.js → update-cli-BkU6ori8.js} +8 -8
  161. package/dist/{update-cli-DJupxo-f.js → update-cli-D18nWvzY.js} +7 -7
  162. package/dist/{update-runner-AiIhp7fw.js → update-runner-BQg__DB5.js} +1 -1
  163. package/dist/{update-runner-BF5UULe-.js → update-runner-le1Hcqx4.js} +1 -1
  164. package/dist/{web-HeObJp6A.js → web-BSs2eYJa.js} +2 -2
  165. package/dist/{web-6vYYN17n.js → web-BsjZ2RTT.js} +57 -57
  166. package/dist/{web-6026eRzJ.js → web-DajtZMaX.js} +1 -1
  167. package/dist/{web-CryqKXT4.js → web-KYh3LgI0.js} +1 -1
  168. package/dist/{whatsapp-actions-D1RsnX7P.js → whatsapp-actions-oRQjcdQe.js} +23 -23
  169. package/dist/{workspace-wAaHI8-5.js → workspace-CbvamIU6.js} +6 -6
  170. 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-DeFniOjh.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-CiTGOvEc.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-CvCK5Mm9.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-CHEOWVc8.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-DwKJK3sM.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-BA7ZN3iM.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-B1u-LrcS.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-DK43VicI.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-DeEosX8F.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-CwOuTuXl.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-DLFjnVBb.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-DRbjHIwD.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-BFekevcE.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-DEEaCvEp.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-eEaJddXj.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-CxSAp8x3.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-B0wGflxA.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 { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-D_LwXbc6.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-BGmVDkkw.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 { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-BoLr3xR_.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-D7CTCQPm.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-BJMb_psG.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-VSmULp-g.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-D610IKhm.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-odEv83vv.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-B_KP4voe.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-DW96zgDL.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-WyRqb4WD.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-zSarozV2.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-DbcLJb0P.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-BIX_isV7.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-DpPvWiGF.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$1, { WebSocket } from "ws";
84
+ import WebSocket, { WebSocket as WebSocket$1 } 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-D_LwXbc6.js").then((n) => n.t);
3477
+ const { MemoryIndexManager } = await import("./manager-BoLr3xR_.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-D_LwXbc6.js").then((n) => n.t);
3490
+ const { MemoryIndexManager } = await import("./manager-BoLr3xR_.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) {
@@ -5716,7 +5716,7 @@ var GatewayClient = class {
5716
5716
  if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
5717
5717
  });
5718
5718
  }
5719
- this.ws = new WebSocket(url, wsOptions);
5719
+ this.ws = new WebSocket$1(url, wsOptions);
5720
5720
  this.ws.on("open", () => {
5721
5721
  if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
5722
5722
  const tlsError = this.validateTlsFingerprint();
@@ -5935,7 +5935,7 @@ var GatewayClient = class {
5935
5935
  return null;
5936
5936
  }
5937
5937
  async request(method, params, opts) {
5938
- if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
5938
+ if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
5939
5939
  const id = randomUUID();
5940
5940
  const frame = {
5941
5941
  type: "req",
@@ -7201,7 +7201,7 @@ async function routeReply(params) {
7201
7201
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
7202
7202
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
7203
7203
  try {
7204
- const { deliverOutboundPayloads } = await import("./deliver-CvCK5Mm9.js").then((n) => n.n);
7204
+ const { deliverOutboundPayloads } = await import("./deliver-BA7ZN3iM.js").then((n) => n.n);
7205
7205
  return {
7206
7206
  ok: true,
7207
7207
  messageId: (await deliverOutboundPayloads({
@@ -7597,7 +7597,7 @@ function normalizeSessionKey(value) {
7597
7597
  }
7598
7598
  function readSessionStore(storePath) {
7599
7599
  try {
7600
- const raw = fs$1.readFileSync(storePath, "utf-8");
7600
+ const raw = fsSync.readFileSync(storePath, "utf-8");
7601
7601
  const parsed = JSON5.parse(raw);
7602
7602
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
7603
7603
  } catch {}
@@ -12656,7 +12656,7 @@ async function createModelSelectionState(params) {
12656
12656
  }
12657
12657
  }
12658
12658
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
12659
- const { ensureAuthProfileStore } = await import("./model-auth-DK43VicI.js").then((n) => n.s);
12659
+ const { ensureAuthProfileStore } = await import("./model-auth-CwOuTuXl.js").then((n) => n.s);
12660
12660
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
12661
12661
  const providerKey = normalizeProviderId(provider);
12662
12662
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -15029,8 +15029,8 @@ const DEFAULT_SAFE_BINS = [
15029
15029
  ];
15030
15030
  function isExecutableFile(filePath) {
15031
15031
  try {
15032
- if (!fs$1.statSync(filePath).isFile()) return false;
15033
- if (process.platform !== "win32") fs$1.accessSync(filePath, fs$1.constants.X_OK);
15032
+ if (!fsSync.statSync(filePath).isFile()) return false;
15033
+ if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
15034
15034
  return true;
15035
15035
  } catch {
15036
15036
  return false;
@@ -15068,7 +15068,7 @@ function normalizeMatchTarget(value) {
15068
15068
  }
15069
15069
  function tryRealpath(value) {
15070
15070
  try {
15071
- return fs$1.realpathSync(value);
15071
+ return fsSync.realpathSync(value);
15072
15072
  } catch {
15073
15073
  return null;
15074
15074
  }
@@ -16300,7 +16300,7 @@ function mergeLegacyAgent(current, legacy) {
16300
16300
  }
16301
16301
  function ensureDir$1(filePath) {
16302
16302
  const dir = path.dirname(filePath);
16303
- fs$1.mkdirSync(dir, { recursive: true });
16303
+ fsSync.mkdirSync(dir, { recursive: true });
16304
16304
  }
16305
16305
  function coerceAllowlistEntries(allowlist) {
16306
16306
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -16370,11 +16370,11 @@ function generateToken() {
16370
16370
  function loadExecApprovals() {
16371
16371
  const filePath = resolveExecApprovalsPath();
16372
16372
  try {
16373
- if (!fs$1.existsSync(filePath)) return normalizeExecApprovals({
16373
+ if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
16374
16374
  version: 1,
16375
16375
  agents: {}
16376
16376
  });
16377
- const raw = fs$1.readFileSync(filePath, "utf8");
16377
+ const raw = fsSync.readFileSync(filePath, "utf8");
16378
16378
  const parsed = JSON.parse(raw);
16379
16379
  if (parsed?.version !== 1) return normalizeExecApprovals({
16380
16380
  version: 1,
@@ -16391,9 +16391,9 @@ function loadExecApprovals() {
16391
16391
  function saveExecApprovals(file) {
16392
16392
  const filePath = resolveExecApprovalsPath();
16393
16393
  ensureDir$1(filePath);
16394
- fs$1.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
16394
+ fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
16395
16395
  try {
16396
- fs$1.chmodSync(filePath, 384);
16396
+ fsSync.chmodSync(filePath, 384);
16397
16397
  } catch {}
16398
16398
  }
16399
16399
  function ensureExecApprovals() {
@@ -16714,7 +16714,7 @@ function resolvePowerShellPath() {
16714
16714
  const systemRoot = process.env.SystemRoot || process.env.WINDIR;
16715
16715
  if (systemRoot) {
16716
16716
  const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
16717
- if (fs$1.existsSync(candidate)) return candidate;
16717
+ if (fsSync.existsSync(candidate)) return candidate;
16718
16718
  }
16719
16719
  return "powershell.exe";
16720
16720
  }
@@ -16752,7 +16752,7 @@ function resolveShellFromPath(name) {
16752
16752
  for (const entry of entries) {
16753
16753
  const candidate = path.join(entry, name);
16754
16754
  try {
16755
- fs$1.accessSync(candidate, fs$1.constants.X_OK);
16755
+ fsSync.accessSync(candidate, fsSync.constants.X_OK);
16756
16756
  return candidate;
16757
16757
  } catch {}
16758
16758
  }
@@ -19864,7 +19864,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
19864
19864
  function hasGitMarker(repoRoot) {
19865
19865
  const gitPath = path.join(repoRoot, ".git");
19866
19866
  try {
19867
- const stat = fs$1.statSync(gitPath);
19867
+ const stat = fsSync.statSync(gitPath);
19868
19868
  return stat.isDirectory() || stat.isFile();
19869
19869
  } catch {
19870
19870
  return false;
@@ -19876,10 +19876,10 @@ function findGitRoot(startDir, opts = {}) {
19876
19876
  function resolveGitDirFromMarker(repoRoot) {
19877
19877
  const gitPath = path.join(repoRoot, ".git");
19878
19878
  try {
19879
- const stat = fs$1.statSync(gitPath);
19879
+ const stat = fsSync.statSync(gitPath);
19880
19880
  if (stat.isDirectory()) return gitPath;
19881
19881
  if (!stat.isFile()) return null;
19882
- const match = fs$1.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
19882
+ const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
19883
19883
  if (!match?.[1]) return null;
19884
19884
  return path.resolve(repoRoot, match[1].trim());
19885
19885
  } catch {
@@ -19946,7 +19946,7 @@ const resolveCommitHash = (options = {}) => {
19946
19946
  cachedCommit = null;
19947
19947
  return cachedCommit;
19948
19948
  }
19949
- const head = fs$1.readFileSync(headPath, "utf-8").trim();
19949
+ const head = fsSync.readFileSync(headPath, "utf-8").trim();
19950
19950
  if (!head) {
19951
19951
  cachedCommit = null;
19952
19952
  return cachedCommit;
@@ -19954,7 +19954,7 @@ const resolveCommitHash = (options = {}) => {
19954
19954
  if (head.startsWith("ref:")) {
19955
19955
  const ref = head.replace(/^ref:\s*/i, "").trim();
19956
19956
  const refPath = path.resolve(path.dirname(headPath), ref);
19957
- cachedCommit = formatCommit(fs$1.readFileSync(refPath, "utf-8").trim());
19957
+ cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
19958
19958
  return cachedCommit;
19959
19959
  }
19960
19960
  cachedCommit = formatCommit(head);
@@ -20158,9 +20158,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
20158
20158
  } catch {
20159
20159
  return;
20160
20160
  }
20161
- if (!fs$1.existsSync(logPath)) return;
20161
+ if (!fsSync.existsSync(logPath)) return;
20162
20162
  try {
20163
- const lines = fs$1.readFileSync(logPath, "utf-8").split(/\n+/);
20163
+ const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
20164
20164
  let input = 0;
20165
20165
  let output = 0;
20166
20166
  let promptTokens = 0;
@@ -21400,7 +21400,7 @@ function resolveRepoRoot(params) {
21400
21400
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
21401
21401
  if (configured) try {
21402
21402
  const resolved = path.resolve(configured);
21403
- if (fs$1.statSync(resolved).isDirectory()) return resolved;
21403
+ if (fsSync.statSync(resolved).isDirectory()) return resolved;
21404
21404
  } catch {}
21405
21405
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
21406
21406
  const seen = /* @__PURE__ */ new Set();
@@ -22243,7 +22243,7 @@ async function buildContextReply(params) {
22243
22243
  //#region src/auto-reply/reply/commands-export-session.ts
22244
22244
  const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
22245
22245
  function loadTemplate(fileName) {
22246
- return fs$1.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
22246
+ return fsSync.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
22247
22247
  }
22248
22248
  function generateHtml(sessionData) {
22249
22249
  const template = loadTemplate("template.html");
@@ -22317,7 +22317,7 @@ async function buildExportSessionReply(params) {
22317
22317
  } catch (err) {
22318
22318
  return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
22319
22319
  }
22320
- if (!fs$1.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
22320
+ if (!fsSync.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
22321
22321
  const sessionManager = SessionManager.open(sessionFile);
22322
22322
  const entries = sessionManager.getEntries();
22323
22323
  const header = sessionManager.getHeader();
@@ -22338,8 +22338,8 @@ async function buildExportSessionReply(params) {
22338
22338
  const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
22339
22339
  const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
22340
22340
  const outputDir = path.dirname(outputPath);
22341
- if (!fs$1.existsSync(outputDir)) fs$1.mkdirSync(outputDir, { recursive: true });
22342
- fs$1.writeFileSync(outputPath, html, "utf-8");
22341
+ if (!fsSync.existsSync(outputDir)) fsSync.mkdirSync(outputDir, { recursive: true });
22342
+ fsSync.writeFileSync(outputPath, html, "utf-8");
22343
22343
  const relativePath = path.relative(params.workspaceDir, outputPath);
22344
22344
  return { text: [
22345
22345
  "✅ Session exported!",
@@ -22453,8 +22453,8 @@ function resolveZaiApiKey() {
22453
22453
  }
22454
22454
  try {
22455
22455
  const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
22456
- if (!fs$1.existsSync(authPath)) return;
22457
- const data = JSON.parse(fs$1.readFileSync(authPath, "utf-8"));
22456
+ if (!fsSync.existsSync(authPath)) return;
22457
+ const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
22458
22458
  return data["z-ai"]?.access || data.zai?.access;
22459
22459
  } catch {
22460
22460
  return;
@@ -24019,7 +24019,7 @@ function shouldPersistAnyBindingState() {
24019
24019
  }
24020
24020
  function shouldPersistBindingMutations() {
24021
24021
  if (shouldPersistAnyBindingState()) return true;
24022
- return fs$1.existsSync(resolveThreadBindingsPath());
24022
+ return fsSync.existsSync(resolveThreadBindingsPath());
24023
24023
  }
24024
24024
  function saveBindingsToDisk(params = {}) {
24025
24025
  if (!params.force && !shouldPersistAnyBindingState()) return;
@@ -25007,7 +25007,7 @@ const applyCostTotal = (totals, costTotal) => {
25007
25007
  totals.totalCost += costTotal;
25008
25008
  };
25009
25009
  async function* readJsonlRecords(filePath) {
25010
- const fileStream = fs$1.createReadStream(filePath, { encoding: "utf-8" });
25010
+ const fileStream = fsSync.createReadStream(filePath, { encoding: "utf-8" });
25011
25011
  const rl = readline.createInterface({
25012
25012
  input: fileStream,
25013
25013
  crlfDelay: Infinity
@@ -25079,10 +25079,10 @@ async function loadCostUsageSummary(params) {
25079
25079
  const dailyMap = /* @__PURE__ */ new Map();
25080
25080
  const totals = emptyTotals();
25081
25081
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
25082
- const entries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
25082
+ const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
25083
25083
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
25084
25084
  const filePath = path.join(sessionsDir, entry.name);
25085
- const stats = await fs$1.promises.stat(filePath).catch(() => null);
25085
+ const stats = await fsSync.promises.stat(filePath).catch(() => null);
25086
25086
  if (!stats) return null;
25087
25087
  if (stats.mtimeMs < sinceTime) return null;
25088
25088
  return filePath;
@@ -25115,7 +25115,7 @@ async function loadCostUsageSummary(params) {
25115
25115
  }
25116
25116
  async function loadSessionCostSummary(params) {
25117
25117
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
25118
- if (!sessionFile || !fs$1.existsSync(sessionFile)) return null;
25118
+ if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
25119
25119
  const totals = emptyTotals();
25120
25120
  let firstActivity;
25121
25121
  let lastActivity;
@@ -29321,7 +29321,7 @@ function asBoolean(value) {
29321
29321
  }
29322
29322
  function resolveTempPathParts(opts) {
29323
29323
  const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
29324
- if (!opts.tmpDir) fs$1.mkdirSync(tmpDir, {
29324
+ if (!opts.tmpDir) fsSync.mkdirSync(tmpDir, {
29325
29325
  recursive: true,
29326
29326
  mode: 448
29327
29327
  });
@@ -29387,7 +29387,7 @@ async function writeUrlToFile(filePath, url) {
29387
29387
  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}`);
29388
29388
  const body = res.body;
29389
29389
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
29390
- const fileHandle = await fs$2.open(filePath, "w");
29390
+ const fileHandle = await fs$1.open(filePath, "w");
29391
29391
  let bytes = 0;
29392
29392
  let thrown;
29393
29393
  try {
@@ -29406,7 +29406,7 @@ async function writeUrlToFile(filePath, url) {
29406
29406
  await fileHandle.close();
29407
29407
  }
29408
29408
  if (thrown) {
29409
- await fs$2.unlink(filePath).catch(() => {});
29409
+ await fs$1.unlink(filePath).catch(() => {});
29410
29410
  throw thrown;
29411
29411
  }
29412
29412
  return {
@@ -29416,7 +29416,7 @@ async function writeUrlToFile(filePath, url) {
29416
29416
  }
29417
29417
  async function writeBase64ToFile(filePath, base64) {
29418
29418
  const buf = Buffer.from(base64, "base64");
29419
- await fs$2.writeFile(filePath, buf);
29419
+ await fs$1.writeFile(filePath, buf);
29420
29420
  return {
29421
29421
  path: filePath,
29422
29422
  bytes: buf.length
@@ -34781,7 +34781,7 @@ function listExistingAgentIdsFromDisk() {
34781
34781
  const root = resolveStateDir();
34782
34782
  const agentsDir = path.join(root, "agents");
34783
34783
  try {
34784
- return fs$1.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
34784
+ return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
34785
34785
  } catch {
34786
34786
  return [];
34787
34787
  }
@@ -39816,7 +39816,7 @@ async function runAgentTurnWithFallback(params) {
39816
39816
  if (corruptedSessionId) {
39817
39817
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
39818
39818
  try {
39819
- fs$1.unlinkSync(transcriptPath);
39819
+ fsSync.unlinkSync(transcriptPath);
39820
39820
  } catch {}
39821
39821
  }
39822
39822
  delete params.activeSessionStore[sessionKey];
@@ -40521,9 +40521,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
40521
40521
  * Returns messages from the last N lines (default 100).
40522
40522
  */
40523
40523
  function readSessionMessages(sessionFile, maxLines = 100) {
40524
- if (!fs$1.existsSync(sessionFile)) return [];
40524
+ if (!fsSync.existsSync(sessionFile)) return [];
40525
40525
  try {
40526
- const recentLines = fs$1.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
40526
+ const recentLines = fsSync.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
40527
40527
  const messages = [];
40528
40528
  for (const line of recentLines) try {
40529
40529
  const entry = JSON.parse(line);
@@ -40564,8 +40564,8 @@ const MAX_CONTEXT_CHARS = 3e3;
40564
40564
  async function readPostCompactionContext(workspaceDir) {
40565
40565
  const agentsPath = path.join(workspaceDir, "AGENTS.md");
40566
40566
  try {
40567
- if (!fs$1.existsSync(agentsPath)) return null;
40568
- const sections = extractSections(await fs$1.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
40567
+ if (!fsSync.existsSync(agentsPath)) return null;
40568
+ const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
40569
40569
  if (sections.length === 0) return null;
40570
40570
  const combined = sections.join("\n\n");
40571
40571
  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);
@@ -40769,7 +40769,7 @@ async function runReplyAgent(params) {
40769
40769
  if (resolved) transcriptCandidates.add(resolved);
40770
40770
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
40771
40771
  for (const candidate of transcriptCandidates) try {
40772
- fs$1.unlinkSync(candidate);
40772
+ fsSync.unlinkSync(candidate);
40773
40773
  } catch {}
40774
40774
  }
40775
40775
  return true;
@@ -41675,7 +41675,7 @@ async function deliverSessionMaintenanceWarning(params) {
41675
41675
  return;
41676
41676
  }
41677
41677
  try {
41678
- const { deliverOutboundPayloads } = await import("./deliver-CvCK5Mm9.js").then((n) => n.n);
41678
+ const { deliverOutboundPayloads } = await import("./deliver-BA7ZN3iM.js").then((n) => n.n);
41679
41679
  await deliverOutboundPayloads({
41680
41680
  cfg: params.cfg,
41681
41681
  channel,
@@ -41701,7 +41701,7 @@ function forkSessionFromParent(params) {
41701
41701
  agentId: params.agentId,
41702
41702
  sessionsDir: params.sessionsDir
41703
41703
  });
41704
- if (!parentSessionFile || !fs$1.existsSync(parentSessionFile)) return null;
41704
+ if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
41705
41705
  try {
41706
41706
  const manager = SessionManager.open(parentSessionFile);
41707
41707
  const leafId = manager.getLeafId();
@@ -41725,7 +41725,7 @@ function forkSessionFromParent(params) {
41725
41725
  cwd: manager.getCwd(),
41726
41726
  parentSession: parentSessionFile
41727
41727
  };
41728
- fs$1.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
41728
+ fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
41729
41729
  return {
41730
41730
  sessionId,
41731
41731
  sessionFile
@@ -45121,7 +45121,7 @@ async function describeStickerImage(params) {
45121
45121
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
45122
45122
  try {
45123
45123
  const buffer = await fs.readFile(imagePath);
45124
- const { describeImageWithModel } = await import("./image-B0wGflxA.js").then((n) => n.n);
45124
+ const { describeImageWithModel } = await import("./image-BGmVDkkw.js").then((n) => n.n);
45125
45125
  return (await describeImageWithModel({
45126
45126
  buffer,
45127
45127
  fileName: "sticker.webp",
@@ -45544,7 +45544,7 @@ function createWhatsAppLoginTool() {
45544
45544
  force: Type.Optional(Type.Boolean())
45545
45545
  }),
45546
45546
  execute: async (_toolCallId, args) => {
45547
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-Batf3PT5.js");
45547
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-CIZk8uKX.js");
45548
45548
  if ((args?.action ?? "start") === "wait") {
45549
45549
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
45550
45550
  return {
@@ -45826,7 +45826,7 @@ async function withMemoryManagerForAgent(params) {
45826
45826
  }
45827
45827
  async function checkReadableFile(pathname) {
45828
45828
  try {
45829
- await fs.access(pathname, fs$1.constants.R_OK);
45829
+ await fs.access(pathname, fsSync.constants.R_OK);
45830
45830
  return { exists: true };
45831
45831
  } catch (err) {
45832
45832
  const code = err.code;
@@ -45885,7 +45885,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
45885
45885
  }
45886
45886
  let dirReadable = null;
45887
45887
  try {
45888
- await fs.access(memoryDir, fs$1.constants.R_OK);
45888
+ await fs.access(memoryDir, fsSync.constants.R_OK);
45889
45889
  dirReadable = true;
45890
45890
  } catch (err) {
45891
45891
  const code = err.code;
@@ -47783,7 +47783,7 @@ async function preflightDiscordMessage(params) {
47783
47783
  let preflightTranscript;
47784
47784
  const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
47785
47785
  if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
47786
- const { transcribeFirstAudio } = await import("./audio-preflight-O3ASWbaG.js");
47786
+ const { transcribeFirstAudio } = await import("./audio-preflight-BkIfnmpi.js");
47787
47787
  const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
47788
47788
  if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
47789
47789
  ctx: {
@@ -48746,7 +48746,7 @@ function identityHasValues(identity) {
48746
48746
  }
48747
48747
  function loadIdentityFromFile(identityPath) {
48748
48748
  try {
48749
- const parsed = parseIdentityMarkdown(fs$1.readFileSync(identityPath, "utf-8"));
48749
+ const parsed = parseIdentityMarkdown(fsSync.readFileSync(identityPath, "utf-8"));
48750
48750
  if (!identityHasValues(parsed)) return null;
48751
48751
  return parsed;
48752
48752
  } catch {
@@ -48785,7 +48785,7 @@ function isDataAvatar(value) {
48785
48785
  }
48786
48786
  function resolveExistingPath(value) {
48787
48787
  try {
48788
- return fs$1.realpathSync(value);
48788
+ return fsSync.realpathSync(value);
48789
48789
  } catch {
48790
48790
  return path.resolve(value);
48791
48791
  }
@@ -48809,7 +48809,7 @@ function resolveLocalAvatarPath(params) {
48809
48809
  reason: "unsupported_extension"
48810
48810
  };
48811
48811
  try {
48812
- if (!fs$1.statSync(realPath).isFile()) return {
48812
+ if (!fsSync.statSync(realPath).isFile()) return {
48813
48813
  ok: false,
48814
48814
  reason: "missing"
48815
48815
  };
@@ -49672,7 +49672,7 @@ function sanitizeRecentModels(models, limit) {
49672
49672
  }
49673
49673
  async function readJsonFileWithFallback(filePath, fallback) {
49674
49674
  try {
49675
- const raw = await fs$1.promises.readFile(filePath, "utf-8");
49675
+ const raw = await fsSync.promises.readFile(filePath, "utf-8");
49676
49676
  return {
49677
49677
  value: JSON.parse(raw),
49678
49678
  exists: true
@@ -49690,14 +49690,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
49690
49690
  }
49691
49691
  async function writeJsonFileAtomically(filePath, value) {
49692
49692
  const dir = path.dirname(filePath);
49693
- await fs$1.promises.mkdir(dir, {
49693
+ await fsSync.promises.mkdir(dir, {
49694
49694
  recursive: true,
49695
49695
  mode: 448
49696
49696
  });
49697
49697
  const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
49698
- await fs$1.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
49699
- await fs$1.promises.chmod(tmp, 384);
49700
- await fs$1.promises.rename(tmp, filePath);
49698
+ await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
49699
+ await fsSync.promises.chmod(tmp, 384);
49700
+ await fsSync.promises.rename(tmp, filePath);
49701
49701
  }
49702
49702
  async function readPreferencesStore(filePath) {
49703
49703
  const { value } = await readJsonFileWithFallback(filePath, {
@@ -51789,27 +51789,27 @@ function isVoiceChannelType(type) {
51789
51789
  function createDefaultDeps() {
51790
51790
  return {
51791
51791
  sendMessageWhatsApp: async (...args) => {
51792
- const { sendMessageWhatsApp } = await import("./web-6vYYN17n.js");
51792
+ const { sendMessageWhatsApp } = await import("./web-BsjZ2RTT.js");
51793
51793
  return await sendMessageWhatsApp(...args);
51794
51794
  },
51795
51795
  sendMessageTelegram: async (...args) => {
51796
- const { sendMessageTelegram } = await import("./send-B1u-LrcS.js").then((n) => n.l);
51796
+ const { sendMessageTelegram } = await import("./send-DeEosX8F.js").then((n) => n.l);
51797
51797
  return await sendMessageTelegram(...args);
51798
51798
  },
51799
51799
  sendMessageDiscord: async (...args) => {
51800
- const { sendMessageDiscord } = await import("./send-CiTGOvEc.js").then((n) => n.t);
51800
+ const { sendMessageDiscord } = await import("./send-DwKJK3sM.js").then((n) => n.t);
51801
51801
  return await sendMessageDiscord(...args);
51802
51802
  },
51803
51803
  sendMessageSlack: async (...args) => {
51804
- const { sendMessageSlack } = await import("./send-DeFniOjh.js").then((n) => n.n);
51804
+ const { sendMessageSlack } = await import("./send-CHEOWVc8.js").then((n) => n.n);
51805
51805
  return await sendMessageSlack(...args);
51806
51806
  },
51807
51807
  sendMessageSignal: async (...args) => {
51808
- const { sendMessageSignal } = await import("./send-DW96zgDL.js").then((n) => n.i);
51808
+ const { sendMessageSignal } = await import("./send-zSarozV2.js").then((n) => n.i);
51809
51809
  return await sendMessageSignal(...args);
51810
51810
  },
51811
51811
  sendMessageIMessage: async (...args) => {
51812
- const { sendMessageIMessage } = await import("./send-WyRqb4WD.js").then((n) => n.n);
51812
+ const { sendMessageIMessage } = await import("./send-DbcLJb0P.js").then((n) => n.n);
51813
51813
  return await sendMessageIMessage(...args);
51814
51814
  }
51815
51815
  };
@@ -54696,7 +54696,7 @@ function createDiscordGatewayPlugin(params) {
54696
54696
  super(options);
54697
54697
  }
54698
54698
  createWebSocket(url) {
54699
- return new WebSocket$1(url, { agent });
54699
+ return new WebSocket(url, { agent });
54700
54700
  }
54701
54701
  }
54702
54702
  return new ProxyGatewayPlugin();
@@ -56690,7 +56690,7 @@ async function monitorIMessageProvider(opts = {}) {
56690
56690
  function readFileIfExists(filePath) {
56691
56691
  if (!filePath) return;
56692
56692
  try {
56693
- return fs$1.readFileSync(filePath, "utf-8").trim();
56693
+ return fsSync.readFileSync(filePath, "utf-8").trim();
56694
56694
  } catch {
56695
56695
  return;
56696
56696
  }
@@ -57251,7 +57251,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
57251
57251
  prefix: "line-media",
57252
57252
  extension: getExtensionForContentType(contentType)
57253
57253
  });
57254
- await fs$1.promises.writeFile(filePath, buffer);
57254
+ await fsSync.promises.writeFile(filePath, buffer);
57255
57255
  logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
57256
57256
  return {
57257
57257
  path: filePath,
@@ -62238,7 +62238,7 @@ function readSlackExternalArgMenuToken(raw) {
62238
62238
  }
62239
62239
  let commandsRegistry;
62240
62240
  async function getCommandsRegistry() {
62241
- if (!commandsRegistry) commandsRegistry = await import("./commands-registry-D7CTCQPm.js").then((n) => n.n);
62241
+ if (!commandsRegistry) commandsRegistry = await import("./commands-registry-VSmULp-g.js").then((n) => n.n);
62242
62242
  return commandsRegistry;
62243
62243
  }
62244
62244
  function encodeSlackCommandArgValue(parts) {
@@ -62580,11 +62580,11 @@ async function registerSlackMonitorSlashCommands(params) {
62580
62580
  const channelName = channelInfo?.name;
62581
62581
  const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
62582
62582
  const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
62583
- import("./resolve-route-CZ-1eqw0.js").then((n) => n.r),
62583
+ import("./resolve-route-BVikmvWO.js").then((n) => n.r),
62584
62584
  import("./inbound-context-BlHX0H3E.js").then((n) => n.n),
62585
62585
  Promise.resolve().then(() => provider_dispatcher_exports)
62586
62586
  ]);
62587
- const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-DXUkoKcB.js").then((n) => n.t), import("./reply-prefix-XlyuyChD.js").then((n) => n.n)]);
62587
+ const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-DXUkoKcB.js").then((n) => n.t), import("./reply-prefix-CtL0omgM.js").then((n) => n.n)]);
62588
62588
  const route = resolveAgentRoute({
62589
62589
  cfg,
62590
62590
  channel: "slack",
@@ -62641,9 +62641,9 @@ async function registerSlackMonitorSlashCommands(params) {
62641
62641
  });
62642
62642
  const deliverSlashPayloads = async (replies) => {
62643
62643
  const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
62644
- import("./replies-BIX_isV7.js").then((n) => n.r),
62645
- import("./chunk-BW5f05BR.js").then((n) => n.s),
62646
- import("./markdown-tables-iMQQZu4Q.js").then((n) => n.t)
62644
+ import("./replies-DpPvWiGF.js").then((n) => n.r),
62645
+ import("./chunk-ClbN9Pqy.js").then((n) => n.s),
62646
+ import("./markdown-tables-DSHvnTLx.js").then((n) => n.t)
62647
62647
  ]);
62648
62648
  await deliverSlackSlashReplies({
62649
62649
  replies,
@@ -62696,7 +62696,7 @@ async function registerSlackMonitorSlashCommands(params) {
62696
62696
  let nativeCommands = [];
62697
62697
  if (nativeEnabled) {
62698
62698
  reg = await getCommandsRegistry();
62699
- const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-BJMb_psG.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
62699
+ const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-D610IKhm.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
62700
62700
  nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
62701
62701
  skillCommands,
62702
62702
  provider: "slack"
@@ -64914,7 +64914,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
64914
64914
  const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
64915
64915
  let preflightTranscript;
64916
64916
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
64917
- const { transcribeFirstAudio } = await import("./audio-preflight-O3ASWbaG.js");
64917
+ const { transcribeFirstAudio } = await import("./audio-preflight-BkIfnmpi.js");
64918
64918
  preflightTranscript = await transcribeFirstAudio({
64919
64919
  ctx: {
64920
64920
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -67059,23 +67059,23 @@ let webLoginQrPromise = null;
67059
67059
  let webChannelPromise = null;
67060
67060
  let whatsappActionsPromise = null;
67061
67061
  function loadWebOutbound() {
67062
- webOutboundPromise ??= import("./outbound-D4fN_ZlE.js").then((n) => n.t);
67062
+ webOutboundPromise ??= import("./outbound-opDNxv-l.js").then((n) => n.t);
67063
67063
  return webOutboundPromise;
67064
67064
  }
67065
67065
  function loadWebLogin() {
67066
- webLoginPromise ??= import("./login-CwCoxapk.js").then((n) => n.n);
67066
+ webLoginPromise ??= import("./login-B8uiUAnV.js").then((n) => n.n);
67067
67067
  return webLoginPromise;
67068
67068
  }
67069
67069
  function loadWebLoginQr() {
67070
- webLoginQrPromise ??= import("./login-qr-Batf3PT5.js");
67070
+ webLoginQrPromise ??= import("./login-qr-CIZk8uKX.js");
67071
67071
  return webLoginQrPromise;
67072
67072
  }
67073
67073
  function loadWebChannel() {
67074
- webChannelPromise ??= import("./web-6vYYN17n.js");
67074
+ webChannelPromise ??= import("./web-BsjZ2RTT.js");
67075
67075
  return webChannelPromise;
67076
67076
  }
67077
67077
  function loadWhatsAppActions() {
67078
- whatsappActionsPromise ??= import("./whatsapp-actions-D1RsnX7P.js");
67078
+ whatsappActionsPromise ??= import("./whatsapp-actions-oRQjcdQe.js");
67079
67079
  return whatsappActionsPromise;
67080
67080
  }
67081
67081
  function createPluginRuntime() {
@@ -67296,7 +67296,7 @@ const resolvePluginSdkAliasFile = (params) => {
67296
67296
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
67297
67297
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
67298
67298
  const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
67299
- for (const candidate of orderedCandidates) if (fs$1.existsSync(candidate)) return candidate;
67299
+ for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
67300
67300
  const parent = path.dirname(cursor);
67301
67301
  if (parent === cursor) break;
67302
67302
  cursor = parent;
@@ -68417,7 +68417,7 @@ async function recordLoopOutcome(args) {
68417
68417
  if (!args.ctx?.sessionKey) return;
68418
68418
  try {
68419
68419
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bxo4UHOL.js").then((n) => n.n);
68420
- const { recordToolCallOutcome } = await import("./tool-loop-detection-Cs8_HCsx.js");
68420
+ const { recordToolCallOutcome } = await import("./tool-loop-detection-Bbc9OPFR.js");
68421
68421
  recordToolCallOutcome(getDiagnosticSessionState({
68422
68422
  sessionKey: args.ctx.sessionKey,
68423
68423
  sessionId: args.ctx?.agentId
@@ -68438,8 +68438,8 @@ async function runBeforeToolCallHook(args) {
68438
68438
  const params = args.params;
68439
68439
  if (args.ctx?.sessionKey) {
68440
68440
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bxo4UHOL.js").then((n) => n.n);
68441
- const { logToolLoopAction } = await import("./diagnostic-CI0kRQkt.js").then((n) => n.n);
68442
- const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-Cs8_HCsx.js");
68441
+ const { logToolLoopAction } = await import("./diagnostic-C3nsWaw3.js").then((n) => n.n);
68442
+ const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-Bbc9OPFR.js");
68443
68443
  const sessionState = getDiagnosticSessionState({
68444
68444
  sessionKey: args.ctx.sessionKey,
68445
68445
  sessionId: args.ctx?.agentId
@@ -71008,8 +71008,8 @@ async function readWorkspaceContextForSummary() {
71008
71008
  const workspaceDir = process.cwd();
71009
71009
  const agentsPath = path.join(workspaceDir, "AGENTS.md");
71010
71010
  try {
71011
- if (!fs$1.existsSync(agentsPath)) return "";
71012
- const sections = extractSections(await fs$1.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
71011
+ if (!fsSync.existsSync(agentsPath)) return "";
71012
+ const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
71013
71013
  if (sections.length === 0) return "";
71014
71014
  const combined = sections.join("\n\n");
71015
71015
  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>`;
@@ -72340,7 +72340,7 @@ async function compactEmbeddedPiSessionDirect(params) {
72340
72340
  if (!apiKeyInfo.apiKey) {
72341
72341
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
72342
72342
  } else if (model.provider === "github-copilot") {
72343
- const { resolveCopilotApiToken } = await import("./github-copilot-token-C_qUP7p5.js").then((n) => n.n);
72343
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-DJqsJ2-r.js").then((n) => n.n);
72344
72344
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
72345
72345
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
72346
72346
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
@@ -72838,10 +72838,6 @@ function resolveModelProfile(modelId, userProfiles) {
72838
72838
 
72839
72839
  //#endregion
72840
72840
  //#region src/agents/pi-embedded-runner/extra-params.ts
72841
- const OPENROUTER_APP_HEADERS = {
72842
- "HTTP-Referer": "https://symi.ai",
72843
- "X-Title": "Symi"
72844
- };
72845
72841
  const ANTHROPIC_CONTEXT_1M_BETA = "context-1m-2025-08-07";
72846
72842
  const ANTHROPIC_1M_MODEL_PREFIXES = ["claude-opus-4", "claude-sonnet-4"];
72847
72843
  const OPENAI_RESPONSES_APIS = new Set(["openai-responses"]);
@@ -72859,70 +72855,6 @@ function resolveExtraParams(params) {
72859
72855
  const profile = resolveModelProfile(modelKey, params.cfg?.models?.profiles);
72860
72856
  if (profile.params && Object.keys(profile.params).length > 0) return { ...profile.params };
72861
72857
  }
72862
- /**
72863
- * Resolve cacheRetention from extraParams, supporting both new `cacheRetention`
72864
- * and legacy `cacheControlTtl` values for backwards compatibility.
72865
- *
72866
- * Mapping: "5m" → "short", "1h" → "long"
72867
- *
72868
- * Only applies to Anthropic provider (OpenRouter uses openai-completions API
72869
- * with hardcoded cache_control, not the cacheRetention stream option).
72870
- *
72871
- * Defaults to "short" for Anthropic provider when not explicitly configured.
72872
- */
72873
- function resolveCacheRetention(extraParams, provider) {
72874
- if (provider !== "anthropic") return;
72875
- const newVal = extraParams?.cacheRetention;
72876
- if (newVal === "none" || newVal === "short" || newVal === "long") return newVal;
72877
- const legacy = extraParams?.cacheControlTtl;
72878
- if (legacy === "5m") return "short";
72879
- if (legacy === "1h") return "long";
72880
- return "short";
72881
- }
72882
- function createStreamFnWithExtraParams(baseStreamFn, extraParams, provider) {
72883
- if (!extraParams || Object.keys(extraParams).length === 0) return;
72884
- const streamParams = {};
72885
- if (typeof extraParams.temperature === "number") streamParams.temperature = extraParams.temperature;
72886
- if (typeof extraParams.maxTokens === "number") streamParams.maxTokens = extraParams.maxTokens;
72887
- if (typeof extraParams.top_p === "number") streamParams.top_p = extraParams.top_p;
72888
- if (typeof extraParams.top_k === "number") streamParams.top_k = extraParams.top_k;
72889
- if (typeof extraParams.repeat_penalty === "number") streamParams.repeat_penalty = extraParams.repeat_penalty;
72890
- if (Array.isArray(extraParams.stop) && extraParams.stop.length > 0) streamParams.stop = extraParams.stop;
72891
- if (extraParams.chat_template_kwargs && typeof extraParams.chat_template_kwargs === "object") streamParams.chat_template_kwargs = extraParams.chat_template_kwargs;
72892
- const cacheRetention = resolveCacheRetention(extraParams, provider);
72893
- if (cacheRetention) streamParams.cacheRetention = cacheRetention;
72894
- if (Object.keys(streamParams).length === 0) return;
72895
- log$2.debug(`creating streamFn wrapper with params: ${JSON.stringify(streamParams)}`);
72896
- const sp = streamParams;
72897
- const payloadOverrides = {};
72898
- if (Array.isArray(sp.stop) && sp.stop.length > 0) payloadOverrides.stop = sp.stop;
72899
- if (typeof sp.top_p === "number") payloadOverrides.top_p = sp.top_p;
72900
- if (typeof sp.top_k === "number") payloadOverrides.top_k = sp.top_k;
72901
- if (typeof sp.repeat_penalty === "number") payloadOverrides.repeat_penalty = sp.repeat_penalty;
72902
- const hasPayloadOverrides = Object.keys(payloadOverrides).length > 0;
72903
- const underlying = baseStreamFn ?? streamSimple;
72904
- const wrappedStreamFn = (model, context, options) => {
72905
- if (hasPayloadOverrides) {
72906
- const originalOnPayload = options?.onPayload;
72907
- return underlying(model, context, {
72908
- ...streamParams,
72909
- ...options,
72910
- onPayload: (payload) => {
72911
- if (payload && typeof payload === "object") {
72912
- const p = payload;
72913
- for (const [key, value] of Object.entries(payloadOverrides)) if (p[key] === void 0) p[key] = value;
72914
- }
72915
- originalOnPayload?.(payload);
72916
- }
72917
- });
72918
- }
72919
- return underlying(model, context, {
72920
- ...streamParams,
72921
- ...options
72922
- });
72923
- };
72924
- return wrappedStreamFn;
72925
- }
72926
72858
  function isDirectOpenAIBaseUrl(baseUrl) {
72927
72859
  if (typeof baseUrl !== "string" || !baseUrl.trim()) return true;
72928
72860
  try {
@@ -73003,20 +72935,6 @@ function createAnthropicBetaHeadersWrapper(baseStreamFn, betas) {
73003
72935
  };
73004
72936
  }
73005
72937
  /**
73006
- * Create a streamFn wrapper that adds OpenRouter app attribution headers.
73007
- * These headers allow Symi to appear on OpenRouter's leaderboard.
73008
- */
73009
- function createOpenRouterHeadersWrapper(baseStreamFn) {
73010
- const underlying = baseStreamFn ?? streamSimple;
73011
- return (model, context, options) => underlying(model, context, {
73012
- ...options,
73013
- headers: {
73014
- ...OPENROUTER_APP_HEADERS,
73015
- ...options?.headers
73016
- }
73017
- });
73018
- }
73019
- /**
73020
72938
  * Create a streamFn wrapper that injects tool_stream=true for Z.AI providers.
73021
72939
  *
73022
72940
  * Z.AI's API supports the `tool_stream` parameter to enable real-time streaming
@@ -73039,82 +72957,6 @@ function createZaiToolStreamWrapper(baseStreamFn, enabled) {
73039
72957
  });
73040
72958
  };
73041
72959
  }
73042
- const GEMMA_STOP_SEQUENCES = ["<end_of_turn>", "<eos>"];
73043
- const VLLM_GEMMA_HINTS = ["gemma", "redsand"];
73044
- function isVllmOrGemmaProvider(provider, modelId, cfg) {
73045
- const lower = `${provider}/${modelId}`.toLowerCase();
73046
- if (VLLM_GEMMA_HINTS.some((h) => lower.includes(h))) return true;
73047
- const baseUrl = ((cfg?.models?.providers?.[provider])?.baseUrl ?? "").toLowerCase();
73048
- return baseUrl.includes("coreweave") || baseUrl.includes("vllm");
73049
- }
73050
- /**
73051
- * Wrap the stream function to fix vLLM/Gemma compat issues via onPayload:
73052
- * 1. Replace `max_completion_tokens` with `max_tokens` (vLLM ignores the former)
73053
- * 2. Inject Gemma stop sequences if none are set
73054
- * 3. Remove unsupported fields (store, stream_options.include_usage on older vLLM)
73055
- */
73056
- function createVllmCompatWrapper(baseStreamFn, extraParams) {
73057
- const underlying = baseStreamFn ?? streamSimple;
73058
- const configuredStop = Array.isArray(extraParams.stop) ? extraParams.stop : GEMMA_STOP_SEQUENCES;
73059
- return (model, context, options) => {
73060
- const originalOnPayload = options?.onPayload;
73061
- return underlying(model, context, {
73062
- ...options,
73063
- onPayload: (payload) => {
73064
- if (payload && typeof payload === "object") {
73065
- const p = payload;
73066
- if (p.max_completion_tokens && !p.max_tokens) {
73067
- p.max_tokens = p.max_completion_tokens;
73068
- delete p.max_completion_tokens;
73069
- }
73070
- if (!p.stop && configuredStop.length > 0) p.stop = configuredStop;
73071
- delete p.store;
73072
- }
73073
- originalOnPayload?.(payload);
73074
- }
73075
- });
73076
- };
73077
- }
73078
- /**
73079
- * Apply extra params (like temperature) to an agent's streamFn.
73080
- * Also adds OpenRouter app attribution headers when using the OpenRouter provider.
73081
- *
73082
- * @internal Exported for testing
73083
- */
73084
- function applyExtraParamsToAgent(agent, cfg, provider, modelId, extraParamsOverride) {
73085
- const extraParams = resolveExtraParams({
73086
- cfg,
73087
- provider,
73088
- modelId
73089
- });
73090
- const override = extraParamsOverride && Object.keys(extraParamsOverride).length > 0 ? Object.fromEntries(Object.entries(extraParamsOverride).filter(([, value]) => value !== void 0)) : void 0;
73091
- const merged = Object.assign({}, extraParams, override);
73092
- const wrappedStreamFn = createStreamFnWithExtraParams(agent.streamFn, merged, provider);
73093
- if (wrappedStreamFn) {
73094
- log$2.debug(`applying extraParams to agent streamFn for ${provider}/${modelId}`);
73095
- agent.streamFn = wrappedStreamFn;
73096
- }
73097
- const anthropicBetas = resolveAnthropicBetas(merged, provider, modelId);
73098
- if (anthropicBetas?.length) {
73099
- log$2.debug(`applying Anthropic beta header for ${provider}/${modelId}: ${anthropicBetas.join(",")}`);
73100
- agent.streamFn = createAnthropicBetaHeadersWrapper(agent.streamFn, anthropicBetas);
73101
- }
73102
- if (provider === "openrouter") {
73103
- log$2.debug(`applying OpenRouter app attribution headers for ${provider}/${modelId}`);
73104
- agent.streamFn = createOpenRouterHeadersWrapper(agent.streamFn);
73105
- }
73106
- if (provider === "zai" || provider === "z-ai") {
73107
- if (merged?.tool_stream !== false) {
73108
- log$2.debug(`enabling Z.AI tool_stream for ${provider}/${modelId}`);
73109
- agent.streamFn = createZaiToolStreamWrapper(agent.streamFn, true);
73110
- }
73111
- }
73112
- if (isVllmOrGemmaProvider(provider, modelId, cfg)) {
73113
- log$2.debug(`applying vLLM/Gemma compat wrapper for ${provider}/${modelId}`);
73114
- agent.streamFn = createVllmCompatWrapper(agent.streamFn, merged);
73115
- }
73116
- agent.streamFn = createOpenAIResponsesStoreWrapper(agent.streamFn);
73117
- }
73118
72960
 
73119
72961
  //#endregion
73120
72962
  //#region src/utils/safe-json.ts
@@ -73391,6 +73233,74 @@ function createCacheTrace(params) {
73391
73233
  };
73392
73234
  }
73393
73235
 
73236
+ //#endregion
73237
+ //#region src/agents/model-aware-stream.ts
73238
+ /**
73239
+ * Create a single stream function wrapper that handles all provider-specific
73240
+ * param injection via one onPayload hook.
73241
+ *
73242
+ * Replaces: createStreamFnWithExtraParams, createVllmCompatWrapper,
73243
+ * createOpenRouterHeadersWrapper.
73244
+ */
73245
+ function createModelAwareStreamFn(opts) {
73246
+ const underlying = opts.baseStreamFn ?? streamSimple;
73247
+ const mergedParams = {
73248
+ ...opts.profile.params,
73249
+ ...opts.configExtraParams,
73250
+ ...opts.streamParamsOverride
73251
+ };
73252
+ const nativeOpts = {};
73253
+ if (typeof mergedParams.temperature === "number") nativeOpts.temperature = mergedParams.temperature;
73254
+ if (typeof mergedParams.max_tokens === "number") nativeOpts.maxTokens = mergedParams.max_tokens;
73255
+ else if (typeof mergedParams.maxTokens === "number") nativeOpts.maxTokens = mergedParams.maxTokens;
73256
+ const injections = {};
73257
+ if (Array.isArray(mergedParams.stop) && mergedParams.stop.length > 0) injections.stop = mergedParams.stop;
73258
+ if (typeof mergedParams.top_p === "number") injections.top_p = mergedParams.top_p;
73259
+ if (typeof mergedParams.top_k === "number") injections.top_k = mergedParams.top_k;
73260
+ if (typeof mergedParams.repeat_penalty === "number") injections.repeat_penalty = mergedParams.repeat_penalty;
73261
+ const isVllm = isVllmProvider(opts.provider, opts.modelId, opts.config);
73262
+ const isOpenRouter = opts.provider === "openrouter";
73263
+ const extraHeaders = {};
73264
+ if (isOpenRouter) {
73265
+ extraHeaders["HTTP-Referer"] = "https://symi.ai";
73266
+ extraHeaders["X-Title"] = "Symi";
73267
+ }
73268
+ const hasExtraHeaders = Object.keys(extraHeaders).length > 0;
73269
+ const onPayloadHook = (payload, callerOnPayload) => {
73270
+ if (payload && typeof payload === "object") {
73271
+ const p = payload;
73272
+ for (const [key, val] of Object.entries(injections)) if (p[key] === void 0) p[key] = val;
73273
+ if (isVllm) {
73274
+ if (p.max_completion_tokens && !p.max_tokens) {
73275
+ p.max_tokens = p.max_completion_tokens;
73276
+ delete p.max_completion_tokens;
73277
+ }
73278
+ delete p.store;
73279
+ }
73280
+ }
73281
+ callerOnPayload?.(payload);
73282
+ };
73283
+ return (model, context, options) => {
73284
+ const callerOnPayload = options?.onPayload;
73285
+ return underlying(model, context, {
73286
+ ...nativeOpts,
73287
+ ...options,
73288
+ onPayload: (payload) => onPayloadHook(payload, callerOnPayload),
73289
+ ...hasExtraHeaders ? { headers: {
73290
+ ...extraHeaders,
73291
+ ...options?.headers
73292
+ } } : {}
73293
+ });
73294
+ };
73295
+ }
73296
+ /** Detect vLLM/Gemma providers by model hints or baseUrl patterns. */
73297
+ function isVllmProvider(provider, modelId, config) {
73298
+ const lower = `${provider}/${modelId}`.toLowerCase();
73299
+ if (["gemma", "redsand"].some((h) => lower.includes(h))) return true;
73300
+ const baseUrl = ((config?.models?.providers?.[provider])?.baseUrl ?? "").toLowerCase();
73301
+ return baseUrl.includes("coreweave") || baseUrl.includes("vllm");
73302
+ }
73303
+
73394
73304
  //#endregion
73395
73305
  //#region src/auto-reply/reply/streaming-directives.ts
73396
73306
  const splitTrailingDirective = (text) => {
@@ -73786,11 +73696,11 @@ function appendRawStream(payload) {
73786
73696
  if (!rawStreamReady) {
73787
73697
  rawStreamReady = true;
73788
73698
  try {
73789
- fs$1.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
73699
+ fsSync.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
73790
73700
  } catch {}
73791
73701
  }
73792
73702
  try {
73793
- fs$1.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
73703
+ fsSync.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
73794
73704
  } catch {}
73795
73705
  }
73796
73706
 
@@ -75374,6 +75284,89 @@ Use the message tool with buttons:
75374
75284
  [{"label": "✅ Proceed", "data": "/plan-proceed"}, {"label": "✏️ Modify", "data": "/plan-modify"}, {"label": "❌ Cancel", "data": "/plan-cancel"}]
75375
75285
  </plan_mode>`;
75376
75286
 
75287
+ //#endregion
75288
+ //#region src/agents/stream-monitor.ts
75289
+ /**
75290
+ * Create a stream monitor configured for the given model profile.
75291
+ *
75292
+ * - Claude (hasStructuredThinking: true): repetition detection only
75293
+ * - Gemma/vLLM (hasStructuredThinking: false): tool JSON + repetition detection
75294
+ */
75295
+ function createStreamMonitor(profile, overrides) {
75296
+ const detectToolJson = overrides?.detectToolJson ?? !profile.filters.hasStructuredThinking;
75297
+ const detectRepetition = overrides?.detectRepetition ?? true;
75298
+ const minBlockSize = overrides?.repetitionMinBlockSize ?? 150;
75299
+ let accumulated = "";
75300
+ let stopSignaled = false;
75301
+ let stopReason;
75302
+ return {
75303
+ onChunk(delta) {
75304
+ if (stopSignaled) return;
75305
+ accumulated += delta;
75306
+ if (detectToolJson && hasCompleteToolJson(accumulated)) {
75307
+ stopSignaled = true;
75308
+ stopReason = "complete-tool-json";
75309
+ return;
75310
+ }
75311
+ if (detectRepetition && hasRepetition(accumulated, minBlockSize)) {
75312
+ stopSignaled = true;
75313
+ stopReason = "repetition-detected";
75314
+ return;
75315
+ }
75316
+ },
75317
+ shouldStop: () => stopSignaled,
75318
+ getAccumulated: () => accumulated,
75319
+ getStopReason: () => stopReason,
75320
+ reset() {
75321
+ accumulated = "";
75322
+ stopSignaled = false;
75323
+ stopReason = void 0;
75324
+ }
75325
+ };
75326
+ }
75327
+ /**
75328
+ * Detect if the accumulated text contains a syntactically complete JSON
75329
+ * object with tool_name and tool_args. Used for models that output tool
75330
+ * calls as plain text JSON (not native structured tool calls).
75331
+ */
75332
+ function hasCompleteToolJson(text) {
75333
+ const hasToolKey = text.includes("tool_name") || text.includes("\"tool\"");
75334
+ const hasArgsKey = text.includes("tool_args") || text.includes("\"args\"");
75335
+ if (!hasToolKey || !hasArgsKey) return false;
75336
+ const lastBrace = text.lastIndexOf("}");
75337
+ if (lastBrace < 0) return false;
75338
+ let depth = 0;
75339
+ let start = -1;
75340
+ for (let i = lastBrace; i >= 0; i--) {
75341
+ if (text[i] === "}") depth++;
75342
+ if (text[i] === "{") depth--;
75343
+ if (depth === 0) {
75344
+ start = i;
75345
+ break;
75346
+ }
75347
+ }
75348
+ if (start < 0) return false;
75349
+ const candidate = text.slice(start, lastBrace + 1);
75350
+ try {
75351
+ const parsed = JSON.parse(candidate);
75352
+ return typeof parsed === "object" && parsed !== null && (typeof parsed.tool_name === "string" || typeof parsed.tool === "string") && (typeof parsed.tool_args === "object" || typeof parsed.args === "object");
75353
+ } catch {
75354
+ return false;
75355
+ }
75356
+ }
75357
+ /**
75358
+ * Detect if the accumulated text contains a repeated block, indicating
75359
+ * a looping cascade. Returns true if a block of `minBlockSize` chars
75360
+ * from the first half appears again in the second half.
75361
+ */
75362
+ function hasRepetition(text, minBlockSize) {
75363
+ if (text.length < minBlockSize * 2.5) return false;
75364
+ const sampleStart = Math.floor(text.length * .25);
75365
+ const sample = text.slice(sampleStart, sampleStart + minBlockSize);
75366
+ const searchStart = sampleStart + minBlockSize;
75367
+ return text.indexOf(sample, searchStart) >= 0;
75368
+ }
75369
+
75377
75370
  //#endregion
75378
75371
  //#region src/agents/symipulse-timeout.ts
75379
75372
  /**
@@ -76438,14 +76431,39 @@ async function runEmbeddedAttempt(params) {
76438
76431
  modelApi: params.model.api,
76439
76432
  workspaceDir: params.workspaceDir
76440
76433
  });
76441
- if (params.model.api === "ollama") {
76442
- const providerConfig = params.config?.models?.providers?.[params.model.provider];
76443
- const modelBaseUrl = typeof params.model.baseUrl === "string" ? params.model.baseUrl.trim() : "";
76444
- const providerBaseUrl = typeof providerConfig?.baseUrl === "string" ? providerConfig.baseUrl.trim() : "";
76445
- const ollamaBaseUrl = modelBaseUrl || providerBaseUrl || OLLAMA_NATIVE_BASE_URL;
76446
- activeSession.agent.streamFn = createOllamaStreamFn(ollamaBaseUrl);
76447
- } else activeSession.agent.streamFn = streamSimple;
76448
- applyExtraParamsToAgent(activeSession.agent, params.config, params.provider, params.modelId, params.streamParams);
76434
+ {
76435
+ let baseStreamFn = streamSimple;
76436
+ if (params.model.api === "ollama") {
76437
+ const providerConfig = params.config?.models?.providers?.[params.model.provider];
76438
+ const modelBaseUrl = typeof params.model.baseUrl === "string" ? params.model.baseUrl.trim() : "";
76439
+ const providerBaseUrl = typeof providerConfig?.baseUrl === "string" ? providerConfig.baseUrl.trim() : "";
76440
+ baseStreamFn = createOllamaStreamFn(modelBaseUrl || providerBaseUrl || OLLAMA_NATIVE_BASE_URL);
76441
+ }
76442
+ const configExtraParams = resolveExtraParams({
76443
+ cfg: params.config,
76444
+ provider: params.provider,
76445
+ modelId: params.modelId
76446
+ });
76447
+ activeSession.agent.streamFn = createModelAwareStreamFn({
76448
+ baseStreamFn,
76449
+ profile: modelProfile,
76450
+ provider: params.provider,
76451
+ modelId: params.modelId,
76452
+ config: params.config,
76453
+ configExtraParams,
76454
+ streamParamsOverride: params.streamParams
76455
+ });
76456
+ const merged = {
76457
+ ...configExtraParams,
76458
+ ...params.streamParams
76459
+ };
76460
+ const anthropicBetas = resolveAnthropicBetas(merged, params.provider, params.modelId);
76461
+ if (anthropicBetas?.length) activeSession.agent.streamFn = createAnthropicBetaHeadersWrapper(activeSession.agent.streamFn, anthropicBetas);
76462
+ if (params.provider === "zai" || params.provider === "z-ai") {
76463
+ if (merged?.tool_stream !== false) activeSession.agent.streamFn = createZaiToolStreamWrapper(activeSession.agent.streamFn, true);
76464
+ }
76465
+ activeSession.agent.streamFn = createOpenAIResponsesStoreWrapper(activeSession.agent.streamFn);
76466
+ }
76449
76467
  if (cacheTrace) {
76450
76468
  cacheTrace.recordStage("session:loaded", {
76451
76469
  messages: activeSession.messages,
@@ -76563,6 +76581,7 @@ async function runEmbeddedAttempt(params) {
76563
76581
  return fn(...args);
76564
76582
  });
76565
76583
  };
76584
+ const streamMonitor = createStreamMonitor(modelProfile);
76566
76585
  const subscription = subscribeEmbeddedPiSession({
76567
76586
  session: activeSession,
76568
76587
  runId: params.runId,
@@ -76584,6 +76603,14 @@ async function runEmbeddedAttempt(params) {
76584
76603
  onAgentEvent: (evt) => {
76585
76604
  armSymipulseTimer();
76586
76605
  params.onAgentEvent?.(evt);
76606
+ if (evt.stream === "assistant" && typeof evt.data?.text === "string" && !aborted) {
76607
+ streamMonitor.onChunk(evt.data.text);
76608
+ if (streamMonitor.shouldStop()) {
76609
+ const reason = streamMonitor.getStopReason();
76610
+ log$2.warn(`stream monitor triggered abort: runId=${params.runId} reason=${reason}`);
76611
+ abortRun(false, /* @__PURE__ */ new Error(`stream-monitor:${reason}`));
76612
+ }
76613
+ }
76587
76614
  },
76588
76615
  enforceFinalTag: params.enforceFinalTag,
76589
76616
  config: params.config,
@@ -77266,7 +77293,7 @@ async function runEmbeddedPiAgent(params) {
77266
77293
  return;
77267
77294
  }
77268
77295
  if (model.provider === "github-copilot") {
77269
- const { resolveCopilotApiToken } = await import("./github-copilot-token-C_qUP7p5.js").then((n) => n.n);
77296
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-DJqsJ2-r.js").then((n) => n.n);
77270
77297
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
77271
77298
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
77272
77299
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);