@wirecat/mail-cli 0.23.1 → 0.24.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 (114) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/bin/mail.js +2 -2
  3. package/dist/bundle/{all-profiles-FJHJCGRU.js → all-profiles-VS7P6DJY.js} +11 -11
  4. package/dist/bundle/{anthropic-AFL7NKVZ.js → anthropic-C5JXKGBS.js} +16 -7
  5. package/dist/bundle/{app-server-WKCBJMHI.js → app-server-HU3LVU42.js} +51 -50
  6. package/dist/bundle/{bun-HQATAQJQ.js → bun-QLFX47WZ.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-4ECAV7OU.js → bun-sqlite-W4PGAKVY.js} +5 -5
  8. package/dist/bundle/{chunk-3UFD76IR.js → chunk-3FD3IATT.js} +6 -6
  9. package/dist/bundle/{chunk-R554W7ZO.js → chunk-3KSK5BBB.js} +2 -2
  10. package/dist/bundle/{chunk-AGNAT7CM.js → chunk-4QNHAM3J.js} +2 -2
  11. package/dist/bundle/{chunk-7SWWVDEZ.js → chunk-4W4EVVL4.js} +61 -21
  12. package/dist/bundle/{chunk-NMGF3UOZ.js → chunk-5NLHDK7P.js} +50 -46
  13. package/dist/bundle/{chunk-VFKX5UMJ.js → chunk-5X3GU5LI.js} +6 -6
  14. package/dist/bundle/{chunk-NKBAZ4VC.js → chunk-64ZG5ERD.js} +2 -2
  15. package/dist/bundle/{chunk-WN4HP7IZ.js → chunk-6PWCQKMD.js} +12 -12
  16. package/dist/bundle/{chunk-V3TDQUXD.js → chunk-6VV7J2TN.js} +36 -57
  17. package/dist/bundle/{chunk-SNTLN2QT.js → chunk-A6J4MPTI.js} +3 -1
  18. package/dist/bundle/{chunk-CUOCDJFI.js → chunk-AUTX2MLF.js} +11 -9
  19. package/dist/bundle/{chunk-5UKBUI4I.js → chunk-B72343TK.js} +2 -2
  20. package/dist/bundle/{chunk-4IWJARFA.js → chunk-BFQQV22T.js} +1 -1
  21. package/dist/bundle/chunk-C3NYJW6B.js +1542 -0
  22. package/dist/bundle/{chunk-OJCUSHZG.js → chunk-C5BMCLCQ.js} +4 -4
  23. package/dist/bundle/{chunk-OU5CWCG2.js → chunk-DW3F6DUW.js} +1 -1
  24. package/dist/bundle/chunk-EKGRNFYQ.js +18 -0
  25. package/dist/bundle/{chunk-B6QMMRIM.js → chunk-FKWUUCX2.js} +1340 -1542
  26. package/dist/bundle/{chunk-LLYVBO3R.js → chunk-FNLUKODV.js} +19 -19
  27. package/dist/bundle/{chunk-KKGX7JMX.js → chunk-H5FJTHVA.js} +2 -2
  28. package/dist/bundle/{chunk-3QVGB2CI.js → chunk-HBZAJINU.js} +4 -4
  29. package/dist/bundle/{chunk-V7CFZ773.js → chunk-IRUN4XOV.js} +2 -2
  30. package/dist/bundle/{chunk-VAMCRP47.js → chunk-JMLIKXFO.js} +2 -2
  31. package/dist/bundle/{chunk-QR7JZM3D.js → chunk-JOQGJUFT.js} +1 -1
  32. package/dist/bundle/{chunk-CBWA2T3N.js → chunk-JWMLMAHP.js} +4 -4
  33. package/dist/bundle/{chunk-S5OTP7XS.js → chunk-KGOVFEWZ.js} +3 -3
  34. package/dist/bundle/{chunk-PMIKRELC.js → chunk-KV4VTKF3.js} +3 -3
  35. package/dist/bundle/chunk-LVGX7VTD.js +138 -0
  36. package/dist/bundle/{chunk-3DQYO7FB.js → chunk-MCPOZNWG.js} +1 -1
  37. package/dist/bundle/{chunk-E7ZVKQHG.js → chunk-MTO6YVMN.js} +3 -3
  38. package/dist/bundle/{chunk-CCYHBNRL.js → chunk-NCRSE647.js} +286 -48
  39. package/dist/bundle/{chunk-GJNFNC76.js → chunk-NSIN5IM4.js} +8 -8
  40. package/dist/bundle/{chunk-ZXIPJF3Y.js → chunk-NWKKPDZV.js} +2 -2
  41. package/dist/bundle/chunk-O373QEAJ.js +1243 -0
  42. package/dist/bundle/{chunk-VYIIX6VN.js → chunk-OQW6GHUA.js} +1 -1
  43. package/dist/bundle/{chunk-2HXHAFRP.js → chunk-PRQ2U7HF.js} +2 -2
  44. package/dist/bundle/{chunk-MBKNL5TX.js → chunk-PT6MF2VU.js} +87 -77
  45. package/dist/bundle/{chunk-SBGXKM4U.js → chunk-Q4OKEN3B.js} +7 -7
  46. package/dist/bundle/{chunk-ROKTS7WM.js → chunk-Q6K2XUGU.js} +1 -1
  47. package/dist/bundle/{chunk-VYHIX3OP.js → chunk-QI3PXUOJ.js} +43 -595
  48. package/dist/bundle/{chunk-UMXVQIGD.js → chunk-QVMOEB3I.js} +377 -12
  49. package/dist/bundle/{chunk-HOKGIYUO.js → chunk-RLQZFZLK.js} +62 -7
  50. package/dist/bundle/{chunk-3OZKDC6Y.js → chunk-RN7OI5KL.js} +8 -8
  51. package/dist/bundle/{chunk-BVJQBAGL.js → chunk-RNZKQMFY.js} +14 -14
  52. package/dist/bundle/{chunk-4YJJQNNJ.js → chunk-RUASZW3M.js} +5 -5
  53. package/dist/bundle/{chunk-UHC5I3JV.js → chunk-RX5CJ55S.js} +1 -1
  54. package/dist/bundle/{chunk-SR3ADLGX.js → chunk-SWKQ6IAR.js} +3 -3
  55. package/dist/bundle/{chunk-QUKD5SO2.js → chunk-TI7ZIPA2.js} +4 -4
  56. package/dist/bundle/{chunk-LQDMUMA2.js → chunk-TLEBSMC7.js} +1997 -768
  57. package/dist/bundle/{chunk-MUDHCYN4.js → chunk-U6MMQNNK.js} +6 -6
  58. package/dist/bundle/{chunk-CYQVWITQ.js → chunk-VNKWSCN7.js} +99 -42
  59. package/dist/bundle/{chunk-DALBYUPC.js → chunk-VUBZFMGP.js} +2 -2
  60. package/dist/bundle/{chunk-34743C4C.js → chunk-VVL4MKYH.js} +1 -1
  61. package/dist/bundle/{chunk-7YRKUEYE.js → chunk-WOX7FZJP.js} +667 -222
  62. package/dist/bundle/{chunk-R5MYOLQP.js → chunk-X47BL4M5.js} +13 -13
  63. package/dist/bundle/{chunk-GOMJNH56.js → chunk-X7J3TTDO.js} +8 -8
  64. package/dist/bundle/{chunk-NOA6E6MM.js → chunk-XBEO472U.js} +29202 -16302
  65. package/dist/bundle/{chunk-4IFX4HV2.js → chunk-YA45XV6G.js} +4 -4
  66. package/dist/bundle/{chunk-M7RGG3UU.js → chunk-YBQ5AYLZ.js} +3 -3
  67. package/dist/bundle/{chunk-QV3M2MHG.js → chunk-YI544LHI.js} +13 -136
  68. package/dist/bundle/chunk-ZO4MQWIK.js +188 -0
  69. package/dist/bundle/{chunk-76RTQYJQ.js → chunk-ZR2BDNGG.js} +1 -1
  70. package/dist/bundle/command-contract-ERYYPAD2.js +35 -0
  71. package/dist/bundle/command-server-entry-5E3PPDE5.js +164 -0
  72. package/dist/bundle/{decode-QXKTMOTH.js → decode-AVWV7SVZ.js} +5 -5
  73. package/dist/bundle/{dispatch-G4CYFWQ2.js → dispatch-BXPHSNK5.js} +10 -10
  74. package/dist/bundle/{dist-5FX36DAW.js → dist-PIOOKBWT.js} +70 -44
  75. package/dist/bundle/{echarts-HHUM43TU.js → echarts-7K6YQV52.js} +2 -2
  76. package/dist/bundle/{embed-SRZSDZVI.js → embed-4NT76GJK.js} +6 -6
  77. package/dist/bundle/{embedder-WZIZCWLX.js → embedder-ITQFF7EN.js} +9 -9
  78. package/dist/bundle/{failure-FFPK2WYB.js → failure-3Q65JOPD.js} +2 -2
  79. package/dist/bundle/{first-run-6DVWZ3JQ.js → first-run-PM74YU4X.js} +11 -11
  80. package/dist/bundle/first-screen-WBVGVSMY.js +33 -0
  81. package/dist/bundle/{instructions-UWONE6UT.js → instructions-JDSITYHV.js} +1 -1
  82. package/dist/bundle/mail.js +37 -13
  83. package/dist/bundle/{mcp-CFVG2OUS.js → mcp-7KQUJNFN.js} +2 -2
  84. package/dist/bundle/{node-HLAOYJDB.js → node-D6YIJOJI.js} +2 -2
  85. package/dist/bundle/{node-sqlite-RO66I7W6.js → node-sqlite-PJOHHB4X.js} +6 -6
  86. package/dist/bundle/{oauth-VNLB2TET.js → oauth-BOWJ3IBT.js} +7 -7
  87. package/dist/bundle/{open-QQSG343L.js → open-FIAKKZMW.js} +5 -5
  88. package/dist/bundle/{openai-JTFC7OGF.js → openai-QL54VVLC.js} +16 -37
  89. package/dist/bundle/{process-3CZAXR6P.js → process-AYHK7WRC.js} +1 -1
  90. package/dist/bundle/{program-XTOS4RAM.js → program-6FKWOTBK.js} +2267 -1351
  91. package/dist/bundle/{prompt-HGQ6GPYL.js → prompt-XJZCBELC.js} +5 -5
  92. package/dist/bundle/{recognize-2SHMNEIZ.js → recognize-OQKWAHBY.js} +4 -4
  93. package/dist/bundle/{remote-GBQC3433.js → remote-NLVUZ5WK.js} +7 -7
  94. package/dist/bundle/{rerank-FQHQXFNR.js → rerank-NRPZDTJ7.js} +7 -7
  95. package/dist/bundle/{serve-THU67QUZ.js → serve-O4YUI7F6.js} +9 -9
  96. package/dist/bundle/server-6OT5ZEWL.js +66 -0
  97. package/dist/bundle/{server-LOT3CLYX.js → server-WAL3M4OO.js} +40 -40
  98. package/dist/bundle/{sqlite-runtime-NOOUMBC4.js → sqlite-runtime-5YHGI4D4.js} +6 -6
  99. package/dist/bundle/{state-KSKZCV2U.js → state-WYYOJ7KK.js} +6 -6
  100. package/dist/bundle/{store-BAKSHTKF.js → store-6BJO3F2J.js} +16 -16
  101. package/dist/bundle/{store-OHNZOQ7U.js → store-X72GOJHD.js} +44 -20
  102. package/dist/bundle/store-maintenance-command-ASS7RBYC.js +54 -0
  103. package/dist/config.d.ts +4 -0
  104. package/dist/config.d.ts.map +1 -1
  105. package/dist/version.d.ts +1 -1
  106. package/dist/version.js +1 -1
  107. package/package.json +3 -3
  108. package/dist/bundle/chunk-EXPR6QAX.js +0 -394
  109. package/dist/bundle/chunk-FWFNUJQD.js +0 -12172
  110. package/dist/bundle/command-contract-IIHBNF7J.js +0 -35
  111. package/dist/bundle/first-screen-SRZ7NYHZ.js +0 -33
  112. package/dist/bundle/server-VKMUX7ZT.js +0 -65
  113. package/dist/bundle/store-maintenance-command-ROQHJVEA.js +0 -54
  114. /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-Q4OKEN3B.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-AUTX2MLF.js";
27
27
  import {
28
28
  carries
29
- } from "./chunk-OU5CWCG2.js";
29
+ } from "./chunk-DW3F6DUW.js";
30
30
  import {
31
31
  permissionCeiling
32
- } from "./chunk-SR3ADLGX.js";
32
+ } from "./chunk-SWKQ6IAR.js";
33
33
  import {
34
34
  note
35
- } from "./chunk-E7ZVKQHG.js";
35
+ } from "./chunk-MTO6YVMN.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,41 @@ 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-O373QEAJ.js";
64
81
  import {
65
82
  BUSINESS_KINDS,
83
+ DEAL_KINDS,
66
84
  DEAL_ROLES,
85
+ DEAL_STATUSES,
67
86
  FACT_TYPES,
68
87
  FIELD_TYPES,
88
+ FINANCE_REVIEWS,
69
89
  INVOICE_DIRECTIONS,
90
+ INVOICE_STATUSES,
70
91
  MEETING_RESULT_ENTITIES,
71
92
  MONEY_DIRECTIONS,
72
93
  ORDER_PURPOSES,
@@ -90,23 +111,23 @@ import {
90
111
  meetingStats,
91
112
  meetingSummary,
92
113
  meetingTranscript
93
- } from "./chunk-7YRKUEYE.js";
114
+ } from "./chunk-WOX7FZJP.js";
94
115
  import {
95
116
  isCliFailure,
96
117
  storeDamaged
97
- } from "./chunk-R554W7ZO.js";
118
+ } from "./chunk-3KSK5BBB.js";
98
119
  import {
99
120
  readSharedSection,
100
121
  sharedConfigPath,
101
122
  writeSharedSection
102
- } from "./chunk-3UFD76IR.js";
123
+ } from "./chunk-3FD3IATT.js";
103
124
  import {
104
125
  filesPresent,
105
126
  sharedModelsDirectory
106
- } from "./chunk-QUKD5SO2.js";
127
+ } from "./chunk-TI7ZIPA2.js";
107
128
  import {
108
129
  storePath
109
- } from "./chunk-5UKBUI4I.js";
130
+ } from "./chunk-B72343TK.js";
110
131
  import {
111
132
  configFilePath,
112
133
  createRecordLog,
@@ -114,9 +135,8 @@ import {
114
135
  processStreams,
115
136
  resolvePaths,
116
137
  saveConfigFile,
117
- traceIdOf,
118
138
  writeSecurely
119
- } from "./chunk-LLYVBO3R.js";
139
+ } from "./chunk-FNLUKODV.js";
120
140
  import {
121
141
  COMPACT_FLAG,
122
142
  MAX_NEXT_STEPS,
@@ -170,17 +190,17 @@ import {
170
190
  url,
171
191
  variant,
172
192
  writes
173
- } from "./chunk-GOMJNH56.js";
193
+ } from "./chunk-X7J3TTDO.js";
174
194
  import {
175
195
  CliError,
176
196
  isCliError,
177
197
  visibleControls
178
- } from "./chunk-DALBYUPC.js";
198
+ } from "./chunk-VUBZFMGP.js";
179
199
  import {
180
200
  __name
181
201
  } from "./chunk-ZVVMGPBJ.js";
182
202
 
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
203
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/ports/app.js
184
204
  var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
