@tangle-network/agent-eval 1.0.39 → 1.0.40
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 +4 -0
- package/dist/adapters/http.d.ts +1 -1
- package/dist/{agent-profile-BKgR30kv.d.ts → agent-profile-hytrwAnN.d.ts} +166 -166
- package/dist/agent-profile-hytrwAnN.d.ts.map +1 -0
- package/dist/analyst/index.d.ts +2 -2
- package/dist/analyst/index.js +5 -5
- package/dist/app-grade/index.d.ts +1 -1
- package/dist/{benchmark-command-BpmrrgzA.js → benchmark-command-CJw3ijDV.js} +5 -5
- package/dist/{benchmark-command-BpmrrgzA.js.map → benchmark-command-CJw3ijDV.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +2 -2
- package/dist/campaign/index.d.ts +3 -3
- package/dist/campaign/index.js +3 -3
- package/dist/{campaign-UzOUBIwA.js → campaign-DawSkDag.js} +3 -3
- package/dist/{campaign-UzOUBIwA.js.map → campaign-DawSkDag.js.map} +1 -1
- package/dist/{statistical-heldout-RmdXoz2e.d.ts → campaign-evidence-C1c6uihA.d.ts} +413 -413
- package/dist/campaign-evidence-C1c6uihA.d.ts.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/contract/index.d.ts +5 -5
- package/dist/contract/index.js +4 -4
- package/dist/{default-registry-DSo3tnsW.js → default-registry-BE5Rj9ba.js} +2 -2
- package/dist/{default-registry-DSo3tnsW.js.map → default-registry-BE5Rj9ba.js.map} +1 -1
- package/dist/default-registry-C5x2jyD6.d.ts.map +1 -1
- package/dist/{define-agent-eval-4KGwzIVt.d.ts → define-agent-eval-C4yoCqkc.d.ts} +3 -4
- package/dist/define-agent-eval-C4yoCqkc.d.ts.map +1 -0
- package/dist/{define-agent-eval-C6zFzxp7.js → define-agent-eval-CyU7eAzj.js} +5 -4
- package/dist/define-agent-eval-CyU7eAzj.js.map +1 -0
- package/dist/{dspy-rlm-engine-EC-Pkdf-.js → dspy-rlm-engine-aM1RWOUT.js} +2 -2
- package/dist/{dspy-rlm-engine-EC-Pkdf-.js.map → dspy-rlm-engine-aM1RWOUT.js.map} +1 -1
- package/dist/experiment/index.d.ts +1 -1
- package/dist/{feedback-trajectory-FamLu3Wt.d.ts → feedback-trajectory-CCWiFzeE.d.ts} +2 -2
- package/dist/{feedback-trajectory-FamLu3Wt.d.ts.map → feedback-trajectory-CCWiFzeE.d.ts.map} +1 -1
- package/dist/{findings-store-71J302Ls.js → findings-store-B8pq8Rhr.js} +3 -3
- package/dist/{findings-store-71J302Ls.js.map → findings-store-B8pq8Rhr.js.map} +1 -1
- package/dist/{index-BsTGJf2M.d.ts → index-BuuUhU_V.d.ts} +9 -9
- package/dist/{index-BsTGJf2M.d.ts.map → index-BuuUhU_V.d.ts.map} +1 -1
- package/dist/{index-CzEGCOWM.d.ts → index-CXoFLNKI.d.ts} +4 -4
- package/dist/{index-CzEGCOWM.d.ts.map → index-CXoFLNKI.d.ts.map} +1 -1
- package/dist/{index-RBV2Y-7X.d.ts → index-HdlzN11G.d.ts} +2 -2
- package/dist/{index-RBV2Y-7X.d.ts.map → index-HdlzN11G.d.ts.map} +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.js +8 -8
- package/dist/{kind-factory-BTUq1Byh.js → kind-factory-B5FfFE5G.js} +20 -2
- package/dist/{kind-factory-BTUq1Byh.js.map → kind-factory-B5FfFE5G.js.map} +1 -1
- package/dist/{llm-judge-lUQCBY1e.js → llm-judge-DHgx29ro.js} +59 -24
- package/dist/llm-judge-DHgx29ro.js.map +1 -0
- package/dist/openapi.json +1 -1
- package/dist/{researcher-k925Q6Jb.d.ts → researcher-DvFDa1o1.d.ts} +2 -2
- package/dist/{researcher-k925Q6Jb.d.ts.map → researcher-DvFDa1o1.d.ts.map} +1 -1
- package/dist/rl.d.ts +1 -1
- package/dist/{index-OvU1UXKC.d.ts → run-improvement-loop-BAxDnaPI.d.ts} +1619 -1619
- package/dist/run-improvement-loop-BAxDnaPI.d.ts.map +1 -0
- package/dist/{skillopt-optimization-method-Dch9LiNR.js → skillopt-optimization-method-Du3GbReg.js} +10 -4
- package/dist/{skillopt-optimization-method-Dch9LiNR.js.map → skillopt-optimization-method-Du3GbReg.js.map} +1 -1
- package/dist/{store-otlp-DQK9hCtH.js → store-otlp-DHc_E78m.js} +2 -2
- package/dist/{store-otlp-DQK9hCtH.js.map → store-otlp-DHc_E78m.js.map} +1 -1
- package/dist/{store-tool-spans-BRR9hsPP.js → store-tool-spans-BR4IhZYZ.js} +3 -3
- package/dist/{store-tool-spans-BRR9hsPP.js.map → store-tool-spans-BR4IhZYZ.js.map} +1 -1
- package/dist/traces.js +3 -3
- package/dist/wire/index.d.ts +3 -3
- package/package.json +1 -1
- package/dist/agent-profile-BKgR30kv.d.ts.map +0 -1
- package/dist/define-agent-eval-4KGwzIVt.d.ts.map +0 -1
- package/dist/define-agent-eval-C6zFzxp7.js.map +0 -1
- package/dist/index-OvU1UXKC.d.ts.map +0 -1
- package/dist/llm-judge-lUQCBY1e.js.map +0 -1
- package/dist/statistical-heldout-RmdXoz2e.d.ts.map +0 -1
|
@@ -104,7 +104,7 @@ function computeAggregates(cells, judges, seed, cost) {
|
|
|
104
104
|
return {
|
|
105
105
|
byJudge,
|
|
106
106
|
byScenario,
|
|
107
|
-
cost:
|
|
107
|
+
cost: withUncapturedAgentSpend(cost, [{ cells }]),
|
|
108
108
|
cellsExecuted: cells.filter((cell) => !cell.error?.startsWith("skipped:") && cell.errorStage !== "dispatch" && !(cell.error && cell.errorStage === void 0)).length,
|
|
109
109
|
cellsSkipped: cells.filter((c) => c.error?.startsWith("skipped:")).length,
|
|
110
110
|
cellsCached: cells.filter((c) => c.cached).length,
|
|
@@ -119,12 +119,16 @@ function computeAggregates(cells, judges, seed, cost) {
|
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
123
|
-
* capture. A
|
|
124
|
-
* ledger
|
|
122
|
+
* A cost read from the ledger, made incomplete by each executed cell whose agent spend the ledger
|
|
123
|
+
* did not capture. A ledger read counts only recorded calls, so an agent that paid outside the
|
|
124
|
+
* ledger would otherwise read as complete. A labeled campaign prefixes its reasons, so cells that
|
|
125
|
+
* share an id across arms stay distinct.
|
|
125
126
|
*/
|
|
126
|
-
function
|
|
127
|
-
const uncaptured = cells.filter((cell) => !cell.error?.startsWith("skipped:") && cell.costProvenance.kind === "uncaptured")
|
|
127
|
+
function withUncapturedAgentSpend(cost, campaigns) {
|
|
128
|
+
const uncaptured = campaigns.flatMap((campaign) => (campaign?.cells ?? []).filter((cell) => !cell.error?.startsWith("skipped:") && cell.costProvenance.kind === "uncaptured").map((cell) => ({
|
|
129
|
+
cell,
|
|
130
|
+
label: campaign?.label
|
|
131
|
+
})));
|
|
128
132
|
if (uncaptured.length === 0) return cost;
|
|
129
133
|
return {
|
|
130
134
|
...cost,
|
|
@@ -132,9 +136,9 @@ function withUncapturedAgentCells(cost, cells) {
|
|
|
132
136
|
kind: "uncaptured",
|
|
133
137
|
usd: null
|
|
134
138
|
},
|
|
135
|
-
usageComplete: cost.usageComplete && uncaptured.every((cell) => cell.tokenUsage.tokensKnown !== false),
|
|
139
|
+
...cost.usageComplete === void 0 ? {} : { usageComplete: cost.usageComplete && uncaptured.every(({ cell }) => cell.tokenUsage.tokensKnown !== false) },
|
|
136
140
|
accountingComplete: false,
|
|
137
|
-
incompleteReasons: [.../* @__PURE__ */ new Set([...cost.incompleteReasons, ...uncaptured.map((cell) => `agent spend for cell '${cell.cellId}' was not captured by the cost ledger`)])]
|
|
141
|
+
incompleteReasons: [.../* @__PURE__ */ new Set([...cost.incompleteReasons, ...uncaptured.map(({ cell, label }) => `${label ? `${label}: ` : ""}agent spend for cell '${cell.cellId}' was not captured by the cost ledger`)])]
|
|
138
142
|
};
|
|
139
143
|
}
|
|
140
144
|
function aggregate(samples, seed) {
|
|
@@ -2590,6 +2594,23 @@ function quoteArg(arg) {
|
|
|
2590
2594
|
}
|
|
2591
2595
|
// src/campaign/presets/run-final-comparison.ts
|
|
2592
2596
|
/** Compare a search-selected surface without changing the search's selection. */
|
|
2597
|
+
/** Each holdout campaign a final comparison dispatched, labeled by arm; a reused arm counts once. */
|
|
2598
|
+
function finalComparisonCampaigns(comparison) {
|
|
2599
|
+
return [
|
|
2600
|
+
{
|
|
2601
|
+
label: "holdout.baseline",
|
|
2602
|
+
cells: comparison.baselineOnHoldout.cells
|
|
2603
|
+
},
|
|
2604
|
+
...comparison.winnerOnHoldout === comparison.baselineOnHoldout ? [] : [{
|
|
2605
|
+
label: "holdout.winner",
|
|
2606
|
+
cells: comparison.winnerOnHoldout.cells
|
|
2607
|
+
}],
|
|
2608
|
+
...comparison.neutralizedOnHoldout ? [{
|
|
2609
|
+
label: "holdout.neutralized",
|
|
2610
|
+
cells: comparison.neutralizedOnHoldout.cells
|
|
2611
|
+
}] : []
|
|
2612
|
+
];
|
|
2613
|
+
}
|
|
2593
2614
|
async function runFinalComparison(opts) {
|
|
2594
2615
|
opts = {
|
|
2595
2616
|
...opts,
|
|
@@ -4964,25 +4985,30 @@ function optimizationResult(run, baselineSurface, result) {
|
|
|
4964
4985
|
const firstEdge = state.edge(state.node(result.leader).edgeIds[0]);
|
|
4965
4986
|
const winnerRationale = firstEdge.operator === "seed" || !("sha256" in firstEdge.rationale) ? void 0 : recorder.readBlob(firstEdge.rationale).text;
|
|
4966
4987
|
const expansions = nodes.generations(state);
|
|
4988
|
+
const generations = nodes.history(state, policy).map((record) => ({
|
|
4989
|
+
record,
|
|
4990
|
+
surfaces: nodes.expansionNodes(state, expansions[record.generationIndex]).map((nodeId) => {
|
|
4991
|
+
const surface = nodes.surface(state, nodeId);
|
|
4992
|
+
return {
|
|
4993
|
+
surfaceHash: surfaceHash(surface),
|
|
4994
|
+
surface,
|
|
4995
|
+
campaign: nodes.campaign(state, nodeId)
|
|
4996
|
+
};
|
|
4997
|
+
})
|
|
4998
|
+
}));
|
|
4999
|
+
const baselineCampaign = nodes.campaign(state, state.rootNodeId);
|
|
4967
5000
|
return {
|
|
4968
|
-
generations
|
|
4969
|
-
record,
|
|
4970
|
-
surfaces: nodes.expansionNodes(state, expansions[record.generationIndex]).map((nodeId) => {
|
|
4971
|
-
const surface = nodes.surface(state, nodeId);
|
|
4972
|
-
return {
|
|
4973
|
-
surfaceHash: surfaceHash(surface),
|
|
4974
|
-
surface,
|
|
4975
|
-
campaign: nodes.campaign(state, nodeId)
|
|
4976
|
-
};
|
|
4977
|
-
})
|
|
4978
|
-
})),
|
|
5001
|
+
generations,
|
|
4979
5002
|
baselineSurface,
|
|
4980
5003
|
winnerSurface,
|
|
4981
5004
|
winnerSurfaceHash: surfaceHash(winnerSurface),
|
|
4982
5005
|
...firstEdge.operator !== "seed" && firstEdge.label ? { winnerLabel: firstEdge.label } : {},
|
|
4983
5006
|
...winnerRationale ? { winnerRationale } : {},
|
|
4984
|
-
baselineCampaign
|
|
4985
|
-
cost: costLedger.summary(),
|
|
5007
|
+
baselineCampaign,
|
|
5008
|
+
cost: withUncapturedAgentSpend(costLedger.summary(), searchCampaigns({
|
|
5009
|
+
baselineCampaign,
|
|
5010
|
+
generations
|
|
5011
|
+
})),
|
|
4986
5012
|
searchHistory: recorder.receipt({
|
|
4987
5013
|
producerId: opts.proposer.kind,
|
|
4988
5014
|
runId: runDir
|
|
@@ -4990,6 +5016,15 @@ function optimizationResult(run, baselineSurface, result) {
|
|
|
4990
5016
|
paretoFrontier: nodes.frontier(state)
|
|
4991
5017
|
};
|
|
4992
5018
|
}
|
|
5019
|
+
/** Each distinct campaign a search measured, labeled by its surface. */
|
|
5020
|
+
function searchCampaigns(search) {
|
|
5021
|
+
const labeled = /* @__PURE__ */ new Map([[search.baselineCampaign, "search.baseline"]]);
|
|
5022
|
+
for (const generation of search.generations) for (const { surfaceHash: hash, campaign } of generation.surfaces) if (!labeled.has(campaign)) labeled.set(campaign, `search.${hash.slice(0, 12)}`);
|
|
5023
|
+
return [...labeled].map(([campaign, label]) => ({
|
|
5024
|
+
label,
|
|
5025
|
+
cells: campaign.cells
|
|
5026
|
+
}));
|
|
5027
|
+
}
|
|
4993
5028
|
/** The default ledger and identities when the caller binds none. Revisions are
|
|
4994
5029
|
* content digests of what the caller declared, and each uri names what its
|
|
4995
5030
|
* digest covers: the dispatch ref, the proposer kind, the kernel. */
|
|
@@ -5141,7 +5176,7 @@ async function runImprovementLoop(opts) {
|
|
|
5141
5176
|
...optimization,
|
|
5142
5177
|
...comparison,
|
|
5143
5178
|
prResult,
|
|
5144
|
-
cost: costLedger.summary()
|
|
5179
|
+
cost: withUncapturedAgentSpend(costLedger.summary(), [...searchCampaigns(optimization), ...finalComparisonCampaigns(comparison)])
|
|
5145
5180
|
};
|
|
5146
5181
|
}
|
|
5147
5182
|
// src/campaign/optimization-cost.ts
|
|
@@ -6041,6 +6076,6 @@ function parseResponse(name, response, schema, llmCall) {
|
|
|
6041
6076
|
function firstString(value) {
|
|
6042
6077
|
return typeof value === "string" && value.trim() ? value : void 0;
|
|
6043
6078
|
}
|
|
6044
|
-
export {
|
|
6079
|
+
export { withFinalEvidenceSources as $, campaignCellSearchResult as A, defaultProductionGate as B, surfaceDiff as C, createSearchHistoryReceipt as D, assertSearchHistoryMatchesState as E, uniform as F, Dataset as G, redTeamDataset as H, finalComparisonCampaigns as I, captureFinalEvidencePolicy as J, runCanaries as K, runFinalComparison as L, searchProposalExecution as M, searchReceiptAccounting as N, verifySearchHistoryArtifact as O, asha as P, reserveFinalEvidence as Q, openAutoPr as R, searchEdgeId as S, assertSearchHistoryAdmissionOptions as T, redTeamReport as U, DEFAULT_RED_TEAM_CORPUS as V, scoreRedTeamOutput as W, exposeFinalEvidence as X, evaluationUnitMap as Y, prepareSearchFinalEvidence as Z, crowdedFrontierParent as _, clamp01 as a, buildCellSchedule as at, SearchRecorder as b, readGepaCandidatePopulationArtifact as c, computeManifestHash as ct, optimizationTokenUsageFromSummary as d, runEval as et, runImprovementLoop as f, beam as g, aide as h, aggregateRunScore as i, cellReceiptModels as it, searchModelIdentity as j, verifySearchHistoryReceipt as k, combineComparisonCosts as l, isProposedCandidate as m, isTransientTransportFailure as n, planCampaignRun as nt, executeOptimizationMethod as o, cellCachePath as ot, runOptimization as p, assertIndependentEvaluationSplit as q, transientDispatchFailure as r, resolveRunDir as rt, assertGepaCandidatePopulationSummary as s, withUncapturedAgentSpend as st, llmJudge as t, runCampaign as tt, costFromLedgerSummary as u, incumbent as v, surfaceNode as w, developmentClaim as x, incumbentWithOperatorBandit as y, captureJudge as z };
|
|
6045
6080
|
|
|
6046
|
-
//# sourceMappingURL=llm-judge-
|
|
6081
|
+
//# sourceMappingURL=llm-judge-DHgx29ro.js.map
|