gentle-pi 1.2.0 → 2.0.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/README.md +40 -9
- package/assets/agents/review-readability.md +0 -1
- package/assets/agents/review-reliability.md +0 -1
- package/assets/agents/review-resilience.md +0 -1
- package/assets/agents/review-risk.md +0 -1
- package/contracts/review-integration/v1/fixtures/binding-revision-conflict.fixture.json +25 -0
- package/contracts/review-integration/v1/fixtures/capabilities-v1.2.fixture.json +263 -0
- package/contracts/review-integration/v1/fixtures/capabilities-v1.3.fixture.json +301 -0
- package/contracts/review-integration/v1/fixtures/capabilities-v1.4.fixture.json +312 -0
- package/contracts/review-integration/v1/fixtures/capabilities-v1.5.fixture.json +321 -0
- package/contracts/review-integration/v1/fixtures/consent.fixture.json +36 -0
- package/contracts/review-integration/v1/fixtures/final-verification-incident.fixture.json +1 -0
- package/contracts/review-integration/v1/fixtures/operation.fixture.json +4 -0
- package/contracts/review-integration/v1/fixtures/repair-preflight.fixture.json +54 -0
- package/contracts/review-integration/v1/fixtures/start-v2.fixture.json +97 -0
- package/contracts/review-integration/v1/fixtures/start.fixture.json +25 -1
- package/contracts/review-integration/v1/fixtures/status-ambiguous.fixture.json +4 -0
- package/contracts/review-integration/v1/fixtures/status-corrupted.fixture.json +4 -0
- package/contracts/review-integration/v1/fixtures/status-recover.fixture.json +4 -0
- package/contracts/review-integration/v1/fixtures/status-unrelated.fixture.json +4 -0
- package/contracts/review-integration/v1/fixtures/status-v2-ambiguous.fixture.json +110 -0
- package/contracts/review-integration/v1/fixtures/status-v2-corrupted.fixture.json +107 -0
- package/contracts/review-integration/v1/fixtures/status-v2-final-verification-retry.fixture.json +192 -0
- package/contracts/review-integration/v1/fixtures/status-v2-recover.fixture.json +130 -0
- package/contracts/review-integration/v1/fixtures/status-v2-repair.fixture.json +161 -0
- package/contracts/review-integration/v1/fixtures/status-v2-unrelated.fixture.json +103 -0
- package/contracts/review-integration/v1/fixtures/status-v2.fixture.json +193 -0
- package/contracts/review-integration/v1/fixtures/status.fixture.json +19 -5
- package/contracts/review-integration/v1/fixtures/verification-evidence.fixture.json +1 -0
- package/contracts/review-integration/v1/schemas/admitted-result.schema.json +35 -0
- package/contracts/review-integration/v1/schemas/artifact-subject.schema.json +33 -0
- package/contracts/review-integration/v1/schemas/authority-repair-assessment.schema.json +247 -0
- package/contracts/review-integration/v1/schemas/capabilities-v1.2.schema.json +249 -0
- package/contracts/review-integration/v1/schemas/capabilities-v1.3.schema.json +429 -0
- package/contracts/review-integration/v1/schemas/capabilities-v1.4.schema.json +432 -0
- package/contracts/review-integration/v1/schemas/capabilities-v1.5.schema.json +154 -0
- package/contracts/review-integration/v1/schemas/consent.schema.json +86 -0
- package/contracts/review-integration/v1/schemas/failure.schema.json +54 -8
- package/contracts/review-integration/v1/schemas/final-verification-incident.schema.json +51 -0
- package/contracts/review-integration/v1/schemas/operation.schema.json +204 -31
- package/contracts/review-integration/v1/schemas/repair.schema.json +251 -0
- package/contracts/review-integration/v1/schemas/result-artifact-v2.schema.json +38 -0
- package/contracts/review-integration/v1/schemas/start-v2.schema.json +216 -0
- package/contracts/review-integration/v1/schemas/start.schema.json +79 -3
- package/contracts/review-integration/v1/schemas/status-v2.schema.json +313 -0
- package/contracts/review-integration/v1/schemas/status.schema.json +37 -10
- package/contracts/review-integration/v1/schemas/targeted-validation-request.schema.json +46 -0
- package/contracts/review-integration/v1/schemas/verification-evidence.schema.json +64 -0
- package/contracts/review-integration/v2/fixtures/capabilities.fixture.json +111 -0
- package/contracts/review-integration/v2/fixtures/consent.fixture.json +36 -0
- package/contracts/review-integration/v2/fixtures/start.fixture.json +93 -0
- package/contracts/review-integration/v2/fixtures/status.fixture.json +113 -0
- package/contracts/review-integration/v2/schemas/admitted-result.schema.json +14 -0
- package/contracts/review-integration/v2/schemas/artifact-subject.schema.json +36 -0
- package/contracts/review-integration/v2/schemas/capabilities.schema.json +111 -0
- package/contracts/review-integration/v2/schemas/consent.schema.json +70 -0
- package/contracts/review-integration/v2/schemas/failure.schema.json +35 -0
- package/contracts/review-integration/v2/schemas/operation.schema.json +46 -0
- package/contracts/review-integration/v2/schemas/repair.schema.json +22 -0
- package/contracts/review-integration/v2/schemas/start.schema.json +106 -0
- package/contracts/review-integration/v2/schemas/status.schema.json +104 -0
- package/docs/native-authority-architecture.md +18 -3
- package/docs/review-integration.md +175 -27
- package/extensions/gentle-ai.ts +414 -19
- package/lib/gentle-ai-binary.ts +1 -1
- package/lib/native-review-cli.ts +679 -57
- package/lib/review-candidate-view.ts +131 -1
- package/lib/review-compact-contract.ts +12 -3
- package/lib/review-consent-latch.ts +51 -0
- package/lib/review-correction-lifecycle.ts +170 -0
- package/lib/review-integration-v2.ts +1563 -0
- package/package.json +15 -11
- package/runtime/gentle-ai-binary.mjs +1 -1
- package/runtime/native-review-cli.mjs +663 -41
- package/runtime/review-integration-v2.mjs +1564 -0
- package/scripts/build-git-commit-transaction-runner.mjs +1 -1
- package/scripts/gentle-ai-installer.mjs +16 -11
- package/scripts/install-gentle-ai.mjs +7 -3
- package/scripts/test-packed-runner.mjs +2 -2
- package/scripts/verify-package-files.mjs +216 -64
- package/skills/release/SKILL.md +38 -11
- package/tests/devbinary/native-review-parity.devtest.ts +348 -0
- package/tests/gentle-ai-binary.test.ts +8 -1
- package/tests/gentle-ai-installer.test.ts +24 -21
- package/tests/native-binary-gate.test.ts +145 -0
- package/tests/native-review-capability-contract.test.ts +87 -0
- package/tests/native-review-cli.test.ts +44 -1
- package/tests/native-review-parity-runtime.test.ts +70 -23
- package/tests/native-review-parity.test.ts +673 -0
- package/tests/native-risk-evidence-parity.test.ts +91 -0
- package/tests/package-manifest.test.ts +72 -7
- package/tests/review-actor-tool-deny.test.ts +20 -5
- package/tests/review-candidate-view.test.ts +331 -1
- package/tests/review-compact-contract.test.ts +5 -0
- package/tests/review-consent-latch.test.ts +67 -0
- package/tests/review-controller-native-recovery.test.ts +180 -5
- package/tests/review-controller-native-routing.test.ts +385 -12
- package/tests/review-controller-workspace-root.test.ts +26 -6
- package/tests/review-correction-lifecycle.test.ts +174 -0
- package/tests/review-integration-v2.test.ts +539 -0
- package/tests/runtime-harness.mjs +187 -0
- package/tests/support/native-binary-gate.ts +86 -0
- package/tests/verify-package-files.test.ts +119 -0
- package/lib/review-integration-v1.ts +0 -795
- package/runtime/review-integration-v1.mjs +0 -796
- package/tests/native-review-integration-v1.test.ts +0 -102
- package/tests/review-integration-v1.test.ts +0 -530
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"schema": {"const": "gentle-ai.review-integration.failure/v1"},
|
|
23
23
|
"contract": {"const": "gentle-ai.review-integration/v1"},
|
|
24
24
|
"operation": {
|
|
25
|
-
"enum": ["review.capabilities", "review.start", "review.status", "review.finalize", "review.validate", "review.bind_sdd"]
|
|
25
|
+
"enum": ["review.capabilities", "review.start", "review.status", "review.finalize", "review.repair", "review.retry_final_verification", "review.validate", "review.bind_sdd"]
|
|
26
26
|
},
|
|
27
27
|
"phase": {"enum": ["preflight", "pre_native", "native_running", "native_committed", "reconciliation"]},
|
|
28
28
|
"code": {"type": "string", "pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$"},
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"replayability": {"enum": ["not_replayable", "exact_replay_safe", "status_required", "manual_action_required"]},
|
|
34
34
|
"lineage_id": {"type": "string", "maxLength": 128, "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"},
|
|
35
35
|
"request_digest": {"$ref": "#/$defs/sha256"},
|
|
36
|
+
"progress_identity": {"$ref": "#/$defs/sha256"},
|
|
36
37
|
"required_inputs": {
|
|
37
38
|
"type": "array",
|
|
38
39
|
"uniqueItems": true,
|
|
@@ -46,14 +47,42 @@
|
|
|
46
47
|
"successor_lineage_id",
|
|
47
48
|
"disposition",
|
|
48
49
|
"reason",
|
|
49
|
-
"actor"
|
|
50
|
+
"actor",
|
|
51
|
+
"incident",
|
|
52
|
+
"maintainer_authorization",
|
|
53
|
+
"base_ref"
|
|
50
54
|
]
|
|
51
55
|
}
|
|
52
56
|
},
|
|
53
|
-
"next_action": {"enum": ["correct_request", "retry", "retry_with_bounded_backoff", "review.status", "review.finalize", "review.bind_sdd", "explicit-maintainer-action", "stop"]},
|
|
57
|
+
"next_action": {"enum": ["correct_request", "retry", "retry_with_bounded_backoff", "review.status", "review.finalize", "review.repair", "review.bind_sdd", "explicit-maintainer-action", "stop"]},
|
|
54
58
|
"cause_category": {"enum": ["inventory_io_or_layout", "lock_ambiguous", "reset_residue", "record_or_graph_invalid", "inventory_incomplete"]},
|
|
59
|
+
"cause": {"type": "string", "minLength": 1, "maxLength": 4000, "pattern": "^[^\\r\\n]+$"},
|
|
55
60
|
"context": {"$ref": "#/$defs/gate_context"}
|
|
56
61
|
},
|
|
62
|
+
"allOf": [
|
|
63
|
+
{
|
|
64
|
+
"if": {
|
|
65
|
+
"required": ["progress_identity"]
|
|
66
|
+
},
|
|
67
|
+
"then": {
|
|
68
|
+
"required": ["lineage_id", "request_digest"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"operation": {"const": "review.repair"}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"if": {
|
|
76
|
+
"required": ["request_digest"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"operation": {"const": "review.repair"}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"then": {
|
|
82
|
+
"required": ["progress_identity"]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
],
|
|
57
86
|
"$defs": {
|
|
58
87
|
"sha256": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
|
|
59
88
|
"tree": {"type": "string", "pattern": "^[0-9a-f]{40}(?:[0-9a-f]{24})?$"},
|
|
@@ -103,15 +132,32 @@
|
|
|
103
132
|
}
|
|
104
133
|
}
|
|
105
134
|
},
|
|
106
|
-
"
|
|
135
|
+
"optional_sha256": {
|
|
136
|
+
"anyOf": [
|
|
137
|
+
{"const": ""},
|
|
138
|
+
{"$ref": "#/$defs/sha256"}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"binding_revision": {
|
|
107
142
|
"type": "object",
|
|
108
143
|
"additionalProperties": false,
|
|
109
|
-
"required": [
|
|
110
|
-
"scope_change"
|
|
111
|
-
],
|
|
144
|
+
"required": ["expected", "current"],
|
|
112
145
|
"properties": {
|
|
113
|
-
"
|
|
146
|
+
"expected": {"$ref": "#/$defs/optional_sha256"},
|
|
147
|
+
"current": {"$ref": "#/$defs/optional_sha256"}
|
|
114
148
|
}
|
|
149
|
+
},
|
|
150
|
+
"gate_context": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"additionalProperties": false,
|
|
153
|
+
"properties": {
|
|
154
|
+
"scope_change": {"$ref": "#/$defs/scope_change"},
|
|
155
|
+
"binding_revision": {"$ref": "#/$defs/binding_revision"}
|
|
156
|
+
},
|
|
157
|
+
"oneOf": [
|
|
158
|
+
{"required": ["scope_change"]},
|
|
159
|
+
{"required": ["binding_revision"]}
|
|
160
|
+
]
|
|
115
161
|
}
|
|
116
162
|
}
|
|
117
163
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gentle-ai.dev/contracts/review-integration/v1/schemas/final-verification-incident.schema.json",
|
|
4
|
+
"title": "Gentle AI final-verification tooling incident",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema",
|
|
9
|
+
"class",
|
|
10
|
+
"lineage_id",
|
|
11
|
+
"terminal_revision",
|
|
12
|
+
"validating_revision",
|
|
13
|
+
"target_identity",
|
|
14
|
+
"failed_evidence_hash",
|
|
15
|
+
"finalize_request_digest"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schema": {
|
|
19
|
+
"const": "gentle-ai.review-final-verification-incident/v1"
|
|
20
|
+
},
|
|
21
|
+
"class": {
|
|
22
|
+
"const": "procedural_tooling_failure"
|
|
23
|
+
},
|
|
24
|
+
"lineage_id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"maxLength": 128,
|
|
27
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
28
|
+
},
|
|
29
|
+
"terminal_revision": {
|
|
30
|
+
"$ref": "#/$defs/sha256"
|
|
31
|
+
},
|
|
32
|
+
"validating_revision": {
|
|
33
|
+
"$ref": "#/$defs/sha256"
|
|
34
|
+
},
|
|
35
|
+
"target_identity": {
|
|
36
|
+
"$ref": "#/$defs/sha256"
|
|
37
|
+
},
|
|
38
|
+
"failed_evidence_hash": {
|
|
39
|
+
"$ref": "#/$defs/sha256"
|
|
40
|
+
},
|
|
41
|
+
"finalize_request_digest": {
|
|
42
|
+
"$ref": "#/$defs/sha256"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"$defs": {
|
|
46
|
+
"sha256": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -4,16 +4,41 @@
|
|
|
4
4
|
"title": "Gentle AI negotiated review operation result",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
-
"required": [
|
|
7
|
+
"required": [
|
|
8
|
+
"schema",
|
|
9
|
+
"contract",
|
|
10
|
+
"operation",
|
|
11
|
+
"result"
|
|
12
|
+
],
|
|
8
13
|
"properties": {
|
|
9
|
-
"schema": {
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
"schema": {
|
|
15
|
+
"const": "gentle-ai.review-integration.operation/v1"
|
|
16
|
+
},
|
|
17
|
+
"contract": {
|
|
18
|
+
"const": "gentle-ai.review-integration/v1"
|
|
19
|
+
},
|
|
20
|
+
"operation": {
|
|
21
|
+
"enum": [
|
|
22
|
+
"review.finalize",
|
|
23
|
+
"review.validate",
|
|
24
|
+
"review.bind_sdd",
|
|
25
|
+
"review.retry_final_verification"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
12
28
|
"result": {
|
|
13
29
|
"oneOf": [
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
30
|
+
{
|
|
31
|
+
"$ref": "#/$defs/finalize"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"$ref": "#/$defs/validate"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"$ref": "#/$defs/bind_sdd"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"$ref": "#/$defs/retry_final_verification"
|
|
41
|
+
}
|
|
17
42
|
]
|
|
18
43
|
}
|
|
19
44
|
},
|
|
@@ -25,42 +50,190 @@
|
|
|
25
50
|
"finalize": {
|
|
26
51
|
"type": "object",
|
|
27
52
|
"additionalProperties": false,
|
|
28
|
-
"required": [
|
|
53
|
+
"required": [
|
|
54
|
+
"operation",
|
|
55
|
+
"lineage_id",
|
|
56
|
+
"state",
|
|
57
|
+
"action",
|
|
58
|
+
"store_revision"
|
|
59
|
+
],
|
|
29
60
|
"properties": {
|
|
30
|
-
"operation": {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
61
|
+
"operation": {
|
|
62
|
+
"const": "review/finalize"
|
|
63
|
+
},
|
|
64
|
+
"lineage_id": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1
|
|
67
|
+
},
|
|
68
|
+
"state": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"minLength": 1
|
|
71
|
+
},
|
|
72
|
+
"action": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"minLength": 1
|
|
75
|
+
},
|
|
76
|
+
"store_revision": {
|
|
77
|
+
"$ref": "#/$defs/sha256"
|
|
78
|
+
},
|
|
79
|
+
"eligibility": {
|
|
80
|
+
"$ref": "status.schema.json#/$defs/action_eligibility"
|
|
81
|
+
},
|
|
82
|
+
"next_transition": {
|
|
83
|
+
"$ref": "status.schema.json#/$defs/next_transition"
|
|
84
|
+
},
|
|
85
|
+
"validation_request": {
|
|
86
|
+
"$ref": "targeted-validation-request.schema.json"
|
|
87
|
+
},
|
|
88
|
+
"escalation": {
|
|
89
|
+
"$comment": "Present only when the authority is escalated. Carries the accounting sentence with spent, remaining and total correction lines, so a caller learns the numbers without a second call.",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"allOf": [
|
|
95
|
+
{
|
|
96
|
+
"if": {
|
|
97
|
+
"required": [
|
|
98
|
+
"validation_request"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"then": {
|
|
102
|
+
"properties": {
|
|
103
|
+
"state": {
|
|
104
|
+
"const": "correction_required"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
38
110
|
},
|
|
39
111
|
"validate": {
|
|
40
112
|
"type": "object",
|
|
41
113
|
"additionalProperties": false,
|
|
42
|
-
"required": [
|
|
114
|
+
"required": [
|
|
115
|
+
"schema",
|
|
116
|
+
"result",
|
|
117
|
+
"allowed",
|
|
118
|
+
"action",
|
|
119
|
+
"reason",
|
|
120
|
+
"context"
|
|
121
|
+
],
|
|
43
122
|
"properties": {
|
|
44
|
-
"schema": {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
123
|
+
"schema": {
|
|
124
|
+
"const": "gentle-ai.review-gate-result/v1"
|
|
125
|
+
},
|
|
126
|
+
"result": {
|
|
127
|
+
"enum": [
|
|
128
|
+
"allow",
|
|
129
|
+
"scope-changed",
|
|
130
|
+
"invalidated",
|
|
131
|
+
"escalated"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"allowed": {
|
|
135
|
+
"type": "boolean"
|
|
136
|
+
},
|
|
137
|
+
"action": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"minLength": 1
|
|
140
|
+
},
|
|
141
|
+
"reason": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"minLength": 1
|
|
144
|
+
},
|
|
145
|
+
"context": {
|
|
146
|
+
"type": "object"
|
|
147
|
+
},
|
|
148
|
+
"delivery": {
|
|
149
|
+
"const": "disabled/unmanaged"
|
|
150
|
+
}
|
|
50
151
|
}
|
|
51
152
|
},
|
|
52
153
|
"bind_sdd": {
|
|
53
154
|
"type": "object",
|
|
54
155
|
"additionalProperties": false,
|
|
55
|
-
"required": [
|
|
156
|
+
"required": [
|
|
157
|
+
"schema",
|
|
158
|
+
"revision",
|
|
159
|
+
"change",
|
|
160
|
+
"lineage",
|
|
161
|
+
"authority_revision",
|
|
162
|
+
"receipt_hash",
|
|
163
|
+
"gate_context"
|
|
164
|
+
],
|
|
165
|
+
"properties": {
|
|
166
|
+
"schema": {
|
|
167
|
+
"const": "gentle-ai.sdd-review-binding/v1"
|
|
168
|
+
},
|
|
169
|
+
"revision": {
|
|
170
|
+
"$ref": "#/$defs/sha256"
|
|
171
|
+
},
|
|
172
|
+
"change": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"minLength": 1
|
|
175
|
+
},
|
|
176
|
+
"lineage": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"minLength": 1
|
|
179
|
+
},
|
|
180
|
+
"authority_revision": {
|
|
181
|
+
"$ref": "#/$defs/sha256"
|
|
182
|
+
},
|
|
183
|
+
"receipt_hash": {
|
|
184
|
+
"$ref": "#/$defs/sha256"
|
|
185
|
+
},
|
|
186
|
+
"gate_context": {
|
|
187
|
+
"type": "object"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"retry_final_verification": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"required": [
|
|
195
|
+
"operation",
|
|
196
|
+
"predecessor_lineage_id",
|
|
197
|
+
"predecessor_revision",
|
|
198
|
+
"lineage_id",
|
|
199
|
+
"state",
|
|
200
|
+
"store_revision",
|
|
201
|
+
"target_identity",
|
|
202
|
+
"incident_digest",
|
|
203
|
+
"recovery_disposition"
|
|
204
|
+
],
|
|
56
205
|
"properties": {
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
206
|
+
"operation": {
|
|
207
|
+
"const": "review.retry_final_verification"
|
|
208
|
+
},
|
|
209
|
+
"predecessor_lineage_id": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"maxLength": 128,
|
|
212
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
213
|
+
},
|
|
214
|
+
"predecessor_revision": {
|
|
215
|
+
"$ref": "#/$defs/sha256"
|
|
216
|
+
},
|
|
217
|
+
"lineage_id": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"maxLength": 128,
|
|
220
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
221
|
+
},
|
|
222
|
+
"state": {
|
|
223
|
+
"const": "validating"
|
|
224
|
+
},
|
|
225
|
+
"store_revision": {
|
|
226
|
+
"$ref": "#/$defs/sha256"
|
|
227
|
+
},
|
|
228
|
+
"target_identity": {
|
|
229
|
+
"$ref": "#/$defs/sha256"
|
|
230
|
+
},
|
|
231
|
+
"incident_digest": {
|
|
232
|
+
"$ref": "#/$defs/sha256"
|
|
233
|
+
},
|
|
234
|
+
"recovery_disposition": {
|
|
235
|
+
"const": "final_verification_retry"
|
|
236
|
+
}
|
|
64
237
|
}
|
|
65
238
|
}
|
|
66
239
|
}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://gentle-ai.dev/contracts/review-integration/v1/schemas/repair.schema.json",
|
|
4
|
+
"title": "Gentle AI classified authority repair operation",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema",
|
|
9
|
+
"contract",
|
|
10
|
+
"operation",
|
|
11
|
+
"mode",
|
|
12
|
+
"assessment",
|
|
13
|
+
"required_inputs"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"schema": {
|
|
17
|
+
"const": "gentle-ai.review-integration.repair/v1"
|
|
18
|
+
},
|
|
19
|
+
"contract": {
|
|
20
|
+
"const": "gentle-ai.review-integration/v1"
|
|
21
|
+
},
|
|
22
|
+
"operation": {
|
|
23
|
+
"const": "review.repair"
|
|
24
|
+
},
|
|
25
|
+
"mode": {
|
|
26
|
+
"enum": [
|
|
27
|
+
"preflight",
|
|
28
|
+
"execute"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"assessment": {
|
|
32
|
+
"$ref": "authority-repair-assessment.schema.json"
|
|
33
|
+
},
|
|
34
|
+
"provider_inputs": {
|
|
35
|
+
"$ref": "#/$defs/provider_inputs"
|
|
36
|
+
},
|
|
37
|
+
"required_inputs": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"maxItems": 3,
|
|
40
|
+
"uniqueItems": true,
|
|
41
|
+
"items": {
|
|
42
|
+
"enum": [
|
|
43
|
+
"actor",
|
|
44
|
+
"reason",
|
|
45
|
+
"maintainer_authorization"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"execution": {
|
|
50
|
+
"$ref": "#/$defs/execution"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"allOf": [
|
|
54
|
+
{
|
|
55
|
+
"if": {
|
|
56
|
+
"properties": {
|
|
57
|
+
"mode": {
|
|
58
|
+
"const": "execute"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": [
|
|
62
|
+
"mode"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"then": {
|
|
66
|
+
"required": [
|
|
67
|
+
"execution"
|
|
68
|
+
],
|
|
69
|
+
"properties": {
|
|
70
|
+
"required_inputs": {
|
|
71
|
+
"maxItems": 0
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"not": {
|
|
75
|
+
"required": [
|
|
76
|
+
"provider_inputs"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"else": {
|
|
81
|
+
"not": {
|
|
82
|
+
"required": [
|
|
83
|
+
"execution"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"if": {
|
|
90
|
+
"properties": {
|
|
91
|
+
"mode": {
|
|
92
|
+
"const": "preflight"
|
|
93
|
+
},
|
|
94
|
+
"assessment": {
|
|
95
|
+
"properties": {
|
|
96
|
+
"status": {
|
|
97
|
+
"const": "eligible"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": [
|
|
101
|
+
"status"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"required": [
|
|
106
|
+
"mode",
|
|
107
|
+
"assessment"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"then": {
|
|
111
|
+
"required": [
|
|
112
|
+
"provider_inputs"
|
|
113
|
+
],
|
|
114
|
+
"properties": {
|
|
115
|
+
"required_inputs": {
|
|
116
|
+
"minItems": 3,
|
|
117
|
+
"maxItems": 3,
|
|
118
|
+
"prefixItems": [
|
|
119
|
+
{
|
|
120
|
+
"const": "actor"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"const": "reason"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"const": "maintainer_authorization"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"items": false
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"else": {
|
|
134
|
+
"if": {
|
|
135
|
+
"properties": {
|
|
136
|
+
"mode": {
|
|
137
|
+
"const": "preflight"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"required": [
|
|
141
|
+
"mode"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"then": {
|
|
145
|
+
"properties": {
|
|
146
|
+
"required_inputs": {
|
|
147
|
+
"maxItems": 0
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"not": {
|
|
151
|
+
"required": [
|
|
152
|
+
"provider_inputs"
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"$defs": {
|
|
160
|
+
"sha256": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
163
|
+
},
|
|
164
|
+
"provider_inputs": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": [
|
|
168
|
+
"class",
|
|
169
|
+
"lineage_id",
|
|
170
|
+
"expected_revision",
|
|
171
|
+
"cause",
|
|
172
|
+
"disposition",
|
|
173
|
+
"repository_binding",
|
|
174
|
+
"authorization_schema"
|
|
175
|
+
],
|
|
176
|
+
"properties": {
|
|
177
|
+
"class": {
|
|
178
|
+
"const": "legacy_v1_historical_alias"
|
|
179
|
+
},
|
|
180
|
+
"lineage_id": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
183
|
+
},
|
|
184
|
+
"expected_revision": {
|
|
185
|
+
"$ref": "#/$defs/sha256"
|
|
186
|
+
},
|
|
187
|
+
"cause": {
|
|
188
|
+
"const": "unsupported_historical_v1_operation_alias"
|
|
189
|
+
},
|
|
190
|
+
"disposition": {
|
|
191
|
+
"const": "quarantine-approved-historical-alias"
|
|
192
|
+
},
|
|
193
|
+
"repository_binding": {
|
|
194
|
+
"$ref": "#/$defs/sha256"
|
|
195
|
+
},
|
|
196
|
+
"authorization_schema": {
|
|
197
|
+
"const": "gentle-ai.review-repair-authorization/v1"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"execution": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"additionalProperties": false,
|
|
204
|
+
"required": [
|
|
205
|
+
"status",
|
|
206
|
+
"class",
|
|
207
|
+
"lineage_id",
|
|
208
|
+
"revision",
|
|
209
|
+
"chain_identity",
|
|
210
|
+
"cause",
|
|
211
|
+
"disposition",
|
|
212
|
+
"assessment_digest",
|
|
213
|
+
"request_digest",
|
|
214
|
+
"record_identity"
|
|
215
|
+
],
|
|
216
|
+
"properties": {
|
|
217
|
+
"status": {
|
|
218
|
+
"const": "committed"
|
|
219
|
+
},
|
|
220
|
+
"class": {
|
|
221
|
+
"const": "legacy_v1_historical_alias"
|
|
222
|
+
},
|
|
223
|
+
"lineage_id": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
226
|
+
},
|
|
227
|
+
"revision": {
|
|
228
|
+
"$ref": "#/$defs/sha256"
|
|
229
|
+
},
|
|
230
|
+
"chain_identity": {
|
|
231
|
+
"$ref": "#/$defs/sha256"
|
|
232
|
+
},
|
|
233
|
+
"cause": {
|
|
234
|
+
"const": "unsupported_historical_v1_operation_alias"
|
|
235
|
+
},
|
|
236
|
+
"disposition": {
|
|
237
|
+
"const": "quarantine-approved-historical-alias"
|
|
238
|
+
},
|
|
239
|
+
"assessment_digest": {
|
|
240
|
+
"$ref": "#/$defs/sha256"
|
|
241
|
+
},
|
|
242
|
+
"request_digest": {
|
|
243
|
+
"$ref": "#/$defs/sha256"
|
|
244
|
+
},
|
|
245
|
+
"record_identity": {
|
|
246
|
+
"$ref": "#/$defs/sha256"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|