@wirecat/mail-cli 0.12.0 → 0.13.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 (110) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/bin/mail.js +6 -2
  3. package/dist/bundle/{all-profiles-OJPRIFKU.js → all-profiles-EEOMFTKE.js} +9 -9
  4. package/dist/bundle/{anthropic-3AXHD4WH.js → anthropic-FPSVNB3F.js} +6 -6
  5. package/dist/bundle/{app-server-V4KHCUGE.js → app-server-3T6UVR7B.js} +47 -45
  6. package/dist/bundle/{bun-ISYNUTQJ.js → bun-MSNAKMDK.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-FH3D4AXL.js → bun-sqlite-GIBBI5DV.js} +5 -5
  8. package/dist/bundle/{chunk-TTKNBUMT.js → chunk-2Y3RKROM.js} +13 -3
  9. package/dist/bundle/{chunk-UDJIC6YL.js → chunk-3BC2XSNX.js} +33 -28
  10. package/dist/bundle/{chunk-OHC4GVWV.js → chunk-3CBK26T2.js} +2 -2
  11. package/dist/bundle/{chunk-QB54TE52.js → chunk-3QEYHTCQ.js} +1 -1
  12. package/dist/bundle/{chunk-T3AGR4TI.js → chunk-5XTJUQZ5.js} +667 -160
  13. package/dist/bundle/{chunk-IG2WXKIT.js → chunk-6KDFUPBT.js} +8 -8
  14. package/dist/bundle/{chunk-GUFWLTOW.js → chunk-6O6CM2ML.js} +2 -2
  15. package/dist/bundle/{chunk-MDIRW3AT.js → chunk-72CGQMAZ.js} +2 -2
  16. package/dist/bundle/{chunk-FYMQPAE5.js → chunk-7CSK47S2.js} +4 -4
  17. package/dist/bundle/{chunk-IWHXM2S7.js → chunk-7D7AKYQ2.js} +625 -298
  18. package/dist/bundle/{chunk-XTIQFMZH.js → chunk-7FCPLSSM.js} +4 -4
  19. package/dist/bundle/{chunk-V6K2GX2Y.js → chunk-7L26RKOS.js} +17 -17
  20. package/dist/bundle/{chunk-G2WDY5XB.js → chunk-AXWTELO4.js} +2 -2
  21. package/dist/bundle/{chunk-N6P55LDU.js → chunk-BZBNBPCR.js} +10 -10
  22. package/dist/bundle/{chunk-4DPICEPQ.js → chunk-CCHHEMPM.js} +2 -2
  23. package/dist/bundle/{chunk-F3QDSQ7V.js → chunk-CJPEL2N5.js} +27 -26
  24. package/dist/bundle/{chunk-AO32MFDY.js → chunk-CSJYZEFR.js} +2 -2
  25. package/dist/bundle/{chunk-6UT3MXOB.js → chunk-EFA7FRFJ.js} +3 -3
  26. package/dist/bundle/{chunk-JIIEJLAX.js → chunk-EW3XTUPB.js} +4 -4
  27. package/dist/bundle/{chunk-SW5NVASW.js → chunk-FVZST7ZH.js} +9 -9
  28. package/dist/bundle/{chunk-X37KLD23.js → chunk-GIZILLRJ.js} +12 -12
  29. package/dist/bundle/{chunk-GFCNSU3B.js → chunk-GQGJV53E.js} +176 -47
  30. package/dist/bundle/{chunk-KJP2B65C.js → chunk-H3XWM2VA.js} +29 -28
  31. package/dist/bundle/{chunk-VEXXVLBM.js → chunk-H5XCD6OG.js} +3 -3
  32. package/dist/bundle/{chunk-L3PVAY3M.js → chunk-H6Y2A4JA.js} +2 -2
  33. package/dist/bundle/{chunk-K2F7YMMM.js → chunk-HANGU5HI.js} +8 -13
  34. package/dist/bundle/{chunk-HVVLSCFB.js → chunk-IGSHWMWC.js} +1 -1
  35. package/dist/bundle/{chunk-JNUKTAMZ.js → chunk-ILHTNOIV.js} +1 -1
  36. package/dist/bundle/{chunk-6LNRNQHJ.js → chunk-JBLZ5XQG.js} +6 -4
  37. package/dist/bundle/{chunk-IXYKM7OJ.js → chunk-JYZCISN7.js} +13 -13
  38. package/dist/bundle/{chunk-44LVUMS2.js → chunk-LO66SLGD.js} +1 -1
  39. package/dist/bundle/{chunk-NSDOYHIS.js → chunk-M7JREJFC.js} +8 -8
  40. package/dist/bundle/{chunk-2TTCKOQ7.js → chunk-MBWVZINS.js} +2 -2
  41. package/dist/bundle/{chunk-LXHLQ6RK.js → chunk-NHVOJHHD.js} +7 -9
  42. package/dist/bundle/{chunk-QPQSMJBW.js → chunk-OHDDGTCH.js} +10 -10
  43. package/dist/bundle/{chunk-GYNHU56E.js → chunk-OHFSAYZG.js} +4 -4
  44. package/dist/bundle/{chunk-TZGQPTZ2.js → chunk-PQLBPYJR.js} +1 -1
  45. package/dist/bundle/{chunk-PLPSFJO6.js → chunk-SOCALLW5.js} +6 -6
  46. package/dist/bundle/{chunk-LIQ5LICB.js → chunk-TBG3FRS6.js} +3 -3
  47. package/dist/bundle/{chunk-AJ4JS2ZR.js → chunk-UFWCJUGA.js} +8 -7
  48. package/dist/bundle/{chunk-4D52FA34.js → chunk-UGXTDYUY.js} +1 -1
  49. package/dist/bundle/{chunk-YDUES6ET.js → chunk-URC4ATBD.js} +4 -4
  50. package/dist/bundle/{chunk-SYBMOE6F.js → chunk-UUBAWUUI.js} +5526 -4503
  51. package/dist/bundle/chunk-V25TCQ3Z.js +34 -0
  52. package/dist/bundle/{chunk-PSXAC6OO.js → chunk-VD5UJUNR.js} +1 -1
  53. package/dist/bundle/{chunk-KVN4RY7E.js → chunk-VMLGER4M.js} +311 -139
  54. package/dist/bundle/{chunk-6QNPJSRM.js → chunk-VNBQHV5H.js} +6 -6
  55. package/dist/bundle/{chunk-YRZ23RCS.js → chunk-VNXCWZDW.js} +7 -7
  56. package/dist/bundle/{chunk-DN54W657.js → chunk-VSHQITKC.js} +4 -4
  57. package/dist/bundle/{chunk-4GPPRLIG.js → chunk-WBI7J5B7.js} +5 -5
  58. package/dist/bundle/{chunk-NBQQ2ZTF.js → chunk-XLCFCOT4.js} +14 -14
  59. package/dist/bundle/{chunk-WL7CYT7O.js → chunk-XPBRNJ2V.js} +1 -1
  60. package/dist/bundle/{chunk-S64N24ON.js → chunk-XV66LQXV.js} +3 -3
  61. package/dist/bundle/{chunk-JAWJZTFL.js → chunk-Y2O3DACO.js} +18 -18
  62. package/dist/bundle/{chunk-BYQ3Z6UL.js → chunk-YHSXNUFQ.js} +3 -3
  63. package/dist/bundle/{chunk-GAIVTJ3E.js → chunk-YMNF4QLY.js} +24 -23
  64. package/dist/bundle/{chunk-35Y3INBK.js → chunk-ZSS22YHM.js} +2 -2
  65. package/dist/bundle/{chunk-5TACUBRJ.js → chunk-ZXLJ5EKZ.js} +8 -8
  66. package/dist/bundle/command-contract-6QSZ5QHQ.js +33 -0
  67. package/dist/bundle/{decode-FM4C2WWG.js → decode-YRTMNHC6.js} +5 -5
  68. package/dist/bundle/{dispatch-K3HG4RYT.js → dispatch-BCS2RDF4.js} +8 -8
  69. package/dist/bundle/{dist-7LNVI7VB.js → dist-NOBSXRL2.js} +13 -13
  70. package/dist/bundle/{echarts-5C2A72XM.js → echarts-5UKZVIF6.js} +2 -2
  71. package/dist/bundle/{embed-N56P6YVY.js → embed-G62XY6BJ.js} +6 -6
  72. package/dist/bundle/{embedder-QLYKFLOL.js → embedder-SCHGLA74.js} +9 -9
  73. package/dist/bundle/{failure-5ZLVZTRU.js → failure-N5S6ZS62.js} +2 -2
  74. package/dist/bundle/{first-run-VMF4PJ7Q.js → first-run-DPF2BBQN.js} +11 -11
  75. package/dist/bundle/first-screen-4MRKF6RQ.js +31 -0
  76. package/dist/bundle/{instructions-QA5FHDOJ.js → instructions-7RP5OKLE.js} +1 -1
  77. package/dist/bundle/mail.js +12 -12
  78. package/dist/bundle/{mcp-LO2XDBBC.js → mcp-MNI62HHE.js} +2 -2
  79. package/dist/bundle/{node-OXJZWUYZ.js → node-ENCKD6SS.js} +2 -2
  80. package/dist/bundle/{node-sqlite-7GCEI67B.js → node-sqlite-4ICXMPYY.js} +11 -5
  81. package/dist/bundle/{oauth-VTPIYBTP.js → oauth-CX2WYMGN.js} +7 -7
  82. package/dist/bundle/{open-7XX3YF2X.js → open-HQZYHMVE.js} +5 -4
  83. package/dist/bundle/{openai-D3KRCXSY.js → openai-3ONJIA3F.js} +14 -14
  84. package/dist/bundle/{process-KFI7SXQD.js → process-OK3HRPMD.js} +1 -1
  85. package/dist/bundle/{program-4B25STRN.js → program-FLKUE6LL.js} +2125 -866
  86. package/dist/bundle/{prompt-TBZT3APW.js → prompt-ZWKUQ42Y.js} +5 -5
  87. package/dist/bundle/{recognize-WQSE5ZPL.js → recognize-PHDYO6DC.js} +4 -4
  88. package/dist/bundle/{remote-J5HHRNVQ.js → remote-4CX7GFMU.js} +7 -7
  89. package/dist/bundle/{rerank-DP2Y3WDT.js → rerank-ZCZTGXDQ.js} +7 -7
  90. package/dist/bundle/{serve-VXPOQDQO.js → serve-3LBS7CPR.js} +11 -10
  91. package/dist/bundle/{server-OSBNGA2F.js → server-2BKI2OQP.js} +38 -37
  92. package/dist/bundle/server-X5F7VD2E.js +63 -0
  93. package/dist/bundle/{sqlite-runtime-XY32WOIT.js → sqlite-runtime-J5T7SR5W.js} +6 -5
  94. package/dist/bundle/{state-KPOPMR6O.js → state-TIRNYVEL.js} +6 -6
  95. package/dist/bundle/{store-FWRGNGP3.js → store-F7ZXMIAP.js} +29 -18
  96. package/dist/bundle/{store-UBI2YCRC.js → store-NGE2E7KZ.js} +16 -13
  97. package/dist/bundle/store-maintenance-command-QZV76KAH.js +53 -0
  98. package/dist/commands/session.js +1 -1
  99. package/dist/commands/session.js.map +1 -1
  100. package/dist/commands/status.d.ts.map +1 -1
  101. package/dist/commands/status.js +12 -7
  102. package/dist/commands/status.js.map +1 -1
  103. package/dist/version.d.ts +1 -1
  104. package/dist/version.js +1 -1
  105. package/package.json +3 -3
  106. package/dist/bundle/command-contract-TW44FY47.js +0 -33
  107. package/dist/bundle/first-screen-ZN7ODW5K.js +0 -31
  108. package/dist/bundle/server-XHWSCXVX.js +0 -62
  109. package/dist/bundle/store-maintenance-command-3ZXPEIGF.js +0 -52
  110. /package/dist/bundle/{chunk-MRLSUCHT.js → chunk-NUN6OGOV.js} +0 -0
