@wirecat/mail-cli 0.30.0 → 0.32.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 (105) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/bin/mail.js +2 -2
  3. package/dist/bundle/{all-profiles-523GLORJ.js → all-profiles-OTCWJSJS.js} +19 -29
  4. package/dist/bundle/{anthropic-KKYGROQR.js → anthropic-GUXHDK32.js} +2 -2
  5. package/dist/bundle/{app-server-RJR7U5NT.js → app-server-GX7DOE4O.js} +45 -60
  6. package/dist/bundle/{bun-EBQHHLKR.js → bun-V5QLYBZU.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-LTG2RRSL.js → bun-sqlite-AXD5CCO3.js} +3 -3
  8. package/dist/bundle/{chunk-L2D5QYI3.js → chunk-2IYAZRTC.js} +2 -2
  9. package/dist/bundle/{chunk-ONA3UI3R.js → chunk-2UMEZY6D.js} +2 -2
  10. package/dist/bundle/{chunk-XGEPAJBY.js → chunk-3URYKAJP.js} +1 -1
  11. package/dist/bundle/{chunk-SPWKGRTO.js → chunk-4YNUQGDP.js} +1 -1
  12. package/dist/bundle/{chunk-MVDP7VL6.js → chunk-6SJ7HHAE.js} +1 -1
  13. package/dist/bundle/{chunk-T7A6HSBF.js → chunk-6TRKNME5.js} +1 -1
  14. package/dist/bundle/{chunk-YNI57LTZ.js → chunk-6XNTELM5.js} +1 -1
  15. package/dist/bundle/{chunk-NMN7RTX5.js → chunk-7GW4D3OW.js} +19 -18
  16. package/dist/bundle/{chunk-3HCEKXXB.js → chunk-AJY2IT25.js} +6 -6
  17. package/dist/bundle/{chunk-KE2RQUQO.js → chunk-ANYADN3S.js} +17 -17
  18. package/dist/bundle/{chunk-FL2TKSZY.js → chunk-CAQ5GW3A.js} +1 -1
  19. package/dist/bundle/{chunk-SNZFQ5SS.js → chunk-CD3TAITM.js} +14 -2
  20. package/dist/bundle/{chunk-54JKDFOV.js → chunk-FA3B2DHZ.js} +1 -1
  21. package/dist/bundle/{chunk-Q23EEGPC.js → chunk-GDDCKTBR.js} +1 -1
  22. package/dist/bundle/{chunk-HVJ2WQI7.js → chunk-GPOTPA3S.js} +10 -10
  23. package/dist/bundle/{chunk-S2KKQA7O.js → chunk-GSXCMQWV.js} +41 -49
  24. package/dist/bundle/{chunk-GXKFRZUP.js → chunk-HFA6AZWA.js} +3 -3
  25. package/dist/bundle/{chunk-DBI22GQL.js → chunk-HUWQ7LXZ.js} +506 -338
  26. package/dist/bundle/{chunk-5X5A3CAX.js → chunk-IBCGCYRU.js} +1 -1
  27. package/dist/bundle/{chunk-4F7WQHDO.js → chunk-IVD3JTN5.js} +1 -1
  28. package/dist/bundle/{chunk-IIV43UIC.js → chunk-JRGPPS6H.js} +12 -12
  29. package/dist/bundle/{chunk-3ECFSRLQ.js → chunk-JUS4Y4BW.js} +3 -3
  30. package/dist/bundle/{chunk-F22PLRCG.js → chunk-KLFF54AF.js} +7 -7
  31. package/dist/bundle/{chunk-J5PUHGK2.js → chunk-KLGZX6QT.js} +1 -1
  32. package/dist/bundle/{chunk-CWAA73PJ.js → chunk-LVFI3TCG.js} +5 -5
  33. package/dist/bundle/{chunk-GDFJKUMK.js → chunk-LVJWN2PR.js} +6 -6
  34. package/dist/bundle/{chunk-E2SL7HIZ.js → chunk-MENP3FF5.js} +11 -12
  35. package/dist/bundle/{chunk-HZUUVNWC.js → chunk-MHXZ62CU.js} +1 -1
  36. package/dist/bundle/{chunk-B3NXAN6J.js → chunk-MSK7RNOM.js} +149 -148
  37. package/dist/bundle/{chunk-D3J4T5OZ.js → chunk-MT2WDBG2.js} +12 -12
  38. package/dist/bundle/{chunk-2M7PPII5.js → chunk-MVMNZ3Q3.js} +745 -336
  39. package/dist/bundle/{chunk-ZG2XBWFT.js → chunk-NMN5JUYL.js} +3 -3
  40. package/dist/bundle/{chunk-JKWNPRZD.js → chunk-O7OP5NQO.js} +1 -1
  41. package/dist/bundle/{chunk-NV2REPY6.js → chunk-OUM4ZO53.js} +1 -1
  42. package/dist/bundle/{chunk-KIZYN3NG.js → chunk-PALY5PGE.js} +5 -5
  43. package/dist/bundle/{chunk-LM4K6K2R.js → chunk-PCMQYGEM.js} +4 -4
  44. package/dist/bundle/{chunk-GCSFZTRI.js → chunk-PCWAZVAD.js} +30 -5
  45. package/dist/bundle/{chunk-6C7SA4LD.js → chunk-QHXOXYAT.js} +57 -54
  46. package/dist/bundle/{chunk-WXQK5RO5.js → chunk-RNBG75HW.js} +33 -23
  47. package/dist/bundle/{chunk-TIMBTN5Z.js → chunk-SDAYOJLL.js} +5 -5
  48. package/dist/bundle/{chunk-LN2LWPN2.js → chunk-SEJBS7SI.js} +1 -1
  49. package/dist/bundle/{chunk-U7VYDTXN.js → chunk-SWXKS7JK.js} +16 -16
  50. package/dist/bundle/{chunk-R3IFRHZ2.js → chunk-SZZJOSIS.js} +2 -2
  51. package/dist/bundle/{chunk-WHS3CTTM.js → chunk-T577U52I.js} +7 -7
  52. package/dist/bundle/{chunk-SN5V6CKH.js → chunk-TDTCCHAI.js} +98 -6
  53. package/dist/bundle/{chunk-FYXGD6R6.js → chunk-TWHIZJAZ.js} +2 -2
  54. package/dist/bundle/{chunk-K5FTIIYR.js → chunk-U346WBJ5.js} +4 -4
  55. package/dist/bundle/{chunk-MP572GP7.js → chunk-U57QRUP7.js} +2 -2
  56. package/dist/bundle/{chunk-YMJXGIYG.js → chunk-U7RLFLTM.js} +23 -23
  57. package/dist/bundle/{chunk-ENKZEQ4Y.js → chunk-WNGMI6AZ.js} +2 -2
  58. package/dist/bundle/{chunk-BOGGQOVO.js → chunk-WQOGHND4.js} +1 -1
  59. package/dist/bundle/{chunk-A3YXTDTP.js → chunk-XXXVVNGI.js} +18 -15
  60. package/dist/bundle/{chunk-RLPWLGP6.js → chunk-Z6OKVD3R.js} +7 -7
  61. package/dist/bundle/{chunk-QGIQ62KV.js → chunk-ZAD7K4TI.js} +382 -366
  62. package/dist/bundle/{chunk-26H2HVJD.js → chunk-ZDP6A2VL.js} +2 -2
  63. package/dist/bundle/{command-contract-ETECA2AC.js → command-contract-DZ6XRIOI.js} +15 -15
  64. package/dist/bundle/{command-server-entry-BFXRYTBC.js → command-server-entry-BVXOPKXH.js} +21 -21
  65. package/dist/bundle/{decode-4QRYNPD5.js → decode-STN3EHT7.js} +2 -2
  66. package/dist/bundle/{dist-MHJPECI4.js → dist-B2JWWTNN.js} +15 -11
  67. package/dist/bundle/{echarts-EJXBKCJT.js → echarts-QIXLXS3G.js} +2 -2
  68. package/dist/bundle/{embed-46WZZMUQ.js → embed-4NC4ELYP.js} +3 -3
  69. package/dist/bundle/{embedder-56WHJKJE.js → embedder-HBRDIFQC.js} +6 -6
  70. package/dist/bundle/{first-run-CATDBOBV.js → first-run-6QF67AAZ.js} +6 -6
  71. package/dist/bundle/first-screen-LXSZMK2P.js +34 -0
  72. package/dist/bundle/{instructions-Z7GVGWXS.js → instructions-MD2RZT5Z.js} +1 -1
  73. package/dist/bundle/mail.js +2 -2
  74. package/dist/bundle/{node-L2PVEW3N.js → node-IEVT2FSJ.js} +2 -2
  75. package/dist/bundle/{node-sqlite-RIGII7U7.js → node-sqlite-EOTTDMOG.js} +4 -4
  76. package/dist/bundle/{oauth-OWT6NYRS.js → oauth-A5BEFGCI.js} +4 -4
  77. package/dist/bundle/{open-D3SPYL7O.js → open-HWN2EZYG.js} +2 -2
  78. package/dist/bundle/{openai-IPTZDMFD.js → openai-PJKJ4CIU.js} +12 -12
  79. package/dist/bundle/{process-MNZTQ2DA.js → process-6Q23D3TO.js} +1 -1
  80. package/dist/bundle/{program-QCHTCOCR.js → program-WR43NPAV.js} +523 -454
  81. package/dist/bundle/{prompt-BN6AKRWN.js → prompt-E7Q2662O.js} +2 -2
  82. package/dist/bundle/{recognize-I5TH7OEW.js → recognize-4F4PIL4B.js} +1 -1
  83. package/dist/bundle/{remote-R324LAUL.js → remote-RGJXO7XK.js} +6 -6
  84. package/dist/bundle/{rerank-ZMGZCUJV.js → rerank-EDY7PHMG.js} +4 -4
  85. package/dist/bundle/{serve-YUFZSNJC.js → serve-Q4XF6ID2.js} +6 -6
  86. package/dist/bundle/server-2Y5NSP2U.js +67 -0
  87. package/dist/bundle/{server-54ULZ3RA.js → server-5I72DSDF.js} +43 -41
  88. package/dist/bundle/{sqlite-runtime-AYQTUQXM.js → sqlite-runtime-PU3Z2H7C.js} +3 -3
  89. package/dist/bundle/{state-PHEBOYYI.js → state-CWSXJBU2.js} +3 -3
  90. package/dist/bundle/{store-NGX3A5XT.js → store-KQPKS3PX.js} +15 -15
  91. package/dist/bundle/{store-4PHDSXEV.js → store-ZAMKKM2A.js} +13 -13
  92. package/dist/bundle/store-maintenance-command-PMTTDR6J.js +58 -0
  93. package/dist/commands/rules.d.ts.map +1 -1
  94. package/dist/commands/rules.js +73 -22
  95. package/dist/commands/rules.js.map +1 -1
  96. package/dist/mail/rules/apply.d.ts.map +1 -1
  97. package/dist/mail/rules/apply.js +1 -9
  98. package/dist/mail/rules/apply.js.map +1 -1
  99. package/dist/version.d.ts +1 -1
  100. package/dist/version.js +1 -1
  101. package/package.json +2 -2
  102. package/dist/bundle/chunk-IJONJTST.js +0 -76
  103. package/dist/bundle/first-screen-WCDR3QUR.js +0 -34
  104. package/dist/bundle/server-UD75CYDG.js +0 -68
  105. package/dist/bundle/store-maintenance-command-WHBIV6HC.js +0 -58
@@ -41,137 +41,6 @@ import {
41
41
  __name
42
42
  } from "./chunk-ZVVMGPBJ.js";
43
43
 