185
205
  var readOnlyLockOf = /* @__PURE__ */ __name((app, env) => {
186
206
  const name = envName(app, "READ_ONLY");
@@ -191,7 +211,7 @@ var mailHolderVariable = /* @__PURE__ */ __name((app) => envName(app, "MAIL_HOLD
191
211
  var MESSENGER_CHANGE_REFUSAL = "send, react, change chats or change the account";
192
212
  var readOnlyRefusal = /* @__PURE__ */ __name((lock, what) => new CliError("permission_error", `this process is read-only (${lock}) \u2014 it cannot ${what}`), "readOnlyRefusal");
193
213
 
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
214
+ // 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
215
  var labels = /* @__PURE__ */ new WeakMap();
196
216
  var annotate = /* @__PURE__ */ __name((command, meta) => {
197
217
  labels.set(command, { ...labels.get(command), ...meta });
@@ -3692,7 +3712,7 @@ __name(useColor, "useColor");
3692
3712
  // node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
3693
3713
  var program = new Command();
3694
3714
 
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
3715
+ // 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
3716
  var argumentInfoSchema = object({
3697
3717
  name: string(),
3698
3718
  required: boolean(),
@@ -3766,14 +3786,14 @@ var commandsDocumentSchema = strictObject({
3766
3786
  exit_codes: record(string(), pipe(number(), integer()))
3767
3787
  });
3768
3788
 
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
3789
+ // 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
3790
  import { isDeepStrictEqual } from "node:util";
3771
3791
  var protectedCommands = /* @__PURE__ */ new WeakMap();
3772
3792
  var hidden = /* @__PURE__ */ __name((command) => Boolean(command._hidden), "hidden");
3773
3793
  var snapshot = /* @__PURE__ */ __name((command, known = /* @__PURE__ */ new Map(), children) => {
3774
3794
  if (hidden(command))
3775
3795
  throw new Error("a hidden command cannot own a shared contract");
3776
- const { commands: _, usage: __, path: ___, ...contract } = describeAlone(command, known);
3796
+ const { commands: _2, usage: __, path: ___, ...contract } = describeAlone(command, known);
3777
3797
  return {
3778
3798
  ...contract,
3779
3799
  aliases: [...command.aliases()],
@@ -3875,7 +3895,7 @@ var sharedCommand = /* @__PURE__ */ __name((factory) => (...args) => {
3875
3895
  return result;
3876
3896
  }, "sharedCommand");
3877
3897
 
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
3898
+ // 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
3899
  var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
3880
3900
  let command = root;
3881
3901
  const path2 = [];
@@ -3893,14 +3913,29 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
3893
3913
  }
3894
3914
  }, "refuseJoinedPath");
3895
3915
 
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
3916
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/command-server-request.js
3897
3917
  import { AsyncLocalStorage } from "node:async_hooks";
3918
+ var requests = new AsyncLocalStorage();
3919
+ var inCommandServerRequest = /* @__PURE__ */ __name((request, work) => requests.run(request, work), "inCommandServerRequest");
3920
+ var commandServerRequest = /* @__PURE__ */ __name(() => requests.getStore(), "commandServerRequest");
3921
+ var exitCodeSet = /* @__PURE__ */ __name(() => {
3922
+ const request = requests.getStore();
3923
+ if (request?.exitCode !== void 0)
3924
+ return request.exitCode;
3925
+ const direct = process.exitCode === void 0 ? void 0 : Number(process.exitCode);
3926
+ if (request)
3927
+ process.exitCode = void 0;
3928
+ return direct;
3929
+ }, "exitCodeSet");
3930
+
3931
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/sends/guarded.js
3932
+ import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
3898
3933
  var sentIds = /* @__PURE__ */ __name((typed2, message2) => ({
3899
3934
  messageId: message2.id,
3900
3935
  ...message2.chatId && message2.chatId !== typed2 ? { resultChatId: message2.chatId } : {}
3901
3936
  }), "sentIds");
3902
- var current = new AsyncLocalStorage();
3903
- var writesInFlight = new AsyncLocalStorage();
3937
+ var current = new AsyncLocalStorage2();
3938
+ var writesInFlight = new AsyncLocalStorage2();
3904
3939
  var parents = /* @__PURE__ */ new WeakMap();
3905
3940
  var stopped = /* @__PURE__ */ new WeakMap();
3906
3941
  var scopesFor = /* @__PURE__ */ __name((scope = writesInFlight.getStore()) => {
@@ -3999,7 +4034,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
3999
4034
  }, "guardedWrite");
4000
4035
  var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
4001
4036
 
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
4037
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/execution.js
4003
4038
  var DEFAULT_COMMAND_MS = 3e4;
4004
4039
  var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
4005
4040
  var DEFAULT_SYNC_MS = 15 * 6e4;
@@ -4024,7 +4059,7 @@ var execution = /* @__PURE__ */ __name((streams, { timeoutMs, fields, maxOutputB
4024
4059
  let interrupted;
4025
4060
  let reject = /* @__PURE__ */ __name(() => {
4026
4061
  }, "reject");
4027
- const interruption = new Promise((_, fail) => {
4062
+ const interruption = new Promise((_2, fail) => {
4028
4063
  reject = fail;
4029
4064
  });
4030
4065
  void interruption.catch(() => {
@@ -4171,7 +4206,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
4171
4206
  throw signal.reason;
4172
4207
  let abort = /* @__PURE__ */ __name(() => {
4173
4208
  }, "abort");
4174
- const interrupted = new Promise((_, reject) => {
4209
+ const interrupted = new Promise((_2, reject) => {
4175
4210
  abort = /* @__PURE__ */ __name(() => reject(signal.reason), "abort");
4176
4211
  signal.addEventListener("abort", abort, { once: true });
4177
4212
  });
@@ -4182,7 +4217,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
4182
4217
  }
4183
4218
  }, "withAbort");
4184
4219
 
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
4220
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
4186
4221
  import { existsSync, readdirSync, readFileSync } from "node:fs";
4187
4222
  import { join } from "node:path";
4188
4223
  var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
@@ -4204,15 +4239,15 @@ var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
4204
4239
  }, "profilesWithAccounts");
4205
4240
  var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
4206
4241
 
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
4242
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/background/budget.js
4208
4243
  var DEADLINE_MARGIN_MS = 5e3;
4209
4244
  var DEADLINE_MARGIN_SHARE = 0.15;
4210
4245
  var DEFAULT_REQUEST_MS = 2e3;
4211
4246
  var deadlineMargin = /* @__PURE__ */ __name((deadline) => Math.max(DEADLINE_MARGIN_MS, deadline.ms * DEADLINE_MARGIN_SHARE), "deadlineMargin");
4212
4247
  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 } = {}) => {
4248
+ var runBudget = /* @__PURE__ */ __name(({ requests: requests2, deadline, requestMs, signal, now = Date.now } = {}) => {
4214
4249
  const fits = requestsFor(deadline, requestMs);
4215
- const limit = fits === null ? requests ?? null : Math.min(fits, requests ?? fits);
4250
+ const limit = fits === null ? requests2 ?? null : Math.min(fits, requests2 ?? fits);
4216
4251
  const margin = deadline ? deadlineMargin(deadline) : 0;
4217
4252
  let used = 0;
4218
4253
  let stopped2 = null;
@@ -4247,7 +4282,7 @@ var runBudget = /* @__PURE__ */ __name(({ requests, deadline, requestMs, signal,
4247
4282
  };
4248
4283
  }, "runBudget");
4249
4284
 
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
4285
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/runs/log-events.js
4251
4286
  var CORE_LOG_EVENTS = defineLogEvents([
4252
4287
  { id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
4253
4288
  { id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
@@ -4257,6 +4292,7 @@ var CORE_LOG_EVENTS = defineLogEvents([
4257
4292
  meaning: "a read was answered from what was kept, without asking the messenger",
4258
4293
  keys: ["operation", "reason"]
4259
4294
  },
4295
+ { id: "store.write", meaning: "a committed write changed rows of one store table", keys: ["table", "op", "n"] },
4260
4296
  { id: "command.crashed", meaning: "a command failed on a bug; where, never what", keys: ["error_class", "frames"] },
4261
4297
  {
4262
4298
  id: "events.dropped",
@@ -4278,490 +4314,11 @@ var DIAGNOSTIC_LOG_EVENTS = {
4278
4314
  request: "provider.request",
4279
4315
  response: "provider.response",
4280
4316
  warning: "client.warning",
4281
- cache: "cache.answered"
4317
+ cache: "cache.answered",
4318
+ store: "store.write"
4282
4319
  };
4283
4320
 
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
4327
- };
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
-
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
4321
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/runs/recording.js
4765
4322
  var recorded = /* @__PURE__ */ __name(async (options, body) => {
4766
4323
  const recording = startRecording(options);
4767
4324
  try {
@@ -4807,6 +4364,7 @@ var startRecording = /* @__PURE__ */ __name((options) => {
4807
4364
  }, "onError"),
4808
4365
  ...options.keepDays === void 0 ? {} : { keepDays: options.keepDays },
4809
4366
  ...options.keepSuccessDays === void 0 ? {} : { keepSuccessDays: options.keepSuccessDays },
4367
+ ...options.keepStoreDays === void 0 ? {} : { keepStoreDays: options.keepStoreDays },
4810
4368
  ...options.maxBytes === void 0 ? {} : { maxBytes: options.maxBytes },
4811
4369
  now,
4812
4370
  ...extra
@@ -4815,13 +4373,16 @@ var startRecording = /* @__PURE__ */ __name((options) => {
4815
4373
  const held = !run && options.keepFailed ? [] : void 0;
4816
4374
  const counted = { wire: 0, operation: 0 };
4817
4375
  let refused;
4376
+ let wroteStore = false;
4818
4377
  const cap = capped();
4819
- const requests = /* @__PURE__ */ __name(() => counted.wire > 0 ? counted.wire : counted.operation, "requests");
4378
+ const requests2 = /* @__PURE__ */ __name(() => counted.wire > 0 ? counted.wire : counted.operation, "requests");
4820
4379
  const events2 = /* @__PURE__ */ __name((event2) => {
4821
4380
  if (event2.event === "request")
4822
4381
  counted[event2.level === "wire" ? "wire" : "operation"] += 1;
4823
4382
  if (event2.event === "response" && event2.outcome === "error")
4824
4383
  refused = event2;
4384
+ if (event2.event === "store")
4385
+ wroteStore = true;
4825
4386
  if (options.trace)
4826
4387
  streams.diagnostic(options.format === "pretty" ? renderEvent(event2) : JSON.stringify(logAttributes(event2)));
4827
4388
  if (run)
@@ -4843,13 +4404,14 @@ var startRecording = /* @__PURE__ */ __name((options) => {
4843
4404
  events: events2,
4844
4405
  succeed: /* @__PURE__ */ __name(async (answer) => {
4845
4406
  const partial2 = partialOutcome(answer);
4846
- const kept = run ?? (partial2 && held ? keep(open({ startedAt })) : void 0);
4407
+ const kept = run ?? ((partial2 || wroteStore) && held ? keep(open({ startedAt })) : void 0);
4847
4408
  if (kept)
4848
4409
  cap.close(kept);
4849
4410
  await kept?.finish(partial2 ? "partial" : "success", {
4850
- requests: requests(),
4411
+ requests: requests2(),
4851
4412
  ...cap.dropped(),
4852
- ...partial2 ? { partial: partial2 } : {}
4413
+ ...partial2 ? { partial: partial2 } : {},
4414
+ ...!run && !partial2 && wroteStore ? { keptBecauseStore: true } : {}
4853
4415
  });
4854
4416
  }, "succeed"),
4855
4417
  fail: /* @__PURE__ */ __name(async (thrown) => {
@@ -4866,7 +4428,7 @@ var startRecording = /* @__PURE__ */ __name((options) => {
4866
4428
  failed.logger.error(crashOf(error));
4867
4429
  cap.close(failed);
4868
4430
  await failed.finish("failed", {
4869
- requests: requests(),
4431
+ requests: requests2(),
4870
4432
  ...cap.dropped(),
4871
4433
  ...outcomeOf(error),
4872
4434
  error: errorDetailOf(error, refused),
@@ -4884,29 +4446,47 @@ var wasSettled = /* @__PURE__ */ __name((error) => typeof error === "object" &&
4884
4446
  var HELD_AT_MOST = 500;
4885
4447
  var EVENTS_AT_MOST = 2e3;
4886
4448
  var EVENT_BYTES_AT_MOST = 1024 * 1024;
4449
+ var STORE_EVENTS_AT_MOST = 100;
4887
4450
  var capped = /* @__PURE__ */ __name(() => {
4888
4451
  let lines = 0;
4889
4452
  let bytes = 0;
4890
- let dropped2 = 0;
4453
+ let dropped = 0;
4454
+ let stores = 0;
4891
4455
  const byOperation = {};
4456
+ const summed = /* @__PURE__ */ new Map();
4457
+ const write = /* @__PURE__ */ __name((run, event2) => {
4458
+ const size = JSON.stringify(logAttributes(event2)).length + 200;
4459
+ if (lines >= EVENTS_AT_MOST || bytes + size > EVENT_BYTES_AT_MOST) {
4460
+ dropped += 1;
4461
+ const operation = "operation" in event2 && event2.operation ? event2.operation : event2.event;
4462
+ byOperation[operation] = (byOperation[operation] ?? 0) + 1;
4463
+ return;
4464
+ }
4465
+ lines += 1;
4466
+ bytes += size;
4467
+ logEvent(run, event2);
4468
+ }, "write");
4892
4469
  return {
4893
4470
  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;
4471
+ if (event2.event === "store" && ++stores > STORE_EVENTS_AT_MOST) {
4472
+ const key = `${event2.table} ${event2.op}`;
4473
+ const sum = summed.get(key);
4474
+ if (sum)
4475
+ sum.n += event2.n;
4476
+ else
4477
+ summed.set(key, { ...event2 });
4899
4478
  return;
4900
4479
  }
4901
- lines += 1;
4902
- bytes += size;
4903
- logEvent(run, event2);
4480
+ write(run, event2);
4904
4481
  }, "log"),
4905
4482
  close: /* @__PURE__ */ __name((run) => {
4906
- if (dropped2 > 0)
4907
- run.logger.warn({ event: "events.dropped", dropped: dropped2, counts: byOperation });
4483
+ for (const sum of summed.values())
4484
+ write(run, sum);
4485
+ summed.clear();
4486
+ if (dropped > 0)
4487
+ run.logger.warn({ event: "events.dropped", dropped, counts: byOperation });
4908
4488
  }, "close"),
4909
- dropped: /* @__PURE__ */ __name(() => dropped2 > 0 ? { eventsDropped: dropped2 } : {}, "dropped")
4489
+ dropped: /* @__PURE__ */ __name(() => dropped > 0 ? { eventsDropped: dropped } : {}, "dropped")
4910
4490
  };
4911
4491
  }, "capped");
4912
4492
  var logEvent = /* @__PURE__ */ __name((run, event2) => {
@@ -4917,7 +4497,7 @@ var logEvent = /* @__PURE__ */ __name((run, event2) => {
4917
4497
  };
4918
4498
  if (event2.event === "warning")
4919
4499
  run.logger.warn(record2);
4920
- else if (event2.event !== "cache" && event2.outcome === "error")
4500
+ else if ((event2.event === "request" || event2.event === "response") && event2.outcome === "error")
4921
4501
  run.logger.error(record2);
4922
4502
  else
4923
4503
  run.logger.info(record2);
@@ -4953,14 +4533,14 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
4953
4533
  return void 0;
4954
4534
  }, "partialOutcome");
4955
4535
 
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
4536
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/deadline.js
4957
4537
  var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
4958
4538
  if (ms2 === void 0)
4959
4539
  return body();
4960
4540
  let timer2;
4961
4541
  let timedOut;
4962
4542
  const writes2 = /* @__PURE__ */ new Set();
4963
- const expired = new Promise((_, reject) => {
4543
+ const expired = new Promise((_2, reject) => {
4964
4544
  timer2 = setTimeout(() => {
4965
4545
  const pending = [...writes2];
4966
4546
  const cut2 = pending.filter((write) => !write.preparing);
@@ -4979,7 +4559,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
4979
4559
  }
4980
4560
  }, "withDeadline");
4981
4561
 
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
4562
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/profile.js
4983
4563
  var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
4984
4564
  var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
4985
4565
  var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
@@ -5048,10 +4628,10 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
5048
4628
  return void 0;
5049
4629
  }, "sampleCommand");
5050
4630
 
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";
4631
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/settings.js
4632
+ import { existsSync as existsSync5 } from "node:fs";
5053
4633
 
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
4634
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/models/endpoint.js
5055
4635
  var endpoint = /* @__PURE__ */ __name((value) => {
5056
4636
  try {
5057
4637
  const url3 = new URL(value);
@@ -5061,7 +4641,7 @@ var endpoint = /* @__PURE__ */ __name((value) => {
5061
4641
  }
5062
4642
  }, "endpoint");
5063
4643
 
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
4644
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/models/settings.js
5065
4645
  var MODEL_FIELDS = ["provider", "model", "base_url"];
5066
4646
  var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
5067
4647
  provider: optional(picklist(["off", "openai", "anthropic"])),
@@ -5130,7 +4710,7 @@ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
5130
4710
  };
5131
4711
  }, "modelTarget");
5132
4712
 
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
4713
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/analysis/settings.js
5134
4714
  var model = pipe(string(), trim(), minLength(1), maxLength(200));
5135
4715
  var url2 = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
5136
4716
  var AI_FIELDS = {
@@ -5174,7 +4754,7 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
5174
4754
  };
5175
4755
  }, "resolveAISettings");
5176
4756
 
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
4757
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/domain/duration.js
5178
4758
  var DURATION = /^(\d+)(ms|s|m|h|d)$/;
5179
4759
  var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
5180
4760
  var parseDuration = /* @__PURE__ */ __name((value, source2) => {
@@ -5188,7 +4768,9 @@ var parseDuration = /* @__PURE__ */ __name((value, source2) => {
5188
4768
  return ms2;
5189
4769
  }, "parseDuration");
5190
4770
 
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
4771
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/embeddings/models.js
4772
+ import { existsSync as existsSync2 } from "node:fs";
4773
+ import { join as join2 } from "node:path";
5192
4774
  var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
5193
4775
  var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
5194
4776
  var e5Large = huggingFace("Xenova/multilingual-e5-large", "00fc3aeb3dbb95842de2ac1961d33c6319acf57b");
@@ -5235,9 +4817,13 @@ var TEXT_MODELS = [
5235
4817
  languages: "over 100 languages \u2014 the best of the two on chat, about seven times slower",
5236
4818
  licence: "Gemma Terms of Use",
5237
4819
  terms: "https://ai.google.dev/gemma/terms",
4820
+ // Gemma Terms of Use §3.1: every copy carries this notice and the use restrictions of §3.2.
4821
+ 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
4822
  dims: 768,
5239
4823
  maxTokens: 2048,
5240
- chunksPerSecond: 2,
4824
+ // 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
4825
+ // 5 on the scale e5-small's 31 sets. It was 2, which held a memo sync to 39 chunks.
4826
+ chunksPerSecond: 5,
5241
4827
  pooling: "sentence_embedding",
5242
4828
  prefix: { query: "task: search result | query: ", passage: "title: none | text: " },
5243
4829
  onnx: "onnx/model_q4.onnx",
@@ -5304,7 +4890,8 @@ var TEXT_MODELS = [
5304
4890
  ]
5305
4891
  }
5306
4892
  ];
5307
- var DEFAULT_TEXT_MODEL = "e5-small";
4893
+ var DEFAULT_TEXT_MODEL = "embeddinggemma";
4894
+ var PREVIOUS_DEFAULT_TEXT_MODEL = "e5-small";
5308
4895
  var SECTION = "text_models";
5309
4896
  var slug = pipe(string(), regex(/^[a-z0-9][a-z0-9._-]{0,62}$/, "is not a model id: a-z, 0-9, . _ -"));
5310
4897
  var words = pipe(string(), trim(), minLength(1), maxLength(300));
@@ -5343,10 +4930,10 @@ var TextModelsSection = strictObject({
5343
4930
  var textModelsFile = /* @__PURE__ */ __name((env = process.env) => sharedConfigPath(storePath(env), env), "textModelsFile");
5344
4931
  var readTextModelsSection = /* @__PURE__ */ __name((env = process.env) => {
5345
4932
  const path2 = textModelsFile(env);
5346
- const section = readSharedSection(path2, SECTION);
5347
- if (section === void 0)
4933
+ const section2 = readSharedSection(path2, SECTION);
4934
+ if (section2 === void 0)
5348
4935
  return {};
5349
- const checked = safeParse(TextModelsSection, section);
4936
+ const checked = safeParse(TextModelsSection, section2);
5350
4937
  if (!checked.success) {
5351
4938
  const issue = checked.issues[0];
5352
4939
  const at2 = issue ? getDotPath(issue) : null;
@@ -5358,7 +4945,7 @@ var readTextModelsSection = /* @__PURE__ */ __name((env = process.env) => {
5358
4945
  throw new CliError("configuration_error", `${path2}: ${SECTION}.custom names ${twice} twice`);
5359
4946
  return checked.output;
5360
4947
  }, "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");
4948
+ var writeTextModelsSection = /* @__PURE__ */ __name((section2, env = process.env) => writeSharedSection(textModelsFile(env), SECTION, section2.use === void 0 && !section2.custom?.length ? void 0 : section2), "writeTextModelsSection");
5362
4949
  var textModels = /* @__PURE__ */ __name((env = process.env) => [
5363
4950
  ...TEXT_MODELS,
5364
4951
  ...(readTextModelsSection(env).custom ?? []).map((model3) => ({ ...model3, custom: true }))
@@ -5371,9 +4958,17 @@ var textModel = /* @__PURE__ */ __name((id6, env = process.env) => {
5371
4958
  }
5372
4959
  return found;
5373
4960
  }, "textModel");
4961
+ var downloaded = /* @__PURE__ */ __name((id6, env) => {
4962
+ const model3 = TEXT_MODELS.find((one) => one.id === id6);
4963
+ const directory = sharedModelsDirectory("text", env);
4964
+ return model3 !== void 0 && filesPresent(model3.files.map((file) => [file, join2(directory, model3.id, file.name)]));
4965
+ }, "downloaded");
5374
4966
  var chosenTextModel = /* @__PURE__ */ __name((env = process.env) => {
5375
4967
  const use = readTextModelsSection(env).use;
5376
- return use === void 0 ? { id: DEFAULT_TEXT_MODEL, from: "default" } : { id: use, from: "chosen" };
4968
+ if (use !== void 0)
4969
+ return { id: use, from: "chosen" };
4970
+ const kept = !downloaded(DEFAULT_TEXT_MODEL, env) && existsSync2(join2(sharedModelsDirectory("text", env), PREVIOUS_DEFAULT_TEXT_MODEL));
4971
+ return { id: kept ? PREVIOUS_DEFAULT_TEXT_MODEL : DEFAULT_TEXT_MODEL, from: "default" };
5377
4972
  }, "chosenTextModel");
5378
4973
  var mmarco = huggingFace("cross-encoder/mmarco-mMiniLMv2-L12-H384-v1", "1427fd652930e4ba29e8149678df786c240d8825");
5379
4974
  var bge = huggingFace("onnx-community/bge-reranker-v2-m3-ONNX", "6f5ff65298512715a1e669753bc754d2bc8f367b");
@@ -5450,16 +5045,16 @@ var vectorModelKey = /* @__PURE__ */ __name((model3) => {
5450
5045
  }, "vectorModelKey");
5451
5046
  var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
5452
5047
 
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
5048
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/services/history-limits.js
5454
5049
  var HISTORY_MAX_DAYS = 1095;
5455
5050
  var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
5456
- var DAY_MS2 = 24 * 60 * 60 * 1e3;
5051
+ var DAY_MS = 24 * 60 * 60 * 1e3;
5457
5052
  var historyWindow = /* @__PURE__ */ __name((shape, limits, now) => {
5458
5053
  const group2 = shape !== void 0 && shape.kind !== "dialog" && shape.kind !== "saved";
5459
5054
  if (group2 && (shape.participantsCount ?? 0) > limits.groupMembersMax)
5460
5055
  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 };
5056
+ const days = group2 ? limits.groupDays : limits.dialogDays;
5057
+ return { keepFrom: now - Math.min(days, HISTORY_MAX_DAYS) * DAY_MS };
5463
5058
  }, "historyWindow");
5464
5059
  var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now = Date.now()) => {
5465
5060
  const skipped = /* @__PURE__ */ new Map();
@@ -5497,8 +5092,8 @@ var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now =
5497
5092
  return { batch: { ...batch, messages }, skipped };
5498
5093
  }, "limitBatch");
5499
5094
 
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";
5095
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/bot/registry.js
5096
+ import { existsSync as existsSync3, readdirSync as readdirSync2, readFileSync as readFileSync2 } from "node:fs";
5502
5097
  import { join as join3 } from "node:path";
5503
5098
  var botsDirectory = /* @__PURE__ */ __name((app, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "bots"), "botsDirectory");
5504
5099
  var botFiles = /* @__PURE__ */ __name((app, profile, env = process.env) => {
@@ -5536,7 +5131,7 @@ var ChatRegistry = class {
5536
5131
  }
5537
5132
  /** Makes this bot known to `bot list` before it has seen any chat. */
5538
5133
  touch() {
5539
- if (!existsSync2(this.#path))
5134
+ if (!existsSync3(this.#path))
5540
5135
  writeSecurely(this.#path, `${JSON.stringify({ chats: [] }, null, 2)}
5541
5136
  `, 384);
5542
5137
  }
@@ -5565,10 +5160,10 @@ var ChatRegistry = class {
5565
5160
  this.#write({ ...this.#read(), chats: [...byId.values()] });
5566
5161
  }
5567
5162
  #read() {
5568
- if (!existsSync2(this.#path))
5163
+ if (!existsSync3(this.#path))
5569
5164
  return {};
5570
5165
  try {
5571
- const parsed = JSON.parse(readFileSync3(this.#path, "utf8"));
5166
+ const parsed = JSON.parse(readFileSync2(this.#path, "utf8"));
5572
5167
  return parsed && typeof parsed === "object" ? parsed : {};
5573
5168
  } catch {
5574
5169
  return {};
@@ -5581,15 +5176,15 @@ var ChatRegistry = class {
5581
5176
  };
5582
5177
  var registryProfiles = /* @__PURE__ */ __name((app, env = process.env) => {
5583
5178
  const directory = botsDirectory(app, env);
5584
- if (!existsSync2(directory))
5179
+ if (!existsSync3(directory))
5585
5180
  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));
5181
+ 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
5182
  }, "registryProfiles");
5588
5183
 
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
5590
- import { readFileSync as readFileSync4 } from "node:fs";
5184
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
5185
+ import { readFileSync as readFileSync3 } from "node:fs";
5591
5186
 
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
5187
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/config-repair.js
5593
5188
  var REPAIR_WORDS = {
5594
5189
  byte_order_mark: "an invisible byte-order mark at the start",
5595
5190
  comment: "a comment, which JSON does not allow",
@@ -5830,7 +5425,7 @@ ${parts.join(",\n")}
5830
5425
  ${indent}${close}`;
5831
5426
  }, "serialise");
5832
5427
 
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
5428
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
5834
5429
  var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
5835
5430
  var SECTIONS = ["personal", "bot"];
5836
5431
  var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
@@ -6009,7 +5604,7 @@ var schemaIssues = /* @__PURE__ */ __name((raw, schema2, context2) => {
6009
5604
  return [...found.values()];
6010
5605
  }
6011
5606
  }, "schemaIssues");
6012
- var scopes2 = /* @__PURE__ */ __name((raw) => {
5607
+ var scopes = /* @__PURE__ */ __name((raw) => {
6013
5608
  if (!isNode(raw))
6014
5609
  return [];
6015
5610
  const out = [];
@@ -6017,12 +5612,12 @@ var scopes2 = /* @__PURE__ */ __name((raw) => {
6017
5612
  if (isNode(node))
6018
5613
  out.push([path2, node]);
6019
5614
  }, "add");
6020
- const addSection = /* @__PURE__ */ __name((path2, section) => {
6021
- if (!isNode(section))
5615
+ const addSection = /* @__PURE__ */ __name((path2, section2) => {
5616
+ if (!isNode(section2))
6022
5617
  return;
6023
- add([...path2, "defaults"], section.defaults);
6024
- if (isNode(section.profiles))
6025
- for (const [name, scope] of Object.entries(section.profiles))
5618
+ add([...path2, "defaults"], section2.defaults);
5619
+ if (isNode(section2.profiles))
5620
+ for (const [name, scope] of Object.entries(section2.profiles))
6026
5621
  add([...path2, "profiles", name], scope);
6027
5622
  }, "addSection");
6028
5623
  add([], raw);
@@ -6031,7 +5626,7 @@ var scopes2 = /* @__PURE__ */ __name((raw) => {
6031
5626
  addSection([name], raw[name]);
6032
5627
  return out;
6033
5628
  }, "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");
5629
+ 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
5630
  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
5631
  var pathId = /* @__PURE__ */ __name((path2) => path2.join("\0"), "pathId");
6037
5632
  var prune = /* @__PURE__ */ __name((raw, paths) => {
@@ -6039,7 +5634,7 @@ var prune = /* @__PURE__ */ __name((raw, paths) => {
6039
5634
  const kept = /* @__PURE__ */ new Map();
6040
5635
  const walk = /* @__PURE__ */ __name((node, at2) => {
6041
5636
  if (Array.isArray(node)) {
6042
- const indices = node.flatMap((_, index) => drop.has(pathId([...at2, String(index)])) ? [] : [index]);
5637
+ const indices = node.flatMap((_2, index) => drop.has(pathId([...at2, String(index)])) ? [] : [index]);
6043
5638
  kept.set(pathId(at2), indices);
6044
5639
  return indices.map((index) => walk(node[index], [...at2, String(index)]));
6045
5640
  }
@@ -6075,7 +5670,7 @@ var withoutPath = /* @__PURE__ */ __name((raw, at2) => {
6075
5670
  }
6076
5671
  return { config: prune(raw, [gone]).pruned, removed: true };
6077
5672
  }, "withoutPath");
6078
- var publicIssue = /* @__PURE__ */ __name(({ at: _, ...issue }) => issue, "publicIssue");
5673
+ var publicIssue = /* @__PURE__ */ __name(({ at: _2, ...issue }) => issue, "publicIssue");
6079
5674
  var fixVerb = /* @__PURE__ */ __name((issue) => issue.kind === "invalid_json" ? "repair" : "remove", "fixVerb");
6080
5675
  var issueMessage = /* @__PURE__ */ __name((issues, doctor = "doctor") => {
6081
5676
  const [first2] = issues;
@@ -6104,7 +5699,7 @@ var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schem
6104
5699
  var wholeFile = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what }), "wholeFile");
6105
5700
  var readConfigText = /* @__PURE__ */ __name((path2) => {
6106
5701
  try {
6107
- return { text: readFileSync4(path2, "utf8") };
5702
+ return { text: readFileSync3(path2, "utf8") };
6108
5703
  } catch (error) {
6109
5704
  const code = error.code;
6110
5705
  if (code === "ENOENT")
@@ -6124,22 +5719,22 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
6124
5719
  return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
6125
5720
  }, "readConfigFile");
6126
5721
 
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";
5722
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/default-config.js
5723
+ import { existsSync as existsSync4, linkSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
6129
5724
  import { dirname, join as join4 } from "node:path";
6130
5725
  var DEFAULT_CONFIG = {
6131
5726
  defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
6132
5727
  profiles: {}
6133
5728
  };
6134
5729
  function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
6135
- if (existsSync3(path2))
5730
+ if (existsSync4(path2))
6136
5731
  return;
6137
5732
  const directory = dirname(path2);
6138
- mkdirSync2(directory, { recursive: true, mode: 448 });
5733
+ mkdirSync(directory, { recursive: true, mode: 448 });
6139
5734
  const temporary = mkdtempSync(join4(directory, ".config-"));
6140
5735
  const candidate = join4(temporary, "config.json");
6141
5736
  try {
6142
- writeFileSync2(candidate, `${JSON.stringify(config, null, 2)}
5737
+ writeFileSync(candidate, `${JSON.stringify(config, null, 2)}
6143
5738
  `, { flag: "wx", mode: 384 });
6144
5739
  try {
6145
5740
  linkSync(candidate, path2);
@@ -6148,12 +5743,12 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
6148
5743
  throw error;
6149
5744
  }
6150
5745
  } finally {
6151
- rmSync2(temporary, { recursive: true, force: true });
5746
+ rmSync(temporary, { recursive: true, force: true });
6152
5747
  }
6153
5748
  }
6154
5749
  __name(ensureDefaultConfig, "ensureDefaultConfig");
6155
5750
 
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
5751
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
6157
5752
  var isNode2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
6158
5753
  var parentOf = /* @__PURE__ */ __name((config, key) => {
6159
5754
  const path2 = key.split(".");
@@ -6175,7 +5770,7 @@ var withSettingDefaults = /* @__PURE__ */ __name((raw, declared) => {
6175
5770
  return { config, added };
6176
5771
  }, "withSettingDefaults");
6177
5772
 
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
5773
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/settings.js
6179
5774
  var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
6180
5775
  var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
6181
5776
  var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
@@ -6214,6 +5809,7 @@ var SHARED_PROFILE_ENTRIES = {
6214
5809
  record_input: optional(recordInputSetting),
6215
5810
  keep_runs_for_days: optional(count2),
6216
5811
  keep_successful_runs_for_days: optional(count2),
5812
+ keep_store_runs_for_days: optional(count2),
6217
5813
  runs_size_limit_mb: optional(count2),
6218
5814
  permissions: optional(permissionLevels),
6219
5815
  sends_per_hour: optional(count2),
@@ -6224,6 +5820,7 @@ var SHARED_PROFILE_ENTRIES = {
6224
5820
  history_dialog_days: optional(historyDays),
6225
5821
  history_group_days: optional(historyDays),
6226
5822
  history_group_members_max: optional(count2),
5823
+ history_muted: optional(flag),
6227
5824
  picture_search: optional(flag),
6228
5825
  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
5826
  ...AI_ENTRIES
@@ -6239,6 +5836,7 @@ var MESSENGER_ONLY_SETTINGS = [
6239
5836
  "history_dialog_days",
6240
5837
  "history_group_days",
6241
5838
  "history_group_members_max",
5839
+ "history_muted",
6242
5840
  "read_other_bots",
6243
5841
  "speech_model",
6244
5842
  "picture_search"
@@ -6272,6 +5870,11 @@ var SHARED_SETTINGS = [
6272
5870
  default: KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
6273
5871
  description: "days a successful run is kept"
6274
5872
  },
5873
+ {
5874
+ key: "keep_store_runs_for_days",
5875
+ default: KEEP_STORE_RUNS_FOR_DAYS,
5876
+ description: "days a successful run that wrote the store is kept, even unrecorded"
5877
+ },
6275
5878
  { key: "runs_size_limit_mb", default: RUNS_SIZE_LIMIT_MB, description: "the most megabytes all runs may take" },
6276
5879
  { key: "sender_colors", default: false, description: "color each sender's name in a conversation" },
6277
5880
  { key: "search_catch_up", default: false, description: "prepare local search after a gaps repair" },
@@ -6290,6 +5893,7 @@ var SHARED_SETTINGS = [
6290
5893
  default: DEFAULT_HISTORY_LIMITS.groupMembersMax,
6291
5894
  description: "a group with more people than this keeps no pushed history"
6292
5895
  },
5896
+ { key: "history_muted", default: false, description: "messages sync --all reads muted chats too" },
6293
5897
  {
6294
5898
  key: "picture_search",
6295
5899
  default: false,
@@ -6414,7 +6018,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6414
6018
  const env = options.env ?? process.env;
6415
6019
  const configPath = configPathFor(options);
6416
6020
  try {
6417
- if (!options.readOnly)
6021
+ if (!options.readOnly && !readOnlyLockOf(app, env))
6418
6022
  ensureDefaultConfig(configPath, withDefaults(DEFAULT_CONFIG).config);
6419
6023
  } catch (error) {
6420
6024
  throw new CliError("configuration_error", error instanceof Error ? error.message : String(error));
@@ -6435,11 +6039,11 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6435
6039
  const name = usableProfileName(profile.value);
6436
6040
  const configured = config.profiles[name] ?? {};
6437
6041
  const shared = config.defaults ?? {};
6438
- const section = config[kind2];
6042
+ const section2 = config[kind2];
6439
6043
  const layers = [
6440
- [`config file: ${kind2}.profiles.${name}`, section?.profiles?.[name]],
6044
+ [`config file: ${kind2}.profiles.${name}`, section2?.profiles?.[name]],
6441
6045
  [extension.sourcePaths ? `config file: profiles.${name}` : "config file", configured],
6442
- [`config file: ${kind2}.defaults`, section?.defaults],
6046
+ [`config file: ${kind2}.defaults`, section2?.defaults],
6443
6047
  [extension.sourcePaths ? "config file: defaults" : "config defaults", shared]
6444
6048
  ];
6445
6049
  const fromLayers = /* @__PURE__ */ __name((key, fallback, only = layers) => first(only.map(([from, scope]) => [from, scope?.[key]]), fallback), "fromLayers");
@@ -6453,11 +6057,13 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6453
6057
  const historyDialogDays = fromLayers("history_dialog_days", DEFAULT_HISTORY_LIMITS.dialogDays);
6454
6058
  const historyGroupDays = fromLayers("history_group_days", DEFAULT_HISTORY_LIMITS.groupDays);
6455
6059
  const historyGroupMembersMax = fromLayers("history_group_members_max", DEFAULT_HISTORY_LIMITS.groupMembersMax);
6060
+ const historyMuted = fromLayers("history_muted", false);
6456
6061
  const pictureSearch = fromLayers("picture_search", false);
6457
6062
  const searchReranker = fromLayers("search_reranker", DEFAULT_RERANK_MODEL);
6458
6063
  const recordInput = fromLayers("record_input", true);
6459
6064
  const keepRunsForDays = fromLayers("keep_runs_for_days", DEFAULT_KEEP_RUNS_FOR_DAYS);
6460
6065
  const keepSuccessfulRunsForDays = fromLayers("keep_successful_runs_for_days", KEEP_SUCCESSFUL_RUNS_FOR_DAYS);
6066
+ const keepStoreRunsForDays = fromLayers("keep_store_runs_for_days", KEEP_STORE_RUNS_FOR_DAYS);
6461
6067
  const runsSizeLimitMb = fromLayers("runs_size_limit_mb", RUNS_SIZE_LIMIT_MB);
6462
6068
  const readOnlyLock = readOnlyLockOf(app, env);
6463
6069
  const sendsPerHour = kind2 === "bot" ? fromLayers("sends_per_hour", Number.POSITIVE_INFINITY, kindLayers) : fromLayers("sends_per_hour", DEFAULT_SENDS_PER_HOUR);
@@ -6500,6 +6106,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6500
6106
  groupDays: historyGroupDays.value,
6501
6107
  groupMembersMax: historyGroupMembersMax.value
6502
6108
  },
6109
+ historyMuted: historyMuted.value,
6503
6110
  pictureSearch: pictureSearch.value,
6504
6111
  searchReranker: searchReranker.value,
6505
6112
  limit: limit.value,
@@ -6512,6 +6119,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6512
6119
  keepFailedRuns: record2.value || record2.from !== "flag",
6513
6120
  keepRunsForDays: keepRunsForDays.value,
6514
6121
  keepSuccessfulRunsForDays: keepSuccessfulRunsForDays.value,
6122
+ keepStoreRunsForDays: keepStoreRunsForDays.value,
6515
6123
  runsSizeLimitMb: runsSizeLimitMb.value,
6516
6124
  ...readOnlyLock ? { readOnlyLock } : {},
6517
6125
  permissions: permissions.levels,
@@ -6523,7 +6131,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6523
6131
  updateCheck: updateCheck.value,
6524
6132
  skillHint: skillHint.value,
6525
6133
  configPath,
6526
- configFound: existsSync4(configPath),
6134
+ configFound: existsSync5(configPath),
6527
6135
  configuredProfiles: namedProfiles(config),
6528
6136
  profilesHere: profilesOf(config, env),
6529
6137
  accountProfiles: accountsOf(config, env, bots),
@@ -6540,12 +6148,14 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
6540
6148
  historyDialogDays: historyDialogDays.from,
6541
6149
  historyGroupDays: historyGroupDays.from,
6542
6150
  historyGroupMembersMax: historyGroupMembersMax.from,
6151
+ historyMuted: historyMuted.from,
6543
6152
  pictureSearch: pictureSearch.from,
6544
6153
  searchReranker: searchReranker.from,
6545
6154
  record: record2.from,
6546
6155
  recordInput: recordInput.from,
6547
6156
  keepRunsForDays: keepRunsForDays.from,
6548
6157
  keepSuccessfulRunsForDays: keepSuccessfulRunsForDays.from,
6158
+ keepStoreRunsForDays: keepStoreRunsForDays.from,
6549
6159
  runsSizeLimitMb: runsSizeLimitMb.from,
6550
6160
  sendsPerHour: sendsPerHour.from,
6551
6161
  requestsPerMinute: requestsPerMinute.from,
@@ -6685,12 +6295,12 @@ var given = /* @__PURE__ */ __name((value) => {
6685
6295
  return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
6686
6296
  }, "given");
6687
6297
 
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) => {
6298
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/context.js
6299
+ var runBudgetOf = /* @__PURE__ */ __name((command, requests2) => {
6690
6300
  const { deadline, signal, app } = environmentOf(command);
6691
6301
  const now = deadline?.();
6692
6302
  return runBudget({
6693
- ...requests === void 0 ? {} : { requests },
6303
+ ...requests2 === void 0 ? {} : { requests: requests2 },
6694
6304
  ...app?.requestMs === void 0 ? {} : { requestMs: app.requestMs },
6695
6305
  ...now ? { deadline: now } : {},
6696
6306
  ...signal ? { signal } : {}
@@ -6698,8 +6308,11 @@ var runBudgetOf = /* @__PURE__ */ __name((command, requests) => {
6698
6308
  }, "runBudgetOf");
6699
6309
  var setExitCode = /* @__PURE__ */ __name((command, code) => {
6700
6310
  const slot = environmentOf(command).exit;
6311
+ const request = commandServerRequest();
6701
6312
  if (slot)
6702
6313
  slot.code = code;
6314
+ else if (request)
6315
+ request.exitCode = code;
6703
6316
  else
6704
6317
  process.exitCode = code;
6705
6318
  }, "setExitCode");
@@ -6790,6 +6403,7 @@ var baseContext = /* @__PURE__ */ __name((command, resolveSettings) => {
6790
6403
  trace: settings.trace,
6791
6404
  keepDays: settings.keepRunsForDays,
6792
6405
  ...settings.keepSuccessfulRunsForDays === void 0 ? {} : { keepSuccessDays: settings.keepSuccessfulRunsForDays },
6406
+ ...settings.keepStoreRunsForDays === void 0 ? {} : { keepStoreDays: settings.keepStoreRunsForDays },
6793
6407
  ...settings.runsSizeLimitMb === void 0 ? {} : { maxBytes: settings.runsSizeLimitMb * 1024 * 1024 },
6794
6408
  processRun: !environment.agent,
6795
6409
  format,
@@ -6817,7 +6431,7 @@ var commandPath = /* @__PURE__ */ __name((command) => {
6817
6431
  return words2.join(" ");
6818
6432
  }, "commandPath");
6819
6433
 
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
6434
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/effects.js
6821
6435
  var REMOTE_READ = { remote: "read", local: "read" };
6822
6436
  var FETCH = { remote: "read", local: "write" };
6823
6437
  var REMOTE_WRITE = { remote: "write", local: "write" };
@@ -6949,7 +6563,7 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
6949
6563
  throw readOnlyRefusal(lock, what);
6950
6564
  }, "refuseUnderReadOnly");
6951
6565
 
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
6566
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/account.js
6953
6567
  var account = strictObject({
6954
6568
  provider: text,
6955
6569
  id,
@@ -6959,7 +6573,7 @@ var account = strictObject({
6959
6573
  scope: optional(picklist(["personal", "work"]))
6960
6574
  });
6961
6575
 
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
6576
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/account-session.js
6963
6577
  var accountSession = strictObject({
6964
6578
  current: boolean(),
6965
6579
  client: nullable(text),
@@ -6969,7 +6583,7 @@ var accountSession = strictObject({
6969
6583
  created_at: optional(nullable(time))
6970
6584
  });
6971
6585
 
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
6586
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/account-change.js
6973
6587
  var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
6974
6588
  var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
6975
6589
  var audience = picklist(["everyone", "contacts", "nobody"]);
@@ -6998,7 +6612,7 @@ var accountRemoval = strictObject({
6998
6612
  kept: array(strictObject({ kind: removalKind, target: text, reason: text }))
6999
6613
  });
7000
6614
 
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
6615
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
7002
6616
  var accountProfile = strictObject({
7003
6617
  profile: id,
7004
6618
  current: boolean(),
@@ -7010,7 +6624,7 @@ var accountProfile = strictObject({
7010
6624
  bot: optional(literal(true))
7011
6625
  });
7012
6626
 
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
6627
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
7014
6628
  var milliseconds = pipe(number(), minValue(0));
7015
6629
  var counterReading = strictObject({
7016
6630
  counter: picklist(["views", "reactions", "comments"]),
@@ -7022,7 +6636,7 @@ var counterReading = strictObject({
7022
6636
  });
7023
6637
  var selection = record(string(), unknown());
7024
6638
 
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
6639
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
7026
6640
  var adminRow = strictObject({
7027
6641
  ref: reference,
7028
6642
  /** What `stats * evidence` takes: a person id, a stay or a message locator. */
@@ -7075,7 +6689,7 @@ var adminReport = strictObject({
7075
6689
  rows: array(adminRow)
7076
6690
  });
7077
6691
 
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
6692
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/task.js
7079
6693
  var closeSuggestion = strictObject({
7080
6694
  as: picklist(["done", "dismissed"]),
7081
6695
  /** The agent's name. */
@@ -7137,7 +6751,7 @@ var task = strictObject({
7137
6751
  updated_at: optional(time)
7138
6752
  });
7139
6753
 
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
6754
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/agenda.js
7141
6755
  var agendaChat = strictObject({
7142
6756
  chat: reference,
7143
6757
  title: nullable(text),
@@ -7207,11 +6821,11 @@ var agenda = strictObject({
7207
6821
  unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
7208
6822
  });
7209
6823
 
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
6824
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
7211
6825
  var analysisConsent = strictObject({ chat: id, provider: text, at: time });
7212
6826
  var analysisConsentRevocation = strictObject({ revoked: boolean() });
7213
6827
 
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
6828
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/attachment.js
7215
6829
  var attachment = strictObject({
7216
6830
  /** The message it came with, as a locator; absent inside that message. */
7217
6831
  message: optional(reference),
@@ -7249,7 +6863,7 @@ var attachment = strictObject({
7249
6863
  });
7250
6864
  var hitFile = strictObject({ position: count, kind: text, name: optional(text), size: optional(count) });
7251
6865
 
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
6866
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
7253
6867
  var actionableError = objectWithRest({
7254
6868
  code: text,
7255
6869
  message: text,
@@ -7266,7 +6880,7 @@ var batchResult = strictObject({
7266
6880
  max_error_percent: count
7267
6881
  });
7268
6882
 
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
6883
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
7270
6884
  var extractionItem = strictObject({
7271
6885
  ref: reference,
7272
6886
  attachment: count,
@@ -7299,7 +6913,7 @@ var extractionReport = strictObject({
7299
6913
  cursor: optional(text)
7300
6914
  });
7301
6915
 
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
6916
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
7303
6917
  var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
7304
6918
  var attachmentBytes = strictObject({
7305
6919
  ref: reference,
@@ -7327,22 +6941,82 @@ var attachmentTextChange = strictObject({
7327
6941
  replaced: nullable(picklist(["extracted", "agent"]))
7328
6942
  });
7329
6943
 
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 }))
6944
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
6945
+ var WEIGHTS = {
6946
+ bot: 3,
6947
+ scam: 3,
6948
+ fake: 3,
6949
+ deleted: 1,
6950
+ no_photo: 1,
6951
+ no_username: 1,
6952
+ odd_name: 1,
6953
+ never_wrote: 1,
6954
+ link_first: 2,
6955
+ burst_join: 1,
6956
+ mass_invited: 1,
6957
+ new_account: 2,
6958
+ no_bio: 1,
6959
+ same_text: 2,
6960
+ photo_recent: 1,
6961
+ cas_banned: 3,
6962
+ lols_banned: 3,
6963
+ lols_scammer: 3
6964
+ };
6965
+ var LINK = /https?:\/\/|t\.me\/|www\./i;
6966
+ var DIGITS = /\d{5,}/;
6967
+ var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
6968
+
6969
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
6970
+ var linkedIdentity = strictObject({
6971
+ provider: text,
6972
+ id,
6973
+ name: nullable(text),
6974
+ username: nullable(text),
6975
+ phone: optional(nullable(text)),
6976
+ email: optional(nullable(text)),
6977
+ is_bot: nullable(boolean()),
6978
+ accounts: array(id),
6979
+ seen_in: array(strictObject({ account: id, scope: picklist(["personal", "work"]) })),
6980
+ method: text,
6981
+ linked_by: text,
6982
+ linked_at: time
6983
+ });
6984
+ var linkedPerson = strictObject({
6985
+ uid: id,
6986
+ name: nullable(text),
6987
+ identities: array(linkedIdentity),
6988
+ /** An agent's link: the `identity_link` proposal the owner decides; the person is still as it was. */
6989
+ proposal: optional(text)
6990
+ });
6991
+ var contactActivity = strictObject({
6992
+ at: time,
6993
+ subject: text,
6994
+ subject_id: count,
6995
+ role: text,
6996
+ scope: text,
6997
+ provider: nullable(text),
6998
+ account: nullable(text),
6999
+ chat_id: nullable(text),
7000
+ locator: nullable(text),
7001
+ project_id: nullable(count)
7002
+ });
7003
+ var botReason = picklist(Object.keys(WEIGHTS));
7004
+ var contactCheck = strictObject({
7005
+ person: strictObject({ id, name: nullable(text), username: nullable(text), provider: text }),
7006
+ score: count,
7007
+ reasons: array(strictObject({ reason: botReason, weight: count, source: text, detail: optional(text) })),
7008
+ registries: array(strictObject({
7009
+ name: picklist(["cas", "lols"]),
7010
+ answer: picklist(["listed", "clean", "unknown"]),
7011
+ checked_at: time,
7012
+ detail: optional(text),
7013
+ reasons: optional(array(picklist(["cas_banned", "lols_banned", "lols_scammer"])))
7014
+ })),
7015
+ unknown: array(botReason),
7016
+ checked_at: time
7343
7017
  });
7344
7018
 
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
7019
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/member.js
7346
7020
  var member = strictObject({
7347
7021
  id,
7348
7022
  name: nullable(text),
@@ -7365,7 +7039,7 @@ var member = strictObject({
7365
7039
  check: optional(record(string(), unknown()))
7366
7040
  });
7367
7041
 
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
7042
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat.js
7369
7043
  var setting = optional(nullable(boolean()));
7370
7044
  var chat = strictObject({
7371
7045
  ref: reference,
@@ -7406,758 +7080,976 @@ var chat = strictObject({
7406
7080
  members: optional(array(member))
7407
7081
  });
7408
7082
 
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({
7083
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message.js
7084
+ var quoted = strictObject({
7411
7085
  id,
7412
- title: nullable(text),
7413
- kind: nullable(picklist(["dialog", "group", "channel", "saved", "unknown"]))
7086
+ sender_id: nullable(id),
7087
+ sender_name: nullable(text),
7088
+ timestamp: nullable(time),
7089
+ text,
7090
+ attachments: array(attachment),
7091
+ outgoing: nullable(boolean())
7414
7092
  });
7415
- var folder = strictObject({
7093
+ var mailPerson = strictObject({ name: nullable(text), address: text, ref: nullable(reference) });
7094
+ var message = strictObject({
7095
+ /** The message's locator. */
7096
+ ref: reference,
7416
7097
  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. */
7436
- approval: boolean(),
7437
- /** `null` when it never expires. */
7438
- expires_at: nullable(time),
7439
- /** `null` for no limit. */
7440
- max_uses: nullable(count),
7441
- /** The group's own link; revoking it makes the messenger issue a new one. */
7442
- primary: optional(boolean()),
7443
- revoked: optional(boolean()),
7444
- pending_count: optional(count),
7445
- joined_count: optional(count)
7446
- });
7447
-
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
7449
- var operated = { operation_id: id, chat_id: id };
7450
- var group = strictObject({
7451
- ...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
7452
- parent_chat_id: optional(nullable(id)),
7453
- muted_until: optional(nullable(time)),
7454
- description: nullable(text),
7455
- link: nullable(text),
7456
- settings: strictObject({
7457
- ...unwrap(chat.entries.settings).entries,
7458
- all_can_pin: nullable(boolean()),
7459
- only_admins_add: nullable(boolean()),
7460
- only_admins_call: nullable(boolean()),
7461
- only_owner_edits_info: nullable(boolean()),
7462
- members_see_link: nullable(boolean())
7463
- })
7464
- });
7465
- var chatGroupChange = union([
7466
- strictObject({ operation_id: id, chat: group }),
7467
- strictObject({ operation_id: id, requested: literal(true) })
7468
- ]);
7469
- var chatInspection = strictObject({
7470
- kind: chat.entries.kind,
7471
- title: nullable(text),
7472
- id: nullable(id),
7473
- username: nullable(text),
7474
- participants_count: nullable(count),
7475
- description: nullable(text),
7476
- member: nullable(boolean()),
7477
- approval_needed: optional(boolean())
7478
- });
7479
- var chatSender = strictObject({
7480
- id,
7481
- title: text,
7482
- kind: picklist(["self", "channel", "group"]),
7483
- premium_required: boolean(),
7484
- default: boolean()
7485
- });
7486
- var chatRead = strictObject({ ...operated, until: nullable(id), thread_id: optional(id) });
7487
- var chatMembersFetch = strictObject({
7098
+ provider: optional(text),
7099
+ account: optional(text),
7488
7100
  chat_id: id,
7489
- joined: array(id),
7490
- gone: array(id),
7491
- changed: array(id),
7492
- read: count,
7493
- participants: nullable(count),
7494
- complete: boolean(),
7495
- more: boolean(),
7496
- tracked: boolean()
7497
- });
7498
- 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")]))
7101
+ chat_title: optional(nullable(text)),
7102
+ sender_id: nullable(id),
7103
+ sender_name: nullable(text),
7104
+ sender_username: optional(text),
7105
+ sender_is_chat: optional(boolean()),
7106
+ sender_is_me: boolean(),
7107
+ mentions: optional(array(id)),
7108
+ /** When it was sent. */
7109
+ timestamp: time,
7110
+ edited_at: nullable(time),
7111
+ text,
7112
+ /** What a voice message says, once heard. */
7113
+ transcript: optional(text),
7114
+ /** In a window of messages around one, the one asked for. */
7115
+ anchor: optional(boolean()),
7116
+ /** A stretch of the text, transcript, file name or file text around what a search matched. */
7117
+ excerpt: optional(text),
7118
+ /** `picture`: the picture search lane found it by what the picture shows; it follows the text hits. */
7119
+ matched_in: optional(picklist(["text", "transcript", "filename", "file", "context", "picture"])),
7120
+ score: optional(number()),
7121
+ /**
7122
+ * `corrected`: a query word matched only a spelling speech recognition garbled in a voice note's transcript,
7123
+ * listed in `corrections`. `words` and `beginnings`: what a discovery search matched.
7124
+ */
7125
+ match: optional(picklist(["words", "beginnings", "corrected"])),
7126
+ corrections: optional(array(strictObject({ from: text, to: array(text) }))),
7127
+ /** Where a search found it: the local archive, the messenger's server, or both. */
7128
+ found_in: optional(picklist(["archive", "server", "both"])),
7129
+ /** A discovery search's partial match: how much of the question it covers, and which words it lacks. */
7130
+ discovery: optional(strictObject({
7131
+ coverage: number(),
7132
+ matched_terms: array(text),
7133
+ missing_terms: array(text),
7134
+ parent: optional(reference),
7135
+ /** Present when meaning was searched too: which of the two lists found it. */
7136
+ found_by: optional(array(picklist(["words", "meaning"]))),
7137
+ /** Present when the reranker read it: its own score, higher is better. It ordered the first hits with `score`. */
7138
+ reranker_score: optional(number())
7139
+ })),
7140
+ /** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
7141
+ context: optional(array(strictObject({ ref: reference, timestamp: time, sender_name: nullable(text), text }))),
7142
+ /**
7143
+ * A discovery hit's later messages, from any chat the search reads, that share a rare word with it, latest first:
7144
+ * one may change or cancel what the hit says. An excerpt, as the hit's own: `messages context <ref>` has the whole text.
7145
+ */
7146
+ follow_ups: optional(array(strictObject({
7147
+ ref: reference,
7148
+ chat_title: nullable(text),
7149
+ timestamp: time,
7150
+ sender_name: nullable(text),
7151
+ excerpt: text
7152
+ }))),
7153
+ outgoing: nullable(boolean()),
7154
+ attachments: array(attachment),
7155
+ reply_to: nullable(quoted),
7156
+ /** The id a reply answers, also when the provider sent no copy of that message. */
7157
+ reply_to_id: optional(id),
7158
+ forwarded_from: nullable(quoted),
7159
+ thread_id: optional(id),
7160
+ thread_root_id: optional(id),
7161
+ reactions: optional(nullable(strictObject({
7162
+ counts: array(strictObject({ reaction: text, count })),
7163
+ mine: nullable(text),
7164
+ total: count
7165
+ }))),
7166
+ scheduled_for: optional(time),
7167
+ /** The owner starred it; only where the messenger has stars, and only when set. */
7168
+ starred: optional(literal(true)),
7169
+ /** The owner's own message in a one-to-one chat: `delivered`, or `read` once opened; absent when no receipt came. */
7170
+ delivery: optional(picklist(["delivered", "read"])),
7171
+ email: optional(strictObject({
7172
+ subject: nullable(text),
7173
+ from: nullable(mailPerson),
7174
+ to: array(mailPerson),
7175
+ cc: array(mailPerson),
7176
+ bcc: array(mailPerson),
7177
+ /** The mail header Reply-To; `reply_to` is the quoted message a chat reply answers. */
7178
+ reply_addresses: array(mailPerson),
7179
+ labels: array(text),
7180
+ /** The thread as a `chat:` reference. */
7181
+ thread: reference,
7182
+ read: nullable(boolean()),
7183
+ flagged: nullable(boolean()),
7184
+ /** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
7185
+ sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) })),
7186
+ /** Mail `review`: filed in the mailbox of mail sent to many. */
7187
+ bulk: optional(boolean()),
7188
+ /** Mail `review`: its List-Id, `null` when it has none. */
7189
+ list_id: optional(nullable(text)),
7190
+ /** Mail `review`: the mail rule that decided how it is stored, by its id in `rules list`; `null` when none. */
7191
+ rule_id: optional(nullable(number())),
7192
+ /** Mail `review`: the evidence fingerprint a finding cites this email by. */
7193
+ fingerprint: optional(pipe(text, regex(/^[a-f0-9]{64}$/))),
7194
+ /** Mail `review`: no earlier stored email, in any account, came from this address. */
7195
+ new_sender: optional(boolean()),
7196
+ /** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
7197
+ sender_identities: optional(number())
7198
+ })),
7199
+ provider_metadata: providerMetadata
7534
7200
  });
7535
- var chatArchive = strictObject({ ...operated2, archived: boolean() });
7536
- var chatPin = strictObject({ ...operated2, pinned: boolean() });
7537
- var chatUnread = strictObject({ ...operated2, unread: literal(true) });
7538
7201
 
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({
7202
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
7203
+ var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
7204
+ var contextMessage = strictObject({
7205
+ locator: reference,
7206
+ provider: text,
7207
+ account: id,
7542
7208
  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) }))
7209
+ chat_title: nullable(text),
7210
+ id,
7211
+ timestamp: time,
7212
+ sender_id: nullable(id),
7213
+ sender_name: nullable(text),
7214
+ outgoing: nullable(boolean()),
7215
+ text
7554
7216
  });
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({
7217
+ var sharedChat = strictObject({
7218
+ provider: text,
7219
+ account: id,
7558
7220
  chat_id: id,
7559
7221
  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()
7222
+ kind: chat.entries.kind,
7223
+ last_message_at: nullable(time)
7569
7224
  });
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,
7225
+ var contextEvent = strictObject({
7226
+ ref: reference,
7576
7227
  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
- }))
7228
+ starts_at: nullable(time),
7229
+ ends_at: nullable(time),
7230
+ all_day: boolean(),
7231
+ location: nullable(text),
7232
+ status: nullable(text)
7606
7233
  });
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"])
7234
+ var context = strictObject({
7235
+ person: contextPerson,
7236
+ /** The accounts read: only those of the scopes the caller may read. */
7237
+ accounts: array(strictObject({ provider: text, account: id, scope: picklist(["personal", "work"]) })),
7238
+ shared: array(sharedChat),
7239
+ last: strictObject({
7240
+ from_them: nullable(contextMessage),
7241
+ from_me: nullable(contextMessage),
7242
+ from_them_anywhere: nullable(contextMessage)
7645
7243
  }),
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. */
7244
+ recent: strictObject({ direct: array(contextMessage), groups: array(contextMessage) }),
7245
+ mentions: array(contextMessage),
7246
+ /** Calendar events they are invited to, one occurrence per series. */
7247
+ events: optional(strictObject({ upcoming: array(contextEvent), recent: array(contextEvent) })),
7248
+ limits: strictObject({ messages: count, bytes: count }),
7249
+ complete: boolean(),
7250
+ not_read: array(strictObject({
7251
+ provider: text,
7252
+ account: id,
7253
+ chat_id: id,
7254
+ title: nullable(text),
7255
+ reason: picklist(["not_fetched", "partial"])
7256
+ }))
7257
+ });
7258
+ var shortMessage = strictObject({ at: time, text, transcript: optional(text) });
7259
+ var identifiedMessage = strictObject({
7260
+ ...shortMessage.entries,
7261
+ id,
7262
+ locator: reference,
7263
+ sender_id: nullable(id),
7264
+ reply_to: nullable(id)
7265
+ });
7266
+ var counterObservation = strictObject({
7267
+ value: number(),
7268
+ observed_at: time,
7269
+ source: picklist(["remote_fetch", "remote_update"]),
7270
+ reactions: optional(message.entries.reactions.wrapped.wrapped)
7271
+ });
7272
+ var { reply_addresses: mailReplyTo, ...mailFields } = message.entries.email.wrapped.entries;
7273
+ var fullMessage = strictObject({
7274
+ ...pick(message, [
7275
+ "id",
7276
+ "chat_id",
7277
+ "chat_title",
7278
+ "excerpt",
7279
+ "sender_id",
7280
+ "sender_name",
7281
+ "sender_username",
7282
+ "mentions",
7283
+ "sender_is_chat",
7284
+ "timestamp",
7285
+ "edited_at",
7286
+ "text",
7287
+ "outgoing",
7288
+ "attachments",
7289
+ "reply_to",
7290
+ "reply_to_id",
7291
+ "forwarded_from",
7292
+ "thread_id",
7293
+ "thread_root_id",
7294
+ "scheduled_for",
7295
+ "provider_metadata",
7296
+ "delivery"
7297
+ ]).entries,
7298
+ reactions: nullable(message.entries.reactions.wrapped.wrapped),
7299
+ starred: optional(boolean()),
7300
+ email: optional(strictObject({ ...mailFields, reply_to: mailReplyTo })),
7301
+ counter_observations: optional(partial(strictObject({
7302
+ views: counterObservation,
7303
+ reactions: counterObservation,
7304
+ comments: counterObservation
7305
+ }))),
7306
+ ...shortMessage.entries,
7307
+ locator: reference
7308
+ });
7309
+ var contactMessages = strictObject({
7310
+ person: strictObject({ uid: id, provider: text, id, name: nullable(text) }),
7311
+ chats: array(strictObject({
7312
+ chat: pick(chat, ["id", "title", "kind"]),
7313
+ messages: array(union([shortMessage, identifiedMessage, fullMessage])),
7314
+ complete: boolean(),
7655
7315
  more: boolean()
7656
7316
  })),
7657
- series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
7317
+ limits: strictObject({ messages: count })
7658
7318
  });
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
- }))
7319
+ var contactContext = union([context, contactMessages]);
7320
+ var coverage = strictObject({
7321
+ included: count,
7322
+ has_more: boolean(),
7323
+ cut_by: nullable(picklist(["limit", "bytes"]))
7324
+ });
7325
+ var meetingCue = strictObject({
7326
+ reference,
7327
+ fingerprint: text,
7328
+ transcript_id: count,
7329
+ content_hash: nullable(text),
7330
+ position: count,
7331
+ start_ms: count,
7332
+ end_ms: count,
7333
+ speaker_participant_id: nullable(count),
7334
+ speaker_name: nullable(text),
7335
+ text,
7336
+ revision: picklist(["current", "superseded"])
7337
+ });
7338
+ var scopes2 = array(picklist(["personal", "work"]));
7339
+ var contactPreparation = strictObject({
7340
+ ...context.entries,
7341
+ prepare: strictObject({
7342
+ waiting: array(strictObject({
7343
+ provider: text,
7344
+ account: id,
7345
+ chat_id: id,
7346
+ title: nullable(text),
7347
+ message: contextMessage,
7348
+ partial: boolean()
7349
+ })),
7350
+ tasks: array(strictObject({
7351
+ ref: reference,
7352
+ title: text,
7353
+ role: text,
7354
+ due_at: nullable(time),
7355
+ project: reference,
7356
+ source: nullable(reference),
7357
+ created_at: time
7358
+ })),
7359
+ facts: array(strictObject({
7360
+ ref: reference,
7361
+ type: text,
7362
+ statement: text,
7363
+ subject: nullable(reference),
7364
+ project: nullable(reference),
7365
+ updated_at: time
7366
+ })),
7367
+ notes: array(strictObject({ ref: reference, title: nullable(text), text, revision: count, updated_at: time })),
7368
+ meetings: array(strictObject({
7369
+ reference,
7370
+ cues: array(meetingCue),
7371
+ cue_coverage: strictObject({ included: count, omitted: nullable(count), has_more: boolean() })
7372
+ })),
7373
+ limits: strictObject({ items: count, bytes: count }),
7374
+ coverage: strictObject({
7375
+ waiting: strictObject({
7376
+ ...coverage.entries,
7377
+ rule: literal("their message is the newest the store holds in a one-to-one chat")
7378
+ }),
7379
+ tasks: strictObject({
7380
+ ...coverage.entries,
7381
+ selection: literal("open, assigned to them in any role"),
7382
+ accounts: array(text),
7383
+ scopes: scopes2
7384
+ }),
7385
+ facts: strictObject({
7386
+ ...coverage.entries,
7387
+ selection: literal("accepted, about them or a project they are a member of"),
7388
+ scopes: scopes2
7389
+ }),
7390
+ notes: strictObject({
7391
+ ...coverage.entries,
7392
+ selection: literal("written by you, about them"),
7393
+ scopes: scopes2,
7394
+ withheld: optional(literal("contacts.notes.list"))
7395
+ }),
7396
+ meetings: strictObject({
7397
+ ...coverage.entries,
7398
+ read: literal("every account of the store that saw them"),
7399
+ accounts: array(text),
7400
+ pending: count
7401
+ })
7402
+ })
7403
+ })
7680
7404
  });
7681
7405
 
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()
7406
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/deal.js
7407
+ var nullableText = nullable(text);
7408
+ var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
7409
+ var outcome = picklist(["open", "won", "lost"]);
7410
+ var crmAccount = nullable(strictObject({ provider: text, account: text }));
7411
+ var day = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
7412
+ var deal = strictObject({
7413
+ id,
7414
+ ref: reference,
7415
+ kind: picklist(["deal", "lead"]),
7416
+ title: text,
7417
+ /** One line with the stage, amount and status. */
7418
+ summary: text,
7419
+ pipeline: reference,
7420
+ pipeline_name: text,
7421
+ stage: text,
7422
+ /** The base stage `stage` maps to, once the owner confirmed it; `null` while unsorted. */
7423
+ base_stage: nullable(strictObject({ ref: reference, name: text })),
7424
+ status: outcome,
7425
+ organization: nullable(party),
7426
+ currency: nullableText,
7427
+ amount: nullableText,
7428
+ close_date: day,
7429
+ closed_date: day,
7430
+ closed_reason: nullableText,
7431
+ rank: nullable(number()),
7432
+ /** A lead's deal, once it became one. */
7433
+ deal: nullable(reference),
7434
+ /** The CRM account it is a copy from; `null` for the owner's own. */
7435
+ account: crmAccount,
7436
+ external_id: nullableText,
7437
+ /** A CRM copy's assignee, the identity `<account>/user/<id>`. */
7438
+ assignee: nullableText,
7439
+ /** A CRM copy's own fields by code; a list field's value is its option's label, `option_id` its id. */
7440
+ provider_metadata: record(string(), strictObject({
7441
+ label: nullable(string()),
7442
+ value: unknown(),
7443
+ option_id: optional(union([string(), array(string())]))
7444
+ })),
7445
+ people: array(strictObject({ ...party.entries, role: picklist(DEAL_ROLES) })),
7446
+ author: strictObject({
7447
+ type: picklist(["person", "bot"]),
7448
+ id,
7449
+ name: nullableText,
7450
+ kind: nullable(picklist(["agent", "rule"]))
7451
+ }),
7452
+ model: nullableText,
7453
+ source: text,
7454
+ reason: nullableText,
7455
+ evidence: array(reference),
7456
+ project: nullable(reference),
7457
+ project_name: nullableText,
7458
+ created_at: time,
7459
+ updated_at: time,
7460
+ untrusted
7688
7461
  });
7689
- var trackedChat = strictObject({
7690
- chat_id: id,
7691
- title: nullable(text),
7692
- tracked_at: time,
7693
- last_count: nullable(memberCount)
7462
+ var lead = deal;
7463
+ var pipelineStage = strictObject({
7464
+ name: text,
7465
+ position: count,
7466
+ outcome,
7467
+ external_id: nullableText,
7468
+ /** Open deals or leads in it now. */
7469
+ open: count,
7470
+ /** With a funnel: rows that got this far, and the share of them that reached the next stage. */
7471
+ reached: optional(count),
7472
+ conversion: optional(nullable(number())),
7473
+ /** With a funnel: rows standing in it now, and their sum per currency, never converted. */
7474
+ items: optional(count),
7475
+ amounts: optional(array(strictObject({ amount: text, currency: text, items: count })))
7694
7476
  });
7695
- var trackedChatHistory = strictObject({
7696
- chat_id: id,
7697
- tracked_at: nullable(time),
7698
- counts: array(memberCount)
7477
+ var pipeline = strictObject({
7478
+ id,
7479
+ ref: reference,
7480
+ name: text,
7481
+ kind: picklist(["deal", "lead"]),
7482
+ account: crmAccount,
7483
+ external_id: nullableText,
7484
+ stages: array(pipelineStage),
7485
+ created_at: time,
7486
+ totals: optional(strictObject({ items: count, open: count, won: count, lost: count, win_rate: nullable(number()) })),
7487
+ since: optional(day),
7488
+ untrusted
7699
7489
  });
7700
- var chatTracking = strictObject({
7701
- chat_id: id,
7702
- tracked: boolean()
7490
+ var stage = strictObject({
7491
+ ...pipelineStage.entries,
7492
+ pipeline: reference,
7493
+ pipeline_name: text,
7494
+ kind: picklist(["deal", "lead"]),
7495
+ untrusted
7703
7496
  });
7704
7497
 
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()
7498
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/business-context.js
7499
+ var nullableText2 = nullable(text);
7500
+ var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
7501
+ var standing = picklist(STANDINGS);
7502
+ var categories = array(picklist(CATEGORIES));
7503
+ var section = /* @__PURE__ */ __name((item) => strictObject({ items: array(item), total: count, has_more: boolean(), next: nullableText2 }), "section");
7504
+ var relationRole = strictObject({
7505
+ /** `link:<id>`; absent for a proposal. */
7506
+ link: optional(reference),
7507
+ /** A `relationship` proposal waiting for the owner: its id, with `standing: proposed`. */
7508
+ proposal: optional(text),
7509
+ kind: picklist(RELATION_KINDS),
7510
+ role: nullableText2,
7511
+ /** `reported`: a CRM account says so and nobody confirmed it; `ended`: it no longer holds. */
7512
+ standing,
7513
+ /** The source account that reported it, `<provider>:<account>`. */
7514
+ account: optional(text),
7515
+ /** A job title the source gave; never a role. */
7516
+ position: optional(text),
7517
+ /** How a source made it when it stated none, such as `department-head`. */
7518
+ derived: optional(text),
7519
+ starts_at: optional(time),
7520
+ ends_at: optional(time)
7521
+ });
7522
+ var related = strictObject({ ref: reference, name: nullableText2, roles: array(relationRole) });
7523
+ var coverage2 = strictObject({
7524
+ /** `<provider>:<account>` of every account read. */
7525
+ accounts: array(text),
7526
+ not_read: array(strictObject({ source: text, reason: text }))
7527
+ });
7528
+ var linkedBy = array(picklist(["project", "counterparty"]));
7529
+ var financeTotal = strictObject({
7530
+ status: text,
7531
+ currency: text,
7532
+ rows: count,
7533
+ total: text,
7534
+ open: optional(text)
7535
+ });
7536
+ var money = strictObject({
7537
+ invoices: section(strictObject({
7538
+ ref: reference,
7539
+ title: text,
7540
+ direction: picklist(INVOICE_DIRECTIONS),
7541
+ status: picklist(INVOICE_STATUSES),
7542
+ review: picklist(FINANCE_REVIEWS),
7543
+ currency: text,
7544
+ total: text,
7545
+ open: text,
7546
+ due_date: day2,
7547
+ linked_by: linkedBy
7721
7548
  })),
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"])
7549
+ payments: section(strictObject({
7550
+ ref: reference,
7551
+ title: text,
7552
+ direction: picklist(MONEY_DIRECTIONS),
7553
+ review: picklist(FINANCE_REVIEWS),
7554
+ currency: text,
7555
+ amount: text,
7556
+ date: day2,
7557
+ linked_by: linkedBy
7558
+ })),
7559
+ orders: optional(section(strictObject({
7560
+ ref: reference,
7561
+ title: text,
7562
+ status: picklist(ORDER_STATUSES),
7563
+ review: picklist(FINANCE_REVIEWS),
7564
+ currency: nullableText2,
7565
+ total: nullableText2,
7566
+ side: picklist(["customer", "supplier"])
7730
7567
  }))),
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
- };
7742
-
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({
7568
+ /** Confirmed rows only, per status (payments: direction) and currency; nothing converted. */
7569
+ totals: strictObject({ invoices: array(financeTotal), payments: array(financeTotal) }),
7570
+ /** Invoices and payments still proposed, of every row read. */
7571
+ unconfirmed: count,
7572
+ /** `false` when a read stopped at the store's page: the totals may leave rows out. */
7573
+ complete: boolean()
7574
+ });
7575
+ var taskLine = strictObject({
7576
+ ref: reference,
7577
+ key: text,
7578
+ title: text,
7579
+ status: picklist(TASK_STATES),
7580
+ project: reference,
7581
+ due_at: nullable(time)
7582
+ });
7583
+ var counts = { messages: count, mail: count, meetings: count };
7584
+ var personBusiness = strictObject({
7585
+ organizations: section(strictObject({ ...related.entries, categories })),
7586
+ reports_to: section(related),
7587
+ direct_reports: section(related),
7588
+ deals: section(related),
7589
+ projects: section(related),
7590
+ categories
7591
+ });
7592
+ var personContext = strictObject({
7593
+ ...context.entries,
7594
+ person: linkedPerson,
7595
+ has_more: boolean(),
7596
+ business: personBusiness,
7597
+ coverage: coverage2
7598
+ });
7599
+ var organizationContext = strictObject({
7600
+ organization: strictObject({ ...organization.entries, own: boolean() }),
7601
+ categories,
7602
+ people: section(related),
7603
+ customers: section(related),
7604
+ /** Whom it is a customer of: "supplier of", read backwards. */
7605
+ suppliers: section(related),
7606
+ partners: section(related),
7607
+ projects: section(strictObject({ ref: reference, name: text, via: array(picklist(["organization", "deal"])) })),
7608
+ deals: section(strictObject({
7609
+ ref: reference,
7610
+ kind: picklist(DEAL_KINDS),
7611
+ title: text,
7612
+ summary: text,
7613
+ stage: text,
7614
+ status: picklist(DEAL_STATUSES),
7615
+ currency: nullableText2,
7616
+ amount: nullableText2,
7617
+ close_date: day2,
7618
+ project: nullable(reference)
7619
+ })),
7620
+ money,
7621
+ /** Counts only, through its own people, in the accounts read. */
7622
+ communications: strictObject({ ...counts, has_more: boolean() }),
7623
+ tasks: section(taskLine),
7624
+ coverage: coverage2
7625
+ });
7626
+ var { untrusted: _, ...dealRow } = deal.entries;
7627
+ var dealContext = strictObject({
7628
+ deal: strictObject(dealRow),
7629
+ stages: section(strictObject({ from: nullableText2, to: text, pipeline: reference, at: time })),
7630
+ organization: nullable(strictObject({ ref: reference, name: nullableText2, categories })),
7631
+ participants: section(related),
7632
+ owner: nullable(related),
7633
+ project: nullable(strictObject({ ref: reference, name: nullableText2 })),
7634
+ money,
7635
+ window: strictObject({ since: time, until: time }),
7636
+ /** Shared people within its lifetime: `proposed`, an overlap of people, never a link. */
7637
+ communications: strictObject({
7638
+ ...section(strictObject({
7639
+ kind: picklist(["message", "mail", "meeting"]),
7640
+ ref: reference,
7641
+ title: nullableText2,
7642
+ at: nullable(time),
7643
+ people: array(reference),
7644
+ standing: literal("proposed")
7645
+ })).entries,
7646
+ counts: strictObject(counts)
7647
+ }),
7648
+ tasks: section(taskLine),
7649
+ coverage: coverage2
7650
+ });
7651
+ var dealBrief = strictObject({
7745
7652
  ref: reference,
7653
+ kind: picklist(DEAL_KINDS),
7654
+ title: text,
7655
+ pipeline: text,
7656
+ stage: text,
7657
+ status: picklist(DEAL_STATUSES),
7658
+ amount: nullableText2,
7659
+ currency: nullableText2,
7660
+ close_date: day2,
7661
+ organization: nullableText2,
7662
+ owner: nullableText2,
7663
+ people: array(strictObject({ ref: reference, name: nullableText2, roles: array(text), standing })),
7664
+ project: nullableText2,
7665
+ stages: array(text),
7666
+ money: strictObject({ ...money.entries.totals.entries, unconfirmed: count, complete: boolean() }),
7667
+ communications: strictObject({ ...counts, standing: literal("proposed") }),
7668
+ open_tasks: count,
7669
+ not_read: coverage2.entries.not_read
7670
+ });
7671
+
7672
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chart.js
7673
+ var chart = strictObject({
7674
+ version: literal(1),
7675
+ kind: picklist(["bar", "line", "grouped-bar"]),
7676
+ title: text,
7677
+ x: strictObject({ type: picklist(["day", "week"]), values: array(text) }),
7678
+ series: array(strictObject({ name: text, values: array(nullable(number())) })),
7679
+ unit: picklist(["messages", "people"]),
7680
+ timezone: text,
7681
+ /** Lower bounds: the store or the events did not hold the whole period. */
7682
+ partial: boolean(),
7683
+ reasons: array(picklist(["store-incomplete", "events-incomplete"])),
7684
+ file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
7685
+ });
7686
+
7687
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/folder.js
7688
+ var named = strictObject({
7746
7689
  id,
7747
- name: nullable(text),
7690
+ title: nullable(text),
7691
+ kind: nullable(picklist(["dialog", "group", "channel", "saved", "unknown"]))
7692
+ });
7693
+ var folder = strictObject({
7694
+ id,
7695
+ title: text,
7696
+ /** Chats added by hand; a folder that selects chats by a rule of its own lists none. */
7697
+ chat_ids: array(id),
7698
+ emoji: optional(text),
7699
+ /** Kinds of chat it takes by itself. */
7700
+ include: optional(array(picklist(["contacts", "non-contacts", "groups", "channels", "bots"]))),
7701
+ skip: optional(array(picklist(["muted", "read", "archived"]))),
7702
+ excluded_chat_ids: optional(array(id)),
7703
+ pinned_chat_ids: optional(array(id)),
7704
+ /** `chats folders show`: the chats in it, pinned and left out, by name. */
7705
+ chats: optional(array(named)),
7706
+ pinned_chats: optional(array(named)),
7707
+ excluded_chats: optional(array(named))
7708
+ });
7709
+
7710
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
7711
+ var inviteLink = strictObject({
7712
+ link: text,
7713
+ /** Who joins by it asks first, and an admin lets them in. */
7714
+ approval: boolean(),
7715
+ /** `null` when it never expires. */
7716
+ expires_at: nullable(time),
7717
+ /** `null` for no limit. */
7718
+ max_uses: nullable(count),
7719
+ /** The group's own link; revoking it makes the messenger issue a new one. */
7720
+ primary: optional(boolean()),
7721
+ revoked: optional(boolean()),
7722
+ pending_count: optional(count),
7723
+ joined_count: optional(count)
7724
+ });
7725
+
7726
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
7727
+ var operated = { operation_id: id, chat_id: id };
7728
+ var group = strictObject({
7729
+ ...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
7730
+ parent_chat_id: optional(nullable(id)),
7731
+ muted_until: optional(nullable(time)),
7732
+ description: nullable(text),
7733
+ link: nullable(text),
7734
+ settings: strictObject({
7735
+ ...unwrap(chat.entries.settings).entries,
7736
+ all_can_pin: nullable(boolean()),
7737
+ only_admins_add: nullable(boolean()),
7738
+ only_admins_call: nullable(boolean()),
7739
+ only_owner_edits_info: nullable(boolean()),
7740
+ members_see_link: nullable(boolean())
7741
+ })
7742
+ });
7743
+ var chatGroupChange = union([
7744
+ strictObject({ operation_id: id, chat: group }),
7745
+ strictObject({ operation_id: id, requested: literal(true) })
7746
+ ]);
7747
+ var chatInspection = strictObject({
7748
+ kind: chat.entries.kind,
7749
+ title: nullable(text),
7750
+ id: nullable(id),
7748
7751
  username: nullable(text),
7749
- alias: optional(nullable(text)),
7750
- display_name: optional(nullable(text)),
7751
- /** Whatever they wrote about themselves. */
7752
+ participants_count: nullable(count),
7752
7753
  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 })))
7754
+ member: nullable(boolean()),
7755
+ approval_needed: optional(boolean())
7772
7756
  });
7773
-
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");
7798
-
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,
7757
+ var chatSender = strictObject({
7802
7758
  id,
7803
- name: nullable(text),
7804
- 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
7759
+ title: text,
7760
+ kind: picklist(["self", "channel", "group"]),
7761
+ premium_required: boolean(),
7762
+ default: boolean()
7811
7763
  });
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)
7764
+ var chatRead = strictObject({ ...operated, until: nullable(id), thread_id: optional(id) });
7765
+ var chatMembersFetch = strictObject({
7766
+ chat_id: id,
7767
+ joined: array(id),
7768
+ gone: array(id),
7769
+ changed: array(id),
7770
+ read: count,
7771
+ participants: nullable(count),
7772
+ complete: boolean(),
7773
+ more: boolean(),
7774
+ tracked: boolean()
7824
7775
  });
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
7776
+ var chatMembersChange = union([
7777
+ strictObject({ ...operated, added: array(id), not_added: array(id) }),
7778
+ strictObject({ ...operated, removed: array(id) })
7779
+ ]);
7780
+ var chatInvite = strictObject({ chat_id: id, title: nullable(text), link: text });
7781
+ var chatInviteChange = strictObject({
7782
+ ...operated,
7783
+ ...omit(inviteLink, ["pending_count", "joined_count"]).entries,
7784
+ pending: optional(count),
7785
+ joined: optional(count)
7839
7786
  });
7840
-
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())
7787
+ var chatRequestChange = union([
7788
+ strictObject({ ...operated, person_id: id, accepted: boolean(), already: boolean() }),
7789
+ strictObject({ chat_id: id, accepted: boolean(), counted: count, operation_id: optional(id) })
7790
+ ]);
7791
+ var chatAdminChange = strictObject({
7792
+ ...operated,
7793
+ person_id: id,
7794
+ rights: optional(array(picklist(["read", "members", "admins", "info", "pin", "link", "post", "edit", "delete"])))
7850
7795
  });
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),
7858
- 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({
7905
- ref: reference,
7906
- chat_title: nullable(text),
7907
- 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())
7956
- })),
7957
- provider_metadata: providerMetadata
7796
+ var chatFolderChange = strictObject({
7797
+ operation_id: id,
7798
+ folder: omit(folder, ["chats", "pinned_chats", "excluded_chats"])
7799
+ });
7800
+ var chatFolderRemoval = strictObject({ operation_id: id, folder_id: id });
7801
+ var chatFolderOrder = strictObject({
7802
+ operation_id: id,
7803
+ folders: array(strictObject({ id, title: text }))
7804
+ });
7805
+
7806
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
7807
+ var operated2 = { operation_id: id, chat_id: id };
7808
+ var chatRemoval = strictObject(operated2);
7809
+ var chatMuting = strictObject({
7810
+ ...operated2,
7811
+ muted_until: nullable(union([time, literal("forever")]))
7958
7812
  });
7813
+ var chatArchive = strictObject({ ...operated2, archived: boolean() });
7814
+ var chatPin = strictObject({ ...operated2, pinned: boolean() });
7815
+ var chatUnread = strictObject({ ...operated2, unread: literal(true) });
7959
7816
 
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,
7817
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
7818
+ var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
7819
+ var chatEvent = strictObject({
7966
7820
  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
7821
+ time,
7822
+ /** `join`, `leave`, `add`, `remove`, `create`, `title`, `pin`, `profile`; a messenger may pass others through. */
7823
+ type: text,
7824
+ /** The service message that says so, where there is one. */
7825
+ message_id: optional(id),
7826
+ by: optional(who),
7827
+ people: array(who),
7828
+ /** `create` and `title` carry the chat's title. */
7829
+ title: optional(text),
7830
+ /** `profile`: the name and username seen before. */
7831
+ before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
7974
7832
  });
7975
- var sharedChat = strictObject({
7976
- provider: text,
7977
- account: id,
7833
+
7834
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
7835
+ var chatMetadata = strictObject({
7978
7836
  chat_id: id,
7979
7837
  title: nullable(text),
7980
- kind: chat.entries.kind,
7981
- last_message_at: nullable(time)
7838
+ username: nullable(text),
7839
+ description: nullable(text),
7840
+ fetched_at: time
7982
7841
  });
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)
7842
+ var cachedChatMetadata = strictObject({ chat_id: id, metadata: nullable(chatMetadata) });
7843
+ var failedChatMetadata = strictObject({ chat_id: id, error: strictObject({ code: text, message: text }) });
7844
+ var chatMetadataRefresh = strictObject({
7845
+ chats: array(union([chatMetadata, failedChatMetadata])),
7846
+ has_more: boolean()
7991
7847
  });
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,
7848
+
7849
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
7850
+ var action = picklist(["report", "delete", "remove"]);
7851
+ var level = picklist(["deny", "readonly", "ask", "allow"]);
7852
+ var chatRules = strictObject({
7853
+ chat_id: id,
7854
+ title: nullable(text),
7855
+ file: text,
7856
+ saved: boolean(),
7857
+ rules: strictObject({
8012
7858
  title: nullable(text),
8013
- reason: picklist(["not_fetched", "partial"])
8014
- }))
8015
- });
8016
- var shortMessage = strictObject({ at: time, text, transcript: optional(text) });
8017
- var identifiedMessage = strictObject({
8018
- ...shortMessage.entries,
8019
- 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)
7859
+ trusted: array(id),
7860
+ blocked: array(id),
7861
+ blocked_names: array(text),
7862
+ links: action,
7863
+ invites: action,
7864
+ forwards: action,
7865
+ blocked_people: action,
7866
+ flood: strictObject({ messages: count, minutes: count, action }),
7867
+ new_account: strictObject({ days: count, action: picklist(["report", "remove"]) }),
7868
+ consent: strictObject({ delete: level, remove: level })
7869
+ })
8029
7870
  });
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
8063
- }))),
8064
- ...shortMessage.entries,
8065
- locator: reference
7871
+ var chatModeration = strictObject({
7872
+ chat_id: id,
7873
+ rows: array(strictObject({
7874
+ kind: picklist(["message", "member"]),
7875
+ rule: picklist(["blocked", "invites", "links", "forwards", "flood", "newAccount"]),
7876
+ person_id: id,
7877
+ person_name: nullable(text),
7878
+ message_id: optional(id),
7879
+ action,
7880
+ outcome: picklist(["reported", "done", "planned", "forbidden", "declined", "refused", "failed", "skipped"]),
7881
+ reason: optional(text),
7882
+ command: optional(text)
7883
+ }))
8066
7884
  });
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(),
7885
+
7886
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
7887
+ var optionalCount = optional(count);
7888
+ var minutes = nullable(number());
7889
+ var chatStats = strictObject({
7890
+ chat: reference,
7891
+ since: time,
7892
+ until: time,
7893
+ /** The store holds the chat whole and the messenger read every join and leave; otherwise lower bounds. */
7894
+ complete: boolean(),
7895
+ completeness: strictObject({
7896
+ state: picklist(["complete", "partial", "unknown"]),
7897
+ up_to_date: nullable(boolean()),
7898
+ gaps: boolean(),
7899
+ reaches_start: boolean(),
7900
+ fetched_at: nullable(time)
7901
+ }),
7902
+ messages: count,
7903
+ senders: count,
7904
+ replies: count,
7905
+ threads: count,
7906
+ reactions: count,
7907
+ views: optionalCount,
7908
+ forwards: optionalCount,
7909
+ comments: optionalCount,
7910
+ top_posts: array(strictObject({
7911
+ ref: reference,
7912
+ timestamp: time,
7913
+ reactions: count,
7914
+ views: optionalCount,
7915
+ forwards: optionalCount,
7916
+ comments: optionalCount
7917
+ })),
7918
+ questions: strictObject({
7919
+ asked: count,
7920
+ answered: count,
7921
+ median_minutes_to_answer: minutes,
7922
+ answered_by: picklist(["owner", "owner-and-admins"])
7923
+ }),
7924
+ member_counts: optional(array(strictObject({ day: text, participants: nullable(count), listed: count, complete: boolean() }))),
7925
+ /** Absent where joins and leaves were not asked, or not recorded for the chat yet (then `missing` says so). */
7926
+ members: optional(strictObject({
7927
+ joined: count,
7928
+ left: count,
7929
+ net: number(),
7930
+ wrote: count,
7931
+ median_minutes_to_first_message: minutes,
7932
+ /** The messenger stopped reading its history before `since`: the counts are lower bounds. */
8073
7933
  more: boolean()
8074
7934
  })),
8075
- limits: strictObject({ messages: count })
7935
+ series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
8076
7936
  });
8077
- var contactContext = union([context, contactMessages]);
8078
- var coverage = strictObject({
8079
- included: count,
8080
- has_more: boolean(),
8081
- cut_by: nullable(picklist(["limit", "bytes"]))
7937
+ var ms = nullable(pipe(number(), minValue(0)));
7938
+ var taskStats = strictObject({
7939
+ /** Open tasks across every row. */
7940
+ open: count,
7941
+ created: count,
7942
+ closed: count,
7943
+ median_close_ms: ms,
7944
+ mean_open_age_ms: ms,
7945
+ rows: array(strictObject({
7946
+ /** Rows of `--by chat` only. */
7947
+ chat: optional(reference),
7948
+ /** The chat reference, `meeting:<account>/<meeting>` or `project:<id>`. */
7949
+ key: text,
7950
+ name: nullable(text),
7951
+ open: count,
7952
+ created: count,
7953
+ closed: count,
7954
+ oldest_open_at: nullable(time),
7955
+ median_close_ms: ms,
7956
+ mean_open_age_ms: ms
7957
+ }))
8082
7958
  });
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"])
7959
+
7960
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
7961
+ var memberCount = strictObject({
7962
+ day: pipe(text, isoDate()),
7963
+ participants: nullable(count),
7964
+ listed: count,
7965
+ complete: boolean()
7966
+ });
7967
+ var trackedChat = strictObject({
7968
+ chat_id: id,
7969
+ title: nullable(text),
7970
+ tracked_at: time,
7971
+ last_count: nullable(memberCount)
8095
7972
  });
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
- })
7973
+ var trackedChatHistory = strictObject({
7974
+ chat_id: id,
7975
+ tracked_at: nullable(time),
7976
+ counts: array(memberCount)
7977
+ });
7978
+ var chatTracking = strictObject({
7979
+ chat_id: id,
7980
+ tracked: boolean()
7981
+ });
7982
+
7983
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
7984
+ var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
7985
+ var contactSync = strictObject({ added: count, changed: count, known: count });
7986
+ var profileFields = {
7987
+ usernames: array(text),
7988
+ birthday: optional(nullable(text)),
7989
+ phone: optional(nullable(text)),
7990
+ flags: partial(strictObject({
7991
+ bot: boolean(),
7992
+ verified: boolean(),
7993
+ premium: boolean(),
7994
+ scam: boolean(),
7995
+ fake: boolean(),
7996
+ restricted: boolean(),
7997
+ deleted: boolean(),
7998
+ support: boolean()
7999
+ })),
8000
+ seen: optional(text),
8001
+ contact: optional(boolean()),
8002
+ mutual_contact: optional(boolean()),
8003
+ common_chats_count: optional(nullable(count)),
8004
+ registered: optional(nullable(strictObject({
8005
+ at: text,
8006
+ source: picklist(["telegram", "max", "estimate"]),
8007
+ precision: picklist(["day", "month"])
8008
+ }))),
8009
+ has_photo: optional(boolean()),
8010
+ /** Earlier names and usernames, oldest first; the current ones are not repeated. */
8011
+ aliases: array(strictObject({
8012
+ name: optional(text),
8013
+ username: optional(text),
8014
+ link: optional(text),
8015
+ first_seen_at: time,
8016
+ last_seen_at: time,
8017
+ source: picklist(["profile", "messages"])
8018
+ }))
8019
+ };
8020
+
8021
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact.js
8022
+ var contact = strictObject({
8023
+ ref: reference,
8024
+ id,
8025
+ name: nullable(text),
8026
+ username: nullable(text),
8027
+ alias: optional(nullable(text)),
8028
+ display_name: optional(nullable(text)),
8029
+ /** Whatever they wrote about themselves. */
8030
+ description: nullable(text),
8031
+ /** The newest message in a one-to-one chat with them. */
8032
+ last_messaged_at: nullable(time),
8033
+ /** For a source that knows it, such as a Zoom contact. */
8034
+ email: optional(nullable(text)),
8035
+ phones: optional(array(strictObject({ number: text, label: nullable(text) }))),
8036
+ /** `contacts show`: the chats shared with them, and what the store holds of their messages in each. */
8037
+ chats: optional(array(strictObject({
8038
+ ...pick(chat, ["ref", "id", "title", "kind", "last_message_at"]).entries,
8039
+ /** Their messages stored; a floor unless `complete`. */
8040
+ their_messages: optional(count),
8041
+ first_at: optional(nullable(time)),
8042
+ last_at: optional(nullable(time)),
8043
+ /** The store holds the whole chat, so the count is the real one. */
8044
+ complete: optional(boolean())
8045
+ }))),
8046
+ /** `contacts show`: what the messenger says about them, or with `--offline` what the store saw of them. */
8047
+ ...partial(strictObject(profileFields)).entries,
8048
+ /** `contacts show --with-notes`: the owner's private notes about them. */
8049
+ notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
8158
8050
  });
8159
8051
 
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
8052
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
8161
8053
  var contactNote = strictObject({
8162
8054
  id,
8163
8055
  /** The contact, as a `contact:` reference. */
@@ -8169,13 +8061,13 @@ var contactNote = strictObject({
8169
8061
  updated_at: time
8170
8062
  });
8171
8063
 
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
8064
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
8173
8065
  var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
8174
8066
  var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
8175
8067
  var contactStateChange = strictObject({ operation_id: id, person_id: id });
8176
8068
  var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
8177
8069
 
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
8070
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/conversation.js
8179
8071
  var conversation = strictObject({
8180
8072
  id,
8181
8073
  chat: reference,
@@ -8190,7 +8082,7 @@ var conversation = strictObject({
8190
8082
  rules_version: count
8191
8083
  });
8192
8084
 
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
8085
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
8194
8086
  var conversationBuild = strictObject({
8195
8087
  chat: id,
8196
8088
  messages: count,
@@ -8215,7 +8107,7 @@ var catchUpPreparation = strictObject({
8215
8107
  prepared: optional(conversationPreparation)
8216
8108
  });
8217
8109
 
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
8110
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
8219
8111
  var conversationDetails = union([
8220
8112
  strictObject({ ...conversation.entries, messages: array(message) }),
8221
8113
  message
@@ -8305,7 +8197,7 @@ var conversationHit = strictObject({
8305
8197
  stale: boolean()
8306
8198
  });
8307
8199
 
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
8200
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/counters.js
8309
8201
  var counters = strictObject({
8310
8202
  cutoff: time,
8311
8203
  max_age_ms: milliseconds,
@@ -8335,97 +8227,7 @@ var counterRefresh = strictObject({
8335
8227
  complete: optional(boolean())
8336
8228
  });
8337
8229
 
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
8230
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/document.js
8429
8231
  var document = strictObject({
8430
8232
  ref: reference,
8431
8233
  id,
@@ -8440,7 +8242,7 @@ var document = strictObject({
8440
8242
  owners: optional(array(text))
8441
8243
  });
8442
8244
 
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
8245
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/document-link.js
8444
8246
  var documentLink = strictObject({
8445
8247
  ref: reference,
8446
8248
  url: text,
@@ -8451,7 +8253,7 @@ var documentLink = strictObject({
8451
8253
  sender: strictObject({ id: nullable(id), name: nullable(text) })
8452
8254
  });
8453
8255
 
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
8256
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/evidence.js
8455
8257
  var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
8456
8258
  var contribution = strictObject({
8457
8259
  message: evidenceMessage,
@@ -8481,7 +8283,7 @@ var retentionStay = strictObject({
8481
8283
  });
8482
8284
  var evidence = union([contribution, retentionStay]);
8483
8285
 
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
8286
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/fact.js
8485
8287
  var fact = strictObject({
8486
8288
  ref: reference,
8487
8289
  id,
@@ -8512,7 +8314,7 @@ var fact = strictObject({
8512
8314
  updated_at: time
8513
8315
  });
8514
8316
 
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
8317
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/hit.js
8516
8318
  var hit = strictObject({
8517
8319
  kind: picklist(["message", "mail", "note", "document", "event", "meeting", "deal", "lead", ...BUSINESS_KINDS]),
8518
8320
  ref: reference,
@@ -8533,8 +8335,8 @@ var hit = strictObject({
8533
8335
  found_by: optional(array(picklist(["title", "words", "meaning"]))),
8534
8336
  /** How far into the meeting the passage is. */
8535
8337
  offset_ms: optional(nullable(count)),
8536
- /** A meeting passage's place: its transcript, chat or summary. */
8537
- scope: optional(picklist(["transcript", "chat", "summary"])),
8338
+ /** A meeting hit's place: its title, transcript, chat or summary. */
8339
+ scope: optional(picklist(["title", "transcript", "chat", "summary"])),
8538
8340
  /** A meeting transcript hit's cue, which `meetings passage` opens with the lines around it. */
8539
8341
  cue_ref: optional(reference),
8540
8342
  /** A meeting transcript hit's transcript language (`ru`, `en`…), `null` when unknown. */
@@ -8542,6 +8344,10 @@ var hit = strictObject({
8542
8344
  /** A meeting transcript hit's line, from 1, of `lines_total` lines in its transcript. */
8543
8345
  line: optional(pipe(count, minValue(1))),
8544
8346
  lines_total: optional(count),
8347
+ /** `corrected`: a meeting hit found only through a spelling speech recognition may have garbled. */
8348
+ match: optional(picklist(["corrected"])),
8349
+ /** For a `corrected` hit, the stored words each such query word matched. */
8350
+ corrections: optional(array(strictObject({ from: text, to: array(text) }))),
8545
8351
  /** A meeting passage's stored line, so two passages of one meeting stay apart; `search meetings` gives the same. */
8546
8352
  id: optional(pipe(string(), minLength(1))),
8547
8353
  /** A business hit's: `proposed` waits for the owner; a product or a wallet has no review and is `confirmed`. */
@@ -8554,7 +8360,7 @@ var hit = strictObject({
8554
8360
  untrusted
8555
8361
  });
8556
8362
 
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
8363
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/identity.js
8558
8364
  var identity = strictObject({
8559
8365
  ref: reference,
8560
8366
  provider: text,
@@ -8563,11 +8369,14 @@ var identity = strictObject({
8563
8369
  id,
8564
8370
  name: nullable(text),
8565
8371
  username: nullable(text),
8372
+ /** The number or address the source gave for them, when it gave one. */
8373
+ phone: optional(nullable(text)),
8374
+ email: optional(nullable(text)),
8566
8375
  /** The `person:` they are linked to, when one is. */
8567
8376
  person: optional(nullable(reference))
8568
8377
  });
8569
8378
 
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
8379
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
8571
8380
  var imageEmbedding = strictObject({
8572
8381
  model: text,
8573
8382
  embedded: count,
@@ -8576,13 +8385,13 @@ var imageEmbedding = strictObject({
8576
8385
  more: boolean()
8577
8386
  });
8578
8387
 
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
8388
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
8580
8389
  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";
8390
+ import { randomBytes } from "node:crypto";
8391
+ import { closeSync, existsSync as existsSync6, mkdirSync as mkdirSync2, openSync, readdirSync as readdirSync3, readFileSync as readFileSync4, realpathSync, rmSync as rmSync2 } from "node:fs";
8583
8392
  import { dirname as dirname2, join as join5 } from "node:path";
8584
8393
 
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
8394
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/background/checkpoints.js
8586
8395
  var progressOf = /* @__PURE__ */ __name((input) => {
8587
8396
  const total = input.total ?? null;
8588
8397
  const updated = input.updatedAt ?? null;
@@ -8598,7 +8407,7 @@ var progressOf = /* @__PURE__ */ __name((input) => {
8598
8407
  };
8599
8408
  }, "progressOf");
8600
8409
 
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
8410
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/runs/record-log.js
8602
8411
  var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
8603
8412
  const run = currentRun();
8604
8413
  const trace = traceId ?? run.traceId;
@@ -8612,7 +8421,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
8612
8421
  }));
8613
8422
  }, "recordLogFor");
8614
8423
 
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
8424
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
8616
8425
  var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
8617
8426
  var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
8618
8427
  const out = openSync(log, "a", 384);
@@ -8631,15 +8440,15 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
8631
8440
  var jobsDir = /* @__PURE__ */ __name((app, env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
8632
8441
  var jobPath = /* @__PURE__ */ __name((dir, id6) => join5(dir, `${id6}.json`), "jobPath");
8633
8442
  var saveJob = /* @__PURE__ */ __name((dir, job2) => {
8634
- mkdirSync3(dir, { recursive: true, mode: 448 });
8443
+ mkdirSync2(dir, { recursive: true, mode: 448 });
8635
8444
  writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
8636
8445
  `, 384);
8637
8446
  }, "saveJob");
8638
8447
  var readJob = /* @__PURE__ */ __name((dir, id6) => {
8639
- if (!/^[\w-]+$/.test(id6) || !existsSync5(jobPath(dir, id6)))
8448
+ if (!/^[\w-]+$/.test(id6) || !existsSync6(jobPath(dir, id6)))
8640
8449
  return void 0;
8641
8450
  try {
8642
- return JSON.parse(readFileSync5(jobPath(dir, id6), "utf8"));
8451
+ return JSON.parse(readFileSync4(jobPath(dir, id6), "utf8"));
8643
8452
  } catch {
8644
8453
  return void 0;
8645
8454
  }
@@ -8676,12 +8485,12 @@ var updateJob = /* @__PURE__ */ __name((dir, id6, change) => {
8676
8485
  saveJob(dir, { ...job2, ...change });
8677
8486
  }, "updateJob");
8678
8487
  var removeJob = /* @__PURE__ */ __name((dir, job2) => {
8679
- rmSync3(jobPath(dir, job2.id), { force: true });
8680
- rmSync3(recordsPath(dir, job2.id), { force: true });
8488
+ rmSync2(jobPath(dir, job2.id), { force: true });
8489
+ rmSync2(recordsPath(dir, job2.id), { force: true });
8681
8490
  if (dirname2(job2.log) === dir)
8682
- rmSync3(job2.log, { force: true });
8491
+ rmSync2(job2.log, { force: true });
8683
8492
  }, "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");
8493
+ 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
8494
  var jobDetails = /* @__PURE__ */ __name((job2) => ({
8686
8495
  job: job2.id,
8687
8496
  profile: job2.profile,
@@ -8745,8 +8554,8 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
8745
8554
  if (running)
8746
8555
  throw new CliError("validation_error", `job ${running.id} already works on this chat; inspect store jobs show first`);
8747
8556
  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 });
8557
+ const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes(3).toString("hex")}`;
8558
+ mkdirSync2(dir, { recursive: true, mode: 448 });
8750
8559
  const log = join5(dir, `${id6}.log`);
8751
8560
  const job2 = {
8752
8561
  id: id6,
@@ -8767,7 +8576,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
8767
8576
  return { job: id6, pid, chat: input.chat, log };
8768
8577
  }, "startArchiveJob");
8769
8578
 
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
8579
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/job.js
8771
8580
  var problem = strictObject({ code: text, message: text });
8772
8581
  var job = strictObject({
8773
8582
  id,
@@ -8790,7 +8599,7 @@ var job = strictObject({
8790
8599
  error: optional(problem)
8791
8600
  });
8792
8601
 
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
8602
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/join-request.js
8794
8603
  var joinRequest = strictObject({
8795
8604
  person_id: id,
8796
8605
  name: nullable(text),
@@ -8801,7 +8610,7 @@ var joinRequest = strictObject({
8801
8610
  about: optional(text)
8802
8611
  });
8803
8612
 
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
8613
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/list-results.js
8805
8614
  var botProfile = strictObject({
8806
8615
  name: text,
8807
8616
  token: text,
@@ -8832,6 +8641,8 @@ var scheduledJob = strictObject({
8832
8641
  name: text,
8833
8642
  kind: picklist(["command", "agent"]),
8834
8643
  when: text,
8644
+ /** Kept without its timer: `schedule run` runs it, `schedule resume` puts it back on its timer. */
8645
+ paused: optional(literal(true)),
8835
8646
  /** When a finished run shows a desktop notice: `always`, `failures` or `never`; the default is shown, not left out. */
8836
8647
  notify: optional(picklist(["always", "failures", "never"])),
8837
8648
  /** Where a run's result is sent after it: `telegram-bot:<profile>/<chat>` or `email:<profile>/<address>`. */
@@ -8896,7 +8707,7 @@ var stickerInventory = strictObject({
8896
8707
  url: optional(nullable(text))
8897
8708
  });
8898
8709
 
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
8710
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
8900
8711
  var pollVote = strictObject({
8901
8712
  person_id: id,
8902
8713
  name: nullable(text),
@@ -8906,7 +8717,7 @@ var pollVote = strictObject({
8906
8717
  voted_at: time
8907
8718
  });
8908
8719
 
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
8720
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/listener.js
8910
8721
  var reactions = unwrap(unwrap(message.entries.reactions));
8911
8722
  var observation = strictObject({
8912
8723
  value: pipe(number(), minValue(0)),
@@ -8948,7 +8759,7 @@ var serveSummary = strictObject({
8948
8759
  tasks: optional(strictObject({ added: count, closed: count, review: count }))
8949
8760
  });
8950
8761
 
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
8762
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
8952
8763
  var mailCounts = strictObject({
8953
8764
  by: picklist(["day", "week", "sender"]),
8954
8765
  received: count,
@@ -8963,7 +8774,7 @@ var mailCounts = strictObject({
8963
8774
  }))
8964
8775
  });
8965
8776
 
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
8777
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
8967
8778
  var evidence2 = strictObject({ reference, fingerprint: text });
8968
8779
  var base = { id, evidence: array(evidence2) };
8969
8780
  var finding = variant("kind", [
@@ -9107,7 +8918,7 @@ var mailFindings = strictObject({
9107
8918
  receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
9108
8919
  });
9109
8920
 
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
8921
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
9111
8922
  var mediaArchive = strictObject({
9112
8923
  directory: text,
9113
8924
  chats: count,
@@ -9139,7 +8950,7 @@ var mediaArchiveTimer = union([
9139
8950
  strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
9140
8951
  ]);
9141
8952
 
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
8953
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
9143
8954
  var preparationId = pipe(string(), minLength(1));
9144
8955
  var preparationCount = pipe(number(), integer(), minValue(0));
9145
8956
  var preparationTime = nullable(isoTime);
@@ -9231,7 +9042,7 @@ var preparationMeeting = strictObject({
9231
9042
  updated_at: isoTime
9232
9043
  });
9233
9044
 
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
9045
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
9235
9046
  var meetingEvidence = preparationEvidence;
9236
9047
  var meetingPersonContext = strictObject({
9237
9048
  person: strictObject({ uid: string(), name: nullable(string()) }),
@@ -9253,7 +9064,7 @@ var meetingPersonContext = strictObject({
9253
9064
  })
9254
9065
  });
9255
9066
 
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
9067
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
9257
9068
  var evidence3 = strictObject({ reference, fingerprint: text });
9258
9069
  var base2 = { id, project: reference, evidence: array(evidence3) };
9259
9070
  var finding2 = variant("kind", [
@@ -9291,7 +9102,7 @@ var meetingFindings = strictObject({
9291
9102
  receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome3) }))
9292
9103
  });
9293
9104
 
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
9105
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
9295
9106
  var communicationCoverage = strictObject({
9296
9107
  read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
9297
9108
  query: string(),
@@ -9336,7 +9147,7 @@ var preparationCommunications = strictObject({
9336
9147
  }))
9337
9148
  });
9338
9149
 
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
9150
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
9340
9151
  var meetingPreparation = strictObject({
9341
9152
  communications: optional(preparationCommunications),
9342
9153
  schema_version: literal(1),
@@ -9449,7 +9260,7 @@ var meetingPreparation = strictObject({
9449
9260
  })
9450
9261
  });
9451
9262
 
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
9263
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
9453
9264
  var count4 = pipe(number(), integer(), minValue(0));
9454
9265
  var id3 = pipe(string(), minLength(1));
9455
9266
  var text3 = string();
@@ -9513,7 +9324,7 @@ var meetingProjectCandidates = strictObject({
9513
9324
  })
9514
9325
  });
9515
9326
 
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
9327
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
9517
9328
  var count5 = pipe(number(), integer(), minValue(0));
9518
9329
  var id4 = pipe(string(), minLength(1), maxLength(1e3));
9519
9330
  var meetingSeriesInventory = strictObject({
@@ -9543,7 +9354,7 @@ var meetingSeriesInventory = strictObject({
9543
9354
  })
9544
9355
  });
9545
9356
 
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
9357
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
9547
9358
  var text4 = string();
9548
9359
  var id5 = pipe(number(), integer(), minValue(1));
9549
9360
  var revision = picklist(["current", "superseded"]);
@@ -9560,7 +9371,7 @@ var meetingTaskProposal = strictObject({
9560
9371
  persistence: literal("proposal-only")
9561
9372
  });
9562
9373
 
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
9374
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/memory.js
9564
9375
  var memory = strictObject({
9565
9376
  ref: reference,
9566
9377
  id,
@@ -9588,9 +9399,9 @@ var memory = strictObject({
9588
9399
  updated_at: time
9589
9400
  });
9590
9401
 
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
9402
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/mention.js
9592
9403
  var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
9593
- var status = picklist(["found", "linked", "dismissed"]);
9404
+ var status = picklist(["found", "linked", "proposed", "dismissed"]);
9594
9405
  var mention = strictObject({
9595
9406
  id: count,
9596
9407
  kind,
@@ -9620,7 +9431,8 @@ var mentionDecision = strictObject({
9620
9431
  value: text,
9621
9432
  status,
9622
9433
  target: nullable(reference),
9623
- mentions: count
9434
+ mentions: count,
9435
+ proposal: optional(text)
9624
9436
  });
9625
9437
  var mentionRebuild = strictObject({
9626
9438
  messages: count,
@@ -9631,13 +9443,13 @@ var mentionRebuild = strictObject({
9631
9443
  mentions: count
9632
9444
  });
9633
9445
 
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
9446
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-change.js
9635
9447
  var operated3 = { operation_id: id, chat_id: id };
9636
9448
  var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
9637
9449
  var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
9638
9450
  var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
9639
9451
 
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
9452
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-read.js
9641
9453
  var messageTranscript = strictObject({
9642
9454
  message_id: id,
9643
9455
  text,
@@ -9695,7 +9507,7 @@ var evidencePacket = strictObject({
9695
9507
  }))
9696
9508
  });
9697
9509
 
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
9510
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-context.js
9699
9511
  var messageThread = strictObject({
9700
9512
  ref: reference,
9701
9513
  chat: id,
@@ -9712,7 +9524,7 @@ var messageThread = strictObject({
9712
9524
  });
9713
9525
  var messageContext = union([message, messageThread]);
9714
9526
 
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
9527
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
9716
9528
  var messageCounts = strictObject({
9717
9529
  by: picklist(["chat", "sender", "day", "hour"]),
9718
9530
  total: count,
@@ -9725,7 +9537,7 @@ var messageCounts = strictObject({
9725
9537
  }))
9726
9538
  });
9727
9539
 
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
9540
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-link.js
9729
9541
  var messageLink = strictObject({
9730
9542
  ref: reference,
9731
9543
  url: nullable(text),
@@ -9742,7 +9554,7 @@ var messageLink = strictObject({
9742
9554
  })))
9743
9555
  });
9744
9556
 
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
9557
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
9746
9558
  var savedMessageFile = strictObject({
9747
9559
  kind: text,
9748
9560
  path: text,
@@ -9822,14 +9634,14 @@ var messageSyncAll = strictObject({
9822
9634
  issue: optional(actionableError),
9823
9635
  limited: optional(historyLimited)
9824
9636
  })),
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 })),
9637
+ /** How many chats the history limits left unread (big groups) or read only to the window's start; muted, unread. */
9638
+ limited: optional(strictObject({ group_too_large: count, older_than_window: count, muted: optional(count) })),
9827
9639
  tasks
9828
9640
  });
9829
9641
  var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
9830
9642
  var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
9831
9643
 
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
9644
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-write.js
9833
9645
  var messageWrite = strictObject({
9834
9646
  operation_id: id,
9835
9647
  message,
@@ -9844,7 +9656,7 @@ var draftWrite = strictObject({
9844
9656
  });
9845
9657
  var messageSend = union([messageWrite, draftWrite]);
9846
9658
 
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
9659
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/model.js
9848
9660
  var model2 = strictObject({
9849
9661
  id,
9850
9662
  kind: picklist(["audio", "text", "image", "reranker"]),
@@ -9852,7 +9664,7 @@ var model2 = strictObject({
9852
9664
  /** Which languages it reads, in words. */
9853
9665
  languages: text,
9854
9666
  licence: optional(text),
9855
- /** A text model's licence terms to accept with `models download --accept-terms`. */
9667
+ /** A text model's licence page, for a model under conditions of its own (`NOTICE` beside its files says the same). */
9856
9668
  terms: optional(text),
9857
9669
  /** A text model's size next to the others: small is fastest, large reads best. */
9858
9670
  size: optional(picklist(["small", "medium", "large"])),
@@ -9879,7 +9691,7 @@ var chosenModel = strictObject({
9879
9691
  estimate_seconds: nullable(count)
9880
9692
  });
9881
9693
 
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
9694
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/model-key.js
9883
9695
  var source = picklist(["environment", "keyring", "file"]);
9884
9696
  var modelKey = strictObject({
9885
9697
  provider: text,
@@ -9889,7 +9701,7 @@ var modelKey = strictObject({
9889
9701
  var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
9890
9702
  var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
9891
9703
 
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
9704
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
9893
9705
  var versus = strictObject({ current: number(), previous: number() });
9894
9706
  var person = { person_ref: reference, name: nullable(text) };
9895
9707
  var graph = strictObject({
@@ -9923,14 +9735,14 @@ var officialStats = strictObject({
9923
9735
  graphs: record(string(), union([graph, strictObject({ error: text })]))
9924
9736
  });
9925
9737
 
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
9738
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/person.js
9927
9739
  var person2 = strictObject({
9928
9740
  ref: reference,
9929
9741
  name: nullable(text),
9930
9742
  identities: optional(array(identity))
9931
9743
  });
9932
9744
 
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
9745
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/poll.js
9934
9746
  var poll = strictObject({
9935
9747
  chat_id: id,
9936
9748
  message_id: id,
@@ -9946,11 +9758,11 @@ var poll = strictObject({
9946
9758
  });
9947
9759
  var pollChange = strictObject({ operation_id: id, poll });
9948
9760
 
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
9761
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
9950
9762
  var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
9951
9763
  var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
9952
9764
 
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
9765
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/ranking.js
9954
9766
  var figures = record(string(), number());
9955
9767
  var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
9956
9768
  var rankingRow = strictObject({
@@ -9997,7 +9809,7 @@ var ranking = strictObject({
9997
9809
  rows: array(rankingRow)
9998
9810
  });
9999
9811
 
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
9812
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/reaction.js
10001
9813
  var reaction = strictObject({
10002
9814
  person: strictObject({ id, name: nullable(text), username: nullable(text) }),
10003
9815
  /** The emoji, or `custom:<id>` for a custom one. */
@@ -10005,7 +9817,7 @@ var reaction = strictObject({
10005
9817
  reacted_at: time
10006
9818
  });
10007
9819
 
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
9820
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
10009
9821
  var reactionChange = strictObject({
10010
9822
  operation_id: id,
10011
9823
  chat_id: id,
@@ -10013,7 +9825,7 @@ var reactionChange = strictObject({
10013
9825
  reaction: nullable(text)
10014
9826
  });
10015
9827
 
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
9828
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/recipient.js
10017
9829
  var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
10018
9830
  var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
10019
9831
  var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
@@ -10024,7 +9836,7 @@ var recipientChange = strictObject({
10024
9836
  ...partial(recipientOff).entries
10025
9837
  });
10026
9838
 
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
9839
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
10028
9840
  var events = array(record(string(), unknown()));
10029
9841
  var recordedRun = strictObject({
10030
9842
  run_id: id,
@@ -10096,7 +9908,7 @@ var runHit = strictObject({
10096
9908
  });
10097
9909
  var runLocation = strictObject({ path: text });
10098
9910
 
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
9911
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/relationship.js
10100
9912
  var relationship = strictObject({
10101
9913
  id,
10102
9914
  from: reference,
@@ -10116,10 +9928,14 @@ var relationship = strictObject({
10116
9928
  position: nullable(text),
10117
9929
  starts_at: nullable(time),
10118
9930
  ends_at: nullable(time),
9931
+ /** The source account that reported it, `<provider>:<account>`. */
9932
+ account: optional(text),
9933
+ /** How a source made it when it stated none, such as `department-head`. */
9934
+ derived: optional(text),
10119
9935
  created_at: time
10120
9936
  });
10121
9937
 
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
9938
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
10123
9939
  var milliseconds2 = nullable(pipe(number(), minValue(0)));
10124
9940
  var figures2 = { replies: count, median_ms: milliseconds2, p90_ms: milliseconds2, mean_ms: milliseconds2 };
10125
9941
  var responseTimes = strictObject({
@@ -10136,7 +9952,7 @@ var waitingChats = strictObject({
10136
9952
  by_kind: strictObject({ private: count, group: count })
10137
9953
  });
10138
9954
 
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
9955
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/retention.js
10140
9956
  var retentionCohort = strictObject({
10141
9957
  /** The first day of the joining day or week. */
10142
9958
  cohort: text,
@@ -10184,7 +10000,7 @@ var retention = strictObject({
10184
10000
  rows: array(retentionCohort)
10185
10001
  });
10186
10002
 
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
10003
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
10188
10004
  var savedSearch = strictObject({
10189
10005
  id,
10190
10006
  /** `null` for a run in the history. */
@@ -10201,7 +10017,7 @@ var savedSearch = strictObject({
10201
10017
  });
10202
10018
  var searchHistoryClear = strictObject({ cleared: count });
10203
10019
 
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
10020
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
10205
10021
  var sendAttempt = strictObject({
10206
10022
  at: time,
10207
10023
  profile: text,
@@ -10229,7 +10045,7 @@ var sendAttempt = strictObject({
10229
10045
  error_code: optional(text)
10230
10046
  });
10231
10047
 
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
10048
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
10233
10049
  var absent = strictObject({ path: text, exists: literal(false) });
10234
10050
  var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
10235
10051
  var infoSchema = strictObject({
@@ -10450,7 +10266,7 @@ var storeRepair = union([
10450
10266
  ]);
10451
10267
  var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
10452
10268
 
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
10269
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/store-records.js
10454
10270
  var range = strictObject({ from: number(), to: number() });
10455
10271
  var storeChatStatus = strictObject({
10456
10272
  chat_id: id,
@@ -10548,7 +10364,7 @@ var storeJobRetry = union([
10548
10364
  ]);
10549
10365
  var storeJobClear = strictObject({ cleared: array(id) });
10550
10366
 
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
10367
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/store-table.js
10552
10368
  var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
10553
10369
  var storeTable = strictObject({
10554
10370
  name: text,
@@ -10557,7 +10373,7 @@ var storeTable = strictObject({
10557
10373
  bytes: optional(nullable(count))
10558
10374
  });
10559
10375
 
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
10376
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
10561
10377
  var tagTarget = variant("type", [
10562
10378
  strictObject({ type: literal("chat"), chat_id: id }),
10563
10379
  strictObject({ type: literal("contact"), person_id: id }),
@@ -10588,7 +10404,7 @@ var automaticTags = strictObject({
10588
10404
  dry_run: boolean()
10589
10405
  });
10590
10406
 
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
10407
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/tagging.js
10592
10408
  var tagging = strictObject({
10593
10409
  tag: text,
10594
10410
  type: picklist(TAG_TYPES),
@@ -10601,7 +10417,7 @@ var tagging = strictObject({
10601
10417
  created_at: time
10602
10418
  });
10603
10419
 
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
10420
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
10605
10421
  var side = strictObject({ ref: reference, key: text, title: text, status: text });
10606
10422
  var taskPair = strictObject({
10607
10423
  task: nullable(side),
@@ -10624,7 +10440,7 @@ var taskPair = strictObject({
10624
10440
  created_at: time
10625
10441
  });
10626
10442
 
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
10443
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/task-results.js
10628
10444
  var nullableTime = nullable(time);
10629
10445
  var link = strictObject({
10630
10446
  id,
@@ -10798,19 +10614,19 @@ var taskReview = strictObject({
10798
10614
  untrusted
10799
10615
  });
10800
10616
 
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
10617
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/template.js
10802
10618
  var template = strictObject({
10803
10619
  key: text,
10804
10620
  channel: picklist(["telegram", "email", "text"]),
10805
10621
  language: text,
10806
10622
  about: text,
10807
10623
  renders: boolean(),
10808
- source: picklist(["stored", "default"]),
10624
+ source: picklist(["stored", "inherited", "default"]),
10809
10625
  updated_at: nullable(time),
10810
10626
  updated_by: nullable(text)
10811
10627
  });
10812
10628
 
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
10629
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/topic.js
10814
10630
  var topic = strictObject({
10815
10631
  id,
10816
10632
  title: text,
@@ -10824,7 +10640,7 @@ var topic = strictObject({
10824
10640
  untrusted
10825
10641
  });
10826
10642
 
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
10643
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/index.js
10828
10644
  var ENTITIES = {
10829
10645
  sync_progress: progress,
10830
10646
  deal,
@@ -10896,6 +10712,10 @@ var ENTITIES = {
10896
10712
  identity,
10897
10713
  contact_context: contactContext,
10898
10714
  contact_preparation: contactPreparation,
10715
+ person_context: personContext,
10716
+ organization_context: organizationContext,
10717
+ deal_context: dealContext,
10718
+ "deal_context.brief": dealBrief,
10899
10719
  contact_activity: contactActivity,
10900
10720
  contact_check: contactCheck,
10901
10721
  linked_person: linkedPerson,
@@ -11109,11 +10929,11 @@ var ENTITIES = {
11109
10929
  template
11110
10930
  };
11111
10931
  var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.entries(ENTITIES).map(([name, schema2]) => {
11112
- const { $schema: _, ...definition } = jsonSchemaOf(schema2);
10932
+ const { $schema: _2, ...definition } = jsonSchemaOf(schema2);
11113
10933
  return [name, definition];
11114
10934
  })), "entityDefinitions");
11115
10935
 
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
10936
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
11117
10937
  var schemas = /* @__PURE__ */ new WeakMap();
11118
10938
  var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
11119
10939
  if (Object.hasOwn(ENTITIES, name))
@@ -11147,7 +10967,7 @@ var answerRow = /* @__PURE__ */ __name((command) => {
11147
10967
  return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
11148
10968
  }, "answerRow");
11149
10969
 
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
10970
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/images/picture/models.js
11151
10971
  import { join as join6 } from "node:path";
11152
10972
  var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
11153
10973
  var IMAGE_MODELS = [
@@ -11201,7 +11021,7 @@ var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedM
11201
11021
  var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file, join6(directory, model3.id, file.name)]), "placedImage");
11202
11022
  var isImageModelInstalled = /* @__PURE__ */ __name((model3, directory) => filesPresent(placedImage(model3, directory)), "isImageModelInstalled");
11203
11023
 
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
11024
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/steps.js
11205
11025
  var STEPS2 = defineSteps([
11206
11026
  ...STEPS,
11207
11027
  {
@@ -11420,12 +11240,6 @@ var STEPS2 = defineSteps([
11420
11240
  command: "store recover",
11421
11241
  args: [],
11422
11242
  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
11243
  }
11430
11244
  ]);
11431
11245
  var nextStep = /* @__PURE__ */ __name((id6, input) => {
@@ -11488,7 +11302,7 @@ var stepLine = /* @__PURE__ */ __name((root, step2) => {
11488
11302
  ].join(" ");
11489
11303
  }, "stepLine");
11490
11304
 
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
11305
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
11492
11306
  var where = [{ field: "ref" }];
11493
11307
  var who2 = { field: ["who.owner", "who.name"], tag: "you" };
11494
11308
  var ON_CHAT_ROW = /* @__PURE__ */ new Set(["reply-next", "coverage"]);
@@ -11580,7 +11394,7 @@ var STATUS_ROWS = {
11580
11394
  "status.failed": { columns: [{ field: "signal" }], text: ["why"] }
11581
11395
  };
11582
11396
 
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
11397
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/compact.js
11584
11398
  var TEXT_CHARS = 400;
11585
11399
  var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
11586
11400
  var messageRow = {
@@ -11822,8 +11636,8 @@ var dayColumn = /* @__PURE__ */ __name((rows2, shape, hoisted) => {
11822
11636
  const dates = rows2.map(({ cells }) => cells[index]?.date);
11823
11637
  if (dates.some((one) => one === void 0))
11824
11638
  return -1;
11825
- const days2 = dates;
11826
- return ordered(days2) && new Set(days2).size * 3 <= days2.length ? index : -1;
11639
+ const days = dates;
11640
+ return ordered(days) && new Set(days).size * 3 <= days.length ? index : -1;
11827
11641
  }, "dayColumn");
11828
11642
  var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
11829
11643
  const dates = [];
@@ -11839,7 +11653,7 @@ var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
11839
11653
  const firstColumn = shape.columns[0];
11840
11654
  const refs = rows2.map(({ item }) => item && firstColumn ? firstSet(item, firstColumn.field) : void 0);
11841
11655
  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));
11656
+ const hoisted = rows2.length < 2 ? [] : shape.columns.map((_2, index) => index > 0 && sameEverywhere(rows2, index));
11843
11657
  const named2 = hoisted.flatMap((hoist, index) => {
11844
11658
  const column = shape.columns[index];
11845
11659
  const item = rows2[0]?.item;
@@ -11946,11 +11760,11 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
11946
11760
  return lines.concat(footerOf(body)).join("\n");
11947
11761
  }, "compactText");
11948
11762
 
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
11763
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
11950
11764
  var SOFT_OUTPUT_BYTES = 256 * 1024;
11951
11765
  var CARRIED = ["json", "compact", "offline", "timeout", "full", "brief", "maxOutputBytes"];
11952
11766
  var NOT_WITH_COMPACT = /* @__PURE__ */ new Set(["json", "brief"]);
11953
- var snake3 = /* @__PURE__ */ __name((name) => name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
11767
+ var snake2 = /* @__PURE__ */ __name((name) => name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
11954
11768
  var typed = /* @__PURE__ */ __name((command, key) => command.getOptionValueSource(key) === "cli", "typed");
11955
11769
  var typedArgs = /* @__PURE__ */ __name((command) => {
11956
11770
  const root = rootOf2(command);
@@ -11963,8 +11777,8 @@ var typedArgs = /* @__PURE__ */ __name((command) => {
11963
11777
  const word = Array.isArray(value) ? value.join(" ") : value;
11964
11778
  return word === void 0 || word === "" ? [] : [[argument.name(), word]];
11965
11779
  });
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)]);
11780
+ const own = command.options.map((option) => option.attributeName()).filter((key) => typed(command, key)).map((key) => [snake2(key), command.getOptionValue(key)]);
11781
+ const global = CARRIED.filter((key) => typed(root, key)).map((key) => [snake2(key), root.getOptionValue(key)]);
11968
11782
  return Object.fromEntries([...positional, ...own, ...global]);
11969
11783
  }, "typedArgs");
11970
11784
  var declaresRow = /* @__PURE__ */ __name((command) => {
@@ -12004,7 +11818,7 @@ var largeAnswerSteps = /* @__PURE__ */ __name((command) => {
12004
11818
  return args ? compactStep(command, args, "the answer is large as JSON; one line per item keeps every ref") : [];
12005
11819
  }, "largeAnswerSteps");
12006
11820
 
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
11821
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
12008
11822
  var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
12009
11823
  var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
12010
11824
  var strip = /* @__PURE__ */ __name((value) => {
@@ -12018,7 +11832,7 @@ var strip = /* @__PURE__ */ __name((value) => {
12018
11832
  return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
12019
11833
  }, "strip");
12020
11834
 
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
11835
+ // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/envelope.js
12022
11836
  var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
12023
11837
  var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
12024
11838
  var listOf = /* @__PURE__ */ __name((command, input) => {
@@ -12061,7 +11875,7 @@ var itemOf = /* @__PURE__ */ __name((item, { next = [], missing, meta } = {}) =>
12061
11875
  };
12062
11876
  return body;
12063
11877
  }, "itemOf");
12064
- var snake4 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
11878
+ var snake3 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
12065
11879
  var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
12066
11880
  const kept = new Set(verbatim);
12067
11881
  const convert = /* @__PURE__ */ __name((value) => {
@@ -12072,7 +11886,7 @@ var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
12072
11886
  return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => {
12073
11887
  if (inner === void 0)
12074
11888
  return [];
12075
- const name = snake4(key);
11889
+ const name = snake3(key);
12076
11890
  return [[name, kept.has(key) || kept.has(name) ? inner : convert(inner)]];
12077
11891
  }));
12078
11892
  }, "convert");
@@ -12178,30 +11992,15 @@ export {
12178
11992
  mailHolderVariable,
12179
11993
  MESSENGER_CHANGE_REFUSAL,
12180
11994
  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
11995
  recordLogFor,
12202
11996
  parseDuration,
11997
+ WEIGHTS,
11998
+ LINK,
11999
+ oddName,
12203
12000
  member,
12204
12001
  chat,
12002
+ attachment,
12003
+ message,
12205
12004
  botProfile,
12206
12005
  botSeenChat,
12207
12006
  botAdmin,
@@ -12227,8 +12026,6 @@ export {
12227
12026
  stateOf,
12228
12027
  startArchiveJob,
12229
12028
  job,
12230
- attachment,
12231
- message,
12232
12029
  annotate,
12233
12030
  metaOf,
12234
12031
  annotateOption,
@@ -12249,6 +12046,9 @@ export {
12249
12046
  recorded,
12250
12047
  startRecording,
12251
12048
  wasSettled,
12049
+ inCommandServerRequest,
12050
+ commandServerRequest,
12051
+ exitCodeSet,
12252
12052
  sentIds,
12253
12053
  currentOperation,
12254
12054
  guardedWrite,
@@ -12273,6 +12073,7 @@ export {
12273
12073
  rootOf,
12274
12074
  sampleCommand,
12275
12075
  DEFAULT_TEXT_MODEL,
12076
+ PREVIOUS_DEFAULT_TEXT_MODEL,
12276
12077
  CustomTextModelShape,
12277
12078
  readTextModelsSection,
12278
12079
  writeTextModelsSection,
@@ -12353,9 +12154,6 @@ export {
12353
12154
  inviteLink,
12354
12155
  chatEvent,
12355
12156
  contact,
12356
- WEIGHTS,
12357
- LINK,
12358
- oddName,
12359
12157
  contactNote,
12360
12158
  conversation,
12361
12159
  documentLink,