@wirecat/mail-cli 0.31.0 → 0.33.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 (117) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/bin/mail.js +2 -2
  3. package/dist/bundle/{all-profiles-XL62TNUO.js → all-profiles-W3CGXEEJ.js} +10 -10
  4. package/dist/bundle/{anthropic-3MSWVYCE.js → anthropic-UMDO5AKP.js} +5 -5
  5. package/dist/bundle/{app-server-RRNR5XFA.js → app-server-4SICQ5RP.js} +50 -50
  6. package/dist/bundle/{bun-E3F3PEQQ.js → bun-QVVCH4MJ.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-UOFN77LO.js → bun-sqlite-CHD4AIUK.js} +6 -6
  8. package/dist/bundle/{chunk-JYGFEMTR.js → chunk-2BFXHCZW.js} +2 -2
  9. package/dist/bundle/{chunk-NEJU74O4.js → chunk-2L6D54BR.js} +8 -8
  10. package/dist/bundle/{chunk-BS6WYCNZ.js → chunk-2P44S7XK.js} +27 -30
  11. package/dist/bundle/{chunk-TUXNILKR.js → chunk-2X344EUT.js} +8 -8
  12. package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-35AH33VJ.js} +1 -1
  13. package/dist/bundle/{chunk-UFMR2TB3.js → chunk-47YNANPZ.js} +2 -2
  14. package/dist/bundle/{chunk-7C6FGWDH.js → chunk-6IS4BEN4.js} +4 -4
  15. package/dist/bundle/{chunk-ITU6K7LU.js → chunk-6VCQ4CTK.js} +1 -1
  16. package/dist/bundle/{chunk-NYQPKZWL.js → chunk-74BYHR44.js} +590 -604
  17. package/dist/bundle/{chunk-T72DWT37.js → chunk-7OYZU5SP.js} +4 -4
  18. package/dist/bundle/{chunk-4BW5JACS.js → chunk-AEKWEYIG.js} +17 -17
  19. package/dist/bundle/{chunk-3CJ4C6BB.js → chunk-BF73DBAA.js} +13 -13
  20. package/dist/bundle/{chunk-7KCBPAQS.js → chunk-BI5P7JWM.js} +2 -2
  21. package/dist/bundle/{chunk-7MEVD5PI.js → chunk-BRRHYXUP.js} +19 -19
  22. package/dist/bundle/{chunk-GZLCZU5B.js → chunk-BZY5W35X.js} +7 -7
  23. package/dist/bundle/{chunk-6UOUDIXL.js → chunk-CHNNKHLL.js} +7468 -7317
  24. package/dist/bundle/{chunk-QVGCHTTU.js → chunk-CIG4UVP6.js} +12 -12
  25. package/dist/bundle/{chunk-D6D6JLXG.js → chunk-CZ6ZXDSO.js} +46 -37
  26. package/dist/bundle/{chunk-7E7YXQ52.js → chunk-DI74RP6R.js} +18 -18
  27. package/dist/bundle/{chunk-IX3GUNGV.js → chunk-EW3JFV7J.js} +4 -4
  28. package/dist/bundle/{chunk-GWKGZOSO.js → chunk-FSMCXQH2.js} +2 -2
  29. package/dist/bundle/{chunk-DDCDOBZS.js → chunk-GZYICXO4.js} +1 -1
  30. package/dist/bundle/{chunk-BKRIIZPV.js → chunk-H46MANPR.js} +3 -3
  31. package/dist/bundle/{chunk-OP5ZLH53.js → chunk-HFFHL7SV.js} +55 -55
  32. package/dist/bundle/{chunk-DCR3IWC7.js → chunk-I3UAD4EI.js} +33 -32
  33. package/dist/bundle/{chunk-EMVLCION.js → chunk-IBIFX2LK.js} +2 -2
  34. package/dist/bundle/{chunk-BNP7WLDQ.js → chunk-IPSLQX64.js} +2 -2
  35. package/dist/bundle/{chunk-DPDS6IZJ.js → chunk-JADBHKBP.js} +1 -1
  36. package/dist/bundle/{chunk-DWBY7DMF.js → chunk-JCQ47WR4.js} +5 -5
  37. package/dist/bundle/{chunk-LGDJDD5J.js → chunk-JUYUWMTG.js} +4 -4
  38. package/dist/bundle/{chunk-OXHQNEXU.js → chunk-KLLT572M.js} +3 -3
  39. package/dist/bundle/{chunk-5YRR52NH.js → chunk-L3MKFI3Y.js} +2 -2
  40. package/dist/bundle/{chunk-PZL7DHVJ.js → chunk-LACMDMDI.js} +9 -9
  41. package/dist/bundle/{chunk-DZSS2IUK.js → chunk-LB5FTCPZ.js} +3 -4
  42. package/dist/bundle/{chunk-JLIVJSCF.js → chunk-LFBD6RTX.js} +2 -2
  43. package/dist/bundle/{chunk-QSXJ2BVQ.js → chunk-LKGJMM6W.js} +6 -6
  44. package/dist/bundle/{chunk-NV3WPD3B.js → chunk-LXAX6AZU.js} +6 -6
  45. package/dist/bundle/{chunk-H2QTUZ3C.js → chunk-LXUHYDNE.js} +1 -1
  46. package/dist/bundle/{chunk-I3BQ2QIY.js → chunk-MJ7DUSHT.js} +14 -14
  47. package/dist/bundle/{chunk-4ME2NHNJ.js → chunk-MNJ3BMPZ.js} +3 -3
  48. package/dist/bundle/{chunk-THZHNCJP.js → chunk-MT7T5N2N.js} +4 -4
  49. package/dist/bundle/{chunk-KPFB2VUY.js → chunk-OFMYFFEF.js} +461 -402
  50. package/dist/bundle/{chunk-WZGFC7D5.js → chunk-OOYIPK4F.js} +1 -1
  51. package/dist/bundle/{chunk-NUN7DBR4.js → chunk-OWAJN74H.js} +17 -18
  52. package/dist/bundle/{chunk-S2QO6KUI.js → chunk-QN423PC6.js} +3 -3
  53. package/dist/bundle/{chunk-EV5SR3OC.js → chunk-QO7BK4WD.js} +8 -8
  54. package/dist/bundle/{chunk-GXBNTKJW.js → chunk-RENCSP47.js} +3 -3
  55. package/dist/bundle/{chunk-FIVFP53N.js → chunk-RXUVXAMM.js} +1 -1
  56. package/dist/bundle/{chunk-HZCINHHS.js → chunk-S6CHYNFE.js} +2 -2
  57. package/dist/bundle/{chunk-E3IOR37T.js → chunk-SDWYOYGN.js} +4 -4
  58. package/dist/bundle/{chunk-MS5XYEYW.js → chunk-SW7YGW3T.js} +28 -7
  59. package/dist/bundle/{chunk-BXMLIKUM.js → chunk-SYUIAMVA.js} +181 -156
  60. package/dist/bundle/{chunk-HZL3X4XR.js → chunk-TBZLGT7R.js} +20 -17
  61. package/dist/bundle/{chunk-FRXDSR45.js → chunk-TK77DCE5.js} +1 -1
  62. package/dist/bundle/{chunk-P6CYVOL6.js → chunk-UAV74EY4.js} +1 -1
  63. package/dist/bundle/{chunk-SQA5JI7Q.js → chunk-UG2QDGAH.js} +1 -1
  64. package/dist/bundle/{chunk-ECZSYLSL.js → chunk-UWF3SSRL.js} +25 -8
  65. package/dist/bundle/{chunk-QANXOKYQ.js → chunk-UX76GMQM.js} +6 -6
  66. package/dist/bundle/{chunk-I5Y6Y7Q5.js → chunk-UYZDH5LK.js} +1 -1
  67. package/dist/bundle/{chunk-3V6J7VPF.js → chunk-XN5KH24X.js} +5 -5
  68. package/dist/bundle/{chunk-FYP2M6IT.js → chunk-XQXYAOBV.js} +30 -29
  69. package/dist/bundle/{chunk-PIXFZZUZ.js → chunk-Y2P2LC5R.js} +21 -11
  70. package/dist/bundle/command-contract-NRNQAFFE.js +36 -0
  71. package/dist/bundle/{command-server-entry-A3FCP24M.js → command-server-entry-G2ZHCN5J.js} +25 -25
  72. package/dist/bundle/{decode-FI2ISRNZ.js → decode-U6V6D6XH.js} +5 -5
  73. package/dist/bundle/{dispatch-DSVN7MNG.js → dispatch-RHIK22OA.js} +8 -8
  74. package/dist/bundle/{dist-NLOOZJ64.js → dist-X5G2IMYG.js} +15 -15
  75. package/dist/bundle/{echarts-PMAJUJFE.js → echarts-UZJ6AREV.js} +2 -2
  76. package/dist/bundle/{embed-OIMT6SAX.js → embed-FEXLUH3T.js} +6 -6
  77. package/dist/bundle/{embedder-Q5IF5WIM.js → embedder-NHQARKFJ.js} +9 -9
  78. package/dist/bundle/{failure-COTPFUP4.js → failure-7DIA4OET.js} +2 -2
  79. package/dist/bundle/{first-run-4L53QWOT.js → first-run-PS5NR2QG.js} +12 -12
  80. package/dist/bundle/first-screen-C2WTLOG2.js +34 -0
  81. package/dist/bundle/{instructions-ZJGGGXOA.js → instructions-SDDUBGH4.js} +1 -1
  82. package/dist/bundle/mail.js +12 -12
  83. package/dist/bundle/{mcp-TDKGDB4V.js → mcp-GN4FTJX5.js} +2 -2
  84. package/dist/bundle/{node-DCSOHRD6.js → node-ELCNUOCE.js} +2 -2
  85. package/dist/bundle/{node-sqlite-7F77K5JA.js → node-sqlite-2E5MKZMH.js} +7 -7
  86. package/dist/bundle/{oauth-LVPMEN6M.js → oauth-JGPEIY3M.js} +7 -7
  87. package/dist/bundle/{open-XM5LWEN6.js → open-6DEMCZAB.js} +5 -5
  88. package/dist/bundle/{openai-H2LCGK22.js → openai-IVKDU5AH.js} +15 -15
  89. package/dist/bundle/{process-MFC5VSPT.js → process-67DAKAAQ.js} +1 -1
  90. package/dist/bundle/{program-ZQ43ZYKZ.js → program-ESJDQMAJ.js} +498 -481
  91. package/dist/bundle/{prompt-3LZAZNQ4.js → prompt-ZBWOT5KG.js} +5 -5
  92. package/dist/bundle/{recognize-GYQMHFY2.js → recognize-UUBH2DOH.js} +4 -4
  93. package/dist/bundle/{remote-P2MD5G64.js → remote-UYTNWNOB.js} +9 -9
  94. package/dist/bundle/{rerank-A5X6THV6.js → rerank-X2633CQN.js} +7 -7
  95. package/dist/bundle/{serve-IEC3EUKS.js → serve-CP7Q4OVW.js} +9 -9
  96. package/dist/bundle/{server-3REPXFNI.js → server-I7MXRSAG.js} +42 -42
  97. package/dist/bundle/server-QGTMJ7SF.js +67 -0
  98. package/dist/bundle/{sqlite-runtime-AOLQGC5J.js → sqlite-runtime-BX55LI5G.js} +6 -6
  99. package/dist/bundle/{state-D3P5IXXA.js → state-LLNJQXFH.js} +6 -6
  100. package/dist/bundle/{store-MZCQXBVW.js → store-K4KU5N75.js} +19 -19
  101. package/dist/bundle/{store-DIN6OY3K.js → store-N27XI3VV.js} +17 -17
  102. package/dist/bundle/store-maintenance-command-VPAFQCNA.js +58 -0
  103. package/dist/commands/messages.js +1 -1
  104. package/dist/commands/messages.js.map +1 -1
  105. package/dist/mail/cleanup.d.ts.map +1 -1
  106. package/dist/mail/cleanup.js +4 -3
  107. package/dist/mail/cleanup.js.map +1 -1
  108. package/dist/mail/rules/apply.js +1 -1
  109. package/dist/mail/rules/apply.js.map +1 -1
  110. package/dist/version.d.ts +1 -1
  111. package/dist/version.js +1 -1
  112. package/package.json +3 -3
  113. package/dist/bundle/command-contract-YRNKDQDL.js +0 -36
  114. package/dist/bundle/first-screen-ZPQLAAIS.js +0 -34
  115. package/dist/bundle/server-E2QTFURI.js +0 -67
  116. package/dist/bundle/store-maintenance-command-UMVFI6M6.js +0 -58
  117. /package/dist/bundle/{chunk-XWBPP2HX.js → chunk-BDCC2J2Z.js} +0 -0
