@wirecat/zoom-cli 0.63.0 → 0.65.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 (147) hide show
  1. package/README.md +3 -0
  2. package/dist/answer-entities.d.ts +13 -0
  3. package/dist/answer-entities.d.ts.map +1 -1
  4. package/dist/answer-entities.js +5 -0
  5. package/dist/answer-entities.js.map +1 -1
  6. package/dist/answers.d.ts +8 -0
  7. package/dist/answers.d.ts.map +1 -1
  8. package/dist/archive-import.d.ts +1 -1
  9. package/dist/archive-import.d.ts.map +1 -1
  10. package/dist/archive-import.js +2 -1
  11. package/dist/archive-import.js.map +1 -1
  12. package/dist/bin/zm.js +6 -2
  13. package/dist/bundle/{all-profiles-CGGNBINU.js → all-profiles-SKMLZJSY.js} +8 -8
  14. package/dist/bundle/answer-policy-BHDNSJWX.js +96 -0
  15. package/dist/bundle/{anthropic-KVWPIHFG.js → anthropic-TVHK7CY2.js} +4 -4
  16. package/dist/bundle/{app-server-NKKFBTQN.js → app-server-44ASFH47.js} +53 -52
  17. package/dist/bundle/{bun-XRO6XJHQ.js → bun-O4WHGL2F.js} +2 -2
  18. package/dist/bundle/{bun-sqlite-FWNCLOAR.js → bun-sqlite-NS32GMM4.js} +3 -3
  19. package/dist/bundle/{chunk-M6FCCVYZ.js → chunk-24F7JBLY.js} +72 -4
  20. package/dist/bundle/{chunk-4OQVRDTG.js → chunk-25IDWPEN.js} +166 -96
  21. package/dist/bundle/{chunk-QLQ7VVLK.js → chunk-266WOOB3.js} +4 -4
  22. package/dist/bundle/{chunk-ECXRRW7J.js → chunk-2H5SXK7K.js} +57 -27
  23. package/dist/bundle/{chunk-YI6ZNDPC.js → chunk-37PHGASE.js} +2 -2
  24. package/dist/bundle/{chunk-URJZK4GX.js → chunk-3CZIWGZ6.js} +1 -1
  25. package/dist/bundle/{chunk-6URISMGR.js → chunk-5NGOP4EZ.js} +125 -35
  26. package/dist/bundle/{chunk-IOUPXUFH.js → chunk-6CS7ETBK.js} +4496 -386
  27. package/dist/bundle/{chunk-FDCGTODC.js → chunk-7SQJCKR6.js} +1 -1
  28. package/dist/bundle/{chunk-EG7HC4EC.js → chunk-A6OA2EH2.js} +2 -2
  29. package/dist/bundle/{chunk-QUWMFBMS.js → chunk-AMMD6YCJ.js} +49 -11
  30. package/dist/bundle/chunk-BLT3LR3U.js +34 -0
  31. package/dist/bundle/{chunk-MI3JK6MW.js → chunk-BNXH73OU.js} +10 -10
  32. package/dist/bundle/{chunk-GOESXUJQ.js → chunk-BWRBALXG.js} +3 -3
  33. package/dist/bundle/{chunk-6SPWQCJF.js → chunk-C6BG57FA.js} +11 -11
  34. package/dist/bundle/{chunk-CXPHUOJR.js → chunk-CNEE6TPE.js} +26 -13
  35. package/dist/bundle/{chunk-RWG44LQD.js → chunk-CVCRQW3A.js} +35 -35
  36. package/dist/bundle/{chunk-FAOLCUKV.js → chunk-DNCKH7CO.js} +17 -17
  37. package/dist/bundle/{chunk-LTE6WH22.js → chunk-DYJXAY7Q.js} +26 -25
  38. package/dist/bundle/{chunk-IOCS5FXW.js → chunk-EA63UGWE.js} +2 -2
  39. package/dist/bundle/{chunk-5LMQTEU5.js → chunk-ERPRAYA7.js} +5 -5
  40. package/dist/bundle/{chunk-KMQUZ4YM.js → chunk-FYJL276J.js} +3 -3
  41. package/dist/bundle/{chunk-AMIIU3UZ.js → chunk-FYM27FCG.js} +32 -9
  42. package/dist/bundle/{chunk-NQCFUYC2.js → chunk-GBZF4IIP.js} +10 -9
  43. package/dist/bundle/{chunk-DIXC56OU.js → chunk-GEX4V5TM.js} +4 -4
  44. package/dist/bundle/{chunk-4OTXE6CF.js → chunk-GMTXCFI7.js} +683 -504
  45. package/dist/bundle/{chunk-TILW3EJY.js → chunk-GXCNCMUY.js} +2865 -924
  46. package/dist/bundle/{chunk-YJN4XYNA.js → chunk-H7762LDA.js} +2 -2
  47. package/dist/bundle/{chunk-JDJDVYGS.js → chunk-IPTI3Y2E.js} +6 -41
  48. package/dist/bundle/{chunk-SB47UAW2.js → chunk-JF7ZEUXU.js} +34 -26
  49. package/dist/bundle/{chunk-7AY3ADNV.js → chunk-K6ATTKQR.js} +13 -6
  50. package/dist/bundle/{chunk-6SK5SHCR.js → chunk-KYLS5QGC.js} +2 -2
  51. package/dist/bundle/{chunk-YF2PT5KA.js → chunk-KZE3G4ZT.js} +38 -36
  52. package/dist/bundle/{chunk-MIUPH3WA.js → chunk-LOL6JYYN.js} +211 -106
  53. package/dist/bundle/{chunk-UIPT6IAU.js → chunk-LPUFOWL3.js} +1 -1
  54. package/dist/bundle/{chunk-5NLFQ644.js → chunk-M6IDHQ7N.js} +6739 -4659
  55. package/dist/bundle/{chunk-M2WQWF3I.js → chunk-MH7AWCB4.js} +179 -50
  56. package/dist/bundle/{chunk-VFJ3MOIR.js → chunk-MIB5X2XW.js} +3 -3
  57. package/dist/bundle/{chunk-SLBMXXOW.js → chunk-MPKKIL3U.js} +15 -12
  58. package/dist/bundle/{chunk-BJPFWPKH.js → chunk-MRWIXUYT.js} +2 -2
  59. package/dist/bundle/{chunk-BNTAQADF.js → chunk-MZ6U6HNJ.js} +12 -3
  60. package/dist/bundle/{chunk-6R3GMSLR.js → chunk-NJSIHMAE.js} +2 -2
  61. package/dist/bundle/{chunk-5MYLM6SU.js → chunk-NNNEVWFF.js} +108 -41
  62. package/dist/bundle/{chunk-2LLNPNMB.js → chunk-NO24PJNW.js} +1 -1
  63. package/dist/bundle/{chunk-HIZQYFY3.js → chunk-OXUHTKO2.js} +8 -2
  64. package/dist/bundle/{chunk-3YBDRVOG.js → chunk-PV3UDPCI.js} +82 -6
  65. package/dist/bundle/{chunk-IK2OSV5C.js → chunk-QI7BZS2G.js} +8 -13
  66. package/dist/bundle/{chunk-2NAM2XQG.js → chunk-QLCYAQ66.js} +2 -2
  67. package/dist/bundle/{chunk-RUJBN7ZP.js → chunk-R5BAF5XE.js} +1 -1
  68. package/dist/bundle/{chunk-IR73ZZY6.js → chunk-RZLNHNSS.js} +8 -8
  69. package/dist/bundle/{chunk-TQFCPUIM.js → chunk-S4GDDO5S.js} +1 -1
  70. package/dist/bundle/{chunk-YFIUXE25.js → chunk-SQWRZZOQ.js} +3 -3
  71. package/dist/bundle/{chunk-EJFSS65P.js → chunk-T3KICUOK.js} +6 -6
  72. package/dist/bundle/{chunk-UD4FKICZ.js → chunk-TC7PD3LH.js} +4 -4
  73. package/dist/bundle/{chunk-YBMOFCY5.js → chunk-TUIEDVI6.js} +2 -2
  74. package/dist/bundle/{chunk-JBBZCTTF.js → chunk-U3ZUT557.js} +1 -1
  75. package/dist/bundle/{chunk-EOEDICIE.js → chunk-U4RVOSX3.js} +1 -1
  76. package/dist/bundle/{chunk-BPMKLWHV.js → chunk-U5ASRBBF.js} +6 -4
  77. package/dist/bundle/{chunk-7CNRZSAV.js → chunk-UKU6MYUI.js} +4 -4
  78. package/dist/bundle/{chunk-72S5TXFN.js → chunk-UMHJZWZU.js} +9 -9
  79. package/dist/bundle/{chunk-TZE6WXID.js → chunk-UPJXN2CO.js} +10651 -9814
  80. package/dist/bundle/{chunk-NVC4VQ2B.js → chunk-VH4F2EK4.js} +1 -1
  81. package/dist/bundle/{chunk-SPJJCD2A.js → chunk-VJTGYBJJ.js} +18 -13
  82. package/dist/bundle/{chunk-MLNC5N7H.js → chunk-VW2SW7ME.js} +3 -3
  83. package/dist/bundle/{chunk-Q4ZE2LXE.js → chunk-WLSF3GCC.js} +2 -2
  84. package/dist/bundle/{chunk-N3KQ7XND.js → chunk-XJQB47IL.js} +4 -4
  85. package/dist/bundle/{chunk-KM7Q67Z3.js → chunk-Y3EIK4XW.js} +1 -1
  86. package/dist/bundle/{chunk-7LQLJ7LW.js → chunk-Z5424QL6.js} +2 -2
  87. package/dist/bundle/{chunk-LXYC75D3.js → chunk-ZFNM3FNI.js} +199 -141
  88. package/dist/bundle/{chunk-D6FTCPXA.js → chunk-ZH743WNV.js} +41 -12
  89. package/dist/bundle/{chunk-XAXXEZZ5.js → chunk-ZOGYTDHG.js} +2 -2
  90. package/dist/bundle/{chunk-SEH7DBAM.js → chunk-ZREFYKUB.js} +7 -7
  91. package/dist/bundle/{chunk-2DPMYUWQ.js → chunk-ZXGRK44F.js} +14 -13
  92. package/dist/bundle/{cli-AHPIESAC.js → cli-FDO6CP6R.js} +124 -60
  93. package/dist/bundle/command-contract-O4FDXM4U.js +37 -0
  94. package/dist/bundle/config-UBHKZG3J.js +78 -0
  95. package/dist/bundle/{decode-ZU7WLMMV.js → decode-7SZI3TGZ.js} +3 -3
  96. package/dist/bundle/{dist-LTS7VI3S.js → dist-5GWUXW27.js} +18 -14
  97. package/dist/bundle/{echarts-YNGCOYHW.js → echarts-FMACRZQC.js} +2 -2
  98. package/dist/bundle/{embed-VWWOW7PP.js → embed-24YSXHLP.js} +4 -4
  99. package/dist/bundle/{embedder-T5GJC7M2.js → embedder-MEXN2TFB.js} +7 -7
  100. package/dist/bundle/{first-run-PX3SHPUU.js → first-run-OCVEJH63.js} +8 -8
  101. package/dist/bundle/first-screen-KJIU25MH.js +35 -0
  102. package/dist/bundle/{folders-VXMDFC2D.js → folders-DBAAMU26.js} +2 -2
  103. package/dist/bundle/{instructions-GJHHFV64.js → instructions-E5FXYCWF.js} +1 -1
  104. package/dist/bundle/{main-APVJXUJE.js → main-EIUCXXDW.js} +17 -16
  105. package/dist/bundle/{mcp-EMNFFY4N.js → mcp-FUSDPAOL.js} +2 -2
  106. package/dist/bundle/{meetings-GHYNIOHG.js → meetings-JDTRGXZJ.js} +16 -6
  107. package/dist/bundle/{node-GFOH6FKP.js → node-4SNKUPXT.js} +2 -2
  108. package/dist/bundle/{node-sqlite-QXKSPHTP.js → node-sqlite-O4BAODFR.js} +9 -3
  109. package/dist/bundle/{oauth-A6I2OMDD.js → oauth-3YLHXGUW.js} +5 -5
  110. package/dist/bundle/{open-TQKCU447.js → open-QGRMSNM2.js} +3 -2
  111. package/dist/bundle/{openai-XE3BJXOI.js → openai-7PSCSTH7.js} +9 -9
  112. package/dist/bundle/{output-file-FQNFCUKE.js → output-file-J26UQKRA.js} +3 -3
  113. package/dist/bundle/{process-XVDX4SPD.js → process-HQZOTT6U.js} +1 -1
  114. package/dist/bundle/{program-QRKEXYDG.js → program-47DT7SHE.js} +75 -75
  115. package/dist/bundle/{prompt-ISYG5RWM.js → prompt-IUD7HCDC.js} +3 -3
  116. package/dist/bundle/{recognize-KENPECLZ.js → recognize-DMJJHHXF.js} +2 -2
  117. package/dist/bundle/{remote-ZP5XTDCC.js → remote-5WFSOVVB.js} +5 -5
  118. package/dist/bundle/{rerank-SG653RHT.js → rerank-UKQ65ECH.js} +5 -5
  119. package/dist/bundle/{run-log-HYKGQ42E.js → run-log-UGYL6NW2.js} +53 -53
  120. package/dist/bundle/{serve-6UJCZD7Z.js → serve-WAOSED3I.js} +9 -8
  121. package/dist/bundle/server-HAXN772R.js +66 -0
  122. package/dist/bundle/{server-ZAYEDPFR.js → server-NWZFNXC5.js} +42 -42
  123. package/dist/bundle/{services-KMH7XZPY.js → services-VPANRE72.js} +101 -28
  124. package/dist/bundle/{speech-LINBLG5E.js → speech-O6UNUDRW.js} +11 -11
  125. package/dist/bundle/{state-4RKZNHE7.js → state-BNE7I65A.js} +4 -4
  126. package/dist/bundle/{store-253N7NUC.js → store-4IIVSCJ4.js} +56 -19
  127. package/dist/bundle/{store-JTBHRQZK.js → store-QQH4FJXJ.js} +16 -13
  128. package/dist/bundle/store-connection-PPEQK2K3.js +76 -0
  129. package/dist/bundle/store-maintenance-command-JZXCT6NY.js +56 -0
  130. package/dist/bundle/{streaming-YW64OKKQ.js → streaming-S4EZB6P2.js} +4 -4
  131. package/dist/bundle/{tokens-DPBC2P3I.js → tokens-VCXIH7WZ.js} +4 -4
  132. package/dist/bundle/zm.js +1 -1
  133. package/dist/local-transcription.d.ts.map +1 -1
  134. package/dist/local-transcription.js +1 -0
  135. package/dist/local-transcription.js.map +1 -1
  136. package/dist/version.d.ts +1 -1
  137. package/dist/version.js +1 -1
  138. package/package.json +3 -3
  139. package/dist/bundle/answer-policy-V2KDPLDO.js +0 -96
  140. package/dist/bundle/chunk-2T7MUSDB.js +0 -3605
  141. package/dist/bundle/command-contract-HVLI3OKU.js +0 -38
  142. package/dist/bundle/config-3SFEGYZO.js +0 -78
  143. package/dist/bundle/first-screen-RAPEZG57.js +0 -36
  144. package/dist/bundle/server-AXE37E6Q.js +0 -66
  145. package/dist/bundle/store-connection-ID2ETC7F.js +0 -76
  146. package/dist/bundle/store-maintenance-command-XRNECVDU.js +0 -55
  147. /package/dist/bundle/{chunk-NPGVOZVK.js → chunk-NUN6OGOV.js} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  queryFieldsOf,
