@xyo-network/diviner-temporal-indexing-memory 7.0.0 → 7.0.2
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/dist/neutral/Diviner.d.ts +1 -1
- package/dist/neutral/Diviner.d.ts.map +1 -1
- package/dist/neutral/DivinerQueryToIndexQueryDiviner/Diviner.d.ts +1 -1
- package/dist/neutral/DivinerQueryToIndexQueryDiviner/Diviner.d.ts.map +1 -1
- package/dist/neutral/IndexCandidateToIndexDiviner/Diviner.d.ts +1 -1
- package/dist/neutral/IndexCandidateToIndexDiviner/Diviner.d.ts.map +1 -1
- package/dist/neutral/IndexQueryResponseToDivinerQueryResponseDiviner/Diviner.d.ts +1 -1
- package/dist/neutral/IndexQueryResponseToDivinerQueryResponseDiviner/Diviner.d.ts.map +1 -1
- package/dist/neutral/StateToIndexCandidateDiviner/Diviner.d.ts +37 -37
- package/dist/neutral/StateToIndexCandidateDiviner/Diviner.d.ts.map +1 -1
- package/dist/neutral/index.mjs +5 -5
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +33 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IndexingDiviner } from '@xyo-network/diviner-indexing-memory';
|
|
2
2
|
import type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
|
|
3
3
|
import type { TemporalIndexingDivinerParams } from '@xyo-network/diviner-temporal-indexing-model';
|
|
4
|
-
import type { Payload, Schema } from '@xyo-network/sdk-protocol
|
|
4
|
+
import type { Payload, Schema } from '@xyo-network/sdk-protocol';
|
|
5
5
|
export declare class TemporalIndexingDiviner<TParams extends TemporalIndexingDivinerParams = TemporalIndexingDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends IndexingDiviner<TParams, TIn, TOut, TEventData> {
|
|
6
6
|
static readonly configSchemas: Schema[];
|
|
7
7
|
static readonly defaultConfigSchema: Schema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACzF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAA;AAEjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAA;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACzF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAA;AAEjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAEhE,qBAAa,uBAAuB,CAClC,OAAO,SAAS,6BAA6B,GAAG,6BAA6B,EAC7E,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,UAAU,SAAS,sBAAsB,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,sBAAsB,CAChH,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EACnC,GAAG,EACH,IAAI,CACL,CACD,SAAQ,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC;IACvD,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAgE;IAChH,gBAAyB,mBAAmB,EAAE,MAAM,CAAsC;cAEjE,YAAY;CAGtC"}
|
|
@@ -2,7 +2,7 @@ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
|
2
2
|
import type { SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-model';
|
|
3
3
|
import type { TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerParams } from '@xyo-network/diviner-temporal-indexing-model';
|
|
4
4
|
import type { Labels } from '@xyo-network/module-model';
|
|
5
|
-
import type { Payload, Schema } from '@xyo-network/sdk-protocol
|
|
5
|
+
import type { Payload, Schema } from '@xyo-network/sdk-protocol';
|
|
6
6
|
/**
|
|
7
7
|
* A diviner that converts diviner query to index query
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/DivinerQueryToIndexQueryDiviner/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,KAAK,EAAE,8CAA8C,EAAE,qCAAqC,EAAE,MAAM,qCAAqC,CAAA;AAGhJ,OAAO,KAAK,EAAE,4DAA4D,EAAE,MAAM,8CAA8C,CAAA;AAKhI,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/DivinerQueryToIndexQueryDiviner/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,KAAK,EAAE,8CAA8C,EAAE,qCAAqC,EAAE,MAAM,qCAAqC,CAAA;AAGhJ,OAAO,KAAK,EAAE,4DAA4D,EAAE,MAAM,8CAA8C,CAAA;AAKhI,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAGhE;;GAEG;AACH,qBAAa,sDAAsD,CACjE,OAAO,SAAS,4DAA4D,GAAG,4DAA4D,CAC3I,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,gBAAyB,aAAa,WAA+F;IACrI,gBAAyB,mBAAmB;;MAAqE;IACjH,gBAAyB,MAAM,EAAE,MAAM,CAGtC;IAED,OAAO,CAAC,iBAAiB,CAAsB;IAC/C,OAAO,CAAC,oBAAoB,CAAmD;IAE/E;;OAEG;IACH,SAAS,KAAK,kBAAkB,IAAI,MAAM,CAEzC;IAED;;OAEG;IACH,SAAS,KAAK,gBAAgB,IAAI,MAAM,CAEvC;IAED;;OAEG;IACH,SAAS,KAAK,WAAW,IAAI,MAAM,CAElC;IAED;;OAEG;IACH,SAAS,KAAK,gBAAgB,IAAI,MAAM,EAAE,CAGzC;IAED;;;OAGG;IACH,SAAS,KAAK,mBAAmB,IAAI,qCAAqC,CAGzE;IAED;;;OAGG;IACH,SAAS,KAAK,gBAAgB,IAAI,8CAA8C,CAsB/E;cAEwB,aAAa,CAAC,QAAQ,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAuBrF"}
|
|
@@ -2,7 +2,7 @@ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
|
2
2
|
import type { SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-model';
|
|
3
3
|
import type { TemporalIndexingDivinerIndexCandidateToIndexDivinerParams } from '@xyo-network/diviner-temporal-indexing-model';
|
|
4
4
|
import type { Labels } from '@xyo-network/module-model';
|
|
5
|
-
import type { Payload, Schema } from '@xyo-network/sdk-protocol
|
|
5
|
+
import type { Payload, Schema } from '@xyo-network/sdk-protocol';
|
|
6
6
|
/**
|
|
7
7
|
* Diviner which transforms index candidates to indexes using JSON Path to map
|
|
8
8
|
* source properties in the supplied payloads to destination fields in the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/IndexCandidateToIndexDiviner/Diviner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,KAAK,EAAE,8CAA8C,EAAE,qCAAqC,EAAE,MAAM,qCAAqC,CAAA;AAChJ,OAAO,KAAK,EACV,yDAAyD,EAE1D,MAAM,8CAA8C,CAAA;AAKrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EACI,OAAO,EAAE,MAAM,EAC9B,MAAM,
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/IndexCandidateToIndexDiviner/Diviner.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,KAAK,EAAE,8CAA8C,EAAE,qCAAqC,EAAE,MAAM,qCAAqC,CAAA;AAChJ,OAAO,KAAK,EACV,yDAAyD,EAE1D,MAAM,8CAA8C,CAAA;AAKrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EACI,OAAO,EAAE,MAAM,EAC9B,MAAM,2BAA2B,CAAA;AASlC;;;;GAIG;AACH,qBAAa,mDAAmD,CAC9D,OAAO,SAAS,yDAAyD,GAAG,yDAAyD,CACrI,SAAQ,eAAe,CAAC,OAAO,CAAC;IAChC,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA4F;IAC5I,gBAAyB,mBAAmB,EAAE,MAAM,CAAkE;IACtH,gBAAyB,MAAM,EAAE,MAAM,CAGtC;IAED,OAAO,CAAC,iBAAiB,CAAsB;IAC/C,OAAO,CAAC,oBAAoB,CAAmD;IAE/E;;OAEG;IACH,SAAS,KAAK,gBAAgB,IAAI,MAAM,EAAE,CAGzC;IAED;;;OAGG;IACH,SAAS,KAAK,mBAAmB,IAAI,qCAAqC,CAGzE;IAED;;;OAGG;IACH,SAAS,KAAK,gBAAgB,IAAI,8CAA8C,CAE/E;cAEwB,aAAa,CAAC,QAAQ,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAyDpF;;;;OAIG;IACH,SAAS,CAAC,kBAAkB,GAAI,GAAG,OAAO,aAEzC;IAED;;;;OAIG;IACH,SAAS,CAAC,iBAAiB,GAAI,SAAS,MAAM,GAAG,IAAI,aAEpD;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
2
2
|
import type { Labels } from '@xyo-network/module-model';
|
|
3
|
-
import type { Payload, Schema } from '@xyo-network/sdk-protocol
|
|
3
|
+
import type { Payload, Schema } from '@xyo-network/sdk-protocol';
|
|
4
4
|
/**
|
|
5
5
|
* Transforms an ImageThumbnailIndex response into an ImageThumbnailResponse response
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/IndexQueryResponseToDivinerQueryResponseDiviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAG/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/IndexQueryResponseToDivinerQueryResponseDiviner/Diviner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAG/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAEhE;;GAEG;AACH,qBAAa,sEAAuE,SAAQ,eAAe;IACzG,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAG/C;IAED,gBAAyB,mBAAmB,EAAE,MAAM,CAAqF;IACzI,gBAAyB,MAAM,EAAE,MAAM,CAGtC;cAEwB,aAAa,CAAC,QAAQ,GAAE,OAAO,EAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAQrF"}
|
|
@@ -7,7 +7,7 @@ import type { IndexingDivinerState } from '@xyo-network/diviner-indexing-model';
|
|
|
7
7
|
import type { TemporalIndexingDivinerStateToIndexCandidateDivinerParams } from '@xyo-network/diviner-temporal-indexing-model';
|
|
8
8
|
import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
|
|
9
9
|
import type { Labels, ModuleState } from '@xyo-network/module-model';
|
|
10
|
-
import type { BoundWitness, Payload, Schema, WithStorageMeta } from '@xyo-network/sdk-protocol
|
|
10
|
+
import type { BoundWitness, Payload, Schema, WithStorageMeta } from '@xyo-network/sdk-protocol';
|
|
11
11
|
import type { Timestamp } from '@xyo-network/witness-timestamp';
|
|
12
12
|
/**
|
|
13
13
|
* All Payload types involved in index candidates for indexing
|
|
@@ -52,11 +52,11 @@ export declare class TemporalIndexingDivinerStateToIndexCandidateDiviner<TParams
|
|
|
52
52
|
schema: string & {
|
|
53
53
|
readonly __schema: true;
|
|
54
54
|
};
|
|
55
|
-
address?: import("@xyo-network/sdk-protocol
|
|
55
|
+
address?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
56
56
|
readonly __hex: true;
|
|
57
57
|
} & {
|
|
58
58
|
readonly __address: true;
|
|
59
|
-
}) | (import("@xyo-network/sdk-protocol
|
|
59
|
+
}) | (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
60
60
|
readonly __hex: true;
|
|
61
61
|
} & {
|
|
62
62
|
readonly __address: true;
|
|
@@ -68,30 +68,30 @@ export declare class TemporalIndexingDivinerStateToIndexCandidateDiviner<TParams
|
|
|
68
68
|
schema: "network.xyo.boundwitness" & {
|
|
69
69
|
readonly __schema: true;
|
|
70
70
|
};
|
|
71
|
-
addresses: (import("@xyo-network/sdk-protocol
|
|
71
|
+
addresses: (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
72
72
|
readonly __hex: true;
|
|
73
73
|
} & {
|
|
74
74
|
readonly __address: true;
|
|
75
75
|
}))[];
|
|
76
|
-
payload_hashes: import("@xylabs/sdk
|
|
77
|
-
payload_schemas: import("@xyo-network/sdk-protocol
|
|
78
|
-
previous_hashes: (import("@xylabs/sdk
|
|
79
|
-
$signatures: (import("@xylabs/sdk
|
|
80
|
-
$destination?: import("@xyo-network/sdk-protocol
|
|
76
|
+
payload_hashes: import("@xylabs/sdk").BrandedHash[];
|
|
77
|
+
payload_schemas: import("@xyo-network/sdk-protocol").BrandedSchema<string>[];
|
|
78
|
+
previous_hashes: (import("@xylabs/sdk").BrandedHash | null)[];
|
|
79
|
+
$signatures: (import("@xylabs/sdk").BrandedHex | null)[];
|
|
80
|
+
$destination?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
81
81
|
readonly __hex: true;
|
|
82
82
|
} & {
|
|
83
83
|
readonly __address: true;
|
|
84
84
|
}) | undefined;
|
|
85
|
-
$sourceQuery?: import("@xylabs/sdk
|
|
85
|
+
$sourceQuery?: import("@xylabs/sdk").BrandedHash | undefined;
|
|
86
86
|
}, import("@xyo-network/diviner-model").DivinerModuleEventData<import("@xyo-network/diviner-model").DivinerInstance<BoundWitnessDivinerParams, {
|
|
87
87
|
schema: string & {
|
|
88
88
|
readonly __schema: true;
|
|
89
89
|
};
|
|
90
|
-
address?: import("@xyo-network/sdk-protocol
|
|
90
|
+
address?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
91
91
|
readonly __hex: true;
|
|
92
92
|
} & {
|
|
93
93
|
readonly __address: true;
|
|
94
|
-
}) | (import("@xyo-network/sdk-protocol
|
|
94
|
+
}) | (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
95
95
|
readonly __hex: true;
|
|
96
96
|
} & {
|
|
97
97
|
readonly __address: true;
|
|
@@ -103,30 +103,30 @@ export declare class TemporalIndexingDivinerStateToIndexCandidateDiviner<TParams
|
|
|
103
103
|
schema: "network.xyo.boundwitness" & {
|
|
104
104
|
readonly __schema: true;
|
|
105
105
|
};
|
|
106
|
-
addresses: (import("@xyo-network/sdk-protocol
|
|
106
|
+
addresses: (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
107
107
|
readonly __hex: true;
|
|
108
108
|
} & {
|
|
109
109
|
readonly __address: true;
|
|
110
110
|
}))[];
|
|
111
|
-
payload_hashes: import("@xylabs/sdk
|
|
112
|
-
payload_schemas: import("@xyo-network/sdk-protocol
|
|
113
|
-
previous_hashes: (import("@xylabs/sdk
|
|
114
|
-
$signatures: (import("@xylabs/sdk
|
|
115
|
-
$destination?: import("@xyo-network/sdk-protocol
|
|
111
|
+
payload_hashes: import("@xylabs/sdk").BrandedHash[];
|
|
112
|
+
payload_schemas: import("@xyo-network/sdk-protocol").BrandedSchema<string>[];
|
|
113
|
+
previous_hashes: (import("@xylabs/sdk").BrandedHash | null)[];
|
|
114
|
+
$signatures: (import("@xylabs/sdk").BrandedHex | null)[];
|
|
115
|
+
$destination?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
116
116
|
readonly __hex: true;
|
|
117
117
|
} & {
|
|
118
118
|
readonly __address: true;
|
|
119
119
|
}) | undefined;
|
|
120
|
-
$sourceQuery?: import("@xylabs/sdk
|
|
120
|
+
$sourceQuery?: import("@xylabs/sdk").BrandedHash | undefined;
|
|
121
121
|
}, import("@xyo-network/diviner-model").DivinerModuleEventData>, {
|
|
122
122
|
schema: string & {
|
|
123
123
|
readonly __schema: true;
|
|
124
124
|
};
|
|
125
|
-
address?: import("@xyo-network/sdk-protocol
|
|
125
|
+
address?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
126
126
|
readonly __hex: true;
|
|
127
127
|
} & {
|
|
128
128
|
readonly __address: true;
|
|
129
|
-
}) | (import("@xyo-network/sdk-protocol
|
|
129
|
+
}) | (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
130
130
|
readonly __hex: true;
|
|
131
131
|
} & {
|
|
132
132
|
readonly __address: true;
|
|
@@ -138,30 +138,30 @@ export declare class TemporalIndexingDivinerStateToIndexCandidateDiviner<TParams
|
|
|
138
138
|
schema: "network.xyo.boundwitness" & {
|
|
139
139
|
readonly __schema: true;
|
|
140
140
|
};
|
|
141
|
-
addresses: (import("@xyo-network/sdk-protocol
|
|
141
|
+
addresses: (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
142
142
|
readonly __hex: true;
|
|
143
143
|
} & {
|
|
144
144
|
readonly __address: true;
|
|
145
145
|
}))[];
|
|
146
|
-
payload_hashes: import("@xylabs/sdk
|
|
147
|
-
payload_schemas: import("@xyo-network/sdk-protocol
|
|
148
|
-
previous_hashes: (import("@xylabs/sdk
|
|
149
|
-
$signatures: (import("@xylabs/sdk
|
|
150
|
-
$destination?: import("@xyo-network/sdk-protocol
|
|
146
|
+
payload_hashes: import("@xylabs/sdk").BrandedHash[];
|
|
147
|
+
payload_schemas: import("@xyo-network/sdk-protocol").BrandedSchema<string>[];
|
|
148
|
+
previous_hashes: (import("@xylabs/sdk").BrandedHash | null)[];
|
|
149
|
+
$signatures: (import("@xylabs/sdk").BrandedHex | null)[];
|
|
150
|
+
$destination?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
151
151
|
readonly __hex: true;
|
|
152
152
|
} & {
|
|
153
153
|
readonly __address: true;
|
|
154
154
|
}) | undefined;
|
|
155
|
-
$sourceQuery?: import("@xylabs/sdk
|
|
155
|
+
$sourceQuery?: import("@xylabs/sdk").BrandedHash | undefined;
|
|
156
156
|
}>>, {
|
|
157
157
|
schema: string & {
|
|
158
158
|
readonly __schema: true;
|
|
159
159
|
};
|
|
160
|
-
address?: import("@xyo-network/sdk-protocol
|
|
160
|
+
address?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
161
161
|
readonly __hex: true;
|
|
162
162
|
} & {
|
|
163
163
|
readonly __address: true;
|
|
164
|
-
}) | (import("@xyo-network/sdk-protocol
|
|
164
|
+
}) | (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
165
165
|
readonly __hex: true;
|
|
166
166
|
} & {
|
|
167
167
|
readonly __address: true;
|
|
@@ -173,21 +173,21 @@ export declare class TemporalIndexingDivinerStateToIndexCandidateDiviner<TParams
|
|
|
173
173
|
schema: "network.xyo.boundwitness" & {
|
|
174
174
|
readonly __schema: true;
|
|
175
175
|
};
|
|
176
|
-
addresses: (import("@xyo-network/sdk-protocol
|
|
176
|
+
addresses: (import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
177
177
|
readonly __hex: true;
|
|
178
178
|
} & {
|
|
179
179
|
readonly __address: true;
|
|
180
180
|
}))[];
|
|
181
|
-
payload_hashes: import("@xylabs/sdk
|
|
182
|
-
payload_schemas: import("@xyo-network/sdk-protocol
|
|
183
|
-
previous_hashes: (import("@xylabs/sdk
|
|
184
|
-
$signatures: (import("@xylabs/sdk
|
|
185
|
-
$destination?: import("@xyo-network/sdk-protocol
|
|
181
|
+
payload_hashes: import("@xylabs/sdk").BrandedHash[];
|
|
182
|
+
payload_schemas: import("@xyo-network/sdk-protocol").BrandedSchema<string>[];
|
|
183
|
+
previous_hashes: (import("@xylabs/sdk").BrandedHash | null)[];
|
|
184
|
+
$signatures: (import("@xylabs/sdk").BrandedHex | null)[];
|
|
185
|
+
$destination?: import("@xyo-network/sdk-protocol").XyoQuantAddress | (Lowercase<string> & {
|
|
186
186
|
readonly __hex: true;
|
|
187
187
|
} & {
|
|
188
188
|
readonly __address: true;
|
|
189
189
|
}) | undefined;
|
|
190
|
-
$sourceQuery?: import("@xylabs/sdk
|
|
190
|
+
$sourceQuery?: import("@xylabs/sdk").BrandedHash | undefined;
|
|
191
191
|
}>> | undefined>;
|
|
192
192
|
protected getPayloadsInBoundWitness(bw: BoundWitness, archivist: ArchivistInstance): Promise<IndexCandidate[] | undefined>;
|
|
193
193
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/StateToIndexCandidateDiviner/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,8BAA8B,CAAA;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAA;AACrF,OAAO,KAAK,EAAE,yBAAyB,EAAmC,MAAM,yCAAyC,CAAA;AACzH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC/E,OAAO,KAAK,EAAE,yDAAyD,EAAE,MAAM,8CAA8C,CAAA;AAE7H,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EACV,MAAM,EAAoB,WAAW,EACtC,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EAAE,MAAM,EACf,eAAe,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../../src/StateToIndexCandidateDiviner/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,8BAA8B,CAAA;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,+BA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O,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAa7E;;;OAGG;cACa,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmB9B,yBAAyB,CAAC,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,EAAE,GAAG,SAAS,CAAC;CAOjI"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema,
|
|
18
18
|
TemporalIndexingDivinerResultIndexSchema
|
|
19
19
|
} from "@xyo-network/diviner-temporal-indexing-model";
|
|
20
|
-
import { isPayloadOfSchemaType, PayloadBuilder } from "@xyo-network/sdk-protocol
|
|
20
|
+
import { isPayloadOfSchemaType, PayloadBuilder } from "@xyo-network/sdk-protocol";
|
|
21
21
|
var TemporalIndexingDivinerDivinerQueryToIndexQueryDiviner = class extends AbstractDiviner {
|
|
22
22
|
static configSchemas = [...super.configSchemas, TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema];
|
|
23
23
|
static defaultConfigSchema = TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema;
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
assertEx,
|
|
112
112
|
containsAll,
|
|
113
113
|
exists
|
|
114
|
-
} from "@xylabs/sdk
|
|
114
|
+
} from "@xylabs/sdk";
|
|
115
115
|
import { AbstractDiviner as AbstractDiviner2 } from "@xyo-network/diviner-abstract";
|
|
116
116
|
import { jsonPathToTransformersDictionary as jsonPathToTransformersDictionary2 } from "@xyo-network/diviner-jsonpath-aggregate-memory";
|
|
117
117
|
import {
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
isAnyPayload,
|
|
124
124
|
isBoundWitness,
|
|
125
125
|
PayloadBuilder as PayloadBuilder2
|
|
126
|
-
} from "@xyo-network/sdk-protocol
|
|
126
|
+
} from "@xyo-network/sdk-protocol";
|
|
127
127
|
var moduleName = "TemporalIndexingDivinerIndexCandidateToIndexDiviner";
|
|
128
128
|
var TemporalIndexingDivinerIndexCandidateToIndexDiviner = class extends AbstractDiviner2 {
|
|
129
129
|
static configSchemas = [...super.configSchemas, TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema];
|
|
@@ -224,7 +224,7 @@ var TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDiviner = cla
|
|
|
224
224
|
};
|
|
225
225
|
|
|
226
226
|
// src/StateToIndexCandidateDiviner/Diviner.ts
|
|
227
|
-
import { assertEx as assertEx2, exists as exists2 } from "@xylabs/sdk
|
|
227
|
+
import { assertEx as assertEx2, exists as exists2 } from "@xylabs/sdk";
|
|
228
228
|
import { ArchivistWrapper } from "@xyo-network/archivist-wrapper";
|
|
229
229
|
import { AbstractDiviner as AbstractDiviner4 } from "@xyo-network/diviner-abstract";
|
|
230
230
|
import { TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema } from "@xyo-network/diviner-temporal-indexing-model";
|
|
@@ -235,7 +235,7 @@ import {
|
|
|
235
235
|
isBoundWitness as isBoundWitness2,
|
|
236
236
|
payloadSchemasContainsAll,
|
|
237
237
|
SequenceConstants
|
|
238
|
-
} from "@xyo-network/sdk-protocol
|
|
238
|
+
} from "@xyo-network/sdk-protocol";
|
|
239
239
|
import { TimestampSchema } from "@xyo-network/witness-timestamp";
|
|
240
240
|
var order = "asc";
|
|
241
241
|
var moduleName2 = "TemporalIndexingDivinerStateToIndexCandidateDiviner";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Diviner.ts", "../../src/DivinerQueryToIndexQueryDiviner/Diviner.ts", "../../src/IndexCandidateToIndexDiviner/Diviner.ts", "../../src/IndexQueryResponseToDivinerQueryResponseDiviner/Diviner.ts", "../../src/StateToIndexCandidateDiviner/Diviner.ts"],
|
|
4
|
-
"sourcesContent": ["import { IndexingDiviner } from '@xyo-network/diviner-indexing-memory'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { TemporalIndexingDivinerParams } from '@xyo-network/diviner-temporal-indexing-model'\nimport { TemporalIndexingDivinerConfigSchema } from '@xyo-network/diviner-temporal-indexing-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol-js'\n\nexport class TemporalIndexingDiviner<\n TParams extends TemporalIndexingDivinerParams = TemporalIndexingDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends IndexingDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, TemporalIndexingDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = TemporalIndexingDivinerConfigSchema\n\n protected override async startHandler() {\n await super.startHandler()\n }\n}\n", "import type { Hash } from '@xylabs/sdk-js'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { jsonPathToTransformersDictionary, reducePayloads } from '@xyo-network/diviner-jsonpath-aggregate-memory'\nimport type { SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-model'\nimport type { PayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model'\nimport { PayloadDivinerQuerySchema } from '@xyo-network/diviner-payload-model'\nimport type { TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerParams } from '@xyo-network/diviner-temporal-indexing-model'\nimport {\n TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema,\n TemporalIndexingDivinerResultIndexSchema,\n} from '@xyo-network/diviner-temporal-indexing-model'\nimport type { Labels } from '@xyo-network/module-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol-js'\nimport { isPayloadOfSchemaType, PayloadBuilder } from '@xyo-network/sdk-protocol-js'\n// TODO: Inherit from JsonPathAggregateDiviner\n/**\n * A diviner that converts diviner query to index query\n */\nexport class TemporalIndexingDivinerDivinerQueryToIndexQueryDiviner<\n TParams extends TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerParams = TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerParams,\n> extends AbstractDiviner<TParams> {\n static override readonly configSchemas = [...super.configSchemas, TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema]\n static override readonly defaultConfigSchema = TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema\n static override readonly labels: Labels = {\n ...super.labels,\n 'network.xyo.diviner.stage': 'divinerQueryToIndexQueryDiviner',\n }\n\n private _indexableSchemas: Schema[] | undefined\n private _payloadTransformers: SchemaToPayloadTransformersDictionary | undefined\n\n /**\n * The schema of the diviner query payloads\n */\n protected get divinerQuerySchema(): Schema {\n return this.config.divinerQuerySchema ?? PayloadDivinerQuerySchema\n }\n\n /**\n * The schema of the index query payloads\n */\n protected get indexQuerySchema(): Schema {\n return this.config.indexQuerySchema ?? PayloadDivinerQuerySchema\n }\n\n /**\n * The schema of the index payloads\n */\n protected get indexSchema(): Schema {\n return this.config.indexSchema ?? TemporalIndexingDivinerResultIndexSchema\n }\n\n /**\n * List of indexable schemas for this diviner\n */\n protected get indexableSchemas(): Schema[] {\n this._indexableSchemas ??= Object.keys(this.schemaTransforms) as Schema[]\n return this._indexableSchemas\n }\n\n /**\n * Dictionary of schemas to payload transformers for creating indexes\n * from the payloads within a Bound Witness\n */\n protected get payloadTransformers(): SchemaToPayloadTransformersDictionary {\n this._payloadTransformers ??= jsonPathToTransformersDictionary(this.schemaTransforms)\n return this._payloadTransformers\n }\n\n /**\n * The dictionary of schemas to JSON Path transform expressions for creating indexes\n * from the payloads within a Bound Witness\n */\n protected get schemaTransforms(): SchemaToJsonPathTransformExpressionsDictionary {\n return (\n this.config?.schemaTransforms ?? {\n [this.divinerQuerySchema]: [\n {\n defaultValue: 1,\n destinationField: 'limit',\n sourcePathExpression: '$.limit',\n },\n {\n // defaultValue: 0,\n destinationField: 'cursor',\n sourcePathExpression: '$.cursor',\n },\n {\n defaultValue: 'desc',\n destinationField: 'order',\n sourcePathExpression: '$.order',\n },\n ],\n }\n )\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<Payload[]> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument\n const queries = payloads.filter(isPayloadOfSchemaType<PayloadDivinerQueryPayload>(this.divinerQuerySchema as any))\n if (queries.length > 0) {\n return await Promise.all(\n queries.map(async (query) => {\n const fields = await reducePayloads<PayloadDivinerQueryPayload & { $sources?: Hash[]; sources?: Hash[] }>(\n [query],\n this.payloadTransformers,\n this.indexQuerySchema,\n )\n // TODO: Make index schema configurable\n fields.schemas = [this.indexSchema]\n // TODO: Make sources not need to be deleted\n delete fields.sources\n delete fields?.$sources\n // TODO: Add support for additional filters\n return new PayloadBuilder<Payload>({ schema: this.indexQuerySchema }).fields(fields).build()\n }),\n )\n }\n return []\n }\n}\n", "import type { Hash } from '@xylabs/sdk-js'\nimport {\n assertEx, containsAll, exists,\n} from '@xylabs/sdk-js'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { jsonPathToTransformersDictionary } from '@xyo-network/diviner-jsonpath-aggregate-memory'\nimport type { SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-model'\nimport type {\n TemporalIndexingDivinerIndexCandidateToIndexDivinerParams,\n TemporalIndexingDivinerResultIndex,\n} from '@xyo-network/diviner-temporal-indexing-model'\nimport {\n TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema,\n TemporalIndexingDivinerResultIndexSchema,\n} from '@xyo-network/diviner-temporal-indexing-model'\nimport type { Labels } from '@xyo-network/module-model'\nimport type {\n BoundWitness, Payload, Schema,\n} from '@xyo-network/sdk-protocol-js'\nimport {\n intraBoundwitnessSchemaCombinations, isAnyPayload, isBoundWitness, PayloadBuilder,\n} from '@xyo-network/sdk-protocol-js'\n\ntype IndexableHashes = [Hash, ...Hash[]]\n\nconst moduleName = 'TemporalIndexingDivinerIndexCandidateToIndexDiviner'\n\n/**\n * Diviner which transforms index candidates to indexes using JSON Path to map\n * source properties in the supplied payloads to destination fields in the\n * resultant index\n */\nexport class TemporalIndexingDivinerIndexCandidateToIndexDiviner<\n TParams extends TemporalIndexingDivinerIndexCandidateToIndexDivinerParams = TemporalIndexingDivinerIndexCandidateToIndexDivinerParams,\n> extends AbstractDiviner<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema\n static override readonly labels: Labels = {\n ...super.labels,\n 'network.xyo.diviner.stage': 'indexCandidateToIndexDiviner',\n }\n\n private _indexableSchemas: Schema[] | undefined\n private _payloadTransformers: SchemaToPayloadTransformersDictionary | undefined\n\n /**\n * List of indexable schemas for this diviner\n */\n protected get indexableSchemas(): Schema[] {\n this._indexableSchemas ??= Object.keys(this.schemaTransforms) as Schema[]\n return this._indexableSchemas\n }\n\n /**\n * Dictionary of schemas to payload transformers for creating indexes\n * from the payloads within a Bound Witness\n */\n protected get payloadTransformers(): SchemaToPayloadTransformersDictionary {\n this._payloadTransformers ??= jsonPathToTransformersDictionary(this.schemaTransforms)\n return this._payloadTransformers\n }\n\n /**\n * The dictionary of schemas to JSON Path transform expressions for creating indexes\n * from the payloads within a Bound Witness\n */\n protected get schemaTransforms(): SchemaToJsonPathTransformExpressionsDictionary {\n return assertEx(this.config?.schemaTransforms, () => `${moduleName}: Missing config.schemaTransforms section`)\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<Payload[]> {\n // If the Bound Witness does not contain all the required schemas do not index it\n const indexableBoundWitnesses = payloads\n .filter(isBoundWitness)\n .filter(bw => containsAll(bw.payload_schemas, this.indexableSchemas))\n // If the Payload is not one of the indexable schemas do not index it\n const indexablePayloads = payloads.filter(p => this.isIndexablePayload(p))\n // If there is nothing to index, return an empty array\n if (indexableBoundWitnesses.length === 0 || indexablePayloads.length === 0) return []\n // Hash all the indexable data once\n const [bwDictionary, payloadDictionary] = await Promise.all([\n PayloadBuilder.toHashMap(indexableBoundWitnesses),\n PayloadBuilder.toAllHashMap(indexablePayloads),\n ])\n\n // Initialize the array for validIndexableTuples outside of the loop\n const validIndexableTuples: IndexableHashes[] = []\n\n // Iterate over each entry in bwDictionary\n for (const [bwHash, bw] of Object.entries(bwDictionary) as [Hash, BoundWitness][]) {\n // Find the combinations of payloads that satisfy the required schemas\n const combinations = intraBoundwitnessSchemaCombinations(bw, this.indexableSchemas)\n\n // Iterate over each combination\n for (const combination of combinations) {\n const indexablePayloads = combination.map(hash => payloadDictionary[hash]).filter(exists)\n\n // If we found the right amount of indexable payloads (of the correct schema as checked\n // above) in this BW, then index it\n if (indexablePayloads.length === this.indexableSchemas.length) {\n validIndexableTuples.push([bwHash, ...combination])\n }\n }\n }\n\n // Create the indexes from the tuples\n const indexes = validIndexableTuples.map<TemporalIndexingDivinerResultIndex>(([bwHash, ...sourcePayloadHashes]) => {\n const sourcePayloads = sourcePayloadHashes.map(hash => payloadDictionary[hash])\n // Use the payload transformers to convert the fields from the source payloads to the destination fields\n const indexFields = sourcePayloads.flatMap((payload) => {\n // Find the transformers for this payload\n const transformers = this.payloadTransformers[payload.schema]\n // If transformers exist, apply them to the payload otherwise return an empty array\n return transformers ? transformers.map(transform => transform(payload)) : []\n })\n // Include all the sources for reference\n const $sources: Hash[] = [bwHash, ...sourcePayloadHashes]\n // Build and return the index\n return new PayloadBuilder<TemporalIndexingDivinerResultIndex>({ schema: TemporalIndexingDivinerResultIndexSchema })\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n .fields(Object.assign({}, ...indexFields))\n .meta({ $sources })\n .build()\n })\n return indexes.flat()\n }\n\n /**\n * Identifies if a payload is one that is indexed by this diviner\n * @param x The candidate payload\n * @returns True if the payload is one indexed by this diviner, false otherwise\n */\n protected isIndexablePayload = (x: unknown) => {\n return isAnyPayload(x) && this.indexableSchemas.includes(x?.schema)\n }\n\n /**\n * Identifies if a schema is one that is indexed by this diviner\n * @param schema The candidate schema\n * @returns True if this schema is one indexed by this diviner, false otherwise\n */\n protected isIndexableSchema = (schema?: Schema | null) => {\n return typeof schema === 'string' ? this.indexableSchemas.includes(schema) : false\n }\n}\n", "import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { isPayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model'\nimport { TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema } from '@xyo-network/diviner-temporal-indexing-model'\nimport type { Labels } from '@xyo-network/module-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol-js'\n\n/**\n * Transforms an ImageThumbnailIndex response into an ImageThumbnailResponse response\n */\nexport class TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDiviner extends AbstractDiviner {\n static override readonly configSchemas: Schema[] = [\n ...super.configSchemas,\n TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema,\n ]\n\n static override readonly defaultConfigSchema: Schema = TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema\n static override readonly labels: Labels = {\n ...super.labels,\n 'network.xyo.diviner.stage': 'indexQueryResponseToDivinerQueryResponseDiviner',\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<Payload[]> {\n // We're not doing anything with the query payloads but some diviners\n // might want to use this to transform from the query to the response (for example\n // if we use a plaintext value in the query to generate a hash key in the index)\n // const queries = payloads.filter(isPayloadDivinerQueryPayload)\n const responses = payloads.filter(p => !isPayloadDivinerQueryPayload(p))\n return await Promise.resolve(responses)\n }\n}\n", "import { assertEx, exists } from '@xylabs/sdk-js'\nimport type { ArchivistInstance, ArchivistNextOptions } from '@xyo-network/archivist-model'\nimport { ArchivistWrapper } from '@xyo-network/archivist-wrapper'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { BoundWitnessDiviner } from '@xyo-network/diviner-boundwitness/abstract'\nimport type { BoundWitnessDivinerParams, BoundWitnessDivinerQueryPayload } from '@xyo-network/diviner-boundwitness/model'\nimport type { IndexingDivinerState } from '@xyo-network/diviner-indexing-model'\nimport type { TemporalIndexingDivinerStateToIndexCandidateDivinerParams } from '@xyo-network/diviner-temporal-indexing-model'\nimport { TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema } from '@xyo-network/diviner-temporal-indexing-model'\nimport { DivinerWrapper } from '@xyo-network/diviner-wrapper'\nimport type {\n Labels, ModuleIdentifier, ModuleState,\n} from '@xyo-network/module-model'\nimport { isModuleState, ModuleStateSchema } from '@xyo-network/module-model'\nimport type {\n BoundWitness,\n Payload, Schema,\n WithStorageMeta,\n} from '@xyo-network/sdk-protocol-js'\nimport {\n intraBoundwitnessSchemaCombinations, isBoundWitness, payloadSchemasContainsAll, SequenceConstants,\n} from '@xyo-network/sdk-protocol-js'\nimport type { Timestamp } from '@xyo-network/witness-timestamp'\nimport { TimestampSchema } from '@xyo-network/witness-timestamp'\n\n/**\n * All Payload types involved in index candidates for indexing\n */\nexport type IndexCandidate = BoundWitness | Payload | Timestamp\n\n/**\n * The response from the TemporalStateToIndexCandidateDiviner\n */\nexport type TemporalStateToIndexCandidateDivinerResponse = [\n /**\n * The next state of the diviner\n */\n nextState: ModuleState<IndexingDivinerState>,\n /**\n * The index candidates\n */\n ...IndexCandidate[],\n]\n\n/**\n * The default order to search Bound Witnesses to identify index candidates\n */\nconst order = 'asc'\n\n/**\n * The name of the module (for logging purposes)\n */\nconst moduleName = 'TemporalIndexingDivinerStateToIndexCandidateDiviner'\n\n/**\n * Transforms candidates for image thumbnail indexing into their indexed representation\n */\nexport class TemporalIndexingDivinerStateToIndexCandidateDiviner<\n TParams extends TemporalIndexingDivinerStateToIndexCandidateDivinerParams = TemporalIndexingDivinerStateToIndexCandidateDivinerParams,\n> extends AbstractDiviner<TParams, Payload, ModuleState | IndexCandidate> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema\n static override readonly labels: Labels = {\n ...super.labels,\n 'network.xyo.diviner.stage': 'stateToIndexCandidateDiviner',\n }\n\n get payloadDivinerLimit() {\n return this.config.payloadDivinerLimit ?? 1000\n }\n\n /**\n * The required payload_schemas within BoundWitnesses to identify index candidates\n */\n protected get payload_schemas(): Schema[] {\n const schemas = this.config.filter?.payload_schemas\n return [TimestampSchema, ...(schemas ?? [])]\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<TemporalStateToIndexCandidateDivinerResponse> {\n // Retrieve the last state from what was passed in\n const lastState = payloads.find(isModuleState<IndexingDivinerState>)\n // If there is no last state, start from the beginning\n ?? { schema: ModuleStateSchema, state: { cursor: SequenceConstants.minLocalSequence } }\n\n // Get the last cursor\n const cursor = lastState?.state?.cursor\n // Get the archivist for the store\n const sourceArchivist = await this.getArchivistForStore()\n if (!sourceArchivist) return [lastState]\n\n // Get the next batch of results\n const nextOffset: ArchivistNextOptions = { limit: this.payloadDivinerLimit, order }\n // Only use the cursor if it's a valid offset\n if (cursor !== SequenceConstants.minLocalSequence) nextOffset.cursor = cursor\n // Get next batch of results starting from the offset\n const next = await sourceArchivist.next(nextOffset)\n if (next.length === 0) return [lastState]\n\n const batch = next.filter(x => isBoundWitness(x))\n .filter(exists)\n .filter(bw => payloadSchemasContainsAll(bw, this.payload_schemas))\n // Get source data\n const indexCandidates: IndexCandidate[] = (await Promise.all(batch.map(bw => this.getPayloadsInBoundWitness(bw, sourceArchivist))))\n .filter(exists)\n .flat()\n const nextCursor = assertEx(next.at(-1)?._sequence, () => `${moduleName}: Expected next to have a sequence`)\n const nextState: ModuleState<IndexingDivinerState> = { schema: ModuleStateSchema, state: { ...lastState.state, cursor: nextCursor } }\n return [nextState, ...indexCandidates]\n }\n\n /**\n * Retrieves the archivist for the payloadStore\n * @returns The archivist for the payloadStore or undefined if not resolvable\n */\n protected async getArchivistForStore(): Promise<ArchivistWrapper | undefined> {\n // It should be defined, so we'll error if it's not\n const name: ModuleIdentifier = assertEx(\n this.config?.payloadStore?.archivist,\n () => `${moduleName}: Config for payloadStore.archivist not specified`,\n )\n // It might not be resolvable (yet), so we'll return undefined if it's not\n const mod = await this.resolve(name)\n if (!mod) return undefined\n // Return the wrapped archivist\n return ArchivistWrapper.wrap(mod, this.account)\n }\n\n /**\n * Retrieves the BoundWitness Diviner for the payloadStore\n * @returns The BoundWitness Diviner for the payloadStore or undefined if not resolvable\n */\n protected async getBoundWitnessDivinerForStore() {\n // It should be defined, so we'll error if it's not\n const name: ModuleIdentifier = assertEx(\n this.config?.payloadStore?.boundWitnessDiviner,\n () => `${moduleName}: Config for payloadStore.boundWitnessDiviner not specified`,\n )\n // It might not be resolvable (yet), so we'll return undefined if it's not\n const mod = await this.resolve(name)\n if (!mod) return\n // Return the wrapped diviner\n return DivinerWrapper.wrap<\n DivinerWrapper<\n BoundWitnessDiviner<BoundWitnessDivinerParams, BoundWitnessDivinerQueryPayload, BoundWitness>,\n BoundWitnessDivinerQueryPayload,\n WithStorageMeta<BoundWitness>\n >\n >(mod, this.account)\n }\n\n protected async getPayloadsInBoundWitness(bw: BoundWitness, archivist: ArchivistInstance): Promise<IndexCandidate[] | undefined> {\n const combinations = intraBoundwitnessSchemaCombinations(bw, this.payload_schemas).flat()\n if (combinations.length === 0) return undefined\n const hashes = new Set(combinations)\n const indexCandidates = await archivist.get([...hashes])\n return [bw, ...indexCandidates]\n }\n}\n"],
|
|
4
|
+
"sourcesContent": ["import { IndexingDiviner } from '@xyo-network/diviner-indexing-memory'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport type { TemporalIndexingDivinerParams } from '@xyo-network/diviner-temporal-indexing-model'\nimport { TemporalIndexingDivinerConfigSchema } from '@xyo-network/diviner-temporal-indexing-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol'\n\nexport class TemporalIndexingDiviner<\n TParams extends TemporalIndexingDivinerParams = TemporalIndexingDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends IndexingDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, TemporalIndexingDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = TemporalIndexingDivinerConfigSchema\n\n protected override async startHandler() {\n await super.startHandler()\n }\n}\n", "import type { Hash } from '@xylabs/sdk'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { jsonPathToTransformersDictionary, reducePayloads } from '@xyo-network/diviner-jsonpath-aggregate-memory'\nimport type { SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-model'\nimport type { PayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model'\nimport { PayloadDivinerQuerySchema } from '@xyo-network/diviner-payload-model'\nimport type { TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerParams } from '@xyo-network/diviner-temporal-indexing-model'\nimport {\n TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema,\n TemporalIndexingDivinerResultIndexSchema,\n} from '@xyo-network/diviner-temporal-indexing-model'\nimport type { Labels } from '@xyo-network/module-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol'\nimport { isPayloadOfSchemaType, PayloadBuilder } from '@xyo-network/sdk-protocol'\n// TODO: Inherit from JsonPathAggregateDiviner\n/**\n * A diviner that converts diviner query to index query\n */\nexport class TemporalIndexingDivinerDivinerQueryToIndexQueryDiviner<\n TParams extends TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerParams = TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerParams,\n> extends AbstractDiviner<TParams> {\n static override readonly configSchemas = [...super.configSchemas, TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema]\n static override readonly defaultConfigSchema = TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema\n static override readonly labels: Labels = {\n ...super.labels,\n 'network.xyo.diviner.stage': 'divinerQueryToIndexQueryDiviner',\n }\n\n private _indexableSchemas: Schema[] | undefined\n private _payloadTransformers: SchemaToPayloadTransformersDictionary | undefined\n\n /**\n * The schema of the diviner query payloads\n */\n protected get divinerQuerySchema(): Schema {\n return this.config.divinerQuerySchema ?? PayloadDivinerQuerySchema\n }\n\n /**\n * The schema of the index query payloads\n */\n protected get indexQuerySchema(): Schema {\n return this.config.indexQuerySchema ?? PayloadDivinerQuerySchema\n }\n\n /**\n * The schema of the index payloads\n */\n protected get indexSchema(): Schema {\n return this.config.indexSchema ?? TemporalIndexingDivinerResultIndexSchema\n }\n\n /**\n * List of indexable schemas for this diviner\n */\n protected get indexableSchemas(): Schema[] {\n this._indexableSchemas ??= Object.keys(this.schemaTransforms) as Schema[]\n return this._indexableSchemas\n }\n\n /**\n * Dictionary of schemas to payload transformers for creating indexes\n * from the payloads within a Bound Witness\n */\n protected get payloadTransformers(): SchemaToPayloadTransformersDictionary {\n this._payloadTransformers ??= jsonPathToTransformersDictionary(this.schemaTransforms)\n return this._payloadTransformers\n }\n\n /**\n * The dictionary of schemas to JSON Path transform expressions for creating indexes\n * from the payloads within a Bound Witness\n */\n protected get schemaTransforms(): SchemaToJsonPathTransformExpressionsDictionary {\n return (\n this.config?.schemaTransforms ?? {\n [this.divinerQuerySchema]: [\n {\n defaultValue: 1,\n destinationField: 'limit',\n sourcePathExpression: '$.limit',\n },\n {\n // defaultValue: 0,\n destinationField: 'cursor',\n sourcePathExpression: '$.cursor',\n },\n {\n defaultValue: 'desc',\n destinationField: 'order',\n sourcePathExpression: '$.order',\n },\n ],\n }\n )\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<Payload[]> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument\n const queries = payloads.filter(isPayloadOfSchemaType<PayloadDivinerQueryPayload>(this.divinerQuerySchema as any))\n if (queries.length > 0) {\n return await Promise.all(\n queries.map(async (query) => {\n const fields = await reducePayloads<PayloadDivinerQueryPayload & { $sources?: Hash[]; sources?: Hash[] }>(\n [query],\n this.payloadTransformers,\n this.indexQuerySchema,\n )\n // TODO: Make index schema configurable\n fields.schemas = [this.indexSchema]\n // TODO: Make sources not need to be deleted\n delete fields.sources\n delete fields?.$sources\n // TODO: Add support for additional filters\n return new PayloadBuilder<Payload>({ schema: this.indexQuerySchema }).fields(fields).build()\n }),\n )\n }\n return []\n }\n}\n", "import type { Hash } from '@xylabs/sdk'\nimport {\n assertEx, containsAll, exists,\n} from '@xylabs/sdk'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { jsonPathToTransformersDictionary } from '@xyo-network/diviner-jsonpath-aggregate-memory'\nimport type { SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-model'\nimport type {\n TemporalIndexingDivinerIndexCandidateToIndexDivinerParams,\n TemporalIndexingDivinerResultIndex,\n} from '@xyo-network/diviner-temporal-indexing-model'\nimport {\n TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema,\n TemporalIndexingDivinerResultIndexSchema,\n} from '@xyo-network/diviner-temporal-indexing-model'\nimport type { Labels } from '@xyo-network/module-model'\nimport type {\n BoundWitness, Payload, Schema,\n} from '@xyo-network/sdk-protocol'\nimport {\n intraBoundwitnessSchemaCombinations, isAnyPayload, isBoundWitness, PayloadBuilder,\n} from '@xyo-network/sdk-protocol'\n\ntype IndexableHashes = [Hash, ...Hash[]]\n\nconst moduleName = 'TemporalIndexingDivinerIndexCandidateToIndexDiviner'\n\n/**\n * Diviner which transforms index candidates to indexes using JSON Path to map\n * source properties in the supplied payloads to destination fields in the\n * resultant index\n */\nexport class TemporalIndexingDivinerIndexCandidateToIndexDiviner<\n TParams extends TemporalIndexingDivinerIndexCandidateToIndexDivinerParams = TemporalIndexingDivinerIndexCandidateToIndexDivinerParams,\n> extends AbstractDiviner<TParams> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema\n static override readonly labels: Labels = {\n ...super.labels,\n 'network.xyo.diviner.stage': 'indexCandidateToIndexDiviner',\n }\n\n private _indexableSchemas: Schema[] | undefined\n private _payloadTransformers: SchemaToPayloadTransformersDictionary | undefined\n\n /**\n * List of indexable schemas for this diviner\n */\n protected get indexableSchemas(): Schema[] {\n this._indexableSchemas ??= Object.keys(this.schemaTransforms) as Schema[]\n return this._indexableSchemas\n }\n\n /**\n * Dictionary of schemas to payload transformers for creating indexes\n * from the payloads within a Bound Witness\n */\n protected get payloadTransformers(): SchemaToPayloadTransformersDictionary {\n this._payloadTransformers ??= jsonPathToTransformersDictionary(this.schemaTransforms)\n return this._payloadTransformers\n }\n\n /**\n * The dictionary of schemas to JSON Path transform expressions for creating indexes\n * from the payloads within a Bound Witness\n */\n protected get schemaTransforms(): SchemaToJsonPathTransformExpressionsDictionary {\n return assertEx(this.config?.schemaTransforms, () => `${moduleName}: Missing config.schemaTransforms section`)\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<Payload[]> {\n // If the Bound Witness does not contain all the required schemas do not index it\n const indexableBoundWitnesses = payloads\n .filter(isBoundWitness)\n .filter(bw => containsAll(bw.payload_schemas, this.indexableSchemas))\n // If the Payload is not one of the indexable schemas do not index it\n const indexablePayloads = payloads.filter(p => this.isIndexablePayload(p))\n // If there is nothing to index, return an empty array\n if (indexableBoundWitnesses.length === 0 || indexablePayloads.length === 0) return []\n // Hash all the indexable data once\n const [bwDictionary, payloadDictionary] = await Promise.all([\n PayloadBuilder.toHashMap(indexableBoundWitnesses),\n PayloadBuilder.toAllHashMap(indexablePayloads),\n ])\n\n // Initialize the array for validIndexableTuples outside of the loop\n const validIndexableTuples: IndexableHashes[] = []\n\n // Iterate over each entry in bwDictionary\n for (const [bwHash, bw] of Object.entries(bwDictionary) as [Hash, BoundWitness][]) {\n // Find the combinations of payloads that satisfy the required schemas\n const combinations = intraBoundwitnessSchemaCombinations(bw, this.indexableSchemas)\n\n // Iterate over each combination\n for (const combination of combinations) {\n const indexablePayloads = combination.map(hash => payloadDictionary[hash]).filter(exists)\n\n // If we found the right amount of indexable payloads (of the correct schema as checked\n // above) in this BW, then index it\n if (indexablePayloads.length === this.indexableSchemas.length) {\n validIndexableTuples.push([bwHash, ...combination])\n }\n }\n }\n\n // Create the indexes from the tuples\n const indexes = validIndexableTuples.map<TemporalIndexingDivinerResultIndex>(([bwHash, ...sourcePayloadHashes]) => {\n const sourcePayloads = sourcePayloadHashes.map(hash => payloadDictionary[hash])\n // Use the payload transformers to convert the fields from the source payloads to the destination fields\n const indexFields = sourcePayloads.flatMap((payload) => {\n // Find the transformers for this payload\n const transformers = this.payloadTransformers[payload.schema]\n // If transformers exist, apply them to the payload otherwise return an empty array\n return transformers ? transformers.map(transform => transform(payload)) : []\n })\n // Include all the sources for reference\n const $sources: Hash[] = [bwHash, ...sourcePayloadHashes]\n // Build and return the index\n return new PayloadBuilder<TemporalIndexingDivinerResultIndex>({ schema: TemporalIndexingDivinerResultIndexSchema })\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n .fields(Object.assign({}, ...indexFields))\n .meta({ $sources })\n .build()\n })\n return indexes.flat()\n }\n\n /**\n * Identifies if a payload is one that is indexed by this diviner\n * @param x The candidate payload\n * @returns True if the payload is one indexed by this diviner, false otherwise\n */\n protected isIndexablePayload = (x: unknown) => {\n return isAnyPayload(x) && this.indexableSchemas.includes(x?.schema)\n }\n\n /**\n * Identifies if a schema is one that is indexed by this diviner\n * @param schema The candidate schema\n * @returns True if this schema is one indexed by this diviner, false otherwise\n */\n protected isIndexableSchema = (schema?: Schema | null) => {\n return typeof schema === 'string' ? this.indexableSchemas.includes(schema) : false\n }\n}\n", "import { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport { isPayloadDivinerQueryPayload } from '@xyo-network/diviner-payload-model'\nimport { TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema } from '@xyo-network/diviner-temporal-indexing-model'\nimport type { Labels } from '@xyo-network/module-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol'\n\n/**\n * Transforms an ImageThumbnailIndex response into an ImageThumbnailResponse response\n */\nexport class TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDiviner extends AbstractDiviner {\n static override readonly configSchemas: Schema[] = [\n ...super.configSchemas,\n TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema,\n ]\n\n static override readonly defaultConfigSchema: Schema = TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema\n static override readonly labels: Labels = {\n ...super.labels,\n 'network.xyo.diviner.stage': 'indexQueryResponseToDivinerQueryResponseDiviner',\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<Payload[]> {\n // We're not doing anything with the query payloads but some diviners\n // might want to use this to transform from the query to the response (for example\n // if we use a plaintext value in the query to generate a hash key in the index)\n // const queries = payloads.filter(isPayloadDivinerQueryPayload)\n const responses = payloads.filter(p => !isPayloadDivinerQueryPayload(p))\n return await Promise.resolve(responses)\n }\n}\n", "import { assertEx, exists } from '@xylabs/sdk'\nimport type { ArchivistInstance, ArchivistNextOptions } from '@xyo-network/archivist-model'\nimport { ArchivistWrapper } from '@xyo-network/archivist-wrapper'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { BoundWitnessDiviner } from '@xyo-network/diviner-boundwitness/abstract'\nimport type { BoundWitnessDivinerParams, BoundWitnessDivinerQueryPayload } from '@xyo-network/diviner-boundwitness/model'\nimport type { IndexingDivinerState } from '@xyo-network/diviner-indexing-model'\nimport type { TemporalIndexingDivinerStateToIndexCandidateDivinerParams } from '@xyo-network/diviner-temporal-indexing-model'\nimport { TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema } from '@xyo-network/diviner-temporal-indexing-model'\nimport { DivinerWrapper } from '@xyo-network/diviner-wrapper'\nimport type {\n Labels, ModuleIdentifier, ModuleState,\n} from '@xyo-network/module-model'\nimport { isModuleState, ModuleStateSchema } from '@xyo-network/module-model'\nimport type {\n BoundWitness,\n Payload, Schema,\n WithStorageMeta,\n} from '@xyo-network/sdk-protocol'\nimport {\n intraBoundwitnessSchemaCombinations, isBoundWitness, payloadSchemasContainsAll, SequenceConstants,\n} from '@xyo-network/sdk-protocol'\nimport type { Timestamp } from '@xyo-network/witness-timestamp'\nimport { TimestampSchema } from '@xyo-network/witness-timestamp'\n\n/**\n * All Payload types involved in index candidates for indexing\n */\nexport type IndexCandidate = BoundWitness | Payload | Timestamp\n\n/**\n * The response from the TemporalStateToIndexCandidateDiviner\n */\nexport type TemporalStateToIndexCandidateDivinerResponse = [\n /**\n * The next state of the diviner\n */\n nextState: ModuleState<IndexingDivinerState>,\n /**\n * The index candidates\n */\n ...IndexCandidate[],\n]\n\n/**\n * The default order to search Bound Witnesses to identify index candidates\n */\nconst order = 'asc'\n\n/**\n * The name of the module (for logging purposes)\n */\nconst moduleName = 'TemporalIndexingDivinerStateToIndexCandidateDiviner'\n\n/**\n * Transforms candidates for image thumbnail indexing into their indexed representation\n */\nexport class TemporalIndexingDivinerStateToIndexCandidateDiviner<\n TParams extends TemporalIndexingDivinerStateToIndexCandidateDivinerParams = TemporalIndexingDivinerStateToIndexCandidateDivinerParams,\n> extends AbstractDiviner<TParams, Payload, ModuleState | IndexCandidate> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema\n static override readonly labels: Labels = {\n ...super.labels,\n 'network.xyo.diviner.stage': 'stateToIndexCandidateDiviner',\n }\n\n get payloadDivinerLimit() {\n return this.config.payloadDivinerLimit ?? 1000\n }\n\n /**\n * The required payload_schemas within BoundWitnesses to identify index candidates\n */\n protected get payload_schemas(): Schema[] {\n const schemas = this.config.filter?.payload_schemas\n return [TimestampSchema, ...(schemas ?? [])]\n }\n\n protected override async divineHandler(payloads: Payload[] = []): Promise<TemporalStateToIndexCandidateDivinerResponse> {\n // Retrieve the last state from what was passed in\n const lastState = payloads.find(isModuleState<IndexingDivinerState>)\n // If there is no last state, start from the beginning\n ?? { schema: ModuleStateSchema, state: { cursor: SequenceConstants.minLocalSequence } }\n\n // Get the last cursor\n const cursor = lastState?.state?.cursor\n // Get the archivist for the store\n const sourceArchivist = await this.getArchivistForStore()\n if (!sourceArchivist) return [lastState]\n\n // Get the next batch of results\n const nextOffset: ArchivistNextOptions = { limit: this.payloadDivinerLimit, order }\n // Only use the cursor if it's a valid offset\n if (cursor !== SequenceConstants.minLocalSequence) nextOffset.cursor = cursor\n // Get next batch of results starting from the offset\n const next = await sourceArchivist.next(nextOffset)\n if (next.length === 0) return [lastState]\n\n const batch = next.filter(x => isBoundWitness(x))\n .filter(exists)\n .filter(bw => payloadSchemasContainsAll(bw, this.payload_schemas))\n // Get source data\n const indexCandidates: IndexCandidate[] = (await Promise.all(batch.map(bw => this.getPayloadsInBoundWitness(bw, sourceArchivist))))\n .filter(exists)\n .flat()\n const nextCursor = assertEx(next.at(-1)?._sequence, () => `${moduleName}: Expected next to have a sequence`)\n const nextState: ModuleState<IndexingDivinerState> = { schema: ModuleStateSchema, state: { ...lastState.state, cursor: nextCursor } }\n return [nextState, ...indexCandidates]\n }\n\n /**\n * Retrieves the archivist for the payloadStore\n * @returns The archivist for the payloadStore or undefined if not resolvable\n */\n protected async getArchivistForStore(): Promise<ArchivistWrapper | undefined> {\n // It should be defined, so we'll error if it's not\n const name: ModuleIdentifier = assertEx(\n this.config?.payloadStore?.archivist,\n () => `${moduleName}: Config for payloadStore.archivist not specified`,\n )\n // It might not be resolvable (yet), so we'll return undefined if it's not\n const mod = await this.resolve(name)\n if (!mod) return undefined\n // Return the wrapped archivist\n return ArchivistWrapper.wrap(mod, this.account)\n }\n\n /**\n * Retrieves the BoundWitness Diviner for the payloadStore\n * @returns The BoundWitness Diviner for the payloadStore or undefined if not resolvable\n */\n protected async getBoundWitnessDivinerForStore() {\n // It should be defined, so we'll error if it's not\n const name: ModuleIdentifier = assertEx(\n this.config?.payloadStore?.boundWitnessDiviner,\n () => `${moduleName}: Config for payloadStore.boundWitnessDiviner not specified`,\n )\n // It might not be resolvable (yet), so we'll return undefined if it's not\n const mod = await this.resolve(name)\n if (!mod) return\n // Return the wrapped diviner\n return DivinerWrapper.wrap<\n DivinerWrapper<\n BoundWitnessDiviner<BoundWitnessDivinerParams, BoundWitnessDivinerQueryPayload, BoundWitness>,\n BoundWitnessDivinerQueryPayload,\n WithStorageMeta<BoundWitness>\n >\n >(mod, this.account)\n }\n\n protected async getPayloadsInBoundWitness(bw: BoundWitness, archivist: ArchivistInstance): Promise<IndexCandidate[] | undefined> {\n const combinations = intraBoundwitnessSchemaCombinations(bw, this.payload_schemas).flat()\n if (combinations.length === 0) return undefined\n const hashes = new Set(combinations)\n const indexCandidates = await archivist.get([...hashes])\n return [bw, ...indexCandidates]\n }\n}\n"],
|
|
5
5
|
"mappings": ";AAAA,SAAS,uBAAuB;AAGhC,SAAS,2CAA2C;AAG7C,IAAM,0BAAN,cASG,gBAAgD;AAAA,EACxD,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,mCAAmC;AAAA,EAC/G,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
|
|
6
6
|
"names": ["AbstractDiviner", "jsonPathToTransformersDictionary", "TemporalIndexingDivinerResultIndexSchema", "PayloadBuilder", "indexablePayloads", "AbstractDiviner", "assertEx", "exists", "AbstractDiviner", "intraBoundwitnessSchemaCombinations", "isBoundWitness", "moduleName"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-temporal-indexing-memory",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@xyo-network/
|
|
38
|
-
"@xyo-network/archivist-model": "~7.0.
|
|
39
|
-
"@xyo-network/
|
|
40
|
-
"@xyo-network/diviner-indexing-
|
|
41
|
-
"@xyo-network/diviner-
|
|
42
|
-
"@xyo-network/diviner-
|
|
43
|
-
"@xyo-network/diviner-
|
|
44
|
-
"@xyo-network/diviner-
|
|
45
|
-
"@xyo-network/diviner-model": "~7.0.
|
|
46
|
-
"@xyo-network/diviner-
|
|
47
|
-
"@xyo-network/diviner-
|
|
48
|
-
"@xyo-network/diviner-
|
|
49
|
-
"@xyo-network/module-model": "~7.0.
|
|
50
|
-
"@xyo-network/witness-timestamp": "~7.0.
|
|
37
|
+
"@xyo-network/archivist-wrapper": "~7.0.2",
|
|
38
|
+
"@xyo-network/archivist-model": "~7.0.2",
|
|
39
|
+
"@xyo-network/diviner-indexing-model": "~7.0.2",
|
|
40
|
+
"@xyo-network/diviner-indexing-memory": "~7.0.2",
|
|
41
|
+
"@xyo-network/diviner-boundwitness": "~7.0.2",
|
|
42
|
+
"@xyo-network/diviner-jsonpath-aggregate-memory": "~7.0.2",
|
|
43
|
+
"@xyo-network/diviner-model": "~7.0.2",
|
|
44
|
+
"@xyo-network/diviner-abstract": "~7.0.2",
|
|
45
|
+
"@xyo-network/diviner-jsonpath-model": "~7.0.2",
|
|
46
|
+
"@xyo-network/diviner-payload-model": "~7.0.2",
|
|
47
|
+
"@xyo-network/diviner-wrapper": "~7.0.2",
|
|
48
|
+
"@xyo-network/diviner-temporal-indexing-model": "~7.0.2",
|
|
49
|
+
"@xyo-network/module-model": "~7.0.2",
|
|
50
|
+
"@xyo-network/witness-timestamp": "~7.0.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@bitauth/libauth": "~3.0.0",
|
|
@@ -57,33 +57,33 @@
|
|
|
57
57
|
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
58
58
|
"@scure/base": "~2.2.0",
|
|
59
59
|
"@scure/bip39": "~2.2.0",
|
|
60
|
-
"@xylabs/geo": "^
|
|
61
|
-
"@xylabs/sdk
|
|
62
|
-
"@xylabs/threads": "^
|
|
63
|
-
"@xylabs/toolchain": "^8.
|
|
64
|
-
"@xylabs/tsconfig": "^8.
|
|
65
|
-
"@xylabs/vitest-extended": "^
|
|
66
|
-
"@xyo-network/payload-utils": "~7.0",
|
|
67
|
-
"@xyo-network/sdk-protocol
|
|
60
|
+
"@xylabs/geo": "^7.0.1",
|
|
61
|
+
"@xylabs/sdk": "^7.0.1",
|
|
62
|
+
"@xylabs/threads": "^7.0.1",
|
|
63
|
+
"@xylabs/toolchain": "^8.5.3",
|
|
64
|
+
"@xylabs/tsconfig": "^8.5.3",
|
|
65
|
+
"@xylabs/vitest-extended": "^7.0.1",
|
|
66
|
+
"@xyo-network/payload-utils": "~7.0.4",
|
|
67
|
+
"@xyo-network/sdk-protocol": "^7.0.4",
|
|
68
68
|
"ajv": "^8.20.0",
|
|
69
69
|
"async-mutex": "^0.5.0",
|
|
70
70
|
"debug": "~4.4.3",
|
|
71
|
-
"eslint": "^10.
|
|
72
|
-
"ethers": "^6.
|
|
71
|
+
"eslint": "^10.6.0",
|
|
72
|
+
"ethers": "^6.17.0",
|
|
73
73
|
"hash-wasm": "~4.12.0",
|
|
74
74
|
"idb": "^8.0.3",
|
|
75
75
|
"jsonpath-plus": "^10.4.0",
|
|
76
76
|
"lru-cache": "^11.5.1",
|
|
77
77
|
"observable-fns": "~0.6.1",
|
|
78
78
|
"typescript": "~6.0.3",
|
|
79
|
-
"vite": "^8.0
|
|
80
|
-
"vitest": "~4.1.
|
|
79
|
+
"vite": "^8.1.0",
|
|
80
|
+
"vitest": "~4.1.9",
|
|
81
81
|
"webextension-polyfill": "^0.12.0",
|
|
82
82
|
"zod": "^4.4.3",
|
|
83
|
-
"@xyo-network/archivist-memory": "~7.0.
|
|
84
|
-
"@xyo-network/manifest-wrapper": "~7.0.
|
|
85
|
-
"@xyo-network/module-factory-locator": "~7.0.
|
|
86
|
-
"@xyo-network/node-memory": "~7.0.
|
|
83
|
+
"@xyo-network/archivist-memory": "~7.0.2",
|
|
84
|
+
"@xyo-network/manifest-wrapper": "~7.0.2",
|
|
85
|
+
"@xyo-network/module-factory-locator": "~7.0.2",
|
|
86
|
+
"@xyo-network/node-memory": "~7.0.2"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@bitauth/libauth": "~3.0",
|
|
@@ -94,10 +94,10 @@
|
|
|
94
94
|
"@scure/base": "~2.2",
|
|
95
95
|
"@scure/bip39": "~2.2",
|
|
96
96
|
"@xylabs/geo": "^6.0",
|
|
97
|
-
"@xylabs/sdk
|
|
97
|
+
"@xylabs/sdk": "^6.0",
|
|
98
98
|
"@xylabs/threads": "^6.0",
|
|
99
99
|
"@xyo-network/payload-utils": "~7.0",
|
|
100
|
-
"@xyo-network/sdk-protocol
|
|
100
|
+
"@xyo-network/sdk-protocol": "^7.0",
|
|
101
101
|
"ajv": "^8.20",
|
|
102
102
|
"async-mutex": "^0.5",
|
|
103
103
|
"debug": "~4.4",
|