@symerian/symi 2.6.30 → 2.6.32

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 (175) hide show
  1. package/dist/{accounts-dRUMQQrB.js → accounts-3dCrO3oZ.js} +1 -1
  2. package/dist/{accounts-D1r2dq1t.js → accounts-BRw8yhIW.js} +21 -21
  3. package/dist/{accounts-wSphH5gv.js → accounts-BuZxOb3B.js} +1 -1
  4. package/dist/{active-listener-DFUTUjxt.js → active-listener-CfHHV2SU.js} +1 -1
  5. package/dist/{agent-scope-D68_xfTL.js → agent-scope-CpEJ0B88.js} +3 -3
  6. package/dist/{agents-F62kqpkn.js → agents-BIAaMNSb.js} +4 -4
  7. package/dist/{agents.config-CQ90zDyI.js → agents.config-BDtgUDFp.js} +1 -1
  8. package/dist/{agents.config-Bra6UznM.js → agents.config-BKjYekzK.js} +1 -1
  9. package/dist/{audio-preflight-CPBOQV4I.js → audio-preflight-C40mKAp7.js} +4 -4
  10. package/dist/{audio-preflight-Bdbm4htn.js → audio-preflight-DHTaS5U1.js} +29 -29
  11. package/dist/{auth-choice-X1P4E-3Z.js → auth-choice-C7BrC95t.js} +1 -1
  12. package/dist/{auth-choice-D1uIw27C.js → auth-choice-Cw2rldnf.js} +1 -1
  13. package/dist/{auth-profiles-Bl9aU7fc.js → auth-profiles-DdK1Hxaa.js} +17 -17
  14. package/dist/{banner-BabW0wLs.js → banner-DCF8IifK.js} +1 -1
  15. package/dist/{bindings-Bat2RnAR.js → bindings-BsHoBLIE.js} +2 -2
  16. package/dist/build-info.json +3 -3
  17. package/dist/bundled/boot-md/handler.js +53 -53
  18. package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
  19. package/dist/bundled/command-logger/handler.js +1 -1
  20. package/dist/bundled/session-memory/handler.js +53 -53
  21. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  22. package/dist/{channel-activity-DK0AV-r9.js → channel-activity-B6G1jnQT.js} +1 -1
  23. package/dist/{channel-options-CX-LE2dk.js → channel-options-BaC3G5sc.js} +1 -1
  24. package/dist/{channel-options-C64unDdQ.js → channel-options-DHSRuD2s.js} +1 -1
  25. package/dist/{channel-web-GzdyP40j.js → channel-web-YXrZZHRE.js} +1 -1
  26. package/dist/{channels-cli-CQrhnixR.js → channels-cli-CfMJGgBp.js} +4 -4
  27. package/dist/{channels-cli-OymBYTkK.js → channels-cli-DODlfOu4.js} +4 -4
  28. package/dist/{chrome-BdQhP7bg.js → chrome-CDJYxX5a.js} +23 -23
  29. package/dist/{chrome-D2SKJnR7.js → chrome-DYZwl5Gv.js} +5 -5
  30. package/dist/{chunk-DR8ukp6r.js → chunk-09egQapi.js} +1 -1
  31. package/dist/{cli-zchCoTxI.js → cli-CSlDsUKl.js} +1 -1
  32. package/dist/{cli-C1RjRVMT.js → cli-CVqXnzze.js} +1 -1
  33. package/dist/{command-registry-D9xmmn9v.js → command-registry-ajP42kpE.js} +9 -9
  34. package/dist/{commands-registry-DIakZUZb.js → commands-registry-Bfc7Uz0o.js} +4 -4
  35. package/dist/{completion-cli-CfhJhArh.js → completion-cli-Dui7LK9s.js} +1 -1
  36. package/dist/{completion-cli-CdMbiAwX.js → completion-cli-zokW-yVf.js} +2 -2
  37. package/dist/{config-CvmE3Yx1.js → config-5SdHIcHU.js} +12 -12
  38. package/dist/{config-cli-BWhToRSW.js → config-cli-BjXnB1c7.js} +1 -1
  39. package/dist/{config-cli-De0w9QFu.js → config-cli-BxSBpwuL.js} +1 -1
  40. package/dist/{configure-iCtE2gdv.js → configure-CIFt3G-c.js} +3 -3
  41. package/dist/{configure-DBPxwVXT.js → configure-De-0b4bB.js} +3 -3
  42. package/dist/control-ui/js/models.js +2 -2
  43. package/dist/{deliver-C-37cZUe.js → deliver-BH0l3UKW.js} +1 -1
  44. package/dist/{deliver-BD6kFk6p.js → deliver-dODxSv3b.js} +20 -20
  45. package/dist/{diagnostic-spWOtH_g.js → diagnostic-rPhsBoZz.js} +1 -1
  46. package/dist/{doctor-completion-Cuy1NwzL.js → doctor-completion-DaGKVo6p.js} +1 -1
  47. package/dist/{doctor-completion-htc4kMhg.js → doctor-completion-kr-VbXG-.js} +1 -1
  48. package/dist/entry.js +1 -1
  49. package/dist/{env-xmBFQPBP.js → env-BDXYbTKj.js} +1 -1
  50. package/dist/extensionAPI.js +6 -6
  51. package/dist/{frontmatter-CV0YkjoY.js → frontmatter-CTR5f_Ez.js} +2 -2
  52. package/dist/{gateway-cli-DxSUgxx3.js → gateway-cli-7pMi8rn1.js} +9 -9
  53. package/dist/{gateway-cli-pIBNUJhN.js → gateway-cli-DdbomLMt.js} +9 -9
  54. package/dist/{gemini-auth-C6Z-2T42.js → gemini-auth-Dy12ZAH3.js} +1 -1
  55. package/dist/{github-copilot-token-B8B2pmph.js → github-copilot-token-cCYzSU9h.js} +7 -7
  56. package/dist/{glass-ui-ws-B5Iw-tYt.js → glass-ui-ws-vx0iMfPn.js} +7 -7
  57. package/dist/{glass-ui-ws-BVcaUJ4x.js → glass-ui-ws-z-ryIbt7.js} +7 -7
  58. package/dist/{health-qWkLoxz7.js → health-BNxdveY8.js} +1 -1
  59. package/dist/{health-DK1EhshZ.js → health-pFcca1cU.js} +1 -1
  60. package/dist/{hooks-cli-QmJBRt0j.js → hooks-cli-DefzmbZl.js} +2 -2
  61. package/dist/{hooks-cli-Bt_pfMq8.js → hooks-cli-Dqe7WVzD.js} +2 -2
  62. package/dist/{image-DcpMiprB.js → image-CHzdaNJ4.js} +1 -1
  63. package/dist/{image-CE0mENPo.js → image-CXu8W39c.js} +4 -4
  64. package/dist/{image-ops-M5agStZn.js → image-ops-C7CauEK8.js} +16 -16
  65. package/dist/index.js +6 -6
  66. package/dist/{ir-B-XXcYFe.js → ir-CTiz95Vb.js} +4 -4
  67. package/dist/llm-slug-generator.js +53 -53
  68. package/dist/{local-roots-CdXg5-Cx.js → local-roots-DhZz0Ybs.js} +5 -5
  69. package/dist/{login-qr-BKIOHn1V.js → login-qr-AP9agO-i.js} +12 -12
  70. package/dist/{login-BHUrERYo.js → login-ul8zaw_S.js} +7 -7
  71. package/dist/{manager-DW3JqFpY.js → manager-PprhCvO_.js} +22 -22
  72. package/dist/{manifest-registry-0J48biqr.js → manifest-registry-yb7sAlu4.js} +19 -19
  73. package/dist/{markdown-tables-tW9bGjLM.js → markdown-tables-C-BmIap8.js} +1 -1
  74. package/dist/{message-channel-DwDSKGn4.js → message-channel-OlFBYAw8.js} +1 -1
  75. package/dist/{models-CBAKijCe.js → models-c9cOxxrP.js} +2 -2
  76. package/dist/{models-cli-CtWHHvR0.js → models-cli-BhOA86hd.js} +3 -3
  77. package/dist/{models-cli-DkNjxGZ8.js → models-cli-Cosjljgg.js} +2 -2
  78. package/dist/{onboard-BmK2-tfb.js → onboard-C4DXGi07.js} +2 -2
  79. package/dist/{onboard-wJCi24zf.js → onboard-Dadg5mWZ.js} +2 -2
  80. package/dist/{onboard-channels-CnNA3U8_.js → onboard-channels-BAEFSSqU.js} +1 -1
  81. package/dist/{onboard-channels-CcoMVcOs.js → onboard-channels-BjUx6cZ7.js} +1 -1
  82. package/dist/{onboarding-GGE9UgcE.js → onboarding-Be8-Muma.js} +3 -3
  83. package/dist/{onboarding-Cs7XncoX.js → onboarding-BesMJD5M.js} +3 -3
  84. package/dist/{onboarding.finalize-BEMefoBu.js → onboarding.finalize-BdFKvepX.js} +6 -6
  85. package/dist/{onboarding.finalize-CawqY9YT.js → onboarding.finalize-Cbo7t2w6.js} +5 -5
  86. package/dist/{outbound-CIVsLpJK.js → outbound-CtMCmwxR.js} +7 -7
  87. package/dist/{outbound-attachment-CHcmlip8.js → outbound-attachment-DJldbweZ.js} +2 -2
  88. package/dist/{paths-DEuVuViW.js → paths-CbQV9WEg.js} +1 -1
  89. package/dist/{pi-auth-json-BYuCWAs0.js → pi-auth-json-Bk8ERadJ.js} +8 -8
  90. package/dist/{pi-embedded-eCY-k0yS.js → pi-embedded-CziuxRtW.js} +19 -19
  91. package/dist/{pi-embedded-helpers-B8kqLWns.js → pi-embedded-helpers-lgx_U5KS.js} +4 -4
  92. package/dist/{pi-embedded-helpers-Pnxzi8V5.js → pi-embedded-helpers-pubKo8HQ.js} +73 -73
  93. package/dist/{plugin-registry-C-RHl6z7.js → plugin-registry-BkFixq63.js} +1 -1
  94. package/dist/{plugin-registry-BqSezGzv.js → plugin-registry-Ls_YGsWz.js} +1 -1
  95. package/dist/plugin-sdk/{channel-web-BOFr3AaP.js → channel-web-D4P9MkFu.js} +1 -1
  96. package/dist/plugin-sdk/index.js +2 -2
  97. package/dist/plugin-sdk/{reply-B7rSYofo.js → reply-BVs4oalQ.js} +5 -5
  98. package/dist/plugin-sdk/{web-iaHlqNQD.js → web-DiQTcviv.js} +2 -2
  99. package/dist/{plugins-Bkr5ZdYs.js → plugins-BzmbgY7s.js} +9 -9
  100. package/dist/{plugins-cli-D5l8DCUo.js → plugins-cli-CJLJsr_L.js} +2 -2
  101. package/dist/{plugins-cli-DIKVN1j-.js → plugins-cli-DXiakDnC.js} +2 -2
  102. package/dist/{program-DKp_gWvH.js → program-CqxmOFY5.js} +7 -7
  103. package/dist/{program-context-CJO5zWl7.js → program-context-CWoc-4O6.js} +17 -17
  104. package/dist/{prompt-select-styled-Drbf4MLf.js → prompt-select-styled-C5YCowXp.js} +4 -4
  105. package/dist/{prompt-select-styled-CuDVrio_.js → prompt-select-styled-DKTE77Rw.js} +4 -4
  106. package/dist/{provider-auth-helpers-ku70HLId.js → provider-auth-helpers-B_Rtgt-w.js} +1 -1
  107. package/dist/{provider-auth-helpers-D0JrH_QE.js → provider-auth-helpers-Bi5oeREh.js} +1 -1
  108. package/dist/{push-apns-DZvXSHuB.js → push-apns-Bmd6SdxC.js} +1 -1
  109. package/dist/{push-apns-DWLiMsGQ.js → push-apns-BzIW-JHE.js} +1 -1
  110. package/dist/{pw-ai-BA-fJnJc.js → pw-ai-B5asscAD.js} +11 -11
  111. package/dist/{pw-ai-1htA-NnS.js → pw-ai-De-KR9_s.js} +1 -1
  112. package/dist/{qmd-manager-BKu9rOuB.js → qmd-manager-iDLSiI4Z.js} +7 -7
  113. package/dist/{register.agent-CW-Jt26a.js → register.agent-Vc2Bu3J4.js} +5 -5
  114. package/dist/{register.agent-Dr-AvNVj.js → register.agent-kKtKgmcO.js} +6 -6
  115. package/dist/{register.configure-D3_5DZTq.js → register.configure-BnNPTLBI.js} +6 -6
  116. package/dist/{register.configure-CPykN4LB.js → register.configure-D-o-geWg.js} +6 -6
  117. package/dist/{register.maintenance-BOxfAudK.js → register.maintenance-BhhUMTAr.js} +7 -7
  118. package/dist/{register.maintenance-BValTiSe.js → register.maintenance-Ea70NNls.js} +8 -8
  119. package/dist/{register.message-lbfcALgz.js → register.message-C9zVQOWl.js} +2 -2
  120. package/dist/{register.message-BzVaP85q.js → register.message-CdCHhVND.js} +2 -2
  121. package/dist/{register.onboard-B_CORRMq.js → register.onboard-1HGg8A_B.js} +4 -4
  122. package/dist/{register.onboard-CxhJjGFr.js → register.onboard-CbGEztLT.js} +4 -4
  123. package/dist/{register.setup-DeT-WyJj.js → register.setup-8LYTLZMG.js} +4 -4
  124. package/dist/{register.setup-CYeKu0ru.js → register.setup-BRKstpuL.js} +4 -4
  125. package/dist/{register.status-health-sessions-BrNEfd3r.js → register.status-health-sessions-BLA4yUC4.js} +3 -3
  126. package/dist/{register.status-health-sessions-CYwrV6QO.js → register.status-health-sessions-BtGRpngz.js} +3 -3
  127. package/dist/{register.subclis-BCcY1GJC.js → register.subclis-FAdASegj.js} +9 -9
  128. package/dist/{registry-UkL38jvt.js → registry-DYq1AYOv.js} +17 -17
  129. package/dist/{replies-mfnbLu2p.js → replies-LSmuwOhA.js} +3 -3
  130. package/dist/{reply-BNLTgD0A.js → reply-C68F3IMq.js} +5 -5
  131. package/dist/{reply-prefix-DkGsdyBm.js → reply-prefix-DpqZu44Z.js} +1 -1
  132. package/dist/{resolve-route-q8AFnU5c.js → resolve-route-C4_I4GFI.js} +4 -4
  133. package/dist/{retry-CqMeDhyp.js → retry-BBVXkKBV.js} +1 -1
  134. package/dist/{run-main-BVSVpxZ3.js → run-main-DqKSUzps.js} +14 -14
  135. package/dist/{runner-BcQ0sF9T.js → runner-DUBExAb5.js} +1 -1
  136. package/dist/{runner-BnAUcMiq.js → runner-WAG0M5s9.js} +22 -22
  137. package/dist/{send-Cd81AY_Z.js → send-CQAKg_12.js} +7 -7
  138. package/dist/{send-qItpAHcI.js → send-CVMyYPQw.js} +6 -6
  139. package/dist/{send-D3zDmQim.js → send-CvhXrdgS.js} +10 -10
  140. package/dist/{send-XRUYukww.js → send-DAN9hA5h.js} +6 -6
  141. package/dist/{send-B7z8CDbr.js → send-DYj_o4_F.js} +18 -18
  142. package/dist/{server-methods-BhRjuKEM.js → server-methods-B4IR7jcD.js} +7 -7
  143. package/dist/{server-methods-BYcfPp30.js → server-methods-n5oCz2e0.js} +7 -7
  144. package/dist/{server-node-events-BEzZn2VI.js → server-node-events---jWWBKN.js} +2 -2
  145. package/dist/{server-node-events-BsPi-QDx.js → server-node-events-C3hHerD3.js} +2 -2
  146. package/dist/{session-Dh2wWQkD.js → session-DSU1vxxi.js} +8 -8
  147. package/dist/{skill-commands-B_f8uGi7.js → skill-commands-DcVwOafC.js} +16 -16
  148. package/dist/{skills-CGHRETGF.js → skills-Bs0AW1g3.js} +24 -24
  149. package/dist/{sqlite-Bv87EXeg.js → sqlite-D_mz1_-y.js} +16 -16
  150. package/dist/{status-BZgA_AUW.js → status-8CbQSAEF.js} +1 -1
  151. package/dist/{status-C7VswIJF.js → status-ClvXAaHZ.js} +1 -1
  152. package/dist/{status-BB7l5YGy.js → status-CwhHbhUv.js} +2 -2
  153. package/dist/{status-D9MVzUtM.js → status-ITRlj7e_.js} +2 -2
  154. package/dist/{store-Ea3zM6xK.js → store-01F_JM7O.js} +6 -6
  155. package/dist/{subagent-registry-CT87UyVy.js → subagent-registry-BXI3DyAX.js} +5 -5
  156. package/dist/{subsystem-DN75fnEF.js → subsystem-BjyjJF-d.js} +1 -1
  157. package/dist/{tables-BX7_aBvN.js → tables-qMwbq29u.js} +1 -1
  158. package/dist/{target-errors-7KhTCTdS.js → target-errors-Bbr9rlzN.js} +2 -2
  159. package/dist/{thinking-C9-JAUzD.js → thinking-BprCy23Z.js} +5 -5
  160. package/dist/{tokens-BZGy4v--.js → tokens-Bux9Y_xD.js} +1 -1
  161. package/dist/{tool-images-B1qVCntj.js → tool-images-SqqWIT22.js} +2 -2
  162. package/dist/{tool-loop-detection-C8FBZVVx.js → tool-loop-detection-DR_rrIA1.js} +3 -3
  163. package/dist/{unified-runner-LSPKHmvx.js → unified-runner-Dy2eq7ZO.js} +223 -223
  164. package/dist/{update-cli-DEbsukOW.js → update-cli-0aSAmmmj.js} +8 -8
  165. package/dist/{update-cli-Dyg_WetV.js → update-cli-CfKfjAnO.js} +7 -7
  166. package/dist/{update-runner-3-pTGczW.js → update-runner-C17bqGvO.js} +1 -1
  167. package/dist/{update-runner-DYuIPErv.js → update-runner-e_ChofHM.js} +1 -1
  168. package/dist/{web-Bu_faeV-.js → web-BTiGD3po.js} +6 -6
  169. package/dist/{web-DyvSF1Pu.js → web-CP9nUIj0.js} +57 -57
  170. package/dist/{web-Q47zU0qb.js → web-Cih6rPbV.js} +2 -2
  171. package/dist/{web-CB7FYstW.js → web-Dr9gUjHz.js} +1 -1
  172. package/dist/{whatsapp-actions-SXenaJIn.js → whatsapp-actions-BIeSWsCF.js} +23 -23
  173. package/dist/{workspace-DqJ5h-ZB.js → workspace-DscDraUb.js} +27 -27
  174. package/package.json +1 -1
  175. package/dist/paths-CYmyCDsE.js +0 -212