44
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/reference.js
45
- var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
46
- var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
47
- if (!Number.isSafeInteger(value) || value < minimum)
48
- throw invalid();
49
- return value;
50
- }, "integer");
51
- var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
52
- const parts2 = [integer2(reference2.accountId), integer2(reference2.meetingId)];
53
- if (reference2.transcriptId !== void 0)
54
- parts2.push(integer2(reference2.transcriptId));
55
- if (reference2.cuePosition !== void 0) {
56
- if (reference2.transcriptId === void 0)
57
- throw invalid();
58
- parts2.push(integer2(reference2.cuePosition, 0));
59
- }
60
- return `meeting:${parts2.join("/")}`;
61
- }, "formatMeetingReference");
62
- var parseMeetingReference = /* @__PURE__ */ __name((text5) => {
63
- const value = text5.trim();
64
- if (!value.startsWith("meeting:"))
65
- throw invalid();
66
- const parts2 = value.slice(8).split("/");
67
- if (parts2.length < 2 || parts2.length > 4 || parts2.some((part) => !/^\d+$/.test(part)))
68
- throw invalid();
69
- const ids2 = parts2.map(Number);
70
- const reference2 = {
71
- type: "meeting",
72
- accountId: integer2(ids2[0]),
73
- meetingId: integer2(ids2[1]),
74
- ...ids2.length > 2 ? { transcriptId: integer2(ids2[2]) } : {},
75
- ...ids2.length > 3 ? { cuePosition: integer2(ids2[3], 0) } : {}
76
- };
77
- return reference2;
78
- }, "parseMeetingReference");
79
- var canonicalMeetingReference = /* @__PURE__ */ __name((text5) => formatMeetingReference(parseMeetingReference(text5)), "canonicalMeetingReference");
80
-
81
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/payment.js
82
- var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
83
- var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
84
- var PAYMENT_STATES = ["expected", "paid", "cancelled"];
85
- var invalid2 = /* @__PURE__ */ __name((message) => {
86
- throw new CliError("validation_error", message);
87
- }, "invalid");
88
- var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
89
- var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
90
- var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
91
- var amountOf = /* @__PURE__ */ __name((value) => {
92
- const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
93
- if (!match)
94
- return invalid2("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
95
- const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
96
- if (amount === "0.00")
97
- return invalid2("a payment's amount is more than 0");
98
- return amount;
99
- }, "amountOf");
100
- var dateOf = /* @__PURE__ */ __name((value) => {
101
- const date = typeof value === "string" ? value.trim() : "";
102
- if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
103
- return invalid2("a payment's dates are ISO dates, such as 2026-10-31");
104
- return date;
105
- }, "dateOf");
106
- var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
107
- if (value === void 0 || value === null)
108
- return null;
109
- if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
110
- return invalid2(`a payment's ${what} takes 1\u2013${limit} characters`);
111
- return value.trim();
112
- }, "optionalText");
113
- var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
114
- if (typeof value !== "string" || !allowed.includes(value))
115
- return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
116
- return value;
117
- }, "oneOf");
118
- var FIELDS = [
119
- "amount",
120
- "currency",
121
- "direction",
122
- "counterparty",
123
- "counterparty_name",
124
- "due_at",
125
- "state",
126
- "item",
127
- "paid_at"
128
- ];
129
- var validatePayment = /* @__PURE__ */ __name((input) => {
130
- if (!input || typeof input !== "object" || Array.isArray(input))
131
- return invalid2("a payment is an object");
132
- const raw = input;
133
- const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
134
- if (unknown.length)
135
- return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
136
- const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
137
- if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
138
- return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
139
- const counterparty = optionalText(raw.counterparty, "counterparty", 80);
140
- if (counterparty !== null && !COUNTERPARTY.test(counterparty))
141
- return invalid2("a payment's counterparty is a person:, organization: or project: reference");
142
- const state = oneOf(raw.state, PAYMENT_STATES, "state");
143
- if (raw.paid_at != null && state !== "paid")
144
- return invalid2("only a paid payment has paid_at");
145
- return {
146
- amount: amountOf(raw.amount),
147
- currency,
148
- direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
149
- counterparty,
150
- counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
151
- due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
152
- state,
153
- item: optionalText(raw.item, "item", 200),
154
- // Left out when absent, so a finding staged before the field keeps its fingerprint.
155
- ...raw.paid_at == null ? {} : { paid_at: dateOf(raw.paid_at) }
156
- };
157
- }, "validatePayment");
158
- var grouped = /* @__PURE__ */ __name((amount) => {
159
- const [whole = "0", cents = "00"] = amount.split(".");
160
- const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
161
- return cents === "00" ? digits : `${digits}.${cents}`;
162
- }, "grouped");
163
- var paymentTitle = /* @__PURE__ */ __name((fact) => {
164
- const payment = fact.payment;
165
- if (!payment)
166
- return "";
167
- const who = payment.counterparty_name ?? payment.counterparty;
168
- const way = payment.direction === "to_us" ? "to us" : "from us";
169
- const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
170
- const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
171
- const item = payment.item === null ? "" : ` for ${payment.item}`;
172
- return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
173
- }, "paymentTitle");
174
-
175
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
176
45
  var QUERY_LIMITS = {
177
46
  bytes: 8192,
@@ -514,7 +383,7 @@ var fieldsHelp = /* @__PURE__ */ __name((registry2, guide) => {
514
383
  const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
515
384
  return [
516
385
  "Fields:",
517
- ...rows.map(([name = "", kind2 = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind2.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
386
+ ...rows.map(([name = "", kind3 = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind3.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
518
387
  ...registry2.defaults && registry2.defaults.length > 0 ? [`Defaults: ${registry2.defaults.join(" ")} \u2014 name the field to change it`] : [],
519
388
  ...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
520
389
  `Syntax: ${syntaxOf(shown, registry2.backend)}`,
@@ -586,7 +455,7 @@ var tokensOf = /* @__PURE__ */ __name((text5, fail = queryError) => {
586
455
  at++;
587
456
  continue;
588
457
  }
589
- let kind2 = c;
458
+ let kind3 = c;
590
459
  if (c === '"' || !range && c === "/") {
591
460
  at++;
592
461
  while (at < text5.length && text5[at] !== c) {
@@ -599,22 +468,22 @@ var tokensOf = /* @__PURE__ */ __name((text5, fail = queryError) => {
599
468
  at++;
600
469
  if (c === "/" && /^[dgimsuvy]+(?:$|[ \t\n\r)])/.test(text5.slice(at)))
601
470
  fail("query.unsupported-regex-flags", { start: at, end: at + 1 }, "Lucene regex does not take JavaScript flags");
602
- kind2 = c === '"' ? "quoted" : "regex";
471
+ kind3 = c === '"' ? "quoted" : "regex";
603
472
  } else if (range && c !== "]" && c !== "}") {
604
473
  while (at < text5.length && !whitespace(text5[at] ?? "") && !["]", "}"].includes(text5[at] ?? ""))
605
474
  at++;
606
- kind2 = "rangeValue";
475
+ kind3 = "rangeValue";
607
476
  } else if (reserved.has(c)) {
608
477
  if (c === "\\") {
609
478
  at += 2;
610
479
  while (at < text5.length && !whitespace(text5[at] ?? "") && (!reserved.has(text5[at] ?? "") || ["+", "-"].includes(text5[at] ?? "")))
611
480
  at++;
612
- kind2 = "term";
481
+ kind3 = "term";
613
482
  } else {
614
483
  at++;
615
484
  if ((c === "<" || c === ">") && text5[at] === "=") {
616
485
  at++;
617
- kind2 += "=";
486
+ kind3 += "=";
618
487
  }
619
488
  if (c === "[" || c === "{")
620
489
  range = true;
@@ -644,9 +513,9 @@ var tokensOf = /* @__PURE__ */ __name((text5, fail = queryError) => {
644
513
  while (at < text5.length && !whitespace(text5[at] ?? "") && !["(", ")", '"'].includes(text5[at] ?? ""))
645
514
  at++;
646
515
  const raw = text5.slice(start, at);
647
- kind2 = { AND: "AND", OR: "OR", NOT: "NOT", "&&": "AND", "||": "OR" }[raw] ?? (/^\d+(?:\.\d+)?$/u.test(raw) ? "number" : "term");
516
+ kind3 = { AND: "AND", OR: "OR", NOT: "NOT", "&&": "AND", "||": "OR" }[raw] ?? (/^\d+(?:\.\d+)?$/u.test(raw) ? "number" : "term");
648
517
  }
649
- tokens.push({ kind: kind2, raw: text5.slice(start, at), span: { start, end: at } });
518
+ tokens.push({ kind: kind3, raw: text5.slice(start, at), span: { start, end: at } });
650
519
  }
651
520
  tokens.push({ kind: "EOF", raw: "", span: { start: at, end: at } });
652
521
  return tokens;
@@ -674,8 +543,8 @@ var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proxim
674
543
  let depth = 0;
675
544
  const peek = /* @__PURE__ */ __name(() => tokens[at], "peek");
676
545
  const take = /* @__PURE__ */ __name(() => tokens[at++], "take");
677
- const expect = /* @__PURE__ */ __name((kind2) => {
678
- if (peek().kind !== kind2)
546
+ const expect = /* @__PURE__ */ __name((kind3) => {
547
+ if (peek().kind !== kind3)
679
548
  fail("query.invalid-syntax", peek().span);
680
549
  return take();
681
550
  }, "expect");
@@ -747,14 +616,14 @@ var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proxim
747
616
  const value = take();
748
617
  if (!["term", "number", "quoted"].includes(value.kind))
749
618
  fail("query.invalid-syntax", value.span);
750
- const decoded = decodeEscapes(value.kind === "quoted" ? value.raw.slice(1, -1) : value.raw, value.span, fail);
619
+ const decoded2 = decodeEscapes(value.kind === "quoted" ? value.raw.slice(1, -1) : value.raw, value.span, fail);
751
620
  const lower = operator.kind.startsWith(">");
752
621
  const node2 = built({
753
622
  kind: "predicate",
754
623
  field,
755
624
  operator: "range",
756
- value: lower ? decoded : "*",
757
- upper: lower ? "*" : decoded,
625
+ value: lower ? decoded2 : "*",
626
+ upper: lower ? "*" : decoded2,
758
627
  lower_inclusive: !lower || operator.kind.endsWith("="),
759
628
  upper_inclusive: lower || operator.kind.endsWith("="),
760
629
  span: { start: token.span.start, end: value.span.end }
@@ -836,7 +705,7 @@ var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proxim
836
705
  }, "parseLucene");
837
706
  var implicitTextTerms = /* @__PURE__ */ __name((text5) => {
838
707
  const tokens = tokensOf(text5);
839
- if (tokens.some(({ kind: kind2 }) => ["AND", "OR", "NOT", "+", "-", "!", "(", ")"].includes(kind2)))
708
+ if (tokens.some(({ kind: kind3 }) => ["AND", "OR", "NOT", "+", "-", "!", "(", ")"].includes(kind3)))
840
709
  return /* @__PURE__ */ new Set();
841
710
  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] : []));
842
711
  }, "implicitTextTerms");
@@ -987,7 +856,174 @@ var QUERY_REASONS = defineReasons([
987
856
  details: [...SPAN, ...details]
988
857
  })));
989
858
 
990
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/item.js
859
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/service-query.js
860
+ var BACKENDS = ["archive", "server", "both"];
861
+ var MAX_BRANCHES = 64;
862
+ var some = /* @__PURE__ */ __name((value) => value === void 0 ? [] : [value], "some");
863
+ var readable = /* @__PURE__ */ __name((node, capability) => capability.fields[node.field]?.includes(node.operator) === true, "readable");
864
+ var branchesOf = /* @__PURE__ */ __name((node, capability, cut) => {
865
+ if (node.kind === "predicate")
866
+ return readable(node, capability) ? some(capability.leaf(node, false)) : [capability.all];
867
+ const must = node.clauses.filter(({ occur }) => occur === "must");
868
+ const not = node.clauses.flatMap(({ occur, node: node2 }) => occur === "must_not" && node2.kind === "predicate" && capability.negatable?.includes(node2.field) && readable(node2, capability) ? some(capability.leaf(node2, true)) : []);
869
+ const should = node.clauses.filter(({ occur }) => occur === "should");
870
+ const base = must.length || !should.length ? must.reduce((product, { node: node2 }) => {
871
+ const next = product.flatMap((one) => branchesOf(node2, capability, cut).flatMap((other) => some(capability.both(one, other))));
872
+ return next.length > MAX_BRANCHES ? product : next;
873
+ }, [capability.all]) : should.flatMap(({ node: node2 }) => branchesOf(node2, capability, cut));
874
+ if (base.length > MAX_BRANCHES)
875
+ cut.branches = true;
876
+ return not.reduce((branches, negated) => branches.flatMap((one) => some(capability.both(one, negated))), base.slice(0, MAX_BRANCHES));
877
+ }, "branchesOf");
878
+ var serviceCallsOf = /* @__PURE__ */ __name((root, capability, scope2) => {
879
+ const cut = { branches: false };
880
+ const all = branchesOf(root, capability, cut).flatMap((branch) => scope2 === void 0 ? [branch] : some(capability.both(scope2, branch)));
881
+ const sent = capability.sends ? all.filter((branch) => capability.sends?.(branch)) : all;
882
+ const unique = [...new Map(sent.map((branch) => [JSON.stringify(branch), branch])).values()];
883
+ const unsent = all.length - sent.length;
884
+ if (capability.either && unique.length)
885
+ return { calls: [capability.either(unique)], complete: !cut.branches, unsent };
886
+ const max = Math.max(1, capability.maxCalls);
887
+ return { calls: unique.slice(0, max), complete: !cut.branches && unique.length <= max, unsent };
888
+ }, "serviceCallsOf");
889
+ var rangeOf = /* @__PURE__ */ __name((node, zone, now) => dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.operator === "range" ? node.lower_inclusive === true : true, node.operator === "range" ? node.upper_inclusive === true : true, zone, node.span, now), "rangeOf");
890
+ var windowOf = /* @__PURE__ */ __name(({ lower, upper, lower_inclusive, upper_inclusive }) => ({
891
+ ...lower === void 0 ? {} : { from: lower_inclusive ? lower : lower + 1 },
892
+ ...upper === void 0 ? {} : { to: upper_inclusive ? upper : upper - 1 }
893
+ }), "windowOf");
894
+
895
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/reference.js
896
+ var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
897
+ var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
898
+ if (!Number.isSafeInteger(value) || value < minimum)
899
+ throw invalid();
900
+ return value;
901
+ }, "integer");
902
+ var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
903
+ const parts2 = [integer2(reference2.accountId), integer2(reference2.meetingId)];
904
+ if (reference2.transcriptId !== void 0)
905
+ parts2.push(integer2(reference2.transcriptId));
906
+ if (reference2.cuePosition !== void 0) {
907
+ if (reference2.transcriptId === void 0)
908
+ throw invalid();
909
+ parts2.push(integer2(reference2.cuePosition, 0));
910
+ }
911
+ return `meeting:${parts2.join("/")}`;
912
+ }, "formatMeetingReference");
913
+ var parseMeetingReference = /* @__PURE__ */ __name((text5) => {
914
+ const value = text5.trim();
915
+ if (!value.startsWith("meeting:"))
916
+ throw invalid();
917
+ const parts2 = value.slice(8).split("/");
918
+ if (parts2.length < 2 || parts2.length > 4 || parts2.some((part) => !/^\d+$/.test(part)))
919
+ throw invalid();
920
+ const ids2 = parts2.map(Number);
921
+ const reference2 = {
922
+ type: "meeting",
923
+ accountId: integer2(ids2[0]),
924
+ meetingId: integer2(ids2[1]),
925
+ ...ids2.length > 2 ? { transcriptId: integer2(ids2[2]) } : {},
926
+ ...ids2.length > 3 ? { cuePosition: integer2(ids2[3], 0) } : {}
927
+ };
928
+ return reference2;
929
+ }, "parseMeetingReference");
930
+ var canonicalMeetingReference = /* @__PURE__ */ __name((text5) => formatMeetingReference(parseMeetingReference(text5)), "canonicalMeetingReference");
931
+
932
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/payment.js
933
+ var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
934
+ var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
935
+ var PAYMENT_STATES = ["expected", "paid", "cancelled"];
936
+ var invalid2 = /* @__PURE__ */ __name((message) => {
937
+ throw new CliError("validation_error", message);
938
+ }, "invalid");
939
+ var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
940
+ var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
941
+ var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
942
+ var amountOf = /* @__PURE__ */ __name((value) => {
943
+ const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
944
+ if (!match)
945
+ return invalid2("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
946
+ const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
947
+ if (amount === "0.00")
948
+ return invalid2("a payment's amount is more than 0");
949
+ return amount;
950
+ }, "amountOf");
951
+ var dateOf = /* @__PURE__ */ __name((value) => {
952
+ const date = typeof value === "string" ? value.trim() : "";
953
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
954
+ return invalid2("a payment's dates are ISO dates, such as 2026-10-31");
955
+ return date;
956
+ }, "dateOf");
957
+ var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
958
+ if (value === void 0 || value === null)
959
+ return null;
960
+ if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
961
+ return invalid2(`a payment's ${what} takes 1\u2013${limit} characters`);
962
+ return value.trim();
963
+ }, "optionalText");
964
+ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
965
+ if (typeof value !== "string" || !allowed.includes(value))
966
+ return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
967
+ return value;
968
+ }, "oneOf");
969
+ var FIELDS = [
970
+ "amount",
971
+ "currency",
972
+ "direction",
973
+ "counterparty",
974
+ "counterparty_name",
975
+ "due_at",
976
+ "state",
977
+ "item",
978
+ "paid_at"
979
+ ];
980
+ var validatePayment = /* @__PURE__ */ __name((input) => {
981
+ if (!input || typeof input !== "object" || Array.isArray(input))
982
+ return invalid2("a payment is an object");
983
+ const raw = input;
984
+ const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
985
+ if (unknown.length)
986
+ return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
987
+ const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
988
+ if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
989
+ return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
990
+ const counterparty = optionalText(raw.counterparty, "counterparty", 80);
991
+ if (counterparty !== null && !COUNTERPARTY.test(counterparty))
992
+ return invalid2("a payment's counterparty is a person:, organization: or project: reference");
993
+ const state = oneOf(raw.state, PAYMENT_STATES, "state");
994
+ if (raw.paid_at != null && state !== "paid")
995
+ return invalid2("only a paid payment has paid_at");
996
+ return {
997
+ amount: amountOf(raw.amount),
998
+ currency,
999
+ direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
1000
+ counterparty,
1001
+ counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
1002
+ due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
1003
+ state,
1004
+ item: optionalText(raw.item, "item", 200),
1005
+ // Left out when absent, so a finding staged before the field keeps its fingerprint.
1006
+ ...raw.paid_at == null ? {} : { paid_at: dateOf(raw.paid_at) }
1007
+ };
1008
+ }, "validatePayment");
1009
+ var grouped = /* @__PURE__ */ __name((amount) => {
1010
+ const [whole = "0", cents = "00"] = amount.split(".");
1011
+ const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
1012
+ return cents === "00" ? digits : `${digits}.${cents}`;
1013
+ }, "grouped");
1014
+ var paymentTitle = /* @__PURE__ */ __name((fact) => {
1015
+ const payment = fact.payment;
1016
+ if (!payment)
1017
+ return "";
1018
+ const who = payment.counterparty_name ?? payment.counterparty;
1019
+ const way = payment.direction === "to_us" ? "to us" : "from us";
1020
+ const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
1021
+ const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
1022
+ const item = payment.item === null ? "" : ` for ${payment.item}`;
1023
+ return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
1024
+ }, "paymentTitle");
1025
+
1026
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/item.js
991
1027
  var text = string();
992
1028
  var count = pipe(number(), integer(), minValue(0));
993
1029
  var MEETING_ISSUES = ["time_without_zone"];
@@ -995,9 +1031,11 @@ var meetingIssuesOf = /* @__PURE__ */ __name((metadata) => {
995
1031
  const listed2 = metadata?.issues;
996
1032
  return Array.isArray(listed2) ? MEETING_ISSUES.filter((issue) => listed2.includes(issue)) : [];
997
1033
  }, "meetingIssuesOf");
998
- var meeting = strictObject({
1034
+ var meetingEntries = {
999
1035
  ref: reference,
1000
1036
  id: pipe(string(), minLength(1)),
1037
+ /** The service's own id of this occurrence: what `meetings show` takes besides the store number. */
1038
+ provider_id: text,
1001
1039
  provider: text,
1002
1040
  account: text,
1003
1041
  title: nullable(text),
@@ -1012,15 +1050,25 @@ var meeting = strictObject({
1012
1050
  participants_count: nullable(count),
1013
1051
  /** Present only when something about this meeting is doubtful. */
1014
1052
  issues: optional(array(picklist(MEETING_ISSUES))),
1053
+ /**
1054
+ * Where a read that asked the service found it, as messages search says it: `archive` (only the store), `server`
1055
+ * (new from the service), `both`. Absent when the service was not asked.
1056
+ */
1057
+ found_in: optional(picklist(["archive", "server", "both"])),
1058
+ /** The service's text, which a reader must not follow as instructions. */
1059
+ untrusted: optional(array(text)),
1015
1060
  created_at: isoTime,
1016
1061
  updated_at: isoTime
1017
- });
1062
+ };
1063
+ var meeting = strictObject(meetingEntries);
1064
+ var MEETING_UNTRUSTED = ["title", "description", "location"];
1018
1065
  var iso = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
1019
1066
  var meetingItem = /* @__PURE__ */ __name((row, owner) => {
1020
1067
  const issues = meetingIssuesOf(row.metadata);
1021
1068
  return {
1022
1069
  ref: formatMeetingReference({ type: "meeting", accountId: row.accountId, meetingId: row.id }),
1023
1070
  id: String(row.id),
1071
+ provider_id: row.externalId,
1024
1072
  provider: owner.provider,
1025
1073
  account: owner.account,
1026
1074
  title: row.title,
@@ -1033,6 +1081,7 @@ var meetingItem = /* @__PURE__ */ __name((row, owner) => {
1033
1081
  timezone: row.timezone,
1034
1082
  participants_count: row.participantsCount,
1035
1083
  ...issues.length ? { issues } : {},
1084
+ untrusted: [...MEETING_UNTRUSTED],
1036
1085
  created_at: new Date(row.createdAt).toISOString(),
1037
1086
  updated_at: new Date(row.updatedAt).toISOString()
1038
1087
  };
@@ -1041,9 +1090,21 @@ var MEETING_QUERY = {
1041
1090
  entity: "meeting",
1042
1091
  backend: "sql",
1043
1092
  fields: queryFieldsOf(meeting, {
1044
- exclude: ["ref", "provider", "account", "description", "location", "url", "timezone", "issues"],
1093
+ exclude: [
1094
+ "ref",
1095
+ "provider",
1096
+ "account",
1097
+ "description",
1098
+ "location",
1099
+ "url",
1100
+ "timezone",
1101
+ "issues",
1102
+ "found_in",
1103
+ "untrusted"
1104
+ ],
1045
1105
  examples: {
1046
1106
  id: "id:12",
1107
+ provider_id: "provider_id:85746065432",
1047
1108
  title: "title:*standup*",
1048
1109
  started_at: "started_at:[2026-10-01 TO 2026-10-31]",
1049
1110
  duration_ms: "duration_ms>=3600000",
@@ -1052,11 +1113,11 @@ var MEETING_QUERY = {
1052
1113
  })
1053
1114
  };
1054
1115
 
1055
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/store.js
1116
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/store.js
1056
1117
  var MEETING_DOCUMENT_ROLES = ["transcript", "recording", "notes"];
1057
1118
  var READ_BUDGET_EXCEEDED = "Meeting search exceeds its stored text byte budget";
1058
1119
 
1059
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/answers.js
1120
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/answers.js
1060
1121
  var text2 = string();
1061
1122
  var count2 = pipe(number(), integer(), minValue(0));
1062
1123
  var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
@@ -1117,7 +1178,7 @@ var meetingSummary = strictObject({
1117
1178
  created_at: isoTime,
1118
1179
  updated_at: isoTime
1119
1180
  });
1120
- var meetingDetails = strictObject({
1181
+ var meetingDetailsEntries = {
1121
1182
  ...meeting.entries,
1122
1183
  /** The stored event and series it belongs to, as `meetings_list` takes them. */
1123
1184
  event_id: nullable(text2),
@@ -1154,7 +1215,8 @@ var meetingDetails = strictObject({
1154
1215
  title: nullable(text2),
1155
1216
  document: nullable(reference)
1156
1217
  }))
1157
- });
1218
+ };
1219
+ var meetingDetails = strictObject(meetingDetailsEntries);
1158
1220
  var meetingRef = /* @__PURE__ */ __name((accountId, meetingId) => formatMeetingReference({ type: "meeting", accountId, meetingId }), "meetingRef");
1159
1221
  var meetingTranscriptItem = /* @__PURE__ */ __name((accountId, transcript, rows) => ({
1160
1222
  ref: formatMeetingReference({
@@ -1310,7 +1372,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
1310
1372
  };
1311
1373
  }, "meetingHitsList");
1312
1374
 
1313
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
1375
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
1314
1376
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
1315
1377
  const parsed = urlOf(url);
1316
1378
  if (!parsed)
@@ -1344,7 +1406,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
1344
1406
  }
1345
1407
  }, "urlOf");
1346
1408
 
1347
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
1409
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
1348
1410
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
1349
1411
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
1350
1412
  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");
@@ -1381,7 +1443,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
1381
1443
  return kept;
1382
1444
  }, "entryMetadata");
1383
1445
 
1384
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1446
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1385
1447
  import { createHash } from "node:crypto";
1386
1448
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
1387
1449
  reference: cue2.reference,
@@ -1395,7 +1457,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
1395
1457
  text: cue2.text
1396
1458
  })).digest("hex"), "meetingCueFingerprint");
1397
1459
 
1398
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1460
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1399
1461
  var EVENT_QUERY = defineQuery({
1400
1462
  entity: "event",
1401
1463
  backend: "sql",
@@ -1411,7 +1473,7 @@ var EVENT_QUERY = defineQuery({
1411
1473
  ]
1412
1474
  });
1413
1475
 
1414
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1476
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1415
1477
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
1416
1478
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
1417
1479
  if (entry.recurrenceEndsAt !== null)
@@ -1434,7 +1496,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
1434
1496
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
1435
1497
  }, "entryInWindow");
1436
1498
 
1437
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/events.js
1499
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/events.js
1438
1500
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(), { create = true } = {}) => {
1439
1501
  const current = await store.meeting(details.meeting.id);
1440
1502
  if (!current)
@@ -1479,7 +1541,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(),
1479
1541
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
1480
1542
  }, "linkEvent");
1481
1543
 
1482
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1544
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1483
1545
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text5) => text5.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
1484
1546
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
1485
1547
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -1503,7 +1565,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
1503
1565
  };
