@qmilab/lodestar-core 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +12 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/schemas/action.d.ts +31 -13
  6. package/dist/schemas/action.d.ts.map +1 -1
  7. package/dist/schemas/action.js +20 -1
  8. package/dist/schemas/action.js.map +1 -1
  9. package/dist/schemas/approval.d.ts +271 -0
  10. package/dist/schemas/approval.d.ts.map +1 -0
  11. package/dist/schemas/approval.js +119 -0
  12. package/dist/schemas/approval.js.map +1 -0
  13. package/dist/schemas/belief.d.ts.map +1 -1
  14. package/dist/schemas/belief.js +7 -1
  15. package/dist/schemas/belief.js.map +1 -1
  16. package/dist/schemas/calibration.d.ts +977 -0
  17. package/dist/schemas/calibration.d.ts.map +1 -0
  18. package/dist/schemas/calibration.js +187 -0
  19. package/dist/schemas/calibration.js.map +1 -0
  20. package/dist/schemas/claim.d.ts.map +1 -1
  21. package/dist/schemas/claim.js +4 -2
  22. package/dist/schemas/claim.js.map +1 -1
  23. package/dist/schemas/common.d.ts.map +1 -1
  24. package/dist/schemas/common.js +11 -5
  25. package/dist/schemas/common.js.map +1 -1
  26. package/dist/schemas/policy.d.ts +768 -0
  27. package/dist/schemas/policy.d.ts.map +1 -0
  28. package/dist/schemas/policy.js +200 -0
  29. package/dist/schemas/policy.js.map +1 -0
  30. package/dist/schemas/probe-pack.d.ts +152 -0
  31. package/dist/schemas/probe-pack.d.ts.map +1 -0
  32. package/dist/schemas/probe-pack.js +140 -0
  33. package/dist/schemas/probe-pack.js.map +1 -0
  34. package/dist/schemas/reflection.d.ts +405 -0
  35. package/dist/schemas/reflection.d.ts.map +1 -0
  36. package/dist/schemas/reflection.js +154 -0
  37. package/dist/schemas/reflection.js.map +1 -0
  38. package/dist/schemas/revision.d.ts.map +1 -1
  39. package/dist/schemas/revision.js.map +1 -1
  40. package/dist/schemas/sentinel.d.ts +134 -0
  41. package/dist/schemas/sentinel.d.ts.map +1 -0
  42. package/dist/schemas/sentinel.js +97 -0
  43. package/dist/schemas/sentinel.js.map +1 -0
  44. package/package.json +2 -7
  45. package/src/index.ts +18 -0
  46. package/src/schemas/action.ts +20 -1
  47. package/src/schemas/approval.ts +136 -0
  48. package/src/schemas/belief.ts +7 -1
  49. package/src/schemas/calibration.ts +212 -0
  50. package/src/schemas/claim.ts +15 -8
  51. package/src/schemas/common.ts +16 -10
  52. package/src/schemas/policy.ts +231 -0
  53. package/src/schemas/probe-pack.ts +169 -0
  54. package/src/schemas/reflection.ts +166 -0
  55. package/src/schemas/revision.ts +7 -5
  56. package/src/schemas/sentinel.ts +104 -0
package/dist/index.d.ts CHANGED
@@ -19,5 +19,11 @@ export * from "./schemas/decision.js";
19
19
  export * from "./schemas/action.js";
20
20
  export * from "./schemas/revision.js";
21
21
  export * from "./schemas/event.js";
22
+ export * from "./schemas/reflection.js";
23
+ export * from "./schemas/calibration.js";
24
+ export * from "./schemas/probe-pack.js";
25
+ export * from "./schemas/sentinel.js";
26
+ export * from "./schemas/policy.js";
27
+ export * from "./schemas/approval.js";
22
28
  export * as registry from "./registry.js";
23
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,cAAc,qBAAqB,CAAA;AAGnC,cAAc,oBAAoB,CAAA;AAGlC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAGrC,cAAc,oBAAoB,CAAA;AAGlC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,cAAc,qBAAqB,CAAA;AAGnC,cAAc,oBAAoB,CAAA;AAGlC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAGrC,cAAc,oBAAoB,CAAA;AAGlC,cAAc,yBAAyB,CAAA;AAGvC,cAAc,0BAA0B,CAAA;AAGxC,cAAc,yBAAyB,CAAA;AAGvC,cAAc,uBAAuB,CAAA;AAGrC,cAAc,qBAAqB,CAAA;AAGnC,cAAc,uBAAuB,CAAA;AAGrC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA"}
package/dist/index.js CHANGED
@@ -23,6 +23,18 @@ export * from "./schemas/action.js";
23
23
  export * from "./schemas/revision.js";
24
24
  // Event log envelope
25
25
  export * from "./schemas/event.js";
