@wirecat/zoom-cli 0.63.0 → 0.65.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 (147) hide show
  1. package/README.md +3 -0
  2. package/dist/answer-entities.d.ts +13 -0
  3. package/dist/answer-entities.d.ts.map +1 -1
  4. package/dist/answer-entities.js +5 -0
  5. package/dist/answer-entities.js.map +1 -1
  6. package/dist/answers.d.ts +8 -0
  7. package/dist/answers.d.ts.map +1 -1
  8. package/dist/archive-import.d.ts +1 -1
  9. package/dist/archive-import.d.ts.map +1 -1
  10. package/dist/archive-import.js +2 -1
  11. package/dist/archive-import.js.map +1 -1
  12. package/dist/bin/zm.js +6 -2
  13. package/dist/bundle/{all-profiles-CGGNBINU.js → all-profiles-SKMLZJSY.js} +8 -8
  14. package/dist/bundle/answer-policy-BHDNSJWX.js +96 -0
  15. package/dist/bundle/{anthropic-KVWPIHFG.js → anthropic-TVHK7CY2.js} +4 -4
  16. package/dist/bundle/{app-server-NKKFBTQN.js → app-server-44ASFH47.js} +53 -52
  17. package/dist/bundle/{bun-XRO6XJHQ.js → bun-O4WHGL2F.js} +2 -2
  18. package/dist/bundle/{bun-sqlite-FWNCLOAR.js → bun-sqlite-NS32GMM4.js} +3 -3
  19. package/dist/bundle/{chunk-M6FCCVYZ.js → chunk-24F7JBLY.js} +72 -4
  20. package/dist/bundle/{chunk-4OQVRDTG.js → chunk-25IDWPEN.js} +166 -96
  21. package/dist/bundle/{chunk-QLQ7VVLK.js → chunk-266WOOB3.js} +4 -4
  22. package/dist/bundle/{chunk-ECXRRW7J.js → chunk-2H5SXK7K.js} +57 -27
  23. package/dist/bundle/{chunk-YI6ZNDPC.js → chunk-37PHGASE.js} +2 -2
  24. package/dist/bundle/{chunk-URJZK4GX.js → chunk-3CZIWGZ6.js} +1 -1
  25. package/dist/bundle/{chunk-6URISMGR.js → chunk-5NGOP4EZ.js} +125 -35
  26. package/dist/bundle/{chunk-IOUPXUFH.js → chunk-6CS7ETBK.js} +4496 -386
  27. package/dist/bundle/{chunk-FDCGTODC.js → chunk-7SQJCKR6.js} +1 -1
  28. package/dist/bundle/{chunk-EG7HC4EC.js → chunk-A6OA2EH2.js} +2 -2
  29. package/dist/bundle/{chunk-QUWMFBMS.js → chunk-AMMD6YCJ.js} +49 -11
  30. package/dist/bundle/chunk-BLT3LR3U.js +34 -0
  31. package/dist/bundle/{chunk-MI3JK6MW.js → chunk-BNXH73OU.js} +10 -10
  32. package/dist/bundle/{chunk-GOESXUJQ.js → chunk-BWRBALXG.js} +3 -3
  33. package/dist/bundle/{chunk-6SPWQCJF.js → chunk-C6BG57FA.js} +11 -11
  34. package/dist/bundle/{chunk-CXPHUOJR.js → chunk-CNEE6TPE.js} +26 -13
  35. package/dist/bundle/{chunk-RWG44LQD.js → chunk-CVCRQW3A.js} +35 -35
  36. package/dist/bundle/{chunk-FAOLCUKV.js → chunk-DNCKH7CO.js} +17 -17
  37. package/dist/bundle/{chunk-LTE6WH22.js → chunk-DYJXAY7Q.js} +26 -25
  38. package/dist/bundle/{chunk-IOCS5FXW.js → chunk-EA63UGWE.js} +2 -2
  39. package/dist/bundle/{chunk-5LMQTEU5.js → chunk-ERPRAYA7.js} +5 -5
  40. package/dist/bundle/{chunk-KMQUZ4YM.js → chunk-FYJL276J.js} +3 -3
  41. package/dist/bundle/{chunk-AMIIU3UZ.js → chunk-FYM27FCG.js} +32 -9
  42. package/dist/bundle/{chunk-NQCFUYC2.js → chunk-GBZF4IIP.js} +10 -9
  43. package/dist/bundle/{chunk-DIXC56OU.js → chunk-GEX4V5TM.js} +4 -4
  44. package/dist/bundle/{chunk-4OTXE6CF.js → chunk-GMTXCFI7.js} +683 -504
  45. package/dist/bundle/{chunk-TILW3EJY.js → chunk-GXCNCMUY.js} +2865 -924
  46. package/dist/bundle/{chunk-YJN4XYNA.js → chunk-H7762LDA.js} +2 -2
  47. package/dist/bundle/{chunk-JDJDVYGS.js → chunk-IPTI3Y2E.js} +6 -41
  48. package/dist/bundle/{chunk-SB47UAW2.js → chunk-JF7ZEUXU.js} +34 -26
  49. package/dist/bundle/{chunk-7AY3ADNV.js → chunk-K6ATTKQR.js} +13 -6
  50. package/dist/bundle/{chunk-6SK5SHCR.js → chunk-KYLS5QGC.js} +2 -2
  51. package/dist/bundle/{chunk-YF2PT5KA.js → chunk-KZE3G4ZT.js} +38 -36
  52. package/dist/bundle/{chunk-MIUPH3WA.js → chunk-LOL6JYYN.js} +211 -106
  53. package/dist/bundle/{chunk-UIPT6IAU.js → chunk-LPUFOWL3.js} +1 -1
  54. package/dist/bundle/{chunk-5NLFQ644.js → chunk-M6IDHQ7N.js} +6739 -4659
  55. package/dist/bundle/{chunk-M2WQWF3I.js → chunk-MH7AWCB4.js} +179 -50
  56. package/dist/bundle/{chunk-VFJ3MOIR.js → chunk-MIB5X2XW.js} +3 -3
  57. package/dist/bundle/{chunk-SLBMXXOW.js → chunk-MPKKIL3U.js} +15 -12
  58. package/dist/bundle/{chunk-BJPFWPKH.js → chunk-MRWIXUYT.js} +2 -2
  59. package/dist/bundle/{chunk-BNTAQADF.js → chunk-MZ6U6HNJ.js} +12 -3
  60. package/dist/bundle/{chunk-6R3GMSLR.js → chunk-NJSIHMAE.js} +2 -2
  61. package/dist/bundle/{chunk-5MYLM6SU.js → chunk-NNNEVWFF.js} +108 -41
  62. package/dist/bundle/{chunk-2LLNPNMB.js → chunk-NO24PJNW.js} +1 -1
  63. package/dist/bundle/{chunk-HIZQYFY3.js → chunk-OXUHTKO2.js} +8 -2
  64. package/dist/bundle/{chunk-3YBDRVOG.js → chunk-PV3UDPCI.js} +82 -6
  65. package/dist/bundle/{chunk-IK2OSV5C.js → chunk-QI7BZS2G.js} +8 -13
  66. package/dist/bundle/{chunk-2NAM2XQG.js → chunk-QLCYAQ66.js} +2 -2
  67. package/dist/bundle/{chunk-RUJBN7ZP.js → chunk-R5BAF5XE.js} +1 -1
  68. package/dist/bundle/{chunk-IR73ZZY6.js → chunk-RZLNHNSS.js} +8 -8
  69. package/dist/bundle/{chunk-TQFCPUIM.js → chunk-S4GDDO5S.js} +1 -1
  70. package/dist/bundle/{chunk-YFIUXE25.js → chunk-SQWRZZOQ.js} +3 -3
  71. package/dist/bundle/{chunk-EJFSS65P.js → chunk-T3KICUOK.js} +6 -6
  72. package/dist/bundle/{chunk-UD4FKICZ.js → chunk-TC7PD3LH.js} +4 -4
  73. package/dist/bundle/{chunk-YBMOFCY5.js → chunk-TUIEDVI6.js} +2 -2
  74. package/dist/bundle/{chunk-JBBZCTTF.js → chunk-U3ZUT557.js} +1 -1
  75. package/dist/bundle/{chunk-EOEDICIE.js → chunk-U4RVOSX3.js} +1 -1
  76. package/dist/bundle/{chunk-BPMKLWHV.js → chunk-U5ASRBBF.js} +6 -4
  77. package/dist/bundle/{chunk-7CNRZSAV.js → chunk-UKU6MYUI.js} +4 -4
  78. package/dist/bundle/{chunk-72S5TXFN.js → chunk-UMHJZWZU.js} +9 -9
  79. package/dist/bundle/{chunk-TZE6WXID.js → chunk-UPJXN2CO.js} +10651 -9814
  80. package/dist/bundle/{chunk-NVC4VQ2B.js → chunk-VH4F2EK4.js} +1 -1
  81. package/dist/bundle/{chunk-SPJJCD2A.js → chunk-VJTGYBJJ.js} +18 -13
  82. package/dist/bundle/{chunk-MLNC5N7H.js → chunk-VW2SW7ME.js} +3 -3
  83. package/dist/bundle/{chunk-Q4ZE2LXE.js → chunk-WLSF3GCC.js} +2 -2
  84. package/dist/bundle/{chunk-N3KQ7XND.js → chunk-XJQB47IL.js} +4 -4
  85. package/dist/bundle/{chunk-KM7Q67Z3.js → chunk-Y3EIK4XW.js} +1 -1
  86. package/dist/bundle/{chunk-7LQLJ7LW.js → chunk-Z5424QL6.js} +2 -2
  87. package/dist/bundle/{chunk-LXYC75D3.js → chunk-ZFNM3FNI.js} +199 -141
  88. package/dist/bundle/{chunk-D6FTCPXA.js → chunk-ZH743WNV.js} +41 -12
  89. package/dist/bundle/{chunk-XAXXEZZ5.js → chunk-ZOGYTDHG.js} +2 -2
  90. package/dist/bundle/{chunk-SEH7DBAM.js → chunk-ZREFYKUB.js} +7 -7
  91. package/dist/bundle/{chunk-2DPMYUWQ.js → chunk-ZXGRK44F.js} +14 -13
  92. package/dist/bundle/{cli-AHPIESAC.js → cli-FDO6CP6R.js} +124 -60
  93. package/dist/bundle/command-contract-O4FDXM4U.js +37 -0
  94. package/dist/bundle/config-UBHKZG3J.js +78 -0
  95. package/dist/bundle/{decode-ZU7WLMMV.js → decode-7SZI3TGZ.js} +3 -3
  96. package/dist/bundle/{dist-LTS7VI3S.js → dist-5GWUXW27.js} +18 -14
  97. package/dist/bundle/{echarts-YNGCOYHW.js → echarts-FMACRZQC.js} +2 -2
  98. package/dist/bundle/{embed-VWWOW7PP.js → embed-24YSXHLP.js} +4 -4
  99. package/dist/bundle/{embedder-T5GJC7M2.js → embedder-MEXN2TFB.js} +7 -7
  100. package/dist/bundle/{first-run-PX3SHPUU.js → first-run-OCVEJH63.js} +8 -8
  101. package/dist/bundle/first-screen-KJIU25MH.js +35 -0
  102. package/dist/bundle/{folders-VXMDFC2D.js → folders-DBAAMU26.js} +2 -2
  103. package/dist/bundle/{instructions-GJHHFV64.js → instructions-E5FXYCWF.js} +1 -1
  104. package/dist/bundle/{main-APVJXUJE.js → main-EIUCXXDW.js} +17 -16
  105. package/dist/bundle/{mcp-EMNFFY4N.js → mcp-FUSDPAOL.js} +2 -2
  106. package/dist/bundle/{meetings-GHYNIOHG.js → meetings-JDTRGXZJ.js} +16 -6
  107. package/dist/bundle/{node-GFOH6FKP.js → node-4SNKUPXT.js} +2 -2
  108. package/dist/bundle/{node-sqlite-QXKSPHTP.js → node-sqlite-O4BAODFR.js} +9 -3
  109. package/dist/bundle/{oauth-A6I2OMDD.js → oauth-3YLHXGUW.js} +5 -5
  110. package/dist/bundle/{open-TQKCU447.js → open-QGRMSNM2.js} +3 -2
  111. package/dist/bundle/{openai-XE3BJXOI.js → openai-7PSCSTH7.js} +9 -9
  112. package/dist/bundle/{output-file-FQNFCUKE.js → output-file-J26UQKRA.js} +3 -3
  113. package/dist/bundle/{process-XVDX4SPD.js → process-HQZOTT6U.js} +1 -1
  114. package/dist/bundle/{program-QRKEXYDG.js → program-47DT7SHE.js} +75 -75
  115. package/dist/bundle/{prompt-ISYG5RWM.js → prompt-IUD7HCDC.js} +3 -3
  116. package/dist/bundle/{recognize-KENPECLZ.js → recognize-DMJJHHXF.js} +2 -2
  117. package/dist/bundle/{remote-ZP5XTDCC.js → remote-5WFSOVVB.js} +5 -5
  118. package/dist/bundle/{rerank-SG653RHT.js → rerank-UKQ65ECH.js} +5 -5
  119. package/dist/bundle/{run-log-HYKGQ42E.js → run-log-UGYL6NW2.js} +53 -53
  120. package/dist/bundle/{serve-6UJCZD7Z.js → serve-WAOSED3I.js} +9 -8
  121. package/dist/bundle/server-HAXN772R.js +66 -0
  122. package/dist/bundle/{server-ZAYEDPFR.js → server-NWZFNXC5.js} +42 -42
  123. package/dist/bundle/{services-KMH7XZPY.js → services-VPANRE72.js} +101 -28
  124. package/dist/bundle/{speech-LINBLG5E.js → speech-O6UNUDRW.js} +11 -11
  125. package/dist/bundle/{state-4RKZNHE7.js → state-BNE7I65A.js} +4 -4
  126. package/dist/bundle/{store-253N7NUC.js → store-4IIVSCJ4.js} +56 -19
  127. package/dist/bundle/{store-JTBHRQZK.js → store-QQH4FJXJ.js} +16 -13
  128. package/dist/bundle/store-connection-PPEQK2K3.js +76 -0
  129. package/dist/bundle/store-maintenance-command-JZXCT6NY.js +56 -0
  130. package/dist/bundle/{streaming-YW64OKKQ.js → streaming-S4EZB6P2.js} +4 -4
  131. package/dist/bundle/{tokens-DPBC2P3I.js → tokens-VCXIH7WZ.js} +4 -4
  132. package/dist/bundle/zm.js +1 -1
  133. package/dist/local-transcription.d.ts.map +1 -1
  134. package/dist/local-transcription.js +1 -0
  135. package/dist/local-transcription.js.map +1 -1
  136. package/dist/version.d.ts +1 -1
  137. package/dist/version.js +1 -1
  138. package/package.json +3 -3
  139. package/dist/bundle/answer-policy-V2KDPLDO.js +0 -96
  140. package/dist/bundle/chunk-2T7MUSDB.js +0 -3605
  141. package/dist/bundle/command-contract-HVLI3OKU.js +0 -38
  142. package/dist/bundle/config-3SFEGYZO.js +0 -78
  143. package/dist/bundle/first-screen-RAPEZG57.js +0 -36
  144. package/dist/bundle/server-AXE37E6Q.js +0 -66
  145. package/dist/bundle/store-connection-ID2ETC7F.js +0 -76
  146. package/dist/bundle/store-maintenance-command-XRNECVDU.js +0 -55
  147. /package/dist/bundle/{chunk-NPGVOZVK.js → chunk-NUN6OGOV.js} +0 -0
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  answerOf,
5
5
  messengerContext
