@wirecat/drive-cli 0.68.0 → 0.69.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 (124) hide show
  1. package/dist/bin/drive.js +2 -2
  2. package/dist/bundle/{all-profiles-BU6XUFUP.js → all-profiles-B4A737YW.js} +20 -30
  3. package/dist/bundle/{anthropic-ZP5B7S2Z.js → anthropic-RZGPDESM.js} +3 -3
  4. package/dist/bundle/{app-server-EB4DH6T7.js → app-server-OWEW7DY5.js} +47 -63
  5. package/dist/bundle/{bun-PWMM6L45.js → bun-V5QLYBZU.js} +2 -2
  6. package/dist/bundle/{bun-sqlite-6VPR2SVC.js → bun-sqlite-KHLHXXGH.js} +4 -4
  7. package/dist/bundle/{chunk-7TNQZKRD.js → chunk-22SH77TG.js} +65 -64
  8. package/dist/bundle/{chunk-MLSXHTUB.js → chunk-25FT44S3.js} +1480 -464
  9. package/dist/bundle/{chunk-5G2BY4B6.js → chunk-2DS2TDGW.js} +29 -28
  10. package/dist/bundle/{chunk-PGPHEC2X.js → chunk-2Q4CB4EI.js} +1 -1
  11. package/dist/bundle/{chunk-74NCZKRW.js → chunk-2VFAXC6O.js} +13 -13
  12. package/dist/bundle/{chunk-NV75QPML.js → chunk-376ZGVUZ.js} +4 -4
  13. package/dist/bundle/{chunk-6WAC2LOS.js → chunk-3RLRJHAI.js} +1558 -928
  14. package/dist/bundle/{chunk-QVJMFZFW.js → chunk-3URYKAJP.js} +1 -1
  15. package/dist/bundle/{chunk-UYBLNGZ2.js → chunk-3YKAFLXY.js} +1 -1
  16. package/dist/bundle/{chunk-CMWFYZ45.js → chunk-4J5GJJ2I.js} +1 -1
  17. package/dist/bundle/{chunk-QKY24RWV.js → chunk-4YECZ6CN.js} +11 -11
  18. package/dist/bundle/{chunk-FAMXUI2X.js → chunk-4ZFO2CVH.js} +4 -4
  19. package/dist/bundle/{chunk-IVOG6T6P.js → chunk-533XOW74.js} +2 -2
  20. package/dist/bundle/{chunk-Q6BD6RUH.js → chunk-5B5NOAIA.js} +100 -55
  21. package/dist/bundle/{chunk-MW46BLWH.js → chunk-5SJZDEIO.js} +2 -0
  22. package/dist/bundle/{chunk-CVAJMRRD.js → chunk-6D44YQ5X.js} +5 -5
  23. package/dist/bundle/{chunk-EOC7RHJ2.js → chunk-6EL5AVXX.js} +3 -5
  24. package/dist/bundle/{chunk-TI2OANJZ.js → chunk-6XNTELM5.js} +1 -1
  25. package/dist/bundle/{chunk-WUFZGPXX.js → chunk-AD7VI3XU.js} +6 -6
  26. package/dist/bundle/{chunk-YUGTJBV3.js → chunk-AMQGKMLZ.js} +2 -2
  27. package/dist/bundle/{chunk-SOS4U2RF.js → chunk-BBJVV4E2.js} +24 -25
  28. package/dist/bundle/{chunk-JMZQBRRZ.js → chunk-BVVXYZSU.js} +5 -5
  29. package/dist/bundle/{chunk-AIEMFRBU.js → chunk-CAQ5GW3A.js} +1 -1
  30. package/dist/bundle/{chunk-PWIEOATY.js → chunk-CDSB7WVG.js} +323 -12
  31. package/dist/bundle/{chunk-KPKIHJIT.js → chunk-CU6RATZH.js} +3 -3
  32. package/dist/bundle/{chunk-43NEDPXB.js → chunk-CZ4UEXCE.js} +4 -4
  33. package/dist/bundle/{chunk-UFPRP7MG.js → chunk-E7URRFBB.js} +7 -7
  34. package/dist/bundle/{chunk-YYIWPH53.js → chunk-EL2E3ABX.js} +12 -12
  35. package/dist/bundle/{chunk-MWCPKUU4.js → chunk-EWUQIUTB.js} +4 -4
  36. package/dist/bundle/{chunk-7A77GYCE.js → chunk-F5UUJU6R.js} +2 -2
  37. package/dist/bundle/{chunk-O7T3WGCV.js → chunk-GHFBT2ZM.js} +4 -4
  38. package/dist/bundle/{chunk-7BXVI7XF.js → chunk-GK6KXBL6.js} +1 -1
  39. package/dist/bundle/{chunk-5W65QTYS.js → chunk-GTDCP5OG.js} +3 -3
  40. package/dist/bundle/{chunk-GTLXBAJV.js → chunk-HEBZCKMU.js} +1669 -662
  41. package/dist/bundle/{chunk-AXYG2DDY.js → chunk-I55XYREN.js} +636 -227
  42. package/dist/bundle/{chunk-UUQJVKPB.js → chunk-IQ2QU2X6.js} +1608 -1096
  43. package/dist/bundle/{chunk-ULNN3LCY.js → chunk-KUQDBWPU.js} +40 -32
  44. package/dist/bundle/{chunk-6QR7NKMG.js → chunk-L342KHIZ.js} +105 -1
  45. package/dist/bundle/{chunk-DYLYH7VE.js → chunk-LRCSDAYK.js} +3 -3
  46. package/dist/bundle/{chunk-QTRYJZL7.js → chunk-LUZRVBQR.js} +4 -4
  47. package/dist/bundle/{chunk-PJ3FKBXG.js → chunk-MHXZ62CU.js} +1 -1
  48. package/dist/bundle/{chunk-WGX4DZPW.js → chunk-N4ACIIQB.js} +2 -2
  49. package/dist/bundle/{chunk-DU23ET2O.js → chunk-NVDR72GP.js} +19 -19
  50. package/dist/bundle/{chunk-F7KAMSXA.js → chunk-O6PD7RZY.js} +2 -2
  51. package/dist/bundle/{chunk-JZ3MT7IE.js → chunk-OOIAJRKQ.js} +1 -1
  52. package/dist/bundle/{chunk-ZVQDOKDY.js → chunk-OUM4ZO53.js} +1 -1
  53. package/dist/bundle/{chunk-ZSVMZH5O.js → chunk-PB6NWKH3.js} +2 -2
  54. package/dist/bundle/{chunk-EEE4H2PA.js → chunk-QJGFQRTL.js} +10 -10
  55. package/dist/bundle/chunk-RLGQMMYE.js +707 -0
  56. package/dist/bundle/{chunk-CRIEW4FP.js → chunk-RWQ7T4Y5.js} +2 -2
  57. package/dist/bundle/{chunk-EXWZCI5G.js → chunk-SEJBS7SI.js} +1 -1
  58. package/dist/bundle/{chunk-CK2SQ2CE.js → chunk-SY2HLH5R.js} +32 -19
  59. package/dist/bundle/{chunk-6HFZZ2PW.js → chunk-SYUXKV2E.js} +1 -1
  60. package/dist/bundle/{chunk-ZAIE3G5I.js → chunk-T4FMXDDV.js} +2 -2
  61. package/dist/bundle/{chunk-U52QE4QV.js → chunk-T6X6EZ5N.js} +3 -3
  62. package/dist/bundle/{chunk-Z5BMYI2V.js → chunk-TZ75K6R7.js} +6 -6
  63. package/dist/bundle/{chunk-D4MVEOU2.js → chunk-U3RXH6RY.js} +1 -1
  64. package/dist/bundle/{chunk-QRSPFCRY.js → chunk-V4FMN5A6.js} +16 -16
  65. package/dist/bundle/{chunk-QWGEOQHA.js → chunk-VUPWDCYV.js} +1 -1
  66. package/dist/bundle/{chunk-WCNTDETD.js → chunk-WNMPIRRF.js} +98 -6
  67. package/dist/bundle/{chunk-RT5NT62B.js → chunk-WOUIHZRI.js} +13 -15
  68. package/dist/bundle/{chunk-UIKVP23D.js → chunk-WQOGHND4.js} +1 -1
  69. package/dist/bundle/{chunk-2VYEGKQ3.js → chunk-XUHQ7DVT.js} +1 -1
  70. package/dist/bundle/{chunk-DIZBJLPM.js → chunk-XVH3WZSZ.js} +45 -55
  71. package/dist/bundle/{chunk-MOKEB656.js → chunk-ZBYKCVSV.js} +1 -1
  72. package/dist/bundle/{chunk-BXHFJTU5.js → chunk-ZUG67442.js} +2 -2
  73. package/dist/bundle/{cli-L7P36YUH.js → cli-BS4L3HAP.js} +100 -70
  74. package/dist/bundle/{command-contract-EYFGMKIG.js → command-contract-HYURWSD6.js} +16 -17
  75. package/dist/bundle/{command-server-entry-H3VGPOLJ.js → command-server-entry-CJ2CV7ZV.js} +23 -24
  76. package/dist/bundle/{decode-JEU6JWCV.js → decode-E2NM5SSM.js} +3 -3
  77. package/dist/bundle/drive.js +4 -4
  78. package/dist/bundle/{echarts-SDZA2SWG.js → echarts-QIXLXS3G.js} +2 -2
  79. package/dist/bundle/{embed-WUKOASQG.js → embed-YNZW5X6M.js} +4 -4
  80. package/dist/bundle/{embedder-UBRAXRDZ.js → embedder-LRC2PKTS.js} +7 -7
  81. package/dist/bundle/{entry-C4NUQFTF.js → entry-2IMSWRJU.js} +7 -7
  82. package/dist/bundle/{first-run-PKHBS7B4.js → first-run-7CPHQDM5.js} +7 -7
  83. package/dist/bundle/first-screen-OKZ7GMFR.js +38 -0
  84. package/dist/bundle/{google-XXHSMTVK.js → google-WDKDBDD4.js} +15 -15
  85. package/dist/bundle/{google-api-SQQ4BSNR.js → google-api-7JDZDCWE.js} +52 -53
  86. package/dist/bundle/{grants-2U4JVT6O.js → grants-AU25GWKF.js} +57 -58
  87. package/dist/bundle/{identity-SRL6RSU2.js → identity-E43WKN5F.js} +1 -1
  88. package/dist/bundle/{instructions-7T6JJIFS.js → instructions-MD2RZT5Z.js} +1 -1
  89. package/dist/bundle/{login-N243GGEE.js → login-RBDJPQAG.js} +57 -58
  90. package/dist/bundle/{node-BZDMUFTW.js → node-IEVT2FSJ.js} +2 -2
  91. package/dist/bundle/{node-sqlite-SZQCCMV2.js → node-sqlite-IENH4TRX.js} +5 -5
  92. package/dist/bundle/{oauth-CMAFXX6A.js → oauth-3JGSN47Z.js} +5 -5
  93. package/dist/bundle/{open-RVTPKDA3.js → open-TZ5H7NYM.js} +3 -3
  94. package/dist/bundle/{openai-6NN63BMH.js → openai-XF2KB7W2.js} +14 -14
  95. package/dist/bundle/{process-756VBE7E.js → process-6Q23D3TO.js} +1 -1
  96. package/dist/bundle/{program-B4QBJYB5.js → program-D5XWOHV5.js} +86 -89
  97. package/dist/bundle/{prompt-HGP2DSRW.js → prompt-KUC5D4GX.js} +3 -3
  98. package/dist/bundle/{recognize-26SHB7HI.js → recognize-DPFW7HO3.js} +2 -2
  99. package/dist/bundle/{remote-Z4PWHZ5N.js → remote-MODTSUNH.js} +8 -8
  100. package/dist/bundle/{rerank-QHJZJK3Q.js → rerank-JK7SERLE.js} +5 -5
  101. package/dist/bundle/{serve-MYJW5IEM.js → serve-BV2WHZLW.js} +7 -7
  102. package/dist/bundle/server-6YDI4Y36.js +72 -0
  103. package/dist/bundle/{server-XFW3V7CR.js → server-N3WPEU7Z.js} +45 -44
  104. package/dist/bundle/{services-IQG2RVTO.js → services-SV6CFUCS.js} +42 -27
  105. package/dist/bundle/{sqlite-runtime-X4GB5PBV.js → sqlite-runtime-RZ5PLZVQ.js} +4 -4
  106. package/dist/bundle/{state-ATQK2X3W.js → state-RAZIREVG.js} +4 -4
  107. package/dist/bundle/{store-QUBUPK6F.js → store-2DLGLYS6.js} +18 -14
  108. package/dist/bundle/{store-MEHEUOJH.js → store-DQKJKX2G.js} +12 -12
  109. package/dist/bundle/store-maintenance-command-UJ5F5L4H.js +64 -0
  110. package/dist/bundle/tokens-LY3WML55.js +110 -0
  111. package/dist/policy.d.ts +1 -1
  112. package/dist/policy.d.ts.map +1 -1
  113. package/dist/policy.js +3 -3
  114. package/dist/policy.js.map +1 -1
  115. package/dist/version.d.ts +1 -1
  116. package/dist/version.js +1 -1
  117. package/package.json +2 -2
  118. package/dist/bundle/chunk-2UHQVRH2.js +0 -1235
  119. package/dist/bundle/chunk-J5LXL435.js +0 -1316
  120. package/dist/bundle/chunk-R5FTCNLJ.js +0 -76
  121. package/dist/bundle/first-screen-QOVOM4BF.js +0 -39
  122. package/dist/bundle/server-HBZPIHDX.js +0 -74
  123. package/dist/bundle/store-maintenance-command-33ULVDWY.js +0 -65
  124. package/dist/bundle/tokens-A2GP4F34.js +0 -111