9
9
  timezoneOf,
10
10
  validateQuery
11
- } from "./chunk-D6FTCPXA.js";
11
+ } from "./chunk-ZH743WNV.js";
12
12
  import {
13
13
  CliError,
14
14
  STEPS,
@@ -35,12 +35,12 @@ import {
35
35
  string,
36
36
  union,
37
37
  visibleControls
38
- } from "./chunk-SB47UAW2.js";
38
+ } from "./chunk-JF7ZEUXU.js";
39
39
  import {
40
40
  __name
41
41
  } from "./chunk-ZVVMGPBJ.js";
42
42
 
43
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/reference.js
43
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/reference.js
44
44
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
45
45
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
46
46
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -77,7 +77,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text9) => {
77
77
  }, "parseMeetingReference");
78
78
  var canonicalMeetingReference = /* @__PURE__ */ __name((text9) => formatMeetingReference(parseMeetingReference(text9)), "canonicalMeetingReference");
79
79
 
80
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/item.js
80
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/item.js
81
81
  var text = string();
82
82
  var count = pipe(number(), integer(), minValue(0));
83
83
  var MEETING_ISSUES = ["time_without_zone"];
@@ -142,7 +142,7 @@ var MEETING_QUERY = {
142
142
  })
143
143
  };
144
144
 
145
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/answers.js
145
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/answers.js
146
146
  var text2 = string();
147
147
  var count2 = pipe(number(), integer(), minValue(0));
148
148
  var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
@@ -156,6 +156,11 @@ var meetingHit = strictObject({
156
156
  excerpt: text2,
157
157
  /** How far into the meeting the passage is. */
158
158
  offset_ms: nullable(count2),
159
+ /** A transcript passage's transcript language (`ru`, `en`…), `null` when unknown. */
160
+ language: optional(nullable(text2)),
161
+ /** A transcript passage's line, from 1, of `lines_total`. */
162
+ line: optional(pipe(count2, minValue(1))),
163
+ lines_total: optional(count2),
159
164
  /** `corrected`: a query word matched only a garbled form of itself, listed in `corrections`. */
160
165
  match: optional(picklist(["words", "corrected"])),
161
166
  corrections: optional(array(strictObject({ from: text2, to: array(text2) }))),
@@ -322,6 +327,9 @@ var meetingHitItem = /* @__PURE__ */ __name((hit) => ({
322
327
  id: String(hit.id),
323
328
  excerpt: hit.text,
324
329
  offset_ms: hit.startMs,
330
+ ...hit.language === void 0 ? {} : { language: hit.language },
331
+ ...hit.line === void 0 ? {} : { line: hit.line },
332
+ ...hit.linesTotal === void 0 ? {} : { lines_total: hit.linesTotal },
325
333
  untrusted: hit.source === void 0 ? ["excerpt"] : ["excerpt", "source.title"],
326
334
  ...hit.match === void 0 ? {} : { match: hit.match },
327
335
  ...hit.corrections === void 0 ? {} : { corrections: hit.corrections },
@@ -369,7 +377,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
369
377
  };
370
378
  }, "meetingHitsList");
371
379
 
372
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
380
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
373
381
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
374
382
  const parsed = urlOf(url);
375
383
  if (!parsed)
@@ -403,7 +411,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
403
411
  }
404
412
  }, "urlOf");
405
413
 
406
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
414
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
407
415
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
408
416
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
409
417
  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");
@@ -436,7 +444,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
436
444
  return kept;
437
445
  }, "entryMetadata");
438
446
 
439
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
447
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
440
448
  import { createHash } from "node:crypto";
441
449
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
442
450
  reference: cue2.reference,
@@ -450,7 +458,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
450
458
  text: cue2.text
451
459
  })).digest("hex"), "meetingCueFingerprint");
452
460
 
453
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
461
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
454
462
  var EVENT_QUERY = defineQuery({
455
463
  entity: "event",
456
464
  backend: "sql",
@@ -466,7 +474,7 @@ var EVENT_QUERY = defineQuery({
466
474
  ]
467
475
  });
468
476
 
469
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
477
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
470
478
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
471
479
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
472
480
  if (entry.recurrenceEndsAt !== null)
@@ -516,7 +524,7 @@ var eventChange = /* @__PURE__ */ __name((event2, entries, revisions, since) =>
516
524
  return null;
517
525
  }, "eventChange");
518
526
 
519
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/events.js
527
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/events.js
520
528
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
521
529
  const current = await store.meeting(details.meeting.id);
522
530
  if (!current)
@@ -559,7 +567,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
559
567
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
560
568
  }, "linkEvent");
561
569
 
562
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
570
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
563
571
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text9) => text9.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
564
572
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
565
573
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -583,7 +591,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
583
591
  };
584
592
  }, "validateMeetingParticipantSearch");
585
593
 
586
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/reads.js
594
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/reads.js
587
595
  var MeetingError = class extends CliError {
588
596
  static {
589
597
  __name(this, "MeetingError");
@@ -715,7 +723,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId)
715
723
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
716
724
  }, "meetingSummaryAnswer");
717
725
 
718
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/export.js
726
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/export.js
719
727
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
720
728
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
721
729
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -811,19 +819,89 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
811
819
  };
812
820
  }, "exportMeeting");
813
821
 
814
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
822
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
815
823
  import { createHash as createHash2 } from "node:crypto";
816
824
 
817
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/provider.js
818
- var snapshotMeetingScope = /* @__PURE__ */ __name((scope3) => {
819
- const provider = scope3?.provider;
820
- const account = scope3?.account;
821
- if (typeof provider !== "string" || !provider.trim() || provider.length > 200 || /[\0\r\n]/.test(provider) || typeof account !== "string" || !account.trim() || account.length > 1e3 || /[\0\r\n]/.test(account))
822
- throw new CliError("validation_error", "meeting provider and account must be bounded nonempty identifiers");
823
- return Object.freeze({ provider, account });
824
- }, "snapshotMeetingScope");
825
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/payment.js
826
+ var FACT_TYPES = ["fact", "statement", "question", "decision", "promise", "payment"];
827
+ var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
828
+ var PAYMENT_STATES = ["expected", "paid", "cancelled"];
829
+ var invalid2 = /* @__PURE__ */ __name((message) => {
830
+ throw new CliError("validation_error", message);
831
+ }, "invalid");
832
+ var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
833
+ var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
834
+ var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
835
+ var amountOf = /* @__PURE__ */ __name((value) => {
836
+ const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
837
+ if (!match)
838
+ return invalid2("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
839
+ const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
840
+ if (amount === "0.00")
841
+ return invalid2("a payment's amount is more than 0");
842
+ return amount;
843
+ }, "amountOf");
844
+ var dateOf = /* @__PURE__ */ __name((value) => {
845
+ const date2 = typeof value === "string" ? value.trim() : "";
846
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(date2) || (/* @__PURE__ */ new Date(`${date2}T00:00:00Z`)).toISOString().slice(0, 10) !== date2)
847
+ return invalid2("a payment's due date is an ISO date, such as 2026-10-31");
848
+ return date2;
849
+ }, "dateOf");
850
+ var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
851
+ if (value === void 0 || value === null)
852
+ return null;
853
+ if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
854
+ return invalid2(`a payment's ${what} takes 1\u2013${limit} characters`);
855
+ return value.trim();
856
+ }, "optionalText");
857
+ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
858
+ if (typeof value !== "string" || !allowed.includes(value))
859
+ return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
860
+ return value;
861
+ }, "oneOf");
862
+ var FIELDS = ["amount", "currency", "direction", "counterparty", "counterparty_name", "due_at", "state", "item"];
863
+ var validatePayment = /* @__PURE__ */ __name((input) => {
864
+ if (!input || typeof input !== "object" || Array.isArray(input))
865
+ return invalid2("a payment is an object");
866
+ const raw = input;
867
+ const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
868
+ if (unknown.length)
869
+ return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
870
+ const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
871
+ if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
872
+ return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
873
+ const counterparty = optionalText(raw.counterparty, "counterparty", 80);
874
+ if (counterparty !== null && !COUNTERPARTY.test(counterparty))
875
+ return invalid2("a payment's counterparty is a person:, organization: or project: reference");
876
+ return {
877
+ amount: amountOf(raw.amount),
878
+ currency,
879
+ direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
880
+ counterparty,
881
+ counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
882
+ due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
883
+ state: oneOf(raw.state, PAYMENT_STATES, "state"),
884
+ item: optionalText(raw.item, "item", 200)
885
+ };
886
+ }, "validatePayment");
887
+ var grouped = /* @__PURE__ */ __name((amount) => {
888
+ const [whole = "0", cents = "00"] = amount.split(".");
889
+ const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
890
+ return cents === "00" ? digits : `${digits}.${cents}`;
891
+ }, "grouped");
892
+ var paymentTitle = /* @__PURE__ */ __name((fact) => {
893
+ const payment = fact.payment;
894
+ if (!payment)
895
+ return "";
896
+ const who = payment.counterparty_name ?? payment.counterparty;
897
+ const way = payment.direction === "to_us" ? "to us" : "from us";
898
+ const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
899
+ const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
900
+ const item = payment.item === null ? "" : ` for ${payment.item}`;
901
+ return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
902
+ }, "paymentTitle");
825
903
 