6
- } from "./chunk-6URISMGR.js";
6
+ } from "./chunk-5NGOP4EZ.js";
7
7
  import {
8
8
  chatEventAnswer,
9
9
  memberAnswer,
@@ -12,24 +12,27 @@ import {
12
12
  serveRelay,
13
13
  typedQuery,
14
14
  withQuery
15
- } from "./chunk-ECXRRW7J.js";
15
+ } from "./chunk-2H5SXK7K.js";
16
16
  import {
17
17
  holdLock,
18
18
  lockPath,
19
19
  releaseLock,
20
20
  servingProfiles,
21
21
  takeLock
22
- } from "./chunk-GOESXUJQ.js";
22
+ } from "./chunk-BWRBALXG.js";
23
23
  import {
24
+ FETCHING,
24
25
  RULES_VERSION,
25
26
  applyTaskRulesOnArrival,
27
+ capability,
26
28
  newSendId,
27
29
  onlineDeps,
28
30
  openRequestTask,
31
+ patiently,
29
32
  senderIsMe,
30
33
  servicesFor,
31
34
  syncsOneChat
32
- } from "./chunk-5NLFQ644.js";
35
+ } from "./chunk-M6IDHQ7N.js";
33
36
  import {
34
37
  Command,
35
38
  LOCAL_READ,
@@ -53,38 +56,39 @@ import {
53
56
  snakeKeys,
54
57
  storeTable,
55
58
  withoutProviderRefs
56
- } from "./chunk-IOUPXUFH.js";
59
+ } from "./chunk-6CS7ETBK.js";
57
60
  import {
58
61
  envName
59
- } from "./chunk-Q4ZE2LXE.js";
62
+ } from "./chunk-WLSF3GCC.js";
60
63
  import {
61
64
  holdersOf
62
- } from "./chunk-KM7Q67Z3.js";
65
+ } from "./chunk-Y3EIK4XW.js";
63
66
  import {
64
67
  codeOf,
65
- currentRun
66
- } from "./chunk-4OQVRDTG.js";
68
+ currentRun,
69
+ parseDuration
70
+ } from "./chunk-25IDWPEN.js";
67
71
  import {
68
72
  failureKey
69
- } from "./chunk-7LQLJ7LW.js";
73
+ } from "./chunk-Z5424QL6.js";
70
74
  import {
71
75
  renderMessages
72
- } from "./chunk-YJN4XYNA.js";
76
+ } from "./chunk-H7762LDA.js";
73
77
  import {
74
78
  levelFor
75
- } from "./chunk-HIZQYFY3.js";
79
+ } from "./chunk-OXUHTKO2.js";
76
80
  import {
77
81
  readSecret
78
- } from "./chunk-MLNC5N7H.js";
82
+ } from "./chunk-VW2SW7ME.js";
79
83
  import {
80
84
  checkedOptions,
81
85
  range
82
- } from "./chunk-XAXXEZZ5.js";
86
+ } from "./chunk-ZOGYTDHG.js";
83
87
  import {
84
88
  messagesFor,
85
89
  systemFor,
86
90
  validateImages
87
- } from "./chunk-2NAM2XQG.js";
91
+ } from "./chunk-QLCYAQ66.js";
88
92
  import {
89
93
  MIGRATIONS,
90
94
  drainNoteIndex,
@@ -111,20 +115,20 @@ import {
111
115
  storeClients,
112
116
  storeContents,
113
117
  vectorIndexCounts
114
- } from "./chunk-TILW3EJY.js";
118
+ } from "./chunk-GXCNCMUY.js";
115
119
  import {
116
120
  formatLocator,
117
121
  parseLocator
118
- } from "./chunk-MIUPH3WA.js";
122
+ } from "./chunk-LOL6JYYN.js";
119
123
  import {
120
124
  storePath
121
- } from "./chunk-EG7HC4EC.js";
125
+ } from "./chunk-A6OA2EH2.js";
122
126
  import {
123
127
  openCache
124
- } from "./chunk-IK2OSV5C.js";
128
+ } from "./chunk-QI7BZS2G.js";
125
129
  import {
126
130
  queryFieldsOf
127
- } from "./chunk-D6FTCPXA.js";
131
+ } from "./chunk-ZH743WNV.js";
128
132
  import {
129
133
  CliError,
130
134
  Credentials,
@@ -153,7 +157,7 @@ import {
153
157
  trim,
154
158
  union,
155
159
  writeSecurely
156
- } from "./chunk-SB47UAW2.js";
160
+ } from "./chunk-JF7ZEUXU.js";
157
161
  import {
158
162
  __commonJS,
159
163
  __name,
@@ -5493,11 +5497,11 @@ var require_liquid_node = __commonJS({
5493
5497
  }
5494
5498
  });
