@wirecat/zoom-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 (157) hide show
  1. package/dist/answer-entities.d.ts +13 -0
  2. package/dist/answer-entities.d.ts.map +1 -1
  3. package/dist/answer-entities.js +5 -0
  4. package/dist/answer-entities.js.map +1 -1
  5. package/dist/answers.d.ts +8 -0
  6. package/dist/answers.d.ts.map +1 -1
  7. package/dist/archive-import.d.ts +1 -1
  8. package/dist/archive-import.d.ts.map +1 -1
  9. package/dist/archive-import.js +2 -1
  10. package/dist/archive-import.js.map +1 -1
  11. package/dist/bin/zm.js +6 -2
  12. package/dist/bin/zm.js.map +1 -1
  13. package/dist/bundle/{all-profiles-W2OVBZ7S.js → all-profiles-D5CFH2OK.js} +11 -8
  14. package/dist/bundle/answer-policy-YAYMKRRD.js +101 -0
  15. package/dist/bundle/{anthropic-P4BKQNBO.js → anthropic-K2E2JS4S.js} +7 -4
  16. package/dist/bundle/{app-server-AYUW45ND.js → app-server-TVXDG6HZ.js} +68 -61
  17. package/dist/bundle/{bun-MNGPTYDQ.js → bun-O4WHGL2F.js} +2 -2
  18. package/dist/bundle/{bun-sqlite-PTPUSXAO.js → bun-sqlite-HGBEHQI3.js} +6 -3
  19. package/dist/bundle/{chunk-TYKZCJD7.js → chunk-2T5BOLBS.js} +35 -35
  20. package/dist/bundle/{chunk-H3DMYF3W.js → chunk-2VPHQFO5.js} +8 -8
  21. package/dist/bundle/{chunk-JMSKDW5G.js → chunk-2YLNUZ3T.js} +5 -3
  22. package/dist/bundle/{chunk-AAC6VNSL.js → chunk-3B7L2UX4.js} +3 -3
  23. package/dist/bundle/{chunk-6NBQJJT6.js → chunk-3WTKZ2ZS.js} +13 -11
  24. package/dist/bundle/{chunk-H65B6A7Y.js → chunk-3Y2F65AY.js} +8 -8
  25. package/dist/bundle/{chunk-A2FOW3ZC.js → chunk-5A26IBAR.js} +162 -107
  26. package/dist/bundle/{chunk-BO5YVG3X.js → chunk-5GD2XZ6X.js} +132 -40
  27. package/dist/bundle/{chunk-7D56BQZL.js → chunk-5HPALDUO.js} +2 -2
  28. package/dist/bundle/{chunk-5FN4Q5H5.js → chunk-62GOOZO3.js} +8 -13
  29. package/dist/bundle/{chunk-J25UNZIL.js → chunk-67RNZGAG.js} +12 -10
  30. package/dist/bundle/{chunk-3AAO5N4L.js → chunk-6GSJLNP4.js} +2 -2
  31. package/dist/bundle/{chunk-UNO4G5NX.js → chunk-6TIKPRVQ.js} +11 -7
  32. package/dist/bundle/{chunk-HQHUPTZR.js → chunk-756RS4PH.js} +1393 -712
  33. package/dist/bundle/{chunk-R4NTPYXZ.js → chunk-7JMBEPW2.js} +2 -2
  34. package/dist/bundle/{chunk-HIGFBTEI.js → chunk-7KCTPGOF.js} +2 -2
  35. package/dist/bundle/{chunk-TJODNJKE.js → chunk-7PF56S6U.js} +33 -22
  36. package/dist/bundle/{chunk-LEQCRVPD.js → chunk-7SQJCKR6.js} +1 -1
  37. package/dist/bundle/{chunk-BWPKSUXW.js → chunk-A2SCXNA7.js} +4518 -402
  38. package/dist/bundle/{chunk-QK54GOGE.js → chunk-AU4JHT3R.js} +7 -9
  39. package/dist/bundle/{chunk-63MRRNDL.js → chunk-AZ7ICKIA.js} +8 -8
  40. package/dist/bundle/chunk-BLT3LR3U.js +34 -0
  41. package/dist/bundle/{chunk-UABUBDYB.js → chunk-BXSAROQP.js} +2 -2
  42. package/dist/bundle/{chunk-Q3EDUZ5R.js → chunk-CAW6IMFZ.js} +25 -18
  43. package/dist/bundle/{chunk-UCPL55YP.js → chunk-CR4CXOLX.js} +17 -17
  44. package/dist/bundle/{chunk-SMT6SFBK.js → chunk-CZ4KLUJG.js} +2 -2
  45. package/dist/bundle/{chunk-COTC7HF3.js → chunk-D72URWJE.js} +1 -39
  46. package/dist/bundle/{chunk-X6M5DK66.js → chunk-EXXM4RNI.js} +14 -12
  47. package/dist/bundle/{chunk-CZKV4USJ.js → chunk-FWFFQV4D.js} +59 -4
  48. package/dist/bundle/{chunk-JJZAGKUK.js → chunk-GHAPWKG2.js} +5 -3
  49. package/dist/bundle/{chunk-JRPYHDCO.js → chunk-GI6QVSCW.js} +4 -4
  50. package/dist/bundle/{chunk-Y7TWNMTW.js → chunk-GKXFL35E.js} +198 -65
  51. package/dist/bundle/{chunk-K6OSD6DG.js → chunk-GNGBG5BT.js} +81 -35
  52. package/dist/bundle/{chunk-RJLNVHIU.js → chunk-H5ZVZAOD.js} +3 -3
  53. package/dist/bundle/{chunk-XZSQLVED.js → chunk-HKQWV3KT.js} +5 -3
  54. package/dist/bundle/chunk-IDWHJ35K.js +166 -0
  55. package/dist/bundle/{chunk-JM43EKTY.js → chunk-IKQ73INC.js} +1928 -679
  56. package/dist/bundle/chunk-ILHTNOIV.js +23 -0
  57. package/dist/bundle/{chunk-OPP5CWAX.js → chunk-J4EZL6HY.js} +61 -56
  58. package/dist/bundle/{chunk-54UEJGYB.js → chunk-JX3V35A5.js} +3 -3
  59. package/dist/bundle/{chunk-7VJIKJNW.js → chunk-K5CIN4JP.js} +8 -8
  60. package/dist/bundle/{chunk-KJCCT3QY.js → chunk-KDKFGQWG.js} +17 -14
  61. package/dist/bundle/{chunk-RK3JBC4U.js → chunk-L7IK4FOA.js} +2 -2
  62. package/dist/bundle/{chunk-7EOW47PV.js → chunk-LN2S3RA3.js} +4 -4
  63. package/dist/bundle/{chunk-I5QX2HAT.js → chunk-N5JRRBEG.js} +214 -107
  64. package/dist/bundle/chunk-N67BLTBV.js +2443 -0
  65. package/dist/bundle/{chunk-23LOMA2I.js → chunk-N6JMJN5A.js} +48 -26
  66. package/dist/bundle/{chunk-CZFV6XTW.js → chunk-NMQUCHTX.js} +3 -3
  67. package/dist/bundle/{chunk-TJH5IQVZ.js → chunk-NO24PJNW.js} +1 -1
  68. package/dist/bundle/{chunk-UFI5SX3F.js → chunk-O5FKJV3T.js} +14 -12
  69. package/dist/bundle/{chunk-IIP4J3PD.js → chunk-P2G4KGTR.js} +94 -12
  70. package/dist/bundle/{chunk-OWXMQVVN.js → chunk-P2SYZNM4.js} +1 -1
  71. package/dist/bundle/{chunk-EQYPTGCT.js → chunk-P3XVLHIQ.js} +6 -4
  72. package/dist/bundle/chunk-PQLBPYJR.js +46 -0
  73. package/dist/bundle/{chunk-5BCNJB2A.js → chunk-Q47C3QZW.js} +675 -507
  74. package/dist/bundle/{chunk-IIGXCYEL.js → chunk-QAPU2JNO.js} +13 -13
  75. package/dist/bundle/{chunk-WFIJOFS5.js → chunk-QJHRYUMJ.js} +1 -1
  76. package/dist/bundle/{chunk-YNYMWXXH.js → chunk-QV5ZGRK3.js} +40 -11
  77. package/dist/bundle/{chunk-3IMEAZIM.js → chunk-RMKHYUHK.js} +9 -20
  78. package/dist/bundle/{chunk-AF4HONAZ.js → chunk-RO44LANT.js} +6449 -4436
  79. package/dist/bundle/{chunk-3DGQJASQ.js → chunk-S4GDDO5S.js} +1 -1
  80. package/dist/bundle/chunk-S6S3KVJI.js +45 -0
  81. package/dist/bundle/{chunk-SJIBJQJN.js → chunk-SU4WPBQE.js} +44 -14
  82. package/dist/bundle/{chunk-7NDSBTKR.js → chunk-TFDVFD4N.js} +91 -2546
  83. package/dist/bundle/{chunk-HQHYPKSU.js → chunk-TMVKZMDO.js} +54 -37
  84. package/dist/bundle/{chunk-PBJY5VR6.js → chunk-TN7K66PU.js} +1 -1
  85. package/dist/bundle/{chunk-ZW4N73FO.js → chunk-TUEEXECZ.js} +5 -5
  86. package/dist/bundle/{chunk-H5LLZ5XA.js → chunk-U3ZUT557.js} +1 -1
  87. package/dist/bundle/{chunk-4XVRA6P5.js → chunk-U4RVOSX3.js} +1 -1
  88. package/dist/bundle/{chunk-5YLR24D5.js → chunk-UOIXBEFR.js} +13 -6
  89. package/dist/bundle/chunk-UYV2JGLQ.js +34 -0
  90. package/dist/bundle/{chunk-7SWNZ44U.js → chunk-XFUID5NY.js} +4 -4
  91. package/dist/bundle/{chunk-BMYZWBAX.js → chunk-XWDSEJWP.js} +6 -6
  92. package/dist/bundle/{chunk-JZKNHA44.js → chunk-Y3EIK4XW.js} +1 -1
  93. package/dist/bundle/{chunk-24WCZURP.js → chunk-YLEQN6PB.js} +5 -3
  94. package/dist/bundle/{chunk-2UONVSJQ.js → chunk-Z6U3MEGJ.js} +2 -2
  95. package/dist/bundle/{chunk-L4JGVSBN.js → chunk-ZKTXUDSR.js} +33 -28
  96. package/dist/bundle/{chunk-FSYO3PUW.js → chunk-ZNFPDTQM.js} +2 -2
  97. package/dist/bundle/{chunk-C3RRIJ5C.js → chunk-ZTL7ANSG.js} +9 -42
  98. package/dist/bundle/{cli-Y2ZO3D5U.js → cli-HWQIL2AC.js} +124 -73
  99. package/dist/bundle/command-contract-CQFJXWX6.js +40 -0
  100. package/dist/bundle/config-R2Y6ZVQS.js +83 -0
  101. package/dist/bundle/{decode-GO6GAYH2.js → decode-XPAPPUGE.js} +6 -3
  102. package/dist/bundle/dispatch-AKVJGP2S.js +412 -0
  103. package/dist/bundle/{dist-MIJKAGXW.js → dist-LDIUQBM7.js} +23 -16
  104. package/dist/bundle/{echarts-NWK7LALR.js → echarts-FMACRZQC.js} +2 -2
  105. package/dist/bundle/{embed-2DOSN4DV.js → embed-LK45GRQ7.js} +7 -4
  106. package/dist/bundle/{embedder-3Q3C2WKC.js → embedder-QPBC5XBY.js} +12 -9
  107. package/dist/bundle/failure-7OULAOWQ.js +25 -0
  108. package/dist/bundle/first-run-J5FG773Q.js +28 -0
  109. package/dist/bundle/first-screen-MULOBUHN.js +38 -0
  110. package/dist/bundle/{folders-RSWEBHDZ.js → folders-RHPUVMDI.js} +5 -2
  111. package/dist/bundle/{instructions-M3FZPQVI.js → instructions-E5FXYCWF.js} +1 -1
  112. package/dist/bundle/{main-R77BPRRS.js → main-FJHE5YHU.js} +28 -22
  113. package/dist/bundle/{mcp-YJEQYYTR.js → mcp-MNI62HHE.js} +5 -3
  114. package/dist/bundle/{meetings-IV4Y4WRH.js → meetings-MYIDGYGW.js} +19 -6
  115. package/dist/bundle/{node-I3GEHYGL.js → node-4SNKUPXT.js} +2 -2
  116. package/dist/bundle/{node-sqlite-W6MR2TVQ.js → node-sqlite-SYZUTVPC.js} +12 -3
  117. package/dist/bundle/{oauth-M6YL4QXP.js → oauth-QPS5VTN6.js} +8 -5
  118. package/dist/bundle/{open-2VITLJAN.js → open-OVCASRSJ.js} +6 -2
  119. package/dist/bundle/openai-VEVT7D7L.js +25 -0
  120. package/dist/bundle/{output-file-XJJ3XMLQ.js → output-file-K5JEL33Z.js} +7 -4
  121. package/dist/bundle/{process-UBA4L4B2.js → process-HQZOTT6U.js} +1 -1
  122. package/dist/bundle/{program-5R5MRXUM.js → program-A546WC4F.js} +120 -112
  123. package/dist/bundle/{prompt-AVIXIM7Z.js → prompt-CYBKP7S5.js} +6 -3
  124. package/dist/bundle/{recognize-DJKTJOYU.js → recognize-3H3YDCFI.js} +5 -2
  125. package/dist/bundle/{remote-S3DTNYRP.js → remote-VAYVTJBS.js} +8 -5
  126. package/dist/bundle/{rerank-FMCDP6VF.js → rerank-XA4GA5PS.js} +8 -5
  127. package/dist/bundle/{run-log-T4MV2VEH.js → run-log-XAFHMI3F.js} +59 -54
  128. package/dist/bundle/{serve-5SGFJFMC.js → serve-KGHEDUHB.js} +18 -14
  129. package/dist/bundle/server-IDNSJXF3.js +71 -0
  130. package/dist/bundle/{server-PCMCY7WK.js → server-ZYTSMDTP.js} +47 -42
  131. package/dist/bundle/{services-SKRQ2POT.js → services-ZHMZC2OQ.js} +106 -28
  132. package/dist/bundle/{speech-FSDICIKO.js → speech-7CJEFKM3.js} +14 -11
  133. package/dist/bundle/{state-KPUSPWO6.js → state-U6KSYVOH.js} +7 -4
  134. package/dist/bundle/{store-W7LFPKG2.js → store-DJE3LAEG.js} +17 -13
  135. package/dist/bundle/{store-7MP2ZGQ7.js → store-WS4CQGYU.js} +40 -18
  136. package/dist/bundle/store-connection-T5WGOOPH.js +81 -0
  137. package/dist/bundle/store-maintenance-command-5CBQCEQQ.js +61 -0
  138. package/dist/bundle/{streaming-Q44ESD3E.js → streaming-QMHH7L6N.js} +7 -4
  139. package/dist/bundle/{tokens-TAFCHANI.js → tokens-PWQ56OXO.js} +7 -4
  140. package/dist/bundle/zm.js +150 -1
  141. package/dist/local-transcription.d.ts.map +1 -1
  142. package/dist/local-transcription.js +1 -0
  143. package/dist/local-transcription.js.map +1 -1
  144. package/dist/version.d.ts +1 -1
  145. package/dist/version.js +1 -1
  146. package/package.json +5 -4
  147. package/dist/bundle/answer-policy-HOA43GNA.js +0 -96
  148. package/dist/bundle/chunk-JRPAZ2WD.js +0 -3635
  149. package/dist/bundle/command-contract-DGTZIH2F.js +0 -38
  150. package/dist/bundle/config-N2UHDKGG.js +0 -78
  151. package/dist/bundle/first-run-S75VKIT3.js +0 -23
  152. package/dist/bundle/first-screen-DQNRT6GH.js +0 -36
  153. package/dist/bundle/openai-OG6B3JCU.js +0 -22
  154. package/dist/bundle/server-EYGZLKKQ.js +0 -66
  155. package/dist/bundle/store-connection-3HNZFJC4.js +0 -76
  156. package/dist/bundle/store-maintenance-command-6WBLTUZP.js +0 -55
  157. /package/dist/bundle/{chunk-WJWLHLQ7.js → chunk-NUN6OGOV.js} +0 -0