826
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
904
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
827
905
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
828
906
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
829
907
  throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone`);
@@ -834,324 +912,90 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
834
912
  return new Date(value).toISOString();
835
913
  }, "meetingTimestamp");
836
914
 
837
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
838
- var nonempty = /* @__PURE__ */ __name((value, name) => {
839
- if (typeof value !== "string" || !value.trim())
840
- throw new CliError("validation_error", `${name} must be nonempty`);
841
- return value;
842
- }, "nonempty");
843
- var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
844
- if (!change || typeof change !== "object" || Array.isArray(change) || Object.keys(change).some((key) => !["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].includes(key)))
845
- throw new CliError("validation_error", "unsupported meeting change field");
846
- const result = {};
847
- if (change.title !== void 0)
848
- result.title = nonempty(change.title, "meeting title");
849
- if (create && result.title === void 0)
850
- throw new CliError("validation_error", "meeting title is required");
851
- if (change.kind !== void 0) {
852
- if (change.kind !== "instant" && change.kind !== "scheduled")
853
- throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
854
- result.kind = change.kind;
855
- }
856
- if (change.startTime !== void 0) {
857
- result.startTime = meetingTimestamp(change.startTime, "meeting start");
858
- }
859
- if (change.durationMinutes !== void 0) {
860
- if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
861
- throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
862
- result.durationMinutes = change.durationMinutes;
863
- }
864
- if (change.timezone !== void 0) {
865
- if (typeof change.timezone !== "string" || !change.timezone.trim())
866
- throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
867
- try {
868
- new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
869
- } catch {
870
- throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
871
- }
872
- result.timezone = change.timezone;
873
- }
874
- if (change.agenda !== void 0) {
875
- if (typeof change.agenda !== "string")
876
- throw new CliError("validation_error", "meeting agenda must be text");
877
- result.agenda = change.agenda;
878
- }
879
- if (create) {
880
- result.kind ??= "scheduled";
881
- if (result.kind === "scheduled" && result.startTime === void 0)
882
- throw new CliError("validation_error", "scheduled meeting start is required");
883
- } else if (!Object.keys(result).length)
884
- throw new CliError("validation_error", "at least one meeting change is required");
885
- return Object.freeze(result);
886
- }, "validateMeetingChange");
887
- var checkCancelled = /* @__PURE__ */ __name((signal) => {
888
- if (!signal?.aborted)
889
- return;
890
- if (signal.reason instanceof CliError)
891
- throw signal.reason;
892
- const timeout = signal.reason instanceof Error && signal.reason.name === "TimeoutError";
893
- throw new CliError(timeout ? "timeout" : "cancelled", timeout ? "meeting operation timed out" : "meeting operation cancelled");
894
- }, "checkCancelled");
895
- var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) => {
896
- const { apply, dryRun, signal } = options;
897
- checkCancelled(signal);
898
- if (apply !== true || dryRun)
899
- return { applied: false };
900
- return { applied: true, value: await dispatch(signal) };
901
- }, "dispatchMeetingMutation");
902
- var createMeetingManagement = /* @__PURE__ */ __name((scope3, ports) => {
903
- const fixed = snapshotMeetingScope(scope3);
904
- const capabilities = {};
905
- for (const name of ["list", "get", "invitation", "create", "update", "cancel"]) {
906
- const port = ports[name];
907
- if (typeof port === "function")
908
- Object.defineProperty(capabilities, name, { value: port.bind(ports), enumerable: true });
909
- }
910
- Object.freeze(capabilities);
911
- const context3 = /* @__PURE__ */ __name((options) => {
912
- const signal = options.signal;
913
- checkCancelled(signal);
914
- return Object.freeze({ scope: fixed, ...signal ? { signal } : {} });
915
- }, "context");
916
- const capability = /* @__PURE__ */ __name((name) => {
917
- const port = capabilities[name];
918
- if (!port)
919
- throw new CliError("provider_unavailable", `meeting provider does not support ${name}`);
920
- return port;
921
- }, "capability");
922
- return {
923
- scope: fixed,
924
- capabilities: Object.freeze(Object.keys(capabilities).filter((name) => typeof capabilities[name] === "function")),
925
- list(options = {}) {
926
- return capability("list")(context3(options));
927
- },
928
- get(id4, options = {}) {
929
- return capability("get")(nonempty(id4, "meeting id"), context3(options));
930
- },
931
- invitation(id4, options = {}) {
932
- return capability("invitation")(nonempty(id4, "meeting id"), context3(options));
933
- },
934
- async create(change, options = {}) {
935
- const port = capability("create");
936
- const validated = validateMeetingChange(change, true);
937
- const ctx = context3(options);
938
- const outcome = await dispatchMeetingMutation(options, () => port(validated, ctx));
939
- return {
940
- action: "create",
941
- scope: fixed,
942
- change: validated,
943
- applied: outcome.applied,
944
- ...outcome.value ? { meeting: outcome.value } : {}
945
- };
946
- },
947
- async update(id4, change, options = {}) {
948
- const port = capability("update");
949
- const validatedId = nonempty(id4, "meeting id");
950
- const validated = validateMeetingChange(change, false);
951
- const ctx = context3(options);
952
- const outcome = await dispatchMeetingMutation(options, () => port(validatedId, validated, ctx));
953
- return { action: "update", scope: fixed, id: validatedId, change: validated, applied: outcome.applied };
954
- },
955
- async cancel(id4, options = {}) {
956
- const port = capability("cancel");
957
- const validatedId = nonempty(id4, "meeting id");
958
- const occurrenceId2 = options.occurrenceId === void 0 ? void 0 : nonempty(options.occurrenceId, "occurrence id");
959
- const ctx = { ...context3(options), ...occurrenceId2 === void 0 ? {} : { occurrenceId: occurrenceId2 } };
960
- const outcome = await dispatchMeetingMutation(options, () => port(validatedId, ctx));
961
- return {
962
- action: "cancel",
963
- scope: fixed,
964
- id: validatedId,
965
- applied: outcome.applied,
966
- ...occurrenceId2 === void 0 ? {} : { occurrenceId: occurrenceId2 }
967
- };
968
- }
969
- };
970
- }, "createMeetingManagement");
971
-
972
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
973
- var MEETING_FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
974
- var id = /* @__PURE__ */ __name((value) => {
975
- if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
976
- throw new CliError("validation_error", "meeting context identifiers must be positive integers");
977
- return value;
978
- }, "id");
979
- var text3 = /* @__PURE__ */ __name((value, max) => {
980
- if (typeof value !== "string" || !value.trim() || value.length > max || value.includes("\0"))
981
- throw new CliError("validation_error", `meeting context text must contain 1\u2013${max} characters without NUL`);
982
- return value.trim();
983
- }, "text");
984
- var uid = /* @__PURE__ */ __name((value) => {
985
- const result = text3(value, 100);
986
- if (!/^[1-9]\d*$/.test(result) || !Number.isSafeInteger(Number(result)))
987
- throw new CliError("validation_error", "person UID must be a positive integer");
988
- return result;
989
- }, "uid");
990
- var strings = /* @__PURE__ */ __name((value, count6, length) => {
991
- if (!Array.isArray(value) || value.length < 1 || value.length > count6)
992
- throw new CliError("validation_error", `meeting context list must contain 1\u2013${count6} entries`);
993
- return Object.freeze([...new Set(value.map((entry) => text3(entry, length)))]);
994
- }, "strings");
995
- var fields = {
996
- "note.add": ["text", "title"],
997
- "tags.add": ["tags"],
998
- "tags.remove": ["tags"],
999
- "memory.add": ["body", "kind", "scope", "evidence", "subject"],
1000
- "fact.add": ["statement", "type", "scope", "evidence", "subject"],
1001
- "event.link": ["eventId", "expectedEventId"],
1002
- "person.link": ["participantId", "personUid", "targetAccountIds", "expectedPersonUid"]
1003
- };
1004
- var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
1005
- if (!change || typeof change !== "object" || Array.isArray(change) || !Object.hasOwn(fields, change.action) || Object.keys(change).some((key) => key !== "action" && !fields[change.action].includes(key)))
1006
- throw new CliError("validation_error", "unsupported meeting context change");
1007
- switch (change.action) {
1008
- case "note.add":
1009
- return Object.freeze({
1010
- action: change.action,
1011
- text: text3(change.text, 1e5),
1012
- ...change.title === void 0 ? {} : { title: text3(change.title, 500) }
1013
- });
1014
- case "tags.add":
1015
- case "tags.remove":
1016
- return Object.freeze({ action: change.action, tags: strings(change.tags, 100, 200) });
1017
- case "memory.add": {
1018
- if (!["summary", "digest", "preference"].includes(change.kind) || !["personal", "work"].includes(change.scope))
1019
- throw new CliError("validation_error", "memory kind and explicit personal/work scope are required");
1020
- return Object.freeze({
1021
- action: change.action,
1022
- body: text3(change.body, 2e4),
1023
- kind: change.kind,
1024
- scope: change.scope,
1025
- evidence: strings(change.evidence, 100, 4e3),
1026
- ...change.subject === void 0 ? {} : { subject: text3(change.subject, 4e3) }
1027
- });
1028
- }
1029
- case "fact.add": {
1030
- if (!MEETING_FACT_TYPES.includes(change.type) || !["personal", "work"].includes(change.scope))
1031
- throw new CliError("validation_error", `fact type (${MEETING_FACT_TYPES.join(", ")}) and explicit personal/work scope are required`);
1032
- return Object.freeze({
1033
- action: change.action,
1034
- statement: text3(change.statement, 2e4),
1035
- type: change.type,
1036
- scope: change.scope,
1037
- evidence: strings(change.evidence, 100, 4e3),
1038
- ...change.subject === void 0 ? {} : { subject: text3(change.subject, 4e3) }
1039
- });
1040
- }
1041
- case "event.link":
1042
- return Object.freeze({
1043
- action: change.action,
1044
- eventId: change.eventId === null ? null : id(change.eventId),
1045
- ...change.expectedEventId === void 0 ? {} : { expectedEventId: change.expectedEventId === null ? null : id(change.expectedEventId) }
1046
- });
1047
- case "person.link": {
1048
- const targets = change.targetAccountIds;
1049
- if (targets !== void 0 && (!Array.isArray(targets) || targets.length < 1 || targets.length > 1e3))
1050
- throw new CliError("validation_error", "target accounts must contain 1\u20131000 identifiers");
1051
- return Object.freeze({
1052
- action: change.action,
1053
- participantId: id(change.participantId),
1054
- personUid: uid(change.personUid),
1055
- ...targets === void 0 ? {} : { targetAccountIds: Object.freeze([...new Set(targets.map(id))]) },
1056
- ...change.expectedPersonUid === void 0 ? {} : { expectedPersonUid: change.expectedPersonUid === null ? null : uid(change.expectedPersonUid) }
1057
- });
1058
- }
1059
- }
1060
- }, "validateMeetingContextChange");
1061
- var createMeetingContext = /* @__PURE__ */ __name((scope3, accountId, ports) => {
1062
- const fixed = snapshotMeetingScope(scope3);
1063
- const account = id(accountId);
1064
- const actions = Object.freeze([...new Set(ports.actions)]);
1065
- if (actions.some((action) => !Object.hasOwn(fields, action)))
1066
- throw new CliError("validation_error", "unsupported meeting context capability");
1067
- const apply = ports.apply.bind(ports);
1068
- return {
1069
- scope: fixed,
1070
- accountId: account,
1071
- actions,
1072
- async change(meetingId, input, options = {}) {
1073
- const target = id(meetingId);
1074
- const change = validateMeetingContextChange(input);
1075
- if (!actions.includes(change.action))
1076
- throw new CliError("provider_unavailable", `meeting context does not support ${change.action}`);
1077
- const context3 = Object.freeze({
1078
- scope: fixed,
1079
- accountId: account,
1080
- ...options.signal ? { signal: options.signal } : {}
1081
- });
1082
- const outcome = await dispatchMeetingMutation(options, () => apply(target, change, context3));
1083
- return {
1084
- scope: fixed,
1085
- accountId: account,
1086
- meetingId: target,
1087
- change,
1088
- applied: outcome.applied,
1089
- ...outcome.applied ? { result: outcome.value } : {}
1090
- };
1091
- }
1092
- };
1093
- }, "createMeetingContext");
1094
-
1095
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
915
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1096
916
  var TASK_TYPES = ["bug", "feature", "chore"];
1097
- var invalid2 = /* @__PURE__ */ __name((message) => {
917
+ var invalid3 = /* @__PURE__ */ __name((message) => {
1098
918
  throw new CliError("validation_error", message);
1099
919
  }, "invalid");
1100
- var text4 = /* @__PURE__ */ __name((value, limit) => {
920
+ var text3 = /* @__PURE__ */ __name((value, limit) => {
1101
921
  if (typeof value !== "string" || !value.trim() || value.includes("\0") || value.length > limit)
1102
- return invalid2(`finding text must contain 1\u2013${limit} characters without NUL`);
922
+ return invalid3(`finding text must contain 1\u2013${limit} characters without NUL`);
1103
923
  return value.trim();
1104
924
  }, "text");
1105
925
  var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update(JSON.stringify(value)).digest("hex"), "findingHash");
1106
- var fields2 = /* @__PURE__ */ __name((value, allowed, noun) => {
926
+ var fields = /* @__PURE__ */ __name((value, allowed, noun) => {
1107
927
  if (Object.keys(value).some((key) => !allowed.includes(key)))
1108
- invalid2(`unknown ${noun} field`);
928
+ invalid3(`unknown ${noun} field`);
1109
929
  }, "fields");
930
+ var SUBJECT = /^(person|organization|project):[1-9]\d*$|^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/;
1110
931
  var validateFindings = /* @__PURE__ */ __name((input, rules) => {
1111
932
  if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
1112
- return invalid2(`${rules.plural} take at most 65536 UTF-8 bytes`);
1113
- fields2(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
933
+ return invalid3(`${rules.plural} take at most 65536 UTF-8 bytes`);
934
+ fields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
1114
935
  if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > 16)
1115
- return invalid2(`schemaVersion 1 takes 1\u201316 ${rules.plural}`);
1116
- const key = text4(input.key, 64);
936
+ return invalid3(`schemaVersion 1 takes 1\u201316 ${rules.plural}`);
937
+ const key = text3(input.key, 64);
1117
938
  if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
1118
- return invalid2("a findings key uses letters, digits, dot, colon, underscore or hyphen");
939
+ return invalid3("a findings key uses letters, digits, dot, colon, underscore or hyphen");
1119
940
  const ids2 = /* @__PURE__ */ new Set();
1120
941
  const findings = input.findings.map((finding) => {
1121
942
  if (!finding || typeof finding !== "object")
1122
- return invalid2("a finding is an object");
1123
- const id4 = text4(finding.id, 64);
943
+ return invalid3("a finding is an object");
944
+ const id4 = text3(finding.id, 64);
1124
945
  if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id4) || ids2.has(id4))
1125
- return invalid2("finding IDs must be unique simple keys");
946
+ return invalid3("finding IDs must be unique simple keys");
1126
947
  ids2.add(id4);
1127
- const project = text4(finding.project, 64);
1128
- if (!/^project:[1-9]\d*$/.test(project))
1129
- return invalid2("a finding names a project reference");
948
+ const project = finding.project === void 0 && rules.anySubject ? void 0 : text3(finding.project, 64);
949
+ if (project !== void 0 && !/^project:[1-9]\d*$/.test(project))
950
+ return invalid3("a finding names a project reference");
951
+ if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(text3(finding.subject, 80))))
952
+ return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
953
+ if (finding.kind === "task" && project === void 0)
954
+ return invalid3("a task finding names the project the task goes in");
1130
955
  if (!Array.isArray(finding.evidence) || finding.evidence.length < 1 || finding.evidence.length > 8)
1131
- return invalid2(`a finding requires 1\u20138 cited ${rules.cited}s`);
956
+ return invalid3(`a finding requires 1\u20138 cited ${rules.cited}s`);
1132
957
  const evidence = finding.evidence.map((item) => {
1133
958
  if (!item || typeof item !== "object")
1134
- return invalid2("finding evidence is a reference and fingerprint");
1135
- fields2(item, ["reference", "fingerprint"], rules.singular);
959
+ return invalid3("finding evidence is a reference and fingerprint");
960
+ fields(item, ["reference", "fingerprint"], rules.singular);
1136
961
  if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
1137
- return invalid2("evidence requires a reference and fingerprint");
962
+ return invalid3("evidence requires a reference and fingerprint");
1138
963
  const reference2 = rules.reference(item.reference);
1139
964
  if (!/^[a-f0-9]{64}$/.test(item.fingerprint))
1140
- return invalid2(`finding evidence requires exact ${rules.cited} references and fingerprints`);
965
+ return invalid3(`finding evidence requires exact ${rules.cited} references and fingerprints`);
1141
966
  return { reference: reference2, fingerprint: item.fingerprint };
1142
967
  }).sort((a, b) => a.reference.localeCompare(b.reference));
1143
968
  if (new Set(evidence.map((item) => item.reference)).size !== evidence.length)
1144
- return invalid2(`duplicate evidence ${rules.cited}`);
1145
- const base = { id: id4, project, evidence };
969
+ return invalid3(`duplicate evidence ${rules.cited}`);
970
+ const base = {
971
+ id: id4,
972
+ ...project === void 0 ? {} : { project },
973
+ ...finding.subject === void 0 ? {} : { subject: finding.subject },
974
+ evidence
975
+ };
1146
976
  if (finding.kind === "fact") {
1147
- fields2(finding, ["id", "project", "evidence", "kind", "type", "statement"], rules.singular);
1148
- if (!MEETING_FACT_TYPES.includes(finding.type))
1149
- return invalid2("unknown fact finding type");
1150
- return { ...base, kind: "fact", type: finding.type, statement: text4(finding.statement, 2e3) };
977
+ fields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
978
+ if (finding.type === "payment")
979
+ return invalid3("a payment is a finding of kind payment");
980
+ if (!FACT_TYPES.includes(finding.type))
981
+ return invalid3("unknown fact finding type");
982
+ return { ...base, kind: "fact", type: finding.type, statement: text3(finding.statement, 2e3) };
983
+ }
984
+ if (finding.kind === "payment" && rules.payments) {
985
+ fields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
986
+ if (finding.supersedes !== void 0 && !/^fact:[1-9]\d*$/.test(String(finding.supersedes)))
987
+ return invalid3("a payment finding supersedes a fact: reference");
988
+ return {
989
+ ...base,
990
+ kind: "payment",
991
+ ...finding.statement === void 0 ? {} : { statement: text3(finding.statement, 2e3) },
992
+ payment: validatePayment(finding.payment),
993
+ ...finding.supersedes === void 0 ? {} : { supersedes: finding.supersedes }
994
+ };
1151
995
  }
1152
996
  if (finding.kind !== "task")
1153
- return invalid2("a finding is a fact or task");
1154
- fields2(finding, [
997
+ return invalid3(`a finding is a fact${rules.payments ? ", payment" : ""} or task`);
998
+ fields(finding, [
1155
999
  "id",
1156
1000
  "project",
1157
1001
  "evidence",
@@ -1166,34 +1010,34 @@ var validateFindings = /* @__PURE__ */ __name((input, rules) => {
1166
1010
  "assigneeEvidence"
1167
1011
  ], rules.singular);
1168
1012
  if (!TASK_TYPES.includes(finding.type))
1169
- return invalid2("a task finding type is bug, chore or feature");
1013
+ return invalid3("a task finding type is bug, chore or feature");
1170
1014
  if (!["explicit", "inferred"].includes(finding.commitment))
1171
- return invalid2("task commitment must be explicit or inferred");
1015
+ return invalid3("task commitment must be explicit or inferred");
1172
1016
  const support = /* @__PURE__ */ __name((value) => {
1173
1017
  if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
1174
- return invalid2("date and assignee support must cite the finding's evidence");
1018
+ return invalid3("date and assignee support must cite the finding's evidence");
1175
1019
  return [...new Set(value)].sort();
1176
1020
  }, "support");
1177
1021
  if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0) || finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
1178
- return invalid2("optional dates and assignees require their supporting evidence");
1022
+ return invalid3("optional dates and assignees require their supporting evidence");
1179
1023
  if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
1180
- return invalid2("an assignee must be a person reference");
1024
+ return invalid3("an assignee must be a person reference");
1181
1025
  return {
1182
1026
  ...base,
1183
1027
  kind: "task",
1184
1028
  type: finding.type,
1185
- title: text4(finding.title, 300),
1186
- reason: text4(finding.reason, 2e3),
1029
+ title: text3(finding.title, 300),
1030
+ reason: text3(finding.reason, 2e3),
1187
1031
  commitment: finding.commitment,
1188
1032
  ...finding.dueAt === void 0 ? {} : { dueAt: meetingTimestamp(finding.dueAt, "finding due date"), dueEvidence: support(finding.dueEvidence) },
1189
1033
  ...finding.assignee === void 0 ? {} : { assignee: finding.assignee, assigneeEvidence: support(finding.assigneeEvidence) }
1190
1034
  };
1191
1035
  });
1192
- return { schemaVersion: 1, key, extractor: text4(input.extractor, 200), findings };
1036
+ return { schemaVersion: 1, key, extractor: text3(input.extractor, 200), findings };
1193
1037
  }, "validateFindings");
1194
1038
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
1195
1039
 
1196
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1040
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1197
1041
  var MEETING_FINDINGS_KIND = "meeting_findings";
1198
1042
  var cue = /* @__PURE__ */ __name((raw) => {
1199
1043
  const reference2 = canonicalMeetingReference(raw);
@@ -1204,7 +1048,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
1204
1048
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
1205
1049
  var meetingFindingFingerprint = findingFingerprint;
1206
1050
 
1207
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1051
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1208
1052
  var context = {
1209
1053
  command: "search meetings",
1210
1054
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -1323,7 +1167,56 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text9) => {
1323
1167
  return { version: 1, language: "lucene-v1", root };
1324
1168
  }, "meetingWordsQuery");
1325
1169
 
1326
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
1170
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/language.js
1171
+ var LATIN_WORDS = {
1172
+ en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
1173
+ es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
1174
+ de: ["der", "und", "ist", "nicht", "das", "ich", "wir", "mit", "auch", "ein"],
1175
+ fr: ["le", "les", "est", "une", "pas", "je", "vous", "nous", "avec", "mais"],
1176
+ it: ["gli", "della", "sono", "perch\xE9", "anche", "questo", "molto", "che", "di", "\xE8"],
1177
+ pt: ["n\xE3o", "voc\xEA", "isso", "muito", "ent\xE3o", "com", "uma", "tamb\xE9m", "mas", "eu"]
1178
+ };
1179
+ var LATIN_LANGUAGE = new Map(Object.entries(LATIN_WORDS).flatMap(([language, words2]) => words2.map((word) => [word, language])));
1180
+ var UKRAINIAN = /[іїєґ]/giu;
1181
+ var CYRILLIC = new RegExp("\\p{Script=Cyrillic}", "gu");
1182
+ var LATIN = new RegExp("\\p{Script=Latin}", "gu");
1183
+ var MIN_LETTERS = 20;
1184
+ var DOMINANT = 0.75;
1185
+ var countOf = /* @__PURE__ */ __name((text9, pattern) => text9.match(pattern)?.length ?? 0, "countOf");
1186
+ var latinLanguage = /* @__PURE__ */ __name((texts) => {
1187
+ const votes = /* @__PURE__ */ new Map();
1188
+ for (const text9 of texts)
1189
+ for (const word of text9.toLowerCase().split(/[^\p{L}]+/u)) {
1190
+ const language = LATIN_LANGUAGE.get(word);
1191
+ if (language)
1192
+ votes.set(language, (votes.get(language) ?? 0) + 1);
1193
+ }
1194
+ const [first, second] = [...votes].sort((a, b) => b[1] - a[1]);
1195
+ if (!first || first[1] < 3 || second && first[1] < 2 * second[1])
1196
+ return null;
1197
+ return first[0];
1198
+ }, "latinLanguage");
1199
+ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
1200
+ const all = [...texts];
1201
+ let cyrillic = 0;
1202
+ let latin = 0;
1203
+ let ukrainian = 0;
1204
+ for (const text9 of all) {
1205
+ cyrillic += countOf(text9, CYRILLIC);
1206
+ latin += countOf(text9, LATIN);
1207
+ ukrainian += countOf(text9, UKRAINIAN);
1208
+ }
1209
+ const letters = cyrillic + latin;
1210
+ if (letters < MIN_LETTERS)
1211
+ return null;
1212
+ if (cyrillic / letters >= DOMINANT)
1213
+ return ukrainian / cyrillic >= 0.01 ? "uk" : "ru";
1214
+ if (latin / letters >= DOMINANT)
1215
+ return latinLanguage(all);
1216
+ return null;
1217
+ }, "transcriptLanguage");
1218
+
1219
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
1327
1220
  var contentHash = /* @__PURE__ */ __name(async (text9) => {
1328
1221
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text9));
1329
1222
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -1337,7 +1230,7 @@ var speakerPosition = /* @__PURE__ */ __name((name, participants) => {
1337
1230
  var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source, hashText = JSON.stringify(lines), format = null) => ({
1338
1231
  source,
1339
1232
  format,
1340
- language: null,
1233
+ language: transcriptLanguage(lines.map((line2) => line2.text)),
1341
1234
  contentHash: await contentHash(hashText),
1342
1235
  externalCreatedAt: null,
1343
1236
  metadata: null,
@@ -1360,7 +1253,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
1360
1253
  return time;
1361
1254
  }, "timestamp");
1362
1255
 
1363
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
1256
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
1364
1257
  var TranscriptTextError = class extends Error {
1365
1258
  static {
1366
1259
  __name(this, "TranscriptTextError");
@@ -1393,117 +1286,383 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
1393
1286
  else
1394
1287
  header[key] = EMPTY.has(value) ? null : value;
1395
1288
  }
1396
- }
1397
- if (!sawHeader)
1398
- throw new TranscriptTextError('a text transcript starts with a header such as "\u0412\u0441\u0442\u0440\u0435\u0447\u0430: \u2026"');
1399
- const found = [];
1400
- for (const block of text9.split(/\n\s*\n/)) {
1401
- const match = LINE.exec(block.trim().replace(RULE, ""));
1402
- if (!match)
1403
- continue;
1404
- const [, hours = "0", minutes = "0", seconds = "0", speaker, said = ""] = match;
1405
- found.push({
1406
- startMs: ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3,
1407
- speaker: speaker?.trim() || null,
1408
- text: said.trim()
1409
- });
1410
- }
1411
- const lines = found.map((line2, at) => ({
1412
- ...line2,
1413
- endMs: Math.max(line2.startMs, found[at + 1]?.startMs ?? line2.startMs)
1414
- }));
1415
- return { header, lines };
1416
- }, "parseTranscriptText");
1289
+ }
1290
+ if (!sawHeader)
1291
+ throw new TranscriptTextError('a text transcript starts with a header such as "\u0412\u0441\u0442\u0440\u0435\u0447\u0430: \u2026"');
1292
+ const found = [];
1293
+ for (const block of text9.split(/\n\s*\n/)) {
1294
+ const match = LINE.exec(block.trim().replace(RULE, ""));
1295
+ if (!match)
1296
+ continue;
1297
+ const [, hours = "0", minutes = "0", seconds = "0", speaker, said = ""] = match;
1298
+ found.push({
1299
+ startMs: ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3,
1300
+ speaker: speaker?.trim() || null,
1301
+ text: said.trim()
1302
+ });
1303
+ }
1304
+ const lines = found.map((line2, at) => ({
1305
+ ...line2,
1306
+ endMs: Math.max(line2.startMs, found[at + 1]?.startMs ?? line2.startMs)
1307
+ }));
1308
+ return { header, lines };
1309
+ }, "parseTranscriptText");
1310
+
1311
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
1312
+ var VttError = class extends Error {
1313
+ static {
1314
+ __name(this, "VttError");
1315
+ }
1316
+ name = "VttError";
1317
+ };
1318
+ var TIMESTAMP = /^(?:(\d+):)?([0-5]\d):([0-5]\d)\.(\d{3})$/;
1319
+ var SKIPPED = /^(NOTE|STYLE|REGION)(\s|$)/;
1320
+ var millis = /* @__PURE__ */ __name((stamp, lineNo) => {
1321
+ const match = TIMESTAMP.exec(stamp);
1322
+ if (!match)
1323
+ throw new VttError(`line ${lineNo}: "${stamp}" is not a WebVTT timestamp`);
1324
+ const [, hours = "0", minutes = "0", seconds = "0", ms = "0"] = match;
1325
+ return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3 + Number(ms);
1326
+ }, "millis");
1327
+ var splitSpeaker = /* @__PURE__ */ __name((text9) => {
1328
+ const firstLine = text9.split("\n", 1)[0] ?? "";
1329
+ const at = firstLine.indexOf(": ");
1330
+ if (at <= 0)
1331
+ return { speaker: null, text: text9 };
1332
+ return { speaker: firstLine.slice(0, at).trim(), text: text9.slice(at + 2) };
1333
+ }, "splitSpeaker");
1334
+ var parseVtt = /* @__PURE__ */ __name((input) => {
1335
+ const lines = input.replace(/^/, "").split(/\r\n|\r|\n/);
1336
+ if (!/^WEBVTT([ \t].*)?$/.test(lines[0] ?? ""))
1337
+ throw new VttError('line 1: a WebVTT file starts with "WEBVTT"');
1338
+ const cues = [];
1339
+ let i = lines.findIndex((line2) => line2.trim() === "");
1340
+ if (i < 0)
1341
+ return [];
1342
+ while (i < lines.length) {
1343
+ while (i < lines.length && lines[i]?.trim() === "")
1344
+ i++;
1345
+ const start = i;
1346
+ while (i < lines.length && lines[i]?.trim() !== "")
1347
+ i++;
1348
+ const block = lines.slice(start, i);
1349
+ if (block.length === 0 || SKIPPED.test(block[0] ?? ""))
1350
+ continue;
1351
+ const timingAt = block.findIndex((line2) => line2.includes("-->"));
1352
+ if (timingAt < 0 || timingAt > 1)
1353
+ throw new VttError(`line ${start + 1}: a cue has no timing line`);
1354
+ const lineNo = start + timingAt + 1;
1355
+ const [from = "", rest = ""] = (block[timingAt] ?? "").split("-->");
1356
+ const to = rest.trim().split(/\s+/)[0] ?? "";
1357
+ const text9 = block.slice(timingAt + 1).join("\n").trim();
1358
+ cues.push({ startMs: millis(from.trim(), lineNo), endMs: millis(to, lineNo), ...splitSpeaker(text9) });
1359
+ }
1360
+ return cues;
1361
+ }, "parseVtt");
1362
+
1363
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/import.js
1364
+ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
1365
+ const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
1366
+ for (const file of files) {
1367
+ try {
1368
+ const format = file.format ?? "vtt";
1369
+ const lines = format === "text" ? parseTranscriptText(file.content).lines : parseVtt(file.content);
1370
+ const participants = file.participants ?? [];
1371
+ const details = await store.saveMeeting({
1372
+ meeting: file.meeting,
1373
+ participants: file.participants,
1374
+ transcripts: [await transcriptInput(lines, participants, file.source ?? "file", file.content, format)],
1375
+ now,
1376
+ fromFile: true
1377
+ });
1378
+ await linkEvent(store, details, now);
1379
+ report.meetings++;
1380
+ report.participants += participants.length;
1381
+ report.transcriptRows += lines.length;
1382
+ } catch (error) {
1383
+ report.warnings.push({
1384
+ externalId: file.meeting.externalId,
1385
+ message: error instanceof Error ? error.message : "Meeting import failed"
1386
+ });
1387
+ }
1388
+ }
1389
+ const zones = new Set(files.map((file) => file.meeting.timezone).filter((zone2) => zone2 !== null && zone2 !== void 0));
1390
+ const [zone] = zones;
1391
+ if (zones.size === 1 && zone)
1392
+ report.timezone = zone;
1393
+ return report;
1394
+ }, "importFiles");
1395
+
1396
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/links.js
1397
+ var CHAT_MESSAGES_READ = 1e5;
1398
+
1399
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/provider.js
1400
+ var snapshotMeetingScope = /* @__PURE__ */ __name((scope3) => {
1401
+ const provider = scope3?.provider;
1402
+ const account = scope3?.account;
1403
+ if (typeof provider !== "string" || !provider.trim() || provider.length > 200 || /[\0\r\n]/.test(provider) || typeof account !== "string" || !account.trim() || account.length > 1e3 || /[\0\r\n]/.test(account))
1404
+ throw new CliError("validation_error", "meeting provider and account must be bounded nonempty identifiers");
1405
+ return Object.freeze({ provider, account });
1406
+ }, "snapshotMeetingScope");
1407
+
1408
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
1409
+ var nonempty = /* @__PURE__ */ __name((value, name) => {
1410
+ if (typeof value !== "string" || !value.trim())
1411
+ throw new CliError("validation_error", `${name} must be nonempty`);
1412
+ return value;
1413
+ }, "nonempty");
1414
+ var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
1415
+ if (!change || typeof change !== "object" || Array.isArray(change) || Object.keys(change).some((key) => !["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].includes(key)))
1416
+ throw new CliError("validation_error", "unsupported meeting change field");
1417
+ const result = {};
1418
+ if (change.title !== void 0)
1419
+ result.title = nonempty(change.title, "meeting title");
1420
+ if (create && result.title === void 0)
1421
+ throw new CliError("validation_error", "meeting title is required");
1422
+ if (change.kind !== void 0) {
1423
+ if (change.kind !== "instant" && change.kind !== "scheduled")
1424
+ throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
1425
+ result.kind = change.kind;
1426
+ }
1427
+ if (change.startTime !== void 0) {
1428
+ result.startTime = meetingTimestamp(change.startTime, "meeting start");
1429
+ }
1430
+ if (change.durationMinutes !== void 0) {
1431
+ if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
1432
+ throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
1433
+ result.durationMinutes = change.durationMinutes;
1434
+ }
1435
+ if (change.timezone !== void 0) {
1436
+ if (typeof change.timezone !== "string" || !change.timezone.trim())
1437
+ throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
1438
+ try {
1439
+ new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
1440
+ } catch {
1441
+ throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
1442
+ }
1443
+ result.timezone = change.timezone;
1444
+ }
1445
+ if (change.agenda !== void 0) {
1446
+ if (typeof change.agenda !== "string")
1447
+ throw new CliError("validation_error", "meeting agenda must be text");
1448
+ result.agenda = change.agenda;
1449
+ }
1450
+ if (create) {
1451
+ result.kind ??= "scheduled";
1452
+ if (result.kind === "scheduled" && result.startTime === void 0)
1453
+ throw new CliError("validation_error", "scheduled meeting start is required");
1454
+ } else if (!Object.keys(result).length)
1455
+ throw new CliError("validation_error", "at least one meeting change is required");
1456
+ return Object.freeze(result);
1457
+ }, "validateMeetingChange");
1458
+ var checkCancelled = /* @__PURE__ */ __name((signal) => {
1459
+ if (!signal?.aborted)
1460
+ return;
1461
+ if (signal.reason instanceof CliError)
1462
+ throw signal.reason;
1463
+ const timeout = signal.reason instanceof Error && signal.reason.name === "TimeoutError";
1464
+ throw new CliError(timeout ? "timeout" : "cancelled", timeout ? "meeting operation timed out" : "meeting operation cancelled");
1465
+ }, "checkCancelled");
1466
+ var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) => {
1467
+ const { apply, dryRun, signal } = options;
1468
+ checkCancelled(signal);
1469
+ if (apply !== true || dryRun)
1470
+ return { applied: false };
1471
+ return { applied: true, value: await dispatch(signal) };
1472
+ }, "dispatchMeetingMutation");
1473
+ var createMeetingManagement = /* @__PURE__ */ __name((scope3, ports) => {
1474
+ const fixed = snapshotMeetingScope(scope3);
1475
+ const capabilities = {};
1476
+ for (const name of ["list", "get", "invitation", "create", "update", "cancel"]) {
1477
+ const port = ports[name];
1478
+ if (typeof port === "function")
1479
+ Object.defineProperty(capabilities, name, { value: port.bind(ports), enumerable: true });
1480
+ }
1481
+ Object.freeze(capabilities);
1482
+ const context3 = /* @__PURE__ */ __name((options) => {
1483
+ const signal = options.signal;
1484
+ checkCancelled(signal);
1485
+ return Object.freeze({ scope: fixed, ...signal ? { signal } : {} });
1486
+ }, "context");
1487
+ const capability = /* @__PURE__ */ __name((name) => {
1488
+ const port = capabilities[name];
1489
+ if (!port)
1490
+ throw new CliError("provider_unavailable", `meeting provider does not support ${name}`);
1491
+ return port;
1492
+ }, "capability");
1493
+ return {
1494
+ scope: fixed,
1495
+ capabilities: Object.freeze(Object.keys(capabilities).filter((name) => typeof capabilities[name] === "function")),
1496
+ list(options = {}) {
1497
+ return capability("list")(context3(options));
1498
+ },
1499
+ get(id4, options = {}) {
1500
+ return capability("get")(nonempty(id4, "meeting id"), context3(options));
1501
+ },
1502
+ invitation(id4, options = {}) {
1503
+ return capability("invitation")(nonempty(id4, "meeting id"), context3(options));
1504
+ },
1505
+ async create(change, options = {}) {
1506
+ const port = capability("create");
1507
+ const validated = validateMeetingChange(change, true);
1508
+ const ctx = context3(options);
1509
+ const outcome = await dispatchMeetingMutation(options, () => port(validated, ctx));
1510
+ return {
1511
+ action: "create",
1512
+ scope: fixed,
1513
+ change: validated,
1514
+ applied: outcome.applied,
1515
+ ...outcome.value ? { meeting: outcome.value } : {}
1516
+ };
1517
+ },
1518
+ async update(id4, change, options = {}) {
1519
+ const port = capability("update");
1520
+ const validatedId = nonempty(id4, "meeting id");
1521
+ const validated = validateMeetingChange(change, false);
1522
+ const ctx = context3(options);
1523
+ const outcome = await dispatchMeetingMutation(options, () => port(validatedId, validated, ctx));
1524
+ return { action: "update", scope: fixed, id: validatedId, change: validated, applied: outcome.applied };
1525
+ },
1526
+ async cancel(id4, options = {}) {
1527
+ const port = capability("cancel");
1528
+ const validatedId = nonempty(id4, "meeting id");
1529
+ const occurrenceId2 = options.occurrenceId === void 0 ? void 0 : nonempty(options.occurrenceId, "occurrence id");
1530
+ const ctx = { ...context3(options), ...occurrenceId2 === void 0 ? {} : { occurrenceId: occurrenceId2 } };
1531
+ const outcome = await dispatchMeetingMutation(options, () => port(validatedId, ctx));
1532
+ return {
1533
+ action: "cancel",
1534
+ scope: fixed,
1535
+ id: validatedId,
1536
+ applied: outcome.applied,
1537
+ ...occurrenceId2 === void 0 ? {} : { occurrenceId: occurrenceId2 }
1538
+ };
1539
+ }
1540
+ };
1541
+ }, "createMeetingManagement");
1417
1542
 
1418
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
1419
- var VttError = class extends Error {
1420
- static {
1421
- __name(this, "VttError");
1422
- }
1423
- name = "VttError";
1543
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
1544
+ var id = /* @__PURE__ */ __name((value) => {
1545
+ if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
1546
+ throw new CliError("validation_error", "meeting context identifiers must be positive integers");
1547
+ return value;
1548
+ }, "id");
1549
+ var text4 = /* @__PURE__ */ __name((value, max) => {
1550
+ if (typeof value !== "string" || !value.trim() || value.length > max || value.includes("\0"))
1551
+ throw new CliError("validation_error", `meeting context text must contain 1\u2013${max} characters without NUL`);
1552
+ return value.trim();
1553
+ }, "text");
1554
+ var uid = /* @__PURE__ */ __name((value) => {
1555
+ const result = text4(value, 100);
1556
+ if (!/^[1-9]\d*$/.test(result) || !Number.isSafeInteger(Number(result)))
1557
+ throw new CliError("validation_error", "person UID must be a positive integer");
1558
+ return result;
1559
+ }, "uid");
1560
+ var strings = /* @__PURE__ */ __name((value, count6, length) => {
1561
+ if (!Array.isArray(value) || value.length < 1 || value.length > count6)
1562
+ throw new CliError("validation_error", `meeting context list must contain 1\u2013${count6} entries`);
1563
+ return Object.freeze([...new Set(value.map((entry) => text4(entry, length)))]);
1564
+ }, "strings");
1565
+ var fields2 = {
1566
+ "note.add": ["text", "title"],
1567
+ "tags.add": ["tags"],
1568
+ "tags.remove": ["tags"],
1569
+ "memory.add": ["body", "kind", "scope", "evidence", "subject"],
1570
+ "fact.add": ["statement", "type", "scope", "evidence", "subject"],
1571
+ "event.link": ["eventId", "expectedEventId"],
1572
+ "person.link": ["participantId", "personUid", "targetAccountIds", "expectedPersonUid"]
1424
1573
  };
1425
- var TIMESTAMP = /^(?:(\d+):)?([0-5]\d):([0-5]\d)\.(\d{3})$/;
1426
- var SKIPPED = /^(NOTE|STYLE|REGION)(\s|$)/;
1427
- var millis = /* @__PURE__ */ __name((stamp, lineNo) => {
1428
- const match = TIMESTAMP.exec(stamp);
1429
- if (!match)
1430
- throw new VttError(`line ${lineNo}: "${stamp}" is not a WebVTT timestamp`);
1431
- const [, hours = "0", minutes = "0", seconds = "0", ms = "0"] = match;
1432
- return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3 + Number(ms);
1433
- }, "millis");
1434
- var splitSpeaker = /* @__PURE__ */ __name((text9) => {
1435
- const firstLine = text9.split("\n", 1)[0] ?? "";
1436
- const at = firstLine.indexOf(": ");
1437
- if (at <= 0)
1438
- return { speaker: null, text: text9 };
1439
- return { speaker: firstLine.slice(0, at).trim(), text: text9.slice(at + 2) };
1440
- }, "splitSpeaker");
1441
- var parseVtt = /* @__PURE__ */ __name((input) => {
1442
- const lines = input.replace(/^/, "").split(/\r\n|\r|\n/);
1443
- if (!/^WEBVTT([ \t].*)?$/.test(lines[0] ?? ""))
1444
- throw new VttError('line 1: a WebVTT file starts with "WEBVTT"');
1445
- const cues = [];
1446
- let i = lines.findIndex((line2) => line2.trim() === "");
1447
- if (i < 0)
1448
- return [];
1449
- while (i < lines.length) {
1450
- while (i < lines.length && lines[i]?.trim() === "")
1451
- i++;
1452
- const start = i;
1453
- while (i < lines.length && lines[i]?.trim() !== "")
1454
- i++;
1455
- const block = lines.slice(start, i);
1456
- if (block.length === 0 || SKIPPED.test(block[0] ?? ""))
1457
- continue;
1458
- const timingAt = block.findIndex((line2) => line2.includes("-->"));
1459
- if (timingAt < 0 || timingAt > 1)
1460
- throw new VttError(`line ${start + 1}: a cue has no timing line`);
1461
- const lineNo = start + timingAt + 1;
1462
- const [from = "", rest = ""] = (block[timingAt] ?? "").split("-->");
1463
- const to = rest.trim().split(/\s+/)[0] ?? "";
1464
- const text9 = block.slice(timingAt + 1).join("\n").trim();
1465
- cues.push({ startMs: millis(from.trim(), lineNo), endMs: millis(to, lineNo), ...splitSpeaker(text9) });
1466
- }
1467
- return cues;
1468
- }, "parseVtt");
1469
-
1470
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/import.js
1471
- var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
1472
- const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
1473
- for (const file of files) {
1474
- try {
1475
- const format = file.format ?? "vtt";
1476
- const lines = format === "text" ? parseTranscriptText(file.content).lines : parseVtt(file.content);
1477
- const participants = file.participants ?? [];
1478
- const details = await store.saveMeeting({
1479
- meeting: file.meeting,
1480
- participants: file.participants,
1481
- transcripts: [await transcriptInput(lines, participants, file.source ?? "file", file.content, format)],
1482
- now,
1483
- fromFile: true
1574
+ var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
1575
+ if (!change || typeof change !== "object" || Array.isArray(change) || !Object.hasOwn(fields2, change.action) || Object.keys(change).some((key) => key !== "action" && !fields2[change.action].includes(key)))
1576
+ throw new CliError("validation_error", "unsupported meeting context change");
1577
+ switch (change.action) {
1578
+ case "note.add":
1579
+ return Object.freeze({
1580
+ action: change.action,
1581
+ text: text4(change.text, 1e5),
1582
+ ...change.title === void 0 ? {} : { title: text4(change.title, 500) }
1484
1583
  });
1485
- await linkEvent(store, details, now);
1486
- report.meetings++;
1487
- report.participants += participants.length;
1488
- report.transcriptRows += lines.length;
1489
- } catch (error) {
1490
- report.warnings.push({
1491
- externalId: file.meeting.externalId,
1492
- message: error instanceof Error ? error.message : "Meeting import failed"
1584
+ case "tags.add":
1585
+ case "tags.remove":
1586
+ return Object.freeze({ action: change.action, tags: strings(change.tags, 100, 200) });
1587
+ case "memory.add": {
1588
+ if (!["summary", "digest", "preference"].includes(change.kind) || !["personal", "work"].includes(change.scope))
1589
+ throw new CliError("validation_error", "memory kind and explicit personal/work scope are required");
1590
+ return Object.freeze({
1591
+ action: change.action,
1592
+ body: text4(change.body, 2e4),
1593
+ kind: change.kind,
1594
+ scope: change.scope,
1595
+ evidence: strings(change.evidence, 100, 4e3),
1596
+ ...change.subject === void 0 ? {} : { subject: text4(change.subject, 4e3) }
1597
+ });
1598
+ }
1599
+ case "fact.add": {
1600
+ if (!FACT_TYPES.includes(change.type) || !["personal", "work"].includes(change.scope))
1601
+ throw new CliError("validation_error", `fact type (${FACT_TYPES.join(", ")}) and explicit personal/work scope are required`);
1602
+ return Object.freeze({
1603
+ action: change.action,
1604
+ statement: text4(change.statement, 2e4),
1605
+ type: change.type,
1606
+ scope: change.scope,
1607
+ evidence: strings(change.evidence, 100, 4e3),
1608
+ ...change.subject === void 0 ? {} : { subject: text4(change.subject, 4e3) }
1609
+ });
1610
+ }
1611
+ case "event.link":
1612
+ return Object.freeze({
1613
+ action: change.action,
1614
+ eventId: change.eventId === null ? null : id(change.eventId),
1615
+ ...change.expectedEventId === void 0 ? {} : { expectedEventId: change.expectedEventId === null ? null : id(change.expectedEventId) }
1616
+ });
1617
+ case "person.link": {
1618
+ const targets = change.targetAccountIds;
1619
+ if (targets !== void 0 && (!Array.isArray(targets) || targets.length < 1 || targets.length > 1e3))
1620
+ throw new CliError("validation_error", "target accounts must contain 1\u20131000 identifiers");
1621
+ return Object.freeze({
1622
+ action: change.action,
1623
+ participantId: id(change.participantId),
1624
+ personUid: uid(change.personUid),
1625
+ ...targets === void 0 ? {} : { targetAccountIds: Object.freeze([...new Set(targets.map(id))]) },
1626
+ ...change.expectedPersonUid === void 0 ? {} : { expectedPersonUid: change.expectedPersonUid === null ? null : uid(change.expectedPersonUid) }
1493
1627
  });
1494
1628
  }
1495
1629
  }
1496
- const zones = new Set(files.map((file) => file.meeting.timezone).filter((zone2) => zone2 !== null && zone2 !== void 0));
1497
- const [zone] = zones;
1498
- if (zones.size === 1 && zone)
1499
- report.timezone = zone;
1500
- return report;
1501
- }, "importFiles");
1502
-
1503
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/links.js
1504
- var CHAT_MESSAGES_READ = 1e5;
1630
+ }, "validateMeetingContextChange");
1631
+ var createMeetingContext = /* @__PURE__ */ __name((scope3, accountId, ports) => {
1632
+ const fixed = snapshotMeetingScope(scope3);
1633
+ const account = id(accountId);
1634
+ const actions = Object.freeze([...new Set(ports.actions)]);
1635
+ if (actions.some((action) => !Object.hasOwn(fields2, action)))
1636
+ throw new CliError("validation_error", "unsupported meeting context capability");
1637
+ const apply = ports.apply.bind(ports);
1638
+ return {
1639
+ scope: fixed,
1640
+ accountId: account,
1641
+ actions,
1642
+ async change(meetingId, input, options = {}) {
1643
+ const target = id(meetingId);
1644
+ const change = validateMeetingContextChange(input);
1645
+ if (!actions.includes(change.action))
1646
+ throw new CliError("provider_unavailable", `meeting context does not support ${change.action}`);
1647
+ const context3 = Object.freeze({
1648
+ scope: fixed,
1649
+ accountId: account,
1650
+ ...options.signal ? { signal: options.signal } : {}
1651
+ });
1652
+ const outcome = await dispatchMeetingMutation(options, () => apply(target, change, context3));
1653
+ return {
1654
+ scope: fixed,
1655
+ accountId: account,
1656
+ meetingId: target,
1657
+ change,
1658
+ applied: outcome.applied,
1659
+ ...outcome.applied ? { result: outcome.value } : {}
1660
+ };
1661
+ }
1662
+ };
1663
+ }, "createMeetingContext");
1505
1664
 
1506
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/passage.js
1665
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/passage.js
1507
1666
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
1508
1667
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
1509
1668
  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)))
@@ -1516,7 +1675,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
1516
1675
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
1517
1676
  }, "validateMeetingPassage");
1518
1677
 
1519
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
1678
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
1520
1679
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
1521
1680
  if (!original || typeof original !== "object" || Array.isArray(original))
1522
1681
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -1541,7 +1700,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
1541
1700
  return { ...input, limit, maxReadBytes };
1542
1701
  }, "validateMeetingPreparationContext");
1543
1702
 
1544
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
1703
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
1545
1704
  var count3 = pipe(number(), integer(), minValue(0));
1546
1705
  var id2 = pipe(string(), minLength(1));
1547
1706
  var meetingProjectEvidence = strictObject({
@@ -1662,7 +1821,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
1662
1821
  };
1663
1822
  }, "meetingProjectEvidenceAnswer");
1664
1823
 
1665
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
1824
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
1666
1825
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
1667
1826
  const integer5 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
1668
1827
  if (typeof query !== "string" || !query.trim() || query.includes("\0") || new TextEncoder().encode(query).byteLength > 65536 || !integer5(options.limit ?? 100, 1, 1e3) || !integer5(options.maxReadBytes ?? 4194304, 1, 67108864) || [
@@ -1682,7 +1841,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
1682
1841
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
1683
1842
  }, "validateMeetingHitSearch");
1684
1843
 
1685
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
1844
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
1686
1845
  var ids = {
1687
1846
  meeting_id: "meetingId",
1688
1847
  identity_id: "participantIdentityId",
@@ -1773,7 +1932,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
1773
1932
  return { project: project.trim(), options, query: frozen.join(" AND ") };
1774
1933
  }, "prepareMeetingProjectEvidence");
1775
1934
 
1776
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
1935
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
1777
1936
  var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
1778
1937
  const prepared = prepareMeetingProjectEvidence(project, request, now);
1779
1938
  const page = await read(prepared.project, prepared.options);
@@ -1781,7 +1940,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
1781
1940
  return meetingProjectEvidenceAnswer(page, prepared);
1782
1941
  }, "readMeetingProjectEvidence");
1783
1942
 
1784
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/pull.js
1943
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/pull.js
1785
1944
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
1786
1945
  const { identityExternalId, ...fields3 } = p;
1787
1946
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
@@ -1920,7 +2079,7 @@ unlinked`, format)],
1920
2079
  return report;
