gentle-pi 1.2.0 → 2.1.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.
Files changed (111) hide show
  1. package/README.md +32 -10
  2. package/assets/agents/review-readability.md +0 -1
  3. package/assets/agents/review-reliability.md +0 -1
  4. package/assets/agents/review-resilience.md +0 -1
  5. package/assets/agents/review-risk.md +0 -1
  6. package/contracts/review-integration/v1/fixtures/binding-revision-conflict.fixture.json +25 -0
  7. package/contracts/review-integration/v1/fixtures/capabilities-v1.2.fixture.json +263 -0
  8. package/contracts/review-integration/v1/fixtures/capabilities-v1.3.fixture.json +301 -0
  9. package/contracts/review-integration/v1/fixtures/capabilities-v1.4.fixture.json +312 -0
  10. package/contracts/review-integration/v1/fixtures/capabilities-v1.5.fixture.json +321 -0
  11. package/contracts/review-integration/v1/fixtures/consent.fixture.json +36 -0
  12. package/contracts/review-integration/v1/fixtures/final-verification-incident.fixture.json +1 -0
  13. package/contracts/review-integration/v1/fixtures/operation.fixture.json +4 -0
  14. package/contracts/review-integration/v1/fixtures/repair-preflight.fixture.json +54 -0
  15. package/contracts/review-integration/v1/fixtures/start-v2.fixture.json +97 -0
  16. package/contracts/review-integration/v1/fixtures/start.fixture.json +25 -1
  17. package/contracts/review-integration/v1/fixtures/status-ambiguous.fixture.json +4 -0
  18. package/contracts/review-integration/v1/fixtures/status-corrupted.fixture.json +4 -0
  19. package/contracts/review-integration/v1/fixtures/status-recover.fixture.json +4 -0
  20. package/contracts/review-integration/v1/fixtures/status-unrelated.fixture.json +4 -0
  21. package/contracts/review-integration/v1/fixtures/status-v2-ambiguous.fixture.json +110 -0
  22. package/contracts/review-integration/v1/fixtures/status-v2-corrupted.fixture.json +107 -0
  23. package/contracts/review-integration/v1/fixtures/status-v2-final-verification-retry.fixture.json +192 -0
  24. package/contracts/review-integration/v1/fixtures/status-v2-recover.fixture.json +130 -0
  25. package/contracts/review-integration/v1/fixtures/status-v2-repair.fixture.json +161 -0
  26. package/contracts/review-integration/v1/fixtures/status-v2-unrelated.fixture.json +103 -0
  27. package/contracts/review-integration/v1/fixtures/status-v2.fixture.json +193 -0
  28. package/contracts/review-integration/v1/fixtures/status.fixture.json +19 -5
  29. package/contracts/review-integration/v1/fixtures/verification-evidence.fixture.json +1 -0
  30. package/contracts/review-integration/v1/schemas/admitted-result.schema.json +35 -0
  31. package/contracts/review-integration/v1/schemas/artifact-subject.schema.json +33 -0
  32. package/contracts/review-integration/v1/schemas/authority-repair-assessment.schema.json +247 -0
  33. package/contracts/review-integration/v1/schemas/capabilities-v1.2.schema.json +249 -0
  34. package/contracts/review-integration/v1/schemas/capabilities-v1.3.schema.json +429 -0
  35. package/contracts/review-integration/v1/schemas/capabilities-v1.4.schema.json +432 -0
  36. package/contracts/review-integration/v1/schemas/capabilities-v1.5.schema.json +154 -0
  37. package/contracts/review-integration/v1/schemas/consent.schema.json +86 -0
  38. package/contracts/review-integration/v1/schemas/failure.schema.json +54 -8
  39. package/contracts/review-integration/v1/schemas/final-verification-incident.schema.json +51 -0
  40. package/contracts/review-integration/v1/schemas/operation.schema.json +204 -31
  41. package/contracts/review-integration/v1/schemas/repair.schema.json +251 -0
  42. package/contracts/review-integration/v1/schemas/result-artifact-v2.schema.json +38 -0
  43. package/contracts/review-integration/v1/schemas/start-v2.schema.json +216 -0
  44. package/contracts/review-integration/v1/schemas/start.schema.json +79 -3
  45. package/contracts/review-integration/v1/schemas/status-v2.schema.json +313 -0
  46. package/contracts/review-integration/v1/schemas/status.schema.json +37 -10
  47. package/contracts/review-integration/v1/schemas/targeted-validation-request.schema.json +46 -0
  48. package/contracts/review-integration/v1/schemas/verification-evidence.schema.json +64 -0
  49. package/contracts/review-integration/v2/fixtures/capabilities.fixture.json +111 -0
  50. package/contracts/review-integration/v2/fixtures/consent.fixture.json +36 -0
  51. package/contracts/review-integration/v2/fixtures/start.fixture.json +93 -0
  52. package/contracts/review-integration/v2/fixtures/status.fixture.json +113 -0
  53. package/contracts/review-integration/v2/schemas/admitted-result.schema.json +14 -0
  54. package/contracts/review-integration/v2/schemas/artifact-subject.schema.json +36 -0
  55. package/contracts/review-integration/v2/schemas/capabilities.schema.json +111 -0
  56. package/contracts/review-integration/v2/schemas/consent.schema.json +70 -0
  57. package/contracts/review-integration/v2/schemas/failure.schema.json +35 -0
  58. package/contracts/review-integration/v2/schemas/operation.schema.json +46 -0
  59. package/contracts/review-integration/v2/schemas/repair.schema.json +22 -0
  60. package/contracts/review-integration/v2/schemas/start.schema.json +106 -0
  61. package/contracts/review-integration/v2/schemas/status.schema.json +104 -0
  62. package/docs/native-authority-architecture.md +18 -3
  63. package/docs/review-integration.md +175 -27
  64. package/extensions/gentle-ai.ts +647 -58
  65. package/lib/gentle-ai-binary.ts +65 -18
  66. package/lib/native-review-cli.ts +824 -56
  67. package/lib/review-candidate-view.ts +135 -1
  68. package/lib/review-compact-contract.ts +12 -3
  69. package/lib/review-consent-latch.ts +51 -0
  70. package/lib/review-correction-lifecycle.ts +170 -0
  71. package/lib/review-integration-v2.ts +1567 -0
  72. package/package.json +15 -11
  73. package/runtime/gentle-ai-binary.mjs +65 -18
  74. package/runtime/native-review-cli.mjs +808 -40
  75. package/runtime/review-integration-v2.mjs +1568 -0
  76. package/scripts/build-git-commit-transaction-runner.mjs +1 -1
  77. package/scripts/gentle-ai-installer.mjs +464 -76
  78. package/scripts/install-gentle-ai.mjs +7 -3
  79. package/scripts/test-packed-runner.mjs +3 -3
  80. package/scripts/verify-package-files.mjs +216 -64
  81. package/skills/_shared/review-ledger-contract.md +3 -1
  82. package/skills/release/SKILL.md +38 -11
  83. package/tests/devbinary/native-review-parity.devtest.ts +348 -0
  84. package/tests/gentle-ai-binary.test.ts +77 -3
  85. package/tests/gentle-ai-installer.test.ts +561 -22
  86. package/tests/gentle-ai.test.ts +2 -2
  87. package/tests/native-binary-gate.test.ts +145 -0
  88. package/tests/native-review-capability-contract.test.ts +87 -0
  89. package/tests/native-review-cli.test.ts +44 -1
  90. package/tests/native-review-consent.test.ts +128 -0
  91. package/tests/native-review-parity-runtime.test.ts +85 -29
  92. package/tests/native-review-parity.test.ts +782 -0
  93. package/tests/native-risk-evidence-parity.test.ts +91 -0
  94. package/tests/package-manifest.test.ts +80 -8
  95. package/tests/review-actor-tool-deny.test.ts +20 -5
  96. package/tests/review-candidate-view.test.ts +374 -1
  97. package/tests/review-compact-contract.test.ts +5 -0
  98. package/tests/review-consent-latch.test.ts +67 -0
  99. package/tests/review-controller-native-recovery.test.ts +180 -5
  100. package/tests/review-controller-native-routing.test.ts +632 -18
  101. package/tests/review-controller-workspace-root.test.ts +26 -6
  102. package/tests/review-controller.test.ts +1 -1
  103. package/tests/review-correction-lifecycle.test.ts +174 -0
  104. package/tests/review-integration-v2.test.ts +548 -0
  105. package/tests/runtime-harness.mjs +211 -12
  106. package/tests/support/native-binary-gate.ts +86 -0
  107. package/tests/verify-package-files.test.ts +119 -0
  108. package/lib/review-integration-v1.ts +0 -795
  109. package/runtime/review-integration-v1.mjs +0 -796
  110. package/tests/native-review-integration-v1.test.ts +0 -102
  111. package/tests/review-integration-v1.test.ts +0 -530
