@wirecat/tg-cli 0.116.0 → 0.118.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 (125) hide show
  1. package/dist/bin/tg.js +2 -2
  2. package/dist/bot/transport.d.ts +1 -1
  3. package/dist/bot/transport.d.ts.map +1 -1
  4. package/dist/bot/transport.js +42 -30
  5. package/dist/bot/transport.js.map +1 -1
  6. package/dist/bundle/{adapter-6CLMTQOV.js → adapter-4YNP6VCO.js} +70 -61
  7. package/dist/bundle/{all-profiles-R2UZMH24.js → all-profiles-MIQDYAGO.js} +10 -10
  8. package/dist/bundle/{anthropic-QKIPHV2Z.js → anthropic-NTASPJYE.js} +6 -6
  9. package/dist/bundle/{app-server-AZB2MFK6.js → app-server-UJZBJ2SK.js} +49 -46
  10. package/dist/bundle/{bot-api-2IM243J4.js → bot-api-JZAD4L3N.js} +49 -49
  11. package/dist/bundle/{bot-history-G6CRVCL2.js → bot-history-OUDHH3NU.js} +18 -18
  12. package/dist/bundle/{bun-JDKPISPX.js → bun-EC4HDIRD.js} +2 -2
  13. package/dist/bundle/{bun-sqlite-X5PY5IQT.js → bun-sqlite-A4HJR6KO.js} +5 -5
  14. package/dist/bundle/{chunk-SD5PUYKF.js → chunk-2KQHUBTV.js} +12 -12
  15. package/dist/bundle/{chunk-QHBVGKC3.js → chunk-2NA5KVP6.js} +210 -82
  16. package/dist/bundle/{chunk-PPLFOIYX.js → chunk-3MQOLYAN.js} +4 -4
  17. package/dist/bundle/{chunk-QGL2UGML.js → chunk-4BV4UMBB.js} +738 -235
  18. package/dist/bundle/{chunk-Y6VWGJ4Q.js → chunk-57LKX6N2.js} +4 -2
  19. package/dist/bundle/{chunk-BGMV66FC.js → chunk-5IIU7X4S.js} +1 -1
  20. package/dist/bundle/{chunk-H72UEHNG.js → chunk-5LDWBEWU.js} +55 -33
  21. package/dist/bundle/{chunk-XQUTJITP.js → chunk-5QYU7B27.js} +763 -130
  22. package/dist/bundle/chunk-65XV5PPI.js +64 -0
  23. package/dist/bundle/{chunk-NUYRMU56.js → chunk-6AXUEJGL.js} +2 -2
  24. package/dist/bundle/{chunk-N42VUNTO.js → chunk-6RI4TEIC.js} +2 -2
  25. package/dist/bundle/{chunk-VQPLHOVQ.js → chunk-6ZMTEUVU.js} +6 -6
  26. package/dist/bundle/{chunk-MQ7MCVZV.js → chunk-76EKXFX2.js} +2 -2
  27. package/dist/bundle/{chunk-K62YATVD.js → chunk-BNEP5EOV.js} +18 -4
  28. package/dist/bundle/{chunk-EB2IULWB.js → chunk-BXTDAGM4.js} +2 -2
  29. package/dist/bundle/{chunk-HBUJNNZD.js → chunk-CEY43D3A.js} +31 -29
  30. package/dist/bundle/chunk-DKFC5ZZ3.js +208 -0
  31. package/dist/bundle/{chunk-FDI4GOIP.js → chunk-DSZJREEO.js} +463 -358
  32. package/dist/bundle/{chunk-76CX2YPT.js → chunk-EPCFXKTX.js} +8 -8
  33. package/dist/bundle/{chunk-KA6EGOJY.js → chunk-EPXVRJAX.js} +2 -2
  34. package/dist/bundle/{chunk-4IQZRW4O.js → chunk-EQJ6NLF5.js} +13 -13
  35. package/dist/bundle/{chunk-4D5AUWAY.js → chunk-FHMK6OK4.js} +43 -25
  36. package/dist/bundle/{chunk-RSDIPQXP.js → chunk-G3RT2EQI.js} +2 -2
  37. package/dist/bundle/{chunk-IR4S7POE.js → chunk-GI4MTNA2.js} +8 -8
  38. package/dist/bundle/{chunk-HK6SIIGG.js → chunk-GIM37COQ.js} +3 -3
  39. package/dist/bundle/{chunk-UCSFO5GW.js → chunk-GLRRCKP6.js} +3 -3
  40. package/dist/bundle/{chunk-YYKJN6H5.js → chunk-GXCJ47SJ.js} +1499 -710
  41. package/dist/bundle/{chunk-GV7ZJ33M.js → chunk-H6S3C3MH.js} +4 -4
  42. package/dist/bundle/{chunk-LXH3SKY3.js → chunk-HJNRIK5X.js} +8 -8
  43. package/dist/bundle/{chunk-5VFPUOJO.js → chunk-I4TI5HDJ.js} +11 -11
  44. package/dist/bundle/{chunk-RSNGMNU5.js → chunk-JLJKGKU2.js} +6 -6
  45. package/dist/bundle/{chunk-T7CDLV33.js → chunk-JPVFYMSQ.js} +22 -14
  46. package/dist/bundle/{chunk-B4UOCWM4.js → chunk-JWIUK3SK.js} +2 -2
  47. package/dist/bundle/{chunk-LSKGCJWD.js → chunk-JWPSVS6C.js} +21246 -4044
  48. package/dist/bundle/{chunk-JJMQA272.js → chunk-JZETEZHC.js} +8 -21
  49. package/dist/bundle/{chunk-42GK3XRS.js → chunk-KEDHX6XG.js} +2 -2
  50. package/dist/bundle/{chunk-QAKL3GXB.js → chunk-MBH7IKLT.js} +1 -1
  51. package/dist/bundle/{chunk-HLNYJPAB.js → chunk-MZNOASAW.js} +2 -2
  52. package/dist/bundle/{chunk-YLRTLZF6.js → chunk-NKFTZVQU.js} +1 -1
  53. package/dist/bundle/{chunk-577MFPCP.js → chunk-NMT2VGEI.js} +3 -3
  54. package/dist/bundle/{chunk-5ZIBAYIZ.js → chunk-NUCDEOFC.js} +2 -2
  55. package/dist/bundle/{chunk-NL3PAFAE.js → chunk-OTQDJUES.js} +6 -6
  56. package/dist/bundle/{chunk-KV4267S4.js → chunk-P3ASN72F.js} +1 -1
  57. package/dist/bundle/{chunk-TZVL4U7U.js → chunk-PB252TT3.js} +4 -2
  58. package/dist/bundle/{chunk-HUOXUI2M.js → chunk-PO74BDER.js} +58 -47
  59. package/dist/bundle/{chunk-LFKEKSI5.js → chunk-PW3HFIJA.js} +523 -239
  60. package/dist/bundle/{chunk-5FCONCJO.js → chunk-PWCQC56A.js} +1 -1
  61. package/dist/bundle/{chunk-XBIPSSKI.js → chunk-QOGYHU3Q.js} +4 -4
  62. package/dist/bundle/{chunk-JFTCOV37.js → chunk-RG2E7ZQZ.js} +180 -25
  63. package/dist/bundle/{chunk-R52RMHWF.js → chunk-TMTEWOQS.js} +3 -3
  64. package/dist/bundle/{chunk-I6JF43YP.js → chunk-TSTEZNSX.js} +3 -3
  65. package/dist/bundle/{chunk-YPF6OS37.js → chunk-VW6BF6M7.js} +1 -1
  66. package/dist/bundle/{chunk-SKZ2E3WC.js → chunk-Y64SI2RO.js} +47 -1
  67. package/dist/bundle/{chunk-DP5LRU7K.js → chunk-YEOSV6JC.js} +1 -1
  68. package/dist/bundle/{chunk-OX6EWGSG.js → chunk-YHZFGUAP.js} +19 -19
  69. package/dist/bundle/{chunk-N6TIFJHW.js → chunk-YPRUWRKE.js} +1 -1
  70. package/dist/bundle/{chunk-PPSUA3IZ.js → chunk-ZMUC3UQO.js} +3 -3
  71. package/dist/bundle/{chunk-PXMHBTK3.js → chunk-ZXXTJF4Z.js} +4 -4
  72. package/dist/bundle/command-contract-7GZ6HAA6.js +33 -0
  73. package/dist/bundle/{decode-W6YPTGJA.js → decode-NMNPLKNR.js} +5 -5
  74. package/dist/bundle/{dispatch-H7EFNBEH.js → dispatch-OP27MWX5.js} +8 -8
  75. package/dist/bundle/{echarts-YAWDIC5D.js → echarts-S46LEIPS.js} +2 -2
  76. package/dist/bundle/{embed-EN4UTLV5.js → embed-I5ZYHGYC.js} +6 -6
  77. package/dist/bundle/{embedder-HEKHRL7E.js → embedder-LTJI67N2.js} +9 -9
  78. package/dist/bundle/{entry-2KB6MTCG.js → entry-O6BUPXF7.js} +7 -7
  79. package/dist/bundle/{failure-3DU3HLBQ.js → failure-4JUQFXJT.js} +2 -2
  80. package/dist/bundle/{first-run-LBG26WWO.js → first-run-PMZNCDGD.js} +11 -11
  81. package/dist/bundle/first-screen-BGML5DSO.js +31 -0
  82. package/dist/bundle/{instructions-HA62QNPR.js → instructions-AUEGY3VO.js} +1 -1
  83. package/dist/bundle/{mcp-PPVOM4SE.js → mcp-M4QN2E7R.js} +2 -2
  84. package/dist/bundle/{node-MZ2VWSQQ.js → node-XRA7RBCQ.js} +2 -2
  85. package/dist/bundle/{node-sqlite-KNNS6DCM.js → node-sqlite-DEZO6LRS.js} +6 -6
  86. package/dist/bundle/{oauth-KWUABBSQ.js → oauth-DAVC7WCD.js} +7 -7
  87. package/dist/bundle/{open-JXMCYCIV.js → open-DE2YO4T7.js} +5 -5
  88. package/dist/bundle/{openai-HL3IR4VT.js → openai-5BKGAULH.js} +14 -14
  89. package/dist/bundle/{process-K2FICLWY.js → process-4ZHPNUIQ.js} +1 -1
  90. package/dist/bundle/{program-IFOMT4JS.js → program-EGTKSNB4.js} +51 -51
  91. package/dist/bundle/{prompt-HVD3Q77P.js → prompt-HWCWHHPE.js} +5 -5
  92. package/dist/bundle/{proxy-transport-PA5SGMRY.js → proxy-transport-4DPZB2W2.js} +5 -5
  93. package/dist/bundle/{recognize-HHLVETKI.js → recognize-NG6RXNGF.js} +4 -4
  94. package/dist/bundle/{remote-HUAKXJCS.js → remote-ZKXIIGYH.js} +7 -7
  95. package/dist/bundle/{rerank-NWFIV7OF.js → rerank-TX5QFURV.js} +7 -7
  96. package/dist/bundle/{serve-ANUKAJJN.js → serve-XAS6DECW.js} +9 -9
  97. package/dist/bundle/{server-7Q7WAOHO.js → server-CNPIWBYU.js} +35 -35
  98. package/dist/bundle/server-FRTKLHZF.js +60 -0
  99. package/dist/bundle/{state-Y2AJ5XTP.js → state-3HTUETTS.js} +6 -6
  100. package/dist/bundle/{store-S3IG5KWL.js → store-B5VZWJHN.js} +23 -13
  101. package/dist/bundle/store-maintenance-command-VG3CLELA.js +50 -0
  102. package/dist/bundle/tg.js +13 -13
  103. package/dist/telegram/account.d.ts.map +1 -1
  104. package/dist/telegram/account.js +4 -1
  105. package/dist/telegram/account.js.map +1 -1
  106. package/dist/telegram/errors.d.ts.map +1 -1
  107. package/dist/telegram/errors.js +2 -1
  108. package/dist/telegram/errors.js.map +1 -1
  109. package/dist/telegram/feature.d.ts +4 -1
  110. package/dist/telegram/feature.d.ts.map +1 -1
  111. package/dist/telegram/feature.js +5 -2
  112. package/dist/telegram/feature.js.map +1 -1
  113. package/dist/telegram/sending.d.ts.map +1 -1
  114. package/dist/telegram/sending.js +24 -10
  115. package/dist/telegram/sending.js.map +1 -1
  116. package/dist/version.d.ts +1 -1
  117. package/dist/version.js +1 -1
  118. package/package.json +3 -3
  119. package/dist/bundle/chunk-K2RYCCTP.js +0 -48
  120. package/dist/bundle/chunk-ZDIAPICE.js +0 -132
  121. package/dist/bundle/command-contract-DPXM4SZT.js +0 -33
  122. package/dist/bundle/first-screen-TGTSLUI6.js +0 -31
  123. package/dist/bundle/server-HCQS4YDQ.js +0 -60
  124. package/dist/bundle/store-maintenance-command-V2WC4G6J.js +0 -50
  125. /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-VOXIGICJ.js} +0 -0