@@ -1,76 +1,76 @@
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-CYmyCDsE.js";
2
+ import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CE7eVGHg.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-UkL38jvt.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-D68_xfTL.js";
6
- import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-DN75fnEF.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-DqJ5h-ZB.js";
8
- import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DEuVuViW.js";
9
- import { $ as resolveSymiAgentDir, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, H as resolveModelAuthMode, I as createOllamaStreamFn, K as resolveShellEnvFallbackTimeoutMs, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as resolveAuthProfileDisplayLabel, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, U as normalizeSecretInput, V as resolveEnvApiKey, W as getShellPathFromLoginShell, X as DEFAULT_MODEL, Y as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_PROVIDER, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-Bl9aU7fc.js";
10
- import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-xmBFQPBP.js";
11
- import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-B8B2pmph.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-DYq1AYOv.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-CpEJ0B88.js";
6
+ import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-BjyjJF-d.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-DscDraUb.js";
8
+ import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-CbQV9WEg.js";
9
+ import { $ as resolveSymiAgentDir, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, H as resolveModelAuthMode, I as createOllamaStreamFn, K as resolveShellEnvFallbackTimeoutMs, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as resolveAuthProfileDisplayLabel, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, U as normalizeSecretInput, V as resolveEnvApiKey, W as getShellPathFromLoginShell, X as DEFAULT_MODEL, Y as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_PROVIDER, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-DdK1Hxaa.js";
10
+ import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-BDXYbTKj.js";
11
+ import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-cCYzSU9h.js";
12
12
  import { t as parseBooleanValue$1 } from "./boolean-CE7i9tBR.js";
13
- 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-Pnxzi8V5.js";
14
- 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-CvmE3Yx1.js";
15
- 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-0J48biqr.js";
16
- import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-BdQhP7bg.js";
17
- 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-CGHRETGF.js";
13
+ 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-pubKo8HQ.js";
14
+ 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-5SdHIcHU.js";
15
+ 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-yb7sAlu4.js";
16
+ import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-DYZwl5Gv.js";
17
+ 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-Bs0AW1g3.js";
18
18
  import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-XIsvXeC-.js";
19
- import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-M5agStZn.js";
19
+ import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-C7CauEK8.js";
20
20
  import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-DpUUUgkK.js";
21
- import { n as getMediaDir, r as saveMediaBuffer } from "./store-Ea3zM6xK.js";
22
- 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-C9-JAUzD.js";
23
- 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-DwDSKGn4.js";
21
+ import { n as getMediaDir, r as saveMediaBuffer } from "./store-01F_JM7O.js";
22
+ 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-BprCy23Z.js";
23
+ 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-OlFBYAw8.js";
24
24
  import { t as normalizeChatType } from "./chat-type-3FRbbjbq.js";
25
25
  import { n as resolveConversationLabel } from "./conversation-label-Onz2hiJh.js";
26
- 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-Bkr5ZdYs.js";
27
- import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-D1r2dq1t.js";
28
- import { t as resolveIMessageAccount } from "./accounts-dRUMQQrB.js";
29
- import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-wSphH5gv.js";
30
- 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-qItpAHcI.js";
31
- 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-D3zDmQim.js";
26
+ 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-BzmbgY7s.js";
27
+ import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-BRw8yhIW.js";
28
+ import { t as resolveIMessageAccount } from "./accounts-3dCrO3oZ.js";
29
+ import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-BuZxOb3B.js";
30
+ 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-CVMyYPQw.js";
31
+ 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-CvhXrdgS.js";
32
32
  import { t as emitSessionTranscriptUpdate } from "./transcript-events-BBh3Gsrx.js";
33
- import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-B1qVCntj.js";
34
- 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-BD6kFk6p.js";
35
- 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-spWOtH_g.js";
33
+ import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-SqqWIT22.js";
34
+ 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-dODxSv3b.js";
35
+ 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-rPhsBoZz.js";
36
36
  import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Zw87xFym.js";
37
- 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-CE0mENPo.js";
38
- import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-BZGy4v--.js";
39
- 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-B7z8CDbr.js";
37
+ 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-CXu8W39c.js";
38
+ import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-Bux9Y_xD.js";
39
+ 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-DYj_o4_F.js";
40
40
  import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-Bv5YDJc8.js";
41
- import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-DkGsdyBm.js";
42
- import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-DW3JqFpY.js";
43
- import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-Bv87EXeg.js";
44
- import { n as retryAsync } from "./retry-CqMeDhyp.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-7KhTCTdS.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-DR8ukp6r.js";
47
- import { n as resolveMarkdownTableMode } from "./markdown-tables-tW9bGjLM.js";
41
+ import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-DpqZu44Z.js";
42
+ import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-PprhCvO_.js";
43
+ import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-D_mz1_-y.js";
44
+ import { n as retryAsync } from "./retry-BBVXkKBV.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-Bbr9rlzN.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-09egQapi.js";
47
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-C-BmIap8.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-CdXg5-Cx.js";
50
- import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-B-XXcYFe.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-DIakZUZb.js";
52
- import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as registerUnhandledRejectionHandler } from "./runner-BnAUcMiq.js";
53
- 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-B_f8uGi7.js";
49
+ import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-DhZz0Ybs.js";
50
+ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-CTiz95Vb.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-Bfc7Uz0o.js";
52
+ import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as registerUnhandledRejectionHandler } from "./runner-WAG0M5s9.js";
53
+ 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-DcVwOafC.js";
54
54
  import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-DSDTl6Kj.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-DK0AV-r9.js";
