@wirecat/tg-cli 0.114.0 → 0.116.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 (123) hide show
  1. package/dist/bin/tg.js +2 -2
  2. package/dist/bin/tg.js.map +1 -1
  3. package/dist/bot/transport.d.ts +10 -8
  4. package/dist/bot/transport.d.ts.map +1 -1
  5. package/dist/bot/transport.js +16 -2
  6. package/dist/bot/transport.js.map +1 -1
  7. package/dist/bundle/{adapter-YAEHX3QB.js → adapter-6CLMTQOV.js} +85 -56
  8. package/dist/bundle/{all-profiles-R5CW42HQ.js → all-profiles-R2UZMH24.js} +10 -8
  9. package/dist/bundle/{anthropic-F25RHYV2.js → anthropic-QKIPHV2Z.js} +6 -5
  10. package/dist/bundle/{app-server-FAG6FNXR.js → app-server-AZB2MFK6.js} +47 -43
  11. package/dist/bundle/{bot-api-KOIAXTQR.js → bot-api-2IM243J4.js} +53 -48
  12. package/dist/bundle/{bot-history-PRAOZEWC.js → bot-history-G6CRVCL2.js} +19 -17
  13. package/dist/bundle/{bun-XIMM6EHD.js → bun-JDKPISPX.js} +2 -2
  14. package/dist/bundle/{bun-sqlite-DSUCO4TR.js → bun-sqlite-X5PY5IQT.js} +5 -4
  15. package/dist/bundle/{chunk-CDCBFMEI.js → chunk-42GK3XRS.js} +2 -2
  16. package/dist/bundle/{chunk-YQ64ZNLD.js → chunk-4D5AUWAY.js} +28 -15
  17. package/dist/bundle/{chunk-IN25CJ3D.js → chunk-4IQZRW4O.js} +13 -13
  18. package/dist/bundle/{chunk-Y4LCSCSH.js → chunk-577MFPCP.js} +3 -3
  19. package/dist/bundle/{chunk-O7CBGHI7.js → chunk-5FCONCJO.js} +1 -1
  20. package/dist/bundle/{chunk-CS5DQ6KM.js → chunk-5VFPUOJO.js} +17 -14
  21. package/dist/bundle/{chunk-ZFMOPKPT.js → chunk-5ZIBAYIZ.js} +2 -2
  22. package/dist/bundle/{chunk-EARO464A.js → chunk-76CX2YPT.js} +210 -129
  23. package/dist/bundle/{chunk-E2IRSRTB.js → chunk-B4UOCWM4.js} +4 -2
  24. package/dist/bundle/{chunk-Y3AQHPAJ.js → chunk-BGMV66FC.js} +1 -1
  25. package/dist/bundle/{chunk-LPUFOWL3.js → chunk-D72URWJE.js} +1 -39
  26. package/dist/bundle/{chunk-WOQGUIXE.js → chunk-DP5LRU7K.js} +1 -1
  27. package/dist/bundle/chunk-EB2IULWB.js +72 -0
  28. package/dist/bundle/{chunk-4JOKO4IW.js → chunk-FDI4GOIP.js} +912 -493
  29. package/dist/bundle/{chunk-P4YBABUC.js → chunk-GV7ZJ33M.js} +6 -4
  30. package/dist/bundle/{chunk-C7K7AP6G.js → chunk-H72UEHNG.js} +69 -36
  31. package/dist/bundle/{chunk-2PAKHXIV.js → chunk-HBUJNNZD.js} +35 -35
  32. package/dist/bundle/{chunk-NTF34HJP.js → chunk-HK6SIIGG.js} +3 -3
  33. package/dist/bundle/{chunk-NUVBC3LJ.js → chunk-HLNYJPAB.js} +2 -2
  34. package/dist/bundle/{chunk-WIRDTH3J.js → chunk-HUOXUI2M.js} +22 -22
  35. package/dist/bundle/{chunk-RBC7JQ4Y.js → chunk-I6JF43YP.js} +5 -3
  36. package/dist/bundle/{chunk-OFDMD3YF.js → chunk-IR4S7POE.js} +8 -8
  37. package/dist/bundle/{chunk-3R43O3GG.js → chunk-JFTCOV37.js} +80 -24
  38. package/dist/bundle/{chunk-YPABTT7A.js → chunk-JJMQA272.js} +14 -89
  39. package/dist/bundle/{chunk-DQQEN3X4.js → chunk-K2RYCCTP.js} +4 -4
  40. package/dist/bundle/{chunk-OWHF6BON.js → chunk-K62YATVD.js} +6 -6
  41. package/dist/bundle/{chunk-6SPLZI5P.js → chunk-KA6EGOJY.js} +4 -4
  42. package/dist/bundle/chunk-KV4267S4.js +23 -0
  43. package/dist/bundle/{chunk-AL36NHO6.js → chunk-LFKEKSI5.js} +1043 -307
  44. package/dist/bundle/{chunk-7FOT4XD2.js → chunk-LSKGCJWD.js} +3426 -1298
  45. package/dist/bundle/{chunk-M3IWROIF.js → chunk-LXH3SKY3.js} +10 -8
  46. package/dist/bundle/{chunk-QCXYJKPF.js → chunk-MQ7MCVZV.js} +2 -2
  47. package/dist/bundle/{chunk-EQJG44KE.js → chunk-N42VUNTO.js} +2 -2
  48. package/dist/bundle/{chunk-KIZT2MI6.js → chunk-N6TIFJHW.js} +1 -1
  49. package/dist/bundle/{chunk-MQTTVQ3V.js → chunk-NL3PAFAE.js} +8 -8
  50. package/dist/bundle/{chunk-ULFTCR5W.js → chunk-NUYRMU56.js} +2 -2
  51. package/dist/bundle/{chunk-34USFPBF.js → chunk-OX6EWGSG.js} +185 -291
  52. package/dist/bundle/{chunk-KZQXOZFC.js → chunk-PPLFOIYX.js} +7 -20
  53. package/dist/bundle/{chunk-TTTDZOBW.js → chunk-PPSUA3IZ.js} +3 -3
  54. package/dist/bundle/{chunk-ALHKUQDZ.js → chunk-PXMHBTK3.js} +4 -4
  55. package/dist/bundle/{chunk-VVKEWWSO.js → chunk-QAKL3GXB.js} +1 -1
  56. package/dist/bundle/{chunk-I6BKSGZQ.js → chunk-QGL2UGML.js} +306 -190
  57. package/dist/bundle/{chunk-J5U2HKGZ.js → chunk-QHBVGKC3.js} +51 -30
  58. package/dist/bundle/{chunk-NJ2I4KFZ.js → chunk-R52RMHWF.js} +2 -2
  59. package/dist/bundle/chunk-RSDIPQXP.js +35 -0
  60. package/dist/bundle/{chunk-XDOPONC3.js → chunk-RSNGMNU5.js} +6 -6
  61. package/dist/bundle/{chunk-NKP3RUM4.js → chunk-SD5PUYKF.js} +14 -12
  62. package/dist/bundle/chunk-SKZ2E3WC.js +91 -0
  63. package/dist/bundle/{chunk-HA35XN2Z.js → chunk-T7CDLV33.js} +4 -4
  64. package/dist/bundle/{chunk-C34IDOA5.js → chunk-TZVL4U7U.js} +2 -2
  65. package/dist/bundle/{chunk-3EZ43DAF.js → chunk-UCSFO5GW.js} +3 -3
  66. package/dist/bundle/{chunk-NMVFFWF2.js → chunk-VQPLHOVQ.js} +9 -9
  67. package/dist/bundle/chunk-XBIPSSKI.js +166 -0
  68. package/dist/bundle/{chunk-VHO66SMY.js → chunk-XQUTJITP.js} +59 -57
  69. package/dist/bundle/{chunk-L4CMCC3V.js → chunk-Y6VWGJ4Q.js} +1 -1
  70. package/dist/bundle/{chunk-RFRI2HFT.js → chunk-YLRTLZF6.js} +1 -1
  71. package/dist/bundle/chunk-YPF6OS37.js +46 -0
  72. package/dist/bundle/{chunk-TKNCJMYN.js → chunk-YYKJN6H5.js} +946 -589
  73. package/dist/bundle/{chunk-5HKMEXVQ.js → chunk-ZDIAPICE.js} +4 -4
  74. package/dist/bundle/command-contract-DPXM4SZT.js +33 -0
  75. package/dist/bundle/{decode-7U4SXPAN.js → decode-W6YPTGJA.js} +7 -6
  76. package/dist/bundle/dispatch-H7EFNBEH.js +411 -0
  77. package/dist/bundle/{echarts-GKEZEAL7.js → echarts-YAWDIC5D.js} +2 -2
  78. package/dist/bundle/{embed-IDZDQMSW.js → embed-EN4UTLV5.js} +6 -5
  79. package/dist/bundle/{embedder-RY5R2PGO.js → embedder-HEKHRL7E.js} +11 -10
  80. package/dist/bundle/{entry-P6YZ3ZV6.js → entry-2KB6MTCG.js} +7 -6
  81. package/dist/bundle/failure-3DU3HLBQ.js +24 -0
  82. package/dist/bundle/first-run-LBG26WWO.js +27 -0
  83. package/dist/bundle/first-screen-TGTSLUI6.js +31 -0
  84. package/dist/bundle/{instructions-P5E34PQR.js → instructions-HA62QNPR.js} +1 -1
  85. package/dist/bundle/{mcp-FUSDPAOL.js → mcp-PPVOM4SE.js} +5 -3
  86. package/dist/bundle/{node-GKPRXS5Y.js → node-MZ2VWSQQ.js} +2 -2
  87. package/dist/bundle/{node-sqlite-VUXFVPJ6.js → node-sqlite-KNNS6DCM.js} +6 -5
  88. package/dist/bundle/{oauth-7SQIPMOY.js → oauth-KWUABBSQ.js} +7 -6
  89. package/dist/bundle/{open-W3BN2SIO.js → open-JXMCYCIV.js} +5 -4
  90. package/dist/bundle/{openai-LQTK3ZMC.js → openai-HL3IR4VT.js} +15 -14
  91. package/dist/bundle/{process-U2P5Z6UF.js → process-K2FICLWY.js} +1 -1
  92. package/dist/bundle/{program-DIPSLR6O.js → program-IFOMT4JS.js} +70 -57
  93. package/dist/bundle/{prompt-GESHKSM5.js → prompt-HVD3Q77P.js} +5 -4
  94. package/dist/bundle/{proxy-transport-C2EUUT32.js → proxy-transport-PA5SGMRY.js} +5 -4
  95. package/dist/bundle/{recognize-FEQTIJET.js → recognize-HHLVETKI.js} +4 -3
  96. package/dist/bundle/{remote-UXOPBPKS.js → remote-HUAKXJCS.js} +7 -6
  97. package/dist/bundle/{rerank-L4JM4REK.js → rerank-NWFIV7OF.js} +7 -6
  98. package/dist/bundle/{serve-DDWW44DB.js → serve-ANUKAJJN.js} +10 -9
  99. package/dist/bundle/{server-UTWBIZHB.js → server-7Q7WAOHO.js} +37 -34
  100. package/dist/bundle/server-HCQS4YDQ.js +60 -0
  101. package/dist/bundle/{state-EV7FGEK4.js → state-Y2AJ5XTP.js} +6 -5
  102. package/dist/bundle/{store-EXBUF4OG.js → store-S3IG5KWL.js} +15 -11
  103. package/dist/bundle/store-maintenance-command-V2WC4G6J.js +50 -0
  104. package/dist/bundle/tg.js +159 -14
  105. package/dist/commands/session.d.ts.map +1 -1
  106. package/dist/commands/session.js +7 -0
  107. package/dist/commands/session.js.map +1 -1
  108. package/dist/telegram/login.d.ts +2 -0
  109. package/dist/telegram/login.d.ts.map +1 -1
  110. package/dist/telegram/login.js +31 -2
  111. package/dist/telegram/login.js.map +1 -1
  112. package/dist/version.d.ts +1 -1
  113. package/dist/version.js +1 -1
  114. package/package.json +5 -4
  115. package/skills/tg-cli/SKILL.md +2 -0
  116. package/dist/bundle/chunk-TRRRRGMI.js +0 -18
  117. package/dist/bundle/command-contract-SOTDPG22.js +0 -31
  118. package/dist/bundle/first-run-66KTCVQK.js +0 -24
  119. package/dist/bundle/first-screen-NY46X6QU.js +0 -29
  120. package/dist/bundle/identity-GXVKGCNU.js +0 -11
  121. package/dist/bundle/server-ZI7WDAW6.js +0 -56
  122. package/dist/bundle/store-maintenance-command-UBZE2Z6T.js +0 -46
  123. /package/dist/bundle/{chunk-NUN6OGOV.js → chunk-LU3WKZBA.js} +0 -0
