@wirecat/zoom-cli 0.73.0 → 0.75.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 (137) hide show
  1. package/contracts/wirecat.json +5 -4
  2. package/dist/bin/zm.js +2 -2
  3. package/dist/bundle/{all-profiles-V47CUJFK.js → all-profiles-WFLKFKJC.js} +19 -29
  4. package/dist/bundle/answer-policy-XCKC2LLN.js +110 -0
  5. package/dist/bundle/{anthropic-SID7Z3QN.js → anthropic-H45W4P22.js} +2 -2
  6. package/dist/bundle/{app-server-KCMUSY4A.js → app-server-I4FPLBIX.js} +49 -66
  7. package/dist/bundle/{bun-PWMM6L45.js → bun-V5QLYBZU.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-3TLKUN5A.js → bun-sqlite-X2YZPHDS.js} +3 -3
  9. package/dist/bundle/{chunk-PGPHEC2X.js → chunk-2Q4CB4EI.js} +1 -1
  10. package/dist/bundle/{chunk-PACLT6IW.js → chunk-3U3W6YY5.js} +69 -68
  11. package/dist/bundle/{chunk-QVJMFZFW.js → chunk-3URYKAJP.js} +1 -1
  12. package/dist/bundle/{chunk-UYBLNGZ2.js → chunk-3YKAFLXY.js} +1 -1
  13. package/dist/bundle/{chunk-IKNOTHG2.js → chunk-3YRPDNWK.js} +544 -142
  14. package/dist/bundle/{chunk-CMWFYZ45.js → chunk-4J5GJJ2I.js} +1 -1
  15. package/dist/bundle/{chunk-Y3IH7EZC.js → chunk-4XDWV6VJ.js} +16 -16
  16. package/dist/bundle/{chunk-KHBZ4OEP.js → chunk-4YNUQGDP.js} +1 -1
  17. package/dist/bundle/{chunk-35CYSRGJ.js → chunk-532H3KT3.js} +2 -2
  18. package/dist/bundle/{chunk-TI2OANJZ.js → chunk-6XNTELM5.js} +1 -1
  19. package/dist/bundle/chunk-7ZVWV33Z.js +707 -0
  20. package/dist/bundle/{chunk-ERQRY6WZ.js → chunk-A3Q3PG54.js} +1 -1
  21. package/dist/bundle/{chunk-JQF4LM3V.js → chunk-AVCYD4WQ.js} +20 -19
  22. package/dist/bundle/{chunk-P4FU6R3Z.js → chunk-B6Q53CVA.js} +7 -7
  23. package/dist/bundle/{chunk-KSNJK4QM.js → chunk-BY2YPKZZ.js} +12 -12
  24. package/dist/bundle/{chunk-L6YSKCC3.js → chunk-C5WQ57AB.js} +1 -1
  25. package/dist/bundle/{chunk-AIEMFRBU.js → chunk-CAQ5GW3A.js} +1 -1
  26. package/dist/bundle/{chunk-G2TSDMTA.js → chunk-DQBLDZ7M.js} +3 -3
  27. package/dist/bundle/{chunk-ILDGZBZD.js → chunk-DUPFAY35.js} +6 -6
  28. package/dist/bundle/{chunk-GCZMYDKU.js → chunk-ELD5AC7Q.js} +2 -2
  29. package/dist/bundle/{chunk-CIUJEQH4.js → chunk-EOZAJGB4.js} +11 -12
  30. package/dist/bundle/{chunk-VJVYGTPM.js → chunk-F6RB5FHZ.js} +1 -1
  31. package/dist/bundle/{chunk-LVDTSCIN.js → chunk-F7K2V6OA.js} +10 -10
  32. package/dist/bundle/{chunk-4LFFDUUW.js → chunk-FBYGBR4Q.js} +3 -3
  33. package/dist/bundle/{chunk-6AO2RSYH.js → chunk-GPVSGZ4R.js} +1608 -1096
  34. package/dist/bundle/{chunk-2NQPB6MT.js → chunk-GU4FVTJV.js} +17 -1
  35. package/dist/bundle/{chunk-6NI4FE5G.js → chunk-HKPNQL52.js} +3 -3
  36. package/dist/bundle/{chunk-KUL7S5Y3.js → chunk-IDGWBKMH.js} +10 -10
  37. package/dist/bundle/{chunk-QS6DWXDB.js → chunk-IMDTC4MD.js} +34 -20
  38. package/dist/bundle/{chunk-LSVQCI6V.js → chunk-IO3BQ6JU.js} +22 -22
  39. package/dist/bundle/{chunk-V5Q2QKYM.js → chunk-IW245Q5B.js} +23 -25
  40. package/dist/bundle/{chunk-DPSTOVKC.js → chunk-JDTZCZ5K.js} +2 -2
  41. package/dist/bundle/{chunk-JIS34MLC.js → chunk-JTYWSXJG.js} +7 -7
  42. package/dist/bundle/{chunk-K5JFX5TK.js → chunk-K5E5MB4C.js} +18 -18
  43. package/dist/bundle/{chunk-VPPNYUQM.js → chunk-L5UILROP.js} +322 -11
  44. package/dist/bundle/{chunk-DYLYH7VE.js → chunk-LRCSDAYK.js} +3 -3
  45. package/dist/bundle/{chunk-PJ3FKBXG.js → chunk-MHXZ62CU.js} +1 -1
  46. package/dist/bundle/{chunk-OKOJEBHK.js → chunk-MNVT7EJS.js} +2 -2
  47. package/dist/bundle/{chunk-HAMDPWEZ.js → chunk-NE4GYKQA.js} +5 -5
  48. package/dist/bundle/{chunk-PKON63JH.js → chunk-NL6AZ6S2.js} +1 -1
  49. package/dist/bundle/{chunk-N3SOTKXC.js → chunk-NQLL4KRN.js} +5 -5
  50. package/dist/bundle/{chunk-XLY7V2LB.js → chunk-NQQVNLO6.js} +10 -10
  51. package/dist/bundle/{chunk-44YVZIA4.js → chunk-NU4FSSMN.js} +2 -2
  52. package/dist/bundle/{chunk-ZVQDOKDY.js → chunk-OUM4ZO53.js} +1 -1
  53. package/dist/bundle/{chunk-OU5OXA6Q.js → chunk-P4ZQQLZF.js} +1772 -718
  54. package/dist/bundle/{chunk-OMLVWOEF.js → chunk-P6MQ6FS4.js} +184 -16
  55. package/dist/bundle/{chunk-NBA2V6LB.js → chunk-PCJRHC5Y.js} +7 -7
  56. package/dist/bundle/{chunk-G3SIY4MQ.js → chunk-PPM7UTCT.js} +22 -21
  57. package/dist/bundle/{chunk-3ADFJ3UP.js → chunk-PX4IMYVB.js} +2 -2
  58. package/dist/bundle/{chunk-FJMRDRPN.js → chunk-QBKKTTA3.js} +1155 -484
  59. package/dist/bundle/{chunk-ZX4QWTMQ.js → chunk-QEO3XTIE.js} +37 -29
  60. package/dist/bundle/{chunk-FZLJ2G7A.js → chunk-QXQUANWE.js} +4 -4
  61. package/dist/bundle/{chunk-MG2CCAVG.js → chunk-RABCFGT3.js} +2 -2
  62. package/dist/bundle/{chunk-SYIOT45G.js → chunk-RBYVQE3S.js} +4 -4
  63. package/dist/bundle/{chunk-6WUTUCKH.js → chunk-RKI4BGWG.js} +2 -2
  64. package/dist/bundle/{chunk-EXWZCI5G.js → chunk-SEJBS7SI.js} +1 -1
  65. package/dist/bundle/{chunk-LQYMN36C.js → chunk-SR5X7YKB.js} +1 -1
  66. package/dist/bundle/{chunk-KK2IVZUQ.js → chunk-T25PR26L.js} +5 -5
  67. package/dist/bundle/{chunk-ZAIE3G5I.js → chunk-T4FMXDDV.js} +2 -2
  68. package/dist/bundle/{chunk-SO52EJ2W.js → chunk-TSHUBGN4.js} +2 -2
  69. package/dist/bundle/{chunk-OFA22L4G.js → chunk-V3UK6E5B.js} +4 -4
  70. package/dist/bundle/{chunk-Q43KX56Z.js → chunk-VLK3X53X.js} +2 -2
  71. package/dist/bundle/{chunk-Z5XCU4S7.js → chunk-VPSQZ2YR.js} +44 -52
  72. package/dist/bundle/{chunk-QWGEOQHA.js → chunk-VUPWDCYV.js} +1 -1
  73. package/dist/bundle/{chunk-K7EMVFJ7.js → chunk-W2AC2RAG.js} +13 -13
  74. package/dist/bundle/{chunk-UIKVP23D.js → chunk-WQOGHND4.js} +1 -1
  75. package/dist/bundle/{chunk-ETQNHS3A.js → chunk-WUWF4EXZ.js} +6 -6
  76. package/dist/bundle/{chunk-HO3GBTIT.js → chunk-XCJGDPMN.js} +1547 -917
  77. package/dist/bundle/{chunk-2VYEGKQ3.js → chunk-XUHQ7DVT.js} +1 -1
  78. package/dist/bundle/{chunk-IE7YBRUO.js → chunk-Y5J5CAG2.js} +1 -1
  79. package/dist/bundle/{chunk-MOKEB656.js → chunk-ZBYKCVSV.js} +1 -1
  80. package/dist/bundle/{chunk-CQBLPBZU.js → chunk-ZVVRRMLW.js} +98 -6
  81. package/dist/bundle/{cli-4ZYJ6OZE.js → cli-NPRYCWFH.js} +112 -83
  82. package/dist/bundle/command-contract-OJYRKQHR.js +41 -0
  83. package/dist/bundle/{command-server-entry-CASONRIJ.js → command-server-entry-BV4SUPUI.js} +24 -26
  84. package/dist/bundle/config-UMEV24OE.js +97 -0
  85. package/dist/bundle/{decode-KEFCVGEB.js → decode-PRMKCHHC.js} +2 -2
  86. package/dist/bundle/{dist-GCQ7KCKN.js → dist-HGLDGKUW.js} +18 -15
  87. package/dist/bundle/{echarts-SDZA2SWG.js → echarts-QIXLXS3G.js} +2 -2
  88. package/dist/bundle/{embed-43VJEPM6.js → embed-OZN2BIJY.js} +3 -3
  89. package/dist/bundle/{embedder-Q4ZHAGRP.js → embedder-RBDHO6Z6.js} +6 -6
  90. package/dist/bundle/{first-run-CPOLQVNA.js → first-run-HNCD7U3B.js} +6 -6
  91. package/dist/bundle/first-screen-374BBMO6.js +39 -0
  92. package/dist/bundle/{instructions-7T6JJIFS.js → instructions-MD2RZT5Z.js} +1 -1
  93. package/dist/bundle/{main-NA3QVPXS.js → main-FPMCCRIQ.js} +15 -15
  94. package/dist/bundle/{meetings-7CVIQJTA.js → meetings-WYCVHAIP.js} +17 -1
  95. package/dist/bundle/{node-BZDMUFTW.js → node-IEVT2FSJ.js} +2 -2
  96. package/dist/bundle/{node-sqlite-QHGB23B4.js → node-sqlite-O4C6IWSM.js} +4 -4
  97. package/dist/bundle/{oauth-BMEMCM2I.js → oauth-6VXOUXSE.js} +4 -4
  98. package/dist/bundle/{open-JGU2NRJP.js → open-AMUIWV3Y.js} +2 -2
  99. package/dist/bundle/{openai-VTXXFNCS.js → openai-MEDN6FSK.js} +10 -10
  100. package/dist/bundle/{process-756VBE7E.js → process-6Q23D3TO.js} +1 -1
  101. package/dist/bundle/{program-XM6CDIJ2.js → program-CF2NKA2A.js} +84 -87
  102. package/dist/bundle/{prompt-2IPFXJ4B.js → prompt-N3UZE4ZR.js} +2 -2
  103. package/dist/bundle/{recognize-672E2RIB.js → recognize-I5F3K3CZ.js} +1 -1
  104. package/dist/bundle/{remote-YLHRVPDS.js → remote-CJF5KMMY.js} +6 -6
  105. package/dist/bundle/{rerank-NBXQG3OS.js → rerank-6WLY6MKY.js} +4 -4
  106. package/dist/bundle/{run-log-3WITBT2F.js → run-log-FKF4ZX4M.js} +55 -57
  107. package/dist/bundle/{serve-FNLOUMYP.js → serve-FOQJ3WMX.js} +6 -6
  108. package/dist/bundle/server-BAGY5HEZ.js +74 -0
  109. package/dist/bundle/{server-7ZB5AK5H.js → server-OEEGRSQD.js} +47 -47
  110. package/dist/bundle/{services-Z4UWN64R.js → services-Q6SFESMS.js} +43 -28
  111. package/dist/bundle/{speech-XSYVCKR3.js → speech-PBVEIG4N.js} +12 -12
  112. package/dist/bundle/{sqlite-runtime-GAPXJNWU.js → sqlite-runtime-IWR65V6I.js} +3 -3
  113. package/dist/bundle/{state-QSA53EF5.js → state-G54C2N6U.js} +3 -3
  114. package/dist/bundle/{store-NOF5EYUC.js → store-7EWMPTTW.js} +20 -16
  115. package/dist/bundle/{store-EKI4OAJH.js → store-D5OLXIFW.js} +14 -14
  116. package/dist/bundle/store-connection-34747SCC.js +90 -0
  117. package/dist/bundle/store-maintenance-command-QBO67F7Z.js +65 -0
  118. package/dist/bundle/{tokens-WJQYQ3FK.js → tokens-J7TFHLEG.js} +4 -4
  119. package/dist/bundle/zm.js +2 -2
  120. package/dist/bundle/{zoom-app-Y7RMWLVU.js → zoom-app-SULPMVN4.js} +2 -2
  121. package/dist/recording-schedule-commands.d.ts.map +1 -1
  122. package/dist/recording-schedule-commands.js +2 -2
  123. package/dist/recording-schedule-commands.js.map +1 -1
  124. package/dist/version.d.ts +1 -1
  125. package/dist/version.js +1 -1
  126. package/package.json +2 -2
  127. package/dist/bundle/answer-policy-W6H72X2R.js +0 -112
  128. package/dist/bundle/chunk-2BAZRRJP.js +0 -1239
  129. package/dist/bundle/chunk-KQD4ZVNC.js +0 -153
  130. package/dist/bundle/chunk-R5FTCNLJ.js +0 -76
  131. package/dist/bundle/chunk-USIMMGWS.js +0 -997
  132. package/dist/bundle/command-contract-FJDDCHYP.js +0 -43
  133. package/dist/bundle/config-4DZHX2WX.js +0 -99
  134. package/dist/bundle/first-screen-XYESRGWW.js +0 -41
  135. package/dist/bundle/server-GGRGD4SH.js +0 -77
  136. package/dist/bundle/store-connection-2OZQGEIO.js +0 -92
  137. package/dist/bundle/store-maintenance-command-GNX3SOZ6.js +0 -67
