@wirecat/drive-cli 0.62.0 → 0.64.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 (150) hide show
  1. package/README.md +2 -1
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bundle/{all-profiles-CKD2DWUK.js → all-profiles-BPPT2AK5.js} +13 -14
  4. package/dist/bundle/{anthropic-E3T4USLA.js → anthropic-JW6GOJUD.js} +13 -11
  5. package/dist/bundle/{app-server-JB2AEWWL.js → app-server-KAQIOJMZ.js} +53 -54
  6. package/dist/bundle/{bun-CC44AAND.js → bun-UT7GNTPV.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-AUMFKYVR.js → bun-sqlite-2OIVV3LS.js} +8 -8
  8. package/dist/bundle/{chunk-EOOGWUTP.js → chunk-2FEZ24DK.js} +10 -10
  9. package/dist/bundle/{chunk-N7OZPKU7.js → chunk-2W464HAE.js} +4 -4
  10. package/dist/bundle/{chunk-UGXN5D7U.js → chunk-34BIDKF4.js} +332 -430
  11. package/dist/bundle/{chunk-WZKEU7WR.js → chunk-36GPBPWM.js} +1 -1
  12. package/dist/bundle/{chunk-LQKD257P.js → chunk-3J5KAFNA.js} +2255 -1125
  13. package/dist/bundle/{chunk-7W5HYGVW.js → chunk-3NULZGQU.js} +2 -2
  14. package/dist/bundle/{chunk-XFRRKZHQ.js → chunk-46CD64J2.js} +155 -36
  15. package/dist/bundle/{chunk-DWJHL6DV.js → chunk-4CNTID2X.js} +4 -4
  16. package/dist/bundle/{chunk-LWE4JGRN.js → chunk-4YRENUB5.js} +2 -2
  17. package/dist/bundle/{chunk-SW4I5BR7.js → chunk-5HSRQ53R.js} +2 -2
  18. package/dist/bundle/{chunk-IR4SQLBR.js → chunk-5OFA5EXE.js} +2 -2
  19. package/dist/bundle/{chunk-R347FPYU.js → chunk-5ZBR55US.js} +1 -1
  20. package/dist/bundle/{chunk-Q2LRPOKL.js → chunk-66AF4FBW.js} +4 -4
  21. package/dist/bundle/{chunk-RWSXVCSG.js → chunk-6B37XO6B.js} +23 -5
  22. package/dist/bundle/{chunk-ZMOUUOT2.js → chunk-6G53ZFUT.js} +1 -1
  23. package/dist/bundle/{chunk-HCNQT3QE.js → chunk-AHB4OJCI.js} +1951 -580
  24. package/dist/bundle/{chunk-JK3U25QZ.js → chunk-B67BLRAI.js} +59 -1
  25. package/dist/bundle/{chunk-7ZXIWZQ6.js → chunk-B7XBIOMR.js} +12 -12
  26. package/dist/bundle/{chunk-FEZF3TII.js → chunk-BDYWZ7JE.js} +50 -6
  27. package/dist/bundle/{chunk-SVPCHFKI.js → chunk-BEUAICUD.js} +2 -2
  28. package/dist/bundle/{chunk-TDX4GZFO.js → chunk-BEZJA44H.js} +7 -7
  29. package/dist/bundle/{chunk-RIDQNVZM.js → chunk-BZ2ZKILM.js} +3 -3
  30. package/dist/bundle/{chunk-FUITWY7O.js → chunk-C7WBNOYW.js} +1 -1
  31. package/dist/bundle/{chunk-CJHY5YIF.js → chunk-CPMRM3GQ.js} +489 -210
  32. package/dist/bundle/{chunk-FNWIJ6EJ.js → chunk-DD7EFG6B.js} +2 -2
  33. package/dist/bundle/{chunk-W4RTIL7S.js → chunk-E2LBCCTG.js} +5 -5
  34. package/dist/bundle/{chunk-O2XOX4HB.js → chunk-EC2XGDKJ.js} +50 -34
  35. package/dist/bundle/{chunk-4OSSOWDM.js → chunk-EJ4PNHPP.js} +1 -1
  36. package/dist/bundle/{chunk-XS5POQST.js → chunk-EQEGJVO2.js} +1 -1
  37. package/dist/bundle/{chunk-U2BFYSQV.js → chunk-EWGVDFPT.js} +8983 -3343
  38. package/dist/bundle/{chunk-OBH5BA62.js → chunk-EZ6O3ST3.js} +3 -3
  39. package/dist/bundle/{chunk-HG6CAYJH.js → chunk-F2VDAG32.js} +3 -3
  40. package/dist/bundle/{chunk-RPMKG63Z.js → chunk-G3NULXOM.js} +4 -4
  41. package/dist/bundle/{chunk-OD4U7GUY.js → chunk-G4KEKKDE.js} +20 -20
  42. package/dist/bundle/{chunk-OTROVC4E.js → chunk-GSMYXGFR.js} +1 -1
  43. package/dist/bundle/{chunk-XZUS7XRO.js → chunk-GW3U6OLD.js} +1 -1
  44. package/dist/bundle/{chunk-6EY46GAN.js → chunk-HW4UPST2.js} +2 -2
  45. package/dist/bundle/{chunk-2HF2MRXI.js → chunk-IDAK4DDK.js} +1 -1
  46. package/dist/bundle/{chunk-27YUUGXQ.js → chunk-IK6KH3RE.js} +1 -1
  47. package/dist/bundle/{chunk-QTI6IVHZ.js → chunk-IX7NQJLY.js} +8 -8
  48. package/dist/bundle/{chunk-YMWENGKH.js → chunk-J62DI53V.js} +1 -1
  49. package/dist/bundle/{chunk-AH5C3D3D.js → chunk-JRXFW7HE.js} +5 -5
  50. package/dist/bundle/{chunk-KLFSRKHB.js → chunk-K6BSB53R.js} +1 -1
  51. package/dist/bundle/{chunk-ONP2IBHY.js → chunk-KE4XPPRQ.js} +98 -81
  52. package/dist/bundle/{chunk-UQLWMGSD.js → chunk-KG2XKEHL.js} +5 -5
  53. package/dist/bundle/{chunk-T5NWWXS2.js → chunk-KIN6PDFE.js} +24 -2
  54. package/dist/bundle/{chunk-QH7DOVO3.js → chunk-KVW4XNKB.js} +45 -29
  55. package/dist/bundle/{chunk-PEQA6LA5.js → chunk-LOMW6F2E.js} +230 -236
  56. package/dist/bundle/{chunk-4SIZEJ3M.js → chunk-M73NNJ3X.js} +2 -2
  57. package/dist/bundle/{chunk-QCKZ3GAA.js → chunk-N622LRPM.js} +4 -4
  58. package/dist/bundle/{chunk-YPFUYQDP.js → chunk-O2QO5UZC.js} +13 -13
  59. package/dist/bundle/{chunk-QCX6XZLA.js → chunk-OEVHZOHC.js} +12 -12
  60. package/dist/bundle/{chunk-VAYB52HF.js → chunk-OH3K2E7X.js} +402 -184
  61. package/dist/bundle/{chunk-YXYTY4GF.js → chunk-P7DEGRZA.js} +21 -21
  62. package/dist/bundle/{chunk-YUWPNG7B.js → chunk-PBMSBCVB.js} +1 -1
  63. package/dist/bundle/{chunk-67ZQCWBV.js → chunk-QEAD2LF4.js} +3 -3
  64. package/dist/bundle/{chunk-JN5TVEEL.js → chunk-QXCKJUZY.js} +124 -22
  65. package/dist/bundle/{chunk-T7X53FCJ.js → chunk-SIOIMO62.js} +37 -37
  66. package/dist/bundle/{chunk-O7ALBI2I.js → chunk-TNV2FXVK.js} +5 -5
  67. package/dist/bundle/chunk-UD55VB2N.js +87 -0
  68. package/dist/bundle/{chunk-L7K2MOIC.js → chunk-UIEA6FIV.js} +22 -22
  69. package/dist/bundle/{chunk-EW7PKB4M.js → chunk-UJR272CP.js} +29 -29
  70. package/dist/bundle/{chunk-YALI4C7C.js → chunk-USLZE36C.js} +6 -6
  71. package/dist/bundle/{chunk-YOJDGAPT.js → chunk-VIJ6ACYB.js} +8 -8
  72. package/dist/bundle/{chunk-MN4VXU3M.js → chunk-VPLFD5RJ.js} +4 -4
  73. package/dist/bundle/{chunk-VQDD64A4.js → chunk-VT2UFYPJ.js} +8 -10
  74. package/dist/bundle/{chunk-CZ2GJHLL.js → chunk-WWCYTMAV.js} +2 -2
  75. package/dist/bundle/{chunk-DJOAMGF4.js → chunk-XPXKD63J.js} +13 -13
  76. package/dist/bundle/{chunk-E43ENLJJ.js → chunk-ZF6GUZCE.js} +1 -1
  77. package/dist/bundle/{chunk-XEW2EN6F.js → chunk-ZRZ4HTCK.js} +60 -34
  78. package/dist/bundle/{chunk-2KN35F32.js → chunk-ZSZJLJIA.js} +10 -10
  79. package/dist/bundle/command-contract-H5OYJOPF.js +38 -0
  80. package/dist/bundle/{decode-WIIX3Y2X.js → decode-HTOQ6S3V.js} +8 -8
  81. package/dist/bundle/{dispatch-GEFIXA6X.js → dispatch-SH5SP6LA.js} +11 -11
  82. package/dist/bundle/drive.js +11 -11
  83. package/dist/bundle/{echarts-OYINM4C4.js → echarts-KFHB6SLX.js} +2 -2
  84. package/dist/bundle/{embed-DWZIYMBX.js → embed-YATFB2PN.js} +9 -9
  85. package/dist/bundle/{embedder-ILWH7ZRM.js → embedder-MQPDFGTJ.js} +12 -12
  86. package/dist/bundle/entry-YZBB647C.js +22 -0
  87. package/dist/bundle/{failure-GV77W3CD.js → failure-4FQL4XJI.js} +4 -4
  88. package/dist/bundle/first-run-5JT3UQZB.js +30 -0
  89. package/dist/bundle/first-screen-BEMDEWO7.js +36 -0
  90. package/dist/bundle/{google-KLZSUAVY.js → google-DVADVICN.js} +13 -13
  91. package/dist/bundle/{google-api-HZQ5R4ZO.js → google-api-QMFGCXBM.js} +55 -57
  92. package/dist/bundle/grants-WKB2E4TA.js +103 -0
  93. package/dist/bundle/{identity-J2DON4IO.js → identity-FYVDK4M2.js} +6 -6
  94. package/dist/bundle/{instructions-HGOJ23AJ.js → instructions-D3GF3B7M.js} +1 -1
  95. package/dist/bundle/{login-BD2TS4GY.js → login-COFZ2IWP.js} +61 -63
  96. package/dist/bundle/{mcp-GWDA3HOA.js → mcp-RKJG22KM.js} +2 -2
  97. package/dist/bundle/{node-CPKTDPH7.js → node-OFICOKX3.js} +2 -2
  98. package/dist/bundle/{node-sqlite-IXDCRLSX.js → node-sqlite-DNBTDOXD.js} +9 -9
  99. package/dist/bundle/oauth-PDQHWFBF.js +22 -0
  100. package/dist/bundle/{open-O7P3ZV3Y.js → open-PTPR2YWX.js} +8 -8
  101. package/dist/bundle/{openai-RCFQKCXC.js → openai-2KV5LUW4.js} +17 -17
  102. package/dist/bundle/{process-KXDRJO22.js → process-EAW6NST2.js} +1 -1
  103. package/dist/bundle/{program-UCHFC7JQ.js → program-6UV5Q5YN.js} +310 -279
  104. package/dist/bundle/prompt-634TPMJK.js +19 -0
  105. package/dist/bundle/{reasons-57J2D77K.js → reasons-DDWCEYSQ.js} +5 -5
  106. package/dist/bundle/{recognize-MRCYGP2J.js → recognize-SJO6QUDW.js} +7 -7
  107. package/dist/bundle/{remote-L3L4PHKF.js → remote-6JXZITKF.js} +10 -10
  108. package/dist/bundle/{rerank-PSOE6XFT.js → rerank-MD5VOPQ6.js} +10 -10
  109. package/dist/bundle/{serve-72OGS3BF.js → serve-LZTROA2M.js} +12 -12
  110. package/dist/bundle/server-GT7X666D.js +69 -0
  111. package/dist/bundle/{server-SCXKYHBO.js → server-NSA3UAFY.js} +43 -44
  112. package/dist/bundle/{services-YAFTELBI.js → services-F5A6XQCV.js} +69 -34
  113. package/dist/bundle/{sqlite-runtime-DLK4SU33.js → sqlite-runtime-7YF6REKS.js} +9 -9
  114. package/dist/bundle/{start-AFFA3LKM.js → start-MUFLE6FA.js} +30 -8
  115. package/dist/bundle/{state-T5VNAJSZ.js → state-UC54F3YZ.js} +9 -9
  116. package/dist/bundle/{store-4OFK7PKQ.js → store-F5FJGWMR.js} +58 -20
  117. package/dist/bundle/{store-R6MSY2IM.js → store-J53YNAH6.js} +43 -18
  118. package/dist/bundle/store-maintenance-command-GJVXLBAB.js +58 -0
  119. package/dist/bundle/tokens-H2EJKGA5.js +101 -0
  120. package/dist/commands/account.d.ts +4 -0
  121. package/dist/commands/account.d.ts.map +1 -0
  122. package/dist/commands/account.js +33 -0
  123. package/dist/commands/account.js.map +1 -0
  124. package/dist/commands/config.d.ts.map +1 -1
  125. package/dist/commands/config.js +5 -1
  126. package/dist/commands/config.js.map +1 -1
  127. package/dist/profile-lock.d.ts +1 -0
  128. package/dist/profile-lock.d.ts.map +1 -1
  129. package/dist/profile-lock.js +1 -0
  130. package/dist/profile-lock.js.map +1 -1
  131. package/dist/program.d.ts.map +1 -1
  132. package/dist/program.js +2 -0
  133. package/dist/program.js.map +1 -1
  134. package/dist/version.d.ts +1 -1
  135. package/dist/version.js +1 -1
  136. package/package.json +3 -3
  137. package/dist/bundle/chunk-AQVUEZEP.js +0 -22
  138. package/dist/bundle/chunk-DRZZBN3V.js +0 -33
  139. package/dist/bundle/chunk-UOXOLGNG.js +0 -42
  140. package/dist/bundle/command-contract-OB5BRABN.js +0 -39
  141. package/dist/bundle/entry-V5V3TOTY.js +0 -22
  142. package/dist/bundle/first-run-V3VVLQF4.js +0 -30
  143. package/dist/bundle/first-screen-Y3RIN7FU.js +0 -37
  144. package/dist/bundle/grants-L7XLHLUT.js +0 -105
  145. package/dist/bundle/oauth-HOGY4YBB.js +0 -22
  146. package/dist/bundle/prompt-EVPPBN5W.js +0 -17
  147. package/dist/bundle/server-C5TGNFXW.js +0 -70
  148. package/dist/bundle/store-maintenance-command-QDMCXGV6.js +0 -60
  149. package/dist/bundle/tokens-HIG36RNS.js +0 -103
  150. /package/dist/bundle/{chunk-ZQ3GWKDQ.js → chunk-SW6C6WH5.js} +0 -0
