@wirecat/drive-cli 0.64.0 → 0.66.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 (228) hide show
  1. package/contracts/wirecat.json +2871 -0
  2. package/dist/bin/drive.js +2 -2
  3. package/dist/bin/drive.js.map +1 -1
  4. package/dist/browse.d.ts +1 -1
  5. package/dist/browse.d.ts.map +1 -1
  6. package/dist/browse.js +1 -1
  7. package/dist/bundle/{all-profiles-BPPT2AK5.js → all-profiles-WCQLIHUG.js} +14 -13
  8. package/dist/bundle/{anthropic-JW6GOJUD.js → anthropic-5RJMB6O7.js} +32 -16
  9. package/dist/bundle/{app-server-KAQIOJMZ.js → app-server-3RGYXPKG.js} +72 -58
  10. package/dist/bundle/{bun-UT7GNTPV.js → bun-L34VEKGG.js} +2 -2
  11. package/dist/bundle/{bun-sqlite-2OIVV3LS.js → bun-sqlite-H6IAXQXI.js} +12 -8
  12. package/dist/bundle/chunk-2AF77WMH.js +13 -0
  13. package/dist/bundle/{chunk-KVW4XNKB.js → chunk-2S3E2HVV.js} +107 -48
  14. package/dist/bundle/{chunk-IX7NQJLY.js → chunk-3NYH756U.js} +49 -116
  15. package/dist/bundle/chunk-3QFUDXMQ.js +53 -0
  16. package/dist/bundle/{chunk-5ZBR55US.js → chunk-3SDJIMZB.js} +1 -1
  17. package/dist/bundle/{chunk-AHB4OJCI.js → chunk-4UHBJSMI.js} +21735 -27143
  18. package/dist/bundle/chunk-5HVJK3ZJ.js +101 -0
  19. package/dist/bundle/{chunk-GSMYXGFR.js → chunk-5K54RZBK.js} +13 -5
  20. package/dist/bundle/{chunk-LOMW6F2E.js → chunk-5PLINHEY.js} +5403 -4847
  21. package/dist/bundle/{chunk-J62DI53V.js → chunk-5VDVGDOC.js} +1 -1
  22. package/dist/bundle/{chunk-66AF4FBW.js → chunk-5XLU4NN6.js} +4 -4
  23. package/dist/bundle/{chunk-4CNTID2X.js → chunk-6UJCCOZC.js} +4 -4
  24. package/dist/bundle/{chunk-G4KEKKDE.js → chunk-6X3KUFRQ.js} +60 -29
  25. package/dist/bundle/{chunk-QEAD2LF4.js → chunk-7EP4AU6A.js} +3 -3
  26. package/dist/bundle/{chunk-ZRZ4HTCK.js → chunk-7LT2G5BC.js} +171 -174
  27. package/dist/bundle/{chunk-2W464HAE.js → chunk-7ZGJRVBH.js} +7 -5
  28. package/dist/bundle/{chunk-FXBHOCJK.js → chunk-ADLS6FVG.js} +1 -1
  29. package/dist/bundle/{chunk-KG2XKEHL.js → chunk-ALE67WRR.js} +5 -5
  30. package/dist/bundle/{chunk-ZSZJLJIA.js → chunk-AP4MX247.js} +38 -28
  31. package/dist/bundle/{chunk-EWGVDFPT.js → chunk-BIJW6AYA.js} +41873 -36466
  32. package/dist/bundle/{chunk-B7XBIOMR.js → chunk-BQXSE645.js} +16 -16
  33. package/dist/bundle/{chunk-F2VDAG32.js → chunk-COGWKO2T.js} +3 -3
  34. package/dist/bundle/{chunk-EZ6O3ST3.js → chunk-D4MIMH2N.js} +12 -6
  35. package/dist/bundle/{chunk-4YRENUB5.js → chunk-D7KOAPG6.js} +2 -2
  36. package/dist/bundle/chunk-E2F2XIX6.js +224 -0
  37. package/dist/bundle/{chunk-36GPBPWM.js → chunk-FA2TNA5X.js} +3 -1
  38. package/dist/bundle/{chunk-SIOIMO62.js → chunk-FHBTQPA3.js} +69 -63
  39. package/dist/bundle/{chunk-34BIDKF4.js → chunk-FKKPVPZR.js} +649 -212
  40. package/dist/bundle/chunk-G4TNKBDX.js +185 -0
  41. package/dist/bundle/{chunk-2FEZ24DK.js → chunk-GVA3KTCD.js} +20 -20
  42. package/dist/bundle/chunk-GY4DAJSK.js +167 -0
  43. package/dist/bundle/{chunk-5OFA5EXE.js → chunk-H7XL6WTW.js} +2 -2
  44. package/dist/bundle/{chunk-K6BSB53R.js → chunk-HHRJPLFO.js} +1 -1
  45. package/dist/bundle/{chunk-P7DEGRZA.js → chunk-HPKE2GDP.js} +49 -28
  46. package/dist/bundle/{chunk-QXCKJUZY.js → chunk-HPSHQVJU.js} +633 -465
  47. package/dist/bundle/{chunk-BEZJA44H.js → chunk-HQBLJLYH.js} +7 -7
  48. package/dist/bundle/{chunk-JRXFW7HE.js → chunk-I5R5CMQR.js} +5 -5
  49. package/dist/bundle/{chunk-EJ4PNHPP.js → chunk-IIHZTV6V.js} +1 -1
  50. package/dist/bundle/{chunk-G3NULXOM.js → chunk-IRNDYNQX.js} +4 -4
  51. package/dist/bundle/{chunk-N622LRPM.js → chunk-JCHF7LZT.js} +4 -4
  52. package/dist/bundle/{chunk-WWCYTMAV.js → chunk-JHMEETXI.js} +2 -2
  53. package/dist/bundle/{chunk-ZF6GUZCE.js → chunk-JLCR24UM.js} +1 -1
  54. package/dist/bundle/{chunk-IDAK4DDK.js → chunk-JQXK3M5M.js} +1 -1
  55. package/dist/bundle/{chunk-KIN6PDFE.js → chunk-KOY5HUBY.js} +14 -5
  56. package/dist/bundle/{chunk-5HSRQ53R.js → chunk-KRG5X5PH.js} +2 -2
  57. package/dist/bundle/{chunk-VIJ6ACYB.js → chunk-LVAPSAHF.js} +8 -8
  58. package/dist/bundle/{chunk-OEVHZOHC.js → chunk-M7543RUJ.js} +50 -18
  59. package/dist/bundle/{chunk-BZ2ZKILM.js → chunk-MZWXTJ4O.js} +3 -3
  60. package/dist/bundle/{chunk-EC2XGDKJ.js → chunk-NK4GVFJH.js} +4 -4
  61. package/dist/bundle/chunk-NYECVHFH.js +10283 -0
  62. package/dist/bundle/{chunk-HW4UPST2.js → chunk-NYZS2LKF.js} +2 -2
  63. package/dist/bundle/chunk-O53WLYX3.js +72 -0
  64. package/dist/bundle/{chunk-IK6KH3RE.js → chunk-OIF4B526.js} +1 -1
  65. package/dist/bundle/{chunk-UJR272CP.js → chunk-OT7SQQJK.js} +359 -903
  66. package/dist/bundle/chunk-OZOQLAWK.js +72 -0
  67. package/dist/bundle/{chunk-VT2UFYPJ.js → chunk-P7HQFII6.js} +22 -15
  68. package/dist/bundle/{chunk-6G53ZFUT.js → chunk-PJGOQSE5.js} +1 -1
  69. package/dist/bundle/{chunk-OH3K2E7X.js → chunk-PKM55ZRR.js} +704 -1214
  70. package/dist/bundle/{chunk-GW3U6OLD.js → chunk-PUMDOCAF.js} +1 -1
  71. package/dist/bundle/{chunk-EQEGJVO2.js → chunk-QF7VL4C3.js} +1 -1
  72. package/dist/bundle/{chunk-CPMRM3GQ.js → chunk-QJ57PV55.js} +1941 -662
  73. package/dist/bundle/{chunk-O2QO5UZC.js → chunk-QSELSDWE.js} +13 -13
  74. package/dist/bundle/{chunk-BEUAICUD.js → chunk-SOOU5WO6.js} +2 -2
  75. package/dist/bundle/{chunk-46CD64J2.js → chunk-SZ6JFOL4.js} +269 -64
  76. package/dist/bundle/{chunk-UD55VB2N.js → chunk-T3ULDA7C.js} +3 -3
  77. package/dist/bundle/{chunk-E2LBCCTG.js → chunk-TAHISPDE.js} +5 -5
  78. package/dist/bundle/{chunk-6B37XO6B.js → chunk-TYLEICTX.js} +3 -3
  79. package/dist/bundle/{chunk-TNV2FXVK.js → chunk-UAKX6DP4.js} +5 -5
  80. package/dist/bundle/{chunk-VPLFD5RJ.js → chunk-UG3GHFGY.js} +4 -4
  81. package/dist/bundle/{chunk-B67BLRAI.js → chunk-ULXEW6FT.js} +3 -60
  82. package/dist/bundle/{chunk-C7WBNOYW.js → chunk-UNTIVT47.js} +26 -2
  83. package/dist/bundle/chunk-UQPW42HF.js +18 -0
  84. package/dist/bundle/{chunk-USLZE36C.js → chunk-V2WXTILT.js} +6 -6
  85. package/dist/bundle/{chunk-BDYWZ7JE.js → chunk-VQKNKJYL.js} +46 -7
  86. package/dist/bundle/{chunk-XPXKD63J.js → chunk-VR3YKXHL.js} +93 -31
  87. package/dist/bundle/{chunk-UIEA6FIV.js → chunk-VUUPFDRU.js} +27 -28
  88. package/dist/bundle/{chunk-KE4XPPRQ.js → chunk-WYTYHUFH.js} +1750 -138
  89. package/dist/bundle/{chunk-PBMSBCVB.js → chunk-XLGDNI4S.js} +1 -1
  90. package/dist/bundle/{chunk-3J5KAFNA.js → chunk-XVZNFA2P.js} +4935 -3623
  91. package/dist/bundle/chunk-Y5U4HIZS.js +71 -0
  92. package/dist/bundle/chunk-YTIPTHEE.js +47 -0
  93. package/dist/bundle/cli-KW6QQVS5.js +1101 -0
  94. package/dist/bundle/command-contract-CE543JBN.js +41 -0
  95. package/dist/bundle/command-server-entry-OC4E4DED.js +171 -0
  96. package/dist/bundle/{decode-HTOQ6S3V.js → decode-AH5ZLLDK.js} +8 -8
  97. package/dist/bundle/{dispatch-SH5SP6LA.js → dispatch-CDWZZ54Q.js} +9 -9
  98. package/dist/bundle/drive.js +13 -13
  99. package/dist/bundle/{echarts-KFHB6SLX.js → echarts-VC7MTXWY.js} +2 -2
  100. package/dist/bundle/{embed-YATFB2PN.js → embed-EPSQY6QG.js} +9 -9
  101. package/dist/bundle/{embedder-MQPDFGTJ.js → embedder-TK4U4TJR.js} +12 -12
  102. package/dist/bundle/entry-3VN23M7M.js +25 -0
  103. package/dist/bundle/{failure-4FQL4XJI.js → failure-WSVZOPFE.js} +4 -4
  104. package/dist/bundle/first-run-7ZYJ7EB3.js +30 -0
  105. package/dist/bundle/first-screen-CZDH7QY3.js +39 -0
  106. package/dist/bundle/google-OBZMWA7J.js +45 -0
  107. package/dist/bundle/{google-api-QMFGCXBM.js → google-api-AV4X2JH3.js} +68 -57
  108. package/dist/bundle/grants-WTRLN4ZI.js +111 -0
  109. package/dist/bundle/{identity-FYVDK4M2.js → identity-CGHHF7AK.js} +8 -6
  110. package/dist/bundle/{instructions-D3GF3B7M.js → instructions-24PHDBBE.js} +1 -1
  111. package/dist/bundle/{login-COFZ2IWP.js → login-XHFESAFM.js} +73 -64
  112. package/dist/bundle/{mcp-RKJG22KM.js → mcp-M5YCSWJJ.js} +2 -2
  113. package/dist/bundle/{node-OFICOKX3.js → node-GIDULTV5.js} +2 -2
  114. package/dist/bundle/{node-KM3CUABH.js → node-P4E63KXA.js} +9 -9
  115. package/dist/bundle/{node-sqlite-DNBTDOXD.js → node-sqlite-LINBOAWK.js} +13 -9
  116. package/dist/bundle/oauth-JHUX3KE3.js +22 -0
  117. package/dist/bundle/{open-PTPR2YWX.js → open-RYFKPNCJ.js} +8 -8
  118. package/dist/bundle/{openai-2KV5LUW4.js → openai-Q7YYUHJF.js} +28 -42
  119. package/dist/bundle/{process-EAW6NST2.js → process-VPIZTIJR.js} +1 -1
  120. package/dist/bundle/{program-6UV5Q5YN.js → program-IUXFRBZA.js} +419 -604
  121. package/dist/bundle/{prompt-634TPMJK.js → prompt-LF4KX3XL.js} +8 -8
  122. package/dist/bundle/{reasons-DDWCEYSQ.js → reasons-JPYOU5GV.js} +5 -5
  123. package/dist/bundle/{recognize-SJO6QUDW.js → recognize-KEWTJXFH.js} +7 -7
  124. package/dist/bundle/{remote-6JXZITKF.js → remote-HGGLB76S.js} +13 -10
  125. package/dist/bundle/{rerank-MD5VOPQ6.js → rerank-TDUKETFT.js} +10 -10
  126. package/dist/bundle/{serve-LZTROA2M.js → serve-XFYMKW5W.js} +12 -12
  127. package/dist/bundle/server-BDEV3CZJ.js +74 -0
  128. package/dist/bundle/{server-NSA3UAFY.js → server-PXIPSGFP.js} +48 -44
  129. package/dist/bundle/{services-F5A6XQCV.js → services-2BOCGMJU.js} +111 -41
  130. package/dist/bundle/{sqlite-runtime-7YF6REKS.js → sqlite-runtime-R7M5XUMW.js} +9 -9
  131. package/dist/bundle/{start-MUFLE6FA.js → start-YRLT4MQZ.js} +7 -7
  132. package/dist/bundle/{state-UC54F3YZ.js → state-NZ7WRJWH.js} +9 -9
  133. package/dist/bundle/{store-F5FJGWMR.js → store-7LCVDO7G.js} +63 -28
  134. package/dist/bundle/{store-J53YNAH6.js → store-ICDGPSEN.js} +27 -18
  135. package/dist/bundle/store-maintenance-command-SJPLY6IH.js +65 -0
  136. package/dist/bundle/tokens-FGTBE7VW.js +111 -0
  137. package/dist/commands/config.d.ts.map +1 -1
  138. package/dist/commands/config.js +6 -5
  139. package/dist/commands/config.js.map +1 -1
  140. package/dist/commands/context.d.ts +4 -2
  141. package/dist/commands/context.d.ts.map +1 -1
  142. package/dist/commands/context.js.map +1 -1
  143. package/dist/commands/discovery.d.ts +0 -1
  144. package/dist/commands/discovery.d.ts.map +1 -1
  145. package/dist/commands/discovery.js +6 -26
  146. package/dist/commands/discovery.js.map +1 -1
  147. package/dist/commands/documents.d.ts +2 -0
  148. package/dist/commands/documents.d.ts.map +1 -1
  149. package/dist/commands/documents.js +39 -3
  150. package/dist/commands/documents.js.map +1 -1
  151. package/dist/commands/knowledge.d.ts.map +1 -1
  152. package/dist/commands/knowledge.js +7 -6
  153. package/dist/commands/knowledge.js.map +1 -1
  154. package/dist/commands/search.d.ts.map +1 -1
  155. package/dist/commands/search.js +11 -8
  156. package/dist/commands/search.js.map +1 -1
  157. package/dist/config.d.ts +14 -0
  158. package/dist/config.d.ts.map +1 -1
  159. package/dist/config.js +35 -4
  160. package/dist/config.js.map +1 -1
  161. package/dist/contract-overrides.d.ts +16 -4
  162. package/dist/contract-overrides.d.ts.map +1 -1
  163. package/dist/contract-overrides.js +86 -410
  164. package/dist/contract-overrides.js.map +1 -1
  165. package/dist/documents-add.d.ts +49 -0
  166. package/dist/documents-add.d.ts.map +1 -0
  167. package/dist/documents-add.js +122 -0
  168. package/dist/documents-add.js.map +1 -0
  169. package/dist/errors.d.ts +1 -0
  170. package/dist/errors.d.ts.map +1 -1
  171. package/dist/errors.js +13 -1
  172. package/dist/errors.js.map +1 -1
  173. package/dist/google-api.d.ts.map +1 -1
  174. package/dist/google-api.js +4 -1
  175. package/dist/google-api.js.map +1 -1
  176. package/dist/identity.d.ts +4 -0
  177. package/dist/identity.d.ts.map +1 -1
  178. package/dist/identity.js +22 -0
  179. package/dist/identity.js.map +1 -1
  180. package/dist/knowledge.d.ts +1 -1
  181. package/dist/knowledge.d.ts.map +1 -1
  182. package/dist/knowledge.js +17 -19
  183. package/dist/knowledge.js.map +1 -1
  184. package/dist/login.d.ts.map +1 -1
  185. package/dist/login.js +2 -2
  186. package/dist/login.js.map +1 -1
  187. package/dist/model.d.ts +3 -0
  188. package/dist/model.d.ts.map +1 -1
  189. package/dist/model.js.map +1 -1
  190. package/dist/program.d.ts.map +1 -1
  191. package/dist/program.js +30 -21
  192. package/dist/program.js.map +1 -1
  193. package/dist/reasons.d.ts.map +1 -1
  194. package/dist/reasons.js +25 -1
  195. package/dist/reasons.js.map +1 -1
  196. package/dist/store-transition.js +2 -2
  197. package/dist/store-transition.js.map +1 -1
  198. package/dist/store.d.ts.map +1 -1
  199. package/dist/store.js +27 -7
  200. package/dist/store.js.map +1 -1
  201. package/dist/tokens.d.ts +9 -2
  202. package/dist/tokens.d.ts.map +1 -1
  203. package/dist/tokens.js +18 -15
  204. package/dist/tokens.js.map +1 -1
  205. package/dist/version.d.ts +1 -1
  206. package/dist/version.js +1 -1
  207. package/dist/wcat.d.ts +3 -0
  208. package/dist/wcat.d.ts.map +1 -0
  209. package/dist/wcat.js +4 -0
  210. package/dist/wcat.js.map +1 -0
  211. package/package.json +8 -8
  212. package/dist/bundle/chunk-3NULZGQU.js +0 -27
  213. package/dist/bundle/chunk-DD7EFG6B.js +0 -35
  214. package/dist/bundle/chunk-M73NNJ3X.js +0 -26
  215. package/dist/bundle/chunk-SBZB7HMU.js +0 -1055
  216. package/dist/bundle/command-contract-H5OYJOPF.js +0 -38
  217. package/dist/bundle/dist-PY3MVR3G.js +0 -21
  218. package/dist/bundle/entry-YZBB647C.js +0 -22
  219. package/dist/bundle/first-run-5JT3UQZB.js +0 -30
  220. package/dist/bundle/first-screen-BEMDEWO7.js +0 -36
  221. package/dist/bundle/google-DVADVICN.js +0 -36
  222. package/dist/bundle/grants-WKB2E4TA.js +0 -103
  223. package/dist/bundle/oauth-PDQHWFBF.js +0 -22
  224. package/dist/bundle/server-GT7X666D.js +0 -69
  225. package/dist/bundle/store-maintenance-command-GJVXLBAB.js +0 -58
  226. package/dist/bundle/tokens-H2EJKGA5.js +0 -101
  227. package/dist/bundle/{chunk-SW6C6WH5.js → chunk-HVJJWJYQ.js} +0 -0
  228. package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-CE73EWJ2.js} +3 -3
@@ -8,18 +8,26 @@ import {
8
8
  queryFieldsOf,
9
9
  timezoneOf,
10
10
  validateQuery
11
- } from "./chunk-2FEZ24DK.js";
11
+ } from "./chunk-GVA3KTCD.js";
12
12
  import {
13
13
  isCliFailure,
14
14
  isStoreDamage
15
- } from "./chunk-B67BLRAI.js";
15
+ } from "./chunk-O53WLYX3.js";
16
16
  import {
17
17
  refuseOwnerStoreInTests
18
- } from "./chunk-DD7EFG6B.js";
18
+ } from "./chunk-3QFUDXMQ.js";
19
+ import {
20
+ createRecordLog,
21
+ resolvePaths,
22
+ writeSecurely
23
+ } from "./chunk-6X3KUFRQ.js";
19
24
  import {
20
25
  singleLine,
21
26
  visibleControls
22
- } from "./chunk-IDAK4DDK.js";
27
+ } from "./chunk-JQXK3M5M.js";
28
+ import {
29
+ traceIdOf
30
+ } from "./chunk-NYZS2LKF.js";
23
31
  import {
24
32
  STEPS,
25
33
  array,
@@ -46,15 +54,528 @@ import {
46
54
  string,
47
55
  union,
48
56
  unknown
49
- } from "./chunk-BDYWZ7JE.js";
57
+ } from "./chunk-VQKNKJYL.js";
50
58
  import {
51
59
  CliError
52
- } from "./chunk-EJ4PNHPP.js";
60
+ } from "./chunk-IIHZTV6V.js";
53
61
  import {
54
62
  __name
55
63
  } from "./chunk-ZVVMGPBJ.js";
