@wirecat/zoom-cli 0.69.0 → 0.71.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 (177) hide show
  1. package/README.md +1 -1
  2. package/dist/account-removal.d.ts +6 -0
  3. package/dist/account-removal.d.ts.map +1 -0
  4. package/dist/account-removal.js +43 -0
  5. package/dist/account-removal.js.map +1 -0
  6. package/dist/answer-entities.d.ts +2 -0
  7. package/dist/answer-entities.d.ts.map +1 -1
  8. package/dist/bin/zm.js +2 -2
  9. package/dist/bundle/{all-profiles-ZQWPCJEK.js → all-profiles-O4YNVPZX.js} +9 -9
  10. package/dist/bundle/answer-policy-PPSPMCLH.js +104 -0
  11. package/dist/bundle/{anthropic-7FUQ2HYJ.js → anthropic-7GGRX3RX.js} +20 -9
  12. package/dist/bundle/{app-server-DNPE2EQB.js → app-server-CPMKM3HI.js} +50 -50
  13. package/dist/bundle/{bun-ZVQFCFCC.js → bun-POHZKEPV.js} +2 -2
  14. package/dist/bundle/{bun-sqlite-EB2UMUPJ.js → bun-sqlite-PGYMBPEL.js} +4 -4
  15. package/dist/bundle/{chunk-R2ULMWB4.js → chunk-2FV5JUQU.js} +39 -593
  16. package/dist/bundle/{chunk-R3JYPY3J.js → chunk-2KESWII5.js} +2 -2
  17. package/dist/bundle/{chunk-S2EAGDS7.js → chunk-2RUAMDVV.js} +11 -11
  18. package/dist/bundle/{chunk-H3MFBYTQ.js → chunk-2U27KIKU.js} +5 -5
  19. package/dist/bundle/{chunk-KAPJQGHE.js → chunk-2U6SER67.js} +1 -1
  20. package/dist/bundle/chunk-4LAQDZXU.js +1635 -0
  21. package/dist/bundle/{chunk-SQT47CFW.js → chunk-4QPQ7MDA.js} +1 -1
  22. package/dist/bundle/{chunk-MNOVYS43.js → chunk-4QUFFB2U.js} +3 -3
  23. package/dist/bundle/{chunk-V74QFMSL.js → chunk-54YDWBYG.js} +1 -1
  24. package/dist/bundle/{chunk-MSDCZ6GT.js → chunk-5J4AMBMM.js} +4 -4
  25. package/dist/bundle/{chunk-GR3QDHBU.js → chunk-5K7OGPGA.js} +5 -5
  26. package/dist/bundle/{chunk-WY4NYPPS.js → chunk-5LJTU4LY.js} +12 -12
  27. package/dist/bundle/{chunk-MJMVIFSC.js → chunk-633QXP57.js} +10 -8
  28. package/dist/bundle/{chunk-EPPSMCEV.js → chunk-64ZHF6PJ.js} +1 -1
  29. package/dist/bundle/{chunk-ZRHMB3LQ.js → chunk-77TCCHMP.js} +1 -1
  30. package/dist/bundle/{chunk-BOAMDYLY.js → chunk-7QC4M4HS.js} +2 -2
  31. package/dist/bundle/{chunk-O7L44JK2.js → chunk-7ROXXRGG.js} +3933 -1525
  32. package/dist/bundle/{chunk-MVDPZRFE.js → chunk-ALIT5QFT.js} +1 -1
  33. package/dist/bundle/{chunk-6N2D6JGX.js → chunk-BBTQIVFP.js} +1 -1
  34. package/dist/bundle/{chunk-QXM7S3Y3.js → chunk-BGTEVIW4.js} +5 -5
  35. package/dist/bundle/{chunk-JX5JJZC3.js → chunk-CFQF6IGY.js} +2 -2
  36. package/dist/bundle/{chunk-5GOE6PQK.js → chunk-CKPCVEXU.js} +5 -5
  37. package/dist/bundle/{chunk-6KMTQX3D.js → chunk-CRFOGYDG.js} +1 -1
  38. package/dist/bundle/{chunk-5H6VTEEC.js → chunk-CT4WVR4N.js} +2 -2
  39. package/dist/bundle/{chunk-3TPRYZUW.js → chunk-DHWBSXG3.js} +23 -23
  40. package/dist/bundle/{chunk-IPBZKUC3.js → chunk-DIQLXAAZ.js} +3 -3
  41. package/dist/bundle/{chunk-JZ4YOAHA.js → chunk-DK6ICIGL.js} +4558 -1670
  42. package/dist/bundle/{chunk-OSBHEM2A.js → chunk-DRBQDCDU.js} +10 -10
  43. package/dist/bundle/{chunk-G6IX2MD2.js → chunk-DSVZEXYJ.js} +1104 -948
  44. package/dist/bundle/{chunk-B6JMVB6R.js → chunk-EOSVN2ER.js} +1 -1
  45. package/dist/bundle/{chunk-MOTKS7XG.js → chunk-FSHCAWZS.js} +29354 -16490
  46. package/dist/bundle/{chunk-TKXLWFM2.js → chunk-GGS6D4W4.js} +3 -3
  47. package/dist/bundle/{chunk-4APZQYCH.js → chunk-GL3MYFMX.js} +4 -4
  48. package/dist/bundle/{chunk-LDRQ5NAP.js → chunk-GXF5HFFP.js} +3 -3
  49. package/dist/bundle/{chunk-5ZF6QVMC.js → chunk-HB6XJQ3Y.js} +4 -4
  50. package/dist/bundle/{chunk-QW5VPZEH.js → chunk-I4DFFR7F.js} +23 -1
  51. package/dist/bundle/{chunk-DHD25JII.js → chunk-IAV5BG3I.js} +1 -1
  52. package/dist/bundle/{chunk-52DCABMU.js → chunk-IED3NS7G.js} +30 -38
  53. package/dist/bundle/{chunk-LQX74VKG.js → chunk-INVTDIF6.js} +1 -1
  54. package/dist/bundle/{chunk-CKK6JOC4.js → chunk-KMV7GZB6.js} +2 -2
  55. package/dist/bundle/{chunk-XRZDYWF6.js → chunk-LE7MDAQG.js} +2 -2
  56. package/dist/bundle/{chunk-B5D7NZI7.js → chunk-M76MXMLY.js} +1 -1
  57. package/dist/bundle/{chunk-37B7A4RP.js → chunk-MEED7YFG.js} +1 -1
  58. package/dist/bundle/{chunk-LEA4BGK7.js → chunk-MRI6QMZ3.js} +11 -11
  59. package/dist/bundle/{chunk-6TICX3MN.js → chunk-MW4EGDDV.js} +2 -2
  60. package/dist/bundle/{chunk-SZ3Z4ZNO.js → chunk-N2FNMION.js} +1 -1
  61. package/dist/bundle/{chunk-CUZHKYC2.js → chunk-OHWMIUCT.js} +450 -641
  62. package/dist/bundle/{chunk-KNE6VFHZ.js → chunk-OORMSM6O.js} +1 -1
  63. package/dist/bundle/{chunk-Z6TTGTMU.js → chunk-OWEBWDHV.js} +76 -6
  64. package/dist/bundle/{chunk-5ZJXKASF.js → chunk-P3XC6EDU.js} +17 -21
  65. package/dist/bundle/chunk-Q2SUFGSH.js +136 -0
  66. package/dist/bundle/{chunk-TFFEFEG2.js → chunk-Q3XLZIY3.js} +18 -18
  67. package/dist/bundle/{chunk-IEC4E65G.js → chunk-Q5PI72CR.js} +5 -1
  68. package/dist/bundle/{chunk-V4MM6GST.js → chunk-QTHIU7CO.js} +1 -1
  69. package/dist/bundle/{chunk-JHFP3Z5S.js → chunk-QVSLSWAL.js} +8 -8
  70. package/dist/bundle/{chunk-QLGG7S6F.js → chunk-RN4EHCC5.js} +22 -4
  71. package/dist/bundle/{chunk-BL36NSV5.js → chunk-RQG5VOGH.js} +12 -2
  72. package/dist/bundle/{chunk-RPQ3JOD3.js → chunk-SELXER2Q.js} +5 -5
  73. package/dist/bundle/{chunk-KX5MZVPX.js → chunk-TM4JSVGQ.js} +60 -53
  74. package/dist/bundle/{chunk-TN77LX6W.js → chunk-UG447QY2.js} +1 -1
  75. package/dist/bundle/{chunk-HC56J5LB.js → chunk-ULDXZ6LH.js} +66 -59
  76. package/dist/bundle/chunk-USQ23X5V.js +1227 -0
  77. package/dist/bundle/{chunk-UEZ6URJR.js → chunk-VJXHIUFP.js} +19 -19
  78. package/dist/bundle/{chunk-TWIC6JJG.js → chunk-VRH7VRTK.js} +7 -7
  79. package/dist/bundle/{chunk-NRRI37NJ.js → chunk-WOIHSQAL.js} +44 -0
  80. package/dist/bundle/{chunk-L62EJDNZ.js → chunk-X277FBTF.js} +3 -3
  81. package/dist/bundle/{chunk-XITUFTON.js → chunk-X3ZDN3U7.js} +1 -1
  82. package/dist/bundle/{chunk-GXDOTUUO.js → chunk-X4GWR6GO.js} +9 -9
  83. package/dist/bundle/chunk-XI3VIQKW.js +756 -0
  84. package/dist/bundle/{chunk-FBLUKCIR.js → chunk-XRFHQGOD.js} +1 -1
  85. package/dist/bundle/{chunk-HW5QTRFF.js → chunk-YD2RYVMK.js} +36 -36
  86. package/dist/bundle/{chunk-XJBYGMZ4.js → chunk-YPO2U2YB.js} +669 -458
  87. package/dist/bundle/{chunk-C6TEYKXV.js → chunk-ZBFL5JPT.js} +8 -7
  88. package/dist/bundle/{chunk-7AUP2WT3.js → chunk-ZBKWRYRS.js} +2 -2
  89. package/dist/bundle/{chunk-HSI7YOYK.js → chunk-ZVI6TFQR.js} +100 -43
  90. package/dist/bundle/{cli-P3BZUE6S.js → cli-KHMEUXNG.js} +123 -68
  91. package/dist/bundle/command-contract-4K6XXZYE.js +41 -0
  92. package/dist/bundle/config-EEDB632I.js +90 -0
  93. package/dist/bundle/{decode-QWOQXM7M.js → decode-7RP4HSVE.js} +4 -4
  94. package/dist/bundle/{dispatch-5MGDLOK4.js → dispatch-IZCAK47P.js} +1 -1
  95. package/dist/bundle/{dist-OUE4MF37.js → dist-BFT2SUBV.js} +87 -51
  96. package/dist/bundle/{echarts-65IMPY43.js → echarts-T2BSQ2YV.js} +2 -2
  97. package/dist/bundle/{embed-4IULBCKL.js → embed-BAS6YPDT.js} +5 -5
  98. package/dist/bundle/{embedder-JW4W6IZI.js → embedder-5XD5FCAO.js} +8 -8
  99. package/dist/bundle/{failure-CR64C4XA.js → failure-R2OIHCE5.js} +1 -1
  100. package/dist/bundle/{first-run-CH6C674R.js → first-run-23WWZ2PW.js} +8 -8
  101. package/dist/bundle/first-screen-6HFUYVFR.js +39 -0
  102. package/dist/bundle/{folders-VU4IN35Y.js → folders-ZXTOFY4T.js} +3 -3
  103. package/dist/bundle/{instructions-G5QIH2TM.js → instructions-XZPROPKY.js} +1 -1
  104. package/dist/bundle/{main-O4ZJIEWP.js → main-TZXKGL3L.js} +18 -18
  105. package/dist/bundle/{meetings-77CCAVYD.js → meetings-JB2ISPND.js} +6 -4
  106. package/dist/bundle/{node-E6VQHU4Y.js → node-A3B3MJWX.js} +2 -2
  107. package/dist/bundle/{node-sqlite-RJZ4PGLD.js → node-sqlite-QVWDLGDX.js} +5 -5
  108. package/dist/bundle/{oauth-F4JKNRW4.js → oauth-YA6IYV4O.js} +6 -6
  109. package/dist/bundle/{open-NYOGMIAA.js → open-SY7TXJBS.js} +4 -4
  110. package/dist/bundle/{openai-5U6EQTFQ.js → openai-2AU24NRN.js} +10 -10
  111. package/dist/bundle/{output-file-6COFGPUL.js → output-file-YGQYZCBJ.js} +4 -4
  112. package/dist/bundle/{process-OBWUKBMX.js → process-6HNBTJIY.js} +1 -1
  113. package/dist/bundle/{program-MU7DEJTO.js → program-77BUCJ4H.js} +132 -100
  114. package/dist/bundle/{prompt-2QWQTHWT.js → prompt-YDG73YDS.js} +6 -4
  115. package/dist/bundle/{recognize-SNUNTUC3.js → recognize-ECXDGTB7.js} +3 -3
  116. package/dist/bundle/{remote-2CTCIQGF.js → remote-K4JHGBVJ.js} +6 -6
  117. package/dist/bundle/{rerank-XDA7NJNH.js → rerank-IU2YYD4T.js} +6 -6
  118. package/dist/bundle/{run-log-NSG3DJVX.js → run-log-LFEXNZ74.js} +54 -54
  119. package/dist/bundle/{serve-TWQFHOV2.js → serve-3XWIF3HI.js} +8 -8
  120. package/dist/bundle/{server-RIQ6HMH2.js → server-56VYOHWP.js} +42 -42
  121. package/dist/bundle/server-YSTMUZ22.js +72 -0
  122. package/dist/bundle/{services-NKZQJQIV.js → services-X7IPEGQ5.js} +118 -36
  123. package/dist/bundle/{speech-ZOB76SXA.js → speech-E2OBQWYA.js} +12 -12
  124. package/dist/bundle/{state-7YYEIXQ5.js → state-4GMJYK4H.js} +5 -5
  125. package/dist/bundle/{store-OX4HRBLO.js → store-KPI7GB5Y.js} +49 -22
  126. package/dist/bundle/{store-E6RTSSNR.js → store-LA4TV4DM.js} +39 -16
  127. package/dist/bundle/store-connection-AZTIF6IH.js +83 -0
  128. package/dist/bundle/store-maintenance-command-LR572PS4.js +61 -0
  129. package/dist/bundle/{streaming-O53PIORL.js → streaming-EJ3NM2C2.js} +5 -5
  130. package/dist/bundle/{tokens-QKNEP2GJ.js → tokens-BE6CJMR5.js} +5 -5
  131. package/dist/bundle/zm.js +3 -3
  132. package/dist/bundle/{zoom-app-TSI2MGVK.js → zoom-app-QEJBTIJ4.js} +6 -6
  133. package/dist/contract-overrides.d.ts.map +1 -1
  134. package/dist/contract-overrides.js +0 -6
  135. package/dist/contract-overrides.js.map +1 -1
  136. package/dist/first-screen.d.ts.map +1 -1
  137. package/dist/first-screen.js +1 -0
  138. package/dist/first-screen.js.map +1 -1
  139. package/dist/ingestion-search-commands.d.ts.map +1 -1
  140. package/dist/ingestion-search-commands.js +0 -10
  141. package/dist/ingestion-search-commands.js.map +1 -1
  142. package/dist/meeting-integration-commands.d.ts.map +1 -1
  143. package/dist/meeting-integration-commands.js +8 -6
  144. package/dist/meeting-integration-commands.js.map +1 -1
  145. package/dist/meeting-integration.d.ts +3 -1
  146. package/dist/meeting-integration.d.ts.map +1 -1
  147. package/dist/permissions.js +1 -1
  148. package/dist/permissions.js.map +1 -1
  149. package/dist/setup-commands.d.ts.map +1 -1
  150. package/dist/setup-commands.js +11 -0
  151. package/dist/setup-commands.js.map +1 -1
  152. package/dist/store-connection.d.ts.map +1 -1
  153. package/dist/store-connection.js +4 -3
  154. package/dist/store-connection.js.map +1 -1
  155. package/dist/tokens.d.ts +2 -0
  156. package/dist/tokens.d.ts.map +1 -1
  157. package/dist/tokens.js +11 -0
  158. package/dist/tokens.js.map +1 -1
  159. package/dist/unified-search.d.ts +4 -4
  160. package/dist/unified-search.d.ts.map +1 -1
  161. package/dist/unified-search.js +1 -24
  162. package/dist/unified-search.js.map +1 -1
  163. package/dist/version.d.ts +1 -1
  164. package/dist/version.js +1 -1
  165. package/package.json +3 -3
  166. package/skills/zoom-cli/SKILL.md +2 -2
  167. package/dist/bundle/answer-policy-VBDYLUXI.js +0 -104
  168. package/dist/bundle/chunk-2SYWVIQJ.js +0 -33
  169. package/dist/bundle/chunk-6AMMTXEA.js +0 -12473
  170. package/dist/bundle/chunk-F5DYBWH7.js +0 -299
  171. package/dist/bundle/chunk-T5X4LGXE.js +0 -380
  172. package/dist/bundle/command-contract-TOLB32NJ.js +0 -41
  173. package/dist/bundle/config-4KLLIADY.js +0 -90
  174. package/dist/bundle/first-screen-OCAW5ZN6.js +0 -39
  175. package/dist/bundle/server-XO6XQQTJ.js +0 -72
  176. package/dist/bundle/store-connection-55QPNUDS.js +0 -83
  177. package/dist/bundle/store-maintenance-command-Q5MSU6OK.js +0 -62
