@wirecat/drive-cli 0.61.0 → 0.62.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 (148) hide show
  1. package/dist/bin/drive.js +2 -2
  2. package/dist/browse.d.ts +20 -0
  3. package/dist/browse.d.ts.map +1 -0
  4. package/dist/browse.js +146 -0
  5. package/dist/browse.js.map +1 -0
  6. package/dist/bundle/{all-profiles-H4L3Z5UM.js → all-profiles-CKD2DWUK.js} +14 -14
  7. package/dist/bundle/{anthropic-PPGFISVP.js → anthropic-E3T4USLA.js} +9 -9
  8. package/dist/bundle/{app-server-YXVK2FUZ.js → app-server-JB2AEWWL.js} +58 -55
  9. package/dist/bundle/{bun-DKZAL6ML.js → bun-CC44AAND.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-MTZY36QK.js → bun-sqlite-AUMFKYVR.js} +8 -8
  11. package/dist/bundle/{chunk-KV4267S4.js → chunk-27YUUGXQ.js} +1 -1
  12. package/dist/bundle/{chunk-6IBM4Z3V.js → chunk-2HF2MRXI.js} +1 -1
  13. package/dist/bundle/{chunk-3I2D5TK2.js → chunk-2KN35F32.js} +10 -10
  14. package/dist/bundle/{chunk-WZ5XK74U.js → chunk-4OSSOWDM.js} +1 -1
  15. package/dist/bundle/{chunk-UO2IUDVK.js → chunk-4SIZEJ3M.js} +2 -2
  16. package/dist/bundle/{chunk-6Y2FWJZ4.js → chunk-67ZQCWBV.js} +3 -3
  17. package/dist/bundle/{chunk-OFFA54TW.js → chunk-6EY46GAN.js} +2 -2
  18. package/dist/bundle/{chunk-ECEYAQGN.js → chunk-7W5HYGVW.js} +4 -2
  19. package/dist/bundle/{chunk-67HS46KM.js → chunk-7ZXIWZQ6.js} +12 -12
  20. package/dist/bundle/{chunk-J5UDQD5S.js → chunk-AH5C3D3D.js} +5 -5
  21. package/dist/bundle/{chunk-BCWUDTYQ.js → chunk-AQVUEZEP.js} +2 -2
  22. package/dist/bundle/{chunk-K7LS3NGM.js → chunk-CJHY5YIF.js} +494 -227
  23. package/dist/bundle/{chunk-PY7LKNOS.js → chunk-CZ2GJHLL.js} +2 -2
  24. package/dist/bundle/{chunk-NIX2MWHZ.js → chunk-DJOAMGF4.js} +39 -25
  25. package/dist/bundle/{chunk-AWN22PJK.js → chunk-DRZZBN3V.js} +3 -3
  26. package/dist/bundle/{chunk-DEPMQHXQ.js → chunk-DWJHL6DV.js} +4 -4
  27. package/dist/bundle/{chunk-QSGT4ZH4.js → chunk-E43ENLJJ.js} +1 -1
  28. package/dist/bundle/{chunk-NZ2EIZLX.js → chunk-EOOGWUTP.js} +10 -10
  29. package/dist/bundle/{chunk-5W56YMQS.js → chunk-EW7PKB4M.js} +58 -49
  30. package/dist/bundle/{chunk-VYXVPYA3.js → chunk-FEZF3TII.js} +6 -6
  31. package/dist/bundle/{chunk-I26VL4W7.js → chunk-FNWIJ6EJ.js} +2 -2
  32. package/dist/bundle/{chunk-OLPJRD4S.js → chunk-FUITWY7O.js} +1 -1
  33. package/dist/bundle/{chunk-XZBR2O63.js → chunk-HCNQT3QE.js} +1439 -770
  34. package/dist/bundle/{chunk-Q4XVBKX4.js → chunk-HG6CAYJH.js} +3 -3
  35. package/dist/bundle/{chunk-O5CUFS7T.js → chunk-IR4SQLBR.js} +2 -2
  36. package/dist/bundle/{chunk-VPDAH7PJ.js → chunk-JK3U25QZ.js} +1 -1
  37. package/dist/bundle/{chunk-UKOYQC5O.js → chunk-JN5TVEEL.js} +94 -26
  38. package/dist/bundle/{chunk-5W7D5H2R.js → chunk-KLFSRKHB.js} +1 -1
  39. package/dist/bundle/{chunk-RFRCOAWS.js → chunk-L7K2MOIC.js} +22 -22
  40. package/dist/bundle/{chunk-XYCCGGKN.js → chunk-LQKD257P.js} +582 -424
  41. package/dist/bundle/{chunk-73WSULMI.js → chunk-LWE4JGRN.js} +2 -2
  42. package/dist/bundle/{chunk-XGMDWIUP.js → chunk-MN4VXU3M.js} +4 -4
  43. package/dist/bundle/{chunk-N2RLJTIW.js → chunk-N7OZPKU7.js} +4 -4
  44. package/dist/bundle/{chunk-OGNOQDWB.js → chunk-O2XOX4HB.js} +34 -10
  45. package/dist/bundle/{chunk-3SJQNS72.js → chunk-O7ALBI2I.js} +5 -5
  46. package/dist/bundle/{chunk-3WZH3WV3.js → chunk-OBH5BA62.js} +3 -3
  47. package/dist/bundle/{chunk-DCBFNBEB.js → chunk-OD4U7GUY.js} +20 -20
  48. package/dist/bundle/{chunk-PJTX2MOI.js → chunk-ONP2IBHY.js} +26 -26
  49. package/dist/bundle/{chunk-BXR7BKM3.js → chunk-OTROVC4E.js} +1 -1
  50. package/dist/bundle/{chunk-JVBLXSAA.js → chunk-PEQA6LA5.js} +617 -243
  51. package/dist/bundle/{chunk-XLFJLZJL.js → chunk-Q2LRPOKL.js} +22 -14
  52. package/dist/bundle/{chunk-E5EXJ2XS.js → chunk-QCKZ3GAA.js} +4 -4
  53. package/dist/bundle/{chunk-BQMIDYBA.js → chunk-QCX6XZLA.js} +12 -12
  54. package/dist/bundle/{chunk-TKGAYKXW.js → chunk-QH7DOVO3.js} +204 -58
  55. package/dist/bundle/{chunk-YMBFZA3H.js → chunk-QTI6IVHZ.js} +8 -8
  56. package/dist/bundle/{chunk-YWIU4HOT.js → chunk-R347FPYU.js} +1 -1
  57. package/dist/bundle/chunk-RIDQNVZM.js +64 -0
  58. package/dist/bundle/{chunk-AM4RIWOZ.js → chunk-RPMKG63Z.js} +18 -4
  59. package/dist/bundle/{chunk-EPCJUL6M.js → chunk-RWSXVCSG.js} +3 -3
  60. package/dist/bundle/{chunk-36CWGEVX.js → chunk-SVPCHFKI.js} +2 -2
  61. package/dist/bundle/{chunk-ZHYRHERD.js → chunk-SW4I5BR7.js} +2 -2
  62. package/dist/bundle/{chunk-FE5JJXKA.js → chunk-T5NWWXS2.js} +2 -2
  63. package/dist/bundle/{chunk-E6J5YH2N.js → chunk-T7X53FCJ.js} +34 -34
  64. package/dist/bundle/{chunk-X2CXW4HM.js → chunk-TDX4GZFO.js} +7 -7
  65. package/dist/bundle/{chunk-3UPIJ7DW.js → chunk-U2BFYSQV.js} +14158 -2039
  66. package/dist/bundle/{chunk-HFM653T3.js → chunk-UGXN5D7U.js} +719 -128
  67. package/dist/bundle/{chunk-WUP2MJDN.js → chunk-UOXOLGNG.js} +2 -2
  68. package/dist/bundle/{chunk-J4HQVHMN.js → chunk-UQLWMGSD.js} +5 -5
  69. package/dist/bundle/{chunk-6DN4VPA7.js → chunk-VAYB52HF.js} +33 -31
  70. package/dist/bundle/{chunk-BF6TQMNB.js → chunk-VQDD64A4.js} +8 -8
  71. package/dist/bundle/{chunk-ZMNYK3FC.js → chunk-W4RTIL7S.js} +5 -5
  72. package/dist/bundle/{chunk-HGOYQUT7.js → chunk-WZKEU7WR.js} +4 -2
  73. package/dist/bundle/{chunk-QR5VQXQ5.js → chunk-XEW2EN6F.js} +51 -37
  74. package/dist/bundle/{chunk-DXPOVLQC.js → chunk-XFRRKZHQ.js} +223 -89
  75. package/dist/bundle/{chunk-XGNC5OJG.js → chunk-XS5POQST.js} +1 -1
  76. package/dist/bundle/{chunk-LARQTWIL.js → chunk-XZUS7XRO.js} +1 -1
  77. package/dist/bundle/{chunk-6SUGANRJ.js → chunk-YALI4C7C.js} +6 -6
  78. package/dist/bundle/{chunk-WIU733D2.js → chunk-YMWENGKH.js} +1 -1
  79. package/dist/bundle/{chunk-CACYL36O.js → chunk-YOJDGAPT.js} +8 -8
  80. package/dist/bundle/{chunk-S4YK6TTG.js → chunk-YPFUYQDP.js} +13 -13
  81. package/dist/bundle/{chunk-3252WXOL.js → chunk-YUWPNG7B.js} +1 -1
  82. package/dist/bundle/{chunk-2RJA4BQB.js → chunk-YXYTY4GF.js} +39 -26
  83. package/dist/bundle/{chunk-YPF6OS37.js → chunk-ZMOUUOT2.js} +1 -1
  84. package/dist/bundle/command-contract-OB5BRABN.js +39 -0
  85. package/dist/bundle/{decode-62A3HGPW.js → decode-WIIX3Y2X.js} +8 -8
  86. package/dist/bundle/{dispatch-IE7PBEQC.js → dispatch-GEFIXA6X.js} +9 -9
  87. package/dist/bundle/drive.js +11 -11
  88. package/dist/bundle/{echarts-BGBPRGR5.js → echarts-OYINM4C4.js} +2 -2
  89. package/dist/bundle/{embed-J3IBVV2V.js → embed-DWZIYMBX.js} +9 -9
  90. package/dist/bundle/{embedder-QFPMDRT2.js → embedder-ILWH7ZRM.js} +12 -12
  91. package/dist/bundle/entry-V5V3TOTY.js +22 -0
  92. package/dist/bundle/{failure-BKOGBMIC.js → failure-GV77W3CD.js} +4 -4
  93. package/dist/bundle/first-run-V3VVLQF4.js +30 -0
  94. package/dist/bundle/first-screen-Y3RIN7FU.js +37 -0
  95. package/dist/bundle/{google-RXM2XEPD.js → google-KLZSUAVY.js} +13 -13
  96. package/dist/bundle/{google-api-NC65BZO4.js → google-api-HZQ5R4ZO.js} +57 -57
  97. package/dist/bundle/grants-L7XLHLUT.js +105 -0
  98. package/dist/bundle/{identity-PI6F2GWA.js → identity-J2DON4IO.js} +6 -6
  99. package/dist/bundle/{instructions-6LPDSKAD.js → instructions-HGOJ23AJ.js} +1 -1
  100. package/dist/bundle/{login-HTY7GT2S.js → login-BD2TS4GY.js} +63 -63
  101. package/dist/bundle/{mcp-PPVOM4SE.js → mcp-GWDA3HOA.js} +2 -2
  102. package/dist/bundle/{node-IB246NCQ.js → node-CPKTDPH7.js} +2 -2
  103. package/dist/bundle/{node-sqlite-G2Y5SFJM.js → node-sqlite-IXDCRLSX.js} +9 -9
  104. package/dist/bundle/oauth-HOGY4YBB.js +22 -0
  105. package/dist/bundle/{open-WD4GFSJD.js → open-O7P3ZV3Y.js} +8 -8
  106. package/dist/bundle/{openai-QVM4PMY7.js → openai-RCFQKCXC.js} +17 -17
  107. package/dist/bundle/{process-SWPJGPQC.js → process-KXDRJO22.js} +1 -1
  108. package/dist/bundle/{program-WHYFAMXR.js → program-UCHFC7JQ.js} +228 -85
  109. package/dist/bundle/prompt-EVPPBN5W.js +17 -0
  110. package/dist/bundle/{reasons-Q34DQWB6.js → reasons-57J2D77K.js} +5 -5
  111. package/dist/bundle/{recognize-DM3YWHSE.js → recognize-MRCYGP2J.js} +7 -7
  112. package/dist/bundle/{remote-KXVWRK7J.js → remote-L3L4PHKF.js} +10 -10
  113. package/dist/bundle/{rerank-TINXM3MY.js → rerank-PSOE6XFT.js} +10 -10
  114. package/dist/bundle/{serve-IY2WL656.js → serve-72OGS3BF.js} +12 -12
  115. package/dist/bundle/server-C5TGNFXW.js +70 -0
  116. package/dist/bundle/{server-VPY3OWPC.js → server-SCXKYHBO.js} +44 -44
  117. package/dist/bundle/{services-PXNBOCOC.js → services-YAFTELBI.js} +42 -32
  118. package/dist/bundle/{sqlite-runtime-5ZK2CV7Y.js → sqlite-runtime-DLK4SU33.js} +9 -9
  119. package/dist/bundle/{start-LDVCN3DK.js → start-AFFA3LKM.js} +9 -7
  120. package/dist/bundle/{state-3MKTT3VS.js → state-T5VNAJSZ.js} +9 -9
  121. package/dist/bundle/{store-7M4MSUJV.js → store-4OFK7PKQ.js} +48 -28
  122. package/dist/bundle/{store-4VQOT5IJ.js → store-R6MSY2IM.js} +20 -18
  123. package/dist/bundle/store-maintenance-command-QDMCXGV6.js +60 -0
  124. package/dist/bundle/tokens-HIG36RNS.js +103 -0
  125. package/dist/commands/folders.d.ts +2 -1
  126. package/dist/commands/folders.d.ts.map +1 -1
  127. package/dist/commands/folders.js +16 -3
  128. package/dist/commands/folders.js.map +1 -1
  129. package/dist/program.js +1 -1
  130. package/dist/program.js.map +1 -1
  131. package/dist/tokens.d.ts.map +1 -1
  132. package/dist/tokens.js +15 -6
  133. package/dist/tokens.js.map +1 -1
  134. package/dist/version.d.ts +1 -1
  135. package/dist/version.js +1 -1
  136. package/package.json +3 -3
  137. package/dist/bundle/chunk-W767AUNR.js +0 -132
  138. package/dist/bundle/command-contract-T3EO5AYD.js +0 -39
  139. package/dist/bundle/entry-YQSYER66.js +0 -22
  140. package/dist/bundle/first-run-ZIFPVZAI.js +0 -30
  141. package/dist/bundle/first-screen-L5U26EY7.js +0 -37
  142. package/dist/bundle/grants-SEWUYYH3.js +0 -105
  143. package/dist/bundle/oauth-MWBKBI4T.js +0 -22
  144. package/dist/bundle/prompt-OVYCGZB7.js +0 -17
  145. package/dist/bundle/server-EMWVVT2C.js +0 -70
  146. package/dist/bundle/store-maintenance-command-NRATYBWD.js +0 -60
  147. package/dist/bundle/tokens-XUKLM3SL.js +0 -103
  148. /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-ZQ3GWKDQ.js} +0 -0