5495
5499
 
5496
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5500
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
5497
5501
  import { chmodSync, constants, copyFileSync, existsSync as existsSync7, mkdirSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync3, writeFileSync } from "node:fs";
5498
5502
  import { dirname, resolve } from "node:path";
5499
5503
 
5500
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/sealed.js
5504
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/sealed.js
5501
5505
  import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
5502
5506
  import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
5503
5507
  import { Transform } from "node:stream";
@@ -5604,7 +5608,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
5604
5608
  renameSync(pending, to);
5605
5609
  }, "unsealFile");
5606
5610
 
5607
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5611
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/store/compatibility.js
5608
5612
  var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
5609
5613
  var fileSchemaOf = /* @__PURE__ */ __name((database) => {
5610
5614
  const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
@@ -5628,7 +5632,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
5628
5632
  };
5629
5633
  }, "compatibilityOf");
5630
5634
 
5631
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/repair.js
5635
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/store/repair.js
5632
5636
  import { createHash as createHash2 } from "node:crypto";
5633
5637
  var COPY_MARK = "__repair_";
5634
5638
  var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
@@ -5882,7 +5886,7 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
5882
5886
  return found;
5883
5887
  }, "deleteCopy");
5884
5888
 
5885
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5889
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/store-info.js
5886
5890
  import { existsSync as existsSync2, statSync as statSync2 } from "node:fs";
