@tangle-network/agent-eval 0.136.0 → 0.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +86 -1
- package/README.md +37 -2
- package/dist/{agent-profile-cell-OhuTee9n.js → agent-profile-cell-CbfBm2g6.js} +2 -2
- package/dist/{agent-profile-cell-OhuTee9n.js.map → agent-profile-cell-CbfBm2g6.js.map} +1 -1
- package/dist/{agent-profile-cell-CCm3l2v2.d.ts → agent-profile-cell-Cw0PVwDr.d.ts} +2 -2
- package/dist/{agent-profile-cell-CCm3l2v2.d.ts.map → agent-profile-cell-Cw0PVwDr.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +574 -18
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +25 -5
- package/dist/analyst/index.js.map +1 -1
- package/dist/{analyze-runs-jjCmF8pU.js → analyze-runs-BScZvqMV.js} +6 -6
- package/dist/{analyze-runs-jjCmF8pU.js.map → analyze-runs-BScZvqMV.js.map} +1 -1
- package/dist/{analyze-runs-Cda5Xkj1.d.ts → analyze-runs-CPYxfPWT.d.ts} +6 -6
- package/dist/{analyze-runs-Cda5Xkj1.d.ts.map → analyze-runs-CPYxfPWT.d.ts.map} +1 -1
- package/dist/{baseline-BUeFcgrn.js → baseline-C-GocmIW.js} +2 -2
- package/dist/{baseline-BUeFcgrn.js.map → baseline-C-GocmIW.js.map} +1 -1
- package/dist/benchmark-D8dkki-J.js +554 -0
- package/dist/benchmark-D8dkki-J.js.map +1 -0
- package/dist/benchmark-DlQgU_XI.d.ts +236 -0
- package/dist/benchmark-DlQgU_XI.d.ts.map +1 -0
- package/dist/benchmark-command-CMqVqReF.js +4332 -0
- package/dist/benchmark-command-CMqVqReF.js.map +1 -0
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +1 -1
- package/dist/{benchmarks-Dfgm9ts5.js → benchmarks-BJ_xK5rQ.js} +4 -3
- package/dist/{benchmarks-Dfgm9ts5.js.map → benchmarks-BJ_xK5rQ.js.map} +1 -1
- package/dist/builder-eval/index.js +2 -2
- package/dist/campaign/index.d.ts +6 -6
- package/dist/campaign/index.js +4 -4
- package/dist/{campaign-Dz8uQnhC.js → campaign-BIBS-NHV.js} +219 -78
- package/dist/campaign-BIBS-NHV.js.map +1 -0
- package/dist/cli.js +9 -2
- package/dist/cli.js.map +1 -1
- package/dist/client-BwPKohkJ.d.ts +202 -0
- package/dist/client-BwPKohkJ.d.ts.map +1 -0
- package/dist/completion-verifier-B4-IMYcS.d.ts +240 -0
- package/dist/completion-verifier-B4-IMYcS.d.ts.map +1 -0
- package/dist/contract/index.d.ts +10 -9
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +13 -13
- package/dist/control.d.ts +2 -2
- package/dist/control.js +1 -1
- package/dist/{cost-ledger-fGS_u_O1.d.ts → cost-ledger-B1D3COAc.d.ts} +6 -5
- package/dist/{cost-ledger-fGS_u_O1.d.ts.map → cost-ledger-B1D3COAc.d.ts.map} +1 -1
- package/dist/{cost-ledger-DHAjwNj7.js → cost-ledger-CHDLA0Ss.js} +91 -46
- package/dist/cost-ledger-CHDLA0Ss.js.map +1 -0
- package/dist/{dataset-BvtnC8Dc.d.ts → dataset-v_Y5902-.d.ts} +2 -2
- package/dist/{dataset-BvtnC8Dc.d.ts.map → dataset-v_Y5902-.d.ts.map} +1 -1
- package/dist/{default-registry-Brxr728w.d.ts → default-registry-PUhIVRWz.d.ts} +77 -138
- package/dist/default-registry-PUhIVRWz.d.ts.map +1 -0
- package/dist/{default-registry-CHmdy2An.js → default-registry-lp5R0lve.js} +1617 -291
- package/dist/default-registry-lp5R0lve.js.map +1 -0
- package/dist/{errors-8YnH8WlF.js → errors-D-LKuDhb.js} +8 -2
- package/dist/errors-D-LKuDhb.js.map +1 -0
- package/dist/{errors-CEk209JS.d.ts → errors-DkfjIDvD.d.ts} +9 -3
- package/dist/errors-DkfjIDvD.d.ts.map +1 -0
- package/dist/{eval-campaign-Cc8WZJ6b.js → eval-campaign-9MozgKL7.js} +6 -6
- package/dist/{eval-campaign-Cc8WZJ6b.js.map → eval-campaign-9MozgKL7.js.map} +1 -1
- package/dist/exact-types-Dpw2LeHA.d.ts +234 -0
- package/dist/exact-types-Dpw2LeHA.d.ts.map +1 -0
- package/dist/{extract-usage-DIQpN-ww.js → extract-usage-CS391dOE.js} +3 -3
- package/dist/{extract-usage-DIQpN-ww.js.map → extract-usage-CS391dOE.js.map} +1 -1
- package/dist/{feedback-trajectory-CVaeREXV.d.ts → feedback-trajectory-CoNep7rl.d.ts} +91 -3
- package/dist/feedback-trajectory-CoNep7rl.d.ts.map +1 -0
- package/dist/fuzz.d.ts +1 -1
- package/dist/fuzz.js +2 -2
- package/dist/hosted/index.d.ts +3 -2
- package/dist/hosted/index.d.ts.map +1 -1
- package/dist/{index-AbhwHp0V.d.ts → index-B2-IxCMB.d.ts} +2 -2
- package/dist/{index-AbhwHp0V.d.ts.map → index-B2-IxCMB.d.ts.map} +1 -1
- package/dist/index-BipJlj-C.d.ts +316 -0
- package/dist/index-BipJlj-C.d.ts.map +1 -0
- package/dist/{index-CQsJcqch.d.ts → index-CjVYlVBK.d.ts} +5 -5
- package/dist/{index-CQsJcqch.d.ts.map → index-CjVYlVBK.d.ts.map} +1 -1
- package/dist/{index-B4Fjfo5U.d.ts → index-D0cxAdaV.d.ts} +89 -317
- package/dist/index-D0cxAdaV.d.ts.map +1 -0
- package/dist/{index-DuhJaaiH.d.ts → index-DEb46kc6.d.ts} +2 -2
- package/dist/index-DEb46kc6.d.ts.map +1 -0
- package/dist/{index-C2fkZhv_.d.ts → index-sMN_hI4E.d.ts} +3 -3
- package/dist/{index-C2fkZhv_.d.ts.map → index-sMN_hI4E.d.ts.map} +1 -1
- package/dist/index.d.ts +30 -70
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +175 -35
- package/dist/index.js.map +1 -1
- package/dist/{client-DcvgkaZi.d.ts → insight-report-CXd8VBDR.d.ts} +5 -203
- package/dist/insight-report-CXd8VBDR.d.ts.map +1 -0
- package/dist/{integrity-rmVhXWA7.d.ts → integrity-B-MLFz0I.d.ts} +3 -3
- package/dist/{integrity-rmVhXWA7.d.ts.map → integrity-B-MLFz0I.d.ts.map} +1 -1
- package/dist/integrity-CCXTftiL.js +1360 -0
- package/dist/integrity-CCXTftiL.js.map +1 -0
- package/dist/{integrity-BzRbCHzi.js → integrity-fdt8XPAv.js} +2 -2
- package/dist/{integrity-BzRbCHzi.js.map → integrity-fdt8XPAv.js.map} +1 -1
- package/dist/ledger-core/index.d.ts +1 -1
- package/dist/ledger-core/index.js +1 -1
- package/dist/{ledger-core-DAKFKRzi.js → ledger-core-C0Yx1I14.js} +303 -110
- package/dist/ledger-core-C0Yx1I14.js.map +1 -0
- package/dist/{llm-client-DHx8pzyJ.js → llm-client-Cj3c7PEm.js} +6 -6
- package/dist/llm-client-Cj3c7PEm.js.map +1 -0
- package/dist/meta-eval/index.d.ts +2 -2
- package/dist/meta-eval/index.js +3 -3
- package/dist/{mint-DyRUc9k6.js → mint-Ctwk079K.js} +4 -4
- package/dist/{mint-DyRUc9k6.js.map → mint-Ctwk079K.js.map} +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/openapi.json +1 -1
- package/dist/{paired-arms-BbFKrAU-.js → paired-arms-iZ08VFMN.js} +3 -3
- package/dist/{paired-arms-BbFKrAU-.js.map → paired-arms-iZ08VFMN.js.map} +1 -1
- package/dist/pipelines/index.js +2 -2
- package/dist/profile-cell.d.ts +1 -1
- package/dist/profile-cell.js +1 -1
- package/dist/{proposal-findings-DCawte-y.js → proposal-findings-2GIUo1et.js} +2 -68
- package/dist/proposal-findings-2GIUo1et.js.map +1 -0
- package/dist/{propose-review-control-SQ-n9-We.js → propose-review-control-DLXz4FCX.js} +2 -2
- package/dist/{propose-review-control-SQ-n9-We.js.map → propose-review-control-DLXz4FCX.js.map} +1 -1
- package/dist/registry-C4yJTza7.d.ts +178 -0
- package/dist/registry-C4yJTza7.d.ts.map +1 -0
- package/dist/{release-report-DooPguBc.js → release-report-B5XPBvAU.js} +4 -4
- package/dist/{release-report-DooPguBc.js.map → release-report-B5XPBvAU.js.map} +1 -1
- package/dist/{release-report-DpBxGGI1.d.ts → release-report-CoyvyLBs.d.ts} +4 -4
- package/dist/{release-report-DpBxGGI1.d.ts.map → release-report-CoyvyLBs.d.ts.map} +1 -1
- package/dist/{replay-C6wRg47C.js → replay-Cb-4Vf0k.js} +249 -8
- package/dist/replay-Cb-4Vf0k.js.map +1 -0
- package/dist/{replay-BRfMIs81.d.ts → replay-DbIYwso6.d.ts} +227 -52
- package/dist/replay-DbIYwso6.d.ts.map +1 -0
- package/dist/reporting.d.ts +4 -4
- package/dist/reporting.js +4 -4
- package/dist/{researcher-Doo95b50.d.ts → researcher-BCeOEjtR.d.ts} +6 -7
- package/dist/researcher-BCeOEjtR.d.ts.map +1 -0
- package/dist/{reward-hacking-a-kYs0-i.js → reward-hacking-GyN0kMd8.js} +3 -3
- package/dist/{reward-hacking-a-kYs0-i.js.map → reward-hacking-GyN0kMd8.js.map} +1 -1
- package/dist/{reward-hacking-D-QqXvg-.d.ts → reward-hacking-sE2l_NV6.d.ts} +2 -2
- package/dist/{reward-hacking-D-QqXvg-.d.ts.map → reward-hacking-sE2l_NV6.d.ts.map} +1 -1
- package/dist/rl.d.ts +6 -6
- package/dist/rl.js +9 -9
- package/dist/rollout/index.d.ts +1 -1
- package/dist/rollout/index.js +3 -3
- package/dist/{rollout-DLSUIWLu.js → rollout-DQFl0UXA.js} +2 -2
- package/dist/{rollout-DLSUIWLu.js.map → rollout-DQFl0UXA.js.map} +1 -1
- package/dist/{rubric-predictive-validity-BJf-8ejY.js → rubric-predictive-validity-BRR632r1.js} +2 -2
- package/dist/{rubric-predictive-validity-BJf-8ejY.js.map → rubric-predictive-validity-BRR632r1.js.map} +1 -1
- package/dist/{rubric-predictive-validity-C1dCLcvb.d.ts → rubric-predictive-validity-w2klGv1u.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-C1dCLcvb.d.ts.map → rubric-predictive-validity-w2klGv1u.d.ts.map} +1 -1
- package/dist/{run-evidence-DokQtX0-.d.ts → run-evidence-CbE0A8Xg.d.ts} +3 -3
- package/dist/{run-evidence-DokQtX0-.d.ts.map → run-evidence-CbE0A8Xg.d.ts.map} +1 -1
- package/dist/{run-record-DcObtIGh.d.ts → run-record-DwHMk1Ai.d.ts} +4 -4
- package/dist/{run-record-DcObtIGh.d.ts.map → run-record-DwHMk1Ai.d.ts.map} +1 -1
- package/dist/{run-record-BIwU2wdV.js → run-record-vRgqWmJw.js} +3 -3
- package/dist/{run-record-BIwU2wdV.js.map → run-record-vRgqWmJw.js.map} +1 -1
- package/dist/{semantic-concept-judge-Btozx3Vc.js → semantic-concept-judge-DYXDPZW0.js} +12 -6
- package/dist/semantic-concept-judge-DYXDPZW0.js.map +1 -0
- package/dist/{server-Bz3WQJs6.js → server-DLEvyW2z.js} +3 -3
- package/dist/{server-Bz3WQJs6.js.map → server-DLEvyW2z.js.map} +1 -1
- package/dist/single-run-lock-D_bS5xhj.js +318 -0
- package/dist/single-run-lock-D_bS5xhj.js.map +1 -0
- package/dist/{skill-usage-BDQVPIG1.d.ts → skill-usage-Bv3G4VkA.d.ts} +36 -48
- package/dist/skill-usage-Bv3G4VkA.d.ts.map +1 -0
- package/dist/{skillopt-optimization-method-0UmPD6aP.js → skillopt-optimization-method-CjKMZy0d.js} +10 -185
- package/dist/skillopt-optimization-method-CjKMZy0d.js.map +1 -0
- package/dist/{skillopt-optimization-method-CwSYkv35.d.ts → skillopt-optimization-method-CzfnA8O-.d.ts} +11 -12
- package/dist/skillopt-optimization-method-CzfnA8O-.d.ts.map +1 -0
- package/dist/{statistics-CnGCLLqc.js → statistics-ByxzSiOM.js} +2 -2
- package/dist/{statistics-CnGCLLqc.js.map → statistics-ByxzSiOM.js.map} +1 -1
- package/dist/{statistics-CKOqre5S.d.ts → statistics-mf70aXKp.d.ts} +2 -2
- package/dist/{statistics-CKOqre5S.d.ts.map → statistics-mf70aXKp.d.ts.map} +1 -1
- package/dist/store-otlp-BenKynPE.js +1688 -0
- package/dist/store-otlp-BenKynPE.js.map +1 -0
- package/dist/{summary-report-BEk8OFLs.js → summary-report-9A5y7EsK.js} +4 -4
- package/dist/{summary-report-BEk8OFLs.js.map → summary-report-9A5y7EsK.js.map} +1 -1
- package/dist/{summary-report-CPMINBqs.d.ts → summary-report-BKinV4yD.d.ts} +3 -3
- package/dist/{summary-report-CPMINBqs.d.ts.map → summary-report-BKinV4yD.d.ts.map} +1 -1
- package/dist/supervisor-run/index.d.ts +3 -2
- package/dist/supervisor-run/index.js +3 -2
- package/dist/{supervisor-run-Dr5HnTup.js → supervisor-run-B2EWUmQY.js} +28 -454
- package/dist/supervisor-run-B2EWUmQY.js.map +1 -0
- package/dist/{test-graded-scenario-BsqWLmPt.js → test-graded-scenario-JHcKQNpq.js} +2 -2
- package/dist/{test-graded-scenario-BsqWLmPt.js.map → test-graded-scenario-JHcKQNpq.js.map} +1 -1
- package/dist/tools-DZGdROtG.js +255 -0
- package/dist/tools-DZGdROtG.js.map +1 -0
- package/dist/traces.d.ts +6 -7
- package/dist/traces.js +6 -6
- package/dist/types-5q2T25iW.d.ts +804 -0
- package/dist/types-5q2T25iW.d.ts.map +1 -0
- package/dist/{types-DVjczBM9.d.ts → types-BtJhn8v6.d.ts} +260 -6
- package/dist/types-BtJhn8v6.d.ts.map +1 -0
- package/dist/{index-CyC1BTmn.d.ts → types-Dea6tiVI.d.ts} +16 -238
- package/dist/types-Dea6tiVI.d.ts.map +1 -0
- package/dist/{types-DiWLru6Z.d.ts → types-zFYez3PK.d.ts} +5 -5
- package/dist/{types-DiWLru6Z.d.ts.map → types-zFYez3PK.d.ts.map} +1 -1
- package/dist/wire/index.d.ts +3 -3
- package/dist/wire/index.js +1 -1
- package/docs/feedback-trajectories.md +100 -1
- package/docs/trace-analysis.md +494 -58
- package/package.json +9 -3
- package/dist/analyst-BkTS3C58.d.ts +0 -89
- package/dist/analyst-BkTS3C58.d.ts.map +0 -1
- package/dist/analyst-j5je5J7c.js +0 -152
- package/dist/analyst-j5je5J7c.js.map +0 -1
- package/dist/campaign-Dz8uQnhC.js.map +0 -1
- package/dist/client-DcvgkaZi.d.ts.map +0 -1
- package/dist/concurrency-MUjT7VjM.js +0 -109
- package/dist/concurrency-MUjT7VjM.js.map +0 -1
- package/dist/cost-ledger-DHAjwNj7.js.map +0 -1
- package/dist/default-registry-Brxr728w.d.ts.map +0 -1
- package/dist/default-registry-CHmdy2An.js.map +0 -1
- package/dist/errors-8YnH8WlF.js.map +0 -1
- package/dist/errors-CEk209JS.d.ts.map +0 -1
- package/dist/feedback-trajectory-CVaeREXV.d.ts.map +0 -1
- package/dist/index-B4Fjfo5U.d.ts.map +0 -1
- package/dist/index-CyC1BTmn.d.ts.map +0 -1
- package/dist/index-DuhJaaiH.d.ts.map +0 -1
- package/dist/ledger-core-DAKFKRzi.js.map +0 -1
- package/dist/llm-client-BiK4HW0u.d.ts +0 -290
- package/dist/llm-client-BiK4HW0u.d.ts.map +0 -1
- package/dist/llm-client-DHx8pzyJ.js.map +0 -1
- package/dist/proposal-findings-DCawte-y.js.map +0 -1
- package/dist/raw-provider-sink-BU29Sh8h.d.ts +0 -134
- package/dist/raw-provider-sink-BU29Sh8h.d.ts.map +0 -1
- package/dist/replay-BRfMIs81.d.ts.map +0 -1
- package/dist/replay-C6wRg47C.js.map +0 -1
- package/dist/researcher-Doo95b50.d.ts.map +0 -1
- package/dist/semantic-concept-judge-Btozx3Vc.js.map +0 -1
- package/dist/skill-usage-BDQVPIG1.d.ts.map +0 -1
- package/dist/skillopt-optimization-method-0UmPD6aP.js.map +0 -1
- package/dist/skillopt-optimization-method-CwSYkv35.d.ts.map +0 -1
- package/dist/store-CxJry_cs.d.ts +0 -229
- package/dist/store-CxJry_cs.d.ts.map +0 -1
- package/dist/supervisor-run-Dr5HnTup.js.map +0 -1
- package/dist/tools-D8yTtNSN.js +0 -1190
- package/dist/tools-D8yTtNSN.js.map +0 -1
- package/dist/types-Cc3qbqzj.d.ts +0 -387
- package/dist/types-Cc3qbqzj.d.ts.map +0 -1
- package/dist/types-DVjczBM9.d.ts.map +0 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as canonicalize, s as buildAgentProfileCell } from "./agent-profile-cell-
|
|
3
|
-
import { i as CostLedger } from "./cost-ledger-
|
|
4
|
-
import { f as maximumChargeForLlmRequest, l as costReceiptFromLlm, u as costReceiptFromLlmError } from "./llm-client-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { c as ValidationError, t as AgentEvalError } from "./errors-D-LKuDhb.js";
|
|
2
|
+
import { p as canonicalize, s as buildAgentProfileCell } from "./agent-profile-cell-CbfBm2g6.js";
|
|
3
|
+
import { i as CostLedger, t as CostAccountingIncompleteError } from "./cost-ledger-CHDLA0Ss.js";
|
|
4
|
+
import { f as maximumChargeForLlmRequest, l as costReceiptFromLlm, u as costReceiptFromLlmError } from "./llm-client-Cj3c7PEm.js";
|
|
5
|
+
import { a as SEARCH_LEDGER_FILE_CONTEXT, c as SearchLedgerIntegrityError, o as SearchLedgerConflictError, s as SearchLedgerError } from "./single-run-lock-D_bS5xhj.js";
|
|
6
|
+
import { _ as canonicalString, t as FileLedgerJournal } from "./ledger-core-C0Yx1I14.js";
|
|
7
|
+
import { E as pairHoldout, Et as recoverTruncatedJson, Ft as summarizeBackendIntegrity, It as JudgeParseError, J as runCampaign, Nt as assertRealBackend, P as assertCodeSurfaceIdentity, h as labelTrustRank, q as planCampaignRun, vt as contentHash, z as surfaceContentHash } from "./skillopt-optimization-method-CjKMZy0d.js";
|
|
8
|
+
import { C as mulberry32, E as pairedBootstrap, m as eProcess } from "./statistics-ByxzSiOM.js";
|
|
9
|
+
import { t as comparePairedArms } from "./paired-arms-iZ08VFMN.js";
|
|
10
|
+
import { o as runTaskScore, r as modelHasSnapshot, s as validateRunRecord } from "./run-record-vRgqWmJw.js";
|
|
11
|
+
import { a as scoreAnalystFindings } from "./benchmark-D8dkki-J.js";
|
|
12
|
+
import { c as campaignCellToRunRecord } from "./reward-hacking-GyN0kMd8.js";
|
|
12
13
|
import { z } from "zod";
|
|
13
14
|
import { closeSync, constants, existsSync, fstatSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
14
15
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
15
16
|
import { createHash, randomUUID } from "node:crypto";
|
|
17
|
+
import { harnessSupportsModel } from "@tangle-network/agent-interface";
|
|
16
18
|
import { devNull, tmpdir } from "node:os";
|
|
17
19
|
import { execFileSync } from "node:child_process";
|
|
18
|
-
import { harnessSupportsModel } from "@tangle-network/agent-interface";
|
|
19
20
|
//#region src/completion-verifier.ts
|
|
20
21
|
/**
|
|
21
22
|
* Completion verifier — the task-completion oracle.
|
|
@@ -623,78 +624,88 @@ function agentProfileHash(profile) {
|
|
|
623
624
|
}
|
|
624
625
|
//#endregion
|
|
625
626
|
//#region src/campaign/analyst-surface.ts
|
|
626
|
-
function
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
*/
|
|
635
|
-
function buildAnalystSurfaceDispatch(opts) {
|
|
636
|
-
const analyze = opts.analyze ?? analyzeTraces;
|
|
637
|
-
return async (surface, scenario, _ctx) => {
|
|
638
|
-
const actorDescription = surfaceToText(surface);
|
|
639
|
-
const res = await analyze({ question: scenario.question }, {
|
|
640
|
-
...opts.analystOptions,
|
|
641
|
-
actorDescription,
|
|
642
|
-
source: scenario.source
|
|
627
|
+
function buildTraceAnalystSurfaceDispatch(options) {
|
|
628
|
+
return async (surface, scenario, context) => {
|
|
629
|
+
if (typeof surface !== "string") throw new TypeError(`buildTraceAnalystSurfaceDispatch requires a string prompt, received ${surface.kind}`);
|
|
630
|
+
return options.analyze({
|
|
631
|
+
actorDescription: surface,
|
|
632
|
+
traceStore: scenario.traceStore,
|
|
633
|
+
runId: `${context.cellId}:${scenario.id}`,
|
|
634
|
+
signal: context.signal
|
|
643
635
|
});
|
|
644
|
-
return {
|
|
645
|
-
answer: res.answer,
|
|
646
|
-
findings: res.findings,
|
|
647
|
-
actorPromptVersion: res.actorPromptVersion
|
|
648
|
-
};
|
|
649
636
|
};
|
|
650
637
|
}
|
|
651
|
-
|
|
652
|
-
* Deterministic, ground-truth judge for analyst findings. Composite =
|
|
653
|
-
* recall of the scenario's `expectedFailureModes` (optionally blended with a
|
|
654
|
-
* precision term that penalizes findings tripping `forbiddenCues`). No LLM —
|
|
655
|
-
* the score is a function of the labels, so the analyst prompt is optimized
|
|
656
|
-
* toward surfacing real failures, not toward a judge it can flatter.
|
|
657
|
-
*/
|
|
658
|
-
function failureModeRecallJudge(opts = {}) {
|
|
659
|
-
const recallWeight = opts.recallWeight ?? .5;
|
|
638
|
+
function traceAnalystQualityJudge() {
|
|
660
639
|
return {
|
|
661
|
-
name: "
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
640
|
+
name: "trace-analyst-quality",
|
|
641
|
+
judgeVersion: "agent-eval:trace-analyst-quality:v3",
|
|
642
|
+
dimensions: [
|
|
643
|
+
{
|
|
644
|
+
key: "issue_recall",
|
|
645
|
+
description: "share of labeled issues found"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
key: "finding_precision",
|
|
649
|
+
description: "share of findings tied to a labeled issue"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
key: "f1",
|
|
653
|
+
description: "harmonic mean of issue recall and finding precision"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
key: "critical_step_accuracy",
|
|
657
|
+
description: "share of labeled causal steps cited"
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
key: "citation_coverage",
|
|
661
|
+
description: "share of findings with evidence citations"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
key: "citation_label_agreement",
|
|
665
|
+
description: "share of citations matching a labeled case location"
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
key: "clean",
|
|
669
|
+
description: "1 when a clean case produces no findings"
|
|
683
670
|
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
notes
|
|
694
|
-
};
|
|
671
|
+
],
|
|
672
|
+
appliesTo: (scenario) => scenario.kind === "trace-analyst" && scenario.labelState !== "unlabeled",
|
|
673
|
+
score({ artifact, scenario }) {
|
|
674
|
+
assertScorableScenario(scenario);
|
|
675
|
+
return traceAnalystJudgeScore(scoreAnalystFindings({
|
|
676
|
+
id: scenario.id,
|
|
677
|
+
expectedIssues: scenario.expectedIssues,
|
|
678
|
+
labeledEvidence: scenario.labeledEvidence
|
|
679
|
+
}, artifact.findings));
|
|
695
680
|
}
|
|
696
681
|
};
|
|
697
682
|
}
|
|
683
|
+
function assertScorableScenario(scenario) {
|
|
684
|
+
if (scenario.labelState === "unlabeled") throw new TypeError(`trace analyst scenario '${scenario.id}' has no quality labels`);
|
|
685
|
+
if (scenario.labelState === "positive" && scenario.expectedIssues.length === 0) throw new TypeError(`positive trace analyst scenario '${scenario.id}' requires expected issues`);
|
|
686
|
+
if (scenario.labelState === "trusted-negative" && scenario.expectedIssues.length > 0) throw new TypeError(`trusted-negative trace analyst scenario '${scenario.id}' cannot contain expected issues`);
|
|
687
|
+
}
|
|
688
|
+
function traceAnalystJudgeScore(score) {
|
|
689
|
+
const dimensions = {
|
|
690
|
+
issue_recall: score.issueRecall,
|
|
691
|
+
finding_precision: score.findingPrecision,
|
|
692
|
+
f1: score.f1,
|
|
693
|
+
clean: score.predictionOnLabelEmptyCase ? 0 : 1
|
|
694
|
+
};
|
|
695
|
+
if (score.criticalStepAccuracy !== null) dimensions.critical_step_accuracy = score.criticalStepAccuracy;
|
|
696
|
+
if (score.citationCoverage !== null) dimensions.citation_coverage = score.citationCoverage;
|
|
697
|
+
if (score.citationLabelAgreement !== null) dimensions.citation_label_agreement = score.citationLabelAgreement;
|
|
698
|
+
const notes = [
|
|
699
|
+
`${score.matchedIssueIds.length}/${score.expectedIssueCount} issues found`,
|
|
700
|
+
`${score.supportedFindingIndexes.length}/${score.supportedFindingIndexes.length + score.unsupportedFindingIndexes.length} findings supported`,
|
|
701
|
+
`${score.unlabeledEvidence.length} citations outside labeled locations`
|
|
702
|
+
].join("; ");
|
|
703
|
+
return {
|
|
704
|
+
dimensions,
|
|
705
|
+
composite: score.criticalStepAccuracy === null ? score.f1 : (score.f1 + score.criticalStepAccuracy) / 2,
|
|
706
|
+
notes
|
|
707
|
+
};
|
|
708
|
+
}
|
|
698
709
|
//#endregion
|
|
699
710
|
//#region src/campaign/cross-surface-context.ts
|
|
700
711
|
function validateCrossSurfaceInput(input) {
|
|
@@ -3373,6 +3384,136 @@ function isTransientTransportFailure(message, opts = {}) {
|
|
|
3373
3384
|
return false;
|
|
3374
3385
|
}
|
|
3375
3386
|
//#endregion
|
|
3387
|
+
//#region src/campaign/upstream-evaluators.ts
|
|
3388
|
+
function phoenixEvaluatorJudge(evaluator, options) {
|
|
3389
|
+
if ((evaluator.optimizationDirection === "MINIMIZE" || evaluator.optimizationDirection === "NEUTRAL") && !options.toComposite) throw new TypeError(`phoenixEvaluatorJudge requires toComposite for a ${evaluator.optimizationDirection} evaluator`);
|
|
3390
|
+
const paidCall = validatePaidEvaluation(evaluator.name, evaluator.kind, options.paidCall);
|
|
3391
|
+
return upstreamJudge({
|
|
3392
|
+
name: options.name ?? evaluator.name,
|
|
3393
|
+
dimension: options.dimension,
|
|
3394
|
+
judgeVersion: options.judgeVersion,
|
|
3395
|
+
appliesTo: options.appliesTo,
|
|
3396
|
+
toComposite: options.toComposite
|
|
3397
|
+
}, async (input) => {
|
|
3398
|
+
const result = await runUpstreamEvaluation({
|
|
3399
|
+
name: evaluator.name,
|
|
3400
|
+
kind: evaluator.kind,
|
|
3401
|
+
signal: input.signal,
|
|
3402
|
+
costLedger: input.costLedger,
|
|
3403
|
+
costPhase: input.costPhase,
|
|
3404
|
+
costTags: input.costTags,
|
|
3405
|
+
scenarioId: input.scenario.id,
|
|
3406
|
+
paidCall,
|
|
3407
|
+
execute: (context) => evaluator.evaluate(options.mapInput({
|
|
3408
|
+
artifact: input.artifact,
|
|
3409
|
+
scenario: input.scenario
|
|
3410
|
+
}), context)
|
|
3411
|
+
});
|
|
3412
|
+
if (result.score === void 0 || !Number.isFinite(result.score)) throw new Error(`${evaluator.name}: Phoenix evaluator returned no finite score`);
|
|
3413
|
+
return {
|
|
3414
|
+
score: result.score,
|
|
3415
|
+
notes: [result.label, result.explanation].filter(Boolean).join(": ") || evaluator.name
|
|
3416
|
+
};
|
|
3417
|
+
});
|
|
3418
|
+
}
|
|
3419
|
+
function autoevalsScorerJudge(scorer, options) {
|
|
3420
|
+
const paidCall = validatePaidEvaluation(options.name, options.kind, options.paidCall);
|
|
3421
|
+
return upstreamJudge(options, async (input) => {
|
|
3422
|
+
const result = await runUpstreamEvaluation({
|
|
3423
|
+
name: options.name,
|
|
3424
|
+
kind: options.kind,
|
|
3425
|
+
signal: input.signal,
|
|
3426
|
+
costLedger: input.costLedger,
|
|
3427
|
+
costPhase: input.costPhase,
|
|
3428
|
+
costTags: input.costTags,
|
|
3429
|
+
scenarioId: input.scenario.id,
|
|
3430
|
+
paidCall,
|
|
3431
|
+
execute: (context) => scorer(options.mapInput({
|
|
3432
|
+
artifact: input.artifact,
|
|
3433
|
+
scenario: input.scenario
|
|
3434
|
+
}), context)
|
|
3435
|
+
});
|
|
3436
|
+
if (result.score === null || !Number.isFinite(result.score)) throw new Error(`${options.name}: Autoevals scorer returned no finite score`);
|
|
3437
|
+
return {
|
|
3438
|
+
score: result.score,
|
|
3439
|
+
notes: result.metadata ? JSON.stringify(result.metadata) : result.name
|
|
3440
|
+
};
|
|
3441
|
+
});
|
|
3442
|
+
}
|
|
3443
|
+
function upstreamJudge(options, evaluate) {
|
|
3444
|
+
const dimension = options.dimension ?? options.name;
|
|
3445
|
+
return {
|
|
3446
|
+
name: options.name,
|
|
3447
|
+
judgeVersion: options.judgeVersion,
|
|
3448
|
+
dimensions: [{
|
|
3449
|
+
key: dimension,
|
|
3450
|
+
description: `Score from ${options.name}`
|
|
3451
|
+
}],
|
|
3452
|
+
appliesTo: options.appliesTo,
|
|
3453
|
+
async score(input) {
|
|
3454
|
+
const result = await evaluate(input);
|
|
3455
|
+
const composite = options.toComposite ? options.toComposite(result.score) : result.score;
|
|
3456
|
+
if (!Number.isFinite(composite)) throw new Error(`${options.name}: toComposite returned a non-finite score`);
|
|
3457
|
+
return {
|
|
3458
|
+
dimensions: { [dimension]: result.score },
|
|
3459
|
+
composite,
|
|
3460
|
+
notes: result.notes
|
|
3461
|
+
};
|
|
3462
|
+
}
|
|
3463
|
+
};
|
|
3464
|
+
}
|
|
3465
|
+
function validatePaidEvaluation(name, kind, paidCall) {
|
|
3466
|
+
if (kind === "CODE") {
|
|
3467
|
+
if (paidCall) throw new TypeError(`${name}: CODE evaluator cannot declare paidCall`);
|
|
3468
|
+
return;
|
|
3469
|
+
}
|
|
3470
|
+
if (!paidCall) throw new TypeError(`${name}: LLM evaluator requires paidCall cost and token capture`);
|
|
3471
|
+
if (!paidCall.model.trim()) throw new TypeError(`${name}: paidCall.model must be non-empty`);
|
|
3472
|
+
return paidCall;
|
|
3473
|
+
}
|
|
3474
|
+
async function runUpstreamEvaluation(input) {
|
|
3475
|
+
if (input.kind === "CODE") return abortableEvaluation(input.signal, () => input.execute({ signal: input.signal }));
|
|
3476
|
+
if (!input.paidCall) throw new CostAccountingIncompleteError(`${input.name}: missing paid-call configuration`);
|
|
3477
|
+
if (!input.costLedger) throw new CostAccountingIncompleteError(`${input.name}: LLM evaluator requires the campaign cost ledger`);
|
|
3478
|
+
const paid = await input.costLedger.runPaidCall({
|
|
3479
|
+
channel: "judge",
|
|
3480
|
+
phase: input.costPhase ?? "judge",
|
|
3481
|
+
actor: input.name,
|
|
3482
|
+
model: input.paidCall.model,
|
|
3483
|
+
...input.paidCall.maximumCharge ? { maximumCharge: input.paidCall.maximumCharge } : {},
|
|
3484
|
+
tags: {
|
|
3485
|
+
...input.costTags,
|
|
3486
|
+
scenarioId: input.scenarioId
|
|
3487
|
+
},
|
|
3488
|
+
signal: input.signal,
|
|
3489
|
+
execute: (signal, callId) => Promise.resolve(input.execute({
|
|
3490
|
+
signal,
|
|
3491
|
+
callId
|
|
3492
|
+
})),
|
|
3493
|
+
receipt: input.paidCall.receipt,
|
|
3494
|
+
...input.paidCall.receiptFromError ? { receiptFromError: input.paidCall.receiptFromError } : {}
|
|
3495
|
+
});
|
|
3496
|
+
if (!paid.succeeded) throw paid.error;
|
|
3497
|
+
const recorded = input.costLedger.list().find((receipt) => receipt.callId === paid.callId);
|
|
3498
|
+
if (!recorded) throw new CostAccountingIncompleteError(`${input.name}: paid evaluator returned without a recorded cost receipt`);
|
|
3499
|
+
if (recorded.costUnknown || recorded.usageUnknown) throw new CostAccountingIncompleteError(`${input.name}: paid evaluator returned without complete cost and token usage`);
|
|
3500
|
+
return paid.value;
|
|
3501
|
+
}
|
|
3502
|
+
async function abortableEvaluation(signal, execute) {
|
|
3503
|
+
if (signal.aborted) throw signal.reason;
|
|
3504
|
+
let rejectAborted;
|
|
3505
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
3506
|
+
rejectAborted = reject;
|
|
3507
|
+
});
|
|
3508
|
+
const onAbort = () => rejectAborted(signal.reason);
|
|
3509
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
3510
|
+
try {
|
|
3511
|
+
return await Promise.race([Promise.resolve().then(execute), aborted]);
|
|
3512
|
+
} finally {
|
|
3513
|
+
signal.removeEventListener("abort", onAbort);
|
|
3514
|
+
}
|
|
3515
|
+
}
|
|
3516
|
+
//#endregion
|
|
3376
3517
|
//#region src/campaign/worktree/index.ts
|
|
3377
3518
|
/**
|
|
3378
3519
|
* VCS-pluggable worktree adapter. One improvement = one worktree, PR-like
|
|
@@ -3894,6 +4035,6 @@ function resolveWorktreePath(surface, worktreeDir) {
|
|
|
3894
4035
|
return verifyCodeSurface(surface, worktreeDir).path;
|
|
3895
4036
|
}
|
|
3896
4037
|
//#endregion
|
|
3897
|
-
export {
|
|
4038
|
+
export { loadEvalFixture as A, agentProfileModelId as B, LabeledScenarioStoreError as C, sequentialPairedGate as D, sequentialDecide as E, traceAnalystQualityJudge as F, createLlmCorrectnessChecker as G, harnessAxisOf as H, CODING_HARNESSES as I, verifyCompletion as J, createTokenRecallChecker as K, HARNESS_NATIVE_MODEL as L, planEvalFixtureRun as M, analyzeCrossSurfaceInteractions as N, neutralizationGate as O, buildTraceAnalystSurfaceDispatch as P, agentProfileHash as R, FsLabeledScenarioStore as S, rolloutArgumentDiff as T, extractProducedState as U, expandProfileAxes as V, completionVerdict as W, renderScoreboardMarkdown as _, autoevalsScorerJudge as a, userStoryScoreboard as b, FileSearchLedger as c, validateSearchLedgerEvent as d, scoreDiscrimination as f, makePlaybackDispatch as g, runProfileMatrix as h, verifyCodeSurface as i, loadEvalFixtureScenarios as j, discoverEvalFixtures as k, SEARCH_LEDGER_SCHEMA as l, ProfileMatrixError as m, gitWorktreeAdapter as n, phoenixEvaluatorJudge as o, selectDiscriminative as p, parseCorrectnessResponse as q, resolveWorktreePath as r, isTransientTransportFailure as s, WorktreeAdapterError as t, openSearchLedger as u, scoreUserStory as v, classifyUngroundedLiterals as w, neutralizeText as x, scoreboardSummary as y, agentProfileId as z };
|
|
3898
4039
|
|
|
3899
|
-
//# sourceMappingURL=campaign-
|
|
4040
|
+
//# sourceMappingURL=campaign-BIBS-NHV.js.map
|