@wirecat/drive-cli 0.44.0 → 0.45.1

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