@@ -0,0 +1,429 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gentle-ai.dev/contracts/review-integration/v1/schemas/capabilities-v1.3.schema.json",
4
+ "title": "Gentle AI review integration capabilities protocol 1.3",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "contract",
10
+ "protocol",
11
+ "package",
12
+ "build",
13
+ "executable",
14
+ "operations",
15
+ "gates",
16
+ "projections",
17
+ "schemas",
18
+ "features",
19
+ "compatibility"
20
+ ],
21
+ "properties": {
22
+ "schema": {
23
+ "const": "gentle-ai.review-integration.capabilities/v1.3"
24
+ },
25
+ "contract": {
26
+ "const": "gentle-ai.review-integration/v1"
27
+ },
28
+ "protocol": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": [
32
+ "major",
33
+ "minor"
34
+ ],
35
+ "properties": {
36
+ "major": {
37
+ "const": 1
38
+ },
39
+ "minor": {
40
+ "const": 3
41
+ }
42
+ }
43
+ },
44
+ "package": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": [
48
+ "name",
49
+ "version",
50
+ "release_channel"
51
+ ],
52
+ "properties": {
53
+ "name": {
54
+ "const": "gentle-ai"
55
+ },
56
+ "version": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
60
+ "release_channel": {
61
+ "enum": [
62
+ "development",
63
+ "prerelease",
64
+ "stable"
65
+ ]
66
+ }
67
+ }
68
+ },
69
+ "build": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": [
73
+ "id",
74
+ "go_version",
75
+ "module_version",
76
+ "vcs",
77
+ "vcs_revision",
78
+ "vcs_time",
79
+ "vcs_modified"
80
+ ],
81
+ "properties": {
82
+ "id": {
83
+ "$ref": "#/$defs/sha256"
84
+ },
85
+ "go_version": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "module_version": {
90
+ "type": "string"
91
+ },
92
+ "vcs": {
93
+ "type": "string"
94
+ },
95
+ "vcs_revision": {
96
+ "type": "string"
97
+ },
98
+ "vcs_time": {
99
+ "type": "string"
100
+ },
101
+ "vcs_modified": {
102
+ "enum": [
103
+ "true",
104
+ "false",
105
+ "unknown"
106
+ ]
107
+ }
108
+ }
109
+ },
110
+ "executable": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": [
114
+ "sha256",
115
+ "evidence",
116
+ "verification"
117
+ ],
118
+ "properties": {
119
+ "sha256": {
120
+ "$ref": "#/$defs/sha256"
121
+ },
122
+ "evidence": {
123
+ "const": "self-reported"
124
+ },
125
+ "verification": {
126
+ "const": "compare-with-published-manifest"
127
+ }
128
+ }
129
+ },
130
+ "operations": {
131
+ "type": "array",
132
+ "minItems": 7,
133
+ "maxItems": 7,
134
+ "uniqueItems": true,
135
+ "items": {
136
+ "enum": [
137
+ "review.bind_sdd",
138
+ "review.capabilities",
139
+ "review.finalize",
140
+ "review.repair",
141
+ "review.start",
142
+ "review.status",
143
+ "review.validate"
144
+ ]
145
+ }
146
+ },
147
+ "gates": {
148
+ "type": "array",
149
+ "minItems": 5,
150
+ "maxItems": 5,
151
+ "uniqueItems": true,
152
+ "items": {
153
+ "enum": [
154
+ "post-apply",
155
+ "pre-commit",
156
+ "pre-push",
157
+ "pre-pr",
158
+ "release"
159
+ ]
160
+ }
161
+ },
162
+ "projections": {
163
+ "type": "array",
164
+ "minItems": 2,
165
+ "maxItems": 2,
166
+ "uniqueItems": true,
167
+ "items": {
168
+ "enum": [
169
+ "staged",
170
+ "workspace"
171
+ ]
172
+ }
173
+ },
174
+ "schemas": {
175
+ "type": "array",
176
+ "minItems": 19,
177
+ "maxItems": 19,
178
+ "uniqueItems": true,
179
+ "items": {
180
+ "enum": [
181
+ "gentle-ai.review-admitted-result/v1",
182
+ "gentle-ai.review-artifact-subject/v1",
183
+ "gentle-ai.review-authority-repair-assessment/v1",
184
+ "gentle-ai.review-authority-status/v1",
185
+ "gentle-ai.review-gate-request/v1",
186
+ "gentle-ai.review-integration.capabilities/v1.3",
187
+ "gentle-ai.review-integration.failure/v1",
188
+ "gentle-ai.review-integration.operation/v1",
189
+ "gentle-ai.review-integration.projection/v1",
190
+ "gentle-ai.review-integration.repair/v1",
191
+ "gentle-ai.review-integration.start/v2",
192
+ "gentle-ai.review-integration.status/v2",
193
+ "gentle-ai.review-receipt/v1",
194
+ "gentle-ai.review-receipt/v2",
195
+ "gentle-ai.review-result-artifact/v2",
196
+ "gentle-ai.review-targeted-validation-request/v1",
197
+ "https://gentle-ai.dev/schema/review/refuter/v1",
198
+ "https://gentle-ai.dev/schema/review/reviewer/v1",
199
+ "https://gentle-ai.dev/schema/review/validator/v1"
200
+ ]
201
+ }
202
+ },
203
+ "features": {
204
+ "type": "object",
205
+ "additionalProperties": false,
206
+ "required": [
207
+ "mandatory",
208
+ "optional"
209
+ ],
210
+ "properties": {
211
+ "mandatory": {
212
+ "type": "array",
213
+ "minItems": 10,
214
+ "maxItems": 10,
215
+ "items": {
216
+ "$ref": "#/$defs/feature"
217
+ }
218
+ },
219
+ "optional": {
220
+ "type": "array",
221
+ "minItems": 14,
222
+ "maxItems": 14,
223
+ "items": {
224
+ "$ref": "#/$defs/feature"
225
+ }
226
+ }
227
+ }
228
+ },
229
+ "bootstrap": {
230
+ "$ref": "#/$defs/bootstrap"
231
+ },
232
+ "compatibility": {
233
+ "type": "object",
234
+ "additionalProperties": false,
235
+ "required": [
236
+ "minimum_protocol_major",
237
+ "maximum_protocol_major",
238
+ "additive_minor_policy",
239
+ "unknown_mandatory",
240
+ "unknown_optional",
241
+ "modes",
242
+ "legacy_window"
243
+ ],
244
+ "properties": {
245
+ "minimum_protocol_major": {
246
+ "const": 1
247
+ },
248
+ "maximum_protocol_major": {
249
+ "const": 1
250
+ },
251
+ "additive_minor_policy": {
252
+ "const": "optional-fields-only"
253
+ },
254
+ "unknown_mandatory": {
255
+ "const": "reject"
256
+ },
257
+ "unknown_optional": {
258
+ "const": "ignore"
259
+ },
260
+ "modes": {
261
+ "type": "array",
262
+ "prefixItems": [
263
+ {
264
+ "const": "compact-v2"
265
+ },
266
+ {
267
+ "const": "legacy-v1"
268
+ }
269
+ ],
270
+ "items": false
271
+ },
272
+ "legacy_window": {
273
+ "type": "object",
274
+ "additionalProperties": false,
275
+ "required": [
276
+ "mode",
277
+ "state",
278
+ "read_only",
279
+ "deprecation_started",
280
+ "removal",
281
+ "minimum_compatibility_releases"
282
+ ],
283
+ "properties": {
284
+ "mode": {
285
+ "const": "legacy-v1"
286
+ },
287
+ "state": {
288
+ "enum": [
289
+ "pre-fence",
290
+ "active",
291
+ "deprecated",
292
+ "expired"
293
+ ]
294
+ },
295
+ "read_only": {
296
+ "type": "boolean"
297
+ },
298
+ "deprecation_started": {
299
+ "type": "boolean"
300
+ },
301
+ "removal": {
302
+ "type": "string",
303
+ "minLength": 1
304
+ },
305
+ "minimum_compatibility_releases": {
306
+ "type": "integer",
307
+ "minimum": 1
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ },
314
+ "$defs": {
315
+ "sha256": {
316
+ "type": "string",
317
+ "pattern": "^sha256:[0-9a-f]{64}$"
318
+ },
319
+ "feature": {
320
+ "type": "object",
321
+ "additionalProperties": false,
322
+ "required": [
323
+ "name",
324
+ "supported",
325
+ "requires"
326
+ ],
327
+ "properties": {
328
+ "name": {
329
+ "enum": [
330
+ "base_ref_workspace_overlay",
331
+ "bounded_process_waits",
332
+ "classified_authority_repair",
333
+ "compact_v2_authority",
334
+ "exact_gate_receipt_discovery",
335
+ "exact_receipt_replay",
336
+ "five_delivery_gates",
337
+ "immutable_snapshot",
338
+ "legacy_v1_target_scoped_read_only",
339
+ "native_frozen_candidate_context",
340
+ "native_low_risk_verification",
341
+ "native_next_transition",
342
+ "opaque_repository_context",
343
+ "provider_artifact_admission",
344
+ "provider_targeted_validation_request",
345
+ "recovered_correction_evidence",
346
+ "repository_independent_capabilities",
347
+ "restart_safe_projection",
348
+ "risk_reasons",
349
+ "scope_change_diagnostics",
350
+ "sdd_receipt_binding",
351
+ "target_scoped_status",
352
+ "uniform_failure_envelope",
353
+ "validating_result_reopen"
354
+ ]
355
+ },
356
+ "supported": {
357
+ "type": "boolean"
358
+ },
359
+ "requires": {
360
+ "type": "array",
361
+ "uniqueItems": true,
362
+ "items": {
363
+ "type": "string",
364
+ "minLength": 1
365
+ }
366
+ }
367
+ }
368
+ },
369
+ "bootstrap": {
370
+ "type": "object",
371
+ "additionalProperties": false,
372
+ "required": [
373
+ "command",
374
+ "target_selector_variants",
375
+ "required_feature",
376
+ "unsupported_outcome",
377
+ "parent_only"
378
+ ],
379
+ "properties": {
380
+ "command": {
381
+ "const": "gentle-ai review status --cwd <repo> --contract gentle-ai.review-integration/v1 --next-transition"
382
+ },
383
+ "target_selector_variants": {
384
+ "type": "array",
385
+ "minItems": 4,
386
+ "maxItems": 4,
387
+ "items": {
388
+ "$ref": "#/$defs/target_selector"
389
+ }
390
+ },
391
+ "required_feature": {
392
+ "const": "native_next_transition"
393
+ },
394
+ "unsupported_outcome": {
395
+ "const": "unsupported-capability"
396
+ },
397
+ "parent_only": {
398
+ "const": true
399
+ }
400
+ }
401
+ },
402
+ "target_selector": {
403
+ "type": "object",
404
+ "additionalProperties": false,
405
+ "required": [
406
+ "target_type",
407
+ "arguments"
408
+ ],
409
+ "properties": {
410
+ "target_type": {
411
+ "enum": [
412
+ "staged",
413
+ "base_ref",
414
+ "workspace_overlay_base_ref",
415
+ "workspace_overlay_base_tree"
416
+ ]
417
+ },
418
+ "arguments": {
419
+ "type": "array",
420
+ "minItems": 2,
421
+ "items": {
422
+ "type": "string",
423
+ "minLength": 1
424
+ }
425
+ }
426
+ }
427
+ }
428
+ }
429
+ }