1921
2080
  }, "pull");
1922
2081
 
1923
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2082
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
1924
2083
  var text5 = string();
1925
2084
  var count4 = pipe(number(), integer(), minValue(0));
1926
2085
  var id3 = pipe(number(), integer(), minValue(1));
@@ -2120,7 +2279,12 @@ var event = strictObject({
2120
2279
  changed_at: optional(nullable(isoTime)),
2121
2280
  /** The times a moved event had at that date. */
2122
2281
  was: optional(strictObject({ starts_at: nullable(isoTime), ends_at: nullable(isoTime) })),
2123
- /** On a calendar CLI's `events list overlapping`: the events it clashes with, as `event:<id>`. */
2282
+ /**
2283
+ * Whether its time overlaps another event's, in the accounts read: a timed event, not cancelled, not declined, not
2284
+ * free and no working-location block. On a calendar CLI's `events list` when the query names it.
2285
+ */
2286
+ overlapping: optional(boolean()),
2287
+ /** With `overlapping:true`: the events it overlaps, as `event:<id>`. */
2124
2288
  overlaps: optional(array(text5))
2125
2289
  });
2126
2290
  var eventItem = /* @__PURE__ */ __name((one) => ({
@@ -2141,10 +2305,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
2141
2305
  updated_at: new Date(one.updatedAt).toISOString()
2142
2306
  }), "eventItem");