26
+ // Reflection (Batch 4) — proposals and the reflection.completed@1 payload
27
+ export * from "./schemas/reflection.js";
28
+ // Calibration — the report wire format + the calibration.computed@1 payload
29
+ export * from "./schemas/calibration.js";
30
+ // Probe pack format (Batch 4) — the lodestar.probe-pack.json manifest contract
31
+ export * from "./schemas/probe-pack.js";
32
+ // Sentinels (Batch 4) — the sentinel.alerted@1 alert wire format
33
+ export * from "./schemas/sentinel.js";
34
+ // Action policy (Policy Kernel) — the Policy / PolicyRule document wire format
35
+ export * from "./schemas/policy.js";
36
+ // Approval workflow (Policy Kernel) — ApprovalRequest + approval.* event payloads
37
+ export * from "./schemas/approval.js";
26
38
  // Schema registry
27
39
  export * as registry from "./registry.js";
28
40
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,SAAS;AACT,cAAc,qBAAqB,CAAA;AAEnC,WAAW;AACX,cAAc,oBAAoB,CAAA;AAElC,kBAAkB;AAClB,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAErC,qBAAqB;AACrB,cAAc,oBAAoB,CAAA;AAElC,kBAAkB;AAClB,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,SAAS;AACT,cAAc,qBAAqB,CAAA;AAEnC,WAAW;AACX,cAAc,oBAAoB,CAAA;AAElC,kBAAkB;AAClB,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAErC,qBAAqB;AACrB,cAAc,oBAAoB,CAAA;AAElC,0EAA0E;AAC1E,cAAc,yBAAyB,CAAA;AAEvC,4EAA4E;AAC5E,cAAc,0BAA0B,CAAA;AAExC,+EAA+E;AAC/E,cAAc,yBAAyB,CAAA;AAEvC,iEAAiE;AACjE,cAAc,uBAAuB,CAAA;AAErC,+EAA+E;AAC/E,cAAc,qBAAqB,CAAA;AAEnC,kFAAkF;AAClF,cAAc,uBAAuB,CAAA;AAErC,kBAAkB;AAClB,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA"}
@@ -105,8 +105,24 @@ export declare const ActionContractSchema: z.ZodObject<{
105
105
  export type ActionContract = z.infer<typeof ActionContractSchema>;
106
106
  /**
107
107
  * Phases an action passes through.
108
+ *
109
+ * `pending_approval` is the parked state: arbitration returned a `hold`
110
+ * (the Policy Kernel's three-valued verdict — see
111
+ * `docs/architecture/policy-kernel.md`), so the action is neither approved
112
+ * nor rejected. An `ApprovalRequest` is opened and the world stays
113
+ * untouched — the two-phase discipline forbids `execute()` from
114
+ * `pending_approval` exactly as it forbids it from `proposed`. Only an
115
+ * Action-Kernel `resolve()` un-parks it: `approval.granted` → `approved`
116
+ * (which then runs the normal `execute()` gate, so TOCTOU revalidation
117
+ * still fires), `approval.denied` / `approval.expired` → `rejected`.
118
+ *
119
+ * Distinct from `halted`, which is a *terminal* mid-execution stop
120
+ * (`executing → halted`); `pending_approval` is a *pre-execution* wait.
121
+ *
122
+ * Additive (ratified 2026-06-03, `policy-kernel.md`): existing logs
123
+ * without this value still parse; readers gain one case.
108
124
  */
109
- export declare const ActionPhaseSchema: z.ZodEnum<["proposed", "arbitrating", "approved", "rejected", "executing", "completed", "failed", "halted"]>;
125
+ export declare const ActionPhaseSchema: z.ZodEnum<["proposed", "arbitrating", "pending_approval", "approved", "rejected", "executing", "completed", "failed", "halted"]>;
110
126
  export type ActionPhase = z.infer<typeof ActionPhaseSchema>;
111
127
  /**
112
128
  * Approval event from a human or policy reviewer.
@@ -132,19 +148,19 @@ export type ApprovalEvent = z.infer<typeof ApprovalEventSchema>;
132
148
  * Audit trail entry for an action.
133
149
  */
134
150
  export declare const AuditEventSchema: z.ZodObject<{
135
- phase: z.ZodEnum<["proposed", "arbitrating", "approved", "rejected", "executing", "completed", "failed", "halted"]>;
151
+ phase: z.ZodEnum<["proposed", "arbitrating", "pending_approval", "approved", "rejected", "executing", "completed", "failed", "halted"]>;
136
152
  by_actor_id: z.ZodString;
137
153
  at: z.ZodString;
138
154
  detail: z.ZodOptional<z.ZodString>;
139
155
  }, "strip", z.ZodTypeAny, {
140
156
  at: string;
141
157
  by_actor_id: string;
142
- phase: "rejected" | "proposed" | "arbitrating" | "approved" | "executing" | "completed" | "failed" | "halted";
158
+ phase: "rejected" | "proposed" | "arbitrating" | "pending_approval" | "approved" | "executing" | "completed" | "failed" | "halted";
143
159
  detail?: string | undefined;
144
160
  }, {
145
161
  at: string;
146
162
  by_actor_id: string;
147
- phase: "rejected" | "proposed" | "arbitrating" | "approved" | "executing" | "completed" | "failed" | "halted";
163
+ phase: "rejected" | "proposed" | "arbitrating" | "pending_approval" | "approved" | "executing" | "completed" | "failed" | "halted";
148
164
  detail?: string | undefined;
149
165
  }>;
150
166
  export type AuditEvent = z.infer<typeof AuditEventSchema>;
@@ -153,7 +169,9 @@ export type AuditEvent = z.infer<typeof AuditEventSchema>;
153
169
  *
154
170
  * Actions are the seventh link in the epistemic chain.
155
171
  * The phase field tracks the action through propose → arbitrate
156
- * → approved/rejected → executing → completed/failed/halted.
172
+ * → approved/rejected/pending_approval → executing
173
+ * → completed/failed/halted. A `pending_approval` action awaits an
174
+ * `ApprovalRequest` resolution before it can reach `approved`.
157
175
  *
158
176
  * Every Action carries an ActionContract. The Policy Kernel evaluates
159
177
  * the contract against current trust assignments and approval requirements
@@ -227,7 +245,7 @@ export declare const ActionSchema: z.ZodObject<{
227
245
  expected_at_approval?: unknown;
228
246
  }[];
229
247
  }>;
