iterate-kernel 0.1.8 → 0.1.10
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 +10 -0
- package/dist/convergence.d.ts +36 -44
- package/dist/convergence.d.ts.map +1 -1
- package/dist/decision-log-entry.d.ts +14 -28
- package/dist/decision-log-entry.d.ts.map +1 -1
- package/dist/decision-log.d.ts +13 -30
- package/dist/decision-log.d.ts.map +1 -1
- package/dist/dimension-context.d.ts +39 -223
- package/dist/dimension-context.d.ts.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +11 -1
- package/dist/errors.js.map +1 -1
- package/dist/evidence-pack.d.ts +256 -1595
- package/dist/evidence-pack.d.ts.map +1 -1
- package/dist/invariant-report.d.ts +53 -189
- package/dist/invariant-report.d.ts.map +1 -1
- package/dist/provider-registration.d.ts +22 -72
- package/dist/provider-registration.d.ts.map +1 -1
- package/dist/recipe-config.d.ts +21 -32
- package/dist/recipe-config.d.ts.map +1 -1
- package/dist/run-plan.d.ts +23 -82
- package/dist/run-plan.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,6 +14,16 @@ each inventing its own.
|
|
|
14
14
|
npm install iterate-kernel
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
## The `zod` in these declarations is exact on purpose
|
|
18
|
+
|
|
19
|
+
`package.json` pins `zod` to one version rather than a range, because the shipped `.d.ts` are
|
|
20
|
+
emitted *by* a zod: with a range, a consumer whose resolver picked a different major got no type
|
|
21
|
+
error where one was owed — `z.infer` on these schemas silently degraded to `any`, and TypeScript
|
|
22
|
+
complained about the consumer's own code instead. `test/zod-contract.test.mjs` holds that line
|
|
23
|
+
(declared spec exact, installed equals declared, emitted declarations still zod-3 shaped). Moving
|
|
24
|
+
zod majors is a contract event for every consumer that type-checks against these declarations:
|
|
25
|
+
say it in the release note and change that test in the same commit.
|
|
26
|
+
|
|
17
27
|
## Import per module, not through the barrel
|
|
18
28
|
|
|
19
29
|
```ts
|
package/dist/convergence.d.ts
CHANGED
|
@@ -10,47 +10,35 @@ import { z } from "zod";
|
|
|
10
10
|
* asymmetry that makes a loop stop in one product and keep running in the other.
|
|
11
11
|
*/
|
|
12
12
|
export declare const CONVERGENCE_SCHEMA_VERSION: "iterate.convergence/0.1";
|
|
13
|
-
export declare const InvariantStateSchema: z.ZodEnum<
|
|
13
|
+
export declare const InvariantStateSchema: z.ZodEnum<{
|
|
14
|
+
pass: "pass";
|
|
15
|
+
fail: "fail";
|
|
16
|
+
error: "error";
|
|
17
|
+
unmeasured: "unmeasured";
|
|
18
|
+
}>;
|
|
14
19
|
export type InvariantState = z.infer<typeof InvariantStateSchema>;
|
|
15
20
|
/** What a caller states about the round that just finished. */
|
|
16
21
|
export declare const RoundStateSchema: z.ZodObject<{
|
|
17
22
|
schemaVersion: z.ZodOptional<z.ZodLiteral<"iterate.convergence/0.1">>;
|
|
18
23
|
round: z.ZodNumber;
|
|
19
24
|
maxRounds: z.ZodNumber;
|
|
20
|
-
invariantState: z.ZodEnum<
|
|
25
|
+
invariantState: z.ZodEnum<{
|
|
26
|
+
pass: "pass";
|
|
27
|
+
fail: "fail";
|
|
28
|
+
error: "error";
|
|
29
|
+
unmeasured: "unmeasured";
|
|
30
|
+
}>;
|
|
21
31
|
openFindings: z.ZodNumber;
|
|
22
|
-
/** False when the engine never got to evidence something (refused, crashed, unattached). */
|
|
23
32
|
evidenceComplete: z.ZodBoolean;
|
|
24
|
-
/**
|
|
25
|
-
* The engine's own circuit-breaker level for this run; 3 is tripped.
|
|
26
|
-
*
|
|
27
|
-
* OPTIONAL, and absence is not the same claim as 0. `0` says "a breaker exists and it has
|
|
28
|
-
* not tripped"; absence says "this run has no breaker channel at all" — which is the normal
|
|
29
|
-
* shape of an iterate loop that never touched the GUI engine. The distinction changes no
|
|
30
|
-
* verdict today (only `>= 3` halts), but collapsing it would force a producer that never
|
|
31
|
-
* looked to assert a measurement it did not take, and that is the exact failure this
|
|
32
|
-
* contract's `unmeasured` state exists to prevent.
|
|
33
|
-
*/
|
|
34
33
|
breakerLevel: z.ZodOptional<z.ZodNumber>;
|
|
35
|
-
},
|
|
36
|
-
round: number;
|
|
37
|
-
maxRounds: number;
|
|
38
|
-
invariantState: "pass" | "fail" | "error" | "unmeasured";
|
|
39
|
-
openFindings: number;
|
|
40
|
-
evidenceComplete: boolean;
|
|
41
|
-
schemaVersion?: "iterate.convergence/0.1" | undefined;
|
|
42
|
-
breakerLevel?: number | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
round: number;
|
|
45
|
-
maxRounds: number;
|
|
46
|
-
invariantState: "pass" | "fail" | "error" | "unmeasured";
|
|
47
|
-
openFindings: number;
|
|
48
|
-
evidenceComplete: boolean;
|
|
49
|
-
schemaVersion?: "iterate.convergence/0.1" | undefined;
|
|
50
|
-
breakerLevel?: number | undefined;
|
|
51
|
-
}>;
|
|
34
|
+
}, z.core.$strict>;
|
|
52
35
|
export type RoundState = z.infer<typeof RoundStateSchema>;
|
|
53
|
-
export declare const ConvergenceActionSchema: z.ZodEnum<
|
|
36
|
+
export declare const ConvergenceActionSchema: z.ZodEnum<{
|
|
37
|
+
fix: "fix";
|
|
38
|
+
verify: "verify";
|
|
39
|
+
converged: "converged";
|
|
40
|
+
halt: "halt";
|
|
41
|
+
}>;
|
|
54
42
|
export type ConvergenceAction = z.infer<typeof ConvergenceActionSchema>;
|
|
55
43
|
export declare const CONVERGENCE_REASONS: {
|
|
56
44
|
readonly breakerTripped: "circuit-breaker-tripped";
|
|
@@ -64,21 +52,25 @@ export declare const CONVERGENCE_REASONS: {
|
|
|
64
52
|
};
|
|
65
53
|
export type ConvergenceReason = (typeof CONVERGENCE_REASONS)[keyof typeof CONVERGENCE_REASONS];
|
|
66
54
|
export declare const ConvergenceDecisionSchema: z.ZodObject<{
|
|
67
|
-
action: z.ZodEnum<
|
|
68
|
-
|
|
55
|
+
action: z.ZodEnum<{
|
|
56
|
+
fix: "fix";
|
|
57
|
+
verify: "verify";
|
|
58
|
+
converged: "converged";
|
|
59
|
+
halt: "halt";
|
|
60
|
+
}>;
|
|
61
|
+
reason: z.ZodEnum<{
|
|
62
|
+
"circuit-breaker-tripped": "circuit-breaker-tripped";
|
|
63
|
+
"round-budget-exhausted": "round-budget-exhausted";
|
|
64
|
+
"invariant-check-errored": "invariant-check-errored";
|
|
65
|
+
"open-findings": "open-findings";
|
|
66
|
+
"invariants-failed": "invariants-failed";
|
|
67
|
+
"evidence-incomplete": "evidence-incomplete";
|
|
68
|
+
"invariants-unmeasured": "invariants-unmeasured";
|
|
69
|
+
"all-gates-green": "all-gates-green";
|
|
70
|
+
}>;
|
|
69
71
|
round: z.ZodNumber;
|
|
70
72
|
maxRounds: z.ZodNumber;
|
|
71
|
-
},
|
|
72
|
-
round: number;
|
|
73
|
-
maxRounds: number;
|
|
74
|
-
action: "fix" | "verify" | "converged" | "halt";
|
|
75
|
-
reason: "circuit-breaker-tripped" | "round-budget-exhausted" | "invariant-check-errored" | "open-findings" | "invariants-failed" | "evidence-incomplete" | "invariants-unmeasured" | "all-gates-green";
|
|
76
|
-
}, {
|
|
77
|
-
round: number;
|
|
78
|
-
maxRounds: number;
|
|
79
|
-
action: "fix" | "verify" | "converged" | "halt";
|
|
80
|
-
reason: "circuit-breaker-tripped" | "round-budget-exhausted" | "invariant-check-errored" | "open-findings" | "invariants-failed" | "evidence-incomplete" | "invariants-unmeasured" | "all-gates-green";
|
|
81
|
-
}>;
|
|
73
|
+
}, z.core.$strict>;
|
|
82
74
|
export type ConvergenceDecision = z.infer<typeof ConvergenceDecisionSchema>;
|
|
83
75
|
/**
|
|
84
76
|
* Precedence, and why it is this order:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convergence.d.ts","sourceRoot":"","sources":["../src/convergence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,EAAG,yBAAkC,CAAC;AAE7E,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"convergence.d.ts","sourceRoot":"","sources":["../src/convergence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,EAAG,yBAAkC,CAAC;AAE7E,eAAO,MAAM,oBAAoB;;;;;EAAkD,CAAC;AACpF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;kBAmB3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,uBAAuB;;;;;EAAiD,CAAC;AACtF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;;;;;;CAStB,CAAC;AACX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAE/F,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;kBAcpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,mBAAmB,CAyB1E"}
|
|
@@ -26,7 +26,12 @@ export declare const DECISION_KIND_PATTERN: RegExp;
|
|
|
26
26
|
* state it (see the documented divergence in `schemas/decision-log-entry.schema.json`).
|
|
27
27
|
*/
|
|
28
28
|
export declare const PAYLOAD_MAX_CANONICAL_LENGTH = 8192;
|
|
29
|
-
export declare const DecisionOutcomeSchema: z.ZodEnum<
|
|
29
|
+
export declare const DecisionOutcomeSchema: z.ZodEnum<{
|
|
30
|
+
pass: "pass";
|
|
31
|
+
fail: "fail";
|
|
32
|
+
blocked: "blocked";
|
|
33
|
+
inconclusive: "inconclusive";
|
|
34
|
+
}>;
|
|
30
35
|
export type DecisionOutcome = z.infer<typeof DecisionOutcomeSchema>;
|
|
31
36
|
/**
|
|
32
37
|
* One line of the audit chain.
|
|
@@ -45,36 +50,17 @@ export declare const DecisionLogEntrySchema: z.ZodObject<{
|
|
|
45
50
|
prevEntryHash: z.ZodString;
|
|
46
51
|
operationId: z.ZodOptional<z.ZodString>;
|
|
47
52
|
summary: z.ZodString;
|
|
48
|
-
outcome: z.ZodEnum<
|
|
53
|
+
outcome: z.ZodEnum<{
|
|
54
|
+
pass: "pass";
|
|
55
|
+
fail: "fail";
|
|
56
|
+
blocked: "blocked";
|
|
57
|
+
inconclusive: "inconclusive";
|
|
58
|
+
}>;
|
|
49
59
|
createdAt: z.ZodString;
|
|
50
60
|
kind: z.ZodOptional<z.ZodString>;
|
|
51
61
|
round: z.ZodOptional<z.ZodNumber>;
|
|
52
62
|
dimension: z.ZodOptional<z.ZodString>;
|
|
53
|
-
payload: z.
|
|
54
|
-
},
|
|
55
|
-
createdAt: string;
|
|
56
|
-
entryId: string;
|
|
57
|
-
sequence: number;
|
|
58
|
-
prevEntryHash: string;
|
|
59
|
-
summary: string;
|
|
60
|
-
outcome: "pass" | "fail" | "blocked" | "inconclusive";
|
|
61
|
-
round?: number | undefined;
|
|
62
|
-
kind?: string | undefined;
|
|
63
|
-
operationId?: string | undefined;
|
|
64
|
-
dimension?: string | undefined;
|
|
65
|
-
payload?: Record<string, unknown> | undefined;
|
|
66
|
-
}, {
|
|
67
|
-
createdAt: string;
|
|
68
|
-
entryId: string;
|
|
69
|
-
sequence: number;
|
|
70
|
-
prevEntryHash: string;
|
|
71
|
-
summary: string;
|
|
72
|
-
outcome: "pass" | "fail" | "blocked" | "inconclusive";
|
|
73
|
-
round?: number | undefined;
|
|
74
|
-
kind?: string | undefined;
|
|
75
|
-
operationId?: string | undefined;
|
|
76
|
-
dimension?: string | undefined;
|
|
77
|
-
payload?: Record<string, unknown> | undefined;
|
|
78
|
-
}>;
|
|
63
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
64
|
+
}, z.core.$strict>;
|
|
79
65
|
export type DecisionLogEntry = z.infer<typeof DecisionLogEntrySchema>;
|
|
80
66
|
//# sourceMappingURL=decision-log-entry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-log-entry.d.ts","sourceRoot":"","sources":["../src/decision-log-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,yBAAyB,QAAgC,CAAC;AAEvE,wFAAwF;AACxF,eAAO,MAAM,uBAAuB,QAAsB,CAAC;AAE3D,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,QAA2B,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,OAAO,CAAC;AAEjD,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"decision-log-entry.d.ts","sourceRoot":"","sources":["../src/decision-log-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,yBAAyB,QAAgC,CAAC;AAEvE,wFAAwF;AACxF,eAAO,MAAM,uBAAuB,QAAsB,CAAC;AAE3D,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,QAA2B,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,OAAO,CAAC;AAEjD,eAAO,MAAM,qBAAqB;;;;;EAAsD,CAAC;AACzF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;kBAkBjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
package/dist/decision-log.d.ts
CHANGED
|
@@ -62,39 +62,22 @@ export interface DecisionLogDraft {
|
|
|
62
62
|
* was decided and why. `sequence`/`prevEntryHash` are deliberately *not*
|
|
63
63
|
* accepted here — the ledger owns them (see `appendDecisionLogEntry`).
|
|
64
64
|
*/
|
|
65
|
-
export declare const DecisionLogDraftSchema: import("zod").ZodObject<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
prevEntryHash: import("zod").ZodString;
|
|
65
|
+
export declare const DecisionLogDraftSchema: import("zod").ZodObject<{
|
|
66
|
+
round: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
67
|
+
kind: import("zod").ZodOptional<import("zod").ZodString>;
|
|
69
68
|
operationId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
70
|
-
summary: import("zod").ZodString;
|
|
71
|
-
outcome: import("zod").ZodEnum<["pass", "fail", "blocked", "inconclusive"]>;
|
|
72
69
|
createdAt: import("zod").ZodString;
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
entryId: import("zod").ZodString;
|
|
71
|
+
summary: import("zod").ZodString;
|
|
72
|
+
outcome: import("zod").ZodEnum<{
|
|
73
|
+
pass: "pass";
|
|
74
|
+
fail: "fail";
|
|
75
|
+
blocked: "blocked";
|
|
76
|
+
inconclusive: "inconclusive";
|
|
77
|
+
}>;
|
|
75
78
|
dimension: import("zod").ZodOptional<import("zod").ZodString>;
|
|
76
|
-
payload: import("zod").
|
|
77
|
-
},
|
|
78
|
-
createdAt: string;
|
|
79
|
-
entryId: string;
|
|
80
|
-
summary: string;
|
|
81
|
-
outcome: "pass" | "fail" | "blocked" | "inconclusive";
|
|
82
|
-
round?: number | undefined;
|
|
83
|
-
kind?: string | undefined;
|
|
84
|
-
operationId?: string | undefined;
|
|
85
|
-
dimension?: string | undefined;
|
|
86
|
-
payload?: Record<string, unknown> | undefined;
|
|
87
|
-
}, {
|
|
88
|
-
createdAt: string;
|
|
89
|
-
entryId: string;
|
|
90
|
-
summary: string;
|
|
91
|
-
outcome: "pass" | "fail" | "blocked" | "inconclusive";
|
|
92
|
-
round?: number | undefined;
|
|
93
|
-
kind?: string | undefined;
|
|
94
|
-
operationId?: string | undefined;
|
|
95
|
-
dimension?: string | undefined;
|
|
96
|
-
payload?: Record<string, unknown> | undefined;
|
|
97
|
-
}>;
|
|
79
|
+
payload: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
80
|
+
}, import("zod/v4/core").$strict>;
|
|
98
81
|
export interface AppendedDecisionLogEntry {
|
|
99
82
|
readonly entry: DecisionLogEntry;
|
|
100
83
|
/** sha256 of the entry's canonical JSON — what the *next* entry must carry as `prevEntryHash`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-log.d.ts","sourceRoot":"","sources":["../src/decision-log.ts"],"names":[],"mappings":"AAKA,OAAO,EAA0B,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG9G;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,eAAO,MAAM,kBAAkB;;;;;;;CAOrB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAEjG;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,C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IAClC,gGAAgG;IAChG,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,+EAA+E;AAC/E,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAEzE;AAED,mEAAmE;AACnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAEpE;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,GAAE,MAAmB,GAAG,MAAM,CAc3E;AAWD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,uBAAuB,CA0D3E;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,uBAAuB,CAiBxE;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAgB5F;AAqBD;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,gBAAgB,EACvB,KAAK,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACjD,gBAAgB,CA2ClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,gBAAgB,GACtB,wBAAwB,CA0F1B"}
|
|
@@ -47,15 +47,7 @@ export declare const PlannedDimensionSchema: z.ZodObject<{
|
|
|
47
47
|
id: z.ZodString;
|
|
48
48
|
label: z.ZodOptional<z.ZodString>;
|
|
49
49
|
focus: z.ZodOptional<z.ZodString>;
|
|
50
|
-
},
|
|
51
|
-
id: string;
|
|
52
|
-
label?: string | undefined;
|
|
53
|
-
focus?: string | undefined;
|
|
54
|
-
}, {
|
|
55
|
-
id: string;
|
|
56
|
-
label?: string | undefined;
|
|
57
|
-
focus?: string | undefined;
|
|
58
|
-
}>;
|
|
50
|
+
}, z.core.$strict>;
|
|
59
51
|
export type PlannedDimension = z.infer<typeof PlannedDimensionSchema>;
|
|
60
52
|
/**
|
|
61
53
|
* What the engine recorded for one dimension. `decisions` is a count of ledger
|
|
@@ -66,14 +58,8 @@ export type PlannedDimension = z.infer<typeof PlannedDimensionSchema>;
|
|
|
66
58
|
export declare const DIMENSION_MAX_OPERATION_IDS = 32;
|
|
67
59
|
export declare const DimensionEvidenceSchema: z.ZodObject<{
|
|
68
60
|
decisions: z.ZodNumber;
|
|
69
|
-
operationIds: z.ZodOptional<z.ZodArray<z.ZodString
|
|
70
|
-
},
|
|
71
|
-
decisions: number;
|
|
72
|
-
operationIds?: string[] | undefined;
|
|
73
|
-
}, {
|
|
74
|
-
decisions: number;
|
|
75
|
-
operationIds?: string[] | undefined;
|
|
76
|
-
}>;
|
|
61
|
+
operationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
62
|
+
}, z.core.$strict>;
|
|
77
63
|
export type DimensionEvidence = z.infer<typeof DimensionEvidenceSchema>;
|
|
78
64
|
/**
|
|
79
65
|
* A dimension's state, and the only three words this module will use:
|
|
@@ -87,42 +73,26 @@ export type DimensionEvidence = z.infer<typeof DimensionEvidenceSchema>;
|
|
|
87
73
|
* a reporter that guesses is how "we reviewed correctness" ends up in a summary
|
|
88
74
|
* when nothing was checked.
|
|
89
75
|
*/
|
|
90
|
-
export declare const DimensionStatusSchema: z.ZodEnum<
|
|
76
|
+
export declare const DimensionStatusSchema: z.ZodEnum<{
|
|
77
|
+
verified: "verified";
|
|
78
|
+
unverified: "unverified";
|
|
79
|
+
unplanned: "unplanned";
|
|
80
|
+
}>;
|
|
91
81
|
export type DimensionStatus = z.infer<typeof DimensionStatusSchema>;
|
|
92
82
|
export declare const DimensionContextEntrySchema: z.ZodObject<{
|
|
93
83
|
id: z.ZodString;
|
|
94
|
-
status: z.ZodEnum<
|
|
84
|
+
status: z.ZodEnum<{
|
|
85
|
+
verified: "verified";
|
|
86
|
+
unverified: "unverified";
|
|
87
|
+
unplanned: "unplanned";
|
|
88
|
+
}>;
|
|
95
89
|
label: z.ZodOptional<z.ZodString>;
|
|
96
90
|
focus: z.ZodOptional<z.ZodString>;
|
|
97
91
|
evidence: z.ZodObject<{
|
|
98
92
|
decisions: z.ZodNumber;
|
|
99
|
-
operationIds: z.ZodOptional<z.ZodArray<z.ZodString
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
operationIds?: string[] | undefined;
|
|
103
|
-
}, {
|
|
104
|
-
decisions: number;
|
|
105
|
-
operationIds?: string[] | undefined;
|
|
106
|
-
}>;
|
|
107
|
-
}, "strict", z.ZodTypeAny, {
|
|
108
|
-
status: "verified" | "unverified" | "unplanned";
|
|
109
|
-
id: string;
|
|
110
|
-
evidence: {
|
|
111
|
-
decisions: number;
|
|
112
|
-
operationIds?: string[] | undefined;
|
|
113
|
-
};
|
|
114
|
-
label?: string | undefined;
|
|
115
|
-
focus?: string | undefined;
|
|
116
|
-
}, {
|
|
117
|
-
status: "verified" | "unverified" | "unplanned";
|
|
118
|
-
id: string;
|
|
119
|
-
evidence: {
|
|
120
|
-
decisions: number;
|
|
121
|
-
operationIds?: string[] | undefined;
|
|
122
|
-
};
|
|
123
|
-
label?: string | undefined;
|
|
124
|
-
focus?: string | undefined;
|
|
125
|
-
}>;
|
|
93
|
+
operationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
}, z.core.$strict>;
|
|
95
|
+
}, z.core.$strict>;
|
|
126
96
|
export type DimensionContextEntry = z.infer<typeof DimensionContextEntrySchema>;
|
|
127
97
|
/**
|
|
128
98
|
* The per-dimension summary plus the counts a caller asserts out loud. The
|
|
@@ -137,165 +107,45 @@ export declare const DimensionContextTotalsSchema: z.ZodObject<{
|
|
|
137
107
|
unverified: z.ZodNumber;
|
|
138
108
|
unplanned: z.ZodNumber;
|
|
139
109
|
decisions: z.ZodNumber;
|
|
140
|
-
},
|
|
141
|
-
decisions: number;
|
|
142
|
-
verified: number;
|
|
143
|
-
unverified: number;
|
|
144
|
-
unplanned: number;
|
|
145
|
-
planned: number;
|
|
146
|
-
}, {
|
|
147
|
-
decisions: number;
|
|
148
|
-
verified: number;
|
|
149
|
-
unverified: number;
|
|
150
|
-
unplanned: number;
|
|
151
|
-
planned: number;
|
|
152
|
-
}>;
|
|
110
|
+
}, z.core.$strict>;
|
|
153
111
|
export type DimensionContextTotals = z.infer<typeof DimensionContextTotalsSchema>;
|
|
154
112
|
export declare const DimensionContextSchema: z.ZodObject<{
|
|
155
113
|
planned: z.ZodArray<z.ZodObject<{
|
|
156
114
|
id: z.ZodString;
|
|
157
|
-
status: z.ZodEnum<
|
|
115
|
+
status: z.ZodEnum<{
|
|
116
|
+
verified: "verified";
|
|
117
|
+
unverified: "unverified";
|
|
118
|
+
unplanned: "unplanned";
|
|
119
|
+
}>;
|
|
158
120
|
label: z.ZodOptional<z.ZodString>;
|
|
159
121
|
focus: z.ZodOptional<z.ZodString>;
|
|
160
122
|
evidence: z.ZodObject<{
|
|
161
123
|
decisions: z.ZodNumber;
|
|
162
|
-
operationIds: z.ZodOptional<z.ZodArray<z.ZodString
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
operationIds?: string[] | undefined;
|
|
166
|
-
}, {
|
|
167
|
-
decisions: number;
|
|
168
|
-
operationIds?: string[] | undefined;
|
|
169
|
-
}>;
|
|
170
|
-
}, "strict", z.ZodTypeAny, {
|
|
171
|
-
status: "verified" | "unverified" | "unplanned";
|
|
172
|
-
id: string;
|
|
173
|
-
evidence: {
|
|
174
|
-
decisions: number;
|
|
175
|
-
operationIds?: string[] | undefined;
|
|
176
|
-
};
|
|
177
|
-
label?: string | undefined;
|
|
178
|
-
focus?: string | undefined;
|
|
179
|
-
}, {
|
|
180
|
-
status: "verified" | "unverified" | "unplanned";
|
|
181
|
-
id: string;
|
|
182
|
-
evidence: {
|
|
183
|
-
decisions: number;
|
|
184
|
-
operationIds?: string[] | undefined;
|
|
185
|
-
};
|
|
186
|
-
label?: string | undefined;
|
|
187
|
-
focus?: string | undefined;
|
|
188
|
-
}>, "many">;
|
|
124
|
+
operationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
}, z.core.$strict>>;
|
|
189
127
|
unplanned: z.ZodArray<z.ZodObject<{
|
|
190
128
|
id: z.ZodString;
|
|
191
|
-
status: z.ZodEnum<
|
|
129
|
+
status: z.ZodEnum<{
|
|
130
|
+
verified: "verified";
|
|
131
|
+
unverified: "unverified";
|
|
132
|
+
unplanned: "unplanned";
|
|
133
|
+
}>;
|
|
192
134
|
label: z.ZodOptional<z.ZodString>;
|
|
193
135
|
focus: z.ZodOptional<z.ZodString>;
|
|
194
136
|
evidence: z.ZodObject<{
|
|
195
137
|
decisions: z.ZodNumber;
|
|
196
|
-
operationIds: z.ZodOptional<z.ZodArray<z.ZodString
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
operationIds?: string[] | undefined;
|
|
200
|
-
}, {
|
|
201
|
-
decisions: number;
|
|
202
|
-
operationIds?: string[] | undefined;
|
|
203
|
-
}>;
|
|
204
|
-
}, "strict", z.ZodTypeAny, {
|
|
205
|
-
status: "verified" | "unverified" | "unplanned";
|
|
206
|
-
id: string;
|
|
207
|
-
evidence: {
|
|
208
|
-
decisions: number;
|
|
209
|
-
operationIds?: string[] | undefined;
|
|
210
|
-
};
|
|
211
|
-
label?: string | undefined;
|
|
212
|
-
focus?: string | undefined;
|
|
213
|
-
}, {
|
|
214
|
-
status: "verified" | "unverified" | "unplanned";
|
|
215
|
-
id: string;
|
|
216
|
-
evidence: {
|
|
217
|
-
decisions: number;
|
|
218
|
-
operationIds?: string[] | undefined;
|
|
219
|
-
};
|
|
220
|
-
label?: string | undefined;
|
|
221
|
-
focus?: string | undefined;
|
|
222
|
-
}>, "many">;
|
|
138
|
+
operationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
|
+
}, z.core.$strict>;
|
|
140
|
+
}, z.core.$strict>>;
|
|
223
141
|
totals: z.ZodObject<{
|
|
224
142
|
planned: z.ZodNumber;
|
|
225
143
|
verified: z.ZodNumber;
|
|
226
144
|
unverified: z.ZodNumber;
|
|
227
145
|
unplanned: z.ZodNumber;
|
|
228
146
|
decisions: z.ZodNumber;
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
verified: number;
|
|
232
|
-
unverified: number;
|
|
233
|
-
unplanned: number;
|
|
234
|
-
planned: number;
|
|
235
|
-
}, {
|
|
236
|
-
decisions: number;
|
|
237
|
-
verified: number;
|
|
238
|
-
unverified: number;
|
|
239
|
-
unplanned: number;
|
|
240
|
-
planned: number;
|
|
241
|
-
}>;
|
|
242
|
-
}, "strict", z.ZodTypeAny, {
|
|
243
|
-
unplanned: {
|
|
244
|
-
status: "verified" | "unverified" | "unplanned";
|
|
245
|
-
id: string;
|
|
246
|
-
evidence: {
|
|
247
|
-
decisions: number;
|
|
248
|
-
operationIds?: string[] | undefined;
|
|
249
|
-
};
|
|
250
|
-
label?: string | undefined;
|
|
251
|
-
focus?: string | undefined;
|
|
252
|
-
}[];
|
|
253
|
-
planned: {
|
|
254
|
-
status: "verified" | "unverified" | "unplanned";
|
|
255
|
-
id: string;
|
|
256
|
-
evidence: {
|
|
257
|
-
decisions: number;
|
|
258
|
-
operationIds?: string[] | undefined;
|
|
259
|
-
};
|
|
260
|
-
label?: string | undefined;
|
|
261
|
-
focus?: string | undefined;
|
|
262
|
-
}[];
|
|
263
|
-
totals: {
|
|
264
|
-
decisions: number;
|
|
265
|
-
verified: number;
|
|
266
|
-
unverified: number;
|
|
267
|
-
unplanned: number;
|
|
268
|
-
planned: number;
|
|
269
|
-
};
|
|
270
|
-
}, {
|
|
271
|
-
unplanned: {
|
|
272
|
-
status: "verified" | "unverified" | "unplanned";
|
|
273
|
-
id: string;
|
|
274
|
-
evidence: {
|
|
275
|
-
decisions: number;
|
|
276
|
-
operationIds?: string[] | undefined;
|
|
277
|
-
};
|
|
278
|
-
label?: string | undefined;
|
|
279
|
-
focus?: string | undefined;
|
|
280
|
-
}[];
|
|
281
|
-
planned: {
|
|
282
|
-
status: "verified" | "unverified" | "unplanned";
|
|
283
|
-
id: string;
|
|
284
|
-
evidence: {
|
|
285
|
-
decisions: number;
|
|
286
|
-
operationIds?: string[] | undefined;
|
|
287
|
-
};
|
|
288
|
-
label?: string | undefined;
|
|
289
|
-
focus?: string | undefined;
|
|
290
|
-
}[];
|
|
291
|
-
totals: {
|
|
292
|
-
decisions: number;
|
|
293
|
-
verified: number;
|
|
294
|
-
unverified: number;
|
|
295
|
-
unplanned: number;
|
|
296
|
-
planned: number;
|
|
297
|
-
};
|
|
298
|
-
}>;
|
|
147
|
+
}, z.core.$strict>;
|
|
148
|
+
}, z.core.$strict>;
|
|
299
149
|
export type DimensionContext = z.infer<typeof DimensionContextSchema>;
|
|
300
150
|
/** What a caller supplies: the plan, plus what the engine recorded per id. */
|
|
301
151
|
export declare const DimensionContextInputSchema: z.ZodObject<{
|
|
@@ -303,46 +153,12 @@ export declare const DimensionContextInputSchema: z.ZodObject<{
|
|
|
303
153
|
id: z.ZodString;
|
|
304
154
|
label: z.ZodOptional<z.ZodString>;
|
|
305
155
|
focus: z.ZodOptional<z.ZodString>;
|
|
306
|
-
},
|
|
307
|
-
id: string;
|
|
308
|
-
label?: string | undefined;
|
|
309
|
-
focus?: string | undefined;
|
|
310
|
-
}, {
|
|
311
|
-
id: string;
|
|
312
|
-
label?: string | undefined;
|
|
313
|
-
focus?: string | undefined;
|
|
314
|
-
}>, "many">;
|
|
156
|
+
}, z.core.$strict>>;
|
|
315
157
|
recorded: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
316
158
|
decisions: z.ZodNumber;
|
|
317
|
-
operationIds: z.ZodOptional<z.ZodArray<z.ZodString
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
operationIds?: string[] | undefined;
|
|
321
|
-
}, {
|
|
322
|
-
decisions: number;
|
|
323
|
-
operationIds?: string[] | undefined;
|
|
324
|
-
}>>;
|
|
325
|
-
}, "strict", z.ZodTypeAny, {
|
|
326
|
-
planned: {
|
|
327
|
-
id: string;
|
|
328
|
-
label?: string | undefined;
|
|
329
|
-
focus?: string | undefined;
|
|
330
|
-
}[];
|
|
331
|
-
recorded: Record<string, {
|
|
332
|
-
decisions: number;
|
|
333
|
-
operationIds?: string[] | undefined;
|
|
334
|
-
}>;
|
|
335
|
-
}, {
|
|
336
|
-
planned: {
|
|
337
|
-
id: string;
|
|
338
|
-
label?: string | undefined;
|
|
339
|
-
focus?: string | undefined;
|
|
340
|
-
}[];
|
|
341
|
-
recorded: Record<string, {
|
|
342
|
-
decisions: number;
|
|
343
|
-
operationIds?: string[] | undefined;
|
|
344
|
-
}>;
|
|
345
|
-
}>;
|
|
159
|
+
operationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
}, z.core.$strict>;
|
|
346
162
|
export type DimensionContextInput = z.infer<typeof DimensionContextInputSchema>;
|
|
347
163
|
export declare const DIMENSION_CONTEXT_CODES: {
|
|
348
164
|
readonly duplicate: "KERNEL_E_DIMENSION_DUPLICATE";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimension-context.d.ts","sourceRoot":"","sources":["../src/dimension-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,QAA+B,CAAC;AACjE,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAC9C,yFAAyF;AACzF,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,eAAO,MAAM,qBAAqB,IAAI,CAAC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AC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAIjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,8EAA8E;AAC9E,eAAO,MAAM,2BAA2B;;;;;;;;;;kBAMtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,uBAAuB;;;CAG1B,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAEzG;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;CAO3F;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,gBAAgB,CA4D/E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAexE"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare class KernelSchemaError extends Error {
|
|
|
21
21
|
*/
|
|
22
22
|
export interface SchemaErrorLike {
|
|
23
23
|
readonly issues: readonly {
|
|
24
|
-
readonly path: readonly
|
|
24
|
+
readonly path: readonly PropertyKey[];
|
|
25
25
|
readonly message: string;
|
|
26
26
|
}[];
|
|
27
27
|
}
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,qBAAqB;IAClC,QAAQ,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAC;gBAElC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,iBAAiB,EAAE;CAQhE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,qBAAqB;IAClC,QAAQ,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAC;gBAElC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,iBAAiB,EAAE;CAQhE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,WAAW,EAAE,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjG;AAaD,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,iBAAiB,CAQxF"}
|
package/dist/errors.js
CHANGED
|
@@ -15,10 +15,20 @@ export class KernelSchemaError extends Error {
|
|
|
15
15
|
this.issues = issues;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* A path segment as text. `PropertyKey` is not pedantry: zod 4 types an issue path that way, and
|
|
20
|
+
* `String(symbol)` throws — a symbol in a path would turn a schema rejection, which is this
|
|
21
|
+
* package's normal way of saying "no", into a crash at the moment it is being reported. The
|
|
22
|
+
* description is the only part of a symbol a schema could have placed there on purpose, so that is
|
|
23
|
+
* what reaches the message; an unnamed symbol says it was unnamed rather than disappearing.
|
|
24
|
+
*/
|
|
25
|
+
function segmentText(segment) {
|
|
26
|
+
return typeof segment === "symbol" ? (segment.description ?? "<symbol>") : String(segment);
|
|
27
|
+
}
|
|
18
28
|
/** One place that turns a validation failure into `KernelSchemaError`. */
|
|
19
29
|
export function schemaErrorFrom(label, error) {
|
|
20
30
|
return new KernelSchemaError(label, error.issues.map((issue) => ({
|
|
21
|
-
path: issue.path.map(
|
|
31
|
+
path: issue.path.map(segmentText).join("."),
|
|
22
32
|
message: issue.message
|
|
23
33
|
})));
|
|
24
34
|
}
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,IAAI,GAAG,iBAAiB,CAAC;IACzB,MAAM,CAA+B;IAE9C,YAAY,KAAa,EAAE,MAAoC;QAC7D,MAAM,MAAM,GAAG,MAAM;aAClB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,C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