@tangle-network/agent-eval 1.0.34 → 1.0.36

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 (74) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/adapters/http.d.ts +2 -2
  3. package/dist/analyst/index.d.ts +3 -3
  4. package/dist/app-grade/index.d.ts +2 -2
  5. package/dist/benchmarks/index.d.ts +90 -8
  6. package/dist/benchmarks/index.d.ts.map +1 -1
  7. package/dist/benchmarks/index.js +592 -52
  8. package/dist/benchmarks/index.js.map +1 -1
  9. package/dist/campaign/index.d.ts +5 -5
  10. package/dist/campaign/index.js +5 -5
  11. package/dist/{campaign-BOoc6hc3.js → campaign-CifihyXp.js} +4 -4
  12. package/dist/{campaign-BOoc6hc3.js.map → campaign-CifihyXp.js.map} +1 -1
  13. package/dist/{campaign-evidence-DGTNdS_7.js → campaign-evidence-BPaJAccn.js} +27 -3
  14. package/dist/campaign-evidence-BPaJAccn.js.map +1 -0
  15. package/dist/contract/index.d.ts +8 -8
  16. package/dist/contract/index.js +5 -5
  17. package/dist/{default-registry-2Ziw-0sL.d.ts → default-registry-CfZCJdJT.d.ts} +2 -2
  18. package/dist/{default-registry-2Ziw-0sL.d.ts.map → default-registry-CfZCJdJT.d.ts.map} +1 -1
  19. package/dist/{define-agent-eval-DmCV1TZo.d.ts → define-agent-eval-C4v1f7hM.d.ts} +5 -5
  20. package/dist/{define-agent-eval-DmCV1TZo.d.ts.map → define-agent-eval-C4v1f7hM.d.ts.map} +1 -1
  21. package/dist/{define-agent-eval-Cw0HHdMF.js → define-agent-eval-DkvfaHya.js} +3 -3
  22. package/dist/{define-agent-eval-Cw0HHdMF.js.map → define-agent-eval-DkvfaHya.js.map} +1 -1
  23. package/dist/{evaluation-BQQ2ga5W.d.ts → evaluation-imW3I7tD.d.ts} +2 -2
  24. package/dist/{evaluation-BQQ2ga5W.d.ts.map → evaluation-imW3I7tD.d.ts.map} +1 -1
  25. package/dist/evaluation.d.ts +1 -1
  26. package/dist/experiment/index.d.ts +1 -1
  27. package/dist/experiment/index.js +1 -1
  28. package/dist/{index-8hbrQwdR.d.ts → index-0xdMmIi4.d.ts} +10 -5
  29. package/dist/index-0xdMmIi4.d.ts.map +1 -0
  30. package/dist/{index-BwJtNdaj.d.ts → index-BmtnyRsI.d.ts} +11 -11
  31. package/dist/{index-BwJtNdaj.d.ts.map → index-BmtnyRsI.d.ts.map} +1 -1
  32. package/dist/{index-BnqugnsM.d.ts → index-C8OFP1qj.d.ts} +6 -6
  33. package/dist/{index-BnqugnsM.d.ts.map → index-C8OFP1qj.d.ts.map} +1 -1
  34. package/dist/{index-BFpDeCuS.d.ts → index-CeTno9aO.d.ts} +2 -2
  35. package/dist/{index-BFpDeCuS.d.ts.map → index-CeTno9aO.d.ts.map} +1 -1
  36. package/dist/{index-BfxYoHGF.d.ts → index-_Gwk9sZl.d.ts} +2 -2
  37. package/dist/{index-BfxYoHGF.d.ts.map → index-_Gwk9sZl.d.ts.map} +1 -1
  38. package/dist/index.d.ts +11 -11
  39. package/dist/index.js +4 -156
  40. package/dist/index.js.map +1 -1
  41. package/dist/{llm-judge-DOgWUOml.js → llm-judge-DXygU107.js} +39 -5
  42. package/dist/llm-judge-DXygU107.js.map +1 -0
  43. package/dist/{matrix-D0fEU0fq.d.ts → matrix-Bk8Iz49C.d.ts} +2 -2
  44. package/dist/{matrix-D0fEU0fq.d.ts.map → matrix-Bk8Iz49C.d.ts.map} +1 -1
  45. package/dist/multishot/golden/index.d.ts +1 -1
  46. package/dist/multishot/index.d.ts +2 -2
  47. package/dist/openapi.json +1 -1
  48. package/dist/rl.d.ts +1 -1
  49. package/dist/rollout/index.d.ts +2 -2
  50. package/dist/search/index.d.ts +2 -2
  51. package/dist/{search-kernel-IpyhPDQd.d.ts → search-kernel-BigyOZX3.d.ts} +2 -2
  52. package/dist/{search-kernel-IpyhPDQd.d.ts.map → search-kernel-BigyOZX3.d.ts.map} +1 -1
  53. package/dist/{skillopt-optimization-method-lDHnLno3.js → skillopt-optimization-method-D3xC4hG9.js} +3 -3
  54. package/dist/{skillopt-optimization-method-lDHnLno3.js.map → skillopt-optimization-method-D3xC4hG9.js.map} +1 -1
  55. package/dist/{statistical-heldout-AvgLVFp6.d.ts → statistical-heldout-Bx4q4NUa.d.ts} +4 -2
  56. package/dist/statistical-heldout-Bx4q4NUa.d.ts.map +1 -0
  57. package/dist/{systemone-DPVj7a1g.d.ts → systemone-Dpp7I3uV.d.ts} +3 -3
  58. package/dist/{systemone-DPVj7a1g.d.ts.map → systemone-Dpp7I3uV.d.ts.map} +1 -1
  59. package/dist/systemone.d.ts +2 -2
  60. package/dist/{types-qJwFZTqa.d.ts → types-BeJIREX-.d.ts} +6 -1
  61. package/dist/types-BeJIREX-.d.ts.map +1 -0
  62. package/dist/{types-rf0yhJmW.d.ts → types-ff0YYJnj.d.ts} +69 -3
  63. package/dist/types-ff0YYJnj.d.ts.map +1 -0
  64. package/dist/verification-strategy-CYhDX1rE.js +156 -0
  65. package/dist/verification-strategy-CYhDX1rE.js.map +1 -0
  66. package/dist/wire/index.d.ts +3 -3
  67. package/docs/evaluation-integrity.md +14 -0
  68. package/package.json +1 -1
  69. package/dist/campaign-evidence-DGTNdS_7.js.map +0 -1
  70. package/dist/index-8hbrQwdR.d.ts.map +0 -1
  71. package/dist/llm-judge-DOgWUOml.js.map +0 -1
  72. package/dist/statistical-heldout-AvgLVFp6.d.ts.map +0 -1
  73. package/dist/types-qJwFZTqa.d.ts.map +0 -1
  74. package/dist/types-rf0yhJmW.d.ts.map +0 -1
@@ -2,7 +2,7 @@ import { a as RunRecord } from "./run-record-hti3ETmO.js";
2
2
  import { B as FindingTreatment } from "./types-Dtt11Ppr.js";
3
3
  import { F as PairedBootstrapResult, G as McNemarResult, P as PairedBootstrapOptions, f as EProcessState, q as RiskDifferenceResult } from "./index-Bcy00QoN.js";
4
4
  import { r as LedgerHash } from "./canonical-gLeHiqzd.js";
5
- import { R as Scenario, a as CampaignResult, b as GenerationRecord, h as GateContext, j as MutableSurface, p as Gate, v as GateResult, w as JudgeScore } from "./types-qJwFZTqa.js";
5
+ import { R as Scenario, a as CampaignResult, b as GenerationRecord, h as GateContext, j as MutableSurface, p as Gate, v as GateResult, w as JudgeScore } from "./types-BeJIREX-.js";
6
6
  import { a as PairedPromotionDecision, i as PairedMcNemarEvidence, r as PairedDecisionStatistic, t as PairedDecisionMethod } from "./paired-promotion-decision-BBSxTo-h.js";
7
7
  import { z } from "zod";
8
8
  declare const reservationSchema: z.ZodObject<{
@@ -11,6 +11,8 @@ declare const reservationSchema: z.ZodObject<{
11
11
  populationId: z.ZodString;
12
12
  inputDigest: z.ZodString;
13
13
  unitIds: z.ZodArray<z.ZodString>;
14
+ sourceDigests: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
+ developmentSourceDigests: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
16
  }, z.core.$strict>;
15
17
  /** One final dataset reserved for one adaptive decision, across processes and campaigns. */
16
18
  type FinalEvidenceReservation = z.infer<typeof reservationSchema>;
@@ -997,4 +999,4 @@ declare function dimensionRegressions(candidate: Map<string, Record<string, Judg
997
999
  minProductiveRuns?: number;
998
1000
  }): DimensionRegression[];