@@ -8,11 +8,18 @@ import {
8
8
  queryFieldsOf,
9
9
  timezoneOf,
10
10
  validateQuery
11
- } from "./chunk-EOOGWUTP.js";
11
+ } from "./chunk-2FEZ24DK.js";
12
+ import {
13
+ isCliFailure,
14
+ isStoreDamage
15
+ } from "./chunk-B67BLRAI.js";
16
+ import {
17
+ refuseOwnerStoreInTests
18
+ } from "./chunk-DD7EFG6B.js";
12
19
  import {
13
20
  singleLine,
14
21
  visibleControls
15
- } from "./chunk-2HF2MRXI.js";
22
+ } from "./chunk-IDAK4DDK.js";
16
23
  import {
17
24
  STEPS,
18
25
  array,
@@ -39,15 +46,15 @@ import {
39
46
  string,
40
47
  union,
41
48
  unknown
42
- } from "./chunk-FEZF3TII.js";
49
+ } from "./chunk-BDYWZ7JE.js";
43
50
  import {
44
51
  CliError
45
- } from "./chunk-4OSSOWDM.js";
52
+ } from "./chunk-EJ4PNHPP.js";
46
53
  import {
47
54
  __name
48
55
  } from "./chunk-ZVVMGPBJ.js";
49
56
 