@@ -12,15 +12,15 @@ import {
12
12
  import {
13
13
  isCliFailure,
14
14
  isStoreDamage
15
- } from "./chunk-UYBLNGZ2.js";
15
+ } from "./chunk-3YKAFLXY.js";
16
16
  import {
17
17
  refuseOwnerStoreInTests
18
- } from "./chunk-CRIEW4FP.js";
18
+ } from "./chunk-RWQ7T4Y5.js";
19
19
  import {
20
20
  createRecordLog,
21
21
  resolvePaths,
22
22
  writeSecurely
23
- } from "./chunk-MW46BLWH.js";
23
+ } from "./chunk-5SJZDEIO.js";
24
24
  import {
25
25
  singleLine,
26
26
  visibleControls
@@ -62,13 +62,13 @@ import {
62
62
  __name
63
63
  } from "./chunk-ZVVMGPBJ.js";
64
64
 
65
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/run.js
65
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/run.js
66
66
  import { randomUUID } from "node:crypto";
67
67
  import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
68
68
  import { userInfo } from "node:os";
69
69
  import { join, sep } from "node:path";
70
70
 
71
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
71
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
72
72
  var snake = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
73
73
  var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
74
74
  var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
@@ -81,7 +81,7 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
81
81
  error: /* @__PURE__ */ __name((event2, message) => logger.error(logAttributes(event2), message), "error")
82
82
  }), "snakeLogger");
83
83
 
84
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
84
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
85
85
  var diagnostic = {
86
86
  event: true,
87
87
  operation: true,
@@ -155,7 +155,7 @@ var LOG_ATTRIBUTES = [
155
155
  ...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
156
156
  ].sort();
157
157
 
158
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/run.js
158
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/run.js
159
159
  var KEEP_RUNS_FOR_DAYS = 30;
160
160
  var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
161
161
  var KEEP_STORE_RUNS_FOR_DAYS = 3;
@@ -213,10 +213,10 @@ var startRun = /* @__PURE__ */ __name((options) => {
213
213
  const codes = /* @__PURE__ */ new Set();
214
214
  const tables = /* @__PURE__ */ new Set();
215
215
  const noted = /* @__PURE__ */ __name((level) => (event2, message) => {
216
- const { operation, errorCode, error_code, code, kind: kind2, table } = event2;
216
+ const { operation, errorCode, error_code, code, kind: kind3, table } = event2;
217
217
  if (typeof operation === "string")
218
218
  operations.add(operation);
219
- if (kind2 === "store" && typeof table === "string")
219
+ if (kind3 === "store" && typeof table === "string")
220
220
  tables.add(table);
221
221
  for (const value of [errorCode, error_code, code])
222
222
  if (typeof value === "string")
@@ -522,7 +522,7 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
522
522
  };
523
523
  }, "metadataOf");
524
524
 
525
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/scope.js
525
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/scope.js
526
526
  import { AsyncLocalStorage } from "node:async_hooks";
527
527
  import { randomBytes } from "node:crypto";
528
528
  var scopes = new AsyncLocalStorage();
@@ -575,7 +575,7 @@ var attempts = new AsyncLocalStorage();
575
575
  var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
576
576
  var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
577
577
 
578
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/payment.js
578
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/payment.js
579
579
  var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
580
580
  var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
581
581
  var PAYMENT_STATES = ["expected", "paid", "cancelled"];
@@ -669,7 +669,7 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
669
669
  return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
670
670
  }, "paymentTitle");
671
671
 
672
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/passage.js
672
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/passage.js
673
673
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
674
674
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
675
675
  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)))
@@ -682,7 +682,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
682
682
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
683
683
  }, "validateMeetingPassage");
684
684
 
685
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
685
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
686
686
  var text = string();
687
687
  var identifier = pipe(text, minLength(1));
688
688
  var nullableText = nullable(text);
@@ -807,7 +807,37 @@ var repair = strictObject({
807
807
  transcripts: count,
808
808
  languages: array(strictObject({ language: nullableText, transcripts: count }))
809
809
  });
810
+ var kind = picklist(["instant", "scheduled"]);
811
+ var managedChange = strictObject({
812
+ action: picklist(["create", "update", "cancel"]),
813
+ provider: text,
814
+ account: text,
815
+ id: optional(identifier),
816
+ occurrence_id: optional(identifier),
817
+ change: optional(strictObject({
818
+ title: optional(text),
819
+ kind: optional(kind),
820
+ start_time: optional(text),
821
+ duration_minutes: optional(count),
822
+ timezone: optional(text),
823
+ agenda: optional(text)
824
+ })),
825
+ applied: flag,
826
+ meeting: optional(strictObject({
827
+ id: identifier,
828
+ title: nullableText,
829
+ kind: nullable(kind),
830
+ start_time: nullableText,
831
+ duration_minutes: nullable(count),
832
+ timezone: nullableText,
833
+ agenda: nullableText,
834
+ join_url: nullableText
835
+ }))
836
+ });
837
+ var invitation = strictObject({ id: identifier, invitation: text, untrusted: optional(array(text)) });
810
838
  var MEETING_RESULT_ENTITIES = {
839
+ meeting_change: managedChange,
840
+ meeting_invitation: invitation,
811
841
  meeting_ingestion: run,
812
842
  meeting_export: exported,
813
843
  meeting_association: meetingChange,
@@ -816,7 +846,43 @@ var MEETING_RESULT_ENTITIES = {
816
846
  meeting_repair: repair
817
847
  };
818
848
 
819
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/reference.js
849
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/service-query.js
850
+ var BACKENDS = ["archive", "server", "both"];
851
+ var MAX_BRANCHES = 64;
852
+ var some = /* @__PURE__ */ __name((value) => value === void 0 ? [] : [value], "some");
853
+ var readable = /* @__PURE__ */ __name((node, capability) => capability.fields[node.field]?.includes(node.operator) === true, "readable");
854
+ var branchesOf = /* @__PURE__ */ __name((node, capability, cut) => {
855
+ if (node.kind === "predicate")
856
+ return readable(node, capability) ? some(capability.leaf(node, false)) : [capability.all];
857
+ const must = node.clauses.filter(({ occur }) => occur === "must");
858
+ const not = node.clauses.flatMap(({ occur, node: node2 }) => occur === "must_not" && node2.kind === "predicate" && capability.negatable?.includes(node2.field) && readable(node2, capability) ? some(capability.leaf(node2, true)) : []);
859
+ const should = node.clauses.filter(({ occur }) => occur === "should");
860
+ const base = must.length || !should.length ? must.reduce((product, { node: node2 }) => {
861
+ const next = product.flatMap((one) => branchesOf(node2, capability, cut).flatMap((other) => some(capability.both(one, other))));
862
+ return next.length > MAX_BRANCHES ? product : next;
863
+ }, [capability.all]) : should.flatMap(({ node: node2 }) => branchesOf(node2, capability, cut));
864
+ if (base.length > MAX_BRANCHES)
865
+ cut.branches = true;
866
+ return not.reduce((branches, negated) => branches.flatMap((one) => some(capability.both(one, negated))), base.slice(0, MAX_BRANCHES));
867
+ }, "branchesOf");
868
+ var serviceCallsOf = /* @__PURE__ */ __name((root, capability, scope2) => {
869
+ const cut = { branches: false };
870
+ const all = branchesOf(root, capability, cut).flatMap((branch) => scope2 === void 0 ? [branch] : some(capability.both(scope2, branch)));
871
+ const sent = capability.sends ? all.filter((branch) => capability.sends?.(branch)) : all;
872
+ const unique = [...new Map(sent.map((branch) => [JSON.stringify(branch), branch])).values()];
873
+ const unsent = all.length - sent.length;
874
+ if (capability.either && unique.length)
875
+ return { calls: [capability.either(unique)], complete: !cut.branches, unsent };
876
+ const max = Math.max(1, capability.maxCalls);
877
+ return { calls: unique.slice(0, max), complete: !cut.branches && unique.length <= max, unsent };
878
+ }, "serviceCallsOf");
879
+ var rangeOf = /* @__PURE__ */ __name((node, zone, now) => dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.operator === "range" ? node.lower_inclusive === true : true, node.operator === "range" ? node.upper_inclusive === true : true, zone, node.span, now), "rangeOf");
880
+ var windowOf = /* @__PURE__ */ __name(({ lower, upper, lower_inclusive, upper_inclusive }) => ({
881
+ ...lower === void 0 ? {} : { from: lower_inclusive ? lower : lower + 1 },
882
+ ...upper === void 0 ? {} : { to: upper_inclusive ? upper : upper - 1 }
883
+ }), "windowOf");
884
+
885
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/reference.js
820
886
  var invalid2 = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
821
887
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
822
888
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -853,7 +919,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
853
919
  }, "parseMeetingReference");
854
920
  var canonicalMeetingReference = /* @__PURE__ */ __name((text7) => formatMeetingReference(parseMeetingReference(text7)), "canonicalMeetingReference");
855
921
 
856
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/item.js
922
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/item.js
857
923
  var text2 = string();
858
924
  var count2 = pipe(number(), integer(), minValue(0));
859
925
  var MEETING_ISSUES = ["time_without_zone"];
@@ -861,9 +927,11 @@ var meetingIssuesOf = /* @__PURE__ */ __name((metadata) => {
861
927
  const listed2 = metadata?.issues;
862
928
  return Array.isArray(listed2) ? MEETING_ISSUES.filter((issue) => listed2.includes(issue)) : [];
863
929
  }, "meetingIssuesOf");
