@noxsoft/anima 5.1.1 → 5.1.2

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 (128) hide show
  1. package/dist/{accounts-Dyb3ijJm.js → accounts-DZsqyow2.js} +38 -38
  2. package/dist/{active-listener-B7OcwSxK.js → active-listener-GJR3nLhX.js} +5 -5
  3. package/dist/{agent-B8ciDTm6.js → agent-CaaEZsXl.js} +2 -2
  4. package/dist/{agent-DImD77Te.js → agent-DUAarfNl.js} +2 -2
  5. package/dist/{agent-scope-BHR6uOLT.js → agent-scope-BZ8hjIt_.js} +3 -3
  6. package/dist/{agents-DvkZi7oF.js → agents-t54YcbvK.js} +3 -3
  7. package/dist/{auth-choice-i9Z_cli_.js → auth-choice-DPWnLV_w.js} +1 -1
  8. package/dist/{auth-profiles-Da39zGOD.js → auth-profiles-eZzmaeR3.js} +13 -13
  9. package/dist/{auth-store-Bl6rpC4E.js → auth-store-CnRrUELz.js} +13 -13
  10. package/dist/{banner-CjrhpA68.js → banner-D9JyV5SF.js} +1 -1
  11. package/dist/build-info.json +2 -2
  12. package/dist/bundled/boot-md/handler.js +25 -25
  13. package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
  14. package/dist/bundled/command-logger/handler.js +1 -1
  15. package/dist/bundled/session-memory/handler.js +24 -24
  16. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  17. package/dist/{channel-web-9ikdY9RK.js → channel-web-CQIbtfme.js} +2 -2
  18. package/dist/{chrome-CkSIMI7j.js → chrome-Cfak4A3i.js} +12 -12
  19. package/dist/{chunk-5llVa3wc.js → chunk-CyT-_QsQ.js} +3 -3
  20. package/dist/{clack-prompter-DlmPIB0y.js → clack-prompter-rXuqdPbx.js} +1 -1
  21. package/dist/{cli-PD3ygS3H.js → cli--Gal7v4I.js} +1 -1
  22. package/dist/{cli-d0H0Bpz9.js → cli-kT9Mb3dT.js} +1 -1
  23. package/dist/{command-registry-Dv064HDc.js → command-registry-vEVxxxzI.js} +10 -10
  24. package/dist/{common-CKoFTq83.js → common-BzPvZcxT.js} +2 -2
  25. package/dist/{completion-cli-Blp8bILB.js → completion-cli-BBKG6buM.js} +1 -1
  26. package/dist/{completion-cli-C-fu_7Kd.js → completion-cli-C84I5l8a.js} +2 -2
  27. package/dist/{config-BfhpauV9.js → config-6FVC8hW0.js} +27 -27
  28. package/dist/{config-cli-BFQDt_5i.js → config-cli-CQzq5yWB.js} +1 -1
  29. package/dist/{config-cli-CgG6CaWK.js → config-cli-cyvL43DG.js} +1 -1
  30. package/dist/{configure-fHta2Meh.js → configure-B-dfdPKX.js} +4 -4
  31. package/dist/{configure-DLPHJ8nv.js → configure-Bv6mqD0j.js} +7 -7
  32. package/dist/{configure-Bbx4y0lr.js → configure-DxQqSUJs.js} +6 -6
  33. package/dist/{configure-CJYocuSp.js → configure-G6h2Ppk0.js} +3 -3
  34. package/dist/{deliver-CoQP7nSu.js → deliver-D2hQZ9X0.js} +52 -52
  35. package/dist/{deps-CMFpRoYp.js → deps-CeyVMZf1.js} +1 -1
  36. package/dist/{doctor-2O2knHXJ.js → doctor-DumyG85t.js} +4 -4
  37. package/dist/{doctor-completion-jbYrRr0H.js → doctor-completion-C8JSWfqN.js} +1 -1
  38. package/dist/{doctor-completion-CaC89XwQ.js → doctor-completion-lAyxyd7X.js} +1 -1
  39. package/dist/{doctor-qayl5A-F.js → doctor-vXt5qjNJ.js} +4 -4
  40. package/dist/entry.js +1 -1
  41. package/dist/{exec-CEFTijVj.js → exec-Bfd4ztFZ.js} +7 -7
  42. package/dist/extensionAPI.js +1 -1
  43. package/dist/{frontmatter-Dsa7N963.js → frontmatter-BP4GSt5L.js} +2 -2
  44. package/dist/{gateway-cli-CDg1qmsU.js → gateway-cli-B60L2z4a.js} +13 -13
  45. package/dist/{gateway-cli-DAPK-NMP.js → gateway-cli-CHhTweWb.js} +13 -13
  46. package/dist/{health-BNasz7nv.js → health-BttJ1Qeh.js} +1 -1
  47. package/dist/{health-2sA2ziYt.js → health-D8fJ6U_k.js} +1 -1
  48. package/dist/{hooks-cli-Cwe9oz1p.js → hooks-cli-BMZF6RF3.js} +2 -2
  49. package/dist/{hooks-cli-D8SvsiGN.js → hooks-cli-DRUryj5H.js} +2 -2
  50. package/dist/index.js +7 -7
  51. package/dist/llm-slug-generator.js +24 -24
  52. package/dist/{login-7Yj2TvMd.js → login-C4mptULi.js} +5 -5
  53. package/dist/{login-qr-CuwWMetN.js → login-qr-BxNKHxcf.js} +10 -10
  54. package/dist/{manager-kdmVqWxk.js → manager-A3pC-CW-.js} +15 -15
  55. package/dist/{model-selection-BuMFehML.js → model-selection-BI8CKPwQ.js} +1 -1
  56. package/dist/{models-2GYW4-6h.js → models-ByeH7ZKb.js} +1 -1
  57. package/dist/{onboard-channels-Cqeff8-v.js → onboard-channels-D6Gt3CsX.js} +1 -1
  58. package/dist/{onboard-channels-CWMuM-3k.js → onboard-channels-RsbA6EaD.js} +1 -1
  59. package/dist/{onboard-DbzYS52G.js → onboard-i4CJtSb9.js} +3 -3
  60. package/dist/{onboard-DJ4ON8sf.js → onboard-xSPFmM29.js} +4 -4
  61. package/dist/{onboarding-SrNptVqc.js → onboarding-CZBVMwFn.js} +4 -4
  62. package/dist/{onboarding-GIx1Wpw0.js → onboarding-Cao0a_Z1.js} +4 -4
  63. package/dist/{outbound-CovlPIFx.js → outbound-DWfSyfZC.js} +4 -4
  64. package/dist/{paths-CLxC7m0Z.js → paths-Cwszsz1I.js} +2 -2
  65. package/dist/{paths-B-AkG5FD.js → paths-D2eokayo.js} +3 -3
  66. package/dist/{pi-auth-json-BLCyhR5p.js → pi-auth-json-smxh_Xud.js} +7 -7
  67. package/dist/{pi-embedded-BL-Js-lp.js → pi-embedded-D4eEfxIU.js} +31 -23
  68. package/dist/{pi-embedded-fZ1QlJ9C.js → pi-embedded-DifnZvKk.js} +126 -118
  69. package/dist/{plugin-registry-X7L3BrUu.js → plugin-registry-CkZnT8Fb.js} +1 -1
  70. package/dist/{plugin-registry-DboWDOrG.js → plugin-registry-CpXm8ADp.js} +1 -1
  71. package/dist/plugin-sdk/agents/cli-backends.d.ts +4 -1
  72. package/dist/{plugins-cli-C-PA_T5k.js → plugins-cli-CrrkMAYM.js} +2 -2
  73. package/dist/{plugins-cli-BraLLKDO.js → plugins-cli-D4VxQKaJ.js} +2 -2
  74. package/dist/{program-BriwVW7P.js → program-CTDFmZNx.js} +6 -6
  75. package/dist/{program-context-oXX-h-yI.js → program-context-Hl6bnPfB.js} +15 -15
  76. package/dist/{prompts-C9IyM74_.js → prompts-CneQ6SeF.js} +1 -1
  77. package/dist/{pw-ai-BJfL9dGV.js → pw-ai-CY-VcqJp.js} +4 -4
  78. package/dist/{qmd-manager-DHQgWjsV.js → qmd-manager-CwbYv6nJ.js} +7 -7
  79. package/dist/{register.agent-BMKeVZeq.js → register.agent-BKINbWbs.js} +6 -6
  80. package/dist/{register.agent-BO5BCkbO.js → register.agent-CMoYTJqj.js} +5 -5
  81. package/dist/{register.anima-BS8nsOpD.js → register.anima-BHrZ90Sv.js} +1 -1
  82. package/dist/{register.anima-DPurDgXW.js → register.anima-CnEy5VFQ.js} +1 -1
  83. package/dist/{register.configure-Dvg0Vi23.js → register.configure-3GfqcGLK.js} +6 -6
  84. package/dist/{register.configure-Di8agIXW.js → register.configure-Cv5NkGH2.js} +5 -5
  85. package/dist/{register.maintenance-DjXwK16H.js → register.maintenance-DtAw8E_a.js} +8 -8
  86. package/dist/{register.maintenance-CKE15LXK.js → register.maintenance-YZDsMymb.js} +7 -7
  87. package/dist/{register.onboard-Du-u1lcX.js → register.onboard-Dswys-iV.js} +9 -9
  88. package/dist/{register.onboard-BkUxrYi2.js → register.onboard-U3lIfaw_.js} +9 -9
  89. package/dist/{register.setup-DyqOWQ2D.js → register.setup-CLkGhR-e.js} +9 -9
  90. package/dist/{register.setup-DEtz71o0.js → register.setup-Dyp5L_GQ.js} +9 -9
  91. package/dist/{register.status-health-sessions-CXMn5NfF.js → register.status-health-sessions-Cc2Y5gSj.js} +3 -3
  92. package/dist/{register.status-health-sessions-DjsEuYmp.js → register.status-health-sessions-Dx-qZMol.js} +3 -3
  93. package/dist/{register.subclis-CMlPDwE5.js → register.subclis-L55mGheS.js} +6 -6
  94. package/dist/{reply-DWdVFSBB.js → reply-BgPvB-gR.js} +31 -23
  95. package/dist/{reply-prefix-CRGxza-M.js → reply-prefix-37W_P4kH.js} +1 -1
  96. package/dist/{reply-prefix-_gr2uQ1Z.js → reply-prefix-DBRqtDEq.js} +1 -1
  97. package/dist/{run-CXLRGLdR.js → run-BFPM6M2S.js} +8 -8
  98. package/dist/{run-GZnwhuUG.js → run-DEHnKm2x.js} +10 -10
  99. package/dist/{run-main-Coy6Vx7R.js → run-main-Cxmjk1SF.js} +14 -14
  100. package/dist/{semantic-BZw2SVoG.js → semantic-CG6X3rBo.js} +1 -1
  101. package/dist/{server-node-events-BMO931Md.js → server-node-events-CmZXzWcd.js} +2 -2
  102. package/dist/{server-node-events-yZM_OBSZ.js → server-node-events-DBOg36in.js} +3 -3
  103. package/dist/{session-CB9OL4Ml.js → session-3MLbl1-K.js} +1 -1
  104. package/dist/{settings-cli-_DoMmFH9.js → settings-cli-CCtkuc1r.js} +7 -7
  105. package/dist/{settings-cli-BVBFgDUd.js → settings-cli-Ccizggz2.js} +6 -6
  106. package/dist/{shell-env-DaSbgZYX.js → shell-env-B4ae4lFh.js} +1 -1
  107. package/dist/{soul-B7vtVbSs.js → soul-Bt57OdSx.js} +1 -1
  108. package/dist/{sqlite-D_h-b5t2.js → sqlite-ClLAW1iQ.js} +4 -4
  109. package/dist/{start-C0Uw_pIA.js → start-BPye9w5U.js} +13 -13
  110. package/dist/{start-C6a18wc7.js → start-DfC7PlAH.js} +13 -13
  111. package/dist/{status-CUyIggna.js → status-BU6h4wUP.js} +1 -1
  112. package/dist/{status-DyD7gtoK.js → status-BVAoIQ0V.js} +2 -2
  113. package/dist/{status-DmsznVj5.js → status-BaEcHPtc.js} +1 -1
  114. package/dist/{status-CWgHkLTE.js → status-C9B6cEM0.js} +2 -2
  115. package/dist/{subagent-registry-BVrDlKmm.js → subagent-registry-MZIxVf8W.js} +31 -23
  116. package/dist/{subsystem-BP2l3SHn.js → subsystem-DA3Cno1i.js} +20 -20
  117. package/dist/{tool-images-CUx-9B7B.js → tool-images-DK97edts.js} +2 -2
  118. package/dist/{update-cli-4VAEZsrR.js → update-cli-D1e-DsWy.js} +8 -8
  119. package/dist/{update-cli-JPLB8AtM.js → update-cli-QMVW2eiR.js} +7 -7
  120. package/dist/{update-runner-BxdLd4Q8.js → update-runner-DPmSGXS3.js} +1 -1
  121. package/dist/{update-runner-pmlbxeZ-.js → update-runner-iLJQF6VA.js} +1 -1
  122. package/dist/{web-B3O004_b.js → web-DBQRQY6n.js} +27 -27
  123. package/dist/{web-D8EsFSet.js → web-DDAkSrtZ.js} +2 -2
  124. package/dist/{web-B9-C6C1i.js → web-DE-hmqXy.js} +3 -3
  125. package/dist/{web-cpPr1Em8.js → web-DJRRkHG8.js} +1 -1
  126. package/dist/{whatsapp-actions-9PCfw-Zh.js → whatsapp-actions-CMEP8v3k.js} +13 -13
  127. package/dist/{workspace-Cvio8QlZ.js → workspace-BQkffCaR.js} +5 -5
  128. package/package.json +1 -1
