@wirecat/cli-memo 0.131.41 → 0.131.42

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 (126) hide show
  1. package/dist/bin/memo.js +2 -2
  2. package/dist/bundle/{all-profiles-ZTYUFM24.js → all-profiles-ZBEW2K6Y.js} +5 -5
  3. package/dist/bundle/{anthropic-BLXCM7J2.js → anthropic-2OBFMS2B.js} +3 -3
  4. package/dist/bundle/{app-server-MXYDSTTW.js → app-server-2BPUD7XU.js} +35 -35
  5. package/dist/bundle/auto-NIATDHS4.js +86 -0
  6. package/dist/bundle/{bun-GFMA4TKJ.js → bun-4NGTZRHL.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-3V6EB3XP.js → bun-sqlite-INSVTXFN.js} +2 -2
  8. package/dist/bundle/{chunk-J364I2EL.js → chunk-2IO2DEBO.js} +8 -8
  9. package/dist/bundle/{chunk-ONJAEHOD.js → chunk-2P54ZDQO.js} +7 -7
  10. package/dist/bundle/{chunk-AYOFFZMO.js → chunk-2XCXOI4F.js} +22 -4
  11. package/dist/bundle/{chunk-XXDWCZRM.js → chunk-42VOTRWE.js} +1 -1
  12. package/dist/bundle/{chunk-ULDE2Y7M.js → chunk-4OYYJSRS.js} +49 -48
  13. package/dist/bundle/{chunk-V5TOZXBU.js → chunk-5O3T7Z7F.js} +1267 -765
  14. package/dist/bundle/{chunk-QUA7EHLA.js → chunk-67TMJCHI.js} +10 -10
  15. package/dist/bundle/{chunk-2G66FZPO.js → chunk-6BW7SC6A.js} +1 -1
  16. package/dist/bundle/{chunk-A6HC2DWU.js → chunk-A2KU4HSF.js} +56 -56
  17. package/dist/bundle/{chunk-UA2H5FRV.js → chunk-CKLLVPTR.js} +1 -1
  18. package/dist/bundle/{chunk-RMJLG2D6.js → chunk-CZ2CX43P.js} +4 -4
  19. package/dist/bundle/{chunk-G6EOW6PY.js → chunk-DA5YMQCB.js} +2 -2
  20. package/dist/bundle/{chunk-SCIU5WHL.js → chunk-E3P7PIR3.js} +3 -3
  21. package/dist/bundle/{chunk-WG3JJ7D5.js → chunk-EKFHAT36.js} +1 -1
  22. package/dist/bundle/{chunk-OY2CMEUW.js → chunk-ELPCHMDA.js} +3 -3
  23. package/dist/bundle/{chunk-FVN42IND.js → chunk-F6UUS3OF.js} +1 -1
  24. package/dist/bundle/{chunk-OLVBY6N6.js → chunk-GECE7WJD.js} +2 -2
  25. package/dist/bundle/{chunk-Y4B4273X.js → chunk-GHLLCV4E.js} +7 -7
  26. package/dist/bundle/{chunk-7AS5QFWJ.js → chunk-HCMQGNZU.js} +5 -5
  27. package/dist/bundle/{chunk-7EOGXNLO.js → chunk-HQQC5JRS.js} +4 -4
  28. package/dist/bundle/{chunk-RZUSWGAC.js → chunk-IAML53OZ.js} +2 -2
  29. package/dist/bundle/{chunk-BFN5KXGH.js → chunk-JWQWLMFP.js} +257 -257
  30. package/dist/bundle/{chunk-2E4N5DVE.js → chunk-KBOLP4OR.js} +27 -27
  31. package/dist/bundle/{chunk-2O2BSM4K.js → chunk-KHEFBWLH.js} +1 -1
  32. package/dist/bundle/{chunk-JO3FC5B4.js → chunk-KKXXP5RY.js} +7 -7
  33. package/dist/bundle/{chunk-6V6VCYOS.js → chunk-KVKO4X7K.js} +3 -3
  34. package/dist/bundle/{chunk-LGILT5CA.js → chunk-LBMZ7SQI.js} +2 -2
  35. package/dist/bundle/{chunk-RNINC74Q.js → chunk-LJDBOXZN.js} +1 -1
  36. package/dist/bundle/{chunk-VT4PCMY2.js → chunk-MWKPW3RU.js} +1 -1
  37. package/dist/bundle/{chunk-ZETAM63O.js → chunk-NCBHNEWW.js} +1 -1
  38. package/dist/bundle/{chunk-5KL7T2EP.js → chunk-NP5FU56F.js} +1 -1
  39. package/dist/bundle/{chunk-NKKC6SLX.js → chunk-O34QHLL5.js} +1 -1
  40. package/dist/bundle/{chunk-Y7XDV4GQ.js → chunk-O4I3BJPM.js} +6 -6
  41. package/dist/bundle/{chunk-IJJ4OEXK.js → chunk-O6YTC7DC.js} +1 -1
  42. package/dist/bundle/{chunk-776YSJJY.js → chunk-OAIRZNL2.js} +1 -1
  43. package/dist/bundle/{chunk-ARNYYXLO.js → chunk-OJX6GNQY.js} +20 -20
  44. package/dist/bundle/{chunk-ISVO2PHD.js → chunk-OYHQYCGJ.js} +4 -4
  45. package/dist/bundle/{chunk-DYSWDGOU.js → chunk-PRL227K7.js} +5 -5
  46. package/dist/bundle/{chunk-NYNUDUFA.js → chunk-QWNEZWGZ.js} +4 -4
  47. package/dist/bundle/{chunk-F3OGJQWY.js → chunk-QWNVEFWY.js} +5 -5
  48. package/dist/bundle/{chunk-WFME7ILV.js → chunk-QWZUMUA7.js} +5 -5
  49. package/dist/bundle/{chunk-QCE6BNKK.js → chunk-RHIQ34XW.js} +2 -2
  50. package/dist/bundle/{chunk-PPSIMMJM.js → chunk-RV4EBFH2.js} +17 -9
  51. package/dist/bundle/{chunk-7GEK5BE5.js → chunk-T4NH7JI6.js} +2 -2
  52. package/dist/bundle/{chunk-N2EY7NT3.js → chunk-TBGBA45H.js} +1 -1
  53. package/dist/bundle/{chunk-LLL4RBDU.js → chunk-TCNOZZPS.js} +11 -11
  54. package/dist/bundle/{chunk-B5LF2FVU.js → chunk-TWBJOORY.js} +1 -1
  55. package/dist/bundle/{chunk-VF24JTL4.js → chunk-TXU5T7VA.js} +1 -1
  56. package/dist/bundle/{chunk-NFN3JTGD.js → chunk-UCLNEOQS.js} +12 -12
  57. package/dist/bundle/{chunk-S7TVQ7ES.js → chunk-UK2MCVKV.js} +305 -248
  58. package/dist/bundle/{chunk-3MVDNB6Y.js → chunk-UX34ZUMK.js} +3 -3
  59. package/dist/bundle/{chunk-BJWDBPLF.js → chunk-W7GJREIL.js} +2 -2
  60. package/dist/bundle/{chunk-YNYOWOKD.js → chunk-WFA2ZLJB.js} +148 -148
  61. package/dist/bundle/{chunk-RMMYPYNA.js → chunk-WG6AOUQW.js} +20 -20
  62. package/dist/bundle/{chunk-BA3HPVBN.js → chunk-WSPCOSYD.js} +4 -4
  63. package/dist/bundle/{chunk-NP7Y3JQ7.js → chunk-XUNIJW7V.js} +9 -9
  64. package/dist/bundle/{chunk-IJS2X4AZ.js → chunk-YLJWCB6F.js} +43 -43
  65. package/dist/bundle/{command-contract-KCV6NNGF.js → command-contract-EYE52WTH.js} +11 -11
  66. package/dist/bundle/{decode-SU7TIUXV.js → decode-JVG6DJJV.js} +2 -2
  67. package/dist/bundle/{echarts-CJG2WVOX.js → echarts-4IS4IPI4.js} +2 -2
  68. package/dist/bundle/{embed-IBURCPTK.js → embed-7CN33CQR.js} +3 -3
  69. package/dist/bundle/{embedder-SK773RJG.js → embedder-TZ345BZF.js} +6 -6
  70. package/dist/bundle/{entry-6WOJUMZN.js → entry-5VZRNBLV.js} +4 -4
  71. package/dist/bundle/failure-KIFYUUO6.js +66 -0
  72. package/dist/bundle/{first-run-CMSDLJGE.js → first-run-EMHSBODF.js} +5 -5
  73. package/dist/bundle/{first-screen-6IZLOQ3Q.js → first-screen-3PJ3HFLG.js} +12 -12
  74. package/dist/bundle/{instructions-RHGGUIBR.js → instructions-BTAYTZIS.js} +1 -1
  75. package/dist/bundle/{mcp-HBKMY35O.js → mcp-I5KREUIV.js} +35 -35
  76. package/dist/bundle/memo.js +6 -6
  77. package/dist/bundle/{node-NBXEN7JU.js → node-FMT4QVUG.js} +2 -2
  78. package/dist/bundle/{node-sqlite-WAGIYOYR.js → node-sqlite-2RDIBVYM.js} +3 -3
  79. package/dist/bundle/{oauth-INSEXJD2.js → oauth-MF53KMXM.js} +4 -4
  80. package/dist/bundle/{open-LXFV2C67.js → open-WKKHNBXL.js} +2 -2
  81. package/dist/bundle/{openai-OCWAXC7E.js → openai-36KNG2DB.js} +7 -7
  82. package/dist/bundle/{process-MRPJP32M.js → process-F2FWK4Q4.js} +1 -1
  83. package/dist/bundle/{program-XKO4X6BB.js → program-W55Y6LL2.js} +342 -90
  84. package/dist/bundle/{prompt-ROLOHFNO.js → prompt-2TR6X3TJ.js} +2 -2
  85. package/dist/bundle/{recognize-63ZLC4DN.js → recognize-MOBCGUI7.js} +1 -1
  86. package/dist/bundle/{remote-J4ZBFG3Y.js → remote-GARKVCO7.js} +4 -4
  87. package/dist/bundle/{rerank-HUQCCGYO.js → rerank-L3G7P3KX.js} +4 -4
  88. package/dist/bundle/{serve-MFJYL4AB.js → serve-ABRMEJ7P.js} +6 -6
  89. package/dist/bundle/server-NMRAFTY3.js +61 -0
  90. package/dist/bundle/server-VX3L42ED.js +48 -0
  91. package/dist/bundle/{server-2JQ5K33G.js → server-XLMROR5L.js} +50 -50
  92. package/dist/bundle/{state-AV5MO77W.js → state-5N2RVH2Y.js} +3 -3
  93. package/dist/bundle/{store-H4HCVN4H.js → store-4ML7O47C.js} +9 -9
  94. package/dist/bundle/store-maintenance-command-O3OTXKNO.js +48 -0
  95. package/dist/bundle/update-OWKZLZTS.js +69 -0
  96. package/dist/discovery/command.d.ts.map +1 -1
  97. package/dist/discovery/command.js +3 -0
  98. package/dist/discovery/command.js.map +1 -1
  99. package/dist/doctor/command.d.ts +1 -1
  100. package/dist/examples.d.ts.map +1 -1
  101. package/dist/examples.js +19 -0
  102. package/dist/examples.js.map +1 -1
  103. package/dist/finance/deals-command.d.ts +22 -0
  104. package/dist/finance/deals-command.d.ts.map +1 -0
  105. package/dist/finance/deals-command.js +235 -0
  106. package/dist/finance/deals-command.js.map +1 -0
  107. package/dist/knowledge/project-status-command.d.ts.map +1 -1
  108. package/dist/knowledge/project-status-command.js +14 -7
  109. package/dist/knowledge/project-status-command.js.map +1 -1
  110. package/dist/program.d.ts.map +1 -1
  111. package/dist/program.js +65 -0
  112. package/dist/program.js.map +1 -1
  113. package/dist/rows.d.ts.map +1 -1
  114. package/dist/rows.js +18 -0
  115. package/dist/rows.js.map +1 -1
  116. package/dist/version.d.ts +1 -1
  117. package/dist/version.js +1 -1
  118. package/package.json +2 -2
  119. package/skills/cli-memo/topics/money.md +6 -0
  120. package/dist/bundle/auto-2RK6FE5A.js +0 -86
  121. package/dist/bundle/failure-4N6GOEGN.js +0 -66
  122. package/dist/bundle/server-RKPGL53W.js +0 -48
  123. package/dist/bundle/server-ZN2KC4EE.js +0 -61
  124. package/dist/bundle/store-maintenance-command-4GYOMUXE.js +0 -48
  125. package/dist/bundle/update-ATXEHV72.js +0 -69
  126. /package/dist/bundle/{chunk-VVDYRHYP.js → chunk-O3EZTSTN.js} +0 -0
