@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,8 +1,8 @@
1
- import "./paths-B-AkG5FD.js";
2
- import "./workspace-CZlo4alz.js";
3
- import "./subsystem-BlEuMJjX.js";
4
- import "./exec-DJTRaYS6.js";
5
- import { c as resolveDefaultAgentId, r as resolveAgentDir, s as resolveAgentWorkspaceDir } from "./agent-scope-BXuH9s05.js";
1
+ import "./paths-D2eokayo.js";
2
+ import "./workspace-xzxJwPTB.js";
3
+ import "./subsystem-CJTCKTwb.js";
4
+ import "./exec-CK8CHr7j.js";
5
+ import { c as resolveDefaultAgentId, r as resolveAgentDir, s as resolveAgentWorkspaceDir } from "./agent-scope-DWKQJUUZ.js";
6
6
  import { s as runEmbeddedPiAgent } from "./pi-embedded-CVojjlMb.js";
7
7
  import fs from "node:fs/promises";
8
8
  import os from "node:os";
@@ -1,10 +1,10 @@
1
1
  import { n as __exportAll } from "./chunk-BXK9XSlF.js";
2
- import { S as success, _ as info, g as danger, n as defaultRuntime } from "./subsystem-BlEuMJjX.js";
3
- import { s as logInfo } from "./exec-DJTRaYS6.js";
2
+ import { S as success, _ as info, g as danger, n as defaultRuntime } from "./subsystem-CJTCKTwb.js";
3
+ import { s as logInfo } from "./exec-CK8CHr7j.js";
4
4
  import { t as formatCliCommand } from "./command-format-CZk1W3UP.js";
5
- import { i as logoutWeb } from "./auth-store-Bis9WSLR.js";
6
- import { n as loadConfig } from "./config-CrQw7iqE.js";
7
- import { a as waitForWaConnection, d as DisconnectReason, n as createWaSocket, r as formatError, t as resolveWhatsAppAccount } from "./accounts-4HFzweNO.js";
5
+ import { i as logoutWeb } from "./auth-store-eNVxoq_h.js";
6
+ import { n as loadConfig } from "./config-H_VHtPeY.js";
7
+ import { a as waitForWaConnection, d as DisconnectReason, n as createWaSocket, r as formatError, t as resolveWhatsAppAccount } from "./accounts-ZMhj636e.js";
8
8
 
9
9
  //#region src/web/login.ts
10
10
  var login_exports = /* @__PURE__ */ __exportAll({ loginWeb: () => loginWeb });
@@ -1,14 +1,14 @@
1
- import "./paths-B-AkG5FD.js";
2
- import "./workspace-CZlo4alz.js";
3
- import { S as success, _ as info, g as danger, n as defaultRuntime } from "./subsystem-BlEuMJjX.js";
4
- import { s as logInfo } from "./exec-DJTRaYS6.js";
5
- import "./agent-scope-BXuH9s05.js";
6
- import { d as webAuthExists, i as logoutWeb, s as readWebSelfId } from "./auth-store-Bis9WSLR.js";
7
- import "./model-selection-BsVvfxCt.js";
8
- import { n as loadConfig } from "./config-CrQw7iqE.js";
1
+ import "./paths-D2eokayo.js";
2
+ import "./workspace-xzxJwPTB.js";
3
+ import { S as success, _ as info, g as danger, n as defaultRuntime } from "./subsystem-CJTCKTwb.js";
4
+ import { s as logInfo } from "./exec-CK8CHr7j.js";
5
+ import "./agent-scope-DWKQJUUZ.js";
6
+ import { d as webAuthExists, i as logoutWeb, s as readWebSelfId } from "./auth-store-eNVxoq_h.js";
7
+ import "./model-selection-DPoLkg_t.js";
8
+ import { n as loadConfig } from "./config-H_VHtPeY.js";
9
9
  import "./boolean-BsqeuxE6.js";
10
- import "./shell-env-5vFwNQcz.js";
11
- import { a as waitForWaConnection, d as DisconnectReason, i as getStatusCode, n as createWaSocket, r as formatError, t as resolveWhatsAppAccount } from "./accounts-4HFzweNO.js";
10
+ import "./shell-env-BBHdjHEl.js";
11
+ import { a as waitForWaConnection, d as DisconnectReason, i as getStatusCode, n as createWaSocket, r as formatError, t as resolveWhatsAppAccount } from "./accounts-ZMhj636e.js";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import QRCodeModule from "qrcode-terminal/vendor/QRCode/index.js";
14
14
  import QRErrorCorrectLevelModule from "qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js";
@@ -1,18 +1,18 @@
1
1
  import { n as __exportAll } from "./chunk-BXK9XSlF.js";
2
- import { s as resolveStateDir } from "./paths-B-AkG5FD.js";
3
- import { t as createSubsystemLogger } from "./subsystem-BlEuMJjX.js";
4
- import { O as sleep, d as clampInt, f as clampNumber$1, j as truncateUtf16Safe, w as resolveUserPath } from "./exec-DJTRaYS6.js";
5
- import { n as resolveAgentConfig, r as resolveAgentDir$1, s as resolveAgentWorkspaceDir } from "./agent-scope-BXuH9s05.js";
6
- import { s as isTruthyEnvValue } from "./shell-env-5vFwNQcz.js";
7
- import { o as resolveSessionTranscriptsDirForAgent } from "./paths-OaazGgrn.js";
2
+ import { s as resolveStateDir } from "./paths-D2eokayo.js";
3
+ import { t as createSubsystemLogger } from "./subsystem-CJTCKTwb.js";
4
+ import { O as sleep, d as clampInt, f as clampNumber$1, j as truncateUtf16Safe, w as resolveUserPath } from "./exec-CK8CHr7j.js";
5
+ import { n as resolveAgentConfig, r as resolveAgentDir$1, s as resolveAgentWorkspaceDir } from "./agent-scope-DWKQJUUZ.js";
6
+ import { s as isTruthyEnvValue } from "./shell-env-BBHdjHEl.js";
7
+ import { o as resolveSessionTranscriptsDirForAgent } from "./paths-CmZenvlb.js";
8
8
  import { n as onSessionTranscriptUpdate } from "./transcript-events-D0hT93vo.js";
