@cotal-ai/core 0.12.0 → 0.13.1
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/acls.d.ts +31 -7
- package/dist/acls.d.ts.map +1 -1
- package/dist/acls.js +105 -17
- package/dist/acls.js.map +1 -1
- package/dist/agent-file.js +1 -1
- package/dist/agent-file.js.map +1 -1
- package/dist/auth-provider.d.ts +8 -0
- package/dist/auth-provider.d.ts.map +1 -1
- package/dist/auth-provider.js.map +1 -1
- package/dist/backup.d.ts.map +1 -1
- package/dist/backup.js +6 -4
- package/dist/backup.js.map +1 -1
- package/dist/broker-floor.d.ts +34 -0
- package/dist/broker-floor.d.ts.map +1 -0
- package/dist/broker-floor.js +39 -0
- package/dist/broker-floor.js.map +1 -0
- package/dist/canonical.d.ts +24 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +159 -0
- package/dist/canonical.js.map +1 -0
- package/dist/connector.d.ts +4 -0
- package/dist/connector.d.ts.map +1 -1
- package/dist/endpoint-action.d.ts +424 -0
- package/dist/endpoint-action.d.ts.map +1 -0
- package/dist/endpoint-action.js +910 -0
- package/dist/endpoint-action.js.map +1 -0
- package/dist/endpoint-binding.d.ts +344 -0
- package/dist/endpoint-binding.d.ts.map +1 -0
- package/dist/endpoint-binding.js +753 -0
- package/dist/endpoint-binding.js.map +1 -0
- package/dist/endpoint-checkpoint.d.ts +292 -0
- package/dist/endpoint-checkpoint.d.ts.map +1 -0
- package/dist/endpoint-checkpoint.js +818 -0
- package/dist/endpoint-checkpoint.js.map +1 -0
- package/dist/endpoint-cluster.d.ts +95 -0
- package/dist/endpoint-cluster.d.ts.map +1 -0
- package/dist/endpoint-cluster.js +194 -0
- package/dist/endpoint-cluster.js.map +1 -0
- package/dist/endpoint-contract-store.d.ts +90 -0
- package/dist/endpoint-contract-store.d.ts.map +1 -0
- package/dist/endpoint-contract-store.js +348 -0
- package/dist/endpoint-contract-store.js.map +1 -0
- package/dist/endpoint-envelope.d.ts +165 -0
- package/dist/endpoint-envelope.d.ts.map +1 -0
- package/dist/endpoint-envelope.js +346 -0
- package/dist/endpoint-envelope.js.map +1 -0
- package/dist/endpoint-grants.d.ts +123 -0
- package/dist/endpoint-grants.d.ts.map +1 -0
- package/dist/endpoint-grants.js +215 -0
- package/dist/endpoint-grants.js.map +1 -0
- package/dist/endpoint-guard.d.ts +222 -0
- package/dist/endpoint-guard.d.ts.map +1 -0
- package/dist/endpoint-guard.js +468 -0
- package/dist/endpoint-guard.js.map +1 -0
- package/dist/endpoint-handle.d.ts +176 -0
- package/dist/endpoint-handle.d.ts.map +1 -0
- package/dist/endpoint-handle.js +608 -0
- package/dist/endpoint-handle.js.map +1 -0
- package/dist/endpoint-journal.d.ts +225 -0
- package/dist/endpoint-journal.d.ts.map +1 -0
- package/dist/endpoint-journal.js +431 -0
- package/dist/endpoint-journal.js.map +1 -0
- package/dist/endpoint-receipt.d.ts +225 -0
- package/dist/endpoint-receipt.d.ts.map +1 -0
- package/dist/endpoint-receipt.js +417 -0
- package/dist/endpoint-receipt.js.map +1 -0
- package/dist/endpoint-records.d.ts +243 -0
- package/dist/endpoint-records.d.ts.map +1 -0
- package/dist/endpoint-records.js +591 -0
- package/dist/endpoint-records.js.map +1 -0
- package/dist/endpoint-serve.d.ts +176 -0
- package/dist/endpoint-serve.d.ts.map +1 -0
- package/dist/endpoint-serve.js +446 -0
- package/dist/endpoint-serve.js.map +1 -0
- package/dist/endpoint-service.d.ts +518 -0
- package/dist/endpoint-service.d.ts.map +1 -0
- package/dist/endpoint-service.js +973 -0
- package/dist/endpoint-service.js.map +1 -0
- package/dist/endpoint-session.d.ts +398 -0
- package/dist/endpoint-session.d.ts.map +1 -0
- package/dist/endpoint-session.js +834 -0
- package/dist/endpoint-session.js.map +1 -0
- package/dist/endpoint-signing.d.ts +105 -0
- package/dist/endpoint-signing.d.ts.map +1 -0
- package/dist/endpoint-signing.js +190 -0
- package/dist/endpoint-signing.js.map +1 -0
- package/dist/endpoint-subjects.d.ts +222 -0
- package/dist/endpoint-subjects.d.ts.map +1 -0
- package/dist/endpoint-subjects.js +381 -0
- package/dist/endpoint-subjects.js.map +1 -0
- package/dist/endpoint-supervisor.d.ts +19 -0
- package/dist/endpoint-supervisor.d.ts.map +1 -0
- package/dist/endpoint-supervisor.js +12 -0
- package/dist/endpoint-supervisor.js.map +1 -0
- package/dist/endpoint-traits.d.ts +225 -0
- package/dist/endpoint-traits.d.ts.map +1 -0
- package/dist/endpoint-traits.js +469 -0
- package/dist/endpoint-traits.js.map +1 -0
- package/dist/endpoint-verbs.d.ts +277 -0
- package/dist/endpoint-verbs.d.ts.map +1 -0
- package/dist/endpoint-verbs.js +576 -0
- package/dist/endpoint-verbs.js.map +1 -0
- package/dist/endpoint-virtual.d.ts +308 -0
- package/dist/endpoint-virtual.d.ts.map +1 -0
- package/dist/endpoint-virtual.js +440 -0
- package/dist/endpoint-virtual.js.map +1 -0
- package/dist/endpoint-work.d.ts +304 -0
- package/dist/endpoint-work.d.ts.map +1 -0
- package/dist/endpoint-work.js +728 -0
- package/dist/endpoint-work.js.map +1 -0
- package/dist/endpoint.d.ts +66 -22
- package/dist/endpoint.d.ts.map +1 -1
- package/dist/endpoint.js +289 -89
- package/dist/endpoint.js.map +1 -1
- package/dist/evict.d.ts +95 -32
- package/dist/evict.d.ts.map +1 -1
- package/dist/evict.js +193 -3
- package/dist/evict.js.map +1 -1
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/dist/lease.d.ts +4 -0
- package/dist/lease.d.ts.map +1 -1
- package/dist/lease.js.map +1 -1
- package/dist/members.d.ts +4 -4
- package/dist/members.d.ts.map +1 -1
- package/dist/members.js +12 -12
- package/dist/members.js.map +1 -1
- package/dist/provision.d.ts +70 -18
- package/dist/provision.d.ts.map +1 -1
- package/dist/provision.js +194 -33
- package/dist/provision.js.map +1 -1
- package/dist/safe-pattern.d.ts +33 -0
- package/dist/safe-pattern.d.ts.map +1 -0
- package/dist/safe-pattern.js +486 -0
- package/dist/safe-pattern.js.map +1 -0
- package/dist/schema-profile.d.ts +93 -0
- package/dist/schema-profile.d.ts.map +1 -0
- package/dist/schema-profile.js +284 -0
- package/dist/schema-profile.js.map +1 -0
- package/dist/streams.d.ts +13 -8
- package/dist/streams.d.ts.map +1 -1
- package/dist/streams.js +35 -18
- package/dist/streams.js.map +1 -1
- package/dist/subjects.d.ts +100 -40
- package/dist/subjects.d.ts.map +1 -1
- package/dist/subjects.js +136 -60
- package/dist/subjects.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The normative JSON Schema 2020-12 execution profile for contract schemas (SPEC §13.7, D27).
|
|
3
|
+
*
|
|
4
|
+
* A contract schema is a CLOSED resource bundle: fully self-contained (local `#/…` refs) or
|
|
5
|
+
* referencing other contract-store artifacts by digest (`cotal:sha256:<hex>`) only. Ambient
|
|
6
|
+
* HTTP/file/URI resolution never happens; every external reference must be supplied by the
|
|
7
|
+
* caller as an already-fetched, digest-verified bundle member. Registration-time violations are
|
|
8
|
+
* `contract-invalid` (distinct from invocation-time `bad-request`), and all bounds are enforced
|
|
9
|
+
* BEFORE compilation so a hostile descriptor cannot turn registration into a DoS.
|
|
10
|
+
*/
|
|
11
|
+
import { Ajv2020 } from "ajv/dist/2020.js";
|
|
12
|
+
import { canonicalJson, contractDigest, isContractDigest } from "./canonical.js";
|
|
13
|
+
import { assertSafePattern } from "./safe-pattern.js";
|
|
14
|
+
/** Registration-time bounds (SPEC §13.7/§13.8). Fixed by the profile, not caller-tunable, and
|
|
15
|
+
* RUNTIME-frozen (the afa715b class): a post-import `maxDepth = MAX_SAFE_INTEGER` would remove
|
|
16
|
+
* the pre-compilation recursion/DoS ceiling, so mutation throws instead. */
|
|
17
|
+
export const SCHEMA_PROFILE = Object.freeze({
|
|
18
|
+
/** One schema document's canonical form, bytes. */
|
|
19
|
+
maxDocumentBytes: 256 * 1024,
|
|
20
|
+
/** The complete resolved closure (root + digest-referenced members), bytes. */
|
|
21
|
+
maxClosureBytes: 1024 * 1024,
|
|
22
|
+
/** Structural nesting depth of any document. */
|
|
23
|
+
maxDepth: 32,
|
|
24
|
+
/** Digest-reference chain depth (root → member → member …). */
|
|
25
|
+
maxRefChain: 32,
|
|
26
|
+
/** Compile budget per closure, ms. */
|
|
27
|
+
compileBudgetMs: 100,
|
|
28
|
+
/** Bounded pattern complexity: max characters of any `pattern` / `patternProperties` regex. */
|
|
29
|
+
maxPatternChars: 256,
|
|
30
|
+
/** Per-value validation budget at the serving boundary, ms (§13.8 reference; post-hoc,
|
|
31
|
+
* fail-loud as `bad-request`). */
|
|
32
|
+
validateBudgetMs: 10,
|
|
33
|
+
/** Compiled-schema cache entries (the SPEC's reference 256-entry LRU). */
|
|
34
|
+
compiledCacheEntries: 256,
|
|
35
|
+
});
|
|
36
|
+
/** The canonical void schema (§13.7): the one artifact a side with no payload declares, so both
|
|
37
|
+
* `op` digests exist for every command. Validation against it means the payload is absent or
|
|
38
|
+
* `null`. */
|
|
39
|
+
export const VOID_SCHEMA = Object.freeze({ type: "null" });
|
|
40
|
+
/** Artifact digest of the void schema document — one fixed value by construction. */
|
|
41
|
+
export const VOID_SCHEMA_ARTIFACT_DIGEST = contractDigest(VOID_SCHEMA);
|
|
42
|
+
/** The void schema's CLOSURE digest (the §13.7 manifest of a self-contained document) — the
|
|
43
|
+
* value `op.inputDigest`/`op.outputDigest` carry for a payload-free side. */
|
|
44
|
+
export const VOID_SCHEMA_DIGEST = contractDigest({ v: 1, root: VOID_SCHEMA_ARTIFACT_DIGEST, members: [] });
|
|
45
|
+
/** The digest-pinned contract-store reference scheme: `cotal:sha256:<hex>[#/json/pointer]`. */
|
|
46
|
+
const STORE_REF = /^cotal:(sha256:[0-9a-f]{64})(#.*)?$/;
|
|
47
|
+
/** Thrown for every profile violation at registration/ingest time; maps to the wire error
|
|
48
|
+
* code `contract-invalid` (never `bad-request`, which is for invocation-time args). */
|
|
49
|
+
export class ContractInvalidError extends Error {
|
|
50
|
+
code = "contract-invalid";
|
|
51
|
+
constructor(message) {
|
|
52
|
+
super(message);
|
|
53
|
+
this.name = "ContractInvalidError";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Canonicalize within the profile boundary: an I-JSON violation (lone surrogate, undefined,
|
|
57
|
+
* non-finite number) in a schema document is a PROFILE violation and must surface as
|
|
58
|
+
* `contract-invalid`, never as a raw canonicalizer error (§13.7). */
|
|
59
|
+
function canonicalOrInvalid(v, label) {
|
|
60
|
+
try {
|
|
61
|
+
return canonicalJson(v);
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
throw new ContractInvalidError(`${label}: ${e.message}`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function digestOrInvalid(v, label) {
|
|
68
|
+
try {
|
|
69
|
+
return contractDigest(v);
|
|
70
|
+
}
|
|
71
|
+
catch (e) {
|
|
72
|
+
throw new ContractInvalidError(`${label}: ${e.message}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function structuralDepth(v, depth = 0) {
|
|
76
|
+
if (depth > SCHEMA_PROFILE.maxDepth)
|
|
77
|
+
return depth; // short-circuit, caller throws
|
|
78
|
+
if (v === null || typeof v !== "object")
|
|
79
|
+
return depth;
|
|
80
|
+
let max = depth;
|
|
81
|
+
const children = Array.isArray(v) ? v : Object.values(v);
|
|
82
|
+
for (const c of children) {
|
|
83
|
+
const d = structuralDepth(c, depth + 1);
|
|
84
|
+
if (d > max)
|
|
85
|
+
max = d;
|
|
86
|
+
if (max > SCHEMA_PROFILE.maxDepth)
|
|
87
|
+
return max;
|
|
88
|
+
}
|
|
89
|
+
return max;
|
|
90
|
+
}
|
|
91
|
+
/** The bounded-pattern-complexity gate (§13.7/§13.8 "bounded pattern complexity", "bounded
|
|
92
|
+
* regex"): the {@link assertSafePattern} SAFE SUBSET — a length bound plus an admission
|
|
93
|
+
* analysis that refuses nested repetition, repeated nullable or ambiguous-alternation bodies,
|
|
94
|
+
* overlapping variable repetitions in sequence, backreferences, lookarounds, and anything it
|
|
95
|
+
* cannot parse. Conservative by construction: uncertainty refuses. A refused pattern is
|
|
96
|
+
* rewritten by its author at registration time (`contract-invalid`), never probed at
|
|
97
|
+
* validation time — the post-hoc validate budget can only classify a stall, not prevent it. */
|
|
98
|
+
function assertBoundedPattern(p, label, where) {
|
|
99
|
+
try {
|
|
100
|
+
assertSafePattern(p, SCHEMA_PROFILE.maxPatternChars);
|
|
101
|
+
}
|
|
102
|
+
catch (e) {
|
|
103
|
+
throw new ContractInvalidError(`${label}: ${where} refused: ${e.message}`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** Collect every `$ref` string in a schema document and gate its regex patterns (structural
|
|
107
|
+
* walk; `$ref` in 2020-12 is always a string-valued keyword wherever it appears; `pattern`
|
|
108
|
+
* values and `patternProperties` keys are the profile's bounded-pattern-complexity surface). */
|
|
109
|
+
function collectRefs(v, label, out = []) {
|
|
110
|
+
if (v === null || typeof v !== "object")
|
|
111
|
+
return out;
|
|
112
|
+
if (Array.isArray(v)) {
|
|
113
|
+
for (const c of v)
|
|
114
|
+
collectRefs(c, label, out);
|
|
115
|
+
return out;
|
|
116
|
+
}
|
|
117
|
+
for (const [k, c] of Object.entries(v)) {
|
|
118
|
+
if ((k === "$ref" || k === "$dynamicRef") && typeof c === "string")
|
|
119
|
+
out.push(c);
|
|
120
|
+
if (k === "pattern" && typeof c === "string")
|
|
121
|
+
assertBoundedPattern(c, label, "a pattern");
|
|
122
|
+
if (k === "patternProperties" && c !== null && typeof c === "object" && !Array.isArray(c)) {
|
|
123
|
+
for (const p of Object.keys(c))
|
|
124
|
+
assertBoundedPattern(p, label, "a patternProperties key");
|
|
125
|
+
}
|
|
126
|
+
collectRefs(c, label, out);
|
|
127
|
+
}
|
|
128
|
+
return out;
|
|
129
|
+
}
|
|
130
|
+
/** Enforce the D27 profile on one document: size, depth, and reference closure. Returns the
|
|
131
|
+
* digest-refs the document makes (for closure walking). */
|
|
132
|
+
function assertDocumentProfile(doc, label) {
|
|
133
|
+
const canonical = canonicalOrInvalid(doc, label); // also enforces I-JSON, as contract-invalid
|
|
134
|
+
const bytes = Buffer.byteLength(canonical, "utf8");
|
|
135
|
+
if (bytes > SCHEMA_PROFILE.maxDocumentBytes)
|
|
136
|
+
throw new ContractInvalidError(`${label}: document is ${bytes} bytes (profile max ${SCHEMA_PROFILE.maxDocumentBytes})`);
|
|
137
|
+
if (structuralDepth(doc) > SCHEMA_PROFILE.maxDepth)
|
|
138
|
+
throw new ContractInvalidError(`${label}: nesting exceeds profile depth ${SCHEMA_PROFILE.maxDepth}`);
|
|
139
|
+
const storeRefs = [];
|
|
140
|
+
for (const ref of collectRefs(doc, label)) {
|
|
141
|
+
if (ref.startsWith("#"))
|
|
142
|
+
continue; // local pointer/anchor — resolved within the document
|
|
143
|
+
const m = STORE_REF.exec(ref);
|
|
144
|
+
if (!m)
|
|
145
|
+
throw new ContractInvalidError(`${label}: external $ref ${JSON.stringify(ref)}; only local '#…' or digest-pinned 'cotal:sha256:<hex>' references are permitted (no ambient resolution)`);
|
|
146
|
+
storeRefs.push(m[1]);
|
|
147
|
+
}
|
|
148
|
+
return storeRefs;
|
|
149
|
+
}
|
|
150
|
+
/** Provenance brand: exactly the frozen objects this compiler returned. A WeakSet (not a
|
|
151
|
+
* field) so the brand is unforgeable and unserializable; the freeze makes field swaps on a
|
|
152
|
+
* branded object impossible, so brand membership proves BOTH fields came out of one compile. */
|
|
153
|
+
const COMPILED = new WeakSet();
|
|
154
|
+
function makeCompiled(validate, closureDigest) {
|
|
155
|
+
const compiled = Object.freeze({ validate, closureDigest });
|
|
156
|
+
COMPILED.add(compiled);
|
|
157
|
+
return compiled;
|
|
158
|
+
}
|
|
159
|
+
/** True iff `c` is a frozen contract this profile compiler produced (never structural). */
|
|
160
|
+
export function isCompiledContract(c) {
|
|
161
|
+
return typeof c === "object" && c !== null && COMPILED.has(c);
|
|
162
|
+
}
|
|
163
|
+
/** Refuse anything that is not a compiler-produced contract: authority seams (the serve table,
|
|
164
|
+
* the grant mint) call this so a fabricated validator/digest pair fails loud, never serves. */
|
|
165
|
+
export function assertCompiledContract(c, what) {
|
|
166
|
+
if (!isCompiledContract(c))
|
|
167
|
+
throw new ContractInvalidError(`${what} is not a profile-compiled contract (schema-profile compileContract); a structural {validate, closureDigest} pair carries no compile provenance and is refused (SPEC 13.7)`);
|
|
168
|
+
return c;
|
|
169
|
+
}
|
|
170
|
+
/** Enforce the profile on the whole closure WITHOUT compiling: bounds every document, walks the
|
|
171
|
+
* digest-reference graph breadth-first (chain depth + total size), VERIFIES every reachable
|
|
172
|
+
* member against its digest key (fail-loud `contract-invalid`, so a mis-assembled bundle can
|
|
173
|
+
* neither register nor poison the compiled cache), and returns the closure identity — the
|
|
174
|
+
* §13.7 manifest digest. */
|
|
175
|
+
function assertClosureProfile(bundle) {
|
|
176
|
+
const members = bundle.members ?? {};
|
|
177
|
+
for (const d of Object.keys(members)) {
|
|
178
|
+
if (!isContractDigest(d))
|
|
179
|
+
throw new ContractInvalidError(`bundle member key ${JSON.stringify(d)} is not a sha256 digest`);
|
|
180
|
+
}
|
|
181
|
+
const seen = new Set();
|
|
182
|
+
let closureBytes = 0;
|
|
183
|
+
let frontier = assertDocumentProfile(bundle.root, "root schema");
|
|
184
|
+
closureBytes += Buffer.byteLength(canonicalOrInvalid(bundle.root, "root schema"), "utf8");
|
|
185
|
+
for (let chain = 0; frontier.length > 0; chain++) {
|
|
186
|
+
if (chain >= SCHEMA_PROFILE.maxRefChain)
|
|
187
|
+
throw new ContractInvalidError(`reference chain exceeds profile depth ${SCHEMA_PROFILE.maxRefChain}`);
|
|
188
|
+
const next = [];
|
|
189
|
+
for (const digest of frontier) {
|
|
190
|
+
if (seen.has(digest))
|
|
191
|
+
continue;
|
|
192
|
+
seen.add(digest);
|
|
193
|
+
const member = members[digest];
|
|
194
|
+
if (member === undefined)
|
|
195
|
+
throw new ContractInvalidError(`unresolved digest reference ${digest}: not present in the bundle (schemas are closed; nothing is fetched)`);
|
|
196
|
+
if (digestOrInvalid(member, `member ${digest}`) !== digest)
|
|
197
|
+
throw new ContractInvalidError(`bundle member under ${digest} does not hash to its key (content is ${digestOrInvalid(member, `member ${digest}`)})`);
|
|
198
|
+
closureBytes += Buffer.byteLength(canonicalOrInvalid(member, `member ${digest}`), "utf8");
|
|
199
|
+
if (closureBytes > SCHEMA_PROFILE.maxClosureBytes)
|
|
200
|
+
throw new ContractInvalidError(`closure is ${closureBytes} bytes (profile max ${SCHEMA_PROFILE.maxClosureBytes})`);
|
|
201
|
+
next.push(...assertDocumentProfile(member, `member ${digest}`));
|
|
202
|
+
}
|
|
203
|
+
frontier = next;
|
|
204
|
+
}
|
|
205
|
+
// A closed bundle lists EXACTLY the closure: a member unreachable from the root escaped every
|
|
206
|
+
// bound and digest check above and never enters the closure identity, so accepting it would
|
|
207
|
+
// make registration history-dependent (cold compile vs cache hit) and hand unverified,
|
|
208
|
+
// unbounded input to the compiler. Refused deterministically, before hit and miss alike.
|
|
209
|
+
const extras = Object.keys(members).filter((d) => !seen.has(d));
|
|
210
|
+
if (extras.length > 0)
|
|
211
|
+
throw new ContractInvalidError(`bundle carries ${extras.length} member(s) unreachable from the root (${extras.slice(0, 3).join(", ")}${extras.length > 3 ? ", …" : ""})`);
|
|
212
|
+
return contractDigest({ v: 1, root: digestOrInvalid(bundle.root, "root schema"), members: [...seen].sort() });
|
|
213
|
+
}
|
|
214
|
+
function compileWithinBudget(bundle) {
|
|
215
|
+
const started = Date.now();
|
|
216
|
+
// Compile with deterministic local resolution only. Members register under their cotal: URI
|
|
217
|
+
// so in-document `$ref: "cotal:sha256:…"` resolves from the bundle, never the network.
|
|
218
|
+
const ajv = new Ajv2020({
|
|
219
|
+
strict: false, // the wire accepts full 2020-12, not ajv's strict-mode dialect subset
|
|
220
|
+
allErrors: false,
|
|
221
|
+
validateFormats: false,
|
|
222
|
+
loadSchema: undefined,
|
|
223
|
+
// PINNED, never inherited from Ajv's default: the safe-pattern analyzer models `/u`
|
|
224
|
+
// semantics exactly (astral atoms, surrogate refusals), so the engine MUST compile
|
|
225
|
+
// `pattern` with the `u` flag. If this ever flipped, patterns would be proven under one
|
|
226
|
+
// grammar and executed under another (an admitting under-approximation).
|
|
227
|
+
unicodeRegExp: true,
|
|
228
|
+
});
|
|
229
|
+
let validate;
|
|
230
|
+
try {
|
|
231
|
+
// Every member is reachable and digest-verified (assertClosureProfile refuses extras), so
|
|
232
|
+
// exactly the closure registers. A registration failure (e.g. a `$id` collision between
|
|
233
|
+
// members) is a profile rejection, same as a compile failure.
|
|
234
|
+
for (const [digest, member] of Object.entries(bundle.members ?? {}))
|
|
235
|
+
ajv.addSchema(member, `cotal:${digest}`);
|
|
236
|
+
validate = ajv.compile(bundle.root);
|
|
237
|
+
}
|
|
238
|
+
catch (e) {
|
|
239
|
+
throw new ContractInvalidError(`schema does not compile under the 2020-12 profile: ${e.message}`);
|
|
240
|
+
}
|
|
241
|
+
const elapsed = Date.now() - started;
|
|
242
|
+
if (elapsed > SCHEMA_PROFILE.compileBudgetMs)
|
|
243
|
+
throw new ContractInvalidError(`compile took ${elapsed}ms (profile budget ${SCHEMA_PROFILE.compileBudgetMs}ms)`);
|
|
244
|
+
return validate;
|
|
245
|
+
}
|
|
246
|
+
/** Validate the whole closure against the profile and compile it with a real 2020-12
|
|
247
|
+
* validator. No network, no filesystem: `loadSchema` is never installed, and every
|
|
248
|
+
* `cotal:` reference must be present in `bundle.members`. */
|
|
249
|
+
export function compileContract(bundle) {
|
|
250
|
+
const closureDigest = assertClosureProfile(bundle);
|
|
251
|
+
return makeCompiled(compileWithinBudget(bundle), closureDigest);
|
|
252
|
+
}
|
|
253
|
+
/** {@link compileContract} without the closure identity, kept for validation-only callers. */
|
|
254
|
+
export function compileContractSchema(bundle) {
|
|
255
|
+
return compileContract(bundle).validate;
|
|
256
|
+
}
|
|
257
|
+
/** A bounded compiled-schema LRU (SPEC §13.7's reference 256-entry cache), keyed by CLOSURE
|
|
258
|
+
* digest. The profile walk (incl. member digest verification) runs on EVERY call — only the
|
|
259
|
+
* ajv compilation is skipped on a hit. Sound across callers: two bundles with one closure
|
|
260
|
+
* digest are byte-identical closures, so a hit can never serve another caller's
|
|
261
|
+
* mis-assembled bundle. */
|
|
262
|
+
export function createCompiledContractCache(capacity = SCHEMA_PROFILE.compiledCacheEntries) {
|
|
263
|
+
if (!Number.isSafeInteger(capacity) || capacity < 1)
|
|
264
|
+
throw new Error(`cache capacity ${capacity} is not a positive integer`);
|
|
265
|
+
const lru = new Map();
|
|
266
|
+
return {
|
|
267
|
+
compile(bundle) {
|
|
268
|
+
const closureDigest = assertClosureProfile(bundle);
|
|
269
|
+
const hit = lru.get(closureDigest);
|
|
270
|
+
if (hit) {
|
|
271
|
+
lru.delete(closureDigest); // refresh recency
|
|
272
|
+
lru.set(closureDigest, hit);
|
|
273
|
+
return hit;
|
|
274
|
+
}
|
|
275
|
+
const compiled = makeCompiled(compileWithinBudget(bundle), closureDigest);
|
|
276
|
+
lru.set(closureDigest, compiled);
|
|
277
|
+
if (lru.size > capacity)
|
|
278
|
+
lru.delete(lru.keys().next().value);
|
|
279
|
+
return compiled;
|
|
280
|
+
},
|
|
281
|
+
size: () => lru.size,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
//# sourceMappingURL=schema-profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-profile.js","sourceRoot":"","sources":["../src/schema-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,OAAO,EAAyB,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,iBAAiB,E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,CAAC;gBACR,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,kBAAkB;gBAC7C,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;gBAC5B,OAAO,GAAG,CAAC;YACb,CAAC;YACD,MAAM,QAAQ,GAAG,YAAY,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,CAAC;YAC1E,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;YACjC,IAAI,GAAG,CAAC,IAAI,GAAG,QAAQ;gBAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAe,CAAC,CAAC;YACvE,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,IAAI,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI;KACrB,CAAC;AACJ,CAAC"}
|
package/dist/streams.d.ts
CHANGED
|
@@ -80,9 +80,10 @@ export declare function createSpaceStreams(jsm: JetStreamManager, space: string)
|
|
|
80
80
|
* agent binds it, and the bind would then fail permanently ("consumer not found"). Persisting
|
|
81
81
|
* it is the price of bind-only; explicit cleanup on agent-stop is a follow-up.
|
|
82
82
|
*/
|
|
83
|
-
export declare function dmDurableConfig(space: string, owner: string, actor: string, opts?: {
|
|
83
|
+
export declare function dmDurableConfig(space: string, owner: string, actor: string, lifecycleUid: string, opts?: {
|
|
84
84
|
ackWaitMs?: number;
|
|
85
85
|
inactiveThresholdMs?: number;
|
|
86
|
+
activationFrontier?: number;
|
|
86
87
|
}): Partial<ConsumerConfig>;
|
|
87
88
|
/**
|
|
88
89
|
* The TASK work-queue durable for a role — ONE definition, shared by the privileged
|
|
@@ -109,7 +110,7 @@ export declare function inboxReaderConfig(space: string, opts?: {
|
|
|
109
110
|
* native JetStream — the §8 "equivalent per-member at-least-once mechanism with the same ack
|
|
110
111
|
* semantics". `inactive_threshold` only for an open-mode self-create (none today; Plane-3 is
|
|
111
112
|
* auth-only). */
|
|
112
|
-
export declare function dlvDurableConfig(space: string, owner: string, actor: string, opts?: {
|
|
113
|
+
export declare function dlvDurableConfig(space: string, owner: string, actor: string, lifecycleUid: string, opts?: {
|
|
113
114
|
ackWaitMs?: number;
|
|
114
115
|
inactiveThresholdMs?: number;
|
|
115
116
|
}): Partial<ConsumerConfig>;
|
|
@@ -158,14 +159,17 @@ export declare function clearChannel(opts: {
|
|
|
158
159
|
channel: string;
|
|
159
160
|
purged: number;
|
|
160
161
|
}>;
|
|
161
|
-
/** Delete a departed
|
|
162
|
-
* to {@link provisionAgent}. Removes exactly what the provisioner minted for THIS
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
162
|
+
/** Delete a departed agent LIFECYCLE's provisioning footprint (#159 Part B) — the teardown counterpart
|
|
163
|
+
* to {@link provisionAgent}. Removes exactly what the provisioner minted for THIS incarnation: its two
|
|
164
|
+
* bind-only durables (`dm_<o>-<a>-<uid>`, `dlv_<o>-<a>-<uid>`) and its lifecycle-keyed read-ACL row.
|
|
165
|
+
* Idempotent — a missing consumer / absent ACL row is a no-op (the agent may have exited before a
|
|
166
|
+
* durable was created, or a re-run). LIFECYCLE-EXACT by construction (SPEC §13.1): every name this
|
|
167
|
+
* deletes embeds the target uid, so a stale/replayed teardown for a retired lifecycle names only
|
|
168
|
+
* retired resources — it structurally cannot touch a same-alias successor, and the deprovisioner
|
|
169
|
+
* cred's exact-name grants make a wrong-uid delete broker-DENIED, not just a no-op.
|
|
166
170
|
*
|
|
167
171
|
* Does NOT touch the role-SHARED `svc_<role>` TASK durable (deleting it would break the role's other
|
|
168
|
-
* agents — it lives until space teardown), nor the ephemeral `
|
|
172
|
+
* agents — it lives until space teardown), nor the ephemeral `chathist_…-<uid>` history consumers (they
|
|
169
173
|
* self-clean on the agent's disconnect). The creds FILE is removed by the caller (a manager-local
|
|
170
174
|
* filesystem concern, not a broker one). Pass a TARGET-PINNED `deprovisioner` cred (see
|
|
171
175
|
* {@link mintCreds}); a bare connection (open mode) never calls this — an open mesh mints nothing. */
|
|
@@ -173,6 +177,7 @@ export declare function deprovisionAgent(opts: {
|
|
|
173
177
|
servers: string;
|
|
174
178
|
space: string;
|
|
175
179
|
targetId: string;
|
|
180
|
+
lifecycleUid: string;
|
|
176
181
|
creds?: string;
|
|
177
182
|
}): Promise<void>;
|
|
178
183
|
//# sourceMappingURL=streams.d.ts.map
|
package/dist/streams.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../src/streams.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AA4C5B;;4FAE4F;AAC5F,eAAO,MAAM,oBAAoB,OAA8B,CAAC;AAEhE;;;;;;;;;0GAS0G;AAC1G,eAAO,MAAM,sBAAsB,QAAgC,CAAC;AAEpE;oFACoF;AACpF,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C;;;;;mHAKmH;AACnH,eAAO,MAAM,YAAY,QAAS,CAAC;AAEnC;;;oEAGoE;AACpE,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAE3C;;;8GAG8G;AAC9G,eAAO,MAAM,oBAAoB,QAAmB,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;+CAE+C;AAC/C,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;gGASgG;AAChG,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,cAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAkBxF;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,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
package/dist/streams.js
CHANGED
|
@@ -99,13 +99,25 @@ export async function createSpaceStreams(jsm, space) {
|
|
|
99
99
|
* agent binds it, and the bind would then fail permanently ("consumer not found"). Persisting
|
|
100
100
|
* it is the price of bind-only; explicit cleanup on agent-stop is a follow-up.
|
|
101
101
|
*/
|
|
102
|
-
export function dmDurableConfig(space, owner, actor, opts = {}) {
|
|
102
|
+
export function dmDurableConfig(space, owner, actor, lifecycleUid, opts = {}) {
|
|
103
|
+
// The DM SUBJECTS (`inst.>`) keep the alias grammar (SPEC §13.1 cross-plane scoping), so the
|
|
104
|
+
// lifecycle scoping lives in the consumer: the NAME carries the uid (exact-name deprovision) and
|
|
105
|
+
// delivery starts at the ACTIVATION FRONTIER — the DM stream sequence captured when this lifecycle
|
|
106
|
+
// was provisioned — so a same-alias successor inherits none of the predecessor's pending DMs
|
|
107
|
+
// (SPEC :467). `activationFrontier` = that captured `last_seq`; delivery begins at frontier+1.
|
|
108
|
+
// Callers that provision a genuinely fresh lifecycle pass the sequence they captured; 0 = from the
|
|
109
|
+
// stream start (an explicit choice, e.g. a stream created after the lifecycle in tests).
|
|
110
|
+
const frontier = opts.activationFrontier ?? 0;
|
|
111
|
+
if (!Number.isInteger(frontier) || frontier < 0)
|
|
112
|
+
throw new Error(`dmDurableConfig activationFrontier must be a non-negative integer, got ${String(frontier)}`);
|
|
103
113
|
const cfg = {
|
|
104
|
-
durable_name: dmDurable(owner, actor),
|
|
114
|
+
durable_name: dmDurable(owner, actor, lifecycleUid),
|
|
105
115
|
filter_subject: unicastRecvFilter(space, owner, actor), // inst.<owner>.<actor>.> — every DM to me
|
|
106
116
|
ack_policy: AckPolicy.Explicit,
|
|
107
117
|
ack_wait: nanos(opts.ackWaitMs ?? 60_000),
|
|
108
|
-
|
|
118
|
+
...(frontier > 0
|
|
119
|
+
? { deliver_policy: DeliverPolicy.StartSequence, opt_start_seq: frontier + 1 }
|
|
120
|
+
: { deliver_policy: DeliverPolicy.All }),
|
|
109
121
|
};
|
|
110
122
|
if (opts.inactiveThresholdMs)
|
|
111
123
|
cfg.inactive_threshold = nanos(opts.inactiveThresholdMs);
|
|
@@ -147,10 +159,12 @@ export function inboxReaderConfig(space, opts = {}) {
|
|
|
147
159
|
* native JetStream — the §8 "equivalent per-member at-least-once mechanism with the same ack
|
|
148
160
|
* semantics". `inactive_threshold` only for an open-mode self-create (none today; Plane-3 is
|
|
149
161
|
* auth-only). */
|
|
150
|
-
export function dlvDurableConfig(space, owner, actor, opts = {}) {
|
|
162
|
+
export function dlvDurableConfig(space, owner, actor, lifecycleUid, opts = {}) {
|
|
151
163
|
const cfg = {
|
|
152
|
-
durable_name: dlvDurable(owner, actor),
|
|
153
|
-
|
|
164
|
+
durable_name: dlvDurable(owner, actor, lifecycleUid),
|
|
165
|
+
// dlv subjects are lifecycle-scoped (SPEC §13.1/Appendix): the reader hands off to THIS
|
|
166
|
+
// lifecycle's subject, so the filter itself confines the successor — no frontier needed here.
|
|
167
|
+
filter_subject: dlvSubject(space, owner, actor, lifecycleUid),
|
|
154
168
|
ack_policy: AckPolicy.Explicit,
|
|
155
169
|
ack_wait: nanos(opts.ackWaitMs ?? 60_000),
|
|
156
170
|
deliver_policy: DeliverPolicy.All,
|
|
@@ -254,14 +268,17 @@ export async function clearChannel(opts) {
|
|
|
254
268
|
await nc.drain();
|
|
255
269
|
}
|
|
256
270
|
}
|
|
257
|
-
/** Delete a departed
|
|
258
|
-
* to {@link provisionAgent}. Removes exactly what the provisioner minted for THIS
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
271
|
+
/** Delete a departed agent LIFECYCLE's provisioning footprint (#159 Part B) — the teardown counterpart
|
|
272
|
+
* to {@link provisionAgent}. Removes exactly what the provisioner minted for THIS incarnation: its two
|
|
273
|
+
* bind-only durables (`dm_<o>-<a>-<uid>`, `dlv_<o>-<a>-<uid>`) and its lifecycle-keyed read-ACL row.
|
|
274
|
+
* Idempotent — a missing consumer / absent ACL row is a no-op (the agent may have exited before a
|
|
275
|
+
* durable was created, or a re-run). LIFECYCLE-EXACT by construction (SPEC §13.1): every name this
|
|
276
|
+
* deletes embeds the target uid, so a stale/replayed teardown for a retired lifecycle names only
|
|
277
|
+
* retired resources — it structurally cannot touch a same-alias successor, and the deprovisioner
|
|
278
|
+
* cred's exact-name grants make a wrong-uid delete broker-DENIED, not just a no-op.
|
|
262
279
|
*
|
|
263
280
|
* Does NOT touch the role-SHARED `svc_<role>` TASK durable (deleting it would break the role's other
|
|
264
|
-
* agents — it lives until space teardown), nor the ephemeral `
|
|
281
|
+
* agents — it lives until space teardown), nor the ephemeral `chathist_…-<uid>` history consumers (they
|
|
265
282
|
* self-clean on the agent's disconnect). The creds FILE is removed by the caller (a manager-local
|
|
266
283
|
* filesystem concern, not a broker one). Pass a TARGET-PINNED `deprovisioner` cred (see
|
|
267
284
|
* {@link mintCreds}); a bare connection (open mode) never calls this — an open mesh mints nothing. */
|
|
@@ -278,13 +295,13 @@ export async function deprovisionAgent(opts) {
|
|
|
278
295
|
});
|
|
279
296
|
try {
|
|
280
297
|
// The target is a full principal dot-form (user-mode agent) or a bare static actor id under the
|
|
281
|
-
// local owner
|
|
282
|
-
// names and the grant can't diverge.
|
|
283
|
-
const t = deprovisionTargetPrincipal(opts.targetId);
|
|
298
|
+
// local owner, PLUS the exact lifecycle uid being torn down — the SAME resolution the
|
|
299
|
+
// deprovisioner cred's permission pin used, so the delete names and the grant can't diverge.
|
|
300
|
+
const t = deprovisionTargetPrincipal({ principal: opts.targetId, lifecycleUid: opts.lifecycleUid });
|
|
284
301
|
const jsm = await jetstreamManager(nc);
|
|
285
|
-
await deleteConsumerIdempotent(jsm, dmStream(opts.space), dmDurable(t.owner, t.actor));
|
|
286
|
-
await deleteConsumerIdempotent(jsm, dlvStream(opts.space), dlvDurable(t.owner, t.actor));
|
|
287
|
-
await deleteAcl(await openAclRegistry(nc, opts.space), principalKey(t.owner, t.actor).key);
|
|
302
|
+
await deleteConsumerIdempotent(jsm, dmStream(opts.space), dmDurable(t.owner, t.actor, t.lifecycleUid));
|
|
303
|
+
await deleteConsumerIdempotent(jsm, dlvStream(opts.space), dlvDurable(t.owner, t.actor, t.lifecycleUid));
|
|
304
|
+
await deleteAcl(await openAclRegistry(nc, opts.space), principalKey(t.owner, t.actor).key, t.lifecycleUid);
|
|
288
305
|
}
|
|
289
306
|
finally {
|
|
290
307
|
await nc.drain();
|
package/dist/streams.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streams.js","sourceRoot":"","sources":["../src/streams.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,aAAa,GAGd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EACL,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,EACb,SAAS,EACT,YAAY,EACZ,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAE5B,+FAA+F;AAC/F,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B;;4FA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