@wirecat/cli-template 0.13.2 → 0.14.0

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