@ixo/domain.md 0.3.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/LICENSE +201 -0
- package/NOTICE +6 -0
- package/README.md +30 -0
- package/assets/domain-md.schema.json +1103 -0
- package/assets/oracle-capsule-jcs-vectors.json +57 -0
- package/assets/oracle-capsule-manifest-contract.md +72 -0
- package/assets/oracle-capsule-source-lock.schema.json +45 -0
- package/assets/oracle-capsule.schema.json +265 -0
- package/assets/rules.json +275 -0
- package/assets/spec.md +1434 -0
- package/assets/template-manifest.schema.json +57 -0
- package/dist/capsule/index.d.ts +75 -0
- package/dist/capsule/index.js +20 -0
- package/dist/capsule/index.js.map +1 -0
- package/dist/chunk-BYBC2TSS.js +597 -0
- package/dist/chunk-BYBC2TSS.js.map +1 -0
- package/dist/chunk-G7PZJYAJ.js +31826 -0
- package/dist/chunk-G7PZJYAJ.js.map +1 -0
- package/dist/chunk-R6QZRNEX.js +164 -0
- package/dist/chunk-R6QZRNEX.js.map +1 -0
- package/dist/chunk-T3STBWXP.js +46 -0
- package/dist/chunk-T3STBWXP.js.map +1 -0
- package/dist/chunk-W7MRQP7I.js +862 -0
- package/dist/chunk-W7MRQP7I.js.map +1 -0
- package/dist/chunk-XDIWMZVF.js +1150 -0
- package/dist/chunk-XDIWMZVF.js.map +1 -0
- package/dist/cli-KcUIQEiE.d.ts +171 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +400 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +83 -0
- package/dist/index.js.map +1 -0
- package/dist/resolver-B3mwnjJq.d.ts +96 -0
- package/dist/spec.d.ts +20 -0
- package/dist/spec.js +23 -0
- package/dist/spec.js.map +1 -0
- package/dist/templates/index.d.ts +7 -0
- package/dist/templates/index.js +24 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/workers-Dr8B8a2O.d.ts +19 -0
- package/dist/workers.d.ts +3 -0
- package/dist/workers.js +31 -0
- package/dist/workers.js.map +1 -0
- package/package.json +97 -0
- package/src/capsule/canonical.ts +74 -0
- package/src/capsule/index.ts +10 -0
- package/src/capsule/json.ts +373 -0
- package/src/capsule/types.ts +63 -0
- package/src/capsule/validate.ts +551 -0
- package/src/cli.ts +405 -0
- package/src/compiled-validators.d.ts +7 -0
- package/src/compiled-validators.js +32512 -0
- package/src/constants.ts +250 -0
- package/src/diff.ts +111 -0
- package/src/export.ts +28 -0
- package/src/index.ts +36 -0
- package/src/lint.ts +42 -0
- package/src/parser.ts +174 -0
- package/src/sarif.ts +49 -0
- package/src/semantic.ts +1156 -0
- package/src/spec.ts +48 -0
- package/src/templates/errors.ts +3 -0
- package/src/templates/index.ts +11 -0
- package/src/templates/manifest.ts +94 -0
- package/src/templates/render.ts +435 -0
- package/src/templates/resolver.ts +200 -0
- package/src/templates/types.ts +98 -0
- package/src/types.ts +195 -0
- package/src/workers.ts +6 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": "urn:ixo:domain-md:x-oracle-capsule:jcs-vectors:0.1.0",
|
|
3
|
+
"standard": "RFC 8785",
|
|
4
|
+
"input_profile": "I-JSON with safe integers",
|
|
5
|
+
"exact_bytes_note": "Canonical bytes are used for generated digest and signature surfaces. Artifact CID and SHA-256 values cover exact fetched bytes and MUST NOT be recomputed from parsed or canonicalized content.",
|
|
6
|
+
"vectors": [
|
|
7
|
+
{
|
|
8
|
+
"name": "nested-key-order-and-array-order",
|
|
9
|
+
"input": "{\"b\":2,\"a\":1,\"nested\":{\"z\":false,\"x\":[3,null,\"ok\"]}}",
|
|
10
|
+
"canonical": "{\"a\":1,\"b\":2,\"nested\":{\"x\":[3,null,\"ok\"],\"z\":false}}",
|
|
11
|
+
"sha256": "a070af735949703f6babceafa678b655c2c7023c1391c60b6971f6576f800214"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "ecmascript-number-serialization",
|
|
15
|
+
"input": "{\"numbers\":[333333333.33333329,4.50,2e-3,1e-27,-0]}",
|
|
16
|
+
"canonical": "{\"numbers\":[333333333.3333333,4.5,0.002,1e-27,0]}",
|
|
17
|
+
"sha256": "d643d0848531ed0c371cd568685f25bfb58064d6e091425152615add4dfba18f"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "utf16-code-unit-property-order",
|
|
21
|
+
"input": "{\"1\":\"one\",\"€\":\"Euro\",\"\\r\":\"CR\",\"\":\"control\",\"ö\":\"latin\",\"😀\":\"emoji\"}",
|
|
22
|
+
"canonical": "{\"\\r\":\"CR\",\"1\":\"one\",\"\":\"control\",\"ö\":\"latin\",\"€\":\"Euro\",\"😀\":\"emoji\"}",
|
|
23
|
+
"sha256": "2edb0589ad42854433550be7f5cae2e1635a304d71d9f6985070faf256a4c97b"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "json-string-escaping",
|
|
27
|
+
"input": "{\"text\":\"line\\nquote\\\"slash\\tab\\t\"}",
|
|
28
|
+
"canonical": "{\"text\":\"line\\nquote\\\"slash\\tab\\t\"}",
|
|
29
|
+
"sha256": "3183b19961812dafd142dd31a0c989b8539bb9859efa1ce9e8188d16289bb87b"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "reject-duplicate-object-name",
|
|
33
|
+
"input": "{\"a\":1,\"a\":2}",
|
|
34
|
+
"errorCode": "capsule-duplicate-key"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "reject-lone-surrogate",
|
|
38
|
+
"input": "{\"x\":\"\\uDEAD\"}",
|
|
39
|
+
"errorCode": "capsule-unicode"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "reject-unsafe-integer",
|
|
43
|
+
"input": "{\"x\":9007199254740992}",
|
|
44
|
+
"errorCode": "capsule-number"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "reject-non-finite-overflow",
|
|
48
|
+
"input": "{\"x\":1e999}",
|
|
49
|
+
"errorCode": "capsule-number"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "reject-byte-order-mark",
|
|
53
|
+
"input": "{}",
|
|
54
|
+
"errorCode": "capsule-encoding"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!-- Generated from spec/oracle-capsule.mdx | schema: urn:ixo:domain-md:x-oracle-capsule:manifest:0.1.0 -->
|
|
2
|
+
<!-- Do not edit directly. Run npm run spec:generate. -->
|
|
3
|
+
|
|
4
|
+
# x-oracle-capsule companion manifest contract
|
|
5
|
+
|
|
6
|
+
Status: experimental static-conformance contract 0.1.0. The architecture and threat-model decisions remain the source of truth for the trust boundaries behind this schema.
|
|
7
|
+
|
|
8
|
+
## Scope and authority boundary
|
|
9
|
+
|
|
10
|
+
The `x-oracle-capsule` binding, companion manifest and source lock describe immutable release bytes. They do not grant authority, select current protocol state, authorize evidence disclosure, approve an outcome, activate a tool, sign a receipt or move value. A static-pass report always returns `externalChecksRequired`; a runtime must resolve those checks from their owning authorities and fail closed when any required verdict is missing, stale, ambiguous or negative.
|
|
11
|
+
|
|
12
|
+
The portable package is host-neutral. Codex, Claude, Pi, CLI and MCP hosts may supply reasoning and presentation, but cannot reinterpret this contract or become its authority, durable state, secret store, signer or audit ledger.
|
|
13
|
+
|
|
14
|
+
## Frozen identities
|
|
15
|
+
|
|
16
|
+
| Surface | Frozen value |
|
|
17
|
+
| ----------------------- | ------------------------------------------------------ |
|
|
18
|
+
| Binding key | `x-oracle-capsule` |
|
|
19
|
+
| `apiVersion` | `ixo.earth/oracle-capsule/v0alpha1` |
|
|
20
|
+
| Manifest `kind` | `OracleCapsuleRelease` |
|
|
21
|
+
| Manifest schema | `urn:ixo:domain-md:x-oracle-capsule:manifest:0.1.0` |
|
|
22
|
+
| Manifest media type | `application/vnd.ixo.oracle-capsule+json` |
|
|
23
|
+
| Source-lock `kind` | `OracleCapsuleSourceLock` |
|
|
24
|
+
| Source-lock schema | `urn:ixo:domain-md:x-oracle-capsule:source-lock:0.1.0` |
|
|
25
|
+
| Source-lock media type | `application/vnd.ixo.oracle-capsule.source-lock+json` |
|
|
26
|
+
| Exact-byte digest | SHA-256 |
|
|
27
|
+
| Exact-byte address | CIDv1, raw codec, sha2-256 multihash |
|
|
28
|
+
| Generated serialization | RFC 8785 JSON Canonicalization Scheme (JCS) |
|
|
29
|
+
|
|
30
|
+
The schema URI is an identifier, not a network authority. Implementations use the schema packaged with the validator; they must not fetch a mutable replacement.
|
|
31
|
+
|
|
32
|
+
## `domain.md` binding
|
|
33
|
+
|
|
34
|
+
The top-level binding contains only `contract` and `manifest`. The manifest URI is immutable only when coupled to both its CID and SHA-256. The CID and SHA-256 cover the exact fetched UTF-8 bytes. The media type, schema URI and release SemVer must match the fetched manifest. Generic `x-*` extension behavior does not weaken this exact binding.
|
|
35
|
+
|
|
36
|
+
## Manifest ownership
|
|
37
|
+
|
|
38
|
+
`metadata` owns release identity and supersession history. Supersession does not activate a release. `provenance` pins the repository, commit, builder and exact reviewed architecture/threat-model digests. `compatibility` declares the contract major, minimum kernel, required features and presentation hosts; a runtime may narrow these requirements but never downgrade them.
|
|
39
|
+
|
|
40
|
+
`domains.oracle` pins the Oracle identity document. `domains.subjects` pins every permitted subject-domain contract. Domain references do not copy or override current controller, right, claim, rubric, evidence, Flow, consent or review state.
|
|
41
|
+
|
|
42
|
+
`components` contains exactly one required `master_skill`. Every component is immutable, dual-addressed by CID and SHA-256, versioned, owned, update-authority scoped, explicitly required or optional, assigned a disclosure/loading policy, and read-only at runtime. Optional specialist skills, scripts, runtime bundles, policies, rubrics, output schemas, reference-memory snapshots, evaluation suites and host adapters remain bounded components; an unknown required kind fails schema validation. Dependencies must resolve and form an acyclic graph.
|
|
43
|
+
|
|
44
|
+
The Master artifact references one content-addressed source lock and names a relative entrypoint. It may orchestrate reasoning and request declared tools, but cannot activate a tool, alter authority precedence, modify package bytes, read secrets directly, suppress evidence, approve itself or change a kernel invariant.
|
|
45
|
+
|
|
46
|
+
`tools` describes requested runtime contracts: DID, version, signed manifest, typed input/output and receipt schemas, risk, side effects, capability actions, sandbox and egress projection. These records are allowlist requests only. `requestedCapabilities` must name a declared tool and remains subject to the effective runtime intersection.
|
|
47
|
+
|
|
48
|
+
`effectCeiling` can only narrow the identity document, run authorization, live capability, subject policy and runtime policy. Human review remains external and digest-bound.
|
|
49
|
+
|
|
50
|
+
## Strict parsing and RFC 8785
|
|
51
|
+
|
|
52
|
+
Manifest, lock, attestation, authority-record and receipt digest/signature surfaces use RFC 8785 JCS after strict I-JSON parsing. Inputs must be UTF-8 without a BOM; object names must be unique; Unicode must contain no lone surrogate; numbers must be finite; integers must be within `[-9007199254740991, 9007199254740991]`; arrays preserve order. Object names are sorted by UTF-16 code units as required by RFC 8785.
|
|
53
|
+
|
|
54
|
+
The release digest is SHA-256 over JCS of the entire manifest after removing only `metadata.release_digest`. No other field is omitted. The published vectors in `oracle-capsule-jcs-vectors.json` are normative and must run unchanged in every implementation and packed host.
|
|
55
|
+
|
|
56
|
+
Canonical serialization never substitutes for exact-byte verification. Whitespace-different manifest bytes can produce the same JCS bytes while having different valid exact-byte SHA/CID identities.
|
|
57
|
+
|
|
58
|
+
## Source locks and extraction
|
|
59
|
+
|
|
60
|
+
A source lock binds one manifest component to its artifact CID, SHA-256 and byte length, then lists every regular file by unambiguous relative path, byte length and SHA-256. Paths are `/`-separated, relative, non-empty, non-duplicated and contain no backslash, empty segment or `..` segment. Only regular files are permitted. Symbolic/hard links, devices, sockets, absolute paths, traversal, duplicate archive names, case/normalization collisions, undeclared files, missing files and extraction outside a fresh isolated root must fail before execution.
|
|
61
|
+
|
|
62
|
+
The static in-memory package verifier checks exact locked bytes and refuses unlocked files. Archive readers and network resolvers are downstream runtime surfaces and must additionally enforce redirect, DNS/IP, decompression, total-size, file-count and race-safe extraction controls before presenting bytes to this verifier.
|
|
63
|
+
|
|
64
|
+
## Stable findings and limits
|
|
65
|
+
|
|
66
|
+
Strict JSON failures carry a stable `capsule-*` code, JSON Pointer path, and one-based line/column. Schema and semantic findings inherit the closest parsed pointer location. The frozen default budgets are 1 MiB per manifest/lock, depth 64, 10,000 JSON nodes, 10,000 characters per scalar, 10,000 locked files and 64 MiB total locked file bytes. A runtime may choose smaller limits, never larger limits while claiming this contract.
|
|
67
|
+
|
|
68
|
+
## Static verdict
|
|
69
|
+
|
|
70
|
+
A `static-pass` proves only local syntax, schema, internal references, release serialization and the exact bytes supplied to the package verifier. It does not prove URI resolution, current identity or subject state, authorization, revocation, trusted time, consent/decryption, human approval, distribution trust or signer trust. These remain explicitly listed as runtime external checks in every report.
|
|
71
|
+
|
|
72
|
+
Any byte or semantic change creates a new release version and exact-byte CID/SHA. Rollback is an explicit activation decision by the owning authority; it never rewrites history. Existing Blueprint Runtime v0.2 canonical JSON helpers and digest fixtures are unchanged: capsule JCS is a new versioned contract and downstream runtimes must call this implementation or pass its exact vectors before claiming conformance.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:ixo:domain-md:x-oracle-capsule:source-lock:0.1.0",
|
|
4
|
+
"title": "IXO Oracle Capsule source lock",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["apiVersion", "kind", "schema", "component", "artifact", "files"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"apiVersion": { "const": "ixo.earth/oracle-capsule/v0alpha1" },
|
|
9
|
+
"kind": { "const": "OracleCapsuleSourceLock" },
|
|
10
|
+
"schema": { "const": "urn:ixo:domain-md:x-oracle-capsule:source-lock:0.1.0" },
|
|
11
|
+
"component": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$" },
|
|
12
|
+
"artifact": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["cid", "sha256", "bytes"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"cid": { "$ref": "#/$defs/cid" },
|
|
17
|
+
"sha256": { "$ref": "#/$defs/sha256" },
|
|
18
|
+
"bytes": { "type": "integer", "minimum": 0, "maximum": 67108864 }
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false
|
|
21
|
+
},
|
|
22
|
+
"files": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"minItems": 1,
|
|
25
|
+
"maxItems": 10000,
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["path", "bytes", "sha256", "mode"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"path": { "$ref": "#/$defs/relativePath" },
|
|
31
|
+
"bytes": { "type": "integer", "minimum": 0, "maximum": 67108864 },
|
|
32
|
+
"sha256": { "$ref": "#/$defs/sha256" },
|
|
33
|
+
"mode": { "const": "file" }
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"$defs": {
|
|
41
|
+
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
42
|
+
"cid": { "type": "string", "pattern": "^b[a-z2-7]{10,}$" },
|
|
43
|
+
"relativePath": { "type": "string", "minLength": 1, "maxLength": 1024, "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\)(?!.*//)[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$" }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:ixo:domain-md:x-oracle-capsule:manifest:0.1.0",
|
|
4
|
+
"title": "IXO Oracle Capsule release manifest",
|
|
5
|
+
"description": "Host-neutral immutable release contract. This manifest requests capabilities but grants no live authority.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"apiVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"schema",
|
|
11
|
+
"metadata",
|
|
12
|
+
"provenance",
|
|
13
|
+
"compatibility",
|
|
14
|
+
"domains",
|
|
15
|
+
"components",
|
|
16
|
+
"tools",
|
|
17
|
+
"requestedCapabilities",
|
|
18
|
+
"effectCeiling",
|
|
19
|
+
"external_checks_required"
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"apiVersion": { "const": "ixo.earth/oracle-capsule/v0alpha1" },
|
|
23
|
+
"kind": { "const": "OracleCapsuleRelease" },
|
|
24
|
+
"schema": { "const": "urn:ixo:domain-md:x-oracle-capsule:manifest:0.1.0" },
|
|
25
|
+
"metadata": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"required": ["name", "release", "created", "issuer", "operator", "release_digest", "supersedes"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"name": { "$ref": "#/$defs/name" },
|
|
30
|
+
"release": { "$ref": "#/$defs/semver" },
|
|
31
|
+
"created": { "type": "string", "format": "date-time" },
|
|
32
|
+
"issuer": { "$ref": "#/$defs/did" },
|
|
33
|
+
"operator": { "$ref": "#/$defs/did" },
|
|
34
|
+
"release_digest": { "$ref": "#/$defs/sha256" },
|
|
35
|
+
"supersedes": {
|
|
36
|
+
"anyOf": [{ "$ref": "#/$defs/cid" }, { "type": "null" }]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
},
|
|
41
|
+
"provenance": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"required": ["repository", "commit", "builder", "reviewed_contract"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"repository": { "$ref": "#/$defs/httpsUri" },
|
|
46
|
+
"commit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
47
|
+
"builder": { "$ref": "#/$defs/did" },
|
|
48
|
+
"build_attestation": {
|
|
49
|
+
"anyOf": [{ "$ref": "#/$defs/artifact" }, { "type": "null" }]
|
|
50
|
+
},
|
|
51
|
+
"reviewed_contract": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["repository", "commit", "architecture_sha256", "threat_model_sha256"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"repository": { "$ref": "#/$defs/httpsUri" },
|
|
56
|
+
"commit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
|
|
57
|
+
"architecture_sha256": { "$ref": "#/$defs/sha256" },
|
|
58
|
+
"threat_model_sha256": { "$ref": "#/$defs/sha256" }
|
|
59
|
+
},
|
|
60
|
+
"additionalProperties": false
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"additionalProperties": false
|
|
64
|
+
},
|
|
65
|
+
"compatibility": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": ["contract_major", "minimum_kernel", "required_features", "hosts"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"contract_major": { "const": "v0alpha1" },
|
|
70
|
+
"minimum_kernel": { "$ref": "#/$defs/semver" },
|
|
71
|
+
"required_features": { "$ref": "#/$defs/uniqueNames" },
|
|
72
|
+
"hosts": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"minItems": 1,
|
|
75
|
+
"uniqueItems": true,
|
|
76
|
+
"items": { "enum": ["codex", "claude", "pi", "cli", "mcp", "other"] }
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"additionalProperties": false
|
|
80
|
+
},
|
|
81
|
+
"domains": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"required": ["oracle", "subjects"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"oracle": { "$ref": "#/$defs/domainReference" },
|
|
86
|
+
"subjects": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"minItems": 1,
|
|
89
|
+
"items": { "$ref": "#/$defs/domainReference" }
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
},
|
|
94
|
+
"components": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"minItems": 1,
|
|
97
|
+
"maxItems": 512,
|
|
98
|
+
"items": { "$ref": "#/$defs/component" },
|
|
99
|
+
"contains": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"properties": { "kind": { "const": "master_skill" } },
|
|
102
|
+
"required": ["kind"]
|
|
103
|
+
},
|
|
104
|
+
"minContains": 1,
|
|
105
|
+
"maxContains": 1
|
|
106
|
+
},
|
|
107
|
+
"tools": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"maxItems": 256,
|
|
110
|
+
"items": { "$ref": "#/$defs/tool" }
|
|
111
|
+
},
|
|
112
|
+
"requestedCapabilities": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"maxItems": 256,
|
|
115
|
+
"items": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": ["id", "action", "object", "tool"],
|
|
118
|
+
"properties": {
|
|
119
|
+
"id": { "$ref": "#/$defs/name" },
|
|
120
|
+
"action": { "$ref": "#/$defs/name" },
|
|
121
|
+
"object": { "$ref": "#/$defs/name" },
|
|
122
|
+
"tool": { "$ref": "#/$defs/name" }
|
|
123
|
+
},
|
|
124
|
+
"additionalProperties": false
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"effectCeiling": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"required": ["mode", "allowed", "forbidden", "human_review_required_for"],
|
|
130
|
+
"properties": {
|
|
131
|
+
"mode": { "enum": ["read_only", "propose_only", "bounded_evaluate", "bounded_execute"] },
|
|
132
|
+
"allowed": { "$ref": "#/$defs/uniqueNames" },
|
|
133
|
+
"forbidden": { "$ref": "#/$defs/uniqueNames" },
|
|
134
|
+
"human_review_required_for": { "$ref": "#/$defs/uniqueNames" }
|
|
135
|
+
},
|
|
136
|
+
"additionalProperties": false
|
|
137
|
+
},
|
|
138
|
+
"external_checks_required": {
|
|
139
|
+
"type": "array",
|
|
140
|
+
"minItems": 8,
|
|
141
|
+
"maxItems": 8,
|
|
142
|
+
"uniqueItems": true,
|
|
143
|
+
"items": {
|
|
144
|
+
"enum": [
|
|
145
|
+
"oracle-identity-current",
|
|
146
|
+
"subject-domain-current",
|
|
147
|
+
"capability-current-and-unrevoked",
|
|
148
|
+
"trusted-time-available",
|
|
149
|
+
"private-resource-access-authorized",
|
|
150
|
+
"human-review-authorized",
|
|
151
|
+
"runtime-distribution-trusted",
|
|
152
|
+
"receipt-signer-current-and-unrevoked"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"allOf": [
|
|
156
|
+
{ "contains": { "const": "oracle-identity-current" } },
|
|
157
|
+
{ "contains": { "const": "capability-current-and-unrevoked" } },
|
|
158
|
+
{ "contains": { "const": "trusted-time-available" } },
|
|
159
|
+
{ "contains": { "const": "runtime-distribution-trusted" } },
|
|
160
|
+
{ "contains": { "const": "receipt-signer-current-and-unrevoked" } }
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"additionalProperties": false,
|
|
165
|
+
"$defs": {
|
|
166
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$" },
|
|
167
|
+
"semver": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" },
|
|
168
|
+
"did": { "type": "string", "pattern": "^did:ixo:[A-Za-z0-9._:%-]+$" },
|
|
169
|
+
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
170
|
+
"cid": { "type": "string", "pattern": "^b[a-z2-7]{10,}$" },
|
|
171
|
+
"httpsUri": { "type": "string", "pattern": "^https://[^/?#]+/[^?#]*$" },
|
|
172
|
+
"immutableUri": { "type": "string", "pattern": "^(ipfs://b[a-z2-7]{10,}(?:/[^?#]*)?|https://[^/?#]+/[^?#]*|file:[^?#]+)$" },
|
|
173
|
+
"relativePath": { "type": "string", "minLength": 1, "maxLength": 1024, "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\)(?!.*//)[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$" },
|
|
174
|
+
"uniqueNames": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/name" } },
|
|
175
|
+
"artifact": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"required": ["uri", "cid", "sha256", "media_type", "bytes"],
|
|
178
|
+
"properties": {
|
|
179
|
+
"uri": { "$ref": "#/$defs/immutableUri" },
|
|
180
|
+
"cid": { "$ref": "#/$defs/cid" },
|
|
181
|
+
"sha256": { "$ref": "#/$defs/sha256" },
|
|
182
|
+
"media_type": { "type": "string", "pattern": "^[A-Za-z0-9!#$&^_.+-]+/[A-Za-z0-9!#$&^_.+-]+$" },
|
|
183
|
+
"bytes": { "type": "integer", "minimum": 0, "maximum": 67108864 },
|
|
184
|
+
"source_lock": { "$ref": "#/$defs/sourceLockReference" }
|
|
185
|
+
},
|
|
186
|
+
"additionalProperties": false
|
|
187
|
+
},
|
|
188
|
+
"sourceLockReference": {
|
|
189
|
+
"type": "object",
|
|
190
|
+
"required": ["uri", "cid", "sha256", "media_type", "bytes"],
|
|
191
|
+
"properties": {
|
|
192
|
+
"uri": { "$ref": "#/$defs/immutableUri" },
|
|
193
|
+
"cid": { "$ref": "#/$defs/cid" },
|
|
194
|
+
"sha256": { "$ref": "#/$defs/sha256" },
|
|
195
|
+
"media_type": { "const": "application/vnd.ixo.oracle-capsule.source-lock+json" },
|
|
196
|
+
"bytes": { "type": "integer", "minimum": 1, "maximum": 1048576 }
|
|
197
|
+
},
|
|
198
|
+
"additionalProperties": false
|
|
199
|
+
},
|
|
200
|
+
"domainReference": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"required": ["id", "uri", "cid", "sha256", "version"],
|
|
203
|
+
"properties": {
|
|
204
|
+
"id": { "$ref": "#/$defs/did" },
|
|
205
|
+
"uri": { "$ref": "#/$defs/immutableUri" },
|
|
206
|
+
"cid": { "$ref": "#/$defs/cid" },
|
|
207
|
+
"sha256": { "$ref": "#/$defs/sha256" },
|
|
208
|
+
"version": { "type": "string", "minLength": 1, "maxLength": 100 }
|
|
209
|
+
},
|
|
210
|
+
"additionalProperties": false
|
|
211
|
+
},
|
|
212
|
+
"component": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"required": ["id", "kind", "required", "artifact", "version", "owner", "update_authority", "compatibility", "dependencies", "disclosure", "loading_policy", "runtime_writable"],
|
|
215
|
+
"properties": {
|
|
216
|
+
"id": { "$ref": "#/$defs/name" },
|
|
217
|
+
"kind": { "enum": ["master_skill", "specialist_skill", "runtime_bundle", "script_bundle", "policy", "rubric", "output_schema", "reference_memory", "evaluation_suite", "host_adapter"] },
|
|
218
|
+
"required": { "type": "boolean" },
|
|
219
|
+
"artifact": { "$ref": "#/$defs/artifact" },
|
|
220
|
+
"version": { "$ref": "#/$defs/semver" },
|
|
221
|
+
"owner": { "$ref": "#/$defs/did" },
|
|
222
|
+
"update_authority": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/did" } },
|
|
223
|
+
"compatibility": { "$ref": "#/$defs/uniqueNames" },
|
|
224
|
+
"dependencies": { "$ref": "#/$defs/uniqueNames" },
|
|
225
|
+
"disclosure": { "enum": ["public", "authorized_projection", "never_model_visible"] },
|
|
226
|
+
"loading_policy": { "enum": ["bootstrap", "on_demand", "runtime_only"] },
|
|
227
|
+
"runtime_writable": { "const": false },
|
|
228
|
+
"entrypoint": { "$ref": "#/$defs/relativePath" }
|
|
229
|
+
},
|
|
230
|
+
"additionalProperties": false,
|
|
231
|
+
"allOf": [
|
|
232
|
+
{
|
|
233
|
+
"if": { "properties": { "kind": { "const": "master_skill" } }, "required": ["kind"] },
|
|
234
|
+
"then": {
|
|
235
|
+
"required": ["entrypoint"],
|
|
236
|
+
"properties": {
|
|
237
|
+
"required": { "const": true },
|
|
238
|
+
"loading_policy": { "const": "bootstrap" },
|
|
239
|
+
"artifact": { "type": "object", "required": ["source_lock"] }
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
"tool": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"required": ["id", "did", "version", "manifest", "input_schema", "output_schema", "risk_tier", "side_effect", "capability", "sandbox", "egress", "receipt_schema"],
|
|
248
|
+
"properties": {
|
|
249
|
+
"id": { "$ref": "#/$defs/name" },
|
|
250
|
+
"did": { "$ref": "#/$defs/did" },
|
|
251
|
+
"version": { "$ref": "#/$defs/semver" },
|
|
252
|
+
"manifest": { "$ref": "#/$defs/artifact" },
|
|
253
|
+
"input_schema": { "$ref": "#/$defs/artifact" },
|
|
254
|
+
"output_schema": { "$ref": "#/$defs/artifact" },
|
|
255
|
+
"risk_tier": { "enum": ["low", "moderate", "high", "critical"] },
|
|
256
|
+
"side_effect": { "enum": ["none", "reversible", "irreversible", "value_movement", "canonical_state"] },
|
|
257
|
+
"capability": { "type": "object", "required": ["required", "actions"], "properties": { "required": { "const": true }, "actions": { "$ref": "#/$defs/uniqueNames" } }, "additionalProperties": false },
|
|
258
|
+
"sandbox": { "type": "object", "required": ["network", "filesystem", "secrets"], "properties": { "network": { "enum": ["none", "allowlist"] }, "filesystem": { "enum": ["none", "read_only_projection"] }, "secrets": { "const": "adapter_only" } }, "additionalProperties": false },
|
|
259
|
+
"egress": { "type": "object", "required": ["destinations", "fields"], "properties": { "destinations": { "$ref": "#/$defs/uniqueNames" }, "fields": { "$ref": "#/$defs/uniqueNames" } }, "additionalProperties": false },
|
|
260
|
+
"receipt_schema": { "$ref": "#/$defs/artifact" }
|
|
261
|
+
},
|
|
262
|
+
"additionalProperties": false
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|