@@ -1,35 +1,35 @@
1
1
  import { n as __exportAll } from "./chunk-BXK9XSlF.js";
2
- import { a as resolveOAuthDir, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-B-AkG5FD.js";
3
- import { A as isAcpSessionKey, C as normalizeAccountId$1, D as resolveThreadSessionKeys, E as resolveAgentIdFromSessionKey, M as parseAgentSessionKey, N as resolveThreadParentSessionKey, O as sanitizeAgentId, S as classifySessionKeyShape, T as normalizeMainKey, _ as DEFAULT_AGENT_ID, b as buildAgentPeerSessionKey, f as loadWorkspaceBootstrapFiles, g as DEFAULT_ACCOUNT_ID, j as isSubagentSessionKey, k as getSubagentDepth, l as ensureAgentWorkspace, m as resolveAnimaPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, u as filterBootstrapFilesForSession, v as DEFAULT_MAIN_KEY, w as normalizeAgentId, y as buildAgentMainSessionKey } from "./workspace-Cvio8QlZ.js";
4
- import { A as normalizeLogLevel, D as getChildLogger, E as theme, T as isRich, a as unregisterActiveProgressLine, b as setVerbose, d as normalizeChannelId, h as setActivePluginRegistry, i as registerActiveProgressLine, n as defaultRuntime, p as getActivePluginRegistry, r as clearActiveProgressLine, s as CHAT_CHANNEL_ORDER, t as createSubsystemLogger, u as normalizeAnyChannelId, v as logVerbose, w as colorize, x as shouldLogVerbose } from "./subsystem-BP2l3SHn.js";
5
- import { D as shortenHomePath, E as shortenHomeInString, O as sleep, T as safeParseJson, _ as isRecord, a as logDebug, c as logWarn, d as clampInt, g as isPlainObject, h as formatTerminalLink, i as spawnWithFallback, j as truncateUtf16Safe, k as sliceUtf16Safe, l as CONFIG_DIR, m as escapeRegExp, n as runExec, o as logError, p as ensureDir$3, r as formatSpawnError, s as logInfo, t as runCommandWithTimeout, w as resolveUserPath } from "./exec-CEFTijVj.js";
6
- import { c as resolveDefaultAgentId, i as resolveAgentModelFallbacksOverride, l as resolveSessionAgentId, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentIds } from "./agent-scope-BHR6uOLT.js";
7
- import { A as supportsXHighThinking, At as assertSandboxPath, B as extractDeliveryInfo, Bt as normalizeToolName, C as listThinkingLevels, Ct as DEFAULT_UPLOAD_DIR, D as normalizeUsageDisplay, Dt as buildWorkspaceSkillSnapshot, E as normalizeThinkLevel, Et as buildWorkspaceSkillCommandSpecs, F as isLikelyContextOverflowError, Ft as applyOwnerOnlyToolPolicy, G as updateLastRoute, Gt as buildBootstrapContextFiles, H as loadSessionStore, Ht as stripPluginOnlyAllowlist, I as isTransientHttpError, It as buildPluginToolGroups, J as deliveryContextFromSession, Jt as HEARTBEAT_TOKEN, K as updateSessionStore, Kt as resolveBootstrapMaxChars, L as sanitizeUserFacingText, Lt as collectExplicitAllowlist, M as isCompactionFailureError, Mt as ensureBrowserControlAuth, N as isContextOverflowError, Nt as resolveBrowserControlAuth, O as normalizeVerboseLevel, Ot as resolvePluginSkillDirs, P as isFailoverErrorMessage, Pt as resolveSandboxConfigForAgent, Q as normalizeSessionDeliveryFields, R as ensureSandboxWorkspaceForSession, Rt as expandPolicyWithPluginGroups, S as formatXHighModelHint, St as saveMediaBuffer, T as normalizeReasoningLevel, Tt as getBridgeAuthForPort, U as readSessionUpdatedAt, Ut as compileGlobPatterns, V as appendAssistantMessageToSessionTranscript, Vt as resolveToolProfilePolicy, W as recordSessionMetaFromInbound, Wt as matchesAnyGlobPattern, X as mergeDeliveryContext, Xt as isSilentReplyText, Y as deliveryContextKey, Yt as SILENT_REPLY_TOKEN, Z as normalizeDeliveryContext, _ as throwIfAborted, _t as createBrowserRouteContext, at as resolveThreadFlag, b as initializeGlobalHookRunner, bt as resolveProfile, c as applyReplyThreading, ct as canonicalizeMainSessionAlias, d as shouldSuppressMessagingToolReplies, dt as deriveSessionMetaPatch, et as resolveSessionKey$1, f as createReplyToModeFilterForChannel, ft as getChannelDock, g as normalizeTargetForProvider, gt as resolveGroupSessionKey, h as normalizeChannelTargetInput, ht as normalizeChatType, it as resolveSessionResetType, j as classifyFailoverReason, jt as resolveSandboxedMediaSource, k as resolveResponseUsageMode, kt as assertMediaNotDataUrl, l as filterMessagingToolDuplicates, m as buildTargetResolverSignature, mt as resolveConversationLabel, nt as resolveChannelResetConfig, o as normalizeReplyPayloadsForDelivery, ot as DEFAULT_RESET_TRIGGERS, p as resolveReplyToMode, pt as listChannelDocks, q as updateSessionStoreEntry, qt as resolveBootstrapTotalMaxChars, rt as resolveSessionResetPolicy, s as applyReplyTagsToPayload, st as resolveFreshSessionTotalTokens, t as deliverOutboundPayloads, tt as evaluateSessionFreshness, u as isRenderablePayload, ut as resolveMainSessionKey, v as parseReplyDirectives, vt as registerBrowserRoutes, w as normalizeElevatedLevel, wt as resolvePathsWithinRoot, x as formatThinkingLevels, xt as getMediaDir, y as getGlobalHookRunner, yt as resolveBrowserConfig, z as resolveSandboxRuntimeStatus, zt as expandToolGroups } from "./deliver-CoQP7nSu.js";
2
+ import { a as resolveOAuthDir, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-D2eokayo.js";
3
+ import { A as isAcpSessionKey, C as normalizeAccountId$1, D as resolveThreadSessionKeys, E as resolveAgentIdFromSessionKey, M as parseAgentSessionKey, N as resolveThreadParentSessionKey, O as sanitizeAgentId, S as classifySessionKeyShape, T as normalizeMainKey, _ as DEFAULT_AGENT_ID, b as buildAgentPeerSessionKey, f as loadWorkspaceBootstrapFiles, g as DEFAULT_ACCOUNT_ID, j as isSubagentSessionKey, k as getSubagentDepth, l as ensureAgentWorkspace, m as resolveAnimaPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, u as filterBootstrapFilesForSession, v as DEFAULT_MAIN_KEY, w as normalizeAgentId, y as buildAgentMainSessionKey } from "./workspace-BQkffCaR.js";
4
+ import { A as normalizeLogLevel, D as getChildLogger, E as theme, T as isRich, a as unregisterActiveProgressLine, b as setVerbose, d as normalizeChannelId, h as setActivePluginRegistry, i as registerActiveProgressLine, n as defaultRuntime, p as getActivePluginRegistry, r as clearActiveProgressLine, s as CHAT_CHANNEL_ORDER, t as createSubsystemLogger, u as normalizeAnyChannelId, v as logVerbose, w as colorize, x as shouldLogVerbose } from "./subsystem-DA3Cno1i.js";
5
+ import { D as shortenHomePath, E as shortenHomeInString, O as sleep, T as safeParseJson, _ as isRecord, a as logDebug, c as logWarn, d as clampInt, g as isPlainObject, h as formatTerminalLink, i as spawnWithFallback, j as truncateUtf16Safe, k as sliceUtf16Safe, l as CONFIG_DIR, m as escapeRegExp, n as runExec, o as logError, p as ensureDir$3, r as formatSpawnError, s as logInfo, t as runCommandWithTimeout, w as resolveUserPath } from "./exec-Bfd4ztFZ.js";
6
+ import { c as resolveDefaultAgentId, i as resolveAgentModelFallbacksOverride, l as resolveSessionAgentId, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentIds } from "./agent-scope-BZ8hjIt_.js";
7
+ import { A as supportsXHighThinking, At as assertSandboxPath, B as extractDeliveryInfo, Bt as normalizeToolName, C as listThinkingLevels, Ct as DEFAULT_UPLOAD_DIR, D as normalizeUsageDisplay, Dt as buildWorkspaceSkillSnapshot, E as normalizeThinkLevel, Et as buildWorkspaceSkillCommandSpecs, F as isLikelyContextOverflowError, Ft as applyOwnerOnlyToolPolicy, G as updateLastRoute, Gt as buildBootstrapContextFiles, H as loadSessionStore, Ht as stripPluginOnlyAllowlist, I as isTransientHttpError, It as buildPluginToolGroups, J as deliveryContextFromSession, Jt as HEARTBEAT_TOKEN, K as updateSessionStore, Kt as resolveBootstrapMaxChars, L as sanitizeUserFacingText, Lt as collectExplicitAllowlist, M as isCompactionFailureError, Mt as ensureBrowserControlAuth, N as isContextOverflowError, Nt as resolveBrowserControlAuth, O as normalizeVerboseLevel, Ot as resolvePluginSkillDirs, P as isFailoverErrorMessage, Pt as resolveSandboxConfigForAgent, Q as normalizeSessionDeliveryFields, R as ensureSandboxWorkspaceForSession, Rt as expandPolicyWithPluginGroups, S as formatXHighModelHint, St as saveMediaBuffer, T as normalizeReasoningLevel, Tt as getBridgeAuthForPort, U as readSessionUpdatedAt, Ut as compileGlobPatterns, V as appendAssistantMessageToSessionTranscript, Vt as resolveToolProfilePolicy, W as recordSessionMetaFromInbound, Wt as matchesAnyGlobPattern, X as mergeDeliveryContext, Xt as isSilentReplyText, Y as deliveryContextKey, Yt as SILENT_REPLY_TOKEN, Z as normalizeDeliveryContext, _ as throwIfAborted, _t as createBrowserRouteContext, at as resolveThreadFlag, b as initializeGlobalHookRunner, bt as resolveProfile, c as applyReplyThreading, ct as canonicalizeMainSessionAlias, d as shouldSuppressMessagingToolReplies, dt as deriveSessionMetaPatch, et as resolveSessionKey$1, f as createReplyToModeFilterForChannel, ft as getChannelDock, g as normalizeTargetForProvider, gt as resolveGroupSessionKey, h as normalizeChannelTargetInput, ht as normalizeChatType, it as resolveSessionResetType, j as classifyFailoverReason, jt as resolveSandboxedMediaSource, k as resolveResponseUsageMode, kt as assertMediaNotDataUrl, l as filterMessagingToolDuplicates, m as buildTargetResolverSignature, mt as resolveConversationLabel, nt as resolveChannelResetConfig, o as normalizeReplyPayloadsForDelivery, ot as DEFAULT_RESET_TRIGGERS, p as resolveReplyToMode, pt as listChannelDocks, q as updateSessionStoreEntry, qt as resolveBootstrapTotalMaxChars, rt as resolveSessionResetPolicy, s as applyReplyTagsToPayload, st as resolveFreshSessionTotalTokens, t as deliverOutboundPayloads, tt as evaluateSessionFreshness, u as isRenderablePayload, ut as resolveMainSessionKey, v as parseReplyDirectives, vt as registerBrowserRoutes, w as normalizeElevatedLevel, wt as resolvePathsWithinRoot, x as formatThinkingLevels, xt as getMediaDir, y as getGlobalHookRunner, yt as resolveBrowserConfig, z as resolveSandboxRuntimeStatus, zt as expandToolGroups } from "./deliver-D2hQZ9X0.js";
8
8
  import { i as triggerInternalHook, r as registerInternalHook, t as createInternalHookEvent } from "./internal-hooks-CWw3Hgeu.js";
9
- import { C as unsetConfigValueAtPath, S as setConfigValueAtPath, _ as resetConfigOverrides, a as writeConfigFile, b as getConfigValueAtPath, c as parseDurationMs, d as discoverAnimaPlugins, f as applyTestPluginDefaults, g as getConfigOverrides, h as resolveMemorySlotDecision, i as resolveConfigSnapshotHash, l as validateJsonSchemaValue, m as resolveEnableState, n as loadConfig, o as validateConfigObjectWithPlugins, p as normalizePluginsConfig, r as readConfigFileSnapshot, u as loadPluginManifestRegistry, v as setConfigOverride, w as VERSION, x as parseConfigPath, y as unsetConfigOverride } from "./config-BfhpauV9.js";
10
- import { i as resolveShellEnvFallbackTimeoutMs, n as getShellPathFromLoginShell, s as isTruthyEnvValue } from "./shell-env-DaSbgZYX.js";
11
- import { a as modelKey, d as resolveModelRefFromString, f as resolveThinkingDefault, h as DEFAULT_PROVIDER, i as isCliProvider, l as resolveConfiguredModelRef, m as DEFAULT_MODEL, n as buildConfiguredAllowlistKeys, o as normalizeModelRef, p as DEFAULT_CONTEXT_TOKENS, r as buildModelAliasIndex, s as normalizeProviderId, t as buildAllowedModelSet, u as resolveDefaultModelForAgent } from "./model-selection-BuMFehML.js";
12
- import { S as pickPrimaryTailnetIPv4, T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, _ as ensureChromeExtensionRelayServer, x as pickPrimaryLanIPv4, y as rawDataToString } from "./chrome-CkSIMI7j.js";
9
+ import { C as unsetConfigValueAtPath, S as setConfigValueAtPath, _ as resetConfigOverrides, a as writeConfigFile, b as getConfigValueAtPath, c as parseDurationMs, d as discoverAnimaPlugins, f as applyTestPluginDefaults, g as getConfigOverrides, h as resolveMemorySlotDecision, i as resolveConfigSnapshotHash, l as validateJsonSchemaValue, m as resolveEnableState, n as loadConfig, o as validateConfigObjectWithPlugins, p as normalizePluginsConfig, r as readConfigFileSnapshot, u as loadPluginManifestRegistry, v as setConfigOverride, w as VERSION, x as parseConfigPath, y as unsetConfigOverride } from "./config-6FVC8hW0.js";
10
+ import { i as resolveShellEnvFallbackTimeoutMs, n as getShellPathFromLoginShell, s as isTruthyEnvValue } from "./shell-env-B4ae4lFh.js";
11
+ import { a as modelKey, d as resolveModelRefFromString, f as resolveThinkingDefault, h as DEFAULT_PROVIDER, i as isCliProvider, l as resolveConfiguredModelRef, m as DEFAULT_MODEL, n as buildConfiguredAllowlistKeys, o as normalizeModelRef, p as DEFAULT_CONTEXT_TOKENS, r as buildModelAliasIndex, s as normalizeProviderId, t as buildAllowedModelSet, u as resolveDefaultModelForAgent } from "./model-selection-BI8CKPwQ.js";
12
+ import { S as pickPrimaryTailnetIPv4, T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, _ as ensureChromeExtensionRelayServer, x as pickPrimaryLanIPv4, y as rawDataToString } from "./chrome-Cfak4A3i.js";
13
13
  import { n as resolveCliName, t as formatCliCommand } from "./command-format-GLYKXXl-.js";
14
14
  import { n as formatErrorMessage } from "./errors-UbDRvfEx.js";
15
- import { A as detectMime, C as GATEWAY_CLIENT_MODES, E as getImageMetadata, F as kindFromMime, H as isBlockedHostname, I as normalizeMimeType$1, M as getFileExtension, N as imageMimeFromFormat, P as isAudioFileName, R as mediaKindFromMime, S as GATEWAY_CLIENT_IDS, U as isPrivateIpAddress, _ as isMarkdownCapableMessageChannel, a as chunkText, b as resolveGatewayMessageChannel, c as resolveTextChunkLimit, d as listChannelPlugins, f as normalizeChannelId$1, g as isInternalMessageChannel, i as chunkMarkdownTextWithMode, j as extensionForMime, k as resizeToJpeg, m as isDeliverableMessageChannel, o as chunkTextWithMode, p as INTERNAL_MESSAGE_CHANNEL, r as chunkMarkdownText, s as resolveChunkMode, t as chunkByNewline, u as getChannelPlugin, v as listDeliverableMessageChannels, w as GATEWAY_CLIENT_NAMES, x as resolveMessageChannel, y as normalizeMessageChannel, z as SsrFBlockedError } from "./chunk-5llVa3wc.js";
16
- import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath$1 } from "./paths-CLxC7m0Z.js";
17
- import { t as sanitizeToolResultImages } from "./tool-images-CUx-9B7B.js";
18
- import { a as listProfilesForProvider, c as resolveAuthStorePathForDisplay, d as saveJsonFile, f as withFileLock$1, h as normalizeSecretInput, i as resolveApiKeyForProfile, l as resolveAnimaAgentDir, n as resolveAuthProfileOrder, o as ensureAuthProfileStore, p as resolveAuthProfileDisplayLabel, r as isProfileInCooldown, s as loadAuthProfileStore, u as loadJsonFile } from "./auth-profiles-Da39zGOD.js";
19
- import { a as requireApiKey, c as resolveModelAuthMode, i as getCustomProviderApiKey, n as resolveMemorySearchConfig, o as resolveApiKeyForProvider, r as getApiKeyForModel, s as resolveEnvApiKey } from "./manager-kdmVqWxk.js";
20
- import { d as listMemoryFiles, f as normalizeExtraMemoryPaths } from "./sqlite-D_h-b5t2.js";
21
- import { a as readNumberParam, c as readStringParam, i as jsonResult, n as imageResult, r as imageResultFromFile, s as readStringArrayParam } from "./common-CKoFTq83.js";
22
- import { a as resolveMarkdownTableMode, c as loadWebMedia, d as readResponseWithLimit, f as fetchWithSsrFGuard, i as convertMarkdownTables, l as MediaFetchError, m as fetchWithTimeout, o as normalizePollInput, p as bindAbortRelay, s as getDefaultLocalRoots, t as getActiveWebListener, u as fetchRemoteMedia } from "./active-listener-B7OcwSxK.js";
15
+ import { A as detectMime, C as GATEWAY_CLIENT_MODES, E as getImageMetadata, F as kindFromMime, H as isBlockedHostname, I as normalizeMimeType$1, M as getFileExtension, N as imageMimeFromFormat, P as isAudioFileName, R as mediaKindFromMime, S as GATEWAY_CLIENT_IDS, U as isPrivateIpAddress, _ as isMarkdownCapableMessageChannel, a as chunkText, b as resolveGatewayMessageChannel, c as resolveTextChunkLimit, d as listChannelPlugins, f as normalizeChannelId$1, g as isInternalMessageChannel, i as chunkMarkdownTextWithMode, j as extensionForMime, k as resizeToJpeg, m as isDeliverableMessageChannel, o as chunkTextWithMode, p as INTERNAL_MESSAGE_CHANNEL, r as chunkMarkdownText, s as resolveChunkMode, t as chunkByNewline, u as getChannelPlugin, v as listDeliverableMessageChannels, w as GATEWAY_CLIENT_NAMES, x as resolveMessageChannel, y as normalizeMessageChannel, z as SsrFBlockedError } from "./chunk-CyT-_QsQ.js";
16
+ import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath$1 } from "./paths-Cwszsz1I.js";
17
+ import { t as sanitizeToolResultImages } from "./tool-images-DK97edts.js";
18
+ import { a as listProfilesForProvider, c as resolveAuthStorePathForDisplay, d as saveJsonFile, f as withFileLock$1, h as normalizeSecretInput, i as resolveApiKeyForProfile, l as resolveAnimaAgentDir, n as resolveAuthProfileOrder, o as ensureAuthProfileStore, p as resolveAuthProfileDisplayLabel, r as isProfileInCooldown, s as loadAuthProfileStore, u as loadJsonFile } from "./auth-profiles-eZzmaeR3.js";
19
+ import { a as requireApiKey, c as resolveModelAuthMode, i as getCustomProviderApiKey, n as resolveMemorySearchConfig, o as resolveApiKeyForProvider, r as getApiKeyForModel, s as resolveEnvApiKey } from "./manager-A3pC-CW-.js";
20
+ import { d as listMemoryFiles, f as normalizeExtraMemoryPaths } from "./sqlite-ClLAW1iQ.js";
21
+ import { a as readNumberParam, c as readStringParam, i as jsonResult, n as imageResult, r as imageResultFromFile, s as readStringArrayParam } from "./common-BzPvZcxT.js";
22
+ import { a as resolveMarkdownTableMode, c as loadWebMedia, d as readResponseWithLimit, f as fetchWithSsrFGuard, i as convertMarkdownTables, l as MediaFetchError, m as fetchWithTimeout, o as normalizePollInput, p as bindAbortRelay, s as getDefaultLocalRoots, t as getActiveWebListener, u as fetchRemoteMedia } from "./active-listener-GJR3nLhX.js";
23
23
  import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-62lQTR6C.js";
