iterate-kernel 0.1.10 → 0.1.12

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 (43) hide show
  1. package/dist/canonical-json.d.ts +45 -0
  2. package/dist/canonical-json.d.ts.map +1 -1
  3. package/dist/canonical-json.js +99 -7
  4. package/dist/canonical-json.js.map +1 -1
  5. package/dist/decision-log-entry.d.ts +31 -0
  6. package/dist/decision-log-entry.d.ts.map +1 -1
  7. package/dist/decision-log-entry.js +71 -1
  8. package/dist/decision-log-entry.js.map +1 -1
  9. package/dist/decision-log-transcribe.d.ts.map +1 -1
  10. package/dist/decision-log-transcribe.js +59 -4
  11. package/dist/decision-log-transcribe.js.map +1 -1
  12. package/dist/decision-log.d.ts.map +1 -1
  13. package/dist/decision-log.js +29 -5
  14. package/dist/decision-log.js.map +1 -1
  15. package/dist/dimension-context.d.ts.map +1 -1
  16. package/dist/dimension-context.js +37 -5
  17. package/dist/dimension-context.js.map +1 -1
  18. package/dist/evidence-decision.d.ts +1 -35
  19. package/dist/evidence-decision.d.ts.map +1 -1
  20. package/dist/evidence-decision.js +28 -8
  21. package/dist/evidence-decision.js.map +1 -1
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +2 -2
  25. package/dist/index.js.map +1 -1
  26. package/dist/invariant-report.d.ts.map +1 -1
  27. package/dist/invariant-report.js +18 -0
  28. package/dist/invariant-report.js.map +1 -1
  29. package/dist/parse.d.ts.map +1 -1
  30. package/dist/parse.js +12 -2
  31. package/dist/parse.js.map +1 -1
  32. package/dist/provider-registration.d.ts.map +1 -1
  33. package/dist/provider-registration.js +22 -2
  34. package/dist/provider-registration.js.map +1 -1
  35. package/fixtures/decision-record-transcription.ok-01.json +41 -1
  36. package/package.json +6 -1
  37. package/schemas/convergence-round-state.schema.json +7 -4
  38. package/schemas/decision-log-entry.schema.json +4 -2
  39. package/schemas/evidence-pack.schema.json +10 -6
  40. package/schemas/invariant-report.schema.json +5 -3
  41. package/schemas/provider-registration.schema.json +1 -1
  42. package/schemas/reverification-request.schema.json +1 -1
  43. package/schemas/run-plan.schema.json +1 -0
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.iterate.dev/convergence-round-state-0.1.json",
4
4
  "title": "ConvergenceRoundState",
5
- "description": "What a caller states about the round that just finished, which the convergence rules turn into an action (5.7 R40 scenario 4). Every field is a verdict somebody else produced; this contract moves none of them. NOTE ON SOURCE OF TRUTH: the field constraints are duplicated from `src/convergence.ts`, which is the definition; this file mirrors it. The ordering that decides which verdict wins (breaker, then budget, then errored check, then findings, then evidence, then invariants, then converged) is arithmetic in the validator and cannot be expressed in JSON Schema — a schema-only implementation must re-implement `convergenceDecision` and be tested against the cases in `fixtures/convergence.ok-01.json`.",
5
+ "description": "What a caller states about the round that just finished, which the convergence rules turn into an action (5.7 R40 scenario 4). Every field is a verdict somebody else produced; this contract moves none of them. NOTE ON SOURCE OF TRUTH: the field constraints are duplicated from `src/convergence.ts`, which is the definition; this file mirrors it. The ordering that decides which verdict wins (breaker, then budget, then errored check, then findings, then evidence, then invariants, then converged) is arithmetic in the validator and cannot be expressed in JSON Schema — a schema-only implementation must re-implement `convergenceDecision` and be tested against the cases in `fixtures/convergence.ok-01.json`. INTEGERS ARE BOUNDED: every integer field carries both `minimum` and `maximum` inside ±2^53−1, which is the range every runtime prints identically — ECMAScript renders 1e21 as `1e+21` where Python prints 1000000000000000000000, so a state outside the bound would digest to different bytes in each implementation and the validators refuse it.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": [
@@ -18,11 +18,13 @@
18
18
  },