5887
5891
  var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
5888
5892
  var bytesOf = /* @__PURE__ */ __name((path) => existsSync2(path) ? statSync2(path).size : 0, "bytesOf");
@@ -5930,7 +5934,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
5930
5934
  }), "storeInfoCommand");
5931
5935
  var sharedStoreCommand = /* @__PURE__ */ __name(() => annotate(new Command("store"), { effects: LOCAL_READ }).description("the shared local store every WireCat tool reads").addCommand(storeInfoCommand()), "sharedStoreCommand");
5932
5936
 
5933
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
5937
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
5934
5938
  var ENCRYPT_OPTION = [
5935
5939
  "--encrypt",
5936
5940
  "compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
@@ -5949,7 +5953,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
5949
5953
  return password;
5950
5954
  }, "passwordOf");
5951
5955
 
5952
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/replies/rules.js
5956
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/replies/rules.js
5953
5957
  import { existsSync as existsSync3, readFileSync } from "node:fs";
5954
5958
  import { join } from "node:path";
5955
5959
  var REPLY_ACTIONS = ["reply", "task"];
@@ -6120,7 +6124,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
6120
6124
  }, "problem");
6121
6125
  var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
6122
6126
 
6123
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/replies/state.js
6127
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/replies/state.js
6124
6128
  import { existsSync as existsSync4, readFileSync as readFileSync2 } from "node:fs";