9
9
  import { n as formatErrorMessage } from "./errors-DzK5Mvu0.js";
10
- import { i as resolveApiKeyForProvider, r as requireApiKey } from "./model-auth-C4Jglp-Y.js";
11
- import { a as buildFileEntry, c as ensureDir, d as listMemoryFiles, f as normalizeExtraMemoryPaths, h as runWithConcurrency, i as sessionPathForFile, l as hashText, m as remapChunkLines, n as buildSessionEntry, o as chunkMarkdown, p as parseEmbedding, r as listSessionFilesForAgent, s as cosineSimilarity, t as requireNodeSqlite, u as isMemoryPath } from "./sqlite-B3u2TqVF.js";
10
+ import { i as resolveApiKeyForProvider, r as requireApiKey } from "./model-auth-ChSwMwh7.js";
11
+ import { a as buildFileEntry, c as ensureDir, d as listMemoryFiles, f as normalizeExtraMemoryPaths, h as runWithConcurrency, i as sessionPathForFile, l as hashText, m as remapChunkLines, n as buildSessionEntry, o as chunkMarkdown, p as parseEmbedding, r as listSessionFilesForAgent, s as cosineSimilarity, t as requireNodeSqlite, u as isMemoryPath } from "./sqlite-B-dYyac7.js";
12
12
  import fs from "node:fs/promises";
13
13
  import os from "node:os";
14
14
  import path from "node:path";
15
- import fs$1 from "node:fs";
15
+ import fsSync from "node:fs";
16
16
  import { randomUUID } from "node:crypto";
17
17
  import chokidar from "chokidar";
18
18
  import { createInterface } from "node:readline";
@@ -468,7 +468,7 @@ function canAutoSelectLocal(options) {
468
468
  if (/^(hf:|https?:)/i.test(modelPath)) return false;
469
469
  const resolved = resolveUserPath(modelPath);
470
470
  try {
471
- return fs$1.statSync(resolved).isFile();
471
+ return fsSync.statSync(resolved).isFile();
472
472
  } catch {
473
473
  return false;
474
474
  }
@@ -2320,7 +2320,7 @@ var MemoryManagerSyncOps = class {
2320
2320
  ]);
2321
2321
  const additionalPaths = normalizeExtraMemoryPaths(this.workspaceDir, this.settings.extraPaths);
