iterate-kernel 0.1.9 → 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 (59) 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/convergence.d.ts +36 -44
  6. package/dist/convergence.d.ts.map +1 -1
  7. package/dist/decision-log-entry.d.ts +45 -28
  8. package/dist/decision-log-entry.d.ts.map +1 -1
  9. package/dist/decision-log-entry.js +71 -1
  10. package/dist/decision-log-entry.js.map +1 -1
  11. package/dist/decision-log-transcribe.d.ts.map +1 -1
  12. package/dist/decision-log-transcribe.js +59 -4
  13. package/dist/decision-log-transcribe.js.map +1 -1
  14. package/dist/decision-log.d.ts +13 -30
  15. package/dist/decision-log.d.ts.map +1 -1
  16. package/dist/decision-log.js +29 -5
  17. package/dist/decision-log.js.map +1 -1
  18. package/dist/dimension-context.d.ts +39 -223
  19. package/dist/dimension-context.d.ts.map +1 -1
  20. package/dist/dimension-context.js +37 -5
  21. package/dist/dimension-context.js.map +1 -1
  22. package/dist/errors.d.ts +1 -1
  23. package/dist/errors.d.ts.map +1 -1
  24. package/dist/errors.js +11 -1
  25. package/dist/errors.js.map +1 -1
  26. package/dist/evidence-decision.d.ts +1 -35
  27. package/dist/evidence-decision.d.ts.map +1 -1
  28. package/dist/evidence-decision.js +28 -8
  29. package/dist/evidence-decision.js.map +1 -1
  30. package/dist/evidence-pack.d.ts +256 -1595
  31. package/dist/evidence-pack.d.ts.map +1 -1
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +2 -2
  35. package/dist/index.js.map +1 -1
  36. package/dist/invariant-report.d.ts +53 -189
  37. package/dist/invariant-report.d.ts.map +1 -1
  38. package/dist/invariant-report.js +18 -0
  39. package/dist/invariant-report.js.map +1 -1
  40. package/dist/parse.d.ts.map +1 -1
  41. package/dist/parse.js +12 -2
  42. package/dist/parse.js.map +1 -1
  43. package/dist/provider-registration.d.ts +22 -72
  44. package/dist/provider-registration.d.ts.map +1 -1
  45. package/dist/provider-registration.js +22 -2
  46. package/dist/provider-registration.js.map +1 -1
  47. package/dist/recipe-config.d.ts +21 -32
  48. package/dist/recipe-config.d.ts.map +1 -1
  49. package/dist/run-plan.d.ts +23 -82
  50. package/dist/run-plan.d.ts.map +1 -1
  51. package/fixtures/decision-record-transcription.ok-01.json +41 -1
  52. package/package.json +7 -2
  53. package/schemas/convergence-round-state.schema.json +7 -4
  54. package/schemas/decision-log-entry.schema.json +4 -2
  55. package/schemas/evidence-pack.schema.json +10 -6
  56. package/schemas/invariant-report.schema.json +5 -3
  57. package/schemas/provider-registration.schema.json +1 -1
  58. package/schemas/reverification-request.schema.json +1 -1
  59. package/schemas/run-plan.schema.json +1 -0
@@ -21,8 +21,25 @@ export const ProviderMethodSchema = z.strictObject({
21
21
  * What this method needs to run: capability names, not booleans per capability,
22
22
  * so adding one does not require widening a schema on both sides. An empty list
23
23
  * means "no prerequisites", which is a claim the provider has to make.
24
+ *
25
+ * `uniqueItems` is declared in `schemas/provider-registration.schema.json`, and
26
+ * a declared rule the validator does not enforce is a rule one consumer can
27
+ * break while every reader believes it.
24
28
  */
25
- requires: z.array(z.string().regex(PROVIDER_ID_PATTERN).max(PROVIDER_ID_MAX_LENGTH)).max(16)
29
+ requires: z
30
+ .array(z.string().regex(PROVIDER_ID_PATTERN).max(PROVIDER_ID_MAX_LENGTH))
31
+ .max(16)
32
+ .superRefine((names, ctx) => {
33
+ names.forEach((name, index) => {
34
+ if (names.indexOf(name) !== index) {
35
+ ctx.addIssue({
36
+ code: z.ZodIssueCode.custom,
37
+ path: [index],
38
+ message: `"${name}" is listed twice; a repeated prerequisite changes nothing about what the method needs, so the repetition is either a mistake or an attempt to make a list mean two things at once`
39
+ });
40
+ }
41
+ });
42
+ })
26
43
  });