57
+ import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-B6G1jnQT.js";
58
58
  import { n as normalizePollInput } from "./polls-CCuCaqgv.js";
59
- import { t as convertMarkdownTables } from "./tables-BX7_aBvN.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-XRUYukww.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-Cd81AY_Z.js";
62
- import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-q8AFnU5c.js";
59
+ import { t as convertMarkdownTables } from "./tables-qMwbq29u.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-DAN9hA5h.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-CQAKg_12.js";
62
+ import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-C4_I4GFI.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-mfnbLu2p.js";
65
- import { t as getActiveWebListener } from "./active-listener-DFUTUjxt.js";
64
+ import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-LSmuwOhA.js";
65
+ import { t as getActiveWebListener } from "./active-listener-CfHHV2SU.js";
66
66
  import { createRequire } from "node:module";
67
67
  import * as path$1 from "node:path";
68
68
  import path from "node:path";
69
- import fsSync, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
69
+ import fs, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
70
70
  import os, { homedir } from "node:os";
71
71
  import JSON5 from "json5";
72
- import * as fs$1 from "node:fs/promises";
73
- import fs from "node:fs/promises";
72
+ import * as fs$2 from "node:fs/promises";
73
+ import fs$1 from "node:fs/promises";
74
74
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
75
75
  import { inspect, promisify } from "node:util";
76
76
  import { fileURLToPath } from "node:url";
@@ -223,7 +223,7 @@ const BUILTIN_PROFILES = [
223
223
  temperature: 1,
224
224
  top_p: .95,
225
225
  top_k: 64,
226
- max_tokens: 8192
226
+ max_tokens: 16384
227
227
  },