1504
1566
  }, "validateMeetingParticipantSearch");
1505
1567
 
1506
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1568
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1507
1569
  var MeetingError = class extends CliError {
1508
1570
  static {
1509
1571
  __name(this, "MeetingError");
@@ -1622,10 +1684,9 @@ var ownerOf = /* @__PURE__ */ __name(async (store, accountId) => {
1622
1684
  throw new MeetingError("not_found", `meeting account ${accountId} is not in the store`);
1623
1685
  return owner;
1624
1686
  }, "ownerOf");
1625
- var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store, id3, accountId) => {
1626
- const details = await meetingShow(store, id3, accountId);
1627
- return { item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId)) };
1628
- }, "meetingDetailsAnswer");
1687
+ var meetingDetailsBody = /* @__PURE__ */ __name(async (store, details) => ({
1688
+ item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId))
1689
+ }), "meetingDetailsBody");
1629
1690
  var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id3, accountId, options = {}) => {
1630
1691
  const details = await meetingShow(store, id3, accountId);
1631
1692
  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)));
@@ -1635,7 +1696,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id3, accountId)
1635
1696
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
1636
1697
  }, "meetingSummaryAnswer");
1637
1698
 
1638
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/export.js
1699
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/export.js
1639
1700
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
1640
1701
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
1641
1702
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -1731,10 +1792,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
1731
1792
  };