@@ -7,7 +7,7 @@ import {
7
7
  commandPathOf,
8
8
  findCommand,
9
9
  outputOf
10
- } from "./chunk-4APZQYCH.js";
10
+ } from "./chunk-GL3MYFMX.js";
11
11
  import {
12
12
  Command,
13
13
  Help,
@@ -18,10 +18,10 @@ import {
18
18
  environmentOf,
19
19
  metaOf,
20
20
  takesProfile
21
- } from "./chunk-G6IX2MD2.js";
21
+ } from "./chunk-DSVZEXYJ.js";
22
22
  import {
23
23
  writes
24
- } from "./chunk-NRRI37NJ.js";
24
+ } from "./chunk-WOIHSQAL.js";
25
25
  import {
26
26
  CliError
27
27
  } from "./chunk-FEM2JQN2.js";
@@ -29,7 +29,7 @@ import {
29
29
  __name
30
30
  } from "./chunk-ZVVMGPBJ.js";
31
31
 
32
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
32
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
33
33
  var SECTIONS = {
34
34
  read: "Read",
35
35
  write: "Write",
@@ -80,6 +80,7 @@ var CORE_SECTIONS = {
80
80
  replies: "automate",
81
81
  runs: "automate",
82
82
  schedule: "automate",
83
+ templates: "automate",
83
84
  serve: "automate",
84
85
  server: "automate",
85
86
  account: "setup",
@@ -94,7 +95,7 @@ var CORE_SECTIONS = {
94
95
  upgrade: "setup"
95
96
  };
96
97
 
97
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
98
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
98
99
  var DESCRIPTION = 90;
99
100
  var COLUMN = 52;
100
101
  var short = /* @__PURE__ */ __name((text) => {
@@ -133,7 +134,7 @@ var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
133
134
  `;
134
135
  }, "commandsText");
135
136
 
136
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
137
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
137
138
  var ARGUMENT_KINDS = {
138
139
  chat: "chat",
139
140
  chats: "chat",
@@ -354,7 +355,7 @@ var exampleReport = /* @__PURE__ */ __name((program) => {
354
355
  return { written, generated, text };
355
356
  }, "exampleReport");
356
357
 
357
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
358
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
358
359
  var WIRECAT_TOOLS = [
359
360
  {
360
361
  command: "tg",
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  checkCancelled
5
- } from "./chunk-KAPJQGHE.js";
5
+ } from "./chunk-2U6SER67.js";
6
6
  import {
7
7
  createOutputBuffer
8
- } from "./chunk-KNE6VFHZ.js";
8
+ } from "./chunk-OORMSM6O.js";
9
9
  import {
10
10
  CliError
11
11
  } from "./chunk-FEM2JQN2.js";
@@ -23,20 +23,20 @@ import {
23
23
  tagMemberIds,
24
24
  thingOf,
25
25
  write
26
- } from "./chunk-MOTKS7XG.js";
26
+ } from "./chunk-FSHCAWZS.js";
27
27
  import {
28
28
  fold
29
- } from "./chunk-TWIC6JJG.js";
29
+ } from "./chunk-VRH7VRTK.js";
30
+ import {
31
+ damagedFile
32
+ } from "./chunk-MEED7YFG.js";
30
33
  import {
31
34
  ADDED_PROVIDER,
32
35
  filesAccountSql,
33
36
  folderProviderOf,
34
37
  folderProviderSql,
35
38
  isDocumentAccountProvider
36
- } from "./chunk-6AMMTXEA.js";
37
- import {
38
- damagedFile
39
- } from "./chunk-37B7A4RP.js";
39
+ } from "./chunk-XI3VIQKW.js";
40
40
  import {
41
41
  CliError
42
42
  } from "./chunk-FEM2JQN2.js";
@@ -44,14 +44,27 @@ import {
44
44
  __name
45
45
  } from "./chunk-ZVVMGPBJ.js";
46
46
 
47
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/damage.js
47
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/damage.js
48
48
  var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
49
49
  var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
50
50
  var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
51
51
  var WIRECAT_UNITS = ["memo-*", "mail-*", "tg-*", "max-*", "wirecat-*"];
52
52
  var seen = /* @__PURE__ */ __name((mark) => `\`${mark.command}\` found the store damaged at ${mark.at} (${mark.error})`, "seen");
53
- var explainDamage = /* @__PURE__ */ __name((health, command, mark = null) => {
54
- if (health.ok && !mark)
53
+ var journalSeen = /* @__PURE__ */ __name((store, { seen: seen2, command, at }) => {
54
+ const wal = `${store.replace(/^.*\//, "")}-wal`;
55
+ return seen2 === "shm-without-wal" ? `the store's journal file (${wal}) was missing when \`${command}\` opened the store at ${at}: another program deleted it, or a tool crashed while closing` : `the store's journal file (${wal}) was deleted or replaced by another program while \`${command}\` had the store open (${at})`;
56
+ }, "journalSeen");
57
+ var lossUnknown = /* @__PURE__ */ __name((lastOkAt, gone = false) => {
58
+ const since = lastOkAt ? `since the last deep check that passed (${lastOkAt})` : "since the store was made (no deep check that passed is on record)";
59
+ return `${gone ? "more rows may be gone" : "how many rows were lost is unknown"}: damage can take rows written ${since} without leaving a trace; a sync fetches again what the servers still hold`;
60
+ }, "lossUnknown");
61
+ var stopWriters = /* @__PURE__ */ __name((timers) => ({
62
+ command: timers?.length ? `systemctl --user stop ${timers.join(" ")}` : `systemctl --user stop ${WIRECAT_UNITS.map((unit) => `'${unit}'`).join(" ")}`,
63
+ why: "a tool that writes while the store is recovered damages the new file too",
64
+ destructive: false
65
+ }), "stopWriters");
66
+ var storeDamageReport = /* @__PURE__ */ __name(({ health, command, mark = null, journal = null, lastOkAt = null, holders = null, timers = null, sqlite3Usable = true }) => {
67
+ if (health.ok && !mark && !journal)
55
68
  return null;
56
69
  const indexNames = (health.searchIndexes ?? []).map((index) => index.name);
57
70
  const badIndexes = (health.searchIndexes ?? []).filter((index) => !index.ok).map((index) => index.name);
@@ -60,42 +73,85 @@ var explainDamage = /* @__PURE__ */ __name((health, command, mark = null) => {
60
73
  const derived = [.../* @__PURE__ */ new Set([...tables.filter((table) => isDerivedTable(table, indexNames)), ...badIndexes])];
61
74
  const unopened = health.error !== void 0;
62
75
  const json = (health.invalidJson ?? []).map(({ table, column }) => `${table}.${column}`);
63
- const checked = health.ok ? `${seen(mark)}; the quick check reads too little to see it, and a deep check that passes clears it` : unopened ? `the store file cannot be opened: ${health.error}` : health.checked === "quick" ? "the store file's header or schema is damaged" : `the store file is damaged: ${health.problems ?? 0} problems` + (sources.length ? ` in the data of ${named(sources)}` : "") + (derived.length ? `${sources.length ? ", and" : " in"} the search data of ${named(derived)}` : "") + (json.length ? `; values that are not valid JSON in ${named(json)}` : "");
64
- const what = mark && !health.ok ? `${checked}; ${seen(mark)}` : checked;
76
+ const damaged = !health.ok || mark !== null;
77
+ const folder = health.path.replace(/\/[^/]*$/, "");
78
+ const checked = !damaged ? `every page of the store reads, but ${journalSeen(health.path, journal)}; what was written into it may be lost` : health.ok ? `${seen(mark)}; the quick check reads too little to see it, and a deep check that passes clears it` : unopened ? `the store file cannot be opened: ${health.error}` : health.checked === "quick" ? "the store file's header or schema is damaged" : `the store file is damaged: ${health.problems ?? 0} problems` + (sources.length ? ` in the data of ${named(sources)}` : "") + (derived.length ? `${sources.length ? ", and" : " in"} the search data of ${named(derived)}` : "") + (json.length ? `; values that are not valid JSON in ${named(json)}` : "");
79
+ const whatHappened = mark && !health.ok ? `${checked}; ${seen(mark)}` : checked;
65
80
  const impact = [
66
81
  ...sources.length ? [`some rows of ${named(sources)} cannot be read; a recovery keeps every row it can read and names the rest`] : [],
67
82
  ...derived.length ? [`searches may miss results or fail; ${named(derived)} hold nothing that is not elsewhere, and are rebuilt`] : [],
68
83
  ...json.length ? [`a read of a row with a broken JSON value fails ("malformed JSON"); a recovery clears those values`] : [],
69
- mark ? "reads that do not touch a damaged page work; every command that writes the store refuses until it is recovered" : "reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
84
+ ...!damaged ? ["everything works; rows written while the journal was gone may be missing, and a sync fetches them again"] : mark ? [
85
+ "reads that do not touch a damaged page work; every command that writes the store refuses until it is recovered"
86
+ ] : ["reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"]
87
+ ];
88
+ const likelyCauses = [
89
+ ...journal ? [{ cause: journalSeen(health.path, journal), check: `ls -li --time-style=full-iso ${folder}/` }] : [],
90
+ ...holders?.length ? [
91
+ {
92
+ cause: `two programs wrote the file without seeing each other: ${holders.map(({ name, pid }) => `${name} (process ${pid})`).join(", ")} still ${holders.length === 1 ? "has" : "have"} it open`,
93
+ check: `fuser -v ${health.path}`
94
+ }
95
+ ] : [],
96
+ ...damaged ? [
97
+ {
98
+ cause: "the computer lost power or crashed while a tool was writing",
99
+ check: `journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`
100
+ },
101
+ { cause: "the disk filled up while a tool was writing", check: `df -h ${folder}` },
102
+ {
103
+ cause: "the file was copied, restored or synced while a tool had it open, or it sits in a synced or network folder",
104
+ check: `findmnt -T ${folder}`
105
+ },
106
+ {
107
+ cause: "a fault of the disk itself",
108
+ check: "journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata"
109
+ }
110
+ ] : []
111
+ ];
112
+ const steps = [
113
+ stopWriters(timers),
114
+ ...(holders ?? []).map(({ pid, name }) => ({
115
+ command: `kill ${pid}`,
116
+ why: `${name} (process ${pid}) has the store open`,
117
+ destructive: true
118
+ })),
119
+ ...damaged && !sqlite3Usable ? [
120
+ {
121
+ command: "sudo apt install sqlite3",
122
+ why: "the recovery copies rows with the sqlite3 program, 3.43 or newer (on macOS: brew install sqlite)",
123
+ destructive: false
124
+ }
125
+ ] : [],
126
+ ...damaged ? [
127
+ {
128
+ command: `${command} store recover run`,
129
+ why: "copies every readable row into a new file and puts it in place of the store; the damaged file is kept beside it, and it prints the syncs that fetch again what was lost",
130
+ destructive: true
131
+ }
132
+ ] : [],
133
+ {
134
+ command: `${command} store recover`,
135
+ why: "checks every page again; a check that passes lifts the damage mark",
136
+ destructive: false
137
+ }
70
138
  ];
71
139
  return {
72
- what,
73
- causes: [
74
- "the computer lost power or crashed, or the disk filled up, while a tool was writing",
75
- "the file was copied, restored or synced while a tool had it open, or it sits in a synced or network folder",
76
- "a fault of the disk itself"
77
- ],
78
- investigate: [
79
- `journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`,
80
- "journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata",
81
- `df -h ${health.path.replace(/\/[^/]*$/, "")}`,
82
- ...health.checked === "quick" || health.ok ? [`${command} store recover`] : []
83
- ],
140
+ whatHappened,
141
+ likelyCauses,
84
142
  impact,
85
- externalUnaffected: "only this computer's copy is damaged: Telegram, MAX, the mail servers and Google Drive keep their own data, so whatever is lost here can be fetched again by a sync",
86
- steps: [
87
- "stop every timer and server of the WireCat tools; `store recover run` lists the ones still running",
88
- `${command} store recover run`,
89
- "run the fetch commands it prints, then start the timers again"
90
- ]
143
+ externalDataSafe: "only this computer's copy is damaged: Telegram, MAX, WhatsApp, the mail servers and Google Drive keep their own data, so whatever is lost here can be fetched again by a sync",
144
+ lastOkAt,
145
+ loss: lossUnknown(lastOkAt),
146
+ steps
91
147
  };
92
- }, "explainDamage");
148
+ }, "storeDamageReport");
93
149
 
94
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
150
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
95
151
  import { realpathSync, statSync } from "node:fs";
96
152
  import { resolve } from "node:path";
97
153
 
98
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
154
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
99
155
  var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
100
156
  const creatable = /* @__PURE__ */ new Set();
101
157
  let people = 0, identities = 0;
@@ -158,11 +214,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
158
214
  }
159
215
  }, "copyPeople");
160
216
 
161
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
217
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
162
218
  import { createHash } from "node:crypto";
163
219
  var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
164
220
 
165
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
221
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
166
222
  var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
167
223
  const colon = collection.indexOf(":");
168
224
  const provider = collection.slice(0, colon);
@@ -206,7 +262,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
206
262
  };
207
263
  }, "currentCollection");
