@wirecat/mail-cli 0.33.0 → 0.35.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 (153) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +4 -1
  3. package/contracts/wirecat.json +54 -4
  4. package/dist/bin/mail.js +2 -2
  5. package/dist/bundle/agent-KWLCQCSC.js +39 -0
  6. package/dist/bundle/{all-profiles-W3CGXEEJ.js → all-profiles-6BDSMVOO.js} +63 -21
  7. package/dist/bundle/{anthropic-UMDO5AKP.js → anthropic-C3XUXUCJ.js} +8 -8
  8. package/dist/bundle/{app-server-4SICQ5RP.js → app-server-GUHDK4OR.js} +82 -64
  9. package/dist/bundle/{bun-QVVCH4MJ.js → bun-FN7AM4AG.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-CHD4AIUK.js → bun-sqlite-56IVBF22.js} +6 -6
  11. package/dist/bundle/{chunk-HFFHL7SV.js → chunk-2B67TUIF.js} +101 -69
  12. package/dist/bundle/{chunk-OOYIPK4F.js → chunk-2UNQTKRH.js} +1 -1
  13. package/dist/bundle/{chunk-LXUHYDNE.js → chunk-3ACF6TIV.js} +1 -1
  14. package/dist/bundle/chunk-3EV2B7KZ.js +726 -0
  15. package/dist/bundle/chunk-3KAJCOJP.js +109 -0
  16. package/dist/bundle/{chunk-2BFXHCZW.js → chunk-3WAZKCDF.js} +2 -2
  17. package/dist/bundle/{chunk-LKGJMM6W.js → chunk-46SBNO67.js} +12 -63
  18. package/dist/bundle/{chunk-LB5FTCPZ.js → chunk-4IASS7NQ.js} +128 -10
  19. package/dist/bundle/chunk-4U5ODZO7.js +360 -0
  20. package/dist/bundle/{chunk-QN423PC6.js → chunk-5WYBI35N.js} +3 -3
  21. package/dist/bundle/{chunk-GZYICXO4.js → chunk-5XQI7WCJ.js} +1 -1
  22. package/dist/bundle/{chunk-JUYUWMTG.js → chunk-635AFLZO.js} +4 -4
  23. package/dist/bundle/{chunk-2P44S7XK.js → chunk-6B4WZVLN.js} +36 -28
  24. package/dist/bundle/{chunk-47YNANPZ.js → chunk-6Q5THDNW.js} +3 -3
  25. package/dist/bundle/chunk-6VARUB3J.js +787 -0
  26. package/dist/bundle/{chunk-BRRHYXUP.js → chunk-7FXZKQAC.js} +87 -76
  27. package/dist/bundle/{chunk-EW3JFV7J.js → chunk-7JVKQ6NM.js} +4 -4
  28. package/dist/bundle/{chunk-OWAJN74H.js → chunk-7KMI47AP.js} +106 -257
  29. package/dist/bundle/{chunk-BF73DBAA.js → chunk-7PXAUMK5.js} +30 -15
  30. package/dist/bundle/{chunk-UX76GMQM.js → chunk-7YMLEWTX.js} +43 -64
  31. package/dist/bundle/{chunk-2L6D54BR.js → chunk-AISQNKT7.js} +8 -8
  32. package/dist/bundle/chunk-AV2ZJ4WX.js +7 -0
  33. package/dist/bundle/{chunk-OFMYFFEF.js → chunk-AXKIXVQA.js} +991 -1609
  34. package/dist/bundle/{chunk-UAV74EY4.js → chunk-CDGVYQXG.js} +1 -1
  35. package/dist/bundle/{chunk-RXUVXAMM.js → chunk-CFQQTDSA.js} +1 -1
  36. package/dist/bundle/chunk-CMGZXBJW.js +259 -0
  37. package/dist/bundle/{chunk-H46MANPR.js → chunk-DD2P67NP.js} +3 -3
  38. package/dist/bundle/{chunk-IBIFX2LK.js → chunk-DFHUJTP5.js} +2 -2
  39. package/dist/bundle/{chunk-DI74RP6R.js → chunk-DREU6TN6.js} +31 -85
  40. package/dist/bundle/{chunk-XQXYAOBV.js → chunk-DZHEVVXA.js} +53 -33
  41. package/dist/bundle/{chunk-LFBD6RTX.js → chunk-E6HSSKRX.js} +4 -4
  42. package/dist/bundle/{chunk-UYZDH5LK.js → chunk-EHAXFDDP.js} +1 -1
  43. package/dist/bundle/chunk-EU4J6GCJ.js +52 -0
  44. package/dist/bundle/{chunk-CHNNKHLL.js → chunk-EX4Z7CCO.js} +4051 -2788
  45. package/dist/bundle/chunk-G662S2M4.js +559 -0
  46. package/dist/bundle/{chunk-XN5KH24X.js → chunk-GG634DR3.js} +5 -5
  47. package/dist/bundle/{chunk-FSMCXQH2.js → chunk-GU3PYIV2.js} +2 -2
  48. package/dist/bundle/{chunk-SW7YGW3T.js → chunk-HF5QWKK2.js} +18 -8
  49. package/dist/bundle/chunk-HJDIMVFW.js +108 -0
  50. package/dist/bundle/chunk-HKWZG7CZ.js +334 -0
  51. package/dist/bundle/{chunk-BI5P7JWM.js → chunk-HM6AMYHR.js} +2 -2
  52. package/dist/bundle/{chunk-35AH33VJ.js → chunk-HVXOA4FO.js} +1 -1
  53. package/dist/bundle/{chunk-LXAX6AZU.js → chunk-I3QZCQJT.js} +6 -6
  54. package/dist/bundle/{chunk-I3UAD4EI.js → chunk-ILEKGH44.js} +68 -59
  55. package/dist/bundle/{chunk-SDWYOYGN.js → chunk-J5ULUTWE.js} +4 -4
  56. package/dist/bundle/{chunk-TK77DCE5.js → chunk-L4RCWRWS.js} +1 -1
  57. package/dist/bundle/chunk-MCJYJIH5.js +192 -0
  58. package/dist/bundle/{chunk-S6CHYNFE.js → chunk-NEDS4ORI.js} +2 -2
  59. package/dist/bundle/{chunk-QO7BK4WD.js → chunk-ODQCRZX5.js} +35 -12
  60. package/dist/bundle/chunk-OO4OKMNB.js +80 -0
  61. package/dist/bundle/{chunk-JCQ47WR4.js → chunk-OOQFBRNR.js} +144 -10
  62. package/dist/bundle/{chunk-LACMDMDI.js → chunk-OTP2HJ67.js} +9 -9
  63. package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
  64. package/dist/bundle/{chunk-AEKWEYIG.js → chunk-PQDQCCGG.js} +19 -19
  65. package/dist/bundle/{chunk-BZY5W35X.js → chunk-Q5U2HIBJ.js} +7 -7
  66. package/dist/bundle/{chunk-74BYHR44.js → chunk-QFMKCU42.js} +3738 -3415
  67. package/dist/bundle/{chunk-SYUIAMVA.js → chunk-QYCMB7JY.js} +373 -533
  68. package/dist/bundle/{chunk-KLLT572M.js → chunk-RBV2AM52.js} +2 -100
  69. package/dist/bundle/{chunk-6VCQ4CTK.js → chunk-RJNKM3CQ.js} +1 -1
  70. package/dist/bundle/{chunk-6IS4BEN4.js → chunk-RQHWSNX4.js} +4 -4
  71. package/dist/bundle/chunk-RQJGX7F7.js +170 -0
  72. package/dist/bundle/{chunk-RENCSP47.js → chunk-TARNPINT.js} +3 -3
  73. package/dist/bundle/chunk-TP2BCK2Z.js +721 -0
  74. package/dist/bundle/{chunk-MJ7DUSHT.js → chunk-TP766H4O.js} +18 -14
  75. package/dist/bundle/{chunk-2X344EUT.js → chunk-UHGKN5US.js} +8 -8
  76. package/dist/bundle/{chunk-L3MKFI3Y.js → chunk-UWDRU3R6.js} +2 -2
  77. package/dist/bundle/chunk-V4O47JV6.js +72 -0
  78. package/dist/bundle/{chunk-CIG4UVP6.js → chunk-W4JYGMTU.js} +14 -13
  79. package/dist/bundle/{chunk-JADBHKBP.js → chunk-W7ICCFG5.js} +1 -1
  80. package/dist/bundle/{chunk-MNJ3BMPZ.js → chunk-WDEVKKAD.js} +3 -3
  81. package/dist/bundle/{chunk-TBZLGT7R.js → chunk-WZKM5I7B.js} +23 -119
  82. package/dist/bundle/{chunk-MT7T5N2N.js → chunk-XKKYRMGG.js} +4 -4
  83. package/dist/bundle/chunk-XQNKAM26.js +338 -0
  84. package/dist/bundle/{chunk-UWF3SSRL.js → chunk-YA44BG3N.js} +58 -9
  85. package/dist/bundle/{chunk-Y2P2LC5R.js → chunk-YCIWSKOH.js} +9 -9
  86. package/dist/bundle/{chunk-7OYZU5SP.js → chunk-YQTRKNZQ.js} +4 -4
  87. package/dist/bundle/chunk-YRAJFTFU.js +353 -0
  88. package/dist/bundle/chunk-YTI533XF.js +29 -0
  89. package/dist/bundle/{chunk-UG2QDGAH.js → chunk-ZMYRPMAJ.js} +1 -1
  90. package/dist/bundle/{chunk-CZ6ZXDSO.js → chunk-ZX7HZDD6.js} +182 -562
  91. package/dist/bundle/{chunk-IPSLQX64.js → chunk-ZYEU35MB.js} +2 -2
  92. package/dist/bundle/command-contract-D5UXWHMS.js +39 -0
  93. package/dist/bundle/{command-server-entry-G2ZHCN5J.js → command-server-entry-TPJ47FYS.js} +28 -25
  94. package/dist/bundle/decode-XHUASXQK.js +296 -0
  95. package/dist/bundle/{dispatch-RHIK22OA.js → dispatch-MQZHGGVP.js} +8 -8
  96. package/dist/bundle/{dist-X5G2IMYG.js → dist-BAE4IQ52.js} +34 -29
  97. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  98. package/dist/bundle/{echarts-UZJ6AREV.js → echarts-U7Z2PKIG.js} +2 -2
  99. package/dist/bundle/{embed-FEXLUH3T.js → embed-W7GPB6EI.js} +6 -6
  100. package/dist/bundle/{embedder-NHQARKFJ.js → embedder-T72XLFQ5.js} +9 -9
  101. package/dist/bundle/{failure-7DIA4OET.js → failure-MP6VKL5Y.js} +2 -2
  102. package/dist/bundle/{first-run-PS5NR2QG.js → first-run-C44TJXRI.js} +12 -12
  103. package/dist/bundle/first-screen-IESI7DAU.js +39 -0
  104. package/dist/bundle/{instructions-SDDUBGH4.js → instructions-WGMWQNPP.js} +1 -1
  105. package/dist/bundle/mail.js +12 -12
  106. package/dist/bundle/{mcp-GN4FTJX5.js → mcp-YGOAUNC3.js} +2 -2
  107. package/dist/bundle/meeting-combined-XGZBSWIQ.js +24 -0
  108. package/dist/bundle/meeting-model-QVHLD4WI.js +24 -0
  109. package/dist/bundle/meeting-semantic-QKQHUHXX.js +21 -0
  110. package/dist/bundle/{node-ELCNUOCE.js → node-WANDMJJQ.js} +2 -2
  111. package/dist/bundle/{node-sqlite-2E5MKZMH.js → node-sqlite-NM5XA4DR.js} +7 -7
  112. package/dist/bundle/{oauth-JGPEIY3M.js → oauth-6E63ELEE.js} +8 -8
  113. package/dist/bundle/{open-6DEMCZAB.js → open-5542RTLE.js} +5 -5
  114. package/dist/bundle/{openai-IVKDU5AH.js → openai-NOYNPFB5.js} +28 -26
  115. package/dist/bundle/{process-67DAKAAQ.js → process-7AEXXSBX.js} +1 -1
  116. package/dist/bundle/{program-ESJDQMAJ.js → program-VMA5CGNR.js} +5712 -3640
  117. package/dist/bundle/{prompt-ZBWOT5KG.js → prompt-WYYO4AJL.js} +5 -5
  118. package/dist/bundle/{recognize-UUBH2DOH.js → recognize-UGCCOMAS.js} +4 -4
  119. package/dist/bundle/{remote-UYTNWNOB.js → remote-VZS6BNQB.js} +9 -9
  120. package/dist/bundle/{rerank-X2633CQN.js → rerank-O46D5GJ2.js} +7 -7
  121. package/dist/bundle/{serve-CP7Q4OVW.js → serve-QAAF2LCW.js} +10 -10
  122. package/dist/bundle/server-456MYK3X.js +84 -0
  123. package/dist/bundle/{server-I7MXRSAG.js → server-Q3PUZLLX.js} +77 -58
  124. package/dist/bundle/{sqlite-runtime-BX55LI5G.js → sqlite-runtime-EQBCDO2U.js} +6 -6
  125. package/dist/bundle/{state-LLNJQXFH.js → state-XIOHYXCR.js} +6 -6
  126. package/dist/bundle/{store-N27XI3VV.js → store-OXJZZUR7.js} +34 -17
  127. package/dist/bundle/{store-K4KU5N75.js → store-VJBL5XKR.js} +30 -20
  128. package/dist/bundle/store-maintenance-command-D7XYIX52.js +71 -0
  129. package/dist/bundle/surface-N7LK7PKN.js +70 -0
  130. package/dist/commands/read.d.ts +2 -2
  131. package/dist/commands/read.d.ts.map +1 -1
  132. package/dist/commands/read.js +5 -4
  133. package/dist/commands/read.js.map +1 -1
  134. package/dist/commands/sync.d.ts +2 -1
  135. package/dist/commands/sync.d.ts.map +1 -1
  136. package/dist/commands/sync.js +16 -9
  137. package/dist/commands/sync.js.map +1 -1
  138. package/dist/config.d.ts +6 -0
  139. package/dist/config.d.ts.map +1 -1
  140. package/dist/config.js +16 -1
  141. package/dist/config.js.map +1 -1
  142. package/dist/identity.d.ts.map +1 -1
  143. package/dist/identity.js +2 -2
  144. package/dist/identity.js.map +1 -1
  145. package/dist/version.d.ts +1 -1
  146. package/dist/version.js +1 -1
  147. package/package.json +3 -3
  148. package/dist/bundle/chunk-BDCC2J2Z.js +0 -2
  149. package/dist/bundle/command-contract-NRNQAFFE.js +0 -36
  150. package/dist/bundle/decode-U6V6D6XH.js +0 -162
  151. package/dist/bundle/first-screen-C2WTLOG2.js +0 -34
  152. package/dist/bundle/server-QGTMJ7SF.js +0 -67
  153. package/dist/bundle/store-maintenance-command-VPAFQCNA.js +0 -58
