@tangle-network/agent-eval 0.144.0 → 0.144.1
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/analyst/index.d.ts +82 -17
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +4 -4
- package/dist/{benchmark-command-4c7N_rlw.js → benchmark-command-95Zqd1e8.js} +331 -110
- package/dist/benchmark-command-95Zqd1e8.js.map +1 -0
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +1 -1
- package/dist/{benchmarks-05UGZ8sZ.js → benchmarks-CRT4ScEA.js} +4 -4
- package/dist/{benchmarks-05UGZ8sZ.js.map → benchmarks-CRT4ScEA.js.map} +1 -1
- package/dist/campaign/index.d.ts +4 -4
- package/dist/campaign/index.js +4 -4
- package/dist/{campaign-BKOtvRAB.js → campaign-CefP3fPS.js} +4 -4
- package/dist/{campaign-BKOtvRAB.js.map → campaign-CefP3fPS.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/contract/index.d.ts +1 -1
- package/dist/contract/index.js +3 -3
- package/dist/{default-registry-DfHJEwYh.js → default-registry-SOyHB6qG.js} +2 -2
- package/dist/{default-registry-DfHJEwYh.js.map → default-registry-SOyHB6qG.js.map} +1 -1
- package/dist/{dspy-rlm-engine-CBFwlyaY.js → dspy-rlm-engine-BR7TtB0o.js} +61 -105
- package/dist/dspy-rlm-engine-BR7TtB0o.js.map +1 -0
- package/dist/{eval-campaign-YdkpWWoT.js → eval-campaign-lI7wB9DH.js} +2 -2
- package/dist/{eval-campaign-YdkpWWoT.js.map → eval-campaign-lI7wB9DH.js.map} +1 -1
- package/dist/{external-optimizer-contracts-iK0yu4AR.d.ts → external-optimizer-contracts-CdmX2K2S.d.ts} +47 -10
- package/dist/external-optimizer-contracts-CdmX2K2S.d.ts.map +1 -0
- package/dist/{index-DgbFl4cv.d.ts → index-BrpxwELi.d.ts} +2 -2
- package/dist/{index-DgbFl4cv.d.ts.map → index-BrpxwELi.d.ts.map} +1 -1
- package/dist/{index-DtMpBKVF.d.ts → index-DRI1DU5z.d.ts} +3 -3
- package/dist/{index-DtMpBKVF.d.ts.map → index-DRI1DU5z.d.ts.map} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +9 -9
- package/dist/{llm-client-B3WXSH5Y.js → llm-client-D3EoChAU.js} +7 -7
- package/dist/llm-client-D3EoChAU.js.map +1 -0
- package/dist/openapi.json +1 -1
- package/dist/rl.js +1 -1
- package/dist/{semantic-concept-judge-DJQtFr95.js → semantic-concept-judge-l8Lb3Kqz.js} +2 -2
- package/dist/{semantic-concept-judge-DJQtFr95.js.map → semantic-concept-judge-l8Lb3Kqz.js.map} +1 -1
- package/dist/{server-Cu4M3NSO.js → server-Df00sdwz.js} +3 -3
- package/dist/{server-Cu4M3NSO.js.map → server-Df00sdwz.js.map} +1 -1
- package/dist/{single-run-lock-t1si1ob7.js → single-run-lock-B-cFnnNn.js} +718 -186
- package/dist/single-run-lock-B-cFnnNn.js.map +1 -0
- package/dist/{skill-usage-BiVEU0QY.d.ts → skill-usage-3vUWdZ9n.d.ts} +23 -4
- package/dist/skill-usage-3vUWdZ9n.d.ts.map +1 -0
- package/dist/{skillopt-optimization-method-Ds8J1_K8.js → skillopt-optimization-method-DA5mJmFE.js} +15 -204
- package/dist/skillopt-optimization-method-DA5mJmFE.js.map +1 -0
- package/dist/{skillopt-optimization-method-B7o01OdX.d.ts → skillopt-optimization-method-DNniakI5.d.ts} +6 -2
- package/dist/{skillopt-optimization-method-B7o01OdX.d.ts.map → skillopt-optimization-method-DNniakI5.d.ts.map} +1 -1
- package/dist/types-BjMFz88h.d.ts.map +1 -1
- package/dist/wire/index.js +1 -1
- package/docs/trace-analysis.md +43 -32
- package/package.json +1 -1
- package/dist/benchmark-command-4c7N_rlw.js.map +0 -1
- package/dist/dspy-rlm-engine-CBFwlyaY.js.map +0 -1
- package/dist/external-optimizer-contracts-iK0yu4AR.d.ts.map +0 -1
- package/dist/llm-client-B3WXSH5Y.js.map +0 -1
- package/dist/single-run-lock-t1si1ob7.js.map +0 -1
- package/dist/skill-usage-BiVEU0QY.d.ts.map +0 -1
- package/dist/skillopt-optimization-method-Ds8J1_K8.js.map +0 -1
package/dist/{skillopt-optimization-method-Ds8J1_K8.js → skillopt-optimization-method-DA5mJmFE.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as ValidationError, i as JudgeError, t as AgentEvalError } from "./errors-D-LKuDhb.js";
|
|
2
2
|
import { i as CostLedger, t as CostAccountingIncompleteError } from "./cost-ledger-DMFxsLKr.js";
|
|
3
|
-
import { f as maximumChargeForLlmRequest, l as costReceiptFromLlm, m as stripFencedJson, u as costReceiptFromLlmError } from "./llm-client-
|
|
3
|
+
import { f as maximumChargeForLlmRequest, l as costReceiptFromLlm, m as stripFencedJson, u as costReceiptFromLlmError } from "./llm-client-D3EoChAU.js";
|
|
4
4
|
import { a as clamp01, o as combineAbortSignals, t as assertProposalFindings } from "./proposal-findings-2GIUo1et.js";
|
|
5
|
-
import {
|
|
5
|
+
import { A as removeCredentialEnvironment, D as isCandidateText, E as assertNoCredentialValues, M as resolveExternalOptimizerProcessLimits, N as safePathComponent, O as isExternalTextCandidate, T as assertJsonValue, d as closeExternalOptimizerResources, f as runWithCleanup, j as resolveExternalOptimizerCallbackLimits, k as isRecord, l as startExternalOptimizerCallback, n as createRunCostLedger, p as startExternalOptimizerModelProxy, r as fsCampaignStorage, t as acquireSingleRunLock, u as runExternalOptimizerProcess, v as canonicalJson, w as assertExternalOptimizerModelBudget, y as contentHash } from "./single-run-lock-B-cFnnNn.js";
|
|
6
6
|
import { p as mapConcurrent } from "./ledger-core-Dxz0Rkwa.js";
|
|
7
7
|
import { E as pairedBootstrap, H as weightedComposite, M as pairedRiskDifferenceScore, N as pairedSignTest, O as pairedDeltaTieFraction, T as pairedBinaryScale, d as confidenceInterval, j as pairedRiskDifferenceExact } from "./statistics-ByxzSiOM.js";
|
|
8
8
|
import { t as DEFAULT_REDACTION_RULES } from "./redact-7Aq1ukl-.js";
|
|
@@ -11,7 +11,6 @@ import { z } from "zod";
|
|
|
11
11
|
import { writeFileSync } from "node:fs";
|
|
12
12
|
import { basename, isAbsolute, join } from "node:path";
|
|
13
13
|
import { createHash, randomBytes } from "node:crypto";
|
|
14
|
-
import { createServer } from "node:http";
|
|
15
14
|
import { execSync } from "node:child_process";
|
|
16
15
|
import { mkdir } from "node:fs/promises";
|
|
17
16
|
import { homedir, tmpdir } from "node:os";
|
|
@@ -1649,204 +1648,6 @@ function designedCellIds(scenarios, reps) {
|
|
|
1649
1648
|
return ids;
|
|
1650
1649
|
}
|
|
1651
1650
|
//#endregion
|
|
1652
|
-
//#region src/campaign/external-optimizer-callback.ts
|
|
1653
|
-
const MAX_CALLBACK_BODY_BYTES = 1e6;
|
|
1654
|
-
async function startExternalOptimizerCallback(args) {
|
|
1655
|
-
assertCallbackConfig(args);
|
|
1656
|
-
args.signal?.throwIfAborted();
|
|
1657
|
-
let evaluations = 0;
|
|
1658
|
-
let accepting = true;
|
|
1659
|
-
let closePromise;
|
|
1660
|
-
const activeControllers = /* @__PURE__ */ new Set();
|
|
1661
|
-
const activeHandlers = /* @__PURE__ */ new Set();
|
|
1662
|
-
const proposedCandidateHashes = /* @__PURE__ */ new Set();
|
|
1663
|
-
let observationSequence = 0;
|
|
1664
|
-
const server = createServer((request, response) => {
|
|
1665
|
-
if (!accepting) {
|
|
1666
|
-
sendJsonIfOpen(response, 503, { error: "external optimizer callback is closing" });
|
|
1667
|
-
return;
|
|
1668
|
-
}
|
|
1669
|
-
const controller = new AbortController();
|
|
1670
|
-
const abortRequest = () => {
|
|
1671
|
-
request.destroy();
|
|
1672
|
-
response.destroy();
|
|
1673
|
-
};
|
|
1674
|
-
activeControllers.add(controller);
|
|
1675
|
-
controller.signal.addEventListener("abort", abortRequest, { once: true });
|
|
1676
|
-
let handler;
|
|
1677
|
-
handler = handleCallback(request, response, controller.signal, args, () => {
|
|
1678
|
-
const accepted = args.acceptEvaluation ? args.acceptEvaluation() : evaluations + 1;
|
|
1679
|
-
if (accepted === void 0) return void 0;
|
|
1680
|
-
if (!Number.isSafeInteger(accepted) || accepted <= 0) throw new Error("external optimizer callback: invalid accepted evaluation count");
|
|
1681
|
-
if (accepted > args.maxEvaluations) return void 0;
|
|
1682
|
-
evaluations += 1;
|
|
1683
|
-
return accepted;
|
|
1684
|
-
}, (observation) => {
|
|
1685
|
-
if (!args.observe) return;
|
|
1686
|
-
args.observe({
|
|
1687
|
-
...observation,
|
|
1688
|
-
sequence: ++observationSequence
|
|
1689
|
-
});
|
|
1690
|
-
}, proposedCandidateHashes).finally(() => {
|
|
1691
|
-
controller.signal.removeEventListener("abort", abortRequest);
|
|
1692
|
-
activeControllers.delete(controller);
|
|
1693
|
-
activeHandlers.delete(handler);
|
|
1694
|
-
});
|
|
1695
|
-
activeHandlers.add(handler);
|
|
1696
|
-
handler.catch(() => void 0);
|
|
1697
|
-
});
|
|
1698
|
-
const port = await listenLocal(server);
|
|
1699
|
-
const close = () => {
|
|
1700
|
-
closePromise ??= closeCallbackServer();
|
|
1701
|
-
return closePromise;
|
|
1702
|
-
};
|
|
1703
|
-
const onAbort = () => {
|
|
1704
|
-
close().catch(() => void 0);
|
|
1705
|
-
};
|
|
1706
|
-
args.signal?.addEventListener("abort", onAbort, { once: true });
|
|
1707
|
-
if (args.signal?.aborted) onAbort();
|
|
1708
|
-
return {
|
|
1709
|
-
url: `http://127.0.0.1:${port}/evaluate`,
|
|
1710
|
-
token: args.token,
|
|
1711
|
-
evaluations: () => evaluations,
|
|
1712
|
-
close
|
|
1713
|
-
};
|
|
1714
|
-
async function closeCallbackServer() {
|
|
1715
|
-
args.signal?.removeEventListener("abort", onAbort);
|
|
1716
|
-
accepting = false;
|
|
1717
|
-
const closingServer = closeServer(server);
|
|
1718
|
-
server.closeIdleConnections?.();
|
|
1719
|
-
for (const controller of activeControllers) controller.abort();
|
|
1720
|
-
const [serverResult] = await Promise.allSettled([closingServer, waitForActiveHandlers(activeHandlers)]);
|
|
1721
|
-
if (activeControllers.size !== 0 || activeHandlers.size !== 0) throw new Error("external optimizer callback closed with active request work");
|
|
1722
|
-
if (serverResult?.status === "rejected") throw serverResult.reason;
|
|
1723
|
-
}
|
|
1724
|
-
}
|
|
1725
|
-
async function handleCallback(request, response, signal, args, nextEvaluation, observe, proposedCandidateHashes) {
|
|
1726
|
-
try {
|
|
1727
|
-
if (request.method !== "POST" || request.url !== "/evaluate") {
|
|
1728
|
-
sendJsonIfOpen(response, 404, { error: "not found" });
|
|
1729
|
-
return;
|
|
1730
|
-
}
|
|
1731
|
-
if (request.headers.authorization !== `Bearer ${args.token}`) {
|
|
1732
|
-
sendJsonIfOpen(response, 401, { error: "unauthorized" });
|
|
1733
|
-
return;
|
|
1734
|
-
}
|
|
1735
|
-
let body;
|
|
1736
|
-
try {
|
|
1737
|
-
body = await readJson(request);
|
|
1738
|
-
} catch {
|
|
1739
|
-
observe({
|
|
1740
|
-
kind: "refusal",
|
|
1741
|
-
reason: "invalid-request"
|
|
1742
|
-
});
|
|
1743
|
-
sendJsonIfOpen(response, 400, { error: "request body must be bounded valid JSON" });
|
|
1744
|
-
return;
|
|
1745
|
-
}
|
|
1746
|
-
if (!isRecord(body) || !isExternalTextCandidate(body.candidate) || typeof body.exampleId !== "string") {
|
|
1747
|
-
observe({
|
|
1748
|
-
kind: "refusal",
|
|
1749
|
-
reason: "invalid-request"
|
|
1750
|
-
});
|
|
1751
|
-
sendJsonIfOpen(response, 400, { error: "candidate and exampleId are required strings" });
|
|
1752
|
-
return;
|
|
1753
|
-
}
|
|
1754
|
-
const candidate = cloneCandidate(body.candidate);
|
|
1755
|
-
const candidateHash = contentHash({
|
|
1756
|
-
kind: "external-text-candidate",
|
|
1757
|
-
candidate
|
|
1758
|
-
});
|
|
1759
|
-
if (!proposedCandidateHashes.has(candidateHash)) {
|
|
1760
|
-
observe({
|
|
1761
|
-
kind: "proposal",
|
|
1762
|
-
candidate,
|
|
1763
|
-
candidateHash
|
|
1764
|
-
});
|
|
1765
|
-
proposedCandidateHashes.add(candidateHash);
|
|
1766
|
-
}
|
|
1767
|
-
const count = nextEvaluation();
|
|
1768
|
-
if (count === void 0) {
|
|
1769
|
-
observe({
|
|
1770
|
-
kind: "refusal",
|
|
1771
|
-
reason: "evaluation-limit",
|
|
1772
|
-
candidate,
|
|
1773
|
-
candidateHash,
|
|
1774
|
-
exampleId: body.exampleId
|
|
1775
|
-
});
|
|
1776
|
-
sendJsonIfOpen(response, 429, { error: "evaluation limit reached" });
|
|
1777
|
-
return;
|
|
1778
|
-
}
|
|
1779
|
-
let result;
|
|
1780
|
-
try {
|
|
1781
|
-
result = await args.evaluate({
|
|
1782
|
-
candidate,
|
|
1783
|
-
exampleId: body.exampleId
|
|
1784
|
-
}, signal);
|
|
1785
|
-
} catch {
|
|
1786
|
-
observe({
|
|
1787
|
-
kind: "refusal",
|
|
1788
|
-
reason: "evaluation-failed",
|
|
1789
|
-
candidate,
|
|
1790
|
-
candidateHash,
|
|
1791
|
-
exampleId: body.exampleId
|
|
1792
|
-
});
|
|
1793
|
-
sendJsonIfOpen(response, 500, { error: "evaluation failed" });
|
|
1794
|
-
return;
|
|
1795
|
-
}
|
|
1796
|
-
observe({
|
|
1797
|
-
kind: "evaluation",
|
|
1798
|
-
candidate,
|
|
1799
|
-
candidateHash,
|
|
1800
|
-
exampleId: body.exampleId,
|
|
1801
|
-
evaluationNumber: count,
|
|
1802
|
-
response: structuredClone(result)
|
|
1803
|
-
});
|
|
1804
|
-
sendJsonIfOpen(response, 200, result);
|
|
1805
|
-
} catch {
|
|
1806
|
-
sendJsonIfOpen(response, 500, { error: "evaluation failed" });
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
async function waitForActiveHandlers(activeHandlers) {
|
|
1810
|
-
while (activeHandlers.size > 0) await Promise.allSettled([...activeHandlers]);
|
|
1811
|
-
}
|
|
1812
|
-
function sendJsonIfOpen(response, status, body) {
|
|
1813
|
-
if (response.destroyed || response.writableEnded) return;
|
|
1814
|
-
sendJson(response, status, body);
|
|
1815
|
-
}
|
|
1816
|
-
function readJson(request) {
|
|
1817
|
-
return new Promise((resolvePromise, reject) => {
|
|
1818
|
-
let size = 0;
|
|
1819
|
-
const chunks = [];
|
|
1820
|
-
request.on("data", (chunk) => {
|
|
1821
|
-
size += chunk.length;
|
|
1822
|
-
if (size > MAX_CALLBACK_BODY_BYTES) {
|
|
1823
|
-
reject(/* @__PURE__ */ new Error("callback body too large"));
|
|
1824
|
-
request.destroy();
|
|
1825
|
-
return;
|
|
1826
|
-
}
|
|
1827
|
-
chunks.push(chunk);
|
|
1828
|
-
});
|
|
1829
|
-
request.on("error", reject);
|
|
1830
|
-
request.on("end", () => {
|
|
1831
|
-
try {
|
|
1832
|
-
resolvePromise(JSON.parse(Buffer.concat(chunks).toString("utf8")));
|
|
1833
|
-
} catch (error) {
|
|
1834
|
-
reject(error);
|
|
1835
|
-
}
|
|
1836
|
-
});
|
|
1837
|
-
});
|
|
1838
|
-
}
|
|
1839
|
-
function assertCallbackConfig(args) {
|
|
1840
|
-
if (typeof args.token !== "string" || !args.token.trim()) throw new Error("external optimizer callback: token must be non-empty");
|
|
1841
|
-
if (!Number.isSafeInteger(args.maxEvaluations) || args.maxEvaluations <= 0) throw new Error("external optimizer callback: maxEvaluations must be a positive safe integer");
|
|
1842
|
-
if (args.acceptEvaluation !== void 0 && typeof args.acceptEvaluation !== "function") throw new Error("external optimizer callback: acceptEvaluation must be a function");
|
|
1843
|
-
if (typeof args.evaluate !== "function") throw new Error("external optimizer callback: evaluate must be a function");
|
|
1844
|
-
if (args.observe !== void 0 && typeof args.observe !== "function") throw new Error("external optimizer callback: observe must be a function");
|
|
1845
|
-
}
|
|
1846
|
-
function cloneCandidate(candidate) {
|
|
1847
|
-
return typeof candidate === "string" ? candidate : { ...candidate };
|
|
1848
|
-
}
|
|
1849
|
-
//#endregion
|
|
1850
1651
|
//#region src/campaign/external-optimizer-run-budget.ts
|
|
1851
1652
|
function externalOptimizerRunKey(input) {
|
|
1852
1653
|
if (!input.attemptId.trim() || input.attemptId.trim() !== input.attemptId) throw new Error("external optimizer attemptId must be trimmed and non-empty");
|
|
@@ -5392,7 +5193,8 @@ function externalOptimizerRunnerIdentity(runner, module) {
|
|
|
5392
5193
|
return {
|
|
5393
5194
|
command: runner?.command ?? "python",
|
|
5394
5195
|
args: [...runner?.args ?? ["-m", module]],
|
|
5395
|
-
environment: removeCredentialEnvironment(runner?.env ?? {})
|
|
5196
|
+
environment: removeCredentialEnvironment(runner?.env ?? {}),
|
|
5197
|
+
limits: resolveExternalOptimizerProcessLimits(runner?.limits)
|
|
5396
5198
|
};
|
|
5397
5199
|
}
|
|
5398
5200
|
function snapshotExternalOptimizerRunner(runner) {
|
|
@@ -5400,7 +5202,8 @@ function snapshotExternalOptimizerRunner(runner) {
|
|
|
5400
5202
|
return {
|
|
5401
5203
|
...runner,
|
|
5402
5204
|
...runner.args ? { args: [...runner.args] } : {},
|
|
5403
|
-
...runner.env ? { env: { ...runner.env } } : {}
|
|
5205
|
+
...runner.env ? { env: { ...runner.env } } : {},
|
|
5206
|
+
...runner.limits ? { limits: { ...runner.limits } } : {}
|
|
5404
5207
|
};
|
|
5405
5208
|
}
|
|
5406
5209
|
function snapshotJson(value, label) {
|
|
@@ -5498,6 +5301,7 @@ function snapshotGepaOptimizationConfig(config) {
|
|
|
5498
5301
|
recipe: structuredClone(config.recipe),
|
|
5499
5302
|
...config.engineModules ? { engineModules: [...config.engineModules] } : {},
|
|
5500
5303
|
...config.optimizer ? { optimizer: snapshotOptimizerModel(config.optimizer) } : {},
|
|
5304
|
+
...config.evaluationCallbackLimits ? { evaluationCallbackLimits: { ...config.evaluationCallbackLimits } } : {},
|
|
5501
5305
|
...runner ? { runner } : {}
|
|
5502
5306
|
};
|
|
5503
5307
|
}
|
|
@@ -5516,6 +5320,7 @@ function assertGepaOptimizationConfig(config) {
|
|
|
5516
5320
|
const evidenceLimit = config.maxEvidenceChars ?? 1e5;
|
|
5517
5321
|
if (JSON.stringify(config.objective).length > evidenceLimit || JSON.stringify(config.background ?? "").length > evidenceLimit) throw new Error("gepaOptimizationMethod: objective and background must each fit maxEvidenceChars");
|
|
5518
5322
|
assertEngineModules(config.engineModules);
|
|
5323
|
+
resolveExternalOptimizerCallbackLimits(config.evaluationCallbackLimits, "gepaOptimizationMethod: evaluationCallbackLimits");
|
|
5519
5324
|
if (config.optimizer !== void 0) {
|
|
5520
5325
|
assertOptimizerModel(config.optimizer, "gepaOptimizationMethod: optimizer");
|
|
5521
5326
|
if (config.engineModules?.length) throw new Error("gepaOptimizationMethod: optimizer cannot be combined with engineModules because proxied reflection requires the built-in GEPA engine");
|
|
@@ -5727,6 +5532,7 @@ function gepaOptimizationMethod(config) {
|
|
|
5727
5532
|
selectionSet,
|
|
5728
5533
|
maxCandidateChars,
|
|
5729
5534
|
maxEvidenceChars,
|
|
5535
|
+
evaluationCallbackLimits: resolveExternalOptimizerCallbackLimits(config.evaluationCallbackLimits),
|
|
5730
5536
|
optimizerModel: config.optimizer ? {
|
|
5731
5537
|
model: config.optimizer.model,
|
|
5732
5538
|
callRef: config.optimizer.callRef,
|
|
@@ -5776,6 +5582,7 @@ function gepaOptimizationMethod(config) {
|
|
|
5776
5582
|
acceptEvaluation: () => runBudget.acceptEvaluation(),
|
|
5777
5583
|
evaluate,
|
|
5778
5584
|
observe: observationLog.observe,
|
|
5585
|
+
...config.evaluationCallbackLimits ? { limits: config.evaluationCallbackLimits } : {},
|
|
5779
5586
|
...signal ? { signal } : {}
|
|
5780
5587
|
});
|
|
5781
5588
|
const runnerEnv = bridgeRunner?.env ?? {};
|
|
@@ -7004,6 +6811,7 @@ function snapshotSkillOptOptimizationConfig(config) {
|
|
|
7004
6811
|
...config,
|
|
7005
6812
|
trainer: structuredClone(config.trainer),
|
|
7006
6813
|
optimizer: snapshotOptimizerModel(config.optimizer),
|
|
6814
|
+
...config.evaluationCallbackLimits ? { evaluationCallbackLimits: { ...config.evaluationCallbackLimits } } : {},
|
|
7007
6815
|
...runner ? { runner } : {}
|
|
7008
6816
|
};
|
|
7009
6817
|
}
|
|
@@ -7056,6 +6864,7 @@ function assertSkillOptOptimizationConfig(config) {
|
|
|
7056
6864
|
assertJsonValue(config.trainer.overrides ?? {}, "skillOptOptimizationMethod: trainer.overrides");
|
|
7057
6865
|
assertNoCredentialValues(config.trainer.overrides ?? {}, "skillOptOptimizationMethod: trainer.overrides", "optimizer");
|
|
7058
6866
|
assertOptimizerModel(config.optimizer, "skillOptOptimizationMethod: optimizer");
|
|
6867
|
+
resolveExternalOptimizerCallbackLimits(config.evaluationCallbackLimits, "skillOptOptimizationMethod: evaluationCallbackLimits");
|
|
7059
6868
|
const evidenceLimit = config.maxEvidenceChars ?? 1e5;
|
|
7060
6869
|
if (JSON.stringify(config.objective).length > evidenceLimit || JSON.stringify(config.background ?? "").length > evidenceLimit) throw new Error("skillOptOptimizationMethod: objective and background must each fit maxEvidenceChars");
|
|
7061
6870
|
}
|
|
@@ -7136,6 +6945,7 @@ function skillOptOptimizationMethod(config) {
|
|
|
7136
6945
|
hardScoreThreshold: config.hardScoreThreshold ?? 1,
|
|
7137
6946
|
maxCandidateChars,
|
|
7138
6947
|
maxEvidenceChars,
|
|
6948
|
+
evaluationCallbackLimits: resolveExternalOptimizerCallbackLimits(config.evaluationCallbackLimits),
|
|
7139
6949
|
runner: externalOptimizerRunnerIdentity(bridgeRunner, "agent_eval_rpc.skillopt_bridge")
|
|
7140
6950
|
};
|
|
7141
6951
|
const compatibleRunId = externalOptimizerCompatibleRunKey(runMaterial);
|
|
@@ -7179,6 +6989,7 @@ function skillOptOptimizationMethod(config) {
|
|
|
7179
6989
|
acceptEvaluation: () => runBudget.acceptEvaluation(),
|
|
7180
6990
|
evaluate,
|
|
7181
6991
|
observe: observationLog.observe,
|
|
6992
|
+
...config.evaluationCallbackLimits ? { limits: config.evaluationCallbackLimits } : {},
|
|
7182
6993
|
...signal ? { signal } : {}
|
|
7183
6994
|
});
|
|
7184
6995
|
const runnerEnv = bridgeRunner?.env ?? {};
|
|
@@ -7332,4 +7143,4 @@ function skillOptOptimizationMethod(config) {
|
|
|
7332
7143
|
//#endregion
|
|
7333
7144
|
export { assertCampaignSplitIdentity as $, assertOptimizationResult as A, summarizeAgentReceiptIntegrity as At, surfaceContentHash as B, detectScale as C, decidePairedPromotion as Ct, runCanaries as D, BackendIntegrityError as Dt, pairHoldout as E, pairedDeltaTest as Et, assertCodeSurfaceIdentity as F, DEFAULT_MUTATION_PRIMITIVES as G, campaignBreakdown as H, assertComponentSurface as I, planCampaignRun as J, buildReflectionPrompt as K, codeSurfaceIdentityMaterial as L, compareOptimizationMethods as M, JudgeParseError as Mt, costFromLedgerSummary as N, composeGate as O, assertRealAgentReceipts as Ot, optimizationTokenUsageFromSummary as P, assertCampaignDesign as Q, componentSurfaceIdentityMaterial as R, defaultProductionGate as S, recoverTruncatedJson as St, heldoutSignificance as T, minimumPairsForPairedDeltaTest as Tt, campaignMeanComposite as U, surfaceHash as V, compareRankKeys as W, resolveRunDir as X, runCampaign as Y, tangleTracesRoot as Z, buildEvidenceVector as _, crowdingDistance as _t, emitLoopProvenance as a, REFERENCE_EQUIVALENCE_JUDGE_VERSION as at, powerPreflight as b, paretoFrontierWithCrowding as bt, provenanceRecordPath as c, DEFAULT_RED_TEAM_CORPUS as ct, runImprovementLoop as d, scoreRedTeamOutput as dt, campaignScenarioIdentity as et, runOptimization as f, toolNamesForRun as ft, gepaOptimizationMethod as g, llmJudge as gt, labelTrustRank as h, hashScenarios as ht, canonicalDigest as i, REFERENCE_EQUIVALENCE_INPUT_LIMITS as it, combineComparisonCosts as j, summarizeBackendIntegrity as jt, externalTextOptimizationMethod as k, assertRealBackend as kt, provenanceSpansPath as l, redTeamDataset as lt, isProposedCandidate as m, HoldoutLockedError as mt, buildLoopProvenanceRecord as n, campaignSplitDigestFromIdentities as nt, loopProvenanceArgsFromResult as o, createReferenceEquivalenceJudge as ot, runEval as p, Dataset as pt, parseReflectionResponse as q, campaignMeasurementDigest as r, openAutoPr as rt, loopProvenanceSpans as s, runReferenceEquivalenceJudge as st, skillOptOptimizationMethod as t, campaignSplitDigest as tt, verifyLoopProvenanceRecord as u, redTeamReport as ut, paretoPolicy as v, dominates as vt, dimensionRegressions as w, pairedDecisionShape as wt, heldOutGate as x, scalarScore as xt, paretoSignificanceGate as y, paretoFrontier as yt, renderSurfaceDiff as z };
|
|
7334
7145
|
|
|
7335
|
-
//# sourceMappingURL=skillopt-optimization-method-
|
|
7146
|
+
//# sourceMappingURL=skillopt-optimization-method-DA5mJmFE.js.map
|