228
228
  streaming: {
229
229
  deltaThrottleMs: 50,
@@ -233,7 +233,7 @@ const BUILTIN_PROFILES = [
233
233
  filters: {
234
234
  stripPatterns: [],
235
235
  suppressMonologue: true,
236
- hasStructuredThinking: false,
236
+ hasStructuredThinking: true,
237
237
  validateToolArgs: false
238
238
  },
239
239
  promptAdditions: [
@@ -248,7 +248,7 @@ const BUILTIN_PROFILES = [
248
248
  ],
249
249
  ui: {
250
250
  badge: "CoreWeave",
251
- watchdogMs: 6e5,
251
+ watchdogMs: 9e5,
252
252
  armWatchdogOnSend: true
253
253
  }
254
254
  }
@@ -3921,7 +3921,7 @@ async function resolveSymiDocsPath(params) {
3921
3921
  const workspaceDir = params.workspaceDir?.trim();
3922
3922
  if (workspaceDir) {
3923
3923
  const workspaceDocs = path.join(workspaceDir, "docs");
3924
- if (fsSync.existsSync(workspaceDocs)) return workspaceDocs;
3924
+ if (fs.existsSync(workspaceDocs)) return workspaceDocs;
3925
3925
  }
3926
3926
  const packageRoot = await resolveSymiPackageRoot({
3927
3927
  cwd: params.cwd,
@@ -3930,7 +3930,7 @@ async function resolveSymiDocsPath(params) {
3930
3930
  });
3931
3931
  if (!packageRoot) return null;
3932
3932
  const packageDocs = path.join(packageRoot, "docs");
3933
- return fsSync.existsSync(packageDocs) ? packageDocs : null;
3933
+ return fs.existsSync(packageDocs) ? packageDocs : null;
3934
3934
  }
3935
3935
 
3936
3936
  //#endregion
@@ -4239,7 +4239,7 @@ async function getMemorySearchManager(params) {
4239
4239
  if (cached) return { manager: cached };
4240
4240
  }
4241
4241
  try {
4242
- const { QmdMemoryManager } = await import("./qmd-manager-BKu9rOuB.js");
4242
+ const { QmdMemoryManager } = await import("./qmd-manager-iDLSiI4Z.js");
4243
4243
  const primary = await QmdMemoryManager.create({
4244
4244
  cfg: params.cfg,
4245
4245
  agentId: params.agentId,
@@ -4251,7 +4251,7 @@ async function getMemorySearchManager(params) {
4251
4251
  const wrapper = new FallbackMemoryManager({
4252
4252
  primary,
4253
4253
  fallbackFactory: async () => {
4254
- const { MemoryIndexManager } = await import("./manager-DW3JqFpY.js").then((n) => n.t);
4254
+ const { MemoryIndexManager } = await import("./manager-PprhCvO_.js").then((n) => n.t);
4255
4255
  return await MemoryIndexManager.get(params);
4256
4256
  }
4257
4257
  }, () => QMD_MANAGER_CACHE.delete(cacheKey));
@@ -4264,7 +4264,7 @@ async function getMemorySearchManager(params) {
4264
4264
  }
4265
4265
  }
4266
4266
  try {
4267
- const { MemoryIndexManager } = await import("./manager-DW3JqFpY.js").then((n) => n.t);
4267
+ const { MemoryIndexManager } = await import("./manager-PprhCvO_.js").then((n) => n.t);
4268
4268
  return { manager: await MemoryIndexManager.get(params) };
4269
4269
  } catch (err) {
4270
4270
  return {
@@ -6812,7 +6812,7 @@ async function recordLoopOutcome(args) {
6812
6812
  if (!args.ctx?.sessionKey) return;
6813
6813
  try {
6814
6814
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
6815
- const { recordToolCallOutcome } = await import("./tool-loop-detection-C8FBZVVx.js");
6815
+ const { recordToolCallOutcome } = await import("./tool-loop-detection-DR_rrIA1.js");
6816
6816
  recordToolCallOutcome(getDiagnosticSessionState({
6817
6817
  sessionKey: args.ctx.sessionKey,
6818
6818
  sessionId: args.ctx?.agentId
@@ -6833,8 +6833,8 @@ async function runBeforeToolCallHook(args) {
6833
6833
  const params = args.params;
6834
6834
  if (args.ctx?.sessionKey) {
6835
6835
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
6836
- const { logToolLoopAction } = await import("./diagnostic-spWOtH_g.js").then((n) => n.n);
6837
- const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-C8FBZVVx.js");
6836
+ const { logToolLoopAction } = await import("./diagnostic-rPhsBoZz.js").then((n) => n.n);
6837
+ const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-DR_rrIA1.js");
6838
6838
  const sessionState = getDiagnosticSessionState({
6839
6839
  sessionKey: args.ctx.sessionKey,
6840
6840
  sessionId: args.ctx?.agentId
@@ -7121,7 +7121,7 @@ function resolveDefaultIdentityPath() {
7121
7121
  return path.join(resolveStateDir(), "identity", "device.json");
7122
7122
  }
7123
7123
  function ensureDir$2(filePath) {
7124
- fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
7124
+ fs.mkdirSync(path.dirname(filePath), { recursive: true });
7125
7125
  }
7126
7126
  const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
7127
7127
  function base64UrlEncode(buf) {
@@ -7157,8 +7157,8 @@ function generateIdentity() {
7157
7157
  }
7158
7158
  function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
7159
7159
  try {
7160
- if (fsSync.existsSync(filePath)) {
7161
- const raw = fsSync.readFileSync(filePath, "utf8");
7160
+ if (fs.existsSync(filePath)) {
7161
+ const raw = fs.readFileSync(filePath, "utf8");
7162
7162
  const parsed = JSON.parse(raw);
7163
7163
  if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
7164
7164
  const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
@@ -7167,9 +7167,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
7167
7167
  ...parsed,
7168
7168
  deviceId: derivedId
7169
7169
  };
7170
- fsSync.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
7170
+ fs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
7171
7171
  try {
7172
- fsSync.chmodSync(filePath, 384);
7172
+ fs.chmodSync(filePath, 384);
7173
7173
  } catch {}
7174
7174
  return {
7175
7175
  deviceId: derivedId,
@@ -7194,9 +7194,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
7194
7194
  privateKeyPem: identity.privateKeyPem,
7195
7195
  createdAtMs: Date.now()
7196
7196
  };
7197
- fsSync.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
7197
+ fs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
7198
7198
  try {
7199
- fsSync.chmodSync(filePath, 384);
7199
+ fs.chmodSync(filePath, 384);
7200
7200
  } catch {}
7201
7201
  return identity;
7202
7202
  }
@@ -7219,7 +7219,7 @@ function normalizeFingerprint(input) {
7219
7219
  const execFileAsync = promisify(execFile);
7220
7220
  async function fileExists(filePath) {
7221
7221
  try {
7222
- await fs.access(filePath);
7222
+ await fs$1.access(filePath);
7223
7223
  return true;
7224
7224
  } catch {
7225
7225
  return false;
@@ -7246,8 +7246,8 @@ async function generateSelfSignedCert(params) {
7246
7246
  "-subj",
7247
7247
  "/CN=symi-gateway"
7248
7248
  ]);
7249
- await fs.chmod(params.keyPath, 384).catch(() => {});
7250
- await fs.chmod(params.certPath, 384).catch(() => {});
7249
+ await fs$1.chmod(params.keyPath, 384).catch(() => {});
7250
+ await fs$1.chmod(params.certPath, 384).catch(() => {});
7251
7251
  params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
7252
7252
  }
7253
7253
  async function loadGatewayTlsRuntime(cfg, log) {
@@ -7285,9 +7285,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
7285
7285
  error: "gateway tls: cert/key missing"
7286
7286
  };
7287
7287
  try {
7288
- const cert = await fs.readFile(certPath, "utf8");
7289
- const key = await fs.readFile(keyPath, "utf8");
7290
- const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
7288
+ const cert = await fs$1.readFile(certPath, "utf8");
7289
+ const key = await fs$1.readFile(keyPath, "utf8");
7290
+ const ca = caPath ? await fs$1.readFile(caPath, "utf8") : void 0;
7291
7291
  const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
7292
7292
  if (!fingerprintSha256) return {
7293
7293
  enabled: false,
@@ -7346,8 +7346,8 @@ function resolveDeviceAuthPath(env = process.env) {
7346
7346
  }
7347
7347
  function readStore(filePath) {
7348
7348
  try {
7349
- if (!fsSync.existsSync(filePath)) return null;
7350
- const raw = fsSync.readFileSync(filePath, "utf8");
7349
+ if (!fs.existsSync(filePath)) return null;
7350
+ const raw = fs.readFileSync(filePath, "utf8");
7351
7351
  const parsed = JSON.parse(raw);
7352
7352
  if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
7353
7353
  if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
@@ -7357,10 +7357,10 @@ function readStore(filePath) {
7357
7357
  }
7358
7358
  }
7359
7359
  function writeStore(filePath, store) {
7360
- fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
7361
- fsSync.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
7360
+ fs.mkdirSync(path.dirname(filePath), { recursive: true });
7361
+ fs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
7362
7362
  try {
7363
- fsSync.chmodSync(filePath, 384);
7363
+ fs.chmodSync(filePath, 384);
7364
7364
  } catch {}
7365
7365
  }
7366
7366
  function loadDeviceAuthToken(params) {
@@ -10147,7 +10147,7 @@ async function routeReply(params) {
10147
10147
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
10148
10148
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
10149
10149
  try {
10150
- const { deliverOutboundPayloads } = await import("./deliver-BD6kFk6p.js").then((n) => n.n);
10150
+ const { deliverOutboundPayloads } = await import("./deliver-dODxSv3b.js").then((n) => n.n);
10151
10151
  return {
10152
10152
  ok: true,
10153
10153
  messageId: (await deliverOutboundPayloads({
@@ -10543,7 +10543,7 @@ function normalizeSessionKey(value) {
10543
10543
  }
10544
10544
  function readSessionStore(storePath) {
10545
10545
  try {
10546
- const raw = fsSync.readFileSync(storePath, "utf-8");
10546
+ const raw = fs.readFileSync(storePath, "utf-8");
10547
10547
  const parsed = JSON5.parse(raw);
10548
10548
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
10549
10549
  } catch {}
@@ -15602,7 +15602,7 @@ async function createModelSelectionState(params) {
15602
15602
  }
15603
15603
  }
15604
15604
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
15605
- const { ensureAuthProfileStore } = await import("./auth-profiles-Bl9aU7fc.js").then((n) => n.t);
15605
+ const { ensureAuthProfileStore } = await import("./auth-profiles-DdK1Hxaa.js").then((n) => n.t);
15606
15606
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
15607
15607
  const providerKey = normalizeProviderId(provider);
15608
15608
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -17975,8 +17975,8 @@ const DEFAULT_SAFE_BINS = [
17975
17975
  ];
17976
17976
  function isExecutableFile(filePath) {
17977
17977
  try {
17978
- if (!fsSync.statSync(filePath).isFile()) return false;
17979
- if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
17978
+ if (!fs.statSync(filePath).isFile()) return false;
17979
+ if (process.platform !== "win32") fs.accessSync(filePath, fs.constants.X_OK);
17980
17980
  return true;
17981
17981
  } catch {
17982
17982
  return false;
@@ -18014,7 +18014,7 @@ function normalizeMatchTarget(value) {
18014
18014
  }
18015
18015
  function tryRealpath(value) {
18016
18016
  try {
18017
- return fsSync.realpathSync(value);
18017
+ return fs.realpathSync(value);
18018
18018
  } catch {
18019
18019
  return null;
18020
18020
  }
@@ -19246,7 +19246,7 @@ function mergeLegacyAgent(current, legacy) {
19246
19246
  }
19247
19247
  function ensureDir$1(filePath) {
19248
19248
  const dir = path.dirname(filePath);
19249
- fsSync.mkdirSync(dir, { recursive: true });
19249
+ fs.mkdirSync(dir, { recursive: true });
19250
19250
  }
19251
19251
  function coerceAllowlistEntries(allowlist) {
19252
19252
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -19316,11 +19316,11 @@ function generateToken() {
19316
19316
  function loadExecApprovals() {
19317
19317
  const filePath = resolveExecApprovalsPath();
19318
19318
  try {
19319
- if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
19319
+ if (!fs.existsSync(filePath)) return normalizeExecApprovals({
19320
19320
  version: 1,
19321
19321
  agents: {}
19322
19322
  });
19323
- const raw = fsSync.readFileSync(filePath, "utf8");
19323
+ const raw = fs.readFileSync(filePath, "utf8");
19324
19324
  const parsed = JSON.parse(raw);
19325
19325
  if (parsed?.version !== 1) return normalizeExecApprovals({
19326
19326
  version: 1,
@@ -19337,9 +19337,9 @@ function loadExecApprovals() {
19337
19337
  function saveExecApprovals(file) {
19338
19338
  const filePath = resolveExecApprovalsPath();
19339
19339
  ensureDir$1(filePath);
19340
- fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
19340
+ fs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
19341
19341
  try {
19342
- fsSync.chmodSync(filePath, 384);
19342
+ fs.chmodSync(filePath, 384);
19343
19343
  } catch {}
19344
19344
  }
19345
19345
  function ensureExecApprovals() {
@@ -19660,7 +19660,7 @@ function resolvePowerShellPath() {
19660
19660
  const systemRoot = process.env.SystemRoot || process.env.WINDIR;
19661
19661
  if (systemRoot) {
19662
19662
  const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
19663
- if (fsSync.existsSync(candidate)) return candidate;
19663
+ if (fs.existsSync(candidate)) return candidate;
19664
19664
  }
19665
19665
  return "powershell.exe";
19666
19666
  }
@@ -19698,7 +19698,7 @@ function resolveShellFromPath(name) {
19698
19698
  for (const entry of entries) {
19699
19699
  const candidate = path.join(entry, name);
19700
19700
  try {
19701
- fsSync.accessSync(candidate, fsSync.constants.X_OK);
19701
+ fs.accessSync(candidate, fs.constants.X_OK);
19702
19702
  return candidate;
19703
19703
  } catch {}
19704
19704
  }
@@ -20446,7 +20446,7 @@ async function resolveSandboxWorkdir(params) {
20446
20446
  cwd: process.cwd(),
20447
20447
  root: params.sandbox.workspaceDir
20448
20448
  });
20449
- if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
20449
+ if (!(await fs$1.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
20450
20450
  const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
20451
20451
  const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
20452
20452
  return {
@@ -21497,13 +21497,13 @@ async function validateScriptFileForShellBleed(params) {
21497
21497
  cwd: params.workdir,
21498
21498
  root: params.workdir
21499
21499
  });
21500
- stat = await fs.stat(absPath);
21500
+ stat = await fs$1.stat(absPath);
21501
21501
  } catch {
21502
21502
  return;
21503
21503
  }
21504
21504
  if (!stat.isFile()) return;
21505
21505
  if (stat.size > 512 * 1024) return;
21506
- const content = await fs.readFile(absPath, "utf-8");
21506
+ const content = await fs$1.readFile(absPath, "utf-8");
21507
21507
  const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
21508
21508
  if (first) {
21509
21509
  const idx = first.index;
@@ -22754,7 +22754,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
22754
22754
  function hasGitMarker(repoRoot) {
22755
22755
  const gitPath = path.join(repoRoot, ".git");
22756
22756
  try {
22757
- const stat = fsSync.statSync(gitPath);
22757
+ const stat = fs.statSync(gitPath);
22758
22758
  return stat.isDirectory() || stat.isFile();
22759
22759
  } catch {
22760
22760
  return false;
@@ -22766,10 +22766,10 @@ function findGitRoot(startDir, opts = {}) {
22766
22766
  function resolveGitDirFromMarker(repoRoot) {
22767
22767
  const gitPath = path.join(repoRoot, ".git");
22768
22768
  try {
22769
- const stat = fsSync.statSync(gitPath);
22769
+ const stat = fs.statSync(gitPath);
22770
22770
  if (stat.isDirectory()) return gitPath;
22771
22771
  if (!stat.isFile()) return null;
22772
- const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22772
+ const match = fs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22773
22773
  if (!match?.[1]) return null;
22774
22774
  return path.resolve(repoRoot, match[1].trim());
22775
22775
  } catch {
@@ -22836,7 +22836,7 @@ const resolveCommitHash = (options = {}) => {
22836
22836
  cachedCommit = null;
22837
22837
  return cachedCommit;
22838
22838
  }
22839
- const head = fsSync.readFileSync(headPath, "utf-8").trim();
22839
+ const head = fs.readFileSync(headPath, "utf-8").trim();
22840
22840
  if (!head) {
22841
22841
  cachedCommit = null;
22842
22842
  return cachedCommit;
@@ -22844,7 +22844,7 @@ const resolveCommitHash = (options = {}) => {
22844
22844
  if (head.startsWith("ref:")) {
22845
22845
  const ref = head.replace(/^ref:\s*/i, "").trim();
22846
22846
  const refPath = path.resolve(path.dirname(headPath), ref);
22847
- cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
22847
+ cachedCommit = formatCommit(fs.readFileSync(refPath, "utf-8").trim());
22848
22848
  return cachedCommit;
22849
22849
  }
22850
22850
  cachedCommit = formatCommit(head);
@@ -23048,9 +23048,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
23048
23048
  } catch {
23049
23049
  return;
23050
23050
  }
23051
- if (!fsSync.existsSync(logPath)) return;
23051
+ if (!fs.existsSync(logPath)) return;
23052
23052
  try {
23053
- const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
23053
+ const lines = fs.readFileSync(logPath, "utf-8").split(/\n+/);
23054
23054
  let input = 0;
23055
23055
  let output = 0;
23056
23056
  let promptTokens = 0;
@@ -24290,7 +24290,7 @@ function resolveRepoRoot(params) {
24290
24290
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
24291
24291
  if (configured) try {
24292
24292
  const resolved = path.resolve(configured);
24293
- if (fsSync.statSync(resolved).isDirectory()) return resolved;
24293
+ if (fs.statSync(resolved).isDirectory()) return resolved;
24294
24294
  } catch {}
24295
24295
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
24296
24296
  const seen = /* @__PURE__ */ new Set();
@@ -24609,7 +24609,7 @@ async function buildContextReply(params) {
24609
24609
  //#region src/auto-reply/reply/commands-export-session.ts
24610
24610
  const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
24611
24611
  function loadTemplate(fileName) {
24612
- return fsSync.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
24612
+ return fs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
24613
24613
  }
24614
24614
  function generateHtml(sessionData) {
24615
24615
  const template = loadTemplate("template.html");
@@ -24683,7 +24683,7 @@ async function buildExportSessionReply(params) {
24683
24683
  } catch (err) {
24684
24684
  return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
24685
24685
  }
24686
- if (!fsSync.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
24686
+ if (!fs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
24687
24687
  const sessionManager = SessionManager.open(sessionFile);
24688
24688
  const entries = sessionManager.getEntries();
24689
24689
  const header = sessionManager.getHeader();
@@ -24704,8 +24704,8 @@ async function buildExportSessionReply(params) {
24704
24704
  const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
24705
24705
  const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
24706
24706
  const outputDir = path.dirname(outputPath);
24707
- if (!fsSync.existsSync(outputDir)) fsSync.mkdirSync(outputDir, { recursive: true });
24708
- fsSync.writeFileSync(outputPath, html, "utf-8");
24707
+ if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
24708
+ fs.writeFileSync(outputPath, html, "utf-8");
24709
24709
  const relativePath = path.relative(params.workspaceDir, outputPath);
24710
24710
  return { text: [
24711
24711
  "✅ Session exported!",
@@ -24819,8 +24819,8 @@ function resolveZaiApiKey() {
24819
24819
  }
24820
24820
  try {
24821
24821
  const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
24822
- if (!fsSync.existsSync(authPath)) return;
24823
- const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
24822
+ if (!fs.existsSync(authPath)) return;
24823
+ const data = JSON.parse(fs.readFileSync(authPath, "utf-8"));
24824
24824
  return data["z-ai"]?.access || data.zai?.access;
24825
24825
  } catch {
24826
24826
  return;
@@ -26385,7 +26385,7 @@ function shouldPersistAnyBindingState() {
26385
26385
  }
26386
26386
  function shouldPersistBindingMutations() {
26387
26387
  if (shouldPersistAnyBindingState()) return true;
26388
- return fsSync.existsSync(resolveThreadBindingsPath());
26388
+ return fs.existsSync(resolveThreadBindingsPath());
26389
26389
  }
26390
26390
  function saveBindingsToDisk(params = {}) {
26391
26391
  if (!params.force && !shouldPersistAnyBindingState()) return;
@@ -27373,7 +27373,7 @@ const applyCostTotal = (totals, costTotal) => {
27373
27373
  totals.totalCost += costTotal;
27374
27374
  };
27375
27375
  async function* readJsonlRecords(filePath) {
27376
- const fileStream = fsSync.createReadStream(filePath, { encoding: "utf-8" });
27376
+ const fileStream = fs.createReadStream(filePath, { encoding: "utf-8" });
27377
27377
  const rl = readline.createInterface({
27378
27378
  input: fileStream,
27379
27379
  crlfDelay: Infinity
@@ -27445,10 +27445,10 @@ async function loadCostUsageSummary(params) {
27445
27445
  const dailyMap = /* @__PURE__ */ new Map();
27446
27446
  const totals = emptyTotals();
27447
27447
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
27448
- const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
27448
+ const entries = await fs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
27449
27449
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
27450
27450
  const filePath = path.join(sessionsDir, entry.name);
27451
- const stats = await fsSync.promises.stat(filePath).catch(() => null);
27451
+ const stats = await fs.promises.stat(filePath).catch(() => null);
27452
27452
  if (!stats) return null;
27453
27453
  if (stats.mtimeMs < sinceTime) return null;
27454
27454
  return filePath;
@@ -27481,7 +27481,7 @@ async function loadCostUsageSummary(params) {
27481
27481
  }
27482
27482
  async function loadSessionCostSummary(params) {
27483
27483
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
27484
- if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
27484
+ if (!sessionFile || !fs.existsSync(sessionFile)) return null;
27485
27485
  const totals = emptyTotals();
27486
27486
  let firstActivity;
27487
27487
  let lastActivity;
@@ -29353,7 +29353,7 @@ async function handleCommands(params) {
29353
29353
  try {
29354
29354
  const messages = [];
29355
29355
  if (sessionFile) {
29356
- const content = await fs.readFile(sessionFile, "utf-8");
29356
+ const content = await fs$1.readFile(sessionFile, "utf-8");
29357
29357
  for (const line of content.split("\n")) {
29358
29358
  if (!line.trim()) continue;
29359
29359
  try {
@@ -31687,7 +31687,7 @@ function asBoolean(value) {
31687
31687
  }
31688
31688
  function resolveTempPathParts(opts) {
31689
31689
  const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
31690
- if (!opts.tmpDir) fsSync.mkdirSync(tmpDir, {
31690
+ if (!opts.tmpDir) fs.mkdirSync(tmpDir, {
31691
31691
  recursive: true,
31692
31692
  mode: 448
31693
31693
  });
@@ -31753,7 +31753,7 @@ async function writeUrlToFile(filePath, url) {
31753
31753
  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}`);
31754
31754
  const body = res.body;
31755
31755
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
31756
- const fileHandle = await fs$1.open(filePath, "w");
31756
+ const fileHandle = await fs$2.open(filePath, "w");
31757
31757
  let bytes = 0;
31758
31758
  let thrown;
31759
31759
  try {
@@ -31772,7 +31772,7 @@ async function writeUrlToFile(filePath, url) {
31772
31772
  await fileHandle.close();
31773
31773
  }
31774
31774
  if (thrown) {
31775
- await fs$1.unlink(filePath).catch(() => {});
31775
+ await fs$2.unlink(filePath).catch(() => {});
31776
31776
  throw thrown;
31777
31777
  }
31778
31778
  return {
@@ -31782,7 +31782,7 @@ async function writeUrlToFile(filePath, url) {
31782
31782
  }
31783
31783
  async function writeBase64ToFile(filePath, base64) {
31784
31784
  const buf = Buffer.from(base64, "base64");
31785
- await fs$1.writeFile(filePath, buf);
31785
+ await fs$2.writeFile(filePath, buf);
31786
31786
  return {
31787
31787
  path: filePath,
31788
31788
  bytes: buf.length
@@ -31848,7 +31848,7 @@ async function readJsonlFromPath(jsonlPath) {
31848
31848
  if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
31849
31849
  throw new Error("jsonlPath outside allowed roots");
31850
31850
  }
31851
- const canonical = await fs.realpath(resolved).catch(() => resolved);
31851
+ const canonical = await fs$1.realpath(resolved).catch(() => resolved);
31852
31852
  if (!isInboundPathAllowed({
31853
31853
  filePath: canonical,
31854
31854
  roots
@@ -31856,7 +31856,7 @@ async function readJsonlFromPath(jsonlPath) {
31856
31856
  if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
31857
31857
  throw new Error("jsonlPath outside allowed roots");
31858
31858
  }
31859
- return await fs.readFile(canonical, "utf8");
31859
+ return await fs$1.readFile(canonical, "utf8");
31860
31860
  }
31861
31861
  const CanvasToolSchema = Type.Object({
31862
31862
  action: stringEnum(CANVAS_ACTIONS),
@@ -32660,12 +32660,12 @@ function resolveRestartSentinelPath(env = process.env) {
32660
32660
  }
32661
32661
  async function writeRestartSentinel(payload, env = process.env) {
32662
32662
  const filePath = resolveRestartSentinelPath(env);
32663
- await fs.mkdir(path.dirname(filePath), { recursive: true });
32663
+ await fs$1.mkdir(path.dirname(filePath), { recursive: true });
32664
32664
  const data = {
32665
32665
  version: 1,
32666
32666
  payload
32667
32667
  };
32668
- await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
32668
+ await fs$1.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
32669
32669
  return filePath;
32670
32670
  }
32671
32671
 
@@ -33480,7 +33480,7 @@ async function hydrateAttachmentPayload(params) {
33480
33480
  accountId: params.accountId
33481
33481
  }),
33482
33482
  sandboxValidated: true,
33483
- readFile: (filePath) => fs.readFile(filePath)
33483
+ readFile: (filePath) => fs$1.readFile(filePath)
33484
33484
  });
33485
33485
  params.args.buffer = media.buffer.toString("base64");
33486
33486
  if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
@@ -36765,7 +36765,7 @@ function listExistingAgentIdsFromDisk() {
36765
36765
  const root = resolveStateDir();
36766
36766
  const agentsDir = path.join(root, "agents");
36767
36767
  try {
36768
- return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
36768
+ return fs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
36769
36769
  } catch {
36770
36770
  return [];
36771
36771
  }
@@ -40633,18 +40633,18 @@ function appendImagePathsToPrompt(prompt, paths) {
40633
40633
  return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
40634
40634
  }
40635
40635
  async function writeCliImages(images) {
40636
- const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
40636
+ const tempDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
40637
40637
  const paths = [];
40638
40638
  for (let i = 0; i < images.length; i += 1) {
40639
40639
  const image = images[i];
40640
40640
  const ext = resolveImageExtension(image.mimeType);
40641
40641
  const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
40642
40642
  const buffer = Buffer.from(image.data, "base64");
40643
- await fs.writeFile(filePath, buffer, { mode: 384 });
40643
+ await fs$1.writeFile(filePath, buffer, { mode: 384 });
40644
40644
  paths.push(filePath);
40645
40645
  }
40646
40646
  const cleanup = async () => {
40647
- await fs.rm(tempDir, {
40647
+ await fs$1.rm(tempDir, {
40648
40648
  recursive: true,
40649
40649
  force: true
40650
40650
  });
@@ -41718,7 +41718,7 @@ async function runAgentTurnWithFallback(params) {
41718
41718
  if (corruptedSessionId) {
41719
41719
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
41720
41720
  try {
41721
- fsSync.unlinkSync(transcriptPath);
41721
+ fs.unlinkSync(transcriptPath);
41722
41722
  } catch {}
41723
41723
  }
41724
41724
  delete params.activeSessionStore[sessionKey];
@@ -42434,9 +42434,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
42434
42434
  * Returns messages from the last N lines (default 100).
42435
42435
  */
42436
42436
  function readSessionMessages(sessionFile, maxLines = 100) {
42437
- if (!fsSync.existsSync(sessionFile)) return [];
42437
+ if (!fs.existsSync(sessionFile)) return [];
42438
42438
  try {
42439
- const recentLines = fsSync.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
42439
+ const recentLines = fs.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
42440
42440
  const messages = [];
42441
42441
  for (const line of recentLines) try {
42442
42442
  const entry = JSON.parse(line);
@@ -42477,8 +42477,8 @@ const MAX_CONTEXT_CHARS = 3e3;
42477
42477
  async function readPostCompactionContext(workspaceDir) {
42478
42478
  const agentsPath = path.join(workspaceDir, "AGENTS.md");
42479
42479
  try {
42480
- if (!fsSync.existsSync(agentsPath)) return null;
42481
- const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
42480
+ if (!fs.existsSync(agentsPath)) return null;
42481
+ const sections = extractSections(await fs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
42482
42482
  if (sections.length === 0) return null;
42483
42483
  const combined = sections.join("\n\n");
42484
42484
  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);
@@ -42682,7 +42682,7 @@ async function runReplyAgent(params) {
42682
42682
  if (resolved) transcriptCandidates.add(resolved);
42683
42683
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
42684
42684
  for (const candidate of transcriptCandidates) try {
42685
- fsSync.unlinkSync(candidate);
42685
+ fs.unlinkSync(candidate);
42686
42686
  } catch {}
42687
42687
  }
42688
42688
  return true;
@@ -43588,7 +43588,7 @@ async function deliverSessionMaintenanceWarning(params) {
43588
43588
  return;
43589
43589
  }
43590
43590
  try {
43591
- const { deliverOutboundPayloads } = await import("./deliver-BD6kFk6p.js").then((n) => n.n);
43591
+ const { deliverOutboundPayloads } = await import("./deliver-dODxSv3b.js").then((n) => n.n);
43592
43592
  await deliverOutboundPayloads({
43593
43593
  cfg: params.cfg,
43594
43594
  channel,
@@ -43614,7 +43614,7 @@ function forkSessionFromParent(params) {
43614
43614
  agentId: params.agentId,
43615
43615
  sessionsDir: params.sessionsDir
43616
43616
  });
43617
- if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
43617
+ if (!parentSessionFile || !fs.existsSync(parentSessionFile)) return null;
43618
43618
  try {
43619
43619
  const manager = SessionManager.open(parentSessionFile);
43620
43620
  const leafId = manager.getLeafId();
@@ -43638,7 +43638,7 @@ function forkSessionFromParent(params) {
43638
43638
  cwd: manager.getCwd(),
43639
43639
  parentSession: parentSessionFile
43640
43640
  };
43641
- fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
43641
+ fs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
43642
43642
  return {
43643
43643
  sessionId,
43644
43644
  sessionFile
@@ -43963,7 +43963,7 @@ async function stageSandboxMedia(params) {
43963
43963
  };
43964
43964
  try {
43965
43965
  const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
43966
- await fs.mkdir(destDir, { recursive: true });
43966
+ await fs$1.mkdir(destDir, { recursive: true });
43967
43967
  const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
43968
43968
  cfg,
43969
43969
  accountId: ctx.AccountId
@@ -44013,7 +44013,7 @@ async function stageSandboxMedia(params) {
44013
44013
  usedNames.add(fileName);
44014
44014
  const dest = path.join(destDir, fileName);
44015
44015
  if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
44016
- else await fs.copyFile(source, dest);
44016
+ else await fs$1.copyFile(source, dest);
44017
44017
  const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
44018
44018
  staged.set(source, stagedPath);
44019
44019
  }
@@ -47033,8 +47033,8 @@ async function describeStickerImage(params) {
47033
47033
  const { provider, model } = resolved;
47034
47034
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
47035
47035
  try {
47036
- const buffer = await fs.readFile(imagePath);
47037
- const { describeImageWithModel } = await import("./image-CE0mENPo.js").then((n) => n.n);
47036
+ const buffer = await fs$1.readFile(imagePath);
47037
+ const { describeImageWithModel } = await import("./image-CXu8W39c.js").then((n) => n.n);
47038
47038
  return (await describeImageWithModel({
47039
47039
  buffer,
47040
47040
  fileName: "sticker.webp",
@@ -47457,7 +47457,7 @@ function createWhatsAppLoginTool() {
47457
47457
  force: Type.Optional(Type.Boolean())
47458
47458
  }),
47459
47459
  execute: async (_toolCallId, args) => {
47460
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-BKIOHn1V.js");
47460
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-AP9agO-i.js");
47461
47461
  if ((args?.action ?? "start") === "wait") {
47462
47462
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
47463
47463
  return {
@@ -47739,7 +47739,7 @@ async function withMemoryManagerForAgent(params) {
47739
47739
  }
47740
47740
  async function checkReadableFile(pathname) {
47741
47741
  try {
47742
- await fs.access(pathname, fsSync.constants.R_OK);
47742
+ await fs$1.access(pathname, fs.constants.R_OK);
47743
47743
  return { exists: true };
47744
47744
  } catch (err) {
47745
47745
  const code = err.code;
@@ -47756,7 +47756,7 @@ async function scanSessionFiles(agentId) {
47756
47756
  try {
47757
47757
  return {
47758
47758
  source: "sessions",
47759
- totalFiles: (await fs.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
47759
+ totalFiles: (await fs$1.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
47760
47760
  issues
47761
47761
  };
47762
47762
  } catch (err) {
@@ -47788,7 +47788,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
47788
47788
  if (alt.issue) issues.push(alt.issue);
47789
47789
  const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
47790
47790
  for (const extraPath of resolvedExtraPaths) try {
47791
- if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
47791
+ if ((await fs$1.lstat(extraPath)).isSymbolicLink()) continue;
47792
47792
  const extraCheck = await checkReadableFile(extraPath);
47793
47793
  if (extraCheck.issue) issues.push(extraCheck.issue);
47794
47794
  } catch (err) {
@@ -47798,7 +47798,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
47798
47798
  }
47799
47799
  let dirReadable = null;
47800
47800
  try {
47801
- await fs.access(memoryDir, fsSync.constants.R_OK);
47801
+ await fs$1.access(memoryDir, fs.constants.R_OK);
47802
47802
  dirReadable = true;
47803
47803
  } catch (err) {
47804
47804
  const code = err.code;
@@ -47846,7 +47846,7 @@ async function summarizeQmdIndexArtifact(manager) {
47846
47846
  if (!dbPath) return null;
47847
47847
  let stat;
47848
47848
  try {
47849
- stat = await fs.stat(dbPath);
47849
+ stat = await fs$1.stat(dbPath);
47850
47850
  } catch (err) {
47851
47851
  const code = err.code;
47852
47852
  if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
@@ -49696,7 +49696,7 @@ async function preflightDiscordMessage(params) {
49696
49696
  let preflightTranscript;
49697
49697
  const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
49698
49698
  if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
49699
- const { transcribeFirstAudio } = await import("./audio-preflight-Bdbm4htn.js");
49699
+ const { transcribeFirstAudio } = await import("./audio-preflight-DHTaS5U1.js");
49700
49700
  const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
49701
49701
  if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
49702
49702
  ctx: {
@@ -50659,7 +50659,7 @@ function identityHasValues(identity) {
50659
50659
  }
50660
50660
  function loadIdentityFromFile(identityPath) {
50661
50661
  try {
50662
- const parsed = parseIdentityMarkdown(fsSync.readFileSync(identityPath, "utf-8"));
50662
+ const parsed = parseIdentityMarkdown(fs.readFileSync(identityPath, "utf-8"));
50663
50663
  if (!identityHasValues(parsed)) return null;
50664
50664
  return parsed;
50665
50665
  } catch {
@@ -50698,7 +50698,7 @@ function isDataAvatar(value) {
50698
50698
  }
50699
50699
  function resolveExistingPath(value) {
50700
50700
  try {
50701
- return fsSync.realpathSync(value);
50701
+ return fs.realpathSync(value);
50702
50702
  } catch {
50703
50703
  return path.resolve(value);
50704
50704
  }
@@ -50722,7 +50722,7 @@ function resolveLocalAvatarPath(params) {
50722
50722
  reason: "unsupported_extension"
50723
50723
  };
50724
50724
  try {
50725
- if (!fsSync.statSync(realPath).isFile()) return {
50725
+ if (!fs.statSync(realPath).isFile()) return {
50726
50726
  ok: false,
50727
50727
  reason: "missing"
50728
50728
  };
@@ -51585,7 +51585,7 @@ function sanitizeRecentModels(models, limit) {
51585
51585
  }
51586
51586
  async function readJsonFileWithFallback(filePath, fallback) {
51587
51587
  try {
51588
- const raw = await fsSync.promises.readFile(filePath, "utf-8");
51588
+ const raw = await fs.promises.readFile(filePath, "utf-8");
51589
51589
  return {
51590
51590
  value: JSON.parse(raw),
51591
51591
  exists: true
@@ -51603,14 +51603,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
51603
51603
  }
51604
51604
  async function writeJsonFileAtomically(filePath, value) {
51605
51605
  const dir = path.dirname(filePath);
51606
- await fsSync.promises.mkdir(dir, {
51606
+ await fs.promises.mkdir(dir, {
51607
51607
  recursive: true,
51608
51608
  mode: 448
51609
51609
  });
51610
51610
  const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
51611
- await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
51612
- await fsSync.promises.chmod(tmp, 384);
51613
- await fsSync.promises.rename(tmp, filePath);
51611
+ await fs.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
51612
+ await fs.promises.chmod(tmp, 384);
51613
+ await fs.promises.rename(tmp, filePath);
51614
51614
  }
51615
51615
  async function readPreferencesStore(filePath) {
51616
51616
  const { value } = await readJsonFileWithFallback(filePath, {
@@ -53702,27 +53702,27 @@ function isVoiceChannelType(type) {
53702
53702
  function createDefaultDeps() {
53703
53703
  return {
53704
53704
  sendMessageWhatsApp: async (...args) => {
53705
- const { sendMessageWhatsApp } = await import("./web-DyvSF1Pu.js");
53705
+ const { sendMessageWhatsApp } = await import("./web-CP9nUIj0.js");
53706
53706
  return await sendMessageWhatsApp(...args);
53707
53707
  },
53708
53708
  sendMessageTelegram: async (...args) => {
53709
- const { sendMessageTelegram } = await import("./send-B7z8CDbr.js").then((n) => n.l);
53709
+ const { sendMessageTelegram } = await import("./send-DYj_o4_F.js").then((n) => n.l);
53710
53710
  return await sendMessageTelegram(...args);
53711
53711
  },
53712
53712
  sendMessageDiscord: async (...args) => {
53713
- const { sendMessageDiscord } = await import("./send-D3zDmQim.js").then((n) => n.t);
53713
+ const { sendMessageDiscord } = await import("./send-CvhXrdgS.js").then((n) => n.t);
53714
53714
  return await sendMessageDiscord(...args);
53715
53715
  },
53716
53716
  sendMessageSlack: async (...args) => {
53717
- const { sendMessageSlack } = await import("./send-qItpAHcI.js").then((n) => n.n);
53717
+ const { sendMessageSlack } = await import("./send-CVMyYPQw.js").then((n) => n.n);
53718
53718
  return await sendMessageSlack(...args);
53719
53719
  },
53720
53720
  sendMessageSignal: async (...args) => {
53721
- const { sendMessageSignal } = await import("./send-XRUYukww.js").then((n) => n.i);
53721
+ const { sendMessageSignal } = await import("./send-DAN9hA5h.js").then((n) => n.i);
53722
53722
  return await sendMessageSignal(...args);
53723
53723
  },
53724
53724
  sendMessageIMessage: async (...args) => {
53725
- const { sendMessageIMessage } = await import("./send-Cd81AY_Z.js").then((n) => n.n);
53725
+ const { sendMessageIMessage } = await import("./send-CQAKg_12.js").then((n) => n.n);
53726
53726
  return await sendMessageIMessage(...args);
53727
53727
  }
53728
53728
  };
@@ -54631,10 +54631,10 @@ function estimateDurationSeconds(pcm) {
54631
54631
  return pcm.length / (bytesPerSample * SAMPLE_RATE);
54632
54632
  }
54633
54633
  async function writeWavFile(pcm) {
54634
- const tempDir = await fs.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
54634
+ const tempDir = await fs$1.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
54635
54635
  const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
54636
54636
  const wav = buildWavBuffer(pcm);
54637
- await fs.writeFile(filePath, wav);
54637
+ await fs$1.writeFile(filePath, wav);
54638
54638
  scheduleTempCleanup(tempDir);
54639
54639
  return {
54640
54640
  path: filePath,
@@ -54643,7 +54643,7 @@ async function writeWavFile(pcm) {
54643
54643
  }
54644
54644
  function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
54645
54645
  setTimeout(() => {
54646
- fs.rm(tempDir, {
54646
+ fs$1.rm(tempDir, {
54647
54647
  recursive: true,
54648
54648
  force: true
54649
54649
  }).catch((err) => {
@@ -57707,7 +57707,7 @@ async function detectBinary(name) {
57707
57707
  if (!isSafeExecutableValue(name)) return false;
57708
57708
  const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
57709
57709
  if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
57710
- await fs.access(resolved);
57710
+ await fs$1.access(resolved);
57711
57711
  return true;
57712
57712
  } catch {
57713
57713
  return false;
@@ -58257,7 +58257,7 @@ function normalizeAllowList$1(list) {
58257
58257
  async function detectRemoteHostFromCliPath(cliPath) {
58258
58258
  try {
58259
58259
  const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
58260
- const content = await fs.readFile(expanded, "utf8");
58260
+ const content = await fs$1.readFile(expanded, "utf8");
58261
58261
  const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
58262
58262
  if (userHostMatch) return userHostMatch[1];
58263
58263
  return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
@@ -58601,7 +58601,7 @@ async function monitorIMessageProvider(opts = {}) {
58601
58601
  function readFileIfExists(filePath) {
58602
58602
  if (!filePath) return;
58603
58603
  try {
58604
- return fsSync.readFileSync(filePath, "utf-8").trim();
58604
+ return fs.readFileSync(filePath, "utf-8").trim();
58605
58605
  } catch {
58606
58606
  return;
58607
58607
  }
@@ -59162,7 +59162,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
59162
59162
  prefix: "line-media",
59163
59163
  extension: getExtensionForContentType(contentType)
59164
59164
  });
59165
- await fsSync.promises.writeFile(filePath, buffer);
59165
+ await fs.promises.writeFile(filePath, buffer);
59166
59166
  logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
59167
59167
  return {
59168
59168
  path: filePath,
@@ -64149,7 +64149,7 @@ function readSlackExternalArgMenuToken(raw) {
64149
64149
  }
64150
64150
  let commandsRegistry;
64151
64151
  async function getCommandsRegistry() {
64152
- if (!commandsRegistry) commandsRegistry = await import("./commands-registry-DIakZUZb.js").then((n) => n.n);
64152
+ if (!commandsRegistry) commandsRegistry = await import("./commands-registry-Bfc7Uz0o.js").then((n) => n.n);
64153
64153
  return commandsRegistry;
64154
64154
  }
64155
64155
  function encodeSlackCommandArgValue(parts) {
@@ -64491,11 +64491,11 @@ async function registerSlackMonitorSlashCommands(params) {
64491
64491
  const channelName = channelInfo?.name;
64492
64492
  const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
64493
64493
  const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
64494
- import("./resolve-route-q8AFnU5c.js").then((n) => n.r),
64494
+ import("./resolve-route-C4_I4GFI.js").then((n) => n.r),
64495
64495
  import("./inbound-context-DSDTl6Kj.js").then((n) => n.n),
64496
64496
  Promise.resolve().then(() => provider_dispatcher_exports)
64497
64497
  ]);
64498
- const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-DkGsdyBm.js").then((n) => n.n)]);
64498
+ const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-DpqZu44Z.js").then((n) => n.n)]);
64499
64499
  const route = resolveAgentRoute({
64500
64500
  cfg,
64501
64501
  channel: "slack",
@@ -64552,9 +64552,9 @@ async function registerSlackMonitorSlashCommands(params) {
64552
64552
  });
64553
64553
  const deliverSlashPayloads = async (replies) => {
64554
64554
  const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
64555
- import("./replies-mfnbLu2p.js").then((n) => n.r),
64556
- import("./chunk-DR8ukp6r.js").then((n) => n.s),
64557
- import("./markdown-tables-tW9bGjLM.js").then((n) => n.t)
64555
+ import("./replies-LSmuwOhA.js").then((n) => n.r),
64556
+ import("./chunk-09egQapi.js").then((n) => n.s),
64557
+ import("./markdown-tables-C-BmIap8.js").then((n) => n.t)
64558
64558
  ]);
64559
64559
  await deliverSlackSlashReplies({
64560
64560
  replies,
@@ -64607,7 +64607,7 @@ async function registerSlackMonitorSlashCommands(params) {
64607
64607
  let nativeCommands = [];
64608
64608
  if (nativeEnabled) {
64609
64609
  reg = await getCommandsRegistry();
64610
- const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-B_f8uGi7.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
64610
+ const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-DcVwOafC.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
64611
64611
  nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
64612
64612
  skillCommands,
64613
64613
  provider: "slack"
@@ -66825,7 +66825,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
66825
66825
  const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
66826
66826
  let preflightTranscript;
66827
66827
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
66828
- const { transcribeFirstAudio } = await import("./audio-preflight-Bdbm4htn.js");
66828
+ const { transcribeFirstAudio } = await import("./audio-preflight-DHTaS5U1.js");
66829
66829
  preflightTranscript = await transcribeFirstAudio({
66830
66830
  ctx: {
66831
66831
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -68593,7 +68593,7 @@ function safeParseState(raw) {
68593
68593
  async function readTelegramUpdateOffset(params) {
68594
68594
  const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
68595
68595
  try {
68596
- return safeParseState(await fs.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
68596
+ return safeParseState(await fs$1.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
68597
68597
  } catch (err) {
68598
68598
  if (err.code === "ENOENT") return null;
68599
68599
  return null;
@@ -68602,7 +68602,7 @@ async function readTelegramUpdateOffset(params) {
68602
68602
  async function writeTelegramUpdateOffset(params) {
68603
68603
  const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
68604
68604
  const dir = path.dirname(filePath);
68605
- await fs.mkdir(dir, {
68605
+ await fs$1.mkdir(dir, {
68606
68606
  recursive: true,
68607
68607
  mode: 448
68608
68608
  });
@@ -68611,9 +68611,9 @@ async function writeTelegramUpdateOffset(params) {
68611
68611
  version: STORE_VERSION,
68612
68612
  lastUpdateId: params.updateId
68613
68613
  };
68614
- await fs.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
68615
- await fs.chmod(tmp, 384);
68616
- await fs.rename(tmp, filePath);
68614
+ await fs$1.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
68615
+ await fs$1.chmod(tmp, 384);
68616
+ await fs$1.rename(tmp, filePath);
68617
68617
  }
68618
68618
 
68619
68619
  //#endregion
@@ -68970,23 +68970,23 @@ let webLoginQrPromise = null;
68970
68970
  let webChannelPromise = null;
68971
68971
  let whatsappActionsPromise = null;
68972
68972
  function loadWebOutbound() {
68973
- webOutboundPromise ??= import("./outbound-CIVsLpJK.js").then((n) => n.t);
68973
+ webOutboundPromise ??= import("./outbound-CtMCmwxR.js").then((n) => n.t);
68974
68974
  return webOutboundPromise;
68975
68975
  }
68976
68976
  function loadWebLogin() {
68977
- webLoginPromise ??= import("./login-BHUrERYo.js").then((n) => n.n);
68977
+ webLoginPromise ??= import("./login-ul8zaw_S.js").then((n) => n.n);
68978
68978
  return webLoginPromise;
68979
68979
  }
68980
68980
  function loadWebLoginQr() {
68981
- webLoginQrPromise ??= import("./login-qr-BKIOHn1V.js");
68981
+ webLoginQrPromise ??= import("./login-qr-AP9agO-i.js");
68982
68982
  return webLoginQrPromise;
68983
68983
  }
68984
68984
  function loadWebChannel() {
68985
- webChannelPromise ??= import("./web-DyvSF1Pu.js");
68985
+ webChannelPromise ??= import("./web-CP9nUIj0.js");
68986
68986
  return webChannelPromise;
68987
68987
  }
68988
68988
  function loadWhatsAppActions() {
68989
- whatsappActionsPromise ??= import("./whatsapp-actions-SXenaJIn.js");
68989
+ whatsappActionsPromise ??= import("./whatsapp-actions-BIeSWsCF.js");
68990
68990
  return whatsappActionsPromise;
68991
68991
  }
68992
68992
  function createPluginRuntime() {
@@ -69207,7 +69207,7 @@ const resolvePluginSdkAliasFile = (params) => {
69207
69207
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
69208
69208
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
69209
69209
  const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
69210
- for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
69210
+ for (const candidate of orderedCandidates) if (fs.existsSync(candidate)) return candidate;
69211
69211
  const parent = path.dirname(cursor);
69212
69212
  if (parent === cursor) break;
69213
69213
  cursor = parent;
@@ -69753,7 +69753,7 @@ function resolvePluginTools(params) {
69753
69753
  //#endregion
69754
69754
  //#region src/agents/apply-patch-update.ts
69755
69755
  async function defaultReadFile(filePath) {
69756
- return fs.readFile(filePath, "utf8");
69756
+ return fs$1.readFile(filePath, "utf8");
69757
69757
  }
69758
69758
  async function applyUpdateHunk(filePath, chunks, options) {
69759
69759
  const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
@@ -69997,10 +69997,10 @@ function resolvePatchFileOps(options) {
69997
69997
  };
69998
69998
  }
69999
69999
  return {
70000
- readFile: (filePath) => fs.readFile(filePath, "utf8"),
70001
- writeFile: (filePath, content) => fs.writeFile(filePath, content, "utf8"),
70002
- remove: (filePath) => fs.rm(filePath),
70003
- mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
70000
+ readFile: (filePath) => fs$1.readFile(filePath, "utf8"),
70001
+ writeFile: (filePath, content) => fs$1.writeFile(filePath, content, "utf8"),
70002
+ remove: (filePath) => fs$1.rm(filePath),
70003
+ mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
70004
70004
  };
70005
70005
  }
70006
70006
  async function ensureDir(filePath, ops) {
@@ -71245,7 +71245,7 @@ async function repairSessionFileIfNeeded(params) {
71245
71245
  };
71246
71246
  let content;
71247
71247
  try {
71248
- content = await fs.readFile(sessionFile, "utf-8");
71248
+ content = await fs$1.readFile(sessionFile, "utf-8");
71249
71249
  } catch (err) {
71250
71250
  if (err?.code === "ENOENT") return {
71251
71251
  repaired: false,
@@ -71293,15 +71293,15 @@ async function repairSessionFileIfNeeded(params) {
71293
71293
  const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
71294
71294
  const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
71295
71295
  try {
71296
- const stat = await fs.stat(sessionFile).catch(() => null);
71297
- await fs.writeFile(backupPath, content, "utf-8");
71298
- if (stat) await fs.chmod(backupPath, stat.mode);
71299
- await fs.writeFile(tmpPath, cleaned, "utf-8");
71300
- if (stat) await fs.chmod(tmpPath, stat.mode);
71301
- await fs.rename(tmpPath, sessionFile);
71296
+ const stat = await fs$1.stat(sessionFile).catch(() => null);
71297
+ await fs$1.writeFile(backupPath, content, "utf-8");
71298
+ if (stat) await fs$1.chmod(backupPath, stat.mode);
71299
+ await fs$1.writeFile(tmpPath, cleaned, "utf-8");
71300
+ if (stat) await fs$1.chmod(tmpPath, stat.mode);
71301
+ await fs$1.rename(tmpPath, sessionFile);
71302
71302
  } catch (err) {
71303
71303
  try {
71304
- await fs.unlink(tmpPath);
71304
+ await fs$1.unlink(tmpPath);
71305
71305
  } catch (cleanupErr) {
71306
71306
  params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
71307
71307
  }
@@ -71985,8 +71985,8 @@ async function readWorkspaceContextForSummary() {
71985
71985
  const workspaceDir = process.cwd();
71986
71986
  const agentsPath = path.join(workspaceDir, "AGENTS.md");
71987
71987
  try {
71988
- if (!fsSync.existsSync(agentsPath)) return "";
71989
- const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
71988
+ if (!fs.existsSync(agentsPath)) return "";
71989
+ const sections = extractSections(await fs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
71990
71990
  if (sections.length === 0) return "";
71991
71991
  const combined = sections.join("\n\n");
71992
71992
  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>`;
@@ -72542,7 +72542,7 @@ async function prewarmSessionFile(sessionFile) {
72542
72542
  if (!isSessionManagerCacheEnabled()) return;
72543
72543
  if (isSessionManagerCached(sessionFile)) return;
72544
72544
  try {
72545
- const handle = await fs.open(sessionFile, "r");
72545
+ const handle = await fs$1.open(sessionFile, "r");
72546
72546
  try {
72547
72547
  const buffer = Buffer$1.alloc(4096);
72548
72548
  await handle.read(buffer, 0, buffer.length, 0);
@@ -72675,14 +72675,14 @@ async function compactEmbeddedPiSessionDirect(params) {
72675
72675
  if (!apiKeyInfo.apiKey) {
72676
72676
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
72677
72677
  } else if (model.provider === "github-copilot") {
72678
- const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
72678
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-cCYzSU9h.js").then((n) => n.n);
72679
72679
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
72680
72680
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
72681
72681
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
72682
72682
  } catch (err) {
72683
72683
  return fail(describeUnknownError(err));
72684
72684
  }
72685
- await fs.mkdir(resolvedWorkspace, { recursive: true });
72685
+ await fs$1.mkdir(resolvedWorkspace, { recursive: true });
72686
72686
  const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
72687
72687
  const sandbox = await resolveSandboxContext({
72688
72688
  config: params.config,
@@ -72690,7 +72690,7 @@ async function compactEmbeddedPiSessionDirect(params) {
72690
72690
  workspaceDir: resolvedWorkspace
72691
72691
  });
72692
72692
  const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
72693
- await fs.mkdir(effectiveWorkspace, { recursive: true });
72693
+ await fs$1.mkdir(effectiveWorkspace, { recursive: true });
72694
72694
  await ensureSessionHeader({
72695
72695
  sessionFile: params.sessionFile,
72696
72696
  sessionId: params.sessionId,
@@ -73044,12 +73044,12 @@ function getQueuedFileWriter(writers, filePath) {
73044
73044
  const existing = writers.get(filePath);
73045
73045
  if (existing) return existing;
73046
73046
  const dir = path.dirname(filePath);
73047
- const ready = fs.mkdir(dir, { recursive: true }).catch(() => void 0);
73047
+ const ready = fs$1.mkdir(dir, { recursive: true }).catch(() => void 0);
73048
73048
  let queue = Promise.resolve();
73049
73049
  const writer = {
73050
73050
  filePath,
73051
73051
  write: (line) => {
73052
- queue = queue.then(() => ready).then(() => fs.appendFile(filePath, line, "utf8")).catch(() => void 0);
73052
+ queue = queue.then(() => ready).then(() => fs$1.appendFile(filePath, line, "utf8")).catch(() => void 0);
73053
73053
  }
73054
73054
  };
73055
73055
  writers.set(filePath, writer);
@@ -74074,11 +74074,11 @@ function appendRawStream(payload) {
74074
74074
  if (!rawStreamReady) {
74075
74075
  rawStreamReady = true;
74076
74076
  try {
74077
- fsSync.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
74077
+ fs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
74078
74078
  } catch {}
74079
74079
  }
74080
74080
  try {
74081
- fsSync.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
74081
+ fs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
74082
74082
  } catch {}
74083
74083
  }
74084
74084
 
@@ -75908,7 +75908,7 @@ function isInPoisonRange(version) {
75908
75908
  */
75909
75909
  async function checkSessionPoison(sessionFile) {
75910
75910
  try {
75911
- const firstLine = (await fs.readFile(sessionFile, "utf-8")).split("\n")[0];
75911
+ const firstLine = (await fs$1.readFile(sessionFile, "utf-8")).split("\n")[0];
75912
75912
  if (!firstLine) return null;
75913
75913
  const header = JSON.parse(firstLine);
75914
75914
  if (header.type !== "session") return null;
@@ -75926,7 +75926,7 @@ async function checkSessionPoison(sessionFile) {
75926
75926
  */
75927
75927
  async function archivePoisonedSession(sessionFile) {
75928
75928
  const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
75929
- await fs.rename(sessionFile, archiveName);
75929
+ await fs$1.rename(sessionFile, archiveName);
75930
75930
  return archiveName;
75931
75931
  }
75932
75932
  /**
@@ -75935,14 +75935,14 @@ async function archivePoisonedSession(sessionFile) {
75935
75935
  */
75936
75936
  async function stampSessionVersion(sessionFile) {
75937
75937
  try {
75938
- const lines = (await fs.readFile(sessionFile, "utf-8")).split("\n");
75938
+ const lines = (await fs$1.readFile(sessionFile, "utf-8")).split("\n");
75939
75939
  if (lines.length === 0) return;
75940
75940
  const header = JSON.parse(lines[0]);
75941
75941
  if (header.type !== "session") return;
75942
75942
  if (header.symiVersion === VERSION) return;
75943
75943
  header.symiVersion = VERSION;
75944
75944
  lines[0] = JSON.stringify(header);
75945
- await fs.writeFile(sessionFile, lines.join("\n"), "utf-8");
75945
+ await fs$1.writeFile(sessionFile, lines.join("\n"), "utf-8");
75946
75946
  } catch {}
75947
75947
  }
75948
75948
  /**
@@ -76105,7 +76105,7 @@ async function prepareSessionManagerForRun(params) {
76105
76105
  return;
76106
76106
  }
76107
76107
  if (params.hadSessionFile && header && !hasAssistant) {
76108
- await fs.writeFile(params.sessionFile, "", "utf-8");
76108
+ await fs$1.writeFile(params.sessionFile, "", "utf-8");
76109
76109
  sm.fileEntries = [header];
76110
76110
  sm.byId?.clear?.();
76111
76111
  sm.labelsById?.clear?.();
@@ -76663,7 +76663,7 @@ async function runEmbeddedAttempt(params) {
76663
76663
  const prevCwd = process.cwd();
76664
76664
  const runAbortController = new AbortController();
76665
76665
  log$9.debug(`embedded run start: runId=${params.runId} sessionId=${params.sessionId} provider=${params.provider} model=${params.modelId} thinking=${params.thinkLevel} messageChannel=${params.messageChannel ?? params.messageProvider ?? "unknown"}`);
76666
- await fs.mkdir(resolvedWorkspace, { recursive: true });
76666
+ await fs$1.mkdir(resolvedWorkspace, { recursive: true });
76667
76667
  const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
76668
76668
  const sandbox = await resolveSandboxContext({
76669
76669
  config: params.config,
@@ -76671,7 +76671,7 @@ async function runEmbeddedAttempt(params) {
76671
76671
  workspaceDir: resolvedWorkspace
76672
76672
  });
76673
76673
  const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
76674
- await fs.mkdir(effectiveWorkspace, { recursive: true });
76674
+ await fs$1.mkdir(effectiveWorkspace, { recursive: true });
76675
76675
  let restoreSkillEnv;
76676
76676
  process.chdir(effectiveWorkspace);
76677
76677
  try {
@@ -76901,7 +76901,7 @@ async function runEmbeddedAttempt(params) {
76901
76901
  sessionFile: params.sessionFile,
76902
76902
  warn: (message) => log$9.warn(message)
76903
76903
  });
76904
- const hadSessionFile = await fs.stat(params.sessionFile).then(() => true).catch(() => false);
76904
+ const hadSessionFile = await fs$1.stat(params.sessionFile).then(() => true).catch(() => false);
76905
76905
  const transcriptPolicy = resolveTranscriptPolicy({
76906
76906
  modelApi: params.model?.api,
76907
76907
  provider: params.provider,
@@ -77885,7 +77885,7 @@ async function runEmbeddedPiAgent(params) {
77885
77885
  return;
77886
77886
  }
77887
77887
  if (model.provider === "github-copilot") {
77888
- const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
77888
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-cCYzSU9h.js").then((n) => n.n);
77889
77889
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
77890
77890
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
77891
77891
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
@@ -77970,7 +77970,7 @@ async function runEmbeddedPiAgent(params) {
77970
77970
  }
77971
77971
  runLoopIterations += 1;
77972
77972
  attemptedThinking.add(thinkLevel);
77973
- await fs.mkdir(resolvedWorkspace, { recursive: true });
77973
+ await fs$1.mkdir(resolvedWorkspace, { recursive: true });
77974
77974
  const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
77975
77975
  const attempt = await runEmbeddedAttempt({
77976
77976
  sessionId: params.sessionId,