@@ -13,20 +13,20 @@ import {
13
13
  kindsIn,
14
14
  providerNamed,
15
15
  providers
16
- } from "./chunk-OFMYFFEF.js";
16
+ } from "./chunk-6VARUB3J.js";
17
17
  import {
18
18
  isCliFailure,
19
19
  isStoreDamage
20
- } from "./chunk-L3MKFI3Y.js";
20
+ } from "./chunk-UWDRU3R6.js";
21
21
  import {
22
22
  refuseOwnerStoreInTests
23
- } from "./chunk-IPSLQX64.js";
23
+ } from "./chunk-ZYEU35MB.js";
24
24
  import {
25
25
  createRecordLog,
26
26
  resolvePaths,
27
27
  traceIdOf,
28
28
  writeSecurely
29
- } from "./chunk-BRRHYXUP.js";
29
+ } from "./chunk-7FXZKQAC.js";
30
30
  import {
31
31
  array,
32
32
  boolean,
@@ -46,25 +46,21 @@ import {
46
46
  strictObject,
47
47
  string,
48
48
  unknown
49
- } from "./chunk-UWF3SSRL.js";
49
+ } from "./chunk-YA44BG3N.js";
50
50
  import {
51
51
  CliError
52
- } from "./chunk-BI5P7JWM.js";
52
+ } from "./chunk-HM6AMYHR.js";
53
53
  import {
54
54
  __name
55
55
  } from "./chunk-ZVVMGPBJ.js";