864
- var meeting = strictObject({
930
+ var meetingEntries = {
865
931
  ref: reference,
866
932
  id: pipe(string(), minLength(1)),
933
+ /** The service's own id of this occurrence: what `meetings show` takes besides the store number. */
934
+ provider_id: text2,
867
935
  provider: text2,
868
936
  account: text2,
869
937
  title: nullable(text2),
@@ -878,15 +946,25 @@ var meeting = strictObject({
878
946
  participants_count: nullable(count2),
879
947
  /** Present only when something about this meeting is doubtful. */
880
948
  issues: optional(array(picklist(MEETING_ISSUES))),
949
+ /**
950
+ * Where a read that asked the service found it, as messages search says it: `archive` (only the store), `server`
951
+ * (new from the service), `both`. Absent when the service was not asked.
952
+ */
953
+ found_in: optional(picklist(["archive", "server", "both"])),
954
+ /** The service's text, which a reader must not follow as instructions. */
955
+ untrusted: optional(array(text2)),
881
956
  created_at: isoTime,
882
957
  updated_at: isoTime
883
- });
958
+ };
959
+ var meeting = strictObject(meetingEntries);
960
+ var MEETING_UNTRUSTED = ["title", "description", "location"];
884
961
  var iso = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
885
962
  var meetingItem = /* @__PURE__ */ __name((row, owner) => {
886
963
  const issues = meetingIssuesOf(row.metadata);
887
964
  return {
888
965
  ref: formatMeetingReference({ type: "meeting", accountId: row.accountId, meetingId: row.id }),
889
966
  id: String(row.id),
967
+ provider_id: row.externalId,
890
968
  provider: owner.provider,
891
969
  account: owner.account,
892
970
  title: row.title,
@@ -899,6 +977,7 @@ var meetingItem = /* @__PURE__ */ __name((row, owner) => {
899
977
  timezone: row.timezone,
900
978
  participants_count: row.participantsCount,
901
979
  ...issues.length ? { issues } : {},
980
+ untrusted: [...MEETING_UNTRUSTED],
902
981
  created_at: new Date(row.createdAt).toISOString(),
903
982
  updated_at: new Date(row.updatedAt).toISOString()
904
983
  };
@@ -907,9 +986,21 @@ var MEETING_QUERY = {
907
986
  entity: "meeting",
908
987
  backend: "sql",
909
988
  fields: queryFieldsOf(meeting, {
910
- exclude: ["ref", "provider", "account", "description", "location", "url", "timezone", "issues"],
989
+ exclude: [
990
+ "ref",
991
+ "provider",
992
+ "account",
993
+ "description",
994
+ "location",
995
+ "url",
996
+ "timezone",
997
+ "issues",
998
+ "found_in",
999
+ "untrusted"
1000
+ ],
911
1001
  examples: {
912
1002
  id: "id:12",
1003
+ provider_id: "provider_id:85746065432",
913
1004
  title: "title:*standup*",
914
1005
  started_at: "started_at:[2026-10-01 TO 2026-10-31]",
915
1006
  duration_ms: "duration_ms>=3600000",
@@ -918,11 +1009,11 @@ var MEETING_QUERY = {
918
1009
  })
919
1010
  };
920
1011
 
921
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/store.js
1012
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/store.js
922
1013
  var MEETING_DOCUMENT_ROLES = ["transcript", "recording", "notes"];
923
1014
  var READ_BUDGET_EXCEEDED = "Meeting search exceeds its stored text byte budget";
924
1015
 
925
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/answers.js
1016
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/answers.js
926
1017
  var text3 = string();
927
1018
  var count3 = pipe(number(), integer(), minValue(0));
928
1019
  var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
@@ -983,7 +1074,7 @@ var meetingSummary = strictObject({
983
1074
  created_at: isoTime,
984
1075
  updated_at: isoTime
985
1076
  });
986
- var meetingDetails = strictObject({
1077
+ var meetingDetailsEntries = {
987
1078
  ...meeting.entries,
988
1079
  /** The stored event and series it belongs to, as `meetings_list` takes them. */
989
1080
  event_id: nullable(text3),
@@ -1020,7 +1111,8 @@ var meetingDetails = strictObject({
1020
1111
  title: nullable(text3),
1021
1112
  document: nullable(reference)
1022
1113
  }))
1023
- });
1114
+ };
1115
+ var meetingDetails = strictObject(meetingDetailsEntries);
1024
1116
  var meetingRef = /* @__PURE__ */ __name((accountId, meetingId) => formatMeetingReference({ type: "meeting", accountId, meetingId }), "meetingRef");
1025
1117
  var meetingTranscriptItem = /* @__PURE__ */ __name((accountId, transcript, rows) => ({
1026
1118
  ref: formatMeetingReference({
@@ -1176,7 +1268,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
1176
1268
  };
1177
1269
  }, "meetingHitsList");
1178
1270
 
1179
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
1271
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
1180
1272
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
1181
1273
  const parsed = urlOf(url);
1182
1274
  if (!parsed)
@@ -1210,7 +1302,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
1210
1302
  }
1211
1303
  }, "urlOf");
1212
1304
 
1213
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
1305
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
1214
1306
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
1215
1307
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
1216
1308
  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");
@@ -1247,7 +1339,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
1247
1339
  return kept;
1248
1340
  }, "entryMetadata");
1249
1341
 
1250
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1342
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
1251
1343
  import { createHash } from "node:crypto";
1252
1344
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
1253
1345
  reference: cue2.reference,
@@ -1261,7 +1353,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
1261
1353
  text: cue2.text
1262
1354
  })).digest("hex"), "meetingCueFingerprint");
1263
1355
 
1264
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1356
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
1265
1357
  var EVENT_QUERY = defineQuery({
1266
1358
  entity: "event",
1267
1359
  backend: "sql",
@@ -1277,7 +1369,7 @@ var EVENT_QUERY = defineQuery({
1277
1369
  ]
1278
1370
  });
1279
1371
 
1280
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1372
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
1281
1373
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
1282
1374
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
1283
1375
  if (entry.recurrenceEndsAt !== null)
@@ -1300,7 +1392,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
1300
1392
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
1301
1393
  }, "entryInWindow");
1302
1394
 
1303
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/events.js
1395
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/events.js
1304
1396
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(), { create = true } = {}) => {
1305
1397
  const current = await store.meeting(details.meeting.id);
1306
1398
  if (!current)
@@ -1345,7 +1437,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(),
1345
1437
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
1346
1438
  }, "linkEvent");
1347
1439
 
1348
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1440
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
1349
1441
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text7) => text7.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
1350
1442
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
1351
1443
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -1369,7 +1461,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
1369
1461
  };
1370
1462
  }, "validateMeetingParticipantSearch");
1371
1463
 
1372
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1464
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/reads.js
1373
1465
  var MeetingError = class extends CliError {
1374
1466
  static {
1375
1467
  __name(this, "MeetingError");
@@ -1488,10 +1580,9 @@ var ownerOf = /* @__PURE__ */ __name(async (store, accountId) => {
1488
1580
  throw new MeetingError("not_found", `meeting account ${accountId} is not in the store`);
1489
1581
  return owner;
1490
1582
  }, "ownerOf");
1491
- var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store, id5, accountId) => {
1492
- const details = await meetingShow(store, id5, accountId);
1493
- return { item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId)) };
1494
- }, "meetingDetailsAnswer");
1583
+ var meetingDetailsBody = /* @__PURE__ */ __name(async (store, details) => ({
1584
+ item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId))
1585
+ }), "meetingDetailsBody");
1495
1586
  var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id5, accountId, options = {}) => {
1496
1587
  const details = await meetingShow(store, id5, accountId);
1497
1588
  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)));
@@ -1501,7 +1592,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id5, accountId)
1501
1592
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
1502
1593
  }, "meetingSummaryAnswer");
1503
1594
 
1504
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/export.js
1595
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/export.js
1505
1596
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
1506
1597
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
1507
1598
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -1597,10 +1688,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id5, options) => {
1597
1688
  };
1598
1689
  }, "exportMeeting");
1599
1690
 
1600
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1691
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1601
1692
  import { createHash as createHash2 } from "node:crypto";
1602
1693
 
1603
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
1694
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
1604
1695
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1605
1696
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
1606
1697
  throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
@@ -1611,7 +1702,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
1611
1702
  return new Date(value).toISOString();
1612
1703
  }, "meetingTimestamp");
1613
1704
 
1614
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1705
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
1615
1706
  var TASK_TYPES = ["bug", "feature", "chore"];
1616
1707
  var invalid3 = /* @__PURE__ */ __name((message) => {
1617
1708
  throw new CliError("validation_error", message);
@@ -1625,10 +1716,10 @@ var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update
1625
1716
  var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
1626
1717
  var findingWhere = /* @__PURE__ */ __name((of) => {
1627
1718
  const id5 = typeof of.id === "string" ? of.id : null;
1628
- const kind2 = typeof of.kind === "string" ? of.kind : null;
1719
+ const kind3 = typeof of.kind === "string" ? of.kind : null;
1629
1720
  return {
1630
- where: id5 || kind2 ? ` in ${[id5, kind2 && `(${kind2})`].filter(Boolean).join(" ")}` : "",
1631
- named: { ...id5 ? { finding: id5 } : {}, ...kind2 ? { kind: kind2 } : {} }
1721
+ where: id5 || kind3 ? ` in ${[id5, kind3 && `(${kind3})`].filter(Boolean).join(" ")}` : "",
1722
+ named: { ...id5 ? { finding: id5 } : {}, ...kind3 ? { kind: kind3 } : {} }
1632
1723
  };
1633
1724
  }, "findingWhere");
1634
1725
  var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
@@ -1786,7 +1877,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
1786
1877
  var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
1787
1878
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
1788
1879
 
1789
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1880
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1790
1881
  var MEETING_FINDINGS_KIND = "meeting_findings";
1791
1882
  var cue = /* @__PURE__ */ __name((raw) => {
1792
1883
  const reference2 = canonicalMeetingReference(raw);
@@ -1797,7 +1888,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
1797
1888
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
1798
1889
  var meetingFindingFingerprint = findingFingerprint;
1799
1890
 
1800
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1891
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1801
1892
  var context = {
1802
1893
  command: "search meetings",
1803
1894
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -1884,13 +1975,15 @@ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) =
1884
1975
  }, "once");
1885
1976
  for (const { node } of lifted) {
1886
1977
  if (node.field === "date") {
1887
- once("since", "--since-time");
1888
- once("until", "--until-time");
1889
1978
  const range = dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.lower_inclusive !== false, node.upper_inclusive !== false, timezoneOf(timezone), node.span, now);
1890
- if (range.lower !== void 0)
1979
+ if (range.lower !== void 0) {
1980
+ once("since", "--since-time");
1891
1981
  next.since = range.lower + (range.lower_inclusive ? 0 : 1);
1892
- if (range.upper !== void 0)
1982
+ }
1983
+ if (range.upper !== void 0) {
1984
+ once("until", "--until-time");
1893
1985
  next.until = range.upper - (range.upper_inclusive ? 0 : 1);
1986
+ }
1894
1987
  } else {
1895
1988
  const field = node.field;
1896
1989
  once(field, `--${field}`);
@@ -1900,7 +1993,7 @@ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) =
1900
1993
  let rest = query;
1901
1994
  for (const { node } of [...lifted].sort((a, b) => b.node.span.start - a.node.span.start))
1902
1995
  rest = `${rest.slice(0, node.span.start)}${rest.slice(node.span.end)}`;
1903
- rest = rest.replace(/^(?:\s*AND\b)+|(?:\bAND\s*)+$/g, "").replace(/\bAND(\s+AND\b)+/g, "AND").trim();
1996
+ rest = rest.replace(/(^|\s)\+(?=\s|$)/g, "$1").replace(/^(?:\s*(?:AND\b|&&))+|(?:(?:\bAND|&&)\s*)+$/g, "").replace(/(?:\bAND|&&)(\s+(?:AND\b|&&))+/g, "AND").trim();
1904
1997
  if (!rest)
1905
1998
  throw new CliError("validation_error", "give words to find besides date:, project:, tag: and topic:");
1906
1999
  return { query: rest, request: next };
@@ -1917,7 +2010,7 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text7) => {
1917
2010
  return { version: 1, language: "lucene-v1", root };
1918
2011
  }, "meetingWordsQuery");
1919
2012
 
1920
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/language.js
2013
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/language.js
1921
2014
  var LATIN_WORDS = {
1922
2015
  en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
1923
2016
  es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
@@ -1966,7 +2059,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
1966
2059
  return null;
1967
2060
  }, "transcriptLanguage");
1968
2061
 
1969
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
2062
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
1970
2063
  var contentHash = /* @__PURE__ */ __name(async (text7) => {
1971
2064
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text7));
1972
2065
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -2003,7 +2096,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
2003
2096
  return time2;
2004
2097
  }, "timestamp");
2005
2098
 
2006
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2099
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
2007
2100
  var TranscriptTextError = class extends Error {
2008
2101
  static {
2009
2102
  __name(this, "TranscriptTextError");
@@ -2058,7 +2151,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
2058
2151
  return { header, lines };
2059
2152
  }, "parseTranscriptText");
2060
2153
 
2061
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2154
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
2062
2155
  var VttError = class extends Error {
2063
2156
  static {
2064
2157
  __name(this, "VttError");
@@ -2110,7 +2203,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
2110
2203
  return cues;
2111
2204
  }, "parseVtt");
2112
2205
 
2113
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/import.js
2206
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/import.js
2114
2207
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
2115
2208
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
2116
2209
  for (const file of files) {
@@ -2143,10 +2236,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
2143
2236
  return report;
2144
2237
  }, "importFiles");
2145
2238
 
2146
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/links.js
2239
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/links.js
2147
2240
  var CHAT_MESSAGES_READ = 1e5;
2148
2241
 
2149
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/provider.js
2242
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/provider.js
2150
2243
  var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
2151
2244
  const provider = scope2?.provider;
2152
2245
  const account = scope2?.account;
@@ -2155,7 +2248,7 @@ var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
2155
2248
  return Object.freeze({ provider, account });
2156
2249
  }, "snapshotMeetingScope");
2157
2250
 
