@wirecat/zoom-cli 0.72.0 → 0.74.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 (199) hide show
  1. package/contracts/wirecat.json +1478 -0
  2. package/dist/account-removal.d.ts.map +1 -1
  3. package/dist/account-removal.js +0 -2
  4. package/dist/account-removal.js.map +1 -1
  5. package/dist/answers.d.ts +1 -3
  6. package/dist/answers.d.ts.map +1 -1
  7. package/dist/answers.js +0 -3
  8. package/dist/answers.js.map +1 -1
  9. package/dist/bin/main.js +13 -5
  10. package/dist/bin/main.js.map +1 -1
  11. package/dist/bin/zm.js +2 -2
  12. package/dist/bundle/{all-profiles-XFIPF4GF.js → all-profiles-SDOAABLC.js} +12 -12
  13. package/dist/bundle/answer-policy-RHS74QYY.js +110 -0
  14. package/dist/bundle/{anthropic-SSUBR3BC.js → anthropic-HCVY2PIN.js} +7 -7
  15. package/dist/bundle/{app-server-7DJHHF2F.js → app-server-V64VS6KN.js} +65 -61
  16. package/dist/bundle/{bun-6HBYWQIX.js → bun-EBQHHLKR.js} +2 -2
  17. package/dist/bundle/{bun-sqlite-4L3Q55NB.js → bun-sqlite-PVMXO2JB.js} +7 -7
  18. package/dist/bundle/chunk-2PNG76LV.js +707 -0
  19. package/dist/bundle/chunk-2PYZTRRC.js +84 -0
  20. package/dist/bundle/{chunk-63QXCE5Z.js → chunk-3HTJBGNP.js} +10 -10
  21. package/dist/bundle/{chunk-5X4IY5JH.js → chunk-3ROL6MBJ.js} +1763 -762
  22. package/dist/bundle/{chunk-N4QNYWWG.js → chunk-3TYNBHBK.js} +2 -2
  23. package/dist/bundle/{chunk-7SUWPMZG.js → chunk-4ELLWJT4.js} +8 -8
  24. package/dist/bundle/{chunk-PJWSGXOB.js → chunk-4EZKR6Q4.js} +7 -7
  25. package/dist/bundle/{chunk-UVZLK3M4.js → chunk-4RJL32PF.js} +25 -10
  26. package/dist/bundle/{chunk-LTWJM3ED.js → chunk-5KDBLEUF.js} +17 -17
  27. package/dist/bundle/{chunk-7IFO43Q5.js → chunk-5R6EBM5Z.js} +2 -2
  28. package/dist/bundle/{chunk-OHCLQJOV.js → chunk-6EMOZGSN.js} +3 -3
  29. package/dist/bundle/{chunk-D24OQAHM.js → chunk-6GPBDVQ2.js} +4 -4
  30. package/dist/bundle/chunk-7NE3LB7A.js +25 -0
  31. package/dist/bundle/{chunk-VIV64MQM.js → chunk-7R4UU65O.js} +26 -17
  32. package/dist/bundle/{chunk-4XQWF3U2.js → chunk-7W23N2YW.js} +6 -6
  33. package/dist/bundle/{chunk-RN5SU2RN.js → chunk-AFUHT7F7.js} +6 -6
  34. package/dist/bundle/{chunk-SXZGCD6E.js → chunk-APLV37JA.js} +3 -3
  35. package/dist/bundle/{chunk-LLUNHAZ7.js → chunk-BKMC4ETU.js} +4 -4
  36. package/dist/bundle/{chunk-IACWKZWS.js → chunk-BOGGQOVO.js} +1 -1
  37. package/dist/bundle/{chunk-U3NJBGLA.js → chunk-DSRG5NRF.js} +185 -34
  38. package/dist/bundle/{chunk-X2MP634F.js → chunk-DXZN3DU6.js} +4 -4
  39. package/dist/bundle/{chunk-ELJUBPY4.js → chunk-EA2OB75T.js} +1 -1
  40. package/dist/bundle/{chunk-ZVFYGTGJ.js → chunk-F6PUM6ZK.js} +17 -17
  41. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
  42. package/dist/bundle/{chunk-WOAYHCM2.js → chunk-FL2TKSZY.js} +1 -1
  43. package/dist/bundle/{chunk-RZUJMAMK.js → chunk-FT7X74RT.js} +4 -4
  44. package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
  45. package/dist/bundle/{chunk-I7CUMZD6.js → chunk-FY2X6U6O.js} +3 -3
  46. package/dist/bundle/{chunk-W3YTVEWV.js → chunk-GPGIU3OG.js} +9 -9
  47. package/dist/bundle/{chunk-6DCLZLGX.js → chunk-HCZYJMBP.js} +1 -1
  48. package/dist/bundle/{chunk-IU4DUUB3.js → chunk-HGUYJUNO.js} +325 -14
  49. package/dist/bundle/{chunk-S7SXSHRC.js → chunk-HNWDEDMU.js} +61 -30
  50. package/dist/bundle/{chunk-NMZQTYKJ.js → chunk-HZUUVNWC.js} +1 -1
  51. package/dist/bundle/{chunk-7S4D5SM2.js → chunk-I2D4ZZOD.js} +31 -32
  52. package/dist/bundle/{chunk-XPWZSW6Y.js → chunk-IJCUAKR5.js} +4 -4
  53. package/dist/bundle/{chunk-QQUY4MZY.js → chunk-IJONJTST.js} +1 -1
  54. package/dist/bundle/chunk-IS6FUZCP.js +73 -0
  55. package/dist/bundle/{chunk-ZW5KHKMA.js → chunk-IZUOL4Q6.js} +5 -5
  56. package/dist/bundle/{chunk-H53WFZBN.js → chunk-KBRIMLVN.js} +12 -12
  57. package/dist/bundle/{chunk-2MIBRVSV.js → chunk-KCPRTZBZ.js} +2 -2
  58. package/dist/bundle/chunk-KYL5FYOW.js +13 -0
  59. package/dist/bundle/{chunk-4SY67IUA.js → chunk-LHPYSVGP.js} +26 -35
  60. package/dist/bundle/{chunk-JG4MNYG2.js → chunk-LN2LWPN2.js} +1 -1
  61. package/dist/bundle/{chunk-CW46FWKW.js → chunk-LQR4V5EY.js} +14 -12
  62. package/dist/bundle/{chunk-B3SILJBU.js → chunk-LUBG5GKK.js} +30 -22
  63. package/dist/bundle/{chunk-3KRTEX5M.js → chunk-LZ4AVHBS.js} +3 -2
  64. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
  65. package/dist/bundle/{chunk-FSCPQQS5.js → chunk-MAE5UGRQ.js} +150 -93
  66. package/dist/bundle/{chunk-KPIQXFNB.js → chunk-N7KCNMKL.js} +16 -15
  67. package/dist/bundle/{chunk-RLCVPECY.js → chunk-NKBMLSWK.js} +110 -64
  68. package/dist/bundle/{chunk-T27IMG6X.js → chunk-NV2REPY6.js} +1 -1
  69. package/dist/bundle/{chunk-EFF2XBHP.js → chunk-OP6HK2QL.js} +2 -2
  70. package/dist/bundle/{chunk-WLVG4RBZ.js → chunk-OPUGV7VW.js} +15 -2
  71. package/dist/bundle/{chunk-5AELTC52.js → chunk-P53CLAXD.js} +103 -102
  72. package/dist/bundle/{chunk-KWURWGGB.js → chunk-PKM2UKAZ.js} +32 -9
  73. package/dist/bundle/{chunk-7JYMGXLI.js → chunk-PMHMKZEJ.js} +47 -43
  74. package/dist/bundle/{chunk-23J2ANZ7.js → chunk-QAGSAOYS.js} +2 -2
  75. package/dist/bundle/{chunk-JZ4XNNL7.js → chunk-QLKCKTM4.js} +1 -1
  76. package/dist/bundle/{chunk-OP5PGE2N.js → chunk-QSWR7VDA.js} +4 -4
  77. package/dist/bundle/{chunk-LA6QUVGQ.js → chunk-R35YGFKQ.js} +163 -16
  78. package/dist/bundle/{chunk-CANRIRNZ.js → chunk-R4J4DLJV.js} +1792 -1205
  79. package/dist/bundle/{chunk-QW7YTRV2.js → chunk-RJJ4OYNH.js} +3 -3
  80. package/dist/bundle/{chunk-DOCVEKP2.js → chunk-RQJ2RXFO.js} +37 -35
  81. package/dist/bundle/{chunk-TF2WKPNW.js → chunk-RRW54FK6.js} +17 -17
  82. package/dist/bundle/{chunk-KFZL67JP.js → chunk-SKDQNYKA.js} +129 -48
  83. package/dist/bundle/{chunk-7GLJSJ7M.js → chunk-SPWKGRTO.js} +1 -1
  84. package/dist/bundle/{chunk-MSQHSW4C.js → chunk-SY4MIIWF.js} +2 -2
  85. package/dist/bundle/{chunk-ZHA56THL.js → chunk-TKPIDOW5.js} +927 -904
  86. package/dist/bundle/{chunk-WXTYYWZI.js → chunk-TLNZUPGU.js} +115 -113
  87. package/dist/bundle/{chunk-WZGKHTA4.js → chunk-TMCXUWTY.js} +8 -2
  88. package/dist/bundle/{chunk-7OD3522V.js → chunk-TN2YUZBF.js} +1192 -496
  89. package/dist/bundle/{chunk-JFPUYQSP.js → chunk-UGLNVUFX.js} +5 -5
  90. package/dist/bundle/{chunk-IFBIXU6C.js → chunk-UVWNUY3W.js} +2 -2
  91. package/dist/bundle/{chunk-5MGICK47.js → chunk-UW3BB2XW.js} +26 -26
  92. package/dist/bundle/{chunk-24OFZNRC.js → chunk-UXSTXFZQ.js} +5168 -4245
  93. package/dist/bundle/{chunk-U32VL3MA.js → chunk-WRRGO246.js} +3 -2
  94. package/dist/bundle/{chunk-QA6KIL7Q.js → chunk-WYV5IITK.js} +11 -8
  95. package/dist/bundle/{chunk-D5EUMWD5.js → chunk-X2FILY5F.js} +3 -3
  96. package/dist/bundle/{chunk-4YIGXTBP.js → chunk-XCC7R47Z.js} +3 -3
  97. package/dist/bundle/{chunk-37NF5CBJ.js → chunk-XFT3YIHU.js} +6 -8
  98. package/dist/bundle/{chunk-IXO4SCKE.js → chunk-XGEPAJBY.js} +1 -1
  99. package/dist/bundle/chunk-XWBPP2HX.js +2 -0
  100. package/dist/bundle/{chunk-RJTGENHZ.js → chunk-Y4KWWPIO.js} +4 -7
  101. package/dist/bundle/{chunk-DEPXZJ2V.js → chunk-YFLTHGB3.js} +17 -13
  102. package/dist/bundle/{chunk-JRCH4YZP.js → chunk-YM6ZATEK.js} +17 -121
  103. package/dist/bundle/{chunk-ADKMBXY4.js → chunk-YNI57LTZ.js} +1 -1
  104. package/dist/bundle/{chunk-ERJYJ36F.js → chunk-ZMHZ6CQS.js} +2 -2
  105. package/dist/bundle/{chunk-M3DMXDX6.js → chunk-ZYMTS3CI.js} +6 -6
  106. package/dist/bundle/{cli-IYYI7GAM.js → cli-5ALOQCAC.js} +152 -123
  107. package/dist/bundle/command-contract-WO5QJVLZ.js +41 -0
  108. package/dist/bundle/{command-server-entry-FXX4LJWF.js → command-server-entry-ICOMIJIH.js} +33 -33
  109. package/dist/bundle/config-YQA5TJ7Y.js +97 -0
  110. package/dist/bundle/{decode-SRGOOGBW.js → decode-7LFOROWF.js} +6 -6
  111. package/dist/bundle/{dispatch-OUHRPFUL.js → dispatch-EU67WGME.js} +9 -9
  112. package/dist/bundle/{dist-UZLNLAIO.js → dist-KJOOYNCP.js} +25 -22
  113. package/dist/bundle/{echarts-7CM2MCMW.js → echarts-EJXBKCJT.js} +2 -2
  114. package/dist/bundle/{embed-VEE56BOB.js → embed-TOZCKRRO.js} +7 -7
  115. package/dist/bundle/{embedder-SZFYR543.js → embedder-QKEKUCS5.js} +10 -10
  116. package/dist/bundle/{failure-MZBNM7M5.js → failure-CTJLEB2R.js} +3 -3
  117. package/dist/bundle/first-run-S7CQVGK6.js +29 -0
  118. package/dist/bundle/first-screen-6GW6FD6S.js +39 -0
  119. package/dist/bundle/folders-MSBTAPAG.js +24 -0
  120. package/dist/bundle/{instructions-R7OHVAWH.js → instructions-Z7GVGWXS.js} +1 -1
  121. package/dist/bundle/{main-EFUN2O3K.js → main-RL3GC4OX.js} +39 -26
  122. package/dist/bundle/{mcp-7KQUJNFN.js → mcp-TDKGDB4V.js} +2 -2
  123. package/dist/bundle/{meetings-5I2BDNTA.js → meetings-JCMLE5AO.js} +9 -7
  124. package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
  125. package/dist/bundle/{node-3N2JGZ7V.js → node-L2PVEW3N.js} +2 -2
  126. package/dist/bundle/{node-sqlite-2UVEE2WM.js → node-sqlite-4YW3W4XI.js} +10 -10
  127. package/dist/bundle/{oauth-AYGD7UU3.js → oauth-NNHWAT6A.js} +8 -8
  128. package/dist/bundle/{open-3GUVDLGD.js → open-PF2JHJIY.js} +6 -6
  129. package/dist/bundle/openai-C72ADYMD.js +28 -0
  130. package/dist/bundle/{output-file-72JFXVHQ.js → output-file-VDOCYH2G.js} +6 -6
  131. package/dist/bundle/{process-YAHHUFR5.js → process-MNZTQ2DA.js} +1 -1
  132. package/dist/bundle/{program-OSZROCTK.js → program-FOCBZZZS.js} +146 -151
  133. package/dist/bundle/{prompt-HMCW4XQJ.js → prompt-RBSUKMV7.js} +6 -6
  134. package/dist/bundle/{recognize-VF5CA7EM.js → recognize-RM6TQKK3.js} +5 -5
  135. package/dist/bundle/{remote-5C6VTPR2.js → remote-UKHTU3YR.js} +11 -10
  136. package/dist/bundle/{rerank-ER7NEDOI.js → rerank-3LBRVESU.js} +8 -8
  137. package/dist/bundle/run-log-UXINNGKA.js +124 -0
  138. package/dist/bundle/{serve-QJWXJOM7.js → serve-OOZFTW3W.js} +10 -10
  139. package/dist/bundle/server-DM5ZPFZB.js +75 -0
  140. package/dist/bundle/{server-KCIK3Y2P.js → server-YNQPNIJD.js} +52 -50
  141. package/dist/bundle/{services-LQMYJQG3.js → services-SLEOMN4B.js} +61 -44
  142. package/dist/bundle/{speech-74GJQNQH.js → speech-FZZ6QVGU.js} +20 -20
  143. package/dist/bundle/sqlite-runtime-WUR4PWYB.js +20 -0
  144. package/dist/bundle/{state-4XDGCHDF.js → state-ET36L4TY.js} +7 -7
  145. package/dist/bundle/{store-5Y5HK2L2.js → store-DI6OUBXA.js} +20 -20
  146. package/dist/bundle/{store-Y56AHJ2Y.js → store-SQB2DOVJ.js} +34 -28
  147. package/dist/bundle/store-connection-M6LVRAZ5.js +90 -0
  148. package/dist/bundle/store-maintenance-command-B66KWG6K.js +65 -0
  149. package/dist/bundle/{streaming-E5CR6HSR.js → streaming-PQEXKTE5.js} +7 -7
  150. package/dist/bundle/tokens-SUHRRQ25.js +24 -0
  151. package/dist/bundle/zm.js +9 -9
  152. package/dist/bundle/{zoom-app-NVL7HEAX.js → zoom-app-GE4SSHOP.js} +9 -8
  153. package/dist/folders.d.ts +12 -2
  154. package/dist/folders.d.ts.map +1 -1
  155. package/dist/folders.js +81 -3
  156. package/dist/folders.js.map +1 -1
  157. package/dist/identity.d.ts +5 -0
  158. package/dist/identity.d.ts.map +1 -1
  159. package/dist/identity.js +14 -0
  160. package/dist/identity.js.map +1 -1
  161. package/dist/recording-schedule-setup.d.ts.map +1 -1
  162. package/dist/recording-schedule-setup.js +4 -7
  163. package/dist/recording-schedule-setup.js.map +1 -1
  164. package/dist/remote-http.d.ts +1 -1
  165. package/dist/remote-http.d.ts.map +1 -1
  166. package/dist/remote-http.js +21 -23
  167. package/dist/remote-http.js.map +1 -1
  168. package/dist/setup-commands.d.ts.map +1 -1
  169. package/dist/setup-commands.js +2 -4
  170. package/dist/setup-commands.js.map +1 -1
  171. package/dist/tokens.d.ts +17 -2
  172. package/dist/tokens.d.ts.map +1 -1
  173. package/dist/tokens.js +109 -29
  174. package/dist/tokens.js.map +1 -1
  175. package/dist/version.d.ts +1 -1
  176. package/dist/version.js +1 -1
  177. package/dist/wcat.d.ts +3 -0
  178. package/dist/wcat.d.ts.map +1 -0
  179. package/dist/wcat.js +4 -0
  180. package/dist/wcat.js.map +1 -0
  181. package/package.json +15 -14
  182. package/dist/bundle/answer-policy-AT6CDEE5.js +0 -110
  183. package/dist/bundle/chunk-EG25AY4L.js +0 -17
  184. package/dist/bundle/chunk-JAEPK457.js +0 -997
  185. package/dist/bundle/chunk-K6HR6HCO.js +0 -32
  186. package/dist/bundle/chunk-OY6N2ABP.js +0 -1239
  187. package/dist/bundle/chunk-YVVJ6Y5C.js +0 -153
  188. package/dist/bundle/command-contract-TX7NSUBM.js +0 -42
  189. package/dist/bundle/config-YKNM33J7.js +0 -96
  190. package/dist/bundle/first-run-KWC7RKF2.js +0 -29
  191. package/dist/bundle/first-screen-DWKMNSEI.js +0 -40
  192. package/dist/bundle/folders-UQXRSDJJ.js +0 -16
  193. package/dist/bundle/openai-NHCDLWWY.js +0 -28
  194. package/dist/bundle/run-log-JKTLKXSK.js +0 -124
  195. package/dist/bundle/server-LLGFDLLJ.js +0 -75
  196. package/dist/bundle/store-connection-4WI32AYU.js +0 -89
  197. package/dist/bundle/store-maintenance-command-PCXO5AH4.js +0 -65
  198. package/dist/bundle/tokens-E2QNVC4F.js +0 -20
  199. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-7O7XM37N.js} +0 -0
