@echopath-labs/forgerail 0.1.0-alpha.1 → 0.1.0-alpha.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/.codex-plugin/plugin.json +7 -3
- package/CHANGELOG.md +8 -0
- package/PLUGIN.md +2 -1
- package/PRIVACY.md +15 -0
- package/README.md +14 -2
- package/README.zh-CN.md +13 -2
- package/TERMS.md +19 -0
- package/adapters/codex.json +1 -1
- package/assets/forgerail-icon.svg +6 -0
- package/assets/forgerail-logo.svg +7 -0
- package/contracts/authority-evidence-v1.schema.json +48 -0
- package/contracts/cross-workspace-pack-composition-v1.schema.json +241 -0
- package/contracts/effective-profile-v2.schema.json +113 -0
- package/contracts/entry-mode-v1.schema.json +20 -0
- package/contracts/evidence-identity-v1.schema.json +48 -0
- package/contracts/execution-context-identity-v1.schema.json +76 -0
- package/contracts/gate-result-v1.schema.json +32 -0
- package/contracts/governance-source-v1.schema.json +30 -0
- package/contracts/host-adapter-observation-v1.schema.json +61 -0
- package/contracts/limited-reason-v1.schema.json +46 -0
- package/contracts/operation-authority-requirement-v1.schema.json +43 -0
- package/contracts/operation-grant-v1.schema.json +83 -0
- package/contracts/phase-slice-correlation-v1.schema.json +20 -0
- package/contracts/profile-explanation-v1.schema.json +91 -0
- package/contracts/provider-adapter-observation-v1.schema.json +87 -0
- package/contracts/return-receipt-v2.schema.json +55 -0
- package/contracts/review-authority-requirement-v1.schema.json +117 -0
- package/contracts/rollback-envelope-lineage-v1.schema.json +46 -0
- package/contracts/rule-claim-v1.schema.json +34 -0
- package/contracts/source-dependency-edge-v1.schema.json +37 -0
- package/contracts/task-control-revision-v1.schema.json +39 -0
- package/contracts/task-envelope-v2.schema.json +67 -0
- package/contracts/validation-result-v1.schema.json +57 -0
- package/contracts/validation-topology-v1.schema.json +55 -0
- package/contracts/workspace-identity-v1.schema.json +28 -0
- package/contracts/workspace-relationship-v1.schema.json +31 -0
- package/directory/README.md +23 -0
- package/directory/evaluations.json +78 -0
- package/directory/release-notes-alpha2.md +7 -0
- package/directory/submission-candidate.json +80 -0
- package/docs/composable-autonomy.zh-CN.md +183 -0
- package/docs/control-authority-validation-contracts.md +36 -0
- package/docs/control-authority-validation-contracts.zh-CN.md +36 -0
- package/docs/control-profile-contracts.md +35 -0
- package/docs/control-profile-contracts.zh-CN.md +35 -0
- package/docs/control-system-fixture-matrix.md +30 -0
- package/docs/control-system-fixture-matrix.zh-CN.md +30 -0
- package/docs/control-task-contracts.md +39 -0
- package/docs/control-task-contracts.zh-CN.md +39 -0
- package/docs/cross-workspace-pack-composition-contract.md +31 -0
- package/docs/cross-workspace-pack-composition-contract.zh-CN.md +31 -0
- package/docs/installation.md +9 -3
- package/docs/installation.zh-CN.md +9 -3
- package/docs/release-alpha2.md +21 -0
- package/docs/release-alpha2.zh-CN.md +21 -0
- package/package.json +9 -3
- package/packs/architecture-convergence-audit.json +30 -0
- package/scripts/build-universal-directory-candidate.mjs +72 -0
- package/scripts/disposable-consumer.mjs +1 -1
- package/scripts/fixtures/contracts/authority-evidence.revoked-without-invalidation.invalid.json +22 -0
- package/scripts/fixtures/contracts/authority-evidence.revoked.valid.json +32 -0
- package/scripts/fixtures/contracts/authority-evidence.valid.json +22 -0
- package/scripts/fixtures/contracts/capability-pack.missing-entry.invalid.json +14 -0
- package/scripts/fixtures/contracts/capability-pack.valid.json +15 -0
- package/scripts/fixtures/contracts/cross-workspace-pack-composition.authority-collapse.invalid.json +156 -0
- package/scripts/fixtures/contracts/cross-workspace-pack-composition.false-closure.invalid.json +138 -0
- package/scripts/fixtures/contracts/cross-workspace-pack-composition.valid.json +156 -0
- package/scripts/fixtures/contracts/effective-profile-v2.optional-unavailable-degraded.valid.json +36 -0
- package/scripts/fixtures/contracts/effective-profile-v2.required-unavailable-degraded.invalid.json +36 -0
- package/scripts/fixtures/contracts/effective-profile-v2.unresolved-claim-false-complete.invalid.json +34 -0
- package/scripts/fixtures/contracts/effective-profile-v2.valid.json +53 -0
- package/scripts/fixtures/contracts/effective-profile.duplicate-rule.invalid.json +23 -0
- package/scripts/fixtures/contracts/entry-mode.missing-evidence.invalid.json +6 -0
- package/scripts/fixtures/contracts/entry-mode.valid.json +6 -0
- package/scripts/fixtures/contracts/evidence-identity.unavailable-without-reason.invalid.json +21 -0
- package/scripts/fixtures/contracts/evidence-identity.valid.json +21 -0
- package/scripts/fixtures/contracts/execution-context-identity.unavailable-without-reason.invalid.json +31 -0
- package/scripts/fixtures/contracts/execution-context-identity.valid.json +31 -0
- package/scripts/fixtures/contracts/gate-result.satisfied-without-evidence.invalid.json +14 -0
- package/scripts/fixtures/contracts/gate-result.valid.json +14 -0
- package/scripts/fixtures/contracts/governance-source.unavailable-without-reason.invalid.json +16 -0
- package/scripts/fixtures/contracts/governance-source.valid.json +16 -0
- package/scripts/fixtures/contracts/host-adapter-observation.claims-authorization.invalid.json +23 -0
- package/scripts/fixtures/contracts/host-adapter-observation.valid.json +39 -0
- package/scripts/fixtures/contracts/host-adapter.codex.valid.json +1 -1
- package/scripts/fixtures/contracts/host-adapter.false-supported.invalid.json +14 -0
- package/scripts/fixtures/contracts/host-binding-receipt.valid.json +1 -1
- package/scripts/fixtures/contracts/launch-contract.execution-owner.invalid.json +19 -0
- package/scripts/fixtures/contracts/limited-reason.unbounded.invalid.json +11 -0
- package/scripts/fixtures/contracts/limited-reason.valid.json +11 -0
- package/scripts/fixtures/contracts/operation-authority-requirement.no-issuer.invalid.json +22 -0
- package/scripts/fixtures/contracts/operation-authority-requirement.valid.json +22 -0
- package/scripts/fixtures/contracts/operation-grant.missing-issuer-evidence.invalid.json +34 -0
- package/scripts/fixtures/contracts/operation-grant.valid.json +34 -0
- package/scripts/fixtures/contracts/phase-slice-correlation.aggregate-closure.invalid.json +12 -0
- package/scripts/fixtures/contracts/phase-slice-correlation.valid.json +12 -0
- package/scripts/fixtures/contracts/profile-change-candidate.unconfirmed.invalid.json +13 -0
- package/scripts/fixtures/contracts/profile-explanation.false-complete.invalid.json +36 -0
- package/scripts/fixtures/contracts/profile-explanation.valid.json +29 -0
- package/scripts/fixtures/contracts/provider-adapter-observation.unauthenticated-supported.invalid.json +43 -0
- package/scripts/fixtures/contracts/provider-adapter-observation.valid.json +62 -0
- package/scripts/fixtures/contracts/return-receipt-v2.changed-subject.valid.json +36 -0
- package/scripts/fixtures/contracts/return-receipt-v2.unverified-closeout.invalid.json +36 -0
- package/scripts/fixtures/contracts/return-receipt-v2.valid.json +36 -0
- package/scripts/fixtures/contracts/review-authority-requirement.transitive.invalid.json +33 -0
- package/scripts/fixtures/contracts/review-authority-requirement.valid.json +21 -0
- package/scripts/fixtures/contracts/rollback-envelope-lineage.reused-grant.invalid.json +24 -0
- package/scripts/fixtures/contracts/rollback-envelope-lineage.valid.json +24 -0
- package/scripts/fixtures/contracts/rule-claim.inferred-enforceable.invalid.json +16 -0
- package/scripts/fixtures/contracts/rule-claim.valid.json +16 -0
- package/scripts/fixtures/contracts/source-dependency-edge.unavailable-without-reason.invalid.json +18 -0
- package/scripts/fixtures/contracts/source-dependency-edge.valid.json +18 -0
- package/scripts/fixtures/contracts/task-control-revision.closed-without-receipt.invalid.json +37 -0
- package/scripts/fixtures/contracts/task-control-revision.valid.json +37 -0
- package/scripts/fixtures/contracts/task-envelope-v2.missing-workspace-identity.invalid.json +39 -0
- package/scripts/fixtures/contracts/task-envelope-v2.valid.json +54 -0
- package/scripts/fixtures/contracts/task-envelope-v2.workspace-mismatch.invalid.json +40 -0
- package/scripts/fixtures/contracts/validation-result.passed-without-evidence.invalid.json +29 -0
- package/scripts/fixtures/contracts/validation-result.valid.json +19 -0
- package/scripts/fixtures/contracts/validation-topology.dangling-requirement.invalid.json +32 -0
- package/scripts/fixtures/contracts/validation-topology.protected-environment.valid.json +32 -0
- package/scripts/fixtures/contracts/validation-topology.valid.json +32 -0
- package/scripts/fixtures/contracts/workspace-identity.missing-root.invalid.json +6 -0
- package/scripts/fixtures/contracts/workspace-identity.valid.json +14 -0
- package/scripts/fixtures/contracts/workspace-relationship.inferred-authority.invalid.json +13 -0
- package/scripts/fixtures/contracts/workspace-relationship.valid.json +13 -0
- package/scripts/fixtures/control-system/architecture-convergence-cases.json +25 -0
- package/scripts/fixtures/control-system/task-2.9-invalid-boundary-matrix.json +203 -0
- package/scripts/fixtures/control-system/task-4-diagnosis-health-separation.json +19 -0
- package/scripts/fixtures/workspaces/no-node-project/AGENTS.md +3 -0
- package/scripts/fixtures/workspaces/no-node-project/README.md +3 -0
- package/scripts/fixtures/workspaces/no-node-project/docs/adr/0001-durable-records.md +3 -0
- package/scripts/forgerail.mjs +467 -14
- package/scripts/lib/contracts.mjs +1132 -2
- package/scripts/shadow-comparison.mjs +1 -1
- package/scripts/validate-release.mjs +15 -15
- package/scripts/validate-universal-directory.mjs +151 -0
- package/skills/architecture-convergence-audit/SKILL.md +31 -0
- package/skills/architecture-convergence-audit/agents/openai.yaml +7 -0
- package/skills/architecture-convergence-audit/assets/github-issue-template.md +26 -0
- package/skills/architecture-convergence-audit/references/audit-contract.md +62 -0
- package/skills/workspace-health-review/references/health-review.md +15 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/effective-profile-v2.json",
|
|
4
|
+
"title": "ForgeRail Effective Profile v2",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "profileId", "revisionId", "workspaceIdentityId", "computed", "computedAt", "completeness", "sourceIds", "workspaceRelationshipIds", "ruleClaims", "dependencyEdges", "applicablePackIds", "conflicts", "explanationId", "limitedReasons"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "2.0" },
|
|
10
|
+
"profileId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"revisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
12
|
+
"workspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
13
|
+
"computed": { "const": true },
|
|
14
|
+
"computedAt": { "type": "string", "format": "date-time" },
|
|
15
|
+
"completeness": { "enum": ["complete", "degraded", "unresolved"] },
|
|
16
|
+
"sourceIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
17
|
+
"workspaceRelationshipIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
18
|
+
"ruleClaims": { "type": "array", "items": { "$ref": "https://forgerail.dev/schemas/rule-claim-v1.json" } },
|
|
19
|
+
"dependencyEdges": { "type": "array", "items": { "$ref": "https://forgerail.dev/schemas/source-dependency-edge-v1.json" } },
|
|
20
|
+
"applicablePackIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" }, "uniqueItems": true },
|
|
21
|
+
"conflicts": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["conflictId", "claimIds", "status", "limitedReason"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"conflictId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
29
|
+
"claimIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "minItems": 2, "uniqueItems": true },
|
|
30
|
+
"status": { "const": "unresolved" },
|
|
31
|
+
"limitedReason": { "type": "string", "minLength": 1 }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"explanationId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
36
|
+
"limitedReasons": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
|
|
37
|
+
},
|
|
38
|
+
"allOf": [
|
|
39
|
+
{
|
|
40
|
+
"if": { "properties": { "completeness": { "const": "complete" } }, "required": ["completeness"] },
|
|
41
|
+
"then": {
|
|
42
|
+
"properties": {
|
|
43
|
+
"conflicts": { "maxItems": 0 },
|
|
44
|
+
"limitedReasons": { "maxItems": 0 },
|
|
45
|
+
"ruleClaims": {
|
|
46
|
+
"not": {
|
|
47
|
+
"contains": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": { "enforcement": { "const": "unresolved" } },
|
|
50
|
+
"required": ["enforcement"]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"dependencyEdges": {
|
|
55
|
+
"not": {
|
|
56
|
+
"contains": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"properties": { "observationStatus": { "enum": ["unavailable", "ambiguous", "unverified"] } },
|
|
59
|
+
"required": ["observationStatus"]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"if": { "properties": { "completeness": { "enum": ["degraded", "unresolved"] } }, "required": ["completeness"] },
|
|
68
|
+
"then": { "properties": { "limitedReasons": { "minItems": 1 } } }
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"if": {
|
|
72
|
+
"properties": {
|
|
73
|
+
"ruleClaims": {
|
|
74
|
+
"contains": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"properties": { "enforcement": { "const": "unresolved" } },
|
|
77
|
+
"required": ["enforcement"]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": ["ruleClaims"]
|
|
82
|
+
},
|
|
83
|
+
"then": { "properties": { "completeness": { "const": "unresolved" } } }
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"if": {
|
|
87
|
+
"properties": {
|
|
88
|
+
"dependencyEdges": {
|
|
89
|
+
"contains": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"allOf": [
|
|
92
|
+
{
|
|
93
|
+
"properties": { "requiredness": { "const": "required" } },
|
|
94
|
+
"required": ["requiredness"]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"properties": { "observationStatus": { "enum": ["unavailable", "ambiguous", "unverified"] } },
|
|
98
|
+
"required": ["observationStatus"]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": ["dependencyEdges"]
|
|
105
|
+
},
|
|
106
|
+
"then": { "properties": { "completeness": { "const": "unresolved" } } }
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"if": { "properties": { "conflicts": { "minItems": 1 } }, "required": ["conflicts"] },
|
|
110
|
+
"then": { "properties": { "completeness": { "const": "unresolved" } } }
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/entry-mode-v1.json",
|
|
4
|
+
"title": "ForgeRail Entry Mode v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "mode", "sourceEvidenceIds", "observedAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"mode": { "enum": ["new", "resumed", "imported"] },
|
|
11
|
+
"sourceEvidenceIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
12
|
+
"observedAt": { "type": "string", "format": "date-time" }
|
|
13
|
+
},
|
|
14
|
+
"allOf": [
|
|
15
|
+
{
|
|
16
|
+
"if": { "properties": { "mode": { "enum": ["resumed", "imported"] } }, "required": ["mode"] },
|
|
17
|
+
"then": { "properties": { "sourceEvidenceIds": { "minItems": 1 } } }
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/evidence-identity-v1.json",
|
|
4
|
+
"title": "ForgeRail Evidence Identity v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "evidenceId", "workspaceIdentityId", "scopeKind", "taskId", "subjectId", "envelopeRevisionId", "controlRevisionId", "source", "contentDigest", "observedAt", "availability", "sanitized", "limitedReason"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"evidenceId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"workspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
12
|
+
"scopeKind": { "enum": ["workspace", "task", "subject"] },
|
|
13
|
+
"taskId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
14
|
+
"subjectId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
15
|
+
"envelopeRevisionId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
16
|
+
"controlRevisionId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
17
|
+
"source": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["kind", "providerId", "locator", "providerEvidenceId"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"kind": { "enum": ["file", "git", "test", "log", "provider", "external-receipt", "agent-claim", "other"] },
|
|
23
|
+
"providerId": { "type": ["string", "null"], "pattern": "^[a-z][a-z0-9-]+$" },
|
|
24
|
+
"locator": { "type": "string", "minLength": 1 },
|
|
25
|
+
"providerEvidenceId": { "type": ["string", "null"] }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"contentDigest": { "type": ["string", "null"], "pattern": "^[0-9a-f]{64}$" },
|
|
29
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
30
|
+
"availability": { "enum": ["available", "unavailable", "unverified"] },
|
|
31
|
+
"sanitized": { "const": true },
|
|
32
|
+
"limitedReason": { "type": ["string", "null"], "minLength": 1 }
|
|
33
|
+
},
|
|
34
|
+
"allOf": [
|
|
35
|
+
{
|
|
36
|
+
"if": { "properties": { "scopeKind": { "enum": ["task", "subject"] } }, "required": ["scopeKind"] },
|
|
37
|
+
"then": { "properties": { "taskId": { "type": "string" }, "envelopeRevisionId": { "type": "string" }, "controlRevisionId": { "type": "string" } } }
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"if": { "properties": { "scopeKind": { "const": "subject" } }, "required": ["scopeKind"] },
|
|
41
|
+
"then": { "properties": { "subjectId": { "type": "string" } } }
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"if": { "properties": { "availability": { "enum": ["unavailable", "unverified"] } }, "required": ["availability"] },
|
|
45
|
+
"then": { "properties": { "limitedReason": { "type": "string", "minLength": 1 } } }
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/execution-context-identity-v1.json",
|
|
4
|
+
"title": "ForgeRail Execution Context Identity v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "executionContextIdentityId", "workspaceIdentityId", "subjectId", "entrypoint", "invocationRoot", "executor", "runner", "toolIdentities", "providerIdentities", "dependencies", "observedAt", "sanitized"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"executionContextIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"workspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
12
|
+
"subjectId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
13
|
+
"entrypoint": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"required": ["entrypointId", "kind", "locator", "digest"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"entrypointId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
19
|
+
"kind": { "enum": ["documented", "local-command", "hook", "ci", "nightly", "protected-environment", "other"] },
|
|
20
|
+
"locator": { "type": "string", "minLength": 1 },
|
|
21
|
+
"digest": { "type": ["string", "null"], "pattern": "^[0-9a-f]{64}$" }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"invocationRoot": { "type": "string", "minLength": 1 },
|
|
25
|
+
"executor": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["executorId", "kind"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"executorId": { "type": "string", "minLength": 1 },
|
|
31
|
+
"kind": { "enum": ["host-agent", "human", "local-process", "provider-runner", "other"] }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"runner": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["runnerId", "trustClass"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"runnerId": { "type": "string", "minLength": 1 },
|
|
40
|
+
"trustClass": { "enum": ["self-reported", "local-observed", "provider-attested", "trusted-runner", "protected-environment"] }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"toolIdentities": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
44
|
+
"providerIdentities": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": ["dependencyId", "kind", "locator", "boundary", "declared", "availability", "evidenceIdentityId", "limitedReason"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"dependencyId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
53
|
+
"kind": { "enum": ["environment-file", "configuration", "credential", "toolchain", "network-service", "provider-state", "other"] },
|
|
54
|
+
"locator": { "type": "string", "minLength": 1 },
|
|
55
|
+
"boundary": { "enum": ["workspace-contained", "allowlisted-external", "undeclared-external", "unavailable-external"] },
|
|
56
|
+
"declared": { "type": "boolean" },
|
|
57
|
+
"availability": { "enum": ["available", "unavailable", "unverified"] },
|
|
58
|
+
"evidenceIdentityId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
59
|
+
"limitedReason": { "anyOf": [{ "$ref": "https://forgerail.dev/schemas/limited-reason-v1.json" }, { "type": "null" }] }
|
|
60
|
+
},
|
|
61
|
+
"allOf": [
|
|
62
|
+
{
|
|
63
|
+
"if": { "properties": { "availability": { "enum": ["unavailable", "unverified"] } }, "required": ["availability"] },
|
|
64
|
+
"then": { "properties": { "limitedReason": { "$ref": "https://forgerail.dev/schemas/limited-reason-v1.json" } } }
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"if": { "properties": { "boundary": { "enum": ["undeclared-external", "unavailable-external"] } }, "required": ["boundary"] },
|
|
68
|
+
"then": { "properties": { "limitedReason": { "$ref": "https://forgerail.dev/schemas/limited-reason-v1.json" } } }
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
74
|
+
"sanitized": { "const": true }
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/gate-result-v1.json",
|
|
4
|
+
"title": "ForgeRail Gate Result v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "gateResultId", "gateId", "gateKind", "workspaceIdentityId", "envelopeRevisionId", "controlRevisionId", "subjectId", "disposition", "evidenceIdentityIds", "evaluatedAt", "limitedReason"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"gateResultId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"gateId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
12
|
+
"gateKind": { "enum": ["operation-authorization", "review-authority", "validation", "governance-dependency", "receipt-verification"] },
|
|
13
|
+
"workspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
14
|
+
"envelopeRevisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
15
|
+
"controlRevisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
16
|
+
"subjectId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
17
|
+
"disposition": { "enum": ["satisfied", "unsatisfied", "blocked", "deviation_requires_review"] },
|
|
18
|
+
"evidenceIdentityIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
19
|
+
"evaluatedAt": { "type": "string", "format": "date-time" },
|
|
20
|
+
"limitedReason": { "type": ["string", "null"], "minLength": 1 }
|
|
21
|
+
},
|
|
22
|
+
"allOf": [
|
|
23
|
+
{
|
|
24
|
+
"if": { "properties": { "disposition": { "const": "satisfied" } }, "required": ["disposition"] },
|
|
25
|
+
"then": { "properties": { "evidenceIdentityIds": { "minItems": 1 }, "limitedReason": { "const": null } } }
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"if": { "properties": { "disposition": { "enum": ["unsatisfied", "blocked", "deviation_requires_review"] } }, "required": ["disposition"] },
|
|
29
|
+
"then": { "properties": { "limitedReason": { "type": "string", "minLength": 1 } } }
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/governance-source-v1.json",
|
|
4
|
+
"title": "ForgeRail Governance Source v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "sourceId", "workspaceIdentityId", "sourceKind", "locator", "ownerId", "precedenceClass", "applicabilityScope", "workspaceRelationshipIds", "observationStatus", "ruleClaimIds", "dependencyEdgeIds", "observedAt", "limitedReason"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"sourceId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"workspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
12
|
+
"sourceKind": { "enum": ["instructions", "ownership", "platform-policy", "ci", "script", "specification", "decision-record", "structured-profile", "other"] },
|
|
13
|
+
"locator": { "type": "string", "minLength": 1 },
|
|
14
|
+
"ownerId": { "type": ["string", "null"], "minLength": 1 },
|
|
15
|
+
"precedenceClass": { "type": "string", "minLength": 1 },
|
|
16
|
+
"applicabilityScope": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
|
|
17
|
+
"workspaceRelationshipIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
18
|
+
"observationStatus": { "enum": ["observed", "unavailable", "ambiguous", "unverified"] },
|
|
19
|
+
"ruleClaimIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
20
|
+
"dependencyEdgeIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
21
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
22
|
+
"limitedReason": { "type": ["string", "null"], "minLength": 1 }
|
|
23
|
+
},
|
|
24
|
+
"allOf": [
|
|
25
|
+
{
|
|
26
|
+
"if": { "properties": { "observationStatus": { "enum": ["unavailable", "ambiguous", "unverified"] } }, "required": ["observationStatus"] },
|
|
27
|
+
"then": { "properties": { "limitedReason": { "type": "string", "minLength": 1 } } }
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/host-adapter-observation-v1.json",
|
|
4
|
+
"title": "ForgeRail Host Adapter Observation v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "observationId", "adapterId", "adapterVersion", "hostIdentityId", "workspaceIdentityId", "scopeKind", "taskId", "subjectId", "controlRevisionId", "authorizationClaim", "capabilities", "observedAt", "sanitized"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"observationId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"adapterId": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" },
|
|
12
|
+
"adapterVersion": { "type": "string", "minLength": 1 },
|
|
13
|
+
"hostIdentityId": { "type": "string", "minLength": 1 },
|
|
14
|
+
"workspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
15
|
+
"scopeKind": { "enum": ["workspace", "task", "subject"] },
|
|
16
|
+
"taskId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
17
|
+
"subjectId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
18
|
+
"controlRevisionId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
19
|
+
"authorizationClaim": { "const": false },
|
|
20
|
+
"capabilities": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"minItems": 1,
|
|
23
|
+
"items": { "$ref": "#/$defs/capabilityObservation" }
|
|
24
|
+
},
|
|
25
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
26
|
+
"sanitized": { "const": true }
|
|
27
|
+
},
|
|
28
|
+
"$defs": {
|
|
29
|
+
"capabilityObservation": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["capability", "state", "evidenceIdentityIds", "limitedReason"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"capability": { "enum": ["instruction-discovery", "workspace-boundary-discovery", "skill-or-plugin-discovery", "binding", "activation", "mutation", "execution-context", "verification"] },
|
|
35
|
+
"state": { "enum": ["supported", "profile-only", "degraded", "blocked", "unavailable", "unknown"] },
|
|
36
|
+
"evidenceIdentityIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
37
|
+
"limitedReason": { "anyOf": [{ "$ref": "https://forgerail.dev/schemas/limited-reason-v1.json" }, { "type": "null" }] }
|
|
38
|
+
},
|
|
39
|
+
"allOf": [
|
|
40
|
+
{
|
|
41
|
+
"if": { "properties": { "state": { "const": "supported" } }, "required": ["state"] },
|
|
42
|
+
"then": { "properties": { "evidenceIdentityIds": { "minItems": 1 }, "limitedReason": { "const": null } } }
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"if": { "properties": { "state": { "enum": ["profile-only", "degraded", "blocked", "unavailable", "unknown"] } }, "required": ["state"] },
|
|
46
|
+
"then": { "properties": { "limitedReason": { "$ref": "https://forgerail.dev/schemas/limited-reason-v1.json" } } }
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"allOf": [
|
|
52
|
+
{
|
|
53
|
+
"if": { "properties": { "scopeKind": { "enum": ["task", "subject"] } }, "required": ["scopeKind"] },
|
|
54
|
+
"then": { "properties": { "taskId": { "type": "string" }, "controlRevisionId": { "type": "string" } } }
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"if": { "properties": { "scopeKind": { "const": "subject" } }, "required": ["scopeKind"] },
|
|
58
|
+
"then": { "properties": { "subjectId": { "type": "string" } } }
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/limited-reason-v1.json",
|
|
4
|
+
"title": "ForgeRail Limited Reason v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "reasonId", "code", "impact", "summary", "evidenceIdentityIds", "locators", "observedAt", "sanitized"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"reasonId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"code": {
|
|
12
|
+
"enum": [
|
|
13
|
+
"missing-required-evidence",
|
|
14
|
+
"unavailable-provider",
|
|
15
|
+
"unauthenticated-provider",
|
|
16
|
+
"unverified-adapter",
|
|
17
|
+
"stale-evidence",
|
|
18
|
+
"revoked-evidence",
|
|
19
|
+
"dismissed-evidence",
|
|
20
|
+
"expired-evidence",
|
|
21
|
+
"superseded-evidence",
|
|
22
|
+
"wrong-subject",
|
|
23
|
+
"wrong-trust",
|
|
24
|
+
"unclassified-surface",
|
|
25
|
+
"missing-result",
|
|
26
|
+
"unexpected-result",
|
|
27
|
+
"dangling-dependency",
|
|
28
|
+
"blocked-prerequisite",
|
|
29
|
+
"boundary-crossing-dependency",
|
|
30
|
+
"redacted-sensitive-detail",
|
|
31
|
+
"unsupported-capability",
|
|
32
|
+
"other"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"impact": { "enum": ["degraded", "blocked", "unavailable", "unresolved", "unverified"] },
|
|
36
|
+
"summary": { "type": "string", "minLength": 1, "maxLength": 500 },
|
|
37
|
+
"evidenceIdentityIds": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
40
|
+
"uniqueItems": true
|
|
41
|
+
},
|
|
42
|
+
"locators": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
43
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
44
|
+
"sanitized": { "const": true }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/operation-authority-requirement-v1.json",
|
|
4
|
+
"title": "ForgeRail Operation Authority Requirement v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "requirementId", "workspaceIdentityId", "operation", "target", "subjectId", "scope", "eligibleIssuerSourceIds", "acceptedIssuerEvidenceKinds", "freshness", "declaredAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"requirementId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"workspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
12
|
+
"operation": { "type": "string", "minLength": 1 },
|
|
13
|
+
"target": { "$ref": "#/$defs/target" },
|
|
14
|
+
"subjectId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
15
|
+
"scope": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
|
|
16
|
+
"eligibleIssuerSourceIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "minItems": 1, "uniqueItems": true },
|
|
17
|
+
"acceptedIssuerEvidenceKinds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
|
|
18
|
+
"freshness": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["maxAgeSeconds", "expiresRequired"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"maxAgeSeconds": { "type": "integer", "minimum": 1 },
|
|
24
|
+
"expiresRequired": { "type": "boolean" }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"declaredAt": { "type": "string", "format": "date-time" }
|
|
28
|
+
},
|
|
29
|
+
"$defs": {
|
|
30
|
+
"target": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": ["kind", "locator", "identity", "ref", "environment"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"kind": { "enum": ["file", "directory", "repository", "ref", "artifact", "environment", "profile-source", "other"] },
|
|
36
|
+
"locator": { "type": "string", "minLength": 1 },
|
|
37
|
+
"identity": { "type": ["string", "null"] },
|
|
38
|
+
"ref": { "type": ["string", "null"] },
|
|
39
|
+
"environment": { "type": ["string", "null"] }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/operation-grant-v1.json",
|
|
4
|
+
"title": "ForgeRail Operation Grant v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "grantId", "grantDigest", "authorityRequirementId", "workspaceIdentityId", "envelopeId", "envelopeRevisionId", "executorId", "operation", "target", "subjectId", "candidateId", "scope", "issuerId", "issuerEvidenceId", "issuedAt", "notBefore", "expiresAt", "status", "invalidatedAt", "invalidationEvidenceId", "supersededByGrantId", "retroactiveEffect"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"grantId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"grantDigest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
12
|
+
"authorityRequirementId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
13
|
+
"workspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
14
|
+
"envelopeId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
15
|
+
"envelopeRevisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
16
|
+
"executorId": { "type": "string", "minLength": 1 },
|
|
17
|
+
"operation": { "type": "string", "minLength": 1 },
|
|
18
|
+
"target": { "$ref": "#/$defs/target" },
|
|
19
|
+
"subjectId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
20
|
+
"candidateId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
21
|
+
"scope": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
|
|
22
|
+
"issuerId": { "type": "string", "minLength": 1 },
|
|
23
|
+
"issuerEvidenceId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
24
|
+
"issuedAt": { "type": "string", "format": "date-time" },
|
|
25
|
+
"notBefore": { "type": "string", "format": "date-time" },
|
|
26
|
+
"expiresAt": { "type": "string", "format": "date-time" },
|
|
27
|
+
"status": { "enum": ["current", "expired", "revoked", "stale", "superseded"] },
|
|
28
|
+
"invalidatedAt": { "type": ["string", "null"], "format": "date-time" },
|
|
29
|
+
"invalidationEvidenceId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
30
|
+
"supersededByGrantId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
31
|
+
"retroactiveEffect": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": ["applies", "scope"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"applies": { "type": "boolean" },
|
|
37
|
+
"scope": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"$defs": {
|
|
42
|
+
"target": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"required": ["kind", "locator", "identity", "ref", "environment"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"kind": { "enum": ["file", "directory", "repository", "ref", "artifact", "environment", "profile-source", "other"] },
|
|
48
|
+
"locator": { "type": "string", "minLength": 1 },
|
|
49
|
+
"identity": { "type": ["string", "null"] },
|
|
50
|
+
"ref": { "type": ["string", "null"] },
|
|
51
|
+
"environment": { "type": ["string", "null"] }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"allOf": [
|
|
56
|
+
{
|
|
57
|
+
"if": { "properties": { "status": { "const": "current" } }, "required": ["status"] },
|
|
58
|
+
"then": {
|
|
59
|
+
"properties": {
|
|
60
|
+
"invalidatedAt": { "const": null },
|
|
61
|
+
"invalidationEvidenceId": { "const": null },
|
|
62
|
+
"supersededByGrantId": { "const": null }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"if": { "properties": { "status": { "const": "superseded" } }, "required": ["status"] },
|
|
68
|
+
"then": { "properties": { "supersededByGrantId": { "type": "string" } } }
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"if": { "properties": { "status": { "enum": ["expired", "revoked", "stale", "superseded"] } }, "required": ["status"] },
|
|
72
|
+
"then": { "properties": { "invalidatedAt": { "type": "string", "format": "date-time" } } }
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"if": { "properties": { "status": { "enum": ["revoked", "stale", "superseded"] } }, "required": ["status"] },
|
|
76
|
+
"then": { "properties": { "invalidationEvidenceId": { "type": "string" } } }
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"if": { "properties": { "retroactiveEffect": { "properties": { "applies": { "const": true } }, "required": ["applies"] } }, "required": ["retroactiveEffect"] },
|
|
80
|
+
"then": { "properties": { "retroactiveEffect": { "properties": { "scope": { "minItems": 1 } } } } }
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/phase-slice-correlation-v1.json",
|
|
4
|
+
"title": "ForgeRail Phase Slice Correlation v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "correlationId", "taskId", "parentTaskId", "phaseId", "sliceId", "executionAttemptId", "ownerWorkspaceIdentityId", "requiredSliceIds", "aggregateClosureClaim"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"correlationId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"taskId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
12
|
+
"parentTaskId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
13
|
+
"phaseId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
14
|
+
"sliceId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
15
|
+
"executionAttemptId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
16
|
+
"ownerWorkspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
17
|
+
"requiredSliceIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "minItems": 1, "uniqueItems": true },
|
|
18
|
+
"aggregateClosureClaim": { "const": false }
|
|
19
|
+
}
|
|
20
|
+
}
|