@symerian/symi 2.6.38 → 2.6.39

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 (156) hide show
  1. package/dist/{accounts-BRw8yhIW.js → accounts-D1r2dq1t.js} +21 -21
  2. package/dist/{accounts-3dCrO3oZ.js → accounts-dRUMQQrB.js} +1 -1
  3. package/dist/{accounts-BuZxOb3B.js → accounts-wSphH5gv.js} +1 -1
  4. package/dist/{active-listener-Br2FcRv7.js → active-listener-C3pfJhdC.js} +1 -1
  5. package/dist/{agent-scope-CpEJ0B88.js → agent-scope-D68_xfTL.js} +3 -3
  6. package/dist/{audio-preflight-DBMz5TQp.js → audio-preflight-DZ_2w4B5.js} +4 -4
  7. package/dist/{audio-preflight-Cz1htqcz.js → audio-preflight-UXg8r6a7.js} +29 -29
  8. package/dist/{auth-profiles-q3HjbboY.js → auth-profiles-CZZjOpX8.js} +17 -17
  9. package/dist/{bindings-BsHoBLIE.js → bindings-Bat2RnAR.js} +2 -2
  10. package/dist/build-info.json +3 -3
  11. package/dist/bundled/boot-md/handler.js +54 -54
  12. package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
  13. package/dist/bundled/command-logger/handler.js +1 -1
  14. package/dist/bundled/session-memory/handler.js +54 -54
  15. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  16. package/dist/{channel-activity-D-kw83R0.js → channel-activity-Cm1OJRbv.js} +1 -1
  17. package/dist/{chrome-34eOyt_6.js → chrome-CXbfCc20.js} +5 -5
  18. package/dist/{chrome-CovpMGdO.js → chrome-D0sqCqXY.js} +16 -16
  19. package/dist/{chunk-BHW8Yu5A.js → chunk-B9x_1qSr.js} +1 -1
  20. package/dist/{command-registry-Dk55OGO6.js → command-registry-DSV-4T7A.js} +4 -4
  21. package/dist/{commands-registry-BSvi46KZ.js → commands-registry-DPf4J7nj.js} +4 -4
  22. package/dist/{completion-cli-1HmgP7tY.js → completion-cli-DjQVuJdD.js} +2 -2
  23. package/dist/{completion-cli-DrDwlbAX.js → completion-cli-dlL2VvFw.js} +1 -1
  24. package/dist/{config-4Iu6iHCA.js → config-giEDOxub.js} +12 -12
  25. package/dist/control-ui/js/app.js +16 -5
  26. package/dist/control-ui/js/render.js +24 -35
  27. package/dist/{deliver-DtM4u1u_.js → deliver-BY58QnO8.js} +20 -20
  28. package/dist/{deliver-BCYGr-CD.js → deliver-DepjYu87.js} +1 -1
  29. package/dist/{diagnostic-CQiU0O8b.js → diagnostic-DIKKFHpP.js} +1 -1
  30. package/dist/{doctor-completion-B8IZFxo9.js → doctor-completion-Cm7WG43a.js} +1 -1
  31. package/dist/{doctor-completion-D6tzA47C.js → doctor-completion-Z_RXu40-.js} +1 -1
  32. package/dist/entry.js +1 -1
  33. package/dist/{env-BDXYbTKj.js → env-xmBFQPBP.js} +1 -1
  34. package/dist/extensionAPI.js +6 -6
  35. package/dist/{frontmatter-CTR5f_Ez.js → frontmatter-CV0YkjoY.js} +2 -2
  36. package/dist/{gateway-cli-DdjXGMTo.js → gateway-cli-DliBYmLu.js} +2 -2
  37. package/dist/{gateway-cli-DCTt5acx.js → gateway-cli-Fnxgv97F.js} +2 -2
  38. package/dist/{gemini-auth-BkLFtndu.js → gemini-auth-C39f2zRe.js} +1 -1
  39. package/dist/{github-copilot-token-cCYzSU9h.js → github-copilot-token-B8B2pmph.js} +7 -7
  40. package/dist/{glass-ui-ws-C_DzMNsd.js → glass-ui-ws-B0sH6QQi.js} +18 -2
  41. package/dist/{glass-ui-ws-DBlQ-hk7.js → glass-ui-ws-CfNTIb_g.js} +18 -2
  42. package/dist/{image-mx18hbyY.js → image-CKMw_vhe.js} +4 -4
  43. package/dist/{image-DKudhySz.js → image-CjuJpc3E.js} +1 -1
  44. package/dist/{image-ops-C7CauEK8.js → image-ops-M5agStZn.js} +16 -16
  45. package/dist/index.js +1 -1
  46. package/dist/{ir-JAy_3A3B.js → ir-Z9axTYHx.js} +4 -4
  47. package/dist/llm-slug-generator.js +54 -54
  48. package/dist/{local-roots-Se92wAN5.js → local-roots-Bh5xx9IO.js} +5 -5
  49. package/dist/{login-IpOTJtyn.js → login-2w0Q7Btb.js} +7 -7
  50. package/dist/{login-qr-DRepVMvu.js → login-qr-BJMvic1s.js} +12 -12
  51. package/dist/{manager-CJ3M1Uxq.js → manager-BoLUtbg2.js} +22 -22
  52. package/dist/{manifest-registry-yb7sAlu4.js → manifest-registry-0J48biqr.js} +19 -19
  53. package/dist/{markdown-tables-Dnj2LQUc.js → markdown-tables-DuRhvVpP.js} +1 -1
  54. package/dist/{message-channel-OlFBYAw8.js → message-channel-DwDSKGn4.js} +1 -1
  55. package/dist/{onboard-CEE38rOh.js → onboard-A5dfwOyL.js} +1 -1
  56. package/dist/{onboard-Dxf43Kz5.js → onboard-BSlbkbv-.js} +1 -1
  57. package/dist/{onboarding-B1VwuUX5.js → onboarding-BTNiewJj.js} +1 -1
  58. package/dist/{onboarding-BxHFNg2y.js → onboarding-COqa6a28.js} +1 -1
  59. package/dist/{onboarding.finalize-dP5Igu4h.js → onboarding.finalize-CAax5IdL.js} +4 -4
  60. package/dist/{onboarding.finalize-DQm4Tey0.js → onboarding.finalize-CDsTN9zD.js} +3 -3
  61. package/dist/{outbound-UwQEXYXv.js → outbound-B_wliV26.js} +7 -7
  62. package/dist/{outbound-attachment-BzwVH4Pn.js → outbound-attachment-BOy-OY4-.js} +2 -2
  63. package/dist/paths-CYmyCDsE.js +212 -0
  64. package/dist/{paths-CbQV9WEg.js → paths-DEuVuViW.js} +1 -1
  65. package/dist/{pi-auth-json-CCaxCywz.js → pi-auth-json-BQcKJvH0.js} +1 -1
  66. package/dist/{pi-embedded-DKaDXfFG.js → pi-embedded-R_JHJFwq.js} +16 -16
  67. package/dist/{pi-embedded-helpers-CepVOR4e.js → pi-embedded-helpers-BJrRH97f.js} +4 -4
  68. package/dist/{pi-embedded-helpers-DASLSiel.js → pi-embedded-helpers-Cr1X3W9i.js} +73 -73
  69. package/dist/{plugins-BzmbgY7s.js → plugins-Bkr5ZdYs.js} +9 -9
  70. package/dist/{program-DGLuU2_H.js → program-C4k7oBuC.js} +2 -2
  71. package/dist/{program-context-B2BcluHm.js → program-context-CiGMAzyC.js} +6 -6
  72. package/dist/{prompt-select-styled-CAKiYm_X.js → prompt-select-styled-CYiMonwj.js} +1 -1
  73. package/dist/{prompt-select-styled-C9RTEKcx.js → prompt-select-styled-CoWkFI4l.js} +1 -1
  74. package/dist/{pw-ai-Cfeeyp0u.js → pw-ai-CS2tDZd2.js} +1 -1
  75. package/dist/{pw-ai-CPelTpWz.js → pw-ai-Ch_WUbQZ.js} +11 -11
  76. package/dist/{qmd-manager-lBS9mT9w.js → qmd-manager-8-Z3Cdpt.js} +7 -7
  77. package/dist/{register.maintenance-BKB_D_Py.js → register.maintenance-DAwf6cHN.js} +5 -5
  78. package/dist/{register.maintenance-BgWyvLo5.js → register.maintenance-DVv8ljal.js} +4 -4
  79. package/dist/{register.onboard-DT1We9u2.js → register.onboard-DJEZcUm5.js} +2 -2
  80. package/dist/{register.onboard-CSmfgDU5.js → register.onboard-DWrxbBr5.js} +2 -2
  81. package/dist/{register.setup-CEW5ApHJ.js → register.setup-Ah9E7LHA.js} +2 -2
  82. package/dist/{register.setup-mJzihfMO.js → register.setup-BDqhSgCz.js} +2 -2
  83. package/dist/{register.subclis-Bi4jmYW6.js → register.subclis-Bb0yWevQ.js} +3 -3
  84. package/dist/{registry-DYq1AYOv.js → registry-UkL38jvt.js} +17 -17
  85. package/dist/{replies-DA4YTv9G.js → replies-CbeMv5WZ.js} +3 -3
  86. package/dist/{reply-prefix-CvEIl6_d.js → reply-prefix-ZnX2V-k9.js} +1 -1
  87. package/dist/{resolve-route-DX7xcMsD.js → resolve-route-gl0ZOOKR.js} +4 -4
  88. package/dist/{retry-B-y5suGA.js → retry-D25Z8MVS.js} +1 -1
  89. package/dist/{run-main-Ugk40lFF.js → run-main-CZI2Ne08.js} +3 -3
  90. package/dist/{runner-DKq2NJqT.js → runner-B2Y_5crX.js} +22 -22
  91. package/dist/{runner-qeYibveF.js → runner-DKkSu9cc.js} +1 -1
  92. package/dist/{send-Cq1L-2Ik.js → send-CCNIWI2Z.js} +10 -10
  93. package/dist/{send-C4Bqsa_r.js → send-CPSKimCF.js} +6 -6
  94. package/dist/{send-DX0p0ym_.js → send-Dy8tsHUE.js} +6 -6
  95. package/dist/{send-vtz9ZwUj.js → send-iUSZIdml.js} +7 -7
  96. package/dist/{send-DVt9RLDh.js → send-sgxdFZNy.js} +18 -18
  97. package/dist/{session-BQWef058.js → session-BTpKgzso.js} +8 -8
  98. package/dist/{skill-commands-BiPrghRt.js → skill-commands-HBkNllDU.js} +16 -16
  99. package/dist/{skills-Bs0AW1g3.js → skills-CGHRETGF.js} +24 -24
  100. package/dist/{sqlite-BHWvOATS.js → sqlite-JHY-uOmS.js} +16 -16
  101. package/dist/{store-01F_JM7O.js → store-Ea3zM6xK.js} +6 -6
  102. package/dist/{subsystem-BjyjJF-d.js → subsystem-DN75fnEF.js} +1 -1
  103. package/dist/{tables-BuM4FKR3.js → tables-Dkg9O8rv.js} +1 -1
  104. package/dist/{target-errors-BEugWC4F.js → target-errors-Pr77jao5.js} +2 -2
  105. package/dist/{thinking-BprCy23Z.js → thinking-C9-JAUzD.js} +5 -5
  106. package/dist/{tokens-W0JzCJJM.js → tokens-CCZl4YHT.js} +1 -1
  107. package/dist/{tool-images-SqqWIT22.js → tool-images-B1qVCntj.js} +2 -2
  108. package/dist/{tool-loop-detection-D5mBY7AC.js → tool-loop-detection-C33wf43N.js} +3 -3
  109. package/dist/{unified-runner-CMgTwCmG.js → unified-runner-hulABWDL.js} +225 -225
  110. package/dist/{update-cli-Dup4Xi6b.js → update-cli-CnN_k3P1.js} +4 -4
  111. package/dist/{update-cli-DiH9ccFa.js → update-cli-DwGmFbPH.js} +5 -5
  112. package/dist/{web-BrGvZQ21.js → web-C0ZdaR6w.js} +6 -6
  113. package/dist/{web-BIo1QcLd.js → web-DpQ5RaFz.js} +58 -58
  114. package/dist/{whatsapp-actions-DZfLLQ0Y.js → whatsapp-actions-D_w4AfW9.js} +23 -23
  115. package/dist/{workspace-DscDraUb.js → workspace-DqJ5h-ZB.js} +27 -27
  116. package/extensions/bluebubbles/package.json +1 -1
  117. package/extensions/copilot-proxy/package.json +1 -1
  118. package/extensions/diagnostics-otel/package.json +1 -1
  119. package/extensions/discord/package.json +1 -1
  120. package/extensions/feishu/package.json +1 -1
  121. package/extensions/google-antigravity-auth/package.json +1 -1
  122. package/extensions/google-gemini-cli-auth/package.json +1 -1
  123. package/extensions/googlechat/package.json +1 -1
  124. package/extensions/imessage/package.json +1 -1
  125. package/extensions/irc/package.json +1 -1
  126. package/extensions/learning-loop/package.json +1 -1
  127. package/extensions/line/package.json +1 -1
  128. package/extensions/llm-task/package.json +1 -1
  129. package/extensions/matrix/CHANGELOG.md +6 -0
  130. package/extensions/matrix/package.json +1 -1
  131. package/extensions/mattermost/package.json +1 -1
  132. package/extensions/memory-core/package.json +1 -1
  133. package/extensions/memory-lancedb/package.json +1 -1
  134. package/extensions/minimax-portal-auth/package.json +1 -1
  135. package/extensions/msteams/CHANGELOG.md +6 -0
  136. package/extensions/msteams/package.json +1 -1
  137. package/extensions/nextcloud-talk/package.json +1 -1
  138. package/extensions/nostr/CHANGELOG.md +6 -0
  139. package/extensions/nostr/package.json +1 -1
  140. package/extensions/open-prose/package.json +1 -1
  141. package/extensions/outlook/package.json +1 -1
  142. package/extensions/pipeline/package.json +1 -1
  143. package/extensions/signal/package.json +1 -1
  144. package/extensions/slack/package.json +1 -1
  145. package/extensions/telegram/package.json +1 -1
  146. package/extensions/tlon/package.json +1 -1
  147. package/extensions/twitch/CHANGELOG.md +6 -0
  148. package/extensions/twitch/package.json +1 -1
  149. package/extensions/voice-call/CHANGELOG.md +6 -0
  150. package/extensions/voice-call/package.json +1 -1
  151. package/extensions/whatsapp/package.json +1 -1
  152. package/extensions/zalo/CHANGELOG.md +6 -0
  153. package/extensions/zalo/package.json +1 -1
  154. package/extensions/zalouser/CHANGELOG.md +6 -0
  155. package/extensions/zalouser/package.json +1 -1
  156. package/package.json +1 -1
