@wirecat/mail-cli 0.24.0 → 0.26.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 +48 -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-VS7P6DJY.js → all-profiles-6NXVQLUQ.js} +11 -11
  7. package/dist/bundle/{anthropic-C5JXKGBS.js → anthropic-OLNFE2CL.js} +17 -10
  8. package/dist/bundle/{app-server-HU3LVU42.js → app-server-J76N6XIK.js} +60 -49
  9. package/dist/bundle/{bun-QLFX47WZ.js → bun-6PYDHXNR.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-W4PGAKVY.js → bun-sqlite-QD5PFHPS.js} +9 -5
  11. package/dist/bundle/{chunk-WOX7FZJP.js → chunk-2E2EV4HD.js} +130 -77
  12. package/dist/bundle/{chunk-A6J4MPTI.js → chunk-2TCS4PLJ.js} +1 -1
  13. package/dist/bundle/{chunk-QI3PXUOJ.js → chunk-3J2UJFBJ.js} +39 -32
  14. package/dist/bundle/{chunk-LVGX7VTD.js → chunk-3RY4HC4V.js} +63 -5
  15. package/dist/bundle/chunk-3XTKQ5EM.js +54 -0
  16. package/dist/bundle/{chunk-ZO4MQWIK.js → chunk-4Q6KAV4O.js} +8 -8
  17. package/dist/bundle/{chunk-JOQGJUFT.js → chunk-52M5BAEG.js} +1 -1
  18. package/dist/bundle/{chunk-Q4OKEN3B.js → chunk-5WROIMUV.js} +12 -7
  19. package/dist/bundle/{chunk-VVL4MKYH.js → chunk-66C66FNK.js} +1 -1
  20. package/dist/bundle/{chunk-O373QEAJ.js → chunk-76EKZSDK.js} +27 -27
  21. package/dist/bundle/{chunk-AUTX2MLF.js → chunk-76VSHS5Y.js} +15 -10
  22. package/dist/bundle/{chunk-HBZAJINU.js → chunk-7C6FGWDH.js} +4 -4
  23. package/dist/bundle/{chunk-VUBZFMGP.js → chunk-7KCBPAQS.js} +2 -2
  24. package/dist/bundle/{chunk-FNLUKODV.js → chunk-7MEVD5PI.js} +57 -28
  25. package/dist/bundle/chunk-A3EBRXOQ.js +16 -0
  26. package/dist/bundle/{chunk-C3NYJW6B.js → chunk-A6XETABW.js} +852 -278
  27. package/dist/bundle/{chunk-VNKWSCN7.js → chunk-AJ5K74X6.js} +17 -17
  28. package/dist/bundle/{chunk-BFQQV22T.js → chunk-BDYQQ6G2.js} +1 -1
  29. package/dist/bundle/{chunk-ZR2BDNGG.js → chunk-BMGRDZM3.js} +1 -1
  30. package/dist/bundle/{chunk-TLEBSMC7.js → chunk-CFBIPM7T.js} +4109 -3575
  31. package/dist/bundle/{chunk-IRUN4XOV.js → chunk-CZI45AQM.js} +2 -2
  32. package/dist/bundle/{chunk-QVMOEB3I.js → chunk-DKIVYAXW.js} +18 -17
  33. package/dist/bundle/{chunk-X7J3TTDO.js → chunk-ECZSYLSL.js} +48 -9
  34. package/dist/bundle/{chunk-EKGRNFYQ.js → chunk-EDWJ7IYH.js} +1 -1
  35. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
  36. package/dist/bundle/{chunk-5X3GU5LI.js → chunk-GIG7F6UW.js} +6 -6
  37. package/dist/bundle/{chunk-RN7OI5KL.js → chunk-H2IJQH5X.js} +20 -112
  38. package/dist/bundle/{chunk-NWKKPDZV.js → chunk-HI5XUETY.js} +2 -2
  39. package/dist/bundle/{chunk-YBQ5AYLZ.js → chunk-HNSBXC6U.js} +3 -3
  40. package/dist/bundle/{chunk-4W4EVVL4.js → chunk-IX3GUNGV.js} +4 -4
  41. package/dist/bundle/{chunk-PT6MF2VU.js → chunk-JNKXU7AE.js} +340 -108
  42. package/dist/bundle/{chunk-64ZG5ERD.js → chunk-JVJG54QK.js} +40 -2
  43. package/dist/bundle/{chunk-KGOVFEWZ.js → chunk-KXASCNOV.js} +3 -3
  44. package/dist/bundle/{chunk-5NLHDK7P.js → chunk-LMTQMYUF.js} +31 -31
  45. package/dist/bundle/{chunk-Q6K2XUGU.js → chunk-LTZGLOKE.js} +3 -2
  46. package/dist/bundle/{chunk-RLQZFZLK.js → chunk-M2LATBP2.js} +84 -10
  47. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
  48. package/dist/bundle/{chunk-H5FJTHVA.js → chunk-M4Y33SJJ.js} +2 -2
  49. package/dist/bundle/{chunk-SWKQ6IAR.js → chunk-M7ECSGSN.js} +3 -3
  50. package/dist/bundle/{chunk-MTO6YVMN.js → chunk-M7RHPCXM.js} +3 -3
  51. package/dist/bundle/{chunk-PRQ2U7HF.js → chunk-MIWSCTLG.js} +2 -2
  52. package/dist/bundle/{chunk-NSIN5IM4.js → chunk-NBJU6MBU.js} +10 -15
  53. package/dist/bundle/{chunk-JWMLMAHP.js → chunk-NMFPK3MU.js} +14 -5
  54. package/dist/bundle/{chunk-4QNHAM3J.js → chunk-OGE7YG4J.js} +2 -2
  55. package/dist/bundle/{chunk-XBEO472U.js → chunk-PJ6YMNJG.js} +26515 -24466
  56. package/dist/bundle/{chunk-RUASZW3M.js → chunk-PY2IOVUN.js} +5 -5
  57. package/dist/bundle/{chunk-OQW6GHUA.js → chunk-QI6EXKSH.js} +1 -1
  58. package/dist/bundle/{chunk-KV4VTKF3.js → chunk-QJGG6QYV.js} +69 -6
  59. package/dist/bundle/{chunk-JMLIKXFO.js → chunk-RXKIP2ML.js} +2 -2
  60. package/dist/bundle/{chunk-6VV7J2TN.js → chunk-T7SHPALQ.js} +35 -28
  61. package/dist/bundle/{chunk-YI544LHI.js → chunk-UE2NKPA4.js} +9 -9
  62. package/dist/bundle/{chunk-X47BL4M5.js → chunk-UNJUCK5R.js} +13 -13
  63. package/dist/bundle/{chunk-C5BMCLCQ.js → chunk-V32L23NN.js} +4 -4
  64. package/dist/bundle/{chunk-DW3F6DUW.js → chunk-V4PFD25P.js} +1 -1
  65. package/dist/bundle/{chunk-U6MMQNNK.js → chunk-VA4V73SL.js} +6 -6
  66. package/dist/bundle/{chunk-3KSK5BBB.js → chunk-VJPLIXV4.js} +8 -2
  67. package/dist/bundle/{chunk-YA45XV6G.js → chunk-VWRT57QU.js} +4 -4
  68. package/dist/bundle/{chunk-FKWUUCX2.js → chunk-XELZCDWE.js} +427 -189
  69. package/dist/bundle/{chunk-3FD3IATT.js → chunk-XUJEZ5YF.js} +6 -6
  70. package/dist/bundle/{chunk-TI7ZIPA2.js → chunk-XZ7CQ6NA.js} +4 -4
  71. package/dist/bundle/{chunk-NCRSE647.js → chunk-YM345236.js} +159 -46
  72. package/dist/bundle/{chunk-6PWCQKMD.js → chunk-YXGHC3NP.js} +14 -14
  73. package/dist/bundle/{chunk-RNZKQMFY.js → chunk-ZZSZN4CJ.js} +22 -15
  74. package/dist/bundle/command-contract-NNEXHZW5.js +36 -0
  75. package/dist/bundle/{command-server-entry-5E3PPDE5.js → command-server-entry-AIBWNC5D.js} +25 -24
  76. package/dist/bundle/{decode-AVWV7SVZ.js → decode-H7KLRD33.js} +5 -5
  77. package/dist/bundle/{dispatch-BXPHSNK5.js → dispatch-DSVN7MNG.js} +8 -8
  78. package/dist/bundle/{dist-PIOOKBWT.js → dist-YYSP43J3.js} +29 -18
  79. package/dist/bundle/{echarts-7K6YQV52.js → echarts-VSD3LS6D.js} +2 -2
  80. package/dist/bundle/{embed-4NT76GJK.js → embed-UENZ5HN3.js} +6 -6
  81. package/dist/bundle/{embedder-ITQFF7EN.js → embedder-MJMGOJT7.js} +9 -9
  82. package/dist/bundle/{failure-3Q65JOPD.js → failure-COTPFUP4.js} +2 -2
  83. package/dist/bundle/{first-run-PM74YU4X.js → first-run-HYALREFN.js} +12 -11
  84. package/dist/bundle/first-screen-GPF5RHBX.js +34 -0
  85. package/dist/bundle/{instructions-JDSITYHV.js → instructions-WOHRYOLN.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-D6YIJOJI.js → node-4BRWJJCE.js} +2 -2
  89. package/dist/bundle/{node-sqlite-PJOHHB4X.js → node-sqlite-D3QESEYQ.js} +10 -6
  90. package/dist/bundle/{oauth-BOWJ3IBT.js → oauth-T7TTOBIZ.js} +7 -7
  91. package/dist/bundle/{open-FIAKKZMW.js → open-6P6627QB.js} +5 -5
  92. package/dist/bundle/{openai-QL54VVLC.js → openai-FIMCJGAP.js} +24 -19
  93. package/dist/bundle/{process-AYHK7WRC.js → process-35IH3WHC.js} +1 -1
  94. package/dist/bundle/{program-6FKWOTBK.js → program-IEXB72IK.js} +6685 -5463
  95. package/dist/bundle/{prompt-XJZCBELC.js → prompt-HFBCPMVL.js} +5 -5
  96. package/dist/bundle/{recognize-OQKWAHBY.js → recognize-CNL4HJ7Z.js} +4 -4
  97. package/dist/bundle/{remote-NLVUZ5WK.js → remote-AYGZI7HT.js} +9 -7
  98. package/dist/bundle/{rerank-NRPZDTJ7.js → rerank-5C2OZZXD.js} +7 -7
  99. package/dist/bundle/{serve-O4YUI7F6.js → serve-S6OYBDIB.js} +9 -9
  100. package/dist/bundle/{server-WAL3M4OO.js → server-VKO6E6PI.js} +42 -40
  101. package/dist/bundle/server-WXSHVDME.js +68 -0
  102. package/dist/bundle/{sqlite-runtime-5YHGI4D4.js → sqlite-runtime-DBTGNTVE.js} +6 -6
  103. package/dist/bundle/{state-WYYOJ7KK.js → state-ZQG6AL2Y.js} +6 -6
  104. package/dist/bundle/{store-X72GOJHD.js → store-B7BXWILZ.js} +25 -18
  105. package/dist/bundle/{store-6BJO3F2J.js → store-LY4QKTOO.js} +19 -16
  106. package/dist/bundle/store-maintenance-command-UR6NQDVV.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-B72343TK.js +0 -35
  153. package/dist/bundle/command-contract-ERYYPAD2.js +0 -35
  154. package/dist/bundle/first-screen-WBVGVSMY.js +0 -33
  155. package/dist/bundle/server-6OT5ZEWL.js +0 -66
  156. package/dist/bundle/store-maintenance-command-ASS7RBYC.js +0 -54
  157. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-XWBPP2HX.js} +0 -0
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  PRAGMAS
5
- } from "./chunk-A6J4MPTI.js";
5
+ } from "./chunk-2TCS4PLJ.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-VUBZFMGP.js";
8
+ } from "./chunk-7KCBPAQS.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
14
14
  var SQLITE_WARNING = "SQLite is an experimental feature";