50
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/payment.js
57
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/payment.js
51
58
  var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
52
59
  var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
53
60
  var PAYMENT_STATES = ["expected", "paid", "cancelled"];
@@ -141,7 +148,7 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
141
148
  return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
142
149
  }, "paymentTitle");
143
150
 
144
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/passage.js
151
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/passage.js
145
152
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
146
153
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
147
154
  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)))
@@ -154,7 +161,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
154
161
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
155
162
  }, "validateMeetingPassage");
156
163
 
157
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/reference.js
164
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/reference.js
158
165
  var invalid2 = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
159
166
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
160
167
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -191,7 +198,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
191
198
  }, "parseMeetingReference");
192
199
  var canonicalMeetingReference = /* @__PURE__ */ __name((text7) => formatMeetingReference(parseMeetingReference(text7)), "canonicalMeetingReference");
193
200
 
194
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/item.js
201
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/item.js
195
202
  var text = string();
196
203
  var count = pipe(number(), integer(), minValue(0));
197
204
  var MEETING_ISSUES = ["time_without_zone"];
@@ -256,7 +263,7 @@ var MEETING_QUERY = {
256
263
  })
257
264
  };
258
265
 
259
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/answers.js
266
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/answers.js
260
267
  var text2 = string();
261
268
  var count2 = pipe(number(), integer(), minValue(0));
262
269
  var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
@@ -459,10 +466,10 @@ var meetingHitItem = /* @__PURE__ */ __name((hit) => ({
459
466
  var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search meetings", args = {}, meta = {}) => {
460
467
  const items = found.items.map(meetingHitItem);
461
468
  const cursor = found.hasMore && found.nextCursor !== null ? found.nextCursor : void 0;
462
- const pending = found.coverage.indexing === "pending";
469
+ const pending2 = found.coverage.indexing === "pending";
463
470
  const next = [
464
471
  ...cursor === void 0 ? [] : [stepOf(PAGE_NEXT, { command, args: { ...args, cursor, limit }, values: { shown: items.length } })],
465
- ...pending ? [
472
+ ...pending2 ? [
466
473
  stepOf(SEARCH_AGAIN, {
467
474
  command,
468
475
  args: Object.fromEntries(Object.entries(args).filter(([key]) => key !== "cursor"))
@@ -478,7 +485,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
478
485
  ...cursor === void 0 ? {} : { next_cursor: cursor }
479
486
  },
480
487
  ...next.length > 0 ? { next } : {},
481
- ...pending ? {
488
+ ...pending2 ? {
482
489
  missing: [
483
490
  {
484
491
  field: "excerpt",
@@ -491,7 +498,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
491
498
  };
492
499
  }, "meetingHitsList");
493
500
 
494
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
501
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
495
502
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
496
503
  const parsed = urlOf(url);
497
504
  if (!parsed)
@@ -525,7 +532,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
525
532
  }
526
533
  }, "urlOf");
527
534
 
528
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
535
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
529
536
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
530
537
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
531
538
  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");
@@ -544,7 +551,11 @@ var ENTRY_METADATA_KEYS = [
544
551
  "guestsCanSeeOtherGuests",
545
552
  "hangoutLink",
546
553
  "locked",
547
- "privateCopy"
554
+ "privateCopy",
555
+ // A phone call's, from a records import: the entry's other columns have no place for them.
556
+ "callDirection",
557
+ "callSeconds",
558
+ "callNumber"
548
559
  ];
549
560
  var entryMetadata = /* @__PURE__ */ __name((metadata) => {
550
561
  const kept = {};
@@ -558,7 +569,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
558
569
  return kept;
559
570
  }, "entryMetadata");
560
571
 
561
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
572
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
562
573
  import { createHash } from "node:crypto";
563
574
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
564
575
  reference: cue2.reference,
@@ -572,7 +583,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
572
583
  text: cue2.text
573
584
  })).digest("hex"), "meetingCueFingerprint");
574
585
 
575
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
586
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
576
587
  var EVENT_QUERY = defineQuery({
577
588
  entity: "event",
578
589
  backend: "sql",
@@ -588,7 +599,7 @@ var EVENT_QUERY = defineQuery({
588
599
  ]
589
600
  });
590
601
 
591
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
602
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
592
603
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
593
604
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
594
605
  if (entry.recurrenceEndsAt !== null)
@@ -611,7 +622,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
611
622
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
612
623
  }, "entryInWindow");
613
624
 
614
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/events.js
625
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/events.js
615
626
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
616
627
  const current = await store.meeting(details.meeting.id);
617
628
  if (!current)
@@ -654,7 +665,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
654
665
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
655
666
  }, "linkEvent");
656
667
 
657
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
668
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
658
669
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text7) => text7.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
659
670
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
660
671
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -678,7 +689,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
678
689
  };
679
690
  }, "validateMeetingParticipantSearch");
680
691
 
681
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/reads.js
692
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/reads.js
682
693
  var MeetingError = class extends CliError {
683
694
  static {
684
695
  __name(this, "MeetingError");
@@ -810,7 +821,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id5, accountId)
810
821
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
811
822
  }, "meetingSummaryAnswer");
812
823
 
813
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/export.js
824
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/export.js
814
825
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
815
826
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
816
827
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -906,10 +917,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id5, options) => {
906
917
  };
907
918
  }, "exportMeeting");
908
919
 
909
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
920
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
910
921
  import { createHash as createHash2 } from "node:crypto";
911
922
 
912
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
923
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
913
924
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
914
925
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
915
926
  throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
@@ -920,7 +931,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
920
931
  return new Date(value).toISOString();
921
932
  }, "meetingTimestamp");
922
933
 
923
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
934
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
924
935
  var TASK_TYPES = ["bug", "feature", "chore"];