@@ -1,5 +1,11 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ ancestorValue,
5
+ envName,
6
+ readOnlyLockOf,
7
+ readOnlyRefusal
8
+ } from "./chunk-ZBYKCVSV.js";
3
9
  import {
4
10
  currentCaller,
5
11
  endpointTemplate,
@@ -9,46 +15,10 @@ import {
9
15
  providerErrorKey,
10
16
  renderEvent,
11
17
  runContextOf
12
- } from "./chunk-ILDGZBZD.js";
18
+ } from "./chunk-DUPFAY35.js";
13
19
  import {
14
20
  permissionCeiling
15
- } from "./chunk-6NI4FE5G.js";
16
- import {
17
- fieldsOf,
18
- projectFields,
19
- resolveOutput
20
- } from "./chunk-KQD4ZVNC.js";
21
- import {
22
- carries
23
- } from "./chunk-UIKVP23D.js";
24
- import {
25
- DEFAULT_HISTORY_LIMITS,
26
- DEFAULT_RERANK_MODEL,
27
- HISTORY_MAX_DAYS,
28
- IMAGE_MODELS,
29
- RERANK_MODELS,
30
- WEIGHTS,
31
- agenda,
32
- attachment,
33
- closeSuggestion,
34
- conversation,
35
- hitFile,
36
- modelSettingsShape,
37
- parseDuration,
38
- progressOf,
39
- resolveModelSettings,
40
- runBudget,
41
- stopWrites,
42
- tagging,
43
- task,
44
- withWriteScope
45
- } from "./chunk-USIMMGWS.js";
46
- import {
47
- ancestorValue,
48
- envName,
49
- readOnlyLockOf,
50
- readOnlyRefusal
51
- } from "./chunk-MOKEB656.js";
21
+ } from "./chunk-HKPNQL52.js";
52
22
  import {
53
23
  CEILING_KEY,
54
24
  COMMAND_PATH_KEY,
@@ -56,16 +26,26 @@ import {
56
26
  RESOURCES,
57
27
  RESOURCE_KEY,
58
28
  assertOverridesTighten,
29
+ fieldsOf,
59
30
  keyForCommand,
60
31
  layerPermissions,
61
- permissionOverrides
62
- } from "./chunk-OMLVWOEF.js";
32
+ permissionOverrides,
33
+ projectFields,
34
+ resolveOutput
35
+ } from "./chunk-P6MQ6FS4.js";
36
+ import {
37
+ carries
38
+ } from "./chunk-WQOGHND4.js";
63
39
  import {
64
40
  endpoint
65
- } from "./chunk-LQYMN36C.js";
41
+ } from "./chunk-SR5X7YKB.js";
66
42
  import {
67
43
  note
68
- } from "./chunk-6WUTUCKH.js";
44
+ } from "./chunk-RKI4BGWG.js";
45
+ import {
46
+ filesPresent,
47
+ sharedModelsDirectory
48
+ } from "./chunk-FBYGBR4Q.js";
69
49
  import {
70
50
  CATEGORIES,
71
51
  FACT_STATUSES,
@@ -111,11 +91,11 @@ import {
111
91
  typedCommand,
112
92
  untrusted,
113
93
  useAsProcessRun
114
- } from "./chunk-LSVQCI6V.js";
94
+ } from "./chunk-IO3BQ6JU.js";
115
95
  import {
116
96
  isCliFailure,
117
97
  storeDamaged
118
- } from "./chunk-UYBLNGZ2.js";
98
+ } from "./chunk-3YKAFLXY.js";
119
99
  import {
120
100
  BUSINESS_KINDS,
121
101
  CRM_ACTIVITY_KINDS,
@@ -129,14 +109,18 @@ import {
129
109
  ORDER_PURPOSES,
130
110
  ORDER_STATUSES,
131
111
  RELATION_KINDS,
132
- STANDINGS
133
- } from "./chunk-QS6DWXDB.js";
112
+ STANDINGS,
113
+ TAG_TYPES
114
+ } from "./chunk-IMDTC4MD.js";
134
115
  import {
135
- sharedConfigPath
136
- } from "./chunk-VPPNYUQM.js";
116
+ readSharedSection,
117
+ repairConfigText,
118
+ sharedConfigPath,
119
+ writeSharedSection
120
+ } from "./chunk-L5UILROP.js";
137
121
  import {
138
122
  storePath
139
- } from "./chunk-ERQRY6WZ.js";
123
+ } from "./chunk-A3Q3PG54.js";
140
124
  import {
141
125
  FACT_TYPES,
142
126
  MEETING_RESULT_ENTITIES,
@@ -154,7 +138,7 @@ import {
154
138
  meetingStats,
155
139
  meetingSummary,
156
140
  meetingTranscript
157
- } from "./chunk-IKNOTHG2.js";
141
+ } from "./chunk-3YRPDNWK.js";
158
142
  import {
159
143
  FIELD_TYPES,
160
144
  QUERY_BACKENDS,
@@ -179,6 +163,7 @@ import {
179
163
  defineSteps,
180
164
  effectsSchema,
181
165
  exitCodeOfAnswer,
166
+ getDotPath,
182
167
  integer,
183
168
  isoDate,
184
169
  isoTime,
@@ -210,6 +195,7 @@ import {
210
195
  regex,
211
196
  safeInteger,
212
197
  safeParse,
198
+ startsWith,
213
199
  stepOf,
214
200
  strictObject,
215
201
  string,
@@ -217,11 +203,13 @@ import {
217
203
  union,
218
204
  unknown,
219
205
  unwrap,
206
+ url,
220
207
  variant,
221
208
  writes
222
209
  } from "./chunk-4RJL32PF.js";
223
210
  import {
224
- CliError
211
+ CliError,
212
+ isCliError
225
213
  } from "./chunk-EA2OB75T.js";
226
214
  import {
227
215
  visibleControls
@@ -250,8 +238,8 @@ var snake = /* @__PURE__ */ __name((name) => name.replace(/[A-Z]/g, (letter) =>
250
238
  var stepTargets = /* @__PURE__ */ __name((root) => {
251
239
  const found = /* @__PURE__ */ new Map();
252
240
  const optionName = /* @__PURE__ */ __name((option) => snake((option.long ?? option.attributeName()).replace(/^--/, "")), "optionName");
253
- const visit2 = /* @__PURE__ */ __name((command, parents, above) => {
254
- const path2 = [...parents, command.name()];
241
+ const visit2 = /* @__PURE__ */ __name((command, parents2, above) => {
242
+ const path2 = [...parents2, command.name()];
255
243
  const options = [...above, ...command.options];
256
244
  const { effects } = metaOf(command);
257
245
  found.set(path2.join(" "), {
@@ -273,8 +261,8 @@ var describeAlone = /* @__PURE__ */ __name((command, known) => {
273
261
  }
274
262
  return found;
275
263
  }, "describeAlone");
276
- var describe = /* @__PURE__ */ __name((command, cli, parents, above, known) => {
277
- const path2 = [...parents, command.name()];
264
+ var describe = /* @__PURE__ */ __name((command, cli, parents2, above, known) => {
265
+ const path2 = [...parents2, command.name()];
278
266
  const args = command.registeredArguments.map(describeArgument);
279
267
  const options = describeOptions(command);
280
268
  const { origin = "handwritten", query, mcp, offline, ...meta } = metaOf(command);
@@ -4025,7 +4013,32 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
4025
4013
  }
4026
4014
  }, "refuseJoinedPath");
4027
4015
 
4028
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
4016
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
4017
+ var WEIGHTS = {
4018
+ bot: 3,
4019
+ scam: 3,
4020
+ fake: 3,
4021
+ deleted: 1,
4022
+ no_photo: 1,
4023
+ no_username: 1,
4024
+ odd_name: 1,
4025
+ never_wrote: 1,
4026
+ link_first: 2,
4027
+ burst_join: 1,
4028
+ mass_invited: 1,
4029
+ new_account: 2,
4030
+ no_bio: 1,
4031
+ same_text: 2,
4032
+ photo_recent: 1,
4033
+ cas_banned: 3,
4034
+ lols_banned: 3,
4035
+ lols_scammer: 3
4036
+ };
4037
+ var LINK = /https?:\/\/|t\.me\/|www\./i;
4038
+ var DIGITS = /\d{5,}/;
4039
+ var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
4040
+
4041
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
4029
4042
  var linkedIdentity = strictObject({
4030
4043
  provider: text,
4031
4044
  id,
@@ -4080,7 +4093,7 @@ var contactCheck = strictObject({
4080
4093
  checked_at: time
4081
4094
  });
4082
4095
 
4083
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/member.js
4096
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/member.js
4084
4097
  var member = strictObject({
4085
4098
  id,
4086
4099
  name: nullable(text),
@@ -4103,7 +4116,7 @@ var member = strictObject({
4103
4116
  check: optional(record(string(), unknown()))
4104
4117
  });
4105
4118
 
4106
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/chat.js
4119
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/chat.js
4107
4120
  var setting = optional(nullable(boolean()));
4108
4121
  var chat = strictObject({
4109
4122
  ref: reference,
@@ -4144,7 +4157,52 @@ var chat = strictObject({
4144
4157
  members: optional(array(member))
4145
4158
  });
4146
4159
 
4147
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/message.js
4160
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/attachment.js
4161
+ var attachment = strictObject({
4162
+ /** The message it came with, as a locator; absent inside that message. */
4163
+ message: optional(reference),
4164
+ /** Lower-cased: `photo`, `video`, `file`, `voice`… */
4165
+ kind: text,
4166
+ /** Its place among the message's attachments, from 1, as `attachments show --attachment` takes it. */
4167
+ position: optional(count),
4168
+ url: optional(text),
4169
+ name: optional(text),
4170
+ title: optional(text),
4171
+ mime: optional(text),
4172
+ size: optional(count),
4173
+ width: optional(count),
4174
+ height: optional(count),
4175
+ /** Seconds, for audio and video. */
4176
+ duration: optional(number()),
4177
+ /** The text read out of it; how it was read is `extraction`. */
4178
+ text: optional(text),
4179
+ extraction: optional(strictObject({ origin: text, extractor: text, chars: count, error: optional(text) })),
4180
+ local_path: optional(text),
4181
+ /** A shared contact card (`kind: "contact"`); the phone is the whole number as the sender put it. */
4182
+ contact: optional(strictObject({
4183
+ name: text,
4184
+ first_name: optional(text),
4185
+ last_name: optional(text),
4186
+ phone: optional(text),
4187
+ user_id: optional(id)
4188
+ })),
4189
+ /** A bot's keyboard under the message, row by row; `messages press` presses one. */
4190
+ buttons: optional(array(array(strictObject({
4191
+ kind: picklist(["callback", "link", "message", "chat", "contact", "location", "app", "clipboard", "other"]),
4192
+ text,
4193
+ url: optional(text)
4194
+ }))))
4195
+ });
4196
+ var hitFile = strictObject({
4197
+ position: count,
4198
+ kind: text,
4199
+ name: optional(text),
4200
+ size: optional(count),
4201
+ /** The saved copy on this computer, once `messages download` fetched it; absent until then. */
4202
+ local_path: optional(text)
4203
+ });
4204
+
4205
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/message.js
4148
4206
  var quoted = strictObject({
4149
4207
  id,
4150
4208
  sender_id: nullable(id),
@@ -4263,7 +4321,7 @@ var message = strictObject({
4263
4321
  provider_metadata: providerMetadata
4264
4322
  });
4265
4323
 
4266
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/recorded-meeting.js
4324
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/recorded-meeting.js
4267
4325
  var recordedMeeting = strictObject({
4268
4326
  ref: reference,
4269
4327
  meeting_id: count,
@@ -4276,7 +4334,7 @@ var recordedMeeting = strictObject({
4276
4334
  people: array(reference)
4277
4335
  });
4278
4336
 
4279
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
4337
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
4280
4338
  var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
4281
4339
  var contextMessage = strictObject({
4282
4340
  locator: reference,
@@ -4482,7 +4540,7 @@ var contactPreparation = strictObject({
4482
4540
  })
4483
4541
  });
4484
4542
 
4485
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/deal.js
4543
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/deal.js
4486
4544
  var nullableText = nullable(text);
4487
4545
  var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
4488
4546
  var outcome = picklist(["open", "won", "lost"]);
@@ -4593,7 +4651,7 @@ var stage = strictObject({
4593
4651
  untrusted
4594
4652
  });
4595
4653
 
4596
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/business-context.js
4654
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/business-context.js
4597
4655
  var nullableText2 = nullable(text);
4598
4656
  var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
4599
4657
  var standing = picklist(STANDINGS);
@@ -4767,7 +4825,7 @@ var dealBrief = strictObject({
4767
4825
  not_read: coverage2.entries.not_read
4768
4826
  });
4769
4827
 
4770
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/list-results.js
4828
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/list-results.js
4771
4829
  var botProfile = strictObject({
4772
4830
  name: text,
4773
4831
  token: text,
@@ -4891,7 +4949,7 @@ var stickerInventory = strictObject({
4891
4949
  url: optional(nullable(text))
4892
4950
  });
4893
4951
 
4894
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
4952
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
4895
4953
  var actionableError = objectWithRest({
4896
4954
  code: text,
4897
4955
  message: text,
@@ -4908,7 +4966,7 @@ var batchResult = strictObject({
4908
4966
  max_error_percent: count
4909
4967
  });
4910
4968
 
4911
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
4969
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
4912
4970
  var conversationBuild = strictObject({
4913
4971
  chat: id,
4914
4972
  messages: count,
@@ -4933,13 +4991,53 @@ var catchUpPreparation = strictObject({
4933
4991
  prepared: optional(conversationPreparation)
4934
4992
  });
4935
4993
 
4936
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
4994
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
4937
4995
  import { spawn } from "node:child_process";
4938
4996
  import { randomBytes } from "node:crypto";
4939
- import { closeSync, existsSync, mkdirSync, openSync, readdirSync, readFileSync, realpathSync, rmSync } from "node:fs";
4940
- import { dirname, join } from "node:path";
4997
+ import { closeSync, existsSync as existsSync2, mkdirSync, openSync, readdirSync, readFileSync as readFileSync2, realpathSync, rmSync as rmSync2 } from "node:fs";
4998
+ import { dirname, join as join2 } from "node:path";
4999
+
5000
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/background/checkpoints.js
5001
+ import { existsSync, readFileSync, rmSync } from "node:fs";
5002
+ import { join } from "node:path";
5003
+ var PART = /^[\w@+-][\w.@+-]{0,99}$/;
5004
+ var checkpointPath = /* @__PURE__ */ __name((state, profile, job2) => {
5005
+ for (const part of [profile, job2]) {
5006
+ if (!PART.test(part) || part.includes("..")) {
5007
+ throw new CliError("validation_error", `a checkpoint is named by letters, digits, ".", "@" and "-" \u2014 not "${part}"`);
5008
+ }
5009
+ }
5010
+ return join(state, "checkpoints", profile, `${job2}.json`);
5011
+ }, "checkpointPath");
5012
+ var readCheckpoint = /* @__PURE__ */ __name((path2) => {
5013
+ try {
5014
+ return existsSync(path2) ? JSON.parse(readFileSync(path2, "utf8")) : void 0;
5015
+ } catch {
5016
+ return void 0;
5017
+ }
5018
+ }, "readCheckpoint");
5019
+ var saveCheckpoint = /* @__PURE__ */ __name((path2, point, now = /* @__PURE__ */ new Date()) => {
5020
+ const saved = { ...point, updated_at: now.toISOString() };
5021
+ writeSecurely(path2, `${JSON.stringify(saved, null, 2)}
5022
+ `, 384);
5023
+ return saved;
5024
+ }, "saveCheckpoint");
5025
+ var progressOf = /* @__PURE__ */ __name((input) => {
5026
+ const total = input.total ?? null;
5027
+ const updated = input.updatedAt ?? null;
5028
+ return {
5029
+ job: input.job,
5030
+ profile: input.profile,
5031
+ done: input.done,
5032
+ total,
5033
+ remaining: total === null ? null : Math.max(0, total - input.done),
5034
+ state: input.complete ?? (total !== null && input.done >= total) ? "complete" : "partial",
5035
+ updated_at: updated,
5036
+ cursor_age_ms: updated === null ? null : Math.max(0, (input.now ?? /* @__PURE__ */ new Date()).getTime() - Date.parse(updated))
5037
+ };
5038
+ }, "progressOf");
4941
5039
 
4942
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/record-log.js
5040
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/record-log.js
4943
5041
  var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
4944
5042
  const run = currentRun();
4945
5043
  const trace = traceId ?? run.traceId;
@@ -4953,7 +5051,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
4953
5051
  }));
4954
5052
  }, "recordLogFor");
4955
5053
 
4956
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
5054
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
4957
5055
  var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
4958
5056
  var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
4959
5057
  const out = openSync(log, "a", 384);
@@ -4969,23 +5067,23 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
4969
5067
  closeSync(out);
4970
5068
  }
4971
5069
  }, "spawnDetached");
4972
- var jobsDir = /* @__PURE__ */ __name((app, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
4973
- var jobPath = /* @__PURE__ */ __name((dir, id6) => join(dir, `${id6}.json`), "jobPath");
5070
+ var jobsDir = /* @__PURE__ */ __name((app, env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
5071
+ var jobPath = /* @__PURE__ */ __name((dir, id6) => join2(dir, `${id6}.json`), "jobPath");
4974
5072
  var saveJob = /* @__PURE__ */ __name((dir, job2) => {
4975
5073
  mkdirSync(dir, { recursive: true, mode: 448 });
4976
5074
  writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
4977
5075
  `, 384);
4978
5076
  }, "saveJob");
4979
5077
  var readJob = /* @__PURE__ */ __name((dir, id6) => {
4980
- if (!/^[\w-]+$/.test(id6) || !existsSync(jobPath(dir, id6)))
5078
+ if (!/^[\w-]+$/.test(id6) || !existsSync2(jobPath(dir, id6)))
4981
5079
  return void 0;
4982
5080
  try {
4983
- return JSON.parse(readFileSync(jobPath(dir, id6), "utf8"));
5081
+ return JSON.parse(readFileSync2(jobPath(dir, id6), "utf8"));
4984
5082
  } catch {
4985
5083
  return void 0;
4986
5084
  }
4987
5085
  }, "readJob");
4988
- var recordsPath = /* @__PURE__ */ __name((dir, id6) => join(dir, `${id6}.jsonl`), "recordsPath");
5086
+ var recordsPath = /* @__PURE__ */ __name((dir, id6) => join2(dir, `${id6}.jsonl`), "recordsPath");
4989
5087
  var tracedJob = /* @__PURE__ */ __name((env) => {
4990
5088
  const trace = childTrace();
4991
5089
  return { env: { ...env, TRACEPARENT: trace.traceparent }, traceId: trace.traceId };
@@ -5017,12 +5115,12 @@ var updateJob = /* @__PURE__ */ __name((dir, id6, change) => {
5017
5115
  saveJob(dir, { ...job2, ...change });
5018
5116
  }, "updateJob");
5019
5117
  var removeJob = /* @__PURE__ */ __name((dir, job2) => {
5020
- rmSync(jobPath(dir, job2.id), { force: true });
5021
- rmSync(recordsPath(dir, job2.id), { force: true });
5118
+ rmSync2(jobPath(dir, job2.id), { force: true });
5119
+ rmSync2(recordsPath(dir, job2.id), { force: true });
5022
5120
  if (dirname(job2.log) === dir)
5023
- rmSync(job2.log, { force: true });
5121
+ rmSync2(job2.log, { force: true });
5024
5122
  }, "removeJob");
5025
- var listJobs = /* @__PURE__ */ __name((dir) => existsSync(dir) ? readdirSync(dir).filter((name) => name.endsWith(".json")).flatMap((name) => readJob(dir, name.slice(0, -".json".length)) ?? []).sort((a, b) => b.startedAt.localeCompare(a.startedAt)) : [], "listJobs");
5123
+ var listJobs = /* @__PURE__ */ __name((dir) => existsSync2(dir) ? readdirSync(dir).filter((name) => name.endsWith(".json")).flatMap((name) => readJob(dir, name.slice(0, -".json".length)) ?? []).sort((a, b) => b.startedAt.localeCompare(a.startedAt)) : [], "listJobs");
5026
5124
  var jobDetails = /* @__PURE__ */ __name((job2) => ({
5027
5125
  job: job2.id,
5028
5126
  profile: job2.profile,
@@ -5088,7 +5186,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
5088
5186
  const startedAt = (/* @__PURE__ */ new Date()).toISOString();
5089
5187
  const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes(3).toString("hex")}`;
5090
5188
  mkdirSync(dir, { recursive: true, mode: 448 });
5091
- const log = join(dir, `${id6}.log`);
5189
+ const log = join2(dir, `${id6}.log`);
5092
5190
  const job2 = {
5093
5191
  id: id6,
5094
5192
  chat: input.chat,
@@ -5108,7 +5206,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
5108
5206
  return { job: id6, pid, chat: input.chat, log };
5109
5207
  }, "startArchiveJob");
5110
5208
 
5111
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/job.js
5209
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/job.js
5112
5210
  var problem = strictObject({ code: text, message: text });
5113
5211
  var job = strictObject({
5114
5212
  id,
@@ -5131,7 +5229,7 @@ var job = strictObject({
5131
5229
  error: optional(problem)
5132
5230
  });
5133
5231
 
5134
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
5232
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
5135
5233
  var extractionItem = strictObject({
5136
5234
  ref: reference,
5137
5235
  attachment: count,
@@ -5164,7 +5262,7 @@ var extractionReport = strictObject({
5164
5262
  cursor: optional(text)
5165
5263
  });
5166
5264
 
5167
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
5265
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
5168
5266
  var savedMessageFile = strictObject({
5169
5267
  kind: text,
5170
5268
  path: text,
@@ -5251,7 +5349,7 @@ var messageSyncAll = strictObject({
5251
5349
  var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
5252
5350
  var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
5253
5351
 
5254
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/store-records.js
5352
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/store-records.js
5255
5353
  var range = strictObject({ from: number(), to: number() });
5256
5354
  var storeChatStatus = strictObject({
5257
5355
  chat_id: id,
@@ -5349,7 +5447,7 @@ var storeJobRetry = union([
5349
5447
  ]);
5350
5448
  var storeJobClear = strictObject({ cleared: array(id) });
5351
5449
 
5352
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/account.js
5450
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/account.js
5353
5451
  var account = strictObject({
5354
5452
  provider: text,
5355
5453
  id,
@@ -5359,7 +5457,7 @@ var account = strictObject({
5359
5457
  scope: optional(picklist(["personal", "work"]))
5360
5458
  });
5361
5459
 
5362
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/account-session.js
5460
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/account-session.js
5363
5461
  var accountSession = strictObject({
5364
5462
  current: boolean(),
5365
5463
  client: nullable(text),
@@ -5369,7 +5467,7 @@ var accountSession = strictObject({
5369
5467
  created_at: optional(nullable(time))
5370
5468
  });
5371
5469
 
5372
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/account-change.js
5470
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/account-change.js
5373
5471
  var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
5374
5472
  var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
5375
5473
  var audience = picklist(["everyone", "contacts", "nobody"]);
@@ -5398,7 +5496,7 @@ var accountRemoval = strictObject({
5398
5496
  kept: array(strictObject({ kind: removalKind, target: text, reason: text }))
5399
5497
  });
5400
5498
 
5401
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
5499
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
5402
5500
  var accountProfile = strictObject({
5403
5501
  profile: id,
5404
5502
  current: boolean(),
@@ -5410,7 +5508,7 @@ var accountProfile = strictObject({
5410
5508
  bot: optional(literal(true))
5411
5509
  });
5412
5510
 
5413
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
5511
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
5414
5512
  var milliseconds = pipe(number(), minValue(0));
5415
5513
  var counterReading = strictObject({
5416
5514
  counter: picklist(["views", "reactions", "comments"]),
@@ -5422,7 +5520,7 @@ var counterReading = strictObject({
5422
5520
  });
5423
5521
  var selection = record(string(), unknown());
5424
5522
 
5425
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
5523
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
5426
5524
  var adminRow = strictObject({
5427
5525
  ref: reference,
5428
5526
  /** What `stats * evidence` takes: a person id, a stay or a message locator. */
@@ -5475,11 +5573,143 @@ var adminReport = strictObject({
5475
5573
  rows: array(adminRow)
5476
5574
  });
5477
5575
 
5478
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
5576
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/task.js
5577
+ var closeSuggestion = strictObject({
5578
+ as: picklist(["done", "dismissed"]),
5579
+ /** The agent's name. */
5580
+ by: text,
5581
+ /** 0–1, as the agent rated it. */
5582
+ certainty: number(),
5583
+ reason: nullable(text),
5584
+ at: time
5585
+ });
5586
+ var task = strictObject({
5587
+ ref: reference,
5588
+ id,
5589
+ /** The readable key: `Q-15` for a task found in a message from now on, `IN1A2B3C4D-17` before, `HRB-12` in a project. */
5590
+ key: optional(nullable(text)),
5591
+ title: nullable(text),
5592
+ description: optional(nullable(text)),
5593
+ kind: picklist(TASK_TYPES),
5594
+ state: picklist(TASK_STATES),
5595
+ origin: optional(picklist(TASK_ORIGINS)),
5596
+ project: optional(nullable(text)),
5597
+ /** The project's key and name, as `tasks counts` names it. */
5598
+ project_key: optional(nullable(text)),
5599
+ project_name: optional(nullable(text)),
5600
+ /** Who added it: the owner, or an agent by its bot name. */
5601
+ created_by: optional(nullable(strictObject({ type: picklist(["person", "bot"]), id, name: nullable(text), owner: boolean() }))),
5602
+ account: optional(text),
5603
+ /** The chat it came from, as a `chat:` reference. */
5604
+ chat: optional(nullable(reference)),
5605
+ /** The message it came from. */
5606
+ source_message: optional(nullable(reference)),
5607
+ /** `<service>:<id>`, its id in an outside service, such as `avito:4512345678`. */
5608
+ external_id: optional(nullable(text)),
5609
+ /** The http or https page it is about, such as an Avito ad. */
5610
+ source_url: optional(nullable(text)),
5611
+ /** 0 to 1, higher first; `priority_label` reads it as low, medium, high or critical. */
5612
+ priority: optional(nullable(number())),
5613
+ priority_label: optional(nullable(picklist(PRIORITY_LABELS))),
5614
+ /** The agent working on it, apart from its assignees and its claim. */
5615
+ agent: optional(nullable(text)),
5616
+ /** Give it back with `--revision` to refuse a write made on a stale copy. */
5617
+ revision: optional(number()),
5618
+ assignments: optional(array(strictObject({ to: reference, role: picklist(["assignee", "reviewer", "watcher"]) }))),
5619
+ /** Open work whose blocked-by tasks are all done. */
5620
+ ready: optional(boolean()),
5621
+ /** The blocked-by tasks not done yet: open (any open state), dismissed, or unavailable. */
5622
+ blocked_by: optional(array(strictObject({ task: reference, state: picklist(["open", "dismissed", "unavailable"]) }))),
5623
+ parent: optional(nullable(reference)),
5624
+ due_at: optional(nullable(time)),
5625
+ closed_at: optional(nullable(time)),
5626
+ reason: optional(nullable(text)),
5627
+ /** One name from the category list (`tasks categories`). */
5628
+ category: optional(nullable(text)),
5629
+ /** Who works on it now, and until when; null when nobody does. */
5630
+ claimed_by: optional(nullable(text)),
5631
+ claimed_until: optional(nullable(time)),
5632
+ /** The close an agent would make, waiting on the owner: `tasks close` confirms it, `tasks reject` refuses it. */
5633
+ close_suggestion: optional(nullable(closeSuggestion)),
5634
+ created_at: time,
5635
+ updated_at: optional(time)
5636
+ });
5637
+
5638
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/agenda.js
5639
+ var agendaChat = strictObject({
5640
+ chat: reference,
5641
+ title: nullable(text),
5642
+ kind: picklist(["dialog", "group", "channel", "saved", "unknown"]),
5643
+ /** The newest message, never its text; `null` while it is not stored. */
5644
+ last_message: nullable(reference),
5645
+ last_message_at: time,
5646
+ /** `null` when the newest message is not stored, or the messenger did not say who sent it. */
5647
+ last_from_owner: nullable(boolean()),
5648
+ /** Open tasks whose source is in this chat. */
5649
+ open_tasks: array(id),
5650
+ /** `unknown` means nothing ever fetched the chat's history; `partial` that the store holds only part of it. */
5651
+ completeness: strictObject({
5652
+ state: picklist(["complete", "partial", "unknown"]),
5653
+ up_to_date: nullable(boolean()),
5654
+ gaps: boolean(),
5655
+ reaches_start: boolean(),
5656
+ fetched_at: nullable(time)
5657
+ }),
5658
+ /** What the store holds of the chat: the count and the span, never the text. */
5659
+ held: strictObject({ messages: number(), oldest_at: nullable(time), newest_at: nullable(time) })
5660
+ });
5661
+ var agenda = strictObject({
5662
+ at: time,
5663
+ account: text,
5664
+ stored_at: nullable(time),
5665
+ /** The store saved nothing for a day: a chat may look quiet only because nothing was synced. */
5666
+ stale: boolean(),
5667
+ tasks: array(strictObject({
5668
+ id,
5669
+ key: text,
5670
+ title: nullable(text),
5671
+ kind: picklist(TASK_TYPES),
5672
+ category: nullable(text),
5673
+ /** The message or note it came from. */
5674
+ source: nullable(reference),
5675
+ due_at: nullable(time),
5676
+ next_check_at: nullable(time),
5677
+ /** Who works on it now; only the asker's own claims are listed unless the query names claimed:. */
5678
+ claimed_by: nullable(text),
5679
+ claimed_until: nullable(time),
5680
+ /** An agent's close waiting on the owner: `tasks close` confirms it, `tasks reject` refuses it. */
5681
+ close_suggestion: nullable(closeSuggestion),
5682
+ created_at: time,
5683
+ reasons: array(picklist(["overdue", "due", "check", "unplanned", "close-suggested"]))
5684
+ })),
5685
+ /** Someone else wrote last, and the owner has not answered. */
5686
+ owed: array(agendaChat),
5687
+ /** The owner wrote last, and nobody answered. */
5688
+ waiting: array(agendaChat),
5689
+ /** The chat list says these moved and their newest message is not stored: read them first. */
5690
+ unsynced: array(agendaChat),
5691
+ /** Open tasks someone else does: what they owe the owner, oldest first. */
5692
+ assigned: array(strictObject({
5693
+ id,
5694
+ key: text,
5695
+ title: nullable(text),
5696
+ kind: picklist(TASK_TYPES),
5697
+ category: nullable(text),
5698
+ source: nullable(reference),
5699
+ due_at: nullable(time),
5700
+ created_at: time,
5701
+ /** `person:<id>`, each one who does it. */
5702
+ assignees: array(reference)
5703
+ })),
5704
+ /** Open tasks carry these categories, which the list no longer holds: move them, or put the category back. */
5705
+ unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
5706
+ });
5707
+
5708
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
5479
5709
  var analysisConsent = strictObject({ chat: id, provider: text, at: time });
5480
5710
  var analysisConsentRevocation = strictObject({ revoked: boolean() });
5481
5711
 
5482
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
5712
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
5483
5713
  var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
5484
5714
  var attachmentBytes = strictObject({
5485
5715
  ref: reference,
@@ -5510,7 +5740,7 @@ var attachmentTextChange = strictObject({
5510
5740
  text: optional(text)
5511
5741
  });
5512
5742
 
5513
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/chart.js
5743
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/chart.js
5514
5744
  var chart = strictObject({
5515
5745
  version: literal(1),
5516
5746
  kind: picklist(["bar", "line", "grouped-bar"]),
@@ -5525,7 +5755,7 @@ var chart = strictObject({
5525
5755
  file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
5526
5756
  });
5527
5757
 
5528
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/folder.js
5758
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/folder.js
5529
5759
  var named = strictObject({
5530
5760
  id,
5531
5761
  title: nullable(text),
@@ -5548,7 +5778,7 @@ var folder = strictObject({
5548
5778
  excluded_chats: optional(array(named))
5549
5779
  });
5550
5780
 
5551
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
5781
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
5552
5782
  var inviteLink = strictObject({
5553
5783
  link: text,
5554
5784
  /** Who joins by it asks first, and an admin lets them in. */
@@ -5564,7 +5794,7 @@ var inviteLink = strictObject({
5564
5794
  joined_count: optional(count)
5565
5795
  });
5566
5796
 
5567
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
5797
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
5568
5798
  var operated = { operation_id: id, chat_id: id };
5569
5799
  var group = strictObject({
5570
5800
  ...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
@@ -5644,7 +5874,7 @@ var chatFolderOrder = strictObject({
5644
5874
  folders: array(strictObject({ id, title: text }))
5645
5875
  });
5646
5876
 
5647
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
5877
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
5648
5878
  var operated2 = { operation_id: id, chat_id: id };
5649
5879
  var chatRemoval = strictObject(operated2);
5650
5880
  var chatMuting = strictObject({
@@ -5655,7 +5885,7 @@ var chatArchive = strictObject({ ...operated2, archived: boolean() });
5655
5885
  var chatPin = strictObject({ ...operated2, pinned: boolean() });
5656
5886
  var chatUnread = strictObject({ ...operated2, unread: literal(true) });
5657
5887
 
5658
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
5888
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
5659
5889
  var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
5660
5890
  var chatEvent = strictObject({
5661
5891
  chat_id: id,
@@ -5672,7 +5902,7 @@ var chatEvent = strictObject({
5672
5902
  before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
5673
5903
  });
5674
5904
 
5675
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
5905
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
5676
5906
  var chatMetadata = strictObject({
5677
5907
  chat_id: id,
5678
5908
  title: nullable(text),
@@ -5687,7 +5917,7 @@ var chatMetadataRefresh = strictObject({
5687
5917
  has_more: boolean()
5688
5918
  });
5689
5919
 
5690
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
5920
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
5691
5921
  var action = picklist(["report", "delete", "remove"]);
5692
5922
  var level = picklist(["deny", "readonly", "ask", "allow"]);
5693
5923
  var chatRules = strictObject({
@@ -5724,7 +5954,7 @@ var chatModeration = strictObject({
5724
5954
  }))
5725
5955
  });
5726
5956
 
5727
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
5957
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
5728
5958
  var optionalCount = optional(count);
5729
5959
  var minutes = nullable(number());
5730
5960
  var chatStats = strictObject({
@@ -5800,7 +6030,7 @@ var taskStats = strictObject({
5800
6030
  }))
5801
6031
  });
5802
6032
 
5803
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
6033
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
5804
6034
  var memberCount = strictObject({
5805
6035
  day: pipe(text, isoDate()),
5806
6036
  participants: nullable(count),
@@ -5823,7 +6053,7 @@ var chatTracking = strictObject({
5823
6053
  tracked: boolean()
5824
6054
  });
5825
6055
 
5826
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
6056
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
5827
6057
  var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
5828
6058
  var contactSync = strictObject({ added: count, changed: count, known: count });
5829
6059
  var profileFields = {
@@ -5861,7 +6091,7 @@ var profileFields = {
5861
6091
  }))
5862
6092
  };
5863
6093
 
5864
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/contact.js
6094
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/contact.js
5865
6095
  var contact = strictObject({
5866
6096
  ref: reference,
5867
6097
  id,
@@ -5892,7 +6122,7 @@ var contact = strictObject({
5892
6122
  notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
5893
6123
  });
5894
6124
 
5895
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
6125
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
5896
6126
  var contactNote = strictObject({
5897
6127
  id,
5898
6128
  /** The contact, as a `contact:` reference. */
@@ -5904,13 +6134,28 @@ var contactNote = strictObject({
5904
6134
  updated_at: time
5905
6135
  });
5906
6136
 
5907
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
6137
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
5908
6138
  var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
5909
6139
  var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
5910
6140
  var contactStateChange = strictObject({ operation_id: id, person_id: id });
5911
6141
  var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
5912
6142
 
5913
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
6143
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/conversation.js
6144
+ var conversation = strictObject({
6145
+ id,
6146
+ chat: reference,
6147
+ /** The message it starts with. */
6148
+ first_message: reference,
6149
+ started_at: time,
6150
+ ended_at: time,
6151
+ messages_count: count,
6152
+ /** How many people wrote in it. */
6153
+ senders_count: count,
6154
+ built_at: time,
6155
+ rules_version: count
6156
+ });
6157
+
6158
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
5914
6159
  var conversationDetails = union([
5915
6160
  strictObject({ ...conversation.entries, messages: array(message) }),
5916
6161
  message
@@ -6000,7 +6245,7 @@ var conversationHit = strictObject({
6000
6245
  stale: boolean()
6001
6246
  });
6002
6247
 
6003
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/counters.js
6248
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/counters.js
6004
6249
  var counters = strictObject({
6005
6250
  cutoff: time,
6006
6251
  max_age_ms: milliseconds,
@@ -6030,7 +6275,7 @@ var counterRefresh = strictObject({
6030
6275
  complete: optional(boolean())
6031
6276
  });
6032
6277
 
6033
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/document.js
6278
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/document.js
6034
6279
  var document = strictObject({
6035
6280
  ref: reference,
6036
6281
  id,
@@ -6045,7 +6290,7 @@ var document = strictObject({
6045
6290
  owners: optional(array(text))
6046
6291
  });
6047
6292
 
6048
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/document-link.js
6293
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/document-link.js
6049
6294
  var documentLink = strictObject({
6050
6295
  ref: reference,
6051
6296
  url: text,
@@ -6056,7 +6301,7 @@ var documentLink = strictObject({
6056
6301
  sender: strictObject({ id: nullable(id), name: nullable(text) })
6057
6302
  });
6058
6303
 
6059
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/evidence.js
6304
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/evidence.js
6060
6305
  var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
6061
6306
  var contribution = strictObject({
6062
6307
  message: evidenceMessage,
@@ -6086,7 +6331,7 @@ var retentionStay = strictObject({
6086
6331
  });
6087
6332
  var evidence = union([contribution, retentionStay]);
6088
6333
 
6089
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/fact.js
6334
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/fact.js
6090
6335
  var fact = strictObject({
6091
6336
  ref: reference,
6092
6337
  id,
@@ -6117,7 +6362,7 @@ var fact = strictObject({
6117
6362
  updated_at: time
6118
6363
  });
6119
6364
 
6120
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/hit.js
6365
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/hit.js
6121
6366
  var hit = strictObject({
6122
6367
  kind: picklist(["message", "mail", "note", "document", "event", "meeting", "deal", "lead", ...BUSINESS_KINDS]),
6123
6368
  ref: reference,
@@ -6165,7 +6410,7 @@ var hit = strictObject({
6165
6410
  untrusted
6166
6411
  });
6167
6412
 
6168
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/identity.js
6413
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/identity.js
6169
6414
  var identity = strictObject({
6170
6415
  ref: reference,
6171
6416
  provider: text,
@@ -6181,7 +6426,7 @@ var identity = strictObject({
6181
6426
  person: optional(nullable(reference))
6182
6427
  });
6183
6428
 
6184
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
6429
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
6185
6430
  var imageEmbedding = strictObject({
6186
6431
  model: text,
6187
6432
  embedded: count,
@@ -6190,7 +6435,7 @@ var imageEmbedding = strictObject({
6190
6435
  more: boolean()
6191
6436
  });
6192
6437
 
6193
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/join-request.js
6438
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/join-request.js
6194
6439
  var joinRequest = strictObject({
6195
6440
  person_id: id,
6196
6441
  name: nullable(text),
@@ -6201,7 +6446,7 @@ var joinRequest = strictObject({
6201
6446
  about: optional(text)
6202
6447
  });
6203
6448
 
6204
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
6449
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
6205
6450
  var pollVote = strictObject({
6206
6451
  person_id: id,
6207
6452
  name: nullable(text),
@@ -6211,7 +6456,7 @@ var pollVote = strictObject({
6211
6456
  voted_at: time
6212
6457
  });
6213
6458
 
6214
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/listener.js
6459
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/listener.js
6215
6460
  var reactions = unwrap(unwrap(message.entries.reactions));
6216
6461
  var observation = strictObject({
6217
6462
  value: pipe(number(), minValue(0)),
@@ -6253,7 +6498,7 @@ var serveSummary = strictObject({
6253
6498
  tasks: optional(strictObject({ added: count, closed: count, review: count }))
6254
6499
  });
6255
6500
 
6256
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
6501
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
6257
6502
  var mailCounts = strictObject({
6258
6503
  by: picklist(["day", "week", "sender"]),
6259
6504
  received: count,
@@ -6268,7 +6513,7 @@ var mailCounts = strictObject({
6268
6513
  }))
6269
6514
  });
6270
6515
 
6271
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
6516
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
6272
6517
  var evidence2 = strictObject({ reference, fingerprint: text });
6273
6518
  var base = { id, evidence: array(evidence2) };
6274
6519
  var finding = variant("kind", [
@@ -6412,7 +6657,7 @@ var mailFindings = strictObject({
6412
6657
  receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
6413
6658
  });
6414
6659
 
6415
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
6660
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
6416
6661
  var mediaArchive = strictObject({
6417
6662
  directory: text,
6418
6663
  chats: count,
@@ -6444,7 +6689,7 @@ var mediaArchiveTimer = union([
6444
6689
  strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
6445
6690
  ]);
6446
6691
 
6447
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
6692
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
6448
6693
  var preparationId = pipe(string(), minLength(1));
6449
6694
  var preparationCount = pipe(number(), integer(), minValue(0));
6450
6695
  var preparationTime = nullable(isoTime);
@@ -6536,7 +6781,7 @@ var preparationMeeting = strictObject({
6536
6781
  updated_at: isoTime
6537
6782
  });
6538
6783
 
6539
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
6784
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
6540
6785
  var meetingEvidence = preparationEvidence;
6541
6786
  var meetingPersonContext = strictObject({
6542
6787
  person: strictObject({ uid: string(), name: nullable(string()) }),
@@ -6558,7 +6803,7 @@ var meetingPersonContext = strictObject({
6558
6803
  })
6559
6804
  });
6560
6805
 
6561
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
6806
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
6562
6807
  var evidence3 = strictObject({ reference, fingerprint: text });
6563
6808
  var base2 = { id, project: reference, evidence: array(evidence3) };
6564
6809
  var finding2 = variant("kind", [
@@ -6596,7 +6841,7 @@ var meetingFindings = strictObject({
6596
6841
  receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome3) }))
6597
6842
  });
6598
6843
 
6599
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
6844
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
6600
6845
  var communicationCoverage = strictObject({
6601
6846
  read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
6602
6847
  query: string(),
@@ -6641,7 +6886,7 @@ var preparationCommunications = strictObject({
6641
6886
  }))
6642
6887
  });
6643
6888
 
6644
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
6889
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
6645
6890
  var meetingPreparation = strictObject({
6646
6891
  communications: optional(preparationCommunications),
6647
6892
  schema_version: literal(1),
@@ -6754,7 +6999,7 @@ var meetingPreparation = strictObject({
6754
6999
  })
6755
7000
  });
6756
7001
 
6757
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
7002
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
6758
7003
  var count3 = pipe(number(), integer(), minValue(0));
6759
7004
  var id3 = pipe(string(), minLength(1));
6760
7005
  var text3 = string();
@@ -6818,7 +7063,7 @@ var meetingProjectCandidates = strictObject({
6818
7063
  })
6819
7064
  });
6820
7065
 
6821
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
7066
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
6822
7067
  var count4 = pipe(number(), integer(), minValue(0));
6823
7068
  var id4 = pipe(string(), minLength(1), maxLength(1e3));
6824
7069
  var meetingSeriesInventory = strictObject({
@@ -6848,7 +7093,7 @@ var meetingSeriesInventory = strictObject({
6848
7093
  })
6849
7094
  });
6850
7095
 
6851
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
7096
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
6852
7097
  var text4 = string();
6853
7098
  var id5 = pipe(number(), integer(), minValue(1));
6854
7099
  var revision = picklist(["current", "superseded"]);
@@ -6865,7 +7110,7 @@ var meetingTaskProposal = strictObject({
6865
7110
  persistence: literal("proposal-only")
6866
7111
  });
6867
7112
 
6868
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/memory.js
7113
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/memory.js
6869
7114
  var memory = strictObject({
6870
7115
  ref: reference,
6871
7116
  id,
@@ -6893,7 +7138,7 @@ var memory = strictObject({
6893
7138
  updated_at: time
6894
7139
  });
6895
7140
 
6896
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/mention.js
7141
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/mention.js
6897
7142
  var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
6898
7143
  var status = picklist(["found", "linked", "proposed", "dismissed"]);
6899
7144
  var mention = strictObject({
@@ -6937,13 +7182,13 @@ var mentionRebuild = strictObject({
6937
7182
  mentions: count
6938
7183
  });
6939
7184
 
6940
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/message-change.js
7185
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/message-change.js
6941
7186
  var operated3 = { operation_id: id, chat_id: id };
6942
7187
  var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
6943
7188
  var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
6944
7189
  var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
6945
7190
 
6946
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/message-read.js
7191
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/message-read.js
6947
7192
  var messageTranscript = strictObject({
6948
7193
  message_id: id,
6949
7194
  text,
@@ -7001,7 +7246,7 @@ var evidencePacket = strictObject({
7001
7246
  }))
7002
7247
  });
7003
7248
 
7004
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/message-context.js
7249
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/message-context.js
7005
7250
  var messageThread = strictObject({
7006
7251
  ref: reference,
7007
7252
  chat: id,
@@ -7018,7 +7263,7 @@ var messageThread = strictObject({
7018
7263
  });
7019
7264
  var messageContext = union([message, messageThread]);
7020
7265
 
7021
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
7266
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
7022
7267
  var messageCounts = strictObject({
7023
7268
  by: picklist(["chat", "sender", "day", "hour"]),
7024
7269
  total: count,
@@ -7031,7 +7276,7 @@ var messageCounts = strictObject({
7031
7276
  }))
7032
7277
  });
7033
7278
 
7034
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/message-link.js
7279
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/message-link.js
7035
7280
  var messageLink = strictObject({
7036
7281
  ref: reference,
7037
7282
  url: nullable(text),
@@ -7048,7 +7293,7 @@ var messageLink = strictObject({
7048
7293
  })))
7049
7294
  });
7050
7295
 
7051
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/message-write.js
7296
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/message-write.js
7052
7297
  var messageWrite = strictObject({
7053
7298
  operation_id: id,
7054
7299
  message,
@@ -7063,7 +7308,7 @@ var draftWrite = strictObject({
7063
7308
  });
7064
7309
  var messageSend = union([messageWrite, draftWrite]);
7065
7310
 
7066
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/model.js
7311
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/model.js
7067
7312
  var model = strictObject({
7068
7313
  id,
7069
7314
  kind: picklist(["audio", "text", "image", "reranker"]),
@@ -7098,7 +7343,7 @@ var chosenModel = strictObject({
7098
7343
  estimate_seconds: nullable(count)
7099
7344
  });
7100
7345
 
7101
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/model-key.js
7346
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/model-key.js
7102
7347
  var source = picklist(["environment", "keyring", "file"]);
7103
7348
  var modelKey = strictObject({
7104
7349
  provider: text,
@@ -7108,7 +7353,7 @@ var modelKey = strictObject({
7108
7353
  var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
7109
7354
  var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
7110
7355
 
7111
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
7356
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
7112
7357
  var versus = strictObject({ current: number(), previous: number() });
7113
7358
  var person = { person_ref: reference, name: nullable(text) };
7114
7359
  var graph = strictObject({
@@ -7142,14 +7387,14 @@ var officialStats = strictObject({
7142
7387
  graphs: record(string(), union([graph, strictObject({ error: text })]))
7143
7388
  });
7144
7389
 
7145
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/person.js
7390
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/person.js
7146
7391
  var person2 = strictObject({
7147
7392
  ref: reference,
7148
7393
  name: nullable(text),
7149
7394
  identities: optional(array(identity))
7150
7395
  });
7151
7396
 
7152
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/poll.js
7397
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/poll.js
7153
7398
  var poll = strictObject({
7154
7399
  chat_id: id,
7155
7400
  message_id: id,
@@ -7165,11 +7410,11 @@ var poll = strictObject({
7165
7410
  });
7166
7411
  var pollChange = strictObject({ operation_id: id, poll });
7167
7412
 
7168
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
7413
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
7169
7414
  var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
7170
7415
  var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
7171
7416
 
7172
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/ranking.js
7417
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/ranking.js
7173
7418
  var figures = record(string(), number());
7174
7419
  var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
7175
7420
  var rankingRow = strictObject({
@@ -7216,7 +7461,7 @@ var ranking = strictObject({
7216
7461
  rows: array(rankingRow)
7217
7462
  });
7218
7463
 
7219
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/reaction.js
7464
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/reaction.js
7220
7465
  var reaction = strictObject({
7221
7466
  person: strictObject({ id, name: nullable(text), username: nullable(text) }),
7222
7467
  /** The emoji, or `custom:<id>` for a custom one. */
@@ -7224,7 +7469,7 @@ var reaction = strictObject({
7224
7469
  reacted_at: time
7225
7470
  });
7226
7471
 
7227
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
7472
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
7228
7473
  var reactionChange = strictObject({
7229
7474
  operation_id: id,
7230
7475
  chat_id: id,
@@ -7232,7 +7477,7 @@ var reactionChange = strictObject({
7232
7477
  reaction: nullable(text)
7233
7478
  });
7234
7479
 
7235
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/recipient.js
7480
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/recipient.js
7236
7481
  var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
7237
7482
  var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
7238
7483
  var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
@@ -7243,7 +7488,7 @@ var recipientChange = strictObject({
7243
7488
  ...partial(recipientOff).entries
7244
7489
  });
7245
7490
 
7246
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
7491
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
7247
7492
  var events = array(record(string(), unknown()));
7248
7493
  var recordedRun = strictObject({
7249
7494
  run_id: id,
@@ -7315,7 +7560,7 @@ var runHit = strictObject({
7315
7560
  });
7316
7561
  var runLocation = strictObject({ path: text });
7317
7562
 
7318
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/relationship.js
7563
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/relationship.js
7319
7564
  var relationship = strictObject({
7320
7565
  id,
7321
7566
  from: reference,
@@ -7342,7 +7587,7 @@ var relationship = strictObject({
7342
7587
  created_at: time
7343
7588
  });
7344
7589
 
7345
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
7590
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
7346
7591
  var milliseconds2 = nullable(pipe(number(), minValue(0)));
7347
7592
  var figures2 = { replies: count, median_ms: milliseconds2, p90_ms: milliseconds2, mean_ms: milliseconds2 };
7348
7593
  var responseTimes = strictObject({
@@ -7359,7 +7604,7 @@ var waitingChats = strictObject({
7359
7604
  by_kind: strictObject({ private: count, group: count })
7360
7605
  });
7361
7606
 
7362
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/retention.js
7607
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/retention.js
7363
7608
  var retentionCohort = strictObject({
7364
7609
  /** The first day of the joining day or week. */
7365
7610
  cohort: text,
@@ -7407,7 +7652,7 @@ var retention = strictObject({
7407
7652
  rows: array(retentionCohort)
7408
7653
  });
7409
7654
 
7410
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
7655
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
7411
7656
  var savedSearch = strictObject({
7412
7657
  id,
7413
7658
  /** `null` for a run in the history. */
@@ -7424,7 +7669,7 @@ var savedSearch = strictObject({
7424
7669
  });
7425
7670
  var searchHistoryClear = strictObject({ cleared: count });
7426
7671
 
7427
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
7672
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
7428
7673
  var sendAttempt = strictObject({
7429
7674
  at: time,
7430
7675
  profile: text,
@@ -7452,7 +7697,7 @@ var sendAttempt = strictObject({
7452
7697
  error_code: optional(text)
7453
7698
  });
7454
7699
 
7455
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
7700
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
7456
7701
  var absent = strictObject({ path: text, exists: literal(false) });
7457
7702
  var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
7458
7703
  var infoSchema = strictObject({
@@ -7682,7 +7927,7 @@ var storeRepair = union([
7682
7927
  ]);
7683
7928
  var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
7684
7929
 
7685
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/store-table.js
7930
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/store-table.js
7686
7931
  var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
7687
7932
  var storeTable = strictObject({
7688
7933
  name: text,
@@ -7691,7 +7936,7 @@ var storeTable = strictObject({
7691
7936
  bytes: optional(nullable(count))
7692
7937
  });
7693
7938
 
7694
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
7939
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
7695
7940
  var tagTarget = variant("type", [
7696
7941
  strictObject({ type: literal("chat"), chat_id: id }),
7697
7942
  strictObject({ type: literal("contact"), person_id: id }),
@@ -7722,7 +7967,20 @@ var automaticTags = strictObject({
7722
7967
  dry_run: boolean()
7723
7968
  });
7724
7969
 
7725
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
7970
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/tagging.js
7971
+ var tagging = strictObject({
7972
+ tag: text,
7973
+ type: picklist(TAG_TYPES),
7974
+ /** What carries it: a `chat:`, `contact:` or `msg:` reference. */
7975
+ target: reference,
7976
+ /** The chat's title or the person's name, as the store holds it. */
7977
+ name: nullable(text),
7978
+ /** Who claims it: `manual` the owner, `auto` the keyword rules; both when both do. */
7979
+ sources: array(picklist(["manual", "auto"])),
7980
+ created_at: time
7981
+ });
7982
+
7983
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
7726
7984
  var side = strictObject({ ref: reference, key: text, title: text, status: text });
7727
7985
  var taskPair = strictObject({
7728
7986
  task: nullable(side),
@@ -7745,7 +8003,7 @@ var taskPair = strictObject({
7745
8003
  created_at: time
7746
8004
  });
7747
8005
 
7748
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/task-results.js
8006
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/task-results.js
7749
8007
  var nullableTime = nullable(time);
7750
8008
  var link = strictObject({
7751
8009
  id,
@@ -7919,7 +8177,7 @@ var taskReview = strictObject({
7919
8177
  untrusted
7920
8178
  });
7921
8179
 
7922
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/template.js
8180
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/template.js
7923
8181
  var template = strictObject({
7924
8182
  key: text,
7925
8183
  channel: picklist(["telegram", "email", "text"]),
@@ -7931,7 +8189,7 @@ var template = strictObject({
7931
8189
  updated_by: nullable(text)
7932
8190
  });
7933
8191
 
7934
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/topic.js
8192
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/topic.js
7935
8193
  var topic = strictObject({
7936
8194
  id,
7937
8195
  title: text,
@@ -7945,7 +8203,7 @@ var topic = strictObject({
7945
8203
  untrusted
7946
8204
  });
7947
8205
 
7948
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/entities/index.js
8206
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/index.js
7949
8207
  var ENTITIES = {
7950
8208
  sync_progress: progress,
7951
8209
  deal,
@@ -8240,7 +8498,7 @@ var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.e
8240
8498
  return [name, definition];
8241
8499
  })), "entityDefinitions");
8242
8500
 
8243
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
8501
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
8244
8502
  var schemas = /* @__PURE__ */ new WeakMap();
8245
8503
  var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
8246
8504
  if (Object.hasOwn(ENTITIES, name))
@@ -8274,7 +8532,7 @@ var answerRow = /* @__PURE__ */ __name((command) => {
8274
8532
  return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
8275
8533
  }, "answerRow");
8276
8534
 
8277
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
8535
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
8278
8536
  var where = [{ field: "ref" }];
8279
8537
  var who2 = { field: ["who.owner", "who.name"], tag: "you" };
8280
8538
  var ON_CHAT_ROW = /* @__PURE__ */ new Set(["reply-next", "coverage"]);
@@ -8366,7 +8624,7 @@ var STATUS_ROWS = {
8366
8624
  "status.failed": { columns: [{ field: "signal" }], text: ["why"] }
8367
8625
  };
8368
8626
 
8369
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/compact.js
8627
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/compact.js
8370
8628
  var TEXT_CHARS = 400;
8371
8629
  var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
8372
8630
  var messageRow = {
@@ -8734,7 +8992,7 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
8734
8992
  return lines.concat(footerOf(body)).join("\n");
8735
8993
  }, "compactText");
8736
8994
 
8737
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/log-events.js
8995
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/log-events.js
8738
8996
  var CORE_LOG_EVENTS = defineLogEvents([
8739
8997
  { id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
8740
8998
  { id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
@@ -8772,7 +9030,7 @@ var DIAGNOSTIC_LOG_EVENTS = {
8772
9030
  progress: "sync.progress"
8773
9031
  };
8774
9032
 
8775
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/recording.js
9033
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/recording.js
8776
9034
  var recorded = /* @__PURE__ */ __name(async (options, body) => {
8777
9035
  const recording = startRecording(options);
8778
9036
  try {
@@ -8987,7 +9245,7 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
8987
9245
  return void 0;
8988
9246
  }, "partialOutcome");
8989
9247
 
8990
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/command-server-request.js
9248
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/command-server-request.js
8991
9249
  import { AsyncLocalStorage } from "node:async_hooks";
8992
9250
  var requests = new AsyncLocalStorage();
8993
9251
  var inCommandServerRequest = /* @__PURE__ */ __name((request, work) => requests.run(request, work), "inCommandServerRequest");
@@ -9002,7 +9260,113 @@ var exitCodeSet = /* @__PURE__ */ __name(() => {
9002
9260
  return direct;
9003
9261
  }, "exitCodeSet");
9004
9262
 
9005
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/deadline.js
9263
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/sends/guarded.js
9264
+ import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
9265
+ var sentIds = /* @__PURE__ */ __name((typed2, message2) => ({
9266
+ messageId: message2.id,
9267
+ ...message2.chatId && message2.chatId !== typed2 ? { resultChatId: message2.chatId } : {}
9268
+ }), "sentIds");
9269
+ var current = new AsyncLocalStorage2();
9270
+ var writesInFlight = new AsyncLocalStorage2();
9271
+ var parents = /* @__PURE__ */ new WeakMap();
9272
+ var stopped = /* @__PURE__ */ new WeakMap();
9273
+ var scopesFor = /* @__PURE__ */ __name((scope = writesInFlight.getStore()) => {
9274
+ const result = [];
9275
+ for (let at2 = scope; at2; at2 = parents.get(at2))
9276
+ result.push(at2);
9277
+ return result;
9278
+ }, "scopesFor");
9279
+ var withWriteScope = /* @__PURE__ */ __name((scope, body) => {
9280
+ const parent = writesInFlight.getStore();
9281
+ if (parent && parent !== scope)
9282
+ parents.set(scope, parent);
9283
+ return writesInFlight.run(scope, body);
9284
+ }, "withWriteScope");
9285
+ var stopWrites = /* @__PURE__ */ __name((scope, reason) => {
9286
+ stopped.set(scope, reason);
9287
+ for (const write of scope)
9288
+ write.cut();
9289
+ }, "stopWrites");
9290
+ var refuseStopped = /* @__PURE__ */ __name((scopes3) => {
9291
+ for (const scope of scopes3)
9292
+ if (stopped.has(scope))
9293
+ throw stopped.get(scope);
9294
+ }, "refuseStopped");
9295
+ var currentOperation = /* @__PURE__ */ __name(() => current.getStore(), "currentOperation");
9296
+ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 = () => ({}), prepare) => {
9297
+ const scopes3 = scopesFor();
9298
+ refuseStopped(scopes3);
9299
+ try {
9300
+ await guard.ask?.(attempt);
9301
+ refuseStopped(scopes3);
9302
+ if (guard.reserve) {
9303
+ guard.check(attempt, { reserve: false });
9304
+ await guard.reserve(attempt);
9305
+ } else
9306
+ guard.check(attempt);
9307
+ } catch (error) {
9308
+ guard.record({ ...attempt, outcome: "refused", errorCode: codeOf(error) });
9309
+ throw error;
9310
+ }
9311
+ try {
9312
+ refuseStopped(scopes3);
9313
+ } catch (error) {
9314
+ guard.record({ ...attempt, outcome: "failed", errorCode: codeOf(error) });
9315
+ throw error;
9316
+ }
9317
+ let recorded2 = false;
9318
+ const once = /* @__PURE__ */ __name((entry) => {
9319
+ if (recorded2)
9320
+ return;
9321
+ recorded2 = true;
9322
+ guard.record(entry);
9323
+ }, "once");
9324
+ let cancelled = false;
9325
+ const flight = {
9326
+ operationId: attempt.operationId,
9327
+ preparing: prepare !== void 0,
9328
+ cut: /* @__PURE__ */ __name(() => {
9329
+ cancelled = true;
9330
+ once({
9331
+ ...attempt,
9332
+ outcome: flight.preparing ? "failed" : "outcome_unknown",
9333
+ errorCode: flight.preparing ? "timeout" : "outcome_unknown"
9334
+ });
9335
+ }, "cut")
9336
+ };
9337
+ for (const scope of scopes3)
9338
+ scope.add(flight);
9339
+ try {
9340
+ if (prepare !== void 0)
9341
+ await prepare();
9342
+ if (cancelled)
9343
+ throw new CliError("timeout", "the command ended before sending; nothing was sent", { sent: false });
9344
+ flight.preparing = false;
9345
+ const done = await current.run(attempt.operationId, act);
9346
+ if (cancelled)
9347
+ throw new CliError("outcome_unknown", "the command ended with a write in flight; check its result before continuing", { operation_id: attempt.operationId });
9348
+ once({ ...attempt, ...settled2(done), outcome: "sent" });
9349
+ return done;
9350
+ } catch (error) {
9351
+ const code = codeOf(error);
9352
+ once({ ...attempt, outcome: code === "outcome_unknown" ? "outcome_unknown" : "failed", errorCode: code });
9353
+ if (code === "outcome_unknown" && error instanceof Error)
9354
+ throw new CliError("outcome_unknown", error.message, {
9355
+ ...error.details,
9356
+ operation_id: attempt.operationId,
9357
+ retryable: false
9358
+ });
9359
+ if (flight.preparing && isCliError(error) && error.details.sent === void 0)
9360
+ throw new CliError(error.code, error.message, { ...error.details, sent: false });
9361
+ throw error;
9362
+ } finally {
9363
+ for (const scope of scopes3)
9364
+ scope.delete(flight);
9365
+ }
9366
+ }, "guardedWrite");
9367
+ var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
9368
+
9369
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/deadline.js
9006
9370
  var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
9007
9371
  if (ms2 === void 0)
9008
9372
  return body();
@@ -9028,7 +9392,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
9028
9392
  }
9029
9393
  }, "withDeadline");
9030
9394
 
9031
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/execution.js
9395
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/execution.js
9032
9396
  var DEFAULT_COMMAND_MS = 3e4;
9033
9397
  var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
9034
9398
  var DEFAULT_SYNC_MS = 15 * 6e4;
@@ -9211,7 +9575,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
9211
9575
  }
9212
9576
  }, "withAbort");
9213
9577
 
9214
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/profile.js
9578
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/profile.js
9215
9579
  var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
9216
9580
  var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
9217
9581
  var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
@@ -9237,12 +9601,12 @@ var takesProfile = /* @__PURE__ */ __name((command) => {
9237
9601
  return top !== void 0 && !PROFILE_FREE.has(top.name());
9238
9602
  }, "takesProfile");
9239
9603
  var commandWords = /* @__PURE__ */ __name((program2) => /* @__PURE__ */ new Set(["help", ...program2.commands.flatMap((command) => [command.name(), ...command.aliases()])]), "commandWords");
9240
- var liftProfile = /* @__PURE__ */ __name((argv, words, valued = /* @__PURE__ */ new Set()) => {
9604
+ var liftProfile = /* @__PURE__ */ __name((argv, words2, valued = /* @__PURE__ */ new Set()) => {
9241
9605
  let at2 = 0;
9242
9606
  while (argv[at2]?.startsWith("-") && argv[at2] !== "--")
9243
9607
  at2 += valued.has(argv[at2]) ? 2 : 1;
9244
9608
  const first2 = argv[at2];
9245
- if (first2 === void 0 || first2.startsWith("-") || words.has(first2))
9609
+ if (first2 === void 0 || first2.startsWith("-") || words2.has(first2))
9246
9610
  return { rest: argv };
9247
9611
  return { profile: first2, rest: [...argv.slice(0, at2), ...argv.slice(at2 + 1)] };
9248
9612
  }, "liftProfile");
@@ -9265,9 +9629,9 @@ var runGroup = /* @__PURE__ */ __name((app, env, word) => {
9265
9629
  return { name: lock, from: LOCK, locked: true };
9266
9630
  }, "runGroup");
9267
9631
  var valuedOptions = /* @__PURE__ */ __name((program2) => new Set(program2.options.filter((option) => option.required).flatMap((option) => [option.long, option.short].filter((flag2) => flag2 !== void 0))), "valuedOptions");
9268
- var refuseCommandName = /* @__PURE__ */ __name((profile, words, command) => {
9269
- if (words.has(profile)) {
9270
- throw new CliError("validation_error", `"${profile}" is a command, so \`${command} ${profile} \u2026\` would always mean the command and never this profile. Pick a name that is not one of: ` + [...words].sort().join(", "));
9632
+ var refuseCommandName = /* @__PURE__ */ __name((profile, words2, command) => {
9633
+ if (words2.has(profile)) {
9634
+ throw new CliError("validation_error", `"${profile}" is a command, so \`${command} ${profile} \u2026\` would always mean the command and never this profile. Pick a name that is not one of: ` + [...words2].sort().join(", "));
9271
9635
  }
9272
9636
  }, "refuseCommandName");
9273
9637
  var rootOf = /* @__PURE__ */ __name((command) => {
@@ -9298,13 +9662,82 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
9298
9662
  return void 0;
9299
9663
  }, "sampleCommand");
9300
9664
 
9301
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/analysis/settings.js
9665
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/models/settings.js
9666
+ var MODEL_FIELDS = ["provider", "model", "base_url"];
9667
+ var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
9668
+ provider: optional(picklist(["off", "openai", "anthropic"])),
9669
+ model: optional(pipe(string(), trim(), minLength(1), maxLength(200))),
9670
+ base_url: optional(pipe(string(), check((value) => endpoint(value), "use an HTTP/S endpoint without credentials, query or fragment")))
9671
+ }));
9672
+ var resolveModelSettings = /* @__PURE__ */ __name((prefix, layers, env) => {
9673
+ const configured = layers.map(([from, scope]) => [from, scope?.models ?? {}]);
9674
+ const purposes = /* @__PURE__ */ new Set([
9675
+ "default",
9676
+ "analysis",
9677
+ "replies",
9678
+ ...configured.flatMap(([, models2]) => Object.keys(models2))
9679
+ ]);
9680
+ for (const name of Object.keys(env)) {
9681
+ const match = new RegExp(`^${prefix}_MODELS_([A-Z][A-Z0-9_]*)_(PROVIDER|MODEL|BASE_URL)$`).exec(name);
9682
+ if (match?.[1])
9683
+ purposes.add(match[1].toLowerCase().replaceAll("_", "-"));
9684
+ }
9685
+ const models = {};
9686
+ const sources = {};
9687
+ for (const purpose of purposes) {
9688
+ const resolved = {};
9689
+ for (const field of MODEL_FIELDS) {
9690
+ const variable = `${prefix}_MODELS_${purpose.replaceAll("-", "_").toUpperCase()}_${field.toUpperCase()}`;
9691
+ const candidates = [
9692
+ [variable, env[variable]?.trim() || void 0],
9693
+ ...configured.map(([from, model3]) => [
9694
+ `${from}: models.${purpose}.${field}`,
9695
+ model3[purpose]?.[field]
9696
+ ]),
9697
+ ...purpose === "default" ? [] : [
9698
+ [
9699
+ `${prefix}_MODELS_DEFAULT_${field.toUpperCase()}`,
9700
+ env[`${prefix}_MODELS_DEFAULT_${field.toUpperCase()}`]?.trim() || void 0
9701
+ ],
9702
+ ...configured.map(([from, model3]) => [
9703
+ `${from}: models.default.${field}`,
9704
+ model3.default?.[field]
9705
+ ])
9706
+ ]
9707
+ ];
9708
+ const selected = candidates.find(([, value]) => value !== void 0);
9709
+ if (selected)
9710
+ resolved[field] = selected[1];
9711
+ sources[`models.${purpose}.${field}`] = selected?.[0] ?? "default";
9712
+ }
9713
+ if (Object.keys(resolved).length)
9714
+ models[purpose] = resolved;
9715
+ }
9716
+ const checked = safeParse(modelSettingsShape, models);
9717
+ if (!checked.success)
9718
+ throw new CliError("configuration_error", `models.${getDotPath(checked.issues[0]) ?? "settings"} is invalid`);
9719
+ return { models: checked.output, sources };
9720
+ }, "resolveModelSettings");
9721
+ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
9722
+ const configured = { ...settings.models?.default, ...settings.models?.[purpose] };
9723
+ if (configured.provider === void 0 || configured.provider === "off")
9724
+ return void 0;
9725
+ if (!configured.model)
9726
+ throw new CliError("configuration_error", `set models.${purpose}.model before calling its provider`);
9727
+ return {
9728
+ provider: configured.provider,
9729
+ model: configured.model,
9730
+ ...configured.base_url === void 0 ? {} : { baseUrl: configured.base_url }
9731
+ };
9732
+ }, "modelTarget");
9733
+
9734
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/analysis/settings.js
9302
9735
  var model2 = pipe(string(), trim(), minLength(1), maxLength(200));
9303
- var url = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
9736
+ var url2 = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
9304
9737
  var AI_FIELDS = {
9305
9738
  embeddingProvider: optional(picklist(["local", "openai"])),
9306
9739
  embeddingModel: optional(model2),
9307
- embeddingBaseUrl: optional(url),
9740
+ embeddingBaseUrl: optional(url2),
9308
9741
  embeddingDims: optional(pipe(number(), integer(), minValue(1), maxValue(65536))),
9309
9742
  models: optional(modelSettingsShape)
9310
9743
  };
@@ -9342,19 +9775,310 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
9342
9775
  };
9343
9776
  }, "resolveAISettings");
9344
9777
 
9345
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/bot/registry.js
9346
- import { existsSync as existsSync2, readdirSync as readdirSync2, readFileSync as readFileSync2 } from "node:fs";
9347
- import { join as join2 } from "node:path";
9348
- var botsDirectory = /* @__PURE__ */ __name((app, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "bots"), "botsDirectory");
9778
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/duration.js
9779
+ var DURATION = /^(\d+)(ms|s|m|h|d)$/;
9780
+ var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
9781
+ var parseDuration = /* @__PURE__ */ __name((value, source2) => {
9782
+ const match = DURATION.exec(value.trim());
9783
+ if (!match?.[1] || !match[2]) {
9784
+ throw new CliError("validation_error", `${source2} takes a duration with a unit \u2014 500ms, 30s, 2m, 4h or 1d \u2014 not "${value}"`);
9785
+ }
9786
+ const ms2 = Number(match[1]) * (UNIT_MS[match[2]] ?? 0);
9787
+ if (ms2 <= 0)
9788
+ throw new CliError("validation_error", `${source2} has to be more than zero, and "${value}" is not`);
9789
+ return ms2;
9790
+ }, "parseDuration");
9791
+
9792
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/embeddings/models.js
9793
+ import { existsSync as existsSync3 } from "node:fs";
9794
+ import { join as join3 } from "node:path";
9795
+ var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
9796
+ var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
9797
+ var e5Large = huggingFace("Xenova/multilingual-e5-large", "00fc3aeb3dbb95842de2ac1961d33c6319acf57b");
9798
+ var gemma = huggingFace("onnx-community/embeddinggemma-300m-ONNX", "5090578d9565bb06545b4552f76e6bc2c93e4a66");
9799
+ var TEXT_MODELS = [
9800
+ {
9801
+ id: "e5-small",
9802
+ title: "multilingual-e5-small, 8-bit",
9803
+ size: "small",
9804
+ languages: "about 100 languages, Russian and English among them",
9805
+ licence: "MIT",
9806
+ dims: 384,
9807
+ maxTokens: 512,
9808
+ // 100k-message corpus, one 8-thread session on Ryzen AI 9 HX 470: 31–32 chunks/s.
9809
+ chunksPerSecond: 31,
9810
+ pooling: "mean",
9811
+ prefix: { query: "query: ", passage: "passage: " },
9812
+ onnx: "onnx/model_quantized.onnx",
9813
+ files: [
9814
+ {
9815
+ name: "onnx/model_quantized.onnx",
9816
+ url: e5("onnx/model_quantized.onnx"),
9817
+ sha256: "f80102d3f2a1229f387d3c81909990d8945513e347b0eab049f7de3c6f98c193",
9818
+ bytes: 118308185
9819
+ },
9820
+ {
9821
+ name: "tokenizer.json",
9822
+ url: e5("tokenizer.json"),
9823
+ sha256: "0b44a9d7b51c3c62626640cda0e2c2f70fdacdc25bbbd68038369d14ebdf4c39",
9824
+ bytes: 17082730
9825
+ },
9826
+ {
9827
+ name: "tokenizer_config.json",
9828
+ url: e5("tokenizer_config.json"),
9829
+ sha256: "a1d6bc8734a6f635dc158508bef000f8e2e5a759c7d92f984b2c86e5ff53425b",
9830
+ bytes: 443
9831
+ }
9832
+ ]
9833
+ },
9834
+ {
9835
+ id: "embeddinggemma",
9836
+ title: "EmbeddingGemma 300M, 4-bit",
9837
+ size: "medium",
9838
+ languages: "over 100 languages \u2014 the best of the two on chat, about seven times slower",
9839
+ licence: "Gemma Terms of Use",
9840
+ terms: "https://ai.google.dev/gemma/terms",
9841
+ // Gemma Terms of Use §3.1: every copy carries this notice and the use restrictions of §3.2.
9842
+ notice: "Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms. Its use is restricted by the Gemma Prohibited Use Policy: https://ai.google.dev/gemma/prohibited_use_policy",
9843
+ dims: 768,
9844
+ maxTokens: 2048,
9845
+ // 2026-11-08, 1,200-character chunks, 8 threads on the Ryzen AI 9 HX 470: 8.3 chunks/s against e5-small's 52.7, so
9846
+ // 5 on the scale e5-small's 31 sets. It was 2, which held a memo sync to 39 chunks.
9847
+ chunksPerSecond: 5,
9848
+ pooling: "sentence_embedding",
9849
+ prefix: { query: "task: search result | query: ", passage: "title: none | text: " },
9850
+ onnx: "onnx/model_q4.onnx",
9851
+ externalData: "onnx/model_q4.onnx_data",
9852
+ files: [
9853
+ {
9854
+ name: "onnx/model_q4.onnx",
9855
+ url: gemma("onnx/model_q4.onnx"),
9856
+ sha256: "ad1dfee81a70f7944b9b9d1cc6e48075b832881cf33fab2f2b248be78f3f0043",
9857
+ bytes: 519322
9858
+ },
9859
+ {
9860
+ name: "onnx/model_q4.onnx_data",
9861
+ url: gemma("onnx/model_q4.onnx_data"),
9862
+ sha256: "599962c3143b040de2dd05e5975be3e9091dd067cacc6a8f7186e3203bab9e02",
9863
+ bytes: 196725760
9864
+ },
9865
+ {
9866
+ name: "tokenizer.json",
9867
+ url: gemma("tokenizer.json"),
9868
+ sha256: "4dda02faaf32bc91031dc8c88457ac272b00c1016cc679757d1c441b248b9c47",
9869
+ bytes: 20323312
9870
+ },
9871
+ {
9872
+ name: "tokenizer_config.json",
9873
+ url: gemma("tokenizer_config.json"),
9874
+ sha256: "3ca953eea6c3c9fcda9cf3df22949ff18b216f7c74bd6459230f3f1013953f3a",
9875
+ bytes: 1156830
9876
+ }
9877
+ ]
9878
+ },
9879
+ {
9880
+ id: "e5-large",
9881
+ title: "multilingual-e5-large, 8-bit",
9882
+ size: "large",
9883
+ languages: "about 100 languages, Russian and English among them \u2014 reads better than e5-small, several times slower",
9884
+ licence: "MIT",
9885
+ dims: 1024,
9886
+ maxTokens: 512,
9887
+ // 2026-11-07, one 8-thread session on the Ryzen AI 9 HX 470 while other benchmarks ran: 3.4 chunks/s.
9888
+ chunksPerSecond: 4,
9889
+ pooling: "mean",
9890
+ prefix: { query: "query: ", passage: "passage: " },
9891
+ onnx: "onnx/model_quantized.onnx",
9892
+ files: [
9893
+ {
9894
+ name: "onnx/model_quantized.onnx",
9895
+ url: e5Large("onnx/model_quantized.onnx"),
9896
+ sha256: "0a8d65db9a36f810ba5da15249f13145fcdc7890e6656f1fd38cd8b7c4db1fca",
9897
+ bytes: 561768762
9898
+ },
9899
+ {
9900
+ name: "tokenizer.json",
9901
+ url: e5Large("tokenizer.json"),
9902
+ sha256: "62c24cdc13d4c9952d63718d6c9fa4c287974249e16b7ade6d5a85e7bbb75626",
9903
+ bytes: 17082660
9904
+ },
9905
+ {
9906
+ name: "tokenizer_config.json",
9907
+ url: e5Large("tokenizer_config.json"),
9908
+ sha256: "efb5c0d09722e5fe59a462cd2a9976ee216d55b037597d997cd3fe833216da15",
9909
+ bytes: 418
9910
+ }
9911
+ ]
9912
+ }
9913
+ ];
9914
+ var DEFAULT_TEXT_MODEL = "embeddinggemma";
9915
+ var PREVIOUS_DEFAULT_TEXT_MODEL = "e5-small";
9916
+ var SECTION = "text_models";
9917
+ var slug = pipe(string(), regex(/^[a-z0-9][a-z0-9._-]{0,62}$/, "is not a model id: a-z, 0-9, . _ -"));
9918
+ var words = pipe(string(), trim(), minLength(1), maxLength(300));
9919
+ var fileName = pipe(string(), check((name) => /^[\w.-]+(\/[\w.-]+)*$/.test(name) && !name.split("/").some((part) => part === ".." || part === "."), "is not a file inside the model's folder"));
9920
+ var modelFile = strictObject({
9921
+ name: fileName,
9922
+ url: pipe(string(), url(), startsWith("https://", "has to be an https address")),
9923
+ sha256: pipe(string(), regex(/^[0-9a-f]{64}$/, "has to be a sha256 in hex")),
9924
+ bytes: pipe(number(), integer(), minValue(1))
9925
+ });
9926
+ var CustomTextModelShape = pipe(strictObject({
9927
+ id: slug,
9928
+ title: words,
9929
+ languages: words,
9930
+ licence: words,
9931
+ terms: optional(pipe(string(), url())),
9932
+ dims: pipe(number(), integer(), minValue(1), maxValue(8192)),
9933
+ maxTokens: pipe(number(), integer(), minValue(16), maxValue(32768)),
9934
+ chunksPerSecond: optional(pipe(number(), minValue(0.01))),
9935
+ pooling: picklist(["mean", "sentence_embedding"]),
9936
+ prefix: strictObject({
9937
+ query: pipe(string(), maxLength(200)),
9938
+ passage: pipe(string(), maxLength(200))
9939
+ }),
9940
+ onnx: fileName,
9941
+ externalData: optional(fileName),
9942
+ files: pipe(array(modelFile), minLength(1), maxLength(16))
9943
+ }), check((model3) => !TEXT_MODELS.some((one) => one.id === model3.id), "takes the id of a model this version ships; choose another"), check((model3) => {
9944
+ const names = model3.files.map(({ name }) => name);
9945
+ return [model3.onnx, model3.externalData, "tokenizer.json", "tokenizer_config.json"].every((name) => name === void 0 || names.includes(name));
9946
+ }, "has to list its onnx file, its external data and tokenizer.json and tokenizer_config.json among files"));
9947
+ var TextModelsSection = strictObject({
9948
+ use: optional(slug),
9949
+ custom: optional(array(CustomTextModelShape))
9950
+ });
9951
+ var textModelsFile = /* @__PURE__ */ __name((env = process.env) => sharedConfigPath(storePath(env), env), "textModelsFile");
9952
+ var readTextModelsSection = /* @__PURE__ */ __name((env = process.env) => {
9953
+ const path2 = textModelsFile(env);
9954
+ const section2 = readSharedSection(path2, SECTION);
9955
+ if (section2 === void 0)
9956
+ return {};
9957
+ const checked = safeParse(TextModelsSection, section2);
9958
+ if (!checked.success) {
9959
+ const issue = checked.issues[0];
9960
+ const at2 = issue ? getDotPath(issue) : null;
9961
+ throw new CliError("configuration_error", `${path2}: ${SECTION}${at2 ? `.${at2}` : ""} ${issue?.message ?? "is not valid"}`);
9962
+ }
9963
+ const ids = checked.output.custom?.map(({ id: id6 }) => id6) ?? [];
9964
+ const twice = ids.find((id6, at2) => ids.indexOf(id6) !== at2);
9965
+ if (twice)
9966
+ throw new CliError("configuration_error", `${path2}: ${SECTION}.custom names ${twice} twice`);
9967
+ return checked.output;
9968
+ }, "readTextModelsSection");
9969
+ var writeTextModelsSection = /* @__PURE__ */ __name((section2, env = process.env) => writeSharedSection(textModelsFile(env), SECTION, section2.use === void 0 && !section2.custom?.length ? void 0 : section2), "writeTextModelsSection");
9970
+ var textModels = /* @__PURE__ */ __name((env = process.env) => [
9971
+ ...TEXT_MODELS,
9972
+ ...(readTextModelsSection(env).custom ?? []).map((model3) => ({ ...model3, custom: true }))
9973
+ ], "textModels");
9974
+ var textModel = /* @__PURE__ */ __name((id6, env = process.env) => {
9975
+ const known = textModels(env);
9976
+ const found = known.find((model3) => model3.id === id6);
9977
+ if (!found) {
9978
+ throw new CliError("validation_error", `no text model ${id6} \u2014 one of: ${known.map((model3) => model3.id).join(", ")}`);
9979
+ }
9980
+ return found;
9981
+ }, "textModel");
9982
+ var downloaded = /* @__PURE__ */ __name((id6, env) => {
9983
+ const model3 = TEXT_MODELS.find((one) => one.id === id6);
9984
+ const directory = sharedModelsDirectory("text", env);
9985
+ return model3 !== void 0 && filesPresent(model3.files.map((file) => [file, join3(directory, model3.id, file.name)]));
9986
+ }, "downloaded");
9987
+ var chosenTextModel = /* @__PURE__ */ __name((env = process.env) => {
9988
+ const use = readTextModelsSection(env).use;
9989
+ if (use !== void 0)
9990
+ return { id: use, from: "chosen" };
9991
+ const kept = !downloaded(DEFAULT_TEXT_MODEL, env) && existsSync3(join3(sharedModelsDirectory("text", env), PREVIOUS_DEFAULT_TEXT_MODEL));
9992
+ return { id: kept ? PREVIOUS_DEFAULT_TEXT_MODEL : DEFAULT_TEXT_MODEL, from: "default" };
9993
+ }, "chosenTextModel");
9994
+ var mmarco = huggingFace("cross-encoder/mmarco-mMiniLMv2-L12-H384-v1", "1427fd652930e4ba29e8149678df786c240d8825");
9995
+ var bge = huggingFace("onnx-community/bge-reranker-v2-m3-ONNX", "6f5ff65298512715a1e669753bc754d2bc8f367b");
9996
+ var RERANK_MODELS = [
9997
+ {
9998
+ id: "mmarco",
9999
+ title: "mMARCO mMiniLMv2-L12 cross-encoder, 8-bit",
10000
+ languages: "about 100 languages, Russian and English among them",
10001
+ licence: "Apache-2.0",
10002
+ maxTokens: 512,
10003
+ // The x86 name is the quantizer's target; WebAssembly and native ONNX Runtime both run it on any processor.
10004
+ onnx: "onnx/model_quint8_avx2.onnx",
10005
+ files: [
10006
+ {
10007
+ name: "onnx/model_quint8_avx2.onnx",
10008
+ url: mmarco("onnx/model_quint8_avx2.onnx"),
10009
+ sha256: "6c2513767fb63d008a4377bef7a7a3555433d9436342bb53e35a3a72ffc52d4b",
10010
+ bytes: 118620016
10011
+ },
10012
+ {
10013
+ name: "tokenizer.json",
10014
+ url: mmarco("tokenizer.json"),
10015
+ sha256: "62c24cdc13d4c9952d63718d6c9fa4c287974249e16b7ade6d5a85e7bbb75626",
10016
+ bytes: 17082660
10017
+ },
10018
+ {
10019
+ name: "tokenizer_config.json",
10020
+ url: mmarco("tokenizer_config.json"),
10021
+ sha256: "e7fbfbfa6347b4e414c1cee50d142e2c2f9a895dad68b068ae83a8b564c3837e",
10022
+ bytes: 435
10023
+ }
10024
+ ]
10025
+ },
10026
+ {
10027
+ id: "bge-reranker-v2-m3",
10028
+ title: "BGE reranker v2 m3, 8-bit",
10029
+ languages: "over 100 languages \u2014 better than mmarco in the benchmark, about seven times slower",
10030
+ licence: "Apache-2.0 (BAAI's; the ONNX export declares none)",
10031
+ maxTokens: 512,
10032
+ onnx: "onnx/model_quantized.onnx",
10033
+ files: [
10034
+ {
10035
+ name: "onnx/model_quantized.onnx",
10036
+ url: bge("onnx/model_quantized.onnx"),
10037
+ sha256: "912fc1215c2dbff6499700534bd8d31253af01573861abbfc43afd1fab6cce5d",
10038
+ bytes: 570727094
10039
+ },
10040
+ {
10041
+ name: "tokenizer.json",
10042
+ url: bge("tokenizer.json"),
10043
+ sha256: "8bf8afbfd11306bd872018c53bfdf2e160a56f8edbcf49933324404791c148d3",
10044
+ bytes: 17082900
10045
+ },
10046
+ {
10047
+ name: "tokenizer_config.json",
10048
+ url: bge("tokenizer_config.json"),
10049
+ sha256: "b87c8703482b0300d3da30e201519aa641f6a450f5eb5bf1e624afbf70c74d80",
10050
+ bytes: 1203
10051
+ }
10052
+ ]
10053
+ }
10054
+ ];
10055
+ var DEFAULT_RERANK_MODEL = "mmarco";
10056
+ var rerankModel = /* @__PURE__ */ __name((id6) => {
10057
+ const found = RERANK_MODELS.find((model3) => model3.id === id6);
10058
+ if (!found) {
10059
+ throw new CliError("validation_error", `no reranker ${id6} \u2014 one of: ${RERANK_MODELS.map((model3) => model3.id).join(", ")}`);
10060
+ }
10061
+ return found;
10062
+ }, "rerankModel");
10063
+ var vectorModelKey = /* @__PURE__ */ __name((model3) => {
10064
+ const weights = model3.custom ? model3.files.find(({ name }) => name === model3.onnx)?.sha256.slice(0, 12) : void 0;
10065
+ return `local:${model3.id}${weights ? `@${weights}` : ""}:${model3.dims}`;
10066
+ }, "vectorModelKey");
10067
+ var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
10068
+
10069
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/bot/registry.js
10070
+ import { existsSync as existsSync4, readdirSync as readdirSync2, readFileSync as readFileSync3 } from "node:fs";
10071
+ import { join as join4 } from "node:path";
10072
+ var botsDirectory = /* @__PURE__ */ __name((app, env = process.env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "bots"), "botsDirectory");
9349
10073
  var botFiles = /* @__PURE__ */ __name((app, profile, env = process.env) => {
9350
10074
  const directory = botsDirectory(app, env);
9351
10075
  return {
9352
- registry: join2(directory, `${profile}.json`),
9353
- recipients: join2(directory, "recipients", `${profile}.json`),
9354
- journal: join2(directory, "sends", `${profile}.jsonl`),
9355
- updates: join2(directory, "updates", `${profile}.json`),
9356
- presses: join2(directory, "presses", `${profile}.json`),
9357
- checks: join2(directory, "checks", `${profile}.json`)
10076
+ registry: join4(directory, `${profile}.json`),
10077
+ recipients: join4(directory, "recipients", `${profile}.json`),
10078
+ journal: join4(directory, "sends", `${profile}.jsonl`),
10079
+ updates: join4(directory, "updates", `${profile}.json`),
10080
+ presses: join4(directory, "presses", `${profile}.json`),
10081
+ checks: join4(directory, "checks", `${profile}.json`)
9358
10082
  };
9359
10083
  }, "botFiles");
9360
10084
  var ChatRegistry = class {
@@ -9381,7 +10105,7 @@ var ChatRegistry = class {
9381
10105
  }
9382
10106
  /** Makes this bot known to `bot list` before it has seen any chat. */
9383
10107
  touch() {
9384
- if (!existsSync2(this.#path))
10108
+ if (!existsSync4(this.#path))
9385
10109
  writeSecurely(this.#path, `${JSON.stringify({ chats: [] }, null, 2)}
9386
10110
  `, 384);
9387
10111
  }
@@ -9410,10 +10134,10 @@ var ChatRegistry = class {
9410
10134
  this.#write({ ...this.#read(), chats: [...byId.values()] });
9411
10135
  }
9412
10136
  #read() {
9413
- if (!existsSync2(this.#path))
10137
+ if (!existsSync4(this.#path))
9414
10138
  return {};
9415
10139
  try {
9416
- const parsed = JSON.parse(readFileSync2(this.#path, "utf8"));
10140
+ const parsed = JSON.parse(readFileSync3(this.#path, "utf8"));
9417
10141
  return parsed && typeof parsed === "object" ? parsed : {};
9418
10142
  } catch {
9419
10143
  return {};
@@ -9426,256 +10150,13 @@ var ChatRegistry = class {
9426
10150
  };
9427
10151
  var registryProfiles = /* @__PURE__ */ __name((app, env = process.env) => {
9428
10152
  const directory = botsDirectory(app, env);
9429
- if (!existsSync2(directory))
10153
+ if (!existsSync4(directory))
9430
10154
  return [];
9431
10155
  return readdirSync2(directory, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => entry.name).map((name) => name.slice(0, -".json".length));
9432
10156
  }, "registryProfiles");
9433
10157
 
9434
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
9435
- import { readFileSync as readFileSync3 } from "node:fs";
9436
-
9437
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/config-repair.js
9438
- var REPAIR_WORDS = {
9439
- byte_order_mark: "an invisible byte-order mark at the start",
9440
- comment: "a comment, which JSON does not allow",
9441
- trailing_comma: "a comma before a closing bracket",
9442
- missing_comma: "a missing comma",
9443
- unquoted_key: "a key without double quotes",
9444
- single_quotes: "text in single quotes",
9445
- missing_closer: "the file stops before its closing brackets \u2014 whatever followed this line was already lost"
9446
- };
9447
- var GiveUp = class {
9448
- static {
9449
- __name(this, "GiveUp");
9450
- }
9451
- at;
9452
- why;
9453
- constructor(at2, why) {
9454
- this.at = at2;
9455
- this.why = why;
9456
- }
9457
- };
9458
- var NUMBER = /^-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/;
9459
- var LITERAL = /^(true|false|null)/;
9460
- var KEY = /^[A-Za-z_$][\w$.-]*/;
9461
- var ENDS_VALUE = /^[\s,\]}/]?$/;
9462
- var repairConfigText = /* @__PURE__ */ __name((text5) => {
9463
- try {
9464
- JSON.parse(text5);
9465
- return { state: "valid" };
9466
- } catch {
9467
- }
9468
- const fixes = [];
9469
- const lineAt = /* @__PURE__ */ __name((offset) => text5.slice(0, offset).split("\n").length, "lineAt");
9470
- const fix = /* @__PURE__ */ __name((kind2, offset) => fixes.push({ kind: kind2, line: lineAt(offset) }), "fix");
9471
- const giveUp = /* @__PURE__ */ __name((why, offset = at2) => {
9472
- throw new GiveUp(offset, why);
9473
- }, "giveUp");
9474
- let at2 = 0;
9475
- let truncated = false;
9476
- let last = "open";
9477
- let lastEnd = 0;
9478
- const previous = /* @__PURE__ */ __name(() => last, "previous");
9479
- const skip = /* @__PURE__ */ __name(() => {
9480
- for (; ; ) {
9481
- while (/\s/.test(text5[at2] ?? ""))
9482
- at2++;
9483
- if (text5.startsWith("//", at2)) {
9484
- fix("comment", at2);
9485
- while (at2 < text5.length && text5[at2] !== "\n")
9486
- at2++;
9487
- } else if (text5.startsWith("/*", at2)) {
9488
- const end = text5.indexOf("*/", at2 + 2);
9489
- if (end < 0)
9490
- giveUp("a /* comment is never closed");
9491
- fix("comment", at2);
9492
- at2 = end + 2;
9493
- } else
9494
- return;
9495
- }
9496
- }, "skip");
9497
- const string2 = /* @__PURE__ */ __name(() => {
9498
- const quote = text5[at2];
9499
- const start = at2;
9500
- if (quote === "'")
9501
- fix("single_quotes", at2);
9502
- at2++;
9503
- let body = "";
9504
- for (; ; ) {
9505
- if (at2 >= text5.length)
9506
- giveUp("the file stops inside a quoted text", start);
9507
- const char = text5[at2];
9508
- if (char === quote)
9509
- break;
9510
- if (text5.charCodeAt(at2) < 32)
9511
- giveUp("a line break inside a quoted text");
9512
- if (char === "\\") {
9513
- const next = text5[at2 + 1] ?? "";
9514
- if (quote === "'" && next === "'")
9515
- body += "'";
9516
- else if (/^["\\/bfnrt]$/.test(next))
9517
- body += `\\${next}`;
9518
- else if (next === "u" && /^[0-9a-fA-F]{4}$/.test(text5.slice(at2 + 2, at2 + 6))) {
9519
- body += text5.slice(at2, at2 + 6);
9520
- at2 += 4;
9521
- } else
9522
- giveUp("an escape JSON has no meaning for");
9523
- at2 += 2;
9524
- continue;
9525
- }
9526
- body += char === '"' ? '\\"' : char;
9527
- at2++;
9528
- }
9529
- at2++;
9530
- return JSON.parse(`"${body}"`);
9531
- }, "string");
9532
- const key = /* @__PURE__ */ __name(() => {
9533
- const char = text5[at2] ?? "";
9534
- if (char === '"' || char === "'")
9535
- return string2();
9536
- const word = KEY.exec(text5.slice(at2))?.[0];
9537
- if (!word)
9538
- return giveUp("something other than a key where a key should be");
9539
- fix("unquoted_key", at2);
9540
- at2 += word.length;
9541
- return word;
9542
- }, "key");
9543
- const scalar = /* @__PURE__ */ __name(() => {
9544
- const char = text5[at2] ?? "";
9545
- if (char === '"' || char === "'")
9546
- return { json: JSON.stringify(string2()) };
9547
- const word = (NUMBER.exec(text5.slice(at2)) ?? LITERAL.exec(text5.slice(at2)))?.[0];
9548
- if (!word || !ENDS_VALUE.test(text5[at2 + word.length] ?? ""))
9549
- return giveUp("a value that is not JSON \u2014 text needs quotes, and only true, false and null go without");
9550
- if (at2 + word.length === text5.length && NUMBER.test(word))
9551
- giveUp("the file stops inside a number");
9552
- at2 += word.length;
9553
- return { json: word };
9554
- }, "scalar");
9555
- const members = /* @__PURE__ */ __name((close, one) => {
9556
- const out = [];
9557
- at2++;
9558
- last = "open";
9559
- let comma = -1;
9560
- for (; ; ) {
9561
- skip();
9562
- if (truncated)
9563
- return out;
9564
- if (at2 >= text5.length) {
9565
- if (previous() === "close")
9566
- giveUp("the file stops after a closing bracket, so which brackets are missing has two readings");
9567
- if (previous() === "comma")
9568
- fix("trailing_comma", comma);
9569
- fix("missing_closer", text5.length);
9570
- truncated = true;
9571
- return out;
9572
- }
9573
- const char = text5[at2];
9574
- if (char === close) {
9575
- if (previous() === "comma")
9576
- fix("trailing_comma", comma);
9577
- at2++;
9578
- last = "close";
9579
- return out;
9580
- }
9581
- if (char === "}" || char === "]")
9582
- giveUp(`a ${char} where ${close} should close`);
9583
- if (char === ",") {
9584
- if (previous() !== "value" && previous() !== "close")
9585
- giveUp("a comma with nothing before it");
9586
- comma = at2;
9587
- at2++;
9588
- last = "comma";
9589
- continue;
9590
- }
9591
- if (previous() === "value" || previous() === "close") {
9592
- if (lineAt(at2) === lineAt(lastEnd))
9593
- giveUp("two entries on one line with no comma between them");
9594
- fix("missing_comma", lastEnd);
9595
- }
9596
- out.push(one());
9597
- }
9598
- }, "members");
9599
- const value = /* @__PURE__ */ __name(() => {
9600
- const char = text5[at2] ?? "";
9601
- let node;
9602
- if (char === "{") {
9603
- const seen = /* @__PURE__ */ new Set();
9604
- node = {
9605
- object: members("}", () => {
9606
- const start = at2;
9607
- const name = key();
9608
- if (seen.has(name))
9609
- giveUp("a key appears twice in one object", start);
9610
- seen.add(name);
9611
- skip();
9612
- if (at2 >= text5.length)
9613
- giveUp("the file stops after a key, before its value");
9614
- if (text5[at2] !== ":")
9615
- giveUp("a key with no colon after it");
9616
- at2++;
9617
- skip();
9618
- if (at2 >= text5.length)
9619
- giveUp("the file stops after a key, before its value");
9620
- return [name, value()];
9621
- })
9622
- };
9623
- } else if (char === "[") {
9624
- node = {
9625
- array: members("]", () => {
9626
- return value();
9627
- })
9628
- };
9629
- } else
9630
- node = scalar();
9631
- if (!truncated) {
9632
- last = "json" in node ? "value" : "close";
9633
- lastEnd = at2;
9634
- }
9635
- return node;
9636
- }, "value");
9637
- try {
9638
- if (text5.includes("\0") || text5.includes(String.fromCharCode(65533)))
9639
- giveUp("the file is not text", 0);
9640
- if (text5.charCodeAt(0) === 65279) {
9641
- fix("byte_order_mark", 0);
9642
- at2 = 1;
9643
- }
9644
- skip();
9645
- if (text5[at2] !== "{")
9646
- giveUp(at2 >= text5.length ? "the file is empty" : "the file does not start with {");
9647
- const root = value();
9648
- skip();
9649
- if (at2 < text5.length)
9650
- giveUp("more text after the closing }");
9651
- const repaired = `${serialise(root, "")}
9652
- `;
9653
- JSON.parse(repaired);
9654
- return { state: "repaired", text: repaired, fixes };
9655
- } catch (error) {
9656
- if (!(error instanceof GiveUp))
9657
- throw error;
9658
- const before = text5.slice(0, error.at).split("\n");
9659
- return {
9660
- state: "refused",
9661
- line: before.length,
9662
- column: (before.at(-1)?.length ?? 0) + 1,
9663
- why: error.why
9664
- };
9665
- }
9666
- }, "repairConfigText");
9667
- var serialise = /* @__PURE__ */ __name((node, indent) => {
9668
- if ("json" in node)
9669
- return node.json;
9670
- const inner = `${indent} `;
9671
- const parts = "object" in node ? node.object.map(([name, item]) => `${inner}${JSON.stringify(name)}: ${serialise(item, inner)}`) : node.array.map((item) => `${inner}${serialise(item, inner)}`);
9672
- const [open, close] = "object" in node ? ["{", "}"] : ["[", "]"];
9673
- return parts.length === 0 ? `${open}${close}` : `${open}
9674
- ${parts.join(",\n")}
9675
- ${indent}${close}`;
9676
- }, "serialise");
9677
-
9678
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
10158
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
10159
+ import { readFileSync as readFileSync4 } from "node:fs";
9679
10160
  var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
9680
10161
  var SECTIONS = ["personal", "bot"];
9681
10162
  var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
@@ -9782,8 +10263,8 @@ var failureOffset = /* @__PURE__ */ __name((text5) => {
9782
10263
  value();
9783
10264
  space();
9784
10265
  return at2;
9785
- } catch (stopped) {
9786
- return typeof stopped === "number" ? stopped : at2;
10266
+ } catch (stopped2) {
10267
+ return typeof stopped2 === "number" ? stopped2 : at2;
9787
10268
  }
9788
10269
  }, "failureOffset");
9789
10270
  var parseConfigText = /* @__PURE__ */ __name((text5, file) => {
@@ -9950,7 +10431,7 @@ var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schem
9950
10431
  var wholeFile = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what }), "wholeFile");
9951
10432
  var readConfigText = /* @__PURE__ */ __name((path2) => {
9952
10433
  try {
9953
- return { text: readFileSync3(path2, "utf8") };
10434
+ return { text: readFileSync4(path2, "utf8") };
9954
10435
  } catch (error) {
9955
10436
  const code = error.code;
9956
10437
  if (code === "ENOENT")
@@ -9970,20 +10451,20 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
9970
10451
  return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
9971
10452
  }, "readConfigFile");
9972
10453
 
9973
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/default-config.js
9974
- import { existsSync as existsSync3, linkSync, mkdirSync as mkdirSync2, mkdtempSync, rmSync as rmSync2, writeFileSync } from "node:fs";
9975
- import { dirname as dirname2, join as join3 } from "node:path";
10454
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/default-config.js
10455
+ import { existsSync as existsSync5, linkSync, mkdirSync as mkdirSync2, mkdtempSync, rmSync as rmSync3, writeFileSync } from "node:fs";
10456
+ import { dirname as dirname2, join as join5 } from "node:path";
9976
10457
  var DEFAULT_CONFIG = {
9977
10458
  defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
9978
10459
  profiles: {}
9979
10460
  };
9980
10461
  function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
9981
- if (existsSync3(path2))
10462
+ if (existsSync5(path2))
9982
10463
  return;
9983
10464
  const directory = dirname2(path2);
9984
10465
  mkdirSync2(directory, { recursive: true, mode: 448 });
9985
- const temporary = mkdtempSync(join3(directory, ".config-"));
9986
- const candidate = join3(temporary, "config.json");
10466
+ const temporary = mkdtempSync(join5(directory, ".config-"));
10467
+ const candidate = join5(temporary, "config.json");
9987
10468
  try {
9988
10469
  writeFileSync(candidate, `${JSON.stringify(config, null, 2)}
9989
10470
  `, { flag: "wx", mode: 384 });
@@ -9994,34 +10475,34 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
9994
10475
  throw error;
9995
10476
  }
9996
10477
  } finally {
9997
- rmSync2(temporary, { recursive: true, force: true });
10478
+ rmSync3(temporary, { recursive: true, force: true });
9998
10479
  }
9999
10480
  }
10000
10481
  __name(ensureDefaultConfig, "ensureDefaultConfig");
10001
10482
 
10002
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
10003
- import { existsSync as existsSync4, readdirSync as readdirSync3, readFileSync as readFileSync4 } from "node:fs";
10004
- import { join as join4 } from "node:path";
10005
- var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
10483
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
10484
+ import { existsSync as existsSync6, readdirSync as readdirSync3, readFileSync as readFileSync5 } from "node:fs";
10485
+ import { join as join6 } from "node:path";
10486
+ var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join6(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
10006
10487
  var rememberAccount = /* @__PURE__ */ __name((app, profile, id6, env) => writeSecurely(accountFileFor(app, profile, env), `${JSON.stringify({ account: id6 })}
10007
10488
  `, 384), "rememberAccount");
10008
10489
  var recalledAccount = /* @__PURE__ */ __name((app, provider, profile, env) => {
10009
10490
  try {
10010
- const { account: account2 } = JSON.parse(readFileSync4(accountFileFor(app, profile, env), "utf8"));
10491
+ const { account: account2 } = JSON.parse(readFileSync5(accountFileFor(app, profile, env), "utf8"));
10011
10492
  return typeof account2 === "string" ? { provider, account: account2 } : void 0;
10012
10493
  } catch {
10013
10494
  return void 0;
10014
10495
  }
10015
10496
  }, "recalledAccount");
10016
10497
  var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
10017
- const dir = join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts");
10018
- if (!existsSync4(dir))
10498
+ const dir = join6(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts");
10499
+ if (!existsSync6(dir))
10019
10500
  return [];
10020
10501
  return readdirSync3(dir).filter((name) => name.endsWith(".json")).map((name) => name.slice(0, -".json".length));
10021
10502
  }, "profilesWithAccounts");
10022
10503
  var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
10023
10504
 
10024
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
10505
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
10025
10506
  var isNode2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
10026
10507
  var parentOf = /* @__PURE__ */ __name((config, key) => {
10027
10508
  const path2 = key.split(".");
@@ -10054,8 +10535,57 @@ var settingRows = /* @__PURE__ */ __name((raw, declared) => declared.map((settin
10054
10535
  };
10055
10536
  }), "settingRows");
10056
10537
 
10057
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/settings.js
10058
- import { existsSync as existsSync5 } from "node:fs";
10538
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/settings.js
10539
+ import { existsSync as existsSync7 } from "node:fs";
10540
+
10541
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/services/history-limits.js
10542
+ var HISTORY_MAX_DAYS = 1095;
10543
+ var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
10544
+ var DAY_MS = 24 * 60 * 60 * 1e3;
10545
+ var historyWindow = /* @__PURE__ */ __name((shape, limits, now) => {
10546
+ const group2 = shape !== void 0 && shape.kind !== "dialog" && shape.kind !== "saved";
10547
+ if (group2 && (shape.participantsCount ?? 0) > limits.groupMembersMax)
10548
+ return { skip: "group_too_large", members: shape.participantsCount ?? 0 };
10549
+ const days = group2 ? limits.groupDays : limits.dialogDays;
10550
+ return { keepFrom: now - Math.min(days, HISTORY_MAX_DAYS) * DAY_MS };
10551
+ }, "historyWindow");
10552
+ var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now = Date.now()) => {
10553
+ const skipped = /* @__PURE__ */ new Map();
10554
+ if (!batch.messages?.length)
10555
+ return { batch, skipped };
10556
+ const named2 = new Map((batch.chats ?? []).map((chat2) => [chat2.id, chat2]));
10557
+ const windows = /* @__PURE__ */ new Map();
10558
+ const windowOf = /* @__PURE__ */ __name((chatId) => {
10559
+ if (!windows.has(chatId)) {
10560
+ const chat2 = named2.get(chatId);
10561
+ const shape = chat2 ? { kind: chat2.kind, participantsCount: chat2.participantsCount ?? null } : shapes(chatId);
10562
+ windows.set(chatId, included(chatId) ? void 0 : historyWindow(shape, limits, now));
10563
+ }
10564
+ return windows.get(chatId);
10565
+ }, "windowOf");
10566
+ const messages = batch.messages.filter((message2) => {
10567
+ const window = windowOf(message2.chatId);
10568
+ if (window === void 0)
10569
+ return true;
10570
+ const at2 = Date.parse(message2.timestamp);
10571
+ if ("keepFrom" in window && !(at2 < window.keepFrom))
10572
+ return true;
10573
+ const reason = "skip" in window ? window.skip : "older_than_window";
10574
+ const held = skipped.get(message2.chatId);
10575
+ const iso = new Date(at2).toISOString();
10576
+ skipped.set(message2.chatId, {
10577
+ reason,
10578
+ messages: (held?.messages ?? 0) + 1,
10579
+ oldestAt: held && held.oldestAt < iso ? held.oldestAt : iso,
10580
+ newestAt: held && held.newestAt > iso ? held.newestAt : iso,
10581
+ ..."skip" in window ? { members: window.members } : { keptFrom: new Date(window.keepFrom).toISOString() }
10582
+ });
10583
+ return false;
10584
+ });
10585
+ return { batch: { ...batch, messages }, skipped };
10586
+ }, "limitBatch");
10587
+
10588
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/settings.js
10059
10589
  var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
10060
10590
  var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
10061
10591
  var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
@@ -10208,8 +10738,8 @@ var NoProfileHere = class extends CliError {
10208
10738
  this.app = app;
10209
10739
  }
10210
10740
  /** `words`: the command that was typed, without its arguments, so the suggestion runs as written. */
10211
- withoutSetup(words) {
10212
- const command = words ? `${this.app.command} personal ${words}` : `${this.app.command} personal \u2026`;
10741
+ withoutSetup(words2) {
10742
+ const command = words2 ? `${this.app.command} personal ${words2}` : `${this.app.command} personal \u2026`;
10213
10743
  return new CliError("validation_error", `name a profile: there is none on this computer yet \u2014 any name works, such as \`${command}\` (or set ${envName(this.app, "PROFILE")})`, { profiles: [] });
10214
10744
  }
10215
10745
  };
@@ -10417,7 +10947,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
10417
10947
  updateCheck: updateCheck.value,
10418
10948
  skillHint: skillHint.value,
10419
10949
  configPath,
10420
- configFound: existsSync5(configPath),
10950
+ configFound: existsSync7(configPath),
10421
10951
  configuredProfiles: namedProfiles(config),
10422
10952
  profilesHere: profilesOf(config, env),
10423
10953
  accountProfiles: accountsOf(config, env, bots),
@@ -10581,7 +11111,50 @@ var given = /* @__PURE__ */ __name((value) => {
10581
11111
  return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
10582
11112
  }, "given");
10583
11113
 
10584
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/context.js
11114
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/background/budget.js
11115
+ var DEADLINE_MARGIN_MS = 5e3;
11116
+ var DEADLINE_MARGIN_SHARE = 0.15;
11117
+ var DEFAULT_REQUEST_MS = 2e3;
11118
+ var deadlineMargin = /* @__PURE__ */ __name((deadline) => Math.max(DEADLINE_MARGIN_MS, deadline.ms * DEADLINE_MARGIN_SHARE), "deadlineMargin");
11119
+ var requestsFor = /* @__PURE__ */ __name((deadline, requestMs = DEFAULT_REQUEST_MS) => deadline === void 0 ? null : Math.max(1, Math.floor((deadline.ms - deadlineMargin(deadline)) / requestMs)), "requestsFor");
11120
+ var runBudget = /* @__PURE__ */ __name(({ requests: requests2, deadline, requestMs, signal, now = Date.now } = {}) => {
11121
+ const fits = requestsFor(deadline, requestMs);
11122
+ const limit = fits === null ? requests2 ?? null : Math.min(fits, requests2 ?? fits);
11123
+ const margin = deadline ? deadlineMargin(deadline) : 0;
11124
+ let used = 0;
11125
+ let stopped2 = null;
11126
+ let last;
11127
+ let slowest = 0;
11128
+ return {
11129
+ take() {
11130
+ if (stopped2)
11131
+ return stopped2;
11132
+ const at2 = now();
11133
+ if (last !== void 0)
11134
+ slowest = Math.max(slowest, at2 - last);
11135
+ if (signal?.aborted)
11136
+ stopped2 = "cancelled";
11137
+ else if (limit !== null && used >= limit)
11138
+ stopped2 = "requests";
11139
+ else if (deadline && at2 + margin + slowest >= deadline.endsAt)
11140
+ stopped2 = "deadline";
11141
+ if (stopped2)
11142
+ return stopped2;
11143
+ used += 1;
11144
+ last = at2;
11145
+ return null;
11146
+ },
11147
+ get used() {
11148
+ return used;
11149
+ },
11150
+ limit,
11151
+ get stopped() {
11152
+ return stopped2;
11153
+ }
11154
+ };
11155
+ }, "runBudget");
11156
+
11157
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/context.js
10585
11158
  var runBudgetOf = /* @__PURE__ */ __name((command, requests2) => {
10586
11159
  const { deadline, signal, app } = environmentOf(command);
10587
11160
  const now = deadline?.();
@@ -10715,13 +11288,13 @@ var inCommandRun = /* @__PURE__ */ __name((command, body) => {
10715
11288
  return baseContext(command, (flags, options) => resolveSettings(flags, { ...options, needsProfile: false })).run(body);
10716
11289
  }, "inCommandRun");
10717
11290
  var commandPath = /* @__PURE__ */ __name((command) => {
10718
- const words = [];
10719
- for (let current = command; current?.parent; current = current.parent)
10720
- words.unshift(current.name());
10721
- return words.join(" ");
11291
+ const words2 = [];
11292
+ for (let current2 = command; current2?.parent; current2 = current2.parent)
11293
+ words2.unshift(current2.name());
11294
+ return words2.join(" ");
10722
11295
  }, "commandPath");
10723
11296
 
10724
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/effects.js
11297
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/effects.js
10725
11298
  var REMOTE_READ = { remote: "read", local: "read" };
10726
11299
  var FETCH = { remote: "read", local: "write" };
10727
11300
  var REMOTE_WRITE = { remote: "write", local: "write" };
@@ -10786,7 +11359,12 @@ var changesStore = /* @__PURE__ */ __name((command) => {
10786
11359
  STORE_WRITES.add(command);
10787
11360
  return command;
10788
11361
  }, "changesStore");
10789
- var savesFiles = /* @__PURE__ */ __name((command) => command.name() === "download" || [...command.options.map((option) => option.attributeName()), ...command.registeredArguments.map((one) => one.name())].map((name) => name.toLowerCase()).some((name) => name === "dir" || name.endsWith("dir") || name === "output"), "savesFiles");
11362
+ var OWNER_FILES = /* @__PURE__ */ new WeakSet();
11363
+ var writesOwnerFiles = /* @__PURE__ */ __name((command) => {
11364
+ OWNER_FILES.add(command);
11365
+ return command;
11366
+ }, "writesOwnerFiles");
11367
+ var savesFiles = /* @__PURE__ */ __name((command) => OWNER_FILES.has(command) || command.name() === "download" || [...command.options.map((option) => option.attributeName()), ...command.registeredArguments.map((one) => one.name())].map((name) => name.toLowerCase()).some((name) => name === "dir" || name.endsWith("dir") || name === "output"), "savesFiles");
10790
11368
  var fetchesOnly = /* @__PURE__ */ __name((command) => {
10791
11369
  const effects = metaOf(command).effects;
10792
11370
  return effects?.remote === "read" && effects.local === "write" && !STORE_WRITES.has(command) && !changesAuthority(command) && !OTHER_SERVICE.has(command) && !savesFiles(command);
@@ -10811,7 +11389,7 @@ var writesFileNow = /* @__PURE__ */ __name((command) => {
10811
11389
  const option = FILE_OPTION.get(command);
10812
11390
  return option === void 0 || command.opts()[option] !== void 0;
10813
11391
  }, "writesFileNow");
10814
- var readsOverMcp = /* @__PURE__ */ __name((command) => fetchesOnly(command) || FILE_OPTION.has(command), "readsOverMcp");
11392
+ var readsOverMcp = /* @__PURE__ */ __name((command) => fetchesOnly(command) && !LOGIN.has(command) || FILE_OPTION.has(command), "readsOverMcp");
10815
11393
  var readsOverMcpAt = /* @__PURE__ */ __name((root) => (path2) => {
10816
11394
  let at2 = root;
10817
11395
  for (const word of path2)
@@ -10831,10 +11409,10 @@ var refuseStoreChange = /* @__PURE__ */ __name((app, env) => {
10831
11409
  throw readOnlyRefusal(lock, storeChangeRefusal(app));
10832
11410
  }, "refuseStoreChange");
10833
11411
  var pathOf2 = /* @__PURE__ */ __name((command) => {
10834
- const words = [];
11412
+ const words2 = [];
10835
11413
  for (let at2 = command; at2.parent; at2 = at2.parent)
10836
- words.unshift(at2.name());
10837
- return words;
11414
+ words2.unshift(at2.name());
11415
+ return words2;
10838
11416
  }, "pathOf");
10839
11417
  var changesMessenger = /* @__PURE__ */ __name((command) => {
10840
11418
  const { path: path2, effects, lifetime, reaches } = "path" in command ? command : { path: pathOf2(command), ...metaOf(command) };
@@ -10868,7 +11446,61 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
10868
11446
  throw readOnlyRefusal(lock, what);
10869
11447
  }, "refuseUnderReadOnly");
10870
11448
 
10871
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/steps.js
11449
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/images/picture/models.js
11450
+ import { join as join7 } from "node:path";
11451
+ var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
11452
+ var IMAGE_MODELS = [
11453
+ {
11454
+ id: "clip-b32",
11455
+ title: "CLIP ViT-B/32, 8-bit",
11456
+ languages: "English only: translate a query before searching",
11457
+ licence: "MIT",
11458
+ dims: 512,
11459
+ key: "local:clip-b32:512",
11460
+ maxTokens: 77,
11461
+ vision: "onnx/vision_model_quantized.onnx",
11462
+ text: "onnx/text_model_quantized.onnx",
11463
+ files: [
11464
+ {
11465
+ name: "onnx/vision_model_quantized.onnx",
11466
+ url: clip("onnx/vision_model_quantized.onnx"),
11467
+ sha256: "583fd1110a514667812fee7d684952aaf82a99b959760c8d7dca7e0ab9839299",
11468
+ bytes: 89117001
11469
+ },
11470
+ {
11471
+ name: "onnx/text_model_quantized.onnx",
11472
+ url: clip("onnx/text_model_quantized.onnx"),
11473
+ sha256: "73baab855d406190da9faa498cfedf65f15cf309f4cc7385b7b032e6d08e5c3a",
11474
+ bytes: 64504507
11475
+ },
11476
+ {
11477
+ name: "tokenizer.json",
11478
+ url: clip("tokenizer.json"),
11479
+ sha256: "f7f3b7af117d467b58374797691a6438d3e6b9e9cef800dfd5dced7f697a90cd",
11480
+ bytes: 2224119
11481
+ },
11482
+ {
11483
+ name: "tokenizer_config.json",
11484
+ url: clip("tokenizer_config.json"),
11485
+ sha256: "60ba2912bc6344c94bc16bbdec27fa1209409167b6f2fdf3cfe9e65462ea3967",
11486
+ bytes: 775
11487
+ }
11488
+ ]
11489
+ }
11490
+ ];
11491
+ var DEFAULT_IMAGE_MODEL = "clip-b32";
11492
+ var imageModel = /* @__PURE__ */ __name((id6) => {
11493
+ const found = IMAGE_MODELS.find((model3) => model3.id === id6);
11494
+ if (!found) {
11495
+ throw new CliError("validation_error", `no image model ${id6} \u2014 one of: ${IMAGE_MODELS.map((model3) => model3.id).join(", ")}`);
11496
+ }
11497
+ return found;
11498
+ }, "imageModel");
11499
+ var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
11500
+ var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file, join7(directory, model3.id, file.name)]), "placedImage");
11501
+ var isImageModelInstalled = /* @__PURE__ */ __name((model3, directory) => filesPresent(placedImage(model3, directory)), "isImageModelInstalled");
11502
+
11503
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/steps.js
10872
11504
  var STEPS2 = defineSteps([
10873
11505
  ...STEPS,
10874
11506
  {
@@ -11105,10 +11737,10 @@ var nextStep = /* @__PURE__ */ __name((id6, input) => {
11105
11737
  const args = Object.fromEntries(Object.entries(input.args ?? {}).filter(([, value]) => value !== void 0));
11106
11738
  return stepOf(definition, { ...input, args });
11107
11739
  }, "nextStep");
11108
- var lineOf = /* @__PURE__ */ __name((command, words) => {
11740
+ var lineOf = /* @__PURE__ */ __name((command, words2) => {
11109
11741
  const root = rootOf2(command);
11110
11742
  const profile = root.getOptionValue("profile");
11111
- return typedCommand(root.name(), words, typeof profile === "string" && profile !== "" ? profile : void 0);
11743
+ return typedCommand(root.name(), words2, typeof profile === "string" && profile !== "" ? profile : void 0);
11112
11744
  }, "lineOf");
11113
11745
  var rootOf2 = /* @__PURE__ */ __name((command) => {
11114
11746
  let root = command;
@@ -11158,7 +11790,7 @@ var stepLine = /* @__PURE__ */ __name((root, step2) => {
11158
11790
  ].join(" ");
11159
11791
  }, "stepLine");
11160
11792
 
11161
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
11793
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
11162
11794
  var SOFT_OUTPUT_BYTES = 256 * 1024;
11163
11795
  var CARRIED = ["json", "compact", "offline", "timeout", "full", "brief", "maxOutputBytes"];
11164
11796
  var NOT_WITH_COMPACT = /* @__PURE__ */ new Set(["json", "brief"]);
@@ -11184,10 +11816,10 @@ var declaresRow = /* @__PURE__ */ __name((command) => {
11184
11816
  return rowShapeOf(command, rows2 && entityRows(rows2)) !== GENERIC_ROW;
11185
11817
  }, "declaresRow");
11186
11818
  var pathOf3 = /* @__PURE__ */ __name((command) => {
11187
- const words = [];
11819
+ const words2 = [];
11188
11820
  for (let at2 = command; at2.parent; at2 = at2.parent)
11189
- words.unshift(at2.name());
11190
- return words.join(" ");
11821
+ words2.unshift(at2.name());
11822
+ return words2.join(" ");
11191
11823
  }, "pathOf");
11192
11824
  var step = /* @__PURE__ */ __name((command, id6, args, why) => ({
11193
11825
  kind: "command",
@@ -11216,7 +11848,7 @@ var largeAnswerSteps = /* @__PURE__ */ __name((command) => {
11216
11848
  return args ? compactStep(command, args, "the answer is large as JSON; one line per item keeps every ref") : [];
11217
11849
  }, "largeAnswerSteps");
11218
11850
 
11219
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
11851
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
11220
11852
  var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
11221
11853
  var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
11222
11854
  var strip = /* @__PURE__ */ __name((value) => {
@@ -11230,7 +11862,7 @@ var strip = /* @__PURE__ */ __name((value) => {
11230
11862
  return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
11231
11863
  }, "strip");
11232
11864
 
11233
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/untrusted-marks.js
11865
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/untrusted-marks.js
11234
11866
  var OPEN = "\u27E6";
11235
11867
  var CLOSE = "\u27E7";
11236
11868
  var untrustedMarkOf = /* @__PURE__ */ __name((app, env) => {
@@ -11314,7 +11946,7 @@ var withFieldsMarked = /* @__PURE__ */ __name((value, fields, mark, id6) => {
11314
11946
  return result;
11315
11947
  }, "withFieldsMarked");
11316
11948
 
11317
- // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/envelope.js
11949
+ // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/envelope.js
11318
11950
  var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
11319
11951
  var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
11320
11952
  var listOf = /* @__PURE__ */ __name((command, input) => {
@@ -11493,7 +12125,13 @@ export {
11493
12125
  refuseJoinedPath,
11494
12126
  accountSession,
11495
12127
  accountProfile,
12128
+ task,
12129
+ agenda,
11496
12130
  analysisConsent,
12131
+ attachment,
12132
+ WEIGHTS,
12133
+ LINK,
12134
+ oddName,
11497
12135
  member,
11498
12136
  chat,
11499
12137
  message,
@@ -11506,7 +12144,12 @@ export {
11506
12144
  chatEvent,
11507
12145
  contact,
11508
12146
  contactNote,
12147
+ conversation,
11509
12148
  documentLink,
12149
+ checkpointPath,
12150
+ readCheckpoint,
12151
+ saveCheckpoint,
12152
+ progressOf,
11510
12153
  recordLogFor,
11511
12154
  spawnDetached,
11512
12155
  jobsDir,
@@ -11547,6 +12190,7 @@ export {
11547
12190
  sendAttempt,
11548
12191
  progress,
11549
12192
  storeTable,
12193
+ tagging,
11550
12194
  template,
11551
12195
  topic,
11552
12196
  ENTITIES,
@@ -11571,6 +12215,10 @@ export {
11571
12215
  inCommandServerRequest,
11572
12216
  commandServerRequest,
11573
12217
  exitCodeSet,
12218
+ sentIds,
12219
+ currentOperation,
12220
+ guardedWrite,
12221
+ codeOf,
11574
12222
  withDeadline,
11575
12223
  DEFAULT_COMMAND_MS,
11576
12224
  DEFAULT_COOPERATIVE_MS,
@@ -11593,15 +12241,31 @@ export {
11593
12241
  refuseCommandName,
11594
12242
  rootOf,
11595
12243
  sampleCommand,
12244
+ modelTarget,
11596
12245
  AI_ENTRIES,
11597
12246
  AI_SETTING_KEYS,
11598
12247
  resolveAISettings,
12248
+ parseDuration,
12249
+ DEFAULT_TEXT_MODEL,
12250
+ PREVIOUS_DEFAULT_TEXT_MODEL,
12251
+ CustomTextModelShape,
12252
+ textModelsFile,
12253
+ readTextModelsSection,
12254
+ writeTextModelsSection,
12255
+ textModels,
12256
+ textModel,
12257
+ chosenTextModel,
12258
+ RERANK_MODELS,
12259
+ DEFAULT_RERANK_MODEL,
12260
+ rerankModel,
12261
+ vectorModelKey,
12262
+ meaningFloor,
12263
+ historyWindow,
12264
+ limitBatch,
11599
12265
  botsDirectory,
11600
12266
  botFiles,
11601
12267
  ChatRegistry,
11602
12268
  registryProfiles,
11603
- REPAIR_WORDS,
11604
- repairConfigText,
11605
12269
  permissionIssues,
11606
12270
  settingPathOf,
11607
12271
  withoutPath,
@@ -11638,6 +12302,12 @@ export {
11638
12302
  outputFor,
11639
12303
  baseContext,
11640
12304
  inCommandRun,
12305
+ IMAGE_MODELS,
12306
+ DEFAULT_IMAGE_MODEL,
12307
+ imageModel,
12308
+ imageModelsDirectory,
12309
+ placedImage,
12310
+ isImageModelInstalled,
11641
12311
  REMOTE_READ,
11642
12312
  FETCH,
11643
12313
  REMOTE_WRITE,
@@ -11658,6 +12328,7 @@ export {
11658
12328
  narrowsUnderLock,
11659
12329
  admittedUnderLock,
11660
12330
  changesStore,
12331
+ writesOwnerFiles,
11661
12332
  fetchesOnly,
11662
12333
  fetchesOnlyAt,
11663
12334
  writesFileOnlyWith,