@agent-blueprint-protocol/verifier 0.8.4 → 1.0.0-rc.2
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/CHANGELOG.md +139 -0
- package/LICENSE +1 -1
- package/NOTICE +2 -2
- package/README.md +143 -255
- package/dist/corpus/cases/blueprint-decode.json +1 -1
- package/dist/corpus/cases/bounds-new.json +1 -1
- package/dist/corpus/cases/bounds_algebra-intersect.json +1 -1
- package/dist/corpus/cases/canonicalization-encode.json +1 -1
- package/dist/corpus/cases/deployment-decode.json +1 -1
- package/dist/corpus/cases/extension-resolve.json +1 -1
- package/dist/corpus/cases/federation-decode.json +1 -1
- package/dist/corpus/cases/federation-verify_commitment.json +1 -1
- package/dist/corpus/cases/json-decode.json +1 -1
- package/dist/corpus/cases/negotiation-negotiate.json +1 -1
- package/dist/corpus/cases/predicate.json +1 -0
- package/dist/corpus/cases/reconcile.json +1 -0
- package/dist/corpus/cases/schema-validate_instance.json +1 -1
- package/dist/corpus/cases/signature-verify.json +1 -1
- package/dist/corpus/index.json +1 -1
- package/dist/release-history.json +1 -0
- package/dist/release-metadata.json +1 -1
- package/dist/spec/FOUNDATION-TRANSITION.md +67 -0
- package/dist/spec/IPR.md +27 -0
- package/dist/spec/LICENSE +190 -0
- package/dist/spec/NOTICE +4 -0
- package/dist/spec/README.md +47 -0
- package/dist/spec/conformance/base64url-decode.schema.json +176 -0
- package/dist/spec/conformance/blueprint-decode.schema.json +280 -0
- package/dist/spec/conformance/bounds-new.schema.json +302 -0
- package/dist/spec/conformance/bounds_algebra-intersect.schema.json +457 -0
- package/dist/spec/conformance/canonicalization-encode.schema.json +280 -0
- package/dist/spec/conformance/case-file.schema.json +122 -0
- package/dist/spec/conformance/certified-results.json +1 -0
- package/dist/spec/conformance/claim.schema.json +52 -0
- package/dist/spec/conformance/compatibility-verify.schema.json +262 -0
- package/dist/spec/conformance/deployment-decode.schema.json +322 -0
- package/dist/spec/conformance/digest-tagged.schema.json +200 -0
- package/dist/spec/conformance/evidence.schema.json +249 -0
- package/dist/spec/conformance/execution.md +80 -0
- package/dist/spec/conformance/extension-resolve.schema.json +264 -0
- package/dist/spec/conformance/federation-decode.schema.json +318 -0
- package/dist/spec/conformance/federation-verify_commitment.schema.json +342 -0
- package/dist/spec/conformance/index.schema.json +102 -0
- package/dist/spec/conformance/json-decode.schema.json +287 -0
- package/dist/spec/conformance/negotiation-negotiate.schema.json +264 -0
- package/dist/spec/conformance/portability-scan.schema.json +188 -0
- package/dist/spec/conformance/predicate.schema.json +201 -0
- package/dist/spec/conformance/reconcile.schema.json +287 -0
- package/dist/spec/conformance/runner.md +185 -0
- package/dist/spec/conformance/schema-validate_instance.schema.json +206 -0
- package/dist/spec/conformance/signature-verify.schema.json +224 -0
- package/dist/spec/conformance/support.schema.json +72 -0
- package/dist/spec/errata.md +13 -0
- package/dist/spec/grammar/blueprint.cddl +92 -0
- package/dist/spec/grammar/deployment.cddl +125 -0
- package/dist/spec/grammar/derived/blueprint.schema.json +340 -0
- package/dist/spec/grammar/derived/deployment.schema.json +496 -0
- package/dist/spec/grammar/derived/taskenvelope.schema.json +244 -0
- package/dist/spec/grammar/taskenvelope.cddl +77 -0
- package/dist/spec/protocol.md +1237 -0
- package/dist/spec/registry/OPERATIONS.md +78 -0
- package/dist/spec/registry/registry.json +23 -0
- package/dist/verifier/b64url.js +1 -1
- package/dist/verifier/blueprint.d.ts +2 -15
- package/dist/verifier/blueprint.js +21 -107
- package/dist/verifier/bounds_algebra.d.ts +9 -0
- package/dist/verifier/bounds_algebra.js +6 -6
- package/dist/verifier/cli.js +14 -31
- package/dist/verifier/corpus.d.ts +1 -1
- package/dist/verifier/corpus.js +5 -1
- package/dist/verifier/decode.js +15 -3
- package/dist/verifier/deployment.d.ts +8 -0
- package/dist/verifier/deployment.js +17 -2
- package/dist/verifier/digest.js +1 -1
- package/dist/verifier/errors.d.ts +2 -0
- package/dist/verifier/errors.js +1 -0
- package/dist/verifier/execution.d.ts +13 -0
- package/dist/verifier/execution.js +82 -0
- package/dist/verifier/facade.d.ts +311 -0
- package/dist/verifier/facade.js +78 -0
- package/dist/verifier/federation.d.ts +2 -2
- package/dist/verifier/federation.js +10 -7
- package/dist/verifier/harness.d.ts +16 -0
- package/dist/verifier/harness.js +201 -0
- package/dist/verifier/index.d.ts +3 -0
- package/dist/verifier/index.js +2 -0
- package/dist/verifier/mapping.d.ts +139 -0
- package/dist/verifier/mapping.js +1 -0
- package/dist/verifier/negotiation.d.ts +2 -1
- package/dist/verifier/negotiation.js +6 -3
- package/dist/verifier/plain.d.ts +4 -0
- package/dist/verifier/plain.js +38 -0
- package/dist/verifier/predicate.d.ts +7 -0
- package/dist/verifier/predicate.js +60 -1
- package/dist/verifier/reconcile.d.ts +37 -0
- package/dist/verifier/reconcile.js +115 -0
- package/dist/verifier/registry.js +9 -51
- package/dist/verifier/registry_engine.d.ts +3 -0
- package/dist/verifier/registry_engine.js +8 -8
- package/dist/verifier/results.d.ts +3 -0
- package/dist/verifier/results.js +13 -0
- package/dist/verifier/runner.d.ts +2 -0
- package/dist/verifier/runner.js +115 -16
- package/dist/verifier/signature.d.ts +17 -6
- package/dist/verifier/signature.js +41 -25
- package/package.json +17 -12
- package/dist/corpus/schemas/estate-contract.schema.json +0 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Registry operations process
|
|
2
|
+
|
|
3
|
+
The shipped registry contains the protocol's two federation registrations.
|
|
4
|
+
`registry.json` is its canonical source; the compiled Elixir and TypeScript
|
|
5
|
+
forms are bound to it by the registry equality check. Product and third-party
|
|
6
|
+
entries belong in the host support registry, not in these packages.
|
|
7
|
+
|
|
8
|
+
## Host registrations
|
|
9
|
+
|
|
10
|
+
A host supplies a namespace-keyed entry through `Negotiation.Support.registry`
|
|
11
|
+
in Elixir or `Support.registry` in TypeScript. Each entry declares criticality
|
|
12
|
+
and lifecycle state, and a critical entry pins the canonical schema digest.
|
|
13
|
+
The host supplies the schema document through `schemas`. Namespaces absent from
|
|
14
|
+
the shipped registry resolve from this input. Overrides for shipped entries
|
|
15
|
+
can change only lifecycle state; compiled criticality and schema pins prevail.
|
|
16
|
+
|
|
17
|
+
## Qualification
|
|
18
|
+
|
|
19
|
+
A registration request MUST provide: the namespace (reverse-DNS-plus-
|
|
20
|
+
path, not parseable as a network endpoint), an owner, the declared
|
|
21
|
+
criticality, and, for critical namespaces, a schema document whose JCS
|
|
22
|
+
digest is pinned. A request SHOULD state the A2A declaration URI.
|
|
23
|
+
Examples use generic reserved-domain identities.
|
|
24
|
+
|
|
25
|
+
## Registration steps
|
|
26
|
+
|
|
27
|
+
1. For a protocol-owned namespace, the owner submits the entry (and, for critical entries, the schema
|
|
28
|
+
document) as a change to `registry.json` and implements it in both
|
|
29
|
+
language packages.
|
|
30
|
+
2. The registry-equality check, corpus checks, and CI checks must pass.
|
|
31
|
+
Corpus verification fails when cases were generated for a different
|
|
32
|
+
registry state.
|
|
33
|
+
3. The change lands with a CHANGELOG entry and an ADR record when it
|
|
34
|
+
sets a precedent.
|
|
35
|
+
|
|
36
|
+
## Lifecycle
|
|
37
|
+
|
|
38
|
+
`reserved` → `active` → `deprecated` → `retired`. Promotion to a
|
|
39
|
+
critical declaration requires a protocol revision increment (the
|
|
40
|
+
digest-covered evolution rule); demotion does not. A retired namespace
|
|
41
|
+
is never reused. Deprecated entries retain verifiable artifacts with a
|
|
42
|
+
typed notice. Entries the release ships deprecate and never retire within
|
|
43
|
+
1.x. The retired state remains available for host-owned entries.
|
|
44
|
+
|
|
45
|
+
## Decision rights
|
|
46
|
+
|
|
47
|
+
The registry steward accepts registrations; the two-consumer
|
|
48
|
+
rule governs promotion into shared surfaces: a member or helper earns
|
|
49
|
+
a shared seat only when two independently verified consumers use it.
|
|
50
|
+
The registry carries published facts, never authority.
|
|
51
|
+
|
|
52
|
+
## MCP metadata registrations
|
|
53
|
+
|
|
54
|
+
A namespace carried as an MCP `_meta` key follows the grammar in
|
|
55
|
+
[MCP revision 2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28/basic#_meta).
|
|
56
|
+
This registry requires at least two prefix labels. Each begins with a
|
|
57
|
+
lowercase letter, ends with a lowercase letter or digit, and permits
|
|
58
|
+
lowercase letters, digits, and hyphens inside. The nonempty name begins and
|
|
59
|
+
ends with a lowercase letter or digit; its interior also permits lowercase
|
|
60
|
+
letters, digits, hyphens, underscores, and dots. These lowercase and
|
|
61
|
+
two-label restrictions are stricter than the MCP grammar. A prefix whose second label is `mcp` or `modelcontextprotocol` is
|
|
62
|
+
reserved. The registry equality gate checks registrations; artifact
|
|
63
|
+
decoding retains its revision 1 namespace grammar.
|
|
64
|
+
|
|
65
|
+
## Federation namespace
|
|
66
|
+
|
|
67
|
+
`io.github.baselabs/federation` is active and critical, with A2A URI
|
|
68
|
+
`https://baselabs.github.io/agent_blueprint_protocol/extensions/federation`.
|
|
69
|
+
It retains the schema pin of `com.example/federation`. Producers SHOULD
|
|
70
|
+
use the active namespace; both are supported. The deprecated spelling
|
|
71
|
+
emits `extension_deprecated` and is never retired in the 1.x line.
|
|
72
|
+
|
|
73
|
+
## Review and disputes
|
|
74
|
+
|
|
75
|
+
The maintainer evaluates namespace control, public owner identity, grammar,
|
|
76
|
+
criticality, schema digest reproducibility, compatibility, and test coverage.
|
|
77
|
+
Requests are reviewed on a best-effort basis, in the order received. An applicant can request reconsideration in the same public discussion. Unresolved disputes go to the registry steward with the evidence and requested change.
|
|
78
|
+
A dispute does not change a released registry entry.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "agent-blueprint-protocol-registry",
|
|
3
|
+
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"a2a_uri": "https://example.com/extensions/federation",
|
|
6
|
+
"criticality": "critical",
|
|
7
|
+
"namespace": "com.example/federation",
|
|
8
|
+
"owner": "Agent Blueprint Protocol",
|
|
9
|
+
"promoted_at_revision": null,
|
|
10
|
+
"schema_digest": "sha-256:NgfEJT8JXJqRMpQS5TVBQDrk97-PzUtbgnRgWc8Dki0",
|
|
11
|
+
"state": "deprecated"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"a2a_uri": "https://baselabs.github.io/agent_blueprint_protocol/extensions/federation",
|
|
15
|
+
"criticality": "critical",
|
|
16
|
+
"namespace": "io.github.baselabs/federation",
|
|
17
|
+
"owner": "Agent Blueprint Protocol",
|
|
18
|
+
"promoted_at_revision": null,
|
|
19
|
+
"schema_digest": "sha-256:NgfEJT8JXJqRMpQS5TVBQDrk97-PzUtbgnRgWc8Dki0",
|
|
20
|
+
"state": "active"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
package/dist/verifier/b64url.js
CHANGED
|
@@ -30,7 +30,7 @@ export function decodeStrict(input) {
|
|
|
30
30
|
return { ok: false, e: "base64url_invalid" };
|
|
31
31
|
return { ok: true, v: decoded };
|
|
32
32
|
}
|
|
33
|
-
const LENIENT = /^[A-Za-z0-9_-]+={0,2}
|
|
33
|
+
const LENIENT = /^(?:[A-Za-z0-9_-]+={0,2})?$/;
|
|
34
34
|
export function decodeLenient(input) {
|
|
35
35
|
if (typeof input !== "string")
|
|
36
36
|
return { ok: false, e: "invalid_type" };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Bounds } from "./bounds.ts";
|
|
2
|
-
import * as digest from "./digest.ts";
|
|
3
2
|
import { type Spec } from "./registry_engine.ts";
|
|
4
3
|
import type { Value } from "./value.ts";
|
|
5
4
|
export interface Blueprint {
|
|
@@ -48,18 +47,6 @@ export declare function contentDigest(blueprint: Blueprint): string | {
|
|
|
48
47
|
e: string;
|
|
49
48
|
};
|
|
50
49
|
export declare function verifyContentDigest(blueprint: Blueprint): VResult;
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
createdAt: string;
|
|
54
|
-
keyId: string;
|
|
55
|
-
purpose: "blueprint" | "deployment" | "federation-envelope";
|
|
56
|
-
}
|
|
57
|
-
export declare function signatureAttributes(entry: Value): {
|
|
58
|
-
ok: true;
|
|
59
|
-
v: SignatureAttributes;
|
|
60
|
-
} | {
|
|
61
|
-
ok: false;
|
|
62
|
-
e: string;
|
|
63
|
-
};
|
|
50
|
+
export declare function scan(value: Value, authoredNs: Set<string>): VResult;
|
|
51
|
+
export { attributes as signatureAttributes } from "./signature.ts";
|
|
64
52
|
export declare function validZFormDate(stamped: string): boolean;
|
|
65
|
-
export {};
|
|
@@ -2,10 +2,9 @@ import { isValue } from "./value.js";
|
|
|
2
2
|
// The Blueprint artifact — the mirror of AgentBlueprintProtocol.Blueprint:
|
|
3
3
|
// canonical verify → the 18-member registry table → the portability scan →
|
|
4
4
|
// the content-digest comparison, over the digest-covered members minus the
|
|
5
|
-
// evidence trio.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
import * as b64 from "./b64url.js";
|
|
5
|
+
// evidence trio. The artifact tables share the signature parser for
|
|
6
|
+
// attributes and purpose checks.
|
|
7
|
+
import { attributes as signatureAttributes } from "./signature.js";
|
|
9
8
|
import { coerce as coerceBounds, maximum as maxBounds } from "./bounds.js";
|
|
10
9
|
import * as canonical from "./canonical.js";
|
|
11
10
|
import * as digest from "./digest.js";
|
|
@@ -71,7 +70,7 @@ const SEGMENT = /^[a-z0-9][a-z0-9._-]*$/;
|
|
|
71
70
|
const Z_FORM = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/;
|
|
72
71
|
const CURRENCY = /^[A-Z]{3}$/;
|
|
73
72
|
const enumSet = (values) => new Set(values);
|
|
74
|
-
// ---- the 18-member table (
|
|
73
|
+
// ---- the 18-member table (protocol §2): data for the generic engine ---------------
|
|
75
74
|
function portElement() {
|
|
76
75
|
return {
|
|
77
76
|
kind: {
|
|
@@ -184,6 +183,7 @@ export function table() {
|
|
|
184
183
|
field("signatures", { array: { kind: "custom", check: checkSignatureEntry } }, {
|
|
185
184
|
required: false,
|
|
186
185
|
maxItems: CEILING_SIGNATURES,
|
|
186
|
+
check: checkSignatureIds,
|
|
187
187
|
}),
|
|
188
188
|
field("attestations", { array: { kind: "any" } }, {
|
|
189
189
|
required: false,
|
|
@@ -329,10 +329,20 @@ function checkSchemaDocument(value) {
|
|
|
329
329
|
// The purpose is the artifact's fact: the envelope parses AND must be
|
|
330
330
|
// "blueprint" here — a deployment-purpose signature riding a Blueprint is a
|
|
331
331
|
// wrong-position entry, denied as a table constraint.
|
|
332
|
+
function checkSignatureIds(value) {
|
|
333
|
+
if (value.t !== "arr")
|
|
334
|
+
return { ok: false, e: "invalid_type" };
|
|
335
|
+
const ids = value.v.flatMap((entry) => {
|
|
336
|
+
const attrs = entry?.t === "obj" ? keyfind(entry.v, "signed_attributes") : null;
|
|
337
|
+
const id = attrs?.t === "obj" ? keyfind(attrs.v, "key_id") : null;
|
|
338
|
+
return id?.t === "str" ? [id.v] : [];
|
|
339
|
+
});
|
|
340
|
+
return new Set(ids).size === ids.length ? { ok: true } : { ok: false, e: "invalid_constraint" };
|
|
341
|
+
}
|
|
332
342
|
function checkSignatureEntry(entry) {
|
|
333
343
|
const attrs = signatureAttributes(entry);
|
|
334
344
|
if (!attrs.ok)
|
|
335
|
-
return
|
|
345
|
+
return attrs;
|
|
336
346
|
return attrs.v.purpose === "blueprint" ? { ok: true } : { ok: false, e: "invalid_constraint" };
|
|
337
347
|
}
|
|
338
348
|
// The attestation kind registry is empty BY DESIGN; a non-empty array denies.
|
|
@@ -537,7 +547,9 @@ function memberArray(members, name) {
|
|
|
537
547
|
return found !== undefined && found.t === "arr" ? found.v : [];
|
|
538
548
|
}
|
|
539
549
|
// ---- the portability scan -----------------------------------------------------------
|
|
540
|
-
function scan(value, authoredNs) {
|
|
550
|
+
export function scan(value, authoredNs) {
|
|
551
|
+
if (!isValue(value) || value.t !== "obj" || !(authoredNs instanceof Set) || [...authoredNs].some(ns => typeof ns !== "string"))
|
|
552
|
+
return { ok: false, e: "invalid_type" };
|
|
541
553
|
if (value.t !== "obj")
|
|
542
554
|
return { ok: false, e: "invalid_type" };
|
|
543
555
|
const members = value.v;
|
|
@@ -690,106 +702,8 @@ function memberListOf(members, name) {
|
|
|
690
702
|
const found = keyfind(members, name);
|
|
691
703
|
return found !== null && found.t === "arr" ? found.v : [];
|
|
692
704
|
}
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
const HEADER_MEMBERS = ["alg", "b64", "crit", "kid"];
|
|
696
|
-
const ATTR_MEMBERS = ["algorithm", "content_digest", "created_at", "key_id", "purpose"];
|
|
697
|
-
function malformed() {
|
|
698
|
-
return { ok: false, e: "signature_malformed" };
|
|
699
|
-
}
|
|
700
|
-
export function signatureAttributes(entry) {
|
|
701
|
-
if (!isValue(entry))
|
|
702
|
-
return { ok: false, e: "invalid_type" };
|
|
703
|
-
if (entry.t !== "obj")
|
|
704
|
-
return malformed();
|
|
705
|
-
const entryPairs = entry.v;
|
|
706
|
-
const entryNames = entryPairs.map(([name]) => name).sort();
|
|
707
|
-
if (entryNames.length !== 3 ||
|
|
708
|
-
entryNames.join("\u0000") !== ENTRY_MEMBERS.join("\u0000")) {
|
|
709
|
-
return malformed();
|
|
710
|
-
}
|
|
711
|
-
const header = keyfind(entryPairs, "protected");
|
|
712
|
-
const attrs = keyfind(entryPairs, "signed_attributes");
|
|
713
|
-
const signatureBody = keyfind(entryPairs, "signature");
|
|
714
|
-
// Header: exactly {alg, b64, crit, kid}; the one algorithm-unsupported
|
|
715
|
-
// denial fires only when alg is a string naming another algorithm.
|
|
716
|
-
if (header.t !== "obj")
|
|
717
|
-
return malformed();
|
|
718
|
-
const headerNames = header.v.map(([name]) => name).sort();
|
|
719
|
-
if (headerNames.length !== 4 || headerNames.join("\u0000") !== HEADER_MEMBERS.join("\u0000")) {
|
|
720
|
-
return malformed();
|
|
721
|
-
}
|
|
722
|
-
const alg = keyfind(header.v, "alg");
|
|
723
|
-
if (alg.t === "str" && alg.v !== "EdDSA") {
|
|
724
|
-
return { ok: false, e: "signature_algorithm_unsupported" };
|
|
725
|
-
}
|
|
726
|
-
if (alg.t !== "str")
|
|
727
|
-
return malformed();
|
|
728
|
-
const b64Flag = keyfind(header.v, "b64");
|
|
729
|
-
if (b64Flag.t !== "bool" || b64Flag.v !== false)
|
|
730
|
-
return malformed();
|
|
731
|
-
const crit = keyfind(header.v, "crit");
|
|
732
|
-
if (crit.t !== "arr" ||
|
|
733
|
-
crit.v.length !== 1 ||
|
|
734
|
-
crit.v[0].t !== "str" ||
|
|
735
|
-
crit.v[0].v !== "b64") {
|
|
736
|
-
return malformed();
|
|
737
|
-
}
|
|
738
|
-
const kid = keyfind(header.v, "kid");
|
|
739
|
-
if (kid.t !== "str" || kid.v === "")
|
|
740
|
-
return malformed();
|
|
741
|
-
// Attributes: exactly the five closed members.
|
|
742
|
-
if (attrs.t !== "obj")
|
|
743
|
-
return malformed();
|
|
744
|
-
const attrNames = attrs.v.map(([name]) => name).sort();
|
|
745
|
-
if (attrNames.length !== 5 || attrNames.join("\u0000") !== ATTR_MEMBERS.join("\u0000")) {
|
|
746
|
-
return malformed();
|
|
747
|
-
}
|
|
748
|
-
const algorithm = keyfind(attrs.v, "algorithm");
|
|
749
|
-
if (algorithm.t === "str" && algorithm.v !== "Ed25519") {
|
|
750
|
-
return { ok: false, e: "signature_algorithm_unsupported" };
|
|
751
|
-
}
|
|
752
|
-
if (algorithm.t !== "str")
|
|
753
|
-
return malformed();
|
|
754
|
-
const contentDigest = keyfind(attrs.v, "content_digest");
|
|
755
|
-
if (contentDigest.t !== "str" || !digest.fromTagged(contentDigest.v).ok)
|
|
756
|
-
return malformed();
|
|
757
|
-
const createdAt = keyfind(attrs.v, "created_at");
|
|
758
|
-
if (createdAt.t !== "str" || !Z_FORM.test(createdAt.v) || !validZFormDate(createdAt.v)) {
|
|
759
|
-
return malformed();
|
|
760
|
-
}
|
|
761
|
-
const keyId = keyfind(attrs.v, "key_id");
|
|
762
|
-
if (keyId.t !== "str" || keyId.v === "" || keyId.v.includes("."))
|
|
763
|
-
return malformed();
|
|
764
|
-
const purpose = keyfind(attrs.v, "purpose");
|
|
765
|
-
if (purpose.t !== "str" || !PURPOSES.has(purpose.v))
|
|
766
|
-
return malformed();
|
|
767
|
-
if (kid.v !== keyId.v)
|
|
768
|
-
return malformed();
|
|
769
|
-
if (signatureBody.t !== "str")
|
|
770
|
-
return malformed();
|
|
771
|
-
const decodedSignature = b64.decodeStrict(signatureBody.v);
|
|
772
|
-
if (!decodedSignature.ok || decodedSignature.v.length !== 64)
|
|
773
|
-
return malformed();
|
|
774
|
-
// canonical_input: both halves must re-encode (invalid UTF-8 in a
|
|
775
|
-
// hand-built entry denies malformed).
|
|
776
|
-
const headerJson = canonical.encode(header);
|
|
777
|
-
const attrsJson = canonical.encode(attrs);
|
|
778
|
-
if (!headerJson.ok || !attrsJson.ok)
|
|
779
|
-
return malformed();
|
|
780
|
-
const parsedDigest = digest.fromTagged(contentDigest.v);
|
|
781
|
-
if (!parsedDigest.ok)
|
|
782
|
-
return malformed();
|
|
783
|
-
return {
|
|
784
|
-
ok: true,
|
|
785
|
-
v: {
|
|
786
|
-
contentDigest: parsedDigest.v,
|
|
787
|
-
createdAt: createdAt.v,
|
|
788
|
-
keyId: keyId.v,
|
|
789
|
-
purpose: purpose.v,
|
|
790
|
-
},
|
|
791
|
-
};
|
|
792
|
-
}
|
|
705
|
+
// Artifact tables and receipt checks use the signature module's parser.
|
|
706
|
+
export { attributes as signatureAttributes } from "./signature.js";
|
|
793
707
|
// DateTime.from_iso8601's field validation for the Z whole-second form.
|
|
794
708
|
export function validZFormDate(stamped) {
|
|
795
709
|
if (typeof stamped !== "string")
|
|
@@ -23,5 +23,14 @@ export declare function intersect(blueprint: Record<string, unknown>, deployment
|
|
|
23
23
|
} | {
|
|
24
24
|
ok: false;
|
|
25
25
|
e: string;
|
|
26
|
+
subject?: (string | number)[];
|
|
27
|
+
};
|
|
28
|
+
export declare function buildSet(raw: Record<string, unknown>): {
|
|
29
|
+
ok: true;
|
|
30
|
+
v: Record<string, BoundValue>;
|
|
31
|
+
} | {
|
|
32
|
+
ok: false;
|
|
33
|
+
e: string;
|
|
34
|
+
subject?: (string | number)[];
|
|
26
35
|
};
|
|
27
36
|
export {};
|
|
@@ -77,7 +77,7 @@ export function intersect(blueprint, deployment, host, posture) {
|
|
|
77
77
|
return cost.currency;
|
|
78
78
|
});
|
|
79
79
|
if (new Set(currencies).size !== 1) {
|
|
80
|
-
return { ok: false, e: "bound_unit_mismatch" };
|
|
80
|
+
return { ok: false, e: "bound_unit_mismatch", subject: ["max_cost"] };
|
|
81
81
|
}
|
|
82
82
|
return compose(sources, posture);
|
|
83
83
|
}
|
|
@@ -86,7 +86,7 @@ export function intersect(blueprint, deployment, host, posture) {
|
|
|
86
86
|
// The TS runner passes corpus bound-set objects through verbatim (the Elixir
|
|
87
87
|
// runner pre-filters unknown member names to :invalid_type at add_bound_entry;
|
|
88
88
|
// here that delegated filter runs first, then BoundSet.new's value checks).
|
|
89
|
-
function buildSet(raw) {
|
|
89
|
+
export function buildSet(raw) {
|
|
90
90
|
if (!isPlainObject(raw))
|
|
91
91
|
return { ok: false, e: "invalid_type" };
|
|
92
92
|
const out = {};
|
|
@@ -95,7 +95,7 @@ function buildSet(raw) {
|
|
|
95
95
|
return { ok: false, e: "invalid_type" };
|
|
96
96
|
const built = buildBound(name, value);
|
|
97
97
|
if (!built.ok)
|
|
98
|
-
return built;
|
|
98
|
+
return { ...built, subject: [name] };
|
|
99
99
|
out[name] = built.v;
|
|
100
100
|
}
|
|
101
101
|
return { ok: true, v: out };
|
|
@@ -159,7 +159,7 @@ function totalOf(sources) {
|
|
|
159
159
|
const expected = new Set(NAMES);
|
|
160
160
|
const extra = [...present].filter((name) => !expected.has(name));
|
|
161
161
|
if (extra.length > 0)
|
|
162
|
-
return { ok: false, e: "bound_unknown" };
|
|
162
|
+
return { ok: false, e: "bound_unknown", subject: ["bound_set"] };
|
|
163
163
|
if (present.size === expected.size && NAMES.every((n) => present.has(n))) {
|
|
164
164
|
// re-validate present values (bypassed-set parity)
|
|
165
165
|
for (const name of NAMES) {
|
|
@@ -177,7 +177,7 @@ function totalOf(sources) {
|
|
|
177
177
|
return rebuilt;
|
|
178
178
|
}
|
|
179
179
|
else {
|
|
180
|
-
return { ok: false, e: TABLE[name].cls === "operational" ? "missing_ceiling" : "bound_source_missing" };
|
|
180
|
+
return { ok: false, e: TABLE[name].cls === "operational" ? "missing_ceiling" : "bound_source_missing", subject: [name] };
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
}
|
|
@@ -202,7 +202,7 @@ function compose(sources, posture) {
|
|
|
202
202
|
continue;
|
|
203
203
|
}
|
|
204
204
|
if (def.cls === "protected" && posture === "deny") {
|
|
205
|
-
return { ok: false, e: "protected_bound_clamp_denied" };
|
|
205
|
+
return { ok: false, e: "protected_bound_clamp_denied", subject: [name] };
|
|
206
206
|
}
|
|
207
207
|
clamps.push({
|
|
208
208
|
field: name,
|
package/dist/verifier/cli.js
CHANGED
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
// IO.binwrite parity). Exit 3 marks an internal invariant (outside the
|
|
7
7
|
// 0/1/2 contract, exactly as an escript crash is — loud, never laundered
|
|
8
8
|
// into "disagreement").
|
|
9
|
+
import { resultsDocument, canonical } from "./results.js";
|
|
10
|
+
import { serve } from "./execution.js";
|
|
11
|
+
import { runHarness } from "./harness.js";
|
|
9
12
|
import { readdirSync, readFileSync, lstatSync, openSync, closeSync, readSync, fstatSync } from "node:fs";
|
|
10
13
|
import { join, relative, sep } from "node:path";
|
|
11
|
-
import { member } from "./corpus.js";
|
|
12
14
|
import { load, loadPriorCensus } from "./corpus.js";
|
|
13
15
|
import { encode } from "./canonical.js";
|
|
14
16
|
import { toBytes } from "./report.js";
|
|
@@ -17,7 +19,7 @@ import { decode as decodeBlueprint } from "./blueprint.js";
|
|
|
17
19
|
import { decode as decodeDeployment } from "./deployment.js";
|
|
18
20
|
import { decode as decodeEnvelope } from "./federation.js";
|
|
19
21
|
import { obj, str } from "./value.js";
|
|
20
|
-
const USAGE = `usage: agent-blueprint-protocol [--corpus <dir> | --prior-corpus <dir> | --artifact <file> | --help | --version]
|
|
22
|
+
const USAGE = `usage: agent-blueprint-protocol [--corpus <dir> | --prior-corpus <dir> | --artifact <file> | --results --corpus <dir> | --serve --corpus <dir> | conformance run <options> -- <command...> | --help | --version]
|
|
21
23
|
No arguments: verify the installed release's embedded corpus.
|
|
22
24
|
--corpus <dir>: verify a corpus and report agreement.
|
|
23
25
|
--prior-corpus <dir>: replay a released corpus under current verification.
|
|
@@ -38,7 +40,12 @@ function releaseMetadata() {
|
|
|
38
40
|
}
|
|
39
41
|
throw new Error("release metadata missing");
|
|
40
42
|
}
|
|
41
|
-
function main(argv) {
|
|
43
|
+
async function main(argv) {
|
|
44
|
+
if (argv[0] === "conformance" && argv[1] === "run")
|
|
45
|
+
return runHarness(argv.slice(2), readCorpus, releaseMetadata());
|
|
46
|
+
const mode = argv[0] === "--results" ? "results" : argv[0] === "--serve" ? "serve" : "report";
|
|
47
|
+
if (mode !== "report")
|
|
48
|
+
argv = argv.slice(1);
|
|
42
49
|
if (argv.length === 1 && argv[0] === "--help") {
|
|
43
50
|
process.stdout.write(USAGE + "\n");
|
|
44
51
|
return 0;
|
|
@@ -76,41 +83,17 @@ function main(argv) {
|
|
|
76
83
|
process.stderr.write("corpus integrity failure: :" + corpus.e + "\n");
|
|
77
84
|
return 2;
|
|
78
85
|
}
|
|
79
|
-
if (!corpus.v.cases.every((file) => file.cases.every(readerInput))) {
|
|
80
|
-
process.stderr.write("corpus integrity failure: :invalid_type\n");
|
|
81
|
-
return 2;
|
|
82
|
-
}
|
|
83
86
|
const certified = corpus.v.identity === releaseMetadata().corpus_digest ? "matches" : "does not match";
|
|
84
87
|
process.stderr.write(`corpus digest ${certified} the release-certified corpus\n`);
|
|
88
|
+
if (mode === "serve")
|
|
89
|
+
return serve(corpus.v);
|
|
85
90
|
const results = run(corpus.v);
|
|
86
91
|
const bytes = toBytes(corpus.v.identity, results);
|
|
87
92
|
// exitCode (not process.exit) so piped stdout drains before exit.
|
|
88
|
-
process.stdout.write(bytes);
|
|
93
|
+
process.stdout.write(mode === "results" ? canonical(resultsDocument(corpus.v)) : bytes);
|
|
89
94
|
const agreed = results.flat().filter((r) => r.agree).length;
|
|
90
95
|
return agreed === results.flat().length && agreed > 0 ? 0 : 1;
|
|
91
96
|
}
|
|
92
|
-
function fieldShape(input, key, predicate) {
|
|
93
|
-
const value = member(input, key);
|
|
94
|
-
return value === null || predicate(value);
|
|
95
|
-
}
|
|
96
|
-
function readerInput(row) {
|
|
97
|
-
const input = row.input;
|
|
98
|
-
if (row.surface === "negotiation.negotiate" || row.surface === "extension.resolve") {
|
|
99
|
-
const support = member(input, "support");
|
|
100
|
-
if (support === null || support.t === "null")
|
|
101
|
-
return true;
|
|
102
|
-
if (support.t !== "obj")
|
|
103
|
-
return false;
|
|
104
|
-
return ["revisions", "core_fields"].every((key) => fieldShape(support, key, (v) => v.t === "arr")) &&
|
|
105
|
-
fieldShape(support, "schemas", (v) => v.t === "obj") &&
|
|
106
|
-
fieldShape(support, "registry", (v) => v.t === "obj" && v.v.every(([, entry]) => entry.t === "obj"));
|
|
107
|
-
}
|
|
108
|
-
if (row.surface === "bounds_algebra.intersect") {
|
|
109
|
-
return ["blueprint", "deployment", "host"].every((key) => fieldShape(input, key, (v) => v.t === "obj" && v.v.every(([, bound]) => bound.t !== "obj" || member(bound, "ordinal") === null ||
|
|
110
|
-
fieldShape(bound, "markers", (markers) => markers.t === "arr"))));
|
|
111
|
-
}
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
97
|
// Single-artifact mode — a kit-side convenience the escript deliberately
|
|
115
98
|
// does NOT mirror (its CLI contract stays --corpus-only, so a vacuous run
|
|
116
99
|
// stays impossible there). One artifact file, verified against all three
|
|
@@ -216,7 +199,7 @@ function readCorpus(dir) {
|
|
|
216
199
|
return map;
|
|
217
200
|
}
|
|
218
201
|
try {
|
|
219
|
-
process.exitCode = main(process.argv.slice(2));
|
|
202
|
+
process.exitCode = await main(process.argv.slice(2));
|
|
220
203
|
}
|
|
221
204
|
catch (error) {
|
|
222
205
|
process.stderr.write("verifier internal error: " + error.message + "\n");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Value } from "./value.ts";
|
|
2
|
-
export declare const SURFACES: readonly ["json.decode", "canonicalization.encode", "base64url.decode", "digest.tagged", "signature.verify", "schema.validate_instance", "blueprint.decode", "deployment.decode", "negotiation.negotiate", "extension.resolve", "bounds.new", "bounds_algebra.intersect", "portability.scan", "compatibility.verify", "federation.decode", "federation.verify_commitment"];
|
|
2
|
+
export declare const SURFACES: readonly ["reconcile", "predicate", "json.decode", "canonicalization.encode", "base64url.decode", "digest.tagged", "signature.verify", "schema.validate_instance", "blueprint.decode", "deployment.decode", "negotiation.negotiate", "extension.resolve", "bounds.new", "bounds_algebra.intersect", "portability.scan", "compatibility.verify", "federation.decode", "federation.verify_commitment"];
|
|
3
3
|
export declare const CLASSES: readonly ["valid", "boundary_near", "exact_bound", "maximum_plus_one", "invalid_encoding", "invalid_duplicate", "invalid_type", "invalid_constraint", "invalid_cardinality", "unknown_member", "tamper_meaningful_byte", "digest_mismatch", "signature_invalid", "revision_above_max", "revision_below_min", "required_field_unsupported", "required_field_not_covered", "extension_unknown_critical", "extension_unknown_optional_roundtrip", "extension_criticality_conflict", "extension_schema_unavailable", "extension_deprecated_retained", "bound_widening_operational", "bound_widening_protected", "forbidden_portable_value", "compatibility_range_rejected", "binding_stale", "federation_state_unmappable", "federation_terminal_conflict", "audience_mismatch", "terminal_equivocation"];
|
|
4
4
|
export interface LoadedCorpus {
|
|
5
5
|
index: Value;
|
package/dist/verifier/corpus.js
CHANGED
|
@@ -25,6 +25,8 @@ import { registryDigest } from "./registry.js";
|
|
|
25
25
|
const INDEX_FORMAT = "agent-blueprint-protocol-conformance-corpus-index";
|
|
26
26
|
const CASE_FILE_FORMAT = "agent-blueprint-protocol-conformance-cases";
|
|
27
27
|
export const SURFACES = [
|
|
28
|
+
"reconcile",
|
|
29
|
+
"predicate",
|
|
28
30
|
"json.decode",
|
|
29
31
|
"canonicalization.encode",
|
|
30
32
|
"base64url.decode",
|
|
@@ -75,9 +77,11 @@ export const CLASSES = [
|
|
|
75
77
|
"audience_mismatch",
|
|
76
78
|
"terminal_equivocation",
|
|
77
79
|
];
|
|
78
|
-
// The pinned
|
|
80
|
+
// The pinned 18×31 floor: per surface, required classes + the falsifiable
|
|
79
81
|
// n_a reason covering its complement.
|
|
80
82
|
const FLOOR = {
|
|
83
|
+
reconcile: { required: ["valid", "invalid_type", "digest_mismatch", "revision_above_max", "unknown_member", "forbidden_portable_value", "signature_invalid", "binding_stale", "bound_widening_protected"], n_a: "byte codecs, schema and federation checks have their own surfaces" },
|
|
84
|
+
predicate: { required: ["valid", "invalid_type", "invalid_constraint", "invalid_cardinality", "maximum_plus_one", "exact_bound"], n_a: "artifact, signature, bounds and federation checks do not reach predicates" },
|
|
81
85
|
"json.decode": {
|
|
82
86
|
required: [
|
|
83
87
|
"valid",
|
package/dist/verifier/decode.js
CHANGED
|
@@ -79,7 +79,7 @@ class Scanner {
|
|
|
79
79
|
const value = this.parseValue();
|
|
80
80
|
this.skipWs();
|
|
81
81
|
if (!this.eof())
|
|
82
|
-
throw new
|
|
82
|
+
throw new CodeFail("trailing_bytes");
|
|
83
83
|
this.bumpNodes();
|
|
84
84
|
return this.sink(value);
|
|
85
85
|
}
|
|
@@ -113,8 +113,11 @@ class Scanner {
|
|
|
113
113
|
}
|
|
114
114
|
// Containers guard depth at ENTRY (live depth, root container = 1).
|
|
115
115
|
parseArray() {
|
|
116
|
-
this.enter();
|
|
117
116
|
this.pos++; // '['
|
|
117
|
+
this.skipWs();
|
|
118
|
+
if (this.eof())
|
|
119
|
+
throw new SyntaxFail();
|
|
120
|
+
this.enter();
|
|
118
121
|
const items = [];
|
|
119
122
|
this.skipWs();
|
|
120
123
|
if (!this.eof() && this.peek() === 0x5d) {
|
|
@@ -125,6 +128,9 @@ class Scanner {
|
|
|
125
128
|
for (;;) {
|
|
126
129
|
this.skipWs();
|
|
127
130
|
const element = this.parseValue();
|
|
131
|
+
this.skipWs();
|
|
132
|
+
if (this.eof() || (this.peek() !== 0x2c && this.peek() !== 0x5d))
|
|
133
|
+
throw new SyntaxFail();
|
|
128
134
|
this.guard(items.length + 1, this.bounds.items, "items");
|
|
129
135
|
this.bumpNodes();
|
|
130
136
|
items.push(this.sink(element));
|
|
@@ -144,8 +150,11 @@ class Scanner {
|
|
|
144
150
|
}
|
|
145
151
|
}
|
|
146
152
|
parseObject() {
|
|
147
|
-
this.enter();
|
|
148
153
|
this.pos++; // '{'
|
|
154
|
+
this.skipWs();
|
|
155
|
+
if (this.eof())
|
|
156
|
+
throw new SyntaxFail();
|
|
157
|
+
this.enter();
|
|
149
158
|
const members = [];
|
|
150
159
|
this.skipWs();
|
|
151
160
|
if (!this.eof() && this.peek() === 0x7d) {
|
|
@@ -164,6 +173,9 @@ class Scanner {
|
|
|
164
173
|
this.pos++;
|
|
165
174
|
this.skipWs();
|
|
166
175
|
const value = this.parseValue();
|
|
176
|
+
this.skipWs();
|
|
177
|
+
if (this.eof() || (this.peek() !== 0x2c && this.peek() !== 0x7d))
|
|
178
|
+
throw new SyntaxFail();
|
|
167
179
|
this.guard(members.length + 1, this.bounds.members, "members");
|
|
168
180
|
if (Buffer.byteLength(key, "utf8") > this.bounds.key) {
|
|
169
181
|
throw new CodeFail("ceiling:key");
|
|
@@ -15,6 +15,7 @@ type VResult = {
|
|
|
15
15
|
} | {
|
|
16
16
|
ok: false;
|
|
17
17
|
e: string;
|
|
18
|
+
subject?: (string | number)[];
|
|
18
19
|
};
|
|
19
20
|
export declare function table(): Spec[];
|
|
20
21
|
export declare function decode(bytes: Buffer | string | symbol, bounds?: Bounds | Record<string, unknown>): {
|
|
@@ -23,6 +24,7 @@ export declare function decode(bytes: Buffer | string | symbol, bounds?: Bounds
|
|
|
23
24
|
} | {
|
|
24
25
|
ok: false;
|
|
25
26
|
e: string;
|
|
27
|
+
subject?: (string | number)[];
|
|
26
28
|
};
|
|
27
29
|
export declare function fromValue(value: Value, opts?: {
|
|
28
30
|
authoredExtensions?: string[];
|
|
@@ -32,14 +34,17 @@ export declare function fromValue(value: Value, opts?: {
|
|
|
32
34
|
} | {
|
|
33
35
|
ok: false;
|
|
34
36
|
e: string;
|
|
37
|
+
subject?: (string | number)[];
|
|
35
38
|
};
|
|
36
39
|
export declare function toValue(deployment: Deployment): Value | {
|
|
37
40
|
ok: false;
|
|
38
41
|
e: string;
|
|
42
|
+
subject?: (string | number)[];
|
|
39
43
|
};
|
|
40
44
|
export declare function digestInput(deployment: Deployment): Value | {
|
|
41
45
|
ok: false;
|
|
42
46
|
e: string;
|
|
47
|
+
subject?: (string | number)[];
|
|
43
48
|
};
|
|
44
49
|
export declare function canonicalBytes(deployment: Deployment): {
|
|
45
50
|
ok: true;
|
|
@@ -47,12 +52,15 @@ export declare function canonicalBytes(deployment: Deployment): {
|
|
|
47
52
|
} | {
|
|
48
53
|
ok: false;
|
|
49
54
|
e: string;
|
|
55
|
+
subject?: (string | number)[];
|
|
50
56
|
};
|
|
51
57
|
export declare function contentDigest(deployment: Deployment): string | {
|
|
52
58
|
ok: false;
|
|
53
59
|
e: string;
|
|
60
|
+
subject?: (string | number)[];
|
|
54
61
|
};
|
|
55
62
|
export declare function verifyContentDigest(deployment: Deployment): VResult;
|
|
56
63
|
export declare function verifyBinding(deployment: Deployment, bound: blueprint.Blueprint, obs: Observations): VResult;
|
|
64
|
+
export declare function scan(value: Value, authoredNs: Set<string>): VResult;
|
|
57
65
|
export declare function parseTimestamp(stamped: string): number | null;
|
|
58
66
|
export {};
|
|
@@ -228,6 +228,7 @@ export function table() {
|
|
|
228
228
|
field("signatures", { array: { kind: "custom", check: checkSignatureEntry } }, {
|
|
229
229
|
required: false,
|
|
230
230
|
maxItems: CEILING_SIGNATURES,
|
|
231
|
+
check: checkSignatureIds,
|
|
231
232
|
}),
|
|
232
233
|
field("attestations", { array: { kind: "any" } }, {
|
|
233
234
|
required: false,
|
|
@@ -465,6 +466,8 @@ function stageRecovery(deployment, bindings, bound) {
|
|
|
465
466
|
function stageStaleness(bindings, obs) {
|
|
466
467
|
if (obs.now === null)
|
|
467
468
|
return { ok: true };
|
|
469
|
+
if (typeof obs.now !== "string")
|
|
470
|
+
return { ok: false, e: "invalid_type" };
|
|
468
471
|
const now = parseTimestamp(obs.now);
|
|
469
472
|
if (now === null)
|
|
470
473
|
return { ok: true }; // parse_time parity: undecodable now skips
|
|
@@ -663,10 +666,20 @@ function checkRequiredCoreFields(value) {
|
|
|
663
666
|
}
|
|
664
667
|
// The purpose is this artifact's fact: the envelope parses AND must be
|
|
665
668
|
// "deployment" here.
|
|
669
|
+
function checkSignatureIds(value) {
|
|
670
|
+
if (value.t !== "arr")
|
|
671
|
+
return { ok: false, e: "invalid_type" };
|
|
672
|
+
const ids = value.v.flatMap((entry) => {
|
|
673
|
+
const attrs = entry?.t === "obj" ? keyfind(entry.v, "signed_attributes") : null;
|
|
674
|
+
const id = attrs?.t === "obj" ? keyfind(attrs.v, "key_id") : null;
|
|
675
|
+
return id?.t === "str" ? [id.v] : [];
|
|
676
|
+
});
|
|
677
|
+
return new Set(ids).size === ids.length ? { ok: true } : { ok: false, e: "invalid_constraint" };
|
|
678
|
+
}
|
|
666
679
|
function checkSignatureEntry(entry) {
|
|
667
680
|
const attrs = blueprint.signatureAttributes(entry);
|
|
668
681
|
if (!attrs.ok)
|
|
669
|
-
return
|
|
682
|
+
return attrs;
|
|
670
683
|
return attrs.v.purpose === "deployment" ? { ok: true } : { ok: false, e: "invalid_constraint" };
|
|
671
684
|
}
|
|
672
685
|
// An eligibility expression: any non-empty JSON object — the host's policy
|
|
@@ -761,7 +774,9 @@ function checkExactVersion(value) {
|
|
|
761
774
|
return { ok: true };
|
|
762
775
|
}
|
|
763
776
|
// ---- the portability scan ---------------------------------------------------------------
|
|
764
|
-
function scan(value, authoredNs) {
|
|
777
|
+
export function scan(value, authoredNs) {
|
|
778
|
+
if (!isValue(value) || value.t !== "obj" || !(authoredNs instanceof Set) || [...authoredNs].some(ns => typeof ns !== "string"))
|
|
779
|
+
return { ok: false, e: "invalid_type" };
|
|
765
780
|
if (value.t !== "obj")
|
|
766
781
|
return { ok: false, e: "invalid_type" };
|
|
767
782
|
const members = value.v;
|