925
936
  var invalid3 = /* @__PURE__ */ __name((message) => {
926
937
  throw new CliError("validation_error", message);
@@ -1093,7 +1104,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
1093
1104
  var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
1094
1105
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
1095
1106
 
1096
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1107
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1097
1108
  var MEETING_FINDINGS_KIND = "meeting_findings";
1098
1109
  var cue = /* @__PURE__ */ __name((raw) => {
1099
1110
  const reference2 = canonicalMeetingReference(raw);
@@ -1104,7 +1115,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
1104
1115
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
1105
1116
  var meetingFindingFingerprint = findingFingerprint;
1106
1117
 
1107
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1118
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1108
1119
  var context = {
1109
1120
  command: "search meetings",
1110
1121
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -1224,7 +1235,7 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text7) => {
1224
1235
  return { version: 1, language: "lucene-v1", root };
1225
1236
  }, "meetingWordsQuery");
1226
1237
 
1227
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/language.js
1238
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/language.js
1228
1239
  var LATIN_WORDS = {
1229
1240
  en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
1230
1241
  es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
@@ -1273,7 +1284,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
1273
1284
  return null;
1274
1285
  }, "transcriptLanguage");
1275
1286
 
1276
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
1287
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
1277
1288
  var contentHash = /* @__PURE__ */ __name(async (text7) => {
1278
1289
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text7));
1279
1290
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -1310,7 +1321,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
1310
1321
  return time2;
1311
1322
  }, "timestamp");
1312
1323
 
1313
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
1324
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
1314
1325
  var TranscriptTextError = class extends Error {
1315
1326
  static {
1316
1327
  __name(this, "TranscriptTextError");
@@ -1365,7 +1376,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
1365
1376
  return { header, lines };
1366
1377
  }, "parseTranscriptText");
1367
1378
 
1368
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
1379
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
1369
1380
  var VttError = class extends Error {
1370
1381
  static {
1371
1382
  __name(this, "VttError");
@@ -1417,7 +1428,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
1417
1428
  return cues;
1418
1429
  }, "parseVtt");
1419
1430
 
1420
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/import.js
1431
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/import.js
1421
1432
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
1422
1433
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
1423
1434
  for (const file of files) {
@@ -1450,10 +1461,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
1450
1461
  return report;
1451
1462
  }, "importFiles");
1452
1463
 
1453
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/links.js
1464
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/links.js
1454
1465
  var CHAT_MESSAGES_READ = 1e5;
1455
1466
 
1456
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/provider.js
1467
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/provider.js
1457
1468
  var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
1458
1469
  const provider = scope2?.provider;
1459
1470
  const account = scope2?.account;
@@ -1462,7 +1473,7 @@ var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
1462
1473
  return Object.freeze({ provider, account });
1463
1474
  }, "snapshotMeetingScope");
1464
1475
 
1465
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
1476
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
1466
1477
  var nonempty = /* @__PURE__ */ __name((value, name) => {
1467
1478
  if (typeof value !== "string" || !value.trim())
1468
1479
  throw new CliError("validation_error", `${name} must be nonempty`);
@@ -1528,7 +1539,7 @@ var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) =
1528
1539
  return { applied: true, value: await dispatch(signal) };
1529
1540
  }, "dispatchMeetingMutation");
1530
1541
 
1531
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
1542
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
1532
1543
  var id = /* @__PURE__ */ __name((value) => {
1533
1544
  if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
1534
1545
  throw new CliError("validation_error", "meeting context identifiers must be positive integers");
@@ -1650,7 +1661,7 @@ var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) =>
1650
1661
  };
1651
1662
  }, "createMeetingContext");
1652
1663
 
1653
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
1664
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
1654
1665
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
1655
1666
  if (!original || typeof original !== "object" || Array.isArray(original))
1656
1667
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -1675,7 +1686,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
1675
1686
  return { ...input, limit, maxReadBytes };
1676
1687
  }, "validateMeetingPreparationContext");
1677
1688
 
1678
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
1689
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
1679
1690
  var count3 = pipe(number(), integer(), minValue(0));
1680
1691
  var id2 = pipe(string(), minLength(1));
1681
1692
  var meetingProjectEvidence = strictObject({
@@ -1796,7 +1807,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
1796
1807
  };
1797
1808
  }, "meetingProjectEvidenceAnswer");
1798
1809
 
1799
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
1810
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
1800
1811
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
1801
1812
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
1802
1813
  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) || [
@@ -1816,7 +1827,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
1816
1827
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
1817
1828
  }, "validateMeetingHitSearch");
1818
1829
 
1819
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
1830
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
1820
1831
  var ids = {
1821
1832
  meeting_id: "meetingId",
1822
1833
  identity_id: "participantIdentityId",
@@ -1907,7 +1918,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project2, request =
1907
1918
  return { project: project2.trim(), options, query: frozen.join(" AND ") };
1908
1919
  }, "prepareMeetingProjectEvidence");
1909
1920
 
1910
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
1921
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
1911
1922
  var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, request = {}, now = Date.now()) => {
1912
1923
  const prepared = prepareMeetingProjectEvidence(project2, request, now);
1913
1924
  const page = await read(prepared.project, prepared.options);
@@ -1915,7 +1926,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, r
1915
1926
  return meetingProjectEvidenceAnswer(page, prepared);
1916
1927
  }, "readMeetingProjectEvidence");
1917
1928
 
1918
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/pull.js
1929
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/pull.js
1919
1930
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
1920
1931
  const { identityExternalId, ...fields2 } = p;