19
19
  "round": {
20
20
  "type": "integer",
21
- "minimum": 1
21
+ "minimum": 1,
22
+ "maximum": 9007199254740991
22
23
  },
23
24
  "maxRounds": {
24
25
  "type": "integer",
25
- "minimum": 1
26
+ "minimum": 1,
27
+ "maximum": 9007199254740991
26
28
  },
27
29
  "invariantState": {
28
30
  "enum": [
@@ -34,7 +36,8 @@
34
36
  },
35
37
  "openFindings": {
36
38
  "type": "integer",
37
- "minimum": 0
39
+ "minimum": 0,
40
+ "maximum": 9007199254740991
38
41
  },
39
42
  "evidenceComplete": {
40
43
  "type": "boolean"
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.iterate.dev/decision-log-entry-0.1-draft.json",
4
4
  "title": "DecisionLogEntry",
5
- "description": "Entry-level contract of the opID-to-decision one-way hash chain (audit chain, Phase A part). Each entry links to the previous entry via SHA-256 of its canonical form; the genesis entry uses an empty prevEntryHash.",
5
+ "description": "Entry-level contract of the opID-to-decision one-way hash chain (audit chain, Phase A part). Each entry links to the previous entry via SHA-256 of its canonical form; the genesis entry uses an empty prevEntryHash. INTEGERS ARE BOUNDED: `sequence` and `round` carry both `minimum` and `maximum` inside ±2^53−1, because that is the range every runtime prints identically — ECMAScript renders 1e21 as `1e+21` where Python prints 1000000000000000000000 — and a line outside it would hash to different bytes in each implementation. Two rules are validator-only because JSON Schema cannot state them: a `payload` value must have a JSON representation (an `undefined`, a function, a symbol, a `NaN` or an `Infinity` would be printed as a token this form does not have), and a `payload` key must not be `__proto__` — the one key the JavaScript object model reinterprets instead of storing, so it would disappear from the canonical bytes the chain hashes (`prototype` and `constructor` are ordinary own properties and are carried like any other) — see `src/decision-log-entry.ts`.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": [
@@ -20,7 +20,8 @@
20
20
  },
21
21
  "sequence": {
22
22
  "type": "integer",
23
- "minimum": 0
23
+ "minimum": 0,
24
+ "maximum": 9007199254740991
24
25
  },
25
26
  "prevEntryHash": {
26
27
  "type": "string",
@@ -49,6 +50,7 @@
49
50
  "round": {
50
51
  "type": "integer",
51
52
  "minimum": 0,
53
+ "maximum": 9007199254740991,
52
54
  "description": "Loop position the decision belongs to, when the producer counts rounds. Optional because a one-off tool execution is not part of a round."
53
55
  },
54
56
  "dimension": {
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.iterate.dev/evidence-pack-0.1.json",
4
4
  "title": "EvidencePack",
5
- "description": "GlassPane P0 evidence package (schema v0.1-draft). C35 dual-language contract: this JSON Schema is the single source of truth; Swift Codable and TS zod bindings must stay in sync via the shared truth fixtures.",
5
+ "description": "GlassPane P0 evidence package (schema v0.1-draft). C35 dual-language contract: this JSON Schema is the single source of truth; Swift Codable and TS zod bindings must stay in sync via the shared truth fixtures. INTEGERS ARE BOUNDED: every integer field carries both `minimum` and `maximum` inside ±2^53−1, which is the range every runtime prints identically (ECMAScript renders 1e21 as `1e+21` where Python prints 1000000000000000000000). NON-FINITE NUMBERS ARE REFUSED by the validators and this schema cannot say so: `NaN` and ±Infinity are `type: number` to a schema-only reader, while `JSON.stringify` prints all three as `null` — a pack that did that would be indistinguishable from one that measured nothing.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": [
@@ -101,7 +101,8 @@
101
101
  },
102
102
  "nodeCount": {
103
103
  "type": "integer",
104
- "minimum": 0
104
+ "minimum": 0,
105
+ "maximum": 9007199254740991
105
106
  },
106
107
  "axChanged": {
107
108
  "type": "boolean"
@@ -142,7 +143,8 @@
142
143
  },
143
144
  "windowId": {
144
145
  "type": "integer",
145
- "minimum": 0
146
+ "minimum": 0,
147
+ "maximum": 9007199254740991
146
148
  }
147
149
  }
148
150
  },
@@ -229,7 +231,8 @@
229
231
  },
230
232
  "hitCount": {
231
233
  "type": "integer",
232
- "minimum": 0
234
+ "minimum": 0,
235
+ "maximum": 9007199254740991
233
236
  },
234
237
  "handlers": {
235
238
  "type": "array",
@@ -240,13 +243,14 @@
240
243
  "required": ["file", "line"],
241
244
  "properties": {
242
245
  "file": { "type": "string", "minLength": 1, "maxLength": 512 },
243
- "line": { "type": "integer", "minimum": 0 }
246
+ "line": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
244
247
  }
245
248
  }
246
249
  },
