@noxsoft/anima 3.0.0 → 3.0.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 (88) hide show
  1. package/dist/{accounts-4HFzweNO.js → accounts-ZMhj636e.js} +38 -38
  2. package/dist/{agent-events-BiKKV3wj.js → agent-events-iR_gRjZA.js} +2 -2
  3. package/dist/{agent-scope-BXuH9s05.js → agent-scope-DWKQJUUZ.js} +3 -3
  4. package/dist/{agents-GDJBET4Z.js → agents-DAg3VWr9.js} +1 -1
  5. package/dist/{auth-choice-BTMheCDo.js → auth-choice-CPDNhDPT.js} +17 -4
  6. package/dist/{auth-profiles-xk_1uopf.js → auth-profiles-BqrAPweI.js} +9 -9
  7. package/dist/{auth-store-Bis9WSLR.js → auth-store-eNVxoq_h.js} +13 -13
  8. package/dist/build-info.json +3 -3
  9. package/dist/bundled/boot-md/handler.js +22 -22
  10. package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
  11. package/dist/bundled/command-logger/handler.js +1 -1
  12. package/dist/bundled/session-memory/handler.js +8 -8
  13. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  14. package/dist/{chrome-C1KpzLwu.js → chrome-s7nTgmbn.js} +12 -12
  15. package/dist/{chunk-Cguey_55.js → chunk-lDG_8LI5.js} +2 -2
  16. package/dist/{clack-prompter-S0pujJNH.js → clack-prompter-DXovYg0Q.js} +1 -1
  17. package/dist/{command-registry-D5y3Nn9i.js → command-registry-Cl3Z-qsS.js} +7 -7
  18. package/dist/{common-DgcMt-pi.js → common-DbouukNi.js} +2 -2
  19. package/dist/{completion-cli-CDsbJ-p2.js → completion-cli-D3yIDiMz.js} +1 -1
  20. package/dist/{completion-cli-CqZwlvs2.js → completion-cli-DcTEhrAe.js} +2 -2
  21. package/dist/{config-CrQw7iqE.js → config-H_VHtPeY.js} +27 -27
  22. package/dist/{config-cli-Brwjz25Y.js → config-cli-DgXOXMb_.js} +1 -1
  23. package/dist/{config-cli-CaUpfkTl.js → config-cli-VB37XAkf.js} +1 -1
  24. package/dist/{configure-B_PLPDkP.js → configure-8QclXvjE.js} +2 -2
  25. package/dist/{configure-QwZPOdBf.js → configure-Du07BFtQ.js} +1 -1
  26. package/dist/{deliver-Bri9Y1qG.js → deliver-DyQtnfXd.js} +14 -14
  27. package/dist/{doctor-qFADypWz.js → doctor-BxzkshQH.js} +1 -1
  28. package/dist/{doctor-BDWGCEMG.js → doctor-DR7CLoAy.js} +1 -1
  29. package/dist/{doctor-completion-DguJOZqA.js → doctor-completion-CZgNNZVd.js} +1 -1
  30. package/dist/{doctor-completion-BY4djQTY.js → doctor-completion-Dend-SU1.js} +1 -1
  31. package/dist/entry.js +1 -1
  32. package/dist/{exec-DJTRaYS6.js → exec-CK8CHr7j.js} +7 -7
  33. package/dist/{frontmatter-DDYuWuK5.js → frontmatter-BBFYH_d2.js} +2 -2
  34. package/dist/{gateway-cli-B091bAD6.js → gateway-cli-BMOKBWwi.js} +5 -5
  35. package/dist/{gateway-cli-CUmQFMSU.js → gateway-cli-D0mD_UV8.js} +6 -6
  36. package/dist/{image-ops-ZMEg1-kE.js → image-ops-DJjERl7d.js} +2 -2
  37. package/dist/index.js +1 -1
  38. package/dist/json-file-Dvrir7_o.js +25 -0
  39. package/dist/llm-slug-generator.js +5 -5
  40. package/dist/{login-DP5hIYxG.js → login-CdRss5_H.js} +5 -5
  41. package/dist/{login-qr-DOt_1aAq.js → login-qr-DoNanonP.js} +10 -10
  42. package/dist/{manager-CHN3-66K.js → manager-BlXVqzLP.js} +14 -14
  43. package/dist/{model-auth-C4Jglp-Y.js → model-auth-ChSwMwh7.js} +3 -3
  44. package/dist/{model-selection-BsVvfxCt.js → model-selection-DPoLkg_t.js} +1 -1
  45. package/dist/{onboard-BqpDno7i.js → onboard-D8Khq7CJ.js} +2 -2
  46. package/dist/{onboard-B006xiEP.js → onboard-DHlStqHP.js} +3 -3
  47. package/dist/{onboarding-DXQ0Qtq6.js → onboarding-BappVKxE.js} +3 -3
  48. package/dist/{onboarding-BLFJufto.js → onboarding-CGG6jZ0y.js} +3 -3
  49. package/dist/{outbound-DdFghG1N.js → outbound-DK71dddk.js} +6 -6
  50. package/dist/{paths-OaazGgrn.js → paths-CmZenvlb.js} +2 -2
  51. package/dist/{paths-B-AkG5FD.js → paths-D2eokayo.js} +3 -3
  52. package/dist/{pi-auth-json-CYnJfuU-.js → pi-auth-json-BYN-DI5a.js} +7 -7
  53. package/dist/{pi-embedded-helpers-CeMv9QXO.js → pi-embedded-helpers-CvYnWzAn.js} +44 -44
  54. package/dist/{program-CzWSwu9I.js → program-Dk1iylK1.js} +2 -2
  55. package/dist/{program-context-C8DYJdS-.js → program-context-DYdCPzyt.js} +9 -9
  56. package/dist/{prompts-Cm8eJ-i3.js → prompts-BT5ztuUd.js} +17 -4
  57. package/dist/{pw-ai-DVQKx_ca.js → pw-ai-q5Enhcu7.js} +4 -4
  58. package/dist/{qmd-manager-lcdr9Faq.js → qmd-manager-D_lZFetA.js} +7 -7
  59. package/dist/{register.agent-DY1YeTsP.js → register.agent-CzQfwzdi.js} +2 -2
  60. package/dist/{register.agent-B_gLj3iW.js → register.agent-sq78vQTz.js} +2 -2
  61. package/dist/{register.configure-BHsLGGdB.js → register.configure-ChWH2Kph.js} +3 -3
  62. package/dist/{register.configure-De5ZyOFg.js → register.configure-w6Ptx3C9.js} +2 -2
  63. package/dist/{register.maintenance-Bcb2lf7H.js → register.maintenance-Chm2rk_s.js} +5 -5
  64. package/dist/{register.maintenance-DSQmEYe7.js → register.maintenance-Da29S58I.js} +4 -4
  65. package/dist/{register.onboard-COEVeozO.js → register.onboard-B7Ozkx53.js} +7 -7
  66. package/dist/{register.onboard-DUWYMOX1.js → register.onboard-BBqM-ETs.js} +7 -7
  67. package/dist/{register.setup-D__YdHzY.js → register.setup-BId1QGzk.js} +7 -7
  68. package/dist/{register.setup-fJdxj_9G.js → register.setup-Bc3Xk--Q.js} +7 -7
  69. package/dist/{register.subclis-D2HE_7Rz.js → register.subclis-N7uAMRX_.js} +3 -3
  70. package/dist/{run-main-BTol0uPD.js → run-main-DA4rt9qc.js} +6 -6
  71. package/dist/{semantic-BTp-RtM8.js → semantic-BcioSN1d.js} +1 -1
  72. package/dist/{session-CzBccNiw.js → session-DTRcP2Sj.js} +1 -1
  73. package/dist/{shell-env-5vFwNQcz.js → shell-env-BBHdjHEl.js} +1 -1
  74. package/dist/{soul-D4rF0iXu.js → soul-CXGTzaKZ.js} +1 -1
  75. package/dist/{sqlite-B3u2TqVF.js → sqlite-B-dYyac7.js} +4 -4
  76. package/dist/{subagent-registry-xUCd2ZX9.js → subagent-registry-DjB3VS5s.js} +28 -28
  77. package/dist/{subsystem-BlEuMJjX.js → subsystem-CJTCKTwb.js} +13 -13
  78. package/dist/{tool-images-2qKyjXUj.js → tool-images-DBOSl4NL.js} +2 -2
  79. package/dist/{update-cli-CATjbP1k.js → update-cli-CGVsahIi.js} +5 -5
  80. package/dist/{update-cli-C6zUK6ap.js → update-cli-D-QvSeu0.js} +4 -4
  81. package/dist/{usage-kmpmqBES.js → usage-DSZ_juox.js} +20 -20
  82. package/dist/{web-CTS-vEIT.js → web-DY2TrPoD.js} +86 -86
  83. package/dist/{whatsapp-actions-qDftmVCc.js → whatsapp-actions-B_fglZZt.js} +13 -13
  84. package/dist/{workspace-CZlo4alz.js → workspace-xzxJwPTB.js} +5 -5
  85. package/package.json +2 -1
  86. package/dist/json-file-CZ3ssFR9.js +0 -25
  87. /package/dist/{config-Btt1rkoB.js → config-COtiNNtV.js} +0 -0
  88. /package/dist/{input-provenance-B0pwc6mp.js → input-provenance-MbkIKHHL.js} +0 -0
