@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,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/profile-explanation-v1.json",
|
|
4
|
+
"title": "ForgeRail Profile Explanation v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "explanationId", "profileId", "profileRevisionId", "workspaceIdentityId", "generatedAt", "completeness", "sourceSummaries", "claimDecisions", "conflicts", "confirmationNeeds", "limitedReasons"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"explanationId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"profileId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
12
|
+
"profileRevisionId": { "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
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
15
|
+
"completeness": { "enum": ["complete", "degraded", "unresolved"] },
|
|
16
|
+
"sourceSummaries": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["sourceId", "status", "claimIds", "limitedReason"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"sourceId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
24
|
+
"status": { "enum": ["observed", "unavailable", "ambiguous", "unverified"] },
|
|
25
|
+
"claimIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
26
|
+
"limitedReason": { "type": ["string", "null"], "minLength": 1 }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"claimDecisions": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["claimId", "sourceId", "disposition", "reasonCode", "dependencyEdgeIds"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"claimId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
38
|
+
"sourceId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
39
|
+
"disposition": { "enum": ["active", "shadowed", "unresolved", "excluded"] },
|
|
40
|
+
"reasonCode": { "type": "string", "minLength": 1 },
|
|
41
|
+
"dependencyEdgeIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"conflicts": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": ["conflictId", "claimIds", "limitedReason", "confirmationRequired"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"conflictId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
53
|
+
"claimIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "minItems": 2, "uniqueItems": true },
|
|
54
|
+
"limitedReason": { "type": "string", "minLength": 1 },
|
|
55
|
+
"confirmationRequired": { "type": "boolean" }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"confirmationNeeds": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["needId", "claimIds", "reasonCode", "prompt"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"needId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
67
|
+
"claimIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "minItems": 1, "uniqueItems": true },
|
|
68
|
+
"reasonCode": { "type": "string", "minLength": 1 },
|
|
69
|
+
"prompt": { "type": "string", "minLength": 1 }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"limitedReasons": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
|
|
74
|
+
},
|
|
75
|
+
"allOf": [
|
|
76
|
+
{
|
|
77
|
+
"if": { "properties": { "completeness": { "const": "complete" } }, "required": ["completeness"] },
|
|
78
|
+
"then": {
|
|
79
|
+
"properties": {
|
|
80
|
+
"conflicts": { "maxItems": 0 },
|
|
81
|
+
"confirmationNeeds": { "maxItems": 0 },
|
|
82
|
+
"limitedReasons": { "maxItems": 0 }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"if": { "properties": { "completeness": { "enum": ["degraded", "unresolved"] } }, "required": ["completeness"] },
|
|
88
|
+
"then": { "properties": { "limitedReasons": { "minItems": 1 } } }
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/provider-adapter-observation-v1.json",
|
|
4
|
+
"title": "ForgeRail Provider Adapter Observation v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "observationId", "adapterId", "adapterVersion", "providerId", "workspaceIdentityId", "sourceIdentityId", "scopeKind", "taskId", "subjectId", "controlRevisionId", "identity", "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
|
+
"providerId": { "type": "string", "pattern": "^[a-z][a-z0-9-]+$" },
|
|
14
|
+
"workspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
15
|
+
"sourceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
16
|
+
"scopeKind": { "enum": ["workspace", "task", "subject"] },
|
|
17
|
+
"taskId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
18
|
+
"subjectId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
19
|
+
"controlRevisionId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
20
|
+
"identity": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["state", "actorId", "evidenceIdentityIds", "limitedReason"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"state": { "enum": ["authenticated", "unauthenticated", "unverified", "unavailable", "not-required"] },
|
|
26
|
+
"actorId": { "type": ["string", "null"], "minLength": 1 },
|
|
27
|
+
"evidenceIdentityIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
28
|
+
"limitedReason": { "anyOf": [{ "$ref": "https://forgerail.dev/schemas/limited-reason-v1.json" }, { "type": "null" }] }
|
|
29
|
+
},
|
|
30
|
+
"allOf": [
|
|
31
|
+
{
|
|
32
|
+
"if": { "properties": { "state": { "const": "authenticated" } }, "required": ["state"] },
|
|
33
|
+
"then": { "properties": { "actorId": { "type": "string" }, "evidenceIdentityIds": { "minItems": 1 }, "limitedReason": { "const": null } } }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"if": { "properties": { "state": { "enum": ["unauthenticated", "unverified", "unavailable"] } }, "required": ["state"] },
|
|
37
|
+
"then": { "properties": { "actorId": { "const": null }, "limitedReason": { "$ref": "https://forgerail.dev/schemas/limited-reason-v1.json" } } }
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"if": { "properties": { "state": { "const": "not-required" } }, "required": ["state"] },
|
|
41
|
+
"then": { "properties": { "actorId": { "const": null }, "limitedReason": { "const": null } } }
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"authorizationClaim": { "const": false },
|
|
46
|
+
"capabilities": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"minItems": 1,
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["capability", "state", "requiresIdentity", "sideEffectKinds", "approvalRequirementIds", "evidenceIdentityIds", "limitedReason"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"capability": { "enum": ["source-observation", "evidence-observation", "authority-observation", "read", "write", "side-effect", "trust-observation", "freshness-observation", "revocation-observation"] },
|
|
55
|
+
"state": { "enum": ["supported", "profile-only", "degraded", "blocked", "unavailable", "unknown"] },
|
|
56
|
+
"requiresIdentity": { "type": "boolean" },
|
|
57
|
+
"sideEffectKinds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
58
|
+
"approvalRequirementIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
59
|
+
"evidenceIdentityIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
60
|
+
"limitedReason": { "anyOf": [{ "$ref": "https://forgerail.dev/schemas/limited-reason-v1.json" }, { "type": "null" }] }
|
|
61
|
+
},
|
|
62
|
+
"allOf": [
|
|
63
|
+
{
|
|
64
|
+
"if": { "properties": { "state": { "const": "supported" } }, "required": ["state"] },
|
|
65
|
+
"then": { "properties": { "evidenceIdentityIds": { "minItems": 1 }, "limitedReason": { "const": null } } }
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"if": { "properties": { "state": { "enum": ["profile-only", "degraded", "blocked", "unavailable", "unknown"] } }, "required": ["state"] },
|
|
69
|
+
"then": { "properties": { "limitedReason": { "$ref": "https://forgerail.dev/schemas/limited-reason-v1.json" } } }
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
75
|
+
"sanitized": { "const": true }
|
|
76
|
+
},
|
|
77
|
+
"allOf": [
|
|
78
|
+
{
|
|
79
|
+
"if": { "properties": { "scopeKind": { "enum": ["task", "subject"] } }, "required": ["scopeKind"] },
|
|
80
|
+
"then": { "properties": { "taskId": { "type": "string" }, "controlRevisionId": { "type": "string" } } }
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"if": { "properties": { "scopeKind": { "const": "subject" } }, "required": ["scopeKind"] },
|
|
84
|
+
"then": { "properties": { "subjectId": { "type": "string" } } }
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/return-receipt-v2.json",
|
|
4
|
+
"title": "ForgeRail Return Receipt v2",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "receiptId", "taskId", "workspaceIdentityId", "profileId", "profileRevisionId", "envelopeId", "envelopeRevisionId", "controlRevisionId", "subjectId", "phaseSliceCorrelation", "exercisedOperationGrantIds", "changedScope", "validationEvidenceIdentityIds", "externalSideEffects", "confirmedNonMutations", "residualRisks", "rollbackEnvelopeLineageId", "deviations", "claimStatus", "verificationGateResultId", "closeout", "claimedAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "2.0" },
|
|
10
|
+
"receiptId": { "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
|
+
"workspaceIdentityId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
13
|
+
"profileId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
14
|
+
"profileRevisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
15
|
+
"envelopeId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
16
|
+
"envelopeRevisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
17
|
+
"controlRevisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
18
|
+
"subjectId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
19
|
+
"phaseSliceCorrelation": { "$ref": "https://forgerail.dev/schemas/phase-slice-correlation-v1.json" },
|
|
20
|
+
"exercisedOperationGrantIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
21
|
+
"changedScope": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
22
|
+
"validationEvidenceIdentityIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
23
|
+
"externalSideEffects": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["operationId", "targetLocator", "observedAt"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"operationId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
31
|
+
"targetLocator": { "type": "string", "minLength": 1 },
|
|
32
|
+
"observedAt": { "type": "string", "format": "date-time" }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"confirmedNonMutations": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
37
|
+
"residualRisks": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
38
|
+
"rollbackEnvelopeLineageId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
39
|
+
"deviations": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
40
|
+
"claimStatus": { "enum": ["claimed", "verified", "rejected", "stale"] },
|
|
41
|
+
"verificationGateResultId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
42
|
+
"closeout": { "enum": ["complete", "incomplete", "blocked"] },
|
|
43
|
+
"claimedAt": { "type": "string", "format": "date-time" }
|
|
44
|
+
},
|
|
45
|
+
"allOf": [
|
|
46
|
+
{
|
|
47
|
+
"if": { "properties": { "claimStatus": { "const": "verified" } }, "required": ["claimStatus"] },
|
|
48
|
+
"then": { "properties": { "verificationGateResultId": { "type": "string" } } }
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"if": { "properties": { "closeout": { "const": "complete" } }, "required": ["closeout"] },
|
|
52
|
+
"then": { "properties": { "claimStatus": { "const": "verified" }, "verificationGateResultId": { "type": "string" }, "deviations": { "maxItems": 0 } } }
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/review-authority-requirement-v1.json",
|
|
4
|
+
"title": "ForgeRail Review Authority Requirement v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "requirementId", "workspaceIdentityId", "operation", "authorityClass", "subjectId", "scope", "authoritySourceIds", "acceptedEvidenceKinds", "quorum", "actorConstraints", "ownerCoverage", "freshness", "substitutionPolicy", "waiverPolicy", "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
|
+
"authorityClass": { "$ref": "#/$defs/authorityClass" },
|
|
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
|
+
"authoritySourceIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "minItems": 1, "uniqueItems": true },
|
|
17
|
+
"acceptedEvidenceKinds": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
|
|
18
|
+
"quorum": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"required": ["minimumCount", "distinctActors"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"minimumCount": { "type": "integer", "minimum": 1 },
|
|
24
|
+
"distinctActors": { "type": "boolean" }
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"actorConstraints": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"required": ["eligibleActorSourceIds", "excludedRelations"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"eligibleActorSourceIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
33
|
+
"excludedRelations": { "type": "array", "items": { "enum": ["subject-author", "executor", "evidence-author"] }, "uniqueItems": true }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"ownerCoverage": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["required", "surfaceIds"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"required": { "type": "boolean" },
|
|
42
|
+
"surfaceIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"freshness": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["maxAgeSeconds", "expiresRequired"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"maxAgeSeconds": { "type": "integer", "minimum": 1 },
|
|
51
|
+
"expiresRequired": { "type": "boolean" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"substitutionPolicy": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": ["mode", "equivalenceEdges"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"mode": { "enum": ["none", "bounded-equivalence"] },
|
|
60
|
+
"equivalenceEdges": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"required": ["edgeId", "fromAuthorityClass", "toRequirementId", "sourceId", "direction", "transitive"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"edgeId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
68
|
+
"fromAuthorityClass": { "$ref": "#/$defs/authorityClass" },
|
|
69
|
+
"toRequirementId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
70
|
+
"sourceId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
71
|
+
"direction": { "const": "one-way" },
|
|
72
|
+
"transitive": { "const": false }
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"uniqueItems": true
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"waiverPolicy": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": ["allowed", "requiredAuthorityClass"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"allowed": { "type": "boolean" },
|
|
85
|
+
"requiredAuthorityClass": { "anyOf": [{ "$ref": "#/$defs/authorityClass" }, { "type": "null" }] }
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"declaredAt": { "type": "string", "format": "date-time" }
|
|
89
|
+
},
|
|
90
|
+
"$defs": {
|
|
91
|
+
"authorityClass": {
|
|
92
|
+
"enum": ["agent_review", "automated_validation", "peer_review", "ownership_approval", "security_approval", "release_approval", "environment_approval"]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"allOf": [
|
|
96
|
+
{
|
|
97
|
+
"if": { "properties": { "ownerCoverage": { "properties": { "required": { "const": true } }, "required": ["required"] } }, "required": ["ownerCoverage"] },
|
|
98
|
+
"then": { "properties": { "ownerCoverage": { "properties": { "surfaceIds": { "minItems": 1 } } } } }
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"if": { "properties": { "substitutionPolicy": { "properties": { "mode": { "const": "none" } }, "required": ["mode"] } }, "required": ["substitutionPolicy"] },
|
|
102
|
+
"then": { "properties": { "substitutionPolicy": { "properties": { "equivalenceEdges": { "maxItems": 0 } } } } }
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"if": { "properties": { "substitutionPolicy": { "properties": { "mode": { "const": "bounded-equivalence" } }, "required": ["mode"] } }, "required": ["substitutionPolicy"] },
|
|
106
|
+
"then": { "properties": { "substitutionPolicy": { "properties": { "equivalenceEdges": { "minItems": 1 } } } } }
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"if": { "properties": { "waiverPolicy": { "properties": { "allowed": { "const": false } }, "required": ["allowed"] } }, "required": ["waiverPolicy"] },
|
|
110
|
+
"then": { "properties": { "waiverPolicy": { "properties": { "requiredAuthorityClass": { "const": null } } } } }
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"if": { "properties": { "waiverPolicy": { "properties": { "allowed": { "const": true } }, "required": ["allowed"] } }, "required": ["waiverPolicy"] },
|
|
114
|
+
"then": { "properties": { "waiverPolicy": { "properties": { "requiredAuthorityClass": { "$ref": "#/$defs/authorityClass" } } } } }
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/rollback-envelope-lineage-v1.json",
|
|
4
|
+
"title": "ForgeRail Rollback Envelope Lineage v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "lineageId", "workspaceIdentityId", "forwardEnvelope", "rollbackEnvelope", "forwardOperationGrantIds", "rollbackOperationGrantIds", "rollbackOperationIds", "state", "validationGateResultIds", "rollbackReceiptId", "declaredByEvidenceId", "reason", "createdAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"lineageId": { "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
|
+
"forwardEnvelope": { "$ref": "#/$defs/envelopeReference" },
|
|
13
|
+
"rollbackEnvelope": { "$ref": "#/$defs/envelopeReference" },
|
|
14
|
+
"forwardOperationGrantIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
15
|
+
"rollbackOperationGrantIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
16
|
+
"rollbackOperationIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "minItems": 1, "uniqueItems": true },
|
|
17
|
+
"state": { "enum": ["awaiting_authorization", "authorized", "executed", "verified", "blocked"] },
|
|
18
|
+
"validationGateResultIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
19
|
+
"rollbackReceiptId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
20
|
+
"declaredByEvidenceId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
21
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
22
|
+
"createdAt": { "type": "string", "format": "date-time" }
|
|
23
|
+
},
|
|
24
|
+
"$defs": {
|
|
25
|
+
"envelopeReference": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["envelopeId", "revisionId", "subjectId"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"envelopeId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
31
|
+
"revisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
32
|
+
"subjectId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"allOf": [
|
|
37
|
+
{
|
|
38
|
+
"if": { "properties": { "state": { "enum": ["authorized", "executed", "verified"] } }, "required": ["state"] },
|
|
39
|
+
"then": { "properties": { "rollbackOperationGrantIds": { "minItems": 1 } } }
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"if": { "properties": { "state": { "const": "verified" } }, "required": ["state"] },
|
|
43
|
+
"then": { "properties": { "validationGateResultIds": { "minItems": 1 }, "rollbackReceiptId": { "type": "string" } } }
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/rule-claim-v1.json",
|
|
4
|
+
"title": "ForgeRail Rule Claim v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "claimId", "workspaceIdentityId", "sourceId", "ruleKey", "normalizedValue", "precedenceClass", "applicabilityScope", "observationPoint", "status", "enforcement", "dependencyEdgeIds", "observedAt", "limitedReason"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"claimId": { "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
|
+
"sourceId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
13
|
+
"ruleKey": { "type": "string", "pattern": "^[a-z][a-z0-9.-]+$" },
|
|
14
|
+
"normalizedValue": {},
|
|
15
|
+
"precedenceClass": { "type": "string", "minLength": 1 },
|
|
16
|
+
"applicabilityScope": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
|
|
17
|
+
"observationPoint": { "type": "string", "minLength": 1 },
|
|
18
|
+
"status": { "enum": ["observed", "inferred", "confirmed", "default", "requires-confirmation"] },
|
|
19
|
+
"enforcement": { "enum": ["enforceable", "advisory", "unresolved"] },
|
|
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": { "status": { "enum": ["inferred", "requires-confirmation"] } }, "required": ["status"] },
|
|
27
|
+
"then": { "properties": { "enforcement": { "enum": ["advisory", "unresolved"] } } }
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"if": { "properties": { "enforcement": { "const": "unresolved" } }, "required": ["enforcement"] },
|
|
31
|
+
"then": { "properties": { "limitedReason": { "type": "string", "minLength": 1 } } }
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/source-dependency-edge-v1.json",
|
|
4
|
+
"title": "ForgeRail Source Dependency Edge v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "edgeId", "workspaceIdentityId", "declaringSourceId", "target", "requiredness", "applicabilityScope", "provenanceStatus", "observationStatus", "affectedClaimIds", "observedAt", "limitedReason"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"edgeId": { "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
|
+
"declaringSourceId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
13
|
+
"target": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"required": ["kind", "locator", "identity"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"kind": { "enum": ["skill", "pack", "command", "script", "record-entry", "source", "schema", "other"] },
|
|
19
|
+
"locator": { "type": "string", "minLength": 1 },
|
|
20
|
+
"identity": { "type": ["string", "null"], "minLength": 1 }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"requiredness": { "enum": ["required", "optional"] },
|
|
24
|
+
"applicabilityScope": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
|
|
25
|
+
"provenanceStatus": { "enum": ["structured", "provider-declared", "confirmed", "inferred", "requires-confirmation"] },
|
|
26
|
+
"observationStatus": { "enum": ["available", "unavailable", "ambiguous", "unverified"] },
|
|
27
|
+
"affectedClaimIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
28
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
29
|
+
"limitedReason": { "type": ["string", "null"], "minLength": 1 }
|
|
30
|
+
},
|
|
31
|
+
"allOf": [
|
|
32
|
+
{
|
|
33
|
+
"if": { "properties": { "observationStatus": { "enum": ["unavailable", "ambiguous", "unverified"] } }, "required": ["observationStatus"] },
|
|
34
|
+
"then": { "properties": { "limitedReason": { "type": "string", "minLength": 1 } } }
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/task-control-revision-v1.json",
|
|
4
|
+
"title": "ForgeRail Task Control Revision v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "revisionId", "predecessorRevisionId", "taskId", "workspaceIdentityId", "profileId", "profileRevisionId", "envelopeId", "envelopeRevisionId", "subjectId", "entryMode", "phaseSliceCorrelation", "state", "operationGrantIds", "gateResultIds", "evidenceIdentityIds", "deviationEvidenceIds", "returnReceiptId", "observedAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "1.0" },
|
|
10
|
+
"revisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
11
|
+
"predecessorRevisionId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
12
|
+
"taskId": { "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
|
+
"profileId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
15
|
+
"profileRevisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
16
|
+
"envelopeId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
17
|
+
"envelopeRevisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
18
|
+
"subjectId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
19
|
+
"entryMode": { "$ref": "https://forgerail.dev/schemas/entry-mode-v1.json" },
|
|
20
|
+
"phaseSliceCorrelation": { "$ref": "https://forgerail.dev/schemas/phase-slice-correlation-v1.json" },
|
|
21
|
+
"state": { "enum": ["observed", "profile_resolved", "awaiting_authorization", "ready_for_execution", "execution_finished", "verification_pending", "deviation_requires_review", "blocked", "closed"] },
|
|
22
|
+
"operationGrantIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
23
|
+
"gateResultIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
24
|
+
"evidenceIdentityIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
25
|
+
"deviationEvidenceIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
26
|
+
"returnReceiptId": { "type": ["string", "null"], "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
27
|
+
"observedAt": { "type": "string", "format": "date-time" }
|
|
28
|
+
},
|
|
29
|
+
"allOf": [
|
|
30
|
+
{
|
|
31
|
+
"if": { "properties": { "state": { "const": "closed" } }, "required": ["state"] },
|
|
32
|
+
"then": { "properties": { "returnReceiptId": { "type": "string" }, "deviationEvidenceIds": { "maxItems": 0 } } }
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"if": { "properties": { "state": { "const": "deviation_requires_review" } }, "required": ["state"] },
|
|
36
|
+
"then": { "properties": { "deviationEvidenceIds": { "minItems": 1 } } }
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://forgerail.dev/schemas/task-envelope-v2.json",
|
|
4
|
+
"title": "ForgeRail Task Envelope v2",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "envelopeId", "revisionId", "taskId", "workspaceIdentityId", "profileId", "profileRevisionId", "subject", "intent", "nonGoals", "entryMode", "phaseSliceCorrelation", "operations", "prohibitedOperations", "requiredGateIds", "returnContract", "createdAt"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "2.0" },
|
|
10
|
+
"envelopeId": { "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
|
+
"taskId": { "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
|
+
"profileId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
15
|
+
"profileRevisionId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
16
|
+
"subject": { "$ref": "#/$defs/subject" },
|
|
17
|
+
"intent": { "type": "string", "minLength": 1 },
|
|
18
|
+
"nonGoals": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
19
|
+
"entryMode": { "$ref": "https://forgerail.dev/schemas/entry-mode-v1.json" },
|
|
20
|
+
"phaseSliceCorrelation": { "$ref": "https://forgerail.dev/schemas/phase-slice-correlation-v1.json" },
|
|
21
|
+
"operations": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["operationId", "operation", "target", "scope", "authorityRequirementId"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"operationId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
29
|
+
"operation": { "type": "string", "minLength": 1 },
|
|
30
|
+
"target": { "$ref": "#/$defs/target" },
|
|
31
|
+
"scope": { "type": "array", "items": { "type": "string", "minLength": 1 }, "minItems": 1, "uniqueItems": true },
|
|
32
|
+
"authorityRequirementId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"uniqueItems": true
|
|
36
|
+
},
|
|
37
|
+
"prohibitedOperations": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
38
|
+
"requiredGateIds": { "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" }, "uniqueItems": true },
|
|
39
|
+
"returnContract": { "const": "return-receipt-v2" },
|
|
40
|
+
"createdAt": { "type": "string", "format": "date-time" }
|
|
41
|
+
},
|
|
42
|
+
"$defs": {
|
|
43
|
+
"subject": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["subjectId", "kind", "digest", "locator"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"subjectId": { "type": "string", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]+$" },
|
|
49
|
+
"kind": { "enum": ["commit", "tree", "diff", "artifact", "candidate", "workspace-state", "other"] },
|
|
50
|
+
"digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
51
|
+
"locator": { "type": ["string", "null"] }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"target": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": ["kind", "locator", "identity", "ref", "environment"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"kind": { "enum": ["file", "directory", "repository", "ref", "artifact", "environment", "profile-source", "other"] },
|
|
60
|
+
"locator": { "type": "string", "minLength": 1 },
|
|
61
|
+
"identity": { "type": ["string", "null"] },
|
|
62
|
+
"ref": { "type": ["string", "null"] },
|
|
63
|
+
"environment": { "type": ["string", "null"] }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|