2158
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2251
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
2159
2252
  var nonempty = /* @__PURE__ */ __name((value, name) => {
2160
2253
  if (typeof value !== "string" || !value.trim())
2161
2254
  throw new CliError("validation_error", `${name} must be nonempty`);
@@ -2221,7 +2314,7 @@ var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) =
2221
2314
  return { applied: true, value: await dispatch(signal) };
2222
2315
  }, "dispatchMeetingMutation");
2223
2316
 
2224
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
2317
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
2225
2318
  var id = /* @__PURE__ */ __name((value) => {
2226
2319
  if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
2227
2320
  throw new CliError("validation_error", "meeting context identifiers must be positive integers");
@@ -2343,7 +2436,7 @@ var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) =>
2343
2436
  };
2344
2437
  }, "createMeetingContext");
2345
2438
 
2346
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2439
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
2347
2440
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2348
2441
  if (!original || typeof original !== "object" || Array.isArray(original))
2349
2442
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -2368,7 +2461,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
2368
2461
  return { ...input, limit, maxReadBytes };
2369
2462
  }, "validateMeetingPreparationContext");
2370
2463
 
2371
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2464
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2372
2465
  var count4 = pipe(number(), integer(), minValue(0));
2373
2466
  var id2 = pipe(string(), minLength(1));
2374
2467
  var meetingProjectEvidence = strictObject({
@@ -2489,7 +2582,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
2489
2582
  };
2490
2583
  }, "meetingProjectEvidenceAnswer");
2491
2584
 
2492
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2585
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
2493
2586
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2494
2587
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
2495
2588
  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) || [
@@ -2509,7 +2602,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
2509
2602
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
2510
2603
  }, "validateMeetingHitSearch");
2511
2604
 
2512
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2605
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
2513
2606
  var ids = {
2514
2607
  meeting_id: "meetingId",
2515
2608
  identity_id: "participantIdentityId",
@@ -2600,7 +2693,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project2, request =
2600
2693
  return { project: project2.trim(), options, query: frozen.join(" AND ") };
2601
2694
  }, "prepareMeetingProjectEvidence");
2602
2695
 
2603
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2696
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
2604
2697
  var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, request = {}, now = Date.now()) => {
2605
2698
  const prepared = prepareMeetingProjectEvidence(project2, request, now);
2606
2699
  const page = await read(prepared.project, prepared.options);
@@ -2608,7 +2701,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, r
2608
2701
  return meetingProjectEvidenceAnswer(page, prepared);
2609
2702
  }, "readMeetingProjectEvidence");
2610
2703
 
2611
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2704
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/pull.js
2612
2705
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
2613
2706
  const { identityExternalId, phone, ...fields2 } = p;
2614
2707
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
@@ -2624,6 +2717,93 @@ var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, posit
2624
2717
  }
2625
2718
  };
2626
2719
  }, "participantInput");
2720
+ var participantInputs = /* @__PURE__ */ __name((provider, occurrenceId2, list, accountId) => list.map((p, i) => participantInput(p, provider, occurrenceId2, i, accountId)), "participantInputs");
2721
+ var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount, kept) => {
2722
+ const startedAt = timestamp2(m.occurrence.startedAt);
2723
+ const given = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
2724
+ if (given !== null && given < startedAt)
2725
+ throw new Error("Meeting ends before it starts");
2726
+ const keptEnd = kept?.endedAt ?? null;
2727
+ const endedAt = given ?? (keptEnd !== null && keptEnd >= startedAt ? keptEnd : null);
2728
+ const count7 = participantsCount === null && kept ? kept.participantsCount : participantsCount;
2729
+ const metadata = kept?.metadata && m.metadata ? { ...kept.metadata, ...m.metadata } : m.metadata ?? kept?.metadata ?? null;
2730
+ const meeting2 = {
2731
+ accountId,
2732
+ externalId: m.occurrence.id,
2733
+ title: m.occurrence.title,
2734
+ description: m.description ?? kept?.description ?? null,
2735
+ location: m.location ?? kept?.location ?? null,
2736
+ joinUrl: m.joinUrl ?? m.series?.joinUrl ?? kept?.joinUrl ?? null,
2737
+ startedAt,
2738
+ endedAt,
2739
+ durationMs: endedAt === null ? null : endedAt - startedAt,
2740
+ timezone: m.timezone ?? kept?.timezone ?? null,
2741
+ hostIdentityId: kept?.hostIdentityId ?? null,
2742
+ ...count7 === void 0 ? {} : { participantsCount: count7 },
2743
+ metadata,
2744
+ deletedAt: null
2745
+ };
2746
+ if (m.series)
2747
+ meeting2.series = {
2748
+ externalId: m.series.id,
2749
+ title: m.series.title,
2750
+ description: null,
2751
+ kind: m.series.kind ?? null,
2752
+ recurrence: m.series.recurrence ?? null,
2753
+ hostIdentityId: null,
2754
+ joinUrl: m.series.joinUrl ?? null,
2755
+ metadata: null,
2756
+ deletedAt: null
2757
+ };
2758
+ return meeting2;
2759
+ }, "sourceMeetingInput");
2760
+ var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts2, { accountId, now, kept }) => {
2761
+ const id5 = m.occurrence.id;
2762
+ const { participants: sourceParticipants, transcript: lines, chat, summary } = parts2;
2763
+ const participants = participantInputs(source.provider, id5, sourceParticipants ?? [], accountId);
2764
+ const meeting2 = sourceMeetingInput(m, accountId, sourceParticipants === void 0 ? void 0 : sourceParticipants?.length ?? null, kept);
2765
+ const linked = sourceParticipants !== void 0;
2766
+ const format = source.transcriptFormat ?? null;
2767
+ const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
2768
+ const details = await store.saveMeeting({
2769
+ meeting: meeting2,
2770
+ participants: sourceParticipants ? participants : void 0,
2771
+ transcripts,
2772
+ chat: chat?.map((line2) => ({
2773
+ externalId: null,
2774
+ sentAt: timestamp2(line2.sentAt),
2775
+ senderParticipantPosition: speakerPosition(line2.sender, participants),
2776
+ senderName: line2.sender,
2777
+ recipient: null,
2778
+ text: line2.text,
2779
+ normalizedText: null,
2780
+ metadata: null
2781
+ })),
2782
+ summaries: summary ? [
2783
+ {
2784
+ ...summary,
2785
+ source: summary.source ?? source.name,
2786
+ content: summary.content ?? null,
2787
+ docUrl: summary.docUrl ?? null,
2788
+ externalCreatedAt: summary.externalCreatedAt ?? null,
2789
+ externalUpdatedAt: summary.externalUpdatedAt ?? null,
2790
+ metadata: summary.metadata ?? null
2791
+ }
2792
+ ] : void 0,
2793
+ attachments: parts2.files ?? void 0,
2794
+ documents: parts2.documents ?? void 0,
2795
+ now
2796
+ });
2797
+ if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
2798
+ await store.saveMeeting({
2799
+ meeting: meeting2,
2800
+ transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
2801
+ unlinked`, format)],
2802
+ now
2803
+ });
2804
+ await linkEvent(store, details, now, { create: source.createsEvents !== false });
2805
+ return details;
2806
+ }, "saveSourceMeeting");
2627
2807
  var startOf = /* @__PURE__ */ __name((m) => {
2628
2808
  const at = Date.parse(m.occurrence.startedAt);
2629
2809
  return Number.isFinite(at) ? at : Number.POSITIVE_INFINITY;
@@ -2686,7 +2866,7 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2686
2866
  }, "read");
2687
2867
  try {
2688
2868
  const sourceParticipants = await read("participants", () => source.participants(id5));
2689
- const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider, id5, i, options.accountId));
2869
+ const participants = participantInputs(source.provider, id5, sourceParticipants ?? [], options.accountId);
2690
2870
  const names = /* @__PURE__ */ new Map();
2691
2871
  for (const p of participants)
2692
2872
  if (p.displayName !== null) {
@@ -2702,78 +2882,7 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
2702
2882
  const attachments = await read("files", () => source.files(id5));
2703
2883
  const listDocuments = source.documents?.bind(source);
2704
2884
  const documents = listDocuments ? await read("documents", () => listDocuments(id5)) : void 0;
2705
- const startedAt = timestamp2(m.occurrence.startedAt);
2706
- const endedAt = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
2707
- if (endedAt !== null && endedAt < startedAt)
2708
- throw new Error("Meeting ends before it starts");
2709
- const meeting2 = {
2710
- accountId: options.accountId,
2711
- externalId: id5,
2712
- title: m.occurrence.title,
2713
- description: m.description ?? null,
2714
- location: m.location ?? null,
2715
- joinUrl: m.joinUrl ?? m.series?.joinUrl ?? null,
2716
- startedAt,
2717
- endedAt,
2718
- durationMs: endedAt === null ? null : endedAt - startedAt,
2719
- timezone: m.timezone ?? null,
2720
- hostIdentityId: null,
2721
- ...sourceParticipants === void 0 ? {} : { participantsCount: sourceParticipants?.length ?? null },
2722
- metadata: m.metadata ?? null,
2723
- deletedAt: null
2724
- };
2725
- if (m.series)
2726
- meeting2.series = {
2727
- externalId: m.series.id,
2728
- title: m.series.title,
2729
- description: null,
2730
- kind: m.series.kind ?? null,
2731
- recurrence: m.series.recurrence ?? null,
2732
- hostIdentityId: null,
2733
- joinUrl: m.series.joinUrl ?? null,
2734
- metadata: null,
2735
- deletedAt: null
2736
- };
2737
- const linked = sourceParticipants !== void 0;
2738
- const format = source.transcriptFormat ?? null;
2739
- const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
2740
- const details = await store.saveMeeting({
2741
- meeting: meeting2,
2742
- participants: sourceParticipants ? participants : void 0,
2743
- transcripts,
2744
- chat: chat?.map((line2) => ({
2745
- externalId: null,
2746
- sentAt: timestamp2(line2.sentAt),
2747
- senderParticipantPosition: speakerPosition(line2.sender, participants),
2748
- senderName: line2.sender,
2749
- recipient: null,
2750
- text: line2.text,
2751
- normalizedText: null,
2752
- metadata: null
2753
- })),
2754
- summaries: summary ? [
2755
- {
2756
- ...summary,
2757
- source: summary.source ?? source.name,
2758
- content: summary.content ?? null,
2759
- docUrl: summary.docUrl ?? null,
2760
- externalCreatedAt: summary.externalCreatedAt ?? null,
2761
- externalUpdatedAt: summary.externalUpdatedAt ?? null,
2762
- metadata: summary.metadata ?? null
2763
- }
2764
- ] : void 0,
2765
- attachments: attachments ?? void 0,
2766
- documents: documents ?? void 0,
2767
- now
2768
- });
2769
- if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
2770
- await store.saveMeeting({
2771
- meeting: meeting2,
2772
- transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
2773
- unlinked`, format)],
2774
- now
2775
- });
2776
- await linkEvent(store, details, now, { create: source.createsEvents !== false });
2885
+ await saveSourceMeeting(source, store, m, { participants: sourceParticipants, transcript: lines, chat, summary, files: attachments, documents }, { accountId: options.accountId, now });
2777
2886
  for (const p of participants)
2778
2887
  if (p.identity.phone)
2779
2888
  callers.add(p.identity.externalId);