@@ -1,11 +1,6 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
- singleLine,
5
- visibleControls
6
- } from "./chunk-34USFPBF.js";
7
- import {
8
- CliError,
9
4
  RegistryError,
10
5
  SNAKE_CASE,
11
6
  STEPS,
@@ -15,7 +10,6 @@ import {
15
10
  defineSteps,
16
11
  duplicates,
17
12
  integer,
18
- isCliError,
19
13
  isoTime,
20
14
  lazy,
21
15
  literal,
@@ -36,12 +30,18 @@ import {
36
30
  string,
37
31
  union,
38
32
  variant
39
- } from "./chunk-EARO464A.js";
33
+ } from "./chunk-76CX2YPT.js";
34
+ import {
35
+ CliError,
36
+ isCliError,
37
+ singleLine,
38
+ visibleControls
39
+ } from "./chunk-EB2IULWB.js";
40
40
  import {
41
41
  __name
42
42
  } from "./chunk-ZVVMGPBJ.js";
43
43
 
44
- // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
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
45
45
  var QUERY_LIMITS = {
46
46
  bytes: 8192,
47
47
  depth: 32,
@@ -85,7 +85,7 @@ function queryError(reason, span, alternative, context3 = {}, details = {}) {
85
85
  __name(queryError, "queryError");
86
86
  var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
87
87
 
88
- // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
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
89
89
  var timezoneOf = /* @__PURE__ */ __name((given) => {
90
90
  const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
91
91
  try {
@@ -230,7 +230,7 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
230
230
  };
231
231
  }, "dateRange");
232
232
 
233
- // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
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
234
234
  var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
235
235
  var OPERATORS_BY_TYPE = {
236
236
  kw: ["term", "phrase", "wildcard"],
@@ -309,22 +309,17 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
309
309
  return [...own, ...relations, ...states];
310
310
  }, "queryFieldsOf");
311
311
 
312
- // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
313
- var QUERY_SYNTAX = 'field:value \xB7 "a phrase" \xB7 word* \xB7 AND OR NOT \xB7 ( ) \xB7 [a TO b] \xB7 > >= < <=';
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
314
313
  var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
315
314
  var leftOut = /* @__PURE__ */ __name((fields2) => fields2.filter((field) => field.negatable).map((field) => field.name), "leftOut");
316
315
  var has = /* @__PURE__ */ __name((fields2, operator) => fields2.some((field) => field.operators.includes(operator)), "has");
317
- var syntaxOf = /* @__PURE__ */ __name((shown, backend) => {
318
- if (backend !== "native")
319
- return QUERY_SYNTAX;
320
- return [
321
- "field:value",
322
- ...has(shown, "phrase") ? ['"a phrase"'] : [],
323
- ...has(shown, "wildcard") ? ["word*"] : [],
324
- "terms joined by AND",
325
- ...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
326
- ].join(" \xB7 ");
327
- }, "syntaxOf");
316
+ var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
317
+ "field:value",
318
+ ...has(shown, "phrase") ? ['"a phrase"'] : [],
319
+ ...has(shown, "wildcard") ? ["word*"] : [],
320
+ ...backend === "native" ? ["terms joined by AND"] : ["AND OR NOT", "( )"],
321
+ ...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
322
+ ].join(" \xB7 "), "syntaxOf");
328
323
  var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