1732
1793
  }, "exportMeeting");
1733
1794
 
1734
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1795
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1735
1796
  import { createHash as createHash2 } from "node:crypto";
1736
1797
 
1737
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
1798
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
1738
1799
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1739
1800
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
1740
1801
  throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
@@ -1745,7 +1806,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1745
1806
  return new Date(value).toISOString();
1746
1807
  }, "meetingTimestamp");
1747
1808
 
1748
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1809
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1749
1810
  var TASK_TYPES = ["bug", "feature", "chore"];
1750
1811
  var invalid3 = /* @__PURE__ */ __name((message) => {
1751
1812
  throw new CliError("validation_error", message);
@@ -1759,10 +1820,10 @@ var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update
1759
1820
  var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
1760
1821
  var findingWhere = /* @__PURE__ */ __name((of) => {
1761
1822
  const id3 = typeof of.id === "string" ? of.id : null;
1762
- const kind2 = typeof of.kind === "string" ? of.kind : null;
1823
+ const kind3 = typeof of.kind === "string" ? of.kind : null;
1763
1824
  return {
1764
- where: id3 || kind2 ? ` in ${[id3, kind2 && `(${kind2})`].filter(Boolean).join(" ")}` : "",
1765
- named: { ...id3 ? { finding: id3 } : {}, ...kind2 ? { kind: kind2 } : {} }
1825
+ where: id3 || kind3 ? ` in ${[id3, kind3 && `(${kind3})`].filter(Boolean).join(" ")}` : "",
1826
+ named: { ...id3 ? { finding: id3 } : {}, ...kind3 ? { kind: kind3 } : {} }
1766
1827
  };
1767
1828
  }, "findingWhere");
1768
1829
  var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
@@ -1920,7 +1981,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
1920
1981
  var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
1921
1982
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
1922
1983
 
1923
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1984
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1924
1985
  var MEETING_FINDINGS_KIND = "meeting_findings";
1925
1986
  var cue = /* @__PURE__ */ __name((raw) => {
1926
1987
  const reference2 = canonicalMeetingReference(raw);
@@ -1931,7 +1992,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
1931
1992
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
1932
1993
  var meetingFindingFingerprint = findingFingerprint;
1933
1994
 
1934
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1995
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1935
1996
  var context = {
1936
1997
  command: "search meetings",
1937
1998
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -2018,13 +2079,15 @@ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) =
2018
2079
  }, "once");
2019
2080
  for (const { node } of lifted) {
2020
2081
  if (node.field === "date") {
2021
- once("since", "--since-time");
2022
- once("until", "--until-time");
2023
2082
  const range = dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.lower_inclusive !== false, node.upper_inclusive !== false, timezoneOf(timezone), node.span, now);
2024
- if (range.lower !== void 0)
2083
+ if (range.lower !== void 0) {
2084
+ once("since", "--since-time");
2025
2085
  next.since = range.lower + (range.lower_inclusive ? 0 : 1);
2026
- if (range.upper !== void 0)
2086
+ }
2087
+ if (range.upper !== void 0) {
2088
+ once("until", "--until-time");
2027
2089
  next.until = range.upper - (range.upper_inclusive ? 0 : 1);
2090
+ }
2028
2091
  } else {
2029
2092
  const field = node.field;
2030
2093
  once(field, `--${field}`);
@@ -2034,14 +2097,14 @@ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) =
2034
2097
  let rest = query;
2035
2098
  for (const { node } of [...lifted].sort((a, b) => b.node.span.start - a.node.span.start))
2036
2099
  rest = `${rest.slice(0, node.span.start)}${rest.slice(node.span.end)}`;
2037
- rest = rest.replace(/^(?:\s*AND\b)+|(?:\bAND\s*)+$/g, "").replace(/\bAND(\s+AND\b)+/g, "AND").trim();
2100
+ rest = rest.replace(/(^|\s)\+(?=\s|$)/g, "$1").replace(/^(?:\s*(?:AND\b|&&))+|(?:(?:\bAND|&&)\s*)+$/g, "").replace(/(?:\bAND|&&)(\s+(?:AND\b|&&))+/g, "AND").trim();
2038
2101
  if (!rest)
2039
2102
  throw new CliError("validation_error", "give words to find besides date:, project:, tag: and topic:");
2040
2103
  return { query: rest, request: next };
2041
2104
  }, "liftMeetingFields");
2042
2105
  var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
2043
2106
 
2044
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/language.js
2107
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/language.js
2045
2108
  var LATIN_WORDS = {
2046
2109
  en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
2047
2110
  es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
@@ -2090,7 +2153,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
2090
2153
  return null;
2091
2154
  }, "transcriptLanguage");
2092
2155
 
2093
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
2156
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
2094
2157
  var contentHash = /* @__PURE__ */ __name(async (text5) => {
2095
2158
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text5));
2096
2159
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -2127,7 +2190,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
2127
2190
  return time;
2128
2191
  }, "timestamp");
2129
2192
 
2130
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2193
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2131
2194
  var TranscriptTextError = class extends Error {
2132
2195
  static {
2133
2196
  __name(this, "TranscriptTextError");
@@ -2182,7 +2245,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
2182
2245
  return { header, lines };
2183
2246
  }, "parseTranscriptText");
2184
2247
 
2185
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2248
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2186
2249
  var VttError = class extends Error {
2187
2250
  static {
2188
2251
  __name(this, "VttError");
@@ -2234,7 +2297,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
2234
2297
  return cues;
2235
2298
  }, "parseVtt");
2236
2299
 
2237
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/import.js
2300
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/import.js
2238
2301
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
2239
2302
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
2240
2303
  for (const file of files) {
@@ -2267,10 +2330,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
2267
2330
  return report;
2268
2331
  }, "importFiles");
2269
2332
 
2270
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/links.js
2333
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/links.js
2271
2334
  var CHAT_MESSAGES_READ = 1e5;
2272
2335
 
2273
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2336
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2274
2337
  var nonempty = /* @__PURE__ */ __name((value, name) => {
2275
2338
  if (typeof value !== "string" || !value.trim())
2276
2339
  throw new CliError("validation_error", `${name} must be nonempty`);
@@ -2321,7 +2384,7 @@ var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
2321
2384
  return Object.freeze(result);
2322
2385
  }, "validateMeetingChange");
2323
2386
 
2324
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/passage.js
2387
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/passage.js
2325
2388
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
2326
2389
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
2327
2390
  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)))
@@ -2334,7 +2397,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
2334
2397
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
2335
2398
  }, "validateMeetingPassage");
2336
2399
 
2337
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2400
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2338
2401
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2339
2402
  if (!original || typeof original !== "object" || Array.isArray(original))
2340
2403
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -2359,7 +2422,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2359
2422
  return { ...input, limit, maxReadBytes };
2360
2423
  }, "validateMeetingPreparationContext");
2361
2424
 
2362
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2425
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2363
2426
  var count3 = pipe(number(), integer(), minValue(0));
2364
2427
  var id = pipe(string(), minLength(1));
2365
2428
  var meetingProjectEvidence = strictObject({
@@ -2480,7 +2543,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
2480
2543
  };
2481
2544
  }, "meetingProjectEvidenceAnswer");
2482
2545
 
2483
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2546
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2484
2547
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2485
2548
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
2486
2549
  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) || [
@@ -2500,7 +2563,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2500
2563
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
2501
2564
  }, "validateMeetingHitSearch");
2502
2565
 
2503
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2566
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2504
2567
  var ids = {
2505
2568
  meeting_id: "meetingId",
2506
2569
  identity_id: "participantIdentityId",
@@ -2591,7 +2654,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
2591
2654
  return { project: project.trim(), options, query: frozen.join(" AND ") };
2592
2655
  }, "prepareMeetingProjectEvidence");
2593
2656
 
2594
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2657
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2595
2658
  var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
2596
2659
  const prepared = prepareMeetingProjectEvidence(project, request, now);
2597
2660
  const page = await read(prepared.project, prepared.options);
@@ -2599,7 +2662,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
2599
2662
  return meetingProjectEvidenceAnswer(page, prepared);
2600
2663
  }, "readMeetingProjectEvidence");
2601
2664
 
2602
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2665
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2603
2666
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
2604
2667
  const { identityExternalId, phone, ...fields } = p;
2605
2668
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
@@ -2615,6 +2678,93 @@ var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, posit
2615
2678
  }
2616
2679
  };
2617
2680
  }, "participantInput");