@@ -30,18 +30,18 @@ import {
30
30
  string,
31
31
  union,
32
32
  variant
33
- } from "./chunk-NSDOYHIS.js";
33
+ } from "./chunk-M7JREJFC.js";
34
34
  import {
35
35
  CliError,
36
36
  isCliError,
37
37
  singleLine,
38
38
  visibleControls
39
- } from "./chunk-4DPICEPQ.js";
39
+ } from "./chunk-CCHHEMPM.js";
40
40
  import {
41
41
  __name
42
42
  } from "./chunk-ZVVMGPBJ.js";
43
43
 
44
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/reference.js
44
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/reference.js
45
45
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
46
46
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
47
47
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -78,7 +78,86 @@ var parseMeetingReference = /* @__PURE__ */ __name((text6) => {
78
78
  }, "parseMeetingReference");
79
79
  var canonicalMeetingReference = /* @__PURE__ */ __name((text6) => formatMeetingReference(parseMeetingReference(text6)), "canonicalMeetingReference");
80
80
 
81
- // node_modules/.pnpm/@wirecat+cli-base@0.74.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
81
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/payment.js
82
+ var FACT_TYPES = ["fact", "statement", "question", "decision", "promise", "payment"];
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 due date is an ISO date, 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 = ["amount", "currency", "direction", "counterparty", "counterparty_name", "due_at", "state", "item"];
119
+ var validatePayment = /* @__PURE__ */ __name((input) => {
120
+ if (!input || typeof input !== "object" || Array.isArray(input))
121
+ return invalid2("a payment is an object");
122
+ const raw = input;
123
+ const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
124
+ if (unknown.length)
125
+ return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
126
+ const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
127
+ if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
128
+ return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
129
+ const counterparty = optionalText(raw.counterparty, "counterparty", 80);
130
+ if (counterparty !== null && !COUNTERPARTY.test(counterparty))
131
+ return invalid2("a payment's counterparty is a person:, organization: or project: reference");
132
+ return {
133
+ amount: amountOf(raw.amount),
134
+ currency,
135
+ direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
136
+ counterparty,
137
+ counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
138
+ due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
139
+ state: oneOf(raw.state, PAYMENT_STATES, "state"),
140
+ item: optionalText(raw.item, "item", 200)
141
+ };
142
+ }, "validatePayment");
143
+ var grouped = /* @__PURE__ */ __name((amount) => {
144
+ const [whole = "0", cents = "00"] = amount.split(".");
145
+ const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
146
+ return cents === "00" ? digits : `${digits}.${cents}`;
147
+ }, "grouped");
148
+ var paymentTitle = /* @__PURE__ */ __name((fact) => {
149
+ const payment = fact.payment;
150
+ if (!payment)
151
+ return "";
152
+ const who = payment.counterparty_name ?? payment.counterparty;
153
+ const way = payment.direction === "to_us" ? "to us" : "from us";
154
+ const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
155
+ const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
156
+ const item = payment.item === null ? "" : ` for ${payment.item}`;
157
+ return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
158
+ }, "paymentTitle");
159
+
160
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.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
82
161
  var QUERY_LIMITS = {
83
162
  bytes: 8192,
84
163
  depth: 32,
@@ -122,7 +201,7 @@ function queryError(reason, span, alternative, context3 = {}, details = {}) {
122
201
  __name(queryError, "queryError");
123
202
  var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
124
203
 
125
- // node_modules/.pnpm/@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
204
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
126
205
  var timezoneOf = /* @__PURE__ */ __name((given) => {
127
206
  const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
128
207
  try {
@@ -267,7 +346,7 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
267
346
  };
268
347
  }, "dateRange");
269
348
 
270
- // node_modules/.pnpm/@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
349
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
271
350
  var wordsOf = /* @__PURE__ */ __name((text6) => text6.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
272
351
  var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
273
352
  var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
@@ -322,7 +401,7 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
322
401
  }, "matches");
323
402
  var evaluate = /* @__PURE__ */ __name((ast, fields2, item, options = {}) => matches(ast.root, item, new Map(fields2.map((field) => [field.name, field])), options), "evaluate");
324
403
 
325
- // node_modules/.pnpm/@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
404
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
326
405
  var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
327
406
  var OPERATORS_BY_TYPE = {
328
407
  kw: ["term", "phrase", "wildcard"],
@@ -401,10 +480,22 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
401
480
  return [...own, ...relations, ...states];
402
481
  }, "queryFieldsOf");