@@ -9,6 +9,7 @@ import {
9
9
  defineReasons,
10
10
  defineSteps,
11
11
  duplicates,
12
+ exactOptional,
12
13
  integer,
13
14
  isoTime,
14
15
  lazy,
@@ -30,18 +31,18 @@ import {
30
31
  string,
31
32
  union,
32
33
  variant
33
- } from "./chunk-ECZSYLSL.js";
34
+ } from "./chunk-UWF3SSRL.js";
34
35
  import {
35
36
  CliError,
36
37
  isCliError,
37
38
  singleLine,
38
39
  visibleControls
39
- } from "./chunk-7KCBPAQS.js";
40
+ } from "./chunk-BI5P7JWM.js";
40
41
  import {
41
42
  __name
42
43
  } from "./chunk-ZVVMGPBJ.js";
43
44
 
44
- // 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/query/types.js
45
+ // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
45
46
  var QUERY_LIMITS = {
46
47
  bytes: 8192,
47
48
  depth: 32,
@@ -85,7 +86,7 @@ function queryError(reason, span, alternative, context3 = {}, details = {}) {
85
86
  __name(queryError, "queryError");
86
87
  var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
87
88
 
88
- // 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/query/dates.js
89
+ // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
89
90
  var timezoneOf = /* @__PURE__ */ __name((given) => {
90
91
  const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
91
92
  try {
@@ -97,7 +98,7 @@ var timezoneOf = /* @__PURE__ */ __name((given) => {
97
98
  }, "timezoneOf");
98
99
  var calendar = /* @__PURE__ */ __name((value, span) => {
99
100
  if (!/^\d{4}-\d{2}-\d{2}$/u.test(value))
100
- queryError("query.invalid-date", span, "use an ISO date or a quoted timestamp with offset");
101
+ queryError("query.invalid-date", span, "use an ISO date such as 2026-10-01");
101
102
  const year = Number(value.slice(0, 4)), month = Number(value.slice(5, 7)), day = Number(value.slice(8, 10));
102
103
  const date = /* @__PURE__ */ new Date(0);
103
104
  date.setUTCFullYear(year, month - 1, day);
@@ -182,6 +183,7 @@ var zonedMoment = /* @__PURE__ */ __name((value, zone, span, { end = false } = {
182
183
  return time;
183
184
  }, "zonedMoment");
184
185
  var AGO = /^(\d+)(m|h|d)$/u;
186
+ var MOMENT = /^(\d{4}-\d{2}-\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/u;
185
187
  var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
186
188
  var dayOf = /* @__PURE__ */ __name((word, zone, now, span) => {
187
189
  const today = new Intl.DateTimeFormat("en-CA", {
@@ -210,11 +212,15 @@ var dateEndpoint = /* @__PURE__ */ __name((value, zone, side, inclusive, span, n
210
212
  time: dayBoundary(value, zone, side === "lower" ? !inclusive : inclusive, span),
211
213
  inclusive: side === "lower"
212
214
  };
213
- if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/u.test(value))
214
- queryError("query.invalid-date", span, "use an ISO date, today, yesterday, 30m/2h/7d ago, or a quoted timestamp with offset");
215
- calendar(value.slice(0, 10), span);
216
- const time = Date.parse(value);
217
- if (!Number.isFinite(time) || Number(value.slice(11, 13)) > 23 || Number(value.slice(14, 16)) > 59 || Number(value.slice(17, 19)) > 59)
215
+ const [, day, hour, minute, second = "0", offset] = MOMENT.exec(value) ?? [];
216
+ if (day === void 0)
217
+ queryError("query.invalid-date", span, "use an ISO date, a date and time such as 2026-10-01T09:00 (optional seconds and offset), today, yesterday or 30m/2h/7d ago");
218
+ const moment = value.replace(" ", "T");
219
+ if (offset === void 0)
220
+ return { time: wallTime(moment, zone, span), inclusive };
221
+ calendar(day, span);
222
+ const time = Date.parse(moment);
223
+ if (!Number.isFinite(time) || Number(hour) > 23 || Number(minute) > 59 || Number(second) > 59)
218
224
  queryError("query.invalid-date", span);
219
225
  return { time, inclusive };
220
226
  }, "dateEndpoint");
@@ -230,7 +236,7 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
230
236
  };
231
237
  }, "dateRange");
232
238
 
233
- // 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/query/evaluate.js
239
+ // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
234
240
  var wordsOf = /* @__PURE__ */ __name((text5) => text5.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
235
241
  var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
236
242
  var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
@@ -285,7 +291,7 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
285
291
  }, "matches");
286
292
  var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
287
293
 
288
- // 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/query/fields.js
294
+ // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
289
295
  var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
290
296
  var OPERATORS_BY_TYPE = {
291
297
  kw: ["term", "phrase", "wildcard"],
@@ -364,7 +370,7 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
364
370
  return [...own, ...relations, ...states];
365
371
  }, "queryFieldsOf");
366
372
 
367
- // 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/query/help.js
373
+ // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
368
374
  var shownOf = /* @__PURE__ */ __name((registry2) => registry2.backend === "native" ? registry2.fields.filter((field) => field.native) : registry2.fields, "shownOf");
369
375
  var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
370
376
  var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
@@ -401,7 +407,7 @@ var queryDescription = /* @__PURE__ */ __name((registry2) => {
401
407
  return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
402
408
  }, "queryDescription");
403
409
 
404
- // 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/query/parser.js
410
+ // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
405
411
  var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
406
412
  var reserved = /* @__PURE__ */ new Set([
407
413
  "+",
@@ -539,7 +545,7 @@ var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proxim
539
545
  fail("query.too-large", { start: 0, end: text5.length });
540
546
  const tokens = tokensOf(text5, fail);
541
547
  let at = 0;
542
- let count6 = 0;
548
+ let count7 = 0;
543
549
  let depth = 0;
544
550
  const peek = /* @__PURE__ */ __name(() => tokens[at], "peek");
545
551
  const take = /* @__PURE__ */ __name(() => tokens[at++], "take");
@@ -549,7 +555,7 @@ var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proxim
549
555
  return take();
550
556
  }, "expect");
551
557
  const built = /* @__PURE__ */ __name((node) => {
552
- if (++count6 > QUERY_LIMITS.nodes)
558
+ if (++count7 > QUERY_LIMITS.nodes)
553
559
  fail("query.too-large", node.span);
554
560
  return node;
555
561
  }, "built");
@@ -710,7 +716,7 @@ var implicitTextTerms = /* @__PURE__ */ __name((text5) => {
710
716
  return new Set(tokens.flatMap((token, index) => (token.kind === "term" || token.kind === "number") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index - 1]?.kind ?? "") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index + 1]?.kind ?? "") ? [token.span.start] : []));
711
717
  }, "implicitTextTerms");
712
718
 
713
- // 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/query/validate.js
719
+ // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
714
720
  var inContext = /* @__PURE__ */ __name((context3, run2) => {
715
721
  try {
716
722
  run2();
@@ -785,7 +791,7 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry2, options = {}) => {
785
791
  }, "validateQuery");
786
792
  var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
787
793
 
788
- // 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/query/registry.js
794
+ // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
789
795
  var describeQuery = /* @__PURE__ */ __name((registry2) => ({
790
796
  entity: registry2.entity,
791
797
  backend: registry2.backend,
@@ -856,7 +862,7 @@ var QUERY_REASONS = defineReasons([
856
862
  details: [...SPAN, ...details]
857
863
  })));
858
864
 
859
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/search/service-query.js
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/search/service-query.js
860
866
  var BACKENDS = ["archive", "server", "both"];
861
867
  var MAX_BRANCHES = 64;
862
868
  var some = /* @__PURE__ */ __name((value) => value === void 0 ? [] : [value], "some");
@@ -891,8 +897,11 @@ var windowOf = /* @__PURE__ */ __name(({ lower, upper, lower_inclusive, upper_in
891
897
  ...lower === void 0 ? {} : { from: lower_inclusive ? lower : lower + 1 },
892
898
  ...upper === void 0 ? {} : { to: upper_inclusive ? upper : upper - 1 }
893
899
  }), "windowOf");
900
+ var RELATIVE_TIME = /^\d+[mhd]$/i;
901
+ var OFFSET = /(?:Z|[+-]\d{2}:?\d{2})$/i;
902
+ var readsZone = /* @__PURE__ */ __name((ast, times) => walkQuery(ast.root).some((term) => times.has(term.field) && [term.value, term.upper].some((value) => value !== void 0 && value !== "*" && !RELATIVE_TIME.test(value) && !OFFSET.test(value))), "readsZone");
894
903
 
895
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/reference.js
904
+ // 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/meetings/reference.js
896
905
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
897
906
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
898
907
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -929,7 +938,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text5) => {
929
938
  }, "parseMeetingReference");
930
939
  var canonicalMeetingReference = /* @__PURE__ */ __name((text5) => formatMeetingReference(parseMeetingReference(text5)), "canonicalMeetingReference");
931
940
 
932
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/payment.js
941
+ // 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/meetings/payment.js
933
942
  var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
934
943
  var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
935
944
  var PAYMENT_STATES = ["expected", "paid", "cancelled"];
@@ -1023,7 +1032,7 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
1023
1032
  return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
1024
1033
  }, "paymentTitle");
1025
1034
 
1026
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/item.js
1035
+ // 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/meetings/item.js
1027
1036
  var text = string();
1028
1037
  var count = pipe(number(), integer(), minValue(0));
1029
1038
  var MEETING_ISSUES = ["time_without_zone"];
@@ -1062,7 +1071,7 @@ var meetingEntries = {
1062
1071
  };
1063
1072
  var meeting = strictObject(meetingEntries);
1064
1073
  var MEETING_UNTRUSTED = ["title", "description", "location"];
1065
- var iso = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
1074
+ var iso = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
1066
1075
  var meetingItem = /* @__PURE__ */ __name((row, owner) => {
1067
1076
  const issues = meetingIssuesOf(row.metadata);
1068
1077
  return {
@@ -1113,14 +1122,14 @@ var MEETING_QUERY = {
1113
1122
  })
1114
1123
  };
1115
1124
 
1116
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/store.js
1125
+ // 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/meetings/store.js
1117
1126
  var MEETING_DOCUMENT_ROLES = ["transcript", "recording", "notes"];
1118
1127
  var READ_BUDGET_EXCEEDED = "Meeting search exceeds its stored text byte budget";
1119
1128
 
1120
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/answers.js
1129
+ // 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/meetings/answers.js
1121
1130
  var text2 = string();
1122
1131
  var count2 = pipe(number(), integer(), minValue(0));
1123
- var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
1132
+ var iso2 = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
1124
1133
  var meetingHit = strictObject({
1125
1134
  /** The cue for a transcript passage, else the meeting. */
1126
1135
  ref: reference,
@@ -1372,7 +1381,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
1372
1381
  };
1373
1382
  }, "meetingHitsList");
1374
1383
 
1375
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
1384
+ // 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/meetings/join-key.js
1376
1385
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
1377
1386
  const parsed = urlOf(url);
1378
1387
  if (!parsed)
@@ -1406,7 +1415,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
1406
1415
  }
1407
1416
  }, "urlOf");
1408
1417
 
1409
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
1418
+ // 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/meetings/calendar-text.js
1410
1419
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
1411
1420
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
1412
1421
  var htmlToText = /* @__PURE__ */ __name((html) => html.replace(/<\s*br\s*\/?>/giu, "\n").replace(/<\/\s*(p|div|li|tr|h[1-6])\s*>/giu, "\n").replace(/<a\s[^>]*href\s*=\s*"([^"]*)"[^>]*>/giu, " $1 ").replace(/<[^>]+>/gu, "").replace(/&(amp|lt|gt|quot|#39|apos|nbsp);/gu, (_, name) => ENTITIES[name] ?? ""), "htmlToText");
@@ -1443,7 +1452,232 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
1443
1452
  return kept;
1444
1453
  }, "entryMetadata");
1445
1454
 