208
264
 
209
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
265
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
210
266
  var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
211
267
  const mappings = /* @__PURE__ */ new Map();
212
268
  const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
@@ -373,7 +429,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
373
429
  };
374
430
  }, "planTransfer");
375
431
 
376
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
432
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
377
433
  var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
378
434
  var MAX_ENTITIES = 1e3;
379
435
  var MAX_AUXILIARY = 1e4;
@@ -535,7 +591,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
535
591
  };
536
592
  }), "transferSnapshot");
537
593
 
538
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
594
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
539
595
  var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
540
596
  if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
541
597
  return provider ?? null;
@@ -707,7 +763,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
707
763
  database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
708
764
  }, "remapEntity");
709
765
 
710
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
766
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
711
767
  var locations = /* @__PURE__ */ __name((options) => {
712
768
  for (const value of [options.source, options.destination, options.collection])
713
769
  if (typeof value !== "string" || !value.trim())
@@ -809,7 +865,7 @@ var applyWith = /* @__PURE__ */ __name(async (location, options) => {
809
865
  }
810
866
  }, "applyWith");
811
867
 
812
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/health.js
868
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/health.js
813
869
  import { existsSync, statSync as statSync2 } from "node:fs";
814
870
  var JSON_COLUMNS = {
815
871
  accounts: ["settings"],
@@ -951,7 +1007,7 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
951
1007
  }
952
1008
  }, "storeHealth");
953
1009
 
954
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
1010
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
955
1011
  var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
956
1012
  if (!options || typeof options !== "object" || Array.isArray(options))
957
1013
  throw new CliError("validation_error", "project preview options are required");
@@ -977,7 +1033,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
977
1033
  });
978
1034
  }, "previewProjectAnnotationSnapshot");
979
1035
 
980
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
1036
+ // node_modules/.pnpm/@wirecat+cli-core@0.620.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_737712cd0065e7e21fd5896a79d0773d/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
981
1037
  var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
982
1038
  if (!options || typeof options !== "object" || Array.isArray(options))
983
1039
  throw new CliError("validation_error", "snapshot options are required");
@@ -999,7 +1055,8 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
999
1055
  }, "snapshotProjectAnnotations");
1000
1056
 
1001
1057
  export {
1002
- explainDamage,
1058
+ lossUnknown,
1059
+ storeDamageReport,
1003
1060
  invalidJson,
1004
1061
  QUICK_HEALTH_CHECKS,
1005
1062
  fts5Tables,