329
324
  var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
330
325
  const shown = shownOf(registry);
@@ -345,13 +340,13 @@ var queryDescription = /* @__PURE__ */ __name((registry) => {
345
340
  if (shown.length === 0)
346
341
  return "field:value terms; this list filters by none yet, so any term is refused";
347
342
  const negatable = leftOut(shown);
348
- 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, [a TO b], > <)";
343
+ 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], > <" : ""})`;
349
344
  const fields2 = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
350
345
  const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
351
346
  return `${terms}; fields: ${fields2.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
352
347
  }, "queryDescription");
353
348
 
354
- // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
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
355
350
  var inContext = /* @__PURE__ */ __name((context3, run2) => {
356
351
  try {
357
352
  run2();
@@ -426,7 +421,7 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
426
421
  }, "validateQuery");
427
422
  var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
428
423
 
429
- // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
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
430
425
  var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
431
426
  var reserved = /* @__PURE__ */ new Set([
432
427
  "+",
@@ -533,6 +528,10 @@ var tokensOf = /* @__PURE__ */ __name((text6, fail = queryError) => {
533
528
  break;
534
529
  at++;
535
530
  }
531
+ const [field, colon] = tokens.slice(-2);
532
+ if (field?.kind === "term" && colon?.kind === ":" && colon.span.end === start && text6[at] === ":" && /^[a-z][a-z_-]*$/u.test(text6.slice(start, at)) && /^:[^\s()"]/u.test(text6.slice(at)))
533
+ while (at < text6.length && !whitespace(text6[at] ?? "") && !["(", ")", '"'].includes(text6[at] ?? ""))
534
+ at++;
536
535
  const raw = text6.slice(start, at);
537
536
  kind = { AND: "AND", OR: "OR", NOT: "NOT", "&&": "AND", "||": "OR" }[raw] ?? (/^\d+(?:\.\d+)?$/u.test(raw) ? "number" : "term");
538
537
  }
@@ -731,7 +730,7 @@ var implicitTextTerms = /* @__PURE__ */ __name((text6) => {
731
730
  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] : []));
732
731
  }, "implicitTextTerms");
733
732
 
734
- // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
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
735
734
  var describeQuery = /* @__PURE__ */ __name((registry) => ({
736
735
  entity: registry.entity,
737
736
  backend: registry.backend,
@@ -802,7 +801,7 @@ var QUERY_REASONS = defineReasons([
802
801
  details: [...SPAN, ...details]
803
802
  })));
804
803
 
805
- // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
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
806
805
  var wordsOf = /* @__PURE__ */ __name((text6) => text6.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
807
806
  var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
808
807
  var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
@@ -857,7 +856,7 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
857
856
  }, "matches");
858
857
  var evaluate = /* @__PURE__ */ __name((ast, fields2, item, options = {}) => matches(ast.root, item, new Map(fields2.map((field) => [field.name, field])), options), "evaluate");
859
858
 
860
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/reference.js
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
861
860
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
862
861
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
863
862
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -894,7 +893,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text6) => {
894
893
  }, "parseMeetingReference");
895
894
  var canonicalMeetingReference = /* @__PURE__ */ __name((text6) => formatMeetingReference(parseMeetingReference(text6)), "canonicalMeetingReference");
896
895
 
897
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/item.js
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
898
897
  var text = string();
899
898
  var count = pipe(number(), integer(), minValue(0));
900
899
  var MEETING_ISSUES = ["time_without_zone"];
@@ -959,7 +958,7 @@ var MEETING_QUERY = {
959
958
  })
960
959
  };
961
960
 
962
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
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
963
962
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
964
963
  const parsed = urlOf(url);
965
964
  if (!parsed)
@@ -993,7 +992,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
993
992
  }
994
993
  }, "urlOf");
995
994
 
996
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
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
997
996
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
998
997
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
999
998
  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");
@@ -1026,7 +1025,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
1026
1025
  return kept;
1027
1026
  }, "entryMetadata");
1028
1027
 
1029
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
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
1030
1029
  import { createHash } from "node:crypto";
1031
1030
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
1032
1031
  reference: cue2.reference,
@@ -1040,7 +1039,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
1040
1039
  text: cue2.text
1041
1040
  })).digest("hex"), "meetingCueFingerprint");
1042
1041
 
1043
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
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
1044
1043
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
1045
1044
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
1046
1045
  if (entry.recurrenceEndsAt !== null)
@@ -1063,7 +1062,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
1063
1062
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
1064
1063
  }, "entryInWindow");
1065
1064
 
1066
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/answers.js
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
1067
1066
  var text2 = string();
1068
1067
  var count2 = pipe(number(), integer(), minValue(0));
1069
1068
  var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
@@ -1298,7 +1297,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
1298
1297
  };
1299
1298
  }, "meetingHitsList");
1300
1299
 
1301
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
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
1302
1301
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text6) => text6.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
1303
1302
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
1304
1303
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -1322,7 +1321,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
1322
1321
  };
1323
1322
  }, "validateMeetingParticipantSearch");
1324
1323
 
1325
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/reads.js
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
1326
1325
  var MeetingError = class extends CliError {
1327
1326
  static {
1328
1327
  __name(this, "MeetingError");
@@ -1454,7 +1453,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id3, accountId)
1454
1453
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
1455
1454
  }, "meetingSummaryAnswer");
1456
1455
 
1457
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/export.js
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
1458
1457
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
1459
1458
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
1460
1459
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -1550,8 +1549,8 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
1550
1549
  };
1551
1550
  }, "exportMeeting");
1552
1551
 
1553
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/payment.js
1554
- var FACT_TYPES = ["fact", "statement", "question", "decision", "promise", "payment"];
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
1553
+ var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
1555
1554
  var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
1556
1555
  var PAYMENT_STATES = ["expected", "paid", "cancelled"];
1557
1556
  var invalid2 = /* @__PURE__ */ __name((message) => {
@@ -1572,7 +1571,7 @@ var amountOf = /* @__PURE__ */ __name((value) => {
1572
1571
  var dateOf = /* @__PURE__ */ __name((value) => {
1573
1572
  const date = typeof value === "string" ? value.trim() : "";
1574
1573
  if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
1575
- return invalid2("a payment's due date is an ISO date, such as 2026-10-31");
1574
+ return invalid2("a payment's dates are ISO dates, such as 2026-10-31");
1576
1575
  return date;
1577
1576
  }, "dateOf");
1578
1577
  var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
@@ -1587,7 +1586,17 @@ var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
1587
1586
  return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
1588
1587
  return value;
1589
1588
  }, "oneOf");
1590
- var FIELDS = ["amount", "currency", "direction", "counterparty", "counterparty_name", "due_at", "state", "item"];
1589
+ var FIELDS = [
1590
+ "amount",
1591
+ "currency",
1592
+ "direction",
1593
+ "counterparty",
1594
+ "counterparty_name",
1595
+ "due_at",
1596
+ "state",
1597
+ "item",
1598
+ "paid_at"
1599
+ ];
1591
1600
  var validatePayment = /* @__PURE__ */ __name((input) => {
1592
1601
  if (!input || typeof input !== "object" || Array.isArray(input))
1593
1602
  return invalid2("a payment is an object");
@@ -1601,6 +1610,9 @@ var validatePayment = /* @__PURE__ */ __name((input) => {
1601
1610
  const counterparty = optionalText(raw.counterparty, "counterparty", 80);
1602
1611
  if (counterparty !== null && !COUNTERPARTY.test(counterparty))
1603
1612
  return invalid2("a payment's counterparty is a person:, organization: or project: reference");
1613
+ const state = oneOf(raw.state, PAYMENT_STATES, "state");
1614
+ if (raw.paid_at != null && state !== "paid")
1615
+ return invalid2("only a paid payment has paid_at");
1604
1616
  return {
1605
1617
  amount: amountOf(raw.amount),
1606
1618
  currency,
@@ -1608,8 +1620,10 @@ var validatePayment = /* @__PURE__ */ __name((input) => {
1608
1620
  counterparty,
1609
1621
  counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
1610
1622
  due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
1611
- state: oneOf(raw.state, PAYMENT_STATES, "state"),
1612
- item: optionalText(raw.item, "item", 200)
1623
+ state,
1624
+ item: optionalText(raw.item, "item", 200),
1625
+ // Left out when absent, so a finding staged before the field keeps its fingerprint.
1626
+ ...raw.paid_at == null ? {} : { paid_at: dateOf(raw.paid_at) }
1613
1627
  };
1614
1628
  }, "validatePayment");
1615
1629
  var grouped = /* @__PURE__ */ __name((amount) => {
@@ -1629,10 +1643,10 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
1629
1643
  return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
1630
1644
  }, "paymentTitle");
1631
1645
 
1632
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
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
1633
1647
  import { createHash as createHash2 } from "node:crypto";
1634
1648
 
1635
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
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
1636
1650
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1637
1651
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
1638
1652
  throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone`);