1446
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1455
+ // 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/meetings/calls.js
1456
+ var CALL_DIRECTIONS = ["incoming", "outgoing", "internal"];
1457
+ var CALL_OUTCOMES = ["answered", "voicemail", "busy", "no_answer", "failed"];
1458
+
1459
+ // 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/meetings/call-answers.js
1460
+ var count3 = pipe(number(), integer(), minValue(0));
1461
+ var ms = count3;
1462
+ var id = pipe(number(), integer(), minValue(1));
1463
+ var counts = /* @__PURE__ */ __name((keys) => strictObject(Object.fromEntries([...keys, "unknown"].map((key) => [key, count3]))), "counts");
1464
+ var maybe = exactOptional;
1465
+ var employee = strictObject({
1466
+ /** `extension:<number>`, or `identity:<id>` where the provider names no extension. */
1467
+ key: string(),
1468
+ name: nullable(string()),
1469
+ identity_id: nullable(id),
1470
+ extension: nullable(string()),
1471
+ calls: count3,
1472
+ incoming: count3,
1473
+ outgoing: count3,
1474
+ internal: count3,
1475
+ placed: maybe(count3),
1476
+ answered: maybe(count3),
1477
+ rang_not_answered: maybe(count3),
1478
+ talk_ms: maybe(ms),
1479
+ mean_talk_ms: maybe(nullable(ms)),
1480
+ mean_wait_ms: maybe(nullable(ms)),
1481
+ max_wait_ms: maybe(nullable(ms))
1482
+ });
1483
+ var periodFields = {
1484
+ calls: count3,
1485
+ incoming: count3,
1486
+ outgoing: count3,
1487
+ internal: count3,
1488
+ answered: maybe(count3),
1489
+ missed: maybe(count3),
1490
+ talk_ms: maybe(ms)
1491
+ };
1492
+ var callRef = strictObject({ ref: reference, meeting_id: id, started_at: nullable(isoTime) });
1493
+ var callStatsSchema = strictObject({
1494
+ time_zone: string(),
1495
+ callback_within_ms: ms,
1496
+ short_call_under_ms: ms,
1497
+ calls: count3,
1498
+ /** Selected meetings that are not calls. */
1499
+ not_calls: count3,
1500
+ /** How many calls give each field; `roles` says who placed, answered and rang. */
1501
+ known: strictObject({
1502
+ direction: count3,
1503
+ outcome: count3,
1504
+ wait_ms: count3,
1505
+ talk_ms: count3,
1506
+ duration_ms: count3,
1507
+ roles: count3
1508
+ }),
1509
+ by_direction: maybe(counts(CALL_DIRECTIONS)),
1510
+ by_outcome: maybe(counts(CALL_OUTCOMES)),
1511
+ talk_ms: maybe(ms),
1512
+ mean_talk_ms: maybe(ms),
1513
+ duration_ms: maybe(ms),
1514
+ mean_wait_ms: maybe(nullable(ms)),
1515
+ max_wait_ms: maybe(nullable(ms)),
1516
+ short_calls: maybe(count3),
1517
+ employees: array(employee),
1518
+ /** Hours 0–23 in `time_zone`. */
1519
+ hours: array(strictObject({ hour: pipe(count3, maxValue(23)), ...periodFields })),
1520
+ /** `YYYY-MM-DD` in `time_zone`, the days with a call. */
1521
+ days: array(strictObject({ date: string(), ...periodFields })),
1522
+ missed: maybe(strictObject({
1523
+ calls: count3,
1524
+ called_back: count3,
1525
+ not_called_back: count3,
1526
+ unknown_callback: count3,
1527
+ unknown_outcome: count3,
1528
+ /** Newest first. */
1529
+ items: array(strictObject({
1530
+ ...callRef.entries,
1531
+ outcome: picklist(["voicemail", "busy", "no_answer"]),
1532
+ client: nullable(strictObject({ key: string(), name: nullable(string()) })),
1533
+ rang: array(string()),
1534
+ called_back: maybe(boolean()),
1535
+ callback: maybe(nullable(strictObject({ ...callRef.entries, after_ms: ms, direction: picklist(["outgoing", "incoming"]) })))
1536
+ })),
1537
+ has_more: boolean()
1538
+ }))
1539
+ });
1540
+ var callStats = callStatsSchema;
1541
+
1542
+ // 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/meetings/stats.js
1543
+ var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
1544
+ var zoneOf = /* @__PURE__ */ __name((timeZone) => {
1545
+ const zone = timeZone ?? "UTC";
1546
+ try {
1547
+ new Intl.DateTimeFormat("en", { timeZone: zone });
1548
+ } catch {
1549
+ throw new CliError("validation_error", "expected an IANA time zone such as Europe/Madrid");
1550
+ }
1551
+ return zone;
1552
+ }, "zoneOf");
1553
+ var DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
1554
+ var weekStart = /* @__PURE__ */ __name((at, format) => {
1555
+ const parts2 = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
1556
+ const day = Date.UTC(Number(parts2.year), Number(parts2.month) - 1, Number(parts2.day));
1557
+ return new Date(day - DAYS.indexOf(parts2.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
1558
+ }, "weekStart");
1559
+ var dayKey = /* @__PURE__ */ __name((at, format) => {
1560
+ const parts2 = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
1561
+ return `${parts2.year}-${parts2.month}-${parts2.day}`;
1562
+ }, "dayKey");
1563
+ var zoneFormat = /* @__PURE__ */ __name((zone) => new Intl.DateTimeFormat("en-US", {
1564
+ timeZone: zone,
1565
+ year: "numeric",
1566
+ month: "2-digit",
1567
+ day: "2-digit",
1568
+ weekday: "short"
1569
+ }), "zoneFormat");
1570
+ var NO_SERIES = "no-series";
1571
+ var MOST_COUNT_ROWS = 100;
1572
+ var minutesOf = /* @__PURE__ */ __name((ms2) => Math.round(ms2 / 6e4), "minutesOf");
1573
+ var meanOf = /* @__PURE__ */ __name((ms2, timed) => timed === 0 ? null : Math.round(ms2 / timed / 6e3) / 10, "meanOf");
1574
+ var aggregateMeetingCounts = /* @__PURE__ */ __name((meetings, by, timeZone, limit = MOST_COUNT_ROWS) => {
1575
+ if (!MEETING_COUNTS_GROUPINGS.includes(by))
1576
+ throw new CliError("validation_error", `--by takes ${MEETING_COUNTS_GROUPINGS.join(", ")}`);
1577
+ if (!Number.isSafeInteger(limit) || limit < 1)
1578
+ throw new CliError("validation_error", "--limit is a positive number");
1579
+ const zone = zoneOf(timeZone);
1580
+ const format = zoneFormat(zone);
1581
+ const sum = /* @__PURE__ */ __name(() => ({ meetings: 0, ms: 0, timed: 0, transcripts: 0 }), "sum");
1582
+ const add = /* @__PURE__ */ __name((into, meeting2) => {
1583
+ into.meetings += 1;
1584
+ if (meeting2.durationMs !== null) {
1585
+ into.ms += Math.max(0, meeting2.durationMs);
1586
+ into.timed += 1;
1587
+ }
1588
+ if (meeting2.transcribed)
1589
+ into.transcripts += 1;
1590
+ }, "add");
1591
+ const total = { ...sum(), name: null };
1592
+ const groups = /* @__PURE__ */ new Map();
1593
+ for (const meeting2 of meetings) {
1594
+ add(total, meeting2);
1595
+ const key = by === "series" ? meeting2.seriesKey === null ? NO_SERIES : `series:${meeting2.seriesKey}` : meeting2.startedAt === null ? null : by === "day" ? dayKey(meeting2.startedAt, format) : weekStart(meeting2.startedAt, format);
1596
+ if (key === null)
1597
+ continue;
1598
+ const group = groups.get(key) ?? { ...sum(), name: by === "series" ? meeting2.seriesTitle : null };
1599
+ add(group, meeting2);
1600
+ groups.set(key, group);
1601
+ }
1602
+ const ordered = [...groups.entries()].sort(([a, one], [b, other]) => by === "series" ? other.ms - one.ms || other.meetings - one.meetings || a.localeCompare(b) : b.localeCompare(a));
1603
+ const kept = ordered.slice(0, limit);
1604
+ if (by !== "series")
1605
+ kept.reverse();
1606
+ const counted = /* @__PURE__ */ __name(({ meetings: count7, ms: ms2, timed, transcripts }) => ({
1607
+ meetings: count7,
1608
+ minutes: minutesOf(ms2),
1609
+ meanMinutes: meanOf(ms2, timed),
1610
+ transcripts
1611
+ }), "counted");
1612
+ return {
1613
+ by,
1614
+ timeZone: zone,
1615
+ ...counted(total),
1616
+ rows: kept.map(([key, group]) => ({ key, name: group.name, ...counted(group) })),
1617
+ hasMore: ordered.length > limit
1618
+ };
1619
+ }, "aggregateMeetingCounts");
1620
+ var UNKNOWN_SPEAKER = "unknown";
1621
+ var speakerOf = /* @__PURE__ */ __name((row) => row.personId !== null ? { key: `person:${row.personId}`, name: row.personName ?? row.identityName ?? row.speakerName } : row.identityId !== null ? { key: `identity:${row.identityId}`, name: row.identityName ?? row.speakerName } : row.speakerName?.trim() ? { key: `name:${row.speakerName.trim().toLowerCase()}`, name: row.speakerName.trim() } : { key: UNKNOWN_SPEAKER, name: null }, "speakerOf");
1622
+ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
1623
+ const zone = zoneOf(timeZone);
1624
+ const format = zoneFormat(zone);
1625
+ const speakers = /* @__PURE__ */ new Map();
1626
+ const weeks = /* @__PURE__ */ new Map();
1627
+ const meetings = /* @__PURE__ */ new Set();
1628
+ let lines = 0;
1629
+ let words2 = 0;
1630
+ let talkMs = 0;
1631
+ for (const row of rows) {
1632
+ const talk = Math.max(0, row.endMs - row.startMs);
1633
+ meetings.add(row.meetingId);
1634
+ lines += 1;
1635
+ words2 += row.words;
1636
+ talkMs += talk;
1637
+ const who = speakerOf(row);
1638
+ const held = speakers.get(who.key) ?? {
1639
+ key: who.key,
1640
+ name: who.name ?? null,
1641
+ personId: row.personId,
1642
+ identityId: row.personId === null ? row.identityId : null,
1643
+ meetings: 0,
1644
+ lines: 0,
1645
+ words: 0,
1646
+ talkMs: 0,
1647
+ share: 0,
1648
+ seen: /* @__PURE__ */ new Set()
1649
+ };
1650
+ held.seen.add(row.meetingId);
1651
+ held.lines += 1;
1652
+ held.words += row.words;
1653
+ held.talkMs += talk;
1654
+ speakers.set(who.key, held);
1655
+ if (row.startedAt !== null) {
1656
+ const week = weeks.get(weekStart(row.startedAt, format)) ?? { meetings: /* @__PURE__ */ new Set(), talkMs: 0 };
1657
+ week.meetings.add(row.meetingId);
1658
+ week.talkMs += talk;
1659
+ weeks.set(weekStart(row.startedAt, format), week);
1660
+ }
1661
+ }
1662
+ return {
1663
+ timeZone: zone,
1664
+ meetings: meetings.size,
1665
+ lines,
1666
+ words: words2,
1667
+ talkMs,
1668
+ speakers: [...speakers.values()].map(({ seen, ...speaker }) => ({
1669
+ ...speaker,
1670
+ meetings: seen.size,
1671
+ share: talkMs === 0 ? 0 : Math.round(speaker.talkMs / talkMs * 1e3) / 1e3
1672
+ })).sort((a, b) => b.talkMs - a.talkMs || a.key.localeCompare(b.key)),
1673
+ weeks: [...weeks.entries()].map(([start, week]) => ({ weekStart: start, meetings: week.meetings.size, talkMs: week.talkMs })).sort((a, b) => a.weekStart.localeCompare(b.weekStart))
1674
+ };
1675
+ }, "aggregateMeetingStats");
1676
+
1677
+ // 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/meetings/call-stats.js
1678
+ var CALLBACK_WITHIN_MS = 24 * 60 * 60 * 1e3;
1679
+
1680
+ // 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/meetings/cue-fingerprint.js
1447
1681
  import { createHash } from "node:crypto";
1448
1682
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
1449
1683
  reference: cue2.reference,
@@ -1457,7 +1691,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
1457
1691
  text: cue2.text
1458
1692
  })).digest("hex"), "meetingCueFingerprint");
1459
1693
 
1460
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1694
+ // 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/meetings/event-query.js
1461
1695
  var EVENT_QUERY = defineQuery({
1462
1696
  entity: "event",
1463
1697
  backend: "sql",
@@ -1473,7 +1707,7 @@ var EVENT_QUERY = defineQuery({
1473
1707
  ]
1474
1708
  });
1475
1709
 
1476
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1710
+ // 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/meetings/event-store.js
1477
1711
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
1478
1712
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
1479
1713
  if (entry.recurrenceEndsAt !== null)
@@ -1496,7 +1730,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
1496
1730
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
1497
1731
  }, "entryInWindow");
1498
1732
 
1499
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/events.js
1733
+ // 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/meetings/events.js
1500
1734
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(), { create = true } = {}) => {
1501
1735
  const current = await store.meeting(details.meeting.id);
1502
1736
  if (!current)
@@ -1511,7 +1745,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(),
1511
1745
  endsAt: meeting2.endedAt ?? meeting2.startedAt
1512
1746
  });