403
482
 
404
- // node_modules/.pnpm/@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
483
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
405
484
  var QUERY_SYNTAX = 'field:value \xB7 "a phrase" \xB7 word* \xB7 AND OR NOT \xB7 ( ) \xB7 [a TO b] \xB7 > >= < <=';
406
485
  var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
407
486
  var leftOut = /* @__PURE__ */ __name((fields2) => fields2.filter((field) => field.negatable).map((field) => field.name), "leftOut");
487
+ var has = /* @__PURE__ */ __name((fields2, operator) => fields2.some((field) => field.operators.includes(operator)), "has");
488
+ var syntaxOf = /* @__PURE__ */ __name((shown, backend) => {
489
+ if (backend !== "native")
490
+ return QUERY_SYNTAX;
491
+ return [
492
+ "field:value",
493
+ ...has(shown, "phrase") ? ['"a phrase"'] : [],
494
+ ...has(shown, "wildcard") ? ["word*"] : [],
495
+ "terms joined by AND",
496
+ ...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
497
+ ].join(" \xB7 ");
498
+ }, "syntaxOf");
408
499
  var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
409
500
  var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
410
501
  const shown = shownOf(registry);
@@ -416,7 +507,7 @@ var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
416
507
  ...rows.map(([name = "", kind = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
417
508
  ...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
418
509
  ...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
419
- `Syntax: ${QUERY_SYNTAX}`,
510
+ `Syntax: ${syntaxOf(shown, registry.backend)}`,
420
511
  ...guide ? [`Guide: ${guide}`] : []
421
512
  ].join("\n");
422
513
  }, "fieldsHelp");