@@ -1,5 +1,12 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ isCliFailure,
5
+ isStoreDamage
6
+ } from "./chunk-Y64SI2RO.js";
7
+ import {
8
+ refuseOwnerStoreInTests
9
+ } from "./chunk-G3RT2EQI.js";
3
10
  import {
4
11
  RegistryError,
5
12
  SNAKE_CASE,
@@ -11,6 +18,7 @@ import {
11
18
  duplicates,
12
19
  integer,
13
20
  isoTime,
21
+ isoTimestamp,
14
22
  lazy,
15
23
  literal,
16
24
  maxValue,
@@ -23,25 +31,128 @@ import {
23
31
  pageSchema,
24
32
  picklist,
25
33
  pipe,
34
+ record,
26
35
  reference,
27
36
  safeParse,
28
37
  stepOf,
29
38
  strictObject,
30
39
  string,
31
40
  union,
41
+ unknown,
32
42
  variant
33
- } from "./chunk-76CX2YPT.js";
43
+ } from "./chunk-EPCFXKTX.js";
34
44
  import {
35
45
  CliError,
36
46
  isCliError,
37
47
  singleLine,
38
48
  visibleControls
39
- } from "./chunk-EB2IULWB.js";
49
+ } from "./chunk-BXTDAGM4.js";
40
50
  import {
41
51
  __name
42
52
  } from "./chunk-ZVVMGPBJ.js";
43
53
 
44
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
54
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/store/marks.js
55
+ import { readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
56
+ var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
57
+ var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
58
+ var inodeOf = /* @__PURE__ */ __name((store) => statSync(store, { throwIfNoEntry: false })?.ino, "inodeOf");
59
+ var readJson = /* @__PURE__ */ __name((path) => {
60
+ try {
61
+ return JSON.parse(readFileSync(path, "utf8"));
62
+ } catch (error) {
63
+ if (error.code === "ENOENT")
64
+ return null;
65
+ throw error;
66
+ }
67
+ }, "readJson");
68
+ var ownerStoreInTests = /* @__PURE__ */ __name((store) => {
69
+ try {
70
+ refuseOwnerStoreInTests(store);
71
+ return false;
72
+ } catch {
73
+ return true;
74
+ }
75
+ }, "ownerStoreInTests");
76
+ var sqliteFailure = /* @__PURE__ */ __name((error) => isCliFailure(error) && error.details?.reason === "store.damaged" ? error.cause : error, "sqliteFailure");
77
+ var markStoreDamaged = /* @__PURE__ */ __name((error, { store, command, version, runId, now = Date.now }) => {
78
+ const failure = sqliteFailure(error);
79
+ if (!isStoreDamage(failure) || ownerStoreInTests(store))
80
+ return false;
81
+ const inode = inodeOf(store);
82
+ if (inode === void 0)
83
+ return false;
84
+ const mark = {
85
+ at: new Date(now()).toISOString(),
86
+ command,
87
+ ...version ? { cli_version: version } : {},
88
+ ...runId ? { run_id: runId } : {},
89
+ error: failure.message.slice(0, 500),
90
+ inode
91
+ };
92
+ try {
93
+ writeFileSync(damageMarkPath(store), `${JSON.stringify(mark, null, 2)}
94
+ `, { flag: "wx", mode: 384 });
95
+ return true;
96
+ } catch {
97
+ return false;
98
+ }
99
+ }, "markStoreDamaged");
100
+ var readDamageMark = /* @__PURE__ */ __name((store) => {
101
+ const path = damageMarkPath(store);
102
+ let mark;
103
+ try {
104
+ mark = readJson(path);
105
+ } catch {
106
+ return { at: "unknown", command: "unknown", error: `${path} cannot be read`, inode: inodeOf(store) ?? 0 };
107
+ }
108
+ if (mark === null)
109
+ return null;
110
+ if (mark.inode !== inodeOf(store)) {
111
+ clearDamageMark(store);
112
+ return null;
113
+ }
114
+ return mark;
115
+ }, "readDamageMark");
116
+ var clearDamageMark = /* @__PURE__ */ __name((store) => rmSync(damageMarkPath(store), { force: true }), "clearDamageMark");
117
+ var refuseDamagedStore = /* @__PURE__ */ __name((store, cli) => {
118
+ const mark = readDamageMark(store);
119
+ if (!mark)
120
+ return;
121
+ throw new CliError("configuration_error", `the store was found damaged at ${mark.at} by \`${mark.command}\` (${mark.error}), so nothing writes to it until it is recovered; \`${cli ?? "<cli>"} store recover\` says what is damaged and what to do`, { reason: "store.damaged" });
122
+ }, "refuseDamagedStore");
123
+ var readHealthMark = /* @__PURE__ */ __name((store) => {
124
+ try {
125
+ return readJson(healthMarkPath(store));
126
+ } catch {
127
+ return null;
128
+ }
129
+ }, "readHealthMark");
130
+ var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, schema, now = Date.now }) => {
131
+ const previous = readHealthMark(store);
132
+ if (ownerStoreInTests(store))
133
+ return { previous, cleared: null };
134
+ const checkedAt = new Date(now()).toISOString();
135
+ const mark = {
136
+ checked_at: checkedAt,
137
+ ok: health.ok,
138
+ problems: health.problems ?? 0,
139
+ schema,
140
+ cli,
141
+ ...version ? { cli_version: version } : {},
142
+ last_ok_at: health.ok ? checkedAt : previous?.last_ok_at ?? null
143
+ };
144
+ const cleared = health.ok ? readDamageMark(store) : null;
145
+ try {
146
+ writeFileSync(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
147
+ `, { mode: 384 });
148
+ } catch {
149
+ }
150
+ if (cleared)
151
+ clearDamageMark(store);
152
+ return { previous, cleared };
153
+ }, "recordDeepCheck");
154
+
155
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
45
156
  var QUERY_LIMITS = {
46
157
  bytes: 8192,
47
158
  depth: 32,
@@ -85,7 +196,7 @@ function queryError(reason, span, alternative, context3 = {}, details = {}) {
85
196
  __name(queryError, "queryError");
86
197
  var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
87
198
 
88
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
199
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
89
200
  var timezoneOf = /* @__PURE__ */ __name((given) => {
90
201
  const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
91
202
  try {
@@ -118,8 +229,8 @@ var dayBoundary = /* @__PURE__ */ __name((value, zone, next, span) => {
118
229
  day: "2-digit",
119
230
  era: "short"
120
231
  });
121
- const dayAt = /* @__PURE__ */ __name((time) => {
122
- const parts = formatter.formatToParts(time);
232
+ const dayAt = /* @__PURE__ */ __name((time2) => {
233
+ const parts = formatter.formatToParts(time2);
123
234
  const value2 = /* @__PURE__ */ __name((name) => Number(parts.find((p) => p.type === name)?.value), "value");
124
235
  const year = parts.find((p) => p.type === "era")?.value === "BC" ? 1 - value2("year") : value2("year");
125
236
  return year * 1e4 + value2("month") * 100 + value2("day");
@@ -175,11 +286,11 @@ var zonedMoment = /* @__PURE__ */ __name((value, zone, span, { end = false } = {
175
286
  return dayBoundary(value, zone, end, span) - (end ? 1 : 0);
176
287
  if (!ZONED.test(value))
177
288
  return wallTime(value, zone, span);
178
- const time = Date.parse(value);
179
- if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(time))
289
+ const time2 = Date.parse(value);
290
+ if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(time2))
180
291
  queryError("query.invalid-date", span);
181
292
  calendar(value.slice(0, 10), span);
182
- return time;
293
+ return time2;
183
294
  }, "zonedMoment");
184
295
  var AGO = /^(\d+)(m|h|d)$/u;
185
296
  var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
@@ -213,10 +324,10 @@ var dateEndpoint = /* @__PURE__ */ __name((value, zone, side, inclusive, span, n
213
324
  if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/u.test(value))
214
325
  queryError("query.invalid-date", span, "use an ISO date, today, yesterday, 30m/2h/7d ago, or a quoted timestamp with offset");
215
326
  calendar(value.slice(0, 10), span);
216
- const time = Date.parse(value);
217
- if (!Number.isFinite(time) || Number(value.slice(11, 13)) > 23 || Number(value.slice(14, 16)) > 59 || Number(value.slice(17, 19)) > 59)
327
+ const time2 = Date.parse(value);
328
+ if (!Number.isFinite(time2) || Number(value.slice(11, 13)) > 23 || Number(value.slice(14, 16)) > 59 || Number(value.slice(17, 19)) > 59)
218
329
  queryError("query.invalid-date", span);
219
- return { time, inclusive };
330
+ return { time: time2, inclusive };
220
331
  }, "dateEndpoint");
221
332
  var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclusive, zone, span, now = Date.now()) => {
222
333
  const since = lower === upper && AGO.test(lower.toLowerCase());
@@ -230,7 +341,7 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
230
341
  };
231
342
  }, "dateRange");
232
343
 
233
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
344
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
234
345
  var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
235
346
  var OPERATORS_BY_TYPE = {
236
347
  kw: ["term", "phrase", "wildcard"],
@@ -309,10 +420,10 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
309
420
  return [...own, ...relations, ...states];
310
421
  }, "queryFieldsOf");
311
422
 
312
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
423
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
313
424
  var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
314
- var leftOut = /* @__PURE__ */ __name((fields2) => fields2.filter((field) => field.negatable).map((field) => field.name), "leftOut");
315
- var has = /* @__PURE__ */ __name((fields2, operator) => fields2.some((field) => field.operators.includes(operator)), "has");
425
+ var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
426
+ var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
316
427
  var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
317
428
  "field:value",
318
429
  ...has(shown, "phrase") ? ['"a phrase"'] : [],
@@ -341,12 +452,12 @@ var queryDescription = /* @__PURE__ */ __name((registry) => {
341
452
  return "field:value terms; this list filters by none yet, so any term is refused";
342
453
  const negatable = leftOut(shown);
343
454
  const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
344
- const fields2 = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
455
+ const fields = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
345
456
  const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
346
- return `${terms}; fields: ${fields2.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
457
+ return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
347
458
  }, "queryDescription");
348
459
 
349
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
460
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
350
461
  var inContext = /* @__PURE__ */ __name((context3, run2) => {
351
462
  try {
352
463
  run2();
@@ -421,7 +532,7 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
421
532
  }, "validateQuery");
422
533
  var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
423
534
 
424
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
535
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
425
536
  var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
426
537
  var reserved = /* @__PURE__ */ new Set([
427
538
  "+",
@@ -559,7 +670,7 @@ var parseLucene = /* @__PURE__ */ __name((text6, { defaultField = "text", proxim
559
670
  fail("query.too-large", { start: 0, end: text6.length });
560
671
  const tokens = tokensOf(text6, fail);
561
672
  let at = 0;
562
- let count6 = 0;
673
+ let count7 = 0;
563
674
  let depth = 0;
564
675
  const peek = /* @__PURE__ */ __name(() => tokens[at], "peek");
565
676
  const take = /* @__PURE__ */ __name(() => tokens[at++], "take");
@@ -569,7 +680,7 @@ var parseLucene = /* @__PURE__ */ __name((text6, { defaultField = "text", proxim
569
680
  return take();
570
681
  }, "expect");
571
682
  const built = /* @__PURE__ */ __name((node) => {
572
- if (++count6 > QUERY_LIMITS.nodes)
683
+ if (++count7 > QUERY_LIMITS.nodes)
573
684
  fail("query.too-large", node.span);
574
685
  return node;
575
686
  }, "built");
@@ -730,7 +841,7 @@ var implicitTextTerms = /* @__PURE__ */ __name((text6) => {
730
841
  return new Set(tokens.flatMap((token, index) => (token.kind === "term" || token.kind === "number") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index - 1]?.kind ?? "") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index + 1]?.kind ?? "") ? [token.span.start] : []));
731
842
  }, "implicitTextTerms");
732
843
 
733
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
844
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
734
845
  var describeQuery = /* @__PURE__ */ __name((registry) => ({
735
846
  entity: registry.entity,
736
847
  backend: registry.backend,
@@ -801,7 +912,7 @@ var QUERY_REASONS = defineReasons([
801
912
  details: [...SPAN, ...details]
802
913
  })));
803
914
 
804
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
915
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
805
916
  var wordsOf = /* @__PURE__ */ __name((text6) => text6.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
806
917
  var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
807
918
  var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
@@ -827,10 +938,10 @@ var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
827
938
  return (lower === "*" || (lowerInclusive ? number2 >= Number(lower) : number2 > Number(lower))) && (upper === "*" || (upperInclusive ? number2 <= Number(upper) : number2 < Number(upper)));
828
939
  }
829
940
  case "time": {
830
- const time = Date.parse(text6);
941
+ const time2 = Date.parse(text6);
831
942
  const [lower, upper, lowerInclusive, upperInclusive] = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
832
943
  const range = dateRange(lower, upper, lowerInclusive, upperInclusive, options.zone ?? "UTC", node.span, options.now);
833
- return (range.lower === void 0 || (range.lower_inclusive ? time >= range.lower : time > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time <= range.upper : time < range.upper));
944
+ return (range.lower === void 0 || (range.lower_inclusive ? time2 >= range.lower : time2 > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time2 <= range.upper : time2 < range.upper));
834
945
  }
835
946
  default:
836
947
  return node.operator === "wildcard" ? pattern(node.value).test(text6) : text6.toLowerCase() === node.value.toLowerCase();
@@ -854,9 +965,9 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
854
965
  const value = item[node.field];
855
966
  return Array.isArray(value) ? value.some((one) => matchOne(field, node, one, options)) : matchOne(field, node, value, options);
856
967
  }, "matches");
857
- var evaluate = /* @__PURE__ */ __name((ast, fields2, item, options = {}) => matches(ast.root, item, new Map(fields2.map((field) => [field.name, field])), options), "evaluate");
968
+ var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
858
969
 
859
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/reference.js
970
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/reference.js
860
971
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
861
972
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
862
973
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -893,7 +1004,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text6) => {
893
1004
  }, "parseMeetingReference");
894
1005
  var canonicalMeetingReference = /* @__PURE__ */ __name((text6) => formatMeetingReference(parseMeetingReference(text6)), "canonicalMeetingReference");
895
1006
 
896
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/item.js
1007
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/item.js
897
1008
  var text = string();
898
1009
  var count = pipe(number(), integer(), minValue(0));
899
1010
  var MEETING_ISSUES = ["time_without_zone"];
@@ -958,7 +1069,7 @@ var MEETING_QUERY = {
958
1069
  })
959
1070
  };