2143
2307
 
2144
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/recording-schedule.js
2308
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/recording-schedule.js
2145
2309
  import { createHash as createHash3 } from "node:crypto";
2146
2310
 
2147
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/recording-sync.js
2311
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/recording-sync.js
2148
2312
  var RecordingSyncError = class extends CliError {
2149
2313
  static {
2150
2314
  __name(this, "RecordingSyncError");
@@ -2465,7 +2629,7 @@ async function* syncRecordingArchive(catalog, input) {
2465
2629
  }
2466
2630
  __name(syncRecordingArchive, "syncRecordingArchive");
2467
2631
 
2468
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/recording-schedule.js
2632
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/recording-schedule.js
2469
2633
  var fail2 = /* @__PURE__ */ __name((message) => {
2470
2634
  throw new CliError("validation_error", message);
2471
2635
  }, "fail");
@@ -2572,7 +2736,7 @@ var installRecordingArchiveSchedule = /* @__PURE__ */ __name(async (scheduler, v
2572
2736
  return { applied: true, backend, schedule };
2573
2737
  }, "installRecordingArchiveSchedule");
2574
2738
 
2575
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2739
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2576
2740
  var RecordingTransferError = class extends CliError {
2577
2741
  static {
2578
2742
  __name(this, "RecordingTransferError");
@@ -2737,7 +2901,7 @@ var transferRecording = /* @__PURE__ */ __name(async (source, storage, options)
2737
2901
  }
2738
2902
  }, "transferRecording");
2739
2903
 
2740
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2904
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2741
2905
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2742
2906
  if (!original || typeof original !== "object" || Array.isArray(original))
2743
2907
  throw new CliError("validation_error", "related history request is required");
@@ -2767,7 +2931,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2767
2931
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
2768
2932
  }, "validateMeetingRelatedHistory");
