@openprose/reactor-cradle 0.1.0-rc.1
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/LICENSE +21 -0
- package/README.md +270 -0
- package/dist/assert/index.d.ts +35 -0
- package/dist/assert/index.d.ts.map +1 -0
- package/dist/assert/index.js +398 -0
- package/dist/baselines/cost-thesis/index.d.ts +103 -0
- package/dist/baselines/cost-thesis/index.d.ts.map +1 -0
- package/dist/baselines/cost-thesis/index.js +337 -0
- package/dist/baselines/naive-loop/index.d.ts +46 -0
- package/dist/baselines/naive-loop/index.d.ts.map +1 -0
- package/dist/baselines/naive-loop/index.js +188 -0
- package/dist/baselines/no-memo/index.d.ts +84 -0
- package/dist/baselines/no-memo/index.d.ts.map +1 -0
- package/dist/baselines/no-memo/index.js +226 -0
- package/dist/doubles/clock.d.ts +9 -0
- package/dist/doubles/clock.d.ts.map +1 -0
- package/dist/doubles/clock.js +42 -0
- package/dist/doubles/storage.d.ts +24 -0
- package/dist/doubles/storage.d.ts.map +1 -0
- package/dist/doubles/storage.js +191 -0
- package/dist/eval/index.d.ts +204 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js +596 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/policy-author/index.d.ts +103 -0
- package/dist/policy-author/index.d.ts.map +1 -0
- package/dist/policy-author/index.js +358 -0
- package/dist/policy-drift/index.d.ts +64 -0
- package/dist/policy-drift/index.d.ts.map +1 -0
- package/dist/policy-drift/index.js +495 -0
- package/dist/policy-replay/index.d.ts +106 -0
- package/dist/policy-replay/index.d.ts.map +1 -0
- package/dist/policy-replay/index.js +361 -0
- package/dist/provider-parity/index.d.ts +91 -0
- package/dist/provider-parity/index.d.ts.map +1 -0
- package/dist/provider-parity/index.js +439 -0
- package/dist/recompile/index.d.ts +161 -0
- package/dist/recompile/index.d.ts.map +1 -0
- package/dist/recompile/index.js +690 -0
- package/dist/release-candidate/index.d.ts +139 -0
- package/dist/release-candidate/index.d.ts.map +1 -0
- package/dist/release-candidate/index.js +553 -0
- package/dist/release-parity/index.d.ts +80 -0
- package/dist/release-parity/index.d.ts.map +1 -0
- package/dist/release-parity/index.js +1035 -0
- package/dist/replay/model-gateway.d.ts +25 -0
- package/dist/replay/model-gateway.d.ts.map +1 -0
- package/dist/replay/model-gateway.js +166 -0
- package/dist/replay/parity.d.ts +110 -0
- package/dist/replay/parity.d.ts.map +1 -0
- package/dist/replay/parity.js +232 -0
- package/dist/rollback/index.d.ts +106 -0
- package/dist/rollback/index.d.ts.map +1 -0
- package/dist/rollback/index.js +694 -0
- package/dist/scenario/parser.d.ts +11 -0
- package/dist/scenario/parser.d.ts.map +1 -0
- package/dist/scenario/parser.js +490 -0
- package/dist/scenario/runner.d.ts +12 -0
- package/dist/scenario/runner.d.ts.map +1 -0
- package/dist/scenario/runner.js +345 -0
- package/dist/scenario/synthetic-world-adapter.d.ts +4 -0
- package/dist/scenario/synthetic-world-adapter.d.ts.map +1 -0
- package/dist/scenario/synthetic-world-adapter.js +82 -0
- package/dist/scenario/time.d.ts +4 -0
- package/dist/scenario/time.d.ts.map +1 -0
- package/dist/scenario/time.js +45 -0
- package/dist/scenario/types.d.ts +149 -0
- package/dist/scenario/types.d.ts.map +1 -0
- package/dist/scenario/types.js +5 -0
- package/dist/spikes/index.d.ts +10 -0
- package/dist/spikes/index.d.ts.map +1 -0
- package/dist/spikes/index.js +29 -0
- package/dist/spikes/k1-ensemble-spread.d.ts +88 -0
- package/dist/spikes/k1-ensemble-spread.d.ts.map +1 -0
- package/dist/spikes/k1-ensemble-spread.js +396 -0
- package/dist/spikes/k2-policy-author.d.ts +25 -0
- package/dist/spikes/k2-policy-author.d.ts.map +1 -0
- package/dist/spikes/k2-policy-author.js +503 -0
- package/dist/spikes/live-refresh.d.ts +150 -0
- package/dist/spikes/live-refresh.d.ts.map +1 -0
- package/dist/spikes/live-refresh.js +511 -0
- package/dist/world/index.d.ts +2 -0
- package/dist/world/index.d.ts.map +1 -0
- package/dist/world/index.js +17 -0
- package/dist/world/synthetic-world.d.ts +104 -0
- package/dist/world/synthetic-world.d.ts.map +1 -0
- package/dist/world/synthetic-world.js +449 -0
- package/package.json +139 -0
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.K2_KNOWN_RESPONSIBILITY_ID = exports.K2_POLICY_AUTHOR_FIXTURE_VERSION_V0 = exports.K2_POLICY_AUTHOR_FIXTURE_SCHEMA_V0 = void 0;
|
|
4
|
+
exports.evaluateK2PolicyAuthorFixtureV0 = evaluateK2PolicyAuthorFixtureV0;
|
|
5
|
+
const { KERNEL_BACKSTOPS, KERNEL_DAY_MS, validateKernelPolicyArtifact } = loadReactorKernel();
|
|
6
|
+
exports.K2_POLICY_AUTHOR_FIXTURE_SCHEMA_V0 = "openprose.reactor-cradle.k2-policy-author-fixture";
|
|
7
|
+
exports.K2_POLICY_AUTHOR_FIXTURE_VERSION_V0 = 0;
|
|
8
|
+
exports.K2_KNOWN_RESPONSIBILITY_ID = "incident-channel-current-briefing";
|
|
9
|
+
const LIVE_OBSERVABLE_SOURCES = new Set([
|
|
10
|
+
"connector",
|
|
11
|
+
"receipt-log",
|
|
12
|
+
"kernel-backstop",
|
|
13
|
+
"cost-ledger",
|
|
14
|
+
"human-label-stream",
|
|
15
|
+
]);
|
|
16
|
+
function evaluateK2PolicyAuthorFixtureV0(fixture, options = {}) {
|
|
17
|
+
const failures = [];
|
|
18
|
+
const evidence = [];
|
|
19
|
+
const expectedResponsibilityId = options.expected_responsibility_id ?? exports.K2_KNOWN_RESPONSIBILITY_ID;
|
|
20
|
+
if (!isRecord(fixture)) {
|
|
21
|
+
push(failures, "$", "K2 policy-author fixture must be an object");
|
|
22
|
+
return finish({ failures, evidence, liveObservableRefs: [] });
|
|
23
|
+
}
|
|
24
|
+
validateEnvelope(fixture, failures);
|
|
25
|
+
const responsibility = fixture["responsibility"];
|
|
26
|
+
const responsibilityId = readResponsibility(responsibility, expectedResponsibilityId, failures, evidence);
|
|
27
|
+
const noAnchor = isRecord(responsibility)
|
|
28
|
+
? readBoolean(responsibility["no_anchor"], "responsibility.no_anchor", failures)
|
|
29
|
+
: undefined;
|
|
30
|
+
const liveObservableIds = readLiveObservableIds(fixture["live_observables"], failures, evidence);
|
|
31
|
+
const authoredPolicy = fixture["authored_policy"];
|
|
32
|
+
const policy = readAuthoredPolicy(authoredPolicy, responsibilityId, noAnchor, failures, evidence);
|
|
33
|
+
if (policy !== undefined &&
|
|
34
|
+
noAnchor !== undefined &&
|
|
35
|
+
liveObservableIds.length > 0) {
|
|
36
|
+
validatePredicateLiveFacts(policy.falsification_predicate, "authored_policy.falsification_predicate", liveObservableIds, failures, evidence);
|
|
37
|
+
if (policy.backstop_divergence_predicate !== undefined) {
|
|
38
|
+
validatePredicateLiveFacts(policy.backstop_divergence_predicate, "authored_policy.backstop_divergence_predicate", liveObservableIds, failures, evidence);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
let kernelValidation;
|
|
42
|
+
if (failures.length === 0 &&
|
|
43
|
+
policy !== undefined &&
|
|
44
|
+
noAnchor !== undefined) {
|
|
45
|
+
kernelValidation = validateKernelPolicyArtifact({
|
|
46
|
+
no_anchor: noAnchor,
|
|
47
|
+
falsification_predicate: policy.falsification_predicate,
|
|
48
|
+
live_observables: liveObservableIds,
|
|
49
|
+
...(policy.backstop_divergence_predicate === undefined
|
|
50
|
+
? {}
|
|
51
|
+
: {
|
|
52
|
+
backstop_divergence_predicate: policy.backstop_divergence_predicate,
|
|
53
|
+
}),
|
|
54
|
+
});
|
|
55
|
+
if (!kernelValidation.ok) {
|
|
56
|
+
push(failures, "authored_policy", "kernel B3 validation rejected policy", {
|
|
57
|
+
errors: kernelValidation.errors,
|
|
58
|
+
live_observable_refs: kernelValidation.live_observable_refs,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
push(evidence, "authored_policy", "kernel B3 validation passed", {
|
|
63
|
+
live_observable_refs: kernelValidation.live_observable_refs,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return finish({
|
|
68
|
+
failures,
|
|
69
|
+
evidence,
|
|
70
|
+
liveObservableRefs: collectPolicyLiveObservableRefs(policy, liveObservableIds),
|
|
71
|
+
responsibilityId,
|
|
72
|
+
kernelValidation,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function validateEnvelope(fixture, failures) {
|
|
76
|
+
if (fixture["schema"] !== exports.K2_POLICY_AUTHOR_FIXTURE_SCHEMA_V0) {
|
|
77
|
+
push(failures, "schema", "fixture schema is not the K2 policy-author v0 schema", {
|
|
78
|
+
expected: exports.K2_POLICY_AUTHOR_FIXTURE_SCHEMA_V0,
|
|
79
|
+
actual: fixture["schema"] ?? null,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
if (fixture["v"] !== exports.K2_POLICY_AUTHOR_FIXTURE_VERSION_V0) {
|
|
83
|
+
push(failures, "v", "fixture version is not K2 policy-author v0", {
|
|
84
|
+
expected: exports.K2_POLICY_AUTHOR_FIXTURE_VERSION_V0,
|
|
85
|
+
actual: fixture["v"] ?? null,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function readResponsibility(value, expectedResponsibilityId, failures, evidence) {
|
|
90
|
+
if (!isRecord(value)) {
|
|
91
|
+
push(failures, "responsibility", "fixture must name a known responsibility");
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
const id = readNonEmptyString(value["id"], "responsibility.id", failures);
|
|
95
|
+
readNonEmptyString(value["statement"], "responsibility.statement", failures);
|
|
96
|
+
if (id !== undefined && id !== expectedResponsibilityId) {
|
|
97
|
+
push(failures, "responsibility.id", "fixture targets an unknown responsibility", {
|
|
98
|
+
expected: expectedResponsibilityId,
|
|
99
|
+
actual: id,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (id !== undefined) {
|
|
103
|
+
push(evidence, "responsibility.id", "recognized K2 known responsibility", {
|
|
104
|
+
id,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return id;
|
|
108
|
+
}
|
|
109
|
+
function readLiveObservableIds(value, failures, evidence) {
|
|
110
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
111
|
+
push(failures, "live_observables", "policy-author fixture must include at least one live observable");
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
const ids = [];
|
|
115
|
+
const seen = new Set();
|
|
116
|
+
value.forEach((observable, index) => {
|
|
117
|
+
const path = `live_observables[${index}]`;
|
|
118
|
+
if (!isRecord(observable)) {
|
|
119
|
+
push(failures, path, "live observable must be an object");
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const id = readNonEmptyString(observable["id"], `${path}.id`, failures);
|
|
123
|
+
const source = readNonEmptyString(observable["source"], `${path}.source`, failures);
|
|
124
|
+
readNonEmptyString(observable["description"], `${path}.description`, failures);
|
|
125
|
+
if (source !== undefined && !LIVE_OBSERVABLE_SOURCES.has(source)) {
|
|
126
|
+
push(failures, `${path}.source`, "live observable source is not replayable", {
|
|
127
|
+
allowed: [...LIVE_OBSERVABLE_SOURCES].sort(),
|
|
128
|
+
actual: source,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
if (id !== undefined) {
|
|
132
|
+
if (seen.has(id)) {
|
|
133
|
+
push(failures, `${path}.id`, "live observable ids must be unique", {
|
|
134
|
+
id,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
seen.add(id);
|
|
139
|
+
ids.push(id);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
if (ids.length > 0) {
|
|
144
|
+
push(evidence, "live_observables", "fixture declares replayable live facts", {
|
|
145
|
+
ids: [...ids].sort(),
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return [...ids].sort();
|
|
149
|
+
}
|
|
150
|
+
function readAuthoredPolicy(value, responsibilityId, noAnchor, failures, evidence) {
|
|
151
|
+
if (!isRecord(value)) {
|
|
152
|
+
push(failures, "authored_policy", "fixture must include authored policy output");
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
readNonEmptyString(value["registry_id"], "authored_policy.registry_id", failures);
|
|
156
|
+
readNonEmptyString(value["policy_revision"], "authored_policy.policy_revision", failures);
|
|
157
|
+
const policyResponsibilityId = readNonEmptyString(value["responsibility_id"], "authored_policy.responsibility_id", failures);
|
|
158
|
+
if (responsibilityId !== undefined &&
|
|
159
|
+
policyResponsibilityId !== undefined &&
|
|
160
|
+
policyResponsibilityId !== responsibilityId) {
|
|
161
|
+
push(failures, "authored_policy.responsibility_id", "authored policy targets a different responsibility than the fixture", {
|
|
162
|
+
expected: responsibilityId,
|
|
163
|
+
actual: policyResponsibilityId,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
validateCadence(value["cadence"], noAnchor, failures, evidence);
|
|
167
|
+
validateHysteresis(value["hysteresis"], failures, evidence);
|
|
168
|
+
validateThresholds(value["thresholds"], failures, evidence);
|
|
169
|
+
const falsificationPredicate = value["falsification_predicate"];
|
|
170
|
+
const hasFalsificationPredicate = isKernelPredicateExpression(falsificationPredicate, "authored_policy.falsification_predicate", failures);
|
|
171
|
+
const divergencePredicate = value["backstop_divergence_predicate"];
|
|
172
|
+
let backstopDivergencePredicate;
|
|
173
|
+
if (divergencePredicate !== undefined &&
|
|
174
|
+
isKernelPredicateExpression(divergencePredicate, "authored_policy.backstop_divergence_predicate", failures)) {
|
|
175
|
+
backstopDivergencePredicate = divergencePredicate;
|
|
176
|
+
}
|
|
177
|
+
if (noAnchor === true && divergencePredicate === undefined) {
|
|
178
|
+
push(failures, "authored_policy.backstop_divergence_predicate", "no-anchor K2 policy must carry the B2 backstop divergence predicate");
|
|
179
|
+
}
|
|
180
|
+
if (!hasFalsificationPredicate) {
|
|
181
|
+
return undefined;
|
|
182
|
+
}
|
|
183
|
+
const policy = {
|
|
184
|
+
falsification_predicate: falsificationPredicate,
|
|
185
|
+
...(backstopDivergencePredicate === undefined
|
|
186
|
+
? {}
|
|
187
|
+
: { backstop_divergence_predicate: backstopDivergencePredicate }),
|
|
188
|
+
};
|
|
189
|
+
push(evidence, "authored_policy", "authored registry carries executable predicates", {
|
|
190
|
+
falsification_facts: collectPredicateFacts(policy.falsification_predicate),
|
|
191
|
+
backstop_divergence_facts: policy.backstop_divergence_predicate === undefined
|
|
192
|
+
? []
|
|
193
|
+
: collectPredicateFacts(policy.backstop_divergence_predicate),
|
|
194
|
+
});
|
|
195
|
+
return policy;
|
|
196
|
+
}
|
|
197
|
+
function validateCadence(value, noAnchor, failures, evidence) {
|
|
198
|
+
if (!isRecord(value)) {
|
|
199
|
+
push(failures, "authored_policy.cadence", "policy must carry cadence shape");
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const shallow = readPositiveSafeInteger(value["shallow_recheck_ms"], "authored_policy.cadence.shallow_recheck_ms", failures);
|
|
203
|
+
const planAudit = readPositiveSafeInteger(value["plan_audit_ms"], "authored_policy.cadence.plan_audit_ms", failures);
|
|
204
|
+
const deep = readPositiveSafeInteger(value["deep_revalidation_ms"], "authored_policy.cadence.deep_revalidation_ms", failures);
|
|
205
|
+
if (shallow !== undefined && shallow < 5 * 60 * 1000) {
|
|
206
|
+
push(failures, "authored_policy.cadence.shallow_recheck_ms", "shallow cadence is too tight for a recorded v0.1 policy", { minimum_ms: 5 * 60 * 1000, actual: shallow });
|
|
207
|
+
}
|
|
208
|
+
if (shallow !== undefined &&
|
|
209
|
+
planAudit !== undefined &&
|
|
210
|
+
shallow > planAudit) {
|
|
211
|
+
push(failures, "authored_policy.cadence", "plan-audit cadence must not be more frequent than shallow recheck cadence", { shallow_recheck_ms: shallow, plan_audit_ms: planAudit });
|
|
212
|
+
}
|
|
213
|
+
if (planAudit !== undefined && deep !== undefined && planAudit > deep) {
|
|
214
|
+
push(failures, "authored_policy.cadence", "deep revalidation cadence must be at least as wide as plan-audit cadence", { plan_audit_ms: planAudit, deep_revalidation_ms: deep });
|
|
215
|
+
}
|
|
216
|
+
if (noAnchor === true &&
|
|
217
|
+
deep !== undefined &&
|
|
218
|
+
deep > KERNEL_BACKSTOPS.maxUnforcedDeepIntervalMs) {
|
|
219
|
+
push(failures, "authored_policy.cadence.deep_revalidation_ms", "no-anchor deep cadence cannot exceed the fixed B2 deep interval", {
|
|
220
|
+
maximum_ms: KERNEL_BACKSTOPS.maxUnforcedDeepIntervalMs,
|
|
221
|
+
actual: deep,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
if (shallow !== undefined && planAudit !== undefined && deep !== undefined) {
|
|
225
|
+
push(evidence, "authored_policy.cadence", "cadence shape is replayable", {
|
|
226
|
+
shallow_recheck_ms: shallow,
|
|
227
|
+
plan_audit_ms: planAudit,
|
|
228
|
+
deep_revalidation_ms: deep,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function validateHysteresis(value, failures, evidence) {
|
|
233
|
+
if (!isRecord(value)) {
|
|
234
|
+
push(failures, "authored_policy.hysteresis", "policy must carry hysteresis shape");
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
const minRecompile = readPositiveSafeInteger(value["min_recompile_interval_ms"], "authored_policy.hysteresis.min_recompile_interval_ms", failures);
|
|
238
|
+
const enter = readUnitInterval(value["enter_degraded_threshold"], "authored_policy.hysteresis.enter_degraded_threshold", failures);
|
|
239
|
+
const exit = readUnitInterval(value["exit_degraded_threshold"], "authored_policy.hysteresis.exit_degraded_threshold", failures);
|
|
240
|
+
const warmup = readPositiveSafeInteger(value["warmup_judged_activations"], "authored_policy.hysteresis.warmup_judged_activations", failures);
|
|
241
|
+
if (minRecompile !== undefined &&
|
|
242
|
+
minRecompile < KERNEL_BACKSTOPS.minRecompileIntervalMs) {
|
|
243
|
+
push(failures, "authored_policy.hysteresis.min_recompile_interval_ms", "policy hysteresis may not shorten the fixed kernel recompile floor", {
|
|
244
|
+
minimum_ms: KERNEL_BACKSTOPS.minRecompileIntervalMs,
|
|
245
|
+
actual: minRecompile,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
if (enter !== undefined && exit !== undefined && exit >= enter) {
|
|
249
|
+
push(failures, "authored_policy.hysteresis", "exit threshold must be below enter threshold to avoid flip-flop", { enter_degraded_threshold: enter, exit_degraded_threshold: exit });
|
|
250
|
+
}
|
|
251
|
+
if (minRecompile !== undefined &&
|
|
252
|
+
enter !== undefined &&
|
|
253
|
+
exit !== undefined &&
|
|
254
|
+
warmup !== undefined) {
|
|
255
|
+
push(evidence, "authored_policy.hysteresis", "hysteresis band is sane", {
|
|
256
|
+
min_recompile_interval_ms: minRecompile,
|
|
257
|
+
enter_degraded_threshold: enter,
|
|
258
|
+
exit_degraded_threshold: exit,
|
|
259
|
+
warmup_judged_activations: warmup,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function validateThresholds(value, failures, evidence) {
|
|
264
|
+
if (!isRecord(value)) {
|
|
265
|
+
push(failures, "authored_policy.thresholds", "policy must carry threshold shape");
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
const divergence = readPositiveFiniteNumber(value["max_calibration_divergence_multiplier"], "authored_policy.thresholds.max_calibration_divergence_multiplier", failures);
|
|
269
|
+
const precision = readUnitInterval(value["escalation_precision_floor"], "authored_policy.thresholds.escalation_precision_floor", failures);
|
|
270
|
+
const contradictionCount = readPositiveSafeInteger(value["backstop_deep_contradiction_count"], "authored_policy.thresholds.backstop_deep_contradiction_count", failures);
|
|
271
|
+
const staleBriefMinutes = readPositiveSafeInteger(value["stale_brief_minutes"], "authored_policy.thresholds.stale_brief_minutes", failures);
|
|
272
|
+
const freshTokensCeiling = readPositiveFiniteNumber(value["fresh_tokens_per_day_ceiling"], "authored_policy.thresholds.fresh_tokens_per_day_ceiling", failures);
|
|
273
|
+
if (divergence !== undefined &&
|
|
274
|
+
(divergence <= 1 ||
|
|
275
|
+
divergence > KERNEL_BACKSTOPS.maxCalibrationDivergenceMultiplier)) {
|
|
276
|
+
push(failures, "authored_policy.thresholds.max_calibration_divergence_multiplier", "calibration divergence threshold must trip before the fixed kernel ceiling", {
|
|
277
|
+
minimum_exclusive: 1,
|
|
278
|
+
maximum: KERNEL_BACKSTOPS.maxCalibrationDivergenceMultiplier,
|
|
279
|
+
actual: divergence,
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
if (staleBriefMinutes !== undefined &&
|
|
283
|
+
staleBriefMinutes * 60 * 1000 > KERNEL_DAY_MS) {
|
|
284
|
+
push(failures, "authored_policy.thresholds.stale_brief_minutes", "incident-briefing freshness threshold must fit inside a day", { maximum_minutes: KERNEL_DAY_MS / 60 / 1000, actual: staleBriefMinutes });
|
|
285
|
+
}
|
|
286
|
+
if (divergence !== undefined &&
|
|
287
|
+
precision !== undefined &&
|
|
288
|
+
contradictionCount !== undefined &&
|
|
289
|
+
staleBriefMinutes !== undefined &&
|
|
290
|
+
freshTokensCeiling !== undefined) {
|
|
291
|
+
push(evidence, "authored_policy.thresholds", "threshold shape is sane", {
|
|
292
|
+
max_calibration_divergence_multiplier: divergence,
|
|
293
|
+
escalation_precision_floor: precision,
|
|
294
|
+
backstop_deep_contradiction_count: contradictionCount,
|
|
295
|
+
stale_brief_minutes: staleBriefMinutes,
|
|
296
|
+
fresh_tokens_per_day_ceiling: freshTokensCeiling,
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function validatePredicateLiveFacts(predicate, path, liveObservableIds, failures, evidence) {
|
|
301
|
+
const liveObservableSet = new Set(liveObservableIds);
|
|
302
|
+
const facts = collectPredicateFacts(predicate);
|
|
303
|
+
const offLiveFacts = facts.filter((fact) => !liveObservableSet.has(fact));
|
|
304
|
+
if (offLiveFacts.length > 0) {
|
|
305
|
+
push(failures, path, "predicate references non-live observable facts", {
|
|
306
|
+
off_live_facts: offLiveFacts,
|
|
307
|
+
live_observables: liveObservableIds,
|
|
308
|
+
});
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
push(evidence, path, "predicate facts are all live observables", { facts });
|
|
312
|
+
}
|
|
313
|
+
function collectPolicyLiveObservableRefs(policy, liveObservableIds) {
|
|
314
|
+
if (policy === undefined) {
|
|
315
|
+
return [];
|
|
316
|
+
}
|
|
317
|
+
const liveObservableSet = new Set(liveObservableIds);
|
|
318
|
+
return [
|
|
319
|
+
...new Set([
|
|
320
|
+
...collectPredicateFacts(policy.falsification_predicate),
|
|
321
|
+
...(policy.backstop_divergence_predicate === undefined
|
|
322
|
+
? []
|
|
323
|
+
: collectPredicateFacts(policy.backstop_divergence_predicate)),
|
|
324
|
+
]),
|
|
325
|
+
]
|
|
326
|
+
.filter((fact) => liveObservableSet.has(fact))
|
|
327
|
+
.sort((left, right) => left.localeCompare(right));
|
|
328
|
+
}
|
|
329
|
+
function isKernelPredicateExpression(value, path, failures) {
|
|
330
|
+
if (!isRecord(value)) {
|
|
331
|
+
push(failures, path, "predicate must be an object");
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
const kind = value["kind"];
|
|
335
|
+
switch (kind) {
|
|
336
|
+
case "equals":
|
|
337
|
+
case "not-equals":
|
|
338
|
+
return validateFactPredicate(value, path, failures, false);
|
|
339
|
+
case "greater-than-or-equal":
|
|
340
|
+
case "less-than":
|
|
341
|
+
return validateFactPredicate(value, path, failures, true);
|
|
342
|
+
case "and":
|
|
343
|
+
case "or":
|
|
344
|
+
return validateVariadicPredicate(value, path, failures);
|
|
345
|
+
case "not":
|
|
346
|
+
return isKernelPredicateExpression(value["predicate"], `${path}.predicate`, failures);
|
|
347
|
+
default:
|
|
348
|
+
push(failures, `${path}.kind`, "predicate kind is not supported", {
|
|
349
|
+
actual: kind ?? null,
|
|
350
|
+
});
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
function validateFactPredicate(value, path, failures, numeric) {
|
|
355
|
+
let ok = true;
|
|
356
|
+
if (readNonEmptyString(value["fact"], `${path}.fact`, failures) === undefined) {
|
|
357
|
+
ok = false;
|
|
358
|
+
}
|
|
359
|
+
const expected = value["value"];
|
|
360
|
+
if (numeric) {
|
|
361
|
+
if (typeof expected !== "number" || !Number.isFinite(expected)) {
|
|
362
|
+
push(failures, `${path}.value`, "numeric predicate threshold is malformed", {
|
|
363
|
+
actual: expected ?? null,
|
|
364
|
+
});
|
|
365
|
+
ok = false;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
else if (!isKernelFactValue(expected)) {
|
|
369
|
+
push(failures, `${path}.value`, "predicate value is malformed", {
|
|
370
|
+
actual: expected ?? null,
|
|
371
|
+
});
|
|
372
|
+
ok = false;
|
|
373
|
+
}
|
|
374
|
+
return ok;
|
|
375
|
+
}
|
|
376
|
+
function validateVariadicPredicate(value, path, failures) {
|
|
377
|
+
const predicates = value["predicates"];
|
|
378
|
+
if (!Array.isArray(predicates) || predicates.length === 0) {
|
|
379
|
+
push(failures, `${path}.predicates`, "variadic predicate must be non-empty");
|
|
380
|
+
return false;
|
|
381
|
+
}
|
|
382
|
+
let ok = true;
|
|
383
|
+
predicates.forEach((predicate, index) => {
|
|
384
|
+
if (!isKernelPredicateExpression(predicate, `${path}.predicates[${index}]`, failures)) {
|
|
385
|
+
ok = false;
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
return ok;
|
|
389
|
+
}
|
|
390
|
+
function collectPredicateFacts(expression) {
|
|
391
|
+
const facts = new Set();
|
|
392
|
+
collectFacts(expression, facts);
|
|
393
|
+
return [...facts].sort((left, right) => left.localeCompare(right));
|
|
394
|
+
}
|
|
395
|
+
function collectFacts(expression, facts) {
|
|
396
|
+
switch (expression.kind) {
|
|
397
|
+
case "equals":
|
|
398
|
+
case "not-equals":
|
|
399
|
+
case "greater-than-or-equal":
|
|
400
|
+
case "less-than":
|
|
401
|
+
facts.add(expression.fact);
|
|
402
|
+
return;
|
|
403
|
+
case "and":
|
|
404
|
+
case "or":
|
|
405
|
+
expression.predicates.forEach((predicate) => collectFacts(predicate, facts));
|
|
406
|
+
return;
|
|
407
|
+
case "not":
|
|
408
|
+
collectFacts(expression.predicate, facts);
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
function readBoolean(value, path, failures) {
|
|
413
|
+
if (typeof value !== "boolean") {
|
|
414
|
+
push(failures, path, "field must be boolean", { actual: value ?? null });
|
|
415
|
+
return undefined;
|
|
416
|
+
}
|
|
417
|
+
return value;
|
|
418
|
+
}
|
|
419
|
+
function readNonEmptyString(value, path, failures) {
|
|
420
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
421
|
+
push(failures, path, "field must be a non-empty string", {
|
|
422
|
+
actual: value ?? null,
|
|
423
|
+
});
|
|
424
|
+
return undefined;
|
|
425
|
+
}
|
|
426
|
+
return value;
|
|
427
|
+
}
|
|
428
|
+
function readPositiveSafeInteger(value, path, failures) {
|
|
429
|
+
if (!Number.isSafeInteger(value) || value <= 0) {
|
|
430
|
+
push(failures, path, "field must be a positive safe integer", {
|
|
431
|
+
actual: value ?? null,
|
|
432
|
+
});
|
|
433
|
+
return undefined;
|
|
434
|
+
}
|
|
435
|
+
return value;
|
|
436
|
+
}
|
|
437
|
+
function readPositiveFiniteNumber(value, path, failures) {
|
|
438
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
|
|
439
|
+
push(failures, path, "field must be a positive finite number", {
|
|
440
|
+
actual: value ?? null,
|
|
441
|
+
});
|
|
442
|
+
return undefined;
|
|
443
|
+
}
|
|
444
|
+
return value;
|
|
445
|
+
}
|
|
446
|
+
function readUnitInterval(value, path, failures) {
|
|
447
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0 || value >= 1) {
|
|
448
|
+
push(failures, path, "field must be inside the open unit interval", {
|
|
449
|
+
actual: value ?? null,
|
|
450
|
+
});
|
|
451
|
+
return undefined;
|
|
452
|
+
}
|
|
453
|
+
return value;
|
|
454
|
+
}
|
|
455
|
+
function isKernelFactValue(value) {
|
|
456
|
+
return (value === null ||
|
|
457
|
+
typeof value === "string" ||
|
|
458
|
+
typeof value === "number" ||
|
|
459
|
+
typeof value === "boolean");
|
|
460
|
+
}
|
|
461
|
+
function finish(input) {
|
|
462
|
+
const ok = input.failures.length === 0;
|
|
463
|
+
const result = {
|
|
464
|
+
ok,
|
|
465
|
+
status: ok ? "pass" : "fail",
|
|
466
|
+
summary: ok
|
|
467
|
+
? "recorded K2 policy-author output passed shape and B3 validation"
|
|
468
|
+
: "recorded K2 policy-author output failed closed",
|
|
469
|
+
live_observable_refs: Object.freeze([...input.liveObservableRefs]),
|
|
470
|
+
evidence: Object.freeze([...input.evidence]),
|
|
471
|
+
failures: Object.freeze([...input.failures]),
|
|
472
|
+
...(input.responsibilityId === undefined
|
|
473
|
+
? {}
|
|
474
|
+
: { responsibility_id: input.responsibilityId }),
|
|
475
|
+
...(input.kernelValidation === undefined
|
|
476
|
+
? {}
|
|
477
|
+
: { kernel_validation: input.kernelValidation }),
|
|
478
|
+
};
|
|
479
|
+
return result;
|
|
480
|
+
}
|
|
481
|
+
function push(target, path, message, observed) {
|
|
482
|
+
target.push(observed === undefined ? { path, message } : { path, message, observed });
|
|
483
|
+
}
|
|
484
|
+
function isRecord(value) {
|
|
485
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
486
|
+
}
|
|
487
|
+
function loadReactorKernel() {
|
|
488
|
+
try {
|
|
489
|
+
return require("@openprose/reactor/kernel");
|
|
490
|
+
}
|
|
491
|
+
catch (error) {
|
|
492
|
+
if (isMissingReactorKernelPackage(error)) {
|
|
493
|
+
return require("../../../reactor/dist/kernel");
|
|
494
|
+
}
|
|
495
|
+
throw error;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
function isMissingReactorKernelPackage(error) {
|
|
499
|
+
return (isRecord(error) &&
|
|
500
|
+
error["code"] === "MODULE_NOT_FOUND" &&
|
|
501
|
+
typeof error["message"] === "string" &&
|
|
502
|
+
error["message"].includes("@openprose/reactor/kernel"));
|
|
503
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { type K1EnsembleSpreadFixtureV0 } from "./k1-ensemble-spread";
|
|
2
|
+
export declare const OPENPROSE_DOTENV_PATH_V0: ".env";
|
|
3
|
+
export declare const OPENROUTER_API_KEY_ENV_NAME_V0: "OPENROUTER_API_KEY";
|
|
4
|
+
export declare const OPENROUTER_LIVE_REFRESH_PROVIDER_V0: "openrouter";
|
|
5
|
+
export declare const OPENROUTER_LIVE_REFRESH_DEFAULT_MODEL_V0: "google/gemini-3.1-flash-lite-preview";
|
|
6
|
+
export declare const OPENROUTER_LIVE_REFRESH_STANDING_CAP_USD_V0: 200;
|
|
7
|
+
export declare const OPENROUTER_LIVE_REFRESH_GUARD_SCHEMA_V0: "openprose.reactor-cradle.openrouter-live-refresh-guard";
|
|
8
|
+
export declare const OPENROUTER_LIVE_REFRESH_GUARD_VERSION_V0: 0;
|
|
9
|
+
export declare const OPENROUTER_K1_LIVE_RECORDING_SCHEMA_V0: "openprose.reactor-cradle.k1-live-recording";
|
|
10
|
+
export declare const OPENROUTER_K1_LIVE_RECORDING_VERSION_V0: 0;
|
|
11
|
+
export declare const OPENROUTER_K1_LIVE_CHAT_COMPLETIONS_URL_V0: "https://openrouter.ai/api/v1/chat/completions";
|
|
12
|
+
export declare const OPENROUTER_K1_LIVE_RECORDING_MODELS_V0: readonly [{
|
|
13
|
+
readonly provider: "google";
|
|
14
|
+
readonly model: "google/gemini-3.1-flash-lite-preview";
|
|
15
|
+
readonly family: "gemini";
|
|
16
|
+
readonly size_class: "small";
|
|
17
|
+
readonly prompt_cost_per_token_usd: 2.5e-7;
|
|
18
|
+
readonly completion_cost_per_token_usd: 0.0000015;
|
|
19
|
+
readonly max_output_tokens: 180;
|
|
20
|
+
readonly request_cap_usd: 0.25;
|
|
21
|
+
}, {
|
|
22
|
+
readonly provider: "mistralai";
|
|
23
|
+
readonly model: "mistralai/mistral-small-3.2-24b-instruct";
|
|
24
|
+
readonly family: "mistral";
|
|
25
|
+
readonly size_class: "small";
|
|
26
|
+
readonly prompt_cost_per_token_usd: 7.5e-8;
|
|
27
|
+
readonly completion_cost_per_token_usd: 2e-7;
|
|
28
|
+
readonly max_output_tokens: 180;
|
|
29
|
+
readonly request_cap_usd: 0.25;
|
|
30
|
+
}, {
|
|
31
|
+
readonly provider: "qwen";
|
|
32
|
+
readonly model: "qwen/qwen-2.5-72b-instruct";
|
|
33
|
+
readonly family: "qwen";
|
|
34
|
+
readonly size_class: "large";
|
|
35
|
+
readonly prompt_cost_per_token_usd: 3.6e-7;
|
|
36
|
+
readonly completion_cost_per_token_usd: 4e-7;
|
|
37
|
+
readonly max_output_tokens: 180;
|
|
38
|
+
readonly request_cap_usd: 0.25;
|
|
39
|
+
}];
|
|
40
|
+
export type OpenRouterLiveRefreshModelV0 = typeof OPENROUTER_LIVE_REFRESH_DEFAULT_MODEL_V0;
|
|
41
|
+
export type OpenRouterLiveRefreshEnvReaderV0 = (path: string) => string;
|
|
42
|
+
export interface OpenRouterLiveRefreshAccountingV0 {
|
|
43
|
+
readonly currency: "USD";
|
|
44
|
+
readonly cap_usd: number;
|
|
45
|
+
readonly spent_usd: number;
|
|
46
|
+
readonly request_cap_usd: number;
|
|
47
|
+
readonly account_ref: string;
|
|
48
|
+
readonly ledger_ref: string;
|
|
49
|
+
}
|
|
50
|
+
export interface PrepareOpenRouterLiveRefreshInputV0 {
|
|
51
|
+
readonly allow_live?: boolean;
|
|
52
|
+
readonly accounting?: OpenRouterLiveRefreshAccountingV0;
|
|
53
|
+
readonly env_path?: string;
|
|
54
|
+
readonly model?: string;
|
|
55
|
+
readonly readEnvFile?: OpenRouterLiveRefreshEnvReaderV0;
|
|
56
|
+
}
|
|
57
|
+
export interface OpenRouterLiveRefreshDisabledV0 {
|
|
58
|
+
readonly schema: typeof OPENROUTER_LIVE_REFRESH_GUARD_SCHEMA_V0;
|
|
59
|
+
readonly v: typeof OPENROUTER_LIVE_REFRESH_GUARD_VERSION_V0;
|
|
60
|
+
readonly status: "disabled";
|
|
61
|
+
readonly provider: typeof OPENROUTER_LIVE_REFRESH_PROVIDER_V0;
|
|
62
|
+
readonly reason: "live-opt-in-required";
|
|
63
|
+
}
|
|
64
|
+
export interface OpenRouterLiveRefreshReadyAccountingV0 {
|
|
65
|
+
readonly currency: "USD";
|
|
66
|
+
readonly cap_usd: number;
|
|
67
|
+
readonly spent_usd: number;
|
|
68
|
+
readonly request_cap_usd: number;
|
|
69
|
+
readonly remaining_usd: number;
|
|
70
|
+
readonly remaining_after_request_usd: number;
|
|
71
|
+
readonly account_ref: string;
|
|
72
|
+
readonly ledger_ref: string;
|
|
73
|
+
readonly standing_cap_usd: typeof OPENROUTER_LIVE_REFRESH_STANDING_CAP_USD_V0;
|
|
74
|
+
}
|
|
75
|
+
export interface OpenRouterLiveRefreshReadyV0 {
|
|
76
|
+
readonly schema: typeof OPENROUTER_LIVE_REFRESH_GUARD_SCHEMA_V0;
|
|
77
|
+
readonly v: typeof OPENROUTER_LIVE_REFRESH_GUARD_VERSION_V0;
|
|
78
|
+
readonly status: "ready";
|
|
79
|
+
readonly provider: typeof OPENROUTER_LIVE_REFRESH_PROVIDER_V0;
|
|
80
|
+
readonly env_path: string;
|
|
81
|
+
readonly env_key_name: typeof OPENROUTER_API_KEY_ENV_NAME_V0;
|
|
82
|
+
readonly api_key_present: true;
|
|
83
|
+
readonly model: OpenRouterLiveRefreshModelV0;
|
|
84
|
+
readonly accounting: OpenRouterLiveRefreshReadyAccountingV0;
|
|
85
|
+
}
|
|
86
|
+
export type OpenRouterLiveRefreshGuardResultV0 = OpenRouterLiveRefreshDisabledV0 | OpenRouterLiveRefreshReadyV0;
|
|
87
|
+
export type OpenRouterLiveRefreshInvokerV0<T> = (ready: OpenRouterLiveRefreshReadyV0) => T;
|
|
88
|
+
export interface OpenRouterK1LiveModelSpecV0 {
|
|
89
|
+
readonly provider: string;
|
|
90
|
+
readonly model: string;
|
|
91
|
+
readonly family: string;
|
|
92
|
+
readonly size_class: "small" | "medium" | "large";
|
|
93
|
+
readonly prompt_cost_per_token_usd: number;
|
|
94
|
+
readonly completion_cost_per_token_usd: number;
|
|
95
|
+
readonly max_output_tokens: number;
|
|
96
|
+
readonly request_cap_usd: number;
|
|
97
|
+
}
|
|
98
|
+
export interface RecordOpenRouterK1LiveFixtureInputV0 extends PrepareOpenRouterLiveRefreshInputV0 {
|
|
99
|
+
readonly fetch?: typeof fetch;
|
|
100
|
+
readonly models?: readonly OpenRouterK1LiveModelSpecV0[];
|
|
101
|
+
readonly now?: () => Date;
|
|
102
|
+
}
|
|
103
|
+
export interface OpenRouterK1LiveOutputRecordingV0 {
|
|
104
|
+
readonly output_id: string;
|
|
105
|
+
readonly provider: string;
|
|
106
|
+
readonly model: string;
|
|
107
|
+
readonly request_id: string;
|
|
108
|
+
readonly response_id: string;
|
|
109
|
+
readonly latency_ms: number;
|
|
110
|
+
readonly finish_reason: string;
|
|
111
|
+
readonly usage: Readonly<Record<string, unknown>>;
|
|
112
|
+
readonly spend_usd: number;
|
|
113
|
+
readonly spend_source: "openrouter-usage-cost" | "pricing-estimate-from-token-usage";
|
|
114
|
+
}
|
|
115
|
+
export interface OpenRouterK1LiveRecordingBlockV0 {
|
|
116
|
+
readonly schema: typeof OPENROUTER_K1_LIVE_RECORDING_SCHEMA_V0;
|
|
117
|
+
readonly v: typeof OPENROUTER_K1_LIVE_RECORDING_VERSION_V0;
|
|
118
|
+
readonly provider: typeof OPENROUTER_LIVE_REFRESH_PROVIDER_V0;
|
|
119
|
+
readonly chat_completions_url: typeof OPENROUTER_K1_LIVE_CHAT_COMPLETIONS_URL_V0;
|
|
120
|
+
readonly started_at: string;
|
|
121
|
+
readonly completed_at: string;
|
|
122
|
+
readonly cap_usd: number;
|
|
123
|
+
readonly request_cap_usd: number;
|
|
124
|
+
readonly spend_usd: number;
|
|
125
|
+
readonly currency: "USD";
|
|
126
|
+
readonly model_count: number;
|
|
127
|
+
readonly request_count: number;
|
|
128
|
+
readonly model_specs: readonly OpenRouterK1LiveModelSpecV0[];
|
|
129
|
+
readonly outputs: readonly OpenRouterK1LiveOutputRecordingV0[];
|
|
130
|
+
}
|
|
131
|
+
export interface OpenRouterK1LiveRecordedFixtureV0 extends K1EnsembleSpreadFixtureV0 {
|
|
132
|
+
readonly recording: OpenRouterK1LiveRecordingBlockV0;
|
|
133
|
+
}
|
|
134
|
+
export interface OpenRouterLiveRefreshSkippedRunV0 {
|
|
135
|
+
readonly status: "disabled";
|
|
136
|
+
readonly invoked: false;
|
|
137
|
+
readonly guard: OpenRouterLiveRefreshDisabledV0;
|
|
138
|
+
}
|
|
139
|
+
export interface OpenRouterLiveRefreshInvokedRunV0<T> {
|
|
140
|
+
readonly status: "ready";
|
|
141
|
+
readonly invoked: true;
|
|
142
|
+
readonly guard: OpenRouterLiveRefreshReadyV0;
|
|
143
|
+
readonly result: T;
|
|
144
|
+
}
|
|
145
|
+
export type OpenRouterLiveRefreshRunResultV0<T> = OpenRouterLiveRefreshSkippedRunV0 | OpenRouterLiveRefreshInvokedRunV0<T>;
|
|
146
|
+
export declare function prepareOpenRouterLiveRefreshV0(input?: PrepareOpenRouterLiveRefreshInputV0): OpenRouterLiveRefreshGuardResultV0;
|
|
147
|
+
export declare function runOpenRouterLiveRefreshV0<T>(input: PrepareOpenRouterLiveRefreshInputV0, invokeLiveRefresh: OpenRouterLiveRefreshInvokerV0<T>): OpenRouterLiveRefreshRunResultV0<T>;
|
|
148
|
+
export declare function recordOpenRouterK1LiveFixtureV0(input: RecordOpenRouterK1LiveFixtureInputV0): Promise<OpenRouterK1LiveRecordedFixtureV0>;
|
|
149
|
+
export declare function hasOpenRouterApiKeyInDotenvV0(dotenvText: string): boolean;
|
|
150
|
+
//# sourceMappingURL=live-refresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|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