@@ -5,47 +5,51 @@ import {
5
5
  id,
6
6
  text,
7
7
  time
8
- } from "./chunk-TYKZCJD7.js";
9
- import {
10
- filesPresent,
11
- sharedModelsDirectory
12
- } from "./chunk-EQYPTGCT.js";
8
+ } from "./chunk-2T5BOLBS.js";
13
9
  import {
14
10
  PRIORITY_LABELS,
15
11
  TASK_ORIGINS,
16
12
  TASK_STATES,
17
13
  TASK_TYPES
18
- } from "./chunk-QK54GOGE.js";
14
+ } from "./chunk-AU4JHT3R.js";
19
15
  import {
20
16
  TAG_TYPES
21
- } from "./chunk-XZSQLVED.js";
17
+ } from "./chunk-HKQWV3KT.js";
18
+ import {
19
+ filesPresent,
20
+ sharedModelsDirectory
21
+ } from "./chunk-P3XVLHIQ.js";
22
+ import {
23
+ createRecordLog,
24
+ resolvePaths,
25
+ traceIdOf,
26
+ writeSecurely
27
+ } from "./chunk-TFDVFD4N.js";
22
28
  import {
23
- CliError,
24
29
  array,
25
30
  boolean,
26
- createRecordLog,
27
- isCliError,
28
31
  nullable,
29
32
  number,
30
33
  optional,
31
34
  picklist,
32
35
  reference,
33
- resolvePaths,
34
- strictObject,
35
- traceIdOf,
36
- writeSecurely
37
- } from "./chunk-7NDSBTKR.js";
36
+ strictObject
37
+ } from "./chunk-N67BLTBV.js";
38
+ import {
39
+ CliError,
40
+ isCliError
41
+ } from "./chunk-S6S3KVJI.js";
38
42
  import {
39
43
  __name
40
44
  } from "./chunk-ZVVMGPBJ.js";