999
1001
  export { paretoPolicy as $, PairRunRecordsResult as A, ArmPopulationSummary as B, signManifest as C, FinalEvidenceError as Ct, MatchedRunRecordPair as D, FinalEvidenceRecord as Dt, MatchedPair as E, FinalEvidenceOutcome as Et, comparePairedArms as F, AxisVerdict as G, PowerPreflightOptions as H, pairArms as I, ObjectiveSource as J, BuildEvidenceVectorOptions as K, pairRunRecords as L, PairedArmsComparison as M, PairedCorrectness as N, PairArmsOptions as O, FinalEvidenceReservation as Ot, PairedMetricDelta as P, buildEvidenceVector as Q, ArmAssignment as R, manifestContentDigest as S, FinalEvidenceConflictError as St, ComparePairedArmsOptions as T, FinalEvidenceMeasurement as Tt, powerPreflight as U, PowerPreflight as V, AxisEvidence as W, PromotionObjective as X, ParetoSignificanceGateOptions as Y, PromotionPolicy as Z, HypothesisManifest as _, AttestationProvenance as _t, dimensionRegressions as a, CampaignEvidenceContext as at, SignedManifestAlgo as b, attest as bt, SequentialDecideFn as c, EvidenceAuthority as ct, SequentialObservation as d, EvidenceReceipt as dt, paretoSignificanceGate as et, SequentialPairedGate as f, EvidenceReceiptVerification as ft, sequentialPairedGate as g, ATTESTATION_ALGORITHM as gt, sequentialDecide as h, verifyEvidenceReceipt as ht, PairedHoldout as i, paretoFrontier as it, PairedArmRow as j, PairArmsResult as k, openFinalEvidenceLedger as kt, SequentialDecideOptions as l, EvidenceAuthorityKind as lt, SequentialStreamState as m, isIndependentEvidence as mt, HeldoutSignificance as n, ParetoResult as nt, heldoutSignificance as o, createCampaignEvidenceReceipt as ot, SequentialPairedGateOptions as p, createEvidenceReceipt as pt, EvidenceVector as q, HeldoutSignificanceOptions as r, dominates as rt, pairHoldout as s, CreateEvidenceReceiptInput as st, DimensionRegression as t, Objective as tt, SequentialGateDecision as u, EvidenceBinding as ut, HypothesisResult as v, AttestationVerification as vt, verifyManifest as w, FinalEvidenceLedger as wt, hashJson as x, verifyAttestation as xt, SignedManifest as y, AttestedReport as yt, ArmPopulationReading as z };
1000
- //# sourceMappingURL=statistical-heldout-AvgLVFp6.d.ts.map
1002
+ //# sourceMappingURL=statistical-heldout-Bx4q4NUa.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statistical-heldout-Bx4q4NUa.d.ts","names":["_$__evidence_receipt0.EvidenceReceipt"],"sources":["../src/experiment/final-evidence.ts","../src/attestation.ts","../src/experiment/evidence-receipt.ts","../src/experiment/campaign-evidence.ts","../src/pareto.ts","../src/campaign/gates/promotion-policy.ts","../src/campaign/gates/power-preflight.ts","../src/arm-populations.ts","../src/paired-arms.ts","../src/pre-registration.ts","../src/campaign/gates/sequential.ts","../src/campaign/gates/statistical-heldout.ts"],"mappings":";;;;;;;cASM,mBAAiB,EAAA;;;;;;;;GAUZ,EAAA,KAAA;;KAGC,2B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ostReceiptInput, m as CustomTokenPricing } from "./cost-ledger-Czro9wmo.js";
2
2
  import { D as FindingLayer, M as FindingScope, T as FindingCalibration, i as AnalystFinding, m as EvidenceRef, n as AnalystContext, t as Analyst } from "./types-Dtt11Ppr.js";
3
3
  import { r as LedgerHash } from "./canonical-gLeHiqzd.js";
4
- import { R as Scenario, S as JudgeConfig, w as JudgeScore } from "./types-qJwFZTqa.js";
4
+ import { R as Scenario, S as JudgeConfig, w as JudgeScore } from "./types-BeJIREX-.js";
5
5
  import { l as ExactCapableAnalyst } from "./exact-types-xrjBO9sb.js";
6
- import { a as EvaluationResult, o as EvaluatorOptions, r as EvaluationContext } from "./evaluation-BQQ2ga5W.js";
6
+ import { a as EvaluationResult, o as EvaluatorOptions, r as EvaluationContext } from "./evaluation-imW3I7tD.js";
7
7
  import { a as SystemOneJson, d as SystemOneRequest, g as SystemOneState, o as SystemOneQuestion, p as SystemOneResult, s as SystemOneQuestions } from "./systemone-protocol-C4t7JH4Y.js";
8
8
  import { Yt as calibrationFromPairs } from "./index-Yec_iihg.js";
9
9
  import "./systemone-review-CrnsTRav.js";
@@ -389,4 +389,4 @@ interface SystemOneAnalystOptions<I, Q extends SystemOneQuestions = SystemOneQue
389
389
  }
390
390
  declare function systemOneAnalyst<I, Q extends SystemOneQuestions = SystemOneQuestions>(options: SystemOneAnalystOptions<I, Q>): Analyst<I>;
391
391
  export { DecisionRoute as A, DiffPolicy as B, DecisionPointOptions as C, decisionPoint as D, DecisionQuestions as E, FindingsTimeStep as F, FindingsStore as H, LedgerFinding as I, diffFindingsOverTime as L, FindingsLedgerOutcome as M, FindingsLedgerRead as N, decisionQuestionDigest as O, FindingsQuery as P, openFindingsLedger as R, DecisionInvocation as S, DecisionQuestionPolicy as T, PersistedFinding as U, FindingsDiff as V, diffFindings as W, assessSystemOneDomainMatch as _, SystemOneOptions as a, DECISION_POINT_AUC_BAR as b, systemOneEvaluator as c, SystemOneDomainCoverage as d, SystemOneDomainEvidence as f, SystemOneDomainMatchThresholds as g, SystemOneDomainMatchReport as h, SystemOneJudgeOptions as i, FindingsLedger as j, DecisionRecord as k, systemOneJudge as l, SystemOneDomainMatchReason as m, SystemOneEvaluate as n, normalizedSystemOneScore as o, SystemOneDomainMatchInput as p, SystemOneEvaluatorOptions as r, systemOneAnalyst as s, SystemOneAnalystOptions as t, PreparedSystemOneDomainMatch as u, prepareSystemOneDomainMatch as v, DecisionPointResult as w, DECISION_POINT_MIN_KAPPA as x, systemOneChoiceMargin as y, queryFindings as z };
392
- //# sourceMappingURL=systemone-DPVj7a1g.d.ts.map
392
+ //# sourceMappingURL=systemone-Dpp7I3uV.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"systemone-DPVj7a1g.d.ts","names":["_$__meta_eval0.calibrationFromPairs"],"sources":["../src/analyst/findings-store.ts","../src/analyst/findings-ledger.ts","../src/decision-point-records.ts","../src/decision-point.ts","../src/systemone-domain-match.ts","../src/systemone.ts"],"mappings":";;;;;;;;;;;;;;;UA8BiB,yBAAyB;EACxC;;cAGW;WAGiB;mBAFX;EAEW,YAAA;EAItB,OAAO,eAAe,UAAU,mBAAmB;;EAQzD,WAAW;;EAkBX,QAAQ,gBAAgB;;UAOT;;EAEf,UAAU;;EAEV,aAAa;;EAEb,WAAW;;;;;EAKX,SAAS;IAAQ,UAAU;IAAkB,SAAS;;;UAGvC;;;;;;;;EAQf,cAAc,UAAU,gBAAgB,SAAS;;;;;;iBAkBnC,aACd,UAAU,oBACV,SAAS,oBACT,SAAQ,aACP;;UC9Dc,sBAAsB;;EAErC;EACA,WAAW;;UAGI;EACf,UAAU;;EAEV,YAAY;;KAGF,sBAAsB;EAC5B;EAAiB,OAAO;;EAExB;EACA;IAAS;IAA8C;;;UAG5C;WACN;EACT,OACE,eACA,mBAAmB,mBAClB,QAAQ;IAAwB;IAAkB;;EACrD,QAAQ,QAAQ,sBAAsB;;;iBAwFxB,mBAAmB;EAAW;IAAiB;UA0C9C;EACf,QAAQ,wBAAwB;EAChC;E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,4BACjE,KAAK;EACb;EACA;EACA,WAAW,QAAQ;EACnB,kBAAkB,oBAAoB;EACtC,WAAW,MAAM,OAAO,GAAG,SAAS,mBAAmB,IAAI,QAAQ;EACnE,cAAc,OAAO,GAAG,SAAS,mBAAmB,iBAAiB,QAAQ;EAC7E,WACE,OAAO,gBAAgB,IACvB,OAAO,GACP,SAAS,mBACN,mBAAmB,QAAQ;EAChC,UACE,QAAQ,iBAAiB,gBAAgB,KACzC,OAAO,GACP,SAAS,0BACC;;iBAGE,iBAAiB,GAAG,UAAU,qBAAqB,oBACjE,SAAS,wBAAwB,GAAG,KACnC,QAAQ"}
1
+ {"version":3,"file":"systemone-Dpp7I3uV.d.ts","names":["_$__meta_eval0.calibrationFromPairs"],"sources":["../src/analyst/findings-store.ts","../src/analyst/findings-ledger.ts","../src/decision-point-records.ts","../src/decision-point.ts","../src/systemone-domain-match.ts","../src/systemone.ts"],"mappings":";;;;;;;;;;;;;;;UA8BiB,yBAAyB;EACxC;;cAGW;WAGiB;mBAFX;EAEW,YAAA;EAItB,OAAO,eAAe,UAAU,mBAAmB;;EAQzD,WAAW;;EAkBX,QAAQ,gBAAgB;;UAOT;;EAEf,UAAU;;EAEV,aAAa;;EAEb,WAAW;;;;;EAKX,SAAS;IAAQ,UAAU;IAAkB,SAAS;;;UAGvC;;;;;;;;EAQf,cAAc,UAAU,gBAAgB,SAAS;;;;;;iBAkBnC,aACd,UAAU,oBACV,SAAS,oBACT,SAAQ,aACP;;UC9Dc,sBAAsB;;EAErC;EACA,WAAW;;UAGI;EACf,UAAU;;EAEV,YAAY;;KAGF,sBAAsB;EAC5B;EAAiB,OAAO;;EAExB;EACA;IAAS;IAA8C;;;UAG5C;WACN;EACT,OACE,eACA,mBAAmB,mBAClB,QAAQ;IAAwB;IAAkB;;EACrD,QAAQ,QAAQ,sBAAsB;;;iBAwFxB,mBAAmB;EAAW;IAAiB;UA0C9C;EACf,QAAQ,wBAAwB;EAChC;EACA;EACA;EACA;;;;;EAKA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;EACA,WAAW,QAAQ;EACnB,kBAAkB,oBAAoB;EACtC,WAAW,MAAM,OAAO,GAAG,SAAS,mBAAmB,IAAI,QAAQ;EACnE,cAAc,OAAO,GAAG,SAAS,mBAAmB,iBAAiB,QAAQ;EAC7E,WACE,OAAO,gBAAgB,IACvB,OAAO,GACP,SAAS,mBACN,mBAAmB,QAAQ;EAChC,UACE,QAAQ,iBAAiB,gBAAgB,KACzC,OAAO,GACP,SAAS,0BACC;;iBAGE,iBAAiB,GAAG,UAAU,qBAAqB,oBACjE,SAAS,wBAAwB,GAAG,KACnC,QAAQ"}
@@ -1,5 +1,5 @@
1
- import { a as EvaluationResult, c as asJudge, i as EvaluationJudgeOptions, l as createEvaluator, n as EvaluationAnalystOptions, o as EvaluatorOptions, r as EvaluationContext, s as asAnalyst, t as CostedEvaluator } from "./evaluation-BQQ2ga5W.js";
1
+ import { a as EvaluationResult, c as asJudge, i as EvaluationJudgeOptions, l as createEvaluator, n as EvaluationAnalystOptions, o as EvaluatorOptions, r as EvaluationContext, s as asAnalyst, t as CostedEvaluator } from "./evaluation-imW3I7tD.js";
2
2
  import { C as systemOneUsage, S as systemOneConfidence, _ as normalizeSystemOneResult, a as SystemOneJson, b as parseSystemOneRequest, c as SystemOneRecordedQuestion, d as SystemOneRequest, f as SystemOneResponseError, g as SystemOneState, h as SystemOneScoreCriteria, i as SystemOneDescription, l as SystemOneRecordedQuestions, m as SystemOneResultProfile, n as SystemOneAnswer, o as SystemOneQuestion, p as SystemOneResult, r as SystemOneAnswerFor, s as SystemOneQuestions, u as SystemOneRecordedRequest, x as parseSystemOneResult, y as parseSystemOneRecordedRequest } from "./systemone-protocol-C4t7JH4Y.js";