27
44
  export const ProviderRegistrationSchema = z
28
45
  .strictObject({
@@ -92,7 +109,10 @@ export function registerProvider(registry, provider) {
92
109
  }
93
110
  /** Look a provider up. No default, no fuzzy match, no "the only one registered". */
94
111
  export function resolveProvider(registry, id) {
95
- const provider = registry[id];
112
+ // Own property, not `registry[id]`: an empty registry is `{}`, so a lookup of
113
+ // "constructor" or "__proto__" answers with something off `Object.prototype` and
114
+ // the caller believes a provider is registered when nobody registered it.
115
+ const provider = Object.hasOwn(registry, id) ? registry[id] : undefined;
96
116
  if (!provider) {
97
117
  throw new KernelProviderError(PROVIDER_CODES.unknown, id, `no provider registered under "${id}"`, `registered: ${registeredIds(registry)}`);
98
118
  }
@@ -1 +1 @@
1
- {"version":3,"file":"provider-registration.js","sourceRoot":"","sources":["../src/provider-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAA+B,CAAC;AAEvE,MAAM,CAAC,MAAM,mBAAmB,GAAG,4BAA4B,CAAC;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAEtC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAG/F,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC;IACjD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC;IACvE;;;;OAIG;IACH,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAmB,CAAC,CA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AED,MAAM,UAAU,aAAa,CAC3B,QAA0B,EAC1B,EAAU,EACV,MAAc;IAEd,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;IACtE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,mBAAmB,CAC3B,cAAc,CAAC,aAAa,EAC5B,EAAE,EACF,aAAa,EAAE,qBAAqB,MAAM,GAAG,EAC7C,cAAc,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACvE,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,CAAmB,EAAE,CAAmB;IAC1E,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3F,CAAC"}
@@ -3,46 +3,35 @@ export declare const RECIPE_SCHEMA_VERSION: "glasspane.recipe/0.1-draft";
3
3
  export declare const RECIPE_NAME_MAX_LENGTH = 256;
4
4
  export declare const RECIPE_MIN_STEPS = 1;
5
5
  export declare const RECIPE_MAX_STEPS = 64;
6
- export declare const RecipeStepKindSchema: z.ZodEnum<["act", "observe", "assert", "diagnose"]>;
6
+ export declare const RecipeStepKindSchema: z.ZodEnum<{
7
+ act: "act";
8
+ observe: "observe";
9
+ assert: "assert";
10
+ diagnose: "diagnose";
11
+ }>;
7
12
  export type RecipeStepKind = z.infer<typeof RecipeStepKindSchema>;
8
13
  export declare const RecipeStepSchema: z.ZodObject<{
9
- kind: z.ZodEnum<["act", "observe", "assert", "diagnose"]>;
14
+ kind: z.ZodEnum<{
15
+ act: "act";
16
+ observe: "observe";
17
+ assert: "assert";
18
+ diagnose: "diagnose";
19
+ }>;
10
20
  params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
11
- }, "strict", z.ZodTypeAny, {
12
- params: Record<string, unknown>;
13
- kind: "act" | "observe" | "assert" | "diagnose";
14
- }, {
15
- params: Record<string, unknown>;
16
- kind: "act" | "observe" | "assert" | "diagnose";
17
- }>;
21
+ }, z.core.$strict>;
18
22
  export type RecipeStep = z.infer<typeof RecipeStepSchema>;
19
23
  export declare const RecipeConfigSchema: z.ZodObject<{
20
24
  schemaVersion: z.ZodLiteral<"glasspane.recipe/0.1-draft">;
21
25
  name: z.ZodString;
22
26
  steps: z.ZodArray<z.ZodObject<{
23
- kind: z.ZodEnum<["act", "observe", "assert", "diagnose"]>;
27
+ kind: z.ZodEnum<{
28
+ act: "act";
29
+ observe: "observe";
30
+ assert: "assert";
31
+ diagnose: "diagnose";
32
+ }>;
24
33
  params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
25
- }, "strict", z.ZodTypeAny, {
26
- params: Record<string, unknown>;
27
- kind: "act" | "observe" | "assert" | "diagnose";
28
- }, {
29
- params: Record<string, unknown>;
30
- kind: "act" | "observe" | "assert" | "diagnose";
31
- }>, "many">;
32
- }, "strict", z.ZodTypeAny, {
33
- schemaVersion: "glasspane.recipe/0.1-draft";
34
- name: string;
35
- steps: {
36
- params: Record<string, unknown>;
37
- kind: "act" | "observe" | "assert" | "diagnose";
38
- }[];
39
- }, {
40
- schemaVersion: "glasspane.recipe/0.1-draft";
41
- name: string;
42
- steps: {
43
- params: Record<string, unknown>;
44
- kind: "act" | "observe" | "assert" | "diagnose";
45
- }[];
46
- }>;
34
+ }, z.core.$strict>>;
35
+ }, z.core.$strict>;
47
36
  export type RecipeConfig = z.infer<typeof RecipeConfigSchema>;
48
37
  //# sourceMappingURL=recipe-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipe-config.d.ts","sourceRoot":"","sources":["../src/recipe-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB,EAAG,4BAAqC,CAAC;AAE3E,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,eAAO,MAAM,oBAAoB,qDAAmD,CAAC;AACrF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;;EAO3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
1
+ {"version":3,"file":"recipe-config.d.ts","sourceRoot":"","sources":["../src/recipe-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB,EAAG,4BAAqC,CAAC;AAE3E,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,eAAO,MAAM,oBAAoB;;;;;EAAmD,CAAC;AACrF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;kBAO3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,kBAAkB;;;;;;;;;;;;kBAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -26,99 +26,40 @@ export declare const RUN_PLAN_SCHEMA_VERSION: "iterate.run-plan/0.1";
26
26
  * become a compatibility burden with nothing yet to be compatible with.
27
27
  */
28
28
  export declare const RUN_PLAN_SOURCES: readonly ["config", "recipe", "session", "manual"];
29
- export declare const RunPlanSourceKindSchema: z.ZodEnum<["config", "recipe", "session", "manual"]>;
29
+ export declare const RunPlanSourceKindSchema: z.ZodEnum<{
30
+ config: "config";
31
+ recipe: "recipe";
32
+ session: "session";
33
+ manual: "manual";
34
+ }>;
30
35
  export type RunPlanSourceKind = z.infer<typeof RunPlanSourceKindSchema>;
31
36
  export declare const RunPlanSourceSchema: z.ZodObject<{
32
- kind: z.ZodEnum<["config", "recipe", "session", "manual"]>;
33
- /**
34
- * What produced the plan — a config path, a recipe name, a session id. Optional:
35
- * the rendering must never invent one, and an honest "source kind only" beats a
36
- * guessed filename.
37
- */
37
+ kind: z.ZodEnum<{
38
+ config: "config";
39
+ recipe: "recipe";
40
+ session: "session";
41
+ manual: "manual";
42
+ }>;
38
43
  name: z.ZodOptional<z.ZodString>;
39
- }, "strict", z.ZodTypeAny, {
40
- kind: "config" | "recipe" | "session" | "manual";
41
- name?: string | undefined;
42
- }, {
43
- kind: "config" | "recipe" | "session" | "manual";
44
- name?: string | undefined;
45
- }>;
44
+ }, z.core.$strict>;
46
45
  export type RunPlanSource = z.infer<typeof RunPlanSourceSchema>;
47
- export declare const RunPlanSchema: z.ZodEffects<z.ZodObject<{
46
+ export declare const RunPlanSchema: z.ZodObject<{
48
47
  schemaVersion: z.ZodLiteral<"iterate.run-plan/0.1">;
49
48
  dimensions: z.ZodArray<z.ZodObject<{
50
49
  id: z.ZodString;
51
50
  label: z.ZodOptional<z.ZodString>;
52
51
  focus: z.ZodOptional<z.ZodString>;
53
- }, "strict", z.ZodTypeAny, {
54
- id: string;
55
- label?: string | undefined;
56
- focus?: string | undefined;
57
- }, {
58
- id: string;
59
- label?: string | undefined;
60
- focus?: string | undefined;
61
- }>, "many">;
52
+ }, z.core.$strict>>;
62
53
  source: z.ZodOptional<z.ZodObject<{
63
- kind: z.ZodEnum<["config", "recipe", "session", "manual"]>;
64
- /**
65
- * What produced the plan — a config path, a recipe name, a session id. Optional:
66
- * the rendering must never invent one, and an honest "source kind only" beats a
67
- * guessed filename.
68
- */
54
+ kind: z.ZodEnum<{
55
+ config: "config";
56
+ recipe: "recipe";
57
+ session: "session";
58
+ manual: "manual";
59
+ }>;
69
60
  name: z.ZodOptional<z.ZodString>;
70
- }, "strict", z.ZodTypeAny, {
71
- kind: "config" | "recipe" | "session" | "manual";
72
- name?: string | undefined;
73
- }, {
74
- kind: "config" | "recipe" | "session" | "manual";
75
- name?: string | undefined;
76
- }>>;
77
- }, "strict", z.ZodTypeAny, {
78
- schemaVersion: "iterate.run-plan/0.1";
79
- dimensions: {
80
- id: string;
81
- label?: string | undefined;
82
- focus?: string | undefined;
83
- }[];
84
- source?: {
85
- kind: "config" | "recipe" | "session" | "manual";
86
- name?: string | undefined;
87
- } | undefined;
88
- }, {
89
- schemaVersion: "iterate.run-plan/0.1";
90
- dimensions: {
91
- id: string;
92
- label?: string | undefined;
93
- focus?: string | undefined;
94
- }[];
95
- source?: {
96
- kind: "config" | "recipe" | "session" | "manual";
97
- name?: string | undefined;
98
- } | undefined;
99
- }>, {
100
- schemaVersion: "iterate.run-plan/0.1";
101
- dimensions: {
102
- id: string;
103
- label?: string | undefined;
104
- focus?: string | undefined;
105
- }[];
106
- source?: {
107
- kind: "config" | "recipe" | "session" | "manual";
108
- name?: string | undefined;
109
- } | undefined;
110
- }, {
111
- schemaVersion: "iterate.run-plan/0.1";
112
- dimensions: {
113
- id: string;
114
- label?: string | undefined;
115
- focus?: string | undefined;
116
- }[];
117
- source?: {
118
- kind: "config" | "recipe" | "session" | "manual";
119
- name?: string | undefined;
120
- } | undefined;
121
- }>;
61
+ }, z.core.$strict>>;
62
+ }, z.core.$strict>;
122
63
  export type RunPlan = z.infer<typeof RunPlanSchema>;
