@xyo-network/diviner-indexing-memory 2.79.5

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './Diviner';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,187 @@
1
+ // src/Diviner.ts
2
+ import { assertEx } from "@xylabs/assert";
3
+ import { AbstractDiviner } from "@xyo-network/abstract-diviner";
4
+ import { ArchivistWrapper } from "@xyo-network/archivist-wrapper";
5
+ import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
6
+ import { isBoundWitness } from "@xyo-network/boundwitness-model";
7
+ import { BoundWitnessDivinerQuerySchema } from "@xyo-network/diviner-boundwitness-model";
8
+ import {
9
+ IndexingDivinerConfigSchema
10
+ } from "@xyo-network/diviner-indexing-model";
11
+ import { asDivinerInstance, DivinerConfigSchema } from "@xyo-network/diviner-model";
12
+ import { DivinerWrapper } from "@xyo-network/diviner-wrapper";
13
+ import { isModuleState, ModuleStateSchema } from "@xyo-network/module-model";
14
+ import { PayloadBuilder } from "@xyo-network/payload-builder";
15
+ var moduleName = "IndexingDiviner";
16
+ var IndexingDiviner = class extends AbstractDiviner {
17
+ static configSchemas = [IndexingDivinerConfigSchema, DivinerConfigSchema];
18
+ _lastState;
19
+ _pollId;
20
+ get payloadDivinerLimit() {
21
+ return this.config.payloadDivinerLimit ?? 1e3;
22
+ }
23
+ get pollFrequency() {
24
+ return this.config.pollFrequency ?? 1e4;
25
+ }
26
+ /**
27
+ * Works via batched iteration of the source archivist to populate the index.
28
+ * @returns A promise that resolves when the background process is complete
29
+ */
30
+ backgroundDivine = async () => {
31
+ const lastState = await this.retrieveState();
32
+ const indexCandidateDiviner = await this.getIndexingDivinerStage("stateToIndexCandidateDiviner");
33
+ const results = lastState ? await indexCandidateDiviner.divine([lastState]) : await indexCandidateDiviner.divine();
34
+ const nextState = results.find(isModuleState);
35
+ const indexCandidates = results.filter((x) => !isModuleState(x));
36
+ const toIndexTransformDiviner = await this.getIndexingDivinerStage("indexCandidateToIndexDiviner");
37
+ const indexes = await toIndexTransformDiviner.divine(indexCandidates);
38
+ const indexArchivist = await this.getArchivistForStore("indexStore");
39
+ await indexArchivist.insert(indexes);
40
+ if (nextState) {
41
+ await this.commitState(nextState);
42
+ }
43
+ };
44
+ /**
45
+ * Commit the internal state of the Diviner process. This is similar
46
+ * to a transaction completion in a database and should only be called
47
+ * when results have been successfully persisted to the appropriate
48
+ * external stores.
49
+ * @param nextState The state to commit
50
+ */
51
+ async commitState(nextState) {
52
+ if (nextState.state.offset === this._lastState?.state.offset)
53
+ return;
54
+ this._lastState = nextState;
55
+ const archivist = await this.getArchivistForStore("stateStore");
56
+ const [bw] = await new BoundWitnessBuilder().payload(nextState).witness(this.account).build();
57
+ await archivist.insert([bw, nextState]);
58
+ }
59
+ async divineHandler(payloads = []) {
60
+ const indexPayloadDiviner = await this.getPayloadDivinerForStore("indexStore");
61
+ const divinerQueryToIndexQueryDiviner = await this.getIndexingDivinerStage("divinerQueryToIndexQueryDiviner");
62
+ const indexQueryResponseToDivinerQueryResponseDiviner = await this.getIndexingDivinerStage("indexQueryResponseToDivinerQueryResponseDiviner");
63
+ const results = (await Promise.all(
64
+ payloads.map(async (payload) => {
65
+ const indexQuery = await divinerQueryToIndexQueryDiviner.divine([payload]);
66
+ const indexedResults = await indexPayloadDiviner.divine(indexQuery);
67
+ const response = await Promise.all(
68
+ indexedResults.flat().map((indexedResult) => indexQueryResponseToDivinerQueryResponseDiviner.divine([payload, indexedResult]))
69
+ );
70
+ return response.flat();
71
+ })
72
+ )).flat();
73
+ return results;
74
+ }
75
+ /**
76
+ * Retrieves the archivist for the specified store
77
+ * @param store The store to retrieve the archivist for
78
+ * @returns The archivist for the specified store
79
+ */
80
+ async getArchivistForStore(store) {
81
+ const name = assertEx(this.config?.[store]?.archivist, () => `${moduleName}: Config for ${store}.archivist not specified`);
82
+ const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.archivist`);
83
+ return ArchivistWrapper.wrap(mod, this.account);
84
+ }
85
+ /**
86
+ * Retrieves the BoundWitness Diviner for the specified store
87
+ * @param store The store to retrieve the BoundWitness Diviner for
88
+ * @returns The BoundWitness Diviner for the specified store
89
+ */
90
+ async getBoundWitnessDivinerForStore(store) {
91
+ const name = assertEx(this.config?.[store]?.boundWitnessDiviner, () => `${moduleName}: Config for ${store}.boundWitnessDiviner not specified`);
92
+ const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.boundWitnessDiviner`);
93
+ return DivinerWrapper.wrap(mod, this.account);
94
+ }
95
+ /**
96
+ * Gets the Diviner for the supplied Indexing Diviner stage
97
+ * @param transform The Indexing Diviner stage
98
+ * @returns The diviner corresponding to the Indexing Diviner stage
99
+ */
100
+ async getIndexingDivinerStage(transform) {
101
+ const nameOrAddress = assertEx(
102
+ this.config?.indexingDivinerStages?.[transform],
103
+ () => `${moduleName}: Config for indexingDivinerStages.${transform} not specified`
104
+ );
105
+ const mod = await this.resolve(nameOrAddress);
106
+ return assertEx(asDivinerInstance(mod), () => `${moduleName}: Failed to resolve indexing diviner stage for ${transform}`);
107
+ }
108
+ /**
109
+ * Retrieves the Payload Diviner for the specified store
110
+ * @param store The store to retrieve the Payload Diviner for
111
+ * @returns The Payload Diviner for the specified store
112
+ */
113
+ async getPayloadDivinerForStore(store) {
114
+ const name = assertEx(this.config?.[store]?.payloadDiviner, () => `${moduleName}: Config for ${store}.payloadDiviner not specified`);
115
+ const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.payloadDiviner`);
116
+ return DivinerWrapper.wrap(mod, this.account);
117
+ }
118
+ /**
119
+ * Retrieves the last state of the Diviner process. Used to recover state after
120
+ * preemptions, reboots, etc.
121
+ */
122
+ async retrieveState() {
123
+ if (this._lastState)
124
+ return this._lastState;
125
+ let hash = "";
126
+ const diviner = await this.getBoundWitnessDivinerForStore("stateStore");
127
+ const query = new PayloadBuilder({ schema: BoundWitnessDivinerQuerySchema }).fields({
128
+ address: this.account.address,
129
+ limit: 1,
130
+ offset: 0,
131
+ order: "desc",
132
+ payload_schemas: [ModuleStateSchema]
133
+ }).build();
134
+ const boundWitnesses = await diviner.divine([query]);
135
+ if (boundWitnesses.length > 0) {
136
+ const boundWitness = boundWitnesses[0];
137
+ if (isBoundWitness(boundWitness)) {
138
+ hash = boundWitness.addresses.map((address, index) => ({ address, index })).filter(({ address }) => address === this.account.address).reduce(
139
+ (prev, curr) => boundWitness.payload_schemas?.[curr?.index] === ModuleStateSchema ? boundWitness.payload_hashes[curr?.index] : prev,
140
+ ""
141
+ );
142
+ }
143
+ }
144
+ if (hash) {
145
+ const archivist = await this.getArchivistForStore("stateStore");
146
+ const payload = (await archivist.get([hash])).find(isModuleState);
147
+ if (payload) {
148
+ return payload;
149
+ }
150
+ }
151
+ return void 0;
152
+ }
153
+ async startHandler() {
154
+ await super.startHandler();
155
+ this.poll();
156
+ return true;
157
+ }
158
+ async stopHandler(_timeout) {
159
+ if (this._pollId) {
160
+ clearTimeout(this._pollId);
161
+ this._pollId = void 0;
162
+ }
163
+ return await super.stopHandler();
164
+ }
165
+ /**
166
+ * Runs the background divine process on a loop with a delay
167
+ * specified by the `config.pollFrequency`
168
+ */
169
+ poll() {
170
+ this._pollId = setTimeout(async () => {
171
+ try {
172
+ await this.backgroundDivine();
173
+ } catch (e) {
174
+ console.log(e);
175
+ } finally {
176
+ if (this._pollId)
177
+ clearTimeout(this._pollId);
178
+ this._pollId = void 0;
179
+ this.poll();
180
+ }
181
+ }, this.pollFrequency);
182
+ }
183
+ };
184
+ export {
185
+ IndexingDiviner
186
+ };
187
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/Diviner.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { AbstractDiviner } from '@xyo-network/abstract-diviner'\nimport { ArchivistWrapper } from '@xyo-network/archivist-wrapper'\nimport { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'\nimport { isBoundWitness } from '@xyo-network/boundwitness-model'\nimport { BoundWitnessDivinerQueryPayload, BoundWitnessDivinerQuerySchema } from '@xyo-network/diviner-boundwitness-model'\nimport {\n IndexingDivinerConfig,\n IndexingDivinerConfigSchema,\n IndexingDivinerParams,\n IndexingDivinerStage,\n IndexingDivinerState,\n} from '@xyo-network/diviner-indexing-model'\nimport { asDivinerInstance, DivinerConfigSchema, DivinerModule, DivinerModuleEventData } from '@xyo-network/diviner-model'\nimport { DivinerWrapper } from '@xyo-network/diviner-wrapper'\nimport { isModuleState, ModuleState, ModuleStateSchema } from '@xyo-network/module-model'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Payload } from '@xyo-network/payload-model'\n\ntype ConfigStoreKey = 'indexStore' | 'stateStore'\n\ntype ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>\n\nconst moduleName = 'IndexingDiviner'\n\nexport class IndexingDiviner<\n TParams extends IndexingDivinerParams = IndexingDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut> = DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut>,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas = [IndexingDivinerConfigSchema, DivinerConfigSchema]\n\n private _lastState?: ModuleState<IndexingDivinerState>\n private _pollId?: string | number | NodeJS.Timeout\n\n get payloadDivinerLimit() {\n return this.config.payloadDivinerLimit ?? 1_000\n }\n\n get pollFrequency() {\n return this.config.pollFrequency ?? 10_000\n }\n\n /**\n * Works via batched iteration of the source archivist to populate the index.\n * @returns A promise that resolves when the background process is complete\n */\n protected backgroundDivine = async (): Promise<void> => {\n // Load last state\n const lastState = await this.retrieveState()\n // Get next batch of results\n const indexCandidateDiviner = await this.getIndexingDivinerStage('stateToIndexCandidateDiviner')\n const results = lastState ? await indexCandidateDiviner.divine([lastState]) : await indexCandidateDiviner.divine()\n // Filter next state out from results\n const nextState = results.find(isModuleState<IndexingDivinerState>)\n const indexCandidates = results.filter((x) => !isModuleState(x))\n // Transform candidates to indexes\n const toIndexTransformDiviner = await this.getIndexingDivinerStage('indexCandidateToIndexDiviner')\n const indexes = await toIndexTransformDiviner.divine(indexCandidates)\n // Insert index results\n const indexArchivist = await this.getArchivistForStore('indexStore')\n await indexArchivist.insert(indexes)\n // Update state\n if (nextState) {\n await this.commitState(nextState)\n }\n }\n\n /**\n * Commit the internal state of the Diviner process. This is similar\n * to a transaction completion in a database and should only be called\n * when results have been successfully persisted to the appropriate\n * external stores.\n * @param nextState The state to commit\n */\n protected async commitState(nextState: ModuleState<IndexingDivinerState>) {\n // Don't commit state if no state has changed\n if (nextState.state.offset === this._lastState?.state.offset) return\n this._lastState = nextState\n const archivist = await this.getArchivistForStore('stateStore')\n const [bw] = await new BoundWitnessBuilder().payload(nextState).witness(this.account).build()\n await archivist.insert([bw, nextState])\n }\n\n protected override async divineHandler(payloads: TIn[] = []): Promise<TOut[]> {\n const indexPayloadDiviner = await this.getPayloadDivinerForStore('indexStore')\n const divinerQueryToIndexQueryDiviner = await this.getIndexingDivinerStage('divinerQueryToIndexQueryDiviner')\n const indexQueryResponseToDivinerQueryResponseDiviner = await this.getIndexingDivinerStage('indexQueryResponseToDivinerQueryResponseDiviner')\n const results = (\n await Promise.all(\n payloads.map(async (payload) => {\n const indexQuery = await divinerQueryToIndexQueryDiviner.divine([payload])\n // Divine the results\n const indexedResults = await indexPayloadDiviner.divine(indexQuery)\n // Transform the results to the response shape\n const response = await Promise.all(\n indexedResults.flat().map((indexedResult) => indexQueryResponseToDivinerQueryResponseDiviner.divine([payload, indexedResult])),\n )\n return response.flat()\n }),\n )\n ).flat()\n // TODO: Infer this type over casting to this type\n return results as TOut[]\n }\n\n /**\n * Retrieves the archivist for the specified store\n * @param store The store to retrieve the archivist for\n * @returns The archivist for the specified store\n */\n protected async getArchivistForStore(store: ConfigStore) {\n const name = assertEx(this.config?.[store]?.archivist, () => `${moduleName}: Config for ${store}.archivist not specified`)\n const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.archivist`)\n return ArchivistWrapper.wrap(mod, this.account)\n }\n\n /**\n * Retrieves the BoundWitness Diviner for the specified store\n * @param store The store to retrieve the BoundWitness Diviner for\n * @returns The BoundWitness Diviner for the specified store\n */\n protected async getBoundWitnessDivinerForStore(store: ConfigStore) {\n const name = assertEx(this.config?.[store]?.boundWitnessDiviner, () => `${moduleName}: Config for ${store}.boundWitnessDiviner not specified`)\n const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.boundWitnessDiviner`)\n return DivinerWrapper.wrap(mod, this.account)\n }\n\n /**\n * Gets the Diviner for the supplied Indexing Diviner stage\n * @param transform The Indexing Diviner stage\n * @returns The diviner corresponding to the Indexing Diviner stage\n */\n protected async getIndexingDivinerStage(transform: IndexingDivinerStage) {\n const nameOrAddress = assertEx(\n this.config?.indexingDivinerStages?.[transform],\n () => `${moduleName}: Config for indexingDivinerStages.${transform} not specified`,\n )\n const mod = await this.resolve(nameOrAddress)\n return assertEx(asDivinerInstance(mod), () => `${moduleName}: Failed to resolve indexing diviner stage for ${transform}`)\n }\n\n /**\n * Retrieves the Payload Diviner for the specified store\n * @param store The store to retrieve the Payload Diviner for\n * @returns The Payload Diviner for the specified store\n */\n protected async getPayloadDivinerForStore(store: ConfigStore) {\n const name = assertEx(this.config?.[store]?.payloadDiviner, () => `${moduleName}: Config for ${store}.payloadDiviner not specified`)\n const mod = assertEx(await this.resolve(name), () => `${moduleName}: Failed to resolve ${store}.payloadDiviner`)\n return DivinerWrapper.wrap(mod, this.account)\n }\n\n /**\n * Retrieves the last state of the Diviner process. Used to recover state after\n * preemptions, reboots, etc.\n */\n protected async retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined> {\n if (this._lastState) return this._lastState\n let hash: string = ''\n const diviner = await this.getBoundWitnessDivinerForStore('stateStore')\n const query = new PayloadBuilder<BoundWitnessDivinerQueryPayload>({ schema: BoundWitnessDivinerQuerySchema })\n .fields({\n address: this.account.address,\n limit: 1,\n offset: 0,\n order: 'desc',\n payload_schemas: [ModuleStateSchema],\n })\n .build()\n const boundWitnesses = await diviner.divine([query])\n if (boundWitnesses.length > 0) {\n const boundWitness = boundWitnesses[0]\n if (isBoundWitness(boundWitness)) {\n // Find the index for this address in the BoundWitness that is a ModuleState\n hash = boundWitness.addresses\n .map((address, index) => ({ address, index }))\n .filter(({ address }) => address === this.account.address)\n .reduce(\n (prev, curr) => (boundWitness.payload_schemas?.[curr?.index] === ModuleStateSchema ? boundWitness.payload_hashes[curr?.index] : prev),\n '',\n )\n }\n }\n\n // If we able to located the last state\n if (hash) {\n // Get last state\n const archivist = await this.getArchivistForStore('stateStore')\n const payload = (await archivist.get([hash])).find(isModuleState<IndexingDivinerState>)\n if (payload) {\n return payload\n }\n }\n return undefined\n }\n\n protected override async startHandler(): Promise<boolean> {\n await super.startHandler()\n this.poll()\n return true\n }\n\n protected override async stopHandler(_timeout?: number | undefined): Promise<boolean> {\n if (this._pollId) {\n clearTimeout(this._pollId)\n this._pollId = undefined\n }\n return await super.stopHandler()\n }\n\n /**\n * Runs the background divine process on a loop with a delay\n * specified by the `config.pollFrequency`\n */\n private poll() {\n this._pollId = setTimeout(async () => {\n try {\n await this.backgroundDivine()\n } catch (e) {\n console.log(e)\n } finally {\n if (this._pollId) clearTimeout(this._pollId)\n this._pollId = undefined\n this.poll()\n }\n }, this.pollFrequency)\n }\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAS,wBA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xyo-network/archivist-wrapper';
3
+ import { IndexingDivinerConfig, IndexingDivinerParams, IndexingDivinerStage, IndexingDivinerState } from '@xyo-network/diviner-indexing-model';
4
+ import { DivinerModule, DivinerModuleEventData } from '@xyo-network/diviner-model';
5
+ import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
6
+ import { ModuleState } from '@xyo-network/module-model';
7
+ import { Payload } from '@xyo-network/payload-model';
8
+ type ConfigStoreKey = 'indexStore' | 'stateStore';
9
+ type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>;
10
+ export declare class IndexingDiviner<TParams extends IndexingDivinerParams = IndexingDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut> = DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
11
+ static readonly configSchemas: ("network.xyo.diviner.indexing.config" | "network.xyo.diviner.config")[];
12
+ private _lastState?;
13
+ private _pollId?;
14
+ get payloadDivinerLimit(): number;
15
+ get pollFrequency(): number;
16
+ /**
17
+ * Works via batched iteration of the source archivist to populate the index.
18
+ * @returns A promise that resolves when the background process is complete
19
+ */
20
+ protected backgroundDivine: () => Promise<void>;
21
+ /**
22
+ * Commit the internal state of the Diviner process. This is similar
23
+ * to a transaction completion in a database and should only be called
24
+ * when results have been successfully persisted to the appropriate
25
+ * external stores.
26
+ * @param nextState The state to commit
27
+ */
28
+ protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
29
+ protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
30
+ /**
31
+ * Retrieves the archivist for the specified store
32
+ * @param store The store to retrieve the archivist for
33
+ * @returns The archivist for the specified store
34
+ */
35
+ protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule>>;
36
+ /**
37
+ * Retrieves the BoundWitness Diviner for the specified store
38
+ * @param store The store to retrieve the BoundWitness Diviner for
39
+ * @returns The BoundWitness Diviner for the specified store
40
+ */
41
+ protected getBoundWitnessDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
42
+ /**
43
+ * Gets the Diviner for the supplied Indexing Diviner stage
44
+ * @param transform The Indexing Diviner stage
45
+ * @returns The diviner corresponding to the Indexing Diviner stage
46
+ */
47
+ protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<import("@xyo-network/diviner-model").DivinerInstance>;
48
+ /**
49
+ * Retrieves the Payload Diviner for the specified store
50
+ * @param store The store to retrieve the Payload Diviner for
51
+ * @returns The Payload Diviner for the specified store
52
+ */
53
+ protected getPayloadDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
54
+ /**
55
+ * Retrieves the last state of the Diviner process. Used to recover state after
56
+ * preemptions, reboots, etc.
57
+ */
58
+ protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
59
+ protected startHandler(): Promise<boolean>;
60
+ protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
61
+ /**
62
+ * Runs the background divine process on a loop with a delay
63
+ * specified by the `config.pollFrequency`
64
+ */
65
+ private poll;
66
+ }
67
+ export {};
68
+ //# sourceMappingURL=Diviner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAIjE,OAAO,EACL,qBAAqB,EAErB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAA0C,aAAa,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAC1H,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAiB,WAAW,EAAqB,MAAM,2BAA2B,CAAA;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,CAAC;cAwC9D,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;cAMhC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAQrF;;;OAGG;IACH,OAAO,CAAC,IAAI;CAab"}
@@ -0,0 +1,68 @@
1
+ import { AbstractDiviner } from '@xyo-network/abstract-diviner';
2
+ import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
3
+ import { IndexingDivinerConfig, IndexingDivinerParams, IndexingDivinerStage, IndexingDivinerState } from '@xyo-network/diviner-indexing-model';
4
+ import { DivinerModule, DivinerModuleEventData } from '@xyo-network/diviner-model';
5
+ import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
6
+ import { ModuleState } from '@xyo-network/module-model';
7
+ import { Payload } from '@xyo-network/payload-model';
8
+ type ConfigStoreKey = 'indexStore' | 'stateStore';
9
+ type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>;
10
+ export declare class IndexingDiviner<TParams extends IndexingDivinerParams = IndexingDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut> = DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
11
+ static readonly configSchemas: ("network.xyo.diviner.indexing.config" | "network.xyo.diviner.config")[];
12
+ private _lastState?;
13
+ private _pollId?;
14
+ get payloadDivinerLimit(): number;
15
+ get pollFrequency(): number;
16
+ /**
17
+ * Works via batched iteration of the source archivist to populate the index.
18
+ * @returns A promise that resolves when the background process is complete
19
+ */
20
+ protected backgroundDivine: () => Promise<void>;
21
+ /**
22
+ * Commit the internal state of the Diviner process. This is similar
23
+ * to a transaction completion in a database and should only be called
24
+ * when results have been successfully persisted to the appropriate
25
+ * external stores.
26
+ * @param nextState The state to commit
27
+ */
28
+ protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
29
+ protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
30
+ /**
31
+ * Retrieves the archivist for the specified store
32
+ * @param store The store to retrieve the archivist for
33
+ * @returns The archivist for the specified store
34
+ */
35
+ protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule>>;
36
+ /**
37
+ * Retrieves the BoundWitness Diviner for the specified store
38
+ * @param store The store to retrieve the BoundWitness Diviner for
39
+ * @returns The BoundWitness Diviner for the specified store
40
+ */
41
+ protected getBoundWitnessDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
42
+ /**
43
+ * Gets the Diviner for the supplied Indexing Diviner stage
44
+ * @param transform The Indexing Diviner stage
45
+ * @returns The diviner corresponding to the Indexing Diviner stage
46
+ */
47
+ protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<import("@xyo-network/diviner-model").DivinerInstance>;
48
+ /**
49
+ * Retrieves the Payload Diviner for the specified store
50
+ * @param store The store to retrieve the Payload Diviner for
51
+ * @returns The Payload Diviner for the specified store
52
+ */
53
+ protected getPayloadDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
54
+ /**
55
+ * Retrieves the last state of the Diviner process. Used to recover state after
56
+ * preemptions, reboots, etc.
57
+ */
58
+ protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
59
+ protected startHandler(): Promise<boolean>;
60
+ protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
61
+ /**
62
+ * Runs the background divine process on a loop with a delay
63
+ * specified by the `config.pollFrequency`
64
+ */
65
+ private poll;
66
+ }
67
+ export {};
68
+ //# sourceMappingURL=Diviner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAI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C,KAAK,EAAE,WAAW;IAMvD;;;;OAIG;cACa,8BAA8B,CAAC,KAAK,EAAE,WAAW;IAMjE;;;;OAIG;cACa,uBAAuB,CAAC,SAAS,EAAE,oBAAoB;IASvE;;;;OAIG;cACa,yBAAyB,CAAC,KAAK,EAAE,WAAW;IAM5D;;;OAGG;cACa,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;cAwC9D,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;cAMhC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAQrF;;;OAGG;IACH,OAAO,CAAC,IAAI;CAab"}
@@ -0,0 +1,68 @@
1
+ import { AbstractDiviner } from '@xyo-network/abstract-diviner';
2
+ import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
3
+ import { IndexingDivinerConfig, IndexingDivinerParams, IndexingDivinerStage, IndexingDivinerState } from '@xyo-network/diviner-indexing-model';
4
+ import { DivinerModule, DivinerModuleEventData } from '@xyo-network/diviner-model';
5
+ import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
6
+ import { ModuleState } from '@xyo-network/module-model';
7
+ import { Payload } from '@xyo-network/payload-model';
8
+ type ConfigStoreKey = 'indexStore' | 'stateStore';
9
+ type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>;
10
+ export declare class IndexingDiviner<TParams extends IndexingDivinerParams = IndexingDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut> = DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
11
+ static readonly configSchemas: ("network.xyo.diviner.indexing.config" | "network.xyo.diviner.config")[];
12
+ private _lastState?;
13
+ private _pollId?;
14
+ get payloadDivinerLimit(): number;
15
+ get pollFrequency(): number;
16
+ /**
17
+ * Works via batched iteration of the source archivist to populate the index.
18
+ * @returns A promise that resolves when the background process is complete
19
+ */
20
+ protected backgroundDivine: () => Promise<void>;
21
+ /**
22
+ * Commit the internal state of the Diviner process. This is similar
23
+ * to a transaction completion in a database and should only be called
24
+ * when results have been successfully persisted to the appropriate
25
+ * external stores.
26
+ * @param nextState The state to commit
27
+ */
28
+ protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
29
+ protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
30
+ /**
31
+ * Retrieves the archivist for the specified store
32
+ * @param store The store to retrieve the archivist for
33
+ * @returns The archivist for the specified store
34
+ */
35
+ protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule>>;
36
+ /**
37
+ * Retrieves the BoundWitness Diviner for the specified store
38
+ * @param store The store to retrieve the BoundWitness Diviner for
39
+ * @returns The BoundWitness Diviner for the specified store
40
+ */
41
+ protected getBoundWitnessDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
42
+ /**
43
+ * Gets the Diviner for the supplied Indexing Diviner stage
44
+ * @param transform The Indexing Diviner stage
45
+ * @returns The diviner corresponding to the Indexing Diviner stage
46
+ */
47
+ protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<import("@xyo-network/diviner-model").DivinerInstance>;
48
+ /**
49
+ * Retrieves the Payload Diviner for the specified store
50
+ * @param store The store to retrieve the Payload Diviner for
51
+ * @returns The Payload Diviner for the specified store
52
+ */
53
+ protected getPayloadDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
54
+ /**
55
+ * Retrieves the last state of the Diviner process. Used to recover state after
56
+ * preemptions, reboots, etc.
57
+ */
58
+ protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
59
+ protected startHandler(): Promise<boolean>;
60
+ protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
61
+ /**
62
+ * Runs the background divine process on a loop with a delay
63
+ * specified by the `config.pollFrequency`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AEhB;IAED;;;OAGG;IACH,SAAS,CAAC,gBAAgB,QAAa,QAAQ,IAAI,CAAC,CAmBnD;IAED;;;;;;OAMG;cACa,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,oBAAoB,CAAC;cAS/C,aAAa,CAAC,QAAQ,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAsB7E;;;;OAIG;cACa,oBAAoB,CAAC,KAAK,EAAE,WAAW;IAMvD;;;;OAIG;cACa,8BAA8B,CAAC,KAAK,EAAE,WAAW;IAMjE;;;;OAIG;cACa,uBAAuB,CAAC,SAAS,EAAE,oBAAoB;IASvE;;;;OAIG;cACa,yBAAyB,CAAC,KAAK,EAAE,WAAW;IAM5D;;;OAGG;cACa,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;cAwC9D,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;cAMhC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAQrF;;;OAGG;IACH,OAAO,CAAC,IAAI;CAab"}
@@ -0,0 +1,2 @@
1
+ export * from './Diviner';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './Diviner';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './Diviner';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}