@principles/core 1.275.0 → 1.275.2

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 (55) hide show
  1. package/dist/runtime-v2/activation/__tests__/production-gate-deps.test.js +69 -0
  2. package/dist/runtime-v2/activation/__tests__/production-gate-deps.test.js.map +1 -1
  3. package/dist/runtime-v2/activation/production-gate-deps.d.ts.map +1 -1
  4. package/dist/runtime-v2/activation/production-gate-deps.js +13 -46
  5. package/dist/runtime-v2/activation/production-gate-deps.js.map +1 -1
  6. package/dist/runtime-v2/config/__tests__/pd-config-sparse-bootstrap.test.d.ts +2 -0
  7. package/dist/runtime-v2/config/__tests__/pd-config-sparse-bootstrap.test.d.ts.map +1 -0
  8. package/dist/runtime-v2/config/__tests__/pd-config-sparse-bootstrap.test.js +143 -0
  9. package/dist/runtime-v2/config/__tests__/pd-config-sparse-bootstrap.test.js.map +1 -0
  10. package/dist/runtime-v2/feature-flags/__tests__/installer-config-parity.test.js +44 -27
  11. package/dist/runtime-v2/feature-flags/__tests__/installer-config-parity.test.js.map +1 -1
  12. package/dist/runtime-v2/internalization/__tests__/adversarial-feedback.test.js +9 -0
  13. package/dist/runtime-v2/internalization/__tests__/adversarial-feedback.test.js.map +1 -1
  14. package/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js +15 -5
  15. package/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder.test.js.map +1 -1
  16. package/dist/runtime-v2/internalization/__tests__/evaluator-artificer-repair-replay.test.d.ts +2 -0
  17. package/dist/runtime-v2/internalization/__tests__/evaluator-artificer-repair-replay.test.d.ts.map +1 -0
  18. package/dist/runtime-v2/internalization/__tests__/evaluator-artificer-repair-replay.test.js +413 -0
  19. package/dist/runtime-v2/internalization/__tests__/evaluator-artificer-repair-replay.test.js.map +1 -0
  20. package/dist/runtime-v2/internalization/__tests__/evaluator-gate-authority.test.js +136 -0
  21. package/dist/runtime-v2/internalization/__tests__/evaluator-gate-authority.test.js.map +1 -1
  22. package/dist/runtime-v2/internalization/__tests__/repair-replay-resolver.test.d.ts +2 -0
  23. package/dist/runtime-v2/internalization/__tests__/repair-replay-resolver.test.d.ts.map +1 -0
  24. package/dist/runtime-v2/internalization/__tests__/repair-replay-resolver.test.js +340 -0
  25. package/dist/runtime-v2/internalization/__tests__/repair-replay-resolver.test.js.map +1 -0
  26. package/dist/runtime-v2/internalization/adversarial-feedback.d.ts.map +1 -1
  27. package/dist/runtime-v2/internalization/adversarial-feedback.js +7 -1
  28. package/dist/runtime-v2/internalization/adversarial-feedback.js.map +1 -1
  29. package/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts +9 -2
  30. package/dist/runtime-v2/internalization/artificer-prompt-builder.d.ts.map +1 -1
  31. package/dist/runtime-v2/internalization/artificer-prompt-builder.js +19 -1
  32. package/dist/runtime-v2/internalization/artificer-prompt-builder.js.map +1 -1
  33. package/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
  34. package/dist/runtime-v2/internalization/artificer-runner.js +84 -7
  35. package/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
  36. package/dist/runtime-v2/internalization/evaluator-output.d.ts +18 -1
  37. package/dist/runtime-v2/internalization/evaluator-output.d.ts.map +1 -1
  38. package/dist/runtime-v2/internalization/evaluator-output.js +12 -2
  39. package/dist/runtime-v2/internalization/evaluator-output.js.map +1 -1
  40. package/dist/runtime-v2/internalization/evaluator-runner.d.ts.map +1 -1
  41. package/dist/runtime-v2/internalization/evaluator-runner.js +99 -5
  42. package/dist/runtime-v2/internalization/evaluator-runner.js.map +1 -1
  43. package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.d.ts +18 -1
  44. package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.d.ts.map +1 -1
  45. package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js +20 -0
  46. package/dist/runtime-v2/internalization/refiner-sandbox-wrapper.js.map +1 -1
  47. package/dist/runtime-v2/internalization/repair-replay-resolver.d.ts +112 -0
  48. package/dist/runtime-v2/internalization/repair-replay-resolver.d.ts.map +1 -0
  49. package/dist/runtime-v2/internalization/repair-replay-resolver.js +332 -0
  50. package/dist/runtime-v2/internalization/repair-replay-resolver.js.map +1 -0
  51. package/dist/telemetry-event.d.ts +2 -2
  52. package/dist/telemetry-event.d.ts.map +1 -1
  53. package/dist/telemetry-event.js +14 -0
  54. package/dist/telemetry-event.js.map +1 -1
  55. package/package.json +1 -1
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Repair Replay Resolver — PRI-634 PR-A (SPEC Slice B, §23–§30).
3
+ *
4
+ * Resolves the deterministic replay evidence a repair round needs, BY
5
+ * REFERENCE, from the one durable authority: the source Evaluator artifact's
6
+ * runtime-owned `adversarialResult`. The resolved RepairReplayContext exists
7
+ * only in prompt context — it is never persisted, never a second fact store,
8
+ * and RepairPayload stays a bounded control payload.
9
+ *
10
+ * Pipeline:
11
+ * RepairPayload.sourceEvaluatorTaskId
12
+ * → evaluator task's durable completionIntent.sourceRunId (deterministic
13
+ * artifact identity: pi-art-<taskId>-<runId>)
14
+ * → PiArtifactStore.getArtifactById (fallback: listBySourceTaskId when
15
+ * the intent is absent — exactly-one rule, otherwise fail loud)
16
+ * → runtime-validate contentJson.adversarialResult (rc-1/rc-4)
17
+ * → normalize legacy actualDecision=<errorType> representation (SPEC §21)
18
+ * → partition trace failures / system failures / global violations
19
+ * → bounded deterministic stratified selection (SPEC §30)
20
+ *
21
+ * Trust boundary: artifact contentJson is durable-but-untrusted at read time.
22
+ * Every field access uses Object.hasOwn (rc-5) and typeof/Array.isArray
23
+ * guards (rc-4) — no `as` casts. Missing or ambiguous evidence fails loud
24
+ * with a structured reason (rc-3/rc-9) so the caller can refuse a blind
25
+ * repair retry (SPEC §27).
26
+ */
27
+ import type { TaskRecord } from '../task-status.js';
28
+ import type { PIArtifactStore } from './pi-artifact.js';
29
+ /**
30
+ * Repair-prompt budget cap for replay evidence (SPEC §29): at most this many
31
+ * failure entries enter the Artificer repair prompt. 16 entries × ~30 tokens
32
+ * stays comfortably inside the existing prompt budget.
33
+ */
34
+ export declare const MAX_REPLAY_FAILURES_IN_REPAIR = 16;
35
+ export interface ReplayFailureEvidence {
36
+ readonly caseId: string;
37
+ readonly attackType?: string;
38
+ readonly expectedDecision?: string;
39
+ /** Real decision the rule returned; absent for timeout/throw failures. */
40
+ readonly actualDecision?: string;
41
+ readonly errorType: string;
42
+ readonly message?: string;
43
+ }
44
+ export interface RepairReplayContext {
45
+ readonly sourceEvaluatorTaskId: string;
46
+ readonly sourceEvaluatorArtifactId: string;
47
+ /** True — the presence of a runtime-owned adversarialResult means replay ran. */
48
+ readonly ran: boolean;
49
+ readonly passed: boolean;
50
+ /** Total durable failures (pre-selection). */
51
+ readonly failedCaseCount: number;
52
+ /** Selected trace-case failures (bounded, mismatch-first stratified). */
53
+ readonly traceFailures: readonly ReplayFailureEvidence[];
54
+ /** Selected system-sentinel failures (bounded; excludes forbidden patterns). */
55
+ readonly systemFailures: readonly ReplayFailureEvidence[];
56
+ /** Selected forbidden-pattern violations (bounded, shared budget). */
57
+ readonly globalViolations: readonly string[];
58
+ /** Total durable forbidden-pattern violations (pre-selection). */
59
+ readonly globalViolationCount: number;
60
+ /** True when bounded selection omitted any durable failure or violation. */
61
+ readonly truncated: boolean;
62
+ }
63
+ export type RepairReplayResolutionFailureReason = 'task_missing' | 'artifact_missing' | 'artifact_ambiguous' | 'adversarial_result_missing' | 'adversarial_result_invalid';
64
+ export type RepairReplayResolution = {
65
+ readonly ok: true;
66
+ readonly context: RepairReplayContext;
67
+ } | {
68
+ readonly ok: false;
69
+ readonly reason: RepairReplayResolutionFailureReason;
70
+ readonly detail: string;
71
+ };
72
+ export interface RepairReplayResolverDeps {
73
+ readonly artifactStore: Pick<PIArtifactStore, 'getArtifactById' | 'listBySourceTaskId'>;
74
+ readonly getTask: (taskId: string) => Promise<TaskRecord | null>;
75
+ }
76
+ /**
77
+ * Bounded deterministic stratified selection (SPEC §30 as tightened by review
78
+ * 2026-09-02). Trace failures, system failures, and global violations share
79
+ * ONE capacity budget — no evidence class can bypass the prompt bound:
80
+ *
81
+ * 1. system failure representatives (stable order);
82
+ * 2. one global-violation representative for the whole violation group;
83
+ * 3. true decision mismatches FIRST by expected axis — at least one
84
+ * expected=allow, one expected=block, one expected=propose_correction
85
+ * representative each (when present) — so low-value runtime failures can
86
+ * never evict every behavioral mismatch from the prompt;
87
+ * 4. remaining errorType × expectedDecision group representatives
88
+ * (stable first-occurrence order, mismatch-preferring);
89
+ * 5. stable-order fill over trace → system → remaining violations;
90
+ * 6. truncated=true when anything was omitted.
91
+ */
92
+ export declare function selectBoundedReplayFailures(params: {
93
+ traceFailures: readonly ReplayFailureEvidence[];
94
+ systemFailures: readonly ReplayFailureEvidence[];
95
+ globalViolations: readonly string[];
96
+ capacity: number;
97
+ }): {
98
+ readonly selectedTrace: readonly ReplayFailureEvidence[];
99
+ readonly selectedSystem: readonly ReplayFailureEvidence[];
100
+ readonly selectedGlobalViolations: readonly string[];
101
+ readonly truncated: boolean;
102
+ };
103
+ /**
104
+ * Resolve the bounded, normalized replay-evidence context for a repair round.
105
+ * Pure read + transform: no writes, no telemetry side effects — callers own
106
+ * observability.
107
+ */
108
+ export declare function resolveRepairReplayContext(params: {
109
+ readonly sourceEvaluatorTaskId: string;
110
+ readonly deps: RepairReplayResolverDeps;
111
+ }): Promise<RepairReplayResolution>;
112
+ //# sourceMappingURL=repair-replay-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair-replay-resolver.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/repair-replay-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAyBxD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,KAAK,CAA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E,KAAK,CAAC;IACnB,QAAQ,CAAC,MAAM,EAAE,mCAAmC,CAAC;IACrD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEJ,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,eAAe,EAAE,iBAAiB,GAAG,oBAAoB,CAAC,CAAC;IACxF,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;CAClE;AAwED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE;IAClD,aAAa,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAChD,cAAc,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACjD,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG;IACF,QAAQ,CAAC,aAAa,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACzD,QAAQ,CAAC,cAAc,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC1D,QAAQ,CAAC,wBAAwB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B,CA2EA;AAiED;;;;GAIG;AACH,wBAAsB,0BAA0B,CAAC,MAAM,EAAE;IACvD,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;CACzC,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAmFlC"}
@@ -0,0 +1,332 @@
1
+ import { hydratePITaskRecord } from './pitask-metadata.js';
2
+ /** Sandbox error enums that legacy artifacts stored inside actualDecision. */
3
+ const LEGACY_SANDBOX_ERROR_TYPES = new Set([
4
+ 'forbidden_pattern',
5
+ 'syntax_error',
6
+ 'runtime_error',
7
+ 'timeout',
8
+ 'validation_failed',
9
+ 'unknown',
10
+ ]);
11
+ /** Real decisions a rule can return — never valid errorType values. */
12
+ const RULEHOST_DECISIONS = new Set([
13
+ 'allow',
14
+ 'block',
15
+ 'requireApproval',
16
+ 'auto_correct',
17
+ ]);
18
+ /** System sentinel prefix/suffix convention (SPEC §17): `__name__`. */
19
+ function isSystemSentinelCaseId(caseId) {
20
+ return caseId.startsWith('__') && caseId.endsWith('__') && caseId.length > 4;
21
+ }
22
+ /**
23
+ * Repair-prompt budget cap for replay evidence (SPEC §29): at most this many
24
+ * failure entries enter the Artificer repair prompt. 16 entries × ~30 tokens
25
+ * stays comfortably inside the existing prompt budget.
26
+ */
27
+ export const MAX_REPLAY_FAILURES_IN_REPAIR = 16;
28
+ function isRecord(value) {
29
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
30
+ }
31
+ function optionalNonEmptyString(value) {
32
+ return typeof value === 'string' && value.trim() !== '' ? value : undefined;
33
+ }
34
+ /**
35
+ * Normalize one durable failed-case entry (rc-4: element-level validation).
36
+ *
37
+ * Legacy representation (pre PR-A): `actualDecision` carries a sandbox error
38
+ * enum and no `errorType` exists → errorType moves over, actualDecision is
39
+ * dropped (SPEC §21 — readers normalize, no migration).
40
+ *
41
+ * Current representation: `errorType` is authoritative; `actualDecision`
42
+ * appears only when a real decision mismatched and must not be an error enum.
43
+ * Entries that fail structural validation are invalid — the caller fails
44
+ * loud rather than silently dropping evidence (rc-3).
45
+ */
46
+ /** Repair-prompt budget cap for a single failure message (SPEC §23). */
47
+ const MAX_EVIDENCE_MESSAGE_LENGTH = 300;
48
+ function boundMessage(message) {
49
+ return message.length > MAX_EVIDENCE_MESSAGE_LENGTH
50
+ ? `${message.slice(0, MAX_EVIDENCE_MESSAGE_LENGTH)}…`
51
+ : message;
52
+ }
53
+ function normalizeFailedCaseEntry(entry) {
54
+ if (!isRecord(entry))
55
+ return null;
56
+ const caseId = optionalNonEmptyString(entry.caseId);
57
+ if (caseId === undefined)
58
+ return null;
59
+ const rawErrorType = optionalNonEmptyString(entry.errorType);
60
+ const rawActual = optionalNonEmptyString(entry.actualDecision);
61
+ let errorType = rawErrorType;
62
+ let actualDecision = rawActual;
63
+ if (errorType === undefined && rawActual !== undefined) {
64
+ if (LEGACY_SANDBOX_ERROR_TYPES.has(rawActual)) {
65
+ // Legacy drift: actualDecision held the error classification.
66
+ errorType = rawActual;
67
+ actualDecision = undefined;
68
+ }
69
+ else if (RULEHOST_DECISIONS.has(rawActual)) {
70
+ // Legacy decision-mismatch entry: the mismatch was a validation failure.
71
+ errorType = 'validation_failed';
72
+ }
73
+ else {
74
+ errorType = 'unknown';
75
+ }
76
+ }
77
+ if (errorType === undefined)
78
+ errorType = 'unknown';
79
+ // Defense-in-depth on current-shape entries: an errorType value inside
80
+ // actualDecision is always reclassification drift, never a real decision.
81
+ if (actualDecision !== undefined && LEGACY_SANDBOX_ERROR_TYPES.has(actualDecision)) {
82
+ actualDecision = undefined;
83
+ }
84
+ const rationale = optionalNonEmptyString(entry.rationale);
85
+ const message = optionalNonEmptyString(entry.message) ?? rationale;
86
+ return {
87
+ caseId,
88
+ attackType: optionalNonEmptyString(entry.attackType),
89
+ expectedDecision: optionalNonEmptyString(entry.expectedDecision),
90
+ ...(actualDecision !== undefined ? { actualDecision } : {}),
91
+ errorType,
92
+ ...(message !== undefined ? { message: boundMessage(message) } : {}),
93
+ };
94
+ }
95
+ /**
96
+ * Bounded deterministic stratified selection (SPEC §30 as tightened by review
97
+ * 2026-09-02). Trace failures, system failures, and global violations share
98
+ * ONE capacity budget — no evidence class can bypass the prompt bound:
99
+ *
100
+ * 1. system failure representatives (stable order);
101
+ * 2. one global-violation representative for the whole violation group;
102
+ * 3. true decision mismatches FIRST by expected axis — at least one
103
+ * expected=allow, one expected=block, one expected=propose_correction
104
+ * representative each (when present) — so low-value runtime failures can
105
+ * never evict every behavioral mismatch from the prompt;
106
+ * 4. remaining errorType × expectedDecision group representatives
107
+ * (stable first-occurrence order, mismatch-preferring);
108
+ * 5. stable-order fill over trace → system → remaining violations;
109
+ * 6. truncated=true when anything was omitted.
110
+ */
111
+ export function selectBoundedReplayFailures(params) {
112
+ const capacity = Math.max(0, params.capacity);
113
+ let remaining = capacity;
114
+ const chosenFailures = new Set();
115
+ const chosenViolations = new Set();
116
+ // Selected failures are recorded in SELECTION PRIORITY order so the repair
117
+ // prompt renders behavioral mismatches before raw structural errors.
118
+ const traceIdentity = new Set(params.traceFailures);
119
+ const orderedSelected = [];
120
+ const takeFailure = (failure) => {
121
+ if (remaining <= 0 || chosenFailures.has(failure))
122
+ return;
123
+ chosenFailures.add(failure);
124
+ orderedSelected.push(failure);
125
+ remaining -= 1;
126
+ };
127
+ const takeViolation = (violation) => {
128
+ if (remaining <= 0 || chosenViolations.has(violation))
129
+ return;
130
+ chosenViolations.add(violation);
131
+ remaining -= 1;
132
+ };
133
+ // 1. system representatives first.
134
+ for (const systemFailure of params.systemFailures) {
135
+ if (remaining <= 0)
136
+ break;
137
+ takeFailure(systemFailure);
138
+ }
139
+ // 2. one global-violation representative.
140
+ const [firstViolation] = params.globalViolations;
141
+ if (firstViolation !== undefined)
142
+ takeViolation(firstViolation);
143
+ // 3. decision mismatches by expected axis (canonical decision order).
144
+ const mismatchByExpected = new Map();
145
+ for (const failure of params.traceFailures) {
146
+ if (failure.actualDecision === undefined)
147
+ continue;
148
+ const key = failure.expectedDecision ?? 'unknown';
149
+ if (!mismatchByExpected.has(key))
150
+ mismatchByExpected.set(key, failure);
151
+ }
152
+ for (const expectedKey of ['allow', 'block', 'propose_correction']) {
153
+ if (remaining <= 0)
154
+ break;
155
+ const representative = mismatchByExpected.get(expectedKey);
156
+ if (representative !== undefined)
157
+ takeFailure(representative);
158
+ }
159
+ // 4. remaining group representatives (mismatch-preferring, stable order).
160
+ const groups = new Map();
161
+ for (const failure of params.traceFailures) {
162
+ const key = `${failure.errorType}×${failure.expectedDecision ?? 'unknown'}`;
163
+ const existing = groups.get(key);
164
+ if (existing === undefined || (existing.actualDecision === undefined && failure.actualDecision !== undefined)) {
165
+ groups.set(key, failure);
166
+ }
167
+ }
168
+ for (const representative of groups.values()) {
169
+ if (remaining <= 0)
170
+ break;
171
+ takeFailure(representative);
172
+ }
173
+ // 5. stable-order fill: trace → system → remaining violations.
174
+ for (const failure of [...params.traceFailures, ...params.systemFailures]) {
175
+ if (remaining <= 0)
176
+ break;
177
+ takeFailure(failure);
178
+ }
179
+ for (const violation of params.globalViolations) {
180
+ if (remaining <= 0)
181
+ break;
182
+ takeViolation(violation);
183
+ }
184
+ const total = params.traceFailures.length + params.systemFailures.length + params.globalViolations.length;
185
+ const selectedCount = chosenFailures.size + chosenViolations.size;
186
+ return {
187
+ selectedTrace: orderedSelected.filter((f) => traceIdentity.has(f)),
188
+ selectedSystem: orderedSelected.filter((f) => !traceIdentity.has(f)),
189
+ selectedGlobalViolations: params.globalViolations.filter((v) => chosenViolations.has(v)),
190
+ truncated: selectedCount < total,
191
+ };
192
+ }
193
+ /**
194
+ * Resolve the authoritative Evaluator artifact for a repair round.
195
+ *
196
+ * Selection authority (SPEC §26, tightened by review 2026-09-02): the
197
+ * evaluator task's durable completionIntent records the exact run that
198
+ * produced the verdict, and the artifact ID is deterministically
199
+ * `pi-art-<taskId>-<runId>`. When the intent exists, that artifact IS the
200
+ * authority — if it is missing we FAIL LOUD; another run's artifact may never
201
+ * become a fallback authority. Only when no intent exists (legacy tasks) does
202
+ * the exactly-one list rule apply: zero or many → fail loud, never a
203
+ * positional pick.
204
+ */
205
+ async function resolveAuthoritativeEvaluatorArtifact(sourceEvaluatorTaskId, deps) {
206
+ const task = await deps.getTask(sourceEvaluatorTaskId);
207
+ if (!task) {
208
+ return { ok: false, reason: 'task_missing', detail: `evaluator task ${sourceEvaluatorTaskId} not found` };
209
+ }
210
+ const piTask = hydratePITaskRecord(task);
211
+ const intentRunId = piTask?.completionIntent?.sourceRunId;
212
+ if (typeof intentRunId === 'string' && intentRunId.trim() !== '') {
213
+ const artifactId = `pi-art-${sourceEvaluatorTaskId}-${intentRunId}`;
214
+ const artifact = await deps.artifactStore.getArtifactById(artifactId);
215
+ if (artifact) {
216
+ return { ok: true, artifactId: artifact.artifactId, contentJson: artifact.contentJson };
217
+ }
218
+ // The durable authority is KNOWN — a different run's artifact must never
219
+ // be silently promoted into its place (P1 review 2026-09-02).
220
+ return {
221
+ ok: false,
222
+ reason: 'artifact_missing',
223
+ detail: `completionIntent names run ${intentRunId} as authoritative but artifact ${artifactId} does not exist — refusing cross-run fallback`,
224
+ };
225
+ }
226
+ const artifacts = (await deps.artifactStore.listBySourceTaskId(sourceEvaluatorTaskId))
227
+ .filter((a) => a.artifactKind === 'principle');
228
+ if (artifacts.length === 0) {
229
+ return {
230
+ ok: false,
231
+ reason: 'artifact_missing',
232
+ detail: `no principle artifact for evaluator task ${sourceEvaluatorTaskId}`,
233
+ };
234
+ }
235
+ if (artifacts.length > 1) {
236
+ return {
237
+ ok: false,
238
+ reason: 'artifact_ambiguous',
239
+ detail: `evaluator task ${sourceEvaluatorTaskId} has ${artifacts.length} principle artifacts and no resolvable completion intent — authority is ambiguous: ${artifacts.map((a) => a.artifactId).sort().join(', ')}`,
240
+ };
241
+ }
242
+ const [only] = artifacts;
243
+ if (!only) {
244
+ return { ok: false, reason: 'artifact_missing', detail: `no principle artifact for evaluator task ${sourceEvaluatorTaskId}` };
245
+ }
246
+ return { ok: true, artifactId: only.artifactId, contentJson: only.contentJson };
247
+ }
248
+ /**
249
+ * Resolve the bounded, normalized replay-evidence context for a repair round.
250
+ * Pure read + transform: no writes, no telemetry side effects — callers own
251
+ * observability.
252
+ */
253
+ export async function resolveRepairReplayContext(params) {
254
+ const { sourceEvaluatorTaskId, deps } = params;
255
+ const artifactResolution = await resolveAuthoritativeEvaluatorArtifact(sourceEvaluatorTaskId, deps);
256
+ if (!artifactResolution.ok) {
257
+ return artifactResolution;
258
+ }
259
+ const { artifactId, contentJson } = artifactResolution;
260
+ let parsed;
261
+ try {
262
+ parsed = JSON.parse(contentJson);
263
+ }
264
+ catch {
265
+ return { ok: false, reason: 'adversarial_result_invalid', detail: `evaluator artifact ${artifactId} contentJson is unparseable` };
266
+ }
267
+ if (!isRecord(parsed) || !Object.hasOwn(parsed, 'adversarialResult')) {
268
+ return { ok: false, reason: 'adversarial_result_missing', detail: `evaluator artifact ${artifactId} carries no adversarialResult` };
269
+ }
270
+ const { adversarialResult } = parsed;
271
+ if (!isRecord(adversarialResult) || typeof adversarialResult.passed !== 'boolean') {
272
+ return { ok: false, reason: 'adversarial_result_invalid', detail: `evaluator artifact ${artifactId} adversarialResult is malformed (passed must be a boolean)` };
273
+ }
274
+ if (!Object.hasOwn(adversarialResult, 'failedCases') || !Array.isArray(adversarialResult.failedCases)) {
275
+ return { ok: false, reason: 'adversarial_result_invalid', detail: `evaluator artifact ${artifactId} adversarialResult.failedCases is missing or not an array` };
276
+ }
277
+ // rc-4: validate every element; any structurally invalid entry fails loud —
278
+ // dropping evidence silently would re-create the blind-retry hole.
279
+ const normalized = [];
280
+ for (const [index, entry] of adversarialResult.failedCases.entries()) {
281
+ const normalizedEntry = normalizeFailedCaseEntry(entry);
282
+ if (normalizedEntry === null) {
283
+ return {
284
+ ok: false,
285
+ reason: 'adversarial_result_invalid',
286
+ detail: `evaluator artifact ${artifactId} adversarialResult.failedCases[${index}] is structurally invalid`,
287
+ };
288
+ }
289
+ normalized.push(normalizedEntry);
290
+ }
291
+ // Partition by identity (SPEC §17/§18): real trace IDs vs system sentinels
292
+ // vs code-level global violations. Forbidden-pattern entries are counted
293
+ // ONLY as global violations — never also as system failures (review P2
294
+ // 2026-09-02: no double-count in the prompt) — and share the bounded
295
+ // selection budget with everything else.
296
+ const traceFailures = [];
297
+ const systemFailures = [];
298
+ const globalViolations = [];
299
+ for (const failure of normalized) {
300
+ if (failure.caseId === '__forbidden_pattern__') {
301
+ globalViolations.push(failure.message ?? `forbidden pattern (${failure.errorType})`);
302
+ continue;
303
+ }
304
+ if (isSystemSentinelCaseId(failure.caseId)) {
305
+ systemFailures.push(failure);
306
+ continue;
307
+ }
308
+ traceFailures.push(failure);
309
+ }
310
+ const selection = selectBoundedReplayFailures({
311
+ traceFailures,
312
+ systemFailures,
313
+ globalViolations,
314
+ capacity: MAX_REPLAY_FAILURES_IN_REPAIR,
315
+ });
316
+ return {
317
+ ok: true,
318
+ context: {
319
+ sourceEvaluatorTaskId,
320
+ sourceEvaluatorArtifactId: artifactId,
321
+ ran: true,
322
+ passed: adversarialResult.passed,
323
+ failedCaseCount: normalized.length,
324
+ traceFailures: selection.selectedTrace,
325
+ systemFailures: selection.selectedSystem,
326
+ globalViolations: selection.selectedGlobalViolations,
327
+ globalViolationCount: globalViolations.length,
328
+ truncated: selection.truncated,
329
+ },
330
+ };
331
+ }
332
+ //# sourceMappingURL=repair-replay-resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair-replay-resolver.js","sourceRoot":"","sources":["../../../src/runtime-v2/internalization/repair-replay-resolver.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG3D,8EAA8E;AAC9E,MAAM,0BAA0B,GAAwB,IAAI,GAAG,CAAC;IAC9D,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,SAAS;IACT,mBAAmB;IACnB,SAAS;CACV,CAAC,CAAC;AAEH,uEAAuE;AACvE,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC;IACtD,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,cAAc;CACf,CAAC,CAAC;AAEH,uEAAuE;AACvE,SAAS,sBAAsB,CAAC,MAAc;IAC5C,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AAC/E,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAoDhD,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAA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A4B,EAAE,CAAC;IACnD,MAAM,gBAAgB,GAAa,EAAE,CAAC;IACtC,KAAK,MAAM,OAAO,IAAI,UAAU,EAAE,CAAC;QACjC,IAAI,OAAO,CAAC,MAAM,KAAK,uBAAuB,EAAE,CAAC;YAC/C,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,sBAAsB,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC;YACrF,SAAS;QACX,CAAC;QACD,IAAI,sBAAsB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3C,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC7B,SAAS;QACX,CAAC;QACD,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,SAAS,GAAG,2BAA2B,CAAC;QAC5C,aAAa;QACb,cAAc;QACd,gBAAgB;QAChB,QAAQ,EAAE,6BAA6B;KACxC,CAAC,CAAC;IAEH,OAAO;QACL,EAAE,EAAE,IAAI;QACR,OAAO,EAAE;YACP,qBAAqB;YACrB,yBAAyB,EAAE,UAAU;YACrC,GAAG,EAAE,IAAI;YACT,MAAM,EAAE,iBAAiB,CAAC,MAAM;YAChC,eAAe,EAAE,UAAU,CAAC,MAAM;YAClC,aAAa,EAAE,SAAS,CAAC,aAAa;YACtC,cAAc,EAAE,SAAS,CAAC,cAAc;YACxC,gBAAgB,EAAE,SAAS,CAAC,wBAAwB;YACpD,oBAAoB,EAAE,gBAAgB,CAAC,MAAM;YAC7C,SAAS,EAAE,SAAS,CAAC,SAAS;SAC/B;KACF,CAAC;AACJ,CAAC"}
@@ -56,7 +56,7 @@ import { type Static } from '@sinclair/typebox';
56
56
  * - output_schema_invalid — PRI-200 schema validation failed (before repair)
