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