2322
2322
  for (const entry of additionalPaths) try {
2323
- const stat = fs$1.lstatSync(entry);
2323
+ const stat = fsSync.lstatSync(entry);
2324
2324
  if (stat.isSymbolicLink()) continue;
2325
2325
  if (stat.isDirectory()) {
2326
2326
  watchPaths.add(path.join(entry, "**", "*.md"));
@@ -3212,9 +3212,9 @@ var MemoryIndexManager = class MemoryIndexManager {
3212
3212
  async searchTiered(query, options) {
3213
3213
  const { searchAllTiers } = await import("./cross-tier-search-Cyy2cNEk.js").then((n) => n.t);
3214
3214
  const { ImmediateMemory } = await import("./immediate-rEMX-FGd.js").then((n) => n.t);
3215
- const { SessionMemory } = await import("./session-CzBccNiw.js").then((n) => n.t);
3216
- const { SemanticMemoryTier } = await import("./semantic-BTp-RtM8.js").then((n) => n.t);
3217
- const { SoulMemory } = await import("./soul-D4rF0iXu.js").then((n) => n.t);
3215
+ const { SessionMemory } = await import("./session-DTRcP2Sj.js").then((n) => n.t);
3216
+ const { SemanticMemoryTier } = await import("./semantic-BcioSN1d.js").then((n) => n.t);
3217
+ const { SoulMemory } = await import("./soul-CXGTzaKZ.js").then((n) => n.t);
3218
3218
  return searchAllTiers(query, {
3219
3219
  immediate: new ImmediateMemory(),
3220
3220
  session: new SessionMemory(this.db),
@@ -1,7 +1,7 @@
1
1
  import { t as formatCliCommand } from "./command-format-CZk1W3UP.js";
2
- import { a as listProfilesForProvider, d as normalizeSecretInput, i as resolveApiKeyForProfile, n as resolveAuthProfileOrder, o as ensureAuthProfileStore, s as resolveAuthStorePathForDisplay, u as normalizeOptionalSecretInput } from "./auth-profiles-xk_1uopf.js";
3
- import { s as normalizeProviderId } from "./model-selection-BsVvfxCt.js";
4
- import { t as getShellEnvAppliedKeys } from "./shell-env-5vFwNQcz.js";
2
+ import { a as listProfilesForProvider, d as normalizeSecretInput, i as resolveApiKeyForProfile, n as resolveAuthProfileOrder, o as ensureAuthProfileStore, s as resolveAuthStorePathForDisplay, u as normalizeOptionalSecretInput } from "./auth-profiles-BqrAPweI.js";
3
+ import { s as normalizeProviderId } from "./model-selection-DPoLkg_t.js";
4
+ import { t as getShellEnvAppliedKeys } from "./shell-env-BBHdjHEl.js";
5
5
  import path from "node:path";
6
6
  import { getEnvApiKey } from "@mariozechner/pi-ai";
7
7
 
@@ -1,4 +1,4 @@
1
- import { a as resolveAgentModelPrimary } from "./agent-scope-BXuH9s05.js";
1
+ import { a as resolveAgentModelPrimary } from "./agent-scope-DWKQJUUZ.js";
2
2
 
3
3
  //#region src/agents/defaults.ts
4
4
  const DEFAULT_PROVIDER = "anthropic";
@@ -10,9 +10,9 @@ import { a as ensureWorkspaceAndSessions, c as handleReset, h as resolveControlU
10
10
  import { r as isSystemdUserServiceAvailable } from "./systemd-BEeuI9u0.js";
11
11
  import { t as resolveGatewayService } from "./service-U3nMjKlR.js";
12
12
  import { r as healthCommand } from "./health-27WiwNrh.js";
13
- import { a as ensureAuthenticated } from "./auth-choice-BTMheCDo.js";
13
+ import { a as ensureAuthenticated } from "./auth-choice-CPDNhDPT.js";
14
14
  import { n as applyAuthProfileConfig, r as setAnthropicApiKey, t as WizardCancelledError } from "./prompts-vr_Njtil.js";
15
- import { t as runOnboardingWizard } from "./onboarding-BLFJufto.js";
15
+ import { t as runOnboardingWizard } from "./onboarding-CGG6jZ0y.js";
16
16
  import { n as logConfigUpdated } from "./logging-B05aEFEO.js";
17
17
  import { t as createClackPrompter } from "./clack-prompter-1d_RjjVW.js";
18
18
  import { n as ensureSystemdUserLingerNonInteractive } from "./systemd-linger-BXOkxYnH.js";
@@ -11,10 +11,10 @@ import { a as ensureWorkspaceAndSessions, c as handleReset, h as resolveControlU
11
11
  import { r as isSystemdUserServiceAvailable } from "./systemd-IDjybnbO.js";
12
12
  import { t as resolveGatewayService } from "./service-H_0E0nOX.js";
13
13
  import { r as healthCommand } from "./health-CH8yZB2L.js";
14
- import { a as applyAuthProfileConfig, c as ensureAuthenticated, o as setAnthropicApiKey, t as WizardCancelledError } from "./prompts-Cm8eJ-i3.js";
15
- import { t as runOnboardingWizard } from "./onboarding-DXQ0Qtq6.js";
14
+ import { a as applyAuthProfileConfig, c as ensureAuthenticated, o as setAnthropicApiKey, t as WizardCancelledError } from "./prompts-BT5ztuUd.js";
15
+ import { t as runOnboardingWizard } from "./onboarding-BappVKxE.js";
16
16
  import { n as logConfigUpdated } from "./logging-ClHj0gnP.js";
17
- import { t as createClackPrompter } from "./clack-prompter-S0pujJNH.js";
17
+ import { t as createClackPrompter } from "./clack-prompter-DXovYg0Q.js";
18
18
  import { n as ensureSystemdUserLingerNonInteractive } from "./systemd-linger-q1hyIpoI.js";
19
19
 
20
20
  //#region src/commands/onboard-interactive.ts
@@ -6,19 +6,19 @@ import { l as writeConfigFile, o as readConfigFileSnapshot } from "./config-9JRR
6
6
  import { r as resolveCliName, t as formatCliCommand } from "./command-format-B1WxXbeU.js";
7
7
  import { l as ensureAuthProfileStore } from "./auth-profiles-DZS4PC_i.js";
8
8
  import { p as findTailscaleBinary } from "./auth-B8ry4GB_.js";
9
- import { r as installCompletion } from "./completion-cli-CDsbJ-p2.js";
9
+ import { r as installCompletion } from "./completion-cli-D3yIDiMz.js";
10
10
  import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-DOk9qM0y.js";
11
11
  import { _ as summarizeExistingConfig, a as ensureWorkspaceAndSessions, d as openUrl, f as printWizardHeader, h as resolveControlUiLinks, i as detectBrowserOpenSupport, m as randomToken, n as applyWizardMetadata, o as formatControlUiSshHint, p as probeGatewayReachable, t as DEFAULT_WORKSPACE, u as normalizeGatewayTokenInput, v as validateGatewayPasswordInput, y as waitForGatewayReachable } from "./onboard-helpers-K7wUCSoE.js";
12
12
  import { r as isSystemdUserServiceAvailable } from "./systemd-IDjybnbO.js";
13
13
  import { t as resolveGatewayService } from "./service-H_0E0nOX.js";
14
14
  import { r as healthCommand } from "./health-CH8yZB2L.js";
15
15
  import { n as ensureControlUiAssetsBuilt, t as formatHealthCheckFailure } from "./health-format-BMwPAU53.js";
16
- import { c as ensureAuthenticated, i as applyAuthChoice, n as resolvePreferredProviderForAuthChoice, r as warnIfModelConfigLooksOff, s as promptAuthChoiceGrouped, t as WizardCancelledError } from "./prompts-Cm8eJ-i3.js";
16
+ import { c as ensureAuthenticated, i as applyAuthChoice, n as resolvePreferredProviderForAuthChoice, r as warnIfModelConfigLooksOff, s as promptAuthChoiceGrouped, t as WizardCancelledError } from "./prompts-BT5ztuUd.js";
17
17
  import { a as promptDefaultModel, i as applyPrimaryModel, t as validateIPv4AddressInput } from "./ipv4-sll41DXC.js";
18
18
  import { t as buildWorkspaceHookStatus } from "./hooks-status-BTVvcXJx.js";
19
19
  import { n as logConfigUpdated } from "./logging-ClHj0gnP.js";
20
20
  import { t as runTui } from "./tui-DBbVe-hW.js";
21
- import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BY4djQTY.js";
21
+ import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-Dend-SU1.js";
22
22
  import os from "node:os";
23
23
  import path from "node:path";
24
24
  import fs from "node:fs/promises";
@@ -5,20 +5,20 @@ import { h as pathExists, y as resolveUserPath } from "./utils-DwcweD55.js";
5
5
  import { c as resolveDefaultAgentId, p as DEFAULT_BOOTSTRAP_FILENAME, s as resolveAgentWorkspaceDir } from "./agent-scope-M302b8FW.js";
6
6
  import { l as writeConfigFile, o as readConfigFileSnapshot } from "./config-6zE4ZkSF.js";
7
7
  import { p as findTailscaleBinary } from "./auth-CBxE4UNz.js";
8
- import { r as installCompletion } from "./completion-cli-CqZwlvs2.js";
8
+ import { r as installCompletion } from "./completion-cli-DcTEhrAe.js";
9
9
  import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-Cbi2Ox6g.js";
10
10
  import { _ as summarizeExistingConfig, a as ensureWorkspaceAndSessions, d as openUrl, f as printWizardHeader, h as resolveControlUiLinks, i as detectBrowserOpenSupport, m as randomToken, n as applyWizardMetadata, o as formatControlUiSshHint, p as probeGatewayReachable, t as DEFAULT_WORKSPACE, u as normalizeGatewayTokenInput, v as validateGatewayPasswordInput, y as waitForGatewayReachable } from "./onboard-helpers-DKu_2enh.js";
11
11
  import { r as isSystemdUserServiceAvailable } from "./systemd-BEeuI9u0.js";
12
12
  import { t as resolveGatewayService } from "./service-U3nMjKlR.js";
13
13
  import { r as healthCommand } from "./health-27WiwNrh.js";
14
14
  import { n as ensureControlUiAssetsBuilt, t as formatHealthCheckFailure } from "./health-format-Dug5Rbjg.js";
15
- import { a as ensureAuthenticated, i as promptAuthChoiceGrouped, n as warnIfModelConfigLooksOff, r as applyAuthChoice, t as resolvePreferredProviderForAuthChoice } from "./auth-choice-BTMheCDo.js";
15
+ import { a as ensureAuthenticated, i as promptAuthChoiceGrouped, n as warnIfModelConfigLooksOff, r as applyAuthChoice, t as resolvePreferredProviderForAuthChoice } from "./auth-choice-CPDNhDPT.js";
16
16
  import { t as WizardCancelledError } from "./prompts-vr_Njtil.js";
17
17
  import { a as promptDefaultModel, i as applyPrimaryModel, t as validateIPv4AddressInput } from "./ipv4-yUiIU5CD.js";
18
18
  import { t as buildWorkspaceHookStatus } from "./hooks-status-B53TbyZm.js";
19
19
  import { n as logConfigUpdated } from "./logging-B05aEFEO.js";
20
20
  import { t as runTui } from "./tui--uEeSnES.js";
21
- import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-DguJOZqA.js";
21
+ import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-CZgNNZVd.js";
22
22
  import os from "node:os";
23
23
  import path from "node:path";
24
24
  import fs from "node:fs/promises";
@@ -1,11 +1,11 @@
1
1
  import { n as __exportAll } from "./chunk-BXK9XSlF.js";
2
- import { t as STATE_DIR } from "./paths-B-AkG5FD.js";
3
- import { C as normalizeAccountId, g as DEFAULT_ACCOUNT_ID } from "./workspace-CZlo4alz.js";
4
- import { D as getChildLogger, t as createSubsystemLogger, v as logVerbose, x as shouldLogVerbose } from "./subsystem-BlEuMJjX.js";
5
- import { A as toWhatsappJid, c as logWarn, m as escapeRegExp, w as resolveUserPath } from "./exec-DJTRaYS6.js";
2
+ import { t as STATE_DIR } from "./paths-D2eokayo.js";
3
+ import { C as normalizeAccountId, g as DEFAULT_ACCOUNT_ID } from "./workspace-xzxJwPTB.js";
4
+ import { D as getChildLogger, t as createSubsystemLogger, v as logVerbose, x as shouldLogVerbose } from "./subsystem-CJTCKTwb.js";
5
+ import { A as toWhatsappJid, c as logWarn, m as escapeRegExp, w as resolveUserPath } from "./exec-CK8CHr7j.js";
6
6
  import { t as formatCliCommand } from "./command-format-CZk1W3UP.js";
7
- import { C as normalizeChannelId, _ as createPinnedDispatcher, a as resizeToJpeg, b as resolvePinnedHostnameWithPolicy, g as closeDispatcher, h as SsrFBlockedError, i as optimizeImageToPng, m as mediaKindFromMime, o as detectMime, p as maxBytesForKind, r as hasAlphaChannel, s as extensionForMime, t as convertHeicToJpeg } from "./image-ops-ZMEg1-kE.js";
8
- import { n as loadConfig } from "./config-CrQw7iqE.js";
7
+ import { C as normalizeChannelId, _ as createPinnedDispatcher, a as resizeToJpeg, b as resolvePinnedHostnameWithPolicy, g as closeDispatcher, h as SsrFBlockedError, i as optimizeImageToPng, m as mediaKindFromMime, o as detectMime, p as maxBytesForKind, r as hasAlphaChannel, s as extensionForMime, t as convertHeicToJpeg } from "./image-ops-DJjERl7d.js";
8
+ import { n as loadConfig } from "./config-H_VHtPeY.js";
9
9
  import fs from "node:fs/promises";
10
10
  import os from "node:os";
11
11
  import path from "node:path";
@@ -1,5 +1,5 @@
1
- import { c as expandHomePrefix, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-B-AkG5FD.js";
2
- import { _ as DEFAULT_AGENT_ID, w as normalizeAgentId } from "./workspace-CZlo4alz.js";
1
+ import { c as expandHomePrefix, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-D2eokayo.js";
2
+ import { _ as DEFAULT_AGENT_ID, w as normalizeAgentId } from "./workspace-xzxJwPTB.js";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
5
 
@@ -1,6 +1,6 @@
1
1
  import os from "node:os";
2
2
  import path from "node:path";
3
- import fs from "node:fs";
3
+ import fsSync from "node:fs";
4
4
 
5
5
  //#region src/infra/home-dir.ts
6
6
  function normalize(value) {
@@ -111,7 +111,7 @@ function resolveCanonicalConfigPath(env = process.env, stateDir = resolveStateDi
111
111
  function resolveConfigPathCandidate(env = process.env, homedir = envHomedir(env)) {
112
112
  const existing = resolveDefaultConfigCandidates(env, homedir).find((candidate) => {
113
113
  try {
114
- return fs.existsSync(candidate);
114
+ return fsSync.existsSync(candidate);
115
115
  } catch {
116
116
  return false;
117
117
  }
@@ -128,7 +128,7 @@ function resolveConfigPath(env = process.env, stateDir = resolveStateDir(env, en
128
128
  const stateOverride = env.ANIMA_STATE_DIR?.trim();
129
129
  const configPath = path.join(stateDir, CONFIG_FILENAME);
130
130
  try {
131
- if (fs.existsSync(configPath)) return configPath;
131
+ if (fsSync.existsSync(configPath)) return configPath;
132
132
  } catch {}
133
133
  if (stateOverride) return configPath;
134
134
  const defaultStateDir = resolveStateDir(env, homedir);
@@ -1,10 +1,10 @@
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 { a as listProfilesForProvider, o as ensureAuthProfileStore } from "./auth-profiles-xk_1uopf.js";
7
- import "./model-selection-BsVvfxCt.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 { a as listProfilesForProvider, o as ensureAuthProfileStore } from "./auth-profiles-BqrAPweI.js";
7
+ import "./model-selection-DPoLkg_t.js";
8
8
  import fs from "node:fs/promises";
9
9
  import path from "node:path";
10
10
 
@@ -1,20 +1,20 @@
1
- import { i as resolveGatewayPort, t as STATE_DIR } from "./paths-B-AkG5FD.js";
2
- import { E as resolveAgentIdFromSessionKey, T as normalizeMainKey, _ as DEFAULT_AGENT_ID, a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_USER_FILENAME, h as resolveAnimaPackageRootSync, i as DEFAULT_HEARTBEAT_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME, w as normalizeAgentId, y as buildAgentMainSessionKey } from "./workspace-CZlo4alz.js";
3
- import { j as resolvePreferredAnimaTmpDir, l as getChatChannelMeta, m as requireActivePluginRegistry, n as defaultRuntime, o as CHANNEL_IDS, s as CHAT_CHANNEL_ORDER, t as createSubsystemLogger } from "./subsystem-BlEuMJjX.js";
4
- import { S as resolveConfigDir, b as normalizeE164, j as truncateUtf16Safe, l as CONFIG_DIR, m as escapeRegExp, n as runExec, w as resolveUserPath } from "./exec-DJTRaYS6.js";
5
- import { l as resolveSessionAgentId, n as resolveAgentConfig } from "./agent-scope-BXuH9s05.js";
6
- import { A as normalizeMessageChannel, C as normalizeChannelId, a as resizeToJpeg, k as listDeliverableMessageChannels, n as getImageMetadata, o as detectMime, s as extensionForMime } from "./image-ops-ZMEg1-kE.js";
7
- import { a as writeConfigFile, c as parseDurationMs, h as resolveMemorySlotDecision, m as resolveEnableState, n as loadConfig, p as normalizePluginsConfig, s as parseByteSize, t as createConfigIO, u as loadPluginManifestRegistry } from "./config-CrQw7iqE.js";
1
+ import { i as resolveGatewayPort, t as STATE_DIR } from "./paths-D2eokayo.js";
2
+ import { E as resolveAgentIdFromSessionKey, T as normalizeMainKey, _ as DEFAULT_AGENT_ID, a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_USER_FILENAME, h as resolveAnimaPackageRootSync, i as DEFAULT_HEARTBEAT_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME, w as normalizeAgentId, y as buildAgentMainSessionKey } from "./workspace-xzxJwPTB.js";
3
+ import { j as resolvePreferredAnimaTmpDir, l as getChatChannelMeta, m as requireActivePluginRegistry, n as defaultRuntime, o as CHANNEL_IDS, s as CHAT_CHANNEL_ORDER, t as createSubsystemLogger } from "./subsystem-CJTCKTwb.js";
4
+ import { S as resolveConfigDir, b as normalizeE164, j as truncateUtf16Safe, l as CONFIG_DIR, m as escapeRegExp, n as runExec, w as resolveUserPath } from "./exec-CK8CHr7j.js";
5
+ import { l as resolveSessionAgentId, n as resolveAgentConfig } from "./agent-scope-DWKQJUUZ.js";
6
+ import { A as normalizeMessageChannel, C as normalizeChannelId, a as resizeToJpeg, k as listDeliverableMessageChannels, n as getImageMetadata, o as detectMime, s as extensionForMime } from "./image-ops-DJjERl7d.js";
7
+ import { a as writeConfigFile, c as parseDurationMs, h as resolveMemorySlotDecision, m as resolveEnableState, n as loadConfig, p as normalizePluginsConfig, s as parseByteSize, t as createConfigIO, u as loadPluginManifestRegistry } from "./config-H_VHtPeY.js";
8
8
  import { t as parseBooleanValue } from "./boolean-BsqeuxE6.js";
9
- import { n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-OaazGgrn.js";
9
+ import { n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-CmZenvlb.js";
10
10
  import { t as emitSessionTranscriptUpdate } from "./transcript-events-D0hT93vo.js";
11
- import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, C as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, D as DEFAULT_ANIMA_BROWSER_ENABLED, E as DEFAULT_ANIMA_BROWSER_COLOR, O as DEFAULT_ANIMA_BROWSER_PROFILE_NAME, T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, _ as ensureChromeExtensionRelayServer, a as resolveAnimaUserDataDir, b as isLoopbackHost, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, h as getHeadersWithAuth, i as launchAnimaChrome, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, n as isChromeCdpReady, o as stopAnimaChrome, p as appendCdpPath, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as stopChromeExtensionRelayServer, w as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS } from "./chrome-C1KpzLwu.js";
12
- import { a as parseFrontmatterBlock, c as resolveRuntimePlatform, i as resolveAnimaManifestBlock, n as normalizeStringList, o as hasBinary, r as parseFrontmatterBool, s as isConfigPathTruthyWithDefaults, t as getFrontmatterString } from "./frontmatter-DDYuWuK5.js";
11
+ import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, C as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, D as DEFAULT_ANIMA_BROWSER_ENABLED, E as DEFAULT_ANIMA_BROWSER_COLOR, O as DEFAULT_ANIMA_BROWSER_PROFILE_NAME, T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, _ as ensureChromeExtensionRelayServer, a as resolveAnimaUserDataDir, b as isLoopbackHost, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, h as getHeadersWithAuth, i as launchAnimaChrome, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, n as isChromeCdpReady, o as stopAnimaChrome, p as appendCdpPath, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as stopChromeExtensionRelayServer, w as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS } from "./chrome-s7nTgmbn.js";
12
+ import { a as parseFrontmatterBlock, c as resolveRuntimePlatform, i as resolveAnimaManifestBlock, n as normalizeStringList, o as hasBinary, r as parseFrontmatterBool, s as isConfigPathTruthyWithDefaults, t as getFrontmatterString } from "./frontmatter-BBFYH_d2.js";
13
13
  import { n as formatErrorMessage, t as extractErrorCode } from "./errors-DzK5Mvu0.js";
14
14
  import fs from "node:fs/promises";
15
15
  import os from "node:os";
16
16
  import path from "node:path";
17
- import fs$1, { existsSync } from "node:fs";
17
+ import fsSync, { existsSync } from "node:fs";
18
18
  import { spawn } from "node:child_process";
19
19
  import { fileURLToPath } from "node:url";
20
20
  import crypto from "node:crypto";
@@ -492,7 +492,7 @@ function releaseAllLocksSync() {
492
492
  if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
493
493
  } catch {}
494
494
  try {
495
- fs$1.rmSync(held.lockPath, { force: true });
495
+ fsSync.rmSync(held.lockPath, { force: true });
496
496
  } catch {}
497
497
  HELD_LOCKS.delete(sessionFile);
498
498
  }
@@ -714,7 +714,7 @@ function isCacheEnabled(ttlMs) {
714
714
  }
715
715
  function getFileMtimeMs(filePath) {
716
716
  try {
717
- return fs$1.statSync(filePath).mtimeMs;
717
+ return fsSync.statSync(filePath).mtimeMs;
718
718
  } catch {
719
719
  return;
720
720
  }
@@ -791,7 +791,7 @@ function loadSessionStore(storePath, opts = {}) {
791
791
  let store = {};
792
792
  let mtimeMs = getFileMtimeMs(storePath);
793
793
  try {
794
- const raw = fs$1.readFileSync(storePath, "utf-8");
794
+ const raw = fsSync.readFileSync(storePath, "utf-8");
795
795
  const parsed = JSON.parse(raw);
796
796
  if (isSessionStoreRecord(parsed)) store = parsed;
797
797
  mtimeMs = getFileMtimeMs(storePath) ?? mtimeMs;
@@ -929,7 +929,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
929
929
  }
930
930
  async function getSessionFileSize(storePath) {
931
931
  try {
932
- return (await fs$1.promises.stat(storePath)).size;
932
+ return (await fsSync.promises.stat(storePath)).size;
933
933
  } catch {
934
934
  return null;
935
935
  }
@@ -946,7 +946,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
946
946
  if (fileSize <= maxBytes) return false;
947
947
  const backupPath = `${storePath}.bak.${Date.now()}`;
948
948
  try {
949
- await fs$1.promises.rename(storePath, backupPath);
949
+ await fsSync.promises.rename(storePath, backupPath);
950
950
  log$1.info("rotated session store file", {
951
951
  backupPath: path.basename(backupPath),
952
952
  sizeBytes: fileSize
@@ -957,11 +957,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
957
957
  try {
958
958
  const dir = path.dirname(storePath);
959
959
  const baseName = path.basename(storePath);
960
- const backups = (await fs$1.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
960
+ const backups = (await fsSync.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
961
961
  const maxBackups = 3;
962
962
  if (backups.length > maxBackups) {
963
963
  const toDelete = backups.slice(maxBackups);
964
- for (const old of toDelete) await fs$1.promises.unlink(path.join(dir, old)).catch(() => void 0);
964
+ for (const old of toDelete) await fsSync.promises.unlink(path.join(dir, old)).catch(() => void 0);
965
965
  log$1.info("cleaned up old session store backups", { deleted: toDelete.length });
966
966
  }
967
967
  } catch {}
@@ -998,11 +998,11 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
998
998
  await rotateSessionFile(storePath, maintenance.rotateBytes);
999
999
  }
1000
1000
  }
1001
- await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
1001
+ await fsSync.promises.mkdir(path.dirname(storePath), { recursive: true });
1002
1002
  const json = JSON.stringify(store, null, 2);
1003
1003
  if (process.platform === "win32") {
1004
1004
  try {
1005
- await fs$1.promises.writeFile(storePath, json, "utf-8");
1005
+ await fsSync.promises.writeFile(storePath, json, "utf-8");
1006
1006
  } catch (err) {
1007
1007
  if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") return;
1008
1008
  throw err;
@@ -1011,21 +1011,21 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
1011
1011
  }
1012
1012
  const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
1013
1013
  try {
1014
- await fs$1.promises.writeFile(tmp, json, {
1014
+ await fsSync.promises.writeFile(tmp, json, {
1015
1015
  mode: 384,
1016
1016
  encoding: "utf-8"
1017
1017
  });
1018
- await fs$1.promises.rename(tmp, storePath);
1019
- await fs$1.promises.chmod(storePath, 384);
1018
+ await fsSync.promises.rename(tmp, storePath);
1019
+ await fsSync.promises.chmod(storePath, 384);
1020
1020
  } catch (err) {
1021
1021
  if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") {
1022
1022
  try {
1023
- await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
1024
- await fs$1.promises.writeFile(storePath, json, {
1023
+ await fsSync.promises.mkdir(path.dirname(storePath), { recursive: true });
1024
+ await fsSync.promises.writeFile(storePath, json, {
1025
1025
  mode: 384,
1026
1026
  encoding: "utf-8"
1027
1027
  });
1028
- await fs$1.promises.chmod(storePath, 384);
1028
+ await fsSync.promises.chmod(storePath, 384);
1029
1029
  } catch (err2) {
1030
1030
  if ((err2 && typeof err2 === "object" && "code" in err2 ? String(err2.code) : null) === "ENOENT") return;
1031
1031
  throw err2;
@@ -1034,7 +1034,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
1034
1034
  }
1035
1035
  throw err;
1036
1036
  } finally {
1037
- await fs$1.promises.rm(tmp, { force: true });
1037
+ await fsSync.promises.rm(tmp, { force: true });
1038
1038
  }
1039
1039
  }
1040
1040
  async function updateSessionStore(storePath, mutator, opts) {
@@ -1252,8 +1252,8 @@ function resolveMirroredTranscriptText(params) {
1252
1252
  return trimmed ? trimmed : null;
1253
1253
  }
1254
1254
  async function ensureSessionHeader(params) {
1255
- if (fs$1.existsSync(params.sessionFile)) return;
1256
- await fs$1.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
1255
+ if (fsSync.existsSync(params.sessionFile)) return;
1256
+ await fsSync.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
1257
1257
  const header = {
1258
1258
  type: "session",
1259
1259
  version: CURRENT_SESSION_VERSION,
@@ -1261,7 +1261,7 @@ async function ensureSessionHeader(params) {
1261
1261
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1262
1262
  cwd: process.cwd()
1263
1263
  };
1264
- await fs$1.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
1264
+ await fsSync.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
1265
1265
  }
1266
1266
  async function appendAssistantMessageToSessionTranscript(params) {
1267
1267
  const sessionKey = params.sessionKey.trim();
@@ -2202,13 +2202,13 @@ function shortPath(value) {
2202
2202
  //#region src/agents/skills/bundled-dir.ts
2203
2203
  function looksLikeSkillsDir(dir) {
2204
2204
  try {
2205
- const entries = fs$1.readdirSync(dir, { withFileTypes: true });
2205
+ const entries = fsSync.readdirSync(dir, { withFileTypes: true });
2206
2206
  for (const entry of entries) {
2207
2207
  if (entry.name.startsWith(".")) continue;
2208
2208
  const fullPath = path.join(dir, entry.name);
2209
2209
  if (entry.isFile() && entry.name.endsWith(".md")) return true;
2210
2210
  if (entry.isDirectory()) {
2211
- if (fs$1.existsSync(path.join(fullPath, "SKILL.md"))) return true;
2211
+ if (fsSync.existsSync(path.join(fullPath, "SKILL.md"))) return true;
2212
2212
  }
2213
2213
  }
2214
2214
  } catch {
@@ -2223,7 +2223,7 @@ function resolveBundledSkillsDir(opts = {}) {
2223
2223
  const execPath = opts.execPath ?? process.execPath;
2224
2224
  const execDir = path.dirname(execPath);
2225
2225
  const sibling = path.join(execDir, "skills");
2226
- if (fs$1.existsSync(sibling)) return sibling;
2226
+ if (fsSync.existsSync(sibling)) return sibling;
2227
2227
  } catch {}
2228
2228
  try {
2229
2229
  const moduleUrl = opts.moduleUrl ?? import.meta.url;
@@ -2279,7 +2279,7 @@ function resolvePluginSkillDirs(params) {
2279
2279
  const trimmed = raw.trim();
2280
2280
  if (!trimmed) continue;
2281
2281
  const candidate = path.resolve(record.rootDir, trimmed);
2282
- if (!fs$1.existsSync(candidate)) {
2282
+ if (!fsSync.existsSync(candidate)) {
2283
2283
  log.warn(`plugin skill path not found (${record.id}): ${candidate}`);
2284
2284
  continue;
2285
2285
  }
@@ -2306,7 +2306,7 @@ async function serializeByKey(key, task) {
2306
2306
 
2307
2307
  //#endregion
2308
2308
  //#region src/agents/skills/workspace.ts
2309
- const fsp = fs$1.promises;
2309
+ const fsp = fsSync.promises;
2310
2310
  const skillsLogger = createSubsystemLogger("skills");
2311
2311
  const skillCommandDebugOnce = /* @__PURE__ */ new Set();
2312
2312
  function debugSkillCommandOnce(messageKey, message, meta) {
@@ -2399,7 +2399,7 @@ function loadSkillEntries(workspaceDir, opts) {
2399
2399
  return Array.from(merged.values()).map((skill) => {
2400
2400
  let frontmatter = {};
2401
2401
  try {
2402
- frontmatter = parseFrontmatter(fs$1.readFileSync(skill.filePath, "utf-8"));
2402
+ frontmatter = parseFrontmatter(fsSync.readFileSync(skill.filePath, "utf-8"));
2403
2403
  } catch {}
2404
2404
  return {
2405
2405
  skill,
@@ -2606,7 +2606,7 @@ function isModuleNotFoundError(err) {
2606
2606
  }
2607
2607
  async function loadPwAiModule(mode) {
2608
2608
  try {
2609
- return await import("./pw-ai-DVQKx_ca.js");
2609
+ return await import("./pw-ai-q5Enhcu7.js");
2610
2610
  } catch (err) {
2611
2611
  if (mode === "soft") return null;
2612
2612
  if (isModuleNotFoundError(err)) return null;
@@ -4321,11 +4321,11 @@ async function movePathToTrash(targetPath) {
4321
4321
  return targetPath;
4322
4322
  } catch {
4323
4323
  const trashDir = path.join(os.homedir(), ".Trash");
4324
- fs$1.mkdirSync(trashDir, { recursive: true });
4324
+ fsSync.mkdirSync(trashDir, { recursive: true });
4325
4325
  const base = path.basename(targetPath);
4326
4326
  let dest = path.join(trashDir, `${base}-${Date.now()}`);
4327
- if (fs$1.existsSync(dest)) dest = path.join(trashDir, `${base}-${Date.now()}-${Math.random()}`);
4328
- fs$1.renameSync(targetPath, dest);
4327
+ if (fsSync.existsSync(dest)) dest = path.join(trashDir, `${base}-${Date.now()}-${Math.random()}`);
4328
+ fsSync.renameSync(targetPath, dest);
4329
4329
  return dest;
4330
4330
  }
4331
4331
  }
@@ -4403,7 +4403,7 @@ function createBrowserProfilesService(ctx) {
4403
4403
  } catch {}
4404
4404
  const userDataDir = resolveAnimaUserDataDir(name);
4405
4405
  const profileDir = path.dirname(userDataDir);
4406
- if (fs$1.existsSync(profileDir)) {
4406
+ if (fsSync.existsSync(profileDir)) {
4407
4407
  await movePathToTrash(profileDir);
4408
4408
  deleted = true;
4409
4409
  }
@@ -5064,13 +5064,13 @@ function createProfileContext(opts, profile) {
5064
5064
  const userDataDir = resolveAnimaUserDataDir(profile.name);
5065
5065
  const profileState = getProfileState();
5066
5066
  if (await isHttpReachable(300) && !profileState.running) try {
5067
- await (await import("./pw-ai-DVQKx_ca.js")).closePlaywrightBrowserConnection();
5067
+ await (await import("./pw-ai-q5Enhcu7.js")).closePlaywrightBrowserConnection();
5068
5068
  } catch {}
5069
5069
  if (profileState.running) await stopRunningBrowser();
5070
5070
  try {
5071
- await (await import("./pw-ai-DVQKx_ca.js")).closePlaywrightBrowserConnection();
5071
+ await (await import("./pw-ai-q5Enhcu7.js")).closePlaywrightBrowserConnection();
5072
5072
  } catch {}
5073
- if (!fs$1.existsSync(userDataDir)) return {
5073
+ if (!fsSync.existsSync(userDataDir)) return {
5074
5074
  moved: false,
5075
5075
  from: userDataDir
5076
5076
  };
@@ -56,8 +56,8 @@ import "./auth-store-BEUCdUFj.js";
56
56
  import "./dispatcher-BhzRMibw.js";
57
57
  import "./delivery-queue-BqJKnOa_.js";
58
58
  import "./session-cost-usage-lfPU35Sb.js";
59
- import "./register.subclis-D2HE_7Rz.js";
60
- import { i as registerProgramCommands } from "./command-registry-D5y3Nn9i.js";
59
+ import "./register.subclis-N7uAMRX_.js";
60
+ import { i as registerProgramCommands } from "./command-registry-Cl3Z-qsS.js";
61
61
  import { r as setProgramContext } from "./program-context-DItEQSzX.js";
62
62
  import { r as listChannelPluginCatalogEntries } from "./catalog-BWBjaCdR.js";
63
63
  import { t as forceFreePort } from "./ports-DYWXkfSI.js";