@wirecat/tg-cli 0.99.0 → 0.101.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +6 -5
  2. package/dist/bin/tg.js +23 -28
  3. package/dist/bundle/adapter-A3VD4Y6Z.js +2790 -0
  4. package/dist/bundle/all-profiles-UPVNHXB2.js +264 -0
  5. package/dist/bundle/anthropic-IRKNWPIB.js +71 -0
  6. package/dist/bundle/bot-api-UNTQG2M5.js +39793 -0
  7. package/dist/bundle/bot-history-V4RTY5K7.js +167 -0
  8. package/dist/bundle/bun-2JZPG2NL.js +169 -0
  9. package/dist/bundle/bun-sqlite-TZHKM225.js +70 -0
  10. package/dist/bundle/chunk-22PQUX72.js +190 -0
  11. package/dist/bundle/chunk-2DGOFLDA.js +58 -0
  12. package/dist/bundle/chunk-2SJOUK6J.js +2 -0
  13. package/dist/bundle/chunk-2XBSVRT2.js +98 -0
  14. package/dist/bundle/chunk-3KHKYYCR.js +24782 -0
  15. package/dist/bundle/chunk-4ZS73HTJ.js +6848 -0
  16. package/dist/bundle/chunk-54R2GDQ3.js +119 -0
  17. package/dist/bundle/chunk-5GKXETRP.js +1345 -0
  18. package/dist/bundle/chunk-5KU4UQBM.js +570 -0
  19. package/dist/bundle/chunk-5TPT2S2Z.js +41 -0
  20. package/dist/bundle/chunk-64DK7S4F.js +76 -0
  21. package/dist/bundle/chunk-6IPY2QRG.js +82 -0
  22. package/dist/bundle/chunk-7BFO3DY6.js +21 -0
  23. package/dist/bundle/chunk-7CBUCTB6.js +1142 -0
  24. package/dist/bundle/chunk-A5JSTZZZ.js +122 -0
  25. package/dist/bundle/chunk-ACGTFLEB.js +1275 -0
  26. package/dist/bundle/chunk-AFV74GK3.js +50 -0
  27. package/dist/bundle/chunk-AVWK4NCW.js +24600 -0
  28. package/dist/bundle/chunk-BJG6JA5U.js +35 -0
  29. package/dist/bundle/chunk-BX6HH4F6.js +215 -0
  30. package/dist/bundle/chunk-BXQS5RCE.js +8170 -0
  31. package/dist/bundle/chunk-CJ6IYCYP.js +583 -0
  32. package/dist/bundle/chunk-DG62L57H.js +2795 -0
  33. package/dist/bundle/chunk-DYNSP6FW.js +33720 -0
  34. package/dist/bundle/chunk-F7TDFWXY.js +82 -0
  35. package/dist/bundle/chunk-G2US6LJB.js +35 -0
  36. package/dist/bundle/chunk-G3ZRY436.js +3077 -0
  37. package/dist/bundle/chunk-G77QOTXE.js +18 -0
  38. package/dist/bundle/chunk-H6OXALTJ.js +45 -0
  39. package/dist/bundle/chunk-LPB2MDUW.js +452 -0
  40. package/dist/bundle/chunk-MLLJ74LM.js +24 -0
  41. package/dist/bundle/chunk-N5UFBWDM.js +166 -0
  42. package/dist/bundle/chunk-NC5WS7OP.js +31 -0
  43. package/dist/bundle/chunk-NKJJJAIJ.js +237 -0
  44. package/dist/bundle/chunk-NMGO6LW6.js +1950 -0
  45. package/dist/bundle/chunk-ODSVNH3H.js +18588 -0
  46. package/dist/bundle/chunk-OEJ5DMCX.js +2374 -0
  47. package/dist/bundle/chunk-OILBDLWL.js +724 -0
  48. package/dist/bundle/chunk-OPBTNQ35.js +1007 -0
  49. package/dist/bundle/chunk-PUBS2F5J.js +35803 -0
  50. package/dist/bundle/chunk-PYTOIDSM.js +153 -0
  51. package/dist/bundle/chunk-QOWSVDPZ.js +3526 -0
  52. package/dist/bundle/chunk-QYVVRQTN.js +73 -0
  53. package/dist/bundle/chunk-RF54YDBB.js +46 -0
  54. package/dist/bundle/chunk-RVCS7Q3A.js +6672 -0
  55. package/dist/bundle/chunk-S2JSZWEC.js +277 -0
  56. package/dist/bundle/chunk-S7ZNLLY5.js +54 -0
  57. package/dist/bundle/chunk-TGREFJVA.js +2315 -0
  58. package/dist/bundle/chunk-U46UNBMT.js +524 -0
  59. package/dist/bundle/chunk-UN6CKIBN.js +285 -0
  60. package/dist/bundle/chunk-VA5YEJS3.js +161 -0
  61. package/dist/bundle/chunk-VCGL2ETF.js +78 -0
  62. package/dist/bundle/chunk-VRSN7VLO.js +63 -0
  63. package/dist/bundle/chunk-VYDTI254.js +3332 -0
  64. package/dist/bundle/chunk-W2336E7Y.js +886 -0
  65. package/dist/bundle/chunk-X4Y2ROJI.js +541 -0
  66. package/dist/bundle/chunk-XCKD54TN.js +100 -0
  67. package/dist/bundle/chunk-ZEOCU24Z.js +738 -0
  68. package/dist/bundle/chunk-ZJVZXJOG.js +71 -0
  69. package/dist/bundle/chunk-ZV24I2UJ.js +25 -0
  70. package/dist/bundle/chunk-ZZLKX62Z.js +928 -0
  71. package/dist/bundle/command-contract-TKDI7E56.js +31 -0
  72. package/dist/bundle/dist-RJMT44PL.js +7577 -0
  73. package/dist/bundle/echarts-QZ6PR3VC.js +42501 -0
  74. package/dist/bundle/embed-UBXCXSRD.js +35 -0
  75. package/dist/bundle/embedder-B4ZTKC23.js +108 -0
  76. package/dist/bundle/entry-BTUTHO5M.js +14 -0
  77. package/dist/bundle/first-run-UC4HRIFV.js +24 -0
  78. package/dist/bundle/first-screen-SMCX6YKY.js +29 -0
  79. package/dist/bundle/identity-QSDEGDH7.js +11 -0
  80. package/dist/bundle/instructions-BBGLZKO3.js +9 -0
  81. package/dist/bundle/mcp-4Y37G2UY.js +165 -0
  82. package/dist/bundle/node-IUL5HSYI.js +2340 -0
  83. package/dist/bundle/node-LZZX22VR.js +176 -0
  84. package/dist/bundle/node-UPPL626U.js +21 -0
  85. package/dist/bundle/node-sqlite-BPGT6T5U.js +46 -0
  86. package/dist/bundle/oauth-XNE2KPKJ.js +18 -0
  87. package/dist/bundle/open-SXGYZLB5.js +20 -0
  88. package/dist/bundle/process-GPUXC4PG.js +91 -0
  89. package/dist/bundle/program-NEXEAL7T.js +1060 -0
  90. package/dist/bundle/prompt-SORGLEYI.js +13 -0
  91. package/dist/bundle/proxy-transport-G4MA6BGU.js +17 -0
  92. package/dist/bundle/recognize-UJBXORVD.js +191 -0
  93. package/dist/bundle/remote-W72AR7KH.js +26 -0
  94. package/dist/bundle/rerank-3Y2VZM3J.js +49 -0
  95. package/dist/bundle/serve-VDZIVOPR.js +196 -0
  96. package/dist/bundle/server-BERXP4GW.js +785 -0
  97. package/dist/bundle/server-ZFHN4GUF.js +178 -0
  98. package/dist/bundle/state-DGR4EE3E.js +34 -0
  99. package/dist/bundle/store-MRCFSCZD.js +121 -0
  100. package/dist/bundle/store-maintenance-command-DCMZDMYS.js +46 -0
  101. package/dist/bundle/tg.js +40 -0
  102. package/dist/commands/context.d.ts.map +1 -1
  103. package/dist/commands/context.js +3 -1
  104. package/dist/commands/context.js.map +1 -1
  105. package/dist/install/postinstall.js +1 -1
  106. package/dist/install/postinstall.js.map +1 -1
  107. package/dist/program.js +1 -1
  108. package/dist/program.js.map +1 -1
  109. package/dist/telegram/errors.js +1 -1
  110. package/dist/telegram/errors.js.map +1 -1
  111. package/dist/version.d.ts +1 -1
  112. package/dist/version.d.ts.map +1 -1
  113. package/dist/version.js +1 -1
  114. package/dist/version.js.map +1 -1
  115. package/install/windows.ps1 +1 -1
  116. package/package.json +6 -4
  117. package/skills/{wirecat-tg → tg-cli}/SKILL.md +4 -4