@@ -8,11 +8,11 @@ import {
8
8
  queryFieldsOf,
9
9
  timezoneOf,
10
10
  validateQuery
11
- } from "./chunk-NZ2EIZLX.js";
11
+ } from "./chunk-EOOGWUTP.js";
12
12
  import {
13
13
  singleLine,
14
14
  visibleControls
15
- } from "./chunk-6IBM4Z3V.js";
15
+ } from "./chunk-2HF2MRXI.js";
16
16
  import {
17
17
  STEPS,
18
18
  array,
@@ -20,6 +20,7 @@ import {
20
20
  defineSteps,
21
21
  integer,
22
22
  isoTime,
23
+ isoTimestamp,
23
24
  literal,
24
25
  maxValue,
25
26
  minLength,
@@ -30,21 +31,23 @@ import {
30
31
  pageSchema,
31
32
  picklist,
32
33
  pipe,
34
+ record,
33
35
  reference,
34
36
  safeParse,
35
37
  stepOf,
36
38
  strictObject,
37
39
  string,
38
- union
39
- } from "./chunk-VYXVPYA3.js";
40
+ union,
41
+ unknown
42
+ } from "./chunk-FEZF3TII.js";
40
43
  import {
41
44
  CliError
42
- } from "./chunk-WZ5XK74U.js";
45
+ } from "./chunk-4OSSOWDM.js";
43
46
  import {
44
47
  __name
45
48
  } from "./chunk-ZVVMGPBJ.js";
46
49
 
47
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/payment.js
50
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/payment.js
48
51
  var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
49
52
  var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
50
53
  var PAYMENT_STATES = ["expected", "paid", "cancelled"];
@@ -96,9 +99,9 @@ var validatePayment = /* @__PURE__ */ __name((input) => {
96
99
  if (!input || typeof input !== "object" || Array.isArray(input))
97
100
  return invalid("a payment is an object");
98
101
  const raw = input;
99
- const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
100
- if (unknown.length)
101
- return invalid(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
102
+ const unknown2 = Object.keys(raw).filter((key) => !FIELDS.includes(key));
103
+ if (unknown2.length)
104
+ return invalid(`a payment has no field ${unknown2.join(", ")}; its fields are ${FIELDS.join(", ")}`);
102
105
  const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
103
106
  if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
104
107
  return invalid("a payment's currency is an ISO 4217 code, such as EUR or RUB");
@@ -138,7 +141,7 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
138
141
  return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
139
142
  }, "paymentTitle");
140
143
 
141
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/passage.js
144
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/passage.js
142
145
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
143
146
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
144
147
  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)))
@@ -151,7 +154,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
151
154
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
152
155
  }, "validateMeetingPassage");
153
156
 
154
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/reference.js
157
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/reference.js
155
158
  var invalid2 = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
156
159
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
157
160
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -188,7 +191,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
188
191
  }, "parseMeetingReference");
189
192
  var canonicalMeetingReference = /* @__PURE__ */ __name((text7) => formatMeetingReference(parseMeetingReference(text7)), "canonicalMeetingReference");
190
193
 
191
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/item.js
194
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/item.js
192
195
  var text = string();
193
196
  var count = pipe(number(), integer(), minValue(0));
194
197
  var MEETING_ISSUES = ["time_without_zone"];
@@ -253,7 +256,7 @@ var MEETING_QUERY = {
253
256
  })
254
257
  };
255
258
 
256
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/answers.js
259
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/answers.js
257
260
  var text2 = string();
258
261
  var count2 = pipe(number(), integer(), minValue(0));
259
262
  var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
@@ -488,7 +491,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
488
491
  };
489
492
  }, "meetingHitsList");
490
493
 
491
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
494
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
492
495
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
493
496
  const parsed = urlOf(url);
494
497
  if (!parsed)
@@ -522,7 +525,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
522
525
  }
523
526
  }, "urlOf");
524
527
 
525
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
528
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
526
529
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
527
530
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
528
531
  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");
@@ -555,7 +558,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
555
558
  return kept;
556
559
  }, "entryMetadata");
557
560
 
558
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
561
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
559
562
  import { createHash } from "node:crypto";
560
563
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
561
564
  reference: cue2.reference,
@@ -569,7 +572,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
569
572
  text: cue2.text
570
573
  })).digest("hex"), "meetingCueFingerprint");
571
574
 
572
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
575
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
573
576
  var EVENT_QUERY = defineQuery({
574
577
  entity: "event",
575
578
  backend: "sql",
@@ -585,7 +588,7 @@ var EVENT_QUERY = defineQuery({
585
588
  ]
586
589
  });
587
590
 
588
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
591
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
589
592
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
590
593
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
591
594
  if (entry.recurrenceEndsAt !== null)
@@ -608,7 +611,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
608
611
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
609
612
  }, "entryInWindow");
610
613
 
611
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/events.js
614
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/events.js
612
615
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
613
616
  const current = await store.meeting(details.meeting.id);
614
617
  if (!current)
@@ -623,7 +626,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
623
626
  endsAt: meeting2.endedAt ?? meeting2.startedAt
624
627
  });
625
628
  if (candidates.length > 1) {
626
- await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id4 }) => id4), now);
629
+ await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id5 }) => id5), now);
627
630
  return null;
628
631
  }
629
632
  let event2 = candidates[0];
@@ -651,7 +654,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
651
654
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
652
655
  }, "linkEvent");
653
656
 
654
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
657
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
655
658
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text7) => text7.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
656
659
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
657
660
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -675,7 +678,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
675
678
  };
676
679
  }, "validateMeetingParticipantSearch");
677
680
 