2769
2933
 
2770
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
2934
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
2771
2935
  var text8 = string();
2772
2936
  var identifier = pipe(text8, minLength(1));
2773
2937
  var nullableText2 = nullable(text8);
@@ -2885,23 +3049,30 @@ var embedding = union([
2885
3049
  })
2886
3050
  })
2887
3051
  ]);
3052
+ var repair = strictObject({
3053
+ account_id: identifier,
3054
+ applied: flag,
3055
+ transcripts: count5,
3056
+ languages: array(strictObject({ language: nullableText2, transcripts: count5 }))
3057
+ });
2888
3058
  var MEETING_RESULT_ENTITIES = {
2889
3059
  meeting_ingestion: run,
2890
3060
  meeting_export: exported,
2891
3061
  meeting_association: meetingChange,
2892
3062
  meeting_transcription: transcription,
2893
- meeting_embedding: embedding
3063
+ meeting_embedding: embedding,
3064
+ meeting_repair: repair
2894
3065
  };
2895
3066
 
2896
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/review.js
3067
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/review.js
2897
3068
  var REVIEW_LIMIT = { default: 50, most: 200 };
2898
3069
 
2899
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3070
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
2900
3071
  var SAVE_INSTRUCTION = "If this shows something worth keeping \u2014 a decision, a promise, a preference \u2014 and memo's server is connected, propose it with facts_add or memories_add, citing the msg: locator or meeting: reference. Otherwise skip this.";