@@ -1643,7 +1657,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1643
1657
  return new Date(value).toISOString();
1644
1658
  }, "meetingTimestamp");
1645
1659
 
1646
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
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
1647
1661
  var TASK_TYPES = ["bug", "feature", "chore"];
1648
1662
  var invalid3 = /* @__PURE__ */ __name((message) => {
1649
1663
  throw new CliError("validation_error", message);
@@ -1659,116 +1673,138 @@ var fields = /* @__PURE__ */ __name((value, allowed, noun) => {
1659
1673
  invalid3(`unknown ${noun} field`);
1660
1674
  }, "fields");
1661
1675
  var SUBJECT = /^(person|organization|project):[1-9]\d*$|^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/;
1662
- var validateFindings = /* @__PURE__ */ __name((input, rules) => {
1676
+ var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
1677
+ if (!Array.isArray(raw) || raw.length < 1 || raw.length > 8)
1678
+ return invalid3(`a finding requires 1\u20138 cited ${rules.cited}s`);
1679
+ const evidence = raw.map((item) => {
1680
+ if (!item || typeof item !== "object")
1681
+ return invalid3("finding evidence is a reference and fingerprint");
1682
+ fields(item, ["reference", "fingerprint"], rules.singular);
1683
+ if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
1684
+ return invalid3("evidence requires a reference and fingerprint");
1685
+ const reference2 = rules.reference(item.reference);
1686
+ if (!/^[a-f0-9]{64}$/.test(item.fingerprint))
1687
+ return invalid3(`finding evidence requires exact ${rules.cited} references and fingerprints`);
1688
+ return { reference: reference2, fingerprint: item.fingerprint };
1689
+ }).sort((a, b) => a.reference.localeCompare(b.reference));
1690
+ if (new Set(evidence.map((item) => item.reference)).size !== evidence.length)
1691
+ return invalid3(`duplicate evidence ${rules.cited}`);
1692
+ return evidence;
1693
+ }, "validEvidence");
1694
+ 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))
1697
+ return invalid3("finding IDs must be unique simple keys");
1698
+ ids2.add(id3);
1699
+ return id3;
1700
+ }, "findingId");
1701
+ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
1702
+ if (!finding || typeof finding !== "object")
1703
+ 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))
1707
+ return invalid3("a finding names a project reference");
1708
+ if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(text3(finding.subject, 80))))
1709
+ return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
1710
+ if (finding.kind === "task" && project === void 0 && !rules.inboxTasks)
1711
+ return invalid3("a task finding names the project the task goes in");
1712
+ const evidence = validEvidence(finding.evidence, rules);
1713
+ const base = {
1714
+ id: id3,
1715
+ ...project === void 0 ? {} : { project },
1716
+ ...finding.subject === void 0 ? {} : { subject: finding.subject },
1717
+ evidence
1718
+ };
1719
+ if (finding.kind === "fact") {
1720
+ fields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
1721
+ if (finding.type === "payment")
1722
+ return invalid3("a payment is a finding of kind payment; money is a payments row, not a fact");
1723
+ if (!FACT_TYPES.includes(finding.type))
1724
+ return invalid3("unknown fact finding type");
1725
+ return { ...base, kind: "fact", type: finding.type, statement: text3(finding.statement, 2e3) };
1726
+ }
1727
+ if (finding.kind === "payment" && rules.payments) {
1728
+ fields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
1729
+ if (finding.supersedes !== void 0 && !/^invoice:[1-9]\d*$/.test(String(finding.supersedes)))
1730
+ return invalid3("a payment finding supersedes an invoice: reference, the expected payment it settles or voids");
1731
+ const payment = validatePayment(finding.payment);
1732
+ if (payment.state === "expected" && finding.supersedes !== void 0)
1733
+ return invalid3("an expected payment supersedes nothing; a paid or cancelled one supersedes its invoice");
1734
+ if (payment.state === "cancelled" && finding.supersedes === void 0)
1735
+ return invalid3("a cancelled payment names the invoice: it cancels in supersedes");
1736
+ if (payment.state === "expected" && !/^(person|organization):/.test(payment.counterparty ?? ""))
1737
+ return invalid3("an expected payment becomes an invoice, which names its counterparty as a person: or organization:");
1738
+ return {
1739
+ ...base,
1740
+ kind: "payment",
1741
+ ...finding.statement === void 0 ? {} : { statement: text3(finding.statement, 2e3) },
1742
+ payment,
1743
+ ...finding.supersedes === void 0 ? {} : { supersedes: finding.supersedes }
1744
+ };
1745
+ }
1746
+ if (finding.kind !== "task")
1747
+ return invalid3(`a finding is a fact${rules.payments ? ", payment" : ""} or task`);
1748
+ fields(finding, [
1749
+ "id",
1750
+ "project",
1751
+ "evidence",
1752
+ "kind",
1753
+ "type",
1754
+ "title",
1755
+ "reason",
1756
+ "commitment",
1757
+ "dueAt",
1758
+ "dueEvidence",
1759
+ "assignee",
1760
+ "assigneeEvidence"
1761
+ ], rules.singular);
1762
+ if (!TASK_TYPES.includes(finding.type))
1763
+ return invalid3("a task finding type is bug, chore or feature");
1764
+ if (!["explicit", "inferred"].includes(finding.commitment))
1765
+ 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");
1768
+ if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
1769
+ return invalid3("an assignee must be a person reference");
1770
+ return {
1771
+ ...base,
1772
+ kind: "task",
1773
+ type: finding.type,
1774
+ title: text3(finding.title, 300),
1775
+ reason: text3(finding.reason, 2e3),
1776
+ commitment: finding.commitment,
1777
+ ...finding.dueAt === void 0 ? {} : {
1778
+ dueAt: meetingTimestamp(finding.dueAt, "finding due date"),
1779
+ dueEvidence: support(finding.dueEvidence, evidence)
1780
+ },
1781
+ ...finding.assignee === void 0 ? {} : { assignee: finding.assignee, assigneeEvidence: support(finding.assigneeEvidence, evidence) }
1782
+ };
1783
+ }, "validateFinding");
1784
+ var support = /* @__PURE__ */ __name((value, evidence) => {
1785
+ 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");
1787
+ return [...new Set(value)].sort();
1788
+ }, "support");
1789
+ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
1663
1790
  if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