1513
1747
  if (candidates.length > 1) {
1514
- await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id3 }) => id3), now);
1748
+ await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id4 }) => id4), now);
1515
1749
  return null;
1516
1750
  }
1517
1751
  let event2 = candidates[0];
@@ -1541,7 +1775,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(),
1541
1775
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
1542
1776
  }, "linkEvent");
1543
1777
 
1544
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1778
+ // 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/meetings/participant-search.js
1545
1779
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text5) => text5.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
1546
1780
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
1547
1781
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -1565,7 +1799,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
1565
1799
  };
1566
1800
  }, "validateMeetingParticipantSearch");
1567
1801
 
1568
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1802
+ // 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/meetings/reads.js
1569
1803
  var MeetingError = class extends CliError {
1570
1804
  static {
1571
1805
  __name(this, "MeetingError");
@@ -1592,8 +1826,8 @@ var validateFilter = /* @__PURE__ */ __name((filter) => {
1592
1826
  if (value !== void 0 && (!Number.isSafeInteger(value) || value < 0))
1593
1827
  throw new MeetingError("validation_error", "expected a nonnegative integer");
1594
1828
  }, "validateFilter");
1595
- var meetingShow = /* @__PURE__ */ __name(async (store, id3, accountId) => {
1596
- const details = await store.meeting(positiveInteger(id3));
1829
+ var meetingShow = /* @__PURE__ */ __name(async (store, id4, accountId) => {
1830
+ const details = await store.meeting(positiveInteger(id4));
1597
1831
  if (!details || accountId !== void 0 && details.meeting.accountId !== accountId)
1598
1832
  throw new MeetingError("not_found", "meeting not found");
1599
1833
  return details;
@@ -1687,16 +1921,16 @@ var ownerOf = /* @__PURE__ */ __name(async (store, accountId) => {
1687
1921
  var meetingDetailsBody = /* @__PURE__ */ __name(async (store, details) => ({
1688
1922
  item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId))
1689
1923
  }), "meetingDetailsBody");
1690
- var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id3, accountId, options = {}) => {
1691
- const details = await meetingShow(store, id3, accountId);
1924
+ var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id4, accountId, options = {}) => {
1925
+ const details = await meetingShow(store, id4, accountId);
1692
1926
  return wholeList(details.transcripts.filter((t) => (options.history || t.transcript.supersededAt === null) && t.transcript.deletedAt === null).map((t) => meetingTranscriptItem(details.meeting.accountId, t.transcript, t.rows)));
1693
1927
  }, "meetingTranscriptAnswer");
1694
- var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id3, accountId) => {
1695
- const details = await meetingShow(store, id3, accountId);
1928
+ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId) => {
1929
+ const details = await meetingShow(store, id4, accountId);
1696
1930
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
1697
1931
  }, "meetingSummaryAnswer");
1698
1932
 
1699
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/export.js
1933
+ // 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/meetings/export.js
1700
1934
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
1701
1935
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
1702
1936
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -1739,10 +1973,10 @@ var transcriptsOf = /* @__PURE__ */ __name((details, transcriptId) => {
1739
1973
  }
1740
1974
  return details.transcripts.filter((part) => part.transcript.supersededAt === null && part.transcript.deletedAt === null);
1741
1975
  }, "transcriptsOf");
1742
- var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
1976
+ var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
1743
1977
  if (options.format !== "markdown" && options.format !== "vtt")
1744
1978
  throw new MeetingError("validation_error", "export format must be markdown or vtt");
1745
- const details = await meetingShow(store, id3, options.accountId);
1979
+ const details = await meetingShow(store, id4, options.accountId);
1746
1980
  const transcripts = transcriptsOf(details, options.transcriptId);
1747
1981
  let content;
1748
1982
  if (options.format === "vtt") {
@@ -1792,10 +2026,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
1792
2026
  };
1793
2027
  }, "exportMeeting");
1794
2028
 
1795
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
2029
+ // 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/meetings/findings-rules.js
1796
2030
  import { createHash as createHash2 } from "node:crypto";
1797
2031
 
1798
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
2032
+ // 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/meetings/timestamp.js
1799
2033
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1800
2034
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
1801
2035
  throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
@@ -1806,7 +2040,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1806
2040
  return new Date(value).toISOString();
1807
2041
  }, "meetingTimestamp");
1808
2042
 
1809
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
2043
+ // 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/meetings/findings-rules.js
1810
2044
  var TASK_TYPES = ["bug", "feature", "chore"];
1811
2045
  var invalid3 = /* @__PURE__ */ __name((message) => {
1812
2046
  throw new CliError("validation_error", message);
@@ -1819,11 +2053,11 @@ var findingText = /* @__PURE__ */ __name((value, limit) => {
1819
2053
  var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update(JSON.stringify(value)).digest("hex"), "findingHash");
1820
2054
  var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
1821
2055
  var findingWhere = /* @__PURE__ */ __name((of) => {
1822
- const id3 = typeof of.id === "string" ? of.id : null;
2056
+ const id4 = typeof of.id === "string" ? of.id : null;
1823
2057
  const kind3 = typeof of.kind === "string" ? of.kind : null;
1824
2058
  return {
1825
- where: id3 || kind3 ? ` in ${[id3, kind3 && `(${kind3})`].filter(Boolean).join(" ")}` : "",
1826
- named: { ...id3 ? { finding: id3 } : {}, ...kind3 ? { kind: kind3 } : {} }
2059
+ where: id4 || kind3 ? ` in ${[id4, kind3 && `(${kind3})`].filter(Boolean).join(" ")}` : "",
2060
+ named: { ...id4 ? { finding: id4 } : {}, ...kind3 ? { kind: kind3 } : {} }
1827
2061
  };
1828
2062
  }, "findingWhere");
1829
2063
  var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
@@ -1866,16 +2100,16 @@ var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
1866
2100
  return evidence;
1867
2101
  }, "validEvidence");
1868
2102
  var findingId = /* @__PURE__ */ __name((raw, ids2) => {
1869
- const id3 = findingText(raw, 64);
1870
- if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id3) || ids2.has(id3))
2103
+ const id4 = findingText(raw, 64);
2104
+ if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id4) || ids2.has(id4))
1871
2105
  return invalid3("finding IDs must be unique simple keys");
1872
- ids2.add(id3);
1873
- return id3;
2106
+ ids2.add(id4);
2107
+ return id4;
1874
2108
  }, "findingId");
1875
2109
  var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
1876
2110
  if (!finding || typeof finding !== "object")
1877
2111
  return invalid3("a finding is an object");
1878
- const id3 = findingId(finding.id, ids2);
2112
+ const id4 = findingId(finding.id, ids2);
1879
2113
  const project = finding.project === void 0 && rules.anySubject ? void 0 : findingText(finding.project, 64);
1880
2114
  if (project !== void 0 && !/^project:[1-9]\d*$/.test(project))
1881
2115
  return invalid3("a finding names a project reference");
@@ -1885,7 +2119,7 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
1885
2119
  return invalid3("a task finding names the project the task goes in");
1886
2120
  const evidence = validEvidence(finding.evidence, rules);
1887
2121
  const base = {
1888
- id: id3,
2122
+ id: id4,
1889
2123
  ...project === void 0 ? {} : { project },
1890
2124
  ...finding.subject === void 0 ? {} : { subject: finding.subject },
1891
2125
  evidence
@@ -1981,7 +2215,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
1981
2215
  var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
1982
2216
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
1983
2217
 
1984
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/findings.js
2218
+ // 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/meetings/findings.js
1985
2219
  var MEETING_FINDINGS_KIND = "meeting_findings";
1986
2220
  var cue = /* @__PURE__ */ __name((raw) => {
1987
2221
  const reference2 = canonicalMeetingReference(raw);
@@ -1992,7 +2226,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
1992
2226
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
1993
2227
  var meetingFindingFingerprint = findingFingerprint;
1994
2228
 
1995
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
2229
+ // 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/meetings/hit-query.js
1996
2230
  var context = {
1997
2231
  command: "search meetings",
1998
2232
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -2104,7 +2338,7 @@ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) =
2104
2338
  }, "liftMeetingFields");
2105
2339
  var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
2106
2340
 
2107
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/language.js
2341
+ // 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/meetings/language.js
2108
2342
  var LATIN_WORDS = {
2109
2343
  en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
2110
2344
  es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
@@ -2153,7 +2387,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
2153
2387
  return null;
2154
2388
  }, "transcriptLanguage");
2155
2389
 
2156
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
2390
+ // 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/meetings/ingest.js
2157
2391
  var contentHash = /* @__PURE__ */ __name(async (text5) => {
2158
2392
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text5));
2159
2393
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -2190,7 +2424,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
2190
2424
  return time;
2191
2425
  }, "timestamp");
2192
2426
 
2193
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2427
+ // 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/meetings/transcript-text.js
2194
2428
  var TranscriptTextError = class extends Error {
2195
2429
  static {
2196
2430
  __name(this, "TranscriptTextError");
@@ -2245,7 +2479,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
2245
2479
  return { header, lines };
2246
2480
  }, "parseTranscriptText");
2247
2481
 
2248
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2482
+ // 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/meetings/vtt.js
2249
2483
  var VttError = class extends Error {
2250
2484
  static {
2251
2485
  __name(this, "VttError");
@@ -2258,8 +2492,8 @@ var millis = /* @__PURE__ */ __name((stamp, lineNo) => {
2258
2492
  const match = TIMESTAMP.exec(stamp);
2259
2493
  if (!match)
2260
2494
  throw new VttError(`line ${lineNo}: "${stamp}" is not a WebVTT timestamp`);
2261
- const [, hours = "0", minutes = "0", seconds = "0", ms = "0"] = match;
2262
- return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3 + Number(ms);
2495
+ const [, hours = "0", minutes = "0", seconds = "0", ms2 = "0"] = match;
2496
+ return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3 + Number(ms2);
2263
2497
  }, "millis");
2264
2498
  var splitSpeaker = /* @__PURE__ */ __name((text5) => {
2265
2499
  const firstLine = text5.split("\n", 1)[0] ?? "";
@@ -2297,7 +2531,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
2297
2531
  return cues;
2298
2532
  }, "parseVtt");
2299
2533
 
2300
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/import.js
2534
+ // 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/meetings/import.js
2301
2535
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
2302
2536
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
2303
2537
  for (const file of files) {
@@ -2330,61 +2564,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
2330
2564
  return report;
2331
2565
  }, "importFiles");
2332
2566
 
2333
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/links.js
2567
+ // 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/meetings/links.js
2334
2568
  var CHAT_MESSAGES_READ = 1e5;
2335
2569
 
2336
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2337
- var nonempty = /* @__PURE__ */ __name((value, name) => {
2338
- if (typeof value !== "string" || !value.trim())
2339
- throw new CliError("validation_error", `${name} must be nonempty`);
2340
- return value;
2341
- }, "nonempty");
2342
- var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
2343
- if (!change || typeof change !== "object" || Array.isArray(change) || Object.keys(change).some((key) => !["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].includes(key)))
2344
- throw new CliError("validation_error", "unsupported meeting change field");
2345
- const result = {};
2346
- if (change.title !== void 0)
2347
- result.title = nonempty(change.title, "meeting title");
2348
- if (create && result.title === void 0)
2349
- throw new CliError("validation_error", "meeting title is required");
2350
- if (change.kind !== void 0) {
2351
- if (change.kind !== "instant" && change.kind !== "scheduled")
2352
- throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
2353
- result.kind = change.kind;
2354
- }
2355
- if (change.startTime !== void 0) {
2356
- result.startTime = meetingTimestamp(change.startTime, "meeting start");
2357
- }
2358
- if (change.durationMinutes !== void 0) {
2359
- if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
2360
- throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
2361
- result.durationMinutes = change.durationMinutes;
2362
- }
2363
- if (change.timezone !== void 0) {
2364
- if (typeof change.timezone !== "string" || !change.timezone.trim())
2365
- throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
2366
- try {
2367
- new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
2368
- } catch {
2369
- throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
2370
- }
2371
- result.timezone = change.timezone;
2372
- }
2373
- if (change.agenda !== void 0) {
2374
- if (typeof change.agenda !== "string")
2375
- throw new CliError("validation_error", "meeting agenda must be text");
2376
- result.agenda = change.agenda;
2377
- }
2378
- if (create) {
2379
- result.kind ??= "scheduled";
2380
- if (result.kind === "scheduled" && result.startTime === void 0)
2381
- throw new CliError("validation_error", "scheduled meeting start is required");
2382
- } else if (!Object.keys(result).length)
2383
- throw new CliError("validation_error", "at least one meeting change is required");
2384
- return Object.freeze(result);
2385
- }, "validateMeetingChange");
2386
-
2387
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/passage.js
2570
+ // 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/meetings/passage.js
2388
2571
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
2389
2572
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
2390
2573
  if (![before, after].every((value) => Number.isSafeInteger(value) && value >= 0) || before + after > 999 || !Number.isSafeInteger(bytes) || bytes < 2 || bytes > 4194304 || !Number.isSafeInteger(max_read_bytes) || max_read_bytes < 1 || max_read_bytes > 67108864 || expected_fingerprint !== void 0 && (typeof expected_fingerprint !== "string" || !/^[a-f0-9]{64}$/.test(expected_fingerprint)))
@@ -2397,7 +2580,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
2397
2580
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
2398
2581
  }, "validateMeetingPassage");
