@wirecat/mail-cli 0.33.0 → 0.34.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 (128) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/contracts/wirecat.json +2 -2
  3. package/dist/bin/mail.js +2 -2
  4. package/dist/bundle/{all-profiles-W3CGXEEJ.js → all-profiles-2KUKROHY.js} +10 -10
  5. package/dist/bundle/{anthropic-UMDO5AKP.js → anthropic-E5KRCEVC.js} +8 -8
  6. package/dist/bundle/{app-server-4SICQ5RP.js → app-server-HIQ3QO5K.js} +60 -52
  7. package/dist/bundle/{bun-QVVCH4MJ.js → bun-KARJPE5D.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-CHD4AIUK.js → bun-sqlite-NHGX6ZUN.js} +6 -6
  9. package/dist/bundle/{chunk-TK77DCE5.js → chunk-26DYRMXE.js} +1 -1
  10. package/dist/bundle/{chunk-JADBHKBP.js → chunk-2GDLJKPT.js} +1 -1
  11. package/dist/bundle/{chunk-JUYUWMTG.js → chunk-2SCQ7Z4I.js} +4 -4
  12. package/dist/bundle/{chunk-Y2P2LC5R.js → chunk-2VBEBPGX.js} +9 -9
  13. package/dist/bundle/{chunk-OOYIPK4F.js → chunk-4SKE5GYA.js} +1 -1
  14. package/dist/bundle/{chunk-H46MANPR.js → chunk-4URI6EAV.js} +3 -3
  15. package/dist/bundle/chunk-4VHK5UBM.js +170 -0
  16. package/dist/bundle/{chunk-L3MKFI3Y.js → chunk-4VM3UCSO.js} +2 -2
  17. package/dist/bundle/chunk-5GANGHQI.js +721 -0
  18. package/dist/bundle/{chunk-AEKWEYIG.js → chunk-6G4VQFVX.js} +19 -19
  19. package/dist/bundle/{chunk-KLLT572M.js → chunk-6GGMFL7J.js} +3 -3
  20. package/dist/bundle/{chunk-UYZDH5LK.js → chunk-6LFRZDPV.js} +1 -1
  21. package/dist/bundle/{chunk-LB5FTCPZ.js → chunk-A2Y2RFNW.js} +75 -10
  22. package/dist/bundle/{chunk-35AH33VJ.js → chunk-AGZ7SNFF.js} +1 -1
  23. package/dist/bundle/chunk-CKVWAUBW.js +787 -0
  24. package/dist/bundle/{chunk-QN423PC6.js → chunk-DYQGEZA2.js} +3 -3
  25. package/dist/bundle/{chunk-BF73DBAA.js → chunk-DZRP4UCK.js} +13 -13
  26. package/dist/bundle/{chunk-CZ6ZXDSO.js → chunk-EGQJDEFY.js} +74 -36
  27. package/dist/bundle/{chunk-BRRHYXUP.js → chunk-EZAX77SM.js} +20 -20
  28. package/dist/bundle/{chunk-47YNANPZ.js → chunk-FNYWC6A3.js} +2 -2
  29. package/dist/bundle/chunk-FORAOCZ3.js +334 -0
  30. package/dist/bundle/{chunk-EW3JFV7J.js → chunk-H77ALM2Y.js} +4 -4
  31. package/dist/bundle/{chunk-OWAJN74H.js → chunk-HH647UBC.js} +23 -23
  32. package/dist/bundle/{chunk-74BYHR44.js → chunk-HRDCH2VB.js} +620 -622
  33. package/dist/bundle/{chunk-SDWYOYGN.js → chunk-I3MS74OF.js} +4 -4
  34. package/dist/bundle/{chunk-FSMCXQH2.js → chunk-IMQ4CVZJ.js} +2 -2
  35. package/dist/bundle/{chunk-XN5KH24X.js → chunk-JVGVLRBA.js} +5 -5
  36. package/dist/bundle/{chunk-MNJ3BMPZ.js → chunk-KF6O4RZO.js} +3 -3
  37. package/dist/bundle/{chunk-UX76GMQM.js → chunk-KGYK3OI3.js} +6 -6
  38. package/dist/bundle/{chunk-BZY5W35X.js → chunk-KLI5FKZ2.js} +7 -7
  39. package/dist/bundle/chunk-KNVTBDTE.js +72 -0
  40. package/dist/bundle/{chunk-SW7YGW3T.js → chunk-LKTDW5LH.js} +7 -7
  41. package/dist/bundle/{chunk-UWF3SSRL.js → chunk-LOSYDRJU.js} +28 -8
  42. package/dist/bundle/{chunk-MT7T5N2N.js → chunk-MDISZMK4.js} +4 -4
  43. package/dist/bundle/{chunk-CIG4UVP6.js → chunk-MGXYIVVJ.js} +14 -13
  44. package/dist/bundle/{chunk-2BFXHCZW.js → chunk-NAENYLIO.js} +2 -2
  45. package/dist/bundle/{chunk-LXAX6AZU.js → chunk-NHD5BOJU.js} +6 -6
  46. package/dist/bundle/{chunk-IPSLQX64.js → chunk-NI4GCP2T.js} +2 -2
  47. package/dist/bundle/{chunk-CHNNKHLL.js → chunk-NJVJH5MH.js} +1206 -1544
  48. package/dist/bundle/{chunk-S6CHYNFE.js → chunk-NWD7AFOR.js} +2 -2
  49. package/dist/bundle/{chunk-7OYZU5SP.js → chunk-NXERDBEK.js} +4 -4
  50. package/dist/bundle/{chunk-2L6D54BR.js → chunk-OG5QO5RR.js} +8 -8
  51. package/dist/bundle/{chunk-2P44S7XK.js → chunk-OJ3BI2U4.js} +26 -24
  52. package/dist/bundle/chunk-OOYRMTX5.js +374 -0
  53. package/dist/bundle/{chunk-I3UAD4EI.js → chunk-OX5MCGXL.js} +40 -40
  54. package/dist/bundle/{chunk-LACMDMDI.js → chunk-PA4GEJXQ.js} +9 -9
  55. package/dist/bundle/{chunk-RENCSP47.js → chunk-PC3N3LH3.js} +3 -3
  56. package/dist/bundle/{chunk-UG2QDGAH.js → chunk-PRDKEVUL.js} +1 -1
  57. package/dist/bundle/{chunk-2X344EUT.js → chunk-PVZMN3UZ.js} +8 -8
  58. package/dist/bundle/{chunk-GZYICXO4.js → chunk-QFJC6POK.js} +1 -1
  59. package/dist/bundle/{chunk-OFMYFFEF.js → chunk-QOQF2TX3.js} +487 -1144
  60. package/dist/bundle/{chunk-BI5P7JWM.js → chunk-QQGPV3QN.js} +2 -2
  61. package/dist/bundle/{chunk-LXUHYDNE.js → chunk-QXLYLVEC.js} +1 -1
  62. package/dist/bundle/chunk-QXYNDMA6.js +259 -0
  63. package/dist/bundle/{chunk-HFFHL7SV.js → chunk-R2GS3GBJ.js} +61 -59
  64. package/dist/bundle/{chunk-LFBD6RTX.js → chunk-RPNQXWRS.js} +4 -4
  65. package/dist/bundle/{chunk-6IS4BEN4.js → chunk-SK3N4CK5.js} +4 -4
  66. package/dist/bundle/{chunk-JCQ47WR4.js → chunk-T2EE5M7O.js} +5 -5
  67. package/dist/bundle/{chunk-XQXYAOBV.js → chunk-TZJC4AOK.js} +26 -26
  68. package/dist/bundle/{chunk-LKGJMM6W.js → chunk-V43KEZYA.js} +9 -9
  69. package/dist/bundle/{chunk-SYUIAMVA.js → chunk-VBVR6JRC.js} +260 -516
  70. package/dist/bundle/{chunk-QO7BK4WD.js → chunk-VRGEDK4T.js} +8 -8
  71. package/dist/bundle/{chunk-DI74RP6R.js → chunk-WYGDALB3.js} +31 -85
  72. package/dist/bundle/{chunk-IBIFX2LK.js → chunk-X6IGETU6.js} +2 -2
  73. package/dist/bundle/{chunk-6VCQ4CTK.js → chunk-XIF75Z7D.js} +1 -1
  74. package/dist/bundle/chunk-XWU3A7H6.js +29 -0
  75. package/dist/bundle/{chunk-TBZLGT7R.js → chunk-YWX5X5RI.js} +19 -117
  76. package/dist/bundle/{chunk-RXUVXAMM.js → chunk-Z6A6QPPW.js} +1 -1
  77. package/dist/bundle/{chunk-UAV74EY4.js → chunk-ZGZADWD7.js} +1 -1
  78. package/dist/bundle/{chunk-MJ7DUSHT.js → chunk-ZZEWQR43.js} +18 -14
  79. package/dist/bundle/command-contract-PZ7VOOXP.js +39 -0
  80. package/dist/bundle/{command-server-entry-G2ZHCN5J.js → command-server-entry-NF45UPEV.js} +28 -25
  81. package/dist/bundle/decode-DUZA3EHC.js +296 -0
  82. package/dist/bundle/{dispatch-RHIK22OA.js → dispatch-CDJZAMVP.js} +8 -8
  83. package/dist/bundle/{dist-X5G2IMYG.js → dist-RH7EMC4J.js} +29 -24
  84. package/dist/bundle/{echarts-UZJ6AREV.js → echarts-GZHZBNRA.js} +2 -2
  85. package/dist/bundle/{embed-FEXLUH3T.js → embed-VE3CSJN4.js} +6 -6
  86. package/dist/bundle/{embedder-NHQARKFJ.js → embedder-DSJ77DX5.js} +9 -9
  87. package/dist/bundle/{failure-7DIA4OET.js → failure-YH6HAGFT.js} +2 -2
  88. package/dist/bundle/{first-run-PS5NR2QG.js → first-run-3L7HLYTI.js} +12 -12
  89. package/dist/bundle/first-screen-MY5KID77.js +37 -0
  90. package/dist/bundle/{instructions-SDDUBGH4.js → instructions-OZK3BLIO.js} +1 -1
  91. package/dist/bundle/mail.js +12 -12
  92. package/dist/bundle/{mcp-GN4FTJX5.js → mcp-YUG4YR4R.js} +2 -2
  93. package/dist/bundle/meeting-combined-RYMUPY54.js +24 -0
  94. package/dist/bundle/meeting-model-U7LW5WEN.js +24 -0
  95. package/dist/bundle/meeting-semantic-64IOIQRR.js +21 -0
  96. package/dist/bundle/{node-ELCNUOCE.js → node-OS3VWBUZ.js} +2 -2
  97. package/dist/bundle/{node-sqlite-2E5MKZMH.js → node-sqlite-RQ623VFA.js} +7 -7
  98. package/dist/bundle/{oauth-JGPEIY3M.js → oauth-CBPAG734.js} +7 -7
  99. package/dist/bundle/{open-6DEMCZAB.js → open-H4DGOMBC.js} +5 -5
  100. package/dist/bundle/{openai-IVKDU5AH.js → openai-EMWRGR54.js} +28 -26
  101. package/dist/bundle/{process-67DAKAAQ.js → process-3TOIYASI.js} +1 -1
  102. package/dist/bundle/{program-ESJDQMAJ.js → program-WA6RGAJL.js} +3075 -2024
  103. package/dist/bundle/{prompt-ZBWOT5KG.js → prompt-22KNCMBI.js} +5 -5
  104. package/dist/bundle/{recognize-UUBH2DOH.js → recognize-UWD4RSCZ.js} +4 -4
  105. package/dist/bundle/{remote-UYTNWNOB.js → remote-LJY7MF2E.js} +9 -9
  106. package/dist/bundle/{rerank-X2633CQN.js → rerank-JJ6KNJFB.js} +7 -7
  107. package/dist/bundle/{serve-CP7Q4OVW.js → serve-3EPLJYVZ.js} +9 -9
  108. package/dist/bundle/{server-I7MXRSAG.js → server-5JOFO4V4.js} +52 -44
  109. package/dist/bundle/server-EOQNS7B7.js +75 -0
  110. package/dist/bundle/{sqlite-runtime-BX55LI5G.js → sqlite-runtime-MGJA5E27.js} +6 -6
  111. package/dist/bundle/{state-LLNJQXFH.js → state-UCRDOWOP.js} +6 -6
  112. package/dist/bundle/{store-K4KU5N75.js → store-265VRRQV.js} +25 -20
  113. package/dist/bundle/{store-N27XI3VV.js → store-HS272YSA.js} +21 -17
  114. package/dist/bundle/store-maintenance-command-IKZM5NRP.js +66 -0
  115. package/dist/config.d.ts +1 -0
  116. package/dist/config.d.ts.map +1 -1
  117. package/dist/identity.d.ts.map +1 -1
  118. package/dist/identity.js +2 -2
  119. package/dist/identity.js.map +1 -1
  120. package/dist/version.d.ts +1 -1
  121. package/dist/version.js +1 -1
  122. package/package.json +3 -3
  123. package/dist/bundle/command-contract-NRNQAFFE.js +0 -36
  124. package/dist/bundle/decode-U6V6D6XH.js +0 -162
  125. package/dist/bundle/first-screen-C2WTLOG2.js +0 -34
  126. package/dist/bundle/server-QGTMJ7SF.js +0 -67
  127. package/dist/bundle/store-maintenance-command-VPAFQCNA.js +0 -58
  128. /package/dist/bundle/{chunk-BDCC2J2Z.js → chunk-FEBUZHU3.js} +0 -0
@@ -24,6 +24,7 @@ import {
24
24
  pageSchema,
25
25
  picklist,
26
26
  pipe,
27
+ record,
27
28
  reference,
28
29
  safeParse,
29
30
  stepOf,
@@ -31,18 +32,18 @@ import {
31
32
  string,
32
33
  union,
33
34
  variant
34
- } from "./chunk-UWF3SSRL.js";
35
+ } from "./chunk-LOSYDRJU.js";
35
36
  import {
36
37
  CliError,
37
38
  isCliError,
38
39
  singleLine,
39
40
  visibleControls
40
- } from "./chunk-BI5P7JWM.js";
41
+ } from "./chunk-QQGPV3QN.js";
41
42
  import {
42
43
  __name
43
44
  } from "./chunk-ZVVMGPBJ.js";
44
45
 
45
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
46
+ // node_modules/.pnpm/@wirecat+cli-base@0.103.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
46
47
  var QUERY_LIMITS = {
47
48
  bytes: 8192,
48
49
  depth: 32,
@@ -86,7 +87,7 @@ function queryError(reason, span, alternative, context3 = {}, details = {}) {
86
87
  __name(queryError, "queryError");
87
88
  var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
88
89
 
89
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
90
+ // node_modules/.pnpm/@wirecat+cli-base@0.103.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
90
91
  var timezoneOf = /* @__PURE__ */ __name((given) => {
91
92
  const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
92
93
  try {
@@ -120,9 +121,9 @@ var dayBoundary = /* @__PURE__ */ __name((value, zone, next, span) => {
120
121
  era: "short"
121
122
  });
122
123
  const dayAt = /* @__PURE__ */ __name((time) => {
123
- const parts2 = formatter.formatToParts(time);
124
- const value2 = /* @__PURE__ */ __name((name) => Number(parts2.find((p) => p.type === name)?.value), "value");
125
- const year = parts2.find((p) => p.type === "era")?.value === "BC" ? 1 - value2("year") : value2("year");
124
+ const parts = formatter.formatToParts(time);
125
+ const value2 = /* @__PURE__ */ __name((name) => Number(parts.find((p) => p.type === name)?.value), "value");
126
+ const year = parts.find((p) => p.type === "era")?.value === "BC" ? 1 - value2("year") : value2("year");
126
127
  return year * 1e4 + value2("month") * 100 + value2("day");
127
128
  }, "dayAt");
128
129
  let lo = date.getTime() - 2 * 864e5, hi = date.getTime() + 2 * 864e5;
@@ -157,8 +158,8 @@ var wallTime = /* @__PURE__ */ __name((value, zone, span) => {
157
158
  hourCycle: "h23"
158
159
  });
159
160
  const shown = /* @__PURE__ */ __name((instant) => {
160
- const parts2 = Object.fromEntries(formatter.formatToParts(instant).map((part) => [part.type, Number(part.value)]));
161
- return Date.UTC(parts2.year ?? 0, (parts2.month ?? 1) - 1, parts2.day, parts2.hour, parts2.minute, parts2.second) + (instant % 1e3 + 1e3) % 1e3;
161
+ const parts = Object.fromEntries(formatter.formatToParts(instant).map((part) => [part.type, Number(part.value)]));
162
+ return Date.UTC(parts.year ?? 0, (parts.month ?? 1) - 1, parts.day, parts.hour, parts.minute, parts.second) + (instant % 1e3 + 1e3) % 1e3;
162
163
  }, "shown");
163
164
  const found = /* @__PURE__ */ new Set();
164
165
  for (const probe of [wanted - 864e5, wanted, wanted + 864e5]) {
@@ -236,8 +237,8 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
236
237
  };
237
238
  }, "dateRange");
238
239
 
239
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
240
- var wordsOf = /* @__PURE__ */ __name((text5) => text5.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
240
+ // node_modules/.pnpm/@wirecat+cli-base@0.103.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
241
+ var wordsOf = /* @__PURE__ */ __name((text6) => text6.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
241
242
  var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
242
243
  var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
243
244
  var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
@@ -245,10 +246,10 @@ var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
245
246
  return false;
246
247
  if (node.operator === "wildcard" && node.value === "*")
247
248
  return true;
248
- const text5 = String(value);
249
+ const text6 = String(value);
249
250
  switch (field.type) {
250
251
  case "txt": {
251
- const words2 = wordsOf(text5);
252
+ const words2 = wordsOf(text6);
252
253
  if (node.operator === "wildcard")
253
254
  return words2.some((word) => pattern(node.value).test(word));
254
255
  const wanted = wordsOf(node.value);
@@ -262,13 +263,13 @@ var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
262
263
  return (lower === "*" || (lowerInclusive ? number2 >= Number(lower) : number2 > Number(lower))) && (upper === "*" || (upperInclusive ? number2 <= Number(upper) : number2 < Number(upper)));
263
264
  }
264
265
  case "time": {
265
- const time = Date.parse(text5);
266
+ const time = Date.parse(text6);
266
267
  const [lower, upper, lowerInclusive, upperInclusive] = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
267
268
  const range = dateRange(lower, upper, lowerInclusive, upperInclusive, options.zone ?? "UTC", node.span, options.now);
268
269
  return (range.lower === void 0 || (range.lower_inclusive ? time >= range.lower : time > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time <= range.upper : time < range.upper));
269
270
  }
270
271
  default:
271
- return node.operator === "wildcard" ? pattern(node.value).test(text5) : text5.toLowerCase() === node.value.toLowerCase();
272
+ return node.operator === "wildcard" ? pattern(node.value).test(text6) : text6.toLowerCase() === node.value.toLowerCase();
272
273
  }
273
274
  }, "matchOne");
274
275
  var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
@@ -291,7 +292,7 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
291
292
  }, "matches");
292
293
  var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
293
294
 
294
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
295
+ // node_modules/.pnpm/@wirecat+cli-base@0.103.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
295
296
  var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
296
297
  var OPERATORS_BY_TYPE = {
297
298
  kw: ["term", "phrase", "wildcard"],
@@ -370,8 +371,8 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
370
371
  return [...own, ...relations, ...states];
371
372
  }, "queryFieldsOf");
