@spine-event-engine/storage 2.0.0-snapshot.22 → 2.0.0-snapshot.23
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/README.md +7 -0
- package/REFERENCE.md +106 -1
- package/dist/entity/agent-execution-record-spec.d.ts +87 -0
- package/dist/entity/agent-execution-record-spec.d.ts.map +1 -0
- package/dist/entity/agent-execution-record-spec.js +230 -0
- package/dist/entity/agent-execution-record-spec.js.map +1 -0
- package/dist/entity/agent-execution-sizes.d.ts +30 -0
- package/dist/entity/agent-execution-sizes.d.ts.map +1 -0
- package/dist/entity/agent-execution-sizes.js +51 -0
- package/dist/entity/agent-execution-sizes.js.map +1 -0
- package/dist/entity/agent-execution-transitions.d.ts +71 -0
- package/dist/entity/agent-execution-transitions.d.ts.map +1 -0
- package/dist/entity/agent-execution-transitions.js +182 -0
- package/dist/entity/agent-execution-transitions.js.map +1 -0
- package/dist/entity/agent-execution-values.d.ts +142 -0
- package/dist/entity/agent-execution-values.d.ts.map +1 -0
- package/dist/entity/agent-execution-values.js +250 -0
- package/dist/entity/agent-execution-values.js.map +1 -0
- package/dist/entity/agent-execution.d.ts +234 -0
- package/dist/entity/agent-execution.d.ts.map +1 -0
- package/dist/entity/agent-execution.js +15 -0
- package/dist/entity/agent-execution.js.map +1 -0
- package/dist/entity/agent-history-conformance.d.ts +78 -0
- package/dist/entity/agent-history-conformance.d.ts.map +1 -0
- package/dist/entity/agent-history-conformance.js +493 -0
- package/dist/entity/agent-history-conformance.js.map +1 -0
- package/dist/entity/agent-history-provider-page.d.ts +39 -0
- package/dist/entity/agent-history-provider-page.d.ts.map +1 -0
- package/dist/entity/agent-history-provider-page.js +82 -0
- package/dist/entity/agent-history-provider-page.js.map +1 -0
- package/dist/entity/agent-history-record-spec.d.ts +79 -0
- package/dist/entity/agent-history-record-spec.d.ts.map +1 -0
- package/dist/entity/agent-history-record-spec.js +147 -0
- package/dist/entity/agent-history-record-spec.js.map +1 -0
- package/dist/entity/agent-history.d.ts +196 -0
- package/dist/entity/agent-history.d.ts.map +1 -0
- package/dist/entity/agent-history.js +136 -0
- package/dist/entity/agent-history.js.map +1 -0
- package/dist/event/event-store.d.ts +52 -4
- package/dist/event/event-store.d.ts.map +1 -1
- package/dist/event/event-store.js +153 -4
- package/dist/event/event-store.js.map +1 -1
- package/dist/internal/agent-execution.d.ts +51 -0
- package/dist/internal/agent-execution.d.ts.map +1 -0
- package/dist/internal/agent-execution.js +53 -0
- package/dist/internal/agent-execution.js.map +1 -0
- package/dist/internal/agent-history.d.ts +48 -0
- package/dist/internal/agent-history.d.ts.map +1 -0
- package/dist/internal/agent-history.js +52 -0
- package/dist/internal/agent-history.js.map +1 -0
- package/dist/internal/entity-history.d.ts +11 -0
- package/dist/internal/entity-history.d.ts.map +1 -1
- package/dist/internal/entity-history.js +10 -0
- package/dist/internal/entity-history.js.map +1 -1
- package/dist/internal/tenancy.d.ts +87 -1
- package/dist/internal/tenancy.d.ts.map +1 -1
- package/dist/internal/tenancy.js +39 -0
- package/dist/internal/tenancy.js.map +1 -1
- package/dist/memory/agent-execution-head-index.d.ts +52 -0
- package/dist/memory/agent-execution-head-index.d.ts.map +1 -0
- package/dist/memory/agent-execution-head-index.js +91 -0
- package/dist/memory/agent-execution-head-index.js.map +1 -0
- package/dist/memory/agent-history-index.d.ts +49 -0
- package/dist/memory/agent-history-index.d.ts.map +1 -0
- package/dist/memory/agent-history-index.js +239 -0
- package/dist/memory/agent-history-index.js.map +1 -0
- package/dist/memory/agent-history-mutation-queue.d.ts +17 -0
- package/dist/memory/agent-history-mutation-queue.d.ts.map +1 -0
- package/dist/memory/agent-history-mutation-queue.js +31 -0
- package/dist/memory/agent-history-mutation-queue.js.map +1 -0
- package/dist/memory/in-memory-agent-execution.d.ts +21 -0
- package/dist/memory/in-memory-agent-execution.d.ts.map +1 -0
- package/dist/memory/in-memory-agent-execution.js +587 -0
- package/dist/memory/in-memory-agent-execution.js.map +1 -0
- package/dist/memory/in-memory-agent-history.d.ts +21 -0
- package/dist/memory/in-memory-agent-history.d.ts.map +1 -0
- package/dist/memory/in-memory-agent-history.js +133 -0
- package/dist/memory/in-memory-agent-history.js.map +1 -0
- package/dist/memory/in-memory-entity-commit.d.ts +17 -0
- package/dist/memory/in-memory-entity-commit.d.ts.map +1 -1
- package/dist/memory/in-memory-entity-commit.js +47 -3
- package/dist/memory/in-memory-entity-commit.js.map +1 -1
- package/dist/memory/in-memory-entity-history.d.ts +1 -1
- package/dist/memory/in-memory-entity-history.d.ts.map +1 -1
- package/dist/memory/in-memory-entity-history.js.map +1 -1
- package/dist/memory/in-memory-storage-backend.d.ts +18 -0
- package/dist/memory/in-memory-storage-backend.d.ts.map +1 -1
- package/dist/memory/in-memory-storage-backend.js +71 -0
- package/dist/memory/in-memory-storage-backend.js.map +1 -1
- package/dist/memory/in-memory-storage-factory.d.ts +37 -2
- package/dist/memory/in-memory-storage-factory.d.ts.map +1 -1
- package/dist/memory/in-memory-storage-factory.js +144 -3
- package/dist/memory/in-memory-storage-factory.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
|
@@ -25,12 +25,14 @@ export class InMemoryStorageBackend {
|
|
|
25
25
|
[Symbol.toStringTag] = "InMemoryStorageBackend";
|
|
26
26
|
/**
|
|
27
27
|
* Binds one tenant and record family to one backend-owned value.
|
|
28
|
+
*
|
|
28
29
|
* @param backend Selects the shared ephemeral backend.
|
|
29
30
|
* @param namespace Separates Entity and generic record backend values.
|
|
30
31
|
* @param tenant Selects the provider tenant boundary.
|
|
31
32
|
* @param family Identifies the record family inside the tenant.
|
|
32
33
|
* @param create Creates the value when the scope is first bound.
|
|
33
34
|
* @returns The existing or newly created backend-owned value.
|
|
35
|
+
* @typeParam T Value retained for one backend scope.
|
|
34
36
|
*/
|
|
35
37
|
static bind(backend, namespace, tenant, family, create) {
|
|
36
38
|
return MemoryBackendScopes.bind(backend, namespace, tenant, family, create);
|
|
@@ -53,9 +55,30 @@ export class InMemoryStorageBackend {
|
|
|
53
55
|
static tenants(backend) {
|
|
54
56
|
return MemoryBackendScopes.tenants(backend);
|
|
55
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Returns the current finite tenant-index length without copying rows.
|
|
60
|
+
*
|
|
61
|
+
* @param backend Backend containing the admission index.
|
|
62
|
+
* @returns Number of distinct admitted multitenant boundaries.
|
|
63
|
+
*/
|
|
64
|
+
static tenantCount(backend) {
|
|
65
|
+
return MemoryBackendScopes.tenantCount(backend);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Reads only one bounded range from the admission-time tenant index.
|
|
69
|
+
*
|
|
70
|
+
* @param backend Backend containing the admission index.
|
|
71
|
+
* @param start First admission-order position to examine.
|
|
72
|
+
* @param count Maximum number of boundaries to copy.
|
|
73
|
+
* @returns The bounded admission-order page.
|
|
74
|
+
*/
|
|
75
|
+
static tenantPage(backend, start, count) {
|
|
76
|
+
return MemoryBackendScopes.tenantPage(backend, start, count);
|
|
77
|
+
}
|
|
56
78
|
}
|
|
57
79
|
const scopesByBackend = new WeakMap();
|
|
58
80
|
const tenantsByBackend = new WeakMap();
|
|
81
|
+
const tenantOrderByBackend = new WeakMap();
|
|
59
82
|
/**
|
|
60
83
|
* Binds provider tenant and record-family identities for each backend.
|
|
61
84
|
*/
|
|
@@ -63,6 +86,14 @@ const MemoryBackendScopes = {
|
|
|
63
86
|
// prettier-ignore
|
|
64
87
|
/**
|
|
65
88
|
* Binds one tenant and record family to one backend-owned value.
|
|
89
|
+
*
|
|
90
|
+
* @typeParam T Value retained for the selected scope.
|
|
91
|
+
* @param backend Backend containing record families.
|
|
92
|
+
* @param namespace Entity or generic record family namespace.
|
|
93
|
+
* @param tenant Complete tenant boundary.
|
|
94
|
+
* @param family Record family name inside the tenant.
|
|
95
|
+
* @param create Factory called for a missing scoped value.
|
|
96
|
+
* @returns The existing or newly created scoped value.
|
|
66
97
|
*/
|
|
67
98
|
bind(backend, namespace, tenant, family, create) {
|
|
68
99
|
this.admit(backend, tenant);
|
|
@@ -89,6 +120,12 @@ const MemoryBackendScopes = {
|
|
|
89
120
|
}
|
|
90
121
|
return existing;
|
|
91
122
|
},
|
|
123
|
+
/**
|
|
124
|
+
* Records a multitenant boundary exactly once in admission order.
|
|
125
|
+
*
|
|
126
|
+
* @param backend Backend containing the admission index.
|
|
127
|
+
* @param tenant Complete boundary to admit.
|
|
128
|
+
*/
|
|
92
129
|
admit(backend, tenant) {
|
|
93
130
|
if (tenant.single)
|
|
94
131
|
return;
|
|
@@ -97,12 +134,46 @@ const MemoryBackendScopes = {
|
|
|
97
134
|
tenants = new Map();
|
|
98
135
|
tenantsByBackend.set(backend, tenants);
|
|
99
136
|
}
|
|
137
|
+
if (tenants.has(String(tenant.key)))
|
|
138
|
+
return;
|
|
100
139
|
tenants.set(String(tenant.key), tenant);
|
|
140
|
+
let ordered = tenantOrderByBackend.get(backend);
|
|
141
|
+
if (ordered === undefined) {
|
|
142
|
+
ordered = [];
|
|
143
|
+
tenantOrderByBackend.set(backend, ordered);
|
|
144
|
+
}
|
|
145
|
+
ordered.push(tenant);
|
|
101
146
|
},
|
|
147
|
+
/**
|
|
148
|
+
* Lists all admitted boundaries for legacy catalog callers.
|
|
149
|
+
*
|
|
150
|
+
* @param backend Backend containing the tenant index.
|
|
151
|
+
* @returns Complete sorted boundary snapshots.
|
|
152
|
+
*/
|
|
102
153
|
tenants(backend) {
|
|
103
154
|
return Object.freeze([...(tenantsByBackend.get(backend)?.entries() ?? [])]
|
|
104
155
|
.sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0))
|
|
105
156
|
.map(([, boundary]) => boundary));
|
|
106
157
|
},
|
|
158
|
+
/**
|
|
159
|
+
* Reads the admission-order index length without copying entries.
|
|
160
|
+
*
|
|
161
|
+
* @param backend Backend containing the tenant index.
|
|
162
|
+
* @returns Number of admitted multitenant boundaries.
|
|
163
|
+
*/
|
|
164
|
+
tenantCount(backend) {
|
|
165
|
+
return tenantOrderByBackend.get(backend)?.length ?? 0;
|
|
166
|
+
},
|
|
167
|
+
/**
|
|
168
|
+
* Copies only one admission-order index range.
|
|
169
|
+
*
|
|
170
|
+
* @param backend Backend containing the tenant index.
|
|
171
|
+
* @param start First position to examine.
|
|
172
|
+
* @param count Maximum copied boundaries.
|
|
173
|
+
* @returns One bounded page of boundaries.
|
|
174
|
+
*/
|
|
175
|
+
tenantPage(backend, start, count) {
|
|
176
|
+
return tenantOrderByBackend.get(backend)?.slice(start, start + count) ?? [];
|
|
177
|
+
},
|
|
107
178
|
};
|
|
108
179
|
//# sourceMappingURL=in-memory-storage-backend.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-memory-storage-backend.js","sourceRoot":"","sources":["../../src/memory/in-memory-storage-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,MAAM,OAAO,sBAAsB;IACjC,kBAAkB;IAElB;;OAEG;IACM,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,wBAAwB,CAAC;IAEzD
|
|
1
|
+
{"version":3,"file":"in-memory-storage-backend.js","sourceRoot":"","sources":["../../src/memory/in-memory-storage-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,MAAM,OAAO,sBAAsB;IACjC,kBAAkB;IAElB;;OAEG;IACM,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,wBAAwB,CAAC;IAEzD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,CACT,OAA+B,EAC/B,SAA8B,EAC9B,MAAsB,EACtB,MAAc,EACd,MAAe;QAEf,OAAO,mBAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,OAA+B,EAAE,MAAsB;QAClE,mBAAmB,CAAC,KAAK,CAAC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ACb,oBAAoB,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,OAA+B;QACrC,OAAO,MAAM,CAAC,MAAM,CAClB,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;aAClD,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACrE,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CACnC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,OAA+B;QACzC,OAAO,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC;IACxD,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CACR,OAA+B,EAC/B,KAAa,EACb,KAAa;QAEb,OAAO,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC9E,CAAC;CACF,CAAC"}
|
|
@@ -8,6 +8,8 @@ import { type TenantCatalog, type TenantCatalogProvider } from "../internal/tena
|
|
|
8
8
|
import { InMemoryStorageBackend } from "./in-memory-storage-backend.js";
|
|
9
9
|
import { type EntityStorageInput } from "./in-memory-entity-history.js";
|
|
10
10
|
import { type EntityCommitStorage } from "../internal/entity-commit.js";
|
|
11
|
+
import type { AgentHistoryStorage, AgentHistoryStorageInput } from "../entity/agent-history.js";
|
|
12
|
+
import type { AgentExecutionStorage, AgentExecutionStorageInput } from "../entity/agent-execution.js";
|
|
11
13
|
/**
|
|
12
14
|
* In-memory factory for record storages and framework delegates such as the event store.
|
|
13
15
|
*/
|
|
@@ -15,11 +17,12 @@ export declare class InMemoryStorageFactory extends StorageFactory implements Te
|
|
|
15
17
|
#private;
|
|
16
18
|
/**
|
|
17
19
|
* Creates a factory with a fresh backend, or deliberately shares one.
|
|
18
|
-
*
|
|
20
|
+
*
|
|
21
|
+
* @param backend Selects the backend to create or share.
|
|
19
22
|
*/
|
|
20
23
|
constructor(backend?: InMemoryStorageBackend);
|
|
21
24
|
/**
|
|
22
|
-
* Returns the factory
|
|
25
|
+
* Returns the factory's view of admitted in-memory tenant slices.
|
|
23
26
|
*
|
|
24
27
|
* @returns The in-memory tenant catalog.
|
|
25
28
|
*/
|
|
@@ -33,6 +36,7 @@ export declare class InMemoryStorageFactory extends StorageFactory implements Te
|
|
|
33
36
|
*
|
|
34
37
|
* This is deliberately not exported from the root storage API. Provider
|
|
35
38
|
* adapters expose the same structural method for the server runtime.
|
|
39
|
+
*
|
|
36
40
|
* @param input Supplies the internal entity storage configuration.
|
|
37
41
|
* @returns The created internal entity storage.
|
|
38
42
|
*/
|
|
@@ -40,19 +44,50 @@ export declare class InMemoryStorageFactory extends StorageFactory implements Te
|
|
|
40
44
|
/**
|
|
41
45
|
* Creates the provider-only atomic Entity commit seam used by repositories.
|
|
42
46
|
*
|
|
47
|
+
* @typeParam I Typed Entity identifier.
|
|
48
|
+
* @typeParam S Entity state message.
|
|
43
49
|
* @param input Supplies the internal Entity storage configuration.
|
|
44
50
|
* @returns The independently closeable in-memory commit handle.
|
|
45
51
|
*/
|
|
46
52
|
protected createEntityCommitStorage<I, S extends Message>(input: EntityStorageInput<I, S>): EntityCommitStorage;
|
|
53
|
+
/**
|
|
54
|
+
* Creates an indexed Agent history handle for this memory factory.
|
|
55
|
+
*
|
|
56
|
+
* @typeParam Id Typed Agent identifier.
|
|
57
|
+
* @param input Complete repository and tenant scope.
|
|
58
|
+
* @returns Independently closeable history handle.
|
|
59
|
+
*/
|
|
60
|
+
protected createAgentHistoryStorage<Id>(input: AgentHistoryStorageInput<Id>): AgentHistoryStorage<Id>;
|
|
61
|
+
/**
|
|
62
|
+
* Opens a durable Agent execution handle against this shared memory backend.
|
|
63
|
+
*
|
|
64
|
+
* @typeParam I Typed Agent identifier.
|
|
65
|
+
* @typeParam S Generated Agent state.
|
|
66
|
+
* @param input Agent repository and Entity layout.
|
|
67
|
+
* @returns Independently closeable execution handle.
|
|
68
|
+
*/
|
|
69
|
+
protected createAgentExecutionStorage<I, S extends Message>(input: AgentExecutionStorageInput<I, S>): AgentExecutionStorage<I, S>;
|
|
47
70
|
/**
|
|
48
71
|
* Creates an in-memory record storage.
|
|
49
72
|
*
|
|
73
|
+
* @typeParam I Typed record identifier.
|
|
74
|
+
* @typeParam R Stored Proto message.
|
|
50
75
|
* @param context The storage context.
|
|
51
76
|
* @param recordSpec The record specification.
|
|
52
77
|
* @param group Separates records that share a source type.
|
|
53
78
|
* @returns The created record storage.
|
|
54
79
|
*/
|
|
55
80
|
protected onCreateRecordStorage<I, R extends Message>(context: StorageContext, recordSpec: RecordSpec<I, R>, group?: StorageGroup): RecordStorage<I, R>;
|
|
81
|
+
/**
|
|
82
|
+
* Binds the tenant and record family to the shared memory backend.
|
|
83
|
+
*
|
|
84
|
+
* @typeParam I Typed record identifier.
|
|
85
|
+
* @typeParam R Stored Proto message.
|
|
86
|
+
* @param context Complete storage context.
|
|
87
|
+
* @param recordSpec Record layout and source type.
|
|
88
|
+
* @param group Optional physical record family.
|
|
89
|
+
* @returns Retained records for the selected boundary.
|
|
90
|
+
*/
|
|
56
91
|
private tenantRecords;
|
|
57
92
|
}
|
|
58
93
|
//# sourceMappingURL=in-memory-storage-factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-memory-storage-factory.d.ts","sourceRoot":"","sources":["../../src/memory/in-memory-storage-factory.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAEL,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"in-memory-storage-factory.d.ts","sourceRoot":"","sources":["../../src/memory/in-memory-storage-factory.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAEL,KAAK,aAAa,EAIlB,KAAK,qBAAqB,EAE3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAGxE,OAAO,EAA8B,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEpG,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,8BAA8B,CAAC;AAItC,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAGhG,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,8BAA8B,CAAC;AAGtC;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,cAAe,YAAW,qBAAqB;;IAOzF;;;;OAIG;gBACS,OAAO,GAAE,sBAAqD;IAsB1E;;;;OAIG;IACH,aAAa,IAAI,aAAa;IAI9B;;OAEG;IACM,KAAK,IAAI,IAAI;IAKtB;;;;;;;;OAQG;IACH,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IA4B5C;;;;;;;OAOG;IACH,SAAS,CAAC,yBAAyB,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EACtD,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC9B,mBAAmB;IAUtB;;;;;;OAMG;IACH,SAAS,CAAC,yBAAyB,CAAC,EAAE,EACpC,KAAK,EAAE,wBAAwB,CAAC,EAAE,CAAC,GAClC,mBAAmB,CAAC,EAAE,CAAC;IAK1B;;;;;;;OAOG;IACH,SAAS,CAAC,2BAA2B,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EACxD,KAAK,EAAE,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,GACtC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC;IAK9B;;;;;;;;;OASG;IACH,SAAS,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAClD,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAC5B,KAAK,CAAC,EAAE,YAAY,GACnB,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC;IAMtB;;;;;;;;;OASG;IACH,OAAO,CAAC,aAAa;CAetB"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { eventHistorySpec, stateHistorySpec } from "../entity/entity-history-record-spec.js";
|
|
15
15
|
import { StorageFactory } from "../storage/storage-factory.js";
|
|
16
|
-
import { TenantBoundary, } from "../internal/tenancy.js";
|
|
16
|
+
import { TenantBoundary, TenantCatalogReads, } from "../internal/tenancy.js";
|
|
17
17
|
import { InMemoryStorageBackend } from "./in-memory-storage-backend.js";
|
|
18
18
|
import { InMemoryRecordStorage } from "./in-memory-record-storage.js";
|
|
19
19
|
import { TenantRecords } from "./tenant-records.js";
|
|
@@ -22,6 +22,10 @@ import { MemoryEntityCommitStorage } from "./in-memory-entity-commit.js";
|
|
|
22
22
|
import { EntityCommitStorageFactories, } from "../internal/entity-commit.js";
|
|
23
23
|
import { DeliveryCleanupStorageFactories } from "../internal/delivery-cleanup.js";
|
|
24
24
|
import { MemoryDeliveryCleanupStorage } from "./memory-delivery-cleanup.js";
|
|
25
|
+
import { AgentHistoryStorageFactories } from "../internal/agent-history.js";
|
|
26
|
+
import { MemoryAgentHistory } from "./in-memory-agent-history.js";
|
|
27
|
+
import { AgentExecutionStorageFactories } from "../internal/agent-execution.js";
|
|
28
|
+
import { MemoryAgentExecution } from "./in-memory-agent-execution.js";
|
|
25
29
|
/**
|
|
26
30
|
* In-memory factory for record storages and framework delegates such as the event store.
|
|
27
31
|
*/
|
|
@@ -31,13 +35,20 @@ export class InMemoryStorageFactory extends StorageFactory {
|
|
|
31
35
|
#catalog;
|
|
32
36
|
/**
|
|
33
37
|
* Creates a factory with a fresh backend, or deliberately shares one.
|
|
34
|
-
*
|
|
38
|
+
*
|
|
39
|
+
* @param backend Selects the backend to create or share.
|
|
35
40
|
*/
|
|
36
41
|
constructor(backend = new InMemoryStorageBackend()) {
|
|
37
42
|
super();
|
|
38
43
|
this.#backend = backend;
|
|
39
44
|
this.#entities = new MemoryEntityStorageFactory(backend);
|
|
40
45
|
this.#catalog = new MemoryTenantCatalog(backend);
|
|
46
|
+
AgentHistoryStorageFactories.register(this, {
|
|
47
|
+
createAgentHistoryStorage: (input) => this.createAgentHistoryStorage(input),
|
|
48
|
+
});
|
|
49
|
+
AgentExecutionStorageFactories.register(this, {
|
|
50
|
+
createAgentExecutionStorage: (input) => this.createAgentExecutionStorage(input),
|
|
51
|
+
});
|
|
41
52
|
EntityCommitStorageFactories.register(this, {
|
|
42
53
|
createEntityCommitStorage: (input) => this.createEntityCommitStorage(input),
|
|
43
54
|
});
|
|
@@ -46,7 +57,7 @@ export class InMemoryStorageFactory extends StorageFactory {
|
|
|
46
57
|
});
|
|
47
58
|
}
|
|
48
59
|
/**
|
|
49
|
-
* Returns the factory
|
|
60
|
+
* Returns the factory's view of admitted in-memory tenant slices.
|
|
50
61
|
*
|
|
51
62
|
* @returns The in-memory tenant catalog.
|
|
52
63
|
*/
|
|
@@ -65,6 +76,7 @@ export class InMemoryStorageFactory extends StorageFactory {
|
|
|
65
76
|
*
|
|
66
77
|
* This is deliberately not exported from the root storage API. Provider
|
|
67
78
|
* adapters expose the same structural method for the server runtime.
|
|
79
|
+
*
|
|
68
80
|
* @param input Supplies the internal entity storage configuration.
|
|
69
81
|
* @returns The created internal entity storage.
|
|
70
82
|
*/
|
|
@@ -91,6 +103,8 @@ export class InMemoryStorageFactory extends StorageFactory {
|
|
|
91
103
|
/**
|
|
92
104
|
* Creates the provider-only atomic Entity commit seam used by repositories.
|
|
93
105
|
*
|
|
106
|
+
* @typeParam I Typed Entity identifier.
|
|
107
|
+
* @typeParam S Entity state message.
|
|
94
108
|
* @param input Supplies the internal Entity storage configuration.
|
|
95
109
|
* @returns The independently closeable in-memory commit handle.
|
|
96
110
|
*/
|
|
@@ -99,9 +113,36 @@ export class InMemoryStorageFactory extends StorageFactory {
|
|
|
99
113
|
throw new Error("StorageFactory is closed.");
|
|
100
114
|
return new MemoryEntityCommitStorage(this.#entities, this, (context, spec, group) => this.tenantRecords(context, spec, group), input);
|
|
101
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Creates an indexed Agent history handle for this memory factory.
|
|
118
|
+
*
|
|
119
|
+
* @typeParam Id Typed Agent identifier.
|
|
120
|
+
* @param input Complete repository and tenant scope.
|
|
121
|
+
* @returns Independently closeable history handle.
|
|
122
|
+
*/
|
|
123
|
+
createAgentHistoryStorage(input) {
|
|
124
|
+
if (!this.isOpen())
|
|
125
|
+
throw new Error("StorageFactory is closed.");
|
|
126
|
+
return MemoryAgentHistory.open(this.#backend, input);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Opens a durable Agent execution handle against this shared memory backend.
|
|
130
|
+
*
|
|
131
|
+
* @typeParam I Typed Agent identifier.
|
|
132
|
+
* @typeParam S Generated Agent state.
|
|
133
|
+
* @param input Agent repository and Entity layout.
|
|
134
|
+
* @returns Independently closeable execution handle.
|
|
135
|
+
*/
|
|
136
|
+
createAgentExecutionStorage(input) {
|
|
137
|
+
if (!this.isOpen())
|
|
138
|
+
throw new Error("StorageFactory is closed.");
|
|
139
|
+
return MemoryAgentExecution.open(this.#backend, this, input);
|
|
140
|
+
}
|
|
102
141
|
/**
|
|
103
142
|
* Creates an in-memory record storage.
|
|
104
143
|
*
|
|
144
|
+
* @typeParam I Typed record identifier.
|
|
145
|
+
* @typeParam R Stored Proto message.
|
|
105
146
|
* @param context The storage context.
|
|
106
147
|
* @param recordSpec The record specification.
|
|
107
148
|
* @param group Separates records that share a source type.
|
|
@@ -110,24 +151,83 @@ export class InMemoryStorageFactory extends StorageFactory {
|
|
|
110
151
|
onCreateRecordStorage(context, recordSpec, group) {
|
|
111
152
|
return new InMemoryRecordStorage(context, recordSpec, () => this.tenantRecords(context, recordSpec, group));
|
|
112
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Binds the tenant and record family to the shared memory backend.
|
|
156
|
+
*
|
|
157
|
+
* @typeParam I Typed record identifier.
|
|
158
|
+
* @typeParam R Stored Proto message.
|
|
159
|
+
* @param context Complete storage context.
|
|
160
|
+
* @param recordSpec Record layout and source type.
|
|
161
|
+
* @param group Optional physical record family.
|
|
162
|
+
* @returns Retained records for the selected boundary.
|
|
163
|
+
*/
|
|
113
164
|
tenantRecords(context, recordSpec, group) {
|
|
114
165
|
const tenant = TenantBoundary.of(context);
|
|
115
166
|
const family = JSON.stringify([recordSpec.sourceType.typeName, group?.name ?? null]);
|
|
116
167
|
return InMemoryStorageBackend.bind(this.#backend, "record", tenant, family, () => new TenantRecords());
|
|
117
168
|
}
|
|
118
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* Admits and lists tenant boundaries within one memory backend.
|
|
172
|
+
*/
|
|
119
173
|
class MemoryTenantCatalog {
|
|
120
174
|
backend;
|
|
175
|
+
#cursorIdentity = {};
|
|
121
176
|
#open = true;
|
|
177
|
+
/**
|
|
178
|
+
* Binds the catalog to its memory backend.
|
|
179
|
+
*
|
|
180
|
+
* @param backend Backend retaining tenant boundaries.
|
|
181
|
+
*/
|
|
122
182
|
constructor(backend) {
|
|
123
183
|
this.backend = backend;
|
|
124
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* Reads admitted tenant boundaries.
|
|
187
|
+
*
|
|
188
|
+
* @returns Known tenant boundaries.
|
|
189
|
+
*/
|
|
125
190
|
all() {
|
|
126
191
|
return Promise.resolve().then(() => {
|
|
127
192
|
this.requireOpen();
|
|
128
193
|
return InMemoryStorageBackend.tenants(this.backend);
|
|
129
194
|
});
|
|
130
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* Reads one bounded admission-order page from a finite sweep.
|
|
198
|
+
*
|
|
199
|
+
* @param request Page size, cancellation, and catalog continuation.
|
|
200
|
+
* @returns Complete admitted boundaries and an optional continuation.
|
|
201
|
+
*/
|
|
202
|
+
page(request) {
|
|
203
|
+
return Promise.resolve().then(() => {
|
|
204
|
+
this.requireOpen();
|
|
205
|
+
TenantCatalogReads.require(request);
|
|
206
|
+
const after = request.after;
|
|
207
|
+
if (after !== undefined && !(after instanceof MemoryTenantCursor))
|
|
208
|
+
throw new TypeError("Memory tenant catalog continuation is invalid.");
|
|
209
|
+
const cursor = after?.state(this.#cursorIdentity);
|
|
210
|
+
const start = cursor?.index ?? 0;
|
|
211
|
+
const length = cursor?.length ?? InMemoryStorageBackend.tenantCount(this.backend);
|
|
212
|
+
const end = Math.min(length, start + request.count);
|
|
213
|
+
const boundaries = InMemoryStorageBackend.tenantPage(this.backend, start, end - start);
|
|
214
|
+
request.signal.throwIfAborted();
|
|
215
|
+
this.requireOpen();
|
|
216
|
+
return {
|
|
217
|
+
boundaries,
|
|
218
|
+
...(end < length
|
|
219
|
+
? { after: new MemoryTenantCursor(this.#cursorIdentity, end, length) }
|
|
220
|
+
: {}),
|
|
221
|
+
hasMore: end < length,
|
|
222
|
+
};
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Adds one complete tenant boundary.
|
|
227
|
+
*
|
|
228
|
+
* @param boundary Tenant boundary to retain.
|
|
229
|
+
* @returns Resolves when the tenant is admitted.
|
|
230
|
+
*/
|
|
131
231
|
keep(boundary) {
|
|
132
232
|
return Promise.resolve().then(() => {
|
|
133
233
|
this.requireOpen();
|
|
@@ -136,13 +236,54 @@ class MemoryTenantCatalog {
|
|
|
136
236
|
InMemoryStorageBackend.admit(this.backend, boundary);
|
|
137
237
|
});
|
|
138
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Closes this catalog view.
|
|
241
|
+
*
|
|
242
|
+
* @returns Resolves after closing the view.
|
|
243
|
+
*/
|
|
139
244
|
close() {
|
|
140
245
|
this.#open = false;
|
|
141
246
|
return Promise.resolve();
|
|
142
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Checks that this catalog view remains open.
|
|
250
|
+
*/
|
|
143
251
|
requireOpen() {
|
|
144
252
|
if (!this.#open)
|
|
145
253
|
throw new Error("In-memory tenant catalog is closed.");
|
|
146
254
|
}
|
|
147
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* An immutable continuation bound to one memory catalog and sweep length.
|
|
258
|
+
*/
|
|
259
|
+
class MemoryTenantCursor {
|
|
260
|
+
[Symbol.toStringTag] = "TenantCatalogCursor";
|
|
261
|
+
#identity;
|
|
262
|
+
#index;
|
|
263
|
+
#length;
|
|
264
|
+
/**
|
|
265
|
+
* Captures one finite admission-order sweep position.
|
|
266
|
+
*
|
|
267
|
+
* @param identity Private catalog issuance identity.
|
|
268
|
+
* @param index Next admission-order position.
|
|
269
|
+
* @param length Index length fixed at sweep start.
|
|
270
|
+
*/
|
|
271
|
+
constructor(identity, index, length) {
|
|
272
|
+
this.#identity = identity;
|
|
273
|
+
this.#index = index;
|
|
274
|
+
this.#length = length;
|
|
275
|
+
Object.freeze(this);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Verifies issuance by the requested catalog before revealing the position.
|
|
279
|
+
*
|
|
280
|
+
* @param identity Private identity of the catalog reading this token.
|
|
281
|
+
* @returns Fixed sweep length and next position.
|
|
282
|
+
*/
|
|
283
|
+
state(identity) {
|
|
284
|
+
if (this.#identity !== identity)
|
|
285
|
+
throw new TypeError("Memory tenant catalog continuation is invalid.");
|
|
286
|
+
return { index: this.#index, length: this.#length };
|
|
287
|
+
}
|
|
288
|
+
}
|
|
148
289
|
//# sourceMappingURL=in-memory-storage-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-memory-storage-factory.js","sourceRoot":"","sources":["../../src/memory/in-memory-storage-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAK7F,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EACL,cAAc,
|
|
1
|
+
{"version":3,"file":"in-memory-storage-factory.js","sourceRoot":"","sources":["../../src/memory/in-memory-storage-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAK7F,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EACL,cAAc,EAMd,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,M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