2399
2582
 
2400
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2583
+ // 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/meetings/preparation-context.js
2401
2584
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2402
2585
  if (!original || typeof original !== "object" || Array.isArray(original))
2403
2586
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -2422,43 +2605,43 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2422
2605
  return { ...input, limit, maxReadBytes };
2423
2606
  }, "validateMeetingPreparationContext");
2424
2607
 
2425
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2426
- var count3 = pipe(number(), integer(), minValue(0));
2427
- var id = pipe(string(), minLength(1));
2608
+ // 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/meetings/project-evidence-answer.js
2609
+ var count4 = pipe(number(), integer(), minValue(0));
2610
+ var id2 = pipe(string(), minLength(1));
2428
2611
  var meetingProjectEvidence = strictObject({
2429
2612
  schema_version: literal(1),
2430
2613
  kind: literal("meeting_project_evidence"),
2431
- account_id: id,
2614
+ account_id: id2,
2432
2615
  query: string(),
2433
- project: strictObject({ id, name: string(), key: nullable(string()) }),
2616
+ project: strictObject({ id: id2, name: string(), key: nullable(string()) }),
2434
2617
  term: strictObject({
2435
2618
  name: string(),
2436
2619
  kind: picklist(["canonical", "key", "alias"]),
2437
- alias_id: optional(id)
2620
+ alias_id: optional(id2)
2438
2621
  }),
2439
2622
  hits: array(meetingHit),
2440
2623
  association: literal("unconfirmed-word-evidence"),
2441
- vocabulary_fingerprint: id,
2624
+ vocabulary_fingerprint: id2,
2442
2625
  selection: strictObject({
2443
- meeting_id: optional(id),
2444
- identity_id: optional(id),
2445
- person_id: optional(id),
2446
- tag_id: optional(id),
2447
- event_id: optional(id),
2448
- series_id: optional(id),
2626
+ meeting_id: optional(id2),
2627
+ identity_id: optional(id2),
2628
+ person_id: optional(id2),
2629
+ tag_id: optional(id2),
2630
+ event_id: optional(id2),
2631
+ series_id: optional(id2),
2449
2632
  since: optional(isoTime),
2450
2633
  until: optional(isoTime)
2451
2634
  }),
2452
- limits: strictObject({ limit: count3, max_read_bytes: count3, max_vocabulary_read_bytes: count3, max_terms: count3 }),
2635
+ limits: strictObject({ limit: count4, max_read_bytes: count4, max_vocabulary_read_bytes: count4, max_terms: count4 }),
2453
2636
  page: pageSchema,
2454
2637
  coverage: strictObject({
2455
2638
  archive_completeness: literal("unknown"),
2456
2639
  current_revisions: literal(true),
2457
2640
  indexing: picklist(["ready", "pending"]),
2458
2641
  index_completeness: literal("unknown"),
2459
- term_index: count3,
2460
- terms_total: count3,
2461
- remaining_terms: count3,
2642
+ term_index: count4,
2643
+ terms_total: count4,
2644
+ remaining_terms: count4,
2462
2645
  duplicates: literal("may-repeat-between-terms")
2463
2646
  })
2464
2647
  });
@@ -2543,7 +2726,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
2543
2726
  };
2544
2727
  }, "meetingProjectEvidenceAnswer");
2545
2728
 
2546
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2729
+ // 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/meetings/search-validation.js
2547
2730
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2548
2731
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
2549
2732
  if (typeof query !== "string" || !query.trim() || query.includes("\0") || new TextEncoder().encode(query).byteLength > 65536 || !integer3(options.limit ?? 100, 1, 1e3) || !integer3(options.maxReadBytes ?? 4194304, 1, 67108864) || [
@@ -2563,7 +2746,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2563
2746
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
2564
2747
  }, "validateMeetingHitSearch");
2565
2748
 
2566
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2749
+ // 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/meetings/project-evidence-query.js
2567
2750
  var ids = {
2568
2751
  meeting_id: "meetingId",
2569
2752
  identity_id: "participantIdentityId",
@@ -2654,7 +2837,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
2654
2837
  return { project: project.trim(), options, query: frozen.join(" AND ") };
2655
2838
  }, "prepareMeetingProjectEvidence");
2656
2839
 
2657
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2840
+ // 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/meetings/project-evidence.js
2658
2841
  var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
2659
2842
  const prepared = prepareMeetingProjectEvidence(project, request, now);
2660
2843
  const page = await read(prepared.project, prepared.options);
@@ -2662,7 +2845,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
2662
2845
  return meetingProjectEvidenceAnswer(page, prepared);
2663
2846
  }, "readMeetingProjectEvidence");
2664
2847
 
2665
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2848
+ // 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/meetings/pull.js
2666
2849
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
2667
2850
  const { identityExternalId, phone, ...fields } = p;
2668
2851
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
@@ -2686,7 +2869,7 @@ var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount
2686
2869
  throw new Error("Meeting ends before it starts");
2687
2870
  const keptEnd = kept?.endedAt ?? null;
2688
2871
  const endedAt = given ?? (keptEnd !== null && keptEnd >= startedAt ? keptEnd : null);
2689
- const count6 = participantsCount === null && kept ? kept.participantsCount : participantsCount;
2872
+ const count7 = participantsCount === null && kept ? kept.participantsCount : participantsCount;
2690
2873
  const metadata = kept?.metadata && m.metadata ? { ...kept.metadata, ...m.metadata } : m.metadata ?? kept?.metadata ?? null;
2691
2874
  const meeting2 = {
2692
2875
  accountId,
@@ -2700,7 +2883,7 @@ var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount
2700
2883
  durationMs: endedAt === null ? null : endedAt - startedAt,
2701
2884
  timezone: m.timezone ?? kept?.timezone ?? null,
2702
2885
  hostIdentityId: kept?.hostIdentityId ?? null,
2703
- ...count6 === void 0 ? {} : { participantsCount: count6 },
2886
+ ...count7 === void 0 ? {} : { participantsCount: count7 },
2704
2887
  metadata,
2705
2888
  deletedAt: null
2706
2889
  };
@@ -2719,9 +2902,9 @@ var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount
2719
2902
  return meeting2;
2720
2903
  }, "sourceMeetingInput");
2721
2904
  var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts2, { accountId, now, kept }) => {
2722
- const id3 = m.occurrence.id;
2905
+ const id4 = m.occurrence.id;
2723
2906
  const { participants: sourceParticipants, transcript: lines, chat, summary } = parts2;
2724
- const participants = participantInputs(source.provider, id3, sourceParticipants ?? [], accountId);
2907
+ const participants = participantInputs(source.provider, id4, sourceParticipants ?? [], accountId);
2725
2908
  const meeting2 = sourceMeetingInput(m, accountId, sourceParticipants === void 0 ? void 0 : sourceParticipants?.length ?? null, kept);
2726
2909
  const linked = sourceParticipants !== void 0;
2727
2910
  const format = source.transcriptFormat ?? null;
@@ -2771,11 +2954,11 @@ var startOf = /* @__PURE__ */ __name((m) => {
2771
2954
  }, "startOf");
2772
2955
  var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2773
2956
  const now = options.now ?? Date.now();
2774
- for (const [name, ms] of [
2957
+ for (const [name, ms2] of [
2775
2958
  ["lookbackMs", options.lookbackMs ?? 0],
2776
2959
  ["overlapMs", source.overlapMs ?? 0]
2777
2960
  ])
2778
- if (!Number.isSafeInteger(ms) || ms < 0 || ms > 31 * 864e5)
2961
+ if (!Number.isSafeInteger(ms2) || ms2 < 0 || ms2 > 31 * 864e5)
2779
2962
  throw new Error(`${name} must be an integer from 0 through 31 days`);
2780
2963
  const lookbackMs = Math.max(options.lookbackMs ?? 0, source.overlapMs ?? 0);
2781
2964
  const cursor = options.rescan ? void 0 : await store.cursor(options.accountId);
@@ -2810,7 +2993,7 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2810
2993
  await linkCallers();
2811
2994
  return report;
2812
2995
  }
2813
- const id3 = m.occurrence.id;
2996
+ const id4 = m.occurrence.id;
2814
2997
  const failedHere = /* @__PURE__ */ __name(() => {
2815
2998
  failed = true;
2816
2999
  firstFailed ??= startOf(m);
@@ -2821,13 +3004,13 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2821
3004
  } catch (error) {
2822
3005
  failedHere();
2823
3006
  const message = error instanceof Error ? error.message : "could not be read";
2824
- report.warnings.push({ externalId: id3, message: `${part}: ${message}` });
3007
+ report.warnings.push({ externalId: id4, message: `${part}: ${message}` });
2825
3008
  return void 0;
2826
3009
  }
2827
3010
  }, "read");
2828
3011
  try {
2829
- const sourceParticipants = await read("participants", () => source.participants(id3));
2830
- const participants = participantInputs(source.provider, id3, sourceParticipants ?? [], options.accountId);
3012
+ const sourceParticipants = await read("participants", () => source.participants(id4));
3013
+ const participants = participantInputs(source.provider, id4, sourceParticipants ?? [], options.accountId);
2831
3014
  const names = /* @__PURE__ */ new Map();
2832
3015
  for (const p of participants)
2833
3016
  if (p.displayName !== null) {
@@ -2836,13 +3019,13 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2836
3019
  names.set(p.displayName, identities);
2837
3020
  }
2838
3021
  if ([...names.values()].some((ids2) => ids2.size > 1))
2839
- report.warnings.push({ externalId: id3, message: "Participant names are ambiguous" });
2840
- const lines = await read("transcript", () => source.transcript(id3));
2841
- const chat = await read("chat", () => source.chat(id3));
2842
- const summary = await read("summary", () => source.summary(id3));
2843
- const attachments = await read("files", () => source.files(id3));
3022
+ report.warnings.push({ externalId: id4, message: "Participant names are ambiguous" });
3023
+ const lines = await read("transcript", () => source.transcript(id4));
3024
+ const chat = await read("chat", () => source.chat(id4));
3025
+ const summary = await read("summary", () => source.summary(id4));
3026
+ const attachments = await read("files", () => source.files(id4));
2844
3027
  const listDocuments = source.documents?.bind(source);
2845
- const documents = listDocuments ? await read("documents", () => listDocuments(id3)) : void 0;
3028
+ const documents = listDocuments ? await read("documents", () => listDocuments(id4)) : void 0;
2846
3029
  await saveSourceMeeting(source, store, m, { participants: sourceParticipants, transcript: lines, chat, summary, files: attachments, documents }, { accountId: options.accountId, now });
2847
3030
  for (const p of participants)
2848
3031
  if (p.identity.phone)
@@ -2853,7 +3036,7 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2853
3036
  report.summaries += summary ? 1 : 0;
2854
3037
  } catch (error) {
2855
3038
  failedHere();
2856
- report.warnings.push({ externalId: id3, message: error instanceof Error ? error.message : "Meeting pull failed" });
3039
+ report.warnings.push({ externalId: id4, message: error instanceof Error ? error.message : "Meeting pull failed" });
2857
3040
  }
2858
3041
  }
2859
3042
  await linkCallers();
@@ -2862,23 +3045,23 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2862
3045
  return report;
2863
3046
  }, "pull");
2864
3047
 
2865
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
3048
+ // 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/meetings/read-answers.js
2866
3049
  var text3 = string();