@@ -1,48 +1,48 @@
1
- import { a as resolveOAuthDir, i as resolveGatewayPort, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-B-AkG5FD.js";
2
- import { C as normalizeAccountId$1, D as resolveThreadSessionKeys, E as resolveAgentIdFromSessionKey, M as parseAgentSessionKey, N as resolveThreadParentSessionKey, O as sanitizeAgentId, T as normalizeMainKey, _ as DEFAULT_AGENT_ID, b as buildAgentPeerSessionKey, g as DEFAULT_ACCOUNT_ID, j as isSubagentSessionKey, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, v as DEFAULT_MAIN_KEY, w as normalizeAgentId, x as buildGroupHistoryKey, y as buildAgentMainSessionKey } from "./workspace-CZlo4alz.js";
3
- 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-BlEuMJjX.js";
4
- import { A as toWhatsappJid, C as resolveJidToE164, D as shortenHomePath, E as shortenHomeInString, O as sleep, T as safeParseJson, _ as isRecord, a as logDebug, b as normalizeE164, 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, r as formatSpawnError, s as logInfo, t as runCommandWithTimeout, u as clamp, v as isSelfChatMode, w as resolveUserPath, y as jidToE164 } from "./exec-DJTRaYS6.js";
5
- 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-BXuH9s05.js";
1
+ import { a as resolveOAuthDir, i as resolveGatewayPort, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-D2eokayo.js";
2
+ import { C as normalizeAccountId$1, D as resolveThreadSessionKeys, E as resolveAgentIdFromSessionKey, M as parseAgentSessionKey, N as resolveThreadParentSessionKey, O as sanitizeAgentId, T as normalizeMainKey, _ as DEFAULT_AGENT_ID, b as buildAgentPeerSessionKey, g as DEFAULT_ACCOUNT_ID, j as isSubagentSessionKey, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, v as DEFAULT_MAIN_KEY, w as normalizeAgentId, x as buildGroupHistoryKey, y as buildAgentMainSessionKey } from "./workspace-xzxJwPTB.js";
3
+ 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-CJTCKTwb.js";
4
+ import { A as toWhatsappJid, C as resolveJidToE164, D as shortenHomePath, E as shortenHomeInString, O as sleep, T as safeParseJson, _ as isRecord, a as logDebug, b as normalizeE164, 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, r as formatSpawnError, s as logInfo, t as runCommandWithTimeout, u as clamp, v as isSelfChatMode, w as resolveUserPath, y as jidToE164 } from "./exec-CK8CHr7j.js";
5
+ 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-DWKQJUUZ.js";
6
6
  import { a as queueEmbeddedPiMessage, c as waitForEmbeddedPiRunEnd, i as isEmbeddedPiRunStreaming, n as compactEmbeddedPiSession, o as resolveEmbeddedSessionLane, r as isEmbeddedPiRunActive, s as runEmbeddedPiAgent, t as abortEmbeddedPiRun } from "./pi-embedded-CVojjlMb.js";
7
7
  import { n as resolveCliName, t as formatCliCommand } from "./command-format-CZk1W3UP.js";
8
- import { d as webAuthExists, i as logoutWeb, n as getWebAuthAgeMs, o as pickWebChannel, r as logWebSelfId, s as readWebSelfId, t as WA_WEB_AUTH_DIR } from "./auth-store-Bis9WSLR.js";
9
- import { $ as appendAssistantMessageToSessionTranscript, A as buildWorkspaceSkillCommandSpecs, B as buildPluginToolGroups, C as resolveBrowserConfig, Ct as resolveMainSessionKey, D as DEFAULT_UPLOAD_DIR, Dt as resolveConversationLabel, E as saveMediaBuffer, Et as listChannelDocks, F as resolveSandboxedMediaSource, G as resolveToolProfilePolicy, H as expandPolicyWithPluginGroups, I as ensureBrowserControlAuth, J as matchesAnyGlobPattern, K as stripPluginOnlyAllowlist, L as resolveBrowserControlAuth, Mt as isSilentReplyText, N as assertMediaNotDataUrl, O as resolvePathsWithinRoot, Ot as normalizeChatType, P as assertSandboxPath, Q as extractDeliveryInfo, R as resolveSandboxConfigForAgent, S as registerBrowserRoutes, T as getMediaDir, Tt as getChannelDock, U as expandToolGroups, V as collectExplicitAllowlist, W as normalizeToolName, X as resolveBootstrapMaxChars, _ as isTransientHttpError, _t as resolveSessionResetType, a as normalizeReasoningLevel, at as updateSessionStore, b as resolveSandboxRuntimeStatus, bt as resolveFreshSessionTotalTokens, c as normalizeVerboseLevel, dt as normalizeSessionDeliveryFields, g as isLikelyContextOverflowError, gt as resolveSessionResetPolicy, ht as resolveChannelResetConfig, i as normalizeElevatedLevel, it as updateLastRoute, j as buildWorkspaceSkillSnapshot, jt as SILENT_REPLY_TOKEN, k as getBridgeAuthForPort, kt as resolveGroupSessionKey, l as resolveResponseUsageMode, m as isContextOverflowError, mt as evaluateSessionFreshness, n as formatXHighModelHint, nt as readSessionUpdatedAt, o as normalizeThinkLevel, ot as updateSessionStoreEntry, p as isCompactionFailureError, pt as resolveSessionKey, q as compileGlobPatterns, r as listThinkingLevels, rt as recordSessionMetaFromInbound, s as normalizeUsageDisplay, t as formatThinkingLevels, tt as loadSessionStore, u as supportsXHighThinking, ut as normalizeDeliveryContext, v as sanitizeUserFacingText, vt as resolveThreadFlag, w as resolveProfile, wt as deriveSessionMetaPatch, x as createBrowserRouteContext, xt as canonicalizeMainSessionAlias, y as ensureSandboxWorkspaceForSession, yt as DEFAULT_RESET_TRIGGERS, z as applyOwnerOnlyToolPolicy } from "./pi-embedded-helpers-CeMv9QXO.js";
10
- import { a as listProfilesForProvider, d as normalizeSecretInput, f as resolveAuthProfileDisplayLabel, i as resolveApiKeyForProfile, l as withFileLock$1, n as resolveAuthProfileOrder, o as ensureAuthProfileStore, r as isProfileInCooldown, s as resolveAuthStorePathForDisplay } from "./auth-profiles-xk_1uopf.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, p as DEFAULT_CONTEXT_TOKENS, r as buildModelAliasIndex, s as normalizeProviderId, t as buildAllowedModelSet, u as resolveDefaultModelForAgent } from "./model-selection-BsVvfxCt.js";
12
- import { A as normalizeMessageChannel, C as normalizeChannelId$1, D as isInternalMessageChannel, F as GATEWAY_CLIENT_NAMES, M as resolveMessageChannel, N as GATEWAY_CLIENT_IDS, O as isMarkdownCapableMessageChannel, P as GATEWAY_CLIENT_MODES, S as listChannelPlugins, T as isDeliverableMessageChannel, a as resizeToJpeg, c as getFileExtension, d as kindFromMime, h as SsrFBlockedError, j as resolveGatewayMessageChannel, k as listDeliverableMessageChannels, l as imageMimeFromFormat, m as mediaKindFromMime, n as getImageMetadata, o as detectMime, s as extensionForMime, u as isAudioFileName, v as isBlockedHostname, w as INTERNAL_MESSAGE_CHANNEL, x as getChannelPlugin, y as isPrivateIpAddress } from "./image-ops-ZMEg1-kE.js";
13
- 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-CrQw7iqE.js";
8
+ import { d as webAuthExists, i as logoutWeb, n as getWebAuthAgeMs, o as pickWebChannel, r as logWebSelfId, s as readWebSelfId, t as WA_WEB_AUTH_DIR } from "./auth-store-eNVxoq_h.js";
9
+ import { $ as appendAssistantMessageToSessionTranscript, A as buildWorkspaceSkillCommandSpecs, B as buildPluginToolGroups, C as resolveBrowserConfig, Ct as resolveMainSessionKey, D as DEFAULT_UPLOAD_DIR, Dt as resolveConversationLabel, E as saveMediaBuffer, Et as listChannelDocks, F as resolveSandboxedMediaSource, G as resolveToolProfilePolicy, H as expandPolicyWithPluginGroups, I as ensureBrowserControlAuth, J as matchesAnyGlobPattern, K as stripPluginOnlyAllowlist, L as resolveBrowserControlAuth, Mt as isSilentReplyText, N as assertMediaNotDataUrl, O as resolvePathsWithinRoot, Ot as normalizeChatType, P as assertSandboxPath, Q as extractDeliveryInfo, R as resolveSandboxConfigForAgent, S as registerBrowserRoutes, T as getMediaDir, Tt as getChannelDock, U as expandToolGroups, V as collectExplicitAllowlist, W as normalizeToolName, X as resolveBootstrapMaxChars, _ as isTransientHttpError, _t as resolveSessionResetType, a as normalizeReasoningLevel, at as updateSessionStore, b as resolveSandboxRuntimeStatus, bt as resolveFreshSessionTotalTokens, c as normalizeVerboseLevel, dt as normalizeSessionDeliveryFields, g as isLikelyContextOverflowError, gt as resolveSessionResetPolicy, ht as resolveChannelResetConfig, i as normalizeElevatedLevel, it as updateLastRoute, j as buildWorkspaceSkillSnapshot, jt as SILENT_REPLY_TOKEN, k as getBridgeAuthForPort, kt as resolveGroupSessionKey, l as resolveResponseUsageMode, m as isContextOverflowError, mt as evaluateSessionFreshness, n as formatXHighModelHint, nt as readSessionUpdatedAt, o as normalizeThinkLevel, ot as updateSessionStoreEntry, p as isCompactionFailureError, pt as resolveSessionKey, q as compileGlobPatterns, r as listThinkingLevels, rt as recordSessionMetaFromInbound, s as normalizeUsageDisplay, t as formatThinkingLevels, tt as loadSessionStore, u as supportsXHighThinking, ut as normalizeDeliveryContext, v as sanitizeUserFacingText, vt as resolveThreadFlag, w as resolveProfile, wt as deriveSessionMetaPatch, x as createBrowserRouteContext, xt as canonicalizeMainSessionAlias, y as ensureSandboxWorkspaceForSession, yt as DEFAULT_RESET_TRIGGERS, z as applyOwnerOnlyToolPolicy } from "./pi-embedded-helpers-CvYnWzAn.js";
10
+ import { a as listProfilesForProvider, d as normalizeSecretInput, f as resolveAuthProfileDisplayLabel, i as resolveApiKeyForProfile, l as withFileLock$1, n as resolveAuthProfileOrder, o as ensureAuthProfileStore, r as isProfileInCooldown, s as resolveAuthStorePathForDisplay } from "./auth-profiles-BqrAPweI.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, p as DEFAULT_CONTEXT_TOKENS, r as buildModelAliasIndex, s as normalizeProviderId, t as buildAllowedModelSet, u as resolveDefaultModelForAgent } from "./model-selection-DPoLkg_t.js";
12
+ import { A as normalizeMessageChannel, C as normalizeChannelId$1, D as isInternalMessageChannel, F as GATEWAY_CLIENT_NAMES, M as resolveMessageChannel, N as GATEWAY_CLIENT_IDS, O as isMarkdownCapableMessageChannel, P as GATEWAY_CLIENT_MODES, S as listChannelPlugins, T as isDeliverableMessageChannel, a as resizeToJpeg, c as getFileExtension, d as kindFromMime, h as SsrFBlockedError, j as resolveGatewayMessageChannel, k as listDeliverableMessageChannels, l as imageMimeFromFormat, m as mediaKindFromMime, n as getImageMetadata, o as detectMime, s as extensionForMime, u as isAudioFileName, v as isBlockedHostname, w as INTERNAL_MESSAGE_CHANNEL, x as getChannelPlugin, y as isPrivateIpAddress } from "./image-ops-DJjERl7d.js";
13
+ 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-H_VHtPeY.js";
14
14
  import "./boolean-BsqeuxE6.js";
15
- import { i as resolveShellEnvFallbackTimeoutMs, n as getShellPathFromLoginShell } from "./shell-env-5vFwNQcz.js";
16
- import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath } from "./paths-OaazGgrn.js";
17
- import { $ as isVoiceCompatibleAudio, A as getShellConfig, B as maybeApplyTtsToPayload, C as setCliSessionId, D as formatUserTime, E as buildSystemPromptParams, F as getTtsMaxLength, G as resolveTtsPrefsPath, H as resolveTtsApiKey, I as getTtsProvider, J as setTtsEnabled, K as setLastTtsAttempt, L as isSummarizationEnabled, M as sanitizeBinaryOutput, N as buildTtsSystemPromptHint, O as resolveUserTimeFormat, P as getLastTtsAttempt, Q as textToSpeechTelephony, R as isTtsEnabled, S as getCliSessionId, T as buildAgentSystemPrompt, U as resolveTtsAutoMode, V as normalizeTtsAutoMode, W as resolveTtsConfig, X as setTtsProvider, Y as setTtsMaxLength, Z as textToSpeech, _ as runWithModelFallback, a as lookupContextTokens, b as modelSupportsVision, c as ambiguousTargetError, d as applyModelOverrideToSessionEntry, et as resolveBootstrapContextForRun, f as applyVerboseOverride, g as runWithImageModelFallback, h as getSkillsSnapshotVersion, i as normalizeUsage, j as killProcessTree, k as resolveUserTimezone, l as unknownTargetError, m as ensureSkillsWatcher, n as deriveSessionTotalTokens, nt as resolveSessionAuthProfileOverride, o as resolveOutboundTarget, p as getRemoteSkillEligibility, q as setSummarizationEnabled, r as hasNonzeroUsage, s as resolveSessionDeliveryTarget, t as derivePromptTokens, tt as clearSessionAuthProfileOverride, u as resolveSendPolicy, v as findModelInCatalog, w as runCliAgent, x as ensureAnimaModelsJson, y as loadModelCatalog, z as isTtsProviderConfigured } from "./usage-kmpmqBES.js";
18
- import { a as resolveAgentTimeoutMs, i as registerAgentRunContext, n as emitAgentEvent, o as AGENT_LANE_NESTED, s as AGENT_LANE_SUBAGENT, u as stripHeartbeatToken } from "./agent-events-BiKKV3wj.js";
15
+ import { i as resolveShellEnvFallbackTimeoutMs, n as getShellPathFromLoginShell } from "./shell-env-BBHdjHEl.js";
16
+ import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath } from "./paths-CmZenvlb.js";
17
+ import { $ as isVoiceCompatibleAudio, A as getShellConfig, B as maybeApplyTtsToPayload, C as setCliSessionId, D as formatUserTime, E as buildSystemPromptParams, F as getTtsMaxLength, G as resolveTtsPrefsPath, H as resolveTtsApiKey, I as getTtsProvider, J as setTtsEnabled, K as setLastTtsAttempt, L as isSummarizationEnabled, M as sanitizeBinaryOutput, N as buildTtsSystemPromptHint, O as resolveUserTimeFormat, P as getLastTtsAttempt, Q as textToSpeechTelephony, R as isTtsEnabled, S as getCliSessionId, T as buildAgentSystemPrompt, U as resolveTtsAutoMode, V as normalizeTtsAutoMode, W as resolveTtsConfig, X as setTtsProvider, Y as setTtsMaxLength, Z as textToSpeech, _ as runWithModelFallback, a as lookupContextTokens, b as modelSupportsVision, c as ambiguousTargetError, d as applyModelOverrideToSessionEntry, et as resolveBootstrapContextForRun, f as applyVerboseOverride, g as runWithImageModelFallback, h as getSkillsSnapshotVersion, i as normalizeUsage, j as killProcessTree, k as resolveUserTimezone, l as unknownTargetError, m as ensureSkillsWatcher, n as deriveSessionTotalTokens, nt as resolveSessionAuthProfileOverride, o as resolveOutboundTarget, p as getRemoteSkillEligibility, q as setSummarizationEnabled, r as hasNonzeroUsage, s as resolveSessionDeliveryTarget, t as derivePromptTokens, tt as clearSessionAuthProfileOverride, u as resolveSendPolicy, v as findModelInCatalog, w as runCliAgent, x as ensureAnimaModelsJson, y as loadModelCatalog, z as isTtsProviderConfigured } from "./usage-DSZ_juox.js";
18
+ import { a as resolveAgentTimeoutMs, i as registerAgentRunContext, n as emitAgentEvent, o as AGENT_LANE_NESTED, s as AGENT_LANE_SUBAGENT, u as stripHeartbeatToken } from "./agent-events-iR_gRjZA.js";
19
19
  import { i as triggerInternalHook, r as registerInternalHook, t as createInternalHookEvent } from "./internal-hooks-CmG29WRF.js";