@@ -2792,7 +2901,7 @@ unlinked`, format)],
2792
2901
  return report;
2793
2902
  }, "pull");
2794
2903
 
2795
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2904
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2796
2905
  var text5 = string();
2797
2906
  var count5 = pipe(number(), integer(), minValue(0));
2798
2907
  var id3 = pipe(number(), integer(), minValue(1));
@@ -2987,10 +3096,291 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
2987
3096
  updated_at: new Date(one.updatedAt).toISOString()
2988
3097
  }), "eventItem");
2989
3098
 
2990
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
3099
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
3100
+ var MEETING_SERVER_BOUNDS = { calls: 3, pages: 2 };
3101
+ var ISSUES = {
3102
+ offline: ["permission_error", "meetings.server-offline"],
3103
+ unreachable: ["network_error", "meetings.server-unreachable"],
3104
+ not_signed_in: ["authentication_error", "meetings.server-signed-out"],
3105
+ refused: ["permission_error", "meetings.server-refused"],
3106
+ failed: ["provider_error", "meetings.server-failed"]
3107
+ };
3108
+ var metaOf = /* @__PURE__ */ __name((reason, provider) => {
3109
+ const issue = ISSUES[reason];
3110
+ return issue && { complete: false, issues: [{ code: issue[0], reason: issue[1], source: provider }] };
3111
+ }, "metaOf");
3112
+ var WHY = {
3113
+ unsupported: /* @__PURE__ */ __name((provider) => `${provider} cannot be asked for meetings here \u2014 the answer is the store's`, "unsupported"),
3114
+ offline: /* @__PURE__ */ __name(() => "--offline: the service was not asked \u2014 the answer is the store's", "offline"),
3115
+ unreachable: /* @__PURE__ */ __name((provider) => `${provider} could not be reached \u2014 the answer is the store's`, "unreachable"),
3116
+ not_signed_in: /* @__PURE__ */ __name((provider) => `not signed in to ${provider} \u2014 the answer is the store's`, "not_signed_in"),
3117
+ refused: /* @__PURE__ */ __name((provider) => `${provider} refused the request \u2014 the answer is the store's`, "refused"),
3118
+ failed: /* @__PURE__ */ __name((provider) => `${provider} could not be read \u2014 the answer is the store's`, "failed"),
3119
+ no_upcoming: /* @__PURE__ */ __name((provider) => `${provider} lists no meeting before it starts \u2014 upcoming ones are not in the answer`, "no_upcoming")
3120
+ };
3121
+ var reasonOf = /* @__PURE__ */ __name((error) => {
3122
+ const code = error instanceof CliError ? error.code : void 0;
3123
+ if (code === "authentication_error")
3124
+ return "not_signed_in";
3125
+ if (code === "permission_error")
3126
+ return "refused";
3127
+ if (code === "network_error")
3128
+ return "unreachable";
3129
+ return "failed";
3130
+ }, "reasonOf");
3131
+ var refusal = /* @__PURE__ */ __name((reason, provider, error) => error ?? new CliError("validation_error", `--backend server: ${WHY[reason](provider).replace(/ — .*$/, "")}; use --backend archive or both`, { reason }), "refusal");
3132
+ var within = /* @__PURE__ */ __name((one, other) => {
3133
+ const from = Math.max(one.from ?? -Infinity, other.from ?? -Infinity);
3134
+ const to = Math.min(one.to ?? Infinity, other.to ?? Infinity);
3135
+ if (from > to)
3136
+ return void 0;
3137
+ return { ...Number.isFinite(from) ? { from } : {}, ...Number.isFinite(to) ? { to } : {} };
3138
+ }, "within");
3139
+ var findsOf = /* @__PURE__ */ __name((source, zone, now) => ({
3140
+ fields: { ...source.finds.fields, started_at: ["term", "range"] },
3141
+ negatable: source.finds.negatable?.filter((field) => field !== "started_at") ?? [],
3142
+ maxCalls: MEETING_SERVER_BOUNDS.calls,
3143
+ all: { window: {}, terms: [] },
3144
+ leaf: /* @__PURE__ */ __name((predicate, negated) => predicate.field === "started_at" ? { window: windowOf(rangeOf(predicate, zone, now)), terms: [] } : { window: {}, terms: [{ predicate, negated }] }, "leaf"),
3145
+ both: /* @__PURE__ */ __name((one, other) => {
3146
+ const window = within(one.window, other.window);
3147
+ return window && { window, terms: [...one.terms, ...other.terms] };
3148
+ }, "both")
3149
+ }), "findsOf");
3150
+ var reachesFuture = /* @__PURE__ */ __name(({ to }, now) => to === void 0 || to > now, "reachesFuture");
3151
+ var storedByExternalId = /* @__PURE__ */ __name(async (store, accountId, externalId) => {
3152
+ if (store.meetingByExternalId)
3153
+ return store.meetingByExternalId(accountId, externalId);
3154
+ const span = { start: 0, end: 0 };
3155
+ const query = {
3156
+ version: 1,
3157
+ language: "lucene-v1",
3158
+ root: { kind: "predicate", field: "provider_id", operator: "term", value: externalId, span }
3159
+ };
3160
+ const [row] = await store.meetings({ accountId, query, includeDeleted: true, limit: 1 });
3161
+ return row ? store.meeting(row.id) : null;
3162
+ }, "storedByExternalId");
3163
+ var peopleKey = /* @__PURE__ */ __name((people) => JSON.stringify(people.map(({ email, displayName }) => [email ?? "", displayName ?? ""]).sort()), "peopleKey");
3164
+ var unchanged = /* @__PURE__ */ __name((found, stored, accountId) => {
3165
+ const participants = found.participants;
3166
+ const input = sourceMeetingInput(found.meeting, accountId, participants === void 0 ? void 0 : participants?.length ?? null, stored.meeting);
3167
+ const row = stored.meeting;
3168
+ return row.deletedAt === null && input.title === row.title && input.description === row.description && input.location === row.location && input.joinUrl === row.joinUrl && input.startedAt === row.startedAt && input.endedAt === row.endedAt && input.timezone === row.timezone && JSON.stringify(input.metadata ?? null) === JSON.stringify(row.metadata ?? null) && (input.series === void 0 || input.series.externalId === stored.series?.externalId && input.series.title === stored.series.title) && (participants == null || row.participantsCount === participants.length && peopleKey(participants) === peopleKey(stored.participants));
3169
+ }, "unchanged");
3170
+ var stepFor = /* @__PURE__ */ __name((backend) => ({
3171
+ report: {
3172
+ backend: backend === "server" ? "server" : "both",
3173
+ skipped: null,
3174
+ calls: 0,
3175
+ returned: 0,
3176
+ new: 0,
3177
+ failed: 0,
3178
+ complete: true
3179
+ },
3180
+ found: /* @__PURE__ */ new Map(),
3181
+ missing: []
3182
+ }), "stepFor");
3183
+ var keep = /* @__PURE__ */ __name(async (source, store, accountId, now, step, found, parts2, fresh = false) => {
3184
+ const stored = await storedByExternalId(store, accountId, found.meeting.occurrence.id);
3185
+ const details = stored && !fresh && unchanged(found, stored, accountId) ? stored : await saveSourceMeeting(source, store, found.meeting, parts2, {
3186
+ accountId,
3187
+ now,
3188
+ ...stored ? { kept: stored.meeting } : {}
3189
+ });
3190
+ step.found.set(details.meeting.id, stored ? "both" : "server");
3191
+ step.report.returned += 1;
3192
+ if (!stored)
3193
+ step.report.new += 1;
3194
+ return details;
3195
+ }, "keep");
3196
+ var askServerForList = /* @__PURE__ */ __name(async (source, store, accountId, query, access) => {
3197
+ const backend = access.backend ?? "both";
3198
+ if (backend === "archive")
3199
+ return void 0;
3200
+ const step = stepFor(backend);
3201
+ const provider = source?.name ?? "the service";
3202
+ const skip = /* @__PURE__ */ __name((reason, error) => {
3203
+ if (backend === "server")
3204
+ throw refusal(reason, provider, error);
3205
+ step.report.skipped = reason;
3206
+ step.report.complete = false;
3207
+ step.missing.push({ field: "server", why: WHY[reason](provider) });
3208
+ const meta = metaOf(reason, provider);
3209
+ if (meta)
3210
+ step.meta = meta;
3211
+ return step;
3212
+ }, "skip");
3213
+ if (!source?.find || !source.finds)
3214
+ return skip("unsupported");
3215
+ if (access.offline)
3216
+ return skip("offline");
3217
+ const now = access.now ?? Date.now();
3218
+ const finds = source.finds;
3219
+ const capability = findsOf({ ...source, finds }, timezoneOf(access.timezone), now);
3220
+ const { calls, complete } = query ? serviceCallsOf(query.root, capability) : { calls: [capability.all], complete: true };
3221
+ let capped = !complete;
3222
+ let asked = calls;
3223
+ if (finds.upcoming === false) {
3224
+ if (calls.some(({ window }) => reachesFuture(window, now)))
3225
+ step.missing.push({ field: "upcoming", why: WHY.no_upcoming(provider) });
3226
+ asked = calls.flatMap((call) => {
3227
+ const window = within(call.window, { to: now });
3228
+ return window ? [{ ...call, window }] : [];
3229
+ });
3230
+ if (!asked.length)
3231
+ return skip("no_upcoming");
3232
+ }
3233
+ const seen = /* @__PURE__ */ new Set();
3234
+ let failure;
3235
+ for (const call of asked) {
3236
+ let cursor = null;
3237
+ for (let page = 0; page < MEETING_SERVER_BOUNDS.pages; page++) {
3238
+ step.report.calls += 1;
3239
+ let answer;
3240
+ try {
3241
+ answer = await source.find(call.window, call.terms, cursor);
3242
+ } catch (error) {
3243
+ return skip(reasonOf(error), error);
3244
+ }
3245
+ for (const found of answer.meetings) {
3246
+ if (seen.has(found.meeting.occurrence.id))
3247
+ continue;
3248
+ seen.add(found.meeting.occurrence.id);
3249
+ try {
3250
+ await keep(source, store, accountId, now, step, found, { participants: found.participants });
3251
+ } catch (error) {
3252
+ step.report.failed += 1;
3253
+ failure ??= error;
3254
+ }
3255
+ }
3256
+ cursor = answer.next;
3257
+ if (cursor === null)
3258
+ break;
3259
+ if (page === MEETING_SERVER_BOUNDS.pages - 1)
3260
+ capped = true;
3261
+ }
3262
+ }
3263
+ const issues = [];
3264
+ if (step.report.failed) {
3265
+ issues.push({
3266
+ code: failure instanceof CliError ? failure.code : "provider_error",
3267
+ reason: "meetings.server-failed",
3268
+ source: provider
3269
+ });
3270
+ const why = failure instanceof Error ? `: ${failure.message}` : "";
3271
+ step.missing.push({
3272
+ field: "server",
3273
+ why: `${step.report.failed} meeting(s) ${provider} returned could not be kept${why} \u2014 the answer is without them`
3274
+ });
3275
+ }
3276
+ if (capped) {
3277
+ issues.push({ code: "outcome_unknown", reason: "meetings.server-capped", source: provider });
3278
+ const { calls: calls2, returned } = step.report;
3279
+ step.missing.push({
3280
+ field: "server",
3281
+ why: `${provider} was asked ${calls2} time(s) and returned ${returned} meeting(s), not every one that may match \u2014 narrow the query by started_at`
3282
+ });
3283
+ }
3284
+ if (issues.length) {
3285
+ step.report.complete = false;
3286
+ step.meta = { complete: false, issues };
3287
+ }
3288
+ return step;
3289
+ }, "askServerForList");
3290
+ var meetingsListThrough = /* @__PURE__ */ __name(async (source, store, filter, access) => {
3291
+ const now = access.now ?? Date.now();
3292
+ const zoned = { ...filter, timezone: timezoneOf(access.timezone), now };
3293
+ const step = await askServerForList(source, store, filter.accountId, filter.query, { ...access, now });
3294
+ if (!step)
3295
+ return meetingsList(store, zoned);
3296
+ const extras = {
3297
+ server: step.report,
3298
+ ...step.missing.length ? { missing: step.missing } : {},
3299
+ ...step.meta ? { meta: step.meta } : {}
3300
+ };
3301
+ const ids2 = [...step.found.keys()];
3302
+ if (access.backend === "server" && !ids2.length)
3303
+ return { items: [], page: { mode: "page", limit: filter.limit ?? 100, has_more: false }, ...extras };
3304
+ const list = await meetingsList(store, access.backend === "server" ? { ...zoned, ids: ids2 } : zoned);
3305
+ return {
3306
+ ...list,
3307
+ items: list.items.map((item) => ({ ...item, found_in: step.found.get(Number(item.id)) ?? "archive" })),
3308
+ ...extras
3309
+ };
3310
+ }, "meetingsListThrough");
3311
+ var storedMeeting = /* @__PURE__ */ __name(async (store, accountId, meeting2) => {
3312
+ const text7 = meeting2.trim();
3313
+ const own = /* @__PURE__ */ __name((details) => details?.meeting.accountId === accountId ? details : null, "own");
3314
+ if (/^[1-9]\d*$/.test(text7) && Number.isSafeInteger(Number(text7))) {
3315
+ const byNumber = own(await store.meeting(Number(text7)));
3316
+ if (byNumber)
3317
+ return byNumber;
3318
+ }
3319
+ if (text7.startsWith("meeting:")) {
3320
+ const reference2 = parseMeetingReference(text7);
3321
+ if (reference2.accountId !== accountId)
3322
+ throw new MeetingError("not_found", "meeting not found");
3323
+ return own(await store.meeting(reference2.meetingId));
3324
+ }
3325
+ return store.meetingByExternalId ? own(await store.meetingByExternalId(accountId, text7)) : null;
3326
+ }, "storedMeeting");
3327
+ var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId, meeting2, access) => {
3328
+ if (!meeting2.trim())
3329
+ throw new MeetingError("validation_error", "name a meeting");
3330
+ const stored = await storedMeeting(store, accountId, meeting2);
3331
+ const backend = access.backend ?? "both";
3332
+ const notFound = /* @__PURE__ */ __name(() => new MeetingError("not_found", "meeting not found"), "notFound");
3333
+ if (backend === "archive") {
3334
+ if (!stored)
3335
+ throw notFound();
3336
+ return { details: stored };
3337
+ }
3338
+ const step = stepFor(backend);
3339
+ const provider = source?.name ?? "the service";
3340
+ const fromStore = /* @__PURE__ */ __name((reason, error) => {
3341
+ if (backend === "server")
3342
+ throw refusal(reason, provider, error);
3343
+ if (!stored)
3344
+ throw error instanceof CliError && reason !== "failed" ? error : notFound();
3345
+ step.report.skipped = reason;
3346
+ step.report.complete = false;
3347
+ const meta = metaOf(reason, provider);
3348
+ return {
3349
+ details: stored,
3350
+ foundIn: "archive",
3351
+ server: step.report,
3352
+ missing: [{ field: "server", why: WHY[reason](provider) }],
3353
+ ...meta ? { meta } : {}
3354
+ };
3355
+ }, "fromStore");
3356
+ const providerId = stored?.meeting.externalId ?? (meeting2.trim().startsWith("meeting:") ? void 0 : meeting2.trim());
3357
+ if (providerId === void 0)
3358
+ throw notFound();
3359
+ if (!source?.get)
3360
+ return fromStore("unsupported");
3361
+ if (access.offline)
3362
+ return fromStore("offline");
3363
+ step.report.calls = 1;
3364
+ let full;
3365
+ try {
3366
+ full = await source.get(providerId);
3367
+ } catch (error) {
3368
+ return fromStore(reasonOf(error), error);
3369
+ }
3370
+ if (!full) {
3371
+ if (!stored || backend === "server")
3372
+ throw notFound();
3373
+ return { details: stored, foundIn: "archive", server: step.report };
3374
+ }
3375
+ const details = await keep(source, store, accountId, access.now ?? Date.now(), step, full, { participants: full.participants, transcript: full.transcript, documents: full.documents }, true);
3376
+ const fresh = await store.meeting(details.meeting.id) ?? details;
3377
+ return { details: fresh, foundIn: step.found.get(details.meeting.id) ?? "server", server: step.report };
3378
+ }, "meetingShowThrough");
3379
+
3380
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2991
3381
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
2992
3382
 