41
45
 
42
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/runs/run.js
46
+ // 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/runs/run.js
43
47
  import { randomUUID } from "node:crypto";
44
48
  import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
45
49
  import { userInfo } from "node:os";
46
50
  import { join, sep } from "node:path";
47
51
 
48
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
52
+ // 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/runs/log-keys.js
49
53
  var snake = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
50
54
  var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
51
55
  var renamed = /* @__PURE__ */ __name((record, name) => Object.fromEntries(Object.entries(record).map(([key, value]) => [name(key), value])), "renamed");
@@ -58,7 +62,7 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
58
62
  error: /* @__PURE__ */ __name((event, message) => logger.error(logAttributes(event), message), "error")
59
63
  }), "snakeLogger");
60
64
 
61
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
65
+ // 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/runs/log-attributes.js
62
66
  var diagnostic = {
63
67
  event: true,
64
68
  operation: true,
@@ -128,7 +132,7 @@ var LOG_ATTRIBUTES = [
128
132
  ...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
129
133
  ].sort();
130
134
 
131
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/runs/run.js
135
+ // 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/runs/run.js
132
136
  var KEEP_RUNS_FOR_DAYS = 30;
133
137
  var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
134
138
  var RUNS_SIZE_LIMIT_MB = 200;
@@ -481,7 +485,7 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
481
485
  };