20
- import { T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, _ as ensureChromeExtensionRelayServer } from "./chrome-C1KpzLwu.js";
21
- import "./frontmatter-DDYuWuK5.js";
20
+ import { T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, _ as ensureChromeExtensionRelayServer } from "./chrome-s7nTgmbn.js";
21
+ import "./frontmatter-BBFYH_d2.js";
22
22
  import { n as formatErrorMessage } from "./errors-DzK5Mvu0.js";
23
- import { t as sanitizeToolResultImages } from "./tool-images-2qKyjXUj.js";
24
- import { a as resolveEnvApiKey, i as resolveApiKeyForProvider, n as getCustomProviderApiKey, o as resolveModelAuthMode, r as requireApiKey, t as getApiKeyForModel } from "./model-auth-C4Jglp-Y.js";
25
- import { a as chunkText, c as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, o as chunkTextWithMode, r as chunkMarkdownText, s as resolveChunkMode, t as chunkByNewline } from "./chunk-Cguey_55.js";
26
- import { _ as parseReplyDirectives, b as initializeGlobalHookRunner, c as applyReplyThreading, d as shouldSuppressMessagingToolReplies, f as createReplyToModeFilterForChannel, g as normalizeTargetForProvider, h as normalizeChannelTargetInput, l as filterMessagingToolDuplicates, m as buildTargetResolverSignature, o as normalizeReplyPayloadsForDelivery, p as resolveReplyToMode, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as isRenderablePayload, v as throwIfAborted, y as getGlobalHookRunner } from "./deliver-Bri9Y1qG.js";
23
+ import { t as sanitizeToolResultImages } from "./tool-images-DBOSl4NL.js";
24
+ import { a as resolveEnvApiKey, i as resolveApiKeyForProvider, n as getCustomProviderApiKey, o as resolveModelAuthMode, r as requireApiKey, t as getApiKeyForModel } from "./model-auth-ChSwMwh7.js";
25
+ import { a as chunkText, c as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, o as chunkTextWithMode, r as chunkMarkdownText, s as resolveChunkMode, t as chunkByNewline } from "./chunk-lDG_8LI5.js";
26
+ import { _ as parseReplyDirectives, b as initializeGlobalHookRunner, c as applyReplyThreading, d as shouldSuppressMessagingToolReplies, f as createReplyToModeFilterForChannel, g as normalizeTargetForProvider, h as normalizeChannelTargetInput, l as filterMessagingToolDuplicates, m as buildTargetResolverSignature, o as normalizeReplyPayloadsForDelivery, p as resolveReplyToMode, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as isRenderablePayload, v as throwIfAborted, y as getGlobalHookRunner } from "./deliver-DyQtnfXd.js";
27
27
  import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-C0F42S0T.js";