@@ -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-3TYNBHBK.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-QA6KIL7Q.js";
18
+ } from "./chunk-WYV5IITK.js";
13
19
  import {
14
20
  permissionCeiling
15
- } from "./chunk-37NF5CBJ.js";
16
- import {
17
- fieldsOf,
18
- projectFields,
19
- resolveOutput
20
- } from "./chunk-YVVJ6Y5C.js";
21
- import {
22
- carries
23
- } from "./chunk-IACWKZWS.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-JAEPK457.js";
46
- import {
47
- ancestorValue,
48
- envName,
49
- readOnlyLockOf,
50
- readOnlyRefusal
51
- } from "./chunk-N4QNYWWG.js";
21
+ } from "./chunk-XFT3YIHU.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-LA6QUVGQ.js";
32
+ permissionOverrides,
33
+ projectFields,
34
+ resolveOutput
35
+ } from "./chunk-R35YGFKQ.js";
36
+ import {
37
+ carries
38
+ } from "./chunk-BOGGQOVO.js";
63
39
  import {
64
40
  endpoint
65
- } from "./chunk-K6HR6HCO.js";
41
+ } from "./chunk-IS6FUZCP.js";
66
42
  import {
67
43
  note
68
- } from "./chunk-QW7YTRV2.js";
44
+ } from "./chunk-RJJ4OYNH.js";
45
+ import {
46
+ filesPresent,
47
+ sharedModelsDirectory
48
+ } from "./chunk-6GPBDVQ2.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-5MGICK47.js";
94
+ } from "./chunk-UW3BB2XW.js";
115
95
  import {
116
96
  isCliFailure,
117
97
  storeDamaged
118
- } from "./chunk-WZGKHTA4.js";
98
+ } from "./chunk-TMCXUWTY.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-VIV64MQM.js";
112
+ STANDINGS,
113
+ TAG_TYPES
114
+ } from "./chunk-7R4UU65O.js";
134
115
  import {
135
- sharedConfigPath
136
- } from "./chunk-IU4DUUB3.js";
116
+ readSharedSection,
117
+ repairConfigText,
118
+ sharedConfigPath,
119
+ writeSharedSection
120
+ } from "./chunk-HGUYJUNO.js";
137
121
  import {
138
122
  storePath
139
- } from "./chunk-3KRTEX5M.js";
123
+ } from "./chunk-LZ4AVHBS.js";
140
124
  import {
141
125
  FACT_TYPES,
142
126
  MEETING_RESULT_ENTITIES,
@@ -154,12 +138,12 @@ import {
154
138
  meetingStats,
155
139
  meetingSummary,
156
140
  meetingTranscript
157
- } from "./chunk-RLCVPECY.js";
141
+ } from "./chunk-NKBMLSWK.js";
158
142
  import {
159
143
  FIELD_TYPES,
160
144
  QUERY_BACKENDS,
161
145
  describeQuery
162
- } from "./chunk-63QXCE5Z.js";
146
+ } from "./chunk-3HTJBGNP.js";
163
147
  import {
164
148
  configFilePath,
165
149
  createRecordLog,
@@ -168,7 +152,7 @@ import {
168
152
  resolvePaths,
169
153
  saveConfigFile,
170
154
  writeSecurely
171
- } from "./chunk-S7SXSHRC.js";
155
+ } from "./chunk-HNWDEDMU.js";
172
156
  import {
173
157
  COMPACT_FLAG,
174
158
  MAX_NEXT_STEPS,
@@ -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,20 +203,22 @@ import {
217
203
  union,
218
204
  unknown,
219
205
  unwrap,
206
+ url,
220
207
  variant,
221
208
  writes
222
- } from "./chunk-UVZLK3M4.js";
209
+ } from "./chunk-4RJL32PF.js";
223
210
  import {
224
- CliError
225
- } from "./chunk-ELJUBPY4.js";
211
+ CliError,
212
+ isCliError
213
+ } from "./chunk-EA2OB75T.js";
226
214
  import {
227
215
  visibleControls
228
- } from "./chunk-6DCLZLGX.js";
216
+ } from "./chunk-HCZYJMBP.js";
229
217
  import {
230
218
  __name
231
219
  } from "./chunk-ZVVMGPBJ.js";
232
220
 
233
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/registry.js
221
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/registry.js
234
222
  var labels = /* @__PURE__ */ new WeakMap();