960
1071
 
961
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
1072
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
962
1073
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
963
1074
  const parsed = urlOf(url);
964
1075
  if (!parsed)
@@ -992,7 +1103,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
992
1103
  }
993
1104
  }, "urlOf");
994
1105
 
995
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
1106
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
996
1107
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
997
1108
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
998
1109
  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");
@@ -1011,7 +1122,11 @@ var ENTRY_METADATA_KEYS = [
1011
1122
  "guestsCanSeeOtherGuests",
1012
1123
  "hangoutLink",
1013
1124
  "locked",
1014
- "privateCopy"
1125
+ "privateCopy",
1126
+ // A phone call's, from a records import: the entry's other columns have no place for them.
1127
+ "callDirection",
1128
+ "callSeconds",
1129
+ "callNumber"
1015
1130
  ];
1016
1131
  var entryMetadata = /* @__PURE__ */ __name((metadata) => {
1017
1132
  const kept = {};
@@ -1025,7 +1140,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
1025
1140
  return kept;
1026
1141
  }, "entryMetadata");
1027
1142
 
1028
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1143
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1029
1144
  import { createHash } from "node:crypto";
1030
1145
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
1031
1146
  reference: cue2.reference,
@@ -1039,7 +1154,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
1039
1154
  text: cue2.text
1040
1155
  })).digest("hex"), "meetingCueFingerprint");
1041
1156
 
1042
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1157
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1043
1158
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
1044
1159
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
1045
1160
  if (entry.recurrenceEndsAt !== null)
@@ -1062,7 +1177,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
1062
1177
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
1063
1178
  }, "entryInWindow");
1064
1179
 
1065
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/answers.js
1180
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/answers.js
1066
1181
  var text2 = string();
1067
1182
  var count2 = pipe(number(), integer(), minValue(0));
1068
1183
  var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
@@ -1297,7 +1412,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
1297
1412
  };
1298
1413
  }, "meetingHitsList");
1299
1414
 
1300
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1415
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1301
1416
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text6) => text6.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
1302
1417
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
1303
1418
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -1321,7 +1436,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
1321
1436
  };
1322
1437
  }, "validateMeetingParticipantSearch");
1323
1438
 
1324
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1439
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1325
1440
  var MeetingError = class extends CliError {
1326
1441
  static {
1327
1442
  __name(this, "MeetingError");
@@ -1348,8 +1463,8 @@ var validateFilter = /* @__PURE__ */ __name((filter) => {
1348
1463
  if (value !== void 0 && (!Number.isSafeInteger(value) || value < 0))
1349
1464
  throw new MeetingError("validation_error", "expected a nonnegative integer");
1350
1465
  }, "validateFilter");
1351
- var meetingShow = /* @__PURE__ */ __name(async (store, id3, accountId) => {
1352
- const details = await store.meeting(positiveInteger(id3));
1466
+ var meetingShow = /* @__PURE__ */ __name(async (store, id4, accountId) => {
1467
+ const details = await store.meeting(positiveInteger(id4));
1353
1468
  if (!details || accountId !== void 0 && details.meeting.accountId !== accountId)
1354
1469
  throw new MeetingError("not_found", "meeting not found");
1355
1470
  return details;
@@ -1440,20 +1555,20 @@ var ownerOf = /* @__PURE__ */ __name(async (store, accountId) => {
1440
1555
  throw new MeetingError("not_found", `meeting account ${accountId} is not in the store`);
1441
1556
  return owner;
1442
1557
  }, "ownerOf");
1443
- var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store, id3, accountId) => {
1444
- const details = await meetingShow(store, id3, accountId);
1558
+ var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store, id4, accountId) => {
1559
+ const details = await meetingShow(store, id4, accountId);
1445
1560
  return { item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId)) };
1446
1561
  }, "meetingDetailsAnswer");
1447
- var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id3, accountId, options = {}) => {
1448
- const details = await meetingShow(store, id3, accountId);
1562
+ var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id4, accountId, options = {}) => {
1563
+ const details = await meetingShow(store, id4, accountId);
1449
1564
  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)));
1450
1565
  }, "meetingTranscriptAnswer");
1451
- var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id3, accountId) => {
1452
- const details = await meetingShow(store, id3, accountId);
1566
+ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId) => {
1567
+ const details = await meetingShow(store, id4, accountId);
1453
1568
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
1454
1569
  }, "meetingSummaryAnswer");
1455
1570
 
1456
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/export.js
1571
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/export.js
1457
1572
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
1458
1573
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
1459
1574
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -1496,10 +1611,10 @@ var transcriptsOf = /* @__PURE__ */ __name((details, transcriptId) => {
1496
1611
  }
1497
1612
  return details.transcripts.filter((part) => part.transcript.supersededAt === null && part.transcript.deletedAt === null);
1498
1613
  }, "transcriptsOf");
1499
- var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
1614
+ var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
1500
1615
  if (options.format !== "markdown" && options.format !== "vtt")
1501
1616
  throw new MeetingError("validation_error", "export format must be markdown or vtt");
1502
- const details = await meetingShow(store, id3, options.accountId);
1617
+ const details = await meetingShow(store, id4, options.accountId);
1503
1618
  const transcripts = transcriptsOf(details, options.transcriptId);
1504
1619
  let content;
1505
1620
  if (options.format === "vtt") {
@@ -1549,7 +1664,7 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
1549
1664
  };
1550
1665
  }, "exportMeeting");
1551
1666
 
1552
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/payment.js
1667
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/payment.js
1553
1668
  var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
1554
1669
  var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
1555
1670
  var PAYMENT_STATES = ["expected", "paid", "cancelled"];
@@ -1601,9 +1716,9 @@ var validatePayment = /* @__PURE__ */ __name((input) => {
1601
1716
  if (!input || typeof input !== "object" || Array.isArray(input))
1602
1717
  return invalid2("a payment is an object");
1603
1718
  const raw = input;
1604
- const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
1605
- if (unknown.length)
1606
- return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
1719
+ const unknown2 = Object.keys(raw).filter((key) => !FIELDS.includes(key));
1720
+ if (unknown2.length)
1721
+ return invalid2(`a payment has no field ${unknown2.join(", ")}; its fields are ${FIELDS.join(", ")}`);
1607
1722
  const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
1608
1723
  if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
1609
1724
  return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
@@ -1643,13 +1758,13 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
1643
1758
  return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
1644
1759
  }, "paymentTitle");
1645
1760
 
1646
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1761
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1647
1762
  import { createHash as createHash2 } from "node:crypto";
1648
1763
 
