@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,13 +1,13 @@
1
1
  import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-BXK9XSlF.js";
2
- import { a as resolveOAuthDir } from "./paths-B-AkG5FD.js";
3
- import { C as normalizeAccountId, g as DEFAULT_ACCOUNT_ID } from "./workspace-CZlo4alz.js";
4
- import { D as getChildLogger, S as success, g as danger, k as toPinoLikeLogger } from "./subsystem-BlEuMJjX.js";
5
- import { p as ensureDir, w as resolveUserPath } from "./exec-DJTRaYS6.js";
2
+ import { a as resolveOAuthDir } from "./paths-D2eokayo.js";
3
+ import { C as normalizeAccountId, g as DEFAULT_ACCOUNT_ID } from "./workspace-xzxJwPTB.js";
4
+ import { D as getChildLogger, S as success, g as danger, k as toPinoLikeLogger } from "./subsystem-CJTCKTwb.js";
5
+ import { p as ensureDir, w as resolveUserPath } from "./exec-CK8CHr7j.js";
6
6
  import { t as formatCliCommand } from "./command-format-CZk1W3UP.js";
7
- import { a as maybeRestoreCredsFromBackup, c as resolveDefaultWebAuthDir, l as resolveWebCredsBackupPath, u as resolveWebCredsPath } from "./auth-store-Bis9WSLR.js";
8
- import { w as VERSION } from "./config-CrQw7iqE.js";
7
+ import { a as maybeRestoreCredsFromBackup, c as resolveDefaultWebAuthDir, l as resolveWebCredsBackupPath, u as resolveWebCredsPath } from "./auth-store-eNVxoq_h.js";
8
+ import { w as VERSION } from "./config-H_VHtPeY.js";
9
9
  import path from "node:path";
10
- import fs from "node:fs";
10
+ import fsSync from "node:fs";
11
11
  import { randomUUID } from "node:crypto";
12
12
  import WebSocket from "ws";
13
13
  import { promisify } from "util";
@@ -91047,7 +91047,7 @@ var require_atomic_sleep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91047
91047
  //#endregion
91048
91048
  //#region node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js
91049
91049
  var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91050
- const fs$1 = __require("fs");
91050
+ const fs = __require("fs");
91051
91051
  const EventEmitter$4 = __require("events");
91052
91052
  const inherits = __require("util").inherits;
91053
91053
  const path$1 = __require("path");
@@ -91090,17 +91090,17 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91090
91090
  const flags = sonic.append ? "a" : "w";
91091
91091
  const mode = sonic.mode;
91092
91092
  if (sonic.sync) try {
91093
- if (sonic.mkdir) fs$1.mkdirSync(path$1.dirname(file), { recursive: true });
91094
- fileOpened(null, fs$1.openSync(file, flags, mode));
91093
+ if (sonic.mkdir) fs.mkdirSync(path$1.dirname(file), { recursive: true });
91094
+ fileOpened(null, fs.openSync(file, flags, mode));
91095
91095
  } catch (err) {
91096
91096
  fileOpened(err);
91097
91097
  throw err;
91098
91098
  }
91099
- else if (sonic.mkdir) fs$1.mkdir(path$1.dirname(file), { recursive: true }, (err) => {
91099
+ else if (sonic.mkdir) fs.mkdir(path$1.dirname(file), { recursive: true }, (err) => {
91100
91100
  if (err) return fileOpened(err);
91101
- fs$1.open(file, flags, mode, fileOpened);
91101
+ fs.open(file, flags, mode, fileOpened);
91102
91102
  });
91103
- else fs$1.open(file, flags, mode, fileOpened);
91103
+ else fs.open(file, flags, mode, fileOpened);
91104
91104
  }
91105
91105
  function SonicBoom(opts) {
91106
91106
  if (!(this instanceof SonicBoom)) return new SonicBoom(opts);
@@ -91138,8 +91138,8 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91138
91138
  this.flush = flushBuffer;
91139
91139
  this.flushSync = flushBufferSync;
91140
91140
  this._actualWrite = actualWriteBuffer;
91141
- fsWriteSync = () => fs$1.writeSync(this.fd, this._writingBuf);
91142
- fsWrite = () => fs$1.write(this.fd, this._writingBuf, this.release);
91141
+ fsWriteSync = () => fs.writeSync(this.fd, this._writingBuf);
91142
+ fsWrite = () => fs.write(this.fd, this._writingBuf, this.release);
91143
91143
  } else if (contentMode === void 0 || contentMode === kContentModeUtf8) {
91144
91144
  this._writingBuf = "";
91145
91145
  this.write = write;
@@ -91147,12 +91147,12 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91147
91147
  this.flushSync = flushSync;
91148
91148
  this._actualWrite = actualWrite;
91149
91149
  fsWriteSync = () => {
91150
- if (Buffer.isBuffer(this._writingBuf)) return fs$1.writeSync(this.fd, this._writingBuf);
91151
- return fs$1.writeSync(this.fd, this._writingBuf, "utf8");
91150
+ if (Buffer.isBuffer(this._writingBuf)) return fs.writeSync(this.fd, this._writingBuf);
91151
+ return fs.writeSync(this.fd, this._writingBuf, "utf8");
91152
91152
  };
91153
91153
  fsWrite = () => {
91154
- if (Buffer.isBuffer(this._writingBuf)) return fs$1.write(this.fd, this._writingBuf, this.release);
91155
- return fs$1.write(this.fd, this._writingBuf, "utf8", this.release);
91154
+ if (Buffer.isBuffer(this._writingBuf)) return fs.write(this.fd, this._writingBuf, this.release);
91155
+ return fs.write(this.fd, this._writingBuf, "utf8", this.release);
91156
91156
  };
91157
91157
  } else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
91158
91158
  if (typeof fd === "number") {
@@ -91197,7 +91197,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91197
91197
  return;
91198
91198
  }
91199
91199
  }