6125
6129
  import { join as join2 } from "node:path";
6126
6130
  var ANSWERED_KEPT = 1e3;
@@ -6173,7 +6177,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
6173
6177
  }, "recordReply");
6174
6178
  var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
6175
6179
 
6176
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/replies/decide.js
6180
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/replies/decide.js
6177
6181
  var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
6178
6182
  var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
6179
6183
  const { message, chat, owner, sender } = incoming;
@@ -6279,7 +6283,7 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
6279
6283
  return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
6280
6284
  }, "filled");
6281
6285
 
6282
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/replies/template.js
6286
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/replies/template.js
6283
6287
  var import_liquidjs = __toESM(require_liquid_node(), 1);
6284
6288
  var TEMPLATE_LIMITS = {
6285
6289
  parse: 32768,
@@ -6439,7 +6443,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
6439
6443
  }
6440
6444
  }, "renderReplyTemplate");
6441
6445
 
6442
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
6446
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
6443
6447
  var DRY_RUN_DAYS = 7;
6444
6448
  var PAGE = 500;
6445
6449
  var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
@@ -6553,7 +6557,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
6553
6557
  }
6554
6558
  }, "storedSince");
6555
6559
 
6556
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
6560
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
6557
6561
  var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
6558
6562
  const host = new URL(baseUrl).host;
6559
6563
  return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
@@ -6579,12 +6583,12 @@ var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) =>
6579
6583
  const shared = ["openai", "anthropic"].includes(provider) ? env[`${provider.toUpperCase()}_API_KEY`]?.trim() : void 0;
6580
6584
  return shared ? { key: shared, source: "env" } : void 0;
6581
6585
  }, "read"),
6582
- write: /* @__PURE__ */ __name((provider, key) => credentials(provider).write(account(provider), key), "write"),
6586
+ write: /* @__PURE__ */ __name((provider, key) => credentials(provider).write(account(provider), key, { signIn: true }), "write"),
6583
6587
  remove: /* @__PURE__ */ __name((provider) => credentials(provider).remove(account(provider)), "remove")
6584
6588
  };
6585
6589
  }, "embeddingKeys");
6586
6590
 
6587
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/models/openai.js
6591
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/models/openai.js
6588
6592
  var options = strictObject({
6589
6593
  temperature: range(0, 2),
6590
6594
  top_p: range(0, 1),
@@ -6633,7 +6637,7 @@ var openai = {
6633
6637
  }, "complete")
6634
6638
  };
6635
6639
 
6636
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/models/index.js
6640
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/models/index.js
6637
6641
  var modelGateway = /* @__PURE__ */ __name((deps) => ({
6638
6642
  complete: /* @__PURE__ */ __name(async (request) => {
6639
6643
  if (deps.signal?.aborted)
@@ -6648,7 +6652,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
6648
6652
  if (!adapter && target.provider === "openai")
6649
6653
  adapter = openai;
6650
6654
  if (!adapter && target.provider === "anthropic")
6651
- adapter = (await import("./anthropic-KVWPIHFG.js")).anthropic;
6655
+ adapter = (await import("./anthropic-TVHK7CY2.js")).anthropic;
6652
6656
  if (!adapter)
6653
6657
  throw new CliError("validation_error", `no model adapter for ${target.provider}`);
6654
6658
  if (request.images !== void 0 && adapter.images !== true)
@@ -6689,7 +6693,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
6689
6693
  }, "complete")
6690
6694
  }), "modelGateway");
6691
6695
 
6692
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/replies/consents.js
6696
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/replies/consents.js
6693
6697
  import { existsSync as existsSync5, readFileSync as readFileSync3 } from "node:fs";
6694
6698
  import { join as join3 } from "node:path";
