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