@wirecat/mail-cli 0.23.1 → 0.25.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 (117) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/bin/mail.js +2 -2
  3. package/dist/bundle/{all-profiles-FJHJCGRU.js → all-profiles-QEV2PSOR.js} +11 -11
  4. package/dist/bundle/{anthropic-AFL7NKVZ.js → anthropic-5NKQXIHM.js} +28 -12
  5. package/dist/bundle/{app-server-WKCBJMHI.js → app-server-G2CJNT4R.js} +62 -50
  6. package/dist/bundle/{bun-HQATAQJQ.js → bun-6HBYWQIX.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-4ECAV7OU.js → bun-sqlite-DXIQ7BVR.js} +9 -5
  8. package/dist/bundle/{chunk-MUDHCYN4.js → chunk-37F6QYTO.js} +6 -6
  9. package/dist/bundle/{chunk-NMGF3UOZ.js → chunk-3XVR2ROR.js} +50 -46
  10. package/dist/bundle/{chunk-QUKD5SO2.js → chunk-434YOD6A.js} +4 -4
  11. package/dist/bundle/{chunk-7SWWVDEZ.js → chunk-4W4EVVL4.js} +61 -21
  12. package/dist/bundle/{chunk-CCYHBNRL.js → chunk-5QYK3LWS.js} +326 -56
  13. package/dist/bundle/{chunk-7YRKUEYE.js → chunk-5ZYFV6FD.js} +694 -228
  14. package/dist/bundle/chunk-7GLJSJ7M.js +16 -0
  15. package/dist/bundle/{chunk-NOA6E6MM.js → chunk-A6BPOX5O.js} +38841 -24161
  16. package/dist/bundle/{chunk-34743C4C.js → chunk-ADKMBXY4.js} +1 -1
  17. package/dist/bundle/{chunk-2HXHAFRP.js → chunk-B7SWTH5O.js} +2 -2
  18. package/dist/bundle/{chunk-NKBAZ4VC.js → chunk-BC7PFQL7.js} +2 -2
  19. package/dist/bundle/{chunk-ROKTS7WM.js → chunk-CBYBZCQP.js} +1 -1
  20. package/dist/bundle/chunk-CIWWNBVW.js +188 -0
  21. package/dist/bundle/{chunk-SBGXKM4U.js → chunk-DIA56CS7.js} +8 -7
  22. package/dist/bundle/{chunk-VYHIX3OP.js → chunk-EXVY76VO.js} +61 -607
  23. package/dist/bundle/{chunk-BVJQBAGL.js → chunk-FZZD4AFY.js} +14 -14
  24. package/dist/bundle/{chunk-VFKX5UMJ.js → chunk-G5LHHAW2.js} +6 -6
  25. package/dist/bundle/{chunk-QV3M2MHG.js → chunk-GJRYZXBN.js} +13 -136
  26. package/dist/bundle/{chunk-GJNFNC76.js → chunk-GY4XCLCO.js} +10 -15
  27. package/dist/bundle/{chunk-V7CFZ773.js → chunk-HEIDAHRC.js} +2 -2
  28. package/dist/bundle/{chunk-AGNAT7CM.js → chunk-HEYVMAAQ.js} +2 -2
  29. package/dist/bundle/{chunk-HOKGIYUO.js → chunk-HJSJBNCJ.js} +119 -9
  30. package/dist/bundle/{chunk-KKGX7JMX.js → chunk-HLXVUMZJ.js} +2 -2
  31. package/dist/bundle/{chunk-OU5CWCG2.js → chunk-IACWKZWS.js} +1 -1
  32. package/dist/bundle/{chunk-QR7JZM3D.js → chunk-IXO4SCKE.js} +1 -1
  33. package/dist/bundle/{chunk-GOMJNH56.js → chunk-IZOYW4Z4.js} +32 -8
  34. package/dist/bundle/{chunk-WN4HP7IZ.js → chunk-J4OYK4WL.js} +14 -14
  35. package/dist/bundle/{chunk-76RTQYJQ.js → chunk-JG4MNYG2.js} +1 -1
  36. package/dist/bundle/{chunk-VAMCRP47.js → chunk-K2OGF7KC.js} +2 -2
  37. package/dist/bundle/chunk-K6HR6HCO.js +32 -0
  38. package/dist/bundle/{chunk-B6QMMRIM.js → chunk-KFB2X6KE.js} +1530 -1525
  39. package/dist/bundle/{chunk-3UFD76IR.js → chunk-KK4HD3SI.js} +6 -6
  40. package/dist/bundle/{chunk-3QVGB2CI.js → chunk-L4QVOEOB.js} +4 -4
  41. package/dist/bundle/chunk-LGZPKKBN.js +53 -0
  42. package/dist/bundle/chunk-LVGX7VTD.js +138 -0
  43. package/dist/bundle/chunk-MBFPFWCO.js +1243 -0
  44. package/dist/bundle/{chunk-3DQYO7FB.js → chunk-MCPOZNWG.js} +1 -1
  45. package/dist/bundle/{chunk-SR3ADLGX.js → chunk-MWGH3M46.js} +3 -3
  46. package/dist/bundle/{chunk-OJCUSHZG.js → chunk-ND5H5ADM.js} +4 -4
  47. package/dist/bundle/chunk-NMZQTYKJ.js +18 -0
  48. package/dist/bundle/{chunk-4YJJQNNJ.js → chunk-OLKCJBZY.js} +5 -5
  49. package/dist/bundle/{chunk-E7ZVKQHG.js → chunk-OLLIWNFG.js} +3 -3
  50. package/dist/bundle/{chunk-R5MYOLQP.js → chunk-P6GXNT7Z.js} +13 -13
  51. package/dist/bundle/{chunk-M7RGG3UU.js → chunk-PGC5TRH6.js} +3 -3
  52. package/dist/bundle/{chunk-3OZKDC6Y.js → chunk-PHHH2NQP.js} +15 -9
  53. package/dist/bundle/{chunk-S5OTP7XS.js → chunk-PP3YOAWG.js} +3 -3
  54. package/dist/bundle/{chunk-4IFX4HV2.js → chunk-PQMJ5BXH.js} +4 -4
  55. package/dist/bundle/{chunk-ZXIPJF3Y.js → chunk-QB3DP2TN.js} +2 -2
  56. package/dist/bundle/{chunk-4IWJARFA.js → chunk-QQUY4MZY.js} +1 -1
  57. package/dist/bundle/{chunk-UHC5I3JV.js → chunk-RX5CJ55S.js} +1 -1
  58. package/dist/bundle/{chunk-CYQVWITQ.js → chunk-S2QRAKQI.js} +99 -42
  59. package/dist/bundle/{chunk-V3TDQUXD.js → chunk-SMTBV62X.js} +44 -60
  60. package/dist/bundle/{chunk-SNTLN2QT.js → chunk-T27IMG6X.js} +3 -1
  61. package/dist/bundle/{chunk-LLYVBO3R.js → chunk-TY644DKQ.js} +19 -19
  62. package/dist/bundle/{chunk-R554W7ZO.js → chunk-U6IQ6YQ2.js} +2 -2
  63. package/dist/bundle/{chunk-MBKNL5TX.js → chunk-VFU7PVPQ.js} +373 -133
  64. package/dist/bundle/{chunk-UMXVQIGD.js → chunk-VL6H2BND.js} +377 -12
  65. package/dist/bundle/{chunk-DALBYUPC.js → chunk-VUBZFMGP.js} +2 -2
  66. package/dist/bundle/{chunk-VYIIX6VN.js → chunk-WOAYHCM2.js} +1 -1
  67. package/dist/bundle/{chunk-LQDMUMA2.js → chunk-WX6OYVCH.js} +5370 -3700
  68. package/dist/bundle/chunk-XMDEM6BZ.js +2094 -0
  69. package/dist/bundle/{chunk-CUOCDJFI.js → chunk-XQYKIZMG.js} +13 -9
  70. package/dist/bundle/{chunk-PMIKRELC.js → chunk-YNS2YVUR.js} +69 -6
  71. package/dist/bundle/{chunk-CBWA2T3N.js → chunk-Z5T6OW3V.js} +14 -5
  72. package/dist/bundle/command-contract-XSW2Q33S.js +36 -0
  73. package/dist/bundle/command-server-entry-XMSSY5ID.js +165 -0
  74. package/dist/bundle/{decode-QXKTMOTH.js → decode-RYGB4PGT.js} +5 -5
  75. package/dist/bundle/{dispatch-G4CYFWQ2.js → dispatch-PLQOIZG5.js} +10 -10
  76. package/dist/bundle/{dist-5FX36DAW.js → dist-GY2AQETI.js} +79 -46
  77. package/dist/bundle/{echarts-HHUM43TU.js → echarts-7CM2MCMW.js} +2 -2
  78. package/dist/bundle/{embed-SRZSDZVI.js → embed-FTBDPOPT.js} +6 -6
  79. package/dist/bundle/{embedder-WZIZCWLX.js → embedder-B43WGNBD.js} +9 -9
  80. package/dist/bundle/{failure-FFPK2WYB.js → failure-XP5QYV2T.js} +2 -2
  81. package/dist/bundle/{first-run-6DVWZ3JQ.js → first-run-XIIUARNM.js} +12 -11
  82. package/dist/bundle/first-screen-Z7HC6PQU.js +34 -0
  83. package/dist/bundle/{instructions-UWONE6UT.js → instructions-R7OHVAWH.js} +1 -1
  84. package/dist/bundle/mail.js +37 -13
  85. package/dist/bundle/{mcp-CFVG2OUS.js → mcp-7KQUJNFN.js} +2 -2
  86. package/dist/bundle/{node-HLAOYJDB.js → node-3N2JGZ7V.js} +2 -2
  87. package/dist/bundle/{node-sqlite-RO66I7W6.js → node-sqlite-WFJXW3CZ.js} +10 -6
  88. package/dist/bundle/{oauth-VNLB2TET.js → oauth-SVJLQTWV.js} +7 -7
  89. package/dist/bundle/{open-QQSG343L.js → open-ZDONVKSX.js} +5 -5
  90. package/dist/bundle/{openai-JTFC7OGF.js → openai-XVEW6XOU.js} +21 -38
  91. package/dist/bundle/{process-3CZAXR6P.js → process-YAHHUFR5.js} +1 -1
  92. package/dist/bundle/{program-XTOS4RAM.js → program-HU2UVMJE.js} +7071 -5421
  93. package/dist/bundle/{prompt-HGQ6GPYL.js → prompt-JAJ2CUJI.js} +5 -5
  94. package/dist/bundle/{recognize-2SHMNEIZ.js → recognize-UFBWUNFR.js} +4 -4
  95. package/dist/bundle/{remote-GBQC3433.js → remote-2GFOVLCR.js} +9 -7
  96. package/dist/bundle/{rerank-FQHQXFNR.js → rerank-BGPSMXTL.js} +7 -7
  97. package/dist/bundle/{serve-THU67QUZ.js → serve-CB3XJTH3.js} +9 -9
  98. package/dist/bundle/server-34GEF22R.js +68 -0
  99. package/dist/bundle/{server-LOT3CLYX.js → server-M7FQY7TX.js} +42 -40
  100. package/dist/bundle/{sqlite-runtime-NOOUMBC4.js → sqlite-runtime-AEV6PGDR.js} +6 -6
  101. package/dist/bundle/{state-KSKZCV2U.js → state-YLBEQLBI.js} +6 -6
  102. package/dist/bundle/{store-BAKSHTKF.js → store-CDUL3HKK.js} +19 -16
  103. package/dist/bundle/{store-OHNZOQ7U.js → store-EKWKY6GG.js} +49 -20
  104. package/dist/bundle/store-maintenance-command-XH2JUM5F.js +58 -0
  105. package/dist/config.d.ts +4 -0
  106. package/dist/config.d.ts.map +1 -1
  107. package/dist/version.d.ts +1 -1
  108. package/dist/version.js +1 -1
  109. package/package.json +3 -3
  110. package/dist/bundle/chunk-5UKBUI4I.js +0 -35
  111. package/dist/bundle/chunk-EXPR6QAX.js +0 -394
  112. package/dist/bundle/chunk-FWFNUJQD.js +0 -12172
  113. package/dist/bundle/command-contract-IIHBNF7J.js +0 -35
  114. package/dist/bundle/first-screen-SRZ7NYHZ.js +0 -33
  115. package/dist/bundle/server-VKMUX7ZT.js +0 -65
  116. package/dist/bundle/store-maintenance-command-ROQHJVEA.js +0 -54
  117. /package/dist/bundle/{chunk-QZLK2ISN.js → chunk-YVNHQFLC.js} +0 -0
@@ -13,7 +13,7 @@ import {
13
13
  permissionOverrides,
14
14
  projectFields,
15
15
  resolveOutput
16
- } from "./chunk-SBGXKM4U.js";
16
+ } from "./chunk-DIA56CS7.js";
17
17
  import {
18
18
  currentCaller,
19
19
  endpointTemplate,
@@ -23,24 +23,29 @@ import {
23
23
  providerErrorKey,
24
24
  renderEvent,
25
25
  runContextOf
26
- } from "./chunk-CUOCDJFI.js";
26
+ } from "./chunk-XQYKIZMG.js";
27
27
  import {
28
28
  carries
29
- } from "./chunk-OU5CWCG2.js";
29
+ } from "./chunk-IACWKZWS.js";
30
30
  import {
31
31
  permissionCeiling
32
- } from "./chunk-SR3ADLGX.js";
32
+ } from "./chunk-MWGH3M46.js";
33
33
  import {
34
34
  note
35
- } from "./chunk-E7ZVKQHG.js";
35
+ } from "./chunk-OLLIWNFG.js";
36
36
  import {
37
+ CATEGORIES,
37
38
  FACT_STATUSES,
39
+ KEEP_STORE_RUNS_FOR_DAYS,
40
+ KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
38
41
  LINK_KINDS,
39
42
  LINK_SOURCES,
43
+ LOG_ATTRIBUTES,
40
44
  MEMORY_KINDS,
41
45
  MEMORY_SCOPES,
42
46
  MEMORY_STATUSES,
43
47
  PRIORITY_LABELS,
48
+ RUNS_SIZE_LIMIT_MB,
44
49
  TASK_KINDS,
45
50
  TASK_ORIGINS,
46
51
  TASK_STATES,
@@ -48,25 +53,42 @@ import {
48
53
  TASK_VERDICTS,
49
54
  WORK_TASK_TYPES,
50
55
  author,
56
+ childTrace,
51
57
  count,
58
+ currentRun,
59
+ enclosingTraceId,
52
60
  evidenceSource,
53
61
  id,
62
+ inRun,
63
+ logAttributes,
54
64
  markStoreDamaged,
65
+ newRunId,
55
66
  organization,
56
67
  project,
57
68
  providerMetadata,
58
69
  reminder,
70
+ runsDirFor,
71
+ snakeLogger,
59
72
  sourceReview,
73
+ startRun,
60
74
  text,
61
75
  time,
62
- untrusted
63
- } from "./chunk-EXPR6QAX.js";
76
+ traceOf,
77
+ typedCommand,
78
+ untrusted,
79
+ useAsProcessRun
80
+ } from "./chunk-MBFPFWCO.js";
64
81
  import {
65
82
  BUSINESS_KINDS,
83
+ CRM_ACTIVITY_KINDS,
84
+ DEAL_KINDS,
66
85
  DEAL_ROLES,
86
+ DEAL_STATUSES,
67
87
  FACT_TYPES,
68
88
  FIELD_TYPES,
89
+ FINANCE_REVIEWS,
69
90
  INVOICE_DIRECTIONS,
91
+ INVOICE_STATUSES,
70
92
  MEETING_RESULT_ENTITIES,
71
93
  MONEY_DIRECTIONS,
72
94
  ORDER_PURPOSES,
@@ -90,23 +112,26 @@ import {
90
112
  meetingStats,
91
113
  meetingSummary,
92
114
  meetingTranscript
93
- } from "./chunk-7YRKUEYE.js";
115
+ } from "./chunk-5ZYFV6FD.js";
94
116
  import {
95
117
  isCliFailure,
96
118
  storeDamaged
97
- } from "./chunk-R554W7ZO.js";
119
+ } from "./chunk-U6IQ6YQ2.js";
120
+ import {
121
+ endpoint
122
+ } from "./chunk-K6HR6HCO.js";
98
123
  import {
99
124
  readSharedSection,
100
125
  sharedConfigPath,
101
126
  writeSharedSection
102
- } from "./chunk-3UFD76IR.js";
127
+ } from "./chunk-KK4HD3SI.js";
103
128
  import {
104
129
  filesPresent,
105
130
  sharedModelsDirectory
106
- } from "./chunk-QUKD5SO2.js";
131
+ } from "./chunk-434YOD6A.js";
107
132
  import {
108
133
  storePath
109
- } from "./chunk-5UKBUI4I.js";
134
+ } from "./chunk-LGZPKKBN.js";
110
135
  import {
111
136
  configFilePath,
112
137
  createRecordLog,
@@ -114,9 +139,8 @@ import {
114
139
  processStreams,
115
140
  resolvePaths,
116
141
  saveConfigFile,
117
- traceIdOf,
118
142
  writeSecurely
119
- } from "./chunk-LLYVBO3R.js";
143
+ } from "./chunk-TY644DKQ.js";
120
144
  import {
121
145
  COMPACT_FLAG,
122
146
  MAX_NEXT_STEPS,
@@ -170,28 +194,71 @@ import {
170
194
  url,
171
195
  variant,
172
196
  writes
173
- } from "./chunk-GOMJNH56.js";
197
+ } from "./chunk-IZOYW4Z4.js";
174
198
  import {
175
199
  CliError,
176
200
  isCliError,
177
201
  visibleControls
178
- } from "./chunk-DALBYUPC.js";
202
+ } from "./chunk-VUBZFMGP.js";
179
203
  import {
180
204
  __name
181
205
  } from "./chunk-ZVVMGPBJ.js";
182
206
 
183
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/ports/app.js
207
+ // 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/ports/app.js
208
+ import { readFileSync } from "node:fs";
184
209
  var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
210
+ var locking = /* @__PURE__ */ __name((value) => value !== void 0 && value.trim() !== "" && value !== "0", "locking");
211
+ var ancestries = /* @__PURE__ */ new Map();
212
+ var readable = /* @__PURE__ */ __name((read, path2) => {
213
+ try {
214
+ return read(path2);
215
+ } catch (error) {
216
+ if (error.code === "EACCES")
217
+ return void 0;
218
+ throw error;
219
+ }
220
+ }, "readable");
221
+ var ancestorEnvironments = /* @__PURE__ */ __name(({ read = /* @__PURE__ */ __name((path2) => readFileSync(path2, "utf8"), "read"), from = process.ppid, uid = process.getuid?.() ?? -1, cache = ancestries } = {}) => {
222
+ if (process.platform !== "linux")
223
+ return [];
224
+ const key = `${from}:${uid}`;
225
+ const known = cache.get(key);
226
+ if (known !== void 0)
227
+ return known;
228
+ let found = [];
229
+ try {
230
+ for (let pid = from, depth = 0; pid >= 1 && depth < 64; depth++) {
231
+ const status2 = read(`/proc/${pid}/status`);
232
+ const field = /* @__PURE__ */ __name((name) => new RegExp(`^${name}:\\s*(\\d+)`, "m").exec(status2)?.[1], "field");
233
+ if (Number(field("Uid")) !== uid)
234
+ break;
235
+ const environ = readable(read, `/proc/${pid}/environ`);
236
+ if (environ === void 0)
237
+ break;
238
+ found.push(environ.split("\0"));
239
+ pid = Number(field("PPid"));
240
+ }
241
+ } catch {
242
+ found = null;
243
+ }
244
+ cache.set(key, found);
245
+ return found;
246
+ }, "ancestorEnvironments");
247
+ var valuesOf = /* @__PURE__ */ __name((environments2, name) => environments2.flatMap((environ) => environ.filter((entry) => entry.startsWith(`${name}=`)).map((entry) => entry.slice(name.length + 1))), "valuesOf");
248
+ var lockedByAncestor = /* @__PURE__ */ __name((name, ancestry = {}) => {
249
+ const environments2 = ancestorEnvironments(ancestry);
250
+ return environments2 === null || valuesOf(environments2, name).some(locking);
251
+ }, "lockedByAncestor");
252
+ var ancestorValue = /* @__PURE__ */ __name((name, env, ancestry = {}) => valuesOf(ancestorEnvironments(ancestry) ?? [], name).at(-1) ?? env[name], "ancestorValue");
185
253
  var readOnlyLockOf = /* @__PURE__ */ __name((app, env) => {
186
254
  const name = envName(app, "READ_ONLY");
187
- const value = env[name];
188
- return value === void 0 || value.trim() === "" || value === "0" ? void 0 : name;
255
+ return locking(env[name]) || lockedByAncestor(name) ? name : void 0;
189
256
  }, "readOnlyLockOf");
190
257
  var mailHolderVariable = /* @__PURE__ */ __name((app) => envName(app, "MAIL_HOLDER"), "mailHolderVariable");
191
258
  var MESSENGER_CHANGE_REFUSAL = "send, react, change chats or change the account";
192
259
  var readOnlyRefusal = /* @__PURE__ */ __name((lock, what) => new CliError("permission_error", `this process is read-only (${lock}) \u2014 it cannot ${what}`), "readOnlyRefusal");
193
260
 
194
- // node_modules/.pnpm/@wirecat+cli-base@0.80.7_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
261
+ // 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
195
262
  var labels = /* @__PURE__ */ new WeakMap();