6695
6699
  var shape = strictObject({
@@ -6714,7 +6718,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
6714
6718
  return consent.provider === provider && !consent.deniedChats.includes(chat);
6715
6719
  }, "mayModelReply");
6716
6720
 
6717
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/replies/rendering.js
6721
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/replies/rendering.js
6718
6722
  var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options2 = {
6719
6723
  ai: true
6720
6724
  }) => async (rule2, message, chat, now) => {
@@ -6761,7 +6765,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
6761
6765
  return result2;
6762
6766
  }, "replyRenderer");
6763
6767
 
6764
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/replies/serve.js
6768
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/replies/serve.js
6765
6769
  var NOT_ALLOWED = "replies.send is not allow";
6766
6770
  var NO_RULES = "no rules";
6767
6771
  var ONLY_TASK = "opened a task, sent nothing";
@@ -6854,7 +6858,84 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
6854
6858
  return { skip: why };
6855
6859
  }, "replyTo");
6856
6860
 
6857
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
6861
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
6862
+ var START_SYNC_DELAY_MS = 3e4;
6863
+ var START_SYNC_BUDGET_MS = 5 * 6e4;
6864
+ var START_SYNC_WINDOW_MS = 7 * 864e5;
6865
+ var START_SYNC_PER_CHAT = 500;
6866
+ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch: fetch2, note, warn, delayMs = START_SYNC_DELAY_MS, budgetMs = START_SYNC_BUDGET_MS, windowMs = START_SYNC_WINDOW_MS, now = Date.now }) => {
6867
+ const controller = new AbortController();
6868
+ let timer;
6869
+ let pass = Promise.resolve();
6870
+ let started = false;
6871
+ let done;
6872
+ const run = /* @__PURE__ */ __name(async () => {
6873
+ const stop = AbortSignal.any([controller.signal, AbortSignal.timeout(budgetMs)]);
6874
+ const floor = now() - windowMs;
6875
+ const moved = [];
6876
+ for (const chat of await chats(stop)) {
6877
+ const lastAt = Date.parse(chat.lastMessageAt ?? "");
6878
+ if (Number.isNaN(lastAt) || lastAt < floor)
6879
+ continue;
6880
+ moved.push({ chat, lastAt, held: await newestHeld(chat.id) });
6881
+ }
6882
+ const anywhere = moved.reduce((top, { held }) => held === void 0 ? top : Math.max(top, held), -Infinity);
6883
+ if (!Number.isFinite(anywhere))
6884
+ return;
6885
+ const behind = moved.filter(({ lastAt, held }) => lastAt > (held ?? anywhere)).sort((one, other) => other.lastAt - one.lastAt);
6886
+ if (behind.length === 0)
6887
+ return;
6888
+ const summary = { chats: 0, fetched: 0, failed: 0, stopped: false };
6889
+ done = summary;
6890
+ for (const { chat, held } of behind) {
6891
+ if (stop.aborted)
6892
+ break;
6893
+ try {
6894
+ summary.fetched += (await fetch2(chat.id, Math.max(held ?? anywhere, floor), stop)).fetched;
6895
+ summary.chats += 1;
6896
+ } catch (error) {
6897
+ if (stop.aborted)
6898
+ break;
6899
+ summary.failed += 1;
6900
+ const errorCode = failureKey(error);
6901
+ warn({
6902
+ code: "start_sync_chat_failed",
6903
+ chatId: chat.id,
6904
+ errorCode,
6905
+ text: `what ${chat.id} received while serve was down was not fetched: ${errorCode}`
6906
+ });
6907
+ }
6908
+ }
6909
+ summary.stopped = stop.aborted && summary.chats + summary.failed < behind.length;
6910
+ note({
6911
+ code: "start_sync",
6912
+ text: `caught up ${summary.fetched} message(s) in ${summary.chats} chat(s) that moved while serve was down` + (summary.stopped ? ` \u2014 stopped at the time limit, ${behind.length - summary.chats - summary.failed} left` : "")
6913
+ });
6914
+ }, "run");
6915
+ return {
6916
+ start: /* @__PURE__ */ __name(() => {
6917
+ if (started || controller.signal.aborted)
6918
+ return;
6919
+ started = true;
6920
+ timer = setTimeout(() => {
6921
+ pass = run().catch((error) => {
6922
+ if (controller.signal.aborted)
6923
+ return;
6924
+ const errorCode = failureKey(error);
6925
+ warn({ code: "start_sync_failed", errorCode, text: `the catch-up on start failed: ${errorCode}` });
6926
+ });
6927
+ }, delayMs);
6928
+ }, "start"),
6929
+ stop: /* @__PURE__ */ __name(async () => {
6930
+ controller.abort();
6931
+ clearTimeout(timer);
6932
+ await pass;
6933
+ }, "stop"),
6934
+ summary: /* @__PURE__ */ __name(() => done, "summary")
6935
+ };
6936
+ }, "startSync");
6937
+
6938
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
6858
6939
  var FIRST_FETCH_MS = 6e4;
6859
6940
  var DAY_MS = 864e5;
6860
6941
  var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
@@ -6908,7 +6989,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, fi
6908
6989
  };
6909
6990
  }, "memberFetches");
6910
6991
 
6911
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
6992
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
6912
6993
  var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
6913
6994
  var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
6914
6995
  if (context.format === "pretty") {
@@ -6941,7 +7022,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
6941
7022
  return context;
6942
7023
  }, "recordDiagnostics");
6943
7024
 
6944
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
7025
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
6945
7026
  var STEMS_EVERY_MS = 3e4;