2993
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
3383
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2994
3384
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2995
3385
  if (!original || typeof original !== "object" || Array.isArray(original))
2996
3386
  throw new CliError("validation_error", "related history request is required");
@@ -3020,14 +3410,14 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
3020
3410
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
3021
3411
  }, "validateMeetingRelatedHistory");
3022
3412
 
3023
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/review.js
3413
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/review.js
3024
3414
  var REVIEW_LIMIT = { default: 50, most: 200 };
3025
3415
 
3026
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3416
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
3027
3417
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
3028
3418
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
3029
3419
 
3030
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3420
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
3031
3421
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3032
3422
  input.signal?.throwIfAborted();
3033
3423
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -3048,10 +3438,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
3048
3438
  return { ...input, limit, maxReadBytes };
3049
3439
  }, "validateMeetingSeriesHistory");
3050
3440
 
3051
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3441
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
3052
3442
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
3053
3443
 
3054
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3444
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
3055
3445
  function invalid4(field, response = false) {
3056
3446
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
3057
3447
  }
@@ -3067,11 +3457,11 @@ var cursorDetails = /* @__PURE__ */ __name((value) => {
3067
3457
  if (typeof value !== "string" || value.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(value))
3068
3458
  invalid4("cursor");
3069
3459
  try {
3070
- const decoded = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
3071
- object(decoded, ["version", "selection", "cursor"], "cursor");
3072
- if (decoded.version !== 1 || typeof decoded.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded.selection) || !occurrenceId(decoded.cursor))
3460
+ const decoded2 = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
3461
+ object(decoded2, ["version", "selection", "cursor"], "cursor");
3462
+ if (decoded2.version !== 1 || typeof decoded2.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded2.selection) || !occurrenceId(decoded2.cursor))
3073
3463
  invalid4("cursor");
3074
- return decoded;
3464
+ return decoded2;
3075
3465
  } catch {
3076
3466
  return invalid4("cursor");
3077
3467
  }
@@ -3080,7 +3470,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
3080
3470
  cursorDetails(value);
3081
3471
  }, "validateMeetingSeriesInventoryCursor");
3082
3472
 
3083
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/meetings/stats.js
3473
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/stats.js
3084
3474
  var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
3085
3475
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
3086
3476
  const zone = timeZone ?? "UTC";
@@ -3215,14 +3605,14 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
3215
3605
  };
3216
3606
  }, "aggregateMeetingStats");
3217
3607
 
3218
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/source-review.js
3608
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/source-review.js
3219
3609
  var SOURCE_REVIEW_KIND = "memory_source_review";
3220
3610
  var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
3221
3611
  var ERASED_TEXT = "[source erased]";
3222
3612
  var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
3223
3613
  var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
3224
3614
 
3225
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/tasks/model.js
3615
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/tasks/model.js
3226
3616
  var TASK_KINDS = ["question", "request", "mention", "promise"];
3227
3617
  var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
3228
3618
  var CLOSED_STATES = ["done", "dismissed"];
@@ -3237,7 +3627,7 @@ function closeTask(task, state, by, at, reason) {
3237
3627
  }
3238
3628
  __name(closeTask, "closeTask");
3239
3629
 
3240
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/tasks/priority.js
3630
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/tasks/priority.js
3241
3631
  var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
3242
3632
  var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
3243
3633
  var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
@@ -3266,7 +3656,7 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
3266
3656
  }, "priorityOf");
3267
3657
  var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
3268
3658
 
3269
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/tasks/service.js
3659
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/tasks/service.js
3270
3660
  function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
3271
3661
  async function find(id5) {
3272
3662
  const task = await store.get(id5);
@@ -3326,13 +3716,13 @@ function median(values) {
3326
3716
  }
3327
3717
  __name(median, "median");
3328
3718
 
3329
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/tasks/store.js
3719
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/tasks/store.js
3330
3720
  function matches(task, filter) {
3331
3721
  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);
3332
3722
  }
3333
3723
  __name(matches, "matches");
3334
3724
 
3335
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
3725
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
3336
3726
  var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
3337
3727
  var MEMORY_KINDS = ["summary", "digest", "preference"];
3338
3728
  var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
@@ -3340,10 +3730,10 @@ var MEMORY_SCOPES = ["personal", "work"];
3340
3730
  var WORK_TASK_TYPES = ["bug", "feature", "chore"];
3341
3731
  var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
3342
3732
 
3343
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/categories.js
3733
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/categories.js
3344
3734
  var CATEGORIES = ["client", "supplier", "partner", "employer"];
3345
3735
 
3346
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/fields.js
3736
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/fields.js
3347
3737
  var text6 = string();
3348
3738
  var id4 = pipe(string(), minLength(1));
3349
3739
  var time = isoTime;
@@ -3368,7 +3758,7 @@ var author = strictObject({
3368
3758
  name: nullable(text6)
3369
3759
  });
3370
3760
 