1921
1932
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
@@ -2077,7 +2088,7 @@ unlinked`, format)],
2077
2088
  return report;
2078
2089
  }, "pull");
2079
2090
 
2080
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2091
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2081
2092
  var text4 = string();
2082
2093
  var count4 = pipe(number(), integer(), minValue(0));
2083
2094
  var id3 = pipe(number(), integer(), minValue(1));
@@ -2271,10 +2282,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
2271
2282
  updated_at: new Date(one.updatedAt).toISOString()
2272
2283
  }), "eventItem");
2273
2284
 
2274
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2285
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2275
2286
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
2276
2287
 
2277
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2288
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2278
2289
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2279
2290
  if (!original || typeof original !== "object" || Array.isArray(original))
2280
2291
  throw new CliError("validation_error", "related history request is required");
@@ -2304,7 +2315,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2304
2315
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
2305
2316
  }, "validateMeetingRelatedHistory");
2306
2317
 
2307
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
2318
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
2308
2319
  var text5 = string();
2309
2320
  var identifier = pipe(text5, minLength(1));
2310
2321
  var nullableText = nullable(text5);
@@ -2437,14 +2448,14 @@ var MEETING_RESULT_ENTITIES = {
2437
2448
  meeting_repair: repair
2438
2449
  };
2439
2450
 
2440
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/review.js
2451
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/review.js
2441
2452
  var REVIEW_LIMIT = { default: 50, most: 200 };
2442
2453
 
2443
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
2454
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
2444
2455
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
2445
2456
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
2446
2457
 
2447
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
2458
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
2448
2459
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2449
2460
  input.signal?.throwIfAborted();
2450
2461
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -2465,10 +2476,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2465
2476
  return { ...input, limit, maxReadBytes };
2466
2477
  }, "validateMeetingSeriesHistory");
2467
2478
 
2468
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
2479
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
2469
2480
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
2470
2481
 
2471
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
2482
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
2472
2483
  function invalid4(field, response = false) {
2473
2484
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
2474
2485
  }
@@ -2497,7 +2508,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
2497
2508
  cursorDetails(value);
2498
2509
  }, "validateMeetingSeriesInventoryCursor");
2499
2510
 
2500
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/meetings/stats.js
2511
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/meetings/stats.js
2501
2512
  var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
2502
2513
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
2503
2514
  const zone = timeZone ?? "UTC";
@@ -2632,7 +2643,158 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
2632
2643
  };
2633
2644
  }, "aggregateMeetingStats");
2634
2645
 
2635
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/tasks/model.js
2646
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/domain/money.js
2647
+ var CURRENCY_SCALES = {
2648
+ AED: 2,
2649
+ AMD: 2,
2650
+ AUD: 2,
2651
+ BHD: 3,
2652
+ BYN: 2,
2653
+ CAD: 2,
2654
+ CHF: 2,
2655
+ CLP: 0,
2656
+ CNY: 2,
2657
+ CZK: 2,
2658
+ DKK: 2,
2659
+ EUR: 2,
2660
+ GBP: 2,
2661
+ GEL: 2,
2662
+ HUF: 2,
2663
+ ILS: 2,
2664
+ INR: 2,
2665
+ ISK: 0,
2666
+ JPY: 0,
2667
+ KGS: 2,
2668
+ KRW: 0,
2669
+ KWD: 3,
2670
+ KZT: 2,
2671
+ NOK: 2,
2672
+ PLN: 2,
2673
+ RSD: 2,
2674
+ RUB: 2,
2675
+ SEK: 2,
2676
+ THB: 2,
2677
+ TRY: 2,
2678
+ UAH: 2,
2679
+ USD: 2,
2680
+ UZS: 2,
2681
+ VND: 0
2682
+ };
2683
+ var refuse = /* @__PURE__ */ __name((message, reason) => {
2684
+ throw new CliError("validation_error", message, { reason });
2685
+ }, "refuse");
2686
+ var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
2687
+ var parseDecimal = /* @__PURE__ */ __name((text7, scale) => {
2688
+ const match = DECIMAL.exec(text7.trim());
2689
+ if (!match || (match[2] ?? "").length > scale)
2690
+ return void 0;
2691
+ return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
2692
+ }, "parseDecimal");
2693
+ var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
2694
+ const value = BigInt(units);
2695
+ if (value < 0n)
2696
+ return `-${formatDecimal(-value, scale)}`;
2697
+ const digits = value.toString().padStart(scale + 1, "0");
2698
+ return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
2699
+ }, "formatDecimal");
2700
+ var groupDigits = /* @__PURE__ */ __name((decimal) => {
2701
+ const [whole = "0", fraction] = decimal.split(".");
2702
+ const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
2703
+ return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
2704
+ }, "groupDigits");
2705
+ var currencyOf = /* @__PURE__ */ __name((text7) => {
2706
+ const code = typeof text7 === "string" ? text7.trim().toUpperCase() : "";
2707
+ if (CURRENCY_SCALES[code] === void 0)
2708
+ return refuse(`${typeof text7 === "string" && text7.trim() ? text7.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
2709
+ return code;
2710
+ }, "currencyOf");
2711
+ var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
2712
+ var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
2713
+ const scale = scaleOf(currency);
2714
+ const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
2715
+ if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
2716
+ return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
2717
+ return Number(units);
2718
+ }, "minorUnits");
2719
+ var signedMinorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
2720
+ if (typeof amount !== "string" || !amount.trim().startsWith("-"))
2721
+ return minorUnits(amount, currency, what);
2722
+ const units = minorUnits(amount.trim().slice(1), currency, what);
2723
+ return units === 0 ? 0 : -units;
2724
+ }, "signedMinorUnits");
2725
+ var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
2726
+ amount: formatDecimal(units, scaleOf(currency)),
2727
+ currency
2728
+ }), "moneyOf");
2729
+ var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
2730
+ var QUANTITY_SCALE = 3;
2731
+ var quantityOf = /* @__PURE__ */ __name((text7) => {
2732
+ const thousandths = typeof text7 === "string" ? parseDecimal(text7, QUANTITY_SCALE) : void 0;
2733
+ if (thousandths === void 0 || thousandths === 0n)
2734
+ return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
2735
+ const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
2736
+ return { text: plain, thousandths };
2737
+ }, "quantityOf");
2738
+ var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
2739
+
2740
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/domain/finance.js
2741
+ var INVOICE_DIRECTIONS = ["receivable", "payable"];
2742
+ var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
2743
+ var MONEY_DIRECTIONS = ["in", "out"];
2744
+ var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
2745
+ var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
2746
+ if (current === "draft" || current === "void")
2747
+ return current;
2748
+ if (paid <= 0)
2749
+ return "issued";
2750
+ return paid < total ? "partly_paid" : "paid";
2751
+ }, "settledStatus");
2752
+ var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
2753
+ var notes = /* @__PURE__ */ __name((...words2) => {
2754
+ const kept = words2.filter((word) => word !== null);
2755
+ return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
2756
+ }, "notes");
2757
+ var invoiceLine = /* @__PURE__ */ __name((invoice) => {
2758
+ const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
2759
+ const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
2760
+ return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
2761
+ }, "invoiceLine");
2762
+ var paymentLine = /* @__PURE__ */ __name((payment) => {
2763
+ const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
2764
+ return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
2765
+ }, "paymentLine");
2766
+ var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
2767
+ var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
2768
+
2769
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/domain/business.js
2770
+ var CATALOG_KINDS = ["product", "service"];
2771
+ var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
2772
+ var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
2773
+ var CONTRACT_STATUSES = ["draft", "active", "ended", "terminated"];
2774
+ var SUBSCRIPTION_STATUSES = ["trial", "active", "paused", "cancelled", "ended"];
2775
+ var WALLET_KINDS = ["bank", "card", "cash", "wallet", "other"];
2776
+ var TRANSACTION_STATUSES = ["pending", "booked"];
2777
+ var ORDER_DIRECTIONS = ["purchase", "sale"];
2778
+ var intervalOf = /* @__PURE__ */ __name((text7, reason = "subscription.interval") => {
2779
+ const match = typeof text7 === "string" ? /^(?:([1-9]\d{0,2})-)?(day|week|month|year)$/.exec(text7.trim()) : null;
2780
+ if (!match)
2781
+ throw new CliError("validation_error", "an interval is a count and a unit, such as 1-month or 2-week", { reason });
2782
+ return { count: match[1] === void 0 ? 1 : Number(match[1]), unit: match[2] };
2783
+ }, "intervalOf");
2784
+ var intervalText = /* @__PURE__ */ __name(({ count: count7, unit }) => `${count7}-${unit}`, "intervalText");
2785
+ var priced = /* @__PURE__ */ __name((units, currency) => units === null || currency === null ? "" : `, ${moneyLabel(units, currency)}`, "priced");
2786
+ var pending = /* @__PURE__ */ __name((review) => review === "confirmed" ? null : review, "pending");
2787
+ var productLine = /* @__PURE__ */ __name((product) => {
2788
+ const price = product.unitPrice === null || product.currency === null ? "" : moneyLabel(product.unitPrice, product.currency);
2789
+ const per = price && product.unit !== null ? ` per ${product.unit}` : "";
2790
+ return `${product.name}${price ? ` \xB7 ${price}${per}` : ""}${notes(product.kind, product.archived ? "archived" : null)}`;
2791
+ }, "productLine");
2792
+ var contractLine = /* @__PURE__ */ __name((contract) => `${contract.number ?? `#${contract.id}`} \xB7 ${contract.name}${priced(contract.value, contract.currency)}` + notes(contract.status, pending(contract.review)), "contractLine");
2793
+ var subscriptionLine = /* @__PURE__ */ __name((subscription) => `${subscription.name}${priced(subscription.price, subscription.currency)} every ${intervalText(subscription.interval)}` + notes(subscription.status, pending(subscription.review)), "subscriptionLine");
2794
+ var walletLine = /* @__PURE__ */ __name((wallet) => `${wallet.name} \xB7 ${wallet.kind}, ${wallet.currency}${wallet.numberHint === null ? "" : `, \u2026${wallet.numberHint}`}` + notes(wallet.closed ? "closed" : null), "walletLine");
2795
+ 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");
2796
+
2797
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/tasks/model.js
2636
2798
  var TASK_KINDS = ["question", "request", "mention", "promise"];
2637
2799
  var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
2638
2800
  var CLOSED_STATES = ["done", "dismissed"];
@@ -2647,7 +2809,7 @@ function closeTask(task, state, by, at, reason) {
2647
2809
  }
2648
2810
  __name(closeTask, "closeTask");
2649
2811
 
2650
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/tasks/priority.js
2812
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/tasks/priority.js
2651
2813
  var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
2652
2814
  var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
2653
2815
  var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
@@ -2676,7 +2838,7 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
2676
2838
  }, "priorityOf");