3
- import { A as DecisionRoute, C as DecisionPointOptions, D as decisionPoint, E as DecisionQuestions, O as decisionQuestionDigest, S as DecisionInvocation, T as DecisionQuestionPolicy, _ as assessSystemOneDomainMatch, a as SystemOneOptions, b as DECISION_POINT_AUC_BAR, c as systemOneEvaluator, d as SystemOneDomainCoverage, f as SystemOneDomainEvidence, g as SystemOneDomainMatchThresholds, h as SystemOneDomainMatchReport, i as SystemOneJudgeOptions, k as DecisionRecord, l as systemOneJudge, m as SystemOneDomainMatchReason, n as SystemOneEvaluate, o as normalizedSystemOneScore, p as SystemOneDomainMatchInput, r as SystemOneEvaluatorOptions, s as systemOneAnalyst, t as SystemOneAnalystOptions, u as PreparedSystemOneDomainMatch, v as prepareSystemOneDomainMatch, w as DecisionPointResult, x as DECISION_POINT_MIN_KAPPA, y as systemOneChoiceMargin } from "./systemone-DPVj7a1g.js";
3
+ import { A as DecisionRoute, C as DecisionPointOptions, D as decisionPoint, E as DecisionQuestions, O as decisionQuestionDigest, S as DecisionInvocation, T as DecisionQuestionPolicy, _ as assessSystemOneDomainMatch, a as SystemOneOptions, b as DECISION_POINT_AUC_BAR, c as systemOneEvaluator, d as SystemOneDomainCoverage, f as SystemOneDomainEvidence, g as SystemOneDomainMatchThresholds, h as SystemOneDomainMatchReport, i as SystemOneJudgeOptions, k as DecisionRecord, l as systemOneJudge, m as SystemOneDomainMatchReason, n as SystemOneEvaluate, o as normalizedSystemOneScore, p as SystemOneDomainMatchInput, r as SystemOneEvaluatorOptions, s as systemOneAnalyst, t as SystemOneAnalystOptions, u as PreparedSystemOneDomainMatch, v as prepareSystemOneDomainMatch, w as DecisionPointResult, x as DECISION_POINT_MIN_KAPPA, y as systemOneChoiceMargin } from "./systemone-Dpp7I3uV.js";
4
4
  import { a as SystemOneReviewReport, c as systemOneReviewFindings, i as SystemOneReviewInput, n as SystemOneReviewAssessment, o as assessSystemOneReview, r as SystemOneReviewCheck, s as prepareSystemOneReview, t as PreparedSystemOneReview } from "./systemone-review-CrnsTRav.js";
5
5
  export { CostedEvaluator, DECISION_POINT_AUC_BAR, DECISION_POINT_MIN_KAPPA, DecisionInvocation, DecisionPointOptions, DecisionPointResult, DecisionQuestionPolicy, DecisionQuestions, type DecisionRecord, type DecisionRoute, EvaluationAnalystOptions, EvaluationContext, EvaluationJudgeOptions, EvaluationResult, EvaluatorOptions, PreparedSystemOneDomainMatch, PreparedSystemOneReview, SystemOneAnalystOptions, type SystemOneAnswer, type SystemOneAnswerFor, type SystemOneDescription, SystemOneDomainCoverage, SystemOneDomainEvidence, SystemOneDomainMatchInput, SystemOneDomainMatchReason, SystemOneDomainMatchReport, SystemOneDomainMatchThresholds, SystemOneEvaluate, SystemOneEvaluatorOptions, type SystemOneJson, SystemOneJudgeOptions, SystemOneOptions, type SystemOneQuestion, type SystemOneQuestions, type SystemOneRecordedQuestion, type SystemOneRecordedQuestions, type SystemOneRecordedRequest, type SystemOneRequest, SystemOneResponseError, type SystemOneResult, type SystemOneResultProfile, SystemOneReviewAssessment, SystemOneReviewCheck, SystemOneReviewInput, SystemOneReviewReport, type SystemOneScoreCriteria, type SystemOneState, asAnalyst, asJudge, assessSystemOneDomainMatch, assessSystemOneReview, createEvaluator, decisionPoint, decisionQuestionDigest, normalizeSystemOneResult, normalizedSystemOneScore, parseSystemOneRecordedRequest, parseSystemOneRequest, parseSystemOneResult, prepareSystemOneDomainMatch, prepareSystemOneReview, systemOneAnalyst, systemOneChoiceMargin, systemOneConfidence, systemOneEvaluator, systemOneJudge, systemOneReviewFindings, systemOneUsage };
@@ -3,6 +3,7 @@ import { a as RunRecord, d as RunTokenUsage, s as RunSearchCoordinates } from ".
3
3
  import { v as ProposalFinding } from "./types-Dtt11Ppr.js";
4
4
  import { z as LlmCallMetadata } from "./cluster-CSd0LE_M.js";
5
5
  import { wt as SeriesDistribution } from "./index-Bcy00QoN.js";
6
+ import { n as VerdictCertification } from "./verdict-D_qiBQ6_.js";
6
7
  import { A as SearchLedgerHash, F as SearchNodeRegisteredEvent, G as SearchSplit, I as SearchNodeStatus, L as SearchOpenedEvent, N as SearchNodeDecision, O as SearchLedgerEntry, P as SearchNodeRef, Q as SearchTaskOutcome, R as SearchOperationKind, U as SearchReservation, Z as SearchTask, b as SearchClosedEvent, d as SearchCellCancelledEvent, i as SearchArtifactRef, l as SearchCandidateSurface, o as SearchAudit, p as SearchCellStage, t as NodeEstimate, w as SearchEdgeRecordedEvent, z as SearchOperationRecordedEvent } from "./search-ledger-types-qiYRUo_N.js";
7
8
  import { y as LedgerProjector } from "./index-lRKqfyg4.js";
8
9
  import { s as TraceStore } from "./store-CMs5wGXP.js";