1649
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
1764
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
1650
1765
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1651
1766
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
1652
- throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone`);
1767
+ throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
1653
1768
  const date = value.slice(0, 10);
1654
1769
  const instant = Date.parse(`${date}T00:00:00Z`);
1655
1770
  if (!Number.isFinite(instant) || new Date(instant).toISOString().slice(0, 10) !== date)
@@ -1657,21 +1772,44 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1657
1772
  return new Date(value).toISOString();
1658
1773
  }, "meetingTimestamp");
1659
1774
 
1660
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1775
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1661
1776
  var TASK_TYPES = ["bug", "feature", "chore"];
1662
1777
  var invalid3 = /* @__PURE__ */ __name((message) => {
1663
1778
  throw new CliError("validation_error", message);
1664
1779
  }, "invalid");
1665
- var text3 = /* @__PURE__ */ __name((value, limit) => {
1780
+ var findingText = /* @__PURE__ */ __name((value, limit) => {
1666
1781
  if (typeof value !== "string" || !value.trim() || value.includes("\0") || value.length > limit)
1667
1782
  return invalid3(`finding text must contain 1\u2013${limit} characters without NUL`);
1668
1783
  return value.trim();
1669
- }, "text");
1784
+ }, "findingText");
1670
1785
  var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update(JSON.stringify(value)).digest("hex"), "findingHash");
1671
- var fields = /* @__PURE__ */ __name((value, allowed, noun) => {
1672
- if (Object.keys(value).some((key) => !allowed.includes(key)))
1673
- invalid3(`unknown ${noun} field`);
1674
- }, "fields");
1786
+ var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
1787
+ var findingWhere = /* @__PURE__ */ __name((of) => {
1788
+ const id4 = typeof of.id === "string" ? of.id : null;
1789
+ const kind = typeof of.kind === "string" ? of.kind : null;
1790
+ return {
1791
+ where: id4 || kind ? ` in ${[id4, kind && `(${kind})`].filter(Boolean).join(" ")}` : "",
1792
+ named: { ...id4 ? { finding: id4 } : {}, ...kind ? { kind } : {} }
1793
+ };
1794
+ }, "findingWhere");
1795
+ var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
1796
+ const unknown2 = Object.keys(value).filter((key) => !allowed.includes(key));
1797
+ if (!unknown2.length)
1798
+ return;
1799
+ const fields = unknown2.map(snakeCase);
1800
+ const takes = allowed.map(snakeCase);
1801
+ const { where, named } = findingWhere(of);
1802
+ throw new CliError("validation_error", `unknown ${noun} field${fields.length > 1 ? "s" : ""} ${fields.join(", ")}${where}; it takes ${takes.join(", ")}`, { reason: "finding.unknown-field", fields, allowed: takes, ...named });
1803
+ }, "findingFields");
1804
+ var findingNeeds = /* @__PURE__ */ __name((value, needed, noun) => {
1805
+ const missing = needed.filter((key) => value[key] === void 0);
1806
+ if (!missing.length)
1807
+ return;
1808
+ const fields = missing.map(snakeCase);
1809
+ const needs = needed.map(snakeCase);
1810
+ const { where, named } = findingWhere(value);
1811
+ throw new CliError("validation_error", `missing ${noun} field${fields.length > 1 ? "s" : ""} ${fields.join(", ")}${where}; it needs ${needs.join(", ")}`, { reason: "finding.missing-field", fields, needs, ...named });
1812
+ }, "findingNeeds");
1675
1813
  var SUBJECT = /^(person|organization|project):[1-9]\d*$|^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/;
1676
1814
  var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
1677
1815
  if (!Array.isArray(raw) || raw.length < 1 || raw.length > 8)
@@ -1679,7 +1817,7 @@ var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
1679
1817
  const evidence = raw.map((item) => {
1680
1818
  if (!item || typeof item !== "object")
1681
1819
  return invalid3("finding evidence is a reference and fingerprint");
1682
- fields(item, ["reference", "fingerprint"], rules.singular);
1820
+ findingFields(item, ["reference", "fingerprint"], rules.singular);
1683
1821
  if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
1684
1822
  return invalid3("evidence requires a reference and fingerprint");
1685
1823
  const reference2 = rules.reference(item.reference);
@@ -1692,40 +1830,40 @@ var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
1692
1830
  return evidence;
1693
1831
  }, "validEvidence");
1694
1832
  var findingId = /* @__PURE__ */ __name((raw, ids2) => {
1695
- const id3 = findingText(raw, 64);
1696
- if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id3) || ids2.has(id3))
1833
+ const id4 = findingText(raw, 64);
1834
+ if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id4) || ids2.has(id4))
1697
1835
  return invalid3("finding IDs must be unique simple keys");
1698
- ids2.add(id3);
1699
- return id3;
1836
+ ids2.add(id4);
1837
+ return id4;
1700
1838
  }, "findingId");
1701
1839
  var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
1702
1840
  if (!finding || typeof finding !== "object")
1703
1841
  return invalid3("a finding is an object");
1704
- const id3 = findingId(finding.id, ids2);
1705
- const project = finding.project === void 0 && rules.anySubject ? void 0 : text3(finding.project, 64);
1706
- if (project !== void 0 && !/^project:[1-9]\d*$/.test(project))
1842
+ const id4 = findingId(finding.id, ids2);
1843
+ const project2 = finding.project === void 0 && rules.anySubject ? void 0 : findingText(finding.project, 64);
1844
+ if (project2 !== void 0 && !/^project:[1-9]\d*$/.test(project2))
1707
1845
  return invalid3("a finding names a project reference");
1708
- if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(text3(finding.subject, 80))))
1846
+ if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(findingText(finding.subject, 80))))
1709
1847
  return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
1710
- if (finding.kind === "task" && project === void 0 && !rules.inboxTasks)
1848
+ if (finding.kind === "task" && project2 === void 0 && !rules.inboxTasks)
1711
1849
  return invalid3("a task finding names the project the task goes in");
1712
1850
  const evidence = validEvidence(finding.evidence, rules);
1713
1851
  const base = {
1714
- id: id3,
1715
- ...project === void 0 ? {} : { project },
1852
+ id: id4,
1853
+ ...project2 === void 0 ? {} : { project: project2 },
1716
1854
  ...finding.subject === void 0 ? {} : { subject: finding.subject },
1717
1855
  evidence
1718
1856
  };
1719
1857
  if (finding.kind === "fact") {
1720
- fields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
1858
+ findingFields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
1721
1859
  if (finding.type === "payment")
1722
1860
  return invalid3("a payment is a finding of kind payment; money is a payments row, not a fact");
1723
1861
  if (!FACT_TYPES.includes(finding.type))
1724
1862
  return invalid3("unknown fact finding type");
1725
- return { ...base, kind: "fact", type: finding.type, statement: text3(finding.statement, 2e3) };
1863
+ return { ...base, kind: "fact", type: finding.type, statement: findingText(finding.statement, 2e3) };
1726
1864
  }
1727
1865
  if (finding.kind === "payment" && rules.payments) {
1728
- fields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
1866
+ findingFields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
1729
1867
  if (finding.supersedes !== void 0 && !/^invoice:[1-9]\d*$/.test(String(finding.supersedes)))
1730
1868
  return invalid3("a payment finding supersedes an invoice: reference, the expected payment it settles or voids");
1731
1869
  const payment = validatePayment(finding.payment);
@@ -1738,14 +1876,14 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
1738
1876
  return {
1739
1877
  ...base,
1740
1878
  kind: "payment",
1741
- ...finding.statement === void 0 ? {} : { statement: text3(finding.statement, 2e3) },
1879
+ ...finding.statement === void 0 ? {} : { statement: findingText(finding.statement, 2e3) },
1742
1880
  payment,
1743
1881
  ...finding.supersedes === void 0 ? {} : { supersedes: finding.supersedes }
1744
1882
  };
1745
1883
  }
1746
1884
  if (finding.kind !== "task")
1747
1885
  return invalid3(`a finding is a fact${rules.payments ? ", payment" : ""} or task`);
1748
- fields(finding, [
1886
+ findingFields(finding, [
1749
1887
  "id",
1750
1888
  "project",
1751
1889
  "evidence",
@@ -1763,48 +1901,51 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
1763
1901
  return invalid3("a task finding type is bug, chore or feature");
1764
1902
  if (!["explicit", "inferred"].includes(finding.commitment))
1765
1903
  return invalid3("task commitment must be explicit or inferred");
1766
- if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0) || finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
1767
- return invalid3("optional dates and assignees require their supporting evidence");
1904
+ if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0))
1905
+ 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>"]`);
1906
+ if (finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
1907
+ 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>"]`);
1768
1908
  if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
1769
1909
  return invalid3("an assignee must be a person reference");
1770
1910
  return {
1771
1911
  ...base,
1772
1912
  kind: "task",
1773
1913
  type: finding.type,
1774
- title: text3(finding.title, 300),
1775
- reason: text3(finding.reason, 2e3),
1914
+ title: findingText(finding.title, 300),
1915
+ reason: findingText(finding.reason, 2e3),
1776
1916
  commitment: finding.commitment,
1777
1917
  ...finding.dueAt === void 0 ? {} : {
1778
- dueAt: meetingTimestamp(finding.dueAt, "finding due date"),
1779
- dueEvidence: support(finding.dueEvidence, evidence)
1918
+ dueAt: meetingTimestamp(finding.dueAt, "a task's due_at"),
1919
+ dueEvidence: support(finding.dueEvidence, evidence, "due_evidence")
1780
1920
  },
1781
- ...finding.assignee === void 0 ? {} : { assignee: finding.assignee, assigneeEvidence: support(finding.assigneeEvidence, evidence) }
1921
+ ...finding.assignee === void 0 ? {} : {
1922
+ assignee: finding.assignee,
1923
+ assigneeEvidence: support(finding.assigneeEvidence, evidence, "assignee_evidence")
1924
+ }
1782
1925
  };
1783
1926
  }, "validateFinding");
1784
- var support = /* @__PURE__ */ __name((value, evidence) => {
1927
+ var support = /* @__PURE__ */ __name((value, evidence, field) => {
1785
1928
  if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
1786
- return invalid3("date and assignee support must cite the finding's evidence");
1929
+ return invalid3(`${field} lists 1\u20138 references this finding's evidence cites, as plain strings such as ["<reference>"], not evidence objects`);
1787
1930
  return [...new Set(value)].sort();
1788
1931
  }, "support");
1789
1932
  var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
1790
1933
  if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
1791
1934
  return invalid3(`${rules.plural} take at most 65536 UTF-8 bytes`);
1792
- fields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
1935
+ findingFields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
1793
1936
  if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > most)
1794
1937
  return invalid3(`schemaVersion 1 takes 1\u2013${most} ${rules.plural}`);
1795
- const key = text3(input.key, 64);
1938
+ const key = findingText(input.key, 64);
1796
1939
  if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
1797
1940
  return invalid3("a findings key uses letters, digits, dot, colon, underscore or hyphen");
1798
1941
  const ids2 = /* @__PURE__ */ new Set();
1799
1942
  const findings = input.findings.map((finding) => one(finding, ids2));
1800
- return { schemaVersion: 1, key, extractor: text3(input.extractor, 200), findings };
1943
+ return { schemaVersion: 1, key, extractor: findingText(input.extractor, 200), findings };
1801
1944
  }, "validateBatch");
1802
1945
  var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
1803
- var findingText = /* @__PURE__ */ __name((value, limit) => text3(value, limit), "findingText");
1804
- var findingFields = /* @__PURE__ */ __name((value, allowed, noun) => fields(value, allowed, noun), "findingFields");
1805
1946
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
1806
1947
 
1807
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1948
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1808
1949
  var MEETING_FINDINGS_KIND = "meeting_findings";
1809
1950
  var cue = /* @__PURE__ */ __name((raw) => {
1810
1951
  const reference2 = canonicalMeetingReference(raw);
@@ -1815,24 +1956,24 @@ var cue = /* @__PURE__ */ __name((raw) => {
1815
1956
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
1816
1957
  var meetingFindingFingerprint = findingFingerprint;
1817
1958
 
1818
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
1819
- var text4 = string();
1820
- var identifier = pipe(text4, minLength(1));
1821
- var nullableText = nullable(text4);
1959
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
1960
+ var text3 = string();
1961
+ var identifier = pipe(text3, minLength(1));
1962
+ var nullableText = nullable(text3);
1822
1963
  var count3 = pipe(number(), integer(), minValue(0));
1823
1964
  var flag = boolean();
1824
- var scope = strictObject({ provider: text4, account: text4 });
1965
+ var scope = strictObject({ provider: text3, account: text3 });
1825
1966
  var run = strictObject({
1826
1967
  meetings: count3,
1827
1968
  participants: count3,
1828
1969
  transcript_rows: count3,
1829
1970
  summaries: count3,
1830
- warnings: array(strictObject({ external_id: text4, message: text4 })),
1831
- timezone: optional(text4)
1971
+ warnings: array(strictObject({ external_id: text3, message: text3 })),
1972
+ timezone: optional(text3)
1832
1973
  });
1833
1974
  var exported = union([
1834
- strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text4, content: text4 }),
1835
- strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text4 })
1975
+ strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text3, content: text3 }),
1976
+ strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text3 })
1836
1977
  ]);