2681
+ var participantInputs = /* @__PURE__ */ __name((provider, occurrenceId2, list, accountId) => list.map((p, i) => participantInput(p, provider, occurrenceId2, i, accountId)), "participantInputs");
2682
+ var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount, kept) => {
2683
+ const startedAt = timestamp2(m.occurrence.startedAt);
2684
+ const given = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
2685
+ if (given !== null && given < startedAt)
2686
+ throw new Error("Meeting ends before it starts");
2687
+ const keptEnd = kept?.endedAt ?? null;
2688
+ const endedAt = given ?? (keptEnd !== null && keptEnd >= startedAt ? keptEnd : null);
2689
+ const count6 = participantsCount === null && kept ? kept.participantsCount : participantsCount;
2690
+ const metadata = kept?.metadata && m.metadata ? { ...kept.metadata, ...m.metadata } : m.metadata ?? kept?.metadata ?? null;
2691
+ const meeting2 = {
2692
+ accountId,
2693
+ externalId: m.occurrence.id,
2694
+ title: m.occurrence.title,
2695
+ description: m.description ?? kept?.description ?? null,
2696
+ location: m.location ?? kept?.location ?? null,
2697
+ joinUrl: m.joinUrl ?? m.series?.joinUrl ?? kept?.joinUrl ?? null,
2698
+ startedAt,
2699
+ endedAt,
2700
+ durationMs: endedAt === null ? null : endedAt - startedAt,
2701
+ timezone: m.timezone ?? kept?.timezone ?? null,
2702
+ hostIdentityId: kept?.hostIdentityId ?? null,
2703
+ ...count6 === void 0 ? {} : { participantsCount: count6 },
2704
+ metadata,
2705
+ deletedAt: null
2706
+ };
2707
+ if (m.series)
2708
+ meeting2.series = {
2709
+ externalId: m.series.id,
2710
+ title: m.series.title,
2711
+ description: null,
2712
+ kind: m.series.kind ?? null,
2713
+ recurrence: m.series.recurrence ?? null,
2714
+ hostIdentityId: null,
2715
+ joinUrl: m.series.joinUrl ?? null,
2716
+ metadata: null,
2717
+ deletedAt: null
2718
+ };
2719
+ return meeting2;
2720
+ }, "sourceMeetingInput");
2721
+ var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts2, { accountId, now, kept }) => {
2722
+ const id3 = m.occurrence.id;
2723
+ const { participants: sourceParticipants, transcript: lines, chat, summary } = parts2;
2724
+ const participants = participantInputs(source.provider, id3, sourceParticipants ?? [], accountId);
2725
+ const meeting2 = sourceMeetingInput(m, accountId, sourceParticipants === void 0 ? void 0 : sourceParticipants?.length ?? null, kept);
2726
+ const linked = sourceParticipants !== void 0;
2727
+ const format = source.transcriptFormat ?? null;
2728
+ const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
2729
+ const details = await store.saveMeeting({
2730
+ meeting: meeting2,
2731
+ participants: sourceParticipants ? participants : void 0,
2732
+ transcripts,
2733
+ chat: chat?.map((line2) => ({
2734
+ externalId: null,
2735
+ sentAt: timestamp2(line2.sentAt),
2736
+ senderParticipantPosition: speakerPosition(line2.sender, participants),
2737
+ senderName: line2.sender,
2738
+ recipient: null,
2739
+ text: line2.text,
2740
+ normalizedText: null,
2741
+ metadata: null
2742
+ })),
2743
+ summaries: summary ? [
2744
+ {
2745
+ ...summary,
2746
+ source: summary.source ?? source.name,
2747
+ content: summary.content ?? null,
2748
+ docUrl: summary.docUrl ?? null,
2749
+ externalCreatedAt: summary.externalCreatedAt ?? null,
2750
+ externalUpdatedAt: summary.externalUpdatedAt ?? null,
2751
+ metadata: summary.metadata ?? null
2752
+ }
2753
+ ] : void 0,
2754
+ attachments: parts2.files ?? void 0,
2755
+ documents: parts2.documents ?? void 0,
2756
+ now
2757
+ });
2758
+ if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
2759
+ await store.saveMeeting({
2760
+ meeting: meeting2,
2761
+ transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
2762
+ unlinked`, format)],
2763
+ now
2764
+ });
2765
+ await linkEvent(store, details, now, { create: source.createsEvents !== false });
2766
+ return details;
2767
+ }, "saveSourceMeeting");
2618
2768
  var startOf = /* @__PURE__ */ __name((m) => {
2619
2769
  const at = Date.parse(m.occurrence.startedAt);
2620
2770
  return Number.isFinite(at) ? at : Number.POSITIVE_INFINITY;
@@ -2677,7 +2827,7 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2677
2827
  }, "read");
2678
2828
  try {
2679
2829
  const sourceParticipants = await read("participants", () => source.participants(id3));
2680
- const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider, id3, i, options.accountId));
2830
+ const participants = participantInputs(source.provider, id3, sourceParticipants ?? [], options.accountId);
2681
2831
  const names = /* @__PURE__ */ new Map();
2682
2832
  for (const p of participants)
2683
2833
  if (p.displayName !== null) {
@@ -2693,78 +2843,7 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2693
2843
  const attachments = await read("files", () => source.files(id3));
2694
2844
  const listDocuments = source.documents?.bind(source);
2695
2845
  const documents = listDocuments ? await read("documents", () => listDocuments(id3)) : void 0;
2696
- const startedAt = timestamp2(m.occurrence.startedAt);
2697
- const endedAt = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
2698
- if (endedAt !== null && endedAt < startedAt)
2699
- throw new Error("Meeting ends before it starts");
2700
- const meeting2 = {
2701
- accountId: options.accountId,
2702
- externalId: id3,
2703
- title: m.occurrence.title,
2704
- description: m.description ?? null,
2705
- location: m.location ?? null,
2706
- joinUrl: m.joinUrl ?? m.series?.joinUrl ?? null,
2707
- startedAt,
2708
- endedAt,
2709
- durationMs: endedAt === null ? null : endedAt - startedAt,
2710
- timezone: m.timezone ?? null,
2711
- hostIdentityId: null,
2712
- ...sourceParticipants === void 0 ? {} : { participantsCount: sourceParticipants?.length ?? null },
2713
- metadata: m.metadata ?? null,
2714
- deletedAt: null
2715
- };
2716
- if (m.series)
2717
- meeting2.series = {
2718
- externalId: m.series.id,
2719
- title: m.series.title,
2720
- description: null,
2721
- kind: m.series.kind ?? null,
2722
- recurrence: m.series.recurrence ?? null,
2723
- hostIdentityId: null,
2724
- joinUrl: m.series.joinUrl ?? null,
2725
- metadata: null,
2726
- deletedAt: null
2727
- };
2728
- const linked = sourceParticipants !== void 0;
2729
- const format = source.transcriptFormat ?? null;
2730
- const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
2731
- const details = await store.saveMeeting({
2732
- meeting: meeting2,
2733
- participants: sourceParticipants ? participants : void 0,
2734
- transcripts,
2735
- chat: chat?.map((line2) => ({
2736
- externalId: null,
2737
- sentAt: timestamp2(line2.sentAt),
2738
- senderParticipantPosition: speakerPosition(line2.sender, participants),
2739
- senderName: line2.sender,
2740
- recipient: null,
2741
- text: line2.text,
2742
- normalizedText: null,
2743
- metadata: null
2744
- })),
2745
- summaries: summary ? [
2746
- {
2747
- ...summary,
2748
- source: summary.source ?? source.name,
2749
- content: summary.content ?? null,
2750
- docUrl: summary.docUrl ?? null,
2751
- externalCreatedAt: summary.externalCreatedAt ?? null,
2752
- externalUpdatedAt: summary.externalUpdatedAt ?? null,
2753
- metadata: summary.metadata ?? null
2754
- }
2755
- ] : void 0,
2756
- attachments: attachments ?? void 0,
2757
- documents: documents ?? void 0,
2758
- now
2759
- });
2760
- if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
2761
- await store.saveMeeting({
2762
- meeting: meeting2,
2763
- transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
2764
- unlinked`, format)],
2765
- now
2766
- });
2767
- await linkEvent(store, details, now, { create: source.createsEvents !== false });
2846
+ await saveSourceMeeting(source, store, m, { participants: sourceParticipants, transcript: lines, chat, summary, files: attachments, documents }, { accountId: options.accountId, now });
2768
2847
  for (const p of participants)
2769
2848
  if (p.identity.phone)
2770
2849
  callers.add(p.identity.externalId);
