@wirecat/cli-core 0.399.0 → 0.400.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 +82 -0
- 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/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 +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/json-fields.js +12 -1
- 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 -0
- 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 +5 -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/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 +1 -0
- package/dist/cli/messenger/metadata-command.js +6 -1
- package/dist/cli/messenger/models-command.js +10 -2
- 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 -6
- 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/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.d.ts +1 -1
- package/dist/cli/messenger/store-maintenance-command.js +10 -10
- package/dist/cli/messenger/tags-command.js +7 -1
- package/dist/cli/messenger/tasks-command.js +47 -8
- 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/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/image-embedding.d.ts +9 -0
- package/dist/entities/image-embedding.js +10 -0
- package/dist/entities/index.d.ts +8006 -1928
- package/dist/entities/index.js +174 -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-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 +191 -0
- package/dist/entities/message-write.js +8 -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 +1 -0
- package/dist/mcp/agent.d.ts +3 -1
- package/dist/mcp/agent.js +9 -6
- 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 +1 -1
- 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/mcp/index.d.ts +15 -15
- package/dist/meetings/read-answers.d.ts +167 -0
- package/dist/meetings/read-answers.js +183 -0
- package/dist/runs/run.d.ts +10 -2
- package/dist/runs/run.js +11 -3
- package/dist/sends/journal.d.ts +8 -1
- package/dist/sends/journal.js +9 -2
- package/dist/sends/permissions.d.ts +5 -1
- package/dist/sends/permissions.js +11 -1
- package/dist/sends/recipients.d.ts +8 -0
- package/dist/sends/recipients.js +9 -0
- 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/meeting-links.d.ts +2 -17
- 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/involvements.js +2 -1
- package/dist/store/sqlite/roster.d.ts +2 -1
- package/dist/store/sqlite/roster.js +3 -2
- package/package.json +1 -1
- package/parity.json +8 -66
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
export declare const storeInfo: v.UnionSchema<[v.StrictObjectSchema<{
|
|
3
|
+
readonly path: v.StringSchema<undefined>;
|
|
4
|
+
readonly exists: v.LiteralSchema<false, undefined>;
|
|
5
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
6
|
+
path: v.StringSchema<undefined>;
|
|
7
|
+
exists: v.LiteralSchema<true, undefined>;
|
|
8
|
+
opens: v.LiteralSchema<false, undefined>;
|
|
9
|
+
error: v.StringSchema<undefined>;
|
|
10
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
11
|
+
readonly path: v.StringSchema<undefined>;
|
|
12
|
+
readonly exists: v.LiteralSchema<true, undefined>;
|
|
13
|
+
readonly bytes: v.StrictObjectSchema<{
|
|
14
|
+
readonly file: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
15
|
+
readonly wal: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
16
|
+
}, undefined>;
|
|
17
|
+
readonly schema: v.StrictObjectSchema<{
|
|
18
|
+
readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
19
|
+
readonly min_compatible: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
20
|
+
readonly writable: v.BooleanSchema<undefined>;
|
|
21
|
+
readonly speaks: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
22
|
+
}, undefined>;
|
|
23
|
+
readonly rows: Omit<v.StrictObjectSchema<{
|
|
24
|
+
readonly accounts: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
25
|
+
readonly chats: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
26
|
+
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
27
|
+
readonly attachments: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
28
|
+
readonly identities: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
29
|
+
}, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
|
|
30
|
+
readonly entries: {
|
|
31
|
+
readonly accounts: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
32
|
+
readonly chats: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
33
|
+
readonly messages: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
34
|
+
readonly attachments: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
35
|
+
readonly identities: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
36
|
+
};
|
|
37
|
+
readonly "~standard": v.StandardProps<{
|
|
38
|
+
accounts?: number | undefined;
|
|
39
|
+
chats?: number | undefined;
|
|
40
|
+
messages?: number | undefined;
|
|
41
|
+
attachments?: number | undefined;
|
|
42
|
+
identities?: number | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
accounts?: number | undefined;
|
|
45
|
+
chats?: number | undefined;
|
|
46
|
+
messages?: number | undefined;
|
|
47
|
+
attachments?: number | undefined;
|
|
48
|
+
identities?: number | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
51
|
+
accounts?: number | undefined;
|
|
52
|
+
chats?: number | undefined;
|
|
53
|
+
messages?: number | undefined;
|
|
54
|
+
attachments?: number | undefined;
|
|
55
|
+
identities?: number | undefined;
|
|
56
|
+
}, v.IntegerIssue<number> | v.MinValueIssue<number, 0> | v.NumberIssue | v.StrictObjectIssue>;
|
|
57
|
+
readonly "~types"?: {
|
|
58
|
+
readonly input: {
|
|
59
|
+
accounts?: number | undefined;
|
|
60
|
+
chats?: number | undefined;
|
|
61
|
+
messages?: number | undefined;
|
|
62
|
+
attachments?: number | undefined;
|
|
63
|
+
identities?: number | undefined;
|
|
64
|
+
};
|
|
65
|
+
readonly output: {
|
|
66
|
+
accounts?: number | undefined;
|
|
67
|
+
chats?: number | undefined;
|
|
68
|
+
messages?: number | undefined;
|
|
69
|
+
attachments?: number | undefined;
|
|
70
|
+
identities?: number | undefined;
|
|
71
|
+
};
|
|
72
|
+
readonly issue: v.IntegerIssue<number> | v.MinValueIssue<number, 0> | v.NumberIssue | v.StrictObjectIssue;
|
|
73
|
+
} | undefined;
|
|
74
|
+
};
|
|
75
|
+
readonly pending_normalization: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
76
|
+
readonly word_index: v.NullableSchema<v.StrictObjectSchema<{
|
|
77
|
+
readonly watermark: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
78
|
+
readonly filled_through: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
79
|
+
readonly pending_normalization: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
80
|
+
readonly ready: v.BooleanSchema<undefined>;
|
|
81
|
+
readonly terms_through: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
82
|
+
readonly newest: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
83
|
+
readonly terms_ready: v.BooleanSchema<undefined>;
|
|
84
|
+
readonly built_at: v.NullableSchema<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`">]>, undefined>;
|
|
85
|
+
}, undefined>, undefined>;
|
|
86
|
+
readonly stem_index: v.NullableSchema<v.StrictObjectSchema<{
|
|
87
|
+
readonly watermark: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
88
|
+
readonly filled_through: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
89
|
+
readonly pending: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
90
|
+
readonly built: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
91
|
+
readonly wanted: v.StringSchema<undefined>;
|
|
92
|
+
readonly ready: v.BooleanSchema<undefined>;
|
|
93
|
+
readonly cause: v.OptionalSchema<v.PicklistSchema<["building", "stemmer_changed", "stemmer_unknown"], undefined>, undefined>;
|
|
94
|
+
readonly built_at: v.NullableSchema<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`">]>, undefined>;
|
|
95
|
+
}, undefined>, undefined>;
|
|
96
|
+
}, undefined>], undefined>;
|
|
97
|
+
export declare const storeCheck: v.UnionSchema<[v.StrictObjectSchema<{
|
|
98
|
+
readonly path: v.StringSchema<undefined>;
|
|
99
|
+
readonly exists: v.LiteralSchema<false, undefined>;
|
|
100
|
+
readonly ok: v.LiteralSchema<true, undefined>;
|
|
101
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
102
|
+
readonly path: v.StringSchema<undefined>;
|
|
103
|
+
readonly exists: v.LiteralSchema<true, undefined>;
|
|
104
|
+
readonly opens: v.LiteralSchema<false, undefined>;
|
|
105
|
+
readonly error: v.StringSchema<undefined>;
|
|
106
|
+
readonly ok: v.LiteralSchema<false, undefined>;
|
|
107
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
108
|
+
readonly path: v.StringSchema<undefined>;
|
|
109
|
+
readonly exists: v.LiteralSchema<true, undefined>;
|
|
110
|
+
readonly opens: v.LiteralSchema<true, undefined>;
|
|
111
|
+
readonly ok: v.BooleanSchema<undefined>;
|
|
112
|
+
readonly checks: v.StrictObjectSchema<{
|
|
113
|
+
readonly schema: v.BooleanSchema<undefined>;
|
|
114
|
+
readonly integrity: v.BooleanSchema<undefined>;
|
|
115
|
+
readonly foreign_keys: v.BooleanSchema<undefined>;
|
|
116
|
+
readonly search_indexes: v.BooleanSchema<undefined>;
|
|
117
|
+
readonly disk: v.BooleanSchema<undefined>;
|
|
118
|
+
}, undefined>;
|
|
119
|
+
readonly schema: v.StrictObjectSchema<{
|
|
120
|
+
readonly version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
121
|
+
readonly min_compatible: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
122
|
+
readonly writable: v.BooleanSchema<undefined>;
|
|
123
|
+
readonly speaks: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
124
|
+
}, undefined>;
|
|
125
|
+
readonly integrity: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
126
|
+
readonly foreign_key_violations: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
127
|
+
readonly search_indexes: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
128
|
+
readonly disk: v.StrictObjectSchema<{
|
|
129
|
+
readonly free: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
130
|
+
readonly needed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
131
|
+
}, undefined>;
|
|
132
|
+
readonly pending_normalization: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
133
|
+
readonly word_index: v.NullableSchema<v.StrictObjectSchema<{
|
|
134
|
+
readonly watermark: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
135
|
+
readonly filled_through: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
136
|
+
readonly pending_normalization: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
137
|
+
readonly ready: v.BooleanSchema<undefined>;
|
|
138
|
+
readonly terms_through: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
139
|
+
readonly newest: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
140
|
+
readonly terms_ready: v.BooleanSchema<undefined>;
|
|
141
|
+
readonly built_at: v.NullableSchema<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`">]>, undefined>;
|
|
142
|
+
}, undefined>, undefined>;
|
|
143
|
+
readonly stem_index: v.NullableSchema<v.StrictObjectSchema<{
|
|
144
|
+
readonly watermark: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
145
|
+
readonly filled_through: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
146
|
+
readonly pending: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
147
|
+
readonly built: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
148
|
+
readonly wanted: v.StringSchema<undefined>;
|
|
149
|
+
readonly ready: v.BooleanSchema<undefined>;
|
|
150
|
+
readonly cause: v.OptionalSchema<v.PicklistSchema<["building", "stemmer_changed", "stemmer_unknown"], undefined>, undefined>;
|
|
151
|
+
readonly built_at: v.NullableSchema<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`">]>, undefined>;
|
|
152
|
+
}, undefined>, undefined>;
|
|
153
|
+
readonly chats_behind: v.ArraySchema<v.StrictObjectSchema<{
|
|
154
|
+
readonly provider: v.StringSchema<undefined>;
|
|
155
|
+
readonly account: v.StringSchema<undefined>;
|
|
156
|
+
readonly chat: v.StringSchema<undefined>;
|
|
157
|
+
readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
158
|
+
readonly newest: 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`">]>;
|
|
159
|
+
readonly held: v.NullableSchema<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`">]>, undefined>;
|
|
160
|
+
readonly refreshed: 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`">]>;
|
|
161
|
+
}, undefined>, undefined>;
|
|
162
|
+
readonly orphan_pointers: v.ArraySchema<v.StrictObjectSchema<{
|
|
163
|
+
readonly table: v.StringSchema<undefined>;
|
|
164
|
+
readonly pointer: v.StringSchema<undefined>;
|
|
165
|
+
readonly type: v.StringSchema<undefined>;
|
|
166
|
+
readonly count: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
167
|
+
readonly known: v.BooleanSchema<undefined>;
|
|
168
|
+
}, undefined>, undefined>;
|
|
169
|
+
readonly conversations: v.ArraySchema<v.StrictObjectSchema<{
|
|
170
|
+
readonly provider: v.StringSchema<undefined>;
|
|
171
|
+
readonly account: v.StringSchema<undefined>;
|
|
172
|
+
readonly chat: v.StringSchema<undefined>;
|
|
173
|
+
readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
174
|
+
readonly built_at: v.NullableSchema<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`">]>, undefined>;
|
|
175
|
+
readonly rules_version: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
176
|
+
readonly current: v.BooleanSchema<undefined>;
|
|
177
|
+
readonly stale_agent_links: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
178
|
+
}, undefined>, undefined>;
|
|
179
|
+
readonly vectors: v.NullableSchema<v.StrictObjectSchema<{
|
|
180
|
+
readonly models: v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
181
|
+
readonly unused: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
182
|
+
}, undefined>, undefined>;
|
|
183
|
+
readonly not_applicable: v.StrictObjectSchema<{
|
|
184
|
+
readonly extensions: v.StringSchema<undefined>;
|
|
185
|
+
}, undefined>;
|
|
186
|
+
}, undefined>], undefined>;
|
|
187
|
+
export declare const storeMigration: v.UnionSchema<[v.StrictObjectSchema<{
|
|
188
|
+
readonly path: v.StringSchema<undefined>;
|
|
189
|
+
readonly exists: v.LiteralSchema<false, undefined>;
|
|
190
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
191
|
+
readonly normalized: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
192
|
+
readonly indexed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
193
|
+
readonly terms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
194
|
+
readonly stemmed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
195
|
+
readonly notes_indexed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
196
|
+
readonly path: v.StringSchema<undefined>;
|
|
197
|
+
readonly exists: v.LiteralSchema<true, undefined>;
|
|
198
|
+
readonly from: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
199
|
+
readonly to: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
200
|
+
}, undefined>], undefined>;
|
|
201
|
+
export declare const storeReindex: v.UnionSchema<[v.StrictObjectSchema<{
|
|
202
|
+
readonly path: v.StringSchema<undefined>;
|
|
203
|
+
readonly exists: v.LiteralSchema<false, undefined>;
|
|
204
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
205
|
+
readonly normalized: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
206
|
+
readonly indexed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
207
|
+
readonly terms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
208
|
+
readonly stemmed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
209
|
+
readonly notes_indexed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
210
|
+
readonly path: v.StringSchema<undefined>;
|
|
211
|
+
readonly exists: v.LiteralSchema<true, undefined>;
|
|
212
|
+
readonly file_texts: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
213
|
+
readonly involvements: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
214
|
+
}, undefined>], undefined>;
|
|
215
|
+
export declare const storeBackup: v.StrictObjectSchema<{
|
|
216
|
+
readonly path: v.StringSchema<undefined>;
|
|
217
|
+
readonly from: v.StringSchema<undefined>;
|
|
218
|
+
readonly bytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
219
|
+
readonly schema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
220
|
+
readonly rows: v.StrictObjectSchema<{
|
|
221
|
+
readonly chats: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
222
|
+
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
223
|
+
}, undefined>;
|
|
224
|
+
readonly encrypted: v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>;
|
|
225
|
+
}, undefined>;
|
|
226
|
+
export declare const storeDecrypt: v.StrictObjectSchema<{
|
|
227
|
+
readonly path: v.StringSchema<undefined>;
|
|
228
|
+
readonly from: v.StringSchema<undefined>;
|
|
229
|
+
readonly bytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
230
|
+
}, undefined>;
|
|
231
|
+
export declare const storeRestore: v.StrictObjectSchema<{
|
|
232
|
+
readonly path: v.StringSchema<undefined>;
|
|
233
|
+
readonly restored_from: v.StringSchema<undefined>;
|
|
234
|
+
readonly kept_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
235
|
+
readonly schema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
236
|
+
}, undefined>;
|
|
237
|
+
export declare const storeReset: v.UnionSchema<[v.StrictObjectSchema<{
|
|
238
|
+
readonly path: v.StringSchema<undefined>;
|
|
239
|
+
readonly exists: v.LiteralSchema<false, undefined>;
|
|
240
|
+
readonly reset: v.LiteralSchema<false, undefined>;
|
|
241
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
242
|
+
readonly path: v.StringSchema<undefined>;
|
|
243
|
+
readonly exists: v.LiteralSchema<true, undefined>;
|
|
244
|
+
readonly reset: v.LiteralSchema<true, undefined>;
|
|
245
|
+
readonly backup: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
246
|
+
readonly backed_up: v.NullableSchema<v.StrictObjectSchema<{
|
|
247
|
+
readonly schema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
248
|
+
readonly rows: Omit<v.StrictObjectSchema<{
|
|
249
|
+
readonly chats: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
250
|
+
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
251
|
+
}, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
|
|
252
|
+
readonly entries: {
|
|
253
|
+
readonly chats: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
254
|
+
readonly messages: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
255
|
+
};
|
|
256
|
+
readonly "~standard": v.StandardProps<{
|
|
257
|
+
chats?: number | undefined;
|
|
258
|
+
messages?: number | undefined;
|
|
259
|
+
}, {
|
|
260
|
+
chats?: number | undefined;
|
|
261
|
+
messages?: number | undefined;
|
|
262
|
+
}>;
|
|
263
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
264
|
+
chats?: number | undefined;
|
|
265
|
+
messages?: number | undefined;
|
|
266
|
+
}, v.IntegerIssue<number> | v.MinValueIssue<number, 0> | v.NumberIssue | v.StrictObjectIssue>;
|
|
267
|
+
readonly "~types"?: {
|
|
268
|
+
readonly input: {
|
|
269
|
+
chats?: number | undefined;
|
|
270
|
+
messages?: number | undefined;
|
|
271
|
+
};
|
|
272
|
+
readonly output: {
|
|
273
|
+
chats?: number | undefined;
|
|
274
|
+
messages?: number | undefined;
|
|
275
|
+
};
|
|
276
|
+
readonly issue: v.IntegerIssue<number> | v.MinValueIssue<number, 0> | v.NumberIssue | v.StrictObjectIssue;
|
|
277
|
+
} | undefined;
|
|
278
|
+
};
|
|
279
|
+
}, undefined>, undefined>;
|
|
280
|
+
readonly schema: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
281
|
+
}, undefined>], undefined>;
|
|
282
|
+
export declare const storeRepair: v.UnionSchema<[v.StrictObjectSchema<{
|
|
283
|
+
readonly path: v.StringSchema<undefined>;
|
|
284
|
+
readonly exists: v.LiteralSchema<false, undefined>;
|
|
285
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
286
|
+
readonly path: v.StringSchema<undefined>;
|
|
287
|
+
readonly dry_run: v.BooleanSchema<undefined>;
|
|
288
|
+
readonly repaired: v.ArraySchema<v.StrictObjectSchema<{
|
|
289
|
+
readonly table: v.StringSchema<undefined>;
|
|
290
|
+
readonly action: v.PicklistSchema<["created", "columns-added", "rebuilt"], undefined>;
|
|
291
|
+
readonly columns_added: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
292
|
+
readonly copy: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
293
|
+
readonly rows_in_copy: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
294
|
+
readonly rows_copied: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
295
|
+
readonly only_in_copy: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
296
|
+
readonly dropped_from_copy: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
297
|
+
}, undefined>, undefined>;
|
|
298
|
+
readonly indexes_created: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
299
|
+
readonly triggers_created: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
300
|
+
readonly mismatches: v.ArraySchema<v.StrictObjectSchema<{
|
|
301
|
+
readonly table: v.StringSchema<undefined>;
|
|
302
|
+
readonly what: v.StringSchema<undefined>;
|
|
303
|
+
}, undefined>, undefined>;
|
|
304
|
+
readonly foreign_key_violations: v.ArraySchema<v.StrictObjectSchema<{
|
|
305
|
+
readonly table: v.StringSchema<undefined>;
|
|
306
|
+
readonly rows: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
307
|
+
}, undefined>, undefined>;
|
|
308
|
+
readonly copies: v.ArraySchema<v.StrictObjectSchema<{
|
|
309
|
+
readonly name: v.StringSchema<undefined>;
|
|
310
|
+
readonly rows: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
311
|
+
}, undefined>, undefined>;
|
|
312
|
+
}, undefined>], undefined>;
|
|
313
|
+
export declare const storeCopyRemoval: v.StrictObjectSchema<{
|
|
314
|
+
readonly path: v.StringSchema<undefined>;
|
|
315
|
+
readonly deleted: v.StrictObjectSchema<{
|
|
316
|
+
readonly name: v.StringSchema<undefined>;
|
|
317
|
+
readonly rows: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
318
|
+
}, undefined>;
|
|
319
|
+
}, undefined>;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
import { count, text, time } from "./fields.js";
|
|
3
|
+
const absent = v.strictObject({ path: text, exists: v.literal(false) });
|
|
4
|
+
const schema = v.strictObject({ version: count, min_compatible: count, writable: v.boolean(), speaks: count });
|
|
5
|
+
const wordIndex = v.strictObject({
|
|
6
|
+
watermark: count,
|
|
7
|
+
filled_through: count,
|
|
8
|
+
pending_normalization: count,
|
|
9
|
+
ready: v.boolean(),
|
|
10
|
+
terms_through: count,
|
|
11
|
+
newest: count,
|
|
12
|
+
terms_ready: v.boolean(),
|
|
13
|
+
built_at: v.nullable(time),
|
|
14
|
+
});
|
|
15
|
+
const stemIndex = v.strictObject({
|
|
16
|
+
watermark: count,
|
|
17
|
+
filled_through: count,
|
|
18
|
+
pending: count,
|
|
19
|
+
built: v.nullable(text),
|
|
20
|
+
wanted: text,
|
|
21
|
+
ready: v.boolean(),
|
|
22
|
+
cause: v.optional(v.picklist(["building", "stemmer_changed", "stemmer_unknown"])),
|
|
23
|
+
built_at: v.nullable(time),
|
|
24
|
+
});
|
|
25
|
+
const readFailure = { path: text, exists: v.literal(true), opens: v.literal(false), error: text };
|
|
26
|
+
const rows = v.partial(v.strictObject({ accounts: count, chats: count, messages: count, attachments: count, identities: count }));
|
|
27
|
+
export const storeInfo = v.union([
|
|
28
|
+
absent,
|
|
29
|
+
v.strictObject(readFailure),
|
|
30
|
+
v.strictObject({
|
|
31
|
+
path: text,
|
|
32
|
+
exists: v.literal(true),
|
|
33
|
+
bytes: v.strictObject({ file: count, wal: count }),
|
|
34
|
+
schema,
|
|
35
|
+
rows,
|
|
36
|
+
pending_normalization: v.nullable(count),
|
|
37
|
+
word_index: v.nullable(wordIndex),
|
|
38
|
+
stem_index: v.nullable(stemIndex),
|
|
39
|
+
}),
|
|
40
|
+
]);
|
|
41
|
+
export const storeCheck = v.union([
|
|
42
|
+
v.strictObject({ ...absent.entries, ok: v.literal(true) }),
|
|
43
|
+
v.strictObject({ ...readFailure, ok: v.literal(false) }),
|
|
44
|
+
v.strictObject({
|
|
45
|
+
path: text,
|
|
46
|
+
exists: v.literal(true),
|
|
47
|
+
opens: v.literal(true),
|
|
48
|
+
ok: v.boolean(),
|
|
49
|
+
checks: v.strictObject({
|
|
50
|
+
schema: v.boolean(),
|
|
51
|
+
integrity: v.boolean(),
|
|
52
|
+
foreign_keys: v.boolean(),
|
|
53
|
+
search_indexes: v.boolean(),
|
|
54
|
+
disk: v.boolean(),
|
|
55
|
+
}),
|
|
56
|
+
schema,
|
|
57
|
+
integrity: v.array(text),
|
|
58
|
+
foreign_key_violations: count,
|
|
59
|
+
search_indexes: v.record(text, text),
|
|
60
|
+
disk: v.strictObject({ free: count, needed: count }),
|
|
61
|
+
pending_normalization: v.nullable(count),
|
|
62
|
+
word_index: v.nullable(wordIndex),
|
|
63
|
+
stem_index: v.nullable(stemIndex),
|
|
64
|
+
chats_behind: v.array(v.strictObject({
|
|
65
|
+
provider: text,
|
|
66
|
+
account: text,
|
|
67
|
+
chat: text,
|
|
68
|
+
title: v.nullable(text),
|
|
69
|
+
newest: time,
|
|
70
|
+
held: v.nullable(time),
|
|
71
|
+
refreshed: time,
|
|
72
|
+
})),
|
|
73
|
+
orphan_pointers: v.array(v.strictObject({ table: text, pointer: text, type: text, count, known: v.boolean() })),
|
|
74
|
+
conversations: v.array(v.strictObject({
|
|
75
|
+
provider: text,
|
|
76
|
+
account: text,
|
|
77
|
+
chat: text,
|
|
78
|
+
title: v.nullable(text),
|
|
79
|
+
built_at: v.nullable(time),
|
|
80
|
+
rules_version: v.nullable(count),
|
|
81
|
+
current: v.boolean(),
|
|
82
|
+
stale_agent_links: count,
|
|
83
|
+
})),
|
|
84
|
+
vectors: v.nullable(v.strictObject({ models: v.record(text, count), unused: count })),
|
|
85
|
+
not_applicable: v.strictObject({ extensions: text }),
|
|
86
|
+
}),
|
|
87
|
+
]);
|
|
88
|
+
const indexed = { normalized: count, indexed: count, terms: count, stemmed: count, notes_indexed: count };
|
|
89
|
+
export const storeMigration = v.union([
|
|
90
|
+
absent,
|
|
91
|
+
v.strictObject({ path: text, exists: v.literal(true), from: count, to: count, ...indexed }),
|
|
92
|
+
]);
|
|
93
|
+
export const storeReindex = v.union([
|
|
94
|
+
absent,
|
|
95
|
+
v.strictObject({ path: text, exists: v.literal(true), ...indexed, file_texts: count, involvements: count }),
|
|
96
|
+
]);
|
|
97
|
+
export const storeBackup = v.strictObject({
|
|
98
|
+
path: text,
|
|
99
|
+
from: text,
|
|
100
|
+
bytes: count,
|
|
101
|
+
schema: count,
|
|
102
|
+
rows: v.strictObject({ chats: count, messages: count }),
|
|
103
|
+
encrypted: v.optional(v.literal(true)),
|
|
104
|
+
});
|
|
105
|
+
export const storeDecrypt = v.strictObject({ path: text, from: text, bytes: count });
|
|
106
|
+
export const storeRestore = v.strictObject({
|
|
107
|
+
path: text,
|
|
108
|
+
restored_from: text,
|
|
109
|
+
kept_at: v.nullable(text),
|
|
110
|
+
schema: count,
|
|
111
|
+
});
|
|
112
|
+
export const storeReset = v.union([
|
|
113
|
+
v.strictObject({ ...absent.entries, reset: v.literal(false) }),
|
|
114
|
+
v.strictObject({
|
|
115
|
+
path: text,
|
|
116
|
+
exists: v.literal(true),
|
|
117
|
+
reset: v.literal(true),
|
|
118
|
+
backup: v.nullable(text),
|
|
119
|
+
backed_up: v.nullable(v.strictObject({ schema: count, rows: v.partial(v.strictObject({ chats: count, messages: count })) })),
|
|
120
|
+
schema: count,
|
|
121
|
+
}),
|
|
122
|
+
]);
|
|
123
|
+
export const storeRepair = v.union([
|
|
124
|
+
absent,
|
|
125
|
+
v.strictObject({
|
|
126
|
+
path: text,
|
|
127
|
+
dry_run: v.boolean(),
|
|
128
|
+
repaired: v.array(v.strictObject({
|
|
129
|
+
table: text,
|
|
130
|
+
action: v.picklist(["created", "columns-added", "rebuilt"]),
|
|
131
|
+
columns_added: v.optional(v.array(text)),
|
|
132
|
+
copy: v.optional(text),
|
|
133
|
+
rows_in_copy: v.optional(count),
|
|
134
|
+
rows_copied: v.optional(count),
|
|
135
|
+
only_in_copy: v.optional(v.array(text)),
|
|
136
|
+
dropped_from_copy: v.optional(v.array(text)),
|
|
137
|
+
})),
|
|
138
|
+
indexes_created: v.array(text),
|
|
139
|
+
triggers_created: v.array(text),
|
|
140
|
+
mismatches: v.array(v.strictObject({ table: text, what: text })),
|
|
141
|
+
foreign_key_violations: v.array(v.strictObject({ table: text, rows: count })),
|
|
142
|
+
copies: v.array(v.strictObject({ name: text, rows: count })),
|
|
143
|
+
}),
|
|
144
|
+
]);
|
|
145
|
+
export const storeCopyRemoval = v.strictObject({ path: text, deleted: v.strictObject({ name: text, rows: count }) });
|