678
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/reads.js
681
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/reads.js
679
682
  var MeetingError = class extends CliError {
680
683
  static {
681
684
  __name(this, "MeetingError");
@@ -702,8 +705,8 @@ var validateFilter = /* @__PURE__ */ __name((filter) => {
702
705
  if (value !== void 0 && (!Number.isSafeInteger(value) || value < 0))
703
706
  throw new MeetingError("validation_error", "expected a nonnegative integer");
704
707
  }, "validateFilter");
705
- var meetingShow = /* @__PURE__ */ __name(async (store, id4, accountId) => {
706
- const details = await store.meeting(positiveInteger(id4));
708
+ var meetingShow = /* @__PURE__ */ __name(async (store, id5, accountId) => {
709
+ const details = await store.meeting(positiveInteger(id5));
707
710
  if (!details || accountId !== void 0 && details.meeting.accountId !== accountId)
708
711
  throw new MeetingError("not_found", "meeting not found");
709
712
  return details;
@@ -794,20 +797,20 @@ var ownerOf = /* @__PURE__ */ __name(async (store, accountId) => {
794
797
  throw new MeetingError("not_found", `meeting account ${accountId} is not in the store`);
795
798
  return owner;
796
799
  }, "ownerOf");
797
- var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store, id4, accountId) => {
798
- const details = await meetingShow(store, id4, accountId);
800
+ var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store, id5, accountId) => {
801
+ const details = await meetingShow(store, id5, accountId);
799
802
  return { item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId)) };
800
803
  }, "meetingDetailsAnswer");
801
- var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id4, accountId, options = {}) => {
802
- const details = await meetingShow(store, id4, accountId);
804
+ var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id5, accountId, options = {}) => {
805
+ const details = await meetingShow(store, id5, accountId);
803
806
  return wholeList(details.transcripts.filter((t) => (options.history || t.transcript.supersededAt === null) && t.transcript.deletedAt === null).map((t) => meetingTranscriptItem(details.meeting.accountId, t.transcript, t.rows)));
804
807
  }, "meetingTranscriptAnswer");
805
- var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId) => {
806
- const details = await meetingShow(store, id4, accountId);
808
+ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id5, accountId) => {
809
+ const details = await meetingShow(store, id5, accountId);
807
810
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
808
811
  }, "meetingSummaryAnswer");
809
812
 
810
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/export.js
813
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/export.js
811
814
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
812
815
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
813
816
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -850,10 +853,10 @@ var transcriptsOf = /* @__PURE__ */ __name((details, transcriptId) => {
850
853
  }
851
854
  return details.transcripts.filter((part) => part.transcript.supersededAt === null && part.transcript.deletedAt === null);
852
855
  }, "transcriptsOf");
853
- var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
856
+ var exportMeeting = /* @__PURE__ */ __name(async (store, id5, options) => {
854
857
  if (options.format !== "markdown" && options.format !== "vtt")
855
858
  throw new MeetingError("validation_error", "export format must be markdown or vtt");
856
- const details = await meetingShow(store, id4, options.accountId);
859
+ const details = await meetingShow(store, id5, options.accountId);
857
860
  const transcripts = transcriptsOf(details, options.transcriptId);
858
861
  let content;
859
862
  if (options.format === "vtt") {
@@ -903,13 +906,13 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
903
906
  };
904
907
  }, "exportMeeting");
905
908
 
906
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
909
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
907
910
  import { createHash as createHash2 } from "node:crypto";
908
911
 
909
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
912
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
910
913
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
911
914
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
912
- throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone`);
915
+ throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
913
916
  const date = value.slice(0, 10);
914
917
  const instant = Date.parse(`${date}T00:00:00Z`);
915
918
  if (!Number.isFinite(instant) || new Date(instant).toISOString().slice(0, 10) !== date)
@@ -917,21 +920,44 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
917
920
  return new Date(value).toISOString();
918
921
  }, "meetingTimestamp");
919
922
 
920
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
923
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
921
924
  var TASK_TYPES = ["bug", "feature", "chore"];
922
925
  var invalid3 = /* @__PURE__ */ __name((message) => {
923
926
  throw new CliError("validation_error", message);
924
927
  }, "invalid");
925
- var text3 = /* @__PURE__ */ __name((value, limit) => {
928
+ var findingText = /* @__PURE__ */ __name((value, limit) => {
926
929
  if (typeof value !== "string" || !value.trim() || value.includes("\0") || value.length > limit)
927
930
  return invalid3(`finding text must contain 1\u2013${limit} characters without NUL`);
928
931
  return value.trim();
929
- }, "text");
932
+ }, "findingText");
930
933
  var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update(JSON.stringify(value)).digest("hex"), "findingHash");
931
- var fields = /* @__PURE__ */ __name((value, allowed, noun) => {
932
- if (Object.keys(value).some((key) => !allowed.includes(key)))
933
- invalid3(`unknown ${noun} field`);
934
- }, "fields");
934
+ var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
935
+ var findingWhere = /* @__PURE__ */ __name((of) => {
936
+ const id5 = typeof of.id === "string" ? of.id : null;
937
+ const kind = typeof of.kind === "string" ? of.kind : null;
938
+ return {
939
+ where: id5 || kind ? ` in ${[id5, kind && `(${kind})`].filter(Boolean).join(" ")}` : "",
940
+ named: { ...id5 ? { finding: id5 } : {}, ...kind ? { kind } : {} }
941
+ };
942
+ }, "findingWhere");
943
+ var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
944
+ const unknown2 = Object.keys(value).filter((key) => !allowed.includes(key));
945
+ if (!unknown2.length)
946
+ return;
947
+ const fields2 = unknown2.map(snakeCase);
948
+ const takes = allowed.map(snakeCase);
949
+ const { where, named } = findingWhere(of);
950
+ throw new CliError("validation_error", `unknown ${noun} field${fields2.length > 1 ? "s" : ""} ${fields2.join(", ")}${where}; it takes ${takes.join(", ")}`, { reason: "finding.unknown-field", fields: fields2, allowed: takes, ...named });
951
+ }, "findingFields");
952
+ var findingNeeds = /* @__PURE__ */ __name((value, needed, noun) => {
953
+ const missing = needed.filter((key) => value[key] === void 0);
954
+ if (!missing.length)
955
+ return;
956
+ const fields2 = missing.map(snakeCase);
957
+ const needs = needed.map(snakeCase);
958
+ const { where, named } = findingWhere(value);
959
+ throw new CliError("validation_error", `missing ${noun} field${fields2.length > 1 ? "s" : ""} ${fields2.join(", ")}${where}; it needs ${needs.join(", ")}`, { reason: "finding.missing-field", fields: fields2, needs, ...named });
960
+ }, "findingNeeds");
935
961
  var SUBJECT = /^(person|organization|project):[1-9]\d*$|^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/;
936
962
  var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
937
963
  if (!Array.isArray(raw) || raw.length < 1 || raw.length > 8)
@@ -939,7 +965,7 @@ var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
939
965
  const evidence = raw.map((item) => {
940
966
  if (!item || typeof item !== "object")
941
967
  return invalid3("finding evidence is a reference and fingerprint");
942
- fields(item, ["reference", "fingerprint"], rules.singular);
968
+ findingFields(item, ["reference", "fingerprint"], rules.singular);
943
969
  if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
944
970
  return invalid3("evidence requires a reference and fingerprint");
945
971
  const reference2 = rules.reference(item.reference);
@@ -952,40 +978,40 @@ var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
952
978
  return evidence;
953
979
  }, "validEvidence");
954
980
  var findingId = /* @__PURE__ */ __name((raw, ids2) => {
955
- const id4 = findingText(raw, 64);
956
- if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id4) || ids2.has(id4))
981
+ const id5 = findingText(raw, 64);
982
+ if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id5) || ids2.has(id5))
957
983
  return invalid3("finding IDs must be unique simple keys");
958
- ids2.add(id4);
959
- return id4;
984
+ ids2.add(id5);
985
+ return id5;
960
986
  }, "findingId");
961
987
  var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
962
988
  if (!finding || typeof finding !== "object")
963
989
  return invalid3("a finding is an object");
964
- const id4 = findingId(finding.id, ids2);
965
- const project = finding.project === void 0 && rules.anySubject ? void 0 : text3(finding.project, 64);
966
- if (project !== void 0 && !/^project:[1-9]\d*$/.test(project))
990
+ const id5 = findingId(finding.id, ids2);
991
+ const project2 = finding.project === void 0 && rules.anySubject ? void 0 : findingText(finding.project, 64);
992
+ if (project2 !== void 0 && !/^project:[1-9]\d*$/.test(project2))
967
993
  return invalid3("a finding names a project reference");
968
- if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(text3(finding.subject, 80))))
994
+ if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(findingText(finding.subject, 80))))
969
995
  return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
970
- if (finding.kind === "task" && project === void 0 && !rules.inboxTasks)
996
+ if (finding.kind === "task" && project2 === void 0 && !rules.inboxTasks)
971
997
  return invalid3("a task finding names the project the task goes in");
972
998
  const evidence = validEvidence(finding.evidence, rules);
973
999
  const base = {
974
- id: id4,
975
- ...project === void 0 ? {} : { project },
1000
+ id: id5,
1001
+ ...project2 === void 0 ? {} : { project: project2 },
976
1002
  ...finding.subject === void 0 ? {} : { subject: finding.subject },
977
1003
  evidence
978
1004
  };
979
1005
  if (finding.kind === "fact") {
980
- fields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
1006
+ findingFields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
981
1007
  if (finding.type === "payment")
982
1008
  return invalid3("a payment is a finding of kind payment; money is a payments row, not a fact");
983
1009
  if (!FACT_TYPES.includes(finding.type))
984
1010
  return invalid3("unknown fact finding type");
985
- return { ...base, kind: "fact", type: finding.type, statement: text3(finding.statement, 2e3) };
1011
+ return { ...base, kind: "fact", type: finding.type, statement: findingText(finding.statement, 2e3) };
986
1012
  }
987
1013
  if (finding.kind === "payment" && rules.payments) {
988
- fields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
1014
+ findingFields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
989
1015
  if (finding.supersedes !== void 0 && !/^invoice:[1-9]\d*$/.test(String(finding.supersedes)))
990
1016
  return invalid3("a payment finding supersedes an invoice: reference, the expected payment it settles or voids");
991
1017
  const payment = validatePayment(finding.payment);
@@ -998,14 +1024,14 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
998
1024
  return {
999
1025
  ...base,
1000
1026
  kind: "payment",
1001
- ...finding.statement === void 0 ? {} : { statement: text3(finding.statement, 2e3) },
1027
+ ...finding.statement === void 0 ? {} : { statement: findingText(finding.statement, 2e3) },
1002
1028
  payment,
1003
1029
  ...finding.supersedes === void 0 ? {} : { supersedes: finding.supersedes }
1004
1030
  };
1005
1031
  }
1006
1032
  if (finding.kind !== "task")
1007
1033
  return invalid3(`a finding is a fact${rules.payments ? ", payment" : ""} or task`);
1008
- fields(finding, [
1034
+ findingFields(finding, [
1009
1035
  "id",
1010
1036
  "project",
1011
1037
  "evidence",
@@ -1023,48 +1049,51 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
1023
1049
  return invalid3("a task finding type is bug, chore or feature");
1024
1050
  if (!["explicit", "inferred"].includes(finding.commitment))
1025
1051
  return invalid3("task commitment must be explicit or inferred");
1026
- if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0) || finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
1027
- return invalid3("optional dates and assignees require their supporting evidence");
1052
+ if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0))
1053
+ return invalid3(`due_at comes with due_evidence: the ${rules.cited} references of this finding's evidence that give the date, as a list of strings such as ["<reference>"]`);
1054
+ if (finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
1055
+ return invalid3(`assignee comes with assignee_evidence: the ${rules.cited} references of this finding's evidence that name them, as a list of strings such as ["<reference>"]`);
1028
1056
  if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
1029
1057
  return invalid3("an assignee must be a person reference");
1030
1058
  return {
1031
1059
  ...base,
1032
1060
  kind: "task",
1033
1061
  type: finding.type,
1034
- title: text3(finding.title, 300),
1035
- reason: text3(finding.reason, 2e3),
1062
+ title: findingText(finding.title, 300),
1063
+ reason: findingText(finding.reason, 2e3),
1036
1064
  commitment: finding.commitment,
1037
1065
  ...finding.dueAt === void 0 ? {} : {
1038
- dueAt: meetingTimestamp(finding.dueAt, "finding due date"),
1039
- dueEvidence: support(finding.dueEvidence, evidence)
1066
+ dueAt: meetingTimestamp(finding.dueAt, "a task's due_at"),
1067
+ dueEvidence: support(finding.dueEvidence, evidence, "due_evidence")
1040
1068
  },
1041
- ...finding.assignee === void 0 ? {} : { assignee: finding.assignee, assigneeEvidence: support(finding.assigneeEvidence, evidence) }
1069
+ ...finding.assignee === void 0 ? {} : {
1070
+ assignee: finding.assignee,
1071
+ assigneeEvidence: support(finding.assigneeEvidence, evidence, "assignee_evidence")
1072
+ }
1042
1073
  };
1043
1074
  }, "validateFinding");