56
64
 
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
65
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/runs/run.js
66
+ import { randomUUID } from "node:crypto";
67
+ import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
68
+ import { userInfo } from "node:os";
69
+ import { join, sep } from "node:path";
70
+
71
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
72
+ var snake = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
73
+ var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
74
+ var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
75
+ var logAttributes = /* @__PURE__ */ __name((event2) => renamed(event2, snake), "logAttributes");
76
+ var fromLogAttributes = /* @__PURE__ */ __name((attributes) => renamed(attributes, camel), "fromLogAttributes");
77
+ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
78
+ debug: /* @__PURE__ */ __name((event2, message) => logger.debug(logAttributes(event2), message), "debug"),
79
+ info: /* @__PURE__ */ __name((event2, message) => logger.info(logAttributes(event2), message), "info"),
80
+ warn: /* @__PURE__ */ __name((event2, message) => logger.warn(logAttributes(event2), message), "warn"),
81
+ error: /* @__PURE__ */ __name((event2, message) => logger.error(logAttributes(event2), message), "error")
82
+ }), "snakeLogger");
83
+
84
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
85
+ var diagnostic = {
86
+ event: true,
87
+ operation: true,
88
+ opcode: true,
89
+ seq: true,
90
+ status: true,
91
+ method: true,
92
+ endpointTemplate: true,
93
+ bytes: true,
94
+ ids: true,
95
+ counts: true,
96
+ durationMs: true,
97
+ outcome: true,
98
+ errorCode: true,
99
+ providerError: true,
100
+ level: true,
101
+ transport: true,
102
+ attempt: true,
103
+ waitMs: true,
104
+ code: true,
105
+ detail: true,
106
+ reason: true,
107
+ ageMs: true,
108
+ kind: true,
109
+ table: true,
110
+ op: true,
111
+ n: true
112
+ };
113
+ var send = {
114
+ profile: true,
115
+ chatId: true,
116
+ outcome: true,
117
+ kind: true,
118
+ action: true,
119
+ people: true,
120
+ messageId: true,
121
+ key: true,
122
+ count: true,
123
+ forEveryone: true,
124
+ sendId: true,
125
+ operationId: true,
126
+ parentOperationId: true,
127
+ replyTo: true,
128
+ threadId: true,
129
+ sendAs: true,
130
+ resultChatId: true,
131
+ length: true,
132
+ attachments: true,
133
+ scheduledFor: true,
134
+ notify: true,
135
+ origin: true,
136
+ reservation: true,
137
+ errorCode: true
138
+ };
139
+ var background = [
140
+ "job",
141
+ "pid",
142
+ "schedule",
143
+ "exitCode",
144
+ "tool",
145
+ "tier",
146
+ "actorType",
147
+ "actorId",
148
+ "agent",
149
+ "targetType",
150
+ "targetId"
151
+ ];
152
+ var crash = ["errorClass", "frames"];
153
+ var dropped = ["dropped"];
154
+ var LOG_ATTRIBUTES = [
155
+ ...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
156
+ ].sort();
157
+
158
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/runs/run.js
159
+ var KEEP_RUNS_FOR_DAYS = 30;
160
+ var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
161
+ var KEEP_STORE_RUNS_FOR_DAYS = 3;
162
+ var RUNS_SIZE_LIMIT_MB = 200;
163
+ var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "runs"), "runsDirFor");
164
+ var startRun = /* @__PURE__ */ __name((options) => {
165
+ const now = options.now ?? (() => /* @__PURE__ */ new Date());
166
+ const startedAt = options.startedAt ?? now();
167
+ const id5 = options.runId ?? newRunId(startedAt, options.command);
168
+ const dir = join(options.runsDir, day(startedAt), id5);
169
+ pruneRuns(options.runsDir, {
170
+ keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
171
+ keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
172
+ keepStoreDays: options.keepStoreDays ?? KEEP_STORE_RUNS_FOR_DAYS,
173
+ maxBytes: options.maxBytes ?? RUNS_SIZE_LIMIT_MB * 1024 * 1024,
174
+ now: startedAt
175
+ });
176
+ refuseRealStateInTests(dir);
177
+ const metadata = {
178
+ runId: id5,
179
+ command: options.command,
180
+ ...options.profile === void 0 ? {} : { profile: options.profile },
181
+ startedAt: startedAt.toISOString(),
182
+ status: "running",
183
+ cliVersion: options.cliVersion,
184
+ runtime: runtime(),
185
+ platform: process.platform,
186
+ arch: process.arch,
187
+ ...options.traceId === void 0 ? {} : { traceId: options.traceId },
188
+ ...options.context
189
+ };
190
+ let file;
191
+ const opened = /* @__PURE__ */ __name(() => {
192
+ if (file)
193
+ return file;
194
+ mkdirSync(dir, { recursive: true, mode: 448 });
195
+ const events = join(dir, "events.jsonl");
196
+ writeFileSync(events, "", { flag: "a", mode: 384 });
197
+ file = snakeLogger(createRecordLog({
198
+ to: events,
199
+ runId: id5,
200
+ command: options.command,
201
+ resource: { service: options.service, version: options.cliVersion },
202
+ allow: LOG_ATTRIBUTES,
203
+ ...options.traceId === void 0 ? {} : { traceId: options.traceId },
204
+ ...options.onError === void 0 ? {} : { onError: options.onError }
205
+ }));
206
+ writeRunFile(dir, metadata);
207
+ return file;
208
+ }, "opened");
209
+ if (!options.lazy)
210
+ opened();
211
+ let finished = false;
212
+ const operations = /* @__PURE__ */ new Set();
213
+ const codes = /* @__PURE__ */ new Set();
214
+ const tables = /* @__PURE__ */ new Set();
215
+ const noted = /* @__PURE__ */ __name((level) => (event2, message) => {
216
+ const { operation, errorCode, error_code, code, kind: kind2, table } = event2;
217
+ if (typeof operation === "string")
218
+ operations.add(operation);
219
+ if (kind2 === "store" && typeof table === "string")
220
+ tables.add(table);
221
+ for (const value of [errorCode, error_code, code])
222
+ if (typeof value === "string")
223
+ codes.add(value);
224
+ if (finished)
225
+ return;
226
+ opened()[level](event2, message);
227
+ }, "noted");
228
+ const logger = { debug: noted("debug"), info: noted("info"), warn: noted("warn"), error: noted("error") };
229
+ return {
230
+ id: id5,
231
+ dir,
232
+ logger,
233
+ finish: /* @__PURE__ */ __name(async (status, extra = {}) => {
234
+ if (finished)
235
+ return;
236
+ finished = true;
237
+ const completedAt = now();
238
+ const final = {
239
+ ...metadata,
240
+ ...extra,
241
+ status,
242
+ completedAt: completedAt.toISOString(),
243
+ durationMs: completedAt.getTime() - startedAt.getTime(),
244
+ operations: [...operations].sort(),
245
+ codes: [...codes].sort(),
246
+ ...tables.size > 0 ? { tables: [...tables].sort() } : {}
247
+ };
248
+ if (file || status !== "success") {
249
+ opened();
250
+ writeRunFile(dir, final);
251
+ return;
252
+ }
253
+ try {
254
+ mkdirSync(join(dir, ".."), { recursive: true, mode: 448 });
255
+ appendIndex(join(dir, ".."), runFileOf(final));
256
+ } catch (error) {
257
+ options.onError?.(error);
258
+ }
259
+ }, "finish")
260
+ };
261
+ }, "startRun");
262
+ var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) => {
263
+ if (env.VITEST === void 0)
264
+ return;
265
+ let home;
266
+ try {
267
+ home = userInfo().homedir;
268
+ } catch {
269
+ return;
270
+ }
271
+ if (dir.startsWith(join(home, ".local", "share") + sep))
272
+ throw new Error(`a test opened a run in the real data folder: ${dir}`);
273
+ }, "refuseRealStateInTests");
274
+ var runtime = /* @__PURE__ */ __name(() => {
275
+ const bun = process.versions.bun;
276
+ return bun ? `bun ${bun}` : `node ${process.versions.node}`;
277
+ }, "runtime");
278
+ var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
279
+ const stamp = startedAt.toISOString().replace(/[-:]/g, "").replace(/\.\d+Z$/, "Z");
280
+ const slug = command.replace(/[^a-z0-9]+/gi, "-").toLowerCase();
281
+ return `${stamp}-${slug}-${randomUUID().slice(0, 6)}`;
282
+ }, "newRunId");
283
+ var INDEX = "index.jsonl";
284
+ var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
285
+ appendFileSync(join(dayDir, INDEX), `${JSON.stringify(written)}
286
+ `, { mode: 384 });
287
+ }, "appendIndex");
288
+ var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
289
+ const written = runFileOf(metadata);
290
+ writeSecurely(join(dir, "run.json"), `${JSON.stringify(written, null, 2)}
291
+ `, 384);
292
+ try {
293
+ appendIndex(join(dir, ".."), written);
294
+ } catch {
295
+ }
296
+ }, "writeRunFile");
297
+ var matchesListFilter = /* @__PURE__ */ __name((run2, filter) => (filter.runId === void 0 || run2.runId === filter.runId) && (filter.command === void 0 || run2.command === filter.command) && (filter.profile === void 0 || run2.profile === filter.profile) && (filter.status === void 0 || run2.status === filter.status) && (filter.errorCode === void 0 || run2.errorCode === filter.errorCode), "matchesListFilter");
298
+ var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITIVE_INFINITY, filter = {} } = {}) => {
299
+ const first = since === void 0 ? void 0 : day(new Date(since));
300
+ const runs = [];
301
+ for (const date of days(runsDir).sort().reverse()) {
302
+ if (first !== void 0 && date < first || runs.length >= atLeast)
303
+ break;
304
+ for (const metadata of runsOfDay(join(runsDir, date))) {
305
+ if (matchesListFilter(metadata, filter))
306
+ runs.push(metadata);
307
+ }
308
+ }
309
+ return runs;
310
+ }, "listRuns");
311
+ var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
312
+ const latest = /* @__PURE__ */ new Map();
313
+ let raw = "";
314
+ try {
315
+ raw = readFileSync(join(dayDir, INDEX), "utf8");
316
+ } catch {
317
+ }
318
+ for (const line2 of raw.split("\n")) {
319
+ if (line2.trim() === "")
320
+ continue;
321
+ try {
322
+ const metadata = metadataOf(JSON.parse(line2));
323
+ if (typeof metadata.runId === "string")
324
+ latest.set(metadata.runId, metadata);
325
+ } catch {
326
+ }
327
+ }
328
+ return latest;
329
+ }, "indexedRuns");
330
+ var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
331
+ const latest = indexedRuns(dayDir);
332
+ for (const entry of safeReaddir(dayDir)) {
333
+ if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
334
+ continue;
335
+ const metadata = readRun(join(dayDir, entry));
336
+ if (metadata)
337
+ latest.set(metadata.runId, metadata);
338
+ }
339
+ return [...latest.values()].sort((a, b) => a.runId < b.runId ? 1 : a.runId > b.runId ? -1 : 0);
340
+ }, "runsOfDay");
341
+ var findRun = /* @__PURE__ */ __name((runsDir, id5) => {
342
+ const stamped = /^(\d{4})(\d{2})(\d{2})T/.exec(id5);
343
+ const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
344
+ const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
345
+ for (const date of dates) {
346
+ const dir = join(runsDir, date, id5);
347
+ const metadata = readRun(dir);
348
+ if (metadata)
349
+ return { dir, metadata };
350
+ }
351
+ for (const date of dates) {
352
+ const metadata = indexedRuns(join(runsDir, date)).get(id5);
353
+ if (metadata)
354
+ return { dir: join(runsDir, date, id5), metadata };
355
+ }
356
+ return void 0;
357
+ }, "findRun");
358
+ var readEvents = /* @__PURE__ */ __name((dir) => {
359
+ let raw;
360
+ try {
361
+ raw = readFileSync(join(dir, "events.jsonl"), "utf8");
362
+ } catch {
363
+ return [];
364
+ }
365
+ const events = [];
366
+ for (const line2 of raw.split("\n")) {
367
+ if (line2.trim() === "")
368
+ continue;
369
+ try {
370
+ const parsed = JSON.parse(line2);
371
+ if (parsed !== null && typeof parsed === "object")
372
+ events.push(eventOf(parsed));
373
+ } catch {
374
+ }
375
+ }
376
+ return events;
377
+ }, "readEvents");
378
+ var eventOf = /* @__PURE__ */ __name((line2) => {
379
+ const { attributes, time: time2, severity: severity2 } = line2;
380
+ if (attributes === null || typeof attributes !== "object")
381
+ return logAttributes(line2);
382
+ return { time: time2, severity: severity2, ...logAttributes(attributes) };
383
+ }, "eventOf");
384
+ var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = keepDays, keepStoreDays = KEEP_STORE_RUNS_FOR_DAYS, maxBytes, now }) => {
385
+ const cutoff = day(new Date(now.getTime() - keepDays * DAY_MS));
386
+ const before = /* @__PURE__ */ __name((days2) => day(new Date(now.getTime() - Math.min(days2, keepDays) * DAY_MS)), "before");
387
+ const successCutoff = before(keepSuccessDays);
388
+ const storeCutoff = before(keepStoreDays);
389
+ const keptFor = /* @__PURE__ */ __name((metadata) => metadata.keptBecauseStore ? keepStoreDays : metadata.operations?.includes(STORE_WRITE) ? Math.max(keepSuccessDays, keepStoreDays) : keepSuccessDays, "keptFor");
390
+ let removed = 0;
391
+ for (const date of days(runsDir)) {
392
+ if (date >= cutoff) {
393
+ if (date < storeCutoff)
394
+ dropSuccesses(join(runsDir, date), STORE_RUNS_DROPPED, (metadata) => keptFor(metadata) <= keepStoreDays);
395
+ if (date < successCutoff)
396
+ dropSuccesses(join(runsDir, date), SUCCESSES_DROPPED, (metadata) => keptFor(metadata) <= keepSuccessDays);
397
+ continue;
398
+ }
399
+ try {
400
+ rmSync(join(runsDir, date), { recursive: true, force: true });
401
+ removed += 1;
402
+ } catch {
403
+ }
404
+ }
405
+ if (maxBytes !== void 0)
406
+ removed += fitSize(runsDir, maxBytes, now);
407
+ return removed;
408
+ }, "pruneRuns");
409
+ var DAY_MS = 24 * 60 * 60 * 1e3;
410
+ var STORE_WRITE = "store.write";
411
+ var SUCCESSES_DROPPED = ".successes-dropped";
412
+ var STORE_RUNS_DROPPED = ".store-runs-dropped";
413
+ var SIZE_CHECKED = ".size-checked";
414
+ var dropSuccesses = /* @__PURE__ */ __name((dayDir, marker = SUCCESSES_DROPPED, drops = () => true) => {
415
+ const done = join(dayDir, marker);
416
+ try {
417
+ statSync(done);
418
+ return;
419
+ } catch {
420
+ }
421
+ const dropped2 = /* @__PURE__ */ __name((metadata) => metadata?.status === "success" && drops(metadata), "dropped");
422
+ try {
423
+ const kept = [];
424
+ for (const [id5, metadata] of indexedRuns(dayDir)) {
425
+ if (dropped2(metadata))
426
+ rmSync(join(dayDir, id5), { recursive: true, force: true });
427
+ else
428
+ kept.push(JSON.stringify(runFileOf(metadata)));
429
+ }
430
+ for (const entry of safeReaddir(dayDir)) {
431
+ if (entry === INDEX || entry.startsWith("."))
432
+ continue;
433
+ if (dropped2(readRun(join(dayDir, entry))))
434
+ rmSync(join(dayDir, entry), { recursive: true, force: true });
435
+ }
436
+ writeSecurely(join(dayDir, INDEX), kept.map((line2) => `${line2}
437
+ `).join(""), 384);
438
+ writeFileSync(done, "", { mode: 384 });
439
+ } catch {
440
+ }
441
+ }, "dropSuccesses");
442
+ var sizeOf = /* @__PURE__ */ __name((path) => {
443
+ let total = 0;
444
+ for (const entry of safeReaddir(path)) {
445
+ const full = join(path, entry);
446
+ try {
447
+ const stat = statSync(full);
448
+ total += stat.isDirectory() ? sizeOf(full) : stat.size;
449
+ } catch {
450
+ }
451
+ }
452
+ return total;
453
+ }, "sizeOf");
454
+ var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
455
+ const stamp = join(runsDir, SIZE_CHECKED);
456
+ const today = day(now);
457
+ try {
458
+ if (readFileSync(stamp, "utf8").trim() === today)
459
+ return 0;
460
+ } catch {
461
+ }
462
+ const dates = days(runsDir).sort();
463
+ const sizes = new Map(dates.map((date) => [date, sizeOf(join(runsDir, date))]));
464
+ let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
465
+ let removed = 0;
466
+ for (const date of dates) {
467
+ if (total <= maxBytes || date === today)
468
+ break;
469
+ dropSuccesses(join(runsDir, date));
470
+ const after = sizeOf(join(runsDir, date));
471
+ total -= (sizes.get(date) ?? 0) - after;
472
+ sizes.set(date, after);
473
+ }
474
+ for (const date of dates) {
475
+ if (total <= maxBytes || date === today)
476
+ break;
477
+ try {
478
+ rmSync(join(runsDir, date), { recursive: true, force: true });
479
+ total -= sizes.get(date) ?? 0;
480
+ removed += 1;
481
+ } catch {
482
+ }
483
+ }
484
+ try {
485
+ mkdirSync(runsDir, { recursive: true, mode: 448 });
486
+ writeFileSync(stamp, today, { mode: 384 });
487
+ } catch {
488
+ }
489
+ return removed;
490
+ }, "fitSize");
491
+ var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day");
492
+ var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
493
+ var readRun = /* @__PURE__ */ __name((dir) => {
494
+ try {
495
+ return metadataOf(JSON.parse(readFileSync(join(dir, "run.json"), "utf8")));
496
+ } catch {
497
+ return void 0;
498
+ }
499
+ }, "readRun");
500
+ var safeReaddir = /* @__PURE__ */ __name((dir) => {
501
+ try {
502
+ return readdirSync(dir);
503
+ } catch {
504
+ return [];
505
+ }
506
+ }, "safeReaddir");
507
+ var runFileOf = /* @__PURE__ */ __name(({ partial, ...metadata }) => ({
508
+ ...logAttributes(metadata),
509
+ ...partial ? { partial: { ...logAttributes(partial), failures: partial.failures.map((failure) => logAttributes(failure)) } } : {}
510
+ }), "runFileOf");
511
+ var metadataOf = /* @__PURE__ */ __name((parsed) => {
512
+ const { partial, ...metadata } = fromLogAttributes(parsed);
513
+ if (partial === null || typeof partial !== "object")
514
+ return metadata;
515
+ const { failures, ...rest } = fromLogAttributes(partial);
516
+ return {
517
+ ...metadata,
518
+ partial: {
519
+ ...rest,
520
+ failures: Array.isArray(failures) ? failures.map((failure) => fromLogAttributes(failure)) : []
521
+ }
522
+ };
523
+ }, "metadataOf");
524
+
525
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/runs/scope.js
526
+ import { AsyncLocalStorage } from "node:async_hooks";
527
+ import { randomBytes } from "node:crypto";
528
+ var scopes = new AsyncLocalStorage();
529
+ var processScope;
530
+ var ownProcesses = new AsyncLocalStorage();
531
+ var asOwnProcess = /* @__PURE__ */ __name((body) => ownProcesses.run({}, body), "asOwnProcess");
532
+ var currentRun = /* @__PURE__ */ __name(() => {
533
+ const scope2 = scopes.getStore();
534
+ if (scope2)
535
+ return scope2;
536
+ const own = ownProcesses.getStore();
537
+ const fresh = /* @__PURE__ */ __name(() => ({
538
+ runId: newRunId(/* @__PURE__ */ new Date(), "process"),
539
+ command: "",
540
+ startedAt: Date.now(),
541
+ ...traceOf(process.env)
542
+ }), "fresh");
543
+ if (own) {
544
+ own.scope ??= fresh();
545
+ return own.scope;
546
+ }
547
+ processScope ??= fresh();
548
+ return processScope;
549
+ }, "currentRun");
550
+ var inRun = /* @__PURE__ */ __name((scope2, body) => scopes.run(scope2, body), "inRun");
551
+ var runEvent = /* @__PURE__ */ __name((event2) => scopes.getStore()?.events?.(event2), "runEvent");
552
+ var typedCommand = /* @__PURE__ */ __name((tool, words2, profile = currentRun().profile) => [tool, profile, words2].filter((part) => part !== void 0 && part !== "").join(" "), "typedCommand");
553
+ var useAsProcessRun = /* @__PURE__ */ __name((scope2) => {
554
+ const own = ownProcesses.getStore();
555
+ if (own)
556
+ own.scope = scope2;
557
+ else
558
+ processScope = scope2;
559
+ }, "useAsProcessRun");
560
+ var processRun = /* @__PURE__ */ __name(() => {
561
+ const own = ownProcesses.getStore();
562
+ return own ? own.scope : processScope;
563
+ }, "processRun");
564
+ var enclosingTraceId = /* @__PURE__ */ __name(() => scopes.getStore()?.traceId, "enclosingTraceId");
565
+ var traceOf = /* @__PURE__ */ __name((env) => {
566
+ const traceId = traceIdOf(env.TRACEPARENT);
567
+ return traceId === void 0 ? {} : { traceId };
568
+ }, "traceOf");
569
+ var childTrace = /* @__PURE__ */ __name(() => {
570
+ const hex = /* @__PURE__ */ __name((bytes) => randomBytes(bytes).toString("hex"), "hex");
571
+ const traceId = hex(16);
572
+ return { traceId, traceparent: `00-${traceId}-${hex(8)}-01` };
573
+ }, "childTrace");
574
+ var attempts = new AsyncLocalStorage();
575
+ var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
576
+ var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
577
+
578
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/payment.js
58
579
  var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