91200
- if (this._fsync) fs$1.fsyncSync(this.fd);
91200
+ if (this._fsync) fs.fsyncSync(this.fd);
91201
91201
  const len = this._len;
91202
91202
  if (this._reopening) {
91203
91203
  this._writing = false;
@@ -91294,7 +91294,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91294
91294
  this._flushPending = true;
91295
91295
  const onDrain = () => {
91296
91296
  if (!this._fsync) try {
91297
- fs$1.fsync(this.fd, (err) => {
91297
+ fs.fsync(this.fd, (err) => {
91298
91298
  this._flushPending = false;
91299
91299
  cb(err);
91300
91300
  });
@@ -91371,7 +91371,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91371
91371
  if (this._writing) return;
91372
91372
  const fd = this.fd;
91373
91373
  this.once("ready", () => {
91374
- if (fd !== this.fd) fs$1.close(fd, (err) => {
91374
+ if (fd !== this.fd) fs.close(fd, (err) => {
91375
91375
  if (err) return this.emit("error", err);
91376
91376
  });
91377
91377
  });
@@ -91402,7 +91402,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91402
91402
  while (this._bufs.length || buf.length) {
91403
91403
  if (buf.length <= 0) buf = this._bufs[0];
91404
91404
  try {
91405
- const n = Buffer.isBuffer(buf) ? fs$1.writeSync(this.fd, buf) : fs$1.writeSync(this.fd, buf, "utf8");
91405
+ const n = Buffer.isBuffer(buf) ? fs.writeSync(this.fd, buf) : fs.writeSync(this.fd, buf, "utf8");
91406
91406
  const releasedBufObj = releaseWritingBuf(buf, this._len, n);
91407
91407
  buf = releasedBufObj.writingBuf;
91408
91408
  this._len = releasedBufObj.len;
@@ -91413,7 +91413,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91413
91413
  }
91414
91414
  }
91415
91415
  try {
91416
- fs$1.fsyncSync(this.fd);
91416
+ fs.fsyncSync(this.fd);
91417
91417
  } catch {}
91418
91418
  }
91419
91419
  function flushBufferSync() {
@@ -91427,7 +91427,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91427
91427
  while (this._bufs.length || buf.length) {
91428
91428
  if (buf.length <= 0) buf = mergeBuf(this._bufs[0], this._lens[0]);
91429
91429
  try {
91430
- const n = fs$1.writeSync(this.fd, buf);
91430
+ const n = fs.writeSync(this.fd, buf);
91431
91431
  buf = buf.subarray(n);
91432
91432
  this._len = Math.max(this._len - n, 0);
91433
91433
  if (buf.length <= 0) {
@@ -91449,24 +91449,24 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91449
91449
  this._writing = true;
91450
91450
  this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || "";
91451
91451
  if (this.sync) try {
91452
- release(null, Buffer.isBuffer(this._writingBuf) ? fs$1.writeSync(this.fd, this._writingBuf) : fs$1.writeSync(this.fd, this._writingBuf, "utf8"));
91452
+ release(null, Buffer.isBuffer(this._writingBuf) ? fs.writeSync(this.fd, this._writingBuf) : fs.writeSync(this.fd, this._writingBuf, "utf8"));
91453
91453
  } catch (err) {
91454
91454
  release(err);
91455
91455
  }
91456
- else fs$1.write(this.fd, this._writingBuf, release);
91456
+ else fs.write(this.fd, this._writingBuf, release);
91457
91457
  }
91458
91458
  function actualWriteBuffer() {
91459
91459
  const release = this.release;
91460
91460
  this._writing = true;
91461
91461
  this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
91462
91462
  if (this.sync) try {
91463
- release(null, fs$1.writeSync(this.fd, this._writingBuf));
91463
+ release(null, fs.writeSync(this.fd, this._writingBuf));
91464
91464
  } catch (err) {
91465
91465
  release(err);
91466
91466
  }
91467
91467
  else {
91468
91468
  if (kCopyBuffer) this._writingBuf = Buffer.from(this._writingBuf);
91469
- fs$1.write(this.fd, this._writingBuf, release);
91469
+ fs.write(this.fd, this._writingBuf, release);
91470
91470
  }
91471
91471
  }
91472
91472
  function actualClose(sonic) {
@@ -91480,10 +91480,10 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
91480
91480
  sonic._lens = [];
91481
91481
  assert$1(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
91482
91482
  try {
91483
- fs$1.fsync(sonic.fd, closeWrapped);
91483
+ fs.fsync(sonic.fd, closeWrapped);
91484
91484
  } catch {}
91485
91485
  function closeWrapped() {
91486
- if (sonic.fd !== 1 && sonic.fd !== 2) fs$1.close(sonic.fd, done);
91486
+ if (sonic.fd !== 1 && sonic.fd !== 2) fs.close(sonic.fd, done);
91487
91487
  else done();
91488
91488
  }
91489
91489
  function done(err) {
@@ -100407,10 +100407,10 @@ function enqueueSaveCreds(authDir, saveCreds, logger) {
100407
100407
  }
100408
100408
  function readCredsJsonRaw(filePath) {
100409
100409
  try {
100410
- if (!fs.existsSync(filePath)) return null;
100411
- const stats = fs.statSync(filePath);
100410
+ if (!fsSync.existsSync(filePath)) return null;
100411
+ const stats = fsSync.statSync(filePath);
100412
100412
  if (!stats.isFile() || stats.size <= 1) return null;
100413
- return fs.readFileSync(filePath, "utf-8");
100413
+ return fsSync.readFileSync(filePath, "utf-8");
100414
100414
  } catch {
100415
100415
  return null;
100416
100416
  }
@@ -100422,16 +100422,16 @@ async function safeSaveCreds(authDir, saveCreds, logger) {
100422
100422
  const raw = readCredsJsonRaw(credsPath);
100423
100423
  if (raw) try {
100424
100424
  JSON.parse(raw);
100425
- fs.copyFileSync(credsPath, backupPath);
100425
+ fsSync.copyFileSync(credsPath, backupPath);
100426
100426
  try {
100427
- fs.chmodSync(backupPath, 384);
100427
+ fsSync.chmodSync(backupPath, 384);
100428
100428
  } catch {}
100429
100429
  } catch {}
100430
100430
  } catch {}
100431
100431
  try {
100432
100432
  await Promise.resolve(saveCreds());
100433
100433
  try {
100434
- fs.chmodSync(resolveWebCredsPath(authDir), 384);
100434
+ fsSync.chmodSync(resolveWebCredsPath(authDir), 384);
100435
100435
  } catch {}
100436
100436
  } catch (err) {
100437
100437
  logger.warn({ error: String(err) }, "failed saving WhatsApp creds");
@@ -100597,7 +100597,7 @@ function resolveLegacyAuthDir() {
100597
100597
  }
100598
100598
  function legacyAuthExists(authDir) {
100599
100599
  try {
100600
- return fs.existsSync(path.join(authDir, "creds.json"));
100600
+ return fsSync.existsSync(path.join(authDir, "creds.json"));
100601
100601
  } catch {
100602
100602
  return false;
100603
100603
  }
@@ -1,5 +1,5 @@
1
- import { m as escapeRegExp } from "./exec-DJTRaYS6.js";
2
- import { At as HEARTBEAT_TOKEN } from "./pi-embedded-helpers-CeMv9QXO.js";
1
+ import { m as escapeRegExp } from "./exec-CK8CHr7j.js";
2
+ import { At as HEARTBEAT_TOKEN } from "./pi-embedded-helpers-CvYnWzAn.js";
3
3
 
4
4
  //#region src/auto-reply/heartbeat.ts
5
5
  const HEARTBEAT_PROMPT = "Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.";
@@ -1,6 +1,6 @@
1
- import { s as resolveStateDir } from "./paths-B-AkG5FD.js";
2
- import { M as parseAgentSessionKey, _ as DEFAULT_AGENT_ID, p as resolveDefaultAgentWorkspaceDir, w as normalizeAgentId } from "./workspace-CZlo4alz.js";
3
- import { w as resolveUserPath } from "./exec-DJTRaYS6.js";
1
+ import { s as resolveStateDir } from "./paths-D2eokayo.js";
2
+ import { M as parseAgentSessionKey, _ as DEFAULT_AGENT_ID, p as resolveDefaultAgentWorkspaceDir, w as normalizeAgentId } from "./workspace-xzxJwPTB.js";
3
+ import { w as resolveUserPath } from "./exec-CK8CHr7j.js";
4
4
  import path from "node:path";
5
5
 
6
6
  //#region src/agents/agent-scope.ts
@@ -10,7 +10,7 @@ import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin
10
10
  import { s as resolveSessionTranscriptsDirForAgent } from "./paths-DqBoV7GZ.js";
11
11
  import { a as ensureWorkspaceAndSessions, l as moveToTrash } from "./onboard-helpers-DKu_2enh.js";
12
12
  import { t as resolveChannelDefaultAccountId } from "./helpers-DziQXnUf.js";
13
- import { i as promptAuthChoiceGrouped, n as warnIfModelConfigLooksOff, r as applyAuthChoice } from "./auth-choice-BTMheCDo.js";
13
+ import { i as promptAuthChoiceGrouped, n as warnIfModelConfigLooksOff, r as applyAuthChoice } from "./auth-choice-CPDNhDPT.js";
14
14
  import { t as WizardCancelledError } from "./prompts-vr_Njtil.js";
15
15
  import { n as logConfigUpdated } from "./logging-B05aEFEO.js";
16
16
  import { a as loadAgentIdentity, i as listAgentEntries, l as parseIdentityMarkdown, n as buildAgentSummaries, o as pruneAgentConfig, r as findAgentEntryIndex, s as identityHasValues, t as applyAgentConfig } from "./agents.config-Dqcq7hEy.js";
@@ -18,6 +18,22 @@ import crypto from "node:crypto";
18
18
  */
19
19
  const TOKEN_PATH = path.join(os.homedir(), ".noxsoft-agent-token");
20
20
  const NOXSOFT_AUTH_BASE = "https://auth.noxsoft.net/api/agents";
21
+ function isRecord(value) {
22
+ return typeof value === "object" && value !== null;
23
+ }
24
+ function coerceAgentIdentity(payload) {
25
+ if (!isRecord(payload)) return null;
26
+ if ("agent" in payload) return coerceAgentIdentity(payload.agent);
27
+ const id = typeof payload.id === "string" ? payload.id : typeof payload.agent_id === "string" ? payload.agent_id : null;
28
+ const name = typeof payload.name === "string" ? payload.name : null;
29
+ const displayName = typeof payload.display_name === "string" ? payload.display_name : typeof payload.displayName === "string" ? payload.displayName : null;
30
+ if (!id || !name || !displayName) return null;
31
+ return {
32
+ id,
33
+ name,
34
+ display_name: displayName
35
+ };
36
+ }
21
37
  function getToken() {
22
38
  try {
23
39
  const token = fs.readFileSync(TOKEN_PATH, "utf-8").trim();
@@ -83,10 +99,7 @@ async function authenticateToken(token) {
83
99
  headers: { Authorization: `Bearer ${token}` }
84
100
  });
85
101
  if (!response.ok) return null;
86
- const data = await response.json();
87
- if ("agent" in data && data.agent) return data.agent;
88
- if ("id" in data && "name" in data && "display_name" in data) return data;
89
- return null;
102
+ return coerceAgentIdentity(await response.json());
90
103
  } catch {
91
104
  return null;
92
105
  }
@@ -1,14 +1,14 @@
1
1
  import { n as __exportAll } from "./chunk-BXK9XSlF.js";
2
- import { o as resolveOAuthPath, s as resolveStateDir } from "./paths-B-AkG5FD.js";
3
- import { _ as DEFAULT_AGENT_ID } from "./workspace-CZlo4alz.js";
4
- import { t as createSubsystemLogger } from "./subsystem-BlEuMJjX.js";
5
- import { w as resolveUserPath } from "./exec-DJTRaYS6.js";
2
+ import { o as resolveOAuthPath, s as resolveStateDir } from "./paths-D2eokayo.js";
3
+ import { _ as DEFAULT_AGENT_ID } from "./workspace-xzxJwPTB.js";
4
+ import { t as createSubsystemLogger } from "./subsystem-CJTCKTwb.js";
5
+ import { w as resolveUserPath } from "./exec-CK8CHr7j.js";
6
6
  import { t as formatCliCommand } from "./command-format-CZk1W3UP.js";
7
- import { s as normalizeProviderId } from "./model-selection-BsVvfxCt.js";
8
- import { n as saveJsonFile, t as loadJsonFile } from "./json-file-CZ3ssFR9.js";
7
+ import { s as normalizeProviderId } from "./model-selection-DPoLkg_t.js";
8
+ import { n as saveJsonFile, t as loadJsonFile } from "./json-file-Dvrir7_o.js";
9
9
  import fs from "node:fs/promises";
10
10
  import path from "node:path";
11
- import fs$1 from "node:fs";
11
+ import fsSync from "node:fs";
12
12
  import { execFileSync, execSync } from "node:child_process";
13
13
  import { getOAuthApiKey, getOAuthProviders } from "@mariozechner/pi-ai";
14
14
 
@@ -331,7 +331,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
331
331
  return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
332
332
  }
333
333
  function ensureAuthStoreFile(pathname) {
334
- if (fs$1.existsSync(pathname)) return;
334
+ if (fsSync.existsSync(pathname)) return;
335
335
  saveJsonFile(pathname, {
336
336
  version: AUTH_STORE_VERSION,
337
337
  profiles: {}
@@ -487,7 +487,7 @@ function loadAuthProfileStoreForAgent(agentDir, _options) {
487
487
  if (shouldWrite && legacy !== null) {
488
488
  const legacyPath = resolveLegacyAuthStorePath(agentDir);
489
489
  try {
490
- fs$1.unlinkSync(legacyPath);
490
+ fsSync.unlinkSync(legacyPath);
491
491
  } catch (err) {
492
492
  if (err?.code !== "ENOENT") log$1.warn("failed to delete legacy auth.json after migration", {
493
493
  err,
@@ -1,11 +1,11 @@
1
- import { a as resolveOAuthDir } from "./paths-B-AkG5FD.js";
2
- import { g as DEFAULT_ACCOUNT_ID } from "./workspace-CZlo4alz.js";
3
- import { D as getChildLogger, S as success, _ as info, n as defaultRuntime } from "./subsystem-BlEuMJjX.js";
4
- import { w as resolveUserPath, y as jidToE164 } from "./exec-DJTRaYS6.js";
1
+ import { a as resolveOAuthDir } from "./paths-D2eokayo.js";
2
+ import { g as DEFAULT_ACCOUNT_ID } from "./workspace-xzxJwPTB.js";
3
+ import { D as getChildLogger, S as success, _ as info, n as defaultRuntime } from "./subsystem-CJTCKTwb.js";
4
+ import { w as resolveUserPath, y as jidToE164 } from "./exec-CK8CHr7j.js";
5
5
  import { t as formatCliCommand } from "./command-format-CZk1W3UP.js";
6
6
  import fs from "node:fs/promises";
7
7
  import path from "node:path";
8
- import fs$1 from "node:fs";
8
+ import fsSync from "node:fs";
9
9
 
10
10
  //#region src/web/auth-store.ts
11
11
  function resolveDefaultWebAuthDir() {
@@ -20,10 +20,10 @@ function resolveWebCredsBackupPath(authDir) {
20
20
  }
21
21
  function readCredsJsonRaw(filePath) {
22
22
  try {
23
- if (!fs$1.existsSync(filePath)) return null;
24
- const stats = fs$1.statSync(filePath);
23
+ if (!fsSync.existsSync(filePath)) return null;
24
+ const stats = fsSync.statSync(filePath);
25
25
  if (!stats.isFile() || stats.size <= 1) return null;
26
- return fs$1.readFileSync(filePath, "utf-8");
26
+ return fsSync.readFileSync(filePath, "utf-8");
27
27
  } catch {
28
28
  return null;
29
29
  }
@@ -41,9 +41,9 @@ function maybeRestoreCredsFromBackup(authDir) {
41
41
  const backupRaw = readCredsJsonRaw(backupPath);
42
42
  if (!backupRaw) return;
43
43
  JSON.parse(backupRaw);
44
- fs$1.copyFileSync(backupPath, credsPath);
44
+ fsSync.copyFileSync(backupPath, credsPath);
45
45
  try {
46
- fs$1.chmodSync(credsPath, 384);
46
+ fsSync.chmodSync(credsPath, 384);
47
47
  } catch {}
48
48
  logger.warn({ credsPath }, "restored corrupted WhatsApp creds.json from backup");
49
49
  } catch {}
@@ -99,11 +99,11 @@ async function logoutWeb(params) {
99
99
  function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
100
100
  try {
101
101
  const credsPath = resolveWebCredsPath(resolveUserPath(authDir));
102
- if (!fs$1.existsSync(credsPath)) return {
102
+ if (!fsSync.existsSync(credsPath)) return {
103
103
  e164: null,
104
104
  jid: null
105
105
  };
106
- const raw = fs$1.readFileSync(credsPath, "utf-8");
106
+ const raw = fsSync.readFileSync(credsPath, "utf-8");
107
107
  const jid = JSON.parse(raw)?.me?.id ?? null;
108
108
  return {
109
109
  e164: jid ? jidToE164(jid, { authDir }) : null,
@@ -122,7 +122,7 @@ function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
122
122
  */
123
123
  function getWebAuthAgeMs(authDir = resolveDefaultWebAuthDir()) {
124
124
  try {
125
- const stats = fs$1.statSync(resolveWebCredsPath(resolveUserPath(authDir)));
125
+ const stats = fsSync.statSync(resolveWebCredsPath(resolveUserPath(authDir)));
126
126
  return Date.now() - stats.mtimeMs;
127
127
  } catch {
128
128
  return null;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.0.0",
3
- "commit": "a0f84971c2d7b16d88e974e5ec094699c186619e",
4
- "builtAt": "2026-03-03T13:03:00.424Z"
2
+ "version": "3.0.2",
3
+ "commit": "020efc51e694e57f2ee4d9f5e427bc29e537c7e6",
4
+ "builtAt": "2026-03-03T13:49:03.014Z"
5
5
  }
@@ -1,27 +1,27 @@
1
- import "../../paths-B-AkG5FD.js";
2
- import { E as resolveAgentIdFromSessionKey, T as normalizeMainKey, l as ensureAgentWorkspace, w as normalizeAgentId } from "../../workspace-CZlo4alz.js";
3
- import { c as DEFAULT_CHAT_CHANNEL, n as defaultRuntime, t as createSubsystemLogger } from "../../subsystem-BlEuMJjX.js";
4
- import "../../exec-DJTRaYS6.js";
5
- import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds } from "../../agent-scope-BXuH9s05.js";
1
+ import "../../paths-D2eokayo.js";
2
+ import { E as resolveAgentIdFromSessionKey, T as normalizeMainKey, l as ensureAgentWorkspace, w as normalizeAgentId } from "../../workspace-xzxJwPTB.js";
3
+ import { c as DEFAULT_CHAT_CHANNEL, n as defaultRuntime, t as createSubsystemLogger } from "../../subsystem-CJTCKTwb.js";
4
+ import "../../exec-CK8CHr7j.js";
5
+ import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds } from "../../agent-scope-DWKQJUUZ.js";
6
6
  import { s as runEmbeddedPiAgent } from "../../pi-embedded-CVojjlMb.js";
7
7
  import { t as formatCliCommand } from "../../command-format-CZk1W3UP.js";
8
- import "../../auth-store-Bis9WSLR.js";
9
- import { Ct as resolveMainSessionKey, St as resolveExplicitAgentSessionKey, _t as resolveSessionResetType, at as updateSessionStore, c as normalizeVerboseLevel, ft as normalizeAccountId, gt as resolveSessionResetPolicy, ht as resolveChannelResetConfig, j as buildWorkspaceSkillSnapshot, jt as SILENT_REPLY_TOKEN, mt as evaluateSessionFreshness, n as formatXHighModelHint, o as normalizeThinkLevel, pt as resolveSessionKey, t as formatThinkingLevels, tt as loadSessionStore, u as supportsXHighThinking } from "../../pi-embedded-helpers-CeMv9QXO.js";
10
- import { o as ensureAuthProfileStore } from "../../auth-profiles-xk_1uopf.js";
11
- import { a as modelKey, f as resolveThinkingDefault, h as DEFAULT_PROVIDER, i as isCliProvider, l as resolveConfiguredModelRef, m as DEFAULT_MODEL, o as normalizeModelRef, p as DEFAULT_CONTEXT_TOKENS, t as buildAllowedModelSet } from "../../model-selection-BsVvfxCt.js";
12
- import { A as normalizeMessageChannel, C as normalizeChannelId, D as isInternalMessageChannel, E as isGatewayMessageChannel, M as resolveMessageChannel, T as isDeliverableMessageChannel, w as INTERNAL_MESSAGE_CHANNEL, x as getChannelPlugin } from "../../image-ops-ZMEg1-kE.js";
13
- import { n as loadConfig } from "../../config-CrQw7iqE.js";
8
+ import "../../auth-store-eNVxoq_h.js";
9
+ import { Ct as resolveMainSessionKey, St as resolveExplicitAgentSessionKey, _t as resolveSessionResetType, at as updateSessionStore, c as normalizeVerboseLevel, ft as normalizeAccountId, gt as resolveSessionResetPolicy, ht as resolveChannelResetConfig, j as buildWorkspaceSkillSnapshot, jt as SILENT_REPLY_TOKEN, mt as evaluateSessionFreshness, n as formatXHighModelHint, o as normalizeThinkLevel, pt as resolveSessionKey, t as formatThinkingLevels, tt as loadSessionStore, u as supportsXHighThinking } from "../../pi-embedded-helpers-CvYnWzAn.js";
10
+ import { o as ensureAuthProfileStore } from "../../auth-profiles-BqrAPweI.js";
11
+ import { a as modelKey, f as resolveThinkingDefault, h as DEFAULT_PROVIDER, i as isCliProvider, l as resolveConfiguredModelRef, m as DEFAULT_MODEL, o as normalizeModelRef, p as DEFAULT_CONTEXT_TOKENS, t as buildAllowedModelSet } from "../../model-selection-DPoLkg_t.js";
12
+ import { A as normalizeMessageChannel, C as normalizeChannelId, D as isInternalMessageChannel, E as isGatewayMessageChannel, M as resolveMessageChannel, T as isDeliverableMessageChannel, w as INTERNAL_MESSAGE_CHANNEL, x as getChannelPlugin } from "../../image-ops-DJjERl7d.js";
13
+ import { n as loadConfig } from "../../config-H_VHtPeY.js";
14
14
  import "../../boolean-BsqeuxE6.js";
15
- import "../../shell-env-5vFwNQcz.js";
16
- import { n as resolveSessionFilePath, s as resolveStorePath } from "../../paths-OaazGgrn.js";
17
- import { C as setCliSessionId, S as getCliSessionId, _ as runWithModelFallback, a as lookupContextTokens, d as applyModelOverrideToSessionEntry, f as applyVerboseOverride, h as getSkillsSnapshotVersion, n as deriveSessionTotalTokens, o as resolveOutboundTarget, p as getRemoteSkillEligibility, r as hasNonzeroUsage, s as resolveSessionDeliveryTarget, tt as clearSessionAuthProfileOverride, u as resolveSendPolicy, w as runCliAgent, y as loadModelCatalog } 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, t as clearAgentRunContext } from "../../agent-events-BiKKV3wj.js";
19
- import "../../chrome-C1KpzLwu.js";
20
- import "../../frontmatter-DDYuWuK5.js";
21
- import "../../tool-images-2qKyjXUj.js";
22
- import "../../model-auth-C4Jglp-Y.js";
23
- import "../../chunk-Cguey_55.js";
24
- import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "../../deliver-Bri9Y1qG.js";
15
+ import "../../shell-env-BBHdjHEl.js";
16
+ import { n as resolveSessionFilePath, s as resolveStorePath } from "../../paths-CmZenvlb.js";
17
+ import { C as setCliSessionId, S as getCliSessionId, _ as runWithModelFallback, a as lookupContextTokens, d as applyModelOverrideToSessionEntry, f as applyVerboseOverride, h as getSkillsSnapshotVersion, n as deriveSessionTotalTokens, o as resolveOutboundTarget, p as getRemoteSkillEligibility, r as hasNonzeroUsage, s as resolveSessionDeliveryTarget, tt as clearSessionAuthProfileOverride, u as resolveSendPolicy, w as runCliAgent, y as loadModelCatalog } 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, t as clearAgentRunContext } from "../../agent-events-iR_gRjZA.js";
19
+ import "../../chrome-s7nTgmbn.js";
20
+ import "../../frontmatter-BBFYH_d2.js";
21
+ import "../../tool-images-DBOSl4NL.js";
22
+ import "../../model-auth-ChSwMwh7.js";
23
+ import "../../chunk-lDG_8LI5.js";
24
+ import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "../../deliver-DyQtnfXd.js";
25
25
  import fs from "node:fs/promises";
26
26
  import path from "node:path";
27
27
  import crypto from "node:crypto";
@@ -29,7 +29,7 @@ import crypto from "node:crypto";
29
29
  //#region src/cli/deps.ts
30
30
  function createDefaultDeps() {
31
31
  return { sendMessageWhatsApp: async (...args) => {
32
- const { sendMessageWhatsApp } = await import("../../web-CTS-vEIT.js");
32
+ const { sendMessageWhatsApp } = await import("../../web-DY2TrPoD.js");
33
33
  return await sendMessageWhatsApp(...args);
34
34
  } };
35
35
  }
@@ -1,11 +1,11 @@
1
- import "../../paths-B-AkG5FD.js";
2
- import { d as loadExtraBootstrapFiles, u as filterBootstrapFilesForSession } from "../../workspace-CZlo4alz.js";
3
- import "../../subsystem-BlEuMJjX.js";
4
- import "../../exec-DJTRaYS6.js";
1
+ import "../../paths-D2eokayo.js";
2
+ import { d as loadExtraBootstrapFiles, u as filterBootstrapFilesForSession } from "../../workspace-xzxJwPTB.js";
3
+ import "../../subsystem-CJTCKTwb.js";
4
+ import "../../exec-CK8CHr7j.js";
5
5
  import "../../boolean-BsqeuxE6.js";
6
6
  import { n as isAgentBootstrapEvent } from "../../internal-hooks-CmG29WRF.js";
7
- import "../../frontmatter-DDYuWuK5.js";
8
- import { t as resolveHookConfig } from "../../config-Btt1rkoB.js";
7
+ import "../../frontmatter-BBFYH_d2.js";
8
+ import { t as resolveHookConfig } from "../../config-COtiNNtV.js";
9
9
 
10
10
  //#region src/hooks/bundled/bootstrap-extra-files/handler.ts
11
11
  const HOOK_KEY = "bootstrap-extra-files";
@@ -1,4 +1,4 @@
1
- import { s as resolveStateDir } from "../../paths-B-AkG5FD.js";
1
+ import { s as resolveStateDir } from "../../paths-D2eokayo.js";
2
2
  import fs from "node:fs/promises";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
@@ -1,13 +1,13 @@
1
- import { s as resolveStateDir } from "../../paths-B-AkG5FD.js";
2
- import { E as resolveAgentIdFromSessionKey } from "../../workspace-CZlo4alz.js";
3
- import { t as createSubsystemLogger } from "../../subsystem-BlEuMJjX.js";
4
- import "../../exec-DJTRaYS6.js";
5
- import { s as resolveAgentWorkspaceDir } from "../../agent-scope-BXuH9s05.js";
1
+ import { s as resolveStateDir } from "../../paths-D2eokayo.js";
2
+ import { E as resolveAgentIdFromSessionKey } from "../../workspace-xzxJwPTB.js";
3
+ import { t as createSubsystemLogger } from "../../subsystem-CJTCKTwb.js";
4
+ import "../../exec-CK8CHr7j.js";
5
+ import { s as resolveAgentWorkspaceDir } from "../../agent-scope-DWKQJUUZ.js";
6
6
  import { generateSlugViaLLM } from "../../llm-slug-generator.js";
7
7
  import "../../boolean-BsqeuxE6.js";
8
- import "../../frontmatter-DDYuWuK5.js";
9
- import { n as hasInterSessionUserProvenance } from "../../input-provenance-B0pwc6mp.js";
10
- import { t as resolveHookConfig } from "../../config-Btt1rkoB.js";
8
+ import "../../frontmatter-BBFYH_d2.js";
9
+ import { t as resolveHookConfig } from "../../config-COtiNNtV.js";
10
+ import { n as hasInterSessionUserProvenance } from "../../input-provenance-MbkIKHHL.js";
11
11
  import fs from "node:fs/promises";
12
12
  import os from "node:os";
13
13
  import path from "node:path";
@@ -1 +1 @@
1
- c018ec9b765b50eaa3503701d62d736017c3c35a022a33e86f7817f7270dcfd3
1
+ 9ed09ad1664dc1fe854523f41eff090ca7bb829a59145a38e0cd3af0c07dda73
@@ -1,10 +1,10 @@
1
- import { t as createSubsystemLogger } from "./subsystem-BlEuMJjX.js";
2
- import { l as CONFIG_DIR } from "./exec-DJTRaYS6.js";
1
+ import { t as createSubsystemLogger } from "./subsystem-CJTCKTwb.js";
2
+ import { l as CONFIG_DIR } from "./exec-CK8CHr7j.js";
3
3
  import { r as isErrno } from "./errors-DzK5Mvu0.js";
4
4
  import fs from "node:fs/promises";
5
5
  import os from "node:os";
6
6
  import path from "node:path";
7
- import fs$1 from "node:fs";
7
+ import fsSync from "node:fs";
8
8
  import { execFileSync, spawn } from "node:child_process";
9
9
  import { randomBytes } from "node:crypto";
10
10
  import net from "node:net";
@@ -937,7 +937,7 @@ const CHROMIUM_EXE_NAMES = new Set([
937
937
  ]);
938
938
  function exists$1(filePath) {
939
939
  try {
940
- return fs$1.existsSync(filePath);
940
+ return fsSync.existsSync(filePath);
941
941
  } catch {
942
942
  return false;
943
943
  }
@@ -1080,7 +1080,7 @@ function findDesktopFilePath(desktopId) {
1080
1080
  }
1081
1081
  function readDesktopExecLine(desktopPath) {
1082
1082
  try {
1083
- const lines = fs$1.readFileSync(desktopPath, "utf8").split(/\r?\n/);
1083
+ const lines = fsSync.readFileSync(desktopPath, "utf8").split(/\r?\n/);
1084
1084
  for (const line of lines) if (line.startsWith("Exec=")) return line.slice(5).trim();
1085
1085
  } catch {}
1086
1086
  return null;
@@ -1367,8 +1367,8 @@ function decoratedMarkerPath(userDataDir) {
1367
1367
  }
1368
1368
  function safeReadJson(filePath) {
1369
1369
  try {
1370
- if (!fs$1.existsSync(filePath)) return null;
1371
- const raw = fs$1.readFileSync(filePath, "utf-8");
1370
+ if (!fsSync.existsSync(filePath)) return null;
1371
+ const raw = fsSync.readFileSync(filePath, "utf-8");
1372
1372
  const parsed = JSON.parse(raw);
1373
1373
  if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
1374
1374
  return parsed;
@@ -1377,8 +1377,8 @@ function safeReadJson(filePath) {
1377
1377
  }
1378
1378
  }
1379
1379
  function safeWriteJson(filePath, data) {
1380
- fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
1381
- fs$1.writeFileSync(filePath, JSON.stringify(data, null, 2));
1380
+ fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
1381
+ fsSync.writeFileSync(filePath, JSON.stringify(data, null, 2));
1382
1382
  }
1383
1383
  function setDeep(obj, keys, value) {
1384
1384
  let node = obj;
@@ -1505,7 +1505,7 @@ function decorateAnimaProfile(userDataDir, opts) {
1505
1505
  }
1506
1506
  safeWriteJson(preferencesPath, prefs);
1507
1507
  try {
1508
- fs$1.writeFileSync(decoratedMarkerPath(userDataDir), `${Date.now()}\n`, "utf-8");
1508
+ fsSync.writeFileSync(decoratedMarkerPath(userDataDir), `${Date.now()}\n`, "utf-8");
1509
1509
  } catch {}
1510
1510
  }
1511
1511
  function ensureProfileCleanExit(userDataDir) {
@@ -1521,7 +1521,7 @@ function ensureProfileCleanExit(userDataDir) {
1521
1521
  const log = createSubsystemLogger("browser").child("chrome");
1522
1522
  function exists(filePath) {
1523
1523
  try {
1524
- return fs$1.existsSync(filePath);
1524
+ return fsSync.existsSync(filePath);
1525
1525
  } catch {
1526
1526
  return false;
1527
1527
  }
@@ -1601,7 +1601,7 @@ async function launchAnimaChrome(resolved, profile) {
1601
1601
  const exe = resolveBrowserExecutable(resolved);
1602
1602
  if (!exe) throw new Error("No supported browser found (Chrome/Brave/Edge/Chromium on macOS, Linux, or Windows).");
1603
1603
  const userDataDir = resolveAnimaUserDataDir(profile.name);
1604
- fs$1.mkdirSync(userDataDir, { recursive: true });
1604
+ fsSync.mkdirSync(userDataDir, { recursive: true });
1605
1605
  const needsDecorate = !isProfileDecorated(userDataDir, profile.name, (profile.color ?? DEFAULT_ANIMA_BROWSER_COLOR).toUpperCase());
1606
1606
  const spawnOnce = () => {
1607
1607
  const args = [
@@ -1,5 +1,5 @@
1
- import { C as normalizeAccountId } from "./workspace-CZlo4alz.js";
2
- import { w as INTERNAL_MESSAGE_CHANNEL } from "./image-ops-ZMEg1-kE.js";
1
+ import { C as normalizeAccountId } from "./workspace-xzxJwPTB.js";
2
+ import { w as INTERNAL_MESSAGE_CHANNEL } from "./image-ops-DJjERl7d.js";
3
3
 
4
4
  //#region src/markdown/fences.ts
5
5
  function parseFenceSpans(buffer) {
@@ -1,7 +1,7 @@
1
1
  import { B as theme } from "./subsystem-BaJ-PqmA.js";
2
2
  import { t as createCliProgress } from "./progress-gdB4V88Q.js";
3
3
  import { n as stylePromptMessage, r as stylePromptTitle, t as stylePromptHint } from "./prompt-style-CXrnxWQG.js";
4
- import { t as WizardCancelledError } from "./prompts-Cm8eJ-i3.js";
4
+ import { t as WizardCancelledError } from "./prompts-BT5ztuUd.js";
5
5
  import { t as note$1 } from "./note-CLRVmCnr.js";
6
6
  import { cancel, confirm, intro, isCancel, multiselect, outro, select, spinner, text } from "@clack/prompts";
7
7