@@ -2783,7 +2862,7 @@ unlinked`, format)],
2783
2862
  return report;
2784
2863
  }, "pull");
2785
2864
 
2786
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2865
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2787
2866
  var text3 = string();
2788
2867
  var count4 = pipe(number(), integer(), minValue(0));
2789
2868
  var id2 = pipe(number(), integer(), minValue(1));
@@ -2978,10 +3057,291 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
2978
3057
  updated_at: new Date(one.updatedAt).toISOString()
2979
3058
  }), "eventItem");
2980
3059
 
2981
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
3060
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
3061
+ var MEETING_SERVER_BOUNDS = { calls: 3, pages: 2 };
3062
+ var ISSUES = {
3063
+ offline: ["permission_error", "meetings.server-offline"],
3064
+ unreachable: ["network_error", "meetings.server-unreachable"],
3065
+ not_signed_in: ["authentication_error", "meetings.server-signed-out"],
3066
+ refused: ["permission_error", "meetings.server-refused"],
3067
+ failed: ["provider_error", "meetings.server-failed"]
3068
+ };
3069
+ var metaOf = /* @__PURE__ */ __name((reason, provider) => {
3070
+ const issue = ISSUES[reason];
3071
+ return issue && { complete: false, issues: [{ code: issue[0], reason: issue[1], source: provider }] };
3072
+ }, "metaOf");
3073
+ var WHY = {
3074
+ unsupported: /* @__PURE__ */ __name((provider) => `${provider} cannot be asked for meetings here \u2014 the answer is the store's`, "unsupported"),
3075
+ offline: /* @__PURE__ */ __name(() => "--offline: the service was not asked \u2014 the answer is the store's", "offline"),
3076
+ unreachable: /* @__PURE__ */ __name((provider) => `${provider} could not be reached \u2014 the answer is the store's`, "unreachable"),
3077
+ not_signed_in: /* @__PURE__ */ __name((provider) => `not signed in to ${provider} \u2014 the answer is the store's`, "not_signed_in"),
3078
+ refused: /* @__PURE__ */ __name((provider) => `${provider} refused the request \u2014 the answer is the store's`, "refused"),
3079
+ failed: /* @__PURE__ */ __name((provider) => `${provider} could not be read \u2014 the answer is the store's`, "failed"),
3080
+ no_upcoming: /* @__PURE__ */ __name((provider) => `${provider} lists no meeting before it starts \u2014 upcoming ones are not in the answer`, "no_upcoming")
3081
+ };
3082
+ var reasonOf = /* @__PURE__ */ __name((error) => {
3083
+ const code = error instanceof CliError ? error.code : void 0;
3084
+ if (code === "authentication_error")
3085
+ return "not_signed_in";
3086
+ if (code === "permission_error")
3087
+ return "refused";
3088
+ if (code === "network_error")
3089
+ return "unreachable";
3090
+ return "failed";
3091
+ }, "reasonOf");
3092
+ var refusal = /* @__PURE__ */ __name((reason, provider, error) => error ?? new CliError("validation_error", `--backend server: ${WHY[reason](provider).replace(/ — .*$/, "")}; use --backend archive or both`, { reason }), "refusal");
3093
+ var within = /* @__PURE__ */ __name((one, other) => {
3094
+ const from = Math.max(one.from ?? -Infinity, other.from ?? -Infinity);
3095
+ const to = Math.min(one.to ?? Infinity, other.to ?? Infinity);
3096
+ if (from > to)
3097
+ return void 0;
3098
+ return { ...Number.isFinite(from) ? { from } : {}, ...Number.isFinite(to) ? { to } : {} };
3099
+ }, "within");
3100
+ var findsOf = /* @__PURE__ */ __name((source, zone, now) => ({
3101
+ fields: { ...source.finds.fields, started_at: ["term", "range"] },
3102
+ negatable: source.finds.negatable?.filter((field) => field !== "started_at") ?? [],
3103
+ maxCalls: MEETING_SERVER_BOUNDS.calls,
3104
+ all: { window: {}, terms: [] },
3105
+ leaf: /* @__PURE__ */ __name((predicate, negated) => predicate.field === "started_at" ? { window: windowOf(rangeOf(predicate, zone, now)), terms: [] } : { window: {}, terms: [{ predicate, negated }] }, "leaf"),
3106
+ both: /* @__PURE__ */ __name((one, other) => {
3107
+ const window = within(one.window, other.window);
3108
+ return window && { window, terms: [...one.terms, ...other.terms] };
3109
+ }, "both")
3110
+ }), "findsOf");
3111
+ var reachesFuture = /* @__PURE__ */ __name(({ to }, now) => to === void 0 || to > now, "reachesFuture");
3112
+ var storedByExternalId = /* @__PURE__ */ __name(async (store, accountId, externalId) => {
3113
+ if (store.meetingByExternalId)
3114
+ return store.meetingByExternalId(accountId, externalId);
3115
+ const span = { start: 0, end: 0 };
3116
+ const query = {
3117
+ version: 1,
3118
+ language: "lucene-v1",
3119
+ root: { kind: "predicate", field: "provider_id", operator: "term", value: externalId, span }
3120
+ };
3121
+ const [row] = await store.meetings({ accountId, query, includeDeleted: true, limit: 1 });
3122
+ return row ? store.meeting(row.id) : null;
3123
+ }, "storedByExternalId");
3124
+ var peopleKey = /* @__PURE__ */ __name((people) => JSON.stringify(people.map(({ email, displayName }) => [email ?? "", displayName ?? ""]).sort()), "peopleKey");
3125
+ var unchanged = /* @__PURE__ */ __name((found, stored, accountId) => {
3126
+ const participants = found.participants;
3127
+ const input = sourceMeetingInput(found.meeting, accountId, participants === void 0 ? void 0 : participants?.length ?? null, stored.meeting);
3128
+ const row = stored.meeting;
3129
+ return row.deletedAt === null && input.title === row.title && input.description === row.description && input.location === row.location && input.joinUrl === row.joinUrl && input.startedAt === row.startedAt && input.endedAt === row.endedAt && input.timezone === row.timezone && JSON.stringify(input.metadata ?? null) === JSON.stringify(row.metadata ?? null) && (input.series === void 0 || input.series.externalId === stored.series?.externalId && input.series.title === stored.series.title) && (participants == null || row.participantsCount === participants.length && peopleKey(participants) === peopleKey(stored.participants));
3130
+ }, "unchanged");
3131
+ var stepFor = /* @__PURE__ */ __name((backend) => ({
3132
+ report: {
3133
+ backend: backend === "server" ? "server" : "both",
3134
+ skipped: null,
3135
+ calls: 0,
3136
+ returned: 0,
3137
+ new: 0,
3138
+ failed: 0,
3139
+ complete: true
3140
+ },
3141
+ found: /* @__PURE__ */ new Map(),
3142
+ missing: []
3143
+ }), "stepFor");
3144
+ var keep = /* @__PURE__ */ __name(async (source, store, accountId, now, step, found, parts2, fresh = false) => {
3145
+ const stored = await storedByExternalId(store, accountId, found.meeting.occurrence.id);
3146
+ const details = stored && !fresh && unchanged(found, stored, accountId) ? stored : await saveSourceMeeting(source, store, found.meeting, parts2, {
3147
+ accountId,
3148
+ now,
3149
+ ...stored ? { kept: stored.meeting } : {}
3150
+ });
3151
+ step.found.set(details.meeting.id, stored ? "both" : "server");
3152
+ step.report.returned += 1;
3153
+ if (!stored)
3154
+ step.report.new += 1;
3155
+ return details;
3156
+ }, "keep");
3157
+ var askServerForList = /* @__PURE__ */ __name(async (source, store, accountId, query, access) => {
3158
+ const backend = access.backend ?? "both";
3159
+ if (backend === "archive")
3160
+ return void 0;
3161
+ const step = stepFor(backend);
3162
+ const provider = source?.name ?? "the service";
3163
+ const skip = /* @__PURE__ */ __name((reason, error) => {
3164
+ if (backend === "server")
3165
+ throw refusal(reason, provider, error);
3166
+ step.report.skipped = reason;
3167
+ step.report.complete = false;
3168
+ step.missing.push({ field: "server", why: WHY[reason](provider) });
3169
+ const meta = metaOf(reason, provider);
3170
+ if (meta)
3171
+ step.meta = meta;
3172
+ return step;
3173
+ }, "skip");
3174
+ if (!source?.find || !source.finds)
3175
+ return skip("unsupported");
3176
+ if (access.offline)
3177
+ return skip("offline");
3178
+ const now = access.now ?? Date.now();
3179
+ const finds = source.finds;
3180
+ const capability = findsOf({ ...source, finds }, timezoneOf(access.timezone), now);
3181
+ const { calls, complete } = query ? serviceCallsOf(query.root, capability) : { calls: [capability.all], complete: true };
3182
+ let capped = !complete;
3183
+ let asked = calls;
3184
+ if (finds.upcoming === false) {
3185
+ if (calls.some(({ window }) => reachesFuture(window, now)))
3186
+ step.missing.push({ field: "upcoming", why: WHY.no_upcoming(provider) });
3187
+ asked = calls.flatMap((call) => {
3188
+ const window = within(call.window, { to: now });
3189
+ return window ? [{ ...call, window }] : [];
3190
+ });
3191
+ if (!asked.length)
3192
+ return skip("no_upcoming");
3193
+ }
3194
+ const seen = /* @__PURE__ */ new Set();
3195
+ let failure;
3196
+ for (const call of asked) {
3197
+ let cursor = null;
3198
+ for (let page = 0; page < MEETING_SERVER_BOUNDS.pages; page++) {
3199
+ step.report.calls += 1;
3200
+ let answer;
3201
+ try {
3202
+ answer = await source.find(call.window, call.terms, cursor);
3203
+ } catch (error) {
3204
+ return skip(reasonOf(error), error);
3205
+ }
3206
+ for (const found of answer.meetings) {
3207
+ if (seen.has(found.meeting.occurrence.id))
3208
+ continue;
3209
+ seen.add(found.meeting.occurrence.id);
3210
+ try {
3211
+ await keep(source, store, accountId, now, step, found, { participants: found.participants });
3212
+ } catch (error) {
3213
+ step.report.failed += 1;
3214
+ failure ??= error;
3215
+ }
3216
+ }
3217
+ cursor = answer.next;
3218
+ if (cursor === null)
3219
+ break;
3220
+ if (page === MEETING_SERVER_BOUNDS.pages - 1)
3221
+ capped = true;
3222
+ }
3223
+ }
3224
+ const issues = [];
3225
+ if (step.report.failed) {
3226
+ issues.push({
3227
+ code: failure instanceof CliError ? failure.code : "provider_error",
3228
+ reason: "meetings.server-failed",
3229
+ source: provider
3230
+ });
3231
+ const why = failure instanceof Error ? `: ${failure.message}` : "";
3232
+ step.missing.push({
3233
+ field: "server",
3234
+ why: `${step.report.failed} meeting(s) ${provider} returned could not be kept${why} \u2014 the answer is without them`
3235
+ });
3236
+ }
3237
+ if (capped) {
3238
+ issues.push({ code: "outcome_unknown", reason: "meetings.server-capped", source: provider });
3239
+ const { calls: calls2, returned } = step.report;
3240
+ step.missing.push({
3241
+ field: "server",
3242
+ why: `${provider} was asked ${calls2} time(s) and returned ${returned} meeting(s), not every one that may match \u2014 narrow the query by started_at`
3243
+ });
3244
+ }
3245
+ if (issues.length) {
3246
+ step.report.complete = false;
3247
+ step.meta = { complete: false, issues };
3248
+ }
3249
+ return step;
3250
+ }, "askServerForList");
3251
+ var meetingsListThrough = /* @__PURE__ */ __name(async (source, store, filter, access) => {
3252
+ const now = access.now ?? Date.now();
3253
+ const zoned = { ...filter, timezone: timezoneOf(access.timezone), now };
3254
+ const step = await askServerForList(source, store, filter.accountId, filter.query, { ...access, now });
3255
+ if (!step)
3256
+ return meetingsList(store, zoned);
3257
+ const extras = {
3258
+ server: step.report,
3259
+ ...step.missing.length ? { missing: step.missing } : {},
3260
+ ...step.meta ? { meta: step.meta } : {}
3261
+ };
3262
+ const ids2 = [...step.found.keys()];
3263
+ if (access.backend === "server" && !ids2.length)
3264
+ return { items: [], page: { mode: "page", limit: filter.limit ?? 100, has_more: false }, ...extras };
3265
+ const list = await meetingsList(store, access.backend === "server" ? { ...zoned, ids: ids2 } : zoned);
3266
+ return {
3267
+ ...list,
3268
+ items: list.items.map((item) => ({ ...item, found_in: step.found.get(Number(item.id)) ?? "archive" })),
3269
+ ...extras
3270
+ };
3271
+ }, "meetingsListThrough");
3272
+ var storedMeeting = /* @__PURE__ */ __name(async (store, accountId, meeting2) => {
3273
+ const text5 = meeting2.trim();
3274
+ const own = /* @__PURE__ */ __name((details) => details?.meeting.accountId === accountId ? details : null, "own");
3275
+ if (/^[1-9]\d*$/.test(text5) && Number.isSafeInteger(Number(text5))) {
3276
+ const byNumber = own(await store.meeting(Number(text5)));
3277
+ if (byNumber)
3278
+ return byNumber;
3279
+ }
3280
+ if (text5.startsWith("meeting:")) {
3281
+ const reference2 = parseMeetingReference(text5);
3282
+ if (reference2.accountId !== accountId)
3283
+ throw new MeetingError("not_found", "meeting not found");
3284
+ return own(await store.meeting(reference2.meetingId));
3285
+ }
3286
+ return store.meetingByExternalId ? own(await store.meetingByExternalId(accountId, text5)) : null;
3287
+ }, "storedMeeting");
3288
+ var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId, meeting2, access) => {
3289
+ if (!meeting2.trim())
3290
+ throw new MeetingError("validation_error", "name a meeting");
3291
+ const stored = await storedMeeting(store, accountId, meeting2);
3292
+ const backend = access.backend ?? "both";
3293
+ const notFound = /* @__PURE__ */ __name(() => new MeetingError("not_found", "meeting not found"), "notFound");
3294
+ if (backend === "archive") {
3295
+ if (!stored)
3296
+ throw notFound();
3297
+ return { details: stored };
3298
+ }
3299
+ const step = stepFor(backend);
3300
+ const provider = source?.name ?? "the service";
3301
+ const fromStore = /* @__PURE__ */ __name((reason, error) => {
3302
+ if (backend === "server")
3303
+ throw refusal(reason, provider, error);
3304
+ if (!stored)
3305
+ throw error instanceof CliError && reason !== "failed" ? error : notFound();
3306
+ step.report.skipped = reason;
3307
+ step.report.complete = false;
3308
+ const meta = metaOf(reason, provider);
3309
+ return {
3310
+ details: stored,
3311
+ foundIn: "archive",
3312
+ server: step.report,
3313
+ missing: [{ field: "server", why: WHY[reason](provider) }],
3314
+ ...meta ? { meta } : {}
3315
+ };
3316
+ }, "fromStore");
3317
+ const providerId = stored?.meeting.externalId ?? (meeting2.trim().startsWith("meeting:") ? void 0 : meeting2.trim());
3318
+ if (providerId === void 0)
3319
+ throw notFound();
3320
+ if (!source?.get)
3321
+ return fromStore("unsupported");
3322
+ if (access.offline)
3323
+ return fromStore("offline");
3324
+ step.report.calls = 1;
3325
+ let full;
3326
+ try {
3327
+ full = await source.get(providerId);
3328
+ } catch (error) {
3329
+ return fromStore(reasonOf(error), error);
3330
+ }
3331
+ if (!full) {
3332
+ if (!stored || backend === "server")
3333
+ throw notFound();
3334
+ return { details: stored, foundIn: "archive", server: step.report };
3335
+ }
3336
+ const details = await keep(source, store, accountId, access.now ?? Date.now(), step, full, { participants: full.participants, transcript: full.transcript, documents: full.documents }, true);
3337
+ const fresh = await store.meeting(details.meeting.id) ?? details;
3338
+ return { details: fresh, foundIn: step.found.get(details.meeting.id) ?? "server", server: step.report };
3339
+ }, "meetingShowThrough");
3340
+
3341
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2982
3342
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
2983
3343
 
2984
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
3344
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2985
3345
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2986
3346
  if (!original || typeof original !== "object" || Array.isArray(original))
2987
3347
  throw new CliError("validation_error", "related history request is required");
@@ -3011,7 +3371,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
3011
3371
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
3012
3372
  }, "validateMeetingRelatedHistory");
3013
3373
 
3014
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
3374
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
3015
3375
  var text4 = string();
3016
3376
  var identifier = pipe(text4, minLength(1));
3017
3377
  var nullableText = nullable(text4);
@@ -3136,7 +3496,37 @@ var repair = strictObject({
3136
3496
  transcripts: count5,
3137
3497
  languages: array(strictObject({ language: nullableText, transcripts: count5 }))
3138
3498
  });