372
373
 
373
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
374
- var shownOf = /* @__PURE__ */ __name((registry2) => registry2.backend === "native" ? registry2.fields.filter((field) => field.native) : registry2.fields, "shownOf");
374
+ // node_modules/.pnpm/@wirecat+cli-base@0.103.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
375
+ var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
375
376
  var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
376
377
  var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
377
378
  var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
@@ -382,32 +383,32 @@ var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
382
383
  ...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
383
384
  ].join(" \xB7 "), "syntaxOf");
384
385
  var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
385
- var fieldsHelp = /* @__PURE__ */ __name((registry2, guide) => {
386
- const shown = shownOf(registry2);
386
+ var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
387
+ const shown = shownOf(registry);
387
388
  const negatable = leftOut(shown);
388
389
  const rows = shown.map((field) => [field.name, kindOf(field), field.example]);
389
390
  const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
390
391
  return [
391
392
  "Fields:",
392
- ...rows.map(([name = "", kind3 = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind3.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
393
- ...registry2.defaults && registry2.defaults.length > 0 ? [`Defaults: ${registry2.defaults.join(" ")} \u2014 name the field to change it`] : [],
393
+ ...rows.map(([name = "", kind2 = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind2.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
394
+ ...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
394
395
  ...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
395
- `Syntax: ${syntaxOf(shown, registry2.backend)}`,
396
+ `Syntax: ${syntaxOf(shown, registry.backend)}`,
396
397
  ...guide ? [`Guide: ${guide}`] : []
397
398
  ].join("\n");
398
399
  }, "fieldsHelp");
399
- var queryDescription = /* @__PURE__ */ __name((registry2) => {
400
- const shown = shownOf(registry2);
400
+ var queryDescription = /* @__PURE__ */ __name((registry) => {
401
+ const shown = shownOf(registry);
401
402
  if (shown.length === 0)
402
403
  return "field:value terms; this list filters by none yet, so any term is refused";
403
404
  const negatable = leftOut(shown);
404
- const terms = registry2.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
405
+ const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
405
406
  const fields = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
406
- const defaults = registry2.defaults?.length ? `; unless named: ${registry2.defaults.join(" ")}` : "";
407
+ const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
407
408
  return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
408
409
  }, "queryDescription");
409
410
 
410
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
411
+ // node_modules/.pnpm/@wirecat+cli-base@0.103.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
411
412
  var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
412
413
  var reserved = /* @__PURE__ */ new Set([
413
414
  "+",
@@ -450,46 +451,46 @@ var decodeEscapes = /* @__PURE__ */ __name((raw, span, fail) => {
450
451
  }
451
452
  return out;
452
453
  }, "decodeEscapes");
453
- var tokensOf = /* @__PURE__ */ __name((text5, fail = queryError) => {
454
+ var tokensOf = /* @__PURE__ */ __name((text6, fail = queryError) => {
454
455
  const tokens = [];
455
456
  let at = 0;
456
457
  let range = false;
457
- while (at < text5.length) {
458
+ while (at < text6.length) {
458
459
  const start = at;
459
- const c = text5[at] ?? "";
460
+ const c = text6[at] ?? "";
460
461
  if (whitespace(c)) {
461
462
  at++;
462
463
  continue;
463
464
  }
464
- let kind3 = c;
465
+ let kind2 = c;
465
466
  if (c === '"' || !range && c === "/") {
466
467
  at++;
467
- while (at < text5.length && text5[at] !== c) {
468
- if (text5[at] === "\\" && (c === '"' || text5[at + 1] === "/"))
468
+ while (at < text6.length && text6[at] !== c) {
469
+ if (text6[at] === "\\" && (c === '"' || text6[at + 1] === "/"))
469
470
  at++;
470
471
  at++;
471
472
  }
472
- if (at >= text5.length)
473
- fail("query.unclosed-literal", { start, end: at }, c === "/" ? regexHint(text5, start) : void 0);
473
+ if (at >= text6.length)
474
+ fail("query.unclosed-literal", { start, end: at }, c === "/" ? regexHint(text6, start) : void 0);
474
475
  at++;
475
- if (c === "/" && /^[dgimsuvy]+(?:$|[ \t\n\r)])/.test(text5.slice(at)))
476
+ if (c === "/" && /^[dgimsuvy]+(?:$|[ \t\n\r)])/.test(text6.slice(at)))
476
477
  fail("query.unsupported-regex-flags", { start: at, end: at + 1 }, "Lucene regex does not take JavaScript flags");
477
- kind3 = c === '"' ? "quoted" : "regex";
478
+ kind2 = c === '"' ? "quoted" : "regex";
478
479
  } else if (range && c !== "]" && c !== "}") {
479
- while (at < text5.length && !whitespace(text5[at] ?? "") && !["]", "}"].includes(text5[at] ?? ""))
480
+ while (at < text6.length && !whitespace(text6[at] ?? "") && !["]", "}"].includes(text6[at] ?? ""))
480
481
  at++;
481
- kind3 = "rangeValue";
482
+ kind2 = "rangeValue";
482
483
  } else if (reserved.has(c)) {
483
484
  if (c === "\\") {
484
485
  at += 2;
485
- while (at < text5.length && !whitespace(text5[at] ?? "") && (!reserved.has(text5[at] ?? "") || ["+", "-"].includes(text5[at] ?? "")))
486
+ while (at < text6.length && !whitespace(text6[at] ?? "") && (!reserved.has(text6[at] ?? "") || ["+", "-"].includes(text6[at] ?? "")))
486
487
  at++;
487
- kind3 = "term";
488
+ kind2 = "term";
488
489
  } else {
489
490
  at++;
490
- if ((c === "<" || c === ">") && text5[at] === "=") {
491
+ if ((c === "<" || c === ">") && text6[at] === "=") {
491
492
  at++;
492
- kind3 += "=";
493
+ kind2 += "=";
493
494
  }
494
495
  if (c === "[" || c === "{")
495
496
  range = true;
@@ -498,15 +499,15 @@ var tokensOf = /* @__PURE__ */ __name((text5, fail = queryError) => {
498
499
  }
499
500
  } else {
500
501
  at++;
501
- while (at < text5.length) {
502
- const next = text5[at] ?? "";
502
+ while (at < text6.length) {
503
+ const next = text6[at] ?? "";
503
504
  if (next === "\\") {
504
- if (at + 1 >= text5.length)
505
+ if (at + 1 >= text6.length)
505
506
  fail("query.invalid-escape", { start: at, end: at + 1 });
506
507
  at += 2;
507
508
  continue;
508
509
  }
509
- if (next === "@" && new RegExp("^@(?:\\p{L}|[\\p{L}\\p{N}][^\\s@]*\\.[\\p{L}\\p{N}])", "u").test(text5.slice(at))) {
510
+ if (next === "@" && new RegExp("^@(?:\\p{L}|[\\p{L}\\p{N}][^\\s@]*\\.[\\p{L}\\p{N}])", "u").test(text6.slice(at))) {
510
511
  at++;
511
512
  continue;
512
513
  }
@@ -515,19 +516,19 @@ var tokensOf = /* @__PURE__ */ __name((text5, fail = queryError) => {
515
516
  at++;
516
517
  }
517
518
  const [field, colon] = tokens.slice(-2);
518
- if (field?.kind === "term" && colon?.kind === ":" && colon.span.end === start && text5[at] === ":" && /^[a-z][a-z_-]*$/u.test(text5.slice(start, at)) && /^:[^\s()"]/u.test(text5.slice(at)))
519
- while (at < text5.length && !whitespace(text5[at] ?? "") && !["(", ")", '"'].includes(text5[at] ?? ""))
519
+ if (field?.kind === "term" && colon?.kind === ":" && colon.span.end === start && text6[at] === ":" && /^[a-z][a-z_-]*$/u.test(text6.slice(start, at)) && /^:[^\s()"]/u.test(text6.slice(at)))
520
+ while (at < text6.length && !whitespace(text6[at] ?? "") && !["(", ")", '"'].includes(text6[at] ?? ""))
520
521
  at++;
521
- const raw = text5.slice(start, at);
522
- kind3 = { AND: "AND", OR: "OR", NOT: "NOT", "&&": "AND", "||": "OR" }[raw] ?? (/^\d+(?:\.\d+)?$/u.test(raw) ? "number" : "term");
522
+ const raw = text6.slice(start, at);
523
+ kind2 = { AND: "AND", OR: "OR", NOT: "NOT", "&&": "AND", "||": "OR" }[raw] ?? (/^\d+(?:\.\d+)?$/u.test(raw) ? "number" : "term");
523
524
  }
524
- tokens.push({ kind: kind3, raw: text5.slice(start, at), span: { start, end: at } });
525
+ tokens.push({ kind: kind2, raw: text6.slice(start, at), span: { start, end: at } });
525
526
  }
526
527
  tokens.push({ kind: "EOF", raw: "", span: { start: at, end: at } });
527
528
  return tokens;
528
529
  }, "tokensOf");
529
- var quoteHint = /* @__PURE__ */ __name((text5, at) => {
530
- for (const match of text5.matchAll(/(?<=^|[\s(])([\p{L}\p{N}_.-]+):([^\s"()]+)/gu)) {
530
+ var quoteHint = /* @__PURE__ */ __name((text6, at) => {
531
+ for (const match of text6.matchAll(/(?<=^|[\s(])([\p{L}\p{N}_.-]+):([^\s"()]+)/gu)) {
531
532
  const [whole, field, value = ""] = match;
532
533
  if (at < match.index || at > match.index + whole.length)
533
534
  continue;
@@ -535,22 +536,22 @@ var quoteHint = /* @__PURE__ */ __name((text5, at) => {
535
536
  }
536
537
  return void 0;
537
538
  }, "quoteHint");
538
- var regexHint = /* @__PURE__ */ __name((text5, at) => {
539
- const word = `${/[^\s()"]*$/u.exec(text5.slice(0, at))?.[0] ?? ""}${/^[^\s()"]*/u.exec(text5.slice(at))?.[0] ?? ""}`;
540
- return quoteHint(text5, at) ?? `/ starts a regular expression; put the value in quotes: "${word}"`;
539
+ var regexHint = /* @__PURE__ */ __name((text6, at) => {
540
+ const word = `${/[^\s()"]*$/u.exec(text6.slice(0, at))?.[0] ?? ""}${/^[^\s()"]*/u.exec(text6.slice(at))?.[0] ?? ""}`;
541
+ return quoteHint(text6, at) ?? `/ starts a regular expression; put the value in quotes: "${word}"`;
541
542
  }, "regexHint");
542
- var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proximity = false, ...context3 } = {}) => {
543
- const fail = /* @__PURE__ */ __name((reason, span, alternative) => queryError(reason, span, alternative ?? quoteHint(text5, span.start), context3), "fail");
544
- if (text5.length > QUERY_LIMITS.bytes || new TextEncoder().encode(text5).length > QUERY_LIMITS.bytes)
545
- fail("query.too-large", { start: 0, end: text5.length });
546
- const tokens = tokensOf(text5, fail);
543
+ var parseLucene = /* @__PURE__ */ __name((text6, { defaultField = "text", proximity = false, ...context3 } = {}) => {
544
+ const fail = /* @__PURE__ */ __name((reason, span, alternative) => queryError(reason, span, alternative ?? quoteHint(text6, span.start), context3), "fail");
545
+ if (text6.length > QUERY_LIMITS.bytes || new TextEncoder().encode(text6).length > QUERY_LIMITS.bytes)
546
+ fail("query.too-large", { start: 0, end: text6.length });
547
+ const tokens = tokensOf(text6, fail);
547
548
  let at = 0;
548
549
  let count7 = 0;
549
550
  let depth = 0;
550
551
  const peek = /* @__PURE__ */ __name(() => tokens[at], "peek");
551
552
  const take = /* @__PURE__ */ __name(() => tokens[at++], "take");
552
- const expect = /* @__PURE__ */ __name((kind3) => {
553
- if (peek().kind !== kind3)
553
+ const expect = /* @__PURE__ */ __name((kind2) => {
554
+ if (peek().kind !== kind2)
554
555
  fail("query.invalid-syntax", peek().span);
555
556
  return take();
556
557
  }, "expect");
@@ -622,14 +623,14 @@ var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proxim
622
623
  const value = take();
623
624
  if (!["term", "number", "quoted"].includes(value.kind))
624
625
  fail("query.invalid-syntax", value.span);
625
- const decoded2 = decodeEscapes(value.kind === "quoted" ? value.raw.slice(1, -1) : value.raw, value.span, fail);
626
+ const decoded = decodeEscapes(value.kind === "quoted" ? value.raw.slice(1, -1) : value.raw, value.span, fail);
626
627
  const lower = operator.kind.startsWith(">");
627
628
  const node2 = built({
628
629
  kind: "predicate",
629
630
  field,
630
631
  operator: "range",
631
- value: lower ? decoded2 : "*",
632
- upper: lower ? "*" : decoded2,
632
+ value: lower ? decoded : "*",
633
+ upper: lower ? "*" : decoded,
633
634
  lower_inclusive: !lower || operator.kind.endsWith("="),
634
635
  upper_inclusive: lower || operator.kind.endsWith("="),
635
636
  span: { start: token.span.start, end: value.span.end }
@@ -687,10 +688,10 @@ var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proxim
687
688
  }
688
689
  if (proximity && peek().kind === "~" && node.kind === "predicate" && node.operator === "phrase") {
689
690
  take();
690
- const distance2 = take();
691
- if (distance2.kind !== "number" || !/^\d+$/u.test(distance2.raw))
692
- fail("query.invalid-syntax", distance2.span, 'write the distance as a whole number: "a b"~3');
693
- node = { ...node, slop: Number(distance2.raw), span: { start: node.span.start, end: distance2.span.end } };
691
+ const distance = take();
692
+ if (distance.kind !== "number" || !/^\d+$/u.test(distance.raw))
693
+ fail("query.invalid-syntax", distance.span, 'write the distance as a whole number: "a b"~3');
694
+ node = { ...node, slop: Number(distance.raw), span: { start: node.span.start, end: distance.span.end } };
694
695
  }
695
696
  if (peek().kind === "~")
696
697
  fail("query.unsupported-operator", peek().span, node.kind === "predicate" && node.operator === "phrase" ? "proximity (~) is not supported \u2014 drop the ~ for the exact phrase, or join the words with AND" : "fuzzy matching (~) is not supported \u2014 use a prefix such as word* to catch word forms");
@@ -709,14 +710,14 @@ var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proxim
709
710
  }
710
711
  return { version: 1, language: "lucene-v1", root };
711
712
  }, "parseLucene");
712
- var implicitTextTerms = /* @__PURE__ */ __name((text5) => {
713
- const tokens = tokensOf(text5);
714
- if (tokens.some(({ kind: kind3 }) => ["AND", "OR", "NOT", "+", "-", "!", "(", ")"].includes(kind3)))
713
+ var implicitTextTerms = /* @__PURE__ */ __name((text6) => {
714
+ const tokens = tokensOf(text6);
715
+ if (tokens.some(({ kind: kind2 }) => ["AND", "OR", "NOT", "+", "-", "!", "(", ")"].includes(kind2)))
715
716
  return /* @__PURE__ */ new Set();
716
717
  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] : []));
717
718
  }, "implicitTextTerms");
718
719
 
719
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
720
+ // node_modules/.pnpm/@wirecat+cli-base@0.103.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
720
721
  var inContext = /* @__PURE__ */ __name((context3, run2) => {
721
722
  try {
722
723
  run2();
@@ -758,8 +759,8 @@ var checkValue = /* @__PURE__ */ __name((field, node, options) => {
758
759
  return;
759
760
  }
760
761
  }, "checkValue");
761
- var validateQuery = /* @__PURE__ */ __name((ast, registry2, options = {}) => {
762
- const byName = new Map(registry2.fields.map((field) => [field.name, field]));
762
+ var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
763
+ const byName = new Map(registry.fields.map((field) => [field.name, field]));
763
764
  const visit = /* @__PURE__ */ __name((node, required) => {
764
765
  if (node.kind === "boolean") {
765
766
  for (const clause of node.clauses)
@@ -769,11 +770,11 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry2, options = {}) => {
769
770
  const field = byName.get(node.field);
770
771
  if (!field)
771
772
  queryError("query.unknown-field", node.span, `no field "${node.field}"`, options, {
772
- fields: registry2.fields.map((one) => one.name)
773
+ fields: registry.fields.map((one) => one.name)
773
774
  });
774
- if (registry2.backend === "native" && !field.native)
775
+ if (registry.backend === "native" && !field.native)
775
776
  queryError("query.unsupported-field", node.span, `the source cannot filter by ${field.name}`, options, {
776
- supported: registry2.fields.filter((one) => one.native).map((one) => one.name)
777
+ supported: registry.fields.filter((one) => one.native).map((one) => one.name)
777
778
  });
778
779
  const presence = node.operator === "wildcard" && node.value === "*";
779
780
  if (!presence && !field.operators.includes(node.operator))
@@ -791,48 +792,48 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry2, options = {}) => {
791
792
  }, "validateQuery");
792
793
  var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
793
794
 
794
- // node_modules/.pnpm/@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
795
- var describeQuery = /* @__PURE__ */ __name((registry2) => ({
796
- entity: registry2.entity,
797
- backend: registry2.backend,
798
- fields: registry2.fields.map(({ validate: _, ...field }) => field),
799
- ...registry2.defaults && registry2.defaults.length > 0 ? { defaults: [...registry2.defaults] } : {}
795
+ // node_modules/.pnpm/@wirecat+cli-base@0.103.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
796
+ var describeQuery = /* @__PURE__ */ __name((registry) => ({
797
+ entity: registry.entity,
798
+ backend: registry.backend,
799
+ fields: registry.fields.map(({ validate: _, ...field }) => field),
800
+ ...registry.defaults && registry.defaults.length > 0 ? { defaults: [...registry.defaults] } : {}
800
801
  }), "describeQuery");
801
- var exampleProblems = /* @__PURE__ */ __name((registry2) => {
802
- const syntaxOnly = { ...registry2, backend: "sql" };
803
- const problem = /* @__PURE__ */ __name((text5, field) => {
802
+ var exampleProblems = /* @__PURE__ */ __name((registry) => {
803
+ const syntaxOnly = { ...registry, backend: "sql" };
804
+ const problem = /* @__PURE__ */ __name((text6, field) => {
804
805
  try {
805
- const named = walkQuery(validateQuery(parseLucene(text5, { defaultField: "none" }), syntaxOnly).root);
806
- return named.every((node) => node.field === field) ? void 0 : `"${text5}" does not name ${field}`;
806
+ const named = walkQuery(validateQuery(parseLucene(text6, { defaultField: "none" }), syntaxOnly).root);
807
+ return named.every((node) => node.field === field) ? void 0 : `"${text6}" does not name ${field}`;
807
808
  } catch (failure) {
808
809
  if (!isCliError(failure))
809
810
  throw failure;
810
- return `"${text5}": ${failure.message}`;
811
+ return `"${text6}": ${failure.message}`;
811
812
  }
812
813
  }, "problem");
813
- const defaults = (registry2.defaults ?? []).map((term) => {
814
+ const defaults = (registry.defaults ?? []).map((term) => {
814
815
  const field = term.replace(/^-/, "").split(/[:<>=]/)[0] ?? "";
815
816
  return { field, problem: problem(term.replace(/^-/, ""), field) };
816
817
  });
817
818
  return [
818
- ...registry2.fields.map((field) => ({ field: field.name, problem: problem(field.example, field.name) })),
819
+ ...registry.fields.map((field) => ({ field: field.name, problem: problem(field.example, field.name) })),
819
820
  ...defaults
820
821
  ].filter((entry) => entry.problem !== void 0);
821
822
  }, "exampleProblems");
822
823
  var checked = /* @__PURE__ */ new WeakSet();
823
- var defineQuery = /* @__PURE__ */ __name((registry2) => {
824
- if (checked.has(registry2))
825
- return registry2;
826
- const names = registry2.fields.map((field) => field.name);
824
+ var defineQuery = /* @__PURE__ */ __name((registry) => {
825
+ if (checked.has(registry))
826
+ return registry;
827
+ const names = registry.fields.map((field) => field.name);
827
828
  const problems = [
828
829
  ...duplicates(names).map((name) => `"${name}" is listed twice`),
829
830
  ...names.filter((name) => !SNAKE_CASE.test(name)).map((name) => `"${name}" is not snake_case`),
830
- ...exampleProblems(registry2).map(({ field, problem }) => `${field}: ${problem}`)
831
+ ...exampleProblems(registry).map(({ field, problem }) => `${field}: ${problem}`)
831
832
  ];
832
833
  if (problems.length > 0)
833
- throw new RegistryError(`${registry2.entity} query`, problems);
834
- checked.add(registry2);
835
- return registry2;
834
+ throw new RegistryError(`${registry.entity} query`, problems);
835
+ checked.add(registry);
836
+ return registry;
836
837
  }, "defineQuery");
837
838
  var SPAN = ["span", "alternative", "guide"];
838
839
  var QUERY_REASONS = defineReasons([
@@ -862,7 +863,7 @@ var QUERY_REASONS = defineReasons([
862
863
  details: [...SPAN, ...details]
863
864
  })));
864
865
 
865
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/search/service-query.js
866
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/service-query.js
866
867
  var BACKENDS = ["archive", "server", "both"];
867
868
  var MAX_BRANCHES = 64;
868
869
  var some = /* @__PURE__ */ __name((value) => value === void 0 ? [] : [value], "some");
@@ -901,7 +902,7 @@ var RELATIVE_TIME = /^\d+[mhd]$/i;
901
902
  var OFFSET = /(?:Z|[+-]\d{2}:?\d{2})$/i;
902
903
  var readsZone = /* @__PURE__ */ __name((ast, times) => walkQuery(ast.root).some((term) => times.has(term.field) && [term.value, term.upper].some((value) => value !== void 0 && value !== "*" && !RELATIVE_TIME.test(value) && !OFFSET.test(value))), "readsZone");
903
904
 
904
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/reference.js
905
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/reference.js
905
906
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
906
907
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
907
908
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -909,24 +910,24 @@ var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
909
910
  return value;
910
911
  }, "integer");
911
912
  var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
912
- const parts2 = [integer2(reference2.accountId), integer2(reference2.meetingId)];
913
+ const parts = [integer2(reference2.accountId), integer2(reference2.meetingId)];
913
914
  if (reference2.transcriptId !== void 0)
914
- parts2.push(integer2(reference2.transcriptId));
915
+ parts.push(integer2(reference2.transcriptId));
915
916
  if (reference2.cuePosition !== void 0) {
916
917
  if (reference2.transcriptId === void 0)
917
918
  throw invalid();
918
- parts2.push(integer2(reference2.cuePosition, 0));
919
+ parts.push(integer2(reference2.cuePosition, 0));
919
920
  }
920
- return `meeting:${parts2.join("/")}`;
921
+ return `meeting:${parts.join("/")}`;
921
922
  }, "formatMeetingReference");
922
- var parseMeetingReference = /* @__PURE__ */ __name((text5) => {
923
- const value = text5.trim();
923
+ var parseMeetingReference = /* @__PURE__ */ __name((text6) => {
924
+ const value = text6.trim();
924
925
  if (!value.startsWith("meeting:"))
925
926
  throw invalid();
926
- const parts2 = value.slice(8).split("/");
927
- if (parts2.length < 2 || parts2.length > 4 || parts2.some((part) => !/^\d+$/.test(part)))
927
+ const parts = value.slice(8).split("/");
928
+ if (parts.length < 2 || parts.length > 4 || parts.some((part) => !/^\d+$/.test(part)))
928
929
  throw invalid();
929
- const ids2 = parts2.map(Number);
930
+ const ids2 = parts.map(Number);
930
931
  const reference2 = {
931
932
  type: "meeting",
932
933
  accountId: integer2(ids2[0]),
@@ -936,9 +937,9 @@ var parseMeetingReference = /* @__PURE__ */ __name((text5) => {
936
937
  };
937
938
  return reference2;
938
939
  }, "parseMeetingReference");
939
- var canonicalMeetingReference = /* @__PURE__ */ __name((text5) => formatMeetingReference(parseMeetingReference(text5)), "canonicalMeetingReference");
940
+ var canonicalMeetingReference = /* @__PURE__ */ __name((text6) => formatMeetingReference(parseMeetingReference(text6)), "canonicalMeetingReference");
940
941
 
941
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/payment.js
942
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/payment.js
942
943
  var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
943
944
  var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
944
945
  var PAYMENT_STATES = ["expected", "paid", "cancelled"];
@@ -1032,7 +1033,122 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
1032
1033
  return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
1033
1034
  }, "paymentTitle");
1034
1035
 
1035
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/item.js
1036
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1037
+ var context = {
1038
+ command: "search meetings",
1039
+ guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
1040
+ };
1041
+ var words = ["term", "phrase"];
1042
+ var MOST_LINES_APART = 20;
1043
+ var near = /* @__PURE__ */ __name((node) => {
1044
+ if (node.slop !== void 0 && node.slop > MOST_LINES_APART)
1045
+ queryError("query.invalid-number", node.span, `words at most ${MOST_LINES_APART} lines apart: "a b"~${MOST_LINES_APART}`, context);
1046
+ }, "near");
1047
+ var MEETING_HIT_QUERY = defineQuery({
1048
+ entity: "meeting_hit",
1049
+ backend: "sql",
1050
+ fields: [
1051
+ {
1052
+ name: "text",
1053
+ type: "txt",
1054
+ operators: words,
1055
+ example: "text:budget",
1056
+ relation: "a passage with the word in any form, or a spelling speech recognition garbled",
1057
+ validate: near
1058
+ },
1059
+ {
1060
+ name: "exact",
1061
+ type: "txt",
1062
+ operators: words,
1063
+ example: "exact:budget",
1064
+ relation: "a passage with the word as typed: no other forms, no garbled spellings",
1065
+ validate: near
1066
+ },
1067
+ {
1068
+ name: "from",
1069
+ type: "kw",
1070
+ operators: words,
1071
+ example: 'from:"Alice Synthetic"',
1072
+ relation: "a line said or a chat message written by this person; attendance is --identity-id"
1073
+ }
1074
+ ]
1075
+ });
1076
+ var MEETING_FIELDS = defineQuery({
1077
+ entity: "meeting_hit",
1078
+ backend: "sql",
1079
+ fields: [
1080
+ ...MEETING_HIT_QUERY.fields,
1081
+ {
1082
+ name: "date",
1083
+ type: "time",
1084
+ operators: ["term", "range"],
1085
+ example: "date>=30d",
1086
+ relation: "meetings that started then; the same as --since-time and --until-time"
1087
+ },
1088
+ ...["project", "tag", "topic"].map((name) => ({
1089
+ name,
1090
+ type: "kw",
1091
+ operators: words,
1092
+ example: `${name}:"Example name"`,
1093
+ relation: `meetings in this ${name}, by name or alias; the same as --${name}`
1094
+ }))
1095
+ ]
1096
+ });
1097
+ var LIFTED = /* @__PURE__ */ new Set(["date", "project", "tag", "topic"]);
1098
+ var MEETING_FIELD_NAMES = new Set(MEETING_FIELDS.fields.map(({ name }) => name));
1099
+ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) => {
1100
+ let ast;
1101
+ try {
1102
+ ast = validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_FIELDS, context);
1103
+ } catch (error) {
1104
+ if (error instanceof CliError)
1105
+ return { query, request };
1106
+ throw error;
1107
+ }
1108
+ const top = ast.root.kind === "boolean" ? ast.root.clauses : [{ occur: "must", node: ast.root }];
1109
+ const lifted = top.filter((clause) => clause.node.kind === "predicate" && LIFTED.has(clause.node.field));
1110
+ const misplaced = /* @__PURE__ */ __name((node, nested) => node.kind === "predicate" ? nested && LIFTED.has(node.field) ? node : void 0 : node.clauses.map((clause) => misplaced(clause.node, true)).find(Boolean), "misplaced");
1111
+ const wrong = lifted.find((clause) => clause.occur !== "must")?.node ?? top.map((clause) => clause.node.kind === "boolean" ? misplaced(clause.node, true) : void 0).find(Boolean);
1112
+ if (wrong)
1113
+ queryError("query.unsupported-field", wrong.span, `${wrong.field}: chooses meetings; join it to the words with AND, outside OR, NOT and groups`, context);
1114
+ if (!lifted.length)
1115
+ return { query, request };
1116
+ const next = { ...request };
1117
+ const once = /* @__PURE__ */ __name((name, flag2) => {
1118
+ if (next[name] !== void 0)
1119
+ throw new CliError("validation_error", `give ${flag2.replace(/^--/, "")} once: as ${flag2} or in the query`);
1120
+ }, "once");
1121
+ for (const { node } of lifted) {
1122
+ if (node.field === "date") {
1123
+ 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);
1124
+ if (range.lower !== void 0) {
1125
+ once("since", "--since-time");
1126
+ next.since = range.lower + (range.lower_inclusive ? 0 : 1);
1127
+ }
1128
+ if (range.upper !== void 0) {
1129
+ once("until", "--until-time");
1130
+ next.until = range.upper - (range.upper_inclusive ? 0 : 1);
1131
+ }
1132
+ } else {
1133
+ const field = node.field;
1134
+ once(field, `--${field}`);
1135
+ next[field] = node.value;
1136
+ }
1137
+ }
1138
+ let rest = query;
1139
+ for (const { node } of [...lifted].sort((a, b) => b.node.span.start - a.node.span.start))
1140
+ rest = `${rest.slice(0, node.span.start)}${rest.slice(node.span.end)}`;
1141
+ rest = rest.replace(/(^|\s)\+(?=\s|$)/g, "$1").replace(/^(?:\s*(?:AND\b|&&))+|(?:(?:\bAND|&&)\s*)+$/g, "").replace(/(?:\bAND|&&)(\s+(?:AND\b|&&))+/g, "AND").trim();
1142
+ if (!rest)
1143
+ throw new CliError("validation_error", "give words to find besides date:, project:, tag: and topic:");
1144
+ return { query: rest, request: next };
1145
+ }, "liftMeetingFields");
1146
+ var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
1147
+
1148
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/model.js
1149
+ var MEETING_CALL_DIRECTIONS = ["in", "out"];
1150
+
1151
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/item.js
1036
1152
  var text = string();
1037
1153
  var count = pipe(number(), integer(), minValue(0));
1038
1154
  var MEETING_ISSUES = ["time_without_zone"];
@@ -1040,6 +1156,12 @@ var meetingIssuesOf = /* @__PURE__ */ __name((metadata) => {
1040
1156
  const listed2 = metadata?.issues;
1041
1157
  return Array.isArray(listed2) ? MEETING_ISSUES.filter((issue) => listed2.includes(issue)) : [];
1042
1158
  }, "meetingIssuesOf");
1159
+ var meetingCall = strictObject({
1160
+ direction: nullable(picklist(MEETING_CALL_DIRECTIONS)),
1161
+ manager: nullable(strictObject({ name: nullable(text), person: nullable(reference) })),
1162
+ client_phone: nullable(text)
1163
+ });
1164
+ var meetingCallItem = /* @__PURE__ */ __name((row) => row.direction == null && row.clientPhone == null ? void 0 : { direction: row.direction ?? null, manager: row.manager ?? null, client_phone: row.clientPhone ?? null }, "meetingCallItem");
1043
1165
  var meetingEntries = {
1044
1166
  ref: reference,
1045
1167
  id: pipe(string(), minLength(1)),
@@ -1057,6 +1179,8 @@ var meetingEntries = {
1057
1179
  duration_ms: nullable(count),
1058
1180
  timezone: optional(nullable(text)),
1059
1181
  participants_count: nullable(count),
1182
+ /** Present only on a phone call. */
1183
+ call: optional(meetingCall),
1060
1184
  /** Present only when something about this meeting is doubtful. */
1061
1185
  issues: optional(array(picklist(MEETING_ISSUES))),
1062
1186
  /**
@@ -1074,6 +1198,7 @@ var MEETING_UNTRUSTED = ["title", "description", "location"];
1074
1198
  var iso = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
1075
1199
  var meetingItem = /* @__PURE__ */ __name((row, owner) => {
1076
1200
  const issues = meetingIssuesOf(row.metadata);
1201
+ const call = meetingCallItem(row);
1077
1202
  return {
1078
1203
  ref: formatMeetingReference({ type: "meeting", accountId: row.accountId, meetingId: row.id }),
1079
1204
  id: String(row.id),
@@ -1089,6 +1214,7 @@ var meetingItem = /* @__PURE__ */ __name((row, owner) => {
1089
1214
  duration_ms: row.durationMs,
1090
1215
  timezone: row.timezone,
1091
1216
  participants_count: row.participantsCount,
1217
+ ...call ? { call } : {},
1092
1218
  ...issues.length ? { issues } : {},
1093
1219
  untrusted: [...MEETING_UNTRUSTED],
1094
1220
  created_at: new Date(row.createdAt).toISOString(),
@@ -1122,11 +1248,19 @@ var MEETING_QUERY = {
1122
1248
  })
1123
1249
  };
1124
1250
 
1125
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/store.js
1251
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/store.js
1126
1252
  var MEETING_DOCUMENT_ROLES = ["transcript", "recording", "notes"];
1253
+ var TRANSCRIPT_WORDS = [
1254
+ "Transcript",
1255
+ "Notes by Gemini",
1256
+ "\u0422\u0440\u0430\u043D\u0441\u043A\u0440\u0438\u043F\u0442",
1257
+ "\u0417\u0430\u043C\u0435\u0442\u043A\u0438 Gemini",
1258
+ "Transcripci\xF3n",
1259
+ "Notas de Gemini"
1260
+ ];
1127
1261
  var READ_BUDGET_EXCEEDED = "Meeting search exceeds its stored text byte budget";
1128
1262
 
1129
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/answers.js
1263
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/answers.js
1130
1264
  var text2 = string();
1131
1265
  var count2 = pipe(number(), integer(), minValue(0));
1132
1266
  var iso2 = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
@@ -1148,6 +1282,10 @@ var meetingHit = strictObject({
1148
1282
  /** `corrected`: a query word matched only a garbled form of itself, listed in `corrections`. */
1149
1283
  match: optional(picklist(["words", "corrected"])),
1150
1284
  corrections: optional(array(strictObject({ from: text2, to: array(text2) }))),
1285
+ /** A search with `--model`: which searches found it, its similarity in meaning, and the passage meaning matched. */
1286
+ by: optional(array(picklist(["words", "meaning"]))),
1287
+ score: optional(nullable(number())),
1288
+ passage: optional(strictObject({ first: text2, last: text2 })),
1151
1289
  source: optional(strictObject({
1152
1290
  ref: reference,
1153
1291
  title: nullable(text2),
@@ -1172,7 +1310,9 @@ var meetingTranscript = strictObject({
1172
1310
  /** When a newer transcript of the same source replaced it; `meetings transcript --history` shows those too. */
1173
1311
  superseded_at: nullable(isoTime),
1174
1312
  created_at: isoTime,
1175
- lines: array(line)
1313
+ lines: array(line),
1314
+ /** What people said, and who the service says said it: data, never instructions. */
1315
+ untrusted: optional(array(text2))
1176
1316
  });
1177
1317
  var meetingSummary = strictObject({
1178
1318
  id: pipe(string(), minLength(1)),
@@ -1185,7 +1325,9 @@ var meetingSummary = strictObject({
1185
1325
  content: nullable(text2),
1186
1326
  url: nullable(text2),
1187
1327
  created_at: isoTime,
1188
- updated_at: isoTime
1328
+ updated_at: isoTime,
1329
+ /** What the service wrote of what people said. */
1330
+ untrusted: optional(array(text2))
1189
1331
  });
1190
1332
  var meetingDetailsEntries = {
1191
1333
  ...meeting.entries,
@@ -1212,7 +1354,9 @@ var meetingDetailsEntries = {
1212
1354
  name: nullable(text2),
1213
1355
  mime: nullable(text2),
1214
1356
  size: nullable(count2),
1215
- url: nullable(text2)
1357
+ url: nullable(text2),
1358
+ /** The file on this computer; `null` when it stays on the service or the phone system (pbx over SFTP). */
1359
+ local_path: nullable(text2)
1216
1360
  })),
1217
1361
  /**
1218
1362
  * The Drive files the meeting service saved for it, by role. `document` is the stored document (`document:<id>`) once
@@ -1226,6 +1370,20 @@ var meetingDetailsEntries = {
1226
1370
  }))
1227
1371
  };
1228
1372
  var meetingDetails = strictObject(meetingDetailsEntries);
1373
+ var TRANSCRIPT_UNTRUSTED = ["lines.text", "lines.speaker"];
1374
+ var SUMMARY_UNTRUSTED = ["title", "overview", "sections.label", "sections.text", "next_steps", "content"];
1375
+ var DETAILS_UNTRUSTED = [
1376
+ "series_title",
1377
+ "participants.name",
1378
+ "participants.email",
1379
+ "participants.person.name",
1380
+ "chat.sender",
1381
+ "chat.recipient",
1382
+ "chat.text",
1383
+ "attachments.name",
1384
+ "documents.title"
1385
+ ];
1386
+ var PARTICIPANT_UNTRUSTED = ["display_name", "email", "person.name"];
1229
1387
  var meetingRef = /* @__PURE__ */ __name((accountId, meetingId) => formatMeetingReference({ type: "meeting", accountId, meetingId }), "meetingRef");
1230
1388
  var meetingTranscriptItem = /* @__PURE__ */ __name((accountId, transcript, rows) => ({
1231
1389
  ref: formatMeetingReference({
@@ -1245,7 +1403,8 @@ var meetingTranscriptItem = /* @__PURE__ */ __name((accountId, transcript, rows)
1245
1403
  end_ms: row.endMs,
1246
1404
  speaker: row.speakerName,
1247
1405
  text: row.text
1248
- }))
1406
+ })),
1407
+ untrusted: [...TRANSCRIPT_UNTRUSTED]
1249
1408
  }), "meetingTranscriptItem");
1250
1409
  var meetingSummaryItem = /* @__PURE__ */ __name((accountId, summary) => ({
1251
1410
  id: String(summary.id),
@@ -1253,17 +1412,20 @@ var meetingSummaryItem = /* @__PURE__ */ __name((accountId, summary) => ({
1253
1412
  source: summary.source,
1254
1413
  title: summary.title,
1255
1414
  overview: summary.overview,
1256
- sections: summary.sections.map(({ label, text: text5 }) => ({ label, text: text5 })),
1415
+ sections: summary.sections.map(({ label, text: text6 }) => ({ label, text: text6 })),
1257
1416
  next_steps: summary.nextSteps,
1258
1417
  content: summary.content,
1259
1418
  url: summary.docUrl,
1260
1419
  created_at: new Date(summary.externalCreatedAt ?? summary.createdAt).toISOString(),
1261
- updated_at: new Date(summary.externalUpdatedAt ?? summary.updatedAt).toISOString()
1420
+ updated_at: new Date(summary.externalUpdatedAt ?? summary.updatedAt).toISOString(),
1421
+ untrusted: [...SUMMARY_UNTRUSTED]
1262
1422
  }), "meetingSummaryItem");
1263
1423
  var meetingDetailsItem = /* @__PURE__ */ __name((details, owner) => {
1264
1424
  const { accountId } = details.meeting;
1425
+ const item = meetingItem(details.meeting, owner);
1265
1426
  return {
1266
- ...meetingItem(details.meeting, owner),
1427
+ ...item,
1428
+ untrusted: [...item.untrusted ?? [], ...DETAILS_UNTRUSTED],
1267
1429
  event_id: details.meeting.eventId === null ? null : String(details.meeting.eventId),
1268
1430
  series_id: details.meeting.meetingSeriesId === null ? null : String(details.meeting.meetingSeriesId),
1269
1431
  series_title: details.series?.title ?? null,
@@ -1300,7 +1462,8 @@ var meetingDetailsItem = /* @__PURE__ */ __name((details, owner) => {
1300
1462
  name: one.name ?? one.title,
1301
1463
  mime: one.mime,
1302
1464
  size: one.size,
1303
- url: one.url
1465
+ url: one.url,
1466
+ local_path: one.localPath
1304
1467
  })),
1305
1468
  documents: (details.documents ?? []).map((one) => ({
1306
1469
  file_id: one.fileId,
@@ -1349,10 +1512,10 @@ var meetingHitItem = /* @__PURE__ */ __name((hit) => ({
1349
1512
  var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search meetings", args = {}, meta = {}) => {
1350
1513
  const items = found.items.map(meetingHitItem);
1351
1514
  const cursor = found.hasMore && found.nextCursor !== null ? found.nextCursor : void 0;
1352
- const pending2 = found.coverage.indexing === "pending";
1515
+ const pending = found.coverage.indexing === "pending";
1353
1516
  const next = [
1354
1517
  ...cursor === void 0 ? [] : [stepOf(PAGE_NEXT, { command, args: { ...args, cursor, limit }, values: { shown: items.length } })],
1355
- ...pending2 ? [
1518
+ ...pending ? [
1356
1519
  stepOf(SEARCH_AGAIN, {
1357
1520
  command,
1358
1521
  args: Object.fromEntries(Object.entries(args).filter(([key]) => key !== "cursor"))
@@ -1368,7 +1531,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
1368
1531
  ...cursor === void 0 ? {} : { next_cursor: cursor }
1369
1532
  },
1370
1533
  ...next.length > 0 ? { next } : {},
1371
- ...pending2 ? {
1534
+ ...pending ? {
1372
1535
  missing: [
1373
1536
  {
1374
1537
  field: "excerpt",
@@ -1381,7 +1544,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
1381
1544
  };
1382
1545
  }, "meetingHitsList");
1383
1546
 
1384
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
1547
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
1385
1548
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
1386
1549
  const parsed = urlOf(url);
1387
1550
  if (!parsed)
@@ -1415,17 +1578,17 @@ var urlOf = /* @__PURE__ */ __name((url) => {
1415
1578
  }
1416
1579
  }, "urlOf");
1417
1580
 
1418
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
1581
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
1419
1582
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
1420
1583
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
1421
1584
  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");
1422
- var withoutLinkQueries = /* @__PURE__ */ __name((text5) => text5.replace(/https?:\/\/[^\s<>"')\]]+/giu, (url) => joinUrlWithoutQuery(url) ?? ""), "withoutLinkQueries");
1423
- var calendarText = /* @__PURE__ */ __name((text5, { dropSecretLines = true } = {}) => {
1424
- if (!text5)
1585
+ var withoutLinkQueries = /* @__PURE__ */ __name((text6) => text6.replace(/https?:\/\/[^\s<>"')\]]+/giu, (url) => joinUrlWithoutQuery(url) ?? ""), "withoutLinkQueries");
1586
+ var calendarText = /* @__PURE__ */ __name((text6, { dropSecretLines = true } = {}) => {
1587
+ if (!text6)
1425
1588
  return null;
1426
- const kept = htmlToText(text5).split(/\r?\n/u).map((line2) => withoutLinkQueries(line2).replace(/[ \t]+/gu, " ").trim()).filter((line2) => !dropSecretLines || !SECRET_LINE.test(line2));
1427
- const joined2 = kept.join("\n").replace(/\n{3,}/gu, "\n\n").trim();
1428
- return joined2 || null;
1589
+ const kept = htmlToText(text6).split(/\r?\n/u).map((line2) => withoutLinkQueries(line2).replace(/[ \t]+/gu, " ").trim()).filter((line2) => !dropSecretLines || !SECRET_LINE.test(line2));
1590
+ const joined = kept.join("\n").replace(/\n{3,}/gu, "\n\n").trim();
1591
+ return joined || null;
1429
1592
  }, "calendarText");
1430
1593
  var ENTRY_METADATA_KEYS = [
1431
1594
  "colorId",
@@ -1452,11 +1615,11 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
1452
1615
  return kept;
1453
1616
  }, "entryMetadata");
1454
1617
 
1455
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/calls.js
1618
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/calls.js
1456
1619
  var CALL_DIRECTIONS = ["incoming", "outgoing", "internal"];
1457
1620
  var CALL_OUTCOMES = ["answered", "voicemail", "busy", "no_answer", "failed"];
1458
1621
 
1459
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/call-answers.js
1622
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/call-answers.js
1460
1623
  var count3 = pipe(number(), integer(), minValue(0));
1461
1624
  var ms = count3;
1462
1625
  var id = pipe(number(), integer(), minValue(1));
@@ -1539,7 +1702,7 @@ var callStatsSchema = strictObject({
1539
1702
  });
1540
1703
  var callStats = callStatsSchema;
1541
1704
 
1542
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/stats.js
1705
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/stats.js
1543
1706
  var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
1544
1707
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
1545
1708
  const zone = timeZone ?? "UTC";
@@ -1552,13 +1715,13 @@ var zoneOf = /* @__PURE__ */ __name((timeZone) => {
1552
1715
  }, "zoneOf");
1553
1716
  var DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
1554
1717
  var weekStart = /* @__PURE__ */ __name((at, format) => {
1555
- const parts2 = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
1556
- const day = Date.UTC(Number(parts2.year), Number(parts2.month) - 1, Number(parts2.day));
1557
- return new Date(day - DAYS.indexOf(parts2.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
1718
+ const parts = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
1719
+ const day = Date.UTC(Number(parts.year), Number(parts.month) - 1, Number(parts.day));
1720
+ return new Date(day - DAYS.indexOf(parts.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
1558
1721
  }, "weekStart");
1559
1722
  var dayKey = /* @__PURE__ */ __name((at, format) => {
1560
- const parts2 = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
1561
- return `${parts2.year}-${parts2.month}-${parts2.day}`;
1723
+ const parts = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
1724
+ return `${parts.year}-${parts.month}-${parts.day}`;
1562
1725
  }, "dayKey");
1563
1726
  var zoneFormat = /* @__PURE__ */ __name((zone) => new Intl.DateTimeFormat("en-US", {
1564
1727
  timeZone: zone,
@@ -1674,10 +1837,10 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
1674
1837
  };
1675
1838
  }, "aggregateMeetingStats");
1676
1839
 
1677
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/call-stats.js
1840
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/call-stats.js
1678
1841
  var CALLBACK_WITHIN_MS = 24 * 60 * 60 * 1e3;
1679
1842
 
1680
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1843
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1681
1844
  import { createHash } from "node:crypto";
1682
1845
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
1683
1846
  reference: cue2.reference,
@@ -1691,7 +1854,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
1691
1854
  text: cue2.text
1692
1855
  })).digest("hex"), "meetingCueFingerprint");
1693
1856
 
1694
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1857
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1695
1858
  var EVENT_QUERY = defineQuery({
1696
1859
  entity: "event",
1697
1860
  backend: "sql",
@@ -1707,7 +1870,8 @@ var EVENT_QUERY = defineQuery({
1707
1870
  ]
1708
1871
  });
1709
1872
 
1710
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1873
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1874
+ var PARTICIPANT_RESPONSES = ["needs-action", "accepted", "tentative", "declined", "delegated"];
1711
1875
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
1712
1876
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
1713
1877
  if (entry.recurrenceEndsAt !== null)
@@ -1730,7 +1894,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
1730
1894
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
1731
1895
  }, "entryInWindow");
1732
1896
 
1733
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/events.js
1897
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/events.js
1734
1898
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(), { create = true } = {}) => {
1735
1899
  const current = await store.meeting(details.meeting.id);
1736
1900
  if (!current)
@@ -1775,8 +1939,8 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(),
1775
1939
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
1776
1940
  }, "linkEvent");
1777
1941
 
1778
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1779
- var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text5) => text5.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
1942
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1943
+ var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text6) => text6.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
1780
1944
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
1781
1945
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
1782
1946
  throw new CliError("validation_error", "participant query must contain 1\u2013500 characters without NUL");
@@ -1799,7 +1963,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
1799
1963
  };
1800
1964
  }, "validateMeetingParticipantSearch");
1801
1965
 
1802
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1966
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1803
1967
  var MeetingError = class extends CliError {
1804
1968
  static {
1805
1969
  __name(this, "MeetingError");
@@ -1851,6 +2015,7 @@ var meetingPeople = /* @__PURE__ */ __name(async (store, query, accountId, optio
1851
2015
  });
1852
2016
  return {
1853
2017
  ...packet,
2018
+ items: packet.items.map((one) => ({ ...one, untrusted: [...PARTICIPANT_UNTRUSTED] })),
1854
2019
  page: { mode: "cursor", limit, has_more, ...next_cursor ? { next_cursor } : {} },
1855
2020
  ...next_cursor ? {
1856
2021
  next: [
@@ -1871,7 +2036,14 @@ var meetingPeople = /* @__PURE__ */ __name(async (store, query, accountId, optio
1871
2036
  }
1872
2037
  if (Object.values(options).some((value) => value !== void 0))
1873
2038
  throw new MeetingError("configuration_error", "bounded participant lookup needs a selected account and capable store");
1874
- return listed(await store.participants(query, accountId));
2039
+ return listed((await store.participants(query, accountId)).map((one) => ({
2040
+ participant_id: one.id,
2041
+ meeting_id: one.meetingId,
2042
+ identity_id: one.identityId,
2043
+ display_name: one.displayName,
2044
+ email: one.email,
2045
+ untrusted: [...PARTICIPANT_UNTRUSTED]
2046
+ })));
1875
2047
  }, "meetingPeople");
1876
2048
  var PAGE_NEXT2 = STEPS.find((step) => step.id === "page.next");
1877
2049
  var meetingsList = /* @__PURE__ */ __name(async (store, filter = {}) => {
@@ -1903,11 +2075,11 @@ var meetingsList = /* @__PURE__ */ __name(async (store, filter = {}) => {
1903
2075
  } : {}
1904
2076
  };
1905
2077
  }, "meetingsList");
1906
- var meetingsQuery = /* @__PURE__ */ __name((text5) => {
1907
- if (text5 === void 0 || text5.trim() === "")
2078
+ var meetingsQuery = /* @__PURE__ */ __name((text6) => {
2079
+ if (text6 === void 0 || text6.trim() === "")
1908
2080
  return void 0;
1909
2081
  const context3 = { command: "meetings list", guide: MEETING_QUERY_GUIDE };
1910
- const query = parseLucene(text5, { defaultField: "none", ...context3 });
2082
+ const query = parseLucene(text6, { defaultField: "none", ...context3 });
1911
2083
  validateQuery(query, MEETING_QUERY, context3);
1912
2084
  return query;
1913
2085
  }, "meetingsQuery");
@@ -1930,7 +2102,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId)
1930
2102
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
1931
2103
  }, "meetingSummaryAnswer");
1932
2104
 
1933
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/export.js
2105
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/export.js
1934
2106
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
1935
2107
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
1936
2108
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -1939,10 +2111,10 @@ var timestamp = /* @__PURE__ */ __name((milliseconds) => {
1939
2111
  const seconds = Math.floor(milliseconds % 6e4 / 1e3);
1940
2112
  return `${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}.${String(milliseconds % 1e3).padStart(3, "0")}`;
1941
2113
  }, "timestamp");
1942
- var vttText = /* @__PURE__ */ __name((text5) => {
1943
- if (visibleControls(text5) !== text5 || /\n\s*\n/.test(text5))
2114
+ var vttText = /* @__PURE__ */ __name((text6) => {
2115
+ if (visibleControls(text6) !== text6 || /\n\s*\n/.test(text6))
1944
2116
  throw new MeetingError("validation_error", "cue paragraphs or control characters require Markdown export");
1945
- return text5.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
2117
+ return text6.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
1946
2118
  }, "vttText");
1947
2119
  var serializeVtt = /* @__PURE__ */ __name((lines) => `WEBVTT
1948
2120
 
@@ -1960,9 +2132,9 @@ ${speaker}${vttText(line2.text)}
1960
2132
 
1961
2133
  `;
1962
2134
  }).join("")}`, "serializeVtt");
1963
- var markdown = /* @__PURE__ */ __name((text5) => visibleControls(text5).replace(/[\\`*_{}[\]()<>#+.!|~]/g, "\\$&"), "markdown");
1964
- var heading = /* @__PURE__ */ __name((text5) => markdown(singleLine(text5)), "heading");
1965
- var quote = /* @__PURE__ */ __name((text5) => markdown(text5).split(/\r\n|\r|\n/).map((line2) => `> ${line2}`).join("\n"), "quote");
2135
+ var markdown = /* @__PURE__ */ __name((text6) => visibleControls(text6).replace(/[\\`*_{}[\]()<>#+.!|~]/g, "\\$&"), "markdown");
2136
+ var heading = /* @__PURE__ */ __name((text6) => markdown(singleLine(text6)), "heading");
2137
+ var quote = /* @__PURE__ */ __name((text6) => markdown(text6).split(/\r\n|\r|\n/).map((line2) => `> ${line2}`).join("\n"), "quote");
1966
2138
  var transcriptsOf = /* @__PURE__ */ __name((details, transcriptId) => {
1967
2139
  if (transcriptId !== void 0) {
1968
2140
  positiveInteger(transcriptId);
@@ -1992,44 +2164,45 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
1992
2164
  text: row.text
1993
2165
  })));
1994
2166
  } else {
1995
- const parts2 = [`# ${heading(details.meeting.title ?? "Untitled meeting")}`, `Meeting ID: ${details.meeting.id}`];
2167
+ const parts = [`# ${heading(details.meeting.title ?? "Untitled meeting")}`, `Meeting ID: ${details.meeting.id}`];
1996
2168
  if (details.meeting.description !== null)
1997
- parts2.push("## Description", quote(details.meeting.description));
2169
+ parts.push("## Description", quote(details.meeting.description));
1998
2170
  for (const summary of details.summaries) {
1999
- parts2.push(`## ${heading(summary.title ?? "Summary")}`);
2171
+ parts.push(`## ${heading(summary.title ?? "Summary")}`);
2000
2172
  if (summary.content !== null)
2001
- parts2.push(quote(summary.content));
2173
+ parts.push(quote(summary.content));
2002
2174
  else {
2003
2175
  if (summary.overview !== null)
2004
- parts2.push(quote(summary.overview));
2176
+ parts.push(quote(summary.overview));
2005
2177
  for (const section of summary.sections)
2006
- parts2.push(`### ${heading(section.label)}`, quote(section.text));
2178
+ parts.push(`### ${heading(section.label)}`, quote(section.text));
2007
2179
  if (summary.nextSteps.length > 0)
2008
- parts2.push("### Next steps", summary.nextSteps.map((step) => `- ${markdown(step)}`).join("\n"));
2180
+ parts.push("### Next steps", summary.nextSteps.map((step) => `- ${markdown(step)}`).join("\n"));
2009
2181
  }
2010
2182
  }
2011
2183
  for (const part of transcripts) {
2012
- parts2.push(`## Transcript ${part.transcript.id}`, `Source: ${heading(part.transcript.source)}`);
2184
+ parts.push(`## Transcript ${part.transcript.id}`, `Source: ${heading(part.transcript.source)}`);
2013
2185
  if (part.transcript.supersededAt !== null)
2014
- parts2.push("Version: superseded");
2186
+ parts.push("Version: superseded");
2015
2187
  for (const row of [...part.rows].sort((a, b) => a.position - b.position))
2016
- parts2.push(`[${timestamp(row.startMs)} \u2013 ${timestamp(row.endMs)}]${row.speakerName === null ? "" : ` ${heading(row.speakerName)}`}`, quote(row.text));
2188
+ parts.push(`[${timestamp(row.startMs)} \u2013 ${timestamp(row.endMs)}]${row.speakerName === null ? "" : ` ${heading(row.speakerName)}`}`, quote(row.text));
2017
2189
  }
2018
- content = `${parts2.join("\n\n")}
2190
+ content = `${parts.join("\n\n")}
2019
2191
  `;
2020
2192
  }
2021
2193
  return {
2022
2194
  meetingId: details.meeting.id,
2023
2195
  format: options.format,
2024
2196
  filename: `meeting-${details.meeting.id}${options.transcriptId === void 0 ? "" : `-transcript-${options.transcriptId}`}.${options.format === "markdown" ? "md" : "vtt"}`,
2025
- content
2197
+ content,
2198
+ untrusted: ["content"]
2026
2199
  };
2027
2200
  }, "exportMeeting");
2028
2201
 
2029
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
2202
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
2030
2203
  import { createHash as createHash2 } from "node:crypto";
2031
2204
 
2032
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
2205
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
2033
2206
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
2034
2207
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
2035
2208
  throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
@@ -2040,7 +2213,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
2040
2213
  return new Date(value).toISOString();
2041
2214
  }, "meetingTimestamp");
2042
2215
 
2043
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
2216
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
2044
2217
  var TASK_TYPES = ["bug", "feature", "chore"];
2045
2218
  var invalid3 = /* @__PURE__ */ __name((message) => {
2046
2219
  throw new CliError("validation_error", message);
@@ -2054,10 +2227,10 @@ var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update
2054
2227
  var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
2055
2228
  var findingWhere = /* @__PURE__ */ __name((of) => {
2056
2229
  const id4 = typeof of.id === "string" ? of.id : null;
2057
- const kind3 = typeof of.kind === "string" ? of.kind : null;
2230
+ const kind2 = typeof of.kind === "string" ? of.kind : null;
2058
2231
  return {
2059
- where: id4 || kind3 ? ` in ${[id4, kind3 && `(${kind3})`].filter(Boolean).join(" ")}` : "",
2060
- named: { ...id4 ? { finding: id4 } : {}, ...kind3 ? { kind: kind3 } : {} }
2232
+ where: id4 || kind2 ? ` in ${[id4, kind2 && `(${kind2})`].filter(Boolean).join(" ")}` : "",
2233
+ named: { ...id4 ? { finding: id4 } : {}, ...kind2 ? { kind: kind2 } : {} }
2061
2234
  };
2062
2235
  }, "findingWhere");
2063
2236
  var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
@@ -2215,7 +2388,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
2215
2388
  var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
2216
2389
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
2217
2390
 
2218
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/findings.js
2391
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/findings.js
2219
2392
  var MEETING_FINDINGS_KIND = "meeting_findings";
2220
2393
  var cue = /* @__PURE__ */ __name((raw) => {
2221
2394
  const reference2 = canonicalMeetingReference(raw);
@@ -2226,119 +2399,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
2226
2399
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
2227
2400
  var meetingFindingFingerprint = findingFingerprint;
2228
2401
 
2229
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
2230
- var context = {
2231
- command: "search meetings",
2232
- guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
2233
- };
2234
- var words = ["term", "phrase"];
2235
- var MOST_LINES_APART = 20;
2236
- var near = /* @__PURE__ */ __name((node) => {
2237
- if (node.slop !== void 0 && node.slop > MOST_LINES_APART)
2238
- queryError("query.invalid-number", node.span, `words at most ${MOST_LINES_APART} lines apart: "a b"~${MOST_LINES_APART}`, context);
2239
- }, "near");
2240
- var MEETING_HIT_QUERY = defineQuery({
2241
- entity: "meeting_hit",
2242
- backend: "sql",
2243
- fields: [
2244
- {
2245
- name: "text",
2246
- type: "txt",
2247
- operators: words,
2248
- example: "text:budget",
2249
- relation: "a passage with the word in any form, or a spelling speech recognition garbled",
2250
- validate: near
2251
- },
2252
- {
2253
- name: "exact",
2254
- type: "txt",
2255
- operators: words,
2256
- example: "exact:budget",
2257
- relation: "a passage with the word as typed: no other forms, no garbled spellings",
2258
- validate: near
2259
- },
2260
- {
2261
- name: "from",
2262
- type: "kw",
2263
- operators: words,
2264
- example: 'from:"Alice Synthetic"',
2265
- relation: "a line said or a chat message written by this person; attendance is --identity-id"
2266
- }
2267
- ]
2268
- });
2269
- var MEETING_FIELDS = defineQuery({
2270
- entity: "meeting_hit",
2271
- backend: "sql",
2272
- fields: [
2273
- ...MEETING_HIT_QUERY.fields,
2274
- {
2275
- name: "date",
2276
- type: "time",
2277
- operators: ["term", "range"],
2278
- example: "date>=30d",
2279
- relation: "meetings that started then; the same as --since-time and --until-time"
2280
- },
2281
- ...["project", "tag", "topic"].map((name) => ({
2282
- name,
2283
- type: "kw",
2284
- operators: words,
2285
- example: `${name}:"Example name"`,
2286
- relation: `meetings in this ${name}, by name or alias; the same as --${name}`
2287
- }))
2288
- ]
2289
- });
2290
- var LIFTED = /* @__PURE__ */ new Set(["date", "project", "tag", "topic"]);
2291
- var MEETING_FIELD_NAMES = new Set(MEETING_FIELDS.fields.map(({ name }) => name));
2292
- var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) => {
2293
- let ast;
2294
- try {
2295
- ast = validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_FIELDS, context);
2296
- } catch (error) {
2297
- if (error instanceof CliError)
2298
- return { query, request };
2299
- throw error;
2300
- }
2301
- const top = ast.root.kind === "boolean" ? ast.root.clauses : [{ occur: "must", node: ast.root }];
2302
- const lifted = top.filter((clause) => clause.node.kind === "predicate" && LIFTED.has(clause.node.field));
2303
- const misplaced = /* @__PURE__ */ __name((node, nested) => node.kind === "predicate" ? nested && LIFTED.has(node.field) ? node : void 0 : node.clauses.map((clause) => misplaced(clause.node, true)).find(Boolean), "misplaced");
2304
- const wrong = lifted.find((clause) => clause.occur !== "must")?.node ?? top.map((clause) => clause.node.kind === "boolean" ? misplaced(clause.node, true) : void 0).find(Boolean);
2305
- if (wrong)
2306
- queryError("query.unsupported-field", wrong.span, `${wrong.field}: chooses meetings; join it to the words with AND, outside OR, NOT and groups`, context);
2307
- if (!lifted.length)
2308
- return { query, request };
2309
- const next = { ...request };
2310
- const once = /* @__PURE__ */ __name((name, flag2) => {
2311
- if (next[name] !== void 0)
2312
- throw new CliError("validation_error", `give ${flag2.replace(/^--/, "")} once: as ${flag2} or in the query`);
2313
- }, "once");
2314
- for (const { node } of lifted) {
2315
- if (node.field === "date") {
2316
- 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);
2317
- if (range.lower !== void 0) {
2318
- once("since", "--since-time");
2319
- next.since = range.lower + (range.lower_inclusive ? 0 : 1);
2320
- }
2321
- if (range.upper !== void 0) {
2322
- once("until", "--until-time");
2323
- next.until = range.upper - (range.upper_inclusive ? 0 : 1);
2324
- }
2325
- } else {
2326
- const field = node.field;
2327
- once(field, `--${field}`);
2328
- next[field] = node.value;
2329
- }
2330
- }
2331
- let rest = query;
2332
- for (const { node } of [...lifted].sort((a, b) => b.node.span.start - a.node.span.start))
2333
- rest = `${rest.slice(0, node.span.start)}${rest.slice(node.span.end)}`;
2334
- rest = rest.replace(/(^|\s)\+(?=\s|$)/g, "$1").replace(/^(?:\s*(?:AND\b|&&))+|(?:(?:\bAND|&&)\s*)+$/g, "").replace(/(?:\bAND|&&)(\s+(?:AND\b|&&))+/g, "AND").trim();
2335
- if (!rest)
2336
- throw new CliError("validation_error", "give words to find besides date:, project:, tag: and topic:");
2337
- return { query: rest, request: next };
2338
- }, "liftMeetingFields");
2339
- var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
2340
-
2341
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/language.js
2402
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/language.js
2342
2403
  var LATIN_WORDS = {
2343
2404
  en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
2344
2405
  es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
@@ -2353,11 +2414,11 @@ var CYRILLIC = new RegExp("\\p{Script=Cyrillic}", "gu");
2353
2414
  var LATIN = new RegExp("\\p{Script=Latin}", "gu");
2354
2415
  var MIN_LETTERS = 20;
2355
2416
  var DOMINANT = 0.75;
2356
- var countOf = /* @__PURE__ */ __name((text5, pattern2) => text5.match(pattern2)?.length ?? 0, "countOf");
2417
+ var countOf = /* @__PURE__ */ __name((text6, pattern2) => text6.match(pattern2)?.length ?? 0, "countOf");
2357
2418
  var latinLanguage = /* @__PURE__ */ __name((texts) => {
2358
2419
  const votes = /* @__PURE__ */ new Map();
2359
- for (const text5 of texts)
2360
- for (const word of text5.toLowerCase().split(/[^\p{L}]+/u)) {
2420
+ for (const text6 of texts)
2421
+ for (const word of text6.toLowerCase().split(/[^\p{L}]+/u)) {
2361
2422
  const language = LATIN_LANGUAGE.get(word);
2362
2423
  if (language)
2363
2424
  votes.set(language, (votes.get(language) ?? 0) + 1);
@@ -2372,10 +2433,10 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
2372
2433
  let cyrillic = 0;
2373
2434
  let latin = 0;
2374
2435
  let ukrainian = 0;
2375
- for (const text5 of all) {
2376
- cyrillic += countOf(text5, CYRILLIC);
2377
- latin += countOf(text5, LATIN);
2378
- ukrainian += countOf(text5, UKRAINIAN);
2436
+ for (const text6 of all) {
2437
+ cyrillic += countOf(text6, CYRILLIC);
2438
+ latin += countOf(text6, LATIN);
2439
+ ukrainian += countOf(text6, UKRAINIAN);
2379
2440
  }
2380
2441
  const letters = cyrillic + latin;
2381
2442
  if (letters < MIN_LETTERS)
@@ -2387,9 +2448,9 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
2387
2448
  return null;
2388
2449
  }, "transcriptLanguage");
2389
2450
 
2390
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
2391
- var contentHash = /* @__PURE__ */ __name(async (text5) => {
2392
- const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text5));
2451
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
2452
+ var contentHash = /* @__PURE__ */ __name(async (text6) => {
2453
+ const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
2393
2454
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
2394
2455
  }, "contentHash");
2395
2456
  var speakerPosition = /* @__PURE__ */ __name((name, participants) => {
@@ -2424,7 +2485,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
2424
2485
  return time;
2425
2486
  }, "timestamp");
2426
2487
 
2427
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2488
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2428
2489
  var TranscriptTextError = class extends Error {
2429
2490
  static {
2430
2491
  __name(this, "TranscriptTextError");
@@ -2441,10 +2502,10 @@ var LINE = /^\[(\d{2,}):([0-5]\d):([0-5]\d)\]\s*(?:([^:\n]{1,60}):\s*)?([\s\S]*)
2441
2502
  var RULE = /^[—–-]{10,}[^\n]*(?:\n|$)/;
2442
2503
  var EMPTY = /* @__PURE__ */ new Set(["", "\u2014", "-"]);
2443
2504
  var parseTranscriptText = /* @__PURE__ */ __name((input) => {
2444
- const text5 = input.replace(/^/, "").replace(/\r\n?/g, "\n");
2505
+ const text6 = input.replace(/^/, "").replace(/\r\n?/g, "\n");
2445
2506
  const header = { title: null, date: null, meetingId: null, speakers: [] };
2446
2507
  let sawHeader = false;
2447
- for (const line2 of text5.split("\n")) {
2508
+ for (const line2 of text6.split("\n")) {
2448
2509
  if (!line2.trim())
2449
2510
  break;
2450
2511
  for (const [prefix, key] of Object.entries(HEADER)) {
@@ -2461,7 +2522,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
2461
2522
  if (!sawHeader)
2462
2523
  throw new TranscriptTextError('a text transcript starts with a header such as "\u0412\u0441\u0442\u0440\u0435\u0447\u0430: \u2026"');
2463
2524
  const found = [];
2464
- for (const block of text5.split(/\n\s*\n/)) {
2525
+ for (const block of text6.split(/\n\s*\n/)) {
2465
2526
  const match = LINE.exec(block.trim().replace(RULE, ""));
2466
2527
  if (!match)
2467
2528
  continue;
@@ -2479,7 +2540,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
2479
2540
  return { header, lines };
2480
2541
  }, "parseTranscriptText");
2481
2542
 
2482
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2543
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2483
2544
  var VttError = class extends Error {
2484
2545
  static {
2485
2546
  __name(this, "VttError");
@@ -2495,12 +2556,12 @@ var millis = /* @__PURE__ */ __name((stamp, lineNo) => {
2495
2556
  const [, hours = "0", minutes = "0", seconds = "0", ms2 = "0"] = match;
2496
2557
  return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3 + Number(ms2);
2497
2558
  }, "millis");
2498
- var splitSpeaker = /* @__PURE__ */ __name((text5) => {
2499
- const firstLine = text5.split("\n", 1)[0] ?? "";
2559
+ var splitSpeaker = /* @__PURE__ */ __name((text6) => {
2560
+ const firstLine = text6.split("\n", 1)[0] ?? "";
2500
2561
  const at = firstLine.indexOf(": ");
2501
2562
  if (at <= 0)
2502
- return { speaker: null, text: text5 };
2503
- return { speaker: firstLine.slice(0, at).trim(), text: text5.slice(at + 2) };
2563
+ return { speaker: null, text: text6 };
2564
+ return { speaker: firstLine.slice(0, at).trim(), text: text6.slice(at + 2) };
2504
2565
  }, "splitSpeaker");
2505
2566
  var parseVtt = /* @__PURE__ */ __name((input) => {
2506
2567
  const lines = input.replace(/^/, "").split(/\r\n|\r|\n/);
@@ -2525,13 +2586,13 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
2525
2586
  const lineNo = start + timingAt + 1;
2526
2587
  const [from = "", rest = ""] = (block[timingAt] ?? "").split("-->");
2527
2588
  const to = rest.trim().split(/\s+/)[0] ?? "";
2528
- const text5 = block.slice(timingAt + 1).join("\n").trim();
2529
- cues.push({ startMs: millis(from.trim(), lineNo), endMs: millis(to, lineNo), ...splitSpeaker(text5) });
2589
+ const text6 = block.slice(timingAt + 1).join("\n").trim();
2590
+ cues.push({ startMs: millis(from.trim(), lineNo), endMs: millis(to, lineNo), ...splitSpeaker(text6) });
2530
2591
  }
2531
2592
  return cues;
2532
2593
  }, "parseVtt");
2533
2594
 
2534
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/import.js
2595
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/import.js
2535
2596
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
2536
2597
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
2537
2598
  for (const file of files) {
@@ -2564,23 +2625,44 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
2564
2625
  return report;
2565
2626
  }, "importFiles");
2566
2627
 
2567
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/links.js
2628
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/links.js
2568
2629
  var CHAT_MESSAGES_READ = 1e5;
2569
2630
 
2570
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/passage.js
2631
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2632
+ var MEETING_FIELD_KEYS = Object.freeze({
2633
+ title: "title",
2634
+ kind: "kind",
2635
+ startTime: "start_time",
2636
+ durationMinutes: "duration_minutes",
2637
+ timezone: "timezone",
2638
+ agenda: "agenda"
2639
+ });
2640
+ var MEETING_FIELDS2 = Object.freeze(Object.keys(MEETING_FIELD_KEYS));
2641
+ var meetingFieldFlag = /* @__PURE__ */ __name((field) => `--${MEETING_FIELD_KEYS[field].replaceAll("_", "-")}`, "meetingFieldFlag");
2642
+ var SNAKE_CASE2 = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;
2643
+
2644
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/passage.js
2571
2645
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
2572
2646
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
2573
2647
  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)))
2574
2648
  throw new CliError("validation_error", "context takes 0\u2013999 surrounding cues, 2\u20134194304 output bytes and a bounded read budget");
2575
2649
  return { before, after, bytes, max_read_bytes };
2576
2650
  }, "meetingHitContextLimits");
2651
+ var MEETING_CUE_UNTRUSTED = ["speaker_name", "text"];
2652
+ var markedPassage = /* @__PURE__ */ __name((result) => ({
2653
+ ...result,
2654
+ packet: {
2655
+ ...result.packet,
2656
+ items: result.packet.items.map((cue2) => ({ ...cue2, untrusted: [...MEETING_CUE_UNTRUSTED] }))
2657
+ }
2658
+ }), "markedPassage");
2577
2659
  var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
2578
2660
  meetingHitContextLimits(options);
2579
2661
  if (typeof reference2 !== "string" || !reference2.trim() || reference2.length > 200 || options.format !== void 0 && !["json", "text", "markdown"].includes(options.format))
2580
2662
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
2581
2663
  }, "validateMeetingPassage");
2582
2664
 
2583
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2665
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2584
2666
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2585
2667
  if (!original || typeof original !== "object" || Array.isArray(original))
2586
2668
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -2605,7 +2687,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2605
2687
  return { ...input, limit, maxReadBytes };
2606
2688
  }, "validateMeetingPreparationContext");
2607
2689
 
2608
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2690
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2609
2691
  var count4 = pipe(number(), integer(), minValue(0));
2610
2692
  var id2 = pipe(string(), minLength(1));
2611
2693
  var meetingProjectEvidence = strictObject({
@@ -2726,7 +2808,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
2726
2808
  };
2727
2809
  }, "meetingProjectEvidenceAnswer");
2728
2810
 
2729
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2811
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2730
2812
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2731
2813
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
2732
2814
  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) || [
@@ -2746,7 +2828,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2746
2828
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
2747
2829
  }, "validateMeetingHitSearch");
2748
2830
 
2749
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2831
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2750
2832
  var ids = {
2751
2833
  meeting_id: "meetingId",
2752
2834
  identity_id: "participantIdentityId",
@@ -2837,7 +2919,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
2837
2919
  return { project: project.trim(), options, query: frozen.join(" AND ") };
2838
2920
  }, "prepareMeetingProjectEvidence");
2839
2921
 
2840
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2922
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2841
2923
  var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
2842
2924
  const prepared = prepareMeetingProjectEvidence(project, request, now);
2843
2925
  const page = await read(prepared.project, prepared.options);
@@ -2845,7 +2927,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
2845
2927
  return meetingProjectEvidenceAnswer(page, prepared);
2846
2928
  }, "readMeetingProjectEvidence");
2847
2929
 
2848
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2930
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2849
2931
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
2850
2932
  const { identityExternalId, phone, ...fields } = p;
2851
2933
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
@@ -2884,6 +2966,7 @@ var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount
2884
2966
  timezone: m.timezone ?? kept?.timezone ?? null,
2885
2967
  hostIdentityId: kept?.hostIdentityId ?? null,
2886
2968
  ...count7 === void 0 ? {} : { participantsCount: count7 },
2969
+ ...m.call ? { direction: m.call.direction ?? null, clientPhone: m.call.clientPhone ?? null } : {},
2887
2970
  metadata,
2888
2971
  deletedAt: null
2889
2972
  };
@@ -2901,9 +2984,9 @@ var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount
2901
2984
  };
2902
2985
  return meeting2;
2903
2986
  }, "sourceMeetingInput");
2904
- var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts2, { accountId, now, kept }) => {
2987
+ var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts, { accountId, now, kept }) => {
2905
2988
  const id4 = m.occurrence.id;
2906
- const { participants: sourceParticipants, transcript: lines, chat, summary } = parts2;
2989
+ const { participants: sourceParticipants, transcript: lines, chat, summary } = parts;
2907
2990
  const participants = participantInputs(source.provider, id4, sourceParticipants ?? [], accountId);
2908
2991
  const meeting2 = sourceMeetingInput(m, accountId, sourceParticipants === void 0 ? void 0 : sourceParticipants?.length ?? null, kept);
2909
2992
  const linked = sourceParticipants !== void 0;
@@ -2934,8 +3017,8 @@ var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts2,
2934
3017
  metadata: summary.metadata ?? null
2935
3018
  }
2936
3019
  ] : void 0,
2937
- attachments: parts2.files ?? void 0,
2938
- documents: parts2.documents ?? void 0,
3020
+ attachments: parts.files ?? void 0,
3021
+ documents: parts.documents ?? void 0,
2939
3022
  now
2940
3023
  });
2941
3024
  if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
@@ -3045,7 +3128,7 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
3045
3128
  return report;
3046
3129
  }, "pull");
3047
3130
 
3048
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
3131
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
3049
3132
  var text3 = string();
3050
3133
  var count5 = pipe(number(), integer(), minValue(0));
3051
3134
  var id3 = pipe(number(), integer(), minValue(1));
@@ -3134,7 +3217,8 @@ var meetingParticipants = strictObject({
3134
3217
  identity_id: id3,
3135
3218
  display_name: nullable(text3),
3136
3219
  email: nullable(text3),
3137
- person: nullable(strictObject({ ref: text3, name: nullable(text3) }))
3220
+ person: nullable(strictObject({ ref: text3, name: nullable(text3) })),
3221
+ untrusted: optional(array(text3))
3138
3222
  })),
3139
3223
  /** Several identities on one page are observations, never speaker attribution or person links. */
3140
3224
  ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(id3) }),
@@ -3186,7 +3270,9 @@ var meetingPassage = strictObject({
3186
3270
  speaker_participant_id: nullable(id3),
3187
3271
  speaker_name: nullable(text3),
3188
3272
  text: text3,
3189
- revision
3273
+ revision,
3274
+ /** What people said: `speaker_name` and `text`. */
3275
+ untrusted: optional(array(text3))
3190
3276
  }))
3191
3277
  });
3192
3278
  var event = strictObject({
@@ -3240,13 +3326,14 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
3240
3326
  updated_at: new Date(one.updatedAt).toISOString()
3241
3327
  }), "eventItem");
3242
3328
 
3243
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
3329
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
3244
3330
  var MEETING_SERVER_BOUNDS = { calls: 3, pages: 2 };
3245
3331
  var ISSUES = {
3246
3332
  offline: ["permission_error", "meetings.server-offline"],
3247
3333
  unreachable: ["network_error", "meetings.server-unreachable"],
3248
3334
  not_signed_in: ["authentication_error", "meetings.server-signed-out"],
3249
3335
  refused: ["permission_error", "meetings.server-refused"],
3336
+ rate_limited: ["rate_limited", "meetings.server-rate-limited"],
3250
3337
  failed: ["provider_error", "meetings.server-failed"]
3251
3338
  };
3252
3339
  var metaOf = /* @__PURE__ */ __name((reason, provider) => {
@@ -3259,6 +3346,7 @@ var WHY = {
3259
3346
  unreachable: /* @__PURE__ */ __name((provider) => `${provider} could not be reached \u2014 the answer is the store's`, "unreachable"),
3260
3347
  not_signed_in: /* @__PURE__ */ __name((provider) => `not signed in to ${provider} \u2014 the answer is the store's`, "not_signed_in"),
3261
3348
  refused: /* @__PURE__ */ __name((provider) => `${provider} refused the request \u2014 the answer is the store's`, "refused"),
3349
+ rate_limited: /* @__PURE__ */ __name((provider) => `${provider} asked to wait before more requests \u2014 the answer is the store's`, "rate_limited"),
3262
3350
  failed: /* @__PURE__ */ __name((provider) => `${provider} could not be read \u2014 the answer is the store's`, "failed"),
3263
3351
  no_upcoming: /* @__PURE__ */ __name((provider) => `${provider} lists no meeting before it starts \u2014 upcoming ones are not in the answer`, "no_upcoming")
3264
3352
  };
@@ -3270,6 +3358,8 @@ var reasonOf = /* @__PURE__ */ __name((error) => {
3270
3358
  return "refused";
3271
3359
  if (code === "network_error")
3272
3360
  return "unreachable";
3361
+ if (code === "rate_limited")
3362
+ return "rate_limited";
3273
3363
  return "failed";
3274
3364
  }, "reasonOf");
3275
3365
  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");
@@ -3324,9 +3414,9 @@ var stepFor = /* @__PURE__ */ __name((backend) => ({
3324
3414
  found: /* @__PURE__ */ new Map(),
3325
3415
  missing: []
3326
3416
  }), "stepFor");
3327
- var keep = /* @__PURE__ */ __name(async (source, store, accountId, now, step, found, parts2, fresh = false) => {
3417
+ var keep = /* @__PURE__ */ __name(async (source, store, accountId, now, step, found, parts, fresh = false) => {
3328
3418
  const stored = await storedByExternalId(store, accountId, found.meeting.occurrence.id);
3329
- const details = stored && !fresh && unchanged(found, stored, accountId) ? stored : await saveSourceMeeting(source, store, found.meeting, parts2, {
3419
+ const details = stored && !fresh && unchanged(found, stored, accountId) ? stored : await saveSourceMeeting(source, store, found.meeting, parts, {
3330
3420
  accountId,
3331
3421
  now,
3332
3422
  ...stored ? { kept: stored.meeting } : {}
@@ -3460,20 +3550,20 @@ var listThrough = /* @__PURE__ */ __name(async (source, store, filter, access) =
3460
3550
  };
3461
3551
  }, "listThrough");
3462
3552
  var storedMeeting = /* @__PURE__ */ __name(async (store, accountId, meeting2) => {
3463
- const text5 = meeting2.trim();
3553
+ const text6 = meeting2.trim();
3464
3554
  const own = /* @__PURE__ */ __name((details) => details?.meeting.accountId === accountId ? details : null, "own");
3465
- if (/^[1-9]\d*$/.test(text5) && Number.isSafeInteger(Number(text5))) {
3466
- const byNumber = own(await store.meeting(Number(text5)));
3555
+ if (/^[1-9]\d*$/.test(text6) && Number.isSafeInteger(Number(text6))) {
3556
+ const byNumber = own(await store.meeting(Number(text6)));
3467
3557
  if (byNumber)
3468
3558
  return byNumber;
3469
3559
  }
3470
- if (text5.startsWith("meeting:")) {
3471
- const reference2 = parseMeetingReference(text5);
3560
+ if (text6.startsWith("meeting:")) {
3561
+ const reference2 = parseMeetingReference(text6);
3472
3562
  if (reference2.accountId !== accountId)
3473
3563
  throw new MeetingError("not_found", "meeting not found");
3474
3564
  return own(await store.meeting(reference2.meetingId));
3475
3565
  }
3476
- return store.meetingByExternalId ? own(await store.meetingByExternalId(accountId, text5)) : null;
3566
+ return store.meetingByExternalId ? own(await store.meetingByExternalId(accountId, text6)) : null;
3477
3567
  }, "storedMeeting");
3478
3568
  var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId, meeting2, access) => {
3479
3569
  if (!meeting2.trim())
@@ -3528,10 +3618,10 @@ var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId,
3528
3618
  return { details: fresh, foundIn: step.found.get(details.meeting.id) ?? "server", server: step.report };
3529
3619
  }, "meetingShowThrough");
3530
3620
 
3531
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
3621
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
3532
3622
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
3533
3623
 
3534
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
3624
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
3535
3625
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
3536
3626
  if (!original || typeof original !== "object" || Array.isArray(original))
3537
3627
  throw new CliError("validation_error", "related history request is required");
@@ -3561,7 +3651,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
3561
3651
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
3562
3652
  }, "validateMeetingRelatedHistory");
3563
3653
 
3564
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
3654
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
3565
3655
  var text4 = string();
3566
3656
  var identifier = pipe(text4, minLength(1));
3567
3657
  var nullableText = nullable(text4);
@@ -3577,7 +3667,13 @@ var run = strictObject({
3577
3667
  timezone: optional(text4)
3578
3668
  });
3579
3669
  var exported = union([
3580
- strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text4, content: text4 }),
3670
+ strictObject({
3671
+ meeting_id: identifier,
3672
+ format: picklist(["markdown", "vtt"]),
3673
+ filename: text4,
3674
+ content: text4,
3675
+ untrusted: optional(array(text4))
3676
+ }),
3581
3677
  strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text4 })
3582
3678
  ]);
3583
3679
  var eventChange = strictObject({
@@ -3699,7 +3795,8 @@ var managedChange = strictObject({
3699
3795
  start_time: optional(text4),
3700
3796
  duration_minutes: optional(count6),
3701
3797
  timezone: optional(text4),
3702
- agenda: optional(text4)
3798
+ agenda: optional(text4),
3799
+ settings: optional(record(text4, union([text4, flag])))
3703
3800
  })),
3704
3801
  applied: flag,
3705
3802
  meeting: optional(strictObject({
@@ -3711,7 +3808,8 @@ var managedChange = strictObject({
3711
3808
  timezone: nullableText,
3712
3809
  agenda: nullableText,
3713
3810
  join_url: nullableText
3714
- }))
3811
+ })),
3812
+ untrusted: optional(array(text4))
3715
3813
  });
3716
3814
  var invitation = strictObject({ id: identifier, invitation: text4, untrusted: optional(array(text4)) });
3717
3815
  var MEETING_RESULT_ENTITIES = {
@@ -3725,14 +3823,14 @@ var MEETING_RESULT_ENTITIES = {
3725
3823
  meeting_repair: repair
3726
3824
  };
3727
3825
 
3728
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/review.js
3826
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/review.js
3729
3827
  var REVIEW_LIMIT = { default: 50, most: 200 };
3730
3828
 
3731
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3829
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3732
3830
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
3733
3831
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
3734
3832
 
3735
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3833
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3736
3834
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3737
3835
  input.signal?.throwIfAborted();
3738
3836
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -3753,10 +3851,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3753
3851
  return { ...input, limit, maxReadBytes };
3754
3852
  }, "validateMeetingSeriesHistory");
3755
3853
 
3756
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3854
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3757
3855
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
3758
3856
 
3759
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3857
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3760
3858
  function invalid4(field, response = false) {
3761
3859
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
3762
3860
  }
@@ -3772,11 +3870,11 @@ var cursorDetails = /* @__PURE__ */ __name((value) => {
3772
3870
  if (typeof value !== "string" || value.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(value))
3773
3871
  invalid4("cursor");
3774
3872
  try {
3775
- const decoded2 = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
3776
- object2(decoded2, ["version", "selection", "cursor"], "cursor");
3777
- if (decoded2.version !== 1 || typeof decoded2.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded2.selection) || !occurrenceId(decoded2.cursor))
3873
+ const decoded = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
3874
+ object2(decoded, ["version", "selection", "cursor"], "cursor");
3875
+ if (decoded.version !== 1 || typeof decoded.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded.selection) || !occurrenceId(decoded.cursor))
3778
3876
  invalid4("cursor");
3779
- return decoded2;
3877
+ return decoded;
3780
3878
  } catch {
3781
3879
  return invalid4("cursor");
3782
3880
  }
@@ -3785,671 +3883,25 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
3785
3883
  cursorDetails(value);
3786
3884
  }, "validateMeetingSeriesInventoryCursor");
3787
3885
 
3788
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/locator.js
3789
- var SCHEME = "msg:";
3790
- var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
3791
- var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
3792
- var parseLocator = /* @__PURE__ */ __name((reference2) => {
3793
- const trimmed = reference2.trim();
3794
- const parts2 = trimmed.startsWith(SCHEME) ? trimmed.slice(SCHEME.length).split("/") : [];
3795
- const malformed2 = /* @__PURE__ */ __name(() => new CliError("validation_error", `"${singleLine(reference2)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`), "malformed");
3796
- if (parts2.length !== 4 || parts2.some((part) => part === ""))
3797
- throw malformed2();
3798
- const decoded2 = /* @__PURE__ */ __name((part) => {
3799
- try {
3800
- return decodeURIComponent(part);
3801
- } catch {
3802
- throw malformed2();
3803
- }
3804
- }, "decoded");
3805
- const [provider, account, chat, message] = parts2.map(decoded2);
3806
- return { provider, account, chat, message };
3807
- }, "parseLocator");
3808
-
3809
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/references.js
3810
- var SIMPLE_REFERENCES = [
3811
- "note",
3812
- "document",
3813
- "person",
3814
- "organization",
3815
- "project",
3816
- "task",
3817
- "memory",
3818
- "fact",
3819
- "bot",
3820
- "event",
3821
- "invoice",
3822
- "payment",
3823
- "order",
3824
- "deal",
3825
- "lead",
3826
- "pipeline",
3827
- "product",
3828
- "contract",
3829
- "subscription",
3830
- "wallet",
3831
- "transaction",
3832
- "entity"
3833
- ];
3834
- var malformed = /* @__PURE__ */ __name((text5, shape) => new CliError("validation_error", `"${singleLine(text5)}" is not a reference \u2014 expected ${shape}`, {
3835
- reason: "ref.malformed"
3836
- }), "malformed");
3837
- var decoded = /* @__PURE__ */ __name((part, text5, shape) => {
3838
- try {
3839
- return decodeURIComponent(part);
3840
- } catch {
3841
- throw malformed(text5, shape);
3842
- }
3843
- }, "decoded");
3844
- var parts = /* @__PURE__ */ __name((rest, count7, text5, shape) => {
3845
- const split = rest.split("/");
3846
- if (split.length !== count7 || split.some((part) => part === ""))
3847
- throw malformed(text5, shape);
3848
- return split.map((part) => decoded(part, text5, shape));
3849
- }, "parts");
3850
- var encoded = /* @__PURE__ */ __name((...values) => values.map(encodeURIComponent).join("/"), "encoded");
3851
- var folderPath = /* @__PURE__ */ __name((path) => {
3852
- const clean = path.split("/").filter((part) => part !== "" && part !== ".").join("/");
3853
- return clean === "" ? path.trim() === "" ? "" : null : clean;
3854
- }, "folderPath");
3855
- var MEETING_SHAPE = "meeting:<account>/<meeting>[/<transcript>[/<cue>]] with safe integer ids";
3856
- var kind2 = /* @__PURE__ */ __name((spec) => spec, "kind");
3857
- var simple = /* @__PURE__ */ __name((prefix) => kind2({
3858
- prefix,
3859
- type: prefix,
3860
- shape: `${prefix}:<id>`,
3861
- parse: /* @__PURE__ */ __name((rest, text5) => {
3862
- if (!rest.trim())
3863
- throw new CliError("validation_error", `"${singleLine(text5)}" names no ${prefix}`, {
3864
- reason: "ref.malformed"
3865
- });
3866
- return { type: prefix, id: rest };
3867
- }, "parse"),
3868
- format: /* @__PURE__ */ __name((reference2) => `${reference2.type}:${reference2.id}`, "format")
3869
- }), "simple");
3870
- var REF_KINDS = [
3871
- kind2({
3872
- prefix: "msg",
3873
- type: "message",
3874
- shape: "msg:<provider>/<account>/<chat>/<message>",
3875
- parse: /* @__PURE__ */ __name((_, text5) => {
3876
- try {
3877
- return { type: "message", ...parseLocator(text5) };
3878
- } catch {
3879
- throw malformed(text5, "msg:<provider>/<account>/<chat>/<message>");
3880
- }
3881
- }, "parse"),
3882
- format: formatLocator
3883
- }),
3884
- kind2({
3885
- prefix: "chat",
3886
- type: "chat",
3887
- shape: "chat:<provider>/<account>/<chat>",
3888
- parse: /* @__PURE__ */ __name((rest, text5) => {
3889
- const [provider, account, chat] = parts(rest, 3, text5, "chat:<provider>/<account>/<chat>");
3890
- return { type: "chat", provider, account, chat };
3891
- }, "parse"),
3892
- format: /* @__PURE__ */ __name(({ provider, account, chat }) => `chat:${encoded(provider, account, chat)}`, "format")
3893
- }),
3894
- kind2({
3895
- prefix: "contact",
3896
- type: "contact",
3897
- shape: "contact:<provider>/<id>",
3898
- parse: /* @__PURE__ */ __name((rest, text5) => {
3899
- const [provider, id4] = parts(rest, 2, text5, "contact:<provider>/<id>");
3900
- return { type: "contact", provider, id: id4 };
3901
- }, "parse"),
3902
- format: /* @__PURE__ */ __name(({ provider, id: id4 }) => `contact:${encoded(provider, id4)}`, "format")
3903
- }),
3904
- kind2({
3905
- prefix: "folder",
3906
- type: "folder",
3907
- shape: "folder:<id>[/<path>]",
3908
- parse: /* @__PURE__ */ __name((rest, text5) => {
3909
- const slash = rest.indexOf("/");
3910
- const id4 = decoded(slash < 0 ? rest : rest.slice(0, slash), text5, "folder:<id>[/<path>]");
3911
- const path = slash < 0 ? null : folderPath(decoded(rest.slice(slash + 1), text5, "folder:<id>[/<path>]"));
3912
- if (!id4.trim() || path === "")
3913
- throw malformed(text5, "folder:<id>[/<path>]");
3914
- return { type: "folder", id: id4, path };
3915
- }, "parse"),
3916
- format: /* @__PURE__ */ __name(({ id: id4, path }) => path === null ? `folder:${encodeURIComponent(id4)}` : `folder:${encoded(id4, path)}`, "format")
3917
- }),
3918
- kind2({
3919
- prefix: "meeting",
3920
- type: "meeting",
3921
- shape: MEETING_SHAPE,
3922
- parse: /* @__PURE__ */ __name((_, text5) => {
3923
- try {
3924
- return parseMeetingReference(text5);
3925
- } catch {
3926
- throw malformed(text5, MEETING_SHAPE);
3927
- }
3928
- }, "parse"),
3929
- format: formatMeetingReference
3930
- }),
3931
- ...SIMPLE_REFERENCES.map(simple)
3932
- ];
3933
- var byPrefix = new Map(REF_KINDS.map((spec) => [spec.prefix, spec]));
3934
- var byType = new Map(REF_KINDS.map((spec) => [spec.type, spec]));
3935
- var offered = REF_KINDS.map(({ prefix }) => prefix).filter((prefix) => prefix !== "entity");
3936
- var distance = /* @__PURE__ */ __name((a, b) => {
3937
- let row = Array.from({ length: b.length + 1 }, (_, at) => at);
3938
- for (const [i, x] of [...a].entries()) {
3939
- const next = [i + 1];
3940
- for (const [j, y] of [...b].entries())
3941
- next.push(Math.min(row[j + 1] + 1, next[j] + 1, row[j] + (x === y ? 0 : 1)));
3942
- row = next;
3943
- }
3944
- return row[b.length];
3945
- }, "distance");
3946
- var nearest = /* @__PURE__ */ __name((typed) => offered.find((prefix) => typed.length >= 2 && prefix.startsWith(typed)) ?? offered.map((prefix) => ({ prefix, far: distance(typed, prefix) })).filter(({ far }) => far <= 2).sort((a, b) => a.far - b.far)[0]?.prefix, "nearest");
3947
- var unknownKind = /* @__PURE__ */ __name((text5, prefix, rest) => {
3948
- const near2 = prefix === "" ? void 0 : nearest(prefix);
3949
- const kinds = offered.map((one) => `${one}:`).join(", ");
3950
- const hint = near2 === void 0 ? `; kinds: ${kinds}` : `; did you mean ${near2}:${singleLine(rest)}? Kinds: ${kinds}`;
3951
- return new CliError("validation_error", `"${singleLine(text5)}" is no kind of reference${hint}`, {
3952
- reason: "ref.unknown-kind"
3953
- });
3954
- }, "unknownKind");
3955
- var formatReference = /* @__PURE__ */ __name((reference2) => byType.get(reference2.type).format(reference2), "formatReference");
3956
- var parseReference = /* @__PURE__ */ __name((text5) => {
3957
- const reference2 = text5.trim();
3958
- const colon = reference2.indexOf(":");
3959
- const prefix = colon < 0 ? "" : reference2.slice(0, colon);
3960
- const rest = reference2.slice(colon + 1);
3961
- const spec = byPrefix.get(prefix);
3962
- if (!spec)
3963
- throw unknownKind(reference2, prefix, rest);
3964
- return spec.parse(rest, reference2);
3965
- }, "parseReference");
3966
- var canonicalReference = /* @__PURE__ */ __name((text5) => formatReference(parseReference(text5)), "canonicalReference");
3967
- var looksLikeReference = /* @__PURE__ */ __name((text5) => {
3968
- const match = /^([a-z]+):\S+$/.exec(text5.trim());
3969
- return match !== null && byPrefix.has(match[1]);
3970
- }, "looksLikeReference");
3971
-
3972
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/providers.js
3973
- var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
3974
- var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
3975
- var CRM_OPENS = { deal: "deals show", lead: "leads show", pipeline: "pipelines show" };
3976
- var PROVIDERS = [
3977
- { name: "telegram", kind: "messages", aliases: ["tg"], command: "tg", opens: MESSENGER_OPENS },
3978
- { name: "telegram-bot", kind: "messages", aliases: ["tg-bot"] },
3979
- { name: "max", kind: "messages", aliases: [], command: "max", opens: MESSENGER_OPENS },
3980
- { name: "max-bot", kind: "messages", aliases: [] },
3981
- { name: "whatsapp", kind: "messages", aliases: ["wa"], command: "wa", opens: MESSENGER_OPENS },
3982
- { name: "whatsapp-bot", kind: "messages", aliases: ["wa-bot"] },
3983
- { name: "email", kind: "mail", aliases: [] },
3984
- { name: "notes", kind: "notes", aliases: [] },
3985
- { name: "local", kind: "notes", aliases: [] },
3986
- { name: "obsidian", kind: "notes", aliases: [] },
3987
- { name: "added", kind: "notes", aliases: [] },
3988
- { name: "zoom", kind: "meetings", aliases: [] },
3989
- { name: "google-meet", kind: "meetings", aliases: [], command: "gmeet" },
3990
- { name: "google-drive", kind: "documents", aliases: [] },
3991
- // Its meetings come from the notes Telemost mails (`keeper@telemost.yandex.ru`), read by a mail rule.
3992
- { name: "telemost", kind: "meetings", aliases: [] },
3993
- // A phone export's records: its SMS and its calls in the one account the import names.
3994
- { name: "phone", kind: "messages", kinds: ["messages", "events"], aliases: [], imported: true },
3995
- // Any other import: a folder of notes, a CRM's export, a script's records, under `import:<what it is>`.
3996
- { name: "import", kind: "documents", kinds: ["documents", "messages", "events"], aliases: [], imported: true }
3997
- ];
3998
- var LABELS = {
3999
- telegram: "Telegram",
4000
- "telegram-bot": "Telegram bot",
4001
- max: "MAX",
4002
- "max-bot": "MAX bot",
4003
- whatsapp: "WhatsApp",
4004
- "whatsapp-bot": "WhatsApp bot",
4005
- "google-drive": "Google Drive",
4006
- "google-meet": "Google Meet",
4007
- added: "added by hand",
4008
- email: "mail",
4009
- telemost: "Telemost"
4010
- };
4011
- var providerLabel = /* @__PURE__ */ __name((provider) => LABELS[provider] ?? provider, "providerLabel");
4012
- var FOLDER_PROVIDERS = ["local", "obsidian", "folder"];
4013
- var isFolderProvider = /* @__PURE__ */ __name((provider) => FOLDER_PROVIDERS.includes(provider), "isFolderProvider");
4014
- var folderProviderSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${FOLDER_PROVIDERS.map((name) => `'${name}'`).join(", ")})`, "folderProviderSql");
4015
- var folderProviderOf = /* @__PURE__ */ __name((format) => format === "markdown" ? "local" : "obsidian", "folderProviderOf");
4016
- var documentAccountProviders = /* @__PURE__ */ __name(() => registry.filter((entry) => entry.kind === "documents" && entry.imported !== true).map(({ name }) => name), "documentAccountProviders");
4017
- var isDocumentAccountProvider = /* @__PURE__ */ __name((provider) => typeof provider === "string" && documentAccountProviders().includes(provider), "isDocumentAccountProvider");
4018
- var documentAccountProvidersSql = /* @__PURE__ */ __name(() => documentAccountProviders().map((name) => `'${name}'`).join(", ") || "NULL", "documentAccountProvidersSql");
4019
- var ADDED_PROVIDER = "added";
4020
- var ADDED_ACCOUNT = "owner";
4021
- var notAdded = `d.account_id NOT IN (SELECT id FROM accounts WHERE provider = '${ADDED_PROVIDER}')`;
4022
- var filesAccountSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${[...FOLDER_PROVIDERS, ...documentAccountProviders(), ADDED_PROVIDER].map((name) => `'${name}'`).join(", ")})`, "filesAccountSql");
4023
- var INTERNAL_NOTES = "internal";
4024
- var UNKNOWN_PROVIDER = "unknown provider \u2014 run its CLI once";
4025
- var WORD = /^[a-z0-9][a-z0-9_-]*$/;
4026
- var invalid5 = /* @__PURE__ */ __name((message) => {
4027
- throw new CliError("validation_error", message);
4028
- }, "invalid");
4029
- var wordOf = /* @__PURE__ */ __name((value, what) => typeof value === "string" && WORD.test(value) ? value : invalid5(`${what} is lowercase letters, digits, - and _ \u2014 not ${JSON.stringify(value)}`), "wordOf");
4030
- var OPEN_KINDS = new Set(REF_KINDS.map(({ type }) => type).filter((type) => type !== "entity"));
4031
- var COMMAND_WORDS = /^[a-z0-9][a-z0-9_-]*( [a-z0-9][a-z0-9_-]*)*$/;
4032
- var opensOf = /* @__PURE__ */ __name((value, named) => {
4033
- if (typeof value !== "object" || value === null || Array.isArray(value))
4034
- return invalid5(`provider ${named}'s opens maps a kind of reference to a command`);
4035
- const known = Object.entries(value).filter(([kind3]) => OPEN_KINDS.has(kind3));
4036
- for (const [kind3, command] of known)
4037
- if (typeof command !== "string" || !COMMAND_WORDS.test(command))
4038
- invalid5(`provider ${named} opens a ${kind3} with command words, not ${JSON.stringify(command)}`);
4039
- return Object.fromEntries(known);
4040
- }, "opensOf");
4041
- var providerEntryOf = /* @__PURE__ */ __name((value) => {
4042
- if (typeof value !== "object" || value === null || Array.isArray(value))
4043
- return invalid5("a provider entry is an object");
4044
- const { name, kind: kind3, kinds, aliases = [], command, opens, imported } = value;
4045
- const named = wordOf(name, "a provider's name");
4046
- const isKindWord = /* @__PURE__ */ __name((one) => typeof one === "string" && KINDS.includes(one), "isKindWord");
4047
- const given = kinds === void 0 ? [kind3] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
4048
- for (const one of given)
4049
- if (!isKindWord(one))
4050
- invalid5(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(one)}`);
4051
- const list = [...new Set(given)];
4052
- if (kind3 !== void 0 && kind3 !== list[0])
4053
- invalid5(`provider ${named}'s kind is the first of its kinds`);
4054
- if (!Array.isArray(aliases))
4055
- invalid5(`provider ${named}'s aliases are a list`);
4056
- if (imported !== void 0 && typeof imported !== "boolean")
4057
- invalid5(`provider ${named}'s imported is true or false`);
4058
- return {
4059
- name: named,
4060
- kind: list[0],
4061
- ...list.length > 1 ? { kinds: list } : {},
4062
- ...imported === true ? { imported: true } : {},
4063
- aliases: [...new Set(aliases.map((alias) => wordOf(alias, `an alias of ${named}`)))],
4064
- ...command === void 0 ? {} : { command: wordOf(command, `the command of ${named}`) },
4065
- ...opens === void 0 ? {} : { opens: opensOf(opens, named) }
4066
- };
4067
- }, "providerEntryOf");
4068
- var kindsOfEntry = /* @__PURE__ */ __name((entry) => entry.kinds ?? [entry.kind], "kindsOfEntry");
4069
- var describe = /* @__PURE__ */ __name((entry) => `${entry.name} (${kindsOfEntry(entry).join(", ")}${entry.command ? `, from ${entry.command}` : ""})`, "describe");
4070
- var unitedKinds = /* @__PURE__ */ __name((known, entry) => [
4071
- .../* @__PURE__ */ new Set([...known, ...entry])
4072
- ], "unitedKinds");
4073
- var wordsOf2 = /* @__PURE__ */ __name(({ name, aliases }) => [name, ...aliases], "wordsOf");
4074
- var joined = /* @__PURE__ */ __name((known, entry) => {
4075
- const same = known.find(({ name }) => name === entry.name);
4076
- const kinds = same ? unitedKinds(kindsOfEntry(same), kindsOfEntry(entry)) : kindsOfEntry(entry);
4077
- if (same && same.kind !== entry.kind)
4078
- invalid5(`two provider entries disagree on the kind: ${describe(same)} and ${describe(entry)}`);
4079
- if (same && entry.imported === true && same.imported !== true)
4080
- invalid5(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
4081
- const merged = same ? {
4082
- ...same,
4083
- ...kinds.length > 1 ? { kinds } : {},
4084
- aliases: [.../* @__PURE__ */ new Set([...same.aliases, ...entry.aliases])],
4085
- ...entry.command ? { command: entry.command } : {},
4086
- ...entry.opens ? { opens: { ...same.opens, ...entry.opens } } : {}
4087
- } : entry;
4088
- const others = known.filter((one) => one !== same);
4089
- for (const word of wordsOf2(merged)) {
4090
- const owner = others.find((one) => wordsOf2(one).includes(word));
4091
- if (owner)
4092
- invalid5(`"${word}" names two providers: ${describe(owner)} and ${describe(merged)}`);
4093
- }
4094
- return same ? known.map((one) => one === same ? merged : one) : [...known, merged];
4095
- }, "joined");
4096
- var registry = PROVIDERS;
4097
- var providers = /* @__PURE__ */ __name(() => registry, "providers");
4098
- var useProviders = /* @__PURE__ */ __name((entries) => {
4099
- registry = entries.map(providerEntryOf).reduce(joined, PROVIDERS);
4100
- }, "useProviders");
4101
- var useStoredProviders = /* @__PURE__ */ __name((entries) => {
4102
- const left = [];
4103
- registry = entries.reduce((known, entry) => {
4104
- try {
4105
- return joined(known, providerEntryOf(entry));
4106
- } catch (error) {
4107
- if (!(error instanceof CliError))
4108
- throw error;
4109
- left.push(entry);
4110
- return known;
4111
- }
4112
- }, PROVIDERS);
4113
- return left;
4114
- }, "useStoredProviders");
4115
- var addProvider = /* @__PURE__ */ __name((entry) => {
4116
- registry = joined(registry, providerEntryOf(entry));
4117
- }, "addProvider");
4118
- var isKind = /* @__PURE__ */ __name((word) => KINDS.includes(word.toLowerCase()), "isKind");
4119
- var providerNamed = /* @__PURE__ */ __name((word) => {
4120
- const wanted = word.toLowerCase();
4121
- return registry.find((entry) => wordsOf2(entry).includes(wanted));
4122
- }, "providerNamed");
4123
- var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
4124
- var kindsIn = /* @__PURE__ */ __name((provider) => {
4125
- if (isFolderProvider(provider))
4126
- return ["notes"];
4127
- const entry = registry.find(({ name }) => name === provider);
4128
- if (!entry)
4129
- return [];
4130
- return entry.imported ? unitedKinds(kindsOfEntry(entry), ["documents"]) : kindsOfEntry(entry);
4131
- }, "kindsIn");
4132
- var importedOf = /* @__PURE__ */ __name((entry, held) => {
4133
- const builtIn = PROVIDERS.find(({ name }) => name === entry.name);
4134
- if (builtIn) {
4135
- if (entry.imported === true && builtIn.imported !== true)
4136
- invalid5(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
4137
- return builtIn.imported === true;
4138
- }
4139
- if (held === void 0)
4140
- return entry.imported === true;
4141
- if (entry.imported === true && held.imported !== true)
4142
- invalid5(`provider ${entry.name} was registered without imported: an entry cannot make it import-only later`);
4143
- return held.imported === true;
4144
- }, "importedOf");
4145
- var isImportedProvider = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.imported === true, "isImportedProvider");
4146
- var holdsKind = /* @__PURE__ */ __name((provider, kind3) => kindsIn(provider).includes(kind3), "holdsKind");
4147
- var holdsKindOf = /* @__PURE__ */ __name((provider, kind3) => kindIn(provider) === void 0 ? kind3 === "messages" : holdsKind(provider, kind3), "holdsKindOf");
4148
- var kindOf2 = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
4149
-
4150
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/money.js
4151
- var CURRENCY_SCALES = {
4152
- AED: 2,
4153
- AMD: 2,
4154
- AUD: 2,
4155
- BHD: 3,
4156
- BYN: 2,
4157
- CAD: 2,
4158
- CHF: 2,
4159
- CLP: 0,
4160
- CNY: 2,
4161
- CZK: 2,
4162
- DKK: 2,
4163
- EUR: 2,
4164
- GBP: 2,
4165
- GEL: 2,
4166
- HUF: 2,
4167
- ILS: 2,
4168
- INR: 2,
4169
- ISK: 0,
4170
- JPY: 0,
4171
- KGS: 2,
4172
- KRW: 0,
4173
- KWD: 3,
4174
- KZT: 2,
4175
- NOK: 2,
4176
- PLN: 2,
4177
- RSD: 2,
4178
- RUB: 2,
4179
- SEK: 2,
4180
- THB: 2,
4181
- TRY: 2,
4182
- UAH: 2,
4183
- USD: 2,
4184
- UZS: 2,
4185
- VND: 0
4186
- };
4187
- var refuse = /* @__PURE__ */ __name((message, reason) => {
4188
- throw new CliError("validation_error", message, { reason });
4189
- }, "refuse");
4190
- var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
4191
- var parseDecimal = /* @__PURE__ */ __name((text5, scale) => {
4192
- const match = DECIMAL.exec(text5.trim());
4193
- if (!match || (match[2] ?? "").length > scale)
4194
- return void 0;
4195
- return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
4196
- }, "parseDecimal");
4197
- var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
4198
- const value = BigInt(units);
4199
- if (value < 0n)
4200
- return `-${formatDecimal(-value, scale)}`;
4201
- const digits = value.toString().padStart(scale + 1, "0");
4202
- return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
4203
- }, "formatDecimal");
4204
- var groupDigits = /* @__PURE__ */ __name((decimal) => {
4205
- const [whole = "0", fraction] = decimal.split(".");
4206
- const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
4207
- return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
4208
- }, "groupDigits");
4209
- var currencyOf = /* @__PURE__ */ __name((text5) => {
4210
- const code = typeof text5 === "string" ? text5.trim().toUpperCase() : "";
4211
- if (CURRENCY_SCALES[code] === void 0)
4212
- return refuse(`${typeof text5 === "string" && text5.trim() ? text5.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
4213
- return code;
4214
- }, "currencyOf");
4215
- var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
4216
- var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
4217
- const scale = scaleOf(currency);
4218
- const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
4219
- if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
4220
- return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
4221
- return Number(units);
4222
- }, "minorUnits");
4223
- var signedMinorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
4224
- if (typeof amount !== "string" || !amount.trim().startsWith("-"))
4225
- return minorUnits(amount, currency, what);
4226
- const units = minorUnits(amount.trim().slice(1), currency, what);
4227
- return units === 0 ? 0 : -units;
4228
- }, "signedMinorUnits");
4229
- var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
4230
- amount: formatDecimal(units, scaleOf(currency)),
4231
- currency
4232
- }), "moneyOf");
4233
- var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
4234
- var QUANTITY_SCALE = 3;
4235
- var quantityOf = /* @__PURE__ */ __name((text5) => {
4236
- const thousandths = typeof text5 === "string" ? parseDecimal(text5, QUANTITY_SCALE) : void 0;
4237
- if (thousandths === void 0 || thousandths === 0n)
4238
- return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
4239
- const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
4240
- return { text: plain, thousandths };
4241
- }, "quantityOf");
4242
- var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
4243
-
4244
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/deals.js
4245
- var DEAL_KINDS = ["deal", "lead"];
4246
- var DEAL_STATUSES = ["open", "won", "lost"];
4247
- var STAGE_OUTCOMES = DEAL_STATUSES;
4248
- var DEAL_ROLES = ["owner", "contact", "decision-maker", "influencer"];
4249
- var dealLine = /* @__PURE__ */ __name((deal) => {
4250
- const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
4251
- return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
4252
- }, "dealLine");
4253
-
4254
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/finance.js
4255
- var INVOICE_DIRECTIONS = ["receivable", "payable"];
4256
- var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
4257
- var MONEY_DIRECTIONS = ["in", "out"];
4258
- var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
4259
- var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
4260
- if (current === "draft" || current === "void")
4261
- return current;
4262
- if (paid <= 0)
4263
- return "issued";
4264
- return paid < total ? "partly_paid" : "paid";
4265
- }, "settledStatus");
4266
- var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
4267
- var notes = /* @__PURE__ */ __name((...words2) => {
4268
- const kept = words2.filter((word) => word !== null);
4269
- return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
4270
- }, "notes");
4271
- var invoiceLine = /* @__PURE__ */ __name((invoice) => {
4272
- const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
4273
- const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
4274
- return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
4275
- }, "invoiceLine");
4276
- var paymentLine = /* @__PURE__ */ __name((payment) => {
4277
- const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
4278
- return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
4279
- }, "paymentLine");
4280
- var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
4281
- var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
4282
-
4283
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/orders.js
4284
- var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
4285
- var ORDER_PURPOSES = ["personal", "business", "client", "other"];
4286
- var orderLine = /* @__PURE__ */ __name((order) => {
4287
- const party = order.direction === "sale" && order.customerName !== null ? `to ${order.customerName}` : order.supplierName;
4288
- const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
4289
- const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
4290
- return `${order.number ?? `#${order.id}`} \xB7 ${party}${money} (${notes2})`;
4291
- }, "orderLine");
4292
- var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
4293
-
4294
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/relations.js
4295
- var ORGANIZATION_ROLES = [
4296
- "employee",
4297
- "contractor",
4298
- "founder",
4299
- "owner",
4300
- "manager",
4301
- "adviser",
4302
- "contact"
4303
- ];
4304
- var PROJECT_ROLES = ["owner", "manager", "contributor", "client-contact", "approver"];
4305
- var CONTRACT_ROLES = ["customer", "supplier", "signatory", "guarantor"];
4306
- var RELATED_ROLES = ["colleague", "adviser", "investor", "mentor", "family", "friend"];
4307
- var ENGAGEMENT_LEVELS = ["none", "low", "medium", "high"];
4308
- var isEngagement = /* @__PURE__ */ __name((value) => typeof value === "string" && ENGAGEMENT_LEVELS.includes(value), "isEngagement");
4309
- var checkEngagement = /* @__PURE__ */ __name((kind3, from, to, level) => {
4310
- if (kind3 !== "member-of" || from !== "person" || to !== "project")
4311
- throw new CliError("validation_error", "an engagement level is set only on a person's member-of a project", {
4312
- reason: "relationship.engagement-ends"
4313
- });
4314
- if (!isEngagement(level))
4315
- throw new CliError("validation_error", `an engagement level is one of ${ENGAGEMENT_LEVELS.join(", ")}`, {
4316
- reason: "relationship.engagement-unknown"
4317
- });
4318
- return level;
4319
- }, "checkEngagement");
4320
- var ENGAGEMENT_ORDER = { high: 0, medium: 1, unknown: 2, low: 3, none: 4 };
4321
- var engagementRank = /* @__PURE__ */ __name((level) => ENGAGEMENT_ORDER[level ?? "unknown"], "engagementRank");
4322
- var byEngagement = /* @__PURE__ */ __name((items) => items.map((item, index) => ({ item, index })).sort((a, b) => engagementRank(a.item.engagement) - engagementRank(b.item.engagement) || a.index - b.index).map(({ item }) => item), "byEngagement");
4323
- var RELATIONS = {
4324
- "member-of": {
4325
- from: ["person", "organization", "project", "chat", "email_thread"],
4326
- to: ["organization", "project"],
4327
- roles: { to: { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES } }
4328
- },
4329
- "reports-to": { from: ["person"], to: ["person"], inverse: "manages" },
4330
- "customer-of": { from: ["person", "organization"], to: ["organization"], inverse: "supplier of" },
4331
- "partner-of": { from: ["organization"], to: ["organization"], symmetric: true },
4332
- "related-to": {
4333
- from: ["person", "organization", "project", "task", "deal", "lead", "contract"],
4334
- to: ["person", "organization", "project", "task"],
4335
- roles: { from: { deal: DEAL_ROLES, lead: DEAL_ROLES, contract: CONTRACT_ROLES } }
4336
- }
4337
- };
4338
- var RELATION_KINDS = Object.keys(RELATIONS);
4339
- var specOf = /* @__PURE__ */ __name((kind3) => Object.hasOwn(RELATIONS, kind3) ? RELATIONS[kind3] : void 0, "specOf");
4340
- var isRelationKind = /* @__PURE__ */ __name((kind3) => specOf(kind3) !== void 0, "isRelationKind");
4341
- var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
4342
- var partyOnly = /* @__PURE__ */ __name((from, to) => from === "contract" && to !== "person" && to !== "organization", "partyOnly");
4343
- var checkEnds = /* @__PURE__ */ __name((kind3, from, to) => {
4344
- const spec = specOf(kind3);
4345
- if (!spec)
4346
- throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
4347
- if (memberOnly(from) && (kind3 !== "member-of" || to !== "project"))
4348
- throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
4349
- if (partyOnly(from, to))
4350
- throw new CliError("validation_error", "a contract is related only to a person or an organization");
4351
- if (!spec.from.includes(from) || !spec.to.includes(to))
4352
- throw new CliError("validation_error", `${kind3} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
4353
- return spec;
4354
- }, "checkEnds");
4355
- var isParty = /* @__PURE__ */ __name((type) => type === "person" || type === "organization", "isParty");
4356
- var rolesOf = /* @__PURE__ */ __name((kind3, from, to) => {
4357
- const spec = specOf(kind3);
4358
- if (kind3 === "member-of" && from !== "person")
4359
- return void 0;
4360
- return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
4361
- }, "rolesOf");
4362
- var ROLE_LISTS = {
4363
- organization: ORGANIZATION_ROLES,
4364
- project: PROJECT_ROLES,
4365
- deal: DEAL_ROLES,
4366
- contract: CONTRACT_ROLES,
4367
- related: RELATED_ROLES
4368
- };
4369
- var roleListOf = /* @__PURE__ */ __name((kind3, from, to) => {
4370
- if (kind3 === "related-to" && isParty(from) && isParty(to))
4371
- return "related";
4372
- const roles = rolesOf(kind3, from, to);
4373
- return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
4374
- }, "roleListOf");
4375
- var checkRole = /* @__PURE__ */ __name((kind3, from, to, role, extra = []) => {
4376
- const roles = rolesOf(kind3, from, to)?.concat(extra);
4377
- if (roles && !roles.includes(role))
4378
- throw new CliError("validation_error", `a ${from}'s role on ${kind3} ${to} is one of ${roles.join(", ")}`, {
4379
- reason: "relationship.role-unknown"
4380
- });
4381
- return role;
4382
- }, "checkRole");
4383
- var isSymmetric = /* @__PURE__ */ __name((kind3) => specOf(kind3)?.symmetric === true, "isSymmetric");
4384
- var inverseOf = /* @__PURE__ */ __name((kind3) => specOf(kind3)?.symmetric ? kind3 : specOf(kind3)?.inverse ?? null, "inverseOf");
4385
- var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
4386
- var standingOf = /* @__PURE__ */ __name((link, now) => {
4387
- if (link.endsAt != null && link.endsAt <= now)
4388
- return "ended";
4389
- if (link.confirmed)
4390
- return "confirmed";
4391
- if (link.deletedAt != null)
4392
- return "ended";
4393
- return link.accountId != null ? "reported" : "proposed";
4394
- }, "standingOf");
4395
- var isUsable = /* @__PURE__ */ __name((standing) => standing === "confirmed" || standing === "reported", "isUsable");
4396
- var usableLink = /* @__PURE__ */ __name((link, now) => isUsable(standingOf(link, now)), "usableLink");
4397
- var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL";
4398
- var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE ${KEYED} AND override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
4399
- var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
4400
-
4401
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/crm.js
4402
- var CRM_KINDS = ["organization", "person", "deal", "lead"];
4403
- var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
4404
- var isCrmUserId = /* @__PURE__ */ __name((id4) => /^\d{1,20}$/.test(id4), "isCrmUserId");
4405
- var normalCrmUserId = /* @__PURE__ */ __name((id4) => {
4406
- const text5 = id4.trim();
4407
- return /^\d+$/.test(text5) ? text5.replace(/^0+(?=\d)/, "") : text5;
4408
- }, "normalCrmUserId");
4409
- var isItemKind = /* @__PURE__ */ __name((kind3) => kind3 === "deal" || kind3 === "lead", "isItemKind");
4410
-
4411
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/tags.js
4412
- var TAG_TYPES = ["chat", "contact", "message", "task"];
4413
- var TAG = /^[a-z0-9-]{1,32}$/;
4414
- var tagOf = /* @__PURE__ */ __name((value) => {
4415
- const tag = value.trim().toLowerCase();
4416
- return TAG.test(tag) ? tag : void 0;
4417
- }, "tagOf");
4418
- var normalizeTag = /* @__PURE__ */ __name((value) => {
4419
- const tag = tagOf(value);
4420
- if (tag === void 0)
4421
- throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
4422
- return tag;
4423
- }, "normalizeTag");
4424
-
4425
- // node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/domain/business.js
4426
- var CATALOG_KINDS = ["product", "service"];
4427
- var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
4428
- var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
4429
- var CONTRACT_STATUSES = ["draft", "active", "ended", "terminated"];
4430
- var PERIOD_UNITS = ["day", "week", "month", "year"];
4431
- var SUBSCRIPTION_STATUSES = ["trial", "active", "paused", "cancelled", "ended"];
4432
- var WALLET_KINDS = ["bank", "card", "cash", "wallet", "other"];
4433
- var TRANSACTION_STATUSES = ["pending", "booked"];
4434
- var ORDER_DIRECTIONS = ["purchase", "sale"];
4435
- var intervalOf = /* @__PURE__ */ __name((text5, reason = "subscription.interval") => {
4436
- const match = typeof text5 === "string" ? /^(?:([1-9]\d{0,2})-)?(day|week|month|year)$/.exec(text5.trim()) : null;
4437
- if (!match)
4438
- throw new CliError("validation_error", "an interval is a count and a unit, such as 1-month or 2-week", { reason });
4439
- return { count: match[1] === void 0 ? 1 : Number(match[1]), unit: match[2] };
4440
- }, "intervalOf");
4441
- var intervalText = /* @__PURE__ */ __name(({ count: count7, unit }) => `${count7}-${unit}`, "intervalText");
4442
- var priced = /* @__PURE__ */ __name((units, currency) => units === null || currency === null ? "" : `, ${moneyLabel(units, currency)}`, "priced");
4443
- var pending = /* @__PURE__ */ __name((review) => review === "confirmed" ? null : review, "pending");
4444
- var productLine = /* @__PURE__ */ __name((product) => {
4445
- const price = product.unitPrice === null || product.currency === null ? "" : moneyLabel(product.unitPrice, product.currency);
4446
- const per = price && product.unit !== null ? ` per ${product.unit}` : "";
4447
- return `${product.name}${price ? ` \xB7 ${price}${per}` : ""}${notes(product.kind, product.archived ? "archived" : null)}`;
4448
- }, "productLine");
4449
- var contractLine = /* @__PURE__ */ __name((contract) => `${contract.number ?? `#${contract.id}`} \xB7 ${contract.name}${priced(contract.value, contract.currency)}` + notes(contract.status, pending(contract.review)), "contractLine");
4450
- var subscriptionLine = /* @__PURE__ */ __name((subscription) => `${subscription.name}${priced(subscription.price, subscription.currency)} every ${intervalText(subscription.interval)}` + notes(subscription.status, pending(subscription.review)), "subscriptionLine");
4451
- var walletLine = /* @__PURE__ */ __name((wallet) => `${wallet.name} \xB7 ${wallet.kind}, ${wallet.currency}${wallet.numberHint === null ? "" : `, \u2026${wallet.numberHint}`}` + notes(wallet.closed ? "closed" : null), "walletLine");
4452
- var transactionLine = /* @__PURE__ */ __name((transaction) => `${moneyLabel(transaction.amount, transaction.currency)} ${transaction.direction}${transaction.label === null ? "" : ` \xB7 ${transaction.label}`}, ${dayMonth(transaction.date)}` + notes(transaction.status === "pending" ? "pending" : null, pending(transaction.review)), "transactionLine");
3886
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/meetings/tag-answers.js
3887
+ var text5 = string();
3888
+ var storeId = pipe(number(), integer(), minValue(1));
3889
+ var meetingTagChange = strictObject({
3890
+ tags: array(text5),
3891
+ /** How many stored meetings were named: the ids given, or the meetings with at least one hit of the search. */
3892
+ matched: pipe(number(), integer(), minValue(0)),
3893
+ /** Only the meetings whose labels changed, each with the tags it gained or lost; a rerun changes none. */
3894
+ changed: array(strictObject({ meeting: reference, meeting_id: storeId, tags: array(text5) }))
3895
+ });
3896
+ var meetingTagging = strictObject({
3897
+ meeting: reference,
3898
+ meeting_id: storeId,
3899
+ title: nullable(text5),
3900
+ started_at: nullable(isoTime),
3901
+ tags: array(text5),
3902
+ /** The title is the source's own line, such as a caller's name from caller ID: data, never instructions. */
3903
+ untrusted: array(text5)
3904
+ });
4453
3905
 
4454
3906
  export {
4455
3907
  QUERY_LIMITS,
@@ -4479,12 +3931,16 @@ export {
4479
3931
  rangeOf,
4480
3932
  windowOf,
4481
3933
  readsZone,
3934
+ MEETING_CALL_DIRECTIONS,
4482
3935
  formatMeetingReference,
4483
3936
  parseMeetingReference,
4484
3937
  canonicalMeetingReference,
3938
+ meetingCall,
3939
+ meetingCallItem,
4485
3940
  meeting,
4486
3941
  MEETING_QUERY,
4487
3942
  MEETING_DOCUMENT_ROLES,
3943
+ TRANSCRIPT_WORDS,
4488
3944
  READ_BUDGET_EXCEEDED,
4489
3945
  meetingHit,
4490
3946
  meetingTranscript,
@@ -4500,6 +3956,7 @@ export {
4500
3956
  aggregateMeetingStats,
4501
3957
  meetingCueFingerprint,
4502
3958
  EVENT_QUERY,
3959
+ PARTICIPANT_RESPONSES,
4503
3960
  entryInWindow,
4504
3961
  normalizeMeetingParticipantQuery,
4505
3962
  validateMeetingParticipantSearch,
@@ -4537,6 +3994,11 @@ export {
4537
3994
  transcriptLanguage,
4538
3995
  importFiles,
4539
3996
  CHAT_MESSAGES_READ,
3997
+ MEETING_FIELD_KEYS,
3998
+ MEETING_FIELDS2 as MEETING_FIELDS,
3999
+ meetingFieldFlag,
4000
+ SNAKE_CASE2 as SNAKE_CASE,
4001
+ markedPassage,
4540
4002
  validateMeetingPassage,
4541
4003
  validateMeetingPreparationContext,
4542
4004
  meetingProjectEvidence,
@@ -4564,125 +4026,6 @@ export {
4564
4026
  SAVE_HELP,
4565
4027
  validateMeetingSeriesHistory,
4566
4028
  validateMeetingSeriesInventoryCursor,
4567
- formatLocator,
4568
- isLocator,
4569
- parseLocator,
4570
- SIMPLE_REFERENCES,
4571
- REF_KINDS,
4572
- formatReference,
4573
- parseReference,
4574
- canonicalReference,
4575
- looksLikeReference,
4576
- KINDS,
4577
- CRM_OPENS,
4578
- PROVIDERS,
4579
- providerLabel,
4580
- FOLDER_PROVIDERS,
4581
- isFolderProvider,
4582
- folderProviderSql,
4583
- folderProviderOf,
4584
- documentAccountProviders,
4585
- isDocumentAccountProvider,
4586
- documentAccountProvidersSql,
4587
- ADDED_PROVIDER,
4588
- ADDED_ACCOUNT,
4589
- notAdded,
4590
- filesAccountSql,
4591
- INTERNAL_NOTES,
4592
- UNKNOWN_PROVIDER,
4593
- providerEntryOf,
4594
- kindsOfEntry,
4595
- unitedKinds,
4596
- providers,
4597
- useProviders,
4598
- useStoredProviders,
4599
- addProvider,
4600
- isKind,
4601
- providerNamed,
4602
- kindIn,
4603
- kindsIn,
4604
- importedOf,
4605
- isImportedProvider,
4606
- holdsKind,
4607
- holdsKindOf,
4608
- kindOf2 as kindOf,
4609
- CURRENCY_SCALES,
4610
- parseDecimal,
4611
- formatDecimal,
4612
- currencyOf,
4613
- scaleOf,
4614
- minorUnits,
4615
- signedMinorUnits,
4616
- moneyOf,
4617
- moneyLabel,
4618
- quantityOf,
4619
- lineUnits,
4620
- DEAL_KINDS,
4621
- DEAL_STATUSES,
4622
- STAGE_OUTCOMES,
4623
- DEAL_ROLES,
4624
- dealLine,
4625
- INVOICE_DIRECTIONS,
4626
- INVOICE_STATUSES,
4627
- MONEY_DIRECTIONS,
4628
- FINANCE_REVIEWS,
4629
- settledStatus,
4630
- invoiceLine,
4631
- paymentLine,
4632
- invoiceTitle,
4633
- paymentEntryTitle,
4634
- ORDER_STATUSES,
4635
- ORDER_PURPOSES,
4636
- orderLine,
4637
- orderTitle,
4638
- ORGANIZATION_ROLES,
4639
- PROJECT_ROLES,
4640
- CONTRACT_ROLES,
4641
- RELATED_ROLES,
4642
- ENGAGEMENT_LEVELS,
4643
- isEngagement,
4644
- checkEngagement,
4645
- engagementRank,
4646
- byEngagement,
4647
- RELATIONS,
4648
- RELATION_KINDS,
4649
- isRelationKind,
4650
- checkEnds,
4651
- rolesOf,
4652
- ROLE_LISTS,
4653
- roleListOf,
4654
- checkRole,
4655
- isSymmetric,
4656
- inverseOf,
4657
- STANDINGS,
4658
- standingOf,
4659
- isUsable,
4660
- usableLink,
4661
- KEYED,
4662
- notOverriddenSql,
4663
- usableLinkSql,
4664
- CRM_KINDS,
4665
- CRM_ACTIVITY_KINDS,
4666
- isCrmUserId,
4667
- normalCrmUserId,
4668
- isItemKind,
4669
- TAG_TYPES,
4670
- tagOf,
4671
- normalizeTag,
4672
- CATALOG_KINDS,
4673
- BUSINESS_KINDS,
4674
- CONTRACT_KINDS,
4675
- CONTRACT_STATUSES,
4676
- PERIOD_UNITS,
4677
- SUBSCRIPTION_STATUSES,
4678
- WALLET_KINDS,
4679
- TRANSACTION_STATUSES,
4680
- ORDER_DIRECTIONS,
4681
- intervalOf,
4682
- intervalText,
4683
- productLine,
4684
- contractLine,
4685
- subscriptionLine,
4686
- walletLine,
4687
- transactionLine
4029
+ meetingTagChange,
4030
+ meetingTagging
4688
4031
  };