@@ -498,6 +499,10 @@ interface JudgeScore {
498
499
  dimensions: Record<string, number>;
499
500
  composite: number;
500
501
  notes: string;
502
+ /** Retained native measurements/provenance. Numeric projections do not replace this evidence. */
503
+ evidence?: Record<string, unknown>;
504
+ /** Executed verification strategy and checker identity, when provided by the scorer. */
505
+ certification?: VerdictCertification;
501
506
  /** Provider metadata for display and diagnostics; accounting uses CostLedger receipts. */
502
507
  llmCall?: LlmCallMetadata;
503
508
  /** How the numbers in `dimensions` were produced. `'sampled'` reads the
@@ -1079,4 +1084,4 @@ interface CampaignResult<TArtifact = unknown, TScenario extends Scenario = Scena
1079
1084
  scenarios: Array<CampaignScenarioIdentity & Pick<TScenario, 'id' | 'kind'>>;
1080
1085
  }
1081
1086
  export { MintRolloutResult as $, LabeledScenarioWrite as A, ScoredSurfaceOutcome as B, JudgeDimension as C, LabeledScenarioSampleArgs as D, LabeledScenarioRecord as E, ProposeContext as F, SearchProposerView as G, SurfaceProposer as H, ProposedCandidate as I, searchProposerView as J, SearchSummaryOptions as K, RedactionStatus as L, OptimizerConfig as M, ParetoParent as N, LabeledScenarioSource as O, ProposalTrackContext as P, MintRolloutOptions as Q, Scenario as R, JudgeConfig as S, LabelTrust as T, TraceSpan as U, SessionScript as V, isProposedCandidate as W, SearchStateView as X, SearchState as Y, searchUnitScores as Z, GateDecision as _, CampaignResult as a, SearchCompletion as at, GenerationRecord as b, CampaignTraceWriter as c, SearchOperation as ct, DispatchContext as d, SearchUnitScore as dt, RolloutScrubber as et, DispatchFn as f, searchCellId as ft, GateContribution as g, GateContext as h, CampaignCostMeter as i, SearchCell as it, MutableSurface as j, LabeledScenarioStore as k, CodeSurface as l, SearchScoredCell as lt, GateCheckStatus as m, searchTaskSetDigest as mt, CampaignArtifactWriter as n, mintRolloutRows as nt, CampaignScenarioIdentity as o, SearchDecisionRecord as ot, Gate as p, searchNodeId as pt, renderSearchSummary as q, CampaignCellResult as r, unmintableReasons as rt, CampaignTokenUsage as s, SearchNode as st, CampaignAggregates as t, RolloutSearchLineage as tt, ComponentSurface as u, SearchSpend as ut, GateResult as v, JudgeScore as w, JudgeAggregate as x, GenerationCandidate as y, ScenarioAggregate as z };
1082
- //# sourceMappingURL=types-qJwFZTqa.d.ts.map
1087
+ //# sourceMappingURL=types-BeJIREX-.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-BeJIREX-.d.ts","names":[],"sources":["../src/campaign/search-state-identity.ts","../src/campaign/search-state-types.ts","../src/campaign/search-state-indexes.ts","../src/rollout/mint.ts","../src/campaign/search-state-view.ts","../src/campaign/search-state-projection.ts","../src/campaign/search-summary.ts","../src/campaign/types.ts"],"mappings":";;;;;;;;;;;iBAOgB,aAAa,kBAAkB;;iBAK/B,aACd,kBACA,gBACA,gBACA,OAAO,aACP;;iBAMc,oBAAoB,gBAAgB,eAAe;UCHlD;EACf;EACA,UAAU;EACV,OAAO;EACP;EACA;;UAGe;EACf;EACA;EACA;EACA;;;;UAKe;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;;EAEA;EACA;;UAGe;EACf;;EAEA;EACA,gBAAgB;EAChB,UAAU;EACV,mBAAmB;;;EAGnB;;EAEA;;;;EAIA,kBAAkB;EAClB;EACA;EACA,QAAQ;EACR;;EAEA;EACA,oBAAoB;EACpB;EACA,OAAO;EACP;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA,OAAO;EACP;EACA,OAAO;EACP;EACA,aAAa;EACb;EACA;EACA,SAAS;;EAET;;EAEA;EACA,WAAW;;EAEX;;EAEA;EACA;EACA;EACA;;UAGe;EACf;EACA,eAAe;EACf,aAAa;EACb;;EAEA,SAAS;;;EAGT,WAAW;;;EAGX,oBAAoB;;EAEp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EACA,UAAU;EACV,aAAa,eAAe;;;EAG5B;;EAEA,gBAAgB;;EAEhB;;;EAGA,YAAY;;;EAGZ;;;EAGA;EACA;EACA;EACA;;;;EAIA;;EAEA;;EAEA;EACA;;UAGe;EACf;EACA;EACA;EACA;;;;;;EAMA,cAAc;;UAGC;EACf;EACA;EACA;;;EAGA,cAAc;;UAGC;EACf;EACA,YAAY;EACZ;;;;;;UAOe;EACf;;;;EAIA;;;;EAIA;;;;EAIA;IACE;IACA;IACA,iBAAiB;MAAQ;MAAgB;;;;;EAI3C,YAAY;;;;;;;;;;EAUZ,WAAW;IAAQ;IAAoB;IAAmB;IAAgB;;;;EAG1E;;;;EAIA;;;;EAIA,cAAc,SAAS;;UAGR;EACf,SAAS,eAAe;EACxB,YAAY,eAAe;;EAE3B,MAAM;;EAEN;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe,eAAe,qBAAqB,kBAAkB,WAAW;;EAEhF;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA,OAAO,MAAM,mBAAmB;EAChC,YAAY;EACZ;IACE,aAAa;IACb;;EAEF,OAAO;EACP;EACA;EACA,iBAAiB;;;EAGjB,WAAW,MAAM,2BAA2B,KAAK"}
@@ -1,5 +1,63 @@
1
1
  import { c as RunSplitTag } from "./run-record-hti3ETmO.js";
2
- import { R as Scenario, d as DispatchContext } from "./types-qJwFZTqa.js";
2
+ import { a as CheckerIdentity, n as VerdictCertification, x as VerificationStrategySource } from "./verdict-D_qiBQ6_.js";
3
+ import { R as Scenario, d as DispatchContext } from "./types-BeJIREX-.js";
4
+ /** A planned measurement contract. It is not evidence that its checker executed. */
5
+ interface BenchmarkDefinition {
6
+ schemaVersion: 1;
7
+ id: string;
8
+ source: BenchmarkSource & {
9
+ revision: string;
10
+ };
11
+ /** The exact roster, including an explicitly selected subset when applicable. */
12
+ taskIds: string[];
13
+ metric: {
14
+ name: string;
15
+ unit: string;
16
+ direction: 'higher' | 'lower';
17
+ /** Native aggregation rule; a description does not implement that rule. */
18
+ aggregation: string;
19
+ /** Native bounds, when the metric has them. Unbounded metrics omit this field. */
20
+ range?: [number, number];
21
+ /** Explicit policy/ref for projecting the native measurement into an Eval score in [0, 1]. */
22
+ normalization: string;
23
+ };
24
+ verification: {
25
+ strategy: VerificationStrategySource;
26
+ checker: CheckerIdentity;
27
+ assumptions: string[];
28
+ };
29
+ }
30
+ /** Synchronous validation for JSON play/manifests; reject lossy or unrecognized identity fields. */
31
+ declare function defineBenchmark(input: unknown): BenchmarkDefinition;
32
+ /** Uses the stack's canonical JSON owner; changing metric, roster or checker changes identity. */
33
+ declare function benchmarkDefinitionDigest(input: unknown): string;
34
+ /** A measured task result with the identities needed to join it to an accepted benchmark. */
35
+ interface BenchmarkResult {
36
+ schemaVersion: 1;
37
+ definitionDigest: string;
38
+ taskId: string;
39
+ /** Content digest of the produced artifact, supplied by its execution owner. */
40
+ artifactDigest: string;
41
+ evaluation: BenchmarkEvaluation & {
42
+ passed: boolean;
43
+ };
44
+ }
45
+ /**
46
+ * Validate retained JSON without executing a checker. With a definition, also bind the task,
47
+ * metric and claimed checker. Validation cannot authenticate an untrusted producer's attestation.
48
+ */
49
+ declare function defineBenchmarkResult(input: unknown, definition?: BenchmarkDefinition): BenchmarkResult;
50
+ /** Bind identities and the complete measurement, excluding the certificate's own digest. */
51
+ declare function benchmarkResultEvidenceDigest(result: BenchmarkResult): string;
52
+ /** Wrap an already executed evaluation; never invent a certification from a planned definition. */
53
+ declare function benchmarkResult(input: {
54
+ definition: BenchmarkDefinition;
55
+ taskId: string;
56
+ artifactDigest: string;
57
+ evaluation: BenchmarkEvaluation & {
58
+ passed: boolean;
59
+ };
60
+ }): BenchmarkResult;
3
61
  type BenchmarkTaskKind = 'retrieval' | 'rag-answer' | 'hallucination' | 'kb-improvement' | 'routing' | 'custom';
4
62
  type BenchmarkFamily = 'beir' | 'mteb-retrieval' | 'msmarco' | 'trec-dl' | 'miracl' | 'lotte' | 'bright' | 'crag' | 'hotpotqa' | 'kilt' | 'ragtruth' | 'faithbench' | 'first-party' | 'custom';
5
63
  interface BenchmarkDatasetItem<TPayload = unknown> {
@@ -32,6 +90,8 @@ interface BenchmarkEvaluation {
32
90
  /** Optional bag of raw scoring signals — e.g. parsed numeric
33
91
  * answer, regex match, judge sub-scores. */
34
92
  raw: Record<string, unknown>;
93
+ /** Executed checker evidence, distinct from a planned definition's verification identity. */
94
+ certification?: VerdictCertification;
35
95
  notes?: string;
36
96
  }
37
97
  interface BenchmarkSource {
@@ -59,6 +119,10 @@ interface BenchmarkAdapter<_TItem = unknown, TPayload = unknown, TArtifact = str
59
119
  description?: string;
60
120
  source?: BenchmarkSource;
61
121
  defaultMetric?: string;
122
+ /** Optional frozen measurement contract for a native or caller-owned benchmark. */
123
+ definition?: BenchmarkDefinition;
124
+ /** Exact adapter/checker/projection implementation identity, included in resumable campaigns. */
125
+ evaluationRef?: string;
62
126
  /** Load the dataset for the given split. May hit the network on
63
127
  * first call but should be cache-friendly. Adapters that don't
64
128
  * ship the dataset itself MUST throw a clearly-marked error
@@ -66,6 +130,8 @@ interface BenchmarkAdapter<_TItem = unknown, TPayload = unknown, TArtifact = str
66
130
  loadDataset(split: RunSplitTag): Promise<BenchmarkDatasetItem<TPayload>[]>;
67
131
  /** Score a single response. Pure with respect to the inputs. */
68
132
  evaluate(item: BenchmarkDatasetItem<TPayload>, artifact: TArtifact): Promise<BenchmarkEvaluation>;
133
+ /** Optional identity-bound receipt, retained by the runner without executing the checker twice. */
134
+ evaluateResult?(item: BenchmarkDatasetItem<TPayload>, artifact: TArtifact): Promise<BenchmarkResult>;
69
135
  /** Deterministic split assignment via item id hashing. The
70
136
  * fraction of items in each split is implementation-defined but
71
137
  * MUST be stable across processes and platforms. */
@@ -97,5 +163,5 @@ declare const BENCHMARK_SPLIT_SEED = "agent-eval-v1";
97
163
  * holdout:20% (paper-grade held-out, gated reads)
98
164
  */
99
165
  declare function deterministicSplit(itemId: string, seed?: string, cuts?: readonly [number, number]): RunSplitTag;
100
- export { BenchmarkFamily as a, BenchmarkSource as c, BenchmarkEvaluation as i, BenchmarkTaskKind as l, BenchmarkAdapter as n, BenchmarkResponder as o, BenchmarkDatasetItem as r, BenchmarkScenario as s, BENCHMARK_SPLIT_SEED as t, deterministicSplit as u };
101
- //# sourceMappingURL=types-rf0yhJmW.d.ts.map
166
+ export { defineBenchmark as _, BenchmarkFamily as a, BenchmarkSource as c, BenchmarkResult as d, benchmarkResult as f, benchmarkDefinitionDigest as g, BenchmarkDefinition as h, BenchmarkEvaluation as i, BenchmarkTaskKind as l, defineBenchmarkResult as m, BenchmarkAdapter as n, BenchmarkResponder as o, benchmarkResultEvidenceDigest as p, BenchmarkDatasetItem as r, BenchmarkScenario as s, BENCHMARK_SPLIT_SEED as t, deterministicSplit as u };
167
+ //# sourceMappingURL=types-ff0YYJnj.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-ff0YYJnj.d.ts","names":[],"sources":["../src/benchmarks/definition.ts","../src/benchmarks/result.ts","../src/benchmarks/types.ts"],"mappings":";;;;UAQiB;EACf;EACA;EACA,QAAQ;IAAoB;;;EAE5B;EACA;IACE;IACA;IACA;;IAEA;;IAEA;;IAEA;;EAEF;IACE,UAAU;IACV,SAAS;IACT;;;;iBA4DY,gBAAgB,iBAAiB;;iBAMjC,0BAA0B;;UCtFzB;EACf;EACA;EACA;;EAEA;EACA,YAAY;IAAwB;;;;;;;iBA2CtB,sBACd,gBACA,aAAa,sBACZ;;iBA+Ba,8BAA8B,QAAQ;;iBAWtC,gBAAgB;EAC9B,YAAY;EACZ;EACA;EACA,YAAY;IAAwB;;IAClC;KC/FQ;KAQA;UAgBK,qBAAqB;;;EAGpC;;EAEA,SAAS;;EAET,QAAQ;;EAER,SAAS;;EAET,WAAW;;EAEX;;EAEA,SAAS;EACT,WAAW;;UAGI;;;;EAIf;;EAEA;;EAEA,aAAa;;;EAGb,KAAK;;EAEL,gBAAgB;EAChB;;UAGe;EACf;EACA;EACA;;EAEA;EACA;EACA;;EAEA;;;;;EAKA;;;UAQe,iBAAiB,kBAAkB,oBAAoB;;EAEtE;EACA,SAAS;EACT,WAAW;EACX;EACA,SAAS;EACT;;EAEA,aAAa;;EAEb;;;;;EAKA,YAAY,OAAO,cAAc,QAAQ,qBAAqB;;EAE9D,SAAS,MAAM,qBAAqB,WAAW,UAAU,YAAY,QAAQ;;EAE7E,gBACE,MAAM,qBAAqB,WAC3B,UAAU,YACT,QAAQ;;;;EAIX,YAAY,iBAAiB;;UAGd,kBAAkB,4BAA4B;EAC7D;EACA;EACA,QAAQ;EACR,UAAU;EACV,UAAU;EACV,MAAM,qBAAqB;;KAGjB,mBAAmB,oBAAoB,uBAAuB;EACxE,UAAU,kBAAkB;EAC5B,MAAM,qBAAqB;EAC3B,SAAS;MACL,QAAQ,aAAa;;;cAoBd;;;;;;;;;;iBAWG,mBACd,gBACA,eACA,mCACC"}
@@ -0,0 +1,156 @@
1
+ // src/verification-strategy.ts
2
+ /**
3
+ * The family registry. `Record` over the union keeps it exhaustive: adding
4
+ * a member to `VerificationStrategySource` without a profile here fails to
5
+ * compile. The failure mode travels with the taxonomy so a reader of a
6
+ * certification can surface it without this package's docs at hand.
7
+ */
8
+ const VERIFICATION_STRATEGIES = {
9
+ compile: {
10
+ determinism: "deterministic",
11
+ failureMode: "code that compiles is not code that is correct"
12
+ },
13
+ test: {
14
+ determinism: "deterministic",
15
+ failureMode: "assumes an answer key; certifies nothing outside suite coverage, and a stubbed integration reports green"
16
+ },
17
+ schema: {
18
+ determinism: "deterministic",
19
+ failureMode: "shape is not meaning; a well-formed wrong answer passes"
20
+ },
21
+ sandbox: {
22
+ determinism: "deterministic",
23
+ failureMode: "an exit code compresses the run to one bit; a faked success exits 0"
24
+ },
25
+ judge: {
26
+ determinism: "probabilistic",
27
+ failureMode: "drifts across model versions and is Goodhart-gameable by the graded policy"
28
+ },
29
+ composite: {
30
+ determinism: "inherited",
31
+ failureMode: "scalar collapse: the blend hides which member carried the score"
32
+ },
33
+ "proof-kernel": {
34
+ determinism: "deterministic",
35
+ failureMode: "the formalization gap: the kernel certifies the formal statement, never that it matches the informal claim"
36
+ },
37
+ invariant: {
38
+ determinism: "deterministic",
39
+ failureMode: "weak invariants pass everything; a set uncalibrated by seeded bugs is a rubber stamp"
40
+ },
41
+ replication: {
42
+ determinism: "deterministic",
43
+ failureMode: "re-runs the method, so it catches drift and nondeterminism, never an error the method itself carries"
44
+ },
45
+ agreement: {
46
+ determinism: "probabilistic",
47
+ failureMode: "the shared blind spot: derivers with common corpora or priors agree for the same wrong reason"
48
+ }
49
+ };
50
+ /** Every family member, derived from the registry so it cannot drift. */
51
+ const VERIFICATION_STRATEGY_SOURCES = Object.keys(VERIFICATION_STRATEGIES);
52
+ /** A refused equivalence check. `code` names the exact refusal for programmatic handling. */
53
+ var EquivalenceProtocolError = class extends Error {
54
+ code;
55
+ constructor(code, message) {
56
+ super(message);
57
+ this.name = "EquivalenceProtocolError";
58
+ this.code = code;
59
+ }
60
+ };
61
+ /**
62
+ * Validate and freeze a two-arm blind equivalence check spec.
63
+ *
64
+ * The literal types already refuse a wide design at compile time; the
65
+ * runtime checks hold the same line for untyped callers. There is no
66
+ * escape hatch: `arms: 3` or `blind: false` throws, never downgrades.
67
+ */
68
+ function defineEquivalenceCheck(spec) {
69
+ if (spec.arms !== 2) throw new EquivalenceProtocolError("arm-count", `equivalence check requires exactly 2 arms, received ${String(spec.arms)}`);
70
+ if (spec.blind !== true) throw new EquivalenceProtocolError("not-blind", "equivalence check requires blind: true — a non-blind run is not a weaker check, it is no check");
71
+ if (typeof spec.artifact !== "string" || spec.artifact.trim() === "") throw new EquivalenceProtocolError("empty-field", "spec.artifact must identify the claim under verification");
72
+ if (!VERIFICATION_STRATEGY_SOURCES.includes(spec.source)) throw new EquivalenceProtocolError("unknown-source", `spec.source '${String(spec.source)}' is not a verification-strategy member`);
73
+ return Object.freeze({ spec: Object.freeze({ ...spec }) });
74
+ }
75
+ /**
76
+ * Assemble the equivalence record, refusing every asymmetry.
77
+ *
78
+ * Refusals (each throws `EquivalenceProtocolError`):
79
+ * - an arm whose `blindness.toOtherArms` is false — it saw the other
80
+ * statement, so nothing was independently derived;
81
+ * - an arm whose `blindness.toOutcome` is false — it could steer its
82
+ * statement toward (or away from) the known result;
83
+ * - duplicate arm ids, empty statements, empty derivations;
84
+ * - an obligation whose fields contradict its status (see
85
+ * `EquivalenceObligation`).
86
+ */
87
+ function buildEquivalenceRecord(definition, arms, obligation) {
88
+ assertArms(arms);
89
+ assertObligation(obligation);
90
+ return Object.freeze({
91
+ spec: definition.spec,
92
+ arms: Object.freeze([Object.freeze({ ...arms[0] }), Object.freeze({ ...arms[1] })]),
93
+ obligation: Object.freeze({ ...obligation })
94
+ });
95
+ }
96
+ /**
97
+ * Discharge the obligation through an injected checker and return the
98
+ * record.
99
+ *
100
+ * Order matters: every arm refusal fires BEFORE the checker runs — an
101
+ * invalid check must not spend. A checker whose `strategy` differs from
102
+ * `spec.source` is refused for the same reason: a judge cannot silently
103
+ * discharge a proof-kernel obligation.
104
+ *
105
+ * A checker failure (`succeeded: false`) is not thrown: it becomes an
106
+ * `'unresolved'` obligation carrying the full error text, which is the
107
+ * honest record of an undischarged check.
108
+ */
109
+ async function runEquivalenceCheck(definition, arms, checker) {
110
+ assertArms(arms);
111
+ if (checker.strategy !== definition.spec.source) throw new EquivalenceProtocolError("checker-strategy-mismatch", `spec.source is '${definition.spec.source}' but the bound checker declares '${checker.strategy}'`);
112
+ const outcome = await checker.check({
113
+ artifact: definition.spec.artifact,
114
+ statements: [arms[0].statement, arms[1].statement]
115
+ });
116
+ if (!outcome.succeeded) return buildEquivalenceRecord(definition, arms, {
117
+ status: "unresolved",
118
+ unresolvedReason: outcome.error,
119
+ checker: checker.identity
120
+ });
121
+ const { status, separatingWitness, evidenceDigest } = outcome.value;
122
+ return buildEquivalenceRecord(definition, arms, {
123
+ status,
124
+ ...separatingWitness === void 0 ? {} : { separatingWitness },
125
+ checker: checker.identity,
126
+ evidenceDigest
127
+ });
128
+ }
129
+ function assertArms(arms) {
130
+ if (arms.length !== 2) throw new EquivalenceProtocolError("arm-count", `equivalence record requires exactly 2 arms, received ${arms.length}`);
131
+ if (arms[0].armId === arms[1].armId) throw new EquivalenceProtocolError("duplicate-arm-id", `both arms declare armId '${arms[0].armId}' — two labels for one derivation is one arm`);
132
+ for (const arm of arms) {
133
+ if (arm.statement.trim() === "") throw new EquivalenceProtocolError("empty-field", `arm '${arm.armId}' committed an empty statement`);
134
+ if (arm.derivedFrom.trim() === "") throw new EquivalenceProtocolError("empty-field", `arm '${arm.armId}' declares no derivation provenance`);
135
+ if (arm.blindness.toOtherArms !== true) throw new EquivalenceProtocolError("arm-saw-other", `arm '${arm.armId}' saw another arm's statement — the derivation is not independent and the check is invalid`);
136
+ if (arm.blindness.toOutcome !== true) throw new EquivalenceProtocolError("arm-saw-outcome", `arm '${arm.armId}' saw the outcome before committing — the check is invalid`);
137
+ }
138
+ }
139
+ function assertObligation(obligation) {
140
+ const { status, separatingWitness, unresolvedReason, evidenceDigest } = obligation;
141
+ if (status === "refuted-with-separating-witness") {
142
+ if (typeof separatingWitness !== "string" || separatingWitness.trim() === "") throw new EquivalenceProtocolError("witness-missing", "a refuted equivalence must carry the separating witness — a refutation without one is an assertion");
143
+ if (typeof evidenceDigest !== "string" || evidenceDigest.trim() === "") throw new EquivalenceProtocolError("evidence-missing", "a refuted equivalence must carry its evidence digest");
144
+ return;
145
+ }
146
+ if (status === "proved") {
147
+ if (separatingWitness !== void 0) throw new EquivalenceProtocolError("witness-on-proved", "a proved equivalence cannot carry a separating witness — the two claims contradict");
148
+ if (typeof evidenceDigest !== "string" || evidenceDigest.trim() === "") throw new EquivalenceProtocolError("evidence-missing", "a proved equivalence must carry its evidence digest");
149
+ return;
150
+ }
151
+ if (separatingWitness !== void 0) throw new EquivalenceProtocolError("witness-on-unresolved", "an unresolved obligation cannot carry a separating witness — a witness in hand is a refutation");
152
+ if (typeof unresolvedReason !== "string" || unresolvedReason.trim() === "") throw new EquivalenceProtocolError("reason-missing", "an unresolved obligation must say why — 'unresolved' with no reason erases the diagnostic");
153
+ }
154
+ export { runEquivalenceCheck as a, defineEquivalenceCheck as i, VERIFICATION_STRATEGIES as n, VERIFICATION_STRATEGY_SOURCES as r, EquivalenceProtocolError as t };
155
+
156
+ //# sourceMappingURL=verification-strategy-CYhDX1rE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-strategy-CYhDX1rE.js","names":[],"sources":["../src/verification-strategy.ts"],"sourcesContent":["/**\n * Verification-strategy family — the shared vocabulary for \"what certified\n * this result\", covering tasks with an answer key and tasks without one.\n *\n * Charter Wave 5 (docs/charter.md): an unsolved problem has no held-out\n * suite by definition, so the held-out suite must be ONE member of a\n * strategy family, not the family itself. This module carries the taxonomy,\n * the port shape, and the one protocol built directly on that port: the\n * blind two-arm statement-equivalence check. A checker is an injected\n * executable boundary that returns a typed outcome, so a consumer binds its\n * own kernel (a Lean toolchain, a metamorphic harness, a replication\n * runner) and this package never chooses one. Instruments, never methods.\n *\n * Full family doc, per-member failure modes in prose, and the BCWW pilot\n * worked example: docs/verification-strategies.md. How every executed\n * verdict lands in `DefaultVerdict` with a certification: docs/verdicts.md.\n *\n * Leaf module: no imports from this package. `src/verdict.ts` and\n * `src/rl/verifiable-reward.ts` both build on these types.\n */\n\n/**\n * One member of the verification-strategy family.\n *\n * Every member has a documented failure mode — the specific way it can\n * certify a wrong result. A consumer that reads a certification must weigh\n * the member's failure mode, not treat \"certified\" as one bit.\n *\n * - `'compile'` — typecheck / build / lint passed. Deterministic.\n * Failure mode: code that compiles is not code that is correct; the\n * weakest deterministic member.\n * - `'test'` — unit / integration / held-out suite pass-rate. Deterministic.\n * Failure mode: assumes an answer key exists; certifies nothing outside\n * the suite's coverage, and a stubbed integration reports green.\n * - `'schema'` — structured output validates. Deterministic.\n * Failure mode: shape is not meaning; a well-formed wrong answer passes.\n * - `'sandbox'` — sandbox execution exit code. Deterministic.\n * Failure mode: an exit code compresses the whole run to one bit; a\n * faked success exits 0.\n * - `'judge'` — LLM judge score. Probabilistic.\n * Failure mode: drifts across model versions and is Goodhart-gameable by\n * the graded policy.\n * - `'composite'` — weighted blend across members. Determinism inherited\n * from its members.\n * Failure mode: scalar collapse — the blend hides which member carried\n * the score and which failed.\n * - `'proof-kernel'` — a proof assistant's kernel accepted a formal proof.\n * Deterministic.\n * Failure mode: the formalization gap. The kernel certifies the formal\n * statement, never that the formal statement matches the informal claim;\n * a proved theorem about the wrong statement is a wrong result with a\n * valid certificate. Discharge it with the blind statement-equivalence\n * protocol (`runEquivalenceCheck` in this module).\n * - `'invariant'` — invariant / metamorphic properties held on the result.\n * Deterministic.\n * Failure mode: weak invariants pass everything. An invariant set earns\n * weight only through seeded-bug calibration — a mutation the set\n * provably rejects; an uncalibrated set is a rubber stamp.\n * - `'replication'` — an independent re-execution reproduced the result\n * from pinned inputs. Deterministic given the pins.\n * Failure mode: replication re-runs the method, so it catches\n * nondeterminism and environment drift, never a methodological error the\n * method itself carries.\n * - `'agreement'` — independently-derived results agree. Probabilistic.\n * Failure mode: the shared blind spot. Derivers that share training\n * corpora, priors, or the same misread of the source agree for the same\n * wrong reason; the blindness provenance of each arm is what the\n * certificate rests on.\n */\nexport type VerificationStrategySource =\n | 'compile'\n | 'test'\n | 'schema'\n | 'sandbox'\n | 'judge'\n | 'composite'\n | 'proof-kernel'\n | 'invariant'\n | 'replication'\n | 'agreement'\n\n/**\n * What a strategy member can honestly claim about its outcomes.\n *\n * `determinism: 'inherited'` exists only for `'composite'`: a blend takes\n * the class of its members. The reward axis stays binary\n * (`VerifiableReward.determinism`); this registry describes the family,\n * it never scores a run.\n */\nexport interface VerificationStrategyProfile {\n /** Determinism class a well-formed checker of this member can claim. */\n determinism: 'deterministic' | 'probabilistic' | 'inherited'\n /** The documented way this member certifies a wrong result. */\n failureMode: string\n}\n\n/**\n * The family registry. `Record` over the union keeps it exhaustive: adding\n * a member to `VerificationStrategySource` without a profile here fails to\n * compile. The failure mode travels with the taxonomy so a reader of a\n * certification can surface it without this package's docs at hand.\n */\nexport const VERIFICATION_STRATEGIES: Record<\n VerificationStrategySource,\n VerificationStrategyProfile\n> = {\n compile: {\n determinism: 'deterministic',\n failureMode: 'code that compiles is not code that is correct',\n },\n test: {\n determinism: 'deterministic',\n failureMode:\n 'assumes an answer key; certifies nothing outside suite coverage, and a stubbed integration reports green',\n },\n schema: {\n determinism: 'deterministic',\n failureMode: 'shape is not meaning; a well-formed wrong answer passes',\n },\n sandbox: {\n determinism: 'deterministic',\n failureMode: 'an exit code compresses the run to one bit; a faked success exits 0',\n },\n judge: {\n determinism: 'probabilistic',\n failureMode: 'drifts across model versions and is Goodhart-gameable by the graded policy',\n },\n composite: {\n determinism: 'inherited',\n failureMode: 'scalar collapse: the blend hides which member carried the score',\n },\n 'proof-kernel': {\n determinism: 'deterministic',\n failureMode:\n 'the formalization gap: the kernel certifies the formal statement, never that it matches the informal claim',\n },\n invariant: {\n determinism: 'deterministic',\n failureMode:\n 'weak invariants pass everything; a set uncalibrated by seeded bugs is a rubber stamp',\n },\n replication: {\n determinism: 'deterministic',\n failureMode:\n 're-runs the method, so it catches drift and nondeterminism, never an error the method itself carries',\n },\n agreement: {\n determinism: 'probabilistic',\n failureMode:\n 'the shared blind spot: derivers with common corpora or priors agree for the same wrong reason',\n },\n}\n\n/** Every family member, derived from the registry so it cannot drift. */\nexport const VERIFICATION_STRATEGY_SOURCES = Object.keys(\n VERIFICATION_STRATEGIES,\n) as readonly VerificationStrategySource[]\n\n/**\n * Exact identity of the thing that checked. \"lean4 4.33.0 with Mathlib\n * db584cd6d46c\" and \"lean4, some version\" are different certificates: the\n * first is re-runnable, the second is a story.\n */\nexport interface CheckerIdentity {\n /** Toolchain or model name, e.g. `'lean4'` or a judge model id. */\n name: string\n /** Exact version or snapshot, e.g. `'4.33.0'` or a model snapshot id. */\n version: string\n /**\n * Content pins the version alone does not capture, e.g.\n * `{ mathlib: 'db584cd6d46c' }`. Keyed by dependency name.\n */\n pins?: Record<string, string>\n}\n\n/**\n * Typed outcome of an external checker call. Callers MUST inspect\n * `succeeded` before touching `value`; a failed check keeps its full error\n * text instead of collapsing to null.\n */\nexport type CheckerOutcome<Result> =\n | { succeeded: true; value: Result }\n | { succeeded: false; error: string }\n\n/**\n * The port shape every strategy binds through: an injected executable\n * boundary. This package defines the port and refuses to ship any\n * implementation behind it — the consumer binds its own kernel, invariant\n * harness, replication runner, or judge, and the binding carries its own\n * identity and determinism claim.\n *\n * A checker that ran but could not decide returns\n * `{ succeeded: false, error }` with the reason; `succeeded: true` is\n * reserved for a discharged check.\n */\nexport interface StrategyChecker<Input, Result> {\n /** Which family member this checker discharges obligations for. */\n strategy: VerificationStrategySource\n identity: CheckerIdentity\n /** Determinism class this checker claims for its outcomes. */\n determinism: 'deterministic' | 'probabilistic'\n check(input: Input): Promise<CheckerOutcome<Result>>\n}\n\n// ── Blind statement-equivalence protocol ─────────────────────────────\n\n/**\n * Statement-equivalence protocol — the blind two-arm design as a typed\n * primitive.\n *\n * The problem it closes is the proof-kernel failure mode (the\n * formalization gap): a kernel certifies a formal statement, never that\n * the formal statement matches the informal claim. The protocol makes the\n * gap measurable: two arms derive the formal statement independently and\n * blind to each other, then a checker discharges the obligation that the\n * two statements are equivalent. A statement mismatch is a successful\n * outcome — it is the formalization gap made visible with a separating\n * witness in hand.\n *\n * The protocol is pure contract + record types + the asymmetry refusals.\n * Execution binds through the same `StrategyChecker` port as every other\n * strategy: the consumer injects its own kernel. The pilot record this\n * shape reproduces was assembled by hand for the BCWW (4.6) inequality;\n * docs/verification-strategies.md carries the worked example with artifact\n * paths. `equivalenceVerdict` (src/verdict.ts) lands a finished record in\n * the shared verdict spine.\n *\n * The refusals are the design. An arm that saw the other arm's statement,\n * or the outcome it feeds, did not independently derive anything — the\n * check is invalid, and this module throws rather than record it.\n */\n\n/**\n * The two-arm blind design. `arms: 2` and `blind: true` are literal types\n * on purpose: a wider design is a different protocol, not a parameter.\n */\nexport interface EquivalenceCheckSpec {\n /**\n * The strategy member whose obligation the check discharges — the pilot\n * used `'proof-kernel'`: the Lean kernel proved the two statements\n * equivalent. The bound checker must declare the same member.\n */\n source: VerificationStrategySource\n /**\n * Stable identity of the claim under verification: a path, digest, or\n * citation. Pilot: arXiv:1507.05650 inequality (4.6) plus the\n * five-atom counterexample record.\n */\n artifact: string\n /** Exactly two independent arms. An N-arm design is not this protocol. */\n arms: 2\n /**\n * Blind derivation is the point: a non-blind run is not a weaker check,\n * it is no check. `false` is unrepresentable here and refused at runtime\n * for untyped callers.\n */\n blind: true\n}\n\n/** A validated, frozen spec. Produced only by `defineEquivalenceCheck`. */\nexport interface EquivalenceCheckDefinition {\n readonly spec: Readonly<EquivalenceCheckSpec>\n}\n\n/** One arm's committed statement plus the provenance the record rests on. */\nexport interface EquivalenceArm {\n armId: string\n /** The committed formal statement text (pilot: the arm's `Statement.lean` source). */\n statement: string\n /**\n * What this arm derived the statement from. Pilot arm A: the paper's\n * LaTeX source; pilot arm B: the campaign's artifacts. The two arms\n * SHOULD derive from different renderings of the claim — that is what\n * makes agreement informative.\n */\n derivedFrom: string\n /**\n * The blindness declaration. Both flags must be `true`; a `false` value\n * is refused loudly, because recording a non-blind arm would launder an\n * invalid check into a valid-looking record.\n */\n blindness: {\n /** This arm never saw any other arm's statement before committing its own. */\n toOtherArms: boolean\n /** This arm never saw the verification outcome before committing. */\n toOutcome: boolean\n }\n}\n\nexport type EquivalenceObligationStatus =\n | 'proved'\n | 'refuted-with-separating-witness'\n | 'unresolved'\n\n/**\n * The discharged (or undischarged) equivalence obligation.\n *\n * Field presence is status-dependent and enforced by\n * `buildEquivalenceRecord`:\n * - `'proved'` requires `evidenceDigest` and forbids `separatingWitness`.\n * - `'refuted-with-separating-witness'` requires both the witness and\n * `evidenceDigest`.\n * - `'unresolved'` requires `unresolvedReason` and forbids the witness —\n * an undischarged obligation keeps its diagnostic instead of faking\n * either verdict.\n */\nexport interface EquivalenceObligation {\n status: EquivalenceObligationStatus\n /** The input on which the two statements provably disagree. */\n separatingWitness?: string\n /** Why the obligation could not be discharged (checker error text, coverage limit). */\n unresolvedReason?: string\n /** The checker that ran (or failed to run) the obligation. */\n checker: CheckerIdentity\n /** Digest of the checker's evidence artifact (pilot: the kernel-checked `Check.lean` run). */\n evidenceDigest?: string\n}\n\n/** The record the protocol produces — the by-hand pilot record, typed. */\nexport interface EquivalenceRecord {\n spec: Readonly<EquivalenceCheckSpec>\n arms: readonly [EquivalenceArm, EquivalenceArm]\n obligation: EquivalenceObligation\n}\n\n/** Input the bound checker receives: the artifact identity and both committed statements. */\nexport interface EquivalenceCheckerInput {\n artifact: string\n statements: readonly [string, string]\n}\n\n/**\n * What a checker that RAN must return. `'unresolved'` is deliberately not\n * a checker result: a checker that could not decide returns\n * `{ succeeded: false, error }` through the port, and the protocol records\n * the unresolved obligation with that reason.\n */\nexport interface EquivalenceCheckerResult {\n status: 'proved' | 'refuted-with-separating-witness'\n /** Required when `status` is refuted. */\n separatingWitness?: string\n evidenceDigest: string\n}\n\n/** An equivalence checker is a `StrategyChecker` — same port as every strategy. */\nexport type EquivalenceChecker = StrategyChecker<EquivalenceCheckerInput, EquivalenceCheckerResult>\n\n/** A refused equivalence check. `code` names the exact refusal for programmatic handling. */\nexport class EquivalenceProtocolError extends Error {\n readonly code:\n | 'arm-count'\n | 'not-blind'\n | 'arm-saw-other'\n | 'arm-saw-outcome'\n | 'duplicate-arm-id'\n | 'empty-field'\n | 'unknown-source'\n | 'witness-missing'\n | 'witness-on-proved'\n | 'witness-on-unresolved'\n | 'reason-missing'\n | 'evidence-missing'\n | 'checker-strategy-mismatch'\n\n constructor(code: EquivalenceProtocolError['code'], message: string) {\n super(message)\n this.name = 'EquivalenceProtocolError'\n this.code = code\n }\n}\n\n/**\n * Validate and freeze a two-arm blind equivalence check spec.\n *\n * The literal types already refuse a wide design at compile time; the\n * runtime checks hold the same line for untyped callers. There is no\n * escape hatch: `arms: 3` or `blind: false` throws, never downgrades.\n */\nexport function defineEquivalenceCheck(spec: EquivalenceCheckSpec): EquivalenceCheckDefinition {\n if (spec.arms !== 2) {\n throw new EquivalenceProtocolError(\n 'arm-count',\n `equivalence check requires exactly 2 arms, received ${String(spec.arms)}`,\n )\n }\n if (spec.blind !== true) {\n throw new EquivalenceProtocolError(\n 'not-blind',\n 'equivalence check requires blind: true — a non-blind run is not a weaker check, it is no check',\n )\n }\n if (typeof spec.artifact !== 'string' || spec.artifact.trim() === '') {\n throw new EquivalenceProtocolError(\n 'empty-field',\n 'spec.artifact must identify the claim under verification',\n )\n }\n if (!VERIFICATION_STRATEGY_SOURCES.includes(spec.source)) {\n throw new EquivalenceProtocolError(\n 'unknown-source',\n `spec.source '${String(spec.source)}' is not a verification-strategy member`,\n )\n }\n return Object.freeze({ spec: Object.freeze({ ...spec }) })\n}\n\n/**\n * Assemble the equivalence record, refusing every asymmetry.\n *\n * Refusals (each throws `EquivalenceProtocolError`):\n * - an arm whose `blindness.toOtherArms` is false — it saw the other\n * statement, so nothing was independently derived;\n * - an arm whose `blindness.toOutcome` is false — it could steer its\n * statement toward (or away from) the known result;\n * - duplicate arm ids, empty statements, empty derivations;\n * - an obligation whose fields contradict its status (see\n * `EquivalenceObligation`).\n */\nfunction buildEquivalenceRecord(\n definition: EquivalenceCheckDefinition,\n arms: readonly [EquivalenceArm, EquivalenceArm],\n obligation: EquivalenceObligation,\n): EquivalenceRecord {\n assertArms(arms)\n assertObligation(obligation)\n return Object.freeze({\n spec: definition.spec,\n arms: Object.freeze([Object.freeze({ ...arms[0] }), Object.freeze({ ...arms[1] })] as const),\n obligation: Object.freeze({ ...obligation }),\n })\n}\n\n/**\n * Discharge the obligation through an injected checker and return the\n * record.\n *\n * Order matters: every arm refusal fires BEFORE the checker runs — an\n * invalid check must not spend. A checker whose `strategy` differs from\n * `spec.source` is refused for the same reason: a judge cannot silently\n * discharge a proof-kernel obligation.\n *\n * A checker failure (`succeeded: false`) is not thrown: it becomes an\n * `'unresolved'` obligation carrying the full error text, which is the\n * honest record of an undischarged check.\n */\nexport async function runEquivalenceCheck(\n definition: EquivalenceCheckDefinition,\n arms: readonly [EquivalenceArm, EquivalenceArm],\n checker: EquivalenceChecker,\n): Promise<EquivalenceRecord> {\n assertArms(arms)\n if (checker.strategy !== definition.spec.source) {\n throw new EquivalenceProtocolError(\n 'checker-strategy-mismatch',\n `spec.source is '${definition.spec.source}' but the bound checker declares '${checker.strategy}'`,\n )\n }\n const outcome = await checker.check({\n artifact: definition.spec.artifact,\n statements: [arms[0].statement, arms[1].statement],\n })\n if (!outcome.succeeded) {\n return buildEquivalenceRecord(definition, arms, {\n status: 'unresolved',\n unresolvedReason: outcome.error,\n checker: checker.identity,\n })\n }\n const { status, separatingWitness, evidenceDigest } = outcome.value\n return buildEquivalenceRecord(definition, arms, {\n status,\n ...(separatingWitness === undefined ? {} : { separatingWitness }),\n checker: checker.identity,\n evidenceDigest,\n })\n}\n\nfunction assertArms(arms: readonly [EquivalenceArm, EquivalenceArm]): void {\n if (arms.length !== 2) {\n throw new EquivalenceProtocolError(\n 'arm-count',\n `equivalence record requires exactly 2 arms, received ${arms.length}`,\n )\n }\n if (arms[0].armId === arms[1].armId) {\n throw new EquivalenceProtocolError(\n 'duplicate-arm-id',\n `both arms declare armId '${arms[0].armId}' — two labels for one derivation is one arm`,\n )\n }\n for (const arm of arms) {\n if (arm.statement.trim() === '') {\n throw new EquivalenceProtocolError(\n 'empty-field',\n `arm '${arm.armId}' committed an empty statement`,\n )\n }\n if (arm.derivedFrom.trim() === '') {\n throw new EquivalenceProtocolError(\n 'empty-field',\n `arm '${arm.armId}' declares no derivation provenance`,\n )\n }\n if (arm.blindness.toOtherArms !== true) {\n throw new EquivalenceProtocolError(\n 'arm-saw-other',\n `arm '${arm.armId}' saw another arm's statement — the derivation is not independent and the check is invalid`,\n )\n }\n if (arm.blindness.toOutcome !== true) {\n throw new EquivalenceProtocolError(\n 'arm-saw-outcome',\n `arm '${arm.armId}' saw the outcome before committing — the check is invalid`,\n )\n }\n }\n}\n\nfunction assertObligation(obligation: EquivalenceObligation): void {\n const { status, separatingWitness, unresolvedReason, evidenceDigest } = obligation\n if (status === 'refuted-with-separating-witness') {\n if (typeof separatingWitness !== 'string' || separatingWitness.trim() === '') {\n throw new EquivalenceProtocolError(\n 'witness-missing',\n 'a refuted equivalence must carry the separating witness — a refutation without one is an assertion',\n )\n }\n if (typeof evidenceDigest !== 'string' || evidenceDigest.trim() === '') {\n throw new EquivalenceProtocolError(\n 'evidence-missing',\n 'a refuted equivalence must carry its evidence digest',\n )\n }\n return\n }\n if (status === 'proved') {\n if (separatingWitness !== undefined) {\n throw new EquivalenceProtocolError(\n 'witness-on-proved',\n 'a proved equivalence cannot carry a separating witness — the two claims contradict',\n )\n }\n if (typeof evidenceDigest !== 'string' || evidenceDigest.trim() === '') {\n throw new EquivalenceProtocolError(\n 'evidence-missing',\n 'a proved equivalence must carry its evidence digest',\n )\n }\n return\n }\n // status === 'unresolved'\n if (separatingWitness !== undefined) {\n throw new EquivalenceProtocolError(\n 'witness-on-unresolved',\n 'an unresolved obligation cannot carry a separating witness — a witness in hand is a refutation',\n )\n }\n if (typeof unresolvedReason !== 'string' || unresolvedReason.trim() === '') {\n throw new EquivalenceProtocolError(\n 'reason-missing',\n \"an unresolved obligation must say why — 'unresolved' with no reason erases the diagnostic\",\n )\n }\n}\n"],"mappings":";;;;;;;AAsGA,MAAa,0BAGT;CACF,SAAS;EACP,aAAa;EACb,aAAa;CACf;CACA,MAAM;EACJ,aAAa;EACb,aACE;CACJ;CACA,QAAQ;EACN,aAAa;EACb,aAAa;CACf;CACA,SAAS;EACP,aAAa;EACb,aAAa;CACf;CACA,OAAO;EACL,aAAa;EACb,aAAa;CACf;CACA,WAAW;EACT,aAAa;EACb,aAAa;CACf;CACA,gBAAgB;EACd,aAAa;EACb,aACE;CACJ;CACA,WAAW;EACT,aAAa;EACb,aACE;CACJ;CACA,aAAa;EACX,aAAa;EACb,aACE;CACJ;CACA,WAAW;EACT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R,mBACA,oGACF;EAEF,IAAI,OAAO,mBAAmB,YAAY,eAAe,KAAK,MAAM,IAClE,MAAM,IAAI,yBACR,oBACA,sDACF;EAEF;CACF;CACA,IAAI,WAAW,UAAU;EACvB,IAAI,sBAAsB,KAAA,GACxB,MAAM,IAAI,yBACR,qBACA,oFACF;EAEF,IAAI,OAAO,mBAAmB,YAAY,eAAe,KAAK,MAAM,IAClE,MAAM,IAAI,yBACR,oBACA,qDACF;EAEF;CACF;CAEA,IAAI,sBAAsB,KAAA,GACxB,MAAM,IAAI,yBACR,yBACA,gGACF;CAEF,IAAI,OAAO,qBAAqB,YAAY,iBAAiB,KAAK,MAAM,IACtE,MAAM,IAAI,yBACR,kBACA,2FACF;AAEJ"}
@@ -194,8 +194,8 @@ export declare const FeedbackTrajectorySchema: z.ZodObject<{
194
194
  system: "system";
195
195
  policy: "policy";
196
196
  metric: "metric";
197
- user: "user";
198
197
  judge: "judge";
198
+ user: "user";
199
199
  environment: "environment";
200
200
  }>;
201
201
  kind: z.ZodEnum<{
@@ -230,8 +230,8 @@ export declare const FeedbackTrajectorySchema: z.ZodObject<{
230
230
  system: "system";
231
231
  policy: "policy";
232
232
  metric: "metric";
233
- user: "user";
234
233
  judge: "judge";
234
+ user: "user";
235
235
  environment: "environment";
236
236
  }>;
237
237
  kind: z.ZodEnum<{
@@ -267,9 +267,9 @@ export declare const FeedbackTrajectorySchema: z.ZodObject<{
267
267
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
268
268
  }, z.core.$strip>>;
269
269
  split: z.ZodOptional<z.ZodEnum<{
270
+ test: "test";
270
271
  train: "train";
271
272
  dev: "dev";
272
- test: "test";
273
273
  holdout: "holdout";
274
274
  }>>;
275
275
  tags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -115,6 +115,20 @@ The ledger also rejects the same dataset digest under another request.
115
115
  Use one persistent ledger for related decisions and preserve stable source identities.
116
116
  Opening another empty ledger or inventing new lineage identities cannot establish independent evidence.
117
117
 
118
+ When display ids and unit labels can change, also bind semantic source identity with
119
+ `withFinalEvidenceSources(finalEvidence, sourceDigestByScenarioId)` from `/campaign` or `/contract`.
120
+ The map must cover every development and final scenario; additional entries are development
121
+ sources. Hash the immutable task inputs and relevant workspace bytes, excluding rollout ids,
122
+ display names and unit labels. The helper captures the map before asynchronous work.
123
+ Reusing one task under different independent units or across final/development roles is refused.
124
+
125
+ The existing ledger atomically reserves `sourceDigests` and `developmentSourceDigests` with the
126
+ unit and dataset identities. Across requests, a previous final source cannot become either final
127
+ or development evidence; a previous development source cannot become final evidence. Repeated
128
+ development use remains permitted. Source-aware reservations cannot mix with legacy history
129
+ whose semantic source identities are unknown. Such a conflict needs provenance reconciliation;
130
+ creating a fresh ledger does not prove freshness.
131
+
118
132
  `FinalEvidenceLedger` returns typed outcomes.
119
133
  Inspect `succeeded` before reading `value`.
120
134
  Failures distinguish conflicting use, invalid input, and unavailable or damaged storage.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-eval",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "Evaluate and improve AI agents from runs, traces, judges, and feedback. Compare candidates, cluster failures, measure lift, and gate releases.",
5
5
  "homepage": "https://github.com/tangle-network/agent-eval#readme",
6
6
  "repository": {