28
- import { A as routeReply, B as getQueueSize, C as extractAssistantText, D as getFollowupQueueDepth, E as enqueueFollowupRun, F as resolveIdentityName, G as isDiagnosticsEnabled, H as logMessageQueued, I as resolveIdentityNamePrefix, J as takeDirectiveToken, K as extractQueueDirective, L as resolveMessagePrefix, M as extractShortModelName, N as resolveEffectiveMessagesConfig, O as scheduleFollowupDrain, P as resolveHumanDelayConfig, R as clearSessionQueues, S as stripToolMessages, T as resolveQueueSettings, U as logSessionStateChange, V as logMessageProcessed, W as emitDiagnosticEvent, X as randomIdempotencyKey, Y as callGateway, Z as SESSION_LABEL_MAX_LENGTH, _ as resolveInternalSessionKey, a as markSubagentRunTerminated, b as sanitizeTextContent, d as runAgentStep, f as classifySessionKind, g as resolveDisplaySessionKey, h as extractAssistantText$1, i as markSubagentRunForSteerRestart, j as normalizeReplyPayload, k as isRoutableChannel, l as buildSubagentSystemPrompt, m as deriveChannel, n as countActiveRunsForSession, o as registerSubagentRun, p as createAgentToAgentPolicy, q as skipDirectiveArgPrefix, r as listSubagentRunsForRequester, s as replaceSubagentRunAfterSteer, t as clearSubagentRunSteerRestart, u as readLatestAssistantReply, v as resolveMainSessionAlias, w as getSubagentDepthFromSessionStore, x as shouldResolveSessionIdInput, y as resolveSessionReference, z as clearCommandLane } from "./subagent-registry-xUCd2ZX9.js";
29
- import { _ as resolveMarkdownTableMode, a as loadWebMedia, c as readResponseWithLimit, d as fetchWithTimeout, f as getActiveWebListener, g as convertMarkdownTables, h as markdownToWhatsApp, i as getDefaultLocalRoots, l as fetchWithSsrFGuard, m as normalizePollInput, n as sendMessageWhatsApp, o as MediaFetchError, p as setActiveWebListener, r as sendReactionWhatsApp, s as fetchRemoteMedia, u as bindAbortRelay } from "./outbound-DdFghG1N.js";
30
- import { a as readNumberParam, c as readStringParam, i as jsonResult, n as imageResult, r as imageResultFromFile, s as readStringArrayParam } from "./common-DgcMt-pi.js";
31
- import { n as resolveMemorySearchConfig } from "./manager-CHN3-66K.js";
32
- import { d as listMemoryFiles, f as normalizeExtraMemoryPaths } from "./sqlite-B3u2TqVF.js";
33
- import "./session-CzBccNiw.js";
34
- import "./semantic-BTp-RtM8.js";
35
- import "./soul-D4rF0iXu.js";
36
- import { a as waitForWaConnection, c as getContentType, d as DisconnectReason, i as getStatusCode, l as normalizeMessageContent, n as createWaSocket, o as downloadMediaMessage, r as formatError, s as extractMessageContent, t as resolveWhatsAppAccount, u as isJidGroup } from "./accounts-4HFzweNO.js";
37
- import { t as loginWeb } from "./login-DP5hIYxG.js";
28
+ import { A as routeReply, B as getQueueSize, C as extractAssistantText, D as getFollowupQueueDepth, E as enqueueFollowupRun, F as resolveIdentityName, G as isDiagnosticsEnabled, H as logMessageQueued, I as resolveIdentityNamePrefix, J as takeDirectiveToken, K as extractQueueDirective, L as resolveMessagePrefix, M as extractShortModelName, N as resolveEffectiveMessagesConfig, O as scheduleFollowupDrain, P as resolveHumanDelayConfig, R as clearSessionQueues, S as stripToolMessages, T as resolveQueueSettings, U as logSessionStateChange, V as logMessageProcessed, W as emitDiagnosticEvent, X as randomIdempotencyKey, Y as callGateway, Z as SESSION_LABEL_MAX_LENGTH, _ as resolveInternalSessionKey, a as markSubagentRunTerminated, b as sanitizeTextContent, d as runAgentStep, f as classifySessionKind, g as resolveDisplaySessionKey, h as extractAssistantText$1, i as markSubagentRunForSteerRestart, j as normalizeReplyPayload, k as isRoutableChannel, l as buildSubagentSystemPrompt, m as deriveChannel, n as countActiveRunsForSession, o as registerSubagentRun, p as createAgentToAgentPolicy, q as skipDirectiveArgPrefix, r as listSubagentRunsForRequester, s as replaceSubagentRunAfterSteer, t as clearSubagentRunSteerRestart, u as readLatestAssistantReply, v as resolveMainSessionAlias, w as getSubagentDepthFromSessionStore, x as shouldResolveSessionIdInput, y as resolveSessionReference, z as clearCommandLane } from "./subagent-registry-DjB3VS5s.js";
29
+ import { _ as resolveMarkdownTableMode, a as loadWebMedia, c as readResponseWithLimit, d as fetchWithTimeout, f as getActiveWebListener, g as convertMarkdownTables, h as markdownToWhatsApp, i as getDefaultLocalRoots, l as fetchWithSsrFGuard, m as normalizePollInput, n as sendMessageWhatsApp, o as MediaFetchError, p as setActiveWebListener, r as sendReactionWhatsApp, s as fetchRemoteMedia, u as bindAbortRelay } from "./outbound-DK71dddk.js";
30
+ import { a as readNumberParam, c as readStringParam, i as jsonResult, n as imageResult, r as imageResultFromFile, s as readStringArrayParam } from "./common-DbouukNi.js";
31
+ import { n as resolveMemorySearchConfig } from "./manager-BlXVqzLP.js";
32
+ import { d as listMemoryFiles, f as normalizeExtraMemoryPaths } from "./sqlite-B-dYyac7.js";
33
+ import "./session-DTRcP2Sj.js";
34
+ import "./semantic-BcioSN1d.js";
35
+ import "./soul-CXGTzaKZ.js";
36
+ import { a as waitForWaConnection, c as getContentType, d as DisconnectReason, i as getStatusCode, l as normalizeMessageContent, n as createWaSocket, o as downloadMediaMessage, r as formatError, s as extractMessageContent, t as resolveWhatsAppAccount, u as isJidGroup } from "./accounts-ZMhj636e.js";
37
+ import { t as loginWeb } from "./login-CdRss5_H.js";
38
38
  import { createRequire } from "node:module";