1044
- var support = /* @__PURE__ */ __name((value, evidence) => {
1075
+ var support = /* @__PURE__ */ __name((value, evidence, field) => {
1045
1076
  if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
1046
- return invalid3("date and assignee support must cite the finding's evidence");
1077
+ return invalid3(`${field} lists 1\u20138 references this finding's evidence cites, as plain strings such as ["<reference>"], not evidence objects`);
1047
1078
  return [...new Set(value)].sort();
1048
1079
  }, "support");
1049
1080
  var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
1050
1081
  if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
1051
1082
  return invalid3(`${rules.plural} take at most 65536 UTF-8 bytes`);
1052
- fields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
1083
+ findingFields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
1053
1084
  if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > most)
1054
1085
  return invalid3(`schemaVersion 1 takes 1\u2013${most} ${rules.plural}`);
1055
- const key = text3(input.key, 64);
1086
+ const key = findingText(input.key, 64);
1056
1087
  if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
1057
1088
  return invalid3("a findings key uses letters, digits, dot, colon, underscore or hyphen");
1058
1089
  const ids2 = /* @__PURE__ */ new Set();
1059
1090
  const findings = input.findings.map((finding) => one(finding, ids2));
1060
- return { schemaVersion: 1, key, extractor: text3(input.extractor, 200), findings };
1091
+ return { schemaVersion: 1, key, extractor: findingText(input.extractor, 200), findings };
1061
1092
  }, "validateBatch");
1062
1093
  var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
1063
- var findingText = /* @__PURE__ */ __name((value, limit) => text3(value, limit), "findingText");
1064
- var findingFields = /* @__PURE__ */ __name((value, allowed, noun) => fields(value, allowed, noun), "findingFields");
1065
1094
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
1066
1095
 
1067
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1096
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1068
1097
  var MEETING_FINDINGS_KIND = "meeting_findings";
1069
1098
  var cue = /* @__PURE__ */ __name((raw) => {
1070
1099
  const reference2 = canonicalMeetingReference(raw);
@@ -1075,7 +1104,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
1075
1104
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
1076
1105
  var meetingFindingFingerprint = findingFingerprint;
1077
1106
 
1078
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1107
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1079
1108
  var context = {
1080
1109
  command: "search meetings",
1081
1110
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -1137,6 +1166,7 @@ var MEETING_FIELDS = defineQuery({
1137
1166
  ]
1138
1167
  });
1139
1168
  var LIFTED = /* @__PURE__ */ new Set(["date", "project", "tag", "topic"]);
1169
+ var MEETING_FIELD_NAMES = new Set(MEETING_FIELDS.fields.map(({ name }) => name));
1140
1170
  var liftMeetingFields = /* @__PURE__ */ __name((query, request, now) => {
1141
1171
  let ast;
1142
1172
  try {
@@ -1194,7 +1224,7 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text7) => {
1194
1224
  return { version: 1, language: "lucene-v1", root };
1195
1225
  }, "meetingWordsQuery");
1196
1226
 
1197
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/language.js
1227
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/language.js
1198
1228
  var LATIN_WORDS = {
1199
1229
  en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
1200
1230
  es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
@@ -1243,7 +1273,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
1243
1273
  return null;
1244
1274
  }, "transcriptLanguage");
1245
1275
 
1246
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
1276
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
1247
1277
  var contentHash = /* @__PURE__ */ __name(async (text7) => {
1248
1278
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text7));
1249
1279
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -1274,13 +1304,13 @@ var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source,
1274
1304
  }))
1275
1305
  }), "transcriptInput");
1276
1306
  var timestamp2 = /* @__PURE__ */ __name((value) => {
1277
- const time = Date.parse(value);
1278
- if (!Number.isFinite(time))
1307
+ const time2 = Date.parse(value);
1308
+ if (!Number.isFinite(time2))
1279
1309
  throw new Error("Invalid meeting timestamp");
1280
- return time;
1310
+ return time2;
1281
1311
  }, "timestamp");
1282
1312
 
1283
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
1313
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
1284
1314
  var TranscriptTextError = class extends Error {
1285
1315
  static {
1286
1316
  __name(this, "TranscriptTextError");
@@ -1335,7 +1365,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
1335
1365
  return { header, lines };
1336
1366
  }, "parseTranscriptText");
1337
1367
 
1338
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
1368
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
1339
1369
  var VttError = class extends Error {
1340
1370
  static {
1341
1371
  __name(this, "VttError");
@@ -1387,7 +1417,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
1387
1417
  return cues;
1388
1418
  }, "parseVtt");
1389
1419
 
1390
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/import.js
1420
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/import.js
1391
1421
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
1392
1422
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
1393
1423
  for (const file of files) {
@@ -1420,10 +1450,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
1420
1450
  return report;
1421
1451
  }, "importFiles");
1422
1452
 
1423
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/links.js
1453
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/links.js
1424
1454
  var CHAT_MESSAGES_READ = 1e5;
1425
1455
 
1426
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/provider.js
1456
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/provider.js
1427
1457
  var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
1428
1458
  const provider = scope2?.provider;
1429
1459
  const account = scope2?.account;
@@ -1432,7 +1462,7 @@ var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
1432
1462
  return Object.freeze({ provider, account });
1433
1463
  }, "snapshotMeetingScope");
1434
1464
 
1435
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
1465
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
1436
1466
  var nonempty = /* @__PURE__ */ __name((value, name) => {
1437
1467
  if (typeof value !== "string" || !value.trim())
1438
1468
  throw new CliError("validation_error", `${name} must be nonempty`);
@@ -1498,29 +1528,29 @@ var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) =
1498
1528
  return { applied: true, value: await dispatch(signal) };
1499
1529
  }, "dispatchMeetingMutation");
1500
1530
 
1501
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
1531
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
1502
1532
  var id = /* @__PURE__ */ __name((value) => {
1503
1533
  if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
1504
1534
  throw new CliError("validation_error", "meeting context identifiers must be positive integers");
1505
1535
  return value;
1506
1536
  }, "id");
1507
- var text4 = /* @__PURE__ */ __name((value, max) => {
1537
+ var text3 = /* @__PURE__ */ __name((value, max) => {
1508
1538
  if (typeof value !== "string" || !value.trim() || value.length > max || value.includes("\0"))
1509
1539
  throw new CliError("validation_error", `meeting context text must contain 1\u2013${max} characters without NUL`);
1510
1540
  return value.trim();
1511
1541
  }, "text");
1512
1542
  var uid = /* @__PURE__ */ __name((value) => {
1513
- const result = text4(value, 100);
1543
+ const result = text3(value, 100);
1514
1544
  if (!/^[1-9]\d*$/.test(result) || !Number.isSafeInteger(Number(result)))
1515
1545
  throw new CliError("validation_error", "person UID must be a positive integer");
1516
1546
  return result;
1517
1547
  }, "uid");
1518
- var strings = /* @__PURE__ */ __name((value, count6, length) => {
1519
- if (!Array.isArray(value) || value.length < 1 || value.length > count6)
1520
- throw new CliError("validation_error", `meeting context list must contain 1\u2013${count6} entries`);
1521
- return Object.freeze([...new Set(value.map((entry) => text4(entry, length)))]);
1548
+ var strings = /* @__PURE__ */ __name((value, count7, length) => {
1549
+ if (!Array.isArray(value) || value.length < 1 || value.length > count7)
1550
+ throw new CliError("validation_error", `meeting context list must contain 1\u2013${count7} entries`);
1551
+ return Object.freeze([...new Set(value.map((entry) => text3(entry, length)))]);
1522
1552
  }, "strings");
1523
- var fields2 = {
1553
+ var fields = {
1524
1554
  "note.add": ["text", "title"],
1525
1555
  "tags.add": ["tags"],
1526
1556
  "tags.remove": ["tags"],
@@ -1530,14 +1560,14 @@ var fields2 = {
1530
1560
  "person.link": ["participantId", "personUid", "targetAccountIds", "expectedPersonUid"]
1531
1561
  };
1532
1562
  var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
1533
- 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)))
1563
+ 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)))
1534
1564
  throw new CliError("validation_error", "unsupported meeting context change");