1664
1791
  return invalid3(`${rules.plural} take at most 65536 UTF-8 bytes`);
1665
1792
  fields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
1666
- if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > 16)
1667
- return invalid3(`schemaVersion 1 takes 1\u201316 ${rules.plural}`);
1793
+ if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > most)
1794
+ return invalid3(`schemaVersion 1 takes 1\u2013${most} ${rules.plural}`);
1668
1795
  const key = text3(input.key, 64);
1669
1796
  if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
1670
1797
  return invalid3("a findings key uses letters, digits, dot, colon, underscore or hyphen");
1671
1798
  const ids2 = /* @__PURE__ */ new Set();
1672
- const findings = input.findings.map((finding) => {
1673
- if (!finding || typeof finding !== "object")
1674
- return invalid3("a finding is an object");
1675
- const id3 = text3(finding.id, 64);
1676
- if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id3) || ids2.has(id3))
1677
- return invalid3("finding IDs must be unique simple keys");
1678
- ids2.add(id3);
1679
- const project = finding.project === void 0 && rules.anySubject ? void 0 : text3(finding.project, 64);
1680
- if (project !== void 0 && !/^project:[1-9]\d*$/.test(project))
1681
- return invalid3("a finding names a project reference");
1682
- if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(text3(finding.subject, 80))))
1683
- return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
1684
- if (finding.kind === "task" && project === void 0)
1685
- return invalid3("a task finding names the project the task goes in");
1686
- if (!Array.isArray(finding.evidence) || finding.evidence.length < 1 || finding.evidence.length > 8)
1687
- return invalid3(`a finding requires 1\u20138 cited ${rules.cited}s`);
1688
- const evidence = finding.evidence.map((item) => {
1689
- if (!item || typeof item !== "object")
1690
- return invalid3("finding evidence is a reference and fingerprint");
1691
- fields(item, ["reference", "fingerprint"], rules.singular);
1692
- if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
1693
- return invalid3("evidence requires a reference and fingerprint");
1694
- const reference2 = rules.reference(item.reference);
1695
- if (!/^[a-f0-9]{64}$/.test(item.fingerprint))
1696
- return invalid3(`finding evidence requires exact ${rules.cited} references and fingerprints`);
1697
- return { reference: reference2, fingerprint: item.fingerprint };
1698
- }).sort((a, b) => a.reference.localeCompare(b.reference));
1699
- if (new Set(evidence.map((item) => item.reference)).size !== evidence.length)
1700
- return invalid3(`duplicate evidence ${rules.cited}`);
1701
- const base = {
1702
- id: id3,
1703
- ...project === void 0 ? {} : { project },
1704
- ...finding.subject === void 0 ? {} : { subject: finding.subject },
1705
- evidence
1706
- };
1707
- if (finding.kind === "fact") {
1708
- fields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
1709
- if (finding.type === "payment")
1710
- return invalid3("a payment is a finding of kind payment");
1711
- if (!FACT_TYPES.includes(finding.type))
1712
- return invalid3("unknown fact finding type");
1713
- return { ...base, kind: "fact", type: finding.type, statement: text3(finding.statement, 2e3) };
1714
- }
1715
- if (finding.kind === "payment" && rules.payments) {
1716
- fields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
1717
- if (finding.supersedes !== void 0 && !/^fact:[1-9]\d*$/.test(String(finding.supersedes)))
1718
- return invalid3("a payment finding supersedes a fact: reference");
1719
- return {
1720
- ...base,
1721
- kind: "payment",
1722
- ...finding.statement === void 0 ? {} : { statement: text3(finding.statement, 2e3) },
1723
- payment: validatePayment(finding.payment),
1724
- ...finding.supersedes === void 0 ? {} : { supersedes: finding.supersedes }
1725
- };
1726
- }
1727
- if (finding.kind !== "task")
1728
- return invalid3(`a finding is a fact${rules.payments ? ", payment" : ""} or task`);
1729
- fields(finding, [
1730
- "id",
1731
- "project",
1732
- "evidence",
1733
- "kind",
1734
- "type",
1735
- "title",
1736
- "reason",
1737
- "commitment",
1738
- "dueAt",
1739
- "dueEvidence",
1740
- "assignee",
1741
- "assigneeEvidence"
1742
- ], rules.singular);
1743
- if (!TASK_TYPES.includes(finding.type))
1744
- return invalid3("a task finding type is bug, chore or feature");
1745
- if (!["explicit", "inferred"].includes(finding.commitment))
1746
- return invalid3("task commitment must be explicit or inferred");
1747
- const support = /* @__PURE__ */ __name((value) => {
1748
- if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
1749
- return invalid3("date and assignee support must cite the finding's evidence");
1750
- return [...new Set(value)].sort();
1751
- }, "support");
1752
- if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0) || finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
1753
- return invalid3("optional dates and assignees require their supporting evidence");
1754
- if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
1755
- return invalid3("an assignee must be a person reference");
1756
- return {
1757
- ...base,
1758
- kind: "task",
1759
- type: finding.type,
1760
- title: text3(finding.title, 300),
1761
- reason: text3(finding.reason, 2e3),
1762
- commitment: finding.commitment,
1763
- ...finding.dueAt === void 0 ? {} : { dueAt: meetingTimestamp(finding.dueAt, "finding due date"), dueEvidence: support(finding.dueEvidence) },
1764
- ...finding.assignee === void 0 ? {} : { assignee: finding.assignee, assigneeEvidence: support(finding.assigneeEvidence) }
1765
- };
1766
- });
1799
+ const findings = input.findings.map((finding) => one(finding, ids2));
1767
1800
  return { schemaVersion: 1, key, extractor: text3(input.extractor, 200), findings };
