@cotal-ai/core 0.90.1 → 0.91.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/agent-file.d.ts +2 -1
- package/dist/agent-file.d.ts.map +1 -1
- package/dist/agent-file.js +5 -3
- package/dist/agent-file.js.map +1 -1
- package/dist/auth-provider.d.ts +144 -1
- package/dist/auth-provider.d.ts.map +1 -1
- package/dist/auth-provider.js +24 -0
- package/dist/auth-provider.js.map +1 -1
- package/dist/authority-store-config.d.ts +31 -0
- package/dist/authority-store-config.d.ts.map +1 -0
- package/dist/authority-store-config.js +45 -0
- package/dist/authority-store-config.js.map +1 -0
- package/dist/backup-config.d.ts +32 -1
- package/dist/backup-config.d.ts.map +1 -1
- package/dist/backup-config.js +11 -0
- package/dist/backup-config.js.map +1 -1
- package/dist/broker-identity.d.ts +24 -0
- package/dist/broker-identity.d.ts.map +1 -0
- package/dist/broker-identity.js +36 -0
- package/dist/broker-identity.js.map +1 -0
- package/dist/browser-control.d.ts +1 -0
- package/dist/browser-control.d.ts.map +1 -1
- package/dist/browser-control.js +1 -0
- package/dist/browser-control.js.map +1 -1
- package/dist/browser-validators-build.d.ts +1 -0
- package/dist/browser-validators-build.d.ts.map +1 -1
- package/dist/channels.d.ts +14 -0
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +19 -5
- package/dist/channels.js.map +1 -1
- package/dist/command.d.ts +57 -0
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +49 -2
- package/dist/command.js.map +1 -1
- package/dist/connector-setup.d.ts +6 -0
- package/dist/connector-setup.d.ts.map +1 -1
- package/dist/connector.d.ts +3 -0
- package/dist/connector.d.ts.map +1 -1
- package/dist/connector.js.map +1 -1
- package/dist/endpoint-binding.d.ts +66 -1
- package/dist/endpoint-binding.d.ts.map +1 -1
- package/dist/endpoint-binding.js +167 -118
- package/dist/endpoint-binding.js.map +1 -1
- package/dist/endpoint-call.js +1 -1
- package/dist/endpoint-call.js.map +1 -1
- package/dist/endpoint-caller.d.ts +2 -0
- package/dist/endpoint-caller.d.ts.map +1 -1
- package/dist/endpoint-caller.js.map +1 -1
- package/dist/endpoint-grants.d.ts +7 -1
- package/dist/endpoint-grants.d.ts.map +1 -1
- package/dist/endpoint-grants.js +9 -1
- package/dist/endpoint-grants.js.map +1 -1
- package/dist/endpoint-invoke.d.ts +9 -0
- package/dist/endpoint-invoke.d.ts.map +1 -1
- package/dist/endpoint-invoke.js +7 -0
- package/dist/endpoint-invoke.js.map +1 -1
- package/dist/endpoint-schema-diff.d.ts +20 -0
- package/dist/endpoint-schema-diff.d.ts.map +1 -0
- package/dist/endpoint-schema-diff.js +15 -0
- package/dist/endpoint-schema-diff.js.map +1 -0
- package/dist/endpoint.d.ts +90 -5
- package/dist/endpoint.d.ts.map +1 -1
- package/dist/endpoint.js +329 -31
- package/dist/endpoint.js.map +1 -1
- package/dist/identity.d.ts +18 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +28 -1
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/issued-authority.d.ts +25 -1
- package/dist/issued-authority.d.ts.map +1 -1
- package/dist/issued-authority.js +24 -7
- package/dist/issued-authority.js.map +1 -1
- package/dist/membership-feed.d.ts +16 -12
- package/dist/membership-feed.d.ts.map +1 -1
- package/dist/membership-feed.js +143 -12
- package/dist/membership-feed.js.map +1 -1
- package/dist/one-line.d.ts +5 -4
- package/dist/one-line.d.ts.map +1 -1
- package/dist/one-line.js +6 -5
- package/dist/one-line.js.map +1 -1
- package/dist/provision.d.ts +4 -1
- package/dist/provision.d.ts.map +1 -1
- package/dist/provision.js +35 -16
- package/dist/provision.js.map +1 -1
- package/dist/registry.d.ts +8 -4
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +58 -20
- package/dist/registry.js.map +1 -1
- package/dist/run-admission.d.ts +18 -1
- package/dist/run-admission.d.ts.map +1 -1
- package/dist/run-admission.js +18 -3
- package/dist/run-admission.js.map +1 -1
- package/dist/sealed-reply.d.ts +21 -0
- package/dist/sealed-reply.d.ts.map +1 -0
- package/dist/sealed-reply.js +75 -0
- package/dist/sealed-reply.js.map +1 -0
- package/dist/secret-fs.d.ts +29 -6
- package/dist/secret-fs.d.ts.map +1 -1
- package/dist/secret-fs.js +107 -18
- package/dist/secret-fs.js.map +1 -1
- package/dist/space-deletion-targets.d.ts +4 -0
- package/dist/space-deletion-targets.d.ts.map +1 -0
- package/dist/space-deletion-targets.js +15 -0
- package/dist/space-deletion-targets.js.map +1 -0
- package/dist/space-initialization-diff.d.ts +47 -0
- package/dist/space-initialization-diff.d.ts.map +1 -0
- package/dist/space-initialization-diff.js +100 -0
- package/dist/space-initialization-diff.js.map +1 -0
- package/dist/space-initialization-observation.d.ts +52 -0
- package/dist/space-initialization-observation.d.ts.map +1 -0
- package/dist/space-initialization-observation.js +133 -0
- package/dist/space-initialization-observation.js.map +1 -0
- package/dist/space-resource-definitions.d.ts +86 -0
- package/dist/space-resource-definitions.d.ts.map +1 -0
- package/dist/space-resource-definitions.js +133 -0
- package/dist/space-resource-definitions.js.map +1 -0
- package/dist/space-schema-diff.d.ts +45 -0
- package/dist/space-schema-diff.d.ts.map +1 -0
- package/dist/space-schema-diff.js +204 -0
- package/dist/space-schema-diff.js.map +1 -0
- package/dist/space-schema-observation.d.ts +45 -0
- package/dist/space-schema-observation.d.ts.map +1 -0
- package/dist/space-schema-observation.js +78 -0
- package/dist/space-schema-observation.js.map +1 -0
- package/dist/spaces.d.ts.map +1 -1
- package/dist/spaces.js +5 -25
- package/dist/spaces.js.map +1 -1
- package/dist/stream-schema-diff.d.ts +31 -0
- package/dist/stream-schema-diff.d.ts.map +1 -0
- package/dist/stream-schema-diff.js +45 -0
- package/dist/stream-schema-diff.js.map +1 -0
- package/dist/streams.d.ts +30 -1
- package/dist/streams.d.ts.map +1 -1
- package/dist/streams.js +41 -18
- package/dist/streams.js.map +1 -1
- package/package.json +2 -2
package/dist/connector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../src/connector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,oFAAoF;AACpF,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;8EAE0E;IAC1E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;mDAC+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;uGAImG;IACnG,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC5F;;+EAE2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;wGAEoG;IACpG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;sGAEkG;IAClG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;iFAO6E;IAC7E,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;uDAImD;IACnD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;kEAE8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;8F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MAAM,sBAAsB,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,YAAY,CAAC;AAE/E;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,gBAAgB,GAAG,6BAA6B,GAAG,oBAAoB,CAAC,GAClG,sBAAsB,CAIxB;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,0BAA0B,CAAC,GAAG,IAAI,CAK5G"}
|
package/dist/connector.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector.js","sourceRoot":"","sources":["../src/connector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connector.js","sourceRoot":"","sources":["../src/connector.ts"],"names":[],"mappings":"AAoVA;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CACpC,SAAmG;IAEnG,IAAI,SAAS,CAAC,2BAA2B;QAAE,OAAO,OAAO,CAAC;IAC1D,IAAI,SAAS,CAAC,cAAc;QAAE,OAAO,MAAM,CAAC;IAC5C,OAAO,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;AAC/D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,+BAA+B,CAAC,SAAsD;IACpG,IAAI,SAAS,CAAC,wBAAwB,KAAK,IAAI;QAAE,OAAO;IACxD,MAAM,IAAI,KAAK,CACb,qIAAqI,CACtI,CAAC;AACJ,CAAC"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* created by exactly one trusted principal (provisioner or the owning infra principal) and the
|
|
10
10
|
* §13.9 grant rows are generated against these same names and filters.
|
|
11
11
|
*/
|
|
12
|
-
import { type ConsumerConfig, type JetStreamManager } from "@nats-io/jetstream";
|
|
12
|
+
import { type ConsumerConfig, type JetStreamManager, type StreamConfig } from "@nats-io/jetstream";
|
|
13
13
|
import type { Kvm } from "@nats-io/kv";
|
|
14
14
|
import { type EpCaller } from "./endpoint-subjects.js";
|
|
15
15
|
import type { RecordKindDef } from "./endpoint-records.js";
|
|
@@ -152,6 +152,12 @@ export declare function assertFactRetentionFloor(factMaxAgeMs: number | undefine
|
|
|
152
152
|
resultRetentionMs?: number;
|
|
153
153
|
receiptRetentionMs?: number;
|
|
154
154
|
} | number): void;
|
|
155
|
+
/** Pure native configurations for the directly declared endpoint/workflow streams. Bootstrap
|
|
156
|
+
* consumes the same values that a schema observer reads; this performs no broker operation.
|
|
157
|
+
* Authority/contract stores and the independent owned-stream census keep their own guards. */
|
|
158
|
+
export declare function endpointDataStreamConfigs(space: string, opts?: EndpointStreamOptions): Array<Partial<StreamConfig> & {
|
|
159
|
+
name: string;
|
|
160
|
+
}>;
|
|
155
161
|
/**
|
|
156
162
|
* Create (idempotently) the §13.12 per-space control-surface resources: the seven JetStream
|
|
157
163
|
* streams, the work-pool WorkQueue, and the KV buckets (records + auth + the §13.6 session ledger).
|
|
@@ -164,6 +170,50 @@ export declare function assertFactRetentionFloor(factMaxAgeMs: number | undefine
|
|
|
164
170
|
* ({@link createSessionsStore}), never the auth bucket.
|
|
165
171
|
*/
|
|
166
172
|
export declare function createEndpointStreams(jsm: JetStreamManager, kvm: Kvm, space: string, opts?: EndpointStreamOptions): Promise<void>;
|
|
173
|
+
/** Native contract-stream creation fields. Existing-store migration and shadow checks remain
|
|
174
|
+
* in {@link ensureContractStore}; these values alone never authorize a change. */
|
|
175
|
+
export declare function endpointContractStreamConfig(space: string): {
|
|
176
|
+
max_msgs_per_subject: 1;
|
|
177
|
+
discard: "new";
|
|
178
|
+
discard_new_per_subject: true;
|
|
179
|
+
name: string;
|
|
180
|
+
subjects: string[];
|
|
181
|
+
retention: "limits";
|
|
182
|
+
storage: "file";
|
|
183
|
+
allow_direct: boolean;
|
|
184
|
+
deny_delete: boolean;
|
|
185
|
+
deny_purge: boolean;
|
|
186
|
+
};
|
|
187
|
+
/** Native authority-bucket creation inputs and post-create hardening. Reading a definition
|
|
188
|
+
* does not replace the binding, leader-read or drift checks in {@link ensureAuthorityStores}. */
|
|
189
|
+
export declare function endpointAuthorityStoreDefinitions(space: string): {
|
|
190
|
+
records: {
|
|
191
|
+
bucket: string;
|
|
192
|
+
createOptions: {
|
|
193
|
+
allow_direct: boolean;
|
|
194
|
+
};
|
|
195
|
+
hardenAfterCreate: Readonly<{
|
|
196
|
+
allow_rollup_hdrs: false;
|
|
197
|
+
deny_delete: true;
|
|
198
|
+
deny_purge: true;
|
|
199
|
+
}>;
|
|
200
|
+
};
|
|
201
|
+
auth: {
|
|
202
|
+
bucket: string;
|
|
203
|
+
createOptions: {
|
|
204
|
+
allow_direct: boolean;
|
|
205
|
+
markerTTL: number;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
/** Native session-ledger creation inputs; verification remains in {@link createSessionsStore}. */
|
|
210
|
+
export declare function endpointSessionStoreDefinition(space: string): {
|
|
211
|
+
bucket: string;
|
|
212
|
+
createOptions: {
|
|
213
|
+
allow_direct: boolean;
|
|
214
|
+
markerTTL: number;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
167
217
|
/**
|
|
168
218
|
* Ensure the per-space CONTRACT store (EPC) exists with its normative shape (§13.7/§13.12) —
|
|
169
219
|
* content-addressed artifacts, one immutable message per digest subject, create-only mediated
|
|
@@ -210,6 +260,11 @@ export declare function createEndpointStreams(jsm: JetStreamManager, kvm: Kvm, s
|
|
|
210
260
|
* lands; an older broker that ignores the flag is caught here and the daemon fails to start.
|
|
211
261
|
*/
|
|
212
262
|
export declare function ensureContractStore(jsm: JetStreamManager, space: string): Promise<void>;
|
|
263
|
+
/** Pure checks of the native contract-store invariants. This does not prove a legacy store
|
|
264
|
+
* clean for migration and never applies the per-subject cap. */
|
|
265
|
+
export declare function assertContractStoreConfig(cfg: StreamConfig & {
|
|
266
|
+
discard_new_per_subject?: boolean;
|
|
267
|
+
}, space: string): void;
|
|
213
268
|
/**
|
|
214
269
|
* Ensure the two per-space AUTHORITY stores exist with their normative shape (§13.12):
|
|
215
270
|
*
|
|
@@ -238,6 +293,16 @@ export declare function ensureAuthorityStores(jsm: JetStreamManager, kvm: Kvm, s
|
|
|
238
293
|
* structural fix for the §13.9 subject-blindness a shared auth bucket would carry (creds + gates).
|
|
239
294
|
* Create-or-verify, safe at every manager boot; a drifted store FAILS LOUD (§13.12). */
|
|
240
295
|
export declare function createSessionsStore(jsm: JetStreamManager, kvm: Kvm, space: string): Promise<void>;
|
|
296
|
+
/** Pure native records-store invariant checks; no read, repair or authority is supplied. */
|
|
297
|
+
export declare function assertRecordsStoreConfig(recordCfg: StreamConfig, space: string): void;
|
|
298
|
+
/** Pure native auth-store invariant checks; no read, repair or authority is supplied. */
|
|
299
|
+
export declare function assertAuthStoreConfig(authCfg: StreamConfig & {
|
|
300
|
+
allow_msg_ttl?: boolean;
|
|
301
|
+
}, space: string): void;
|
|
302
|
+
/** Pure native sessions-store invariant checks; no read, repair or authority is supplied. */
|
|
303
|
+
export declare function assertSessionsStoreConfig(cfg: StreamConfig & {
|
|
304
|
+
allow_msg_ttl?: boolean;
|
|
305
|
+
}, space: string): void;
|
|
241
306
|
/** `poolD = pool_<e>_<pool>` — parses uniquely from its LAST `_` because a pool token contains
|
|
242
307
|
* no `_` (`[a-z0-9-]`) while `<e>` may. */
|
|
243
308
|
export declare function poolDurable(endpoint: string, pool: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-binding.d.ts","sourceRoot":"","sources":["../src/endpoint-binding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"endpoint-binding.d.ts","sourceRoot":"","sources":["../src/endpoint-binding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY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AM,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAgCjI;AAED;;;;;;;;;;;;;;;;;;;;;;sGAsBsG;AACtG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAM5H;AAED;6FAC6F;AAC7F,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAG5H;AAwBD;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA2BgC;AAChC,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAW7G;AAED;;;;;;;;;;;;;;;;;;;;;2CAqB2C;AAC3C,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAOjH"}
|
package/dist/endpoint-binding.js
CHANGED
|
@@ -16,7 +16,7 @@ import { endpointToken, assertIdToken, assertGrantId, assertPoolToken, assertLif
|
|
|
16
16
|
import { AUTHORITY_KIND_DEFS, callerReadableRecordKind } from "./endpoint-records.js";
|
|
17
17
|
import { epjStreamName, epfStreamName, canonDurable, IDEMPOTENCY_HORIZON_MS_DEFAULT, RESULT_RETENTION_MS_DEFAULT, RECEIPT_RETENTION_MS_DEFAULT } from "./endpoint-journal.js";
|
|
18
18
|
import { recordsBucket } from "./endpoint-records.js";
|
|
19
|
-
import { ensureIssuedStores, issuedStoreStreamNames } from "./issued-authority.js";
|
|
19
|
+
import { AUTHORITY_STORE_IMMUTABLE_FLAGS, WRITE_ONCE_PER_KEY, ensureIssuedStores, issuedStoreStreamNames } from "./issued-authority.js";
|
|
20
20
|
import { admissionBucket, ensureAdmissionStore } from "./run-admission.js";
|
|
21
21
|
// Re-exported so the binding module presents the complete §13.12 name table even though the
|
|
22
22
|
// journal/records helpers own the definitions their own logic is written against.
|
|
@@ -181,6 +181,104 @@ export function assertFactRetentionFloor(factMaxAgeMs, terms) {
|
|
|
181
181
|
+ `as NEW WORK rather than resolved to its recorded decision, and a receipt whose acceptance fact has `
|
|
182
182
|
+ `gone can no longer be reconstructed (SPEC §13.12)`);
|
|
183
183
|
}
|
|
184
|
+
/** Pure native configurations for the directly declared endpoint/workflow streams. Bootstrap
|
|
185
|
+
* consumes the same values that a schema observer reads; this performs no broker operation.
|
|
186
|
+
* Authority/contract stores and the independent owned-stream census keep their own guards. */
|
|
187
|
+
export function endpointDataStreamConfigs(space, opts = {}) {
|
|
188
|
+
const p = spacePrefix(space);
|
|
189
|
+
// Refused BEFORE the first stream exists, so a breaching config never leaves a half-built space.
|
|
190
|
+
assertFactRetentionFloor(opts.factMaxAgeMs, {
|
|
191
|
+
horizonMs: opts.idempotencyHorizonMs ?? IDEMPOTENCY_HORIZON_MS_DEFAULT,
|
|
192
|
+
...(opts.resultRetentionMs !== undefined ? { resultRetentionMs: opts.resultRetentionMs } : {}),
|
|
193
|
+
...(opts.receiptRetentionMs !== undefined ? { receiptRetentionMs: opts.receiptRetentionMs } : {}),
|
|
194
|
+
});
|
|
195
|
+
return [
|
|
196
|
+
// EPJ — raw submissions, untrusted, at-least-once. NO allow_direct (nothing reads it but the
|
|
197
|
+
// canonicalizer's durable and harness MSG.GET); duplicate window pinned to the server minimum.
|
|
198
|
+
{
|
|
199
|
+
name: epjStreamName(space),
|
|
200
|
+
subjects: [`${p}.epj.>`],
|
|
201
|
+
retention: RetentionPolicy.Limits,
|
|
202
|
+
storage: StorageType.File,
|
|
203
|
+
max_age: nanos(opts.submissionMaxAgeMs ?? EP_SUBMISSION_MAX_AGE_MS),
|
|
204
|
+
duplicate_window: nanos(EPJ_DUPLICATE_WINDOW_MS),
|
|
205
|
+
},
|
|
206
|
+
// EPF — canonical facts; acceptance is create-only CAS; allow_direct serves the §13.9
|
|
207
|
+
// last-by-subject fact reads (trusted principals only; callers read via the mediator).
|
|
208
|
+
{
|
|
209
|
+
name: epfStreamName(space),
|
|
210
|
+
subjects: [`${p}.epf.>`],
|
|
211
|
+
retention: RetentionPolicy.Limits,
|
|
212
|
+
storage: StorageType.File,
|
|
213
|
+
allow_direct: true,
|
|
214
|
+
...(opts.factMaxAgeMs ? { max_age: nanos(opts.factMaxAgeMs) } : {}),
|
|
215
|
+
},
|
|
216
|
+
// EPE — events/progress.
|
|
217
|
+
{
|
|
218
|
+
name: epeStreamName(space),
|
|
219
|
+
subjects: [`${p}.epe.>`],
|
|
220
|
+
retention: RetentionPolicy.Limits,
|
|
221
|
+
storage: StorageType.File,
|
|
222
|
+
max_age: nanos(opts.eventMaxAgeMs ?? EP_EVENT_MAX_AGE_MS),
|
|
223
|
+
},
|
|
224
|
+
// EPT_REQ — schedule REQUESTS. Message schedules DISABLED (the default; asserted by the
|
|
225
|
+
// smoke): a client-set scheduling header here cannot arm anything, which is what closes the
|
|
226
|
+
// ADR-51 confused deputy — only the timer writer's `.armed` publish (on EPT) schedules.
|
|
227
|
+
{
|
|
228
|
+
name: eptReqStreamName(space),
|
|
229
|
+
subjects: [`${p}.ept.*.*.*.*.schedule`],
|
|
230
|
+
retention: RetentionPolicy.Limits,
|
|
231
|
+
storage: StorageType.File,
|
|
232
|
+
max_age: nanos(opts.ingressMaxAgeMs ?? EP_INGRESS_MAX_AGE_MS),
|
|
233
|
+
},
|
|
234
|
+
// EPR — record-write ingress, consumed only by the per-kind record writers.
|
|
235
|
+
{
|
|
236
|
+
name: eprStreamName(space),
|
|
237
|
+
subjects: [`${p}.epr.>`],
|
|
238
|
+
retention: RetentionPolicy.Limits,
|
|
239
|
+
storage: StorageType.File,
|
|
240
|
+
max_age: nanos(opts.ingressMaxAgeMs ?? EP_INGRESS_MAX_AGE_MS),
|
|
241
|
+
},
|
|
242
|
+
// EPT — authoritative schedules (.armed) + fires (.fire). AllowMsgSchedules; each schedule
|
|
243
|
+
// targets its sibling `.fire` (ADR-51 forbids target = publish subject), and both patterns
|
|
244
|
+
// live on THIS stream because ADR-51 requires the target be captured by the same stream.
|
|
245
|
+
{
|
|
246
|
+
name: eptStreamName(space),
|
|
247
|
+
subjects: [`${p}.ept.*.*.*.*.armed`, `${p}.ept.*.*.*.*.fire`],
|
|
248
|
+
retention: RetentionPolicy.Limits,
|
|
249
|
+
storage: StorageType.File,
|
|
250
|
+
allow_msg_schedules: true,
|
|
251
|
+
max_age: nanos(opts.timerMaxAgeMs ?? EP_TIMER_MAX_AGE_MS),
|
|
252
|
+
},
|
|
253
|
+
// EPW — work pools, one item per subject. NO allow_direct: the §13.6 reconciliation probe
|
|
254
|
+
// (an acked item leaves the WorkQueue, an in-flight one remains readable — exactly the
|
|
255
|
+
// predicate) is a FENCING read that gates the re-enqueue decision, so it goes leader-served
|
|
256
|
+
// STREAM.MSG.GET (§13.9 "Work-pool reconciliation probe"), never a follower-servable Direct Get whose stale miss
|
|
257
|
+
// would re-arm settled work. Nothing else reads EPW: the pool workers drain it via the
|
|
258
|
+
// WorkQueue consumer (CONSUMER.MSG.NEXT), not by subject read.
|
|
259
|
+
{
|
|
260
|
+
name: epwStreamName(space),
|
|
261
|
+
subjects: [`${p}.epw.>`],
|
|
262
|
+
retention: RetentionPolicy.Workqueue,
|
|
263
|
+
storage: StorageType.File,
|
|
264
|
+
allow_direct: false,
|
|
265
|
+
},
|
|
266
|
+
// WFJ — the workflow step journal, one subject per run (see wfjSubject: the activation barrier
|
|
267
|
+
// is per-subject, so the subject is the run). NO max_age: a run's journal must outlive any
|
|
268
|
+
// retention window a control-surface plane wants, because a run that sleeps for a month resumes
|
|
269
|
+
// by re-reading it, and an evicted prefix is not a shorter journal, it is a run that will
|
|
270
|
+
// re-perform effects it already performed. Retirement is by subject purge, deliberately.
|
|
271
|
+
// NO allow_direct: a resume must read its own predecessor's last appends, and Direct Get is
|
|
272
|
+
// follower-servable — a stale miss there reads as "this step never ran".
|
|
273
|
+
{
|
|
274
|
+
name: wfjStreamName(space),
|
|
275
|
+
subjects: [`${p}.wfj.*`],
|
|
276
|
+
retention: RetentionPolicy.Limits,
|
|
277
|
+
storage: StorageType.File,
|
|
278
|
+
allow_direct: false,
|
|
279
|
+
},
|
|
280
|
+
];
|
|
281
|
+
}
|
|
184
282
|
/**
|
|
185
283
|
* Create (idempotently) the §13.12 per-space control-surface resources: the seven JetStream
|
|
186
284
|
* streams, the work-pool WorkQueue, and the KV buckets (records + auth + the §13.6 session ledger).
|
|
@@ -193,97 +291,8 @@ export function assertFactRetentionFloor(factMaxAgeMs, terms) {
|
|
|
193
291
|
* ({@link createSessionsStore}), never the auth bucket.
|
|
194
292
|
*/
|
|
195
293
|
export async function createEndpointStreams(jsm, kvm, space, opts = {}) {
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
assertFactRetentionFloor(opts.factMaxAgeMs, {
|
|
199
|
-
horizonMs: opts.idempotencyHorizonMs ?? IDEMPOTENCY_HORIZON_MS_DEFAULT,
|
|
200
|
-
...(opts.resultRetentionMs !== undefined ? { resultRetentionMs: opts.resultRetentionMs } : {}),
|
|
201
|
-
...(opts.receiptRetentionMs !== undefined ? { receiptRetentionMs: opts.receiptRetentionMs } : {}),
|
|
202
|
-
});
|
|
203
|
-
// EPJ — raw submissions, untrusted, at-least-once. NO allow_direct (nothing reads it but the
|
|
204
|
-
// canonicalizer's durable and harness MSG.GET); duplicate window pinned to the server minimum.
|
|
205
|
-
await jsm.streams.add({
|
|
206
|
-
name: epjStreamName(space),
|
|
207
|
-
subjects: [`${p}.epj.>`],
|
|
208
|
-
retention: RetentionPolicy.Limits,
|
|
209
|
-
storage: StorageType.File,
|
|
210
|
-
max_age: nanos(opts.submissionMaxAgeMs ?? EP_SUBMISSION_MAX_AGE_MS),
|
|
211
|
-
duplicate_window: nanos(EPJ_DUPLICATE_WINDOW_MS),
|
|
212
|
-
});
|
|
213
|
-
// EPF — canonical facts; acceptance is create-only CAS; allow_direct serves the §13.9
|
|
214
|
-
// last-by-subject fact reads (trusted principals only; callers read via the mediator).
|
|
215
|
-
await jsm.streams.add({
|
|
216
|
-
name: epfStreamName(space),
|
|
217
|
-
subjects: [`${p}.epf.>`],
|
|
218
|
-
retention: RetentionPolicy.Limits,
|
|
219
|
-
storage: StorageType.File,
|
|
220
|
-
allow_direct: true,
|
|
221
|
-
...(opts.factMaxAgeMs ? { max_age: nanos(opts.factMaxAgeMs) } : {}),
|
|
222
|
-
});
|
|
223
|
-
// EPE — events/progress.
|
|
224
|
-
await jsm.streams.add({
|
|
225
|
-
name: epeStreamName(space),
|
|
226
|
-
subjects: [`${p}.epe.>`],
|
|
227
|
-
retention: RetentionPolicy.Limits,
|
|
228
|
-
storage: StorageType.File,
|
|
229
|
-
max_age: nanos(opts.eventMaxAgeMs ?? EP_EVENT_MAX_AGE_MS),
|
|
230
|
-
});
|
|
231
|
-
// EPT_REQ — schedule REQUESTS. Message schedules DISABLED (the default; asserted by the
|
|
232
|
-
// smoke): a client-set scheduling header here cannot arm anything, which is what closes the
|
|
233
|
-
// ADR-51 confused deputy — only the timer writer's `.armed` publish (on EPT) schedules.
|
|
234
|
-
await jsm.streams.add({
|
|
235
|
-
name: eptReqStreamName(space),
|
|
236
|
-
subjects: [`${p}.ept.*.*.*.*.schedule`],
|
|
237
|
-
retention: RetentionPolicy.Limits,
|
|
238
|
-
storage: StorageType.File,
|
|
239
|
-
max_age: nanos(opts.ingressMaxAgeMs ?? EP_INGRESS_MAX_AGE_MS),
|
|
240
|
-
});
|
|
241
|
-
// EPR — record-write ingress, consumed only by the per-kind record writers.
|
|
242
|
-
await jsm.streams.add({
|
|
243
|
-
name: eprStreamName(space),
|
|
244
|
-
subjects: [`${p}.epr.>`],
|
|
245
|
-
retention: RetentionPolicy.Limits,
|
|
246
|
-
storage: StorageType.File,
|
|
247
|
-
max_age: nanos(opts.ingressMaxAgeMs ?? EP_INGRESS_MAX_AGE_MS),
|
|
248
|
-
});
|
|
249
|
-
// EPT — authoritative schedules (.armed) + fires (.fire). AllowMsgSchedules; each schedule
|
|
250
|
-
// targets its sibling `.fire` (ADR-51 forbids target = publish subject), and both patterns
|
|
251
|
-
// live on THIS stream because ADR-51 requires the target be captured by the same stream.
|
|
252
|
-
await jsm.streams.add({
|
|
253
|
-
name: eptStreamName(space),
|
|
254
|
-
subjects: [`${p}.ept.*.*.*.*.armed`, `${p}.ept.*.*.*.*.fire`],
|
|
255
|
-
retention: RetentionPolicy.Limits,
|
|
256
|
-
storage: StorageType.File,
|
|
257
|
-
allow_msg_schedules: true,
|
|
258
|
-
max_age: nanos(opts.timerMaxAgeMs ?? EP_TIMER_MAX_AGE_MS),
|
|
259
|
-
});
|
|
260
|
-
// EPW — work pools, one item per subject. NO allow_direct: the §13.6 reconciliation probe
|
|
261
|
-
// (an acked item leaves the WorkQueue, an in-flight one remains readable — exactly the
|
|
262
|
-
// predicate) is a FENCING read that gates the re-enqueue decision, so it goes leader-served
|
|
263
|
-
// STREAM.MSG.GET (§13.9 "Work-pool reconciliation probe"), never a follower-servable Direct Get whose stale miss
|
|
264
|
-
// would re-arm settled work. Nothing else reads EPW: the pool workers drain it via the
|
|
265
|
-
// WorkQueue consumer (CONSUMER.MSG.NEXT), not by subject read.
|
|
266
|
-
await jsm.streams.add({
|
|
267
|
-
name: epwStreamName(space),
|
|
268
|
-
subjects: [`${p}.epw.>`],
|
|
269
|
-
retention: RetentionPolicy.Workqueue,
|
|
270
|
-
storage: StorageType.File,
|
|
271
|
-
allow_direct: false,
|
|
272
|
-
});
|
|
273
|
-
// WFJ — the workflow step journal, one subject per run (see wfjSubject: the activation barrier
|
|
274
|
-
// is per-subject, so the subject is the run). NO max_age: a run's journal must outlive any
|
|
275
|
-
// retention window a control-surface plane wants, because a run that sleeps for a month resumes
|
|
276
|
-
// by re-reading it, and an evicted prefix is not a shorter journal, it is a run that will
|
|
277
|
-
// re-perform effects it already performed. Retirement is by subject purge, deliberately.
|
|
278
|
-
// NO allow_direct: a resume must read its own predecessor's last appends, and Direct Get is
|
|
279
|
-
// follower-servable — a stale miss there reads as "this step never ran".
|
|
280
|
-
await jsm.streams.add({
|
|
281
|
-
name: wfjStreamName(space),
|
|
282
|
-
subjects: [`${p}.wfj.*`],
|
|
283
|
-
retention: RetentionPolicy.Limits,
|
|
284
|
-
storage: StorageType.File,
|
|
285
|
-
allow_direct: false,
|
|
286
|
-
});
|
|
294
|
+
for (const definition of endpointDataStreamConfigs(space, opts))
|
|
295
|
+
await jsm.streams.add(definition);
|
|
287
296
|
await ensureContractStore(jsm, space);
|
|
288
297
|
await ensureAuthorityStores(jsm, kvm, space);
|
|
289
298
|
// The issued-authority stores (SPEC 13.15) and the run admission store (SPEC 14.8) join the
|
|
@@ -298,6 +307,32 @@ export async function createEndpointStreams(jsm, kvm, space, opts = {}) {
|
|
|
298
307
|
// that ensures the endpoint streams (auth + open both run this at the manager's boot) has it.
|
|
299
308
|
await createSessionsStore(jsm, kvm, space);
|
|
300
309
|
}
|
|
310
|
+
/** Native contract-stream creation fields. Existing-store migration and shadow checks remain
|
|
311
|
+
* in {@link ensureContractStore}; these values alone never authorize a change. */
|
|
312
|
+
export function endpointContractStreamConfig(space) {
|
|
313
|
+
return {
|
|
314
|
+
name: epcStreamName(space),
|
|
315
|
+
subjects: [`${spacePrefix(space)}.epc.>`],
|
|
316
|
+
retention: RetentionPolicy.Limits,
|
|
317
|
+
storage: StorageType.File,
|
|
318
|
+
allow_direct: true,
|
|
319
|
+
deny_delete: true,
|
|
320
|
+
deny_purge: true,
|
|
321
|
+
...WRITE_ONCE_PER_KEY,
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
/** Native authority-bucket creation inputs and post-create hardening. Reading a definition
|
|
325
|
+
* does not replace the binding, leader-read or drift checks in {@link ensureAuthorityStores}. */
|
|
326
|
+
export function endpointAuthorityStoreDefinitions(space) {
|
|
327
|
+
return {
|
|
328
|
+
records: { bucket: recordsBucket(space), createOptions: { allow_direct: true }, hardenAfterCreate: AUTHORITY_STORE_IMMUTABLE_FLAGS },
|
|
329
|
+
auth: { bucket: epAuthBucket(space), createOptions: { allow_direct: false, markerTTL: EP_AUTH_MARKER_TTL_MS } },
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
/** Native session-ledger creation inputs; verification remains in {@link createSessionsStore}. */
|
|
333
|
+
export function endpointSessionStoreDefinition(space) {
|
|
334
|
+
return { bucket: sessionsBucket(space), createOptions: { allow_direct: false, markerTTL: EP_AUTH_MARKER_TTL_MS } };
|
|
335
|
+
}
|
|
301
336
|
/**
|
|
302
337
|
* Ensure the per-space CONTRACT store (EPC) exists with its normative shape (§13.7/§13.12) —
|
|
303
338
|
* content-addressed artifacts, one immutable message per digest subject, create-only mediated
|
|
@@ -344,20 +379,11 @@ export async function createEndpointStreams(jsm, kvm, space, opts = {}) {
|
|
|
344
379
|
* lands; an older broker that ignores the flag is caught here and the daemon fails to start.
|
|
345
380
|
*/
|
|
346
381
|
export async function ensureContractStore(jsm, space) {
|
|
347
|
-
const
|
|
348
|
-
const
|
|
349
|
-
const hardening =
|
|
382
|
+
const definition = endpointContractStreamConfig(space);
|
|
383
|
+
const name = definition.name;
|
|
384
|
+
const hardening = WRITE_ONCE_PER_KEY;
|
|
350
385
|
if (await jsm.streams.info(name).catch(() => undefined) === undefined) {
|
|
351
|
-
await jsm.streams.add(
|
|
352
|
-
name,
|
|
353
|
-
subjects: [subject],
|
|
354
|
-
retention: RetentionPolicy.Limits,
|
|
355
|
-
storage: StorageType.File,
|
|
356
|
-
allow_direct: true,
|
|
357
|
-
deny_delete: true,
|
|
358
|
-
deny_purge: true,
|
|
359
|
-
...hardening,
|
|
360
|
-
});
|
|
386
|
+
await jsm.streams.add(definition);
|
|
361
387
|
}
|
|
362
388
|
else {
|
|
363
389
|
// Upgrade path: an EPC stream from a pre-hardening release lacks the per-subject cap. Add it
|
|
@@ -384,6 +410,12 @@ export async function ensureContractStore(jsm, space) {
|
|
|
384
410
|
}
|
|
385
411
|
}
|
|
386
412
|
const cfg = (await jsm.streams.info(name)).config;
|
|
413
|
+
assertContractStoreConfig(cfg, space);
|
|
414
|
+
}
|
|
415
|
+
/** Pure checks of the native contract-store invariants. This does not prove a legacy store
|
|
416
|
+
* clean for migration and never applies the per-subject cap. */
|
|
417
|
+
export function assertContractStoreConfig(cfg, space) {
|
|
418
|
+
const name = epcStreamName(space), subject = `${spacePrefix(space)}.epc.>`;
|
|
387
419
|
if (cfg.allow_direct !== true || cfg.deny_delete !== true || cfg.deny_purge !== true)
|
|
388
420
|
throw new Error(`the contract store ${name} has a drifted shape (allow_direct=${String(cfg.allow_direct)}, deny_delete=${String(cfg.deny_delete)}, deny_purge=${String(cfg.deny_purge)}); an authority store is never silently adopted - reprovision it (SPEC 13.12)`);
|
|
389
421
|
if (cfg.max_msgs_per_subject !== 1 || cfg.discard !== DiscardPolicy.New || cfg.discard_new_per_subject !== true)
|
|
@@ -415,25 +447,22 @@ export async function ensureAuthorityStores(jsm, kvm, space) {
|
|
|
415
447
|
// through the SAME final `streams.info` + full normative verify — a drifted authority store is
|
|
416
448
|
// an operator error, never silently adopted (§13.12: the flags + store-binding are load-bearing
|
|
417
449
|
// for deny-new and the barrier CAS fences).
|
|
418
|
-
const
|
|
450
|
+
const definitions = endpointAuthorityStoreDefinitions(space);
|
|
451
|
+
const recordBucket = definitions.records.bucket;
|
|
419
452
|
const recordStream = `KV_${recordBucket}`;
|
|
420
453
|
if (await jsm.streams.info(recordStream).catch(() => undefined) === undefined) {
|
|
421
|
-
await kvm.create(recordBucket,
|
|
454
|
+
await kvm.create(recordBucket, definitions.records.createOptions);
|
|
422
455
|
const recordConfig = (await jsm.streams.info(recordStream)).config;
|
|
423
|
-
await jsm.streams.update(recordStream, { ...recordConfig,
|
|
456
|
+
await jsm.streams.update(recordStream, { ...recordConfig, ...definitions.records.hardenAfterCreate });
|
|
424
457
|
}
|
|
425
458
|
const recordCfg = (await jsm.streams.info(recordStream)).config;
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
assertAuthorityStoreBinding(recordCfg, recordBucket);
|
|
429
|
-
const authBucket = epAuthBucket(space);
|
|
459
|
+
assertRecordsStoreConfig(recordCfg, space);
|
|
460
|
+
const authBucket = definitions.auth.bucket;
|
|
430
461
|
const authStream = `KV_${authBucket}`;
|
|
431
462
|
if (await jsm.streams.info(authStream).catch(() => undefined) === undefined)
|
|
432
|
-
await kvm.create(authBucket,
|
|
463
|
+
await kvm.create(authBucket, definitions.auth.createOptions);
|
|
433
464
|
const authCfg = (await jsm.streams.info(authStream)).config;
|
|
434
|
-
|
|
435
|
-
throw new Error(`the auth store ${authBucket} has a drifted shape (allow_direct=${String(authCfg.allow_direct)}, allow_msg_ttl=${String(authCfg.allow_msg_ttl)}); an authority store is never silently adopted - reprovision it (SPEC 13.12)`);
|
|
436
|
-
assertAuthorityStoreBinding(authCfg, authBucket);
|
|
465
|
+
assertAuthStoreConfig(authCfg, space);
|
|
437
466
|
}
|
|
438
467
|
/** Create (idempotently) the per-space SESSION ledger store (§13.6): the DEDICATED
|
|
439
468
|
* {@link sessionsBucket} the manager's session plane CASes `session.<id>` rows over. Kept OUT of
|
|
@@ -447,11 +476,31 @@ export async function ensureAuthorityStores(jsm, kvm, space) {
|
|
|
447
476
|
* structural fix for the §13.9 subject-blindness a shared auth bucket would carry (creds + gates).
|
|
448
477
|
* Create-or-verify, safe at every manager boot; a drifted store FAILS LOUD (§13.12). */
|
|
449
478
|
export async function createSessionsStore(jsm, kvm, space) {
|
|
450
|
-
const
|
|
479
|
+
const definition = endpointSessionStoreDefinition(space);
|
|
480
|
+
const bucket = definition.bucket;
|
|
451
481
|
const stream = `KV_${bucket}`;
|
|
452
482
|
if (await jsm.streams.info(stream).catch(() => undefined) === undefined)
|
|
453
|
-
await kvm.create(bucket,
|
|
483
|
+
await kvm.create(bucket, definition.createOptions);
|
|
454
484
|
const cfg = (await jsm.streams.info(stream)).config;
|
|
485
|
+
assertSessionsStoreConfig(cfg, space);
|
|
486
|
+
}
|
|
487
|
+
/** Pure native records-store invariant checks; no read, repair or authority is supplied. */
|
|
488
|
+
export function assertRecordsStoreConfig(recordCfg, space) {
|
|
489
|
+
const recordBucket = recordsBucket(space);
|
|
490
|
+
if (recordCfg.allow_direct !== true || recordCfg.allow_rollup_hdrs !== false || recordCfg.deny_delete !== true || recordCfg.deny_purge !== true)
|
|
491
|
+
throw new Error(`the records store ${recordBucket} has a drifted shape (allow_direct=${String(recordCfg.allow_direct)}, allow_rollup_hdrs=${String(recordCfg.allow_rollup_hdrs)}, deny_delete=${String(recordCfg.deny_delete)}, deny_purge=${String(recordCfg.deny_purge)}); an authority store is never silently adopted - reprovision it (SPEC 13.12)`);
|
|
492
|
+
assertAuthorityStoreBinding(recordCfg, recordBucket);
|
|
493
|
+
}
|
|
494
|
+
/** Pure native auth-store invariant checks; no read, repair or authority is supplied. */
|
|
495
|
+
export function assertAuthStoreConfig(authCfg, space) {
|
|
496
|
+
const authBucket = epAuthBucket(space);
|
|
497
|
+
if (authCfg.allow_direct !== false || authCfg.allow_msg_ttl !== true)
|
|
498
|
+
throw new Error(`the auth store ${authBucket} has a drifted shape (allow_direct=${String(authCfg.allow_direct)}, allow_msg_ttl=${String(authCfg.allow_msg_ttl)}); an authority store is never silently adopted - reprovision it (SPEC 13.12)`);
|
|
499
|
+
assertAuthorityStoreBinding(authCfg, authBucket);
|
|
500
|
+
}
|
|
501
|
+
/** Pure native sessions-store invariant checks; no read, repair or authority is supplied. */
|
|
502
|
+
export function assertSessionsStoreConfig(cfg, space) {
|
|
503
|
+
const bucket = sessionsBucket(space);
|
|
455
504
|
if (cfg.allow_direct !== false || cfg.allow_msg_ttl !== true)
|
|
456
505
|
throw new Error(`the sessions store ${bucket} has a drifted shape (allow_direct=${String(cfg.allow_direct)}, allow_msg_ttl=${String(cfg.allow_msg_ttl)}); an authority store is never silently adopted - reprovision it (SPEC 13.12)`);
|
|
457
506
|
assertAuthorityStoreBinding(cfg, bucket);
|