2901
3072
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
2902
3073
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
2903
3074
 
2904
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3075
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
2905
3076
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2906
3077
  input.signal?.throwIfAborted();
2907
3078
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -2922,62 +3093,62 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2922
3093
  return { ...input, limit, maxReadBytes };
2923
3094
  }, "validateMeetingSeriesHistory");
2924
3095
 
2925
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3096
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
2926
3097
  import { createHash as createHash4 } from "node:crypto";
2927
3098
 
2928
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
2929
- var invalid3 = /* @__PURE__ */ __name((field) => {
3099
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3100
+ var invalid4 = /* @__PURE__ */ __name((field) => {
2930
3101
  throw new CliError("invalid_response", `meeting occurrence ${field} is invalid`);
2931
3102
  }, "invalid");
2932
3103
  var occurrenceTime = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isSafeInteger(value) && Math.abs(value) <= 864e13, "occurrenceTime");
2933
3104
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
2934
3105
  var readOccurrenceSchedule = /* @__PURE__ */ __name((input, meetingId, limit, maxReadBytes) => {
2935
3106
  if (!input || typeof input !== "object" || Array.isArray(input))
2936
- invalid3("schedule");
3107
+ invalid4("schedule");
2937
3108
  for (const key of Object.keys(input))
2938
3109
  if (!["meetingId", "kind", "timezone", "occurrences", "complete", "missing"].includes(key))
2939
- invalid3(key);
3110
+ invalid4(key);
2940
3111
  if (input.meetingId !== meetingId)
2941
- invalid3("meetingId");
3112
+ invalid4("meetingId");
2942
3113
  if (!["single", "recurring", "unscheduled", "unknown"].includes(input.kind))
2943
- invalid3("kind");
3114
+ invalid4("kind");
2944
3115
  if (input.timezone !== null) {
2945
3116
  if (typeof input.timezone !== "string" || input.timezone.length > 100)
2946
- invalid3("timezone");
3117
+ invalid4("timezone");
2947
3118
  try {
2948
3119
  new Intl.DateTimeFormat("en", { timeZone: input.timezone }).format(0);
2949
3120
  } catch {
2950
- invalid3("timezone");
3121
+ invalid4("timezone");
2951
3122
  }
2952
3123
  }
2953
3124
  if (typeof input.complete !== "boolean")
2954
- invalid3("complete");
3125
+ invalid4("complete");
2955
3126
  if (!Array.isArray(input.missing) || input.missing.length > 2 || new Set(input.missing).size !== input.missing.length || input.missing.some((value) => !["schedule-details", "occurrence-details"].includes(value)) || input.complete && input.missing.length > 0)
2956
- invalid3("missing");
3127
+ invalid4("missing");
2957
3128
  if (!Array.isArray(input.occurrences) || input.occurrences.length > limit)
2958
- invalid3("occurrences");
3129
+ invalid4("occurrences");
2959
3130
  if (input.kind === "single" && input.occurrences.length > 1)
2960
- invalid3("single occurrence count");
3131
+ invalid4("single occurrence count");
2961
3132
  const seen = /* @__PURE__ */ new Set();
2962
3133
  const occurrences = input.occurrences.map((entry) => {
2963
3134
  if (!entry || typeof entry !== "object" || Array.isArray(entry))
2964
- invalid3("entry");
3135
+ invalid4("entry");
2965
3136
  for (const key2 of Object.keys(entry))
2966
3137
  if (!["id", "startAt", "endAt", "status", "verified"].includes(key2))
2967
- invalid3(key2);
3138
+ invalid4(key2);
2968
3139
  if (entry.id !== null && !occurrenceId(entry.id))
2969
- invalid3("id");
3140
+ invalid4("id");
2970
3141
  if (entry.startAt !== null && !occurrenceTime(entry.startAt))
2971
- invalid3("startAt");
3142
+ invalid4("startAt");
2972
3143
  if (entry.endAt !== null && (!occurrenceTime(entry.endAt) || entry.startAt === null || entry.endAt <= entry.startAt))
2973
- invalid3("endAt");
3144
+ invalid4("endAt");
2974
3145
  if (!["scheduled", "cancelled"].includes(entry.status) || typeof entry.verified !== "boolean")
2975
- invalid3("status");
3146
+ invalid4("status");
2976
3147
  if (entry.verified && (entry.startAt === null || !["single", "recurring"].includes(input.kind) || input.kind === "recurring" && entry.id === null))
2977
- invalid3("verification");
3148
+ invalid4("verification");
2978
3149
  const key = entry.id ?? "single";
2979
3150
  if (seen.has(key))
2980
- invalid3("duplicate id");
3151
+ invalid4("duplicate id");
2981
3152
  seen.add(key);
2982
3153
  return { id: entry.id, startAt: entry.startAt, endAt: entry.endAt, status: entry.status, verified: entry.verified };
2983
3154
  });
@@ -2990,35 +3161,35 @@ var readOccurrenceSchedule = /* @__PURE__ */ __name((input, meetingId, limit, ma
2990
3161
  missing: [...input.missing]
2991
3162
  };
2992
3163
  if (new TextEncoder().encode(JSON.stringify(result)).byteLength > maxReadBytes)
2993
- invalid3("maxReadBytes budget");
3164
+ invalid4("maxReadBytes budget");
2994
3165
  return result;
2995
3166
  }, "readOccurrenceSchedule");
2996
3167
 
2997
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3168
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
2998
3169
  var inventoryHash = /* @__PURE__ */ __name((value) => createHash4("sha256").update(JSON.stringify(value)).digest("hex"), "inventoryHash");
2999
3170
  var inventorySize = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "inventorySize");
3000
- function invalid4(field, response = false) {
3171
+ function invalid5(field, response = false) {
3001
3172
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
3002
3173
  }
3003
- __name(invalid4, "invalid");
3174
+ __name(invalid5, "invalid");
3004
3175
  var object2 = /* @__PURE__ */ __name((value, fields3, field, response = false) => {
3005
3176
  if (!value || typeof value !== "object" || Array.isArray(value))
3006
- invalid4(field, response);
3177
+ invalid5(field, response);
3007
3178
  for (const key of Object.keys(value))
3008
3179
  if (!fields3.includes(key))
3009
- invalid4(`${field}.${key}`, response);
3180
+ invalid5(`${field}.${key}`, response);
3010
3181
  }, "object");
3011
3182
  var cursorDetails = /* @__PURE__ */ __name((value) => {
3012
3183
  if (typeof value !== "string" || value.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(value))
3013
- invalid4("cursor");
3184
+ invalid5("cursor");
3014
3185
  try {
3015
3186
  const decoded = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
3016
3187
  object2(decoded, ["version", "selection", "cursor"], "cursor");
3017
3188
  if (decoded.version !== 1 || typeof decoded.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded.selection) || !occurrenceId(decoded.cursor))
3018
- invalid4("cursor");
3189
+ invalid5("cursor");
3019
3190
  return decoded;
3020
3191
  } catch {
3021
- return invalid4("cursor");
3192
+ return invalid5("cursor");
3022
3193
  }
3023
3194
  }, "cursorDetails");
3024
3195
  var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
@@ -3028,19 +3199,19 @@ var inventoryRequest = /* @__PURE__ */ __name((scope3, input) => {
3028
3199
  object2(input, ["after", "until", "limit", "maxReadBytes", "bytes", "cursor", "signal"], "request");
3029
3200
  const { after, until, signal } = input;
3030
3201
  if (!occurrenceTime(after) || !occurrenceTime(until) || after >= until || until - after > 366 * 864e5)
3031
- invalid4("after/until");
3202
+ invalid5("after/until");
3032
3203
  const limits = { limit: input.limit ?? 100, maxReadBytes: input.maxReadBytes ?? 65536, bytes: input.bytes ?? 65536 };
3033
3204
  for (const [key, value] of Object.entries(limits))
3034
3205
  if (!Number.isSafeInteger(value) || value < (key === "bytes" ? 2048 : 1) || value > (key === "limit" ? 100 : 1048576))
3035
- invalid4(key);
3206
+ invalid5(key);
3036
3207
  if (signal !== void 0 && !(signal instanceof AbortSignal))
3037
- invalid4("signal");
3208
+ invalid5("signal");
3038
3209
  const selection = inventoryHash({ scope: scope3, after, until });
3039
3210
  let cursor;
3040
3211
  if (input.cursor !== void 0) {
3041
3212
  const decoded = cursorDetails(input.cursor);
3042
3213
  if (decoded.selection !== selection)
3043
- invalid4("cursor");
3214
+ invalid5("cursor");
3044
3215
  cursor = decoded.cursor;
3045
3216
  }
3046
3217
  return { after, until, limits, signal, selection, cursor };
@@ -3048,41 +3219,41 @@ var inventoryRequest = /* @__PURE__ */ __name((scope3, input) => {
3048
3219
  var inventoryCursor = /* @__PURE__ */ __name((selection, cursor) => {
3049
3220
  const encoded = Buffer.from(JSON.stringify({ version: 1, selection, cursor }), "utf8").toString("base64url");
3050
3221
  if (encoded.length > 4096)
3051
- invalid4("nextCursor budget", true);
3222
+ invalid5("nextCursor budget", true);
3052
3223
  return encoded;
3053
3224
  }, "inventoryCursor");
3054
3225
  var inventoryPage = /* @__PURE__ */ __name((scope3, request, page) => {
3055
3226
  object2(page, ["scope", "after", "until", "items", "nextCursor", "coverage"], "page", true);
3056
3227
  object2(page.scope, ["provider", "account"], "scope", true);
3057
3228
  if (page.scope.provider !== scope3.provider || page.scope.account !== scope3.account || page.after !== request.after || page.until !== request.until)
3058
- invalid4("selection", true);
3229
+ invalid5("selection", true);
3059
3230
  object2(page.coverage, ["selection", "partial"], "coverage", true);
3060
3231
  if (!["provider-window", "provider-inventory"].includes(page.coverage.selection) || typeof page.coverage.partial !== "boolean")
3061
- invalid4("coverage", true);
3232
+ invalid5("coverage", true);
3062
3233
  if (page.nextCursor !== null && (!occurrenceId(page.nextCursor) || page.nextCursor === request.cursor))
3063
- invalid4("nextCursor", true);
3234
+ invalid5("nextCursor", true);
3064
3235
  if (!Array.isArray(page.items) || page.items.length > request.limits.limit)
3065
- invalid4("items", true);
3236
+ invalid5("items", true);
3066
3237
  const seen = /* @__PURE__ */ new Set();
3067
3238
  const items = page.items.map((item) => {
3068
3239
  object2(item, ["meetingId", "title", "kind", "scheduledStartAt"], "item", true);
3069
3240
  if (!occurrenceId(item.meetingId) || seen.has(item.meetingId))
3070
- invalid4("meetingId", true);
3241
+ invalid5("meetingId", true);
3071
3242
  seen.add(item.meetingId);
3072
3243
  if (item.title !== null && (typeof item.title !== "string" || item.title.length > 8192))
3073
- invalid4("title", true);
3244
+ invalid5("title", true);
3074
3245
  if (!["single", "recurring", "unscheduled", "unknown"].includes(item.kind))
3075
- invalid4("kind", true);
3246
+ invalid5("kind", true);
3076
3247
  if (item.scheduledStartAt !== null && !occurrenceTime(item.scheduledStartAt))
3077
- invalid4("scheduledStartAt", true);
3248
+ invalid5("scheduledStartAt", true);
3078
3249
  return { meetingId: item.meetingId, title: item.title, kind: item.kind, scheduledStartAt: item.scheduledStartAt };
3079
3250
  });
3080
3251
  if (inventorySize(page) > request.limits.maxReadBytes)
3081
- invalid4("maxReadBytes budget", true);
3252
+ invalid5("maxReadBytes budget", true);
3082
3253
  return { items, selection: page.coverage.selection, partial: page.coverage.partial, nextCursor: page.nextCursor };
3083
3254
  }, "inventoryPage");
3084
3255
 
3085
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/series-inventory.js
3256
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/series-inventory.js
3086
3257
  var cancelled3 = /* @__PURE__ */ __name((signal) => {
3087
3258
  if (signal?.aborted)
3088
3259
  throw new CliError("cancelled", "meeting inventory reading was cancelled");
@@ -3138,7 +3309,7 @@ var createMeetingSeriesInventoryReader = /* @__PURE__ */ __name((scope3, port) =
3138
3309
  };
3139
3310
  }, "createMeetingSeriesInventoryReader");
3140
3311
 
3141
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/stats.js
3312
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/stats.js
3142
3313
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
3143
3314
  const zone = timeZone ?? "UTC";
3144
3315
  try {
@@ -3217,7 +3388,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
3217
3388
  };
3218
3389
  }, "aggregateMeetingStats");
3219
3390
 
3220
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/transcription.js
3391
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/transcription.js
3221
3392
  var bounded = /* @__PURE__ */ __name((value, max, name) => {
3222
3393
  if (!Number.isSafeInteger(value) || value < 1 || value > max)
3223
3394
  throw new CliError("validation_error", `${name} must be an integer from 1 to ${max}`);
@@ -3261,6 +3432,9 @@ var transcribeMeeting = /* @__PURE__ */ __name(async (source, store, target, opt
3261
3432
  const timing = recognition2.timing ?? "recognition-segments";
3262
3433
  if (timing !== "fixed-windows" && timing !== "recognition-segments")
3263
3434
  throw new CliError("invalid_response", "unsupported recognition timing");
3435
+ const modelLanguage = recognition2.language;
3436
+ if (modelLanguage !== void 0 && (typeof modelLanguage !== "string" || !/^[a-z]{2,3}$/.test(modelLanguage)))
3437
+ throw new CliError("invalid_response", "recognition language must be a two- or three-letter code");
3264
3438
  const media = Object.freeze({
3265
3439
  id: identifier2(raw.id),
3266
3440
  contentHash: raw.contentHash,
@@ -3338,7 +3512,7 @@ var transcribeMeeting = /* @__PURE__ */ __name(async (source, store, target, opt
3338
3512
  source: `local/${encodeURIComponent(media.recognition.engine)}/${encodeURIComponent(media.recognition.model)}`,
3339
3513
  format: "local-transcription"
3340
3514
  },
3341
- language: null,
3515
+ language: modelLanguage ?? transcriptLanguage(rows.map((row) => row.text)),
3342
3516
  contentHash: hash,
3343
3517
  externalCreatedAt: null,
3344
3518
  metadata: provenance,
@@ -3368,7 +3542,7 @@ var transcribeMeeting = /* @__PURE__ */ __name(async (source, store, target, opt
3368
3542
  };
3369
3543
  }, "transcribeMeeting");
3370
3544
 
3371
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/upcoming.js
3545
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/upcoming.js
3372
3546
  var cancelled5 = /* @__PURE__ */ __name((signal) => {
3373
3547
  if (!signal?.aborted)
3374
3548
  return;
@@ -3438,7 +3612,7 @@ var createUpcomingMeetingReader = /* @__PURE__ */ __name((scope3, port) => {
3438
3612
  };
3439
3613
  }, "createUpcomingMeetingReader");
3440
3614
 
3441
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/watch.js
3615
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/watch.js
3442
3616
  var sleep = /* @__PURE__ */ __name((milliseconds, signal) => new Promise((resolve) => {
3443
3617
  const finish = /* @__PURE__ */ __name(() => {
3444
3618
  clearTimeout(timer);
@@ -3521,13 +3695,11 @@ export {
3521
3695
  meetingSummaryAnswer,
3522
3696
  serializeVtt,
3523
3697
  exportMeeting,
3524
- snapshotMeetingScope,
3525
- validateMeetingChange,
3526
- dispatchMeetingMutation,
3527
- createMeetingManagement,
3528
- MEETING_FACT_TYPES,
3529
- validateMeetingContextChange,
3530
- createMeetingContext,
3698
+ FACT_TYPES,
3699
+ PAYMENT_DIRECTIONS,
3700
+ PAYMENT_STATES,
3701
+ validatePayment,
3702
+ paymentTitle,
3531
3703
  findingHash,
3532
3704
  validateFindings,
3533
3705
  findingFingerprint,
@@ -3538,12 +3710,19 @@ export {
3538
3710
  liftMeetingFields,
3539
3711
  parseMeetingQuery,
3540
3712
  meetingWordsQuery,
3713
+ transcriptLanguage,
3541
3714
  TranscriptTextError,
3542
3715
  parseTranscriptText,
3543
3716
  VttError,
3544
3717
  parseVtt,
3545
3718
  importFiles,
3546
3719
  CHAT_MESSAGES_READ,
3720
+ snapshotMeetingScope,
3721
+ validateMeetingChange,
3722
+ dispatchMeetingMutation,
3723
+ createMeetingManagement,
3724
+ validateMeetingContextChange,
3725
+ createMeetingContext,
3547
3726
  meetingHitContextLimits,
3548
3727
  validateMeetingPassage,
3549
3728
  validateMeetingPreparationContext,