196
263
  var annotate = /* @__PURE__ */ __name((command, meta) => {
197
264
  labels.set(command, { ...labels.get(command), ...meta });
@@ -3692,7 +3759,7 @@ __name(useColor, "useColor");
3692
3759
  // node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
3693
3760
  var program = new Command();
3694
3761
 
3695
- // node_modules/.pnpm/@wirecat+cli-base@0.80.7_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
3762
+ // 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
3696
3763
  var argumentInfoSchema = object({
3697
3764
  name: string(),
3698
3765
  required: boolean(),
@@ -3766,14 +3833,14 @@ var commandsDocumentSchema = strictObject({
3766
3833
  exit_codes: record(string(), pipe(number(), integer()))
3767
3834
  });
3768
3835
 
3769
- // node_modules/.pnpm/@wirecat+cli-base@0.80.7_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
3836
+ // 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
3770
3837
  import { isDeepStrictEqual } from "node:util";
3771
3838
  var protectedCommands = /* @__PURE__ */ new WeakMap();
3772
3839
  var hidden = /* @__PURE__ */ __name((command) => Boolean(command._hidden), "hidden");
3773
3840
  var snapshot = /* @__PURE__ */ __name((command, known = /* @__PURE__ */ new Map(), children) => {
3774
3841
  if (hidden(command))
3775
3842
  throw new Error("a hidden command cannot own a shared contract");
3776
- const { commands: _, usage: __, path: ___, ...contract } = describeAlone(command, known);
3843
+ const { commands: _2, usage: __, path: ___, ...contract } = describeAlone(command, known);
3777
3844
  return {
3778
3845
  ...contract,
3779
3846
  aliases: [...command.aliases()],
@@ -3875,7 +3942,7 @@ var sharedCommand = /* @__PURE__ */ __name((factory) => (...args) => {
3875
3942
  return result;
3876
3943
  }, "sharedCommand");
3877
3944
 
3878
- // node_modules/.pnpm/@wirecat+cli-base@0.80.7_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
3945
+ // 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
3879
3946
  var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
3880
3947
  let command = root;
3881
3948
  const path2 = [];
@@ -3893,14 +3960,29 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
3893
3960
  }
3894
3961
  }, "refuseJoinedPath");
3895
3962
 
3896
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/sends/guarded.js
3963
+ // 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
3897
3964
  import { AsyncLocalStorage } from "node:async_hooks";
3965
+ var requests = new AsyncLocalStorage();
3966
+ var inCommandServerRequest = /* @__PURE__ */ __name((request, work) => requests.run(request, work), "inCommandServerRequest");
3967
+ var commandServerRequest = /* @__PURE__ */ __name(() => requests.getStore(), "commandServerRequest");
3968
+ var exitCodeSet = /* @__PURE__ */ __name(() => {
3969
+ const request = requests.getStore();
3970
+ if (request?.exitCode !== void 0)
3971
+ return request.exitCode;
3972
+ const direct = process.exitCode === void 0 ? void 0 : Number(process.exitCode);
3973
+ if (request)
3974
+ process.exitCode = void 0;
3975
+ return direct;
3976
+ }, "exitCodeSet");
3977
+
3978
+ // 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/sends/guarded.js
3979
+ import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
3898
3980
  var sentIds = /* @__PURE__ */ __name((typed2, message2) => ({
3899
3981
  messageId: message2.id,
3900
3982
  ...message2.chatId && message2.chatId !== typed2 ? { resultChatId: message2.chatId } : {}
3901
3983
  }), "sentIds");
3902
- var current = new AsyncLocalStorage();
3903
- var writesInFlight = new AsyncLocalStorage();
3984
+ var current = new AsyncLocalStorage2();
3985
+ var writesInFlight = new AsyncLocalStorage2();
3904
3986
  var parents = /* @__PURE__ */ new WeakMap();
3905
3987
  var stopped = /* @__PURE__ */ new WeakMap();
3906
3988
  var scopesFor = /* @__PURE__ */ __name((scope = writesInFlight.getStore()) => {
@@ -3999,7 +4081,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
3999
4081
  }, "guardedWrite");
4000
4082
  var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
4001
4083
 
4002
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/execution.js
4084
+ // 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
4003
4085
  var DEFAULT_COMMAND_MS = 3e4;
4004
4086
  var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
4005
4087
  var DEFAULT_SYNC_MS = 15 * 6e4;
@@ -4024,7 +4106,7 @@ var execution = /* @__PURE__ */ __name((streams, { timeoutMs, fields, maxOutputB
4024
4106
  let interrupted;
4025
4107
  let reject = /* @__PURE__ */ __name(() => {
4026
4108
  }, "reject");
4027
- const interruption = new Promise((_, fail) => {
4109
+ const interruption = new Promise((_2, fail) => {
4028
4110
  reject = fail;
4029
4111
  });
4030
4112
  void interruption.catch(() => {
@@ -4171,7 +4253,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
4171
4253
  throw signal.reason;
4172
4254
  let abort = /* @__PURE__ */ __name(() => {
4173
4255
  }, "abort");
4174
- const interrupted = new Promise((_, reject) => {
4256
+ const interrupted = new Promise((_2, reject) => {
4175
4257
  abort = /* @__PURE__ */ __name(() => reject(signal.reason), "abort");
4176
4258
  signal.addEventListener("abort", abort, { once: true });
4177
4259
  });
@@ -4182,15 +4264,15 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
4182
4264
  }
4183
4265
  }, "withAbort");
4184
4266
 
4185
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
4186
- import { existsSync, readdirSync, readFileSync } from "node:fs";
4267
+ // 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
4268
+ import { existsSync, readdirSync, readFileSync as readFileSync2 } from "node:fs";
4187
4269
  import { join } from "node:path";
4188
4270
  var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
4189
4271
  var rememberAccount = /* @__PURE__ */ __name((app, profile, id6, env) => writeSecurely(accountFileFor(app, profile, env), `${JSON.stringify({ account: id6 })}
4190
4272
  `, 384), "rememberAccount");
4191
4273
  var recalledAccount = /* @__PURE__ */ __name((app, provider, profile, env) => {
4192
4274
  try {
4193
- const { account: account2 } = JSON.parse(readFileSync(accountFileFor(app, profile, env), "utf8"));
4275
+ const { account: account2 } = JSON.parse(readFileSync2(accountFileFor(app, profile, env), "utf8"));
4194
4276
  return typeof account2 === "string" ? { provider, account: account2 } : void 0;
4195
4277
  } catch {
4196
4278
  return void 0;
@@ -4204,15 +4286,15 @@ var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
4204
4286
  }, "profilesWithAccounts");
4205
4287
  var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
4206
4288
 
4207
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/background/budget.js
4289
+ // 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/background/budget.js
4208
4290
  var DEADLINE_MARGIN_MS = 5e3;
4209
4291
  var DEADLINE_MARGIN_SHARE = 0.15;
4210
4292
  var DEFAULT_REQUEST_MS = 2e3;
4211
4293
  var deadlineMargin = /* @__PURE__ */ __name((deadline) => Math.max(DEADLINE_MARGIN_MS, deadline.ms * DEADLINE_MARGIN_SHARE), "deadlineMargin");
4212
4294
  var requestsFor = /* @__PURE__ */ __name((deadline, requestMs = DEFAULT_REQUEST_MS) => deadline === void 0 ? null : Math.max(1, Math.floor((deadline.ms - deadlineMargin(deadline)) / requestMs)), "requestsFor");
4213
- var runBudget = /* @__PURE__ */ __name(({ requests, deadline, requestMs, signal, now = Date.now } = {}) => {
4295
+ var runBudget = /* @__PURE__ */ __name(({ requests: requests2, deadline, requestMs, signal, now = Date.now } = {}) => {
4214
4296
  const fits = requestsFor(deadline, requestMs);
4215
- const limit = fits === null ? requests ?? null : Math.min(fits, requests ?? fits);
4297
+ const limit = fits === null ? requests2 ?? null : Math.min(fits, requests2 ?? fits);
4216
4298
  const margin = deadline ? deadlineMargin(deadline) : 0;
4217
4299
  let used = 0;
4218
4300
  let stopped2 = null;
@@ -4247,7 +4329,7 @@ var runBudget = /* @__PURE__ */ __name(({ requests, deadline, requestMs, signal,
4247
4329
  };
4248
4330
  }, "runBudget");
4249
4331
 
4250
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/runs/log-events.js
4332
+ // 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
4251
4333
  var CORE_LOG_EVENTS = defineLogEvents([
4252
4334
  { id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
4253
4335
  { id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
@@ -4257,6 +4339,8 @@ var CORE_LOG_EVENTS = defineLogEvents([
4257
4339
  meaning: "a read was answered from what was kept, without asking the messenger",
4258
4340
  keys: ["operation", "reason"]
4259
4341
  },
4342
+ { id: "store.write", meaning: "a committed write changed rows of one store table", keys: ["table", "op", "n"] },
4343
+ { id: "sync.progress", meaning: "what a sync's progress line showed: chats and messages so far", keys: ["counts"] },
4260
4344
  { id: "command.crashed", meaning: "a command failed on a bug; where, never what", keys: ["error_class", "frames"] },
4261
4345
  {
4262
4346
  id: "events.dropped",
@@ -4278,490 +4362,12 @@ var DIAGNOSTIC_LOG_EVENTS = {
4278
4362
  request: "provider.request",
4279
4363
  response: "provider.response",
4280
4364
  warning: "client.warning",
4281
- cache: "cache.answered"
4282
- };
4283
-
4284
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
4285
- var snake2 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
4286
- var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
4287
- var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
4288
- var logAttributes = /* @__PURE__ */ __name((event2) => renamed(event2, snake2), "logAttributes");
4289
- var fromLogAttributes = /* @__PURE__ */ __name((attributes) => renamed(attributes, camel), "fromLogAttributes");
4290
- var snakeLogger = /* @__PURE__ */ __name((logger) => ({
4291
- debug: /* @__PURE__ */ __name((event2, message2) => logger.debug(logAttributes(event2), message2), "debug"),
4292
- info: /* @__PURE__ */ __name((event2, message2) => logger.info(logAttributes(event2), message2), "info"),
4293
- warn: /* @__PURE__ */ __name((event2, message2) => logger.warn(logAttributes(event2), message2), "warn"),
4294
- error: /* @__PURE__ */ __name((event2, message2) => logger.error(logAttributes(event2), message2), "error")
4295
- }), "snakeLogger");
4296
-
4297
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/runs/run.js
4298
- import { randomUUID } from "node:crypto";
4299
- import { appendFileSync, mkdirSync, readdirSync as readdirSync2, readFileSync as readFileSync2, rmSync, statSync, writeFileSync } from "node:fs";
4300
- import { userInfo } from "node:os";
4301
- import { join as join2, sep } from "node:path";
4302
-
4303
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
4304
- var diagnostic = {
4305
- event: true,
4306
- operation: true,
4307
- opcode: true,
4308
- seq: true,
4309
- status: true,
4310
- method: true,
4311
- endpointTemplate: true,
4312
- bytes: true,
4313
- ids: true,
4314
- counts: true,
4315
- durationMs: true,
4316
- outcome: true,
4317
- errorCode: true,
4318
- providerError: true,
4319
- level: true,
4320
- transport: true,
4321
- attempt: true,
4322
- waitMs: true,
4323
- code: true,
4324
- detail: true,
4325
- reason: true,
4326
- ageMs: true
4365
+ cache: "cache.answered",
4366
+ store: "store.write",
4367
+ progress: "sync.progress"
4327
4368
  };
4328
- var send = {
4329
- profile: true,
4330
- chatId: true,
4331
- outcome: true,
4332
- kind: true,
4333
- action: true,
4334
- people: true,
4335
- messageId: true,
4336
- key: true,
4337
- count: true,
4338
- forEveryone: true,
4339
- sendId: true,
4340
- operationId: true,
4341
- parentOperationId: true,
4342
- replyTo: true,
4343
- threadId: true,
4344
- sendAs: true,
4345
- resultChatId: true,
4346
- length: true,
4347
- attachments: true,
4348
- scheduledFor: true,
4349
- notify: true,
4350
- origin: true,
4351
- reservation: true,
4352
- errorCode: true
4353
- };
4354
- var background = [
4355
- "job",
4356
- "pid",
4357
- "schedule",
4358
- "exitCode",
4359
- "tool",
4360
- "tier",
4361
- "actorType",
4362
- "actorId",
4363
- "agent",
4364
- "targetType",
4365
- "targetId"
4366
- ];
4367
- var crash = ["errorClass", "frames"];
4368
- var dropped = ["dropped"];
4369
- var LOG_ATTRIBUTES = [
4370
- ...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
4371
- ].sort();
4372
-
4373
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/runs/run.js
4374
- var KEEP_RUNS_FOR_DAYS = 30;
4375
- var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
4376
- var RUNS_SIZE_LIMIT_MB = 200;
4377
- var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "runs"), "runsDirFor");
4378
- var startRun = /* @__PURE__ */ __name((options) => {
4379
- const now = options.now ?? (() => /* @__PURE__ */ new Date());
4380
- const startedAt = options.startedAt ?? now();
4381
- const id6 = options.runId ?? newRunId(startedAt, options.command);
4382
- const dir = join2(options.runsDir, day(startedAt), id6);
4383
- pruneRuns(options.runsDir, {
4384
- keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
4385
- keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
4386
- maxBytes: options.maxBytes ?? RUNS_SIZE_LIMIT_MB * 1024 * 1024,
4387
- now: startedAt
4388
- });
4389
- refuseRealStateInTests(dir);
4390
- const metadata = {
4391
- runId: id6,
4392
- command: options.command,
4393
- ...options.profile === void 0 ? {} : { profile: options.profile },
4394
- startedAt: startedAt.toISOString(),
4395
- status: "running",
4396
- cliVersion: options.cliVersion,
4397
- runtime: runtime(),
4398
- platform: process.platform,
4399
- arch: process.arch,
4400
- ...options.traceId === void 0 ? {} : { traceId: options.traceId },
4401
- ...options.context
4402
- };
4403
- let file;
4404
- const opened = /* @__PURE__ */ __name(() => {
4405
- if (file)
4406
- return file;
4407
- mkdirSync(dir, { recursive: true, mode: 448 });
4408
- const events2 = join2(dir, "events.jsonl");
4409
- writeFileSync(events2, "", { flag: "a", mode: 384 });
4410
- file = snakeLogger(createRecordLog({
4411
- to: events2,
4412
- runId: id6,
4413
- command: options.command,
4414
- resource: { service: options.service, version: options.cliVersion },
4415
- allow: LOG_ATTRIBUTES,
4416
- ...options.traceId === void 0 ? {} : { traceId: options.traceId },
4417
- ...options.onError === void 0 ? {} : { onError: options.onError }
4418
- }));
4419
- writeRunFile(dir, metadata);
4420
- return file;
4421
- }, "opened");
4422
- if (!options.lazy)
4423
- opened();
4424
- let finished = false;
4425
- const operations = /* @__PURE__ */ new Set();
4426
- const codes = /* @__PURE__ */ new Set();
4427
- const noted = /* @__PURE__ */ __name((level2) => (event2, message2) => {
4428
- const { operation, errorCode, error_code, code } = event2;
4429
- if (typeof operation === "string")
4430
- operations.add(operation);
4431
- for (const value of [errorCode, error_code, code])
4432
- if (typeof value === "string")
4433
- codes.add(value);
4434
- if (finished)
4435
- return;
4436
- opened()[level2](event2, message2);
4437
- }, "noted");
4438
- const logger = { debug: noted("debug"), info: noted("info"), warn: noted("warn"), error: noted("error") };
4439
- return {
4440
- id: id6,
4441
- dir,
4442
- logger,
4443
- finish: /* @__PURE__ */ __name(async (status2, extra = {}) => {
4444
- if (finished)
4445
- return;
4446
- finished = true;
4447
- const completedAt = now();
4448
- const final = {
4449
- ...metadata,
4450
- ...extra,
4451
- status: status2,
4452
- completedAt: completedAt.toISOString(),
4453
- durationMs: completedAt.getTime() - startedAt.getTime(),
4454
- operations: [...operations].sort(),
4455
- codes: [...codes].sort()
4456
- };
4457
- if (file || status2 !== "success") {
4458
- opened();
4459
- writeRunFile(dir, final);
4460
- return;
4461
- }
4462
- try {
4463
- mkdirSync(join2(dir, ".."), { recursive: true, mode: 448 });
4464
- appendIndex(join2(dir, ".."), runFileOf(final));
4465
- } catch (error) {
4466
- options.onError?.(error);
4467
- }
4468
- }, "finish")
4469
- };
4470
- }, "startRun");
4471
- var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) => {
4472
- if (env.VITEST === void 0)
4473
- return;
4474
- let home;
4475
- try {
4476
- home = userInfo().homedir;
4477
- } catch {
4478
- return;
4479
- }
4480
- if (dir.startsWith(join2(home, ".local", "share") + sep))
4481
- throw new Error(`a test opened a run in the real data folder: ${dir}`);
4482
- }, "refuseRealStateInTests");
4483
- var runtime = /* @__PURE__ */ __name(() => {
4484
- const bun = process.versions.bun;
4485
- return bun ? `bun ${bun}` : `node ${process.versions.node}`;
4486
- }, "runtime");
4487
- var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
4488
- const stamp = startedAt.toISOString().replace(/[-:]/g, "").replace(/\.\d+Z$/, "Z");
4489
- const slug2 = command.replace(/[^a-z0-9]+/gi, "-").toLowerCase();
4490
- return `${stamp}-${slug2}-${randomUUID().slice(0, 6)}`;
4491
- }, "newRunId");
4492
- var INDEX = "index.jsonl";
4493
- var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
4494
- appendFileSync(join2(dayDir, INDEX), `${JSON.stringify(written)}
4495
- `, { mode: 384 });
4496
- }, "appendIndex");
4497
- var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
4498
- const written = runFileOf(metadata);
4499
- writeSecurely(join2(dir, "run.json"), `${JSON.stringify(written, null, 2)}
4500
- `, 384);
4501
- try {
4502
- appendIndex(join2(dir, ".."), written);
4503
- } catch {
4504
- }
4505
- }, "writeRunFile");
4506
- var matchesListFilter = /* @__PURE__ */ __name((run, filter) => (filter.runId === void 0 || run.runId === filter.runId) && (filter.command === void 0 || run.command === filter.command) && (filter.profile === void 0 || run.profile === filter.profile) && (filter.status === void 0 || run.status === filter.status) && (filter.errorCode === void 0 || run.errorCode === filter.errorCode), "matchesListFilter");
4507
- var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITIVE_INFINITY, filter = {} } = {}) => {
4508
- const first2 = since === void 0 ? void 0 : day(new Date(since));
4509
- const runs = [];
4510
- for (const date of days(runsDir).sort().reverse()) {
4511
- if (first2 !== void 0 && date < first2 || runs.length >= atLeast)
4512
- break;
4513
- for (const metadata of runsOfDay(join2(runsDir, date))) {
4514
- if (matchesListFilter(metadata, filter))
4515
- runs.push(metadata);
4516
- }
4517
- }
4518
- return runs;
4519
- }, "listRuns");
4520
- var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
4521
- const latest = /* @__PURE__ */ new Map();
4522
- let raw = "";
4523
- try {
4524
- raw = readFileSync2(join2(dayDir, INDEX), "utf8");
4525
- } catch {
4526
- }
4527
- for (const line of raw.split("\n")) {
4528
- if (line.trim() === "")
4529
- continue;
4530
- try {
4531
- const metadata = metadataOf(JSON.parse(line));
4532
- if (typeof metadata.runId === "string")
4533
- latest.set(metadata.runId, metadata);
4534
- } catch {
4535
- }
4536
- }
4537
- return latest;
4538
- }, "indexedRuns");
4539
- var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
4540
- const latest = indexedRuns(dayDir);
4541
- for (const entry of safeReaddir(dayDir)) {
4542
- if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
4543
- continue;
4544
- const metadata = readRun(join2(dayDir, entry));
4545
- if (metadata)
4546
- latest.set(metadata.runId, metadata);
4547
- }
4548
- return [...latest.values()].sort((a, b) => a.runId < b.runId ? 1 : a.runId > b.runId ? -1 : 0);
4549
- }, "runsOfDay");
4550
- var findRun = /* @__PURE__ */ __name((runsDir, id6) => {
4551
- const stamped = /^(\d{4})(\d{2})(\d{2})T/.exec(id6);
4552
- const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
4553
- const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
4554
- for (const date of dates) {
4555
- const dir = join2(runsDir, date, id6);
4556
- const metadata = readRun(dir);
4557
- if (metadata)
4558
- return { dir, metadata };
4559
- }
4560
- for (const date of dates) {
4561
- const metadata = indexedRuns(join2(runsDir, date)).get(id6);
4562
- if (metadata)
4563
- return { dir: join2(runsDir, date, id6), metadata };
4564
- }
4565
- return void 0;
4566
- }, "findRun");
4567
- var readEvents = /* @__PURE__ */ __name((dir) => {
4568
- let raw;
4569
- try {
4570
- raw = readFileSync2(join2(dir, "events.jsonl"), "utf8");
4571
- } catch {
4572
- return [];
4573
- }
4574
- const events2 = [];
4575
- for (const line of raw.split("\n")) {
4576
- if (line.trim() === "")
4577
- continue;
4578
- try {
4579
- const parsed = JSON.parse(line);
4580
- if (parsed !== null && typeof parsed === "object")
4581
- events2.push(eventOf(parsed));
4582
- } catch {
4583
- }
4584
- }
4585
- return events2;
4586
- }, "readEvents");
4587
- var eventOf = /* @__PURE__ */ __name((line) => {
4588
- const { attributes, time: time2, severity } = line;
4589
- if (attributes === null || typeof attributes !== "object")
4590
- return logAttributes(line);
4591
- return { time: time2, severity, ...logAttributes(attributes) };
4592
- }, "eventOf");
4593
- var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = keepDays, maxBytes, now }) => {
4594
- const cutoff = day(new Date(now.getTime() - keepDays * DAY_MS));
4595
- const successCutoff = day(new Date(now.getTime() - Math.min(keepSuccessDays, keepDays) * DAY_MS));
4596
- let removed = 0;
4597
- for (const date of days(runsDir)) {
4598
- if (date >= cutoff) {
4599
- if (date < successCutoff)
4600
- dropSuccesses(join2(runsDir, date));
4601
- continue;
4602
- }
4603
- try {
4604
- rmSync(join2(runsDir, date), { recursive: true, force: true });
4605
- removed += 1;
4606
- } catch {
4607
- }
4608
- }
4609
- if (maxBytes !== void 0)
4610
- removed += fitSize(runsDir, maxBytes, now);
4611
- return removed;
4612
- }, "pruneRuns");
4613
- var DAY_MS = 24 * 60 * 60 * 1e3;
4614
- var SUCCESSES_DROPPED = ".successes-dropped";
4615
- var SIZE_CHECKED = ".size-checked";
4616
- var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
4617
- const marker = join2(dayDir, SUCCESSES_DROPPED);
4618
- try {
4619
- statSync(marker);
4620
- return;
4621
- } catch {
4622
- }
4623
- try {
4624
- const kept = [];
4625
- for (const [id6, metadata] of indexedRuns(dayDir)) {
4626
- if (metadata.status === "success")
4627
- rmSync(join2(dayDir, id6), { recursive: true, force: true });
4628
- else
4629
- kept.push(JSON.stringify(runFileOf(metadata)));
4630
- }
4631
- for (const entry of safeReaddir(dayDir)) {
4632
- if (entry === INDEX || entry.startsWith("."))
4633
- continue;
4634
- if (readRun(join2(dayDir, entry))?.status === "success")
4635
- rmSync(join2(dayDir, entry), { recursive: true, force: true });
4636
- }
4637
- writeSecurely(join2(dayDir, INDEX), kept.map((line) => `${line}
4638
- `).join(""), 384);
4639
- writeFileSync(marker, "", { mode: 384 });
4640
- } catch {
4641
- }
4642
- }, "dropSuccesses");
4643
- var sizeOf = /* @__PURE__ */ __name((path2) => {
4644
- let total = 0;
4645
- for (const entry of safeReaddir(path2)) {
4646
- const full = join2(path2, entry);
4647
- try {
4648
- const stat = statSync(full);
4649
- total += stat.isDirectory() ? sizeOf(full) : stat.size;
4650
- } catch {
4651
- }
4652
- }
4653
- return total;
4654
- }, "sizeOf");
4655
- var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
4656
- const stamp = join2(runsDir, SIZE_CHECKED);
4657
- const today = day(now);
4658
- try {
4659
- if (readFileSync2(stamp, "utf8").trim() === today)
4660
- return 0;
4661
- } catch {
4662
- }
4663
- const dates = days(runsDir).sort();
4664
- const sizes = new Map(dates.map((date) => [date, sizeOf(join2(runsDir, date))]));
4665
- let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
4666
- let removed = 0;
4667
- for (const date of dates) {
4668
- if (total <= maxBytes || date === today)
4669
- break;
4670
- dropSuccesses(join2(runsDir, date));
4671
- const after = sizeOf(join2(runsDir, date));
4672
- total -= (sizes.get(date) ?? 0) - after;
4673
- sizes.set(date, after);
4674
- }
4675
- for (const date of dates) {
4676
- if (total <= maxBytes || date === today)
4677
- break;
4678
- try {
4679
- rmSync(join2(runsDir, date), { recursive: true, force: true });
4680
- total -= sizes.get(date) ?? 0;
4681
- removed += 1;
4682
- } catch {
4683
- }
4684
- }
4685
- try {
4686
- mkdirSync(runsDir, { recursive: true, mode: 448 });
4687
- writeFileSync(stamp, today, { mode: 384 });
4688
- } catch {
4689
- }
4690
- return removed;
4691
- }, "fitSize");
4692
- var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day");
4693
- var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
4694
- var readRun = /* @__PURE__ */ __name((dir) => {
4695
- try {
4696
- return metadataOf(JSON.parse(readFileSync2(join2(dir, "run.json"), "utf8")));
4697
- } catch {
4698
- return void 0;
4699
- }
4700
- }, "readRun");
4701
- var safeReaddir = /* @__PURE__ */ __name((dir) => {
4702
- try {
4703
- return readdirSync2(dir);
4704
- } catch {
4705
- return [];
4706
- }
4707
- }, "safeReaddir");
4708
- var runFileOf = /* @__PURE__ */ __name(({ partial: partial2, ...metadata }) => ({
4709
- ...logAttributes(metadata),
4710
- ...partial2 ? { partial: { ...logAttributes(partial2), failures: partial2.failures.map((failure) => logAttributes(failure)) } } : {}
4711
- }), "runFileOf");
4712
- var metadataOf = /* @__PURE__ */ __name((parsed) => {
4713
- const { partial: partial2, ...metadata } = fromLogAttributes(parsed);
4714
- if (partial2 === null || typeof partial2 !== "object")
4715
- return metadata;
4716
- const { failures, ...rest } = fromLogAttributes(partial2);
4717
- return {
4718
- ...metadata,
4719
- partial: {
4720
- ...rest,
4721
- failures: Array.isArray(failures) ? failures.map((failure) => fromLogAttributes(failure)) : []
4722
- }
4723
- };
4724
- }, "metadataOf");
4725
4369
 
