@tangle-network/agent-eval 0.200.1 → 0.202.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/adapters/http.d.ts +8 -9
- package/dist/adapters/http.d.ts.map +1 -1
- package/dist/adapters/http.js +2 -2
- package/dist/adapters/http.js.map +1 -1
- package/dist/agent-profile-DDfIjdyS.d.ts.map +1 -1
- package/dist/analyst/index.d.ts +76 -76
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +6 -6
- package/dist/{analyze-runs-DFbp2gB8.js → analyze-runs-BrIibNd0.js} +47 -42
- package/dist/{analyze-runs-DFbp2gB8.js.map → analyze-runs-BrIibNd0.js.map} +1 -1
- package/dist/{ast-CP9ae9B0.js → ast-DJ6Bc7ab.js} +5 -4
- package/dist/{ast-CP9ae9B0.js.map → ast-DJ6Bc7ab.js.map} +1 -1
- package/dist/authenticity/index.d.ts +14 -15
- package/dist/authenticity/index.d.ts.map +1 -1
- package/dist/{baseline-BC-eBZ7U.js → baseline-CVKsfWTg.js} +2 -2
- package/dist/{baseline-BC-eBZ7U.js.map → baseline-CVKsfWTg.js.map} +1 -1
- package/dist/{benchmark-BeQJyrRC.js → benchmark-BywPeAUo.js} +4 -3
- package/dist/{benchmark-BeQJyrRC.js.map → benchmark-BywPeAUo.js.map} +1 -1
- package/dist/{benchmark-command-EBmuMUBo.js → benchmark-command-DFs_i62N.js} +24 -23
- package/dist/{benchmark-command-EBmuMUBo.js.map → benchmark-command-DFs_i62N.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +13 -13
- package/dist/benchmarks/index.d.ts.map +1 -1
- package/dist/benchmarks/index.js +3 -3
- package/dist/{bounded-process-BBZob7vl.js → bounded-process-Cj9YjXbE.js} +3 -3
- package/dist/{bounded-process-BBZob7vl.js.map → bounded-process-Cj9YjXbE.js.map} +1 -1
- package/dist/builder-eval/index.d.ts +16 -17
- package/dist/builder-eval/index.d.ts.map +1 -1
- package/dist/builder-eval/index.js +12 -10
- package/dist/builder-eval/index.js.map +1 -1
- package/dist/campaign/index.d.ts +2 -2
- package/dist/campaign/index.js +12 -12
- package/dist/{campaign-L391bmir.js → campaign-XXmOU0R0.js} +265 -27
- package/dist/campaign-XXmOU0R0.js.map +1 -0
- package/dist/{campaign-evidence-jL_U7Ikv.js → campaign-evidence-Dt_rWPk2.js} +4 -4
- package/dist/{campaign-evidence-jL_U7Ikv.js.map → campaign-evidence-Dt_rWPk2.js.map} +1 -1
- package/dist/{chat-client-CJORSG_J.js → chat-client-DUhWNQQS.js} +5 -4
- package/dist/{chat-client-CJORSG_J.js.map → chat-client-DUhWNQQS.js.map} +1 -1
- package/dist/{chat-json-call-DnlDjpco.js → chat-json-call-Dx_sHzqm.js} +2 -2
- package/dist/{chat-json-call-DnlDjpco.js.map → chat-json-call-Dx_sHzqm.js.map} +1 -1
- package/dist/{claim-V9Zqbq0J.js → claim-BXcZw-jo.js} +2 -2
- package/dist/{claim-V9Zqbq0J.js.map → claim-BXcZw-jo.js.map} +1 -1
- package/dist/cli.js +12 -11
- package/dist/cli.js.map +1 -1
- package/dist/contract/index.d.ts +3 -3
- package/dist/contract/index.js +22 -19
- package/dist/contract/index.js.map +1 -1
- package/dist/{default-registry-xMLX160E.js → default-registry-D4qXx2aG.js} +2 -2
- package/dist/{default-registry-xMLX160E.js.map → default-registry-D4qXx2aG.js.map} +1 -1
- package/dist/{define-agent-eval-7q_UwsTt.js → define-agent-eval-CJN9dTQw.js} +10 -9
- package/dist/{define-agent-eval-7q_UwsTt.js.map → define-agent-eval-CJN9dTQw.js.map} +1 -1
- package/dist/{define-agent-eval-1YuvJpOs.d.ts → define-agent-eval-DQXLPqWc.d.ts} +2 -2
- package/dist/define-agent-eval-DQXLPqWc.d.ts.map +1 -0
- package/dist/{descriptive-1V17A-qa.js → descriptive-D9LUFk1-.js} +2 -2
- package/dist/{descriptive-1V17A-qa.js.map → descriptive-D9LUFk1-.js.map} +1 -1
- package/dist/diagnosis/index.d.ts +7 -7
- package/dist/diagnosis/index.d.ts.map +1 -1
- package/dist/diagnosis/index.js +2 -2
- package/dist/diagnosis/index.js.map +1 -1
- package/dist/{dspy-rlm-engine-B5T43BkZ.js → dspy-rlm-engine-US8YsYGq.js} +5 -5
- package/dist/{dspy-rlm-engine-B5T43BkZ.js.map → dspy-rlm-engine-US8YsYGq.js.map} +1 -1
- package/dist/{eval-campaign-GapmPHIA.js → eval-campaign-ha_aWtk7.js} +14 -12
- package/dist/{eval-campaign-GapmPHIA.js.map → eval-campaign-ha_aWtk7.js.map} +1 -1
- package/dist/evaluation.d.ts +9 -10
- package/dist/evaluation.d.ts.map +1 -1
- package/dist/experiment/index.d.ts +29 -29
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +13 -12
- package/dist/experiment/index.js.map +1 -1
- package/dist/{exporters-DEcXbvgO.js → exporters-Coiv-qO2.js} +2 -2
- package/dist/{exporters-DEcXbvgO.js.map → exporters-Coiv-qO2.js.map} +1 -1
- package/dist/{external-optimizer-process-CEXcCKqd.js → external-optimizer-process-KLcw0Vnc.js} +2 -2
- package/dist/{external-optimizer-process-CEXcCKqd.js.map → external-optimizer-process-KLcw0Vnc.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-laM1-UDV.js → external-optimizer-subprocess-CkyUUV7h.js} +4 -4
- package/dist/{external-optimizer-subprocess-laM1-UDV.js.map → external-optimizer-subprocess-CkyUUV7h.js.map} +1 -1
- package/dist/fuzz.d.ts +15 -15
- package/dist/fuzz.d.ts.map +1 -1
- package/dist/{hf-dataset-CRqtSjnR.js → hf-dataset-kjIfIK_e.js} +3 -3
- package/dist/{hf-dataset-CRqtSjnR.js.map → hf-dataset-kjIfIK_e.js.map} +1 -1
- package/dist/hosted/index.d.ts +8 -8
- package/dist/hosted/index.d.ts.map +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/{index-EkRNsLr4.d.ts → index-D1ZX28rV.d.ts} +3 -3
- package/dist/{index-EkRNsLr4.d.ts.map → index-D1ZX28rV.d.ts.map} +1 -1
- package/dist/{index-D4pC7Tvd2.d.ts → index-D4pC7Tvd.d.ts} +1 -1
- package/dist/index-D4pC7Tvd.d.ts.map +1 -0
- package/dist/{index-DNgf5gyG2.d.ts → index-DNgf5gyG.d.ts} +1 -1
- package/dist/index-DNgf5gyG.d.ts.map +1 -0
- package/dist/{index-DKmrHA02.d.ts → index-giYkbitB.d.ts} +47 -2
- package/dist/index-giYkbitB.d.ts.map +1 -0
- package/dist/index.d.ts +126 -126
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -42
- package/dist/index.js.map +1 -1
- package/dist/{integrity-BFP4kjGj.js → integrity-BvnVARVl.js} +30 -29
- package/dist/{integrity-BFP4kjGj.js.map → integrity-BvnVARVl.js.map} +1 -1
- package/dist/{integrity-BvHANvnp.js → integrity-uwK7XC-8.js} +2 -2
- package/dist/{integrity-BvHANvnp.js.map → integrity-uwK7XC-8.js.map} +1 -1
- package/dist/{internal-BMFSR8Ns.js → internal-BOe3zmjQ.js} +2 -2
- package/dist/{internal-BMFSR8Ns.js.map → internal-BOe3zmjQ.js.map} +1 -1
- package/dist/{jev-review-Cu9xtIu4.js → jev-review-DZEjDzlF.js} +7 -5
- package/dist/{jev-review-Cu9xtIu4.js.map → jev-review-DZEjDzlF.js.map} +1 -1
- package/dist/jev.d.ts +10 -10
- package/dist/jev.d.ts.map +1 -1
- package/dist/jev.js +2 -2
- package/dist/{judge-calibration-DYmaBtJr.js → judge-calibration-C5zgtiJT.js} +2 -2
- package/dist/{judge-calibration-DYmaBtJr.js.map → judge-calibration-C5zgtiJT.js.map} +1 -1
- package/dist/kind-factory-CdPPHtGZ.js.map +1 -1
- package/dist/{llm-client-c_bKHTXz.js → llm-client-Bhqoglar.js} +6 -4
- package/dist/{llm-client-c_bKHTXz.js.map → llm-client-Bhqoglar.js.map} +1 -1
- package/dist/{llm-judge-CL6f3utD.js → llm-judge-C-0P1WiT.js} +26 -21
- package/dist/{llm-judge-CL6f3utD.js.map → llm-judge-C-0P1WiT.js.map} +1 -1
- package/dist/matrix/index.d.ts +1 -1
- package/dist/matrix/index.js +1 -1
- package/dist/{matrix-_NLSWsKM.d.ts → matrix--IZKROxD.d.ts} +2 -2
- package/dist/{matrix-_NLSWsKM.d.ts.map → matrix--IZKROxD.d.ts.map} +1 -1
- package/dist/{matrix-pWinRMPl.js → matrix-DnlHn5x1.js} +8 -6
- package/dist/{matrix-pWinRMPl.js.map → matrix-DnlHn5x1.js.map} +1 -1
- package/dist/meta-eval/index.d.ts +102 -59
- package/dist/meta-eval/index.d.ts.map +1 -1
- package/dist/meta-eval/index.js +89 -25
- package/dist/meta-eval/index.js.map +1 -1
- package/dist/{mint-iCD-W43s.js → mint-vlRckJEX.js} +2 -2
- package/dist/{mint-iCD-W43s.js.map → mint-vlRckJEX.js.map} +1 -1
- package/dist/multishot/golden/index.d.ts +23 -23
- package/dist/multishot/golden/index.d.ts.map +1 -1
- package/dist/multishot/golden/index.js +1 -1
- package/dist/multishot/index.d.ts +9 -9
- package/dist/multishot/index.d.ts.map +1 -1
- package/dist/multishot/index.js +1 -1
- package/dist/openapi.json +1 -1
- package/dist/{otel-spans-CQmSxtcS.js → otel-spans-C8YIJWy1.js} +9 -4
- package/dist/{otel-spans-CQmSxtcS.js.map → otel-spans-C8YIJWy1.js.map} +1 -1
- package/dist/{outcome-store-BXlkwMPR.js → outcome-store-DUcMj-3D.js} +2 -2
- package/dist/{outcome-store-BXlkwMPR.js.map → outcome-store-DUcMj-3D.js.map} +1 -1
- package/dist/package-version-D7lQHt_-.js.map +1 -1
- package/dist/{paired-arms-DKZFVPt8.js → paired-arms-DpS_h8ON.js} +8 -5
- package/dist/{paired-arms-DKZFVPt8.js.map → paired-arms-DpS_h8ON.js.map} +1 -1
- package/dist/{paired-binary-fzkwENI4.js → paired-binary-OMBVRtc-.js} +2 -2
- package/dist/{paired-binary-fzkwENI4.js.map → paired-binary-OMBVRtc-.js.map} +1 -1
- package/dist/{paired-promotion-decision-D5B1Cxc2.js → paired-promotion-decision-DhrmjdV8.js} +5 -4
- package/dist/{paired-promotion-decision-D5B1Cxc2.js.map → paired-promotion-decision-DhrmjdV8.js.map} +1 -1
- package/dist/{paired-tests-C8iCsioC.js → paired-tests-Ccr16gcW.js} +3 -3
- package/dist/{paired-tests-C8iCsioC.js.map → paired-tests-Ccr16gcW.js.map} +1 -1
- package/dist/pipelines/index.d.ts +19 -19
- package/dist/pipelines/index.d.ts.map +1 -1
- package/dist/pipelines/index.js +5 -4
- package/dist/pipelines/index.js.map +1 -1
- package/dist/{power-and-mde-K_CmO3dc.js → power-and-mde-bie6i965.js} +9 -6
- package/dist/{power-and-mde-K_CmO3dc.js.map → power-and-mde-bie6i965.js.map} +1 -1
- package/dist/{produced-state-DZMW8cuF.js → produced-state-CR2tAPLf.js} +8 -5
- package/dist/{produced-state-DZMW8cuF.js.map → produced-state-CR2tAPLf.js.map} +1 -1
- package/dist/{promotion-policy-C6FAJvmZ.js → promotion-policy-BI1RxzwD.js} +4 -4
- package/dist/{promotion-policy-C6FAJvmZ.js.map → promotion-policy-BI1RxzwD.js.map} +1 -1
- package/dist/{raw-provider-sink-CXuOhLvT.js → raw-provider-sink-rB2DYxr6.js} +2 -2
- package/dist/{raw-provider-sink-CXuOhLvT.js.map → raw-provider-sink-rB2DYxr6.js.map} +1 -1
- package/dist/{release-confidence-XQm_xjhR.js → release-confidence-CiFg1EPq.js} +3 -2
- package/dist/{release-confidence-XQm_xjhR.js.map → release-confidence-CiFg1EPq.js.map} +1 -1
- package/dist/{report-command-DKJ_yAIj.js → report-command-DzPpFgjB.js} +20 -18
- package/dist/{report-command-DKJ_yAIj.js.map → report-command-DzPpFgjB.js.map} +1 -1
- package/dist/reporting.js +5 -5
- package/dist/{reward-hacking-D0XwhVWE.js → reward-hacking-C-a__ShZ.js} +5 -3
- package/dist/{reward-hacking-D0XwhVWE.js.map → reward-hacking-C-a__ShZ.js.map} +1 -1
- package/dist/rl.d.ts +186 -186
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +21 -17
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +1 -1
- package/dist/rollout/index.js +5 -5
- package/dist/{rollout-B-XBReTC.js → rollout-BUQixCoc.js} +5 -5
- package/dist/{rollout-B-XBReTC.js.map → rollout-BUQixCoc.js.map} +1 -1
- package/dist/{rubric-predictive-validity-CCK-1B7w.js → rubric-predictive-validity-B0Pg-3I5.js} +3 -3
- package/dist/{rubric-predictive-validity-CCK-1B7w.js.map → rubric-predictive-validity-B0Pg-3I5.js.map} +1 -1
- package/dist/{run-record-tNnlQIrD.js → run-record-BB290Y9A.js} +5 -3
- package/dist/{run-record-tNnlQIrD.js.map → run-record-BB290Y9A.js.map} +1 -1
- package/dist/{schema-C1aaAxTf.js → schema-DAMp77zB.js} +24 -20
- package/dist/{schema-C1aaAxTf.js.map → schema-DAMp77zB.js.map} +1 -1
- package/dist/search/index.d.ts +34 -34
- package/dist/search/index.d.ts.map +1 -1
- package/dist/search/index.js +2 -2
- package/dist/{search-kernel-AVgIjXaI.js → search-kernel-Dpniloks.js} +33 -26
- package/dist/{search-kernel-AVgIjXaI.js.map → search-kernel-Dpniloks.js.map} +1 -1
- package/dist/{search-ledger-CL0-mXQ8.js → search-ledger-CXQPwdWz.js} +4 -3
- package/dist/{search-ledger-CL0-mXQ8.js.map → search-ledger-CXQPwdWz.js.map} +1 -1
- package/dist/{search-shipper-Cs6K4km9.js → search-shipper-DhhofkDX.js} +3 -6
- package/dist/{search-shipper-Cs6K4km9.js.map → search-shipper-DhhofkDX.js.map} +1 -1
- package/dist/{search-summary-DvWk0hb3.js → search-summary-C1nAHgkB.js} +4 -4
- package/dist/{search-summary-DvWk0hb3.js.map → search-summary-C1nAHgkB.js.map} +1 -1
- package/dist/{semantic-concept-judge-2SE_kXGF.js → semantic-concept-judge-BcjYg37z.js} +4 -4
- package/dist/{semantic-concept-judge-2SE_kXGF.js.map → semantic-concept-judge-BcjYg37z.js.map} +1 -1
- package/dist/{sequential-Yz3OSskl.js → sequential-DWn_np6P.js} +2 -3
- package/dist/{sequential-Yz3OSskl.js.map → sequential-DWn_np6P.js.map} +1 -1
- package/dist/{server-D56r1lhp.js → server-B4jMhqQn.js} +2 -2
- package/dist/{server-D56r1lhp.js.map → server-B4jMhqQn.js.map} +1 -1
- package/dist/{skillopt-optimization-method-B2syNik0.js → skillopt-optimization-method-Bls9t-G_.js} +9 -9
- package/dist/{skillopt-optimization-method-B2syNik0.js.map → skillopt-optimization-method-Bls9t-G_.js.map} +1 -1
- package/dist/{statistical-heldout-BAFDCo07.js → statistical-heldout-CNLOvRq_.js} +3 -3
- package/dist/{statistical-heldout-BAFDCo07.js.map → statistical-heldout-CNLOvRq_.js.map} +1 -1
- package/dist/statistical-heldout-HswMvzbP.d.ts.map +1 -1
- package/dist/{store-DNe_Uv1Q.js → store-BhNuLdJw.js} +3 -5
- package/dist/{store-DNe_Uv1Q.js.map → store-BhNuLdJw.js.map} +1 -1
- package/dist/store-C4avFjIi.d.ts.map +1 -1
- package/dist/{store-otlp-BPowgPm6.js → store-otlp-yd9lDziN.js} +2 -2
- package/dist/{store-otlp-BPowgPm6.js.map → store-otlp-yd9lDziN.js.map} +1 -1
- package/dist/{store-tool-spans-BaGakFc2.js → store-tool-spans-Biio4_Nw.js} +4 -4
- package/dist/{store-tool-spans-BaGakFc2.js.map → store-tool-spans-Biio4_Nw.js.map} +1 -1
- package/dist/storyboard/index.d.ts +20 -21
- package/dist/storyboard/index.d.ts.map +1 -1
- package/dist/{student-t-BA-Uy51p.js → student-t-BBZYka0E.js} +4 -3
- package/dist/{student-t-BA-Uy51p.js.map → student-t-BBZYka0E.js.map} +1 -1
- package/dist/{summary-report-BeYnvddy.js → summary-report-DLzptLSA.js} +8 -7
- package/dist/{summary-report-BeYnvddy.js.map → summary-report-DLzptLSA.js.map} +1 -1
- package/dist/supervisor-run/index.d.ts +25 -25
- package/dist/supervisor-run/index.d.ts.map +1 -1
- package/dist/supervisor-run/index.js +2 -2
- package/dist/{tool-waste-CJDfxH45.js → tool-waste-B-u3rzCz.js} +11 -6
- package/dist/{tool-waste-CJDfxH45.js.map → tool-waste-B-u3rzCz.js.map} +1 -1
- package/dist/trace-repair/index.d.ts +96 -96
- package/dist/trace-repair/index.d.ts.map +1 -1
- package/dist/trace-repair/index.js +1 -1
- package/dist/trace-repair/index.js.map +1 -1
- package/dist/traces.d.ts +29 -29
- package/dist/traces.d.ts.map +1 -1
- package/dist/traces.js +9 -7
- package/dist/traces.js.map +1 -1
- package/dist/trajectory-replay/index.d.ts +35 -35
- package/dist/trajectory-replay/index.d.ts.map +1 -1
- package/dist/trajectory-replay/index.js +5 -5
- package/dist/trajectory-replay/index.js.map +1 -1
- package/dist/{tree-Ki_gW7z8.js → tree-D48IJUK0.js} +39 -31
- package/dist/{tree-Ki_gW7z8.js.map → tree-D48IJUK0.js.map} +1 -1
- package/dist/wire/index.d.ts +48 -48
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +1 -1
- package/docs/evaluator-construction.md +71 -0
- package/package.json +18 -36
- package/dist/campaign-L391bmir.js.map +0 -1
- package/dist/define-agent-eval-1YuvJpOs.d.ts.map +0 -1
- package/dist/index-D4pC7Tvd2.d.ts.map +0 -1
- package/dist/index-DKmrHA02.d.ts.map +0 -1
- package/dist/index-DNgf5gyG2.d.ts.map +0 -1
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { s as ValidationError, t as AgentEvalError } from "./errors-Dngq5h35.js";
|
|
2
|
-
import { i as compareCodeUnits } from "./canonical-BsZVgBhW.js";
|
|
3
|
-
import { c as agentProfileId, d as harnessAxisOf, i as verifyCompletion, l as agentProfileModelId, s as agentProfileHash, t as extractProducedState } from "./produced-state-
|
|
2
|
+
import { a as hashCanonical, i as compareCodeUnits, r as canonicalString } from "./canonical-BsZVgBhW.js";
|
|
3
|
+
import { c as agentProfileId, d as harnessAxisOf, i as verifyCompletion, l as agentProfileModelId, s as agentProfileHash, t as extractProducedState } from "./produced-state-CR2tAPLf.js";
|
|
4
4
|
import { s as buildAgentProfileCell } from "./agent-profile-cell-DcFW4vOc.js";
|
|
5
|
-
import { r as pairedBootstrap } from "./paired-tests-
|
|
6
|
-
import { t as comparePairedArms } from "./paired-arms-
|
|
7
|
-
import { o as pairHoldout } from "./statistical-heldout-
|
|
5
|
+
import { r as pairedBootstrap } from "./paired-tests-Ccr16gcW.js";
|
|
6
|
+
import { t as comparePairedArms } from "./paired-arms-DpS_h8ON.js";
|
|
7
|
+
import { o as pairHoldout } from "./statistical-heldout-CNLOvRq_.js";
|
|
8
8
|
import { c as runTaskScore, i as modelHasSnapshot, n as UNKNOWN_MODEL, u as validateRunRecord } from "./run-record-BRlM99rX.js";
|
|
9
9
|
import { n as contentHash, t as canonicalJson } from "./verdict-cache-BQEsVy9n.js";
|
|
10
|
-
import { at as resolveRunDir, d as combineComparisonCosts, it as planCampaignRun, lt as cellCachePath, rt as runCampaign, u as executeOptimizationMethod, ut as computeManifestHash, v as labelTrustRank } from "./llm-judge-
|
|
11
|
-
import { n as campaignCellToRunRecord, r as projectCampaignCellQuality, t as campaignCellCostProvenance } from "./run-record-
|
|
10
|
+
import { at as resolveRunDir, d as combineComparisonCosts, it as planCampaignRun, lt as cellCachePath, rt as runCampaign, u as executeOptimizationMethod, ut as computeManifestHash, v as labelTrustRank } from "./llm-judge-C-0P1WiT.js";
|
|
11
|
+
import { n as campaignCellToRunRecord, r as projectCampaignCellQuality, t as campaignCellCostProvenance } from "./run-record-BB290Y9A.js";
|
|
12
12
|
import { t as CostAccountingIncompleteError } from "./cost-ledger-_IbkejCF.js";
|
|
13
|
-
import { B as assertRealBackend, F as surfaceContentHash, H as assertCampaignDesign, K as campaignScenarioIdentity, V as summarizeBackendIntegrity, j as assertCodeSurfaceIdentity } from "./campaign-evidence-
|
|
13
|
+
import { B as assertRealBackend, F as surfaceContentHash, H as assertCampaignDesign, K as campaignScenarioIdentity, V as summarizeBackendIntegrity, j as assertCodeSurfaceIdentity } from "./campaign-evidence-Dt_rWPk2.js";
|
|
14
14
|
import { m as mapConcurrent } from "./journal-DvKCvjty.js";
|
|
15
|
-
import { S as fsCampaignStorage } from "./external-optimizer-subprocess-
|
|
16
|
-
import "./search-kernel-
|
|
17
|
-
import "./search-ledger-
|
|
18
|
-
import "./search-summary-
|
|
19
|
-
import { a as scoreAnalystFindings } from "./benchmark-
|
|
20
|
-
import "./external-optimizer-process-
|
|
21
|
-
import "./skillopt-optimization-method-
|
|
22
|
-
import "./sequential-
|
|
15
|
+
import { S as fsCampaignStorage } from "./external-optimizer-subprocess-CkyUUV7h.js";
|
|
16
|
+
import "./search-kernel-Dpniloks.js";
|
|
17
|
+
import "./search-ledger-CXQPwdWz.js";
|
|
18
|
+
import "./search-summary-C1nAHgkB.js";
|
|
19
|
+
import { a as scoreAnalystFindings } from "./benchmark-BywPeAUo.js";
|
|
20
|
+
import "./external-optimizer-process-KLcw0Vnc.js";
|
|
21
|
+
import "./skillopt-optimization-method-Bls9t-G_.js";
|
|
22
|
+
import "./sequential-DWn_np6P.js";
|
|
23
23
|
import { createHash } from "node:crypto";
|
|
24
24
|
import { closeSync, constants, existsSync, fstatSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
25
|
+
import { z } from "zod";
|
|
25
26
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
26
27
|
import { devNull, tmpdir } from "node:os";
|
|
27
28
|
import { execFileSync } from "node:child_process";
|
|
@@ -1298,8 +1299,10 @@ function sha256$1(input) {
|
|
|
1298
1299
|
return createHash("sha256").update(input).digest("hex").slice(0, 16);
|
|
1299
1300
|
}
|
|
1300
1301
|
function appendLine(path, line) {
|
|
1301
|
-
if (existsSync(path))
|
|
1302
|
-
|
|
1302
|
+
if (existsSync(path)) {
|
|
1303
|
+
const existing = readFileSync(path, "utf8");
|
|
1304
|
+
writeFileSync(path, existing + line);
|
|
1305
|
+
} else writeFileSync(path, line);
|
|
1303
1306
|
}
|
|
1304
1307
|
//#endregion
|
|
1305
1308
|
//#region src/campaign/neutralize.ts
|
|
@@ -1447,10 +1450,11 @@ function sequentialOptimizationMethod(options) {
|
|
|
1447
1450
|
*/
|
|
1448
1451
|
function makePlaybackDispatch(driver) {
|
|
1449
1452
|
return async (profile, scenario, ctx) => {
|
|
1450
|
-
|
|
1453
|
+
const events = await driver.run(scenario, {
|
|
1451
1454
|
...ctx,
|
|
1452
1455
|
profile
|
|
1453
|
-
})
|
|
1456
|
+
});
|
|
1457
|
+
return extractProducedState(events);
|
|
1454
1458
|
};
|
|
1455
1459
|
}
|
|
1456
1460
|
/**
|
|
@@ -1675,7 +1679,8 @@ function buildRunRecord(args) {
|
|
|
1675
1679
|
const { cell, profile, profileHash, configHash, experimentId, splitTag, commitSha, matrixId } = args;
|
|
1676
1680
|
const profileId = agentProfileId(profile);
|
|
1677
1681
|
const model = recordModel(cell, profileId, agentProfileModelId(profile));
|
|
1678
|
-
const
|
|
1682
|
+
const durableCell = durableCellForRecord(cell);
|
|
1683
|
+
const record = campaignCellToRunRecord(durableCell, {
|
|
1679
1684
|
runId: `${matrixId}:${profileId}:${cell.cellId}`,
|
|
1680
1685
|
experimentId,
|
|
1681
1686
|
candidateId: profileId,
|
|
@@ -1964,7 +1969,7 @@ function createProfileMatrixPlan(opts) {
|
|
|
1964
1969
|
scenarios: scenarios.map((scenario) => scenario.id)
|
|
1965
1970
|
}).slice(0, 16)}`;
|
|
1966
1971
|
if (experimentId.trim().length === 0) throw new SegmentedProfileMatrixError("experimentId must be non-empty");
|
|
1967
|
-
const
|
|
1972
|
+
const identityMaterial = {
|
|
1968
1973
|
schema: "tangle.profile-matrix-plan.v1",
|
|
1969
1974
|
profiles: profiles.map((profile, index) => ({
|
|
1970
1975
|
ordinal: index,
|
|
@@ -1995,7 +2000,8 @@ function createProfileMatrixPlan(opts) {
|
|
|
1995
2000
|
validate,
|
|
1996
2001
|
personaOf: opts.personaOf?.toString() ?? null,
|
|
1997
2002
|
corpusText: opts.corpusText?.toString() ?? null
|
|
1998
|
-
}
|
|
2003
|
+
};
|
|
2004
|
+
const planDigest = `sha256:${contentHash(identityMaterial)}`;
|
|
1999
2005
|
const matrixId = `pmx_${planDigest.slice(7, 31)}`;
|
|
2000
2006
|
const rows = [];
|
|
2001
2007
|
const seenCellIds = /* @__PURE__ */ new Set();
|
|
@@ -2361,6 +2367,238 @@ function byteLength(value) {
|
|
|
2361
2367
|
return new TextEncoder().encode(value).byteLength;
|
|
2362
2368
|
}
|
|
2363
2369
|
//#endregion
|
|
2370
|
+
//#region src/campaign/retained-dispatch.ts
|
|
2371
|
+
const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/);
|
|
2372
|
+
const headerSchema = z.object({
|
|
2373
|
+
kind: z.literal("retained-dispatch-v1"),
|
|
2374
|
+
scope: digest,
|
|
2375
|
+
limits: z.array(z.tuple([z.string().min(1), z.number().int().nonnegative()]))
|
|
2376
|
+
}).strict();
|
|
2377
|
+
const eventSchema = z.discriminatedUnion("kind", [z.object({
|
|
2378
|
+
kind: z.literal("started"),
|
|
2379
|
+
id: digest,
|
|
2380
|
+
lane: z.string().min(1)
|
|
2381
|
+
}).strict(), z.object({
|
|
2382
|
+
kind: z.literal("settled"),
|
|
2383
|
+
id: digest,
|
|
2384
|
+
receipt: digest
|
|
2385
|
+
}).strict()]);
|
|
2386
|
+
const resultSchema = z.object({
|
|
2387
|
+
kind: z.literal("retained-dispatch-result-v1"),
|
|
2388
|
+
id: digest,
|
|
2389
|
+
receipt: digest,
|
|
2390
|
+
value: z.unknown()
|
|
2391
|
+
}).strict();
|
|
2392
|
+
/**
|
|
2393
|
+
* Persist dispatch intent before an external call and its validated result afterward.
|
|
2394
|
+
* Replays settled calls; never repeats an uncertain call or refunds its allowance.
|
|
2395
|
+
* This wraps a campaign's dispatch; runEval still owns scheduling, judging and reports.
|
|
2396
|
+
* Uses CampaignStorage's existing compare-and-append, not another database or scheduler.
|
|
2397
|
+
*/
|
|
2398
|
+
function createRetainedDispatch(options) {
|
|
2399
|
+
if (!options.runDir.trim()) throw new ValidationError("retained dispatch requires a run directory");
|
|
2400
|
+
const storage = options.storage ?? fsCampaignStorage();
|
|
2401
|
+
const parse = options.parse;
|
|
2402
|
+
const header = headerSchema.parse({
|
|
2403
|
+
kind: "retained-dispatch-v1",
|
|
2404
|
+
scope: hashCanonical(options.scope),
|
|
2405
|
+
limits: Object.entries(options.limits).sort(([a], [b]) => compareCodeUnits(a, b))
|
|
2406
|
+
});
|
|
2407
|
+
if (!header.limits.length) throw new ValidationError("retained dispatch requires named allowances");
|
|
2408
|
+
const limits = new Map(header.limits);
|
|
2409
|
+
const counts = /* @__PURE__ */ new Map();
|
|
2410
|
+
const calls = /* @__PURE__ */ new Map();
|
|
2411
|
+
const active = /* @__PURE__ */ new Map();
|
|
2412
|
+
const indexPath = join(options.runDir, "dispatches.jsonl");
|
|
2413
|
+
const receiptsDir = join(options.runDir, "dispatch-results");
|
|
2414
|
+
const resultPath = (id) => join(receiptsDir, `${id.slice(7)}.json`);
|
|
2415
|
+
storage.ensureDir(options.runDir);
|
|
2416
|
+
storage.ensureDir(receiptsDir);
|
|
2417
|
+
let retainedText = "";
|
|
2418
|
+
let revision = 0;
|
|
2419
|
+
let opened = false;
|
|
2420
|
+
const fail = (message) => {
|
|
2421
|
+
throw new ValidationError(`retained dispatch: ${message}`);
|
|
2422
|
+
};
|
|
2423
|
+
const apply = (event) => {
|
|
2424
|
+
const existing = calls.get(event.id);
|
|
2425
|
+
if (event.kind === "started") {
|
|
2426
|
+
const limit = limits.get(event.lane);
|
|
2427
|
+
const count = counts.get(event.lane) ?? 0;
|
|
2428
|
+
if (existing || limit === void 0 || count >= limit) fail("invalid or over-budget dispatch history");
|
|
2429
|
+
calls.set(event.id, { lane: event.lane });
|
|
2430
|
+
counts.set(event.lane, count + 1);
|
|
2431
|
+
} else {
|
|
2432
|
+
if (!existing || existing.receipt) return fail("settlement has no unique pending dispatch");
|
|
2433
|
+
existing.receipt = event.receipt;
|
|
2434
|
+
}
|
|
2435
|
+
};
|
|
2436
|
+
const refresh = () => {
|
|
2437
|
+
const stored = storage.read(indexPath);
|
|
2438
|
+
if (stored === void 0 && storage.exists(indexPath)) fail("cannot read existing history");
|
|
2439
|
+
const text = stored ?? "";
|
|
2440
|
+
if (!text.startsWith(retainedText) || text && !text.endsWith("\n")) fail("history was truncated, replaced or torn");
|
|
2441
|
+
for (const line of text.slice(retainedText.length).split("\n").filter(Boolean)) {
|
|
2442
|
+
const value = JSON.parse(line);
|
|
2443
|
+
if (!opened) {
|
|
2444
|
+
if (hashCanonical(headerSchema.parse(value)) !== hashCanonical(header)) fail("resume changed its scope or allowances");
|
|
2445
|
+
opened = true;
|
|
2446
|
+
} else apply(eventSchema.parse(value));
|
|
2447
|
+
}
|
|
2448
|
+
retainedText = text;
|
|
2449
|
+
revision = Buffer.byteLength(text);
|
|
2450
|
+
};
|
|
2451
|
+
const append = (event) => {
|
|
2452
|
+
const line = `${canonicalString(event)}\n`;
|
|
2453
|
+
const next = storage.append(indexPath, line, revision);
|
|
2454
|
+
if (next === void 0) {
|
|
2455
|
+
refresh();
|
|
2456
|
+
return false;
|
|
2457
|
+
}
|
|
2458
|
+
if (next !== revision + Buffer.byteLength(line)) fail("storage returned an invalid append revision");
|
|
2459
|
+
retainedText += line;
|
|
2460
|
+
revision = next;
|
|
2461
|
+
if (event.kind === "retained-dispatch-v1") opened = true;
|
|
2462
|
+
else apply(event);
|
|
2463
|
+
return true;
|
|
2464
|
+
};
|
|
2465
|
+
refresh();
|
|
2466
|
+
if (!opened && !append(header) && !opened) fail("history is busy; retry with the same run directory");
|
|
2467
|
+
const readResult = (id) => {
|
|
2468
|
+
const content = storage.read(resultPath(id));
|
|
2469
|
+
if (content === void 0) return void 0;
|
|
2470
|
+
const result = resultSchema.parse(JSON.parse(content));
|
|
2471
|
+
if (result.id !== id) return fail("retained result dispatch id mismatch");
|
|
2472
|
+
if (hashCanonical(result.value) !== result.receipt) return fail("retained result digest mismatch");
|
|
2473
|
+
return {
|
|
2474
|
+
value: parse(result.value),
|
|
2475
|
+
receipt: result.receipt
|
|
2476
|
+
};
|
|
2477
|
+
};
|
|
2478
|
+
const settle = (id, receipt) => {
|
|
2479
|
+
while (true) {
|
|
2480
|
+
const existing = calls.get(id);
|
|
2481
|
+
if (existing?.receipt) {
|
|
2482
|
+
if (existing.receipt !== receipt) fail("settled result digest mismatch");
|
|
2483
|
+
return;
|
|
2484
|
+
}
|
|
2485
|
+
if (!existing) fail("settlement has no pending dispatch");
|
|
2486
|
+
const previousRevision = revision;
|
|
2487
|
+
if (append({
|
|
2488
|
+
kind: "settled",
|
|
2489
|
+
id,
|
|
2490
|
+
receipt
|
|
2491
|
+
})) return;
|
|
2492
|
+
if (revision === previousRevision) fail("settlement is busy; retained result awaits reconciliation");
|
|
2493
|
+
}
|
|
2494
|
+
};
|
|
2495
|
+
const load = (id, receipt) => {
|
|
2496
|
+
const result = readResult(id);
|
|
2497
|
+
if (!result) return fail("settled result is missing");
|
|
2498
|
+
if (result.receipt !== receipt) return fail("settled result digest mismatch");
|
|
2499
|
+
return {
|
|
2500
|
+
succeeded: true,
|
|
2501
|
+
value: result.value,
|
|
2502
|
+
dispatchId: id,
|
|
2503
|
+
receiptDigest: receipt,
|
|
2504
|
+
replayed: true
|
|
2505
|
+
};
|
|
2506
|
+
};
|
|
2507
|
+
return {
|
|
2508
|
+
/** The input binds all behavior-affecting request material, not just a caller-selected nonce. */
|
|
2509
|
+
run(request) {
|
|
2510
|
+
const id = hashCanonical([
|
|
2511
|
+
header.scope,
|
|
2512
|
+
request.lane,
|
|
2513
|
+
request.input
|
|
2514
|
+
]);
|
|
2515
|
+
const pending = active.get(id);
|
|
2516
|
+
if (pending) return pending;
|
|
2517
|
+
const work = async () => {
|
|
2518
|
+
if (!limits.has(request.lane)) return fail("unknown allowance lane");
|
|
2519
|
+
if (calls.has(id) && !calls.get(id).receipt) refresh();
|
|
2520
|
+
while (true) {
|
|
2521
|
+
const existing = calls.get(id);
|
|
2522
|
+
if (existing) {
|
|
2523
|
+
if (existing.receipt) return load(id, existing.receipt);
|
|
2524
|
+
const result = readResult(id);
|
|
2525
|
+
if (!result) return {
|
|
2526
|
+
succeeded: false,
|
|
2527
|
+
reason: "outcome_unknown",
|
|
2528
|
+
dispatchId: id
|
|
2529
|
+
};
|
|
2530
|
+
settle(id, result.receipt);
|
|
2531
|
+
return {
|
|
2532
|
+
succeeded: true,
|
|
2533
|
+
value: result.value,
|
|
2534
|
+
dispatchId: id,
|
|
2535
|
+
receiptDigest: result.receipt,
|
|
2536
|
+
replayed: true
|
|
2537
|
+
};
|
|
2538
|
+
}
|
|
2539
|
+
request.signal?.throwIfAborted();
|
|
2540
|
+
if ((counts.get(request.lane) ?? 0) >= limits.get(request.lane)) return {
|
|
2541
|
+
succeeded: false,
|
|
2542
|
+
reason: "allowance_exhausted",
|
|
2543
|
+
dispatchId: id
|
|
2544
|
+
};
|
|
2545
|
+
const previousRevision = revision;
|
|
2546
|
+
if (append({
|
|
2547
|
+
kind: "started",
|
|
2548
|
+
id,
|
|
2549
|
+
lane: request.lane
|
|
2550
|
+
})) break;
|
|
2551
|
+
if (revision === previousRevision) return fail("history is busy; retry with the same input");
|
|
2552
|
+
}
|
|
2553
|
+
let value;
|
|
2554
|
+
try {
|
|
2555
|
+
request.signal?.throwIfAborted();
|
|
2556
|
+
value = parse(await request.dispatch());
|
|
2557
|
+
} catch (error) {
|
|
2558
|
+
return {
|
|
2559
|
+
succeeded: false,
|
|
2560
|
+
reason: "outcome_unknown",
|
|
2561
|
+
dispatchId: id,
|
|
2562
|
+
diagnostic: error instanceof Error ? error.message : String(error)
|
|
2563
|
+
};
|
|
2564
|
+
}
|
|
2565
|
+
const encoded = canonicalString(value);
|
|
2566
|
+
const decoded = JSON.parse(encoded);
|
|
2567
|
+
const retainedValue = parse(decoded);
|
|
2568
|
+
if (canonicalString(retainedValue) !== encoded) return fail("result decoder is not stable across serialization");
|
|
2569
|
+
const receipt = hashCanonical(decoded);
|
|
2570
|
+
const retainedResult = canonicalString({
|
|
2571
|
+
kind: "retained-dispatch-result-v1",
|
|
2572
|
+
id,
|
|
2573
|
+
receipt,
|
|
2574
|
+
value: decoded
|
|
2575
|
+
});
|
|
2576
|
+
const file = resultPath(id);
|
|
2577
|
+
if (storage.append(file, retainedResult, 0) === void 0 && storage.read(file) !== retainedResult) fail("cannot retain dispatch result");
|
|
2578
|
+
settle(id, receipt);
|
|
2579
|
+
return {
|
|
2580
|
+
succeeded: true,
|
|
2581
|
+
value: retainedValue,
|
|
2582
|
+
dispatchId: id,
|
|
2583
|
+
receiptDigest: receipt,
|
|
2584
|
+
replayed: false
|
|
2585
|
+
};
|
|
2586
|
+
};
|
|
2587
|
+
const promise = work();
|
|
2588
|
+
active.set(id, promise);
|
|
2589
|
+
promise.finally(() => {
|
|
2590
|
+
active.delete(id);
|
|
2591
|
+
}).catch(() => {});
|
|
2592
|
+
return promise;
|
|
2593
|
+
},
|
|
2594
|
+
/** Counts include uncertain dispatches, which keep their reservation. No pricing is inferred. */
|
|
2595
|
+
committed() {
|
|
2596
|
+
refresh();
|
|
2597
|
+
return new Map(header.limits.map(([lane]) => [lane, counts.get(lane) ?? 0]));
|
|
2598
|
+
}
|
|
2599
|
+
};
|
|
2600
|
+
}
|
|
2601
|
+
//#endregion
|
|
2364
2602
|
//#region src/campaign/scenario-selection.ts
|
|
2365
2603
|
const DEFAULT_SATURATION_CEILING = .999;
|
|
2366
2604
|
/** Variance below this is treated as "every candidate scored the same". */
|
|
@@ -2577,8 +2815,8 @@ async function abortableEvaluation(signal, execute) {
|
|
|
2577
2815
|
* adapter can slot in without touching proposer code. Only the git adapter
|
|
2578
2816
|
* ships today. See `docs/design/loop-taxonomy.md`.
|
|
2579
2817
|
*/
|
|
2580
|
-
const MAX_GIT_OUTPUT_BYTES =
|
|
2581
|
-
const FILE_HASH_CHUNK_BYTES =
|
|
2818
|
+
const MAX_GIT_OUTPUT_BYTES = 268435456;
|
|
2819
|
+
const FILE_HASH_CHUNK_BYTES = 1048576;
|
|
2582
2820
|
const GIT_REPOSITORY_ENV = /* @__PURE__ */ new Set([
|
|
2583
2821
|
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
|
|
2584
2822
|
"GIT_COMMON_DIR",
|
|
@@ -3086,6 +3324,6 @@ function resolveWorktreePath(surface, worktreeDir) {
|
|
|
3086
3324
|
return verifyCodeSurface(surface, worktreeDir).path;
|
|
3087
3325
|
}
|
|
3088
3326
|
//#endregion
|
|
3089
|
-
export {
|
|
3327
|
+
export { loadEvalFixtureScenarios as A, FsLabeledScenarioStore as C, neutralizationGate as D, rolloutArgumentDiff as E, analyzeCrossSurfaceInteractions as M, buildTraceAnalystSurfaceDispatch as N, discoverEvalFixtures as O, traceAnalystQualityJudge as P, neutralizeText as S, classifyUngroundedLiterals as T, scoreUserStory as _, autoevalsScorerJudge as a, scopedOptimizationMethod as b, selectDiscriminative as c, finalizeProfileMatrix as d, runProfileMatrixSegment as f, renderScoreboardMarkdown as g, makePlaybackDispatch as h, verifyCodeSurface as i, planEvalFixtureRun as j, loadEvalFixture as k, createRetainedDispatch as l, runProfileMatrix as m, gitWorktreeAdapter as n, phoenixEvaluatorJudge as o, ProfileMatrixError as p, resolveWorktreePath as r, scoreDiscrimination as s, WorktreeAdapterError as t, createProfileMatrixPlan as u, scoreboardSummary as v, LabeledScenarioStoreError as w, sequentialOptimizationMethod as x, userStoryScoreboard as y };
|
|
3090
3328
|
|
|
3091
|
-
//# sourceMappingURL=campaign-
|
|
3329
|
+
//# sourceMappingURL=campaign-XXmOU0R0.js.map
|