1768
- }, "validateFindings");
1801
+ }, "validateBatch");
1802
+ 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");
1769
1805
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
1770
1806
 
1771
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/findings.js
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
1772
1808
  var MEETING_FINDINGS_KIND = "meeting_findings";
1773
1809
  var cue = /* @__PURE__ */ __name((raw) => {
1774
1810
  const reference2 = canonicalMeetingReference(raw);
@@ -1779,7 +1815,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
1779
1815
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
1780
1816
  var meetingFindingFingerprint = findingFingerprint;
1781
1817
 
1782
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
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
1783
1819
  var text4 = string();
1784
1820
  var identifier = pipe(text4, minLength(1));
1785
1821
  var nullableText = nullable(text4);
@@ -1912,7 +1948,7 @@ var MEETING_RESULT_ENTITIES = {
1912
1948
  meeting_repair: repair
1913
1949
  };
1914
1950
 
1915
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
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
1916
1952
  var EVENT_QUERY = defineQuery({
1917
1953
  entity: "event",
1918
1954
  backend: "sql",
@@ -1928,7 +1964,7 @@ var EVENT_QUERY = defineQuery({
1928
1964
  ]
1929
1965
  });
1930
1966
 
1931
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/events.js
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
1932
1968
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
1933
1969
  const current = await store.meeting(details.meeting.id);
1934
1970
  if (!current)
@@ -1971,7 +2007,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
1971
2007
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
1972
2008
  }, "linkEvent");
1973
2009
 
1974
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
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
1975
2011
  var context = {
1976
2012
  command: "search meetings",
1977
2013
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -2034,7 +2070,7 @@ var MEETING_FIELDS = defineQuery({
2034
2070
  });
2035
2071
  var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
2036
2072
 
2037
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/language.js
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
2038
2074
  var LATIN_WORDS = {
2039
2075
  en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
2040
2076
  es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
@@ -2083,7 +2119,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
2083
2119
  return null;
2084
2120
  }, "transcriptLanguage");
2085
2121
 
2086
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
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
2087
2123
  var contentHash = /* @__PURE__ */ __name(async (text6) => {
2088
2124
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
2089
2125
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -2120,7 +2156,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
2120
2156
  return time;
2121
2157
  }, "timestamp");
2122
2158
 
2123
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
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
2124
2160
  var TranscriptTextError = class extends Error {
2125
2161
  static {
2126
2162
  __name(this, "TranscriptTextError");
@@ -2175,7 +2211,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
2175
2211
  return { header, lines };
2176
2212
  }, "parseTranscriptText");
2177
2213
 
2178
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
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
2179
2215
  var VttError = class extends Error {
2180
2216
  static {
2181
2217
  __name(this, "VttError");
@@ -2227,7 +2263,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
2227
2263
  return cues;
2228
2264
  }, "parseVtt");
2229
2265
 
2230
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/import.js
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
2231
2267
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
2232
2268
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
2233
2269
  for (const file of files) {
@@ -2260,10 +2296,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
2260
2296
  return report;
2261
2297
  }, "importFiles");
2262
2298
 
2263
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/links.js
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
2264
2300
  var CHAT_MESSAGES_READ = 1e5;
2265
2301
 
2266
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
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
2267
2303
  var nonempty = /* @__PURE__ */ __name((value, name) => {
2268
2304
  if (typeof value !== "string" || !value.trim())
2269
2305
  throw new CliError("validation_error", `${name} must be nonempty`);
@@ -2314,7 +2350,7 @@ var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
2314
2350
  return Object.freeze(result);
2315
2351
  }, "validateMeetingChange");
2316
2352
 
2317
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/passage.js
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
2318
2354
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
2319
2355
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
2320
2356
  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)))
@@ -2327,7 +2363,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
2327
2363
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
2328
2364
  }, "validateMeetingPassage");
2329
2365
 
2330
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
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
2331
2367
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2332
2368
  if (!original || typeof original !== "object" || Array.isArray(original))
