@tangle-network/agent-eval 0.98.0 → 0.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/adapters/http.d.ts +1 -1
  2. package/dist/adapters/langchain.d.ts +1 -1
  3. package/dist/adapters/otel.d.ts +1 -1
  4. package/dist/adversarial-B7loGVVX.d.ts +19 -0
  5. package/dist/analyst/index.js +3 -2
  6. package/dist/analyst/index.js.map +1 -1
  7. package/dist/campaign/index.d.ts +9 -8
  8. package/dist/campaign/index.js +4 -1
  9. package/dist/campaign/index.js.map +1 -1
  10. package/dist/chunk-BUTW4RGG.js +32 -0
  11. package/dist/chunk-BUTW4RGG.js.map +1 -0
  12. package/dist/{chunk-QWV226SL.js → chunk-JHCHEVET.js} +1 -3
  13. package/dist/chunk-OYU4D7FY.js +718 -0
  14. package/dist/chunk-OYU4D7FY.js.map +1 -0
  15. package/dist/{chunk-PSWWQXHF.js → chunk-SJISCGWD.js} +5 -30
  16. package/dist/chunk-SJISCGWD.js.map +1 -0
  17. package/dist/contract/index.d.ts +6 -6
  18. package/dist/fuzz.d.ts +1 -1
  19. package/dist/{gepa-3TG16SYf.d.ts → gepa-H6mlM0KN.d.ts} +1 -1
  20. package/dist/groundedness/index.d.ts +112 -0
  21. package/dist/groundedness/index.js +77 -0
  22. package/dist/groundedness/index.js.map +1 -0
  23. package/dist/hosted/index.d.ts +1 -1
  24. package/dist/index.d.ts +329 -14
  25. package/dist/index.js +195 -244
  26. package/dist/index.js.map +1 -1
  27. package/dist/matrix/index.d.ts +3 -17
  28. package/dist/matrix/index.js +3 -7
  29. package/dist/multishot/index.d.ts +1 -1
  30. package/dist/multishot/index.js +1 -1
  31. package/dist/openapi.json +1 -1
  32. package/dist/{pre-registration-nfUdc9EQ.d.ts → pre-registration-CMm8cvrh.d.ts} +73 -1
  33. package/dist/{provenance-C5KAhiom.d.ts → provenance-Bg_RttR8.d.ts} +2 -2
  34. package/dist/rl.d.ts +2 -2
  35. package/dist/rl.js +0 -79
  36. package/dist/rl.js.map +1 -1
  37. package/dist/{types-D9tuReDv.d.ts → types-BTI16iFl.d.ts} +1 -1
  38. package/package.json +6 -1
  39. package/dist/adversarial-DIVcDoI_.d.ts +0 -88
  40. package/dist/chunk-HMA63UEO.js +0 -370
  41. package/dist/chunk-HMA63UEO.js.map +0 -1
  42. package/dist/chunk-PSWWQXHF.js.map +0 -1
  43. /package/dist/{chunk-QWV226SL.js.map → chunk-JHCHEVET.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/groundedness/index.ts"],"sourcesContent":["/**\n * Groundedness — \"did the retrieval PROVIDER surface what the task needed?\"\n *\n * A search/research provider returns text; the task needed certain facts or\n * symbols to be solvable (the CURRENT API, a version number, a function name).\n * This module scores how much of that required knowledge the provider's results\n * actually surfaced — isolating PROVIDER quality (was the right thing\n * retrievable / returned) from AGENT skill (did the agent then use it). A high\n * groundedness score with a failed run blames the agent; a low score blames the\n * provider. That separation is the whole point — pass/fail alone cannot make it.\n *\n * Structural sibling of `../authenticity`:\n * - authenticity scores the agent's PRODUCED files for realness.\n * - groundedness scores the provider's RETRIEVED text for coverage.\n * Both are pure deterministic scorers whose DOMAIN config is supplied by the\n * consumer (authenticity: `AuthenticitySignals`; groundedness:\n * `requiredKnowledge: string[]`) — neither bakes in a benchmark's vocabulary.\n *\n * Relationship to `keyword-coverage-judge`: that judge scores the agent's\n * SERVED OUTPUT (HTML + assets) for expected concepts — a different input\n * (produced deliverable) answering a different question (deliverable quality).\n * Groundedness reads the RETRIEVAL side (provider results). They are\n * complementary coverage scorers over different stages of the run, not\n * duplicates; do not collapse one into the other.\n *\n * Two seams, neither forked:\n * - PURE SCORER `scoreGroundedness(resultText, requiredKnowledge)` — case-\n * insensitive substring containment over a deduped key set. Fail-open: with\n * no required knowledge there is nothing to ground, so `score = 1`.\n * - TRACE EXTRACTOR `extractRetrievedText(spans, opts?)` — pulls the provider's\n * returned text out of the canonical `TraceSchema` spans (`RetrievalSpan.hits`\n * + provider `ToolSpan.result`) instead of re-parsing bespoke run files. This\n * is the retrieval-side analog of `extractProducedState` (events → produced\n * files): structural span input, no IO, no disk walking.\n */\n\nimport type { RetrievalSpan, Span, ToolSpan } from '../trace/schema'\nimport { isRetrievalSpan, isToolSpan } from '../trace/schema'\n\n// ── Pure scorer ──────────────────────────────────────────────────────────────\n\nexport interface GroundednessResult {\n /** 0..1 share of required knowledge surfaced by the provider's results.\n * 1 when there is nothing to ground (`requiredKnowledge` empty) — fail-open. */\n score: number\n /** The required-knowledge keys the result text surfaced (deduped, original casing). */\n found: string[]\n /** The required-knowledge keys the result text did NOT surface. */\n missing: string[]\n /** Distinct required-knowledge keys after dedup — the denominator of `score`. */\n total: number\n /** Did the provider return any result text at all? Distinguishes \"provider\n * surfaced nothing\" (`!hadResults`) from \"returned text but missed the facts\"\n * (`hadResults && score < 1`) — the same provider-vs-agent split as the score. */\n hadResults: boolean\n}\n\n/**\n * Dedup a knowledge-key list, case-insensitively, keeping first-seen casing and\n * dropping blanks. The score denominator is distinct keys, so a config that\n * lists the same symbol twice (or with different casing) can't inflate `total`.\n */\nfunction dedupeKeys(keys: readonly string[]): string[] {\n const seen = new Set<string>()\n const out: string[] = []\n for (const raw of keys) {\n const k = raw.trim()\n if (!k) continue\n const lower = k.toLowerCase()\n if (seen.has(lower)) continue\n seen.add(lower)\n out.push(k)\n }\n return out\n}\n\n/**\n * Score how much of `requiredKnowledge` the retrieval provider's `resultText`\n * surfaced. Pure — same inputs, same output. No IO, no LLM.\n *\n * Matching is case-insensitive substring containment: each required key is\n * checked against the lower-cased result text. This is intentionally the same\n * cheap, deterministic containment the authenticity scorer uses for its\n * structural signals — a key is \"surfaced\" if the provider's returned text\n * mentions it. Semantic / paraphrase coverage is a separate (LLM) layer a\n * consumer can stack on top, exactly as authenticity stacks its nuance judge.\n *\n * Fail-open at `total === 0`: a task with no required knowledge has nothing for\n * the provider to ground, so it cannot be penalized (`score = 1`). The benchmark\n * caller decides what `requiredKnowledge` is — the substrate never derives it.\n */\nexport function scoreGroundedness(\n resultText: string,\n requiredKnowledge: readonly string[],\n): GroundednessResult {\n const keys = dedupeKeys(requiredKnowledge)\n const total = keys.length\n const text = resultText ?? ''\n const hadResults = text.trim().length > 0\n const haystack = text.toLowerCase()\n\n if (total === 0) {\n return { score: 1, found: [], missing: [], total: 0, hadResults }\n }\n\n const found: string[] = []\n const missing: string[] = []\n for (const key of keys) {\n if (haystack.includes(key.toLowerCase())) found.push(key)\n else missing.push(key)\n }\n\n return { score: found.length / total, found, missing, total, hadResults }\n}\n\n// ── Trace extractor ────────────────────────────────────────────────────────\n\n/**\n * Predicate selecting which `ToolSpan`s are retrieval-PROVIDER calls (whose\n * `result` carries returned text), by tool name. A parameter — never a baked-in\n * literal — so the substrate stays free of any one benchmark's tool vocabulary,\n * exactly as `AuthenticitySignals` keeps all domain regexes consumer-supplied.\n */\nexport type ProviderToolMatcher = (toolName: string) => boolean\n\n/**\n * Default provider matcher: tool names that look like search/research but not a\n * plain fetch/read. A sensible starting point for the common \"search arm\" shape;\n * any consumer with different tool names passes its own matcher. `RetrievalSpan`s\n * are ALWAYS included regardless of this matcher (they are retrieval by kind);\n * the matcher only selects which generic `ToolSpan`s also count as provider calls.\n */\nexport const defaultProviderToolMatcher: ProviderToolMatcher = (name) =>\n /search|research/i.test(name) && !/fetch/i.test(name)\n\nexport interface ExtractRetrievedTextOptions {\n /** Which `ToolSpan`s count as provider calls. Default: {@link defaultProviderToolMatcher}. */\n isProviderTool?: ProviderToolMatcher\n}\n\n/** Stringify a `ToolSpan.result` of unknown shape into searchable text. */\nfunction resultToText(result: unknown): string {\n if (result == null) return ''\n if (typeof result === 'string') return result\n try {\n return JSON.stringify(result)\n } catch {\n return String(result)\n }\n}\n\n/** Pull the retrieved text out of a `RetrievalSpan`: every hit's `content`. */\nfunction retrievalSpanText(span: RetrievalSpan): string {\n return span.hits\n .map((h) => h.content ?? '')\n .filter((c) => c.length > 0)\n .join('\\n')\n}\n\n/**\n * Extract the retrieval PROVIDER's returned text from a span stream — the\n * retrieval-side analog of `extractProducedState`. Reads the canonical\n * `TraceSchema` carriers, NOT bespoke run files:\n * - every `RetrievalSpan`'s `hits[].content` (kind 'retrieval' — the\n * substrate's first-class search/research result carrier; the same `.hits`\n * the `bad_retrieval` failure detector already reads), and\n * - `ToolSpan.result` for tool spans whose `toolName` the provider matcher\n * accepts (kind 'tool').\n *\n * Pure and total: spans of other kinds, and provider tools with no result, are\n * skipped. Returns one text blob ready for `scoreGroundedness`.\n */\nexport function extractRetrievedText(\n spans: readonly Span[],\n opts: ExtractRetrievedTextOptions = {},\n): string {\n const isProviderTool = opts.isProviderTool ?? defaultProviderToolMatcher\n const parts: string[] = []\n for (const span of spans) {\n if (isRetrievalSpan(span)) {\n const t = retrievalSpanText(span)\n if (t) parts.push(t)\n } else if (isToolSpan(span)) {\n const ts = span as ToolSpan\n if (isProviderTool(ts.toolName)) {\n const t = resultToText(ts.result)\n if (t) parts.push(t)\n }\n }\n }\n return parts.join('\\n')\n}\n\n// ── Convenience: extract-then-score ───────────────────────────────────────────\n\n/**\n * Extract the provider's retrieved text from a run's spans and score it against\n * `requiredKnowledge` in one call — the analog of authenticity's file-in\n * convenience. The primary contract is the standalone `scoreGroundedness`; this\n * is the ergonomic path for a consumer holding a persisted run's `Span[]`\n * (e.g. from `TraceStore.spans(...)`).\n */\nexport function scoreGroundednessForRun(\n spans: readonly Span[],\n requiredKnowledge: readonly string[],\n opts: ExtractRetrievedTextOptions = {},\n): GroundednessResult {\n return scoreGroundedness(extractRetrievedText(spans, opts), requiredKnowledge)\n}\n"],"mappings":";;;;;;;AA8DA,SAAS,WAAW,MAAmC;AACrD,QAAM,OAAO,oBAAI,IAAY;AAC7B,QAAM,MAAgB,CAAC;AACvB,aAAW,OAAO,MAAM;AACtB,UAAM,IAAI,IAAI,KAAK;AACnB,QAAI,CAAC,EAAG;AACR,UAAM,QAAQ,EAAE,YAAY;AAC5B,QAAI,KAAK,IAAI,KAAK,EAAG;AACrB,SAAK,IAAI,KAAK;AACd,QAAI,KAAK,CAAC;AAAA,EACZ;AACA,SAAO;AACT;AAiBO,SAAS,kBACd,YACA,mBACoB;AACpB,QAAM,OAAO,WAAW,iBAAiB;AACzC,QAAM,QAAQ,KAAK;AACnB,QAAM,OAAO,cAAc;AAC3B,QAAM,aAAa,KAAK,KAAK,EAAE,SAAS;AACxC,QAAM,WAAW,KAAK,YAAY;AAElC,MAAI,UAAU,GAAG;AACf,WAAO,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,GAAG,WAAW;AAAA,EAClE;AAEA,QAAM,QAAkB,CAAC;AACzB,QAAM,UAAoB,CAAC;AAC3B,aAAW,OAAO,MAAM;AACtB,QAAI,SAAS,SAAS,IAAI,YAAY,CAAC,EAAG,OAAM,KAAK,GAAG;AAAA,QACnD,SAAQ,KAAK,GAAG;AAAA,EACvB;AAEA,SAAO,EAAE,OAAO,MAAM,SAAS,OAAO,OAAO,SAAS,OAAO,WAAW;AAC1E;AAmBO,IAAM,6BAAkD,CAAC,SAC9D,mBAAmB,KAAK,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI;AAQtD,SAAS,aAAa,QAAyB;AAC7C,MAAI,UAAU,KAAM,QAAO;AAC3B,MAAI,OAAO,WAAW,SAAU,QAAO;AACvC,MAAI;AACF,WAAO,KAAK,UAAU,MAAM;AAAA,EAC9B,QAAQ;AACN,WAAO,OAAO,MAAM;AAAA,EACtB;AACF;AAGA,SAAS,kBAAkB,MAA6B;AACtD,SAAO,KAAK,KACT,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,EAC1B,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EAC1B,KAAK,IAAI;AACd;AAeO,SAAS,qBACd,OACA,OAAoC,CAAC,GAC7B;AACR,QAAM,iBAAiB,KAAK,kBAAkB;AAC9C,QAAM,QAAkB,CAAC;AACzB,aAAW,QAAQ,OAAO;AACxB,QAAI,gBAAgB,IAAI,GAAG;AACzB,YAAM,IAAI,kBAAkB,IAAI;AAChC,UAAI,EAAG,OAAM,KAAK,CAAC;AAAA,IACrB,WAAW,WAAW,IAAI,GAAG;AAC3B,YAAM,KAAK;AACX,UAAI,eAAe,GAAG,QAAQ,GAAG;AAC/B,cAAM,IAAI,aAAa,GAAG,MAAM;AAChC,YAAI,EAAG,OAAM,KAAK,CAAC;AAAA,MACrB;AAAA,IACF;AAAA,EACF;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;AAWO,SAAS,wBACd,OACA,mBACA,OAAoC,CAAC,GACjB;AACpB,SAAO,kBAAkB,qBAAqB,OAAO,IAAI,GAAG,iBAAiB;AAC/E;","names":[]}
@@ -1,4 +1,4 @@
1
- import { M as MutableSurface, i as GateDecision } from '../types-D9tuReDv.js';
1
+ import { M as MutableSurface, j as GateDecision } from '../types-BTI16iFl.js';
2
2
  import { I as InsightReport } from '../insight-report-BnRjTibG.js';
3
3
  import '../run-record-CP2ObebC.js';
4
4
  import '@tangle-network/agent-interface';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { A as ActionExecutionPolicy, a as ActionPolicyDecision, C as ControlRunToRunRecordOptions, L as LlmJsonCall, b as LlmReviewerConfig, P as ProposeFn, c as ProposeInput, d as ProposeOutput, e as ProposeReviewConfig, f as ProposeReviewControlAction, g as ProposeReviewControlConfig, h as ProposeReviewControlResult, i as ProposeReviewControlState, j as ProposeReviewReport, k as ProposeReviewShot, R as Review, l as ReviewFn, m as ReviewInput, n as ReviewMemoryEntry, o as ReviewMemoryStore, p as RunEvidenceMetadata, V as Verification, q as VerifyFn, r as controlFailureClassFromVerification, s as controlRunToRunRecord, t as createLlmReviewer, u as evaluateActionPolicy, v as inMemoryReviewStore, w as jsonlReviewStore, x as runProposeReview, y as runProposeReviewAsControlLoop, z as scoreFromEvals } from './control-Doncu-B_.js';
2
2
  import { R as RunRecord, a as RunSplitTag } from './run-record-CP2ObebC.js';
3
3
  export { e as AGENT_PROFILE_KINDS, f as AgentInterfaceProfileLike, A as AgentProfileCell, d as AgentProfileCellInput, g as AgentProfileCellSchemaVersion, h as AgentProfileCellValidationError, i as AgentProfileDimensionValue, j as AgentProfileHarness, k as AgentProfileJson, l as AgentProfileKind, m as AgentProfileSource, n as AgentProfileSourceInput, J as JudgeScoresRecord, c as RunJudgeMetadata, o as RunOutcome, p as RunRecordValidationError, b as RunTokenUsage, q as agentProfileCellHashMaterial, r as agentProfileCellKey, s as assertRunAgentProfileCell, t as buildAgentInterfaceProfileCell, u as buildAgentProfileCell, v as groupRunsByAgentProfileCell, w as isRunRecord, x as parseRunRecordSafe, y as requireAgentProfileCell, z as roundTripRunRecord, B as toAgentProfileJson, C as validateAgentProfileCell, D as validateRunRecord, E as verifyAgentProfileCell } from './run-record-CP2ObebC.js';
4
- export { B as BehavioralMetrics, x as ConceptComplexity, y as ConceptFinding, z as ConceptSpec, A as ConceptWeightStrategy, C as CreateAnalystAiConfig, E as DEFAULT_COMPLEXITY_WEIGHTS, D as DEFAULT_TRACE_ANALYST_KINDS, b as DiffPolicy, F as FAILURE_MODE_KIND_SPEC, e as FindingSubject, f as FindingSubjectKind, h as FindingsDiff, i as FindingsStore, I as IMPROVEMENT_KIND_SPEC, j as KNOWLEDGE_GAP_KIND_SPEC, k as KNOWLEDGE_POISONING_KIND_SPEC, P as PersistedFinding, G as SEMANTIC_CONCEPT_JUDGE_VERSION, l as SKILL_USAGE_ANALYST, a as SemanticConceptJudgeInput, S as SemanticConceptJudgeOptions, H as SemanticConceptJudgeResult, m as SkillUsageAnalyst, J as SuboptimalCode, L as SuboptimalSignal, M as computeTraceMetrics, r as createAnalystAi, N as createSemanticConceptJudge, s as defaultIsMaterial, t as diffFindings, O as runSemanticConceptJudge } from './semantic-concept-judge-DSBB2Cfp.js';
4
+ import { B as BehavioralMetrics } from './semantic-concept-judge-DSBB2Cfp.js';
5
+ export { x as ConceptComplexity, y as ConceptFinding, z as ConceptSpec, A as ConceptWeightStrategy, C as CreateAnalystAiConfig, E as DEFAULT_COMPLEXITY_WEIGHTS, D as DEFAULT_TRACE_ANALYST_KINDS, b as DiffPolicy, F as FAILURE_MODE_KIND_SPEC, e as FindingSubject, f as FindingSubjectKind, h as FindingsDiff, i as FindingsStore, I as IMPROVEMENT_KIND_SPEC, j as KNOWLEDGE_GAP_KIND_SPEC, k as KNOWLEDGE_POISONING_KIND_SPEC, P as PersistedFinding, G as SEMANTIC_CONCEPT_JUDGE_VERSION, l as SKILL_USAGE_ANALYST, a as SemanticConceptJudgeInput, S as SemanticConceptJudgeOptions, H as SemanticConceptJudgeResult, m as SkillUsageAnalyst, J as SuboptimalCode, L as SuboptimalSignal, M as computeTraceMetrics, r as createAnalystAi, N as createSemanticConceptJudge, s as defaultIsMaterial, t as diffFindings, O as runSemanticConceptJudge } from './semantic-concept-judge-DSBB2Cfp.js';
5
6
  import { l as ChatRequest, p as CreateChatClientOpts } from './types-B5x54y6n.js';
6
7
  export { A as Analyst, a as AnalystContext, g as AnalystCost, c as AnalystFinding, i as AnalystInputKind, j as AnalystRequirements, f as AnalystRunEvent, e as AnalystRunInputs, d as AnalystRunResult, b as AnalystRunSummary, h as AnalystSeverity, k as ChatCallOpts, C as ChatClient, m as ChatResponse, n as ChatTransport, o as CliBridgeTransportOpts, D as DirectProviderTransportOpts, E as EvidenceRef, M as MockTransportOpts, R as RouterTransportOpts, S as SandboxSdkTransportOpts, q as computeFindingId, r as createChatClient, s as makeFinding } from './types-B5x54y6n.js';
7
8
  export { a as AnalystHooks, A as AnalystRegistry, b as AnalystRegistryOptions, B as BudgetPolicy, D as DefaultAnalystRegistryOptions, R as RegistryRunOpts, c as buildDefaultAnalystRegistry } from './default-registry-GyE8X5SP.js';
@@ -10,14 +11,14 @@ import { TCloud } from '@tangle-network/tcloud';
10
11
  import { B as BenchmarkRunnerConfig, S as Scenario, c as BenchmarkReport, P as ProductClientConfig, C as CheckResult, T as TestResult, d as PersonaConfig, D as DriverResult, e as DriverState, b as JudgeFn, f as CollectedArtifacts, g as ScenarioResult, h as TurnMetrics, i as ScenarioFile, j as CompletionCriterion } from './types-C7DGg5ex.js';
11
12
  export { A as ArtifactCheck, k as ArtifactResult, E as EvalResult, F as FeedbackPattern, l as JudgeConfig, a as JudgeInput, m as JudgeRubric, J as JudgeScore, n as PersonaRigor, R as RouteMap, o as RubricDimension, p as Turn, q as TurnResult } from './types-C7DGg5ex.js';
12
13
  export { c as ControlActionFailureMode, d as ControlActionOutcome, e as ControlBudget, f as ControlContext, g as ControlDecision, C as ControlEvalResult, a as ControlRunResult, h as ControlRuntimeConfig, i as ControlRuntimeError, j as ControlSeverity, b as ControlStep, k as ControlStopPolicies, S as StopDecision, l as allCriticalPassed, o as objectiveEval, r as runAgentControlLoop, s as stopOnNoProgress, m as stopOnRepeatedAction, n as subjectiveEval } from './control-runtime-Acf9CGhw.js';
13
- import { F as FailureClass, h as BudgetSpec, B as BudgetLedgerEntry, R as Run, L as LlmSpan } from './schema-m0gsnbt3.js';
14
- export { A as Artifact, E as EventKind, i as FAILURE_CLASSES, G as GenericSpan, J as JudgeSpan, M as Message, d as RetrievalSpan, g as RunLayer, f as RunStatus, e as SandboxSpan, S as Span, j as SpanBase, c as SpanKind, k as SpanStatus, l as TRACE_SCHEMA_VERSION, T as ToolSpan, a as TraceEvent, m as isJudgeSpan, n as isLlmSpan, o as isRetrievalSpan, p as isSandboxSpan, q as isToolSpan } from './schema-m0gsnbt3.js';
14
+ import { F as FailureClass, T as ToolSpan, h as BudgetSpec, B as BudgetLedgerEntry, R as Run, L as LlmSpan } from './schema-m0gsnbt3.js';
15
+ export { A as Artifact, E as EventKind, i as FAILURE_CLASSES, G as GenericSpan, J as JudgeSpan, M as Message, d as RetrievalSpan, g as RunLayer, f as RunStatus, e as SandboxSpan, S as Span, j as SpanBase, c as SpanKind, k as SpanStatus, l as TRACE_SCHEMA_VERSION, a as TraceEvent, m as isJudgeSpan, n as isLlmSpan, o as isRetrievalSpan, p as isSandboxSpan, q as isToolSpan } from './schema-m0gsnbt3.js';
15
16
  import { A as AgentEvalError, J as JudgeError, a as ConfigError } from './errors-CzMUYo7b.js';
16
17
  export { b as AgentEvalErrorCode, C as CaptureIntegrityError, N as NotFoundError, R as ReplayError, V as ValidationError, c as VerificationError } from './errors-CzMUYo7b.js';
17
18
  import { b as FeedbackLabel, F as FeedbackTrajectoryStore, a as FeedbackTrajectory } from './feedback-trajectory-BxY0cKfs.js';
18
19
  export { c as FeedbackArtifactType, d as FeedbackAttempt, e as FeedbackLabelKind, f as FeedbackLabelSource, g as FeedbackOptimizerRow, h as FeedbackOutcome, i as FeedbackReplayAdapter, j as FeedbackReplayResult, k as FeedbackSeverity, l as FeedbackSplitPolicy, m as FeedbackTask, n as FeedbackTrajectoryFilter, o as FileSystemFeedbackTrajectoryStore, I as InMemoryFeedbackTrajectoryStore, P as PreferenceMemoryEntry, p as ProposedSideEffect, q as assignFeedbackSplit, r as controlRunToFeedbackTrajectory, s as createFeedbackTrajectory, t as feedbackTrajectoriesToDatasetScenarios, u as feedbackTrajectoriesToOptimizerRows, v as feedbackTrajectoryToDatasetScenario, w as feedbackTrajectoryToOptimizerRow, x as parseFeedbackTrajectoriesJsonl, y as renderPreferenceMemoryMarkdown, z as replayFeedbackTrajectories, A as replayFeedbackTrajectory, B as serializeFeedbackTrajectoriesJsonl, C as summarizePreferenceMemory, D as withAssignedFeedbackSplit } from './feedback-trajectory-BxY0cKfs.js';
19
- import { b as CorrectnessChecker } from './pre-registration-nfUdc9EQ.js';
20
- export { A as ArtifactCheckArtifact, c as ArtifactEventLike, d as ArtifactValidator, e as BackendIntegrityError, B as BackendIntegrityReport, C as CompletionRequirement, a as CompletionVerdict, H as HypothesisManifest, f as HypothesisResult, L as LlmCorrectnessCheckerOpts, g as ProducedProposal, P as ProducedState, h as ProposalEventLike, i as RequirementCheck, R as RuntimeEventLike, j as SatisfiedBy, S as SignedManifest, k as SignedManifestAlgo, T as TaskGold, l as ToolCallEventLike, V as ValidationContext, m as ValidationIssue, n as ValidationResult, o as assertRealBackend, p as byteLengthRange, q as canonicalize, r as completionVerdict, s as composeValidators, t as containsAll, u as createLlmCorrectnessChecker, v as createTokenRecallChecker, w as evaluateHypothesis, x as extractProducedState, y as hashJson, z as jsonHasKeys, D as parseCorrectnessResponse, E as regexMatch, F as signManifest, G as summarizeBackendIntegrity, I as verifyCompletion, J as verifyManifest } from './pre-registration-nfUdc9EQ.js';
20
+ import { b as CorrectnessChecker } from './pre-registration-CMm8cvrh.js';
21
+ export { A as ArtifactCheckArtifact, d as ArtifactEventLike, e as ArtifactValidator, f as BackendIntegrityError, B as BackendIntegrityReport, C as CompletionRequirement, a as CompletionVerdict, H as HypothesisManifest, g as HypothesisResult, h as LlmCorrectnessCheckerOpts, L as LlmJudgeDimension, c as LlmJudgeOptions, i as ProducedProposal, P as ProducedState, j as ProposalEventLike, k as RequirementCheck, R as RuntimeEventLike, m as SatisfiedBy, S as SignedManifest, n as SignedManifestAlgo, T as TaskGold, o as ToolCallEventLike, V as ValidationContext, p as ValidationIssue, q as ValidationResult, r as assertRealBackend, s as byteLengthRange, t as canonicalize, u as completionVerdict, v as composeValidators, w as containsAll, x as createLlmCorrectnessChecker, y as createTokenRecallChecker, z as evaluateHypothesis, D as extractProducedState, E as hashJson, F as jsonHasKeys, l as llmJudge, G as parseCorrectnessResponse, I as regexMatch, J as signManifest, K as summarizeBackendIntegrity, M as verifyCompletion, N as verifyManifest } from './pre-registration-CMm8cvrh.js';
21
22
  export { DataAcquisitionPlan, KnowledgeAcquisitionMode, KnowledgeBundle, KnowledgeFallbackPolicy, KnowledgeFreshness, KnowledgeImportance, KnowledgeReadinessReport, KnowledgeRecommendedAction, KnowledgeRequirement, KnowledgeRequirementCategory, KnowledgeResponsibleSurface, KnowledgeSensitivity, ScoreKnowledgeReadinessOptions, UserQuestion, acquisitionPlansForKnowledgeGaps, blockingKnowledgeEval, knowledgeReadinessTracePayload, scoreKnowledgeReadiness, userQuestionsForKnowledgeGaps } from './knowledge/index.js';
22
23
  import { h as ReleaseConfidenceThresholds, f as ReleaseConfidenceScorecard } from './release-report-pidWUMZ2.js';
23
24
  export { A as ActionableSideInfo, o as AsiSeverity, B as BootstrapOptions, a as BootstrapResult, J as JudgeReplayGateArgs, R as ReleaseConfidenceAxis, b as ReleaseConfidenceAxisName, c as ReleaseConfidenceInput, d as ReleaseConfidenceIssue, e as ReleaseConfidenceMetrics, g as ReleaseConfidenceStatus, i as ReleaseTraceEvidence, j as RenderReleaseReportOptions, V as Verdict, k as assertReleaseConfidence, l as bootstrapCi, m as evaluateReleaseConfidence, n as judgeReplayGate, r as renderReleaseReport } from './release-report-pidWUMZ2.js';
@@ -26,8 +27,9 @@ import { OtelExporter, OtelExportConfig } from './traces.js';
26
27
  export { CaptureFetchContext, CaptureFetchOptions, ExportableSpan, ExtractedUsage, FlattenOtlpOptions, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, OtlpExport, OtlpFileTraceStore, OtlpFileTraceStoreOptions, OtlpFlatLine, OtlpResourceSpans, OtlpSpan, OtlpToRunRecordsOptions, OtlpTraceRunRecord, ProjectedOtlpSpan, ReplayCache, ReplayCacheEntry, ReplayCacheMissError, ReplayCacheStats, ReplayFetchOptions, SPAN_KIND_ATTR_KEYS, SpanNotFoundError, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_SUBAGENT_DESCRIPTION, TraceAggregate, TraceAnalystHookOptions, TraceFileMissingError, TraceInsightContext, TraceInsightFinding, TraceInsightPanelRole, TraceInsightPromptInput, TraceInsightQualityGate, TraceInsightQuestion, TraceInsightReadiness, TraceInsightSuite, TraceInsightTask, TraceNotFoundError, TraceStoreSource, TraceStoreToOtlpOptions, TracesToOtlpResult, asNumber, asString, buildTraceAnalystTools, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, convertTraceStoresToOtlp, createOtelExporter, createOtelTracingStore, createReplayFetch, defaultTraceInsightPanel, describeTraceInsightScope, domainEvidencePattern, exportRunAsOtlp, extractOtlpAttributes, extractUsage, extractUsageFromResponse, extractUsageFromSse, firstNumberAttr, firstStringAttr, flattenOtlpExportToNdjson, inferDomainKeywords, inferOtlpKind, iterateRawCalls, otelRunCompleteHook, otlpToRunRecords, otlpToTraceRunRecords, planTraceInsightQuestions, projectOtlpFlatLine, readOtlpStatus, scoreTraceInsightReadiness, stringField, tokenizeDomainWords, traceAnalystFunctionGroup, traceAnalystOnRunComplete, traceSpanKindToOpenInferenceKind } from './traces.js';
27
28
  import { a as AnalyzeTracesInput, A as AnalyzeTracesOptions, b as AnalyzeTracesResult } from './analyst-C8HHvfJp.js';
28
29
  export { c as AnalyzeTracesTurnSnapshot, d as analyzeTraces } from './analyst-C8HHvfJp.js';
29
- export { D as DEFAULT_TRACE_ANALYST_BUDGETS, b as DatasetOverview, E as ErrorCluster, Q as QueryTracesPage, S as SearchSpanResult, c as SearchTraceResult, d as SpanMatchRecord, e as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, T as TraceAnalysisStore, f as TraceAnalystByteBudgets, g as TraceAnalystFilters, a as TraceAnalystSpan, h as TraceAnalystSpanKind, i as TraceAnalystSpanStatus, j as TraceAnalystTraceSummary, V as ViewSpansResult, k as ViewTraceOversized, l as ViewTraceResult } from './store-C1YxJDEK.js';
30
- import { a as JudgeConfig, S as Scenario$1, f as Gate, J as JudgeScore } from './types-D9tuReDv.js';
30
+ import { a as TraceAnalystSpan } from './store-C1YxJDEK.js';
31
+ export { D as DEFAULT_TRACE_ANALYST_BUDGETS, b as DatasetOverview, E as ErrorCluster, Q as QueryTracesPage, S as SearchSpanResult, c as SearchTraceResult, d as SpanMatchRecord, e as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, T as TraceAnalysisStore, f as TraceAnalystByteBudgets, g as TraceAnalystFilters, h as TraceAnalystSpanKind, i as TraceAnalystSpanStatus, j as TraceAnalystTraceSummary, V as ViewSpansResult, k as ViewTraceOversized, l as ViewTraceResult } from './store-C1YxJDEK.js';
32
+ import { a as JudgeConfig, J as JudgeScore, S as Scenario$1, g as Gate } from './types-BTI16iFl.js';
31
33
  import { A as AnalyzeRunsOptions } from './analyze-runs-DtT6F_6T.js';
32
34
  import { S as SteeringBundle } from './harness-optimizer-mOl9XX_O.js';
33
35
  export { D as DEFAULT_HARNESS_OBJECTIVES, H as HarnessAdapter, a as HarnessExperimentConfig, b as HarnessExperimentResult, c as HarnessIntervention, d as HarnessRunRequest, e as HarnessRunResult, f as HarnessScenario, g as HarnessSelection, h as HarnessVariant, i as HarnessVariantReport, M as MeasurementPolicy, j as SteeringDelta, k as SteeringRolePrompt, W as WorkflowTopology, m as mergeSteeringBundle, r as renderSteeringText, l as runHarnessExperiment, s as selectHarnessVariant, n as summarizeHarnessResults } from './harness-optimizer-mOl9XX_O.js';
@@ -72,7 +74,7 @@ export { C as CallbackResearcher, d as CallbackResearcherOptions, e as CampaignF
72
74
  export { G as GainDistributionBin, a as GainDistributionFigureSpec, b as GainDistributionOptions, m as GateDecision, n as GateEvidence, H as HeldOutGate, o as HeldOutGateConfig, q as HeldOutGateRejectionCode, P as ParetoFigureSpec, c as ParetoPoint, R as RESEARCH_REPORT_HARD_PAIR_FLOOR, d as ResearchReport, e as ResearchReportCandidate, f as ResearchReportDecision, g as ResearchReportMethodology, h as ResearchReportOptions, i as ResearchReportRecommendation, S as SummaryTable, j as SummaryTableOptions, k as SummaryTableRow, l as gainHistogram, p as paretoChart, r as researchReport, s as summaryTable } from './summary-report-CInXwsza.js';
73
75
  export { L as LockedJsonlAppender } from './testing-C21CHsq2.js';
74
76
  export { I as InterimReleaseConfidence, a as InterimReleaseConfidenceInput, P as PairedEvalueOptions, b as PairedEvalueSequence, c as PairedEvalueStep, S as SequentialDecision, e as evaluateInterimReleaseConfidence, p as pairedEvalueSequence } from './sequential-5iSVfzl2.js';
75
- import { e as GepaProposerConstraints, b as RunImprovementLoopResult } from './gepa-3TG16SYf.js';
77
+ import { e as GepaProposerConstraints, b as RunImprovementLoopResult } from './gepa-H6mlM0KN.js';
76
78
  export { IntegrityResult, IntegrityViolation, JourneySpec, PerfBaseline, PerfGateResult, PerfRegression, PerfScenario, PerfStat, ScenarioAxes, assertRecordIntegrity, checkRecordIntegrity, expandMatrix, gatePerf, scenarioKey, summarizeRecords } from './perf/index.js';
77
79
  import '@ax-llm/ax';
78
80
  import 'zod';
@@ -80,17 +82,20 @@ import './insight-report-BnRjTibG.js';
80
82
  import './outcome-store-rnXLEqSn.js';
81
83
 
82
84
  /**
83
- * Automated pull request opener for the improvement loop.
85
+ * Automated pull-request transports for the production loop.
84
86
  *
85
- * When `runImprovementLoop` ships a winner (`autoOnPromote: 'pr'`) it produces
86
- * a promoted surface diff. To close the eval prod → eval cycle the framework
87
- * lands that change as a reviewable code change. This module does exactly that:
87
+ * A consumer's `runProductionLoop` ships a promoted surface diff as a
88
+ * reviewable code change by handing one of these clients to its
89
+ * `ProductionShipConfig.client`. Each `AutoPrClient.proposeChange`:
88
90
  *
89
91
  * 1. Stage a branch off `baseBranch`.
90
92
  * 2. Write each `fileChange` into the worktree.
91
93
  * 3. Commit + push.
92
94
  * 4. Open a PR via the GitHub API.
93
95
  *
96
+ * (The campaign-loop `autoOnPromote: 'pr'` path uses `openAutoPr` in
97
+ * `src/campaign/auto-pr.ts`, a self-contained `gh pr create` shell-out.)
98
+ *
94
99
  * Two transports ship in core:
95
100
  *
96
101
  * - `ghCliClient(opts)` — shells out to the `gh` CLI. No extra deps,
@@ -153,7 +158,6 @@ interface AutoPrClient {
153
158
  */
154
159
  proposeChange(input: ProposeAutomatedPullRequestInput): Promise<ProposeAutomatedPullRequestResult>;
155
160
  }
156
- declare function proposeAutomatedPullRequest(client: AutoPrClient, input: ProposeAutomatedPullRequestInput): Promise<ProposeAutomatedPullRequestResult>;
157
161
  interface HttpGithubClientOptions {
158
162
  /** Personal access token, GitHub App token, or `GITHUB_TOKEN` from Actions. */
159
163
  token: string;
@@ -989,6 +993,115 @@ declare function formatDriverReport(results: DriverResult[]): string;
989
993
  /** Print a compact summary to console */
990
994
  declare function printDriverSummary(results: DriverResult[]): void;
991
995
 
996
+ /**
997
+ * Treatment-applied gate — "did the treatment's tool actually fire this run?"
998
+ *
999
+ * A tool-treatment A/B (mount a search provider, a browser, a code-exec
1000
+ * sandbox, a retrieval MCP — anything one arm gets and the other doesn't) only
1001
+ * means something on the treatment arm if that arm actually EXERCISED the tool.
1002
+ * A treatment run that never called the mounted tool is not a weak data point
1003
+ * — it is a NON-data-point: the manipulation never happened, so the run cannot
1004
+ * speak to the treatment and must be excluded from the objective, the same way
1005
+ * an infra-tainted run is excluded.
1006
+ *
1007
+ * This is the manipulation/validity precondition that protects the paired A/B
1008
+ * tests downstream (`mcnemar`, `pairedRiskDifference`): they must only ever see
1009
+ * runs where the treatment was applied, or they measure noise and report it as
1010
+ * an effect.
1011
+ *
1012
+ * Shape mirrors `authenticity`'s `gateRealness`: a pure predicate over already-
1013
+ * computed signals, with explicit fail-open/fail-closed discipline. It is not a
1014
+ * trace parser — the tool-call telemetry it reads is the deterministic
1015
+ * `toolHistogram` that `computeTraceMetrics(spans)` already produces (OTLP
1016
+ * tool-name extraction via `TOOL_NAME_ATTR_KEYS`), or the `ToolSpan[]` a
1017
+ * `toolSpans(store, runId)` query returns. The gate never re-derives either.
1018
+ *
1019
+ * General by construction:
1020
+ * - The "which tool counts as the treatment" decision is a `matches` PARAMETER
1021
+ * — a `(toolName: string) => boolean`. There is no `search`/`web`/`fetch`
1022
+ * literal anywhere in this module; a search A/B passes its own matcher.
1023
+ * - The "is THIS run a treatment arm (vs a control)" decision is the caller's
1024
+ * policy and stays at the call site. The gate only answers the narrower,
1025
+ * domain-free question: "given this run's telemetry, did a matching tool
1026
+ * fire?" — so it generalizes to any tool-treatment, not search.
1027
+ *
1028
+ * Fail-open on telemetry absence: when NO tool calls were captured at all
1029
+ * (`sum(toolHistogram) === 0`), the gate cannot distinguish "the agent used no
1030
+ * tools" from "this harness's tool calls weren't recorded". Quarantining on a
1031
+ * telemetry gap would silently delete real runs, so the default is
1032
+ * applied=true / gated=false. Pass `failOpenWhenNoTelemetry: false` to flip to
1033
+ * fail-closed for harnesses where tool capture is guaranteed.
1034
+ */
1035
+
1036
+ /** A tool-name matcher: does this tool name belong to the treatment under test?
1037
+ * The caller supplies it — the substrate ships no `search` (or any) literal. */
1038
+ type ToolMatcher = (toolName: string) => boolean;
1039
+ interface TreatmentGateInput {
1040
+ /** Tool-call counts by tool name — exactly `computeTraceMetrics(spans).toolHistogram`.
1041
+ * The gate consumes this; it does not parse spans itself. */
1042
+ toolHistogram: Readonly<Record<string, number>>;
1043
+ /** Which tool names count as the treatment firing. A parameter, never baked in. */
1044
+ matches: ToolMatcher;
1045
+ }
1046
+ interface TreatmentGateOptions {
1047
+ /** When the histogram is empty (no tool telemetry captured), treat the run as
1048
+ * applied rather than quarantining it. Default true — a telemetry gap must
1049
+ * never be mistaken for "treatment not applied". Set false only when tool
1050
+ * capture is guaranteed for this harness. */
1051
+ failOpenWhenNoTelemetry?: boolean;
1052
+ }
1053
+ interface TreatmentGate {
1054
+ /** True iff the treatment's tool is considered to have fired this run. False
1055
+ * ONLY when telemetry was present and no matching call appears. */
1056
+ applied: boolean;
1057
+ /** Objective-exclusion flag, parallel to `outcome.realness.gated`: a gated run
1058
+ * is dropped from the objective denominator and reported as
1059
+ * treatment-not-applied (like infra-loss). `gated === !applied`. */
1060
+ gated: boolean;
1061
+ reason?: string;
1062
+ /** How many recorded tool calls matched the treatment matcher. */
1063
+ matchedCalls: number;
1064
+ /** Total recorded tool calls (`sum(toolHistogram)`) — 0 means no telemetry. */
1065
+ observedTools: number;
1066
+ }
1067
+ /**
1068
+ * Core predicate. Gated (treatment-not-applied) ONLY when telemetry was
1069
+ * captured AND zero matching calls appear; an empty histogram fails open.
1070
+ */
1071
+ declare function gateTreatmentApplied(input: TreatmentGateInput, opts?: TreatmentGateOptions): TreatmentGate;
1072
+ /**
1073
+ * Convenience: gate from an already-computed `BehavioralMetrics` (the common
1074
+ * case — analysts already hold `computeTraceMetrics(spans)` for the run). Reads
1075
+ * the metrics' `toolHistogram`; does no re-derivation.
1076
+ */
1077
+ declare function gateTreatmentFromMetrics(metrics: Pick<BehavioralMetrics, 'toolHistogram'>, matches: ToolMatcher, opts?: TreatmentGateOptions): TreatmentGate;
1078
+ /**
1079
+ * Convenience: gate directly from analyst spans, reusing the substrate's
1080
+ * deterministic histogram builder. For callers holding the trace store's typed
1081
+ * `ToolSpan[]` instead, see {@link gateTreatmentFromToolSpans}.
1082
+ */
1083
+ declare function gateTreatmentFromSpans(spans: readonly TraceAnalystSpan[], matches: ToolMatcher, opts?: TreatmentGateOptions): TreatmentGate;
1084
+ /**
1085
+ * Convenience: gate from the trace store's canonical `ToolSpan[]` (e.g. the
1086
+ * result of `toolSpans(store, runId)`). Counts by `toolName` — the typed
1087
+ * tool-call field — so it needs no OTLP attribute extraction.
1088
+ */
1089
+ declare function gateTreatmentFromToolSpans(toolSpans: readonly ToolSpan[], matches: ToolMatcher, opts?: TreatmentGateOptions): TreatmentGate;
1090
+ /** Measurable runs count toward the objective; treatment-not-applied runs are
1091
+ * excluded (like infra-loss), NOT counted as treatment failures. This is a
1092
+ * partition over the existing exclusion-flag pattern — it adds no new
1093
+ * classification enum. */
1094
+ type TreatmentClass = 'measurable' | 'treatment-not-applied';
1095
+ /**
1096
+ * Map a gate verdict onto a single measurable-vs-excluded label keyed on a
1097
+ * `RunRecord`, so consumers (paired A/B filters, reporters) read the partition
1098
+ * in one place instead of re-implementing the fail-open guard inline. The
1099
+ * `RunRecord` is accepted so callers key on the canonical run row, mirroring
1100
+ * how `outcome.realness.gated` rides along on the record; the verdict itself is
1101
+ * the gate's, not re-derived here.
1102
+ */
1103
+ declare function classifyTreatment(_record: RunRecord, gate: TreatmentGate): TreatmentClass;
1104
+
992
1105
  /**
993
1106
  * Anti-slop quality judge.
994
1107
  *
@@ -1653,6 +1766,208 @@ declare class BudgetGuard {
1653
1766
  get state(): Record<keyof BudgetSpec, number>;
1654
1767
  }
1655
1768
 
1769
+ /**
1770
+ * Hidden-criteria grading firewall — grade an agent on criteria it never saw.
1771
+ *
1772
+ * A trustworthy benchmark splits every scenario's data by WHERE each field is
1773
+ * allowed to flow, then proves the held-out / judge-only fields never reach the
1774
+ * agent during the run. The coding bench expresses this with four destinations
1775
+ * (prompt / develop-against / held-out suite / rubric); this module lifts the
1776
+ * domain-FREE core out of it so research, legal, tax, content — any domain —
1777
+ * can declare the same routing and get the same firewall enforcement and the
1778
+ * same held-out-weighted composite, plugging in its OWN grader.
1779
+ *
1780
+ * Two reusable pieces, both domain-agnostic:
1781
+ *
1782
+ * 1. FIELD ROUTING BY DESTINATION. A scenario declares each field's
1783
+ * `FieldDestination`; `assertNoHiddenLeak` is a pure checker that throws if
1784
+ * a grading-only or judge-only field's value appears in what reaches the
1785
+ * agent. The domain decides which fields exist and where they go — the
1786
+ * substrate only enforces "hidden stays hidden".
1787
+ *
1788
+ * 2. HIDDEN-CRITERIA GRADING. The domain supplies its own grader
1789
+ * `(artifact, hiddenCriteria) => { passRate, total }` — the coding
1790
+ * node-test executor is ONE such grader a consumer plugs in; the substrate
1791
+ * bakes in NO node/test/TS/exec/regex. `gradeOnHidden` runs that grader
1792
+ * behind the firewall and `blendHeldout` composes its pass rate with a
1793
+ * judge score into the final number the leaderboard ranks on.
1794
+ *
1795
+ * Shape mirrors `treatment-gate`/`authenticity`: pure predicates and pure
1796
+ * composition over already-computed values, fail-loud, with the
1797
+ * "which field / which weight / which grader" decisions left as parameters and
1798
+ * no domain literal anywhere in the module.
1799
+ *
1800
+ * Lives next to `test-graded-scenario` and `partition-held-out` — it is a
1801
+ * scorecard/grading concept that makes sense without a running agent loop.
1802
+ */
1803
+
1804
+ /**
1805
+ * Where one scenario field is allowed to flow. The firewall guarantee is keyed
1806
+ * on this tag, not on a field name — a domain can have any number of fields per
1807
+ * destination.
1808
+ *
1809
+ * - `agent-visible` reaches the agent's context during the run (the prompt,
1810
+ * the task statement — what the agent reads to act).
1811
+ * - `develop-against` seeded into the agent's environment during the run so it
1812
+ * can iterate (a visible example/test/reference). The
1813
+ * agent MAY read it — that is intentional (real TDD). Not
1814
+ * a leak: it is example-grade, not the grading criteria.
1815
+ * - `grading-only` the hidden criteria. Used ONLY at grading, after the run
1816
+ * — the held-out suite / answer key / hidden requirements.
1817
+ * Must NEVER reach the agent context. This is what makes a
1818
+ * good score un-memorizable.
1819
+ * - `judge-only` grading context for the judge only (rubric anchors,
1820
+ * design intent). Lives with the judge, never in the agent
1821
+ * context.
1822
+ */
1823
+ type FieldDestination = 'agent-visible' | 'develop-against' | 'grading-only' | 'judge-only';
1824
+ /** True for the destinations whose values must never reach the agent context. */
1825
+ declare function isHiddenDestination(destination: FieldDestination): boolean;
1826
+ /**
1827
+ * A scenario's fields routed by destination. The domain owns the field set
1828
+ * (`TFields` — a record of its named fields to their string-renderable values)
1829
+ * and declares one `FieldDestination` per field. `routeFields` builds this from
1830
+ * a domain's `(value, destination)` map; the firewall reads it.
1831
+ */
1832
+ interface RoutedField {
1833
+ /** The field's name — for diagnostics only. */
1834
+ name: string;
1835
+ /** The field's value as it would be rendered into text. The firewall compares
1836
+ * this against the agent context, so a domain that ships structured data
1837
+ * passes a stable string projection (e.g. JSON) of the hidden value. */
1838
+ value: string;
1839
+ destination: FieldDestination;
1840
+ }
1841
+ /**
1842
+ * Route a domain's named fields by destination into the firewall's input shape.
1843
+ * The `routing` declares each field's destination; the `values` carry each
1844
+ * field's renderable string. A field present in `routing` but missing from
1845
+ * `values` is an authoring error (fail loud) — every routed field must have a
1846
+ * value the firewall can check.
1847
+ */
1848
+ declare function routeFields<TName extends string>(routing: Readonly<Record<TName, FieldDestination>>, values: Readonly<Record<TName, string>>): RoutedField[];
1849
+ /** A single detected leak: a hidden field whose value appears in the agent context. */
1850
+ interface HiddenLeak {
1851
+ field: string;
1852
+ destination: FieldDestination;
1853
+ }
1854
+ interface NoLeakOptions {
1855
+ /** Minimum hidden-value length to check. A hidden value shorter than this is
1856
+ * skipped — a one-word or empty hidden field would substring-match innocuous
1857
+ * prose and is not meaningful evidence of a leak. Default 12. */
1858
+ minMatchLength?: number;
1859
+ }
1860
+ /**
1861
+ * The FIREWALL. Throws `ValidationError` if any `grading-only`/`judge-only`
1862
+ * field's value is found inside `agentContext` — the exact text that reaches the
1863
+ * agent during the run (its prompt, its seeded files concatenated, whatever the
1864
+ * caller assembled). `agent-visible` and `develop-against` fields are never
1865
+ * checked: they are meant to be there.
1866
+ *
1867
+ * Substring containment is the check: it is domain-free and catches the failure
1868
+ * that matters — a hidden answer key, held-out case, or rubric anchor pasted
1869
+ * into the prompt. Returns the routed fields on success so a caller can chain.
1870
+ */
1871
+ declare function assertNoHiddenLeak(fields: readonly RoutedField[], agentContext: string, opts?: NoLeakOptions): readonly RoutedField[];
1872
+ /** Collect the values a domain may safely render into the agent context — the
1873
+ * `agent-visible` (and, by intent, `develop-against`) fields — so a caller can
1874
+ * ASSEMBLE the context from the routing rather than hand-picking fields and
1875
+ * risking a slip. `develop-against` is included because it is seeded into the
1876
+ * agent's environment during the run on purpose. */
1877
+ declare function agentVisibleFields(fields: readonly RoutedField[]): RoutedField[];
1878
+ /** What a hidden-criteria grader reports. `passRate = passed / total` over the
1879
+ * hidden checks; `total === 0` means the criteria never ran (e.g. the artifact
1880
+ * did not even load) — an honest zero, never a spurious pass. */
1881
+ interface HiddenGradeResult {
1882
+ /** Hidden checks that passed. */
1883
+ passed: number;
1884
+ /** Total hidden checks attempted. 0 when the criteria could not run at all. */
1885
+ total: number;
1886
+ /** `passed / total`, or 0 when `total === 0`. The PRIMARY correctness score. */
1887
+ passRate: number;
1888
+ /** Free-form provenance the caller may record (runner output, reason for 0). */
1889
+ notes?: string;
1890
+ }
1891
+ /**
1892
+ * The domain's grader: given the agent's artifact and the HIDDEN criteria,
1893
+ * return a pass rate. This is the ONE seam a non-coding domain implements — the
1894
+ * coding node-test executor is a single implementation of it; a legal grader
1895
+ * checks the brief against hidden required holdings, a research grader checks an
1896
+ * answer against held-out facts, a tax grader runs hidden return assertions.
1897
+ * The substrate calls it ONLY at grading time, behind the firewall.
1898
+ *
1899
+ * `THidden` is the domain's hidden-criteria payload (the held-out suite, the
1900
+ * answer key, the hidden requirements) — opaque to the substrate.
1901
+ */
1902
+ type HiddenCriteriaGrader<TArtifact, THidden> = (artifact: TArtifact, hiddenCriteria: THidden, signal?: AbortSignal) => Promise<HiddenGradeResult> | HiddenGradeResult;
1903
+ /** Normalize a grader's raw `{passed, total}` into a `HiddenGradeResult` with a
1904
+ * consistent, fail-loud `passRate` — the canonical "honest zero on no-run"
1905
+ * rule, single-sourced so every domain grader gets it. */
1906
+ declare function hiddenGrade(passed: number, total: number, notes?: string): HiddenGradeResult;
1907
+ /**
1908
+ * Run a domain's hidden-criteria grader behind the firewall. Before grading, it
1909
+ * re-asserts the firewall against the agent context the run actually used —
1910
+ * proving (at grading time, on real data) that the hidden criteria never
1911
+ * reached the agent — then invokes the grader and returns its pass rate. A
1912
+ * domain that wants the firewall and the grader wired together in one call uses
1913
+ * this; a domain that already asserted the firewall at dispatch time can call
1914
+ * its grader directly and feed the result to `blendHeldout`.
1915
+ */
1916
+ declare function gradeOnHidden<TArtifact, THidden>(args: {
1917
+ artifact: TArtifact;
1918
+ hiddenCriteria: THidden;
1919
+ grader: HiddenCriteriaGrader<TArtifact, THidden>;
1920
+ /** The routed fields + the exact agent context, re-checked before grading. */
1921
+ firewall: {
1922
+ fields: readonly RoutedField[];
1923
+ agentContext: string;
1924
+ options?: NoLeakOptions;
1925
+ };
1926
+ signal?: AbortSignal;
1927
+ }): Promise<HiddenGradeResult>;
1928
+ /** Weights for the held-out / judge blend. Must be finite and non-negative;
1929
+ * they are renormalized to sum to 1 so a caller can pass any positive ratio. */
1930
+ interface BlendWeights {
1931
+ /** Weight on the hidden-criteria pass rate (the primary, ungameable score). */
1932
+ heldout: number;
1933
+ /** Weight on the judge's quality composite (the secondary style/quality score). */
1934
+ judge: number;
1935
+ }
1936
+ /** Default blend: 0.7 hidden correctness, 0.3 judge quality. The coding bench's
1937
+ * long-standing split — execution truth dominates, style refines. */
1938
+ declare const defaultBlendWeights: BlendWeights;
1939
+ /** The input shape a judge's `score` receives — exactly `JudgeConfig.score`'s
1940
+ * argument: the artifact, plus any scenario/signal fields the judge carries.
1941
+ * `withHeldoutBlend` only reads `artifact`; the rest rides through. */
1942
+ interface JudgeScoreInput<TArtifact> {
1943
+ artifact: TArtifact;
1944
+ /** Pass-through for the judge's extra input fields (scenario, signal). */
1945
+ [key: string]: unknown;
1946
+ }
1947
+ /**
1948
+ * Compose the PRIMARY hidden-criteria pass rate with the SECONDARY judge
1949
+ * composite into the single score the leaderboard ranks on. Weights are
1950
+ * renormalized, so a solution that fails the hidden criteria is capped low no
1951
+ * matter how the judge felt about its style, while a stylistically-mediocre but
1952
+ * CORRECT solution still earns the bulk of the points. Both inputs are clamped
1953
+ * to [0,1] — a judge on a non-unit scale must be normalized by the caller first.
1954
+ */
1955
+ declare function blendHeldout(heldoutPassRate: number, judgeScore: number, weights?: BlendWeights): number;
1956
+ /**
1957
+ * Wrap a judge's `score` so the `composite` it REPORTS is the held-out-weighted
1958
+ * blend. The judge still scores its quality dimensions (recorded, secondary),
1959
+ * but the composite that downstream selection/scorecard reads becomes
1960
+ * `blendHeldout(heldoutPassRate(artifact), judgeComposite, weights)`. The held-
1961
+ * out pass rate is read off the artifact via `heldoutPassRate` — already
1962
+ * computed before the judge runs — so no second grading pass is needed.
1963
+ *
1964
+ * Generic over the artifact type, inferred from `heldoutPassRate`, so it
1965
+ * composes with both a `campaign` `JudgeConfig.score` and a bare scoring
1966
+ * function. The input is the judge's `{ artifact, ... }` — any extra fields
1967
+ * (`scenario`, `signal`) ride through untouched via the index signature.
1968
+ */
1969
+ declare function withHeldoutBlend<TArtifact>(score: (input: JudgeScoreInput<TArtifact>) => JudgeScore | Promise<JudgeScore>, heldoutPassRate: (artifact: TArtifact) => number, weights?: BlendWeights): (input: JudgeScoreInput<TArtifact>) => Promise<JudgeScore>;
1970
+
1656
1971
  /**
1657
1972
  * Collision-resistant, path-safe, human-readable profile id for eval artifacts.
1658
1973
  * Scorecard joins still use `agentProfileHash`; this id is for run ids, matrix
@@ -5658,4 +5973,4 @@ type CachedJudge<TArtifact, TScenario extends Scenario$1 = Scenario$1> = JudgeCo
5658
5973
  */
5659
5974
  declare function cachedJudge<TArtifact, TScenario extends Scenario$1 = Scenario$1>(judge: JudgeConfig<TArtifact, TScenario>, store: VerdictCacheStore, options: CachedJudgeOptions): CachedJudge<TArtifact, TScenario>;
5660
5975
 
5661
- export { ATTESTATION_ALGORITHM, type ActiveLearningOptions, type AdapterRun, AgentDriver, type AgentDriverConfig, AgentEvalError, type AgreementResult, type AlignmentOp, AnalyzeTracesInput, AnalyzeTracesOptions, AnalyzeTracesResult, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, type AssertCrossFamilyOptions, type AssertSingleBackendOptions, type AttestationProvenance, type AttestationVerification, type AttestedReport, type AutoPrClient, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, type BackendDescriptor, BaselineReport, BehaviorAssertion, BenchmarkReport, BenchmarkRunner, BenchmarkRunnerConfig, type BisectOptions, type BisectResult, type BisectStep, BudgetBreachError, BudgetGuard, BudgetLedgerEntry, BudgetSpec, type BuildAgreementJudgeOptions, type CachedJudge, type CachedJudgeOptions, CallExpectation, type CanaryAlert, type CanaryKind, type CanaryLeak, type CanaryOptions, type CanaryReport, type CanarySeverity, type CandidateComparison, type CandidateScenario, type CausalAttributionReport, type CellVerdict, ChannelRollup, ChatRequest, CheckResult, CollectedArtifacts, type CommandRunner, type CompareLabels, CompletionCriterion, ConfigError, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractCheckResult, type ContractJudgeOptions, type ContractMetric, type ContractReport, type ContractRule, type ContractRuleKind, type ContractSpan, type ContractVerdict, type ContractViolation, ConvergenceTracker, CorrectnessChecker, type CostEntry, CostLedger, type CostReport, type CostSummary, CostTracker, CreateChatClientOpts, type CreateDefaultReviewerOptions, type CreateExperimentInput, type CreateSandboxPoolOpts, CrossFamilyError, type CrossTraceDiff, type CrossTraceDiffOptions, DEFAULT_AGENT_SLOS, DEFAULT_FINDERS, DEFAULT_MUTATION_PRIMITIVES, DEFAULT_MUTATORS, DEFAULT_PR_REVIEW_SCORE_WEIGHTS, DEFAULT_SEVERITY_WEIGHTS, Dataset, DatasetScenario, type DecideNextUserTurnOpts, DefaultVerdict, type DeployFamily, type DeployGateLayerInput, type DeployRunResult, type DeployRunner, type DescriptionLengthCandidate, type DescriptionLengthConfig, type DescriptionLengthDecision, type DescriptionLengthEvidence, DescriptionLengthGate, type DescriptionLengthRejectionCode, type DetectorEvent, type DetectorSeverity, type DetectorSignal, type DiffScorecardOptions, type DirEntry, type DiscoverPersonasOptions, type DiscoveredPersona, DriverResult, DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, ERROR_COUNT_PATTERNS, type EnsembleAggregate, type EnsembleJudgeOptions, type ErrorCountPattern, type ErrorStreakOptions, type EvalToolDef, EvalTraceStore, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type ExperimentProvenance, type ExperimentRep, type ExperimentStats, type ExperimentStore, ExperimentTracker, type ExperimentTrackerOptions, type ExperimentVerdict, type ExportedRewardModel, type ExtractOptions, type ExtractResult, type FactorContribution, type FactorialCell, FailureClass, FeedbackLabel, FeedbackTrajectory, FeedbackTrajectoryStore, type FieldAgreementSpec, type FileChange, type FlowAction, type FlowLayerEnv, type FlowLayerFactoryInput, type FlowRunner, type FlowRunnerStepResult, type FlowSpec, type FlowStep, type GhCliClientOptions, type GoldScenario, type GoldSplit, type GoldenSeverity, type GoldenSpec, HarnessConfig, type HeldOutPartition, HoldoutAuditor, type HttpGithubClientOptions, INTENT_MATCH_JUDGE_VERSION, type ImageData, type ImprovementThresholds, type ImprovementVerdictResult, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type IntentMatchInput, type IntentMatchOptions, type IntentMatchResult, type InteractionContribution, JudgeError, type JudgeFamily, type JudgeFleetOptions, JudgeFn, JudgeParseError, type JudgeReplayResult, type JudgeRetryOutcome, type JudgeRetryPolicy, JudgeRunner, type JudgeVerdict, type KeywordConceptSpec, type KeywordCoverageFinding, type KeywordCoverageOptions, type KeywordCoverageResult, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, Layer, LayerResult, type LiveProofArtifact, type LiveProofConfig, type LiveProofContext, type LiveProofResult, LlmClientOptions, LlmSpan, MODEL_PRICING, type MakeEvalToolsConfig, type MatchResult, type MatcherResult, type MergeOptions, MetricsCollector, type ModelCostRollup, type ModelPreflight, type ModelSeats, ModelsUnreachableError, type MuffledFinder, type MuffledFinding, type MultiToolchainLayerConfig, type Mutator, Mutex, type NoProgressOptions, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OrthogonalityInput, type OrthogonalityResult, OtelExportConfig, OtelExporter, type OtelPipelineHandle, type OtelPipelineOptions, PairwiseSteeringOptimizer, type ParaphraseRobustnessScenarioInput, type ParaphraseRobustnessScenarioResult, type ParseStudentLabel, type PartitionHeldOutOptions, PersonaConfig, type Playbook, type PlaybookEntry, type PoolSlot, type PrReviewAuditCase, type PrReviewBenchmarkSummary, type PrReviewComment, type PrReviewMatchedFinding, type PrReviewOutcome, type PrReviewReferenceFinding, type PrReviewScore, type PrReviewScoreWeights, type PrReviewSeverity, type PrReviewSource, type PreflightModelsOptions, type PreflightOutcome, ProductClient, ProductClientConfig, type PromptHandle, PromptRegistry, type ProposeAutomatedPullRequestInput, type ProposeAutomatedPullRequestResult, type ProvenanceReader, type RecordRunsOptions, type ReferenceMatchResult, type ReferenceReplayAdapter, type ReferenceReplayAdapterFn, type ReferenceReplayAdapterLike, type ReferenceReplayAggregate, type ReferenceReplayCandidate, type ReferenceReplayCase, type ReferenceReplayCaseRun, type ReferenceReplayExecutionScenario, type ReferenceReplayItem, type ReferenceReplayMatch, type ReferenceReplayMatchStrategy, type ReferenceReplayMatcher, type ReferenceReplayPromotionDecision, type ReferenceReplayPromotionPolicy, type ReferenceReplayRun, type ReferenceReplayRunContext, type ReferenceReplayRunOptions, type ReferenceReplayRunStore, type ReferenceReplayScenario, type ReferenceReplayScenarioScore, type ReferenceReplayScore, type ReferenceReplayScoreOptions, type ReferenceReplaySplit, type ReferenceReplaySplitComparison, type ReferenceReplaySteeringRowsOptions, type ReflectionContext, type ReflectionProposal, ReleaseConfidenceScorecard, ReleaseConfidenceThresholds, type RenderStudentPrompt, type RepeatedActionOptions, type RepoRef, type ReviewerMemoryEntry, type ReviewerOutput, type ReviewerPromptInput, type ReviewerSoftFailDefaults, type ReviewerVerificationSummary, type RobustnessResult, Run, type RunCommandInput, type RunCommandResult, type RunDistillationOptions, type RunDistillationResult, RunFilter, RunRecord, type RunRecordBackend, type RunRecordFilter, RunScore, RunScoreWeights, RunSplitTag, SandboxDriver, SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxPool, type ScanOptions, Scenario, type ScenarioCost, ScenarioFile, ScenarioRegistry, ScenarioResult, type Scorecard, type ScorecardCell, type ScorecardCellDiff, type ScorecardDiff, type ScorecardEntry, type ScorecardLogLine, type ScoredTarget, type SeatName, type SeatPresetName, SeatUnsetError, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SerializedRegex, Severity, type SingleBackendDivergence, SingleBackendError, type SingleBackendField, type SingleBackendReport, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type SlotFactory, type SpanPredicate, type SplitGoldOptions, SteeringBundle, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type StepAttribution, type StreamingDetector, type SynthesisReason, type SynthesisTarget, TestResult, type TextMatcher, type ThresholdContract, TokenCounter, type TokenSpec, type TraceContract, TraceContractBuilder, TraceEmitter, TraceStore, type TracedAnalystOptions, type TracedJudgeOptions, Trajectory, TrajectoryStep, type TrialTrace, TurnMetrics, UI_FINDING_SEVERITIES, UI_LENSES, UNIVERSAL_FINDERS, type UiFinding, type UiFindingScreenshot, type UiFindingSeverity, type UiLens, type VerdictCacheStats, type VerdictCacheStore, VerifyContext, type VisualDiffOptions, type VisualDiffResult, type ViteDeployRunnerInput, type WorkerDriverContext, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, type WranglerDeployRunnerInput, adversarialJudge, agentProfileHash, agentProfileId, agentProfileModelId, aggregateJudgeVerdicts, aggregatePrReviewScore, analyzeAntiSlop, appendScorecard, assertCrossFamily, assertModelsServed, assertSingleBackend, assignHeldOutTag, attachCostToReport, attest, bisect, buildAgreementJudge, buildDriverSystemPrompt, buildReflectionPrompt, buildReviewerPrompt, buildWorkerDriverSystemPrompt, cachedJudge, canaryLeakView, canonicalJson, causalAttribution, checkBehavioralCanary, checkCanaries, checkSlos, checkTraceContracts, codeExecutionJudge, coherenceJudge, collectionPreserved, commentsForSource, commitBisect, compareReferenceReplay, compilerJudge, computeExperimentStats, contentHash, contractJudge, costReport, createAntiSlopJudge, createCustomJudge, createDefaultReviewer, createDomainExpertJudge, createIntentMatchJudge, createSandboxPool, crossTraceDiff, dataDescriptionBits, decideNextUserTurn, decideReferenceReplayPromotion, decideReferenceReplayRunPromotion, defaultJudges, defaultParseStudentLabel, defaultReferenceReplayMatcher, defaultRenderStudentPrompt, deployGateLayer, diffScorecard, discoverPersonas, distillPlaybook, ensembleJudge, errorStreakDetector, estimateCost, estimateTokens, evaluateContract, evaluateOracles, evaluateTraceContract, executeScenario, expectAgent, exportRewardModel, extractAssetUrls, extractErrorCount, fieldAgreement, fileContains, fileExists, fileExperimentStore, fileVerdictCache, findAutoMatchNoExpectation, findConstructorCwdDropped, findFallbackToPass, findLiteralTruePass, findSkipCountsAsPass, flowLayer, fnv1a32, formatBenchmarkReport, formatDriverReport, formatFindings, formatScorecardDiff, ghCliClient, gitProvenanceReader, precision as goldenPrecision, hashContent, hashToUnit, htmlContainsElement, httpGithubClient, improvementVerdict, inMemoryExperimentStore, inMemoryReferenceReplayStore, inMemoryRunRecordBackend, inMemoryVerdictCache, isModelPriced, isOtelConfigured, jsonShape, jsonlReferenceReplayStore, jsonlRunRecordBackend, judgeFamily, keyPreserved, linterJudge, loadGoldScenarios, loadScorecard, loadScorerFromGrader, localCommandRunner, lowercaseMutator, makeEvalTools, matchGoldens, matchSpan, mergeLayerResults, modelDescriptionBits, multiToolchainLayer, noProgressDetector, notBlocked, observeAll, paraphraseRobustness, paraphraseRobustnessScenarios, parseGoldJsonl, parseReflectionResponse, partitionHeldOut, passOrthogonality, pixelDeltaRatio, politenessPrefixMutator, preflightModels, printDriverSummary, index as profile, promptBisect, proposeAutomatedPullRequest, proposeSynthesisTargets, recordRuns, recordRunsToScorecard, referenceReplayRunsToSteeringRows, referenceReplayScenarioToRunScore, regexMatches, renderMarkdownReport, renderPlaybookMarkdown, repeatedActionDetector, replayScorerOverCorpus, replayTraceThroughJudge, resolveModelPricing, resolveSeat, rowCount, rowWhere, runAssertions, runBehavioralCanaries, runCanaries, runDistillation, runE2EWorkflow, runExpectations, runIntentMatchJudge, runJudgeFleet, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runLiveProof, runReferenceReplay, runScore, runSelfPlay, scanForMuffledGates, scoreContinuity, scorePrReviewComments, scorePrReviewSource, scoreReferenceReplay, seatPresets, securityJudge, sentenceReorderMutator, splitGold, statusAdvanced, summarizePrReviewBenchmark, testJudge, textInSnapshot, toLangfuseEnvelope, toOpenAiTool, toPrometheusText, traceContract, traceJudge, traceJudgeEnsemble, tracedAnalyzeTraces, typoMutator, urlContains, verifyAttestation, visualDiff, viteDeployRunner, weightedRecall, whitespaceCollapseMutator, withJudgeRetry, withOtelPipeline, wranglerDeployRunner };
5976
+ export { ATTESTATION_ALGORITHM, type ActiveLearningOptions, type AdapterRun, AgentDriver, type AgentDriverConfig, AgentEvalError, type AgreementResult, type AlignmentOp, AnalyzeTracesInput, AnalyzeTracesOptions, AnalyzeTracesResult, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, type AssertCrossFamilyOptions, type AssertSingleBackendOptions, type AttestationProvenance, type AttestationVerification, type AttestedReport, type AutoPrClient, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, type BackendDescriptor, BaselineReport, BehaviorAssertion, BehavioralMetrics, BenchmarkReport, BenchmarkRunner, BenchmarkRunnerConfig, type BisectOptions, type BisectResult, type BisectStep, type BlendWeights, BudgetBreachError, BudgetGuard, BudgetLedgerEntry, BudgetSpec, type BuildAgreementJudgeOptions, type CachedJudge, type CachedJudgeOptions, CallExpectation, type CanaryAlert, type CanaryKind, type CanaryLeak, type CanaryOptions, type CanaryReport, type CanarySeverity, type CandidateComparison, type CandidateScenario, type CausalAttributionReport, type CellVerdict, ChannelRollup, ChatRequest, CheckResult, CollectedArtifacts, type CommandRunner, type CompareLabels, CompletionCriterion, ConfigError, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractCheckResult, type ContractJudgeOptions, type ContractMetric, type ContractReport, type ContractRule, type ContractRuleKind, type ContractSpan, type ContractVerdict, type ContractViolation, ConvergenceTracker, CorrectnessChecker, type CostEntry, CostLedger, type CostReport, type CostSummary, CostTracker, CreateChatClientOpts, type CreateDefaultReviewerOptions, type CreateExperimentInput, type CreateSandboxPoolOpts, CrossFamilyError, type CrossTraceDiff, type CrossTraceDiffOptions, DEFAULT_AGENT_SLOS, DEFAULT_FINDERS, DEFAULT_MUTATION_PRIMITIVES, DEFAULT_MUTATORS, DEFAULT_PR_REVIEW_SCORE_WEIGHTS, DEFAULT_SEVERITY_WEIGHTS, Dataset, DatasetScenario, type DecideNextUserTurnOpts, DefaultVerdict, type DeployFamily, type DeployGateLayerInput, type DeployRunResult, type DeployRunner, type DescriptionLengthCandidate, type DescriptionLengthConfig, type DescriptionLengthDecision, type DescriptionLengthEvidence, DescriptionLengthGate, type DescriptionLengthRejectionCode, type DetectorEvent, type DetectorSeverity, type DetectorSignal, type DiffScorecardOptions, type DirEntry, type DiscoverPersonasOptions, type DiscoveredPersona, DriverResult, DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, ERROR_COUNT_PATTERNS, type EnsembleAggregate, type EnsembleJudgeOptions, type ErrorCountPattern, type ErrorStreakOptions, type EvalToolDef, EvalTraceStore, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type ExperimentProvenance, type ExperimentRep, type ExperimentStats, type ExperimentStore, ExperimentTracker, type ExperimentTrackerOptions, type ExperimentVerdict, type ExportedRewardModel, type ExtractOptions, type ExtractResult, type FactorContribution, type FactorialCell, FailureClass, FeedbackLabel, FeedbackTrajectory, FeedbackTrajectoryStore, type FieldAgreementSpec, type FieldDestination, type FileChange, type FlowAction, type FlowLayerEnv, type FlowLayerFactoryInput, type FlowRunner, type FlowRunnerStepResult, type FlowSpec, type FlowStep, type GhCliClientOptions, type GoldScenario, type GoldSplit, type GoldenSeverity, type GoldenSpec, HarnessConfig, type HeldOutPartition, type HiddenCriteriaGrader, type HiddenGradeResult, type HiddenLeak, HoldoutAuditor, type HttpGithubClientOptions, INTENT_MATCH_JUDGE_VERSION, type ImageData, type ImprovementThresholds, type ImprovementVerdictResult, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type IntentMatchInput, type IntentMatchOptions, type IntentMatchResult, type InteractionContribution, JudgeError, type JudgeFamily, type JudgeFleetOptions, JudgeFn, JudgeParseError, type JudgeReplayResult, type JudgeRetryOutcome, type JudgeRetryPolicy, JudgeRunner, type JudgeScoreInput, type JudgeVerdict, type KeywordConceptSpec, type KeywordCoverageFinding, type KeywordCoverageOptions, type KeywordCoverageResult, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, Layer, LayerResult, type LiveProofArtifact, type LiveProofConfig, type LiveProofContext, type LiveProofResult, LlmClientOptions, LlmSpan, MODEL_PRICING, type MakeEvalToolsConfig, type MatchResult, type MatcherResult, type MergeOptions, MetricsCollector, type ModelCostRollup, type ModelPreflight, type ModelSeats, ModelsUnreachableError, type MuffledFinder, type MuffledFinding, type MultiToolchainLayerConfig, type Mutator, Mutex, type NoLeakOptions, type NoProgressOptions, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OrthogonalityInput, type OrthogonalityResult, OtelExportConfig, OtelExporter, type OtelPipelineHandle, type OtelPipelineOptions, PairwiseSteeringOptimizer, type ParaphraseRobustnessScenarioInput, type ParaphraseRobustnessScenarioResult, type ParseStudentLabel, type PartitionHeldOutOptions, PersonaConfig, type Playbook, type PlaybookEntry, type PoolSlot, type PrReviewAuditCase, type PrReviewBenchmarkSummary, type PrReviewComment, type PrReviewMatchedFinding, type PrReviewOutcome, type PrReviewReferenceFinding, type PrReviewScore, type PrReviewScoreWeights, type PrReviewSeverity, type PrReviewSource, type PreflightModelsOptions, type PreflightOutcome, ProductClient, ProductClientConfig, type PromptHandle, PromptRegistry, type ProposeAutomatedPullRequestInput, type ProposeAutomatedPullRequestResult, type ProvenanceReader, type RecordRunsOptions, type ReferenceMatchResult, type ReferenceReplayAdapter, type ReferenceReplayAdapterFn, type ReferenceReplayAdapterLike, type ReferenceReplayAggregate, type ReferenceReplayCandidate, type ReferenceReplayCase, type ReferenceReplayCaseRun, type ReferenceReplayExecutionScenario, type ReferenceReplayItem, type ReferenceReplayMatch, type ReferenceReplayMatchStrategy, type ReferenceReplayMatcher, type ReferenceReplayPromotionDecision, type ReferenceReplayPromotionPolicy, type ReferenceReplayRun, type ReferenceReplayRunContext, type ReferenceReplayRunOptions, type ReferenceReplayRunStore, type ReferenceReplayScenario, type ReferenceReplayScenarioScore, type ReferenceReplayScore, type ReferenceReplayScoreOptions, type ReferenceReplaySplit, type ReferenceReplaySplitComparison, type ReferenceReplaySteeringRowsOptions, type ReflectionContext, type ReflectionProposal, ReleaseConfidenceScorecard, ReleaseConfidenceThresholds, type RenderStudentPrompt, type RepeatedActionOptions, type RepoRef, type ReviewerMemoryEntry, type ReviewerOutput, type ReviewerPromptInput, type ReviewerSoftFailDefaults, type ReviewerVerificationSummary, type RobustnessResult, type RoutedField, Run, type RunCommandInput, type RunCommandResult, type RunDistillationOptions, type RunDistillationResult, RunFilter, RunRecord, type RunRecordBackend, type RunRecordFilter, RunScore, RunScoreWeights, RunSplitTag, SandboxDriver, SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxPool, type ScanOptions, Scenario, type ScenarioCost, ScenarioFile, ScenarioRegistry, ScenarioResult, type Scorecard, type ScorecardCell, type ScorecardCellDiff, type ScorecardDiff, type ScorecardEntry, type ScorecardLogLine, type ScoredTarget, type SeatName, type SeatPresetName, SeatUnsetError, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SerializedRegex, Severity, type SingleBackendDivergence, SingleBackendError, type SingleBackendField, type SingleBackendReport, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type SlotFactory, type SpanPredicate, type SplitGoldOptions, SteeringBundle, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type StepAttribution, type StreamingDetector, type SynthesisReason, type SynthesisTarget, TestResult, type TextMatcher, type ThresholdContract, TokenCounter, type TokenSpec, type ToolMatcher, ToolSpan, TraceAnalystSpan, type TraceContract, TraceContractBuilder, TraceEmitter, TraceStore, type TracedAnalystOptions, type TracedJudgeOptions, Trajectory, TrajectoryStep, type TreatmentClass, type TreatmentGate, type TreatmentGateInput, type TreatmentGateOptions, type TrialTrace, TurnMetrics, UI_FINDING_SEVERITIES, UI_LENSES, UNIVERSAL_FINDERS, type UiFinding, type UiFindingScreenshot, type UiFindingSeverity, type UiLens, type VerdictCacheStats, type VerdictCacheStore, VerifyContext, type VisualDiffOptions, type VisualDiffResult, type ViteDeployRunnerInput, type WorkerDriverContext, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, type WranglerDeployRunnerInput, adversarialJudge, agentProfileHash, agentProfileId, agentProfileModelId, agentVisibleFields, aggregateJudgeVerdicts, aggregatePrReviewScore, analyzeAntiSlop, appendScorecard, assertCrossFamily, assertModelsServed, assertNoHiddenLeak, assertSingleBackend, assignHeldOutTag, attachCostToReport, attest, bisect, blendHeldout, buildAgreementJudge, buildDriverSystemPrompt, buildReflectionPrompt, buildReviewerPrompt, buildWorkerDriverSystemPrompt, cachedJudge, canaryLeakView, canonicalJson, causalAttribution, checkBehavioralCanary, checkCanaries, checkSlos, checkTraceContracts, classifyTreatment, codeExecutionJudge, coherenceJudge, collectionPreserved, commentsForSource, commitBisect, compareReferenceReplay, compilerJudge, computeExperimentStats, contentHash, contractJudge, costReport, createAntiSlopJudge, createCustomJudge, createDefaultReviewer, createDomainExpertJudge, createIntentMatchJudge, createSandboxPool, crossTraceDiff, dataDescriptionBits, decideNextUserTurn, decideReferenceReplayPromotion, decideReferenceReplayRunPromotion, defaultBlendWeights, defaultJudges, defaultParseStudentLabel, defaultReferenceReplayMatcher, defaultRenderStudentPrompt, deployGateLayer, diffScorecard, discoverPersonas, distillPlaybook, ensembleJudge, errorStreakDetector, estimateCost, estimateTokens, evaluateContract, evaluateOracles, evaluateTraceContract, executeScenario, expectAgent, exportRewardModel, extractAssetUrls, extractErrorCount, fieldAgreement, fileContains, fileExists, fileExperimentStore, fileVerdictCache, findAutoMatchNoExpectation, findConstructorCwdDropped, findFallbackToPass, findLiteralTruePass, findSkipCountsAsPass, flowLayer, fnv1a32, formatBenchmarkReport, formatDriverReport, formatFindings, formatScorecardDiff, gateTreatmentApplied, gateTreatmentFromMetrics, gateTreatmentFromSpans, gateTreatmentFromToolSpans, ghCliClient, gitProvenanceReader, precision as goldenPrecision, gradeOnHidden, hashContent, hashToUnit, hiddenGrade, htmlContainsElement, httpGithubClient, improvementVerdict, inMemoryExperimentStore, inMemoryReferenceReplayStore, inMemoryRunRecordBackend, inMemoryVerdictCache, isHiddenDestination, isModelPriced, isOtelConfigured, jsonShape, jsonlReferenceReplayStore, jsonlRunRecordBackend, judgeFamily, keyPreserved, linterJudge, loadGoldScenarios, loadScorecard, loadScorerFromGrader, localCommandRunner, lowercaseMutator, makeEvalTools, matchGoldens, matchSpan, mergeLayerResults, modelDescriptionBits, multiToolchainLayer, noProgressDetector, notBlocked, observeAll, paraphraseRobustness, paraphraseRobustnessScenarios, parseGoldJsonl, parseReflectionResponse, partitionHeldOut, passOrthogonality, pixelDeltaRatio, politenessPrefixMutator, preflightModels, printDriverSummary, index as profile, promptBisect, proposeSynthesisTargets, recordRuns, recordRunsToScorecard, referenceReplayRunsToSteeringRows, referenceReplayScenarioToRunScore, regexMatches, renderMarkdownReport, renderPlaybookMarkdown, repeatedActionDetector, replayScorerOverCorpus, replayTraceThroughJudge, resolveModelPricing, resolveSeat, routeFields, rowCount, rowWhere, runAssertions, runBehavioralCanaries, runCanaries, runDistillation, runE2EWorkflow, runExpectations, runIntentMatchJudge, runJudgeFleet, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runLiveProof, runReferenceReplay, runScore, runSelfPlay, scanForMuffledGates, scoreContinuity, scorePrReviewComments, scorePrReviewSource, scoreReferenceReplay, seatPresets, securityJudge, sentenceReorderMutator, splitGold, statusAdvanced, summarizePrReviewBenchmark, testJudge, textInSnapshot, toLangfuseEnvelope, toOpenAiTool, toPrometheusText, traceContract, traceJudge, traceJudgeEnsemble, tracedAnalyzeTraces, typoMutator, urlContains, verifyAttestation, visualDiff, viteDeployRunner, weightedRecall, whitespaceCollapseMutator, withHeldoutBlend, withJudgeRetry, withOtelPipeline, wranglerDeployRunner };