56
56
 
57
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/runs/scope.js
58
- import { AsyncLocalStorage } from "node:async_hooks";
59
- import { randomBytes } from "node:crypto";
60
-
61
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/runs/run.js
57
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/runs/run.js
62
58
  import { randomUUID } from "node:crypto";
63
59
  import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
64
60
  import { userInfo } from "node:os";
65
61
  import { join, sep } from "node:path";
66
62
 
67
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
63
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
68
64
  var snake = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
69
65
  var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
70
66
  var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
@@ -77,7 +73,7 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
77
73
  error: /* @__PURE__ */ __name((event, message) => logger.error(logAttributes(event), message), "error")
78
74
  }), "snakeLogger");
79
75
 
80
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
76
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
81
77
  var diagnostic = {
82
78
  event: true,
83
79
  operation: true,
@@ -151,7 +147,7 @@ var LOG_ATTRIBUTES = [
151
147
  ...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
152
148
  ].sort();
153
149
 
154
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/runs/run.js
150
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/runs/run.js
155
151
  var KEEP_RUNS_FOR_DAYS = 30;
156
152
  var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
157
153
  var KEEP_STORE_RUNS_FOR_DAYS = 3;
@@ -518,7 +514,9 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
518
514
  };
519
515
  }, "metadataOf");