235
223
  var annotate = /* @__PURE__ */ __name((command, meta) => {
236
224
  labels.set(command, { ...labels.get(command), ...meta });
@@ -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);
@@ -3731,7 +3719,7 @@ __name(useColor, "useColor");
3731
3719
  // node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
3732
3720
  var program = new Command();
3733
3721
 
3734
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/contracts.js
3722
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/contracts.js
3735
3723
  import { isDeepStrictEqual } from "node:util";
3736
3724
  var protectedCommands = /* @__PURE__ */ new WeakMap();
3737
3725
  var hasSharedContract = /* @__PURE__ */ __name((command) => protectedCommands.has(command), "hasSharedContract");
@@ -3933,7 +3921,7 @@ var customizeSharedCommand = /* @__PURE__ */ __name((reference2, reason, build,
3933
3921
  return command;
3934
3922
  }, "customizeSharedCommand");
3935
3923
 
3936
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/document.js
3924
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/document.js
3937
3925
  var argumentInfoSchema = object({
3938
3926
  name: string(),
3939
3927
  required: boolean(),
@@ -3971,7 +3959,7 @@ var commandInfoSchema = object({
3971
3959
  summary: optional(string()),
3972
3960
  description: string(),
3973
3961
  usage: string(),
3974
- origin: picklist(["handwritten", "generated"]),
3962
+ origin: picklist(["handwritten", "generated", "cli-core"]),
3975
3963
  api_operation: optional(string()),
3976
3964
  effects: optional(effectsSchema),
3977
3965
  state: optional(picklist(["beta", "deprecated"])),
@@ -4007,7 +3995,7 @@ var commandsDocumentSchema = strictObject({
4007
3995
  exit_codes: record(string(), pipe(number(), integer()))
4008
3996
  });
4009
3997
 
4010
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/index.js
3998
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/index.js
4011
3999
  var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
4012
4000
  let command = root;
4013
4001
  const path2 = [];
@@ -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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
4016
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/member.js
4096
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/chat.js
4119
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/message.js
4160
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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,20 @@ var message = strictObject({
4263
4321
  provider_metadata: providerMetadata
4264
4322
  });
4265
4323
 
4266
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
4324
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/recorded-meeting.js
4325
+ var recordedMeeting = strictObject({
4326
+ ref: reference,
4327
+ meeting_id: count,
4328
+ account: strictObject({ provider: text, account: text }),
4329
+ title: nullable(text),
4330
+ started_at: nullable(time),
4331
+ duration_ms: nullable(count),
4332
+ has_transcript: boolean(),
4333
+ event: nullable(reference),
4334
+ people: array(reference)
4335
+ });
4336
+
4337
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
4267
4338
  var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
4268
4339
  var contextMessage = strictObject({
4269
4340
  locator: reference,
@@ -4309,6 +4380,8 @@ var context = strictObject({
4309
4380
  mentions: array(contextMessage),
4310
4381
  /** Calendar events they are invited to, one occurrence per series. */
4311
4382
  events: optional(strictObject({ upcoming: array(contextEvent), recent: array(contextEvent) })),
4383
+ /** Recorded meetings and calls they took part in, newest first. */
4384
+ meetings: optional(array(recordedMeeting)),
4312
4385
  limits: strictObject({ messages: count, bytes: count }),
4313
4386
  complete: boolean(),
4314
4387
  not_read: array(strictObject({
@@ -4467,7 +4540,7 @@ var contactPreparation = strictObject({
4467
4540
  })
4468
4541
  });
4469
4542
 
4470
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/deal.js
4543
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/deal.js
4471
4544
  var nullableText = nullable(text);
4472
4545
  var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
4473
4546
  var outcome = picklist(["open", "won", "lost"]);
@@ -4538,6 +4611,8 @@ var deal = strictObject({
4538
4611
  updated_at: time,
4539
4612
  /** `show` of a CRM copy whose `activities` setting is on: its activities and tasks, open ones first. */
4540
4613
  activities: optional(array(activity)),
4614
+ /** `show` of a CRM copy: the newest recorded meetings and calls of its people, in its account's scope. */
4615
+ meetings: optional(array(recordedMeeting)),
4541
4616
  untrusted
4542
4617
  });
4543
4618
  var lead = deal;
@@ -4576,7 +4651,7 @@ var stage = strictObject({
4576
4651
  untrusted
4577
4652
  });
4578
4653
 
4579
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/business-context.js
4654
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/business-context.js
4580
4655
  var nullableText2 = nullable(text);
4581
4656
  var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
4582
4657
  var standing = picklist(STANDINGS);
@@ -4750,7 +4825,7 @@ var dealBrief = strictObject({
4750
4825
  not_read: coverage2.entries.not_read
4751
4826
  });
4752
4827
 
4753
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/list-results.js
4828
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/list-results.js
4754
4829
  var botProfile = strictObject({
4755
4830
  name: text,
4756
4831
  token: text,
@@ -4874,7 +4949,7 @@ var stickerInventory = strictObject({
4874
4949
  url: optional(nullable(text))
4875
4950
  });
4876
4951
 
4877
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
4952
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
4878
4953
  var actionableError = objectWithRest({
4879
4954
  code: text,
4880
4955
  message: text,
@@ -4891,7 +4966,7 @@ var batchResult = strictObject({
4891
4966
  max_error_percent: count
4892
4967
  });
4893
4968
 
4894
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
4969
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
4895
4970
  var conversationBuild = strictObject({
4896
4971
  chat: id,
4897
4972
  messages: count,
@@ -4916,13 +4991,53 @@ var catchUpPreparation = strictObject({
4916
4991
  prepared: optional(conversationPreparation)
4917
4992
  });
4918
4993
 
4919
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
4994
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
4920
4995
  import { spawn } from "node:child_process";
4921
4996
  import { randomBytes } from "node:crypto";
4922
- import { closeSync, existsSync, mkdirSync, openSync, readdirSync, readFileSync, realpathSync, rmSync } from "node:fs";
4923
- 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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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");
4924
5039
 
4925
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/runs/record-log.js
5040
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/runs/record-log.js
4926
5041
  var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
4927
5042
  const run = currentRun();
4928
5043
  const trace = traceId ?? run.traceId;
@@ -4936,7 +5051,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
4936
5051
  }));
4937
5052
  }, "recordLogFor");
4938
5053
 
4939
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
5054
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
4940
5055
  var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
4941
5056
  var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
4942
5057
  const out = openSync(log, "a", 384);
@@ -4952,23 +5067,23 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
4952
5067
  closeSync(out);
4953
5068
  }
4954
5069
  }, "spawnDetached");
4955
- var jobsDir = /* @__PURE__ */ __name((app, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
4956
- 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");
4957
5072
  var saveJob = /* @__PURE__ */ __name((dir, job2) => {
4958
5073
  mkdirSync(dir, { recursive: true, mode: 448 });
4959
5074
  writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
4960
5075
  `, 384);
4961
5076
  }, "saveJob");
4962
5077
  var readJob = /* @__PURE__ */ __name((dir, id6) => {
4963
- if (!/^[\w-]+$/.test(id6) || !existsSync(jobPath(dir, id6)))
5078
+ if (!/^[\w-]+$/.test(id6) || !existsSync2(jobPath(dir, id6)))
4964
5079
  return void 0;
4965
5080
  try {
4966
- return JSON.parse(readFileSync(jobPath(dir, id6), "utf8"));
5081
+ return JSON.parse(readFileSync2(jobPath(dir, id6), "utf8"));
4967
5082
  } catch {
4968
5083
  return void 0;
4969
5084
  }
4970
5085
  }, "readJob");
4971
- var recordsPath = /* @__PURE__ */ __name((dir, id6) => join(dir, `${id6}.jsonl`), "recordsPath");
5086
+ var recordsPath = /* @__PURE__ */ __name((dir, id6) => join2(dir, `${id6}.jsonl`), "recordsPath");
4972
5087
  var tracedJob = /* @__PURE__ */ __name((env) => {
4973
5088
  const trace = childTrace();
4974
5089
  return { env: { ...env, TRACEPARENT: trace.traceparent }, traceId: trace.traceId };
@@ -5000,12 +5115,12 @@ var updateJob = /* @__PURE__ */ __name((dir, id6, change) => {
5000
5115
  saveJob(dir, { ...job2, ...change });
5001
5116
  }, "updateJob");
5002
5117
  var removeJob = /* @__PURE__ */ __name((dir, job2) => {
5003
- rmSync(jobPath(dir, job2.id), { force: true });
5004
- rmSync(recordsPath(dir, job2.id), { force: true });
5118
+ rmSync2(jobPath(dir, job2.id), { force: true });
5119
+ rmSync2(recordsPath(dir, job2.id), { force: true });
5005
5120
  if (dirname(job2.log) === dir)
5006
- rmSync(job2.log, { force: true });
5121
+ rmSync2(job2.log, { force: true });
5007
5122
  }, "removeJob");
5008
- 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");
5009
5124
  var jobDetails = /* @__PURE__ */ __name((job2) => ({
5010
5125
  job: job2.id,
5011
5126
  profile: job2.profile,
@@ -5071,7 +5186,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
5071
5186
  const startedAt = (/* @__PURE__ */ new Date()).toISOString();
5072
5187
  const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes(3).toString("hex")}`;
5073
5188
  mkdirSync(dir, { recursive: true, mode: 448 });
5074
- const log = join(dir, `${id6}.log`);
5189
+ const log = join2(dir, `${id6}.log`);
5075
5190
  const job2 = {
5076
5191
  id: id6,
5077
5192
  chat: input.chat,
@@ -5091,7 +5206,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
5091
5206
  return { job: id6, pid, chat: input.chat, log };
5092
5207
  }, "startArchiveJob");
5093
5208
 
5094
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/job.js
5209
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/job.js
5095
5210
  var problem = strictObject({ code: text, message: text });
5096
5211
  var job = strictObject({
5097
5212
  id,
@@ -5114,7 +5229,7 @@ var job = strictObject({
5114
5229
  error: optional(problem)
5115
5230
  });
5116
5231
 
5117
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
5232
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
5118
5233
  var extractionItem = strictObject({
5119
5234
  ref: reference,
5120
5235
  attachment: count,
@@ -5147,7 +5262,7 @@ var extractionReport = strictObject({
5147
5262
  cursor: optional(text)
5148
5263
  });
5149
5264
 
5150
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
5265
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
5151
5266
  var savedMessageFile = strictObject({
5152
5267
  kind: text,
5153
5268
  path: text,
@@ -5234,7 +5349,7 @@ var messageSyncAll = strictObject({
5234
5349
  var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
5235
5350
  var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
5236
5351
 
5237
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/store-records.js
5352
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/store-records.js
5238
5353
  var range = strictObject({ from: number(), to: number() });
5239
5354
  var storeChatStatus = strictObject({
5240
5355
  chat_id: id,
@@ -5332,7 +5447,7 @@ var storeJobRetry = union([
5332
5447
  ]);
5333
5448
  var storeJobClear = strictObject({ cleared: array(id) });
5334
5449
 
5335
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/account.js
5450
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/account.js
5336
5451
  var account = strictObject({
5337
5452
  provider: text,
5338
5453
  id,
@@ -5342,7 +5457,7 @@ var account = strictObject({
5342
5457
  scope: optional(picklist(["personal", "work"]))
5343
5458
  });
5344
5459
 
5345
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/account-session.js
5460
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/account-session.js
5346
5461
  var accountSession = strictObject({
5347
5462
  current: boolean(),
5348
5463
  client: nullable(text),
@@ -5352,7 +5467,7 @@ var accountSession = strictObject({
5352
5467
  created_at: optional(nullable(time))
5353
5468
  });
5354
5469
 
5355
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/account-change.js
5470
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/account-change.js
5356
5471
  var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
5357
5472
  var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
5358
5473
  var audience = picklist(["everyone", "contacts", "nobody"]);
@@ -5381,7 +5496,7 @@ var accountRemoval = strictObject({
5381
5496
  kept: array(strictObject({ kind: removalKind, target: text, reason: text }))
5382
5497
  });
5383
5498
 
5384
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
5499
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
5385
5500
  var accountProfile = strictObject({
5386
5501
  profile: id,
5387
5502
  current: boolean(),
@@ -5393,7 +5508,7 @@ var accountProfile = strictObject({
5393
5508
  bot: optional(literal(true))
5394
5509
  });
5395
5510
 
5396
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
5511
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
5397
5512
  var milliseconds = pipe(number(), minValue(0));
5398
5513
  var counterReading = strictObject({
5399
5514
  counter: picklist(["views", "reactions", "comments"]),
@@ -5405,7 +5520,7 @@ var counterReading = strictObject({
5405
5520
  });
5406
5521
  var selection = record(string(), unknown());
5407
5522
 
5408
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
5523
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
5409
5524
  var adminRow = strictObject({
5410
5525
  ref: reference,
5411
5526
  /** What `stats * evidence` takes: a person id, a stay or a message locator. */
@@ -5458,11 +5573,143 @@ var adminReport = strictObject({
5458
5573
  rows: array(adminRow)
5459
5574
  });
5460
5575
 
5461
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
5576
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
5462
5709
  var analysisConsent = strictObject({ chat: id, provider: text, at: time });
5463
5710
  var analysisConsentRevocation = strictObject({ revoked: boolean() });
5464
5711
 
5465
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
5712
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
5466
5713
  var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
5467
5714
  var attachmentBytes = strictObject({
5468
5715
  ref: reference,
@@ -5493,7 +5740,7 @@ var attachmentTextChange = strictObject({
5493
5740
  text: optional(text)
5494
5741
  });
5495
5742
 
5496
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/chart.js
5743
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/chart.js
5497
5744
  var chart = strictObject({
5498
5745
  version: literal(1),
5499
5746
  kind: picklist(["bar", "line", "grouped-bar"]),
@@ -5508,7 +5755,7 @@ var chart = strictObject({
5508
5755
  file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
5509
5756
  });
5510
5757
 
5511
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/folder.js
5758
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/folder.js
5512
5759
  var named = strictObject({
5513
5760
  id,
5514
5761
  title: nullable(text),
@@ -5531,7 +5778,7 @@ var folder = strictObject({
5531
5778
  excluded_chats: optional(array(named))
5532
5779
  });
5533
5780
 
5534
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
5781
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
5535
5782
  var inviteLink = strictObject({
5536
5783
  link: text,
5537
5784
  /** Who joins by it asks first, and an admin lets them in. */
@@ -5547,7 +5794,7 @@ var inviteLink = strictObject({
5547
5794
  joined_count: optional(count)
5548
5795
  });
5549
5796
 
5550
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
5797
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
5551
5798
  var operated = { operation_id: id, chat_id: id };
5552
5799
  var group = strictObject({
5553
5800
  ...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
@@ -5627,7 +5874,7 @@ var chatFolderOrder = strictObject({
5627
5874
  folders: array(strictObject({ id, title: text }))
5628
5875
  });
5629
5876
 
5630
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
5877
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
5631
5878
  var operated2 = { operation_id: id, chat_id: id };
5632
5879
  var chatRemoval = strictObject(operated2);
5633
5880
  var chatMuting = strictObject({
@@ -5638,7 +5885,7 @@ var chatArchive = strictObject({ ...operated2, archived: boolean() });
5638
5885
  var chatPin = strictObject({ ...operated2, pinned: boolean() });
5639
5886
  var chatUnread = strictObject({ ...operated2, unread: literal(true) });
5640
5887
 
5641
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
5888
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
5642
5889
  var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
5643
5890
  var chatEvent = strictObject({
5644
5891
  chat_id: id,
@@ -5655,7 +5902,7 @@ var chatEvent = strictObject({
5655
5902
  before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
5656
5903
  });
5657
5904
 
5658
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
5905
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
5659
5906
  var chatMetadata = strictObject({
5660
5907
  chat_id: id,
5661
5908
  title: nullable(text),
@@ -5670,7 +5917,7 @@ var chatMetadataRefresh = strictObject({
5670
5917
  has_more: boolean()
5671
5918
  });
5672
5919
 
5673
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
5920
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
5674
5921
  var action = picklist(["report", "delete", "remove"]);
5675
5922
  var level = picklist(["deny", "readonly", "ask", "allow"]);
5676
5923
  var chatRules = strictObject({
@@ -5707,7 +5954,7 @@ var chatModeration = strictObject({
5707
5954
  }))
5708
5955
  });
5709
5956
 
5710
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
5957
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
5711
5958
  var optionalCount = optional(count);
5712
5959
  var minutes = nullable(number());
5713
5960
  var chatStats = strictObject({
@@ -5783,7 +6030,7 @@ var taskStats = strictObject({
5783
6030
  }))
5784
6031
  });
5785
6032
 
5786
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
6033
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
5787
6034
  var memberCount = strictObject({
5788
6035
  day: pipe(text, isoDate()),
5789
6036
  participants: nullable(count),
@@ -5806,7 +6053,7 @@ var chatTracking = strictObject({
5806
6053
  tracked: boolean()
5807
6054
  });
5808
6055
 
5809
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
6056
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
5810
6057
  var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
5811
6058
  var contactSync = strictObject({ added: count, changed: count, known: count });
5812
6059
  var profileFields = {
@@ -5844,7 +6091,7 @@ var profileFields = {
5844
6091
  }))
5845
6092
  };
5846
6093
 
5847
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/contact.js
6094
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/contact.js
5848
6095
  var contact = strictObject({
5849
6096
  ref: reference,
5850
6097
  id,
@@ -5875,7 +6122,7 @@ var contact = strictObject({
5875
6122
  notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
5876
6123
  });
5877
6124
 
5878
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
6125
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
5879
6126
  var contactNote = strictObject({
5880
6127
  id,
5881
6128
  /** The contact, as a `contact:` reference. */
@@ -5887,13 +6134,28 @@ var contactNote = strictObject({
5887
6134
  updated_at: time
5888
6135
  });
5889
6136
 
5890
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
6137
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
5891
6138
  var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
5892
6139
  var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
5893
6140
  var contactStateChange = strictObject({ operation_id: id, person_id: id });
5894
6141
  var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
5895
6142
 
5896
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
6143
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
5897
6159
  var conversationDetails = union([
5898
6160
  strictObject({ ...conversation.entries, messages: array(message) }),
5899
6161
  message
@@ -5983,7 +6245,7 @@ var conversationHit = strictObject({
5983
6245
  stale: boolean()
5984
6246
  });
5985
6247
 
5986
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/counters.js
6248
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/counters.js
5987
6249
  var counters = strictObject({
5988
6250
  cutoff: time,
5989
6251
  max_age_ms: milliseconds,
@@ -6013,7 +6275,7 @@ var counterRefresh = strictObject({
6013
6275
  complete: optional(boolean())
6014
6276
  });
6015
6277
 
6016
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/document.js
6278
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/document.js
6017
6279
  var document = strictObject({
6018
6280
  ref: reference,
6019
6281
  id,
@@ -6028,7 +6290,7 @@ var document = strictObject({
6028
6290
  owners: optional(array(text))
6029
6291
  });
6030
6292
 
6031
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/document-link.js
6293
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/document-link.js
6032
6294
  var documentLink = strictObject({
6033
6295
  ref: reference,
6034
6296
  url: text,
@@ -6039,7 +6301,7 @@ var documentLink = strictObject({
6039
6301
  sender: strictObject({ id: nullable(id), name: nullable(text) })
6040
6302
  });
6041
6303
 
6042
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/evidence.js
6304
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/evidence.js
6043
6305
  var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
6044
6306
  var contribution = strictObject({
6045
6307
  message: evidenceMessage,
@@ -6069,7 +6331,7 @@ var retentionStay = strictObject({
6069
6331
  });
6070
6332
  var evidence = union([contribution, retentionStay]);
6071
6333
 
6072
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/fact.js
6334
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/fact.js
6073
6335
  var fact = strictObject({
6074
6336
  ref: reference,
6075
6337
  id,
@@ -6100,7 +6362,7 @@ var fact = strictObject({
6100
6362
  updated_at: time
6101
6363
  });
6102
6364
 
6103
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/hit.js
6365
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/hit.js
6104
6366
  var hit = strictObject({
6105
6367
  kind: picklist(["message", "mail", "note", "document", "event", "meeting", "deal", "lead", ...BUSINESS_KINDS]),
6106
6368
  ref: reference,
@@ -6140,13 +6402,15 @@ var hit = strictObject({
6140
6402
  review: optional(picklist(["proposed", "confirmed"])),
6141
6403
  /** A business hit's record in the import that made it; absent for one the owner or an agent wrote. */
6142
6404
  source_record: optional(strictObject({ provider: text, account: text, external_id: text })),
6405
+ /** A document's: the meeting it is the transcript, recording or notes of. */
6406
+ meeting: optional(reference),
6143
6407
  /** A message's files; absent when it has none. */
6144
6408
  attachments: optional(array(hitFile)),
6145
6409
  /** Absent on a note hit: the owner wrote it. */
6146
6410
  untrusted
6147
6411
  });
6148
6412
 
6149
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/identity.js
6413
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/identity.js
6150
6414
  var identity = strictObject({
6151
6415
  ref: reference,
6152
6416
  provider: text,
@@ -6162,7 +6426,7 @@ var identity = strictObject({
6162
6426
  person: optional(nullable(reference))
6163
6427
  });
6164
6428
 
6165
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
6429
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
6166
6430
  var imageEmbedding = strictObject({
6167
6431
  model: text,
6168
6432
  embedded: count,
@@ -6171,7 +6435,7 @@ var imageEmbedding = strictObject({
6171
6435
  more: boolean()
6172
6436
  });
6173
6437
 
6174
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/join-request.js
6438
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/join-request.js
6175
6439
  var joinRequest = strictObject({
6176
6440
  person_id: id,
6177
6441
  name: nullable(text),
@@ -6182,7 +6446,7 @@ var joinRequest = strictObject({
6182
6446
  about: optional(text)
6183
6447
  });
6184
6448
 
6185
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
6449
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
6186
6450
  var pollVote = strictObject({
6187
6451
  person_id: id,
6188
6452
  name: nullable(text),
@@ -6192,7 +6456,7 @@ var pollVote = strictObject({
6192
6456
  voted_at: time
6193
6457
  });
6194
6458
 
6195
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/listener.js
6459
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/listener.js
6196
6460
  var reactions = unwrap(unwrap(message.entries.reactions));
6197
6461
  var observation = strictObject({
6198
6462
  value: pipe(number(), minValue(0)),
@@ -6234,7 +6498,7 @@ var serveSummary = strictObject({
6234
6498
  tasks: optional(strictObject({ added: count, closed: count, review: count }))
6235
6499
  });
6236
6500
 
6237
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
6501
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
6238
6502
  var mailCounts = strictObject({
6239
6503
  by: picklist(["day", "week", "sender"]),
6240
6504
  received: count,
@@ -6249,7 +6513,7 @@ var mailCounts = strictObject({
6249
6513
  }))
6250
6514
  });
6251
6515
 
6252
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
6516
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
6253
6517
  var evidence2 = strictObject({ reference, fingerprint: text });
6254
6518
  var base = { id, evidence: array(evidence2) };
6255
6519
  var finding = variant("kind", [
@@ -6393,7 +6657,7 @@ var mailFindings = strictObject({
6393
6657
  receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
6394
6658
  });
6395
6659
 
6396
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
6660
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
6397
6661
  var mediaArchive = strictObject({
6398
6662
  directory: text,
6399
6663
  chats: count,
@@ -6425,7 +6689,7 @@ var mediaArchiveTimer = union([
6425
6689
  strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
6426
6690
  ]);
6427
6691
 
6428
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
6692
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
6429
6693
  var preparationId = pipe(string(), minLength(1));
6430
6694
  var preparationCount = pipe(number(), integer(), minValue(0));
6431
6695
  var preparationTime = nullable(isoTime);
@@ -6517,7 +6781,7 @@ var preparationMeeting = strictObject({
6517
6781
  updated_at: isoTime
6518
6782
  });
6519
6783
 
6520
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
6784
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
6521
6785
  var meetingEvidence = preparationEvidence;
6522
6786
  var meetingPersonContext = strictObject({
6523
6787
  person: strictObject({ uid: string(), name: nullable(string()) }),
@@ -6539,7 +6803,7 @@ var meetingPersonContext = strictObject({
6539
6803
  })
6540
6804
  });
6541
6805
 
6542
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
6806
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
6543
6807
  var evidence3 = strictObject({ reference, fingerprint: text });
6544
6808
  var base2 = { id, project: reference, evidence: array(evidence3) };
6545
6809
  var finding2 = variant("kind", [
@@ -6577,7 +6841,7 @@ var meetingFindings = strictObject({
6577
6841
  receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome3) }))
6578
6842
  });
6579
6843
 
6580
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
6844
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
6581
6845
  var communicationCoverage = strictObject({
6582
6846
  read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
6583
6847
  query: string(),
@@ -6622,7 +6886,7 @@ var preparationCommunications = strictObject({
6622
6886
  }))
6623
6887
  });
6624
6888
 
6625
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
6889
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
6626
6890
  var meetingPreparation = strictObject({
6627
6891
  communications: optional(preparationCommunications),
6628
6892
  schema_version: literal(1),
@@ -6735,7 +6999,7 @@ var meetingPreparation = strictObject({
6735
6999
  })
6736
7000
  });
6737
7001
 
6738
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
7002
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
6739
7003
  var count3 = pipe(number(), integer(), minValue(0));
6740
7004
  var id3 = pipe(string(), minLength(1));
6741
7005
  var text3 = string();
@@ -6799,7 +7063,7 @@ var meetingProjectCandidates = strictObject({
6799
7063
  })
6800
7064
  });
6801
7065
 
6802
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
7066
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
6803
7067
  var count4 = pipe(number(), integer(), minValue(0));
6804
7068
  var id4 = pipe(string(), minLength(1), maxLength(1e3));
6805
7069
  var meetingSeriesInventory = strictObject({
@@ -6829,7 +7093,7 @@ var meetingSeriesInventory = strictObject({
6829
7093
  })
6830
7094
  });
6831
7095
 
6832
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
7096
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
6833
7097
  var text4 = string();
6834
7098
  var id5 = pipe(number(), integer(), minValue(1));
6835
7099
  var revision = picklist(["current", "superseded"]);
@@ -6846,7 +7110,7 @@ var meetingTaskProposal = strictObject({
6846
7110
  persistence: literal("proposal-only")
6847
7111
  });
6848
7112
 
6849
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/memory.js
7113
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/memory.js
6850
7114
  var memory = strictObject({
6851
7115
  ref: reference,
6852
7116
  id,
@@ -6874,7 +7138,7 @@ var memory = strictObject({
6874
7138
  updated_at: time
6875
7139
  });
6876
7140
 
6877
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/mention.js
7141
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/mention.js
6878
7142
  var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
6879
7143
  var status = picklist(["found", "linked", "proposed", "dismissed"]);
6880
7144
  var mention = strictObject({
@@ -6918,13 +7182,13 @@ var mentionRebuild = strictObject({
6918
7182
  mentions: count
6919
7183
  });
6920
7184
 
6921
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/message-change.js
7185
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/message-change.js
6922
7186
  var operated3 = { operation_id: id, chat_id: id };
6923
7187
  var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
6924
7188
  var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
6925
7189
  var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
6926
7190
 
6927
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/message-read.js
7191
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/message-read.js
6928
7192
  var messageTranscript = strictObject({
6929
7193
  message_id: id,
6930
7194
  text,
@@ -6982,7 +7246,7 @@ var evidencePacket = strictObject({
6982
7246
  }))
6983
7247
  });
6984
7248
 
6985
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/message-context.js
7249
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/message-context.js
6986
7250
  var messageThread = strictObject({
6987
7251
  ref: reference,
6988
7252
  chat: id,
@@ -6999,7 +7263,7 @@ var messageThread = strictObject({
6999
7263
  });
7000
7264
  var messageContext = union([message, messageThread]);
7001
7265
 
7002
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
7266
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
7003
7267
  var messageCounts = strictObject({
7004
7268
  by: picklist(["chat", "sender", "day", "hour"]),
7005
7269
  total: count,
@@ -7012,7 +7276,7 @@ var messageCounts = strictObject({
7012
7276
  }))
7013
7277
  });
7014
7278
 
7015
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/message-link.js
7279
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/message-link.js
7016
7280
  var messageLink = strictObject({
7017
7281
  ref: reference,
7018
7282
  url: nullable(text),
@@ -7029,7 +7293,7 @@ var messageLink = strictObject({
7029
7293
  })))
7030
7294
  });
7031
7295
 
7032
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/message-write.js
7296
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/message-write.js
7033
7297
  var messageWrite = strictObject({
7034
7298
  operation_id: id,
7035
7299
  message,
@@ -7044,7 +7308,7 @@ var draftWrite = strictObject({
7044
7308
  });
7045
7309
  var messageSend = union([messageWrite, draftWrite]);
7046
7310
 
7047
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/model.js
7311
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/model.js
7048
7312
  var model = strictObject({
7049
7313
  id,
7050
7314
  kind: picklist(["audio", "text", "image", "reranker"]),
@@ -7079,7 +7343,7 @@ var chosenModel = strictObject({
7079
7343
  estimate_seconds: nullable(count)
7080
7344
  });
7081
7345
 
7082
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/model-key.js
7346
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/model-key.js
7083
7347
  var source = picklist(["environment", "keyring", "file"]);
7084
7348
  var modelKey = strictObject({
7085
7349
  provider: text,
@@ -7089,7 +7353,7 @@ var modelKey = strictObject({
7089
7353
  var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
7090
7354
  var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
7091
7355
 
7092
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
7356
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
7093
7357
  var versus = strictObject({ current: number(), previous: number() });
7094
7358
  var person = { person_ref: reference, name: nullable(text) };
7095
7359
  var graph = strictObject({
@@ -7123,14 +7387,14 @@ var officialStats = strictObject({
7123
7387
  graphs: record(string(), union([graph, strictObject({ error: text })]))
7124
7388
  });
7125
7389
 
7126
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/person.js
7390
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/person.js
7127
7391
  var person2 = strictObject({
7128
7392
  ref: reference,
7129
7393
  name: nullable(text),
7130
7394
  identities: optional(array(identity))
7131
7395
  });
7132
7396
 
7133
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/poll.js
7397
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/poll.js
7134
7398
  var poll = strictObject({
7135
7399
  chat_id: id,
7136
7400
  message_id: id,
@@ -7146,11 +7410,11 @@ var poll = strictObject({
7146
7410
  });
7147
7411
  var pollChange = strictObject({ operation_id: id, poll });
7148
7412
 
7149
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
7413
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
7150
7414
  var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
7151
7415
  var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
7152
7416
 
7153
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/ranking.js
7417
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/ranking.js
7154
7418
  var figures = record(string(), number());
7155
7419
  var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
7156
7420
  var rankingRow = strictObject({
@@ -7197,7 +7461,7 @@ var ranking = strictObject({
7197
7461
  rows: array(rankingRow)
7198
7462
  });
7199
7463
 
7200
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/reaction.js
7464
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/reaction.js
7201
7465
  var reaction = strictObject({
7202
7466
  person: strictObject({ id, name: nullable(text), username: nullable(text) }),
7203
7467
  /** The emoji, or `custom:<id>` for a custom one. */
@@ -7205,7 +7469,7 @@ var reaction = strictObject({
7205
7469
  reacted_at: time
7206
7470
  });
7207
7471
 
7208
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
7472
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
7209
7473
  var reactionChange = strictObject({
7210
7474
  operation_id: id,
7211
7475
  chat_id: id,
@@ -7213,7 +7477,7 @@ var reactionChange = strictObject({
7213
7477
  reaction: nullable(text)
7214
7478
  });
7215
7479
 
7216
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/recipient.js
7480
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/recipient.js
7217
7481
  var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
7218
7482
  var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
7219
7483
  var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
@@ -7224,7 +7488,7 @@ var recipientChange = strictObject({
7224
7488
  ...partial(recipientOff).entries
7225
7489
  });
7226
7490
 
7227
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
7491
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
7228
7492
  var events = array(record(string(), unknown()));
7229
7493
  var recordedRun = strictObject({
7230
7494
  run_id: id,
@@ -7296,7 +7560,7 @@ var runHit = strictObject({
7296
7560
  });
7297
7561
  var runLocation = strictObject({ path: text });
7298
7562
 
7299
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/relationship.js
7563
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/relationship.js
7300
7564
  var relationship = strictObject({
7301
7565
  id,
7302
7566
  from: reference,
@@ -7323,7 +7587,7 @@ var relationship = strictObject({
7323
7587
  created_at: time
7324
7588
  });
7325
7589
 
7326
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
7590
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
7327
7591
  var milliseconds2 = nullable(pipe(number(), minValue(0)));
7328
7592
  var figures2 = { replies: count, median_ms: milliseconds2, p90_ms: milliseconds2, mean_ms: milliseconds2 };
7329
7593
  var responseTimes = strictObject({
@@ -7340,7 +7604,7 @@ var waitingChats = strictObject({
7340
7604
  by_kind: strictObject({ private: count, group: count })
7341
7605
  });
7342
7606
 
7343
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/retention.js
7607
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/retention.js
7344
7608
  var retentionCohort = strictObject({
7345
7609
  /** The first day of the joining day or week. */
7346
7610
  cohort: text,
@@ -7388,7 +7652,7 @@ var retention = strictObject({
7388
7652
  rows: array(retentionCohort)
7389
7653
  });
7390
7654
 
7391
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
7655
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
7392
7656
  var savedSearch = strictObject({
7393
7657
  id,
7394
7658
  /** `null` for a run in the history. */
@@ -7405,7 +7669,7 @@ var savedSearch = strictObject({
7405
7669
  });
7406
7670
  var searchHistoryClear = strictObject({ cleared: count });
7407
7671
 
7408
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
7672
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
7409
7673
  var sendAttempt = strictObject({
7410
7674
  at: time,
7411
7675
  profile: text,
@@ -7433,7 +7697,7 @@ var sendAttempt = strictObject({
7433
7697
  error_code: optional(text)
7434
7698
  });
7435
7699
 
7436
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
7700
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
7437
7701
  var absent = strictObject({ path: text, exists: literal(false) });
7438
7702
  var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
7439
7703
  var infoSchema = strictObject({
@@ -7663,7 +7927,7 @@ var storeRepair = union([
7663
7927
  ]);
7664
7928
  var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
7665
7929
 
7666
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/store-table.js
7930
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/store-table.js
7667
7931
  var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
7668
7932
  var storeTable = strictObject({
7669
7933
  name: text,
@@ -7672,7 +7936,7 @@ var storeTable = strictObject({
7672
7936
  bytes: optional(nullable(count))
7673
7937
  });
7674
7938
 
7675
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
7939
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
7676
7940
  var tagTarget = variant("type", [
7677
7941
  strictObject({ type: literal("chat"), chat_id: id }),
7678
7942
  strictObject({ type: literal("contact"), person_id: id }),
@@ -7703,7 +7967,20 @@ var automaticTags = strictObject({
7703
7967
  dry_run: boolean()
7704
7968
  });
7705
7969
 
7706
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
7970
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
7707
7984
  var side = strictObject({ ref: reference, key: text, title: text, status: text });
7708
7985
  var taskPair = strictObject({
7709
7986
  task: nullable(side),
@@ -7726,7 +8003,7 @@ var taskPair = strictObject({
7726
8003
  created_at: time
7727
8004
  });
7728
8005
 
7729
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/task-results.js
8006
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/task-results.js
7730
8007
  var nullableTime = nullable(time);
7731
8008
  var link = strictObject({
7732
8009
  id,
@@ -7900,7 +8177,7 @@ var taskReview = strictObject({
7900
8177
  untrusted
7901
8178
  });
7902
8179
 
7903
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/template.js
8180
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/template.js
7904
8181
  var template = strictObject({
7905
8182
  key: text,
7906
8183
  channel: picklist(["telegram", "email", "text"]),
@@ -7912,7 +8189,7 @@ var template = strictObject({
7912
8189
  updated_by: nullable(text)
7913
8190
  });
7914
8191
 
7915
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/topic.js
8192
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/topic.js
7916
8193
  var topic = strictObject({
7917
8194
  id,
7918
8195
  title: text,
@@ -7926,7 +8203,7 @@ var topic = strictObject({
7926
8203
  untrusted
7927
8204
  });
7928
8205
 
7929
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/entities/index.js
8206
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/entities/index.js
7930
8207
  var ENTITIES = {
7931
8208
  sync_progress: progress,
7932
8209
  deal,
@@ -8221,7 +8498,7 @@ var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.e
8221
8498
  return [name, definition];
8222
8499
  })), "entityDefinitions");
8223
8500
 
8224
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
8501
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
8225
8502
  var schemas = /* @__PURE__ */ new WeakMap();
8226
8503
  var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
8227
8504
  if (Object.hasOwn(ENTITIES, name))
@@ -8255,7 +8532,7 @@ var answerRow = /* @__PURE__ */ __name((command) => {
8255
8532
  return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
8256
8533
  }, "answerRow");
8257
8534
 
8258
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
8535
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
8259
8536
  var where = [{ field: "ref" }];
8260
8537
  var who2 = { field: ["who.owner", "who.name"], tag: "you" };
8261
8538
  var ON_CHAT_ROW = /* @__PURE__ */ new Set(["reply-next", "coverage"]);
@@ -8347,7 +8624,7 @@ var STATUS_ROWS = {
8347
8624
  "status.failed": { columns: [{ field: "signal" }], text: ["why"] }
8348
8625
  };
8349
8626
 
8350
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/compact.js
8627
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/compact.js
8351
8628
  var TEXT_CHARS = 400;
8352
8629
  var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
8353
8630
  var messageRow = {
@@ -8695,8 +8972,9 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
8695
8972
  } else if (isFields(body.item)) {
8696
8973
  const sections = shape.sections ?? {};
8697
8974
  const rest = Object.fromEntries(Object.entries(body.item).filter(([name]) => !Object.hasOwn(sections, name) && !shape.hidden?.includes(name)));
8698
- lines = blockOf(rest, chars, "", shape.whole).map(guarded);
8699
- let dates = [];
8975
+ const own = shape.oneLine ? rowsOfItems([rest], shape, clock, chars) : void 0;
8976
+ lines = own ? own.lines.filter((line) => line !== "") : blockOf(rest, chars, "", shape.whole).map(guarded);
8977
+ let dates = own?.dates ?? [];
8700
8978
  let drawn = [];
8701
8979
  for (const [name, entity] of Object.entries(sections)) {
8702
8980
  const list = body.item[name];
@@ -8707,13 +8985,14 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
8707
8985
  drawn = drawn.concat([`# ${[`${clean(name)}: ${list.length}`, ...header].join(" \xB7 ")}`], rows2);
8708
8986
  }
8709
8987
  const when = spanOf(dates, clock);
8710
- lines = lines.concat(when.length ? [`# ${when.join(" \xB7 ")}`] : [], drawn);
8988
+ const head = [...own?.header ?? [], ...when];
8989
+ lines = own ? (head.length ? [`# ${head.join(" \xB7 ")}`] : []).concat(lines, drawn) : lines.concat(when.length ? [`# ${when.join(" \xB7 ")}`] : [], drawn);
8711
8990
  } else if (present(body.item))
8712
8991
  lines = [guarded(cut(clean(String(body.item)), chars))];
8713
8992
  return lines.concat(footerOf(body)).join("\n");
8714
8993
  }, "compactText");
8715
8994
 
8716
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/runs/log-events.js
8995
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/runs/log-events.js
8717
8996
  var CORE_LOG_EVENTS = defineLogEvents([
8718
8997
  { id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
8719
8998
  { id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
@@ -8751,7 +9030,7 @@ var DIAGNOSTIC_LOG_EVENTS = {
8751
9030
  progress: "sync.progress"
8752
9031
  };
8753
9032
 
8754
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/runs/recording.js
9033
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/runs/recording.js
8755
9034
  var recorded = /* @__PURE__ */ __name(async (options, body) => {
8756
9035
  const recording = startRecording(options);
8757
9036
  try {
@@ -8966,7 +9245,7 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
8966
9245
  return void 0;
8967
9246
  }, "partialOutcome");
8968
9247
 
8969
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/command-server-request.js
9248
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/command-server-request.js
8970
9249
  import { AsyncLocalStorage } from "node:async_hooks";
8971
9250
  var requests = new AsyncLocalStorage();
8972
9251
  var inCommandServerRequest = /* @__PURE__ */ __name((request, work) => requests.run(request, work), "inCommandServerRequest");
@@ -8981,7 +9260,113 @@ var exitCodeSet = /* @__PURE__ */ __name(() => {
8981
9260
  return direct;
8982
9261
  }, "exitCodeSet");
8983
9262
 
8984
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/deadline.js
9263
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/deadline.js
8985
9370
  var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
8986
9371
  if (ms2 === void 0)
8987
9372
  return body();
@@ -9007,7 +9392,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
9007
9392
  }
9008
9393
  }, "withDeadline");
9009
9394
 
9010
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/execution.js
9395
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/execution.js
9011
9396
  var DEFAULT_COMMAND_MS = 3e4;
9012
9397
  var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
9013
9398
  var DEFAULT_SYNC_MS = 15 * 6e4;
@@ -9190,7 +9575,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
9190
9575
  }
9191
9576
  }, "withAbort");
9192
9577
 
9193
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/profile.js
9578
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/profile.js
9194
9579
  var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
9195
9580
  var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
9196
9581
  var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
@@ -9216,12 +9601,12 @@ var takesProfile = /* @__PURE__ */ __name((command) => {
9216
9601
  return top !== void 0 && !PROFILE_FREE.has(top.name());
9217
9602
  }, "takesProfile");
9218
9603
  var commandWords = /* @__PURE__ */ __name((program2) => /* @__PURE__ */ new Set(["help", ...program2.commands.flatMap((command) => [command.name(), ...command.aliases()])]), "commandWords");
9219
- var liftProfile = /* @__PURE__ */ __name((argv, words, valued = /* @__PURE__ */ new Set()) => {
9604
+ var liftProfile = /* @__PURE__ */ __name((argv, words2, valued = /* @__PURE__ */ new Set()) => {
9220
9605
  let at2 = 0;
9221
9606
  while (argv[at2]?.startsWith("-") && argv[at2] !== "--")
9222
9607
  at2 += valued.has(argv[at2]) ? 2 : 1;
9223
9608
  const first2 = argv[at2];
9224
- if (first2 === void 0 || first2.startsWith("-") || words.has(first2))
9609
+ if (first2 === void 0 || first2.startsWith("-") || words2.has(first2))
9225
9610
  return { rest: argv };
9226
9611
  return { profile: first2, rest: [...argv.slice(0, at2), ...argv.slice(at2 + 1)] };
9227
9612
  }, "liftProfile");
@@ -9244,9 +9629,9 @@ var runGroup = /* @__PURE__ */ __name((app, env, word) => {
9244
9629
  return { name: lock, from: LOCK, locked: true };
9245
9630
  }, "runGroup");
9246
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");
9247
- var refuseCommandName = /* @__PURE__ */ __name((profile, words, command) => {
9248
- if (words.has(profile)) {
9249
- 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(", "));
9250
9635
  }
9251
9636
  }, "refuseCommandName");
9252
9637
  var rootOf = /* @__PURE__ */ __name((command) => {
@@ -9277,13 +9662,82 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
9277
9662
  return void 0;
9278
9663
  }, "sampleCommand");
9279
9664
 
9280
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/analysis/settings.js
9665
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/analysis/settings.js
9281
9735
  var model2 = pipe(string(), trim(), minLength(1), maxLength(200));
9282
- 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"));
9283
9737
  var AI_FIELDS = {
9284
9738
  embeddingProvider: optional(picklist(["local", "openai"])),
9285
9739
  embeddingModel: optional(model2),
9286
- embeddingBaseUrl: optional(url),
9740
+ embeddingBaseUrl: optional(url2),
9287
9741
  embeddingDims: optional(pipe(number(), integer(), minValue(1), maxValue(65536))),
9288
9742
  models: optional(modelSettingsShape)
9289
9743
  };
@@ -9321,19 +9775,310 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
9321
9775
  };
9322
9776
  }, "resolveAISettings");
9323
9777
 
9324
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/bot/registry.js
9325
- import { existsSync as existsSync2, readdirSync as readdirSync2, readFileSync as readFileSync2 } from "node:fs";
9326
- import { join as join2 } from "node:path";
9327
- 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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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");
9328
10073
  var botFiles = /* @__PURE__ */ __name((app, profile, env = process.env) => {
9329
10074
  const directory = botsDirectory(app, env);
9330
10075
  return {
9331
- registry: join2(directory, `${profile}.json`),
9332
- recipients: join2(directory, "recipients", `${profile}.json`),
9333
- journal: join2(directory, "sends", `${profile}.jsonl`),
9334
- updates: join2(directory, "updates", `${profile}.json`),
9335
- presses: join2(directory, "presses", `${profile}.json`),
9336
- 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`)
9337
10082
  };
9338
10083
  }, "botFiles");
9339
10084
  var ChatRegistry = class {
@@ -9360,7 +10105,7 @@ var ChatRegistry = class {
9360
10105
  }
9361
10106
  /** Makes this bot known to `bot list` before it has seen any chat. */
9362
10107
  touch() {
9363
- if (!existsSync2(this.#path))
10108
+ if (!existsSync4(this.#path))
9364
10109
  writeSecurely(this.#path, `${JSON.stringify({ chats: [] }, null, 2)}
9365
10110
  `, 384);
9366
10111
  }
@@ -9389,10 +10134,10 @@ var ChatRegistry = class {
9389
10134
  this.#write({ ...this.#read(), chats: [...byId.values()] });
9390
10135
  }
9391
10136
  #read() {
9392
- if (!existsSync2(this.#path))
10137
+ if (!existsSync4(this.#path))
9393
10138
  return {};
9394
10139
  try {
9395
- const parsed = JSON.parse(readFileSync2(this.#path, "utf8"));
10140
+ const parsed = JSON.parse(readFileSync3(this.#path, "utf8"));
9396
10141
  return parsed && typeof parsed === "object" ? parsed : {};
9397
10142
  } catch {
9398
10143
  return {};
@@ -9405,256 +10150,13 @@ var ChatRegistry = class {
9405
10150
  };
9406
10151
  var registryProfiles = /* @__PURE__ */ __name((app, env = process.env) => {
9407
10152
  const directory = botsDirectory(app, env);
9408
- if (!existsSync2(directory))
10153
+ if (!existsSync4(directory))
9409
10154
  return [];
9410
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));
9411
10156
  }, "registryProfiles");
9412
10157
 
9413
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
9414
- import { readFileSync as readFileSync3 } from "node:fs";
9415
-
9416
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/config-repair.js
9417
- var REPAIR_WORDS = {
9418
- byte_order_mark: "an invisible byte-order mark at the start",
9419
- comment: "a comment, which JSON does not allow",
9420
- trailing_comma: "a comma before a closing bracket",
9421
- missing_comma: "a missing comma",
9422
- unquoted_key: "a key without double quotes",
9423
- single_quotes: "text in single quotes",
9424
- missing_closer: "the file stops before its closing brackets \u2014 whatever followed this line was already lost"
9425
- };
9426
- var GiveUp = class {
9427
- static {
9428
- __name(this, "GiveUp");
9429
- }
9430
- at;
9431
- why;
9432
- constructor(at2, why) {
9433
- this.at = at2;
9434
- this.why = why;
9435
- }
9436
- };
9437
- var NUMBER = /^-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/;
9438
- var LITERAL = /^(true|false|null)/;
9439
- var KEY = /^[A-Za-z_$][\w$.-]*/;
9440
- var ENDS_VALUE = /^[\s,\]}/]?$/;
9441
- var repairConfigText = /* @__PURE__ */ __name((text5) => {
9442
- try {
9443
- JSON.parse(text5);
9444
- return { state: "valid" };
9445
- } catch {
9446
- }
9447
- const fixes = [];
9448
- const lineAt = /* @__PURE__ */ __name((offset) => text5.slice(0, offset).split("\n").length, "lineAt");
9449
- const fix = /* @__PURE__ */ __name((kind2, offset) => fixes.push({ kind: kind2, line: lineAt(offset) }), "fix");
9450
- const giveUp = /* @__PURE__ */ __name((why, offset = at2) => {
9451
- throw new GiveUp(offset, why);
9452
- }, "giveUp");
9453
- let at2 = 0;
9454
- let truncated = false;
9455
- let last = "open";
9456
- let lastEnd = 0;
9457
- const previous = /* @__PURE__ */ __name(() => last, "previous");
9458
- const skip = /* @__PURE__ */ __name(() => {
9459
- for (; ; ) {
9460
- while (/\s/.test(text5[at2] ?? ""))
9461
- at2++;
9462
- if (text5.startsWith("//", at2)) {
9463
- fix("comment", at2);
9464
- while (at2 < text5.length && text5[at2] !== "\n")
9465
- at2++;
9466
- } else if (text5.startsWith("/*", at2)) {
9467
- const end = text5.indexOf("*/", at2 + 2);
9468
- if (end < 0)
9469
- giveUp("a /* comment is never closed");
9470
- fix("comment", at2);
9471
- at2 = end + 2;
9472
- } else
9473
- return;
9474
- }
9475
- }, "skip");
9476
- const string2 = /* @__PURE__ */ __name(() => {
9477
- const quote = text5[at2];
9478
- const start = at2;
9479
- if (quote === "'")
9480
- fix("single_quotes", at2);
9481
- at2++;
9482
- let body = "";
9483
- for (; ; ) {
9484
- if (at2 >= text5.length)
9485
- giveUp("the file stops inside a quoted text", start);
9486
- const char = text5[at2];
9487
- if (char === quote)
9488
- break;
9489
- if (text5.charCodeAt(at2) < 32)
9490
- giveUp("a line break inside a quoted text");
9491
- if (char === "\\") {
9492
- const next = text5[at2 + 1] ?? "";
9493
- if (quote === "'" && next === "'")
9494
- body += "'";
9495
- else if (/^["\\/bfnrt]$/.test(next))
9496
- body += `\\${next}`;
9497
- else if (next === "u" && /^[0-9a-fA-F]{4}$/.test(text5.slice(at2 + 2, at2 + 6))) {
9498
- body += text5.slice(at2, at2 + 6);
9499
- at2 += 4;
9500
- } else
9501
- giveUp("an escape JSON has no meaning for");
9502
- at2 += 2;
9503
- continue;
9504
- }
9505
- body += char === '"' ? '\\"' : char;
9506
- at2++;
9507
- }
9508
- at2++;
9509
- return JSON.parse(`"${body}"`);
9510
- }, "string");
9511
- const key = /* @__PURE__ */ __name(() => {
9512
- const char = text5[at2] ?? "";
9513
- if (char === '"' || char === "'")
9514
- return string2();
9515
- const word = KEY.exec(text5.slice(at2))?.[0];
9516
- if (!word)
9517
- return giveUp("something other than a key where a key should be");
9518
- fix("unquoted_key", at2);
9519
- at2 += word.length;
9520
- return word;
9521
- }, "key");
9522
- const scalar = /* @__PURE__ */ __name(() => {
9523
- const char = text5[at2] ?? "";
9524
- if (char === '"' || char === "'")
9525
- return { json: JSON.stringify(string2()) };
9526
- const word = (NUMBER.exec(text5.slice(at2)) ?? LITERAL.exec(text5.slice(at2)))?.[0];
9527
- if (!word || !ENDS_VALUE.test(text5[at2 + word.length] ?? ""))
9528
- return giveUp("a value that is not JSON \u2014 text needs quotes, and only true, false and null go without");
9529
- if (at2 + word.length === text5.length && NUMBER.test(word))
9530
- giveUp("the file stops inside a number");
9531
- at2 += word.length;
9532
- return { json: word };
9533
- }, "scalar");
9534
- const members = /* @__PURE__ */ __name((close, one) => {
9535
- const out = [];
9536
- at2++;
9537
- last = "open";
9538
- let comma = -1;
9539
- for (; ; ) {
9540
- skip();
9541
- if (truncated)
9542
- return out;
9543
- if (at2 >= text5.length) {
9544
- if (previous() === "close")
9545
- giveUp("the file stops after a closing bracket, so which brackets are missing has two readings");
9546
- if (previous() === "comma")
9547
- fix("trailing_comma", comma);
9548
- fix("missing_closer", text5.length);
9549
- truncated = true;
9550
- return out;
9551
- }
9552
- const char = text5[at2];
9553
- if (char === close) {
9554
- if (previous() === "comma")
9555
- fix("trailing_comma", comma);
9556
- at2++;
9557
- last = "close";
9558
- return out;
9559
- }
9560
- if (char === "}" || char === "]")
9561
- giveUp(`a ${char} where ${close} should close`);
9562
- if (char === ",") {
9563
- if (previous() !== "value" && previous() !== "close")
9564
- giveUp("a comma with nothing before it");
9565
- comma = at2;
9566
- at2++;
9567
- last = "comma";
9568
- continue;
9569
- }
9570
- if (previous() === "value" || previous() === "close") {
9571
- if (lineAt(at2) === lineAt(lastEnd))
9572
- giveUp("two entries on one line with no comma between them");
9573
- fix("missing_comma", lastEnd);
9574
- }
9575
- out.push(one());
9576
- }
9577
- }, "members");
9578
- const value = /* @__PURE__ */ __name(() => {
9579
- const char = text5[at2] ?? "";
9580
- let node;
9581
- if (char === "{") {
9582
- const seen = /* @__PURE__ */ new Set();
9583
- node = {
9584
- object: members("}", () => {
9585
- const start = at2;
9586
- const name = key();
9587
- if (seen.has(name))
9588
- giveUp("a key appears twice in one object", start);
9589
- seen.add(name);
9590
- skip();
9591
- if (at2 >= text5.length)
9592
- giveUp("the file stops after a key, before its value");
9593
- if (text5[at2] !== ":")
9594
- giveUp("a key with no colon after it");
9595
- at2++;
9596
- skip();
9597
- if (at2 >= text5.length)
9598
- giveUp("the file stops after a key, before its value");
9599
- return [name, value()];
9600
- })
9601
- };
9602
- } else if (char === "[") {
9603
- node = {
9604
- array: members("]", () => {
9605
- return value();
9606
- })
9607
- };
9608
- } else
9609
- node = scalar();
9610
- if (!truncated) {
9611
- last = "json" in node ? "value" : "close";
9612
- lastEnd = at2;
9613
- }
9614
- return node;
9615
- }, "value");
9616
- try {
9617
- if (text5.includes("\0") || text5.includes(String.fromCharCode(65533)))
9618
- giveUp("the file is not text", 0);
9619
- if (text5.charCodeAt(0) === 65279) {
9620
- fix("byte_order_mark", 0);
9621
- at2 = 1;
9622
- }
9623
- skip();
9624
- if (text5[at2] !== "{")
9625
- giveUp(at2 >= text5.length ? "the file is empty" : "the file does not start with {");
9626
- const root = value();
9627
- skip();
9628
- if (at2 < text5.length)
9629
- giveUp("more text after the closing }");
9630
- const repaired = `${serialise(root, "")}
9631
- `;
9632
- JSON.parse(repaired);
9633
- return { state: "repaired", text: repaired, fixes };
9634
- } catch (error) {
9635
- if (!(error instanceof GiveUp))
9636
- throw error;
9637
- const before = text5.slice(0, error.at).split("\n");
9638
- return {
9639
- state: "refused",
9640
- line: before.length,
9641
- column: (before.at(-1)?.length ?? 0) + 1,
9642
- why: error.why
9643
- };
9644
- }
9645
- }, "repairConfigText");
9646
- var serialise = /* @__PURE__ */ __name((node, indent) => {
9647
- if ("json" in node)
9648
- return node.json;
9649
- const inner = `${indent} `;
9650
- 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)}`);
9651
- const [open, close] = "object" in node ? ["{", "}"] : ["[", "]"];
9652
- return parts.length === 0 ? `${open}${close}` : `${open}
9653
- ${parts.join(",\n")}
9654
- ${indent}${close}`;
9655
- }, "serialise");
9656
-
9657
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
10158
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
10159
+ import { readFileSync as readFileSync4 } from "node:fs";
9658
10160
  var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
9659
10161
  var SECTIONS = ["personal", "bot"];
9660
10162
  var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
@@ -9761,8 +10263,8 @@ var failureOffset = /* @__PURE__ */ __name((text5) => {
9761
10263
  value();
9762
10264
  space();
9763
10265
  return at2;
9764
- } catch (stopped) {
9765
- return typeof stopped === "number" ? stopped : at2;
10266
+ } catch (stopped2) {
10267
+ return typeof stopped2 === "number" ? stopped2 : at2;
9766
10268
  }
9767
10269
  }, "failureOffset");
9768
10270
  var parseConfigText = /* @__PURE__ */ __name((text5, file) => {
@@ -9929,7 +10431,7 @@ var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schem
9929
10431
  var wholeFile = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what }), "wholeFile");
9930
10432
  var readConfigText = /* @__PURE__ */ __name((path2) => {
9931
10433
  try {
9932
- return { text: readFileSync3(path2, "utf8") };
10434
+ return { text: readFileSync4(path2, "utf8") };
9933
10435
  } catch (error) {
9934
10436
  const code = error.code;
9935
10437
  if (code === "ENOENT")
@@ -9949,20 +10451,20 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
9949
10451
  return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
9950
10452
  }, "readConfigFile");
9951
10453
 
9952
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/default-config.js
9953
- import { existsSync as existsSync3, linkSync, mkdirSync as mkdirSync2, mkdtempSync, rmSync as rmSync2, writeFileSync } from "node:fs";
9954
- import { dirname as dirname2, join as join3 } from "node:path";
10454
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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";
9955
10457
  var DEFAULT_CONFIG = {
9956
10458
  defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
9957
10459
  profiles: {}
9958
10460
  };
9959
10461
  function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
9960
- if (existsSync3(path2))
10462
+ if (existsSync5(path2))
9961
10463
  return;
9962
10464
  const directory = dirname2(path2);
9963
10465
  mkdirSync2(directory, { recursive: true, mode: 448 });
9964
- const temporary = mkdtempSync(join3(directory, ".config-"));
9965
- const candidate = join3(temporary, "config.json");
10466
+ const temporary = mkdtempSync(join5(directory, ".config-"));
10467
+ const candidate = join5(temporary, "config.json");
9966
10468
  try {
9967
10469
  writeFileSync(candidate, `${JSON.stringify(config, null, 2)}
9968
10470
  `, { flag: "wx", mode: 384 });
@@ -9973,34 +10475,34 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
9973
10475
  throw error;
9974
10476
  }
9975
10477
  } finally {
9976
- rmSync2(temporary, { recursive: true, force: true });
10478
+ rmSync3(temporary, { recursive: true, force: true });
9977
10479
  }
9978
10480
  }
9979
10481
  __name(ensureDefaultConfig, "ensureDefaultConfig");
9980
10482
 
9981
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
9982
- import { existsSync as existsSync4, readdirSync as readdirSync3, readFileSync as readFileSync4 } from "node:fs";
9983
- import { join as join4 } from "node:path";
9984
- 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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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");
9985
10487
  var rememberAccount = /* @__PURE__ */ __name((app, profile, id6, env) => writeSecurely(accountFileFor(app, profile, env), `${JSON.stringify({ account: id6 })}
9986
10488
  `, 384), "rememberAccount");
9987
10489
  var recalledAccount = /* @__PURE__ */ __name((app, provider, profile, env) => {
9988
10490
  try {
9989
- const { account: account2 } = JSON.parse(readFileSync4(accountFileFor(app, profile, env), "utf8"));
10491
+ const { account: account2 } = JSON.parse(readFileSync5(accountFileFor(app, profile, env), "utf8"));
9990
10492
  return typeof account2 === "string" ? { provider, account: account2 } : void 0;
9991
10493
  } catch {
9992
10494
  return void 0;
9993
10495
  }
9994
10496
  }, "recalledAccount");
9995
10497
  var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
9996
- const dir = join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts");
9997
- if (!existsSync4(dir))
10498
+ const dir = join6(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts");
10499
+ if (!existsSync6(dir))
9998
10500
  return [];
9999
10501
  return readdirSync3(dir).filter((name) => name.endsWith(".json")).map((name) => name.slice(0, -".json".length));
10000
10502
  }, "profilesWithAccounts");
10001
10503
  var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
10002
10504
 
10003
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
10505
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
10004
10506
  var isNode2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
10005
10507
  var parentOf = /* @__PURE__ */ __name((config, key) => {
10006
10508
  const path2 = key.split(".");
@@ -10033,8 +10535,57 @@ var settingRows = /* @__PURE__ */ __name((raw, declared) => declared.map((settin
10033
10535
  };
10034
10536
  }), "settingRows");
10035
10537
 
10036
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/settings.js
10037
- import { existsSync as existsSync5 } from "node:fs";
10538
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/settings.js
10038
10589
  var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
10039
10590
  var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
10040
10591
  var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
@@ -10187,8 +10738,8 @@ var NoProfileHere = class extends CliError {
10187
10738
  this.app = app;
10188
10739
  }
10189
10740
  /** `words`: the command that was typed, without its arguments, so the suggestion runs as written. */
10190
- withoutSetup(words) {
10191
- 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`;
10192
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: [] });
10193
10744
  }
10194
10745
  };
@@ -10204,11 +10755,12 @@ var fromFile = /* @__PURE__ */ __name((settings, key, fallback) => first([
10204
10755
  ], fallback), "fromFile");
10205
10756
  var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
10206
10757
  const declared = extension.permissions;
10207
- const profileEntries = {
10758
+ const botEntries = {
10208
10759
  ...SHARED_PROFILE_ENTRIES,
10209
10760
  ...declared ? { permissions: optional(commandPathLevels) } : {},
10210
10761
  ...extension.profile
10211
10762
  };
10763
+ const profileEntries = { ...botEntries, ...extension.personal };
10212
10764
  const defaultsOnly = { ...SHARED_DEFAULTS_ONLY, ...extension.defaults };
10213
10765
  const defaultsEntries = { ...profileEntries, ...defaultsOnly };
10214
10766
  const strictOf = /* @__PURE__ */ __name((entries) => strictObject(entries, objectMessage), "strictOf");
@@ -10220,7 +10772,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
10220
10772
  defaults: optional(strictOf(defaultsEntries)),
10221
10773
  profiles: optional(record(string(), strictOf(profileEntries), "has to be an object of profiles, by name"), {}),
10222
10774
  personal: optional(kindSection(profileEntries)),
10223
- bot: optional(kindSection({ ...profileEntries, ...BOT_ONLY_ENTRIES }))
10775
+ bot: optional(kindSection({ ...botEntries, ...BOT_ONLY_ENTRIES }))
10224
10776
  };
10225
10777
  const schema2 = strictOf(configEntries);
10226
10778
  const defaultsOnlyKeys = Object.keys(defaultsOnly);
@@ -10395,7 +10947,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
10395
10947
  updateCheck: updateCheck.value,
10396
10948
  skillHint: skillHint.value,
10397
10949
  configPath,
10398
- configFound: existsSync5(configPath),
10950
+ configFound: existsSync7(configPath),
10399
10951
  configuredProfiles: namedProfiles(config),
10400
10952
  profilesHere: profilesOf(config, env),
10401
10953
  accountProfiles: accountsOf(config, env, bots),
@@ -10559,7 +11111,50 @@ var given = /* @__PURE__ */ __name((value) => {
10559
11111
  return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
10560
11112
  }, "given");
10561
11113
 
10562
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/context.js
11114
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/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.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/context.js
10563
11158
  var runBudgetOf = /* @__PURE__ */ __name((command, requests2) => {
10564
11159
  const { deadline, signal, app } = environmentOf(command);
10565
11160
  const now = deadline?.();
@@ -10693,13 +11288,13 @@ var inCommandRun = /* @__PURE__ */ __name((command, body) => {
10693
11288
  return baseContext(command, (flags, options) => resolveSettings(flags, { ...options, needsProfile: false })).run(body);
10694
11289
  }, "inCommandRun");
10695
11290
  var commandPath = /* @__PURE__ */ __name((command) => {
10696
- const words = [];
10697
- for (let current = command; current?.parent; current = current.parent)
10698
- words.unshift(current.name());
10699
- 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(" ");
10700
11295
  }, "commandPath");
10701
11296
 
10702
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/effects.js
11297
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/effects.js
10703
11298
  var REMOTE_READ = { remote: "read", local: "read" };
10704
11299
  var FETCH = { remote: "read", local: "write" };
10705
11300
  var REMOTE_WRITE = { remote: "write", local: "write" };
@@ -10809,10 +11404,10 @@ var refuseStoreChange = /* @__PURE__ */ __name((app, env) => {
10809
11404
  throw readOnlyRefusal(lock, storeChangeRefusal(app));
10810
11405
  }, "refuseStoreChange");
10811
11406
  var pathOf2 = /* @__PURE__ */ __name((command) => {
10812
- const words = [];
11407
+ const words2 = [];
10813
11408
  for (let at2 = command; at2.parent; at2 = at2.parent)
10814
- words.unshift(at2.name());
10815
- return words;
11409
+ words2.unshift(at2.name());
11410
+ return words2;
10816
11411
  }, "pathOf");
10817
11412
  var changesMessenger = /* @__PURE__ */ __name((command) => {
10818
11413
  const { path: path2, effects, lifetime, reaches } = "path" in command ? command : { path: pathOf2(command), ...metaOf(command) };
@@ -10846,7 +11441,61 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
10846
11441
  throw readOnlyRefusal(lock, what);
10847
11442
  }, "refuseUnderReadOnly");
10848
11443
 
10849
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/steps.js
11444
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/images/picture/models.js
11445
+ import { join as join7 } from "node:path";
11446
+ var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
11447
+ var IMAGE_MODELS = [
11448
+ {
11449
+ id: "clip-b32",
11450
+ title: "CLIP ViT-B/32, 8-bit",
11451
+ languages: "English only: translate a query before searching",
11452
+ licence: "MIT",
11453
+ dims: 512,
11454
+ key: "local:clip-b32:512",
11455
+ maxTokens: 77,
11456
+ vision: "onnx/vision_model_quantized.onnx",
11457
+ text: "onnx/text_model_quantized.onnx",
11458
+ files: [
11459
+ {
11460
+ name: "onnx/vision_model_quantized.onnx",
11461
+ url: clip("onnx/vision_model_quantized.onnx"),
11462
+ sha256: "583fd1110a514667812fee7d684952aaf82a99b959760c8d7dca7e0ab9839299",
11463
+ bytes: 89117001
11464
+ },
11465
+ {
11466
+ name: "onnx/text_model_quantized.onnx",
11467
+ url: clip("onnx/text_model_quantized.onnx"),
11468
+ sha256: "73baab855d406190da9faa498cfedf65f15cf309f4cc7385b7b032e6d08e5c3a",
11469
+ bytes: 64504507
11470
+ },
11471
+ {
11472
+ name: "tokenizer.json",
11473
+ url: clip("tokenizer.json"),
11474
+ sha256: "f7f3b7af117d467b58374797691a6438d3e6b9e9cef800dfd5dced7f697a90cd",
11475
+ bytes: 2224119
11476
+ },
11477
+ {
11478
+ name: "tokenizer_config.json",
11479
+ url: clip("tokenizer_config.json"),
11480
+ sha256: "60ba2912bc6344c94bc16bbdec27fa1209409167b6f2fdf3cfe9e65462ea3967",
11481
+ bytes: 775
11482
+ }
11483
+ ]
11484
+ }
11485
+ ];
11486
+ var DEFAULT_IMAGE_MODEL = "clip-b32";
11487
+ var imageModel = /* @__PURE__ */ __name((id6) => {
11488
+ const found = IMAGE_MODELS.find((model3) => model3.id === id6);
11489
+ if (!found) {
11490
+ throw new CliError("validation_error", `no image model ${id6} \u2014 one of: ${IMAGE_MODELS.map((model3) => model3.id).join(", ")}`);
11491
+ }
11492
+ return found;
11493
+ }, "imageModel");
11494
+ var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
11495
+ var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file, join7(directory, model3.id, file.name)]), "placedImage");
11496
+ var isImageModelInstalled = /* @__PURE__ */ __name((model3, directory) => filesPresent(placedImage(model3, directory)), "isImageModelInstalled");
11497
+
11498
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/steps.js
10850
11499
  var STEPS2 = defineSteps([
10851
11500
  ...STEPS,
10852
11501
  {
@@ -10861,6 +11510,15 @@ var STEPS2 = defineSteps([
10861
11510
  ],
10862
11511
  why: "the local copy is missing messages; syncing brings them in"
10863
11512
  },
11513
+ {
11514
+ id: "search.server",
11515
+ command: "search messages",
11516
+ args: [
11517
+ { name: "query", required: true },
11518
+ { name: "backend", required: true }
11519
+ ],
11520
+ why: "only the local copy was searched, and it does not hold every message; the messenger's own search reaches the rest"
11521
+ },
10864
11522
  {
10865
11523
  id: "messages.transcribe",
10866
11524
  command: "messages transcribe",
@@ -11074,10 +11732,10 @@ var nextStep = /* @__PURE__ */ __name((id6, input) => {
11074
11732
  const args = Object.fromEntries(Object.entries(input.args ?? {}).filter(([, value]) => value !== void 0));
11075
11733
  return stepOf(definition, { ...input, args });
11076
11734
  }, "nextStep");
11077
- var lineOf = /* @__PURE__ */ __name((command, words) => {
11735
+ var lineOf = /* @__PURE__ */ __name((command, words2) => {
11078
11736
  const root = rootOf2(command);
11079
11737
  const profile = root.getOptionValue("profile");
11080
- return typedCommand(root.name(), words, typeof profile === "string" && profile !== "" ? profile : void 0);
11738
+ return typedCommand(root.name(), words2, typeof profile === "string" && profile !== "" ? profile : void 0);
11081
11739
  }, "lineOf");
11082
11740
  var rootOf2 = /* @__PURE__ */ __name((command) => {
11083
11741
  let root = command;
@@ -11127,7 +11785,7 @@ var stepLine = /* @__PURE__ */ __name((root, step2) => {
11127
11785
  ].join(" ");
11128
11786
  }, "stepLine");
11129
11787
 
11130
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
11788
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
11131
11789
  var SOFT_OUTPUT_BYTES = 256 * 1024;
11132
11790
  var CARRIED = ["json", "compact", "offline", "timeout", "full", "brief", "maxOutputBytes"];
11133
11791
  var NOT_WITH_COMPACT = /* @__PURE__ */ new Set(["json", "brief"]);
@@ -11153,10 +11811,10 @@ var declaresRow = /* @__PURE__ */ __name((command) => {
11153
11811
  return rowShapeOf(command, rows2 && entityRows(rows2)) !== GENERIC_ROW;
11154
11812
  }, "declaresRow");
11155
11813
  var pathOf3 = /* @__PURE__ */ __name((command) => {
11156
- const words = [];
11814
+ const words2 = [];
11157
11815
  for (let at2 = command; at2.parent; at2 = at2.parent)
11158
- words.unshift(at2.name());
11159
- return words.join(" ");
11816
+ words2.unshift(at2.name());
11817
+ return words2.join(" ");
11160
11818
  }, "pathOf");
11161
11819
  var step = /* @__PURE__ */ __name((command, id6, args, why) => ({
11162
11820
  kind: "command",
@@ -11185,7 +11843,7 @@ var largeAnswerSteps = /* @__PURE__ */ __name((command) => {
11185
11843
  return args ? compactStep(command, args, "the answer is large as JSON; one line per item keeps every ref") : [];
11186
11844
  }, "largeAnswerSteps");
11187
11845
 
11188
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
11846
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
11189
11847
  var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
11190
11848
  var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
11191
11849
  var strip = /* @__PURE__ */ __name((value) => {
@@ -11199,7 +11857,7 @@ var strip = /* @__PURE__ */ __name((value) => {
11199
11857
  return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
11200
11858
  }, "strip");
11201
11859
 
11202
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/untrusted-marks.js
11860
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/untrusted-marks.js
11203
11861
  var OPEN = "\u27E6";
11204
11862
  var CLOSE = "\u27E7";
11205
11863
  var untrustedMarkOf = /* @__PURE__ */ __name((app, env) => {
@@ -11283,7 +11941,7 @@ var withFieldsMarked = /* @__PURE__ */ __name((value, fields, mark, id6) => {
11283
11941
  return result;
11284
11942
  }, "withFieldsMarked");
11285
11943
 
11286
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/envelope.js
11944
+ // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/envelope.js
11287
11945
  var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
11288
11946
  var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
11289
11947
  var listOf = /* @__PURE__ */ __name((command, input) => {
@@ -11462,7 +12120,13 @@ export {
11462
12120
  refuseJoinedPath,
11463
12121
  accountSession,
11464
12122
  accountProfile,
12123
+ task,
12124
+ agenda,
11465
12125
  analysisConsent,
12126
+ attachment,
12127
+ WEIGHTS,
12128
+ LINK,
12129
+ oddName,
11466
12130
  member,
11467
12131
  chat,
11468
12132
  message,
@@ -11475,7 +12139,12 @@ export {
11475
12139
  chatEvent,
11476
12140
  contact,
11477
12141
  contactNote,
12142
+ conversation,
11478
12143
  documentLink,
12144
+ checkpointPath,
12145
+ readCheckpoint,
12146
+ saveCheckpoint,
12147
+ progressOf,
11479
12148
  recordLogFor,
11480
12149
  spawnDetached,
11481
12150
  jobsDir,
@@ -11516,6 +12185,7 @@ export {
11516
12185
  sendAttempt,
11517
12186
  progress,
11518
12187
  storeTable,
12188
+ tagging,
11519
12189
  template,
11520
12190
  topic,
11521
12191
  ENTITIES,
@@ -11540,6 +12210,10 @@ export {
11540
12210
  inCommandServerRequest,
11541
12211
  commandServerRequest,
11542
12212
  exitCodeSet,
12213
+ sentIds,
12214
+ currentOperation,
12215
+ guardedWrite,
12216
+ codeOf,
11543
12217
  withDeadline,
11544
12218
  DEFAULT_COMMAND_MS,
11545
12219
  DEFAULT_COOPERATIVE_MS,
@@ -11562,15 +12236,31 @@ export {
11562
12236
  refuseCommandName,
11563
12237
  rootOf,
11564
12238
  sampleCommand,
12239
+ modelTarget,
11565
12240
  AI_ENTRIES,
11566
12241
  AI_SETTING_KEYS,
11567
12242
  resolveAISettings,
12243
+ parseDuration,
12244
+ DEFAULT_TEXT_MODEL,
12245
+ PREVIOUS_DEFAULT_TEXT_MODEL,
12246
+ CustomTextModelShape,
12247
+ textModelsFile,
12248
+ readTextModelsSection,
12249
+ writeTextModelsSection,
12250
+ textModels,
12251
+ textModel,
12252
+ chosenTextModel,
12253
+ RERANK_MODELS,
12254
+ DEFAULT_RERANK_MODEL,
12255
+ rerankModel,
12256
+ vectorModelKey,
12257
+ meaningFloor,
12258
+ historyWindow,
12259
+ limitBatch,
11568
12260
  botsDirectory,
11569
12261
  botFiles,
11570
12262
  ChatRegistry,
11571
12263
  registryProfiles,
11572
- REPAIR_WORDS,
11573
- repairConfigText,
11574
12264
  permissionIssues,
11575
12265
  settingPathOf,
11576
12266
  withoutPath,
@@ -11607,6 +12297,12 @@ export {
11607
12297
  outputFor,
11608
12298
  baseContext,
11609
12299
  inCommandRun,
12300
+ IMAGE_MODELS,
12301
+ DEFAULT_IMAGE_MODEL,
12302
+ imageModel,
12303
+ imageModelsDirectory,
12304
+ placedImage,
12305
+ isImageModelInstalled,
11610
12306
  REMOTE_READ,
11611
12307
  FETCH,
11612
12308
  REMOTE_WRITE,