6946
7027
  var STEMS_SLICE_MS = 2e3;
6947
7028
  var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
@@ -6981,7 +7062,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
6981
7062
  };
6982
7063
  }, "stemFills");
6983
7064
 
6984
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
7065
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
6985
7066
  var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
6986
7067
  var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
6987
7068
  kind: attachment.kind,
@@ -7076,7 +7157,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
7076
7157
  locale: messenger.app.locale
7077
7158
  }), "viewOf");
7078
7159
 
7079
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
7160
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
7080
7161
  var observed = /* @__PURE__ */ __name((value) => ({
7081
7162
  value: value.value,
7082
7163
  observed_at: value.observedAt,
@@ -7143,7 +7224,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
7143
7224
  }
7144
7225
  }, "watchEventItem");
7145
7226
 
7146
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
7227
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
7147
7228
  var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
7148
7229
  output: { entity: "watch_item" },
7149
7230
  effects: REMOTE_READ,
@@ -7298,7 +7379,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
7298
7379
  }
7299
7380
  }, "describe");
7300
7381
 
7301
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
7382
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
7302
7383
  var serveCommand = /* @__PURE__ */ __name((messenger) => {
7303
7384
  const command = annotate(new Command("serve"), {
7304
7385
  output: { entity: "serve_summary" },
@@ -7341,7 +7422,7 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
7341
7422
  const counts = {};
7342
7423
  const rules = replying(context, messenger, Date.parse(startedAt));
7343
7424
  const tasks = tasking(context, warn);
7344
- const { handled } = environmentOf(this);
7425
+ const { handled, startSyncDelayMs } = environmentOf(this);
7345
7426
  const count3 = /* @__PURE__ */ __name((event) => {
7346
7427
  counts[event.event] = (counts[event.event] ?? 0) + 1;
7347
7428
  if (event.event === "message") {
@@ -7365,6 +7446,50 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
7365
7446
  }).chats.fetchMembers(chatId, {}), "fetch"),
7366
7447
  warn
7367
7448
  });
7449
+ const fetching = messenger.fetching ?? FETCHING;
7450
+ const catchingUp = startSync({
7451
+ chats: /* @__PURE__ */ __name(async (stop) => {
7452
+ const list = capability(connection, "chats", "list its chats");
7453
+ const all = [];
7454
+ for (let offset = 0; ; ) {
7455
+ const page = await patiently(() => list({ offset, limit: 100 }), context.renderer.note, stop);
7456
+ for (const chat of page.items)
7457
+ all.push(chat);
7458
+ offset += page.items.length;
7459
+ if (!page.hasMore || page.items.length === 0)
7460
+ return all;
7461
+ }
7462
+ }, "chats"),
7463
+ newestHeld: /* @__PURE__ */ __name((chatId) => context.withStore(async (store, account) => {
7464
+ const [newest] = await store.messages.messagesWindow(account, chatId, {
7465
+ at: startedAt,
7466
+ before: 1,
7467
+ after: 0
7468
+ });
7469
+ return newest ? Date.parse(newest.timestamp) : void 0;
7470
+ }, { name: "serve catch-up" }), "newestHeld"),
7471
+ fetch: /* @__PURE__ */ __name((chatId, sinceMs, stop) => context.withStore((store, account) => servicesFor({
7472
+ ...onlineDeps(messenger, connection, context.guard, {
7473
+ profile: context.profile,
7474
+ env: context.env
7475
+ }),
7476
+ store: /* @__PURE__ */ __name(async () => store, "store"),
7477
+ account: /* @__PURE__ */ __name(async () => account, "account")
7478
+ }).archive.fetch(chatId, {
7479
+ limit: START_SYNC_PER_CHAT,
7480
+ pageSize: fetching.page,
7481
+ pauseMs: parseDuration(fetching.pause, "pause"),
7482
+ sinceMs,
7483
+ catchUp: false,
7484
+ note: context.renderer.note,
7485
+ stop,
7486
+ onPage: /* @__PURE__ */ __name(() => {
7487
+ }, "onPage")
7488
+ }), { name: "serve catch-up" }), "fetch"),
7489
+ note,
7490
+ warn,
7491
+ ...startSyncDelayMs === void 0 ? {} : { delayMs: startSyncDelayMs }
7492
+ });
7368
7493
  const stems = stemFills({
7369
7494
  withStore: /* @__PURE__ */ __name((work) => context.withStore((store) => work(store), { name: "serve stems" }), "withStore"),
7370
7495
  warn
@@ -7379,12 +7504,15 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
7379
7504
  rules.connected(open);
7380
7505
  members.start();
7381
7506
  stems.start();
7507
+ if (messenger.history !== "store" && typeof open.chats === "function")
7508
+ catchingUp.start();
7382
7509
  }, "connected")
7383
7510
  });
7384
7511
  } finally {
7385
7512
  await relaying;
7386
7513
  await relay?.close();
7387
7514
  rules.stop();
7515
+ await catchingUp.stop();
7388
7516
  await members.stop();
7389
7517
  await stems.stop();
7390
7518
  await rules.settled();
@@ -7399,6 +7527,7 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
7399
7527
  ...rules.summary(),
7400
7528
  ...members.summary().fetched + members.summary().failed > 0 ? { members: members.summary() } : {},
7401
7529
  ...stems.summary().stemmed > 0 ? { stems: stems.summary() } : {},
7530
+ ...catchingUp.summary() ? { caught_up: catchingUp.summary() } : {},
7402
7531
  ...tasks.summary()
7403
7532
  }));