@@ -1,77 +1,77 @@
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-CE7eVGHg.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";
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-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 resolveAuthProfileDisplayLabel, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, G as getShellPathFromLoginShell, H as resolveModelAuthMode, I as createOllamaStreamFn, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as DEFAULT_PROVIDER, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, V as resolveEnvApiKey, W as normalizeSecretInput, X as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_MODEL, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, et as resolveSymiAgentDir, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, q as resolveShellEnvFallbackTimeoutMs, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-q3HjbboY.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";
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 resolveAuthProfileDisplayLabel, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, G as getShellPathFromLoginShell, H as resolveModelAuthMode, I as createOllamaStreamFn, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as DEFAULT_PROVIDER, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, V as resolveEnvApiKey, W as normalizeSecretInput, X as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_MODEL, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, et as resolveSymiAgentDir, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, q as resolveShellEnvFallbackTimeoutMs, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-CZZjOpX8.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";
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-DASLSiel.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-4Iu6iHCA.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-34eOyt_6.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";
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-Cr1X3W9i.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-giEDOxub.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-D0sqCqXY.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";
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-C7CauEK8.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";
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-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";
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";
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-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-DX0p0ym_.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-Cq1L-2Ik.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-Dy8tsHUE.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-CCNIWI2Z.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-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-DtM4u1u_.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-CQiU0O8b.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-BY58QnO8.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-DIKKFHpP.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-mx18hbyY.js";
38
- import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-CCaxCywz.js";
39
- import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-W0JzCJJM.js";
40
- 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-DVt9RLDh.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-CKMw_vhe.js";
38
+ import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-BQcKJvH0.js";
39
+ import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-CCZl4YHT.js";
40
+ 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-sgxdFZNy.js";
41
41
  import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-CuZX_Q4t.js";
42
- import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-CvEIl6_d.js";
43
- import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-CJ3M1Uxq.js";
44
- import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-BHWvOATS.js";
45
- import { n as retryAsync } from "./retry-B-y5suGA.js";
46
- 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-BEugWC4F.js";
47
- 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-BHW8Yu5A.js";
48
- import { n as resolveMarkdownTableMode } from "./markdown-tables-Dnj2LQUc.js";
42
+ import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-ZnX2V-k9.js";
43
+ import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-BoLUtbg2.js";
44
+ import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-JHY-uOmS.js";
45
+ import { n as retryAsync } from "./retry-D25Z8MVS.js";
46
+ 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-Pr77jao5.js";
47
+ 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-B9x_1qSr.js";
48
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-DuRhvVpP.js";
49
49
  import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-Cj6kcyGt.js";
50
- import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-Se92wAN5.js";
51
- import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-JAy_3A3B.js";
52
- 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-BSvi46KZ.js";
53
- 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-DKq2NJqT.js";
54
- 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-BiPrghRt.js";
50
+ import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-Bh5xx9IO.js";
51
+ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-Z9axTYHx.js";
52
+ 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-DPf4J7nj.js";
53
+ 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-B2Y_5crX.js";
54
+ 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-HBkNllDU.js";
55
55
  import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-Dvqh1Tgb.js";
56
56
  import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-Dnti0cFs.js";
57
57
  import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-BGS2SHjF.js";
58
- import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-D-kw83R0.js";
58
+ import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-Cm1OJRbv.js";
59
59
  import { n as normalizePollInput } from "./polls-BKbIUHj7.js";
60
- import { t as convertMarkdownTables } from "./tables-BuM4FKR3.js";
61
- import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-C4Bqsa_r.js";
62
- 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-vtz9ZwUj.js";
63
- import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-DX7xcMsD.js";
60
+ import { t as convertMarkdownTables } from "./tables-Dkg9O8rv.js";
61
+ import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-CPSKimCF.js";
62
+ 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-iUSZIdml.js";
63
+ import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-gl0ZOOKR.js";
64
64
  import { t as makeProxyFetch } from "./proxy-DVy9foH0.js";
65
- import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-DA4YTv9G.js";
66
- import { t as getActiveWebListener } from "./active-listener-Br2FcRv7.js";
65
+ import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CbeMv5WZ.js";
66
+ import { t as getActiveWebListener } from "./active-listener-C3pfJhdC.js";
67
67
  import { createRequire } from "node:module";
68
68
  import * as path$1 from "node:path";
69
69
  import path from "node:path";
70
- import fs, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
70
+ import fsSync, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
71
71
  import os, { homedir } from "node:os";
72
72
  import JSON5 from "json5";
73
- import * as fs$2 from "node:fs/promises";
74
- import fs$1 from "node:fs/promises";
73
+ import * as fs$1 from "node:fs/promises";
74
+ import fs from "node:fs/promises";
75
75
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
76
76
  import { inspect, promisify } from "node:util";
77
77
  import { fileURLToPath } from "node:url";
@@ -81,7 +81,7 @@ import AjvPkg from "ajv";
81
81
  import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, SettingsManager, codingTools, createAgentSession, createEditTool, createReadTool, createWriteTool, estimateTokens, generateSummary, readTool } from "@mariozechner/pi-coding-agent";
82
82
  import { createServer } from "node:http";
83
83
  import { ProxyAgent, fetch as fetch$1 } from "undici";
84
- import WebSocket$1, { WebSocket } from "ws";
84
+ import WebSocket, { WebSocket as WebSocket$1 } from "ws";
85
85
  import { Buffer as Buffer$1 } from "node:buffer";
86
86
  import { EdgeTTS } from "node-edge-tts";
87
87
  import { createJiti } from "jiti";