39
- import * as fs$2 from "node:fs/promises";
39
+ import * as fs$1 from "node:fs/promises";
40
40
  import fs from "node:fs/promises";
41
41
  import * as os$1 from "node:os";
42
42
  import os, { homedir } from "node:os";
43
43
  import * as path$1 from "node:path";
44
44
  import path from "node:path";
45
- import fs$1, { constants, existsSync, statSync } from "node:fs";
45
+ import fsSync, { constants, existsSync, statSync } from "node:fs";
46
46
  import { spawn, spawnSync } from "node:child_process";
47
47
  import { fileURLToPath } from "node:url";
48
48
  import crypto, { randomUUID } from "node:crypto";
@@ -3402,7 +3402,7 @@ async function createModelSelectionState(params) {
3402
3402
  }
3403
3403
  }
3404
3404
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
3405
- const { ensureAuthProfileStore } = await import("./auth-profiles-xk_1uopf.js").then((n) => n.t);
3405
+ const { ensureAuthProfileStore } = await import("./auth-profiles-BqrAPweI.js").then((n) => n.t);
3406
3406
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
3407
3407
  const providerKey = normalizeProviderId(provider);
3408
3408
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -5199,8 +5199,8 @@ function listSkillCommandsForAgents(params) {
5199
5199
  const visitedDirs = /* @__PURE__ */ new Set();
5200
5200
  for (const agentId of agentIds) {
5201
5201
  const workspaceDir = resolveAgentWorkspaceDir(params.cfg, agentId);
5202
- if (!fs$1.existsSync(workspaceDir)) continue;
5203
- const canonicalDir = fs$1.realpathSync(workspaceDir);
5202
+ if (!fsSync.existsSync(workspaceDir)) continue;
5203
+ const canonicalDir = fsSync.realpathSync(workspaceDir);
5204
5204
  if (visitedDirs.has(canonicalDir)) continue;
5205
5205
  visitedDirs.add(canonicalDir);
5206
5206
  const commands = buildWorkspaceSkillCommandSpecs(workspaceDir, {
@@ -5411,7 +5411,7 @@ function resolveAllowFromPath(channel, env = process.env) {
5411
5411
  }
5412
5412
  async function readJsonFile(filePath, fallback) {
5413
5413
  try {
5414
- const parsed = safeParseJson(await fs$1.promises.readFile(filePath, "utf-8"));
5414
+ const parsed = safeParseJson(await fsSync.promises.readFile(filePath, "utf-8"));
5415
5415
  if (parsed == null) return {
5416
5416
  value: fallback,
5417
5417
  exists: true
@@ -5433,18 +5433,18 @@ async function readJsonFile(filePath, fallback) {
5433
5433
  }
5434
5434
  async function writeJsonFile(filePath, value) {
5435
5435
  const dir = path.dirname(filePath);
5436
- await fs$1.promises.mkdir(dir, {
5436
+ await fsSync.promises.mkdir(dir, {
5437
5437
  recursive: true,
5438
5438
  mode: 448
5439
5439
  });
5440
5440
  const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
5441
- await fs$1.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, { encoding: "utf-8" });
5442
- await fs$1.promises.chmod(tmp, 384);
5443
- await fs$1.promises.rename(tmp, filePath);
5441
+ await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, { encoding: "utf-8" });
5442
+ await fsSync.promises.chmod(tmp, 384);
5443
+ await fsSync.promises.rename(tmp, filePath);
5444
5444
  }
5445
5445
  async function ensureJsonFile(filePath, fallback) {
5446
5446
  try {
5447
- await fs$1.promises.access(filePath);
5447
+ await fsSync.promises.access(filePath);
5448
5448
  } catch {
5449
5449
  await writeJsonFile(filePath, fallback);
5450
5450
  }
@@ -6558,8 +6558,8 @@ function expandHome$1(value) {
6558
6558
  }
6559
6559
  function isExecutableFile(filePath) {
6560
6560
  try {
6561
- if (!fs$1.statSync(filePath).isFile()) return false;
6562
- if (process.platform !== "win32") fs$1.accessSync(filePath, fs$1.constants.X_OK);
6561
+ if (!fsSync.statSync(filePath).isFile()) return false;
6562
+ if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
6563
6563
  return true;
6564
6564
  } catch {
6565
6565
  return false;
@@ -6597,7 +6597,7 @@ function normalizeMatchTarget(value) {
6597
6597
  }
6598
6598
  function tryRealpath(value) {
6599
6599
  try {
6600
- return fs$1.realpathSync(value);
6600
+ return fsSync.realpathSync(value);
6601
6601
  } catch {
6602
6602
  return null;
6603
6603
  }
@@ -7235,7 +7235,7 @@ function isPathLikeToken(value) {
7235
7235
  }
7236
7236
  function defaultFileExists(filePath) {
7237
7237
  try {
7238
- return fs$1.existsSync(filePath);
7238
+ return fsSync.existsSync(filePath);
7239
7239
  } catch {
7240
7240
  return false;
7241
7241
  }
@@ -7479,7 +7479,7 @@ function mergeLegacyAgent(current, legacy) {
7479
7479
  }
7480
7480
  function ensureDir$1(filePath) {
7481
7481
  const dir = path.dirname(filePath);
7482
- fs$1.mkdirSync(dir, { recursive: true });
7482
+ fsSync.mkdirSync(dir, { recursive: true });
7483
7483
  }
7484
7484
  function coerceAllowlistEntries(allowlist) {
7485
7485
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -7549,11 +7549,11 @@ function generateToken() {
7549
7549
  function loadExecApprovals() {
7550
7550
  const filePath = resolveExecApprovalsPath();
7551
7551
  try {
7552
- if (!fs$1.existsSync(filePath)) return normalizeExecApprovals({
7552
+ if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
7553
7553
  version: 1,
7554
7554
  agents: {}
7555
7555
  });
7556
- const raw = fs$1.readFileSync(filePath, "utf8");
7556
+ const raw = fsSync.readFileSync(filePath, "utf8");
7557
7557
  const parsed = JSON.parse(raw);
7558
7558
  if (parsed?.version !== 1) return normalizeExecApprovals({
7559
7559
  version: 1,
@@ -7570,9 +7570,9 @@ function loadExecApprovals() {
7570
7570
  function saveExecApprovals(file) {
7571
7571
  const filePath = resolveExecApprovalsPath();
7572
7572
  ensureDir$1(filePath);
7573
- fs$1.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
7573
+ fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
7574
7574
  try {
7575
- fs$1.chmodSync(filePath, 384);
7575
+ fsSync.chmodSync(filePath, 384);
7576
7576
  } catch {}
7577
7577
  }
7578
7578
  function ensureExecApprovals() {
@@ -10134,10 +10134,10 @@ const resolveGitHead = (startDir) => {
10134
10134
  for (let i = 0; i < 12; i += 1) {
10135
10135
  const gitPath = path.join(current, ".git");
10136
10136
  try {
10137
- const stat = fs$1.statSync(gitPath);
10137
+ const stat = fsSync.statSync(gitPath);
10138
10138
  if (stat.isDirectory()) return path.join(gitPath, "HEAD");
10139
10139
  if (stat.isFile()) {
10140
- const match = fs$1.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
10140
+ const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
10141
10141
  if (match?.[1]) {
10142
10142
  const resolved = path.resolve(current, match[1].trim());
10143
10143
  return path.join(resolved, "HEAD");
@@ -10195,7 +10195,7 @@ const resolveCommitHash = (options = {}) => {
10195
10195
  cachedCommit = null;
10196
10196
  return cachedCommit;
10197
10197
  }
10198
- const head = fs$1.readFileSync(headPath, "utf-8").trim();
10198
+ const head = fsSync.readFileSync(headPath, "utf-8").trim();
10199
10199
  if (!head) {
10200
10200
  cachedCommit = null;
10201
10201
  return cachedCommit;
@@ -10203,7 +10203,7 @@ const resolveCommitHash = (options = {}) => {
10203
10203
  if (head.startsWith("ref:")) {
10204
10204
  const ref = head.replace(/^ref:\s*/i, "").trim();
10205
10205
  const refPath = path.resolve(path.dirname(headPath), ref);
10206
- cachedCommit = formatCommit(fs$1.readFileSync(refPath, "utf-8").trim());
10206
+ cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
10207
10207
  return cachedCommit;
10208
10208
  }
10209
10209
  cachedCommit = formatCommit(head);
@@ -10488,9 +10488,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
10488
10488
  } catch {
10489
10489
  return;
10490
10490
  }
10491
- if (!fs$1.existsSync(logPath)) return;
10491
+ if (!fsSync.existsSync(logPath)) return;
10492
10492
  try {
10493
- const lines = fs$1.readFileSync(logPath, "utf-8").split(/\n+/);
10493
+ const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
10494
10494
  let input = 0;
10495
10495
  let output = 0;
10496
10496
  let promptTokens = 0;
@@ -12049,7 +12049,7 @@ async function getMemorySearchManager(params) {
12049
12049
  if (cached) return { manager: cached };
12050
12050
  }
12051
12051
  try {
12052
- const { QmdMemoryManager } = await import("./qmd-manager-lcdr9Faq.js");
12052
+ const { QmdMemoryManager } = await import("./qmd-manager-D_lZFetA.js");
12053
12053
  const primary = await QmdMemoryManager.create({
12054
12054
  cfg: params.cfg,
12055
12055
  agentId: params.agentId,
@@ -12061,7 +12061,7 @@ async function getMemorySearchManager(params) {
12061
12061
  const wrapper = new FallbackMemoryManager({
12062
12062
  primary,
12063
12063
  fallbackFactory: async () => {
12064
- const { MemoryIndexManager } = await import("./manager-CHN3-66K.js").then((n) => n.t);
12064
+ const { MemoryIndexManager } = await import("./manager-BlXVqzLP.js").then((n) => n.t);
12065
12065
  return await MemoryIndexManager.get(params);
12066
12066
  }
12067
12067
  }, () => QMD_MANAGER_CACHE.delete(cacheKey));
@@ -12074,7 +12074,7 @@ async function getMemorySearchManager(params) {
12074
12074
  }
12075
12075
  }
12076
12076
  try {
12077
- const { MemoryIndexManager } = await import("./manager-CHN3-66K.js").then((n) => n.t);
12077
+ const { MemoryIndexManager } = await import("./manager-BlXVqzLP.js").then((n) => n.t);
12078
12078
  return { manager: await MemoryIndexManager.get(params) };
12079
12079
  } catch (err) {
12080
12080
  return {
@@ -13434,7 +13434,7 @@ function createWhatsAppLoginTool() {
13434
13434
  force: Type.Optional(Type.Boolean())
13435
13435
  }),
13436
13436
  execute: async (_toolCallId, args) => {
13437
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-DOt_1aAq.js");
13437
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-DoNanonP.js");
13438
13438
  if ((args?.action ?? "start") === "wait") {
13439
13439
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
13440
13440
  return {
@@ -13686,7 +13686,7 @@ function formatExtraPaths(workspaceDir, extraPaths) {
13686
13686
  }
13687
13687
  async function checkReadableFile(pathname) {
13688
13688
  try {
13689
- await fs.access(pathname, fs$1.constants.R_OK);
13689
+ await fs.access(pathname, fsSync.constants.R_OK);
13690
13690
  return { exists: true };
13691
13691
  } catch (err) {
13692
13692
  const code = err.code;
@@ -13745,7 +13745,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
13745
13745
  }
13746
13746
  let dirReadable = null;
13747
13747
  try {
13748
- await fs.access(memoryDir, fs$1.constants.R_OK);
13748
+ await fs.access(memoryDir, fsSync.constants.R_OK);
13749
13749
  dirReadable = true;
13750
13750
  } catch (err) {
13751
13751
  const code = err.code;
@@ -14606,23 +14606,23 @@ let webLoginQrPromise = null;
14606
14606
  let webChannelPromise = null;
14607
14607
  let whatsappActionsPromise = null;
14608
14608
  function loadWebOutbound() {
14609
- webOutboundPromise ??= import("./outbound-DdFghG1N.js").then((n) => n.t);
14609
+ webOutboundPromise ??= import("./outbound-DK71dddk.js").then((n) => n.t);
14610
14610
  return webOutboundPromise;
14611
14611
  }
14612
14612
  function loadWebLogin() {
14613
- webLoginPromise ??= import("./login-DP5hIYxG.js").then((n) => n.n);
14613
+ webLoginPromise ??= import("./login-CdRss5_H.js").then((n) => n.n);
14614
14614
  return webLoginPromise;
14615
14615
  }
14616
14616
  function loadWebLoginQr() {
14617
- webLoginQrPromise ??= import("./login-qr-DOt_1aAq.js");
14617
+ webLoginQrPromise ??= import("./login-qr-DoNanonP.js");
14618
14618
  return webLoginQrPromise;
14619
14619
  }
14620
14620
  function loadWebChannel() {
14621
- webChannelPromise ??= import("./web-CTS-vEIT.js");
14621
+ webChannelPromise ??= import("./web-DY2TrPoD.js");
14622
14622
  return webChannelPromise;
14623
14623
  }
14624
14624
  function loadWhatsAppActions() {
14625
- whatsappActionsPromise ??= import("./whatsapp-actions-qDftmVCc.js");
14625
+ whatsappActionsPromise ??= import("./whatsapp-actions-B_fglZZt.js");
14626
14626
  return whatsappActionsPromise;
14627
14627
  }
14628
14628
  function createPluginRuntime() {
@@ -14765,7 +14765,7 @@ const resolvePluginSdkAliasFile = (params) => {
14765
14765
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
14766
14766
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
14767
14767
  const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
14768
- for (const candidate of orderedCandidates) if (fs$1.existsSync(candidate)) return candidate;
14768
+ for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
14769
14769
  const parent = path.dirname(cursor);
14770
14770
  if (parent === cursor) break;
14771
14771
  cursor = parent;
@@ -17256,7 +17256,7 @@ async function writeUrlToFile(filePath, url) {
17256
17256
  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}`);
17257
17257
  const body = res.body;
17258
17258
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
17259
- const fileHandle = await fs$2.open(filePath, "w");
17259
+ const fileHandle = await fs$1.open(filePath, "w");
17260
17260
  let bytes = 0;
17261
17261
  let thrown;
17262
17262
  try {
@@ -17275,7 +17275,7 @@ async function writeUrlToFile(filePath, url) {
17275
17275
  await fileHandle.close();
17276
17276
  }
17277
17277
  if (thrown) {
17278
- await fs$2.unlink(filePath).catch(() => {});
17278
+ await fs$1.unlink(filePath).catch(() => {});
17279
17279
  throw thrown;
17280
17280
  }
17281
17281
  return {
@@ -17285,7 +17285,7 @@ async function writeUrlToFile(filePath, url) {
17285
17285
  }
17286
17286
  async function writeBase64ToFile(filePath, base64) {
17287
17287
  const buf = Buffer.from(base64, "base64");
17288
- await fs$2.writeFile(filePath, buf);
17288
+ await fs$1.writeFile(filePath, buf);
17289
17289
  return {
17290
17290
  path: filePath,
17291
17291
  bytes: buf.length
@@ -21776,7 +21776,7 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
21776
21776
  }
21777
21777
  function archiveFileOnDisk(filePath, reason) {
21778
21778
  const archived = `${filePath}.${reason}.${(/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-")}`;
21779
- fs$1.renameSync(filePath, archived);
21779
+ fsSync.renameSync(filePath, archived);
21780
21780
  return archived;
21781
21781
  }
21782
21782
  /**
@@ -21786,7 +21786,7 @@ function archiveFileOnDisk(filePath, reason) {
21786
21786
  function archiveSessionTranscripts(opts) {
21787
21787
  const archived = [];
21788
21788
  for (const candidate of resolveSessionTranscriptCandidates(opts.sessionId, opts.storePath, opts.sessionFile, opts.agentId)) {
21789
- if (!fs$1.existsSync(candidate)) continue;
21789
+ if (!fsSync.existsSync(candidate)) continue;
21790
21790
  try {
21791
21791
  archived.push(archiveFileOnDisk(candidate, opts.reason));
21792
21792
  } catch {}
@@ -21833,7 +21833,7 @@ function listExistingAgentIdsFromDisk() {
21833
21833
  const root = resolveStateDir();
21834
21834
  const agentsDir = path.join(root, "agents");
21835
21835
  try {
21836
- return fs$1.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
21836
+ return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
21837
21837
  } catch {
21838
21838
  return [];
21839
21839
  }
@@ -22078,8 +22078,8 @@ function resolveZaiApiKey() {
22078
22078
  }
22079
22079
  try {
22080
22080
  const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
22081
- if (!fs$1.existsSync(authPath)) return;
22082
- const data = JSON.parse(fs$1.readFileSync(authPath, "utf-8"));
22081
+ if (!fsSync.existsSync(authPath)) return;
22082
+ const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
22083
22083
  return data["z-ai"]?.access || data.zai?.access;
22084
22084
  } catch {
22085
22085
  return;
@@ -28368,7 +28368,7 @@ const applyCostTotal = (totals, costTotal) => {
28368
28368
  totals.totalCost += costTotal;
28369
28369
  };
28370
28370
  async function scanTranscriptFile(params) {
28371
- const fileStream = fs$1.createReadStream(params.filePath, { encoding: "utf-8" });
28371
+ const fileStream = fsSync.createReadStream(params.filePath, { encoding: "utf-8" });
28372
28372
  const rl = readline.createInterface({
28373
28373
  input: fileStream,
28374
28374
  crlfDelay: Infinity
@@ -28428,10 +28428,10 @@ async function loadCostUsageSummary(params) {
28428
28428
  const dailyMap = /* @__PURE__ */ new Map();
28429
28429
  const totals = emptyTotals();
28430
28430
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
28431
- const entries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
28431
+ const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
28432
28432
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
28433
28433
  const filePath = path.join(sessionsDir, entry.name);
28434
- const stats = await fs$1.promises.stat(filePath).catch(() => null);
28434
+ const stats = await fsSync.promises.stat(filePath).catch(() => null);
28435
28435
  if (!stats) return null;
28436
28436
  if (stats.mtimeMs < sinceTime) return null;
28437
28437
  return filePath;
@@ -28464,7 +28464,7 @@ async function loadCostUsageSummary(params) {
28464
28464
  }
28465
28465
  async function loadSessionCostSummary(params) {
28466
28466
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
28467
- if (!sessionFile || !fs$1.existsSync(sessionFile)) return null;
28467
+ if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
28468
28468
  const totals = emptyTotals();
28469
28469
  let firstActivity;
28470
28470
  let lastActivity;
@@ -31434,7 +31434,7 @@ async function runAgentTurnWithFallback(params) {
31434
31434
  if (corruptedSessionId) {
31435
31435
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
31436
31436
  try {
31437
- fs$1.unlinkSync(transcriptPath);
31437
+ fsSync.unlinkSync(transcriptPath);
31438
31438
  } catch {}
31439
31439
  }
31440
31440
  delete params.activeSessionStore[sessionKey];
@@ -32235,7 +32235,7 @@ async function runReplyAgent(params) {
32235
32235
  if (resolved) transcriptCandidates.add(resolved);
32236
32236
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
32237
32237
  for (const candidate of transcriptCandidates) try {
32238
- fs$1.unlinkSync(candidate);
32238
+ fsSync.unlinkSync(candidate);
32239
32239
  } catch {}
32240
32240
  }
32241
32241
  return true;
@@ -33001,7 +33001,7 @@ async function deliverSessionMaintenanceWarning(params) {
33001
33001
  return;
33002
33002
  }
33003
33003
  try {
33004
- const { deliverOutboundPayloads } = await import("./deliver-Bri9Y1qG.js").then((n) => n.n);
33004
+ const { deliverOutboundPayloads } = await import("./deliver-DyQtnfXd.js").then((n) => n.n);
33005
33005
  await deliverOutboundPayloads({
33006
33006
  cfg: params.cfg,
33007
33007
  channel,
@@ -33023,7 +33023,7 @@ function forkSessionFromParent(params) {
33023
33023
  agentId: params.agentId,
33024
33024
  sessionsDir: params.sessionsDir
33025
33025
  });
33026
- if (!parentSessionFile || !fs$1.existsSync(parentSessionFile)) return null;
33026
+ if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
33027
33027
  try {
33028
33028
  const manager = SessionManager.open(parentSessionFile);
33029
33029
  const leafId = manager.getLeafId();
@@ -33047,7 +33047,7 @@ function forkSessionFromParent(params) {
33047
33047
  cwd: manager.getCwd(),
33048
33048
  parentSession: parentSessionFile
33049
33049
  };
33050
- fs$1.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
33050
+ fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
33051
33051
  return {
33052
33052
  sessionId,
33053
33053
  sessionFile
@@ -1,17 +1,17 @@
1
- import "./paths-B-AkG5FD.js";
2
- import "./workspace-CZlo4alz.js";
3
- import "./subsystem-BlEuMJjX.js";
4
- import "./exec-DJTRaYS6.js";
5
- import "./agent-scope-BXuH9s05.js";
6
- import "./model-selection-BsVvfxCt.js";
7
- import "./image-ops-ZMEg1-kE.js";
8
- import "./config-CrQw7iqE.js";
1
+ import "./paths-D2eokayo.js";
2
+ import "./workspace-xzxJwPTB.js";
3
+ import "./subsystem-CJTCKTwb.js";
4
+ import "./exec-CK8CHr7j.js";
5
+ import "./agent-scope-DWKQJUUZ.js";
6
+ import "./model-selection-DPoLkg_t.js";
7
+ import "./image-ops-DJjERl7d.js";
8
+ import "./config-H_VHtPeY.js";
9
9
  import "./boolean-BsqeuxE6.js";
10
- import "./shell-env-5vFwNQcz.js";
11
- import "./tool-images-2qKyjXUj.js";
12
- import "./chunk-Cguey_55.js";
13
- import { r as sendReactionWhatsApp } from "./outbound-DdFghG1N.js";
14
- import { c as readStringParam, i as jsonResult, o as readReactionParams, t as createActionGate } from "./common-DgcMt-pi.js";
10
+ import "./shell-env-BBHdjHEl.js";
11
+ import "./tool-images-DBOSl4NL.js";
12
+ import "./chunk-lDG_8LI5.js";
13
+ import { r as sendReactionWhatsApp } from "./outbound-DK71dddk.js";
14
+ import { c as readStringParam, i as jsonResult, o as readReactionParams, t as createActionGate } from "./common-DbouukNi.js";
15
15
 
16
16
  //#region src/agents/tools/whatsapp-actions.ts
17
17
  async function handleWhatsAppAction(params, cfg) {
@@ -1,9 +1,9 @@
1
- import { u as resolveRequiredHomeDir } from "./paths-B-AkG5FD.js";
2
- import { t as runCommandWithTimeout, w as resolveUserPath, x as pathExists } from "./exec-DJTRaYS6.js";
1
+ import { u as resolveRequiredHomeDir } from "./paths-D2eokayo.js";
2
+ import { t as runCommandWithTimeout, w as resolveUserPath, x as pathExists } from "./exec-CK8CHr7j.js";
3
3
  import fs from "node:fs/promises";
4
4
  import os from "node:os";
5
5
  import path from "node:path";
6
- import fs$1 from "node:fs";
6
+ import fsSync from "node:fs";
7
7
  import { fileURLToPath } from "node:url";
8
8
 
9
9
  //#region src/sessions/session-key-utils.ts
@@ -195,7 +195,7 @@ async function readPackageName(dir) {
195
195
  }
196
196
  function readPackageNameSync(dir) {
197
197
  try {
198
- const raw = fs$1.readFileSync(path.join(dir, "package.json"), "utf-8");
198
+ const raw = fsSync.readFileSync(path.join(dir, "package.json"), "utf-8");
199
199
  const parsed = JSON.parse(raw);
200
200
  return typeof parsed.name === "string" ? parsed.name : null;
201
201
  } catch {
@@ -228,7 +228,7 @@ function candidateDirsFromArgv1(argv1) {
228
228
  const normalized = path.resolve(argv1);
229
229
  const candidates = [path.dirname(normalized)];
230
230
  try {
231
- const resolved = fs$1.realpathSync(normalized);
231
+ const resolved = fsSync.realpathSync(normalized);
232
232
  if (resolved !== normalized) candidates.push(path.dirname(resolved));
233
233
  } catch {}
234
234
  const parts = normalized.split(path.sep);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noxsoft/anima",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "AI life system — persistent identity, sovereign memory, heartbeat-driven existence — by NoxSoft",
5
5
  "keywords": [
6
6
  "agent",
@@ -156,6 +156,7 @@
156
156
  "pdfjs-dist": "^5.4.624",
157
157
  "playwright-core": "1.58.2",
158
158
  "proper-lockfile": "^4.1.2",
159
+ "qrcode-terminal": "^0.12.0",
159
160
  "sharp": "^0.34.5",
160
161
  "sqlite-vec": "0.1.7-alpha.2",
161
162
  "tar": "7.5.7",
@@ -1,25 +0,0 @@
1
- import path from "node:path";
2
- import fs from "node:fs";
3
-
4
- //#region src/infra/json-file.ts
5
- function loadJsonFile(pathname) {
6
- try {
7
- if (!fs.existsSync(pathname)) return;
8
- const raw = fs.readFileSync(pathname, "utf8");
9
- return JSON.parse(raw);
10
- } catch {
11
- return;
12
- }
13
- }
14
- function saveJsonFile(pathname, data) {
15
- const dir = path.dirname(pathname);
16
- if (!fs.existsSync(dir)) fs.mkdirSync(dir, {
17
- recursive: true,
18
- mode: 448
19
- });
20
- fs.writeFileSync(pathname, `${JSON.stringify(data, null, 2)}\n`, "utf8");
21
- fs.chmodSync(pathname, 384);
22
- }
23
-
24
- //#endregion
25
- export { saveJsonFile as n, loadJsonFile as t };
File without changes