482
486
  }, "metadataOf");
483
487
 
484
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/runs/scope.js
488
+ // 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/runs/scope.js
485
489
  import { AsyncLocalStorage } from "node:async_hooks";
486
490
  import { randomBytes } from "node:crypto";
487
491
  var scopes = new AsyncLocalStorage();
@@ -519,7 +523,7 @@ var attempts = new AsyncLocalStorage();
519
523
  var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
520
524
  var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
521
525
 
522
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/domain/duration.js
526
+ // 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/domain/duration.js
523
527
  var DURATION = /^(\d+)(ms|s|m|h|d)$/;
524
528
  var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
525
529
  var parseDuration = /* @__PURE__ */ __name((value, source) => {
@@ -533,7 +537,7 @@ var parseDuration = /* @__PURE__ */ __name((value, source) => {
533
537
  return ms;
534
538
  }, "parseDuration");
535
539
 
536
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/sends/guarded.js
540
+ // 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/sends/guarded.js
537
541
  import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
538
542
  var sentIds = /* @__PURE__ */ __name((typed, message) => ({
539
543
  messageId: message.id,
@@ -639,7 +643,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled =
639
643
  }, "guardedWrite");
640
644
  var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
641
645
 
642
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/embeddings/models.js
646
+ // 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/models.js
643
647
  var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
644
648
  var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
645
649
  var gemma = huggingFace("onnx-community/embeddinggemma-300m-ONNX", "5090578d9565bb06545b4552f76e6bc2c93e4a66");
@@ -798,61 +802,54 @@ var rerankModel = /* @__PURE__ */ __name((id2) => {
798
802
  var vectorModelKey = /* @__PURE__ */ __name((model) => `local:${model.id}:${model.dims}`, "vectorModelKey");
799
803
  var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
800
804
 
801
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/images/picture/models.js
802
- import { join as join2 } from "node:path";
803
- var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
804
- var IMAGE_MODELS = [
805
- {
806
- id: "clip-b32",
807
- title: "CLIP ViT-B/32, 8-bit",
808
- languages: "English only: translate a query before searching",
809
- licence: "MIT",
810
- dims: 512,
811
- key: "local:clip-b32:512",
812
- maxTokens: 77,
813
- vision: "onnx/vision_model_quantized.onnx",
814
- text: "onnx/text_model_quantized.onnx",
815
- files: [
816
- {
817
- name: "onnx/vision_model_quantized.onnx",
818
- url: clip("onnx/vision_model_quantized.onnx"),
819
- sha256: "583fd1110a514667812fee7d684952aaf82a99b959760c8d7dca7e0ab9839299",
820
- bytes: 89117001
821
- },
822
- {
823
- name: "onnx/text_model_quantized.onnx",
824
- url: clip("onnx/text_model_quantized.onnx"),
825
- sha256: "73baab855d406190da9faa498cfedf65f15cf309f4cc7385b7b032e6d08e5c3a",
826
- bytes: 64504507
827
- },
828
- {
829
- name: "tokenizer.json",
830
- url: clip("tokenizer.json"),
831
- sha256: "f7f3b7af117d467b58374797691a6438d3e6b9e9cef800dfd5dced7f697a90cd",
832
- bytes: 2224119
833
- },
834
- {
835
- name: "tokenizer_config.json",
836
- url: clip("tokenizer_config.json"),
837
- sha256: "60ba2912bc6344c94bc16bbdec27fa1209409167b6f2fdf3cfe9e65462ea3967",
838
- bytes: 775
839
- }
840
- ]
841
- }
842
- ];
843
- var DEFAULT_IMAGE_MODEL = "clip-b32";
844
- var imageModel = /* @__PURE__ */ __name((id2) => {
845
- const found = IMAGE_MODELS.find((model) => model.id === id2);
846
- if (!found) {
847
- throw new CliError("validation_error", `no image model ${id2} \u2014 one of: ${IMAGE_MODELS.map((model) => model.id).join(", ")}`);
848
- }
849
- return found;
850
- }, "imageModel");
851
- var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
852
- var placedImage = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedImage");
853
- var isImageModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedImage(model, directory)), "isImageModelInstalled");
805
+ // 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/services/history-limits.js
806
+ var HISTORY_MAX_DAYS = 1095;
807
+ var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
808
+ var DAY_MS2 = 24 * 60 * 60 * 1e3;
809
+ var historyWindow = /* @__PURE__ */ __name((shape, limits, now) => {
810
+ const group = shape !== void 0 && shape.kind !== "dialog" && shape.kind !== "saved";
811
+ if (group && (shape.participantsCount ?? 0) > limits.groupMembersMax)
812
+ return { skip: "group_too_large", members: shape.participantsCount ?? 0 };
813
+ const days2 = group ? limits.groupDays : limits.dialogDays;
814
+ return { keepFrom: now - Math.min(days2, HISTORY_MAX_DAYS) * DAY_MS2 };
815
+ }, "historyWindow");
816
+ var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now = Date.now()) => {
817
+ const skipped = /* @__PURE__ */ new Map();
818
+ if (!batch.messages?.length)
819
+ return { batch, skipped };
820
+ const named = new Map((batch.chats ?? []).map((chat) => [chat.id, chat]));
821
+ const windows = /* @__PURE__ */ new Map();
822
+ const windowOf = /* @__PURE__ */ __name((chatId) => {
823
+ if (!windows.has(chatId)) {
824
+ const chat = named.get(chatId);
825
+ const shape = chat ? { kind: chat.kind, participantsCount: chat.participantsCount ?? null } : shapes(chatId);
826
+ windows.set(chatId, included(chatId) ? void 0 : historyWindow(shape, limits, now));
827
+ }
828
+ return windows.get(chatId);
829
+ }, "windowOf");
830
+ const messages = batch.messages.filter((message) => {
831
+ const window = windowOf(message.chatId);
832
+ if (window === void 0)
833
+ return true;
834
+ const at = Date.parse(message.timestamp);
835
+ if ("keepFrom" in window && !(at < window.keepFrom))
836
+ return true;
837
+ const reason = "skip" in window ? window.skip : "older_than_window";
838
+ const held = skipped.get(message.chatId);
839
+ const iso = new Date(at).toISOString();
840
+ skipped.set(message.chatId, {
841
+ reason,
842
+ messages: (held?.messages ?? 0) + 1,
843
+ oldestAt: held && held.oldestAt < iso ? held.oldestAt : iso,
844
+ newestAt: held && held.newestAt > iso ? held.newestAt : iso,
845
+ ..."skip" in window ? { members: window.members } : { keptFrom: new Date(window.keepFrom).toISOString() }
846
+ });
847
+ return false;
848
+ });
849
+ return { batch: { ...batch, messages }, skipped };
850
+ }, "limitBatch");
854
851
 
855
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/entities/task.js
852
+ // 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/entities/task.js
856
853
  var closeSuggestion = strictObject({
857
854
  as: picklist(["done", "dismissed"]),
858
855
  /** The agent's name. */
@@ -910,7 +907,7 @@ var task = strictObject({
910
907
  updated_at: optional(time)
911
908
  });
912
909
 
913
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/entities/agenda.js
910
+ // 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/entities/agenda.js
914
911
  var agendaChat = strictObject({
915
912
  chat: reference,
916
913
  title: nullable(text),
@@ -980,22 +977,7 @@ var agenda = strictObject({
980
977
  unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
981
978
  });
982
979
 
983
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/entities/conversation.js
984
- var conversation = strictObject({
985
- id,
986
- chat: reference,
987
- /** The message it starts with. */
988
- first_message: reference,
989
- started_at: time,
990
- ended_at: time,
991
- messages_count: count,
992
- /** How many people wrote in it. */
993
- senders_count: count,
994
- built_at: time,
995
- rules_version: count
996
- });
997
-
998
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/entities/attachment.js
980
+ // 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/entities/attachment.js
999
981
  var attachment = strictObject({
1000
982
  /** The message it came with, as a locator; absent inside that message. */
1001
983
  message: optional(reference),
@@ -1033,7 +1015,22 @@ var attachment = strictObject({
1033
1015
  });
1034
1016
  var hitFile = strictObject({ position: count, kind: text, name: optional(text), size: optional(count) });
1035
1017
 
1036
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/entities/tagging.js
1018
+ // 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/entities/conversation.js
1019
+ var conversation = strictObject({
1020
+ id,
1021
+ chat: reference,
1022
+ /** The message it starts with. */
1023
+ first_message: reference,
1024
+ started_at: time,
1025
+ ended_at: time,
1026
+ messages_count: count,
1027
+ /** How many people wrote in it. */
1028
+ senders_count: count,
1029
+ built_at: time,
1030
+ rules_version: count
1031
+ });
1032
+
1033
+ // 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/entities/tagging.js
1037
1034
  var tagging = strictObject({
1038
1035
  tag: text,
1039
1036
  type: picklist(TAG_TYPES),
@@ -1046,7 +1043,61 @@ var tagging = strictObject({
1046
1043
  created_at: time
1047
1044
  });
1048
1045
 
1049
- // node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
1046
+ // 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/images/picture/models.js
1047
+ import { join as join2 } from "node:path";
1048
+ var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
1049
+ var IMAGE_MODELS = [
1050
+ {
1051
+ id: "clip-b32",
1052
+ title: "CLIP ViT-B/32, 8-bit",
1053
+ languages: "English only: translate a query before searching",
1054
+ licence: "MIT",
1055
+ dims: 512,
1056
+ key: "local:clip-b32:512",
1057
+ maxTokens: 77,
1058
+ vision: "onnx/vision_model_quantized.onnx",
1059
+ text: "onnx/text_model_quantized.onnx",
1060
+ files: [
1061
+ {
1062
+ name: "onnx/vision_model_quantized.onnx",
1063
+ url: clip("onnx/vision_model_quantized.onnx"),
1064
+ sha256: "583fd1110a514667812fee7d684952aaf82a99b959760c8d7dca7e0ab9839299",
1065
+ bytes: 89117001
1066
+ },
1067
+ {
1068
+ name: "onnx/text_model_quantized.onnx",
1069
+ url: clip("onnx/text_model_quantized.onnx"),
1070
+ sha256: "73baab855d406190da9faa498cfedf65f15cf309f4cc7385b7b032e6d08e5c3a",
1071
+ bytes: 64504507
1072
+ },
1073
+ {
1074
+ name: "tokenizer.json",
1075
+ url: clip("tokenizer.json"),
1076
+ sha256: "f7f3b7af117d467b58374797691a6438d3e6b9e9cef800dfd5dced7f697a90cd",
1077
+ bytes: 2224119
1078
+ },
1079
+ {
1080
+ name: "tokenizer_config.json",
1081
+ url: clip("tokenizer_config.json"),
1082
+ sha256: "60ba2912bc6344c94bc16bbdec27fa1209409167b6f2fdf3cfe9e65462ea3967",
1083
+ bytes: 775
1084
+ }
1085
+ ]
1086
+ }
1087
+ ];
1088
+ var DEFAULT_IMAGE_MODEL = "clip-b32";
1089
+ var imageModel = /* @__PURE__ */ __name((id2) => {
1090
+ const found = IMAGE_MODELS.find((model) => model.id === id2);
1091
+ if (!found) {
1092
+ throw new CliError("validation_error", `no image model ${id2} \u2014 one of: ${IMAGE_MODELS.map((model) => model.id).join(", ")}`);
1093
+ }
1094
+ return found;
1095
+ }, "imageModel");
1096
+ var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
1097
+ var placedImage = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedImage");
1098
+ var isImageModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedImage(model, directory)), "isImageModelInstalled");
1099
+
1100
+ // 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/botcheck/reasons.js
1050
1101
  var WEIGHTS = {
1051
1102
  bot: 3,
1052
1103
  scam: 3,
@@ -1113,20 +1164,24 @@ export {
1113
1164
  rerankModel,
1114
1165
  vectorModelKey,
1115
1166
  meaningFloor,
1116
- IMAGE_MODELS,
1117
- DEFAULT_IMAGE_MODEL,
1118
- imageModel,
1119
- imageModelsDirectory,
1120
- placedImage,
1121
- isImageModelInstalled,
1122
- WEIGHTS,
1123
- LINK,
1124
- oddName,
1167
+ HISTORY_MAX_DAYS,
1168
+ DEFAULT_HISTORY_LIMITS,
1169
+ historyWindow,
1170
+ limitBatch,
1125
1171
  closeSuggestion,
1126
1172
  task,
1127
1173
  agenda,
1128
- conversation,
1129
1174
  attachment,
1130
1175
  hitFile,
1131
- tagging
1176
+ WEIGHTS,
1177
+ LINK,
1178
+ oddName,
1179
+ conversation,
1180
+ tagging,
1181
+ IMAGE_MODELS,
1182
+ DEFAULT_IMAGE_MODEL,
1183
+ imageModel,
1184
+ imageModelsDirectory,
1185
+ placedImage,
1186
+ isImageModelInstalled
1132
1187
  };