@wirecat/mail-cli 0.25.0 → 0.27.0

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 (157) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +3 -0
  3. package/contracts/wirecat.json +1325 -0
  4. package/dist/bin/mail.js +2 -2
  5. package/dist/bin/mail.js.map +1 -1
  6. package/dist/bundle/{all-profiles-QEV2PSOR.js → all-profiles-5XWH7TBM.js} +11 -11
  7. package/dist/bundle/{anthropic-5NKQXIHM.js → anthropic-QEQGUEPW.js} +5 -5
  8. package/dist/bundle/{app-server-G2CJNT4R.js → app-server-YWDU56NR.js} +55 -51
  9. package/dist/bundle/{bun-6HBYWQIX.js → bun-PWMM6L45.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-DXIQ7BVR.js → bun-sqlite-S4QD5YUO.js} +6 -6
  11. package/dist/bundle/{chunk-37F6QYTO.js → chunk-255RGG5W.js} +6 -6
  12. package/dist/bundle/{chunk-DIA56CS7.js → chunk-2FZMIJW7.js} +11 -7
  13. package/dist/bundle/{chunk-S2QRAKQI.js → chunk-4VDWQKDI.js} +17 -17
  14. package/dist/bundle/{chunk-QB3DP2TN.js → chunk-572NWJUN.js} +2 -2
  15. package/dist/bundle/{chunk-PHHH2NQP.js → chunk-5BPOEPYL.js} +15 -113
  16. package/dist/bundle/{chunk-VL6H2BND.js → chunk-5DLPM5AV.js} +18 -17
  17. package/dist/bundle/{chunk-HEIDAHRC.js → chunk-77J5ID2O.js} +2 -2
  18. package/dist/bundle/{chunk-5ZYFV6FD.js → chunk-7BXOFLWJ.js} +129 -74
  19. package/dist/bundle/{chunk-L4QVOEOB.js → chunk-7C6FGWDH.js} +4 -4
  20. package/dist/bundle/{chunk-VUBZFMGP.js → chunk-7KCBPAQS.js} +2 -2
  21. package/dist/bundle/{chunk-TY644DKQ.js → chunk-7MEVD5PI.js} +57 -28
  22. package/dist/bundle/{chunk-WOAYHCM2.js → chunk-AIEMFRBU.js} +1 -1
  23. package/dist/bundle/{chunk-WX6OYVCH.js → chunk-AIZ225IA.js} +379 -270
  24. package/dist/bundle/{chunk-K2OGF7KC.js → chunk-APLVXHFG.js} +2 -2
  25. package/dist/bundle/{chunk-GY4XCLCO.js → chunk-BZCXAVGP.js} +8 -8
  26. package/dist/bundle/{chunk-434YOD6A.js → chunk-CKFVKHTB.js} +4 -4
  27. package/dist/bundle/{chunk-B7SWTH5O.js → chunk-CZRMT6XV.js} +2 -2
  28. package/dist/bundle/{chunk-Z5T6OW3V.js → chunk-DQO2LX5I.js} +4 -4
  29. package/dist/bundle/{chunk-OLKCJBZY.js → chunk-DSUOYJUL.js} +5 -5
  30. package/dist/bundle/{chunk-IZOYW4Z4.js → chunk-ECZSYLSL.js} +24 -9
  31. package/dist/bundle/{chunk-YNS2YVUR.js → chunk-ELPH22W6.js} +9 -9
  32. package/dist/bundle/{chunk-JG4MNYG2.js → chunk-EXWZCI5G.js} +1 -1
  33. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
  34. package/dist/bundle/{chunk-HLXVUMZJ.js → chunk-FOTP6QLO.js} +2 -2
  35. package/dist/bundle/{chunk-SMTBV62X.js → chunk-FVVSBQGK.js} +29 -25
  36. package/dist/bundle/{chunk-XQYKIZMG.js → chunk-HBK6MRAL.js} +12 -9
  37. package/dist/bundle/{chunk-5QYK3LWS.js → chunk-IDOHT4Z3.js} +123 -42
  38. package/dist/bundle/{chunk-4W4EVVL4.js → chunk-IX3GUNGV.js} +4 -4
  39. package/dist/bundle/{chunk-7GLJSJ7M.js → chunk-KHBZ4OEP.js} +1 -1
  40. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
  41. package/dist/bundle/{chunk-CBYBZCQP.js → chunk-MY4LVD64.js} +3 -2
  42. package/dist/bundle/{chunk-OLLIWNFG.js → chunk-NZG6IRDW.js} +3 -3
  43. package/dist/bundle/{chunk-ND5H5ADM.js → chunk-OC3U2JAK.js} +4 -4
  44. package/dist/bundle/{chunk-KFB2X6KE.js → chunk-OCUKQRJ3.js} +201 -160
  45. package/dist/bundle/{chunk-PQMJ5BXH.js → chunk-OEPNLKHI.js} +4 -4
  46. package/dist/bundle/{chunk-GJRYZXBN.js → chunk-OPOEAGVB.js} +9 -9
  47. package/dist/bundle/{chunk-VFU7PVPQ.js → chunk-PA7LDYVX.js} +62 -60
  48. package/dist/bundle/{chunk-NMZQTYKJ.js → chunk-PJ3FKBXG.js} +1 -1
  49. package/dist/bundle/{chunk-A6BPOX5O.js → chunk-PRSXMM4I.js} +3825 -3516
  50. package/dist/bundle/{chunk-HEYVMAAQ.js → chunk-QQTSPQ2D.js} +2 -2
  51. package/dist/bundle/{chunk-IXO4SCKE.js → chunk-QVJMFZFW.js} +1 -1
  52. package/dist/bundle/{chunk-J4OYK4WL.js → chunk-R3A65A4D.js} +12 -12
  53. package/dist/bundle/{chunk-QQUY4MZY.js → chunk-R5FTCNLJ.js} +1 -1
  54. package/dist/bundle/{chunk-XMDEM6BZ.js → chunk-RGQFVVBB.js} +276 -254
  55. package/dist/bundle/{chunk-FZZD4AFY.js → chunk-ROLHKFKB.js} +26 -18
  56. package/dist/bundle/{chunk-PP3YOAWG.js → chunk-RRLAFEPQ.js} +3 -3
  57. package/dist/bundle/{chunk-3XVR2ROR.js → chunk-S2QRW647.js} +35 -31
  58. package/dist/bundle/{chunk-G5LHHAW2.js → chunk-S7H7TAC3.js} +6 -6
  59. package/dist/bundle/{chunk-U6IQ6YQ2.js → chunk-SXKKOOA7.js} +8 -2
  60. package/dist/bundle/{chunk-MBFPFWCO.js → chunk-T7VERZP5.js} +27 -27
  61. package/dist/bundle/{chunk-ADKMBXY4.js → chunk-TI2OANJZ.js} +1 -1
  62. package/dist/bundle/{chunk-EXVY76VO.js → chunk-TKOZCIHU.js} +19 -18
  63. package/dist/bundle/{chunk-BC7PFQL7.js → chunk-UBH4UPZ7.js} +40 -2
  64. package/dist/bundle/{chunk-P6GXNT7Z.js → chunk-UEJVXUIO.js} +13 -13
  65. package/dist/bundle/{chunk-IACWKZWS.js → chunk-UIKVP23D.js} +1 -1
  66. package/dist/bundle/{chunk-LGZPKKBN.js → chunk-VYZ37D2Q.js} +3 -2
  67. package/dist/bundle/{chunk-HJSJBNCJ.js → chunk-WMXUFUV3.js} +28 -9
  68. package/dist/bundle/{chunk-CIWWNBVW.js → chunk-WRHAX53U.js} +8 -8
  69. package/dist/bundle/{chunk-LVGX7VTD.js → chunk-XBL46B4V.js} +63 -5
  70. package/dist/bundle/{chunk-KK4HD3SI.js → chunk-XCYDTIVK.js} +7 -7
  71. package/dist/bundle/{chunk-PGC5TRH6.js → chunk-XM2THVMR.js} +3 -3
  72. package/dist/bundle/{chunk-MWGH3M46.js → chunk-ZSWSFKNE.js} +5 -7
  73. package/dist/bundle/{chunk-T27IMG6X.js → chunk-ZVQDOKDY.js} +1 -1
  74. package/dist/bundle/command-contract-MIJONVVG.js +36 -0
  75. package/dist/bundle/{command-server-entry-XMSSY5ID.js → command-server-entry-VHUFW3OZ.js} +25 -25
  76. package/dist/bundle/{decode-RYGB4PGT.js → decode-TIMTSVXM.js} +5 -5
  77. package/dist/bundle/{dispatch-PLQOIZG5.js → dispatch-DSVN7MNG.js} +8 -8
  78. package/dist/bundle/{dist-GY2AQETI.js → dist-IP25JFTN.js} +19 -15
  79. package/dist/bundle/{echarts-7CM2MCMW.js → echarts-SDZA2SWG.js} +2 -2
  80. package/dist/bundle/{embed-FTBDPOPT.js → embed-4W527BCE.js} +6 -6
  81. package/dist/bundle/{embedder-B43WGNBD.js → embedder-LQE2SBJ3.js} +9 -9
  82. package/dist/bundle/{failure-XP5QYV2T.js → failure-COTPFUP4.js} +2 -2
  83. package/dist/bundle/{first-run-XIIUARNM.js → first-run-KZTKMEI4.js} +12 -12
  84. package/dist/bundle/first-screen-4LG5SJ6D.js +34 -0
  85. package/dist/bundle/{instructions-R7OHVAWH.js → instructions-7T6JJIFS.js} +1 -1
  86. package/dist/bundle/mail.js +15 -20
  87. package/dist/bundle/{mcp-7KQUJNFN.js → mcp-TDKGDB4V.js} +2 -2
  88. package/dist/bundle/{node-3N2JGZ7V.js → node-BZDMUFTW.js} +2 -2
  89. package/dist/bundle/{node-sqlite-WFJXW3CZ.js → node-sqlite-PVSKI4OS.js} +7 -7
  90. package/dist/bundle/{oauth-SVJLQTWV.js → oauth-TGYGAVGF.js} +7 -7
  91. package/dist/bundle/{open-ZDONVKSX.js → open-5YED4Q4C.js} +5 -5
  92. package/dist/bundle/{openai-XVEW6XOU.js → openai-XVJTML22.js} +21 -20
  93. package/dist/bundle/{process-YAHHUFR5.js → process-756VBE7E.js} +1 -1
  94. package/dist/bundle/{program-HU2UVMJE.js → program-TDHDXAQA.js} +1499 -998
  95. package/dist/bundle/{prompt-JAJ2CUJI.js → prompt-HPZANASN.js} +5 -5
  96. package/dist/bundle/{recognize-UFBWUNFR.js → recognize-PP5XQQHH.js} +4 -4
  97. package/dist/bundle/{remote-2GFOVLCR.js → remote-C2LU2WYG.js} +9 -9
  98. package/dist/bundle/{rerank-BGPSMXTL.js → rerank-WRHNOM4Z.js} +7 -7
  99. package/dist/bundle/{serve-CB3XJTH3.js → serve-RE3IV2QB.js} +9 -9
  100. package/dist/bundle/server-43V7HNFY.js +68 -0
  101. package/dist/bundle/{server-M7FQY7TX.js → server-52BJ7UTO.js} +44 -42
  102. package/dist/bundle/{sqlite-runtime-AEV6PGDR.js → sqlite-runtime-CRRL3MYX.js} +6 -6
  103. package/dist/bundle/{state-YLBEQLBI.js → state-YGJRPMWD.js} +6 -6
  104. package/dist/bundle/{store-EKWKY6GG.js → store-6AZ5LVJL.js} +21 -19
  105. package/dist/bundle/{store-CDUL3HKK.js → store-ESQE4VHP.js} +17 -17
  106. package/dist/bundle/store-maintenance-command-AKQMKUYO.js +58 -0
  107. package/dist/commands/rules.d.ts.map +1 -1
  108. package/dist/commands/rules.js +57 -19
  109. package/dist/commands/rules.js.map +1 -1
  110. package/dist/commands/session-start.d.ts.map +1 -1
  111. package/dist/commands/session-start.js +1 -1
  112. package/dist/commands/session-start.js.map +1 -1
  113. package/dist/config.d.ts +1 -0
  114. package/dist/config.d.ts.map +1 -1
  115. package/dist/config.js +13 -12
  116. package/dist/config.js.map +1 -1
  117. package/dist/discovery.d.ts.map +1 -1
  118. package/dist/discovery.js +7 -2
  119. package/dist/discovery.js.map +1 -1
  120. package/dist/identity.d.ts +2 -0
  121. package/dist/identity.d.ts.map +1 -1
  122. package/dist/identity.js +34 -0
  123. package/dist/identity.js.map +1 -1
  124. package/dist/mail/domain-age.d.ts +1 -1
  125. package/dist/mail/domain-age.d.ts.map +1 -1
  126. package/dist/mail/domain-age.js +9 -3
  127. package/dist/mail/domain-age.js.map +1 -1
  128. package/dist/mail/rules/file.d.ts.map +1 -1
  129. package/dist/mail/rules/file.js +4 -1
  130. package/dist/mail/rules/file.js.map +1 -1
  131. package/dist/mail/rules/query.d.ts +2 -1
  132. package/dist/mail/rules/query.d.ts.map +1 -1
  133. package/dist/mail/rules/query.js +16 -3
  134. package/dist/mail/rules/query.js.map +1 -1
  135. package/dist/oauth.d.ts +3 -1
  136. package/dist/oauth.d.ts.map +1 -1
  137. package/dist/oauth.js +48 -34
  138. package/dist/oauth.js.map +1 -1
  139. package/dist/reasons.d.ts.map +1 -1
  140. package/dist/reasons.js +5 -0
  141. package/dist/reasons.js.map +1 -1
  142. package/dist/store.d.ts.map +1 -1
  143. package/dist/store.js +2 -21
  144. package/dist/store.js.map +1 -1
  145. package/dist/version.d.ts +1 -1
  146. package/dist/version.js +1 -1
  147. package/dist/wcat.d.ts +3 -0
  148. package/dist/wcat.d.ts.map +1 -0
  149. package/dist/wcat.js +4 -0
  150. package/dist/wcat.js.map +1 -0
  151. package/package.json +10 -9
  152. package/dist/bundle/chunk-K6HR6HCO.js +0 -32
  153. package/dist/bundle/command-contract-XSW2Q33S.js +0 -36
  154. package/dist/bundle/first-screen-Z7HC6PQU.js +0 -34
  155. package/dist/bundle/server-34GEF22R.js +0 -68
  156. package/dist/bundle/store-maintenance-command-XH2JUM5F.js +0 -58
  157. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-XWBPP2HX.js} +0 -0
