iterate-kernel 0.1.3 → 0.1.5
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 +15 -6
- package/dist/convergence.d.ts +90 -0
- package/dist/convergence.d.ts.map +1 -0
- package/dist/convergence.js +97 -0
- package/dist/convergence.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +7 -0
- package/dist/errors.js.map +1 -1
- package/dist/evidence-pack.d.ts +19 -19
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/invariant-report.d.ts +271 -0
- package/dist/invariant-report.d.ts.map +1 -0
- package/dist/invariant-report.js +145 -0
- package/dist/invariant-report.js.map +1 -0
- package/dist/parse.d.ts +9 -0
- package/dist/parse.d.ts.map +1 -1
- package/dist/parse.js +22 -10
- package/dist/parse.js.map +1 -1
- package/dist/provider-registration.d.ts +132 -0
- package/dist/provider-registration.d.ts.map +1 -0
- package/dist/provider-registration.js +119 -0
- package/dist/provider-registration.js.map +1 -0
- package/dist/run-plan.d.ts +142 -0
- package/dist/run-plan.d.ts.map +1 -0
- package/dist/run-plan.js +92 -0
- package/dist/run-plan.js.map +1 -0
- package/dist/schemas.d.ts +10 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +10 -0
- package/dist/schemas.js.map +1 -1
- package/fixtures/convergence.ok-01.json +252 -0
- package/fixtures/invariant-report.ok-01.json +306 -0
- package/fixtures/provider-registration.ok-01.json +309 -0
- package/fixtures/run-plan.ok-01.json +152 -0
- package/package.json +17 -1
- package/schemas/convergence-round-state.schema.json +37 -0
- package/schemas/invariant-report.schema.json +108 -0
- package/schemas/provider-registration.schema.json +63 -0
- package/schemas/reverification-request.schema.json +89 -0
- package/schemas/run-plan.schema.json +60 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.iterate.dev/provider-registration-0.1.json",
|
|
4
|
+
"title": "ProviderRegistration",
|
|
5
|
+
"description": "Metadata for one judgement producer, so both harnesses can consume the same provider through the same shape (5.7 R40 scenario 5). It declares who provides what and what they need; it never carries a judgement, which stays in the engine and the reviewers. NOTE ON SOURCE OF TRUTH: the field constraints are duplicated from `src/provider-registration.ts`, which is the definition; this file mirrors it. METHOD-LEVEL UNIQUENESS IS ENFORCED BY ZOD ONLY: `uniqueItems` compares whole objects, so two methods with the same name but different `requires` pass this schema and are refused by `ProviderRegistrationSchema`. The registry semantics (refusing to overwrite an id, no default provider, no fuzzy resolve) are functions in the validator, not schema features.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "id", "kind", "version", "methods"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"const": "iterate.provider/0.1"
|
|
12
|
+
},
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
16
|
+
"maxLength": 64
|
|
17
|
+
},
|
|
18
|
+
"kind": {
|
|
19
|
+
"enum": ["ae-diagnosis", "report-render", "evidence-source"]
|
|
20
|
+
},
|
|
21
|
+
"version": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"maxLength": 64
|
|
25
|
+
},
|
|
26
|
+
"origin": {
|
|
27
|
+
"enum": ["kernel", "glasspane", "iterate", "plugin"]
|
|
28
|
+
},
|
|
29
|
+
"methods": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"minItems": 1,
|
|
32
|
+
"maxItems": 32,
|
|
33
|
+
"uniqueItems": true,
|
|
34
|
+
"items": {
|
|
35
|
+
"$ref": "#/$defs/providerMethod"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"$defs": {
|
|
40
|
+
"providerMethod": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"required": ["name", "requires"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"name": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
48
|
+
"maxLength": 64
|
|
49
|
+
},
|
|
50
|
+
"requires": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"maxItems": 16,
|
|
53
|
+
"uniqueItems": true,
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
57
|
+
"maxLength": 64
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.iterate.dev/reverification-request-0.1.json",
|
|
4
|
+
"title": "ReverificationRequest",
|
|
5
|
+
"description": "The ask that comes out of a failed invariant report (5.7 R40 scenario 1): re-run these recipe steps, dimensions, or operations. It cites the failure by digest rather than embedding it, so the ledger line that records the re-verification can be checked against the ledger line that records the failure. NOTE ON SOURCE OF TRUTH: the field constraints are duplicated from `src/invariant-report.ts`, which is the definition; this file mirrors it. The 'an empty target set is not a re-verification' rule IS expressible here and is expressed twice on purpose, via `anyOf`, so a schema-only implementation refuses it too.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "trigger", "targets"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"const": "iterate.reverification/0.1"
|
|
12
|
+
},
|
|
13
|
+
"trigger": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"required": ["kind", "reportDigest"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"kind": {
|
|
19
|
+
"const": "invariant"
|
|
20
|
+
},
|
|
21
|
+
"reportDigest": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^iv_[0-9a-f]{64}$"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"targets": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"anyOf": [
|
|
31
|
+
{
|
|
32
|
+
"required": ["recipeSteps"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"required": ["dimensions"]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"required": ["operationIds"]
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"properties": {
|
|
42
|
+
"recipeSteps": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"minItems": 1,
|
|
45
|
+
"maxItems": 64,
|
|
46
|
+
"items": {
|
|
47
|
+
"$ref": "#/$defs/recipeStep"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"dimensions": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"minItems": 1,
|
|
53
|
+
"maxItems": 64,
|
|
54
|
+
"uniqueItems": true,
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
58
|
+
"maxLength": 64
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"operationIds": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"minItems": 1,
|
|
64
|
+
"maxItems": 64,
|
|
65
|
+
"uniqueItems": true,
|
|
66
|
+
"items": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"pattern": "^op_[0-9A-HJKMNP-TV-Z]{26}$"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"$defs": {
|
|
75
|
+
"recipeStep": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"required": ["kind", "params"],
|
|
79
|
+
"properties": {
|
|
80
|
+
"kind": {
|
|
81
|
+
"enum": ["act", "observe", "assert", "diagnose"]
|
|
82
|
+
},
|
|
83
|
+
"params": {
|
|
84
|
+
"type": "object"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.iterate.dev/run-plan-0.1.json",
|
|
4
|
+
"title": "RunPlan",
|
|
5
|
+
"description": "Which review dimensions a run intends to cover, in planned order (5.7 R40 scenario 2: dimension-aware context compression needs a plan to be aware of). Whoever configures the run produces this; whoever renders coverage reads it. Nothing in the kernel reads a config file to make one. NOTE ON SOURCE OF TRUTH: the id/label/focus constraints are duplicated from `src/dimension-context.ts`, which has no JSON Schema of its own — until that gap is closed, the zod side is the definition and this file mirrors it. ID-LEVEL UNIQUENESS IS ENFORCED BY ZOD ONLY: `uniqueItems` compares whole objects, so two entries with the same id but different focus pass this schema and are refused by `RunPlanSchema`.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "dimensions"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"const": "iterate.run-plan/0.1"
|
|
12
|
+
},
|
|
13
|
+
"dimensions": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"minItems": 1,
|
|
16
|
+
"maxItems": 64,
|
|
17
|
+
"uniqueItems": true,
|
|
18
|
+
"items": {
|
|
19
|
+
"$ref": "#/$defs/plannedDimension"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"source": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["kind"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"kind": {
|
|
28
|
+
"enum": ["config", "recipe", "session", "manual"]
|
|
29
|
+
},
|
|
30
|
+
"name": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"maxLength": 512
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"$defs": {
|
|
39
|
+
"plannedDimension": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["id"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"id": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
47
|
+
"maxLength": 64
|
|
48
|
+
},
|
|
49
|
+
"label": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"maxLength": 256
|
|
52
|
+
},
|
|
53
|
+
"focus": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"maxLength": 4096
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|