@@ -431,7 +522,7 @@ var queryDescription = /* @__PURE__ */ __name((registry) => {
431
522
  return `${terms}; fields: ${fields2.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
432
523
  }, "queryDescription");
433
524
 
434
- // node_modules/.pnpm/@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
525
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
435
526
  var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
436
527
  var reserved = /* @__PURE__ */ new Set([
437
528
  "+",
@@ -736,7 +827,7 @@ var implicitTextTerms = /* @__PURE__ */ __name((text6) => {
736
827
  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] : []));
737
828
  }, "implicitTextTerms");
738
829
 
739
- // node_modules/.pnpm/@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
830
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
740
831
  var inContext = /* @__PURE__ */ __name((context3, run2) => {
741
832
  try {
742
833
  run2();
@@ -811,7 +902,7 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
811
902
  }, "validateQuery");
812
903
  var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
813
904
 
814
- // node_modules/.pnpm/@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
905
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
815
906
  var describeQuery = /* @__PURE__ */ __name((registry) => ({
816
907
  entity: registry.entity,
817
908
  backend: registry.backend,
@@ -882,7 +973,7 @@ var QUERY_REASONS = defineReasons([
882
973
  details: [...SPAN, ...details]
883
974
  })));
884
975
 
885
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/item.js
976
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/item.js
886
977
  var text = string();
887
978
  var count = pipe(number(), integer(), minValue(0));
888
979
  var MEETING_ISSUES = ["time_without_zone"];
@@ -947,7 +1038,7 @@ var MEETING_QUERY = {
947
1038
  })
948
1039
  };
949
1040
 
950
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/answers.js
1041
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/answers.js
951
1042
  var text2 = string();
952
1043
  var count2 = pipe(number(), integer(), minValue(0));
953
1044
  var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
@@ -961,6 +1052,11 @@ var meetingHit = strictObject({
961
1052
  excerpt: text2,
962
1053
  /** How far into the meeting the passage is. */
963
1054
  offset_ms: nullable(count2),
1055
+ /** A transcript passage's transcript language (`ru`, `en`…), `null` when unknown. */
1056
+ language: optional(nullable(text2)),
1057
+ /** A transcript passage's line, from 1, of `lines_total`. */
1058
+ line: optional(pipe(count2, minValue(1))),
1059
+ lines_total: optional(count2),
964
1060
  /** `corrected`: a query word matched only a garbled form of itself, listed in `corrections`. */
965
1061
  match: optional(picklist(["words", "corrected"])),
966
1062
  corrections: optional(array(strictObject({ from: text2, to: array(text2) }))),
@@ -1127,6 +1223,9 @@ var meetingHitItem = /* @__PURE__ */ __name((hit) => ({
1127
1223
  id: String(hit.id),
1128
1224
  excerpt: hit.text,
1129
1225
  offset_ms: hit.startMs,
1226
+ ...hit.language === void 0 ? {} : { language: hit.language },
1227
+ ...hit.line === void 0 ? {} : { line: hit.line },
1228
+ ...hit.linesTotal === void 0 ? {} : { lines_total: hit.linesTotal },
1130
1229
  untrusted: hit.source === void 0 ? ["excerpt"] : ["excerpt", "source.title"],
1131
1230
  ...hit.match === void 0 ? {} : { match: hit.match },
1132
1231
  ...hit.corrections === void 0 ? {} : { corrections: hit.corrections },
@@ -1174,7 +1273,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
1174
1273
  };
1175
1274
  }, "meetingHitsList");
1176
1275
 
1177
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
1276
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
1178
1277
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
1179
1278
  const parsed = urlOf(url);
1180
1279
  if (!parsed)
@@ -1208,7 +1307,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
1208
1307
  }
1209
1308
  }, "urlOf");
1210
1309
 
1211
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
1310
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
1212
1311
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
1213
1312
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
1214
1313
  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");
@@ -1241,7 +1340,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
1241
1340
  return kept;
1242
1341
  }, "entryMetadata");
1243
1342
 
1244
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1343
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1245
1344
  import { createHash } from "node:crypto";
1246
1345
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
1247
1346
  reference: cue2.reference,
@@ -1255,7 +1354,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
1255
1354
  text: cue2.text
1256
1355
  })).digest("hex"), "meetingCueFingerprint");
1257
1356
 
1258
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1357
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1259
1358
  var EVENT_QUERY = defineQuery({
1260
1359
  entity: "event",
1261
1360
  backend: "sql",
@@ -1271,7 +1370,7 @@ var EVENT_QUERY = defineQuery({
1271
1370
  ]
1272
1371
  });
1273
1372
 
1274
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1373
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1275
1374
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
1276
1375
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
1277
1376
  if (entry.recurrenceEndsAt !== null)
@@ -1294,7 +1393,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
1294
1393
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
1295
1394
  }, "entryInWindow");
1296
1395
 
1297
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/events.js
1396
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/events.js
1298
1397
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
1299
1398
  const current = await store.meeting(details.meeting.id);
1300
1399
  if (!current)
@@ -1337,7 +1436,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
1337
1436
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
1338
1437
  }, "linkEvent");
1339
1438
 
1340
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1439
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1341
1440
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text6) => text6.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
1342
1441
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
1343
1442
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -1361,7 +1460,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
1361
1460
  };
1362
1461
  }, "validateMeetingParticipantSearch");
1363
1462
 
1364
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1463
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1365
1464
  var MeetingError = class extends CliError {
1366
1465
  static {
1367
1466
  __name(this, "MeetingError");
@@ -1493,7 +1592,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id3, accountId)
1493
1592
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
1494
1593
  }, "meetingSummaryAnswer");
1495
1594
 
1496
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/export.js
1595
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/export.js
1497
1596
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
1498
1597
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
1499
1598
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -1589,10 +1688,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
1589
1688
  };
1590
1689
  }, "exportMeeting");
1591
1690
 
1592
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1691
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1593
1692
  import { createHash as createHash2 } from "node:crypto";
1594
1693
 
1595
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
1694
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
1596
1695
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1597
1696
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
1598
1697
  throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone`);
@@ -1603,115 +1702,61 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1603
1702
  return new Date(value).toISOString();
1604
1703
  }, "meetingTimestamp");
1605
1704
 
