@wirecat/cli-core 0.491.0 → 0.492.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 +25 -0
- package/dist/cli/messenger/conversation-answers.d.ts +7 -0
- package/dist/cli/messenger/message-answers.d.ts +7 -0
- package/dist/cli/messenger/message-writes.d.ts +14 -0
- package/dist/cli/messenger/messages-search-command.js +4 -1
- package/dist/cli/messenger/search-answers.js +17 -1
- package/dist/entities/conversation-results.d.ts +14 -0
- package/dist/entities/evidence.d.ts +56 -0
- package/dist/entities/index.d.ts +133 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/listener.d.ts +28 -0
- package/dist/entities/message-context.d.ts +21 -0
- package/dist/entities/message-write.d.ts +28 -0
- package/dist/entities/message.d.ts +11 -0
- package/dist/entities/message.js +11 -0
- package/dist/entities/store-records.d.ts +7 -0
- package/dist/services/messages-discovery.d.ts +6 -0
- package/dist/services/messages-discovery.js +50 -3
- package/dist/services/messages-search.d.ts +2 -0
- package/dist/services/messages.d.ts +2 -0
- package/dist/store/messages.d.ts +9 -0
- package/dist/store/messages.js +2 -0
- package/dist/store/sqlite/follow-ups.d.ts +17 -0
- package/dist/store/sqlite/follow-ups.js +59 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,31 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
|
|
|
5
5
|
minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
|
|
6
6
|
shape of this file.
|
|
7
7
|
|
|
8
|
+
## Unreleased
|
|
9
|
+
|
|
10
|
+
## 0.492.0 — 31.10.2026
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`search messages --discover` shows follow-ups: later messages that may cancel or change a hit.** Each of the
|
|
15
|
+
first five hits gets up to two later messages, from any chat the search reads and passing its filters, that
|
|
16
|
+
share a word of three letters or more whose stem at most three messages of the store hold; latest first, a
|
|
17
|
+
message already shown above is not repeated. `items[].follow_ups` in `--json` and MCP (`ref`, `chat_title`,
|
|
18
|
+
`timestamp`, `sender_name`, `text`, all untrusted), `later, shares a rare word` lines in the terminal, and the
|
|
19
|
+
SDK's `query.discovery.followUps` counts them. The counts come from the stem index through a temporary `fts5vocab`
|
|
20
|
+
table, so the store does not change; while the stems are being built there are no follow-ups. On a benchmark
|
|
21
|
+
split written by an agent that never saw the method, cancelled decisions in the first three went from 7 to 11
|
|
22
|
+
of 15 and no answer was lost
|
|
23
|
+
([evidence pipeline](https://github.com/WireCatLabs/cli-testing/tree/main/performance/search/evidence-pipeline)).
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **`search messages --discover` no longer fails on a question with a time or a ratio.** "Do we meet until 22:00?"
|
|
28
|
+
or "a 1:1 with Anna" read the colon as a field filter and ended the whole search with `query.invalid-syntax`.
|
|
29
|
+
In a question, a colon between two digits now splits the numbers, as a space would. Explicit query syntax is
|
|
30
|
+
unchanged. A question with a bare number still runs as strict search until cli-core takes cli-base 0.66.1, where a
|
|
31
|
+
number counts as a word of the question.
|
|
32
|
+
|
|
8
33
|
## 0.491.0 — 31.10.2026
|
|
9
34
|
|
|
10
35
|
### Fixed
|
|
@@ -75,6 +75,13 @@ export declare const conversationShown: (account: AccountKey, { summary, message
|
|
|
75
75
|
sender_name: string | null;
|
|
76
76
|
text: string;
|
|
77
77
|
}[] | undefined;
|
|
78
|
+
follow_ups?: {
|
|
79
|
+
ref: string;
|
|
80
|
+
chat_title: string | null;
|
|
81
|
+
timestamp: string;
|
|
82
|
+
sender_name: string | null;
|
|
83
|
+
text: string;
|
|
84
|
+
}[] | undefined;
|
|
78
85
|
outgoing: boolean | null;
|
|
79
86
|
attachments: {
|
|
80
87
|
message?: string | undefined;
|
|
@@ -52,6 +52,13 @@ export declare const threadAnswer: ({ items, ...thread }: ThreadContext, reader:
|
|
|
52
52
|
sender_name: string | null;
|
|
53
53
|
text: string;
|
|
54
54
|
}[] | undefined;
|
|
55
|
+
follow_ups?: {
|
|
56
|
+
ref: string;
|
|
57
|
+
chat_title: string | null;
|
|
58
|
+
timestamp: string;
|
|
59
|
+
sender_name: string | null;
|
|
60
|
+
text: string;
|
|
61
|
+
}[] | undefined;
|
|
55
62
|
outgoing: boolean | null;
|
|
56
63
|
attachments: {
|
|
57
64
|
message?: string | undefined;
|
|
@@ -56,6 +56,13 @@ export declare const writtenAnswer: ({ operationId, sendId, message, messages, s
|
|
|
56
56
|
sender_name: string | null;
|
|
57
57
|
text: string;
|
|
58
58
|
}[] | undefined;
|
|
59
|
+
follow_ups?: {
|
|
60
|
+
ref: string;
|
|
61
|
+
chat_title: string | null;
|
|
62
|
+
timestamp: string;
|
|
63
|
+
sender_name: string | null;
|
|
64
|
+
text: string;
|
|
65
|
+
}[] | undefined;
|
|
59
66
|
outgoing: boolean | null;
|
|
60
67
|
attachments: {
|
|
61
68
|
message?: string | undefined;
|
|
@@ -268,6 +275,13 @@ export declare const writtenAnswer: ({ operationId, sendId, message, messages, s
|
|
|
268
275
|
sender_name: string | null;
|
|
269
276
|
text: string;
|
|
270
277
|
}[] | undefined;
|
|
278
|
+
follow_ups?: {
|
|
279
|
+
ref: string;
|
|
280
|
+
chat_title: string | null;
|
|
281
|
+
timestamp: string;
|
|
282
|
+
sender_name: string | null;
|
|
283
|
+
text: string;
|
|
284
|
+
}[] | undefined;
|
|
271
285
|
outgoing: boolean | null;
|
|
272
286
|
attachments: {
|
|
273
287
|
message?: string | undefined;
|
|
@@ -174,7 +174,10 @@ const searchAction = (messenger) => async function (given) {
|
|
|
174
174
|
const place = hit.matchedIn && hit.matchedIn !== "text" && "excerpt" in hit
|
|
175
175
|
? `\n found in the ${PLACES[hit.matchedIn]}: ${String(hit.excerpt)}`
|
|
176
176
|
: "";
|
|
177
|
-
|
|
177
|
+
const later = (hit.followUps ?? [])
|
|
178
|
+
.map((one) => `\n later, shares a rare word · ${one.chatTitle ?? one.chatId} ${one.locator}\n${renderMessages([one], options)}`)
|
|
179
|
+
.join("");
|
|
180
|
+
return `${spans ? `${at.provider} · ${title}` : title} ${hit.locator}\n${renderMessages(hit.thread?.items ?? hit.context ?? [hit], options)}${place}${later}${links ? `\n${links}` : ""}`;
|
|
178
181
|
})
|
|
179
182
|
.join("\n\n");
|
|
180
183
|
const elsewhere = [...new Set(hits.map(({ at }) => at.provider))].filter((one) => one !== messenger.provider);
|
|
@@ -12,7 +12,16 @@ const defined = (value) => Object.fromEntries(Object.entries(value).filter(([, o
|
|
|
12
12
|
/** The page a `--page` asks for, as the offset the search services take. */
|
|
13
13
|
export const offsetOf = (page, limit) => page === undefined || page <= 1 ? undefined : (page - 1) * limit;
|
|
14
14
|
/** Who wrote it and what, the chat's title, the mail's headers: others write them; the owner's own messages too. */
|
|
15
|
-
const MESSAGE_HIT_UNTRUSTED = [
|
|
15
|
+
const MESSAGE_HIT_UNTRUSTED = [
|
|
16
|
+
"chat_title",
|
|
17
|
+
"sender_name",
|
|
18
|
+
"excerpt",
|
|
19
|
+
"context.sender_name",
|
|
20
|
+
"context.text",
|
|
21
|
+
"follow_ups.chat_title",
|
|
22
|
+
"follow_ups.sender_name",
|
|
23
|
+
"follow_ups.text",
|
|
24
|
+
];
|
|
16
25
|
const MAIL_HIT_UNTRUSTED = [
|
|
17
26
|
"email.subject",
|
|
18
27
|
"email.from.name",
|
|
@@ -67,6 +76,13 @@ export const messageHitItem = (hit, query = "") => {
|
|
|
67
76
|
sender_name: one.senderName,
|
|
68
77
|
text: one.text,
|
|
69
78
|
})),
|
|
79
|
+
follow_ups: hit.followUps?.map((one) => ({
|
|
80
|
+
ref: one.locator,
|
|
81
|
+
chat_title: one.chatTitle ?? null,
|
|
82
|
+
timestamp: one.timestamp,
|
|
83
|
+
sender_name: one.senderName,
|
|
84
|
+
text: one.text,
|
|
85
|
+
})),
|
|
70
86
|
untrusted: hit.email ? [...MESSAGE_HIT_UNTRUSTED, ...MAIL_HIT_UNTRUSTED] : MESSAGE_HIT_UNTRUSTED,
|
|
71
87
|
});
|
|
72
88
|
};
|
|
@@ -51,6 +51,13 @@ export declare const conversationDetails: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
51
51
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
52
52
|
readonly text: v.StringSchema<undefined>;
|
|
53
53
|
}, undefined>, undefined>, undefined>;
|
|
54
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
55
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
56
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
57
|
+
readonly timestamp: 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`">]>;
|
|
58
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
59
|
+
readonly text: v.StringSchema<undefined>;
|
|
60
|
+
}, undefined>, undefined>, undefined>;
|
|
54
61
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
55
62
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
56
63
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -261,6 +268,13 @@ export declare const conversationDetails: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
261
268
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
262
269
|
readonly text: v.StringSchema<undefined>;
|
|
263
270
|
}, undefined>, undefined>, undefined>;
|
|
271
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
272
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
273
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
274
|
+
readonly timestamp: 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`">]>;
|
|
275
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
276
|
+
readonly text: v.StringSchema<undefined>;
|
|
277
|
+
}, undefined>, undefined>, undefined>;
|
|
264
278
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
265
279
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
266
280
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -42,6 +42,13 @@ export declare const contribution: v.StrictObjectSchema<{
|
|
|
42
42
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
43
43
|
readonly text: v.StringSchema<undefined>;
|
|
44
44
|
}, undefined>, undefined>, undefined>;
|
|
45
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
46
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
47
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
48
|
+
readonly timestamp: 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`">]>;
|
|
49
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
50
|
+
readonly text: v.StringSchema<undefined>;
|
|
51
|
+
}, undefined>, undefined>, undefined>;
|
|
45
52
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
46
53
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
47
54
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -252,6 +259,13 @@ export declare const contribution: v.StrictObjectSchema<{
|
|
|
252
259
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
253
260
|
readonly text: v.StringSchema<undefined>;
|
|
254
261
|
}, undefined>, undefined>, undefined>;
|
|
262
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
263
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
264
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
265
|
+
readonly timestamp: 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`">]>;
|
|
266
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
267
|
+
readonly text: v.StringSchema<undefined>;
|
|
268
|
+
}, undefined>, undefined>, undefined>;
|
|
255
269
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
256
270
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
257
271
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -500,6 +514,13 @@ export declare const contribution: v.StrictObjectSchema<{
|
|
|
500
514
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
501
515
|
readonly text: v.StringSchema<undefined>;
|
|
502
516
|
}, undefined>, undefined>, undefined>;
|
|
517
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
518
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
519
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
520
|
+
readonly timestamp: 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`">]>;
|
|
521
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
522
|
+
readonly text: v.StringSchema<undefined>;
|
|
523
|
+
}, undefined>, undefined>, undefined>;
|
|
503
524
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
504
525
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
505
526
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -710,6 +731,13 @@ export declare const contribution: v.StrictObjectSchema<{
|
|
|
710
731
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
711
732
|
readonly text: v.StringSchema<undefined>;
|
|
712
733
|
}, undefined>, undefined>, undefined>;
|
|
734
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
735
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
736
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
737
|
+
readonly timestamp: 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`">]>;
|
|
738
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
739
|
+
readonly text: v.StringSchema<undefined>;
|
|
740
|
+
}, undefined>, undefined>, undefined>;
|
|
713
741
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
714
742
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
715
743
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -994,6 +1022,13 @@ export declare const evidence: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
994
1022
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
995
1023
|
readonly text: v.StringSchema<undefined>;
|
|
996
1024
|
}, undefined>, undefined>, undefined>;
|
|
1025
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1026
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
1027
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1028
|
+
readonly timestamp: 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`">]>;
|
|
1029
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1030
|
+
readonly text: v.StringSchema<undefined>;
|
|
1031
|
+
}, undefined>, undefined>, undefined>;
|
|
997
1032
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
998
1033
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
999
1034
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -1204,6 +1239,13 @@ export declare const evidence: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
1204
1239
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1205
1240
|
readonly text: v.StringSchema<undefined>;
|
|
1206
1241
|
}, undefined>, undefined>, undefined>;
|
|
1242
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1243
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
1244
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1245
|
+
readonly timestamp: 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`">]>;
|
|
1246
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1247
|
+
readonly text: v.StringSchema<undefined>;
|
|
1248
|
+
}, undefined>, undefined>, undefined>;
|
|
1207
1249
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1208
1250
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
1209
1251
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -1452,6 +1494,13 @@ export declare const evidence: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
1452
1494
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1453
1495
|
readonly text: v.StringSchema<undefined>;
|
|
1454
1496
|
}, undefined>, undefined>, undefined>;
|
|
1497
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1498
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
1499
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1500
|
+
readonly timestamp: 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`">]>;
|
|
1501
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1502
|
+
readonly text: v.StringSchema<undefined>;
|
|
1503
|
+
}, undefined>, undefined>, undefined>;
|
|
1455
1504
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1456
1505
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
1457
1506
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -1662,6 +1711,13 @@ export declare const evidence: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
1662
1711
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1663
1712
|
readonly text: v.StringSchema<undefined>;
|
|
1664
1713
|
}, undefined>, undefined>, undefined>;
|
|
1714
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1715
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
1716
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1717
|
+
readonly timestamp: 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`">]>;
|
|
1718
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1719
|
+
readonly text: v.StringSchema<undefined>;
|
|
1720
|
+
}, undefined>, undefined>, undefined>;
|
|
1665
1721
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1666
1722
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
1667
1723
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -265,6 +265,13 @@ export declare const ENTITIES: {
|
|
|
265
265
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
266
266
|
readonly text: v.StringSchema<undefined>;
|
|
267
267
|
}, undefined>, undefined>, undefined>;
|
|
268
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
269
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
270
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
271
|
+
readonly timestamp: 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`">]>;
|
|
272
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
273
|
+
readonly text: v.StringSchema<undefined>;
|
|
274
|
+
}, undefined>, undefined>, undefined>;
|
|
268
275
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
269
276
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
270
277
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -475,6 +482,13 @@ export declare const ENTITIES: {
|
|
|
475
482
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
476
483
|
readonly text: v.StringSchema<undefined>;
|
|
477
484
|
}, undefined>, undefined>, undefined>;
|
|
485
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
486
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
487
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
488
|
+
readonly timestamp: 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`">]>;
|
|
489
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
490
|
+
readonly text: v.StringSchema<undefined>;
|
|
491
|
+
}, undefined>, undefined>, undefined>;
|
|
478
492
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
479
493
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
480
494
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -690,6 +704,13 @@ export declare const ENTITIES: {
|
|
|
690
704
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
691
705
|
readonly text: v.StringSchema<undefined>;
|
|
692
706
|
}, undefined>, undefined>, undefined>;
|
|
707
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
708
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
709
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
710
|
+
readonly timestamp: 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`">]>;
|
|
711
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
712
|
+
readonly text: v.StringSchema<undefined>;
|
|
713
|
+
}, undefined>, undefined>, undefined>;
|
|
693
714
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
694
715
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
695
716
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -1166,6 +1187,13 @@ export declare const ENTITIES: {
|
|
|
1166
1187
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1167
1188
|
readonly text: v.StringSchema<undefined>;
|
|
1168
1189
|
}, undefined>, undefined>, undefined>;
|
|
1190
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1191
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
1192
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1193
|
+
readonly timestamp: 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`">]>;
|
|
1194
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1195
|
+
readonly text: v.StringSchema<undefined>;
|
|
1196
|
+
}, undefined>, undefined>, undefined>;
|
|
1169
1197
|
readonly email: v.OptionalSchema<v.StrictObjectSchema<{
|
|
1170
1198
|
readonly subject: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1171
1199
|
readonly from: v.NullableSchema<v.StrictObjectSchema<{
|
|
@@ -1246,6 +1274,13 @@ export declare const ENTITIES: {
|
|
|
1246
1274
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1247
1275
|
readonly text: v.StringSchema<undefined>;
|
|
1248
1276
|
}, undefined>, undefined>, undefined>;
|
|
1277
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1278
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
1279
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1280
|
+
readonly timestamp: 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`">]>;
|
|
1281
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1282
|
+
readonly text: v.StringSchema<undefined>;
|
|
1283
|
+
}, undefined>, undefined>, undefined>;
|
|
1249
1284
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1250
1285
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
1251
1286
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -1456,6 +1491,13 @@ export declare const ENTITIES: {
|
|
|
1456
1491
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1457
1492
|
readonly text: v.StringSchema<undefined>;
|
|
1458
1493
|
}, undefined>, undefined>, undefined>;
|
|
1494
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1495
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
1496
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1497
|
+
readonly timestamp: 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`">]>;
|
|
1498
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1499
|
+
readonly text: v.StringSchema<undefined>;
|
|
1500
|
+
}, undefined>, undefined>, undefined>;
|
|
1459
1501
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1460
1502
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
1461
1503
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -1897,6 +1939,13 @@ export declare const ENTITIES: {
|
|
|
1897
1939
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1898
1940
|
readonly text: v.StringSchema<undefined>;
|
|
1899
1941
|
}, undefined>, undefined>, undefined>;
|
|
1942
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1943
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
1944
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1945
|
+
readonly timestamp: 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`">]>;
|
|
1946
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1947
|
+
readonly text: v.StringSchema<undefined>;
|
|
1948
|
+
}, undefined>, undefined>, undefined>;
|
|
1900
1949
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1901
1950
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
1902
1951
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -2107,6 +2156,13 @@ export declare const ENTITIES: {
|
|
|
2107
2156
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2108
2157
|
readonly text: v.StringSchema<undefined>;
|
|
2109
2158
|
}, undefined>, undefined>, undefined>;
|
|
2159
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
2160
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
2161
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2162
|
+
readonly timestamp: 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`">]>;
|
|
2163
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2164
|
+
readonly text: v.StringSchema<undefined>;
|
|
2165
|
+
}, undefined>, undefined>, undefined>;
|
|
2110
2166
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2111
2167
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
2112
2168
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -2321,6 +2377,13 @@ export declare const ENTITIES: {
|
|
|
2321
2377
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2322
2378
|
readonly text: v.StringSchema<undefined>;
|
|
2323
2379
|
}, undefined>, undefined>, undefined>;
|
|
2380
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
2381
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
2382
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2383
|
+
readonly timestamp: 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`">]>;
|
|
2384
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2385
|
+
readonly text: v.StringSchema<undefined>;
|
|
2386
|
+
}, undefined>, undefined>, undefined>;
|
|
2324
2387
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2325
2388
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
2326
2389
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -2531,6 +2594,13 @@ export declare const ENTITIES: {
|
|
|
2531
2594
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2532
2595
|
readonly text: v.StringSchema<undefined>;
|
|
2533
2596
|
}, undefined>, undefined>, undefined>;
|
|
2597
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
2598
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
2599
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2600
|
+
readonly timestamp: 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`">]>;
|
|
2601
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2602
|
+
readonly text: v.StringSchema<undefined>;
|
|
2603
|
+
}, undefined>, undefined>, undefined>;
|
|
2534
2604
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2535
2605
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
2536
2606
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -6779,6 +6849,13 @@ export declare const ENTITIES: {
|
|
|
6779
6849
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
6780
6850
|
readonly text: v.StringSchema<undefined>;
|
|
6781
6851
|
}, undefined>, undefined>, undefined>;
|
|
6852
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
6853
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
6854
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
6855
|
+
readonly timestamp: 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`">]>;
|
|
6856
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
6857
|
+
readonly text: v.StringSchema<undefined>;
|
|
6858
|
+
}, undefined>, undefined>, undefined>;
|
|
6782
6859
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
6783
6860
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
6784
6861
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -6989,6 +7066,13 @@ export declare const ENTITIES: {
|
|
|
6989
7066
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
6990
7067
|
readonly text: v.StringSchema<undefined>;
|
|
6991
7068
|
}, undefined>, undefined>, undefined>;
|
|
7069
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
7070
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
7071
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
7072
|
+
readonly timestamp: 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`">]>;
|
|
7073
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
7074
|
+
readonly text: v.StringSchema<undefined>;
|
|
7075
|
+
}, undefined>, undefined>, undefined>;
|
|
6992
7076
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
6993
7077
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
6994
7078
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -7442,6 +7526,13 @@ export declare const ENTITIES: {
|
|
|
7442
7526
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
7443
7527
|
readonly text: v.StringSchema<undefined>;
|
|
7444
7528
|
}, undefined>, undefined>, undefined>;
|
|
7529
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
7530
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
7531
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
7532
|
+
readonly timestamp: 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`">]>;
|
|
7533
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
7534
|
+
readonly text: v.StringSchema<undefined>;
|
|
7535
|
+
}, undefined>, undefined>, undefined>;
|
|
7445
7536
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
7446
7537
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
7447
7538
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -7943,6 +8034,13 @@ export declare const ENTITIES: {
|
|
|
7943
8034
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
7944
8035
|
readonly text: v.StringSchema<undefined>;
|
|
7945
8036
|
}, undefined>, undefined>, undefined>;
|
|
8037
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
8038
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
8039
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
8040
|
+
readonly timestamp: 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`">]>;
|
|
8041
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
8042
|
+
readonly text: v.StringSchema<undefined>;
|
|
8043
|
+
}, undefined>, undefined>, undefined>;
|
|
7946
8044
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
7947
8045
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
7948
8046
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -8620,6 +8718,13 @@ export declare const ENTITIES: {
|
|
|
8620
8718
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
8621
8719
|
readonly text: v.StringSchema<undefined>;
|
|
8622
8720
|
}, undefined>, undefined>, undefined>;
|
|
8721
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
8722
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
8723
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
8724
|
+
readonly timestamp: 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`">]>;
|
|
8725
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
8726
|
+
readonly text: v.StringSchema<undefined>;
|
|
8727
|
+
}, undefined>, undefined>, undefined>;
|
|
8623
8728
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
8624
8729
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
8625
8730
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -10248,6 +10353,13 @@ export declare const ENTITIES: {
|
|
|
10248
10353
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10249
10354
|
readonly text: v.StringSchema<undefined>;
|
|
10250
10355
|
}, undefined>, undefined>, undefined>;
|
|
10356
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
10357
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
10358
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10359
|
+
readonly timestamp: 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`">]>;
|
|
10360
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10361
|
+
readonly text: v.StringSchema<undefined>;
|
|
10362
|
+
}, undefined>, undefined>, undefined>;
|
|
10251
10363
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
10252
10364
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
10253
10365
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -10458,6 +10570,13 @@ export declare const ENTITIES: {
|
|
|
10458
10570
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10459
10571
|
readonly text: v.StringSchema<undefined>;
|
|
10460
10572
|
}, undefined>, undefined>, undefined>;
|
|
10573
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
10574
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
10575
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10576
|
+
readonly timestamp: 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`">]>;
|
|
10577
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10578
|
+
readonly text: v.StringSchema<undefined>;
|
|
10579
|
+
}, undefined>, undefined>, undefined>;
|
|
10461
10580
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
10462
10581
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
10463
10582
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -10706,6 +10825,13 @@ export declare const ENTITIES: {
|
|
|
10706
10825
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10707
10826
|
readonly text: v.StringSchema<undefined>;
|
|
10708
10827
|
}, undefined>, undefined>, undefined>;
|
|
10828
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
10829
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
10830
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10831
|
+
readonly timestamp: 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`">]>;
|
|
10832
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10833
|
+
readonly text: v.StringSchema<undefined>;
|
|
10834
|
+
}, undefined>, undefined>, undefined>;
|
|
10709
10835
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
10710
10836
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
10711
10837
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -10916,6 +11042,13 @@ export declare const ENTITIES: {
|
|
|
10916
11042
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10917
11043
|
readonly text: v.StringSchema<undefined>;
|
|
10918
11044
|
}, undefined>, undefined>, undefined>;
|
|
11045
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
11046
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
11047
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
11048
|
+
readonly timestamp: 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`">]>;
|
|
11049
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
11050
|
+
readonly text: v.StringSchema<undefined>;
|
|
11051
|
+
}, undefined>, undefined>, undefined>;
|
|
10919
11052
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
10920
11053
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
10921
11054
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
package/dist/entities/index.js
CHANGED
|
@@ -41,6 +41,13 @@ export declare const watchedMessage: v.StrictObjectSchema<{
|
|
|
41
41
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
42
42
|
readonly text: v.StringSchema<undefined>;
|
|
43
43
|
}, undefined>, undefined>, undefined>;
|
|
44
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
45
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
46
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
47
|
+
readonly timestamp: 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`">]>;
|
|
48
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
49
|
+
readonly text: v.StringSchema<undefined>;
|
|
50
|
+
}, undefined>, undefined>, undefined>;
|
|
44
51
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
45
52
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
46
53
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -543,6 +550,13 @@ export declare const messageEvent: v.VariantSchema<"event", [v.StrictObjectSchem
|
|
|
543
550
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
544
551
|
readonly text: v.StringSchema<undefined>;
|
|
545
552
|
}, undefined>, undefined>, undefined>;
|
|
553
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
554
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
555
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
556
|
+
readonly timestamp: 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`">]>;
|
|
557
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
558
|
+
readonly text: v.StringSchema<undefined>;
|
|
559
|
+
}, undefined>, undefined>, undefined>;
|
|
546
560
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
547
561
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
548
562
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -1152,6 +1166,13 @@ export declare const watchItem: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
1152
1166
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1153
1167
|
readonly text: v.StringSchema<undefined>;
|
|
1154
1168
|
}, undefined>, undefined>, undefined>;
|
|
1169
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1170
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
1171
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1172
|
+
readonly timestamp: 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`">]>;
|
|
1173
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1174
|
+
readonly text: v.StringSchema<undefined>;
|
|
1175
|
+
}, undefined>, undefined>, undefined>;
|
|
1155
1176
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1156
1177
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
1157
1178
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -1653,6 +1674,13 @@ export declare const watchItem: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
1653
1674
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1654
1675
|
readonly text: v.StringSchema<undefined>;
|
|
1655
1676
|
}, undefined>, undefined>, undefined>;
|
|
1677
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1678
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
1679
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1680
|
+
readonly timestamp: 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`">]>;
|
|
1681
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1682
|
+
readonly text: v.StringSchema<undefined>;
|
|
1683
|
+
}, undefined>, undefined>, undefined>;
|
|
1656
1684
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1657
1685
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
1658
1686
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -46,6 +46,13 @@ export declare const messageThread: v.StrictObjectSchema<{
|
|
|
46
46
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
47
47
|
readonly text: v.StringSchema<undefined>;
|
|
48
48
|
}, undefined>, undefined>, undefined>;
|
|
49
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
50
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
51
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
52
|
+
readonly timestamp: 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`">]>;
|
|
53
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
54
|
+
readonly text: v.StringSchema<undefined>;
|
|
55
|
+
}, undefined>, undefined>, undefined>;
|
|
49
56
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
50
57
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
51
58
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -280,6 +287,13 @@ export declare const messageContext: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
280
287
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
281
288
|
readonly text: v.StringSchema<undefined>;
|
|
282
289
|
}, undefined>, undefined>, undefined>;
|
|
290
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
291
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
292
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
293
|
+
readonly timestamp: 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`">]>;
|
|
294
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
295
|
+
readonly text: v.StringSchema<undefined>;
|
|
296
|
+
}, undefined>, undefined>, undefined>;
|
|
283
297
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
284
298
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
285
299
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -495,6 +509,13 @@ export declare const messageContext: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
495
509
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
496
510
|
readonly text: v.StringSchema<undefined>;
|
|
497
511
|
}, undefined>, undefined>, undefined>;
|
|
512
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
513
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
514
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
515
|
+
readonly timestamp: 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`">]>;
|
|
516
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
517
|
+
readonly text: v.StringSchema<undefined>;
|
|
518
|
+
}, undefined>, undefined>, undefined>;
|
|
498
519
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
499
520
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
500
521
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -42,6 +42,13 @@ export declare const messageWrite: v.StrictObjectSchema<{
|
|
|
42
42
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
43
43
|
readonly text: v.StringSchema<undefined>;
|
|
44
44
|
}, undefined>, undefined>, undefined>;
|
|
45
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
46
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
47
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
48
|
+
readonly timestamp: 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`">]>;
|
|
49
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
50
|
+
readonly text: v.StringSchema<undefined>;
|
|
51
|
+
}, undefined>, undefined>, undefined>;
|
|
45
52
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
46
53
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
47
54
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -253,6 +260,13 @@ export declare const messageWrite: v.StrictObjectSchema<{
|
|
|
253
260
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
254
261
|
readonly text: v.StringSchema<undefined>;
|
|
255
262
|
}, undefined>, undefined>, undefined>;
|
|
263
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
264
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
265
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
266
|
+
readonly timestamp: 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`">]>;
|
|
267
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
268
|
+
readonly text: v.StringSchema<undefined>;
|
|
269
|
+
}, undefined>, undefined>, undefined>;
|
|
256
270
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
257
271
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
258
272
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -472,6 +486,13 @@ export declare const messageSend: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
472
486
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
473
487
|
readonly text: v.StringSchema<undefined>;
|
|
474
488
|
}, undefined>, undefined>, undefined>;
|
|
489
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
490
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
491
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
492
|
+
readonly timestamp: 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`">]>;
|
|
493
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
494
|
+
readonly text: v.StringSchema<undefined>;
|
|
495
|
+
}, undefined>, undefined>, undefined>;
|
|
475
496
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
476
497
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
477
498
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -683,6 +704,13 @@ export declare const messageSend: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
683
704
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
684
705
|
readonly text: v.StringSchema<undefined>;
|
|
685
706
|
}, undefined>, undefined>, undefined>;
|
|
707
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
708
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
709
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
710
|
+
readonly timestamp: 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`">]>;
|
|
711
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
712
|
+
readonly text: v.StringSchema<undefined>;
|
|
713
|
+
}, undefined>, undefined>, undefined>;
|
|
686
714
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
687
715
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
688
716
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -55,6 +55,17 @@ export declare const message: v.StrictObjectSchema<{
|
|
|
55
55
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
56
56
|
readonly text: v.StringSchema<undefined>;
|
|
57
57
|
}, undefined>, undefined>, undefined>;
|
|
58
|
+
/**
|
|
59
|
+
* A discovery hit's later messages, from any chat the search reads, that share a rare word with it, latest first:
|
|
60
|
+
* one may change or cancel what the hit says.
|
|
61
|
+
*/
|
|
62
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
63
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
64
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
65
|
+
readonly timestamp: 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`">]>;
|
|
66
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
67
|
+
readonly text: v.StringSchema<undefined>;
|
|
68
|
+
}, undefined>, undefined>, undefined>;
|
|
58
69
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
59
70
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
60
71
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
package/dist/entities/message.js
CHANGED
|
@@ -59,6 +59,17 @@ export const message = v.strictObject({
|
|
|
59
59
|
})),
|
|
60
60
|
/** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
|
|
61
61
|
context: v.optional(v.array(v.strictObject({ ref: reference, timestamp: time, sender_name: v.nullable(text), text }))),
|
|
62
|
+
/**
|
|
63
|
+
* A discovery hit's later messages, from any chat the search reads, that share a rare word with it, latest first:
|
|
64
|
+
* one may change or cancel what the hit says.
|
|
65
|
+
*/
|
|
66
|
+
follow_ups: v.optional(v.array(v.strictObject({
|
|
67
|
+
ref: reference,
|
|
68
|
+
chat_title: v.nullable(text),
|
|
69
|
+
timestamp: time,
|
|
70
|
+
sender_name: v.nullable(text),
|
|
71
|
+
text,
|
|
72
|
+
}))),
|
|
62
73
|
outgoing: v.nullable(v.boolean()),
|
|
63
74
|
attachments: v.array(attachment),
|
|
64
75
|
reply_to: v.nullable(quoted),
|
|
@@ -65,6 +65,13 @@ export declare const storeExport: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
65
65
|
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
66
66
|
readonly text: v.StringSchema<undefined>;
|
|
67
67
|
}, undefined>, undefined>, undefined>;
|
|
68
|
+
readonly follow_ups: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
69
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
70
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
71
|
+
readonly timestamp: 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`">]>;
|
|
72
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
73
|
+
readonly text: v.StringSchema<undefined>;
|
|
74
|
+
}, undefined>, undefined>, undefined>;
|
|
68
75
|
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
69
76
|
readonly attachments: v.ArraySchema<v.StrictObjectSchema<{
|
|
70
77
|
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -12,6 +12,12 @@ export declare const RERANK_DEPTH = 50;
|
|
|
12
12
|
* ~7–10 s of it (cli-testing performance/search/evidence-pipeline, "In Core").
|
|
13
13
|
*/
|
|
14
14
|
export declare const RERANK_MILLISECONDS = 15000;
|
|
15
|
+
/**
|
|
16
|
+
* Follow-ups: each of the first 5 hits gets up to 2 later messages that share a word at most 3 messages hold. A
|
|
17
|
+
* blind benchmark split found 4 more of 15 cancelled decisions this way and lost no answer (cli-testing
|
|
18
|
+
* performance/search/evidence-pipeline, "Cancelled decisions and long messages").
|
|
19
|
+
*/
|
|
20
|
+
export declare const FOLLOW_UP_HITS = 5;
|
|
15
21
|
/** The reranker, opened; or why discovery keeps its own order. */
|
|
16
22
|
export type RerankLane = () => Promise<{
|
|
17
23
|
model: string;
|
|
@@ -18,11 +18,23 @@ const RERANK_CHUNK = 5;
|
|
|
18
18
|
* ~7–10 s of it (cli-testing performance/search/evidence-pipeline, "In Core").
|
|
19
19
|
*/
|
|
20
20
|
export const RERANK_MILLISECONDS = 15_000;
|
|
21
|
+
/**
|
|
22
|
+
* Follow-ups: each of the first 5 hits gets up to 2 later messages that share a word at most 3 messages hold. A
|
|
23
|
+
* blind benchmark split found 4 more of 15 cancelled decisions this way and lost no answer (cli-testing
|
|
24
|
+
* performance/search/evidence-pipeline, "Cancelled decisions and long messages").
|
|
25
|
+
*/
|
|
26
|
+
export const FOLLOW_UP_HITS = 5;
|
|
27
|
+
const FOLLOW_UPS_PER_HIT = 2;
|
|
28
|
+
const RARE_AT = 3;
|
|
29
|
+
/** Later messages read per hit before the search's filters; the latest that pass are kept. */
|
|
30
|
+
const FOLLOW_UP_CANDIDATES = 20;
|
|
21
31
|
export const searchDiscovery = async (store, account, asked, messenger = {}, meaning, rerank) => {
|
|
22
|
-
// A question's own "?" would parse as a one-character wildcard and send it to strict search (BUG-395)
|
|
32
|
+
// A question's own "?" would parse as a one-character wildcard and send it to strict search (BUG-395); the
|
|
33
|
+
// colon of a time or ratio ("22:00", "1:1") would parse as a field and fail the whole search, and escaped it is
|
|
34
|
+
// syntax again, so it splits the numbers (BUG-450).
|
|
23
35
|
const request = asked.ast !== undefined || asked.exact || !asked.text
|
|
24
36
|
? asked
|
|
25
|
-
: { ...asked, text: asked.text.replace(/(?<=\p{L})\?(?=\s|$)/gu, "") };
|
|
37
|
+
: { ...asked, text: asked.text.replace(/(?<=\p{L})\?(?=\s|$)/gu, "").replace(/(?<=\d):(?=\d)/gu, " ") };
|
|
26
38
|
const original = await prepareLucene(store, account, request, messenger);
|
|
27
39
|
const text = request.text ?? "";
|
|
28
40
|
const plan = planQuestion(text, request.ast !== undefined || !!request.exact || !!request.newest);
|
|
@@ -208,7 +220,10 @@ export const searchDiscovery = async (store, account, asked, messenger = {}, mea
|
|
|
208
220
|
started += performance.now() - opening;
|
|
209
221
|
}
|
|
210
222
|
check();
|
|
211
|
-
const
|
|
223
|
+
const followUps = await followUpsOf(store, account, request, messenger, candidates, plan.scope);
|
|
224
|
+
const items = await Promise.all(candidates.slice(0, request.limit).map(async ({ fused: _fused, ...hit }) => {
|
|
225
|
+
const later = followUps.get(hit.locator);
|
|
226
|
+
const m = later?.length ? { ...hit, followUps: later } : hit;
|
|
212
227
|
if (!request.context)
|
|
213
228
|
return m;
|
|
214
229
|
check();
|
|
@@ -235,6 +250,7 @@ export const searchDiscovery = async (store, account, asked, messenger = {}, mea
|
|
|
235
250
|
candidateDepth: 300,
|
|
236
251
|
candidates: candidates.length,
|
|
237
252
|
repliesAdded: replyCount,
|
|
253
|
+
followUps: [...followUps.values()].reduce((sum, later) => sum + later.length, 0),
|
|
238
254
|
truncated,
|
|
239
255
|
terms,
|
|
240
256
|
queries: [...(plan.changed ? [] : plan.queries), relaxed],
|
|
@@ -247,6 +263,37 @@ export const searchDiscovery = async (store, account, asked, messenger = {}, mea
|
|
|
247
263
|
...(lane && "partly" in lane && lane.partly ? { meaningSkipped: lane.partly } : {}),
|
|
248
264
|
};
|
|
249
265
|
};
|
|
266
|
+
/**
|
|
267
|
+
* The follow-ups of the first hits that the question's filters allow, by hit. A message already shown above — a hit
|
|
268
|
+
* or an earlier hit's follow-up — is not shown again, as the benchmark skipped it.
|
|
269
|
+
*/
|
|
270
|
+
const followUpsOf = async (store, account, request, messenger, candidates, scope) => {
|
|
271
|
+
const head = candidates.slice(0, Math.min(FOLLOW_UP_HITS, request.limit));
|
|
272
|
+
const later = await store.messages.laterSharingRare(head.map((hit) => ({ account: accountOfHit(hit), chatId: hit.chatId, id: hit.id })), { rareAt: RARE_AT, limit: FOLLOW_UP_CANDIDATES });
|
|
273
|
+
const only = [...new Map(later.flat().map((m) => [m.locator, m])).values()].map((m) => ({
|
|
274
|
+
...accountOfHit(m),
|
|
275
|
+
chatId: m.chatId,
|
|
276
|
+
id: m.id,
|
|
277
|
+
}));
|
|
278
|
+
const out = new Map();
|
|
279
|
+
if (!only.length)
|
|
280
|
+
return out;
|
|
281
|
+
const eligible = await searchLucene(store, account, { ...request, text: scope || undefined, ast: undefined, limit: only.length, only, context: 0, thread: undefined }, messenger);
|
|
282
|
+
const allowed = new Map(eligible.items.map((m) => [m.locator, m]));
|
|
283
|
+
const shown = new Set();
|
|
284
|
+
head.forEach((hit, i) => {
|
|
285
|
+
shown.add(hit.locator);
|
|
286
|
+
const picked = (later[i] ?? [])
|
|
287
|
+
.flatMap((m) => allowed.get(m.locator) ?? [])
|
|
288
|
+
.slice(0, FOLLOW_UPS_PER_HIT)
|
|
289
|
+
.filter((m) => !shown.has(m.locator));
|
|
290
|
+
for (const m of picked)
|
|
291
|
+
shown.add(m.locator);
|
|
292
|
+
if (picked.length)
|
|
293
|
+
out.set(hit.locator, picked);
|
|
294
|
+
});
|
|
295
|
+
return out;
|
|
296
|
+
};
|
|
250
297
|
/** The nearest messages the question's filters allow, as hits, nearest first. */
|
|
251
298
|
export const nearEligible = async (store, account, request, messenger, ranked, scope) => {
|
|
252
299
|
const keyOf = (one) => JSON.stringify([one.provider, one.account, one.chatId, one.id]);
|
|
@@ -12,6 +12,8 @@ export interface QueryMetadata {
|
|
|
12
12
|
candidateDepth: number;
|
|
13
13
|
candidates: number;
|
|
14
14
|
repliesAdded: number;
|
|
15
|
+
/** Later messages shown with the first hits because they share a rare word with one. */
|
|
16
|
+
followUps: number;
|
|
15
17
|
truncated: boolean;
|
|
16
18
|
terms: string[];
|
|
17
19
|
queries: string[];
|
|
@@ -97,6 +97,8 @@ export type FoundMessage = StoredHit & {
|
|
|
97
97
|
exact?: boolean;
|
|
98
98
|
source?: HitSource;
|
|
99
99
|
context?: WindowedMessage[];
|
|
100
|
+
/** A discovery hit's later messages that share a rare word with it, latest first; one may change or cancel it. */
|
|
101
|
+
followUps?: FoundMessage[];
|
|
100
102
|
thread?: ThreadContext;
|
|
101
103
|
};
|
|
102
104
|
export interface SearchFound extends Page<FoundMessage> {
|
package/dist/store/messages.d.ts
CHANGED
|
@@ -157,6 +157,15 @@ export interface MessagesStore extends AccountMessages {
|
|
|
157
157
|
chatId: Id;
|
|
158
158
|
id: Id;
|
|
159
159
|
}[], limit: number): Promise<Page<StoredHit>>;
|
|
160
|
+
/** Per message, later messages sharing a word at most `rareAt` messages hold, latest first; empty until stems are built. */
|
|
161
|
+
laterSharingRare(wanted: {
|
|
162
|
+
account: AccountKey;
|
|
163
|
+
chatId: Id;
|
|
164
|
+
id: Id;
|
|
165
|
+
}[], options: {
|
|
166
|
+
rareAt: number;
|
|
167
|
+
limit: number;
|
|
168
|
+
}): Promise<StoredHit[][]>;
|
|
160
169
|
}
|
|
161
170
|
export declare const accountMessagesOver: (context: StoreContext) => AccountMessages;
|
|
162
171
|
export declare const messagesStoreOver: (context: StoreContext, keyed: AccountMessages) => MessagesStore;
|
package/dist/store/messages.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { keysOver } from "./keys.js";
|
|
2
2
|
import { applyCounterObservations } from "./sqlite/counters.js";
|
|
3
3
|
import { documentLinkMessages } from "./sqlite/document-links.js";
|
|
4
|
+
import { laterSharingRare } from "./sqlite/follow-ups.js";
|
|
4
5
|
import * as messageWrites from "./sqlite/messages.js";
|
|
5
6
|
import * as personLinks from "./sqlite/person-links.js";
|
|
6
7
|
import * as reads from "./sqlite/reads.js";
|
|
@@ -144,4 +145,5 @@ export const messagesStoreOver = (context, keyed) => ({
|
|
|
144
145
|
search: async (query, { limit, account }) => search.find(context, { text: query, limit, ...(account ? { account } : {}) }),
|
|
145
146
|
find: async (filter) => search.find(context, filter),
|
|
146
147
|
directReplies: async (parents, limit) => search.directReplies(context, parents, limit),
|
|
148
|
+
laterSharingRare: async (wanted, options) => laterSharingRare(context, wanted, options),
|
|
147
149
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AccountKey, StoredHit } from "../types.js";
|
|
2
|
+
import type { StoreContext } from "./open.js";
|
|
3
|
+
/**
|
|
4
|
+
* For each message, the later messages of the store that share a rare word with it, latest first, at most `limit`
|
|
5
|
+
* each. A word is rare when at most `rareAt` messages hold its stem. A message that cancels or changes a decision
|
|
6
|
+
* often names the same supplier, code or term without replying to it (cli-testing
|
|
7
|
+
* performance/search/evidence-pipeline, "Cancelled decisions and long messages"). Empty while the stems are not
|
|
8
|
+
* built, since their counts would be short.
|
|
9
|
+
*/
|
|
10
|
+
export declare const laterSharingRare: (context: StoreContext, wanted: {
|
|
11
|
+
account: AccountKey;
|
|
12
|
+
chatId: string;
|
|
13
|
+
id: string;
|
|
14
|
+
}[], { rareAt, limit }: {
|
|
15
|
+
rareAt: number;
|
|
16
|
+
limit: number;
|
|
17
|
+
}) => StoredHit[][];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CliError } from "@wirecat/cli-base";
|
|
2
|
+
import { hitsByPk } from "./search.js";
|
|
3
|
+
import { stemmerCache, stemsState, storeStemmers } from "./stems.js";
|
|
4
|
+
const stemmerFor = stemmerCache();
|
|
5
|
+
/**
|
|
6
|
+
* For each message, the later messages of the store that share a rare word with it, latest first, at most `limit`
|
|
7
|
+
* each. A word is rare when at most `rareAt` messages hold its stem. A message that cancels or changes a decision
|
|
8
|
+
* often names the same supplier, code or term without replying to it (cli-testing
|
|
9
|
+
* performance/search/evidence-pipeline, "Cancelled decisions and long messages"). Empty while the stems are not
|
|
10
|
+
* built, since their counts would be short.
|
|
11
|
+
*/
|
|
12
|
+
export const laterSharingRare = (context, wanted, { rareAt, limit }) => {
|
|
13
|
+
if (wanted.length > 50 || !Number.isInteger(limit) || limit < 1 || limit > 100)
|
|
14
|
+
throw new CliError("validation_error", "a follow-up lookup takes at most 50 messages and 1–100 results each");
|
|
15
|
+
const { database } = context;
|
|
16
|
+
const stemmers = storeStemmers(database);
|
|
17
|
+
if (!wanted.length || !stemmers || !stemsState(database)?.ready)
|
|
18
|
+
return wanted.map(() => []);
|
|
19
|
+
const stemmer = stemmerFor(stemmers);
|
|
20
|
+
// A temporary table: reading the index's own counts needs no migration, and it leaves with the connection.
|
|
21
|
+
database.exec("CREATE VIRTUAL TABLE IF NOT EXISTS temp.message_stem_counts USING fts5vocab(main, message_stems, col)");
|
|
22
|
+
const count = database.prepare("SELECT doc FROM temp.message_stem_counts WHERE term = ? AND col = 'stems'");
|
|
23
|
+
const counts = new Map();
|
|
24
|
+
const countOf = (stem) => {
|
|
25
|
+
let found = counts.get(stem);
|
|
26
|
+
if (found === undefined) {
|
|
27
|
+
found = Number(count.get(stem)?.doc ?? 0);
|
|
28
|
+
counts.set(stem, found);
|
|
29
|
+
}
|
|
30
|
+
return found;
|
|
31
|
+
};
|
|
32
|
+
const message = database.prepare(`
|
|
33
|
+
SELECT m.text, m.sent_at FROM accounts ac
|
|
34
|
+
JOIN chats c ON c.account_id = ac.id AND c.external_id = ?
|
|
35
|
+
JOIN messages m ON m.chat_id = c.id AND m.external_id = ?
|
|
36
|
+
WHERE ac.provider = ? AND ac.external_id = ? AND m.deleted_at IS NULL
|
|
37
|
+
`);
|
|
38
|
+
const later = database.prepare(`
|
|
39
|
+
SELECT m.id FROM message_stems s JOIN messages m ON m.id = s.rowid
|
|
40
|
+
WHERE message_stems MATCH ? AND m.deleted_at IS NULL AND m.sent_at > ?
|
|
41
|
+
ORDER BY m.sent_at DESC, m.id DESC LIMIT ?
|
|
42
|
+
`);
|
|
43
|
+
return wanted.map(({ account, chatId, id }) => {
|
|
44
|
+
const row = message.get(chatId, id, account.provider, account.account);
|
|
45
|
+
if (!row)
|
|
46
|
+
return [];
|
|
47
|
+
// Words of three letters or more, as the benchmark took them: a number or a code with digits is not a name here.
|
|
48
|
+
const stems = new Set(stemmer
|
|
49
|
+
.explain(String(row.text))
|
|
50
|
+
.filter(({ word }) => /^\p{L}{3,}$/u.test(word))
|
|
51
|
+
.map(({ word }) => stemmer.stemToken(word))
|
|
52
|
+
.filter(Boolean));
|
|
53
|
+
const rare = [...stems].filter((stem) => countOf(stem) <= rareAt);
|
|
54
|
+
if (!rare.length)
|
|
55
|
+
return [];
|
|
56
|
+
const match = `stems : (${rare.map((stem) => `"${stem.replaceAll('"', '""')}"`).join(" OR ")})`;
|
|
57
|
+
return hitsByPk(context, later.all(match, Number(row.sent_at), limit).map((one) => Number(one.id)));
|
|
58
|
+
});
|
|
59
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.492.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|