3371
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
3761
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
3372
3762
  var organization = strictObject({
3373
3763
  id: id4,
3374
3764
  ref: reference,
@@ -3398,7 +3788,7 @@ var reminder = strictObject({
3398
3788
  receipt: nullable(text6)
3399
3789
  });
3400
3790
 
3401
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/money.js
3791
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/money.js
3402
3792
  var CURRENCY_SCALES = {
3403
3793
  AED: 2,
3404
3794
  AMD: 2,
@@ -3492,7 +3882,7 @@ var quantityOf = /* @__PURE__ */ __name((text7) => {
3492
3882
  }, "quantityOf");
3493
3883
  var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
3494
3884
 
3495
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/finance.js
3885
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/finance.js
3496
3886
  var INVOICE_DIRECTIONS = ["receivable", "payable"];
3497
3887
  var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
3498
3888
  var MONEY_DIRECTIONS = ["in", "out"];
@@ -3521,7 +3911,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
3521
3911
  var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
3522
3912
  var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
3523
3913
 
3524
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/business.js
3914
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/business.js
3525
3915
  var CATALOG_KINDS = ["product", "service"];
3526
3916
  var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
3527
3917
  var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
@@ -3549,7 +3939,7 @@ var subscriptionLine = /* @__PURE__ */ __name((subscription) => `${subscription.
3549
3939
  var walletLine = /* @__PURE__ */ __name((wallet) => `${wallet.name} \xB7 ${wallet.kind}, ${wallet.currency}${wallet.numberHint === null ? "" : `, \u2026${wallet.numberHint}`}` + notes(wallet.closed ? "closed" : null), "walletLine");
3550
3940
  var transactionLine = /* @__PURE__ */ __name((transaction) => `${moneyLabel(transaction.amount, transaction.currency)} ${transaction.direction}${transaction.label === null ? "" : ` \xB7 ${transaction.label}`}, ${dayMonth(transaction.date)}` + notes(transaction.status === "pending" ? "pending" : null, pending(transaction.review)), "transactionLine");
3551
3941
 
3552
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/marks.js
3942
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/marks.js
3553
3943
  import { readFileSync as readFileSync2, rmSync as rmSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
3554
3944
  var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
3555
3945
  var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
@@ -3670,21 +4060,28 @@ var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, sch
3670
4060
  return { previous, cleared };
3671
4061
  }, "recordDeepCheck");
3672
4062
 
3673
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/locator.js
4063
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/locator.js
3674
4064
  var SCHEME = "msg:";
3675
4065
  var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
3676
4066
  var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
3677
4067
  var parseLocator = /* @__PURE__ */ __name((reference2) => {
3678
4068
  const trimmed = reference2.trim();
3679
4069
  const parts2 = trimmed.startsWith(SCHEME) ? trimmed.slice(SCHEME.length).split("/") : [];
3680
- if (parts2.length !== 4 || parts2.some((part) => part === "")) {
3681
- throw new CliError("validation_error", `"${singleLine(reference2)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`);
3682
- }
3683
- const [provider, account, chat, message] = parts2.map(decodeURIComponent);
4070
+ const malformed2 = /* @__PURE__ */ __name(() => new CliError("validation_error", `"${singleLine(reference2)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`), "malformed");
4071
+ if (parts2.length !== 4 || parts2.some((part) => part === ""))
4072
+ throw malformed2();
4073
+ const decoded2 = /* @__PURE__ */ __name((part) => {
4074
+ try {
4075
+ return decodeURIComponent(part);
4076
+ } catch {
4077
+ throw malformed2();
4078
+ }
4079
+ }, "decoded");
4080
+ const [provider, account, chat, message] = parts2.map(decoded2);
3684
4081
  return { provider, account, chat, message };
3685
4082
  }, "parseLocator");
3686
4083
 
3687
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/references.js
4084
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/references.js
3688
4085
  var SIMPLE_REFERENCES = [
3689
4086
  "note",
3690
4087
  "document",
@@ -3712,11 +4109,18 @@ var SIMPLE_REFERENCES = [
3712
4109
  var malformed = /* @__PURE__ */ __name((text7, shape) => new CliError("validation_error", `"${singleLine(text7)}" is not a reference \u2014 expected ${shape}`, {
3713
4110
  reason: "ref.malformed"
3714
4111
  }), "malformed");
4112
+ var decoded = /* @__PURE__ */ __name((part, text7, shape) => {
4113
+ try {
4114
+ return decodeURIComponent(part);
4115
+ } catch {
4116
+ throw malformed(text7, shape);
4117
+ }
4118
+ }, "decoded");
3715
4119
  var parts = /* @__PURE__ */ __name((rest, count7, text7, shape) => {
3716
4120
  const split = rest.split("/");
3717
4121
  if (split.length !== count7 || split.some((part) => part === ""))
3718
4122
  throw malformed(text7, shape);
3719
- return split.map(decodeURIComponent);
4123
+ return split.map((part) => decoded(part, text7, shape));
3720
4124
  }, "parts");
3721
4125
  var encoded = /* @__PURE__ */ __name((...values) => values.map(encodeURIComponent).join("/"), "encoded");
3722
4126
  var folderPath = /* @__PURE__ */ __name((path) => {
@@ -3724,8 +4128,8 @@ var folderPath = /* @__PURE__ */ __name((path) => {
3724
4128
  return clean === "" ? path.trim() === "" ? "" : null : clean;
3725
4129
  }, "folderPath");
3726
4130
  var MEETING_SHAPE = "meeting:<account>/<meeting>[/<transcript>[/<cue>]] with safe integer ids";
3727
- var kind = /* @__PURE__ */ __name((spec) => spec, "kind");
3728
- var simple = /* @__PURE__ */ __name((prefix) => kind({
4131
+ var kind2 = /* @__PURE__ */ __name((spec) => spec, "kind");
4132
+ var simple = /* @__PURE__ */ __name((prefix) => kind2({
3729
4133
  prefix,
3730
4134
  type: prefix,
3731
4135
  shape: `${prefix}:<id>`,
@@ -3739,7 +4143,7 @@ var simple = /* @__PURE__ */ __name((prefix) => kind({
3739
4143
  format: /* @__PURE__ */ __name((reference2) => `${reference2.type}:${reference2.id}`, "format")
3740
4144
  }), "simple");
3741
4145
  var REF_KINDS = [
3742
- kind({
4146
+ kind2({
3743
4147
  prefix: "msg",
3744
4148
  type: "message",
3745
4149
  shape: "msg:<provider>/<account>/<chat>/<message>",
@@ -3752,7 +4156,7 @@ var REF_KINDS = [
3752
4156
  }, "parse"),
3753
4157
  format: formatLocator
3754
4158
  }),
3755
- kind({
4159
+ kind2({
3756
4160
  prefix: "chat",
3757
4161
  type: "chat",
3758
4162
  shape: "chat:<provider>/<account>/<chat>",
@@ -3762,7 +4166,7 @@ var REF_KINDS = [
3762
4166
  }, "parse"),
3763
4167
  format: /* @__PURE__ */ __name(({ provider, account, chat }) => `chat:${encoded(provider, account, chat)}`, "format")
3764
4168
  }),
3765
- kind({
4169
+ kind2({
3766
4170
  prefix: "contact",
3767
4171
  type: "contact",
3768
4172
  shape: "contact:<provider>/<id>",
@@ -3772,21 +4176,21 @@ var REF_KINDS = [
3772
4176
  }, "parse"),
3773
4177
  format: /* @__PURE__ */ __name(({ provider, id: id5 }) => `contact:${encoded(provider, id5)}`, "format")
3774
4178
  }),
3775
- kind({
4179
+ kind2({
3776
4180
  prefix: "folder",
3777
4181
  type: "folder",
3778
4182
  shape: "folder:<id>[/<path>]",
3779
4183
  parse: /* @__PURE__ */ __name((rest, text7) => {
3780
4184
  const slash = rest.indexOf("/");
3781
- const id5 = decodeURIComponent(slash < 0 ? rest : rest.slice(0, slash));
3782
- const path = slash < 0 ? null : folderPath(decodeURIComponent(rest.slice(slash + 1)));
4185
+ const id5 = decoded(slash < 0 ? rest : rest.slice(0, slash), text7, "folder:<id>[/<path>]");
4186
+ const path = slash < 0 ? null : folderPath(decoded(rest.slice(slash + 1), text7, "folder:<id>[/<path>]"));
3783
4187
  if (!id5.trim() || path === "")
3784
4188
  throw malformed(text7, "folder:<id>[/<path>]");
3785
4189
  return { type: "folder", id: id5, path };
3786
4190
  }, "parse"),
3787
4191
  format: /* @__PURE__ */ __name(({ id: id5, path }) => path === null ? `folder:${encodeURIComponent(id5)}` : `folder:${encoded(id5, path)}`, "format")
3788
4192
  }),
3789
- kind({
4193
+ kind2({
3790
4194
  prefix: "meeting",
3791
4195
  type: "meeting",
3792
4196
  shape: MEETING_SHAPE,
@@ -3840,7 +4244,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text7) => {
3840
4244
  return match !== null && byPrefix.has(match[1]);
3841
4245
  }, "looksLikeReference");
3842
4246
 
3843
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/providers.js
4247
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/providers.js
3844
4248
  var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
3845
4249
  var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
3846
4250
  var PROVIDERS = [
@@ -3856,7 +4260,7 @@ var PROVIDERS = [
3856
4260
  { name: "obsidian", kind: "notes", aliases: [] },
3857
4261
  { name: "added", kind: "notes", aliases: [] },
3858
4262
  { name: "zoom", kind: "meetings", aliases: [] },
3859
- { name: "google-meet", kind: "meetings", aliases: [], command: "meet" },
4263
+ { name: "google-meet", kind: "meetings", aliases: [], command: "gmeet" },
3860
4264
  // Its meetings come from the notes Telemost mails (`keeper@telemost.yandex.ru`), read by a mail rule.
3861
4265
  { name: "telemost", kind: "meetings", aliases: [] },
3862
4266
  // A phone export's records: its SMS and its calls in the one account the import names.
@@ -3900,24 +4304,24 @@ var COMMAND_WORDS = /^[a-z0-9][a-z0-9_-]*( [a-z0-9][a-z0-9_-]*)*$/;
3900
4304
  var opensOf = /* @__PURE__ */ __name((value, named) => {
3901
4305
  if (typeof value !== "object" || value === null || Array.isArray(value))
3902
4306
  return invalid5(`provider ${named}'s opens maps a kind of reference to a command`);
3903
- const known = Object.entries(value).filter(([kind2]) => OPEN_KINDS.has(kind2));
3904
- for (const [kind2, command] of known)
4307
+ const known = Object.entries(value).filter(([kind3]) => OPEN_KINDS.has(kind3));
4308
+ for (const [kind3, command] of known)
3905
4309
  if (typeof command !== "string" || !COMMAND_WORDS.test(command))
3906
- invalid5(`provider ${named} opens a ${kind2} with command words, not ${JSON.stringify(command)}`);
4310
+ invalid5(`provider ${named} opens a ${kind3} with command words, not ${JSON.stringify(command)}`);
3907
4311
  return Object.fromEntries(known);
3908
4312
  }, "opensOf");
3909
4313
  var providerEntryOf = /* @__PURE__ */ __name((value) => {
3910
4314
  if (typeof value !== "object" || value === null || Array.isArray(value))
3911
4315
  return invalid5("a provider entry is an object");
3912
- const { name, kind: kind2, kinds, aliases = [], command, opens, imported } = value;
4316
+ const { name, kind: kind3, kinds, aliases = [], command, opens, imported } = value;
3913
4317
  const named = wordOf(name, "a provider's name");
3914
4318
  const isKindWord = /* @__PURE__ */ __name((one) => typeof one === "string" && KINDS.includes(one), "isKindWord");
3915
- const given = kinds === void 0 ? [kind2] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
4319
+ const given = kinds === void 0 ? [kind3] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
3916
4320
  for (const one of given)
3917
4321
  if (!isKindWord(one))
3918
4322
  invalid5(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(one)}`);
3919
4323
  const list = [...new Set(given)];
3920
- if (kind2 !== void 0 && kind2 !== list[0])
4324
+ if (kind3 !== void 0 && kind3 !== list[0])
3921
4325
  invalid5(`provider ${named}'s kind is the first of its kinds`);
3922
4326
  if (!Array.isArray(aliases))
3923
4327
  invalid5(`provider ${named}'s aliases are a list`);
@@ -4008,11 +4412,11 @@ var importedOf = /* @__PURE__ */ __name((entry, held) => {
4008
4412
  return held.imported === true;
4009
4413
  }, "importedOf");
4010
4414
  var isImportedProvider = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.imported === true, "isImportedProvider");
4011
- var holdsKind = /* @__PURE__ */ __name((provider, kind2) => kindsIn(provider).includes(kind2), "holdsKind");
4012
- var holdsKindOf = /* @__PURE__ */ __name((provider, kind2) => kindIn(provider) === void 0 ? kind2 === "messages" : holdsKind(provider, kind2), "holdsKindOf");
4415
+ var holdsKind = /* @__PURE__ */ __name((provider, kind3) => kindsIn(provider).includes(kind3), "holdsKind");
4416
+ var holdsKindOf = /* @__PURE__ */ __name((provider, kind3) => kindIn(provider) === void 0 ? kind3 === "messages" : holdsKind(provider, kind3), "holdsKindOf");
4013
4417
  var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
4014
4418
 
4015
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/query.js
4419
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/query.js
4016
4420
  var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
4017
4421
  var inSource = /* @__PURE__ */ __name((source, provider) => source === "all" || source === "bots" && isBotProvider(provider) || source === "personal" && !isBotProvider(provider) || source === provider || providerNamed(source)?.name === provider || isKind(source) && holdsKindOf(provider, source), "inSource");
4018
4422
  var fail = /* @__PURE__ */ __name((message) => {
@@ -4035,7 +4439,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
4035
4439
  return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
4036
4440
  }, "sourceOf");
4037
4441
 
4038
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/search/account-list.js
4442
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/account-list.js
4039
4443
  var ACCOUNT_GROUPS = "accountGroups";
4040
4444
  var ACCOUNT_GROUPS_SETTING = "account_groups";
4041
4445
  var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
@@ -4053,7 +4457,7 @@ var isGroupName = /* @__PURE__ */ __name((name) => GROUP_NAME.test(name), "isGro
4053
4457
  var groupName = /* @__PURE__ */ __name((name) => isGroupName(name) ? name : fail2(`a group name is letters, digits, - and _ \u2014 not "${name}"`), "groupName");
4054
4458
  var groupMembers = /* @__PURE__ */ __name((value) => itemsOf(value).map((item) => item.toLowerCase().startsWith("group:") ? fail2(`a group lists accounts, not other groups \u2014 "${item}"`) : item.includes(":") && item.split(":")[1] === "" ? fail2(`"${item}" names no account after the colon`) : item), "groupMembers");
4055
4459
  var describe2 = /* @__PURE__ */ __name((accounts) => accounts.map(({ provider, account, name }) => `${provider}:${account}${name ? ` (${name})` : ""}`).join(", "), "describe");
4056
- var listedHolds = /* @__PURE__ */ __name((account, kind2) => (account.kinds ?? (account.kind === void 0 ? [] : [account.kind])).includes(kind2), "listedHolds");
4460
+ var listedHolds = /* @__PURE__ */ __name((account, kind3) => (account.kinds ?? (account.kind === void 0 ? [] : [account.kind])).includes(kind3), "listedHolds");
4057
4461
  var kindHere = /* @__PURE__ */ __name((provider, running) => provider === running.provider ? kindOf(provider) : kindIn(provider), "kindHere");
4058
4462
  var kindsOfHere = /* @__PURE__ */ __name((provider, running) => {
4059
4463
  const kinds = kindsIn(provider);
@@ -4197,10 +4601,10 @@ var entriesOfList = /* @__PURE__ */ __name((value, context3) => {
4197
4601
  const { only } = context3;
4198
4602
  return entries.map(({ entry: entry2, accounts }) => ({
4199
4603
  entry: entry2,
4200
- accounts: accounts.filter((one) => only === void 0 || only.has(keyOf(one))).map(({ provider, account, kind: kind2, kinds }) => ({
4604
+ accounts: accounts.filter((one) => only === void 0 || only.has(keyOf(one))).map(({ provider, account, kind: kind3, kinds }) => ({
4201
4605
  provider,
4202
4606
  account,
4203
- kind: kind2,
4607
+ kind: kind3,
4204
4608
  ...kinds === void 0 ? {} : { kinds }
4205
4609
  }))
4206
4610
  }));
@@ -4222,15 +4626,15 @@ var READS = {
4222
4626
  events: "calendar events \u2014 no search reads them yet",
4223
4627
  crm: "CRM deals and leads \u2014 search all reads them"
4224
4628
  };
4225
- var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf = (kind2) => READS[kind2], alsoFits = () => false) => {
4629
+ var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf2 = (kind3) => READS[kind3], alsoFits = () => false) => {
4226
4630
  const chosen = /* @__PURE__ */ new Map();
4227
4631
  const skipped = [];
4228
4632
  for (const { entry, accounts } of entries) {
4229
- const fits = accounts.filter((one) => kinds.some((kind2) => listedHolds(one, kind2)) || alsoFits(one));
4633
+ const fits = accounts.filter((one) => kinds.some((kind3) => listedHolds(one, kind3)) || alsoFits(one));
4230
4634
  for (const { provider, account } of fits)
4231
4635
  if (!chosen.has(keyOf({ provider, account })))
4232
4636
  chosen.set(keyOf({ provider, account }), { provider, account });
4233
- const known = accounts.filter(({ kind: kind2 }) => kind2 !== void 0);
4637
+ const known = accounts.filter(({ kind: kind3 }) => kind3 !== void 0);
4234
4638
  const unknown2 = accounts.filter((one) => one.kind === void 0 && !alsoFits(one));
4235
4639
  if (known.length)
4236
4640
  for (const { provider, account } of unknown2)
@@ -4238,14 +4642,14 @@ var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf = (kind2) =
4238
4642
  if (fits.length)
4239
4643
  continue;
4240
4644
  const other = known[0];
4241
- skipped.push(other?.kind ? { source: entry, code: "validation_error", reason: reasonOf(other.kind) } : unknown2.length ? { source: entry, code: "not_found", reason: UNKNOWN_PROVIDER } : { source: entry, code: "not_found", reason: "no account in the store" });
4645
+ skipped.push(other?.kind ? { source: entry, code: "validation_error", reason: reasonOf2(other.kind) } : unknown2.length ? { source: entry, code: "not_found", reason: UNKNOWN_PROVIDER } : { source: entry, code: "not_found", reason: "no account in the store" });
4242
4646
  }
4243
4647
  if (chosen.size === 0)
4244
4648
  fail2(`--source names nothing ${what} reads: ${skipped.map(({ source, reason }) => `${source} (${reason})`).join(", ")}`);
4245
4649
  return { accounts: [...chosen.values()], skipped };
4246
4650
  }, "fitting");
4247
4651
 
4248
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/deals.js
4652
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/deals.js
4249
4653
  var DEAL_KINDS = ["deal", "lead"];
4250
4654
  var DEAL_STATUSES = ["open", "won", "lost"];
4251
4655
  var STAGE_OUTCOMES = DEAL_STATUSES;
@@ -4255,7 +4659,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
4255
4659
  return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
4256
4660
  }, "dealLine");
4257
4661
 
4258
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/orders.js
4662
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/orders.js
4259
4663
  var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
4260
4664
  var ORDER_PURPOSES = ["personal", "business", "client", "other"];
4261
4665
  var orderLine = /* @__PURE__ */ __name((order) => {
@@ -4266,7 +4670,7 @@ var orderLine = /* @__PURE__ */ __name((order) => {
4266
4670
  }, "orderLine");
4267
4671
  var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
4268
4672
 
4269
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/relations.js
4673
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/relations.js
4270
4674
  var ORGANIZATION_ROLES = [
4271
4675
  "employee",
4272
4676
  "contractor",
@@ -4281,8 +4685,8 @@ var CONTRACT_ROLES = ["customer", "supplier", "signatory", "guarantor"];
4281
4685
  var RELATED_ROLES = ["colleague", "adviser", "investor", "mentor", "family", "friend"];
4282
4686
  var ENGAGEMENT_LEVELS = ["none", "low", "medium", "high"];
4283
4687
  var isEngagement = /* @__PURE__ */ __name((value) => typeof value === "string" && ENGAGEMENT_LEVELS.includes(value), "isEngagement");
4284
- var checkEngagement = /* @__PURE__ */ __name((kind2, from, to, level) => {
4285
- if (kind2 !== "member-of" || from !== "person" || to !== "project")
4688
+ var checkEngagement = /* @__PURE__ */ __name((kind3, from, to, level) => {
4689
+ if (kind3 !== "member-of" || from !== "person" || to !== "project")
4286
4690
  throw new CliError("validation_error", "an engagement level is set only on a person's member-of a project", {
4287
4691
  reason: "relationship.engagement-ends"
4288
4692
  });
@@ -4308,26 +4712,26 @@ var RELATIONS = {
4308
4712
  }
4309
4713
  };
4310
4714
  var RELATION_KINDS = Object.keys(RELATIONS);
4311
- var specOf = /* @__PURE__ */ __name((kind2) => Object.hasOwn(RELATIONS, kind2) ? RELATIONS[kind2] : void 0, "specOf");
4312
- var isRelationKind = /* @__PURE__ */ __name((kind2) => specOf(kind2) !== void 0, "isRelationKind");
4715
+ var specOf = /* @__PURE__ */ __name((kind3) => Object.hasOwn(RELATIONS, kind3) ? RELATIONS[kind3] : void 0, "specOf");
4716
+ var isRelationKind = /* @__PURE__ */ __name((kind3) => specOf(kind3) !== void 0, "isRelationKind");
4313
4717
  var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
4314
4718
  var partyOnly = /* @__PURE__ */ __name((from, to) => from === "contract" && to !== "person" && to !== "organization", "partyOnly");
4315
- var checkEnds = /* @__PURE__ */ __name((kind2, from, to) => {
4316
- const spec = specOf(kind2);
4719
+ var checkEnds = /* @__PURE__ */ __name((kind3, from, to) => {
4720
+ const spec = specOf(kind3);
4317
4721
  if (!spec)
4318
4722
  throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
4319
- if (memberOnly(from) && (kind2 !== "member-of" || to !== "project"))
4723
+ if (memberOnly(from) && (kind3 !== "member-of" || to !== "project"))
4320
4724
  throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
4321
4725
  if (partyOnly(from, to))
4322
4726
  throw new CliError("validation_error", "a contract is related only to a person or an organization");
4323
4727
  if (!spec.from.includes(from) || !spec.to.includes(to))
4324
- throw new CliError("validation_error", `${kind2} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
4728
+ throw new CliError("validation_error", `${kind3} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
4325
4729
  return spec;
4326
4730
  }, "checkEnds");
4327
4731
  var isParty = /* @__PURE__ */ __name((type) => type === "person" || type === "organization", "isParty");
4328
- var rolesOf = /* @__PURE__ */ __name((kind2, from, to) => {
4329
- const spec = specOf(kind2);
4330
- if (kind2 === "member-of" && from !== "person")
4732
+ var rolesOf = /* @__PURE__ */ __name((kind3, from, to) => {
4733
+ const spec = specOf(kind3);
4734
+ if (kind3 === "member-of" && from !== "person")
4331
4735
  return void 0;
4332
4736
  return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
4333
4737
  }, "rolesOf");
@@ -4338,22 +4742,22 @@ var ROLE_LISTS = {
4338
4742
  contract: CONTRACT_ROLES,
4339
4743
  related: RELATED_ROLES
4340
4744
  };
4341
- var roleListOf = /* @__PURE__ */ __name((kind2, from, to) => {
4342
- if (kind2 === "related-to" && isParty(from) && isParty(to))
4745
+ var roleListOf = /* @__PURE__ */ __name((kind3, from, to) => {
4746
+ if (kind3 === "related-to" && isParty(from) && isParty(to))
4343
4747
  return "related";
4344
- const roles = rolesOf(kind2, from, to);
4748
+ const roles = rolesOf(kind3, from, to);
4345
4749
  return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
4346
4750
  }, "roleListOf");
4347
- var checkRole = /* @__PURE__ */ __name((kind2, from, to, role, extra = []) => {
4348
- const roles = rolesOf(kind2, from, to)?.concat(extra);
4751
+ var checkRole = /* @__PURE__ */ __name((kind3, from, to, role, extra = []) => {
4752
+ const roles = rolesOf(kind3, from, to)?.concat(extra);
4349
4753
  if (roles && !roles.includes(role))
4350
- throw new CliError("validation_error", `a ${from}'s role on ${kind2} ${to} is one of ${roles.join(", ")}`, {
4754
+ throw new CliError("validation_error", `a ${from}'s role on ${kind3} ${to} is one of ${roles.join(", ")}`, {
4351
4755
  reason: "relationship.role-unknown"
4352
4756
  });
4353
4757
  return role;
4354
4758
  }, "checkRole");
4355
- var isSymmetric = /* @__PURE__ */ __name((kind2) => specOf(kind2)?.symmetric === true, "isSymmetric");
4356
- var inverseOf = /* @__PURE__ */ __name((kind2) => specOf(kind2)?.symmetric ? kind2 : specOf(kind2)?.inverse ?? null, "inverseOf");
4759
+ var isSymmetric = /* @__PURE__ */ __name((kind3) => specOf(kind3)?.symmetric === true, "isSymmetric");
4760
+ var inverseOf = /* @__PURE__ */ __name((kind3) => specOf(kind3)?.symmetric ? kind3 : specOf(kind3)?.inverse ?? null, "inverseOf");
4357
4761
  var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
4358
4762
  var standingOf = /* @__PURE__ */ __name((link, now) => {
4359
4763
  if (link.endsAt != null && link.endsAt <= now)
@@ -4369,16 +4773,16 @@ var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'p
4369
4773
  var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE ${KEYED} AND override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
4370
4774
  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");
4371
4775
 
4372
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/crm.js
4776
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/crm.js
4373
4777
  var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
4374
4778
  var isCrmUserId = /* @__PURE__ */ __name((id5) => /^\d{1,20}$/.test(id5), "isCrmUserId");
4375
4779
  var normalCrmUserId = /* @__PURE__ */ __name((id5) => {
4376
4780
  const text7 = id5.trim();
4377
4781
  return /^\d+$/.test(text7) ? text7.replace(/^0+(?=\d)/, "") : text7;
4378
4782
  }, "normalCrmUserId");
4379
- var isItemKind = /* @__PURE__ */ __name((kind2) => kind2 === "deal" || kind2 === "lead", "isItemKind");
4783
+ var isItemKind = /* @__PURE__ */ __name((kind3) => kind3 === "deal" || kind3 === "lead", "isItemKind");
4380
4784
 
4381
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/domain/tags.js
4785
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/tags.js
4382
4786
  var TAG_TYPES = ["chat", "contact", "message", "task"];
4383
4787
  var TAG = /^[a-z0-9-]{1,32}$/;
4384
4788
  var tagOf = /* @__PURE__ */ __name((value) => {
@@ -4392,7 +4796,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
4392
4796
  return tag;
4393
4797
  }, "normalizeTag");
4394
4798
 
4395
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/link-source.js
4799
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/link-source.js
4396
4800
  var REPORTER_SQL = "(SELECT provider || ':' || external_id FROM accounts r WHERE r.id = links.account_id) AS reporter";
4397
4801
  var sourceOf3 = /* @__PURE__ */ __name((database, row, metadata) => {
4398
4802
  const reporter = row.account_id == null ? void 0 : "reporter" in row ? row.reporter : database.prepare("SELECT provider || ':' || external_id AS key FROM accounts WHERE id = ?").get(Number(row.account_id))?.key;
@@ -4402,7 +4806,7 @@ var sourceOf3 = /* @__PURE__ */ __name((database, row, metadata) => {
4402
4806
  };
4403
4807
  }, "sourceOf");
4404
4808
 
4405
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
4809
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
4406
4810
  var LINK_KINDS = [
4407
4811
  "links-to",
4408
4812
  "blocked-by",
@@ -4423,7 +4827,7 @@ var LINK_KINDS = [
4423
4827
  ];
4424
4828
  var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
4425
4829
  var LINK_SOURCES = [...LINK_ORIGINS, "calendar", "meeting"];
4426
- var linkKind = /* @__PURE__ */ __name((kind2) => `'${kind2}'`, "linkKind");
4830
+ var linkKind = /* @__PURE__ */ __name((kind3) => `'${kind3}'`, "linkKind");
4427
4831
  var COUNTERPART_ROLE = "counterpart";
4428
4832
 
4429
4833
  export {
@@ -4455,6 +4859,10 @@ export {
4455
4859
  childTrace,
4456
4860
  withAttempt,
4457
4861
  currentAttempt,
4862
+ BACKENDS,
4863
+ serviceCallsOf,
4864
+ rangeOf,
4865
+ windowOf,
4458
4866
  formatMeetingReference,
4459
4867
  parseMeetingReference,
4460
4868
  canonicalMeetingReference,
@@ -4479,10 +4887,9 @@ export {
4479
4887
  MeetingError,
4480
4888
  listed,
4481
4889
  meetingPeople,
4482
- meetingsList,
4483
4890
  meetingsQuery,
4484
4891
  MEETING_QUERY_GUIDE,
4485
- meetingDetailsAnswer,
4892
+ meetingDetailsBody,
4486
4893
  meetingTranscriptAnswer,
4487
4894
  meetingSummaryAnswer,
4488
4895
  exportMeeting,
@@ -4536,6 +4943,8 @@ export {
4536
4943
  meetingPassage,
4537
4944
  event,
4538
4945
  eventItem,
4946
+ meetingsListThrough,
4947
+ meetingShowThrough,
4539
4948
  strongRecordingValidator,
4540
4949
  validateMeetingRelatedHistory,
4541
4950
  MEETING_RESULT_ENTITIES,