@wirecat/cli-core 0.433.0 → 0.435.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 +43 -1
- package/dist/cli/messenger/context.js +1 -0
- package/dist/cli/messenger/conversation-answers.d.ts +1 -0
- package/dist/cli/messenger/conversations-command.js +2 -2
- package/dist/cli/messenger/message-answers.d.ts +1 -0
- package/dist/cli/messenger/message-writes.d.ts +2 -0
- package/dist/cli/messenger/messages-search-command.js +6 -10
- package/dist/cli/messenger/models-command.js +34 -7
- package/dist/cli/messenger/search-answers.d.ts +3 -0
- package/dist/cli/messenger/search-answers.js +40 -8
- package/dist/cli/messenger/search-command.js +3 -1
- package/dist/cli/messenger/store-maintenance-command.js +11 -5
- package/dist/cli/model-catalogue-command.js +1 -1
- package/dist/cli/settings.d.ts +4 -0
- package/dist/cli/settings.js +5 -0
- package/dist/cli/shared-command-exports.d.ts +4 -0
- package/dist/embeddings/child.js +15 -5
- package/dist/embeddings/embed.d.ts +16 -2
- package/dist/embeddings/embed.js +57 -28
- package/dist/embeddings/models.d.ts +18 -0
- package/dist/embeddings/models.js +69 -0
- package/dist/embeddings/process.d.ts +6 -1
- package/dist/embeddings/process.js +23 -7
- package/dist/embeddings/rerank.d.ts +10 -0
- package/dist/embeddings/rerank.js +31 -0
- package/dist/entities/conversation-results.d.ts +2 -0
- package/dist/entities/evidence.d.ts +8 -0
- package/dist/entities/index.d.ts +37 -4
- package/dist/entities/listener.d.ts +4 -0
- package/dist/entities/message-context.d.ts +3 -0
- package/dist/entities/message-write.d.ts +4 -0
- package/dist/entities/message.d.ts +2 -0
- package/dist/entities/message.js +2 -0
- package/dist/entities/model.d.ts +5 -2
- package/dist/entities/model.js +5 -2
- package/dist/entities/store-maintenance.d.ts +11 -3
- package/dist/entities/store-maintenance.js +18 -2
- package/dist/entities/store-records.d.ts +1 -0
- package/dist/errors/reasons.js +7 -0
- package/dist/mcp/tool.d.ts +1 -1
- package/dist/mcp/tool.js +1 -0
- package/dist/services/deps.d.ts +3 -0
- package/dist/services/embeddings-maintenance.d.ts +10 -2
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +1 -0
- package/dist/services/messages-archive-search.d.ts +2 -2
- package/dist/services/messages-archive-search.js +4 -4
- package/dist/services/messages-discovery.d.ts +33 -4
- package/dist/services/messages-discovery.js +88 -3
- package/dist/services/messages-meaning.d.ts +2 -1
- package/dist/services/messages-meaning.js +7 -3
- package/dist/services/messages-rerank.d.ts +7 -0
- package/dist/services/messages-rerank.js +42 -0
- package/dist/services/messages-search.d.ts +5 -0
- package/dist/services/messages.d.ts +6 -2
- package/dist/services/messages.js +4 -3
- package/dist/services/model-downloads.d.ts +3 -1
- package/dist/services/model-downloads.js +20 -1
- package/dist/services/notes-search.d.ts +7 -2
- package/dist/services/notes-search.js +7 -4
- package/dist/services/search-all-meetings.d.ts +3 -2
- package/dist/services/search-all-meetings.js +8 -8
- package/dist/services/search-all.d.ts +7 -1
- package/dist/services/search-all.js +109 -45
- package/dist/store/drivers/bun-sqlite.d.ts +6 -0
- package/dist/store/drivers/bun-sqlite.js +16 -1
- package/dist/store/drivers/node-sqlite.d.ts +5 -1
- package/dist/store/drivers/node-sqlite.js +15 -1
- package/dist/store/exports.d.ts +1 -0
- package/dist/store/exports.js +1 -0
- package/dist/store/sqlite/accounts.js +2 -2
- package/dist/store/sqlite/chats.d.ts +1 -1
- package/dist/store/sqlite/chats.js +11 -4
- package/dist/store/sqlite/document-pictures.js +5 -7
- package/dist/store/sqlite/email-index.d.ts +1 -3
- package/dist/store/sqlite/email-index.js +5 -21
- package/dist/store/sqlite/emails.js +4 -3
- package/dist/store/sqlite/image-chunks.d.ts +3 -3
- package/dist/store/sqlite/image-chunks.js +55 -25
- package/dist/store/sqlite/manifest.js +2 -0
- package/dist/store/sqlite/meeting-vectors.js +11 -9
- package/dist/store/sqlite/message-chunks.d.ts +5 -2
- package/dist/store/sqlite/message-chunks.js +44 -20
- package/dist/store/sqlite/migrations.generated.js +22 -0
- package/dist/store/sqlite/note-index.js +2 -7
- package/dist/store/sqlite/open-store.js +4 -0
- package/dist/store/sqlite/open.js +4 -6
- package/dist/store/sqlite/schema.d.ts +118 -1
- package/dist/store/sqlite/schema.js +18 -1
- package/dist/store/sqlite/vector-index.d.ts +76 -0
- package/dist/store/sqlite/vector-index.js +205 -0
- package/dist/store/sqlite/vectors.d.ts +8 -5
- package/dist/store/sqlite/vectors.js +82 -39
- package/dist/store/vector-extension.d.ts +10 -0
- package/dist/store/vector-extension.js +53 -0
- package/package.json +2 -2
package/dist/entities/index.d.ts
CHANGED
|
@@ -255,6 +255,7 @@ export declare const ENTITIES: {
|
|
|
255
255
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
256
256
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
257
257
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
258
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
258
259
|
}, undefined>, undefined>;
|
|
259
260
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
260
261
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -442,6 +443,7 @@ export declare const ENTITIES: {
|
|
|
442
443
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
443
444
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
444
445
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
446
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
445
447
|
}, undefined>, undefined>;
|
|
446
448
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
447
449
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -634,6 +636,7 @@ export declare const ENTITIES: {
|
|
|
634
636
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
635
637
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
636
638
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
639
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
637
640
|
}, undefined>, undefined>;
|
|
638
641
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
639
642
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -1099,6 +1102,7 @@ export declare const ENTITIES: {
|
|
|
1099
1102
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1100
1103
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
1101
1104
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
1105
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1102
1106
|
}, undefined>, undefined>;
|
|
1103
1107
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1104
1108
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -1286,6 +1290,7 @@ export declare const ENTITIES: {
|
|
|
1286
1290
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1287
1291
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
1288
1292
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
1293
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1289
1294
|
}, undefined>, undefined>;
|
|
1290
1295
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1291
1296
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -1461,6 +1466,7 @@ export declare const ENTITIES: {
|
|
|
1461
1466
|
missing_terms: string[];
|
|
1462
1467
|
parent?: string | undefined;
|
|
1463
1468
|
found_by?: ("meaning" | "words")[] | undefined;
|
|
1469
|
+
reranker_score?: number | undefined;
|
|
1464
1470
|
} | undefined;
|
|
1465
1471
|
context?: {
|
|
1466
1472
|
ref: string;
|
|
@@ -1525,6 +1531,7 @@ export declare const ENTITIES: {
|
|
|
1525
1531
|
missing_terms: string[];
|
|
1526
1532
|
parent?: string | undefined;
|
|
1527
1533
|
found_by?: ("meaning" | "words")[] | undefined;
|
|
1534
|
+
reranker_score?: number | undefined;
|
|
1528
1535
|
} | undefined;
|
|
1529
1536
|
context?: {
|
|
1530
1537
|
ref: string;
|
|
@@ -1590,6 +1597,7 @@ export declare const ENTITIES: {
|
|
|
1590
1597
|
missing_terms: string[];
|
|
1591
1598
|
parent?: string | undefined;
|
|
1592
1599
|
found_by?: ("meaning" | "words")[] | undefined;
|
|
1600
|
+
reranker_score?: number | undefined;
|
|
1593
1601
|
} | undefined;
|
|
1594
1602
|
context?: {
|
|
1595
1603
|
ref: string;
|
|
@@ -1656,6 +1664,7 @@ export declare const ENTITIES: {
|
|
|
1656
1664
|
missing_terms: string[];
|
|
1657
1665
|
parent?: string | undefined;
|
|
1658
1666
|
found_by?: ("meaning" | "words")[] | undefined;
|
|
1667
|
+
reranker_score?: number | undefined;
|
|
1659
1668
|
} | undefined;
|
|
1660
1669
|
context?: {
|
|
1661
1670
|
ref: string;
|
|
@@ -1721,6 +1730,7 @@ export declare const ENTITIES: {
|
|
|
1721
1730
|
missing_terms: string[];
|
|
1722
1731
|
parent?: string | undefined;
|
|
1723
1732
|
found_by?: ("meaning" | "words")[] | undefined;
|
|
1733
|
+
reranker_score?: number | undefined;
|
|
1724
1734
|
} | undefined;
|
|
1725
1735
|
context?: {
|
|
1726
1736
|
ref: string;
|
|
@@ -1801,6 +1811,7 @@ export declare const ENTITIES: {
|
|
|
1801
1811
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1802
1812
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
1803
1813
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
1814
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1804
1815
|
}, undefined>, undefined>;
|
|
1805
1816
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1806
1817
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -1988,6 +1999,7 @@ export declare const ENTITIES: {
|
|
|
1988
1999
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1989
2000
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
1990
2001
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
2002
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1991
2003
|
}, undefined>, undefined>;
|
|
1992
2004
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1993
2005
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -2366,6 +2378,7 @@ export declare const ENTITIES: {
|
|
|
2366
2378
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
2367
2379
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
2368
2380
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
2381
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
2369
2382
|
}, undefined>, undefined>;
|
|
2370
2383
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
2371
2384
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -2553,6 +2566,7 @@ export declare const ENTITIES: {
|
|
|
2553
2566
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
2554
2567
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
2555
2568
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
2569
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
2556
2570
|
}, undefined>, undefined>;
|
|
2557
2571
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
2558
2572
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -2744,6 +2758,7 @@ export declare const ENTITIES: {
|
|
|
2744
2758
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
2745
2759
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
2746
2760
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
2761
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
2747
2762
|
}, undefined>, undefined>;
|
|
2748
2763
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
2749
2764
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -2931,6 +2946,7 @@ export declare const ENTITIES: {
|
|
|
2931
2946
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
2932
2947
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
2933
2948
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
2949
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
2934
2950
|
}, undefined>, undefined>;
|
|
2935
2951
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
2936
2952
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -7331,6 +7347,7 @@ export declare const ENTITIES: {
|
|
|
7331
7347
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
7332
7348
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
7333
7349
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
7350
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
7334
7351
|
}, undefined>, undefined>;
|
|
7335
7352
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
7336
7353
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -7518,6 +7535,7 @@ export declare const ENTITIES: {
|
|
|
7518
7535
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
7519
7536
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
7520
7537
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
7538
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
7521
7539
|
}, undefined>, undefined>;
|
|
7522
7540
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
7523
7541
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -7948,6 +7966,7 @@ export declare const ENTITIES: {
|
|
|
7948
7966
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
7949
7967
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
7950
7968
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
7969
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
7951
7970
|
}, undefined>, undefined>;
|
|
7952
7971
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
7953
7972
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -8426,6 +8445,7 @@ export declare const ENTITIES: {
|
|
|
8426
8445
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
8427
8446
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
8428
8447
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
8448
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
8429
8449
|
}, undefined>, undefined>;
|
|
8430
8450
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
8431
8451
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -9080,6 +9100,7 @@ export declare const ENTITIES: {
|
|
|
9080
9100
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
9081
9101
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
9082
9102
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
9103
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
9083
9104
|
}, undefined>, undefined>;
|
|
9084
9105
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
9085
9106
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -9690,6 +9711,7 @@ export declare const ENTITIES: {
|
|
|
9690
9711
|
readonly integrity: v.BooleanSchema<undefined>;
|
|
9691
9712
|
readonly foreign_keys: v.BooleanSchema<undefined>;
|
|
9692
9713
|
readonly search_indexes: v.BooleanSchema<undefined>;
|
|
9714
|
+
readonly vector_indexes: v.BooleanSchema<undefined>;
|
|
9693
9715
|
readonly disk: v.BooleanSchema<undefined>;
|
|
9694
9716
|
}, undefined>;
|
|
9695
9717
|
readonly schema: v.StrictObjectSchema<{
|
|
@@ -9756,9 +9778,15 @@ export declare const ENTITIES: {
|
|
|
9756
9778
|
readonly models: v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
9757
9779
|
readonly unused: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
9758
9780
|
}, undefined>, undefined>;
|
|
9759
|
-
readonly
|
|
9760
|
-
readonly
|
|
9761
|
-
|
|
9781
|
+
readonly vector_indexes: v.ArraySchema<v.StrictObjectSchema<{
|
|
9782
|
+
readonly model: v.StringSchema<undefined>;
|
|
9783
|
+
readonly dims: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
9784
|
+
readonly ready: v.BooleanSchema<undefined>;
|
|
9785
|
+
readonly indexed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
9786
|
+
readonly expected: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
9787
|
+
readonly missing: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
9788
|
+
readonly extra: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
9789
|
+
}, undefined>, undefined>;
|
|
9762
9790
|
}, undefined>], undefined>;
|
|
9763
9791
|
readonly store_migration: v.UnionSchema<[v.StrictObjectSchema<{
|
|
9764
9792
|
readonly path: v.StringSchema<undefined>;
|
|
@@ -9787,6 +9815,7 @@ export declare const ENTITIES: {
|
|
|
9787
9815
|
readonly exists: v.LiteralSchema<true, undefined>;
|
|
9788
9816
|
readonly file_texts: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
9789
9817
|
readonly involvements: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
9818
|
+
readonly unused_vectors_dropped: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
9790
9819
|
}, undefined>], undefined>;
|
|
9791
9820
|
readonly store_backup: v.StrictObjectSchema<{
|
|
9792
9821
|
readonly path: v.StringSchema<undefined>;
|
|
@@ -9984,7 +10013,7 @@ export declare const ENTITIES: {
|
|
|
9984
10013
|
}, undefined>;
|
|
9985
10014
|
readonly model: v.StrictObjectSchema<{
|
|
9986
10015
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
9987
|
-
readonly kind: v.PicklistSchema<["audio", "text", "image"], undefined>;
|
|
10016
|
+
readonly kind: v.PicklistSchema<["audio", "text", "image", "reranker"], undefined>;
|
|
9988
10017
|
readonly title: v.StringSchema<undefined>;
|
|
9989
10018
|
readonly languages: v.StringSchema<undefined>;
|
|
9990
10019
|
readonly licence: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -10667,6 +10696,7 @@ export declare const ENTITIES: {
|
|
|
10667
10696
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
10668
10697
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
10669
10698
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
10699
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
10670
10700
|
}, undefined>, undefined>;
|
|
10671
10701
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
10672
10702
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -10854,6 +10884,7 @@ export declare const ENTITIES: {
|
|
|
10854
10884
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
10855
10885
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
10856
10886
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
10887
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
10857
10888
|
}, undefined>, undefined>;
|
|
10858
10889
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
10859
10890
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -11079,6 +11110,7 @@ export declare const ENTITIES: {
|
|
|
11079
11110
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
11080
11111
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
11081
11112
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
11113
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
11082
11114
|
}, undefined>, undefined>;
|
|
11083
11115
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
11084
11116
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -11266,6 +11298,7 @@ export declare const ENTITIES: {
|
|
|
11266
11298
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
11267
11299
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
11268
11300
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
11301
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
11269
11302
|
}, undefined>, undefined>;
|
|
11270
11303
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
11271
11304
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -32,6 +32,7 @@ export declare const watchedMessage: v.StrictObjectSchema<{
|
|
|
32
32
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
33
33
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
34
34
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
35
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
35
36
|
}, undefined>, undefined>;
|
|
36
37
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
37
38
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -511,6 +512,7 @@ export declare const messageEvent: v.VariantSchema<"event", [v.StrictObjectSchem
|
|
|
511
512
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
512
513
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
513
514
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
515
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
514
516
|
}, undefined>, undefined>;
|
|
515
517
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
516
518
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -1097,6 +1099,7 @@ export declare const watchItem: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
1097
1099
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1098
1100
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
1099
1101
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
1102
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1100
1103
|
}, undefined>, undefined>;
|
|
1101
1104
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1102
1105
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -1575,6 +1578,7 @@ export declare const watchItem: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
1575
1578
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1576
1579
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
1577
1580
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
1581
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1578
1582
|
}, undefined>, undefined>;
|
|
1579
1583
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
1580
1584
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -37,6 +37,7 @@ export declare const messageThread: v.StrictObjectSchema<{
|
|
|
37
37
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
38
38
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
39
39
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
40
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
40
41
|
}, undefined>, undefined>;
|
|
41
42
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
42
43
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -248,6 +249,7 @@ export declare const messageContext: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
248
249
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
249
250
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
250
251
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
252
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
251
253
|
}, undefined>, undefined>;
|
|
252
254
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
253
255
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -440,6 +442,7 @@ export declare const messageContext: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
440
442
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
441
443
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
442
444
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
445
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
443
446
|
}, undefined>, undefined>;
|
|
444
447
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
445
448
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -33,6 +33,7 @@ export declare const messageWrite: v.StrictObjectSchema<{
|
|
|
33
33
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
34
34
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
35
35
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
36
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
36
37
|
}, undefined>, undefined>;
|
|
37
38
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
38
39
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -221,6 +222,7 @@ export declare const messageWrite: v.StrictObjectSchema<{
|
|
|
221
222
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
222
223
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
223
224
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
225
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
224
226
|
}, undefined>, undefined>;
|
|
225
227
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
226
228
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -417,6 +419,7 @@ export declare const messageSend: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
417
419
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
418
420
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
419
421
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
422
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
420
423
|
}, undefined>, undefined>;
|
|
421
424
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
422
425
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -605,6 +608,7 @@ export declare const messageSend: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
605
608
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
606
609
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
607
610
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
611
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
608
612
|
}, undefined>, undefined>;
|
|
609
613
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
610
614
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -44,6 +44,8 @@ export declare const message: v.StrictObjectSchema<{
|
|
|
44
44
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
45
45
|
/** Present when meaning was searched too: which of the two lists found it. */
|
|
46
46
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
47
|
+
/** Present when the reranker read it: its own score, higher is better. It ordered the first hits with `score`. */
|
|
48
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
47
49
|
}, undefined>, undefined>;
|
|
48
50
|
/** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
|
|
49
51
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
package/dist/entities/message.js
CHANGED
|
@@ -53,6 +53,8 @@ export const message = v.strictObject({
|
|
|
53
53
|
parent: v.optional(reference),
|
|
54
54
|
/** Present when meaning was searched too: which of the two lists found it. */
|
|
55
55
|
found_by: v.optional(v.array(v.picklist(["words", "meaning"]))),
|
|
56
|
+
/** Present when the reranker read it: its own score, higher is better. It ordered the first hits with `score`. */
|
|
57
|
+
reranker_score: v.optional(v.number()),
|
|
56
58
|
})),
|
|
57
59
|
/** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
|
|
58
60
|
context: v.optional(v.array(v.strictObject({ ref: reference, timestamp: time, sender_name: v.nullable(text), text }))),
|
package/dist/entities/model.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* A model that runs on this machine: speech for voice messages, text for meaning search, image for pictures,
|
|
4
|
+
* reranker for the order of `search messages --discover`.
|
|
5
|
+
*/
|
|
3
6
|
export declare const model: v.StrictObjectSchema<{
|
|
4
7
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5
|
-
readonly kind: v.PicklistSchema<["audio", "text", "image"], undefined>;
|
|
8
|
+
readonly kind: v.PicklistSchema<["audio", "text", "image", "reranker"], undefined>;
|
|
6
9
|
readonly title: v.StringSchema<undefined>;
|
|
7
10
|
/** Which languages it reads, in words. */
|
|
8
11
|
readonly languages: v.StringSchema<undefined>;
|
package/dist/entities/model.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import { count, id, text } from "./fields.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* A model that runs on this machine: speech for voice messages, text for meaning search, image for pictures,
|
|
5
|
+
* reranker for the order of `search messages --discover`.
|
|
6
|
+
*/
|
|
4
7
|
export const model = v.strictObject({
|
|
5
8
|
id,
|
|
6
|
-
kind: v.picklist(["audio", "text", "image"]),
|
|
9
|
+
kind: v.picklist(["audio", "text", "image", "reranker"]),
|
|
7
10
|
title: text,
|
|
8
11
|
/** Which languages it reads, in words. */
|
|
9
12
|
languages: text,
|
|
@@ -222,6 +222,7 @@ export declare const storeCheck: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
222
222
|
readonly integrity: v.BooleanSchema<undefined>;
|
|
223
223
|
readonly foreign_keys: v.BooleanSchema<undefined>;
|
|
224
224
|
readonly search_indexes: v.BooleanSchema<undefined>;
|
|
225
|
+
readonly vector_indexes: v.BooleanSchema<undefined>;
|
|
225
226
|
readonly disk: v.BooleanSchema<undefined>;
|
|
226
227
|
}, undefined>;
|
|
227
228
|
readonly schema: v.StrictObjectSchema<{
|
|
@@ -288,9 +289,15 @@ export declare const storeCheck: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
288
289
|
readonly models: v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
289
290
|
readonly unused: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
290
291
|
}, undefined>, undefined>;
|
|
291
|
-
readonly
|
|
292
|
-
readonly
|
|
293
|
-
|
|
292
|
+
readonly vector_indexes: v.ArraySchema<v.StrictObjectSchema<{
|
|
293
|
+
readonly model: v.StringSchema<undefined>;
|
|
294
|
+
readonly dims: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
295
|
+
readonly ready: v.BooleanSchema<undefined>;
|
|
296
|
+
readonly indexed: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
297
|
+
readonly expected: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
298
|
+
readonly missing: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
299
|
+
readonly extra: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
300
|
+
}, undefined>, undefined>;
|
|
294
301
|
}, undefined>], undefined>;
|
|
295
302
|
export declare const storeMigration: v.UnionSchema<[v.StrictObjectSchema<{
|
|
296
303
|
readonly path: v.StringSchema<undefined>;
|
|
@@ -319,6 +326,7 @@ export declare const storeReindex: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
319
326
|
readonly exists: v.LiteralSchema<true, undefined>;
|
|
320
327
|
readonly file_texts: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
321
328
|
readonly involvements: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
329
|
+
readonly unused_vectors_dropped: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
322
330
|
}, undefined>], undefined>;
|
|
323
331
|
export declare const storeBackup: v.StrictObjectSchema<{
|
|
324
332
|
readonly path: v.StringSchema<undefined>;
|
|
@@ -87,6 +87,7 @@ export const storeCheck = v.union([
|
|
|
87
87
|
integrity: v.boolean(),
|
|
88
88
|
foreign_keys: v.boolean(),
|
|
89
89
|
search_indexes: v.boolean(),
|
|
90
|
+
vector_indexes: v.boolean(),
|
|
90
91
|
disk: v.boolean(),
|
|
91
92
|
}),
|
|
92
93
|
schema,
|
|
@@ -118,7 +119,15 @@ export const storeCheck = v.union([
|
|
|
118
119
|
stale_agent_links: count,
|
|
119
120
|
})),
|
|
120
121
|
vectors: v.nullable(v.strictObject({ models: v.record(text, count), unused: count })),
|
|
121
|
-
|
|
122
|
+
vector_indexes: v.array(v.strictObject({
|
|
123
|
+
model: text,
|
|
124
|
+
dims: count,
|
|
125
|
+
ready: v.boolean(),
|
|
126
|
+
indexed: count,
|
|
127
|
+
expected: count,
|
|
128
|
+
missing: count,
|
|
129
|
+
extra: count,
|
|
130
|
+
})),
|
|
122
131
|
}),
|
|
123
132
|
]);
|
|
124
133
|
const indexed = { normalized: count, indexed: count, terms: count, stemmed: count, notes_indexed: count };
|
|
@@ -128,7 +137,14 @@ export const storeMigration = v.union([
|
|
|
128
137
|
]);
|
|
129
138
|
export const storeReindex = v.union([
|
|
130
139
|
absent,
|
|
131
|
-
v.strictObject({
|
|
140
|
+
v.strictObject({
|
|
141
|
+
path: text,
|
|
142
|
+
exists: v.literal(true),
|
|
143
|
+
...indexed,
|
|
144
|
+
file_texts: count,
|
|
145
|
+
involvements: count,
|
|
146
|
+
unused_vectors_dropped: count,
|
|
147
|
+
}),
|
|
132
148
|
]);
|
|
133
149
|
export const storeBackup = v.strictObject({
|
|
134
150
|
path: text,
|
|
@@ -56,6 +56,7 @@ export declare const storeExport: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
56
56
|
readonly missing_terms: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
57
57
|
readonly parent: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
58
58
|
readonly found_by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
|
|
59
|
+
readonly reranker_score: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
59
60
|
}, undefined>, undefined>;
|
|
60
61
|
readonly context: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
|
|
61
62
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
package/dist/errors/reasons.js
CHANGED
|
@@ -55,6 +55,13 @@ const OTHERS = [
|
|
|
55
55
|
["state.invalid", "configuration_error", "the saved sync state is unreadable or invalid; it is kept, not reset"],
|
|
56
56
|
validation("store.refused", "the local store refused the document text"),
|
|
57
57
|
["store.not-writable", "permission_error", "the message store cannot be written from this process"],
|
|
58
|
+
[
|
|
59
|
+
"store.vector-extension-missing",
|
|
60
|
+
"configuration_error",
|
|
61
|
+
"the install has no sqlite-vec extension for this platform; reinstall the CLI",
|
|
62
|
+
],
|
|
63
|
+
["store.vector-extension-failed", "configuration_error", "the sqlite-vec extension did not load; reinstall the CLI"],
|
|
64
|
+
validation("store.vector-invalid", "a vector to store had a non-finite value"),
|
|
58
65
|
validation("catalog.scope-limit", "the selected catalog exceeds its entry limit"),
|
|
59
66
|
validation("evidence.row-too-large", "one evidence row is over its size limit"),
|
|
60
67
|
validation("index.not-ready", "the search index is still being built"),
|
package/dist/mcp/tool.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface Defaults {
|
|
|
34
34
|
limit: number;
|
|
35
35
|
guard: SendGuard;
|
|
36
36
|
/** The profile's own entries, for a tool reading a setting of its own — `transcribeWith`. */
|
|
37
|
-
settings: Pick<Settings, "configured" | "shared" | "profile"> & Partial<Pick<Settings, "permissions" | "searchCatchUp" | "pictureSearch" | "offline">> & AISettings;
|
|
37
|
+
settings: Pick<Settings, "configured" | "shared" | "profile"> & Partial<Pick<Settings, "permissions" | "searchCatchUp" | "pictureSearch" | "searchReranker" | "offline">> & AISettings;
|
|
38
38
|
env: NodeJS.ProcessEnv;
|
|
39
39
|
keyring?: KeyringStore;
|
|
40
40
|
/** The server's open models, kept between `search_conversations` calls. */
|
package/dist/mcp/tool.js
CHANGED
|
@@ -166,6 +166,7 @@ const callRunner = ({ messenger, session, withStore, withServices, defaults, aro
|
|
|
166
166
|
profile: defaults.settings.profile,
|
|
167
167
|
env: defaults.env,
|
|
168
168
|
pictures: defaults.settings.pictureSearch,
|
|
169
|
+
reranker: defaults.settings.searchReranker,
|
|
169
170
|
};
|
|
170
171
|
return async (key, definition, args, ctx) => {
|
|
171
172
|
const path = commandOf(key, definition).split(" ");
|
package/dist/services/deps.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export interface ServiceDeps {
|
|
|
41
41
|
searchCatchUp?: boolean;
|
|
42
42
|
/** This account has picture search on (`pictureSearch`): its images are embedded and searched by their pixels. */
|
|
43
43
|
pictures?: boolean;
|
|
44
|
+
/** Which reranker orders `--discover`'s first hits (`searchReranker`), or `off`; the default when unset. */
|
|
45
|
+
reranker?: string;
|
|
44
46
|
/** Opens the picture model; tests give a fake. */
|
|
45
47
|
pictureEmbedder?: () => Promise<import("../images/picture/embedder.js").PictureEmbedder>;
|
|
46
48
|
agentText?: true;
|
|
@@ -76,6 +78,7 @@ export declare const onlineDeps: (messenger: ServiceMessenger, adapter: Messenge
|
|
|
76
78
|
profile?: string;
|
|
77
79
|
env?: NodeJS.ProcessEnv;
|
|
78
80
|
pictures?: boolean;
|
|
81
|
+
reranker?: string;
|
|
79
82
|
}) => ServiceDeps;
|
|
80
83
|
/** Over the local store alone, for `--offline` and the tools that never ask the messenger. */
|
|
81
84
|
export declare const storedDeps: (messenger: ServiceMessenger, store: MessageStore, account: AccountKey, guard: SendGuard) => ServiceDeps;
|
|
@@ -9,8 +9,16 @@ export declare const REFRESH_BOUNDS: {
|
|
|
9
9
|
maxChats: number;
|
|
10
10
|
maxChunks: number;
|
|
11
11
|
};
|
|
12
|
+
/** Enough of the deps to find a local model and name the command that downloads it. */
|
|
13
|
+
export type ModelDeps = Pick<ServiceDeps, "env" | "embedders"> & {
|
|
14
|
+
messenger: {
|
|
15
|
+
app: {
|
|
16
|
+
command: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
12
20
|
export declare const notBuiltError: (deps: ServiceDeps, chatId: Id) => CliError;
|
|
13
|
-
export declare const embeddingTarget: (deps:
|
|
21
|
+
export declare const embeddingTarget: (deps: ModelDeps, choice?: ModelChoice) => {
|
|
14
22
|
id: string;
|
|
15
23
|
key: string;
|
|
16
24
|
dims: number;
|
|
@@ -39,7 +47,7 @@ export declare const embeddingTarget: (deps: ServiceDeps, choice?: ModelChoice)
|
|
|
39
47
|
export declare const readinessOf: (deps: ServiceDeps, chatId: Id | undefined, key: string, searchableOnly?: boolean) => Promise<ChatReadiness[]>;
|
|
40
48
|
type EmbeddingTarget = ReturnType<typeof embeddingTarget>;
|
|
41
49
|
/** The server's warm model when there is one, kept open after; otherwise opened here and closed. */
|
|
42
|
-
export declare const withEmbedder: <T>(deps:
|
|
50
|
+
export declare const withEmbedder: <T>(deps: ModelDeps, target: EmbeddingTarget, choice: ModelChoice | undefined, { threads }: {
|
|
43
51
|
threads?: number | undefined;
|
|
44
52
|
}, work: (embedder: Embedder) => Promise<T>) => Promise<T>;
|
|
45
53
|
export declare const embeddingsMaintenance: (deps: ServiceDeps) => Pick<EmbeddingsService, "status" | "embed" | "readiness" | "refresh" | "clear">;
|
package/dist/services/index.d.ts
CHANGED
|
@@ -164,6 +164,8 @@ export { type MeetingReadStore, type MeetingReferenceReadOptions, type ResolvedM
|
|
|
164
164
|
export { applyMeetingEmbedding, type MeetingEmbeddingApplyOptions, type MeetingSemanticOptions, proposeMeetingEmbedding, readMeetingSemantic, } from "./meeting-semantic.js";
|
|
165
165
|
export { type MeetingTaskProposal, proposeMeetingTask } from "./meeting-task-proposal.js";
|
|
166
166
|
export { type CreateMeetingTaskInput, createTaskFromMeeting, type MeetingTaskSourceView, type MeetingTaskStore, type MeetingTaskView, readMeetingTask, } from "./meeting-tasks.js";
|
|
167
|
+
export type { MeaningLane, MeaningSkipped } from "./messages-discovery.js";
|
|
168
|
+
export { meaningLane } from "./messages-meaning.js";
|
|
167
169
|
export type { QueryMetadata, SearchCoverage } from "./messages-search.js";
|
|
168
170
|
export { metadataService } from "./metadata.js";
|
|
169
171
|
export { embedMail, embedNotes, type FoundNote, type LinkedRecord, type NotesEmbedded, type NotesEmbedOptions, type NotesFound, type NotesFoundOf, type NotesQuery, type NotesSearchRequest, nearestNotes, searchNotes, searchNotesOf, searchNotesQuery, } from "./notes-search.js";
|
package/dist/services/index.js
CHANGED
|
@@ -124,6 +124,7 @@ export { resolveMeetingReference, } from "./meeting-reference.js";
|
|
|
124
124
|
export { applyMeetingEmbedding, proposeMeetingEmbedding, readMeetingSemantic, } from "./meeting-semantic.js";
|
|
125
125
|
export { proposeMeetingTask } from "./meeting-task-proposal.js";
|
|
126
126
|
export { createTaskFromMeeting, readMeetingTask, } from "./meeting-tasks.js";
|
|
127
|
+
export { meaningLane } from "./messages-meaning.js";
|
|
127
128
|
export { metadataService } from "./metadata.js";
|
|
128
129
|
export { embedMail, embedNotes, nearestNotes, searchNotes, searchNotesOf, searchNotesQuery, } from "./notes-search.js";
|
|
129
130
|
export { upgradePackage, } from "./package-upgrade.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AccountKey, MessageStore, StoredHit } from "../store/store.js";
|
|
2
2
|
import type { Saved } from "./message-resolution.js";
|
|
3
3
|
import type { SearchFound, SearchQuery } from "./messages.js";
|
|
4
|
-
import { type MeaningLane } from "./messages-discovery.js";
|
|
4
|
+
import { type MeaningLane, type RerankLane } from "./messages-discovery.js";
|
|
5
5
|
import { type MessageStats, type StatsGrouping } from "./messages-search.js";
|
|
6
6
|
/** How long a search may spend building the word index, then the stems, first (phase 2 plan S3: about 200 ms). */
|
|
7
7
|
export declare const SEARCH_FILL_MS = 200;
|
|
@@ -19,6 +19,6 @@ export declare const MAX_SEARCH_OFFSET = 1000;
|
|
|
19
19
|
* Search the store, one page at a time: `offset` skips the hits a page before held, and `nextOffset` says where
|
|
20
20
|
* the next page starts. A page is the hits up to `offset + limit` read again and cut, so deep pages cost more.
|
|
21
21
|
*/
|
|
22
|
-
export declare const searchStore: (store: MessageStore, account: AccountKey, request: SearchQuery, messenger?: Saved, meaning?: MeaningLane) => Promise<SearchFound>;
|
|
22
|
+
export declare const searchStore: (store: MessageStore, account: AccountKey, request: SearchQuery, messenger?: Saved, meaning?: MeaningLane, rerank?: RerankLane) => Promise<SearchFound>;
|
|
23
23
|
export declare const accountOf: (hit: StoredHit) => AccountKey;
|
|
24
24
|
export declare const keyOf: ({ provider, account }: AccountKey) => string;
|