3499
+ var kind = picklist(["instant", "scheduled"]);
3500
+ var managedChange = strictObject({
3501
+ action: picklist(["create", "update", "cancel"]),
3502
+ provider: text4,
3503
+ account: text4,
3504
+ id: optional(identifier),
3505
+ occurrence_id: optional(identifier),
3506
+ change: optional(strictObject({
3507
+ title: optional(text4),
3508
+ kind: optional(kind),
3509
+ start_time: optional(text4),
3510
+ duration_minutes: optional(count5),
3511
+ timezone: optional(text4),
3512
+ agenda: optional(text4)
3513
+ })),
3514
+ applied: flag,
3515
+ meeting: optional(strictObject({
3516
+ id: identifier,
3517
+ title: nullableText,
3518
+ kind: nullable(kind),
3519
+ start_time: nullableText,
3520
+ duration_minutes: nullable(count5),
3521
+ timezone: nullableText,
3522
+ agenda: nullableText,
3523
+ join_url: nullableText
3524
+ }))
3525
+ });
3526
+ var invitation = strictObject({ id: identifier, invitation: text4, untrusted: optional(array(text4)) });
3139
3527
  var MEETING_RESULT_ENTITIES = {
3528
+ meeting_change: managedChange,
3529
+ meeting_invitation: invitation,
3140
3530
  meeting_ingestion: run,
3141
3531
  meeting_export: exported,
3142
3532
  meeting_association: meetingChange,
@@ -3145,14 +3535,14 @@ var MEETING_RESULT_ENTITIES = {
3145
3535
  meeting_repair: repair
3146
3536
  };
3147
3537
 
3148
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/review.js
3538
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/review.js
3149
3539
  var REVIEW_LIMIT = { default: 50, most: 200 };
3150
3540
 
3151
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3541
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3152
3542
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
3153
3543
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
3154
3544
 
3155
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3545
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3156
3546
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3157
3547
  input.signal?.throwIfAborted();
3158
3548
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -3173,10 +3563,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3173
3563
  return { ...input, limit, maxReadBytes };
3174
3564
  }, "validateMeetingSeriesHistory");
3175
3565
 
3176
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3566
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3177
3567
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
3178
3568
 
3179
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3569
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3180
3570
  function invalid4(field, response = false) {
3181
3571
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
3182
3572
  }
@@ -3192,11 +3582,11 @@ var cursorDetails = /* @__PURE__ */ __name((value) => {
3192
3582
  if (typeof value !== "string" || value.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(value))
3193
3583
  invalid4("cursor");
3194
3584
  try {
3195
- const decoded = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
3196
- object2(decoded, ["version", "selection", "cursor"], "cursor");
3197
- if (decoded.version !== 1 || typeof decoded.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded.selection) || !occurrenceId(decoded.cursor))
3585
+ const decoded2 = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
3586
+ object2(decoded2, ["version", "selection", "cursor"], "cursor");
3587
+ if (decoded2.version !== 1 || typeof decoded2.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded2.selection) || !occurrenceId(decoded2.cursor))
3198
3588
  invalid4("cursor");
3199
- return decoded;
3589
+ return decoded2;
3200
3590
  } catch {
3201
3591
  return invalid4("cursor");
3202
3592
  }
@@ -3205,7 +3595,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
3205
3595
  cursorDetails(value);
3206
3596
  }, "validateMeetingSeriesInventoryCursor");
3207
3597
 
3208
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/meetings/stats.js
3598
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/stats.js
3209
3599
  var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
3210
3600
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
3211
3601
  const zone = timeZone ?? "UTC";
@@ -3340,21 +3730,28 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
3340
3730
  };
3341
3731
  }, "aggregateMeetingStats");
3342
3732
 
3343
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/locator.js
3733
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/locator.js
3344
3734
  var SCHEME = "msg:";
3345
3735
  var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
3346
3736
  var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
3347
3737
  var parseLocator = /* @__PURE__ */ __name((reference2) => {
3348
3738
  const trimmed = reference2.trim();
3349
3739
  const parts2 = trimmed.startsWith(SCHEME) ? trimmed.slice(SCHEME.length).split("/") : [];
3350
- if (parts2.length !== 4 || parts2.some((part) => part === "")) {
3351
- throw new CliError("validation_error", `"${singleLine(reference2)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`);
3352
- }
3353
- const [provider, account, chat, message] = parts2.map(decodeURIComponent);
3740
+ const malformed2 = /* @__PURE__ */ __name(() => new CliError("validation_error", `"${singleLine(reference2)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`), "malformed");
3741
+ if (parts2.length !== 4 || parts2.some((part) => part === ""))
3742
+ throw malformed2();
3743
+ const decoded2 = /* @__PURE__ */ __name((part) => {
3744
+ try {
3745
+ return decodeURIComponent(part);
3746
+ } catch {
3747
+ throw malformed2();
3748
+ }
3749
+ }, "decoded");
3750
+ const [provider, account, chat, message] = parts2.map(decoded2);
3354
3751
  return { provider, account, chat, message };
3355
3752
  }, "parseLocator");
3356
3753
 