123
64
  /** The plan's ids, in planned order. Order is the caller's, never sorted. */
124
65
  export declare function plannedIds(plan: RunPlan): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"run-plan.d.ts","sourceRoot":"","sources":["../src/run-plan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,uBAAuB,EAAG,sBAA+B,CAAC;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,oDAAqD,CAAC;AAEnF,eAAO,MAAM,uBAAuB,sDAA2B,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;IAE9B;;;;OAIG;;;;;;;;EAEH,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;QATxB;;;;WAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCD,CAAC;AACL,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,CAElD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,gBAAgB,EAAE,CAErE;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAEnD"}
1
+ {"version":3,"file":"run-plan.d.ts","sourceRoot":"","sources":["../src/run-plan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,uBAAuB,EAAG,sBAA+B,CAAC;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,oDAAqD,CAAC;AAEnF,eAAO,MAAM,uBAAuB;;;;;EAA2B,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;;;;;kBAQ9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;kBA2BtB,CAAC;AACL,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,CAElD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,gBAAgB,EAAE,CAErE;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAEnD"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "comment": "Cross-implementation anchor for kernel/src/decision-log-transcribe.ts: how a decision record that the iterate ledgers ALREADY write maps onto the canonical ledger draft (5.8 R40 scenario 3, the 'three formats, one shape' convergence). A second implementation (the Python port in iterate-harness) is coded from this file, not from the TypeScript. Rules: (1) the record is an object with exactly the keys timestamp/round/type/data; an unknown key is REFUSED, never dropped. (2) type -> kind verbatim and must match ^[a-z][a-z0-9_]{0,31}$; no case folding, no renaming. (3) round is copied and must be an integer >= 0; data -> payload in full, and the canonical-JSON length of payload must stay <= 8192 characters. (4) createdAt is timestamp normalized to ISO-8601 UTC milliseconds ('Z', 3 digits). The INPUT must match ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,9})?(Z|\\+\\-[0-9]{2}:[0-9]{2})$ -- an explicit zone is required, any offset converts to UTC, and fractional seconds TRUNCATE toward zero (drop the tail, never round up). Anything else is refused, including host-guessable spellings like 11/10/2026 02:28: one runtime reads those as US month/day and another refuses them, and a ledger whose dates depend on which runtime converted it is not evidence. (5) outcome is READ, never inferred from tone: data.outcome then data.status when one of pass|fail|blocked|inconclusive; else data.passed===true -> pass, data.passed===false -> fail; else inconclusive. (6) summary is the record's own sentence, first present and non-blank of data.summary, data.message, data.reason; when it carries none the label is `<kind> (round <round>)` (or just `<kind>` when round is absent) -- a label, not a claim; a sentence over SUMMARY_MAX_LENGTH=2048 is refused rather than truncated. (7) dimension is data.dimension when it matches ^[a-z0-9]+(?:-[a-z0-9]+)*$ and is <= 64 chars, otherwise ABSENT -- never substituted by kind or method name. (8) operationId is data.operationId when it matches ^op_[0-9A-HJKMNP-TV-Z]{26}$, otherwise absent. (9) entryId is supplied by the caller (ledger-owned randomness), which is why this fixture pins a literal id per case: a transcription that minted ids could not be compared across implementations. (10) SIZE-CASE EXPANSION, so no 9 KB literals clutter this file: when a case carries `blobRepeat: N`, set record.data[ case.blobKey ?? 'blob' ] to N repetitions of 'x' BEFORE transcribing; when it carries `summaryRepeat: N`, set record.data.summary to N repetitions of 's'. Expectations otherwise compare field by field; an absent field in `expect` must be absent from the result, not null.",
2
+ "comment": "Cross-implementation anchor for kernel/src/decision-log-transcribe.ts: how a decision record that the iterate ledgers ALREADY write maps onto the canonical ledger draft (5.8 R40 scenario 3, the 'three formats, one shape' convergence). A second implementation (the Python port in iterate-harness) is coded from this file, not from the TypeScript. Rules: (1) the record is an object with exactly the keys timestamp/round/type/data; an unknown key is REFUSED, never dropped. (2) type -> kind verbatim and must match ^[a-z][a-z0-9_]{0,31}$; no case folding, no renaming. (3) round is copied and must be an integer >= 0; data -> payload in full, and the canonical-JSON length of payload must stay <= 8192 characters. (4) createdAt is timestamp normalized to ISO-8601 UTC milliseconds ('Z', 3 digits). The INPUT must match ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,9})?(Z|[+-][0-9]{2}:[0-9]{2})$ -- an explicit zone is required, EITHER sign converts to UTC, and fractional seconds TRUNCATE toward zero (drop the tail, never round up). The pattern bounds the SPELLING only; the calendar is checked too: a month outside 1..12, a day past the last day of that month (leap-aware), or a time or offset outside 23:59:59 / 23:59 is refused, not rolled over. `Date.parse` in ECMAScript turns 2026-02-31 into 2026-03-03, and a ledger whose date depends on which runtime's calendar decided it states two different instants for one record. Anything else is refused, including host-guessable spellings like 11/10/2026 02:28: one runtime reads those as US month/day and another refuses them, and a ledger whose dates depend on which runtime converted it is not evidence. (5) outcome is READ, never inferred from tone: data.outcome then data.status when one of pass|fail|blocked|inconclusive; else data.passed===true -> pass, data.passed===false -> fail; else inconclusive. (6) summary is the record's own sentence, first present and non-blank of data.summary, data.message, data.reason; when it carries none the label is `<kind> (round <round>)` (or just `<kind>` when round is absent) -- a label, not a claim; a sentence over SUMMARY_MAX_LENGTH=2048 is refused rather than truncated. (7) dimension is data.dimension when it matches ^[a-z0-9]+(?:-[a-z0-9]+)*$ and is <= 64 chars, otherwise ABSENT -- never substituted by kind or method name. (8) operationId is data.operationId when it matches ^op_[0-9A-HJKMNP-TV-Z]{26}$, otherwise absent. (9) entryId is supplied by the caller (ledger-owned randomness), which is why this fixture pins a literal id per case: a transcription that minted ids could not be compared across implementations. (10) SIZE-CASE EXPANSION, so no 9 KB literals clutter this file: when a case carries `blobRepeat: N`, set record.data[ case.blobKey ?? 'blob' ] to N repetitions of 'x' BEFORE transcribing; when it carries `summaryRepeat: N`, set record.data.summary to N repetitions of 's'. Expectations otherwise compare field by field; an absent field in `expect` must be absent from the result, not null.",
3
3
  "cases": [
4
4
  {
5
5
  "id": "review-result-full",
@@ -255,6 +255,46 @@
255
255
  },
256
256
  "entryId": "dl_0123456789ABCDEFGHJKMNPQRT",
257
257
  "expectError": "KERNEL_E_DECISION_TIMESTAMP"
258
+ },
259
+ {
260
+ "id": "west-of-utc-timestamp-normalizes",
261
+ "record": {
262
+ "timestamp": "2026-10-11T02:28:11.042-05:00",
263
+ "round": 3,
264
+ "type": "validation",
265
+ "data": {
266
+ "passed": true,
267
+ "command": "ruff check src/"
268
+ }
269
+ },
270
+ "entryId": "dl_0123456789ABCDEFGHJKMNPQRT",
271
+ "expect": {
272
+ "entryId": "dl_0123456789ABCDEFGHJKMNPQRT",
273
+ "summary": "validation (round 3)",
274
+ "outcome": "pass",
275
+ "createdAt": "2026-10-11T07:28:11.042Z",
276
+ "kind": "validation",
277
+ "round": 3,
278
+ "payload": {
279
+ "passed": true,
280
+ "command": "ruff check src/"
281
+ }
282
+ },
283
+ "note": "Rule 4 with a negative offset: the +08:00 case alone let an implementation that only accepted plus-or-nothing through. This is the shape a US producer writes."
284
+ },
285
+ {
286
+ "id": "day-overflow-timestamp-refuses",
287
+ "record": {
288
+ "timestamp": "2026-02-31T00:00:00Z",
289
+ "round": 4,
290
+ "type": "atomic_fix",
291
+ "data": {
292
+ "passed": true
293
+ }
294
+ },
295
+ "entryId": "dl_0123456789ABCDEFGHJKMNPQRT",
296
+ "expectError": "KERNEL_E_DECISION_TIMESTAMP",
297
+ "note": "Rule 4's calendar half. February has 28 days in 2026, so this is not an instant; an implementation that hands it to the host parser records the decision on 2026-03-03 instead."
258
298
  }
259
299
  ]
260
300
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iterate-kernel",
3
- "version": "0.1.9",
3
+ "version": "0.1.12",
4
4
  "private": false,
5
5
  "description": "iterate ecosystem shared kernel: schemas, the evidence->decision transcription, the decision-log audit chain and public validators. Verification reasoning stays in the engine; this layer transcribes.",
6
6
  "type": "module",
@@ -91,7 +91,7 @@
91
91
  "prepublishOnly": "npm run build"
92
92
  },
93
93
  "dependencies": {
94
- "zod": "3.25.76"
94
+ "zod": "4.6.7"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@types/node": "26.5.1",
@@ -99,6 +99,11 @@
99
99
  "typescript": "5.9.3"
100
100
  },
101
101
  "license": "MIT",
102
+ "repository": {
103
+ "type": "git",
104
+ "url": "git+https://github.com/jingzhao-l/iterate-skill.git",
105
+ "directory": "kernel"
106
+ },
102
107
  "publishConfig": {
103
108
  "access": "public"
104
109
  }
@@ -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": {