2677
2839
  var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
2678
2840
 
2679
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/tasks/service.js
2841
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/tasks/service.js
2680
2842
  function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
2681
2843
  async function find(id5) {
2682
2844
  const task = await store.get(id5);
@@ -2736,13 +2898,13 @@ function median(values) {
2736
2898
  }
2737
2899
  __name(median, "median");
2738
2900
 
2739
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/tasks/store.js
2901
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/tasks/store.js
2740
2902
  function matches(task, filter) {
2741
2903
  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);
2742
2904
  }
2743
2905
  __name(matches, "matches");
2744
2906
 
2745
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
2907
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
2746
2908
  var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
2747
2909
  var MEMORY_KINDS = ["summary", "digest", "preference"];
2748
2910
  var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
@@ -2750,7 +2912,7 @@ var MEMORY_SCOPES = ["personal", "work"];
2750
2912
  var WORK_TASK_TYPES = ["bug", "feature", "chore"];
2751
2913
  var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
2752
2914
 
2753
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/fields.js
2915
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/entities/fields.js
2754
2916
  var text6 = string();
2755
2917
  var id4 = pipe(string(), minLength(1));
2756
2918
  var time = isoTime;
@@ -2774,7 +2936,7 @@ var author = strictObject({
2774
2936
  name: nullable(text6)
2775
2937
  });
2776
2938
 