57
57
  * - output_repair_exhausted — PRI-200 repair loop exhausted, output still invalid
58
58
  */
59
- export declare const TelemetryEventType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"pain_detected">, import("@sinclair/typebox").TLiteral<"principle_candidate_created">, import("@sinclair/typebox").TLiteral<"principle_promoted">, import("@sinclair/typebox").TLiteral<"lease_acquired">, import("@sinclair/typebox").TLiteral<"lease_released">, import("@sinclair/typebox").TLiteral<"lease_renewed">, import("@sinclair/typebox").TLiteral<"lease_expired">, import("@sinclair/typebox").TLiteral<"task_retried">, import("@sinclair/typebox").TLiteral<"task_failed">, import("@sinclair/typebox").TLiteral<"task_succeeded">, import("@sinclair/typebox").TLiteral<"run_started">, import("@sinclair/typebox").TLiteral<"run_completed">, import("@sinclair/typebox").TLiteral<"degradation_triggered">, import("@sinclair/typebox").TLiteral<"diagnostician_task_leased">, import("@sinclair/typebox").TLiteral<"diagnostician_context_built">, import("@sinclair/typebox").TLiteral<"diagnostician_run_started">, import("@sinclair/typebox").TLiteral<"diagnostician_run_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_output_invalid">, import("@sinclair/typebox").TLiteral<"diagnostician_task_succeeded">, import("@sinclair/typebox").TLiteral<"diagnostician_task_retried">, import("@sinclair/typebox").TLiteral<"diagnostician_task_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"diag_router_invariant_override">, import("@sinclair/typebox").TLiteral<"diagnostician_core_grounding_result">, import("@sinclair/typebox").TLiteral<"diagnostician_artifact_committed">, import("@sinclair/typebox").TLiteral<"diagnostician_artifact_commit_failed">, import("@sinclair/typebox").TLiteral<"principle_candidate_registered">, import("@sinclair/typebox").TLiteral<"runtime_adapter_selected">, import("@sinclair/typebox").TLiteral<"runtime_invocation_started">, import("@sinclair/typebox").TLiteral<"runtime_invocation_succeeded">, import("@sinclair/typebox").TLiteral<"runtime_invocation_failed">, import("@sinclair/typebox").TLiteral<"output_validation_succeeded">, import("@sinclair/typebox").TLiteral<"output_validation_failed">, import("@sinclair/typebox").TLiteral<"output_repair_attempted">, import("@sinclair/typebox").TLiteral<"output_extraction_failed">, import("@sinclair/typebox").TLiteral<"output_schema_invalid">, import("@sinclair/typebox").TLiteral<"output_repair_exhausted">, import("@sinclair/typebox").TLiteral<"output_path_chosen">, import("@sinclair/typebox").TLiteral<"output_path_fallback">, import("@sinclair/typebox").TLiteral<"dreamer_task_leased">, import("@sinclair/typebox").TLiteral<"dreamer_context_built">, import("@sinclair/typebox").TLiteral<"dreamer_run_started">, import("@sinclair/typebox").TLiteral<"dreamer_run_failed">, import("@sinclair/typebox").TLiteral<"dreamer_output_invalid">, import("@sinclair/typebox").TLiteral<"dreamer_output_validated">, import("@sinclair/typebox").TLiteral<"dreamer_task_succeeded">, import("@sinclair/typebox").TLiteral<"dreamer_task_retried">, import("@sinclair/typebox").TLiteral<"dreamer_task_failed">, import("@sinclair/typebox").TLiteral<"dreamer_candidate_generated">, import("@sinclair/typebox").TLiteral<"dreamer_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"dreamer_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"dreamer_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"dreamer_update_output_failed">, import("@sinclair/typebox").TLiteral<"dreamer_context_partial">, import("@sinclair/typebox").TLiteral<"dreamer_mark_failed_error">, import("@sinclair/typebox").TLiteral<"dreamer_mark_retry_error">, import("@sinclair/typebox").TLiteral<"philosopher_task_leased">, import("@sinclair/typebox").TLiteral<"philosopher_context_built">, import("@sinclair/typebox").TLiteral<"philosopher_run_started">, import("@sinclair/typebox").TLiteral<"philosopher_run_failed">, import("@sinclair/typebox").TLiteral<"philosopher_output_invalid">, import("@sinclair/typebox").TLiteral<"philosopher_output_validated">, import("@sinclair/typebox").TLiteral<"philosopher_task_succeeded">, import("@sinclair/typebox").TLiteral<"philosopher_task_retried">, import("@sinclair/typebox").TLiteral<"philosopher_task_failed">, import("@sinclair/typebox").TLiteral<"philosopher_principle_candidate_generated">, import("@sinclair/typebox").TLiteral<"philosopher_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"philosopher_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"philosopher_update_output_failed">, import("@sinclair/typebox").TLiteral<"philosopher_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"philosopher_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"philosopher_lineage_partial">, import("@sinclair/typebox").TLiteral<"philosopher_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"philosopher_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"philosopher_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"philosopher_mark_failed_error">, import("@sinclair/typebox").TLiteral<"philosopher_mark_retry_error">, import("@sinclair/typebox").TLiteral<"artificer_task_leased">, import("@sinclair/typebox").TLiteral<"artificer_context_built">, import("@sinclair/typebox").TLiteral<"artificer_run_started">, import("@sinclair/typebox").TLiteral<"artificer_run_failed">, import("@sinclair/typebox").TLiteral<"artificer_output_invalid">, import("@sinclair/typebox").TLiteral<"artificer_output_validated">, import("@sinclair/typebox").TLiteral<"artificer_task_succeeded">, import("@sinclair/typebox").TLiteral<"artificer_task_retried">, import("@sinclair/typebox").TLiteral<"artificer_task_failed">, import("@sinclair/typebox").TLiteral<"artificer_implementation_plan_generated">, import("@sinclair/typebox").TLiteral<"artificer_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"artificer_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"artificer_update_output_failed">, import("@sinclair/typebox").TLiteral<"artificer_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"artificer_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"artificer_lineage_partial">, import("@sinclair/typebox").TLiteral<"artificer_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"artificer_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"artificer_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"artificer_mark_failed_error">, import("@sinclair/typebox").TLiteral<"artificer_mark_retry_error">, import("@sinclair/typebox").TLiteral<"evaluator_task_leased">, import("@sinclair/typebox").TLiteral<"evaluator_context_built">, import("@sinclair/typebox").TLiteral<"evaluator_run_started">, import("@sinclair/typebox").TLiteral<"evaluator_run_failed">, import("@sinclair/typebox").TLiteral<"evaluator_output_invalid">, import("@sinclair/typebox").TLiteral<"evaluator_output_validated">, import("@sinclair/typebox").TLiteral<"evaluator_task_succeeded">, import("@sinclair/typebox").TLiteral<"evaluator_task_retried">, import("@sinclair/typebox").TLiteral<"evaluator_task_failed">, import("@sinclair/typebox").TLiteral<"evaluator_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"evaluator_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"evaluator_update_output_failed">, import("@sinclair/typebox").TLiteral<"evaluator_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"evaluator_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"evaluator_lineage_partial">, import("@sinclair/typebox").TLiteral<"evaluator_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"evaluator_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"evaluator_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"evaluator_mark_failed_error">, import("@sinclair/typebox").TLiteral<"evaluator_mark_retry_error">, import("@sinclair/typebox").TLiteral<"evaluator_decision_recorded">, import("@sinclair/typebox").TLiteral<"scribe_task_leased">, import("@sinclair/typebox").TLiteral<"scribe_context_built">, import("@sinclair/typebox").TLiteral<"scribe_run_started">, import("@sinclair/typebox").TLiteral<"scribe_run_failed">, import("@sinclair/typebox").TLiteral<"scribe_output_invalid">, import("@sinclair/typebox").TLiteral<"scribe_output_validated">, import("@sinclair/typebox").TLiteral<"scribe_task_succeeded">, import("@sinclair/typebox").TLiteral<"scribe_task_retried">, import("@sinclair/typebox").TLiteral<"scribe_task_failed">, import("@sinclair/typebox").TLiteral<"scribe_principle_draft_generated">, import("@sinclair/typebox").TLiteral<"scribe_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"scribe_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"scribe_update_output_failed">, import("@sinclair/typebox").TLiteral<"scribe_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"scribe_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"scribe_lineage_partial">, import("@sinclair/typebox").TLiteral<"scribe_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"scribe_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"scribe_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"scribe_mark_failed_error">, import("@sinclair/typebox").TLiteral<"scribe_mark_retry_error">, import("@sinclair/typebox").TLiteral<"dreamer_l2_turn">, import("@sinclair/typebox").TLiteral<"dreamer_l2_complete">, import("@sinclair/typebox").TLiteral<"dreamer_l2_fallback_to_l1">, import("@sinclair/typebox").TLiteral<"artificer_l2_attempt">, import("@sinclair/typebox").TLiteral<"artificer_l2_turn">, import("@sinclair/typebox").TLiteral<"artificer_l2_complete">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_skipped">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_diagnostic_passed">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_diagnostic_failed">, import("@sinclair/typebox").TLiteral<"evaluator_rule_assembled">, import("@sinclair/typebox").TLiteral<"evaluator_rule_assembly_failed">]>;
59
+ export declare const TelemetryEventType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"pain_detected">, import("@sinclair/typebox").TLiteral<"principle_candidate_created">, import("@sinclair/typebox").TLiteral<"principle_promoted">, import("@sinclair/typebox").TLiteral<"lease_acquired">, import("@sinclair/typebox").TLiteral<"lease_released">, import("@sinclair/typebox").TLiteral<"lease_renewed">, import("@sinclair/typebox").TLiteral<"lease_expired">, import("@sinclair/typebox").TLiteral<"task_retried">, import("@sinclair/typebox").TLiteral<"task_failed">, import("@sinclair/typebox").TLiteral<"task_succeeded">, import("@sinclair/typebox").TLiteral<"run_started">, import("@sinclair/typebox").TLiteral<"run_completed">, import("@sinclair/typebox").TLiteral<"degradation_triggered">, import("@sinclair/typebox").TLiteral<"diagnostician_task_leased">, import("@sinclair/typebox").TLiteral<"diagnostician_context_built">, import("@sinclair/typebox").TLiteral<"diagnostician_run_started">, import("@sinclair/typebox").TLiteral<"diagnostician_run_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_output_invalid">, import("@sinclair/typebox").TLiteral<"diagnostician_task_succeeded">, import("@sinclair/typebox").TLiteral<"diagnostician_task_retried">, import("@sinclair/typebox").TLiteral<"diagnostician_task_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"diag_router_invariant_override">, import("@sinclair/typebox").TLiteral<"diagnostician_core_grounding_result">, import("@sinclair/typebox").TLiteral<"diagnostician_artifact_committed">, import("@sinclair/typebox").TLiteral<"diagnostician_artifact_commit_failed">, import("@sinclair/typebox").TLiteral<"principle_candidate_registered">, import("@sinclair/typebox").TLiteral<"runtime_adapter_selected">, import("@sinclair/typebox").TLiteral<"runtime_invocation_started">, import("@sinclair/typebox").TLiteral<"runtime_invocation_succeeded">, import("@sinclair/typebox").TLiteral<"runtime_invocation_failed">, import("@sinclair/typebox").TLiteral<"output_validation_succeeded">, import("@sinclair/typebox").TLiteral<"output_validation_failed">, import("@sinclair/typebox").TLiteral<"output_repair_attempted">, import("@sinclair/typebox").TLiteral<"output_extraction_failed">, import("@sinclair/typebox").TLiteral<"output_schema_invalid">, import("@sinclair/typebox").TLiteral<"output_repair_exhausted">, import("@sinclair/typebox").TLiteral<"output_path_chosen">, import("@sinclair/typebox").TLiteral<"output_path_fallback">, import("@sinclair/typebox").TLiteral<"dreamer_task_leased">, import("@sinclair/typebox").TLiteral<"dreamer_context_built">, import("@sinclair/typebox").TLiteral<"dreamer_run_started">, import("@sinclair/typebox").TLiteral<"dreamer_run_failed">, import("@sinclair/typebox").TLiteral<"dreamer_output_invalid">, import("@sinclair/typebox").TLiteral<"dreamer_output_validated">, import("@sinclair/typebox").TLiteral<"dreamer_task_succeeded">, import("@sinclair/typebox").TLiteral<"dreamer_task_retried">, import("@sinclair/typebox").TLiteral<"dreamer_task_failed">, import("@sinclair/typebox").TLiteral<"dreamer_candidate_generated">, import("@sinclair/typebox").TLiteral<"dreamer_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"dreamer_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"dreamer_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"dreamer_update_output_failed">, import("@sinclair/typebox").TLiteral<"dreamer_context_partial">, import("@sinclair/typebox").TLiteral<"dreamer_mark_failed_error">, import("@sinclair/typebox").TLiteral<"dreamer_mark_retry_error">, import("@sinclair/typebox").TLiteral<"philosopher_task_leased">, import("@sinclair/typebox").TLiteral<"philosopher_context_built">, import("@sinclair/typebox").TLiteral<"philosopher_run_started">, import("@sinclair/typebox").TLiteral<"philosopher_run_failed">, import("@sinclair/typebox").TLiteral<"philosopher_output_invalid">, import("@sinclair/typebox").TLiteral<"philosopher_output_validated">, import("@sinclair/typebox").TLiteral<"philosopher_task_succeeded">, import("@sinclair/typebox").TLiteral<"philosopher_task_retried">, import("@sinclair/typebox").TLiteral<"philosopher_task_failed">, import("@sinclair/typebox").TLiteral<"philosopher_principle_candidate_generated">, import("@sinclair/typebox").TLiteral<"philosopher_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"philosopher_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"philosopher_update_output_failed">, import("@sinclair/typebox").TLiteral<"philosopher_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"philosopher_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"philosopher_lineage_partial">, import("@sinclair/typebox").TLiteral<"philosopher_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"philosopher_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"philosopher_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"philosopher_mark_failed_error">, import("@sinclair/typebox").TLiteral<"philosopher_mark_retry_error">, import("@sinclair/typebox").TLiteral<"artificer_task_leased">, import("@sinclair/typebox").TLiteral<"artificer_context_built">, import("@sinclair/typebox").TLiteral<"artificer_run_started">, import("@sinclair/typebox").TLiteral<"artificer_run_failed">, import("@sinclair/typebox").TLiteral<"artificer_output_invalid">, import("@sinclair/typebox").TLiteral<"artificer_output_validated">, import("@sinclair/typebox").TLiteral<"artificer_task_succeeded">, import("@sinclair/typebox").TLiteral<"artificer_task_retried">, import("@sinclair/typebox").TLiteral<"artificer_task_failed">, import("@sinclair/typebox").TLiteral<"artificer_implementation_plan_generated">, import("@sinclair/typebox").TLiteral<"artificer_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"artificer_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"artificer_update_output_failed">, import("@sinclair/typebox").TLiteral<"artificer_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"artificer_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"artificer_lineage_partial">, import("@sinclair/typebox").TLiteral<"artificer_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"artificer_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"artificer_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"artificer_mark_failed_error">, import("@sinclair/typebox").TLiteral<"artificer_mark_retry_error">, import("@sinclair/typebox").TLiteral<"evaluator_task_leased">, import("@sinclair/typebox").TLiteral<"evaluator_context_built">, import("@sinclair/typebox").TLiteral<"evaluator_run_started">, import("@sinclair/typebox").TLiteral<"evaluator_run_failed">, import("@sinclair/typebox").TLiteral<"evaluator_output_invalid">, import("@sinclair/typebox").TLiteral<"evaluator_output_validated">, import("@sinclair/typebox").TLiteral<"evaluator_task_succeeded">, import("@sinclair/typebox").TLiteral<"evaluator_task_retried">, import("@sinclair/typebox").TLiteral<"evaluator_task_failed">, import("@sinclair/typebox").TLiteral<"evaluator_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"evaluator_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"evaluator_update_output_failed">, import("@sinclair/typebox").TLiteral<"evaluator_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"evaluator_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"evaluator_lineage_partial">, import("@sinclair/typebox").TLiteral<"evaluator_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"evaluator_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"evaluator_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"evaluator_mark_failed_error">, import("@sinclair/typebox").TLiteral<"evaluator_mark_retry_error">, import("@sinclair/typebox").TLiteral<"evaluator_decision_recorded">, import("@sinclair/typebox").TLiteral<"scribe_task_leased">, import("@sinclair/typebox").TLiteral<"scribe_context_built">, import("@sinclair/typebox").TLiteral<"scribe_run_started">, import("@sinclair/typebox").TLiteral<"scribe_run_failed">, import("@sinclair/typebox").TLiteral<"scribe_output_invalid">, import("@sinclair/typebox").TLiteral<"scribe_output_validated">, import("@sinclair/typebox").TLiteral<"scribe_task_succeeded">, import("@sinclair/typebox").TLiteral<"scribe_task_retried">, import("@sinclair/typebox").TLiteral<"scribe_task_failed">, import("@sinclair/typebox").TLiteral<"scribe_principle_draft_generated">, import("@sinclair/typebox").TLiteral<"scribe_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"scribe_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"scribe_update_output_failed">, import("@sinclair/typebox").TLiteral<"scribe_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"scribe_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"scribe_lineage_partial">, import("@sinclair/typebox").TLiteral<"scribe_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"scribe_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"scribe_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"scribe_mark_failed_error">, import("@sinclair/typebox").TLiteral<"scribe_mark_retry_error">, import("@sinclair/typebox").TLiteral<"dreamer_l2_turn">, import("@sinclair/typebox").TLiteral<"dreamer_l2_complete">, import("@sinclair/typebox").TLiteral<"dreamer_l2_fallback_to_l1">, import("@sinclair/typebox").TLiteral<"artificer_l2_attempt">, import("@sinclair/typebox").TLiteral<"artificer_l2_turn">, import("@sinclair/typebox").TLiteral<"artificer_l2_complete">, import("@sinclair/typebox").TLiteral<"artificer_repair_replay_evidence_resolved">, import("@sinclair/typebox").TLiteral<"artificer_repair_replay_evidence_unavailable">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_skipped">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_diagnostic_passed">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_diagnostic_failed">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_case_id_conflict">, import("@sinclair/typebox").TLiteral<"evaluator_rule_assembled">, import("@sinclair/typebox").TLiteral<"evaluator_rule_assembly_failed">]>;
60
60
  export type TelemetryEventType = Static<typeof TelemetryEventType>;