59
580
  var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
60
581
  var PAYMENT_STATES = ["expected", "paid", "cancelled"];
@@ -148,7 +669,7 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
148
669
  return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
149
670
  }, "paymentTitle");
150
671
 
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
672
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/passage.js
152
673
  var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
153
674
  const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
154
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)))
@@ -161,7 +682,141 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
161
682
  throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
162
683
  }, "validateMeetingPassage");
163
684
 
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
685
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
686
+ var text = string();
687
+ var identifier = pipe(text, minLength(1));
688
+ var nullableText = nullable(text);
689
+ var count = pipe(number(), integer(), minValue(0));
690
+ var flag = boolean();
691
+ var scope = strictObject({ provider: text, account: text });
692
+ var run = strictObject({
693
+ meetings: count,
694
+ participants: count,
695
+ transcript_rows: count,
696
+ summaries: count,
697
+ warnings: array(strictObject({ external_id: text, message: text })),
698
+ timezone: optional(text)
699
+ });
700
+ var exported = union([
701
+ strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text, content: text }),
702
+ strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text })
703
+ ]);
704
+ var eventChange = strictObject({
705
+ action: literal("event.link"),
706
+ event_id: nullable(identifier),
707
+ expected_event_id: optional(nullable(identifier))
708
+ });
709
+ var personChange = strictObject({
710
+ action: literal("person.link"),
711
+ participant_id: identifier,
712
+ person_uid: text,
713
+ expected_person_uid: optional(nullableText),
714
+ target_account_ids: optional(array(identifier))
715
+ });
716
+ var eventResult = strictObject({
717
+ meeting_id: identifier,
718
+ event_id: nullable(identifier),
719
+ previous_event_id: nullable(identifier),
720
+ changed: flag
721
+ });
722
+ var personResult = strictObject({
723
+ meeting_id: identifier,
724
+ participant_id: identifier,
725
+ person_uid: text,
726
+ previous_person_uid: nullableText,
727
+ changed: flag,
728
+ proposal: optional(text)
729
+ });
730
+ var meetingChange = strictObject({
731
+ scope,
732
+ account_id: identifier,
733
+ meeting_id: identifier,
734
+ change: union([eventChange, personChange]),
735
+ applied: flag,
736
+ result: optional(union([eventResult, personResult]))
737
+ });
738
+ var recognition = strictObject({
739
+ engine: text,
740
+ model: text,
741
+ version: optional(text),
742
+ timing: optional(picklist(["fixed-windows", "recognition-segments"]))
743
+ });
744
+ var transcription = union([
745
+ strictObject({
746
+ applied: literal(false),
747
+ account_id: identifier,
748
+ external_id: text,
749
+ segments: count,
750
+ media: strictObject({
751
+ id: text,
752
+ content_hash: text,
753
+ size: count,
754
+ duration_ms: count,
755
+ format: text,
756
+ sample_rate: count,
757
+ channels: count,
758
+ recognition
759
+ })
760
+ }),
761
+ strictObject({
762
+ applied: literal(true),
763
+ account_id: identifier,
764
+ external_id: text,
765
+ meeting_id: identifier,
766
+ created: flag,
767
+ inserted_transcripts: count,
768
+ replayed_transcripts: count,
769
+ superseded_transcripts: count,
770
+ segments: count,
771
+ media_sha256: text,
772
+ engine: text,
773
+ model: text,
774
+ model_version: nullableText,
775
+ timing: picklist(["fixed-windows", "recognition-segments"])
776
+ })
777
+ ]);
778
+ var embeddingModel = strictObject({ key: text, dims: count, kind: picklist(["local", "remote"]), model: text });
779
+ var embedding = union([
780
+ strictObject({
781
+ account_id: identifier,
782
+ model: embeddingModel,
783
+ status: strictObject({ chunks: count, embedded: count }),
784
+ applied: literal(false),
785
+ scope: literal("existing-current-chunks"),
786
+ rebuild_required: literal("explicit")
787
+ }),
788
+ strictObject({
789
+ account_id: identifier,
790
+ model: embeddingModel,
791
+ saved: count,
792
+ skipped: count,
793
+ has_more: flag,
794
+ next_hash: optional(text),
795
+ applied: literal(true),
796
+ rebuild: strictObject({
797
+ transcripts: count,
798
+ chunks: count,
799
+ has_more: flag,
800
+ next_transcript_id: optional(identifier)
801
+ })
802
+ })
803
+ ]);
804
+ var repair = strictObject({
805
+ account_id: identifier,
806
+ applied: flag,
807
+ transcripts: count,
808
+ languages: array(strictObject({ language: nullableText, transcripts: count }))
809
+ });
810
+ var MEETING_RESULT_ENTITIES = {
811
+ meeting_ingestion: run,
812
+ meeting_export: exported,
813
+ meeting_association: meetingChange,
814
+ meeting_transcription: transcription,
815
+ meeting_embedding: embedding,
816
+ meeting_repair: repair
817
+ };
818
+
819
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/reference.js
165
820
  var invalid2 = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
166
821
  var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
167
822
  if (!Number.isSafeInteger(value) || value < minimum)
@@ -169,24 +824,24 @@ var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
169
824
  return value;
170
825
  }, "integer");
171
826
  var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
172
- const parts = [integer2(reference2.accountId), integer2(reference2.meetingId)];
827
+ const parts2 = [integer2(reference2.accountId), integer2(reference2.meetingId)];
173
828
  if (reference2.transcriptId !== void 0)
174
- parts.push(integer2(reference2.transcriptId));
829
+ parts2.push(integer2(reference2.transcriptId));
175
830
  if (reference2.cuePosition !== void 0) {
176
831
  if (reference2.transcriptId === void 0)
177
832
  throw invalid2();
178
- parts.push(integer2(reference2.cuePosition, 0));
833
+ parts2.push(integer2(reference2.cuePosition, 0));
179
834
  }
180
- return `meeting:${parts.join("/")}`;
835
+ return `meeting:${parts2.join("/")}`;
181
836
  }, "formatMeetingReference");
182
837
  var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
183
838
  const value = text7.trim();
184
839
  if (!value.startsWith("meeting:"))
185
840
  throw invalid2();
186
- const parts = value.slice(8).split("/");
187
- if (parts.length < 2 || parts.length > 4 || parts.some((part) => !/^\d+$/.test(part)))
841
+ const parts2 = value.slice(8).split("/");
842
+ if (parts2.length < 2 || parts2.length > 4 || parts2.some((part) => !/^\d+$/.test(part)))
188
843
  throw invalid2();
189
- const ids2 = parts.map(Number);
844
+ const ids2 = parts2.map(Number);
190
845
  const reference2 = {
191
846
  type: "meeting",
192
847
  accountId: integer2(ids2[0]),
@@ -198,9 +853,9 @@ var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
198
853
  }, "parseMeetingReference");
199
854
  var canonicalMeetingReference = /* @__PURE__ */ __name((text7) => formatMeetingReference(parseMeetingReference(text7)), "canonicalMeetingReference");
200
855
 
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
202
- var text = string();
203
- var count = pipe(number(), integer(), minValue(0));
856
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/item.js
857
+ var text2 = string();
858
+ var count2 = pipe(number(), integer(), minValue(0));
204
859
  var MEETING_ISSUES = ["time_without_zone"];
205
860
  var meetingIssuesOf = /* @__PURE__ */ __name((metadata) => {
206
861
  const listed2 = metadata?.issues;
@@ -209,18 +864,18 @@ var meetingIssuesOf = /* @__PURE__ */ __name((metadata) => {
209
864
  var meeting = strictObject({
210
865
  ref: reference,
211
866
  id: pipe(string(), minLength(1)),
212
- provider: text,
213
- account: text,
214
- title: nullable(text),
215
- description: optional(nullable(text)),
216
- location: optional(nullable(text)),
867
+ provider: text2,
868
+ account: text2,
869
+ title: nullable(text2),
870
+ description: optional(nullable(text2)),
871
+ location: optional(nullable(text2)),
217
872
  /** The link that joins it. */
218
- url: nullable(text),
873
+ url: nullable(text2),
219
874
  started_at: nullable(isoTime),
220
875
  ended_at: nullable(isoTime),
221
- duration_ms: nullable(count),
222
- timezone: optional(nullable(text)),
223
- participants_count: nullable(count),
876
+ duration_ms: nullable(count2),
877
+ timezone: optional(nullable(text2)),
878
+ participants_count: nullable(count2),
224
879
  /** Present only when something about this meeting is doubtful. */
225
880
  issues: optional(array(picklist(MEETING_ISSUES))),
226
881
  created_at: isoTime,
@@ -263,9 +918,9 @@ var MEETING_QUERY = {
263
918
  })
264
919
  };
265
920
 
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
267
- var text2 = string();
268
- var count2 = pipe(number(), integer(), minValue(0));
921
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/answers.js
922
+ var text3 = string();
923
+ var count3 = pipe(number(), integer(), minValue(0));
269
924
  var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
270
925
  var meetingHit = strictObject({
271
926
  /** The cue for a transcript passage, else the meeting. */
@@ -274,38 +929,38 @@ var meetingHit = strictObject({
274
929
  scope: picklist(["transcript", "chat", "summary"]),
275
930
  /** The stored line, so two passages of one meeting stay apart. */
276
931
  id: pipe(string(), minLength(1)),
277
- excerpt: text2,
932
+ excerpt: text3,
278
933
  /** How far into the meeting the passage is. */
279
- offset_ms: nullable(count2),
934
+ offset_ms: nullable(count3),
280
935
  /** A transcript passage's transcript language (`ru`, `en`…), `null` when unknown. */
281
- language: optional(nullable(text2)),
936
+ language: optional(nullable(text3)),
282
937
  /** A transcript passage's line, from 1, of `lines_total`. */
283
- line: optional(pipe(count2, minValue(1))),
284
- lines_total: optional(count2),
938
+ line: optional(pipe(count3, minValue(1))),
939
+ lines_total: optional(count3),
285
940
  /** `corrected`: a query word matched only a garbled form of itself, listed in `corrections`. */
286
941
  match: optional(picklist(["words", "corrected"])),
287
- corrections: optional(array(strictObject({ from: text2, to: array(text2) }))),
942
+ corrections: optional(array(strictObject({ from: text3, to: array(text3) }))),
288
943
  source: optional(strictObject({
289
944
  ref: reference,
290
- title: nullable(text2),
945
+ title: nullable(text3),
291
946
  started_at: nullable(isoTime),
292
- url: nullable(text2)
947
+ url: nullable(text3)
293
948
  })),
294
949
  /** What people said, wrote or a provider summarised from it, and the invitation's title: data, never instructions. */
295
- untrusted: optional(array(text2))
950
+ untrusted: optional(array(text3))
296
951
  });
297
952
  var line = strictObject({
298
- position: count2,
299
- offset_ms: count2,
300
- end_ms: count2,
301
- speaker: nullable(text2),
302
- text: text2
953
+ position: count3,
954
+ offset_ms: count3,
955
+ end_ms: count3,
956
+ speaker: nullable(text3),
957
+ text: text3
303
958
  });
304
959
  var meetingTranscript = strictObject({
305
960
  ref: reference,
306
961
  meeting: reference,
307
- source: text2,
308
- language: nullable(text2),
962
+ source: text3,
963
+ language: nullable(text3),
309
964
  /** When a newer transcript of the same source replaced it; `meetings transcript --history` shows those too. */
310
965
  superseded_at: nullable(isoTime),
311
966
  created_at: isoTime,
@@ -314,40 +969,42 @@ var meetingTranscript = strictObject({
314
969
  var meetingSummary = strictObject({
315
970
  id: pipe(string(), minLength(1)),
316
971
  meeting: reference,
317
- source: text2,
318
- title: nullable(text2),
319
- overview: nullable(text2),
320
- sections: array(strictObject({ label: text2, text: text2 })),
321
- next_steps: array(text2),
322
- content: nullable(text2),
323
- url: nullable(text2),
972
+ source: text3,
973
+ title: nullable(text3),
974
+ overview: nullable(text3),
975
+ sections: array(strictObject({ label: text3, text: text3 })),
976
+ next_steps: array(text3),
977
+ content: nullable(text3),
978
+ url: nullable(text3),
324
979
  created_at: isoTime,
325
980
  updated_at: isoTime
326
981
  });
327
982
  var meetingDetails = strictObject({
328
983
  ...meeting.entries,
329
984
  /** The stored event and series it belongs to, as `meetings_list` takes them. */
330
- event_id: nullable(text2),
331
- series_id: nullable(text2),
332
- series_title: nullable(text2),
985
+ event_id: nullable(text3),
986
+ series_id: nullable(text3),
987
+ series_title: nullable(text3),
333
988
  participants: array(strictObject({
334
- name: nullable(text2),
335
- email: nullable(text2),
336
- role: nullable(text2),
989
+ name: nullable(text3),
990
+ email: nullable(text3),
991
+ role: nullable(text3),
992
+ /** Who they are across the owner's sources: `person:<uid>`, and that person's name once linked. */
993
+ person: nullable(strictObject({ ref: text3, name: nullable(text3) })),
337
994
  joined_at: nullable(isoTime),
338
995
  left_at: nullable(isoTime),
339
- duration_ms: nullable(count2)
996
+ duration_ms: nullable(count3)
340
997
  })),
341
- transcripts: array(strictObject({ ref: reference, source: text2, language: nullable(text2), lines_count: count2 })),
342
- chat: array(strictObject({ sent_at: isoTime, sender: nullable(text2), recipient: nullable(text2), text: text2 })),
998
+ transcripts: array(strictObject({ ref: reference, source: text3, language: nullable(text3), lines_count: count3 })),
999
+ chat: array(strictObject({ sent_at: isoTime, sender: nullable(text3), recipient: nullable(text3), text: text3 })),
343
1000
  summaries: array(meetingSummary),
344
1001
  attachments: array(strictObject({
345
- position: count2,
346
- kind: text2,
347
- name: nullable(text2),
348
- mime: nullable(text2),
349
- size: nullable(count2),
350
- url: nullable(text2)
1002
+ position: count3,
1003
+ kind: text3,
1004
+ name: nullable(text3),
1005
+ mime: nullable(text3),
1006
+ size: nullable(count3),
1007
+ url: nullable(text3)
351
1008
  }))
352
1009
  });
353
1010
  var meetingRef = /* @__PURE__ */ __name((accountId, meetingId) => formatMeetingReference({ type: "meeting", accountId, meetingId }), "meetingRef");
@@ -395,6 +1052,7 @@ var meetingDetailsItem = /* @__PURE__ */ __name((details, owner) => {
395
1052
  name: one.displayName,
396
1053
  email: one.email,
397
1054
  role: one.role,
1055
+ person: one.person ? { ref: `person:${one.person.uid}`, name: one.person.name } : null,
398
1056
  joined_at: iso2(one.joinedAt),
399
1057
  left_at: iso2(one.leftAt),
400
1058
  duration_ms: one.durationMs
@@ -498,7 +1156,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
498
1156
  };
499
1157
  }, "meetingHitsList");
500
1158
 
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
1159
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
502
1160
  var joinKeyOf = /* @__PURE__ */ __name((url) => {
503
1161
  const parsed = urlOf(url);
504
1162
  if (!parsed)
@@ -532,7 +1190,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
532
1190
  }
533
1191
  }, "urlOf");
534
1192
 
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
1193
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
536
1194
  var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
537
1195
  var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
538
1196
  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");
@@ -541,8 +1199,8 @@ var calendarText = /* @__PURE__ */ __name((text7, { dropSecretLines = true } = {
541
1199
  if (!text7)
542
1200
  return null;
543
1201
  const kept = htmlToText(text7).split(/\r?\n/u).map((line2) => withoutLinkQueries(line2).replace(/[ \t]+/gu, " ").trim()).filter((line2) => !dropSecretLines || !SECRET_LINE.test(line2));
544
- const joined = kept.join("\n").replace(/\n{3,}/gu, "\n\n").trim();
545
- return joined || null;
1202
+ const joined2 = kept.join("\n").replace(/\n{3,}/gu, "\n\n").trim();
1203
+ return joined2 || null;
546
1204
  }, "calendarText");
547
1205
  var ENTRY_METADATA_KEYS = [
548
1206
  "colorId",
@@ -569,7 +1227,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
569
1227
  return kept;
570
1228
  }, "entryMetadata");
571
1229
 
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
1230
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
573
1231
  import { createHash } from "node:crypto";
574
1232
  var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
575
1233
  reference: cue2.reference,
@@ -583,7 +1241,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
583
1241
  text: cue2.text
584
1242
  })).digest("hex"), "meetingCueFingerprint");
585
1243
 
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
1244
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
587
1245
  var EVENT_QUERY = defineQuery({
588
1246
  entity: "event",
589
1247
  backend: "sql",
@@ -599,7 +1257,7 @@ var EVENT_QUERY = defineQuery({
599
1257
  ]
600
1258
  });
601
1259
 
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
1260
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
603
1261
  var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
604
1262
  var seriesEnd = /* @__PURE__ */ __name((entry) => {
605
1263
  if (entry.recurrenceEndsAt !== null)
@@ -608,8 +1266,8 @@ var seriesEnd = /* @__PURE__ */ __name((entry) => {
608
1266
  const until = rule === void 0 ? null : UNTIL.exec(rule.slice("RRULE:".length));
609
1267
  if (!until)
610
1268
  return Number.POSITIVE_INFINITY;
611
- const [, year, month, day, hour = "23", minute = "59", second = "59"] = until;
612
- return Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second)) + 864e5;
1269
+ const [, year, month, day2, hour = "23", minute = "59", second = "59"] = until;
1270
+ return Date.UTC(Number(year), Number(month) - 1, Number(day2), Number(hour), Number(minute), Number(second)) + 864e5;
613
1271
  }, "seriesEnd");
614
1272
  var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
615
1273
  if (entry.kind === "occurrence" && !entry.exception)
@@ -622,7 +1280,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
622
1280
  return Math.max(entry.endsAt ?? start, start + 1) > window.from;
623
1281
  }, "entryInWindow");
624
1282
 
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
1283
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/events.js
626
1284
  var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
627
1285
  const current = await store.meeting(details.meeting.id);
628
1286
  if (!current)
@@ -665,7 +1323,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
665
1323
  return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
666
1324
  }, "linkEvent");
667
1325
 
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
1326
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
669
1327
  var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text7) => text7.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
670
1328
  var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
671
1329
  if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
@@ -689,7 +1347,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
689
1347
  };
690
1348
  }, "validateMeetingParticipantSearch");