@@ -13,6 +13,7 @@ import {
13
13
  SUMMARY_UNTRUSTED,
14
14
  acknowledgeMark,
15
15
  actorOf,
16
+ answerLocally,
16
17
  backendRequest,
17
18
  catchUpQuery,
18
19
  checkPoints,
@@ -24,19 +25,19 @@ import {
24
25
  serverSearchOptions,
25
26
  summaryOf,
26
27
  unansweredHours
27
- } from "./chunk-S7TVQ7ES.js";
28
+ } from "./chunk-UK2MCVKV.js";
28
29
  import {
29
30
  MAIL_HIT_UNTRUSTED,
30
31
  messagesAnswer,
31
32
  offsetOf,
32
33
  shownOf
33
- } from "./chunk-RMMYPYNA.js";
34
+ } from "./chunk-WG6AOUQW.js";
34
35
  import {
35
36
  messageItem
36
- } from "./chunk-IJS2X4AZ.js";
37
+ } from "./chunk-YLJWCB6F.js";
37
38
  import {
38
39
  knownPermissionKeys
39
- } from "./chunk-ARNYYXLO.js";
40
+ } from "./chunk-OJX6GNQY.js";
40
41
  import {
41
42
  AGENDA_DEFAULTS,
42
43
  DEFAULT_BACKEND,
@@ -59,7 +60,7 @@ import {
59
60
  sourceKey,
60
61
  typedQuery,
61
62
  withQuery
62
- } from "./chunk-BFN5KXGH.js";
63
+ } from "./chunk-JWQWLMFP.js";
63
64
  import {
64
65
  Command,
65
66
  FETCH,
@@ -91,11 +92,11 @@ import {
91
92
  snakeKeys,
92
93
  withSettingDefaults,
93
94
  withoutSetting
94
- } from "./chunk-YNYOWOKD.js";
95
+ } from "./chunk-WFA2ZLJB.js";
95
96
  import {
96
97
  mailHolderVariable,
97
98
  readOnlyLockOf
98
- } from "./chunk-B5LF2FVU.js";
99
+ } from "./chunk-TWBJOORY.js";
99
100
  import {
100
101
  DEFAULT_DECISION_POLICY,
101
102
  MESSAGE_PARSING,
@@ -108,7 +109,7 @@ import {
108
109
  registrableOf,
109
110
  scoreGroup,
110
111
  validateFields
111
- } from "./chunk-V5TOZXBU.js";
112
+ } from "./chunk-5O3T7Z7F.js";
112
113
  import {
113
114
  count,
114
115
  dateRange,
@@ -119,7 +120,7 @@ import {
119
120
  time,
120
121
  timezoneOf,
121
122
  untrusted
122
- } from "./chunk-A6HC2DWU.js";
123
+ } from "./chunk-A2KU4HSF.js";
123
124
  import {
124
125
  configFilePath,
125
126
  resolvePaths,
@@ -156,7 +157,7 @@ import {
156
157
  __toESM
157
158
  } from "./chunk-ZVVMGPBJ.js";
158
159
 
159
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/attachments.js
160
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/attachments.js
160
161
  var MAX_ATTACHMENT_CHARS = 2e5;
161
162
  var DEFAULT_ATTACHMENT_POLICY = { read: true, maxBytes: 10 * 1024 * 1024 };
162
163
  var POLICY_SKIPS = ["not-read", "too-large"];
@@ -195,7 +196,7 @@ var readAttachments = /* @__PURE__ */ __name(async (mail, messageId, { loadEngin
195
196
  return files;
196
197
  }, "readAttachments");
197
198
 
198
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/read.js
199
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/read.js
199
200
  var lowerSuspicious = /* @__PURE__ */ __name((items, suspicious) => [
200
201
  ...items.filter((item) => !suspicious(item)),
201
202
  ...items.filter(suspicious)
@@ -256,7 +257,7 @@ var showMail = /* @__PURE__ */ __name(async (store, locator, { before = 0, after
256
257
  }));
257
258
  }, "showMail");
258
259
  var line = /* @__PURE__ */ __name((text2) => text2.replace(/\s+/g, " ").trim(), "line");
259
- var hitText = /* @__PURE__ */ __name((item, level) => {
260
+ var hitText = /* @__PURE__ */ __name((item, level, shown = (time2) => time2) => {
260
261
  const mail = item.email;
261
262
  const names = /* @__PURE__ */ __name((people) => people.map(({ name, address }) => line(name ?? address)).join(", "), "names");
262
263
  const between = mail ? [
@@ -267,7 +268,7 @@ var hitText = /* @__PURE__ */ __name((item, level) => {
267
268
  const who = line(item.senderName ?? item.senderId ?? "unknown");
268
269
  return [
269
270
  item.locator,
270
- ` ${item.timestamp} ${who}${level === "brief" || !between ? "" : ` ${between}`}`,
271
+ ` ${shown(item.timestamp)} ${who}${level === "brief" || !between ? "" : ` ${between}`}`,
271
272
  ...level === "brief" || !item.chatTitle ? [] : [` ${line(item.chatTitle)}`],
272
273
  ` ${level === "full" ? item.text.replace(/\n/g, "\n ") : line(item.excerpt ?? item.text)}`
273
274
  ].join("\n");
@@ -282,11 +283,11 @@ var attachmentsText = /* @__PURE__ */ __name((hit) => (hit.attachments ?? []).ma
282
283
  ${file.text.replace(/\n/g, "\n ")}`;
283
284
  }).join("\n"), "attachmentsText");
284
285
 
285
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/bulk.js
286
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/bulk.js
286
287
  var BULK = "bulk";
287
288
  var bulkBox = { externalId: "memo:bulk", name: "bulk", kind: BULK };
288
289
 
289
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/email-input.js
290
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/email-input.js
290
291
  var sentAtOf = /* @__PURE__ */ __name((date, receivedAt) => {
291
292
  const sent = date === null ? Number.NaN : Date.parse(date);
292
293
  return Number.isNaN(sent) ? Date.parse(receivedAt) : sent;
@@ -306,7 +307,7 @@ var parsedEmail = /* @__PURE__ */ __name((mail, item, header, address) => ({
306
307
  outgoing: mail.from === null ? null : mail.from.email === address
307
308
  }), "parsedEmail");
308
309
 
309
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/presets.js
310
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/presets.js
310
311
  var PRESETS = {
311
312
  social: {
312
313
  about: "notifications from social networks",
@@ -398,7 +399,7 @@ var presetMatches = /* @__PURE__ */ __name((name, facts) => {
398
399
  return false;
399
400
  }, "presetMatches");
400
401
 
401
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/probe.js
402
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/probe.js
402
403
  var share = /* @__PURE__ */ __name((part, whole) => Math.round(part / whole * 100) / 100, "share");
403
404
  var isSent = /* @__PURE__ */ __name((item) => item.labels?.includes("Sent") || /(^|\/)sent\b/i.test(item.folder ?? ""), "isSent");
404
405
  var groupKey = /* @__PURE__ */ __name((headers) => headers.listId === void 0 ? `from:${headers.from}` : `list:${headers.listId}`, "groupKey");
@@ -466,7 +467,7 @@ var probeMail = /* @__PURE__ */ __name((items, limit, ages = /* @__PURE__ */ new
466
467
  };
467
468
  }, "probeMail");
468
469
 
469
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/facts.js
470
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/facts.js
470
471
  var factsOf = /* @__PURE__ */ __name((listed2, rules, ages = /* @__PURE__ */ new Map()) => {
471
472
  const grouped = rules.some(({ match }) => match.score_at_least !== void 0 || match.preset !== void 0);
472
473
  if (!grouped)
@@ -5737,7 +5738,7 @@ var PostalMime = class _PostalMime {
5737
5738
  }
5738
5739
  };
5739
5740
 
5740
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/headers.js
5741
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/headers.js
5741
5742
  var unfold = /* @__PURE__ */ __name((text2) => text2.replace(/\r?\n[ \t]+/g, " "), "unfold");
5742
5743
  var field = /* @__PURE__ */ __name((unfolded, name) => new RegExp(`^${name}:[ \\t]*(.*?)\\r?$`, "im").exec(unfolded)?.[1], "field");
5743
5744
  var fieldsOf = /* @__PURE__ */ __name((unfolded, name) => [...unfolded.matchAll(new RegExp(`^${name}:[ \\t]*(.*?)\\r?$`, "gim"))].map(([, value]) => value), "fieldsOf");
@@ -5784,7 +5785,7 @@ var mailHeadersOf = /* @__PURE__ */ __name((raw) => {
5784
5785
  };
5785
5786
  }, "mailHeadersOf");
5786
5787
 
5787
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/parse.js
5788
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/parse.js
5788
5789
  var MAX_BODY_CHARS = 1e6;
5789
5790
  var MAX_ATTACHMENTS = 50;
5790
5791
  var BRACKETED_ID = /<[^<>\s]+>/g;
@@ -5849,13 +5850,13 @@ var parseMail = /* @__PURE__ */ __name(async (raw, maxBodyChars = MAX_BODY_CHARS
5849
5850
  };
5850
5851
  }, "parseMail");
5851
5852
 
5852
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/partial.js
5853
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/partial.js
5853
5854
  var PARTIAL = "partial";
5854
5855
 
5855
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/account-key.js
5856
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/account-key.js
5856
5857
  var mailAccountKey = /* @__PURE__ */ __name((address) => ({ provider: "email", account: address.toLowerCase() }), "mailAccountKey");
5857
5858
 
5858
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/rule-stored.js
5859
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/rule-stored.js
5859
5860
  var ACTION_OF = { full: "keep", envelope: "envelope", skip: "skip" };
5860
5861
  var KINDS = {
5861
5862
  from: "string",
@@ -5924,7 +5925,7 @@ var storedMailRuleSet = /* @__PURE__ */ __name(async (store, account, query) =>
5924
5925
  }, "storedMailRuleSet");
5925
5926
  var storedMailRules = /* @__PURE__ */ __name(async (store, account, query) => (await storedMailRuleSet(store, account, query)).rules, "storedMailRules");
5926
5927
 
5927
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/rules.js
5928
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/rules.js
5928
5929
  var DAY_MS = 24 * 60 * 60 * 1e3;
5929
5930
  var domainOf = /* @__PURE__ */ __name((address) => address.slice(address.lastIndexOf("@") + 1), "domainOf");
5930
5931
  var domainMatches = /* @__PURE__ */ __name((wanted2, sender) => {
@@ -5996,7 +5997,7 @@ var tagsOf = /* @__PURE__ */ __name((rules, facts) => {
5996
5997
  }, "tagsOf");
5997
5998
  var conditionKeys = /* @__PURE__ */ __name((match) => Object.keys(match).filter((key) => match[key] !== void 0).sort(), "conditionKeys");
5998
5999
 
5999
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/rule-input.js
6000
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/rule-input.js
6000
6001
  var STORE_ACTION = { keep: "full", envelope: "envelope", skip: "skip" };
6001
6002
  var LOWER = ["from", "domain", "list_id", "subject"];
6002
6003
  var conditionsOf = /* @__PURE__ */ __name((match) => Object.fromEntries(conditionKeys(match).map((key) => {
@@ -6026,7 +6027,7 @@ var ruleInput = /* @__PURE__ */ __name((rule, source = rule.source ?? "owner") =
6026
6027
  decidedAt: decidedAtOf(rule.decided_at)
6027
6028
  }), "ruleInput");
6028
6029
 
6029
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/rule-tags.js
6030
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/rule-tags.js
6030
6031
  var reuseOf = /* @__PURE__ */ __name((error) => {
6031
6032
  const { details } = error;
6032
6033
  return details?.reason === "tag-review.required" ? details.candidates?.[0]?.name : void 0;
@@ -6087,7 +6088,7 @@ var settleRuleTags = /* @__PURE__ */ __name(async (store, accountId, rules, outc
6087
6088
  }
6088
6089
  }, "settleRuleTags");
6089
6090
 
6090
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/server-query.js
6091
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/server-query.js
6091
6092
  var DAY = 864e5;
6092
6093
  var empty = /* @__PURE__ */ __name(() => ({ words: [], from: [], to: [], cc: [], subject: [], body: [] }), "empty");
6093
6094
  var narrows = /* @__PURE__ */ __name((criteria) => criteria.words.length + criteria.from.length + criteria.to.length + criteria.cc.length + criteria.subject.length + criteria.body.length > 0 || criteria.since !== void 0 || criteria.before !== void 0 || criteria.seen !== void 0 || criteria.flagged !== void 0, "narrows");
@@ -6160,7 +6161,7 @@ var mailCriteriaOf = /* @__PURE__ */ __name((text2, { exact, timezone } = {}) =>
6160
6161
  };
6161
6162
  }, "mailCriteriaOf");
6162
6163
 
6163
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/server-search.js
6164
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/server-search.js
6164
6165
  var refusal = {
6165
6166
  unsupported: "this mailbox's server cannot be searched \u2014 use --backend archive",
6166
6167
  offline: "--backend server needs the network \u2014 not with --offline",
@@ -6375,7 +6376,7 @@ var searchMailServer = /* @__PURE__ */ __name(async (store, mailbox, access, req
6375
6376
  return { report, sources };
6376
6377
  }, "searchMailServer");
6377
6378
 
6378
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/cli/marks.js
6379
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/cli/marks.js
6379
6380
  var iso = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
6380
6381
  var mailMark = strictObject({
6381
6382
  holder: string(),
@@ -6473,7 +6474,7 @@ var resetMarkCommand = /* @__PURE__ */ __name((mail) => answerEntity(annotate(ne
6473
6474
  });
6474
6475
  }), "resetMarkCommand");
6475
6476
 
6476
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/review.js
6477
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/review.js
6477
6478
  var REVIEW_THREADS = 50;
6478
6479
  var REVIEW_PER_THREAD = 50;
6479
6480
  var OWED_DAYS = 30;
@@ -6571,7 +6572,7 @@ var reviewMail = /* @__PURE__ */ __name(async (store, mailbox, options) => {
6571
6572
  };
6572
6573
  }, "reviewMail");
6573
6574
 
6574
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/cli/review.js
6575
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/cli/review.js
6575
6576
  var DAY2 = 864e5;
6576
6577
  var REVIEW_UNTRUSTED = [...SUMMARY_UNTRUSTED, ...MAIL_HIT_UNTRUSTED];
6577
6578
  var MAIL_REVIEW_QUERY = defineQuery({
@@ -6755,9 +6756,9 @@ ${excerpt}` : excerpt, excerptOnly: true };
6755
6756
  ] : []
6756
6757
  ];
6757
6758
  const output = outputFor(command);
6758
- renderAnswer(command, output, answer, () => {
6759
+ answerLocally(command, output, answer, (local) => {
6759
6760
  output.renderer.note(read.mark ? `${holder}: past ${read.mark.throughId}${emails.length ? `; findings key ${read.findingsKey}` : ""}; acknowledge with --cursor ${read.cursor}${read.more ? "; more after these" : ""}` : `${holder} has no mark yet: it starts from now \u2014 acknowledge with --cursor ${read.cursor}`);
6760
- return emails.map((hit) => `${hitText(hit)}${markText2(marks.get(hit.id), hit.excerptOnly)}
6761
+ return emails.map((hit) => `${hitText(hit, void 0, local)}${markText2(marks.get(hit.id), hit.excerptOnly)}
6761
6762
  `).join("");
6762
6763
  });
6763
6764
  }, "holderReview");
@@ -6814,26 +6815,26 @@ an agent over MCP, and each scheduled run.`).action(async function(query) {
6814
6815
  const answer = reviewAnswer(found, mailbox, saved !== void 0, stepsFor(mail.mount, mailbox));
6815
6816
  if (meta)
6816
6817
  answer.meta = { ...meta, ...answer.meta };
6817
- renderAnswer(this, output, answer, () => {
6818
+ answerLocally(this, output, answer, (local) => {
6818
6819
  const read = found.chats.flatMap((chat) => chat.messages);
6819
6820
  if (found.unanswered || found.waiting)
6820
6821
  output.renderer.note(`${[
6821
6822
  found.unanswered ? `owed for ${found.unanswered.olderThanHours}h or more` : "",
6822
6823
  found.waiting ? `waiting ${found.waiting.olderThanHours}h or more` : ""
6823
- ].filter(Boolean).join(", ")}, threads active from ${found.since}`);
6824
+ ].filter(Boolean).join(", ")}, threads active from ${local(found.since)}`);
6824
6825
  else
6825
- output.renderer.note(`from ${found.since} to ${found.until}${found.complete ? "" : ", incomplete"}`);
6826
+ output.renderer.note(`from ${local(found.since)} to ${local(found.until)}${found.complete ? "" : ", incomplete"}`);
6826
6827
  if (found.quiet > 0)
6827
6828
  output.renderer.note(`bulk:false left out ${found.quiet} threads`);
6828
6829
  if (read.length === 0)
6829
6830
  output.renderer.note("nothing new in the stored mail");
6830
- return read.sort((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp)).map((hit) => `${hitText(hit)}${markText2(hit.marks)}
6831
+ return read.sort((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp)).map((hit) => `${hitText(hit, void 0, local)}${markText2(hit.marks)}
6831
6832
  `).join("");
6832
6833
  });
6833
6834
  saved?.save(found.checked ?? {}, found.complete ? { through: found.until } : {});
6834
6835
  }), "mailReviewCommand");
6835
6836
 
6836
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/cli/bulk-settings.js
6837
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/cli/bulk-settings.js
6837
6838
  var listed = /* @__PURE__ */ __name((words2) => words2.join(", "), "listed");
6838
6839
  var MAIL_BULK_SETTINGS = [
6839
6840
  {
@@ -6889,7 +6890,7 @@ var bulkTriageOf = /* @__PURE__ */ __name((config) => {
6889
6890
  };
6890
6891
  }, "bulkTriageOf");
6891
6892
 
6892
- // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_ded3b38d9f479071bd35502124c4f129/node_modules/@wirecat/cli-core/dist/mail/cli/index.js
6893
+ // node_modules/.pnpm/@wirecat+cli-core@0.588.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_b859f846da38ad2f474ef5e15fe95f19/node_modules/@wirecat/cli-core/dist/mail/cli/index.js
6893
6894
  var absentAccount = /* @__PURE__ */ __name((error) => {
6894
6895
  if (error instanceof CliError && error.code === "not_found")
6895
6896
  return void 0;
@@ -7030,7 +7031,7 @@ Search guide: https://github.com/WireCatLabs/cli-core/blob/main/docs/search/quer
7030
7031
  const issues = serverIssues(found.server);
7031
7032
  if (issues.length)
7032
7033
  answer.meta = { ...answer.meta, complete: false, issues: [...answer.meta?.issues ?? [], ...issues] };
7033
- renderAnswer(this, output, answer, () => {
7034
+ answerLocally(this, output, answer, (local) => {
7034
7035
  if (!found.wordsReady)
7035
7036
  output.renderer.note(`the word index is still being built \u2014 \`${mail.app.command} store migrate\` finishes it`);
7036
7037
  noteServer(output, found.server);
@@ -7039,13 +7040,13 @@ Search guide: https://github.com/WireCatLabs/cli-core/blob/main/docs/search/quer
7039
7040
  const shown = shownOf(found.items.length, (page - 1) * limit, found.total);
7040
7041
  if (shown)
7041
7042
  output.renderer.note(shown);
7042
- return found.items.map((item) => `${hitText(item, level)}
7043
+ return found.items.map((item) => `${hitText(item, level, local)}
7043
7044
  `).join("");
7044
- });
7045
+ }, options.timezone);
7045
7046
  });
7046
7047
  return new Command("search").summary("search the stored mail").description("find stored emails").addCommand(leaf);
7047
7048
  }, "searchCommand");
7048
- var shownText = /* @__PURE__ */ __name((emails) => `${emails.map((email) => [hitText(email, "full"), attachmentsText(email)].filter(Boolean).join("\n")).join("\n\n")}
7049
+ var shownText = /* @__PURE__ */ __name((emails, local) => `${emails.map((email) => [hitText(email, "full", local), attachmentsText(email)].filter(Boolean).join("\n")).join("\n\n")}
7049
7050
  `, "shownText");
7050
7051
  var messagesCommand = /* @__PURE__ */ __name((mail) => {
7051
7052
  const messages = new Command("messages").summary("read stored emails").description("read the emails sync stored");
@@ -7077,7 +7078,7 @@ var messagesCommand = /* @__PURE__ */ __name((mail) => {
7077
7078
  });
7078
7079
  const output = outputFor(this);
7079
7080
  const shown = emails.map((email) => snakeKeys(atDetail(email)));
7080
- renderAnswer(this, output, beforeN || afterN ? listOf("messages show", { items: shown, limit: Math.max(1, shown.length), has_more: false }) : itemOf(shown.find((_, at) => emails[at]?.anchor) ?? shown[0], unread ? { meta: { complete: false, issues: [unread] } } : void 0), () => shownText(emails));
7081
+ answerLocally(this, output, beforeN || afterN ? listOf("messages show", { items: shown, limit: Math.max(1, shown.length), has_more: false }) : itemOf(shown.find((_, at) => emails[at]?.anchor) ?? shown[0], unread ? { meta: { complete: false, issues: [unread] } } : void 0), (local) => shownText(emails, local));
7081
7082
  });
7082
7083
  messages.addCommand(acknowledgeCommand(mail));
7083
7084
  messages.addCommand(resetMarkCommand(mail));
@@ -7134,14 +7135,14 @@ var conversationsCommand = /* @__PURE__ */ __name((mail) => {
7134
7135
  last_email_at: thread.lastEmailAt === null ? null : new Date(thread.lastEmailAt).toISOString(),
7135
7136
  untrusted: ["subject"]
7136
7137
  }));
7137
- renderAnswer(this, outputFor(this), listOf("conversations list", {
7138
+ answerLocally(this, outputFor(this), listOf("conversations list", {
7138
7139
  items,
7139
7140
  limit,
7140
7141
  has_more: threads.length > limit,
7141
7142
  page,
7142
7143
  ...typed.trim() ? { args: { query: typed } } : {}
7143
- }), () => items.map((one) => `${one.ref}
7144
- ${one.last_email_at ?? "time unknown"} ${one.emails_count} ${one.subject ?? ""}
7144
+ }), (local) => items.map((one) => `${one.ref}
7145
+ ${one.last_email_at === null ? "time unknown" : local(one.last_email_at)} ${one.emails_count} ${one.subject ?? ""}
7145
7146
  `).join(""));
7146
7147
  });
7147
7148
  answerEntity(list, "mail_thread", mailThread);
@@ -7162,7 +7163,7 @@ var conversationsCommand = /* @__PURE__ */ __name((mail) => {
7162
7163
  return Promise.all(hits.map(async (hit) => hit.attachments?.length ? withAttachmentText(hit, (await store.mail.email(account.id, hit.id))?.attachments ?? [], full) : hit));
7163
7164
  });
7164
7165
  const items = emails.map((email) => snakeKeys(atDetail(email)));
7165
- renderAnswer(this, outputFor(this), listOf("conversations show", { items, limit: Math.max(1, items.length), has_more: false }), () => shownText(emails));
7166
+ answerLocally(this, outputFor(this), listOf("conversations show", { items, limit: Math.max(1, items.length), has_more: false }), (local) => shownText(emails, local));
7166
7167
  });
7167
7168
  return conversations;
7168
7169
  }, "conversationsCommand");