1837
1978
  var eventChange = strictObject({
1838
1979
  action: literal("event.link"),
@@ -1842,7 +1983,7 @@ var eventChange = strictObject({
1842
1983
  var personChange = strictObject({
1843
1984
  action: literal("person.link"),
1844
1985
  participant_id: identifier,
1845
- person_uid: text4,
1986
+ person_uid: text3,
1846
1987
  expected_person_uid: optional(nullableText),
1847
1988
  target_account_ids: optional(array(identifier))
1848
1989
  });
@@ -1855,7 +1996,7 @@ var eventResult = strictObject({
1855
1996
  var personResult = strictObject({
1856
1997
  meeting_id: identifier,
1857
1998
  participant_id: identifier,
1858
- person_uid: text4,
1999
+ person_uid: text3,
1859
2000
  previous_person_uid: nullableText,
1860
2001
  changed: flag
1861
2002
  });
@@ -1868,23 +2009,23 @@ var meetingChange = strictObject({
1868
2009
  result: optional(union([eventResult, personResult]))
1869
2010
  });
1870
2011
  var recognition = strictObject({
1871
- engine: text4,
1872
- model: text4,
1873
- version: optional(text4),
2012
+ engine: text3,
2013
+ model: text3,
2014
+ version: optional(text3),
1874
2015
  timing: optional(picklist(["fixed-windows", "recognition-segments"]))
1875
2016
  });
1876
2017
  var transcription = union([
1877
2018
  strictObject({
1878
2019
  applied: literal(false),
1879
2020
  account_id: identifier,
1880
- external_id: text4,
2021
+ external_id: text3,
1881
2022
  segments: count3,
1882
2023
  media: strictObject({
1883
- id: text4,
1884
- content_hash: text4,
2024
+ id: text3,
2025
+ content_hash: text3,
1885
2026
  size: count3,
1886
2027
  duration_ms: count3,
1887
- format: text4,
2028
+ format: text3,
1888
2029
  sample_rate: count3,
1889
2030
  channels: count3,
1890
2031
  recognition
@@ -1893,21 +2034,21 @@ var transcription = union([
1893
2034
  strictObject({
1894
2035
  applied: literal(true),
1895
2036
  account_id: identifier,
1896
- external_id: text4,
2037
+ external_id: text3,
1897
2038
  meeting_id: identifier,
1898
2039
  created: flag,
1899
2040
  inserted_transcripts: count3,
1900
2041
  replayed_transcripts: count3,
1901
2042
  superseded_transcripts: count3,
1902
2043
  segments: count3,
1903
- media_sha256: text4,
1904
- engine: text4,
1905
- model: text4,
2044
+ media_sha256: text3,
2045
+ engine: text3,
2046
+ model: text3,
1906
2047
  model_version: nullableText,
1907
2048
  timing: picklist(["fixed-windows", "recognition-segments"])
1908
2049
  })
1909
2050
  ]);
1910
- var embeddingModel = strictObject({ key: text4, dims: count3, kind: picklist(["local", "remote"]), model: text4 });
2051
+ var embeddingModel = strictObject({ key: text3, dims: count3, kind: picklist(["local", "remote"]), model: text3 });
1911
2052
  var embedding = union([
1912
2053
  strictObject({
1913
2054
  account_id: identifier,
@@ -1923,7 +2064,7 @@ var embedding = union([
1923
2064
  saved: count3,
1924
2065
  skipped: count3,
1925
2066
  has_more: flag,
1926
- next_hash: optional(text4),
2067
+ next_hash: optional(text3),
1927
2068
  applied: literal(true),
1928
2069
  rebuild: strictObject({
1929
2070
  transcripts: count3,
@@ -1948,7 +2089,7 @@ var MEETING_RESULT_ENTITIES = {
1948
2089
  meeting_repair: repair
1949
2090
  };
1950
2091
 
1951
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
2092
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1952
2093
  var EVENT_QUERY = defineQuery({
1953
2094
  entity: "event",
1954
2095
  backend: "sql",
@@ -1964,7 +2105,7 @@ var EVENT_QUERY = defineQuery({
1964
2105
  ]
1965
2106
  });
1966
2107
 
1967
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/events.js
2108
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/events.js
1968
2109
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
1969
2110
  const current = await store.meeting(details.meeting.id);
1970
2111
  if (!current)
@@ -1979,7 +2120,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
1979
2120
  endsAt: meeting2.endedAt ?? meeting2.startedAt
1980
2121
  });
1981
2122
  if (candidates.length > 1) {
1982
- await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id3 }) => id3), now);
2123
+ await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id4 }) => id4), now);
1983
2124
  return null;
1984
2125
  }
1985
2126
  let event2 = candidates[0];
@@ -2007,7 +2148,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
2007
2148
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
2008
2149
  }, "linkEvent");
2009
2150
 
2010
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
2151
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
2011
2152
  var context = {
2012
2153
  command: "search meetings",
2013
2154
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -2068,9 +2209,10 @@ var MEETING_FIELDS = defineQuery({
2068
2209
  }))
2069
2210
  ]
2070
2211
  });
2212
+ var MEETING_FIELD_NAMES = new Set(MEETING_FIELDS.fields.map(({ name }) => name));
2071
2213
  var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
2072
2214
 
2073
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/language.js
2215
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/language.js
2074
2216
  var LATIN_WORDS = {
2075
2217
  en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
2076
2218
  es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
@@ -2119,7 +2261,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
2119
2261
  return null;
2120
2262
  }, "transcriptLanguage");
2121
2263
 
2122
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
2264
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
2123
2265
  var contentHash = /* @__PURE__ */ __name(async (text6) => {
2124
2266
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
2125
2267
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -2150,13 +2292,13 @@ var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source,
2150
2292
  }))
2151
2293
  }), "transcriptInput");
2152
2294
  var timestamp2 = /* @__PURE__ */ __name((value) => {
2153
- const time = Date.parse(value);
2154
- if (!Number.isFinite(time))
2295
+ const time2 = Date.parse(value);
2296
+ if (!Number.isFinite(time2))
2155
2297
  throw new Error("Invalid meeting timestamp");
2156
- return time;
2298
+ return time2;
2157
2299
  }, "timestamp");
2158
2300
 
2159
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2301
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2160
2302
  var TranscriptTextError = class extends Error {
2161
2303
  static {
2162
2304
  __name(this, "TranscriptTextError");
@@ -2211,7 +2353,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
2211
2353
  return { header, lines };
2212
2354
  }, "parseTranscriptText");
2213
2355
 
2214
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2356
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2215
2357
  var VttError = class extends Error {
2216
2358
  static {
2217
2359
  __name(this, "VttError");
@@ -2263,7 +2405,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
2263
2405
  return cues;
2264
2406
  }, "parseVtt");
2265
2407
 
2266
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/import.js
2408
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/import.js
2267
2409
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
2268
2410
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
2269
2411
  for (const file of files) {
@@ -2296,10 +2438,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
2296
2438
  return report;
2297
2439
  }, "importFiles");
2298
2440
 
2299
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/links.js
2441
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/links.js
2300
2442
  var CHAT_MESSAGES_READ = 1e5;
2301
2443
 
2302
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2444
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2303
2445
  var nonempty = /* @__PURE__ */ __name((value, name) => {
2304
2446
  if (typeof value !== "string" || !value.trim())
2305
2447
  throw new CliError("validation_error", `${name} must be nonempty`);
@@ -2350,7 +2492,7 @@ var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
2350
2492
  return Object.freeze(result);
2351
2493
  }, "validateMeetingChange");
2352
2494
 
2353
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/passage.js
2495
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/passage.js
2354
2496
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
2355
2497
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
2356
2498
  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)))
@@ -2363,7 +2505,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
2363
2505
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
2364
2506
  }, "validateMeetingPassage");
2365
2507
 
2366
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2508
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2367
2509
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2368
2510
  if (!original || typeof original !== "object" || Array.isArray(original))
2369
2511
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -2388,7 +2530,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2388
2530
  return { ...input, limit, maxReadBytes };
2389
2531
  }, "validateMeetingPreparationContext");
2390
2532
 
2391
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2533
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2392
2534
  var count4 = pipe(number(), integer(), minValue(0));
2393
2535
  var id = pipe(string(), minLength(1));
2394
2536
  var meetingProjectEvidence = strictObject({
@@ -2509,7 +2651,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
2509
2651
  };
2510
2652
  }, "meetingProjectEvidenceAnswer");
2511
2653
 
2512
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2654
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2513
2655
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2514
2656
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
2515
2657
  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) || [
@@ -2529,7 +2671,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2529
2671
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
2530
2672
  }, "validateMeetingHitSearch");
2531
2673
 
2532
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2674
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2533
2675
  var ids = {
2534
2676
  meeting_id: "meetingId",
2535
2677
  identity_id: "participantIdentityId",
@@ -2565,8 +2707,8 @@ var MEETING_PROJECT_EVIDENCE_QUERY = defineQuery({
2565
2707
  ]
2566
2708
  });
2567
2709
  var requestKeys = /* @__PURE__ */ new Set(["query", "limit", "cursor", "maxReadBytes", "signal"]);
2568
- var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {}, now = Date.now()) => {
2569
- 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")
2710
+ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project2, request = {}, now = Date.now()) => {
2711
+ 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")
2570
2712
  throw new CliError("validation_error", "expected an existing project and bounded evidence arguments");
2571
2713
  if (request.query !== void 0 && new TextEncoder().encode(request.query).byteLength > 8192 || [request.limit, request.maxReadBytes].some((value) => value !== void 0 && typeof value !== "number"))
2572
2714
  throw new CliError("validation_error", "invalid project evidence query or budget");
@@ -2614,26 +2756,26 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
2614
2756
  options.until = range.upper - (range.upper_inclusive ? 0 : 1);
2615
2757
  frozen.push(`started_at:[${options.since === void 0 ? "*" : `"${new Date(options.since).toISOString()}"`} TO ${options.until === void 0 ? "*" : `"${new Date(options.until).toISOString()}"`}]`);
2616
2758
  }
2617
- validateMeetingHitSearch(project, options);
2759
+ validateMeetingHitSearch(project2, options);
2618
2760
  if (options.cursor !== void 0 && (typeof options.cursor !== "string" || !/^[A-Za-z0-9_-]{1,4096}$/.test(options.cursor)))
2619
2761
  throw new CliError("validation_error", "invalid project evidence cursor");
2620
- return { project: project.trim(), options, query: frozen.join(" AND ") };
2762
+ return { project: project2.trim(), options, query: frozen.join(" AND ") };
2621
2763
  }, "prepareMeetingProjectEvidence");
2622
2764
 
2623
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2624
- var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
2625
- const prepared = prepareMeetingProjectEvidence(project, request, now);
2765
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2766
+ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, request = {}, now = Date.now()) => {
2767
+ const prepared = prepareMeetingProjectEvidence(project2, request, now);
2626
2768
  const page = await read(prepared.project, prepared.options);
2627
2769
  prepared.options.signal?.throwIfAborted();
2628
2770
  return meetingProjectEvidenceAnswer(page, prepared);
2629
2771
  }, "readMeetingProjectEvidence");
2630
2772
 
2631
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2773
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2632
2774
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
2633
- const { identityExternalId, ...fields2 } = p;
2775
+ const { identityExternalId, ...fields } = p;
2634
2776
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
2635
2777
  return {
2636
- ...fields2,
2778
+ ...fields,
2637
2779
  identity: {
2638
2780
  provider,
2639
2781
  externalId,
@@ -2643,32 +2785,55 @@ var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, posit
2643
2785
  }
2644
2786
  };
2645
2787
  }, "participantInput");
2788
+ var startOf = /* @__PURE__ */ __name((m) => {
2789
+ const at = Date.parse(m.occurrence.startedAt);
2790
+ return Number.isFinite(at) ? at : Number.POSITIVE_INFINITY;
2791
+ }, "startOf");
2646
2792
  var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2647
2793
  const now = options.now ?? Date.now();
2648
- const lookbackMs = options.lookbackMs ?? 0;
2649
- if (!Number.isSafeInteger(lookbackMs) || lookbackMs < 0 || lookbackMs > 31 * 864e5)
2650
- throw new Error("lookbackMs must be an integer from 0 through 31 days");
2651
- const since = options.since ?? await store.cursor(options.accountId) ?? new Date(now - 30 * 864e5).toISOString();
2794
+ for (const [name, ms] of [
2795
+ ["lookbackMs", options.lookbackMs ?? 0],
2796
+ ["overlapMs", source.overlapMs ?? 0]
2797
+ ])
2798
+ if (!Number.isSafeInteger(ms) || ms < 0 || ms > 31 * 864e5)
2799
+ throw new Error(`${name} must be an integer from 0 through 31 days`);
2800
+ const lookbackMs = Math.max(options.lookbackMs ?? 0, source.overlapMs ?? 0);
2801
+ const cursor = options.rescan ? void 0 : await store.cursor(options.accountId);
2802
+ const since = options.since ?? cursor ?? new Date(now - 30 * 864e5).toISOString();
2652
2803
  timestamp2(since);