691
1349
 
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
1350
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/reads.js
693
1351
  var MeetingError = class extends CliError {
694
1352
  static {
695
1353
  __name(this, "MeetingError");
@@ -735,7 +1393,7 @@ var meetingPeople = /* @__PURE__ */ __name(async (store, query, accountId, optio
735
1393
  if (store.participantCandidates && accountId === void 0)
736
1394
  throw new MeetingError("configuration_error", "select an account for bounded participant lookup");
737
1395
  if (accountId !== void 0 && store.participantCandidates) {
738
- const { limit, has_more, next_cursor, ...packet } = await store.participantCandidates(query, {
1396
+ const { limit, hasMore: has_more, nextCursor: next_cursor, ...packet } = await store.participantCandidates(query, {
739
1397
  ...options,
740
1398
  accountId
741
1399
  });
@@ -764,11 +1422,11 @@ var meetingPeople = /* @__PURE__ */ __name(async (store, query, accountId, optio
764
1422
  return listed(await store.participants(query, accountId));
765
1423
  }, "meetingPeople");
766
1424
  var PAGE_NEXT2 = STEPS.find((step) => step.id === "page.next");
767
- var meetingsList = /* @__PURE__ */ __name(async (store, filter = {}, page = 1) => {
1425
+ var meetingsList = /* @__PURE__ */ __name(async (store, filter = {}) => {
768
1426
  validateFilter(filter);
769
- positiveInteger(page);
770
1427
  const limit = positiveInteger(filter.limit ?? 100);
771
- const offset = (page - 1) * limit;
1428
+ const offset = filter.offset ?? 0;
1429
+ const page = Math.floor(offset / limit) + 1;
772
1430
  if (!Number.isSafeInteger(offset + limit + 1))
773
1431
  throw new MeetingError("validation_error", "pagination exceeds safe integer range");
774
1432
  const rows = await store.meetings({ ...filter, limit: limit + 1, offset });
@@ -821,7 +1479,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id5, accountId)
821
1479
  return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
822
1480
  }, "meetingSummaryAnswer");
823
1481
 
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
1482
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/export.js
825
1483
  var timestamp = /* @__PURE__ */ __name((milliseconds) => {
826
1484
  if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
827
1485
  throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
@@ -883,30 +1541,30 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id5, options) => {
883
1541
  text: row.text
884
1542
  })));
885
1543
  } else {
886
- const parts = [`# ${heading(details.meeting.title ?? "Untitled meeting")}`, `Meeting ID: ${details.meeting.id}`];
1544
+ const parts2 = [`# ${heading(details.meeting.title ?? "Untitled meeting")}`, `Meeting ID: ${details.meeting.id}`];
887
1545
  if (details.meeting.description !== null)
888
- parts.push("## Description", quote(details.meeting.description));
1546
+ parts2.push("## Description", quote(details.meeting.description));
889
1547
  for (const summary of details.summaries) {
890
- parts.push(`## ${heading(summary.title ?? "Summary")}`);
1548
+ parts2.push(`## ${heading(summary.title ?? "Summary")}`);
891
1549
  if (summary.content !== null)
892
- parts.push(quote(summary.content));
1550
+ parts2.push(quote(summary.content));
893
1551
  else {
894
1552
  if (summary.overview !== null)
895
- parts.push(quote(summary.overview));
1553
+ parts2.push(quote(summary.overview));
896
1554
  for (const section of summary.sections)
897
- parts.push(`### ${heading(section.label)}`, quote(section.text));
1555
+ parts2.push(`### ${heading(section.label)}`, quote(section.text));
898
1556
  if (summary.nextSteps.length > 0)
899
- parts.push("### Next steps", summary.nextSteps.map((step) => `- ${markdown(step)}`).join("\n"));
1557
+ parts2.push("### Next steps", summary.nextSteps.map((step) => `- ${markdown(step)}`).join("\n"));
900
1558
  }
901
1559
  }
902
1560
  for (const part of transcripts) {
903
- parts.push(`## Transcript ${part.transcript.id}`, `Source: ${heading(part.transcript.source)}`);
1561
+ parts2.push(`## Transcript ${part.transcript.id}`, `Source: ${heading(part.transcript.source)}`);
904
1562
  if (part.transcript.supersededAt !== null)
905
- parts.push("Version: superseded");
1563
+ parts2.push("Version: superseded");
906
1564
  for (const row of [...part.rows].sort((a, b) => a.position - b.position))
907
- parts.push(`[${timestamp(row.startMs)} \u2013 ${timestamp(row.endMs)}]${row.speakerName === null ? "" : ` ${heading(row.speakerName)}`}`, quote(row.text));
1565
+ parts2.push(`[${timestamp(row.startMs)} \u2013 ${timestamp(row.endMs)}]${row.speakerName === null ? "" : ` ${heading(row.speakerName)}`}`, quote(row.text));
908
1566
  }
909
- content = `${parts.join("\n\n")}
1567
+ content = `${parts2.join("\n\n")}
910
1568
  `;
911
1569
  }
912
1570
  return {
@@ -917,10 +1575,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id5, options) => {
917
1575
  };
918
1576
  }, "exportMeeting");
919
1577
 
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
1578
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
921
1579
  import { createHash as createHash2 } from "node:crypto";
922
1580
 
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
1581
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
924
1582
  var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
925
1583
  if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
926
1584
  throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
@@ -931,7 +1589,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
931
1589
  return new Date(value).toISOString();
932
1590
  }, "meetingTimestamp");
933
1591
 
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
1592
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
935
1593
  var TASK_TYPES = ["bug", "feature", "chore"];
936
1594
  var invalid3 = /* @__PURE__ */ __name((message) => {
937
1595
  throw new CliError("validation_error", message);
@@ -945,10 +1603,10 @@ var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update
945
1603
  var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
946
1604
  var findingWhere = /* @__PURE__ */ __name((of) => {
947
1605
  const id5 = typeof of.id === "string" ? of.id : null;
948
- const kind = typeof of.kind === "string" ? of.kind : null;
1606
+ const kind2 = typeof of.kind === "string" ? of.kind : null;
949
1607
  return {
950
- where: id5 || kind ? ` in ${[id5, kind && `(${kind})`].filter(Boolean).join(" ")}` : "",
951
- named: { ...id5 ? { finding: id5 } : {}, ...kind ? { kind } : {} }
1608
+ where: id5 || kind2 ? ` in ${[id5, kind2 && `(${kind2})`].filter(Boolean).join(" ")}` : "",
1609
+ named: { ...id5 ? { finding: id5 } : {}, ...kind2 ? { kind: kind2 } : {} }
952
1610
  };
953
1611
  }, "findingWhere");
954
1612
  var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
@@ -976,13 +1634,15 @@ var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
976
1634
  const evidence = raw.map((item) => {
977
1635
  if (!item || typeof item !== "object")
978
1636
  return invalid3("finding evidence is a reference and fingerprint");
979
- findingFields(item, ["reference", "fingerprint"], rules.singular);
1637
+ findingFields(item, rules.quotes ? ["reference", "fingerprint", "quote"] : ["reference", "fingerprint"], rules.singular);
980
1638
  if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
981
1639
  return invalid3("evidence requires a reference and fingerprint");
982
1640
  const reference2 = rules.reference(item.reference);
983
1641
  if (!/^[a-f0-9]{64}$/.test(item.fingerprint))
984
1642
  return invalid3(`finding evidence requires exact ${rules.cited} references and fingerprints`);
985
- return { reference: reference2, fingerprint: item.fingerprint };
1643
+ if (item.quote === void 0)
1644
+ return { reference: reference2, fingerprint: item.fingerprint };
1645
+ return { reference: reference2, fingerprint: item.fingerprint, quote: findingText(item.quote, rules.quotes ?? 0) };
986
1646
  }).sort((a, b) => a.reference.localeCompare(b.reference));
987
1647
  if (new Set(evidence.map((item) => item.reference)).size !== evidence.length)
988
1648
  return invalid3(`duplicate evidence ${rules.cited}`);
@@ -1104,7 +1764,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
1104
1764
  var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
1105
1765
  var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
1106
1766
 
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
1767
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/findings.js
1108
1768
  var MEETING_FINDINGS_KIND = "meeting_findings";
1109
1769
  var cue = /* @__PURE__ */ __name((raw) => {
1110
1770
  const reference2 = canonicalMeetingReference(raw);
@@ -1115,7 +1775,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
1115
1775
  var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
1116
1776
  var meetingFindingFingerprint = findingFingerprint;
1117
1777
 
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
1778
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
1119
1779
  var context = {
1120
1780
  command: "search meetings",
1121
1781
  guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
@@ -1178,7 +1838,7 @@ var MEETING_FIELDS = defineQuery({
1178
1838
  });
1179
1839
  var LIFTED = /* @__PURE__ */ new Set(["date", "project", "tag", "topic"]);
1180
1840
  var MEETING_FIELD_NAMES = new Set(MEETING_FIELDS.fields.map(({ name }) => name));
1181
- var liftMeetingFields = /* @__PURE__ */ __name((query, request, now) => {
1841
+ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) => {
1182
1842
  let ast;
1183
1843
  try {
1184
1844
  ast = validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_FIELDS, context);
@@ -1204,7 +1864,7 @@ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now) => {
1204
1864
  if (node.field === "date") {
1205
1865
  once("since", "--since-time");
1206
1866
  once("until", "--until-time");
1207
- const range = dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.lower_inclusive !== false, node.upper_inclusive !== false, timezoneOf(), node.span, now);
1867
+ 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);
1208
1868
  if (range.lower !== void 0)
1209
1869
  next.since = range.lower + (range.lower_inclusive ? 0 : 1);
1210
1870
  if (range.upper !== void 0)
@@ -1235,7 +1895,7 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text7) => {
1235
1895
  return { version: 1, language: "lucene-v1", root };
1236
1896
  }, "meetingWordsQuery");
1237
1897
 
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
1898
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/language.js
1239
1899
  var LATIN_WORDS = {
1240
1900
  en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
1241
1901
  es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
@@ -1284,7 +1944,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
1284
1944
  return null;
1285
1945
  }, "transcriptLanguage");
1286
1946
 
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
1947
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
1288
1948
  var contentHash = /* @__PURE__ */ __name(async (text7) => {
1289
1949
  const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text7));
1290
1950
  return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -1321,7 +1981,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
1321
1981
  return time2;
1322
1982
  }, "timestamp");
1323
1983
 
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
1984
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
1325
1985
  var TranscriptTextError = class extends Error {
1326
1986
  static {
1327
1987
  __name(this, "TranscriptTextError");
@@ -1376,7 +2036,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
1376
2036
  return { header, lines };
1377
2037
  }, "parseTranscriptText");
1378
2038
 
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
2039
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
1380
2040
  var VttError = class extends Error {
1381
2041
  static {
1382
2042
  __name(this, "VttError");
@@ -1428,7 +2088,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
1428
2088
  return cues;
1429
2089
  }, "parseVtt");
1430
2090
 
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
2091
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/import.js
1432
2092
  var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
1433
2093
  const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
1434
2094
  for (const file of files) {
@@ -1461,10 +2121,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
1461
2121
  return report;
1462
2122
  }, "importFiles");
1463
2123
 
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
2124
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/links.js
1465
2125
  var CHAT_MESSAGES_READ = 1e5;
1466
2126
 
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
2127
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/provider.js
1468
2128
  var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
1469
2129
  const provider = scope2?.provider;
1470
2130
  const account = scope2?.account;
@@ -1473,7 +2133,7 @@ var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
1473
2133
  return Object.freeze({ provider, account });
1474
2134
  }, "snapshotMeetingScope");
1475
2135
 
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
2136
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
1477
2137
  var nonempty = /* @__PURE__ */ __name((value, name) => {
1478
2138
  if (typeof value !== "string" || !value.trim())
1479
2139
  throw new CliError("validation_error", `${name} must be nonempty`);
@@ -1539,19 +2199,19 @@ var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) =
1539
2199
  return { applied: true, value: await dispatch(signal) };
1540
2200
  }, "dispatchMeetingMutation");
1541
2201
 
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
2202
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
1543
2203
  var id = /* @__PURE__ */ __name((value) => {
1544
2204
  if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
1545
2205
  throw new CliError("validation_error", "meeting context identifiers must be positive integers");
1546
2206
  return value;
1547
2207
  }, "id");
1548
- var text3 = /* @__PURE__ */ __name((value, max) => {
2208
+ var text4 = /* @__PURE__ */ __name((value, max) => {
1549
2209
  if (typeof value !== "string" || !value.trim() || value.length > max || value.includes("\0"))
1550
2210
  throw new CliError("validation_error", `meeting context text must contain 1\u2013${max} characters without NUL`);
1551
2211
  return value.trim();
1552
2212
  }, "text");
1553
2213
  var uid = /* @__PURE__ */ __name((value) => {
1554
- const result = text3(value, 100);
2214
+ const result = text4(value, 100);
1555
2215
  if (!/^[1-9]\d*$/.test(result) || !Number.isSafeInteger(Number(result)))
1556
2216
  throw new CliError("validation_error", "person UID must be a positive integer");
1557
2217
  return result;
@@ -1559,7 +2219,7 @@ var uid = /* @__PURE__ */ __name((value) => {
1559
2219
  var strings = /* @__PURE__ */ __name((value, count7, length) => {
1560
2220
  if (!Array.isArray(value) || value.length < 1 || value.length > count7)
1561
2221
  throw new CliError("validation_error", `meeting context list must contain 1\u2013${count7} entries`);
1562
- return Object.freeze([...new Set(value.map((entry) => text3(entry, length)))]);
2222
+ return Object.freeze([...new Set(value.map((entry) => text4(entry, length)))]);
1563
2223
  }, "strings");
1564
2224
  var fields = {
1565
2225
  "note.add": ["text", "title"],
@@ -1577,8 +2237,8 @@ var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
1577
2237
  case "note.add":
1578
2238
  return Object.freeze({
1579
2239
  action: change.action,
1580
- text: text3(change.text, 1e5),
1581
- ...change.title === void 0 ? {} : { title: text3(change.title, 500) }
2240
+ text: text4(change.text, 1e5),
2241
+ ...change.title === void 0 ? {} : { title: text4(change.title, 500) }
1582
2242
  });
1583
2243
  case "tags.add":
1584
2244
  case "tags.remove":
@@ -1588,11 +2248,11 @@ var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
1588
2248
  throw new CliError("validation_error", "memory kind and explicit personal/work scope are required");
1589
2249
  return Object.freeze({
1590
2250
  action: change.action,
1591
- body: text3(change.body, 2e4),
2251
+ body: text4(change.body, 2e4),
1592
2252
  kind: change.kind,
1593
2253
  scope: change.scope,
1594
2254
  evidence: strings(change.evidence, 100, 4e3),
1595
- ...change.subject === void 0 ? {} : { subject: text3(change.subject, 4e3) }
2255
+ ...change.subject === void 0 ? {} : { subject: text4(change.subject, 4e3) }
1596
2256
  });
1597
2257
  }
1598
2258
  case "fact.add": {
@@ -1600,11 +2260,11 @@ var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
1600
2260
  throw new CliError("validation_error", `fact type (${FACT_TYPES.join(", ")}) and explicit personal/work scope are required`);
1601
2261
  return Object.freeze({
1602
2262
  action: change.action,
1603
- statement: text3(change.statement, 2e4),
2263
+ statement: text4(change.statement, 2e4),
1604
2264
  type: change.type,
1605
2265
  scope: change.scope,
1606
2266
  evidence: strings(change.evidence, 100, 4e3),
1607
- ...change.subject === void 0 ? {} : { subject: text3(change.subject, 4e3) }
2267
+ ...change.subject === void 0 ? {} : { subject: text4(change.subject, 4e3) }
1608
2268
  });
1609
2269
  }
1610
2270
  case "event.link":
@@ -1661,7 +2321,7 @@ var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) =>
1661
2321
  };
1662
2322
  }, "createMeetingContext");
1663
2323
 
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
2324
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
1665
2325
  var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
1666
2326
  if (!original || typeof original !== "object" || Array.isArray(original))
1667
2327
  throw new CliError("validation_error", "meeting preparation context is required");
@@ -1686,8 +2346,8 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
1686
2346
  return { ...input, limit, maxReadBytes };
1687
2347
  }, "validateMeetingPreparationContext");
1688
2348
 
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
1690
- var count3 = pipe(number(), integer(), minValue(0));
2349
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
2350
+ var count4 = pipe(number(), integer(), minValue(0));
1691
2351
  var id2 = pipe(string(), minLength(1));
1692
2352
  var meetingProjectEvidence = strictObject({
1693
2353
  schema_version: literal(1),
@@ -1713,16 +2373,16 @@ var meetingProjectEvidence = strictObject({
1713
2373
  since: optional(isoTime),
1714
2374
  until: optional(isoTime)
1715
2375
  }),
1716
- limits: strictObject({ limit: count3, max_read_bytes: count3, max_vocabulary_read_bytes: count3, max_terms: count3 }),
2376
+ limits: strictObject({ limit: count4, max_read_bytes: count4, max_vocabulary_read_bytes: count4, max_terms: count4 }),
1717
2377
  page: pageSchema,
1718
2378
  coverage: strictObject({
1719
2379
  archive_completeness: literal("unknown"),
1720
2380
  current_revisions: literal(true),
1721
2381
  indexing: picklist(["ready", "pending"]),
1722
2382
  index_completeness: literal("unknown"),
1723
- term_index: count3,
1724
- terms_total: count3,
1725
- remaining_terms: count3,
2383
+ term_index: count4,
2384
+ terms_total: count4,
2385
+ remaining_terms: count4,
1726
2386
  duplicates: literal("may-repeat-between-terms")
1727
2387
  })
1728
2388
  });
@@ -1758,7 +2418,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
1758
2418
  kind: page.term.kind,
1759
2419
  ...page.term.aliasId === void 0 ? {} : { alias_id: page.term.aliasId }
1760
2420
  },
1761
- hits: page.hits.map(meetingHitItem),
2421
+ hits: page.items.map(meetingHitItem),
1762
2422
  association: page.association,
1763
2423
  vocabulary_fingerprint: page.vocabularyFingerprint,
1764
2424
  selection,
@@ -1800,14 +2460,14 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
1800
2460
  limit: page.limits.limit,
1801
2461
  max_read_bytes: page.limits.maxReadBytes
1802
2462
  },
1803
- values: { shown: page.hits.length }
2463
+ values: { shown: page.items.length }
1804
2464
  })
1805
2465
  ]
1806
2466
  }
1807
2467
  };
1808
2468
  }, "meetingProjectEvidenceAnswer");
1809
2469
 
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
2470
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
1811
2471
  var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
1812
2472
  const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
1813
2473
  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) || [
@@ -1827,7 +2487,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
1827
2487
  throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
1828
2488
  }, "validateMeetingHitSearch");
1829
2489
 
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
2490
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
1831
2491
  var ids = {
1832
2492
  meeting_id: "meetingId",
1833
2493
  identity_id: "participantIdentityId",
@@ -1918,7 +2578,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project2, request =
1918
2578
  return { project: project2.trim(), options, query: frozen.join(" AND ") };
1919
2579
  }, "prepareMeetingProjectEvidence");
1920
2580
 
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
2581
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
1922
2582
  var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, request = {}, now = Date.now()) => {
1923
2583
  const prepared = prepareMeetingProjectEvidence(project2, request, now);
1924
2584
  const page = await read(prepared.project, prepared.options);
@@ -1926,9 +2586,9 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, r
1926
2586
  return meetingProjectEvidenceAnswer(page, prepared);
1927
2587
  }, "readMeetingProjectEvidence");
1928
2588
 
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
2589
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/pull.js
1930
2590
  var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
1931
- const { identityExternalId, ...fields2 } = p;
2591
+ const { identityExternalId, phone, ...fields2 } = p;
1932
2592
  const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
1933
2593
  return {
1934
2594
  ...fields2,
@@ -1936,6 +2596,7 @@ var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, posit
1936
2596
  provider,
1937
2597
  externalId,
1938
2598
  name: p.displayName,
2599
+ ...phone?.trim() ? { phone } : {},
1939
2600
  metadata: p.metadata,
1940
2601
  associatePerson: Boolean(identityExternalId?.trim() || p.email?.trim() || p.externalId?.trim())
1941
2602
  }
@@ -2088,80 +2749,80 @@ unlinked`, format)],
2088
2749
  return report;
2089
2750
  }, "pull");
2090
2751
 
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
2092
- var text4 = string();
2093
- var count4 = pipe(number(), integer(), minValue(0));
2752
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
2753
+ var text5 = string();
2754
+ var count5 = pipe(number(), integer(), minValue(0));
2094
2755
  var id3 = pipe(number(), integer(), minValue(1));
2095
2756
  var iso3 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
2096
2757
  var meetingReview = strictObject({
2097
2758
  ref: reference,
2098
2759
  id: pipe(string(), minLength(1)),
2099
- title: nullable(text4),
2760
+ title: nullable(text5),
2100
2761
  started_at: nullable(isoTime),
2101
- duration_ms: nullable(count4),
2102
- participants_count: nullable(count4),
2103
- projects: array(text4),
2762
+ duration_ms: nullable(count5),
2763
+ participants_count: nullable(count5),
2764
+ projects: array(text5),
2104
2765
  /** Null when the meeting has no current transcript. */
2105
- transcript: nullable(strictObject({ lines: count4, words: count4 })),
2766
+ transcript: nullable(strictObject({ lines: count5, words: count5 })),
2106
2767
  /** The three who talked longest. */
2107
- speakers: array(strictObject({ name: nullable(text4), talk_ms: count4 })),
2768
+ speakers: array(strictObject({ name: nullable(text5), talk_ms: count5 })),
2108
2769
  /** The newest stored summary; null when there is none. */
2109
2770
  summary: nullable(strictObject({
2110
- source: text4,
2111
- title: nullable(text4),
2112
- overview: nullable(text4),
2113
- next_steps: array(text4),
2114
- url: nullable(text4)
2771
+ source: text5,
2772
+ title: nullable(text5),
2773
+ overview: nullable(text5),
2774
+ next_steps: array(text5),
2775
+ url: nullable(text5)
2115
2776
  }))
2116
2777
  });
2117
2778
  var meetingLink = strictObject({
2118
- url: text4,
2119
- domain: nullable(text4),
2779
+ url: text5,
2780
+ domain: nullable(text5),
2120
2781
  /** The Google Docs, Sheets, Slides, Forms or Drive file it names. */
2121
- document_id: nullable(text4),
2122
- count: count4,
2782
+ document_id: nullable(text5),
2783
+ count: count5,
2123
2784
  first_at: isoTime,
2124
2785
  last_at: isoTime,
2125
- senders: array(text4),
2126
- meetings: array(strictObject({ ref: reference, title: nullable(text4) }))
2786
+ senders: array(text5),
2787
+ meetings: array(strictObject({ ref: reference, title: nullable(text5) }))
2127
2788
  });
2128
2789
  var meetingSpeaker = strictObject({
2129
2790
  /** `person:<id>`, `identity:<id>`, `name:<lowercased name>` or `unknown`. */
2130
- key: text4,
2131
- name: nullable(text4),
2791
+ key: text5,
2792
+ name: nullable(text5),
2132
2793
  person_id: nullable(id3),
2133
2794
  identity_id: nullable(id3),
2134
- meetings: count4,
2135
- lines: count4,
2136
- words: count4,
2137
- talk_ms: count4,
2795
+ meetings: count5,
2796
+ lines: count5,
2797
+ words: count5,
2798
+ talk_ms: count5,
2138
2799
  /** This speaker's part of all talk time, 0–1. */
2139
2800
  share: pipe(number(), minValue(0), maxValue(1))
2140
2801
  });
2141
2802
  var meetingStats = strictObject({
2142
- time_zone: text4,
2143
- meetings: count4,
2144
- lines: count4,
2145
- words: count4,
2146
- talk_ms: count4,
2803
+ time_zone: text5,
2804
+ meetings: count5,
2805
+ lines: count5,
2806
+ words: count5,
2807
+ talk_ms: count5,
2147
2808
  /** `week_start` is the Monday, as a date in `time_zone`. */
2148
- weeks: array(strictObject({ week_start: text4, meetings: count4, talk_ms: count4 })),
2809
+ weeks: array(strictObject({ week_start: text5, meetings: count5, talk_ms: count5 })),
2149
2810
  top_speakers: array(meetingSpeaker)
2150
2811
  });
2151
2812
  var meetingCountsRow = strictObject({
2152
- key: text4,
2153
- name: nullable(text4),
2154
- meetings: count4,
2155
- minutes: count4,
2813
+ key: text5,
2814
+ name: nullable(text5),
2815
+ meetings: count5,
2816
+ minutes: count5,
2156
2817
  mean_minutes: nullable(number()),
2157
- transcripts: count4
2818
+ transcripts: count5
2158
2819
  });
2159
2820
  var meetingCounts = strictObject({
2160
2821
  by: picklist(["day", "week", "series"]),
2161
- meetings: count4,
2162
- minutes: count4,
2822
+ meetings: count5,
2823
+ minutes: count5,
2163
2824
  mean_minutes: nullable(number()),
2164
- transcripts: count4,
2825
+ transcripts: count5,
2165
2826
  rows: array(meetingCountsRow),
2166
2827
  has_more: boolean()
2167
2828
  });
@@ -2170,27 +2831,28 @@ var meetingParticipants = strictObject({
2170
2831
  schema_version: literal(1),
2171
2832
  kind: literal("meeting_participants"),
2172
2833
  account_id: id3,
2173
- query: text4,
2834
+ query: text5,
2174
2835
  items: array(strictObject({
2175
2836
  participant_id: id3,
2176
2837
  meeting_id: id3,
2177
2838
  identity_id: id3,
2178
- display_name: nullable(text4),
2179
- email: nullable(text4)
2839
+ display_name: nullable(text5),
2840
+ email: nullable(text5),
2841
+ person: nullable(strictObject({ ref: text5, name: nullable(text5) }))
2180
2842
  })),
2181
2843
  /** Several identities on one page are observations, never speaker attribution or person links. */
2182
2844
  ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(id3) }),
2183
2845
  coverage: strictObject({
2184
- scanned: count4,
2185
- read_bytes: count4,
2846
+ scanned: count5,
2847
+ read_bytes: count5,
2186
2848
  archive_completeness: literal("unknown"),
2187
2849
  truncated_by: truncated("limit", "scan_limit", "read_bytes")
2188
2850
  }),
2189
2851
  page: strictObject({
2190
2852
  mode: literal("cursor"),
2191
- limit: count4,
2853
+ limit: count5,
2192
2854
  has_more: boolean(),
2193
- next_cursor: optional(text4)
2855
+ next_cursor: optional(text5)
2194
2856
  })
2195
2857
  });