247
250
  "lateCount": {
248
251
  "type": "integer",
249
- "minimum": 0
252
+ "minimum": 0,
253
+ "maximum": 9007199254740991
250
254
  }
251
255
  }
252
256
  },
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.iterate.dev/invariant-report-0.1.json",
4
4
  "title": "InvariantReport",
5
- "description": "What the invariant runner observed when it checked a recipe's invariants (5.7 R40 scenario 1: the failure that has to reach the other harness). Whoever runs the checks produces this; whoever decides whether to re-verify reads it. A check kind of `refused` means the runner declined to execute a configured command because it carries shell metacharacters or is empty — it is a violation, so a report whose only failing check was refused is `fail`, never `error`. NOTE ON SOURCE OF TRUTH: the check-name and detail constraints are duplicated from `src/invariant-report.ts`, which is the definition; this file mirrors it. The outcome-vs-checks rule IS expressible here and is expressed twice on purpose: the `allOf` branches below and the zod `superRefine` must refuse the same reports, so a second implementation that only validates JSON Schema still cannot carry a pass over a failed check.",
5
+ "description": "What the invariant runner observed when it checked a recipe's invariants (5.7 R40 scenario 1: the failure that has to reach the other harness). Whoever runs the checks produces this; whoever decides whether to re-verify reads it. A check kind of `refused` means the runner declined to execute a configured command because it carries shell metacharacters or is empty — it is a violation, so a report whose only failing check was refused is `fail`, never `error`. NOTE ON SOURCE OF TRUTH: the check-name and detail constraints are duplicated from `src/invariant-report.ts`, which is the definition; this file mirrors it. The outcome-vs-checks rule IS expressible here and is expressed twice on purpose: the `allOf` branches below and the zod `superRefine` must refuse the same reports, so a second implementation that only validates JSON Schema still cannot carry a pass over a failed check. INTEGERS ARE BOUNDED: `round` and `durationMs` carry both `minimum` and `maximum` inside ±2^53−1, the range every runtime prints identically, because a report outside it would digest to different bytes in each implementation.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["schemaVersion", "outcome", "checks"],
@@ -23,11 +23,13 @@
23
23
  },
24
24
  "round": {
25
25
  "type": "integer",
26
- "minimum": 1
26
+ "minimum": 1,
27
+ "maximum": 9007199254740991
27
28
  },
28
29
  "durationMs": {
29
30
  "type": "integer",
30
- "minimum": 0
31
+ "minimum": 0,
32
+ "maximum": 9007199254740991
31
33
  }
32
34
  },
33
35
  "allOf": [
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.iterate.dev/provider-registration-0.1.json",
4
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.",
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. The `uniqueItems` declared on a method's `requires` IS enforced by the validator too, so the two sides refuse the same duplicate list.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["schemaVersion", "id", "kind", "version", "methods"],
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schemas.iterate.dev/reverification-request-0.1.json",
4
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.",
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. The `uniqueItems` on `targets.dimensions` and `targets.operationIds` is likewise enforced by the validator, so a target listed twice is refused on both sides rather than scheduled twice by one of them.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["schemaVersion", "trigger", "targets"],
@@ -48,6 +48,7 @@
48
48
  },
49
49
  "label": {
50
50
  "type": "string",
51
+ "minLength": 1,
51
52
  "maxLength": 256
52
53
  },
53
54
  "focus": {