@xyo-network/diviner-temporal-indexing 7.2.3 → 7.3.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/dist/neutral/index.d.ts +2 -2
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +545 -3
- package/dist/neutral/index.mjs.map +4 -4
- package/dist/neutral/memory/Diviner.d.ts +10 -0
- package/dist/neutral/memory/Diviner.d.ts.map +1 -0
- package/dist/neutral/memory/DivinerQueryToIndexQueryDiviner/Diviner.d.ts +43 -0
- package/dist/neutral/memory/DivinerQueryToIndexQueryDiviner/Diviner.d.ts.map +1 -0
- package/dist/neutral/memory/DivinerQueryToIndexQueryDiviner/index.d.ts +2 -0
- package/dist/neutral/memory/DivinerQueryToIndexQueryDiviner/index.d.ts.map +1 -0
- package/dist/neutral/memory/IndexCandidateToIndexDiviner/Diviner.d.ts +45 -0
- package/dist/neutral/memory/IndexCandidateToIndexDiviner/Diviner.d.ts.map +1 -0
- package/dist/neutral/memory/IndexCandidateToIndexDiviner/index.d.ts +2 -0
- package/dist/neutral/memory/IndexCandidateToIndexDiviner/index.d.ts.map +1 -0
- package/dist/neutral/memory/IndexQueryResponseToDivinerQueryResponseDiviner/Diviner.d.ts +13 -0
- package/dist/neutral/memory/IndexQueryResponseToDivinerQueryResponseDiviner/Diviner.d.ts.map +1 -0
- package/dist/neutral/memory/IndexQueryResponseToDivinerQueryResponseDiviner/index.d.ts +2 -0
- package/dist/neutral/memory/IndexQueryResponseToDivinerQueryResponseDiviner/index.d.ts.map +1 -0
- package/dist/neutral/memory/StateToIndexCandidateDiviner/Diviner.d.ts +54 -0
- package/dist/neutral/memory/StateToIndexCandidateDiviner/Diviner.d.ts.map +1 -0
- package/dist/neutral/memory/StateToIndexCandidateDiviner/index.d.ts +2 -0
- package/dist/neutral/memory/StateToIndexCandidateDiviner/index.d.ts.map +1 -0
- package/dist/neutral/memory/index.d.ts +6 -0
- package/dist/neutral/memory/index.d.ts.map +1 -0
- package/dist/neutral/memory.d.ts +2 -0
- package/dist/neutral/memory.d.ts.map +1 -0
- package/dist/neutral/memory.mjs +470 -0
- package/dist/neutral/memory.mjs.map +7 -0
- package/dist/neutral/model/Config.d.ts +74 -0
- package/dist/neutral/model/Config.d.ts.map +1 -0
- package/dist/neutral/model/DivinerQueryToIndexQueryDiviner/Config.d.ts +47 -0
- package/dist/neutral/model/DivinerQueryToIndexQueryDiviner/Config.d.ts.map +1 -0
- package/dist/neutral/model/DivinerQueryToIndexQueryDiviner/Params.d.ts +5 -0
- package/dist/neutral/model/DivinerQueryToIndexQueryDiviner/Params.d.ts.map +1 -0
- package/dist/neutral/model/DivinerQueryToIndexQueryDiviner/Schema.d.ts +5 -0
- package/dist/neutral/model/DivinerQueryToIndexQueryDiviner/Schema.d.ts.map +1 -0
- package/dist/neutral/model/DivinerQueryToIndexQueryDiviner/index.d.ts +4 -0
- package/dist/neutral/model/DivinerQueryToIndexQueryDiviner/index.d.ts.map +1 -0
- package/dist/neutral/model/IndexCandidateToIndexDiviner/Config.d.ts +31 -0
- package/dist/neutral/model/IndexCandidateToIndexDiviner/Config.d.ts.map +1 -0
- package/dist/neutral/model/IndexCandidateToIndexDiviner/Params.d.ts +8 -0
- package/dist/neutral/model/IndexCandidateToIndexDiviner/Params.d.ts.map +1 -0
- package/dist/neutral/model/IndexCandidateToIndexDiviner/Schema.d.ts +5 -0
- package/dist/neutral/model/IndexCandidateToIndexDiviner/Schema.d.ts.map +1 -0
- package/dist/neutral/model/IndexCandidateToIndexDiviner/index.d.ts +4 -0
- package/dist/neutral/model/IndexCandidateToIndexDiviner/index.d.ts.map +1 -0
- package/dist/neutral/model/IndexQueryResponseToDivinerQueryResponseDiviner/Config.d.ts +31 -0
- package/dist/neutral/model/IndexQueryResponseToDivinerQueryResponseDiviner/Config.d.ts.map +1 -0
- package/dist/neutral/model/IndexQueryResponseToDivinerQueryResponseDiviner/Params.d.ts +5 -0
- package/dist/neutral/model/IndexQueryResponseToDivinerQueryResponseDiviner/Params.d.ts.map +1 -0
- package/dist/neutral/model/IndexQueryResponseToDivinerQueryResponseDiviner/Schema.d.ts +5 -0
- package/dist/neutral/model/IndexQueryResponseToDivinerQueryResponseDiviner/Schema.d.ts.map +1 -0
- package/dist/neutral/model/IndexQueryResponseToDivinerQueryResponseDiviner/index.d.ts +4 -0
- package/dist/neutral/model/IndexQueryResponseToDivinerQueryResponseDiviner/index.d.ts.map +1 -0
- package/dist/neutral/model/Params.d.ts +5 -0
- package/dist/neutral/model/Params.d.ts.map +1 -0
- package/dist/neutral/model/Result/Payload.d.ts +14 -0
- package/dist/neutral/model/Result/Payload.d.ts.map +1 -0
- package/dist/neutral/model/Result/Schema.d.ts +5 -0
- package/dist/neutral/model/Result/Schema.d.ts.map +1 -0
- package/dist/neutral/model/Result/index.d.ts +3 -0
- package/dist/neutral/model/Result/index.d.ts.map +1 -0
- package/dist/neutral/model/ResultIndex/Payload.d.ts +14 -0
- package/dist/neutral/model/ResultIndex/Payload.d.ts.map +1 -0
- package/dist/neutral/model/ResultIndex/Schema.d.ts +5 -0
- package/dist/neutral/model/ResultIndex/Schema.d.ts.map +1 -0
- package/dist/neutral/model/ResultIndex/index.d.ts +3 -0
- package/dist/neutral/model/ResultIndex/index.d.ts.map +1 -0
- package/dist/neutral/model/Schema.d.ts +5 -0
- package/dist/neutral/model/Schema.d.ts.map +1 -0
- package/dist/neutral/model/StateToIndexCandidateDiviner/Config.d.ts +41 -0
- package/dist/neutral/model/StateToIndexCandidateDiviner/Config.d.ts.map +1 -0
- package/dist/neutral/model/StateToIndexCandidateDiviner/Params.d.ts +5 -0
- package/dist/neutral/model/StateToIndexCandidateDiviner/Params.d.ts.map +1 -0
- package/dist/neutral/model/StateToIndexCandidateDiviner/Schema.d.ts +5 -0
- package/dist/neutral/model/StateToIndexCandidateDiviner/Schema.d.ts.map +1 -0
- package/dist/neutral/model/StateToIndexCandidateDiviner/index.d.ts +4 -0
- package/dist/neutral/model/StateToIndexCandidateDiviner/index.d.ts.map +1 -0
- package/dist/neutral/model/index.d.ts +10 -0
- package/dist/neutral/model/index.d.ts.map +1 -0
- package/dist/neutral/model.d.ts +2 -0
- package/dist/neutral/model.d.ts.map +1 -0
- package/dist/neutral/model.mjs +242 -0
- package/dist/neutral/model.mjs.map +7 -0
- package/package.json +27 -8
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
// src/memory/Diviner.ts
|
|
2
|
+
import { IndexingDiviner } from "@xyo-network/diviner-indexing/memory";
|
|
3
|
+
|
|
4
|
+
// src/model/Config.ts
|
|
5
|
+
import {
|
|
6
|
+
zodAsFactory,
|
|
7
|
+
zodIsFactory,
|
|
8
|
+
zodToFactory
|
|
9
|
+
} from "@ariestools/sdk";
|
|
10
|
+
import { DivinerConfigZod } from "@xyo-network/sdk/diviner-model";
|
|
11
|
+
import { asSchema as asSchema2 } from "@xyo-network/sdk-protocol";
|
|
12
|
+
import * as z from "zod/mini";
|
|
13
|
+
|
|
14
|
+
// src/model/Schema.ts
|
|
15
|
+
import { IndexingDivinerSchema } from "@xyo-network/diviner-indexing/model";
|
|
16
|
+
import { asSchema } from "@xyo-network/sdk-protocol";
|
|
17
|
+
var TemporalIndexingDivinerSchema = asSchema(`${IndexingDivinerSchema}.temporal`, true);
|
|
18
|
+
|
|
19
|
+
// src/model/Config.ts
|
|
20
|
+
var TemporalIndexingDivinerConfigSchema = asSchema2(`${TemporalIndexingDivinerSchema}.config`, true);
|
|
21
|
+
var TemporalIndexingDivinerConfigZod = z.extend(DivinerConfigZod, {
|
|
22
|
+
indexStore: z.optional(z.custom()),
|
|
23
|
+
indexingDivinerStages: z.optional(z.custom()),
|
|
24
|
+
payloadDivinerLimit: z.optional(z.number()),
|
|
25
|
+
pollFrequency: z.optional(z.number()),
|
|
26
|
+
schema: z.literal(TemporalIndexingDivinerConfigSchema),
|
|
27
|
+
stageConfigs: z.optional(z.object({
|
|
28
|
+
divinerQueryToIndexQueryDiviner: z.optional(z.custom()),
|
|
29
|
+
indexCandidateToIndexDiviner: z.optional(z.custom()),
|
|
30
|
+
indexQueryResponseToDivinerQueryResponseDiviner: z.optional(
|
|
31
|
+
z.custom()
|
|
32
|
+
),
|
|
33
|
+
stateToIndexCandidateDiviner: z.optional(z.custom())
|
|
34
|
+
})),
|
|
35
|
+
stateStore: z.optional(z.custom())
|
|
36
|
+
});
|
|
37
|
+
var isTemporalIndexingDivinerConfig = zodIsFactory(TemporalIndexingDivinerConfigZod);
|
|
38
|
+
var asTemporalIndexingDivinerConfig = zodAsFactory(TemporalIndexingDivinerConfigZod, "asTemporalIndexingDivinerConfig");
|
|
39
|
+
var toTemporalIndexingDivinerConfig = zodToFactory(TemporalIndexingDivinerConfigZod, "toTemporalIndexingDivinerConfig");
|
|
40
|
+
|
|
41
|
+
// src/model/DivinerQueryToIndexQueryDiviner/Config.ts
|
|
42
|
+
import {
|
|
43
|
+
zodAsFactory as zodAsFactory2,
|
|
44
|
+
zodIsFactory as zodIsFactory2,
|
|
45
|
+
zodToFactory as zodToFactory2
|
|
46
|
+
} from "@ariestools/sdk";
|
|
47
|
+
import { DivinerConfigZod as DivinerConfigZod2 } from "@xyo-network/sdk/diviner-model";
|
|
48
|
+
import { asSchema as asSchema4 } from "@xyo-network/sdk-protocol";
|
|
49
|
+
import * as z2 from "zod/mini";
|
|
50
|
+
|
|
51
|
+
// src/model/DivinerQueryToIndexQueryDiviner/Schema.ts
|
|
52
|
+
import { asSchema as asSchema3 } from "@xyo-network/sdk-protocol";
|
|
53
|
+
var TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerSchema = asSchema3(`${TemporalIndexingDivinerSchema}.stage.diviner.query.to.index.query.diviner`, true);
|
|
54
|
+
|
|
55
|
+
// src/model/DivinerQueryToIndexQueryDiviner/Config.ts
|
|
56
|
+
var TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema = asSchema4(`${TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerSchema}.config`, true);
|
|
57
|
+
var TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigZod = z2.extend(DivinerConfigZod2, {
|
|
58
|
+
divinerQuerySchema: z2.optional(z2.custom()),
|
|
59
|
+
indexQuerySchema: z2.optional(z2.custom()),
|
|
60
|
+
indexSchema: z2.optional(z2.custom()),
|
|
61
|
+
schema: z2.literal(TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema),
|
|
62
|
+
schemaTransforms: z2.optional(z2.custom())
|
|
63
|
+
});
|
|
64
|
+
var isTemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig = zodIsFactory2(TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigZod);
|
|
65
|
+
var asTemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig = zodAsFactory2(
|
|
66
|
+
TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigZod,
|
|
67
|
+
"asTemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig"
|
|
68
|
+
);
|
|
69
|
+
var toTemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig = zodToFactory2(
|
|
70
|
+
TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigZod,
|
|
71
|
+
"toTemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig"
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
// src/model/IndexCandidateToIndexDiviner/Config.ts
|
|
75
|
+
import {
|
|
76
|
+
zodAsFactory as zodAsFactory3,
|
|
77
|
+
zodIsFactory as zodIsFactory3,
|
|
78
|
+
zodToFactory as zodToFactory3
|
|
79
|
+
} from "@ariestools/sdk";
|
|
80
|
+
import { DivinerConfigZod as DivinerConfigZod3 } from "@xyo-network/sdk/diviner-model";
|
|
81
|
+
import { asSchema as asSchema6 } from "@xyo-network/sdk-protocol";
|
|
82
|
+
import * as z3 from "zod/mini";
|
|
83
|
+
|
|
84
|
+
// src/model/IndexCandidateToIndexDiviner/Schema.ts
|
|
85
|
+
import { asSchema as asSchema5 } from "@xyo-network/sdk-protocol";
|
|
86
|
+
var TemporalIndexingDivinerIndexCandidateToIndexDivinerSchema = asSchema5(`${TemporalIndexingDivinerSchema}.stage.index.candidate.to.index.diviner`, true);
|
|
87
|
+
|
|
88
|
+
// src/model/IndexCandidateToIndexDiviner/Config.ts
|
|
89
|
+
var TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema = asSchema6(`${TemporalIndexingDivinerIndexCandidateToIndexDivinerSchema}.config`, true);
|
|
90
|
+
var TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigZod = z3.extend(DivinerConfigZod3, {
|
|
91
|
+
schema: z3.literal(TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema),
|
|
92
|
+
schemaTransforms: z3.optional(z3.custom())
|
|
93
|
+
});
|
|
94
|
+
var isTemporalIndexingDivinerIndexCandidateToIndexDivinerConfig = zodIsFactory3(TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigZod);
|
|
95
|
+
var asTemporalIndexingDivinerIndexCandidateToIndexDivinerConfig = zodAsFactory3(TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigZod, "asTemporalIndexingDivinerIndexCandidateToIndexDivinerConfig");
|
|
96
|
+
var toTemporalIndexingDivinerIndexCandidateToIndexDivinerConfig = zodToFactory3(TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigZod, "toTemporalIndexingDivinerIndexCandidateToIndexDivinerConfig");
|
|
97
|
+
|
|
98
|
+
// src/model/IndexQueryResponseToDivinerQueryResponseDiviner/Config.ts
|
|
99
|
+
import {
|
|
100
|
+
zodAsFactory as zodAsFactory4,
|
|
101
|
+
zodIsFactory as zodIsFactory4,
|
|
102
|
+
zodToFactory as zodToFactory4
|
|
103
|
+
} from "@ariestools/sdk";
|
|
104
|
+
import { DivinerConfigZod as DivinerConfigZod4 } from "@xyo-network/sdk/diviner-model";
|
|
105
|
+
import { asSchema as asSchema8 } from "@xyo-network/sdk-protocol";
|
|
106
|
+
import * as z4 from "zod/mini";
|
|
107
|
+
|
|
108
|
+
// src/model/IndexQueryResponseToDivinerQueryResponseDiviner/Schema.ts
|
|
109
|
+
import { asSchema as asSchema7 } from "@xyo-network/sdk-protocol";
|
|
110
|
+
var TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerSchema = asSchema7(`${TemporalIndexingDivinerSchema}.stage.index.query.response.to.diviner.query.response.diviner`, true);
|
|
111
|
+
|
|
112
|
+
// src/model/IndexQueryResponseToDivinerQueryResponseDiviner/Config.ts
|
|
113
|
+
var TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema = asSchema8(`${TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerSchema}.config`, true);
|
|
114
|
+
var TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigZod = z4.extend(DivinerConfigZod4, {
|
|
115
|
+
schema: z4.literal(TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema),
|
|
116
|
+
schemaTransforms: z4.optional(z4.custom())
|
|
117
|
+
});
|
|
118
|
+
var isTemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig = zodIsFactory4(TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigZod);
|
|
119
|
+
var asTemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig = zodAsFactory4(
|
|
120
|
+
TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigZod,
|
|
121
|
+
"asTemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig"
|
|
122
|
+
);
|
|
123
|
+
var toTemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig = zodToFactory4(
|
|
124
|
+
TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigZod,
|
|
125
|
+
"toTemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig"
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
// src/model/Result/Schema.ts
|
|
129
|
+
import { asSchema as asSchema9 } from "@xyo-network/sdk-protocol";
|
|
130
|
+
var TemporalIndexingDivinerResultSchema = asSchema9(`${TemporalIndexingDivinerSchema}.result`, true);
|
|
131
|
+
|
|
132
|
+
// src/model/ResultIndex/Schema.ts
|
|
133
|
+
import { asSchema as asSchema10 } from "@xyo-network/sdk-protocol";
|
|
134
|
+
var TemporalIndexingDivinerResultIndexSchema = asSchema10(`${TemporalIndexingDivinerResultSchema}.index`, true);
|
|
135
|
+
|
|
136
|
+
// src/model/StateToIndexCandidateDiviner/Config.ts
|
|
137
|
+
import {
|
|
138
|
+
zodAsFactory as zodAsFactory5,
|
|
139
|
+
zodIsFactory as zodIsFactory5,
|
|
140
|
+
zodToFactory as zodToFactory5
|
|
141
|
+
} from "@ariestools/sdk";
|
|
142
|
+
import { DivinerConfigZod as DivinerConfigZod5 } from "@xyo-network/sdk/diviner-model";
|
|
143
|
+
import { asSchema as asSchema12 } from "@xyo-network/sdk-protocol";
|
|
144
|
+
import * as z5 from "zod/mini";
|
|
145
|
+
|
|
146
|
+
// src/model/StateToIndexCandidateDiviner/Schema.ts
|
|
147
|
+
import { asSchema as asSchema11 } from "@xyo-network/sdk-protocol";
|
|
148
|
+
var TemporalIndexingDivinerStateToIndexCandidateDivinerSchema = asSchema11(`${TemporalIndexingDivinerSchema}.stage.state.to.index.candidate.diviner`, true);
|
|
149
|
+
|
|
150
|
+
// src/model/StateToIndexCandidateDiviner/Config.ts
|
|
151
|
+
var TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema = asSchema12(`${TemporalIndexingDivinerStateToIndexCandidateDivinerSchema}.config`, true);
|
|
152
|
+
var TemporalIndexingDivinerStateToIndexCandidateDivinerConfigZod = z5.extend(DivinerConfigZod5, {
|
|
153
|
+
filter: z5.optional(z5.custom()),
|
|
154
|
+
payloadDivinerLimit: z5.optional(z5.number()),
|
|
155
|
+
payloadStore: z5.optional(z5.custom()),
|
|
156
|
+
schema: z5.literal(TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema)
|
|
157
|
+
});
|
|
158
|
+
var isTemporalIndexingDivinerStateToIndexCandidateDivinerConfig = zodIsFactory5(TemporalIndexingDivinerStateToIndexCandidateDivinerConfigZod);
|
|
159
|
+
var asTemporalIndexingDivinerStateToIndexCandidateDivinerConfig = zodAsFactory5(
|
|
160
|
+
TemporalIndexingDivinerStateToIndexCandidateDivinerConfigZod,
|
|
161
|
+
"asTemporalIndexingDivinerStateToIndexCandidateDivinerConfig"
|
|
162
|
+
);
|
|
163
|
+
var toTemporalIndexingDivinerStateToIndexCandidateDivinerConfig = zodToFactory5(
|
|
164
|
+
TemporalIndexingDivinerStateToIndexCandidateDivinerConfigZod,
|
|
165
|
+
"toTemporalIndexingDivinerStateToIndexCandidateDivinerConfig"
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
// src/memory/Diviner.ts
|
|
169
|
+
var TemporalIndexingDiviner = class extends IndexingDiviner {
|
|
170
|
+
static configSchemas = [...super.configSchemas, TemporalIndexingDivinerConfigSchema];
|
|
171
|
+
static defaultConfigSchema = TemporalIndexingDivinerConfigSchema;
|
|
172
|
+
async startHandler() {
|
|
173
|
+
await super.startHandler();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
// src/memory/DivinerQueryToIndexQueryDiviner/Diviner.ts
|
|
178
|
+
import { jsonPathToTransformersDictionary, reducePayloads } from "@xyo-network/diviner-jsonpath-aggregate/memory";
|
|
179
|
+
import { AbstractDiviner } from "@xyo-network/sdk/diviner-abstract";
|
|
180
|
+
import { PayloadDivinerQuerySchema } from "@xyo-network/sdk/diviner-payload-model";
|
|
181
|
+
import { isPayloadOfSchemaType, PayloadBuilder } from "@xyo-network/sdk-protocol";
|
|
182
|
+
var TemporalIndexingDivinerDivinerQueryToIndexQueryDiviner = class extends AbstractDiviner {
|
|
183
|
+
static configSchemas = [...super.configSchemas, TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema];
|
|
184
|
+
static defaultConfigSchema = TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema;
|
|
185
|
+
static labels = {
|
|
186
|
+
...super.labels,
|
|
187
|
+
"network.xyo.diviner.stage": "divinerQueryToIndexQueryDiviner"
|
|
188
|
+
};
|
|
189
|
+
_indexableSchemas;
|
|
190
|
+
_payloadTransformers;
|
|
191
|
+
/**
|
|
192
|
+
* The schema of the diviner query payloads
|
|
193
|
+
*/
|
|
194
|
+
get divinerQuerySchema() {
|
|
195
|
+
return this.config.divinerQuerySchema ?? PayloadDivinerQuerySchema;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* The schema of the index query payloads
|
|
199
|
+
*/
|
|
200
|
+
get indexQuerySchema() {
|
|
201
|
+
return this.config.indexQuerySchema ?? PayloadDivinerQuerySchema;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* The schema of the index payloads
|
|
205
|
+
*/
|
|
206
|
+
get indexSchema() {
|
|
207
|
+
return this.config.indexSchema ?? TemporalIndexingDivinerResultIndexSchema;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* List of indexable schemas for this diviner
|
|
211
|
+
*/
|
|
212
|
+
get indexableSchemas() {
|
|
213
|
+
this._indexableSchemas ??= Object.keys(this.schemaTransforms);
|
|
214
|
+
return this._indexableSchemas;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Dictionary of schemas to payload transformers for creating indexes
|
|
218
|
+
* from the payloads within a Bound Witness
|
|
219
|
+
*/
|
|
220
|
+
get payloadTransformers() {
|
|
221
|
+
this._payloadTransformers ??= jsonPathToTransformersDictionary(this.schemaTransforms);
|
|
222
|
+
return this._payloadTransformers;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* The dictionary of schemas to JSON Path transform expressions for creating indexes
|
|
226
|
+
* from the payloads within a Bound Witness
|
|
227
|
+
*/
|
|
228
|
+
get schemaTransforms() {
|
|
229
|
+
return this.config?.schemaTransforms ?? {
|
|
230
|
+
[this.divinerQuerySchema]: [
|
|
231
|
+
{
|
|
232
|
+
defaultValue: 1,
|
|
233
|
+
destinationField: "limit",
|
|
234
|
+
sourcePathExpression: "$.limit"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
// defaultValue: 0,
|
|
238
|
+
destinationField: "cursor",
|
|
239
|
+
sourcePathExpression: "$.cursor"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
defaultValue: "desc",
|
|
243
|
+
destinationField: "order",
|
|
244
|
+
sourcePathExpression: "$.order"
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
async divineHandler(payloads = []) {
|
|
250
|
+
const queries = payloads.filter(isPayloadOfSchemaType(this.divinerQuerySchema));
|
|
251
|
+
if (queries.length > 0) {
|
|
252
|
+
return await Promise.all(
|
|
253
|
+
queries.map(async (query) => {
|
|
254
|
+
const fields = await reducePayloads(
|
|
255
|
+
[query],
|
|
256
|
+
this.payloadTransformers,
|
|
257
|
+
this.indexQuerySchema
|
|
258
|
+
);
|
|
259
|
+
fields.schemas = [this.indexSchema];
|
|
260
|
+
delete fields.sources;
|
|
261
|
+
delete fields?.$sources;
|
|
262
|
+
return new PayloadBuilder({ schema: this.indexQuerySchema }).fields(fields).build();
|
|
263
|
+
})
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
return [];
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
// src/memory/IndexCandidateToIndexDiviner/Diviner.ts
|
|
271
|
+
import {
|
|
272
|
+
assertEx,
|
|
273
|
+
containsAll,
|
|
274
|
+
exists
|
|
275
|
+
} from "@ariestools/sdk";
|
|
276
|
+
import { jsonPathToTransformersDictionary as jsonPathToTransformersDictionary2 } from "@xyo-network/diviner-jsonpath-aggregate/memory";
|
|
277
|
+
import { AbstractDiviner as AbstractDiviner2 } from "@xyo-network/sdk/diviner-abstract";
|
|
278
|
+
import {
|
|
279
|
+
intraBoundwitnessSchemaCombinations,
|
|
280
|
+
isAnyPayload,
|
|
281
|
+
isBoundWitness,
|
|
282
|
+
PayloadBuilder as PayloadBuilder2
|
|
283
|
+
} from "@xyo-network/sdk-protocol";
|
|
284
|
+
var moduleName = "TemporalIndexingDivinerIndexCandidateToIndexDiviner";
|
|
285
|
+
var TemporalIndexingDivinerIndexCandidateToIndexDiviner = class extends AbstractDiviner2 {
|
|
286
|
+
static configSchemas = [...super.configSchemas, TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema];
|
|
287
|
+
static defaultConfigSchema = TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema;
|
|
288
|
+
static labels = {
|
|
289
|
+
...super.labels,
|
|
290
|
+
"network.xyo.diviner.stage": "indexCandidateToIndexDiviner"
|
|
291
|
+
};
|
|
292
|
+
_indexableSchemas;
|
|
293
|
+
_payloadTransformers;
|
|
294
|
+
/**
|
|
295
|
+
* List of indexable schemas for this diviner
|
|
296
|
+
*/
|
|
297
|
+
get indexableSchemas() {
|
|
298
|
+
this._indexableSchemas ??= Object.keys(this.schemaTransforms);
|
|
299
|
+
return this._indexableSchemas;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Dictionary of schemas to payload transformers for creating indexes
|
|
303
|
+
* from the payloads within a Bound Witness
|
|
304
|
+
*/
|
|
305
|
+
get payloadTransformers() {
|
|
306
|
+
this._payloadTransformers ??= jsonPathToTransformersDictionary2(this.schemaTransforms);
|
|
307
|
+
return this._payloadTransformers;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* The dictionary of schemas to JSON Path transform expressions for creating indexes
|
|
311
|
+
* from the payloads within a Bound Witness
|
|
312
|
+
*/
|
|
313
|
+
get schemaTransforms() {
|
|
314
|
+
return assertEx(this.config?.schemaTransforms, () => `${moduleName}: Missing config.schemaTransforms section`);
|
|
315
|
+
}
|
|
316
|
+
async divineHandler(payloads = []) {
|
|
317
|
+
const indexableBoundWitnesses = payloads.filter(isBoundWitness).filter((bw) => containsAll(bw.payload_schemas, this.indexableSchemas));
|
|
318
|
+
const indexablePayloads = payloads.filter((p) => this.isIndexablePayload(p));
|
|
319
|
+
if (indexableBoundWitnesses.length === 0 || indexablePayloads.length === 0) return [];
|
|
320
|
+
const [bwDictionary, payloadDictionary] = await Promise.all([
|
|
321
|
+
PayloadBuilder2.toHashMap(indexableBoundWitnesses),
|
|
322
|
+
PayloadBuilder2.toAllHashMap(indexablePayloads)
|
|
323
|
+
]);
|
|
324
|
+
const validIndexableTuples = [];
|
|
325
|
+
for (const [bwHash, bw] of Object.entries(bwDictionary)) {
|
|
326
|
+
const combinations = intraBoundwitnessSchemaCombinations(bw, this.indexableSchemas);
|
|
327
|
+
for (const combination of combinations) {
|
|
328
|
+
const indexablePayloads2 = combination.map((hash) => payloadDictionary[hash]).filter(exists);
|
|
329
|
+
if (indexablePayloads2.length === this.indexableSchemas.length) {
|
|
330
|
+
validIndexableTuples.push([bwHash, ...combination]);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
const indexes = validIndexableTuples.map(([bwHash, ...sourcePayloadHashes]) => {
|
|
335
|
+
const sourcePayloads = sourcePayloadHashes.map((hash) => payloadDictionary[hash]);
|
|
336
|
+
const indexFields = sourcePayloads.flatMap((payload) => {
|
|
337
|
+
const transformers = this.payloadTransformers[payload.schema];
|
|
338
|
+
return transformers ? transformers.map((transform) => transform(payload)) : [];
|
|
339
|
+
});
|
|
340
|
+
const $sources = [bwHash, ...sourcePayloadHashes];
|
|
341
|
+
return new PayloadBuilder2({ schema: TemporalIndexingDivinerResultIndexSchema }).fields(Object.assign({}, ...indexFields)).meta({ $sources }).build();
|
|
342
|
+
});
|
|
343
|
+
return indexes.flat();
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Identifies if a payload is one that is indexed by this diviner
|
|
347
|
+
* @param x The candidate payload
|
|
348
|
+
* @returns True if the payload is one indexed by this diviner, false otherwise
|
|
349
|
+
*/
|
|
350
|
+
isIndexablePayload = (x) => {
|
|
351
|
+
return isAnyPayload(x) && this.indexableSchemas.includes(x?.schema);
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* Identifies if a schema is one that is indexed by this diviner
|
|
355
|
+
* @param schema The candidate schema
|
|
356
|
+
* @returns True if this schema is one indexed by this diviner, false otherwise
|
|
357
|
+
*/
|
|
358
|
+
isIndexableSchema = (schema) => {
|
|
359
|
+
return typeof schema === "string" ? this.indexableSchemas.includes(schema) : false;
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
// src/memory/IndexQueryResponseToDivinerQueryResponseDiviner/Diviner.ts
|
|
364
|
+
import { AbstractDiviner as AbstractDiviner3 } from "@xyo-network/sdk/diviner-abstract";
|
|
365
|
+
import { isPayloadDivinerQueryPayload } from "@xyo-network/sdk/diviner-payload-model";
|
|
366
|
+
var TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDiviner = class extends AbstractDiviner3 {
|
|
367
|
+
static configSchemas = [
|
|
368
|
+
...super.configSchemas,
|
|
369
|
+
TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema
|
|
370
|
+
];
|
|
371
|
+
static defaultConfigSchema = TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema;
|
|
372
|
+
static labels = {
|
|
373
|
+
...super.labels,
|
|
374
|
+
"network.xyo.diviner.stage": "indexQueryResponseToDivinerQueryResponseDiviner"
|
|
375
|
+
};
|
|
376
|
+
async divineHandler(payloads = []) {
|
|
377
|
+
const responses = payloads.filter((p) => !isPayloadDivinerQueryPayload(p));
|
|
378
|
+
return responses;
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
// src/memory/StateToIndexCandidateDiviner/Diviner.ts
|
|
383
|
+
import { assertEx as assertEx2, exists as exists2 } from "@ariestools/sdk";
|
|
384
|
+
import { ArchivistWrapper } from "@xyo-network/sdk/archivist-wrapper";
|
|
385
|
+
import { AbstractDiviner as AbstractDiviner4 } from "@xyo-network/sdk/diviner-abstract";
|
|
386
|
+
import { DivinerWrapper } from "@xyo-network/sdk/diviner-wrapper";
|
|
387
|
+
import { isModuleState, ModuleStateSchema } from "@xyo-network/sdk/module-model";
|
|
388
|
+
import {
|
|
389
|
+
intraBoundwitnessSchemaCombinations as intraBoundwitnessSchemaCombinations2,
|
|
390
|
+
isBoundWitness as isBoundWitness2,
|
|
391
|
+
payloadSchemasContainsAll,
|
|
392
|
+
SequenceConstants
|
|
393
|
+
} from "@xyo-network/sdk-protocol";
|
|
394
|
+
import { TimestampSchema } from "@xyo-network/witness-timestamp";
|
|
395
|
+
var order = "asc";
|
|
396
|
+
var moduleName2 = "TemporalIndexingDivinerStateToIndexCandidateDiviner";
|
|
397
|
+
var TemporalIndexingDivinerStateToIndexCandidateDiviner = class extends AbstractDiviner4 {
|
|
398
|
+
static configSchemas = [...super.configSchemas, TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema];
|
|
399
|
+
static defaultConfigSchema = TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema;
|
|
400
|
+
static labels = {
|
|
401
|
+
...super.labels,
|
|
402
|
+
"network.xyo.diviner.stage": "stateToIndexCandidateDiviner"
|
|
403
|
+
};
|
|
404
|
+
get payloadDivinerLimit() {
|
|
405
|
+
return this.config.payloadDivinerLimit ?? 1e3;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* The required payload_schemas within BoundWitnesses to identify index candidates
|
|
409
|
+
*/
|
|
410
|
+
get payload_schemas() {
|
|
411
|
+
const schemas = this.config.filter?.payload_schemas;
|
|
412
|
+
return [TimestampSchema, ...schemas ?? []];
|
|
413
|
+
}
|
|
414
|
+
async divineHandler(payloads = []) {
|
|
415
|
+
const lastState = payloads.find(isModuleState) ?? { schema: ModuleStateSchema, state: { cursor: SequenceConstants.minLocalSequence } };
|
|
416
|
+
const cursor = lastState?.state?.cursor;
|
|
417
|
+
const sourceArchivist = await this.getArchivistForStore();
|
|
418
|
+
if (!sourceArchivist) return [lastState];
|
|
419
|
+
const nextOffset = { limit: this.payloadDivinerLimit, order };
|
|
420
|
+
if (cursor !== SequenceConstants.minLocalSequence) nextOffset.cursor = cursor;
|
|
421
|
+
const next = await sourceArchivist.next(nextOffset);
|
|
422
|
+
if (next.length === 0) return [lastState];
|
|
423
|
+
const batch = next.filter((x) => isBoundWitness2(x)).filter(exists2).filter((bw) => payloadSchemasContainsAll(bw, this.payload_schemas));
|
|
424
|
+
const indexCandidates = (await Promise.all(batch.map((bw) => this.getPayloadsInBoundWitness(bw, sourceArchivist)))).filter(exists2).flat();
|
|
425
|
+
const nextCursor = assertEx2(next.at(-1)?._sequence, () => `${moduleName2}: Expected next to have a sequence`);
|
|
426
|
+
const nextState = { schema: ModuleStateSchema, state: { ...lastState.state, cursor: nextCursor } };
|
|
427
|
+
return [nextState, ...indexCandidates];
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Retrieves the archivist for the payloadStore
|
|
431
|
+
* @returns The archivist for the payloadStore or undefined if not resolvable
|
|
432
|
+
*/
|
|
433
|
+
async getArchivistForStore() {
|
|
434
|
+
const name = assertEx2(
|
|
435
|
+
this.config?.payloadStore?.archivist,
|
|
436
|
+
() => `${moduleName2}: Config for payloadStore.archivist not specified`
|
|
437
|
+
);
|
|
438
|
+
const mod = await this.resolve(name);
|
|
439
|
+
if (!mod) return void 0;
|
|
440
|
+
return ArchivistWrapper.wrap(mod, this.account);
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Retrieves the BoundWitness Diviner for the payloadStore
|
|
444
|
+
* @returns The BoundWitness Diviner for the payloadStore or undefined if not resolvable
|
|
445
|
+
*/
|
|
446
|
+
async getBoundWitnessDivinerForStore() {
|
|
447
|
+
const name = assertEx2(
|
|
448
|
+
this.config?.payloadStore?.boundWitnessDiviner,
|
|
449
|
+
() => `${moduleName2}: Config for payloadStore.boundWitnessDiviner not specified`
|
|
450
|
+
);
|
|
451
|
+
const mod = await this.resolve(name);
|
|
452
|
+
if (!mod) return;
|
|
453
|
+
return DivinerWrapper.wrap(mod, this.account);
|
|
454
|
+
}
|
|
455
|
+
async getPayloadsInBoundWitness(bw, archivist) {
|
|
456
|
+
const combinations = intraBoundwitnessSchemaCombinations2(bw, this.payload_schemas).flat();
|
|
457
|
+
if (combinations.length === 0) return void 0;
|
|
458
|
+
const hashes = new Set(combinations);
|
|
459
|
+
const indexCandidates = await archivist.get([...hashes]);
|
|
460
|
+
return [bw, ...indexCandidates];
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
export {
|
|
464
|
+
TemporalIndexingDiviner,
|
|
465
|
+
TemporalIndexingDivinerDivinerQueryToIndexQueryDiviner,
|
|
466
|
+
TemporalIndexingDivinerIndexCandidateToIndexDiviner,
|
|
467
|
+
TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDiviner,
|
|
468
|
+
TemporalIndexingDivinerStateToIndexCandidateDiviner
|
|
469
|
+
};
|
|
470
|
+
//# sourceMappingURL=memory.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/memory/Diviner.ts", "../../src/model/Config.ts", "../../src/model/Schema.ts", "../../src/model/DivinerQueryToIndexQueryDiviner/Config.ts", "../../src/model/DivinerQueryToIndexQueryDiviner/Schema.ts", "../../src/model/IndexCandidateToIndexDiviner/Config.ts", "../../src/model/IndexCandidateToIndexDiviner/Schema.ts", "../../src/model/IndexQueryResponseToDivinerQueryResponseDiviner/Config.ts", "../../src/model/IndexQueryResponseToDivinerQueryResponseDiviner/Schema.ts", "../../src/model/Result/Schema.ts", "../../src/model/ResultIndex/Schema.ts", "../../src/model/StateToIndexCandidateDiviner/Config.ts", "../../src/model/StateToIndexCandidateDiviner/Schema.ts", "../../src/memory/DivinerQueryToIndexQueryDiviner/Diviner.ts", "../../src/memory/IndexCandidateToIndexDiviner/Diviner.ts", "../../src/memory/IndexQueryResponseToDivinerQueryResponseDiviner/Diviner.ts", "../../src/memory/StateToIndexCandidateDiviner/Diviner.ts"],
|
|
4
|
+
"sourcesContent": ["import { IndexingDiviner } from '@xyo-network/diviner-indexing/memory'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/sdk/diviner-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol'\n\nimport type { TemporalIndexingDivinerParams } from '../model/index.ts'\nimport { TemporalIndexingDivinerConfigSchema } from '../model/index.ts'\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(): Promise<void> {\n await super.startHandler()\n }\n}\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@ariestools/sdk'\nimport type { IndexingDivinerStage, IndexingDivinerStageConfig } from '@xyo-network/diviner-indexing/model'\nimport type { SchemaToJsonPathTransformExpressionsDictionary } from '@xyo-network/diviner-jsonpath/model'\nimport type { DivinerConfig, SearchableStorage } from '@xyo-network/sdk/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/sdk/diviner-model'\nimport { asSchema } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport type { TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig } from './DivinerQueryToIndexQueryDiviner/index.ts'\nimport type { TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig } from './IndexQueryResponseToDivinerQueryResponseDiviner/index.ts'\nimport { TemporalIndexingDivinerSchema } from './Schema.ts'\nimport type { TemporalIndexingDivinerStateToIndexCandidateDivinerConfig } from './StateToIndexCandidateDiviner/index.ts'\n\nexport const TemporalIndexingDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerSchema}.config`, true)\nexport type TemporalIndexingDivinerConfigSchema = typeof TemporalIndexingDivinerConfigSchema\n\n/**\n * Config section for declaring each indexing diviner stage\n */\nexport type IndexingDivinerStageTransformConfig = Record<IndexingDivinerStage, SchemaToJsonPathTransformExpressionsDictionary>\n\n// TODO: Extend indexing diviner config\n/**\n * Diviner Config for a Diviner which Indexes Payloads\n */\nexport type TemporalIndexingDivinerConfig = DivinerConfig<{\n /**\n * Where the diviner should store it's index\n */\n indexStore?: SearchableStorage\n /**\n * Config section for name/address of individual diviner stages\n */\n indexingDivinerStages?: IndexingDivinerStageConfig\n /**\n * The maximum number of payloads to index at a time\n */\n payloadDivinerLimit?: number\n /**\n * How often to poll for new payloads to index\n */\n pollFrequency?: number\n /**\n * The schema for this config\n */\n schema: TemporalIndexingDivinerConfigSchema\n /**\n * Optional config section for individual diviner stages\n */\n stageConfigs?: {\n divinerQueryToIndexQueryDiviner?: Omit<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig, 'schema'>\n indexCandidateToIndexDiviner?: Omit<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig, 'schema'>\n indexQueryResponseToDivinerQueryResponseDiviner?: Omit<TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig, 'schema'>\n stateToIndexCandidateDiviner?: Omit<TemporalIndexingDivinerStateToIndexCandidateDivinerConfig, 'schema'>\n }\n /**\n * Where the diviner should persist its internal state\n */\n stateStore?: SearchableStorage\n}>\n\nexport const TemporalIndexingDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n indexStore: z.ZodMiniOptional<z.ZodMiniCustom<SearchableStorage, SearchableStorage>>\n indexingDivinerStages: z.ZodMiniOptional<z.ZodMiniCustom<IndexingDivinerStageConfig, IndexingDivinerStageConfig>>\n payloadDivinerLimit: z.ZodMiniOptional<z.ZodMiniNumber<number>>\n pollFrequency: z.ZodMiniOptional<z.ZodMiniNumber<number>>\n schema: z.ZodMiniLiteral<TemporalIndexingDivinerConfigSchema>\n stageConfigs: z.ZodMiniOptional<z.ZodMiniObject<{\n divinerQueryToIndexQueryDiviner: z.ZodMiniOptional<\n z.ZodMiniCustom<\n Omit<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig, 'schema'>,\n Omit<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig, 'schema'>\n >\n >\n indexCandidateToIndexDiviner: z.ZodMiniOptional<\n z.ZodMiniCustom<\n Omit<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig, 'schema'>,\n Omit<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig, 'schema'>\n >\n >\n indexQueryResponseToDivinerQueryResponseDiviner: z.ZodMiniOptional<\n z.ZodMiniCustom<\n Omit<TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig, 'schema'>,\n Omit<TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig, 'schema'>\n >\n >\n stateToIndexCandidateDiviner: z.ZodMiniOptional<\n z.ZodMiniCustom<\n Omit<TemporalIndexingDivinerStateToIndexCandidateDivinerConfig, 'schema'>,\n Omit<TemporalIndexingDivinerStateToIndexCandidateDivinerConfig, 'schema'>\n >\n >\n }, z.core.$strip>>\n stateStore: z.ZodMiniOptional<z.ZodMiniCustom<SearchableStorage, SearchableStorage>>\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, {\n indexStore: z.optional(z.custom<SearchableStorage>()),\n indexingDivinerStages: z.optional(z.custom<IndexingDivinerStageConfig>()),\n payloadDivinerLimit: z.optional(z.number()),\n pollFrequency: z.optional(z.number()),\n schema: z.literal(TemporalIndexingDivinerConfigSchema),\n stageConfigs: z.optional(z.object({\n divinerQueryToIndexQueryDiviner: z.optional(z.custom<Omit<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig, 'schema'>>()),\n indexCandidateToIndexDiviner: z.optional(z.custom<Omit<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig, 'schema'>>()),\n indexQueryResponseToDivinerQueryResponseDiviner: z.optional(\n z.custom<Omit<TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig, 'schema'>>(),\n ),\n stateToIndexCandidateDiviner: z.optional(z.custom<Omit<TemporalIndexingDivinerStateToIndexCandidateDivinerConfig, 'schema'>>()),\n })),\n stateStore: z.optional(z.custom<SearchableStorage>()),\n})\n\nexport type TemporalIndexingDivinerConfigBase = z.infer<typeof TemporalIndexingDivinerConfigZod>\n\nexport const isTemporalIndexingDivinerConfig: ReturnType<typeof zodIsFactory<TemporalIndexingDivinerConfigBase>>\n = zodIsFactory(TemporalIndexingDivinerConfigZod)\nexport const asTemporalIndexingDivinerConfig: ReturnType<typeof zodAsFactory<TemporalIndexingDivinerConfigBase>>\n = zodAsFactory(TemporalIndexingDivinerConfigZod, 'asTemporalIndexingDivinerConfig')\nexport const toTemporalIndexingDivinerConfig: ReturnType<typeof zodToFactory<TemporalIndexingDivinerConfigBase>>\n = zodToFactory(TemporalIndexingDivinerConfigZod, 'toTemporalIndexingDivinerConfig')\n", "import { IndexingDivinerSchema } from '@xyo-network/diviner-indexing/model'\nimport { asSchema } from '@xyo-network/sdk-protocol'\n\nexport const TemporalIndexingDivinerSchema: string & {\n readonly __schema: true\n} = asSchema(`${IndexingDivinerSchema}.temporal`, true)\nexport type TemporalIndexingDivinerSchema = typeof TemporalIndexingDivinerSchema\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@ariestools/sdk'\nimport type { SchemaToJsonPathTransformExpressionsDictionary } from '@xyo-network/diviner-jsonpath/model'\nimport type { DivinerConfig } from '@xyo-network/sdk/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/sdk/diviner-model'\nimport { asSchema, type Schema } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerSchema } from './Schema.ts'\n\nexport const TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerSchema}.config`, true)\n\nexport type TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema\n = typeof TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema\n\nexport const TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n divinerQuerySchema: z.ZodMiniOptional<z.ZodMiniCustom<Schema, Schema>>\n indexQuerySchema: z.ZodMiniOptional<z.ZodMiniCustom<Schema, Schema>>\n indexSchema: z.ZodMiniOptional<z.ZodMiniCustom<Schema, Schema>>\n schema: z.ZodMiniLiteral<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema>\n schemaTransforms: z.ZodMiniOptional<\n z.ZodMiniCustom<SchemaToJsonPathTransformExpressionsDictionary, SchemaToJsonPathTransformExpressionsDictionary>\n >\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, {\n divinerQuerySchema: z.optional(z.custom<Schema>()),\n indexQuerySchema: z.optional(z.custom<Schema>()),\n indexSchema: z.optional(z.custom<Schema>()),\n schema: z.literal(TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema),\n schemaTransforms: z.optional(z.custom<SchemaToJsonPathTransformExpressionsDictionary>()),\n})\n\nexport type TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigBase = z.infer<\n typeof TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigZod\n>\n\n/**\n * Diviner Config for a Diviner which transforms a Diviner Query to an Index Query\n */\nexport type TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig = DivinerConfig<{\n /**\n * The schema of the diviner query payloads\n */\n divinerQuerySchema?: Schema\n /**\n * The schema of the index query payloads\n */\n indexQuerySchema?: Schema\n /**\n * The schema of the index payloads\n */\n indexSchema?: Schema\n /**\n * The config schema\n */\n schema: TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema\n /**\n * The transforms to apply to the source payloads\n */\n schemaTransforms?: SchemaToJsonPathTransformExpressionsDictionary\n}>\n\nexport const isTemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig: ReturnType<\n typeof zodIsFactory<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigBase>\n> = zodIsFactory(TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigZod)\nexport const asTemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig: ReturnType<\n typeof zodAsFactory<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigBase>\n> = zodAsFactory(\n TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigZod,\n 'asTemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig',\n)\nexport const toTemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig: ReturnType<\n typeof zodToFactory<TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigBase>\n> = zodToFactory(\n TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigZod,\n 'toTemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfig',\n)\n", "import { asSchema } from '@xyo-network/sdk-protocol'\n\nimport { TemporalIndexingDivinerSchema } from '../Schema.ts'\n\nexport const TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerSchema}.stage.diviner.query.to.index.query.diviner`, true)\n\nexport type TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerSchema\n = typeof TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerSchema\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@ariestools/sdk'\nimport type { SchemaToJsonPathTransformExpressionsDictionary } from '@xyo-network/diviner-jsonpath/model'\nimport type { DivinerConfig } from '@xyo-network/sdk/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/sdk/diviner-model'\nimport { asSchema } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { TemporalIndexingDivinerIndexCandidateToIndexDivinerSchema } from './Schema.ts'\n\nexport const TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerIndexCandidateToIndexDivinerSchema}.config`, true)\n\nexport type TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema = typeof TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema\n\nexport const TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n schema: z.ZodMiniLiteral<TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema>\n schemaTransforms: z.ZodMiniOptional<\n z.ZodMiniCustom<SchemaToJsonPathTransformExpressionsDictionary, SchemaToJsonPathTransformExpressionsDictionary>\n >\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, {\n schema: z.literal(TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema),\n schemaTransforms: z.optional(z.custom<SchemaToJsonPathTransformExpressionsDictionary>()),\n})\n\nexport type TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigBase = z.infer<\n typeof TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigZod\n>\n\n/**\n * Diviner Config for a Diviner which transforms Index Candidates to Indexes\n */\nexport type TemporalIndexingDivinerIndexCandidateToIndexDivinerConfig = DivinerConfig<{\n /**\n * The config schema\n */\n schema: TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema\n /**\n * The transforms to apply to the source payloads\n */\n schemaTransforms?: SchemaToJsonPathTransformExpressionsDictionary\n}>\n\nexport const isTemporalIndexingDivinerIndexCandidateToIndexDivinerConfig: ReturnType<\n typeof zodIsFactory<TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigBase>\n> = zodIsFactory(TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigZod)\nexport const asTemporalIndexingDivinerIndexCandidateToIndexDivinerConfig: ReturnType<\n typeof zodAsFactory<TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigBase>\n> = zodAsFactory(TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigZod, 'asTemporalIndexingDivinerIndexCandidateToIndexDivinerConfig')\nexport const toTemporalIndexingDivinerIndexCandidateToIndexDivinerConfig: ReturnType<\n typeof zodToFactory<TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigBase>\n> = zodToFactory(TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigZod, 'toTemporalIndexingDivinerIndexCandidateToIndexDivinerConfig')\n", "import { asSchema } from '@xyo-network/sdk-protocol'\n\nimport { TemporalIndexingDivinerSchema } from '../Schema.ts'\n\nexport const TemporalIndexingDivinerIndexCandidateToIndexDivinerSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerSchema}.stage.index.candidate.to.index.diviner`, true)\n\nexport type TemporalIndexingDivinerIndexCandidateToIndexDivinerSchema = typeof TemporalIndexingDivinerIndexCandidateToIndexDivinerSchema\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@ariestools/sdk'\nimport type { SchemaToJsonPathTransformExpressionsDictionary } from '@xyo-network/diviner-jsonpath/model'\nimport type { DivinerConfig } from '@xyo-network/sdk/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/sdk/diviner-model'\nimport { asSchema } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerSchema } from './Schema.ts'\n\nexport const TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerSchema}.config`, true)\n\nexport type TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema\n = typeof TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema\n\nexport const TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n schema: z.ZodMiniLiteral<TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema>\n schemaTransforms: z.ZodMiniOptional<\n z.ZodMiniCustom<SchemaToJsonPathTransformExpressionsDictionary, SchemaToJsonPathTransformExpressionsDictionary>\n >\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, {\n schema: z.literal(TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema),\n schemaTransforms: z.optional(z.custom<SchemaToJsonPathTransformExpressionsDictionary>()),\n})\n\nexport type TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigBase = z.infer<\n typeof TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigZod\n>\n\n/**\n * Diviner Config for a Diviner which transforms an Index Query Response to a Diviner Query Response\n */\nexport type TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig = DivinerConfig<{\n /**\n * The config schema\n */\n schema: TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema\n /**\n * The transforms to apply to the source payloads\n */\n schemaTransforms?: SchemaToJsonPathTransformExpressionsDictionary\n}>\n\nexport const isTemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig: ReturnType<\n typeof zodIsFactory<TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigBase>\n> = zodIsFactory(TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigZod)\nexport const asTemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig: ReturnType<\n typeof zodAsFactory<TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigBase>\n> = zodAsFactory(\n TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigZod,\n 'asTemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig',\n)\nexport const toTemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig: ReturnType<\n typeof zodToFactory<TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigBase>\n> = zodToFactory(\n TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigZod,\n 'toTemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfig',\n)\n", "import { asSchema } from '@xyo-network/sdk-protocol'\n\nimport { TemporalIndexingDivinerSchema } from '../Schema.ts'\n\nexport const TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerSchema}.stage.index.query.response.to.diviner.query.response.diviner`, true)\n\nexport type TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerSchema\n = typeof TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerSchema\n", "import { asSchema } from '@xyo-network/sdk-protocol'\n\nimport { TemporalIndexingDivinerSchema } from '../Schema.ts'\n\nexport const TemporalIndexingDivinerResultSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerSchema}.result`, true)\nexport type TemporalIndexingDivinerResultSchema = typeof TemporalIndexingDivinerResultSchema\n", "import { asSchema } from '@xyo-network/sdk-protocol'\n\nimport { TemporalIndexingDivinerResultSchema } from '../Result/index.ts'\n\nexport const TemporalIndexingDivinerResultIndexSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerResultSchema}.index`, true)\nexport type TemporalIndexingDivinerResultIndexSchema = typeof TemporalIndexingDivinerResultIndexSchema\n", "import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@ariestools/sdk'\nimport type { BoundWitnessDivinerPredicate } from '@xyo-network/sdk/diviner-boundwitness/model'\nimport type { DivinerConfig, SearchableStorage } from '@xyo-network/sdk/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/sdk/diviner-model'\nimport { asSchema } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\n\nimport { TemporalIndexingDivinerStateToIndexCandidateDivinerSchema } from './Schema.ts'\n\nexport const TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerStateToIndexCandidateDivinerSchema}.config`, true)\n\nexport type TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema = typeof TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema\n\nexport const TemporalIndexingDivinerStateToIndexCandidateDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n filter: z.ZodMiniOptional<z.ZodMiniCustom<BoundWitnessDivinerPredicate, BoundWitnessDivinerPredicate>>\n payloadDivinerLimit: z.ZodMiniOptional<z.ZodMiniNumber<number>>\n payloadStore: z.ZodMiniOptional<z.ZodMiniCustom<SearchableStorage, SearchableStorage>>\n schema: z.ZodMiniLiteral<TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema>\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, {\n filter: z.optional(z.custom<BoundWitnessDivinerPredicate>()),\n payloadDivinerLimit: z.optional(z.number()),\n payloadStore: z.optional(z.custom<SearchableStorage>()),\n schema: z.literal(TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema),\n})\n\nexport type TemporalIndexingDivinerStateToIndexCandidateDivinerConfigBase = z.infer<\n typeof TemporalIndexingDivinerStateToIndexCandidateDivinerConfigZod\n>\n\n/**\n * Diviner Config for a Diviner which transforms a Diviner State to Index Candidates\n */\nexport type TemporalIndexingDivinerStateToIndexCandidateDivinerConfig = DivinerConfig<{\n /**\n * The filter to use to identify index candidates\n */\n filter?: BoundWitnessDivinerPredicate\n /**\n * The maximum number of payloads to index at a time\n */\n payloadDivinerLimit?: number\n /**\n * Where the diviner should look for stored thumbnails\n */\n payloadStore?: SearchableStorage\n /**\n * The config schema\n */\n schema: TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema\n}>\n\nexport const isTemporalIndexingDivinerStateToIndexCandidateDivinerConfig: ReturnType<\n typeof zodIsFactory<TemporalIndexingDivinerStateToIndexCandidateDivinerConfigBase>\n> = zodIsFactory(TemporalIndexingDivinerStateToIndexCandidateDivinerConfigZod)\nexport const asTemporalIndexingDivinerStateToIndexCandidateDivinerConfig: ReturnType<\n typeof zodAsFactory<TemporalIndexingDivinerStateToIndexCandidateDivinerConfigBase>\n> = zodAsFactory(\n TemporalIndexingDivinerStateToIndexCandidateDivinerConfigZod,\n 'asTemporalIndexingDivinerStateToIndexCandidateDivinerConfig',\n)\nexport const toTemporalIndexingDivinerStateToIndexCandidateDivinerConfig: ReturnType<\n typeof zodToFactory<TemporalIndexingDivinerStateToIndexCandidateDivinerConfigBase>\n> = zodToFactory(\n TemporalIndexingDivinerStateToIndexCandidateDivinerConfigZod,\n 'toTemporalIndexingDivinerStateToIndexCandidateDivinerConfig',\n)\n", "import { asSchema } from '@xyo-network/sdk-protocol'\n\nimport { TemporalIndexingDivinerSchema } from '../Schema.ts'\n\nexport const TemporalIndexingDivinerStateToIndexCandidateDivinerSchema: string & {\n readonly __schema: true\n} = asSchema(`${TemporalIndexingDivinerSchema}.stage.state.to.index.candidate.diviner`, true)\n\nexport type TemporalIndexingDivinerStateToIndexCandidateDivinerSchema\n = typeof TemporalIndexingDivinerStateToIndexCandidateDivinerSchema\n", "import type { Hash } from '@ariestools/sdk'\nimport type { SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath/model'\nimport { jsonPathToTransformersDictionary, reducePayloads } from '@xyo-network/diviner-jsonpath-aggregate/memory'\nimport { AbstractDiviner } from '@xyo-network/sdk/diviner-abstract'\nimport type { PayloadDivinerQueryPayload } from '@xyo-network/sdk/diviner-payload-model'\nimport { PayloadDivinerQuerySchema } from '@xyo-network/sdk/diviner-payload-model'\nimport type { Labels } from '@xyo-network/sdk/module-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol'\nimport { isPayloadOfSchemaType, PayloadBuilder } from '@xyo-network/sdk-protocol'\n\nimport type { TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerParams } from '../../model/index.ts'\nimport {\n TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema,\n TemporalIndexingDivinerResultIndexSchema,\n} from '../../model/index.ts'\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: Schema[] = [...super.configSchemas, TemporalIndexingDivinerDivinerQueryToIndexQueryDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = 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 '@ariestools/sdk'\nimport {\n assertEx, containsAll, exists,\n} from '@ariestools/sdk'\nimport type { SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath/model'\nimport { jsonPathToTransformersDictionary } from '@xyo-network/diviner-jsonpath-aggregate/memory'\nimport { AbstractDiviner } from '@xyo-network/sdk/diviner-abstract'\nimport type { Labels } from '@xyo-network/sdk/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\nimport type {\n TemporalIndexingDivinerIndexCandidateToIndexDivinerParams,\n TemporalIndexingDivinerResultIndex,\n} from '../../model/index.ts'\nimport {\n TemporalIndexingDivinerIndexCandidateToIndexDivinerConfigSchema,\n TemporalIndexingDivinerResultIndexSchema,\n} from '../../model/index.ts'\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): boolean => {\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): boolean => {\n return typeof schema === 'string' ? this.indexableSchemas.includes(schema) : false\n }\n}\n", "import { AbstractDiviner } from '@xyo-network/sdk/diviner-abstract'\nimport { isPayloadDivinerQueryPayload } from '@xyo-network/sdk/diviner-payload-model'\nimport type { Labels } from '@xyo-network/sdk/module-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol'\n\nimport { TemporalIndexingDivinerIndexQueryResponseToDivinerQueryResponseDivinerConfigSchema } from '../../model/index.ts'\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 responses\n }\n}\n", "import { assertEx, exists } from '@ariestools/sdk'\nimport type { IndexingDivinerState } from '@xyo-network/diviner-indexing/model'\nimport type { ArchivistInstance, ArchivistNextOptions } from '@xyo-network/sdk/archivist-model'\nimport { ArchivistWrapper } from '@xyo-network/sdk/archivist-wrapper'\nimport { AbstractDiviner } from '@xyo-network/sdk/diviner-abstract'\nimport type { BoundWitnessDiviner } from '@xyo-network/sdk/diviner-boundwitness/abstract'\nimport type { BoundWitnessDivinerParams, BoundWitnessDivinerQueryPayload } from '@xyo-network/sdk/diviner-boundwitness/model'\nimport { DivinerWrapper } from '@xyo-network/sdk/diviner-wrapper'\nimport type {\n Labels, ModuleIdentifier, ModuleState,\n} from '@xyo-network/sdk/module-model'\nimport { isModuleState, ModuleStateSchema } from '@xyo-network/sdk/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\nimport type { TemporalIndexingDivinerStateToIndexCandidateDivinerParams } from '../../model/index.ts'\nimport { TemporalIndexingDivinerStateToIndexCandidateDivinerConfigSchema } from '../../model/index.ts'\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(): number {\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(): Promise<\n DivinerWrapper<\n BoundWitnessDiviner<BoundWitnessDivinerParams, BoundWitnessDivinerQueryPayload, BoundWitness>,\n BoundWitnessDivinerQueryPayload,\n WithStorageMeta<BoundWitness>\n > | undefined\n > {\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
|
+
"mappings": ";AAAA,SAAS,uBAAuB;;;ACAhC;AAAA,EACE;AAAA,EAAc;AAAA,EAAc;AAAA,OACvB;AAIP,SAAS,wBAAwB;AACjC,SAAS,YAAAA,iBAAgB;AACzB,YAAY,OAAO;;;ACRnB,SAAS,6BAA6B;AACtC,SAAS,gBAAgB;AAElB,IAAM,gCAET,SAAS,GAAG,qBAAqB,aAAa,IAAI;;;ADU/C,IAAM,sCAETC,UAAS,GAAG,6BAA6B,WAAW,IAAI;AAgDrD,IAAM,mCAoCP,SAAO,kBAAkB;AAAA,EAC7B,YAAc,WAAW,SAA0B,CAAC;AAAA,EACpD,uBAAyB,WAAW,SAAmC,CAAC;AAAA,EACxE,qBAAuB,WAAW,SAAO,CAAC;AAAA,EAC1C,eAAiB,WAAW,SAAO,CAAC;AAAA,EACpC,QAAU,UAAQ,mCAAmC;AAAA,EACrD,cAAgB,WAAW,SAAO;AAAA,IAChC,iCAAmC,WAAW,SAAqF,CAAC;AAAA,IACpI,8BAAgC,WAAW,SAAqF,CAAC;AAAA,IACjI,iDAAmD;AAAA,MAC/C,SAAqG;AAAA,IACzG;AAAA,IACA,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WAAqE;AAC/H,UAAM,eAAeK,qCAAoC,IAAI,KAAK,eAAe,EAAE,KAAK;AACxF,QAAI,aAAa,WAAW,EAAG,QAAO;AACtC,UAAM,SAAS,IAAI,IAAI,YAAY;AACnC,UAAM,kBAAkB,MAAM,UAAU,IAAI,CAAC,GAAG,MAAM,CAAC;AACvD,WAAO,CAAC,IAAI,GAAG,eAAe;AAAA,EAChC;AACF;",
|
|
6
|
+
"names": ["asSchema", "asSchema", "zodAsFactory", "zodIsFactory", "zodToFactory", "DivinerConfigZod", "asSchema", "z", "asSchema", "asSchema", "asSchema", "DivinerConfigZod", "zodIsFactory", "zodAsFactory", "zodToFactory", "zodAsFactory", "zodIsFactory", "zodToFactory", "DivinerConfigZod", "asSchema", "z", "asSchema", "asSchema", "asSchema", "DivinerConfigZod", "zodIsFactory", "zodAsFactory", "zodToFactory", "zodAsFactory", "zodIsFactory", "zodToFactory", "DivinerConfigZod", "asSchema", "z", "asSchema", "asSchema", "asSchema", "DivinerConfigZod", "zodIsFactory", "zodAsFactory", "zodToFactory", "asSchema", "asSchema", "asSchema", "asSchema", "zodAsFactory", "zodIsFactory", "zodToFactory", "DivinerConfigZod", "asSchema", "z", "asSchema", "asSchema", "asSchema", "DivinerConfigZod", "zodIsFactory", "zodAsFactory", "zodToFactory", "jsonPathToTransformersDictionary", "AbstractDiviner", "PayloadBuilder", "AbstractDiviner", "jsonPathToTransformersDictionary", "PayloadBuilder", "indexablePayloads", "AbstractDiviner", "AbstractDiviner", "assertEx", "exists", "AbstractDiviner", "intraBoundwitnessSchemaCombinations", "isBoundWitness", "moduleName", "AbstractDiviner", "isBoundWitness", "exists", "assertEx", "intraBoundwitnessSchemaCombinations"]
|
|
7
|
+
}
|