1606
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
1607
- var nonempty = /* @__PURE__ */ __name((value, name) => {
1608
- if (typeof value !== "string" || !value.trim())
1609
- throw new CliError("validation_error", `${name} must be nonempty`);
1610
- return value;
1611
- }, "nonempty");
1612
- var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
1613
- if (!change || typeof change !== "object" || Array.isArray(change) || Object.keys(change).some((key) => !["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].includes(key)))
1614
- throw new CliError("validation_error", "unsupported meeting change field");
1615
- const result = {};
1616
- if (change.title !== void 0)
1617
- result.title = nonempty(change.title, "meeting title");
1618
- if (create && result.title === void 0)
1619
- throw new CliError("validation_error", "meeting title is required");
1620
- if (change.kind !== void 0) {
1621
- if (change.kind !== "instant" && change.kind !== "scheduled")
1622
- throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
1623
- result.kind = change.kind;
1624
- }
1625
- if (change.startTime !== void 0) {
1626
- result.startTime = meetingTimestamp(change.startTime, "meeting start");
1627
- }
1628
- if (change.durationMinutes !== void 0) {
1629
- if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
1630
- throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
1631
- result.durationMinutes = change.durationMinutes;
1632
- }
1633
- if (change.timezone !== void 0) {
1634
- if (typeof change.timezone !== "string" || !change.timezone.trim())
1635
- throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
1636
- try {
1637
- new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
1638
- } catch {
1639
- throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
1640
- }
1641
- result.timezone = change.timezone;
1642
- }
1643
- if (change.agenda !== void 0) {
1644
- if (typeof change.agenda !== "string")
1645
- throw new CliError("validation_error", "meeting agenda must be text");
1646
- result.agenda = change.agenda;
1647
- }
1648
- if (create) {
1649
- result.kind ??= "scheduled";
1650
- if (result.kind === "scheduled" && result.startTime === void 0)
1651
- throw new CliError("validation_error", "scheduled meeting start is required");
1652
- } else if (!Object.keys(result).length)
1653
- throw new CliError("validation_error", "at least one meeting change is required");
1654
- return Object.freeze(result);
1655
- }, "validateMeetingChange");
1656
-
1657
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
1658
- var MEETING_FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
1659
-
1660
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1705
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1661
1706
  var TASK_TYPES = ["bug", "feature", "chore"];
1662
- var invalid2 = /* @__PURE__ */ __name((message) => {
1707
+ var invalid3 = /* @__PURE__ */ __name((message) => {
1663
1708
  throw new CliError("validation_error", message);
1664
1709
  }, "invalid");
1665
1710
  var text3 = /* @__PURE__ */ __name((value, limit) => {
1666
1711
  if (typeof value !== "string" || !value.trim() || value.includes("\0") || value.length > limit)
1667
- return invalid2(`finding text must contain 1\u2013${limit} characters without NUL`);
1712
+ return invalid3(`finding text must contain 1\u2013${limit} characters without NUL`);
1668
1713
  return value.trim();
1669
1714
  }, "text");
1670
1715
  var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update(JSON.stringify(value)).digest("hex"), "findingHash");
1671
1716
  var fields = /* @__PURE__ */ __name((value, allowed, noun) => {
1672
1717
  if (Object.keys(value).some((key) => !allowed.includes(key)))
1673
- invalid2(`unknown ${noun} field`);
1718
+ invalid3(`unknown ${noun} field`);
1674
1719
  }, "fields");
1675
1720
  var SUBJECT = /^(person|organization|project):[1-9]\d*$|^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/;
1676
1721
  var validateFindings = /* @__PURE__ */ __name((input, rules) => {
1677
1722
  if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
1678
- return invalid2(`${rules.plural} take at most 65536 UTF-8 bytes`);
1723
+ return invalid3(`${rules.plural} take at most 65536 UTF-8 bytes`);
1679
1724
  fields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
1680
1725
  if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > 16)
1681
- return invalid2(`schemaVersion 1 takes 1\u201316 ${rules.plural}`);
1726
+ return invalid3(`schemaVersion 1 takes 1\u201316 ${rules.plural}`);
1682
1727
  const key = text3(input.key, 64);
1683
1728
  if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
1684
- return invalid2("a findings key uses letters, digits, dot, colon, underscore or hyphen");
1729
+ return invalid3("a findings key uses letters, digits, dot, colon, underscore or hyphen");
1685
1730
  const ids2 = /* @__PURE__ */ new Set();
1686
1731
  const findings = input.findings.map((finding) => {
1687
1732
  if (!finding || typeof finding !== "object")
1688
- return invalid2("a finding is an object");
1733
+ return invalid3("a finding is an object");
1689
1734
  const id3 = text3(finding.id, 64);
1690
1735
  if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id3) || ids2.has(id3))
1691
- return invalid2("finding IDs must be unique simple keys");
1736
+ return invalid3("finding IDs must be unique simple keys");
1692
1737
  ids2.add(id3);
1693
1738
  const project = finding.project === void 0 && rules.anySubject ? void 0 : text3(finding.project, 64);
1694
1739
  if (project !== void 0 && !/^project:[1-9]\d*$/.test(project))
1695
- return invalid2("a finding names a project reference");
1740
+ return invalid3("a finding names a project reference");
1696
1741
  if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(text3(finding.subject, 80))))
1697
- return invalid2("a finding's subject is a person:, organization:, task: or project: reference");
1742
+ return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
1698
1743
  if (finding.kind === "task" && project === void 0)
1699
- return invalid2("a task finding names the project the task goes in");
1744
+ return invalid3("a task finding names the project the task goes in");
1700
1745
  if (!Array.isArray(finding.evidence) || finding.evidence.length < 1 || finding.evidence.length > 8)
1701
- return invalid2(`a finding requires 1\u20138 cited ${rules.cited}s`);
1746
+ return invalid3(`a finding requires 1\u20138 cited ${rules.cited}s`);
1702
1747
  const evidence = finding.evidence.map((item) => {
1703
1748
  if (!item || typeof item !== "object")
1704
- return invalid2("finding evidence is a reference and fingerprint");
1749
+ return invalid3("finding evidence is a reference and fingerprint");
1705
1750
  fields(item, ["reference", "fingerprint"], rules.singular);
1706
1751
  if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
1707
- return invalid2("evidence requires a reference and fingerprint");
1752
+ return invalid3("evidence requires a reference and fingerprint");
1708
1753
  const reference2 = rules.reference(item.reference);
1709
1754
  if (!/^[a-f0-9]{64}$/.test(item.fingerprint))
1710
- return invalid2(`finding evidence requires exact ${rules.cited} references and fingerprints`);
1755
+ return invalid3(`finding evidence requires exact ${rules.cited} references and fingerprints`);
1711
1756
  return { reference: reference2, fingerprint: item.fingerprint };
1712
1757
  }).sort((a, b) => a.reference.localeCompare(b.reference));
1713
1758
  if (new Set(evidence.map((item) => item.reference)).size !== evidence.length)
1714
- return invalid2(`duplicate evidence ${rules.cited}`);
1759
+ return invalid3(`duplicate evidence ${rules.cited}`);
1715
1760
  const base = {
1716
1761
  id: id3,
1717
1762
  ...project === void 0 ? {} : { project },
@@ -1720,12 +1765,26 @@ var validateFindings = /* @__PURE__ */ __name((input, rules) => {
1720
1765
  };
1721
1766
  if (finding.kind === "fact") {
1722
1767
  fields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
1723
- if (!MEETING_FACT_TYPES.includes(finding.type))
1724
- return invalid2("unknown fact finding type");
1768
+ if (finding.type === "payment")
1769
+ return invalid3("a payment is a finding of kind payment");
1770
+ if (!FACT_TYPES.includes(finding.type))
1771
+ return invalid3("unknown fact finding type");
1725
1772
  return { ...base, kind: "fact", type: finding.type, statement: text3(finding.statement, 2e3) };
1726
1773
  }
1774
+ if (finding.kind === "payment" && rules.payments) {
1775
+ fields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
1776
+ if (finding.supersedes !== void 0 && !/^fact:[1-9]\d*$/.test(String(finding.supersedes)))
1777
+ return invalid3("a payment finding supersedes a fact: reference");
1778
+ return {
1779
+ ...base,
1780
+ kind: "payment",
1781
+ ...finding.statement === void 0 ? {} : { statement: text3(finding.statement, 2e3) },
1782
+ payment: validatePayment(finding.payment),
1783
+ ...finding.supersedes === void 0 ? {} : { supersedes: finding.supersedes }
1784
+ };
1785
+ }
1727
1786
  if (finding.kind !== "task")
1728
- return invalid2("a finding is a fact or task");
1787
+ return invalid3(`a finding is a fact${rules.payments ? ", payment" : ""} or task`);
1729
1788
  fields(finding, [
1730
1789
  "id",
1731
1790
  "project",
@@ -1741,18 +1800,18 @@ var validateFindings = /* @__PURE__ */ __name((input, rules) => {
1741
1800
  "assigneeEvidence"
1742
1801
  ], rules.singular);
1743
1802
  if (!TASK_TYPES.includes(finding.type))
1744
- return invalid2("a task finding type is bug, chore or feature");
1803
+ return invalid3("a task finding type is bug, chore or feature");
1745
1804
  if (!["explicit", "inferred"].includes(finding.commitment))
1746
- return invalid2("task commitment must be explicit or inferred");
1805
+ return invalid3("task commitment must be explicit or inferred");
1747
1806
  const support = /* @__PURE__ */ __name((value) => {
1748
1807
  if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
1749
- return invalid2("date and assignee support must cite the finding's evidence");
1808
+ return invalid3("date and assignee support must cite the finding's evidence");
1750
1809
  return [...new Set(value)].sort();
1751
1810
  }, "support");
1752
1811
  if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0) || finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
1753
- return invalid2("optional dates and assignees require their supporting evidence");
1812
+ return invalid3("optional dates and assignees require their supporting evidence");
1754
1813
  if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
1755
- return invalid2("an assignee must be a person reference");
1814
+ return invalid3("an assignee must be a person reference");
1756
1815
  return {
1757
1816
  ...base,
1758
1817
  kind: "task",
@@ -1768,7 +1827,7 @@ var validateFindings = /* @__PURE__ */ __name((input, rules) => {
1768
1827
  }, "validateFindings");
1769
1828
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
1770
1829
 
1771
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1830
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1772
1831
  var MEETING_FINDINGS_KIND = "meeting_findings";
1773
1832
  var cue = /* @__PURE__ */ __name((raw) => {
1774
1833
  const reference2 = canonicalMeetingReference(raw);
@@ -1779,7 +1838,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
1779
1838
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
1780
1839
  var meetingFindingFingerprint = findingFingerprint;
1781
1840
 
1782
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1841
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1783
1842
  var context = {
1784
1843
  command: "search meetings",
1785
1844
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -1842,7 +1901,56 @@ var MEETING_FIELDS = defineQuery({
1842
1901
  });
1843
1902
  var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
1844
1903
 
1845
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
1904
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/language.js
1905
+ var LATIN_WORDS = {
1906
+ en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
1907
+ es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
1908
+ de: ["der", "und", "ist", "nicht", "das", "ich", "wir", "mit", "auch", "ein"],
1909
+ fr: ["le", "les", "est", "une", "pas", "je", "vous", "nous", "avec", "mais"],
1910
+ it: ["gli", "della", "sono", "perch\xE9", "anche", "questo", "molto", "che", "di", "\xE8"],
1911
+ pt: ["n\xE3o", "voc\xEA", "isso", "muito", "ent\xE3o", "com", "uma", "tamb\xE9m", "mas", "eu"]
1912
+ };
1913
+ var LATIN_LANGUAGE = new Map(Object.entries(LATIN_WORDS).flatMap(([language, words2]) => words2.map((word) => [word, language])));
1914
+ var UKRAINIAN = /[іїєґ]/giu;
1915
+ var CYRILLIC = new RegExp("\\p{Script=Cyrillic}", "gu");
1916
+ var LATIN = new RegExp("\\p{Script=Latin}", "gu");
1917
+ var MIN_LETTERS = 20;
1918
+ var DOMINANT = 0.75;
1919
+ var countOf = /* @__PURE__ */ __name((text6, pattern2) => text6.match(pattern2)?.length ?? 0, "countOf");
1920
+ var latinLanguage = /* @__PURE__ */ __name((texts) => {
1921
+ const votes = /* @__PURE__ */ new Map();
1922
+ for (const text6 of texts)
1923
+ for (const word of text6.toLowerCase().split(/[^\p{L}]+/u)) {
1924
+ const language = LATIN_LANGUAGE.get(word);
1925
+ if (language)
1926
+ votes.set(language, (votes.get(language) ?? 0) + 1);
1927
+ }
1928
+ const [first, second] = [...votes].sort((a, b) => b[1] - a[1]);
1929
+ if (!first || first[1] < 3 || second && first[1] < 2 * second[1])
1930
+ return null;
1931
+ return first[0];
1932
+ }, "latinLanguage");
1933
+ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
1934
+ const all = [...texts];
1935
+ let cyrillic = 0;
1936
+ let latin = 0;
1937
+ let ukrainian = 0;
1938
+ for (const text6 of all) {
1939
+ cyrillic += countOf(text6, CYRILLIC);
1940
+ latin += countOf(text6, LATIN);
1941
+ ukrainian += countOf(text6, UKRAINIAN);
1942
+ }
1943
+ const letters = cyrillic + latin;
1944
+ if (letters < MIN_LETTERS)
1945
+ return null;
1946
+ if (cyrillic / letters >= DOMINANT)
1947
+ return ukrainian / cyrillic >= 0.01 ? "uk" : "ru";
1948
+ if (latin / letters >= DOMINANT)
1949
+ return latinLanguage(all);
1950
+ return null;
1951
+ }, "transcriptLanguage");
1952
+
1953
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
1846
1954
  var contentHash = /* @__PURE__ */ __name(async (text6) => {
1847
1955
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
1848
1956
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -1856,7 +1964,7 @@ var speakerPosition = /* @__PURE__ */ __name((name, participants) => {
1856
1964
  var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source, hashText = JSON.stringify(lines), format = null) => ({
1857
1965
  source,
1858
1966
  format,
1859
- language: null,
1967
+ language: transcriptLanguage(lines.map((line2) => line2.text)),
1860
1968
  contentHash: await contentHash(hashText),
1861
1969
  externalCreatedAt: null,
1862
1970
  metadata: null,
@@ -1879,7 +1987,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
1879
1987
  return time;
1880
1988
  }, "timestamp");
1881
1989
 
1882
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
1990
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
1883
1991
  var TranscriptTextError = class extends Error {
1884
1992
  static {
1885
1993
  __name(this, "TranscriptTextError");
@@ -1934,7 +2042,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
1934
2042
  return { header, lines };
1935
2043
  }, "parseTranscriptText");
1936
2044
 
1937
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2045
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
1938
2046
  var VttError = class extends Error {
1939
2047
  static {
1940
2048
  __name(this, "VttError");
@@ -1986,7 +2094,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
1986
2094
  return cues;
1987
2095
  }, "parseVtt");
1988
2096
 
1989
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/import.js
2097
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/import.js
1990
2098
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
1991
2099
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
1992
2100
  for (const file of files) {
@@ -2019,10 +2127,61 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
2019
2127
  return report;
2020
2128
  }, "importFiles");
2021
2129
 
2022
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/links.js
2130
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/links.js
2023
2131
  var CHAT_MESSAGES_READ = 1e5;
2024
2132
 
2025
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/passage.js
2133
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2134
+ var nonempty = /* @__PURE__ */ __name((value, name) => {
2135
+ if (typeof value !== "string" || !value.trim())
2136
+ throw new CliError("validation_error", `${name} must be nonempty`);
2137
+ return value;
2138
+ }, "nonempty");
2139
+ var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
2140
+ if (!change || typeof change !== "object" || Array.isArray(change) || Object.keys(change).some((key) => !["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].includes(key)))
2141
+ throw new CliError("validation_error", "unsupported meeting change field");
2142
+ const result = {};
2143
+ if (change.title !== void 0)
2144
+ result.title = nonempty(change.title, "meeting title");
2145
+ if (create && result.title === void 0)
2146
+ throw new CliError("validation_error", "meeting title is required");
2147
+ if (change.kind !== void 0) {
2148
+ if (change.kind !== "instant" && change.kind !== "scheduled")
2149
+ throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
2150
+ result.kind = change.kind;
2151
+ }
2152
+ if (change.startTime !== void 0) {
2153
+ result.startTime = meetingTimestamp(change.startTime, "meeting start");
2154
+ }
2155
+ if (change.durationMinutes !== void 0) {
2156
+ if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
2157
+ throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
2158
+ result.durationMinutes = change.durationMinutes;
2159
+ }
2160
+ if (change.timezone !== void 0) {
2161
+ if (typeof change.timezone !== "string" || !change.timezone.trim())
2162
+ throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
2163
+ try {
2164
+ new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
2165
+ } catch {
2166
+ throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
2167
+ }
2168
+ result.timezone = change.timezone;
2169
+ }
2170
+ if (change.agenda !== void 0) {
2171
+ if (typeof change.agenda !== "string")
2172
+ throw new CliError("validation_error", "meeting agenda must be text");
2173
+ result.agenda = change.agenda;
2174
+ }
2175
+ if (create) {
2176
+ result.kind ??= "scheduled";
2177
+ if (result.kind === "scheduled" && result.startTime === void 0)
2178
+ throw new CliError("validation_error", "scheduled meeting start is required");
2179
+ } else if (!Object.keys(result).length)
2180
+ throw new CliError("validation_error", "at least one meeting change is required");
2181
+ return Object.freeze(result);
2182
+ }, "validateMeetingChange");
2183
+
2184
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/passage.js
2026
2185
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
2027
2186
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
2028
2187
  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)))
@@ -2035,7 +2194,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
2035
2194
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
2036
2195
  }, "validateMeetingPassage");
2037
2196
 
2038
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2197
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2039
2198
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2040
2199
  if (!original || typeof original !== "object" || Array.isArray(original))
2041
2200
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -2060,7 +2219,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2060
2219
  return { ...input, limit, maxReadBytes };
2061
2220
  }, "validateMeetingPreparationContext");
2062
2221
 
2063
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2222
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2064
2223
  var count3 = pipe(number(), integer(), minValue(0));
2065
2224
  var id = pipe(string(), minLength(1));
2066
2225
  var meetingProjectEvidence = strictObject({
@@ -2181,7 +2340,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
2181
2340
  };
2182
2341
  }, "meetingProjectEvidenceAnswer");
2183
2342
 
2184
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2343
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2185
2344
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2186
2345
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
2187
2346
  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) || [
@@ -2201,7 +2360,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2201
2360
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
2202
2361
  }, "validateMeetingHitSearch");