3357
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/references.js
3754
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/references.js
3358
3755
  var SIMPLE_REFERENCES = [
3359
3756
  "note",
3360
3757
  "document",
@@ -3382,11 +3779,18 @@ var SIMPLE_REFERENCES = [
3382
3779
  var malformed = /* @__PURE__ */ __name((text5, shape) => new CliError("validation_error", `"${singleLine(text5)}" is not a reference \u2014 expected ${shape}`, {
3383
3780
  reason: "ref.malformed"
3384
3781
  }), "malformed");
3782
+ var decoded = /* @__PURE__ */ __name((part, text5, shape) => {
3783
+ try {
3784
+ return decodeURIComponent(part);
3785
+ } catch {
3786
+ throw malformed(text5, shape);
3787
+ }
3788
+ }, "decoded");
3385
3789
  var parts = /* @__PURE__ */ __name((rest, count6, text5, shape) => {
3386
3790
  const split = rest.split("/");
3387
3791
  if (split.length !== count6 || split.some((part) => part === ""))
3388
3792
  throw malformed(text5, shape);
3389
- return split.map(decodeURIComponent);
3793
+ return split.map((part) => decoded(part, text5, shape));
3390
3794
  }, "parts");
3391
3795
  var encoded = /* @__PURE__ */ __name((...values) => values.map(encodeURIComponent).join("/"), "encoded");
3392
3796
  var folderPath = /* @__PURE__ */ __name((path) => {
@@ -3394,8 +3798,8 @@ var folderPath = /* @__PURE__ */ __name((path) => {
3394
3798
  return clean === "" ? path.trim() === "" ? "" : null : clean;
3395
3799
  }, "folderPath");
3396
3800
  var MEETING_SHAPE = "meeting:<account>/<meeting>[/<transcript>[/<cue>]] with safe integer ids";
3397
- var kind = /* @__PURE__ */ __name((spec) => spec, "kind");
3398
- var simple = /* @__PURE__ */ __name((prefix) => kind({
3801
+ var kind2 = /* @__PURE__ */ __name((spec) => spec, "kind");
3802
+ var simple = /* @__PURE__ */ __name((prefix) => kind2({
3399
3803
  prefix,
3400
3804
  type: prefix,
3401
3805
  shape: `${prefix}:<id>`,
@@ -3409,7 +3813,7 @@ var simple = /* @__PURE__ */ __name((prefix) => kind({
3409
3813
  format: /* @__PURE__ */ __name((reference2) => `${reference2.type}:${reference2.id}`, "format")
3410
3814
  }), "simple");
3411
3815
  var REF_KINDS = [
3412
- kind({
3816
+ kind2({
3413
3817
  prefix: "msg",
3414
3818
  type: "message",
3415
3819
  shape: "msg:<provider>/<account>/<chat>/<message>",
@@ -3422,7 +3826,7 @@ var REF_KINDS = [
3422
3826
  }, "parse"),
3423
3827
  format: formatLocator
3424
3828
  }),
3425
- kind({
3829
+ kind2({
3426
3830
  prefix: "chat",
3427
3831
  type: "chat",
3428
3832
  shape: "chat:<provider>/<account>/<chat>",
@@ -3432,7 +3836,7 @@ var REF_KINDS = [
3432
3836
  }, "parse"),
3433
3837
  format: /* @__PURE__ */ __name(({ provider, account, chat }) => `chat:${encoded(provider, account, chat)}`, "format")
3434
3838
  }),
3435
- kind({
3839
+ kind2({
3436
3840
  prefix: "contact",
3437
3841
  type: "contact",
3438
3842
  shape: "contact:<provider>/<id>",
@@ -3442,21 +3846,21 @@ var REF_KINDS = [
3442
3846
  }, "parse"),
3443
3847
  format: /* @__PURE__ */ __name(({ provider, id: id3 }) => `contact:${encoded(provider, id3)}`, "format")
3444
3848
  }),
3445
- kind({
3849
+ kind2({
3446
3850
  prefix: "folder",
3447
3851
  type: "folder",
3448
3852
  shape: "folder:<id>[/<path>]",
3449
3853
  parse: /* @__PURE__ */ __name((rest, text5) => {
3450
3854
  const slash = rest.indexOf("/");
3451
- const id3 = decodeURIComponent(slash < 0 ? rest : rest.slice(0, slash));
3452
- const path = slash < 0 ? null : folderPath(decodeURIComponent(rest.slice(slash + 1)));
3855
+ const id3 = decoded(slash < 0 ? rest : rest.slice(0, slash), text5, "folder:<id>[/<path>]");
3856
+ const path = slash < 0 ? null : folderPath(decoded(rest.slice(slash + 1), text5, "folder:<id>[/<path>]"));
3453
3857
  if (!id3.trim() || path === "")
3454
3858
  throw malformed(text5, "folder:<id>[/<path>]");
3455
3859
  return { type: "folder", id: id3, path };
3456
3860
  }, "parse"),
3457
3861
  format: /* @__PURE__ */ __name(({ id: id3, path }) => path === null ? `folder:${encodeURIComponent(id3)}` : `folder:${encoded(id3, path)}`, "format")
3458
3862
  }),
3459
- kind({
3863
+ kind2({
3460
3864
  prefix: "meeting",
3461
3865
  type: "meeting",
3462
3866
  shape: MEETING_SHAPE,
@@ -3510,7 +3914,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text5) => {
3510
3914
  return match !== null && byPrefix.has(match[1]);
3511
3915
  }, "looksLikeReference");
3512
3916
 
3513
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/providers.js
3917
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/providers.js
3514
3918
  var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
3515
3919
  var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
3516
3920
  var CRM_OPENS = { deal: "deals show", lead: "leads show", pipeline: "pipelines show" };
@@ -3527,7 +3931,7 @@ var PROVIDERS = [
3527
3931
  { name: "obsidian", kind: "notes", aliases: [] },
3528
3932
  { name: "added", kind: "notes", aliases: [] },
3529
3933
  { name: "zoom", kind: "meetings", aliases: [] },
3530
- { name: "google-meet", kind: "meetings", aliases: [], command: "meet" },
3934
+ { name: "google-meet", kind: "meetings", aliases: [], command: "gmeet" },
3531
3935
  // Its meetings come from the notes Telemost mails (`keeper@telemost.yandex.ru`), read by a mail rule.
3532
3936
  { name: "telemost", kind: "meetings", aliases: [] },
3533
3937
  // A phone export's records: its SMS and its calls in the one account the import names.
@@ -3571,24 +3975,24 @@ var COMMAND_WORDS = /^[a-z0-9][a-z0-9_-]*( [a-z0-9][a-z0-9_-]*)*$/;
3571
3975
  var opensOf = /* @__PURE__ */ __name((value, named) => {
3572
3976
  if (typeof value !== "object" || value === null || Array.isArray(value))
3573
3977
  return invalid5(`provider ${named}'s opens maps a kind of reference to a command`);
3574
- const known = Object.entries(value).filter(([kind2]) => OPEN_KINDS.has(kind2));
3575
- for (const [kind2, command] of known)
3978
+ const known = Object.entries(value).filter(([kind3]) => OPEN_KINDS.has(kind3));
3979
+ for (const [kind3, command] of known)
3576
3980
  if (typeof command !== "string" || !COMMAND_WORDS.test(command))
3577
- invalid5(`provider ${named} opens a ${kind2} with command words, not ${JSON.stringify(command)}`);
3981
+ invalid5(`provider ${named} opens a ${kind3} with command words, not ${JSON.stringify(command)}`);
3578
3982
  return Object.fromEntries(known);
3579
3983
  }, "opensOf");
3580
3984
  var providerEntryOf = /* @__PURE__ */ __name((value) => {
3581
3985
  if (typeof value !== "object" || value === null || Array.isArray(value))
3582
3986
  return invalid5("a provider entry is an object");
3583
- const { name, kind: kind2, kinds, aliases = [], command, opens, imported } = value;
3987
+ const { name, kind: kind3, kinds, aliases = [], command, opens, imported } = value;
3584
3988
  const named = wordOf(name, "a provider's name");
3585
3989
  const isKindWord = /* @__PURE__ */ __name((one) => typeof one === "string" && KINDS.includes(one), "isKindWord");
3586
- const given = kinds === void 0 ? [kind2] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
3990
+ const given = kinds === void 0 ? [kind3] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
3587
3991
  for (const one of given)
3588
3992
  if (!isKindWord(one))
3589
3993
  invalid5(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(one)}`);
3590
3994
  const list = [...new Set(given)];
3591
- if (kind2 !== void 0 && kind2 !== list[0])
3995
+ if (kind3 !== void 0 && kind3 !== list[0])
3592
3996
  invalid5(`provider ${named}'s kind is the first of its kinds`);
3593
3997
  if (!Array.isArray(aliases))
3594
3998
  invalid5(`provider ${named}'s aliases are a list`);
@@ -3682,11 +4086,11 @@ var importedOf = /* @__PURE__ */ __name((entry, held) => {
3682
4086
  return held.imported === true;
3683
4087
  }, "importedOf");
3684
4088
  var isImportedProvider = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.imported === true, "isImportedProvider");
3685
- var holdsKind = /* @__PURE__ */ __name((provider, kind2) => kindsIn(provider).includes(kind2), "holdsKind");
3686
- var holdsKindOf = /* @__PURE__ */ __name((provider, kind2) => kindIn(provider) === void 0 ? kind2 === "messages" : holdsKind(provider, kind2), "holdsKindOf");
4089
+ var holdsKind = /* @__PURE__ */ __name((provider, kind3) => kindsIn(provider).includes(kind3), "holdsKind");
4090
+ var holdsKindOf = /* @__PURE__ */ __name((provider, kind3) => kindIn(provider) === void 0 ? kind3 === "messages" : holdsKind(provider, kind3), "holdsKindOf");
3687
4091
  var kindOf2 = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
3688
4092
 
3689
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/money.js
4093
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/money.js
3690
4094
  var CURRENCY_SCALES = {
3691
4095
  AED: 2,
3692
4096
  AMD: 2,
@@ -3780,7 +4184,7 @@ var quantityOf = /* @__PURE__ */ __name((text5) => {
3780
4184
  }, "quantityOf");
3781
4185
  var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
3782
4186
 
3783
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/deals.js
4187
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/deals.js
3784
4188
  var DEAL_KINDS = ["deal", "lead"];
3785
4189
  var DEAL_STATUSES = ["open", "won", "lost"];
3786
4190
  var STAGE_OUTCOMES = DEAL_STATUSES;
@@ -3790,7 +4194,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
3790
4194
  return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
3791
4195
  }, "dealLine");
3792
4196
 
3793
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/finance.js
4197
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/finance.js
3794
4198
  var INVOICE_DIRECTIONS = ["receivable", "payable"];
3795
4199
  var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
3796
4200
  var MONEY_DIRECTIONS = ["in", "out"];
@@ -3819,7 +4223,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
3819
4223
  var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
3820
4224
  var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
3821
4225
 
3822
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/orders.js
4226
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/orders.js
3823
4227
  var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
3824
4228
  var ORDER_PURPOSES = ["personal", "business", "client", "other"];
3825
4229
  var orderLine = /* @__PURE__ */ __name((order) => {
@@ -3830,7 +4234,7 @@ var orderLine = /* @__PURE__ */ __name((order) => {
3830
4234
  }, "orderLine");
3831
4235
  var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
3832
4236
 
3833
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/relations.js
4237
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/relations.js
3834
4238
  var ORGANIZATION_ROLES = [
3835
4239
  "employee",
3836
4240
  "contractor",
@@ -3845,8 +4249,8 @@ var CONTRACT_ROLES = ["customer", "supplier", "signatory", "guarantor"];
3845
4249
  var RELATED_ROLES = ["colleague", "adviser", "investor", "mentor", "family", "friend"];
3846
4250
  var ENGAGEMENT_LEVELS = ["none", "low", "medium", "high"];
3847
4251
  var isEngagement = /* @__PURE__ */ __name((value) => typeof value === "string" && ENGAGEMENT_LEVELS.includes(value), "isEngagement");
3848
- var checkEngagement = /* @__PURE__ */ __name((kind2, from, to, level) => {
3849
- if (kind2 !== "member-of" || from !== "person" || to !== "project")
4252
+ var checkEngagement = /* @__PURE__ */ __name((kind3, from, to, level) => {
4253
+ if (kind3 !== "member-of" || from !== "person" || to !== "project")
3850
4254
  throw new CliError("validation_error", "an engagement level is set only on a person's member-of a project", {
3851
4255
  reason: "relationship.engagement-ends"
3852
4256
  });
@@ -3875,26 +4279,26 @@ var RELATIONS = {
3875
4279
  }
3876
4280
  };
3877
4281
  var RELATION_KINDS = Object.keys(RELATIONS);
3878
- var specOf = /* @__PURE__ */ __name((kind2) => Object.hasOwn(RELATIONS, kind2) ? RELATIONS[kind2] : void 0, "specOf");
3879
- var isRelationKind = /* @__PURE__ */ __name((kind2) => specOf(kind2) !== void 0, "isRelationKind");
4282
+ var specOf = /* @__PURE__ */ __name((kind3) => Object.hasOwn(RELATIONS, kind3) ? RELATIONS[kind3] : void 0, "specOf");
4283
+ var isRelationKind = /* @__PURE__ */ __name((kind3) => specOf(kind3) !== void 0, "isRelationKind");
3880
4284
  var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
3881
4285
  var partyOnly = /* @__PURE__ */ __name((from, to) => from === "contract" && to !== "person" && to !== "organization", "partyOnly");
3882
- var checkEnds = /* @__PURE__ */ __name((kind2, from, to) => {
3883
- const spec = specOf(kind2);
4286
+ var checkEnds = /* @__PURE__ */ __name((kind3, from, to) => {
4287
+ const spec = specOf(kind3);
3884
4288
  if (!spec)
3885
4289
  throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
3886
- if (memberOnly(from) && (kind2 !== "member-of" || to !== "project"))
4290
+ if (memberOnly(from) && (kind3 !== "member-of" || to !== "project"))
3887
4291
  throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
3888
4292
  if (partyOnly(from, to))
3889
4293
  throw new CliError("validation_error", "a contract is related only to a person or an organization");
3890
4294
  if (!spec.from.includes(from) || !spec.to.includes(to))
3891
- throw new CliError("validation_error", `${kind2} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
4295
+ throw new CliError("validation_error", `${kind3} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
3892
4296
  return spec;
3893
4297
  }, "checkEnds");
3894
4298
  var isParty = /* @__PURE__ */ __name((type) => type === "person" || type === "organization", "isParty");
3895
- var rolesOf = /* @__PURE__ */ __name((kind2, from, to) => {
3896
- const spec = specOf(kind2);
3897
- if (kind2 === "member-of" && from !== "person")
4299
+ var rolesOf = /* @__PURE__ */ __name((kind3, from, to) => {
4300
+ const spec = specOf(kind3);
4301
+ if (kind3 === "member-of" && from !== "person")
3898
4302
  return void 0;
3899
4303
  return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
3900
4304
  }, "rolesOf");
@@ -3905,22 +4309,22 @@ var ROLE_LISTS = {
3905
4309
  contract: CONTRACT_ROLES,
3906
4310
  related: RELATED_ROLES
3907
4311
  };
3908
- var roleListOf = /* @__PURE__ */ __name((kind2, from, to) => {
3909
- if (kind2 === "related-to" && isParty(from) && isParty(to))
4312
+ var roleListOf = /* @__PURE__ */ __name((kind3, from, to) => {
4313
+ if (kind3 === "related-to" && isParty(from) && isParty(to))
3910
4314
  return "related";
3911
- const roles = rolesOf(kind2, from, to);
4315
+ const roles = rolesOf(kind3, from, to);
3912
4316
  return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
3913
4317
  }, "roleListOf");
3914
- var checkRole = /* @__PURE__ */ __name((kind2, from, to, role, extra = []) => {
3915
- const roles = rolesOf(kind2, from, to)?.concat(extra);
4318
+ var checkRole = /* @__PURE__ */ __name((kind3, from, to, role, extra = []) => {
4319
+ const roles = rolesOf(kind3, from, to)?.concat(extra);
3916
4320
  if (roles && !roles.includes(role))
3917
- throw new CliError("validation_error", `a ${from}'s role on ${kind2} ${to} is one of ${roles.join(", ")}`, {
4321
+ throw new CliError("validation_error", `a ${from}'s role on ${kind3} ${to} is one of ${roles.join(", ")}`, {
3918
4322
  reason: "relationship.role-unknown"
3919
4323
  });
3920
4324
  return role;
3921
4325
  }, "checkRole");
3922
- var isSymmetric = /* @__PURE__ */ __name((kind2) => specOf(kind2)?.symmetric === true, "isSymmetric");
3923
- var inverseOf = /* @__PURE__ */ __name((kind2) => specOf(kind2)?.symmetric ? kind2 : specOf(kind2)?.inverse ?? null, "inverseOf");
4326
+ var isSymmetric = /* @__PURE__ */ __name((kind3) => specOf(kind3)?.symmetric === true, "isSymmetric");
4327
+ var inverseOf = /* @__PURE__ */ __name((kind3) => specOf(kind3)?.symmetric ? kind3 : specOf(kind3)?.inverse ?? null, "inverseOf");
3924
4328
  var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
3925
4329
  var standingOf = /* @__PURE__ */ __name((link, now) => {
3926
4330
  if (link.endsAt != null && link.endsAt <= now)
@@ -3937,7 +4341,7 @@ var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'p
3937
4341
  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");
3938
4342
  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");
3939
4343
 
3940
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/crm.js
4344
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/crm.js
3941
4345
  var CRM_KINDS = ["organization", "person", "deal", "lead"];
3942
4346
  var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
3943
4347
  var isCrmUserId = /* @__PURE__ */ __name((id3) => /^\d{1,20}$/.test(id3), "isCrmUserId");
@@ -3945,9 +4349,9 @@ var normalCrmUserId = /* @__PURE__ */ __name((id3) => {
3945
4349
  const text5 = id3.trim();
3946
4350
  return /^\d+$/.test(text5) ? text5.replace(/^0+(?=\d)/, "") : text5;
3947
4351
  }, "normalCrmUserId");
3948
- var isItemKind = /* @__PURE__ */ __name((kind2) => kind2 === "deal" || kind2 === "lead", "isItemKind");
4352
+ var isItemKind = /* @__PURE__ */ __name((kind3) => kind3 === "deal" || kind3 === "lead", "isItemKind");
3949
4353
 
3950
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/tags.js
4354
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/tags.js
3951
4355
  var TAG_TYPES = ["chat", "contact", "message", "task"];
3952
4356
  var TAG = /^[a-z0-9-]{1,32}$/;
3953
4357
  var tagOf = /* @__PURE__ */ __name((value) => {
@@ -3961,7 +4365,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
3961
4365
  return tag;
3962
4366
  }, "normalizeTag");
3963
4367
 
3964
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/domain/business.js
4368
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/business.js
3965
4369
  var CATALOG_KINDS = ["product", "service"];
3966
4370
  var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
3967
4371
  var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
@@ -4013,6 +4417,10 @@ export {
4013
4417
  describeQuery,
4014
4418
  defineQuery,
4015
4419
  QUERY_REASONS,
4420
+ BACKENDS,
4421
+ serviceCallsOf,
4422
+ rangeOf,
4423
+ windowOf,
4016
4424
  formatMeetingReference,
4017
4425
  parseMeetingReference,
4018
4426
  canonicalMeetingReference,
@@ -4037,10 +4445,9 @@ export {
4037
4445
  MeetingError,
4038
4446
  listed,
4039
4447
  meetingPeople,
4040
- meetingsList,
4041
4448
  meetingsQuery,
4042
4449
  MEETING_QUERY_GUIDE,
4043
- meetingDetailsAnswer,
4450
+ meetingDetailsBody,
4044
4451
  meetingTranscriptAnswer,
4045
4452
  meetingSummaryAnswer,
4046
4453
  exportMeeting,
@@ -4088,6 +4495,8 @@ export {
4088
4495
  meetingPassage,
4089
4496
  event,
4090
4497
  eventItem,
4498
+ meetingsListThrough,
4499
+ meetingShowThrough,
4091
4500
  strongRecordingValidator,
4092
4501
  validateMeetingRelatedHistory,
4093
4502
  MEETING_RESULT_ENTITIES,