@tangle-network/agent-eval 2.0.19 → 2.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-_A7aMA4F.d.ts → agent-profile-CTneqKs4.d.ts} +4 -4
- package/dist/{agent-profile-_A7aMA4F.d.ts.map → agent-profile-CTneqKs4.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +25 -11
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +1 -1
- package/dist/{analyze-runs-Izz_ZeWg.d.ts → analyze-runs-ByEuSMUT.d.ts} +2 -2
- package/dist/{analyze-runs-Izz_ZeWg.d.ts.map → analyze-runs-ByEuSMUT.d.ts.map} +1 -1
- package/dist/app-grade/index.d.ts +3 -3
- package/dist/{benchmark-command-DOQeozeM.js → benchmark-command-pmeFawvb.js} +17 -8
- package/dist/{benchmark-command-DOQeozeM.js.map → benchmark-command-pmeFawvb.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +4 -4
- package/dist/benchmarks/index.js +2 -2
- package/dist/campaign/index.d.ts +6 -6
- package/dist/campaign/index.js +6 -6
- package/dist/{campaign-CJRlis5N.js → campaign-DPB35MjP.js} +25 -8
- package/dist/{campaign-CJRlis5N.js.map → campaign-DPB35MjP.js.map} +1 -1
- package/dist/{campaign-evidence-Biq06MQ9.d.ts → campaign-evidence-CSb3y1ob.d.ts} +3 -3
- package/dist/{campaign-evidence-Biq06MQ9.d.ts.map → campaign-evidence-CSb3y1ob.d.ts.map} +1 -1
- package/dist/cli.js +2145 -26
- package/dist/cli.js.map +1 -1
- package/dist/contract/index.d.ts +10 -10
- package/dist/contract/index.js +5 -5
- package/dist/{default-registry-BKHpiYiW.d.ts → default-registry-CKAFLuJg.d.ts} +6 -6
- package/dist/{default-registry-BKHpiYiW.d.ts.map → default-registry-CKAFLuJg.d.ts.map} +1 -1
- package/dist/{define-agent-eval-Dd6hFx0-.js → define-agent-eval-CBhYD7Gq.js} +3 -3
- package/dist/{define-agent-eval-Dd6hFx0-.js.map → define-agent-eval-CBhYD7Gq.js.map} +1 -1
- package/dist/{define-agent-eval-Bh8tJHZI.d.ts → define-agent-eval-DyVma2pV.d.ts} +4 -4
- package/dist/{define-agent-eval-Bh8tJHZI.d.ts.map → define-agent-eval-DyVma2pV.d.ts.map} +1 -1
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/{evaluation-f-UIDwbL.d.ts → evaluation-BnRaBCKu.d.ts} +4 -4
- package/dist/{evaluation-f-UIDwbL.d.ts.map → evaluation-BnRaBCKu.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +1 -1
- package/dist/{exact-types-BIHqYBYf.d.ts → exact-types-QwxMWchv.d.ts} +2 -2
- package/dist/{exact-types-BIHqYBYf.d.ts.map → exact-types-QwxMWchv.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +1 -1
- package/dist/{feedback-trajectory-CoQPmSJV.d.ts → feedback-trajectory-BkWAgoY0.d.ts} +3 -3
- package/dist/{feedback-trajectory-CoQPmSJV.d.ts.map → feedback-trajectory-BkWAgoY0.d.ts.map} +1 -1
- package/dist/{index-C1jQ7qqy.d.ts → index-BrALSxZU.d.ts} +9 -9
- package/dist/{index-C1jQ7qqy.d.ts.map → index-BrALSxZU.d.ts.map} +1 -1
- package/dist/{index-DH_Jxu9p.d.ts → index-CUpIEvoN.d.ts} +2 -2
- package/dist/{index-DH_Jxu9p.d.ts.map → index-CUpIEvoN.d.ts.map} +1 -1
- package/dist/{index-Cq_5SLfF.d.ts → index-D4SWfwQe.d.ts} +18 -18
- package/dist/{index-Cq_5SLfF.d.ts.map → index-D4SWfwQe.d.ts.map} +1 -1
- package/dist/{index-4khf0Q7g.d.ts → index-DmsDwlPe.d.ts} +5 -5
- package/dist/{index-4khf0Q7g.d.ts.map → index-DmsDwlPe.d.ts.map} +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +4 -4
- package/dist/{llm-judge-Bf3p1WNA.js → llm-judge-DRHTRT66.js} +2 -2
- package/dist/{llm-judge-Bf3p1WNA.js.map → llm-judge-DRHTRT66.js.map} +1 -1
- package/dist/{matrix-BtyN7jpb.d.ts → matrix-CHbTz1bP.d.ts} +2 -2
- package/dist/{matrix-BtyN7jpb.d.ts.map → matrix-CHbTz1bP.d.ts.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +7 -7
- package/dist/multishot/index.js +2 -2
- package/dist/openapi.json +1 -1
- package/dist/{optimization-method-BO2sb1m4.js → optimization-method-B-NFaHom.js} +3 -3
- package/dist/{optimization-method-BO2sb1m4.js.map → optimization-method-B-NFaHom.js.map} +1 -1
- package/dist/{prime-protocol-BRMk6dGI.d.ts → prime-protocol-46WvqIIt.d.ts} +2 -2
- package/dist/{prime-protocol-BRMk6dGI.d.ts.map → prime-protocol-46WvqIIt.d.ts.map} +1 -1
- package/dist/{registry-BeInzotS.d.ts → registry-Bh1M9hrf.d.ts} +3 -3
- package/dist/{registry-BeInzotS.d.ts.map → registry-Bh1M9hrf.d.ts.map} +1 -1
- package/dist/rl.d.ts +3 -3
- package/dist/rollout/index.d.ts +2 -2
- package/dist/{run-improvement-loop-D9IAZviC.d.ts → run-improvement-loop-E4Uec3my.d.ts} +6 -6
- package/dist/{run-improvement-loop-D9IAZviC.d.ts.map → run-improvement-loop-E4Uec3my.d.ts.map} +1 -1
- package/dist/search/index.d.ts +2 -2
- package/dist/search/index.js +2 -2
- package/dist/{search-kernel-C2XOJHvk.d.ts → search-kernel-By0lhdoJ.d.ts} +2 -2
- package/dist/{search-kernel-C2XOJHvk.d.ts.map → search-kernel-By0lhdoJ.d.ts.map} +1 -1
- package/dist/{search-kernel-D96Eibc_.js → search-kernel-DezUrquk.js} +3 -3
- package/dist/{search-kernel-D96Eibc_.js.map → search-kernel-DezUrquk.js.map} +1 -1
- package/dist/{search-summary-DjgKz7B1.js → search-summary-DOhRouoT.js} +2 -2
- package/dist/{search-summary-DjgKz7B1.js.map → search-summary-DOhRouoT.js.map} +1 -1
- package/dist/{self-improve-DZ8W-QY-.d.ts → self-improve-CpmIIb57.d.ts} +6 -6
- package/dist/{self-improve-DZ8W-QY-.d.ts.map → self-improve-CpmIIb57.d.ts.map} +1 -1
- package/dist/{self-improve-BiTuylQQ.js → self-improve-Dm9PvLF2.js} +2 -2
- package/dist/{self-improve-BiTuylQQ.js.map → self-improve-Dm9PvLF2.js.map} +1 -1
- package/dist/{skillopt-optimization-method-CJkejuSP.js → skillopt-optimization-method-QZoNbg57.js} +2 -2
- package/dist/{skillopt-optimization-method-CJkejuSP.js.map → skillopt-optimization-method-QZoNbg57.js.map} +1 -1
- package/dist/{store-tool-spans-wH8y7InB.d.ts → store-tool-spans-B9zc0I1r.d.ts} +3 -3
- package/dist/{store-tool-spans-wH8y7InB.d.ts.map → store-tool-spans-B9zc0I1r.d.ts.map} +1 -1
- package/dist/{systemone-CpW1U2Uy.d.ts → systemone-Co2Lv810.d.ts} +6 -6
- package/dist/{systemone-CpW1U2Uy.d.ts.map → systemone-Co2Lv810.d.ts.map} +1 -1
- package/dist/{systemone-review-DpAXWDkL.d.ts → systemone-review-CRJ-Zdfo.d.ts} +3 -3
- package/dist/{systemone-review-DpAXWDkL.d.ts.map → systemone-review-CRJ-Zdfo.d.ts.map} +1 -1
- package/dist/systemone.d.ts +3 -3
- package/dist/{tool-groups-SlnoQNyT.d.ts → tool-groups-BHX9G_oE.d.ts} +2 -2
- package/dist/tool-groups-BHX9G_oE.d.ts.map +1 -0
- package/dist/{trace-questions-ybyF0B6N.d.ts → trace-questions-DfaIVysB.d.ts} +2 -2
- package/dist/{trace-questions-ybyF0B6N.d.ts.map → trace-questions-DfaIVysB.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +1 -1
- package/dist/traces.d.ts +2 -2
- package/dist/{tree-lU9KWuxr.js → tree-DBvepwFt.js} +2 -2
- package/dist/{tree-lU9KWuxr.js.map → tree-DBvepwFt.js.map} +1 -1
- package/dist/{types-DSU3qb_o.d.ts → types-Ci2r6el5.d.ts} +2 -2
- package/dist/{types-DSU3qb_o.d.ts.map → types-Ci2r6el5.d.ts.map} +1 -1
- package/dist/{types-B1W3v8dT.d.ts → types-CjrzKsOK.d.ts} +8 -8
- package/dist/{types-B1W3v8dT.d.ts.map → types-CjrzKsOK.d.ts.map} +1 -1
- package/dist/{types-BpIAnRCe.d.ts → types-CmHcpGl0.d.ts} +2 -2
- package/dist/{types-BpIAnRCe.d.ts.map → types-CmHcpGl0.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +1 -1
- package/docs/real-work.md +81 -0
- package/package.json +1 -1
- package/dist/tool-groups-SlnoQNyT.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-Cq_5SLfF.d.ts","names":[],"sources":["../src/cost-ledger/errors.ts","../src/cost-ledger/pricing.ts","../src/llm-client/accounting.ts","../src/llm-client/errors.ts","../src/llm-client/json.ts","../src/llm-client/resilience.ts","../src/analyst/policy-edit.ts","../src/capability-headroom.ts","../src/cost-tracker.ts","../src/detectors/index.ts","../src/error-count-extractor.ts","../src/knowledge/types.ts","../src/leaderboard.ts","../src/paired-delta-test.ts","../src/partition-held-out.ts","../src/product-benchmark/export.ts","../src/product-benchmark/index.ts","../src/runtime-trajectory.ts","../src/skill-eval/recipe.ts","../src/skill-eval/trace.ts","../src/active-learning.ts","../src/bounded-process.ts","../src/command-runner.ts","../src/discover-personas.ts","../src/improvement-verdict.ts","../src/propose-review.ts","../src/reflective-mutation.ts","../src/eval-trace-store.ts","../src/integrity/preflight.ts","../src/model-seats.ts","../src/prompt-registry.ts","../src/reference-replay.ts","../src/steering.ts","../src/run-score.ts","../src/steering-optimizer.ts","../src/counterfactual.ts","../src/scorecard.ts","../src/trace-contracts/builder.ts","../src/trace-contracts/evaluate.ts","../src/trace-contracts/explain.ts","../src/trace-contracts/harness-session.ts","../src/trace-contracts/spec.ts","../src/action-policy.ts","../src/contamination-guard.ts","../src/deploy-gate-layer.ts","../src/hidden-criteria-grading.ts","../src/integrity/single-backend.ts","../src/intent-match-judge.ts","../src/judge-ensemble.ts","../src/judge-retry.ts","../src/judge-panel.ts","../src/keyword-coverage-judge.ts","../src/oracle.ts","../src/treatment-gate.ts","../src/verdict-cache.ts","../src/profile/baselines.ts","../src/profile/index.ts","../src/budget-guard.ts","../src/client.ts","../src/control-runtime.ts","../src/control-runtime/policy.ts","../src/knowledge/readiness.ts","../src/metrics.ts","../src/anti-slop.ts","../src/sandbox-assertions.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAMa,gCAAgC;EAEzC,YAAA,oBACA,sBACA,sBACA,eACA;;cAQS,sCAAsC;;UCXlC;EACf;EACA;EACA;EACA;;EAEA,aAAa,KAAK;IAA8B;;;;cAIrC,eAAe,eAAe;;;;iBAyF3B,oBAAoB,gBAAgB;;iBAapC,cAAc;;;iBAQd,aAAa,qBAAqB,sBAAsB;UAYvD;EACf;EACA;;;;;;iBAec,aAAa,eAAe,OAAO,YAAY;;iBAsC/C,oBACd,SAAS,oBACT,OAAO,KAAK;iBChME,2BACd,SAAS,KACP,0GAGF,UAAS,kBACR;;;;;;iBAoCa,mBACd,QAAQ,eACR,qBAAqB,qBACpB;;iBA6Ba,wBACd,OAAO,OACP,qBAAqB,qBACpB;cChFU,qBAAqB;WAGd;WACA;WACA;EAHhB,YAAA,iBACgB,gBACA,cACA;;;;;cASP,yBAAyB;WAGlB,QAAQ;EADxB,YAAA,iBACgB,QAAQ,eACxB;IAAY;;;;;;;;iBCXA,gBAAgB;;;;;;;;;;;;iBCgFhB,oBAAoB;KCnFxB;cAEN;KAaM,yBAAyB;cAE/B;KAUM,kCAAkC;KAClC;KACA;KACA;UAEK;EACf,SAAS;;;EAGT;;;EAGA,mBAAmB;;EAEnB;;KAGU;EAEN;EACA;EACA;;EAEA;;EAGA;EACA;EACA;EACA,QAAQ;;UAGG;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cAAc,KAAK,WAAW;iBAS3C,aACd,cACA,gBACA,8BACC;iBAUa,aAAa,cAAc,iBAAiB;iBAa5C,mBACd,cACA,kBACA,mBACC;iBAaa,eAAe,cAAc,gBAAgB,mBAAmB;iBAShE,kBACd,cACA,gBACA,oBACC;iBAaa,iBACd,cACA,eACA,aACA,eACC;iBAca,eACd,cACA,KAAK,yBACL,gBACC"}
|
|
1
|
+
{"version":3,"file":"index-D4SWfwQe.d.ts","names":[],"sources":["../src/cost-ledger/errors.ts","../src/cost-ledger/pricing.ts","../src/llm-client/accounting.ts","../src/llm-client/errors.ts","../src/llm-client/json.ts","../src/llm-client/resilience.ts","../src/analyst/policy-edit.ts","../src/capability-headroom.ts","../src/cost-tracker.ts","../src/detectors/index.ts","../src/error-count-extractor.ts","../src/knowledge/types.ts","../src/leaderboard.ts","../src/paired-delta-test.ts","../src/partition-held-out.ts","../src/product-benchmark/export.ts","../src/product-benchmark/index.ts","../src/runtime-trajectory.ts","../src/skill-eval/recipe.ts","../src/skill-eval/trace.ts","../src/active-learning.ts","../src/bounded-process.ts","../src/command-runner.ts","../src/discover-personas.ts","../src/improvement-verdict.ts","../src/propose-review.ts","../src/reflective-mutation.ts","../src/eval-trace-store.ts","../src/integrity/preflight.ts","../src/model-seats.ts","../src/prompt-registry.ts","../src/reference-replay.ts","../src/steering.ts","../src/run-score.ts","../src/steering-optimizer.ts","../src/counterfactual.ts","../src/scorecard.ts","../src/trace-contracts/builder.ts","../src/trace-contracts/evaluate.ts","../src/trace-contracts/explain.ts","../src/trace-contracts/harness-session.ts","../src/trace-contracts/spec.ts","../src/action-policy.ts","../src/contamination-guard.ts","../src/deploy-gate-layer.ts","../src/hidden-criteria-grading.ts","../src/integrity/single-backend.ts","../src/intent-match-judge.ts","../src/judge-ensemble.ts","../src/judge-retry.ts","../src/judge-panel.ts","../src/keyword-coverage-judge.ts","../src/oracle.ts","../src/treatment-gate.ts","../src/verdict-cache.ts","../src/profile/baselines.ts","../src/profile/index.ts","../src/budget-guard.ts","../src/client.ts","../src/control-runtime.ts","../src/control-runtime/policy.ts","../src/knowledge/readiness.ts","../src/metrics.ts","../src/anti-slop.ts","../src/sandbox-assertions.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAMa,gCAAgC;EAEzC,YAAA,oBACA,sBACA,sBACA,eACA;;cAQS,sCAAsC;;UCXlC;EACf;EACA;EACA;EACA;;EAEA,aAAa,KAAK;IAA8B;;;;cAIrC,eAAe,eAAe;;;;iBAyF3B,oBAAoB,gBAAgB;;iBAapC,cAAc;;;iBAQd,aAAa,qBAAqB,sBAAsB;UAYvD;EACf;EACA;;;;;;iBAec,aAAa,eAAe,OAAO,YAAY;;iBAsC/C,oBACd,SAAS,oBACT,OAAO,KAAK;iBChME,2BACd,SAAS,KACP,0GAGF,UAAS,kBACR;;;;;;iBAoCa,mBACd,QAAQ,eACR,qBAAqB,qBACpB;;iBA6Ba,wBACd,OAAO,OACP,qBAAqB,qBACpB;cChFU,qBAAqB;WAGd;WACA;WACA;EAHhB,YAAA,iBACgB,gBACA,cACA;;;;;cASP,yBAAyB;WAGlB,QAAQ;EADxB,YAAA,iBACgB,QAAQ,eACxB;IAAY;;;;;;;;iBCXA,gBAAgB;;;;;;;;;;;;iBCgFhB,oBAAoB;KCnFxB;cAEN;KAaM,yBAAyB;cAE/B;KAUM,kCAAkC;KAClC;KACA;KACA;UAEK;EACf,SAAS;;;EAGT;;;EAGA,mBAAmB;;EAEnB;;KAGU;EAEN;EACA;EACA;;EAEA;;EAGA;EACA;EACA;EACA,QAAQ;;UAGG;;EAEf;EACA,WAAW;;EAEX;EACA,OAAO;EACP;;UAGe;EACf;EACA;EACA,cAAc;;EAEd;;UAGe;EACf,eAAe;EACf;EACA,MAAM;EACN,QAAQ;EACR,QAAQ;EACR;EACA,cAAc;EACd;EACA,MAAM;EACN,QAAQ;EACR;EACA;EACA,WAAW;;cAGP;;UAGW;EACf,eAAe;EACf,YAAY;;KAGF,iBAAiB,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 -1,12 +1,12 @@
|
|
|
1
1
|
import { m as CustomTokenPricing, o as CostLedgerHandle } from "./cost-ledger-CSP-OfFe.js";
|
|
2
2
|
import { h as RunStatus } from "./schema-CkIvnmLU.js";
|
|
3
|
-
import { W as TraceAnalysisEngine, i as AnalystFinding, n as AnalystContext } from "./types-
|
|
3
|
+
import { W as TraceAnalysisEngine, i as AnalystFinding, n as AnalystContext } from "./types-CjrzKsOK.js";
|
|
4
4
|
import { n as ChatClient, y as LlmThinkingMode } from "./chat-client-BlTooBDA.js";
|
|
5
5
|
import { t as DefaultVerdict } from "./verdict-D_qiBQ6_.js";
|
|
6
|
-
import { S as ExternalOptimizerModelExecutionObservation, T as ExternalOptimizerRunnerCommand, p as ExternalOptimizerCallbackLimits, y as ExternalOptimizerModelCall } from "./agent-profile-
|
|
6
|
+
import { S as ExternalOptimizerModelExecutionObservation, T as ExternalOptimizerRunnerCommand, p as ExternalOptimizerCallbackLimits, y as ExternalOptimizerModelCall } from "./agent-profile-CTneqKs4.js";
|
|
7
7
|
import { o as Severity } from "./multi-layer-verifier-lM4aVN78.js";
|
|
8
|
-
import { i as TraceAnalystDefinition } from "./default-registry-
|
|
9
|
-
import { l as ExactCapableAnalyst } from "./exact-types-
|
|
8
|
+
import { i as TraceAnalystDefinition } from "./default-registry-CKAFLuJg.js";
|
|
9
|
+
import { l as ExactCapableAnalyst } from "./exact-types-QwxMWchv.js";
|
|
10
10
|
import { S as SupervisorRunTree, x as SupervisorRunSources } from "./types-xVtEOBhO.js";
|
|
11
11
|
import { SpanKind } from "@tangle-network/agent-trace-contract";
|
|
12
12
|
/**
|
|
@@ -631,4 +631,4 @@ declare const KNOWLEDGE_POISONING_KIND_SPEC: TraceAnalystDefinition;
|
|
|
631
631
|
*/
|
|
632
632
|
declare const DEFAULT_TRACE_ANALYST_KINDS: readonly TraceAnalystDefinition[];
|
|
633
633
|
export { ArgumentType as A, RetryWrite as B, SEMANTIC_CONCEPT_JUDGE_VERSION as C, runSemanticConceptJudge as D, SemanticConceptJudgeResult as E, ContractSpan as F, SpanPredicate as H, ContractStatus as I, ContractVerdict as L, ContractRule as M, ContractRuleExecution as N, ArgumentCheck as O, ContractRun as P, EvaluateTraceContractOptions as R, ConceptSpec as S, SemanticConceptJudgeOptions as T, TraceContract as U, RunChecks as V, DspyRlmTraceEngineOptions as _, FAILURE_MODE_KIND_SPEC as a, createChatTraceEngine as b, emitControlIntegrityFindings as c, FindingSubject as d, FindingSubjectKind as f, renderFindingSubject as g, parseFindingSubject as h, IMPROVEMENT_KIND_SPEC as i, ContractCheckResult as j, ArgumentOccurrence as k, FINDING_SUBJECT_KINDS as l, findingSubjectGrammarPromptFor as m, KNOWLEDGE_POISONING_KIND_SPEC as n, CONTROL_INTEGRITY_ANALYST as o, KIND_EXPECTED_SUBJECTS as p, KNOWLEDGE_GAP_KIND_SPEC as r, ControlIntegrityAnalyst as s, DEFAULT_TRACE_ANALYST_KINDS as t, FINDING_SUBJECT_SYNTAX as u, createDspyRlmTraceEngine as v, SemanticConceptJudgeInput as w, ConceptFinding as x, ChatTraceEngineOptions as y, OrderMode as z };
|
|
634
|
-
//# sourceMappingURL=index-
|
|
634
|
+
//# sourceMappingURL=index-DmsDwlPe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-DmsDwlPe.d.ts","names":[],"sources":["../src/trace-contracts/types.ts","../src/semantic-concept-judge.ts","../src/analyst/chat-trace-engine.ts","../src/analyst/trace-tool-callback.ts","../src/analyst/dspy-rlm-engine.ts","../src/analyst/finding-subject.ts","../src/analyst/kinds/control-integrity.ts","../src/analyst/kinds/failure-mode.ts","../src/analyst/kinds/improvement.ts","../src/analyst/kinds/knowledge-gap.ts","../src/analyst/kinds/knowledge-poisoning.ts","../src/analyst/kinds/index.ts"],"mappings":";;;;;;;;;;;;;;;UAUiB;EACf;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;;;EAGA;;EAEA;EACA;E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,wBAAwB,SAAS,OAAO;;;;;;;;;cAoExC,wBAAwB,eAAe,cAAc;;iBAqElD,+BAA+B;;iBCrc/B,6BACd,OAAO,uBAAuB,mBAC9B,qBACC;;cA4BU,mCACA,oBAAoB,uBAAuB;WAE7C;WACA;WAEA;WACA;;;;WACA;WACA;;;;EAKH,QACJ,OAAO,uBAAuB,mBAC9B,KAAK,iBACJ,QAAQ;;cAUA,2BAAyB;cCHzB,wBAAwB;cC3BxB,uBAAuB;cCGvB,yBAAyB;cCPzB,+BAA+B;;;;;;;;;;cCP/B,sCAAsC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { _ as PendingCostCall, a as CostLedgerFilter, c as CostLedgerPersistence, d as CostReceipt, f as CostReceiptInput, g as PaidCallResult, h as MaximumCharge, i as CostChannel, l as CostLedgerSummary, m as CustomTokenPricing, n as ChannelRollup, o as CostLedgerHandle, p as CostUsage, s as CostLedgerOptions, t as CostLedger, u as CostProvenance, v as PendingCostCallView, y as RunPaidCallInput } from "./cost-ledger-CSP-OfFe.js";
|
|
2
2
|
import { a as JudgeError, c as ValidationError, i as ConfigError, n as AgentEvalErrorCode, s as NotFoundError, t as AgentEvalError } from "./errors-E9I2hldP.js";
|
|
3
|
-
import { $ as IntentMatchOptions, $i as PolicyEditTarget, $n as discoverPersonas, $r as PairedDeltaTestResult, $t as CounterfactualContext, A as TreatmentGateOptions, Ai as CostTracker, An as LlmReviewerConfig, Ar as RuntimeTrajectoryEvidenceProjection, At as ContractLintFinding, B as KeywordCoverageOptions, Bi as PolicyEdit, Bn as ReviewMemoryStore, Br as readProductBenchmarkManifest, Bt as DiffScorecardOptions, C as index_d_exports, Ci as RepeatedActionOptions, Cn as RunRecordBackend, Cr as SkillEvalPreferenceResult, Ct as viteDeployRunner, D as fileVerdictCache, Di as repeatedActionDetector, Dn as TrialTrace, Dr as SkillEvalUnit, Dt as ActionExecutionPolicy, E as contentHash, Ei as observeAll, En as ReflectionProposal, Er as SkillEvalTrace, Et as checkCanaries, F as OracleResult, Fi as HeadroomInput, Fn as ProposeReviewReport, Fr as projectRuntimeTrajectoryEvidence, Ft as explainTraceContract, G as ensembleJudge, Gi as PolicyEditChange, Gn as jsonlReviewStore, Gr as exportProductBenchmarkRuns, Gt as ScorecardDiff, H as runKeywordCoverageJudge, Hi as PolicyEditAdmissionOptions, Hn as VerifyFn, Hr as ProductBenchmarkExportResult, Ht as Scorecard, I as evaluateOracles, Ii as TaskHeadroom, In as Review, Ir as ProductBenchmarkManifest, It as checkTraceContracts, J as withJudgeRetry, Ji as PolicyEditGainUnit, Jn as ExperimentStats, Jr as PartitionHeldOutOptions, Jt as diffScorecard, K as JudgeRetryOutcome, Ki as PolicyEditExpectedGain, Kn as runProposeReview, Kr as productBenchmarkRepoIdentity, Kt as ScorecardEntry, L as jsonShape, Li as assertCapabilityHeadroom, Ln as ReviewFn, Lr as ProductBenchmarkSplit, Lt as evaluateTraceContract, M as Oracle, Mi as AssertCapabilityHeadroomOptions, Mn as ProposeInput, Mr as RuntimeTrajectoryHookEvent, Mt as compileTraceContractSpec, N as OracleObservation, Ni as CapabilityHeadroomOptions, Nn as ProposeOutput, Nr as RuntimeTrajectoryRecord, Nt as lintTraceContractSpec, O as TreatmentGate, Oi as CostEntry, On as buildReflectionPrompt, Or as runSkillEval, Ot as ActionPolicyDecision, P as OracleReport, Pi as CapabilityHeadroomResult, Pn as ProposeReviewConfig, Pr as RuntimeTrajectoryRunRecord, Pt as contractSpansFromHarnessSession, Q as IntentMatchInput, Qi as PolicyEditSource, Qn as DiscoveredPersona, Qr as PairedDeltaTestOptions, Qt as recordRunsToScorecard, R as KeywordConceptSpec, Ri as capabilityHeadroom, Rn as ReviewInput, Rr as ProductBenchmarkValidationReport, Rt as traceContract, S as BudgetGuard, Si as ErrorStreakOptions, Sn as preflightModels, Sr as SkillEvalPreference, St as deployGateLayer, T as canonicalJson, Ti as errorStreakDetector, Tn as ReflectionContext, Tr as SkillEvalRun, Tt as CanaryLeak, U as runKeywordCoverageJudgeUrl, Ui as PolicyEditAxis, Un as createLlmReviewer, Ur as ProductBenchmarkSingleRunExportOptions, Ut as ScorecardCell, V as KeywordCoverageResult, Vi as PolicyEditAdmission, Vn as Verification, Vr as ProductBenchmarkExportOptions, Vt as RecordRunsOptions, W as EnsembleJudgeOptions, Wi as PolicyEditCandidateRecord, Wn as inMemoryReviewStore, Wr as exportProductBenchmark, Wt as ScorecardCellDiff, X as JudgeVerdict, Xi as PolicyEditRisk, Xn as ImprovementVerdictResult, Xr as TrainSelectionTestPartition, Xt as loadScorecard, Y as EnsembleAggregate, Yi as PolicyEditInit, Yn as ImprovementThresholds, Yr as TrainSelectionTestOptions, Yt as formatScorecardDiff, Z as aggregateJudgeVerdicts, Zi as PolicyEditSchemaVersion, Zn as DiscoverPersonasOptions, Zr as partitionHeldOut, Zt as recordRuns, _ as objectiveEval, _a as CostCeilingReachedError, _i as ExtractOptions, _n as ModelSeats, _r as SkillEvalFailure, _t as DeployGateLayerInput, a as assertHttpOk, aa as LlmResponseError, ai as DataAcquisitionPlan, an as SteeringOptimizationRow, ar as BoundedProcessInput, at as SingleBackendReport, b as ProductClient, bi as DetectorEvent, bn as ModelEndpointCheck, br as SkillEvalMetric, bt as ViteDeployRunnerInput, c as assertStatus, ca as maximumChargeForLlmRequest, ci as KnowledgeFreshness, cn as aggregateRunScore, cr as runBoundedProcess, ct as FieldDestination, d as estimateTokens, da as costForTokenPricing, di as KnowledgeRequirement, dn as ReferenceReplayCaseRun, dr as proposeSynthesisTargets, dt as HiddenLeak, ea as PolicyEditTargetSurface, ei as minimumPairsForPairedDeltaTest, en as CounterfactualMutation, er as CommandRunner, et as IntentMatchResult, f as acquisitionPlansForKnowledgeGaps, fa as costForUsage, fi as KnowledgeRequirementCategory, fn as ReferenceReplayRun, fr as skillEvalTraceFromRun, ft as JudgeScoreInput, g as userQuestionsForKnowledgeGaps, ga as CostAccountingIncompleteError, gi as ErrorCountPattern, gn as hashContent, gr as SkillEvalDecision, gt as blendHeldout, h as scoreKnowledgeReadiness, ha as resolveModelPricing, hi as ERROR_COUNT_PATTERNS, hn as PromptRegistry, hr as SkillEvalComparison, ht as assertNoHiddenLeak, i as assertHasField, ia as LlmCallError, ii as leaderboard, in as SteeringOptimizationResult, ir as localCommandRunner, it as SingleBackendDivergence, j as gateTreatmentApplied, ji as ScenarioCost, jn as ProposeFn, jr as RuntimeTrajectoryEvidenceSummary, jt as TraceContractSpec, k as TreatmentGateInput, ki as CostSummary, kn as parseReflectionResponse, kr as ProjectRuntimeTrajectoryEvidenceOptions, kt as evaluateActionPolicy, l as analyzeAntiSlop, la as CostResult, li as KnowledgeImportance, ln as clamp01, lr as ActiveLearningOptions, lt as HiddenCriteriaGrader, m as knowledgeReadinessTracePayload, ma as isModelPriced, mi as UserQuestion, mn as PromptHandle, mr as SkillEvalArmInput, mt as RoutedField, n as assertEventCount, na as isTransientLlmError, ni as LeaderboardOptions, nn as CounterfactualRunner, nr as RunCommandInput, nt as AssertSingleBackendOptions, o as assertLatencyUnder, oa as costReceiptFromLlm, oi as KnowledgeAcquisitionMode, on as RunScore, or as BoundedProcessResult, ot as assertSingleBackend, p as blockingKnowledgeEval, pa as estimateCost, pi as KnowledgeSensitivity, pn as ReferenceReplaySplit, pr as SkillEvalArm, pt as NoLeakOptions, q as JudgeRetryPolicy, qi as PolicyEditGainDirection, qn as ExperimentRep, qr as HeldOutPartition, qt as ScorecardLogLine, r as assertExists, ra as stripFencedJson, ri as LeaderboardRow, rn as PairwiseSteeringOptimizer, rr as RunCommandResult, rt as BackendDescriptor, s as assertNotContains, sa as costReceiptFromLlmError, si as KnowledgeBundle, sn as RunScoreWeights, sr as DEFAULT_BOUNDED_PROCESS_TIMEOUT_MS, st as BlendWeights, t as assertContains, ta as makePolicyEditCandidateRecord, ti as pairedDeltaTest, tn as CounterfactualResult, tr as DirEntry, tt as runIntentMatchJudge, u as createAntiSlopJudge, ua as MODEL_PRICING, ui as KnowledgeReadinessReport, un as SteeringBundle, ur as SynthesisTarget, ut as HiddenGradeResult, v as subjectiveEval, vi as ExtractResult, vn as resolveSeat, vr as SkillEvalHeadroom, vt as DeployRunResult, w as VerdictCacheStore, wi as StreamingDetector, wn as jsonlRunRecordBackend, wr as SkillEvalReport, wt as wranglerDeployRunner, x as BudgetBreachError, xi as DetectorSignal, xn as ModelEndpointRequest, xr as SkillEvalOptions, xt as WranglerDeployRunnerInput, y as runAgentControlLoop, yi as extractErrorCount, yn as seatPresets, yr as SkillEvalJudgeInput, yt as DeployRunner, z as KeywordCoverageFinding, zi as FindingToPolicyEditOptions, zn as ReviewMemoryEntry, zr as assertProductBenchmarkRun, zt as CellVerdict } from "./index-
|
|
3
|
+
import { $ as IntentMatchOptions, $i as PolicyEditTarget, $n as discoverPersonas, $r as PairedDeltaTestResult, $t as CounterfactualContext, A as TreatmentGateOptions, Ai as CostTracker, An as LlmReviewerConfig, Ar as RuntimeTrajectoryEvidenceProjection, At as ContractLintFinding, B as KeywordCoverageOptions, Bi as PolicyEdit, Bn as ReviewMemoryStore, Br as readProductBenchmarkManifest, Bt as DiffScorecardOptions, C as index_d_exports, Ci as RepeatedActionOptions, Cn as RunRecordBackend, Cr as SkillEvalPreferenceResult, Ct as viteDeployRunner, D as fileVerdictCache, Di as repeatedActionDetector, Dn as TrialTrace, Dr as SkillEvalUnit, Dt as ActionExecutionPolicy, E as contentHash, Ei as observeAll, En as ReflectionProposal, Er as SkillEvalTrace, Et as checkCanaries, F as OracleResult, Fi as HeadroomInput, Fn as ProposeReviewReport, Fr as projectRuntimeTrajectoryEvidence, Ft as explainTraceContract, G as ensembleJudge, Gi as PolicyEditChange, Gn as jsonlReviewStore, Gr as exportProductBenchmarkRuns, Gt as ScorecardDiff, H as runKeywordCoverageJudge, Hi as PolicyEditAdmissionOptions, Hn as VerifyFn, Hr as ProductBenchmarkExportResult, Ht as Scorecard, I as evaluateOracles, Ii as TaskHeadroom, In as Review, Ir as ProductBenchmarkManifest, It as checkTraceContracts, J as withJudgeRetry, Ji as PolicyEditGainUnit, Jn as ExperimentStats, Jr as PartitionHeldOutOptions, Jt as diffScorecard, K as JudgeRetryOutcome, Ki as PolicyEditExpectedGain, Kn as runProposeReview, Kr as productBenchmarkRepoIdentity, Kt as ScorecardEntry, L as jsonShape, Li as assertCapabilityHeadroom, Ln as ReviewFn, Lr as ProductBenchmarkSplit, Lt as evaluateTraceContract, M as Oracle, Mi as AssertCapabilityHeadroomOptions, Mn as ProposeInput, Mr as RuntimeTrajectoryHookEvent, Mt as compileTraceContractSpec, N as OracleObservation, Ni as CapabilityHeadroomOptions, Nn as ProposeOutput, Nr as RuntimeTrajectoryRecord, Nt as lintTraceContractSpec, O as TreatmentGate, Oi as CostEntry, On as buildReflectionPrompt, Or as runSkillEval, Ot as ActionPolicyDecision, P as OracleReport, Pi as CapabilityHeadroomResult, Pn as ProposeReviewConfig, Pr as RuntimeTrajectoryRunRecord, Pt as contractSpansFromHarnessSession, Q as IntentMatchInput, Qi as PolicyEditSource, Qn as DiscoveredPersona, Qr as PairedDeltaTestOptions, Qt as recordRunsToScorecard, R as KeywordConceptSpec, Ri as capabilityHeadroom, Rn as ReviewInput, Rr as ProductBenchmarkValidationReport, Rt as traceContract, S as BudgetGuard, Si as ErrorStreakOptions, Sn as preflightModels, Sr as SkillEvalPreference, St as deployGateLayer, T as canonicalJson, Ti as errorStreakDetector, Tn as ReflectionContext, Tr as SkillEvalRun, Tt as CanaryLeak, U as runKeywordCoverageJudgeUrl, Ui as PolicyEditAxis, Un as createLlmReviewer, Ur as ProductBenchmarkSingleRunExportOptions, Ut as ScorecardCell, V as KeywordCoverageResult, Vi as PolicyEditAdmission, Vn as Verification, Vr as ProductBenchmarkExportOptions, Vt as RecordRunsOptions, W as EnsembleJudgeOptions, Wi as PolicyEditCandidateRecord, Wn as inMemoryReviewStore, Wr as exportProductBenchmark, Wt as ScorecardCellDiff, X as JudgeVerdict, Xi as PolicyEditRisk, Xn as ImprovementVerdictResult, Xr as TrainSelectionTestPartition, Xt as loadScorecard, Y as EnsembleAggregate, Yi as PolicyEditInit, Yn as ImprovementThresholds, Yr as TrainSelectionTestOptions, Yt as formatScorecardDiff, Z as aggregateJudgeVerdicts, Zi as PolicyEditSchemaVersion, Zn as DiscoverPersonasOptions, Zr as partitionHeldOut, Zt as recordRuns, _ as objectiveEval, _a as CostCeilingReachedError, _i as ExtractOptions, _n as ModelSeats, _r as SkillEvalFailure, _t as DeployGateLayerInput, a as assertHttpOk, aa as LlmResponseError, ai as DataAcquisitionPlan, an as SteeringOptimizationRow, ar as BoundedProcessInput, at as SingleBackendReport, b as ProductClient, bi as DetectorEvent, bn as ModelEndpointCheck, br as SkillEvalMetric, bt as ViteDeployRunnerInput, c as assertStatus, ca as maximumChargeForLlmRequest, ci as KnowledgeFreshness, cn as aggregateRunScore, cr as runBoundedProcess, ct as FieldDestination, d as estimateTokens, da as costForTokenPricing, di as KnowledgeRequirement, dn as ReferenceReplayCaseRun, dr as proposeSynthesisTargets, dt as HiddenLeak, ea as PolicyEditTargetSurface, ei as minimumPairsForPairedDeltaTest, en as CounterfactualMutation, er as CommandRunner, et as IntentMatchResult, f as acquisitionPlansForKnowledgeGaps, fa as costForUsage, fi as KnowledgeRequirementCategory, fn as ReferenceReplayRun, fr as skillEvalTraceFromRun, ft as JudgeScoreInput, g as userQuestionsForKnowledgeGaps, ga as CostAccountingIncompleteError, gi as ErrorCountPattern, gn as hashContent, gr as SkillEvalDecision, gt as blendHeldout, h as scoreKnowledgeReadiness, ha as resolveModelPricing, hi as ERROR_COUNT_PATTERNS, hn as PromptRegistry, hr as SkillEvalComparison, ht as assertNoHiddenLeak, i as assertHasField, ia as LlmCallError, ii as leaderboard, in as SteeringOptimizationResult, ir as localCommandRunner, it as SingleBackendDivergence, j as gateTreatmentApplied, ji as ScenarioCost, jn as ProposeFn, jr as RuntimeTrajectoryEvidenceSummary, jt as TraceContractSpec, k as TreatmentGateInput, ki as CostSummary, kn as parseReflectionResponse, kr as ProjectRuntimeTrajectoryEvidenceOptions, kt as evaluateActionPolicy, l as analyzeAntiSlop, la as CostResult, li as KnowledgeImportance, ln as clamp01, lr as ActiveLearningOptions, lt as HiddenCriteriaGrader, m as knowledgeReadinessTracePayload, ma as isModelPriced, mi as UserQuestion, mn as PromptHandle, mr as SkillEvalArmInput, mt as RoutedField, n as assertEventCount, na as isTransientLlmError, ni as LeaderboardOptions, nn as CounterfactualRunner, nr as RunCommandInput, nt as AssertSingleBackendOptions, o as assertLatencyUnder, oa as costReceiptFromLlm, oi as KnowledgeAcquisitionMode, on as RunScore, or as BoundedProcessResult, ot as assertSingleBackend, p as blockingKnowledgeEval, pa as estimateCost, pi as KnowledgeSensitivity, pn as ReferenceReplaySplit, pr as SkillEvalArm, pt as NoLeakOptions, q as JudgeRetryPolicy, qi as PolicyEditGainDirection, qn as ExperimentRep, qr as HeldOutPartition, qt as ScorecardLogLine, r as assertExists, ra as stripFencedJson, ri as LeaderboardRow, rn as PairwiseSteeringOptimizer, rr as RunCommandResult, rt as BackendDescriptor, s as assertNotContains, sa as costReceiptFromLlmError, si as KnowledgeBundle, sn as RunScoreWeights, sr as DEFAULT_BOUNDED_PROCESS_TIMEOUT_MS, st as BlendWeights, t as assertContains, ta as makePolicyEditCandidateRecord, ti as pairedDeltaTest, tn as CounterfactualResult, tr as DirEntry, tt as runIntentMatchJudge, u as createAntiSlopJudge, ua as MODEL_PRICING, ui as KnowledgeReadinessReport, un as SteeringBundle, ur as SynthesisTarget, ut as HiddenGradeResult, v as subjectiveEval, vi as ExtractResult, vn as resolveSeat, vr as SkillEvalHeadroom, vt as DeployRunResult, w as VerdictCacheStore, wi as StreamingDetector, wn as jsonlRunRecordBackend, wr as SkillEvalReport, wt as wranglerDeployRunner, x as BudgetBreachError, xi as DetectorSignal, xn as ModelEndpointRequest, xr as SkillEvalOptions, xt as WranglerDeployRunnerInput, y as runAgentControlLoop, yi as extractErrorCount, yn as seatPresets, yr as SkillEvalJudgeInput, yt as DeployRunner, z as KeywordCoverageFinding, zi as FindingToPolicyEditOptions, zn as ReviewMemoryEntry, zr as assertProductBenchmarkRun, zt as CellVerdict } from "./index-D4SWfwQe.js";
|
|
4
4
|
import { _ as verifyAgentProfileCell, c as AgentProfileJson, d as AgentProfileSourceInput, f as agentProfileCellKey, h as toAgentProfileJson, m as groupRunsByAgentProfileCell, n as AgentProfileCell, o as AgentProfileDimensionValue, p as buildAgentProfileCell, r as AgentProfileCellInput, t as AGENT_PROFILE_KINDS } from "./agent-profile-cell-BTsrta0H.js";
|
|
5
5
|
import { E as isToolSpan, S as TraceEvent, T as isLlmSpan, _ as Span, a as FAILURE_CLASSES, c as JudgeSpan, f as Run, h as RunStatus, l as LlmSpan, n as BudgetLedgerEntry, o as FailureClass, p as RunCaptureReport, r as BudgetSpec, s as GenericSpan, t as Artifact, w as isJudgeSpan, x as ToolSpan } from "./schema-CkIvnmLU.js";
|
|
6
6
|
import { _ as runTaskScore, a as RunRecord, c as RunSplitTag, d as RunTokenUsage, f as RunTraceRef, g as parseRunRecordSafe, h as modelHasSnapshot, i as RunOutcome, l as RunTaskFailure, m as isRunRecord, n as RunCostProvenance, o as RunRecordValidationError, p as UNKNOWN_MODEL, r as RunJudgeMetadata, s as RunSearchCoordinates, t as JudgeScoresRecord, u as RunTerminalOutcome, v as validateRunRecord } from "./run-record-kuOr3BCF.js";
|
|
7
|
-
import { Ct as TraceAnalystSpanKind, Dt as ViewTraceOversized, Et as ViewSpansResult, K as TraceAnalysisEngineResult, Ot as ViewTraceResult, S as makeProposalFinding, St as TraceAnalystSpan, Tt as TraceAnalystTraceSummary, W as TraceAnalysisEngine, X as RawAnalystFinding, _t as SearchSpanResult, at as createBoundedTraceAnalysisStore, b as computeFindingId, bt as TraceAnalystByteBudgets, c as AnalystRunEvent, d as AnalystRunSummary, dt as TraceAnalysisStore, f as AnalystSeverity, gt as QueryTracesPage, ht as ErrorCluster, i as AnalystFinding, l as AnalystRunInputs, m as EvidenceRef, mt as DatasetOverview, n as AnalystContext, p as AnalystUsageReceipt, pt as DEFAULT_TRACE_ANALYST_BUDGETS, t as Analyst, u as AnalystRunResult, v as ProposalFinding, vt as SearchTraceResult, wt as TraceAnalystSpanStatus, x as makeFinding, xt as TraceAnalystFilters, yt as SpanMatchRecord } from "./types-
|
|
7
|
+
import { Ct as TraceAnalystSpanKind, Dt as ViewTraceOversized, Et as ViewSpansResult, K as TraceAnalysisEngineResult, Ot as ViewTraceResult, S as makeProposalFinding, St as TraceAnalystSpan, Tt as TraceAnalystTraceSummary, W as TraceAnalysisEngine, X as RawAnalystFinding, _t as SearchSpanResult, at as createBoundedTraceAnalysisStore, b as computeFindingId, bt as TraceAnalystByteBudgets, c as AnalystRunEvent, d as AnalystRunSummary, dt as TraceAnalysisStore, f as AnalystSeverity, gt as QueryTracesPage, ht as ErrorCluster, i as AnalystFinding, l as AnalystRunInputs, m as EvidenceRef, mt as DatasetOverview, n as AnalystContext, p as AnalystUsageReceipt, pt as DEFAULT_TRACE_ANALYST_BUDGETS, t as Analyst, u as AnalystRunResult, v as ProposalFinding, vt as SearchTraceResult, wt as TraceAnalystSpanStatus, x as makeFinding, xt as TraceAnalystFilters, yt as SpanMatchRecord } from "./types-CjrzKsOK.js";
|
|
8
8
|
import { B as ServedModelVerdict, C as LlmToolDefinition, D as InMemoryRawProviderSink, F as AssertCrossFamilyServedOptions, G as describeServedModelCheck, H as assertServedModel, I as AssertServedModelOptions, J as JudgeFamily, K as AssertCrossFamilyOptions, L as ModelSubstitutionError, M as RawProviderEvent, N as RawProviderSink, R as ServedModelCheck, S as LlmToolChoice, T as FileSystemRawProviderSink, U as assertServedModels, V as assertCrossFamilyServed, W as checkServedModel, X as judgeFamily, Y as assertCrossFamily, a as ChatTransport, b as LlmTokenLogprob, d as SandboxSdkTransportOpts, f as createChatClient, g as LlmChargeBounds, h as LlmCallResult, i as ChatResponse, k as NoopRawProviderSink, l as MockTransportOpts, m as LlmCallRequest, n as ChatClient, o as CreateChatClientOpts, p as LlmCallMetadata, q as CrossFamilyError, r as ChatRequest, s as CustomTransportOpts, t as ChatCallOpts, u as OpenAiCompatibleTransportOpts, v as LlmMessage, w as LlmUsage, x as LlmToolCall, z as ServedModelPolicy } from "./chat-client-BlTooBDA.js";
|
|
9
9
|
import { C as RubricDimension, D as TurnResult, E as Turn, S as RouteMap, T as ScenarioResult, _ as JudgeRubric, b as ProductClientConfig, c as ArtifactCheck, d as CollectedArtifacts, f as CompletionCriterion, g as JudgeInput, h as JudgeFn, l as ArtifactResult, m as DriverState, p as DimensionJudgeScore, u as CheckResult, v as PersonaConfig, w as ScenarioFile, x as ProductScenario, y as PersonaRigor } from "./cluster-BJ0nW3P7.js";
|
|
10
10
|
import { a as ContinuousCalibrationResult, d as calibrateJudgeContinuous, f as continuousAgreement, h as verbosityBias, i as ContinuousAgreementOptions, l as VerbosityBiasResult, n as CandidateScore, o as GoldenItem, r as ContinuousAgreement, t as CalibrationResult, u as calibrateJudge } from "./judge-calibration-DnrbQaXI.js";
|
|
11
11
|
import { $ as chiSquared, $t as corpusInterRaterAgreementFromJudgeScores, A as pairedBootstrap, At as rocAuc, C as BOOTSTRAP_GATE_MIN_N, Ct as pearsonR, D as PairedSignTestResult, Dt as summarizeNumberSeries, E as PairedBootstrapResult, Et as studentTCritical, G as pairedRiskDifferenceScore, I as McNemarResult, J as wilson, Jt as CorpusAgreementReport, K as passAtK, Kt as CorpusAgreementOptions, L as ProportionInterval, M as pairedSignTest, N as pairedTTest, O as PairedTTestResult, Ot as weightedComposite, P as ExactRiskDifferenceResult, Q as LinearRegressionResult, Qt as corpusInterRaterAgreement, R as RiskDifferenceResult, S as requiredSampleSize, St as partialCredit, T as PairedBootstrapOptions, Tt as spearmanR, U as pairedRiskDifference, V as mcnemar, W as pairedRiskDifferenceExact, X as bonferroni, Y as benjaminiHochberg, Yt as CorpusScoreRecord, Z as holm, _ as mulberry32, _t as SeriesDistributionOptions, a as eProcess, at as twoByTwoPValue, b as pairedMde, bt as confidenceInterval, c as sampleMedian, ct as cohensD, d as RankTestMethod, en as interRaterReliability, et as chiSquaredPValue, f as RankTestMethodRequest, ft as SampleDistribution, g as wilcoxonSignedRank, gt as SeriesDistribution, h as mannWhitneyU, ht as MeanConfidenceInterval, i as EProcessStep, it as studentTTwoSidedPValue, k as SignTestAlternative, kt as weightedMean, l as summarizeSample, lt as interpretCliffs, m as WilcoxonSignedRankResult, mt as summarizeDistribution, n as EProcessOptions, nt as linearRegressionSlope, o as SampleSummary, ot as CliffsMagnitude, p as RankTestOptions, pt as percentileNearestRank, q as passHatK, qt as CorpusAgreementPerDimension, r as EProcessState, rt as normalTwoSidedPValue, s as SampleSummaryOptions, st as cliffsDelta, t as EProcess, tt as fisherExactTwoSided, u as MannWhitneyResult, ut as pairedCohensDz, v as mcnemarPower, vt as WeightedCompositeInput, wt as ranks, x as requiredPairedSampleSize, xt as meanConfidenceInterval, y as mcnemarRequiredN, yt as WeightedCompositeResult, z as ScoreRiskDifferenceResult } from "./index-Bk1XEkP7.js";
|
|
12
12
|
import { C as runEquivalenceCheck, S as defineEquivalenceCheck, _ as StrategyChecker, a as CheckerIdentity, b as VerificationStrategyProfile, c as EquivalenceCheckDefinition, d as EquivalenceCheckerInput, f as EquivalenceCheckerResult, g as EquivalenceRecord, h as EquivalenceProtocolError, i as equivalenceVerdict, l as EquivalenceCheckSpec, m as EquivalenceObligationStatus, n as VerdictCertification, o as CheckerOutcome, p as EquivalenceObligation, r as certificationEvidenceDigest, s as EquivalenceArm, t as DefaultVerdict, u as EquivalenceChecker, v as VERIFICATION_STRATEGIES, x as VerificationStrategySource, y as VERIFICATION_STRATEGY_SOURCES } from "./verdict-D_qiBQ6_.js";
|
|
13
|
-
import { $i as CampaignCellRetryPolicy, $n as RedTeamFinding, Gi as LlmJudgeOptions, Gt as summarizeBackendIntegrity, Ht as BackendIntegrityError, Ki as llmJudge, Qi as CampaignCellFailureReceipt, Qn as RedTeamCategory, Ut as BackendIntegrityReport, Wt as assertRealBackend, Xn as DEFAULT_RED_TEAM_CORPUS, Zn as RedTeamCase, ar as CanaryEvaluation, cn as ArtifactEventLike, cr as CanaryReport, dn as ToolCallEventLike, ea as RunCampaignOptions, er as RedTeamReport, fn as extractProducedState, ir as CanaryAlert, ln as ProposalEventLike, lr as runCanaries, nr as redTeamReport, or as CanaryKind, rr as scoreRedTeamOutput, sr as CanaryOptions, ta as runCampaign, tr as redTeamDataset, un as RuntimeEventLike, x as transientDispatchFailure } from "./run-improvement-loop-
|
|
14
|
-
import { $ as MintRolloutResult, Q as MintRolloutOptions, R as Scenario, _ as GateDecision, a as CampaignResult, nt as mintRolloutRows, tt as RolloutSearchLineage, w as JudgeScore } from "./types-
|
|
13
|
+
import { $i as CampaignCellRetryPolicy, $n as RedTeamFinding, Gi as LlmJudgeOptions, Gt as summarizeBackendIntegrity, Ht as BackendIntegrityError, Ki as llmJudge, Qi as CampaignCellFailureReceipt, Qn as RedTeamCategory, Ut as BackendIntegrityReport, Wt as assertRealBackend, Xn as DEFAULT_RED_TEAM_CORPUS, Zn as RedTeamCase, ar as CanaryEvaluation, cn as ArtifactEventLike, cr as CanaryReport, dn as ToolCallEventLike, ea as RunCampaignOptions, er as RedTeamReport, fn as extractProducedState, ir as CanaryAlert, ln as ProposalEventLike, lr as runCanaries, nr as redTeamReport, or as CanaryKind, rr as scoreRedTeamOutput, sr as CanaryOptions, ta as runCampaign, tr as redTeamDataset, un as RuntimeEventLike, x as transientDispatchFailure } from "./run-improvement-loop-E4Uec3my.js";
|
|
14
|
+
import { $ as MintRolloutResult, Q as MintRolloutOptions, R as Scenario, _ as GateDecision, a as CampaignResult, nt as mintRolloutRows, tt as RolloutSearchLineage, w as JudgeScore } from "./types-CmHcpGl0.js";
|
|
15
15
|
import { a as RunFilter, i as InMemoryTraceStore, n as FileSystemTraceStore, o as SpanFilter, s as TraceStore, t as EventFilter } from "./store-CMs5wGXP.js";
|
|
16
16
|
import { a as MintedRolloutLine } from "./schema-BfSoJjD-.js";
|
|
17
|
-
import { Ut as ScorePreference } from "./index-
|
|
18
|
-
import { $ as Objective, R as hashJson, _ as verifyAttestation, _t as pairArms, bt as ArmPopulationReading, ct as MatchedRunRecordPair, dt as PairRunRecordsResult, et as ParetoResult, f as ATTESTATION_ALGORITHM, ft as PairedArmRow, g as attest, gt as comparePairedArms, h as AttestedReport, ht as PairedMetricDelta, lt as PairArmsOptions, m as AttestationVerification, mt as PairedCorrectness, nt as paretoFrontier, ot as ComparePairedArmsOptions, p as AttestationProvenance, pt as PairedArmsComparison, st as MatchedPair, tt as dominates, ut as PairArmsResult, vt as pairRunRecords, xt as ArmPopulationSummary, yt as ArmAssignment, z as manifestContentDigest } from "./campaign-evidence-
|
|
17
|
+
import { Ut as ScorePreference } from "./index-CUpIEvoN.js";
|
|
18
|
+
import { $ as Objective, R as hashJson, _ as verifyAttestation, _t as pairArms, bt as ArmPopulationReading, ct as MatchedRunRecordPair, dt as PairRunRecordsResult, et as ParetoResult, f as ATTESTATION_ALGORITHM, ft as PairedArmRow, g as attest, gt as comparePairedArms, h as AttestedReport, ht as PairedMetricDelta, lt as PairArmsOptions, m as AttestationVerification, mt as PairedCorrectness, nt as paretoFrontier, ot as ComparePairedArmsOptions, p as AttestationProvenance, pt as PairedArmsComparison, st as MatchedPair, tt as dominates, ut as PairArmsResult, vt as pairRunRecords, xt as ArmPopulationSummary, yt as ArmAssignment, z as manifestContentDigest } from "./campaign-evidence-CSb3y1ob.js";
|
|
19
19
|
import { a as PairedPromotionDecision, i as PairedMcNemarEvidence, n as PairedDecisionShape, o as PairedPromotionDecisionOptions, r as PairedDecisionStatistic, s as decidePairedPromotion, t as PairedDecisionMethod } from "./paired-promotion-decision-DJlI4z_k.js";
|
|
20
20
|
import { a as SpanHandle, n as CaptureWrite, o as TraceEmitter, s as TraceEmitterOptions, t as CaptureErrorHandler } from "./emitter-Cw8ijO3v.js";
|
|
21
21
|
import { c as SandboxDriver } from "./sandbox-harness-K3LuyORm.js";
|
|
22
|
-
import { a as ProfileAxisSpec, c as expandProfileAxes, i as HarnessType, l as harnessAxisOf, n as CODING_HARNESSES, o as agentProfileHash, r as HARNESS_NATIVE_MODEL, s as agentProfileId, t as AgentProfile } from "./agent-profile-
|
|
22
|
+
import { a as ProfileAxisSpec, c as expandProfileAxes, i as HarnessType, l as harnessAxisOf, n as CODING_HARNESSES, o as agentProfileHash, r as HARNESS_NATIVE_MODEL, s as agentProfileId, t as AgentProfile } from "./agent-profile-CTneqKs4.js";
|
|
23
23
|
import { i as DatasetSplit, n as DatasetManifest, r as DatasetScenario, t as Dataset } from "./dataset-DThC1S6G.js";
|
|
24
24
|
import { a as MultiLayerVerifier, c as VerifyOptions, i as LayerStatus, l as gradeSemanticStatus, n as Layer, o as Severity, r as LayerResult, s as VerificationReport, t as Finding } from "./multi-layer-verifier-lM4aVN78.js";
|
|
25
25
|
import { a as ProducedProposal, c as SatisfiedBy, d as createLlmCorrectnessChecker, f as verifyCompletion, i as LlmCorrectnessCheckerOpts, l as TaskGold, n as CompletionVerdict, o as ProducedState, r as CorrectnessChecker, s as RequirementCheck, t as CompletionRequirement, u as completionVerdict } from "./completion-verifier-CQOC3_bm.js";
|
|
@@ -28,19 +28,19 @@ import { a as FailureRule, c as failureBlame, i as FailureReasonRule, n as Failu
|
|
|
28
28
|
import { r as failureClusterView } from "./failure-cluster-OvKQ0BTq.js";
|
|
29
29
|
import { a as ParetoPoint, c as SummaryTableRow, l as gainHistogram, n as GainDistributionFigureSpec, o as SummaryTable, r as GainDistributionOptions, s as SummaryTableOptions, t as GainDistributionBin, u as summaryTable } from "./summary-report-figures-CJHygLgw.js";
|
|
30
30
|
import { o as InsightReport } from "./insight-report-DYofCMLx.js";
|
|
31
|
-
import { a as SelfImproveProposerOptions, d as SelfImproveMethodResult, i as SelfImproveProgressEvent, l as selfImprove, n as SelfImproveMethodOptions, o as SelfImproveProposerResult, r as SelfImproveOptions, s as SelfImproveResult, t as SelfImproveBudget, u as SelfImproveMethodProvenance } from "./self-improve-
|
|
32
|
-
import { a as DefinedAgentEval, i as DefineAgentEvalOptions, n as AgentEvalEvaluateOptions, o as defineAgentEval, r as AgentEvalImproveOptions, t as AgentEvalAgent } from "./define-agent-eval-
|
|
33
|
-
import { a as createTraceAnalyst, i as TraceAnalystDefinition, n as buildDefaultAnalystRegistry, r as CreateTraceAnalystOptions, t as DefaultAnalystRegistryOptions } from "./default-registry-
|
|
34
|
-
import { i as ExactAnalystRunEvent, l as ExactCapableAnalyst, o as ExactAnalystRunResult } from "./exact-types-
|
|
31
|
+
import { a as SelfImproveProposerOptions, d as SelfImproveMethodResult, i as SelfImproveProgressEvent, l as selfImprove, n as SelfImproveMethodOptions, o as SelfImproveProposerResult, r as SelfImproveOptions, s as SelfImproveResult, t as SelfImproveBudget, u as SelfImproveMethodProvenance } from "./self-improve-CpmIIb57.js";
|
|
32
|
+
import { a as DefinedAgentEval, i as DefineAgentEvalOptions, n as AgentEvalEvaluateOptions, o as defineAgentEval, r as AgentEvalImproveOptions, t as AgentEvalAgent } from "./define-agent-eval-DyVma2pV.js";
|
|
33
|
+
import { a as createTraceAnalyst, i as TraceAnalystDefinition, n as buildDefaultAnalystRegistry, r as CreateTraceAnalystOptions, t as DefaultAnalystRegistryOptions } from "./default-registry-CKAFLuJg.js";
|
|
34
|
+
import { i as ExactAnalystRunEvent, l as ExactCapableAnalyst, o as ExactAnalystRunResult } from "./exact-types-QwxMWchv.js";
|
|
35
35
|
import { $ as CalibrationExample, Bt as analyzeSeries, Rt as SeriesConvergenceOptions, _t as measureJudgeAgreement, at as JudgeExampleAgreement, ct as JudgeGatePolicy, dt as JudgeRun, et as CalibrationMerge, ft as JudgeRunMeta, gt as judgeGateDecision, ht as assertJudgeMayGate, it as JudgeConfusion, lt as JudgeGateRefusedError, mt as addCalibrationVerdicts, nt as JudgeAgreement, ot as JudgeGateDecision, pt as OwnerVerdict, rt as JudgeCalibrationSet, st as JudgeGateInput, tt as DEFAULT_JUDGE_GATE_POLICY, ut as JudgeGateStatus, vt as registerCalibrationSet, yt as snapshotFromJudgeAgreement, zt as SeriesConvergenceResult } from "./index-BSb3fJyZ.js";
|
|
36
|
-
import { B as DiffPolicy, H as FindingsStore, U as PersistedFinding, V as FindingsDiff, W as diffFindings } from "./systemone-
|
|
37
|
-
import { a as BudgetPolicy, c as RegistryRunOpts, i as AnalystRegistryOptions, s as ExactRegistryRunOpts, t as AnalystRegistry } from "./registry-
|
|
38
|
-
import { n as analyzeRuns, t as AnalyzeRunsOptions } from "./analyze-runs-
|
|
39
|
-
import { B as RetryWrite, C as SEMANTIC_CONCEPT_JUDGE_VERSION, D as runSemanticConceptJudge, E as SemanticConceptJudgeResult, F as ContractSpan, H as SpanPredicate, I as ContractStatus, L as ContractVerdict, M as ContractRule, N as ContractRuleExecution, O as ArgumentCheck, P as ContractRun, S as ConceptSpec, T as SemanticConceptJudgeOptions, U as TraceContract, _ as DspyRlmTraceEngineOptions, a as FAILURE_MODE_KIND_SPEC, b as createChatTraceEngine, d as FindingSubject, f as FindingSubjectKind, j as ContractCheckResult, t as DEFAULT_TRACE_ANALYST_KINDS, v as createDspyRlmTraceEngine, w as SemanticConceptJudgeInput, x as ConceptFinding, y as ChatTraceEngineOptions, z as OrderMode } from "./index-
|
|
36
|
+
import { B as DiffPolicy, H as FindingsStore, U as PersistedFinding, V as FindingsDiff, W as diffFindings } from "./systemone-Co2Lv810.js";
|
|
37
|
+
import { a as BudgetPolicy, c as RegistryRunOpts, i as AnalystRegistryOptions, s as ExactRegistryRunOpts, t as AnalystRegistry } from "./registry-Bh1M9hrf.js";
|
|
38
|
+
import { n as analyzeRuns, t as AnalyzeRunsOptions } from "./analyze-runs-ByEuSMUT.js";
|
|
39
|
+
import { B as RetryWrite, C as SEMANTIC_CONCEPT_JUDGE_VERSION, D as runSemanticConceptJudge, E as SemanticConceptJudgeResult, F as ContractSpan, H as SpanPredicate, I as ContractStatus, L as ContractVerdict, M as ContractRule, N as ContractRuleExecution, O as ArgumentCheck, P as ContractRun, S as ConceptSpec, T as SemanticConceptJudgeOptions, U as TraceContract, _ as DspyRlmTraceEngineOptions, a as FAILURE_MODE_KIND_SPEC, b as createChatTraceEngine, d as FindingSubject, f as FindingSubjectKind, j as ContractCheckResult, t as DEFAULT_TRACE_ANALYST_KINDS, v as createDspyRlmTraceEngine, w as SemanticConceptJudgeInput, x as ConceptFinding, y as ChatTraceEngineOptions, z as OrderMode } from "./index-DmsDwlPe.js";
|
|
40
40
|
import { _ as WelchTestStatus, d as ToolStats, f as ToolUseMetrics, g as WelchTestResult, i as toolWasteView, m as computeToolUseMetrics, p as ToolUseOptions, s as judgeAgreementView, u as budgetBreachView, v as iqr, y as welchsTTest } from "./tool-waste-B01AMpID.js";
|
|
41
|
-
import { i as BenchmarkEvaluation } from "./types-
|
|
42
|
-
import { A as AnalystFindingDigest, B as ControlRuntimeConfig, C as createFeedbackTrajectory, D as renderPreferenceMemoryMarkdown, E as feedbackTrajectoryToOptimizerRow, F as ControlBudget, I as ControlContext, L as ControlDecision, M as AnalystRunDigest, N as analystRunDigest, O as summarizePreferenceMemory, P as ControlActionOutcome, R as ControlEvalResult, S as controlRunToFeedbackTrajectory, T as feedbackTrajectoriesToOptimizerRows, U as ControlStep, V as ControlRuntimeError, W as StopDecision, _ as PreferenceMemoryEntry, a as FeedbackLabel, b as analystRunToReviewRequests, c as FeedbackOptimizerRow, d as FeedbackTask, f as FeedbackTrajectory, g as InMemoryFeedbackTrajectoryStore, h as FileSystemFeedbackTrajectoryStore, i as FeedbackAttempt, j as AnalystReviewDecision, k as withAssignedFeedbackSplit, l as FeedbackOutcome, m as FeedbackTrajectoryStore, n as AnalystReviewRequest, o as FeedbackLabelKind, p as FeedbackTrajectoryFilter, r as FeedbackArtifactType, s as FeedbackLabelSource, t as AnalystFeedbackTrajectoryOptions, u as FeedbackSplitPolicy, v as ProposedSideEffect, w as feedbackTrajectoriesToDatasetScenarios, x as assignFeedbackSplit, y as analystRunToFeedbackTrajectory, z as ControlRunResult } from "./feedback-trajectory-
|
|
43
|
-
import { A as TraceInsightReadiness, F as describeTraceInsightScope, G as AnalyzeTracesResult, H as tokenizeDomainWords, I as domainEvidencePattern, K as analyzeTraces, L as inferDomainKeywords, N as buildTraceInsightContext, P as buildTraceInsightPrompt, V as scoreTraceInsightReadiness, a as captureFetchToRawSink, b as OtlpSpan, c as ExtractedUsage, d as extractUsageFromSse, f as OtlpFileTraceStore, g as spanRecordsToTraceAnalysisStore, h as otlpTextToTraceAnalysisStore, j as TraceInsightSuite, m as SpanRecordsToTraceAnalysisStoreOptions, n as toolSpansToTraceAnalysisStore, o as OtlpFlatLine, u as extractUsage, v as OtlpExport, x as exportRunAsOtlp } from "./store-tool-spans-
|
|
41
|
+
import { i as BenchmarkEvaluation } from "./types-Ci2r6el5.js";
|
|
42
|
+
import { A as AnalystFindingDigest, B as ControlRuntimeConfig, C as createFeedbackTrajectory, D as renderPreferenceMemoryMarkdown, E as feedbackTrajectoryToOptimizerRow, F as ControlBudget, I as ControlContext, L as ControlDecision, M as AnalystRunDigest, N as analystRunDigest, O as summarizePreferenceMemory, P as ControlActionOutcome, R as ControlEvalResult, S as controlRunToFeedbackTrajectory, T as feedbackTrajectoriesToOptimizerRows, U as ControlStep, V as ControlRuntimeError, W as StopDecision, _ as PreferenceMemoryEntry, a as FeedbackLabel, b as analystRunToReviewRequests, c as FeedbackOptimizerRow, d as FeedbackTask, f as FeedbackTrajectory, g as InMemoryFeedbackTrajectoryStore, h as FileSystemFeedbackTrajectoryStore, i as FeedbackAttempt, j as AnalystReviewDecision, k as withAssignedFeedbackSplit, l as FeedbackOutcome, m as FeedbackTrajectoryStore, n as AnalystReviewRequest, o as FeedbackLabelKind, p as FeedbackTrajectoryFilter, r as FeedbackArtifactType, s as FeedbackLabelSource, t as AnalystFeedbackTrajectoryOptions, u as FeedbackSplitPolicy, v as ProposedSideEffect, w as feedbackTrajectoriesToDatasetScenarios, x as assignFeedbackSplit, y as analystRunToFeedbackTrajectory, z as ControlRunResult } from "./feedback-trajectory-BkWAgoY0.js";
|
|
43
|
+
import { A as TraceInsightReadiness, F as describeTraceInsightScope, G as AnalyzeTracesResult, H as tokenizeDomainWords, I as domainEvidencePattern, K as analyzeTraces, L as inferDomainKeywords, N as buildTraceInsightContext, P as buildTraceInsightPrompt, V as scoreTraceInsightReadiness, a as captureFetchToRawSink, b as OtlpSpan, c as ExtractedUsage, d as extractUsageFromSse, f as OtlpFileTraceStore, g as spanRecordsToTraceAnalysisStore, h as otlpTextToTraceAnalysisStore, j as TraceInsightSuite, m as SpanRecordsToTraceAnalysisStoreOptions, n as toolSpansToTraceAnalysisStore, o as OtlpFlatLine, u as extractUsage, v as OtlpExport, x as exportRunAsOtlp } from "./store-tool-spans-B9zc0I1r.js";
|
|
44
44
|
import { a as RunIntegrityReport, o as assertRunCaptured, t as RunIntegrityError } from "./integrity-DotDLWtj.js";
|
|
45
45
|
import { a as SteeringChange, c as CampaignRunContext, d as CampaignVariant, f as EvalCampaignOptions, h as runEvalCampaign, i as Researcher, l as CampaignRunOutcome, m as FailedRun, n as ExperimentResult, o as CampaignFactoryParams, p as EvalCampaignResult, r as FailureMode, s as CampaignIntegrityPolicy, t as ExperimentPlan, u as CampaignScenario } from "./researcher-BOpZP_Ja.js";
|
|
46
46
|
import { C as requiredPairsForPairedPromotion, S as pairedPromotionPower, _ as PairedPromotionPowerOptions, a as PairedEvalueStep, b as RequiredPairsForPairedPromotionOptions, c as SequentialDecision, d as sequentialCrossingHorizon, f as sequentialPairedPower, g as PairedPromotionPowerCall, h as PairedPromotionCallRates, i as PairedEvalueSequence, l as evaluateInterimReleaseConfidence, m as PairedPromotionAlternativeCell, n as InterimReleaseConfidenceInput, p as PairedPromotionAlternative, r as PairedEvalueOptions, t as InterimReleaseConfidence, u as pairedEvalueSequence, v as PairedPromotionPowerResult, x as RequiredPairsForPairedPromotionResult, y as PairedValueLaw } from "./sequential-CHplorpC.js";
|
package/dist/index.js
CHANGED
|
@@ -19,17 +19,17 @@ import { i as pairedDeltaTest, n as pairedDecisionShape, r as minimumPairsForPai
|
|
|
19
19
|
import { a as llmSpans, c as runsForScenario, i as judgeSpans, s as runMetricExtractor, t as argHash } from "./query-Dhjkwqyx.js";
|
|
20
20
|
import { a as mapConcurrent } from "./journal-3y-btqaP.js";
|
|
21
21
|
import { n as contentHash, r as fileVerdictCache, t as canonicalJson } from "./verdict-cache-BPaYxfG8.js";
|
|
22
|
-
import { B as redTeamDataset, H as scoreRedTeamOutput, Q as runCampaign, U as Dataset, V as redTeamReport, W as runCanaries, z as DEFAULT_RED_TEAM_CORPUS } from "./optimization-method-
|
|
22
|
+
import { B as redTeamDataset, H as scoreRedTeamOutput, Q as runCampaign, U as Dataset, V as redTeamReport, W as runCanaries, z as DEFAULT_RED_TEAM_CORPUS } from "./optimization-method-B-NFaHom.js";
|
|
23
23
|
import { c as MODEL_PRICING, d as estimateCost, f as isModelPriced, i as CostCeilingReachedError, l as costForTokenPricing, n as CostAccountingIncompleteError, p as resolveModelPricing, t as CostLedger, u as costForUsage } from "./cost-ledger-ni6f77QJ.js";
|
|
24
24
|
import { E as assertRealBackend, O as summarizeBackendIntegrity, T as BackendIntegrityError, a as ATTESTATION_ALGORITHM, b as parseReflectionResponse, o as attest, s as verifyAttestation, v as buildReflectionPrompt } from "./campaign-evidence-71uzJMVY.js";
|
|
25
|
-
import { a as clamp01, i as aggregateRunScore, r as transientDispatchFailure, t as llmJudge } from "./llm-judge-
|
|
25
|
+
import { a as clamp01, i as aggregateRunScore, r as transientDispatchFailure, t as llmJudge } from "./llm-judge-DRHTRT66.js";
|
|
26
26
|
import { s as surfaceContentHash } from "./json-recovery-BRUCeQxo.js";
|
|
27
27
|
import { c as redactText, l as shareAllowed, n as REDACTION_VERSION, o as redact, r as assessShareSafety, s as redactForShare } from "./redact-zp_ILC4l.js";
|
|
28
28
|
import { a as makeProposalFinding, i as makeFinding, r as computeFindingId } from "./types-_tlhWGUq.js";
|
|
29
29
|
import { a as LlmCallError, i as stripFencedJson, n as isRecord, o as LlmResponseError } from "./json-DtvZNAU9.js";
|
|
30
30
|
import { n as pairedPromotionPower, r as requiredPairsForPairedPromotion } from "./paired-promotion-power-DG1avBKf.js";
|
|
31
|
-
import { n as selfImprove } from "./self-improve-
|
|
32
|
-
import { t as defineAgentEval } from "./define-agent-eval-
|
|
31
|
+
import { n as selfImprove } from "./self-improve-Dm9PvLF2.js";
|
|
32
|
+
import { t as defineAgentEval } from "./define-agent-eval-CBhYD7Gq.js";
|
|
33
33
|
import { n as equivalenceVerdict, t as certificationEvidenceDigest } from "./verdict-5PVtsWT_.js";
|
|
34
34
|
import { a as runEquivalenceCheck, i as defineEquivalenceCheck, n as VERIFICATION_STRATEGIES, r as VERIFICATION_STRATEGY_SOURCES, t as EquivalenceProtocolError } from "./verification-strategy-CYhDX1rE.js";
|
|
35
35
|
import { c as createBoundedTraceAnalysisStore, p as DEFAULT_TRACE_ANALYST_BUDGETS, t as createTraceAnalyst } from "./kind-factory-C8MJpMTV.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as weightedComposite } from "./paired-tests-CXcD_B80.js";
|
|
2
2
|
import { n as contentHash } from "./verdict-cache-BPaYxfG8.js";
|
|
3
|
-
import { Q as runCampaign } from "./optimization-method-
|
|
3
|
+
import { Q as runCampaign } from "./optimization-method-B-NFaHom.js";
|
|
4
4
|
import { t as CostLedger } from "./cost-ledger-ni6f77QJ.js";
|
|
5
5
|
import { i as stripFencedJson } from "./json-DtvZNAU9.js";
|
|
6
6
|
import { a as maximumChargeForLlmRequest, i as costReceiptFromLlmError, r as costReceiptFromLlm } from "./llm-client-D4B1qR_1.js";
|
|
@@ -473,4 +473,4 @@ function firstString(value) {
|
|
|
473
473
|
}
|
|
474
474
|
export { clamp01 as a, aggregateRunScore as i, isTransientTransportFailure as n, runEval as o, transientDispatchFailure as r, llmJudge as t };
|
|
475
475
|
|
|
476
|
-
//# sourceMappingURL=llm-judge-
|
|
476
|
+
//# sourceMappingURL=llm-judge-DRHTRT66.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-judge-Bf3p1WNA.js","names":[],"sources":["../src/campaign/presets/run-eval.ts","../src/run-score.ts","../src/campaign/transient-failure.ts","../src/llm-judge.ts"],"sourcesContent":["/**\n * `runEval` — the simplest preset over `runCampaign`. No optimizer, no\n * gate, no auto-PR. Just: run scenarios through dispatch, score with\n * judges, return CampaignResult.\n *\n * The 80% case for consumers who want a scorecard, not an improvement loop.\n */\n\nimport { type RunCampaignOptions, runCampaign } from '../run-campaign'\nimport type { CampaignResult, Scenario } from '../types'\n\nexport interface RunEvalOptions<TScenario extends Scenario, TArtifact>\n extends Omit<RunCampaignOptions<TScenario, TArtifact>, 'runDir'> {\n runDir: string\n}\n\n/**\n * Simplest evaluation preset: run scenarios through dispatch, score with judges, and return a `CampaignResult` — no optimizer, no gate, no PR.\n */\nexport async function runEval<TScenario extends Scenario, TArtifact>(\n opts: RunEvalOptions<TScenario, TArtifact>,\n): Promise<CampaignResult<TArtifact, TScenario>> {\n return runCampaign(opts)\n}\n","export interface RunScore {\n success: number\n goalProgress: number\n repoGroundedness: number\n driftPenalty: number\n toolUseQuality: number\n patchQuality: number\n testReality: number\n finalGate: number\n reviewerBlockers: number\n costUsd: number\n wallSeconds: number\n notes?: string[]\n}\n\nexport type RunScoreWeights = Omit<RunScore, 'notes'>\n\nconst DEFAULT_RUN_SCORE_WEIGHTS: RunScoreWeights = {\n success: 4,\n goalProgress: 2,\n repoGroundedness: 1.5,\n driftPenalty: -1.5,\n toolUseQuality: 1,\n patchQuality: 1.25,\n testReality: 1.5,\n finalGate: 3,\n reviewerBlockers: -2,\n costUsd: -0.2,\n wallSeconds: -0.1,\n}\n\nexport function aggregateRunScore(score: RunScore, weights: Partial<RunScoreWeights> = {}): number {\n const w = { ...DEFAULT_RUN_SCORE_WEIGHTS, ...weights }\n return (Object.keys(DEFAULT_RUN_SCORE_WEIGHTS) as Array<keyof RunScoreWeights>)\n .map(\n (key) =>\n w[key] *\n (key === 'costUsd' || key === 'wallSeconds'\n ? Math.max(0, finiteOrZero(score[key]) / (key === 'wallSeconds' ? 60 : 1))\n : clamp01(score[key])),\n )\n .reduce((sum, term) => sum + term)\n}\n\nexport function clamp01(value: number): number {\n return Math.max(0, Math.min(1, finiteOrZero(value)))\n}\n\nfunction finiteOrZero(value: number): number {\n return Number.isFinite(value) ? value : 0\n}\n","/**\n * Transient-transport-failure classification for dispatch retry policies.\n *\n * When an eval cell dies, the harness must decide: retry (the infrastructure\n * hiccuped - a 502 storm, an admission-queue rejection, a dropped stream) or\n * score it (the agent genuinely failed). Getting this wrong corrupts results\n * in both directions: scoring transport hiccups as failures buries real\n * effects under noise (agent-lab R353 found 5/30 identical repeats were 502s\n * scored as task failures), while retrying genuine failures silently drops\n * the hard cells and inflates every arm.\n *\n * A third direction was measured later and is not a knob: a provider refusal that states its own\n * release time (`quotaExhaustedUntil`). Retrying that is neither scoring nor recovering — it is\n * spending a subscription against a wall the provider already dated. It is terminal until the\n * stated instant, and an undated rate limit is untouched.\n *\n * Full-duration timeouts are the deliberate knob: on saturated shared\n * infrastructure a timeout usually means the request never got a slot\n * (retry it), but on unthrottled infrastructure it means the agent flailed\n * on the task until the clock ran out (a real score-0). Both readings were\n * needed in practice within one week, so the classifier takes it as an\n * option instead of hardcoding either.\n */\n\nimport type { CampaignCellFailureReceipt } from './run-campaign'\n\nexport interface TransientFailureOptions {\n /**\n * Treat full-duration timeouts (\"timeout after 180000ms\") as transient.\n * Enable on saturated shared infrastructure where queue starvation eats\n * the clock; leave off when the agent had the resources and simply failed.\n * Default false.\n */\n readonly retryFullDurationTimeouts?: boolean\n /** Additional caller-specific transient patterns. */\n readonly extraPatterns?: readonly RegExp[]\n /**\n * The instant a dated quota refusal is measured against. Defaults to `Date.now()`; inject it\n * to replay a past classification, which is what a retry audit needs.\n */\n readonly now?: number\n}\n\nconst BASE_TRANSIENT =\n /\\b50[234]\\b|no stream output|produced no stream|admission timed out|admission_rejected|queue_timeout|fetch failed|ECONNRESET|This operation was aborted/i\n\nconst TIMEOUT_PATTERN = /timeout after \\d+ ?ms|cli-bridge timeout/i\n\n/**\n * A provider refusal about a SPENT ALLOWANCE, which is not the same thing as a rate limit. It\n * becomes a release time only when a date follows it; the phrase alone stays retryable.\n *\n * `rate limit reached` is deliberately absent. Measured 2026-09-01: a z.ai 429 payload carries\n * `Rate limit reached for requests` and, 4,134 characters later in the same attempt log,\n * `reset at 2026-09-02 02:05:02`. That reset is minutes away and retrying it is correct. A\n * per-minute limit recovers on its own; an allowance does not.\n */\nconst QUOTA_PHRASE =\n /hit your usage limit|usage limit reached|insufficient balance|quota exceeded/gi\n\n/**\n * The clause that introduces the release time. The date may sit behind a purchase link and an\n * `or`, so the phrase and the clause are matched independently rather than as one span.\n */\nconst RELEASE_CLAUSE =\n /(?:try again|resets?|available again|retry)\\s+(?:at|on|after)\\s+([^\\n]{4,80})/i\n\n/**\n * How far past a refusal its release time may sit. Long enough for the purchase URL the codex\n * message puts between them, far shorter than one attempt record — see `quotaExhaustedUntil`.\n */\nconst RELEASE_WINDOW_CHARS = 400\n\n/**\n * The shapes a stated release is written in, in the order they are tried. THESE ARE THE\n * VALIDATION: a fragment that matches none of them is not a date, whatever `Date.parse` makes of\n * it. That matters — `Date.parse('Blursday 9999')` returns 9999-01-01, and a bare four-digit\n * number in prose would otherwise become a release nine thousand years out and stop a caller\n * forever.\n */\nconst RELEASE_SHAPES = [\n // NO UNZONED CLOCK. Measured 2026-09-01 on the z.ai seat: `Usage limit reached for 5 hour. Your\n // limit will reset at 2026-09-02 02:05:02` — a real spent allowance that states a real release,\n // in a machine payload with no zone at all. Read in the host's zone (UTC-6) that is 08:05Z; read\n // as the provider's it is 02:05Z. Nothing in the message decides between them, and a six-hour\n // error is six hours of a healthy seat withheld. A month-name or slash rendering is a CLI\n // printing in the HOST's zone, which is knowable; a bare numeric clock is not, and is refused.\n\n // 2026-09-07T02:29:00Z, 2026-09-07T02:29+02:00, or a bare 2026-09-07 (which ECMA-262 reads as\n // UTC). A numeric date-time with NO zone is deliberately absent — see NO UNZONED CLOCK below.\n /\\d{4}-\\d{2}-\\d{2}(?:[T ]\\d{1,2}:\\d{2}(?::\\d{2})?(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2}))?(?![\\d\\s:T-])/,\n // Sep 6th, 2026 8:29 PM · September 6 2026 · Sep 6, 2026\n /(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*\\.?\\s+\\d{1,2}(?:st|nd|rd|th)?,?\\s+\\d{4}(?:,?\\s+\\d{1,2}:\\d{2}(?::\\d{2})?\\s*(?:[AaPp]\\.?[Mm]\\.?)?)?/,\n // 6 September 2026\n /\\d{1,2}(?:st|nd|rd|th)?\\s+(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*\\.?,?\\s+\\d{4}/,\n // 9/6/2026 8:29 PM\n /\\d{1,2}\\/\\d{1,2}\\/\\d{4}(?:,?\\s+\\d{1,2}:\\d{2}(?::\\d{2})?\\s*(?:[AaPp]\\.?[Mm]\\.?)?)?/,\n]\n\n/**\n * The instant a provider says a spent quota works again, or null when the text states none.\n *\n * MEASURED (2026-09-01, discovery lab). The codex/ChatGPT backend answered\n * `You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more\n * credits or try again at Sep 6th, 2026 8:29 PM.` — a refusal SIX DAYS out. 25 supervised runs met\n * it. 21 of them retried it 12 times over about 31 minutes and settled with zero children, zero\n * tokens and zero claims: about 11 hours of one subscription's capacity spent on a wall that had\n * already told the caller when it would come down.\n *\n * The distinction this draws is not \"quota\" versus \"not quota\". It is \"the provider named a\n * release time\" versus \"it did not\". A bare 429, or z.ai's `您的账户已达到速率限制`, recovers on\n * its own in seconds and SHOULD be retried; those return null here and keep their existing\n * treatment. Only a stated release is terminal, and only until that instant.\n *\n * A date with no zone is read in the host's zone, because a CLI renders it in the host's zone.\n * An unparseable date returns null rather than a guess: a caller that stops dispatching must\n * never do so on a misread string.\n *\n * @param message the provider's error text\n * @returns the stated release time, or null when the text names none\n */\nfunction quotaExhaustedUntil(message: string | null | undefined): Date | null {\n if (!message) return null\n QUOTA_PHRASE.lastIndex = 0\n // THE RELEASE MUST BELONG TO THE REFUSAL. An error string can carry several provider payloads,\n // so searching the whole text for a phrase and, separately, for a date reads one payload's\n // quota against another payload's timestamp. Measured 2026-09-01: that pairing matched a z.ai\n // 429 to a date 4,134 characters away. The clause is searched only in the window FOLLOWING\n // each refusal.\n for (\n let phrase = QUOTA_PHRASE.exec(message);\n phrase !== null;\n phrase = QUOTA_PHRASE.exec(message)\n ) {\n const clause = RELEASE_CLAUSE.exec(\n message.slice(phrase.index, phrase.index + RELEASE_WINDOW_CHARS),\n )\n const stated = clause?.[1]\n if (stated === undefined) continue\n for (const shape of RELEASE_SHAPES) {\n const found = shape.exec(stated)\n if (found === null) continue\n // `Sep 6th` is not a date any parser accepts; the ordinal suffix is the only edit made.\n const until = Date.parse(found[0].replace(/\\b(\\d{1,2})(?:st|nd|rd|th)\\b/gi, '$1'))\n if (Number.isFinite(until)) return new Date(until)\n }\n }\n return null\n}\n\n/**\n * True when the error text describes an infrastructure hiccup that should be\n * retried rather than scored. Empty/undefined input is not transient.\n */\nexport function isTransientTransportFailure(\n message: string | null | undefined,\n opts: TransientFailureOptions = {},\n): boolean {\n if (!message) return false\n // A refusal that names its own release time is TERMINAL until that time, whatever else the text\n // matches. Checked first, and ahead of `extraPatterns`, because a caller's broad rate-limit\n // pattern would otherwise turn a six-day wall into a retry loop — see `quotaExhaustedUntil`.\n const until = quotaExhaustedUntil(message)\n if (until !== null && until.getTime() > (opts.now ?? Date.now())) return false\n if (BASE_TRANSIENT.test(message)) return true\n if ((opts.retryFullDurationTimeouts ?? false) && TIMEOUT_PATTERN.test(message)) return true\n for (const p of opts.extraPatterns ?? []) if (p.test(message)) return true\n return false\n}\n\n/**\n * Ready-made `cellRetry.retryable` predicate: true for a dispatch-stage\n * failure whose error message `isTransientTransportFailure` classifies as an\n * infrastructure hiccup. A judge-stage failure is never retried here — the\n * dispatch already produced an artifact, so re-dispatching would score a\n * different sample. A per-cell dispatch deadline (\"dispatch exceeded <N>ms\")\n * is not transient by default; opt in via `extraPatterns` or\n * `retryFullDurationTimeouts` when queue starvation eats the clock. A provider refusal that\n * states its own release time is never retried while that time is in the future\n * (`quotaExhaustedUntil`).\n */\nexport function transientDispatchFailure(\n opts: TransientFailureOptions = {},\n): (failure: CampaignCellFailureReceipt['failure']) => boolean {\n return (failure) =>\n failure.stage === 'dispatch' && isTransientTransportFailure(failure.error.message, opts)\n}\n","/**\n * `llmJudge` — the single-LLM-call bridge that turns a rubric prompt into a\n * canonical campaign `JudgeConfig`.\n *\n * The `JudgeConfig` contract (src/campaign/types.ts) is deliberately a\n * function, not a fixed LLM-prompt shape: real consumers judge with\n * ensembles, deterministic checks, or one LLM call. `ensembleJudge`\n * (src/judge-panel.ts) covers the multi-model case. `llmJudge` covers the\n * common single-call case the `JudgeConfig` doc-comment names:\n * one model call against `prompt`, parsed into the canonical `JudgeScore`\n * (`{ dimensions, composite, notes }`) on the campaign [0,1] scale.\n *\n * Transport is injected as a `ChatClient` (src/analyst/chat-client.ts) — the\n * substrate's transport-agnostic LLM seam — so the judge stays decoupled from\n * router-vs-sandbox-vs-cli-bridge and is unit-testable with the `mock`\n * transport. The composite is computed by `weightedComposite` (the same\n * sum-normalized weighting `ensembleJudge` uses), so a lift is attributable to\n * the dimension scores, not to a bespoke reducer.\n *\n * Fail-loud throughout: an unparseable model response throws `JudgeParseError`;\n * a response missing a declared dimension throws; an out-of-range score throws.\n * A thrown judge is recorded by the campaign engine as a failed cell, never\n * folded into a silent zero.\n */\n\nimport { z } from 'zod'\nimport type { ChatClient } from './analyst/chat-client'\nimport type { JudgeConfig, JudgeDimension, JudgeScore, Scenario } from './campaign/types'\nimport { CostLedger, type CostLedgerHandle } from './cost-ledger'\nimport { JudgeParseError } from './judges'\nimport {\n costReceiptFromLlm,\n costReceiptFromLlmError,\n type LlmCallMetadata,\n type LlmCallRequest,\n type LlmCallResult,\n type LlmTokenLogprob,\n maximumChargeForLlmRequest,\n stripFencedJson,\n} from './llm-client'\nimport { clamp01 } from './run-score'\nimport { weightedComposite } from './statistics'\nimport { contentHash } from './verdict-cache'\n\n/** A rubric dimension as a bare key or the full `{ key, description }` shape. A\n * bare string uses the key as its own description. */\nexport type LlmJudgeDimension = string | JudgeDimension\n\nexport interface LlmJudgeOptions<TArtifact, TScenario extends Scenario = Scenario> {\n /** The injected LLM transport. One `chat()` call per `score()`. Required —\n * there is no default route, so a misconfigured judge fails at construction,\n * never silently against the free-tier router. */\n chat: ChatClient\n /** Rubric dimensions the model scores. Each becomes a `[0,1]` field of the\n * returned `JudgeScore.dimensions`. Defaults to a single `quality` dimension. */\n dimensions?: LlmJudgeDimension[]\n /** Model id. Falls back to `chat.defaultModel`; one of the two MUST resolve. */\n model?: string\n /** Explicit scoring revision for opaque transport or renderer changes. */\n judgeVersion?: string\n temperature?: number\n maxTokens?: number\n /** Composite weights forwarded to `weightedComposite`: a partial map selects\n * AND weights exactly the named dimensions. Omit for a uniform mean. */\n weights?: Record<string, number>\n /**\n * How to read a score out of the model's answer.\n *\n * `'sampled'` (default) reads the number the model emitted. Discrete grades\n * tie often, and a tie carries no ranking signal.\n *\n * `'expectation'` asks the provider for the log probabilities of the score\n * token and returns the expected value over the integer grades the model\n * considered, so two answers that both sample `8` separate by how much mass\n * sat on `7` and `9`. It requires `scale: 'ten'`: an integer grade is one\n * token, and a `unit` float is not. `whenUnavailable` decides what happens\n * when the provider returns no log probabilities, or the grade did not land\n * in one token: `'fail'` throws, `'sampled'` reads the emitted number and\n * records `scoringMethod: 'sampled'` on the score.\n */\n scoring?: { method: 'sampled' } | { method: 'expectation'; whenUnavailable: 'fail' | 'sampled' }\n /** Scale the model is prompted to score on, normalized into `[0,1]`:\n * - `'unit'` (default): the model returns `[0,1]` directly.\n * - `'ten'`: the model returns `[0,10]`; divided by 10 here.\n * The prompt is annotated with the expected range either way. */\n scale?: 'unit' | 'ten'\n /** Run this judge only on matching scenarios (mirrors `JudgeConfig.appliesTo`). */\n appliesTo?: (scenario: TScenario) => boolean\n /** Render the artifact + scenario into the user message. Default:\n * pretty-printed JSON of `{ scenario, artifact }`. */\n renderUser?: (input: { artifact: TArtifact; scenario: TScenario }) => string\n /** Strict runtime contract; its JSON Schema is sent to the provider. */\n costLedger?: CostLedgerHandle\n responseSchema?: { name: string; schema: z.ZodObject }\n}\n\ninterface RawJudgeResponse {\n dimensions?: Record<string, unknown>\n scores?: Record<string, unknown>\n notes?: unknown\n rationale?: unknown\n}\n\n/**\n * Build a campaign-shaped `JudgeConfig` whose `score()` makes ONE LLM call\n * against `prompt` and reduces the model's per-dimension scores to a canonical\n * `JudgeScore` in `[0,1]`.\n *\n * The model is instructed to return JSON `{ \"dimensions\": { <key>: <number>, … },\n * \"notes\": \"…\" }`; the helper strips fenced JSON, validates every declared\n * dimension is present and in range, normalizes by `scale`, and composites via\n * `weightedComposite`.\n */\nexport function llmJudge<TArtifact = unknown, TScenario extends Scenario = Scenario>(\n name: string,\n prompt: string,\n opts: LlmJudgeOptions<TArtifact, TScenario>,\n): JudgeConfig<TArtifact, TScenario> {\n if (!name.trim()) {\n throw new Error('llmJudge: name must be non-empty')\n }\n if (!prompt.trim()) {\n throw new Error(`llmJudge '${name}': prompt must be non-empty`)\n }\n const model = opts.model ?? opts.chat.defaultModel\n if (!model) {\n throw new Error(\n `llmJudge '${name}': no model on opts and no defaultModel on the ChatClient — ` +\n 'pass opts.model or bind defaultModel at createChatClient().',\n )\n }\n\n const dimensions = normalizeDimensions(opts.dimensions, name)\n const scale = opts.scale ?? 'unit'\n const divisor = scale === 'ten' ? 10 : 1\n const scoring = opts.scoring ?? { method: 'sampled' }\n if (scoring.method === 'expectation' && scale !== 'ten') {\n throw new Error(\n `llmJudge '${name}': expectation scoring requires scale 'ten' — a [0,1] score is not one token, so no single position carries its distribution`,\n )\n }\n const renderUser =\n opts.renderUser ??\n ((input: { artifact: TArtifact; scenario: TScenario }) =>\n JSON.stringify({ scenario: input.scenario, artifact: input.artifact }, null, 2))\n\n if (opts.weights) {\n for (const key of Object.keys(opts.weights)) {\n if (!dimensions.some((d) => d.key === key)) {\n throw new Error(\n `llmJudge '${name}': weights names dimension '${key}' that is not declared in dimensions`,\n )\n }\n }\n }\n\n const systemPrompt = `${prompt}\\n\\n${renderContract(dimensions, scale)}`\n const directCostLedger = opts.costLedger ?? new CostLedger()\n let jsonSchema: { name: string; schema: Record<string, unknown> } | undefined\n if (opts.responseSchema) {\n const schema = { ...(z.toJSONSchema(opts.responseSchema.schema) as Record<string, unknown>) }\n delete schema.$schema\n jsonSchema = { name: opts.responseSchema.name, schema }\n }\n const declaredJudgeVersion = opts.judgeVersion?.trim()\n if (opts.judgeVersion !== undefined && !declaredJudgeVersion) {\n throw new Error(`llmJudge '${name}': judgeVersion must be non-empty when provided`)\n }\n const judgeVersion =\n declaredJudgeVersion ??\n contentHash({\n kind: 'llmJudge',\n prompt: systemPrompt,\n model,\n transport: opts.chat.transport,\n maximumAttempts: opts.chat.maximumAttempts ?? null,\n temperature: opts.temperature ?? 0.1,\n maxTokens: opts.maxTokens ?? 800,\n weights: opts.weights ?? null,\n scale,\n scoring,\n jsonSchema: jsonSchema ?? null,\n renderUser: opts.renderUser?.toString() ?? null,\n })\n\n return {\n name,\n dimensions,\n judgeVersion,\n appliesTo: opts.appliesTo,\n async score({\n artifact,\n scenario,\n signal,\n costLedger,\n costPhase,\n costTags,\n }): Promise<JudgeScore> {\n const request: LlmCallRequest = {\n model,\n messages: [\n { role: 'system', content: systemPrompt },\n { role: 'user', content: renderUser({ artifact, scenario }) },\n ],\n jsonMode: true,\n jsonSchema,\n ...(scoring.method === 'expectation'\n ? { logprobs: { topLogprobs: EXPECTATION_TOP_LOGPROBS } }\n : {}),\n temperature: opts.temperature ?? 0.1,\n maxTokens: opts.maxTokens ?? 800,\n }\n const paid = await (costLedger ?? directCostLedger).runPaidCall({\n channel: 'judge',\n phase: costPhase ?? 'judge',\n actor: name,\n model,\n maximumCharge:\n opts.chat.maximumAttempts === undefined\n ? undefined\n : maximumChargeForLlmRequest(request, {\n maximumAttempts: opts.chat.maximumAttempts,\n }),\n tags: { ...costTags, scenarioId: scenario.id },\n signal,\n execute: (callSignal, callId) =>\n opts.chat.chat(request, { signal: callSignal, idempotencyKey: callId }),\n receipt: costReceiptFromLlm,\n receiptFromError: costReceiptFromLlmError,\n })\n if (!paid.succeeded) throw paid.error\n const response = paid.value\n const llmCall: LlmCallMetadata = {\n usage: response.usage,\n costUsd: response.costUsd,\n model: response.model,\n durationMs: response.durationMs,\n }\n\n const parsed = parseResponse(name, response, opts.responseSchema?.schema, llmCall)\n const rawDims = parsed.dimensions ?? parsed.scores\n if (!rawDims || typeof rawDims !== 'object') {\n throw new JudgeParseError(name, response.content, {\n cause: new Error('response has no `dimensions` object'),\n llmCall,\n })\n }\n\n const sampled: Record<string, number> = {}\n for (const { key } of dimensions) {\n const raw = (rawDims as Record<string, unknown>)[key]\n const value = Number(raw)\n if (raw === undefined || raw === null || !Number.isFinite(value)) {\n throw new JudgeParseError(name, response.content, {\n cause: new Error(\n `dimension '${key}' missing or non-numeric (got ${JSON.stringify(raw)})`,\n ),\n llmCall,\n })\n }\n sampled[key] = value\n }\n\n let scoringMethod: 'sampled' | 'expectation' = 'sampled'\n let distribution: Record<string, Array<{ score: number; probability: number }>> | undefined\n const dims: Record<string, number> = {}\n if (scoring.method === 'expectation') {\n const expectation = expectedDimensionScores({\n tokens: response.logprobs ?? null,\n sampled,\n maxScore: divisor,\n })\n if (expectation.kind === 'unavailable') {\n if (scoring.whenUnavailable === 'fail') {\n throw new Error(\n `llmJudge '${name}': expectation scoring is unavailable — ${expectation.reason}`,\n )\n }\n } else {\n scoringMethod = 'expectation'\n distribution = expectation.distribution\n for (const { key } of dimensions) dims[key] = clamp01(expectation.scores[key]! / divisor)\n }\n }\n if (scoringMethod === 'sampled') {\n for (const { key } of dimensions) dims[key] = clamp01(sampled[key]! / divisor)\n }\n\n const weights =\n opts.weights ?? Object.fromEntries(dimensions.map((d) => [d.key, 1 / dimensions.length]))\n const { composite } = weightedComposite({ dims, weights })\n\n const notes =\n firstString(parsed.notes) ??\n firstString(parsed.rationale) ??\n `${name}: composite ${composite.toFixed(3)} over ${dimensions.length} dimension(s)`\n\n return {\n dimensions: dims,\n composite,\n notes,\n llmCall,\n ...(opts.scoring ? { scoringMethod } : {}),\n ...(distribution ? { distribution } : {}),\n }\n },\n }\n}\n\n/** Alternatives requested per score token. Twenty is the documented ceiling of\n * the OpenAI-compatible `top_logprobs` field, and a grade scale has at most\n * eleven integer candidates, so the window always covers the whole scale. */\nconst EXPECTATION_TOP_LOGPROBS = 20\n\ntype ExpectationResult =\n | {\n kind: 'expectation'\n scores: Record<string, number>\n distribution: Record<string, Array<{ score: number; probability: number }>>\n }\n | { kind: 'unavailable'; reason: string }\n\n/**\n * Expected grade per dimension: locate the token that carried each dimension's\n * integer score, then average the integer grades the model considered at that\n * position, weighted by their probabilities.\n *\n * Unavailable — never silently approximated — when the provider returned no\n * log probabilities, when a dimension's grade is not in the token stream, or\n * when the grade did not land in exactly one token (a two-token `10`, a float).\n */\nfunction expectedDimensionScores(input: {\n tokens: ReadonlyArray<LlmTokenLogprob> | null\n sampled: Record<string, number>\n maxScore: number\n}): ExpectationResult {\n const { tokens, sampled, maxScore } = input\n if (tokens === null) return { kind: 'unavailable', reason: 'the provider returned no logprobs' }\n if (tokens.length === 0) {\n return { kind: 'unavailable', reason: 'the provider returned an empty logprob stream' }\n }\n const offsets: number[] = []\n let text = ''\n for (const token of tokens) {\n offsets.push(text.length)\n text += token.token\n }\n\n const scores: Record<string, number> = {}\n const distribution: Record<string, Array<{ score: number; probability: number }>> = {}\n for (const [key, value] of Object.entries(sampled)) {\n const match = new RegExp(`\"${escapeRegExp(key)}\"\\\\s*:\\\\s*`).exec(text)\n if (!match) {\n return { kind: 'unavailable', reason: `dimension '${key}' is not in the token stream` }\n }\n const scoreOffset = match.index + match[0].length\n let index = -1\n for (let position = 0; position < offsets.length; position++) {\n if (offsets[position]! <= scoreOffset) index = position\n else break\n }\n const token = tokens[index]\n if (!token) {\n return {\n kind: 'unavailable',\n reason: `dimension '${key}' has no token at its score position`,\n }\n }\n if (integerGrade(token.token, maxScore) !== value) {\n return {\n kind: 'unavailable',\n reason: `dimension '${key}' scored ${value}, which is not the whole of its token '${token.token}'`,\n }\n }\n const candidates: Array<{ score: number; probability: number }> = []\n let total = 0\n for (const alternative of token.top.length > 0 ? token.top : [token]) {\n const grade = integerGrade(alternative.token, maxScore)\n if (grade === null) continue\n const probability = Math.exp(alternative.logprob)\n if (!Number.isFinite(probability) || probability <= 0) continue\n candidates.push({ score: grade, probability })\n total += probability\n }\n if (candidates.length === 0 || total <= 0) {\n return {\n kind: 'unavailable',\n reason: `dimension '${key}' has no integer grade in its probability window`,\n }\n }\n let expectation = 0\n for (const candidate of candidates)\n expectation += (candidate.probability / total) * candidate.score\n scores[key] = expectation\n distribution[key] = candidates\n .map((candidate) => ({ score: candidate.score, probability: candidate.probability / total }))\n .sort((left, right) => left.score - right.score)\n }\n return { kind: 'expectation', scores, distribution }\n}\n\n/** The token's integer grade on the judge's scale, or null when the token is\n * not exactly one integer in range. */\nfunction integerGrade(token: string, maxScore: number): number | null {\n const trimmed = token.trim()\n if (!/^\\d+$/.test(trimmed)) return null\n const value = Number(trimmed)\n return Number.isInteger(value) && value >= 0 && value <= maxScore ? value : null\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n}\n\nfunction normalizeDimensions(\n input: LlmJudgeDimension[] | undefined,\n name: string,\n): JudgeDimension[] {\n const raw = input && input.length > 0 ? input : ['quality']\n const out: JudgeDimension[] = []\n const seen = new Set<string>()\n for (const d of raw) {\n const dim = typeof d === 'string' ? { key: d, description: d } : d\n if (!dim.key.trim()) {\n throw new Error(`llmJudge '${name}': dimension key must be non-empty`)\n }\n if (seen.has(dim.key)) {\n throw new Error(`llmJudge '${name}': duplicate dimension key '${dim.key}'`)\n }\n seen.add(dim.key)\n out.push(dim)\n }\n return out\n}\n\nfunction renderContract(dimensions: JudgeDimension[], scale: 'unit' | 'ten'): string {\n const range = scale === 'ten' ? '0 to 10' : '0.0 to 1.0'\n const lines = dimensions.map((d) => ` - \"${d.key}\": ${d.description} (score ${range})`)\n const example = `{\"dimensions\": {${dimensions\n .map((d) => `\"${d.key}\": <number>`)\n .join(', ')}}, \"notes\": \"<one-line rationale>\"}`\n return [\n 'Score the artifact on EACH of these dimensions:',\n ...lines,\n '',\n `Respond with JSON ONLY, no prose. Every dimension is a number in [${range}]:`,\n example,\n ].join('\\n')\n}\n\nfunction parseResponse(\n name: string,\n response: LlmCallResult,\n schema: z.ZodObject | undefined,\n llmCall: LlmCallMetadata,\n): RawJudgeResponse {\n const { content } = response\n const fail = (cause: unknown) => new JudgeParseError(name, content, { cause, llmCall })\n if (response.finishReason != null && response.finishReason !== 'stop') {\n throw fail(\n new Error(`response did not complete normally (finishReason=${response.finishReason})`),\n )\n }\n if (schema) {\n try {\n return schema.parse(JSON.parse(stripFencedJson(content))) as RawJudgeResponse\n } catch (cause) {\n throw fail(cause)\n }\n }\n const stripped = content.replace(/```json\\n?|\\n?```/g, '').trim()\n const objMatch = stripped.match(/\\{[\\s\\S]*\\}/)\n const payload = objMatch ? objMatch[0] : stripped\n try {\n const parsed = JSON.parse(payload) as RawJudgeResponse\n if (typeof parsed !== 'object' || parsed === null) {\n throw new Error('parsed value is not an object')\n }\n return parsed\n } catch (cause) {\n throw fail(cause)\n }\n}\n\nfunction firstString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value : undefined\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,eAAsB,QACpB,MAC+C;CAC/C,OAAO,YAAY,IAAI;AACzB;;ACNA,MAAM,4BAA6C;CACjD,SAAS;CACT,cAAc;CACd,kBAAkB;CAClB,cAAc;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YAAY,UAAU,MAAM,EAAE;CACvF,MAAM,UAAU,mBAAmB,WAChC,KAAK,MAAM,IAAI,EAAE,IAAI,YAAY,CAAC,CAClC,KAAK,IAAI,EAAE;CACd,OAAO;EACL;EACA,GAAG;EACH;EACA,qEAAqE,MAAM;EAC3E;CACF,CAAC,CAAC,KAAK,IAAI;AACb;AAEA,SAAS,cACP,MACA,UACA,QACA,SACkB;CAClB,MAAM,EAAE,YAAY;CACpB,MAAM,QAAQ,UAAmB,IAAI,gBAAgB,MAAM,SAAS;EAAE;EAAO;CAAQ,CAAC;CACtF,IAAI,SAAS,gBAAgB,QAAQ,SAAS,iBAAiB,QAC7D,MAAM,qBACJ,IAAI,MAAM,oDAAoD,SAAS,aAAa,EAAE,CACxF;CAEF,IAAI,QACF,IAAI;EACF,OAAO,OAAO,MAAM,KAAK,MAAM,gBAAgB,OAAO,CAAC,CAAC;CAC1D,SAAS,OAAO;EACd,MAAM,KAAK,KAAK;CAClB;CAEF,MAAM,WAAW,QAAQ,QAAQ,sBAAsB,EAAE,CAAC,CAAC,KAAK;CAChE,MAAM,WAAW,SAAS,MAAM,aAAa;CAC7C,MAAM,UAAU,WAAW,SAAS,KAAK;CACzC,IAAI;EACF,MAAM,SAAS,KAAK,MAAM,OAAO;EACjC,IAAI,OAAO,WAAW,YAAY,WAAW,MAC3C,MAAM,IAAI,MAAM,+BAA+B;EAEjD,OAAO;CACT,SAAS,OAAO;EACd,MAAM,KAAK,KAAK;CAClB;AACF;AAEA,SAAS,YAAY,OAAoC;CACvD,OAAO,OAAO,UAAU,YAAY,MAAM,KAAK,IAAI,QAAQ,KAAA;AAC7D"}
|
|
1
|
+
{"version":3,"file":"llm-judge-DRHTRT66.js","names":[],"sources":["../src/campaign/presets/run-eval.ts","../src/run-score.ts","../src/campaign/transient-failure.ts","../src/llm-judge.ts"],"sourcesContent":["/**\n * `runEval` — the simplest preset over `runCampaign`. No optimizer, no\n * gate, no auto-PR. Just: run scenarios through dispatch, score with\n * judges, return CampaignResult.\n *\n * The 80% case for consumers who want a scorecard, not an improvement loop.\n */\n\nimport { type RunCampaignOptions, runCampaign } from '../run-campaign'\nimport type { CampaignResult, Scenario } from '../types'\n\nexport interface RunEvalOptions<TScenario extends Scenario, TArtifact>\n extends Omit<RunCampaignOptions<TScenario, TArtifact>, 'runDir'> {\n runDir: string\n}\n\n/**\n * Simplest evaluation preset: run scenarios through dispatch, score with judges, and return a `CampaignResult` — no optimizer, no gate, no PR.\n */\nexport async function runEval<TScenario extends Scenario, TArtifact>(\n opts: RunEvalOptions<TScenario, TArtifact>,\n): Promise<CampaignResult<TArtifact, TScenario>> {\n return runCampaign(opts)\n}\n","export interface RunScore {\n success: number\n goalProgress: number\n repoGroundedness: number\n driftPenalty: number\n toolUseQuality: number\n patchQuality: number\n testReality: number\n finalGate: number\n reviewerBlockers: number\n costUsd: number\n wallSeconds: number\n notes?: string[]\n}\n\nexport type RunScoreWeights = Omit<RunScore, 'notes'>\n\nconst DEFAULT_RUN_SCORE_WEIGHTS: RunScoreWeights = {\n success: 4,\n goalProgress: 2,\n repoGroundedness: 1.5,\n driftPenalty: -1.5,\n toolUseQuality: 1,\n patchQuality: 1.25,\n testReality: 1.5,\n finalGate: 3,\n reviewerBlockers: -2,\n costUsd: -0.2,\n wallSeconds: -0.1,\n}\n\nexport function aggregateRunScore(score: RunScore, weights: Partial<RunScoreWeights> = {}): number {\n const w = { ...DEFAULT_RUN_SCORE_WEIGHTS, ...weights }\n return (Object.keys(DEFAULT_RUN_SCORE_WEIGHTS) as Array<keyof RunScoreWeights>)\n .map(\n (key) =>\n w[key] *\n (key === 'costUsd' || key === 'wallSeconds'\n ? Math.max(0, finiteOrZero(score[key]) / (key === 'wallSeconds' ? 60 : 1))\n : clamp01(score[key])),\n )\n .reduce((sum, term) => sum + term)\n}\n\nexport function clamp01(value: number): number {\n return Math.max(0, Math.min(1, finiteOrZero(value)))\n}\n\nfunction finiteOrZero(value: number): number {\n return Number.isFinite(value) ? value : 0\n}\n","/**\n * Transient-transport-failure classification for dispatch retry policies.\n *\n * When an eval cell dies, the harness must decide: retry (the infrastructure\n * hiccuped - a 502 storm, an admission-queue rejection, a dropped stream) or\n * score it (the agent genuinely failed). Getting this wrong corrupts results\n * in both directions: scoring transport hiccups as failures buries real\n * effects under noise (agent-lab R353 found 5/30 identical repeats were 502s\n * scored as task failures), while retrying genuine failures silently drops\n * the hard cells and inflates every arm.\n *\n * A third direction was measured later and is not a knob: a provider refusal that states its own\n * release time (`quotaExhaustedUntil`). Retrying that is neither scoring nor recovering — it is\n * spending a subscription against a wall the provider already dated. It is terminal until the\n * stated instant, and an undated rate limit is untouched.\n *\n * Full-duration timeouts are the deliberate knob: on saturated shared\n * infrastructure a timeout usually means the request never got a slot\n * (retry it), but on unthrottled infrastructure it means the agent flailed\n * on the task until the clock ran out (a real score-0). Both readings were\n * needed in practice within one week, so the classifier takes it as an\n * option instead of hardcoding either.\n */\n\nimport type { CampaignCellFailureReceipt } from './run-campaign'\n\nexport interface TransientFailureOptions {\n /**\n * Treat full-duration timeouts (\"timeout after 180000ms\") as transient.\n * Enable on saturated shared infrastructure where queue starvation eats\n * the clock; leave off when the agent had the resources and simply failed.\n * Default false.\n */\n readonly retryFullDurationTimeouts?: boolean\n /** Additional caller-specific transient patterns. */\n readonly extraPatterns?: readonly RegExp[]\n /**\n * The instant a dated quota refusal is measured against. Defaults to `Date.now()`; inject it\n * to replay a past classification, which is what a retry audit needs.\n */\n readonly now?: number\n}\n\nconst BASE_TRANSIENT =\n /\\b50[234]\\b|no stream output|produced no stream|admission timed out|admission_rejected|queue_timeout|fetch failed|ECONNRESET|This operation was aborted/i\n\nconst TIMEOUT_PATTERN = /timeout after \\d+ ?ms|cli-bridge timeout/i\n\n/**\n * A provider refusal about a SPENT ALLOWANCE, which is not the same thing as a rate limit. It\n * becomes a release time only when a date follows it; the phrase alone stays retryable.\n *\n * `rate limit reached` is deliberately absent. Measured 2026-09-01: a z.ai 429 payload carries\n * `Rate limit reached for requests` and, 4,134 characters later in the same attempt log,\n * `reset at 2026-09-02 02:05:02`. That reset is minutes away and retrying it is correct. A\n * per-minute limit recovers on its own; an allowance does not.\n */\nconst QUOTA_PHRASE =\n /hit your usage limit|usage limit reached|insufficient balance|quota exceeded/gi\n\n/**\n * The clause that introduces the release time. The date may sit behind a purchase link and an\n * `or`, so the phrase and the clause are matched independently rather than as one span.\n */\nconst RELEASE_CLAUSE =\n /(?:try again|resets?|available again|retry)\\s+(?:at|on|after)\\s+([^\\n]{4,80})/i\n\n/**\n * How far past a refusal its release time may sit. Long enough for the purchase URL the codex\n * message puts between them, far shorter than one attempt record — see `quotaExhaustedUntil`.\n */\nconst RELEASE_WINDOW_CHARS = 400\n\n/**\n * The shapes a stated release is written in, in the order they are tried. THESE ARE THE\n * VALIDATION: a fragment that matches none of them is not a date, whatever `Date.parse` makes of\n * it. That matters — `Date.parse('Blursday 9999')` returns 9999-01-01, and a bare four-digit\n * number in prose would otherwise become a release nine thousand years out and stop a caller\n * forever.\n */\nconst RELEASE_SHAPES = [\n // NO UNZONED CLOCK. Measured 2026-09-01 on the z.ai seat: `Usage limit reached for 5 hour. Your\n // limit will reset at 2026-09-02 02:05:02` — a real spent allowance that states a real release,\n // in a machine payload with no zone at all. Read in the host's zone (UTC-6) that is 08:05Z; read\n // as the provider's it is 02:05Z. Nothing in the message decides between them, and a six-hour\n // error is six hours of a healthy seat withheld. A month-name or slash rendering is a CLI\n // printing in the HOST's zone, which is knowable; a bare numeric clock is not, and is refused.\n\n // 2026-09-07T02:29:00Z, 2026-09-07T02:29+02:00, or a bare 2026-09-07 (which ECMA-262 reads as\n // UTC). A numeric date-time with NO zone is deliberately absent — see NO UNZONED CLOCK below.\n /\\d{4}-\\d{2}-\\d{2}(?:[T ]\\d{1,2}:\\d{2}(?::\\d{2})?(?:\\.\\d+)?(?:Z|[+-]\\d{2}:?\\d{2}))?(?![\\d\\s:T-])/,\n // Sep 6th, 2026 8:29 PM · September 6 2026 · Sep 6, 2026\n /(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*\\.?\\s+\\d{1,2}(?:st|nd|rd|th)?,?\\s+\\d{4}(?:,?\\s+\\d{1,2}:\\d{2}(?::\\d{2})?\\s*(?:[AaPp]\\.?[Mm]\\.?)?)?/,\n // 6 September 2026\n /\\d{1,2}(?:st|nd|rd|th)?\\s+(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*\\.?,?\\s+\\d{4}/,\n // 9/6/2026 8:29 PM\n /\\d{1,2}\\/\\d{1,2}\\/\\d{4}(?:,?\\s+\\d{1,2}:\\d{2}(?::\\d{2})?\\s*(?:[AaPp]\\.?[Mm]\\.?)?)?/,\n]\n\n/**\n * The instant a provider says a spent quota works again, or null when the text states none.\n *\n * MEASURED (2026-09-01, discovery lab). The codex/ChatGPT backend answered\n * `You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more\n * credits or try again at Sep 6th, 2026 8:29 PM.` — a refusal SIX DAYS out. 25 supervised runs met\n * it. 21 of them retried it 12 times over about 31 minutes and settled with zero children, zero\n * tokens and zero claims: about 11 hours of one subscription's capacity spent on a wall that had\n * already told the caller when it would come down.\n *\n * The distinction this draws is not \"quota\" versus \"not quota\". It is \"the provider named a\n * release time\" versus \"it did not\". A bare 429, or z.ai's `您的账户已达到速率限制`, recovers on\n * its own in seconds and SHOULD be retried; those return null here and keep their existing\n * treatment. Only a stated release is terminal, and only until that instant.\n *\n * A date with no zone is read in the host's zone, because a CLI renders it in the host's zone.\n * An unparseable date returns null rather than a guess: a caller that stops dispatching must\n * never do so on a misread string.\n *\n * @param message the provider's error text\n * @returns the stated release time, or null when the text names none\n */\nfunction quotaExhaustedUntil(message: string | null | undefined): Date | null {\n if (!message) return null\n QUOTA_PHRASE.lastIndex = 0\n // THE RELEASE MUST BELONG TO THE REFUSAL. An error string can carry several provider payloads,\n // so searching the whole text for a phrase and, separately, for a date reads one payload's\n // quota against another payload's timestamp. Measured 2026-09-01: that pairing matched a z.ai\n // 429 to a date 4,134 characters away. The clause is searched only in the window FOLLOWING\n // each refusal.\n for (\n let phrase = QUOTA_PHRASE.exec(message);\n phrase !== null;\n phrase = QUOTA_PHRASE.exec(message)\n ) {\n const clause = RELEASE_CLAUSE.exec(\n message.slice(phrase.index, phrase.index + RELEASE_WINDOW_CHARS),\n )\n const stated = clause?.[1]\n if (stated === undefined) continue\n for (const shape of RELEASE_SHAPES) {\n const found = shape.exec(stated)\n if (found === null) continue\n // `Sep 6th` is not a date any parser accepts; the ordinal suffix is the only edit made.\n const until = Date.parse(found[0].replace(/\\b(\\d{1,2})(?:st|nd|rd|th)\\b/gi, '$1'))\n if (Number.isFinite(until)) return new Date(until)\n }\n }\n return null\n}\n\n/**\n * True when the error text describes an infrastructure hiccup that should be\n * retried rather than scored. Empty/undefined input is not transient.\n */\nexport function isTransientTransportFailure(\n message: string | null | undefined,\n opts: TransientFailureOptions = {},\n): boolean {\n if (!message) return false\n // A refusal that names its own release time is TERMINAL until that time, whatever else the text\n // matches. Checked first, and ahead of `extraPatterns`, because a caller's broad rate-limit\n // pattern would otherwise turn a six-day wall into a retry loop — see `quotaExhaustedUntil`.\n const until = quotaExhaustedUntil(message)\n if (until !== null && until.getTime() > (opts.now ?? Date.now())) return false\n if (BASE_TRANSIENT.test(message)) return true\n if ((opts.retryFullDurationTimeouts ?? false) && TIMEOUT_PATTERN.test(message)) return true\n for (const p of opts.extraPatterns ?? []) if (p.test(message)) return true\n return false\n}\n\n/**\n * Ready-made `cellRetry.retryable` predicate: true for a dispatch-stage\n * failure whose error message `isTransientTransportFailure` classifies as an\n * infrastructure hiccup. A judge-stage failure is never retried here — the\n * dispatch already produced an artifact, so re-dispatching would score a\n * different sample. A per-cell dispatch deadline (\"dispatch exceeded <N>ms\")\n * is not transient by default; opt in via `extraPatterns` or\n * `retryFullDurationTimeouts` when queue starvation eats the clock. A provider refusal that\n * states its own release time is never retried while that time is in the future\n * (`quotaExhaustedUntil`).\n */\nexport function transientDispatchFailure(\n opts: TransientFailureOptions = {},\n): (failure: CampaignCellFailureReceipt['failure']) => boolean {\n return (failure) =>\n failure.stage === 'dispatch' && isTransientTransportFailure(failure.error.message, opts)\n}\n","/**\n * `llmJudge` — the single-LLM-call bridge that turns a rubric prompt into a\n * canonical campaign `JudgeConfig`.\n *\n * The `JudgeConfig` contract (src/campaign/types.ts) is deliberately a\n * function, not a fixed LLM-prompt shape: real consumers judge with\n * ensembles, deterministic checks, or one LLM call. `ensembleJudge`\n * (src/judge-panel.ts) covers the multi-model case. `llmJudge` covers the\n * common single-call case the `JudgeConfig` doc-comment names:\n * one model call against `prompt`, parsed into the canonical `JudgeScore`\n * (`{ dimensions, composite, notes }`) on the campaign [0,1] scale.\n *\n * Transport is injected as a `ChatClient` (src/analyst/chat-client.ts) — the\n * substrate's transport-agnostic LLM seam — so the judge stays decoupled from\n * router-vs-sandbox-vs-cli-bridge and is unit-testable with the `mock`\n * transport. The composite is computed by `weightedComposite` (the same\n * sum-normalized weighting `ensembleJudge` uses), so a lift is attributable to\n * the dimension scores, not to a bespoke reducer.\n *\n * Fail-loud throughout: an unparseable model response throws `JudgeParseError`;\n * a response missing a declared dimension throws; an out-of-range score throws.\n * A thrown judge is recorded by the campaign engine as a failed cell, never\n * folded into a silent zero.\n */\n\nimport { z } from 'zod'\nimport type { ChatClient } from './analyst/chat-client'\nimport type { JudgeConfig, JudgeDimension, JudgeScore, Scenario } from './campaign/types'\nimport { CostLedger, type CostLedgerHandle } from './cost-ledger'\nimport { JudgeParseError } from './judges'\nimport {\n costReceiptFromLlm,\n costReceiptFromLlmError,\n type LlmCallMetadata,\n type LlmCallRequest,\n type LlmCallResult,\n type LlmTokenLogprob,\n maximumChargeForLlmRequest,\n stripFencedJson,\n} from './llm-client'\nimport { clamp01 } from './run-score'\nimport { weightedComposite } from './statistics'\nimport { contentHash } from './verdict-cache'\n\n/** A rubric dimension as a bare key or the full `{ key, description }` shape. A\n * bare string uses the key as its own description. */\nexport type LlmJudgeDimension = string | JudgeDimension\n\nexport interface LlmJudgeOptions<TArtifact, TScenario extends Scenario = Scenario> {\n /** The injected LLM transport. One `chat()` call per `score()`. Required —\n * there is no default route, so a misconfigured judge fails at construction,\n * never silently against the free-tier router. */\n chat: ChatClient\n /** Rubric dimensions the model scores. Each becomes a `[0,1]` field of the\n * returned `JudgeScore.dimensions`. Defaults to a single `quality` dimension. */\n dimensions?: LlmJudgeDimension[]\n /** Model id. Falls back to `chat.defaultModel`; one of the two MUST resolve. */\n model?: string\n /** Explicit scoring revision for opaque transport or renderer changes. */\n judgeVersion?: string\n temperature?: number\n maxTokens?: number\n /** Composite weights forwarded to `weightedComposite`: a partial map selects\n * AND weights exactly the named dimensions. Omit for a uniform mean. */\n weights?: Record<string, number>\n /**\n * How to read a score out of the model's answer.\n *\n * `'sampled'` (default) reads the number the model emitted. Discrete grades\n * tie often, and a tie carries no ranking signal.\n *\n * `'expectation'` asks the provider for the log probabilities of the score\n * token and returns the expected value over the integer grades the model\n * considered, so two answers that both sample `8` separate by how much mass\n * sat on `7` and `9`. It requires `scale: 'ten'`: an integer grade is one\n * token, and a `unit` float is not. `whenUnavailable` decides what happens\n * when the provider returns no log probabilities, or the grade did not land\n * in one token: `'fail'` throws, `'sampled'` reads the emitted number and\n * records `scoringMethod: 'sampled'` on the score.\n */\n scoring?: { method: 'sampled' } | { method: 'expectation'; whenUnavailable: 'fail' | 'sampled' }\n /** Scale the model is prompted to score on, normalized into `[0,1]`:\n * - `'unit'` (default): the model returns `[0,1]` directly.\n * - `'ten'`: the model returns `[0,10]`; divided by 10 here.\n * The prompt is annotated with the expected range either way. */\n scale?: 'unit' | 'ten'\n /** Run this judge only on matching scenarios (mirrors `JudgeConfig.appliesTo`). */\n appliesTo?: (scenario: TScenario) => boolean\n /** Render the artifact + scenario into the user message. Default:\n * pretty-printed JSON of `{ scenario, artifact }`. */\n renderUser?: (input: { artifact: TArtifact; scenario: TScenario }) => string\n /** Strict runtime contract; its JSON Schema is sent to the provider. */\n costLedger?: CostLedgerHandle\n responseSchema?: { name: string; schema: z.ZodObject }\n}\n\ninterface RawJudgeResponse {\n dimensions?: Record<string, unknown>\n scores?: Record<string, unknown>\n notes?: unknown\n rationale?: unknown\n}\n\n/**\n * Build a campaign-shaped `JudgeConfig` whose `score()` makes ONE LLM call\n * against `prompt` and reduces the model's per-dimension scores to a canonical\n * `JudgeScore` in `[0,1]`.\n *\n * The model is instructed to return JSON `{ \"dimensions\": { <key>: <number>, … },\n * \"notes\": \"…\" }`; the helper strips fenced JSON, validates every declared\n * dimension is present and in range, normalizes by `scale`, and composites via\n * `weightedComposite`.\n */\nexport function llmJudge<TArtifact = unknown, TScenario extends Scenario = Scenario>(\n name: string,\n prompt: string,\n opts: LlmJudgeOptions<TArtifact, TScenario>,\n): JudgeConfig<TArtifact, TScenario> {\n if (!name.trim()) {\n throw new Error('llmJudge: name must be non-empty')\n }\n if (!prompt.trim()) {\n throw new Error(`llmJudge '${name}': prompt must be non-empty`)\n }\n const model = opts.model ?? opts.chat.defaultModel\n if (!model) {\n throw new Error(\n `llmJudge '${name}': no model on opts and no defaultModel on the ChatClient — ` +\n 'pass opts.model or bind defaultModel at createChatClient().',\n )\n }\n\n const dimensions = normalizeDimensions(opts.dimensions, name)\n const scale = opts.scale ?? 'unit'\n const divisor = scale === 'ten' ? 10 : 1\n const scoring = opts.scoring ?? { method: 'sampled' }\n if (scoring.method === 'expectation' && scale !== 'ten') {\n throw new Error(\n `llmJudge '${name}': expectation scoring requires scale 'ten' — a [0,1] score is not one token, so no single position carries its distribution`,\n )\n }\n const renderUser =\n opts.renderUser ??\n ((input: { artifact: TArtifact; scenario: TScenario }) =>\n JSON.stringify({ scenario: input.scenario, artifact: input.artifact }, null, 2))\n\n if (opts.weights) {\n for (const key of Object.keys(opts.weights)) {\n if (!dimensions.some((d) => d.key === key)) {\n throw new Error(\n `llmJudge '${name}': weights names dimension '${key}' that is not declared in dimensions`,\n )\n }\n }\n }\n\n const systemPrompt = `${prompt}\\n\\n${renderContract(dimensions, scale)}`\n const directCostLedger = opts.costLedger ?? new CostLedger()\n let jsonSchema: { name: string; schema: Record<string, unknown> } | undefined\n if (opts.responseSchema) {\n const schema = { ...(z.toJSONSchema(opts.responseSchema.schema) as Record<string, unknown>) }\n delete schema.$schema\n jsonSchema = { name: opts.responseSchema.name, schema }\n }\n const declaredJudgeVersion = opts.judgeVersion?.trim()\n if (opts.judgeVersion !== undefined && !declaredJudgeVersion) {\n throw new Error(`llmJudge '${name}': judgeVersion must be non-empty when provided`)\n }\n const judgeVersion =\n declaredJudgeVersion ??\n contentHash({\n kind: 'llmJudge',\n prompt: systemPrompt,\n model,\n transport: opts.chat.transport,\n maximumAttempts: opts.chat.maximumAttempts ?? null,\n temperature: opts.temperature ?? 0.1,\n maxTokens: opts.maxTokens ?? 800,\n weights: opts.weights ?? null,\n scale,\n scoring,\n jsonSchema: jsonSchema ?? null,\n renderUser: opts.renderUser?.toString() ?? null,\n })\n\n return {\n name,\n dimensions,\n judgeVersion,\n appliesTo: opts.appliesTo,\n async score({\n artifact,\n scenario,\n signal,\n costLedger,\n costPhase,\n costTags,\n }): Promise<JudgeScore> {\n const request: LlmCallRequest = {\n model,\n messages: [\n { role: 'system', content: systemPrompt },\n { role: 'user', content: renderUser({ artifact, scenario }) },\n ],\n jsonMode: true,\n jsonSchema,\n ...(scoring.method === 'expectation'\n ? { logprobs: { topLogprobs: EXPECTATION_TOP_LOGPROBS } }\n : {}),\n temperature: opts.temperature ?? 0.1,\n maxTokens: opts.maxTokens ?? 800,\n }\n const paid = await (costLedger ?? directCostLedger).runPaidCall({\n channel: 'judge',\n phase: costPhase ?? 'judge',\n actor: name,\n model,\n maximumCharge:\n opts.chat.maximumAttempts === undefined\n ? undefined\n : maximumChargeForLlmRequest(request, {\n maximumAttempts: opts.chat.maximumAttempts,\n }),\n tags: { ...costTags, scenarioId: scenario.id },\n signal,\n execute: (callSignal, callId) =>\n opts.chat.chat(request, { signal: callSignal, idempotencyKey: callId }),\n receipt: costReceiptFromLlm,\n receiptFromError: costReceiptFromLlmError,\n })\n if (!paid.succeeded) throw paid.error\n const response = paid.value\n const llmCall: LlmCallMetadata = {\n usage: response.usage,\n costUsd: response.costUsd,\n model: response.model,\n durationMs: response.durationMs,\n }\n\n const parsed = parseResponse(name, response, opts.responseSchema?.schema, llmCall)\n const rawDims = parsed.dimensions ?? parsed.scores\n if (!rawDims || typeof rawDims !== 'object') {\n throw new JudgeParseError(name, response.content, {\n cause: new Error('response has no `dimensions` object'),\n llmCall,\n })\n }\n\n const sampled: Record<string, number> = {}\n for (const { key } of dimensions) {\n const raw = (rawDims as Record<string, unknown>)[key]\n const value = Number(raw)\n if (raw === undefined || raw === null || !Number.isFinite(value)) {\n throw new JudgeParseError(name, response.content, {\n cause: new Error(\n `dimension '${key}' missing or non-numeric (got ${JSON.stringify(raw)})`,\n ),\n llmCall,\n })\n }\n sampled[key] = value\n }\n\n let scoringMethod: 'sampled' | 'expectation' = 'sampled'\n let distribution: Record<string, Array<{ score: number; probability: number }>> | undefined\n const dims: Record<string, number> = {}\n if (scoring.method === 'expectation') {\n const expectation = expectedDimensionScores({\n tokens: response.logprobs ?? null,\n sampled,\n maxScore: divisor,\n })\n if (expectation.kind === 'unavailable') {\n if (scoring.whenUnavailable === 'fail') {\n throw new Error(\n `llmJudge '${name}': expectation scoring is unavailable — ${expectation.reason}`,\n )\n }\n } else {\n scoringMethod = 'expectation'\n distribution = expectation.distribution\n for (const { key } of dimensions) dims[key] = clamp01(expectation.scores[key]! / divisor)\n }\n }\n if (scoringMethod === 'sampled') {\n for (const { key } of dimensions) dims[key] = clamp01(sampled[key]! / divisor)\n }\n\n const weights =\n opts.weights ?? Object.fromEntries(dimensions.map((d) => [d.key, 1 / dimensions.length]))\n const { composite } = weightedComposite({ dims, weights })\n\n const notes =\n firstString(parsed.notes) ??\n firstString(parsed.rationale) ??\n `${name}: composite ${composite.toFixed(3)} over ${dimensions.length} dimension(s)`\n\n return {\n dimensions: dims,\n composite,\n notes,\n llmCall,\n ...(opts.scoring ? { scoringMethod } : {}),\n ...(distribution ? { distribution } : {}),\n }\n },\n }\n}\n\n/** Alternatives requested per score token. Twenty is the documented ceiling of\n * the OpenAI-compatible `top_logprobs` field, and a grade scale has at most\n * eleven integer candidates, so the window always covers the whole scale. */\nconst EXPECTATION_TOP_LOGPROBS = 20\n\ntype ExpectationResult =\n | {\n kind: 'expectation'\n scores: Record<string, number>\n distribution: Record<string, Array<{ score: number; probability: number }>>\n }\n | { kind: 'unavailable'; reason: string }\n\n/**\n * Expected grade per dimension: locate the token that carried each dimension's\n * integer score, then average the integer grades the model considered at that\n * position, weighted by their probabilities.\n *\n * Unavailable — never silently approximated — when the provider returned no\n * log probabilities, when a dimension's grade is not in the token stream, or\n * when the grade did not land in exactly one token (a two-token `10`, a float).\n */\nfunction expectedDimensionScores(input: {\n tokens: ReadonlyArray<LlmTokenLogprob> | null\n sampled: Record<string, number>\n maxScore: number\n}): ExpectationResult {\n const { tokens, sampled, maxScore } = input\n if (tokens === null) return { kind: 'unavailable', reason: 'the provider returned no logprobs' }\n if (tokens.length === 0) {\n return { kind: 'unavailable', reason: 'the provider returned an empty logprob stream' }\n }\n const offsets: number[] = []\n let text = ''\n for (const token of tokens) {\n offsets.push(text.length)\n text += token.token\n }\n\n const scores: Record<string, number> = {}\n const distribution: Record<string, Array<{ score: number; probability: number }>> = {}\n for (const [key, value] of Object.entries(sampled)) {\n const match = new RegExp(`\"${escapeRegExp(key)}\"\\\\s*:\\\\s*`).exec(text)\n if (!match) {\n return { kind: 'unavailable', reason: `dimension '${key}' is not in the token stream` }\n }\n const scoreOffset = match.index + match[0].length\n let index = -1\n for (let position = 0; position < offsets.length; position++) {\n if (offsets[position]! <= scoreOffset) index = position\n else break\n }\n const token = tokens[index]\n if (!token) {\n return {\n kind: 'unavailable',\n reason: `dimension '${key}' has no token at its score position`,\n }\n }\n if (integerGrade(token.token, maxScore) !== value) {\n return {\n kind: 'unavailable',\n reason: `dimension '${key}' scored ${value}, which is not the whole of its token '${token.token}'`,\n }\n }\n const candidates: Array<{ score: number; probability: number }> = []\n let total = 0\n for (const alternative of token.top.length > 0 ? token.top : [token]) {\n const grade = integerGrade(alternative.token, maxScore)\n if (grade === null) continue\n const probability = Math.exp(alternative.logprob)\n if (!Number.isFinite(probability) || probability <= 0) continue\n candidates.push({ score: grade, probability })\n total += probability\n }\n if (candidates.length === 0 || total <= 0) {\n return {\n kind: 'unavailable',\n reason: `dimension '${key}' has no integer grade in its probability window`,\n }\n }\n let expectation = 0\n for (const candidate of candidates)\n expectation += (candidate.probability / total) * candidate.score\n scores[key] = expectation\n distribution[key] = candidates\n .map((candidate) => ({ score: candidate.score, probability: candidate.probability / total }))\n .sort((left, right) => left.score - right.score)\n }\n return { kind: 'expectation', scores, distribution }\n}\n\n/** The token's integer grade on the judge's scale, or null when the token is\n * not exactly one integer in range. */\nfunction integerGrade(token: string, maxScore: number): number | null {\n const trimmed = token.trim()\n if (!/^\\d+$/.test(trimmed)) return null\n const value = Number(trimmed)\n return Number.isInteger(value) && value >= 0 && value <= maxScore ? value : null\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n}\n\nfunction normalizeDimensions(\n input: LlmJudgeDimension[] | undefined,\n name: string,\n): JudgeDimension[] {\n const raw = input && input.length > 0 ? input : ['quality']\n const out: JudgeDimension[] = []\n const seen = new Set<string>()\n for (const d of raw) {\n const dim = typeof d === 'string' ? { key: d, description: d } : d\n if (!dim.key.trim()) {\n throw new Error(`llmJudge '${name}': dimension key must be non-empty`)\n }\n if (seen.has(dim.key)) {\n throw new Error(`llmJudge '${name}': duplicate dimension key '${dim.key}'`)\n }\n seen.add(dim.key)\n out.push(dim)\n }\n return out\n}\n\nfunction renderContract(dimensions: JudgeDimension[], scale: 'unit' | 'ten'): string {\n const range = scale === 'ten' ? '0 to 10' : '0.0 to 1.0'\n const lines = dimensions.map((d) => ` - \"${d.key}\": ${d.description} (score ${range})`)\n const example = `{\"dimensions\": {${dimensions\n .map((d) => `\"${d.key}\": <number>`)\n .join(', ')}}, \"notes\": \"<one-line rationale>\"}`\n return [\n 'Score the artifact on EACH of these dimensions:',\n ...lines,\n '',\n `Respond with JSON ONLY, no prose. Every dimension is a number in [${range}]:`,\n example,\n ].join('\\n')\n}\n\nfunction parseResponse(\n name: string,\n response: LlmCallResult,\n schema: z.ZodObject | undefined,\n llmCall: LlmCallMetadata,\n): RawJudgeResponse {\n const { content } = response\n const fail = (cause: unknown) => new JudgeParseError(name, content, { cause, llmCall })\n if (response.finishReason != null && response.finishReason !== 'stop') {\n throw fail(\n new Error(`response did not complete normally (finishReason=${response.finishReason})`),\n )\n }\n if (schema) {\n try {\n return schema.parse(JSON.parse(stripFencedJson(content))) as RawJudgeResponse\n } catch (cause) {\n throw fail(cause)\n }\n }\n const stripped = content.replace(/```json\\n?|\\n?```/g, '').trim()\n const objMatch = stripped.match(/\\{[\\s\\S]*\\}/)\n const payload = objMatch ? objMatch[0] : stripped\n try {\n const parsed = JSON.parse(payload) as RawJudgeResponse\n if (typeof parsed !== 'object' || parsed === null) {\n throw new Error('parsed value is not an object')\n }\n return parsed\n } catch (cause) {\n throw fail(cause)\n }\n}\n\nfunction firstString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value : undefined\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,eAAsB,QACpB,MAC+C;CAC/C,OAAO,YAAY,IAAI;AACzB;;ACNA,MAAM,4BAA6C;CACjD,SAAS;CACT,cAAc;CACd,kBAAkB;CAClB,cAAc;CACd,gBAAgB;CAChB,cAAc;CACd,aAAa;CACb,WAAW;CACX,kBAAkB;CAClB,SAAS;CACT,aAAa;AACf;AAEA,SAAgB,kBAAkB,OAAiB,UAAoC,CAAC,GAAW;CACjG,MAAM,IAAI;EAAE,GAAG;EAA2B,GAAG;CAAQ;CACrD,OAAQ,OAAO,KAA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AACb;AAEA,SAAS,cACP,MACA,UACA,QACA,SACkB;CAClB,MAAM,EAAE,YAAY;CACpB,MAAM,QAAQ,UAAmB,IAAI,gBAAgB,MAAM,SAAS;EAAE;EAAO;CAAQ,CAAC;CACtF,IAAI,SAAS,gBAAgB,QAAQ,SAAS,iBAAiB,QAC7D,MAAM,qBACJ,IAAI,MAAM,oDAAoD,SAAS,aAAa,EAAE,CACxF;CAEF,IAAI,QACF,IAAI;EACF,OAAO,OAAO,MAAM,KAAK,MAAM,gBAAgB,OAAO,CAAC,CAAC;CAC1D,SAAS,OAAO;EACd,MAAM,KAAK,KAAK;CAClB;CAEF,MAAM,WAAW,QAAQ,QAAQ,sBAAsB,EAAE,CAAC,CAAC,KAAK;CAChE,MAAM,WAAW,SAAS,MAAM,aAAa;CAC7C,MAAM,UAAU,WAAW,SAAS,KAAK;CACzC,IAAI;EACF,MAAM,SAAS,KAAK,MAAM,OAAO;EACjC,IAAI,OAAO,WAAW,YAAY,WAAW,MAC3C,MAAM,IAAI,MAAM,+BAA+B;EAEjD,OAAO;CACT,SAAS,OAAO;EACd,MAAM,KAAK,KAAK;CAClB;AACF;AAEA,SAAS,YAAY,OAAoC;CACvD,OAAO,OAAO,UAAU,YAAY,MAAM,KAAK,IAAI,QAAQ,KAAA;AAC7D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as CostProvenance } from "./cost-ledger-CSP-OfFe.js";
|
|
2
|
-
import { C as JudgeDimension, w as JudgeScore } from "./types-
|
|
2
|
+
import { C as JudgeDimension, w as JudgeScore } from "./types-CmHcpGl0.js";
|
|
3
3
|
import { o as MatrixResult } from "./index-DsgqP-Hg.js";
|
|
4
4
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
5
5
|
interface MultishotMessage {
|
|
@@ -384,4 +384,4 @@ interface RunMultishotMatrixResult {
|
|
|
384
384
|
}
|
|
385
385
|
declare function runMultishotMatrix<TPersona extends MultishotPersona>(opts: RunMultishotMatrixOptions<TPersona>): Promise<RunMultishotMatrixResult>;
|
|
386
386
|
export { MultishotTransportResponse as A, MultishotPersona as C, MultishotToolExecutor as D, MultishotToolDefinition as E, assertMultishotShotResult as M, MultishotTransport as O, MultishotMessage as S, MultishotShape as T, renderJsonFooter as _, MultishotCellOutput as a, MultishotDriverEmptyError as b, RunMultishotMatrixResult as c, MultishotShot as d, RunMultishotOptions as f, renderDimensions as g, MultishotJudgeConfig as h, ConversationJudgeInput as i, MultishotTransportToolCall as j, MultishotTransportRequest as k, computeCellComposite as l, JudgeRunResult as m, CellCompositeInput as n, MultishotJudges as o, runMultishot as p, CellCompositeScore as r, RunMultishotMatrixOptions as s, ArtifactJudgeInput as t, runMultishotMatrix as u, runJudge as v, MultishotResult as w, MultishotFatalToolError as x, MultishotArtifact as y };
|
|
387
|
-
//# sourceMappingURL=matrix-
|
|
387
|
+
//# sourceMappingURL=matrix-CHbTz1bP.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matrix-
|
|
1
|
+
{"version":3,"file":"matrix-CHbTz1bP.d.ts","names":[],"sources":["../src/multishot/types.ts","../src/multishot/judges.ts","../src/multishot/multishot.ts","../src/multishot/matrix.ts"],"mappings":";;;;UAIiB;EACf;EACA;EACA;EACA,YAAY;IAAQ;IAAY;IAAc,MAAM;;;UAGrC;EACf;EACA;EACA;IAAc;IAAc,MAAM;;EAClC;;UAGe;EACf,YAAY;EACZ,WAAW;EACX;EACA;;;EAGA;;;;;;;;EAQA,iBAAiB;;UAGF;EACf;EACA;IACE;IACA;IACA,YAAY;;;;;;UAOC;EACf;EACA,UAAU,MAAM;EAChB,QAAQ;EACR;EACA;;;;EAIA;EACA,SAAS;;UAGM;EACf;EACA;EACA;IAAY;IAAc;;;UAGX;EACf;IAAW;IAAyB,aAAa;;EACjD;IAAU;IAAwB;;;;EAGlC;;;;EAIA;;;;;;;;KASU,sBACV,KAAK,8BACF,QAAQ;KAED,yBACV,MAAM,yBACN;;EAEE,WAAW;EACX,SA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AAU;IAAQ;IAAY,OAAO;;;EAErC,UAAU;;;EAGV,QAAQ,eAAe;;EAEvB,QAAQ,gBAAgB;;EAExB,QAAQ;;EAER,gBAAgB,eAAe;;EAE/B,mBAAmB;;EAEnB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;EAIA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;EAIA,gBAAgB;;EAEhB,iBAAiB;;;EAGjB,gBAAgB;;;;;;;;;;;;;;;EAehB,UAAU,cAAc;;;;;UAMT;EACf;EACA;EACA;;UAoBe;EACf,cAAc;;EAEd,cAAc,cAAc;;EAE5B,iBAAiB,cAAc;;;;;;;iBAQjB,qBAAqB,OAAO;EAC1C;EACA;EACA;EACA;;UAuBe;EACf,QAAQ,aAAa;;iBAGD,mBAAmB,iBAAiB,kBACxD,MAAM,0BAA0B,YAC/B,QAAQ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as MultishotPersona, E as MultishotToolDefinition, c as RunMultishotMatrixResult, f as RunMultishotOptions, k as MultishotTransportRequest, s as RunMultishotMatrixOptions, w as MultishotResult } from "../../matrix-
|
|
1
|
+
import { C as MultishotPersona, E as MultishotToolDefinition, c as RunMultishotMatrixResult, f as RunMultishotOptions, k as MultishotTransportRequest, s as RunMultishotMatrixOptions, w as MultishotResult } from "../../matrix-CHbTz1bP.js";
|
|
2
2
|
interface CompareOptions {
|
|
3
3
|
/** Stop after this many mismatches. A structural divergence high in the
|
|
4
4
|
* tree would otherwise report every leaf below it. */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { h as MaximumCharge, o as CostLedgerHandle } from "../cost-ledger-CSP-OfFe.js";
|
|
2
2
|
import { f as Run } from "../schema-CkIvnmLU.js";
|
|
3
|
-
import { T as FindingCalibration, m as EvidenceRef } from "../types-
|
|
3
|
+
import { T as FindingCalibration, m as EvidenceRef } from "../types-CjrzKsOK.js";
|
|
4
4
|
import { c as DEFAULT_JUDGE_MODEL } from "../chat-client-BlTooBDA.js";
|
|
5
5
|
import { y as PersonaRigor } from "../cluster-BJ0nW3P7.js";
|
|
6
|
-
import { Ar as OptimizationMethod } from "../run-improvement-loop-
|
|
7
|
-
import { C as JudgeDimension, H as SurfaceProposer, R as Scenario, S as JudgeConfig, d as DispatchContext, j as MutableSurface, p as Gate, w as JudgeScore } from "../types-
|
|
8
|
-
import { _t as CampaignStorage } from "../search-kernel-
|
|
9
|
-
import { s as SelfImproveResult, t as SelfImproveBudget } from "../self-improve-
|
|
10
|
-
import { D as decisionPoint, j as FindingsLedger, r as SystemOneEvaluatorOptions } from "../systemone-
|
|
6
|
+
import { Ar as OptimizationMethod } from "../run-improvement-loop-E4Uec3my.js";
|
|
7
|
+
import { C as JudgeDimension, H as SurfaceProposer, R as Scenario, S as JudgeConfig, d as DispatchContext, j as MutableSurface, p as Gate, w as JudgeScore } from "../types-CmHcpGl0.js";
|
|
8
|
+
import { _t as CampaignStorage } from "../search-kernel-By0lhdoJ.js";
|
|
9
|
+
import { s as SelfImproveResult, t as SelfImproveBudget } from "../self-improve-CpmIIb57.js";
|
|
10
|
+
import { D as decisionPoint, j as FindingsLedger, r as SystemOneEvaluatorOptions } from "../systemone-Co2Lv810.js";
|
|
11
11
|
import { t as Trajectory } from "../trajectory-B3o6Ald_.js";
|
|
12
|
-
import { A as MultishotTransportResponse, C as MultishotPersona, D as MultishotToolExecutor, E as MultishotToolDefinition, M as assertMultishotShotResult, O as MultishotTransport, S as MultishotMessage, T as MultishotShape, _ as renderJsonFooter, a as MultishotCellOutput, b as MultishotDriverEmptyError, c as RunMultishotMatrixResult, d as MultishotShot, f as RunMultishotOptions, g as renderDimensions, h as MultishotJudgeConfig, i as ConversationJudgeInput, j as MultishotTransportToolCall, k as MultishotTransportRequest, l as computeCellComposite, m as JudgeRunResult, n as CellCompositeInput, o as MultishotJudges, p as runMultishot, r as CellCompositeScore, s as RunMultishotMatrixOptions, t as ArtifactJudgeInput, u as runMultishotMatrix, v as runJudge, w as MultishotResult, x as MultishotFatalToolError, y as MultishotArtifact } from "../matrix-
|
|
12
|
+
import { A as MultishotTransportResponse, C as MultishotPersona, D as MultishotToolExecutor, E as MultishotToolDefinition, M as assertMultishotShotResult, O as MultishotTransport, S as MultishotMessage, T as MultishotShape, _ as renderJsonFooter, a as MultishotCellOutput, b as MultishotDriverEmptyError, c as RunMultishotMatrixResult, d as MultishotShot, f as RunMultishotOptions, g as renderDimensions, h as MultishotJudgeConfig, i as ConversationJudgeInput, j as MultishotTransportToolCall, k as MultishotTransportRequest, l as computeCellComposite, m as JudgeRunResult, n as CellCompositeInput, o as MultishotJudges, p as runMultishot, r as CellCompositeScore, s as RunMultishotMatrixOptions, t as ArtifactJudgeInput, u as runMultishotMatrix, v as runJudge, w as MultishotResult, x as MultishotFatalToolError, y as MultishotArtifact } from "../matrix-CHbTz1bP.js";
|
|
13
13
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
14
14
|
/** A scenario a simulated user plays: its persona, and optionally a plan. */
|
|
15
15
|
interface ConversationScenario<TPersona extends MultishotPersona = MultishotPersona> extends Scenario {
|