61
61
  /**
62
62
  * Schema for an in-process telemetry event.
@@ -72,7 +72,7 @@ export type TelemetryEventType = Static<typeof TelemetryEventType>;
72
72
  */
73
73
  export declare const TelemetryEventSchema: import("@sinclair/typebox").TObject<{
74
74
  /** Event type (one of the 3 core types) */
75
- eventType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"pain_detected">, import("@sinclair/typebox").TLiteral<"principle_candidate_created">, import("@sinclair/typebox").TLiteral<"principle_promoted">, import("@sinclair/typebox").TLiteral<"lease_acquired">, import("@sinclair/typebox").TLiteral<"lease_released">, import("@sinclair/typebox").TLiteral<"lease_renewed">, import("@sinclair/typebox").TLiteral<"lease_expired">, import("@sinclair/typebox").TLiteral<"task_retried">, import("@sinclair/typebox").TLiteral<"task_failed">, import("@sinclair/typebox").TLiteral<"task_succeeded">, import("@sinclair/typebox").TLiteral<"run_started">, import("@sinclair/typebox").TLiteral<"run_completed">, import("@sinclair/typebox").TLiteral<"degradation_triggered">, import("@sinclair/typebox").TLiteral<"diagnostician_task_leased">, import("@sinclair/typebox").TLiteral<"diagnostician_context_built">, import("@sinclair/typebox").TLiteral<"diagnostician_run_started">, import("@sinclair/typebox").TLiteral<"diagnostician_run_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_output_invalid">, import("@sinclair/typebox").TLiteral<"diagnostician_task_succeeded">, import("@sinclair/typebox").TLiteral<"diagnostician_task_retried">, import("@sinclair/typebox").TLiteral<"diagnostician_task_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"diag_router_invariant_override">, import("@sinclair/typebox").TLiteral<"diagnostician_core_grounding_result">, import("@sinclair/typebox").TLiteral<"diagnostician_artifact_committed">, import("@sinclair/typebox").TLiteral<"diagnostician_artifact_commit_failed">, import("@sinclair/typebox").TLiteral<"principle_candidate_registered">, import("@sinclair/typebox").TLiteral<"runtime_adapter_selected">, import("@sinclair/typebox").TLiteral<"runtime_invocation_started">, import("@sinclair/typebox").TLiteral<"runtime_invocation_succeeded">, import("@sinclair/typebox").TLiteral<"runtime_invocation_failed">, import("@sinclair/typebox").TLiteral<"output_validation_succeeded">, import("@sinclair/typebox").TLiteral<"output_validation_failed">, import("@sinclair/typebox").TLiteral<"output_repair_attempted">, import("@sinclair/typebox").TLiteral<"output_extraction_failed">, import("@sinclair/typebox").TLiteral<"output_schema_invalid">, import("@sinclair/typebox").TLiteral<"output_repair_exhausted">, import("@sinclair/typebox").TLiteral<"output_path_chosen">, import("@sinclair/typebox").TLiteral<"output_path_fallback">, import("@sinclair/typebox").TLiteral<"dreamer_task_leased">, import("@sinclair/typebox").TLiteral<"dreamer_context_built">, import("@sinclair/typebox").TLiteral<"dreamer_run_started">, import("@sinclair/typebox").TLiteral<"dreamer_run_failed">, import("@sinclair/typebox").TLiteral<"dreamer_output_invalid">, import("@sinclair/typebox").TLiteral<"dreamer_output_validated">, import("@sinclair/typebox").TLiteral<"dreamer_task_succeeded">, import("@sinclair/typebox").TLiteral<"dreamer_task_retried">, import("@sinclair/typebox").TLiteral<"dreamer_task_failed">, import("@sinclair/typebox").TLiteral<"dreamer_candidate_generated">, import("@sinclair/typebox").TLiteral<"dreamer_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"dreamer_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"dreamer_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"dreamer_update_output_failed">, import("@sinclair/typebox").TLiteral<"dreamer_context_partial">, import("@sinclair/typebox").TLiteral<"dreamer_mark_failed_error">, import("@sinclair/typebox").TLiteral<"dreamer_mark_retry_error">, import("@sinclair/typebox").TLiteral<"philosopher_task_leased">, import("@sinclair/typebox").TLiteral<"philosopher_context_built">, import("@sinclair/typebox").TLiteral<"philosopher_run_started">, import("@sinclair/typebox").TLiteral<"philosopher_run_failed">, import("@sinclair/typebox").TLiteral<"philosopher_output_invalid">, import("@sinclair/typebox").TLiteral<"philosopher_output_validated">, import("@sinclair/typebox").TLiteral<"philosopher_task_succeeded">, import("@sinclair/typebox").TLiteral<"philosopher_task_retried">, import("@sinclair/typebox").TLiteral<"philosopher_task_failed">, import("@sinclair/typebox").TLiteral<"philosopher_principle_candidate_generated">, import("@sinclair/typebox").TLiteral<"philosopher_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"philosopher_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"philosopher_update_output_failed">, import("@sinclair/typebox").TLiteral<"philosopher_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"philosopher_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"philosopher_lineage_partial">, import("@sinclair/typebox").TLiteral<"philosopher_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"philosopher_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"philosopher_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"philosopher_mark_failed_error">, import("@sinclair/typebox").TLiteral<"philosopher_mark_retry_error">, import("@sinclair/typebox").TLiteral<"artificer_task_leased">, import("@sinclair/typebox").TLiteral<"artificer_context_built">, import("@sinclair/typebox").TLiteral<"artificer_run_started">, import("@sinclair/typebox").TLiteral<"artificer_run_failed">, import("@sinclair/typebox").TLiteral<"artificer_output_invalid">, import("@sinclair/typebox").TLiteral<"artificer_output_validated">, import("@sinclair/typebox").TLiteral<"artificer_task_succeeded">, import("@sinclair/typebox").TLiteral<"artificer_task_retried">, import("@sinclair/typebox").TLiteral<"artificer_task_failed">, import("@sinclair/typebox").TLiteral<"artificer_implementation_plan_generated">, import("@sinclair/typebox").TLiteral<"artificer_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"artificer_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"artificer_update_output_failed">, import("@sinclair/typebox").TLiteral<"artificer_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"artificer_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"artificer_lineage_partial">, import("@sinclair/typebox").TLiteral<"artificer_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"artificer_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"artificer_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"artificer_mark_failed_error">, import("@sinclair/typebox").TLiteral<"artificer_mark_retry_error">, import("@sinclair/typebox").TLiteral<"evaluator_task_leased">, import("@sinclair/typebox").TLiteral<"evaluator_context_built">, import("@sinclair/typebox").TLiteral<"evaluator_run_started">, import("@sinclair/typebox").TLiteral<"evaluator_run_failed">, import("@sinclair/typebox").TLiteral<"evaluator_output_invalid">, import("@sinclair/typebox").TLiteral<"evaluator_output_validated">, import("@sinclair/typebox").TLiteral<"evaluator_task_succeeded">, import("@sinclair/typebox").TLiteral<"evaluator_task_retried">, import("@sinclair/typebox").TLiteral<"evaluator_task_failed">, import("@sinclair/typebox").TLiteral<"evaluator_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"evaluator_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"evaluator_update_output_failed">, import("@sinclair/typebox").TLiteral<"evaluator_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"evaluator_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"evaluator_lineage_partial">, import("@sinclair/typebox").TLiteral<"evaluator_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"evaluator_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"evaluator_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"evaluator_mark_failed_error">, import("@sinclair/typebox").TLiteral<"evaluator_mark_retry_error">, import("@sinclair/typebox").TLiteral<"evaluator_decision_recorded">, import("@sinclair/typebox").TLiteral<"scribe_task_leased">, import("@sinclair/typebox").TLiteral<"scribe_context_built">, import("@sinclair/typebox").TLiteral<"scribe_run_started">, import("@sinclair/typebox").TLiteral<"scribe_run_failed">, import("@sinclair/typebox").TLiteral<"scribe_output_invalid">, import("@sinclair/typebox").TLiteral<"scribe_output_validated">, import("@sinclair/typebox").TLiteral<"scribe_task_succeeded">, import("@sinclair/typebox").TLiteral<"scribe_task_retried">, import("@sinclair/typebox").TLiteral<"scribe_task_failed">, import("@sinclair/typebox").TLiteral<"scribe_principle_draft_generated">, import("@sinclair/typebox").TLiteral<"scribe_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"scribe_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"scribe_update_output_failed">, import("@sinclair/typebox").TLiteral<"scribe_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"scribe_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"scribe_lineage_partial">, import("@sinclair/typebox").TLiteral<"scribe_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"scribe_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"scribe_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"scribe_mark_failed_error">, import("@sinclair/typebox").TLiteral<"scribe_mark_retry_error">, import("@sinclair/typebox").TLiteral<"dreamer_l2_turn">, import("@sinclair/typebox").TLiteral<"dreamer_l2_complete">, import("@sinclair/typebox").TLiteral<"dreamer_l2_fallback_to_l1">, import("@sinclair/typebox").TLiteral<"artificer_l2_attempt">, import("@sinclair/typebox").TLiteral<"artificer_l2_turn">, import("@sinclair/typebox").TLiteral<"artificer_l2_complete">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_skipped">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_diagnostic_passed">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_diagnostic_failed">, import("@sinclair/typebox").TLiteral<"evaluator_rule_assembled">, import("@sinclair/typebox").TLiteral<"evaluator_rule_assembly_failed">]>;
75
+ eventType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"pain_detected">, import("@sinclair/typebox").TLiteral<"principle_candidate_created">, import("@sinclair/typebox").TLiteral<"principle_promoted">, import("@sinclair/typebox").TLiteral<"lease_acquired">, import("@sinclair/typebox").TLiteral<"lease_released">, import("@sinclair/typebox").TLiteral<"lease_renewed">, import("@sinclair/typebox").TLiteral<"lease_expired">, import("@sinclair/typebox").TLiteral<"task_retried">, import("@sinclair/typebox").TLiteral<"task_failed">, import("@sinclair/typebox").TLiteral<"task_succeeded">, import("@sinclair/typebox").TLiteral<"run_started">, import("@sinclair/typebox").TLiteral<"run_completed">, import("@sinclair/typebox").TLiteral<"degradation_triggered">, import("@sinclair/typebox").TLiteral<"diagnostician_task_leased">, import("@sinclair/typebox").TLiteral<"diagnostician_context_built">, import("@sinclair/typebox").TLiteral<"diagnostician_run_started">, import("@sinclair/typebox").TLiteral<"diagnostician_run_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_output_invalid">, import("@sinclair/typebox").TLiteral<"diagnostician_task_succeeded">, import("@sinclair/typebox").TLiteral<"diagnostician_task_retried">, import("@sinclair/typebox").TLiteral<"diagnostician_task_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"diagnostician_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"diag_router_invariant_override">, import("@sinclair/typebox").TLiteral<"diagnostician_core_grounding_result">, import("@sinclair/typebox").TLiteral<"diagnostician_artifact_committed">, import("@sinclair/typebox").TLiteral<"diagnostician_artifact_commit_failed">, import("@sinclair/typebox").TLiteral<"principle_candidate_registered">, import("@sinclair/typebox").TLiteral<"runtime_adapter_selected">, import("@sinclair/typebox").TLiteral<"runtime_invocation_started">, import("@sinclair/typebox").TLiteral<"runtime_invocation_succeeded">, import("@sinclair/typebox").TLiteral<"runtime_invocation_failed">, import("@sinclair/typebox").TLiteral<"output_validation_succeeded">, import("@sinclair/typebox").TLiteral<"output_validation_failed">, import("@sinclair/typebox").TLiteral<"output_repair_attempted">, import("@sinclair/typebox").TLiteral<"output_extraction_failed">, import("@sinclair/typebox").TLiteral<"output_schema_invalid">, import("@sinclair/typebox").TLiteral<"output_repair_exhausted">, import("@sinclair/typebox").TLiteral<"output_path_chosen">, import("@sinclair/typebox").TLiteral<"output_path_fallback">, import("@sinclair/typebox").TLiteral<"dreamer_task_leased">, import("@sinclair/typebox").TLiteral<"dreamer_context_built">, import("@sinclair/typebox").TLiteral<"dreamer_run_started">, import("@sinclair/typebox").TLiteral<"dreamer_run_failed">, import("@sinclair/typebox").TLiteral<"dreamer_output_invalid">, import("@sinclair/typebox").TLiteral<"dreamer_output_validated">, import("@sinclair/typebox").TLiteral<"dreamer_task_succeeded">, import("@sinclair/typebox").TLiteral<"dreamer_task_retried">, import("@sinclair/typebox").TLiteral<"dreamer_task_failed">, import("@sinclair/typebox").TLiteral<"dreamer_candidate_generated">, import("@sinclair/typebox").TLiteral<"dreamer_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"dreamer_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"dreamer_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"dreamer_update_output_failed">, import("@sinclair/typebox").TLiteral<"dreamer_context_partial">, import("@sinclair/typebox").TLiteral<"dreamer_mark_failed_error">, import("@sinclair/typebox").TLiteral<"dreamer_mark_retry_error">, import("@sinclair/typebox").TLiteral<"philosopher_task_leased">, import("@sinclair/typebox").TLiteral<"philosopher_context_built">, import("@sinclair/typebox").TLiteral<"philosopher_run_started">, import("@sinclair/typebox").TLiteral<"philosopher_run_failed">, import("@sinclair/typebox").TLiteral<"philosopher_output_invalid">, import("@sinclair/typebox").TLiteral<"philosopher_output_validated">, import("@sinclair/typebox").TLiteral<"philosopher_task_succeeded">, import("@sinclair/typebox").TLiteral<"philosopher_task_retried">, import("@sinclair/typebox").TLiteral<"philosopher_task_failed">, import("@sinclair/typebox").TLiteral<"philosopher_principle_candidate_generated">, import("@sinclair/typebox").TLiteral<"philosopher_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"philosopher_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"philosopher_update_output_failed">, import("@sinclair/typebox").TLiteral<"philosopher_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"philosopher_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"philosopher_lineage_partial">, import("@sinclair/typebox").TLiteral<"philosopher_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"philosopher_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"philosopher_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"philosopher_mark_failed_error">, import("@sinclair/typebox").TLiteral<"philosopher_mark_retry_error">, import("@sinclair/typebox").TLiteral<"artificer_task_leased">, import("@sinclair/typebox").TLiteral<"artificer_context_built">, import("@sinclair/typebox").TLiteral<"artificer_run_started">, import("@sinclair/typebox").TLiteral<"artificer_run_failed">, import("@sinclair/typebox").TLiteral<"artificer_output_invalid">, import("@sinclair/typebox").TLiteral<"artificer_output_validated">, import("@sinclair/typebox").TLiteral<"artificer_task_succeeded">, import("@sinclair/typebox").TLiteral<"artificer_task_retried">, import("@sinclair/typebox").TLiteral<"artificer_task_failed">, import("@sinclair/typebox").TLiteral<"artificer_implementation_plan_generated">, import("@sinclair/typebox").TLiteral<"artificer_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"artificer_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"artificer_update_output_failed">, import("@sinclair/typebox").TLiteral<"artificer_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"artificer_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"artificer_lineage_partial">, import("@sinclair/typebox").TLiteral<"artificer_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"artificer_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"artificer_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"artificer_mark_failed_error">, import("@sinclair/typebox").TLiteral<"artificer_mark_retry_error">, import("@sinclair/typebox").TLiteral<"evaluator_task_leased">, import("@sinclair/typebox").TLiteral<"evaluator_context_built">, import("@sinclair/typebox").TLiteral<"evaluator_run_started">, import("@sinclair/typebox").TLiteral<"evaluator_run_failed">, import("@sinclair/typebox").TLiteral<"evaluator_output_invalid">, import("@sinclair/typebox").TLiteral<"evaluator_output_validated">, import("@sinclair/typebox").TLiteral<"evaluator_task_succeeded">, import("@sinclair/typebox").TLiteral<"evaluator_task_retried">, import("@sinclair/typebox").TLiteral<"evaluator_task_failed">, import("@sinclair/typebox").TLiteral<"evaluator_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"evaluator_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"evaluator_update_output_failed">, import("@sinclair/typebox").TLiteral<"evaluator_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"evaluator_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"evaluator_lineage_partial">, import("@sinclair/typebox").TLiteral<"evaluator_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"evaluator_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"evaluator_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"evaluator_mark_failed_error">, import("@sinclair/typebox").TLiteral<"evaluator_mark_retry_error">, import("@sinclair/typebox").TLiteral<"evaluator_decision_recorded">, import("@sinclair/typebox").TLiteral<"scribe_task_leased">, import("@sinclair/typebox").TLiteral<"scribe_context_built">, import("@sinclair/typebox").TLiteral<"scribe_run_started">, import("@sinclair/typebox").TLiteral<"scribe_run_failed">, import("@sinclair/typebox").TLiteral<"scribe_output_invalid">, import("@sinclair/typebox").TLiteral<"scribe_output_validated">, import("@sinclair/typebox").TLiteral<"scribe_task_succeeded">, import("@sinclair/typebox").TLiteral<"scribe_task_retried">, import("@sinclair/typebox").TLiteral<"scribe_task_failed">, import("@sinclair/typebox").TLiteral<"scribe_principle_draft_generated">, import("@sinclair/typebox").TLiteral<"scribe_cancel_run_failed">, import("@sinclair/typebox").TLiteral<"scribe_mark_succeeded_failed">, import("@sinclair/typebox").TLiteral<"scribe_update_output_failed">, import("@sinclair/typebox").TLiteral<"scribe_dependency_not_succeeded">, import("@sinclair/typebox").TLiteral<"scribe_lineage_resolve_failed">, import("@sinclair/typebox").TLiteral<"scribe_lineage_partial">, import("@sinclair/typebox").TLiteral<"scribe_artifact_write_failed">, import("@sinclair/typebox").TLiteral<"scribe_wrong_task_kind">, import("@sinclair/typebox").TLiteral<"scribe_output_extraction_failed">, import("@sinclair/typebox").TLiteral<"scribe_mark_failed_error">, import("@sinclair/typebox").TLiteral<"scribe_mark_retry_error">, import("@sinclair/typebox").TLiteral<"dreamer_l2_turn">, import("@sinclair/typebox").TLiteral<"dreamer_l2_complete">, import("@sinclair/typebox").TLiteral<"dreamer_l2_fallback_to_l1">, import("@sinclair/typebox").TLiteral<"artificer_l2_attempt">, import("@sinclair/typebox").TLiteral<"artificer_l2_turn">, import("@sinclair/typebox").TLiteral<"artificer_l2_complete">, import("@sinclair/typebox").TLiteral<"artificer_repair_replay_evidence_resolved">, import("@sinclair/typebox").TLiteral<"artificer_repair_replay_evidence_unavailable">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_skipped">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_diagnostic_passed">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_diagnostic_failed">, import("@sinclair/typebox").TLiteral<"evaluator_adversarial_replay_case_id_conflict">, import("@sinclair/typebox").TLiteral<"evaluator_rule_assembled">, import("@sinclair/typebox").TLiteral<"evaluator_rule_assembly_failed">]>;
76
76
  /** Correlation trace ID for linking events across the pipeline */
77
77
  traceId: import("@sinclair/typebox").TString;
78
78
  /** ISO 8601 timestamp */
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry-event.d.ts","sourceRoot":"","sources":["../src/telemetry-event.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAOtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,kBAAkB,6kUA8L7B,CAAC;AAGH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAMnE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB;IAC/B,2CAA2C;;IAE3C,kEAAkE;;IAElE,yBAAyB;;IAEzB,yBAAyB;;IAEzB,wDAAwD;;IAExD,6BAA6B;;EAE7B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMjE,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,8BAA8B,CA8BrF"}
1
+ {"version":3,"file":"telemetry-event.d.ts","sourceRoot":"","sources":["../src/telemetry-event.ts"],"names":[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