2867
- var count4 = pipe(number(), integer(), minValue(0));
2868
- var id2 = pipe(number(), integer(), minValue(1));
2869
- var iso3 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
3050
+ var count5 = pipe(number(), integer(), minValue(0));
3051
+ var id3 = pipe(number(), integer(), minValue(1));
3052
+ var iso3 = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
2870
3053
  var meetingReview = strictObject({
2871
3054
  ref: reference,
2872
3055
  id: pipe(string(), minLength(1)),
2873
3056
  title: nullable(text3),
2874
3057
  started_at: nullable(isoTime),
2875
- duration_ms: nullable(count4),
2876
- participants_count: nullable(count4),
3058
+ duration_ms: nullable(count5),
3059
+ participants_count: nullable(count5),
2877
3060
  projects: array(text3),
2878
3061
  /** Null when the meeting has no current transcript. */
2879
- transcript: nullable(strictObject({ lines: count4, words: count4 })),
3062
+ transcript: nullable(strictObject({ lines: count5, words: count5 })),
2880
3063
  /** The three who talked longest. */
2881
- speakers: array(strictObject({ name: nullable(text3), talk_ms: count4 })),
3064
+ speakers: array(strictObject({ name: nullable(text3), talk_ms: count5 })),
2882
3065
  /** The newest stored summary; null when there is none. */
2883
3066
  summary: nullable(strictObject({
2884
3067
  source: text3,
@@ -2893,7 +3076,7 @@ var meetingLink = strictObject({
2893
3076
  domain: nullable(text3),
2894
3077
  /** The Google Docs, Sheets, Slides, Forms or Drive file it names. */
2895
3078
  document_id: nullable(text3),
2896
- count: count4,
3079
+ count: count5,
2897
3080
  first_at: isoTime,
2898
3081
  last_at: isoTime,
2899
3082
  senders: array(text3),
@@ -2903,39 +3086,39 @@ var meetingSpeaker = strictObject({
2903
3086
  /** `person:<id>`, `identity:<id>`, `name:<lowercased name>` or `unknown`. */
2904
3087
  key: text3,
2905
3088
  name: nullable(text3),
2906
- person_id: nullable(id2),
2907
- identity_id: nullable(id2),
2908
- meetings: count4,
2909
- lines: count4,
2910
- words: count4,
2911
- talk_ms: count4,
3089
+ person_id: nullable(id3),
3090
+ identity_id: nullable(id3),
3091
+ meetings: count5,
3092
+ lines: count5,
3093
+ words: count5,
3094
+ talk_ms: count5,
2912
3095
  /** This speaker's part of all talk time, 0–1. */
2913
3096
  share: pipe(number(), minValue(0), maxValue(1))
2914
3097
  });
2915
3098
  var meetingStats = strictObject({
2916
3099
  time_zone: text3,
2917
- meetings: count4,
2918
- lines: count4,
2919
- words: count4,
2920
- talk_ms: count4,
3100
+ meetings: count5,
3101
+ lines: count5,
3102
+ words: count5,
3103
+ talk_ms: count5,
2921
3104
  /** `week_start` is the Monday, as a date in `time_zone`. */
2922
- weeks: array(strictObject({ week_start: text3, meetings: count4, talk_ms: count4 })),
3105
+ weeks: array(strictObject({ week_start: text3, meetings: count5, talk_ms: count5 })),
2923
3106
  top_speakers: array(meetingSpeaker)
2924
3107
  });
2925
3108
  var meetingCountsRow = strictObject({
2926
3109
  key: text3,
2927
3110
  name: nullable(text3),
2928
- meetings: count4,
2929
- minutes: count4,
3111
+ meetings: count5,
3112
+ minutes: count5,
2930
3113
  mean_minutes: nullable(number()),
2931
- transcripts: count4
3114
+ transcripts: count5
2932
3115
  });
2933
3116
  var meetingCounts = strictObject({
2934
3117
  by: picklist(["day", "week", "series"]),
2935
- meetings: count4,
2936
- minutes: count4,
3118
+ meetings: count5,
3119
+ minutes: count5,
2937
3120
  mean_minutes: nullable(number()),
2938
- transcripts: count4,
3121
+ transcripts: count5,
2939
3122
  rows: array(meetingCountsRow),
2940
3123
  has_more: boolean()
2941
3124
  });
@@ -2943,27 +3126,27 @@ var truncated = /* @__PURE__ */ __name((...why) => nullable(picklist(why)), "tru
2943
3126
  var meetingParticipants = strictObject({
2944
3127
  schema_version: literal(1),
2945
3128
  kind: literal("meeting_participants"),
2946
- account_id: id2,
3129
+ account_id: id3,
2947
3130
  query: text3,
2948
3131
  items: array(strictObject({
2949
- participant_id: id2,
2950
- meeting_id: id2,
2951
- identity_id: id2,
3132
+ participant_id: id3,
3133
+ meeting_id: id3,
3134
+ identity_id: id3,
2952
3135
  display_name: nullable(text3),
2953
3136
  email: nullable(text3),
2954
3137
  person: nullable(strictObject({ ref: text3, name: nullable(text3) }))
2955
3138
  })),
2956
3139
  /** Several identities on one page are observations, never speaker attribution or person links. */
2957
- ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(id2) }),
3140
+ ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(id3) }),
2958
3141
  coverage: strictObject({
2959
- scanned: count4,
2960
- read_bytes: count4,
3142
+ scanned: count5,
3143
+ read_bytes: count5,
2961
3144
  archive_completeness: literal("unknown"),
2962
3145
  truncated_by: truncated("limit", "scan_limit", "read_bytes")
2963
3146
  }),
2964
3147
  page: strictObject({
2965
3148
  mode: literal("cursor"),
2966
- limit: count4,
3149
+ limit: count5,
2967
3150
  has_more: boolean(),
2968
3151
  next_cursor: optional(text3)
2969
3152
  })
@@ -2977,12 +3160,12 @@ var meetingPassage = strictObject({
2977
3160
  target_fingerprint: text3,
2978
3161
  fingerprint: text3,
2979
3162
  revision,
2980
- limits: strictObject({ before: count4, after: count4, bytes: count4, max_read_bytes: count4 }),
2981
- content_bytes: count4,
3163
+ limits: strictObject({ before: count5, after: count5, bytes: count5, max_read_bytes: count5 }),
3164
+ content_bytes: count5,
2982
3165
  coverage: strictObject({
2983
- included: count4,
2984
- before: count4,
2985
- after: count4,
3166
+ included: count5,
3167
+ before: count5,
3168
+ after: count5,
2986
3169
  has_before: boolean(),
2987
3170
  has_after: boolean(),
2988
3171
  truncated_by: truncated("bytes"),
@@ -2995,12 +3178,12 @@ var meetingPassage = strictObject({
2995
3178
  items: array(strictObject({
2996
3179
  ref: reference,
2997
3180
  fingerprint: text3,
2998
- transcript_id: id2,
3181
+ transcript_id: id3,
2999
3182
  content_hash: nullable(text3),
3000
- position: count4,
3001
- start_ms: count4,
3002
- end_ms: count4,
3003
- speaker_participant_id: nullable(id2),
3183
+ position: count5,
3184
+ start_ms: count5,
3185
+ end_ms: count5,
3186
+ speaker_participant_id: nullable(id3),
3004
3187
  speaker_name: nullable(text3),
3005
3188
  text: text3,
3006
3189
  revision
@@ -3057,7 +3240,7 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
3057
3240
  updated_at: new Date(one.updatedAt).toISOString()
3058
3241
  }), "eventItem");
3059
3242
 
3060
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
3243
+ // 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/meetings/read-through.js
3061
3244
  var MEETING_SERVER_BOUNDS = { calls: 3, pages: 2 };
3062
3245
  var ISSUES = {
3063
3246
  offline: ["permission_error", "meetings.server-offline"],
@@ -3249,6 +3432,13 @@ var askServerForList = /* @__PURE__ */ __name(async (source, store, accountId, q
3249
3432
  return step;
3250
3433
  }, "askServerForList");
3251
3434
  var meetingsListThrough = /* @__PURE__ */ __name(async (source, store, filter, access) => {
3435
+ const listed2 = await listThrough(source, store, filter, access);
3436
+ if (!filter.query || !readsZone(filter.query, MEETING_TIMES))
3437
+ return listed2;
3438
+ return { ...listed2, meta: { ...listed2.meta, timezone: timezoneOf(access.timezone) } };
3439
+ }, "meetingsListThrough");
3440
+ var MEETING_TIMES = new Set(MEETING_QUERY.fields.filter(({ type }) => type === "time").map(({ name }) => name));
3441
+ var listThrough = /* @__PURE__ */ __name(async (source, store, filter, access) => {
3252
3442
  const now = access.now ?? Date.now();
3253
3443
  const zoned = { ...filter, timezone: timezoneOf(access.timezone), now };
3254
3444
  const step = await askServerForList(source, store, filter.accountId, filter.query, { ...access, now });
@@ -3268,7 +3458,7 @@ var meetingsListThrough = /* @__PURE__ */ __name(async (source, store, filter, a
3268
3458
  items: list.items.map((item) => ({ ...item, found_in: step.found.get(Number(item.id)) ?? "archive" })),
3269
3459
  ...extras
3270
3460
  };
3271
- }, "meetingsListThrough");
3461
+ }, "listThrough");
3272
3462
  var storedMeeting = /* @__PURE__ */ __name(async (store, accountId, meeting2) => {
3273
3463
  const text5 = meeting2.trim();
3274
3464
  const own = /* @__PURE__ */ __name((details) => details?.meeting.accountId === accountId ? details : null, "own");
@@ -3338,10 +3528,10 @@ var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId,
3338
3528
  return { details: fresh, foundIn: step.found.get(details.meeting.id) ?? "server", server: step.report };
3339
3529
  }, "meetingShowThrough");
3340
3530
 
3341
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
3531
+ // 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/meetings/recording-transfer.js
3342
3532
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
3343
3533
 
3344
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
3534
+ // 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/meetings/related-history.js
3345
3535
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
3346
3536
  if (!original || typeof original !== "object" || Array.isArray(original))
3347
3537
  throw new CliError("validation_error", "related history request is required");
@@ -3352,7 +3542,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
3352
3542
  const positive = /* @__PURE__ */ __name((value) => Number.isSafeInteger(value) && value > 0, "positive");
3353
3543
  if (!positive(input.accountId) || !positive(input.seriesId))
3354
3544
  throw new CliError("validation_error", "accountId and seriesId must be positive safe integers");
3355
- if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((id3) => !positive(id3)))
3545
+ if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((id4) => !positive(id4)))
3356
3546
  throw new CliError("validation_error", "anchorIds must contain at most 20 positive safe integers");
3357
3547
  for (const key of ["after", "before"])
3358
3548
  if (!Number.isSafeInteger(input[key]) || Math.abs(input[key]) > 864e13)
@@ -3371,18 +3561,18 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
3371
3561
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
3372
3562
  }, "validateMeetingRelatedHistory");
3373
3563
 
3374
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
3564
+ // 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/meetings/result-items.js
3375
3565
  var text4 = string();
3376
3566
  var identifier = pipe(text4, minLength(1));
3377
3567
  var nullableText = nullable(text4);
3378
- var count5 = pipe(number(), integer(), minValue(0));
3568
+ var count6 = pipe(number(), integer(), minValue(0));
3379
3569
  var flag = boolean();
3380
3570
  var scope = strictObject({ provider: text4, account: text4 });
3381
3571
  var run = strictObject({
3382
- meetings: count5,
3383
- participants: count5,
3384
- transcript_rows: count5,
3385
- summaries: count5,
3572
+ meetings: count6,
3573
+ participants: count6,
3574
+ transcript_rows: count6,
3575
+ summaries: count6,
3386
3576
  warnings: array(strictObject({ external_id: text4, message: text4 })),
3387
3577
  timezone: optional(text4)
3388
3578
  });
@@ -3435,15 +3625,15 @@ var transcription = union([
3435
3625
  applied: literal(false),
3436
3626
  account_id: identifier,
3437
3627
  external_id: text4,
3438
- segments: count5,
3628
+ segments: count6,
3439
3629
  media: strictObject({
3440
3630
  id: text4,
3441
3631
  content_hash: text4,
3442
- size: count5,
3443
- duration_ms: count5,
3632
+ size: count6,
3633
+ duration_ms: count6,
3444
3634
  format: text4,
3445
- sample_rate: count5,
3446
- channels: count5,
3635
+ sample_rate: count6,
3636
+ channels: count6,
3447
3637
  recognition
3448
3638
  })
3449
3639
  }),
@@ -3453,10 +3643,10 @@ var transcription = union([
3453
3643
  external_id: text4,
3454
3644
  meeting_id: identifier,
3455
3645
  created: flag,
3456
- inserted_transcripts: count5,
3457
- replayed_transcripts: count5,
3458
- superseded_transcripts: count5,
3459
- segments: count5,
3646
+ inserted_transcripts: count6,
3647
+ replayed_transcripts: count6,
3648
+ superseded_transcripts: count6,
3649
+ segments: count6,
3460
3650
  media_sha256: text4,
3461
3651
  engine: text4,
3462
3652
  model: text4,
@@ -3464,12 +3654,12 @@ var transcription = union([
3464
3654
  timing: picklist(["fixed-windows", "recognition-segments"])
3465
3655
  })
3466
3656
  ]);
3467
- var embeddingModel = strictObject({ key: text4, dims: count5, kind: picklist(["local", "remote"]), model: text4 });
3657
+ var embeddingModel = strictObject({ key: text4, dims: count6, kind: picklist(["local", "remote"]), model: text4 });
3468
3658
  var embedding = union([
3469
3659
  strictObject({
3470
3660
  account_id: identifier,
3471
3661
  model: embeddingModel,
3472
- status: strictObject({ chunks: count5, embedded: count5 }),
3662
+ status: strictObject({ chunks: count6, embedded: count6 }),
3473
3663
  applied: literal(false),
3474
3664
  scope: literal("existing-current-chunks"),
3475
3665
  rebuild_required: literal("explicit")
@@ -3477,14 +3667,14 @@ var embedding = union([
3477
3667
  strictObject({
3478
3668
  account_id: identifier,
3479
3669
  model: embeddingModel,
3480
- saved: count5,
3481
- skipped: count5,
3670
+ saved: count6,
3671
+ skipped: count6,
3482
3672
  has_more: flag,
3483
3673
  next_hash: optional(text4),
3484
3674
  applied: literal(true),
3485
3675
  rebuild: strictObject({
3486
- transcripts: count5,
3487
- chunks: count5,
3676
+ transcripts: count6,
3677
+ chunks: count6,
3488
3678
  has_more: flag,
3489
3679
  next_transcript_id: optional(identifier)
3490
3680
  })
@@ -3493,8 +3683,8 @@ var embedding = union([
3493
3683
  var repair = strictObject({
3494
3684
  account_id: identifier,
3495
3685
  applied: flag,
3496
- transcripts: count5,
3497
- languages: array(strictObject({ language: nullableText, transcripts: count5 }))
3686
+ transcripts: count6,
3687
+ languages: array(strictObject({ language: nullableText, transcripts: count6 }))
3498
3688
  });
3499
3689
  var kind = picklist(["instant", "scheduled"]);
3500
3690
  var managedChange = strictObject({
@@ -3507,7 +3697,7 @@ var managedChange = strictObject({
3507
3697
  title: optional(text4),
3508
3698
  kind: optional(kind),
3509
3699
  start_time: optional(text4),
3510
- duration_minutes: optional(count5),
3700
+ duration_minutes: optional(count6),
3511
3701
  timezone: optional(text4),
3512
3702
  agenda: optional(text4)
3513
3703
  })),
@@ -3517,7 +3707,7 @@ var managedChange = strictObject({
3517
3707
  title: nullableText,
3518
3708
  kind: nullable(kind),
3519
3709
  start_time: nullableText,
3520
- duration_minutes: nullable(count5),
3710
+ duration_minutes: nullable(count6),
3521
3711
  timezone: nullableText,
3522
3712
  agenda: nullableText,
3523
3713
  join_url: nullableText
@@ -3535,14 +3725,14 @@ var MEETING_RESULT_ENTITIES = {
3535
3725
  meeting_repair: repair
3536
3726
  };
3537
3727
 
3538
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/review.js
3728
+ // 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/meetings/review.js
3539
3729
  var REVIEW_LIMIT = { default: 50, most: 200 };
3540
3730
 
3541
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3731
+ // 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/meetings/save-hints.js
3542
3732
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
3543
3733
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
3544
3734
 
3545
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3735
+ // 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/meetings/series-history.js
3546
3736
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3547
3737
  input.signal?.throwIfAborted();
3548
3738
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -3563,10 +3753,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3563
3753
  return { ...input, limit, maxReadBytes };
3564
3754
  }, "validateMeetingSeriesHistory");
3565
3755
 
3566
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3756
+ // 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/meetings/upcoming-validation.js
3567
3757
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
3568
3758
 
3569
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3759
+ // 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/meetings/series-inventory-validation.js
3570
3760
  function invalid4(field, response = false) {
3571
3761
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
3572
3762
  }
@@ -3595,142 +3785,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
3595
3785
  cursorDetails(value);
3596
3786
  }, "validateMeetingSeriesInventoryCursor");
3597
3787
 
3598
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/stats.js
3599
- var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
3600
- var zoneOf = /* @__PURE__ */ __name((timeZone) => {
3601
- const zone = timeZone ?? "UTC";
3602
- try {
3603
- new Intl.DateTimeFormat("en", { timeZone: zone });
3604
- } catch {
3605
- throw new CliError("validation_error", "expected an IANA time zone such as Europe/Madrid");
3606
- }
3607
- return zone;
3608
- }, "zoneOf");
3609
- var DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
3610
- var weekStart = /* @__PURE__ */ __name((at, format) => {
3611
- const parts2 = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
3612
- const day = Date.UTC(Number(parts2.year), Number(parts2.month) - 1, Number(parts2.day));
3613
- return new Date(day - DAYS.indexOf(parts2.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
3614
- }, "weekStart");
3615
- var dayKey = /* @__PURE__ */ __name((at, format) => {
3616
- const parts2 = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
3617
- return `${parts2.year}-${parts2.month}-${parts2.day}`;
3618
- }, "dayKey");
3619
- var zoneFormat = /* @__PURE__ */ __name((zone) => new Intl.DateTimeFormat("en-US", {
3620
- timeZone: zone,
3621
- year: "numeric",
3622
- month: "2-digit",
3623
- day: "2-digit",
3624
- weekday: "short"
3625
- }), "zoneFormat");
3626
- var NO_SERIES = "no-series";
3627
- var MOST_COUNT_ROWS = 100;
3628
- var minutesOf = /* @__PURE__ */ __name((ms) => Math.round(ms / 6e4), "minutesOf");
3629
- var meanOf = /* @__PURE__ */ __name((ms, timed) => timed === 0 ? null : Math.round(ms / timed / 6e3) / 10, "meanOf");
3630
- var aggregateMeetingCounts = /* @__PURE__ */ __name((meetings, by, timeZone, limit = MOST_COUNT_ROWS) => {
3631
- if (!MEETING_COUNTS_GROUPINGS.includes(by))
3632
- throw new CliError("validation_error", `--by takes ${MEETING_COUNTS_GROUPINGS.join(", ")}`);
3633
- if (!Number.isSafeInteger(limit) || limit < 1)
3634
- throw new CliError("validation_error", "--limit is a positive number");
3635
- const zone = zoneOf(timeZone);
3636
- const format = zoneFormat(zone);
3637
- const sum = /* @__PURE__ */ __name(() => ({ meetings: 0, ms: 0, timed: 0, transcripts: 0 }), "sum");
3638
- const add = /* @__PURE__ */ __name((into, meeting2) => {
3639
- into.meetings += 1;
3640
- if (meeting2.durationMs !== null) {
3641
- into.ms += Math.max(0, meeting2.durationMs);
3642
- into.timed += 1;
3643
- }
3644
- if (meeting2.transcribed)
3645
- into.transcripts += 1;
3646
- }, "add");
3647
- const total = { ...sum(), name: null };
3648
- const groups = /* @__PURE__ */ new Map();
3649
- for (const meeting2 of meetings) {
3650
- add(total, meeting2);
3651
- const key = by === "series" ? meeting2.seriesKey === null ? NO_SERIES : `series:${meeting2.seriesKey}` : meeting2.startedAt === null ? null : by === "day" ? dayKey(meeting2.startedAt, format) : weekStart(meeting2.startedAt, format);
3652
- if (key === null)
3653
- continue;
3654
- const group = groups.get(key) ?? { ...sum(), name: by === "series" ? meeting2.seriesTitle : null };
3655
- add(group, meeting2);
3656
- groups.set(key, group);
3657
- }
3658
- const ordered = [...groups.entries()].sort(([a, one], [b, other]) => by === "series" ? other.ms - one.ms || other.meetings - one.meetings || a.localeCompare(b) : b.localeCompare(a));
3659
- const kept = ordered.slice(0, limit);
3660
- if (by !== "series")
3661
- kept.reverse();
3662
- const counted = /* @__PURE__ */ __name(({ meetings: count6, ms, timed, transcripts }) => ({
3663
- meetings: count6,
3664
- minutes: minutesOf(ms),
3665
- meanMinutes: meanOf(ms, timed),
3666
- transcripts
3667
- }), "counted");
3668
- return {
3669
- by,
3670
- timeZone: zone,
3671
- ...counted(total),
3672
- rows: kept.map(([key, group]) => ({ key, name: group.name, ...counted(group) })),
3673
- hasMore: ordered.length > limit
3674
- };
3675
- }, "aggregateMeetingCounts");
3676
- var UNKNOWN_SPEAKER = "unknown";
3677
- var speakerOf = /* @__PURE__ */ __name((row) => row.personId !== null ? { key: `person:${row.personId}`, name: row.personName ?? row.identityName ?? row.speakerName } : row.identityId !== null ? { key: `identity:${row.identityId}`, name: row.identityName ?? row.speakerName } : row.speakerName?.trim() ? { key: `name:${row.speakerName.trim().toLowerCase()}`, name: row.speakerName.trim() } : { key: UNKNOWN_SPEAKER, name: null }, "speakerOf");
3678
- var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
3679
- const zone = zoneOf(timeZone);
3680
- const format = zoneFormat(zone);
3681
- const speakers = /* @__PURE__ */ new Map();
3682
- const weeks = /* @__PURE__ */ new Map();
3683
- const meetings = /* @__PURE__ */ new Set();
3684
- let lines = 0;
3685
- let words2 = 0;
3686
- let talkMs = 0;
3687
- for (const row of rows) {
3688
- const talk = Math.max(0, row.endMs - row.startMs);
3689
- meetings.add(row.meetingId);
3690
- lines += 1;
3691
- words2 += row.words;
3692
- talkMs += talk;
3693
- const who = speakerOf(row);
3694
- const held = speakers.get(who.key) ?? {
3695
- key: who.key,
3696
- name: who.name ?? null,
3697
- personId: row.personId,
3698
- identityId: row.personId === null ? row.identityId : null,
3699
- meetings: 0,
3700
- lines: 0,
3701
- words: 0,
3702
- talkMs: 0,
3703
- share: 0,
3704
- seen: /* @__PURE__ */ new Set()
3705
- };
3706
- held.seen.add(row.meetingId);
3707
- held.lines += 1;
3708
- held.words += row.words;
3709
- held.talkMs += talk;
3710
- speakers.set(who.key, held);
3711
- if (row.startedAt !== null) {
3712
- const week = weeks.get(weekStart(row.startedAt, format)) ?? { meetings: /* @__PURE__ */ new Set(), talkMs: 0 };
3713
- week.meetings.add(row.meetingId);
3714
- week.talkMs += talk;
3715
- weeks.set(weekStart(row.startedAt, format), week);
3716
- }
3717
- }
3718
- return {
3719
- timeZone: zone,
3720
- meetings: meetings.size,
3721
- lines,
3722
- words: words2,
3723
- talkMs,
3724
- speakers: [...speakers.values()].map(({ seen, ...speaker }) => ({
3725
- ...speaker,
3726
- meetings: seen.size,
3727
- share: talkMs === 0 ? 0 : Math.round(speaker.talkMs / talkMs * 1e3) / 1e3
3728
- })).sort((a, b) => b.talkMs - a.talkMs || a.key.localeCompare(b.key)),
3729
- weeks: [...weeks.entries()].map(([start, week]) => ({ weekStart: start, meetings: week.meetings.size, talkMs: week.talkMs })).sort((a, b) => a.weekStart.localeCompare(b.weekStart))
3730
- };
3731
- }, "aggregateMeetingStats");
3732
-
3733
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/locator.js
3788
+ // 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/locator.js
3734
3789
  var SCHEME = "msg:";
3735
3790
  var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
3736
3791
  var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
@@ -3751,7 +3806,7 @@ var parseLocator = /* @__PURE__ */ __name((reference2) => {
3751
3806
  return { provider, account, chat, message };
3752
3807
  }, "parseLocator");
3753
3808
 
3754
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/references.js
3809
+ // 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/references.js
3755
3810
  var SIMPLE_REFERENCES = [
3756
3811
  "note",
3757
3812
  "document",
@@ -3786,9 +3841,9 @@ var decoded = /* @__PURE__ */ __name((part, text5, shape) => {
3786
3841
  throw malformed(text5, shape);
3787
3842
  }
3788
3843
  }, "decoded");
3789
- var parts = /* @__PURE__ */ __name((rest, count6, text5, shape) => {
3844
+ var parts = /* @__PURE__ */ __name((rest, count7, text5, shape) => {
3790
3845
  const split = rest.split("/");
3791
- if (split.length !== count6 || split.some((part) => part === ""))
3846
+ if (split.length !== count7 || split.some((part) => part === ""))
3792
3847
  throw malformed(text5, shape);
3793
3848
  return split.map((part) => decoded(part, text5, shape));
3794
3849
  }, "parts");
@@ -3841,10 +3896,10 @@ var REF_KINDS = [
3841
3896
  type: "contact",
3842
3897
  shape: "contact:<provider>/<id>",
3843
3898
  parse: /* @__PURE__ */ __name((rest, text5) => {
3844
- const [provider, id3] = parts(rest, 2, text5, "contact:<provider>/<id>");
3845
- return { type: "contact", provider, id: id3 };
3899
+ const [provider, id4] = parts(rest, 2, text5, "contact:<provider>/<id>");
3900
+ return { type: "contact", provider, id: id4 };
3846
3901
  }, "parse"),
3847
- format: /* @__PURE__ */ __name(({ provider, id: id3 }) => `contact:${encoded(provider, id3)}`, "format")
3902
+ format: /* @__PURE__ */ __name(({ provider, id: id4 }) => `contact:${encoded(provider, id4)}`, "format")
3848
3903
  }),
3849
3904
  kind2({
3850
3905
  prefix: "folder",
@@ -3852,13 +3907,13 @@ var REF_KINDS = [
3852
3907
  shape: "folder:<id>[/<path>]",
3853
3908
  parse: /* @__PURE__ */ __name((rest, text5) => {
3854
3909
  const slash = rest.indexOf("/");
3855
- const id3 = decoded(slash < 0 ? rest : rest.slice(0, slash), text5, "folder:<id>[/<path>]");
3910
+ const id4 = decoded(slash < 0 ? rest : rest.slice(0, slash), text5, "folder:<id>[/<path>]");
3856
3911
  const path = slash < 0 ? null : folderPath(decoded(rest.slice(slash + 1), text5, "folder:<id>[/<path>]"));
3857
- if (!id3.trim() || path === "")
3912
+ if (!id4.trim() || path === "")
3858
3913
  throw malformed(text5, "folder:<id>[/<path>]");
3859
- return { type: "folder", id: id3, path };
3914
+ return { type: "folder", id: id4, path };
3860
3915
  }, "parse"),
3861
- format: /* @__PURE__ */ __name(({ id: id3, path }) => path === null ? `folder:${encodeURIComponent(id3)}` : `folder:${encoded(id3, path)}`, "format")
3916
+ format: /* @__PURE__ */ __name(({ id: id4, path }) => path === null ? `folder:${encodeURIComponent(id4)}` : `folder:${encoded(id4, path)}`, "format")
3862
3917
  }),
3863
3918
  kind2({
3864
3919
  prefix: "meeting",
@@ -3914,7 +3969,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text5) => {
3914
3969
  return match !== null && byPrefix.has(match[1]);
3915
3970
  }, "looksLikeReference");
3916
3971
 
3917
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/providers.js
3972
+ // 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/providers.js
3918
3973
  var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
3919
3974
  var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
3920
3975
  var CRM_OPENS = { deal: "deals show", lead: "leads show", pipeline: "pipelines show" };
@@ -3932,6 +3987,7 @@ var PROVIDERS = [
3932
3987
  { name: "added", kind: "notes", aliases: [] },
3933
3988
  { name: "zoom", kind: "meetings", aliases: [] },
3934
3989
  { name: "google-meet", kind: "meetings", aliases: [], command: "gmeet" },
3990
+ { name: "google-drive", kind: "documents", aliases: [] },
3935
3991
  // Its meetings come from the notes Telemost mails (`keeper@telemost.yandex.ru`), read by a mail rule.
3936
3992
  { name: "telemost", kind: "meetings", aliases: [] },
3937
3993
  // A phone export's records: its SMS and its calls in the one account the import names.
@@ -3957,12 +4013,13 @@ var FOLDER_PROVIDERS = ["local", "obsidian", "folder"];
3957
4013
  var isFolderProvider = /* @__PURE__ */ __name((provider) => FOLDER_PROVIDERS.includes(provider), "isFolderProvider");
3958
4014
  var folderProviderSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${FOLDER_PROVIDERS.map((name) => `'${name}'`).join(", ")})`, "folderProviderSql");
3959
4015
  var folderProviderOf = /* @__PURE__ */ __name((format) => format === "markdown" ? "local" : "obsidian", "folderProviderOf");
3960
- var DOCUMENT_ACCOUNT_PROVIDERS = ["google-drive"];
3961
- var isDocumentAccountProvider = /* @__PURE__ */ __name((provider) => DOCUMENT_ACCOUNT_PROVIDERS.includes(provider), "isDocumentAccountProvider");
4016
+ var documentAccountProviders = /* @__PURE__ */ __name(() => registry.filter((entry) => entry.kind === "documents" && entry.imported !== true).map(({ name }) => name), "documentAccountProviders");
4017
+ var isDocumentAccountProvider = /* @__PURE__ */ __name((provider) => typeof provider === "string" && documentAccountProviders().includes(provider), "isDocumentAccountProvider");
4018
+ var documentAccountProvidersSql = /* @__PURE__ */ __name(() => documentAccountProviders().map((name) => `'${name}'`).join(", ") || "NULL", "documentAccountProvidersSql");
3962
4019
  var ADDED_PROVIDER = "added";
3963
4020
  var ADDED_ACCOUNT = "owner";
3964
4021
  var notAdded = `d.account_id NOT IN (SELECT id FROM accounts WHERE provider = '${ADDED_PROVIDER}')`;
3965
- var filesAccountSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${[...FOLDER_PROVIDERS, ...DOCUMENT_ACCOUNT_PROVIDERS, ADDED_PROVIDER].map((name) => `'${name}'`).join(", ")})`, "filesAccountSql");
4022
+ var filesAccountSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${[...FOLDER_PROVIDERS, ...documentAccountProviders(), ADDED_PROVIDER].map((name) => `'${name}'`).join(", ")})`, "filesAccountSql");
3966
4023
  var INTERNAL_NOTES = "internal";
3967
4024
  var UNKNOWN_PROVIDER = "unknown provider \u2014 run its CLI once";
3968
4025
  var WORD = /^[a-z0-9][a-z0-9_-]*$/;
@@ -4090,7 +4147,7 @@ var holdsKind = /* @__PURE__ */ __name((provider, kind3) => kindsIn(provider).in
4090
4147
  var holdsKindOf = /* @__PURE__ */ __name((provider, kind3) => kindIn(provider) === void 0 ? kind3 === "messages" : holdsKind(provider, kind3), "holdsKindOf");
4091
4148
  var kindOf2 = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
4092
4149
 
4093
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/money.js
4150
+ // 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/money.js
4094
4151
  var CURRENCY_SCALES = {
4095
4152
  AED: 2,
4096
4153
  AMD: 2,
@@ -4184,7 +4241,7 @@ var quantityOf = /* @__PURE__ */ __name((text5) => {
4184
4241
  }, "quantityOf");
4185
4242
  var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
4186
4243
 
4187
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/deals.js
4244
+ // 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/deals.js
4188
4245
  var DEAL_KINDS = ["deal", "lead"];
4189
4246
  var DEAL_STATUSES = ["open", "won", "lost"];
4190
4247
  var STAGE_OUTCOMES = DEAL_STATUSES;
@@ -4194,7 +4251,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
4194
4251
  return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
4195
4252
  }, "dealLine");
4196
4253
 
4197
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/finance.js
4254
+ // 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/finance.js
4198
4255
  var INVOICE_DIRECTIONS = ["receivable", "payable"];
4199
4256
  var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
4200
4257
  var MONEY_DIRECTIONS = ["in", "out"];
@@ -4223,7 +4280,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
4223
4280
  var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
4224
4281
  var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
4225
4282
 
4226
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/orders.js
4283
+ // 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/orders.js
4227
4284
  var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
4228
4285
  var ORDER_PURPOSES = ["personal", "business", "client", "other"];
4229
4286
  var orderLine = /* @__PURE__ */ __name((order) => {
@@ -4234,7 +4291,7 @@ var orderLine = /* @__PURE__ */ __name((order) => {
4234
4291
  }, "orderLine");
4235
4292
  var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
4236
4293
 
4237
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/relations.js
4294
+ // 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/relations.js
4238
4295
  var ORGANIZATION_ROLES = [
4239
4296
  "employee",
4240
4297
  "contractor",
@@ -4341,17 +4398,17 @@ var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'p
4341
4398
  var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE ${KEYED} AND override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
4342
4399
  var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
4343
4400
 
4344
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/crm.js
4401
+ // 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/crm.js
4345
4402
  var CRM_KINDS = ["organization", "person", "deal", "lead"];
4346
4403
  var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
4347
- var isCrmUserId = /* @__PURE__ */ __name((id3) => /^\d{1,20}$/.test(id3), "isCrmUserId");
4348
- var normalCrmUserId = /* @__PURE__ */ __name((id3) => {
4349
- const text5 = id3.trim();
4404
+ var isCrmUserId = /* @__PURE__ */ __name((id4) => /^\d{1,20}$/.test(id4), "isCrmUserId");
4405
+ var normalCrmUserId = /* @__PURE__ */ __name((id4) => {
4406
+ const text5 = id4.trim();
4350
4407
  return /^\d+$/.test(text5) ? text5.replace(/^0+(?=\d)/, "") : text5;
4351
4408
  }, "normalCrmUserId");
4352
4409
  var isItemKind = /* @__PURE__ */ __name((kind3) => kind3 === "deal" || kind3 === "lead", "isItemKind");
4353
4410
 
4354
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/tags.js
4411
+ // 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/tags.js
4355
4412
  var TAG_TYPES = ["chat", "contact", "message", "task"];
4356
4413
  var TAG = /^[a-z0-9-]{1,32}$/;
4357
4414
  var tagOf = /* @__PURE__ */ __name((value) => {
@@ -4365,7 +4422,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
4365
4422
  return tag;
4366
4423
  }, "normalizeTag");
4367
4424
 
4368
- // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/business.js
4425
+ // 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/business.js
4369
4426
  var CATALOG_KINDS = ["product", "service"];
4370
4427
  var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
4371
4428
  var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
@@ -4381,7 +4438,7 @@ var intervalOf = /* @__PURE__ */ __name((text5, reason = "subscription.interval"
4381
4438
  throw new CliError("validation_error", "an interval is a count and a unit, such as 1-month or 2-week", { reason });
4382
4439
  return { count: match[1] === void 0 ? 1 : Number(match[1]), unit: match[2] };
4383
4440
  }, "intervalOf");
4384
- var intervalText = /* @__PURE__ */ __name(({ count: count6, unit }) => `${count6}-${unit}`, "intervalText");
4441
+ var intervalText = /* @__PURE__ */ __name(({ count: count7, unit }) => `${count7}-${unit}`, "intervalText");
4385
4442
  var priced = /* @__PURE__ */ __name((units, currency) => units === null || currency === null ? "" : `, ${moneyLabel(units, currency)}`, "priced");
4386
4443
  var pending = /* @__PURE__ */ __name((review) => review === "confirmed" ? null : review, "pending");
4387
4444
  var productLine = /* @__PURE__ */ __name((product) => {
@@ -4421,6 +4478,7 @@ export {
4421
4478
  serviceCallsOf,
4422
4479
  rangeOf,
4423
4480
  windowOf,
4481
+ readsZone,
4424
4482
  formatMeetingReference,
4425
4483
  parseMeetingReference,
4426
4484
  canonicalMeetingReference,
@@ -4437,6 +4495,9 @@ export {
4437
4495
  joinUrlWithoutQuery,
4438
4496
  calendarText,
4439
4497
  entryMetadata,
4498
+ callStats,
4499
+ aggregateMeetingCounts,
4500
+ aggregateMeetingStats,
4440
4501
  meetingCueFingerprint,
4441
4502
  EVENT_QUERY,
4442
4503
  entryInWindow,
@@ -4476,7 +4537,6 @@ export {
4476
4537
  transcriptLanguage,
4477
4538
  importFiles,
4478
4539
  CHAT_MESSAGES_READ,
4479
- validateMeetingChange,
4480
4540
  validateMeetingPassage,
4481
4541
  validateMeetingPreparationContext,
4482
4542
  meetingProjectEvidence,
@@ -4504,8 +4564,6 @@ export {
4504
4564
  SAVE_HELP,
4505
4565
  validateMeetingSeriesHistory,
4506
4566
  validateMeetingSeriesInventoryCursor,
4507
- aggregateMeetingCounts,
4508
- aggregateMeetingStats,
4509
4567
  formatLocator,
4510
4568
  isLocator,
4511
4569
  parseLocator,
@@ -4523,8 +4581,9 @@ export {
4523
4581
  isFolderProvider,
4524
4582
  folderProviderSql,
4525
4583
  folderProviderOf,
4526
- DOCUMENT_ACCOUNT_PROVIDERS,
4584
+ documentAccountProviders,
4527
4585
  isDocumentAccountProvider,
4586
+ documentAccountProvidersSql,
4528
4587
  ADDED_PROVIDER,
4529
4588
  ADDED_ACCOUNT,
4530
4589
  notAdded,