@tangle-network/agent-eval 1.0.38 → 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 +12 -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-BU6bJNvu.js → campaign-DawSkDag.js} +3 -3
- package/dist/{campaign-BU6bJNvu.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-CpGvgSYQ.js → default-registry-BE5Rj9ba.js} +8 -32
- package/dist/default-registry-BE5Rj9ba.js.map +1 -0
- 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-BeLMK-OM.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-BBHrAlcE.js → llm-judge-DHgx29ro.js} +74 -20
- 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-BmfnAzG4.js → skillopt-optimization-method-Du3GbReg.js} +10 -4
- package/dist/{skillopt-optimization-method-BmfnAzG4.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/default-registry-CpGvgSYQ.js.map +0 -1
- package/dist/define-agent-eval-4KGwzIVt.d.ts.map +0 -1
- package/dist/define-agent-eval-BeLMK-OM.js.map +0 -1
- package/dist/index-OvU1UXKC.d.ts.map +0 -1
- package/dist/llm-judge-BBHrAlcE.js.map +0 -1
- package/dist/statistical-heldout-RmdXoz2e.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { a as welchsTTest, i as iqr, n as checkCanaries, t as analyzeRuns } from
|
|
|
16
16
|
import { i as pairedDeltaTest, n as pairedDecisionShape, r as minimumPairsForPairedDeltaTest, t as decidePairedPromotion } from "./paired-promotion-decision-BoWHWL1i.js";
|
|
17
17
|
import { c as runsForScenario, i as judgeSpans, t as argHash } from "./query-Ck6KhcDo.js";
|
|
18
18
|
import { n as contentHash, r as fileVerdictCache, t as canonicalJson } from "./verdict-cache-DfzlHLdf.js";
|
|
19
|
-
import {
|
|
19
|
+
import { G as Dataset, H as redTeamDataset, K as runCanaries, U as redTeamReport, V as DEFAULT_RED_TEAM_CORPUS, W as scoreRedTeamOutput, a as clamp01, i as aggregateRunScore, r as transientDispatchFailure, t as llmJudge, tt as runCampaign } from "./llm-judge-DHgx29ro.js";
|
|
20
20
|
import { c as costForTokenPricing, d as estimateCost, f as estimateTokens, i as CostCeilingReachedError, l as costForUsage, m as resolveModelPricing, n as CostAccountingIncompleteError, p as isModelPriced, t as CostLedger, u as MODEL_PRICING } from "./cost-ledger-1CwUnVOd.js";
|
|
21
21
|
import { C as assertRealBackend, S as BackendIntegrityError, _ as parseReflectionResponse, a as ATTESTATION_ALGORITHM, g as buildReflectionPrompt, o as attest, s as verifyAttestation, w as summarizeBackendIntegrity } from "./campaign-evidence-BX8OveG5.js";
|
|
22
22
|
import { s as surfaceContentHash } from "./json-recovery-b7O9WVTF.js";
|
|
@@ -25,15 +25,15 @@ import { c as redactText, l as shareAllowed, n as REDACTION_VERSION, o as redact
|
|
|
25
25
|
import { a as makeProposalFinding, i as makeFinding, r as computeFindingId } from "./types-C8AyaiFi.js";
|
|
26
26
|
import { n as pairedPromotionPower, r as requiredPairsForPairedPromotion } from "./paired-promotion-power-BXH3gzvs.js";
|
|
27
27
|
import { a as LlmCallError, i as stripFencedJson, n as isRecord, o as LlmResponseError } from "./json-DtvZNAU9.js";
|
|
28
|
-
import { r as selfImprove, t as defineAgentEval } from "./define-agent-eval-
|
|
28
|
+
import { r as selfImprove, t as defineAgentEval } from "./define-agent-eval-CyU7eAzj.js";
|
|
29
29
|
import { n as equivalenceVerdict, t as certificationEvidenceDigest } from "./verdict-CKo1iZkI.js";
|
|
30
30
|
import { a as runEquivalenceCheck, i as defineEquivalenceCheck, n as VERIFICATION_STRATEGIES, r as VERIFICATION_STRATEGY_SOURCES, t as EquivalenceProtocolError } from "./verification-strategy-CYhDX1rE.js";
|
|
31
|
-
import { c as createBoundedTraceAnalysisStore, p as DEFAULT_TRACE_ANALYST_BUDGETS, t as createTraceAnalyst } from "./kind-factory-
|
|
32
|
-
import { C as assertUniqueFindingIds, D as validateAnalystReviewDecisions, E as snapshotAnalystRun, S as analystRunDigest, T as readAnalystReview, c as FAILURE_MODE_KIND_SPEC, i as DEFAULT_TRACE_ANALYST_KINDS, n as AnalystRegistry, t as buildDefaultAnalystRegistry, w as completedAnalystReviewQuality, x as analystFindingDigest } from "./default-registry-
|
|
31
|
+
import { c as createBoundedTraceAnalysisStore, p as DEFAULT_TRACE_ANALYST_BUDGETS, t as createTraceAnalyst } from "./kind-factory-B5FfFE5G.js";
|
|
32
|
+
import { C as assertUniqueFindingIds, D as validateAnalystReviewDecisions, E as snapshotAnalystRun, S as analystRunDigest, T as readAnalystReview, c as FAILURE_MODE_KIND_SPEC, i as DEFAULT_TRACE_ANALYST_KINDS, n as AnalystRegistry, t as buildDefaultAnalystRegistry, w as completedAnalystReviewQuality, x as analystFindingDigest } from "./default-registry-BE5Rj9ba.js";
|
|
33
33
|
import { OUTPUT_VALUE } from "./trace-attributes.js";
|
|
34
34
|
import { n as extractUsageFromSse, t as extractUsage } from "./extract-usage-ISFqhfDz.js";
|
|
35
35
|
import { n as InMemoryRawProviderSink, r as NoopRawProviderSink, t as FileSystemRawProviderSink } from "./raw-provider-sink-RbaEv2vB.js";
|
|
36
|
-
import { _ as exportRunAsOtlp, c as describeTraceInsightScope, g as analyzeTraces, h as tokenizeDomainWords, l as domainEvidencePattern, m as scoreTraceInsightReadiness, n as toolSpansToTraceAnalysisStore, o as buildTraceInsightContext, s as buildTraceInsightPrompt, u as inferDomainKeywords, v as captureFetchToRawSink } from "./store-tool-spans-
|
|
36
|
+
import { _ as exportRunAsOtlp, c as describeTraceInsightScope, g as analyzeTraces, h as tokenizeDomainWords, l as domainEvidencePattern, m as scoreTraceInsightReadiness, n as toolSpansToTraceAnalysisStore, o as buildTraceInsightContext, s as buildTraceInsightPrompt, u as inferDomainKeywords, v as captureFetchToRawSink } from "./store-tool-spans-BR4IhZYZ.js";
|
|
37
37
|
import { t as TraceEmitter } from "./emitter-DhQ65mza.js";
|
|
38
38
|
import { n as assertRunCaptured, t as RunIntegrityError } from "./integrity-DOHt1mwU.js";
|
|
39
39
|
import { n as InMemoryTraceStore, t as FileSystemTraceStore } from "./store-ZykIyQmy.js";
|
|
@@ -49,11 +49,11 @@ import "./rollout-DDMkK_Lw.js";
|
|
|
49
49
|
import { t as mintRolloutRows } from "./mint-VN-qtJTc.js";
|
|
50
50
|
import { i as sequentialPairedPower, n as pairedEvalueSequence, r as sequentialCrossingHorizon, t as evaluateInterimReleaseConfidence } from "./sequential-C6k0Wrb7.js";
|
|
51
51
|
import { n as paidJsonChat } from "./chat-json-call-Rfhu7JbJ.js";
|
|
52
|
-
import { t as createDspyRlmTraceEngine } from "./dspy-rlm-engine-
|
|
53
|
-
import { n as diffFindings, r as createChatTraceEngine, t as FindingsStore } from "./findings-store-
|
|
52
|
+
import { t as createDspyRlmTraceEngine } from "./dspy-rlm-engine-aM1RWOUT.js";
|
|
53
|
+
import { n as diffFindings, r as createChatTraceEngine, t as FindingsStore } from "./findings-store-B8pq8Rhr.js";
|
|
54
54
|
import { a as budgetBreachView, i as failureClusterView, n as computeToolUseMetrics, r as judgeAgreementView, t as toolWasteView } from "./tool-waste-DzLI-JJg.js";
|
|
55
55
|
import { _ as analyzeSeries, a as judgeGateDecision, c as snapshotFromJudgeAgreement, g as withJudgeRetry, i as assertJudgeMayGate, n as JudgeGateRefusedError, o as measureJudgeAgreement, r as addCalibrationVerdicts, s as registerCalibrationSet, t as DEFAULT_JUDGE_GATE_POLICY } from "./judge-gate-LbmZU-pA.js";
|
|
56
|
-
import { a as spanRecordsToTraceAnalysisStore, i as otlpTextToTraceAnalysisStore, r as OtlpFileTraceStore } from "./store-otlp-
|
|
56
|
+
import { a as spanRecordsToTraceAnalysisStore, i as otlpTextToTraceAnalysisStore, r as OtlpFileTraceStore } from "./store-otlp-DHc_E78m.js";
|
|
57
57
|
import { n as bootstrapCi, t as evaluateReleaseConfidence } from "./release-confidence-BdidB0mG.js";
|
|
58
58
|
import { createHash } from "node:crypto";
|
|
59
59
|
import { accessSync, appendFileSync, constants, cpSync, existsSync, mkdirSync, promises, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -1817,6 +1817,7 @@ async function runTraceAnalyst(args) {
|
|
|
1817
1817
|
analystId: definition.id,
|
|
1818
1818
|
...context.correlationId ? { analystRunId: context.correlationId } : {}
|
|
1819
1819
|
};
|
|
1820
|
+
let reportedModelCalls;
|
|
1820
1821
|
try {
|
|
1821
1822
|
const preparedContext = await definition.prepareContext?.(args.store, context);
|
|
1822
1823
|
if (preparedContext !== void 0 && typeof preparedContext !== "string") throw new TypeError(`trace analyst '${definition.id}' prepareContext must return a string`);
|
|
@@ -1856,6 +1857,7 @@ async function runTraceAnalyst(args) {
|
|
|
1856
1857
|
...context.signal ? { signal: context.signal } : {},
|
|
1857
1858
|
...context.log ? { log: context.log } : {}
|
|
1858
1859
|
});
|
|
1860
|
+
reportedModelCalls = completed.modelCalls;
|
|
1859
1861
|
const observedSourceReads = sourceReads.slice();
|
|
1860
1862
|
const findings = await acceptFindings(definition, completed.findings, args.store, context, minimumEvidenceCitations, observedSourceReads.filter((read) => read.status === "available"));
|
|
1861
1863
|
if (definition.requireStructuredFindings && findings.length === 0) throw new Error(`trace analyst '${definition.id}' returned no valid structured findings: ${truncateForContext(completed.answer, 600)}`);
|
|
@@ -1891,9 +1893,25 @@ async function runTraceAnalyst(args) {
|
|
|
1891
1893
|
pending_calls: usage.pendingCalls,
|
|
1892
1894
|
timeout_ms: settlementTimeoutMs
|
|
1893
1895
|
});
|
|
1894
|
-
context.recordUsage?.(usage.receipt);
|
|
1896
|
+
context.recordUsage?.(withUnrecordedModelCalls(usage.receipt, reportedModelCalls));
|
|
1895
1897
|
}
|
|
1896
1898
|
}
|
|
1899
|
+
/**
|
|
1900
|
+
* An engine that reports model calls while the ledger recorded none paid outside the ledger: its
|
|
1901
|
+
* spend is unknown, not $0.
|
|
1902
|
+
*/
|
|
1903
|
+
function withUnrecordedModelCalls(receipt, reportedModelCalls) {
|
|
1904
|
+
if (!reportedModelCalls || receipt.calls !== 0) return receipt;
|
|
1905
|
+
return {
|
|
1906
|
+
calls: reportedModelCalls,
|
|
1907
|
+
tokens: null,
|
|
1908
|
+
cost: {
|
|
1909
|
+
kind: "uncaptured",
|
|
1910
|
+
usd: null
|
|
1911
|
+
},
|
|
1912
|
+
knownCostUsd: 0
|
|
1913
|
+
};
|
|
1914
|
+
}
|
|
1897
1915
|
/** Adapt a research definition to the common Analyst registry contract. */
|
|
1898
1916
|
function createTraceAnalyst(definition, options) {
|
|
1899
1917
|
validateDefinition(definition);
|
|
@@ -2136,4 +2154,4 @@ function truncateForContext(value, max) {
|
|
|
2136
2154
|
}
|
|
2137
2155
|
export { RawAnalystFindingSchema as A, parseFindingSubject as B, asString as C, projectOtlpFlatLine as D, firstStringAttr$1 as E, stripCodeFences as F, validateUsageSettlementTimeout as G, DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS as H, FINDING_SUBJECT_KINDS as I, snapshotExactExecutionComponentIdentity as K, FINDING_SUBJECT_SYNTAX as L, parseRawFinding as M, parseTraceSpanEvidenceUri as N, spanEpochMillis as O, coerceJson as P, KIND_EXPECTED_SUBJECTS as R, TraceNotFoundError as S, extractOtlpAttributes as T, assertValidAnalystUsageReceipt as U, renderFindingSubject as V, usageReceiptFromCostLedger as W, TraceAnalysisStoreContractError as _, UNTRUSTED_TRACE_TEXT as a, TraceFileMissingError as b, createBoundedTraceAnalysisStore as c, truncateForBudget as d, validateInteger as f, TraceAnalysisLimitError as g, SpanNotFoundError as h, TRACE_ANALYST_TOOL_NAMESPACE as i, evidenceRefsFromRawFinding as j, RAW_FINDING_SCHEMA_PROMPT as k, traceSpanSchema as l, TRACE_ANALYSIS_LIMITS as m, runTraceAnalyst as n, buildTraceAnalysisToolDescriptors as o, DEFAULT_TRACE_ANALYST_BUDGETS as p, snapshotExactExecutionPlan as q, buildTraceToolsForGroup as r, bindSpanSourceReader as s, createTraceAnalyst as t, compileSearchRegex as u, TraceAnalysisValidationError as v, compareSpanTime as w, TraceFileTooLargeError as x, TraceFileMalformedError as y, findingSubjectGrammarPromptFor as z };
|
|
2138
2156
|
|
|
2139
|
-
//# sourceMappingURL=kind-factory-
|
|
2157
|
+
//# sourceMappingURL=kind-factory-B5FfFE5G.js.map
|