@wirecat/cli-core 0.399.0 → 0.401.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.
- package/CHANGELOG.md +111 -0
- package/README.md +1 -1
- package/dist/analysis/consents.d.ts +11 -6
- package/dist/analysis/consents.js +5 -2
- package/dist/cli/bot/mcp.js +2 -1
- package/dist/cli/bot/store.js +1 -1
- package/dist/cli/config-command.js +20 -1
- package/dist/cli/context.d.ts +2 -0
- package/dist/cli/context.js +1 -1
- package/dist/cli/effects.d.ts +4 -1
- package/dist/cli/effects.js +10 -2
- package/dist/cli/index.d.ts +3 -2
- package/dist/cli/index.js +3 -2
- package/dist/cli/json-fields.js +12 -1
- package/dist/cli/meeting-evidence-answer.d.ts +46 -0
- package/dist/cli/meeting-evidence-answer.js +22 -0
- package/dist/cli/meeting-preparation-answer.js +1 -13
- package/dist/cli/messenger/account-command.js +15 -6
- package/dist/cli/messenger/account-profile-query.d.ts +2 -0
- package/dist/cli/messenger/account-profile-query.js +13 -0
- package/dist/cli/messenger/account-sessions-command.js +1 -2
- package/dist/cli/messenger/admin-commands.js +12 -12
- package/dist/cli/messenger/admin-contacts-command.js +6 -3
- package/dist/cli/messenger/admin-folders-command.js +5 -5
- package/dist/cli/messenger/admin-moderation-command.js +4 -4
- package/dist/cli/messenger/admin-statistics-command.js +6 -14
- package/dist/cli/messenger/analysis-consents-query.d.ts +5 -0
- package/dist/cli/messenger/analysis-consents-query.js +20 -0
- package/dist/cli/messenger/archive-commands.js +3 -3
- package/dist/cli/messenger/attachments-command.js +3 -0
- package/dist/cli/messenger/backfill-command.js +5 -4
- package/dist/cli/messenger/chat-queries.d.ts +1 -0
- package/dist/cli/messenger/chat-queries.js +12 -2
- package/dist/cli/messenger/chats-command.js +2 -2
- package/dist/cli/messenger/chats-documents-command.js +7 -5
- package/dist/cli/messenger/chats-members-command.js +7 -3
- package/dist/cli/messenger/chats-read-command.js +1 -1
- package/dist/cli/messenger/chats-tracking-command.js +14 -6
- package/dist/cli/messenger/contacts-command.js +9 -5
- package/dist/cli/messenger/conversations-command.js +20 -16
- package/dist/cli/messenger/doctor-command.js +4 -1
- package/dist/cli/messenger/document-links-query.d.ts +2 -0
- package/dist/cli/messenger/document-links-query.js +9 -0
- package/dist/cli/messenger/download-command.js +1 -0
- package/dist/cli/messenger/flood-command.d.ts +2 -2
- package/dist/cli/messenger/flood-command.js +3 -3
- package/dist/cli/messenger/gaps-command.js +2 -2
- package/dist/cli/messenger/guard-commands.js +35 -13
- package/dist/cli/messenger/images-command.js +1 -0
- package/dist/cli/messenger/media-archive-command.js +2 -0
- package/dist/cli/messenger/media-archive-move-command.js +1 -0
- package/dist/cli/messenger/media-archive-timer-command.js +1 -1
- package/dist/cli/messenger/mentions-command.js +15 -2
- package/dist/cli/messenger/message-writes.d.ts +192 -2
- package/dist/cli/messenger/message-writes.js +6 -2
- package/dist/cli/messenger/messages-command.js +2 -0
- package/dist/cli/messenger/messages-delete-command.js +1 -0
- package/dist/cli/messenger/messages-edit-command.js +1 -0
- package/dist/cli/messenger/messages-evidence-command.js +3 -1
- package/dist/cli/messenger/messages-forward-command.js +1 -0
- package/dist/cli/messenger/messages-pin-command.js +3 -0
- package/dist/cli/messenger/messages-send-command.js +10 -6
- package/dist/cli/messenger/metadata-command.js +6 -1
- package/dist/cli/messenger/models-command.js +10 -5
- package/dist/cli/messenger/polls-command.js +4 -0
- package/dist/cli/messenger/private-people-command.js +3 -3
- package/dist/cli/messenger/rankings-command.js +6 -11
- package/dist/cli/messenger/reactions-command.js +2 -0
- package/dist/cli/messenger/recipients-query.d.ts +5 -0
- package/dist/cli/messenger/recipients-query.js +18 -0
- package/dist/cli/messenger/records-command.js +13 -8
- package/dist/cli/messenger/review.js +1 -1
- package/dist/cli/messenger/schedule-command.js +2 -2
- package/dist/cli/messenger/search-answers.js +2 -0
- package/dist/cli/messenger/search-command.js +3 -1
- package/dist/cli/messenger/searches-command.js +5 -1
- package/dist/cli/messenger/sends-query.d.ts +5 -0
- package/dist/cli/messenger/sends-query.js +33 -0
- package/dist/cli/messenger/serve-command.js +1 -0
- package/dist/cli/messenger/server-command.js +0 -3
- package/dist/cli/messenger/statistics-query.d.ts +14 -0
- package/dist/cli/messenger/statistics-query.js +143 -0
- package/dist/cli/messenger/stats-command.js +5 -5
- package/dist/cli/messenger/store-maintenance-command.js +10 -10
- package/dist/cli/messenger/stored.js +4 -1
- package/dist/cli/messenger/tags-command.js +7 -1
- package/dist/cli/messenger/tasks-command.js +57 -14
- package/dist/cli/messenger/transcribe-command.js +1 -0
- package/dist/cli/messenger/watch-answers.d.ts +6 -0
- package/dist/cli/messenger/watch-answers.js +69 -0
- package/dist/cli/messenger/watch-command.d.ts +1 -1
- package/dist/cli/messenger/watch-command.js +56 -7
- package/dist/cli/program.js +5 -1
- package/dist/cli/runs/command.js +25 -38
- package/dist/cli/runs/query.d.ts +5 -0
- package/dist/cli/runs/query.js +32 -0
- package/dist/cli/runs/search-command.d.ts +4 -0
- package/dist/cli/runs/search-command.js +27 -0
- package/dist/cli/runs/search-query.d.ts +4 -0
- package/dist/cli/runs/search-query.js +50 -0
- package/dist/cli/runs/search.d.ts +2 -1
- package/dist/cli/runs/search.js +6 -6
- package/dist/documents/index.d.ts +1 -0
- package/dist/documents/index.js +1 -0
- package/dist/domain/attachments.js +9 -1
- package/dist/domain/rankings-options.js +3 -3
- package/dist/entities/account-change.d.ts +89 -0
- package/dist/entities/account-change.js +20 -0
- package/dist/entities/account-profile.d.ts +7 -0
- package/dist/entities/account-profile.js +8 -0
- package/dist/entities/analysis-consent.d.ts +9 -0
- package/dist/entities/analysis-consent.js +4 -0
- package/dist/entities/attachment-results.d.ts +96 -0
- package/dist/entities/attachment-results.js +31 -0
- package/dist/entities/batch-result.d.ts +27 -0
- package/dist/entities/batch-result.js +18 -0
- package/dist/entities/chat-admin.d.ts +234 -0
- package/dist/entities/chat-admin.js +84 -0
- package/dist/entities/chat-change.d.ts +25 -0
- package/dist/entities/chat-change.js +11 -0
- package/dist/entities/chat-metadata.d.ts +34 -0
- package/dist/entities/chat-metadata.js +15 -0
- package/dist/entities/chat-moderation.d.ts +44 -0
- package/dist/entities/chat-moderation.js +37 -0
- package/dist/entities/chat-tracking.d.ts +26 -0
- package/dist/entities/chat-tracking.js +23 -0
- package/dist/entities/contact-activity.d.ts +52 -0
- package/dist/entities/contact-activity.js +42 -0
- package/dist/entities/contact-context.d.ts +1568 -0
- package/dist/entities/contact-context.js +191 -0
- package/dist/entities/contact-write.d.ts +22 -0
- package/dist/entities/contact-write.js +6 -0
- package/dist/entities/conversation-preparation.d.ts +63 -0
- package/dist/entities/conversation-preparation.js +23 -0
- package/dist/entities/conversation-results.d.ts +567 -0
- package/dist/entities/conversation-results.js +94 -0
- package/dist/entities/document-link.d.ts +13 -0
- package/dist/entities/document-link.js +11 -0
- package/dist/entities/extraction-report.d.ts +95 -0
- package/dist/entities/extraction-report.js +34 -0
- package/dist/entities/hit.d.ts +4 -0
- package/dist/entities/hit.js +4 -0
- package/dist/entities/image-embedding.d.ts +9 -0
- package/dist/entities/image-embedding.js +10 -0
- package/dist/entities/index.d.ts +8284 -1921
- package/dist/entities/index.js +178 -3
- package/dist/entities/listener.d.ts +2150 -0
- package/dist/entities/listener.js +46 -0
- package/dist/entities/media-archive.d.ts +43 -0
- package/dist/entities/media-archive.js +32 -0
- package/dist/entities/meeting-evidence.d.ts +86 -0
- package/dist/entities/meeting-evidence.js +25 -0
- package/dist/entities/meeting-preparation-parts.d.ts +14 -0
- package/dist/entities/meeting-preparation-parts.js +15 -13
- package/dist/entities/meeting-task-proposal.d.ts +14 -0
- package/dist/entities/meeting-task-proposal.js +19 -0
- package/dist/entities/meeting.d.ts +1 -1
- package/dist/entities/meeting.js +1 -1
- package/dist/entities/mention.d.ts +63 -0
- package/dist/entities/mention.js +44 -0
- package/dist/entities/message-change.d.ts +19 -0
- package/dist/entities/message-change.js +6 -0
- package/dist/entities/message-context.d.ts +617 -0
- package/dist/entities/message-context.js +20 -0
- package/dist/entities/message-read.d.ts +73 -0
- package/dist/entities/message-read.js +58 -0
- package/dist/entities/message-transfer.d.ts +379 -0
- package/dist/entities/message-transfer.js +83 -0
- package/dist/entities/message-write.d.ts +378 -0
- package/dist/entities/message-write.js +10 -0
- package/dist/entities/model-key.d.ts +14 -0
- package/dist/entities/model-key.js +10 -0
- package/dist/entities/poll.d.ts +40 -0
- package/dist/entities/poll.js +16 -0
- package/dist/entities/private-contact.d.ts +10 -0
- package/dist/entities/private-contact.js +4 -0
- package/dist/entities/reaction-change.d.ts +7 -0
- package/dist/entities/reaction-change.js +8 -0
- package/dist/entities/recipient.d.ts +29 -0
- package/dist/entities/recipient.js +11 -0
- package/dist/entities/recorded-run.d.ts +103 -0
- package/dist/entities/recorded-run.js +44 -0
- package/dist/entities/saved-search.d.ts +4 -0
- package/dist/entities/saved-search.js +2 -0
- package/dist/entities/send-attempt.d.ts +31 -0
- package/dist/entities/send-attempt.js +29 -0
- package/dist/entities/store-maintenance.d.ts +319 -0
- package/dist/entities/store-maintenance.js +145 -0
- package/dist/entities/store-records.d.ts +442 -0
- package/dist/entities/store-records.js +99 -0
- package/dist/entities/tag-change.d.ts +74 -0
- package/dist/entities/tag-change.js +31 -0
- package/dist/entities/task-pair.d.ts +31 -0
- package/dist/entities/task-pair.js +23 -0
- package/dist/entities/task-results.d.ts +524 -0
- package/dist/entities/task-results.js +142 -0
- package/dist/errors/reasons.js +3 -0
- package/dist/mcp/agent.d.ts +3 -1
- package/dist/mcp/agent.js +17 -10
- package/dist/mcp/bot/server.d.ts +2 -0
- package/dist/mcp/bot/server.js +1 -0
- package/dist/mcp/server.js +3 -1
- package/dist/mcp/tools/attachments.js +1 -0
- package/dist/meetings/cli/index.js +4 -2
- package/dist/meetings/cli/passage.js +1 -0
- package/dist/meetings/index.d.ts +2 -1
- package/dist/meetings/index.js +1 -0
- package/dist/meetings/links.d.ts +16 -0
- package/dist/meetings/read-answers.d.ts +185 -0
- package/dist/meetings/read-answers.js +213 -0
- package/dist/ports/messenger.d.ts +10 -1
- package/dist/runs/run.d.ts +10 -2
- package/dist/runs/run.js +11 -3
- package/dist/sends/guard.d.ts +1 -1
- package/dist/sends/guard.js +9 -5
- package/dist/sends/journal.d.ts +9 -2
- package/dist/sends/journal.js +9 -2
- package/dist/sends/permissions.d.ts +5 -1
- package/dist/sends/permissions.js +42 -2
- package/dist/sends/recipients.d.ts +8 -0
- package/dist/sends/recipients.js +9 -0
- package/dist/sends/upload.d.ts +4 -4
- package/dist/sends/upload.js +24 -20
- package/dist/services/admin-statistics.js +3 -3
- package/dist/services/chat-documents.d.ts +1 -0
- package/dist/services/chat-documents.js +9 -3
- package/dist/services/chats.d.ts +1 -1
- package/dist/services/chats.js +5 -2
- package/dist/services/documents/mirrors.d.ts +98 -0
- package/dist/services/documents/mirrors.js +144 -0
- package/dist/services/meeting-links.d.ts +2 -17
- package/dist/services/messages.js +1 -0
- package/dist/services/search-all-meetings.js +21 -8
- package/dist/services/task-rules.d.ts +1 -1
- package/dist/services/tasks.d.ts +2 -2
- package/dist/services/tasks.js +1 -1
- package/dist/store/exports.d.ts +1 -1
- package/dist/store/exports.js +1 -1
- package/dist/store/messages.d.ts +3 -1
- package/dist/store/messages.js +2 -2
- package/dist/store/roster.d.ts +4 -1
- package/dist/store/roster.js +2 -2
- package/dist/store/sqlite/chats.d.ts +12 -0
- package/dist/store/sqlite/chats.js +1 -0
- package/dist/store/sqlite/document-links.d.ts +1 -1
- package/dist/store/sqlite/document-links.js +5 -5
- package/dist/store/sqlite/drizzle/bun.js +3 -3
- package/dist/store/sqlite/drizzle/bun.js.map +1 -1
- package/dist/store/sqlite/drizzle/core.js +2 -2
- package/dist/store/sqlite/drizzle/core.js.map +1 -1
- package/dist/store/sqlite/drizzle/node.js +3 -3
- package/dist/store/sqlite/drizzle/node.js.map +1 -1
- package/dist/store/sqlite/drizzle/{shared-O7CTKP45.js → shared-HKXF6HKX.js} +57 -57
- package/dist/store/sqlite/drizzle/{shared-O7CTKP45.js.map → shared-HKXF6HKX.js.map} +1 -1
- package/dist/store/sqlite/involvements.js +2 -1
- package/dist/store/sqlite/roster.d.ts +2 -1
- package/dist/store/sqlite/roster.js +3 -2
- package/package.json +2 -2
- package/parity.json +14 -69
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
import { chat } from "./chat.js";
|
|
3
|
+
import { linkedPerson } from "./contact-activity.js";
|
|
4
|
+
import { count, id, reference, text, time } from "./fields.js";
|
|
5
|
+
import { message } from "./message.js";
|
|
6
|
+
const contextPerson = v.strictObject({ ...linkedPerson.entries, provider: text, id });
|
|
7
|
+
const contextMessage = v.strictObject({
|
|
8
|
+
locator: reference,
|
|
9
|
+
provider: text,
|
|
10
|
+
account: id,
|
|
11
|
+
chat_id: id,
|
|
12
|
+
chat_title: v.nullable(text),
|
|
13
|
+
id,
|
|
14
|
+
timestamp: time,
|
|
15
|
+
sender_id: v.nullable(id),
|
|
16
|
+
sender_name: v.nullable(text),
|
|
17
|
+
outgoing: v.nullable(v.boolean()),
|
|
18
|
+
text,
|
|
19
|
+
});
|
|
20
|
+
const sharedChat = v.strictObject({
|
|
21
|
+
provider: text,
|
|
22
|
+
account: id,
|
|
23
|
+
chat_id: id,
|
|
24
|
+
title: v.nullable(text),
|
|
25
|
+
kind: chat.entries.kind,
|
|
26
|
+
last_message_at: v.nullable(time),
|
|
27
|
+
});
|
|
28
|
+
const context = v.strictObject({
|
|
29
|
+
person: contextPerson,
|
|
30
|
+
shared: v.array(sharedChat),
|
|
31
|
+
last: v.strictObject({
|
|
32
|
+
from_them: v.nullable(contextMessage),
|
|
33
|
+
from_me: v.nullable(contextMessage),
|
|
34
|
+
from_them_anywhere: v.nullable(contextMessage),
|
|
35
|
+
}),
|
|
36
|
+
recent: v.strictObject({ direct: v.array(contextMessage), groups: v.array(contextMessage) }),
|
|
37
|
+
mentions: v.array(contextMessage),
|
|
38
|
+
limits: v.strictObject({ messages: count, bytes: count }),
|
|
39
|
+
complete: v.boolean(),
|
|
40
|
+
not_read: v.array(v.strictObject({
|
|
41
|
+
provider: text,
|
|
42
|
+
account: id,
|
|
43
|
+
chat_id: id,
|
|
44
|
+
title: v.nullable(text),
|
|
45
|
+
reason: v.picklist(["not_fetched", "partial"]),
|
|
46
|
+
})),
|
|
47
|
+
});
|
|
48
|
+
const shortMessage = v.strictObject({ at: time, text, transcript: v.optional(text) });
|
|
49
|
+
const identifiedMessage = v.strictObject({
|
|
50
|
+
...shortMessage.entries,
|
|
51
|
+
id,
|
|
52
|
+
locator: reference,
|
|
53
|
+
sender_id: v.nullable(id),
|
|
54
|
+
reply_to: v.nullable(id),
|
|
55
|
+
});
|
|
56
|
+
const counterObservation = v.strictObject({
|
|
57
|
+
value: v.number(),
|
|
58
|
+
observed_at: time,
|
|
59
|
+
source: v.picklist(["remote_fetch", "remote_update"]),
|
|
60
|
+
reactions: v.optional(message.entries.reactions.wrapped.wrapped),
|
|
61
|
+
});
|
|
62
|
+
const { reply_addresses: mailReplyTo, ...mailFields } = message.entries.email.wrapped.entries;
|
|
63
|
+
const fullMessage = v.strictObject({
|
|
64
|
+
...v.pick(message, [
|
|
65
|
+
"id",
|
|
66
|
+
"chat_id",
|
|
67
|
+
"chat_title",
|
|
68
|
+
"excerpt",
|
|
69
|
+
"sender_id",
|
|
70
|
+
"sender_name",
|
|
71
|
+
"sender_username",
|
|
72
|
+
"mentions",
|
|
73
|
+
"sender_is_chat",
|
|
74
|
+
"timestamp",
|
|
75
|
+
"edited_at",
|
|
76
|
+
"text",
|
|
77
|
+
"outgoing",
|
|
78
|
+
"attachments",
|
|
79
|
+
"reply_to",
|
|
80
|
+
"reply_to_id",
|
|
81
|
+
"forwarded_from",
|
|
82
|
+
"thread_id",
|
|
83
|
+
"thread_root_id",
|
|
84
|
+
"scheduled_for",
|
|
85
|
+
"provider_metadata",
|
|
86
|
+
"delivery",
|
|
87
|
+
]).entries,
|
|
88
|
+
reactions: v.nullable(message.entries.reactions.wrapped.wrapped),
|
|
89
|
+
starred: v.optional(v.boolean()),
|
|
90
|
+
email: v.optional(v.strictObject({ ...mailFields, reply_to: mailReplyTo })),
|
|
91
|
+
counter_observations: v.optional(v.partial(v.strictObject({
|
|
92
|
+
views: counterObservation,
|
|
93
|
+
reactions: counterObservation,
|
|
94
|
+
comments: counterObservation,
|
|
95
|
+
}))),
|
|
96
|
+
...shortMessage.entries,
|
|
97
|
+
locator: reference,
|
|
98
|
+
});
|
|
99
|
+
export const contactMessages = v.strictObject({
|
|
100
|
+
person: v.strictObject({ uid: id, provider: text, id, name: v.nullable(text) }),
|
|
101
|
+
chats: v.array(v.strictObject({
|
|
102
|
+
chat: v.pick(chat, ["id", "title", "kind"]),
|
|
103
|
+
messages: v.array(v.union([shortMessage, identifiedMessage, fullMessage])),
|
|
104
|
+
complete: v.boolean(),
|
|
105
|
+
more: v.boolean(),
|
|
106
|
+
})),
|
|
107
|
+
limits: v.strictObject({ messages: count }),
|
|
108
|
+
});
|
|
109
|
+
/** --chat returns selected message windows; without it the result is the cross-account context. */
|
|
110
|
+
export const contactContext = v.union([context, contactMessages]);
|
|
111
|
+
const coverage = v.strictObject({
|
|
112
|
+
included: count,
|
|
113
|
+
has_more: v.boolean(),
|
|
114
|
+
cut_by: v.nullable(v.picklist(["limit", "bytes"])),
|
|
115
|
+
});
|
|
116
|
+
const meetingCue = v.strictObject({
|
|
117
|
+
reference,
|
|
118
|
+
fingerprint: text,
|
|
119
|
+
transcript_id: count,
|
|
120
|
+
content_hash: v.nullable(text),
|
|
121
|
+
position: count,
|
|
122
|
+
start_ms: count,
|
|
123
|
+
end_ms: count,
|
|
124
|
+
speaker_participant_id: v.nullable(count),
|
|
125
|
+
speaker_name: v.nullable(text),
|
|
126
|
+
text,
|
|
127
|
+
revision: v.picklist(["current", "superseded"]),
|
|
128
|
+
});
|
|
129
|
+
export const contactPreparation = v.strictObject({
|
|
130
|
+
...context.entries,
|
|
131
|
+
prepare: v.strictObject({
|
|
132
|
+
waiting: v.array(v.strictObject({
|
|
133
|
+
provider: text,
|
|
134
|
+
account: id,
|
|
135
|
+
chat_id: id,
|
|
136
|
+
title: v.nullable(text),
|
|
137
|
+
message: contextMessage,
|
|
138
|
+
partial: v.boolean(),
|
|
139
|
+
})),
|
|
140
|
+
tasks: v.array(v.strictObject({
|
|
141
|
+
ref: reference,
|
|
142
|
+
title: text,
|
|
143
|
+
role: text,
|
|
144
|
+
due_at: v.nullable(time),
|
|
145
|
+
project: reference,
|
|
146
|
+
source: v.nullable(reference),
|
|
147
|
+
created_at: time,
|
|
148
|
+
})),
|
|
149
|
+
facts: v.array(v.strictObject({
|
|
150
|
+
ref: reference,
|
|
151
|
+
type: text,
|
|
152
|
+
statement: text,
|
|
153
|
+
subject: v.nullable(reference),
|
|
154
|
+
project: v.nullable(reference),
|
|
155
|
+
updated_at: time,
|
|
156
|
+
})),
|
|
157
|
+
notes: v.array(v.strictObject({ ref: reference, title: v.nullable(text), text, revision: count, updated_at: time })),
|
|
158
|
+
meetings: v.array(v.strictObject({
|
|
159
|
+
reference,
|
|
160
|
+
cues: v.array(meetingCue),
|
|
161
|
+
cue_coverage: v.strictObject({ included: count, omitted: v.nullable(count), has_more: v.boolean() }),
|
|
162
|
+
})),
|
|
163
|
+
limits: v.strictObject({ items: count, bytes: count }),
|
|
164
|
+
coverage: v.strictObject({
|
|
165
|
+
waiting: v.strictObject({
|
|
166
|
+
...coverage.entries,
|
|
167
|
+
rule: v.literal("their message is the newest the store holds in a one-to-one chat"),
|
|
168
|
+
}),
|
|
169
|
+
tasks: v.strictObject({
|
|
170
|
+
...coverage.entries,
|
|
171
|
+
selection: v.literal("open, assigned to them in any role"),
|
|
172
|
+
accounts: v.array(text),
|
|
173
|
+
}),
|
|
174
|
+
facts: v.strictObject({
|
|
175
|
+
...coverage.entries,
|
|
176
|
+
selection: v.literal("accepted, about them or a project they are a member of"),
|
|
177
|
+
}),
|
|
178
|
+
notes: v.strictObject({
|
|
179
|
+
...coverage.entries,
|
|
180
|
+
selection: v.literal("written by you, about them"),
|
|
181
|
+
withheld: v.optional(v.literal("contacts.notes.list")),
|
|
182
|
+
}),
|
|
183
|
+
meetings: v.strictObject({
|
|
184
|
+
...coverage.entries,
|
|
185
|
+
read: v.literal("every account of the store that saw them"),
|
|
186
|
+
accounts: v.array(text),
|
|
187
|
+
pending: count,
|
|
188
|
+
}),
|
|
189
|
+
}),
|
|
190
|
+
}),
|
|
191
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
export declare const contactUpdate: v.StrictObjectSchema<{
|
|
3
|
+
readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
4
|
+
readonly person: v.StrictObjectSchema<{
|
|
5
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
6
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
7
|
+
readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
8
|
+
}, undefined>;
|
|
9
|
+
}, undefined>;
|
|
10
|
+
export declare const contactStateChange: v.StrictObjectSchema<{
|
|
11
|
+
readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
12
|
+
readonly person_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
13
|
+
}, undefined>;
|
|
14
|
+
export declare const contactImport: v.StrictObjectSchema<{
|
|
15
|
+
readonly operation_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
16
|
+
readonly sent: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
17
|
+
readonly recognised: v.ArraySchema<v.StrictObjectSchema<{
|
|
18
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
19
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
20
|
+
readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
21
|
+
}, undefined>, undefined>;
|
|
22
|
+
}, undefined>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
import { count, id, text } from "./fields.js";
|
|
3
|
+
const addressBookPerson = v.strictObject({ id, name: v.nullable(text), username: v.nullable(text) });
|
|
4
|
+
export const contactUpdate = v.strictObject({ operation_id: id, person: addressBookPerson });
|
|
5
|
+
export const contactStateChange = v.strictObject({ operation_id: id, person_id: id });
|
|
6
|
+
export const contactImport = v.strictObject({ operation_id: id, sent: count, recognised: v.array(addressBookPerson) });
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
export declare const conversationBuild: v.StrictObjectSchema<{
|
|
3
|
+
readonly chat: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
4
|
+
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
5
|
+
readonly links: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
6
|
+
readonly conversations: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
7
|
+
readonly built_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
8
|
+
readonly rules_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
9
|
+
}, undefined>;
|
|
10
|
+
export declare const chatEmbedding: v.StrictObjectSchema<{
|
|
11
|
+
readonly chat: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
12
|
+
readonly model: v.StringSchema<undefined>;
|
|
13
|
+
readonly embedded: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
14
|
+
readonly skipped: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
15
|
+
}, undefined>;
|
|
16
|
+
export declare const conversationPreparation: v.StrictObjectSchema<{
|
|
17
|
+
readonly model: v.StringSchema<undefined>;
|
|
18
|
+
readonly model_available: v.BooleanSchema<undefined>;
|
|
19
|
+
readonly built: v.ArraySchema<v.StrictObjectSchema<{
|
|
20
|
+
readonly chat: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
21
|
+
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
22
|
+
readonly links: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
23
|
+
readonly conversations: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
24
|
+
readonly built_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
25
|
+
readonly rules_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
26
|
+
}, undefined>, undefined>;
|
|
27
|
+
readonly embedded: v.ArraySchema<v.StrictObjectSchema<{
|
|
28
|
+
readonly chat: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
29
|
+
readonly model: v.StringSchema<undefined>;
|
|
30
|
+
readonly embedded: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
31
|
+
readonly skipped: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
32
|
+
}, undefined>, undefined>;
|
|
33
|
+
readonly left: v.ArraySchema<v.StrictObjectSchema<{
|
|
34
|
+
readonly chat: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
35
|
+
readonly needs: v.PicklistSchema<["build", "embed"], undefined>;
|
|
36
|
+
}, undefined>, undefined>;
|
|
37
|
+
}, undefined>;
|
|
38
|
+
export declare const catchUpPreparation: v.StrictObjectSchema<{
|
|
39
|
+
readonly complete: v.BooleanSchema<undefined>;
|
|
40
|
+
readonly reason: v.OptionalSchema<v.PicklistSchema<["message_bound", "time_or_abort_bound", "preparation_failed", "pending"], undefined>, undefined>;
|
|
41
|
+
readonly prepared: v.OptionalSchema<v.StrictObjectSchema<{
|
|
42
|
+
readonly model: v.StringSchema<undefined>;
|
|
43
|
+
readonly model_available: v.BooleanSchema<undefined>;
|
|
44
|
+
readonly built: v.ArraySchema<v.StrictObjectSchema<{
|
|
45
|
+
readonly chat: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
46
|
+
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
47
|
+
readonly links: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
48
|
+
readonly conversations: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
49
|
+
readonly built_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
50
|
+
readonly rules_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
51
|
+
}, undefined>, undefined>;
|
|
52
|
+
readonly embedded: v.ArraySchema<v.StrictObjectSchema<{
|
|
53
|
+
readonly chat: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
54
|
+
readonly model: v.StringSchema<undefined>;
|
|
55
|
+
readonly embedded: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
56
|
+
readonly skipped: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
57
|
+
}, undefined>, undefined>;
|
|
58
|
+
readonly left: v.ArraySchema<v.StrictObjectSchema<{
|
|
59
|
+
readonly chat: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
60
|
+
readonly needs: v.PicklistSchema<["build", "embed"], undefined>;
|
|
61
|
+
}, undefined>, undefined>;
|
|
62
|
+
}, undefined>, undefined>;
|
|
63
|
+
}, undefined>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
import { count, id, text, time } from "./fields.js";
|
|
3
|
+
export const conversationBuild = v.strictObject({
|
|
4
|
+
chat: id,
|
|
5
|
+
messages: count,
|
|
6
|
+
links: count,
|
|
7
|
+
conversations: count,
|
|
8
|
+
built_at: time,
|
|
9
|
+
rules_version: count,
|
|
10
|
+
});
|
|
11
|
+
export const chatEmbedding = v.strictObject({ chat: id, model: text, embedded: count, skipped: count });
|
|
12
|
+
export const conversationPreparation = v.strictObject({
|
|
13
|
+
model: text,
|
|
14
|
+
model_available: v.boolean(),
|
|
15
|
+
built: v.array(conversationBuild),
|
|
16
|
+
embedded: v.array(chatEmbedding),
|
|
17
|
+
left: v.array(v.strictObject({ chat: id, needs: v.picklist(["build", "embed"]) })),
|
|
18
|
+
});
|
|
19
|
+
export const catchUpPreparation = v.strictObject({
|
|
20
|
+
complete: v.boolean(),
|
|
21
|
+
reason: v.optional(v.picklist(["message_bound", "time_or_abort_bound", "preparation_failed", "pending"])),
|
|
22
|
+
prepared: v.optional(conversationPreparation),
|
|
23
|
+
});
|