4726
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/runs/scope.js
4727
- import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
4728
- import { randomBytes } from "node:crypto";
4729
- var scopes = new AsyncLocalStorage2();
4730
- var processScope;
4731
- var currentRun = /* @__PURE__ */ __name(() => {
4732
- const scope = scopes.getStore();
4733
- if (scope)
4734
- return scope;
4735
- processScope ??= {
4736
- runId: newRunId(/* @__PURE__ */ new Date(), "process"),
4737
- command: "",
4738
- startedAt: Date.now(),
4739
- ...traceOf(process.env)
4740
- };
4741
- return processScope;
4742
- }, "currentRun");
4743
- var inRun = /* @__PURE__ */ __name((scope, body) => scopes.run(scope, body), "inRun");
4744
- var runEvent = /* @__PURE__ */ __name((event2) => scopes.getStore()?.events?.(event2), "runEvent");
4745
- var typedCommand = /* @__PURE__ */ __name((tool, words2, profile = currentRun().profile) => [tool, profile, words2].filter((part) => part !== void 0 && part !== "").join(" "), "typedCommand");
4746
- var useAsProcessRun = /* @__PURE__ */ __name((scope) => {
4747
- processScope = scope;
4748
- }, "useAsProcessRun");
4749
- var processRun = /* @__PURE__ */ __name(() => processScope, "processRun");
4750
- var enclosingTraceId = /* @__PURE__ */ __name(() => scopes.getStore()?.traceId, "enclosingTraceId");
4751
- var traceOf = /* @__PURE__ */ __name((env) => {
4752
- const traceId = traceIdOf(env.TRACEPARENT);
4753
- return traceId === void 0 ? {} : { traceId };
4754
- }, "traceOf");
4755
- var childTrace = /* @__PURE__ */ __name(() => {
4756
- const hex = /* @__PURE__ */ __name((bytes) => randomBytes(bytes).toString("hex"), "hex");
4757
- const traceId = hex(16);
4758
- return { traceId, traceparent: `00-${traceId}-${hex(8)}-01` };
4759
- }, "childTrace");
4760
- var attempts = new AsyncLocalStorage2();
4761
- var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
4762
- var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
4763
-
4764
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/runs/recording.js
4370
+ // 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
4765
4371
  var recorded = /* @__PURE__ */ __name(async (options, body) => {
4766
4372
  const recording = startRecording(options);
4767
4373
  try {
@@ -4807,6 +4413,7 @@ var startRecording = /* @__PURE__ */ __name((options) => {
4807
4413
  }, "onError"),
4808
4414
  ...options.keepDays === void 0 ? {} : { keepDays: options.keepDays },
4809
4415
  ...options.keepSuccessDays === void 0 ? {} : { keepSuccessDays: options.keepSuccessDays },
4416
+ ...options.keepStoreDays === void 0 ? {} : { keepStoreDays: options.keepStoreDays },
4810
4417
  ...options.maxBytes === void 0 ? {} : { maxBytes: options.maxBytes },
4811
4418
  now,
4812
4419
  ...extra
@@ -4815,13 +4422,16 @@ var startRecording = /* @__PURE__ */ __name((options) => {
4815
4422
  const held = !run && options.keepFailed ? [] : void 0;
4816
4423
  const counted = { wire: 0, operation: 0 };
4817
4424
  let refused;
4425
+ let wroteStore = false;
4818
4426
  const cap = capped();
4819
- const requests = /* @__PURE__ */ __name(() => counted.wire > 0 ? counted.wire : counted.operation, "requests");
4427
+ const requests2 = /* @__PURE__ */ __name(() => counted.wire > 0 ? counted.wire : counted.operation, "requests");
4820
4428
  const events2 = /* @__PURE__ */ __name((event2) => {
4821
4429
  if (event2.event === "request")
4822
4430
  counted[event2.level === "wire" ? "wire" : "operation"] += 1;
4823
4431
  if (event2.event === "response" && event2.outcome === "error")
4824
4432
  refused = event2;
4433
+ if (event2.event === "store")
4434
+ wroteStore = true;
4825
4435
  if (options.trace)
4826
4436
  streams.diagnostic(options.format === "pretty" ? renderEvent(event2) : JSON.stringify(logAttributes(event2)));
4827
4437
  if (run)
@@ -4843,13 +4453,14 @@ var startRecording = /* @__PURE__ */ __name((options) => {
4843
4453
  events: events2,
4844
4454
  succeed: /* @__PURE__ */ __name(async (answer) => {
4845
4455
  const partial2 = partialOutcome(answer);
4846
- const kept = run ?? (partial2 && held ? keep(open({ startedAt })) : void 0);
4456
+ const kept = run ?? ((partial2 || wroteStore) && held ? keep(open({ startedAt })) : void 0);
4847
4457
  if (kept)
4848
4458
  cap.close(kept);
4849
4459
  await kept?.finish(partial2 ? "partial" : "success", {
4850
- requests: requests(),
4460
+ requests: requests2(),
4851
4461
  ...cap.dropped(),
4852
- ...partial2 ? { partial: partial2 } : {}
4462
+ ...partial2 ? { partial: partial2 } : {},
4463
+ ...!run && !partial2 && wroteStore ? { keptBecauseStore: true } : {}
4853
4464
  });
4854
4465
  }, "succeed"),
4855
4466
  fail: /* @__PURE__ */ __name(async (thrown) => {
@@ -4866,7 +4477,7 @@ var startRecording = /* @__PURE__ */ __name((options) => {
4866
4477
  failed.logger.error(crashOf(error));
4867
4478
  cap.close(failed);
4868
4479
  await failed.finish("failed", {
4869
- requests: requests(),
4480
+ requests: requests2(),
4870
4481
  ...cap.dropped(),
4871
4482
  ...outcomeOf(error),
4872
4483
  error: errorDetailOf(error, refused),
@@ -4884,29 +4495,47 @@ var wasSettled = /* @__PURE__ */ __name((error) => typeof error === "object" &&
4884
4495
  var HELD_AT_MOST = 500;
4885
4496
  var EVENTS_AT_MOST = 2e3;
4886
4497
  var EVENT_BYTES_AT_MOST = 1024 * 1024;
4498
+ var STORE_EVENTS_AT_MOST = 100;
4887
4499
  var capped = /* @__PURE__ */ __name(() => {
4888
4500
  let lines = 0;
4889
4501
  let bytes = 0;
4890
- let dropped2 = 0;
4502
+ let dropped = 0;
4503
+ let stores = 0;
4891
4504
  const byOperation = {};
4505
+ const summed = /* @__PURE__ */ new Map();
4506
+ const write = /* @__PURE__ */ __name((run, event2) => {
4507
+ const size = JSON.stringify(logAttributes(event2)).length + 200;
4508
+ if (lines >= EVENTS_AT_MOST || bytes + size > EVENT_BYTES_AT_MOST) {
4509
+ dropped += 1;
4510
+ const operation = "operation" in event2 && event2.operation ? event2.operation : event2.event;
4511
+ byOperation[operation] = (byOperation[operation] ?? 0) + 1;
4512
+ return;
4513
+ }
4514
+ lines += 1;
4515
+ bytes += size;
4516
+ logEvent(run, event2);
4517
+ }, "write");
4892
4518
  return {
4893
4519
  log: /* @__PURE__ */ __name((run, event2) => {
4894
- const size = JSON.stringify(logAttributes(event2)).length + 200;
4895
- if (lines >= EVENTS_AT_MOST || bytes + size > EVENT_BYTES_AT_MOST) {
4896
- dropped2 += 1;
4897
- const operation = "operation" in event2 && event2.operation ? event2.operation : event2.event;
4898
- byOperation[operation] = (byOperation[operation] ?? 0) + 1;
4520
+ if (event2.event === "store" && ++stores > STORE_EVENTS_AT_MOST) {
4521
+ const key = `${event2.table} ${event2.op}`;
4522
+ const sum = summed.get(key);
4523
+ if (sum)
4524
+ sum.n += event2.n;
4525
+ else
4526
+ summed.set(key, { ...event2 });
4899
4527
  return;
4900
4528
  }
4901
- lines += 1;
4902
- bytes += size;
4903
- logEvent(run, event2);
4529
+ write(run, event2);
4904
4530
  }, "log"),
4905
4531
  close: /* @__PURE__ */ __name((run) => {
4906
- if (dropped2 > 0)
4907
- run.logger.warn({ event: "events.dropped", dropped: dropped2, counts: byOperation });
4532
+ for (const sum of summed.values())
4533
+ write(run, sum);
4534
+ summed.clear();
4535
+ if (dropped > 0)
4536
+ run.logger.warn({ event: "events.dropped", dropped, counts: byOperation });
4908
4537
  }, "close"),
4909
- dropped: /* @__PURE__ */ __name(() => dropped2 > 0 ? { eventsDropped: dropped2 } : {}, "dropped")
4538
+ dropped: /* @__PURE__ */ __name(() => dropped > 0 ? { eventsDropped: dropped } : {}, "dropped")
4910
4539
  };
4911
4540
  }, "capped");
4912
4541
  var logEvent = /* @__PURE__ */ __name((run, event2) => {
@@ -4917,7 +4546,7 @@ var logEvent = /* @__PURE__ */ __name((run, event2) => {
4917
4546
  };
4918
4547
  if (event2.event === "warning")
4919
4548
  run.logger.warn(record2);
4920
- else if (event2.event !== "cache" && event2.outcome === "error")
4549
+ else if ((event2.event === "request" || event2.event === "response") && event2.outcome === "error")
4921
4550
  run.logger.error(record2);
4922
4551
  else
4923
4552
  run.logger.info(record2);
@@ -4953,14 +4582,14 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
4953
4582
  return void 0;
4954
4583
  }, "partialOutcome");
4955
4584
 
4956
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/deadline.js
4585
+ // 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
4957
4586
  var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
4958
4587
  if (ms2 === void 0)
4959
4588
  return body();
4960
4589
  let timer2;
4961
4590
  let timedOut;
4962
4591
  const writes2 = /* @__PURE__ */ new Set();
4963
- const expired = new Promise((_, reject) => {
4592
+ const expired = new Promise((_2, reject) => {
4964
4593
  timer2 = setTimeout(() => {
4965
4594
  const pending = [...writes2];
4966
4595
  const cut2 = pending.filter((write) => !write.preparing);
@@ -4979,7 +4608,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
4979
4608
  }
4980
4609
  }, "withDeadline");
4981
4610
 
4982
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/profile.js
4611
+ // 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
4983
4612
  var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
4984
4613
  var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
4985
4614
  var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
@@ -5048,20 +4677,10 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
5048
4677
  return void 0;
5049
4678
  }, "sampleCommand");
5050
4679
 
5051
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/settings.js
5052
- import { existsSync as existsSync4 } from "node:fs";
5053
-
5054
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/models/endpoint.js
5055
- var endpoint = /* @__PURE__ */ __name((value) => {
5056
- try {
5057
- const url3 = new URL(value);
5058
- return ["https:", "http:"].includes(url3.protocol) && !url3.username && !url3.password && !url3.search && !url3.hash;
5059
- } catch {
5060
- return false;
5061
- }
5062
- }, "endpoint");
4680
+ // 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
4681
+ import { existsSync as existsSync5 } from "node:fs";
5063
4682
 
5064
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/models/settings.js
4683
+ // 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/models/settings.js
5065
4684
  var MODEL_FIELDS = ["provider", "model", "base_url"];
5066
4685
  var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
5067
4686
  provider: optional(picklist(["off", "openai", "anthropic"])),
@@ -5130,7 +4749,7 @@ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
5130
4749
  };
5131
4750
  }, "modelTarget");
5132
4751
 
5133
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/analysis/settings.js
4752
+ // 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
5134
4753
  var model = pipe(string(), trim(), minLength(1), maxLength(200));
5135
4754
  var url2 = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
5136
4755
  var AI_FIELDS = {
@@ -5174,7 +4793,7 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
5174
4793
  };
5175
4794
  }, "resolveAISettings");
5176
4795
 
5177
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/domain/duration.js
4796
+ // 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/domain/duration.js
5178
4797
  var DURATION = /^(\d+)(ms|s|m|h|d)$/;
5179
4798
  var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
5180
4799
  var parseDuration = /* @__PURE__ */ __name((value, source2) => {
@@ -5188,7 +4807,9 @@ var parseDuration = /* @__PURE__ */ __name((value, source2) => {
5188
4807
  return ms2;
5189
4808
  }, "parseDuration");
5190
4809
 
5191
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/embeddings/models.js
4810
+ // 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/embeddings/models.js
4811
+ import { existsSync as existsSync2 } from "node:fs";
4812
+ import { join as join2 } from "node:path";
5192
4813
  var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
5193
4814
  var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
5194
4815
  var e5Large = huggingFace("Xenova/multilingual-e5-large", "00fc3aeb3dbb95842de2ac1961d33c6319acf57b");
@@ -5235,9 +4856,13 @@ var TEXT_MODELS = [
5235
4856
  languages: "over 100 languages \u2014 the best of the two on chat, about seven times slower",
5236
4857
  licence: "Gemma Terms of Use",
5237
4858
  terms: "https://ai.google.dev/gemma/terms",
4859
+ // Gemma Terms of Use §3.1: every copy carries this notice and the use restrictions of §3.2.
4860
+ 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",
5238
4861
  dims: 768,
5239
4862
  maxTokens: 2048,
5240
- chunksPerSecond: 2,
4863
+ // 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
4864
+ // 5 on the scale e5-small's 31 sets. It was 2, which held a memo sync to 39 chunks.
4865
+ chunksPerSecond: 5,
5241
4866
  pooling: "sentence_embedding",
5242
4867
  prefix: { query: "task: search result | query: ", passage: "title: none | text: " },
5243
4868
  onnx: "onnx/model_q4.onnx",
@@ -5304,7 +4929,8 @@ var TEXT_MODELS = [
5304
4929
  ]
5305
4930
  }
5306
4931
  ];
5307
- var DEFAULT_TEXT_MODEL = "e5-small";
4932
+ var DEFAULT_TEXT_MODEL = "embeddinggemma";
4933
+ var PREVIOUS_DEFAULT_TEXT_MODEL = "e5-small";
5308
4934
  var SECTION = "text_models";
5309
4935
  var slug = pipe(string(), regex(/^[a-z0-9][a-z0-9._-]{0,62}$/, "is not a model id: a-z, 0-9, . _ -"));
5310
4936
  var words = pipe(string(), trim(), minLength(1), maxLength(300));
@@ -5343,10 +4969,10 @@ var TextModelsSection = strictObject({
5343
4969
  var textModelsFile = /* @__PURE__ */ __name((env = process.env) => sharedConfigPath(storePath(env), env), "textModelsFile");
5344
4970
  var readTextModelsSection = /* @__PURE__ */ __name((env = process.env) => {
5345
4971
  const path2 = textModelsFile(env);
5346
- const section = readSharedSection(path2, SECTION);
5347
- if (section === void 0)
4972
+ const section2 = readSharedSection(path2, SECTION);
4973
+ if (section2 === void 0)
5348
4974
  return {};
5349
- const checked = safeParse(TextModelsSection, section);
4975
+ const checked = safeParse(TextModelsSection, section2);
5350
4976
  if (!checked.success) {
5351
4977
  const issue = checked.issues[0];
5352
4978
  const at2 = issue ? getDotPath(issue) : null;
@@ -5358,7 +4984,7 @@ var readTextModelsSection = /* @__PURE__ */ __name((env = process.env) => {
5358
4984
  throw new CliError("configuration_error", `${path2}: ${SECTION}.custom names ${twice} twice`);
5359
4985
  return checked.output;
5360
4986
  }, "readTextModelsSection");
5361
- var writeTextModelsSection = /* @__PURE__ */ __name((section, env = process.env) => writeSharedSection(textModelsFile(env), SECTION, section.use === void 0 && !section.custom?.length ? void 0 : section), "writeTextModelsSection");
4987
+ var writeTextModelsSection = /* @__PURE__ */ __name((section2, env = process.env) => writeSharedSection(textModelsFile(env), SECTION, section2.use === void 0 && !section2.custom?.length ? void 0 : section2), "writeTextModelsSection");
5362
4988
  var textModels = /* @__PURE__ */ __name((env = process.env) => [
5363
4989
  ...TEXT_MODELS,
5364
4990
  ...(readTextModelsSection(env).custom ?? []).map((model3) => ({ ...model3, custom: true }))
@@ -5371,9 +4997,17 @@ var textModel = /* @__PURE__ */ __name((id6, env = process.env) => {
5371
4997
  }
5372
4998
  return found;
5373
4999
  }, "textModel");
5000
+ var downloaded = /* @__PURE__ */ __name((id6, env) => {
5001
+ const model3 = TEXT_MODELS.find((one) => one.id === id6);
5002
+ const directory = sharedModelsDirectory("text", env);
5003
+ return model3 !== void 0 && filesPresent(model3.files.map((file) => [file, join2(directory, model3.id, file.name)]));
5004
+ }, "downloaded");
5374
5005
  var chosenTextModel = /* @__PURE__ */ __name((env = process.env) => {
5375
5006
  const use = readTextModelsSection(env).use;
5376
- return use === void 0 ? { id: DEFAULT_TEXT_MODEL, from: "default" } : { id: use, from: "chosen" };
5007
+ if (use !== void 0)
5008
+ return { id: use, from: "chosen" };
5009
+ const kept = !downloaded(DEFAULT_TEXT_MODEL, env) && existsSync2(join2(sharedModelsDirectory("text", env), PREVIOUS_DEFAULT_TEXT_MODEL));
5010
+ return { id: kept ? PREVIOUS_DEFAULT_TEXT_MODEL : DEFAULT_TEXT_MODEL, from: "default" };
5377
5011
  }, "chosenTextModel");
5378
5012
  var mmarco = huggingFace("cross-encoder/mmarco-mMiniLMv2-L12-H384-v1", "1427fd652930e4ba29e8149678df786c240d8825");
5379
5013
  var bge = huggingFace("onnx-community/bge-reranker-v2-m3-ONNX", "6f5ff65298512715a1e669753bc754d2bc8f367b");
@@ -5450,16 +5084,16 @@ var vectorModelKey = /* @__PURE__ */ __name((model3) => {
5450
5084
  }, "vectorModelKey");
5451
5085
  var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
5452
5086
 
5453
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/services/history-limits.js
5087
+ // 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/history-limits.js
5454
5088
  var HISTORY_MAX_DAYS = 1095;
5455
5089
  var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
5456
- var DAY_MS2 = 24 * 60 * 60 * 1e3;
5090
+ var DAY_MS = 24 * 60 * 60 * 1e3;
5457
5091
  var historyWindow = /* @__PURE__ */ __name((shape, limits, now) => {
5458
5092
  const group2 = shape !== void 0 && shape.kind !== "dialog" && shape.kind !== "saved";
5459
5093
  if (group2 && (shape.participantsCount ?? 0) > limits.groupMembersMax)
5460
5094
  return { skip: "group_too_large", members: shape.participantsCount ?? 0 };
5461
- const days2 = group2 ? limits.groupDays : limits.dialogDays;
5462
- return { keepFrom: now - Math.min(days2, HISTORY_MAX_DAYS) * DAY_MS2 };
5095
+ const days = group2 ? limits.groupDays : limits.dialogDays;
5096
+ return { keepFrom: now - Math.min(days, HISTORY_MAX_DAYS) * DAY_MS };
5463
5097
  }, "historyWindow");
5464
5098
  var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now = Date.now()) => {
5465
5099
  const skipped = /* @__PURE__ */ new Map();
@@ -5497,8 +5131,8 @@ var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now =
5497
5131
  return { batch: { ...batch, messages }, skipped };
5498
5132
  }, "limitBatch");
5499
5133
 
5500
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/bot/registry.js
5501
- import { existsSync as existsSync2, readdirSync as readdirSync3, readFileSync as readFileSync3 } from "node:fs";
5134
+ // 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
5135
+ import { existsSync as existsSync3, readdirSync as readdirSync2, readFileSync as readFileSync3 } from "node:fs";
5502
5136
  import { join as join3 } from "node:path";
5503
5137
  var botsDirectory = /* @__PURE__ */ __name((app, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "bots"), "botsDirectory");
5504
5138
  var botFiles = /* @__PURE__ */ __name((app, profile, env = process.env) => {
@@ -5536,7 +5170,7 @@ var ChatRegistry = class {
5536
5170
  }
5537
5171
  /** Makes this bot known to `bot list` before it has seen any chat. */
5538
5172
  touch() {
5539
- if (!existsSync2(this.#path))
5173
+ if (!existsSync3(this.#path))
5540
5174
  writeSecurely(this.#path, `${JSON.stringify({ chats: [] }, null, 2)}
5541
5175
  `, 384);
5542
5176
  }
@@ -5565,7 +5199,7 @@ var ChatRegistry = class {
5565
5199
  this.#write({ ...this.#read(), chats: [...byId.values()] });
5566
5200
  }
5567
5201
  #read() {
5568
- if (!existsSync2(this.#path))
5202
+ if (!existsSync3(this.#path))
5569
5203
  return {};
5570
5204
  try {
5571
5205
  const parsed = JSON.parse(readFileSync3(this.#path, "utf8"));
@@ -5581,15 +5215,15 @@ var ChatRegistry = class {
5581
5215
  };
5582
5216
  var registryProfiles = /* @__PURE__ */ __name((app, env = process.env) => {
5583
5217
  const directory = botsDirectory(app, env);
5584
- if (!existsSync2(directory))
5218
+ if (!existsSync3(directory))
5585
5219
  return [];
5586
- return readdirSync3(directory, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => entry.name).map((name) => name.slice(0, -".json".length));
5220
+ return readdirSync2(directory, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => entry.name).map((name) => name.slice(0, -".json".length));
5587
5221
  }, "registryProfiles");
5588
5222
 
5589
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
5223
+ // 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
5590
5224
  import { readFileSync as readFileSync4 } from "node:fs";
5591
5225
 
5592
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/config-repair.js
5226
+ // 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
5593
5227
  var REPAIR_WORDS = {
5594
5228
  byte_order_mark: "an invisible byte-order mark at the start",
5595
5229
  comment: "a comment, which JSON does not allow",
@@ -5830,7 +5464,7 @@ ${parts.join(",\n")}
5830
5464
  ${indent}${close}`;
5831
5465
  }, "serialise");
5832
5466
 
5833
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
5467
+ // 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
5834
5468
  var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
5835
5469
  var SECTIONS = ["personal", "bot"];
5836
5470
  var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
@@ -6009,7 +5643,7 @@ var schemaIssues = /* @__PURE__ */ __name((raw, schema2, context2) => {
6009
5643
  return [...found.values()];
6010
5644
  }
6011
5645
  }, "schemaIssues");
6012
- var scopes2 = /* @__PURE__ */ __name((raw) => {
5646
+ var scopes = /* @__PURE__ */ __name((raw) => {
6013
5647
  if (!isNode(raw))
6014
5648
  return [];
6015
5649
  const out = [];
@@ -6017,12 +5651,12 @@ var scopes2 = /* @__PURE__ */ __name((raw) => {
6017
5651
  if (isNode(node))
6018
5652
  out.push([path2, node]);
6019
5653
  }, "add");
6020
- const addSection = /* @__PURE__ */ __name((path2, section) => {
6021
- if (!isNode(section))
5654
+ const addSection = /* @__PURE__ */ __name((path2, section2) => {
5655
+ if (!isNode(section2))
6022
5656
  return;
6023
- add([...path2, "defaults"], section.defaults);
6024
- if (isNode(section.profiles))
6025
- for (const [name, scope] of Object.entries(section.profiles))
5657
+ add([...path2, "defaults"], section2.defaults);
5658
+ if (isNode(section2.profiles))
5659
+ for (const [name, scope] of Object.entries(section2.profiles))
6026
5660
  add([...path2, "profiles", name], scope);
6027
5661
  }, "addSection");
6028
5662
  add([], raw);
@@ -6031,7 +5665,7 @@ var scopes2 = /* @__PURE__ */ __name((raw) => {
6031
5665
  addSection([name], raw[name]);
6032
5666
  return out;
6033
5667
  }, "scopes");
6034
- var savedPermissionKeys = /* @__PURE__ */ __name((raw) => scopes2(raw).flatMap(([path2, scope]) => isNode(scope.permissions) ? Object.keys(scope.permissions).map((key) => ({ key, at: [...path2, "permissions", key] })) : []), "savedPermissionKeys");
5668
+ var savedPermissionKeys = /* @__PURE__ */ __name((raw) => scopes(raw).flatMap(([path2, scope]) => isNode(scope.permissions) ? Object.keys(scope.permissions).map((key) => ({ key, at: [...path2, "permissions", key] })) : []), "savedPermissionKeys");
6035
5669
  var permissionIssues = /* @__PURE__ */ __name((saved, known, context2) => saved.filter(({ key }) => !known.has(key)).map(({ at: at2 }) => locate("unknown_permission", at2, context2, (key) => `${key} names no command`)), "permissionIssues");
6036
5670
  var pathId = /* @__PURE__ */ __name((path2) => path2.join("\0"), "pathId");
6037
5671
  var prune = /* @__PURE__ */ __name((raw, paths) => {
@@ -6039,7 +5673,7 @@ var prune = /* @__PURE__ */ __name((raw, paths) => {
6039
5673
  const kept = /* @__PURE__ */ new Map();
6040
5674
  const walk = /* @__PURE__ */ __name((node, at2) => {
6041
5675
  if (Array.isArray(node)) {
6042
- const indices = node.flatMap((_, index) => drop.has(pathId([...at2, String(index)])) ? [] : [index]);
5676
+ const indices = node.flatMap((_2, index) => drop.has(pathId([...at2, String(index)])) ? [] : [index]);
6043
5677
  kept.set(pathId(at2), indices);
6044
5678
  return indices.map((index) => walk(node[index], [...at2, String(index)]));
6045
5679
  }
@@ -6075,7 +5709,7 @@ var withoutPath = /* @__PURE__ */ __name((raw, at2) => {
6075
5709
  }
6076
5710
  return { config: prune(raw, [gone]).pruned, removed: true };
6077
5711
  }, "withoutPath");
6078
- var publicIssue = /* @__PURE__ */ __name(({ at: _, ...issue }) => issue, "publicIssue");
5712
+ var publicIssue = /* @__PURE__ */ __name(({ at: _2, ...issue }) => issue, "publicIssue");
6079
5713
  var fixVerb = /* @__PURE__ */ __name((issue) => issue.kind === "invalid_json" ? "repair" : "remove", "fixVerb");
6080
5714
  var issueMessage = /* @__PURE__ */ __name((issues, doctor = "doctor") => {
6081
5715
  const [first2] = issues;
@@ -6124,22 +5758,22 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
6124
5758
  return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
6125
5759
  }, "readConfigFile");
6126
5760
 
6127
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/default-config.js
6128
- import { existsSync as existsSync3, linkSync, mkdirSync as mkdirSync2, mkdtempSync, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
5761
+ // 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
5762
+ import { existsSync as existsSync4, linkSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
6129
5763
  import { dirname, join as join4 } from "node:path";
6130
5764
  var DEFAULT_CONFIG = {
6131
5765
  defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
6132
5766
  profiles: {}
6133
5767
  };
6134
5768
  function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
6135
- if (existsSync3(path2))
5769
+ if (existsSync4(path2))
6136
5770
  return;
6137
5771
  const directory = dirname(path2);
6138
- mkdirSync2(directory, { recursive: true, mode: 448 });
5772
+ mkdirSync(directory, { recursive: true, mode: 448 });
6139
5773
  const temporary = mkdtempSync(join4(directory, ".config-"));
6140
5774
  const candidate = join4(temporary, "config.json");
6141
5775
  try {
6142
- writeFileSync2(candidate, `${JSON.stringify(config, null, 2)}
5776
+ writeFileSync(candidate, `${JSON.stringify(config, null, 2)}
6143
5777
  `, { flag: "wx", mode: 384 });
6144
5778
  try {
6145
5779
  linkSync(candidate, path2);
@@ -6148,12 +5782,12 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
6148
5782
  throw error;
6149
5783
  }
6150
5784
  } finally {
6151
- rmSync2(temporary, { recursive: true, force: true });
5785
+ rmSync(temporary, { recursive: true, force: true });
6152
5786
  }
6153
5787
  }
6154
5788
  __name(ensureDefaultConfig, "ensureDefaultConfig");
6155
5789
 
6156
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
5790
+ // 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
6157
5791
  var isNode2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
6158
5792
  var parentOf = /* @__PURE__ */ __name((config, key) => {
6159
5793
  const path2 = key.split(".");
@@ -6175,7 +5809,7 @@ var withSettingDefaults = /* @__PURE__ */ __name((raw, declared) => {
6175
5809
  return { config, added };
6176
5810
  }, "withSettingDefaults");
6177
5811
 
6178
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/settings.js
5812
+ // 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
6179
5813
  var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
6180
5814
  var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
6181
5815
  var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
@@ -6214,6 +5848,7 @@ var SHARED_PROFILE_ENTRIES = {
6214
5848
  record_input: optional(recordInputSetting),
6215
5849
  keep_runs_for_days: optional(count2),
6216
5850
  keep_successful_runs_for_days: optional(count2),
5851
+ keep_store_runs_for_days: optional(count2),
6217
5852
  runs_size_limit_mb: optional(count2),
6218
5853
  permissions: optional(permissionLevels),
6219
5854
  sends_per_hour: optional(count2),
@@ -6224,6 +5859,7 @@ var SHARED_PROFILE_ENTRIES = {
6224
5859
  history_dialog_days: optional(historyDays),
6225
5860
  history_group_days: optional(historyDays),
6226
5861
  history_group_members_max: optional(count2),
5862
+ history_muted: optional(flag),
6227
5863
  picture_search: optional(flag),
6228
5864
  search_reranker: optional(picklist([...RERANK_MODELS.map((model3) => model3.id), "off"], plain(`has to be off or a reranker id: ${RERANK_MODELS.map((model3) => model3.id).join(", ")}`))),
6229
5865
  ...AI_ENTRIES
@@ -6239,6 +5875,7 @@ var MESSENGER_ONLY_SETTINGS = [
6239
5875
  "history_dialog_days",
6240
5876
  "history_group_days",
6241
5877
  "history_group_members_max",
5878
+ "history_muted",
6242
5879
  "read_other_bots",
6243
5880
  "speech_model",
6244
5881
  "picture_search"
@@ -6272,6 +5909,11 @@ var SHARED_SETTINGS = [
6272
5909
  default: KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
6273
5910
  description: "days a successful run is kept"
6274
5911
  },
5912
+ {
5913
+ key: "keep_store_runs_for_days",
5914
+ default: KEEP_STORE_RUNS_FOR_DAYS,
5915
+ description: "days a successful run that wrote the store is kept, even unrecorded"
5916
+ },
6275
5917
  { key: "runs_size_limit_mb", default: RUNS_SIZE_LIMIT_MB, description: "the most megabytes all runs may take" },
6276
5918
  { key: "sender_colors", default: false, description: "color each sender's name in a conversation" },
6277
5919
  { key: "search_catch_up", default: false, description: "prepare local search after a gaps repair" },
@@ -6290,6 +5932,7 @@ var SHARED_SETTINGS = [
6290
5932
  default: DEFAULT_HISTORY_LIMITS.groupMembersMax,
6291
5933
  description: "a group with more people than this keeps no pushed history"
6292
5934
  },
5935
+ { key: "history_muted", default: false, description: "messages sync --all reads muted chats too" },
6293
5936
  {
6294
5937
  key: "picture_search",
6295
5938
  default: false,
@@ -6414,7 +6057,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6414
6057
  const env = options.env ?? process.env;
6415
6058
  const configPath = configPathFor(options);
6416
6059
  try {
6417
- if (!options.readOnly)
6060
+ if (!options.readOnly && !readOnlyLockOf(app, env))
6418
6061
  ensureDefaultConfig(configPath, withDefaults(DEFAULT_CONFIG).config);
6419
6062
  } catch (error) {
6420
6063
  throw new CliError("configuration_error", error instanceof Error ? error.message : String(error));
@@ -6435,11 +6078,11 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6435
6078
  const name = usableProfileName(profile.value);
6436
6079
  const configured = config.profiles[name] ?? {};
6437
6080
  const shared = config.defaults ?? {};
6438
- const section = config[kind2];
6081
+ const section2 = config[kind2];
6439
6082
  const layers = [
6440
- [`config file: ${kind2}.profiles.${name}`, section?.profiles?.[name]],
6083
+ [`config file: ${kind2}.profiles.${name}`, section2?.profiles?.[name]],
6441
6084
  [extension.sourcePaths ? `config file: profiles.${name}` : "config file", configured],
6442
- [`config file: ${kind2}.defaults`, section?.defaults],
6085
+ [`config file: ${kind2}.defaults`, section2?.defaults],
6443
6086
  [extension.sourcePaths ? "config file: defaults" : "config defaults", shared]
6444
6087
  ];
6445
6088
  const fromLayers = /* @__PURE__ */ __name((key, fallback, only = layers) => first(only.map(([from, scope]) => [from, scope?.[key]]), fallback), "fromLayers");
@@ -6453,11 +6096,13 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6453
6096
  const historyDialogDays = fromLayers("history_dialog_days", DEFAULT_HISTORY_LIMITS.dialogDays);
6454
6097
  const historyGroupDays = fromLayers("history_group_days", DEFAULT_HISTORY_LIMITS.groupDays);
6455
6098
  const historyGroupMembersMax = fromLayers("history_group_members_max", DEFAULT_HISTORY_LIMITS.groupMembersMax);
6099
+ const historyMuted = fromLayers("history_muted", false);
6456
6100
  const pictureSearch = fromLayers("picture_search", false);
6457
6101
  const searchReranker = fromLayers("search_reranker", DEFAULT_RERANK_MODEL);
6458
6102
  const recordInput = fromLayers("record_input", true);
6459
6103
  const keepRunsForDays = fromLayers("keep_runs_for_days", DEFAULT_KEEP_RUNS_FOR_DAYS);
6460
6104
  const keepSuccessfulRunsForDays = fromLayers("keep_successful_runs_for_days", KEEP_SUCCESSFUL_RUNS_FOR_DAYS);
6105
+ const keepStoreRunsForDays = fromLayers("keep_store_runs_for_days", KEEP_STORE_RUNS_FOR_DAYS);
6461
6106
  const runsSizeLimitMb = fromLayers("runs_size_limit_mb", RUNS_SIZE_LIMIT_MB);
6462
6107
  const readOnlyLock = readOnlyLockOf(app, env);
6463
6108
  const sendsPerHour = kind2 === "bot" ? fromLayers("sends_per_hour", Number.POSITIVE_INFINITY, kindLayers) : fromLayers("sends_per_hour", DEFAULT_SENDS_PER_HOUR);
@@ -6500,6 +6145,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6500
6145
  groupDays: historyGroupDays.value,
6501
6146
  groupMembersMax: historyGroupMembersMax.value
6502
6147
  },
6148
+ historyMuted: historyMuted.value,
6503
6149
  pictureSearch: pictureSearch.value,
6504
6150
  searchReranker: searchReranker.value,
6505
6151
  limit: limit.value,
@@ -6512,6 +6158,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6512
6158
  keepFailedRuns: record2.value || record2.from !== "flag",
6513
6159
  keepRunsForDays: keepRunsForDays.value,
6514
6160
  keepSuccessfulRunsForDays: keepSuccessfulRunsForDays.value,
6161
+ keepStoreRunsForDays: keepStoreRunsForDays.value,
6515
6162
  runsSizeLimitMb: runsSizeLimitMb.value,
6516
6163
  ...readOnlyLock ? { readOnlyLock } : {},
6517
6164
  permissions: permissions.levels,
@@ -6523,7 +6170,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6523
6170
  updateCheck: updateCheck.value,
6524
6171
  skillHint: skillHint.value,
6525
6172
  configPath,
6526
- configFound: existsSync4(configPath),
6173
+ configFound: existsSync5(configPath),
6527
6174
  configuredProfiles: namedProfiles(config),
6528
6175
  profilesHere: profilesOf(config, env),
6529
6176
  accountProfiles: accountsOf(config, env, bots),
@@ -6540,12 +6187,14 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6540
6187
  historyDialogDays: historyDialogDays.from,
6541
6188
  historyGroupDays: historyGroupDays.from,
6542
6189
  historyGroupMembersMax: historyGroupMembersMax.from,
6190
+ historyMuted: historyMuted.from,
6543
6191
  pictureSearch: pictureSearch.from,
6544
6192
  searchReranker: searchReranker.from,
6545
6193
  record: record2.from,
6546
6194
  recordInput: recordInput.from,
6547
6195
  keepRunsForDays: keepRunsForDays.from,
6548
6196
  keepSuccessfulRunsForDays: keepSuccessfulRunsForDays.from,
6197
+ keepStoreRunsForDays: keepStoreRunsForDays.from,
6549
6198
  runsSizeLimitMb: runsSizeLimitMb.from,
6550
6199
  sendsPerHour: sendsPerHour.from,
6551
6200
  requestsPerMinute: requestsPerMinute.from,
@@ -6685,12 +6334,12 @@ var given = /* @__PURE__ */ __name((value) => {
6685
6334
  return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
6686
6335
  }, "given");
6687
6336
 
6688
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/context.js
6689
- var runBudgetOf = /* @__PURE__ */ __name((command, requests) => {
6337
+ // 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
6338
+ var runBudgetOf = /* @__PURE__ */ __name((command, requests2) => {
6690
6339
  const { deadline, signal, app } = environmentOf(command);
6691
6340
  const now = deadline?.();
6692
6341
  return runBudget({
6693
- ...requests === void 0 ? {} : { requests },
6342
+ ...requests2 === void 0 ? {} : { requests: requests2 },
6694
6343
  ...app?.requestMs === void 0 ? {} : { requestMs: app.requestMs },
6695
6344
  ...now ? { deadline: now } : {},
6696
6345
  ...signal ? { signal } : {}
@@ -6698,8 +6347,11 @@ var runBudgetOf = /* @__PURE__ */ __name((command, requests) => {
6698
6347
  }, "runBudgetOf");
6699
6348
  var setExitCode = /* @__PURE__ */ __name((command, code) => {
6700
6349
  const slot = environmentOf(command).exit;
6350
+ const request = commandServerRequest();
6701
6351
  if (slot)
6702
6352
  slot.code = code;
6353
+ else if (request)
6354
+ request.exitCode = code;
6703
6355
  else
6704
6356
  process.exitCode = code;
6705
6357
  }, "setExitCode");
@@ -6751,6 +6403,7 @@ var baseContext = /* @__PURE__ */ __name((command, resolveSettings) => {
6751
6403
  });
6752
6404
  const closeables = [];
6753
6405
  const ranFor = namedProfile(settings);
6406
+ let namedTheAnswer = false;
6754
6407
  return {
6755
6408
  settings,
6756
6409
  renderer,
@@ -6766,6 +6419,9 @@ var baseContext = /* @__PURE__ */ __name((command, resolveSettings) => {
6766
6419
  return withAbort(environment.commandSignal, () => withDeadline(unbounded ? void 0 : settings.commandTimeoutMs, closeables, () => body(() => {
6767
6420
  })));
6768
6421
  const runName = name ?? `${environment.agent ? "mcp " : ""}${commandPath(command)}`;
6422
+ const answersFor = !environment.agent && name === void 0 && !namedTheAnswer;
6423
+ if (answersFor)
6424
+ namedTheAnswer = true;
6769
6425
  return recorded({
6770
6426
  app: environment.app,
6771
6427
  command: runName,
@@ -6790,8 +6446,9 @@ var baseContext = /* @__PURE__ */ __name((command, resolveSettings) => {
6790
6446
  trace: settings.trace,
6791
6447
  keepDays: settings.keepRunsForDays,
6792
6448
  ...settings.keepSuccessfulRunsForDays === void 0 ? {} : { keepSuccessDays: settings.keepSuccessfulRunsForDays },
6449
+ ...settings.keepStoreRunsForDays === void 0 ? {} : { keepStoreDays: settings.keepStoreRunsForDays },
6793
6450
  ...settings.runsSizeLimitMb === void 0 ? {} : { maxBytes: settings.runsSizeLimitMb * 1024 * 1024 },
6794
- processRun: !environment.agent,
6451
+ processRun: answersFor,
6795
6452
  format,
6796
6453
  streams,
6797
6454
  env
@@ -6817,7 +6474,7 @@ var commandPath = /* @__PURE__ */ __name((command) => {
6817
6474
  return words2.join(" ");
6818
6475
  }, "commandPath");
6819
6476
 
6820
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/effects.js
6477
+ // 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
6821
6478
  var REMOTE_READ = { remote: "read", local: "read" };
6822
6479
  var FETCH = { remote: "read", local: "write" };
6823
6480
  var REMOTE_WRITE = { remote: "write", local: "write" };
@@ -6888,6 +6545,7 @@ var fetchesOnly = /* @__PURE__ */ __name((command) => {
6888
6545
  return effects?.remote === "read" && effects.local === "write" && !STORE_WRITES.has(command) && !changesAuthority(command) && !OTHER_SERVICE.has(command) && !savesFiles(command);
6889
6546
  }, "fetchesOnly");
6890
6547
  var FILE_OPTION = /* @__PURE__ */ new WeakMap();
6548
+ var fileOptionOf = /* @__PURE__ */ __name((command) => FILE_OPTION.get(command), "fileOptionOf");
6891
6549
  var writesFileNow = /* @__PURE__ */ __name((command) => {
6892
6550
  const option = FILE_OPTION.get(command);
6893
6551
  return option === void 0 || command.opts()[option] !== void 0;
@@ -6949,7 +6607,7 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
6949
6607
  throw readOnlyRefusal(lock, what);
6950
6608
  }, "refuseUnderReadOnly");
6951
6609
 
6952
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/account.js
6610
+ // 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
6953
6611
  var account = strictObject({
6954
6612
  provider: text,
6955
6613
  id,
@@ -6959,7 +6617,7 @@ var account = strictObject({
6959
6617
  scope: optional(picklist(["personal", "work"]))
6960
6618
  });
6961
6619
 
6962
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/account-session.js
6620
+ // 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
6963
6621
  var accountSession = strictObject({
6964
6622
  current: boolean(),
6965
6623
  client: nullable(text),
@@ -6969,7 +6627,7 @@ var accountSession = strictObject({
6969
6627
  created_at: optional(nullable(time))
6970
6628
  });
6971
6629
 
6972
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/account-change.js
6630
+ // 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
6973
6631
  var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
6974
6632
  var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
6975
6633
  var audience = picklist(["everyone", "contacts", "nobody"]);
@@ -6998,7 +6656,7 @@ var accountRemoval = strictObject({
6998
6656
  kept: array(strictObject({ kind: removalKind, target: text, reason: text }))
6999
6657
  });
7000
6658
 
7001
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
6659
+ // 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
7002
6660
  var accountProfile = strictObject({
7003
6661
  profile: id,
7004
6662
  current: boolean(),
@@ -7010,7 +6668,7 @@ var accountProfile = strictObject({
7010
6668
  bot: optional(literal(true))
7011
6669
  });
7012
6670
 
7013
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
6671
+ // 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
7014
6672
  var milliseconds = pipe(number(), minValue(0));
7015
6673
  var counterReading = strictObject({
7016
6674
  counter: picklist(["views", "reactions", "comments"]),
@@ -7022,7 +6680,7 @@ var counterReading = strictObject({
7022
6680
  });
7023
6681
  var selection = record(string(), unknown());
7024
6682
 
7025
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
6683
+ // 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
7026
6684
  var adminRow = strictObject({
7027
6685
  ref: reference,
7028
6686
  /** What `stats * evidence` takes: a person id, a stay or a message locator. */
@@ -7075,7 +6733,7 @@ var adminReport = strictObject({
7075
6733
  rows: array(adminRow)
7076
6734
  });
7077
6735
 
7078
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/task.js
6736
+ // 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.js
7079
6737
  var closeSuggestion = strictObject({
7080
6738
  as: picklist(["done", "dismissed"]),
7081
6739
  /** The agent's name. */
@@ -7137,7 +6795,7 @@ var task = strictObject({
7137
6795
  updated_at: optional(time)
7138
6796
  });
7139
6797
 
7140
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/agenda.js
6798
+ // 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/agenda.js
7141
6799
  var agendaChat = strictObject({
7142
6800
  chat: reference,
7143
6801
  title: nullable(text),
@@ -7207,11 +6865,11 @@ var agenda = strictObject({
7207
6865
  unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
7208
6866
  });
7209
6867
 
7210
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
6868
+ // 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
7211
6869
  var analysisConsent = strictObject({ chat: id, provider: text, at: time });
7212
6870
  var analysisConsentRevocation = strictObject({ revoked: boolean() });
7213
6871
 
7214
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/attachment.js
6872
+ // 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.js
7215
6873
  var attachment = strictObject({
7216
6874
  /** The message it came with, as a locator; absent inside that message. */
7217
6875
  message: optional(reference),
@@ -7247,9 +6905,16 @@ var attachment = strictObject({
7247
6905
  url: optional(text)
7248
6906
  }))))
7249
6907
  });
7250
- var hitFile = strictObject({ position: count, kind: text, name: optional(text), size: optional(count) });
6908
+ var hitFile = strictObject({
6909
+ position: count,
6910
+ kind: text,
6911
+ name: optional(text),
6912
+ size: optional(count),
6913
+ /** The saved copy on this computer, once `messages download` fetched it; absent until then. */
6914
+ local_path: optional(text)
6915
+ });
7251
6916
 
7252
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
6917
+ // 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
7253
6918
  var actionableError = objectWithRest({
7254
6919
  code: text,
7255
6920
  message: text,
@@ -7266,7 +6931,7 @@ var batchResult = strictObject({
7266
6931
  max_error_percent: count
7267
6932
  });
7268
6933
 
7269
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
6934
+ // 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
7270
6935
  var extractionItem = strictObject({
7271
6936
  ref: reference,
7272
6937
  attachment: count,
@@ -7299,7 +6964,7 @@ var extractionReport = strictObject({
7299
6964
  cursor: optional(text)
7300
6965
  });
7301
6966
 
7302
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
6967
+ // 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
7303
6968
  var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
7304
6969
  var attachmentBytes = strictObject({
7305
6970
  ref: reference,
@@ -7324,25 +6989,93 @@ var attachmentTextChange = strictObject({
7324
6989
  attachment: count,
7325
6990
  origin: literal("agent"),
7326
6991
  chars: count,
7327
- replaced: nullable(picklist(["extracted", "agent"]))
6992
+ replaced: nullable(picklist(["extracted", "agent"])),
6993
+ /** `images read` only: who read the picture, `agent:claude` or `agent:codex/<model>`, and what it read. */
6994
+ extractor: optional(text),
6995
+ text: optional(text)
7328
6996
  });
7329
6997
 
7330
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/chart.js
7331
- var chart = strictObject({
7332
- version: literal(1),
7333
- kind: picklist(["bar", "line", "grouped-bar"]),
7334
- title: text,
7335
- x: strictObject({ type: picklist(["day", "week"]), values: array(text) }),
7336
- series: array(strictObject({ name: text, values: array(nullable(number())) })),
7337
- unit: picklist(["messages", "people"]),
7338
- timezone: text,
7339
- /** Lower bounds: the store or the events did not hold the whole period. */
7340
- partial: boolean(),
7341
- reasons: array(picklist(["store-incomplete", "events-incomplete"])),
7342
- file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
6998
+ // 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/botcheck/reasons.js
6999
+ var WEIGHTS = {
7000
+ bot: 3,
7001
+ scam: 3,
7002
+ fake: 3,
7003
+ deleted: 1,
7004
+ no_photo: 1,
7005
+ no_username: 1,
7006
+ odd_name: 1,
7007
+ never_wrote: 1,
7008
+ link_first: 2,
7009
+ burst_join: 1,
7010
+ mass_invited: 1,
7011
+ new_account: 2,
7012
+ no_bio: 1,
7013
+ same_text: 2,
7014
+ photo_recent: 1,
7015
+ cas_banned: 3,
7016
+ lols_banned: 3,
7017
+ lols_scammer: 3
7018
+ };
7019
+ var LINK = /https?:\/\/|t\.me\/|www\./i;
7020
+ var DIGITS = /\d{5,}/;
7021
+ var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
7022
+
7023
+ // 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
7024
+ var linkedIdentity = strictObject({
7025
+ provider: text,
7026
+ id,
7027
+ name: nullable(text),
7028
+ username: nullable(text),
7029
+ phone: optional(nullable(text)),
7030
+ email: optional(nullable(text)),
7031
+ /** Every phone and address the source gave, `phone` and `email` among them. */
7032
+ phones: optional(array(text)),
7033
+ emails: optional(array(text)),
7034
+ is_bot: nullable(boolean()),
7035
+ accounts: array(id),
7036
+ seen_in: array(strictObject({ account: id, scope: picklist(["personal", "work"]) })),
7037
+ method: text,
7038
+ linked_by: text,
7039
+ linked_at: time
7040
+ });
7041
+ var linkedPerson = strictObject({
7042
+ uid: id,
7043
+ name: nullable(text),
7044
+ /** The name `people list` shows: the person's own, else an account's, a username, phone or address. */
7045
+ display_name: optional(nullable(text)),
7046
+ identities: array(linkedIdentity),
7047
+ /** An agent's link: the `identity_link` proposal the owner decides; the person is still as it was. */
7048
+ proposal: optional(text)
7049
+ });
7050
+ var contactActivity = strictObject({
7051
+ at: time,
7052
+ subject: text,
7053
+ subject_id: count,
7054
+ role: text,
7055
+ scope: text,
7056
+ provider: nullable(text),
7057
+ account: nullable(text),
7058
+ chat_id: nullable(text),
7059
+ locator: nullable(text),
7060
+ project_id: nullable(count)
7061
+ });
7062
+ var botReason = picklist(Object.keys(WEIGHTS));
7063
+ var contactCheck = strictObject({
7064
+ person: strictObject({ id, name: nullable(text), username: nullable(text), provider: text }),
7065
+ score: count,
7066
+ reasons: array(strictObject({ reason: botReason, weight: count, source: text, detail: optional(text) })),
7067
+ registries: array(strictObject({
7068
+ name: picklist(["cas", "lols"]),
7069
+ answer: picklist(["listed", "clean", "unknown"]),
7070
+ checked_at: time,
7071
+ detail: optional(text),
7072
+ reasons: optional(array(picklist(["cas_banned", "lols_banned", "lols_scammer"])))
7073
+ })),
7074
+ unknown: array(botReason),
7075
+ checked_at: time
7343
7076
  });
7344
7077
 
7345
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/member.js
7078
+ // 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
7346
7079
  var member = strictObject({
7347
7080
  id,
7348
7081
  name: nullable(text),
@@ -7365,7 +7098,7 @@ var member = strictObject({
7365
7098
  check: optional(record(string(), unknown()))
7366
7099
  });
7367
7100
 
7368
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/chat.js
7101
+ // 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
7369
7102
  var setting = optional(nullable(boolean()));
7370
7103
  var chat = strictObject({
7371
7104
  ref: reference,
@@ -7406,33 +7139,654 @@ var chat = strictObject({
7406
7139
  members: optional(array(member))
7407
7140
  });
7408
7141
 
7409
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/folder.js
7410
- var named = strictObject({
7142
+ // 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
7143
+ var quoted = strictObject({
7411
7144
  id,
7412
- title: nullable(text),
7413
- kind: nullable(picklist(["dialog", "group", "channel", "saved", "unknown"]))
7145
+ sender_id: nullable(id),
7146
+ sender_name: nullable(text),
7147
+ timestamp: nullable(time),
7148
+ text,
7149
+ attachments: array(attachment),
7150
+ outgoing: nullable(boolean())
7414
7151
  });
7415
- var folder = strictObject({
7152
+ var mailPerson = strictObject({ name: nullable(text), address: text, ref: nullable(reference) });
7153
+ var message = strictObject({
7154
+ /** The message's locator. */
7155
+ ref: reference,
7416
7156
  id,
7417
- title: text,
7418
- /** Chats added by hand; a folder that selects chats by a rule of its own lists none. */
7419
- chat_ids: array(id),
7420
- emoji: optional(text),
7421
- /** Kinds of chat it takes by itself. */
7422
- include: optional(array(picklist(["contacts", "non-contacts", "groups", "channels", "bots"]))),
7423
- skip: optional(array(picklist(["muted", "read", "archived"]))),
7424
- excluded_chat_ids: optional(array(id)),
7425
- pinned_chat_ids: optional(array(id)),
7426
- /** `chats folders show`: the chats in it, pinned and left out, by name. */
7427
- chats: optional(array(named)),
7428
- pinned_chats: optional(array(named)),
7429
- excluded_chats: optional(array(named))
7430
- });
7431
-
7432
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
7433
- var inviteLink = strictObject({
7434
- link: text,
7435
- /** Who joins by it asks first, and an admin lets them in. */
7157
+ provider: optional(text),
7158
+ account: optional(text),
7159
+ chat_id: id,
7160
+ chat_title: optional(nullable(text)),
7161
+ sender_id: nullable(id),
7162
+ sender_name: nullable(text),
7163
+ sender_username: optional(text),
7164
+ sender_is_chat: optional(boolean()),
7165
+ sender_is_me: boolean(),
7166
+ mentions: optional(array(id)),
7167
+ /** When it was sent. */
7168
+ timestamp: time,
7169
+ edited_at: nullable(time),
7170
+ text,
7171
+ /** What a voice message says, once heard. */
7172
+ transcript: optional(text),
7173
+ /** In a window of messages around one, the one asked for. */
7174
+ anchor: optional(boolean()),
7175
+ /** A stretch of the text, transcript, file name or file text around what a search matched. */
7176
+ excerpt: optional(text),
7177
+ /** `picture`: the picture search lane found it by what the picture shows; it follows the text hits. */
7178
+ matched_in: optional(picklist(["text", "transcript", "filename", "file", "context", "picture"])),
7179
+ score: optional(number()),
7180
+ /**
7181
+ * `corrected`: a query word matched only a spelling speech recognition garbled in a voice note's transcript,
7182
+ * listed in `corrections`. `words` and `beginnings`: what a discovery search matched.
7183
+ */
7184
+ match: optional(picklist(["words", "beginnings", "corrected"])),
7185
+ corrections: optional(array(strictObject({ from: text, to: array(text) }))),
7186
+ /** Where a search found it: the local archive, the messenger's server, or both. */
7187
+ found_in: optional(picklist(["archive", "server", "both"])),
7188
+ /** A discovery search's partial match: how much of the question it covers, and which words it lacks. */
7189
+ discovery: optional(strictObject({
7190
+ coverage: number(),
7191
+ matched_terms: array(text),
7192
+ missing_terms: array(text),
7193
+ parent: optional(reference),
7194
+ /** Present when meaning was searched too: which of the two lists found it. */
7195
+ found_by: optional(array(picklist(["words", "meaning"]))),
7196
+ /** Present when the reranker read it: its own score, higher is better. It ordered the first hits with `score`. */
7197
+ reranker_score: optional(number())
7198
+ })),
7199
+ /** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
7200
+ context: optional(array(strictObject({ ref: reference, timestamp: time, sender_name: nullable(text), text }))),
7201
+ /**
7202
+ * A discovery hit's later messages, from any chat the search reads, that share a rare word with it, latest first:
7203
+ * one may change or cancel what the hit says. An excerpt, as the hit's own: `messages context <ref>` has the whole text.
7204
+ */
7205
+ follow_ups: optional(array(strictObject({
7206
+ ref: reference,
7207
+ chat_title: nullable(text),
7208
+ timestamp: time,
7209
+ sender_name: nullable(text),
7210
+ excerpt: text
7211
+ }))),
7212
+ outgoing: nullable(boolean()),
7213
+ attachments: array(attachment),
7214
+ reply_to: nullable(quoted),
7215
+ /** The id a reply answers, also when the provider sent no copy of that message. */
7216
+ reply_to_id: optional(id),
7217
+ forwarded_from: nullable(quoted),
7218
+ thread_id: optional(id),
7219
+ thread_root_id: optional(id),
7220
+ reactions: optional(nullable(strictObject({
7221
+ counts: array(strictObject({ reaction: text, count })),
7222
+ mine: nullable(text),
7223
+ total: count
7224
+ }))),
7225
+ scheduled_for: optional(time),
7226
+ /** The owner starred it; only where the messenger has stars, and only when set. */
7227
+ starred: optional(literal(true)),
7228
+ /** The owner's own message in a one-to-one chat: `delivered`, or `read` once opened; absent when no receipt came. */
7229
+ delivery: optional(picklist(["delivered", "read"])),
7230
+ email: optional(strictObject({
7231
+ subject: nullable(text),
7232
+ from: nullable(mailPerson),
7233
+ to: array(mailPerson),
7234
+ cc: array(mailPerson),
7235
+ bcc: array(mailPerson),
7236
+ /** The mail header Reply-To; `reply_to` is the quoted message a chat reply answers. */
7237
+ reply_addresses: array(mailPerson),
7238
+ labels: array(text),
7239
+ /** The thread as a `chat:` reference. */
7240
+ thread: reference,
7241
+ read: nullable(boolean()),
7242
+ flagged: nullable(boolean()),
7243
+ /** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
7244
+ sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) })),
7245
+ /** Mail `review`: filed in the mailbox of mail sent to many. */
7246
+ bulk: optional(boolean()),
7247
+ /** Mail `review`: its List-Id, `null` when it has none. */
7248
+ list_id: optional(nullable(text)),
7249
+ /** Mail `review`: the mail rule that decided how it is stored, by its id in `rules list`; `null` when none. */
7250
+ rule_id: optional(nullable(number())),
7251
+ /** Mail `review`: the evidence fingerprint a finding cites this email by. */
7252
+ fingerprint: optional(pipe(text, regex(/^[a-f0-9]{64}$/))),
7253
+ /** Mail `review`: no earlier stored email, in any account, came from this address. */
7254
+ new_sender: optional(boolean()),
7255
+ /** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
7256
+ sender_identities: optional(number())
7257
+ })),
7258
+ provider_metadata: providerMetadata
7259
+ });
7260
+
7261
+ // 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
7262
+ var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
7263
+ var contextMessage = strictObject({
7264
+ locator: reference,
7265
+ provider: text,
7266
+ account: id,
7267
+ chat_id: id,
7268
+ chat_title: nullable(text),
7269
+ id,
7270
+ timestamp: time,
7271
+ sender_id: nullable(id),
7272
+ sender_name: nullable(text),
7273
+ outgoing: nullable(boolean()),
7274
+ text
7275
+ });
7276
+ var sharedChat = strictObject({
7277
+ provider: text,
7278
+ account: id,
7279
+ chat_id: id,
7280
+ title: nullable(text),
7281
+ kind: chat.entries.kind,
7282
+ last_message_at: nullable(time)
7283
+ });
7284
+ var contextEvent = strictObject({
7285
+ ref: reference,
7286
+ title: nullable(text),
7287
+ starts_at: nullable(time),
7288
+ ends_at: nullable(time),
7289
+ all_day: boolean(),
7290
+ location: nullable(text),
7291
+ status: nullable(text)
7292
+ });
7293
+ var context = strictObject({
7294
+ person: contextPerson,
7295
+ /** The accounts read: only those of the scopes the caller may read. */
7296
+ accounts: array(strictObject({ provider: text, account: id, scope: picklist(["personal", "work"]) })),
7297
+ shared: array(sharedChat),
7298
+ last: strictObject({
7299
+ from_them: nullable(contextMessage),
7300
+ from_me: nullable(contextMessage),
7301
+ from_them_anywhere: nullable(contextMessage)
7302
+ }),
7303
+ recent: strictObject({ direct: array(contextMessage), groups: array(contextMessage) }),
7304
+ mentions: array(contextMessage),
7305
+ /** Calendar events they are invited to, one occurrence per series. */
7306
+ events: optional(strictObject({ upcoming: array(contextEvent), recent: array(contextEvent) })),
7307
+ limits: strictObject({ messages: count, bytes: count }),
7308
+ complete: boolean(),
7309
+ not_read: array(strictObject({
7310
+ provider: text,
7311
+ account: id,
7312
+ chat_id: id,
7313
+ title: nullable(text),
7314
+ reason: picklist(["not_fetched", "partial"])
7315
+ }))
7316
+ });
7317
+ var shortMessage = strictObject({ at: time, text, transcript: optional(text) });
7318
+ var identifiedMessage = strictObject({
7319
+ ...shortMessage.entries,
7320
+ id,
7321
+ locator: reference,
7322
+ sender_id: nullable(id),
7323
+ reply_to: nullable(id)
7324
+ });
7325
+ var counterObservation = strictObject({
7326
+ value: number(),
7327
+ observed_at: time,
7328
+ source: picklist(["remote_fetch", "remote_update"]),
7329
+ reactions: optional(message.entries.reactions.wrapped.wrapped)
7330
+ });
7331
+ var { reply_addresses: mailReplyTo, ...mailFields } = message.entries.email.wrapped.entries;
7332
+ var fullMessage = strictObject({
7333
+ ...pick(message, [
7334
+ "id",
7335
+ "chat_id",
7336
+ "chat_title",
7337
+ "excerpt",
7338
+ "sender_id",
7339
+ "sender_name",
7340
+ "sender_username",
7341
+ "mentions",
7342
+ "sender_is_chat",
7343
+ "timestamp",
7344
+ "edited_at",
7345
+ "text",
7346
+ "outgoing",
7347
+ "attachments",
7348
+ "reply_to",
7349
+ "reply_to_id",
7350
+ "forwarded_from",
7351
+ "thread_id",
7352
+ "thread_root_id",
7353
+ "scheduled_for",
7354
+ "provider_metadata",
7355
+ "delivery"
7356
+ ]).entries,
7357
+ reactions: nullable(message.entries.reactions.wrapped.wrapped),
7358
+ starred: optional(boolean()),
7359
+ email: optional(strictObject({ ...mailFields, reply_to: mailReplyTo })),
7360
+ counter_observations: optional(partial(strictObject({
7361
+ views: counterObservation,
7362
+ reactions: counterObservation,
7363
+ comments: counterObservation
7364
+ }))),
7365
+ ...shortMessage.entries,
7366
+ locator: reference
7367
+ });
7368
+ var contactMessages = strictObject({
7369
+ person: strictObject({ uid: id, provider: text, id, name: nullable(text) }),
7370
+ chats: array(strictObject({
7371
+ chat: pick(chat, ["id", "title", "kind"]),
7372
+ messages: array(union([shortMessage, identifiedMessage, fullMessage])),
7373
+ complete: boolean(),
7374
+ more: boolean()
7375
+ })),
7376
+ limits: strictObject({ messages: count })
7377
+ });
7378
+ var contactContext = union([context, contactMessages]);
7379
+ var coverage = strictObject({
7380
+ included: count,
7381
+ has_more: boolean(),
7382
+ cut_by: nullable(picklist(["limit", "bytes"]))
7383
+ });
7384
+ var meetingCue = strictObject({
7385
+ reference,
7386
+ fingerprint: text,
7387
+ transcript_id: count,
7388
+ content_hash: nullable(text),
7389
+ position: count,
7390
+ start_ms: count,
7391
+ end_ms: count,
7392
+ speaker_participant_id: nullable(count),
7393
+ speaker_name: nullable(text),
7394
+ text,
7395
+ revision: picklist(["current", "superseded"])
7396
+ });
7397
+ var scopes2 = array(picklist(["personal", "work"]));
7398
+ var contactPreparation = strictObject({
7399
+ ...context.entries,
7400
+ prepare: strictObject({
7401
+ waiting: array(strictObject({
7402
+ provider: text,
7403
+ account: id,
7404
+ chat_id: id,
7405
+ title: nullable(text),
7406
+ message: contextMessage,
7407
+ partial: boolean()
7408
+ })),
7409
+ tasks: array(strictObject({
7410
+ ref: reference,
7411
+ title: text,
7412
+ role: text,
7413
+ due_at: nullable(time),
7414
+ project: reference,
7415
+ source: nullable(reference),
7416
+ created_at: time
7417
+ })),
7418
+ facts: array(strictObject({
7419
+ ref: reference,
7420
+ type: text,
7421
+ statement: text,
7422
+ subject: nullable(reference),
7423
+ project: nullable(reference),
7424
+ updated_at: time
7425
+ })),
7426
+ notes: array(strictObject({ ref: reference, title: nullable(text), text, revision: count, updated_at: time })),
7427
+ meetings: array(strictObject({
7428
+ reference,
7429
+ cues: array(meetingCue),
7430
+ cue_coverage: strictObject({ included: count, omitted: nullable(count), has_more: boolean() })
7431
+ })),
7432
+ limits: strictObject({ items: count, bytes: count }),
7433
+ coverage: strictObject({
7434
+ waiting: strictObject({
7435
+ ...coverage.entries,
7436
+ rule: literal("their message is the newest the store holds in a one-to-one chat")
7437
+ }),
7438
+ tasks: strictObject({
7439
+ ...coverage.entries,
7440
+ selection: literal("open, assigned to them in any role"),
7441
+ accounts: array(text),
7442
+ scopes: scopes2
7443
+ }),
7444
+ facts: strictObject({
7445
+ ...coverage.entries,
7446
+ selection: literal("accepted, about them or a project they are a member of"),
7447
+ scopes: scopes2
7448
+ }),
7449
+ notes: strictObject({
7450
+ ...coverage.entries,
7451
+ selection: literal("written by you, about them"),
7452
+ scopes: scopes2,
7453
+ withheld: optional(literal("contacts.notes.list"))
7454
+ }),
7455
+ meetings: strictObject({
7456
+ ...coverage.entries,
7457
+ read: literal("every account of the store that saw them"),
7458
+ accounts: array(text),
7459
+ pending: count
7460
+ })
7461
+ })
7462
+ })
7463
+ });
7464
+
7465
+ // 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
7466
+ var nullableText = nullable(text);
7467
+ var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
7468
+ var outcome = picklist(["open", "won", "lost"]);
7469
+ var crmAccount = nullable(strictObject({ provider: text, account: text }));
7470
+ var day = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
7471
+ var activity = strictObject({
7472
+ external_id: text,
7473
+ kind: picklist(CRM_ACTIVITY_KINDS),
7474
+ subject: text,
7475
+ body: nullableText,
7476
+ due_at: nullable(time),
7477
+ done: boolean(),
7478
+ /** The identity `<account>/user/<id>` responsible for it. */
7479
+ assignee: nullableText,
7480
+ created_at: time,
7481
+ updated_at: time
7482
+ });
7483
+ var deal = strictObject({
7484
+ id,
7485
+ ref: reference,
7486
+ kind: picklist(["deal", "lead"]),
7487
+ title: text,
7488
+ /** One line with the stage, amount and status. */
7489
+ summary: text,
7490
+ pipeline: reference,
7491
+ pipeline_name: text,
7492
+ stage: text,
7493
+ /** The base stage `stage` maps to, once the owner confirmed it; `null` while unsorted. */
7494
+ base_stage: nullable(strictObject({ ref: reference, name: text })),
7495
+ status: outcome,
7496
+ organization: nullable(party),
7497
+ /** A CRM copy's own person and company as the CRM keeps them on it, such as a lead's with nobody linked yet. */
7498
+ contact_name: nullableText,
7499
+ company_name: nullableText,
7500
+ currency: nullableText,
7501
+ amount: nullableText,
7502
+ close_date: day,
7503
+ closed_date: day,
7504
+ closed_reason: nullableText,
7505
+ rank: nullable(number()),
7506
+ /** A lead's deal, once it became one. */
7507
+ deal: nullable(reference),
7508
+ /** The CRM account it is a copy from; `null` for the owner's own. */
7509
+ account: crmAccount,
7510
+ external_id: nullableText,
7511
+ /** A CRM copy's assignee, the identity `<account>/user/<id>`. */
7512
+ assignee: nullableText,
7513
+ /** A CRM copy's own fields by code; a list field's value is its option's label, `option_id` its id. */
7514
+ provider_metadata: record(string(), strictObject({
7515
+ label: nullable(string()),
7516
+ value: unknown(),
7517
+ option_id: optional(union([string(), array(string())]))
7518
+ })),
7519
+ people: array(strictObject({ ...party.entries, role: picklist(DEAL_ROLES) })),
7520
+ author: strictObject({
7521
+ type: picklist(["person", "bot"]),
7522
+ id,
7523
+ name: nullableText,
7524
+ kind: nullable(picklist(["agent", "rule"]))
7525
+ }),
7526
+ model: nullableText,
7527
+ source: text,
7528
+ reason: nullableText,
7529
+ evidence: array(reference),
7530
+ project: nullable(reference),
7531
+ project_name: nullableText,
7532
+ created_at: time,
7533
+ updated_at: time,
7534
+ /** `show` of a CRM copy whose `activities` setting is on: its activities and tasks, open ones first. */
7535
+ activities: optional(array(activity)),
7536
+ untrusted
7537
+ });
7538
+ var lead = deal;
7539
+ var pipelineStage = strictObject({
7540
+ name: text,
7541
+ position: count,
7542
+ outcome,
7543
+ external_id: nullableText,
7544
+ /** Open deals or leads in it now. */
7545
+ open: count,
7546
+ /** With a funnel: rows that got this far, and the share of them that reached the next stage. */
7547
+ reached: optional(count),
7548
+ conversion: optional(nullable(number())),
7549
+ /** With a funnel: rows standing in it now, and their sum per currency, never converted. */
7550
+ items: optional(count),
7551
+ amounts: optional(array(strictObject({ amount: text, currency: text, items: count })))
7552
+ });
7553
+ var pipeline = strictObject({
7554
+ id,
7555
+ ref: reference,
7556
+ name: text,
7557
+ kind: picklist(["deal", "lead"]),
7558
+ account: crmAccount,
7559
+ external_id: nullableText,
7560
+ stages: array(pipelineStage),
7561
+ created_at: time,
7562
+ totals: optional(strictObject({ items: count, open: count, won: count, lost: count, win_rate: nullable(number()) })),
7563
+ since: optional(day),
7564
+ untrusted
7565
+ });
7566
+ var stage = strictObject({
7567
+ ...pipelineStage.entries,
7568
+ pipeline: reference,
7569
+ pipeline_name: text,
7570
+ kind: picklist(["deal", "lead"]),
7571
+ untrusted
7572
+ });
7573
+
7574
+ // 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
7575
+ var nullableText2 = nullable(text);
7576
+ var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
7577
+ var standing = picklist(STANDINGS);
7578
+ var categories = array(picklist(CATEGORIES));
7579
+ var section = /* @__PURE__ */ __name((item) => strictObject({ items: array(item), total: count, has_more: boolean(), next: nullableText2 }), "section");
7580
+ var relationRole = strictObject({
7581
+ /** `link:<id>`; absent for a proposal. */
7582
+ link: optional(reference),
7583
+ /** A `relationship` proposal waiting for the owner: its id, with `standing: proposed`. */
7584
+ proposal: optional(text),
7585
+ kind: picklist(RELATION_KINDS),
7586
+ role: nullableText2,
7587
+ /** `reported`: a CRM account says so and nobody confirmed it; `ended`: it no longer holds. */
7588
+ standing,
7589
+ /** The source account that reported it, `<provider>:<account>`. */
7590
+ account: optional(text),
7591
+ /** A job title the source gave; never a role. */
7592
+ position: optional(text),
7593
+ /** How a source made it when it stated none, such as `department-head`. */
7594
+ derived: optional(text),
7595
+ starts_at: optional(time),
7596
+ ends_at: optional(time)
7597
+ });
7598
+ var related = strictObject({ ref: reference, name: nullableText2, roles: array(relationRole) });
7599
+ var coverage2 = strictObject({
7600
+ /** `<provider>:<account>` of every account read. */
7601
+ accounts: array(text),
7602
+ not_read: array(strictObject({ source: text, reason: text }))
7603
+ });
7604
+ var linkedBy = array(picklist(["project", "counterparty"]));
7605
+ var financeTotal = strictObject({
7606
+ status: text,
7607
+ currency: text,
7608
+ rows: count,
7609
+ total: text,
7610
+ open: optional(text)
7611
+ });
7612
+ var money = strictObject({
7613
+ invoices: section(strictObject({
7614
+ ref: reference,
7615
+ title: text,
7616
+ direction: picklist(INVOICE_DIRECTIONS),
7617
+ status: picklist(INVOICE_STATUSES),
7618
+ review: picklist(FINANCE_REVIEWS),
7619
+ currency: text,
7620
+ total: text,
7621
+ open: text,
7622
+ due_date: day2,
7623
+ linked_by: linkedBy
7624
+ })),
7625
+ payments: section(strictObject({
7626
+ ref: reference,
7627
+ title: text,
7628
+ direction: picklist(MONEY_DIRECTIONS),
7629
+ review: picklist(FINANCE_REVIEWS),
7630
+ currency: text,
7631
+ amount: text,
7632
+ date: day2,
7633
+ linked_by: linkedBy
7634
+ })),
7635
+ orders: optional(section(strictObject({
7636
+ ref: reference,
7637
+ title: text,
7638
+ status: picklist(ORDER_STATUSES),
7639
+ review: picklist(FINANCE_REVIEWS),
7640
+ currency: nullableText2,
7641
+ total: nullableText2,
7642
+ side: picklist(["customer", "supplier"])
7643
+ }))),
7644
+ /** Confirmed rows only, per status (payments: direction) and currency; nothing converted. */
7645
+ totals: strictObject({ invoices: array(financeTotal), payments: array(financeTotal) }),
7646
+ /** Invoices and payments still proposed, of every row read. */
7647
+ unconfirmed: count,
7648
+ /** `false` when a read stopped at the store's page: the totals may leave rows out. */
7649
+ complete: boolean()
7650
+ });
7651
+ var taskLine = strictObject({
7652
+ ref: reference,
7653
+ key: text,
7654
+ title: text,
7655
+ status: picklist(TASK_STATES),
7656
+ project: reference,
7657
+ due_at: nullable(time)
7658
+ });
7659
+ var counts = { messages: count, mail: count, meetings: count };
7660
+ var personBusiness = strictObject({
7661
+ organizations: section(strictObject({ ...related.entries, categories })),
7662
+ reports_to: section(related),
7663
+ direct_reports: section(related),
7664
+ deals: section(related),
7665
+ projects: section(related),
7666
+ categories
7667
+ });
7668
+ var personContext = strictObject({
7669
+ ...context.entries,
7670
+ person: linkedPerson,
7671
+ has_more: boolean(),
7672
+ business: personBusiness,
7673
+ coverage: coverage2
7674
+ });
7675
+ var organizationContext = strictObject({
7676
+ organization: strictObject({ ...organization.entries, own: boolean() }),
7677
+ categories,
7678
+ people: section(related),
7679
+ customers: section(related),
7680
+ /** Whom it is a customer of: "supplier of", read backwards. */
7681
+ suppliers: section(related),
7682
+ partners: section(related),
7683
+ projects: section(strictObject({ ref: reference, name: text, via: array(picklist(["organization", "deal"])) })),
7684
+ deals: section(strictObject({
7685
+ ref: reference,
7686
+ kind: picklist(DEAL_KINDS),
7687
+ title: text,
7688
+ summary: text,
7689
+ stage: text,
7690
+ status: picklist(DEAL_STATUSES),
7691
+ currency: nullableText2,
7692
+ amount: nullableText2,
7693
+ close_date: day2,
7694
+ project: nullable(reference)
7695
+ })),
7696
+ money,
7697
+ /** Counts only, through its own people, in the accounts read. */
7698
+ communications: strictObject({ ...counts, has_more: boolean() }),
7699
+ tasks: section(taskLine),
7700
+ coverage: coverage2
7701
+ });
7702
+ var { untrusted: _, ...dealRow } = deal.entries;
7703
+ var dealContext = strictObject({
7704
+ deal: strictObject(dealRow),
7705
+ stages: section(strictObject({ from: nullableText2, to: text, pipeline: reference, at: time })),
7706
+ organization: nullable(strictObject({ ref: reference, name: nullableText2, categories })),
7707
+ participants: section(related),
7708
+ owner: nullable(related),
7709
+ project: nullable(strictObject({ ref: reference, name: nullableText2 })),
7710
+ money,
7711
+ window: strictObject({ since: time, until: time }),
7712
+ /** Shared people within its lifetime: `proposed`, an overlap of people, never a link. */
7713
+ communications: strictObject({
7714
+ ...section(strictObject({
7715
+ kind: picklist(["message", "mail", "meeting"]),
7716
+ ref: reference,
7717
+ title: nullableText2,
7718
+ at: nullable(time),
7719
+ people: array(reference),
7720
+ standing: literal("proposed")
7721
+ })).entries,
7722
+ counts: strictObject(counts)
7723
+ }),
7724
+ tasks: section(taskLine),
7725
+ coverage: coverage2
7726
+ });
7727
+ var dealBrief = strictObject({
7728
+ ref: reference,
7729
+ kind: picklist(DEAL_KINDS),
7730
+ title: text,
7731
+ pipeline: text,
7732
+ stage: text,
7733
+ status: picklist(DEAL_STATUSES),
7734
+ amount: nullableText2,
7735
+ currency: nullableText2,
7736
+ close_date: day2,
7737
+ organization: nullableText2,
7738
+ owner: nullableText2,
7739
+ people: array(strictObject({ ref: reference, name: nullableText2, roles: array(text), standing })),
7740
+ project: nullableText2,
7741
+ stages: array(text),
7742
+ money: strictObject({ ...money.entries.totals.entries, unconfirmed: count, complete: boolean() }),
7743
+ communications: strictObject({ ...counts, standing: literal("proposed") }),
7744
+ open_tasks: count,
7745
+ not_read: coverage2.entries.not_read
7746
+ });
7747
+
7748
+ // 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
7749
+ var chart = strictObject({
7750
+ version: literal(1),
7751
+ kind: picklist(["bar", "line", "grouped-bar"]),
7752
+ title: text,
7753
+ x: strictObject({ type: picklist(["day", "week"]), values: array(text) }),
7754
+ series: array(strictObject({ name: text, values: array(nullable(number())) })),
7755
+ unit: picklist(["messages", "people"]),
7756
+ timezone: text,
7757
+ /** Lower bounds: the store or the events did not hold the whole period. */
7758
+ partial: boolean(),
7759
+ reasons: array(picklist(["store-incomplete", "events-incomplete"])),
7760
+ file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
7761
+ });
7762
+
7763
+ // 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
7764
+ var named = strictObject({
7765
+ id,
7766
+ title: nullable(text),
7767
+ kind: nullable(picklist(["dialog", "group", "channel", "saved", "unknown"]))
7768
+ });
7769
+ var folder = strictObject({
7770
+ id,
7771
+ title: text,
7772
+ /** Chats added by hand; a folder that selects chats by a rule of its own lists none. */
7773
+ chat_ids: array(id),
7774
+ emoji: optional(text),
7775
+ /** Kinds of chat it takes by itself. */
7776
+ include: optional(array(picklist(["contacts", "non-contacts", "groups", "channels", "bots"]))),
7777
+ skip: optional(array(picklist(["muted", "read", "archived"]))),
7778
+ excluded_chat_ids: optional(array(id)),
7779
+ pinned_chat_ids: optional(array(id)),
7780
+ /** `chats folders show`: the chats in it, pinned and left out, by name. */
7781
+ chats: optional(array(named)),
7782
+ pinned_chats: optional(array(named)),
7783
+ excluded_chats: optional(array(named))
7784
+ });
7785
+
7786
+ // 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
7787
+ var inviteLink = strictObject({
7788
+ link: text,
7789
+ /** Who joins by it asks first, and an admin lets them in. */
7436
7790
  approval: boolean(),
7437
7791
  /** `null` when it never expires. */
7438
7792
  expires_at: nullable(time),
@@ -7445,7 +7799,7 @@ var inviteLink = strictObject({
7445
7799
  joined_count: optional(count)
7446
7800
  });
7447
7801
 
7448
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
7802
+ // 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
7449
7803
  var operated = { operation_id: id, chat_id: id };
7450
7804
  var group = strictObject({
7451
7805
  ...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
@@ -7496,668 +7850,284 @@ var chatMembersFetch = strictObject({
7496
7850
  tracked: boolean()
7497
7851
  });
7498
7852
  var chatMembersChange = union([
7499
- strictObject({ ...operated, added: array(id), not_added: array(id) }),
7500
- strictObject({ ...operated, removed: array(id) })
7501
- ]);
7502
- var chatInvite = strictObject({ chat_id: id, title: nullable(text), link: text });
7503
- var chatInviteChange = strictObject({
7504
- ...operated,
7505
- ...omit(inviteLink, ["pending_count", "joined_count"]).entries,
7506
- pending: optional(count),
7507
- joined: optional(count)
7508
- });
7509
- var chatRequestChange = union([
7510
- strictObject({ ...operated, person_id: id, accepted: boolean(), already: boolean() }),
7511
- strictObject({ chat_id: id, accepted: boolean(), counted: count, operation_id: optional(id) })
7512
- ]);
7513
- var chatAdminChange = strictObject({
7514
- ...operated,
7515
- person_id: id,
7516
- rights: optional(array(picklist(["read", "members", "admins", "info", "pin", "link", "post", "edit", "delete"])))
7517
- });
7518
- var chatFolderChange = strictObject({
7519
- operation_id: id,
7520
- folder: omit(folder, ["chats", "pinned_chats", "excluded_chats"])
7521
- });
7522
- var chatFolderRemoval = strictObject({ operation_id: id, folder_id: id });
7523
- var chatFolderOrder = strictObject({
7524
- operation_id: id,
7525
- folders: array(strictObject({ id, title: text }))
7526
- });
7527
-
7528
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
7529
- var operated2 = { operation_id: id, chat_id: id };
7530
- var chatRemoval = strictObject(operated2);
7531
- var chatMuting = strictObject({
7532
- ...operated2,
7533
- muted_until: nullable(union([time, literal("forever")]))
7534
- });
7535
- var chatArchive = strictObject({ ...operated2, archived: boolean() });
7536
- var chatPin = strictObject({ ...operated2, pinned: boolean() });
7537
- var chatUnread = strictObject({ ...operated2, unread: literal(true) });
7538
-
7539
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
7540
- var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
7541
- var chatEvent = strictObject({
7542
- chat_id: id,
7543
- time,
7544
- /** `join`, `leave`, `add`, `remove`, `create`, `title`, `pin`, `profile`; a messenger may pass others through. */
7545
- type: text,
7546
- /** The service message that says so, where there is one. */
7547
- message_id: optional(id),
7548
- by: optional(who),
7549
- people: array(who),
7550
- /** `create` and `title` carry the chat's title. */
7551
- title: optional(text),
7552
- /** `profile`: the name and username seen before. */
7553
- before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
7554
- });
7555
-
7556
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
7557
- var chatMetadata = strictObject({
7558
- chat_id: id,
7559
- title: nullable(text),
7560
- username: nullable(text),
7561
- description: nullable(text),
7562
- fetched_at: time
7563
- });
7564
- var cachedChatMetadata = strictObject({ chat_id: id, metadata: nullable(chatMetadata) });
7565
- var failedChatMetadata = strictObject({ chat_id: id, error: strictObject({ code: text, message: text }) });
7566
- var chatMetadataRefresh = strictObject({
7567
- chats: array(union([chatMetadata, failedChatMetadata])),
7568
- has_more: boolean()
7569
- });
7570
-
7571
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
7572
- var action = picklist(["report", "delete", "remove"]);
7573
- var level = picklist(["deny", "readonly", "ask", "allow"]);
7574
- var chatRules = strictObject({
7575
- chat_id: id,
7576
- title: nullable(text),
7577
- file: text,
7578
- saved: boolean(),
7579
- rules: strictObject({
7580
- title: nullable(text),
7581
- trusted: array(id),
7582
- blocked: array(id),
7583
- blocked_names: array(text),
7584
- links: action,
7585
- invites: action,
7586
- forwards: action,
7587
- blocked_people: action,
7588
- flood: strictObject({ messages: count, minutes: count, action }),
7589
- new_account: strictObject({ days: count, action: picklist(["report", "remove"]) }),
7590
- consent: strictObject({ delete: level, remove: level })
7591
- })
7592
- });
7593
- var chatModeration = strictObject({
7594
- chat_id: id,
7595
- rows: array(strictObject({
7596
- kind: picklist(["message", "member"]),
7597
- rule: picklist(["blocked", "invites", "links", "forwards", "flood", "newAccount"]),
7598
- person_id: id,
7599
- person_name: nullable(text),
7600
- message_id: optional(id),
7601
- action,
7602
- outcome: picklist(["reported", "done", "planned", "forbidden", "declined", "refused", "failed", "skipped"]),
7603
- reason: optional(text),
7604
- command: optional(text)
7605
- }))
7606
- });
7607
-
7608
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
7609
- var optionalCount = optional(count);
7610
- var minutes = nullable(number());
7611
- var chatStats = strictObject({
7612
- chat: reference,
7613
- since: time,
7614
- until: time,
7615
- /** The store holds the chat whole and the messenger read every join and leave; otherwise lower bounds. */
7616
- complete: boolean(),
7617
- completeness: strictObject({
7618
- state: picklist(["complete", "partial", "unknown"]),
7619
- up_to_date: nullable(boolean()),
7620
- gaps: boolean(),
7621
- reaches_start: boolean(),
7622
- fetched_at: nullable(time)
7623
- }),
7624
- messages: count,
7625
- senders: count,
7626
- replies: count,
7627
- threads: count,
7628
- reactions: count,
7629
- views: optionalCount,
7630
- forwards: optionalCount,
7631
- comments: optionalCount,
7632
- top_posts: array(strictObject({
7633
- ref: reference,
7634
- timestamp: time,
7635
- reactions: count,
7636
- views: optionalCount,
7637
- forwards: optionalCount,
7638
- comments: optionalCount
7639
- })),
7640
- questions: strictObject({
7641
- asked: count,
7642
- answered: count,
7643
- median_minutes_to_answer: minutes,
7644
- answered_by: picklist(["owner", "owner-and-admins"])
7645
- }),
7646
- member_counts: optional(array(strictObject({ day: text, participants: nullable(count), listed: count, complete: boolean() }))),
7647
- /** Absent where joins and leaves were not asked, or not recorded for the chat yet (then `missing` says so). */
7648
- members: optional(strictObject({
7649
- joined: count,
7650
- left: count,
7651
- net: number(),
7652
- wrote: count,
7653
- median_minutes_to_first_message: minutes,
7654
- /** The messenger stopped reading its history before `since`: the counts are lower bounds. */
7655
- more: boolean()
7656
- })),
7657
- series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
7658
- });
7659
- var ms = nullable(pipe(number(), minValue(0)));
7660
- var taskStats = strictObject({
7661
- /** Open tasks across every row. */
7662
- open: count,
7663
- created: count,
7664
- closed: count,
7665
- median_close_ms: ms,
7666
- mean_open_age_ms: ms,
7667
- rows: array(strictObject({
7668
- /** Rows of `--by chat` only. */
7669
- chat: optional(reference),
7670
- /** The chat reference, `meeting:<account>/<meeting>` or `project:<id>`. */
7671
- key: text,
7672
- name: nullable(text),
7673
- open: count,
7674
- created: count,
7675
- closed: count,
7676
- oldest_open_at: nullable(time),
7677
- median_close_ms: ms,
7678
- mean_open_age_ms: ms
7679
- }))
7680
- });
7681
-
7682
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
7683
- var memberCount = strictObject({
7684
- day: pipe(text, isoDate()),
7685
- participants: nullable(count),
7686
- listed: count,
7687
- complete: boolean()
7688
- });
7689
- var trackedChat = strictObject({
7690
- chat_id: id,
7691
- title: nullable(text),
7692
- tracked_at: time,
7693
- last_count: nullable(memberCount)
7694
- });
7695
- var trackedChatHistory = strictObject({
7696
- chat_id: id,
7697
- tracked_at: nullable(time),
7698
- counts: array(memberCount)
7699
- });
7700
- var chatTracking = strictObject({
7701
- chat_id: id,
7702
- tracked: boolean()
7703
- });
7704
-
7705
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
7706
- var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
7707
- var contactSync = strictObject({ added: count, changed: count, known: count });
7708
- var profileFields = {
7709
- usernames: array(text),
7710
- birthday: optional(nullable(text)),
7711
- phone: optional(nullable(text)),
7712
- flags: partial(strictObject({
7713
- bot: boolean(),
7714
- verified: boolean(),
7715
- premium: boolean(),
7716
- scam: boolean(),
7717
- fake: boolean(),
7718
- restricted: boolean(),
7719
- deleted: boolean(),
7720
- support: boolean()
7721
- })),
7722
- seen: optional(text),
7723
- contact: optional(boolean()),
7724
- mutual_contact: optional(boolean()),
7725
- common_chats_count: optional(nullable(count)),
7726
- registered: optional(nullable(strictObject({
7727
- at: text,
7728
- source: picklist(["telegram", "max", "estimate"]),
7729
- precision: picklist(["day", "month"])
7730
- }))),
7731
- has_photo: optional(boolean()),
7732
- /** Earlier names and usernames, oldest first; the current ones are not repeated. */
7733
- aliases: array(strictObject({
7734
- name: optional(text),
7735
- username: optional(text),
7736
- link: optional(text),
7737
- first_seen_at: time,
7738
- last_seen_at: time,
7739
- source: picklist(["profile", "messages"])
7740
- }))
7741
- };
7853
+ strictObject({ ...operated, added: array(id), not_added: array(id) }),
7854
+ strictObject({ ...operated, removed: array(id) })
7855
+ ]);
7856
+ var chatInvite = strictObject({ chat_id: id, title: nullable(text), link: text });
7857
+ var chatInviteChange = strictObject({
7858
+ ...operated,
7859
+ ...omit(inviteLink, ["pending_count", "joined_count"]).entries,
7860
+ pending: optional(count),
7861
+ joined: optional(count)
7862
+ });
7863
+ var chatRequestChange = union([
7864
+ strictObject({ ...operated, person_id: id, accepted: boolean(), already: boolean() }),
7865
+ strictObject({ chat_id: id, accepted: boolean(), counted: count, operation_id: optional(id) })
7866
+ ]);
7867
+ var chatAdminChange = strictObject({
7868
+ ...operated,
7869
+ person_id: id,
7870
+ rights: optional(array(picklist(["read", "members", "admins", "info", "pin", "link", "post", "edit", "delete"])))
7871
+ });
7872
+ var chatFolderChange = strictObject({
7873
+ operation_id: id,
7874
+ folder: omit(folder, ["chats", "pinned_chats", "excluded_chats"])
7875
+ });
7876
+ var chatFolderRemoval = strictObject({ operation_id: id, folder_id: id });
7877
+ var chatFolderOrder = strictObject({
7878
+ operation_id: id,
7879
+ folders: array(strictObject({ id, title: text }))
7880
+ });
7742
7881
 
7743
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/contact.js
7744
- var contact = strictObject({
7745
- ref: reference,
7746
- id,
7747
- name: nullable(text),
7748
- username: nullable(text),
7749
- alias: optional(nullable(text)),
7750
- display_name: optional(nullable(text)),
7751
- /** Whatever they wrote about themselves. */
7752
- description: nullable(text),
7753
- /** The newest message in a one-to-one chat with them. */
7754
- last_messaged_at: nullable(time),
7755
- /** For a source that knows it, such as a Zoom contact. */
7756
- email: optional(nullable(text)),
7757
- phones: optional(array(strictObject({ number: text, label: nullable(text) }))),
7758
- /** `contacts show`: the chats shared with them, and what the store holds of their messages in each. */
7759
- chats: optional(array(strictObject({
7760
- ...pick(chat, ["ref", "id", "title", "kind", "last_message_at"]).entries,
7761
- /** Their messages stored; a floor unless `complete`. */
7762
- their_messages: optional(count),
7763
- first_at: optional(nullable(time)),
7764
- last_at: optional(nullable(time)),
7765
- /** The store holds the whole chat, so the count is the real one. */
7766
- complete: optional(boolean())
7767
- }))),
7768
- /** `contacts show`: what the messenger says about them, or with `--offline` what the store saw of them. */
7769
- ...partial(strictObject(profileFields)).entries,
7770
- /** `contacts show --with-notes`: the owner's private notes about them. */
7771
- notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
7882
+ // 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
7883
+ var operated2 = { operation_id: id, chat_id: id };
7884
+ var chatRemoval = strictObject(operated2);
7885
+ var chatMuting = strictObject({
7886
+ ...operated2,
7887
+ muted_until: nullable(union([time, literal("forever")]))
7772
7888
  });
7889
+ var chatArchive = strictObject({ ...operated2, archived: boolean() });
7890
+ var chatPin = strictObject({ ...operated2, pinned: boolean() });
7891
+ var chatUnread = strictObject({ ...operated2, unread: literal(true) });
7773
7892
 
7774
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
7775
- var WEIGHTS = {
7776
- bot: 3,
7777
- scam: 3,
7778
- fake: 3,
7779
- deleted: 1,
7780
- no_photo: 1,
7781
- no_username: 1,
7782
- odd_name: 1,
7783
- never_wrote: 1,
7784
- link_first: 2,
7785
- burst_join: 1,
7786
- mass_invited: 1,
7787
- new_account: 2,
7788
- no_bio: 1,
7789
- same_text: 2,
7790
- photo_recent: 1,
7791
- cas_banned: 3,
7792
- lols_banned: 3,
7793
- lols_scammer: 3
7794
- };
7795
- var LINK = /https?:\/\/|t\.me\/|www\./i;
7796
- var DIGITS = /\d{5,}/;
7797
- var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
7893
+ // 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
7894
+ var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
7895
+ var chatEvent = strictObject({
7896
+ chat_id: id,
7897
+ time,
7898
+ /** `join`, `leave`, `add`, `remove`, `create`, `title`, `pin`, `profile`; a messenger may pass others through. */
7899
+ type: text,
7900
+ /** The service message that says so, where there is one. */
7901
+ message_id: optional(id),
7902
+ by: optional(who),
7903
+ people: array(who),
7904
+ /** `create` and `title` carry the chat's title. */
7905
+ title: optional(text),
7906
+ /** `profile`: the name and username seen before. */
7907
+ before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
7908
+ });
7798
7909
 
7799
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
7800
- var linkedIdentity = strictObject({
7801
- provider: text,
7802
- id,
7803
- name: nullable(text),
7910
+ // 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
7911
+ var chatMetadata = strictObject({
7912
+ chat_id: id,
7913
+ title: nullable(text),
7804
7914
  username: nullable(text),
7805
- is_bot: nullable(boolean()),
7806
- accounts: array(id),
7807
- seen_in: array(strictObject({ account: id, scope: picklist(["personal", "work"]) })),
7808
- method: text,
7809
- linked_by: text,
7810
- linked_at: time
7811
- });
7812
- var linkedPerson = strictObject({ uid: id, name: nullable(text), identities: array(linkedIdentity) });
7813
- var contactActivity = strictObject({
7814
- at: time,
7815
- subject: text,
7816
- subject_id: count,
7817
- role: text,
7818
- scope: text,
7819
- provider: nullable(text),
7820
- account: nullable(text),
7821
- chat_id: nullable(text),
7822
- locator: nullable(text),
7823
- project_id: nullable(count)
7915
+ description: nullable(text),
7916
+ fetched_at: time
7824
7917
  });
7825
- var botReason = picklist(Object.keys(WEIGHTS));
7826
- var contactCheck = strictObject({
7827
- person: strictObject({ id, name: nullable(text), username: nullable(text), provider: text }),
7828
- score: count,
7829
- reasons: array(strictObject({ reason: botReason, weight: count, source: text, detail: optional(text) })),
7830
- registries: array(strictObject({
7831
- name: picklist(["cas", "lols"]),
7832
- answer: picklist(["listed", "clean", "unknown"]),
7833
- checked_at: time,
7834
- detail: optional(text),
7835
- reasons: optional(array(picklist(["cas_banned", "lols_banned", "lols_scammer"])))
7836
- })),
7837
- unknown: array(botReason),
7838
- checked_at: time
7918
+ var cachedChatMetadata = strictObject({ chat_id: id, metadata: nullable(chatMetadata) });
7919
+ var failedChatMetadata = strictObject({ chat_id: id, error: strictObject({ code: text, message: text }) });
7920
+ var chatMetadataRefresh = strictObject({
7921
+ chats: array(union([chatMetadata, failedChatMetadata])),
7922
+ has_more: boolean()
7839
7923
  });
7840
7924
 
7841
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/message.js
7842
- var quoted = strictObject({
7843
- id,
7844
- sender_id: nullable(id),
7845
- sender_name: nullable(text),
7846
- timestamp: nullable(time),
7847
- text,
7848
- attachments: array(attachment),
7849
- outgoing: nullable(boolean())
7925
+ // 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
7926
+ var action = picklist(["report", "delete", "remove"]);
7927
+ var level = picklist(["deny", "readonly", "ask", "allow"]);
7928
+ var chatRules = strictObject({
7929
+ chat_id: id,
7930
+ title: nullable(text),
7931
+ file: text,
7932
+ saved: boolean(),
7933
+ rules: strictObject({
7934
+ title: nullable(text),
7935
+ trusted: array(id),
7936
+ blocked: array(id),
7937
+ blocked_names: array(text),
7938
+ links: action,
7939
+ invites: action,
7940
+ forwards: action,
7941
+ blocked_people: action,
7942
+ flood: strictObject({ messages: count, minutes: count, action }),
7943
+ new_account: strictObject({ days: count, action: picklist(["report", "remove"]) }),
7944
+ consent: strictObject({ delete: level, remove: level })
7945
+ })
7850
7946
  });
7851
- var mailPerson = strictObject({ name: nullable(text), address: text, ref: nullable(reference) });
7852
- var message = strictObject({
7853
- /** The message's locator. */
7854
- ref: reference,
7855
- id,
7856
- provider: optional(text),
7857
- account: optional(text),
7947
+ var chatModeration = strictObject({
7858
7948
  chat_id: id,
7859
- chat_title: optional(nullable(text)),
7860
- sender_id: nullable(id),
7861
- sender_name: nullable(text),
7862
- sender_username: optional(text),
7863
- sender_is_chat: optional(boolean()),
7864
- sender_is_me: boolean(),
7865
- mentions: optional(array(id)),
7866
- /** When it was sent. */
7867
- timestamp: time,
7868
- edited_at: nullable(time),
7869
- text,
7870
- /** What a voice message says, once heard. */
7871
- transcript: optional(text),
7872
- /** In a window of messages around one, the one asked for. */
7873
- anchor: optional(boolean()),
7874
- /** A stretch of the text, transcript, file name or file text around what a search matched. */
7875
- excerpt: optional(text),
7876
- /** `picture`: the picture search lane found it by what the picture shows; it follows the text hits. */
7877
- matched_in: optional(picklist(["text", "transcript", "filename", "file", "context", "picture"])),
7878
- score: optional(number()),
7879
- /**
7880
- * `corrected`: a query word matched only a spelling speech recognition garbled in a voice note's transcript,
7881
- * listed in `corrections`. `words` and `beginnings`: what a discovery search matched.
7882
- */
7883
- match: optional(picklist(["words", "beginnings", "corrected"])),
7884
- corrections: optional(array(strictObject({ from: text, to: array(text) }))),
7885
- /** Where a search found it: the local archive, the messenger's server, or both. */
7886
- found_in: optional(picklist(["archive", "server", "both"])),
7887
- /** A discovery search's partial match: how much of the question it covers, and which words it lacks. */
7888
- discovery: optional(strictObject({
7889
- coverage: number(),
7890
- matched_terms: array(text),
7891
- missing_terms: array(text),
7892
- parent: optional(reference),
7893
- /** Present when meaning was searched too: which of the two lists found it. */
7894
- found_by: optional(array(picklist(["words", "meaning"]))),
7895
- /** Present when the reranker read it: its own score, higher is better. It ordered the first hits with `score`. */
7896
- reranker_score: optional(number())
7897
- })),
7898
- /** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
7899
- context: optional(array(strictObject({ ref: reference, timestamp: time, sender_name: nullable(text), text }))),
7900
- /**
7901
- * A discovery hit's later messages, from any chat the search reads, that share a rare word with it, latest first:
7902
- * one may change or cancel what the hit says. An excerpt, as the hit's own: `messages context <ref>` has the whole text.
7903
- */
7904
- follow_ups: optional(array(strictObject({
7949
+ rows: array(strictObject({
7950
+ kind: picklist(["message", "member"]),
7951
+ rule: picklist(["blocked", "invites", "links", "forwards", "flood", "newAccount"]),
7952
+ person_id: id,
7953
+ person_name: nullable(text),
7954
+ message_id: optional(id),
7955
+ action,
7956
+ outcome: picklist(["reported", "done", "planned", "forbidden", "declined", "refused", "failed", "skipped"]),
7957
+ reason: optional(text),
7958
+ command: optional(text)
7959
+ }))
7960
+ });
7961
+
7962
+ // 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
7963
+ var optionalCount = optional(count);
7964
+ var minutes = nullable(number());
7965
+ var chatStats = strictObject({
7966
+ chat: reference,
7967
+ since: time,
7968
+ until: time,
7969
+ /** The store holds the chat whole and the messenger read every join and leave; otherwise lower bounds. */
7970
+ complete: boolean(),
7971
+ completeness: strictObject({
7972
+ state: picklist(["complete", "partial", "unknown"]),
7973
+ up_to_date: nullable(boolean()),
7974
+ gaps: boolean(),
7975
+ reaches_start: boolean(),
7976
+ fetched_at: nullable(time)
7977
+ }),
7978
+ messages: count,
7979
+ senders: count,
7980
+ replies: count,
7981
+ threads: count,
7982
+ reactions: count,
7983
+ views: optionalCount,
7984
+ forwards: optionalCount,
7985
+ comments: optionalCount,
7986
+ top_posts: array(strictObject({
7905
7987
  ref: reference,
7906
- chat_title: nullable(text),
7907
7988
  timestamp: time,
7908
- sender_name: nullable(text),
7909
- excerpt: text
7910
- }))),
7911
- outgoing: nullable(boolean()),
7912
- attachments: array(attachment),
7913
- reply_to: nullable(quoted),
7914
- /** The id a reply answers, also when the provider sent no copy of that message. */
7915
- reply_to_id: optional(id),
7916
- forwarded_from: nullable(quoted),
7917
- thread_id: optional(id),
7918
- thread_root_id: optional(id),
7919
- reactions: optional(nullable(strictObject({
7920
- counts: array(strictObject({ reaction: text, count })),
7921
- mine: nullable(text),
7922
- total: count
7923
- }))),
7924
- scheduled_for: optional(time),
7925
- /** The owner starred it; only where the messenger has stars, and only when set. */
7926
- starred: optional(literal(true)),
7927
- /** The owner's own message in a one-to-one chat: `delivered`, or `read` once opened; absent when no receipt came. */
7928
- delivery: optional(picklist(["delivered", "read"])),
7929
- email: optional(strictObject({
7930
- subject: nullable(text),
7931
- from: nullable(mailPerson),
7932
- to: array(mailPerson),
7933
- cc: array(mailPerson),
7934
- bcc: array(mailPerson),
7935
- /** The mail header Reply-To; `reply_to` is the quoted message a chat reply answers. */
7936
- reply_addresses: array(mailPerson),
7937
- labels: array(text),
7938
- /** The thread as a `chat:` reference. */
7939
- thread: reference,
7940
- read: nullable(boolean()),
7941
- flagged: nullable(boolean()),
7942
- /** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
7943
- sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) })),
7944
- /** Mail `review`: filed in the mailbox of mail sent to many. */
7945
- bulk: optional(boolean()),
7946
- /** Mail `review`: its List-Id, `null` when it has none. */
7947
- list_id: optional(nullable(text)),
7948
- /** Mail `review`: the mail rule that decided how it is stored, by its id in `rules list`; `null` when none. */
7949
- rule_id: optional(nullable(number())),
7950
- /** Mail `review`: the evidence fingerprint a finding cites this email by. */
7951
- fingerprint: optional(pipe(text, regex(/^[a-f0-9]{64}$/))),
7952
- /** Mail `review`: no earlier stored email, in any account, came from this address. */
7953
- new_sender: optional(boolean()),
7954
- /** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
7955
- sender_identities: optional(number())
7989
+ reactions: count,
7990
+ views: optionalCount,
7991
+ forwards: optionalCount,
7992
+ comments: optionalCount
7956
7993
  })),
7957
- provider_metadata: providerMetadata
7994
+ questions: strictObject({
7995
+ asked: count,
7996
+ answered: count,
7997
+ median_minutes_to_answer: minutes,
7998
+ answered_by: picklist(["owner", "owner-and-admins"])
7999
+ }),
8000
+ member_counts: optional(array(strictObject({ day: text, participants: nullable(count), listed: count, complete: boolean() }))),
8001
+ /** Absent where joins and leaves were not asked, or not recorded for the chat yet (then `missing` says so). */
8002
+ members: optional(strictObject({
8003
+ joined: count,
8004
+ left: count,
8005
+ net: number(),
8006
+ wrote: count,
8007
+ median_minutes_to_first_message: minutes,
8008
+ /** The messenger stopped reading its history before `since`: the counts are lower bounds. */
8009
+ more: boolean()
8010
+ })),
8011
+ series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
8012
+ });
8013
+ var ms = nullable(pipe(number(), minValue(0)));
8014
+ var taskStats = strictObject({
8015
+ /** Every account counted, `provider:account`, when the answer reads several (memo without `--source`). */
8016
+ accounts: optional(array(text)),
8017
+ /** Open tasks across every row. */
8018
+ open: count,
8019
+ created: count,
8020
+ closed: count,
8021
+ median_close_ms: ms,
8022
+ mean_open_age_ms: ms,
8023
+ rows: array(strictObject({
8024
+ /** Rows of `--by chat` only. */
8025
+ chat: optional(reference),
8026
+ /** The chat reference, `meeting:<account>/<meeting>` or `project:<id>`. */
8027
+ key: text,
8028
+ name: nullable(text),
8029
+ open: count,
8030
+ created: count,
8031
+ closed: count,
8032
+ oldest_open_at: nullable(time),
8033
+ median_close_ms: ms,
8034
+ mean_open_age_ms: ms
8035
+ }))
7958
8036
  });
7959
8037
 
7960
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
7961
- var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
7962
- var contextMessage = strictObject({
7963
- locator: reference,
7964
- provider: text,
7965
- account: id,
7966
- chat_id: id,
7967
- chat_title: nullable(text),
7968
- id,
7969
- timestamp: time,
7970
- sender_id: nullable(id),
7971
- sender_name: nullable(text),
7972
- outgoing: nullable(boolean()),
7973
- text
8038
+ // 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
8039
+ var memberCount = strictObject({
8040
+ day: pipe(text, isoDate()),
8041
+ participants: nullable(count),
8042
+ listed: count,
8043
+ complete: boolean()
7974
8044
  });
7975
- var sharedChat = strictObject({
7976
- provider: text,
7977
- account: id,
8045
+ var trackedChat = strictObject({
7978
8046
  chat_id: id,
7979
8047
  title: nullable(text),
7980
- kind: chat.entries.kind,
7981
- last_message_at: nullable(time)
8048
+ tracked_at: time,
8049
+ last_count: nullable(memberCount)
7982
8050
  });
7983
- var contextEvent = strictObject({
7984
- ref: reference,
7985
- title: nullable(text),
7986
- starts_at: nullable(time),
7987
- ends_at: nullable(time),
7988
- all_day: boolean(),
7989
- location: nullable(text),
7990
- status: nullable(text)
8051
+ var trackedChatHistory = strictObject({
8052
+ chat_id: id,
8053
+ tracked_at: nullable(time),
8054
+ counts: array(memberCount)
7991
8055
  });
7992
- var context = strictObject({
7993
- person: contextPerson,
7994
- /** The accounts read: only those of the scopes the caller may read. */
7995
- accounts: array(strictObject({ provider: text, account: id, scope: picklist(["personal", "work"]) })),
7996
- shared: array(sharedChat),
7997
- last: strictObject({
7998
- from_them: nullable(contextMessage),
7999
- from_me: nullable(contextMessage),
8000
- from_them_anywhere: nullable(contextMessage)
8001
- }),
8002
- recent: strictObject({ direct: array(contextMessage), groups: array(contextMessage) }),
8003
- mentions: array(contextMessage),
8004
- /** Calendar events they are invited to, one occurrence per series. */
8005
- events: optional(strictObject({ upcoming: array(contextEvent), recent: array(contextEvent) })),
8006
- limits: strictObject({ messages: count, bytes: count }),
8007
- complete: boolean(),
8008
- not_read: array(strictObject({
8009
- provider: text,
8010
- account: id,
8011
- chat_id: id,
8012
- title: nullable(text),
8013
- reason: picklist(["not_fetched", "partial"])
8014
- }))
8056
+ var chatTracking = strictObject({
8057
+ chat_id: id,
8058
+ tracked: boolean()
8015
8059
  });
8016
- var shortMessage = strictObject({ at: time, text, transcript: optional(text) });
8017
- var identifiedMessage = strictObject({
8018
- ...shortMessage.entries,
8060
+
8061
+ // 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
8062
+ var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
8063
+ var contactSync = strictObject({ added: count, changed: count, known: count });
8064
+ var profileFields = {
8065
+ usernames: array(text),
8066
+ birthday: optional(nullable(text)),
8067
+ phone: optional(nullable(text)),
8068
+ flags: partial(strictObject({
8069
+ bot: boolean(),
8070
+ verified: boolean(),
8071
+ premium: boolean(),
8072
+ scam: boolean(),
8073
+ fake: boolean(),
8074
+ restricted: boolean(),
8075
+ deleted: boolean(),
8076
+ support: boolean()
8077
+ })),
8078
+ seen: optional(text),
8079
+ contact: optional(boolean()),
8080
+ mutual_contact: optional(boolean()),
8081
+ common_chats_count: optional(nullable(count)),
8082
+ registered: optional(nullable(strictObject({
8083
+ at: text,
8084
+ source: picklist(["telegram", "max", "estimate"]),
8085
+ precision: picklist(["day", "month"])
8086
+ }))),
8087
+ has_photo: optional(boolean()),
8088
+ /** Earlier names and usernames, oldest first; the current ones are not repeated. */
8089
+ aliases: array(strictObject({
8090
+ name: optional(text),
8091
+ username: optional(text),
8092
+ link: optional(text),
8093
+ first_seen_at: time,
8094
+ last_seen_at: time,
8095
+ source: picklist(["profile", "messages"])
8096
+ }))
8097
+ };
8098
+
8099
+ // 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
8100
+ var contact = strictObject({
8101
+ ref: reference,
8019
8102
  id,
8020
- locator: reference,
8021
- sender_id: nullable(id),
8022
- reply_to: nullable(id)
8023
- });
8024
- var counterObservation = strictObject({
8025
- value: number(),
8026
- observed_at: time,
8027
- source: picklist(["remote_fetch", "remote_update"]),
8028
- reactions: optional(message.entries.reactions.wrapped.wrapped)
8029
- });
8030
- var { reply_addresses: mailReplyTo, ...mailFields } = message.entries.email.wrapped.entries;
8031
- var fullMessage = strictObject({
8032
- ...pick(message, [
8033
- "id",
8034
- "chat_id",
8035
- "chat_title",
8036
- "excerpt",
8037
- "sender_id",
8038
- "sender_name",
8039
- "sender_username",
8040
- "mentions",
8041
- "sender_is_chat",
8042
- "timestamp",
8043
- "edited_at",
8044
- "text",
8045
- "outgoing",
8046
- "attachments",
8047
- "reply_to",
8048
- "reply_to_id",
8049
- "forwarded_from",
8050
- "thread_id",
8051
- "thread_root_id",
8052
- "scheduled_for",
8053
- "provider_metadata",
8054
- "delivery"
8055
- ]).entries,
8056
- reactions: nullable(message.entries.reactions.wrapped.wrapped),
8057
- starred: optional(boolean()),
8058
- email: optional(strictObject({ ...mailFields, reply_to: mailReplyTo })),
8059
- counter_observations: optional(partial(strictObject({
8060
- views: counterObservation,
8061
- reactions: counterObservation,
8062
- comments: counterObservation
8103
+ name: nullable(text),
8104
+ username: nullable(text),
8105
+ alias: optional(nullable(text)),
8106
+ display_name: optional(nullable(text)),
8107
+ /** Whatever they wrote about themselves. */
8108
+ description: nullable(text),
8109
+ /** The newest message in a one-to-one chat with them. */
8110
+ last_messaged_at: nullable(time),
8111
+ /** For a source that knows it, such as a Zoom contact. */
8112
+ email: optional(nullable(text)),
8113
+ phones: optional(array(strictObject({ number: text, label: nullable(text) }))),
8114
+ /** `contacts show`: the chats shared with them, and what the store holds of their messages in each. */
8115
+ chats: optional(array(strictObject({
8116
+ ...pick(chat, ["ref", "id", "title", "kind", "last_message_at"]).entries,
8117
+ /** Their messages stored; a floor unless `complete`. */
8118
+ their_messages: optional(count),
8119
+ first_at: optional(nullable(time)),
8120
+ last_at: optional(nullable(time)),
8121
+ /** The store holds the whole chat, so the count is the real one. */
8122
+ complete: optional(boolean())
8063
8123
  }))),
8064
- ...shortMessage.entries,
8065
- locator: reference
8066
- });
8067
- var contactMessages = strictObject({
8068
- person: strictObject({ uid: id, provider: text, id, name: nullable(text) }),
8069
- chats: array(strictObject({
8070
- chat: pick(chat, ["id", "title", "kind"]),
8071
- messages: array(union([shortMessage, identifiedMessage, fullMessage])),
8072
- complete: boolean(),
8073
- more: boolean()
8074
- })),
8075
- limits: strictObject({ messages: count })
8076
- });
8077
- var contactContext = union([context, contactMessages]);
8078
- var coverage = strictObject({
8079
- included: count,
8080
- has_more: boolean(),
8081
- cut_by: nullable(picklist(["limit", "bytes"]))
8082
- });
8083
- var meetingCue = strictObject({
8084
- reference,
8085
- fingerprint: text,
8086
- transcript_id: count,
8087
- content_hash: nullable(text),
8088
- position: count,
8089
- start_ms: count,
8090
- end_ms: count,
8091
- speaker_participant_id: nullable(count),
8092
- speaker_name: nullable(text),
8093
- text,
8094
- revision: picklist(["current", "superseded"])
8095
- });
8096
- var contactPreparation = strictObject({
8097
- ...context.entries,
8098
- prepare: strictObject({
8099
- waiting: array(strictObject({
8100
- provider: text,
8101
- account: id,
8102
- chat_id: id,
8103
- title: nullable(text),
8104
- message: contextMessage,
8105
- partial: boolean()
8106
- })),
8107
- tasks: array(strictObject({
8108
- ref: reference,
8109
- title: text,
8110
- role: text,
8111
- due_at: nullable(time),
8112
- project: reference,
8113
- source: nullable(reference),
8114
- created_at: time
8115
- })),
8116
- facts: array(strictObject({
8117
- ref: reference,
8118
- type: text,
8119
- statement: text,
8120
- subject: nullable(reference),
8121
- project: nullable(reference),
8122
- updated_at: time
8123
- })),
8124
- notes: array(strictObject({ ref: reference, title: nullable(text), text, revision: count, updated_at: time })),
8125
- meetings: array(strictObject({
8126
- reference,
8127
- cues: array(meetingCue),
8128
- cue_coverage: strictObject({ included: count, omitted: nullable(count), has_more: boolean() })
8129
- })),
8130
- limits: strictObject({ items: count, bytes: count }),
8131
- coverage: strictObject({
8132
- waiting: strictObject({
8133
- ...coverage.entries,
8134
- rule: literal("their message is the newest the store holds in a one-to-one chat")
8135
- }),
8136
- tasks: strictObject({
8137
- ...coverage.entries,
8138
- selection: literal("open, assigned to them in any role"),
8139
- accounts: array(text)
8140
- }),
8141
- facts: strictObject({
8142
- ...coverage.entries,
8143
- selection: literal("accepted, about them or a project they are a member of")
8144
- }),
8145
- notes: strictObject({
8146
- ...coverage.entries,
8147
- selection: literal("written by you, about them"),
8148
- withheld: optional(literal("contacts.notes.list"))
8149
- }),
8150
- meetings: strictObject({
8151
- ...coverage.entries,
8152
- read: literal("every account of the store that saw them"),
8153
- accounts: array(text),
8154
- pending: count
8155
- })
8156
- })
8157
- })
8124
+ /** `contacts show`: what the messenger says about them, or with `--offline` what the store saw of them. */
8125
+ ...partial(strictObject(profileFields)).entries,
8126
+ /** `contacts show --with-notes`: the owner's private notes about them. */
8127
+ notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
8158
8128
  });
8159
8129
 
8160
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
8130
+ // 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
8161
8131
  var contactNote = strictObject({
8162
8132
  id,
8163
8133
  /** The contact, as a `contact:` reference. */
@@ -8169,13 +8139,13 @@ var contactNote = strictObject({
8169
8139
  updated_at: time
8170
8140
  });
8171
8141
 
8172
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
8142
+ // 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
8173
8143
  var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
8174
8144
  var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
8175
8145
  var contactStateChange = strictObject({ operation_id: id, person_id: id });
8176
8146
  var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
8177
8147
 
8178
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/conversation.js
8148
+ // 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.js
8179
8149
  var conversation = strictObject({
8180
8150
  id,
8181
8151
  chat: reference,
@@ -8190,7 +8160,7 @@ var conversation = strictObject({
8190
8160
  rules_version: count
8191
8161
  });
8192
8162
 
8193
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
8163
+ // 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
8194
8164
  var conversationBuild = strictObject({
8195
8165
  chat: id,
8196
8166
  messages: count,
@@ -8215,7 +8185,7 @@ var catchUpPreparation = strictObject({
8215
8185
  prepared: optional(conversationPreparation)
8216
8186
  });
8217
8187
 
8218
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
8188
+ // 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
8219
8189
  var conversationDetails = union([
8220
8190
  strictObject({ ...conversation.entries, messages: array(message) }),
8221
8191
  message
@@ -8305,7 +8275,7 @@ var conversationHit = strictObject({
8305
8275
  stale: boolean()
8306
8276
  });
8307
8277
 
8308
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/counters.js
8278
+ // 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
8309
8279
  var counters = strictObject({
8310
8280
  cutoff: time,
8311
8281
  max_age_ms: milliseconds,
@@ -8335,97 +8305,7 @@ var counterRefresh = strictObject({
8335
8305
  complete: optional(boolean())
8336
8306
  });
8337
8307
 
8338
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/deal.js
8339
- var nullableText = nullable(text);
8340
- var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
8341
- var outcome = picklist(["open", "won", "lost"]);
8342
- var crmAccount = nullable(strictObject({ provider: text, account: text }));
8343
- var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
8344
- var deal = strictObject({
8345
- id,
8346
- ref: reference,
8347
- kind: picklist(["deal", "lead"]),
8348
- title: text,
8349
- /** One line with the stage, amount and status. */
8350
- summary: text,
8351
- pipeline: reference,
8352
- pipeline_name: text,
8353
- stage: text,
8354
- status: outcome,
8355
- organization: nullable(party),
8356
- currency: nullableText,
8357
- amount: nullableText,
8358
- close_date: day2,
8359
- closed_date: day2,
8360
- closed_reason: nullableText,
8361
- rank: nullable(number()),
8362
- /** A lead's deal, once it became one. */
8363
- deal: nullable(reference),
8364
- /** The CRM account it is a copy from; `null` for the owner's own. */
8365
- account: crmAccount,
8366
- external_id: nullableText,
8367
- /** A CRM copy's assignee, the identity `<account>/user/<id>`. */
8368
- assignee: nullableText,
8369
- /** A CRM copy's own fields by code; a list field's value is its option's label, `option_id` its id. */
8370
- provider_metadata: record(string(), strictObject({
8371
- label: nullable(string()),
8372
- value: unknown(),
8373
- option_id: optional(union([string(), array(string())]))
8374
- })),
8375
- people: array(strictObject({ ...party.entries, role: picklist(DEAL_ROLES) })),
8376
- author: strictObject({
8377
- type: picklist(["person", "bot"]),
8378
- id,
8379
- name: nullableText,
8380
- kind: nullable(picklist(["agent", "rule"]))
8381
- }),
8382
- model: nullableText,
8383
- source: text,
8384
- reason: nullableText,
8385
- evidence: array(reference),
8386
- project: nullable(reference),
8387
- project_name: nullableText,
8388
- created_at: time,
8389
- updated_at: time,
8390
- untrusted
8391
- });
8392
- var lead = deal;
8393
- var pipelineStage = strictObject({
8394
- name: text,
8395
- position: count,
8396
- outcome,
8397
- external_id: nullableText,
8398
- /** Open deals or leads in it now. */
8399
- open: count,
8400
- /** With a funnel: rows that got this far, and the share of them that reached the next stage. */
8401
- reached: optional(count),
8402
- conversion: optional(nullable(number())),
8403
- /** With a funnel: rows standing in it now, and their sum per currency, never converted. */
8404
- items: optional(count),
8405
- amounts: optional(array(strictObject({ amount: text, currency: text, items: count })))
8406
- });
8407
- var pipeline = strictObject({
8408
- id,
8409
- ref: reference,
8410
- name: text,
8411
- kind: picklist(["deal", "lead"]),
8412
- account: crmAccount,
8413
- external_id: nullableText,
8414
- stages: array(pipelineStage),
8415
- created_at: time,
8416
- totals: optional(strictObject({ items: count, open: count, won: count, lost: count, win_rate: nullable(number()) })),
8417
- since: optional(day2),
8418
- untrusted
8419
- });
8420
- var stage = strictObject({
8421
- ...pipelineStage.entries,
8422
- pipeline: reference,
8423
- pipeline_name: text,
8424
- kind: picklist(["deal", "lead"]),
8425
- untrusted
8426
- });
8427
-
8428
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/document.js
8308
+ // 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
8429
8309
  var document = strictObject({
8430
8310
  ref: reference,
8431
8311
  id,
@@ -8440,7 +8320,7 @@ var document = strictObject({
8440
8320
  owners: optional(array(text))
8441
8321
  });
8442
8322
 
8443
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/document-link.js
8323
+ // 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
8444
8324
  var documentLink = strictObject({
8445
8325
  ref: reference,
8446
8326
  url: text,
@@ -8451,7 +8331,7 @@ var documentLink = strictObject({
8451
8331
  sender: strictObject({ id: nullable(id), name: nullable(text) })
8452
8332
  });
8453
8333
 
8454
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/evidence.js
8334
+ // 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
8455
8335
  var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
8456
8336
  var contribution = strictObject({
8457
8337
  message: evidenceMessage,
@@ -8481,7 +8361,7 @@ var retentionStay = strictObject({
8481
8361
  });
8482
8362
  var evidence = union([contribution, retentionStay]);
8483
8363
 
8484
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/fact.js
8364
+ // 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
8485
8365
  var fact = strictObject({
8486
8366
  ref: reference,
8487
8367
  id,
@@ -8512,7 +8392,7 @@ var fact = strictObject({
8512
8392
  updated_at: time
8513
8393
  });
8514
8394
 
8515
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/hit.js
8395
+ // 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
8516
8396
  var hit = strictObject({
8517
8397
  kind: picklist(["message", "mail", "note", "document", "event", "meeting", "deal", "lead", ...BUSINESS_KINDS]),
8518
8398
  ref: reference,
@@ -8533,8 +8413,8 @@ var hit = strictObject({
8533
8413
  found_by: optional(array(picklist(["title", "words", "meaning"]))),
8534
8414
  /** How far into the meeting the passage is. */
8535
8415
  offset_ms: optional(nullable(count)),
8536
- /** A meeting passage's place: its transcript, chat or summary. */
8537
- scope: optional(picklist(["transcript", "chat", "summary"])),
8416
+ /** A meeting hit's place: its title, transcript, chat or summary. */
8417
+ scope: optional(picklist(["title", "transcript", "chat", "summary"])),
8538
8418
  /** A meeting transcript hit's cue, which `meetings passage` opens with the lines around it. */
8539
8419
  cue_ref: optional(reference),
8540
8420
  /** A meeting transcript hit's transcript language (`ru`, `en`…), `null` when unknown. */
@@ -8542,6 +8422,10 @@ var hit = strictObject({
8542
8422
  /** A meeting transcript hit's line, from 1, of `lines_total` lines in its transcript. */
8543
8423
  line: optional(pipe(count, minValue(1))),
8544
8424
  lines_total: optional(count),
8425
+ /** `corrected`: a meeting hit found only through a spelling speech recognition may have garbled. */
8426
+ match: optional(picklist(["corrected"])),
8427
+ /** For a `corrected` hit, the stored words each such query word matched. */
8428
+ corrections: optional(array(strictObject({ from: text, to: array(text) }))),
8545
8429
  /** A meeting passage's stored line, so two passages of one meeting stay apart; `search meetings` gives the same. */
8546
8430
  id: optional(pipe(string(), minLength(1))),
8547
8431
  /** A business hit's: `proposed` waits for the owner; a product or a wallet has no review and is `confirmed`. */
@@ -8554,7 +8438,7 @@ var hit = strictObject({
8554
8438
  untrusted
8555
8439
  });
8556
8440
 
8557
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/identity.js
8441
+ // 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
8558
8442
  var identity = strictObject({
8559
8443
  ref: reference,
8560
8444
  provider: text,
@@ -8563,11 +8447,14 @@ var identity = strictObject({
8563
8447
  id,
8564
8448
  name: nullable(text),
8565
8449
  username: nullable(text),
8450
+ /** The number or address the source gave for them, when it gave one. */
8451
+ phone: optional(nullable(text)),
8452
+ email: optional(nullable(text)),
8566
8453
  /** The `person:` they are linked to, when one is. */
8567
8454
  person: optional(nullable(reference))
8568
8455
  });
8569
8456
 
8570
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
8457
+ // 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
8571
8458
  var imageEmbedding = strictObject({
8572
8459
  model: text,
8573
8460
  embedded: count,
@@ -8576,13 +8463,13 @@ var imageEmbedding = strictObject({
8576
8463
  more: boolean()
8577
8464
  });
8578
8465
 
8579
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
8466
+ // 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
8580
8467
  import { spawn } from "node:child_process";
8581
- import { randomBytes as randomBytes2 } from "node:crypto";
8582
- import { closeSync, existsSync as existsSync5, mkdirSync as mkdirSync3, openSync, readdirSync as readdirSync4, readFileSync as readFileSync5, realpathSync, rmSync as rmSync3 } from "node:fs";
8468
+ import { randomBytes } from "node:crypto";
8469
+ import { closeSync, existsSync as existsSync6, mkdirSync as mkdirSync2, openSync, readdirSync as readdirSync3, readFileSync as readFileSync5, realpathSync, rmSync as rmSync2 } from "node:fs";
8583
8470
  import { dirname as dirname2, join as join5 } from "node:path";
8584
8471
 
8585
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/background/checkpoints.js
8472
+ // 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/background/checkpoints.js
8586
8473
  var progressOf = /* @__PURE__ */ __name((input) => {
8587
8474
  const total = input.total ?? null;
8588
8475
  const updated = input.updatedAt ?? null;
@@ -8598,7 +8485,7 @@ var progressOf = /* @__PURE__ */ __name((input) => {
8598
8485
  };
8599
8486
  }, "progressOf");
8600
8487
 
8601
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/runs/record-log.js
8488
+ // 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
8602
8489
  var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
8603
8490
  const run = currentRun();
8604
8491
  const trace = traceId ?? run.traceId;
@@ -8612,7 +8499,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
8612
8499
  }));
8613
8500
  }, "recordLogFor");
8614
8501
 
8615
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
8502
+ // 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
8616
8503
  var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
8617
8504
  var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
8618
8505
  const out = openSync(log, "a", 384);
@@ -8631,12 +8518,12 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
8631
8518
  var jobsDir = /* @__PURE__ */ __name((app, env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
8632
8519
  var jobPath = /* @__PURE__ */ __name((dir, id6) => join5(dir, `${id6}.json`), "jobPath");
8633
8520
  var saveJob = /* @__PURE__ */ __name((dir, job2) => {
8634
- mkdirSync3(dir, { recursive: true, mode: 448 });
8521
+ mkdirSync2(dir, { recursive: true, mode: 448 });
8635
8522
  writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
8636
8523
  `, 384);
8637
8524
  }, "saveJob");
8638
8525
  var readJob = /* @__PURE__ */ __name((dir, id6) => {
8639
- if (!/^[\w-]+$/.test(id6) || !existsSync5(jobPath(dir, id6)))
8526
+ if (!/^[\w-]+$/.test(id6) || !existsSync6(jobPath(dir, id6)))
8640
8527
  return void 0;
8641
8528
  try {
8642
8529
  return JSON.parse(readFileSync5(jobPath(dir, id6), "utf8"));
@@ -8676,12 +8563,12 @@ var updateJob = /* @__PURE__ */ __name((dir, id6, change) => {
8676
8563
  saveJob(dir, { ...job2, ...change });
8677
8564
  }, "updateJob");
8678
8565
  var removeJob = /* @__PURE__ */ __name((dir, job2) => {
8679
- rmSync3(jobPath(dir, job2.id), { force: true });
8680
- rmSync3(recordsPath(dir, job2.id), { force: true });
8566
+ rmSync2(jobPath(dir, job2.id), { force: true });
8567
+ rmSync2(recordsPath(dir, job2.id), { force: true });
8681
8568
  if (dirname2(job2.log) === dir)
8682
- rmSync3(job2.log, { force: true });
8569
+ rmSync2(job2.log, { force: true });
8683
8570
  }, "removeJob");
8684
- var listJobs = /* @__PURE__ */ __name((dir) => existsSync5(dir) ? readdirSync4(dir).filter((name) => name.endsWith(".json")).flatMap((name) => readJob(dir, name.slice(0, -".json".length)) ?? []).sort((a, b) => b.startedAt.localeCompare(a.startedAt)) : [], "listJobs");
8571
+ var listJobs = /* @__PURE__ */ __name((dir) => existsSync6(dir) ? readdirSync3(dir).filter((name) => name.endsWith(".json")).flatMap((name) => readJob(dir, name.slice(0, -".json".length)) ?? []).sort((a, b) => b.startedAt.localeCompare(a.startedAt)) : [], "listJobs");
8685
8572
  var jobDetails = /* @__PURE__ */ __name((job2) => ({
8686
8573
  job: job2.id,
8687
8574
  profile: job2.profile,
@@ -8745,8 +8632,8 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
8745
8632
  if (running)
8746
8633
  throw new CliError("validation_error", `job ${running.id} already works on this chat; inspect store jobs show first`);
8747
8634
  const startedAt = (/* @__PURE__ */ new Date()).toISOString();
8748
- const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes2(3).toString("hex")}`;
8749
- mkdirSync3(dir, { recursive: true, mode: 448 });
8635
+ const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes(3).toString("hex")}`;
8636
+ mkdirSync2(dir, { recursive: true, mode: 448 });
8750
8637
  const log = join5(dir, `${id6}.log`);
8751
8638
  const job2 = {
8752
8639
  id: id6,
@@ -8767,7 +8654,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
8767
8654
  return { job: id6, pid, chat: input.chat, log };
8768
8655
  }, "startArchiveJob");
8769
8656
 
8770
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/job.js
8657
+ // 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
8771
8658
  var problem = strictObject({ code: text, message: text });
8772
8659
  var job = strictObject({
8773
8660
  id,
@@ -8790,7 +8677,7 @@ var job = strictObject({
8790
8677
  error: optional(problem)
8791
8678
  });
8792
8679
 
8793
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/join-request.js
8680
+ // 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
8794
8681
  var joinRequest = strictObject({
8795
8682
  person_id: id,
8796
8683
  name: nullable(text),
@@ -8801,7 +8688,7 @@ var joinRequest = strictObject({
8801
8688
  about: optional(text)
8802
8689
  });
8803
8690
 
8804
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/list-results.js
8691
+ // 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
8805
8692
  var botProfile = strictObject({
8806
8693
  name: text,
8807
8694
  token: text,
@@ -8832,6 +8719,8 @@ var scheduledJob = strictObject({
8832
8719
  name: text,
8833
8720
  kind: picklist(["command", "agent"]),
8834
8721
  when: text,
8722
+ /** Kept without its timer: `schedule run` runs it, `schedule resume` puts it back on its timer. */
8723
+ paused: optional(literal(true)),
8835
8724
  /** When a finished run shows a desktop notice: `always`, `failures` or `never`; the default is shown, not left out. */
8836
8725
  notify: optional(picklist(["always", "failures", "never"])),
8837
8726
  /** Where a run's result is sent after it: `telegram-bot:<profile>/<chat>` or `email:<profile>/<address>`. */
@@ -8863,12 +8752,39 @@ var scheduledJob = strictObject({
8863
8752
  error: optional(text)
8864
8753
  })))
8865
8754
  })),
8866
- /** Agent schedules: what today's runs cost, in US dollars. */
8867
- spent_today_usd: optional(number()),
8868
- /** Agent schedules: the cap on one run (`--max-cost`), null when none. */
8755
+ /** Agent schedules: the agent it starts, as `schedule agents list` names it; null for a program no agent here runs. */
8756
+ harness: optional(nullable(text)),
8757
+ /** Agent schedules: whether the agent reports what a run cost; when it does not, the cost fields are null. */
8758
+ reports_cost: optional(boolean()),
8759
+ /** Agent schedules: what today's runs cost, in US dollars; null when the agent reports no cost (unknown, not 0). */
8760
+ spent_today_usd: optional(nullable(number())),
8761
+ /** Agent schedules: the cap on one run (`--max-cost`), null when none or when the agent reports no cost. */
8869
8762
  max_cost_usd: optional(nullable(number())),
8870
- /** Agent schedules: the daily cap in force, the schedule's `--max-cost-per-day` or the config's; 0 for none. */
8871
- max_cost_per_day_usd: optional(number())
8763
+ /**
8764
+ * Agent schedules: the daily cap in force, the schedule's `--max-cost-per-day` or the config's; 0 for none; null when
8765
+ * the agent reports no cost, so no cap can stop it.
8766
+ */
8767
+ max_cost_per_day_usd: optional(nullable(number()))
8768
+ });
8769
+ var scheduleHarness = strictObject({
8770
+ id: text,
8771
+ name: text,
8772
+ /** The program names it is found by on PATH, the first found wins. */
8773
+ programs: array(text),
8774
+ /** It reports what a run costs, so `--max-cost` and `--max-cost-per-day` hold. */
8775
+ reports_cost: boolean(),
8776
+ /** The agent's own limits hold a one-shot run to the CLIs' commands (claude, gemini, opencode). */
8777
+ restricted: boolean(),
8778
+ /** Why an agent that is not restricted is not, and what it may still do: a client shows it before the owner picks. */
8779
+ restricted_reason: nullable(text),
8780
+ /**
8781
+ * Not restricted, yet a schedule starts it once the owner accepts that with `--allow-dangerous` (codex, whose sandbox
8782
+ * blocks the network and most writes); refused without it (`agent.unrestricted`). False for the rest.
8783
+ */
8784
+ allowed_with_ack: boolean(),
8785
+ installed: boolean(),
8786
+ /** Where its program is, or null when it is not on PATH. */
8787
+ path: nullable(text)
8872
8788
  });
8873
8789
  var botTemplate = strictObject({
8874
8790
  name: nullable(text),
@@ -8896,7 +8812,7 @@ var stickerInventory = strictObject({
8896
8812
  url: optional(nullable(text))
8897
8813
  });
8898
8814
 
8899
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
8815
+ // 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
8900
8816
  var pollVote = strictObject({
8901
8817
  person_id: id,
8902
8818
  name: nullable(text),
@@ -8906,7 +8822,7 @@ var pollVote = strictObject({
8906
8822
  voted_at: time
8907
8823
  });
8908
8824
 
8909
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/listener.js
8825
+ // 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
8910
8826
  var reactions = unwrap(unwrap(message.entries.reactions));
8911
8827
  var observation = strictObject({
8912
8828
  value: pipe(number(), minValue(0)),
@@ -8948,7 +8864,7 @@ var serveSummary = strictObject({
8948
8864
  tasks: optional(strictObject({ added: count, closed: count, review: count }))
8949
8865
  });
8950
8866
 
8951
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
8867
+ // 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
8952
8868
  var mailCounts = strictObject({
8953
8869
  by: picklist(["day", "week", "sender"]),
8954
8870
  received: count,
@@ -8963,7 +8879,7 @@ var mailCounts = strictObject({
8963
8879
  }))
8964
8880
  });
8965
8881
 
8966
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
8882
+ // 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
8967
8883
  var evidence2 = strictObject({ reference, fingerprint: text });
8968
8884
  var base = { id, evidence: array(evidence2) };
8969
8885
  var finding = variant("kind", [
@@ -9107,7 +9023,7 @@ var mailFindings = strictObject({
9107
9023
  receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
9108
9024
  });
9109
9025
 
9110
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
9026
+ // 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
9111
9027
  var mediaArchive = strictObject({
9112
9028
  directory: text,
9113
9029
  chats: count,
@@ -9139,7 +9055,7 @@ var mediaArchiveTimer = union([
9139
9055
  strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
9140
9056
  ]);
9141
9057
 
9142
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
9058
+ // 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
9143
9059
  var preparationId = pipe(string(), minLength(1));
9144
9060
  var preparationCount = pipe(number(), integer(), minValue(0));
9145
9061
  var preparationTime = nullable(isoTime);
@@ -9231,7 +9147,7 @@ var preparationMeeting = strictObject({
9231
9147
  updated_at: isoTime
9232
9148
  });
9233
9149
 
9234
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
9150
+ // 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
9235
9151
  var meetingEvidence = preparationEvidence;
9236
9152
  var meetingPersonContext = strictObject({
9237
9153
  person: strictObject({ uid: string(), name: nullable(string()) }),
@@ -9253,7 +9169,7 @@ var meetingPersonContext = strictObject({
9253
9169
  })
9254
9170
  });
9255
9171
 
9256
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
9172
+ // 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
9257
9173
  var evidence3 = strictObject({ reference, fingerprint: text });
9258
9174
  var base2 = { id, project: reference, evidence: array(evidence3) };
9259
9175
  var finding2 = variant("kind", [
@@ -9291,7 +9207,7 @@ var meetingFindings = strictObject({
9291
9207
  receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome3) }))
9292
9208
  });
9293
9209
 
9294
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
9210
+ // 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
9295
9211
  var communicationCoverage = strictObject({
9296
9212
  read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
9297
9213
  query: string(),
@@ -9336,7 +9252,7 @@ var preparationCommunications = strictObject({
9336
9252
  }))
9337
9253
  });
9338
9254
 
9339
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
9255
+ // 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
9340
9256
  var meetingPreparation = strictObject({
9341
9257
  communications: optional(preparationCommunications),
9342
9258
  schema_version: literal(1),
@@ -9449,7 +9365,7 @@ var meetingPreparation = strictObject({
9449
9365
  })
9450
9366
  });
9451
9367
 
9452
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
9368
+ // 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
9453
9369
  var count4 = pipe(number(), integer(), minValue(0));
9454
9370
  var id3 = pipe(string(), minLength(1));
9455
9371
  var text3 = string();
@@ -9513,7 +9429,7 @@ var meetingProjectCandidates = strictObject({
9513
9429
  })
9514
9430
  });
9515
9431
 
9516
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
9432
+ // 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
9517
9433
  var count5 = pipe(number(), integer(), minValue(0));
9518
9434
  var id4 = pipe(string(), minLength(1), maxLength(1e3));
9519
9435
  var meetingSeriesInventory = strictObject({
@@ -9543,7 +9459,7 @@ var meetingSeriesInventory = strictObject({
9543
9459
  })
9544
9460
  });
9545
9461
 
9546
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
9462
+ // 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
9547
9463
  var text4 = string();
9548
9464
  var id5 = pipe(number(), integer(), minValue(1));
9549
9465
  var revision = picklist(["current", "superseded"]);
@@ -9560,7 +9476,7 @@ var meetingTaskProposal = strictObject({
9560
9476
  persistence: literal("proposal-only")
9561
9477
  });
9562
9478
 
9563
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/memory.js
9479
+ // 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
9564
9480
  var memory = strictObject({
9565
9481
  ref: reference,
9566
9482
  id,
@@ -9588,9 +9504,9 @@ var memory = strictObject({
9588
9504
  updated_at: time
9589
9505
  });
9590
9506
 
9591
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/mention.js
9507
+ // 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
9592
9508
  var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
9593
- var status = picklist(["found", "linked", "dismissed"]);
9509
+ var status = picklist(["found", "linked", "proposed", "dismissed"]);
9594
9510
  var mention = strictObject({
9595
9511
  id: count,
9596
9512
  kind,
@@ -9620,7 +9536,8 @@ var mentionDecision = strictObject({
9620
9536
  value: text,
9621
9537
  status,
9622
9538
  target: nullable(reference),
9623
- mentions: count
9539
+ mentions: count,
9540
+ proposal: optional(text)
9624
9541
  });
9625
9542
  var mentionRebuild = strictObject({
9626
9543
  messages: count,
@@ -9631,13 +9548,13 @@ var mentionRebuild = strictObject({
9631
9548
  mentions: count
9632
9549
  });
9633
9550
 
9634
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/message-change.js
9551
+ // 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
9635
9552
  var operated3 = { operation_id: id, chat_id: id };
9636
9553
  var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
9637
9554
  var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
9638
9555
  var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
9639
9556
 
9640
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/message-read.js
9557
+ // 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
9641
9558
  var messageTranscript = strictObject({
9642
9559
  message_id: id,
9643
9560
  text,
@@ -9695,7 +9612,7 @@ var evidencePacket = strictObject({
9695
9612
  }))
9696
9613
  });
9697
9614
 
9698
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/message-context.js
9615
+ // 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
9699
9616
  var messageThread = strictObject({
9700
9617
  ref: reference,
9701
9618
  chat: id,
@@ -9712,7 +9629,7 @@ var messageThread = strictObject({
9712
9629
  });
9713
9630
  var messageContext = union([message, messageThread]);
9714
9631
 
9715
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
9632
+ // 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
9716
9633
  var messageCounts = strictObject({
9717
9634
  by: picklist(["chat", "sender", "day", "hour"]),
9718
9635
  total: count,
@@ -9725,7 +9642,7 @@ var messageCounts = strictObject({
9725
9642
  }))
9726
9643
  });
9727
9644
 
9728
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/message-link.js
9645
+ // 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
9729
9646
  var messageLink = strictObject({
9730
9647
  ref: reference,
9731
9648
  url: nullable(text),
@@ -9742,7 +9659,7 @@ var messageLink = strictObject({
9742
9659
  })))
9743
9660
  });
9744
9661
 
9745
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
9662
+ // 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
9746
9663
  var savedMessageFile = strictObject({
9747
9664
  kind: text,
9748
9665
  path: text,
@@ -9822,14 +9739,14 @@ var messageSyncAll = strictObject({
9822
9739
  issue: optional(actionableError),
9823
9740
  limited: optional(historyLimited)
9824
9741
  })),
9825
- /** How many chats the history limits left unread (big groups) or read only to the window's start. */
9826
- limited: optional(strictObject({ group_too_large: count, older_than_window: count })),
9742
+ /** How many chats the history limits left unread (big groups) or read only to the window's start; muted, unread. */
9743
+ limited: optional(strictObject({ group_too_large: count, older_than_window: count, muted: optional(count) })),
9827
9744
  tasks
9828
9745
  });
9829
9746
  var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
9830
9747
  var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
9831
9748
 
9832
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/message-write.js
9749
+ // 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
9833
9750
  var messageWrite = strictObject({
9834
9751
  operation_id: id,
9835
9752
  message,
@@ -9844,7 +9761,7 @@ var draftWrite = strictObject({
9844
9761
  });
9845
9762
  var messageSend = union([messageWrite, draftWrite]);
9846
9763
 
9847
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/model.js
9764
+ // 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
9848
9765
  var model2 = strictObject({
9849
9766
  id,
9850
9767
  kind: picklist(["audio", "text", "image", "reranker"]),
@@ -9852,7 +9769,7 @@ var model2 = strictObject({
9852
9769
  /** Which languages it reads, in words. */
9853
9770
  languages: text,
9854
9771
  licence: optional(text),
9855
- /** A text model's licence terms to accept with `models download --accept-terms`. */
9772
+ /** A text model's licence page, for a model under conditions of its own (`NOTICE` beside its files says the same). */
9856
9773
  terms: optional(text),
9857
9774
  /** A text model's size next to the others: small is fastest, large reads best. */
9858
9775
  size: optional(picklist(["small", "medium", "large"])),
@@ -9879,7 +9796,7 @@ var chosenModel = strictObject({
9879
9796
  estimate_seconds: nullable(count)
9880
9797
  });
9881
9798
 
9882
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/model-key.js
9799
+ // 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
9883
9800
  var source = picklist(["environment", "keyring", "file"]);
9884
9801
  var modelKey = strictObject({
9885
9802
  provider: text,
@@ -9889,7 +9806,7 @@ var modelKey = strictObject({
9889
9806
  var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
9890
9807
  var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
9891
9808
 
9892
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
9809
+ // 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
9893
9810
  var versus = strictObject({ current: number(), previous: number() });
9894
9811
  var person = { person_ref: reference, name: nullable(text) };
9895
9812
  var graph = strictObject({
@@ -9923,14 +9840,14 @@ var officialStats = strictObject({
9923
9840
  graphs: record(string(), union([graph, strictObject({ error: text })]))
9924
9841
  });
9925
9842
 
9926
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/person.js
9843
+ // 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
9927
9844
  var person2 = strictObject({
9928
9845
  ref: reference,
9929
9846
  name: nullable(text),
9930
9847
  identities: optional(array(identity))
9931
9848
  });
9932
9849
 
9933
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/poll.js
9850
+ // 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
9934
9851
  var poll = strictObject({
9935
9852
  chat_id: id,
9936
9853
  message_id: id,
@@ -9946,11 +9863,11 @@ var poll = strictObject({
9946
9863
  });
9947
9864
  var pollChange = strictObject({ operation_id: id, poll });
9948
9865
 
9949
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
9866
+ // 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
9950
9867
  var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
9951
9868
  var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
9952
9869
 
9953
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/ranking.js
9870
+ // 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
9954
9871
  var figures = record(string(), number());
9955
9872
  var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
9956
9873
  var rankingRow = strictObject({
@@ -9997,7 +9914,7 @@ var ranking = strictObject({
9997
9914
  rows: array(rankingRow)
9998
9915
  });
9999
9916
 
10000
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/reaction.js
9917
+ // 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
10001
9918
  var reaction = strictObject({
10002
9919
  person: strictObject({ id, name: nullable(text), username: nullable(text) }),
10003
9920
  /** The emoji, or `custom:<id>` for a custom one. */
@@ -10005,7 +9922,7 @@ var reaction = strictObject({
10005
9922
  reacted_at: time
10006
9923
  });
10007
9924
 
10008
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
9925
+ // 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
10009
9926
  var reactionChange = strictObject({
10010
9927
  operation_id: id,
10011
9928
  chat_id: id,
@@ -10013,7 +9930,7 @@ var reactionChange = strictObject({
10013
9930
  reaction: nullable(text)
10014
9931
  });
10015
9932
 
10016
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/recipient.js
9933
+ // 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
10017
9934
  var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
10018
9935
  var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
10019
9936
  var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
@@ -10024,7 +9941,7 @@ var recipientChange = strictObject({
10024
9941
  ...partial(recipientOff).entries
10025
9942
  });
10026
9943
 
10027
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
9944
+ // 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
10028
9945
  var events = array(record(string(), unknown()));
10029
9946
  var recordedRun = strictObject({
10030
9947
  run_id: id,
@@ -10096,7 +10013,7 @@ var runHit = strictObject({
10096
10013
  });
10097
10014
  var runLocation = strictObject({ path: text });
10098
10015
 
10099
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/relationship.js
10016
+ // 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
10100
10017
  var relationship = strictObject({
10101
10018
  id,
10102
10019
  from: reference,
@@ -10116,10 +10033,14 @@ var relationship = strictObject({
10116
10033
  position: nullable(text),
10117
10034
  starts_at: nullable(time),
10118
10035
  ends_at: nullable(time),
10036
+ /** The source account that reported it, `<provider>:<account>`. */
10037
+ account: optional(text),
10038
+ /** How a source made it when it stated none, such as `department-head`. */
10039
+ derived: optional(text),
10119
10040
  created_at: time
10120
10041
  });
10121
10042
 
10122
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
10043
+ // 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
10123
10044
  var milliseconds2 = nullable(pipe(number(), minValue(0)));
10124
10045
  var figures2 = { replies: count, median_ms: milliseconds2, p90_ms: milliseconds2, mean_ms: milliseconds2 };
10125
10046
  var responseTimes = strictObject({
@@ -10136,7 +10057,7 @@ var waitingChats = strictObject({
10136
10057
  by_kind: strictObject({ private: count, group: count })
10137
10058
  });
10138
10059
 
10139
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/retention.js
10060
+ // 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
10140
10061
  var retentionCohort = strictObject({
10141
10062
  /** The first day of the joining day or week. */
10142
10063
  cohort: text,
@@ -10184,7 +10105,7 @@ var retention = strictObject({
10184
10105
  rows: array(retentionCohort)
10185
10106
  });
10186
10107
 
10187
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
10108
+ // 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
10188
10109
  var savedSearch = strictObject({
10189
10110
  id,
10190
10111
  /** `null` for a run in the history. */
@@ -10201,7 +10122,7 @@ var savedSearch = strictObject({
10201
10122
  });
10202
10123
  var searchHistoryClear = strictObject({ cleared: count });
10203
10124
 
10204
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
10125
+ // 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
10205
10126
  var sendAttempt = strictObject({
10206
10127
  at: time,
10207
10128
  profile: text,
@@ -10229,7 +10150,7 @@ var sendAttempt = strictObject({
10229
10150
  error_code: optional(text)
10230
10151
  });
10231
10152
 
10232
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
10153
+ // 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
10233
10154
  var absent = strictObject({ path: text, exists: literal(false) });
10234
10155
  var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
10235
10156
  var infoSchema = strictObject({
@@ -10403,6 +10324,15 @@ var storeRestore = union([
10403
10324
  foreign_key_violations: count
10404
10325
  })
10405
10326
  ]);
10327
+ var importCounts = strictObject({ chats: count, messages: count });
10328
+ var storeImport = strictObject({
10329
+ store: text,
10330
+ profile: text,
10331
+ account: text,
10332
+ imported: boolean(),
10333
+ file: strictObject({ chats: count, people: count, messages: count }),
10334
+ added: optional(importCounts)
10335
+ });
10406
10336
  var storeReset = union([
10407
10337
  strictObject({ ...absent.entries, reset: literal(false) }),
10408
10338
  strictObject({
@@ -10450,7 +10380,7 @@ var storeRepair = union([
10450
10380
  ]);
10451
10381
  var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
10452
10382
 
10453
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/store-records.js
10383
+ // 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
10454
10384
  var range = strictObject({ from: number(), to: number() });
10455
10385
  var storeChatStatus = strictObject({
10456
10386
  chat_id: id,
@@ -10548,7 +10478,7 @@ var storeJobRetry = union([
10548
10478
  ]);
10549
10479
  var storeJobClear = strictObject({ cleared: array(id) });
10550
10480
 
10551
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/store-table.js
10481
+ // 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
10552
10482
  var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
10553
10483
  var storeTable = strictObject({
10554
10484
  name: text,
@@ -10557,7 +10487,7 @@ var storeTable = strictObject({
10557
10487
  bytes: optional(nullable(count))
10558
10488
  });
10559
10489
 
10560
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
10490
+ // 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
10561
10491
  var tagTarget = variant("type", [
10562
10492
  strictObject({ type: literal("chat"), chat_id: id }),
10563
10493
  strictObject({ type: literal("contact"), person_id: id }),
@@ -10588,7 +10518,7 @@ var automaticTags = strictObject({
10588
10518
  dry_run: boolean()
10589
10519
  });
10590
10520
 
10591
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/tagging.js
10521
+ // 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/tagging.js
10592
10522
  var tagging = strictObject({
10593
10523
  tag: text,
10594
10524
  type: picklist(TAG_TYPES),
@@ -10601,7 +10531,7 @@ var tagging = strictObject({
10601
10531
  created_at: time
10602
10532
  });
10603
10533
 
10604
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
10534
+ // 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
10605
10535
  var side = strictObject({ ref: reference, key: text, title: text, status: text });
10606
10536
  var taskPair = strictObject({
10607
10537
  task: nullable(side),
@@ -10624,7 +10554,7 @@ var taskPair = strictObject({
10624
10554
  created_at: time
10625
10555
  });
10626
10556
 
10627
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/task-results.js
10557
+ // 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
10628
10558
  var nullableTime = nullable(time);
10629
10559
  var link = strictObject({
10630
10560
  id,
@@ -10798,19 +10728,19 @@ var taskReview = strictObject({
10798
10728
  untrusted
10799
10729
  });
10800
10730
 
10801
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/template.js
10731
+ // 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
10802
10732
  var template = strictObject({
10803
10733
  key: text,
10804
10734
  channel: picklist(["telegram", "email", "text"]),
10805
10735
  language: text,
10806
10736
  about: text,
10807
10737
  renders: boolean(),
10808
- source: picklist(["stored", "default"]),
10738
+ source: picklist(["stored", "inherited", "default"]),
10809
10739
  updated_at: nullable(time),
10810
10740
  updated_by: nullable(text)
10811
10741
  });
10812
10742
 
10813
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/topic.js
10743
+ // 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
10814
10744
  var topic = strictObject({
10815
10745
  id,
10816
10746
  title: text,
@@ -10824,7 +10754,7 @@ var topic = strictObject({
10824
10754
  untrusted
10825
10755
  });
10826
10756
 
10827
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/entities/index.js
10757
+ // 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
10828
10758
  var ENTITIES = {
10829
10759
  sync_progress: progress,
10830
10760
  deal,
@@ -10896,6 +10826,10 @@ var ENTITIES = {
10896
10826
  identity,
10897
10827
  contact_context: contactContext,
10898
10828
  contact_preparation: contactPreparation,
10829
+ person_context: personContext,
10830
+ organization_context: organizationContext,
10831
+ deal_context: dealContext,
10832
+ "deal_context.brief": dealBrief,
10899
10833
  contact_activity: contactActivity,
10900
10834
  contact_check: contactCheck,
10901
10835
  linked_person: linkedPerson,
@@ -10927,6 +10861,7 @@ var ENTITIES = {
10927
10861
  topic_icon: topicIcon,
10928
10862
  bot_webhook: botWebhook,
10929
10863
  scheduled_job: scheduledJob,
10864
+ schedule_harness: scheduleHarness,
10930
10865
  call_record: callRecord,
10931
10866
  sticker_inventory: stickerInventory,
10932
10867
  note,
@@ -11047,6 +10982,7 @@ var ENTITIES = {
11047
10982
  store_decrypt: storeDecrypt,
11048
10983
  store_restore: storeRestore,
11049
10984
  store_reset: storeReset,
10985
+ store_import: storeImport,
11050
10986
  store_repair: storeRepair,
11051
10987
  store_copy_removal: storeCopyRemoval,
11052
10988
  store_table: storeTable,
@@ -11109,11 +11045,11 @@ var ENTITIES = {
11109
11045
  template
11110
11046
  };
11111
11047
  var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.entries(ENTITIES).map(([name, schema2]) => {
11112
- const { $schema: _, ...definition } = jsonSchemaOf(schema2);
11048
+ const { $schema: _2, ...definition } = jsonSchemaOf(schema2);
11113
11049
  return [name, definition];
11114
11050
  })), "entityDefinitions");
11115
11051
 
11116
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
11052
+ // 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
11117
11053
  var schemas = /* @__PURE__ */ new WeakMap();
11118
11054
  var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
11119
11055
  if (Object.hasOwn(ENTITIES, name))
@@ -11147,7 +11083,7 @@ var answerRow = /* @__PURE__ */ __name((command) => {
11147
11083
  return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
11148
11084
  }, "answerRow");
11149
11085
 
11150
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/images/picture/models.js
11086
+ // 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/images/picture/models.js
11151
11087
  import { join as join6 } from "node:path";
11152
11088
  var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
11153
11089
  var IMAGE_MODELS = [
@@ -11201,7 +11137,7 @@ var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedM
11201
11137
  var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file, join6(directory, model3.id, file.name)]), "placedImage");
11202
11138
  var isImageModelInstalled = /* @__PURE__ */ __name((model3, directory) => filesPresent(placedImage(model3, directory)), "isImageModelInstalled");
11203
11139
 
11204
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/steps.js
11140
+ // 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
11205
11141
  var STEPS2 = defineSteps([
11206
11142
  ...STEPS,
11207
11143
  {
@@ -11420,12 +11356,6 @@ var STEPS2 = defineSteps([
11420
11356
  command: "store recover",
11421
11357
  args: [],
11422
11358
  why: "the store file is damaged; this says what is lost and the commands that recover it"
11423
- },
11424
- {
11425
- id: "search.meetings",
11426
- command: "*",
11427
- args: [{ name: "max_meetings", required: true }],
11428
- why: "stopped after {scanned} meetings; more may match"
11429
11359
  }
11430
11360
  ]);
11431
11361
  var nextStep = /* @__PURE__ */ __name((id6, input) => {
@@ -11488,7 +11418,7 @@ var stepLine = /* @__PURE__ */ __name((root, step2) => {
11488
11418
  ].join(" ");
11489
11419
  }, "stepLine");
11490
11420
 
11491
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
11421
+ // 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
11492
11422
  var where = [{ field: "ref" }];
11493
11423
  var who2 = { field: ["who.owner", "who.name"], tag: "you" };
11494
11424
  var ON_CHAT_ROW = /* @__PURE__ */ new Set(["reply-next", "coverage"]);
@@ -11580,7 +11510,7 @@ var STATUS_ROWS = {
11580
11510
  "status.failed": { columns: [{ field: "signal" }], text: ["why"] }
11581
11511
  };
11582
11512
 
11583
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/compact.js
11513
+ // 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
11584
11514
  var TEXT_CHARS = 400;
11585
11515
  var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
11586
11516
  var messageRow = {
@@ -11822,8 +11752,8 @@ var dayColumn = /* @__PURE__ */ __name((rows2, shape, hoisted) => {
11822
11752
  const dates = rows2.map(({ cells }) => cells[index]?.date);
11823
11753
  if (dates.some((one) => one === void 0))
11824
11754
  return -1;
11825
- const days2 = dates;
11826
- return ordered(days2) && new Set(days2).size * 3 <= days2.length ? index : -1;
11755
+ const days = dates;
11756
+ return ordered(days) && new Set(days).size * 3 <= days.length ? index : -1;
11827
11757
  }, "dayColumn");
11828
11758
  var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
11829
11759
  const dates = [];
@@ -11839,7 +11769,7 @@ var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
11839
11769
  const firstColumn = shape.columns[0];
11840
11770
  const refs = rows2.map(({ item }) => item && firstColumn ? firstSet(item, firstColumn.field) : void 0);
11841
11771
  const prefix = sharedPrefix(refs.map((ref) => typeof ref === "string" ? ref : void 0));
11842
- const hoisted = rows2.length < 2 ? [] : shape.columns.map((_, index) => index > 0 && sameEverywhere(rows2, index));
11772
+ const hoisted = rows2.length < 2 ? [] : shape.columns.map((_2, index) => index > 0 && sameEverywhere(rows2, index));
11843
11773
  const named2 = hoisted.flatMap((hoist, index) => {
11844
11774
  const column = shape.columns[index];
11845
11775
  const item = rows2[0]?.item;
@@ -11946,11 +11876,11 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
11946
11876
  return lines.concat(footerOf(body)).join("\n");
11947
11877
  }, "compactText");
11948
11878
 
11949
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
11879
+ // 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
11950
11880
  var SOFT_OUTPUT_BYTES = 256 * 1024;
11951
11881
  var CARRIED = ["json", "compact", "offline", "timeout", "full", "brief", "maxOutputBytes"];
11952
11882
  var NOT_WITH_COMPACT = /* @__PURE__ */ new Set(["json", "brief"]);
11953
- var snake3 = /* @__PURE__ */ __name((name) => name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
11883
+ var snake2 = /* @__PURE__ */ __name((name) => name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
11954
11884
  var typed = /* @__PURE__ */ __name((command, key) => command.getOptionValueSource(key) === "cli", "typed");
11955
11885
  var typedArgs = /* @__PURE__ */ __name((command) => {
11956
11886
  const root = rootOf2(command);
@@ -11963,8 +11893,8 @@ var typedArgs = /* @__PURE__ */ __name((command) => {
11963
11893
  const word = Array.isArray(value) ? value.join(" ") : value;
11964
11894
  return word === void 0 || word === "" ? [] : [[argument.name(), word]];
11965
11895
  });
11966
- const own = command.options.map((option) => option.attributeName()).filter((key) => typed(command, key)).map((key) => [snake3(key), command.getOptionValue(key)]);
11967
- const global = CARRIED.filter((key) => typed(root, key)).map((key) => [snake3(key), root.getOptionValue(key)]);
11896
+ const own = command.options.map((option) => option.attributeName()).filter((key) => typed(command, key)).map((key) => [snake2(key), command.getOptionValue(key)]);
11897
+ const global = CARRIED.filter((key) => typed(root, key)).map((key) => [snake2(key), root.getOptionValue(key)]);
11968
11898
  return Object.fromEntries([...positional, ...own, ...global]);
11969
11899
  }, "typedArgs");
11970
11900
  var declaresRow = /* @__PURE__ */ __name((command) => {
@@ -12004,7 +11934,7 @@ var largeAnswerSteps = /* @__PURE__ */ __name((command) => {
12004
11934
  return args ? compactStep(command, args, "the answer is large as JSON; one line per item keeps every ref") : [];
12005
11935
  }, "largeAnswerSteps");
12006
11936
 
12007
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
11937
+ // 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
12008
11938
  var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
12009
11939
  var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
12010
11940
  var strip = /* @__PURE__ */ __name((value) => {
@@ -12018,7 +11948,91 @@ var strip = /* @__PURE__ */ __name((value) => {
12018
11948
  return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
12019
11949
  }, "strip");
12020
11950
 
12021
- // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/cli/envelope.js
11951
+ // 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
11952
+ var OPEN = "\u27E6";
11953
+ var CLOSE = "\u27E7";
11954
+ var untrustedMarkOf = /* @__PURE__ */ __name((app, env) => {
11955
+ if (readOnlyLockOf(app, env) === void 0)
11956
+ return void 0;
11957
+ const mark = ancestorValue(envName(app, "UNTRUSTED_MARK"), env);
11958
+ return mark && /^[0-9a-f]{16}$/.test(mark) ? mark : void 0;
11959
+ }, "untrustedMarkOf");
11960
+ var marked = /* @__PURE__ */ __name((text5, mark, source2, id6) => {
11961
+ const inside = text5.replaceAll(OPEN, "").replaceAll(CLOSE, "").replaceAll(mark, "");
11962
+ const named2 = id6 === void 0 ? "" : ` id=${id6.replaceAll(OPEN, "").replaceAll(CLOSE, "").replace(/\s/g, "")}`;
11963
+ return `${OPEN}untrusted:${mark} source=${source2}${named2}${CLOSE}${inside}${OPEN}/untrusted:${mark}${CLOSE}`;
11964
+ }, "marked");
11965
+ var idOf = /* @__PURE__ */ __name((value) => {
11966
+ const id6 = value.ref ?? value.id;
11967
+ return typeof id6 === "string" || typeof id6 === "number" ? String(id6) : void 0;
11968
+ }, "idOf");
11969
+ var markAt = /* @__PURE__ */ __name((value, path2, mark, source2, id6) => {
11970
+ if (Array.isArray(value))
11971
+ return value.map((one) => markAt(one, path2, mark, source2, id6));
11972
+ if (path2.length === 0)
11973
+ return typeof value === "string" && !value.startsWith(`${OPEN}untrusted:${mark} `) ? marked(value, mark, source2, id6) : value;
11974
+ if (value === null || typeof value !== "object")
11975
+ return value;
11976
+ const [key = "", ...rest] = path2;
11977
+ const record2 = value;
11978
+ if (!(key in record2))
11979
+ return value;
11980
+ return { ...record2, [key]: markAt(record2[key], rest, mark, source2, idOf(record2) ?? id6) };
11981
+ }, "markAt");
11982
+ var withUntrustedMarked = /* @__PURE__ */ __name((value, mark, id6) => {
11983
+ if (Array.isArray(value))
11984
+ return value.map((one) => withUntrustedMarked(one, mark, id6));
11985
+ if (value === null || typeof value !== "object")
11986
+ return value;
11987
+ const record2 = value;
11988
+ const own = idOf(record2) ?? id6;
11989
+ let result = Object.fromEntries(Object.entries(record2).map(([key, child]) => [
11990
+ key,
11991
+ key === "untrusted" ? child : withUntrustedMarked(child, mark, own)
11992
+ ]));
11993
+ const fields = Array.isArray(record2.untrusted) ? record2.untrusted.filter((one) => typeof one === "string") : [];
11994
+ for (const field of fields)
11995
+ result = markAt(result, field.split("."), mark, field, own);
11996
+ return result;
11997
+ }, "withUntrustedMarked");
11998
+ var MESSAGE_UNTRUSTED = [
11999
+ "text",
12000
+ "transcript",
12001
+ "excerpt",
12002
+ "sender_name",
12003
+ "sender_username",
12004
+ "chat_title",
12005
+ "subject",
12006
+ "snippet",
12007
+ "attachments.name",
12008
+ "attachments.title",
12009
+ "attachments.text",
12010
+ "from.name",
12011
+ "to.name",
12012
+ "cc.name",
12013
+ "bcc.name",
12014
+ "reply_addresses.name"
12015
+ ];
12016
+ var DECLARED = /* @__PURE__ */ new WeakMap();
12017
+ var marksUntrusted = /* @__PURE__ */ __name((command, fields = MESSAGE_UNTRUSTED) => {
12018
+ DECLARED.set(command, fields);
12019
+ return command;
12020
+ }, "marksUntrusted");
12021
+ var untrustedFieldsOf = /* @__PURE__ */ __name((command) => DECLARED.get(command), "untrustedFieldsOf");
12022
+ var withFieldsMarked = /* @__PURE__ */ __name((value, fields, mark, id6) => {
12023
+ if (Array.isArray(value))
12024
+ return value.map((one) => withFieldsMarked(one, fields, mark, id6));
12025
+ if (value === null || typeof value !== "object")
12026
+ return value;
12027
+ const record2 = value;
12028
+ const own = idOf(record2) ?? id6;
12029
+ let result = Object.fromEntries(Object.entries(record2).map(([key, child]) => [key, withFieldsMarked(child, fields, mark, own)]));
12030
+ for (const field of fields)
12031
+ result = markAt(result, field.split("."), mark, field, own);
12032
+ return result;
12033
+ }, "withFieldsMarked");
12034
+
12035
+ // 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
12022
12036
  var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
12023
12037
  var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
12024
12038
  var listOf = /* @__PURE__ */ __name((command, input) => {
@@ -12061,7 +12075,7 @@ var itemOf = /* @__PURE__ */ __name((item, { next = [], missing, meta } = {}) =>
12061
12075
  };
12062
12076
  return body;
12063
12077
  }, "itemOf");
12064
- var snake4 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
12078
+ var snake3 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
12065
12079
  var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
12066
12080
  const kept = new Set(verbatim);
12067
12081
  const convert = /* @__PURE__ */ __name((value) => {
@@ -12072,7 +12086,7 @@ var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
12072
12086
  return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => {
12073
12087
  if (inner === void 0)
12074
12088
  return [];
12075
- const name = snake4(key);
12089
+ const name = snake3(key);
12076
12090
  return [[name, kept.has(key) || kept.has(name) ? inner : convert(inner)]];
12077
12091
  }));
12078
12092
  }, "convert");
@@ -12130,7 +12144,11 @@ var renderAnswer = /* @__PURE__ */ __name((command, { renderer, format, streams,
12130
12144
  const root = rootOf2(command);
12131
12145
  const runnableSteps = runnable(root, body.next);
12132
12146
  const next = environmentOf(command).agent ? runnableSteps : withLines(root, runnableSteps);
12133
- const kept = withoutProviderRefs({ ...body, ...next.length > 0 ? { next } : {} });
12147
+ const { app, env } = environmentOf(command);
12148
+ const mark = app ? untrustedMarkOf(app, env ?? process.env) : void 0;
12149
+ const declared = untrustedFieldsOf(command);
12150
+ const shown = mark === void 0 ? body : withUntrustedMarked(declared ? withFieldsMarked(body, declared, mark) : body, mark);
12151
+ const kept = withoutProviderRefs({ ...shown, ...next.length > 0 ? { next } : {} });
12134
12152
  if (next.length === 0)
12135
12153
  delete kept.next;
12136
12154
  const sealedBody = sealed(kept);
@@ -12171,37 +12189,22 @@ var printItem = /* @__PURE__ */ __name(({ renderer, format }, item) => {
12171
12189
  }, "printItem");
12172
12190
 
12173
12191
  export {
12174
- endpoint,
12175
12192
  modelTarget,
12176
12193
  envName,
12194
+ ancestorValue,
12177
12195
  readOnlyLockOf,
12178
12196
  mailHolderVariable,
12179
12197
  MESSENGER_CHANGE_REFUSAL,
12180
12198
  readOnlyRefusal,
12181
- logAttributes,
12182
- fromLogAttributes,
12183
- LOG_ATTRIBUTES,
12184
- runsDirFor,
12185
- runtime,
12186
- newRunId,
12187
- listRuns,
12188
- findRun,
12189
- readEvents,
12190
- currentRun,
12191
- inRun,
12192
- runEvent,
12193
- typedCommand,
12194
- useAsProcessRun,
12195
- processRun,
12196
- enclosingTraceId,
12197
- traceOf,
12198
- childTrace,
12199
- withAttempt,
12200
- currentAttempt,
12201
12199
  recordLogFor,
12202
12200
  parseDuration,
12201
+ WEIGHTS,
12202
+ LINK,
12203
+ oddName,
12203
12204
  member,
12204
12205
  chat,
12206
+ attachment,
12207
+ message,
12205
12208
  botProfile,
12206
12209
  botSeenChat,
12207
12210
  botAdmin,
@@ -12209,6 +12212,7 @@ export {
12209
12212
  topicIcon,
12210
12213
  botWebhook,
12211
12214
  scheduledJob,
12215
+ scheduleHarness,
12212
12216
  callRecord,
12213
12217
  stickerInventory,
12214
12218
  progressOf,
@@ -12227,8 +12231,6 @@ export {
12227
12231
  stateOf,
12228
12232
  startArchiveJob,
12229
12233
  job,
12230
- attachment,
12231
- message,
12232
12234
  annotate,
12233
12235
  metaOf,
12234
12236
  annotateOption,
@@ -12249,6 +12251,9 @@ export {
12249
12251
  recorded,
12250
12252
  startRecording,
12251
12253
  wasSettled,
12254
+ inCommandServerRequest,
12255
+ commandServerRequest,
12256
+ exitCodeSet,
12252
12257
  sentIds,
12253
12258
  currentOperation,
12254
12259
  guardedWrite,
@@ -12273,6 +12278,7 @@ export {
12273
12278
  rootOf,
12274
12279
  sampleCommand,
12275
12280
  DEFAULT_TEXT_MODEL,
12281
+ PREVIOUS_DEFAULT_TEXT_MODEL,
12276
12282
  CustomTextModelShape,
12277
12283
  readTextModelsSection,
12278
12284
  writeTextModelsSection,
@@ -12332,6 +12338,7 @@ export {
12332
12338
  narrowsUnderLock,
12333
12339
  admittedUnderLock,
12334
12340
  changesStore,
12341
+ fileOptionOf,
12335
12342
  readsOverMcpAt,
12336
12343
  isStoreChange,
12337
12344
  previewFlag,
@@ -12353,9 +12360,6 @@ export {
12353
12360
  inviteLink,
12354
12361
  chatEvent,
12355
12362
  contact,
12356
- WEIGHTS,
12357
- LINK,
12358
- oddName,
12359
12363
  contactNote,
12360
12364
  conversation,
12361
12365
  documentLink,
@@ -12398,6 +12402,7 @@ export {
12398
12402
  stepLine,
12399
12403
  tooLargeSteps,
12400
12404
  withoutProviderRefs,
12405
+ marksUntrusted,
12401
12406
  answerSchema,
12402
12407
  listOf,
12403
12408
  itemOf,