2196
2858
  var revision = picklist(["current", "superseded"]);
@@ -2199,15 +2861,15 @@ var meetingPassage = strictObject({
2199
2861
  kind: literal("meeting_context"),
2200
2862
  source: reference,
2201
2863
  target_ref: reference,
2202
- target_fingerprint: text4,
2203
- fingerprint: text4,
2864
+ target_fingerprint: text5,
2865
+ fingerprint: text5,
2204
2866
  revision,
2205
- limits: strictObject({ before: count4, after: count4, bytes: count4, max_read_bytes: count4 }),
2206
- content_bytes: count4,
2867
+ limits: strictObject({ before: count5, after: count5, bytes: count5, max_read_bytes: count5 }),
2868
+ content_bytes: count5,
2207
2869
  coverage: strictObject({
2208
- included: count4,
2209
- before: count4,
2210
- after: count4,
2870
+ included: count5,
2871
+ before: count5,
2872
+ after: count5,
2211
2873
  has_before: boolean(),
2212
2874
  has_after: boolean(),
2213
2875
  truncated_by: truncated("bytes"),
@@ -2219,30 +2881,30 @@ var meetingPassage = strictObject({
2219
2881
  }),
2220
2882
  items: array(strictObject({
2221
2883
  ref: reference,
2222
- fingerprint: text4,
2884
+ fingerprint: text5,
2223
2885
  transcript_id: id3,
2224
- content_hash: nullable(text4),
2225
- position: count4,
2226
- start_ms: count4,
2227
- end_ms: count4,
2886
+ content_hash: nullable(text5),
2887
+ position: count5,
2888
+ start_ms: count5,
2889
+ end_ms: count5,
2228
2890
  speaker_participant_id: nullable(id3),
2229
- speaker_name: nullable(text4),
2230
- text: text4,
2891
+ speaker_name: nullable(text5),
2892
+ text: text5,
2231
2893
  revision
2232
2894
  }))
2233
2895
  });
2234
2896
  var event = strictObject({
2235
2897
  id: pipe(string(), minLength(1)),
2236
- event_series_id: nullable(text4),
2237
- title: nullable(text4),
2238
- description: nullable(text4),
2239
- location: nullable(text4),
2898
+ event_series_id: nullable(text5),
2899
+ title: nullable(text5),
2900
+ description: nullable(text5),
2901
+ location: nullable(text5),
2240
2902
  starts_at: nullable(isoTime),
2241
2903
  ends_at: nullable(isoTime),
2242
- timezone: nullable(text4),
2904
+ timezone: nullable(text5),
2243
2905
  /** `auto`: made from a meeting; `owner`: made by hand; `calendar`: from a calendar's entries. */
2244
2906
  origin: picklist(["auto", "owner", "calendar"]),
2245
- status: nullable(text4),
2907
+ status: nullable(text5),
2246
2908
  all_day: boolean(),
2247
2909
  /** When its calendar deleted it: shown as "deleted in Google", kept as history. */
2248
2910
  source_deleted_at: nullable(isoTime),
@@ -2250,7 +2912,7 @@ var event = strictObject({
2250
2912
  created_at: isoTime,
2251
2913
  updated_at: isoTime,
2252
2914
  /** The fields whoever sent the invitation wrote, on a calendar CLI's `events list`: an agent reads them as data. */
2253
- untrusted: optional(array(text4)),
2915
+ untrusted: optional(array(text5)),
2254
2916
  /** On a calendar CLI's `events list changed:<date>`: what changed since then, and when the store saw it. */
2255
2917
  change: optional(picklist(["new", "moved", "cancelled"])),
2256
2918
  changed_at: optional(nullable(isoTime)),
@@ -2262,7 +2924,7 @@ var event = strictObject({
2262
2924
  */
2263
2925
  overlapping: optional(boolean()),
2264
2926
  /** With `overlapping:true`: the events it overlaps, as `event:<id>`. */
2265
- overlaps: optional(array(text4))
2927
+ overlaps: optional(array(text5))
2266
2928
  });
2267
2929
  var eventItem = /* @__PURE__ */ __name((one) => ({
2268
2930
  id: String(one.id),
@@ -2282,10 +2944,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
2282
2944
  updated_at: new Date(one.updatedAt).toISOString()
2283
2945
  }), "eventItem");
2284
2946
 
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
2947
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
2286
2948
  var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
2287
2949
 
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
2950
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
2289
2951
  var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2290
2952
  if (!original || typeof original !== "object" || Array.isArray(original))
2291
2953
  throw new CliError("validation_error", "related history request is required");
@@ -2315,147 +2977,14 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
2315
2977
  return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
2316
2978
  }, "validateMeetingRelatedHistory");
2317
2979
 
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
2319
- var text5 = string();
2320
- var identifier = pipe(text5, minLength(1));
2321
- var nullableText = nullable(text5);
2322
- var count5 = pipe(number(), integer(), minValue(0));
2323
- var flag = boolean();
2324
- var scope = strictObject({ provider: text5, account: text5 });
2325
- var run = strictObject({
2326
- meetings: count5,
2327
- participants: count5,
2328
- transcript_rows: count5,
2329
- summaries: count5,
2330
- warnings: array(strictObject({ external_id: text5, message: text5 })),
2331
- timezone: optional(text5)
2332
- });
2333
- var exported = union([
2334
- strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text5, content: text5 }),
2335
- strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text5 })
2336
- ]);
2337
- var eventChange = strictObject({
2338
- action: literal("event.link"),
2339
- event_id: nullable(identifier),
2340
- expected_event_id: optional(nullable(identifier))
2341
- });
2342
- var personChange = strictObject({
2343
- action: literal("person.link"),
2344
- participant_id: identifier,
2345
- person_uid: text5,
2346
- expected_person_uid: optional(nullableText),
2347
- target_account_ids: optional(array(identifier))
2348
- });
2349
- var eventResult = strictObject({
2350
- meeting_id: identifier,
2351
- event_id: nullable(identifier),
2352
- previous_event_id: nullable(identifier),
2353
- changed: flag
2354
- });
2355
- var personResult = strictObject({
2356
- meeting_id: identifier,
2357
- participant_id: identifier,
2358
- person_uid: text5,
2359
- previous_person_uid: nullableText,
2360
- changed: flag
2361
- });
2362
- var meetingChange = strictObject({
2363
- scope,
2364
- account_id: identifier,
2365
- meeting_id: identifier,
2366
- change: union([eventChange, personChange]),
2367
- applied: flag,
2368
- result: optional(union([eventResult, personResult]))
2369
- });
2370
- var recognition = strictObject({
2371
- engine: text5,
2372
- model: text5,
2373
- version: optional(text5),
2374
- timing: optional(picklist(["fixed-windows", "recognition-segments"]))
2375
- });
2376
- var transcription = union([
2377
- strictObject({
2378
- applied: literal(false),
2379
- account_id: identifier,
2380
- external_id: text5,
2381
- segments: count5,
2382
- media: strictObject({
2383
- id: text5,
2384
- content_hash: text5,
2385
- size: count5,
2386
- duration_ms: count5,
2387
- format: text5,
2388
- sample_rate: count5,
2389
- channels: count5,
2390
- recognition
2391
- })
2392
- }),
2393
- strictObject({
2394
- applied: literal(true),
2395
- account_id: identifier,
2396
- external_id: text5,
2397
- meeting_id: identifier,
2398
- created: flag,
2399
- inserted_transcripts: count5,
2400
- replayed_transcripts: count5,
2401
- superseded_transcripts: count5,
2402
- segments: count5,
2403
- media_sha256: text5,
2404
- engine: text5,
2405
- model: text5,
2406
- model_version: nullableText,
2407
- timing: picklist(["fixed-windows", "recognition-segments"])
2408
- })
2409
- ]);
2410
- var embeddingModel = strictObject({ key: text5, dims: count5, kind: picklist(["local", "remote"]), model: text5 });
2411
- var embedding = union([
2412
- strictObject({
2413
- account_id: identifier,
2414
- model: embeddingModel,
2415
- status: strictObject({ chunks: count5, embedded: count5 }),
2416
- applied: literal(false),
2417
- scope: literal("existing-current-chunks"),
2418
- rebuild_required: literal("explicit")
2419
- }),
2420
- strictObject({
2421
- account_id: identifier,
2422
- model: embeddingModel,
2423
- saved: count5,
2424
- skipped: count5,
2425
- has_more: flag,
2426
- next_hash: optional(text5),
2427
- applied: literal(true),
2428
- rebuild: strictObject({
2429
- transcripts: count5,
2430
- chunks: count5,
2431
- has_more: flag,
2432
- next_transcript_id: optional(identifier)
2433
- })
2434
- })
2435
- ]);
2436
- var repair = strictObject({
2437
- account_id: identifier,
2438
- applied: flag,
2439
- transcripts: count5,
2440
- languages: array(strictObject({ language: nullableText, transcripts: count5 }))
2441
- });
2442
- var MEETING_RESULT_ENTITIES = {
2443
- meeting_ingestion: run,
2444
- meeting_export: exported,
2445
- meeting_association: meetingChange,
2446
- meeting_transcription: transcription,
2447
- meeting_embedding: embedding,
2448
- meeting_repair: repair
2449
- };
2450
-
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
2980
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/review.js
2452
2981
  var REVIEW_LIMIT = { default: 50, most: 200 };
2453
2982
 
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
2983
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
2455
2984
  var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
