@wirecat/mail-cli 0.0.0-stage → 0.1.0

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