1535
1565
  switch (change.action) {
1536
1566
  case "note.add":
1537
1567
  return Object.freeze({
1538
1568
  action: change.action,
1539
- text: text4(change.text, 1e5),
1540
- ...change.title === void 0 ? {} : { title: text4(change.title, 500) }
1569
+ text: text3(change.text, 1e5),
1570
+ ...change.title === void 0 ? {} : { title: text3(change.title, 500) }
1541
1571
  });
1542
1572
  case "tags.add":
1543
1573
  case "tags.remove":
@@ -1547,11 +1577,11 @@ var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
1547
1577
  throw new CliError("validation_error", "memory kind and explicit personal/work scope are required");
1548
1578
  return Object.freeze({
1549
1579
  action: change.action,
1550
- body: text4(change.body, 2e4),
1580
+ body: text3(change.body, 2e4),
1551
1581
  kind: change.kind,
1552
1582
  scope: change.scope,
1553
1583
  evidence: strings(change.evidence, 100, 4e3),
1554
- ...change.subject === void 0 ? {} : { subject: text4(change.subject, 4e3) }
1584
+ ...change.subject === void 0 ? {} : { subject: text3(change.subject, 4e3) }
1555
1585
  });
1556
1586
  }
1557
1587
  case "fact.add": {
@@ -1559,11 +1589,11 @@ var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
1559
1589
  throw new CliError("validation_error", `fact type (${FACT_TYPES.join(", ")}) and explicit personal/work scope are required`);
1560
1590
  return Object.freeze({
1561
1591
  action: change.action,
1562
- statement: text4(change.statement, 2e4),
1592
+ statement: text3(change.statement, 2e4),
1563
1593
  type: change.type,
1564
1594
  scope: change.scope,
1565
1595
  evidence: strings(change.evidence, 100, 4e3),
1566
- ...change.subject === void 0 ? {} : { subject: text4(change.subject, 4e3) }
1596
+ ...change.subject === void 0 ? {} : { subject: text3(change.subject, 4e3) }
1567
1597
  });
1568
1598
  }
1569
1599
  case "event.link":
@@ -1590,7 +1620,7 @@ var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) =>
1590
1620
  const fixed = snapshotMeetingScope(scope2);
1591
1621
  const account = id(accountId);
1592
1622
  const actions = Object.freeze([...new Set(ports.actions)]);
1593
- if (actions.some((action) => !Object.hasOwn(fields2, action)))
1623
+ if (actions.some((action) => !Object.hasOwn(fields, action)))
1594
1624
  throw new CliError("validation_error", "unsupported meeting context capability");
1595
1625
  const apply = ports.apply.bind(ports);
1596
1626
  return {
@@ -1620,7 +1650,7 @@ var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) =>
1620
1650
  };
1621
1651
  }, "createMeetingContext");
1622
1652
 
1623
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
1653
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
1624
1654
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
1625
1655
  if (!original || typeof original !== "object" || Array.isArray(original))
1626
1656
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -1645,7 +1675,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
1645
1675
  return { ...input, limit, maxReadBytes };
1646
1676
  }, "validateMeetingPreparationContext");
1647
1677
 
1648
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
1678
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
1649
1679
  var count3 = pipe(number(), integer(), minValue(0));
1650
1680
  var id2 = pipe(string(), minLength(1));
1651
1681
  var meetingProjectEvidence = strictObject({
@@ -1766,7 +1796,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
1766
1796
  };
1767
1797
  }, "meetingProjectEvidenceAnswer");
1768
1798
 
1769
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
1799
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
1770
1800
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
1771
1801
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
1772
1802
  if (typeof query !== "string" || !query.trim() || query.includes("\0") || new TextEncoder().encode(query).byteLength > 65536 || !integer3(options.limit ?? 100, 1, 1e3) || !integer3(options.maxReadBytes ?? 4194304, 1, 67108864) || [
@@ -1786,7 +1816,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
1786
1816
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
1787
1817
  }, "validateMeetingHitSearch");
1788
1818
 
1789
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
1819
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
1790
1820
  var ids = {
1791
1821
  meeting_id: "meetingId",
1792
1822
  identity_id: "participantIdentityId",
@@ -1822,8 +1852,8 @@ var MEETING_PROJECT_EVIDENCE_QUERY = defineQuery({
1822
1852
  ]
1823
1853
  });
1824
1854
  var requestKeys = /* @__PURE__ */ new Set(["query", "limit", "cursor", "maxReadBytes", "signal"]);
1825
- var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {}, now = Date.now()) => {
1826
- if (!request || typeof request !== "object" || Array.isArray(request) || Object.keys(request).some((key) => !requestKeys.has(key)) || typeof project !== "string" || !project.trim() || project.length > 200 || /[\p{Cc}\p{Cf}]/u.test(project) || request.query !== void 0 && typeof request.query !== "string")
1855
+ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project2, request = {}, now = Date.now()) => {
1856
+ if (!request || typeof request !== "object" || Array.isArray(request) || Object.keys(request).some((key) => !requestKeys.has(key)) || typeof project2 !== "string" || !project2.trim() || project2.length > 200 || /[\p{Cc}\p{Cf}]/u.test(project2) || request.query !== void 0 && typeof request.query !== "string")
1827
1857
  throw new CliError("validation_error", "expected an existing project and bounded evidence arguments");
1828
1858
  if (request.query !== void 0 && new TextEncoder().encode(request.query).byteLength > 8192 || [request.limit, request.maxReadBytes].some((value) => value !== void 0 && typeof value !== "number"))
1829
1859
  throw new CliError("validation_error", "invalid project evidence query or budget");
@@ -1871,26 +1901,26 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
1871
1901
  options.until = range.upper - (range.upper_inclusive ? 0 : 1);
1872
1902
  frozen.push(`started_at:[${options.since === void 0 ? "*" : `"${new Date(options.since).toISOString()}"`} TO ${options.until === void 0 ? "*" : `"${new Date(options.until).toISOString()}"`}]`);
1873
1903
  }
1874
- validateMeetingHitSearch(project, options);
1904
+ validateMeetingHitSearch(project2, options);
1875
1905
  if (options.cursor !== void 0 && (typeof options.cursor !== "string" || !/^[A-Za-z0-9_-]{1,4096}$/.test(options.cursor)))
1876
1906
  throw new CliError("validation_error", "invalid project evidence cursor");
1877
- return { project: project.trim(), options, query: frozen.join(" AND ") };
1907
+ return { project: project2.trim(), options, query: frozen.join(" AND ") };
1878
1908
  }, "prepareMeetingProjectEvidence");
1879
1909
 
1880
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
1881
- var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
1882
- const prepared = prepareMeetingProjectEvidence(project, request, now);
1910
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
1911
+ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, request = {}, now = Date.now()) => {
1912
+ const prepared = prepareMeetingProjectEvidence(project2, request, now);
1883
1913
  const page = await read(prepared.project, prepared.options);
1884
1914
  prepared.options.signal?.throwIfAborted();
1885
1915
  return meetingProjectEvidenceAnswer(page, prepared);
1886
1916
  }, "readMeetingProjectEvidence");
1887
1917
 
1888
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/pull.js
1918
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/pull.js
1889
1919
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
1890
- const { identityExternalId, ...fields3 } = p;
1920
+ const { identityExternalId, ...fields2 } = p;
1891
1921
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
1892
1922
  return {
1893
- ...fields3,
1923
+ ...fields2,
1894
1924
  identity: {
1895
1925
  provider,
1896
1926
  externalId,
@@ -1900,32 +1930,55 @@ var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, posit
1900
1930
  }
1901
1931
  };
1902
1932
  }, "participantInput");
1933
+ var startOf = /* @__PURE__ */ __name((m) => {
1934
+ const at = Date.parse(m.occurrence.startedAt);
1935
+ return Number.isFinite(at) ? at : Number.POSITIVE_INFINITY;
1936
+ }, "startOf");
1903
1937
  var pull = /* @__PURE__ */ __name(async (source, store, options) => {
1904
1938
  const now = options.now ?? Date.now();
1905
- const lookbackMs = options.lookbackMs ?? 0;
1906
- if (!Number.isSafeInteger(lookbackMs) || lookbackMs < 0 || lookbackMs > 31 * 864e5)
1907
- throw new Error("lookbackMs must be an integer from 0 through 31 days");
1908
- const since = options.since ?? await store.cursor(options.accountId) ?? new Date(now - 30 * 864e5).toISOString();
1939
+ for (const [name, ms] of [
1940
+ ["lookbackMs", options.lookbackMs ?? 0],
1941
+ ["overlapMs", source.overlapMs ?? 0]
1942
+ ])
1943
+ if (!Number.isSafeInteger(ms) || ms < 0 || ms > 31 * 864e5)
1944
+ throw new Error(`${name} must be an integer from 0 through 31 days`);
1945
+ const lookbackMs = Math.max(options.lookbackMs ?? 0, source.overlapMs ?? 0);
1946
+ const cursor = options.rescan ? void 0 : await store.cursor(options.accountId);
1947
+ const since = options.since ?? cursor ?? new Date(now - 30 * 864e5).toISOString();
1909
1948
  timestamp2(since);
1910
1949
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
1911
1950
  let failed = false;
1951
+ let firstFailed;
1912
1952
  const from = timestamp2(since) - lookbackMs;
1913
- const meetings = await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString());
1914
- for (const m of meetings) {
1915
- const id4 = m.occurrence.id;
1953
+ const meetings = (await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString())).toSorted((a, b) => startOf(a) - startOf(b));
1954
+ for (const [index, m] of meetings.entries()) {
1955
+ const stop = options.budget?.take() ?? null;
1956
+ if (stop) {
1957
+ report.stopped = stop;
1958
+ report.remaining = meetings.length - index;
1959
+ const reached = Math.min(startOf(m), firstFailed ?? Number.POSITIVE_INFINITY);
1960
+ if (Number.isFinite(reached) && reached > timestamp2(since))
1961
+ await store.setCursor(options.accountId, new Date(reached).toISOString(), now);
1962
+ return report;
1963
+ }
1964
+ const id5 = m.occurrence.id;
1965
+ const failedHere = /* @__PURE__ */ __name(() => {
1966
+ failed = true;
1967
+ firstFailed ??= startOf(m);
1968
+ }, "failedHere");
1916
1969
  const read = /* @__PURE__ */ __name(async (part, call) => {
1917
1970
  try {
1918
1971
  return await call();
1919
1972
  } catch (error) {
1920
- failed = true;
1973
+ failedHere();
1921
1974
  const message = error instanceof Error ? error.message : "could not be read";
1922
- report.warnings.push({ externalId: id4, message: `${part}: ${message}` });
1975
+ report.warnings.push({ externalId: id5, message: `${part}: ${message}` });
1923
1976
  return void 0;
1924
1977
  }
1925
1978
  }, "read");
1926
1979
  try {
1927
- const sourceParticipants = await read("participants", () => source.participants(id4));
1928
- const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider, id4, i, options.accountId));
1980
+ const sourceParticipants = await read("participants", () => source.participants(id5));
1981
+ const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider, id5, i, options.accountId));
1929
1982
  const names = /* @__PURE__ */ new Map();