2653
2804
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
2654
2805
  let failed = false;
2806
+ let firstFailed;
2655
2807
  const from = timestamp2(since) - lookbackMs;
2656
- const meetings = await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString());
2657
- for (const m of meetings) {
2658
- const id3 = m.occurrence.id;
2808
+ const meetings = (await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString())).toSorted((a, b) => startOf(a) - startOf(b));
2809
+ for (const [index, m] of meetings.entries()) {
2810
+ const stop = options.budget?.take() ?? null;
2811
+ if (stop) {
2812
+ report.stopped = stop;
2813
+ report.remaining = meetings.length - index;
2814
+ const reached = Math.min(startOf(m), firstFailed ?? Number.POSITIVE_INFINITY);
2815
+ if (Number.isFinite(reached) && reached > timestamp2(since))
2816
+ await store.setCursor(options.accountId, new Date(reached).toISOString(), now);
2817
+ return report;
2818
+ }
2819
+ const id4 = m.occurrence.id;
2820
+ const failedHere = /* @__PURE__ */ __name(() => {
2821
+ failed = true;
2822
+ firstFailed ??= startOf(m);
2823
+ }, "failedHere");
2659
2824
  const read = /* @__PURE__ */ __name(async (part, call) => {
2660
2825
  try {
2661
2826
  return await call();
2662
2827
  } catch (error) {
2663
- failed = true;
2828
+ failedHere();
2664
2829
  const message = error instanceof Error ? error.message : "could not be read";
2665
- report.warnings.push({ externalId: id3, message: `${part}: ${message}` });
2830
+ report.warnings.push({ externalId: id4, message: `${part}: ${message}` });
2666
2831
  return void 0;
2667
2832
  }
2668
2833
  }, "read");
2669
2834
  try {
2670
- const sourceParticipants = await read("participants", () => source.participants(id3));
2671
- const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider, id3, i, options.accountId));
2835
+ const sourceParticipants = await read("participants", () => source.participants(id4));
2836
+ const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider, id4, i, options.accountId));
2672
2837
  const names = /* @__PURE__ */ new Map();
2673
2838
  for (const p of participants)
2674
2839
  if (p.displayName !== null) {
@@ -2677,18 +2842,18 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2677
2842
  names.set(p.displayName, identities);
2678
2843
  }
2679
2844
  if ([...names.values()].some((ids2) => ids2.size > 1))
2680
- report.warnings.push({ externalId: id3, message: "Participant names are ambiguous" });
2681
- const lines = await read("transcript", () => source.transcript(id3));
2682
- const chat = await read("chat", () => source.chat(id3));
2683
- const summary = await read("summary", () => source.summary(id3));
2684
- const attachments = await read("files", () => source.files(id3));
2845
+ report.warnings.push({ externalId: id4, message: "Participant names are ambiguous" });
2846
+ const lines = await read("transcript", () => source.transcript(id4));
2847
+ const chat = await read("chat", () => source.chat(id4));
2848
+ const summary = await read("summary", () => source.summary(id4));
2849
+ const attachments = await read("files", () => source.files(id4));
2685
2850
  const startedAt = timestamp2(m.occurrence.startedAt);
2686
2851
  const endedAt = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
2687
2852
  if (endedAt !== null && endedAt < startedAt)
2688
2853
  throw new Error("Meeting ends before it starts");
2689
2854
  const meeting2 = {
2690
2855
  accountId: options.accountId,
2691
- externalId: id3,
2856
+ externalId: id4,
2692
2857
  title: m.occurrence.title,
2693
2858
  description: m.description ?? null,
2694
2859
  location: m.location ?? null,
@@ -2758,8 +2923,8 @@ unlinked`, format)],
2758
2923
  report.transcriptRows += lines?.length ?? 0;
2759
2924
  report.summaries += summary ? 1 : 0;
2760
2925
  } catch (error) {
2761
- failed = true;
2762
- report.warnings.push({ externalId: id3, message: error instanceof Error ? error.message : "Meeting pull failed" });
2926
+ failedHere();
2927
+ report.warnings.push({ externalId: id4, message: error instanceof Error ? error.message : "Meeting pull failed" });
2763
2928
  }
2764
2929
  }
2765
2930
  if (!failed)
@@ -2767,47 +2932,47 @@ unlinked`, format)],
2767
2932
  return report;
2768
2933
  }, "pull");
2769
2934
 
2770
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2771
- var text5 = string();
2935
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2936
+ var text4 = string();
2772
2937
  var count5 = pipe(number(), integer(), minValue(0));
2773
2938
  var id2 = pipe(number(), integer(), minValue(1));
2774
2939
  var iso3 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
2775
2940
  var meetingReview = strictObject({
2776
2941
  ref: reference,
2777
2942
  id: pipe(string(), minLength(1)),
2778
- title: nullable(text5),
2943
+ title: nullable(text4),
2779
2944
  started_at: nullable(isoTime),
2780
2945
  duration_ms: nullable(count5),
2781
2946
  participants_count: nullable(count5),
2782
- projects: array(text5),
2947
+ projects: array(text4),
2783
2948
  /** Null when the meeting has no current transcript. */
2784
2949
  transcript: nullable(strictObject({ lines: count5, words: count5 })),
2785
2950
  /** The three who talked longest. */
2786
- speakers: array(strictObject({ name: nullable(text5), talk_ms: count5 })),
2951
+ speakers: array(strictObject({ name: nullable(text4), talk_ms: count5 })),
2787
2952
  /** The newest stored summary; null when there is none. */
2788
2953
  summary: nullable(strictObject({
2789
- source: text5,
2790
- title: nullable(text5),
2791
- overview: nullable(text5),
2792
- next_steps: array(text5),
2793
- url: nullable(text5)
2954
+ source: text4,
2955
+ title: nullable(text4),
2956
+ overview: nullable(text4),
2957
+ next_steps: array(text4),
2958
+ url: nullable(text4)
2794
2959
  }))
2795
2960
  });
2796
2961
  var meetingLink = strictObject({
2797
- url: text5,
2798
- domain: nullable(text5),
2962
+ url: text4,
2963
+ domain: nullable(text4),
2799
2964
  /** The Google Docs, Sheets, Slides, Forms or Drive file it names. */
2800
- document_id: nullable(text5),
2965
+ document_id: nullable(text4),
2801
2966
  count: count5,
2802
2967
  first_at: isoTime,
2803
2968
  last_at: isoTime,
2804
- senders: array(text5),
2805
- meetings: array(strictObject({ ref: reference, title: nullable(text5) }))
2969
+ senders: array(text4),
2970
+ meetings: array(strictObject({ ref: reference, title: nullable(text4) }))
2806
2971
  });
2807
2972
  var meetingSpeaker = strictObject({
2808
2973
  /** `person:<id>`, `identity:<id>`, `name:<lowercased name>` or `unknown`. */
2809
- key: text5,
2810
- name: nullable(text5),
2974
+ key: text4,
2975
+ name: nullable(text4),
2811
2976
  person_id: nullable(id2),
2812
2977
  identity_id: nullable(id2),
2813
2978
  meetings: count5,
@@ -2818,18 +2983,18 @@ var meetingSpeaker = strictObject({
2818
2983
  share: pipe(number(), minValue(0), maxValue(1))
2819
2984
  });
2820
2985
  var meetingStats = strictObject({
2821
- time_zone: text5,
2986
+ time_zone: text4,
2822
2987
  meetings: count5,
2823
2988
  lines: count5,
2824
2989
  words: count5,
2825
2990
  talk_ms: count5,
2826
2991
  /** `week_start` is the Monday, as a date in `time_zone`. */
2827
- weeks: array(strictObject({ week_start: text5, meetings: count5, talk_ms: count5 })),
2992
+ weeks: array(strictObject({ week_start: text4, meetings: count5, talk_ms: count5 })),
2828
2993
  top_speakers: array(meetingSpeaker)
2829
2994
  });
2830
2995
  var meetingCountsRow = strictObject({
2831
- key: text5,
2832
- name: nullable(text5),
2996
+ key: text4,
2997
+ name: nullable(text4),
2833
2998
  meetings: count5,
2834
2999
  minutes: count5,
2835
3000
  mean_minutes: nullable(number()),
@@ -2849,13 +3014,13 @@ var meetingParticipants = strictObject({
2849
3014
  schema_version: literal(1),
2850
3015
  kind: literal("meeting_participants"),
2851
3016
  account_id: id2,
2852
- query: text5,
3017
+ query: text4,
2853
3018
  items: array(strictObject({
2854
3019
  participant_id: id2,
2855
3020
  meeting_id: id2,
2856
3021
  identity_id: id2,
2857
- display_name: nullable(text5),
2858
- email: nullable(text5)
3022
+ display_name: nullable(text4),
3023
+ email: nullable(text4)
2859
3024
  })),
2860
3025
  /** Several identities on one page are observations, never speaker attribution or person links. */
2861
3026
  ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(id2) }),
@@ -2869,7 +3034,7 @@ var meetingParticipants = strictObject({
2869
3034
  mode: literal("cursor"),
2870
3035
  limit: count5,
2871
3036
  has_more: boolean(),
2872
- next_cursor: optional(text5)
3037
+ next_cursor: optional(text4)
2873
3038
  })
2874
3039
  });
2875
3040
  var revision = picklist(["current", "superseded"]);
@@ -2878,8 +3043,8 @@ var meetingPassage = strictObject({
2878
3043
  kind: literal("meeting_context"),
2879
3044
  source: reference,
2880
3045
  target_ref: reference,
2881
- target_fingerprint: text5,
2882
- fingerprint: text5,
3046
+ target_fingerprint: text4,
3047
+ fingerprint: text4,
2883
3048
  revision,
2884
3049
  limits: strictObject({ before: count5, after: count5, bytes: count5, max_read_bytes: count5 }),
2885
3050
  content_bytes: count5,
@@ -2898,30 +3063,30 @@ var meetingPassage = strictObject({
2898
3063
  }),
2899
3064
  items: array(strictObject({
2900
3065
  ref: reference,
2901
- fingerprint: text5,
3066
+ fingerprint: text4,
2902
3067
  transcript_id: id2,
2903
- content_hash: nullable(text5),
3068
+ content_hash: nullable(text4),
2904
3069
  position: count5,
2905
3070
  start_ms: count5,
2906
3071
  end_ms: count5,
2907
3072
  speaker_participant_id: nullable(id2),
2908
- speaker_name: nullable(text5),
2909
- text: text5,
3073
+ speaker_name: nullable(text4),
3074
+ text: text4,
2910
3075
  revision
2911
3076
  }))
2912
3077
  });
2913
3078
  var event = strictObject({
2914
3079
  id: pipe(string(), minLength(1)),
2915
- event_series_id: nullable(text5),
2916
- title: nullable(text5),
2917
- description: nullable(text5),
2918
- location: nullable(text5),
3080
+ event_series_id: nullable(text4),
3081
+ title: nullable(text4),
3082
+ description: nullable(text4),
3083
+ location: nullable(text4),
2919
3084
  starts_at: nullable(isoTime),
2920
3085
  ends_at: nullable(isoTime),
2921
- timezone: nullable(text5),
3086
+ timezone: nullable(text4),
2922
3087
  /** `auto`: made from a meeting; `owner`: made by hand; `calendar`: from a calendar's entries. */
2923
3088
  origin: picklist(["auto", "owner", "calendar"]),
2924
- status: nullable(text5),
3089
+ status: nullable(text4),
2925
3090
  all_day: boolean(),
2926
3091
  /** When its calendar deleted it: shown as "deleted in Google", kept as history. */
2927
3092
  source_deleted_at: nullable(isoTime),
@@ -2929,7 +3094,7 @@ var event = strictObject({
2929
3094
  created_at: isoTime,
2930
3095
  updated_at: isoTime,
2931
3096
  /** The fields whoever sent the invitation wrote, on a calendar CLI's `events list`: an agent reads them as data. */
2932
- untrusted: optional(array(text5)),
3097
+ untrusted: optional(array(text4)),
2933
3098
  /** On a calendar CLI's `events list changed:<date>`: what changed since then, and when the store saw it. */
2934
3099
  change: optional(picklist(["new", "moved", "cancelled"])),
2935
3100
  changed_at: optional(nullable(isoTime)),
@@ -2941,7 +3106,7 @@ var event = strictObject({
2941
3106
  */
2942
3107
  overlapping: optional(boolean()),
2943
3108
  /** With `overlapping:true`: the events it overlaps, as `event:<id>`. */
2944
- overlaps: optional(array(text5))
3109
+ overlaps: optional(array(text4))
2945
3110
  });
2946
3111
  var eventItem = /* @__PURE__ */ __name((one) => ({
2947
3112
  id: String(one.id),
@@ -2961,10 +3126,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
2961
3126
  updated_at: new Date(one.updatedAt).toISOString()
2962
3127
  }), "eventItem");
2963
3128
 
2964
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
3129
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2965
3130
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
2966
3131
 
2967
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
3132
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2968
3133
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2969
3134
  if (!original || typeof original !== "object" || Array.isArray(original))
2970
3135
  throw new CliError("validation_error", "related history request is required");
@@ -2975,7 +3140,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2975
3140
  const positive = /* @__PURE__ */ __name((value) => Number.isSafeInteger(value) && value > 0, "positive");
2976
3141
  if (!positive(input.accountId) || !positive(input.seriesId))
2977
3142
  throw new CliError("validation_error", "accountId and seriesId must be positive safe integers");
2978
- if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((id3) => !positive(id3)))
3143
+ if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((id4) => !positive(id4)))
2979
3144
  throw new CliError("validation_error", "anchorIds must contain at most 20 positive safe integers");
2980
3145
  for (const key of ["after", "before"])
2981
3146
  if (!Number.isSafeInteger(input[key]) || Math.abs(input[key]) > 864e13)
@@ -2994,14 +3159,14 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2994
3159
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
2995
3160
  }, "validateMeetingRelatedHistory");
2996
3161
 
2997
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/review.js
3162
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/review.js
2998
3163
  var REVIEW_LIMIT = { default: 50, most: 200 };
2999
3164
 
3000
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3165
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3001
3166
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
3002
3167
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
3003
3168
 
3004
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3169
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3005
3170
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3006
3171
  input.signal?.throwIfAborted();
3007
3172
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -3022,19 +3187,19 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3022
3187
  return { ...input, limit, maxReadBytes };
3023
3188
  }, "validateMeetingSeriesHistory");