15
15
  var quieted = /* @__PURE__ */ new WeakSet();
16
16
  var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
@@ -31,7 +31,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
31
31
  return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
32
32
  }, "isSqliteWarning");
33
33
 
34
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/store/open.js
34
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/store/open.js
35
35
  var openCache = /* @__PURE__ */ __name(async (path) => {
36
36
  const database = await openFile(path);
37
37
  try {
@@ -44,12 +44,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
44
44
  }, "openCache");
45
45
  var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
46
46
  var openUnderBun = /* @__PURE__ */ __name(async (path) => {
47
- const { openWithBunSqlite } = await import("./bun-sqlite-W4PGAKVY.js");
47
+ const { openWithBunSqlite } = await import("./bun-sqlite-QD5PFHPS.js");
48
48
  return await openWithBunSqlite(path);
49
49
  }, "openUnderBun");
50
50
  var openUnderNode = /* @__PURE__ */ __name(async (path) => {
51
51
  quietSqliteWarning();
52
- const { openWithNodeSqlite } = await import("./node-sqlite-PJOHHB4X.js");
52
+ const { openWithNodeSqlite } = await import("./node-sqlite-D3QESEYQ.js");
53
53
  return openWithNodeSqlite(path);
54
54
  }, "openUnderNode");
55
55
  var runtime = /* @__PURE__ */ __name(() => {
@@ -3,17 +3,22 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  errorCodes
6
- } from "./chunk-VUBZFMGP.js";
6
+ } from "./chunk-7KCBPAQS.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
10
10
 
11
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/errors/failures.js
11
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/errors/failures.js
12
12
  var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
13
13
  var isCommanderFailure = /* @__PURE__ */ __name((value) => {
14
14
  const { code, exitCode } = value ?? {};
15
15
  return value instanceof Error && typeof code === "string" && code.startsWith("commander.") && typeof exitCode === "number";
16
16
  }, "isCommanderFailure");
17
+ var USAGE_REASONS = {
18
+ "commander.unknownCommand": "usage.unknown-command",
19
+ "commander.unknownOption": "usage.unknown-option"
20
+ };
21
+ var usageReason = /* @__PURE__ */ __name((code) => USAGE_REASONS[code], "usageReason");
17
22
  var failureKey = /* @__PURE__ */ __name((error) => isCliFailure(error) ? error.code : error instanceof Error ? error.name : "error", "failureKey");
18
23
  var SQLITE_CORRUPT = 11;
19
24
  var SQLITE_NOTADB = 26;
@@ -58,6 +63,7 @@ var isStoreDamage = /* @__PURE__ */ __name((error) => damageIn(error) !== void 0
58
63
  export {
59
64
  isCliFailure,
60
65
  isCommanderFailure,
66
+ usageReason,
61
67
  failureKey,
62
68
  sqliteCode,
63
69
  storeDamaged,
@@ -5,15 +5,15 @@ import {
5
5
  readLock,
6
6
  releaseLock,
7
7
  takeLock
8
- } from "./chunk-YBQ5AYLZ.js";
8
+ } from "./chunk-HNSBXC6U.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
14
14
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
17
17
  import { randomBytes } from "node:crypto";
18
18
  import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
86
86
  };
87
87
  }, "activityRecorder");
88
88
 
89
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
89
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
90
90
  var ACCESS_SECONDS = 60 * 60;
91
91
  var REFRESH_SECONDS = 30 * 24 * 60 * 60;
92
92
  var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");