@@ -0,0 +1,3526 @@
1
+ import { createRequire as __tgRequire } from "node:module";
2
+ const require = __tgRequire(import.meta.url);
3
+ import {
4
+ WEIGHTS,
5
+ agenda,
6
+ attachment,
7
+ closeSuggestion,
8
+ conversation,
9
+ recordLogFor,
10
+ storeTable,
11
+ tagging,
12
+ task
13
+ } from "./chunk-RVCS7Q3A.js";
14
+ import {
15
+ childTrace
16
+ } from "./chunk-OPBTNQ35.js";
17
+ import {
18
+ author,
19
+ count,
20
+ id,
21
+ note,
22
+ organization,
23
+ project,
24
+ providerMetadata,
25
+ reminder,
26
+ text,
27
+ time,
28
+ untrusted
29
+ } from "./chunk-54R2GDQ3.js";
30
+ import {
31
+ envName
32
+ } from "./chunk-ZV24I2UJ.js";
33
+ import {
34
+ carries
35
+ } from "./chunk-VRSN7VLO.js";
36
+ import {
37
+ FACT_STATUSES,
38
+ FACT_TYPES,
39
+ LINK_KINDS,
40
+ LINK_SOURCES,
41
+ MEETING_RESULT_ENTITIES,
42
+ MEMORY_KINDS,
43
+ MEMORY_SCOPES,
44
+ MEMORY_STATUSES,
45
+ RELATION_KINDS,
46
+ TASK_KINDS,
47
+ TASK_ORIGINS,
48
+ TASK_STATES,
49
+ TASK_TYPES,
50
+ TASK_VERDICTS,
51
+ WORK_TASK_TYPES,
52
+ event,
53
+ meeting,
54
+ meetingDetails,
55
+ meetingHit,
56
+ meetingLink,
57
+ meetingParticipants,
58
+ meetingPassage,
59
+ meetingProjectEvidence,
60
+ meetingReview,
61
+ meetingSpeaker,
62
+ meetingStats,
63
+ meetingSummary,
64
+ meetingTranscript
65
+ } from "./chunk-G3ZRY436.js";
66
+ import {
67
+ resolvePaths,
68
+ writeSecurely
69
+ } from "./chunk-DG62L57H.js";
70
+ import {
71
+ CliError,
72
+ array,
73
+ boolean,
74
+ integer,
75
+ isoDate,
76
+ isoTime,
77
+ jsonSchemaOf,
78
+ literal,
79
+ maxLength,
80
+ minLength,
81
+ minValue,
82
+ null_,
83
+ nullable,
84
+ number,
85
+ objectWithRest,
86
+ omit,
87
+ optional,
88
+ pageSchema,
89
+ partial,
90
+ pick,
91
+ picklist,
92
+ pipe,
93
+ record,
94
+ reference,
95
+ regex,
96
+ safeInteger,
97
+ strictObject,
98
+ string,
99
+ union,
100
+ unknown,
101
+ unwrap,
102
+ variant
103
+ } from "./chunk-OEJ5DMCX.js";
104
+ import {
105
+ __name
106
+ } from "./chunk-AFV74GK3.js";
107
+
108
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/member.js
109
+ var member = strictObject({
110
+ id,
111
+ name: nullable(text),
112
+ username: nullable(text),
113
+ role: optional(picklist(["owner", "admin", "member"])),
114
+ /** `null` when their privacy hides it. */
115
+ last_seen_at: optional(nullable(time)),
116
+ registered_at: optional(nullable(time)),
117
+ joined_at: optional(nullable(time)),
118
+ /** Who added them or whose invite they used. */
119
+ invited_by: optional(nullable(id)),
120
+ is_bot: optional(boolean()),
121
+ deleted: optional(boolean()),
122
+ flagged: optional(picklist(["scam", "fake"])),
123
+ has_photo: optional(boolean()),
124
+ /** `chats members check`: how much they look like a bot — a hint, never a verdict. */
125
+ score: optional(count),
126
+ reasons: optional(array(text)),
127
+ /** `chats members check --deep`: the whole person check, as `contacts check` answers it. */
128
+ check: optional(record(string(), unknown()))
129
+ });
130
+
131
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/chat.js
132
+ var setting = optional(nullable(boolean()));
133
+ var chat = strictObject({
134
+ ref: reference,
135
+ id,
136
+ provider: optional(text),
137
+ account: optional(text),
138
+ title: nullable(text),
139
+ kind: picklist(["dialog", "group", "channel", "saved", "unknown"]),
140
+ unread_count: nullable(count),
141
+ unread_mentions: optional(count),
142
+ last_message_at: nullable(time),
143
+ participants_count: nullable(count),
144
+ muted: optional(boolean()),
145
+ /** When the mute ends; absent with `muted` true is for good. */
146
+ muted_until: optional(time),
147
+ archived: optional(boolean()),
148
+ /** The owner marked it unread, whatever `unread_count` says. */
149
+ marked_unread: optional(boolean()),
150
+ membership_state: optional(picklist(["joined", "left", "public", "imported", "archived", "external"])),
151
+ parent_chat_id: optional(id),
152
+ scope: optional(picklist(["personal", "work"])),
153
+ provider_metadata: providerMetadata,
154
+ /** `chats show`, a group or channel: what it says about itself. */
155
+ description: optional(nullable(text)),
156
+ invite_link: optional(nullable(text)),
157
+ settings: optional(strictObject({
158
+ all_can_pin: setting,
159
+ only_admins_add: setting,
160
+ only_admins_call: setting,
161
+ only_owner_edits_info: setting,
162
+ members_see_link: setting,
163
+ join_approval: setting,
164
+ only_admins_send: setting,
165
+ only_admins_edit_info: setting,
166
+ disappearing_seconds: optional(nullable(count))
167
+ })),
168
+ /** `chats show`: absent when no roster is known; an empty list is a known empty roster. */
169
+ members: optional(array(member))
170
+ });
171
+
172
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/list-results.js
173
+ var botProfile = strictObject({
174
+ name: text,
175
+ token: text,
176
+ bot: optional(text),
177
+ id: optional(id),
178
+ problem: optional(text)
179
+ });
180
+ var botSeenChat = strictObject({
181
+ ...partial(omit(chat, ["ref", "provider", "account", "description", "invite_link", "settings", "members"])).entries,
182
+ id,
183
+ parent_chat_id: optional(nullable(id)),
184
+ muted_until: optional(nullable(time)),
185
+ first_seen_at: optional(time),
186
+ last_seen_at: optional(time)
187
+ });
188
+ var botAdmin = strictObject({
189
+ id,
190
+ name: nullable(text),
191
+ username: nullable(text),
192
+ role: picklist(["owner", "admin"]),
193
+ rights: array(picklist(["read", "members", "admins", "info", "pin", "link", "post", "edit", "delete"])),
194
+ title: nullable(text)
195
+ });
196
+ var botMenuEntry = strictObject({ name: text, description: nullable(text) });
197
+ var botWebhook = strictObject({ url: text, types: optional(array(text)) });
198
+ var scheduledJob = strictObject({
199
+ name: text,
200
+ kind: picklist(["command", "agent"]),
201
+ when: text,
202
+ last: nullable(strictObject({
203
+ at: time,
204
+ exit_code: number(),
205
+ output: text,
206
+ trace_id: optional(text),
207
+ reason: optional(text),
208
+ error_code: optional(text),
209
+ failing_since: optional(time),
210
+ failures: optional(number())
211
+ }))
212
+ });
213
+ var botTemplate = strictObject({
214
+ name: nullable(text),
215
+ status: nullable(text),
216
+ language: nullable(text),
217
+ category: nullable(text)
218
+ });
219
+ var callRecord = strictObject({
220
+ id,
221
+ chat_id: nullable(id),
222
+ caller_id: nullable(id),
223
+ direction: picklist(["incoming", "outgoing"]),
224
+ outcome: picklist(["answered", "missed", "declined"]),
225
+ kind: picklist(["audio", "video"]),
226
+ at: time,
227
+ duration_seconds: nullable(number())
228
+ });
229
+ var stickerInventory = strictObject({
230
+ id,
231
+ title: optional(text),
232
+ count: optional(number()),
233
+ link: optional(nullable(text)),
234
+ set_id: optional(nullable(id)),
235
+ emoji: optional(array(text)),
236
+ url: optional(nullable(text))
237
+ });
238
+
239
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
240
+ var actionableError = objectWithRest({
241
+ code: text,
242
+ message: text,
243
+ retryable: boolean(),
244
+ retry_after_ms: optional(number())
245
+ }, unknown());
246
+ var batchResult = strictObject({
247
+ attempted: count,
248
+ succeeded: count,
249
+ failed: count,
250
+ error_rate: number(),
251
+ failures: array(strictObject({ id, stage: text, error: actionableError, attachment: optional(count) })),
252
+ stop_reason: optional(picklist(["rate_limited", "authentication", "error_rate", "cancelled"])),
253
+ max_error_percent: count
254
+ });
255
+
256
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
257
+ var conversationBuild = strictObject({
258
+ chat: id,
259
+ messages: count,
260
+ links: count,
261
+ conversations: count,
262
+ built_at: time,
263
+ rules_version: count
264
+ });
265
+ var chatEmbedding = strictObject({ chat: id, model: text, embedded: count, skipped: count });
266
+ var conversationPreparation = strictObject({
267
+ model: text,
268
+ model_available: boolean(),
269
+ built: array(conversationBuild),
270
+ embedded: array(chatEmbedding),
271
+ left: array(strictObject({ chat: id, needs: picklist(["build", "embed"]) })),
272
+ /** Messages given their own vector, which `search messages --discover` reads, and how many still lack one. */
273
+ messages: optional(strictObject({ embedded: count, left: count }))
274
+ });
275
+ var catchUpPreparation = strictObject({
276
+ complete: boolean(),
277
+ reason: optional(picklist(["message_bound", "time_or_abort_bound", "preparation_failed", "pending"])),
278
+ prepared: optional(conversationPreparation)
279
+ });
280
+
281
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
282
+ import { spawn } from "node:child_process";
283
+ import { randomBytes } from "node:crypto";
284
+ import { closeSync, existsSync, mkdirSync, openSync, readdirSync, readFileSync, realpathSync, rmSync } from "node:fs";
285
+ import { dirname, join } from "node:path";
286
+
287
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/background/checkpoints.js
288
+ var progressOf = /* @__PURE__ */ __name((input) => {
289
+ const total = input.total ?? null;
290
+ const updated = input.updatedAt ?? null;
291
+ return {
292
+ job: input.job,
293
+ profile: input.profile,
294
+ done: input.done,
295
+ total,
296
+ remaining: total === null ? null : Math.max(0, total - input.done),
297
+ state: input.complete ?? (total !== null && input.done >= total) ? "complete" : "partial",
298
+ updated_at: updated,
299
+ cursor_age_ms: updated === null ? null : Math.max(0, (input.now ?? /* @__PURE__ */ new Date()).getTime() - Date.parse(updated))
300
+ };
301
+ }, "progressOf");
302
+
303
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
304
+ var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
305
+ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
306
+ const out = openSync(log, "a", 384);
307
+ try {
308
+ const child = spawn(process.execPath, [realpathSync(process.argv[1] ?? ""), ...argv], {
309
+ detached: true,
310
+ stdio: ["ignore", out, out],
311
+ env
312
+ });
313
+ child.unref();
314
+ return child.pid ?? 0;
315
+ } finally {
316
+ closeSync(out);
317
+ }
318
+ }, "spawnDetached");
319
+ var jobsDir = /* @__PURE__ */ __name((app, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
320
+ var jobPath = /* @__PURE__ */ __name((dir, id6) => join(dir, `${id6}.json`), "jobPath");
321
+ var saveJob = /* @__PURE__ */ __name((dir, job2) => {
322
+ mkdirSync(dir, { recursive: true, mode: 448 });
323
+ writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
324
+ `, 384);
325
+ }, "saveJob");
326
+ var readJob = /* @__PURE__ */ __name((dir, id6) => {
327
+ if (!/^[\w-]+$/.test(id6) || !existsSync(jobPath(dir, id6)))
328
+ return void 0;
329
+ try {
330
+ return JSON.parse(readFileSync(jobPath(dir, id6), "utf8"));
331
+ } catch {
332
+ return void 0;
333
+ }
334
+ }, "readJob");
335
+ var recordsPath = /* @__PURE__ */ __name((dir, id6) => join(dir, `${id6}.jsonl`), "recordsPath");
336
+ var tracedJob = /* @__PURE__ */ __name((env) => {
337
+ const trace = childTrace();
338
+ return { env: { ...env, TRACEPARENT: trace.traceparent }, traceId: trace.traceId };
339
+ }, "tracedJob");
340
+ var jobStarted = /* @__PURE__ */ __name((app, dir, job2) => {
341
+ saveJob(dir, job2);
342
+ recordLogFor(recordsPath(dir, job2.id), app, job2.traceId ? { traceId: job2.traceId } : {}).info({
343
+ event: "job.start",
344
+ job: job2.id,
345
+ pid: job2.pid
346
+ });
347
+ }, "jobStarted");
348
+ var finishJob = /* @__PURE__ */ __name((app, dir, id6, change) => {
349
+ updateJob(dir, id6, change);
350
+ const job2 = readJob(dir, id6);
351
+ if (!job2)
352
+ return;
353
+ const outcome2 = stateOf(job2);
354
+ recordLogFor(recordsPath(dir, id6), app, job2.traceId ? { traceId: job2.traceId } : {})[job2.error ? "error" : "info"]({
355
+ event: "job.exit",
356
+ job: id6,
357
+ outcome: outcome2,
358
+ ...job2.error ? { errorCode: job2.error.code } : {}
359
+ });
360
+ }, "finishJob");
361
+ var updateJob = /* @__PURE__ */ __name((dir, id6, change) => {
362
+ const job2 = readJob(dir, id6);
363
+ if (job2)
364
+ saveJob(dir, { ...job2, ...change });
365
+ }, "updateJob");
366
+ var removeJob = /* @__PURE__ */ __name((dir, job2) => {
367
+ rmSync(jobPath(dir, job2.id), { force: true });
368
+ rmSync(recordsPath(dir, job2.id), { force: true });
369
+ if (dirname(job2.log) === dir)
370
+ rmSync(job2.log, { force: true });
371
+ }, "removeJob");
372
+ var listJobs = /* @__PURE__ */ __name((dir) => existsSync(dir) ? readdirSync(dir).filter((name) => name.endsWith(".json")).flatMap((name) => readJob(dir, name.slice(0, -".json".length)) ?? []).sort((a, b) => b.startedAt.localeCompare(a.startedAt)) : [], "listJobs");
373
+ var jobDetails = /* @__PURE__ */ __name((job2) => ({
374
+ job: job2.id,
375
+ profile: job2.profile,
376
+ chat: job2.chat,
377
+ state: stateOf(job2),
378
+ pid: job2.pid,
379
+ startedAt: job2.startedAt,
380
+ ...job2.finishedAt ? { finishedAt: job2.finishedAt } : {},
381
+ fetched: Number(job2.result?.fetched ?? job2.progress?.fetched ?? 0),
382
+ ...job2.limit === void 0 ? {} : { messageLimit: job2.limit },
383
+ ...job2.pageSize === void 0 ? {} : { pageSize: job2.pageSize },
384
+ ...job2.last === void 0 ? {} : { last: job2.last },
385
+ ...job2.result ? {
386
+ complete: job2.result.complete === true,
387
+ ...job2.result.issue ? { issue: job2.result.issue } : {},
388
+ ...job2.result.batch ? { batch: job2.result.batch } : {},
389
+ ...job2.result.resume ? { resume: job2.result.resume } : {}
390
+ } : {},
391
+ ...job2.error ? { error: job2.error } : {},
392
+ progress: progressOf({
393
+ job: job2.id,
394
+ profile: job2.profile,
395
+ done: Number(job2.result?.fetched ?? job2.progress?.fetched ?? 0),
396
+ ...job2.limit === void 0 ? {} : { total: job2.limit },
397
+ complete: job2.result?.complete === true,
398
+ ...job2.progress?.at ?? job2.finishedAt ? { updatedAt: job2.progress?.at ?? job2.finishedAt } : {}
399
+ })
400
+ }), "jobDetails");
401
+ var jobItem = /* @__PURE__ */ __name((job2) => {
402
+ const issue = job2.result?.issue;
403
+ return {
404
+ id: job2.id,
405
+ chat: job2.chat,
406
+ state: stateOf(job2),
407
+ pid: job2.pid,
408
+ started_at: job2.startedAt,
409
+ ...job2.finishedAt ? { finished_at: job2.finishedAt } : {},
410
+ fetched: Number(job2.result?.fetched ?? job2.progress?.fetched ?? 0),
411
+ ...job2.limit === void 0 ? {} : { message_limit: job2.limit },
412
+ ...job2.pageSize === void 0 ? {} : { page_size: job2.pageSize },
413
+ ...job2.last === void 0 ? {} : { last: job2.last },
414
+ ...job2.result ? { complete: job2.result.complete === true } : {},
415
+ ...issue ? { issue: { code: String(issue.code), message: String(issue.message) } } : {},
416
+ ...job2.error ? { error: { code: job2.error.code, message: job2.error.message } } : {}
417
+ };
418
+ }, "jobItem");
419
+ var stateOf = /* @__PURE__ */ __name((job2) => {
420
+ if (job2.finishedAt !== void 0) {
421
+ if (job2.cancelRequestedAt)
422
+ return "cancelled";
423
+ return job2.error ? "failed" : job2.result?.batch || job2.result?.issue ? "partial" : "done";
424
+ }
425
+ if (isJob(job2))
426
+ return "running";
427
+ return job2.cancelRequestedAt ? "cancelled" : "died";
428
+ }, "stateOf");
429
+ var isJob = /* @__PURE__ */ __name((job2) => carries(job2.pid, `_BACKFILL_JOB=${job2.id}`), "isJob");
430
+ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob = spawnDetached) => {
431
+ const dir = jobsDir(app, env);
432
+ const running = listJobs(dir).find((job3) => job3.profile === profile && job3.chat === input.chat && stateOf(job3) === "running");
433
+ if (running)
434
+ throw new CliError("validation_error", `job ${running.id} already works on this chat; inspect store jobs show first`);
435
+ const startedAt = (/* @__PURE__ */ new Date()).toISOString();
436
+ const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes(3).toString("hex")}`;
437
+ mkdirSync(dir, { recursive: true, mode: 448 });
438
+ const log = join(dir, `${id6}.log`);
439
+ const job2 = {
440
+ id: id6,
441
+ chat: input.chat,
442
+ profile,
443
+ pid: 0,
444
+ startedAt,
445
+ limit: input.limit,
446
+ pageSize: input.pageSize,
447
+ argv: input.argv,
448
+ log
449
+ };
450
+ saveJob(dir, job2);
451
+ const { [envName(app, "TIMEOUT")]: _timeout, ...inherited } = env;
452
+ const traced = tracedJob({ ...inherited, [envName(app, "PROFILE")]: profile, [envName(app, "BACKFILL_JOB")]: id6 });
453
+ const pid = spawnJob(input.argv, traced.env, log);
454
+ jobStarted(app, dir, { ...job2, pid, traceId: traced.traceId });
455
+ return { job: id6, pid, chat: input.chat, log };
456
+ }, "startArchiveJob");
457
+
458
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/job.js
459
+ var problem = strictObject({ code: text, message: text });
460
+ var job = strictObject({
461
+ id,
462
+ /** The chat as the sync was given it. */
463
+ chat: text,
464
+ state: picklist(JOB_STATES),
465
+ pid: count,
466
+ started_at: time,
467
+ finished_at: optional(time),
468
+ /** Messages fetched so far, or in all once it finished. */
469
+ fetched: count,
470
+ /** The `--limit` the sync was started with: how many messages it may fetch. */
471
+ message_limit: optional(count),
472
+ page_size: optional(count),
473
+ last: optional(count),
474
+ /** Whether the sync reached its window; set once it finished. */
475
+ complete: optional(boolean()),
476
+ /** Why a partial job stopped short; `store jobs retry` resumes it. */
477
+ issue: optional(problem),
478
+ error: optional(problem)
479
+ });
480
+
481
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/message.js
482
+ var quoted = strictObject({
483
+ id,
484
+ sender_id: nullable(id),
485
+ sender_name: nullable(text),
486
+ timestamp: nullable(time),
487
+ text,
488
+ attachments: array(attachment),
489
+ outgoing: nullable(boolean())
490
+ });
491
+ var mailPerson = strictObject({ name: nullable(text), address: text, ref: nullable(reference) });
492
+ var message = strictObject({
493
+ /** The message's locator. */
494
+ ref: reference,
495
+ id,
496
+ provider: optional(text),
497
+ account: optional(text),
498
+ chat_id: id,
499
+ chat_title: optional(nullable(text)),
500
+ sender_id: nullable(id),
501
+ sender_name: nullable(text),
502
+ sender_username: optional(text),
503
+ sender_is_chat: optional(boolean()),
504
+ mentions: optional(array(id)),
505
+ /** When it was sent. */
506
+ timestamp: time,
507
+ edited_at: nullable(time),
508
+ text,
509
+ /** What a voice message says, once heard. */
510
+ transcript: optional(text),
511
+ /** In a window of messages around one, the one asked for. */
512
+ anchor: optional(boolean()),
513
+ /** A stretch of the text, transcript, file name or file text around what a search matched. */
514
+ excerpt: optional(text),
515
+ /** `picture`: the picture search lane found it by what the picture shows; it follows the text hits. */
516
+ matched_in: optional(picklist(["text", "transcript", "filename", "file", "context", "picture"])),
517
+ score: optional(number()),
518
+ /**
519
+ * `corrected`: a query word matched only a spelling speech recognition garbled in a voice note's transcript,
520
+ * listed in `corrections`. `words` and `beginnings`: what a discovery search matched.
521
+ */
522
+ match: optional(picklist(["words", "beginnings", "corrected"])),
523
+ corrections: optional(array(strictObject({ from: text, to: array(text) }))),
524
+ /** Where a search found it: the local archive, the messenger's server, or both. */
525
+ found_in: optional(picklist(["archive", "server", "both"])),
526
+ /** A discovery search's partial match: how much of the question it covers, and which words it lacks. */
527
+ discovery: optional(strictObject({
528
+ coverage: number(),
529
+ matched_terms: array(text),
530
+ missing_terms: array(text),
531
+ parent: optional(reference),
532
+ /** Present when meaning was searched too: which of the two lists found it. */
533
+ found_by: optional(array(picklist(["words", "meaning"]))),
534
+ /** Present when the reranker read it: its own score, higher is better. It ordered the first hits with `score`. */
535
+ reranker_score: optional(number())
536
+ })),
537
+ /** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
538
+ context: optional(array(strictObject({ ref: reference, timestamp: time, sender_name: nullable(text), text }))),
539
+ outgoing: nullable(boolean()),
540
+ attachments: array(attachment),
541
+ reply_to: nullable(quoted),
542
+ /** The id a reply answers, also when the provider sent no copy of that message. */
543
+ reply_to_id: optional(id),
544
+ forwarded_from: nullable(quoted),
545
+ thread_id: optional(id),
546
+ thread_root_id: optional(id),
547
+ reactions: optional(nullable(strictObject({
548
+ counts: array(strictObject({ reaction: text, count })),
549
+ mine: nullable(text),
550
+ total: count
551
+ }))),
552
+ scheduled_for: optional(time),
553
+ /** The owner starred it; only where the messenger has stars, and only when set. */
554
+ starred: optional(literal(true)),
555
+ /** The owner's own message in a one-to-one chat: `delivered`, or `read` once opened; absent when no receipt came. */
556
+ delivery: optional(picklist(["delivered", "read"])),
557
+ email: optional(strictObject({
558
+ subject: nullable(text),
559
+ from: nullable(mailPerson),
560
+ to: array(mailPerson),
561
+ cc: array(mailPerson),
562
+ bcc: array(mailPerson),
563
+ /** The mail header Reply-To; `reply_to` is the quoted message a chat reply answers. */
564
+ reply_addresses: array(mailPerson),
565
+ labels: array(text),
566
+ /** The thread as a `chat:` reference. */
567
+ thread: reference,
568
+ read: nullable(boolean()),
569
+ flagged: nullable(boolean()),
570
+ /** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
571
+ sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) }))
572
+ })),
573
+ provider_metadata: providerMetadata
574
+ });
575
+
576
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
577
+ var extractionItem = strictObject({
578
+ ref: reference,
579
+ attachment: count,
580
+ kind: text,
581
+ name: nullable(text),
582
+ status: picklist(["extracted", "needs-agent", "unreadable", "engine-missing", "too-large", "missing"]),
583
+ extractor: optional(text),
584
+ chars: optional(count),
585
+ local_path: optional(text),
586
+ pages: optional(count),
587
+ ocr_pages: optional(count),
588
+ error: optional(text),
589
+ issue: optional(actionableError)
590
+ });
591
+ var extractionSummary = strictObject({
592
+ extracted: count,
593
+ failed: count,
594
+ needs_agent: count,
595
+ complete: boolean(),
596
+ batch: optional(batchResult)
597
+ });
598
+ var extractionReport = strictObject({
599
+ ...extractionSummary.entries,
600
+ items: array(extractionItem),
601
+ unchanged: count,
602
+ not_downloaded: count,
603
+ unsupported: count,
604
+ /** Reader package names, such as unpdf or @napi-rs/canvas. */
605
+ engines_missing: array(text),
606
+ cursor: optional(text)
607
+ });
608
+
609
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
610
+ var savedMessageFile = strictObject({
611
+ kind: text,
612
+ path: text,
613
+ bytes: count,
614
+ existing: optional(literal(true))
615
+ });
616
+ var files = array(savedMessageFile);
617
+ var messageDownload = union([
618
+ strictObject({
619
+ files,
620
+ extraction: optional(extractionReport),
621
+ complete: optional(literal(false)),
622
+ batch: optional(batchResult)
623
+ }),
624
+ strictObject({
625
+ files,
626
+ chat: nullable(id),
627
+ saved: count,
628
+ existing: count,
629
+ complete: boolean(),
630
+ batch: optional(batchResult),
631
+ stopped: optional(literal(true)),
632
+ extraction: optional(extractionSummary)
633
+ })
634
+ ]);
635
+ var historyRange = strictObject({ from: number(), to: number() });
636
+ var messageSyncEstimate = strictObject({
637
+ chat: id,
638
+ held: count,
639
+ ranges: array(historyRange),
640
+ missing: nullable(count),
641
+ requests: nullable(count),
642
+ runs: nullable(count),
643
+ seconds: nullable(count)
644
+ });
645
+ var tasks = optional(strictObject({
646
+ added: count,
647
+ closed: count,
648
+ review: count,
649
+ held: optional(count),
650
+ held_chats: optional(count)
651
+ }));
652
+ var messageSyncChat = strictObject({
653
+ issue: optional(actionableError),
654
+ resume: optional(strictObject({ before: optional(text) })),
655
+ prepared: optional(catchUpPreparation),
656
+ window_complete: optional(boolean()),
657
+ requests: optional(count),
658
+ chat: nullable(id),
659
+ fetched: count,
660
+ complete: boolean(),
661
+ ranges: array(historyRange),
662
+ reached_since: optional(literal(true)),
663
+ reached_last: optional(literal(true)),
664
+ stopped: optional(literal(true)),
665
+ tasks
666
+ });
667
+ var messageSyncAll = strictObject({
668
+ batch: optional(batchResult),
669
+ chats: count,
670
+ fetched: count,
671
+ complete: boolean(),
672
+ stopped: optional(literal(true)),
673
+ items: array(strictObject({
674
+ chat: id,
675
+ title: nullable(text),
676
+ fetched: count,
677
+ complete: boolean(),
678
+ current: optional(literal(true)),
679
+ stopped: optional(literal(true)),
680
+ error: optional(text),
681
+ issue: optional(actionableError)
682
+ })),
683
+ tasks
684
+ });
685
+ var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
686
+ var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
687
+
688
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/store-records.js
689
+ var range = strictObject({ from: number(), to: number() });
690
+ var storeChatStatus = strictObject({
691
+ chat_id: id,
692
+ title: nullable(text),
693
+ kind: chat.entries.kind,
694
+ messages: count,
695
+ oldest_at: nullable(time),
696
+ newest_at: nullable(time),
697
+ last_stored_at: nullable(time),
698
+ held: array(range)
699
+ });
700
+ var storeClear = strictObject({
701
+ cleared: boolean(),
702
+ dry_run: optional(literal(true)),
703
+ chats: count,
704
+ messages: count,
705
+ left: array(strictObject({ id, title: nullable(text), messages: count }))
706
+ });
707
+ var storeExport = union([
708
+ message,
709
+ strictObject({
710
+ path: text,
711
+ format: picklist(["jsonl", "markdown"]),
712
+ count,
713
+ encrypted: optional(literal(true))
714
+ }),
715
+ strictObject({
716
+ path: text,
717
+ encrypted: optional(literal(true)),
718
+ chats: array(strictObject({ id, title: nullable(text), file: nullable(text), messages: count, deleted: count }))
719
+ })
720
+ ]);
721
+ var storeGapPlan = strictObject({
722
+ version: literal(1),
723
+ scope: literal("interior"),
724
+ account: strictObject({ provider: text, account: id }),
725
+ chat: id,
726
+ ordering: picklist(["id", "time"]),
727
+ held: array(range),
728
+ gaps: array(range),
729
+ unknown: strictObject({ older: boolean(), newer: literal(true) }),
730
+ fingerprint: text,
731
+ limits: strictObject({ max_gaps: count, limit: count, time_ms: count, page_size: count })
732
+ });
733
+ var storeGapRepair = union([
734
+ messageSyncStarted,
735
+ strictObject({
736
+ version: literal(1),
737
+ scope: literal("interior"),
738
+ chat: id,
739
+ before: storeGapPlan,
740
+ after: storeGapPlan,
741
+ repaired: array(range),
742
+ fetched: count,
743
+ requests: count,
744
+ complete: boolean(),
745
+ prepared: optional(catchUpPreparation),
746
+ stopped: optional(picklist(["bound", "partial_or_inaccessible", "fetch_failed"]))
747
+ })
748
+ ]);
749
+ var problem2 = objectWithRest({ code: text, message: text, retryable: optional(boolean()), retry_after_ms: optional(number()) }, unknown());
750
+ var progress = strictObject({
751
+ job: id,
752
+ profile: text,
753
+ done: count,
754
+ total: nullable(count),
755
+ remaining: nullable(count),
756
+ state: picklist(["partial", "complete"]),
757
+ updated_at: nullable(time),
758
+ cursor_age_ms: nullable(count)
759
+ });
760
+ var storeJobDetails = strictObject({
761
+ ...omit(job, ["id", "issue", "error"]).entries,
762
+ job: id,
763
+ profile: text,
764
+ issue: optional(problem2),
765
+ error: optional(problem2),
766
+ batch: optional(batchResult),
767
+ resume: optional(strictObject({ before: optional(text) })),
768
+ progress,
769
+ held: optional(array(range)),
770
+ log: text
771
+ });
772
+ var storeJobCancel = strictObject({ job: id, cancelled: literal(true) });
773
+ var storeJobRetry = union([
774
+ strictObject({ ...messageSyncStarted.entries, retried: id }),
775
+ strictObject({ retried: id, chat: text, error: strictObject({ code: text, message: text }) })
776
+ ]);
777
+ var storeJobClear = strictObject({ cleared: array(id) });
778
+
779
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/account.js
780
+ var account = strictObject({
781
+ provider: text,
782
+ id,
783
+ name: nullable(text),
784
+ username: nullable(text),
785
+ phone: optional(nullable(text)),
786
+ scope: optional(picklist(["personal", "work"]))
787
+ });
788
+
789
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/account-session.js
790
+ var accountSession = strictObject({
791
+ current: boolean(),
792
+ client: nullable(text),
793
+ device: nullable(text),
794
+ location: nullable(text),
795
+ last_active_at: nullable(time),
796
+ created_at: optional(nullable(time))
797
+ });
798
+
799
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/account-change.js
800
+ var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
801
+ var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
802
+ var audience = picklist(["everyone", "contacts", "nobody"]);
803
+ var shownAudience = picklist(["everyone", "contacts", "nobody", "contacts_except"]);
804
+ var accountPrivacy = strictObject({
805
+ find_by_phone: optional(audience),
806
+ phone_number: optional(audience),
807
+ calls: optional(audience),
808
+ chat_invites: optional(audience),
809
+ hide_online: optional(boolean()),
810
+ read_receipts: optional(boolean()),
811
+ profile_photo: optional(shownAudience),
812
+ about: optional(shownAudience),
813
+ last_seen: optional(shownAudience)
814
+ });
815
+ var accountPrivacyChange = strictObject({ operation_id: id, privacy: accountPrivacy });
816
+
817
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
818
+ var accountProfile = strictObject({
819
+ profile: id,
820
+ current: boolean(),
821
+ account: nullable(id),
822
+ name: nullable(text),
823
+ /** False for a profile with no session on this computer; absent when the messenger does not say. */
824
+ signed_in: optional(boolean())
825
+ });
826
+
827
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
828
+ var milliseconds = pipe(number(), minValue(0));
829
+ var counterReading = strictObject({
830
+ counter: picklist(["views", "reactions", "comments"]),
831
+ value: nullable(number()),
832
+ observed_at: nullable(time),
833
+ source: nullable(text),
834
+ age_ms: nullable(milliseconds),
835
+ freshness: picklist(["fresh", "stale", "unknown"])
836
+ });
837
+ var selection = record(string(), unknown());
838
+
839
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
840
+ var adminRow = strictObject({
841
+ ref: reference,
842
+ /** What `stats * evidence` takes: a person id, a stay or a message locator. */
843
+ id,
844
+ status: picklist(["observed", "no-observed-answer", "partial", "unknown"]),
845
+ chat_ref: optional(reference),
846
+ person_ref: optional(reference),
847
+ identity_known: optional(boolean()),
848
+ questions: optional(count),
849
+ answered: optional(count),
850
+ median_ms: optional(nullable(milliseconds)),
851
+ p90_ms: optional(nullable(milliseconds)),
852
+ age_ms: optional(milliseconds),
853
+ joined_at: optional(time),
854
+ window_end: optional(time),
855
+ pending: optional(boolean()),
856
+ views: optional(count),
857
+ observed_replies: optional(count),
858
+ comment_snapshot: optional(nullable(count)),
859
+ counters: optional(array(counterReading)),
860
+ selection
861
+ });
862
+ var adminReport = strictObject({
863
+ report: picklist(["unanswered", "responses", "newcomers", "discussion"]),
864
+ cutoff: time,
865
+ /** Rows the report found; `rows` holds the first `--limit` of them. */
866
+ total: count,
867
+ summary: strictObject({
868
+ questions: count,
869
+ answered: count,
870
+ no_observed_answer: count,
871
+ excluded_future: count,
872
+ unknown_join: count,
873
+ missing_views: count
874
+ }),
875
+ quality: strictObject({
876
+ graph: strictObject({
877
+ unknown_links: count,
878
+ unknown_authors: count,
879
+ missing_parents: count,
880
+ cycles: count,
881
+ complete: boolean()
882
+ }),
883
+ archives: array(strictObject({ chat_ref: reference, state: text, fetched_at: nullable(time) })),
884
+ archives_total: count,
885
+ membership: text,
886
+ counter_freshness: text,
887
+ answerer_roles: text
888
+ }),
889
+ rows: array(adminRow)
890
+ });
891
+
892
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
893
+ var analysisConsent = strictObject({ chat: id, provider: text, at: time });
894
+ var analysisConsentRevocation = strictObject({ revoked: boolean() });
895
+
896
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
897
+ var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
898
+ var attachmentBytes = strictObject({
899
+ ref: reference,
900
+ attachment: count,
901
+ name: nullable(text),
902
+ mime_type: text,
903
+ total_bytes: count,
904
+ sha256: fingerprint,
905
+ offset_bytes: count,
906
+ read_bytes: count,
907
+ next_offset_bytes: nullable(count),
908
+ complete: boolean(),
909
+ base64: optional(text),
910
+ pdf: optional(strictObject({ page: count, page_count: count, source_sha256: fingerprint, source_bytes: count }))
911
+ });
912
+ var attachmentExtraction = union([
913
+ strictObject({ ...omit(extractionReport, ["items"]).entries, files: array(extractionItem) }),
914
+ extractionItem
915
+ ]);
916
+ var attachmentTextChange = strictObject({
917
+ ref: reference,
918
+ attachment: count,
919
+ origin: literal("agent"),
920
+ chars: count,
921
+ replaced: nullable(picklist(["extracted", "agent"]))
922
+ });
923
+
924
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/chart.js
925
+ var chart = strictObject({
926
+ version: literal(1),
927
+ kind: picklist(["bar", "line", "grouped-bar"]),
928
+ title: text,
929
+ x: strictObject({ type: picklist(["day", "week"]), values: array(text) }),
930
+ series: array(strictObject({ name: text, values: array(nullable(number())) })),
931
+ unit: picklist(["messages", "people"]),
932
+ timezone: text,
933
+ /** Lower bounds: the store or the events did not hold the whole period. */
934
+ partial: boolean(),
935
+ reasons: array(picklist(["store-incomplete", "events-incomplete"])),
936
+ file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
937
+ });
938
+
939
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/folder.js
940
+ var named = strictObject({
941
+ id,
942
+ title: nullable(text),
943
+ kind: nullable(picklist(["dialog", "group", "channel", "saved", "unknown"]))
944
+ });
945
+ var folder = strictObject({
946
+ id,
947
+ title: text,
948
+ /** Chats added by hand; a folder that selects chats by a rule of its own lists none. */
949
+ chat_ids: array(id),
950
+ emoji: optional(text),
951
+ /** Kinds of chat it takes by itself. */
952
+ include: optional(array(picklist(["contacts", "non-contacts", "groups", "channels", "bots"]))),
953
+ skip: optional(array(picklist(["muted", "read", "archived"]))),
954
+ excluded_chat_ids: optional(array(id)),
955
+ pinned_chat_ids: optional(array(id)),
956
+ /** `chats folders show`: the chats in it, pinned and left out, by name. */
957
+ chats: optional(array(named)),
958
+ pinned_chats: optional(array(named)),
959
+ excluded_chats: optional(array(named))
960
+ });
961
+
962
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
963
+ var inviteLink = strictObject({
964
+ link: text,
965
+ /** Who joins by it asks first, and an admin lets them in. */
966
+ approval: boolean(),
967
+ /** `null` when it never expires. */
968
+ expires_at: nullable(time),
969
+ /** `null` for no limit. */
970
+ max_uses: nullable(count),
971
+ /** The group's own link; revoking it makes the messenger issue a new one. */
972
+ primary: optional(boolean()),
973
+ revoked: optional(boolean()),
974
+ pending_count: optional(count),
975
+ joined_count: optional(count)
976
+ });
977
+
978
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
979
+ var operated = { operation_id: id, chat_id: id };
980
+ var group = strictObject({
981
+ ...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
982
+ parent_chat_id: optional(nullable(id)),
983
+ muted_until: optional(nullable(time)),
984
+ description: nullable(text),
985
+ link: nullable(text),
986
+ settings: strictObject({
987
+ ...unwrap(chat.entries.settings).entries,
988
+ all_can_pin: nullable(boolean()),
989
+ only_admins_add: nullable(boolean()),
990
+ only_admins_call: nullable(boolean()),
991
+ only_owner_edits_info: nullable(boolean()),
992
+ members_see_link: nullable(boolean())
993
+ })
994
+ });
995
+ var chatGroupChange = union([
996
+ strictObject({ operation_id: id, chat: group }),
997
+ strictObject({ operation_id: id, requested: literal(true) })
998
+ ]);
999
+ var chatInspection = strictObject({
1000
+ kind: chat.entries.kind,
1001
+ title: nullable(text),
1002
+ id: nullable(id),
1003
+ username: nullable(text),
1004
+ participants_count: nullable(count),
1005
+ description: nullable(text),
1006
+ member: nullable(boolean()),
1007
+ approval_needed: optional(boolean())
1008
+ });
1009
+ var chatSender = strictObject({
1010
+ id,
1011
+ title: text,
1012
+ kind: picklist(["self", "channel", "group"]),
1013
+ premium_required: boolean(),
1014
+ default: boolean()
1015
+ });
1016
+ var chatRead = strictObject({ ...operated, until: nullable(id), thread_id: optional(id) });
1017
+ var chatMembersFetch = strictObject({
1018
+ chat_id: id,
1019
+ joined: array(id),
1020
+ gone: array(id),
1021
+ changed: array(id),
1022
+ read: count,
1023
+ participants: nullable(count),
1024
+ complete: boolean(),
1025
+ more: boolean(),
1026
+ tracked: boolean()
1027
+ });
1028
+ var chatMembersChange = union([
1029
+ strictObject({ ...operated, added: array(id), not_added: array(id) }),
1030
+ strictObject({ ...operated, removed: array(id) })
1031
+ ]);
1032
+ var chatInvite = strictObject({ chat_id: id, title: nullable(text), link: text });
1033
+ var chatInviteChange = strictObject({
1034
+ ...operated,
1035
+ ...omit(inviteLink, ["pending_count", "joined_count"]).entries,
1036
+ pending: optional(count),
1037
+ joined: optional(count)
1038
+ });
1039
+ var chatRequestChange = union([
1040
+ strictObject({ ...operated, person_id: id, accepted: boolean(), already: boolean() }),
1041
+ strictObject({ chat_id: id, accepted: boolean(), counted: count, operation_id: optional(id) })
1042
+ ]);
1043
+ var chatAdminChange = strictObject({
1044
+ ...operated,
1045
+ person_id: id,
1046
+ rights: optional(array(picklist(["read", "members", "admins", "info", "pin", "link", "post", "edit", "delete"])))
1047
+ });
1048
+ var chatFolderChange = strictObject({
1049
+ operation_id: id,
1050
+ folder: omit(folder, ["chats", "pinned_chats", "excluded_chats"])
1051
+ });
1052
+ var chatFolderRemoval = strictObject({ operation_id: id, folder_id: id });
1053
+ var chatFolderOrder = strictObject({
1054
+ operation_id: id,
1055
+ folders: array(strictObject({ id, title: text }))
1056
+ });
1057
+
1058
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
1059
+ var operated2 = { operation_id: id, chat_id: id };
1060
+ var chatRemoval = strictObject(operated2);
1061
+ var chatMuting = strictObject({
1062
+ ...operated2,
1063
+ muted_until: nullable(union([time, literal("forever")]))
1064
+ });
1065
+ var chatArchive = strictObject({ ...operated2, archived: boolean() });
1066
+ var chatPin = strictObject({ ...operated2, pinned: boolean() });
1067
+ var chatUnread = strictObject({ ...operated2, unread: literal(true) });
1068
+
1069
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
1070
+ var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
1071
+ var chatEvent = strictObject({
1072
+ chat_id: id,
1073
+ time,
1074
+ /** `join`, `leave`, `add`, `remove`, `create`, `title`, `pin`, `profile`; a messenger may pass others through. */
1075
+ type: text,
1076
+ /** The service message that says so, where there is one. */
1077
+ message_id: optional(id),
1078
+ by: optional(who),
1079
+ people: array(who),
1080
+ /** `create` and `title` carry the chat's title. */
1081
+ title: optional(text),
1082
+ /** `profile`: the name and username seen before. */
1083
+ before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
1084
+ });
1085
+
1086
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
1087
+ var chatMetadata = strictObject({
1088
+ chat_id: id,
1089
+ title: nullable(text),
1090
+ username: nullable(text),
1091
+ description: nullable(text),
1092
+ fetched_at: time
1093
+ });
1094
+ var cachedChatMetadata = strictObject({ chat_id: id, metadata: nullable(chatMetadata) });
1095
+ var failedChatMetadata = strictObject({ chat_id: id, error: strictObject({ code: text, message: text }) });
1096
+ var chatMetadataRefresh = strictObject({
1097
+ chats: array(union([chatMetadata, failedChatMetadata])),
1098
+ has_more: boolean()
1099
+ });
1100
+
1101
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
1102
+ var action = picklist(["report", "delete", "remove"]);
1103
+ var level = picklist(["deny", "readonly", "ask", "allow"]);
1104
+ var chatRules = strictObject({
1105
+ chat_id: id,
1106
+ title: nullable(text),
1107
+ file: text,
1108
+ saved: boolean(),
1109
+ rules: strictObject({
1110
+ title: nullable(text),
1111
+ trusted: array(id),
1112
+ blocked: array(id),
1113
+ blocked_names: array(text),
1114
+ links: action,
1115
+ invites: action,
1116
+ forwards: action,
1117
+ blocked_people: action,
1118
+ flood: strictObject({ messages: count, minutes: count, action }),
1119
+ new_account: strictObject({ days: count, action: picklist(["report", "remove"]) }),
1120
+ consent: strictObject({ delete: level, remove: level })
1121
+ })
1122
+ });
1123
+ var chatModeration = strictObject({
1124
+ chat_id: id,
1125
+ rows: array(strictObject({
1126
+ kind: picklist(["message", "member"]),
1127
+ rule: picklist(["blocked", "invites", "links", "forwards", "flood", "newAccount"]),
1128
+ person_id: id,
1129
+ person_name: nullable(text),
1130
+ message_id: optional(id),
1131
+ action,
1132
+ outcome: picklist(["reported", "done", "planned", "forbidden", "declined", "refused", "failed", "skipped"]),
1133
+ reason: optional(text),
1134
+ command: optional(text)
1135
+ }))
1136
+ });
1137
+
1138
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
1139
+ var optionalCount = optional(count);
1140
+ var minutes = nullable(number());
1141
+ var chatStats = strictObject({
1142
+ chat: reference,
1143
+ since: time,
1144
+ until: time,
1145
+ /** The store holds the chat whole and the messenger read every join and leave; otherwise lower bounds. */
1146
+ complete: boolean(),
1147
+ completeness: strictObject({
1148
+ state: picklist(["complete", "partial", "unknown"]),
1149
+ up_to_date: nullable(boolean()),
1150
+ gaps: boolean(),
1151
+ reaches_start: boolean(),
1152
+ fetched_at: nullable(time)
1153
+ }),
1154
+ messages: count,
1155
+ senders: count,
1156
+ replies: count,
1157
+ threads: count,
1158
+ reactions: count,
1159
+ views: optionalCount,
1160
+ forwards: optionalCount,
1161
+ comments: optionalCount,
1162
+ top_posts: array(strictObject({
1163
+ ref: reference,
1164
+ timestamp: time,
1165
+ reactions: count,
1166
+ views: optionalCount,
1167
+ forwards: optionalCount,
1168
+ comments: optionalCount
1169
+ })),
1170
+ questions: strictObject({
1171
+ asked: count,
1172
+ answered: count,
1173
+ median_minutes_to_answer: minutes,
1174
+ answered_by: picklist(["owner", "owner-and-admins"])
1175
+ }),
1176
+ member_counts: optional(array(strictObject({ day: text, participants: nullable(count), listed: count, complete: boolean() }))),
1177
+ /** Absent where joins and leaves were not asked, or not recorded for the chat yet (then `missing` says so). */
1178
+ members: optional(strictObject({
1179
+ joined: count,
1180
+ left: count,
1181
+ net: number(),
1182
+ wrote: count,
1183
+ median_minutes_to_first_message: minutes,
1184
+ /** The messenger stopped reading its history before `since`: the counts are lower bounds. */
1185
+ more: boolean()
1186
+ })),
1187
+ series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
1188
+ });
1189
+ var taskStats = strictObject({
1190
+ /** Open tasks across every row. */
1191
+ open: count,
1192
+ rows: array(strictObject({
1193
+ chat: reference,
1194
+ open: count,
1195
+ oldest_open_at: nullable(time),
1196
+ median_close_ms: nullable(pipe(number(), minValue(0)))
1197
+ }))
1198
+ });
1199
+
1200
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
1201
+ var memberCount = strictObject({
1202
+ day: pipe(text, isoDate()),
1203
+ participants: nullable(count),
1204
+ listed: count,
1205
+ complete: boolean()
1206
+ });
1207
+ var trackedChat = strictObject({
1208
+ chat_id: id,
1209
+ title: nullable(text),
1210
+ tracked_at: time,
1211
+ last_count: nullable(memberCount)
1212
+ });
1213
+ var trackedChatHistory = strictObject({
1214
+ chat_id: id,
1215
+ tracked_at: nullable(time),
1216
+ counts: array(memberCount)
1217
+ });
1218
+ var chatTracking = strictObject({
1219
+ chat_id: id,
1220
+ tracked: boolean()
1221
+ });
1222
+
1223
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/contact.js
1224
+ var contact = strictObject({
1225
+ ref: reference,
1226
+ id,
1227
+ name: nullable(text),
1228
+ username: nullable(text),
1229
+ alias: optional(nullable(text)),
1230
+ display_name: optional(nullable(text)),
1231
+ /** Whatever they wrote about themselves. */
1232
+ description: nullable(text),
1233
+ /** The newest message in a one-to-one chat with them. */
1234
+ last_messaged_at: nullable(time),
1235
+ /** For a source that knows it, such as a Zoom contact. */
1236
+ email: optional(nullable(text)),
1237
+ phones: optional(array(strictObject({ number: text, label: nullable(text) }))),
1238
+ /** `contacts show`: the chats shared with them. */
1239
+ chats: optional(array(pick(chat, ["ref", "id", "title", "kind", "last_message_at"]))),
1240
+ /** `contacts show --with-notes`: the owner's private notes about them. */
1241
+ notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
1242
+ });
1243
+
1244
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
1245
+ var linkedIdentity = strictObject({
1246
+ provider: text,
1247
+ id,
1248
+ name: nullable(text),
1249
+ username: nullable(text),
1250
+ is_bot: nullable(boolean()),
1251
+ accounts: array(id),
1252
+ method: text,
1253
+ linked_by: text,
1254
+ linked_at: time
1255
+ });
1256
+ var linkedPerson = strictObject({ uid: id, name: nullable(text), identities: array(linkedIdentity) });
1257
+ var contactActivity = strictObject({
1258
+ at: time,
1259
+ subject: text,
1260
+ subject_id: count,
1261
+ role: text,
1262
+ scope: text,
1263
+ provider: nullable(text),
1264
+ account: nullable(text),
1265
+ chat_id: nullable(text),
1266
+ locator: nullable(text),
1267
+ project_id: nullable(count)
1268
+ });
1269
+ var botReason = picklist(Object.keys(WEIGHTS));
1270
+ var contactCheck = strictObject({
1271
+ person: strictObject({ id, name: nullable(text), username: nullable(text), provider: text }),
1272
+ score: count,
1273
+ reasons: array(strictObject({ reason: botReason, weight: count, source: text, detail: optional(text) })),
1274
+ registries: array(strictObject({
1275
+ name: picklist(["cas", "lols"]),
1276
+ answer: picklist(["listed", "clean", "unknown"]),
1277
+ checked_at: time,
1278
+ detail: optional(text),
1279
+ reasons: optional(array(picklist(["cas_banned", "lols_banned", "lols_scammer"])))
1280
+ })),
1281
+ unknown: array(botReason),
1282
+ checked_at: time
1283
+ });
1284
+
1285
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
1286
+ var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
1287
+ var contextMessage = strictObject({
1288
+ locator: reference,
1289
+ provider: text,
1290
+ account: id,
1291
+ chat_id: id,
1292
+ chat_title: nullable(text),
1293
+ id,
1294
+ timestamp: time,
1295
+ sender_id: nullable(id),
1296
+ sender_name: nullable(text),
1297
+ outgoing: nullable(boolean()),
1298
+ text
1299
+ });
1300
+ var sharedChat = strictObject({
1301
+ provider: text,
1302
+ account: id,
1303
+ chat_id: id,
1304
+ title: nullable(text),
1305
+ kind: chat.entries.kind,
1306
+ last_message_at: nullable(time)
1307
+ });
1308
+ var contextEvent = strictObject({
1309
+ ref: reference,
1310
+ title: nullable(text),
1311
+ starts_at: nullable(time),
1312
+ ends_at: nullable(time),
1313
+ all_day: boolean(),
1314
+ location: nullable(text),
1315
+ status: nullable(text)
1316
+ });
1317
+ var context = strictObject({
1318
+ person: contextPerson,
1319
+ shared: array(sharedChat),
1320
+ last: strictObject({
1321
+ from_them: nullable(contextMessage),
1322
+ from_me: nullable(contextMessage),
1323
+ from_them_anywhere: nullable(contextMessage)
1324
+ }),
1325
+ recent: strictObject({ direct: array(contextMessage), groups: array(contextMessage) }),
1326
+ mentions: array(contextMessage),
1327
+ /** Calendar events they are invited to, one occurrence per series. */
1328
+ events: optional(strictObject({ upcoming: array(contextEvent), recent: array(contextEvent) })),
1329
+ limits: strictObject({ messages: count, bytes: count }),
1330
+ complete: boolean(),
1331
+ not_read: array(strictObject({
1332
+ provider: text,
1333
+ account: id,
1334
+ chat_id: id,
1335
+ title: nullable(text),
1336
+ reason: picklist(["not_fetched", "partial"])
1337
+ }))
1338
+ });
1339
+ var shortMessage = strictObject({ at: time, text, transcript: optional(text) });
1340
+ var identifiedMessage = strictObject({
1341
+ ...shortMessage.entries,
1342
+ id,
1343
+ locator: reference,
1344
+ sender_id: nullable(id),
1345
+ reply_to: nullable(id)
1346
+ });
1347
+ var counterObservation = strictObject({
1348
+ value: number(),
1349
+ observed_at: time,
1350
+ source: picklist(["remote_fetch", "remote_update"]),
1351
+ reactions: optional(message.entries.reactions.wrapped.wrapped)
1352
+ });
1353
+ var { reply_addresses: mailReplyTo, ...mailFields } = message.entries.email.wrapped.entries;
1354
+ var fullMessage = strictObject({
1355
+ ...pick(message, [
1356
+ "id",
1357
+ "chat_id",
1358
+ "chat_title",
1359
+ "excerpt",
1360
+ "sender_id",
1361
+ "sender_name",
1362
+ "sender_username",
1363
+ "mentions",
1364
+ "sender_is_chat",
1365
+ "timestamp",
1366
+ "edited_at",
1367
+ "text",
1368
+ "outgoing",
1369
+ "attachments",
1370
+ "reply_to",
1371
+ "reply_to_id",
1372
+ "forwarded_from",
1373
+ "thread_id",
1374
+ "thread_root_id",
1375
+ "scheduled_for",
1376
+ "provider_metadata",
1377
+ "delivery"
1378
+ ]).entries,
1379
+ reactions: nullable(message.entries.reactions.wrapped.wrapped),
1380
+ starred: optional(boolean()),
1381
+ email: optional(strictObject({ ...mailFields, reply_to: mailReplyTo })),
1382
+ counter_observations: optional(partial(strictObject({
1383
+ views: counterObservation,
1384
+ reactions: counterObservation,
1385
+ comments: counterObservation
1386
+ }))),
1387
+ ...shortMessage.entries,
1388
+ locator: reference
1389
+ });
1390
+ var contactMessages = strictObject({
1391
+ person: strictObject({ uid: id, provider: text, id, name: nullable(text) }),
1392
+ chats: array(strictObject({
1393
+ chat: pick(chat, ["id", "title", "kind"]),
1394
+ messages: array(union([shortMessage, identifiedMessage, fullMessage])),
1395
+ complete: boolean(),
1396
+ more: boolean()
1397
+ })),
1398
+ limits: strictObject({ messages: count })
1399
+ });
1400
+ var contactContext = union([context, contactMessages]);
1401
+ var coverage = strictObject({
1402
+ included: count,
1403
+ has_more: boolean(),
1404
+ cut_by: nullable(picklist(["limit", "bytes"]))
1405
+ });
1406
+ var meetingCue = strictObject({
1407
+ reference,
1408
+ fingerprint: text,
1409
+ transcript_id: count,
1410
+ content_hash: nullable(text),
1411
+ position: count,
1412
+ start_ms: count,
1413
+ end_ms: count,
1414
+ speaker_participant_id: nullable(count),
1415
+ speaker_name: nullable(text),
1416
+ text,
1417
+ revision: picklist(["current", "superseded"])
1418
+ });
1419
+ var contactPreparation = strictObject({
1420
+ ...context.entries,
1421
+ prepare: strictObject({
1422
+ waiting: array(strictObject({
1423
+ provider: text,
1424
+ account: id,
1425
+ chat_id: id,
1426
+ title: nullable(text),
1427
+ message: contextMessage,
1428
+ partial: boolean()
1429
+ })),
1430
+ tasks: array(strictObject({
1431
+ ref: reference,
1432
+ title: text,
1433
+ role: text,
1434
+ due_at: nullable(time),
1435
+ project: reference,
1436
+ source: nullable(reference),
1437
+ created_at: time
1438
+ })),
1439
+ facts: array(strictObject({
1440
+ ref: reference,
1441
+ type: text,
1442
+ statement: text,
1443
+ subject: nullable(reference),
1444
+ project: nullable(reference),
1445
+ updated_at: time
1446
+ })),
1447
+ notes: array(strictObject({ ref: reference, title: nullable(text), text, revision: count, updated_at: time })),
1448
+ meetings: array(strictObject({
1449
+ reference,
1450
+ cues: array(meetingCue),
1451
+ cue_coverage: strictObject({ included: count, omitted: nullable(count), has_more: boolean() })
1452
+ })),
1453
+ limits: strictObject({ items: count, bytes: count }),
1454
+ coverage: strictObject({
1455
+ waiting: strictObject({
1456
+ ...coverage.entries,
1457
+ rule: literal("their message is the newest the store holds in a one-to-one chat")
1458
+ }),
1459
+ tasks: strictObject({
1460
+ ...coverage.entries,
1461
+ selection: literal("open, assigned to them in any role"),
1462
+ accounts: array(text)
1463
+ }),
1464
+ facts: strictObject({
1465
+ ...coverage.entries,
1466
+ selection: literal("accepted, about them or a project they are a member of")
1467
+ }),
1468
+ notes: strictObject({
1469
+ ...coverage.entries,
1470
+ selection: literal("written by you, about them"),
1471
+ withheld: optional(literal("contacts.notes.list"))
1472
+ }),
1473
+ meetings: strictObject({
1474
+ ...coverage.entries,
1475
+ read: literal("every account of the store that saw them"),
1476
+ accounts: array(text),
1477
+ pending: count
1478
+ })
1479
+ })
1480
+ })
1481
+ });
1482
+
1483
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
1484
+ var contactNote = strictObject({
1485
+ id,
1486
+ /** The contact, as a `contact:` reference. */
1487
+ contact: reference,
1488
+ text,
1489
+ /** Starts at 1; an edit names the revision it read. */
1490
+ revision: count,
1491
+ created_at: time,
1492
+ updated_at: time
1493
+ });
1494
+
1495
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
1496
+ var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
1497
+ var contactSync = strictObject({ added: count, changed: count, known: count });
1498
+ var contactProfile = strictObject({
1499
+ id,
1500
+ name: nullable(text),
1501
+ usernames: array(text),
1502
+ bio: nullable(text),
1503
+ birthday: optional(nullable(text)),
1504
+ phone: optional(nullable(text)),
1505
+ flags: partial(strictObject({
1506
+ bot: boolean(),
1507
+ verified: boolean(),
1508
+ premium: boolean(),
1509
+ scam: boolean(),
1510
+ fake: boolean(),
1511
+ restricted: boolean(),
1512
+ deleted: boolean(),
1513
+ support: boolean()
1514
+ })),
1515
+ seen: optional(text),
1516
+ contact: optional(boolean()),
1517
+ mutual_contact: optional(boolean()),
1518
+ common_chats_count: optional(nullable(count)),
1519
+ registered: optional(nullable(strictObject({
1520
+ at: text,
1521
+ source: picklist(["telegram", "max", "estimate"]),
1522
+ precision: picklist(["day", "month"])
1523
+ }))),
1524
+ has_photo: optional(boolean()),
1525
+ chats: array(strictObject({
1526
+ id,
1527
+ title: nullable(text),
1528
+ kind: chat.entries.kind,
1529
+ their_messages: count,
1530
+ first_at: nullable(time),
1531
+ last_at: nullable(time),
1532
+ complete: boolean()
1533
+ })),
1534
+ aliases: array(strictObject({
1535
+ name: optional(text),
1536
+ username: optional(text),
1537
+ link: optional(text),
1538
+ first_seen_at: time,
1539
+ last_seen_at: time,
1540
+ source: picklist(["profile", "messages"])
1541
+ }))
1542
+ });
1543
+
1544
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
1545
+ var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
1546
+ var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
1547
+ var contactStateChange = strictObject({ operation_id: id, person_id: id });
1548
+ var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
1549
+
1550
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
1551
+ var conversationDetails = union([
1552
+ strictObject({ ...conversation.entries, messages: array(message) }),
1553
+ message
1554
+ ]);
1555
+ var conversationBatchStatus = strictObject({
1556
+ chat: id,
1557
+ messages: count,
1558
+ characters: count,
1559
+ batches: count,
1560
+ tokens_estimate: count
1561
+ });
1562
+ var batchMessage = strictObject({
1563
+ id,
1564
+ at: time,
1565
+ sender: strictObject({ id: nullable(id), name: nullable(text) }),
1566
+ text,
1567
+ reply_to: optional(id),
1568
+ thread: optional(id),
1569
+ mentions: optional(array(id)),
1570
+ answer: boolean(),
1571
+ candidates: optional(array(strictObject({ parent: nullable(id), source: text, kind: text, confidence: number() })))
1572
+ });
1573
+ var conversationBatch = union([
1574
+ strictObject({ batch: null_() }),
1575
+ strictObject({
1576
+ batch: id,
1577
+ chat: id,
1578
+ messages: array(batchMessage),
1579
+ remaining: strictObject({ messages: count, characters: count })
1580
+ })
1581
+ ]);
1582
+ var analyzedConversation = strictObject({
1583
+ chat: id,
1584
+ model: text,
1585
+ batches: count,
1586
+ stored: count,
1587
+ tokens: count,
1588
+ reserved_tokens: count,
1589
+ max_tokens: count,
1590
+ stopped: picklist(["complete", "budget"]),
1591
+ remaining: conversationBatchStatus,
1592
+ built: optional(conversationBuild)
1593
+ });
1594
+ var conversationBuildResult = union([conversationBuild, conversationPreparation, analyzedConversation]);
1595
+ var conversationEmbedding = union([chatEmbedding, conversationPreparation]);
1596
+ var conversationChange = union([
1597
+ strictObject({ chat: id, stored: count }),
1598
+ strictObject({ chat: id, cleared: count })
1599
+ ]);
1600
+ var conversationReadiness = strictObject({
1601
+ chat: id,
1602
+ model: text,
1603
+ state: picklist(["ready", "stale", "partial", "words-only", "not-built"]),
1604
+ graph: nullable(strictObject({ built_at: time, rules_version: nullable(count), outdated_rules: boolean() })),
1605
+ pending: strictObject({ new: count, edited: count, deleted: count }),
1606
+ vectors: strictObject({ chunks: count, current: count, stale: count, missing: count })
1607
+ });
1608
+ var conversationEmbeddingStatus = strictObject({
1609
+ chat: id,
1610
+ model: text,
1611
+ chunks: count,
1612
+ embedded: count,
1613
+ left: count,
1614
+ estimate_seconds: nullable(number()),
1615
+ tokens_at_most: count,
1616
+ price_at_most: optional(strictObject({ usd: number(), read: text }))
1617
+ });
1618
+ var summary = strictObject({
1619
+ id,
1620
+ chat_id: id,
1621
+ first_message_id: id,
1622
+ first_at: time,
1623
+ last_at: time,
1624
+ message_count: count,
1625
+ senders: count,
1626
+ built_at: time,
1627
+ algorithm_version: count
1628
+ });
1629
+ var conversationHit = strictObject({
1630
+ source: optional(strictObject({ provider: text, account: id })),
1631
+ locator: optional(reference),
1632
+ summary,
1633
+ chunk: strictObject({ first_message_id: id, last_message_id: id }),
1634
+ score: nullable(number()),
1635
+ matched_in: optional(literal("context")),
1636
+ by: array(picklist(["meaning", "words"])),
1637
+ stale: boolean()
1638
+ });
1639
+
1640
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/counters.js
1641
+ var counters = strictObject({
1642
+ cutoff: time,
1643
+ max_age_ms: milliseconds,
1644
+ /** Pins exactly these messages for `counters refresh --selection`. */
1645
+ selection: strictObject({
1646
+ kind: literal("counter-targets"),
1647
+ version: literal(1),
1648
+ locators: array(reference)
1649
+ }),
1650
+ rows: array(strictObject({ ref: reference, counters: array(counterReading) }))
1651
+ });
1652
+ var counterRefresh = strictObject({
1653
+ dry_run: boolean(),
1654
+ targets: array(reference),
1655
+ counters: array(text),
1656
+ supported: array(text),
1657
+ unsupported: array(text),
1658
+ max_messages: count,
1659
+ time_ms: milliseconds,
1660
+ results: optional(array(strictObject({
1661
+ ref: reference,
1662
+ updated: array(text),
1663
+ missing: array(text),
1664
+ status: text
1665
+ }))),
1666
+ stopped: optional(text),
1667
+ complete: optional(boolean())
1668
+ });
1669
+
1670
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/document.js
1671
+ var document = strictObject({
1672
+ ref: reference,
1673
+ id,
1674
+ title: nullable(text),
1675
+ url: nullable(text),
1676
+ mime: optional(text),
1677
+ size: optional(count),
1678
+ /** When its source last changed it. */
1679
+ source_modified_at: nullable(time),
1680
+ /** When the store last read it; not the source's time. */
1681
+ stored_at: optional(nullable(time)),
1682
+ owners: optional(array(text))
1683
+ });
1684
+
1685
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/document-link.js
1686
+ var documentLink = strictObject({
1687
+ ref: reference,
1688
+ url: text,
1689
+ document_id: nullable(id),
1690
+ title: nullable(text),
1691
+ in_store: boolean(),
1692
+ sent_at: time,
1693
+ sender: strictObject({ id: nullable(id), name: nullable(text) })
1694
+ });
1695
+
1696
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/evidence.js
1697
+ var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
1698
+ var contribution = strictObject({
1699
+ message: evidenceMessage,
1700
+ related: optional(evidenceMessage),
1701
+ contribution: nullable(number()),
1702
+ counters: optional(array(counterReading))
1703
+ });
1704
+ var retentionStay = strictObject({
1705
+ person_ref: reference,
1706
+ joined_at: time,
1707
+ cohort: text,
1708
+ checkpoints: array(strictObject({
1709
+ checkpoint_ms: milliseconds,
1710
+ target_at: time,
1711
+ state: text,
1712
+ observed_at: nullable(time),
1713
+ lag_ms: nullable(milliseconds),
1714
+ complete: boolean()
1715
+ })),
1716
+ activity: strictObject({
1717
+ state: text,
1718
+ first_message_at: nullable(time),
1719
+ window_end: nullable(time),
1720
+ archive_covered: boolean()
1721
+ }),
1722
+ departure: strictObject({ after: nullable(time), at_or_before: nullable(time), early: text })
1723
+ });
1724
+ var evidence = union([contribution, retentionStay]);
1725
+
1726
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/fact.js
1727
+ var fact = strictObject({
1728
+ ref: reference,
1729
+ id,
1730
+ kind: picklist(FACT_TYPES),
1731
+ text,
1732
+ status: picklist(FACT_STATUSES),
1733
+ project: nullable(text),
1734
+ subject: nullable(reference),
1735
+ occurred_at: nullable(time),
1736
+ supersedes: nullable(reference),
1737
+ author,
1738
+ model: nullable(text),
1739
+ /** Who accepted it; `null` while it is proposed. */
1740
+ confirmed_by: optional(nullable(strictObject({ type: picklist(["person", "bot"]), id }))),
1741
+ scope: nullable(picklist(MEMORY_SCOPES)),
1742
+ /** Who recorded it: the owner, or an agent whose fact waits as proposed. */
1743
+ origin: picklist(["owner", "agent"]),
1744
+ evidence: array(reference),
1745
+ created_at: time,
1746
+ updated_at: time
1747
+ });
1748
+
1749
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/hit.js
1750
+ var hit = strictObject({
1751
+ kind: picklist(["message", "mail", "note", "document", "event", "meeting"]),
1752
+ ref: reference,
1753
+ provider: text,
1754
+ url: optional(text),
1755
+ /** The account it was found in; a note's folder id, or `internal` for a note written in memo. */
1756
+ account: text,
1757
+ /** The chat, the mail thread's subject, the note's, the event's or the meeting's title. */
1758
+ title: nullable(text),
1759
+ /** Null for a meeting whose start is unknown. */
1760
+ timestamp: nullable(time),
1761
+ excerpt: text,
1762
+ sender_name: optional(nullable(text)),
1763
+ /** The writer's `person:` reference, where the store has one. */
1764
+ sender_ref: optional(nullable(reference)),
1765
+ found_by: optional(array(picklist(["title", "words", "meaning"]))),
1766
+ /** How far into the meeting the passage is. */
1767
+ offset_ms: optional(nullable(count)),
1768
+ /** A meeting passage's place: its transcript, chat or summary. */
1769
+ scope: optional(picklist(["transcript", "chat", "summary"])),
1770
+ /** A meeting passage's stored line, so two passages of one meeting stay apart; `search meetings` gives the same. */
1771
+ id: optional(pipe(string(), minLength(1))),
1772
+ /** Absent on a note hit: the owner wrote it. */
1773
+ untrusted
1774
+ });
1775
+
1776
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/identity.js
1777
+ var identity = strictObject({
1778
+ ref: reference,
1779
+ provider: text,
1780
+ account: text,
1781
+ /** The messenger's own id for them. */
1782
+ id,
1783
+ name: nullable(text),
1784
+ username: nullable(text),
1785
+ /** The `person:` they are linked to, when one is. */
1786
+ person: optional(nullable(reference))
1787
+ });
1788
+
1789
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
1790
+ var imageEmbedding = strictObject({
1791
+ model: text,
1792
+ embedded: count,
1793
+ skipped: count,
1794
+ failed: count,
1795
+ more: boolean()
1796
+ });
1797
+
1798
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/join-request.js
1799
+ var joinRequest = strictObject({
1800
+ person_id: id,
1801
+ name: nullable(text),
1802
+ username: nullable(text),
1803
+ /** `null` where the messenger does not say. */
1804
+ requested_at: nullable(time),
1805
+ /** The note they sent with the request. */
1806
+ about: optional(text)
1807
+ });
1808
+
1809
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
1810
+ var pollVote = strictObject({
1811
+ person_id: id,
1812
+ name: nullable(text),
1813
+ username: nullable(text),
1814
+ /** Answer ids, as `polls show` prints them. */
1815
+ answers: array(id),
1816
+ voted_at: time
1817
+ });
1818
+
1819
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/listener.js
1820
+ var reactions = unwrap(unwrap(message.entries.reactions));
1821
+ var observation = strictObject({
1822
+ value: pipe(number(), minValue(0)),
1823
+ observed_at: time,
1824
+ source: picklist(["remote_fetch", "remote_update"]),
1825
+ reactions: optional(reactions)
1826
+ });
1827
+ var watchedMessage = strictObject({
1828
+ ...message.entries,
1829
+ starred: optional(boolean()),
1830
+ counter_observations: optional(partial(strictObject({ views: observation, reactions: observation, comments: observation })))
1831
+ });
1832
+ var target = { chat_id: id, chat_title: nullable(text), message_id: id };
1833
+ var messageEvent = variant("event", [
1834
+ strictObject({ event: picklist(["message", "edit"]), message: watchedMessage }),
1835
+ strictObject({ event: literal("delete"), ...target, chat_id: nullable(id) }),
1836
+ strictObject({ event: literal("reaction"), ...target, reactions, counter_observation: optional(observation) }),
1837
+ strictObject({ event: literal("vote"), ...target, vote: pollVote }),
1838
+ strictObject({
1839
+ event: literal("person_reaction"),
1840
+ ...target,
1841
+ reaction: strictObject({ person: member, own: boolean(), reaction: nullable(text), reacted_at: time })
1842
+ }),
1843
+ strictObject({ event: literal("star"), ...target, starred: boolean() }),
1844
+ strictObject({ event: literal("delivery"), ...target, delivery: unwrap(message.entries.delivery), at: time }),
1845
+ strictObject({ event: literal("chat_event"), chat_id: id, chat_title: nullable(text), change: chatEvent })
1846
+ ]);
1847
+ var watchItem = union([watchedMessage, messageEvent]);
1848
+ var totals = record(text, count);
1849
+ var serveSummary = strictObject({
1850
+ profile: text,
1851
+ started_at: time,
1852
+ stopped_at: time,
1853
+ kept: totals,
1854
+ replies: optional(strictObject({ sent: totals, skipped: totals, tasks: optional(totals) })),
1855
+ members: optional(strictObject({ fetched: count, failed: count })),
1856
+ stems: optional(strictObject({ stemmed: count })),
1857
+ tasks: optional(strictObject({ added: count, closed: count, review: count }))
1858
+ });
1859
+
1860
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
1861
+ var mediaArchive = strictObject({
1862
+ directory: text,
1863
+ chats: count,
1864
+ saved: count,
1865
+ existing: count,
1866
+ complete: boolean()
1867
+ });
1868
+ var mediaArchiveCheck = strictObject({
1869
+ valid: boolean(),
1870
+ checked: count,
1871
+ files: array(strictObject({ path: text, valid: boolean(), archive_directory: optional(text) }))
1872
+ });
1873
+ var mediaArchiveMove = strictObject({
1874
+ directory: text,
1875
+ archive_directory: text,
1876
+ before_time: time,
1877
+ selected: count,
1878
+ selected_bytes: count,
1879
+ moved: count,
1880
+ moved_bytes: count,
1881
+ already_archived: count,
1882
+ undated: count,
1883
+ complete: boolean(),
1884
+ dry_run: boolean()
1885
+ });
1886
+ var timer = { name: text, installed: boolean(), service_path: text, timer_path: text };
1887
+ var mediaArchiveTimer = union([
1888
+ strictObject({ ...timer, active: boolean() }),
1889
+ strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
1890
+ ]);
1891
+
1892
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
1893
+ var preparationId = pipe(string(), minLength(1));
1894
+ var preparationCount = pipe(number(), integer(), minValue(0));
1895
+ var preparationTime = nullable(isoTime);
1896
+ var text2 = nullable(string());
1897
+ var id2 = preparationId;
1898
+ var count2 = preparationCount;
1899
+ var page = /* @__PURE__ */ __name((item) => strictObject({ items: array(item), has_more: boolean() }), "page");
1900
+ var preparationUpcoming = strictObject({
1901
+ scope: strictObject({ provider: id2, account: id2 }),
1902
+ meeting_id: id2,
1903
+ kind: picklist(["single", "recurring", "unscheduled", "unknown"]),
1904
+ after: isoTime,
1905
+ until: isoTime,
1906
+ timezone: text2,
1907
+ verified_next: boolean(),
1908
+ candidate: nullable(strictObject({
1909
+ id: text2,
1910
+ start_at: preparationTime,
1911
+ end_at: preparationTime,
1912
+ status: picklist(["scheduled", "cancelled"]),
1913
+ verified: boolean()
1914
+ })),
1915
+ coverage: strictObject({
1916
+ schedule_complete: boolean(),
1917
+ inspected: count2,
1918
+ undated: count2,
1919
+ unverified: count2,
1920
+ cancelled: count2,
1921
+ simultaneous: count2,
1922
+ missing: array(picklist(["schedule-details", "occurrence-details"]))
1923
+ })
1924
+ });
1925
+ var preparationCue = strictObject({
1926
+ ref: reference,
1927
+ fingerprint: id2,
1928
+ transcript_id: id2,
1929
+ content_hash: text2,
1930
+ position: count2,
1931
+ offset_ms: count2,
1932
+ end_ms: count2,
1933
+ speaker_participant_id: nullable(id2),
1934
+ speaker_name: text2,
1935
+ text: string(),
1936
+ revision: picklist(["current", "superseded"])
1937
+ });
1938
+ var preparationEvidence = strictObject({
1939
+ schema_version: literal(1),
1940
+ kind: literal("meeting"),
1941
+ source: reference,
1942
+ fingerprint: id2,
1943
+ limits: strictObject({ cues: count2, bytes: count2, max_read_bytes: count2, max_transcript_pages: count2 }),
1944
+ content_bytes: count2,
1945
+ coverage: strictObject({
1946
+ provided: count2,
1947
+ included: count2,
1948
+ omitted: nullable(count2),
1949
+ provided_exact: boolean(),
1950
+ next_transcript_id: nullable(id2),
1951
+ next_reference: nullable(reference),
1952
+ transcript_pages: count2,
1953
+ skipped_unavailable: count2,
1954
+ has_more: boolean(),
1955
+ truncated_by: nullable(picklist(["cues", "bytes", "transcripts"])),
1956
+ input: literal("bounded-meeting-pages"),
1957
+ archive_completeness: literal("unknown")
1958
+ }),
1959
+ items: array(preparationCue)
1960
+ });
1961
+ var preparationContext = strictObject({
1962
+ participants: page(strictObject({ id: id2, identity_id: id2, display_name: text2, person_uid: nullable(id2) })),
1963
+ projects: page(strictObject({ ref: reference, key: id2, name: string(), link_id: id2 })),
1964
+ facts: page(strictObject({ ref: reference, type: id2, statement: string(), updated_at: isoTime })),
1965
+ tasks: page(strictObject({
1966
+ ref: reference,
1967
+ key: id2,
1968
+ title: string(),
1969
+ status: id2,
1970
+ priority: nullable(count2),
1971
+ source: nullable(reference)
1972
+ }))
1973
+ });
1974
+ var preparationMeeting = strictObject({
1975
+ id: id2,
1976
+ external_id: id2,
1977
+ title: text2,
1978
+ event_id: nullable(id2),
1979
+ started_at: preparationTime,
1980
+ ended_at: preparationTime,
1981
+ updated_at: isoTime
1982
+ });
1983
+
1984
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
1985
+ var meetingEvidence = preparationEvidence;
1986
+ var meetingPersonContext = strictObject({
1987
+ person: strictObject({ uid: string(), name: nullable(string()) }),
1988
+ items: array(strictObject({
1989
+ ref: reference,
1990
+ cues: array(preparationCue),
1991
+ cue_coverage: strictObject({ included: preparationCount, omitted: nullable(preparationCount), has_more: boolean() })
1992
+ })),
1993
+ limits: strictObject({ meetings: preparationCount, cues: preparationCount, bytes: preparationCount, scan_limit: preparationCount }),
1994
+ content_bytes: preparationCount,
1995
+ coverage: strictObject({
1996
+ involvements_scanned: preparationCount,
1997
+ scan_limit_reached: boolean(),
1998
+ pending: preparationCount,
1999
+ truncated_by: nullable(picklist(["meetings", "bytes"])),
2000
+ skipped_unavailable: preparationCount,
2001
+ complete: literal(false),
2002
+ input: literal("bounded-meeting-pages")
2003
+ })
2004
+ });
2005
+
2006
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
2007
+ var evidence2 = strictObject({ reference, fingerprint: text });
2008
+ var base = { id, project: reference, evidence: array(evidence2) };
2009
+ var finding = variant("kind", [
2010
+ strictObject({ ...base, kind: literal("fact"), type: picklist(FACT_TYPES), statement: text }),
2011
+ strictObject({
2012
+ ...base,
2013
+ kind: literal("task"),
2014
+ type: picklist(WORK_TASK_TYPES),
2015
+ title: text,
2016
+ reason: text,
2017
+ commitment: picklist(["explicit", "inferred"]),
2018
+ due_at: optional(time),
2019
+ due_evidence: optional(array(reference)),
2020
+ assignee: optional(reference),
2021
+ assignee_evidence: optional(array(reference))
2022
+ })
2023
+ ]);
2024
+ var outcome = strictObject({
2025
+ id,
2026
+ fingerprint: text,
2027
+ status: picklist(["accepted", "rejected"]),
2028
+ reference: nullable(reference),
2029
+ reused: boolean()
2030
+ });
2031
+ var meetingFindings = strictObject({
2032
+ id,
2033
+ account: strictObject({ provider: text, account: text }),
2034
+ input: strictObject({ schema_version: literal(1), key: text, extractor: text, findings: array(finding) }),
2035
+ fingerprint: text,
2036
+ status: picklist(["proposed", "reviewed"]),
2037
+ author,
2038
+ decided_by: nullable(strictObject({ type: picklist(["person", "bot"]), id })),
2039
+ decided_at: nullable(time),
2040
+ previous: array(outcome),
2041
+ receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome) }))
2042
+ });
2043
+
2044
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
2045
+ var communicationCoverage = strictObject({
2046
+ read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
2047
+ query: string(),
2048
+ window: strictObject({ after: isoTime, before: isoTime }),
2049
+ selection: literal("explicit-host-grants/literal-words"),
2050
+ sources: array(strictObject({
2051
+ selection_id: preparationId,
2052
+ source: strictObject({
2053
+ kind: picklist(["message", "mail", "document"]),
2054
+ account_id: preparationId,
2055
+ provider: preparationId,
2056
+ account: preparationId
2057
+ }),
2058
+ state: picklist(["searched", "unavailable", "read-limited"]),
2059
+ index: picklist(["ready", "pending", "missing", "unknown"]),
2060
+ has_more: boolean(),
2061
+ has_undated: boolean(),
2062
+ completeness: literal("unknown"),
2063
+ consistency: literal("snapshot-per-page"),
2064
+ next_cursor: nullable(string()),
2065
+ restart_required: boolean(),
2066
+ output_limited: boolean(),
2067
+ read_bytes: nullable(preparationCount),
2068
+ issue: nullable(picklist(["not_found", "validation_error", "configuration_error"]))
2069
+ }))
2070
+ });
2071
+ var preparationCommunications = strictObject({
2072
+ coverage: communicationCoverage,
2073
+ items: array(strictObject({
2074
+ selection_id: preparationId,
2075
+ ref: reference,
2076
+ provider: preparationId,
2077
+ account: preparationId,
2078
+ title: nullable(string()),
2079
+ url: nullable(string()),
2080
+ text: string(),
2081
+ at: isoTime,
2082
+ updated_at: isoTime,
2083
+ revision: nullable(pipe(number(), safeInteger(), minValue(1))),
2084
+ time_kind: picklist(["sent", "source-modified", "stored-update"]),
2085
+ text_truncated: boolean()
2086
+ }))
2087
+ });
2088
+
2089
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
2090
+ var meetingPreparation = strictObject({
2091
+ communications: optional(preparationCommunications),
2092
+ schema_version: literal(1),
2093
+ kind: literal("meeting_preparation"),
2094
+ account_id: preparationId,
2095
+ upcoming: preparationUpcoming,
2096
+ series: nullable(strictObject({
2097
+ id: preparationId,
2098
+ external_id: preparationId,
2099
+ title: nullable(string()),
2100
+ event_series_id: nullable(preparationId),
2101
+ updated_at: isoTime
2102
+ })),
2103
+ history_window: strictObject({ after: isoTime, before: isoTime }),
2104
+ meetings: array(strictObject({
2105
+ ref: reference,
2106
+ meeting: preparationMeeting,
2107
+ evidence: preparationEvidence,
2108
+ context: preparationContext
2109
+ })),
2110
+ related: strictObject({
2111
+ anchors: array(reference),
2112
+ items: array(strictObject({
2113
+ ref: reference,
2114
+ meeting: preparationMeeting,
2115
+ evidence: preparationEvidence,
2116
+ shared_person: boolean(),
2117
+ shared_project: boolean()
2118
+ })),
2119
+ has_more: boolean(),
2120
+ output_limited: boolean(),
2121
+ selection: literal("explicit-person-links/confirmed-project-links")
2122
+ }),
2123
+ knowledge: optional(strictObject({
2124
+ anchors: array(reference),
2125
+ items: array(strictObject({
2126
+ ref: reference,
2127
+ type: picklist(["fact", "statement", "question", "decision", "promise"]),
2128
+ statement: string(),
2129
+ subject: nullable(reference),
2130
+ project: nullable(reference),
2131
+ updated_at: isoTime,
2132
+ shared_person: boolean(),
2133
+ shared_project: boolean()
2134
+ })),
2135
+ selection: literal("accepted-global-person/project-facts"),
2136
+ coverage: strictObject({
2137
+ has_more: boolean(),
2138
+ output_limited: boolean(),
2139
+ fact_evidence: literal("not-revalidated"),
2140
+ other_sources: picklist(["not-queried", "see-communications"])
2141
+ })
2142
+ })),
2143
+ notes: optional(strictObject({
2144
+ anchors: array(reference),
2145
+ items: array(strictObject({
2146
+ ref: reference,
2147
+ title: nullable(string()),
2148
+ text: string(),
2149
+ revision: pipe(number(), safeInteger(), minValue(1)),
2150
+ updated_at: isoTime,
2151
+ person: nullable(reference),
2152
+ project: nullable(reference),
2153
+ meeting: optional(nullable(reference))
2154
+ })),
2155
+ selection: picklist([
2156
+ "owner-written-global-person/project-notes",
2157
+ "owner-written-meeting/person/project-notes"
2158
+ ]),
2159
+ coverage: strictObject({
2160
+ has_more: boolean(),
2161
+ output_limited: boolean(),
2162
+ source_evidence: literal("not-revalidated"),
2163
+ other_sources: picklist(["not-queried", "see-communications"])
2164
+ })
2165
+ })),
2166
+ project_evidence: optional(strictObject({
2167
+ project: string(),
2168
+ query: string(),
2169
+ pages: array(meetingProjectEvidence),
2170
+ continuation: nullable(strictObject({
2171
+ command: literal("meetings projects evidence"),
2172
+ project: string(),
2173
+ query: string(),
2174
+ cursor: nullable(string()),
2175
+ limit: preparationCount,
2176
+ max_read_bytes: preparationCount
2177
+ })),
2178
+ coverage: strictObject({ page_limit: preparationCount, has_more: boolean(), output_limited: boolean() })
2179
+ })),
2180
+ limits: strictObject({ meetings: preparationCount, cues: preparationCount, context_limit: preparationCount, max_read_bytes: preparationCount, bytes: preparationCount }),
2181
+ coverage: strictObject({
2182
+ archive_completeness: literal("unknown"),
2183
+ consistency: literal("live-reads"),
2184
+ history_has_more: boolean(),
2185
+ has_undated: boolean(),
2186
+ skipped_unavailable: array(reference),
2187
+ output_limited: boolean(),
2188
+ context: literal("observed-participants/confirmed-projects/accepted-meeting-subject-facts/direct-source-tasks"),
2189
+ fact_evidence: literal("not-revalidated"),
2190
+ unqueried: array(picklist([
2191
+ "person-history",
2192
+ "project-wide-context",
2193
+ "person-nonmeeting-context",
2194
+ "project-nonmeeting-context",
2195
+ "project-alias-candidates",
2196
+ "other-person-nonmeeting-context",
2197
+ "other-project-nonmeeting-context"
2198
+ ]))
2199
+ })
2200
+ });
2201
+
2202
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
2203
+ var count3 = pipe(number(), integer(), minValue(0));
2204
+ var id3 = pipe(string(), minLength(1));
2205
+ var text3 = string();
2206
+ var meetingProjectCandidates = strictObject({
2207
+ schema_version: literal(1),
2208
+ kind: literal("meeting_project_candidates"),
2209
+ source: strictObject({ provider: text3, account: text3, account_id: id3, ref: reference }),
2210
+ input_fingerprint: id3,
2211
+ vocabulary_fingerprint: id3,
2212
+ association: literal("unconfirmed-literal-evidence"),
2213
+ items: array(strictObject({
2214
+ project: strictObject({ ref: reference, id: id3, name: text3, key: nullable(text3) }),
2215
+ matches: array(strictObject({
2216
+ term: strictObject({
2217
+ name: text3,
2218
+ kind: picklist(["canonical", "key", "alias"]),
2219
+ alias_id: optional(id3)
2220
+ }),
2221
+ ambiguous: boolean(),
2222
+ source: strictObject({
2223
+ kind: picklist(["metadata-title", "transcript"]),
2224
+ ref: reference,
2225
+ fingerprint: nullable(id3),
2226
+ revision: nullable(picklist(["current", "superseded"]))
2227
+ })
2228
+ })),
2229
+ omitted_matches: count3
2230
+ })),
2231
+ limits: strictObject({ limit: count3, max_projects: count3, max_vocabulary_read_bytes: count3, bytes: count3 }),
2232
+ coverage: strictObject({
2233
+ selection: literal("explicit-host-evidence/global-project-vocabulary"),
2234
+ source_evidence: literal("not-revalidated"),
2235
+ association: literal("unconfirmed-literal-evidence"),
2236
+ archive_completeness: literal("unknown"),
2237
+ omitted_matches: count3,
2238
+ candidates_total: count3,
2239
+ has_more: boolean(),
2240
+ output_limited: boolean(),
2241
+ matching: literal("unicode-normalized-literal-word-boundaries")
2242
+ }),
2243
+ evidence: strictObject({
2244
+ fingerprint: id3,
2245
+ limits: strictObject({ cues: count3, bytes: count3, max_read_bytes: count3, max_transcript_pages: count3 }),
2246
+ coverage: strictObject({
2247
+ provided: count3,
2248
+ included: count3,
2249
+ omitted: nullable(count3),
2250
+ provided_exact: boolean(),
2251
+ next_cursor: nullable(reference),
2252
+ next_transcript_id: nullable(id3),
2253
+ next_reference: nullable(reference),
2254
+ transcript_pages: count3,
2255
+ skipped_unavailable: count3,
2256
+ has_more: boolean(),
2257
+ truncated_by: nullable(picklist(["cues", "bytes", "transcripts"])),
2258
+ input: literal("bounded-meeting-pages"),
2259
+ archive_completeness: literal("unknown")
2260
+ }),
2261
+ consistency: literal("live-reads"),
2262
+ max_store_calls: literal(8)
2263
+ })
2264
+ });
2265
+
2266
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
2267
+ var count4 = pipe(number(), integer(), minValue(0));
2268
+ var id4 = pipe(string(), minLength(1), maxLength(1e3));
2269
+ var meetingSeriesInventory = strictObject({
2270
+ schema_version: literal(1),
2271
+ kind: literal("meeting_series_inventory"),
2272
+ scope: strictObject({ provider: id4, account: id4 }),
2273
+ after: isoTime,
2274
+ until: isoTime,
2275
+ items: array(strictObject({
2276
+ meeting_id: id4,
2277
+ title: nullable(pipe(string(), maxLength(8192))),
2278
+ kind: picklist(["single", "recurring", "unscheduled", "unknown"]),
2279
+ scheduled_start_at: nullable(isoTime)
2280
+ })),
2281
+ page: pageSchema,
2282
+ fingerprint: pipe(string(), minLength(1), maxLength(200)),
2283
+ limits: strictObject({ limit: count4, max_read_bytes: count4, bytes: count4 }),
2284
+ coverage: strictObject({
2285
+ selection: picklist(["provider-window", "provider-inventory"]),
2286
+ source_partial: boolean(),
2287
+ has_more: boolean(),
2288
+ undated: count4,
2289
+ date_hints_outside_window: count4,
2290
+ calendar_completeness: literal("unknown"),
2291
+ occurrence_proof: literal("not-read"),
2292
+ consistency: literal("live-provider-pages")
2293
+ })
2294
+ });
2295
+
2296
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
2297
+ var text4 = string();
2298
+ var id5 = pipe(number(), integer(), minValue(1));
2299
+ var revision = picklist(["current", "superseded"]);
2300
+ var meetingTaskProposal = strictObject({
2301
+ id: text4,
2302
+ source: reference,
2303
+ source_kind: literal("meeting"),
2304
+ group: reference,
2305
+ account_id: id5,
2306
+ kind: picklist(TASK_KINDS),
2307
+ preview: nullable(text4),
2308
+ revision: nullable(revision),
2309
+ applied: literal(false),
2310
+ persistence: literal("proposal-only")
2311
+ });
2312
+
2313
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/memory.js
2314
+ var memory = strictObject({
2315
+ ref: reference,
2316
+ id,
2317
+ kind: picklist(MEMORY_KINDS),
2318
+ text,
2319
+ subject: nullable(reference),
2320
+ author,
2321
+ model: nullable(text),
2322
+ confidence: nullable(number()),
2323
+ status: picklist(MEMORY_STATUSES),
2324
+ scope: picklist(MEMORY_SCOPES),
2325
+ supersedes: nullable(reference),
2326
+ evidence: array(reference),
2327
+ last_verified_at: nullable(time),
2328
+ created_at: time,
2329
+ updated_at: time
2330
+ });
2331
+
2332
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/mention.js
2333
+ var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
2334
+ var status = picklist(["found", "linked", "dismissed"]);
2335
+ var mention = strictObject({
2336
+ id: count,
2337
+ kind,
2338
+ value: text,
2339
+ domain: nullable(text),
2340
+ confidence: number(),
2341
+ status,
2342
+ field: text,
2343
+ author: nullable(text),
2344
+ target: nullable(reference),
2345
+ sent_at: time,
2346
+ found_at: time,
2347
+ written: text,
2348
+ locator: reference
2349
+ });
2350
+ var mentionDetails = strictObject({
2351
+ ...mention.entries,
2352
+ before: text,
2353
+ after: text,
2354
+ same_value: count,
2355
+ candidates: array(reference)
2356
+ });
2357
+ var mentionDomain = strictObject({ domain: text, links: count, chats: count, first_at: time, last_at: time });
2358
+ var place = strictObject({ id: count, address: text, mentions: count });
2359
+ var mentionDecision = strictObject({
2360
+ kind,
2361
+ value: text,
2362
+ status,
2363
+ target: nullable(reference),
2364
+ mentions: count
2365
+ });
2366
+ var mentionRebuild = strictObject({
2367
+ messages: count,
2368
+ attachments: count,
2369
+ documents: count,
2370
+ notes: count,
2371
+ emails: count,
2372
+ mentions: count
2373
+ });
2374
+
2375
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/message-change.js
2376
+ var operated3 = { operation_id: id, chat_id: id };
2377
+ var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
2378
+ var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
2379
+ var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
2380
+
2381
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/message-read.js
2382
+ var messageTranscript = strictObject({
2383
+ message_id: id,
2384
+ text,
2385
+ pending: boolean(),
2386
+ via: text,
2387
+ model: optional(text)
2388
+ });
2389
+ var conversationLink = strictObject({
2390
+ parent_id: nullable(id),
2391
+ source: picklist(["provider", "rule", "agent"]),
2392
+ kind: text,
2393
+ confidence: number(),
2394
+ method: text,
2395
+ version: nullable(text),
2396
+ created_at: time,
2397
+ stale: boolean(),
2398
+ chosen: boolean()
2399
+ });
2400
+ var messageLinks = strictObject({
2401
+ chat: id,
2402
+ message: id,
2403
+ links: array(conversationLink),
2404
+ chain: array(id)
2405
+ });
2406
+ var fingerprint2 = pipe(text, regex(/^[a-f0-9]{64}$/));
2407
+ var evidencePacket = strictObject({
2408
+ schema_version: literal(1),
2409
+ id,
2410
+ kind: picklist(["chats", "news", "person"]),
2411
+ source: strictObject({ provider: text, account: id, chat: id }),
2412
+ fingerprint: fingerprint2,
2413
+ limits: strictObject({ messages: count, bytes: count }),
2414
+ content_bytes: count,
2415
+ coverage: strictObject({
2416
+ provided: count,
2417
+ included: count,
2418
+ omitted: count,
2419
+ has_more: boolean(),
2420
+ history: literal("unknown"),
2421
+ truncated_by: nullable(picklist(["messages", "bytes"]))
2422
+ }),
2423
+ items: array(strictObject({
2424
+ locator: reference,
2425
+ fingerprint: fingerprint2,
2426
+ timestamp: time,
2427
+ edited_at: nullable(time),
2428
+ sender_id: nullable(id),
2429
+ sender_name: nullable(text),
2430
+ sender_is_chat: boolean(),
2431
+ outgoing: nullable(boolean()),
2432
+ text,
2433
+ reply_to: nullable(reference),
2434
+ thread_id: nullable(id),
2435
+ attachment_kinds: array(text)
2436
+ }))
2437
+ });
2438
+
2439
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/message-context.js
2440
+ var messageThread = strictObject({
2441
+ ref: reference,
2442
+ chat: id,
2443
+ message: id,
2444
+ mode: picklist(["thread", "time"]),
2445
+ fallback: optional(picklist(["not_built", "not_stored", "not_linked"])),
2446
+ items: array(message),
2447
+ links: array(strictObject({ ...conversationLink.entries, message_id: id })),
2448
+ chain: array(id),
2449
+ stale: boolean(),
2450
+ built_at: nullable(time),
2451
+ stopped: array(picklist(["hops", "messages", "bytes", "time", "links", "cycle", "aborted", "thread"])),
2452
+ bounds: strictObject({ max_hops: count, max_messages: count, max_bytes: count, within_ms: count })
2453
+ });
2454
+ var messageContext = union([message, messageThread]);
2455
+
2456
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
2457
+ var messageCounts = strictObject({
2458
+ by: picklist(["chat", "sender", "day", "hour"]),
2459
+ total: count,
2460
+ rows: array(strictObject({
2461
+ /** The chat or sender id, or the calendar day or hour. */
2462
+ key: text,
2463
+ ref: optional(reference),
2464
+ name: nullable(text),
2465
+ count
2466
+ }))
2467
+ });
2468
+
2469
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/message-link.js
2470
+ var messageLink = strictObject({
2471
+ ref: reference,
2472
+ url: nullable(text),
2473
+ access: picklist(["public", "restricted", "unknown", "unavailable"]),
2474
+ /** Why there is no link. */
2475
+ reason: nullable(picklist(["unsupported_chat", "unsupported_provider", "offline"]))
2476
+ });
2477
+
2478
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/message-write.js
2479
+ var messageWrite = strictObject({
2480
+ operation_id: id,
2481
+ message,
2482
+ /** An album's messages, in order; `message` is the first. Absent for a single message. */
2483
+ messages: optional(array(message)),
2484
+ scheduled_for: optional(time)
2485
+ });
2486
+ var draftWrite = strictObject({
2487
+ operation_id: id,
2488
+ chat_id: id,
2489
+ saved: literal(true)
2490
+ });
2491
+ var messageSend = union([messageWrite, draftWrite]);
2492
+
2493
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/model.js
2494
+ var model = strictObject({
2495
+ id,
2496
+ kind: picklist(["audio", "text", "image", "reranker"]),
2497
+ title: text,
2498
+ /** Which languages it reads, in words. */
2499
+ languages: text,
2500
+ licence: optional(text),
2501
+ /** What its files take on disk once downloaded. */
2502
+ size_bytes: count,
2503
+ downloaded: boolean(),
2504
+ /** The one used when no model is named. */
2505
+ default: boolean(),
2506
+ /** The folder its files are in once downloaded, so an agent can place them by hand. */
2507
+ path: text
2508
+ });
2509
+
2510
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/model-key.js
2511
+ var source = picklist(["environment", "keyring", "file"]);
2512
+ var modelKey = strictObject({
2513
+ provider: text,
2514
+ stored: optional(source),
2515
+ removed: optional(array(source))
2516
+ });
2517
+ var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
2518
+ var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
2519
+
2520
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
2521
+ var versus = strictObject({ current: number(), previous: number() });
2522
+ var person = { person_ref: reference, name: nullable(text) };
2523
+ var graph = strictObject({
2524
+ kind: text,
2525
+ x: strictObject({ type: picklist(["date", "time", "number"]), values: array(union([text, number()])) }),
2526
+ series: array(strictObject({ key: text, name: text, kind: text, values: array(number()) })),
2527
+ stacked: optional(boolean()),
2528
+ percentage: optional(boolean())
2529
+ });
2530
+ var officialStats = strictObject({
2531
+ chat_id: id,
2532
+ title: text,
2533
+ kind: picklist(["group", "channel"]),
2534
+ since: time,
2535
+ until: time,
2536
+ totals: record(string(), versus),
2537
+ top: optional(strictObject({
2538
+ posters: array(strictObject({ ...person, messages: count, average_chars: number() })),
2539
+ admins: array(strictObject({ ...person, deleted: count, removed: count, banned: count })),
2540
+ inviters: array(strictObject({ ...person, invited: count }))
2541
+ })),
2542
+ notifications: optional(strictObject({ enabled: count, total: count })),
2543
+ recent_posts: optional(array(strictObject({
2544
+ kind: picklist(["message", "story"]),
2545
+ id,
2546
+ views: count,
2547
+ forwards: count,
2548
+ reactions: count
2549
+ }))),
2550
+ /** A graph the messenger did not give is `{ error }`; the others still answer. */
2551
+ graphs: record(string(), union([graph, strictObject({ error: text })]))
2552
+ });
2553
+
2554
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/person.js
2555
+ var person2 = strictObject({
2556
+ ref: reference,
2557
+ name: nullable(text),
2558
+ identities: optional(array(identity))
2559
+ });
2560
+
2561
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/poll.js
2562
+ var poll = strictObject({
2563
+ chat_id: id,
2564
+ message_id: id,
2565
+ question: text,
2566
+ answers: array(strictObject({ id, text, voters: nullable(count), chosen: boolean() })),
2567
+ closed: boolean(),
2568
+ multiple: boolean(),
2569
+ anonymous: boolean(),
2570
+ voters: nullable(count),
2571
+ quiz: optional(boolean()),
2572
+ revote: optional(boolean()),
2573
+ creator: optional(boolean())
2574
+ });
2575
+ var pollChange = strictObject({ operation_id: id, poll });
2576
+
2577
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
2578
+ var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
2579
+ var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
2580
+
2581
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/ranking.js
2582
+ var figures = record(string(), number());
2583
+ var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
2584
+ var rankingRow = strictObject({
2585
+ rank: count,
2586
+ /** The message's locator, or the author's `contact:` reference. */
2587
+ ref: reference,
2588
+ /** The message or person id, as `stats * evidence` takes it. */
2589
+ id,
2590
+ chat_ref: optional(reference),
2591
+ name: nullable(text),
2592
+ /** A message's kind (`posts`, `comments`); null for authors. */
2593
+ kind: nullable(text),
2594
+ value: number(),
2595
+ components: record(string(), nullable(number())),
2596
+ messages: count,
2597
+ known_reactions: count,
2598
+ unknown_reactions: count,
2599
+ reactions: optional(array(strictObject({ reaction: string(), count }))),
2600
+ score: nullable(strictObject({ score: number(), normalized: figures, contributions: figures })),
2601
+ quality: strictObject({
2602
+ reactions: picklist(["known", "partial", "unknown"]),
2603
+ graph: picklist(["complete", "partial", "not_used"]),
2604
+ counter_freshness: freshness
2605
+ }),
2606
+ counters: optional(array(counterReading)),
2607
+ selection
2608
+ });
2609
+ var ranking = strictObject({
2610
+ target: picklist(["messages", "contacts"]),
2611
+ measure: text,
2612
+ order: picklist(["ascending", "descending"]),
2613
+ preset: nullable(text),
2614
+ weights: nullable(figures),
2615
+ min_messages: count,
2616
+ message_kind: text,
2617
+ /** Messages the query selected. */
2618
+ total: count,
2619
+ population: count,
2620
+ eligible: count,
2621
+ excluded: strictObject({ minimum: count, missing: count, unknown_sender: count, unknown_kind: count }),
2622
+ maxima: figures,
2623
+ counter_freshness: freshness,
2624
+ expanded_discussion_chats: optional(array(text)),
2625
+ rows: array(rankingRow)
2626
+ });
2627
+
2628
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
2629
+ var reactionChange = strictObject({
2630
+ operation_id: id,
2631
+ chat_id: id,
2632
+ message_id: id,
2633
+ reaction: nullable(text)
2634
+ });
2635
+
2636
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/recipient.js
2637
+ var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
2638
+ var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
2639
+ var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
2640
+ var recipientOff = strictObject({ off: boolean(), was_on: boolean() });
2641
+ var recipientChange = strictObject({
2642
+ ...partial(recipientAdded).entries,
2643
+ ...partial(recipientRemoved).entries,
2644
+ ...partial(recipientOff).entries
2645
+ });
2646
+
2647
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
2648
+ var events = array(record(string(), unknown()));
2649
+ var recordedRun = strictObject({
2650
+ run_id: id,
2651
+ command: text,
2652
+ profile: optional(text),
2653
+ started_at: time,
2654
+ completed_at: optional(time),
2655
+ status: picklist(["success", "failed", "partial", "running"]),
2656
+ requests: optional(count),
2657
+ duration_ms: optional(count),
2658
+ cli_version: text,
2659
+ runtime: optional(text),
2660
+ platform: optional(text),
2661
+ arch: optional(text),
2662
+ error_code: optional(text),
2663
+ partial: optional(strictObject({
2664
+ failed: count,
2665
+ stop_reason: optional(text),
2666
+ failures: array(strictObject({ id: text, stage: text, error_code: text, attachment: optional(count) }))
2667
+ })),
2668
+ provider_error: optional(text),
2669
+ kept_because_failed: optional(boolean()),
2670
+ operations: optional(array(text)),
2671
+ codes: optional(array(text)),
2672
+ trace_id: optional(id),
2673
+ cli_command: optional(text),
2674
+ argv: optional(array(text)),
2675
+ unknown_command: optional(text),
2676
+ agent: optional(strictObject({ kind: text, session_id: nullable(text), from_chat: optional(literal(true)) })),
2677
+ error: optional(strictObject({
2678
+ class: text,
2679
+ code: optional(text),
2680
+ reason: optional(text),
2681
+ message: optional(text),
2682
+ operation: optional(text),
2683
+ http: optional(strictObject({ method: optional(text), endpoint_template: optional(text), status: optional(count) })),
2684
+ provider: optional(strictObject({ key: optional(text), code: optional(number()) })),
2685
+ causes: optional(array(strictObject({ class: text, message: optional(text) }))),
2686
+ stack: optional(array(text))
2687
+ })),
2688
+ directory: optional(text),
2689
+ event_count: optional(count),
2690
+ events: optional(events),
2691
+ events_truncated: optional(boolean())
2692
+ });
2693
+ var runDetails = strictObject({
2694
+ ...omit(recordedRun, ["events_truncated"]).entries,
2695
+ directory: text,
2696
+ event_count: count,
2697
+ events
2698
+ });
2699
+ var runHit = strictObject({
2700
+ ...omit(recordedRun, ["directory", "event_count"]).entries,
2701
+ events,
2702
+ events_truncated: boolean()
2703
+ });
2704
+ var runLocation = strictObject({ path: text });
2705
+
2706
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/relationship.js
2707
+ var relationship = strictObject({
2708
+ id,
2709
+ from: reference,
2710
+ to: reference,
2711
+ kind: picklist(RELATION_KINDS),
2712
+ role: nullable(text),
2713
+ evidence: nullable(text),
2714
+ /** An agent's suggestion stays unconfirmed, and `weak`, until the owner confirms it. */
2715
+ confirmed: boolean(),
2716
+ provenance: nullable(text),
2717
+ confidence_category: picklist(["owner-confirmed", "weak"]),
2718
+ created_at: time
2719
+ });
2720
+
2721
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/retention.js
2722
+ var retentionCohort = strictObject({
2723
+ /** The first day of the joining day or week. */
2724
+ cohort: text,
2725
+ stays: count,
2726
+ checkpoints: array(strictObject({
2727
+ age_ms: milliseconds,
2728
+ eligible: count,
2729
+ observable: count,
2730
+ present: count,
2731
+ absent: count,
2732
+ unknown: count,
2733
+ pending: count,
2734
+ rate: nullable(number())
2735
+ })),
2736
+ activity: strictObject({ observed: count, no_observed: count, pending: count, archive_covered: count }),
2737
+ early_departure: strictObject({ observed: count, not_observed: count, unknown: count, pending: count }),
2738
+ selection
2739
+ });
2740
+ var retention = strictObject({
2741
+ chat_ref: reference,
2742
+ cutoff: time,
2743
+ since: time,
2744
+ until: time,
2745
+ checkpoints_ms: array(milliseconds),
2746
+ within_ms: milliseconds,
2747
+ by: picklist(["day", "week"]),
2748
+ timezone: text,
2749
+ /** Cohorts found; `rows` holds the first `--limit` of them. */
2750
+ total: count,
2751
+ unknown_join: count,
2752
+ eligible_stays: count,
2753
+ quality: strictObject({
2754
+ membership: text,
2755
+ tolerance_ms: milliseconds,
2756
+ archive: nullable(strictObject({
2757
+ state: text,
2758
+ up_to_date: nullable(boolean()),
2759
+ gaps: boolean(),
2760
+ reaches_start: boolean(),
2761
+ fetched_at: nullable(time)
2762
+ })),
2763
+ continuous_survival: boolean(),
2764
+ group_silent_rate: nullable(number())
2765
+ }),
2766
+ rows: array(retentionCohort)
2767
+ });
2768
+
2769
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
2770
+ var savedSearch = strictObject({
2771
+ id,
2772
+ /** `null` for a run in the history. */
2773
+ name: nullable(text),
2774
+ command: picklist(["search", "stats", "message-top", "author-top", "admin-statistics", "meetings-search"]),
2775
+ /** The query and the options it runs with, as the command took them. */
2776
+ params: record(string(), unknown()),
2777
+ language: text,
2778
+ version: count,
2779
+ fields_version: count,
2780
+ created_at: time,
2781
+ last_run_at: nullable(time),
2782
+ runs: count
2783
+ });
2784
+ var searchHistoryClear = strictObject({ cleared: count });
2785
+
2786
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
2787
+ var sendAttempt = strictObject({
2788
+ at: time,
2789
+ profile: text,
2790
+ chat_id: nullable(id),
2791
+ outcome: picklist(["sent", "outcome_unknown", "refused", "failed", "reserved"]),
2792
+ kind: optional(picklist(["message", "reaction", "edit", "forward", "pin", "read", "delete", "chat", "account"])),
2793
+ action: optional(text),
2794
+ people: optional(count),
2795
+ message_id: optional(id),
2796
+ key: optional(text),
2797
+ count: optional(count),
2798
+ for_everyone: optional(boolean()),
2799
+ operation_id: optional(id),
2800
+ parent_operation_id: optional(id),
2801
+ reply_to: optional(id),
2802
+ thread_id: optional(id),
2803
+ send_as: optional(id),
2804
+ result_chat_id: optional(id),
2805
+ length: optional(count),
2806
+ attachments: optional(array(strictObject({ kind: picklist(["photo", "file", "video", "voice", "sticker"]), bytes: count }))),
2807
+ scheduled_for: optional(time),
2808
+ notify: optional(boolean()),
2809
+ origin: optional(text),
2810
+ reservation: optional(id),
2811
+ error_code: optional(text)
2812
+ });
2813
+
2814
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
2815
+ var absent = strictObject({ path: text, exists: literal(false) });
2816
+ var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
2817
+ var infoSchema = strictObject({
2818
+ ...schema.entries,
2819
+ reason: picklist(["missing", "older", "current", "newer", "too_new"]),
2820
+ upgrade: nullable(strictObject({ version: count, min_compatible: count }))
2821
+ });
2822
+ var client = strictObject({ command: text, version: text, core: text, speaks: count, seen_at: time });
2823
+ var wordIndex = strictObject({
2824
+ watermark: count,
2825
+ filled_through: count,
2826
+ pending_normalization: count,
2827
+ ready: boolean(),
2828
+ terms_through: count,
2829
+ newest: count,
2830
+ terms_ready: boolean(),
2831
+ built_at: nullable(time)
2832
+ });
2833
+ var stemIndex = strictObject({
2834
+ watermark: count,
2835
+ filled_through: count,
2836
+ pending: count,
2837
+ built: nullable(text),
2838
+ wanted: text,
2839
+ ready: boolean(),
2840
+ cause: optional(picklist(["building", "stemmer_changed", "stemmer_unknown"])),
2841
+ built_at: nullable(time)
2842
+ });
2843
+ var readFailure = { path: text, exists: literal(true), opens: literal(false), error: text };
2844
+ var rows = partial(strictObject({
2845
+ accounts: count,
2846
+ chats: count,
2847
+ messages: count,
2848
+ emails: count,
2849
+ documents: count,
2850
+ meetings: count,
2851
+ events: count,
2852
+ attachments: count,
2853
+ identities: count
2854
+ }));
2855
+ var perAccount = { chats: count, messages: count, emails: count, documents: count, meetings: count };
2856
+ var contents = {
2857
+ by_provider: optional(array(strictObject({ provider: text, accounts: count, ...perAccount }))),
2858
+ by_chat_kind: optional(array(strictObject({ provider: text, kind: text, chats: count, messages: count }))),
2859
+ /** `name` is the one `account list` shows; the messenger's own id for the account is left out. */
2860
+ by_account: optional(array(strictObject({ provider: text, account_id: count, name: nullable(text), ...perAccount }))),
2861
+ /** Calendar years in UTC. */
2862
+ by_year: optional(array(strictObject({ provider: text, year: count, messages: count }))),
2863
+ /** `type` is what the file is attached to: a message, an email, a document… `bytes` counts the sizes known. */
2864
+ by_attachment_kind: optional(array(strictObject({ type: text, kind: text, count, bytes: count })))
2865
+ };
2866
+ var storeInfo = union([
2867
+ strictObject({ ...absent.entries, schema: infoSchema }),
2868
+ strictObject({ ...readFailure, schema: strictObject({ speaks: count }) }),
2869
+ strictObject({
2870
+ path: text,
2871
+ exists: literal(true),
2872
+ bytes: strictObject({ file: count, wal: count }),
2873
+ journal_mode: text,
2874
+ /** `free` pages hold nothing; a `VACUUM` would give them back. */
2875
+ pages: strictObject({ size: count, count, free: count }),
2876
+ migrations: array(strictObject({ version: count, min_compatible: count, applied_at: time })),
2877
+ /** From the marker a backup job leaves in `backups/last.json` beside the store; null without one. */
2878
+ backup: nullable(strictObject({ at: time, file: nullable(text), checked: nullable(text) })),
2879
+ schema: infoSchema,
2880
+ clients: array(client),
2881
+ rows,
2882
+ pending_normalization: nullable(count),
2883
+ word_index: nullable(wordIndex),
2884
+ stem_index: nullable(stemIndex),
2885
+ ...contents
2886
+ })
2887
+ ]);
2888
+ var storeCheck = union([
2889
+ strictObject({ ...absent.entries, ok: literal(true) }),
2890
+ strictObject({ ...readFailure, ok: literal(false) }),
2891
+ strictObject({
2892
+ path: text,
2893
+ exists: literal(true),
2894
+ opens: literal(true),
2895
+ ok: boolean(),
2896
+ checks: strictObject({
2897
+ schema: boolean(),
2898
+ integrity: boolean(),
2899
+ foreign_keys: boolean(),
2900
+ search_indexes: boolean(),
2901
+ vector_indexes: boolean(),
2902
+ disk: boolean()
2903
+ }),
2904
+ schema,
2905
+ integrity: array(text),
2906
+ foreign_key_violations: count,
2907
+ search_indexes: record(text, text),
2908
+ disk: strictObject({ free: count, needed: count }),
2909
+ pending_normalization: nullable(count),
2910
+ word_index: nullable(wordIndex),
2911
+ stem_index: nullable(stemIndex),
2912
+ chats_behind: array(strictObject({
2913
+ provider: text,
2914
+ account: text,
2915
+ chat: text,
2916
+ title: nullable(text),
2917
+ newest: time,
2918
+ held: nullable(time),
2919
+ refreshed: time
2920
+ })),
2921
+ orphan_pointers: array(strictObject({ table: text, pointer: text, type: text, count, known: boolean() })),
2922
+ conversations: array(strictObject({
2923
+ provider: text,
2924
+ account: text,
2925
+ chat: text,
2926
+ title: nullable(text),
2927
+ built_at: nullable(time),
2928
+ rules_version: nullable(count),
2929
+ current: boolean(),
2930
+ stale_agent_links: count
2931
+ })),
2932
+ vectors: nullable(strictObject({ models: record(text, count), unused: count })),
2933
+ vector_indexes: array(strictObject({
2934
+ model: text,
2935
+ dims: count,
2936
+ ready: boolean(),
2937
+ indexed: count,
2938
+ expected: count,
2939
+ missing: count,
2940
+ extra: count
2941
+ }))
2942
+ })
2943
+ ]);
2944
+ var indexed = { normalized: count, indexed: count, terms: count, stemmed: count, notes_indexed: count };
2945
+ var storeMigration = union([
2946
+ absent,
2947
+ strictObject({ path: text, exists: literal(true), from: count, to: count, ...indexed })
2948
+ ]);
2949
+ var storeReindex = union([
2950
+ absent,
2951
+ strictObject({
2952
+ path: text,
2953
+ exists: literal(true),
2954
+ ...indexed,
2955
+ file_texts: count,
2956
+ involvements: count,
2957
+ unused_vectors_dropped: count
2958
+ })
2959
+ ]);
2960
+ var storeBackup = strictObject({
2961
+ path: text,
2962
+ from: text,
2963
+ bytes: count,
2964
+ schema: count,
2965
+ rows: strictObject({ chats: count, messages: count }),
2966
+ encrypted: optional(literal(true))
2967
+ });
2968
+ var storeDecrypt = strictObject({ path: text, from: text, bytes: count });
2969
+ var storeRestore = strictObject({
2970
+ path: text,
2971
+ restored_from: text,
2972
+ kept_at: nullable(text),
2973
+ schema: count
2974
+ });
2975
+ var storeReset = union([
2976
+ strictObject({ ...absent.entries, reset: literal(false) }),
2977
+ strictObject({
2978
+ path: text,
2979
+ exists: literal(true),
2980
+ reset: literal(false),
2981
+ dry_run: literal(true),
2982
+ files: array(text),
2983
+ bytes: count,
2984
+ schema: count,
2985
+ tables: array(strictObject({ name: text, rows: count })),
2986
+ backup_first: boolean(),
2987
+ in_use: nullable(boolean())
2988
+ }),
2989
+ strictObject({
2990
+ path: text,
2991
+ exists: literal(true),
2992
+ reset: literal(true),
2993
+ backup: nullable(text),
2994
+ backed_up: nullable(strictObject({ schema: count, rows: partial(strictObject({ chats: count, messages: count })) })),
2995
+ schema: count
2996
+ })
2997
+ ]);
2998
+ var storeRepair = union([
2999
+ absent,
3000
+ strictObject({
3001
+ path: text,
3002
+ dry_run: boolean(),
3003
+ repaired: array(strictObject({
3004
+ table: text,
3005
+ action: picklist(["created", "columns-added", "rebuilt"]),
3006
+ columns_added: optional(array(text)),
3007
+ copy: optional(text),
3008
+ rows_in_copy: optional(count),
3009
+ rows_copied: optional(count),
3010
+ only_in_copy: optional(array(text)),
3011
+ dropped_from_copy: optional(array(text))
3012
+ })),
3013
+ indexes_created: array(text),
3014
+ triggers_created: array(text),
3015
+ mismatches: array(strictObject({ table: text, what: text })),
3016
+ foreign_key_violations: array(strictObject({ table: text, rows: count })),
3017
+ copies: array(strictObject({ name: text, rows: count }))
3018
+ })
3019
+ ]);
3020
+ var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
3021
+
3022
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
3023
+ var tagTarget = variant("type", [
3024
+ strictObject({ type: literal("chat"), chat_id: id }),
3025
+ strictObject({ type: literal("contact"), person_id: id }),
3026
+ strictObject({ type: literal("message"), chat_id: id, message_id: id, locator: reference }),
3027
+ strictObject({ type: literal("task"), task_id: id })
3028
+ ]);
3029
+ var receipt = { target: tagTarget, unchanged: array(text) };
3030
+ var tagChange = union([
3031
+ strictObject({ ...receipt, added: array(text) }),
3032
+ strictObject({ ...receipt, removed: array(text) })
3033
+ ]);
3034
+ var automaticTags = strictObject({
3035
+ items: array(union([
3036
+ strictObject({
3037
+ chat_id: id,
3038
+ tags: array(strictObject({
3039
+ tag: text,
3040
+ score: number(),
3041
+ fields: array(picklist(["title", "username", "description"]))
3042
+ })),
3043
+ algorithm: text,
3044
+ fetched_at: nullable(time),
3045
+ source: picklist(["metadata", "stored-chat"])
3046
+ }),
3047
+ strictObject({ chat_id: id, error: strictObject({ code: text, message: text }) })
3048
+ ])),
3049
+ has_more: boolean(),
3050
+ dry_run: boolean()
3051
+ });
3052
+
3053
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
3054
+ var side = strictObject({ ref: reference, key: text, title: text, status: text });
3055
+ var taskPair = strictObject({
3056
+ task: nullable(side),
3057
+ source: nullable(reference),
3058
+ other: side,
3059
+ score: number(),
3060
+ band: picklist(["likely", "maybe", "different"]),
3061
+ levels: strictObject({
3062
+ text: picklist(["high", "middle", "low"]),
3063
+ person: picklist(["same", "different", "unknown"]),
3064
+ amount: picklist(["equal", "different", "missing"]),
3065
+ category: picklist(["same", "different", "unknown"]),
3066
+ due: picklist(["near", "far", "missing"]),
3067
+ reply: picklist(["yes", "no"]),
3068
+ time: picklist(["near", "weeks", "far"])
3069
+ }),
3070
+ reasons: array(text),
3071
+ decision: picklist(["review", "unsure", "merged", "rejected", "unmerged", "attached", "new"]),
3072
+ decided_at: nullable(time),
3073
+ created_at: time
3074
+ });
3075
+
3076
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/task-results.js
3077
+ var nullableTime = nullable(time);
3078
+ var link = strictObject({
3079
+ id,
3080
+ from: reference,
3081
+ to: nullable(reference),
3082
+ kind: picklist(LINK_KINDS),
3083
+ anchor: nullable(text),
3084
+ origin: picklist(LINK_SOURCES),
3085
+ target_text: nullable(text),
3086
+ role: nullable(text),
3087
+ evidence: nullable(text),
3088
+ provenance: nullable(text),
3089
+ confirmed: boolean(),
3090
+ created_at: time
3091
+ });
3092
+ var taskCard = strictObject({
3093
+ id,
3094
+ ref: reference,
3095
+ key: text,
3096
+ project: reference,
3097
+ title: text,
3098
+ description: nullable(text),
3099
+ type: picklist(TASK_TYPES),
3100
+ status: picklist(TASK_STATES),
3101
+ priority: nullable(number()),
3102
+ parent: nullable(reference),
3103
+ source: nullable(text),
3104
+ due_at: nullableTime,
3105
+ next_check_at: nullableTime,
3106
+ closed_at: nullableTime,
3107
+ reason: nullable(text),
3108
+ verdict: nullable(picklist(TASK_VERDICTS)),
3109
+ category: nullable(text),
3110
+ claimed_by: nullable(text),
3111
+ claimed_until: nullableTime,
3112
+ close_certainty: nullable(number()),
3113
+ close_suggestion: nullable(closeSuggestion),
3114
+ assignments: array(strictObject({ to: reference, role: picklist(["assignee", "reviewer", "watcher"]) })),
3115
+ created_at: time,
3116
+ updated_at: time,
3117
+ links: array(link),
3118
+ linked_from: array(link)
3119
+ });
3120
+ var taskView = strictObject({
3121
+ id,
3122
+ source: text,
3123
+ source_kind: text,
3124
+ account: text,
3125
+ group: text,
3126
+ kind: picklist(TASK_KINDS),
3127
+ state: picklist(TASK_STATES),
3128
+ reason: optional(text),
3129
+ origin: picklist(TASK_ORIGINS),
3130
+ created_at: time,
3131
+ due_at: optional(time),
3132
+ closed_at: optional(time),
3133
+ closed_by: optional(picklist(TASK_ORIGINS)),
3134
+ key: optional(text),
3135
+ category: optional(text),
3136
+ claimed_by: optional(text),
3137
+ claimed_until: optional(time),
3138
+ message: nullable(strictObject({ sender_name: nullable(text), text, timestamp: time })),
3139
+ note: optional(nullable(strictObject({ id, title: nullable(text), text, updated_at: time })))
3140
+ });
3141
+ var taskCreated = strictObject({
3142
+ ...taskView.entries,
3143
+ created: boolean(),
3144
+ attached: optional(literal(true)),
3145
+ review: optional(count),
3146
+ follow_up_of: optional(taskPair.entries.other),
3147
+ card: optional(taskCard)
3148
+ });
3149
+ var taskClosed = strictObject({
3150
+ ...taskView.entries,
3151
+ close_certainty: nullable(number()),
3152
+ close_suggestion: nullable(closeSuggestion)
3153
+ });
3154
+ var taskLinks = union([
3155
+ strictObject({ ...taskCard.entries, review: optional(count) }),
3156
+ strictObject({
3157
+ relations: array(strictObject({
3158
+ id,
3159
+ from: reference,
3160
+ to: reference,
3161
+ kind: picklist(["blocked-by", "follow-up-of", "related-to", "duplicate-of", "discovered-from"])
3162
+ }))
3163
+ })
3164
+ ]);
3165
+ var taskSimilar = strictObject({
3166
+ ref: reference,
3167
+ key: text,
3168
+ title: text,
3169
+ status: text,
3170
+ created_at: time,
3171
+ found_by: array(picklist(["text", "person", "category", "reply"])),
3172
+ score: number(),
3173
+ band: taskPair.entries.band,
3174
+ levels: taskPair.entries.levels,
3175
+ reasons: array(text),
3176
+ text: strictObject({ shared_stems: count, all_stems: count, stems: number(), trigrams: number() })
3177
+ });
3178
+ var taskMerge = strictObject({ pair: taskPair, linked: count, review: count, task: taskCard });
3179
+ var taskUnmerge = strictObject({ pair: taskPair, task: taskCard });
3180
+ var taskCategories = strictObject({
3181
+ categories: array(strictObject({
3182
+ name: text,
3183
+ meaning: text,
3184
+ triggers: strictObject({ en: array(text), ru: array(text), es: array(text) })
3185
+ })),
3186
+ unlisted: array(strictObject({ name: text, open: count, total: count })),
3187
+ file: nullable(text)
3188
+ });
3189
+ var taskScan = strictObject({
3190
+ chat: text,
3191
+ messages: count,
3192
+ added: count,
3193
+ closed: count,
3194
+ review: count,
3195
+ held: optional(count),
3196
+ held_chats: optional(count),
3197
+ tasks: array(strictObject({ source: text, kind: picklist(TASK_KINDS), category: nullable(text) }))
3198
+ });
3199
+
3200
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/topic.js
3201
+ var topic = strictObject({
3202
+ id,
3203
+ title: text,
3204
+ closed: boolean(),
3205
+ pinned: boolean(),
3206
+ /** The General topic only, where the messenger says. */
3207
+ hidden: optional(boolean()),
3208
+ unread_count: nullable(count),
3209
+ last_message_at: nullable(time),
3210
+ created_at: nullable(time),
3211
+ untrusted
3212
+ });
3213
+
3214
+ // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/index.js
3215
+ var ENTITIES = {
3216
+ sync_progress: progress,
3217
+ ...MEETING_RESULT_ENTITIES,
3218
+ message,
3219
+ message_context: messageContext,
3220
+ message_download: messageDownload,
3221
+ message_sync: messageSync,
3222
+ "message.hit": strictObject({
3223
+ ...pick(message, [
3224
+ "ref",
3225
+ "chat_title",
3226
+ "timestamp",
3227
+ "sender_name",
3228
+ "excerpt",
3229
+ "matched_in",
3230
+ "score",
3231
+ "match",
3232
+ "corrections",
3233
+ "found_in",
3234
+ "discovery",
3235
+ "context",
3236
+ "email"
3237
+ ]).entries,
3238
+ untrusted
3239
+ }),
3240
+ "message.summary": pick(message, [
3241
+ "ref",
3242
+ "chat_id",
3243
+ "chat_title",
3244
+ "timestamp",
3245
+ "sender_name",
3246
+ "outgoing",
3247
+ "text",
3248
+ "transcript",
3249
+ "attachments"
3250
+ ]),
3251
+ message_link: messageLink,
3252
+ message_write: messageWrite,
3253
+ message_send: messageSend,
3254
+ message_pin: messagePin,
3255
+ message_star: messageStar,
3256
+ message_deletion: messageDeletion,
3257
+ message_transcript: messageTranscript,
3258
+ message_links: messageLinks,
3259
+ evidence_packet: evidencePacket,
3260
+ chat_metadata: cachedChatMetadata,
3261
+ chat_metadata_refresh: chatMetadataRefresh,
3262
+ chat,
3263
+ mention,
3264
+ "mention.details": mentionDetails,
3265
+ mention_domain: mentionDomain,
3266
+ mention_decision: mentionDecision,
3267
+ mention_rebuild: mentionRebuild,
3268
+ place,
3269
+ person: person2,
3270
+ identity,
3271
+ contact_context: contactContext,
3272
+ contact_preparation: contactPreparation,
3273
+ contact_activity: contactActivity,
3274
+ contact_check: contactCheck,
3275
+ linked_person: linkedPerson,
3276
+ contact,
3277
+ contact_note: contactNote,
3278
+ contact_lookup: contactLookup,
3279
+ contact_profile: contactProfile,
3280
+ contact_sync: contactSync,
3281
+ contact_update: contactUpdate,
3282
+ contact_state_change: contactStateChange,
3283
+ contact_import: contactImport,
3284
+ contact_alias: contactAlias,
3285
+ contact_note_removal: contactNoteRemoval,
3286
+ account,
3287
+ account_session: accountSession,
3288
+ account_change: accountChange,
3289
+ ended_account_sessions: endedAccountSessions,
3290
+ account_privacy: accountPrivacy,
3291
+ account_privacy_change: accountPrivacyChange,
3292
+ account_profile: accountProfile,
3293
+ organization,
3294
+ project,
3295
+ reminder,
3296
+ bot_profile: botProfile,
3297
+ bot_template: botTemplate,
3298
+ bot_seen_chat: botSeenChat,
3299
+ bot_admin: botAdmin,
3300
+ bot_menu_entry: botMenuEntry,
3301
+ bot_webhook: botWebhook,
3302
+ scheduled_job: scheduledJob,
3303
+ call_record: callRecord,
3304
+ sticker_inventory: stickerInventory,
3305
+ note,
3306
+ "note.hit": strictObject({
3307
+ ...pick(note, [
3308
+ "kind",
3309
+ "provider",
3310
+ "account",
3311
+ "url",
3312
+ "ref",
3313
+ "source",
3314
+ "folder_id",
3315
+ "path",
3316
+ "title",
3317
+ "updated_at",
3318
+ "excerpt",
3319
+ "found_by",
3320
+ "links"
3321
+ ]).entries,
3322
+ untrusted
3323
+ }),
3324
+ hit,
3325
+ document,
3326
+ document_link: documentLink,
3327
+ image_embedding: imageEmbedding,
3328
+ attachment,
3329
+ attachment_bytes: attachmentBytes,
3330
+ attachment_extraction: attachmentExtraction,
3331
+ attachment_text_change: attachmentTextChange,
3332
+ media_archive: mediaArchive,
3333
+ media_archive_check: mediaArchiveCheck,
3334
+ media_archive_move: mediaArchiveMove,
3335
+ media_archive_timer: mediaArchiveTimer,
3336
+ task,
3337
+ task_pair: taskPair,
3338
+ task_card: taskCard,
3339
+ task_created: taskCreated,
3340
+ task_closed: taskClosed,
3341
+ task_links: taskLinks,
3342
+ task_similar: taskSimilar,
3343
+ task_merge: taskMerge,
3344
+ task_unmerge: taskUnmerge,
3345
+ task_categories: taskCategories,
3346
+ task_scan: taskScan,
3347
+ fact,
3348
+ memory,
3349
+ meeting,
3350
+ meeting_details: meetingDetails,
3351
+ meeting_hit: meetingHit,
3352
+ meeting_series_inventory: meetingSeriesInventory,
3353
+ meeting_project_candidates: meetingProjectCandidates,
3354
+ meeting_project_evidence: meetingProjectEvidence,
3355
+ meeting_preparation: meetingPreparation,
3356
+ meeting_findings: meetingFindings,
3357
+ meeting_transcript: meetingTranscript,
3358
+ meeting_summary: meetingSummary,
3359
+ meeting_evidence: meetingEvidence,
3360
+ meeting_person_context: meetingPersonContext,
3361
+ event,
3362
+ meeting_review: meetingReview,
3363
+ meeting_link: meetingLink,
3364
+ meeting_stats: meetingStats,
3365
+ meeting_speaker: meetingSpeaker,
3366
+ meeting_participants: meetingParticipants,
3367
+ meeting_passage: meetingPassage,
3368
+ meeting_task_proposal: meetingTaskProposal,
3369
+ reference,
3370
+ relationship,
3371
+ recipient,
3372
+ recipient_change: recipientChange,
3373
+ "recipient_change.added": recipientAdded,
3374
+ "recipient_change.removed": recipientRemoved,
3375
+ "recipient_change.off": recipientOff,
3376
+ run: recordedRun,
3377
+ "run.details": runDetails,
3378
+ "run.hit": runHit,
3379
+ run_location: runLocation,
3380
+ tag_change: tagChange,
3381
+ automatic_tags: automaticTags,
3382
+ send_attempt: sendAttempt,
3383
+ tagging,
3384
+ "conversation.details": conversationDetails,
3385
+ conversation_build: conversationBuildResult,
3386
+ conversation_batch_status: conversationBatchStatus,
3387
+ conversation_batch: conversationBatch,
3388
+ conversation_change: conversationChange,
3389
+ conversation_readiness: conversationReadiness,
3390
+ conversation_embedding: conversationEmbedding,
3391
+ conversation_embedding_status: conversationEmbeddingStatus,
3392
+ conversation_preparation: conversationPreparation,
3393
+ conversation_hit: conversationHit,
3394
+ conversation,
3395
+ saved_search: savedSearch,
3396
+ search_history_clear: searchHistoryClear,
3397
+ watch_item: watchItem,
3398
+ serve_summary: serveSummary,
3399
+ job,
3400
+ store_chat_status: storeChatStatus,
3401
+ store_clear: storeClear,
3402
+ store_export: storeExport,
3403
+ store_gap_plan: storeGapPlan,
3404
+ store_gap_repair: storeGapRepair,
3405
+ store_job_details: storeJobDetails,
3406
+ store_job_cancel: storeJobCancel,
3407
+ store_job_retry: storeJobRetry,
3408
+ store_job_clear: storeJobClear,
3409
+ store_info: storeInfo,
3410
+ store_check: storeCheck,
3411
+ store_migration: storeMigration,
3412
+ store_reindex: storeReindex,
3413
+ store_backup: storeBackup,
3414
+ store_decrypt: storeDecrypt,
3415
+ store_restore: storeRestore,
3416
+ store_reset: storeReset,
3417
+ store_repair: storeRepair,
3418
+ store_copy_removal: storeCopyRemoval,
3419
+ store_table: storeTable,
3420
+ agenda,
3421
+ model,
3422
+ chat_group_change: chatGroupChange,
3423
+ chat_inspection: chatInspection,
3424
+ chat_sender: chatSender,
3425
+ chat_read: chatRead,
3426
+ chat_members_fetch: chatMembersFetch,
3427
+ chat_members_change: chatMembersChange,
3428
+ chat_invite: chatInvite,
3429
+ chat_invite_change: chatInviteChange,
3430
+ chat_request_change: chatRequestChange,
3431
+ chat_admin_change: chatAdminChange,
3432
+ chat_folder_change: chatFolderChange,
3433
+ chat_folder_removal: chatFolderRemoval,
3434
+ chat_folder_order: chatFolderOrder,
3435
+ chat_rules: chatRules,
3436
+ chat_moderation: chatModeration,
3437
+ model_key: modelKey,
3438
+ "model_key.stored": storedModelKey,
3439
+ "model_key.removed": removedModelKey,
3440
+ chat_event: chatEvent,
3441
+ chat_removal: chatRemoval,
3442
+ chat_muting: chatMuting,
3443
+ chat_archive: chatArchive,
3444
+ chat_pin: chatPin,
3445
+ chat_unread: chatUnread,
3446
+ invite_link: inviteLink,
3447
+ join_request: joinRequest,
3448
+ member,
3449
+ poll,
3450
+ poll_change: pollChange,
3451
+ poll_vote: pollVote,
3452
+ reaction_change: reactionChange,
3453
+ topic,
3454
+ folder,
3455
+ message_counts: messageCounts,
3456
+ ranking,
3457
+ admin_report: adminReport,
3458
+ analysis_consent: analysisConsent,
3459
+ analysis_consent_revocation: analysisConsentRevocation,
3460
+ retention,
3461
+ evidence,
3462
+ counters,
3463
+ counter_refresh: counterRefresh,
3464
+ official_stats: officialStats,
3465
+ chart,
3466
+ chat_stats: chatStats,
3467
+ tracked_chat: trackedChat,
3468
+ tracked_chat_history: trackedChatHistory,
3469
+ chat_tracking: chatTracking,
3470
+ task_stats: taskStats
3471
+ };
3472
+ var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.entries(ENTITIES).map(([name, schema2]) => {
3473
+ const { $schema: _, ...definition } = jsonSchemaOf(schema2);
3474
+ return [name, definition];
3475
+ })), "entityDefinitions");
3476
+
3477
+ export {
3478
+ accountSession,
3479
+ accountProfile,
3480
+ analysisConsent,
3481
+ member,
3482
+ chat,
3483
+ folder,
3484
+ inviteLink,
3485
+ chatEvent,
3486
+ contact,
3487
+ message,
3488
+ contactNote,
3489
+ documentLink,
3490
+ spawnDetached,
3491
+ jobsDir,
3492
+ saveJob,
3493
+ readJob,
3494
+ tracedJob,
3495
+ jobStarted,
3496
+ finishJob,
3497
+ updateJob,
3498
+ removeJob,
3499
+ listJobs,
3500
+ jobDetails,
3501
+ jobItem,
3502
+ stateOf,
3503
+ startArchiveJob,
3504
+ job,
3505
+ joinRequest,
3506
+ botProfile,
3507
+ botSeenChat,
3508
+ botAdmin,
3509
+ botMenuEntry,
3510
+ botWebhook,
3511
+ scheduledJob,
3512
+ callRecord,
3513
+ stickerInventory,
3514
+ pollVote,
3515
+ meetingPreparation,
3516
+ meetingProjectCandidates,
3517
+ meetingSeriesInventory,
3518
+ model,
3519
+ recipient,
3520
+ recordedRun,
3521
+ savedSearch,
3522
+ sendAttempt,
3523
+ topic,
3524
+ ENTITIES,
3525
+ entityDefinitions
3526
+ };