@modelprofile.com/flexharness 18.4.0 → 18.6.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_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.flexharness.core.js +5 -2
- package/dist_ts/classes.flexharness.prompts.d.ts +2 -0
- package/dist_ts/classes.flexharness.prompts.js +11 -2
- package/dist_ts/errors.d.ts +5 -0
- package/dist_ts/errors.js +10 -1
- package/dist_ts/index.d.ts +1 -0
- package/dist_ts/index.js +2 -1
- package/dist_ts/interfaces.d.ts +6 -0
- package/dist_ts/interfaces.js +1 -1
- package/dist_ts/plugins.d.ts +2 -2
- package/dist_ts/plugins.js +3 -3
- package/dist_ts/utils.json.d.ts +34 -1
- package/dist_ts/utils.json.js +47 -35
- package/dist_ts/utils.projectionindex.d.ts +58 -0
- package/dist_ts/utils.projectionindex.js +534 -0
- package/dist_ts/utils.projectionindextree.d.ts +63 -0
- package/dist_ts/utils.projectionindextree.js +314 -0
- package/dist_ts_stores_nosqldb/classes.nosqldbstores.js +11 -1
- package/dist_ts_stores_nosqldb/classes.recordstore.d.ts +12 -0
- package/dist_ts_stores_nosqldb/classes.recordstore.js +93 -9
- package/package.json +3 -3
- package/readme.md +5 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.flexharness.core.ts +4 -0
- package/ts/classes.flexharness.prompts.ts +17 -0
- package/ts/errors.ts +14 -0
- package/ts/index.ts +13 -0
- package/ts/interfaces.ts +7 -0
- package/ts/plugins.ts +2 -0
- package/ts/readme.md +5 -1
- package/ts/utils.json.ts +65 -43
- package/ts/utils.projectionindex.ts +693 -0
- package/ts/utils.projectionindextree.ts +328 -0
- package/ts_stores_nosqldb/classes.nosqldbstores.ts +12 -0
- package/ts_stores_nosqldb/classes.recordstore.ts +100 -7
- package/ts_stores_nosqldb/readme.md +2 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { IFlexMessage, IFlexProjectionChange, IFlexReversionSegment, TFlexProjectionSnapshot } from './interfaces.js';
|
|
2
|
+
import { type IProjectionIndexTreeNode, type IProjectionIndexTreeReader } from './utils.projectionindextree.js';
|
|
3
|
+
export interface IFlexProjectionMessageFact {
|
|
4
|
+
readonly messageId: string;
|
|
5
|
+
readonly sessionId: string;
|
|
6
|
+
readonly runId: string;
|
|
7
|
+
readonly role: IFlexMessage['role'];
|
|
8
|
+
readonly steerId?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface IFlexProjectionSegmentFact {
|
|
11
|
+
readonly runId: string;
|
|
12
|
+
readonly userMessageId?: string;
|
|
13
|
+
readonly status: IFlexReversionSegment['status'];
|
|
14
|
+
readonly eventIds: readonly string[];
|
|
15
|
+
readonly captureId?: string;
|
|
16
|
+
readonly protocolVersion: IFlexReversionSegment['protocolVersion'];
|
|
17
|
+
readonly disposition?: IFlexReversionSegment['disposition'];
|
|
18
|
+
}
|
|
19
|
+
interface IRootRefs {
|
|
20
|
+
readonly messages?: string;
|
|
21
|
+
readonly messageIds?: string;
|
|
22
|
+
readonly runs?: string;
|
|
23
|
+
readonly staged?: string;
|
|
24
|
+
readonly segments?: string;
|
|
25
|
+
readonly segmentRuns?: string;
|
|
26
|
+
readonly events?: string;
|
|
27
|
+
readonly captures?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface IFlexProjectionIndexRoot {
|
|
30
|
+
readonly kind: 'flex-projection-validation-root-v1';
|
|
31
|
+
readonly sessionId: string;
|
|
32
|
+
readonly revision: number;
|
|
33
|
+
readonly projectionSchemaVersion: 0 | 1 | 2 | 3;
|
|
34
|
+
readonly nextMessageSerial: number;
|
|
35
|
+
readonly nextSegmentSerial: number;
|
|
36
|
+
readonly refs: IRootRefs;
|
|
37
|
+
}
|
|
38
|
+
export type TFlexProjectionIndexNode = IFlexProjectionIndexRoot | IProjectionIndexTreeNode;
|
|
39
|
+
export interface IFlexProjectionIndexNodeWrite {
|
|
40
|
+
readonly hash: string;
|
|
41
|
+
readonly node: TFlexProjectionIndexNode;
|
|
42
|
+
}
|
|
43
|
+
export interface IFlexProjectionIndexReader extends IProjectionIndexTreeReader {
|
|
44
|
+
}
|
|
45
|
+
export interface IFlexProjectionIndexResult {
|
|
46
|
+
readonly rootHash: string;
|
|
47
|
+
readonly writes: readonly IFlexProjectionIndexNodeWrite[];
|
|
48
|
+
}
|
|
49
|
+
export interface IFlexProjectionIndexChangeResult extends IFlexProjectionIndexResult {
|
|
50
|
+
readonly change: IFlexProjectionChange;
|
|
51
|
+
}
|
|
52
|
+
/** Recomputes a returned node's canonical address before a store stages it. */
|
|
53
|
+
export declare function hashFlexProjectionIndexNode(node: TFlexProjectionIndexNode): string;
|
|
54
|
+
/** Full validation and one-time construction, including legacy snapshots with empty current-schema trees. */
|
|
55
|
+
export declare function createProjectionValidationIndex(snapshot: TFlexProjectionSnapshot | undefined, sessionId: string): Promise<IFlexProjectionIndexResult>;
|
|
56
|
+
/** Validates a change from an authenticated prior index and returns immutable nodes for one CAS publication. */
|
|
57
|
+
export declare function validateProjectionChangeWithIndex(rootHash: string | undefined, reader: IFlexProjectionIndexReader, change: IFlexProjectionChange, expectedRevision: number, sessionId: string): Promise<IFlexProjectionIndexChangeResult>;
|
|
58
|
+
export {};
|