@@ -3,26 +3,26 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  executableEnvironment,
5
5
  executableOnPath
6
- } from "./chunk-MCPOZNWG.js";
6
+ } from "./chunk-FIVFP53N.js";
7
7
  import {
8
8
  require_cross_spawn
9
9
  } from "./chunk-D72URWJE.js";
10
10
  import {
11
11
  loadConfigFile,
12
12
  saveConfigFile
13
- } from "./chunk-TY644DKQ.js";
13
+ } from "./chunk-7MEVD5PI.js";
14
14
  import {
15
15
  number,
16
16
  object,
17
17
  optional,
18
18
  string
19
- } from "./chunk-IZOYW4Z4.js";
19
+ } from "./chunk-ECZSYLSL.js";
20
20
  import {
21
21
  __name,
22
22
  __toESM
23
23
  } from "./chunk-ZVVMGPBJ.js";
24
24
 
25
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
25
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
26
26
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
27
27
  import { existsSync } from "node:fs";
28
28
  var updateCommand = /* @__PURE__ */ __name((installer, packageName) => {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
8
8
  var errorCodes = [
9
9
  "validation_error",
10
10
  "configuration_error",
@@ -39,7 +39,7 @@ var CliError = class extends Error {
39
39
  };
40
40
  var isCliError = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && value[BRAND] === true, "isCliError");
41
41
 
42
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
42
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
43
43
  var CONTROL = (
44
44
  // biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
45
45
  /[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
@@ -19,11 +19,11 @@ import {
19
19
  string,
20
20
  text,
21
21
  unknown
22
- } from "./chunk-IZOYW4Z4.js";
22
+ } from "./chunk-ECZSYLSL.js";
23
23
  import {
24
24
  CliError,
25
25
  visibleControls
26
- } from "./chunk-VUBZFMGP.js";
26
+ } from "./chunk-7KCBPAQS.js";
27
27
  import {
28
28
  __commonJS,
29
29
  __name,
@@ -1896,7 +1896,8 @@ var require_cli_table3 = __commonJS({
1896
1896
  }
1897
1897
  });
1898
1898
 
1899
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
1899
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
1900
+ import { realpathSync } from "node:fs";
1900
1901
  import { homedir, userInfo } from "node:os";
1901
1902
  import { join, posix, win32 } from "node:path";
1902
1903
  var PATH_KINDS = ["config", "state", "cache"];
@@ -1920,8 +1921,36 @@ var defaultPaths = /* @__PURE__ */ __name(({ appName, env = process.env, platfor
1920
1921
  cache: posix.join(env.XDG_CACHE_HOME || posix.join(home, ".cache"), appName)
1921
1922
  };
1922
1923
  }, "defaultPaths");
1924
+ var accountHome = /* @__PURE__ */ __name(() => {
1925
+ try {
1926
+ return userInfo().homedir;
1927
+ } catch {
1928
+ return void 0;
1929
+ }
1930
+ }, "accountHome");
1931
+ var sameFolder = /* @__PURE__ */ __name((a, b, platform) => {
1932
+ if ((platform === "win32" ? win32 : posix).relative(a, b) === "")
1933
+ return true;
1934
+ try {
1935
+ return realpathSync.native(a) === realpathSync.native(b);
1936
+ } catch {
1937
+ return false;
1938
+ }
1939
+ }, "sameFolder");
1940
+ var refuseOwnerHomeInTests = /* @__PURE__ */ __name((env = process.env, platform = process.platform, account = accountHome) => {
1941
+ const named = [env.HOME, env.USERPROFILE].filter((home) => Boolean(home));
1942
+ if ((named.length > 0 ? env.VITEST : env.VITEST ?? process.env.VITEST) === void 0)
1943
+ return;
1944
+ const owner = account();
1945
+ if (owner === void 0)
1946
+ return;
1947
+ for (const home of named.length > 0 ? named : [homedir()])
1948
+ if (sameFolder(owner, home, platform))
1949
+ throw new Error(`a test is running with the owner's real home (${home}); load @wirecat/cli-base/testing/setup (\`vitest --root\` outside the repository skips it) or give the test a HOME of its own`);
1950
+ }, "refuseOwnerHomeInTests");
1923
1951
  var resolvePaths = /* @__PURE__ */ __name((options) => {
1924
- const { appName, prefix, env = process.env } = options;
1952
+ const { appName, prefix, env = process.env, platform = process.platform } = options;
1953
+ refuseOwnerHomeInTests(env, platform);
1925
1954
  const base = defaultPaths(options);
1926
1955
  return {
1927
1956
  config: env[overrideName(appName, prefix, "config")] ?? base.config,
@@ -1930,13 +1959,6 @@ var resolvePaths = /* @__PURE__ */ __name((options) => {
1930
1959
  };
1931
1960
  }, "resolvePaths");
1932
1961
  var pathsAreOverridden = /* @__PURE__ */ __name(({ appName, prefix, env = process.env }) => PATH_KINDS.some((kind) => env[overrideName(appName, prefix, kind)] !== void 0), "pathsAreOverridden");
1933
- var accountHome = /* @__PURE__ */ __name(() => {
1934
- try {
1935
- return userInfo().homedir;
1936
- } catch {
1937
- return void 0;
1938
- }
1939
- }, "accountHome");
1940
1962
  var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = process.platform, home = accountHome() } = {}) => {
1941
1963
  if (home === void 0)
1942
1964
  return true;
@@ -1948,7 +1970,7 @@ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = proces
1948
1970
  var isMovedRun = /* @__PURE__ */ __name((options) => pathsAreOverridden(options) || homeIsMoved(options), "isMovedRun");
1949
1971
  var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join(configDir, fileName), "configFilePath");
1950
1972
 
1951
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
1973
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
1952
1974
  var DEFAULT_RETRY = {
1953
1975
  retries: 1,
1954
1976
  baseDelayMs: 250,
@@ -1960,7 +1982,7 @@ var backoffMs = /* @__PURE__ */ __name((attempt, config, random) => {
1960
1982
  return Math.round(random() * ceiling);
1961
1983
  }, "backoffMs");
1962
1984
 
1963
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
1985
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
1964
1986
  var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
1965
1987
  var validate = /* @__PURE__ */ __name((paths) => {
1966
1988
  if (paths.length === 0 || paths.length > 128 || paths.some((path) => path.length > 256 || !/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/.test(path) || path.split(".").some((part) => forbidden.has(part))))
@@ -2025,7 +2047,7 @@ var projectFields = /* @__PURE__ */ __name((value, fields) => {
2025
2047
  return project(value, fields);
2026
2048
  }, "projectFields");
2027
2049
 
2028
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
2050
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
2029
2051
  var BATCH_LIMITS = Object.freeze({
2030
2052
  requests: 32,
2031
2053
  input_bytes: 262144,
@@ -2152,7 +2174,7 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
2152
2174
  };
2153
2175
  }, "runBatch");
2154
2176
 
2155
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
2177
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
2156
2178
  import { randomBytes } from "node:crypto";
2157
2179
  import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
2158
2180
  import { dirname, join as join2 } from "node:path";
@@ -2196,7 +2218,7 @@ var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
2196
2218
  `, 384);
2197
2219
  }, "saveConfigFile");
2198
2220
 
2199
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/constants.js
2221
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/constants.js
2200
2222
  import { fileURLToPath } from "node:url";
2201
2223
  var BASE_CONSTANTS = new URL("../constants.json", new URL("constants.js", import.meta.resolve("@wirecat/cli-base")).href);
2202
2224
  var baseConstantsSchema = object({});
@@ -2251,11 +2273,11 @@ var loadConstants = /* @__PURE__ */ __name((layers, schema) => {
2251
2273
  return deepFreeze(result.output);
2252
2274
  }, "loadConstants");
2253
2275
 
2254
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2276
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2255
2277
  import { readFileSync as readFileSync2 } from "node:fs";
2256
2278
  import { join as join3, resolve } from "node:path";
2257
2279
 
2258
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
2280
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
2259
2281
  import { createRequire } from "node:module";
2260
2282
  var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
2261
2283
  var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
@@ -2264,7 +2286,13 @@ var entryClass = /* @__PURE__ */ __name(() => {
2264
2286
  cached ??= require2("@napi-rs/keyring").Entry;
2265
2287
  return cached;
2266
2288
  }, "entryClass");
2267
- var entry = /* @__PURE__ */ __name((service, account) => new (entryClass())(service, account, ENTRY_OPTIONS), "entry");
2289
+ var STAND_IN = /* @__PURE__ */ Symbol.for("@wirecat/cli-base/testing/keyring-stand-in");
2290
+ var entry = /* @__PURE__ */ __name((service, account) => {
2291
+ const Entry = entryClass();
2292
+ if (!(STAND_IN in Entry) && process.env.VITEST !== void 0)
2293
+ throw new Error("a test reached the real OS keyring without the test setup; pass memoryKeyring()");
2294
+ return new Entry(service, account, ENTRY_OPTIONS);
2295
+ }, "entry");
2268
2296
  var systemKeyring = {
2269
2297
  // Returns null for an absent entry rather than throwing — measured against @napi-rs/keyring
2270
2298
  // on 2026-09-13, and the difference matters: a throw here means the keychain is unusable.
@@ -2275,7 +2303,7 @@ var systemKeyring = {
2275
2303
  delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
2276
2304
  };
2277
2305
 
2278
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2306
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2279
2307
  var keyringService = /* @__PURE__ */ __name((service, _configDir, _isolated) => service, "keyringService");
2280
2308
  var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
2281
2309
  var warnedRuns = /* @__PURE__ */ new WeakSet();
@@ -2411,7 +2439,7 @@ var Credentials = class {
2411
2439
  }
2412
2440
  };
2413
2441
 
2414
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
2442
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
2415
2443
  var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
2416
2444
  var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
2417
2445
  if (signal?.aborted) {
@@ -2425,10 +2453,10 @@ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, re
2425
2453
  }, { once: true });
2426
2454
  }), "realSleep");
2427
2455
 
2428
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2456
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2429
2457
  import { appendFileSync } from "node:fs";
2430
2458
 
2431
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
2459
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
2432
2460
  var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
2433
2461
  var logRecordSchema = strictObject({
2434
2462
  time: isoTime,
@@ -2506,7 +2534,7 @@ var traceIdOf = /* @__PURE__ */ __name((traceparent) => {
2506
2534
  return traceId;
2507
2535
  }, "traceIdOf");
2508
2536
 
2509
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2537
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2510
2538
  var REDACTED_FIELDS = [
2511
2539
  "authorization",
2512
2540
  "Authorization",
@@ -2600,7 +2628,7 @@ var silent = {
2600
2628
  }, "error")
2601
2629
  };
2602
2630
 
2603
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
2631
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
2604
2632
  var import_cli_table3 = __toESM(require_cli_table3(), 1);
2605
2633
  import { styleText } from "node:util";
2606
2634
  var renderPretty = /* @__PURE__ */ __name((value, options) => {
@@ -2675,7 +2703,7 @@ var BORDERLESS = {
2675
2703
  middle: ""
2676
2704
  };
2677
2705
 
2678
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
2706
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
2679
2707
  var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2680
2708
  if (signal?.aborted)
2681
2709
  return Promise.reject(signal.reason);
@@ -2703,7 +2731,7 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2703
2731
  });
2704
2732
  }, "waitForDrain");
2705
2733
 
2706
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
2734
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
2707
2735
  var processStreams = {
2708
2736
  drain: /* @__PURE__ */ __name(async (signal) => {
2709
2737
  await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
@@ -2732,7 +2760,7 @@ var captureStreams = /* @__PURE__ */ __name(() => {
2732
2760
  };
2733
2761
  }, "captureStreams");
2734
2762
 
2735
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
2763
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
2736
2764
  var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
2737
2765
  const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
2738
2766
  const say = /* @__PURE__ */ __name((symbol) => (message) => {
@@ -2782,6 +2810,7 @@ export {
2782
2810
  baseConstantsSchema,
2783
2811
  loadConstants,
2784
2812
  systemKeyring,
2813
+ refuseOwnerHomeInTests,
2785
2814
  resolvePaths,
2786
2815
  pathsAreOverridden,
2787
2816
  isMovedRun,
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
8
8
  var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
9
9
  const all = typeof profile !== "string";
10
10
  const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");