@tangle-network/agent-eval 0.121.0 → 0.122.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/dist/analyst/index.d.ts +1 -0
- package/dist/analyst/index.js +1 -1
- package/dist/belief-state/index.d.ts +43 -0
- package/dist/belief-state/index.js +48 -326
- package/dist/belief-state/index.js.map +1 -1
- package/dist/benchmarks/index.d.ts +5 -1
- package/dist/benchmarks/index.js +2 -2
- package/dist/campaign/index.d.ts +16 -3
- package/dist/campaign/index.js +4 -2
- package/dist/chunk-7VYEGHWF.js +1425 -0
- package/dist/chunk-7VYEGHWF.js.map +1 -0
- package/dist/{chunk-JM2SKQMS.js → chunk-P62I523A.js} +3 -1
- package/dist/{chunk-JM2SKQMS.js.map → chunk-P62I523A.js.map} +1 -1
- package/dist/{chunk-JN2FCO5W.js → chunk-TDHX3BVA.js} +157 -4
- package/dist/chunk-TDHX3BVA.js.map +1 -0
- package/dist/{chunk-32BZXMSO.js → chunk-VZ6VKOJT.js} +23 -160
- package/dist/chunk-VZ6VKOJT.js.map +1 -0
- package/dist/contract/index.d.ts +118 -14
- package/dist/contract/index.js +548 -497
- package/dist/contract/index.js.map +1 -1
- package/dist/index.d.ts +7 -19
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/dist/rl.d.ts +5 -1
- package/package.json +2 -2
- package/dist/chunk-32BZXMSO.js.map +0 -1
- package/dist/chunk-HKUCJ437.js +0 -787
- package/dist/chunk-HKUCJ437.js.map +0 -1
- package/dist/chunk-JN2FCO5W.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -7830,11 +7830,15 @@ interface GenerationCandidate {
|
|
|
7830
7830
|
* reflective proposer grounds its next edit on. Keep `notes` GENERALIZABLE
|
|
7831
7831
|
* (which checks/lines/dimensions failed and how), NOT case-specific ground
|
|
7832
7832
|
* truth: leaking expected answers into the prompt is memorization, and the
|
|
7833
|
-
* held-out gate would reject it anyway.
|
|
7833
|
+
* held-out gate would reject it anyway. `emitted` is a bounded excerpt of
|
|
7834
|
+
* the candidate's raw output for the scenario (worst rep when reps > 1) —
|
|
7835
|
+
* the "what it actually did" evidence; optional so trajectory capture is
|
|
7836
|
+
* never required of a dispatch. */
|
|
7834
7837
|
scenarios: Array<{
|
|
7835
7838
|
scenarioId: string;
|
|
7836
7839
|
composite: number;
|
|
7837
7840
|
notes?: string;
|
|
7841
|
+
emitted?: string;
|
|
7838
7842
|
}>;
|
|
7839
7843
|
/** Proposer-supplied short label for the change. Present when the proposer
|
|
7840
7844
|
* returned a `ProposedCandidate`; absent for bare-surface mutators. */
|
|
@@ -13223,6 +13227,7 @@ interface IntentMatchOptions {
|
|
|
13223
13227
|
llm?: LlmClientOptions;
|
|
13224
13228
|
costLedger?: CostLedgerHandle;
|
|
13225
13229
|
costPhase?: string;
|
|
13230
|
+
costTags?: Record<string, string>;
|
|
13226
13231
|
signal?: AbortSignal;
|
|
13227
13232
|
}
|
|
13228
13233
|
/**
|
|
@@ -13855,6 +13860,7 @@ interface SemanticConceptJudgeOptions {
|
|
|
13855
13860
|
llm?: LlmClientOptions;
|
|
13856
13861
|
costLedger?: CostLedgerHandle;
|
|
13857
13862
|
costPhase?: string;
|
|
13863
|
+
costTags?: Record<string, string>;
|
|
13858
13864
|
signal?: AbortSignal;
|
|
13859
13865
|
/**
|
|
13860
13866
|
* Score aggregation strategy. Default `mean` — uniform average across
|
|
@@ -15253,24 +15259,6 @@ interface ReferenceReplaySteeringRowsOptions<Input = unknown> {
|
|
|
15253
15259
|
declare function referenceReplayRunsToSteeringRows<Input = unknown>(runs: ReferenceReplayRun<Input>[], options?: ReferenceReplaySteeringRowsOptions<Input>): SteeringOptimizationRow[];
|
|
15254
15260
|
declare function referenceReplayScenarioToRunScore(scenarioScore: ReferenceReplayScenarioScore, durationMs?: number): RunScore;
|
|
15255
15261
|
|
|
15256
|
-
/**
|
|
15257
|
-
* Reflective mutation — primitives for trace-conditioned prompt rewriting.
|
|
15258
|
-
*
|
|
15259
|
-
* Used by `prompt-evolution.ts` (and any consumer running iterative
|
|
15260
|
-
* improvement). Given a parent prompt + concrete trace evidence (top trials,
|
|
15261
|
-
* bottom trials, missed expectations), produce an LLM-ready prompt that
|
|
15262
|
-
* proposes targeted mutations — not blind rephrasings.
|
|
15263
|
-
*
|
|
15264
|
-
* Why this lives outside `prompt-evolution.ts`: any consumer that wants to
|
|
15265
|
-
* run reflective rewriting WITHOUT the population/Pareto machinery can
|
|
15266
|
-
* import these primitives directly.
|
|
15267
|
-
*
|
|
15268
|
-
* Quality bar (vs. naive "mutate this prompt"):
|
|
15269
|
-
* - Show parent ↔ children diff, not just one variant
|
|
15270
|
-
* - Quote specific missed goldens with their match phrases
|
|
15271
|
-
* - Surface the model's actual emitted output side-by-side with what was expected
|
|
15272
|
-
* - Quote concrete mutation primitives so the model has a vocabulary
|
|
15273
|
-
*/
|
|
15274
15262
|
interface TrialTrace {
|
|
15275
15263
|
/** Stable id for the trial — surfaces in the prompt for grounding. */
|
|
15276
15264
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -43,15 +43,17 @@ import {
|
|
|
43
43
|
agentProfileHash,
|
|
44
44
|
agentProfileId,
|
|
45
45
|
agentProfileModelId,
|
|
46
|
+
comparePairedArms,
|
|
46
47
|
completionVerdict,
|
|
47
48
|
createLlmCorrectnessChecker,
|
|
48
49
|
createTokenRecallChecker,
|
|
49
50
|
expandProfileAxes,
|
|
50
51
|
extractProducedState,
|
|
51
52
|
harnessAxisOf,
|
|
53
|
+
pairArms,
|
|
52
54
|
parseCorrectnessResponse,
|
|
53
55
|
verifyCompletion
|
|
54
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-TDHX3BVA.js";
|
|
55
57
|
import {
|
|
56
58
|
DEFAULT_MUTATION_PRIMITIVES,
|
|
57
59
|
DEFAULT_RED_TEAM_CORPUS,
|
|
@@ -65,7 +67,6 @@ import {
|
|
|
65
67
|
campaignMeanComposite,
|
|
66
68
|
codeExecutionJudge,
|
|
67
69
|
coherenceJudge,
|
|
68
|
-
comparePairedArms,
|
|
69
70
|
costReceiptFromTCloud,
|
|
70
71
|
createCustomJudge,
|
|
71
72
|
createDomainExpertJudge,
|
|
@@ -78,7 +79,6 @@ import {
|
|
|
78
79
|
heldOutGate,
|
|
79
80
|
llmJudge,
|
|
80
81
|
maximumChargeForTCloudRequest,
|
|
81
|
-
pairArms,
|
|
82
82
|
paretoFrontier,
|
|
83
83
|
paretoFrontierWithCrowding,
|
|
84
84
|
parseReflectionResponse,
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
scoreRedTeamOutput,
|
|
92
92
|
surfaceContentHash,
|
|
93
93
|
toolNamesForRun
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-VZ6VKOJT.js";
|
|
95
95
|
import {
|
|
96
96
|
BackendIntegrityError,
|
|
97
97
|
assertRealAgentReceipts,
|
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
defaultIsMaterial,
|
|
117
117
|
diffFindings,
|
|
118
118
|
runSemanticConceptJudge
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-P62I523A.js";
|
|
120
120
|
import {
|
|
121
121
|
buildDefaultAnalystRegistry,
|
|
122
122
|
computeTraceMetrics,
|
|
@@ -8119,6 +8119,7 @@ async function runIntentMatchJudge(input, options = {}) {
|
|
|
8119
8119
|
llm: options.llm ?? {},
|
|
8120
8120
|
costLedger: options.costLedger ?? new CostLedger(),
|
|
8121
8121
|
costPhase: options.costPhase ?? "judge.intent-match",
|
|
8122
|
+
costTags: options.costTags ?? {},
|
|
8122
8123
|
signal: options.signal ?? new AbortController().signal
|
|
8123
8124
|
};
|
|
8124
8125
|
if (input.sourceFiles.length === 0 && !input.servedHtml) {
|
|
@@ -8154,6 +8155,7 @@ async function runIntentMatchJudge(input, options = {}) {
|
|
|
8154
8155
|
phase: opts.costPhase,
|
|
8155
8156
|
actor: "intent-match",
|
|
8156
8157
|
model: opts.model,
|
|
8158
|
+
...Object.keys(opts.costTags).length > 0 ? { tags: opts.costTags } : {},
|
|
8157
8159
|
maximumCharge: maximumChargeForLlmRequest(request, opts.llm),
|
|
8158
8160
|
signal: opts.signal,
|
|
8159
8161
|
execute: (signal, callId) => callLlmJson(request, {
|