7404
7533
  });
@@ -7514,7 +7643,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
7514
7643
  };
7515
7644
  }, "tasking");
7516
7645
 
7517
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
7646
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
7518
7647
  import { existsSync as existsSync6 } from "node:fs";
7519
7648
  var PATH = "store tables list";
7520
7649
  var STORE_TABLES_QUERY = {
@@ -7557,7 +7686,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((messenger) => {
7557
7686
  return tables;
7558
7687
  }, "storeTablesCommand");
7559
7688
 
7560
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
7689
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
7561
7690
  var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
7562
7691
  var WORD_INDEX = "message_words";
7563
7692
  var schemaOf = /* @__PURE__ */ __name((database) => {
@@ -3,10 +3,10 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  SAMPLE_RATE,
5
5
  decodeOgg
6
- } from "./chunk-QLQ7VVLK.js";
6
+ } from "./chunk-266WOOB3.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-SB47UAW2.js";
9
+ } from "./chunk-JF7ZEUXU.js";
10
10
  import {
11
11
  importFrom
12
12
  } from "./chunk-Y5E2WNWB.js";
@@ -14,7 +14,7 @@ import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/speech/decode.js
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/speech/decode.js
18
18
  import { spawn } from "node:child_process";
19
19
  import { mkdtemp, rm, writeFile } from "node:fs/promises";
20
20
  import { createRequire } from "node:module";
@@ -2,24 +2,22 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  ZM
5
- } from "./chunk-NVC4VQ2B.js";
5
+ } from "./chunk-VH4F2EK4.js";
6
6
  import {
7
7
  commandsCommand,
8
8
  formatSuggestions,
9
9
  meetingResultItem,
10
10
  runsCommand,
11
11
  suggest
12
- } from "./chunk-TZE6WXID.js";
12
+ } from "./chunk-UPJXN2CO.js";
13
13
  import {
14
14
  sharedStoreCommand
15
- } from "./chunk-M2WQWF3I.js";
16
- import {
17
- answerEntity
18
- } from "./chunk-JDJDVYGS.js";
15
+ } from "./chunk-MH7AWCB4.js";
19
16
  import {
20
17
  NO_EFFECTS,
21
18
  REMOTE_READ,
22
19
  annotate,
20
+ answerEntity,
23
21
  changesAuthorityNow,
24
22
  checkConfigText,
25
23
  describeOptions,
@@ -38,24 +36,24 @@ import {
38
36
  renderAnswer,
39
37
  snakeKeys,
40
38
  usableProfileName
41
- } from "./chunk-IOUPXUFH.js";
39
+ } from "./chunk-6CS7ETBK.js";
42
40
  import {
43
41
  readOnlyLockOf,
44
42
  readOnlyRefusal
45
- } from "./chunk-Q4ZE2LXE.js";
43
+ } from "./chunk-WLSF3GCC.js";
46
44
  import {
47
45
  setupPermissionCeiling
48
- } from "./chunk-DIXC56OU.js";
46
+ } from "./chunk-GEX4V5TM.js";
49
47
  import {
50
48
  CEILING_KEY,
51
49
  DEFAULT_PERMISSIONS,
52
50
  LEVELS,
53
51
  keyForCommand,
54
52
  levelFor
55
- } from "./chunk-HIZQYFY3.js";
53
+ } from "./chunk-OXUHTKO2.js";
56
54
  import {
57
55
  MEETING_RESULT_ENTITIES
58
- } from "./chunk-4OTXE6CF.js";
56
+ } from "./chunk-GMTXCFI7.js";
59
57
  import {
60
58
  CliError,
61
59
  array,
@@ -84,7 +82,7 @@ import {
84
82
  strictObject,
85
83
  string,
86
84
  union
87
- } from "./chunk-SB47UAW2.js";
85
+ } from "./chunk-JF7ZEUXU.js";
88
86
  import {
89
87
  __name
90
88
  } from "./chunk-ZVVMGPBJ.js";
@@ -401,6 +399,11 @@ var ZOOM_ANSWER_ENTITIES = {
401
399
  "meetings embeddings": { name: "meeting_embedding", schema: MEETING_RESULT_ENTITIES.meeting_embedding, shared: true },
402
400
  "meetings sync": { name: "meeting_ingestion", schema: MEETING_RESULT_ENTITIES.meeting_ingestion, shared: true },
403
401
  "meetings import": { name: "meeting_ingestion", schema: MEETING_RESULT_ENTITIES.meeting_ingestion, shared: true },
402
+ "meetings repair": {
403
+ name: "meeting_repair",
404
+ schema: MEETING_RESULT_ENTITIES.meeting_repair,
405
+ shared: true
406
+ },
404
407
  watch: { name: "meeting_ingestion", schema: MEETING_RESULT_ENTITIES.meeting_ingestion, shared: true },
405
408
  "meetings export": { name: "meeting_export", schema: MEETING_RESULT_ENTITIES.meeting_export, shared: true },
406
409
  "meetings update": { name: "meeting_association", schema: MEETING_RESULT_ENTITIES.meeting_association, shared: true },
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  checkCancelled
5
- } from "./chunk-IOCS5FXW.js";
5
+ } from "./chunk-EA63UGWE.js";
6
6
  import {
7
7
  CliError,
8
8
  createOutputBuffer
9
- } from "./chunk-SB47UAW2.js";
9
+ } from "./chunk-JF7ZEUXU.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";