3024
3189
 
3025
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3190
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3026
3191
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
3027
3192
 
3028
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3193
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3029
3194
  function invalid4(field, response = false) {
3030
3195
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
3031
3196
  }
3032
3197
  __name(invalid4, "invalid");
3033
- var object2 = /* @__PURE__ */ __name((value, fields2, field, response = false) => {
3198
+ var object2 = /* @__PURE__ */ __name((value, fields, field, response = false) => {
3034
3199
  if (!value || typeof value !== "object" || Array.isArray(value))
3035
3200
  invalid4(field, response);
3036
3201
  for (const key of Object.keys(value))
3037
- if (!fields2.includes(key))
3202
+ if (!fields.includes(key))
3038
3203
  invalid4(`${field}.${key}`, response);
3039
3204
  }, "object");
3040
3205
  var cursorDetails = /* @__PURE__ */ __name((value) => {
@@ -3054,7 +3219,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
3054
3219
  cursorDetails(value);
3055
3220
  }, "validateMeetingSeriesInventoryCursor");
3056
3221
 
3057
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/meetings/stats.js
3222
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/meetings/stats.js
3058
3223
  var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
3059
3224
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
3060
3225
  const zone = timeZone ?? "UTC";
@@ -3118,8 +3283,8 @@ var aggregateMeetingCounts = /* @__PURE__ */ __name((meetings, by, timeZone, lim
3118
3283
  const kept = ordered.slice(0, limit);
3119
3284
  if (by !== "series")
3120
3285
  kept.reverse();
3121
- const counted = /* @__PURE__ */ __name(({ meetings: count6, ms, timed, transcripts }) => ({
3122
- meetings: count6,
3286
+ const counted = /* @__PURE__ */ __name(({ meetings: count7, ms, timed, transcripts }) => ({
3287
+ meetings: count7,
3123
3288
  minutes: minutesOf(ms),
3124
3289
  meanMinutes: meanOf(ms, timed),
3125
3290
  transcripts
@@ -3189,7 +3354,225 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
3189
3354
  };
3190
3355
  }, "aggregateMeetingStats");
3191
3356
 
3192
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/domain/tags.js
3357
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/money.js
3358
+ var CURRENCY_SCALES = {
3359
+ AED: 2,
3360
+ AMD: 2,
3361
+ AUD: 2,
3362
+ BHD: 3,
3363
+ BYN: 2,
3364
+ CAD: 2,
3365
+ CHF: 2,
3366
+ CLP: 0,
3367
+ CNY: 2,
3368
+ CZK: 2,
3369
+ DKK: 2,
3370
+ EUR: 2,
3371
+ GBP: 2,
3372
+ GEL: 2,
3373
+ HUF: 2,
3374
+ ILS: 2,
3375
+ INR: 2,
3376
+ ISK: 0,
3377
+ JPY: 0,
3378
+ KGS: 2,
3379
+ KRW: 0,
3380
+ KWD: 3,
3381
+ KZT: 2,
3382
+ NOK: 2,
3383
+ PLN: 2,
3384
+ RSD: 2,
3385
+ RUB: 2,
3386
+ SEK: 2,
3387
+ THB: 2,
3388
+ TRY: 2,
3389
+ UAH: 2,
3390
+ USD: 2,
3391
+ UZS: 2,
3392
+ VND: 0
3393
+ };
3394
+ var refuse = /* @__PURE__ */ __name((message, reason) => {
3395
+ throw new CliError("validation_error", message, { reason });
3396
+ }, "refuse");
3397
+ var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
3398
+ var parseDecimal = /* @__PURE__ */ __name((text6, scale) => {
3399
+ const match = DECIMAL.exec(text6.trim());
3400
+ if (!match || (match[2] ?? "").length > scale)
3401
+ return void 0;
3402
+ return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
3403
+ }, "parseDecimal");
3404
+ var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
3405
+ const value = BigInt(units);
3406
+ if (value < 0n)
3407
+ return `-${formatDecimal(-value, scale)}`;
3408
+ const digits = value.toString().padStart(scale + 1, "0");
3409
+ return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
3410
+ }, "formatDecimal");
3411
+ var groupDigits = /* @__PURE__ */ __name((decimal) => {
3412
+ const [whole = "0", fraction] = decimal.split(".");
3413
+ const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
3414
+ return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
3415
+ }, "groupDigits");
3416
+ var currencyOf = /* @__PURE__ */ __name((text6) => {
3417
+ const code = typeof text6 === "string" ? text6.trim().toUpperCase() : "";
3418
+ if (CURRENCY_SCALES[code] === void 0)
3419
+ return refuse(`${typeof text6 === "string" && text6.trim() ? text6.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
3420
+ return code;
3421
+ }, "currencyOf");
3422
+ var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
3423
+ var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
3424
+ const scale = scaleOf(currency);
3425
+ const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
3426
+ if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
3427
+ 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");
3428
+ return Number(units);
3429
+ }, "minorUnits");
3430
+ var signedMinorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
3431
+ if (typeof amount !== "string" || !amount.trim().startsWith("-"))
3432
+ return minorUnits(amount, currency, what);
3433
+ const units = minorUnits(amount.trim().slice(1), currency, what);
3434
+ return units === 0 ? 0 : -units;
3435
+ }, "signedMinorUnits");
3436
+ var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
3437
+ amount: formatDecimal(units, scaleOf(currency)),
3438
+ currency
3439
+ }), "moneyOf");
3440
+ var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
3441
+ var QUANTITY_SCALE = 3;
3442
+ var quantityOf = /* @__PURE__ */ __name((text6) => {
3443
+ const thousandths = typeof text6 === "string" ? parseDecimal(text6, QUANTITY_SCALE) : void 0;
3444
+ if (thousandths === void 0 || thousandths === 0n)
3445
+ return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
3446
+ const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
3447
+ return { text: plain, thousandths };
3448
+ }, "quantityOf");
3449
+ var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
3450
+
3451
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/finance.js
3452
+ var INVOICE_DIRECTIONS = ["receivable", "payable"];
3453
+ var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
3454
+ var MONEY_DIRECTIONS = ["in", "out"];
3455
+ var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
3456
+ var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
3457
+ if (current === "draft" || current === "void")
3458
+ return current;
3459
+ if (paid <= 0)
3460
+ return "issued";
3461
+ return paid < total ? "partly_paid" : "paid";
3462
+ }, "settledStatus");
3463
+ var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
3464
+ var notes = /* @__PURE__ */ __name((...words2) => {
3465
+ const kept = words2.filter((word) => word !== null);
3466
+ return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
3467
+ }, "notes");
3468
+ var invoiceLine = /* @__PURE__ */ __name((invoice) => {
3469
+ const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
3470
+ const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
3471
+ return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
3472
+ }, "invoiceLine");
3473
+ var paymentLine = /* @__PURE__ */ __name((payment) => {
3474
+ const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
3475
+ return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
3476
+ }, "paymentLine");
3477
+ var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
3478
+ var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
3479
+
3480
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/deals.js
3481
+ var DEAL_KINDS = ["deal", "lead"];
3482
+ var DEAL_STATUSES = ["open", "won", "lost"];
3483
+ var STAGE_OUTCOMES = DEAL_STATUSES;
3484
+ var DEAL_ROLES = ["owner", "contact", "decision-maker", "influencer"];
3485
+ var dealLine = /* @__PURE__ */ __name((deal) => {
3486
+ const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
3487
+ return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
3488
+ }, "dealLine");
3489
+
3490
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/orders.js
3491
+ var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
3492
+ var ORDER_PURPOSES = ["personal", "business", "client", "other"];
3493
+ var orderLine = /* @__PURE__ */ __name((order) => {
3494
+ const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
3495
+ const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
3496
+ return `${order.number ?? `#${order.id}`} \xB7 ${order.supplierName}${money} (${notes2})`;
3497
+ }, "orderLine");
3498
+ var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
3499
+
3500
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/relations.js
3501
+ var ORGANIZATION_ROLES = [
3502
+ "employee",
3503
+ "contractor",
3504
+ "founder",
3505
+ "owner",
3506
+ "manager",
3507
+ "adviser",
3508
+ "contact"
3509
+ ];
3510
+ var PROJECT_ROLES = ["owner", "manager", "contributor", "client-contact", "approver"];
3511
+ var RELATIONS = {
3512
+ "member-of": {
3513
+ from: ["person", "organization", "project", "chat", "email_thread"],
3514
+ to: ["organization", "project"],
3515
+ roles: { to: { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES } }
3516
+ },
3517
+ "reports-to": { from: ["person"], to: ["person"], inverse: "manages" },
3518
+ "customer-of": { from: ["person", "organization"], to: ["organization"], inverse: "supplier of" },
3519
+ "partner-of": { from: ["organization"], to: ["organization"], symmetric: true },
3520
+ "related-to": {
3521
+ from: ["person", "organization", "project", "task", "deal", "lead"],
3522
+ to: ["person", "organization", "project", "task"],
3523
+ roles: { from: { deal: DEAL_ROLES, lead: DEAL_ROLES } }
3524
+ }
3525
+ };
3526
+ var RELATION_KINDS = Object.keys(RELATIONS);
3527
+ var specOf = /* @__PURE__ */ __name((kind) => Object.hasOwn(RELATIONS, kind) ? RELATIONS[kind] : void 0, "specOf");
3528
+ var isRelationKind = /* @__PURE__ */ __name((kind) => specOf(kind) !== void 0, "isRelationKind");
3529
+ var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
3530
+ var checkEnds = /* @__PURE__ */ __name((kind, from, to) => {
3531
+ const spec = specOf(kind);
3532
+ if (!spec)
3533
+ throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
3534
+ if (memberOnly(from) && (kind !== "member-of" || to !== "project"))
3535
+ throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
3536
+ if (!spec.from.includes(from) || !spec.to.includes(to))
3537
+ throw new CliError("validation_error", `${kind} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
3538
+ return spec;
3539
+ }, "checkEnds");
3540
+ var rolesOf = /* @__PURE__ */ __name((kind, from, to) => {
3541
+ const spec = specOf(kind);
3542
+ if (kind === "member-of" && from !== "person")
3543
+ return void 0;
3544
+ return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
3545
+ }, "rolesOf");
3546
+ var ROLE_LISTS = { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES, deal: DEAL_ROLES };
3547
+ var roleListOf = /* @__PURE__ */ __name((kind, from, to) => {
3548
+ const roles = rolesOf(kind, from, to);
3549
+ return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
3550
+ }, "roleListOf");
3551
+ var checkRole = /* @__PURE__ */ __name((kind, from, to, role, extra = []) => {
3552
+ const roles = rolesOf(kind, from, to)?.concat(extra);
3553
+ if (roles && !roles.includes(role))
3554
+ throw new CliError("validation_error", `a ${from}'s role on ${kind} ${to} is one of ${roles.join(", ")}`, {
3555
+ reason: "relationship.role-unknown"
3556
+ });
3557
+ return role;
3558
+ }, "checkRole");
3559
+ var isSymmetric = /* @__PURE__ */ __name((kind) => specOf(kind)?.symmetric === true, "isSymmetric");
3560
+ var inverseOf = /* @__PURE__ */ __name((kind) => specOf(kind)?.symmetric ? kind : specOf(kind)?.inverse ?? null, "inverseOf");
3561
+ var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
3562
+ var standingOf = /* @__PURE__ */ __name((link, now) => {
3563
+ if (link.endsAt != null && link.endsAt <= now)
3564
+ return "ended";
3565
+ if (link.confirmed)
3566
+ return "confirmed";
3567
+ if (link.deletedAt != null)
3568
+ return "ended";
3569
+ return link.accountId != null ? "reported" : "proposed";
3570
+ }, "standingOf");
3571
+ var isUsable = /* @__PURE__ */ __name((standing) => standing === "confirmed" || standing === "reported", "isUsable");
3572
+ var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
3573
+ var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
3574
+
3575
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/tags.js
3193
3576
  var TAG_TYPES = ["chat", "contact", "message", "task"];
3194
3577
  var TAG = /^[a-z0-9-]{1,32}$/;
3195
3578
  var tagOf = /* @__PURE__ */ __name((value) => {
@@ -3203,7 +3586,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
3203
3586
  return tag;
3204
3587
  }, "normalizeTag");
3205
3588
 
3206
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
3589
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
3207
3590
  var LINK_KINDS = [
3208
3591
  "links-to",
3209
3592
  "blocked-by",
@@ -3216,15 +3599,18 @@ var LINK_KINDS = [
3216
3599
  "created-from",
3217
3600
  "duplicate-of",
3218
3601
  "related-to",
3602
+ "reports-to",
3603
+ "customer-of",
3604
+ "partner-of",
3219
3605
  "assigned-to",
3220
3606
  "attached"
3221
3607
  ];
3222
3608
  var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
3223
3609
  var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
3224
- var RELATION_KINDS = ["member-of", "related-to"];
3225
3610
  var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
3611
+ var COUNTERPART_ROLE = "counterpart";
3226
3612
 
3227
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/tasks/model.js
3613
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/tasks/model.js
3228
3614
  var TASK_KINDS = ["question", "request", "mention", "promise"];
3229
3615
  var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
3230
3616
  var CLOSED_STATES = ["done", "dismissed"];
@@ -3239,13 +3625,13 @@ function closeTask(task, state, by, at, reason) {
3239
3625
  }
3240
3626
  __name(closeTask, "closeTask");
3241
3627
 
3242
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/tasks/store.js
3628
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/tasks/store.js
3243
3629
  function matches2(task, filter) {
3244
3630
  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);
3245
3631
  }
3246
3632
  __name(matches2, "matches");
3247
3633
 
3248
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/tasks/priority.js
3634
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/tasks/priority.js
3249
3635
  var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
3250
3636
  var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
3251
3637
  var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
@@ -3274,12 +3660,12 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
3274
3660
  }, "priorityOf");
3275
3661
  var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
3276
3662
 
3277
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/tasks/service.js
3663
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/tasks/service.js
3278
3664
  function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
3279
- async function find(id3) {
3280
- const task = await store.get(id3);
3665
+ async function find(id4) {
3666
+ const task = await store.get(id4);
3281
3667
  if (!task)
3282
- throw new CliError("not_found", `no task ${id3}`);
3668
+ throw new CliError("not_found", `no task ${id4}`);
3283
3669
  return task;
3284
3670
  }
3285
3671
  __name(find, "find");
@@ -3301,8 +3687,8 @@ function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PUR
3301
3687
  return { task, created: true };
3302
3688
  return { task, created: true, review: await store.reviewDuplicates(task.id) };
3303
3689
  },
3304
- async close(id3, { as, by, reason }) {
3305
- const task = closeTask(await find(id3), as, by, now(), reason);
3690
+ async close(id4, { as, by, reason }) {
3691
+ const task = closeTask(await find(id4), as, by, now(), reason);
3306
3692
  await store.update(task);
3307
3693
  return task;
3308
3694
  },
@@ -3334,7 +3720,7 @@ function median(values) {
3334
3720
  }
3335
3721
  __name(median, "median");
3336
3722
 
3337
- // node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
3723
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
3338
3724
  var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
3339
3725
  var MEMORY_KINDS = ["summary", "digest", "preference"];
3340
3726
  var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
@@ -3342,6 +3728,60 @@ var MEMORY_SCOPES = ["personal", "work"];
3342
3728
  var WORK_TASK_TYPES = ["bug", "feature", "chore"];
3343
3729
  var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
3344
3730
 
3731
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/entities/fields.js
3732
+ var text5 = string();
3733
+ var id3 = pipe(string(), minLength(1));
3734
+ var time = isoTime;
3735
+ var zonedTime = pipe(string(), isoTimestamp("an ISO 8601 time with a zone"));
3736
+ var count6 = pipe(number(), integer(), minValue(0));
3737
+ var untrusted = optional(array(text5));
3738
+ var providerMetadata = optional(record(string(), unknown()));
3739
+ var evidenceSource = strictObject({
3740
+ ref: nullable(reference),
3741
+ kind: text5,
3742
+ title: nullable(text5),
3743
+ sender: nullable(text5),
3744
+ at: nullable(time),
3745
+ excerpt: nullable(text5),
3746
+ tool: nullable(text5),
3747
+ missing: boolean()
3748
+ });
3749
+ var author = strictObject({
3750
+ type: picklist(["person", "bot"]),
3751
+ id: id3,
3752
+ name: nullable(text5)
3753
+ });
3754
+
3755
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
3756
+ var organization = strictObject({
3757
+ id: id3,
3758
+ ref: reference,
3759
+ kind: picklist(["company", "team", "family", "community"]),
3760
+ name: text5,
3761
+ scope: picklist(["personal", "work"]),
3762
+ created_at: time
3763
+ });
3764
+ var project = strictObject({
3765
+ id: id3,
3766
+ ref: reference,
3767
+ key: text5,
3768
+ name: text5,
3769
+ kind: picklist(["project", "inbox"]),
3770
+ type: picklist(["work", "client", "personal", "oss", "other"]),
3771
+ organization_id: nullable(id3),
3772
+ scope: picklist(["personal", "work"]),
3773
+ created_at: time
3774
+ });
3775
+ var reminder = strictObject({
3776
+ id: id3,
3777
+ task: text5,
3778
+ due_at: time,
3779
+ timezone: text5,
3780
+ state: picklist(["pending", "leased", "delivered", "cancelled"]),
3781
+ revision: number(),
3782
+ receipt: nullable(text5)
3783
+ });
3784
+
3345
3785
  export {
3346
3786
  QUERY_LIMITS,
3347
3787
  queryAstSchema,
@@ -3398,18 +3838,20 @@ export {
3398
3838
  validatePayment,
3399
3839
  paymentTitle,
3400
3840
  meetingTimestamp,
3841
+ findingText,
3401
3842
  findingHash,
3843
+ findingFields,
3844
+ findingNeeds,
3402
3845
  validEvidence,
3403
3846
  findingId,
3404
3847
  validateFinding,
3405
3848
  validateBatch,
3406
3849
  validateFindings,
3407
- findingText,
3408
- findingFields,
3409
3850
  findingFingerprint,
3410
3851
  MEETING_FINDINGS_KIND,
3411
3852
  validateMeetingFindings,
3412
3853
  meetingFindingFingerprint,
3854
+ MEETING_FIELD_NAMES,
3413
3855
  parseMeetingQuery,
3414
3856
  transcriptLanguage,
3415
3857
  importFiles,
@@ -3442,14 +3884,58 @@ export {
3442
3884
  validateMeetingSeriesInventoryCursor,
3443
3885
  aggregateMeetingCounts,
3444
3886
  aggregateMeetingStats,
3887
+ parseDecimal,
3888
+ formatDecimal,
3889
+ currencyOf,
3890
+ scaleOf,
3891
+ minorUnits,
3892
+ signedMinorUnits,
3893
+ moneyOf,
3894
+ moneyLabel,
3895
+ quantityOf,
3896
+ lineUnits,
3897
+ INVOICE_DIRECTIONS,
3898
+ INVOICE_STATUSES,
3899
+ MONEY_DIRECTIONS,
3900
+ FINANCE_REVIEWS,
3901
+ settledStatus,
3902
+ dayMonth,
3903
+ notes,
3904
+ invoiceLine,
3905
+ paymentLine,
3906
+ invoiceTitle,
3907
+ paymentEntryTitle,
3908
+ DEAL_KINDS,
3909
+ DEAL_STATUSES,
3910
+ STAGE_OUTCOMES,
3911
+ DEAL_ROLES,
3912
+ dealLine,
3913
+ ORDER_STATUSES,
3914
+ ORDER_PURPOSES,
3915
+ orderLine,
3916
+ orderTitle,
3917
+ RELATION_KINDS,
3918
+ isRelationKind,
3919
+ checkEnds,
3920
+ rolesOf,
3921
+ ROLE_LISTS,
3922
+ roleListOf,
3923
+ checkRole,
3924
+ isSymmetric,
3925
+ inverseOf,
3926
+ STANDINGS,
3927
+ standingOf,
3928
+ isUsable,
3929
+ notOverriddenSql,
3930
+ usableLinkSql,
3445
3931
  TAG_TYPES,
3446
3932
  tagOf,
3447
3933
  normalizeTag,
3448
3934
  LINK_KINDS,
3449
3935
  LINK_ORIGINS,
3450
3936
  LINK_SOURCES,
3451
- RELATION_KINDS,
3452
3937
  linkKind,
3938
+ COUNTERPART_ROLE,
3453
3939
  TASK_KINDS,
3454
3940
  TASK_STATES,
3455
3941
  TASK_ORIGINS,
@@ -3468,5 +3954,22 @@ export {
3468
3954
  MEMORY_STATUSES,
3469
3955
  MEMORY_SCOPES,
3470
3956
  WORK_TASK_TYPES,
3471
- TASK_TYPES2 as TASK_TYPES
3957
+ TASK_TYPES2 as TASK_TYPES,
3958
+ text5 as text,
3959
+ id3 as id,
3960
+ time,
3961
+ zonedTime,
3962
+ count6 as count,
3963
+ untrusted,
3964
+ providerMetadata,
3965
+ evidenceSource,
3966
+ author,
3967
+ organization,
3968
+ project,
3969
+ reminder,
3970
+ markStoreDamaged,
3971
+ readDamageMark,
3972
+ refuseDamagedStore,
3973
+ readHealthMark,
3974
+ recordDeepCheck
3472
3975
  };