@tangle-network/agent-eval 0.136.0 → 0.137.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 +38 -1
- package/README.md +4 -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 +139 -17
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +606 -4
- 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-PVtnfjvA.d.ts} +6 -6
- package/dist/{analyze-runs-Cda5Xkj1.d.ts.map → analyze-runs-PVtnfjvA.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-CHX4orG7.d.ts +184 -0
- package/dist/benchmark-CHX4orG7.d.ts.map +1 -0
- package/dist/benchmark-YDrpumqB.js +414 -0
- package/dist/benchmark-YDrpumqB.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-DCLkQOmc.js} +3 -3
- package/dist/{benchmarks-Dfgm9ts5.js.map → benchmarks-DCLkQOmc.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 +3 -3
- package/dist/{campaign-Dz8uQnhC.js → campaign-lgObcHFC.js} +212 -78
- package/dist/campaign-lgObcHFC.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/client-C8L6h6Wf.d.ts +202 -0
- package/dist/client-C8L6h6Wf.d.ts.map +1 -0
- package/dist/completion-verifier-DSyRNVzU.d.ts +240 -0
- package/dist/completion-verifier-DSyRNVzU.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 +10 -10
- package/dist/control.d.ts +2 -2
- package/dist/control.js +1 -1
- package/dist/{cost-ledger-DHAjwNj7.js → cost-ledger-D-5_-dhi.js} +2 -2
- package/dist/{cost-ledger-DHAjwNj7.js.map → cost-ledger-D-5_-dhi.js.map} +1 -1
- package/dist/{cost-ledger-fGS_u_O1.d.ts → cost-ledger-D2o6JOrL.d.ts} +2 -2
- package/dist/{cost-ledger-fGS_u_O1.d.ts.map → cost-ledger-D2o6JOrL.d.ts.map} +1 -1
- 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-CHmdy2An.js → default-registry-CLXbRt0f.js} +119 -38
- package/dist/default-registry-CLXbRt0f.js.map +1 -0
- package/dist/{default-registry-Brxr728w.d.ts → default-registry-Dc5D_Loc.d.ts} +63 -137
- package/dist/default-registry-Dc5D_Loc.d.ts.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-CHqfLnff.js} +6 -6
- package/dist/{eval-campaign-Cc8WZJ6b.js.map → eval-campaign-CHqfLnff.js.map} +1 -1
- package/dist/{extract-usage-DIQpN-ww.js → extract-usage-p-56bh8q.js} +3 -3
- package/dist/{extract-usage-DIQpN-ww.js.map → extract-usage-p-56bh8q.js.map} +1 -1
- package/dist/{feedback-trajectory-CVaeREXV.d.ts → feedback-trajectory-N_F0PwHz.d.ts} +90 -3
- package/dist/feedback-trajectory-N_F0PwHz.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-BipJlj-C.d.ts +316 -0
- package/dist/index-BipJlj-C.d.ts.map +1 -0
- package/dist/{index-CQsJcqch.d.ts → index-BnP1QJUv.d.ts} +5 -5
- package/dist/{index-CQsJcqch.d.ts.map → index-BnP1QJUv.d.ts.map} +1 -1
- package/dist/{index-B4Fjfo5U.d.ts → index-C-Pr4OWg.d.ts} +88 -317
- package/dist/index-C-Pr4OWg.d.ts.map +1 -0
- package/dist/{index-DuhJaaiH.d.ts → index-DEb46kc6.d.ts} +2 -2
- package/dist/{index-DuhJaaiH.d.ts.map → index-DEb46kc6.d.ts.map} +1 -1
- package/dist/{index-C2fkZhv_.d.ts → index-DRNl6g_N.d.ts} +3 -3
- package/dist/{index-C2fkZhv_.d.ts.map → index-DRNl6g_N.d.ts.map} +1 -1
- package/dist/{index-AbhwHp0V.d.ts → index-U3RHOShi.d.ts} +2 -2
- package/dist/{index-AbhwHp0V.d.ts.map → index-U3RHOShi.d.ts.map} +1 -1
- package/dist/index.d.ts +29 -70
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +507 -33
- package/dist/index.js.map +1 -1
- package/dist/{client-DcvgkaZi.d.ts → insight-report-B9ooYH_g.d.ts} +5 -203
- package/dist/insight-report-B9ooYH_g.d.ts.map +1 -0
- package/dist/integrity-CCXTftiL.js +1360 -0
- package/dist/integrity-CCXTftiL.js.map +1 -0
- package/dist/{integrity-rmVhXWA7.d.ts → integrity-CKxosZ5Z.d.ts} +3 -3
- package/dist/{integrity-rmVhXWA7.d.ts.map → integrity-CKxosZ5Z.d.ts.map} +1 -1
- 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-t6sItivm.js} +85 -85
- package/dist/{ledger-core-DAKFKRzi.js.map → ledger-core-t6sItivm.js.map} +1 -1
- package/dist/{llm-client-DHx8pzyJ.js → llm-client-DKB25jV8.js} +3 -3
- package/dist/{llm-client-DHx8pzyJ.js.map → llm-client-DKB25jV8.js.map} +1 -1
- 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/{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-BdM7SuTr.d.ts +124 -0
- package/dist/registry-BdM7SuTr.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-CofgVNZt.d.ts} +4 -4
- package/dist/{release-report-DpBxGGI1.d.ts.map → release-report-CofgVNZt.d.ts.map} +1 -1
- package/dist/{replay-C6wRg47C.js → replay-Bju0T8Ls.js} +248 -8
- package/dist/replay-Bju0T8Ls.js.map +1 -0
- package/dist/{replay-BRfMIs81.d.ts → replay-K8FaC0CB.d.ts} +227 -52
- package/dist/replay-K8FaC0CB.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-Da0Wj-bt.d.ts} +6 -7
- package/dist/researcher-Da0Wj-bt.d.ts.map +1 -0
- package/dist/{reward-hacking-D-QqXvg-.d.ts → reward-hacking-CQ3hTCO3.d.ts} +2 -2
- package/dist/{reward-hacking-D-QqXvg-.d.ts.map → reward-hacking-CQ3hTCO3.d.ts.map} +1 -1
- 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/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-C4sztLR3.d.ts} +2 -2
- package/dist/{rubric-predictive-validity-C1dCLcvb.d.ts.map → rubric-predictive-validity-C4sztLR3.d.ts.map} +1 -1
- package/dist/{run-evidence-DokQtX0-.d.ts → run-evidence-BDIircdA.d.ts} +3 -3
- package/dist/{run-evidence-DokQtX0-.d.ts.map → run-evidence-BDIircdA.d.ts.map} +1 -1
- package/dist/{run-record-DcObtIGh.d.ts → run-record-BPCa2rQ8.d.ts} +4 -4
- package/dist/{run-record-DcObtIGh.d.ts.map → run-record-BPCa2rQ8.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-Bz64IckK.js} +4 -4
- package/dist/{semantic-concept-judge-Btozx3Vc.js.map → semantic-concept-judge-Bz64IckK.js.map} +1 -1
- package/dist/{server-Bz3WQJs6.js → server-KjXZZUDX.js} +3 -3
- package/dist/{server-Bz3WQJs6.js.map → server-KjXZZUDX.js.map} +1 -1
- package/dist/{skill-usage-BDQVPIG1.d.ts → skill-usage-CFDLLlhF.d.ts} +25 -47
- package/dist/skill-usage-CFDLLlhF.d.ts.map +1 -0
- package/dist/{skillopt-optimization-method-CwSYkv35.d.ts → skillopt-optimization-method-BpbnlvAZ.d.ts} +11 -12
- package/dist/skillopt-optimization-method-BpbnlvAZ.d.ts.map +1 -0
- package/dist/{skillopt-optimization-method-0UmPD6aP.js → skillopt-optimization-method-f4o9sUT4.js} +7 -7
- package/dist/{skillopt-optimization-method-0UmPD6aP.js.map → skillopt-optimization-method-f4o9sUT4.js.map} +1 -1
- 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-_7P642CN.d.ts} +2 -2
- package/dist/{statistics-CKOqre5S.d.ts.map → statistics-_7P642CN.d.ts.map} +1 -1
- 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-DHipz9Kx.d.ts} +3 -3
- package/dist/{summary-report-CPMINBqs.d.ts.map → summary-report-DHipz9Kx.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-DZk2Jn64.js +1876 -0
- package/dist/tools-DZk2Jn64.js.map +1 -0
- package/dist/traces.d.ts +6 -7
- package/dist/traces.js +5 -6
- package/dist/{types-DVjczBM9.d.ts → types-CKswbJGO.d.ts} +260 -6
- package/dist/types-CKswbJGO.d.ts.map +1 -0
- package/dist/{types-DiWLru6Z.d.ts → types-CTGbIm57.d.ts} +5 -5
- package/dist/{types-DiWLru6Z.d.ts.map → types-CTGbIm57.d.ts.map} +1 -1
- package/dist/types-CTvKfr5F.d.ts +804 -0
- package/dist/types-CTvKfr5F.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/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 +374 -58
- package/package.json +5 -1
- 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/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/llm-client-BiK4HW0u.d.ts +0 -290
- package/dist/llm-client-BiK4HW0u.d.ts.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/skill-usage-BDQVPIG1.d.ts.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,21 @@
|
|
|
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 { $ as SEARCH_LEDGER_FILE_CONTEXT, B as surfaceContentHash, E as pairHoldout, Et as contentHash, F as assertCodeSurfaceIdentity, J as planCampaignRun, Pt as recoverTruncatedJson, Ut as summarizeBackendIntegrity, Vt as assertRealBackend, Wt as JudgeParseError, Y as runCampaign, et as SearchLedgerConflictError, h as labelTrustRank, nt as SearchLedgerIntegrityError, tt as SearchLedgerError } from "./skillopt-optimization-method-
|
|
6
|
-
import { C as mulberry32, E as pairedBootstrap, m as eProcess } from "./statistics-
|
|
7
|
-
import { t as comparePairedArms } from "./paired-arms-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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-D-5_-dhi.js";
|
|
4
|
+
import { f as maximumChargeForLlmRequest, l as costReceiptFromLlm, u as costReceiptFromLlmError } from "./llm-client-DKB25jV8.js";
|
|
5
|
+
import { $ as SEARCH_LEDGER_FILE_CONTEXT, B as surfaceContentHash, E as pairHoldout, Et as contentHash, F as assertCodeSurfaceIdentity, J as planCampaignRun, Pt as recoverTruncatedJson, Ut as summarizeBackendIntegrity, Vt as assertRealBackend, Wt as JudgeParseError, Y as runCampaign, et as SearchLedgerConflictError, h as labelTrustRank, nt as SearchLedgerIntegrityError, tt as SearchLedgerError } from "./skillopt-optimization-method-f4o9sUT4.js";
|
|
6
|
+
import { C as mulberry32, E as pairedBootstrap, m as eProcess } from "./statistics-ByxzSiOM.js";
|
|
7
|
+
import { t as comparePairedArms } from "./paired-arms-iZ08VFMN.js";
|
|
8
|
+
import { m as canonicalString, t as FileLedgerJournal } from "./ledger-core-t6sItivm.js";
|
|
9
|
+
import { o as runTaskScore, r as modelHasSnapshot, s as validateRunRecord } from "./run-record-vRgqWmJw.js";
|
|
10
|
+
import { r as scoreAnalystFindings } from "./benchmark-YDrpumqB.js";
|
|
11
|
+
import { c as campaignCellToRunRecord } from "./reward-hacking-GyN0kMd8.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { closeSync, constants, existsSync, fstatSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
14
14
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
15
15
|
import { createHash, randomUUID } from "node:crypto";
|
|
16
|
+
import { harnessSupportsModel } from "@tangle-network/agent-interface";
|
|
16
17
|
import { devNull, tmpdir } from "node:os";
|
|
17
18
|
import { execFileSync } from "node:child_process";
|
|
18
|
-
import { harnessSupportsModel } from "@tangle-network/agent-interface";
|
|
19
19
|
//#region src/completion-verifier.ts
|
|
20
20
|
/**
|
|
21
21
|
* Completion verifier — the task-completion oracle.
|
|
@@ -623,78 +623,82 @@ function agentProfileHash(profile) {
|
|
|
623
623
|
}
|
|
624
624
|
//#endregion
|
|
625
625
|
//#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
|
|
626
|
+
function buildTraceAnalystSurfaceDispatch(options) {
|
|
627
|
+
return async (surface, scenario, context) => {
|
|
628
|
+
if (typeof surface !== "string") throw new TypeError(`buildTraceAnalystSurfaceDispatch requires a string prompt, received ${surface.kind}`);
|
|
629
|
+
return options.analyze({
|
|
630
|
+
actorDescription: surface,
|
|
631
|
+
traceStore: scenario.traceStore,
|
|
632
|
+
runId: `${context.cellId}:${scenario.id}`,
|
|
633
|
+
signal: context.signal
|
|
643
634
|
});
|
|
644
|
-
return {
|
|
645
|
-
answer: res.answer,
|
|
646
|
-
findings: res.findings,
|
|
647
|
-
actorPromptVersion: res.actorPromptVersion
|
|
648
|
-
};
|
|
649
635
|
};
|
|
650
636
|
}
|
|
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;
|
|
637
|
+
function traceAnalystQualityJudge() {
|
|
660
638
|
return {
|
|
661
|
-
name: "
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
639
|
+
name: "trace-analyst-quality",
|
|
640
|
+
judgeVersion: "agent-eval:trace-analyst-quality:v2",
|
|
641
|
+
dimensions: [
|
|
642
|
+
{
|
|
643
|
+
key: "issue_recall",
|
|
644
|
+
description: "share of labeled issues found"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
key: "finding_precision",
|
|
648
|
+
description: "share of findings tied to a labeled issue"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
key: "f1",
|
|
652
|
+
description: "harmonic mean of issue recall and finding precision"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
key: "critical_step_accuracy",
|
|
656
|
+
description: "share of labeled causal steps cited"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
key: "citation_coverage",
|
|
660
|
+
description: "share of findings with evidence citations"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
key: "citation_label_agreement",
|
|
664
|
+
description: "share of citations matching a labeled case location"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
key: "clean",
|
|
668
|
+
description: "1 when a clean case produces no findings"
|
|
683
669
|
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
return {
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
composite,
|
|
693
|
-
notes
|
|
694
|
-
};
|
|
670
|
+
],
|
|
671
|
+
appliesTo: (scenario) => scenario.kind === "trace-analyst",
|
|
672
|
+
score({ artifact, scenario }) {
|
|
673
|
+
return traceAnalystJudgeScore(scoreAnalystFindings({
|
|
674
|
+
id: scenario.id,
|
|
675
|
+
expectedIssues: scenario.expectedIssues,
|
|
676
|
+
labeledEvidence: scenario.labeledEvidence
|
|
677
|
+
}, artifact.findings));
|
|
695
678
|
}
|
|
696
679
|
};
|
|
697
680
|
}
|
|
681
|
+
function traceAnalystJudgeScore(score) {
|
|
682
|
+
const dimensions = {
|
|
683
|
+
issue_recall: score.issueRecall,
|
|
684
|
+
finding_precision: score.findingPrecision,
|
|
685
|
+
f1: score.f1,
|
|
686
|
+
clean: score.cleanFalsePositive ? 0 : 1
|
|
687
|
+
};
|
|
688
|
+
if (score.criticalStepAccuracy !== null) dimensions.critical_step_accuracy = score.criticalStepAccuracy;
|
|
689
|
+
if (score.citationCoverage !== null) dimensions.citation_coverage = score.citationCoverage;
|
|
690
|
+
if (score.citationLabelAgreement !== null) dimensions.citation_label_agreement = score.citationLabelAgreement;
|
|
691
|
+
const notes = [
|
|
692
|
+
`${score.matchedIssueIds.length}/${score.expectedIssueCount} issues found`,
|
|
693
|
+
`${score.supportedFindingIndexes.length}/${score.supportedFindingIndexes.length + score.unsupportedFindingIndexes.length} findings supported`,
|
|
694
|
+
`${score.unlabeledEvidence.length} citations outside labeled locations`
|
|
695
|
+
].join("; ");
|
|
696
|
+
return {
|
|
697
|
+
dimensions,
|
|
698
|
+
composite: score.criticalStepAccuracy === null ? score.f1 : (score.f1 + score.criticalStepAccuracy) / 2,
|
|
699
|
+
notes
|
|
700
|
+
};
|
|
701
|
+
}
|
|
698
702
|
//#endregion
|
|
699
703
|
//#region src/campaign/cross-surface-context.ts
|
|
700
704
|
function validateCrossSurfaceInput(input) {
|
|
@@ -3373,6 +3377,136 @@ function isTransientTransportFailure(message, opts = {}) {
|
|
|
3373
3377
|
return false;
|
|
3374
3378
|
}
|
|
3375
3379
|
//#endregion
|
|
3380
|
+
//#region src/campaign/upstream-evaluators.ts
|
|
3381
|
+
function phoenixEvaluatorJudge(evaluator, options) {
|
|
3382
|
+
if ((evaluator.optimizationDirection === "MINIMIZE" || evaluator.optimizationDirection === "NEUTRAL") && !options.toComposite) throw new TypeError(`phoenixEvaluatorJudge requires toComposite for a ${evaluator.optimizationDirection} evaluator`);
|
|
3383
|
+
const paidCall = validatePaidEvaluation(evaluator.name, evaluator.kind, options.paidCall);
|
|
3384
|
+
return upstreamJudge({
|
|
3385
|
+
name: options.name ?? evaluator.name,
|
|
3386
|
+
dimension: options.dimension,
|
|
3387
|
+
judgeVersion: options.judgeVersion,
|
|
3388
|
+
appliesTo: options.appliesTo,
|
|
3389
|
+
toComposite: options.toComposite
|
|
3390
|
+
}, async (input) => {
|
|
3391
|
+
const result = await runUpstreamEvaluation({
|
|
3392
|
+
name: evaluator.name,
|
|
3393
|
+
kind: evaluator.kind,
|
|
3394
|
+
signal: input.signal,
|
|
3395
|
+
costLedger: input.costLedger,
|
|
3396
|
+
costPhase: input.costPhase,
|
|
3397
|
+
costTags: input.costTags,
|
|
3398
|
+
scenarioId: input.scenario.id,
|
|
3399
|
+
paidCall,
|
|
3400
|
+
execute: (context) => evaluator.evaluate(options.mapInput({
|
|
3401
|
+
artifact: input.artifact,
|
|
3402
|
+
scenario: input.scenario
|
|
3403
|
+
}), context)
|
|
3404
|
+
});
|
|
3405
|
+
if (result.score === void 0 || !Number.isFinite(result.score)) throw new Error(`${evaluator.name}: Phoenix evaluator returned no finite score`);
|
|
3406
|
+
return {
|
|
3407
|
+
score: result.score,
|
|
3408
|
+
notes: [result.label, result.explanation].filter(Boolean).join(": ") || evaluator.name
|
|
3409
|
+
};
|
|
3410
|
+
});
|
|
3411
|
+
}
|
|
3412
|
+
function autoevalsScorerJudge(scorer, options) {
|
|
3413
|
+
const paidCall = validatePaidEvaluation(options.name, options.kind, options.paidCall);
|
|
3414
|
+
return upstreamJudge(options, async (input) => {
|
|
3415
|
+
const result = await runUpstreamEvaluation({
|
|
3416
|
+
name: options.name,
|
|
3417
|
+
kind: options.kind,
|
|
3418
|
+
signal: input.signal,
|
|
3419
|
+
costLedger: input.costLedger,
|
|
3420
|
+
costPhase: input.costPhase,
|
|
3421
|
+
costTags: input.costTags,
|
|
3422
|
+
scenarioId: input.scenario.id,
|
|
3423
|
+
paidCall,
|
|
3424
|
+
execute: (context) => scorer(options.mapInput({
|
|
3425
|
+
artifact: input.artifact,
|
|
3426
|
+
scenario: input.scenario
|
|
3427
|
+
}), context)
|
|
3428
|
+
});
|
|
3429
|
+
if (result.score === null || !Number.isFinite(result.score)) throw new Error(`${options.name}: Autoevals scorer returned no finite score`);
|
|
3430
|
+
return {
|
|
3431
|
+
score: result.score,
|
|
3432
|
+
notes: result.metadata ? JSON.stringify(result.metadata) : result.name
|
|
3433
|
+
};
|
|
3434
|
+
});
|
|
3435
|
+
}
|
|
3436
|
+
function upstreamJudge(options, evaluate) {
|
|
3437
|
+
const dimension = options.dimension ?? options.name;
|
|
3438
|
+
return {
|
|
3439
|
+
name: options.name,
|
|
3440
|
+
judgeVersion: options.judgeVersion,
|
|
3441
|
+
dimensions: [{
|
|
3442
|
+
key: dimension,
|
|
3443
|
+
description: `Score from ${options.name}`
|
|
3444
|
+
}],
|
|
3445
|
+
appliesTo: options.appliesTo,
|
|
3446
|
+
async score(input) {
|
|
3447
|
+
const result = await evaluate(input);
|
|
3448
|
+
const composite = options.toComposite ? options.toComposite(result.score) : result.score;
|
|
3449
|
+
if (!Number.isFinite(composite)) throw new Error(`${options.name}: toComposite returned a non-finite score`);
|
|
3450
|
+
return {
|
|
3451
|
+
dimensions: { [dimension]: result.score },
|
|
3452
|
+
composite,
|
|
3453
|
+
notes: result.notes
|
|
3454
|
+
};
|
|
3455
|
+
}
|
|
3456
|
+
};
|
|
3457
|
+
}
|
|
3458
|
+
function validatePaidEvaluation(name, kind, paidCall) {
|
|
3459
|
+
if (kind === "CODE") {
|
|
3460
|
+
if (paidCall) throw new TypeError(`${name}: CODE evaluator cannot declare paidCall`);
|
|
3461
|
+
return;
|
|
3462
|
+
}
|
|
3463
|
+
if (!paidCall) throw new TypeError(`${name}: LLM evaluator requires paidCall cost and token capture`);
|
|
3464
|
+
if (!paidCall.model.trim()) throw new TypeError(`${name}: paidCall.model must be non-empty`);
|
|
3465
|
+
return paidCall;
|
|
3466
|
+
}
|
|
3467
|
+
async function runUpstreamEvaluation(input) {
|
|
3468
|
+
if (input.kind === "CODE") return abortableEvaluation(input.signal, () => input.execute({ signal: input.signal }));
|
|
3469
|
+
if (!input.paidCall) throw new CostAccountingIncompleteError(`${input.name}: missing paid-call configuration`);
|
|
3470
|
+
if (!input.costLedger) throw new CostAccountingIncompleteError(`${input.name}: LLM evaluator requires the campaign cost ledger`);
|
|
3471
|
+
const paid = await input.costLedger.runPaidCall({
|
|
3472
|
+
channel: "judge",
|
|
3473
|
+
phase: input.costPhase ?? "judge",
|
|
3474
|
+
actor: input.name,
|
|
3475
|
+
model: input.paidCall.model,
|
|
3476
|
+
...input.paidCall.maximumCharge ? { maximumCharge: input.paidCall.maximumCharge } : {},
|
|
3477
|
+
tags: {
|
|
3478
|
+
...input.costTags,
|
|
3479
|
+
scenarioId: input.scenarioId
|
|
3480
|
+
},
|
|
3481
|
+
signal: input.signal,
|
|
3482
|
+
execute: (signal, callId) => Promise.resolve(input.execute({
|
|
3483
|
+
signal,
|
|
3484
|
+
callId
|
|
3485
|
+
})),
|
|
3486
|
+
receipt: input.paidCall.receipt,
|
|
3487
|
+
...input.paidCall.receiptFromError ? { receiptFromError: input.paidCall.receiptFromError } : {}
|
|
3488
|
+
});
|
|
3489
|
+
if (!paid.succeeded) throw paid.error;
|
|
3490
|
+
const recorded = input.costLedger.list().find((receipt) => receipt.callId === paid.callId);
|
|
3491
|
+
if (!recorded) throw new CostAccountingIncompleteError(`${input.name}: paid evaluator returned without a recorded cost receipt`);
|
|
3492
|
+
if (recorded.costUnknown || recorded.usageUnknown) throw new CostAccountingIncompleteError(`${input.name}: paid evaluator returned without complete cost and token usage`);
|
|
3493
|
+
return paid.value;
|
|
3494
|
+
}
|
|
3495
|
+
async function abortableEvaluation(signal, execute) {
|
|
3496
|
+
if (signal.aborted) throw signal.reason;
|
|
3497
|
+
let rejectAborted;
|
|
3498
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
3499
|
+
rejectAborted = reject;
|
|
3500
|
+
});
|
|
3501
|
+
const onAbort = () => rejectAborted(signal.reason);
|
|
3502
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
3503
|
+
try {
|
|
3504
|
+
return await Promise.race([Promise.resolve().then(execute), aborted]);
|
|
3505
|
+
} finally {
|
|
3506
|
+
signal.removeEventListener("abort", onAbort);
|
|
3507
|
+
}
|
|
3508
|
+
}
|
|
3509
|
+
//#endregion
|
|
3376
3510
|
//#region src/campaign/worktree/index.ts
|
|
3377
3511
|
/**
|
|
3378
3512
|
* VCS-pluggable worktree adapter. One improvement = one worktree, PR-like
|
|
@@ -3894,6 +4028,6 @@ function resolveWorktreePath(surface, worktreeDir) {
|
|
|
3894
4028
|
return verifyCodeSurface(surface, worktreeDir).path;
|
|
3895
4029
|
}
|
|
3896
4030
|
//#endregion
|
|
3897
|
-
export {
|
|
4031
|
+
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
4032
|
|
|
3899
|
-
//# sourceMappingURL=campaign-
|
|
4033
|
+
//# sourceMappingURL=campaign-lgObcHFC.js.map
|