2456
2985
  \`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
2457
2986
 
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
2987
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
2459
2988
  var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2460
2989
  input.signal?.throwIfAborted();
2461
2990
  if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
@@ -2476,10 +3005,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
2476
3005
  return { ...input, limit, maxReadBytes };
2477
3006
  }, "validateMeetingSeriesHistory");
2478
3007
 
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
3008
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
2480
3009
  var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
2481
3010
 
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
3011
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
2483
3012
  function invalid4(field, response = false) {
2484
3013
  throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
2485
3014
  }
@@ -2508,7 +3037,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
2508
3037
  cursorDetails(value);
2509
3038
  }, "validateMeetingSeriesInventoryCursor");
2510
3039
 
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
3040
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/stats.js
2512
3041
  var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
2513
3042
  var zoneOf = /* @__PURE__ */ __name((timeZone) => {
2514
3043
  const zone = timeZone ?? "UTC";
@@ -2521,13 +3050,13 @@ var zoneOf = /* @__PURE__ */ __name((timeZone) => {
2521
3050
  }, "zoneOf");
2522
3051
  var DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
2523
3052
  var weekStart = /* @__PURE__ */ __name((at, format) => {
2524
- const parts = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
2525
- const day = Date.UTC(Number(parts.year), Number(parts.month) - 1, Number(parts.day));
2526
- return new Date(day - DAYS.indexOf(parts.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
3053
+ const parts2 = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
3054
+ const day2 = Date.UTC(Number(parts2.year), Number(parts2.month) - 1, Number(parts2.day));
3055
+ return new Date(day2 - DAYS.indexOf(parts2.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
2527
3056
  }, "weekStart");
2528
3057
  var dayKey = /* @__PURE__ */ __name((at, format) => {
2529
- const parts = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
2530
- return `${parts.year}-${parts.month}-${parts.day}`;
3058
+ const parts2 = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
3059
+ return `${parts2.year}-${parts2.month}-${parts2.day}`;
2531
3060
  }, "dayKey");
2532
3061
  var zoneFormat = /* @__PURE__ */ __name((zone) => new Intl.DateTimeFormat("en-US", {
2533
3062
  timeZone: zone,
@@ -2643,158 +3172,17 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
2643
3172
  };
2644
3173
  }, "aggregateMeetingStats");
2645
3174
 
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");
3175
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/meetings/store.js
3176
+ var READ_BUDGET_EXCEEDED = "Meeting search exceeds its stored text byte budget";
2768
3177
 
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");
3178
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/store/source-review.js
3179
+ var SOURCE_REVIEW_KIND = "memory_source_review";
3180
+ var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
3181
+ var ERASED_TEXT = "[source erased]";
3182
+ var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
3183
+ var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
2796
3184
 
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
3185
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/tasks/model.js
2798
3186
  var TASK_KINDS = ["question", "request", "mention", "promise"];
2799
3187
  var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
2800
3188
  var CLOSED_STATES = ["done", "dismissed"];
@@ -2809,7 +3197,7 @@ function closeTask(task, state, by, at, reason) {
2809
3197
  }
2810
3198
  __name(closeTask, "closeTask");
2811
3199
 
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
3200
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/tasks/priority.js
2813
3201
  var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
2814
3202
  var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
2815
3203
  var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
@@ -2838,7 +3226,7 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
2838
3226
  }, "priorityOf");
2839
3227
  var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
2840
3228
 
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
3229
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/tasks/service.js
2842
3230
  function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
2843
3231
  async function find(id5) {
2844
3232
  const task = await store.get(id5);
@@ -2898,13 +3286,13 @@ function median(values) {
2898
3286
  }
2899
3287
  __name(median, "median");
2900
3288
 
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
3289
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/tasks/store.js
2902
3290
  function matches(task, filter) {
2903
3291
  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);
2904
3292
  }
2905
3293
  __name(matches, "matches");
2906
3294
 
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
3295
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
2908
3296
  var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
2909
3297
  var MEMORY_KINDS = ["summary", "digest", "preference"];
2910
3298
  var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
@@ -2912,7 +3300,10 @@ var MEMORY_SCOPES = ["personal", "work"];
2912
3300
  var WORK_TASK_TYPES = ["bug", "feature", "chore"];
2913
3301
  var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
2914
3302
 
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
3303
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/categories.js
3304
+ var CATEGORIES = ["client", "supplier", "partner", "employer"];
3305
+
3306
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/entities/fields.js
2916
3307
  var text6 = string();
2917
3308
  var id4 = pipe(string(), minLength(1));
2918
3309
  var time = isoTime;
@@ -2930,13 +3321,14 @@ var evidenceSource = strictObject({
2930
3321
  tool: nullable(text6),
2931
3322
  missing: boolean()
2932
3323
  });
3324
+ var sourceReview = nullable(strictObject({ id: id4, cause: picklist(SOURCE_REVIEW_CAUSES) }));
2933
3325
  var author = strictObject({
2934
3326
  type: picklist(["person", "bot"]),
2935
3327
  id: id4,
2936
3328
  name: nullable(text6)
2937
3329
  });
2938
3330
 
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
3331
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
2940
3332
  var organization = strictObject({
2941
3333
  id: id4,
2942
3334
  ref: reference,
@@ -2966,75 +3358,244 @@ var reminder = strictObject({
2966
3358
  receipt: nullable(text6)
2967
3359
  });
2968
3360
 
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");
3361
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/money.js
3362
+ var CURRENCY_SCALES = {
3363
+ AED: 2,
3364
+ AMD: 2,
3365
+ AUD: 2,
3366
+ BHD: 3,
3367
+ BYN: 2,
3368
+ CAD: 2,
3369
+ CHF: 2,
3370
+ CLP: 0,
3371
+ CNY: 2,
3372
+ CZK: 2,
3373
+ DKK: 2,
3374
+ EUR: 2,
3375
+ GBP: 2,
3376
+ GEL: 2,
3377
+ HUF: 2,
3378
+ ILS: 2,
3379
+ INR: 2,
3380
+ ISK: 0,
3381
+ JPY: 0,
3382
+ KGS: 2,
3383
+ KRW: 0,
3384
+ KWD: 3,
3385
+ KZT: 2,
3386
+ NOK: 2,
3387
+ PLN: 2,
3388
+ RSD: 2,
3389
+ RUB: 2,
3390
+ SEK: 2,
3391
+ THB: 2,
3392
+ TRY: 2,
3393
+ UAH: 2,
3394
+ USD: 2,
3395
+ UZS: 2,
3396
+ VND: 0
3397
+ };
3398
+ var refuse = /* @__PURE__ */ __name((message, reason) => {
3399
+ throw new CliError("validation_error", message, { reason });
3400
+ }, "refuse");
3401
+ var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
3402
+ var parseDecimal = /* @__PURE__ */ __name((text7, scale) => {
3403
+ const match = DECIMAL.exec(text7.trim());
3404
+ if (!match || (match[2] ?? "").length > scale)
3405
+ return void 0;
3406
+ return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
3407
+ }, "parseDecimal");
3408
+ var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
3409
+ const value = BigInt(units);
3410
+ if (value < 0n)
3411
+ return `-${formatDecimal(-value, scale)}`;
3412
+ const digits = value.toString().padStart(scale + 1, "0");
3413
+ return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
3414
+ }, "formatDecimal");
3415
+ var groupDigits = /* @__PURE__ */ __name((decimal) => {
3416
+ const [whole = "0", fraction] = decimal.split(".");
3417
+ const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
3418
+ return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
3419
+ }, "groupDigits");
3420
+ var currencyOf = /* @__PURE__ */ __name((text7) => {
3421
+ const code = typeof text7 === "string" ? text7.trim().toUpperCase() : "";
3422
+ if (CURRENCY_SCALES[code] === void 0)
3423
+ 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");
3424
+ return code;
3425
+ }, "currencyOf");
3426
+ var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
3427
+ var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
3428
+ const scale = scaleOf(currency);
3429
+ const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
3430
+ if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
3431
+ 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");
3432
+ return Number(units);
3433
+ }, "minorUnits");
3434
+ var signedMinorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
3435
+ if (typeof amount !== "string" || !amount.trim().startsWith("-"))
3436
+ return minorUnits(amount, currency, what);
3437
+ const units = minorUnits(amount.trim().slice(1), currency, what);
3438
+ return units === 0 ? 0 : -units;
3439
+ }, "signedMinorUnits");
3440
+ var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
3441
+ amount: formatDecimal(units, scaleOf(currency)),
3442
+ currency
3443
+ }), "moneyOf");
3444
+ var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
3445
+ var QUANTITY_SCALE = 3;
3446
+ var quantityOf = /* @__PURE__ */ __name((text7) => {
3447
+ const thousandths = typeof text7 === "string" ? parseDecimal(text7, QUANTITY_SCALE) : void 0;
3448
+ if (thousandths === void 0 || thousandths === 0n)
3449
+ return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
3450
+ const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
3451
+ return { text: plain, thousandths };
3452
+ }, "quantityOf");
3453
+ var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
3454
+
3455
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/finance.js
3456
+ var INVOICE_DIRECTIONS = ["receivable", "payable"];
3457
+ var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
3458
+ var MONEY_DIRECTIONS = ["in", "out"];
3459
+ var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
3460
+ var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
3461
+ if (current === "draft" || current === "void")
3462
+ return current;
3463
+ if (paid <= 0)
3464
+ return "issued";
3465
+ return paid < total ? "partly_paid" : "paid";
3466
+ }, "settledStatus");
3467
+ var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
3468
+ var notes = /* @__PURE__ */ __name((...words2) => {
3469
+ const kept = words2.filter((word) => word !== null);
3470
+ return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
3471
+ }, "notes");
3472
+ var invoiceLine = /* @__PURE__ */ __name((invoice) => {
3473
+ const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
3474
+ const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
3475
+ return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
3476
+ }, "invoiceLine");
3477
+ var paymentLine = /* @__PURE__ */ __name((payment) => {
3478
+ const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
3479
+ return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
3480
+ }, "paymentLine");
3481
+ var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
3482
+ var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
3483
+
3484
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/business.js
3485
+ var CATALOG_KINDS = ["product", "service"];
3486
+ var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
3487
+ var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
3488
+ var CONTRACT_STATUSES = ["draft", "active", "ended", "terminated"];
3489
+ var SUBSCRIPTION_STATUSES = ["trial", "active", "paused", "cancelled", "ended"];
3490
+ var WALLET_KINDS = ["bank", "card", "cash", "wallet", "other"];
3491
+ var TRANSACTION_STATUSES = ["pending", "booked"];
3492
+ var ORDER_DIRECTIONS = ["purchase", "sale"];
3493
+ var intervalOf = /* @__PURE__ */ __name((text7, reason = "subscription.interval") => {
3494
+ const match = typeof text7 === "string" ? /^(?:([1-9]\d{0,2})-)?(day|week|month|year)$/.exec(text7.trim()) : null;
3495
+ if (!match)
3496
+ throw new CliError("validation_error", "an interval is a count and a unit, such as 1-month or 2-week", { reason });
3497
+ return { count: match[1] === void 0 ? 1 : Number(match[1]), unit: match[2] };
3498
+ }, "intervalOf");
3499
+ var intervalText = /* @__PURE__ */ __name(({ count: count7, unit }) => `${count7}-${unit}`, "intervalText");
3500
+ var priced = /* @__PURE__ */ __name((units, currency) => units === null || currency === null ? "" : `, ${moneyLabel(units, currency)}`, "priced");
3501
+ var pending = /* @__PURE__ */ __name((review) => review === "confirmed" ? null : review, "pending");
3502
+ var productLine = /* @__PURE__ */ __name((product) => {
3503
+ const price = product.unitPrice === null || product.currency === null ? "" : moneyLabel(product.unitPrice, product.currency);
3504
+ const per = price && product.unit !== null ? ` per ${product.unit}` : "";
3505
+ return `${product.name}${price ? ` \xB7 ${price}${per}` : ""}${notes(product.kind, product.archived ? "archived" : null)}`;
3506
+ }, "productLine");
3507
+ var contractLine = /* @__PURE__ */ __name((contract) => `${contract.number ?? `#${contract.id}`} \xB7 ${contract.name}${priced(contract.value, contract.currency)}` + notes(contract.status, pending(contract.review)), "contractLine");
3508
+ var subscriptionLine = /* @__PURE__ */ __name((subscription) => `${subscription.name}${priced(subscription.price, subscription.currency)} every ${intervalText(subscription.interval)}` + notes(subscription.status, pending(subscription.review)), "subscriptionLine");
3509
+ var walletLine = /* @__PURE__ */ __name((wallet) => `${wallet.name} \xB7 ${wallet.kind}, ${wallet.currency}${wallet.numberHint === null ? "" : `, \u2026${wallet.numberHint}`}` + notes(wallet.closed ? "closed" : null), "walletLine");
3510
+ 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");
3511
+
3512
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/store/marks.js
3513
+ import { readFileSync as readFileSync2, rmSync as rmSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
3514
+ var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
3515
+ var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
3516
+ var journalMarkPath = /* @__PURE__ */ __name((store) => `${store}.journal.json`, "journalMarkPath");
3517
+ var inodeOf = /* @__PURE__ */ __name((store) => statSync2(store, { throwIfNoEntry: false })?.ino, "inodeOf");
3518
+ var readJson = /* @__PURE__ */ __name((path) => {
3519
+ try {
3520
+ return JSON.parse(readFileSync2(path, "utf8"));
3521
+ } catch (error) {
3522
+ if (error.code === "ENOENT")
3523
+ return null;
3524
+ throw error;
3525
+ }
3526
+ }, "readJson");
3527
+ var ownerStoreInTests = /* @__PURE__ */ __name((store) => {
3528
+ try {
3529
+ refuseOwnerStoreInTests(store);
3530
+ return false;
3531
+ } catch {
3532
+ return true;
3533
+ }
3534
+ }, "ownerStoreInTests");
3535
+ var sqliteFailure = /* @__PURE__ */ __name((error) => isCliFailure(error) && error.details?.reason === "store.damaged" ? error.cause : error, "sqliteFailure");
3536
+ var markStoreDamaged = /* @__PURE__ */ __name((error, { store, command, version, runId, now = Date.now }) => {
3537
+ const failure = sqliteFailure(error);
3538
+ if (!isStoreDamage(failure) || ownerStoreInTests(store))
3539
+ return false;
3540
+ const inode = inodeOf(store);
3541
+ if (inode === void 0)
3542
+ return false;
3543
+ const mark = {
3544
+ at: new Date(now()).toISOString(),
3545
+ command,
3546
+ ...version ? { cli_version: version } : {},
3547
+ ...runId ? { run_id: runId } : {},
3548
+ error: failure.message.slice(0, 500),
3549
+ inode
3550
+ };
3551
+ try {
3552
+ writeFileSync2(damageMarkPath(store), `${JSON.stringify(mark, null, 2)}
3553
+ `, { flag: "wx", mode: 384 });
3554
+ return true;
3555
+ } catch {
3556
+ return false;
3557
+ }
3558
+ }, "markStoreDamaged");
3559
+ var readDamageMark = /* @__PURE__ */ __name((store) => {
3560
+ const path = damageMarkPath(store);
3561
+ let mark;
3562
+ try {
3563
+ mark = readJson(path);
3564
+ } catch {
3565
+ return { at: "unknown", command: "unknown", error: `${path} cannot be read`, inode: inodeOf(store) ?? 0 };
3566
+ }
3567
+ if (mark === null)
3568
+ return null;
3569
+ if (mark.inode !== inodeOf(store)) {
3570
+ clearDamageMark(store);
3571
+ return null;
3572
+ }
3573
+ return mark;
3574
+ }, "readDamageMark");
3575
+ var clearDamageMark = /* @__PURE__ */ __name((store) => rmSync2(damageMarkPath(store), { force: true }), "clearDamageMark");
3576
+ var refuseDamagedStore = /* @__PURE__ */ __name((store, cli) => {
3577
+ const mark = readDamageMark(store);
3578
+ if (!mark)
3579
+ return;
3580
+ 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" });
3581
+ }, "refuseDamagedStore");
3582
+ var markJournalLost = /* @__PURE__ */ __name((store, { seen, command, now = Date.now }) => {
3583
+ if (ownerStoreInTests(store))
3584
+ return;
3585
+ const mark = { at: new Date(now()).toISOString(), command, seen };
3586
+ try {
3587
+ writeFileSync2(journalMarkPath(store), `${JSON.stringify(mark, null, 2)}
3588
+ `, { flag: "wx", mode: 384 });
3589
+ } catch {
3590
+ }
3591
+ }, "markJournalLost");
3592
+ var readJournalMark = /* @__PURE__ */ __name((store) => {
3593
+ try {
3594
+ return readJson(journalMarkPath(store));
3595
+ } catch {
3596
+ return null;
3597
+ }
3598
+ }, "readJournalMark");
3038
3599
  var readHealthMark = /* @__PURE__ */ __name((store) => {
3039
3600
  try {
3040
3601
  return readJson(healthMarkPath(store));
@@ -3058,16 +3619,588 @@ var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, sch
3058
3619
  };
3059
3620
  const cleared = health.ok ? readDamageMark(store) : null;
3060
3621
  try {
3061
- writeFileSync(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
3622
+ writeFileSync2(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
3062
3623
  `, { mode: 384 });
3063
3624
  } catch {
3064
3625
  }
3065
3626
  if (cleared)
3066
3627
  clearDamageMark(store);
3628
+ if (health.ok)
3629
+ rmSync2(journalMarkPath(store), { force: true });
3067
3630
  return { previous, cleared };
3068
3631
  }, "recordDeepCheck");