1930
1983
  for (const p of participants)
1931
1984
  if (p.displayName !== null) {
@@ -1934,18 +1987,18 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
1934
1987
  names.set(p.displayName, identities);
1935
1988
  }
1936
1989
  if ([...names.values()].some((ids2) => ids2.size > 1))
1937
- report.warnings.push({ externalId: id4, message: "Participant names are ambiguous" });
1938
- const lines = await read("transcript", () => source.transcript(id4));
1939
- const chat = await read("chat", () => source.chat(id4));
1940
- const summary = await read("summary", () => source.summary(id4));
1941
- const attachments = await read("files", () => source.files(id4));
1990
+ report.warnings.push({ externalId: id5, message: "Participant names are ambiguous" });
1991
+ const lines = await read("transcript", () => source.transcript(id5));
1992
+ const chat = await read("chat", () => source.chat(id5));
1993
+ const summary = await read("summary", () => source.summary(id5));
1994
+ const attachments = await read("files", () => source.files(id5));
1942
1995
  const startedAt = timestamp2(m.occurrence.startedAt);
1943
1996
  const endedAt = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
1944
1997
  if (endedAt !== null && endedAt < startedAt)
1945
1998
  throw new Error("Meeting ends before it starts");
1946
1999
  const meeting2 = {
1947
2000
  accountId: options.accountId,
1948
- externalId: id4,
2001
+ externalId: id5,
1949
2002
  title: m.occurrence.title,
1950
2003
  description: m.description ?? null,
1951
2004
  location: m.location ?? null,
@@ -2015,8 +2068,8 @@ unlinked`, format)],
2015
2068
  report.transcriptRows += lines?.length ?? 0;
2016
2069
  report.summaries += summary ? 1 : 0;
2017
2070
  } catch (error) {
2018
- failed = true;
2019
- report.warnings.push({ externalId: id4, message: error instanceof Error ? error.message : "Meeting pull failed" });
2071
+ failedHere();
2072
+ report.warnings.push({ externalId: id5, message: error instanceof Error ? error.message : "Meeting pull failed" });
2020
2073
  }
2021
2074
  }
2022
2075
  if (!failed)
@@ -2024,47 +2077,47 @@ unlinked`, format)],
2024
2077
  return report;
2025
2078
  }, "pull");
2026
2079
 
2027
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2028
- var text5 = string();
2080
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2081
+ var text4 = string();
2029
2082
  var count4 = pipe(number(), integer(), minValue(0));
2030
2083
  var id3 = pipe(number(), integer(), minValue(1));
2031
2084
  var iso3 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
2032
2085
  var meetingReview = strictObject({
2033
2086
  ref: reference,
2034
2087
  id: pipe(string(), minLength(1)),
2035
- title: nullable(text5),
2088
+ title: nullable(text4),
2036
2089
  started_at: nullable(isoTime),
2037
2090
  duration_ms: nullable(count4),
2038
2091
  participants_count: nullable(count4),
2039
- projects: array(text5),
2092
+ projects: array(text4),
2040
2093
  /** Null when the meeting has no current transcript. */
2041
2094
  transcript: nullable(strictObject({ lines: count4, words: count4 })),
2042
2095
  /** The three who talked longest. */
2043
- speakers: array(strictObject({ name: nullable(text5), talk_ms: count4 })),
2096
+ speakers: array(strictObject({ name: nullable(text4), talk_ms: count4 })),
2044
2097
  /** The newest stored summary; null when there is none. */
2045
2098
  summary: nullable(strictObject({
2046
- source: text5,
2047
- title: nullable(text5),
2048
- overview: nullable(text5),
2049
- next_steps: array(text5),
2050
- url: nullable(text5)
2099
+ source: text4,
2100
+ title: nullable(text4),
2101
+ overview: nullable(text4),
2102
+ next_steps: array(text4),
2103
+ url: nullable(text4)
2051
2104
  }))
2052
2105
  });
2053
2106
  var meetingLink = strictObject({
2054
- url: text5,
2055
- domain: nullable(text5),
2107
+ url: text4,
2108
+ domain: nullable(text4),
2056
2109
  /** The Google Docs, Sheets, Slides, Forms or Drive file it names. */
2057
- document_id: nullable(text5),
2110
+ document_id: nullable(text4),
2058
2111
  count: count4,
2059
2112
  first_at: isoTime,
2060
2113
  last_at: isoTime,
2061
- senders: array(text5),
2062
- meetings: array(strictObject({ ref: reference, title: nullable(text5) }))
2114
+ senders: array(text4),
2115
+ meetings: array(strictObject({ ref: reference, title: nullable(text4) }))
2063
2116
  });
2064
2117
  var meetingSpeaker = strictObject({
2065
2118
  /** `person:<id>`, `identity:<id>`, `name:<lowercased name>` or `unknown`. */
2066
- key: text5,
2067
- name: nullable(text5),
2119
+ key: text4,
2120
+ name: nullable(text4),
2068
2121
  person_id: nullable(id3),
2069
2122
  identity_id: nullable(id3),
2070
2123
  meetings: count4,
@@ -2075,18 +2128,18 @@ var meetingSpeaker = strictObject({
2075
2128
  share: pipe(number(), minValue(0), maxValue(1))
2076
2129
  });
2077
2130
  var meetingStats = strictObject({
2078
- time_zone: text5,
2131
+ time_zone: text4,
2079
2132
  meetings: count4,
2080
2133
  lines: count4,
2081
2134
  words: count4,
2082
2135
  talk_ms: count4,
2083
2136
  /** `week_start` is the Monday, as a date in `time_zone`. */
2084
- weeks: array(strictObject({ week_start: text5, meetings: count4, talk_ms: count4 })),
2137
+ weeks: array(strictObject({ week_start: text4, meetings: count4, talk_ms: count4 })),
2085
2138
  top_speakers: array(meetingSpeaker)
2086
2139
  });
2087
2140
  var meetingCountsRow = strictObject({
2088
- key: text5,
2089
- name: nullable(text5),
2141
+ key: text4,
2142
+ name: nullable(text4),
2090
2143
  meetings: count4,
2091
2144
  minutes: count4,
2092
2145
  mean_minutes: nullable(number()),
@@ -2106,13 +2159,13 @@ var meetingParticipants = strictObject({
2106
2159
  schema_version: literal(1),
2107
2160
  kind: literal("meeting_participants"),
2108
2161
  account_id: id3,
2109
- query: text5,
2162
+ query: text4,
2110
2163
  items: array(strictObject({
2111
2164
  participant_id: id3,
2112
2165
  meeting_id: id3,
2113
2166
  identity_id: id3,
2114
- display_name: nullable(text5),
2115
- email: nullable(text5)
2167
+ display_name: nullable(text4),
2168
+ email: nullable(text4)
2116
2169
  })),
2117
2170
  /** Several identities on one page are observations, never speaker attribution or person links. */
2118
2171
  ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(id3) }),
@@ -2126,7 +2179,7 @@ var meetingParticipants = strictObject({
2126
2179
  mode: literal("cursor"),
2127
2180
  limit: count4,
2128
2181
  has_more: boolean(),
2129
- next_cursor: optional(text5)
2182
+ next_cursor: optional(text4)
2130
2183
  })
2131
2184
  });
2132
2185
  var revision = picklist(["current", "superseded"]);
@@ -2135,8 +2188,8 @@ var meetingPassage = strictObject({
2135
2188
  kind: literal("meeting_context"),
2136
2189
  source: reference,
2137
2190
  target_ref: reference,
2138
- target_fingerprint: text5,
2139
- fingerprint: text5,
2191
+ target_fingerprint: text4,
2192
+ fingerprint: text4,
2140
2193
  revision,
2141
2194
  limits: strictObject({ before: count4, after: count4, bytes: count4, max_read_bytes: count4 }),
2142
2195
  content_bytes: count4,
@@ -2155,30 +2208,30 @@ var meetingPassage = strictObject({
2155
2208
  }),
2156
2209
  items: array(strictObject({
2157
2210
  ref: reference,
2158
- fingerprint: text5,
2211
+ fingerprint: text4,
2159
2212
  transcript_id: id3,
2160
- content_hash: nullable(text5),
2213
+ content_hash: nullable(text4),
2161
2214
  position: count4,
2162
2215
  start_ms: count4,
2163
2216
  end_ms: count4,
2164
2217
  speaker_participant_id: nullable(id3),
2165
- speaker_name: nullable(text5),
2166
- text: text5,
2218
+ speaker_name: nullable(text4),
2219
+ text: text4,
2167
2220
  revision
2168
2221
  }))
2169
2222
  });
2170
2223
  var event = strictObject({
2171
2224
  id: pipe(string(), minLength(1)),
2172
- event_series_id: nullable(text5),
2173
- title: nullable(text5),
2174
- description: nullable(text5),
2175
- location: nullable(text5),
2225
+ event_series_id: nullable(text4),
2226
+ title: nullable(text4),
2227
+ description: nullable(text4),
2228
+ location: nullable(text4),
2176
2229
  starts_at: nullable(isoTime),
2177
2230
  ends_at: nullable(isoTime),
2178
- timezone: nullable(text5),
2231
+ timezone: nullable(text4),
2179
2232
  /** `auto`: made from a meeting; `owner`: made by hand; `calendar`: from a calendar's entries. */
2180
2233
  origin: picklist(["auto", "owner", "calendar"]),
2181
- status: nullable(text5),
2234
+ status: nullable(text4),
2182
2235
  all_day: boolean(),
2183
2236
  /** When its calendar deleted it: shown as "deleted in Google", kept as history. */
2184
2237
  source_deleted_at: nullable(isoTime),
@@ -2186,7 +2239,7 @@ var event = strictObject({
2186
2239
  created_at: isoTime,
2187
2240
  updated_at: isoTime,
2188
2241
  /** The fields whoever sent the invitation wrote, on a calendar CLI's `events list`: an agent reads them as data. */
2189
- untrusted: optional(array(text5)),
2242
+ untrusted: optional(array(text4)),
2190
2243
  /** On a calendar CLI's `events list changed:<date>`: what changed since then, and when the store saw it. */
2191
2244
  change: optional(picklist(["new", "moved", "cancelled"])),
2192
2245
  changed_at: optional(nullable(isoTime)),
@@ -2198,7 +2251,7 @@ var event = strictObject({
2198
2251
  */
2199
2252
  overlapping: optional(boolean()),
2200
2253
  /** With `overlapping:true`: the events it overlaps, as `event:<id>`. */
2201
- overlaps: optional(array(text5))
2254
+ overlaps: optional(array(text4))
2202
2255
  });
2203
2256
  var eventItem = /* @__PURE__ */ __name((one) => ({
2204
2257
  id: String(one.id),
@@ -2218,10 +2271,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
2218
2271
  updated_at: new Date(one.updatedAt).toISOString()
2219
2272
  }), "eventItem");
2220
2273
 
2221
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2274
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2222
2275
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
2223
2276
 
2224
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2277
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2225
2278
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2226
2279
  if (!original || typeof original !== "object" || Array.isArray(original))
2227
2280
  throw new CliError("validation_error", "related history request is required");
@@ -2232,7 +2285,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2232
2285
  const positive = /* @__PURE__ */ __name((value) => Number.isSafeInteger(value) && value > 0, "positive");
2233
2286
  if (!positive(input.accountId) || !positive(input.seriesId))
2234
2287
  throw new CliError("validation_error", "accountId and seriesId must be positive safe integers");
2235
- if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((id4) => !positive(id4)))
2288
+ if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((id5) => !positive(id5)))
2236
2289
  throw new CliError("validation_error", "anchorIds must contain at most 20 positive safe integers");
2237
2290
  for (const key of ["after", "before"])
2238
2291
  if (!Number.isSafeInteger(input[key]) || Math.abs(input[key]) > 864e13)
@@ -2251,24 +2304,24 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2251
2304
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
2252
2305
  }, "validateMeetingRelatedHistory");
2253
2306
 
2254
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
2255
- var text6 = string();
2256
- var identifier = pipe(text6, minLength(1));
2257
- var nullableText = nullable(text6);
2307
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
2308
+ var text5 = string();
2309
+ var identifier = pipe(text5, minLength(1));
2310
+ var nullableText = nullable(text5);
2258
2311
  var count5 = pipe(number(), integer(), minValue(0));
2259
2312
  var flag = boolean();
2260
- var scope = strictObject({ provider: text6, account: text6 });
2313
+ var scope = strictObject({ provider: text5, account: text5 });
2261
2314
  var run = strictObject({
2262
2315
  meetings: count5,
2263
2316
  participants: count5,
2264
2317
  transcript_rows: count5,
2265
2318
  summaries: count5,
2266
- warnings: array(strictObject({ external_id: text6, message: text6 })),
2267
- timezone: optional(text6)
2319
+ warnings: array(strictObject({ external_id: text5, message: text5 })),
2320
+ timezone: optional(text5)
2268
2321
  });
2269
2322
  var exported = union([
2270
- strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text6, content: text6 }),
2271
- strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text6 })
2323
+ strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text5, content: text5 }),
2324
+ strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text5 })
2272
2325
  ]);