2203
2362
 
2204
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2363
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2205
2364
  var ids = {
2206
2365
  meeting_id: "meetingId",
2207
2366
  identity_id: "participantIdentityId",
@@ -2292,7 +2451,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
2292
2451
  return { project: project.trim(), options, query: frozen.join(" AND ") };
2293
2452
  }, "prepareMeetingProjectEvidence");
2294
2453
 
2295
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2454
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2296
2455
  var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
2297
2456
  const prepared = prepareMeetingProjectEvidence(project, request, now);
2298
2457
  const page = await read(prepared.project, prepared.options);
@@ -2300,7 +2459,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
2300
2459
  return meetingProjectEvidenceAnswer(page, prepared);
2301
2460
  }, "readMeetingProjectEvidence");
2302
2461
 
2303
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2462
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2304
2463
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
2305
2464
  const { identityExternalId, ...fields2 } = p;
2306
2465
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
@@ -2439,7 +2598,7 @@ unlinked`, format)],
2439
2598
  return report;
2440
2599
  }, "pull");
2441
2600
 
2442
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2601
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2443
2602
  var text4 = string();
2444
2603
  var count4 = pipe(number(), integer(), minValue(0));
2445
2604
  var id2 = pipe(number(), integer(), minValue(1));
@@ -2616,10 +2775,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
2616
2775
  updated_at: new Date(one.updatedAt).toISOString()
2617
2776
  }), "eventItem");
2618
2777
 
2619
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2778
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2620
2779
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
2621
2780
 
2622
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2781
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2623
2782
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2624
2783
  if (!original || typeof original !== "object" || Array.isArray(original))
2625
2784
  throw new CliError("validation_error", "related history request is required");
@@ -2649,7 +2808,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2649
2808
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
2650
2809
  }, "validateMeetingRelatedHistory");
2651
2810
 
2652
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
2811
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
2653
2812
  var text5 = string();
2654
2813
  var identifier = pipe(text5, minLength(1));
2655
2814
  var nullableText = nullable(text5);
@@ -2767,22 +2926,29 @@ var embedding = union([
2767
2926
  })
2768
2927
  })
2769
2928
  ]);
2929
+ var repair = strictObject({
2930
+ account_id: identifier,
2931
+ applied: flag,
2932
+ transcripts: count5,
2933
+ languages: array(strictObject({ language: nullableText, transcripts: count5 }))
2934
+ });
2770
2935
  var MEETING_RESULT_ENTITIES = {
2771
2936
  meeting_ingestion: run,
2772
2937
  meeting_export: exported,
2773
2938
  meeting_association: meetingChange,
2774
2939
  meeting_transcription: transcription,
2775
- meeting_embedding: embedding
2940
+ meeting_embedding: embedding,
2941
+ meeting_repair: repair
2776
2942
  };
2777
2943
 
2778
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/review.js
2944
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/review.js
2779
2945
  var REVIEW_LIMIT = { default: 50, most: 200 };
2780
2946
 
2781
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
2947
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
2782
2948
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
2783
2949
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
2784
2950
 
2785
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
2951
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
2786
2952
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2787
2953
  input.signal?.throwIfAborted();
2788
2954
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -2803,39 +2969,39 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2803
2969
  return { ...input, limit, maxReadBytes };
2804
2970
  }, "validateMeetingSeriesHistory");
2805
2971
 
2806
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
2972
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
2807
2973
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
2808
2974
 
2809
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
2810
- function invalid3(field, response = false) {
2975
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
2976
+ function invalid4(field, response = false) {
2811
2977
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
2812
2978
  }
2813
- __name(invalid3, "invalid");
2979
+ __name(invalid4, "invalid");
2814
2980
  var object2 = /* @__PURE__ */ __name((value, fields2, field, response = false) => {
2815
2981
  if (!value || typeof value !== "object" || Array.isArray(value))
2816
- invalid3(field, response);
2982
+ invalid4(field, response);
2817
2983
  for (const key of Object.keys(value))
2818
2984
  if (!fields2.includes(key))
2819
- invalid3(`${field}.${key}`, response);
2985
+ invalid4(`${field}.${key}`, response);
2820
2986
  }, "object");
2821
2987
  var cursorDetails = /* @__PURE__ */ __name((value) => {
2822
2988
  if (typeof value !== "string" || value.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(value))
2823
- invalid3("cursor");
2989
+ invalid4("cursor");
2824
2990
  try {
2825
2991
  const decoded = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
2826
2992
  object2(decoded, ["version", "selection", "cursor"], "cursor");
2827
2993
  if (decoded.version !== 1 || typeof decoded.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded.selection) || !occurrenceId(decoded.cursor))
2828
- invalid3("cursor");
2994
+ invalid4("cursor");
2829
2995
  return decoded;
2830
2996
  } catch {
2831
- return invalid3("cursor");
2997
+ return invalid4("cursor");
2832
2998
  }
2833
2999
  }, "cursorDetails");
2834
3000
  var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
2835
3001
  cursorDetails(value);
2836
3002
  }, "validateMeetingSeriesInventoryCursor");
2837
3003
 
2838
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/meetings/stats.js
3004
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/meetings/stats.js
2839
3005
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
2840
3006
  const zone = timeZone ?? "UTC";
2841
3007
  try {
@@ -2914,7 +3080,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
2914
3080
  };
2915
3081
  }, "aggregateMeetingStats");
2916
3082
 
2917
- // node_modules/.pnpm/@wirecat+cli-core@0.550.0_@wirecat+cli-base@0.74.0_commander@15.0.0_esbuild@0.28.2_type_14b809de162f39c654f85ad24a8cdf95/node_modules/@wirecat/cli-core/dist/domain/tags.js
3083
+ // node_modules/.pnpm/@wirecat+cli-core@0.556.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5fb5e28714725a9ac5c32d6d19d5eccc/node_modules/@wirecat/cli-core/dist/domain/tags.js
2918
3084
  var TAG_TYPES = ["chat", "contact", "message", "task"];
2919
3085
  var TAG = /^[a-z0-9-]{1,32}$/;
2920
3086
  var tagOf = /* @__PURE__ */ __name((value) => {
@@ -2980,7 +3146,11 @@ export {
2980
3146
  meetingTranscriptAnswer,
2981
3147
  meetingSummaryAnswer,
2982
3148
  exportMeeting,
2983
- validateMeetingChange,
3149
+ FACT_TYPES,
3150
+ PAYMENT_DIRECTIONS,
3151
+ PAYMENT_STATES,
3152
+ validatePayment,
3153
+ paymentTitle,
2984
3154
  findingHash,
2985
3155
  validateFindings,
2986
3156
  findingFingerprint,
@@ -2988,8 +3158,10 @@ export {
2988
3158
  validateMeetingFindings,
2989
3159
  meetingFindingFingerprint,
2990
3160
  parseMeetingQuery,
3161
+ transcriptLanguage,
2991
3162
  importFiles,
2992
3163
  CHAT_MESSAGES_READ,
3164
+ validateMeetingChange,
2993
3165
  validateMeetingPassage,
2994
3166
  validateMeetingPreparationContext,
2995
3167
  meetingProjectEvidence,