3069
3632
 
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
3633
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/locator.js
3634
+ var SCHEME = "msg:";
3635
+ var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
3636
+ var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
3637
+ var parseLocator = /* @__PURE__ */ __name((reference2) => {
3638
+ const trimmed = reference2.trim();
3639
+ const parts2 = trimmed.startsWith(SCHEME) ? trimmed.slice(SCHEME.length).split("/") : [];
3640
+ if (parts2.length !== 4 || parts2.some((part) => part === "")) {
3641
+ throw new CliError("validation_error", `"${singleLine(reference2)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`);
3642
+ }
3643
+ const [provider, account, chat, message] = parts2.map(decodeURIComponent);
3644
+ return { provider, account, chat, message };
3645
+ }, "parseLocator");
3646
+
3647
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/references.js
3648
+ var SIMPLE_REFERENCES = [
3649
+ "note",
3650
+ "document",
3651
+ "person",
3652
+ "organization",
3653
+ "project",
3654
+ "task",
3655
+ "memory",
3656
+ "fact",
3657
+ "bot",
3658
+ "event",
3659
+ "invoice",
3660
+ "payment",
3661
+ "order",
3662
+ "deal",
3663
+ "lead",
3664
+ "pipeline",
3665
+ "product",
3666
+ "contract",
3667
+ "subscription",
3668
+ "wallet",
3669
+ "transaction",
3670
+ "entity"
3671
+ ];
3672
+ var malformed = /* @__PURE__ */ __name((text7, shape) => new CliError("validation_error", `"${singleLine(text7)}" is not a reference \u2014 expected ${shape}`, {
3673
+ reason: "ref.malformed"
3674
+ }), "malformed");
3675
+ var parts = /* @__PURE__ */ __name((rest, count7, text7, shape) => {
3676
+ const split = rest.split("/");
3677
+ if (split.length !== count7 || split.some((part) => part === ""))
3678
+ throw malformed(text7, shape);
3679
+ return split.map(decodeURIComponent);
3680
+ }, "parts");
3681
+ var encoded = /* @__PURE__ */ __name((...values) => values.map(encodeURIComponent).join("/"), "encoded");
3682
+ var folderPath = /* @__PURE__ */ __name((path) => {
3683
+ const clean = path.split("/").filter((part) => part !== "" && part !== ".").join("/");
3684
+ return clean === "" ? path.trim() === "" ? "" : null : clean;
3685
+ }, "folderPath");
3686
+ var MEETING_SHAPE = "meeting:<account>/<meeting>[/<transcript>[/<cue>]] with safe integer ids";
3687
+ var kind = /* @__PURE__ */ __name((spec) => spec, "kind");
3688
+ var simple = /* @__PURE__ */ __name((prefix) => kind({
3689
+ prefix,
3690
+ type: prefix,
3691
+ shape: `${prefix}:<id>`,
3692
+ parse: /* @__PURE__ */ __name((rest, text7) => {
3693
+ if (!rest.trim())
3694
+ throw new CliError("validation_error", `"${singleLine(text7)}" names no ${prefix}`, {
3695
+ reason: "ref.malformed"
3696
+ });
3697
+ return { type: prefix, id: rest };
3698
+ }, "parse"),
3699
+ format: /* @__PURE__ */ __name((reference2) => `${reference2.type}:${reference2.id}`, "format")
3700
+ }), "simple");
3701
+ var REF_KINDS = [
3702
+ kind({
3703
+ prefix: "msg",
3704
+ type: "message",
3705
+ shape: "msg:<provider>/<account>/<chat>/<message>",
3706
+ parse: /* @__PURE__ */ __name((_, text7) => {
3707
+ try {
3708
+ return { type: "message", ...parseLocator(text7) };
3709
+ } catch {
3710
+ throw malformed(text7, "msg:<provider>/<account>/<chat>/<message>");
3711
+ }
3712
+ }, "parse"),
3713
+ format: formatLocator
3714
+ }),
3715
+ kind({
3716
+ prefix: "chat",
3717
+ type: "chat",
3718
+ shape: "chat:<provider>/<account>/<chat>",
3719
+ parse: /* @__PURE__ */ __name((rest, text7) => {
3720
+ const [provider, account, chat] = parts(rest, 3, text7, "chat:<provider>/<account>/<chat>");
3721
+ return { type: "chat", provider, account, chat };
3722
+ }, "parse"),
3723
+ format: /* @__PURE__ */ __name(({ provider, account, chat }) => `chat:${encoded(provider, account, chat)}`, "format")
3724
+ }),
3725
+ kind({
3726
+ prefix: "contact",
3727
+ type: "contact",
3728
+ shape: "contact:<provider>/<id>",
3729
+ parse: /* @__PURE__ */ __name((rest, text7) => {
3730
+ const [provider, id5] = parts(rest, 2, text7, "contact:<provider>/<id>");
3731
+ return { type: "contact", provider, id: id5 };
3732
+ }, "parse"),
3733
+ format: /* @__PURE__ */ __name(({ provider, id: id5 }) => `contact:${encoded(provider, id5)}`, "format")
3734
+ }),
3735
+ kind({
3736
+ prefix: "folder",
3737
+ type: "folder",
3738
+ shape: "folder:<id>[/<path>]",
3739
+ parse: /* @__PURE__ */ __name((rest, text7) => {
3740
+ const slash = rest.indexOf("/");
3741
+ const id5 = decodeURIComponent(slash < 0 ? rest : rest.slice(0, slash));
3742
+ const path = slash < 0 ? null : folderPath(decodeURIComponent(rest.slice(slash + 1)));
3743
+ if (!id5.trim() || path === "")
3744
+ throw malformed(text7, "folder:<id>[/<path>]");
3745
+ return { type: "folder", id: id5, path };
3746
+ }, "parse"),
3747
+ format: /* @__PURE__ */ __name(({ id: id5, path }) => path === null ? `folder:${encodeURIComponent(id5)}` : `folder:${encoded(id5, path)}`, "format")
3748
+ }),
3749
+ kind({
3750
+ prefix: "meeting",
3751
+ type: "meeting",
3752
+ shape: MEETING_SHAPE,
3753
+ parse: /* @__PURE__ */ __name((_, text7) => {
3754
+ try {
3755
+ return parseMeetingReference(text7);
3756
+ } catch {
3757
+ throw malformed(text7, MEETING_SHAPE);
3758
+ }
3759
+ }, "parse"),
3760
+ format: formatMeetingReference
3761
+ }),
3762
+ ...SIMPLE_REFERENCES.map(simple)
3763
+ ];
3764
+ var byPrefix = new Map(REF_KINDS.map((spec) => [spec.prefix, spec]));
3765
+ var byType = new Map(REF_KINDS.map((spec) => [spec.type, spec]));
3766
+ var offered = REF_KINDS.map(({ prefix }) => prefix).filter((prefix) => prefix !== "entity");
3767
+ var distance = /* @__PURE__ */ __name((a, b) => {
3768
+ let row = Array.from({ length: b.length + 1 }, (_, at) => at);
3769
+ for (const [i, x] of [...a].entries()) {
3770
+ const next = [i + 1];
3771
+ for (const [j, y] of [...b].entries())
3772
+ next.push(Math.min(row[j + 1] + 1, next[j] + 1, row[j] + (x === y ? 0 : 1)));
3773
+ row = next;
3774
+ }
3775
+ return row[b.length];
3776
+ }, "distance");
3777
+ var nearest = /* @__PURE__ */ __name((typed) => offered.find((prefix) => typed.length >= 2 && prefix.startsWith(typed)) ?? offered.map((prefix) => ({ prefix, far: distance(typed, prefix) })).filter(({ far }) => far <= 2).sort((a, b) => a.far - b.far)[0]?.prefix, "nearest");
3778
+ var unknownKind = /* @__PURE__ */ __name((text7, prefix, rest) => {
3779
+ const near2 = prefix === "" ? void 0 : nearest(prefix);
3780
+ const kinds = offered.map((one) => `${one}:`).join(", ");
3781
+ const hint = near2 === void 0 ? `; kinds: ${kinds}` : `; did you mean ${near2}:${singleLine(rest)}? Kinds: ${kinds}`;
3782
+ return new CliError("validation_error", `"${singleLine(text7)}" is no kind of reference${hint}`, {
3783
+ reason: "ref.unknown-kind"
3784
+ });
3785
+ }, "unknownKind");
3786
+ var formatReference = /* @__PURE__ */ __name((reference2) => byType.get(reference2.type).format(reference2), "formatReference");
3787
+ var parseReference = /* @__PURE__ */ __name((text7) => {
3788
+ const reference2 = text7.trim();
3789
+ const colon = reference2.indexOf(":");
3790
+ const prefix = colon < 0 ? "" : reference2.slice(0, colon);
3791
+ const rest = reference2.slice(colon + 1);
3792
+ const spec = byPrefix.get(prefix);
3793
+ if (!spec)
3794
+ throw unknownKind(reference2, prefix, rest);
3795
+ return spec.parse(rest, reference2);
3796
+ }, "parseReference");
3797
+ var canonicalReference = /* @__PURE__ */ __name((text7) => formatReference(parseReference(text7)), "canonicalReference");
3798
+ var looksLikeReference = /* @__PURE__ */ __name((text7) => {
3799
+ const match = /^([a-z]+):\S+$/.exec(text7.trim());
3800
+ return match !== null && byPrefix.has(match[1]);
3801
+ }, "looksLikeReference");
3802
+
3803
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/providers.js
3804
+ var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
3805
+ var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
3806
+ var PROVIDERS = [
3807
+ { name: "telegram", kind: "messages", aliases: ["tg"], command: "tg", opens: MESSENGER_OPENS },
3808
+ { name: "telegram-bot", kind: "messages", aliases: ["tg-bot"] },
3809
+ { name: "max", kind: "messages", aliases: [], command: "max", opens: MESSENGER_OPENS },
3810
+ { name: "max-bot", kind: "messages", aliases: [] },
3811
+ { name: "whatsapp", kind: "messages", aliases: ["wa"], command: "wa", opens: MESSENGER_OPENS },
3812
+ { name: "whatsapp-bot", kind: "messages", aliases: ["wa-bot"] },
3813
+ { name: "email", kind: "mail", aliases: [] },
3814
+ { name: "notes", kind: "notes", aliases: [] },
3815
+ { name: "local", kind: "notes", aliases: [] },
3816
+ { name: "obsidian", kind: "notes", aliases: [] },
3817
+ { name: "added", kind: "notes", aliases: [] },
3818
+ { name: "zoom", kind: "meetings", aliases: [] },
3819
+ // A phone export's records: its SMS and its calls in the one account the import names.
3820
+ { name: "phone", kind: "messages", kinds: ["messages", "events"], aliases: [], imported: true },
3821
+ // Any other import: a folder of notes, a CRM's export, a script's records, under `import:<what it is>`.
3822
+ { name: "import", kind: "documents", kinds: ["documents", "messages", "events"], aliases: [], imported: true }
3823
+ ];
3824
+ var LABELS = {
3825
+ telegram: "Telegram",
3826
+ "telegram-bot": "Telegram bot",
3827
+ max: "MAX",
3828
+ "max-bot": "MAX bot",
3829
+ whatsapp: "WhatsApp",
3830
+ "whatsapp-bot": "WhatsApp bot",
3831
+ "google-drive": "Google Drive",
3832
+ added: "added by hand",
3833
+ email: "mail"
3834
+ };
3835
+ var providerLabel = /* @__PURE__ */ __name((provider) => LABELS[provider] ?? provider, "providerLabel");
3836
+ var FOLDER_PROVIDERS = ["local", "obsidian", "folder"];
3837
+ var isFolderProvider = /* @__PURE__ */ __name((provider) => FOLDER_PROVIDERS.includes(provider), "isFolderProvider");
3838
+ var folderProviderSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${FOLDER_PROVIDERS.map((name) => `'${name}'`).join(", ")})`, "folderProviderSql");
3839
+ var folderProviderOf = /* @__PURE__ */ __name((format) => format === "markdown" ? "local" : "obsidian", "folderProviderOf");
3840
+ var DOCUMENT_ACCOUNT_PROVIDERS = ["google-drive"];
3841
+ var isDocumentAccountProvider = /* @__PURE__ */ __name((provider) => DOCUMENT_ACCOUNT_PROVIDERS.includes(provider), "isDocumentAccountProvider");
3842
+ var ADDED_PROVIDER = "added";
3843
+ var ADDED_ACCOUNT = "owner";
3844
+ var notAdded = `d.account_id NOT IN (SELECT id FROM accounts WHERE provider = '${ADDED_PROVIDER}')`;
3845
+ var filesAccountSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${[...FOLDER_PROVIDERS, ...DOCUMENT_ACCOUNT_PROVIDERS, ADDED_PROVIDER].map((name) => `'${name}'`).join(", ")})`, "filesAccountSql");
3846
+ var INTERNAL_NOTES = "internal";
3847
+ var UNKNOWN_PROVIDER = "unknown provider \u2014 run its CLI once";
3848
+ var WORD = /^[a-z0-9][a-z0-9_-]*$/;
3849
+ var invalid5 = /* @__PURE__ */ __name((message) => {
3850
+ throw new CliError("validation_error", message);
3851
+ }, "invalid");
3852
+ var wordOf = /* @__PURE__ */ __name((value, what) => typeof value === "string" && WORD.test(value) ? value : invalid5(`${what} is lowercase letters, digits, - and _ \u2014 not ${JSON.stringify(value)}`), "wordOf");
3853
+ var OPEN_KINDS = new Set(REF_KINDS.map(({ type }) => type).filter((type) => type !== "entity"));
3854
+ var COMMAND_WORDS = /^[a-z0-9][a-z0-9_-]*( [a-z0-9][a-z0-9_-]*)*$/;
3855
+ var opensOf = /* @__PURE__ */ __name((value, named) => {
3856
+ if (typeof value !== "object" || value === null || Array.isArray(value))
3857
+ return invalid5(`provider ${named}'s opens maps a kind of reference to a command`);
3858
+ const known = Object.entries(value).filter(([kind2]) => OPEN_KINDS.has(kind2));
3859
+ for (const [kind2, command] of known)
3860
+ if (typeof command !== "string" || !COMMAND_WORDS.test(command))
3861
+ invalid5(`provider ${named} opens a ${kind2} with command words, not ${JSON.stringify(command)}`);
3862
+ return Object.fromEntries(known);
3863
+ }, "opensOf");
3864
+ var providerEntryOf = /* @__PURE__ */ __name((value) => {
3865
+ if (typeof value !== "object" || value === null || Array.isArray(value))
3866
+ return invalid5("a provider entry is an object");
3867
+ const { name, kind: kind2, kinds, aliases = [], command, opens, imported } = value;
3868
+ const named = wordOf(name, "a provider's name");
3869
+ const isKindWord = /* @__PURE__ */ __name((one) => typeof one === "string" && KINDS.includes(one), "isKindWord");
3870
+ const given = kinds === void 0 ? [kind2] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
3871
+ for (const one of given)
3872
+ if (!isKindWord(one))
3873
+ invalid5(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(one)}`);
3874
+ const list = [...new Set(given)];
3875
+ if (kind2 !== void 0 && kind2 !== list[0])
3876
+ invalid5(`provider ${named}'s kind is the first of its kinds`);
3877
+ if (!Array.isArray(aliases))
3878
+ invalid5(`provider ${named}'s aliases are a list`);
3879
+ if (imported !== void 0 && typeof imported !== "boolean")
3880
+ invalid5(`provider ${named}'s imported is true or false`);
3881
+ return {
3882
+ name: named,
3883
+ kind: list[0],
3884
+ ...list.length > 1 ? { kinds: list } : {},
3885
+ ...imported === true ? { imported: true } : {},
3886
+ aliases: [...new Set(aliases.map((alias) => wordOf(alias, `an alias of ${named}`)))],
3887
+ ...command === void 0 ? {} : { command: wordOf(command, `the command of ${named}`) },
3888
+ ...opens === void 0 ? {} : { opens: opensOf(opens, named) }
3889
+ };
3890
+ }, "providerEntryOf");
3891
+ var kindsOfEntry = /* @__PURE__ */ __name((entry) => entry.kinds ?? [entry.kind], "kindsOfEntry");
3892
+ var describe = /* @__PURE__ */ __name((entry) => `${entry.name} (${kindsOfEntry(entry).join(", ")}${entry.command ? `, from ${entry.command}` : ""})`, "describe");
3893
+ var unitedKinds = /* @__PURE__ */ __name((known, entry) => [
3894
+ .../* @__PURE__ */ new Set([...known, ...entry])
3895
+ ], "unitedKinds");
3896
+ var wordsOf = /* @__PURE__ */ __name(({ name, aliases }) => [name, ...aliases], "wordsOf");
3897
+ var joined = /* @__PURE__ */ __name((known, entry) => {
3898
+ const same = known.find(({ name }) => name === entry.name);
3899
+ const kinds = same ? unitedKinds(kindsOfEntry(same), kindsOfEntry(entry)) : kindsOfEntry(entry);
3900
+ if (same && same.kind !== entry.kind)
3901
+ invalid5(`two provider entries disagree on the kind: ${describe(same)} and ${describe(entry)}`);
3902
+ if (same && entry.imported === true && same.imported !== true)
3903
+ invalid5(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
3904
+ const merged = same ? {
3905
+ ...same,
3906
+ ...kinds.length > 1 ? { kinds } : {},
3907
+ aliases: [.../* @__PURE__ */ new Set([...same.aliases, ...entry.aliases])],
3908
+ ...entry.command ? { command: entry.command } : {},
3909
+ ...entry.opens ? { opens: { ...same.opens, ...entry.opens } } : {}
3910
+ } : entry;
3911
+ const others = known.filter((one) => one !== same);
3912
+ for (const word of wordsOf(merged)) {
3913
+ const owner = others.find((one) => wordsOf(one).includes(word));
3914
+ if (owner)
3915
+ invalid5(`"${word}" names two providers: ${describe(owner)} and ${describe(merged)}`);
3916
+ }
3917
+ return same ? known.map((one) => one === same ? merged : one) : [...known, merged];
3918
+ }, "joined");
3919
+ var registry = PROVIDERS;
3920
+ var providers = /* @__PURE__ */ __name(() => registry, "providers");
3921
+ var useStoredProviders = /* @__PURE__ */ __name((entries) => {
3922
+ const left = [];
3923
+ registry = entries.reduce((known, entry) => {
3924
+ try {
3925
+ return joined(known, providerEntryOf(entry));
3926
+ } catch (error) {
3927
+ if (!(error instanceof CliError))
3928
+ throw error;
3929
+ left.push(entry);
3930
+ return known;
3931
+ }
3932
+ }, PROVIDERS);
3933
+ return left;
3934
+ }, "useStoredProviders");
3935
+ var addProvider = /* @__PURE__ */ __name((entry) => {
3936
+ registry = joined(registry, providerEntryOf(entry));
3937
+ }, "addProvider");
3938
+ var isKind = /* @__PURE__ */ __name((word) => KINDS.includes(word.toLowerCase()), "isKind");
3939
+ var providerNamed = /* @__PURE__ */ __name((word) => {
3940
+ const wanted = word.toLowerCase();
3941
+ return registry.find((entry) => wordsOf(entry).includes(wanted));
3942
+ }, "providerNamed");
3943
+ var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
3944
+ var kindsIn = /* @__PURE__ */ __name((provider) => {
3945
+ if (isFolderProvider(provider))
3946
+ return ["notes"];
3947
+ const entry = registry.find(({ name }) => name === provider);
3948
+ if (!entry)
3949
+ return [];
3950
+ return entry.imported ? unitedKinds(kindsOfEntry(entry), ["documents"]) : kindsOfEntry(entry);
3951
+ }, "kindsIn");
3952
+ var importedOf = /* @__PURE__ */ __name((entry, held) => {
3953
+ const builtIn = PROVIDERS.find(({ name }) => name === entry.name);
3954
+ if (builtIn) {
3955
+ if (entry.imported === true && builtIn.imported !== true)
3956
+ invalid5(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
3957
+ return builtIn.imported === true;
3958
+ }
3959
+ if (held === void 0)
3960
+ return entry.imported === true;
3961
+ if (entry.imported === true && held.imported !== true)
3962
+ invalid5(`provider ${entry.name} was registered without imported: an entry cannot make it import-only later`);
3963
+ return held.imported === true;
3964
+ }, "importedOf");
3965
+ var isImportedProvider = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.imported === true, "isImportedProvider");
3966
+ var holdsKind = /* @__PURE__ */ __name((provider, kind2) => kindsIn(provider).includes(kind2), "holdsKind");
3967
+ var holdsKindOf = /* @__PURE__ */ __name((provider, kind2) => kindIn(provider) === void 0 ? kind2 === "messages" : holdsKind(provider, kind2), "holdsKindOf");
3968
+ var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
3969
+
3970
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/search/query.js
3971
+ var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
3972
+ 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");
3973
+ var fail = /* @__PURE__ */ __name((message) => {
3974
+ throw new CliError("validation_error", message);
3975
+ }, "fail");
3976
+ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
3977
+ const sources = [...providers2, "personal", "bots", "all"];
3978
+ const source = value.toLowerCase();
3979
+ if (sources.includes(source))
3980
+ return source;
3981
+ if (source === "mail")
3982
+ return "email";
3983
+ if (source === "messages")
3984
+ return source;
3985
+ if (isKind(source))
3986
+ fail(`${name}${source} names ${source}, which a message search does not read \u2014 search ${source === "meetings" || source === "events" ? `all --source ${source}` : "notes"} does`);
3987
+ const named = providerNamed(source);
3988
+ if (named && providers2.includes(named.name))
3989
+ return named.name;
3990
+ return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
3991
+ }, "sourceOf");
3992
+
3993
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/search/account-list.js
3994
+ var ACCOUNT_GROUPS = "accountGroups";
3995
+ var ACCOUNT_GROUPS_SETTING = "account_groups";
3996
+ var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
3997
+ var fail2 = /* @__PURE__ */ __name((message) => {
3998
+ throw new CliError("validation_error", message);
3999
+ }, "fail");
4000
+ var isAccountList = /* @__PURE__ */ __name((value) => value.includes(",") || value.includes(":"), "isAccountList");
4001
+ var itemsOf = /* @__PURE__ */ __name((value) => {
4002
+ const items = value.split(",").map((item) => item.trim());
4003
+ if (items.some((item) => item === ""))
4004
+ fail2(`"${value}" has an empty entry \u2014 separate accounts with one comma`);
4005
+ return items;
4006
+ }, "itemsOf");
4007
+ var isGroupName = /* @__PURE__ */ __name((name) => GROUP_NAME.test(name), "isGroupName");
4008
+ var groupName = /* @__PURE__ */ __name((name) => isGroupName(name) ? name : fail2(`a group name is letters, digits, - and _ \u2014 not "${name}"`), "groupName");
4009
+ 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");
4010
+ var describe2 = /* @__PURE__ */ __name((accounts) => accounts.map(({ provider, account, name }) => `${provider}:${account}${name ? ` (${name})` : ""}`).join(", "), "describe");
4011
+ var listedHolds = /* @__PURE__ */ __name((account, kind2) => (account.kinds ?? (account.kind === void 0 ? [] : [account.kind])).includes(kind2), "listedHolds");
4012
+ var kindHere = /* @__PURE__ */ __name((provider, running) => provider === running.provider ? kindOf(provider) : kindIn(provider), "kindHere");
4013
+ var kindsOfHere = /* @__PURE__ */ __name((provider, running) => {
4014
+ const kinds = kindsIn(provider);
4015
+ return { kind: kindHere(provider, running), ...kinds.length > 1 ? { kinds } : {} };
4016
+ }, "kindsOfHere");
4017
+ var heldOf = /* @__PURE__ */ __name((stored, running) => [
4018
+ ...stored.filter(({ provider }) => kindIn(provider) !== "notes" && !isDocumentAccountProvider(provider)).map(({ provider, account, name }) => ({ provider, account, name, ...kindsOfHere(provider, running) })),
4019
+ { provider: "notes", account: INTERNAL_NOTES, name: null, kind: "notes" },
4020
+ ...stored.filter(({ provider }) => isFolderProvider(provider)).map(({ id: id5, name, provider, account }) => ({
4021
+ provider: "notes",
4022
+ account: String(id5),
4023
+ name,
4024
+ kind: "notes",
4025
+ stored: { provider, account }
4026
+ })),
4027
+ ...stored.filter(({ provider }) => isDocumentAccountProvider(provider) || provider === ADDED_PROVIDER).map(({ id: id5, provider, account, name }) => ({
4028
+ provider: "notes",
4029
+ account: String(id5),
4030
+ name,
4031
+ kind: "notes",
4032
+ stored: { provider, account }
4033
+ }))
4034
+ ], "heldOf");
4035
+ var storedAs = /* @__PURE__ */ __name((held, key) => held.filter(({ stored }) => stored?.provider === key.provider && (key.account === "" || stored.account === key.account)), "storedAs");
4036
+ var registry2 = /* @__PURE__ */ __name(() => providers().map(({ name, aliases }) => aliases.length ? `${name} (${aliases.join(", ")})` : name).join(", "), "registry");
4037
+ var providerOf = /* @__PURE__ */ __name((prefix, held, { running, profiles }) => {
4038
+ const wanted = prefix.toLowerCase();
4039
+ if (wanted === running.command?.toLowerCase())
4040
+ return running.provider;
4041
+ const providers2 = [...new Set(held.map(({ provider }) => provider))];
4042
+ if (providers2.includes(wanted) || isDocumentAccountProvider(wanted))
4043
+ return wanted;
4044
+ const named = providerNamed(wanted);
4045
+ if (named)
4046
+ return named.name;
4047
+ const recorded = Object.values(profiles[wanted] ?? {})[0];
4048
+ if (recorded)
4049
+ return recorded.provider;
4050
+ return fail2(`${prefix} is not a provider \u2014 they are ${registry2()}; the store holds ${providers2.join(", ")}`);
4051
+ }, "providerOf");
4052
+ var profilesOf = /* @__PURE__ */ __name((provider, profiles) => Object.values(profiles).flatMap((named) => Object.entries(named).filter(([, key]) => key.provider === provider)), "profilesOf");
4053
+ var accountOf = /* @__PURE__ */ __name((prefix, ref, held, context3) => {
4054
+ const provider = providerOf(prefix, held, context3);
4055
+ if (isDocumentAccountProvider(provider) && !context3.profiles[prefix.toLowerCase()]?.[ref]) {
4056
+ const stored = storedAs(held, { provider, account: ref })[0];
4057
+ if (stored)
4058
+ return stored;
4059
+ }
4060
+ const folder = isFolderProvider(provider);
4061
+ const ofProvider = folder ? storedAs(held, { provider, account: "" }) : held.filter((one) => one.provider === provider);
4062
+ const byId = ofProvider.find(({ account, stored }) => account === ref || account === ref.toLowerCase() || folder && stored?.account === ref.toUpperCase());
4063
+ if (byId)
4064
+ return byId;
4065
+ const keyed = /* @__PURE__ */ __name((key) => ofProvider.find(({ account }) => account === key.account) ?? {
4066
+ ...key,
4067
+ name: null,
4068
+ ...kindsOfHere(key.provider, context3.running)
4069
+ }, "keyed");
4070
+ const recorded = context3.profiles[prefix.toLowerCase()]?.[ref];
4071
+ if (recorded && isFolderProvider(recorded.provider)) {
4072
+ const folder2 = held.find((one) => one.provider === "notes" && one.name === recorded.account);
4073
+ if (folder2)
4074
+ return folder2;
4075
+ return fail2(`no stored folder for ${prefix}:${ref}; sync that profile first`);
4076
+ }
4077
+ if (recorded && isDocumentAccountProvider(recorded.provider)) {
4078
+ const account = storedAs(held, recorded)[0];
4079
+ if (account)
4080
+ return account;
4081
+ return fail2(`no stored documents for ${prefix}:${ref}; sync that profile first`);
4082
+ }
4083
+ if (recorded)
4084
+ return keyed(recorded);
4085
+ const byProfile = [
4086
+ ...new Map(profilesOf(provider, context3.profiles).filter(([name]) => name === ref).map(([, key]) => [key.account, key])).values()
4087
+ ];
4088
+ if (byProfile.length === 1)
4089
+ return keyed(byProfile[0]);
4090
+ const byName = ofProvider.filter(({ name }) => name?.toLowerCase() === ref.toLowerCase());
4091
+ if (byName.length === 1)
4092
+ return byName[0];
4093
+ if (byName.length > 1 || byProfile.length > 1)
4094
+ fail2(`${provider}:${ref} names more than one account \u2014 use the id: ${describe2(ofProvider)}`);
4095
+ const names = profilesOf(provider, context3.profiles).map(([name]) => name);
4096
+ return fail2(`no ${provider} account "${ref}" \u2014 the store holds ${describe2(ofProvider) || "none"}` + (names.length ? `; profiles: ${[...new Set(names)].join(", ")}` : ""));
4097
+ }, "accountOf");
4098
+ var accountsOfWord = /* @__PURE__ */ __name((word, held, context3) => {
4099
+ const wanted = word.toLowerCase();
4100
+ if (wanted === "all")
4101
+ return [...held];
4102
+ if (wanted === "personal" || wanted === "bots")
4103
+ return held.filter((one) => listedHolds(one, "messages") && isBotProvider(one.provider) === (wanted === "bots"));
4104
+ if (isKind(wanted))
4105
+ return held.filter((one) => listedHolds(one, wanted));
4106
+ const recorded = context3.profiles[wanted];
4107
+ if (recorded && Object.values(recorded).every((key) => isFolderProvider(key.provider) || isDocumentAccountProvider(key.provider)))
4108
+ return Object.keys(recorded).map((profile) => accountOf(word, profile, held, context3));
4109
+ const provider = providerOf(word, held, context3);
4110
+ if (isDocumentAccountProvider(provider) || isFolderProvider(provider))
4111
+ return storedAs(held, { provider, account: "" });
4112
+ return held.filter((one) => one.provider === provider);
4113
+ }, "accountsOfWord");
4114
+ var keyOf = /* @__PURE__ */ __name(({ provider, account }) => `${provider}\0${account}`, "keyOf");
4115
+ var sourceOf2 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "sourceOf");
4116
+ var sameAs = /* @__PURE__ */ __name((key) => (one) => one.provider === key.provider && one.account === key.account, "sameAs");
4117
+ var entriesOfList = /* @__PURE__ */ __name((value, context3) => {
4118
+ const held = heldOf(context3.held, context3.running);
4119
+ const entries = [];
4120
+ const entry = /* @__PURE__ */ __name((item, group) => {
4121
+ const colon = item.indexOf(":");
4122
+ if (colon === -1) {
4123
+ try {
4124
+ entries.push({ entry: item, accounts: accountsOfWord(item, held, context3) });
4125
+ } catch (error) {
4126
+ if (!group || !(error instanceof CliError))
4127
+ throw error;
4128
+ fail2(`"${item}" in group ${group}: ${error.message}`);
4129
+ }
4130
+ return;
4131
+ }
4132
+ const prefix = item.slice(0, colon);
4133
+ const ref = item.slice(colon + 1).trim();
4134
+ if (ref === "")
4135
+ fail2(`"${item}" names no account after the colon`);
4136
+ if (prefix.toLowerCase() === "group") {
4137
+ if (group)
4138
+ fail2(`group ${group} lists another group \u2014 a group lists accounts`);
4139
+ const members = context3.groups[ref];
4140
+ if (!members) {
4141
+ const known = Object.keys(context3.groups);
4142
+ fail2(`no account group "${ref}" \u2014 ${known.length ? `there are ${known.join(", ")}` : "none saved yet"}; \`config set ${ACCOUNT_GROUPS_SETTING}.${ref} <accounts>\` saves one`);
4143
+ }
4144
+ for (const member of members)
4145
+ entry(member, ref);
4146
+ return;
4147
+ }
4148
+ entries.push({ entry: item, accounts: [accountOf(prefix, ref, held, context3)] });
4149
+ }, "entry");
4150
+ for (const item of itemsOf(value))
4151
+ entry(item);
4152
+ const { only } = context3;
4153
+ return entries.map(({ entry: entry2, accounts }) => ({
4154
+ entry: entry2,
4155
+ accounts: accounts.filter((one) => only === void 0 || only.has(keyOf(one))).map(({ provider, account, kind: kind2, kinds }) => ({
4156
+ provider,
4157
+ account,
4158
+ kind: kind2,
4159
+ ...kinds === void 0 ? {} : { kinds }
4160
+ }))
4161
+ }));
4162
+ }, "entriesOfList");
4163
+ var accountsOfList = /* @__PURE__ */ __name((value, context3) => {
4164
+ const chosen = /* @__PURE__ */ new Map();
4165
+ for (const { accounts } of entriesOfList(value, context3))
4166
+ for (const one of accounts)
4167
+ if (!chosen.has(keyOf(one)))
4168
+ chosen.set(keyOf(one), one);
4169
+ return [...chosen.values()];
4170
+ }, "accountsOfList");
4171
+ var READS = {
4172
+ messages: "messenger messages \u2014 search messages reads them",
4173
+ mail: "a mailbox \u2014 memo search mail reads it",
4174
+ notes: "notes \u2014 search notes reads them",
4175
+ documents: "documents \u2014 search notes reads them",
4176
+ meetings: "meetings \u2014 search all reads them",
4177
+ events: "calendar events \u2014 no search reads them yet",
4178
+ crm: "CRM deals and leads \u2014 search all reads them"
4179
+ };
4180
+ var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf = (kind2) => READS[kind2], alsoFits = () => false) => {
4181
+ const chosen = /* @__PURE__ */ new Map();
4182
+ const skipped = [];
4183
+ for (const { entry, accounts } of entries) {
4184
+ const fits = accounts.filter((one) => kinds.some((kind2) => listedHolds(one, kind2)) || alsoFits(one));
4185
+ for (const { provider, account } of fits)
4186
+ if (!chosen.has(keyOf({ provider, account })))
4187
+ chosen.set(keyOf({ provider, account }), { provider, account });
4188
+ const known = accounts.filter(({ kind: kind2 }) => kind2 !== void 0);
4189
+ const unknown2 = accounts.filter((one) => one.kind === void 0 && !alsoFits(one));
4190
+ if (known.length)
4191
+ for (const { provider, account } of unknown2)
4192
+ skipped.push({ source: `${provider}:${account}`, code: "not_found", reason: UNKNOWN_PROVIDER });
4193
+ if (fits.length)
4194
+ continue;
4195
+ const other = known[0];
4196
+ 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" });
4197
+ }
4198
+ if (chosen.size === 0)
4199
+ fail2(`--source names nothing ${what} reads: ${skipped.map(({ source, reason }) => `${source} (${reason})`).join(", ")}`);
4200
+ return { accounts: [...chosen.values()], skipped };
4201
+ }, "fitting");
4202
+
4203
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/deals.js
3071
4204
  var DEAL_KINDS = ["deal", "lead"];