2777
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
2939
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
2778
2940
  var organization = strictObject({
2779
2941
  id: id4,
2780
2942
  ref: reference,
@@ -2804,7 +2966,203 @@ var reminder = strictObject({
2804
2966
  receipt: nullable(text6)
2805
2967
  });
2806
2968
 
2807
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/tags.js
2969
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/store/marks.js
2970
+ import { readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
2971
+ var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
2972
+ var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
2973
+ var inodeOf = /* @__PURE__ */ __name((store) => statSync(store, { throwIfNoEntry: false })?.ino, "inodeOf");
2974
+ var readJson = /* @__PURE__ */ __name((path) => {
2975
+ try {
2976
+ return JSON.parse(readFileSync(path, "utf8"));
2977
+ } catch (error) {
2978
+ if (error.code === "ENOENT")
2979
+ return null;
2980
+ throw error;
2981
+ }
2982
+ }, "readJson");
2983
+ var ownerStoreInTests = /* @__PURE__ */ __name((store) => {
2984
+ try {
2985
+ refuseOwnerStoreInTests(store);
2986
+ return false;
2987
+ } catch {
2988
+ return true;
2989
+ }
2990
+ }, "ownerStoreInTests");
2991
+ var sqliteFailure = /* @__PURE__ */ __name((error) => isCliFailure(error) && error.details?.reason === "store.damaged" ? error.cause : error, "sqliteFailure");
2992
+ var markStoreDamaged = /* @__PURE__ */ __name((error, { store, command, version, runId, now = Date.now }) => {
2993
+ const failure = sqliteFailure(error);
2994
+ if (!isStoreDamage(failure) || ownerStoreInTests(store))
2995
+ return false;
2996
+ const inode = inodeOf(store);
2997
+ if (inode === void 0)
2998
+ return false;
2999
+ const mark = {
3000
+ at: new Date(now()).toISOString(),
3001
+ command,
3002
+ ...version ? { cli_version: version } : {},
3003
+ ...runId ? { run_id: runId } : {},
3004
+ error: failure.message.slice(0, 500),
3005
+ inode
3006
+ };
3007
+ try {
3008
+ writeFileSync(damageMarkPath(store), `${JSON.stringify(mark, null, 2)}
3009
+ `, { flag: "wx", mode: 384 });
3010
+ return true;
3011
+ } catch {
3012
+ return false;
3013
+ }
3014
+ }, "markStoreDamaged");
3015
+ var readDamageMark = /* @__PURE__ */ __name((store) => {
3016
+ const path = damageMarkPath(store);
3017
+ let mark;
3018
+ try {
3019
+ mark = readJson(path);
3020
+ } catch {
3021
+ return { at: "unknown", command: "unknown", error: `${path} cannot be read`, inode: inodeOf(store) ?? 0 };
3022
+ }
3023
+ if (mark === null)
3024
+ return null;
3025
+ if (mark.inode !== inodeOf(store)) {
3026
+ clearDamageMark(store);
3027
+ return null;
3028
+ }
3029
+ return mark;
3030
+ }, "readDamageMark");
3031
+ var clearDamageMark = /* @__PURE__ */ __name((store) => rmSync(damageMarkPath(store), { force: true }), "clearDamageMark");
3032
+ var refuseDamagedStore = /* @__PURE__ */ __name((store, cli) => {
3033
+ const mark = readDamageMark(store);
3034
+ if (!mark)
3035
+ return;
3036
+ throw new CliError("configuration_error", `the store was found damaged at ${mark.at} by \`${mark.command}\` (${mark.error}), so nothing writes to it until it is recovered; \`${cli ?? "<cli>"} store recover\` says what is damaged and what to do`, { reason: "store.damaged" });
3037
+ }, "refuseDamagedStore");
3038
+ var readHealthMark = /* @__PURE__ */ __name((store) => {
3039
+ try {
3040
+ return readJson(healthMarkPath(store));
3041
+ } catch {
3042
+ return null;
3043
+ }
3044
+ }, "readHealthMark");
3045
+ var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, schema, now = Date.now }) => {
3046
+ const previous = readHealthMark(store);
3047
+ if (ownerStoreInTests(store))
3048
+ return { previous, cleared: null };
3049
+ const checkedAt = new Date(now()).toISOString();
3050
+ const mark = {
3051
+ checked_at: checkedAt,
3052
+ ok: health.ok,
3053
+ problems: health.problems ?? 0,
3054
+ schema,
3055
+ cli,
3056
+ ...version ? { cli_version: version } : {},
3057
+ last_ok_at: health.ok ? checkedAt : previous?.last_ok_at ?? null
3058
+ };
3059
+ const cleared = health.ok ? readDamageMark(store) : null;
3060
+ try {
3061
+ writeFileSync(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
3062
+ `, { mode: 384 });
3063
+ } catch {
3064
+ }
3065
+ if (cleared)
3066
+ clearDamageMark(store);
3067
+ return { previous, cleared };
3068
+ }, "recordDeepCheck");
3069
+
3070
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/domain/deals.js
3071
+ var DEAL_KINDS = ["deal", "lead"];
3072
+ var DEAL_STATUSES = ["open", "won", "lost"];
3073
+ var STAGE_OUTCOMES = DEAL_STATUSES;
3074
+ var DEAL_ROLES = ["owner", "contact", "decision-maker", "influencer"];
3075
+ var dealLine = /* @__PURE__ */ __name((deal) => {
3076
+ const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
3077
+ return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
3078
+ }, "dealLine");
3079
+
3080
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/domain/orders.js
3081
+ var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
3082
+ var ORDER_PURPOSES = ["personal", "business", "client", "other"];
3083
+ var orderLine = /* @__PURE__ */ __name((order) => {
3084
+ const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
3085
+ const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
3086
+ return `${order.number ?? `#${order.id}`} \xB7 ${order.supplierName}${money} (${notes2})`;
3087
+ }, "orderLine");
3088
+ var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
3089
+
3090
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/domain/relations.js
3091
+ var ORGANIZATION_ROLES = [
3092
+ "employee",
3093
+ "contractor",
3094
+ "founder",
3095
+ "owner",
3096
+ "manager",
3097
+ "adviser",
3098
+ "contact"
3099
+ ];
3100
+ var PROJECT_ROLES = ["owner", "manager", "contributor", "client-contact", "approver"];
3101
+ var RELATIONS = {
3102
+ "member-of": {
3103
+ from: ["person", "organization", "project", "chat", "email_thread"],
3104
+ to: ["organization", "project"],
3105
+ roles: { to: { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES } }
3106
+ },
3107
+ "reports-to": { from: ["person"], to: ["person"], inverse: "manages" },
3108
+ "customer-of": { from: ["person", "organization"], to: ["organization"], inverse: "supplier of" },
3109
+ "partner-of": { from: ["organization"], to: ["organization"], symmetric: true },
3110
+ "related-to": {
3111
+ from: ["person", "organization", "project", "task", "deal", "lead"],
3112
+ to: ["person", "organization", "project", "task"],
3113
+ roles: { from: { deal: DEAL_ROLES, lead: DEAL_ROLES } }
3114
+ }
3115
+ };
3116
+ var RELATION_KINDS = Object.keys(RELATIONS);
3117
+ var specOf = /* @__PURE__ */ __name((kind) => Object.hasOwn(RELATIONS, kind) ? RELATIONS[kind] : void 0, "specOf");
3118
+ var isRelationKind = /* @__PURE__ */ __name((kind) => specOf(kind) !== void 0, "isRelationKind");
3119
+ var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
3120
+ var checkEnds = /* @__PURE__ */ __name((kind, from, to) => {
3121
+ const spec = specOf(kind);
3122
+ if (!spec)
3123
+ throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
3124
+ if (memberOnly(from) && (kind !== "member-of" || to !== "project"))
3125
+ throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
3126
+ if (!spec.from.includes(from) || !spec.to.includes(to))
3127
+ throw new CliError("validation_error", `${kind} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
3128
+ return spec;
3129
+ }, "checkEnds");
3130
+ var rolesOf = /* @__PURE__ */ __name((kind, from, to) => {
3131
+ const spec = specOf(kind);
3132
+ if (kind === "member-of" && from !== "person")
3133
+ return void 0;
3134
+ return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
3135
+ }, "rolesOf");
3136
+ var ROLE_LISTS = { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES, deal: DEAL_ROLES };
3137
+ var roleListOf = /* @__PURE__ */ __name((kind, from, to) => {
3138
+ const roles = rolesOf(kind, from, to);
3139
+ return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
3140
+ }, "roleListOf");
3141
+ var checkRole = /* @__PURE__ */ __name((kind, from, to, role, extra = []) => {
3142
+ const roles = rolesOf(kind, from, to)?.concat(extra);
3143
+ if (roles && !roles.includes(role))
3144
+ throw new CliError("validation_error", `a ${from}'s role on ${kind} ${to} is one of ${roles.join(", ")}`, {
3145
+ reason: "relationship.role-unknown"
3146
+ });
3147
+ return role;
3148
+ }, "checkRole");
3149
+ var isSymmetric = /* @__PURE__ */ __name((kind) => specOf(kind)?.symmetric === true, "isSymmetric");
3150
+ var inverseOf = /* @__PURE__ */ __name((kind) => specOf(kind)?.symmetric ? kind : specOf(kind)?.inverse ?? null, "inverseOf");
3151
+ var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
3152
+ var standingOf = /* @__PURE__ */ __name((link, now) => {
3153
+ if (link.endsAt != null && link.endsAt <= now)
3154
+ return "ended";
3155
+ if (link.confirmed)
3156
+ return "confirmed";
3157
+ if (link.deletedAt != null)
3158
+ return "ended";
3159
+ return link.accountId != null ? "reported" : "proposed";
3160
+ }, "standingOf");
3161
+ var isUsable = /* @__PURE__ */ __name((standing) => standing === "confirmed" || standing === "reported", "isUsable");
3162
+ var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
3163
+ 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");
3164
+
3165
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/domain/tags.js
2808
3166
  var TAG_TYPES = ["chat", "contact", "message", "task"];
2809
3167
  var TAG = /^[a-z0-9-]{1,32}$/;
2810
3168
  var tagOf = /* @__PURE__ */ __name((value) => {
@@ -2818,7 +3176,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
2818
3176
  return tag;
2819
3177
  }, "normalizeTag");
2820
3178
 
2821
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
3179
+ // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e0755e4bb52a6ea6d9033617574418d1/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
2822
3180
  var LINK_KINDS = [
2823
3181
  "links-to",
2824
3182
  "blocked-by",
@@ -2831,137 +3189,16 @@ var LINK_KINDS = [
2831
3189
  "created-from",
2832
3190
  "duplicate-of",
2833
3191
  "related-to",
3192
+ "reports-to",
3193
+ "customer-of",
3194
+ "partner-of",
2834
3195
  "assigned-to",
2835
3196
  "attached"
2836
3197
  ];
2837
3198
  var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
2838
3199
  var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
2839
- var RELATION_KINDS = ["member-of", "related-to"];
2840
3200
  var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
2841
-
2842
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/money.js
2843
- var CURRENCY_SCALES = {
2844
- AED: 2,
2845
- AMD: 2,
2846
- AUD: 2,
2847
- BHD: 3,
2848
- BYN: 2,
2849
- CAD: 2,
2850
- CHF: 2,
2851
- CLP: 0,
2852
- CNY: 2,
2853
- CZK: 2,
2854
- DKK: 2,
2855
- EUR: 2,
2856
- GBP: 2,
2857
- GEL: 2,
2858
- HUF: 2,
2859
- ILS: 2,
2860
- INR: 2,
2861
- ISK: 0,
2862
- JPY: 0,
2863
- KGS: 2,
2864
- KRW: 0,
2865
- KWD: 3,
2866
- KZT: 2,
2867
- NOK: 2,
2868
- PLN: 2,
2869
- RSD: 2,
2870
- RUB: 2,
2871
- SEK: 2,
2872
- THB: 2,
2873
- TRY: 2,
2874
- UAH: 2,
2875
- USD: 2,
2876
- UZS: 2,
2877
- VND: 0
2878
- };
2879
- var refuse = /* @__PURE__ */ __name((message, reason) => {
2880
- throw new CliError("validation_error", message, { reason });
2881
- }, "refuse");
2882
- var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
2883
- var parseDecimal = /* @__PURE__ */ __name((text7, scale) => {
2884
- const match = DECIMAL.exec(text7.trim());
2885
- if (!match || (match[2] ?? "").length > scale)
2886
- return void 0;
2887
- return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
2888
- }, "parseDecimal");
2889
- var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
2890
- const digits = BigInt(units).toString().padStart(scale + 1, "0");
2891
- return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
2892
- }, "formatDecimal");
2893
- var groupDigits = /* @__PURE__ */ __name((decimal) => {
2894
- const [whole = "0", fraction] = decimal.split(".");
2895
- const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
2896
- return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
2897
- }, "groupDigits");
2898
- var currencyOf = /* @__PURE__ */ __name((text7) => {
2899
- const code = typeof text7 === "string" ? text7.trim().toUpperCase() : "";
2900
- if (CURRENCY_SCALES[code] === void 0)
2901
- return refuse(`${typeof text7 === "string" && text7.trim() ? text7.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
2902
- return code;
2903
- }, "currencyOf");
2904
- var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
2905
- var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
2906
- const scale = scaleOf(currency);
2907
- const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
2908
- if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
2909
- return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
2910
- return Number(units);
2911
- }, "minorUnits");
2912
- var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
2913
- amount: formatDecimal(units, scaleOf(currency)),
2914
- currency
2915
- }), "moneyOf");
2916
- var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
2917
- var QUANTITY_SCALE = 3;
2918
- var quantityOf = /* @__PURE__ */ __name((text7) => {
2919
- const thousandths = typeof text7 === "string" ? parseDecimal(text7, QUANTITY_SCALE) : void 0;
2920
- if (thousandths === void 0 || thousandths === 0n)
2921
- return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
2922
- const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
2923
- return { text: plain, thousandths };
2924
- }, "quantityOf");
2925
- var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
2926
-
2927
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/finance.js
2928
- var INVOICE_DIRECTIONS = ["receivable", "payable"];
2929
- var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
2930
- var MONEY_DIRECTIONS = ["in", "out"];
2931
- var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
2932
- var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
2933
- if (current === "draft" || current === "void")
2934
- return current;
2935
- if (paid <= 0)
2936
- return "issued";
2937
- return paid < total ? "partly_paid" : "paid";
2938
- }, "settledStatus");
2939
- var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
2940
- var notes = /* @__PURE__ */ __name((...words2) => {
2941
- const kept = words2.filter((word) => word !== null);
2942
- return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
2943
- }, "notes");
2944
- var invoiceLine = /* @__PURE__ */ __name((invoice) => {
2945
- const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
2946
- const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
2947
- return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
2948
- }, "invoiceLine");
2949
- var paymentLine = /* @__PURE__ */ __name((payment) => {
2950
- const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
2951
- return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
2952
- }, "paymentLine");
2953
- var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
2954
- var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
2955
-
2956
- // node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4b96f151b4ca40121094ad166c695991/node_modules/@wirecat/cli-core/dist/domain/orders.js
2957
- var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
2958
- var ORDER_PURPOSES = ["personal", "business", "client", "other"];
2959
- var orderLine = /* @__PURE__ */ __name((order) => {
2960
- const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
2961
- const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
2962
- return `${order.number ?? `#${order.id}`} \xB7 ${order.supplierName}${money} (${notes2})`;
2963
- }, "orderLine");
2964
- var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
3201
+ var COUNTERPART_ROLE = "counterpart";
2965
3202
 
2966
3203
  export {
2967
3204
  formatMeetingReference,
@@ -3051,14 +3288,70 @@ export {
3051
3288
  validateMeetingSeriesInventoryCursor,
3052
3289
  aggregateMeetingCounts,
3053
3290
  aggregateMeetingStats,
3291
+ parseDecimal,
3292
+ formatDecimal,
3293
+ currencyOf,
3294
+ scaleOf,
3295
+ minorUnits,
3296
+ signedMinorUnits,
3297
+ moneyOf,
3298
+ moneyLabel,
3299
+ quantityOf,
3300
+ lineUnits,
3301
+ INVOICE_DIRECTIONS,
3302
+ INVOICE_STATUSES,
3303
+ MONEY_DIRECTIONS,
3304
+ FINANCE_REVIEWS,
3305
+ settledStatus,
3306
+ invoiceLine,
3307
+ paymentLine,
3308
+ invoiceTitle,
3309
+ paymentEntryTitle,
3310
+ CATALOG_KINDS,
3311
+ BUSINESS_KINDS,
3312
+ CONTRACT_KINDS,
3313
+ CONTRACT_STATUSES,
3314
+ SUBSCRIPTION_STATUSES,
3315
+ WALLET_KINDS,
3316
+ TRANSACTION_STATUSES,
3317
+ ORDER_DIRECTIONS,
3318
+ intervalOf,
3319
+ productLine,
3320
+ contractLine,
3321
+ subscriptionLine,
3322
+ walletLine,
3323
+ transactionLine,
3324
+ DEAL_KINDS,
3325
+ DEAL_STATUSES,
3326
+ STAGE_OUTCOMES,
3327
+ DEAL_ROLES,
3328
+ dealLine,
3329
+ ORDER_STATUSES,
3330
+ ORDER_PURPOSES,
3331
+ orderLine,
3332
+ orderTitle,
3333
+ RELATION_KINDS,
3334
+ isRelationKind,
3335
+ checkEnds,
3336
+ rolesOf,
3337
+ ROLE_LISTS,
3338
+ roleListOf,
3339
+ checkRole,
3340
+ isSymmetric,
3341
+ inverseOf,
3342
+ STANDINGS,
3343
+ standingOf,
3344
+ isUsable,
3345
+ notOverriddenSql,
3346
+ usableLinkSql,
3054
3347
  TAG_TYPES,
3055
3348
  tagOf,
3056
3349
  normalizeTag,
3057
3350
  LINK_KINDS,
3058
3351
  LINK_ORIGINS,
3059
3352
  LINK_SOURCES,
3060
- RELATION_KINDS,
3061
3353
  linkKind,
3354
+ COUNTERPART_ROLE,
3062
3355
  TASK_KINDS,
3063
3356
  TASK_STATES,
3064
3357
  CLOSED_STATES,
@@ -3080,28 +3373,6 @@ export {
3080
3373
  MEMORY_SCOPES,
3081
3374
  WORK_TASK_TYPES,
3082
3375
  TASK_TYPES2 as TASK_TYPES,
3083
- parseDecimal,
3084
- formatDecimal,
3085
- currencyOf,
3086
- scaleOf,
3087
- minorUnits,
3088
- moneyOf,
3089
- moneyLabel,
3090
- quantityOf,
3091
- lineUnits,
3092
- INVOICE_DIRECTIONS,
3093
- INVOICE_STATUSES,
3094
- MONEY_DIRECTIONS,
3095
- FINANCE_REVIEWS,
3096
- settledStatus,
3097
- invoiceLine,
3098
- paymentLine,
3099
- invoiceTitle,
3100
- paymentEntryTitle,
3101
- ORDER_STATUSES,
3102
- ORDER_PURPOSES,
3103
- orderLine,
3104
- orderTitle,
3105
3376
  text6 as text,
3106
3377
  id4 as id,
3107
3378
  time,
@@ -3113,5 +3384,13 @@ export {
3113
3384
  author,
3114
3385
  organization,
3115
3386
  project,
3116
- reminder
3387
+ reminder,
3388
+ damageMarkPath,
3389
+ healthMarkPath,
3390
+ markStoreDamaged,
3391
+ readDamageMark,
3392
+ clearDamageMark,
3393
+ refuseDamagedStore,
3394
+ readHealthMark,
3395
+ recordDeepCheck
3117
3396
  };