2333
2369
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -2352,7 +2388,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2352
2388
  return { ...input, limit, maxReadBytes };
2353
2389
  }, "validateMeetingPreparationContext");
2354
2390
 
2355
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
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
2356
2392
  var count4 = pipe(number(), integer(), minValue(0));
2357
2393
  var id = pipe(string(), minLength(1));
2358
2394
  var meetingProjectEvidence = strictObject({
@@ -2473,7 +2509,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
2473
2509
  };
2474
2510
  }, "meetingProjectEvidenceAnswer");
2475
2511
 
2476
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
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
2477
2513
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2478
2514
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
2479
2515
  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) || [
@@ -2493,7 +2529,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2493
2529
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
2494
2530
  }, "validateMeetingHitSearch");
2495
2531
 
2496
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
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
2497
2533
  var ids = {
2498
2534
  meeting_id: "meetingId",
2499
2535
  identity_id: "participantIdentityId",
@@ -2584,7 +2620,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
2584
2620
  return { project: project.trim(), options, query: frozen.join(" AND ") };
2585
2621
  }, "prepareMeetingProjectEvidence");
2586
2622
 
2587
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
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
2588
2624
  var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
2589
2625
  const prepared = prepareMeetingProjectEvidence(project, request, now);
2590
2626
  const page = await read(prepared.project, prepared.options);
@@ -2592,7 +2628,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
2592
2628
  return meetingProjectEvidenceAnswer(page, prepared);
2593
2629
  }, "readMeetingProjectEvidence");
2594
2630
 
2595
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/pull.js
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
2596
2632
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
2597
2633
  const { identityExternalId, ...fields2 } = p;