3072
4205
  var DEAL_STATUSES = ["open", "won", "lost"];
3073
4206
  var STAGE_OUTCOMES = DEAL_STATUSES;
@@ -3077,17 +4210,18 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
3077
4210
  return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
3078
4211
  }, "dealLine");
3079
4212
 
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
4213
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/orders.js
3081
4214
  var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
3082
4215
  var ORDER_PURPOSES = ["personal", "business", "client", "other"];
3083
4216
  var orderLine = /* @__PURE__ */ __name((order) => {
4217
+ const party = order.direction === "sale" && order.customerName !== null ? `to ${order.customerName}` : order.supplierName;
3084
4218
  const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
3085
4219
  const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
3086
- return `${order.number ?? `#${order.id}`} \xB7 ${order.supplierName}${money} (${notes2})`;
4220
+ return `${order.number ?? `#${order.id}`} \xB7 ${party}${money} (${notes2})`;
3087
4221
  }, "orderLine");
3088
4222
  var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
3089
4223
 
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
4224
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/relations.js
3091
4225
  var ORGANIZATION_ROLES = [
3092
4226
  "employee",
3093
4227
  "contractor",
@@ -3098,6 +4232,21 @@ var ORGANIZATION_ROLES = [
3098
4232
  "contact"
3099
4233
  ];
3100
4234
  var PROJECT_ROLES = ["owner", "manager", "contributor", "client-contact", "approver"];
4235
+ var CONTRACT_ROLES = ["customer", "supplier", "signatory", "guarantor"];
4236
+ var RELATED_ROLES = ["colleague", "adviser", "investor", "mentor", "family", "friend"];
4237
+ var ENGAGEMENT_LEVELS = ["none", "low", "medium", "high"];
4238
+ var isEngagement = /* @__PURE__ */ __name((value) => typeof value === "string" && ENGAGEMENT_LEVELS.includes(value), "isEngagement");
4239
+ var checkEngagement = /* @__PURE__ */ __name((kind2, from, to, level) => {
4240
+ if (kind2 !== "member-of" || from !== "person" || to !== "project")
4241
+ throw new CliError("validation_error", "an engagement level is set only on a person's member-of a project", {
4242
+ reason: "relationship.engagement-ends"
4243
+ });
4244
+ if (!isEngagement(level))
4245
+ throw new CliError("validation_error", `an engagement level is one of ${ENGAGEMENT_LEVELS.join(", ")}`, {
4246
+ reason: "relationship.engagement-unknown"
4247
+ });
4248
+ return level;
4249
+ }, "checkEngagement");
3101
4250
  var RELATIONS = {
3102
4251
  "member-of": {
3103
4252
  from: ["person", "organization", "project", "chat", "email_thread"],
@@ -3108,46 +4257,58 @@ var RELATIONS = {
3108
4257
  "customer-of": { from: ["person", "organization"], to: ["organization"], inverse: "supplier of" },
3109
4258
  "partner-of": { from: ["organization"], to: ["organization"], symmetric: true },
3110
4259
  "related-to": {
3111
- from: ["person", "organization", "project", "task", "deal", "lead"],
4260
+ from: ["person", "organization", "project", "task", "deal", "lead", "contract"],
3112
4261
  to: ["person", "organization", "project", "task"],
3113
- roles: { from: { deal: DEAL_ROLES, lead: DEAL_ROLES } }
4262
+ roles: { from: { deal: DEAL_ROLES, lead: DEAL_ROLES, contract: CONTRACT_ROLES } }
3114
4263
  }
3115
4264
  };
3116
4265
  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");
4266
+ var specOf = /* @__PURE__ */ __name((kind2) => Object.hasOwn(RELATIONS, kind2) ? RELATIONS[kind2] : void 0, "specOf");
4267
+ var isRelationKind = /* @__PURE__ */ __name((kind2) => specOf(kind2) !== void 0, "isRelationKind");
3119
4268
  var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
3120
- var checkEnds = /* @__PURE__ */ __name((kind, from, to) => {
3121
- const spec = specOf(kind);
4269
+ var partyOnly = /* @__PURE__ */ __name((from, to) => from === "contract" && to !== "person" && to !== "organization", "partyOnly");
4270
+ var checkEnds = /* @__PURE__ */ __name((kind2, from, to) => {
4271
+ const spec = specOf(kind2);
3122
4272
  if (!spec)
3123
4273
  throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
3124
- if (memberOnly(from) && (kind !== "member-of" || to !== "project"))
4274
+ if (memberOnly(from) && (kind2 !== "member-of" || to !== "project"))
3125
4275
  throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
4276
+ if (partyOnly(from, to))
4277
+ throw new CliError("validation_error", "a contract is related only to a person or an organization");
3126
4278
  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}`);
4279
+ throw new CliError("validation_error", `${kind2} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
3128
4280
  return spec;
3129
4281
  }, "checkEnds");
3130
- var rolesOf = /* @__PURE__ */ __name((kind, from, to) => {
3131
- const spec = specOf(kind);
3132
- if (kind === "member-of" && from !== "person")
4282
+ var isParty = /* @__PURE__ */ __name((type) => type === "person" || type === "organization", "isParty");
4283
+ var rolesOf = /* @__PURE__ */ __name((kind2, from, to) => {
4284
+ const spec = specOf(kind2);
4285
+ if (kind2 === "member-of" && from !== "person")
3133
4286
  return void 0;
3134
4287
  return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
3135
4288
  }, "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);
4289
+ var ROLE_LISTS = {
4290
+ organization: ORGANIZATION_ROLES,
4291
+ project: PROJECT_ROLES,
4292
+ deal: DEAL_ROLES,
4293
+ contract: CONTRACT_ROLES,
4294
+ related: RELATED_ROLES
4295
+ };
4296
+ var roleListOf = /* @__PURE__ */ __name((kind2, from, to) => {
4297
+ if (kind2 === "related-to" && isParty(from) && isParty(to))
4298
+ return "related";
4299
+ const roles = rolesOf(kind2, from, to);
3139
4300
  return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
3140
4301
  }, "roleListOf");
3141
- var checkRole = /* @__PURE__ */ __name((kind, from, to, role, extra = []) => {
3142
- const roles = rolesOf(kind, from, to)?.concat(extra);
4302
+ var checkRole = /* @__PURE__ */ __name((kind2, from, to, role, extra = []) => {
4303
+ const roles = rolesOf(kind2, from, to)?.concat(extra);
3143
4304
  if (roles && !roles.includes(role))
3144
- throw new CliError("validation_error", `a ${from}'s role on ${kind} ${to} is one of ${roles.join(", ")}`, {
4305
+ throw new CliError("validation_error", `a ${from}'s role on ${kind2} ${to} is one of ${roles.join(", ")}`, {
3145
4306
  reason: "relationship.role-unknown"
3146
4307
  });
3147
4308
  return role;
3148
4309
  }, "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");
4310
+ var isSymmetric = /* @__PURE__ */ __name((kind2) => specOf(kind2)?.symmetric === true, "isSymmetric");
4311
+ var inverseOf = /* @__PURE__ */ __name((kind2) => specOf(kind2)?.symmetric ? kind2 : specOf(kind2)?.inverse ?? null, "inverseOf");
3151
4312
  var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
3152
4313
  var standingOf = /* @__PURE__ */ __name((link, now) => {
3153
4314
  if (link.endsAt != null && link.endsAt <= now)
@@ -3159,10 +4320,20 @@ var standingOf = /* @__PURE__ */ __name((link, now) => {
3159
4320
  return link.accountId != null ? "reported" : "proposed";
3160
4321
  }, "standingOf");
3161
4322
  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");
4323
+ var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL";
4324
+ 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");
3163
4325
  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
4326
 
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
4327
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/crm.js
4328
+ var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
4329
+ var isCrmUserId = /* @__PURE__ */ __name((id5) => /^\d{1,20}$/.test(id5), "isCrmUserId");
4330
+ var normalCrmUserId = /* @__PURE__ */ __name((id5) => {
4331
+ const text7 = id5.trim();
4332
+ return /^\d+$/.test(text7) ? text7.replace(/^0+(?=\d)/, "") : text7;
4333
+ }, "normalCrmUserId");
4334
+ var isItemKind = /* @__PURE__ */ __name((kind2) => kind2 === "deal" || kind2 === "lead", "isItemKind");
4335
+
4336
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/domain/tags.js
3166
4337
  var TAG_TYPES = ["chat", "contact", "message", "task"];
3167
4338
  var TAG = /^[a-z0-9-]{1,32}$/;
3168
4339
  var tagOf = /* @__PURE__ */ __name((value) => {
@@ -3176,7 +4347,17 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
3176
4347
  return tag;
3177
4348
  }, "normalizeTag");
3178
4349
 
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
4350
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/store/sqlite/link-source.js
4351
+ var REPORTER_SQL = "(SELECT provider || ':' || external_id FROM accounts r WHERE r.id = links.account_id) AS reporter";
4352
+ var sourceOf3 = /* @__PURE__ */ __name((database, row, metadata) => {
4353
+ 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;
4354
+ return {
4355
+ ...typeof reporter === "string" ? { account: reporter } : {},
4356
+ ...typeof metadata.derived === "string" ? { derived: metadata.derived } : {}
4357
+ };
4358
+ }, "sourceOf");
4359
+
4360
+ // node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
3180
4361
  var LINK_KINDS = [
3181
4362
  "links-to",
3182
4363
  "blocked-by",
@@ -3197,10 +4378,38 @@ var LINK_KINDS = [
3197
4378
  ];
3198
4379
  var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
3199
4380
  var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
3200
- var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
4381
+ var linkKind = /* @__PURE__ */ __name((kind2) => `'${kind2}'`, "linkKind");
3201
4382
  var COUNTERPART_ROLE = "counterpart";
3202
4383
 
3203
4384
  export {
4385
+ logAttributes,
4386
+ fromLogAttributes,
4387
+ snakeLogger,
4388
+ LOG_ATTRIBUTES,
4389
+ KEEP_RUNS_FOR_DAYS,
4390
+ KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
4391
+ KEEP_STORE_RUNS_FOR_DAYS,
4392
+ RUNS_SIZE_LIMIT_MB,
4393
+ runsDirFor,
4394
+ startRun,
4395
+ runtime,
4396
+ newRunId,
4397
+ listRuns,
4398
+ findRun,
4399
+ readEvents,
4400
+ pruneRuns,
4401
+ asOwnProcess,
4402
+ currentRun,
4403
+ inRun,
4404
+ runEvent,
4405
+ typedCommand,
4406
+ useAsProcessRun,
4407
+ processRun,
4408
+ enclosingTraceId,
4409
+ traceOf,
4410
+ childTrace,
4411
+ withAttempt,
4412
+ currentAttempt,
3204
4413
  formatMeetingReference,
3205
4414
  parseMeetingReference,
3206
4415
  canonicalMeetingReference,
@@ -3238,6 +4447,7 @@ export {
3238
4447
  meetingTimestamp,
3239
4448
  findingText,
3240
4449
  findingHash,
4450
+ snakeCase,
3241
4451
  findingFields,
3242
4452
  findingNeeds,
3243
4453
  validEvidence,
@@ -3288,6 +4498,44 @@ export {
3288
4498
  validateMeetingSeriesInventoryCursor,
3289
4499
  aggregateMeetingCounts,
3290
4500
  aggregateMeetingStats,
4501
+ READ_BUDGET_EXCEEDED,
4502
+ SOURCE_REVIEW_KIND,
4503
+ SOURCE_REVIEW_CAUSES,
4504
+ ERASED_TEXT,
4505
+ severity,
4506
+ graver,
4507
+ text6 as text,
4508
+ id4 as id,
4509
+ time,
4510
+ zonedTime,
4511
+ count6 as count,
4512
+ untrusted,
4513
+ providerMetadata,
4514
+ evidenceSource,
4515
+ sourceReview,
4516
+ author,
4517
+ TASK_KINDS,
4518
+ TASK_STATES,
4519
+ CLOSED_STATES,
4520
+ TASK_ORIGINS,
4521
+ TASK_VERDICTS,
4522
+ isClosedState,
4523
+ PRIORITY_LABELS,
4524
+ priorityLabel,
4525
+ priorityBand,
4526
+ legacyPriority,
4527
+ checkedScore,
4528
+ priorityOf,
4529
+ priorityOption,
4530
+ createTaskService,
4531
+ matches,
4532
+ FACT_STATUSES,
4533
+ MEMORY_KINDS,
4534
+ MEMORY_STATUSES,
4535
+ MEMORY_SCOPES,
4536
+ WORK_TASK_TYPES,
4537
+ TASK_TYPES2 as TASK_TYPES,
4538
+ CATEGORIES,
3291
4539
  parseDecimal,
3292
4540
  formatDecimal,
3293
4541
  currencyOf,
@@ -3298,6 +4546,11 @@ export {
3298
4546
  moneyLabel,
3299
4547
  quantityOf,
3300
4548
  lineUnits,
4549
+ DEAL_KINDS,
4550
+ DEAL_STATUSES,
4551
+ STAGE_OUTCOMES,
4552
+ DEAL_ROLES,
4553
+ dealLine,
3301
4554
  INVOICE_DIRECTIONS,
3302
4555
  INVOICE_STATUSES,
3303
4556
  MONEY_DIRECTIONS,
@@ -3307,29 +4560,12 @@ export {
3307
4560
  paymentLine,
3308
4561
  invoiceTitle,
3309
4562
  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
4563
  ORDER_STATUSES,
3330
4564
  ORDER_PURPOSES,
3331
4565
  orderLine,
3332
4566
  orderTitle,
4567
+ isEngagement,
4568
+ checkEngagement,
3333
4569
  RELATION_KINDS,
3334
4570
  isRelationKind,
3335
4571
  checkEnds,
@@ -3342,55 +4578,98 @@ export {
3342
4578
  STANDINGS,
3343
4579
  standingOf,
3344
4580
  isUsable,
4581
+ KEYED,
3345
4582
  notOverriddenSql,
3346
4583
  usableLinkSql,
4584
+ CRM_ACTIVITY_KINDS,
4585
+ isCrmUserId,
4586
+ normalCrmUserId,
4587
+ isItemKind,
4588
+ organization,
4589
+ project,
4590
+ reminder,
4591
+ CATALOG_KINDS,
4592
+ BUSINESS_KINDS,
4593
+ CONTRACT_KINDS,
4594
+ CONTRACT_STATUSES,
4595
+ SUBSCRIPTION_STATUSES,
4596
+ WALLET_KINDS,
4597
+ TRANSACTION_STATUSES,
4598
+ ORDER_DIRECTIONS,
4599
+ intervalOf,
4600
+ productLine,
4601
+ contractLine,
4602
+ subscriptionLine,
4603
+ walletLine,
4604
+ transactionLine,
3347
4605
  TAG_TYPES,
3348
4606
  tagOf,
3349
4607
  normalizeTag,
4608
+ REPORTER_SQL,
4609
+ sourceOf3 as sourceOf,
3350
4610
  LINK_KINDS,
3351
4611
  LINK_ORIGINS,
3352
4612
  LINK_SOURCES,
3353
4613
  linkKind,
3354
4614
  COUNTERPART_ROLE,
3355
- TASK_KINDS,
3356
- TASK_STATES,
3357
- CLOSED_STATES,
3358
- TASK_ORIGINS,
3359
- TASK_VERDICTS,
3360
- isClosedState,
3361
- PRIORITY_LABELS,
3362
- priorityLabel,
3363
- priorityBand,
3364
- legacyPriority,
3365
- checkedScore,
3366
- priorityOf,
3367
- priorityOption,
3368
- createTaskService,
3369
- matches,
3370
- FACT_STATUSES,
3371
- MEMORY_KINDS,
3372
- MEMORY_STATUSES,
3373
- MEMORY_SCOPES,
3374
- WORK_TASK_TYPES,
3375
- TASK_TYPES2 as TASK_TYPES,
3376
- text6 as text,
3377
- id4 as id,
3378
- time,
3379
- zonedTime,
3380
- count6 as count,
3381
- untrusted,
3382
- providerMetadata,
3383
- evidenceSource,
3384
- author,
3385
- organization,
3386
- project,
3387
- reminder,
3388
4615
  damageMarkPath,
3389
4616
  healthMarkPath,
4617
+ journalMarkPath,
3390
4618
  markStoreDamaged,
3391
4619
  readDamageMark,
3392
4620
  clearDamageMark,
3393
4621
  refuseDamagedStore,
4622
+ markJournalLost,
4623
+ readJournalMark,
3394
4624
  readHealthMark,
3395
- recordDeepCheck
4625
+ recordDeepCheck,
4626
+ formatLocator,
4627
+ isLocator,
4628
+ parseLocator,
4629
+ SIMPLE_REFERENCES,
4630
+ formatReference,
4631
+ parseReference,
4632
+ canonicalReference,
4633
+ looksLikeReference,
4634
+ providerLabel,
4635
+ isFolderProvider,
4636
+ folderProviderSql,
4637
+ folderProviderOf,
4638
+ DOCUMENT_ACCOUNT_PROVIDERS,
4639
+ isDocumentAccountProvider,
4640
+ ADDED_PROVIDER,
4641
+ ADDED_ACCOUNT,
4642
+ notAdded,
4643
+ filesAccountSql,
4644
+ INTERNAL_NOTES,
4645
+ UNKNOWN_PROVIDER,
4646
+ providerEntryOf,
4647
+ kindsOfEntry,
4648
+ unitedKinds,
4649
+ providers,
4650
+ useStoredProviders,
4651
+ addProvider,
4652
+ isKind,
4653
+ providerNamed,
4654
+ kindIn,
4655
+ importedOf,
4656
+ isImportedProvider,
4657
+ holdsKind,
4658
+ holdsKindOf,
4659
+ isBotProvider,
4660
+ inSource,
4661
+ sourceOf as sourceOf2,
4662
+ ACCOUNT_GROUPS,
4663
+ ACCOUNT_GROUPS_SETTING,
4664
+ isAccountList,
4665
+ isGroupName,
4666
+ groupName,
4667
+ groupMembers,
4668
+ listedHolds,
4669
+ keyOf,
4670
+ sourceOf2 as sourceOf3,
4671
+ sameAs,
4672
+ entriesOfList,
4673
+ accountsOfList,
4674
+ fitting
3396
4675
  };