24
- import { d as webAuthExists, i as logoutWeb, n as getWebAuthAgeMs, r as logWebSelfId, s as readWebSelfId } from "./auth-store-Bl6rpC4E.js";
24
+ import { d as webAuthExists, i as logoutWeb, n as getWebAuthAgeMs, r as logWebSelfId, s as readWebSelfId } from "./auth-store-CnRrUELz.js";
25
25
  import { createRequire } from "node:module";
26
- import * as fs$2 from "node:fs/promises";
26
+ import * as fs$1 from "node:fs/promises";
27
27
  import fs from "node:fs/promises";
28
28
  import * as os$1 from "node:os";
29
29
  import os, { homedir, tmpdir } from "node:os";
30
30
  import * as path$1 from "node:path";
31
31
  import path, { join } from "node:path";
32
- import fs$1, { constants, existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
32
+ import fsSync, { constants, existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
33
33
  import JSON5 from "json5";
34
34
  import { execFile, execSync, spawn, spawnSync } from "node:child_process";
35
35
  import { promisify } from "node:util";
@@ -1317,7 +1317,7 @@ function resolvePowerShellPath() {
1317
1317
  const systemRoot = process.env.SystemRoot || process.env.WINDIR;
1318
1318
  if (systemRoot) {
1319
1319
  const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
1320
- if (fs$1.existsSync(candidate)) return candidate;
1320
+ if (fsSync.existsSync(candidate)) return candidate;
1321
1321
  }
1322
1322
  return "powershell.exe";
1323
1323
  }
@@ -1355,7 +1355,7 @@ function resolveShellFromPath(name) {
1355
1355
  for (const entry of entries) {
1356
1356
  const candidate = path.join(entry, name);
1357
1357
  try {
1358
- fs$1.accessSync(candidate, fs$1.constants.X_OK);
1358
+ fsSync.accessSync(candidate, fsSync.constants.X_OK);
1359
1359
  return candidate;
1360
1360
  } catch {}
1361
1361
  }
@@ -1528,7 +1528,7 @@ function resolveRepoRoot(params) {
1528
1528
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
1529
1529
  if (configured) try {
1530
1530
  const resolved = path.resolve(configured);
1531
- if (fs$1.statSync(resolved).isDirectory()) return resolved;
1531
+ if (fsSync.statSync(resolved).isDirectory()) return resolved;
1532
1532
  } catch {}
1533
1533
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
1534
1534
  const seen = /* @__PURE__ */ new Set();
@@ -1545,7 +1545,7 @@ function findGitRoot(startDir) {
1545
1545
  for (let i = 0; i < 12; i += 1) {
1546
1546
  const gitPath = path.join(current, ".git");
1547
1547
  try {
1548
- const stat = fs$1.statSync(gitPath);
1548
+ const stat = fsSync.statSync(gitPath);
1549
1549
  if (stat.isDirectory() || stat.isFile()) return current;
1550
1550
  } catch {}
1551
1551
  const parent = path.dirname(current);
@@ -2427,7 +2427,7 @@ async function resolveAnimaDocsPath(params) {
2427
2427
  const workspaceDir = params.workspaceDir?.trim();
2428
2428
  if (workspaceDir) {
2429
2429
  const workspaceDocs = path.join(workspaceDir, "docs");
2430
- if (fs$1.existsSync(workspaceDocs)) return workspaceDocs;
2430
+ if (fsSync.existsSync(workspaceDocs)) return workspaceDocs;
2431
2431
  }
2432
2432
  const packageRoot = await resolveAnimaPackageRoot({
2433
2433
  cwd: params.cwd,
@@ -2436,7 +2436,7 @@ async function resolveAnimaDocsPath(params) {
2436
2436
  });
2437
2437
  if (!packageRoot) return null;
2438
2438
  const packageDocs = path.join(packageRoot, "docs");
2439
- return fs$1.existsSync(packageDocs) ? packageDocs : null;
2439
+ return fsSync.existsSync(packageDocs) ? packageDocs : null;
2440
2440
  }
2441
2441
 
2442
2442
  //#endregion
@@ -2776,8 +2776,7 @@ const DEFAULT_CODEX_BACKEND = {
2776
2776
  "--json",
2777
2777
  "--color",
2778
2778
  "never",
2779
- "--sandbox",
2780
- "danger-full-access",
2779
+ "--dangerously-bypass-approvals-and-sandbox",
2781
2780
  "--skip-git-repo-check"
2782
2781
  ],
2783
2782
  resumeArgs: [
@@ -2855,6 +2854,7 @@ const LEGACY_CODEX_RESUME_ARGS = [
2855
2854
  "read-only",
2856
2855
  "--skip-git-repo-check"
2857
2856
  ];
2857
+ const CODEX_BYPASS_FLAG = "--dangerously-bypass-approvals-and-sandbox";
2858
2858
  function normalizeBackendKey(key) {
2859
2859
  return normalizeProviderId(key);
2860
2860
  }
@@ -2891,27 +2891,34 @@ function argsEqual(left, right) {
2891
2891
  if (!left || !right || left.length !== right.length) return false;
2892
2892
  return left.every((entry, index) => entry === right[index]);
2893
2893
  }
2894
- function resolveCliSandboxArg(args) {
2894
+ function resolveCodexExecModeArg(args) {
2895
2895
  if (!args) return;
2896
+ if (args.includes(CODEX_BYPASS_FLAG)) return CODEX_BYPASS_FLAG;
2896
2897
  const index = args.indexOf("--sandbox");
2897
2898
  const value = index >= 0 ? args[index + 1] : void 0;
2898
- return typeof value === "string" && value.trim() ? value : void 0;
2899
- }
2900
- function setCliArgValue(args, flag, value) {
2901
- const nextArgs = [...args ?? []];
2902
- const index = nextArgs.indexOf(flag);
2903
- if (index >= 0 && nextArgs[index + 1]) {
2904
- nextArgs[index + 1] = value;
2905
- return nextArgs;
2899
+ return value === "workspace-write" || value === "read-only" ? value : void 0;
2900
+ }
2901
+ function setCodexExecModeArgs(args, mode) {
2902
+ const nextArgs = [];
2903
+ const source = args ?? [];
2904
+ for (let i = 0; i < source.length; i += 1) {
2905
+ const entry = source[i];
2906
+ if (entry === CODEX_BYPASS_FLAG) continue;
2907
+ if (entry === "--sandbox") {
2908
+ i += 1;
2909
+ continue;
2910
+ }
2911
+ nextArgs.push(entry);
2906
2912
  }
2907
- nextArgs.push(flag, value);
2913
+ if (mode === CODEX_BYPASS_FLAG) nextArgs.push(CODEX_BYPASS_FLAG);
2914
+ else nextArgs.push("--sandbox", mode);
2908
2915
  return nextArgs;
2909
2916
  }
2910
- function resolveManagedCodexSandbox(cfg) {
2917
+ function resolveManagedCodexExecMode(cfg) {
2911
2918
  const workspaceAccess = cfg?.agents?.defaults?.sandbox?.workspaceAccess;
2912
2919
  if (workspaceAccess === "ro") return "read-only";
2913
2920
  if (workspaceAccess === "rw") return "workspace-write";
2914
- return "danger-full-access";
2921
+ return CODEX_BYPASS_FLAG;
2915
2922
  }
2916
2923
  function resolveCliBackendConfig(provider, cfg) {
2917
2924
  const normalized = normalizeBackendKey(provider);
@@ -2939,9 +2946,9 @@ function resolveCliBackendConfig(provider, cfg) {
2939
2946
  ...merged,
2940
2947
  resumeArgs: DEFAULT_CODEX_BACKEND.resumeArgs
2941
2948
  };
2942
- if (!resolveCliSandboxArg(override?.args) || (override?.args ? argsEqual(override.args, LEGACY_CODEX_ARGS) : false)) merged = {
2949
+ if (!resolveCodexExecModeArg(override?.args) || (override?.args ? argsEqual(override.args, LEGACY_CODEX_ARGS) : false)) merged = {
2943
2950
  ...merged,
2944
- args: setCliArgValue(merged.args, "--sandbox", resolveManagedCodexSandbox(cfg))
2951
+ args: setCodexExecModeArgs(merged.args, resolveManagedCodexExecMode(cfg))
2945
2952
  };
2946
2953
  const command = merged.command?.trim();
2947
2954
  if (!command) return null;
@@ -3123,7 +3130,7 @@ async function runCliAgent(params) {
3123
3130
  const backendResolved = resolveCliBackendConfig(params.provider, params.config);
3124
3131
  if (!backendResolved) throw new Error(`Unknown CLI backend: ${params.provider}`);
3125
3132
  const backend = backendResolved.config;
3126
- const effectiveCliSandbox = resolveCliSandboxArg(backend.args);
3133
+ const effectiveCodexExecMode = resolveCodexExecModeArg(backend.args);
3127
3134
  const modelId = (params.model ?? "default").trim() || "default";
3128
3135
  const normalizedModel = normalizeCliModel(modelId, backend);
3129
3136
  const modelDisplay = `${params.provider}/${modelId}`;
@@ -3174,10 +3181,11 @@ async function runCliAgent(params) {
3174
3181
  const lines = (await readFile(params.sessionFile, "utf-8")).trim().split("\n");
3175
3182
  const lastLine = lines[lines.length - 1];
3176
3183
  if (lastLine) {
3177
- const effectiveSandbox = JSON.parse(lastLine).metadata?.effectiveSandbox;
3178
- const currentSandbox = effectiveCliSandbox;
3179
- if (effectiveSandbox && effectiveSandbox !== currentSandbox) {
3180
- log$8.info(`Codex sandbox changed (${effectiveSandbox} -> ${currentSandbox}); forcing session restart.`);
3184
+ const parsed = JSON.parse(lastLine);
3185
+ const previousMode = parsed.metadata?.effectiveCodexExecMode ?? parsed.metadata?.effectiveSandbox;
3186
+ const currentMode = effectiveCodexExecMode;
3187
+ if (previousMode && previousMode !== currentMode) {
3188
+ log$8.info(`Codex execution mode changed (${previousMode} -> ${currentMode}); forcing session restart.`);
3181
3189
  useResume = false;
3182
3190
  isNew = true;
3183
3191
  }
@@ -3326,7 +3334,7 @@ async function runCliAgent(params) {
3326
3334
  provider: params.provider,
3327
3335
  model: modelId,
3328
3336
  usage: output.usage,
3329
- ...effectiveCliSandbox ? { metadata: { effectiveSandbox: effectiveCliSandbox } } : {}
3337
+ ...effectiveCodexExecMode ? { metadata: { effectiveCodexExecMode } } : {}
3330
3338
  }
3331
3339
  }
3332
3340
  };
@@ -4167,7 +4175,7 @@ async function getMemorySearchManager(params) {
4167
4175
  if (cached) return { manager: cached };
4168
4176
  }
4169
4177
  try {
4170
- const { QmdMemoryManager } = await import("./qmd-manager-DHQgWjsV.js");
4178
+ const { QmdMemoryManager } = await import("./qmd-manager-CwbYv6nJ.js");
4171
4179
  const primary = await QmdMemoryManager.create({
4172
4180
  cfg: params.cfg,
4173
4181
  agentId: params.agentId,
@@ -4179,7 +4187,7 @@ async function getMemorySearchManager(params) {
4179
4187
  const wrapper = new FallbackMemoryManager({
4180
4188
  primary,
4181
4189
  fallbackFactory: async () => {
4182
- const { MemoryIndexManager } = await import("./manager-kdmVqWxk.js").then((n) => n.t);
4190
+ const { MemoryIndexManager } = await import("./manager-A3pC-CW-.js").then((n) => n.t);
4183
4191
  return await MemoryIndexManager.get(params);
4184
4192
  }
4185
4193
  }, () => QMD_MANAGER_CACHE.delete(cacheKey));
@@ -4192,7 +4200,7 @@ async function getMemorySearchManager(params) {
4192
4200
  }
4193
4201
  }
4194
4202
  try {
4195
- const { MemoryIndexManager } = await import("./manager-kdmVqWxk.js").then((n) => n.t);
4203
+ const { MemoryIndexManager } = await import("./manager-A3pC-CW-.js").then((n) => n.t);
4196
4204
  return { manager: await MemoryIndexManager.get(params) };
4197
4205
  } catch (err) {
4198
4206
  return {
@@ -5273,7 +5281,7 @@ function resolveDefaultIdentityPath() {
5273
5281
  return path.join(resolveStateDir(), "identity", "device.json");
5274
5282
  }
5275
5283
  function ensureDir$2(filePath) {
5276
- fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
5284
+ fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
5277
5285
  }
5278
5286
  const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
5279
5287
  function base64UrlEncode(buf) {
@@ -5309,8 +5317,8 @@ function generateIdentity() {
5309
5317
  }
5310
5318
  function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
5311
5319
  try {
5312
- if (fs$1.existsSync(filePath)) {
5313
- const raw = fs$1.readFileSync(filePath, "utf8");
5320
+ if (fsSync.existsSync(filePath)) {
5321
+ const raw = fsSync.readFileSync(filePath, "utf8");
5314
5322
  const parsed = JSON.parse(raw);
5315
5323
  if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
5316
5324
  const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
@@ -5319,9 +5327,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
5319
5327
  ...parsed,
5320
5328
  deviceId: derivedId
5321
5329
  };
5322
- fs$1.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
5330
+ fsSync.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
5323
5331
  try {
5324
- fs$1.chmodSync(filePath, 384);
5332
+ fsSync.chmodSync(filePath, 384);
5325
5333
  } catch {}
5326
5334
  return {
5327
5335
  deviceId: derivedId,
@@ -5346,9 +5354,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
5346
5354
  privateKeyPem: identity.privateKeyPem,
5347
5355
  createdAtMs: Date.now()
5348
5356
  };
5349
- fs$1.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
5357
+ fsSync.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
5350
5358
  try {
5351
- fs$1.chmodSync(filePath, 384);
5359
+ fsSync.chmodSync(filePath, 384);
5352
5360
  } catch {}
5353
5361
  return identity;
5354
5362
  }
@@ -5498,8 +5506,8 @@ function resolveDeviceAuthPath(env = process.env) {
5498
5506
  }
5499
5507
  function readStore(filePath) {
5500
5508
  try {
5501
- if (!fs$1.existsSync(filePath)) return null;
5502
- const raw = fs$1.readFileSync(filePath, "utf8");
5509
+ if (!fsSync.existsSync(filePath)) return null;
5510
+ const raw = fsSync.readFileSync(filePath, "utf8");
5503
5511
  const parsed = JSON.parse(raw);
5504
5512
  if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
5505
5513
  if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
@@ -5509,10 +5517,10 @@ function readStore(filePath) {
5509
5517
  }
5510
5518
  }
5511
5519
  function writeStore(filePath, store) {
5512
- fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
5513
- fs$1.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
5520
+ fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
5521
+ fsSync.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
5514
5522
  try {
5515
- fs$1.chmodSync(filePath, 384);
5523
+ fsSync.chmodSync(filePath, 384);
5516
5524
  } catch {}
5517
5525
  }
5518
5526
  function loadDeviceAuthToken(params) {
@@ -7970,7 +7978,7 @@ async function routeReply(params) {
7970
7978
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
7971
7979
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
7972
7980
  try {
7973
- const { deliverOutboundPayloads } = await import("./deliver-CoQP7nSu.js").then((n) => n.n);
7981
+ const { deliverOutboundPayloads } = await import("./deliver-D2hQZ9X0.js").then((n) => n.n);
7974
7982
  return {
7975
7983
  ok: true,
7976
7984
  messageId: (await deliverOutboundPayloads({
@@ -8204,7 +8212,7 @@ function normalizeSessionKey(value) {
8204
8212
  }
8205
8213
  function readSessionStore(storePath) {
8206
8214
  try {
8207
- const raw = fs$1.readFileSync(storePath, "utf-8");
8215
+ const raw = fsSync.readFileSync(storePath, "utf-8");
8208
8216
  const parsed = JSON5.parse(raw);
8209
8217
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
8210
8218
  } catch {}
@@ -11566,7 +11574,7 @@ async function loadModelCatalog(params) {
11566
11574
  });
11567
11575
  try {
11568
11576
  await ensureAnimaModelsJson(params?.config ?? loadConfig());
11569
- await (await import("./pi-auth-json-BLCyhR5p.js")).ensurePiAuthJsonFromAuthProfiles(resolveAnimaAgentDir());
11577
+ await (await import("./pi-auth-json-smxh_Xud.js")).ensurePiAuthJsonFromAuthProfiles(resolveAnimaAgentDir());
11570
11578
  const piSdk = await importPiSdk();
11571
11579
  const agentDir = resolveAnimaAgentDir();
11572
11580
  const { join } = await import("node:path");
@@ -13663,7 +13671,7 @@ async function createModelSelectionState(params) {
13663
13671
  }
13664
13672
  }
13665
13673
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
13666
- const { ensureAuthProfileStore } = await import("./auth-profiles-Da39zGOD.js").then((n) => n.t);
13674
+ const { ensureAuthProfileStore } = await import("./auth-profiles-eZzmaeR3.js").then((n) => n.t);
13667
13675
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
13668
13676
  const providerKey = normalizeProviderId(provider);
13669
13677
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -14807,8 +14815,8 @@ function listSkillCommandsForAgents(params) {
14807
14815
  const visitedDirs = /* @__PURE__ */ new Set();
14808
14816
  for (const agentId of agentIds) {
14809
14817
  const workspaceDir = resolveAgentWorkspaceDir(params.cfg, agentId);
14810
- if (!fs$1.existsSync(workspaceDir)) continue;
14811
- const canonicalDir = fs$1.realpathSync(workspaceDir);
14818
+ if (!fsSync.existsSync(workspaceDir)) continue;
14819
+ const canonicalDir = fsSync.realpathSync(workspaceDir);
14812
14820
  if (visitedDirs.has(canonicalDir)) continue;
14813
14821
  visitedDirs.add(canonicalDir);
14814
14822
  const commands = buildWorkspaceSkillCommandSpecs(workspaceDir, {
@@ -15079,7 +15087,7 @@ function resolveAllowFromPath(channel, env = process.env) {
15079
15087
  }
15080
15088
  async function readJsonFile(filePath, fallback) {
15081
15089
  try {
15082
- const parsed = safeParseJson(await fs$1.promises.readFile(filePath, "utf-8"));
15090
+ const parsed = safeParseJson(await fsSync.promises.readFile(filePath, "utf-8"));
15083
15091
  if (parsed == null) return {
15084
15092
  value: fallback,
15085
15093
  exists: true
@@ -15101,18 +15109,18 @@ async function readJsonFile(filePath, fallback) {
15101
15109
  }
15102
15110
  async function writeJsonFile(filePath, value) {
15103
15111
  const dir = path.dirname(filePath);
15104
- await fs$1.promises.mkdir(dir, {
15112
+ await fsSync.promises.mkdir(dir, {
15105
15113
  recursive: true,
15106
15114
  mode: 448
15107
15115
  });
15108
15116
  const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
15109
- await fs$1.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, { encoding: "utf-8" });
15110
- await fs$1.promises.chmod(tmp, 384);
15111
- await fs$1.promises.rename(tmp, filePath);
15117
+ await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, { encoding: "utf-8" });
15118
+ await fsSync.promises.chmod(tmp, 384);
15119
+ await fsSync.promises.rename(tmp, filePath);
15112
15120
  }
15113
15121
  async function ensureJsonFile(filePath, fallback) {
15114
15122
  try {
15115
- await fs$1.promises.access(filePath);
15123
+ await fsSync.promises.access(filePath);
15116
15124
  } catch {
15117
15125
  await writeJsonFile(filePath, fallback);
15118
15126
  }
@@ -16155,8 +16163,8 @@ function expandHome$1(value) {
16155
16163
  }
16156
16164
  function isExecutableFile(filePath) {
16157
16165
  try {
16158
- if (!fs$1.statSync(filePath).isFile()) return false;
16159
- if (process.platform !== "win32") fs$1.accessSync(filePath, fs$1.constants.X_OK);
16166
+ if (!fsSync.statSync(filePath).isFile()) return false;
16167
+ if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
16160
16168
  return true;
16161
16169
  } catch {
16162
16170
  return false;
@@ -16194,7 +16202,7 @@ function normalizeMatchTarget(value) {
16194
16202
  }
16195
16203
  function tryRealpath(value) {
16196
16204
  try {
16197
- return fs$1.realpathSync(value);
16205
+ return fsSync.realpathSync(value);
16198
16206
  } catch {
16199
16207
  return null;
16200
16208
  }
@@ -16832,7 +16840,7 @@ function isPathLikeToken(value) {
16832
16840
  }
16833
16841
  function defaultFileExists(filePath) {
16834
16842
  try {
16835
- return fs$1.existsSync(filePath);
16843
+ return fsSync.existsSync(filePath);
16836
16844
  } catch {
16837
16845
  return false;
16838
16846
  }
@@ -17076,7 +17084,7 @@ function mergeLegacyAgent(current, legacy) {
17076
17084
  }
17077
17085
  function ensureDir$1(filePath) {
17078
17086
  const dir = path.dirname(filePath);
17079
- fs$1.mkdirSync(dir, { recursive: true });
17087
+ fsSync.mkdirSync(dir, { recursive: true });
17080
17088
  }
17081
17089
  function coerceAllowlistEntries(allowlist) {
17082
17090
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -17146,11 +17154,11 @@ function generateToken() {
17146
17154
  function loadExecApprovals() {
17147
17155
  const filePath = resolveExecApprovalsPath();
17148
17156
  try {
17149
- if (!fs$1.existsSync(filePath)) return normalizeExecApprovals({
17157
+ if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
17150
17158
  version: 1,
17151
17159
  agents: {}
17152
17160
  });
17153
- const raw = fs$1.readFileSync(filePath, "utf8");
17161
+ const raw = fsSync.readFileSync(filePath, "utf8");
17154
17162
  const parsed = JSON.parse(raw);
17155
17163
  if (parsed?.version !== 1) return normalizeExecApprovals({
17156
17164
  version: 1,
@@ -17167,9 +17175,9 @@ function loadExecApprovals() {
17167
17175
  function saveExecApprovals(file) {
17168
17176
  const filePath = resolveExecApprovalsPath();
17169
17177
  ensureDir$1(filePath);
17170
- fs$1.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
17178
+ fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
17171
17179
  try {
17172
- fs$1.chmodSync(filePath, 384);
17180
+ fsSync.chmodSync(filePath, 384);
17173
17181
  } catch {}
17174
17182
  }
17175
17183
  function ensureExecApprovals() {
@@ -19763,10 +19771,10 @@ const resolveGitHead = (startDir) => {
19763
19771
  for (let i = 0; i < 12; i += 1) {
19764
19772
  const gitPath = path.join(current, ".git");
19765
19773
  try {
19766
- const stat = fs$1.statSync(gitPath);
19774
+ const stat = fsSync.statSync(gitPath);
19767
19775
  if (stat.isDirectory()) return path.join(gitPath, "HEAD");
19768
19776
  if (stat.isFile()) {
19769
- const match = fs$1.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
19777
+ const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
19770
19778
  if (match?.[1]) {
19771
19779
  const resolved = path.resolve(current, match[1].trim());
19772
19780
  return path.join(resolved, "HEAD");
@@ -19824,7 +19832,7 @@ const resolveCommitHash = (options = {}) => {
19824
19832
  cachedCommit = null;
19825
19833
  return cachedCommit;
19826
19834
  }
19827
- const head = fs$1.readFileSync(headPath, "utf-8").trim();
19835
+ const head = fsSync.readFileSync(headPath, "utf-8").trim();
19828
19836
  if (!head) {
19829
19837
  cachedCommit = null;
19830
19838
  return cachedCommit;
@@ -19832,7 +19840,7 @@ const resolveCommitHash = (options = {}) => {
19832
19840
  if (head.startsWith("ref:")) {
19833
19841
  const ref = head.replace(/^ref:\s*/i, "").trim();
19834
19842
  const refPath = path.resolve(path.dirname(headPath), ref);
19835
- cachedCommit = formatCommit(fs$1.readFileSync(refPath, "utf-8").trim());
19843
+ cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
19836
19844
  return cachedCommit;
19837
19845
  }
19838
19846
  cachedCommit = formatCommit(head);
@@ -19937,9 +19945,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
19937
19945
  } catch {
19938
19946
  return;
19939
19947
  }
19940
- if (!fs$1.existsSync(logPath)) return;
19948
+ if (!fsSync.existsSync(logPath)) return;
19941
19949
  try {
19942
- const lines = fs$1.readFileSync(logPath, "utf-8").split(/\n+/);
19950
+ const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
19943
19951
  let input = 0;
19944
19952
  let output = 0;
19945
19953
  let promptTokens = 0;
@@ -21468,7 +21476,7 @@ function defaultStore() {
21468
21476
  function loadProviderStore() {
21469
21477
  const storePath = resolveStorePath();
21470
21478
  try {
21471
- const raw = fs$1.readFileSync(storePath, "utf-8");
21479
+ const raw = fsSync.readFileSync(storePath, "utf-8");
21472
21480
  const parsed = JSON.parse(raw);
21473
21481
  return {
21474
21482
  providers: Array.isArray(parsed.providers) ? parsed.providers : [],
@@ -21514,8 +21522,8 @@ function resolveZaiApiKey() {
21514
21522
  }
21515
21523
  try {
21516
21524
  const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
21517
- if (!fs$1.existsSync(authPath)) return;
21518
- const data = JSON.parse(fs$1.readFileSync(authPath, "utf-8"));
21525
+ if (!fsSync.existsSync(authPath)) return;
21526
+ const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
21519
21527
  return data["z-ai"]?.access || data.zai?.access;
21520
21528
  } catch {
21521
21529
  return;
@@ -23236,7 +23244,7 @@ const applyCostTotal = (totals, costTotal) => {
23236
23244
  totals.totalCost += costTotal;
23237
23245
  };
23238
23246
  async function scanTranscriptFile(params) {
23239
- const fileStream = fs$1.createReadStream(params.filePath, { encoding: "utf-8" });
23247
+ const fileStream = fsSync.createReadStream(params.filePath, { encoding: "utf-8" });
23240
23248
  const rl = readline.createInterface({
23241
23249
  input: fileStream,
23242
23250
  crlfDelay: Infinity
@@ -23296,10 +23304,10 @@ async function loadCostUsageSummary(params) {
23296
23304
  const dailyMap = /* @__PURE__ */ new Map();
23297
23305
  const totals = emptyTotals();
23298
23306
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
23299
- const entries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
23307
+ const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
23300
23308
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
23301
23309
  const filePath = path.join(sessionsDir, entry.name);
23302
- const stats = await fs$1.promises.stat(filePath).catch(() => null);
23310
+ const stats = await fsSync.promises.stat(filePath).catch(() => null);
23303
23311
  if (!stats) return null;
23304
23312
  if (stats.mtimeMs < sinceTime) return null;
23305
23313
  return filePath;
@@ -23332,7 +23340,7 @@ async function loadCostUsageSummary(params) {
23332
23340
  }
23333
23341
  async function loadSessionCostSummary(params) {
23334
23342
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
23335
- if (!sessionFile || !fs$1.existsSync(sessionFile)) return null;
23343
+ if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
23336
23344
  const totals = emptyTotals();
23337
23345
  let firstActivity;
23338
23346
  let lastActivity;
@@ -26916,7 +26924,7 @@ async function writeUrlToFile(filePath, url) {
26916
26924
  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}`);
26917
26925
  const body = res.body;
26918
26926
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
26919
- const fileHandle = await fs$2.open(filePath, "w");
26927
+ const fileHandle = await fs$1.open(filePath, "w");
26920
26928
  let bytes = 0;
26921
26929
  let thrown;
26922
26930
  try {
@@ -26935,7 +26943,7 @@ async function writeUrlToFile(filePath, url) {
26935
26943
  await fileHandle.close();
26936
26944
  }
26937
26945
  if (thrown) {
26938
- await fs$2.unlink(filePath).catch(() => {});
26946
+ await fs$1.unlink(filePath).catch(() => {});
26939
26947
  throw thrown;
26940
26948
  }
26941
26949
  return {
@@ -26945,7 +26953,7 @@ async function writeUrlToFile(filePath, url) {
26945
26953
  }
26946
26954
  async function writeBase64ToFile(filePath, base64) {
26947
26955
  const buf = Buffer.from(base64, "base64");
26948
- await fs$2.writeFile(filePath, buf);
26956
+ await fs$1.writeFile(filePath, buf);
26949
26957
  return {
26950
26958
  path: filePath,
26951
26959
  bytes: buf.length
@@ -31721,7 +31729,7 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
31721
31729
  }
31722
31730
  function archiveFileOnDisk(filePath, reason) {
31723
31731
  const archived = `${filePath}.${reason}.${(/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-")}`;
31724
- fs$1.renameSync(filePath, archived);
31732
+ fsSync.renameSync(filePath, archived);
31725
31733
  return archived;
31726
31734
  }
31727
31735
  /**
@@ -31731,7 +31739,7 @@ function archiveFileOnDisk(filePath, reason) {
31731
31739
  function archiveSessionTranscripts(opts) {
31732
31740
  const archived = [];
31733
31741
  for (const candidate of resolveSessionTranscriptCandidates(opts.sessionId, opts.storePath, opts.sessionFile, opts.agentId)) {
31734
- if (!fs$1.existsSync(candidate)) continue;
31742
+ if (!fsSync.existsSync(candidate)) continue;
31735
31743
  try {
31736
31744
  archived.push(archiveFileOnDisk(candidate, opts.reason));
31737
31745
  } catch {}
@@ -31778,7 +31786,7 @@ function listExistingAgentIdsFromDisk() {
31778
31786
  const root = resolveStateDir();
31779
31787
  const agentsDir = path.join(root, "agents");
31780
31788
  try {
31781
- return fs$1.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
31789
+ return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
31782
31790
  } catch {
31783
31791
  return [];
31784
31792
  }
@@ -36351,7 +36359,7 @@ async function runAgentTurnWithFallback(params) {
36351
36359
  if (corruptedSessionId) {
36352
36360
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
36353
36361
  try {
36354
- fs$1.unlinkSync(transcriptPath);
36362
+ fsSync.unlinkSync(transcriptPath);
36355
36363
  } catch {}
36356
36364
  }
36357
36365
  delete params.activeSessionStore[sessionKey];
@@ -37152,7 +37160,7 @@ async function runReplyAgent(params) {
37152
37160
  if (resolved) transcriptCandidates.add(resolved);
37153
37161
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
37154
37162
  for (const candidate of transcriptCandidates) try {
37155
- fs$1.unlinkSync(candidate);
37163
+ fsSync.unlinkSync(candidate);
37156
37164
  } catch {}
37157
37165
  }
37158
37166
  return true;
@@ -37918,7 +37926,7 @@ async function deliverSessionMaintenanceWarning(params) {
37918
37926
  return;
37919
37927
  }
37920
37928
  try {
37921
- const { deliverOutboundPayloads } = await import("./deliver-CoQP7nSu.js").then((n) => n.n);
37929
+ const { deliverOutboundPayloads } = await import("./deliver-D2hQZ9X0.js").then((n) => n.n);
37922
37930
  await deliverOutboundPayloads({
37923
37931
  cfg: params.cfg,
37924
37932
  channel,
@@ -37940,7 +37948,7 @@ function forkSessionFromParent(params) {
37940
37948
  agentId: params.agentId,
37941
37949
  sessionsDir: params.sessionsDir
37942
37950
  });
37943
- if (!parentSessionFile || !fs$1.existsSync(parentSessionFile)) return null;
37951
+ if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
37944
37952
  try {
37945
37953
  const manager = SessionManager.open(parentSessionFile);
37946
37954
  const leafId = manager.getLeafId();
@@ -37964,7 +37972,7 @@ function forkSessionFromParent(params) {
37964
37972
  cwd: manager.getCwd(),
37965
37973
  parentSession: parentSessionFile
37966
37974
  };
37967
- fs$1.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
37975
+ fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
37968
37976
  return {
37969
37977
  sessionId,
37970
37978
  sessionFile
@@ -39347,7 +39355,7 @@ function createWhatsAppLoginTool() {
39347
39355
  force: Type.Optional(Type.Boolean())
39348
39356
  }),
39349
39357
  execute: async (_toolCallId, args) => {
39350
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-CuwWMetN.js");
39358
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-BxNKHxcf.js");
39351
39359
  if ((args?.action ?? "start") === "wait") {
39352
39360
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
39353
39361
  return {
@@ -39599,7 +39607,7 @@ function formatExtraPaths(workspaceDir, extraPaths) {
39599
39607
  }
39600
39608
  async function checkReadableFile(pathname) {
39601
39609
  try {
39602
- await fs.access(pathname, fs$1.constants.R_OK);
39610
+ await fs.access(pathname, fsSync.constants.R_OK);
39603
39611
  return { exists: true };
39604
39612
  } catch (err) {
39605
39613
  const code = err.code;
@@ -39658,7 +39666,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
39658
39666
  }
39659
39667
  let dirReadable = null;
39660
39668
  try {
39661
- await fs.access(memoryDir, fs$1.constants.R_OK);
39669
+ await fs.access(memoryDir, fsSync.constants.R_OK);
39662
39670
  dirReadable = true;
39663
39671
  } catch (err) {
39664
39672
  const code = err.code;
@@ -40277,23 +40285,23 @@ let webLoginQrPromise = null;
40277
40285
  let webChannelPromise = null;
40278
40286
  let whatsappActionsPromise = null;
40279
40287
  function loadWebOutbound() {
40280
- webOutboundPromise ??= import("./outbound-CovlPIFx.js").then((n) => n.t);
40288
+ webOutboundPromise ??= import("./outbound-DWfSyfZC.js").then((n) => n.t);
40281
40289
  return webOutboundPromise;
40282
40290
  }
40283
40291
  function loadWebLogin() {
40284
- webLoginPromise ??= import("./login-7Yj2TvMd.js").then((n) => n.n);
40292
+ webLoginPromise ??= import("./login-C4mptULi.js").then((n) => n.n);
40285
40293
  return webLoginPromise;
40286
40294
  }
40287
40295
  function loadWebLoginQr() {
40288
- webLoginQrPromise ??= import("./login-qr-CuwWMetN.js");
40296
+ webLoginQrPromise ??= import("./login-qr-BxNKHxcf.js");
40289
40297
  return webLoginQrPromise;
40290
40298
  }
40291
40299
  function loadWebChannel() {
40292
- webChannelPromise ??= import("./web-B3O004_b.js");
40300
+ webChannelPromise ??= import("./web-DBQRQY6n.js");
40293
40301
  return webChannelPromise;
40294
40302
  }
40295
40303
  function loadWhatsAppActions() {
40296
- whatsappActionsPromise ??= import("./whatsapp-actions-9PCfw-Zh.js");
40304
+ whatsappActionsPromise ??= import("./whatsapp-actions-CMEP8v3k.js");
40297
40305
  return whatsappActionsPromise;
40298
40306
  }
40299
40307
  function createPluginRuntime() {
@@ -40436,7 +40444,7 @@ const resolvePluginSdkAliasFile = (params) => {
40436
40444
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
40437
40445
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
40438
40446
  const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
40439
- for (const candidate of orderedCandidates) if (fs$1.existsSync(candidate)) return candidate;
40447
+ for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
40440
40448
  const parent = path.dirname(cursor);
40441
40449
  if (parent === cursor) break;
40442
40450
  cursor = parent;