2273
2326
  var eventChange = strictObject({
2274
2327
  action: literal("event.link"),
@@ -2278,7 +2331,7 @@ var eventChange = strictObject({
2278
2331
  var personChange = strictObject({
2279
2332
  action: literal("person.link"),
2280
2333
  participant_id: identifier,
2281
- person_uid: text6,
2334
+ person_uid: text5,
2282
2335
  expected_person_uid: optional(nullableText),
2283
2336
  target_account_ids: optional(array(identifier))
2284
2337
  });
@@ -2291,7 +2344,7 @@ var eventResult = strictObject({
2291
2344
  var personResult = strictObject({
2292
2345
  meeting_id: identifier,
2293
2346
  participant_id: identifier,
2294
- person_uid: text6,
2347
+ person_uid: text5,
2295
2348
  previous_person_uid: nullableText,
2296
2349
  changed: flag
2297
2350
  });
@@ -2304,23 +2357,23 @@ var meetingChange = strictObject({
2304
2357
  result: optional(union([eventResult, personResult]))
2305
2358
  });
2306
2359
  var recognition = strictObject({
2307
- engine: text6,
2308
- model: text6,
2309
- version: optional(text6),
2360
+ engine: text5,
2361
+ model: text5,
2362
+ version: optional(text5),
2310
2363
  timing: optional(picklist(["fixed-windows", "recognition-segments"]))
2311
2364
  });
2312
2365
  var transcription = union([
2313
2366
  strictObject({
2314
2367
  applied: literal(false),
2315
2368
  account_id: identifier,
2316
- external_id: text6,
2369
+ external_id: text5,
2317
2370
  segments: count5,
2318
2371
  media: strictObject({
2319
- id: text6,
2320
- content_hash: text6,
2372
+ id: text5,
2373
+ content_hash: text5,
2321
2374
  size: count5,
2322
2375
  duration_ms: count5,
2323
- format: text6,
2376
+ format: text5,
2324
2377
  sample_rate: count5,
2325
2378
  channels: count5,
2326
2379
  recognition
@@ -2329,21 +2382,21 @@ var transcription = union([
2329
2382
  strictObject({
2330
2383
  applied: literal(true),
2331
2384
  account_id: identifier,
2332
- external_id: text6,
2385
+ external_id: text5,
2333
2386
  meeting_id: identifier,
2334
2387
  created: flag,
2335
2388
  inserted_transcripts: count5,
2336
2389
  replayed_transcripts: count5,
2337
2390
  superseded_transcripts: count5,
2338
2391
  segments: count5,
2339
- media_sha256: text6,
2340
- engine: text6,
2341
- model: text6,
2392
+ media_sha256: text5,
2393
+ engine: text5,
2394
+ model: text5,
2342
2395
  model_version: nullableText,
2343
2396
  timing: picklist(["fixed-windows", "recognition-segments"])
2344
2397
  })
2345
2398
  ]);
2346
- var embeddingModel = strictObject({ key: text6, dims: count5, kind: picklist(["local", "remote"]), model: text6 });
2399
+ var embeddingModel = strictObject({ key: text5, dims: count5, kind: picklist(["local", "remote"]), model: text5 });
2347
2400
  var embedding = union([
2348
2401
  strictObject({
2349
2402
  account_id: identifier,
@@ -2359,7 +2412,7 @@ var embedding = union([
2359
2412
  saved: count5,
2360
2413
  skipped: count5,
2361
2414
  has_more: flag,
2362
- next_hash: optional(text6),
2415
+ next_hash: optional(text5),
2363
2416
  applied: literal(true),
2364
2417
  rebuild: strictObject({
2365
2418
  transcripts: count5,
@@ -2384,14 +2437,14 @@ var MEETING_RESULT_ENTITIES = {
2384
2437
  meeting_repair: repair
2385
2438
  };
2386
2439
 
2387
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/review.js
2440
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/review.js
2388
2441
  var REVIEW_LIMIT = { default: 50, most: 200 };
2389
2442
 
2390
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
2443
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
2391
2444
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
2392
2445
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
2393
2446
 
2394
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
2447
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
2395
2448
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2396
2449
  input.signal?.throwIfAborted();
2397
2450
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -2412,19 +2465,19 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2412
2465
  return { ...input, limit, maxReadBytes };
2413
2466
  }, "validateMeetingSeriesHistory");
2414
2467
 
2415
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
2468
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
2416
2469
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
2417
2470
 
2418
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
2471
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
2419
2472
  function invalid4(field, response = false) {
2420
2473
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
2421
2474
  }
2422
2475
  __name(invalid4, "invalid");
2423
- var object = /* @__PURE__ */ __name((value, fields3, field, response = false) => {
2476
+ var object = /* @__PURE__ */ __name((value, fields2, field, response = false) => {
2424
2477
  if (!value || typeof value !== "object" || Array.isArray(value))
2425
2478
  invalid4(field, response);
2426
2479
  for (const key of Object.keys(value))
2427
- if (!fields3.includes(key))
2480
+ if (!fields2.includes(key))
2428
2481
  invalid4(`${field}.${key}`, response);
2429
2482
  }, "object");
2430
2483
  var cursorDetails = /* @__PURE__ */ __name((value) => {
@@ -2444,7 +2497,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
2444
2497
  cursorDetails(value);
2445
2498
  }, "validateMeetingSeriesInventoryCursor");
2446
2499
 
2447
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/meetings/stats.js
2500
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/stats.js
2448
2501
  var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
2449
2502
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
2450
2503
  const zone = timeZone ?? "UTC";
@@ -2508,8 +2561,8 @@ var aggregateMeetingCounts = /* @__PURE__ */ __name((meetings, by, timeZone, lim
2508
2561
  const kept = ordered.slice(0, limit);
2509
2562
  if (by !== "series")
2510
2563
  kept.reverse();
2511
- const counted = /* @__PURE__ */ __name(({ meetings: count6, ms, timed, transcripts }) => ({
2512
- meetings: count6,
2564
+ const counted = /* @__PURE__ */ __name(({ meetings: count7, ms, timed, transcripts }) => ({
2565
+ meetings: count7,
2513
2566
  minutes: minutesOf(ms),
2514
2567
  meanMinutes: meanOf(ms, timed),
2515
2568
  transcripts
@@ -2579,7 +2632,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
2579
2632
  };
2580
2633
  }, "aggregateMeetingStats");
2581
2634
 
2582
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/tasks/model.js
2635
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/tasks/model.js
2583
2636
  var TASK_KINDS = ["question", "request", "mention", "promise"];
2584
2637
  var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
2585
2638
  var CLOSED_STATES = ["done", "dismissed"];
@@ -2594,7 +2647,7 @@ function closeTask(task, state, by, at, reason) {
2594
2647
  }
2595
2648
  __name(closeTask, "closeTask");
2596
2649
 
2597
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/tasks/priority.js
2650
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/tasks/priority.js
2598
2651
  var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
2599
2652
  var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
2600
2653
  var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
@@ -2623,12 +2676,12 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
2623
2676
  }, "priorityOf");
2624
2677
  var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
2625
2678
 
2626
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/tasks/service.js
2679
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/tasks/service.js
2627
2680
  function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
2628
- async function find(id4) {
2629
- const task = await store.get(id4);
2681
+ async function find(id5) {
2682
+ const task = await store.get(id5);
2630
2683
  if (!task)
2631
- throw new CliError("not_found", `no task ${id4}`);
2684
+ throw new CliError("not_found", `no task ${id5}`);
2632
2685
  return task;
2633
2686
  }
2634
2687
  __name(find, "find");
@@ -2650,8 +2703,8 @@ function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PUR
2650
2703
  return { task, created: true };
2651
2704
  return { task, created: true, review: await store.reviewDuplicates(task.id) };
2652
2705
  },
2653
- async close(id4, { as, by, reason }) {
2654
- const task = closeTask(await find(id4), as, by, now(), reason);
2706
+ async close(id5, { as, by, reason }) {
2707
+ const task = closeTask(await find(id5), as, by, now(), reason);
2655
2708
  await store.update(task);
2656
2709
  return task;
2657
2710
  },
@@ -2683,13 +2736,13 @@ function median(values) {
2683
2736
  }
2684
2737
  __name(median, "median");
2685
2738
 
2686
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/tasks/store.js
2739
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/tasks/store.js
2687
2740
  function matches(task, filter) {
2688
2741
  return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
2689
2742
  }
2690
2743
  __name(matches, "matches");
2691
2744
 
2692
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
2745
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
2693
2746
  var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
2694
2747
  var MEMORY_KINDS = ["summary", "digest", "preference"];
2695
2748
  var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
@@ -2697,7 +2750,61 @@ var MEMORY_SCOPES = ["personal", "work"];
2697
2750
  var WORK_TASK_TYPES = ["bug", "feature", "chore"];
2698
2751
  var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
2699
2752
 
2700
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/domain/tags.js
2753
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/fields.js
2754
+ var text6 = string();
2755
+ var id4 = pipe(string(), minLength(1));
2756
+ var time = isoTime;
2757
+ var zonedTime = pipe(string(), isoTimestamp("an ISO 8601 time with a zone"));
2758
+ var count6 = pipe(number(), integer(), minValue(0));
2759
+ var untrusted = optional(array(text6));
2760
+ var providerMetadata = optional(record(string(), unknown()));
2761
+ var evidenceSource = strictObject({
2762
+ ref: nullable(reference),
2763
+ kind: text6,
2764
+ title: nullable(text6),
2765
+ sender: nullable(text6),
2766
+ at: nullable(time),
2767
+ excerpt: nullable(text6),
2768
+ tool: nullable(text6),
2769
+ missing: boolean()
2770
+ });
2771
+ var author = strictObject({
2772
+ type: picklist(["person", "bot"]),
2773
+ id: id4,
2774
+ name: nullable(text6)
2775
+ });
2776
+
2777
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
2778
+ var organization = strictObject({
2779
+ id: id4,
2780
+ ref: reference,
2781
+ kind: picklist(["company", "team", "family", "community"]),
2782
+ name: text6,
2783
+ scope: picklist(["personal", "work"]),
2784
+ created_at: time
2785
+ });
2786
+ var project = strictObject({
2787
+ id: id4,
2788
+ ref: reference,
2789
+ key: text6,
2790
+ name: text6,
2791
+ kind: picklist(["project", "inbox"]),
2792
+ type: picklist(["work", "client", "personal", "oss", "other"]),
2793
+ organization_id: nullable(id4),
2794
+ scope: picklist(["personal", "work"]),
2795
+ created_at: time
2796
+ });
2797
+ var reminder = strictObject({
2798
+ id: id4,
2799
+ task: text6,
2800
+ due_at: time,
2801
+ timezone: text6,
2802
+ state: picklist(["pending", "leased", "delivered", "cancelled"]),
2803
+ revision: number(),
2804
+ receipt: nullable(text6)
2805
+ });
2806
+
2807
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/tags.js
2701
2808
  var TAG_TYPES = ["chat", "contact", "message", "task"];
2702
2809
  var TAG = /^[a-z0-9-]{1,32}$/;
2703
2810
  var tagOf = /* @__PURE__ */ __name((value) => {
@@ -2711,7 +2818,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
2711
2818
  return tag;
2712
2819
  }, "normalizeTag");
2713
2820
 
2714
- // node_modules/.pnpm/@wirecat+cli-core@0.566.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_2c70ab84360472ff0036a7904a884c42/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
2821
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
2715
2822
  var LINK_KINDS = [
2716
2823
  "links-to",
2717
2824
  "blocked-by",
@@ -2732,6 +2839,130 @@ var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
2732
2839
  var RELATION_KINDS = ["member-of", "related-to"];
2733
2840
  var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
2734
2841
 
2842
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/money.js
2843
+ var CURRENCY_SCALES = {
2844
+ AED: 2,
2845
+ AMD: 2,
2846
+ AUD: 2,
2847
+ BHD: 3,
2848
+ BYN: 2,
2849
+ CAD: 2,
2850
+ CHF: 2,
2851
+ CLP: 0,
2852
+ CNY: 2,
2853
+ CZK: 2,
2854
+ DKK: 2,
2855
+ EUR: 2,
2856
+ GBP: 2,
2857
+ GEL: 2,
2858
+ HUF: 2,
2859
+ ILS: 2,
2860
+ INR: 2,
2861
+ ISK: 0,
2862
+ JPY: 0,
2863
+ KGS: 2,
2864
+ KRW: 0,
2865
+ KWD: 3,
2866
+ KZT: 2,
2867
+ NOK: 2,
2868
+ PLN: 2,
2869
+ RSD: 2,
2870
+ RUB: 2,
2871
+ SEK: 2,
2872
+ THB: 2,
2873
+ TRY: 2,
2874
+ UAH: 2,
2875
+ USD: 2,
2876
+ UZS: 2,
2877
+ VND: 0
2878
+ };
2879
+ var refuse = /* @__PURE__ */ __name((message, reason) => {
2880
+ throw new CliError("validation_error", message, { reason });
2881
+ }, "refuse");
2882
+ var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
2883
+ var parseDecimal = /* @__PURE__ */ __name((text7, scale) => {
2884
+ const match = DECIMAL.exec(text7.trim());
2885
+ if (!match || (match[2] ?? "").length > scale)
2886
+ return void 0;
2887
+ return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
2888
+ }, "parseDecimal");
2889
+ var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
2890
+ const digits = BigInt(units).toString().padStart(scale + 1, "0");
2891
+ return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
2892
+ }, "formatDecimal");
2893
+ var groupDigits = /* @__PURE__ */ __name((decimal) => {
2894
+ const [whole = "0", fraction] = decimal.split(".");
2895
+ const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
2896
+ return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
2897
+ }, "groupDigits");
2898
+ var currencyOf = /* @__PURE__ */ __name((text7) => {
2899
+ const code = typeof text7 === "string" ? text7.trim().toUpperCase() : "";
2900
+ if (CURRENCY_SCALES[code] === void 0)
2901
+ return refuse(`${typeof text7 === "string" && text7.trim() ? text7.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
2902
+ return code;
2903
+ }, "currencyOf");
2904
+ var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
2905
+ var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
2906
+ const scale = scaleOf(currency);
2907
+ const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
2908
+ if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
2909
+ return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
2910
+ return Number(units);
2911
+ }, "minorUnits");
2912
+ var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
2913
+ amount: formatDecimal(units, scaleOf(currency)),
2914
+ currency
2915
+ }), "moneyOf");
2916
+ var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
2917
+ var QUANTITY_SCALE = 3;
2918
+ var quantityOf = /* @__PURE__ */ __name((text7) => {
2919
+ const thousandths = typeof text7 === "string" ? parseDecimal(text7, QUANTITY_SCALE) : void 0;
2920
+ if (thousandths === void 0 || thousandths === 0n)
2921
+ return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
2922
+ const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
2923
+ return { text: plain, thousandths };
2924
+ }, "quantityOf");
2925
+ var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
2926
+
2927
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/finance.js
2928
+ var INVOICE_DIRECTIONS = ["receivable", "payable"];
2929
+ var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
2930
+ var MONEY_DIRECTIONS = ["in", "out"];
2931
+ var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
2932
+ var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
2933
+ if (current === "draft" || current === "void")
2934
+ return current;
2935
+ if (paid <= 0)
2936
+ return "issued";
2937
+ return paid < total ? "partly_paid" : "paid";
2938
+ }, "settledStatus");
2939
+ var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
2940
+ var notes = /* @__PURE__ */ __name((...words2) => {
2941
+ const kept = words2.filter((word) => word !== null);
2942
+ return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
2943
+ }, "notes");
2944
+ var invoiceLine = /* @__PURE__ */ __name((invoice) => {
2945
+ const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
2946
+ const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
2947
+ return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
2948
+ }, "invoiceLine");
2949
+ var paymentLine = /* @__PURE__ */ __name((payment) => {
2950
+ const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
2951
+ return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
2952
+ }, "paymentLine");
2953
+ var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
2954
+ var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
2955
+
2956
+ // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/orders.js
2957
+ var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
2958
+ var ORDER_PURPOSES = ["personal", "business", "client", "other"];
2959
+ var orderLine = /* @__PURE__ */ __name((order) => {
2960
+ const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
2961
+ const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
2962
+ return `${order.number ?? `#${order.id}`} \xB7 ${order.supplierName}${money} (${notes2})`;
2963
+ }, "orderLine");
2964
+ var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
2965
+
2735
2966
  export {
2736
2967
  formatMeetingReference,
2737
2968
  parseMeetingReference,
@@ -2768,18 +2999,20 @@ export {
2768
2999
  validatePayment,
2769
3000
  paymentTitle,
2770
3001
  meetingTimestamp,
3002
+ findingText,
2771
3003
  findingHash,
3004
+ findingFields,
3005
+ findingNeeds,
2772
3006
  validEvidence,
2773
3007
  findingId,
2774
3008
  validateFinding,
2775
3009
  validateBatch,
2776
3010
  validateFindings,
2777
- findingText,
2778
- findingFields,
2779
3011
  findingFingerprint,
2780
3012
  MEETING_FINDINGS_KIND,
2781
3013
  validateMeetingFindings,
2782
3014
  meetingFindingFingerprint,
3015
+ MEETING_FIELD_NAMES,
2783
3016
  liftMeetingFields,
2784
3017
  parseMeetingQuery,
2785
3018
  meetingWordsQuery,
@@ -2846,5 +3079,39 @@ export {
2846
3079
  MEMORY_STATUSES,
2847
3080
  MEMORY_SCOPES,
2848
3081
  WORK_TASK_TYPES,
2849
- TASK_TYPES2 as TASK_TYPES
3082
+ TASK_TYPES2 as TASK_TYPES,
3083
+ parseDecimal,
3084
+ formatDecimal,
3085
+ currencyOf,
3086
+ scaleOf,
3087
+ minorUnits,
3088
+ moneyOf,
3089
+ moneyLabel,
3090
+ quantityOf,
3091
+ lineUnits,
3092
+ INVOICE_DIRECTIONS,
3093
+ INVOICE_STATUSES,
3094
+ MONEY_DIRECTIONS,
3095
+ FINANCE_REVIEWS,
3096
+ settledStatus,
3097
+ invoiceLine,
3098
+ paymentLine,
3099
+ invoiceTitle,
3100
+ paymentEntryTitle,
3101
+ ORDER_STATUSES,
3102
+ ORDER_PURPOSES,
3103
+ orderLine,
3104
+ orderTitle,
3105
+ text6 as text,
3106
+ id4 as id,
3107
+ time,
3108
+ zonedTime,
3109
+ count6 as count,
3110
+ untrusted,
3111
+ providerMetadata,
3112
+ evidenceSource,
3113
+ author,
3114
+ organization,
3115
+ project,
3116
+ reminder
2850
3117
  };