2598
2634
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
@@ -2731,7 +2767,7 @@ unlinked`, format)],
2731
2767
  return report;
2732
2768
  }, "pull");
2733
2769
 
2734
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
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
2735
2771
  var text5 = string();
2736
2772
  var count5 = pipe(number(), integer(), minValue(0));
2737
2773
  var id2 = pipe(number(), integer(), minValue(1));
@@ -2791,6 +2827,23 @@ var meetingStats = strictObject({
2791
2827
  weeks: array(strictObject({ week_start: text5, meetings: count5, talk_ms: count5 })),
2792
2828
  top_speakers: array(meetingSpeaker)
2793
2829
  });
2830
+ var meetingCountsRow = strictObject({
2831
+ key: text5,
2832
+ name: nullable(text5),
2833
+ meetings: count5,
2834
+ minutes: count5,
2835
+ mean_minutes: nullable(number()),
2836
+ transcripts: count5
2837
+ });
2838
+ var meetingCounts = strictObject({
2839
+ by: picklist(["day", "week", "series"]),
2840
+ meetings: count5,
2841
+ minutes: count5,
2842
+ mean_minutes: nullable(number()),
2843
+ transcripts: count5,
2844
+ rows: array(meetingCountsRow),
2845
+ has_more: boolean()
2846
+ });
2794
2847
  var truncated = /* @__PURE__ */ __name((...why) => nullable(picklist(why)), "truncated");
2795
2848
  var meetingParticipants = strictObject({
2796
2849
  schema_version: literal(1),
@@ -2908,10 +2961,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
2908
2961
  updated_at: new Date(one.updatedAt).toISOString()
2909
2962
  }), "eventItem");
2910
2963
 
2911
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
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
2912
2965
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
2913
2966
 
2914
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
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
2915
2968
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2916
2969
  if (!original || typeof original !== "object" || Array.isArray(original))
2917
2970
  throw new CliError("validation_error", "related history request is required");
@@ -2941,14 +2994,14 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2941
2994
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
2942
2995
  }, "validateMeetingRelatedHistory");
2943
2996
 
2944
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/review.js
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
2945
2998
  var REVIEW_LIMIT = { default: 50, most: 200 };
2946
2999
 
2947
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
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
2948
3001
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
2949
3002
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
2950
3003
 
2951
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
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
2952
3005
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2953
3006
  input.signal?.throwIfAborted();
2954
3007
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -2969,10 +3022,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2969
3022
  return { ...input, limit, maxReadBytes };
2970
3023
  }, "validateMeetingSeriesHistory");
2971
3024
 
2972
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
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
2973
3026
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
2974
3027
 
2975
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
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
2976
3029
  function invalid4(field, response = false) {
2977
3030
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
2978
3031
  }
@@ -3001,7 +3054,8 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
3001
3054
  cursorDetails(value);
3002
3055
  }, "validateMeetingSeriesInventoryCursor");
3003
3056
 
3004
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/meetings/stats.js
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
3058
+ var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
3005
3059
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
3006
3060
  const zone = timeZone ?? "UTC";
3007
3061
  try {
@@ -3017,17 +3071,72 @@ var weekStart = /* @__PURE__ */ __name((at, format) => {
3017
3071
  const day = Date.UTC(Number(parts.year), Number(parts.month) - 1, Number(parts.day));
3018
3072
  return new Date(day - DAYS.indexOf(parts.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
3019
3073
  }, "weekStart");
3074
+ var dayKey = /* @__PURE__ */ __name((at, format) => {
3075
+ const parts = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
3076
+ return `${parts.year}-${parts.month}-${parts.day}`;
3077
+ }, "dayKey");
3078
+ var zoneFormat = /* @__PURE__ */ __name((zone) => new Intl.DateTimeFormat("en-US", {
3079
+ timeZone: zone,
3080
+ year: "numeric",
3081
+ month: "2-digit",
3082
+ day: "2-digit",
3083
+ weekday: "short"
3084
+ }), "zoneFormat");
3085
+ var NO_SERIES = "no-series";
3086
+ var MOST_COUNT_ROWS = 100;
3087
+ var minutesOf = /* @__PURE__ */ __name((ms) => Math.round(ms / 6e4), "minutesOf");
3088
+ var meanOf = /* @__PURE__ */ __name((ms, timed) => timed === 0 ? null : Math.round(ms / timed / 6e3) / 10, "meanOf");
3089
+ var aggregateMeetingCounts = /* @__PURE__ */ __name((meetings, by, timeZone, limit = MOST_COUNT_ROWS) => {
3090
+ if (!MEETING_COUNTS_GROUPINGS.includes(by))
3091
+ throw new CliError("validation_error", `--by takes ${MEETING_COUNTS_GROUPINGS.join(", ")}`);
3092
+ if (!Number.isSafeInteger(limit) || limit < 1)
3093
+ throw new CliError("validation_error", "--limit is a positive number");
3094
+ const zone = zoneOf(timeZone);
3095
+ const format = zoneFormat(zone);
3096
+ const sum = /* @__PURE__ */ __name(() => ({ meetings: 0, ms: 0, timed: 0, transcripts: 0 }), "sum");
3097
+ const add = /* @__PURE__ */ __name((into, meeting2) => {
3098
+ into.meetings += 1;
3099
+ if (meeting2.durationMs !== null) {
3100
+ into.ms += Math.max(0, meeting2.durationMs);
3101
+ into.timed += 1;
3102
+ }
3103
+ if (meeting2.transcribed)
3104
+ into.transcripts += 1;
3105
+ }, "add");
3106
+ const total = { ...sum(), name: null };
3107
+ const groups = /* @__PURE__ */ new Map();
3108
+ for (const meeting2 of meetings) {
3109
+ add(total, meeting2);
3110
+ const key = by === "series" ? meeting2.seriesKey === null ? NO_SERIES : `series:${meeting2.seriesKey}` : meeting2.startedAt === null ? null : by === "day" ? dayKey(meeting2.startedAt, format) : weekStart(meeting2.startedAt, format);
3111
+ if (key === null)
3112
+ continue;
3113
+ const group = groups.get(key) ?? { ...sum(), name: by === "series" ? meeting2.seriesTitle : null };
3114
+ add(group, meeting2);
3115
+ groups.set(key, group);
3116
+ }
3117
+ const ordered = [...groups.entries()].sort(([a, one], [b, other]) => by === "series" ? other.ms - one.ms || other.meetings - one.meetings || a.localeCompare(b) : b.localeCompare(a));
3118
+ const kept = ordered.slice(0, limit);
3119
+ if (by !== "series")
3120
+ kept.reverse();
3121
+ const counted = /* @__PURE__ */ __name(({ meetings: count6, ms, timed, transcripts }) => ({
3122
+ meetings: count6,
3123
+ minutes: minutesOf(ms),
3124
+ meanMinutes: meanOf(ms, timed),
3125
+ transcripts
3126
+ }), "counted");
3127
+ return {
3128
+ by,
3129
+ timeZone: zone,
3130
+ ...counted(total),
3131
+ rows: kept.map(([key, group]) => ({ key, name: group.name, ...counted(group) })),
3132
+ hasMore: ordered.length > limit
3133
+ };
3134
+ }, "aggregateMeetingCounts");
3020
3135
  var UNKNOWN_SPEAKER = "unknown";
3021
3136
  var speakerOf = /* @__PURE__ */ __name((row) => row.personId !== null ? { key: `person:${row.personId}`, name: row.personName ?? row.identityName ?? row.speakerName } : row.identityId !== null ? { key: `identity:${row.identityId}`, name: row.identityName ?? row.speakerName } : row.speakerName?.trim() ? { key: `name:${row.speakerName.trim().toLowerCase()}`, name: row.speakerName.trim() } : { key: UNKNOWN_SPEAKER, name: null }, "speakerOf");
3022
3137
  var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
3023
3138
  const zone = zoneOf(timeZone);
3024
- const format = new Intl.DateTimeFormat("en-US", {
3025
- timeZone: zone,
3026
- year: "numeric",
3027
- month: "2-digit",
3028
- day: "2-digit",
3029
- weekday: "short"
3030
- });
3139
+ const format = zoneFormat(zone);
3031
3140
  const speakers = /* @__PURE__ */ new Map();
3032
3141
  const weeks = /* @__PURE__ */ new Map();
3033
3142
  const meetings = /* @__PURE__ */ new Set();
@@ -3080,7 +3189,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
3080
3189
  };
3081
3190
  }, "aggregateMeetingStats");
3082
3191
 
3083
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/domain/tags.js
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
3084
3193
  var TAG_TYPES = ["chat", "contact", "message", "task"];
3085
3194
  var TAG = /^[a-z0-9-]{1,32}$/;
3086
3195
  var tagOf = /* @__PURE__ */ __name((value) => {
@@ -3094,7 +3203,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
3094
3203
  return tag;
3095
3204
  }, "normalizeTag");
3096
3205
 
3097
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
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
3098
3207
  var LINK_KINDS = [
3099
3208
  "links-to",
3100
3209
  "blocked-by",
@@ -3115,7 +3224,7 @@ var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
3115
3224
  var RELATION_KINDS = ["member-of", "related-to"];
3116
3225
  var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
3117
3226
 
3118
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/tasks/model.js
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
3119
3228
  var TASK_KINDS = ["question", "request", "mention", "promise"];
3120
3229
  var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
3121
3230
  var CLOSED_STATES = ["done", "dismissed"];
@@ -3130,13 +3239,13 @@ function closeTask(task, state, by, at, reason) {
3130
3239
  }
3131
3240
  __name(closeTask, "closeTask");
3132
3241
 
3133
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/tasks/store.js
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
3134
3243
  function matches2(task, filter) {
3135
3244
  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);
3136
3245
  }
3137
3246
  __name(matches2, "matches");
3138
3247
 
3139
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/tasks/priority.js
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
3140
3249
  var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
3141
3250
  var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
3142
3251
  var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
@@ -3165,7 +3274,7 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
3165
3274
  }, "priorityOf");
3166
3275
  var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
3167
3276
 
3168
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/tasks/service.js
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
3169
3278
  function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
3170
3279
  async function find(id3) {
3171
3280
  const task = await store.get(id3);
@@ -3225,7 +3334,7 @@ function median(values) {
3225
3334
  }
3226
3335
  __name(median, "median");
3227
3336
 
3228
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
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
3229
3338
  var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
3230
3339
  var MEMORY_KINDS = ["summary", "digest", "preference"];
3231
3340
  var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
@@ -3286,12 +3395,17 @@ export {
3286
3395
  meetingSummaryAnswer,
3287
3396
  exportMeeting,
3288
3397
  FACT_TYPES,
3289
- PAYMENT_DIRECTIONS,
3290
- PAYMENT_STATES,
3291
3398
  validatePayment,
3292
3399
  paymentTitle,
3400
+ meetingTimestamp,
3293
3401
  findingHash,
3402
+ validEvidence,
3403
+ findingId,
3404
+ validateFinding,
3405
+ validateBatch,
3294
3406
  validateFindings,
3407
+ findingText,
3408
+ findingFields,
3295
3409
  findingFingerprint,
3296
3410
  MEETING_FINDINGS_KIND,
3297
3411
  validateMeetingFindings,
@@ -3314,6 +3428,7 @@ export {
3314
3428
  meetingLink,
3315
3429
  meetingSpeaker,
3316
3430
  meetingStats,
3431
+ meetingCounts,
3317
3432
  meetingParticipants,
3318
3433
  meetingPassage,
3319
3434
  event,
@@ -3325,6 +3440,7 @@ export {
3325
3440
  SAVE_HELP,
3326
3441
  validateMeetingSeriesHistory,
3327
3442
  validateMeetingSeriesInventoryCursor,
3443
+ aggregateMeetingCounts,
3328
3444
  aggregateMeetingStats,
3329
3445
  TAG_TYPES,
3330
3446
  tagOf,