@@ -3922,7 +3922,7 @@ async function resolveSymiDocsPath(params) {
3922
3922
  const workspaceDir = params.workspaceDir?.trim();
3923
3923
  if (workspaceDir) {
3924
3924
  const workspaceDocs = path.join(workspaceDir, "docs");
3925
- if (fs.existsSync(workspaceDocs)) return workspaceDocs;
3925
+ if (fsSync.existsSync(workspaceDocs)) return workspaceDocs;
3926
3926
  }
3927
3927
  const packageRoot = await resolveSymiPackageRoot({
3928
3928
  cwd: params.cwd,
@@ -3931,7 +3931,7 @@ async function resolveSymiDocsPath(params) {
3931
3931
  });
3932
3932
  if (!packageRoot) return null;
3933
3933
  const packageDocs = path.join(packageRoot, "docs");
3934
- return fs.existsSync(packageDocs) ? packageDocs : null;
3934
+ return fsSync.existsSync(packageDocs) ? packageDocs : null;
3935
3935
  }
3936
3936
 
3937
3937
  //#endregion
@@ -4240,7 +4240,7 @@ async function getMemorySearchManager(params) {
4240
4240
  if (cached) return { manager: cached };
4241
4241
  }
4242
4242
  try {
4243
- const { QmdMemoryManager } = await import("./qmd-manager-lBS9mT9w.js");
4243
+ const { QmdMemoryManager } = await import("./qmd-manager-8-Z3Cdpt.js");
4244
4244
  const primary = await QmdMemoryManager.create({
4245
4245
  cfg: params.cfg,
4246
4246
  agentId: params.agentId,
@@ -4252,7 +4252,7 @@ async function getMemorySearchManager(params) {
4252
4252
  const wrapper = new FallbackMemoryManager({
4253
4253
  primary,
4254
4254
  fallbackFactory: async () => {
4255
- const { MemoryIndexManager } = await import("./manager-CJ3M1Uxq.js").then((n) => n.t);
4255
+ const { MemoryIndexManager } = await import("./manager-BoLUtbg2.js").then((n) => n.t);
4256
4256
  return await MemoryIndexManager.get(params);
4257
4257
  }
4258
4258
  }, () => QMD_MANAGER_CACHE.delete(cacheKey));
@@ -4265,7 +4265,7 @@ async function getMemorySearchManager(params) {
4265
4265
  }
4266
4266
  }
4267
4267
  try {
4268
- const { MemoryIndexManager } = await import("./manager-CJ3M1Uxq.js").then((n) => n.t);
4268
+ const { MemoryIndexManager } = await import("./manager-BoLUtbg2.js").then((n) => n.t);
4269
4269
  return { manager: await MemoryIndexManager.get(params) };
4270
4270
  } catch (err) {
4271
4271
  return {
@@ -6813,7 +6813,7 @@ async function recordLoopOutcome(args) {
6813
6813
  if (!args.ctx?.sessionKey) return;
6814
6814
  try {
6815
6815
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
6816
- const { recordToolCallOutcome } = await import("./tool-loop-detection-D5mBY7AC.js");
6816
+ const { recordToolCallOutcome } = await import("./tool-loop-detection-C33wf43N.js");
6817
6817
  recordToolCallOutcome(getDiagnosticSessionState({
6818
6818
  sessionKey: args.ctx.sessionKey,
6819
6819
  sessionId: args.ctx?.agentId
@@ -6834,8 +6834,8 @@ async function runBeforeToolCallHook(args) {
6834
6834
  const params = args.params;
6835
6835
  if (args.ctx?.sessionKey) {
6836
6836
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
6837
- const { logToolLoopAction } = await import("./diagnostic-CQiU0O8b.js").then((n) => n.n);
6838
- const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-D5mBY7AC.js");
6837
+ const { logToolLoopAction } = await import("./diagnostic-DIKKFHpP.js").then((n) => n.n);
6838
+ const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-C33wf43N.js");
6839
6839
  const sessionState = getDiagnosticSessionState({
6840
6840
  sessionKey: args.ctx.sessionKey,
6841
6841
  sessionId: args.ctx?.agentId
@@ -7122,7 +7122,7 @@ function resolveDefaultIdentityPath() {
7122
7122
  return path.join(resolveStateDir(), "identity", "device.json");
7123
7123
  }
7124
7124
  function ensureDir$2(filePath) {
7125
- fs.mkdirSync(path.dirname(filePath), { recursive: true });
7125
+ fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
7126
7126
  }
7127
7127
  const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
7128
7128
  function base64UrlEncode(buf) {
@@ -7158,8 +7158,8 @@ function generateIdentity() {
7158
7158
  }
7159
7159
  function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
7160
7160
  try {
7161
- if (fs.existsSync(filePath)) {
7162
- const raw = fs.readFileSync(filePath, "utf8");
7161
+ if (fsSync.existsSync(filePath)) {
7162
+ const raw = fsSync.readFileSync(filePath, "utf8");
7163
7163
  const parsed = JSON.parse(raw);
7164
7164
  if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
7165
7165
  const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
@@ -7168,9 +7168,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
7168
7168
  ...parsed,
7169
7169
  deviceId: derivedId
7170
7170
  };
7171
- fs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
7171
+ fsSync.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
7172
7172
  try {
7173
- fs.chmodSync(filePath, 384);
7173
+ fsSync.chmodSync(filePath, 384);
7174
7174
  } catch {}
7175
7175
  return {
7176
7176
  deviceId: derivedId,
@@ -7195,9 +7195,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
7195
7195
  privateKeyPem: identity.privateKeyPem,
7196
7196
  createdAtMs: Date.now()
7197
7197
  };
7198
- fs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
7198
+ fsSync.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
7199
7199
  try {
7200
- fs.chmodSync(filePath, 384);
7200
+ fsSync.chmodSync(filePath, 384);
7201
7201
  } catch {}
7202
7202
  return identity;
7203
7203
  }
@@ -7220,7 +7220,7 @@ function normalizeFingerprint(input) {
7220
7220
  const execFileAsync = promisify(execFile);
7221
7221
  async function fileExists(filePath) {
7222
7222
  try {
7223
- await fs$1.access(filePath);
7223
+ await fs.access(filePath);
7224
7224
  return true;
7225
7225
  } catch {
7226
7226
  return false;
@@ -7247,8 +7247,8 @@ async function generateSelfSignedCert(params) {
7247
7247
  "-subj",
7248
7248
  "/CN=symi-gateway"
7249
7249
  ]);
7250
- await fs$1.chmod(params.keyPath, 384).catch(() => {});
7251
- await fs$1.chmod(params.certPath, 384).catch(() => {});
7250
+ await fs.chmod(params.keyPath, 384).catch(() => {});
7251
+ await fs.chmod(params.certPath, 384).catch(() => {});
7252
7252
  params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
7253
7253
  }
7254
7254
  async function loadGatewayTlsRuntime(cfg, log) {
@@ -7286,9 +7286,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
7286
7286
  error: "gateway tls: cert/key missing"
7287
7287
  };
7288
7288
  try {
7289
- const cert = await fs$1.readFile(certPath, "utf8");
7290
- const key = await fs$1.readFile(keyPath, "utf8");
7291
- const ca = caPath ? await fs$1.readFile(caPath, "utf8") : void 0;
7289
+ const cert = await fs.readFile(certPath, "utf8");
7290
+ const key = await fs.readFile(keyPath, "utf8");
7291
+ const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
7292
7292
  const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
7293
7293
  if (!fingerprintSha256) return {
7294
7294
  enabled: false,
@@ -7347,8 +7347,8 @@ function resolveDeviceAuthPath(env = process.env) {
7347
7347
  }
7348
7348
  function readStore(filePath) {
7349
7349
  try {
7350
- if (!fs.existsSync(filePath)) return null;
7351
- const raw = fs.readFileSync(filePath, "utf8");
7350
+ if (!fsSync.existsSync(filePath)) return null;
7351
+ const raw = fsSync.readFileSync(filePath, "utf8");
7352
7352
  const parsed = JSON.parse(raw);
7353
7353
  if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
7354
7354
  if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
@@ -7358,10 +7358,10 @@ function readStore(filePath) {
7358
7358
  }
7359
7359
  }
7360
7360
  function writeStore(filePath, store) {
7361
- fs.mkdirSync(path.dirname(filePath), { recursive: true });
7362
- fs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
7361
+ fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
7362
+ fsSync.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
7363
7363
  try {
7364
- fs.chmodSync(filePath, 384);
7364
+ fsSync.chmodSync(filePath, 384);
7365
7365
  } catch {}
7366
7366
  }
7367
7367
  function loadDeviceAuthToken(params) {
@@ -8668,7 +8668,7 @@ var GatewayClient = class {
8668
8668
  if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
8669
8669
  });
8670
8670
  }
8671
- this.ws = new WebSocket(url, wsOptions);
8671
+ this.ws = new WebSocket$1(url, wsOptions);
8672
8672
  this.ws.on("open", () => {
8673
8673
  if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
8674
8674
  const tlsError = this.validateTlsFingerprint();
@@ -8887,7 +8887,7 @@ var GatewayClient = class {
8887
8887
  return null;
8888
8888
  }
8889
8889
  async request(method, params, opts) {
8890
- if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
8890
+ if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
8891
8891
  const id = randomUUID();
8892
8892
  const frame = {
8893
8893
  type: "req",
@@ -10153,7 +10153,7 @@ async function routeReply(params) {
10153
10153
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
10154
10154
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
10155
10155
  try {
10156
- const { deliverOutboundPayloads } = await import("./deliver-DtM4u1u_.js").then((n) => n.n);
10156
+ const { deliverOutboundPayloads } = await import("./deliver-BY58QnO8.js").then((n) => n.n);
10157
10157
  return {
10158
10158
  ok: true,
10159
10159
  messageId: (await deliverOutboundPayloads({
@@ -10549,7 +10549,7 @@ function normalizeSessionKey(value) {
10549
10549
  }
10550
10550
  function readSessionStore(storePath) {
10551
10551
  try {
10552
- const raw = fs.readFileSync(storePath, "utf-8");
10552
+ const raw = fsSync.readFileSync(storePath, "utf-8");
10553
10553
  const parsed = JSON5.parse(raw);
10554
10554
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
10555
10555
  } catch {}
@@ -15608,7 +15608,7 @@ async function createModelSelectionState(params) {
15608
15608
  }
15609
15609
  }
15610
15610
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
15611
- const { ensureAuthProfileStore } = await import("./auth-profiles-q3HjbboY.js").then((n) => n.t);
15611
+ const { ensureAuthProfileStore } = await import("./auth-profiles-CZZjOpX8.js").then((n) => n.t);
15612
15612
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
15613
15613
  const providerKey = normalizeProviderId(provider);
15614
15614
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -17981,8 +17981,8 @@ const DEFAULT_SAFE_BINS = [
17981
17981
  ];
17982
17982
  function isExecutableFile(filePath) {
17983
17983
  try {
17984
- if (!fs.statSync(filePath).isFile()) return false;
17985
- if (process.platform !== "win32") fs.accessSync(filePath, fs.constants.X_OK);
17984
+ if (!fsSync.statSync(filePath).isFile()) return false;
17985
+ if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
17986
17986
  return true;
17987
17987
  } catch {
17988
17988
  return false;
@@ -18020,7 +18020,7 @@ function normalizeMatchTarget(value) {
18020
18020
  }
18021
18021
  function tryRealpath(value) {
18022
18022
  try {
18023
- return fs.realpathSync(value);
18023
+ return fsSync.realpathSync(value);
18024
18024
  } catch {
18025
18025
  return null;
18026
18026
  }
@@ -19252,7 +19252,7 @@ function mergeLegacyAgent(current, legacy) {
19252
19252
  }
19253
19253
  function ensureDir$1(filePath) {
19254
19254
  const dir = path.dirname(filePath);
19255
- fs.mkdirSync(dir, { recursive: true });
19255
+ fsSync.mkdirSync(dir, { recursive: true });
19256
19256
  }
19257
19257
  function coerceAllowlistEntries(allowlist) {
19258
19258
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -19322,11 +19322,11 @@ function generateToken() {
19322
19322
  function loadExecApprovals() {
19323
19323
  const filePath = resolveExecApprovalsPath();
19324
19324
  try {
19325
- if (!fs.existsSync(filePath)) return normalizeExecApprovals({
19325
+ if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
19326
19326
  version: 1,
19327
19327
  agents: {}
19328
19328
  });
19329
- const raw = fs.readFileSync(filePath, "utf8");
19329
+ const raw = fsSync.readFileSync(filePath, "utf8");
19330
19330
  const parsed = JSON.parse(raw);
19331
19331
  if (parsed?.version !== 1) return normalizeExecApprovals({
19332
19332
  version: 1,
@@ -19343,9 +19343,9 @@ function loadExecApprovals() {
19343
19343
  function saveExecApprovals(file) {
19344
19344
  const filePath = resolveExecApprovalsPath();
19345
19345
  ensureDir$1(filePath);
19346
- fs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
19346
+ fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
19347
19347
  try {
19348
- fs.chmodSync(filePath, 384);
19348
+ fsSync.chmodSync(filePath, 384);
19349
19349
  } catch {}
19350
19350
  }
19351
19351
  function ensureExecApprovals() {
@@ -19666,7 +19666,7 @@ function resolvePowerShellPath() {
19666
19666
  const systemRoot = process.env.SystemRoot || process.env.WINDIR;
19667
19667
  if (systemRoot) {
19668
19668
  const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
19669
- if (fs.existsSync(candidate)) return candidate;
19669
+ if (fsSync.existsSync(candidate)) return candidate;
19670
19670
  }
19671
19671
  return "powershell.exe";
19672
19672
  }
@@ -19704,7 +19704,7 @@ function resolveShellFromPath(name) {
19704
19704
  for (const entry of entries) {
19705
19705
  const candidate = path.join(entry, name);
19706
19706
  try {
19707
- fs.accessSync(candidate, fs.constants.X_OK);
19707
+ fsSync.accessSync(candidate, fsSync.constants.X_OK);
19708
19708
  return candidate;
19709
19709
  } catch {}
19710
19710
  }
@@ -20452,7 +20452,7 @@ async function resolveSandboxWorkdir(params) {
20452
20452
  cwd: process.cwd(),
20453
20453
  root: params.sandbox.workspaceDir
20454
20454
  });
20455
- if (!(await fs$1.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
20455
+ if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
20456
20456
  const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
20457
20457
  const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
20458
20458
  return {
@@ -21503,13 +21503,13 @@ async function validateScriptFileForShellBleed(params) {
21503
21503
  cwd: params.workdir,
21504
21504
  root: params.workdir
21505
21505
  });
21506
- stat = await fs$1.stat(absPath);
21506
+ stat = await fs.stat(absPath);
21507
21507
  } catch {
21508
21508
  return;
21509
21509
  }
21510
21510
  if (!stat.isFile()) return;
21511
21511
  if (stat.size > 512 * 1024) return;
21512
- const content = await fs$1.readFile(absPath, "utf-8");
21512
+ const content = await fs.readFile(absPath, "utf-8");
21513
21513
  const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
21514
21514
  if (first) {
21515
21515
  const idx = first.index;
@@ -22760,7 +22760,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
22760
22760
  function hasGitMarker(repoRoot) {
22761
22761
  const gitPath = path.join(repoRoot, ".git");
22762
22762
  try {
22763
- const stat = fs.statSync(gitPath);
22763
+ const stat = fsSync.statSync(gitPath);
22764
22764
  return stat.isDirectory() || stat.isFile();
22765
22765
  } catch {
22766
22766
  return false;
@@ -22772,10 +22772,10 @@ function findGitRoot(startDir, opts = {}) {
22772
22772
  function resolveGitDirFromMarker(repoRoot) {
22773
22773
  const gitPath = path.join(repoRoot, ".git");
22774
22774
  try {
22775
- const stat = fs.statSync(gitPath);
22775
+ const stat = fsSync.statSync(gitPath);
22776
22776
  if (stat.isDirectory()) return gitPath;
22777
22777
  if (!stat.isFile()) return null;
22778
- const match = fs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22778
+ const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22779
22779
  if (!match?.[1]) return null;
22780
22780
  return path.resolve(repoRoot, match[1].trim());
22781
22781
  } catch {
@@ -22842,7 +22842,7 @@ const resolveCommitHash = (options = {}) => {
22842
22842
  cachedCommit = null;
22843
22843
  return cachedCommit;
22844
22844
  }
22845
- const head = fs.readFileSync(headPath, "utf-8").trim();
22845
+ const head = fsSync.readFileSync(headPath, "utf-8").trim();
22846
22846
  if (!head) {
22847
22847
  cachedCommit = null;
22848
22848
  return cachedCommit;
@@ -22850,7 +22850,7 @@ const resolveCommitHash = (options = {}) => {
22850
22850
  if (head.startsWith("ref:")) {
22851
22851
  const ref = head.replace(/^ref:\s*/i, "").trim();
22852
22852
  const refPath = path.resolve(path.dirname(headPath), ref);
22853
- cachedCommit = formatCommit(fs.readFileSync(refPath, "utf-8").trim());
22853
+ cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
22854
22854
  return cachedCommit;
22855
22855
  }
22856
22856
  cachedCommit = formatCommit(head);
@@ -23054,9 +23054,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
23054
23054
  } catch {
23055
23055
  return;
23056
23056
  }
23057
- if (!fs.existsSync(logPath)) return;
23057
+ if (!fsSync.existsSync(logPath)) return;
23058
23058
  try {
23059
- const lines = fs.readFileSync(logPath, "utf-8").split(/\n+/);
23059
+ const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
23060
23060
  let input = 0;
23061
23061
  let output = 0;
23062
23062
  let promptTokens = 0;
@@ -24296,7 +24296,7 @@ function resolveRepoRoot(params) {
24296
24296
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
24297
24297
  if (configured) try {
24298
24298
  const resolved = path.resolve(configured);
24299
- if (fs.statSync(resolved).isDirectory()) return resolved;
24299
+ if (fsSync.statSync(resolved).isDirectory()) return resolved;
24300
24300
  } catch {}
24301
24301
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
24302
24302
  const seen = /* @__PURE__ */ new Set();
@@ -24615,7 +24615,7 @@ async function buildContextReply(params) {
24615
24615
  //#region src/auto-reply/reply/commands-export-session.ts
24616
24616
  const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
24617
24617
  function loadTemplate(fileName) {
24618
- return fs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
24618
+ return fsSync.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
24619
24619
  }
24620
24620
  function generateHtml(sessionData) {
24621
24621
  const template = loadTemplate("template.html");
@@ -24689,7 +24689,7 @@ async function buildExportSessionReply(params) {
24689
24689
  } catch (err) {
24690
24690
  return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
24691
24691
  }
24692
- if (!fs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
24692
+ if (!fsSync.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
24693
24693
  const sessionManager = SessionManager.open(sessionFile);
24694
24694
  const entries = sessionManager.getEntries();
24695
24695
  const header = sessionManager.getHeader();
@@ -24710,8 +24710,8 @@ async function buildExportSessionReply(params) {
24710
24710
  const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
24711
24711
  const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
24712
24712
  const outputDir = path.dirname(outputPath);
24713
- if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
24714
- fs.writeFileSync(outputPath, html, "utf-8");
24713
+ if (!fsSync.existsSync(outputDir)) fsSync.mkdirSync(outputDir, { recursive: true });
24714
+ fsSync.writeFileSync(outputPath, html, "utf-8");
24715
24715
  const relativePath = path.relative(params.workspaceDir, outputPath);
24716
24716
  return { text: [
24717
24717
  "✅ Session exported!",
@@ -24825,8 +24825,8 @@ function resolveZaiApiKey() {
24825
24825
  }
24826
24826
  try {
24827
24827
  const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
24828
- if (!fs.existsSync(authPath)) return;
24829
- const data = JSON.parse(fs.readFileSync(authPath, "utf-8"));
24828
+ if (!fsSync.existsSync(authPath)) return;
24829
+ const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
24830
24830
  return data["z-ai"]?.access || data.zai?.access;
24831
24831
  } catch {
24832
24832
  return;
@@ -26391,7 +26391,7 @@ function shouldPersistAnyBindingState() {
26391
26391
  }
26392
26392
  function shouldPersistBindingMutations() {
26393
26393
  if (shouldPersistAnyBindingState()) return true;
26394
- return fs.existsSync(resolveThreadBindingsPath());
26394
+ return fsSync.existsSync(resolveThreadBindingsPath());
26395
26395
  }
26396
26396
  function saveBindingsToDisk(params = {}) {
26397
26397
  if (!params.force && !shouldPersistAnyBindingState()) return;
@@ -27379,7 +27379,7 @@ const applyCostTotal = (totals, costTotal) => {
27379
27379
  totals.totalCost += costTotal;
27380
27380
  };
27381
27381
  async function* readJsonlRecords(filePath) {
27382
- const fileStream = fs.createReadStream(filePath, { encoding: "utf-8" });
27382
+ const fileStream = fsSync.createReadStream(filePath, { encoding: "utf-8" });
27383
27383
  const rl = readline.createInterface({
27384
27384
  input: fileStream,
27385
27385
  crlfDelay: Infinity
@@ -27451,10 +27451,10 @@ async function loadCostUsageSummary(params) {
27451
27451
  const dailyMap = /* @__PURE__ */ new Map();
27452
27452
  const totals = emptyTotals();
27453
27453
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
27454
- const entries = await fs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
27454
+ const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
27455
27455
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
27456
27456
  const filePath = path.join(sessionsDir, entry.name);
27457
- const stats = await fs.promises.stat(filePath).catch(() => null);
27457
+ const stats = await fsSync.promises.stat(filePath).catch(() => null);
27458
27458
  if (!stats) return null;
27459
27459
  if (stats.mtimeMs < sinceTime) return null;
27460
27460
  return filePath;
@@ -27487,7 +27487,7 @@ async function loadCostUsageSummary(params) {
27487
27487
  }
27488
27488
  async function loadSessionCostSummary(params) {
27489
27489
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
27490
- if (!sessionFile || !fs.existsSync(sessionFile)) return null;
27490
+ if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
27491
27491
  const totals = emptyTotals();
27492
27492
  let firstActivity;
27493
27493
  let lastActivity;
@@ -29359,7 +29359,7 @@ async function handleCommands(params) {
29359
29359
  try {
29360
29360
  const messages = [];
29361
29361
  if (sessionFile) {
29362
- const content = await fs$1.readFile(sessionFile, "utf-8");
29362
+ const content = await fs.readFile(sessionFile, "utf-8");
29363
29363
  for (const line of content.split("\n")) {
29364
29364
  if (!line.trim()) continue;
29365
29365
  try {
@@ -31693,7 +31693,7 @@ function asBoolean(value) {
31693
31693
  }
31694
31694
  function resolveTempPathParts(opts) {
31695
31695
  const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
31696
- if (!opts.tmpDir) fs.mkdirSync(tmpDir, {
31696
+ if (!opts.tmpDir) fsSync.mkdirSync(tmpDir, {
31697
31697
  recursive: true,
31698
31698
  mode: 448
31699
31699
  });
@@ -31759,7 +31759,7 @@ async function writeUrlToFile(filePath, url) {
31759
31759
  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}`);
31760
31760
  const body = res.body;
31761
31761
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
31762
- const fileHandle = await fs$2.open(filePath, "w");
31762
+ const fileHandle = await fs$1.open(filePath, "w");
31763
31763
  let bytes = 0;
31764
31764
  let thrown;
31765
31765
  try {
@@ -31778,7 +31778,7 @@ async function writeUrlToFile(filePath, url) {
31778
31778
  await fileHandle.close();
31779
31779
  }
31780
31780
  if (thrown) {
31781
- await fs$2.unlink(filePath).catch(() => {});
31781
+ await fs$1.unlink(filePath).catch(() => {});
31782
31782
  throw thrown;
31783
31783
  }
31784
31784
  return {
@@ -31788,7 +31788,7 @@ async function writeUrlToFile(filePath, url) {
31788
31788
  }
31789
31789
  async function writeBase64ToFile(filePath, base64) {
31790
31790
  const buf = Buffer.from(base64, "base64");
31791
- await fs$2.writeFile(filePath, buf);
31791
+ await fs$1.writeFile(filePath, buf);
31792
31792
  return {
31793
31793
  path: filePath,
31794
31794
  bytes: buf.length
@@ -31854,7 +31854,7 @@ async function readJsonlFromPath(jsonlPath) {
31854
31854
  if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
31855
31855
  throw new Error("jsonlPath outside allowed roots");
31856
31856
  }
31857
- const canonical = await fs$1.realpath(resolved).catch(() => resolved);
31857
+ const canonical = await fs.realpath(resolved).catch(() => resolved);
31858
31858
  if (!isInboundPathAllowed({
31859
31859
  filePath: canonical,
31860
31860
  roots
@@ -31862,7 +31862,7 @@ async function readJsonlFromPath(jsonlPath) {
31862
31862
  if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
31863
31863
  throw new Error("jsonlPath outside allowed roots");
31864
31864
  }
31865
- return await fs$1.readFile(canonical, "utf8");
31865
+ return await fs.readFile(canonical, "utf8");
31866
31866
  }
31867
31867
  const CanvasToolSchema = Type.Object({
31868
31868
  action: stringEnum(CANVAS_ACTIONS),
@@ -32666,12 +32666,12 @@ function resolveRestartSentinelPath(env = process.env) {
32666
32666
  }
32667
32667
  async function writeRestartSentinel(payload, env = process.env) {
32668
32668
  const filePath = resolveRestartSentinelPath(env);
32669
- await fs$1.mkdir(path.dirname(filePath), { recursive: true });
32669
+ await fs.mkdir(path.dirname(filePath), { recursive: true });
32670
32670
  const data = {
32671
32671
  version: 1,
32672
32672
  payload
32673
32673
  };
32674
- await fs$1.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
32674
+ await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
32675
32675
  return filePath;
32676
32676
  }
32677
32677
 
@@ -33486,7 +33486,7 @@ async function hydrateAttachmentPayload(params) {
33486
33486
  accountId: params.accountId
33487
33487
  }),
33488
33488
  sandboxValidated: true,
33489
- readFile: (filePath) => fs$1.readFile(filePath)
33489
+ readFile: (filePath) => fs.readFile(filePath)
33490
33490
  });
33491
33491
  params.args.buffer = media.buffer.toString("base64");
33492
33492
  if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
@@ -36771,7 +36771,7 @@ function listExistingAgentIdsFromDisk() {
36771
36771
  const root = resolveStateDir();
36772
36772
  const agentsDir = path.join(root, "agents");
36773
36773
  try {
36774
- return fs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
36774
+ return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
36775
36775
  } catch {
36776
36776
  return [];
36777
36777
  }
@@ -40639,18 +40639,18 @@ function appendImagePathsToPrompt(prompt, paths) {
40639
40639
  return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
40640
40640
  }
40641
40641
  async function writeCliImages(images) {
40642
- const tempDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
40642
+ const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
40643
40643
  const paths = [];
40644
40644
  for (let i = 0; i < images.length; i += 1) {
40645
40645
  const image = images[i];
40646
40646
  const ext = resolveImageExtension(image.mimeType);
40647
40647
  const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
40648
40648
  const buffer = Buffer.from(image.data, "base64");
40649
- await fs$1.writeFile(filePath, buffer, { mode: 384 });
40649
+ await fs.writeFile(filePath, buffer, { mode: 384 });
40650
40650
  paths.push(filePath);
40651
40651
  }
40652
40652
  const cleanup = async () => {
40653
- await fs$1.rm(tempDir, {
40653
+ await fs.rm(tempDir, {
40654
40654
  recursive: true,
40655
40655
  force: true
40656
40656
  });
@@ -41724,7 +41724,7 @@ async function runAgentTurnWithFallback(params) {
41724
41724
  if (corruptedSessionId) {
41725
41725
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
41726
41726
  try {
41727
- fs.unlinkSync(transcriptPath);
41727
+ fsSync.unlinkSync(transcriptPath);
41728
41728
  } catch {}
41729
41729
  }
41730
41730
  delete params.activeSessionStore[sessionKey];
@@ -42440,9 +42440,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
42440
42440
  * Returns messages from the last N lines (default 100).
42441
42441
  */
42442
42442
  function readSessionMessages(sessionFile, maxLines = 100) {
42443
- if (!fs.existsSync(sessionFile)) return [];
42443
+ if (!fsSync.existsSync(sessionFile)) return [];
42444
42444
  try {
42445
- const recentLines = fs.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
42445
+ const recentLines = fsSync.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
42446
42446
  const messages = [];
42447
42447
  for (const line of recentLines) try {
42448
42448
  const entry = JSON.parse(line);
@@ -42483,8 +42483,8 @@ const MAX_CONTEXT_CHARS = 3e3;
42483
42483
  async function readPostCompactionContext(workspaceDir) {
42484
42484
  const agentsPath = path.join(workspaceDir, "AGENTS.md");
42485
42485
  try {
42486
- if (!fs.existsSync(agentsPath)) return null;
42487
- const sections = extractSections(await fs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
42486
+ if (!fsSync.existsSync(agentsPath)) return null;
42487
+ const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
42488
42488
  if (sections.length === 0) return null;
42489
42489
  const combined = sections.join("\n\n");
42490
42490
  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);
@@ -42688,7 +42688,7 @@ async function runReplyAgent(params) {
42688
42688
  if (resolved) transcriptCandidates.add(resolved);
42689
42689
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
42690
42690
  for (const candidate of transcriptCandidates) try {
42691
- fs.unlinkSync(candidate);
42691
+ fsSync.unlinkSync(candidate);
42692
42692
  } catch {}
42693
42693
  }
42694
42694
  return true;
@@ -43594,7 +43594,7 @@ async function deliverSessionMaintenanceWarning(params) {
43594
43594
  return;
43595
43595
  }
43596
43596
  try {
43597
- const { deliverOutboundPayloads } = await import("./deliver-DtM4u1u_.js").then((n) => n.n);
43597
+ const { deliverOutboundPayloads } = await import("./deliver-BY58QnO8.js").then((n) => n.n);
43598
43598
  await deliverOutboundPayloads({
43599
43599
  cfg: params.cfg,
43600
43600
  channel,
@@ -43620,7 +43620,7 @@ function forkSessionFromParent(params) {
43620
43620
  agentId: params.agentId,
43621
43621
  sessionsDir: params.sessionsDir
43622
43622
  });
43623
- if (!parentSessionFile || !fs.existsSync(parentSessionFile)) return null;
43623
+ if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
43624
43624
  try {
43625
43625
  const manager = SessionManager.open(parentSessionFile);
43626
43626
  const leafId = manager.getLeafId();
@@ -43644,7 +43644,7 @@ function forkSessionFromParent(params) {
43644
43644
  cwd: manager.getCwd(),
43645
43645
  parentSession: parentSessionFile
43646
43646
  };
43647
- fs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
43647
+ fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
43648
43648
  return {
43649
43649
  sessionId,
43650
43650
  sessionFile
@@ -43969,7 +43969,7 @@ async function stageSandboxMedia(params) {
43969
43969
  };
43970
43970
  try {
43971
43971
  const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
43972
- await fs$1.mkdir(destDir, { recursive: true });
43972
+ await fs.mkdir(destDir, { recursive: true });
43973
43973
  const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
43974
43974
  cfg,
43975
43975
  accountId: ctx.AccountId
@@ -44019,7 +44019,7 @@ async function stageSandboxMedia(params) {
44019
44019
  usedNames.add(fileName);
44020
44020
  const dest = path.join(destDir, fileName);
44021
44021
  if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
44022
- else await fs$1.copyFile(source, dest);
44022
+ else await fs.copyFile(source, dest);
44023
44023
  const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
44024
44024
  staged.set(source, stagedPath);
44025
44025
  }
@@ -47039,8 +47039,8 @@ async function describeStickerImage(params) {
47039
47039
  const { provider, model } = resolved;
47040
47040
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
47041
47041
  try {
47042
- const buffer = await fs$1.readFile(imagePath);
47043
- const { describeImageWithModel } = await import("./image-mx18hbyY.js").then((n) => n.n);
47042
+ const buffer = await fs.readFile(imagePath);
47043
+ const { describeImageWithModel } = await import("./image-CKMw_vhe.js").then((n) => n.n);
47044
47044
  return (await describeImageWithModel({
47045
47045
  buffer,
47046
47046
  fileName: "sticker.webp",
@@ -47463,7 +47463,7 @@ function createWhatsAppLoginTool() {
47463
47463
  force: Type.Optional(Type.Boolean())
47464
47464
  }),
47465
47465
  execute: async (_toolCallId, args) => {
47466
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-DRepVMvu.js");
47466
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-BJMvic1s.js");
47467
47467
  if ((args?.action ?? "start") === "wait") {
47468
47468
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
47469
47469
  return {
@@ -47745,7 +47745,7 @@ async function withMemoryManagerForAgent(params) {
47745
47745
  }
47746
47746
  async function checkReadableFile(pathname) {
47747
47747
  try {
47748
- await fs$1.access(pathname, fs.constants.R_OK);
47748
+ await fs.access(pathname, fsSync.constants.R_OK);
47749
47749
  return { exists: true };
47750
47750
  } catch (err) {
47751
47751
  const code = err.code;
@@ -47762,7 +47762,7 @@ async function scanSessionFiles(agentId) {
47762
47762
  try {
47763
47763
  return {
47764
47764
  source: "sessions",
47765
- totalFiles: (await fs$1.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
47765
+ totalFiles: (await fs.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
47766
47766
  issues
47767
47767
  };
47768
47768
  } catch (err) {
@@ -47794,7 +47794,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
47794
47794
  if (alt.issue) issues.push(alt.issue);
47795
47795
  const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
47796
47796
  for (const extraPath of resolvedExtraPaths) try {
47797
- if ((await fs$1.lstat(extraPath)).isSymbolicLink()) continue;
47797
+ if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
47798
47798
  const extraCheck = await checkReadableFile(extraPath);
47799
47799
  if (extraCheck.issue) issues.push(extraCheck.issue);
47800
47800
  } catch (err) {
@@ -47804,7 +47804,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
47804
47804
  }
47805
47805
  let dirReadable = null;
47806
47806
  try {
47807
- await fs$1.access(memoryDir, fs.constants.R_OK);
47807
+ await fs.access(memoryDir, fsSync.constants.R_OK);
47808
47808
  dirReadable = true;
47809
47809
  } catch (err) {
47810
47810
  const code = err.code;
@@ -47852,7 +47852,7 @@ async function summarizeQmdIndexArtifact(manager) {
47852
47852
  if (!dbPath) return null;
47853
47853
  let stat;
47854
47854
  try {
47855
- stat = await fs$1.stat(dbPath);
47855
+ stat = await fs.stat(dbPath);
47856
47856
  } catch (err) {
47857
47857
  const code = err.code;
47858
47858
  if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
@@ -49702,7 +49702,7 @@ async function preflightDiscordMessage(params) {
49702
49702
  let preflightTranscript;
49703
49703
  const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
49704
49704
  if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
49705
- const { transcribeFirstAudio } = await import("./audio-preflight-Cz1htqcz.js");
49705
+ const { transcribeFirstAudio } = await import("./audio-preflight-UXg8r6a7.js");
49706
49706
  const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
49707
49707
  if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
49708
49708
  ctx: {
@@ -50665,7 +50665,7 @@ function identityHasValues(identity) {
50665
50665
  }
50666
50666
  function loadIdentityFromFile(identityPath) {
50667
50667
  try {
50668
- const parsed = parseIdentityMarkdown(fs.readFileSync(identityPath, "utf-8"));
50668
+ const parsed = parseIdentityMarkdown(fsSync.readFileSync(identityPath, "utf-8"));
50669
50669
  if (!identityHasValues(parsed)) return null;
50670
50670
  return parsed;
50671
50671
  } catch {
@@ -50704,7 +50704,7 @@ function isDataAvatar(value) {
50704
50704
  }
50705
50705
  function resolveExistingPath(value) {
50706
50706
  try {
50707
- return fs.realpathSync(value);
50707
+ return fsSync.realpathSync(value);
50708
50708
  } catch {
50709
50709
  return path.resolve(value);
50710
50710
  }
@@ -50728,7 +50728,7 @@ function resolveLocalAvatarPath(params) {
50728
50728
  reason: "unsupported_extension"
50729
50729
  };
50730
50730
  try {
50731
- if (!fs.statSync(realPath).isFile()) return {
50731
+ if (!fsSync.statSync(realPath).isFile()) return {
50732
50732
  ok: false,
50733
50733
  reason: "missing"
50734
50734
  };
@@ -51591,7 +51591,7 @@ function sanitizeRecentModels(models, limit) {
51591
51591
  }
51592
51592
  async function readJsonFileWithFallback(filePath, fallback) {
51593
51593
  try {
51594
- const raw = await fs.promises.readFile(filePath, "utf-8");
51594
+ const raw = await fsSync.promises.readFile(filePath, "utf-8");
51595
51595
  return {
51596
51596
  value: JSON.parse(raw),
51597
51597
  exists: true
@@ -51609,14 +51609,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
51609
51609
  }
51610
51610
  async function writeJsonFileAtomically(filePath, value) {
51611
51611
  const dir = path.dirname(filePath);
51612
- await fs.promises.mkdir(dir, {
51612
+ await fsSync.promises.mkdir(dir, {
51613
51613
  recursive: true,
51614
51614
  mode: 448
51615
51615
  });
51616
51616
  const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
51617
- await fs.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
51618
- await fs.promises.chmod(tmp, 384);
51619
- await fs.promises.rename(tmp, filePath);
51617
+ await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
51618
+ await fsSync.promises.chmod(tmp, 384);
51619
+ await fsSync.promises.rename(tmp, filePath);
51620
51620
  }
51621
51621
  async function readPreferencesStore(filePath) {
51622
51622
  const { value } = await readJsonFileWithFallback(filePath, {
@@ -53708,27 +53708,27 @@ function isVoiceChannelType(type) {
53708
53708
  function createDefaultDeps() {
53709
53709
  return {
53710
53710
  sendMessageWhatsApp: async (...args) => {
53711
- const { sendMessageWhatsApp } = await import("./web-BIo1QcLd.js");
53711
+ const { sendMessageWhatsApp } = await import("./web-DpQ5RaFz.js");
53712
53712
  return await sendMessageWhatsApp(...args);
53713
53713
  },
53714
53714
  sendMessageTelegram: async (...args) => {
53715
- const { sendMessageTelegram } = await import("./send-DVt9RLDh.js").then((n) => n.l);
53715
+ const { sendMessageTelegram } = await import("./send-sgxdFZNy.js").then((n) => n.l);
53716
53716
  return await sendMessageTelegram(...args);
53717
53717
  },
53718
53718
  sendMessageDiscord: async (...args) => {
53719
- const { sendMessageDiscord } = await import("./send-Cq1L-2Ik.js").then((n) => n.t);
53719
+ const { sendMessageDiscord } = await import("./send-CCNIWI2Z.js").then((n) => n.t);
53720
53720
  return await sendMessageDiscord(...args);
53721
53721
  },
53722
53722
  sendMessageSlack: async (...args) => {
53723
- const { sendMessageSlack } = await import("./send-DX0p0ym_.js").then((n) => n.n);
53723
+ const { sendMessageSlack } = await import("./send-Dy8tsHUE.js").then((n) => n.n);
53724
53724
  return await sendMessageSlack(...args);
53725
53725
  },
53726
53726
  sendMessageSignal: async (...args) => {
53727
- const { sendMessageSignal } = await import("./send-C4Bqsa_r.js").then((n) => n.i);
53727
+ const { sendMessageSignal } = await import("./send-CPSKimCF.js").then((n) => n.i);
53728
53728
  return await sendMessageSignal(...args);
53729
53729
  },
53730
53730
  sendMessageIMessage: async (...args) => {
53731
- const { sendMessageIMessage } = await import("./send-vtz9ZwUj.js").then((n) => n.n);
53731
+ const { sendMessageIMessage } = await import("./send-iUSZIdml.js").then((n) => n.n);
53732
53732
  return await sendMessageIMessage(...args);
53733
53733
  }
53734
53734
  };
@@ -54637,10 +54637,10 @@ function estimateDurationSeconds(pcm) {
54637
54637
  return pcm.length / (bytesPerSample * SAMPLE_RATE);
54638
54638
  }
54639
54639
  async function writeWavFile(pcm) {
54640
- const tempDir = await fs$1.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
54640
+ const tempDir = await fs.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
54641
54641
  const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
54642
54642
  const wav = buildWavBuffer(pcm);
54643
- await fs$1.writeFile(filePath, wav);
54643
+ await fs.writeFile(filePath, wav);
54644
54644
  scheduleTempCleanup(tempDir);
54645
54645
  return {
54646
54646
  path: filePath,
@@ -54649,7 +54649,7 @@ async function writeWavFile(pcm) {
54649
54649
  }
54650
54650
  function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
54651
54651
  setTimeout(() => {
54652
- fs$1.rm(tempDir, {
54652
+ fs.rm(tempDir, {
54653
54653
  recursive: true,
54654
54654
  force: true
54655
54655
  }).catch((err) => {
@@ -56613,7 +56613,7 @@ function createDiscordGatewayPlugin(params) {
56613
56613
  super(options);
56614
56614
  }
56615
56615
  createWebSocket(url) {
56616
- return new WebSocket$1(url, { agent });
56616
+ return new WebSocket(url, { agent });
56617
56617
  }
56618
56618
  }
56619
56619
  return new ProxyGatewayPlugin();
@@ -57713,7 +57713,7 @@ async function detectBinary(name) {
57713
57713
  if (!isSafeExecutableValue(name)) return false;
57714
57714
  const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
57715
57715
  if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
57716
- await fs$1.access(resolved);
57716
+ await fs.access(resolved);
57717
57717
  return true;
57718
57718
  } catch {
57719
57719
  return false;
@@ -58263,7 +58263,7 @@ function normalizeAllowList$1(list) {
58263
58263
  async function detectRemoteHostFromCliPath(cliPath) {
58264
58264
  try {
58265
58265
  const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
58266
- const content = await fs$1.readFile(expanded, "utf8");
58266
+ const content = await fs.readFile(expanded, "utf8");
58267
58267
  const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
58268
58268
  if (userHostMatch) return userHostMatch[1];
58269
58269
  return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
@@ -58607,7 +58607,7 @@ async function monitorIMessageProvider(opts = {}) {
58607
58607
  function readFileIfExists(filePath) {
58608
58608
  if (!filePath) return;
58609
58609
  try {
58610
- return fs.readFileSync(filePath, "utf-8").trim();
58610
+ return fsSync.readFileSync(filePath, "utf-8").trim();
58611
58611
  } catch {
58612
58612
  return;
58613
58613
  }
@@ -59168,7 +59168,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
59168
59168
  prefix: "line-media",
59169
59169
  extension: getExtensionForContentType(contentType)
59170
59170
  });
59171
- await fs.promises.writeFile(filePath, buffer);
59171
+ await fsSync.promises.writeFile(filePath, buffer);
59172
59172
  logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
59173
59173
  return {
59174
59174
  path: filePath,
@@ -64155,7 +64155,7 @@ function readSlackExternalArgMenuToken(raw) {
64155
64155
  }
64156
64156
  let commandsRegistry;
64157
64157
  async function getCommandsRegistry() {
64158
- if (!commandsRegistry) commandsRegistry = await import("./commands-registry-BSvi46KZ.js").then((n) => n.n);
64158
+ if (!commandsRegistry) commandsRegistry = await import("./commands-registry-DPf4J7nj.js").then((n) => n.n);
64159
64159
  return commandsRegistry;
64160
64160
  }
64161
64161
  function encodeSlackCommandArgValue(parts) {
@@ -64497,11 +64497,11 @@ async function registerSlackMonitorSlashCommands(params) {
64497
64497
  const channelName = channelInfo?.name;
64498
64498
  const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
64499
64499
  const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
64500
- import("./resolve-route-DX7xcMsD.js").then((n) => n.r),
64500
+ import("./resolve-route-gl0ZOOKR.js").then((n) => n.r),
64501
64501
  import("./inbound-context-Dvqh1Tgb.js").then((n) => n.n),
64502
64502
  Promise.resolve().then(() => provider_dispatcher_exports)
64503
64503
  ]);
64504
- const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-CvEIl6_d.js").then((n) => n.n)]);
64504
+ const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-ZnX2V-k9.js").then((n) => n.n)]);
64505
64505
  const route = resolveAgentRoute({
64506
64506
  cfg,
64507
64507
  channel: "slack",
@@ -64558,9 +64558,9 @@ async function registerSlackMonitorSlashCommands(params) {
64558
64558
  });
64559
64559
  const deliverSlashPayloads = async (replies) => {
64560
64560
  const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
64561
- import("./replies-DA4YTv9G.js").then((n) => n.r),
64562
- import("./chunk-BHW8Yu5A.js").then((n) => n.s),
64563
- import("./markdown-tables-Dnj2LQUc.js").then((n) => n.t)
64561
+ import("./replies-CbeMv5WZ.js").then((n) => n.r),
64562
+ import("./chunk-B9x_1qSr.js").then((n) => n.s),
64563
+ import("./markdown-tables-DuRhvVpP.js").then((n) => n.t)
64564
64564
  ]);
64565
64565
  await deliverSlackSlashReplies({
64566
64566
  replies,
@@ -64613,7 +64613,7 @@ async function registerSlackMonitorSlashCommands(params) {
64613
64613
  let nativeCommands = [];
64614
64614
  if (nativeEnabled) {
64615
64615
  reg = await getCommandsRegistry();
64616
- const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-BiPrghRt.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
64616
+ const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-HBkNllDU.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
64617
64617
  nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
64618
64618
  skillCommands,
64619
64619
  provider: "slack"
@@ -66831,7 +66831,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
66831
66831
  const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
66832
66832
  let preflightTranscript;
66833
66833
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
66834
- const { transcribeFirstAudio } = await import("./audio-preflight-Cz1htqcz.js");
66834
+ const { transcribeFirstAudio } = await import("./audio-preflight-UXg8r6a7.js");
66835
66835
  preflightTranscript = await transcribeFirstAudio({
66836
66836
  ctx: {
66837
66837
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -68599,7 +68599,7 @@ function safeParseState(raw) {
68599
68599
  async function readTelegramUpdateOffset(params) {
68600
68600
  const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
68601
68601
  try {
68602
- return safeParseState(await fs$1.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
68602
+ return safeParseState(await fs.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
68603
68603
  } catch (err) {
68604
68604
  if (err.code === "ENOENT") return null;
68605
68605
  return null;
@@ -68608,7 +68608,7 @@ async function readTelegramUpdateOffset(params) {
68608
68608
  async function writeTelegramUpdateOffset(params) {
68609
68609
  const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
68610
68610
  const dir = path.dirname(filePath);
68611
- await fs$1.mkdir(dir, {
68611
+ await fs.mkdir(dir, {
68612
68612
  recursive: true,
68613
68613
  mode: 448
68614
68614
  });
@@ -68617,9 +68617,9 @@ async function writeTelegramUpdateOffset(params) {
68617
68617
  version: STORE_VERSION,
68618
68618
  lastUpdateId: params.updateId
68619
68619
  };
68620
- await fs$1.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
68621
- await fs$1.chmod(tmp, 384);
68622
- await fs$1.rename(tmp, filePath);
68620
+ await fs.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
68621
+ await fs.chmod(tmp, 384);
68622
+ await fs.rename(tmp, filePath);
68623
68623
  }
68624
68624
 
68625
68625
  //#endregion
@@ -68976,23 +68976,23 @@ let webLoginQrPromise = null;
68976
68976
  let webChannelPromise = null;
68977
68977
  let whatsappActionsPromise = null;
68978
68978
  function loadWebOutbound() {
68979
- webOutboundPromise ??= import("./outbound-UwQEXYXv.js").then((n) => n.t);
68979
+ webOutboundPromise ??= import("./outbound-B_wliV26.js").then((n) => n.t);
68980
68980
  return webOutboundPromise;
68981
68981
  }
68982
68982
  function loadWebLogin() {
68983
- webLoginPromise ??= import("./login-IpOTJtyn.js").then((n) => n.n);
68983
+ webLoginPromise ??= import("./login-2w0Q7Btb.js").then((n) => n.n);
68984
68984
  return webLoginPromise;
68985
68985
  }
68986
68986
  function loadWebLoginQr() {
68987
- webLoginQrPromise ??= import("./login-qr-DRepVMvu.js");
68987
+ webLoginQrPromise ??= import("./login-qr-BJMvic1s.js");
68988
68988
  return webLoginQrPromise;
68989
68989
  }
68990
68990
  function loadWebChannel() {
68991
- webChannelPromise ??= import("./web-BIo1QcLd.js");
68991
+ webChannelPromise ??= import("./web-DpQ5RaFz.js");
68992
68992
  return webChannelPromise;
68993
68993
  }
68994
68994
  function loadWhatsAppActions() {
68995
- whatsappActionsPromise ??= import("./whatsapp-actions-DZfLLQ0Y.js");
68995
+ whatsappActionsPromise ??= import("./whatsapp-actions-D_w4AfW9.js");
68996
68996
  return whatsappActionsPromise;
68997
68997
  }
68998
68998
  function createPluginRuntime() {
@@ -69213,7 +69213,7 @@ const resolvePluginSdkAliasFile = (params) => {
69213
69213
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
69214
69214
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
69215
69215
  const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
69216
- for (const candidate of orderedCandidates) if (fs.existsSync(candidate)) return candidate;
69216
+ for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
69217
69217
  const parent = path.dirname(cursor);
69218
69218
  if (parent === cursor) break;
69219
69219
  cursor = parent;
@@ -69759,7 +69759,7 @@ function resolvePluginTools(params) {
69759
69759
  //#endregion
69760
69760
  //#region src/agents/apply-patch-update.ts
69761
69761
  async function defaultReadFile(filePath) {
69762
- return fs$1.readFile(filePath, "utf8");
69762
+ return fs.readFile(filePath, "utf8");
69763
69763
  }
69764
69764
  async function applyUpdateHunk(filePath, chunks, options) {
69765
69765
  const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
@@ -70003,10 +70003,10 @@ function resolvePatchFileOps(options) {
70003
70003
  };
70004
70004
  }
70005
70005
  return {
70006
- readFile: (filePath) => fs$1.readFile(filePath, "utf8"),
70007
- writeFile: (filePath, content) => fs$1.writeFile(filePath, content, "utf8"),
70008
- remove: (filePath) => fs$1.rm(filePath),
70009
- mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
70006
+ readFile: (filePath) => fs.readFile(filePath, "utf8"),
70007
+ writeFile: (filePath, content) => fs.writeFile(filePath, content, "utf8"),
70008
+ remove: (filePath) => fs.rm(filePath),
70009
+ mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
70010
70010
  };
70011
70011
  }
70012
70012
  async function ensureDir(filePath, ops) {
@@ -71251,7 +71251,7 @@ async function repairSessionFileIfNeeded(params) {
71251
71251
  };
71252
71252
  let content;
71253
71253
  try {
71254
- content = await fs$1.readFile(sessionFile, "utf-8");
71254
+ content = await fs.readFile(sessionFile, "utf-8");
71255
71255
  } catch (err) {
71256
71256
  if (err?.code === "ENOENT") return {
71257
71257
  repaired: false,
@@ -71299,15 +71299,15 @@ async function repairSessionFileIfNeeded(params) {
71299
71299
  const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
71300
71300
  const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
71301
71301
  try {
71302
- const stat = await fs$1.stat(sessionFile).catch(() => null);
71303
- await fs$1.writeFile(backupPath, content, "utf-8");
71304
- if (stat) await fs$1.chmod(backupPath, stat.mode);
71305
- await fs$1.writeFile(tmpPath, cleaned, "utf-8");
71306
- if (stat) await fs$1.chmod(tmpPath, stat.mode);
71307
- await fs$1.rename(tmpPath, sessionFile);
71302
+ const stat = await fs.stat(sessionFile).catch(() => null);
71303
+ await fs.writeFile(backupPath, content, "utf-8");
71304
+ if (stat) await fs.chmod(backupPath, stat.mode);
71305
+ await fs.writeFile(tmpPath, cleaned, "utf-8");
71306
+ if (stat) await fs.chmod(tmpPath, stat.mode);
71307
+ await fs.rename(tmpPath, sessionFile);
71308
71308
  } catch (err) {
71309
71309
  try {
71310
- await fs$1.unlink(tmpPath);
71310
+ await fs.unlink(tmpPath);
71311
71311
  } catch (cleanupErr) {
71312
71312
  params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
71313
71313
  }
@@ -71991,8 +71991,8 @@ async function readWorkspaceContextForSummary() {
71991
71991
  const workspaceDir = process.cwd();
71992
71992
  const agentsPath = path.join(workspaceDir, "AGENTS.md");
71993
71993
  try {
71994
- if (!fs.existsSync(agentsPath)) return "";
71995
- const sections = extractSections(await fs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
71994
+ if (!fsSync.existsSync(agentsPath)) return "";
71995
+ const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
71996
71996
  if (sections.length === 0) return "";
71997
71997
  const combined = sections.join("\n\n");
71998
71998
  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>`;
@@ -72548,7 +72548,7 @@ async function prewarmSessionFile(sessionFile) {
72548
72548
  if (!isSessionManagerCacheEnabled()) return;
72549
72549
  if (isSessionManagerCached(sessionFile)) return;
72550
72550
  try {
72551
- const handle = await fs$1.open(sessionFile, "r");
72551
+ const handle = await fs.open(sessionFile, "r");
72552
72552
  try {
72553
72553
  const buffer = Buffer$1.alloc(4096);
72554
72554
  await handle.read(buffer, 0, buffer.length, 0);
@@ -72681,14 +72681,14 @@ async function compactEmbeddedPiSessionDirect(params) {
72681
72681
  if (!apiKeyInfo.apiKey) {
72682
72682
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
72683
72683
  } else if (model.provider === "github-copilot") {
72684
- const { resolveCopilotApiToken } = await import("./github-copilot-token-cCYzSU9h.js").then((n) => n.n);
72684
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
72685
72685
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
72686
72686
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
72687
72687
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
72688
72688
  } catch (err) {
72689
72689
  return fail(describeUnknownError(err));
72690
72690
  }
72691
- await fs$1.mkdir(resolvedWorkspace, { recursive: true });
72691
+ await fs.mkdir(resolvedWorkspace, { recursive: true });
72692
72692
  const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
72693
72693
  const sandbox = await resolveSandboxContext({
72694
72694
  config: params.config,
@@ -72696,7 +72696,7 @@ async function compactEmbeddedPiSessionDirect(params) {
72696
72696
  workspaceDir: resolvedWorkspace
72697
72697
  });
72698
72698
  const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
72699
- await fs$1.mkdir(effectiveWorkspace, { recursive: true });
72699
+ await fs.mkdir(effectiveWorkspace, { recursive: true });
72700
72700
  await ensureSessionHeader({
72701
72701
  sessionFile: params.sessionFile,
72702
72702
  sessionId: params.sessionId,
@@ -73050,12 +73050,12 @@ function getQueuedFileWriter(writers, filePath) {
73050
73050
  const existing = writers.get(filePath);
73051
73051
  if (existing) return existing;
73052
73052
  const dir = path.dirname(filePath);
73053
- const ready = fs$1.mkdir(dir, { recursive: true }).catch(() => void 0);
73053
+ const ready = fs.mkdir(dir, { recursive: true }).catch(() => void 0);
73054
73054
  let queue = Promise.resolve();
73055
73055
  const writer = {
73056
73056
  filePath,
73057
73057
  write: (line) => {
73058
- queue = queue.then(() => ready).then(() => fs$1.appendFile(filePath, line, "utf8")).catch(() => void 0);
73058
+ queue = queue.then(() => ready).then(() => fs.appendFile(filePath, line, "utf8")).catch(() => void 0);
73059
73059
  }
73060
73060
  };
73061
73061
  writers.set(filePath, writer);
@@ -74080,11 +74080,11 @@ function appendRawStream(payload) {
74080
74080
  if (!rawStreamReady) {
74081
74081
  rawStreamReady = true;
74082
74082
  try {
74083
- fs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
74083
+ fsSync.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
74084
74084
  } catch {}
74085
74085
  }
74086
74086
  try {
74087
- fs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
74087
+ fsSync.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
74088
74088
  } catch {}
74089
74089
  }
74090
74090
 
@@ -75914,7 +75914,7 @@ function isInPoisonRange(version) {
75914
75914
  */
75915
75915
  async function checkSessionPoison(sessionFile) {
75916
75916
  try {
75917
- const firstLine = (await fs$1.readFile(sessionFile, "utf-8")).split("\n")[0];
75917
+ const firstLine = (await fs.readFile(sessionFile, "utf-8")).split("\n")[0];
75918
75918
  if (!firstLine) return null;
75919
75919
  const header = JSON.parse(firstLine);
75920
75920
  if (header.type !== "session") return null;
@@ -75932,7 +75932,7 @@ async function checkSessionPoison(sessionFile) {
75932
75932
  */
75933
75933
  async function archivePoisonedSession(sessionFile) {
75934
75934
  const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
75935
- await fs$1.rename(sessionFile, archiveName);
75935
+ await fs.rename(sessionFile, archiveName);
75936
75936
  return archiveName;
75937
75937
  }
75938
75938
  /**
@@ -75941,14 +75941,14 @@ async function archivePoisonedSession(sessionFile) {
75941
75941
  */
75942
75942
  async function stampSessionVersion(sessionFile) {
75943
75943
  try {
75944
- const lines = (await fs$1.readFile(sessionFile, "utf-8")).split("\n");
75944
+ const lines = (await fs.readFile(sessionFile, "utf-8")).split("\n");
75945
75945
  if (lines.length === 0) return;
75946
75946
  const header = JSON.parse(lines[0]);
75947
75947
  if (header.type !== "session") return;
75948
75948
  if (header.symiVersion === VERSION) return;
75949
75949
  header.symiVersion = VERSION;
75950
75950
  lines[0] = JSON.stringify(header);
75951
- await fs$1.writeFile(sessionFile, lines.join("\n"), "utf-8");
75951
+ await fs.writeFile(sessionFile, lines.join("\n"), "utf-8");
75952
75952
  } catch {}
75953
75953
  }
75954
75954
  /**
@@ -76111,7 +76111,7 @@ async function prepareSessionManagerForRun(params) {
76111
76111
  return;
76112
76112
  }
76113
76113
  if (params.hadSessionFile && header && !hasAssistant) {
76114
- await fs$1.writeFile(params.sessionFile, "", "utf-8");
76114
+ await fs.writeFile(params.sessionFile, "", "utf-8");
76115
76115
  sm.fileEntries = [header];
76116
76116
  sm.byId?.clear?.();
76117
76117
  sm.labelsById?.clear?.();
@@ -76669,7 +76669,7 @@ async function runEmbeddedAttempt(params) {
76669
76669
  const prevCwd = process.cwd();
76670
76670
  const runAbortController = new AbortController();
76671
76671
  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"}`);
76672
- await fs$1.mkdir(resolvedWorkspace, { recursive: true });
76672
+ await fs.mkdir(resolvedWorkspace, { recursive: true });
76673
76673
  const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
76674
76674
  const sandbox = await resolveSandboxContext({
76675
76675
  config: params.config,
@@ -76677,7 +76677,7 @@ async function runEmbeddedAttempt(params) {
76677
76677
  workspaceDir: resolvedWorkspace
76678
76678
  });
76679
76679
  const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
76680
- await fs$1.mkdir(effectiveWorkspace, { recursive: true });
76680
+ await fs.mkdir(effectiveWorkspace, { recursive: true });
76681
76681
  let restoreSkillEnv;
76682
76682
  process.chdir(effectiveWorkspace);
76683
76683
  try {
@@ -76907,7 +76907,7 @@ async function runEmbeddedAttempt(params) {
76907
76907
  sessionFile: params.sessionFile,
76908
76908
  warn: (message) => log$9.warn(message)
76909
76909
  });
76910
- const hadSessionFile = await fs$1.stat(params.sessionFile).then(() => true).catch(() => false);
76910
+ const hadSessionFile = await fs.stat(params.sessionFile).then(() => true).catch(() => false);
76911
76911
  const transcriptPolicy = resolveTranscriptPolicy({
76912
76912
  modelApi: params.model?.api,
76913
76913
  provider: params.provider,
@@ -77892,7 +77892,7 @@ async function runEmbeddedPiAgent(params) {
77892
77892
  return;
77893
77893
  }
77894
77894
  if (model.provider === "github-copilot") {
77895
- const { resolveCopilotApiToken } = await import("./github-copilot-token-cCYzSU9h.js").then((n) => n.n);
77895
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
77896
77896
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
77897
77897
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
77898
77898
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
@@ -77977,7 +77977,7 @@ async function runEmbeddedPiAgent(params) {
77977
77977
  }
77978
77978
  runLoopIterations += 1;
77979
77979
  attemptedThinking.add(thinkLevel);
77980
- await fs$1.mkdir(resolvedWorkspace, { recursive: true });
77980
+ await fs.mkdir(resolvedWorkspace, { recursive: true });
77981
77981
  const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
77982
77982
  const attempt = await runEmbeddedAttempt({
77983
77983
  sessionId: params.sessionId,