@xyo-network/diviner-indexing-model 3.9.17 → 3.9.19

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,33 @@
1
+ import type { EmptyObject, WithAdditional } from '@xylabs/object';
2
+ import type { DivinerConfig, SearchableStorage } from '@xyo-network/diviner-model';
3
+ import type { Payload } from '@xyo-network/payload-model';
4
+ import type { IndexingDivinerStageConfig } from './Stage.ts';
5
+ export declare const IndexingDivinerConfigSchema: "network.xyo.diviner.indexing.config";
6
+ export type IndexingDivinerConfigSchema = typeof IndexingDivinerConfigSchema;
7
+ export type IndexingDivinerConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends string | void = void> = DivinerConfig<WithAdditional<{
8
+ /**
9
+ * Where the diviner should store it's index
10
+ */
11
+ indexStore?: SearchableStorage;
12
+ /**
13
+ * Config section for name/address of individual diviner stages
14
+ */
15
+ indexingDivinerStages?: IndexingDivinerStageConfig;
16
+ /**
17
+ * The maximum number of payloads to index at a time
18
+ */
19
+ payloadDivinerLimit?: number;
20
+ /**
21
+ * How often to poll for new payloads to index
22
+ */
23
+ pollFrequency?: number;
24
+ /**
25
+ * The schema for the Diviner config
26
+ */
27
+ schema: IndexingDivinerConfigSchema;
28
+ /**
29
+ * Where the diviner should persist its internal state
30
+ */
31
+ stateStore?: SearchableStorage;
32
+ }, TConfig>, TSchema>;
33
+ //# sourceMappingURL=Config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAClF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAE5D,eAAO,MAAM,2BAA2B,uCAA6C,CAAA;AACrF,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA;AAE5E,MAAM,MAAM,qBAAqB,CAAC,OAAO,SAAS,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,aAAa,CAC1I,cAAc,CACZ;IACE;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B;;OAEG;IACH,qBAAqB,CAAC,EAAE,0BAA0B,CAAA;IAClD;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,MAAM,EAAE,2BAA2B,CAAA;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC/B,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { Labels } from '@xyo-network/module-model';
2
+ import type { DivinerStageSchema, IndexingDivinerStage } from './Stage.ts';
3
+ /**
4
+ * Labels for Indexing Diviner Stage Diviners
5
+ */
6
+ export type IndexingDivinerStageLabels = Labels & {
7
+ [key in DivinerStageSchema]: IndexingDivinerStage;
8
+ };
9
+ //# sourceMappingURL=Labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Labels.d.ts","sourceRoot":"","sources":["../../src/Labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAEvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAE1E;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG;KAI/C,GAAG,IAAI,kBAAkB,GAAG,oBAAoB;CAClD,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { DivinerParams } from '@xyo-network/diviner-model';
2
+ import type { AnyConfigSchema } from '@xyo-network/module-model';
3
+ import type { IndexingDivinerConfig } from './Config.ts';
4
+ export type IndexingDivinerParams = DivinerParams<AnyConfigSchema<IndexingDivinerConfig>>;
5
+ //# sourceMappingURL=Params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const IndexingDivinerSchema: "network.xyo.diviner.indexing";
2
+ export type ImageThumbnailDivinerSchema = typeof IndexingDivinerSchema;
3
+ //# sourceMappingURL=Schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,EAAG,8BAAuC,CAAA;AAC5E,MAAM,MAAM,2BAA2B,GAAG,OAAO,qBAAqB,CAAA"}
@@ -0,0 +1,30 @@
1
+ export type DivinerStageSchema = 'network.xyo.diviner.stage';
2
+ export declare const DivinerStageSchema: DivinerStageSchema;
3
+ import type { ModuleIdentifier } from '@xyo-network/module-model';
4
+ /**
5
+ * The diviners for each stage of an indexing diviner
6
+ */
7
+ export type IndexingDivinerStage =
8
+ /**
9
+ * Transforms a diviner query into an index query
10
+ */
11
+ 'divinerQueryToIndexQueryDiviner'
12
+ /**
13
+ * Transforms the index candidates into indexes
14
+ */
15
+ | 'indexCandidateToIndexDiviner'
16
+ /**
17
+ * Transforms an index query response into a diviner divine query response
18
+ */
19
+ | 'indexQueryResponseToDivinerQueryResponseDiviner'
20
+ /**
21
+ * Uses the current state to determine the next batch of index candidates
22
+ */
23
+ | 'stateToIndexCandidateDiviner';
24
+ /**
25
+ * Config section for declaring each indexing diviner stage
26
+ */
27
+ export type IndexingDivinerStageConfig = {
28
+ [key in IndexingDivinerStage]: ModuleIdentifier;
29
+ };
30
+ //# sourceMappingURL=Stage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stage.d.ts","sourceRoot":"","sources":["../../src/Stage.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,CAAA;AAC5D,eAAO,MAAM,kBAAkB,EAAE,kBAAgD,CAAA;AAEjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAEjE;;GAEG;AACH,MAAM,MAAM,oBAAoB;AAC9B;;GAEG;AACD,iCAAiC;AACnC;;GAEG;GACD,8BAA8B;AAChC;;GAEG;GACD,iDAAiD;AACnD;;GAEG;GACD,8BAA8B,CAAA;AAElC;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;KACtC,GAAG,IAAI,oBAAoB,GAAG,gBAAgB;CAChD,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { Hex } from '@xylabs/hex';
2
+ import type { StateDictionary } from '@xyo-network/module-model';
3
+ export type IndexingDivinerState = StateDictionary & {
4
+ cursor: Hex;
5
+ };
6
+ //# sourceMappingURL=State.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../src/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG;IACnD,MAAM,EAAE,GAAG,CAAA;CACZ,CAAA"}
@@ -1,39 +1,7 @@
1
- import { EmptyObject, WithAdditional } from '@xylabs/object';
2
- import { DivinerConfig, SearchableStorage, DivinerParams } from '@xyo-network/diviner-model';
3
- import { Payload } from '@xyo-network/payload-model';
4
- import { ModuleIdentifier, Labels, AnyConfigSchema, StateDictionary } from '@xyo-network/module-model';
5
- import { Hex } from '@xylabs/hex';
6
-
7
- type DivinerStageSchema = 'network.xyo.diviner.stage';
8
- declare const DivinerStageSchema: DivinerStageSchema;
9
-
10
- type IndexingDivinerStage = 'divinerQueryToIndexQueryDiviner' | 'indexCandidateToIndexDiviner' | 'indexQueryResponseToDivinerQueryResponseDiviner' | 'stateToIndexCandidateDiviner';
11
- type IndexingDivinerStageConfig = {
12
- [key in IndexingDivinerStage]: ModuleIdentifier;
13
- };
14
-
15
- declare const IndexingDivinerConfigSchema: "network.xyo.diviner.indexing.config";
16
- type IndexingDivinerConfigSchema = typeof IndexingDivinerConfigSchema;
17
- type IndexingDivinerConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends string | void = void> = DivinerConfig<WithAdditional<{
18
- indexStore?: SearchableStorage;
19
- indexingDivinerStages?: IndexingDivinerStageConfig;
20
- payloadDivinerLimit?: number;
21
- pollFrequency?: number;
22
- schema: IndexingDivinerConfigSchema;
23
- stateStore?: SearchableStorage;
24
- }, TConfig>, TSchema>;
25
-
26
- type IndexingDivinerStageLabels = Labels & {
27
- [key in DivinerStageSchema]: IndexingDivinerStage;
28
- };
29
-
30
- type IndexingDivinerParams = DivinerParams<AnyConfigSchema<IndexingDivinerConfig>>;
31
-
32
- declare const IndexingDivinerSchema: "network.xyo.diviner.indexing";
33
- type ImageThumbnailDivinerSchema = typeof IndexingDivinerSchema;
34
-
35
- type IndexingDivinerState = StateDictionary & {
36
- cursor: Hex;
37
- };
38
-
39
- export { DivinerStageSchema, type ImageThumbnailDivinerSchema, type IndexingDivinerConfig, IndexingDivinerConfigSchema, type IndexingDivinerParams, IndexingDivinerSchema, type IndexingDivinerStage, type IndexingDivinerStageConfig, type IndexingDivinerStageLabels, type IndexingDivinerState };
1
+ export * from './Config.ts';
2
+ export * from './Labels.ts';
3
+ export * from './Params.ts';
4
+ export * from './Schema.ts';
5
+ export * from './Stage.ts';
6
+ export * from './State.ts';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-indexing-model",
3
- "version": "3.9.17",
3
+ "version": "3.9.19",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -31,14 +31,14 @@
31
31
  "dependencies": {
32
32
  "@xylabs/hex": "^4.5.1",
33
33
  "@xylabs/object": "^4.5.1",
34
- "@xyo-network/diviner-model": "^3.9.17",
35
- "@xyo-network/module-model": "^3.9.17",
36
- "@xyo-network/payload-model": "^3.9.17"
34
+ "@xyo-network/diviner-model": "^3.9.19",
35
+ "@xyo-network/module-model": "^3.9.19",
36
+ "@xyo-network/payload-model": "^3.9.19"
37
37
  },
38
38
  "devDependencies": {
39
- "@xylabs/ts-scripts-yarn3": "^5.0.24",
40
- "@xylabs/tsconfig": "^5.0.24",
41
- "typescript": "^5.7.3"
39
+ "@xylabs/ts-scripts-yarn3": "^5.0.39",
40
+ "@xylabs/tsconfig": "^5.0.39",
41
+ "typescript": "^5.8.2"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"