230
- phase: z.ZodEnum<["proposed", "arbitrating", "approved", "rejected", "executing", "completed", "failed", "halted"]>;
248
+ phase: z.ZodEnum<["proposed", "arbitrating", "pending_approval", "approved", "rejected", "executing", "completed", "failed", "halted"]>;
231
249
  approval: z.ZodOptional<z.ZodObject<{
232
250
  approver_id: z.ZodString;
233
251
  approved: z.ZodBoolean;
@@ -245,19 +263,19 @@ export declare const ActionSchema: z.ZodObject<{
245
263
  reason?: string | undefined;
246
264
  }>>;
247
265
  audit: z.ZodArray<z.ZodObject<{
248
- phase: z.ZodEnum<["proposed", "arbitrating", "approved", "rejected", "executing", "completed", "failed", "halted"]>;
266
+ phase: z.ZodEnum<["proposed", "arbitrating", "pending_approval", "approved", "rejected", "executing", "completed", "failed", "halted"]>;
249
267
  by_actor_id: z.ZodString;
250
268
  at: z.ZodString;
251
269
  detail: z.ZodOptional<z.ZodString>;
252
270
  }, "strip", z.ZodTypeAny, {
253
271
  at: string;
254
272
  by_actor_id: string;
255
- phase: "rejected" | "proposed" | "arbitrating" | "approved" | "executing" | "completed" | "failed" | "halted";
273
+ phase: "rejected" | "proposed" | "arbitrating" | "pending_approval" | "approved" | "executing" | "completed" | "failed" | "halted";
256
274
  detail?: string | undefined;
257
275
  }, {
258
276
  at: string;
259
277
  by_actor_id: string;
260
- phase: "rejected" | "proposed" | "arbitrating" | "approved" | "executing" | "completed" | "failed" | "halted";
278
+ phase: "rejected" | "proposed" | "arbitrating" | "pending_approval" | "approved" | "executing" | "completed" | "failed" | "halted";
261
279
  detail?: string | undefined;
262
280
  }>, "many">;
263
281
  outcome_id: z.ZodOptional<z.ZodString>;
@@ -266,7 +284,7 @@ export declare const ActionSchema: z.ZodObject<{
266
284
  }, "strip", z.ZodTypeAny, {
267
285
  id: string;
268
286
  tool: string;
269
- phase: "rejected" | "proposed" | "arbitrating" | "approved" | "executing" | "completed" | "failed" | "halted";
287
+ phase: "rejected" | "proposed" | "arbitrating" | "pending_approval" | "approved" | "executing" | "completed" | "failed" | "halted";
270
288
  intent: string;
271
289
  contract: {
272
290
  scope: {
@@ -287,7 +305,7 @@ export declare const ActionSchema: z.ZodObject<{
287
305
  audit: {
288
306
  at: string;
289
307
  by_actor_id: string;
290
- phase: "rejected" | "proposed" | "arbitrating" | "approved" | "executing" | "completed" | "failed" | "halted";
308
+ phase: "rejected" | "proposed" | "arbitrating" | "pending_approval" | "approved" | "executing" | "completed" | "failed" | "halted";
291
309
  detail?: string | undefined;
292
310
  }[];
293
311
  proposed_at: string;
@@ -304,7 +322,7 @@ export declare const ActionSchema: z.ZodObject<{
304
322
  }, {
305
323
  id: string;
306
324
  tool: string;
307
- phase: "rejected" | "proposed" | "arbitrating" | "approved" | "executing" | "completed" | "failed" | "halted";
325
+ phase: "rejected" | "proposed" | "arbitrating" | "pending_approval" | "approved" | "executing" | "completed" | "failed" | "halted";
308
326
  intent: string;
309
327
  contract: {
310
328
  scope: {
@@ -325,7 +343,7 @@ export declare const ActionSchema: z.ZodObject<{
325
343
  audit: {
326
344
  at: string;
327
345
  by_actor_id: string;
328
- phase: "rejected" | "proposed" | "arbitrating" | "approved" | "executing" | "completed" | "failed" | "halted";
346
+ phase: "rejected" | "proposed" | "arbitrating" | "pending_approval" | "approved" | "executing" | "completed" | "failed" | "halted";
329
347
  detail?: string | undefined;
330
348
  }[];
331
349
  proposed_at: string;
@@ -1 +1 @@
1
- {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../src/schemas/action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAcvB,eAAO,MAAM,gBAAgB,aAAiC,CAAA;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,iBAAiB,uDAAqD,CAAA;AACnF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,mBAAmB,0DAAwD,CAAA;AACxF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D,eAAO,MAAM,8BAA8B,4CAA0C,CAAA;AACrF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAErF;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;EAKnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,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,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAavB,CAAA;AACF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAMjD,eAAO,MAAM,mBAAmB,yDAAuD,CAAA;AACvF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;EAQxB,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
@@ -46,10 +46,27 @@ export const ActionContractSchema = z.object({
46
46
  });
47
47
  /**
48
48
  * Phases an action passes through.
49
+ *
50
+ * `pending_approval` is the parked state: arbitration returned a `hold`
51
+ * (the Policy Kernel's three-valued verdict — see
52
+ * `docs/architecture/policy-kernel.md`), so the action is neither approved
53
+ * nor rejected. An `ApprovalRequest` is opened and the world stays
54
+ * untouched — the two-phase discipline forbids `execute()` from
55
+ * `pending_approval` exactly as it forbids it from `proposed`. Only an
56
+ * Action-Kernel `resolve()` un-parks it: `approval.granted` → `approved`
57
+ * (which then runs the normal `execute()` gate, so TOCTOU revalidation
58
+ * still fires), `approval.denied` / `approval.expired` → `rejected`.
59
+ *
60
+ * Distinct from `halted`, which is a *terminal* mid-execution stop
61
+ * (`executing → halted`); `pending_approval` is a *pre-execution* wait.
62
+ *
63
+ * Additive (ratified 2026-06-03, `policy-kernel.md`): existing logs
64
+ * without this value still parse; readers gain one case.
49
65
  */
50
66
  export const ActionPhaseSchema = z.enum([
51
67
  "proposed",
52
68
  "arbitrating",
69
+ "pending_approval",
53
70
  "approved",
54
71
  "rejected",
55
72
  "executing",
@@ -80,7 +97,9 @@ export const AuditEventSchema = z.object({
80
97
  *
81
98
  * Actions are the seventh link in the epistemic chain.
82
99
  * The phase field tracks the action through propose → arbitrate
83
- * → approved/rejected → executing → completed/failed/halted.
100
+ * → approved/rejected/pending_approval → executing
101
+ * → completed/failed/halted. A `pending_approval` action awaits an
102
+ * `ApprovalRequest` resolution before it can reach `approved`.
84
103
  *
85
104
  * Every Action carries an ActionContract. The Policy Kernel evaluates
86
105
  * the contract against current trust assignments and approval requirements
@@ -1 +1 @@
1
- {"version":3,"file":"action.js","sourceRoot":"","sources":["../../src/schemas/action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElE,gFAAgF;AAChF,eAAe;AACf,EAAE;AACF,wDAAwD;AACxD,kEAAkE;AAClE,yEAAyE;AACzE,gEAAgE;AAChE,+EAA+E;AAC/E,oDAAoD;AACpD,gFAAgF;AAEhF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AAG9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAA;AAGnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;AAGxF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,IAAI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,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACzF,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC3C,WAAW,EAAE,eAAe;CAC7B,CAAC,CAAA"}
@@ -0,0 +1,271 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * The approval workflow wire formats — the first-class record of an action
4
+ * parked at `pending_approval` and the events that resolve it.
5
+ *
6
+ * Design lock: `docs/architecture/policy-kernel.md`, "The approval workflow".
7
+ * The discipline mirrors the sentinel / reflection governance events:
8
+ *
9
+ * - These are governance events, NOT Observations. Like `sentinel.alerted@1`,
10
+ * each payload is the event payload directly and is NOT registered in the
11
+ * observation schema registry.
12
+ * - Grant and deny are *distinct event types*, not one event with an
13
+ * `approved` flag. The type *is* the verdict, so a redundant boolean (which
14
+ * could disagree with the type on re-read) is omitted. When the resolution
15
+ * folds back into the action via the Action Kernel's `resolve()`, it lands
16
+ * in the action's existing `approval` field (`ApprovalEvent`), where a
17
+ * single boolean is the natural shape — so the stream view
18
+ * (type-discriminated) and the single-action view agree without duplicating
19
+ * the verdict on the wire.
20
+ * - No optional field is ever set to `undefined` — it is omitted entirely when
21
+ * unset (`deadline` and `reason` in particular), so the event-log writer's
22
+ * `canonicalHash` (undefined → null) and `JSON.stringify` (drops the key)
23
+ * cannot disagree on re-read.
24
+ *
25
+ * Core owns the wire format only. The lifecycle manager — opening a request on
26
+ * a hold, matching a resolution against `required_authority`, driving the
27
+ * Action-Kernel `resolve()` transition — lives in
28
+ * `@qmilab/lodestar-policy-kernel`.
29
+ */
30
+ /**
31
+ * The payload of an `approval.requested@1` event: a parked action awaiting a
32
+ * human (or auto-rule) verdict. `reason` is the matched rule's reason,
33
+ * verbatim. `required_authority` says what an approver must be (checked
34
+ * against the resolver's `Actor`); an empty object means any configured
35
+ * resolver may approve.
36
+ *
37
+ * `deadline` is the proxy's hold timeout (the MCP path cannot hold a
38
+ * `tools/call` open indefinitely without tripping client timeouts); it is
39
+ * *omitted entirely* in the in-process `guard.wrap()` path, where a hold can
40
+ * simply await the resolver — never set to `undefined`.
41
+ */
42
+ export declare const ApprovalRequestSchema: z.ZodObject<{
43
+ request_id: z.ZodString;
44
+ action_id: z.ZodString;
45
+ reason: z.ZodString;
46
+ required_authority: z.ZodObject<{
47
+ min_trust_baseline: z.ZodOptional<z.ZodNumber>;
48
+ sensitivity_clearance: z.ZodOptional<z.ZodEnum<["public", "internal", "confidential", "secret"]>>;
49
+ scope: z.ZodOptional<z.ZodObject<{
50
+ level: z.ZodEnum<["global", "organization", "user", "project", "repo", "session"]>;
51
+ identifier: z.ZodString;
52
+ }, "strip", z.ZodTypeAny, {
53
+ level: "global" | "organization" | "user" | "project" | "repo" | "session";
54
+ identifier: string;
55
+ }, {
56
+ level: "global" | "organization" | "user" | "project" | "repo" | "session";
57
+ identifier: string;
58
+ }>>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ sensitivity_clearance?: "public" | "internal" | "confidential" | "secret" | undefined;
61
+ scope?: {
62
+ level: "global" | "organization" | "user" | "project" | "repo" | "session";
63
+ identifier: string;
64
+ } | undefined;
65
+ min_trust_baseline?: number | undefined;
66
+ }, {
67
+ sensitivity_clearance?: "public" | "internal" | "confidential" | "secret" | undefined;
68
+ scope?: {
69
+ level: "global" | "organization" | "user" | "project" | "repo" | "session";
70
+ identifier: string;
71
+ } | undefined;
72
+ min_trust_baseline?: number | undefined;
73
+ }>;
74
+ requested_at: z.ZodString;
75
+ deadline: z.ZodOptional<z.ZodString>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ reason: string;
78
+ action_id: string;
79
+ required_authority: {
80
+ sensitivity_clearance?: "public" | "internal" | "confidential" | "secret" | undefined;
81
+ scope?: {
82
+ level: "global" | "organization" | "user" | "project" | "repo" | "session";
83
+ identifier: string;
84
+ } | undefined;
85
+ min_trust_baseline?: number | undefined;
86
+ };
87
+ request_id: string;
88
+ requested_at: string;
89
+ deadline?: string | undefined;
90
+ }, {
91
+ reason: string;
92
+ action_id: string;
93
+ required_authority: {
94
+ sensitivity_clearance?: "public" | "internal" | "confidential" | "secret" | undefined;
95
+ scope?: {
96
+ level: "global" | "organization" | "user" | "project" | "repo" | "session";
97
+ identifier: string;
98
+ } | undefined;
99
+ min_trust_baseline?: number | undefined;
100
+ };
101
+ request_id: string;
102
+ requested_at: string;
103
+ deadline?: string | undefined;
104
+ }>;
105
+ export type ApprovalRequest = z.infer<typeof ApprovalRequestSchema>;
106
+ /**
107
+ * The payload of an `approval.granted@1` event. The event *type* is the
108
+ * verdict — there is no `approved` boolean. `reason` (the approver's note) is
109
+ * omitted entirely when unset.
110
+ *
111
+ * `signature` is an optional Ed25519 signature over the canonical resolution
112
+ * document (`{ request_id, action_id, kind, approver_id, reason?, at }`),
113
+ * produced by the approver's private key. When present it makes the granted
114
+ * event **self-verifying in the log**: a reader can later re-check the grant
115
+ * came from an operator-pinned approver key, not merely trust that the proxy
116
+ * verified it at promotion time. Its `signer_id` equals `approver_id` (the same
117
+ * actor that resolved). Omitted entirely when unset (never `undefined`), so the
118
+ * canonical-hash discipline above carries through; the cross-process proxy path
119
+ * requires it (a forged side-channel grant cannot un-park an action), while the
120
+ * in-process resolver path may omit it (same trusted process, no forgery
121
+ * surface). Hash + verification live in `@qmilab/lodestar-policy-kernel`.
122
+ */
123
+ export declare const ApprovalGrantedPayloadSchema: z.ZodObject<{
124
+ request_id: z.ZodString;
125
+ action_id: z.ZodString;
126
+ approver_id: z.ZodString;
127
+ reason: z.ZodOptional<z.ZodString>;
128
+ at: z.ZodString;
129
+ signature: z.ZodOptional<z.ZodObject<{
130
+ signer_id: z.ZodString;
131
+ payload_hash: z.ZodString;
132
+ algorithm: z.ZodLiteral<"ed25519">;
133
+ signature: z.ZodString;
134
+ at: z.ZodString;
135
+ }, "strip", z.ZodTypeAny, {
136
+ at: string;
137
+ signer_id: string;
138
+ payload_hash: string;
139
+ algorithm: "ed25519";
140
+ signature: string;
141
+ }, {
142
+ at: string;
143
+ signer_id: string;
144
+ payload_hash: string;
145
+ algorithm: "ed25519";
146
+ signature: string;
147
+ }>>;
148
+ }, "strip", z.ZodTypeAny, {
149
+ at: string;
150
+ approver_id: string;
151
+ action_id: string;
152
+ request_id: string;
153
+ signature?: {
154
+ at: string;
155
+ signer_id: string;
156
+ payload_hash: string;
157
+ algorithm: "ed25519";
158
+ signature: string;
159
+ } | undefined;
160
+ reason?: string | undefined;
161
+ }, {
162
+ at: string;
163
+ approver_id: string;
164
+ action_id: string;
165
+ request_id: string;
166
+ signature?: {
167
+ at: string;
168
+ signer_id: string;
169
+ payload_hash: string;
170
+ algorithm: "ed25519";
171
+ signature: string;
172
+ } | undefined;
173
+ reason?: string | undefined;
174
+ }>;
175
+ export type ApprovalGrantedPayload = z.infer<typeof ApprovalGrantedPayloadSchema>;
176
+ /**
177
+ * The payload of an `approval.denied@1` event. Identical shape to
178
+ * `approval.granted@1` — the verdict is carried by the event type, not a
179
+ * field. Defined as its own schema (rather than re-exporting one shared
180
+ * object) so the two event types stay independently evolvable. `signature`
181
+ * follows the same contract as the grant payload (a denial is also authority-
182
+ * bearing — it must not be forgeable into un-holding via a later grant either).
183
+ */
184
+ export declare const ApprovalDeniedPayloadSchema: z.ZodObject<{
185
+ request_id: z.ZodString;
186
+ action_id: z.ZodString;
187
+ approver_id: z.ZodString;
188
+ reason: z.ZodOptional<z.ZodString>;
189
+ at: z.ZodString;
190
+ signature: z.ZodOptional<z.ZodObject<{
191
+ signer_id: z.ZodString;
192
+ payload_hash: z.ZodString;
193
+ algorithm: z.ZodLiteral<"ed25519">;
194
+ signature: z.ZodString;
195
+ at: z.ZodString;
196
+ }, "strip", z.ZodTypeAny, {
197
+ at: string;
198
+ signer_id: string;
199
+ payload_hash: string;
200
+ algorithm: "ed25519";
201
+ signature: string;
202
+ }, {
203
+ at: string;
204
+ signer_id: string;
205
+ payload_hash: string;
206
+ algorithm: "ed25519";
207
+ signature: string;
208
+ }>>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ at: string;
211
+ approver_id: string;
212
+ action_id: string;
213
+ request_id: string;
214
+ signature?: {
215
+ at: string;
216
+ signer_id: string;
217
+ payload_hash: string;
218
+ algorithm: "ed25519";
219
+ signature: string;
220
+ } | undefined;
221
+ reason?: string | undefined;
222
+ }, {
223
+ at: string;
224
+ approver_id: string;
225
+ action_id: string;
226
+ request_id: string;
227
+ signature?: {
228
+ at: string;
229
+ signer_id: string;
230
+ payload_hash: string;
231
+ algorithm: "ed25519";
232
+ signature: string;
233
+ } | undefined;
234
+ reason?: string | undefined;
235
+ }>;
236
+ export type ApprovalDeniedPayload = z.infer<typeof ApprovalDeniedPayloadSchema>;
237
+ /**
238
+ * The payload of an `approval.expired@1` event: the deadline passed with no
239
+ * human resolution. Carries no `approver_id` — no actor resolved it; the
240
+ * passage of the deadline did. The Action Kernel transitions the parked action
241
+ * to `rejected` on receipt (a timed-out hold is a soft denial the agent
242
+ * re-proposes; durable resume is deferred — `policy-kernel.md`).
243
+ */
244
+ export declare const ApprovalExpiredPayloadSchema: z.ZodObject<{
245
+ request_id: z.ZodString;
246
+ action_id: z.ZodString;
247
+ at: z.ZodString;
248
+ }, "strip", z.ZodTypeAny, {
249
+ at: string;
250
+ action_id: string;
251
+ request_id: string;
252
+ }, {
253
+ at: string;
254
+ action_id: string;
255
+ request_id: string;
256
+ }>;
257
+ export type ApprovalExpiredPayload = z.infer<typeof ApprovalExpiredPayloadSchema>;
258
+ /**
259
+ * Event-type literals and versions. Use the constants rather than the bare
260
+ * strings so a future rename is grep-safe — same convention as
261
+ * `SENTINEL_ALERTED_EVENT_TYPE` and `REFLECTION_COMPLETED_EVENT_TYPE`.
262
+ */
263
+ export declare const APPROVAL_REQUESTED_EVENT_TYPE: "approval.requested";
264
+ export declare const APPROVAL_REQUESTED_SCHEMA_VERSION: "1";
265
+ export declare const APPROVAL_GRANTED_EVENT_TYPE: "approval.granted";
266
+ export declare const APPROVAL_GRANTED_SCHEMA_VERSION: "1";
267
+ export declare const APPROVAL_DENIED_EVENT_TYPE: "approval.denied";
268
+ export declare const APPROVAL_DENIED_SCHEMA_VERSION: "1";
269
+ export declare const APPROVAL_EXPIRED_EVENT_TYPE: "approval.expired";
270
+ export declare const APPROVAL_EXPIRED_SCHEMA_VERSION: "1";
271
+ //# sourceMappingURL=approval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../src/schemas/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASvC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEjF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAStC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE/E;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAIvC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEjF;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,sBAAgC,CAAA;AAC1E,eAAO,MAAM,iCAAiC,KAAe,CAAA;AAC7D,eAAO,MAAM,2BAA2B,oBAA8B,CAAA;AACtE,eAAO,MAAM,+BAA+B,KAAe,CAAA;AAC3D,eAAO,MAAM,0BAA0B,mBAA6B,CAAA;AACpE,eAAO,MAAM,8BAA8B,KAAe,CAAA;AAC1D,eAAO,MAAM,2BAA2B,oBAA8B,CAAA;AACtE,eAAO,MAAM,+BAA+B,KAAe,CAAA"}
@@ -0,0 +1,119 @@
1
+ import { z } from "zod";
2
+ import { SignatureSchema } from "./actor.js";
3
+ import { TimestampSchema } from "./common.js";
4
+ import { RequiredAuthoritySchema } from "./policy.js";
5
+ /**
6
+ * The approval workflow wire formats — the first-class record of an action
7
+ * parked at `pending_approval` and the events that resolve it.
8
+ *
9
+ * Design lock: `docs/architecture/policy-kernel.md`, "The approval workflow".
10
+ * The discipline mirrors the sentinel / reflection governance events:
11
+ *
12
+ * - These are governance events, NOT Observations. Like `sentinel.alerted@1`,
13
+ * each payload is the event payload directly and is NOT registered in the
14
+ * observation schema registry.
15
+ * - Grant and deny are *distinct event types*, not one event with an
16
+ * `approved` flag. The type *is* the verdict, so a redundant boolean (which
17
+ * could disagree with the type on re-read) is omitted. When the resolution
18
+ * folds back into the action via the Action Kernel's `resolve()`, it lands
19
+ * in the action's existing `approval` field (`ApprovalEvent`), where a
20
+ * single boolean is the natural shape — so the stream view
21
+ * (type-discriminated) and the single-action view agree without duplicating
22
+ * the verdict on the wire.
23
+ * - No optional field is ever set to `undefined` — it is omitted entirely when
24
+ * unset (`deadline` and `reason` in particular), so the event-log writer's
25
+ * `canonicalHash` (undefined → null) and `JSON.stringify` (drops the key)
26
+ * cannot disagree on re-read.
27
+ *
28
+ * Core owns the wire format only. The lifecycle manager — opening a request on
29
+ * a hold, matching a resolution against `required_authority`, driving the
30
+ * Action-Kernel `resolve()` transition — lives in
31
+ * `@qmilab/lodestar-policy-kernel`.
32
+ */
33
+ /**
34
+ * The payload of an `approval.requested@1` event: a parked action awaiting a
35
+ * human (or auto-rule) verdict. `reason` is the matched rule's reason,
36
+ * verbatim. `required_authority` says what an approver must be (checked
37
+ * against the resolver's `Actor`); an empty object means any configured
38
+ * resolver may approve.
39
+ *
40
+ * `deadline` is the proxy's hold timeout (the MCP path cannot hold a
41
+ * `tools/call` open indefinitely without tripping client timeouts); it is
42
+ * *omitted entirely* in the in-process `guard.wrap()` path, where a hold can
43
+ * simply await the resolver — never set to `undefined`.
44
+ */
45
+ export const ApprovalRequestSchema = z.object({
46
+ request_id: z.string().min(1),
47
+ action_id: z.string().min(1).describe("the parked action, at phase pending_approval"),
48
+ reason: z.string().min(1).describe("the matched rule's reason, verbatim"),
49
+ required_authority: RequiredAuthoritySchema.describe("what an approver must be; checked against the resolver's Actor. Empty object = any configured resolver"),
50
+ requested_at: TimestampSchema,
51
+ deadline: TimestampSchema.optional().describe("ISO 8601 hold timeout (proxy path); omitted entirely in-process, never undefined"),
52
+ });
53
+ /**
54
+ * The payload of an `approval.granted@1` event. The event *type* is the
55
+ * verdict — there is no `approved` boolean. `reason` (the approver's note) is
56
+ * omitted entirely when unset.
57
+ *
58
+ * `signature` is an optional Ed25519 signature over the canonical resolution
59
+ * document (`{ request_id, action_id, kind, approver_id, reason?, at }`),
60
+ * produced by the approver's private key. When present it makes the granted
61
+ * event **self-verifying in the log**: a reader can later re-check the grant
62
+ * came from an operator-pinned approver key, not merely trust that the proxy
63
+ * verified it at promotion time. Its `signer_id` equals `approver_id` (the same
64
+ * actor that resolved). Omitted entirely when unset (never `undefined`), so the
65
+ * canonical-hash discipline above carries through; the cross-process proxy path
66
+ * requires it (a forged side-channel grant cannot un-park an action), while the
67
+ * in-process resolver path may omit it (same trusted process, no forgery
68
+ * surface). Hash + verification live in `@qmilab/lodestar-policy-kernel`.
69
+ */
70
+ export const ApprovalGrantedPayloadSchema = z.object({
71
+ request_id: z.string().min(1),
72
+ action_id: z.string().min(1),
73
+ approver_id: z.string().min(1).describe("actor_id of the resolver"),
74
+ reason: z.string().min(1).optional().describe("approver's note; omitted entirely when unset"),
75
+ at: TimestampSchema,
76
+ signature: SignatureSchema.optional().describe("Ed25519 signature over the canonical resolution; signer_id === approver_id; omitted entirely when unset"),
77
+ });
78
+ /**
79
+ * The payload of an `approval.denied@1` event. Identical shape to
80
+ * `approval.granted@1` — the verdict is carried by the event type, not a
81
+ * field. Defined as its own schema (rather than re-exporting one shared
82
+ * object) so the two event types stay independently evolvable. `signature`
83
+ * follows the same contract as the grant payload (a denial is also authority-
84
+ * bearing — it must not be forgeable into un-holding via a later grant either).
85
+ */
86
+ export const ApprovalDeniedPayloadSchema = z.object({
87
+ request_id: z.string().min(1),
88
+ action_id: z.string().min(1),
89
+ approver_id: z.string().min(1).describe("actor_id of the resolver"),
90
+ reason: z.string().min(1).optional().describe("approver's note; omitted entirely when unset"),
91
+ at: TimestampSchema,
92
+ signature: SignatureSchema.optional().describe("Ed25519 signature over the canonical resolution; signer_id === approver_id; omitted entirely when unset"),
93
+ });
94
+ /**
95
+ * The payload of an `approval.expired@1` event: the deadline passed with no
96
+ * human resolution. Carries no `approver_id` — no actor resolved it; the
97
+ * passage of the deadline did. The Action Kernel transitions the parked action
98
+ * to `rejected` on receipt (a timed-out hold is a soft denial the agent
99
+ * re-proposes; durable resume is deferred — `policy-kernel.md`).
100
+ */
101
+ export const ApprovalExpiredPayloadSchema = z.object({
102
+ request_id: z.string().min(1),
103
+ action_id: z.string().min(1),
104
+ at: TimestampSchema,
105
+ });
106
+ /**
107
+ * Event-type literals and versions. Use the constants rather than the bare
108
+ * strings so a future rename is grep-safe — same convention as
109
+ * `SENTINEL_ALERTED_EVENT_TYPE` and `REFLECTION_COMPLETED_EVENT_TYPE`.
110
+ */
111
+ export const APPROVAL_REQUESTED_EVENT_TYPE = "approval.requested";
112
+ export const APPROVAL_REQUESTED_SCHEMA_VERSION = "1";
113
+ export const APPROVAL_GRANTED_EVENT_TYPE = "approval.granted";
114
+ export const APPROVAL_GRANTED_SCHEMA_VERSION = "1";
115
+ export const APPROVAL_DENIED_EVENT_TYPE = "approval.denied";
116
+ export const APPROVAL_DENIED_SCHEMA_VERSION = "1";
117
+ export const APPROVAL_EXPIRED_EVENT_TYPE = "approval.expired";
118
+ export const APPROVAL_EXPIRED_SCHEMA_VERSION = "1";
119
+ //# sourceMappingURL=approval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval.js","sourceRoot":"","sources":["../../src/schemas/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACrF,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IACzE,kBAAkB,EAAE,uBAAuB,CAAC,QAAQ,CAClD,wGAAwG,CACzG;IACD,YAAY,EAAE,eAAe;IAC7B,QAAQ,EAAE,eAAe,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC3C,kFAAkF,CACnF;CACF,CAAC,CAAA;AAGF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MA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