@tangle-network/agent-eval 0.203.0 → 0.203.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/adapters/http.d.ts +10 -4
- package/dist/adapters/http.d.ts.map +1 -1
- package/dist/adapters/http.js +43 -38
- package/dist/adapters/http.js.map +1 -1
- package/dist/{agent-profile-DDfIjdyS.d.ts → agent-profile-EpO0HURy.d.ts} +4 -4
- package/dist/{agent-profile-DDfIjdyS.d.ts.map → agent-profile-EpO0HURy.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +12 -12
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +6 -6
- package/dist/{analyze-runs-CPiKLJFs.d.ts → analyze-runs-Q74o4Hfj.d.ts} +2 -2
- package/dist/{analyze-runs-CPiKLJFs.d.ts.map → analyze-runs-Q74o4Hfj.d.ts.map} +1 -1
- package/dist/{benchmark-command-DFs_i62N.js → benchmark-command-6OBcB0sG.js} +7 -6
- package/dist/benchmark-command-6OBcB0sG.js.map +1 -0
- package/dist/benchmarks/index.d.ts +4 -4
- package/dist/benchmarks/index.js +3 -3
- package/dist/campaign/index.d.ts +6 -6
- package/dist/campaign/index.js +4 -4
- package/dist/{campaign-Btk1yFfw.js → campaign-DYhg4SjN.js} +6 -6
- package/dist/{campaign-Btk1yFfw.js.map → campaign-DYhg4SjN.js.map} +1 -1
- package/dist/{chat-client-DUhWNQQS.js → chat-client-5LLl4Ctl.js} +2 -2
- package/dist/{chat-client-DUhWNQQS.js.map → chat-client-5LLl4Ctl.js.map} +1 -1
- package/dist/{chat-json-call-Dx_sHzqm.js → chat-json-call-Digk-pfF.js} +2 -2
- package/dist/{chat-json-call-Dx_sHzqm.js.map → chat-json-call-Digk-pfF.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/contract/index.d.ts +10 -10
- package/dist/contract/index.js +7 -7
- package/dist/{default-registry-B-utjsmX.d.ts → default-registry-BHEfZHQd.d.ts} +6 -6
- package/dist/{default-registry-B-utjsmX.d.ts.map → default-registry-BHEfZHQd.d.ts.map} +1 -1
- package/dist/{default-registry-CpswV_S2.js → default-registry-wInsQWlQ.js} +2 -2
- package/dist/{default-registry-CpswV_S2.js.map → default-registry-wInsQWlQ.js.map} +1 -1
- package/dist/{define-agent-eval-CJN9dTQw.js → define-agent-eval-B25Cc3ki.js} +3 -3
- package/dist/{define-agent-eval-CJN9dTQw.js.map → define-agent-eval-B25Cc3ki.js.map} +1 -1
- package/dist/{define-agent-eval-MAc6BQrq.d.ts → define-agent-eval-D8bPoBM5.d.ts} +7 -7
- package/dist/{define-agent-eval-MAc6BQrq.d.ts.map → define-agent-eval-D8bPoBM5.d.ts.map} +1 -1
- package/dist/diagnosis/index.d.ts +2 -2
- package/dist/{dspy-rlm-engine-US8YsYGq.js → dspy-rlm-engine-D0h-P2Mz.js} +2 -2
- package/dist/{dspy-rlm-engine-US8YsYGq.js.map → dspy-rlm-engine-D0h-P2Mz.js.map} +1 -1
- package/dist/{engine-4_Q4oujc.d.ts → engine-F_PvwesR.d.ts} +4 -4
- package/dist/{engine-4_Q4oujc.d.ts.map → engine-F_PvwesR.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +2 -2
- package/dist/{exact-types-KGxBWH4b.d.ts → exact-types-BBMMYk3g.d.ts} +2 -2
- package/dist/{exact-types-KGxBWH4b.d.ts.map → exact-types-BBMMYk3g.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +1 -1
- package/dist/{external-optimizer-process-KLcw0Vnc.js → external-optimizer-process-CIV4EqiT.js} +2 -2
- package/dist/{external-optimizer-process-KLcw0Vnc.js.map → external-optimizer-process-CIV4EqiT.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-CkyUUV7h.js → external-optimizer-subprocess-BmKtH3T6.js} +2 -2
- package/dist/{external-optimizer-subprocess-CkyUUV7h.js.map → external-optimizer-subprocess-BmKtH3T6.js.map} +1 -1
- package/dist/{extract-usage-DFATEuWW.js → extract-usage-BrnzRJ6H.js} +4 -3
- package/dist/extract-usage-BrnzRJ6H.js.map +1 -0
- package/dist/{feedback-trajectory-BXCGTRkz.d.ts → feedback-trajectory-C6NJxXEa.d.ts} +3 -3
- package/dist/{feedback-trajectory-BXCGTRkz.d.ts.map → feedback-trajectory-C6NJxXEa.d.ts.map} +1 -1
- package/dist/{index-CAtNOBQY.d.ts → index-B8n12TR2.d.ts} +12 -14
- package/dist/index-B8n12TR2.d.ts.map +1 -0
- package/dist/{index-DBk_4UPs.d.ts → index-C9l_-23M.d.ts} +7 -7
- package/dist/{index-DBk_4UPs.d.ts.map → index-C9l_-23M.d.ts.map} +1 -1
- package/dist/{index-Cuhxk05B.d.ts → index-CG7mtu_G.d.ts} +8 -8
- package/dist/{index-Cuhxk05B.d.ts.map → index-CG7mtu_G.d.ts.map} +1 -1
- package/dist/index.d.ts +19 -19
- package/dist/index.js +11 -11
- package/dist/{integrity-CaeNeusS.d.ts → integrity-BWO6RPxv.d.ts} +2 -2
- package/dist/{integrity-CaeNeusS.d.ts.map → integrity-BWO6RPxv.d.ts.map} +1 -1
- package/dist/{jev-review-DX6MI_jq.d.ts → jev-review-Cw06AKuF.d.ts} +2 -2
- package/dist/{jev-review-DX6MI_jq.d.ts.map → jev-review-Cw06AKuF.d.ts.map} +1 -1
- package/dist/jev.d.ts +3 -3
- package/dist/{llm-client-Bhqoglar.js → llm-client-DmCNzrc9.js} +77 -60
- package/dist/llm-client-DmCNzrc9.js.map +1 -0
- package/dist/{llm-judge-C-0P1WiT.js → llm-judge-DyZdrp6I.js} +57 -15
- package/dist/llm-judge-DyZdrp6I.js.map +1 -0
- package/dist/{matrix-BucOjLF1.d.ts → matrix-W1lbSx72.d.ts} +2 -2
- package/dist/{matrix-BucOjLF1.d.ts.map → matrix-W1lbSx72.d.ts.map} +1 -1
- package/dist/meta-eval/index.d.ts +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/openapi.json +1 -1
- package/dist/{prime-protocol-T0i6xcAs.d.ts → prime-protocol-IoN4Qb6c.d.ts} +2 -2
- package/dist/{prime-protocol-T0i6xcAs.d.ts.map → prime-protocol-IoN4Qb6c.d.ts.map} +1 -1
- package/dist/{produced-state-CR2tAPLf.js → produced-state-DLToUXrD.js} +3 -3
- package/dist/{produced-state-CR2tAPLf.js.map → produced-state-DLToUXrD.js.map} +1 -1
- package/dist/{abort-signal-CtzAM_sJ.js → proposal-findings-CXblsskH.js} +2 -11
- package/dist/proposal-findings-CXblsskH.js.map +1 -0
- package/dist/{registry-Bu3lNole.d.ts → registry-CT-hMSkR.d.ts} +4 -4
- package/dist/{registry-Bu3lNole.d.ts.map → registry-CT-hMSkR.d.ts.map} +1 -1
- package/dist/{researcher-DojEMb7E.d.ts → researcher-zTpxNJBy.d.ts} +3 -3
- package/dist/{researcher-DojEMb7E.d.ts.map → researcher-zTpxNJBy.d.ts.map} +1 -1
- package/dist/rl.d.ts +4 -4
- package/dist/search/index.d.ts +2 -2
- package/dist/{search-kernel-B8RC6BlK.d.ts → search-kernel-DNpsHb8P.d.ts} +2 -2
- package/dist/{search-kernel-B8RC6BlK.d.ts.map → search-kernel-DNpsHb8P.d.ts.map} +1 -1
- package/dist/{semantic-concept-judge-BcjYg37z.js → semantic-concept-judge-BgWxa4L_.js} +4 -4
- package/dist/{semantic-concept-judge-BcjYg37z.js.map → semantic-concept-judge-BgWxa4L_.js.map} +1 -1
- package/dist/{series-convergence-DY7ha0kx.d.ts → series-convergence-DLy0bQMV.d.ts} +2 -2
- package/dist/{series-convergence-DY7ha0kx.d.ts.map → series-convergence-DLy0bQMV.d.ts.map} +1 -1
- package/dist/{server-B4jMhqQn.js → server-CoBZO1fj.js} +2 -2
- package/dist/{server-B4jMhqQn.js.map → server-CoBZO1fj.js.map} +1 -1
- package/dist/{skillopt-optimization-method-Bls9t-G_.js → skillopt-optimization-method-Dz5CGZb8.js} +5 -5
- package/dist/{skillopt-optimization-method-Bls9t-G_.js.map → skillopt-optimization-method-Dz5CGZb8.js.map} +1 -1
- package/dist/{statistical-heldout-DJtQAUZB.d.ts → statistical-heldout-Dq3pnmxd.d.ts} +2 -2
- package/dist/{statistical-heldout-DJtQAUZB.d.ts.map → statistical-heldout-Dq3pnmxd.d.ts.map} +1 -1
- package/dist/{store-tool-spans-fkNF7Q9Y.d.ts → store-tool-spans-CAF3T-BS.d.ts} +5 -5
- package/dist/{store-tool-spans-fkNF7Q9Y.d.ts.map → store-tool-spans-CAF3T-BS.d.ts.map} +1 -1
- package/dist/{store-tool-spans-Biio4_Nw.js → store-tool-spans-D5kOU0mr.js} +2 -2
- package/dist/{store-tool-spans-Biio4_Nw.js.map → store-tool-spans-D5kOU0mr.js.map} +1 -1
- package/dist/{tool-groups-Zm84Pqpk.d.ts → tool-groups-B7_jUPHp.d.ts} +3 -3
- package/dist/tool-groups-B7_jUPHp.d.ts.map +1 -0
- package/dist/{trace-questions--lnJTaou.d.ts → trace-questions-Dd3AMf-U.d.ts} +3 -3
- package/dist/{trace-questions--lnJTaou.d.ts.map → trace-questions-Dd3AMf-U.d.ts.map} +1 -1
- package/dist/trace-repair/index.d.ts +1 -1
- package/dist/traces.d.ts +5 -5
- package/dist/traces.js +2 -2
- package/dist/{types-CeDfCRXp.d.ts → types-6VEehmEg.d.ts} +2 -2
- package/dist/{types-CeDfCRXp.d.ts.map → types-6VEehmEg.d.ts.map} +1 -1
- package/dist/{types-C0bWoSKC.d.ts → types-DLxe96rp.d.ts} +2 -2
- package/dist/{types-C0bWoSKC.d.ts.map → types-DLxe96rp.d.ts.map} +1 -1
- package/dist/{types-B6JadxWL.d.ts → types-DZQpUJse.d.ts} +2 -2
- package/dist/{types-B6JadxWL.d.ts.map → types-DZQpUJse.d.ts.map} +1 -1
- package/dist/{types-khIUQ0O5.d.ts → types-ZUy5HGY5.d.ts} +11 -5
- package/dist/{types-khIUQ0O5.d.ts.map → types-ZUy5HGY5.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +2 -2
- package/dist/wire/index.js +1 -1
- package/docs/changes/llm-physical-attempts.md +30 -0
- package/docs/changes/shared-model-request-lifetime.md +30 -0
- package/docs/concepts.md +8 -0
- package/docs/eval-surface-map.md +12 -2
- package/docs/http-dispatch.md +33 -0
- package/docs/proofs/campaign-attempt-retention-20261001/README.md +70 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/artifacts/capture.json +3 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/attempts/e7949644-3d60-4ab9-817e-f80d0a48f5d8/attempt-1/trace/spans.jsonl +0 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-judge-attribution/attribution_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/artifacts/captured-response.json +4 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/attempts/7c7718f6-c85e-4867-9e3a-13ef9513de80/attempt-1/trace/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/failure-receipt.json +58 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-legacy/capture-retention_0/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/artifacts/captured-response.json +4 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/attempts/3652118b-e1dc-4b17-bc15-6b802dc71eb1/attempt-1/trace/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/baseline/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/artifacts/captured-response.json +4 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/failure-receipt.json +62 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/attempts/40e411fe-ad12-4e6b-a279-2cf07c356a2f/attempt-1/trace/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/42b3fec6b7e55008/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/artifacts/captured-response.json +4 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/attempts/9e7da63e-2d19-4ec1-a5ec-ec804e2b0f40/attempt-1/trace/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/candidates/87740cc101602a08/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/first-interruption.json +38 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/19147243d263e55b1eaf1c940691947382a7cce17c5f49e4a4da765a473d2a55.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/5dd0d871d559d1c55b2ac04b3fbd26d62f7c9e25d7632d4542502cd292818fc0.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/5de45d632937e75ff90fec9f1f2ec425904d3632da71f6b26f83b1e1eb8cde5a.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/6caba627806e499aa3d9e156aec9d5a731a3ef30e29756d343b85b7217c77c11.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/ce2770851b3b7651f27cedcbad0372b9191e9a9b016665987e3ddd2ad53012b5.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/d8ac4ba8d9844afb4defa5cd277fe3cb944d99e58cf41c07d3ae199b6f467966.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/blobs/f59a02035fe96ea2f5582dd715d2e3ad8c184ae959310978962f1ac0780753bd.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/ledger.jsonl +23 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-optimization/search/ledger.jsonl.head +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/artifacts/capture.json +3 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/attempts/3c8272d6-d35b-477e-9d08-085261b8dc64/attempt-1/trace/spans.jsonl +0 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-path-guard/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/artifacts/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/failure-receipt.json +81 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/2b022ccb-adb3-4468-8c21-48ee82d0634a/attempt-1/trace/spans.jsonl +2 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/artifacts/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/attempts/c4859951-1e7c-4d23-b89a-0ca8fa79e2cf/attempt-1/trace/spans.jsonl +2 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-resume/observation.json +608 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/artifacts/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/failure-receipt.json +81 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-1/trace/spans.jsonl +2 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/artifacts/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/attempts/74c13884-d47e-4b6d-a823-5bd44ee0e6cb/attempt-2/trace/spans.jsonl +2 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-retry/observation.json +514 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/after-summary.json +1853 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/judge-attribution.json +140 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/qualification.log +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/qualify.mjs +165 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduce.mjs +39 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/captured-response.json +5 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/failure-receipt.json +58 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/capture-retention_0/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-resume/observer-retained-captures.json +20 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/captured-response.json +5 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/failure-receipt.attempt-1.json +58 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/capture-retention_0/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-retry/observer-retained-captures.json +20 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction-summary.json +315 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/reproduction.log +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/source-and-build.json +2409 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/typecheck.log +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/current/verify-package.log +340 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/artifacts/captured-response.json +4 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/attempts/33d57ccb-d4d8-4c23-92e3-c1ddf7db6058/attempt-1/trace/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/failure-receipt.json +58 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-legacy/capture-retention_0/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/artifacts/captured-response.json +4 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/attempts/6b25a1d2-5324-445b-b59d-bdc7381cd4b4/attempt-1/trace/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/baseline/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/first-interruption.json +5 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/search/blobs/5de45d632937e75ff90fec9f1f2ec425904d3632da71f6b26f83b1e1eb8cde5a.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/search/ledger.jsonl +7 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-optimization/search/ledger.jsonl.head +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/artifacts/capture.json +3 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/attempts/723fa9c6-099e-437c-bddf-a4cbd28a8508/attempt-1/trace/spans.jsonl +0 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-path-guard/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/artifacts/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/failure-receipt.json +62 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/06db3429-c5c6-42c1-8623-08e2da1f563e/attempt-1/trace/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/artifacts/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/attempts/d49f7e40-c4d2-4cb6-98d1-5e49f45c6e2c/attempt-1/trace/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-resume/observation.json +458 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/artifacts/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/failure-receipt.json +62 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-1/trace/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/artifacts/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/identity.json +10 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/attempts/cf34f352-67e5-4e8b-a510-0e896bcc96fc/attempt-2/trace/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/capture-retention_0/latest-attempt.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/after-retry/observation.json +380 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/failure-receipt.json +58 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/capture-retention_0/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-resume/observation.json +198 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/cached-result.json +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/captured-response.json +6 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/failure-receipt.attempt-1.json +58 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/capture-retention_0/spans.jsonl +1 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-retry/observation.json +121 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/before-summary.json +321 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/build.attribution.log +491 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/build.final.log +491 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/build.log +495 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualification.log +18 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualification.wrong-root.log +9 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualify.mjs +148 -0
- package/docs/proofs/campaign-attempt-retention-20261001/artifacts/predecessor/qualify.wrong-root.mjs +148 -0
- package/docs/proofs/campaign-attempt-retention-20261001/manifest.json +808 -0
- package/docs/proofs/router-cache-usage-20261001/after.json +2058 -0
- package/docs/proofs/router-cache-usage-20261001/component-projections.json +584 -0
- package/docs/proofs/router-cache-usage-20261001/component-projections.nested-only.json +306 -0
- package/docs/proofs/router-cache-usage-20261001/manifest.json +32 -0
- package/docs/proofs/router-cache-usage-20261001/summary.json +49 -0
- package/docs/proofs/router-cache-usage-20261001/summary.nested-only.json +29 -0
- package/package.json +1 -1
- package/dist/abort-signal-CtzAM_sJ.js.map +0 -1
- package/dist/benchmark-command-DFs_i62N.js.map +0 -1
- package/dist/extract-usage-DFATEuWW.js.map +0 -1
- package/dist/index-CAtNOBQY.d.ts.map +0 -1
- package/dist/llm-client-Bhqoglar.js.map +0 -1
- package/dist/llm-judge-C-0P1WiT.js.map +0 -1
- package/dist/tool-groups-Zm84Pqpk.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to `@tangle-network/agent-eval` and its sibling `agent-eval-
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [0.203.2] — 2026-10-01
|
|
8
|
+
|
|
9
|
+
- fix(campaign): preserve artifacts and traces for every attempt (#908)
|
|
10
|
+
|
|
11
|
+
## [0.203.1] — 2026-10-01
|
|
12
|
+
|
|
13
|
+
- fix(usage): preserve reported Router cache components (#906)
|
|
14
|
+
- fix(llm): consolidate fallback into one physical attempt budget (#902)
|
|
15
|
+
- fix(http): prevent duplicate work across dispatch failure boundaries (#905)
|
|
16
|
+
|
|
7
17
|
## [0.203.0] — 2026-09-30
|
|
8
18
|
|
|
9
19
|
- fix(capture): retain all runtime receipts and attempt identity (#903)
|
package/dist/adapters/http.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { m as CostReceipt } from "../cost-ledger-DbQdN3nO.js";
|
|
2
|
-
import { R as Scenario, d as DispatchContext, f as DispatchFn } from "../types-
|
|
3
|
-
import "../index-
|
|
2
|
+
import { R as Scenario, d as DispatchContext, f as DispatchFn } from "../types-ZUy5HGY5.js";
|
|
3
|
+
import "../index-CG7mtu_G.js";
|
|
4
4
|
//#region src/adapters/http.d.ts
|
|
5
5
|
export interface HttpDispatchOptions<TScenario extends Scenario, _TArtifact> {
|
|
6
6
|
/** Static endpoint URL. Mutually exclusive with `resolveUrl`. */
|
|
@@ -21,7 +21,12 @@ export interface HttpDispatchOptions<TScenario extends Scenario, _TArtifact> {
|
|
|
21
21
|
headers?: Record<string, string>;
|
|
22
22
|
/** Per-call timeout in ms. Default 5 minutes. */
|
|
23
23
|
timeoutMs?: number;
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Additional transport attempts. Default 0: a lost response does not prove
|
|
26
|
+
* the worker did no work. Set a positive value only when the worker durably
|
|
27
|
+
* deduplicates this runAttemptId/cellId and its external effects.
|
|
28
|
+
* 4xx (except 408/429), decoding and receipt-settlement failures are terminal.
|
|
29
|
+
*/
|
|
25
30
|
retries?: number;
|
|
26
31
|
/** Optional fetch override (auth wrappers, custom agent, mocks). */
|
|
27
32
|
fetchImpl?: typeof fetch;
|
|
@@ -53,7 +58,8 @@ export interface HttpDispatchResponseBody<TArtifact> {
|
|
|
53
58
|
*
|
|
54
59
|
* Cancellation: the substrate's per-cell `AbortSignal` is forwarded; the
|
|
55
60
|
* server's `runDispatchServer` translates the resulting `AbortError` into
|
|
56
|
-
* a 499 (client-closed) so the client doesn't retry.
|
|
61
|
+
* a 499 (client-closed) so the client doesn't retry. The server is a transport,
|
|
62
|
+
* not a durable deduplication owner; its default Dispatch may have side effects.
|
|
57
63
|
*/
|
|
58
64
|
export declare function httpDispatch<TScenario extends Scenario, TArtifact>(opts: HttpDispatchOptions<TScenario, TArtifact>): DispatchFn<TScenario, TArtifact>;
|
|
59
65
|
export interface RunDispatchServerOptions<TScenario extends Scenario, TArtifact> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","names":["Dispatch"],"sources":["../../src/adapters/http.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"http.d.ts","names":["Dispatch"],"sources":["../../src/adapters/http.ts"],"mappings":";;;;iBA2DiB,oBAAoB,kBAAkB,UAAU;;EAE/D;;;;;;EAMA,cAAc;IAAS,UAAU;IAAW;IAAoB;;;EAEhE,gCAAgC;;EAEhC,UAAU;;EAEV;;;;;;;EAOA;;EAEA,mBAAmB;;iBAGJ,wBAAwB,kBAAkB;EACzD,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,yBAAyB;EACxC,UAAU;;;;;;;;EAQV,WAAW;;;;;;;;;;;wBAkBG,aAAa,kBAAkB,UAAU,WACvD,MAAM,oBAAoB,WAAW,aACpCA,WAAS,WAAW;iBAgKN,yBAAyB,kBAAkB,UAAU;;EAEpE,UAAUA,WAAS,WAAW;;EAE9B;;EAEA;;;;EAIA;;EAEA;;;;;;;;EAQA,kBACE,KAAK,wBAAwB,YAC7B,QAAQ,gBACL,QAAQ;;EAEb;;EAEA,aAAa;IACX;IACA;IACA;IACA;;;iBAIa;;EAEf;;EAEA,aAAa;;;;;;;;;;;;;;;;;;;;wBAqBO,kBAAkB,kBAAkB,UAAU,WAClE,MAAM,yBAAyB,WAAW,aACzC,QAAQ"}
|
package/dist/adapters/http.js
CHANGED
|
@@ -10,21 +10,23 @@ function resolveAuth(auth) {
|
|
|
10
10
|
*
|
|
11
11
|
* Cancellation: the substrate's per-cell `AbortSignal` is forwarded; the
|
|
12
12
|
* server's `runDispatchServer` translates the resulting `AbortError` into
|
|
13
|
-
* a 499 (client-closed) so the client doesn't retry.
|
|
13
|
+
* a 499 (client-closed) so the client doesn't retry. The server is a transport,
|
|
14
|
+
* not a durable deduplication owner; its default Dispatch may have side effects.
|
|
14
15
|
*/
|
|
15
16
|
function httpDispatch(opts) {
|
|
16
17
|
if (!opts.url && !opts.resolveUrl) throw new Error("httpDispatch: pass exactly one of `url` or `resolveUrl`.");
|
|
17
18
|
if (opts.url && opts.resolveUrl) throw new Error("httpDispatch: pass exactly one of `url` or `resolveUrl`, not both.");
|
|
18
19
|
const timeoutMs = opts.timeoutMs ?? 3e5;
|
|
19
|
-
const maxRetries = opts.retries ??
|
|
20
|
+
const maxRetries = opts.retries ?? 0;
|
|
21
|
+
if (!Number.isSafeInteger(maxRetries) || maxRetries < 0) throw new Error("httpDispatch: retries must be a non-negative safe integer.");
|
|
20
22
|
const f = opts.fetchImpl ?? ((...args) => fetch(...args));
|
|
21
23
|
return async (scenario, ctx) => {
|
|
24
|
+
ctx.signal.throwIfAborted();
|
|
22
25
|
const url = opts.url ?? opts.resolveUrl({
|
|
23
26
|
scenario,
|
|
24
27
|
placement: ctx.placement,
|
|
25
28
|
cellId: ctx.cellId
|
|
26
29
|
});
|
|
27
|
-
const authValue = await resolveAuth(opts.auth);
|
|
28
30
|
const body = {
|
|
29
31
|
scenario,
|
|
30
32
|
cellId: ctx.cellId,
|
|
@@ -35,45 +37,54 @@ function httpDispatch(opts) {
|
|
|
35
37
|
placement: ctx.placement,
|
|
36
38
|
cycleId: ctx.cycleId
|
|
37
39
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const encodedBody = JSON.stringify(body);
|
|
41
|
+
const authValue = await resolveAuth(opts.auth);
|
|
42
|
+
for (let attempt = 0;; attempt++) {
|
|
43
|
+
ctx.signal.throwIfAborted();
|
|
44
|
+
const combinedSignal = AbortSignal.any([ctx.signal, AbortSignal.timeout(timeoutMs)]);
|
|
45
|
+
let res;
|
|
42
46
|
try {
|
|
43
|
-
|
|
47
|
+
res = await f(url, {
|
|
44
48
|
method: "POST",
|
|
45
49
|
headers: {
|
|
46
50
|
"Content-Type": "application/json",
|
|
47
51
|
...authValue ? { Authorization: authValue.startsWith("Bearer ") ? authValue : `Bearer ${authValue}` } : {},
|
|
48
52
|
...opts.headers
|
|
49
53
|
},
|
|
50
|
-
body:
|
|
54
|
+
body: encodedBody,
|
|
51
55
|
signal: combinedSignal
|
|
52
56
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
57
|
+
} catch (err) {
|
|
58
|
+
if (ctx.signal.aborted || attempt >= maxRetries) throw err;
|
|
59
|
+
await sleep(2 ** attempt * 200 + Math.random() * 200, ctx.signal);
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (res.ok) {
|
|
60
63
|
const parsed = await res.json();
|
|
61
|
-
for (const receipt of parsed
|
|
64
|
+
for (const receipt of parsed?.receipts ?? []) await replayReceipt(ctx.cost, receipt);
|
|
65
|
+
if (!parsed || typeof parsed !== "object" || !Object.hasOwn(parsed, "artifact")) throw new Error("httpDispatch: response is missing its artifact.");
|
|
62
66
|
return parsed.artifact;
|
|
63
|
-
} catch (err) {
|
|
64
|
-
if (ctx.signal.aborted) throw err;
|
|
65
|
-
lastError = err;
|
|
66
|
-
if (attempt === maxRetries) throw err;
|
|
67
|
-
await sleep(2 ** attempt * 200 + Math.random() * 200);
|
|
68
67
|
}
|
|
68
|
+
const text = await res.text();
|
|
69
|
+
const receipts = parseErrorReceipts(text);
|
|
70
|
+
for (const receipt of receipts) await replayReceipt(ctx.cost, receipt);
|
|
71
|
+
if (!(res.status >= 500 || res.status === 408 || res.status === 429) || receipts.length > 0 || attempt >= maxRetries) throw new Error(`httpDispatch ${url} failed (${res.status}): ${text.slice(0, 500)}`);
|
|
72
|
+
await sleep(2 ** attempt * 200 + Math.random() * 200, ctx.signal);
|
|
69
73
|
}
|
|
70
|
-
throw lastError ?? /* @__PURE__ */ new Error("httpDispatch exhausted retries");
|
|
71
74
|
};
|
|
72
75
|
}
|
|
73
|
-
function sleep(ms) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
function sleep(ms, signal) {
|
|
77
|
+
signal.throwIfAborted();
|
|
78
|
+
return new Promise((resolve, reject) => {
|
|
79
|
+
const onAbort = () => {
|
|
80
|
+
clearTimeout(timer);
|
|
81
|
+
reject(signal.reason);
|
|
82
|
+
};
|
|
83
|
+
const timer = setTimeout(() => {
|
|
84
|
+
signal.removeEventListener("abort", onAbort);
|
|
85
|
+
resolve();
|
|
86
|
+
}, ms);
|
|
87
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
77
88
|
});
|
|
78
89
|
}
|
|
79
90
|
/** Best-effort receipts from a non-2xx `runDispatchServer` body. Any shape
|
|
@@ -201,7 +212,7 @@ async function runDispatchServer(opts) {
|
|
|
201
212
|
cycleId: body.cycleId,
|
|
202
213
|
trace: NOOP_TRACE,
|
|
203
214
|
artifacts: NOOP_ARTIFACTS,
|
|
204
|
-
cost:
|
|
215
|
+
cost: UNCONFIGURED_COST
|
|
205
216
|
};
|
|
206
217
|
if (ctx.runAttemptId !== body.runAttemptId) throw new Error("runDispatchServer: contextFactory must preserve request runAttemptId");
|
|
207
218
|
const recordingCost = { async runPaidCall(input) {
|
|
@@ -222,12 +233,7 @@ async function runDispatchServer(opts) {
|
|
|
222
233
|
success = true;
|
|
223
234
|
} catch (err) {
|
|
224
235
|
errCaught = err;
|
|
225
|
-
|
|
226
|
-
res.statusCode = 499;
|
|
227
|
-
res.end("client aborted");
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
res.statusCode = 500;
|
|
236
|
+
res.statusCode = err?.name === "AbortError" ? 499 : 500;
|
|
231
237
|
res.setHeader("content-type", "application/json");
|
|
232
238
|
res.end(JSON.stringify({
|
|
233
239
|
error: err instanceof Error ? err.message : String(err),
|
|
@@ -266,10 +272,9 @@ const NOOP_ARTIFACTS = {
|
|
|
266
272
|
read: async () => void 0,
|
|
267
273
|
list: async () => []
|
|
268
274
|
};
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
};
|
|
275
|
+
const UNCONFIGURED_COST = { async runPaidCall() {
|
|
276
|
+
throw new Error("runDispatchServer: paid work requires a contextFactory cost meter.");
|
|
277
|
+
} };
|
|
273
278
|
//#endregion
|
|
274
279
|
export { httpDispatch, runDispatchServer };
|
|
275
280
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","names":[],"sources":["../../src/adapters/http.ts"],"sourcesContent":["/**\n * # `@tangle-network/agent-eval/adapters/http` — distributed Dispatch over HTTP.\n *\n * Decouples coordinator and worker. The coordinator (running\n * `runImprovementLoop` or `runCampaign`) can live anywhere — your VPC, a dev\n * laptop, a cron VM. The workers (running the actual agent) can live anywhere else — different\n * regions, different clouds, different boxes — as long as they speak HTTP.\n *\n * Both sides:\n *\n * - **`httpDispatch({ url | resolveUrl, ... })`** — client. Returns a\n * `Dispatch` that POSTs `{ scenario, ctx }` to a worker URL and parses\n * the artifact back. AbortSignal-aware, retries on idempotent errors,\n * bounded timeout per call.\n * - **`runDispatchServer({ dispatch, port, ... })`** — server. Wraps your\n * local `Dispatch` as an HTTP endpoint. Handles auth, JSON parsing,\n * error mapping, and cancellation when the client aborts.\n *\n * # Cost receipts cross the wire too\n *\n * A worker dispatch pays for its own model calls through its own\n * `ctx.cost` (wired by `contextFactory`) — a different `CostLedger` than the\n * coordinator's. `runDispatchServer` records every receipt that dispatch\n * settles and returns them alongside the artifact; `httpDispatch` replays\n * each one into the coordinator's `ctx.cost`, the same paid-call path a\n * local dispatch uses. A remote cell's spend therefore reaches the\n * coordinator's `CostLedger` — its summary, its cost ceiling, its\n * `CampaignCellResult.costUsd` — exactly like an in-process cell's does.\n * A worker with no `contextFactory` (or one that never touches `ctx.cost`)\n * sends no receipts, and the coordinator sees the cell as free, same as\n * today.\n *\n * # Topology examples\n *\n * **Single-worker:** coordinator on box A, worker on box B. Set\n * `httpDispatch({ url: 'https://box-b/dispatch' })`.\n *\n * **Multi-region:** N workers across regions. Use `httpDispatch({ resolveUrl })`\n * with a function that picks the URL per cell from `ctx.placement`. Combined\n * with `cellPlacement` on `RunCampaignOptions`, the substrate fans cells\n * across geographies in parallel.\n *\n * **Coordinator-as-a-service:** coordinator runs as a long-lived process or service\n * (holds optimization state across generations); workers are stateless\n * HTTP services that can scale horizontally per cell.\n */\n\nimport type { CampaignCostMeter, Dispatch, DispatchContext, Scenario } from '../contract'\nimport type { CostReceipt, CostReceiptInput } from '../cost-ledger'\n\n// ── Client ───────────────────────────────────────────────────────────\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars -- TArtifact is unused\n// in this options interface but kept as a parameter so callers can write\n// `HttpDispatchOptions<MyScenario, MyArtifact>` symmetrically with\n// `Dispatch<MyScenario, MyArtifact>`. Marking it unused at the position\n// where it bites.\nexport interface HttpDispatchOptions<TScenario extends Scenario, _TArtifact> {\n /** Static endpoint URL. Mutually exclusive with `resolveUrl`. */\n url?: string\n /**\n * Dynamic per-cell URL resolver. Receives the scenario + the substrate\n * placement key (from `RunCampaignOptions.cellPlacement`) and returns the\n * worker URL to invoke. Mutually exclusive with `url`.\n */\n resolveUrl?: (input: { scenario: TScenario; placement?: string; cellId: string }) => string\n /** Bearer token or static auth string set as `Authorization`. */\n auth?: string | (() => string | Promise<string>)\n /** Extra headers merged into every request. */\n headers?: Record<string, string>\n /** Per-call timeout in ms. Default 5 minutes. */\n timeoutMs?: number\n /** How many idempotent retries on 5xx / network errors. Default 2. */\n retries?: number\n /** Optional fetch override (auth wrappers, custom agent, mocks). */\n fetchImpl?: typeof fetch\n}\n\nexport interface HttpDispatchRequestBody<TScenario extends Scenario> {\n scenario: TScenario\n cellId: string\n runAttemptId: string\n rep: number\n generation?: number\n seed: number\n placement?: string\n cycleId?: string\n}\n\nexport interface HttpDispatchResponseBody<TArtifact> {\n artifact: TArtifact\n /**\n * Every paid-call receipt the worker's `ctx.cost` settled while producing\n * this artifact, in settlement order. Absent or empty when the worker\n * recorded no paid calls (no `contextFactory`, or a dispatch that pays\n * through some other channel entirely). `httpDispatch` replays each one\n * into the coordinator's own `ctx.cost`.\n */\n receipts?: CostReceipt[]\n}\n\nfunction resolveAuth(auth: HttpDispatchOptions<Scenario, unknown>['auth']): Promise<string | null> {\n if (!auth) return Promise.resolve(null)\n if (typeof auth === 'string') return Promise.resolve(auth)\n return Promise.resolve(auth())\n}\n\n/**\n * Wrap a remote HTTP endpoint as a `Dispatch`. The remote side should run\n * `runDispatchServer` (or any service that speaks the same wire shape).\n *\n * Cancellation: the substrate's per-cell `AbortSignal` is forwarded; the\n * server's `runDispatchServer` translates the resulting `AbortError` into\n * a 499 (client-closed) so the client doesn't retry.\n */\nexport function httpDispatch<TScenario extends Scenario, TArtifact>(\n opts: HttpDispatchOptions<TScenario, TArtifact>,\n): Dispatch<TScenario, TArtifact> {\n if (!opts.url && !opts.resolveUrl) {\n throw new Error('httpDispatch: pass exactly one of `url` or `resolveUrl`.')\n }\n if (opts.url && opts.resolveUrl) {\n throw new Error('httpDispatch: pass exactly one of `url` or `resolveUrl`, not both.')\n }\n const timeoutMs = opts.timeoutMs ?? 5 * 60 * 1000\n const maxRetries = opts.retries ?? 2\n const f: typeof fetch = opts.fetchImpl ?? ((...args) => fetch(...args))\n\n return async (scenario, ctx) => {\n const url =\n opts.url ?? opts.resolveUrl!({ scenario, placement: ctx.placement, cellId: ctx.cellId })\n const authValue = await resolveAuth(opts.auth)\n const body: HttpDispatchRequestBody<TScenario> = {\n scenario,\n cellId: ctx.cellId,\n runAttemptId: ctx.runAttemptId,\n rep: ctx.rep,\n generation: ctx.generation,\n seed: ctx.seed,\n placement: ctx.placement,\n cycleId: ctx.cycleId,\n }\n\n let lastError: unknown\n for (let attempt = 0; attempt <= maxRetries; attempt++) {\n // Compose the request signal: caller's signal OR our timeout.\n const ourTimeout = AbortSignal.timeout(timeoutMs)\n const combinedSignal = AbortSignal.any([ctx.signal, ourTimeout])\n try {\n const res = await f(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...(authValue\n ? {\n Authorization: authValue.startsWith('Bearer ')\n ? authValue\n : `Bearer ${authValue}`,\n }\n : {}),\n ...opts.headers,\n },\n body: JSON.stringify(body),\n signal: combinedSignal,\n })\n if (!res.ok) {\n const text = await res.text().catch(() => '')\n // A dispatch that pays for part of its work before failing (a judge\n // call that settles, then the provider call itself errors) still\n // owes that spend to the coordinator's ledger — read it before\n // deciding whether this attempt retries or this cell fails. A\n // non-JSON error body (401/404/413's plain text) carries none.\n for (const receipt of parseErrorReceipts(text)) {\n await replayReceipt(ctx.cost, receipt)\n }\n // 4xx is non-retryable (caller error, auth, bad scenario shape).\n // 5xx / 408 / 429 / 502 / 503 / 504 are retryable.\n const retryable = res.status >= 500 || res.status === 408 || res.status === 429\n if (!retryable || attempt === maxRetries) {\n throw new Error(`httpDispatch ${url} failed (${res.status}): ${text.slice(0, 500)}`)\n }\n // exponential backoff with jitter\n await sleep(2 ** attempt * 200 + Math.random() * 200)\n continue\n }\n const parsed = (await res.json()) as HttpDispatchResponseBody<TArtifact>\n for (const receipt of parsed.receipts ?? []) {\n await replayReceipt(ctx.cost, receipt)\n }\n return parsed.artifact\n } catch (err) {\n // Caller-driven abort is terminal — never retry.\n if (ctx.signal.aborted) throw err\n lastError = err\n if (attempt === maxRetries) throw err\n await sleep(2 ** attempt * 200 + Math.random() * 200)\n }\n }\n throw lastError ?? new Error('httpDispatch exhausted retries')\n }\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => {\n const t = setTimeout(resolve, ms)\n // Don't keep node process alive purely for backoff sleeps.\n if (typeof (t as { unref?: () => void }).unref === 'function')\n (t as { unref: () => void }).unref()\n })\n}\n\n/** Best-effort receipts from a non-2xx `runDispatchServer` body. Any shape\n * that isn't `{ error, receipts? }` JSON (plain-text 401/404/413 bodies,\n * a non-`runDispatchServer` peer) yields none — never itself a reason to\n * fail the request. */\nfunction parseErrorReceipts(text: string): CostReceipt[] {\n try {\n const parsed = JSON.parse(text) as { receipts?: CostReceipt[] }\n return Array.isArray(parsed.receipts) ? parsed.receipts : []\n } catch {\n return []\n }\n}\n\n/**\n * Re-enter one already-settled remote receipt through `runPaidCall` — the\n * only path `CampaignCostMeter` admits. `execute` does no new work (the\n * spend already happened on the worker); it only replays the worker's\n * outcome so the coordinator's ledger records the same receipt (a settled\n * failure included, so its `error` and cost — a failed call can still burn\n * tokens — are never dropped on the floor). Faithfully replaying a remote\n * failure still returns `succeeded: false` from `runPaidCall`: that's not\n * ours to raise. Only a `receipt`-less failure is — it means `runPaidCall`\n * refused to admit the call at all (a duplicate `callId`, an unknown-cost\n * receipt under a capped coordinator ledger, a breached cost ceiling), so\n * the remote spend could not be accounted for.\n */\nasync function replayReceipt(cost: CampaignCostMeter, receipt: CostReceipt): Promise<void> {\n const knownCostUsd = receipt.costUnknown ? undefined : receipt.costUsd\n const observed = (): CostReceiptInput => ({\n model: receipt.model,\n inputTokens: receipt.inputTokens,\n outputTokens: receipt.outputTokens,\n ...(receipt.reasoningTokens === undefined ? {} : { reasoningTokens: receipt.reasoningTokens }),\n ...(receipt.cachedTokens === undefined ? {} : { cachedTokens: receipt.cachedTokens }),\n ...(receipt.cacheWriteTokens === undefined\n ? {}\n : { cacheWriteTokens: receipt.cacheWriteTokens }),\n ...(receipt.usageUnknown ? { usageUnknown: true as const } : {}),\n ...(knownCostUsd === undefined\n ? { costUnknown: true as const }\n : { actualCostUsd: knownCostUsd }),\n })\n const result = await cost.runPaidCall({\n callId: receipt.callId,\n channel: receipt.channel,\n actor: receipt.actor,\n model: receipt.model,\n maximumCharge:\n knownCostUsd === undefined ? undefined : { externallyEnforcedMaximumUsd: knownCostUsd },\n // No `signal`: the call already happened remotely. Aborting the replay\n // would not undo the spend, only hide it from the ledger.\n execute: async () => {\n if (receipt.error) throw new Error(receipt.error)\n return null\n },\n receipt: observed,\n receiptFromError: observed,\n })\n if (!result.succeeded && !result.receipt) {\n throw result.error\n }\n}\n\n// ── Server ───────────────────────────────────────────────────────────\n\nexport interface RunDispatchServerOptions<TScenario extends Scenario, TArtifact> {\n /** The Dispatch this server exposes — what runs when a request lands. */\n dispatch: Dispatch<TScenario, TArtifact>\n /** TCP port to bind. */\n port: number\n /** Optional bind host; defaults to 0.0.0.0. */\n host?: string\n /** Required for any non-test deployment: the bearer token clients must\n * send. The substrate refuses to start without auth unless `auth: false`\n * is set explicitly (intended ONLY for closed-network/internal testing). */\n auth: string | false\n /** Path the server listens on. Default `/dispatch`. */\n path?: string\n /**\n * Per-request handler that wraps `dispatch` with whatever context the\n * worker side needs to construct a `DispatchContext` — typically the\n * trace writer, artifact writer, and cost meter. The substrate provides\n * synthetic-but-typed defaults if not supplied; production deployments\n * should wire real ones (e.g. ship traces to your OTel collector).\n */\n contextFactory?: (\n req: HttpDispatchRequestBody<TScenario>,\n signal: AbortSignal,\n ) => Promise<DispatchContext>\n /** Optional max payload size for the request body (bytes). Default 10 MB. */\n maxBodyBytes?: number\n /** Hook for observability — called on every successful or failed turn. */\n onRequest?: (event: {\n cellId: string\n durationMs: number\n success: boolean\n error?: unknown\n }) => void\n}\n\nexport interface DispatchServerHandle {\n /** The actual bound port (useful when `port: 0` requests an ephemeral port). */\n port: number\n /** Stop accepting new connections and drain existing ones. */\n close: () => Promise<void>\n}\n\n/**\n * Start an HTTP server exposing a local `Dispatch` over the wire. Pair with\n * `httpDispatch` on the driver side.\n *\n * Wire shape:\n *\n * POST /dispatch\n * Authorization: Bearer <token>\n * Body: HttpDispatchRequestBody\n * 200 OK: HttpDispatchResponseBody\n * 401: missing/invalid auth\n * 408: per-request timeout exceeded\n * 499: client aborted before completion\n * 500: dispatch threw\n *\n * The server is `node:http`-based to keep the runtime dependency surface\n * minimal — works in plain Node, sandbox, or any container.\n */\nexport async function runDispatchServer<TScenario extends Scenario, TArtifact>(\n opts: RunDispatchServerOptions<TScenario, TArtifact>,\n): Promise<DispatchServerHandle> {\n if (opts.auth === undefined) {\n throw new Error(\n \"runDispatchServer: 'auth' is required (pass a bearer-token string, or `auth: false` explicitly for a closed-network test deployment).\",\n )\n }\n const path = opts.path ?? '/dispatch'\n const maxBytes = opts.maxBodyBytes ?? 10 * 1024 * 1024\n const expectedAuth =\n typeof opts.auth === 'string' ? `Bearer ${opts.auth.replace(/^Bearer\\s+/, '')}` : null\n\n // Lazy-import node:http so the file is usable from non-Node bundlers\n // that import the client side only (e.g. an edge driver shipping\n // httpDispatch alone). Server side is opt-in by calling this function.\n const { createServer } = await import('node:http')\n\n const server = createServer(async (req, res) => {\n const start = Date.now()\n let cellId = 'unknown'\n let success = false\n let errCaught: unknown\n // Hoisted so a dispatch that throws AFTER paying for some of its work\n // still reports that spend in the error response — a partial spend is\n // still spend, and it must reach the coordinator's ledger exactly like\n // a locally-dispatched cell's failure accounting does.\n const receipts: CostReceipt[] = []\n\n try {\n if (req.method !== 'POST' || req.url?.split('?')[0] !== path) {\n res.statusCode = 404\n res.end('not found')\n return\n }\n if (expectedAuth) {\n const got = req.headers.authorization\n if (got !== expectedAuth) {\n res.statusCode = 401\n res.end('unauthorized')\n return\n }\n }\n\n // Read body up to maxBytes\n const chunks: Buffer[] = []\n let totalBytes = 0\n const aborter = new AbortController()\n // The request stream's 'close' fires when the BODY completes, so it\n // cannot signal disconnection. The response stream's 'close' fires\n // once per exchange: with `writableEnded` still false it means the\n // client went away before the dispatch answered.\n res.on('close', () => {\n if (!res.writableEnded) aborter.abort()\n })\n\n for await (const chunk of req) {\n const buf = chunk as Buffer\n totalBytes += buf.length\n if (totalBytes > maxBytes) {\n res.statusCode = 413\n res.end('payload too large')\n return\n }\n chunks.push(buf)\n }\n\n const body = JSON.parse(\n Buffer.concat(chunks).toString('utf8'),\n ) as HttpDispatchRequestBody<TScenario>\n if (typeof body.runAttemptId !== 'string' || body.runAttemptId.trim().length === 0) {\n throw new Error('runDispatchServer: request runAttemptId is required')\n }\n cellId = body.cellId\n\n const ctx: DispatchContext = opts.contextFactory\n ? await opts.contextFactory(body, aborter.signal)\n : {\n cellId: body.cellId,\n runAttemptId: body.runAttemptId,\n rep: body.rep,\n generation: body.generation,\n seed: body.seed,\n signal: aborter.signal,\n placement: body.placement,\n cycleId: body.cycleId,\n trace: NOOP_TRACE,\n artifacts: NOOP_ARTIFACTS,\n cost: NOOP_COST,\n }\n if (ctx.runAttemptId !== body.runAttemptId) {\n throw new Error('runDispatchServer: contextFactory must preserve request runAttemptId')\n }\n\n // Record every receipt this dispatch settles on ITS OWN `ctx.cost` (the\n // worker's ledger, not the coordinator's) so the response can carry\n // them back. `httpDispatch` replays each one into the coordinator's\n // ledger — see the module doc.\n const recordingCost: CampaignCostMeter = {\n async runPaidCall(input) {\n const result = await ctx.cost.runPaidCall(input)\n if (result.receipt) receipts.push(result.receipt)\n return result\n },\n }\n\n const artifact = await opts.dispatch(body.scenario, { ...ctx, cost: recordingCost })\n const responseBody: HttpDispatchResponseBody<TArtifact> = {\n artifact,\n ...(receipts.length ? { receipts } : {}),\n }\n\n res.statusCode = 200\n res.setHeader('content-type', 'application/json')\n res.end(JSON.stringify(responseBody))\n success = true\n } catch (err) {\n errCaught = err\n // Client-cancelled — they don't care about the result.\n if ((err as Error)?.name === 'AbortError') {\n res.statusCode = 499\n res.end('client aborted')\n return\n }\n res.statusCode = 500\n res.setHeader('content-type', 'application/json')\n res.end(\n JSON.stringify({\n error: err instanceof Error ? err.message : String(err),\n ...(receipts.length ? { receipts } : {}),\n }),\n )\n } finally {\n opts.onRequest?.({\n cellId,\n durationMs: Date.now() - start,\n success,\n error: errCaught,\n })\n }\n })\n\n await new Promise<void>((resolve, reject) => {\n server.once('error', reject)\n server.listen(opts.port, opts.host ?? '0.0.0.0', () => resolve())\n })\n\n const addr = server.address()\n const boundPort = typeof addr === 'object' && addr ? addr.port : opts.port\n\n return {\n port: boundPort,\n close: () =>\n new Promise<void>((resolve, reject) => {\n server.close((err) => (err ? reject(err) : resolve()))\n }),\n }\n}\n\n// ── No-op default ctx machinery (worker can replace via contextFactory) ──\n\nconst NOOP_TRACE = {\n span: () => ({\n end: () => {},\n setAttribute: () => {},\n setStatus: () => {},\n recordException: () => {},\n addEvent: () => {},\n }),\n} as unknown as DispatchContext['trace']\n\nconst NOOP_ARTIFACTS = {\n write: async () => undefined,\n read: async () => undefined,\n list: async () => [],\n} as unknown as DispatchContext['artifacts']\n\nconst NOOP_COST = {\n record: () => {},\n total: () => 0,\n} as unknown as DispatchContext['cost']\n"],"mappings":";AAqGA,SAAS,YAAY,MAA8E;CACjG,IAAI,CAAC,MAAM,OAAO,QAAQ,QAAQ,IAAI;CACtC,IAAI,OAAO,SAAS,UAAU,OAAO,QAAQ,QAAQ,IAAI;CACzD,OAAO,QAAQ,QAAQ,KAAK,CAAC;AAC/B;;;;;;;;;AAUA,SAAgB,aACd,MACgC;CAChC,IAAI,CAAC,KAAK,OAAO,CAAC,KAAK,YACrB,MAAM,IAAI,MAAM,0DAA0D;CAE5E,IAAI,KAAK,OAAO,KAAK,YACnB,MAAM,IAAI,MAAM,oEAAoE;CAEtF,MAAM,YAAY,KAAK,aAAa;CACpC,MAAM,aAAa,KAAK,WAAW;CACnC,MAAM,IAAkB,KAAK,eAAe,GAAG,SAAS,MAAM,GAAG,IAAI;CAErE,OAAO,OAAO,UAAU,QAAQ;EAC9B,MAAM,MACJ,KAAK,OAAO,KAAK,WAAY;GAAE;GAAU,W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SAAS,EAAE,SAAS,IAAI,CAAC;GACxC,CAAC,CACH;EACF,UAAU;GACR,KAAK,YAAY;IACf;IACA,YAAY,KAAK,IAAI,IAAI;IACzB;IACA,OAAO;GACT,CAAC;EACH;CACF,CAAC;CAED,MAAM,IAAI,SAAe,SAAS,WAAW;EAC3C,OAAO,KAAK,SAAS,MAAM;EAC3B,OAAO,OAAO,KAAK,MAAM,KAAK,QAAQ,iBAAiB,QAAQ,CAAC;CAClE,CAAC;CAED,MAAM,OAAO,OAAO,QAAQ;CAG5B,OAAO;EACL,MAHgB,OAAO,SAAS,YAAY,OAAO,KAAK,OAAO,KAAK;EAIpE,aACE,IAAI,SAAe,SAAS,WAAW;GACrC,OAAO,OAAO,QAAS,MAAM,OAAO,GAAG,IAAI,QAAQ,CAAE;EACvD,CAAC;CACL;AACF;AAIA,MAAM,aAAa,EACjB,aAAa;CACX,WAAW,CAAC;CACZ,oBAAoB,CAAC;CACrB,iBAAiB,CAAC;CAClB,uBAAuB,CAAC;CACxB,gBAAgB,CAAC;AACnB,GACF;AAEA,MAAM,iBAAiB;CACrB,OAAO,YAAY,KAAA;CACnB,MAAM,YAAY,KAAA;CAClB,MAAM,YAAY,CAAC;AACrB;AAEA,MAAM,YAAY;CAChB,cAAc,CAAC;CACf,aAAa;AACf"}
|
|
1
|
+
{"version":3,"file":"http.js","names":[],"sources":["../../src/adapters/http.ts"],"sourcesContent":["/**\n * # `@tangle-network/agent-eval/adapters/http` — distributed Dispatch over HTTP.\n *\n * Decouples coordinator and worker. The coordinator (running\n * `runImprovementLoop` or `runCampaign`) can live anywhere — your VPC, a dev\n * laptop, a cron VM. The workers (running the actual agent) can live anywhere else — different\n * regions, different clouds, different boxes — as long as they speak HTTP.\n *\n * Both sides:\n *\n * - **`httpDispatch({ url | resolveUrl, ... })`** — client. Returns a\n * `Dispatch` that POSTs `{ scenario, ctx }` to a worker URL and parses\n * the artifact back. AbortSignal-aware, one attempt by default,\n * bounded timeout per call. Explicit retries require worker-owned replay.\n * - **`runDispatchServer({ dispatch, port, ... })`** — server. Wraps your\n * local `Dispatch` as an HTTP endpoint. Handles auth, JSON parsing,\n * error mapping, and cancellation when the client aborts.\n *\n * # Cost receipts cross the wire too\n *\n * A worker dispatch pays for its own model calls through its own\n * `ctx.cost` (wired by `contextFactory`) — a different `CostLedger` than the\n * coordinator's. `runDispatchServer` records every receipt that dispatch\n * settles and returns them alongside the artifact; `httpDispatch` replays\n * each one into the coordinator's `ctx.cost`, the same paid-call path a\n * local dispatch uses. A remote cell's spend therefore reaches the\n * coordinator's `CostLedger` — its summary, its cost ceiling, its\n * `CampaignCellResult.costUsd` — exactly like an in-process cell's does.\n * The worker must authorize and bound spend before executing; importing its\n * receipts cannot retroactively enforce the coordinator's ceiling.\n * Paid work requires a real `contextFactory` cost meter. An empty receipt\n * list does not establish free execution: the host must require usage evidence\n * and reconcile the worker ledger when a client disconnects before delivery.\n *\n * # Topology examples\n *\n * **Single-worker:** coordinator on box A, worker on box B. Set\n * `httpDispatch({ url: 'https://box-b/dispatch' })`.\n *\n * **Multi-region:** N workers across regions. Use `httpDispatch({ resolveUrl })`\n * with a function that picks the URL per cell from `ctx.placement`. Combined\n * with `cellPlacement` on `RunCampaignOptions`, the substrate fans cells\n * across geographies in parallel.\n *\n * **Coordinator-as-a-service:** coordinator runs as a long-lived process or service\n * (holds optimization state across generations); workers are stateless\n * HTTP services that can scale horizontally per cell.\n */\n\nimport type { CampaignCostMeter, Dispatch, DispatchContext, Scenario } from '../contract'\nimport type { CostReceipt, CostReceiptInput } from '../cost-ledger'\n\n// ── Client ───────────────────────────────────────────────────────────\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars -- TArtifact is unused\n// in this options interface but kept as a parameter so callers can write\n// `HttpDispatchOptions<MyScenario, MyArtifact>` symmetrically with\n// `Dispatch<MyScenario, MyArtifact>`. Marking it unused at the position\n// where it bites.\nexport interface HttpDispatchOptions<TScenario extends Scenario, _TArtifact> {\n /** Static endpoint URL. Mutually exclusive with `resolveUrl`. */\n url?: string\n /**\n * Dynamic per-cell URL resolver. Receives the scenario + the substrate\n * placement key (from `RunCampaignOptions.cellPlacement`) and returns the\n * worker URL to invoke. Mutually exclusive with `url`.\n */\n resolveUrl?: (input: { scenario: TScenario; placement?: string; cellId: string }) => string\n /** Bearer token or static auth string set as `Authorization`. */\n auth?: string | (() => string | Promise<string>)\n /** Extra headers merged into every request. */\n headers?: Record<string, string>\n /** Per-call timeout in ms. Default 5 minutes. */\n timeoutMs?: number\n /**\n * Additional transport attempts. Default 0: a lost response does not prove\n * the worker did no work. Set a positive value only when the worker durably\n * deduplicates this runAttemptId/cellId and its external effects.\n * 4xx (except 408/429), decoding and receipt-settlement failures are terminal.\n */\n retries?: number\n /** Optional fetch override (auth wrappers, custom agent, mocks). */\n fetchImpl?: typeof fetch\n}\n\nexport interface HttpDispatchRequestBody<TScenario extends Scenario> {\n scenario: TScenario\n cellId: string\n runAttemptId: string\n rep: number\n generation?: number\n seed: number\n placement?: string\n cycleId?: string\n}\n\nexport interface HttpDispatchResponseBody<TArtifact> {\n artifact: TArtifact\n /**\n * Every paid-call receipt the worker's `ctx.cost` settled while producing\n * this artifact, in settlement order. Absent or empty when the worker\n * recorded no paid calls (no `contextFactory`, or a dispatch that pays\n * through some other channel entirely). `httpDispatch` replays each one\n * into the coordinator's own `ctx.cost`.\n */\n receipts?: CostReceipt[]\n}\n\nfunction resolveAuth(auth: HttpDispatchOptions<Scenario, unknown>['auth']): Promise<string | null> {\n if (!auth) return Promise.resolve(null)\n if (typeof auth === 'string') return Promise.resolve(auth)\n return Promise.resolve(auth())\n}\n\n/**\n * Wrap a remote HTTP endpoint as a `Dispatch`. The remote side should run\n * `runDispatchServer` (or any service that speaks the same wire shape).\n *\n * Cancellation: the substrate's per-cell `AbortSignal` is forwarded; the\n * server's `runDispatchServer` translates the resulting `AbortError` into\n * a 499 (client-closed) so the client doesn't retry. The server is a transport,\n * not a durable deduplication owner; its default Dispatch may have side effects.\n */\nexport function httpDispatch<TScenario extends Scenario, TArtifact>(\n opts: HttpDispatchOptions<TScenario, TArtifact>,\n): Dispatch<TScenario, TArtifact> {\n if (!opts.url && !opts.resolveUrl) {\n throw new Error('httpDispatch: pass exactly one of `url` or `resolveUrl`.')\n }\n if (opts.url && opts.resolveUrl) {\n throw new Error('httpDispatch: pass exactly one of `url` or `resolveUrl`, not both.')\n }\n const timeoutMs = opts.timeoutMs ?? 5 * 60 * 1000\n const maxRetries = opts.retries ?? 0\n if (!Number.isSafeInteger(maxRetries) || maxRetries < 0)\n throw new Error('httpDispatch: retries must be a non-negative safe integer.')\n const f: typeof fetch = opts.fetchImpl ?? ((...args) => fetch(...args))\n\n return async (scenario, ctx) => {\n ctx.signal.throwIfAborted()\n const url =\n opts.url ?? opts.resolveUrl!({ scenario, placement: ctx.placement, cellId: ctx.cellId })\n const body: HttpDispatchRequestBody<TScenario> = {\n scenario,\n cellId: ctx.cellId,\n runAttemptId: ctx.runAttemptId,\n rep: ctx.rep,\n generation: ctx.generation,\n seed: ctx.seed,\n placement: ctx.placement,\n cycleId: ctx.cycleId,\n }\n\n const encodedBody = JSON.stringify(body)\n const authValue = await resolveAuth(opts.auth)\n for (let attempt = 0; ; attempt++) {\n ctx.signal.throwIfAborted()\n const combinedSignal = AbortSignal.any([ctx.signal, AbortSignal.timeout(timeoutMs)])\n let res: Response\n // Only a fetch failure can enter this catch. Parsing, receipt settlement\n // and deliberate HTTP refusals must never repeat remote execution.\n try {\n res = await f(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n ...(authValue\n ? {\n Authorization: authValue.startsWith('Bearer ')\n ? authValue\n : `Bearer ${authValue}`,\n }\n : {}),\n ...opts.headers,\n },\n body: encodedBody,\n signal: combinedSignal,\n })\n } catch (err) {\n if (ctx.signal.aborted || attempt >= maxRetries) throw err\n await sleep(2 ** attempt * 200 + Math.random() * 200, ctx.signal)\n continue\n }\n\n if (res.ok) {\n const parsed = (await res.json()) as HttpDispatchResponseBody<TArtifact>\n for (const receipt of parsed?.receipts ?? []) await replayReceipt(ctx.cost, receipt)\n if (!parsed || typeof parsed !== 'object' || !Object.hasOwn(parsed, 'artifact'))\n throw new Error('httpDispatch: response is missing its artifact.')\n return parsed.artifact\n }\n\n const text = await res.text()\n // Partial spend is still spend. Account for it before surfacing the\n // failure, outside the transport retry catch.\n const receipts = parseErrorReceipts(text)\n for (const receipt of receipts) await replayReceipt(ctx.cost, receipt)\n const retryable = res.status >= 500 || res.status === 408 || res.status === 429\n if (!retryable || receipts.length > 0 || attempt >= maxRetries)\n throw new Error(`httpDispatch ${url} failed (${res.status}): ${text.slice(0, 500)}`)\n await sleep(2 ** attempt * 200 + Math.random() * 200, ctx.signal)\n }\n }\n}\n\nfunction sleep(ms: number, signal: AbortSignal): Promise<void> {\n signal.throwIfAborted()\n return new Promise((resolve, reject) => {\n const onAbort = () => {\n clearTimeout(timer)\n reject(signal.reason)\n }\n const timer = setTimeout(() => {\n signal.removeEventListener('abort', onAbort)\n resolve()\n }, ms)\n signal.addEventListener('abort', onAbort, { once: true })\n })\n}\n\n/** Best-effort receipts from a non-2xx `runDispatchServer` body. Any shape\n * that isn't `{ error, receipts? }` JSON (plain-text 401/404/413 bodies,\n * a non-`runDispatchServer` peer) yields none — never itself a reason to\n * fail the request. */\nfunction parseErrorReceipts(text: string): CostReceipt[] {\n try {\n const parsed = JSON.parse(text) as { receipts?: CostReceipt[] }\n return Array.isArray(parsed.receipts) ? parsed.receipts : []\n } catch {\n return []\n }\n}\n\n/**\n * Re-enter one already-settled remote receipt through `runPaidCall` — the\n * only path `CampaignCostMeter` admits. `execute` does no new work (the\n * spend already happened on the worker); it only replays the worker's\n * outcome so the coordinator's ledger records the same receipt (a settled\n * failure included, so its `error` and cost — a failed call can still burn\n * tokens — are never dropped on the floor). Faithfully replaying a remote\n * failure still returns `succeeded: false` from `runPaidCall`: that's not\n * ours to raise. Only a `receipt`-less failure is — it means `runPaidCall`\n * refused to admit the call at all (a duplicate `callId`, an unknown-cost\n * receipt under a capped coordinator ledger, a breached cost ceiling), so\n * the remote spend could not be accounted for.\n */\nasync function replayReceipt(cost: CampaignCostMeter, receipt: CostReceipt): Promise<void> {\n const knownCostUsd = receipt.costUnknown ? undefined : receipt.costUsd\n const observed = (): CostReceiptInput => ({\n model: receipt.model,\n inputTokens: receipt.inputTokens,\n outputTokens: receipt.outputTokens,\n ...(receipt.reasoningTokens === undefined ? {} : { reasoningTokens: receipt.reasoningTokens }),\n ...(receipt.cachedTokens === undefined ? {} : { cachedTokens: receipt.cachedTokens }),\n ...(receipt.cacheWriteTokens === undefined\n ? {}\n : { cacheWriteTokens: receipt.cacheWriteTokens }),\n ...(receipt.usageUnknown ? { usageUnknown: true as const } : {}),\n ...(knownCostUsd === undefined\n ? { costUnknown: true as const }\n : { actualCostUsd: knownCostUsd }),\n })\n const result = await cost.runPaidCall({\n callId: receipt.callId,\n channel: receipt.channel,\n actor: receipt.actor,\n model: receipt.model,\n maximumCharge:\n knownCostUsd === undefined ? undefined : { externallyEnforcedMaximumUsd: knownCostUsd },\n // No `signal`: the call already happened remotely. Aborting the replay\n // would not undo the spend, only hide it from the ledger.\n execute: async () => {\n if (receipt.error) throw new Error(receipt.error)\n return null\n },\n receipt: observed,\n receiptFromError: observed,\n })\n if (!result.succeeded && !result.receipt) {\n throw result.error\n }\n}\n\n// ── Server ───────────────────────────────────────────────────────────\n\nexport interface RunDispatchServerOptions<TScenario extends Scenario, TArtifact> {\n /** The Dispatch this server exposes — what runs when a request lands. */\n dispatch: Dispatch<TScenario, TArtifact>\n /** TCP port to bind. */\n port: number\n /** Optional bind host; defaults to 0.0.0.0. */\n host?: string\n /** Required for any non-test deployment: the bearer token clients must\n * send. The substrate refuses to start without auth unless `auth: false`\n * is set explicitly (intended ONLY for closed-network/internal testing). */\n auth: string | false\n /** Path the server listens on. Default `/dispatch`. */\n path?: string\n /**\n * Per-request handler that wraps `dispatch` with whatever context the\n * worker side needs to construct a `DispatchContext` — typically the\n * trace writer, artifact writer, and cost meter. The substrate provides\n * synthetic-but-typed defaults if not supplied; production deployments\n * should wire real ones (e.g. ship traces to your OTel collector).\n */\n contextFactory?: (\n req: HttpDispatchRequestBody<TScenario>,\n signal: AbortSignal,\n ) => Promise<DispatchContext>\n /** Optional max payload size for the request body (bytes). Default 10 MB. */\n maxBodyBytes?: number\n /** Hook for observability — called on every successful or failed turn. */\n onRequest?: (event: {\n cellId: string\n durationMs: number\n success: boolean\n error?: unknown\n }) => void\n}\n\nexport interface DispatchServerHandle {\n /** The actual bound port (useful when `port: 0` requests an ephemeral port). */\n port: number\n /** Stop accepting new connections and drain existing ones. */\n close: () => Promise<void>\n}\n\n/**\n * Start an HTTP server exposing a local `Dispatch` over the wire. Pair with\n * `httpDispatch` on the driver side.\n *\n * Wire shape:\n *\n * POST /dispatch\n * Authorization: Bearer <token>\n * Body: HttpDispatchRequestBody\n * 200 OK: HttpDispatchResponseBody\n * 401: missing/invalid auth\n * 408: per-request timeout exceeded\n * 499: client aborted before completion\n * 500: dispatch threw\n *\n * The server is `node:http`-based to keep the runtime dependency surface\n * minimal — works in plain Node, sandbox, or any container.\n */\nexport async function runDispatchServer<TScenario extends Scenario, TArtifact>(\n opts: RunDispatchServerOptions<TScenario, TArtifact>,\n): Promise<DispatchServerHandle> {\n if (opts.auth === undefined) {\n throw new Error(\n \"runDispatchServer: 'auth' is required (pass a bearer-token string, or `auth: false` explicitly for a closed-network test deployment).\",\n )\n }\n const path = opts.path ?? '/dispatch'\n const maxBytes = opts.maxBodyBytes ?? 10 * 1024 * 1024\n const expectedAuth =\n typeof opts.auth === 'string' ? `Bearer ${opts.auth.replace(/^Bearer\\s+/, '')}` : null\n\n // Lazy-import node:http so the file is usable from non-Node bundlers\n // that import the client side only (e.g. an edge driver shipping\n // httpDispatch alone). Server side is opt-in by calling this function.\n const { createServer } = await import('node:http')\n\n const server = createServer(async (req, res) => {\n const start = Date.now()\n let cellId = 'unknown'\n let success = false\n let errCaught: unknown\n // Hoisted so a dispatch that throws AFTER paying for some of its work\n // still reports that spend in the error response — a partial spend is\n // still spend, and it must reach the coordinator's ledger exactly like\n // a locally-dispatched cell's failure accounting does.\n const receipts: CostReceipt[] = []\n\n try {\n if (req.method !== 'POST' || req.url?.split('?')[0] !== path) {\n res.statusCode = 404\n res.end('not found')\n return\n }\n if (expectedAuth) {\n const got = req.headers.authorization\n if (got !== expectedAuth) {\n res.statusCode = 401\n res.end('unauthorized')\n return\n }\n }\n\n // Read body up to maxBytes\n const chunks: Buffer[] = []\n let totalBytes = 0\n const aborter = new AbortController()\n // The request stream's 'close' fires when the BODY completes, so it\n // cannot signal disconnection. The response stream's 'close' fires\n // once per exchange: with `writableEnded` still false it means the\n // client went away before the dispatch answered.\n res.on('close', () => {\n if (!res.writableEnded) aborter.abort()\n })\n\n for await (const chunk of req) {\n const buf = chunk as Buffer\n totalBytes += buf.length\n if (totalBytes > maxBytes) {\n res.statusCode = 413\n res.end('payload too large')\n return\n }\n chunks.push(buf)\n }\n\n const body = JSON.parse(\n Buffer.concat(chunks).toString('utf8'),\n ) as HttpDispatchRequestBody<TScenario>\n if (typeof body.runAttemptId !== 'string' || body.runAttemptId.trim().length === 0) {\n throw new Error('runDispatchServer: request runAttemptId is required')\n }\n cellId = body.cellId\n\n const ctx: DispatchContext = opts.contextFactory\n ? await opts.contextFactory(body, aborter.signal)\n : {\n cellId: body.cellId,\n runAttemptId: body.runAttemptId,\n rep: body.rep,\n generation: body.generation,\n seed: body.seed,\n signal: aborter.signal,\n placement: body.placement,\n cycleId: body.cycleId,\n trace: NOOP_TRACE,\n artifacts: NOOP_ARTIFACTS,\n cost: UNCONFIGURED_COST,\n }\n if (ctx.runAttemptId !== body.runAttemptId) {\n throw new Error('runDispatchServer: contextFactory must preserve request runAttemptId')\n }\n\n // Record every receipt this dispatch settles on ITS OWN `ctx.cost` (the\n // worker's ledger, not the coordinator's) so the response can carry\n // them back. `httpDispatch` replays each one into the coordinator's\n // ledger — see the module doc.\n const recordingCost: CampaignCostMeter = {\n async runPaidCall(input) {\n const result = await ctx.cost.runPaidCall(input)\n if (result.receipt) receipts.push(result.receipt)\n return result\n },\n }\n\n const artifact = await opts.dispatch(body.scenario, { ...ctx, cost: recordingCost })\n const responseBody: HttpDispatchResponseBody<TArtifact> = {\n artifact,\n ...(receipts.length ? { receipts } : {}),\n }\n\n res.statusCode = 200\n res.setHeader('content-type', 'application/json')\n res.end(JSON.stringify(responseBody))\n success = true\n } catch (err) {\n errCaught = err\n // Cancellation does not erase work that was already charged. A client\n // that can still read this response receives the same complete receipts.\n res.statusCode = (err as Error)?.name === 'AbortError' ? 499 : 500\n res.setHeader('content-type', 'application/json')\n res.end(\n JSON.stringify({\n error: err instanceof Error ? err.message : String(err),\n ...(receipts.length ? { receipts } : {}),\n }),\n )\n } finally {\n opts.onRequest?.({\n cellId,\n durationMs: Date.now() - start,\n success,\n error: errCaught,\n })\n }\n })\n\n await new Promise<void>((resolve, reject) => {\n server.once('error', reject)\n server.listen(opts.port, opts.host ?? '0.0.0.0', () => resolve())\n })\n\n const addr = server.address()\n const boundPort = typeof addr === 'object' && addr ? addr.port : opts.port\n\n return {\n port: boundPort,\n close: () =>\n new Promise<void>((resolve, reject) => {\n server.close((err) => (err ? reject(err) : resolve()))\n }),\n }\n}\n\n// ── Defaults for deterministic work; paid work needs a real context ──\n\nconst NOOP_TRACE = {\n span: () => ({\n end: () => {},\n setAttribute: () => {},\n setStatus: () => {},\n recordException: () => {},\n addEvent: () => {},\n }),\n} as unknown as DispatchContext['trace']\n\nconst NOOP_ARTIFACTS = {\n write: async () => undefined,\n read: async () => undefined,\n list: async () => [],\n} as unknown as DispatchContext['artifacts']\n\nconst UNCONFIGURED_COST: CampaignCostMeter = {\n async runPaidCall() {\n throw new Error('runDispatchServer: paid work requires a contextFactory cost meter.')\n },\n}\n"],"mappings":";AA4GA,SAAS,YAAY,MAA8E;CACjG,IAAI,CAAC,MAAM,OAAO,QAAQ,QAAQ,IAAI;CACtC,IAAI,OAAO,SAAS,UAAU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CACL;AACF;AAIA,MAAM,aAAa,EACjB,aAAa;CACX,WAAW,CAAC;CACZ,oBAAoB,CAAC;CACrB,iBAAiB,CAAC;CAClB,uBAAuB,CAAC;CACxB,gBAAgB,CAAC;AACnB,GACF;AAEA,MAAM,iBAAiB;CACrB,OAAO,YAAY,KAAA;CACnB,MAAM,YAAY,KAAA;CAClB,MAAM,YAAY,CAAC;AACrB;AAEA,MAAM,oBAAuC,EAC3C,MAAM,cAAc;CAClB,MAAM,IAAI,MAAM,oEAAoE;AACtF,EACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as CustomTokenPricing, g as CostReceiptInput } from "./cost-ledger-DbQdN3nO.js";
|
|
2
|
-
import { O as TraceAnalysisStore, c as AnalystRunInputs, f as AnalystUsageReceipt, i as AnalystFinding, p as EvidenceRef } from "./types-
|
|
3
|
-
import { C as ChatResponse, S as ChatRequest } from "./types-
|
|
4
|
-
import { c as RegistryRunOpts, n as AnalystRegistry } from "./registry-
|
|
2
|
+
import { O as TraceAnalysisStore, c as AnalystRunInputs, f as AnalystUsageReceipt, i as AnalystFinding, p as EvidenceRef } from "./types-6VEehmEg.js";
|
|
3
|
+
import { C as ChatResponse, S as ChatRequest } from "./types-DLxe96rp.js";
|
|
4
|
+
import { c as RegistryRunOpts, n as AnalystRegistry } from "./registry-CT-hMSkR.js";
|
|
5
5
|
import { AgentProfile, AgentProfile as AgentProfile$1, HarnessType, HarnessType as HarnessType$1 } from "@tangle-network/agent-interface";
|
|
6
6
|
//#region src/campaign/external-optimizer-contracts.d.ts
|
|
7
7
|
interface ExternalOptimizerProcessLimits {
|
|
@@ -485,4 +485,4 @@ declare function agentProfileId(profile: AgentProfile): string;
|
|
|
485
485
|
declare function agentProfileHash(profile: AgentProfile): string;
|
|
486
486
|
//#endregion
|
|
487
487
|
export { runAnalystBenchmark as A, ExternalOptimizerModelBudget as B, AnalystEvidenceResolutionError as C, AnalystLatencyDistribution as D, AnalystIssueExpectation as E, ExternalOptimizerCallbackLimits as F, ExternalOptimizerProcessLimits as G, ExternalOptimizerModelCallRequest as H, ExternalOptimizerChatRequest as I, ExternalOptimizerWireCounts as J, ExternalOptimizerResumeMode as K, ExternalOptimizerEndpointFormat as L, scoreAnalystFindings as M, DEFAULT_EXTERNAL_OPTIMIZER_CALLBACK_LIMITS as N, RunAnalystBenchmarkOptions as O, DEFAULT_EXTERNAL_OPTIMIZER_PROCESS_LIMITS as P, resolveExternalOptimizerProcessLimits as Q, ExternalOptimizerEvaluationObservation as R, AnalystEvidenceResolution as S, AnalystFindingScore as T, ExternalOptimizerModelCallResult as U, ExternalOptimizerModelCall as V, ExternalOptimizerModelExecutionObservation as W, ExternalTextEvaluationRequest as X, ExternalTextCandidate as Y, resolveExternalOptimizerCallbackLimits as Z, AnalystBenchmarkProvenance as _, ProfileAxisSpec as a, AnalystBenchmarkSummary as b, expandProfileAxes as c, AnalystBenchmarkDatasetRef as d, AnalystBenchmarkDescriptor as f, AnalystBenchmarkOutput as g, AnalystBenchmarkObservation as h, HarnessType$1 as i, traceStoreEvidenceResolver as j, registryBenchmarkRunner as k, harnessAxisOf as l, AnalystBenchmarkLabelState as m, CODING_HARNESSES as n, agentProfileHash as o, AnalystBenchmarkError as p, ExternalOptimizerRunnerCommand as q, HARNESS_NATIVE_MODEL as r, agentProfileId as s, AgentProfile$1 as t, AnalystBenchmarkCase as u, AnalystBenchmarkResult as v, AnalystEvidenceResolver as w, AnalystEvidenceExpectation as x, AnalystBenchmarkRunner as y, ExternalOptimizerEvaluationRefusalReason as z };
|
|
488
|
-
//# sourceMappingURL=agent-profile-
|
|
488
|
+
//# sourceMappingURL=agent-profile-EpO0HURy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-profile-
|
|
1
|
+
{"version":3,"file":"agent-profile-EpO0HURy.d.ts","names":["_$___cost_ledger0.CostReceiptInput"],"sources":["../src/campaign/external-optimizer-contracts.ts","../src/analyst/benchmark-scoring.ts","../src/analyst/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;EACf;EACA;EACA;EACA;EACA;EACA,mBAAmB;EACnB;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;EACA;;UAGe;EACf,UAAU;EACV;EACA;;UAGe;EACf;EACA;EACA,oBAAoB;EACpB,QAAQ;;EAER;;KAGU,wBAAwB,qBAAqB;EACvD;EACA,WAAW;EACX,UAAU;EACV,SAAS;gBACK;;;;;iBAMA,2BAA2B,QACzC,WAAW,OAAO,WAAW,qBAC5B,wBAAwB;UAoBV;EACf,mBAAmB;EACnB,QAAQ;EACR,WAAW;;;;;EAKX;;EAEA,QAAQ;;UAGO;EACf;EACA;EACA;EACA;;UAGe,uBAAuB;EACtC;EACA,QACE,OAAO,QACP;IAAW;IAAgB;IAAoB,SAAS;MACvD,yBAAyB,QAAQ;;UAGrB;EACf;EACA;EACA;EACA,YAAY;EACZ;EACA;EACA;EACA;EACA,mBAAmB;EACnB,OAAO;EACP,qBAAqB;EACrB;EACA,eAAe;EACf,QAAQ;EACR,iBAAiB;EACjB,QAAQ;;UAGO;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA,UAAU;EACV;EACA,cAAc;EACd,WAAW;;UAGI,mCAAmC;EAClD;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,YAAY;EACZ,cAAc;EACd,WAAW;;UAGI,2BAA2B;EAC1C,gBAAgB,qBAAqB;EACrC,kBAAkB,uBAAuB;EACzC;EACA;EACA;EACA,kBAAkB,wBAAwB;EAC1C,YAAY;;EAEZ,+BAA+B;EAC/B,iBAAiB,aAAa,uCAAuC;EACrE,SAAS;;iBAGW,oBAAoB,QACxC,SAAS,2BAA2B,UACnC,QAAQ;iBAyDK,wBAAwB;EACtC;EACA,UAAU;EACV,aAAa,KAAK;;EAElB;IACE,uBAAuB;;;;;;;;;;cCpUd,2BAA2B;UAOvB;;;EAGf,MAAM;;EAEN,qBAAqB;;;EAGrB;;;;;;EAMA;;;;;;;cAQW;;;;;;;;;;;;;;;;;;;iBAoBG,kBAAkB,MAAM,kBAAkB;;;;;;;;iBAwD1C,cACd,SAAS,KAAK;EACX,SAAS;EAAa;;;;;;;;;iBAiBX,eAAe,SAAS;;;;;;;;;;;iBAmDxB,iBAAiB,SAAS"}
|
package/dist/analyst/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { b as CustomTokenPricing, c as CostLedgerHandle } from "../cost-ledger-DbQdN3nO.js";
|
|
2
|
-
import { B as TraceAnalystSpan, O as TraceAnalysisStore, _ as ProposalFinding, a as AnalystInputKind, b as makeFinding, c as AnalystRunInputs, d as AnalystSeverity, f as AnalystUsageReceipt, g as ExecutionProbeRequest, h as ExecutionProbeOutcome, i as AnalystFinding, l as AnalystRunResult, m as ExecutionProbe, n as AnalystContext, o as AnalystRequirements, p as EvidenceRef, r as AnalystCost, s as AnalystRunEvent, t as Analyst, u as AnalystRunSummary, v as ProposalFindingOrigin, x as makeProposalFinding, y as computeFindingId } from "../types-
|
|
3
|
-
import { A as createChatClient, C as ChatResponse, D as MockTransportOpts, E as CustomTransportOpts, O as OpenAiCompatibleTransportOpts, S as ChatRequest, T as CreateChatClientOpts, b as ChatCallOpts, k as SandboxSdkTransportOpts, w as ChatTransport, x as ChatClient } from "../types-
|
|
4
|
-
import { A as runAnalystBenchmark, C as AnalystEvidenceResolutionError, D as AnalystLatencyDistribution, E as AnalystIssueExpectation, M as scoreAnalystFindings, O as RunAnalystBenchmarkOptions, S as AnalystEvidenceResolution, T as AnalystFindingScore, V as ExternalOptimizerModelCall, W as ExternalOptimizerModelExecutionObservation, _ as AnalystBenchmarkProvenance, b as AnalystBenchmarkSummary, d as AnalystBenchmarkDatasetRef, f as AnalystBenchmarkDescriptor, g as AnalystBenchmarkOutput, h as AnalystBenchmarkObservation, j as traceStoreEvidenceResolver, k as registryBenchmarkRunner, m as AnalystBenchmarkLabelState, p as AnalystBenchmarkError, q as ExternalOptimizerRunnerCommand, t as AgentProfile, u as AnalystBenchmarkCase, v as AnalystBenchmarkResult, w as AnalystEvidenceResolver, x as AnalystEvidenceExpectation, y as AnalystBenchmarkRunner } from "../agent-profile-
|
|
5
|
-
import { a as ExactAnalystRunPolicySnapshot, c as ExactAnalystSnapshot, d as ExactExecutionComponentSnapshot, i as ExactAnalystRunEvent, l as ExactCapableAnalyst, n as ExactAnalystExecutionPlanSnapshot, o as ExactAnalystRunResult, r as ExactAnalystRunCompletion, s as ExactAnalystRunSummary, t as ExactAnalystBudgetSnapshot, u as ExactExecutionComponentIdentity } from "../exact-types-
|
|
6
|
-
import { a as ExactAnalystBudgetPolicy, c as RegistryRunOpts, i as BudgetPolicy, n as AnalystRegistry, o as ExactAnalystRunExecutionError, r as AnalystRegistryOptions, s as ExactRegistryRunOpts, t as AnalystHooks } from "../registry-
|
|
7
|
-
import { a as createTraceAnalyst, c as BehavioralAnalystOptions, i as TraceAnalystDefinition, l as behavioralAnalyst, n as buildDefaultAnalystRegistry, o as renderPriorFindings, r as CreateTraceAnalystOptions, s as runTraceAnalyst, t as DefaultAnalystRegistryOptions, u as deriveEfficiencyFindings } from "../default-registry-
|
|
8
|
-
import { a as TraceAnalystLimits, c as RawAnalystEvidence, d as evidenceRefsFromRawFinding, f as parseRawFinding, i as TraceAnalysisEngineResult, l as RawAnalystFinding, n as TraceAnalysisEngine, o as resolveTraceAnalystLimits, r as TraceAnalysisEngineRequest, s as RAW_FINDING_SCHEMA_PROMPT, t as DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS, u as RawAnalystFindingSchema } from "../engine-
|
|
9
|
-
import { n as buildTraceToolsForGroup, t as TraceToolGroupName } from "../tool-groups-
|
|
10
|
-
import { A as SemanticConceptJudgeInput, C as DspyRlmTraceEngineOptions, E as createChatTraceEngine, S as renderFindingSubject, T as ChatTraceEngineOptions, _ as FindingSubject, a as FAILURE_MODE_KIND_SPEC, b as findingSubjectGrammarPromptFor, c as emitControlIntegrityFindings, d as FindingsStore, f as PersistedFinding, g as FINDING_SUBJECT_SYNTAX, h as FINDING_SUBJECT_KINDS, i as IMPROVEMENT_KIND_SPEC, j as SemanticConceptJudgeOptions, l as DiffPolicy, m as diffFindings, n as KNOWLEDGE_POISONING_KIND_SPEC, o as CONTROL_INTEGRITY_ANALYST, p as defaultIsMaterial, r as KNOWLEDGE_GAP_KIND_SPEC, s as ControlIntegrityAnalyst, t as DEFAULT_TRACE_ANALYST_KINDS, u as FindingsDiff, v as FindingSubjectKind, w as createDspyRlmTraceEngine, x as parseFindingSubject, y as KIND_EXPECTED_SUBJECTS } from "../index-
|
|
11
|
-
import { A as ReplyRowDecoded, C as primeProtocolSha256, D as DecodedReply, E as runPrimeExchange, M as decodeReplyRows, O as ReplyContract, S as normalizePrimeUsage, T as projectPrimeTrajectory, _ as buildPrimePrompt, a as PrimeProjectionOutcome, b as extractPrimeJsonObject, c as PrimeProtocolIdentity, d as PrimeRepairPromptSpec, f as PrimeRepairState, g as analystUsageReceiptFromPrimeUsage, h as PrimeTurnRecord, i as PrimeProjectionDelivery, j as ReplyRowRejection, k as ReplyEnvelope, l as PrimeRawUsage, m as PrimeRowDecoded, n as PrimeExchangeOutcome, o as PrimeProjectionSource, p as PrimeReplyContract, r as PrimeFailure, s as PrimePromptSpec, t as PrimeExchangeOptions, u as PrimeRejectedRow, v as buildPrimeRepairPrompt, w as primeReplyDefect, x as mergePrimeRawUsage, y as emptyPrimeRawUsage } from "../prime-protocol-
|
|
2
|
+
import { B as TraceAnalystSpan, O as TraceAnalysisStore, _ as ProposalFinding, a as AnalystInputKind, b as makeFinding, c as AnalystRunInputs, d as AnalystSeverity, f as AnalystUsageReceipt, g as ExecutionProbeRequest, h as ExecutionProbeOutcome, i as AnalystFinding, l as AnalystRunResult, m as ExecutionProbe, n as AnalystContext, o as AnalystRequirements, p as EvidenceRef, r as AnalystCost, s as AnalystRunEvent, t as Analyst, u as AnalystRunSummary, v as ProposalFindingOrigin, x as makeProposalFinding, y as computeFindingId } from "../types-6VEehmEg.js";
|
|
3
|
+
import { A as createChatClient, C as ChatResponse, D as MockTransportOpts, E as CustomTransportOpts, O as OpenAiCompatibleTransportOpts, S as ChatRequest, T as CreateChatClientOpts, b as ChatCallOpts, k as SandboxSdkTransportOpts, w as ChatTransport, x as ChatClient } from "../types-DLxe96rp.js";
|
|
4
|
+
import { A as runAnalystBenchmark, C as AnalystEvidenceResolutionError, D as AnalystLatencyDistribution, E as AnalystIssueExpectation, M as scoreAnalystFindings, O as RunAnalystBenchmarkOptions, S as AnalystEvidenceResolution, T as AnalystFindingScore, V as ExternalOptimizerModelCall, W as ExternalOptimizerModelExecutionObservation, _ as AnalystBenchmarkProvenance, b as AnalystBenchmarkSummary, d as AnalystBenchmarkDatasetRef, f as AnalystBenchmarkDescriptor, g as AnalystBenchmarkOutput, h as AnalystBenchmarkObservation, j as traceStoreEvidenceResolver, k as registryBenchmarkRunner, m as AnalystBenchmarkLabelState, p as AnalystBenchmarkError, q as ExternalOptimizerRunnerCommand, t as AgentProfile, u as AnalystBenchmarkCase, v as AnalystBenchmarkResult, w as AnalystEvidenceResolver, x as AnalystEvidenceExpectation, y as AnalystBenchmarkRunner } from "../agent-profile-EpO0HURy.js";
|
|
5
|
+
import { a as ExactAnalystRunPolicySnapshot, c as ExactAnalystSnapshot, d as ExactExecutionComponentSnapshot, i as ExactAnalystRunEvent, l as ExactCapableAnalyst, n as ExactAnalystExecutionPlanSnapshot, o as ExactAnalystRunResult, r as ExactAnalystRunCompletion, s as ExactAnalystRunSummary, t as ExactAnalystBudgetSnapshot, u as ExactExecutionComponentIdentity } from "../exact-types-BBMMYk3g.js";
|
|
6
|
+
import { a as ExactAnalystBudgetPolicy, c as RegistryRunOpts, i as BudgetPolicy, n as AnalystRegistry, o as ExactAnalystRunExecutionError, r as AnalystRegistryOptions, s as ExactRegistryRunOpts, t as AnalystHooks } from "../registry-CT-hMSkR.js";
|
|
7
|
+
import { a as createTraceAnalyst, c as BehavioralAnalystOptions, i as TraceAnalystDefinition, l as behavioralAnalyst, n as buildDefaultAnalystRegistry, o as renderPriorFindings, r as CreateTraceAnalystOptions, s as runTraceAnalyst, t as DefaultAnalystRegistryOptions, u as deriveEfficiencyFindings } from "../default-registry-BHEfZHQd.js";
|
|
8
|
+
import { a as TraceAnalystLimits, c as RawAnalystEvidence, d as evidenceRefsFromRawFinding, f as parseRawFinding, i as TraceAnalysisEngineResult, l as RawAnalystFinding, n as TraceAnalysisEngine, o as resolveTraceAnalystLimits, r as TraceAnalysisEngineRequest, s as RAW_FINDING_SCHEMA_PROMPT, t as DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS, u as RawAnalystFindingSchema } from "../engine-F_PvwesR.js";
|
|
9
|
+
import { n as buildTraceToolsForGroup, t as TraceToolGroupName } from "../tool-groups-B7_jUPHp.js";
|
|
10
|
+
import { A as SemanticConceptJudgeInput, C as DspyRlmTraceEngineOptions, E as createChatTraceEngine, S as renderFindingSubject, T as ChatTraceEngineOptions, _ as FindingSubject, a as FAILURE_MODE_KIND_SPEC, b as findingSubjectGrammarPromptFor, c as emitControlIntegrityFindings, d as FindingsStore, f as PersistedFinding, g as FINDING_SUBJECT_SYNTAX, h as FINDING_SUBJECT_KINDS, i as IMPROVEMENT_KIND_SPEC, j as SemanticConceptJudgeOptions, l as DiffPolicy, m as diffFindings, n as KNOWLEDGE_POISONING_KIND_SPEC, o as CONTROL_INTEGRITY_ANALYST, p as defaultIsMaterial, r as KNOWLEDGE_GAP_KIND_SPEC, s as ControlIntegrityAnalyst, t as DEFAULT_TRACE_ANALYST_KINDS, u as FindingsDiff, v as FindingSubjectKind, w as createDspyRlmTraceEngine, x as parseFindingSubject, y as KIND_EXPECTED_SUBJECTS } from "../index-C9l_-23M.js";
|
|
11
|
+
import { A as ReplyRowDecoded, C as primeProtocolSha256, D as DecodedReply, E as runPrimeExchange, M as decodeReplyRows, O as ReplyContract, S as normalizePrimeUsage, T as projectPrimeTrajectory, _ as buildPrimePrompt, a as PrimeProjectionOutcome, b as extractPrimeJsonObject, c as PrimeProtocolIdentity, d as PrimeRepairPromptSpec, f as PrimeRepairState, g as analystUsageReceiptFromPrimeUsage, h as PrimeTurnRecord, i as PrimeProjectionDelivery, j as ReplyRowRejection, k as ReplyEnvelope, l as PrimeRawUsage, m as PrimeRowDecoded, n as PrimeExchangeOutcome, o as PrimeProjectionSource, p as PrimeReplyContract, r as PrimeFailure, s as PrimePromptSpec, t as PrimeExchangeOptions, u as PrimeRejectedRow, v as buildPrimeRepairPrompt, w as primeReplyDefect, x as mergePrimeRawUsage, y as emptyPrimeRawUsage } from "../prime-protocol-IoN4Qb6c.js";
|
|
12
12
|
import { i as nodeHttpPrimeBridgeTransport, n as PrimeBridgeTransportRequest, r as PrimeBridgeTransportResult, t as PrimeBridgeTransport } from "../prime-bridge-transport-6feEglLf.js";
|
|
13
|
-
import { a as askTraceQuestions, i as VerifiedTraceFinding, n as TraceQuestionOutcome, o as citedSpansOnly, r as TraceQuestionSpec, t as AskTraceQuestionsOptions } from "../trace-questions
|
|
13
|
+
import { a as askTraceQuestions, i as VerifiedTraceFinding, n as TraceQuestionOutcome, o as citedSpansOnly, r as TraceQuestionSpec, t as AskTraceQuestionsOptions } from "../trace-questions-Dd3AMf-U.js";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
//#region src/analyst/adapters.d.ts
|
|
16
16
|
interface SemanticConceptJudgeAdapterOpts {
|
|
@@ -1188,7 +1188,7 @@ export declare const ANALYST_BENCHMARK_DEPENDENCY_LOCK_SHA256 = "e57c71c31ecb3ec
|
|
|
1188
1188
|
export declare const ANALYST_BENCHMARK_EVIDENCE_DEPENDENCY_LOCK_SHA256 = "1e03f2daed356d60316aabefb407ec1e437ac94d408d61eea4ae096e9c6fbb5b";
|
|
1189
1189
|
export declare const ANALYST_BENCHMARK_EVIDENCE_IMPLEMENTATION_SHA256 = "4dba263b6256a30d56c7fdb2d992d3a953c0035d731f359b704db806f68f75ac";
|
|
1190
1190
|
export declare const ANALYST_BENCHMARK_IMPLEMENTATION_FILES: readonly string[];
|
|
1191
|
-
export declare const ANALYST_BENCHMARK_IMPLEMENTATION_SHA256 = "
|
|
1191
|
+
export declare const ANALYST_BENCHMARK_IMPLEMENTATION_SHA256 = "65afefb4ed822b6400865ba85817d45826a6351209b8509deb07b3cabb059d70";
|
|
1192
1192
|
export declare function analystBenchmarkImplementationDigest(): string;
|
|
1193
1193
|
export declare function analystBenchmarkDependencyLockDigest(): string;
|
|
1194
1194
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/analyst/adapters.ts","../../src/analyst/benchmark-agentrx-calibration.ts","../../src/analyst/benchmark-dataset-types.ts","../../src/analyst/benchmark-dataset-agentrx.ts","../../src/analyst/benchmark-dataset-codetrace.ts","../../src/analyst/benchmark-dataset-utils.ts","../../src/analyst/benchmark-verification-outcome.ts","../../src/analyst/benchmark-verification-artifacts.ts","../../src/analyst/benchmark-public-types.ts","../../src/analyst/benchmark-public-adapters.ts","../../src/analyst/benchmark-public-data.ts","../../src/analyst/definition.ts","../../src/analyst/benchmark-public-prompt.ts","../../src/analyst/benchmark-public-model.ts","../../src/analyst/benchmark-public-rlm.ts","../../src/analyst/benchmark-runner-prime.ts","../../src/analyst/benchmark-comparison.ts","../../src/analyst/benchmark-public-calibration.ts","../../src/analyst/benchmark-command-artifact.ts","../../src/analyst/benchmark-command-result.ts","../../src/analyst/benchmark-command.ts","../../src/analyst/benchmark-implementation.ts","../../src/analyst/benchmark-instructions-override.ts","../../src/analyst/benchmark-report.ts","../../src/analyst/benchmark-summary.ts","../../src/analyst/bind.ts","../../src/analyst/define.ts","../../src/analyst/kinds/skill-usage.ts","../../src/analyst/parse-tolerant.ts","../../src/analyst/proposal-findings.ts"],"mappings":";;;;;;;;;;;;;;;UA8CiB;EACf;EACA;;EAEA,SAAS,KAAK;;EAEd;;wBAGc,kCACd,MAAM,kCACL,QAAQ;;;qBCtDE;UAEI;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA,SAAS;;wBAGK,4BACd,QAAQ,wBACR,2BACC;wBAkBa,iCAAiC,SAAS;;;KCtD9C;UAEK;EACf,YAAY;EACZ;EACA;EACA;EACA;EACA;;UAGe;EACf,eAAe;EACf,mBAAmB;EACnB;IAAe,YAAY;IAAY;;EACvC,wBAAwB;EACxB;EACA;EACA;;UAGe;EACf,UAAU;EACV;EACA;EACA;EACA;;UAGe;EACf,UAAU;EACV,mBAAmB;EACnB;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA,iBAAiB;;KAGP,0CAEC,sCACA,iCACA;UAEI;EACf;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA,oCAAoC;;UAGrB;EACf,eAAe;EACf,WAAW,sBAAsB;;KAGvB;UAEK;;;;;EAKf,WAAW;;UAGI,kCACP,yBACN;UAEa,oCAAoC;EACnD;;EAEA;;UAGe,yCAAyC;EACxD;EACA;EACA;EACA;;UAGe,2CACP,kCACN;;;wBCtGY,qBAAqB,QACnC,KAAK,YACL,OAAO,QACP,UAAS,8BACR,qBAAqB;;wBAsGR,6BACd,mBAAmB,YACnB,iBACA,UAAS,mCACR;wBA6Ea,yBAAyB;;wBAoNzB,iBAAiB;;;wBC/YjB,mBAAmB,QACjC,KAAK,mBACL,OAAO,QACP,UAAS,4BACR,qBAAqB;;wBAwFR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ACE,SAAS;IACT;IACA;IACA;IACA;IACA,YAAY;MAAQ;MAAiB;MAAsB;;IAC3D,uBAAuB;IACvB,0BAA0B;IAC1B;MACE;MACA;MACA;MACA,QAAQ;;IAEV;MACE;MACA;;MAEA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA,UAAU;MACV;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;MAEF;QACE;QACA;QACA;;MAEF;MACA;MACA;;MAEA;MACA;MACA;;;EAGJ,QAAQ;EACR,aAAa;EACb,uBAAuB;EACvB,qBAAqB;;UAGN;EACf;EACA;EACA;EACA;IACE;IACA;IACA;;;UAIa;EACf;IACE,SAAS;IACT;IACA;IACA;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA,SAAS;MACT;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;MAEF;QACE;QACA;QACA;;;IAGJ;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA,YAAY;MAAQ;MAAiB;MAAsB;;IAC3D;IACA;;;UAIa;EACf;EACA;EACA;EACA;EACA,UAAU;;UAGK;EACf;EACA;EACA;EACA;IACE;IACA;IACA;IACA;;IAEA;;EAEF;EACA;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;IACA;IACA;;;UAIa;EACf;EACA;EACA;EACA,aAAa;EACb;;qBAGW;qBACA;qBACA;qBACA;;;wBC5KS,6BACpB,eACC,QAAQ;;;UCuEM;EACf,uBACE,SAAS,+BACT,QAAQ,wCACL,uBAAuB;EAC5B,2BACE,mBACA;IACE;IACA,aAAa,SAAS,OAAO;QAE5B,QAAQ;;;;;;;;;KAUH;;UAGK;EACf;EACA;;UAGe;EACf,SAAS;EACT,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;;EAEA;EACA;EACA;;EAEA;;EAEA,QAAQ;EACR;EACA;;wBAKoB,2BACpB,yBACA,MAAK,OAAO,YACZ,eAAc,sCACb;;;qBCzJU;;;qBAIA;qBAGA;qBAOA;qBAYA;qBAGA;qBAGA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/analyst/adapters.ts","../../src/analyst/benchmark-agentrx-calibration.ts","../../src/analyst/benchmark-dataset-types.ts","../../src/analyst/benchmark-dataset-agentrx.ts","../../src/analyst/benchmark-dataset-codetrace.ts","../../src/analyst/benchmark-dataset-utils.ts","../../src/analyst/benchmark-verification-outcome.ts","../../src/analyst/benchmark-verification-artifacts.ts","../../src/analyst/benchmark-public-types.ts","../../src/analyst/benchmark-public-adapters.ts","../../src/analyst/benchmark-public-data.ts","../../src/analyst/definition.ts","../../src/analyst/benchmark-public-prompt.ts","../../src/analyst/benchmark-public-model.ts","../../src/analyst/benchmark-public-rlm.ts","../../src/analyst/benchmark-runner-prime.ts","../../src/analyst/benchmark-comparison.ts","../../src/analyst/benchmark-public-calibration.ts","../../src/analyst/benchmark-command-artifact.ts","../../src/analyst/benchmark-command-result.ts","../../src/analyst/benchmark-command.ts","../../src/analyst/benchmark-implementation.ts","../../src/analyst/benchmark-instructions-override.ts","../../src/analyst/benchmark-report.ts","../../src/analyst/benchmark-summary.ts","../../src/analyst/bind.ts","../../src/analyst/define.ts","../../src/analyst/kinds/skill-usage.ts","../../src/analyst/parse-tolerant.ts","../../src/analyst/proposal-findings.ts"],"mappings":";;;;;;;;;;;;;;;UA8CiB;EACf;EACA;;EAEA,SAAS,KAAK;;EAEd;;wBAGc,kCACd,MAAM,kCACL,QAAQ;;;qBCtDE;UAEI;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA,SAAS;;wBAGK,4BACd,QAAQ,wBACR,2BACC;wBAkBa,iCAAiC,SAAS;;;KCtD9C;UAEK;EACf,YAAY;EACZ;EACA;EACA;EACA;EACA;;UAGe;EACf,eAAe;EACf,mBAAmB;EACnB;IAAe,YAAY;IAAY;;EACvC,wBAAwB;EACxB;EACA;EACA;;UAGe;EACf,UAAU;EACV;EACA;EACA;EACA;;UAGe;EACf,UAAU;EACV,mBAAmB;EACnB;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA,iBAAiB;;KAGP,0CAEC,sCACA,iCACA;UAEI;EACf;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA,oCAAoC;;UAGrB;EACf,eAAe;EACf,WAAW,sBAAsB;;KAGvB;UAEK;;;;;EAKf,WAAW;;UAGI,kCACP,yBACN;UAEa,oCAAoC;EACnD;;EAEA;;UAGe,yCAAyC;EACxD;EACA;EACA;EACA;;UAGe,2CACP,kCACN;;;wBCtGY,qBAAqB,QACnC,KAAK,YACL,OAAO,QACP,UAAS,8BACR,qBAAqB;;wBAsGR,6BACd,mBAAmB,YACnB,iBACA,UAAS,mCACR;wBA6Ea,yBAAyB;;wBAoNzB,iBAAiB;;;wBC/YjB,mBAAmB,QACjC,KAAK,mBACL,OAAO,QACP,UAAS,4BACR,qBAAqB;;wBAwFR,gCACd,2BACA,aAAa,uBACb,UAAS,qCACR;;;wBClHa,wBAAwB;;;KCA5B;UAEK;EACf;EACA;EACA,QAAQ;;UAGO;EACf,QAAQ;EACR;EAKA;IAAe;IAAe;;EAC9B,SAAS;EACT;EACA;EACA;EACA;;UAGe;EACf;EACA;;wBA8Ec,yBACd,gBAAgB,2BACf;;;qBC/FU;KAED;UAEK;EACf,MAAM;EACN;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA,OAAO;EACP,cAAc;EACd,UAAU,OAAO;;UAGF;EACf,UAAU;EACV,SAAS;EACT,OAAO,MAAM;IAA6B;;;wBAatB,mCAAmC;EACvD;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,SAAS,+BACT,QAAQ,oCACP,uBAAuB;;wBAwBV,gBAAgB,QAAQ,oCAAoC;;;UCtI3D;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA,UAAU;;EAEV,YAAY;;;;;;wBA8EE;UAIC;;EAEf;;EAEA;;;;;;wBAOc,gCACd,MAAM,+BACL,kBAAkB;;wBAyDL,2BACd,SAAS,8BACR,uBAAuB;;;;;;;;;;cC5OpB;WACQ;WACC;WACK;WACd;WACkB;WACJ;WACO;WACD;WACJ;WACK;WACd;WACJ;WACM;WACC;WACG;WACH;WACI;WACT;;KAGC,uCAAuC;UAgBlC;EACf,QAAQ;EACR;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA,SAAS;;wBASK,sBACd,QAAQ,wBACR;EACE;EACA;EACA;EACA;EACA;IAED;;;UC3Fc;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA,SAAS;;wBAGK,8BACd,QAAQ,yBACP;wBAca,mCAAmC,SAAS;;;UCpC3C;EACf;EACA;EACA;IACE,SAAS;IACT;IACA;IACA;IACA;IACA,YAAY;MAAQ;MAAiB;MAAsB;;IAC3D,uBAAuB;IACvB,0BAA0B;IAC1B;MACE;MACA;MACA;MACA,QAAQ;;IAEV;MACE;MACA;;MAEA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA,UAAU;MACV;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;MAEF;QACE;QACA;QACA;;MAEF;MACA;MACA;;MAEA;MACA;MACA;;;EAGJ,QAAQ;EACR,aAAa;EACb,uBAAuB;EACvB,qBAAqB;;UAGN;EACf;EACA;EACA;EACA;IACE;IACA;IACA;;;UAIa;EACf;IACE,SAAS;IACT;IACA;IACA;MACE;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,0BACX,uBAAuB;;;;;;;;;;wBCpCV,mBAAmB,YAAY,yBAAyB;UAkBvD;EACf;EACA;EACA;EACA,MAAM;EACN,SAAS,QAAQ;;UAGF,wCAAwC;;EAEvD,iBAAiB,SAAS;;;wBAIZ,oBACd,SAAS,kCACR,oBAAoB;wBACP,oBACd,SAAS,6BACR,QAAQ;;;KCpBC;;UAGK;EACf;EACA,MAAM;;EAEN;EACA;;EAEA;;EAEA;;;EAGA;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;;UAGe;EACf;EACA,SAAS;;UAGM;;EAEf;;EAEA;IAAc;IAAc,MAAM;;;EAElC;;;EAGA,kBAAkB;;EAElB;;;wBA2Ec,sBAAsB,QAAQ,uBAAuB;;wBAiHrD,uBACd,QAAQ,kBACR,qBACC;cA2HG,6BAA6B,oBAAoB;WAC5C;WACA;WAEA;WACA;IAAS;IAAgC;;WACzC;WACA;aACP;aACA;aACA;;EAGI,QAAQ,OAAO,kBAAkB,KAAK,iBAAiB,QAAQ;;qBAS1D,qBAAmB;;;;;;;;;;;;;;;wBC5YhB,gBAAgB;;;;;wBAgBhB,WAAW;;;;wBCIX,kBAAkB,mBAAmB,WAAW;;;;;;wBAShD,uBACd,mBACA,mBACC,cAAc"}
|
package/dist/analyst/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { i as CostLedger } from "../cost-ledger-_IbkejCF.js";
|
|
2
|
-
import { n as
|
|
2
|
+
import { n as isProposalFinding, t as assertProposalFindings } from "../proposal-findings-CXblsskH.js";
|
|
3
3
|
import { B as FINDING_SUBJECT_SYNTAX, F as parseRawFinding, G as DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS, H as findingSubjectGrammarPromptFor, I as parseTraceSpanEvidenceUri, K as resolveTraceAnalystLimits, L as coerceJson, M as RAW_FINDING_SCHEMA_PROMPT, N as RawAnalystFindingSchema, P as evidenceRefsFromRawFinding, R as stripCodeFences, U as parseFindingSubject, V as KIND_EXPECTED_SUBJECTS, W as renderFindingSubject, i as buildTraceToolsForGroup, n as renderPriorFindings, r as runTraceAnalyst, t as createTraceAnalyst, z as FINDING_SUBJECT_KINDS } from "../kind-factory-CdPPHtGZ.js";
|
|
4
4
|
import { i as validateUsageSettlementTimeout, n as settleUsageReceiptFromCostLedger } from "../usage-receipt-Cx3xNeyB.js";
|
|
5
|
-
import { a as KNOWLEDGE_POISONING_KIND_SPEC, c as FAILURE_MODE_KIND_SPEC, d as emitControlIntegrityFindings, f as behavioralAnalyst, i as DEFAULT_TRACE_ANALYST_KINDS, l as CONTROL_INTEGRITY_ANALYST, n as AnalystRegistry, o as KNOWLEDGE_GAP_KIND_SPEC, p as deriveEfficiencyFindings, r as ExactAnalystRunExecutionError, s as IMPROVEMENT_KIND_SPEC, t as buildDefaultAnalystRegistry, u as ControlIntegrityAnalyst } from "../default-registry-
|
|
5
|
+
import { a as KNOWLEDGE_POISONING_KIND_SPEC, c as FAILURE_MODE_KIND_SPEC, d as emitControlIntegrityFindings, f as behavioralAnalyst, i as DEFAULT_TRACE_ANALYST_KINDS, l as CONTROL_INTEGRITY_ANALYST, n as AnalystRegistry, o as KNOWLEDGE_GAP_KIND_SPEC, p as deriveEfficiencyFindings, r as ExactAnalystRunExecutionError, s as IMPROVEMENT_KIND_SPEC, t as buildDefaultAnalystRegistry, u as ControlIntegrityAnalyst } from "../default-registry-wInsQWlQ.js";
|
|
6
6
|
import { i as makeProposalFinding, n as computeFindingId, r as makeFinding } from "../types-CW5b90JH.js";
|
|
7
|
-
import { t as createDspyRlmTraceEngine } from "../dspy-rlm-engine-
|
|
8
|
-
import { a as diffFindings, i as defaultIsMaterial, n as runSemanticConceptJudge, o as createChatTraceEngine, r as FindingsStore, t as SEMANTIC_CONCEPT_JUDGE_VERSION } from "../semantic-concept-judge-
|
|
9
|
-
import { t as createChatClient } from "../chat-client-
|
|
7
|
+
import { t as createDspyRlmTraceEngine } from "../dspy-rlm-engine-D0h-P2Mz.js";
|
|
8
|
+
import { a as diffFindings, i as defaultIsMaterial, n as runSemanticConceptJudge, o as createChatTraceEngine, r as FindingsStore, t as SEMANTIC_CONCEPT_JUDGE_VERSION } from "../semantic-concept-judge-BgWxa4L_.js";
|
|
9
|
+
import { t as createChatClient } from "../chat-client-5LLl4Ctl.js";
|
|
10
10
|
import { a as scoreAnalystFindings, i as summarizeAnalystBenchmarkRunner, n as runAnalystBenchmark, r as traceStoreEvidenceResolver, t as registryBenchmarkRunner } from "../benchmark-BywPeAUo.js";
|
|
11
|
-
import { $ as ANALYST_BENCHMARK_MANIFEST_FILE, A as readAnalystInstructionsOverride, B as parseVerificationOutcome, C as emptyPublicBenchmarkRunner, D as summarizeCodeTraceCalibration, E as renderCodeTraceCalibrationMarkdown, F as publicBenchmarkRlmInstructions, G as ANALYST_BENCHMARK_EVIDENCE_IMPLEMENTATION_SHA256, H as ANALYST_BENCHMARK_DEPENDENCY_LOCK_FILES, I as publicBenchmarkSystemPrompt, J as ANALYST_BENCHMARK_IMPLEMENTATION_SHA256, K as ANALYST_BENCHMARK_IMPLEMENTATION_DIGEST_ALGORITHM, L as DEFAULT_MAX_VERIFICATION_ARTIFACT_BYTES, M as MAX_INCORRECT_BLOCKS, N as MAX_INCORRECT_BLOCK_STEPS, O as analystInstructionsOverrideFromText, P as publicBenchmarkProtocolSha256, Q as ANALYST_BENCHMARK_LOCAL_RECEIPT_FILE, R as appendVerificationArtifactsToOtlp, S as adaptPublicBenchmarkFindings, T as readAnalystBenchmarkArtifact, U as ANALYST_BENCHMARK_DEPENDENCY_LOCK_SHA256, V as ANALYST_BENCHMARK_DEPENDENCY_LOCK_DIGEST_ALGORITHM, W as ANALYST_BENCHMARK_EVIDENCE_DEPENDENCY_LOCK_SHA256, X as analystBenchmarkImplementationDigest, Y as analystBenchmarkDependencyLockDigest, Z as ANALYST_BENCHMARK_COST_LEDGER_FILE, _ as publicDirectAnalystDefinition, a as primeCodeTraceAnalystDefinition, at as codeTraceBenchCase, b as analystDefinitionAsymmetries, c as preparePublicAnalystBenchmark, ct as agentRxPredictionsToFindings, d as selectPublicBenchmarkRows, dt as normalizeBenchmarkLabel, et as ANALYST_BENCHMARK_OBSERVATIONS_FILE, f as createPublicBenchmarkRlmRunner, g as createPublicBenchmarkDirectRunner, h as runReplVariableAnalystDefinition, i as primeAnalystProtocolSha256, it as summarizeAgentRxCalibration, j as CODE_TRACE_BENCH_ANALYST_PROMPT, k as effectiveAnalystProtocolSha256, l as publicBenchmarkDistributions, lt as normalizeAgentRxCategory, m as rlmEngineLimits, n as renderAnalystBenchmarkMarkdown, nt as AGENT_RX_UPSTREAM_REVISION, o as runInlineAnalystDefinition, ot as codeTracerPredictionsToFindings, p as publicRlmAnalystDefinition, q as ANALYST_BENCHMARK_IMPLEMENTATION_FILES, r as createPrimeBenchmarkRunner, rt as renderAgentRxCalibrationMarkdown, s as loadPublicBenchmarkRows, st as agentRxBenchmarkCase, t as runAnalystBenchmarkCommand, tt as compareAnalystRunners, u as publicBenchmarkSelectionReport, ut as roundAgentRxStep, v as runChunkedAnalystDefinition, w as expandCodeTraceFailureBlocks, x as analystDefinitionProtocolSha256, y as AnalystExpressivenessError, z as loadCodeTraceVerificationArtifacts } from "../benchmark-command-
|
|
11
|
+
import { $ as ANALYST_BENCHMARK_MANIFEST_FILE, A as readAnalystInstructionsOverride, B as parseVerificationOutcome, C as emptyPublicBenchmarkRunner, D as summarizeCodeTraceCalibration, E as renderCodeTraceCalibrationMarkdown, F as publicBenchmarkRlmInstructions, G as ANALYST_BENCHMARK_EVIDENCE_IMPLEMENTATION_SHA256, H as ANALYST_BENCHMARK_DEPENDENCY_LOCK_FILES, I as publicBenchmarkSystemPrompt, J as ANALYST_BENCHMARK_IMPLEMENTATION_SHA256, K as ANALYST_BENCHMARK_IMPLEMENTATION_DIGEST_ALGORITHM, L as DEFAULT_MAX_VERIFICATION_ARTIFACT_BYTES, M as MAX_INCORRECT_BLOCKS, N as MAX_INCORRECT_BLOCK_STEPS, O as analystInstructionsOverrideFromText, P as publicBenchmarkProtocolSha256, Q as ANALYST_BENCHMARK_LOCAL_RECEIPT_FILE, R as appendVerificationArtifactsToOtlp, S as adaptPublicBenchmarkFindings, T as readAnalystBenchmarkArtifact, U as ANALYST_BENCHMARK_DEPENDENCY_LOCK_SHA256, V as ANALYST_BENCHMARK_DEPENDENCY_LOCK_DIGEST_ALGORITHM, W as ANALYST_BENCHMARK_EVIDENCE_DEPENDENCY_LOCK_SHA256, X as analystBenchmarkImplementationDigest, Y as analystBenchmarkDependencyLockDigest, Z as ANALYST_BENCHMARK_COST_LEDGER_FILE, _ as publicDirectAnalystDefinition, a as primeCodeTraceAnalystDefinition, at as codeTraceBenchCase, b as analystDefinitionAsymmetries, c as preparePublicAnalystBenchmark, ct as agentRxPredictionsToFindings, d as selectPublicBenchmarkRows, dt as normalizeBenchmarkLabel, et as ANALYST_BENCHMARK_OBSERVATIONS_FILE, f as createPublicBenchmarkRlmRunner, g as createPublicBenchmarkDirectRunner, h as runReplVariableAnalystDefinition, i as primeAnalystProtocolSha256, it as summarizeAgentRxCalibration, j as CODE_TRACE_BENCH_ANALYST_PROMPT, k as effectiveAnalystProtocolSha256, l as publicBenchmarkDistributions, lt as normalizeAgentRxCategory, m as rlmEngineLimits, n as renderAnalystBenchmarkMarkdown, nt as AGENT_RX_UPSTREAM_REVISION, o as runInlineAnalystDefinition, ot as codeTracerPredictionsToFindings, p as publicRlmAnalystDefinition, q as ANALYST_BENCHMARK_IMPLEMENTATION_FILES, r as createPrimeBenchmarkRunner, rt as renderAgentRxCalibrationMarkdown, s as loadPublicBenchmarkRows, st as agentRxBenchmarkCase, t as runAnalystBenchmarkCommand, tt as compareAnalystRunners, u as publicBenchmarkSelectionReport, ut as roundAgentRxStep, v as runChunkedAnalystDefinition, w as expandCodeTraceFailureBlocks, x as analystDefinitionProtocolSha256, y as AnalystExpressivenessError, z as loadCodeTraceVerificationArtifacts } from "../benchmark-command-6OBcB0sG.js";
|
|
12
12
|
import { a as extractPrimeJsonObject, c as primeProtocolSha256, d as runPrimeExchange, f as decodeReplyRows, i as emptyPrimeRawUsage, l as primeReplyDefect, n as buildPrimePrompt, o as mergePrimeRawUsage, r as buildPrimeRepairPrompt, s as normalizePrimeUsage, t as analystUsageReceiptFromPrimeUsage, u as projectPrimeTrajectory } from "../prime-protocol-DcAK9pC8.js";
|
|
13
13
|
import { t as nodeHttpPrimeBridgeTransport } from "../prime-bridge-transport-Z3cpKGoV.js";
|
|
14
14
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
@@ -3,7 +3,7 @@ import { a as RunRecord, u as RunTerminalOutcome } from "./run-record-DF-fuu31.j
|
|
|
3
3
|
import { r as ContinuousAgreement } from "./judge-calibration-DFtEMlde.js";
|
|
4
4
|
import { r as DatasetScenario } from "./dataset-DQqhOCPt.js";
|
|
5
5
|
import { i as ParetoFigureSpec, t as GainDistributionBin } from "./summary-report-DvvesgR_.js";
|
|
6
|
-
import { n as AnalystRegistry } from "./registry-
|
|
6
|
+
import { n as AnalystRegistry } from "./registry-CT-hMSkR.js";
|
|
7
7
|
//#region src/contract/insight-report.d.ts
|
|
8
8
|
interface InsightReport {
|
|
9
9
|
/** Number of runs analyzed. */
|
|
@@ -484,4 +484,4 @@ declare function summarizeExecution(opts: SummarizeExecutionOptions): ExecutionR
|
|
|
484
484
|
declare function analyzeRuns(opts: AnalyzeRunsOptions): Promise<InsightReport>;
|
|
485
485
|
//#endregion
|
|
486
486
|
export { ReleaseSummary as _, summarizeExecution as a, ExecutionInsight as c, InsightReport as d, InterRaterInsight as f, Recommendation as g, OutcomeCorrelationInsight as h, analyzeRuns as i, FailureClassTally as l, LiftInsight as m, ExecutionReport as n, CostProvenanceSummary as o, JudgeInsight as p, SummarizeExecutionOptions as r, ExecutionErrorOutcomeCell as s, AnalyzeRunsOptions as t, FailureClusterInsight as u, ScalarDistribution as v, TokenUsageInsight as y };
|
|
487
|
-
//# sourceMappingURL=analyze-runs-
|
|
487
|
+
//# sourceMappingURL=analyze-runs-Q74o4Hfj.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyze-runs-
|
|
1
|
+
{"version":3,"file":"analyze-runs-Q74o4Hfj.d.ts","names":[],"sources":["../src/contract/insight-report.ts","../src/contract/analyze-runs.ts"],"mappings":";;;;;;;UAqCiB;;EAEf;;;;EAKA,WAAW;;EAGX,WAAW;;;EAIX,cAAc,eAAe;;EAG7B;IACE,MAAM;IACN,QAAQ;;;;;IAKR,aAAa;;;;;IAKb;MAAa;MAAe;;;;;;EAM9B,QAAQ,eAAe;;;;EAKvB,aAAa;;;;EAKb,OAAO;;;EAIP,kBAAkB;;;EAIlB,gBAAgB;;;;;EAMhB,qBAAqB;;;;;EAMrB,SAAS;;;;;;EAOT,wBAAwB;;;;EAKxB,iBAAiB;;;EAIjB,iBAAiB;;UAGF;EACf;IAAY;IAAW;;EACvB;IAAa;IAAW;;;;EAGxB;IAAc;IAAW;;EACzB;IAAc;;EACd;;UAGe;;EAEf,YAAY;;EAEZ,SAAS;;;EAGT,YAAY;;;EAGZ;IACE;IACA,YAAY;IACZ,SAAS;IACT;;;EAGF,QAAQ;IAAQ;IAAe;;;;;EAI/B;IACE;IACA;IACA;;;;;EAKF;IACE;;;IAGA;;IAEA;;IAEA;;IAEA;;IAEA;;;;;IAKA,mBAAmB,OAAO,oBAAoB;;;;EAIhD;IACE;IACA;IACA;IACA;IACA;;;UAIa;;EAEf;;EAEA;;EAEA;;UAGe;EACf,OAAO;EACP,QAAQ;EACR,WAAW;EACX,QAAQ;EACR,YAAY;EACZ;IACE;IACA;IACA;IACA;IACA;;;;UAOa;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,WAAW;;;;;EAKX,WAAW;IAAQ;IAAe;;;UAGnB;;EAEf;;EAEA;;;EAGA,cAAc;;;EAGd;;;EAGA;;;EAGA;;UAGe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,SAAS;;EAET,mBAAmB;IACjB;IACA,SAAS;MAAQ;MAAe;;IAChC;;;UAIa;EACf;EACA;;EAEA;;EAEA;;;EAGA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;EAWA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;;EAEf,UAAU;IACR;IACA;;IAEA;;IAEA;;IAEA;;EAEF;;;;;UAMe;;EAEf,cAAc;;EAEd;;EAEA;;UAGe;;EAEf;;;EAGA;EACA,UAAU;IAAQ;IAAe;IAAgB;;;UAGlC;;;EAGf;;EAEA;;EAEA;;EAEA;;EAEA;IACE;IACA;IACA;;;UAIa;;;EAGf;EACA,MAAM;IACJ;IACA;IACA;;;;EAIF;;UAGQ;;EAER;;EAEA;;;;EAIA;;EAEA;EACA;;KAGU,eACP;EACC;;EAEA;;EAEA;;EAEA;;EAEA;MAED;EACC;;EAEA;EACA;EACA;EACA;;UAGW;;EAEf;EACA;;EAEA;;;;EAIA,SAAS,eAAe;;;EAGxB;;EAEA;;EAEA;;UAGe;EACf;EACA;EACA;EACA;;EAEA;;;;UC/Xe;;EAEf,MAAM;;;EAGN;;;;;EAKA;EACA;;;EAGA,8BAA8B;;;EAG9B,kBAAkB;;;EAGlB,UAAU;;;;EAIV;IACE;IACA,cAAc;;;;;EAKhB,cAAc;IAAQ;IAAe;IAAe;;;EAEpD;;;;EAIA;;;;;;;;;EASA,eAAe;;;EAGf;;UAGe;EACf,MAAM;EACN;;UAGe;EACf,WAAW;EACX,gBAAgB;;;iBAIF,mBAAmB,MAAM,4BAA4B;iBAgB/C,YAAY,MAAM,qBAAqB,QAAQ"}
|
|
@@ -5,17 +5,17 @@ import { a as resolveModelPricing } from "./metrics-DOMpkoeb.js";
|
|
|
5
5
|
import { a as CostLedgerPersistenceError, i as CostLedger, n as CostCallConflictError, o as CostReceiptCaptureError, r as CostCeilingReachedError, s as CostReservationExceededError, t as CostAccountingIncompleteError } from "./cost-ledger-_IbkejCF.js";
|
|
6
6
|
import { d as withLedgerFileLock, f as writeLedgerFileAtomically } from "./journal-DvKCvjty.js";
|
|
7
7
|
import "./ledger-core/index.js";
|
|
8
|
-
import { S as fsCampaignStorage, i as startExternalOptimizerModelProxy, r as runWithCleanup, x as createRunCostLedger, y as resolveExternalOptimizerProcessLimits } from "./external-optimizer-subprocess-
|
|
8
|
+
import { S as fsCampaignStorage, i as startExternalOptimizerModelProxy, r as runWithCleanup, x as createRunCostLedger, y as resolveExternalOptimizerProcessLimits } from "./external-optimizer-subprocess-BmKtH3T6.js";
|
|
9
9
|
import { f as redactText } from "./redact-Dk1ZdJEm.js";
|
|
10
10
|
import { t as acquireSingleRunLock } from "./single-run-lock-fVu3MZWH.js";
|
|
11
|
+
import { a as callLlmJson, r as LlmResponseError, t as LlmCallError } from "./llm-client-DmCNzrc9.js";
|
|
11
12
|
import { M as RAW_FINDING_SCHEMA_PROMPT, N as RawAnalystFindingSchema, P as evidenceRefsFromRawFinding, g as TRACE_ANALYSIS_LIMITS, r as runTraceAnalyst } from "./kind-factory-CdPPHtGZ.js";
|
|
12
13
|
import { r as usageReceiptFromCostLedger } from "./usage-receipt-Cx3xNeyB.js";
|
|
13
|
-
import { a as callLlmJson, r as LlmResponseError, t as LlmCallError } from "./llm-client-Bhqoglar.js";
|
|
14
14
|
import { r as makeFinding } from "./types-CW5b90JH.js";
|
|
15
|
-
import { t as createDspyRlmTraceEngine } from "./dspy-rlm-engine-
|
|
15
|
+
import { t as createDspyRlmTraceEngine } from "./dspy-rlm-engine-D0h-P2Mz.js";
|
|
16
16
|
import { i as otlpTextToTraceAnalysisStore, r as createOtlpBufferTraceStore, t as DEFAULT_MAX_TRACE_FILE_BYTES } from "./store-otlp-yd9lDziN.js";
|
|
17
17
|
import { i as summarizeAnalystBenchmarkRunner, n as runAnalystBenchmark, r as traceStoreEvidenceResolver } from "./benchmark-BywPeAUo.js";
|
|
18
|
-
import "./external-optimizer-process-
|
|
18
|
+
import "./external-optimizer-process-CIV4EqiT.js";
|
|
19
19
|
import { t as assertEqualDeclarativeTerms } from "./equal-terms-Blx9Zk5I.js";
|
|
20
20
|
import { c as primeProtocolSha256, d as runPrimeExchange, f as decodeReplyRows, n as buildPrimePrompt, t as analystUsageReceiptFromPrimeUsage, u as projectPrimeTrajectory } from "./prime-protocol-DcAK9pC8.js";
|
|
21
21
|
import { t as nodeHttpPrimeBridgeTransport } from "./prime-bridge-transport-Z3cpKGoV.js";
|
|
@@ -1424,6 +1424,7 @@ const ANALYST_BENCHMARK_EVIDENCE_IMPLEMENTATION_SHA256 = "4dba263b6256a30d56c7fd
|
|
|
1424
1424
|
const ANALYST_BENCHMARK_IMPLEMENTATION_FILES = Object.freeze([
|
|
1425
1425
|
"clients/python/src/agent_eval_rpc/dspy_rlm_bridge.py",
|
|
1426
1426
|
"clients/python/src/agent_eval_rpc/optimizer_bridge_common.py",
|
|
1427
|
+
"src/abort-signal.ts",
|
|
1427
1428
|
"src/analyst/benchmark-agentrx-calibration.ts",
|
|
1428
1429
|
"src/analyst/benchmark-command-artifact.ts",
|
|
1429
1430
|
"src/analyst/benchmark-command-persistence.ts",
|
|
@@ -1533,7 +1534,7 @@ const ANALYST_BENCHMARK_IMPLEMENTATION_FILES = Object.freeze([
|
|
|
1533
1534
|
"src/trace/redact.ts",
|
|
1534
1535
|
"src/verdict-cache.ts"
|
|
1535
1536
|
]);
|
|
1536
|
-
const ANALYST_BENCHMARK_IMPLEMENTATION_SHA256 = "
|
|
1537
|
+
const ANALYST_BENCHMARK_IMPLEMENTATION_SHA256 = "65afefb4ed822b6400865ba85817d45826a6351209b8509deb07b3cabb059d70";
|
|
1537
1538
|
function analystBenchmarkImplementationDigest() {
|
|
1538
1539
|
return ANALYST_BENCHMARK_IMPLEMENTATION_SHA256;
|
|
1539
1540
|
}
|
|
@@ -6320,4 +6321,4 @@ function shellQuote(value) {
|
|
|
6320
6321
|
//#endregion
|
|
6321
6322
|
export { ANALYST_BENCHMARK_MANIFEST_FILE as $, readAnalystInstructionsOverride as A, parseVerificationOutcome as B, emptyPublicBenchmarkRunner as C, summarizeCodeTraceCalibration as D, renderCodeTraceCalibrationMarkdown as E, publicBenchmarkRlmInstructions as F, ANALYST_BENCHMARK_EVIDENCE_IMPLEMENTATION_SHA256 as G, ANALYST_BENCHMARK_DEPENDENCY_LOCK_FILES as H, publicBenchmarkSystemPrompt as I, ANALYST_BENCHMARK_IMPLEMENTATION_SHA256 as J, ANALYST_BENCHMARK_IMPLEMENTATION_DIGEST_ALGORITHM as K, DEFAULT_MAX_VERIFICATION_ARTIFACT_BYTES as L, MAX_INCORRECT_BLOCKS as M, MAX_INCORRECT_BLOCK_STEPS as N, analystInstructionsOverrideFromText as O, publicBenchmarkProtocolSha256 as P, ANALYST_BENCHMARK_LOCAL_RECEIPT_FILE as Q, appendVerificationArtifactsToOtlp as R, adaptPublicBenchmarkFindings as S, readAnalystBenchmarkArtifact as T, ANALYST_BENCHMARK_DEPENDENCY_LOCK_SHA256 as U, ANALYST_BENCHMARK_DEPENDENCY_LOCK_DIGEST_ALGORITHM as V, ANALYST_BENCHMARK_EVIDENCE_DEPENDENCY_LOCK_SHA256 as W, analystBenchmarkImplementationDigest as X, analystBenchmarkDependencyLockDigest as Y, ANALYST_BENCHMARK_COST_LEDGER_FILE as Z, publicDirectAnalystDefinition as _, primeCodeTraceAnalystDefinition as a, codeTraceBenchCase as at, analystDefinitionAsymmetries as b, preparePublicAnalystBenchmark as c, agentRxPredictionsToFindings as ct, selectPublicBenchmarkRows as d, normalizeBenchmarkLabel as dt, ANALYST_BENCHMARK_OBSERVATIONS_FILE as et, createPublicBenchmarkRlmRunner as f, createPublicBenchmarkDirectRunner as g, runReplVariableAnalystDefinition as h, primeAnalystProtocolSha256 as i, summarizeAgentRxCalibration as it, CODE_TRACE_BENCH_ANALYST_PROMPT as j, effectiveAnalystProtocolSha256 as k, publicBenchmarkDistributions as l, normalizeAgentRxCategory as lt, rlmEngineLimits as m, renderAnalystBenchmarkMarkdown as n, AGENT_RX_UPSTREAM_REVISION as nt, runInlineAnalystDefinition as o, codeTracerPredictionsToFindings as ot, publicRlmAnalystDefinition as p, ANALYST_BENCHMARK_IMPLEMENTATION_FILES as q, createPrimeBenchmarkRunner as r, renderAgentRxCalibrationMarkdown as rt, loadPublicBenchmarkRows as s, agentRxBenchmarkCase as st, runAnalystBenchmarkCommand as t, compareAnalystRunners as tt, publicBenchmarkSelectionReport as u, roundAgentRxStep as ut, runChunkedAnalystDefinition as v, expandCodeTraceFailureBlocks as w, analystDefinitionProtocolSha256 as x, AnalystExpressivenessError as y, loadCodeTraceVerificationArtifacts as z };
|
|
6322
6323
|
|
|
6323
|
-
//# sourceMappingURL=benchmark-command-
|
|
6324
|
+
//# sourceMappingURL=benchmark-command-6OBcB0sG.js.map
|