520
516
 
521
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/runs/scope.js
517
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/runs/scope.js
518
+ import { AsyncLocalStorage } from "node:async_hooks";
519
+ import { randomBytes } from "node:crypto";
522
520
  var scopes = new AsyncLocalStorage();
523
521
  var processScope;
524
522
  var ownProcesses = new AsyncLocalStorage();
@@ -569,7 +567,7 @@ var attempts = new AsyncLocalStorage();
569
567
  var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
570
568
  var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
571
569
 
572
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/tasks/model.js
570
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/tasks/model.js
573
571
  var TASK_KINDS = ["question", "request", "mention", "promise"];
574
572
  var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
575
573
  var CLOSED_STATES = ["done", "dismissed"];
@@ -584,7 +582,7 @@ function closeTask(task, state, by, at, reason) {
584
582
  }
585
583
  __name(closeTask, "closeTask");
586
584
 
587
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/tasks/priority.js
585
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/tasks/priority.js
588
586
  var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
589
587
  var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
590
588
  var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
@@ -613,7 +611,7 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
613
611
  }, "priorityOf");
614
612
  var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
615
613
 
616
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/tasks/service.js
614
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/tasks/service.js
617
615
  function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
618
616
  async function find(id2) {
619
617
  const task = await store.get(id2);
@@ -673,20 +671,20 @@ function median(values) {
673
671
  }
674
672
  __name(median, "median");
675
673
 
676
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/tasks/store.js
674
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/tasks/store.js
677
675
  function matches(task, filter) {
678
676
  return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
679
677
  }
680
678
  __name(matches, "matches");
681
679
 
682
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/store/source-review.js
680
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/store/source-review.js
683
681
  var SOURCE_REVIEW_KIND = "memory_source_review";
684
682
  var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
685
683
  var ERASED_TEXT = "[source erased]";
686
684
  var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
687
685
  var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
688
686
 
689
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/entities/fields.js
687
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/entities/fields.js
690
688
  var text = string();
691
689
  var id = pipe(string(), minLength(1));
692
690
  var time = isoTime;
@@ -711,7 +709,7 @@ var author = strictObject({
711
709
  name: nullable(text)
712
710
  });
713
711
 
714
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
712
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
715
713
  var organization = strictObject({
716
714
  id,
717
715
  ref: reference,
@@ -741,7 +739,7 @@ var reminder = strictObject({
741
739
  receipt: nullable(text)
742
740
  });
743
741
 
744
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/store/marks.js
742
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/store/marks.js
745
743
  import { readFileSync as readFileSync2, rmSync as rmSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
746
744
  var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
747
745
  var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
@@ -862,7 +860,7 @@ var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, sch
862
860
  return { previous, cleared };
863
861
  }, "recordDeepCheck");
864
862
 
865
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
863
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
866
864
  var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
867
865
  var MEMORY_KINDS = ["summary", "digest", "preference"];
868
866
  var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
@@ -870,7 +868,7 @@ var MEMORY_SCOPES = ["personal", "work"];
870
868
  var WORK_TASK_TYPES = ["bug", "feature", "chore"];
871
869
  var TASK_TYPES = [...WORK_TASK_TYPES, ...TASK_KINDS];
872
870
 
873
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/store/sqlite/link-source.js
871
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/store/sqlite/link-source.js
874
872
  var REPORTER_SQL = "(SELECT provider || ':' || external_id FROM accounts r WHERE r.id = links.account_id) AS reporter";
875
873
  var sourceOf = /* @__PURE__ */ __name((database, row, metadata) => {
876
874
  const reporter = row.account_id == null ? void 0 : "reporter" in row ? row.reporter : database.prepare("SELECT provider || ':' || external_id AS key FROM accounts WHERE id = ?").get(Number(row.account_id))?.key;
@@ -880,7 +878,7 @@ var sourceOf = /* @__PURE__ */ __name((database, row, metadata) => {
880
878
  };
881
879
  }, "sourceOf");
882
880
 
883
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
881
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
884
882
  var LINK_KINDS = [
885
883
  "links-to",
886
884
  "blocked-by",
@@ -904,7 +902,7 @@ var LINK_SOURCES = [...LINK_ORIGINS, "calendar", "meeting"];
904
902
  var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
905
903
  var COUNTERPART_ROLE = "counterpart";
906
904
 
907
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/search/query.js
905
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/search/query.js
908
906
  var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
909
907
  var inSource = /* @__PURE__ */ __name((source, provider) => source === "all" || source === "bots" && isBotProvider(provider) || source === "personal" && !isBotProvider(provider) || source === provider || providerNamed(source)?.name === provider || isKind(source) && holdsKindOf(provider, source), "inSource");
910
908
  var fail = /* @__PURE__ */ __name((message) => {
@@ -927,7 +925,7 @@ var sourceOf2 = /* @__PURE__ */ __name((name, value, providers2) => {
927
925
  return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
928
926
  }, "sourceOf");
929
927
 
930
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/search/account-list.js
928
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/search/account-list.js
931
929
  var ACCOUNT_GROUPS = "accountGroups";
932
930
  var ACCOUNT_GROUPS_SETTING = "account_groups";
933
931
  var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
@@ -1038,6 +1036,8 @@ var accountsOfWord = /* @__PURE__ */ __name((word, held, context) => {
1038
1036
  return [...held];
1039
1037
  if (wanted === "personal" || wanted === "bots")
1040
1038
  return held.filter((one) => listedHolds(one, "messages") && isBotProvider(one.provider) === (wanted === "bots"));
1039
+ if (wanted === "documents")
1040
+ return held.filter((one) => listedHolds(one, "documents") || isDocumentAccount(one));
1041
1041
  if (isKind(wanted))
1042
1042
  return held.filter((one) => listedHolds(one, wanted));
1043
1043
  const recorded = context.profiles[wanted];
@@ -1048,6 +1048,22 @@ var accountsOfWord = /* @__PURE__ */ __name((word, held, context) => {
1048
1048
  return storedAs(held, { provider, account: "" });
1049
1049
  return held.filter((one) => one.provider === provider);
1050
1050
  }, "accountsOfWord");
1051
+ var isDocumentAccount = /* @__PURE__ */ __name(({ stored }) => stored !== void 0 && isDocumentAccountProvider(stored.provider), "isDocumentAccount");
1052
+ var choices = /* @__PURE__ */ __name((held) => {
1053
+ const kinds = held.flatMap((one) => one.kinds ?? (one.kind ? [one.kind] : []));
1054
+ const messengers = held.filter((one) => listedHolds(one, "messages"));
1055
+ const providers2 = held.flatMap(({ stored, provider }) => stored?.provider === ADDED_PROVIDER ? [] : [stored?.provider ?? provider]);
1056
+ return [
1057
+ .../* @__PURE__ */ new Set([
1058
+ "all",
1059
+ ...messengers.some((one) => !isBotProvider(one.provider)) ? ["personal"] : [],
1060
+ ...messengers.some((one) => isBotProvider(one.provider)) ? ["bots"] : [],
1061
+ ...kinds,
1062
+ ...held.some(isDocumentAccount) ? ["documents"] : [],
1063
+ ...providers2
1064
+ ])
1065
+ ].join(", ");
1066
+ }, "choices");
1051
1067
  var keyOf = /* @__PURE__ */ __name(({ provider, account }) => `${provider}\0${account}`, "keyOf");
1052
1068
  var sourceOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "sourceOf");
1053
1069
  var sameAs = /* @__PURE__ */ __name((key) => (one) => one.provider === key.provider && one.account === key.account, "sameAs");
@@ -1058,7 +1074,8 @@ var entriesOfList = /* @__PURE__ */ __name((value, context) => {
1058
1074
  const colon = item.indexOf(":");
1059
1075
  if (colon === -1) {
1060
1076
  try {
1061
- entries.push({ entry: item, accounts: accountsOfWord(item, held, context) });
1077
+ const accounts = accountsOfWord(item, held, context);
1078
+ entries.push({ entry: item, accounts, ...accounts.length === 0 && !group ? { holds: choices(held) } : {} });
1062
1079
  } catch (error) {
1063
1080
  if (!group || !(error instanceof CliError))
1064
1081
  throw error;
@@ -1087,8 +1104,9 @@ var entriesOfList = /* @__PURE__ */ __name((value, context) => {
1087
1104
  for (const item of itemsOf(value))
1088
1105
  entry(item);
1089
1106
  const { only } = context;
1090
- return entries.map(({ entry: entry2, accounts }) => ({
1107
+ return entries.map(({ entry: entry2, accounts, holds }) => ({
1091
1108
  entry: entry2,
1109
+ ...holds === void 0 ? {} : { holds },
1092
1110
  accounts: accounts.filter((one) => only === void 0 || only.has(keyOf(one))).map(({ provider, account, kind, kinds }) => ({
1093
1111
  provider,
1094
1112
  account,
@@ -1132,12 +1150,14 @@ var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf = (kind) =>
1132
1150
  const other = known[0];
1133
1151
  skipped.push(other?.kind ? { source: entry, code: "validation_error", reason: reasonOf(other.kind) } : unknown2.length ? { source: entry, code: "not_found", reason: UNKNOWN_PROVIDER } : { source: entry, code: "not_found", reason: "no account in the store" });
1134
1152
  }
1135
- if (chosen.size === 0)
1136
- fail2(`--source names nothing ${what} reads: ${skipped.map(({ source, reason }) => `${source} (${reason})`).join(", ")}`);
1153
+ if (chosen.size === 0) {
1154
+ const words = entries.length === 1 ? entries[0]?.holds : void 0;
1155
+ fail2(`--source names nothing ${what} reads: ${skipped.map(({ source, reason }) => `${source} (${reason})`).join(", ")}` + (words === void 0 ? "" : ` \u2014 the store holds ${words}`));
1156
+ }
1137
1157
  return { accounts: [...chosen.values()], skipped };
1138
1158
  }, "fitting");
1139
1159
 
1140
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/categories.js
1160
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/domain/categories.js
1141
1161
  var CATEGORIES = ["client", "supplier", "partner", "employer"];
1142
1162
 
1143
1163
  export {
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  defineReasons
5
- } from "./chunk-UWF3SSRL.js";
5
+ } from "./chunk-YA44BG3N.js";
6
6
 
7
7
  // dist/reasons.js
8
8
  var ENTRIES = [
@@ -58,7 +58,7 @@ var ENTRIES = [
58
58
  var REASONS = defineReasons(ENTRIES.map(([reason, code, message]) => ({ reason, code, message, details: [] })));
59
59
 
60
60
  // dist/version.js
61
- var VERSION = "0.33.0";
61
+ var VERSION = "0.35.0";
62
62
 
63
63
  // dist/identity.js
64
64
  var PACKAGE = "@wirecat/mail-cli";
@@ -102,9 +102,9 @@ var DESKTOP = {
102
102
  ],
103
103
  userHosts: "the mail server you sign in to, your domain's autoconfig file, and each sender domain's registry from IANA's list",
104
104
  tagline: "Your mailbox over IMAP, searchable on your computer",
105
- syncs: "mail from the folders you choose",
105
+ syncs: "mail",
106
106
  signIn: {
107
- gives: "Lets your agent read, organise and send your mail.",
107
+ gives: "Lets your agent read and search your mail, and sort and send it as far as your settings allow. A Microsoft sign-in may not grant sending.",
108
108
  asks: "Your mail address and an app password, or a Microsoft or Google sign-in in the browser."
109
109
  }
110
110
  };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/http/listen.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/http/listen.js
8
8
  import { createServer } from "node:http";
9
9
  import { Readable } from "node:stream";
10
10
  var MAX_BODY = 4 * 1024 * 1024;
@@ -0,0 +1,52 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ changesMessenger
5
+ } from "./chunk-QYCMB7JY.js";
6
+ import {
7
+ AUTHORITY_KEY,
8
+ BOT_API_KEY,
9
+ authorityAllowed,
10
+ botApiAllowed,
11
+ isBotApi,
12
+ keyForCommand,
13
+ levelFor,
14
+ readKeysForCommand
15
+ } from "./chunk-HF5QWKK2.js";
16
+ import {
17
+ writes
18
+ } from "./chunk-YA44BG3N.js";
19
+ import {
20
+ __name
21
+ } from "./chunk-ZVVMGPBJ.js";
22
+
23
+ // node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/cli/command-availability.js
24
+ var commandAvailability = /* @__PURE__ */ __name((info, levels, keyOf, authority, readOnly = false, mcp = true, declared, fetches) => {
25
+ const declaredKey = declared?.keyOf(info.path);
26
+ const key = declared ? declaredKey : keyOf?.(info.path) ?? keyForCommand(info.path);
27
+ const { level } = key ? levelFor(levels, key, declared?.defaults) : { level: "allow" };
28
+ const judged = { ...key ? { permission: key } : {}, level };
29
+ const blocked = /* @__PURE__ */ __name((reason, permission) => ({
30
+ available: false,
31
+ reason,
32
+ ...judged,
33
+ ...permission && permission !== judged.permission ? { permission, level: levelFor(levels, permission).level } : {}
34
+ }), "blocked");
35
+ const declaredChange = Boolean(declaredKey) && (info.effects === void 0 || info.effects.remote === "write");
36
+ if (readOnly && (changesMessenger(info) || declaredChange || authority?.(info.path)))
37
+ return blocked("the read-only lock blocks this change");
38
+ if (mcp && authority?.(info.path) && !authorityAllowed(levels))
39
+ return blocked(`the profile keeps ${AUTHORITY_KEY} off`, AUTHORITY_KEY);
40
+ if (mcp && isBotApi(info.path) && !botApiAllowed(levels))
41
+ return blocked(`the profile requires ${BOT_API_KEY}: allow`, BOT_API_KEY);
42
+ if (level === "deny")
43
+ return blocked(`the profile denies ${key}`);
44
+ if (level === "readonly" && writes(info.effects) && fetches?.(info.path) !== true)
45
+ return blocked(`${key} is readonly in this profile`);
46
+ const denied = (declared ? [] : readKeysForCommand(info.path)).find((read) => levelFor(levels, read).level === "deny");
47
+ return denied ? blocked(`the profile denies ${denied}`, denied) : { available: true, ...judged };
48
+ }, "commandAvailability");
49
+
50
+ export {
51
+ commandAvailability
52
+ };