@tangle-network/agent-eval 0.192.0 → 0.193.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 +23 -0
- package/dist/adapters/http.d.ts +2 -2
- package/dist/analyst/index.d.ts +5 -5
- package/dist/analyst/index.js +1 -1
- package/dist/{analyze-runs-SCSWYpy0.js → analyze-runs-B6gv7vAT.js} +2 -2
- package/dist/{analyze-runs-SCSWYpy0.js.map → analyze-runs-B6gv7vAT.js.map} +1 -1
- package/dist/{benchmark-command-C458yEFK.js → benchmark-command-DVhUPU7H.js} +2 -2
- package/dist/{benchmark-command-C458yEFK.js.map → benchmark-command-DVhUPU7H.js.map} +1 -1
- package/dist/benchmarks/index.d.ts +3 -3
- package/dist/benchmarks/index.js +2 -2
- package/dist/campaign/index.d.ts +5 -5
- package/dist/campaign/index.js +10 -9
- package/dist/{campaign-BVQVBEfH.js → campaign-DdE6S80e.js} +9 -8
- package/dist/{campaign-BVQVBEfH.js.map → campaign-DdE6S80e.js.map} +1 -1
- package/dist/{campaign-evidence-DcQiYhJI.js → campaign-evidence-DJc60F9C.js} +2 -2
- package/dist/{campaign-evidence-DcQiYhJI.js.map → campaign-evidence-DJc60F9C.js.map} +1 -1
- package/dist/cli.js +47 -10
- package/dist/cli.js.map +1 -1
- package/dist/{client-wFyDisxi.d.ts → client-dMMKoQNS.d.ts} +2 -2
- package/dist/{client-wFyDisxi.d.ts.map → client-dMMKoQNS.d.ts.map} +1 -1
- package/dist/contract/index.d.ts +7 -7
- package/dist/contract/index.js +8 -8
- package/dist/{default-registry-DdqA_-_o.d.ts → default-registry-C3HTE08O.d.ts} +3 -3
- package/dist/{default-registry-DdqA_-_o.d.ts.map → default-registry-C3HTE08O.d.ts.map} +1 -1
- package/dist/{define-agent-eval-DcludNJS.d.ts → define-agent-eval-DQJvVa1P.d.ts} +6 -6
- package/dist/{define-agent-eval-DcludNJS.d.ts.map → define-agent-eval-DQJvVa1P.d.ts.map} +1 -1
- package/dist/{define-agent-eval-DQuos3Aw.js → define-agent-eval-DkPbnJEY.js} +5 -5
- package/dist/{define-agent-eval-DQuos3Aw.js.map → define-agent-eval-DkPbnJEY.js.map} +1 -1
- package/dist/diagnosis/index.js +1 -1
- package/dist/{engine-C1DIAEpn.d.ts → engine-DjRV55F9.d.ts} +2 -2
- package/dist/{engine-C1DIAEpn.d.ts.map → engine-DjRV55F9.d.ts.map} +1 -1
- package/dist/evaluation.d.ts +1 -1
- package/dist/experiment/index.d.ts +2 -2
- package/dist/experiment/index.js +4 -4
- package/dist/hosted/index.d.ts +2 -2
- package/dist/hosted/index.js +1 -1
- package/dist/{index-DBoXFaz0.d.ts → index-0jEtpSM7.d.ts} +3 -3
- package/dist/{index-DBoXFaz0.d.ts.map → index-0jEtpSM7.d.ts.map} +1 -1
- package/dist/{index-DwQxdWve.d.ts → index-DMPLG226.d.ts} +89 -272
- package/dist/index-DMPLG226.d.ts.map +1 -0
- package/dist/{index-DNVzu9Vv.d.ts → index-DWQNDqPd.d.ts} +7 -7
- package/dist/{index-DNVzu9Vv.d.ts.map → index-DWQNDqPd.d.ts.map} +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +7 -290
- package/dist/index.js.map +1 -1
- package/dist/jev.d.ts +1 -1
- package/dist/ledger-core/index.d.ts +1 -1
- package/dist/{llm-judge-Z6MkTkd0.js → llm-judge-ChbWfeWl.js} +1021 -234
- package/dist/llm-judge-ChbWfeWl.js.map +1 -0
- package/dist/{matrix-CQMMrEQ5.d.ts → matrix-CNu13gg8.d.ts} +2 -2
- package/dist/{matrix-CQMMrEQ5.d.ts.map → matrix-CNu13gg8.d.ts.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/index.d.ts +2 -2
- package/dist/openapi.json +1 -1
- package/dist/paired-delta-test-BF-FEP8V.js +78 -0
- package/dist/paired-delta-test-BF-FEP8V.js.map +1 -0
- package/dist/{paired-promotion-decision-6cn3bLc3.js → paired-promotion-decision-DTKl6-G8.js} +4 -77
- package/dist/paired-promotion-decision-DTKl6-G8.js.map +1 -0
- package/dist/{produced-state-CVmCPQDJ.js → produced-state-BqeIaIp2.js} +3 -3
- package/dist/{produced-state-CVmCPQDJ.js.map → produced-state-BqeIaIp2.js.map} +1 -1
- package/dist/{promotion-policy-CfMNUro2.js → promotion-policy-Cy5OV8BV.js} +3 -3
- package/dist/{promotion-policy-CfMNUro2.js.map → promotion-policy-Cy5OV8BV.js.map} +1 -1
- package/dist/rl.d.ts +1 -1
- package/dist/rl.js +1 -1
- package/dist/{search-ledger-Ck7tok0h.js → search-ledger-CJiAEU3j.js} +89 -27
- package/dist/search-ledger-CJiAEU3j.js.map +1 -0
- package/dist/{search-ledger-types-C9anU2DX.d.ts → search-ledger-types-B3El5xgS.d.ts} +95 -11
- package/dist/search-ledger-types-B3El5xgS.d.ts.map +1 -0
- package/dist/{search-shipper-BG182p-U.js → search-shipper-DUlwlCsK.js} +2 -2
- package/dist/{search-shipper-BG182p-U.js.map → search-shipper-DUlwlCsK.js.map} +1 -1
- package/dist/search-summary-BhY8p0Av.js +378 -0
- package/dist/search-summary-BhY8p0Av.js.map +1 -0
- package/dist/{sequential-lwJOTRON.js → sequential-C21_PP7F.js} +2 -2
- package/dist/{sequential-lwJOTRON.js.map → sequential-C21_PP7F.js.map} +1 -1
- package/dist/{skillopt-optimization-method-DoayuM6D.js → skillopt-optimization-method-DXQdaBjx.js} +5 -5
- package/dist/{skillopt-optimization-method-DoayuM6D.js.map → skillopt-optimization-method-DXQdaBjx.js.map} +1 -1
- package/dist/{statistical-heldout-C1Ej5Ce8.d.ts → statistical-heldout-D-xBpbrd.d.ts} +2 -2
- package/dist/{statistical-heldout-C1Ej5Ce8.d.ts.map → statistical-heldout-D-xBpbrd.d.ts.map} +1 -1
- package/dist/{statistical-heldout-GcLIPxk4.js → statistical-heldout-DANVmyug.js} +2 -2
- package/dist/{statistical-heldout-GcLIPxk4.js.map → statistical-heldout-DANVmyug.js.map} +1 -1
- package/dist/{store-tool-spans-ByLdU26j.d.ts → store-tool-spans-BxrfuU2t.d.ts} +4 -4
- package/dist/{store-tool-spans-ByLdU26j.d.ts.map → store-tool-spans-BxrfuU2t.d.ts.map} +1 -1
- package/dist/{tool-groups-DiBi16ns.d.ts → tool-groups-BC9O7Epn.d.ts} +2 -2
- package/dist/tool-groups-BC9O7Epn.d.ts.map +1 -0
- package/dist/trace-repair/index.d.ts +1 -1
- package/dist/traces.d.ts +2 -2
- package/dist/{types-C1CAD70_.d.ts → types-BWwRXofp.d.ts} +328 -4
- package/dist/types-BWwRXofp.d.ts.map +1 -0
- package/dist/{types-ByZslIlr.d.ts → types-qoxUfKQg.d.ts} +2 -2
- package/dist/{types-ByZslIlr.d.ts.map → types-qoxUfKQg.d.ts.map} +1 -1
- package/docs/search-ledger.md +71 -6
- package/package.json +1 -1
- package/dist/claim-BGOUqoMq.d.ts +0 -38
- package/dist/claim-BGOUqoMq.d.ts.map +0 -1
- package/dist/index-DwQxdWve.d.ts.map +0 -1
- package/dist/llm-judge-Z6MkTkd0.js.map +0 -1
- package/dist/paired-promotion-decision-6cn3bLc3.js.map +0 -1
- package/dist/search-ledger-Ck7tok0h.js.map +0 -1
- package/dist/search-ledger-types-C9anU2DX.d.ts.map +0 -1
- package/dist/tool-groups-DiBi16ns.d.ts.map +0 -1
- package/dist/types-C1CAD70_.d.ts.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { i as replaySearchLedgerText } from "./search-ledger-CJiAEU3j.js";
|
|
3
|
+
import { t as renderSearchSummary } from "./search-summary-BhY8p0Av.js";
|
|
4
|
+
import { c as hostedTenantFromEnv, g as SearchRunKindSchema, r as shipSearchLedger, t as SearchShipConflictError, u as SEARCH_LEDGER_BATCH_MAX_BYTES } from "./search-shipper-DUlwlCsK.js";
|
|
3
5
|
import { i as runRolloutReleaseCli } from "./hf-dataset-CRqtSjnR.js";
|
|
4
6
|
import { t as createChatClient } from "./chat-client-B_ItsSBw.js";
|
|
5
|
-
import { t as runAnalystBenchmarkCommand } from "./benchmark-command-
|
|
7
|
+
import { t as runAnalystBenchmarkCommand } from "./benchmark-command-DVhUPU7H.js";
|
|
6
8
|
import { a as runRpcBatch, o as runRpcOnce, p as handleVersion, r as startServerAsync, s as buildOpenApi } from "./server-DtetGGoA.js";
|
|
7
9
|
import { t as runSupervisorRunCommand } from "./report-command-DKJ_yAIj.js";
|
|
8
10
|
import { writeFileSync } from "node:fs";
|
|
9
|
-
import { open } from "node:fs/promises";
|
|
11
|
+
import { open, readFile } from "node:fs/promises";
|
|
10
12
|
//#region src/cli-config.ts
|
|
11
13
|
/**
|
|
12
14
|
* Provider configuration for the `agent-eval` binary.
|
|
@@ -81,28 +83,47 @@ function nonEmpty(value) {
|
|
|
81
83
|
* `agent-eval search <subcommand>`: work with a search ledger from a terminal.
|
|
82
84
|
*
|
|
83
85
|
* agent-eval search ship <search-ledger.jsonl> --run-kind optimization|eval [--content full|digests]
|
|
86
|
+
* agent-eval search show <search-ledger.jsonl>
|
|
84
87
|
*
|
|
85
88
|
* `ship` sends the ledger to the hosted store named by `TANGLE_INGEST_URL`,
|
|
86
89
|
* `TANGLE_INGEST_API_KEY` and `TANGLE_TENANT_ID`, starting from the store's
|
|
87
90
|
* head, so it finishes or resumes a ship that a loop could not complete.
|
|
91
|
+
*
|
|
92
|
+
* `show` verifies the ledger and prints `renderSearchSummary`: the same
|
|
93
|
+
* compact text a proposer reads, on the search's own ranking split (the
|
|
94
|
+
* selection split when the search declares one, else train). There is no
|
|
95
|
+
* local HTML renderer; the hosted store's page is the visual view (§5 of the
|
|
96
|
+
* search-tree design).
|
|
88
97
|
*/
|
|
89
|
-
const USAGE = `usage: agent-eval search
|
|
98
|
+
const USAGE = `usage: agent-eval search <subcommand> ...
|
|
99
|
+
|
|
100
|
+
ship <search-ledger.jsonl> --run-kind optimization|eval [--content full|digests]
|
|
101
|
+
Ships the ledger's entries, and the blobs they name, to the hosted store in
|
|
102
|
+
TANGLE_INGEST_URL (or TANGLE_ORCHESTRATOR_URL) as tenant TANGLE_TENANT_ID with
|
|
103
|
+
TANGLE_INGEST_API_KEY (or TANGLE_API_KEY). It starts from the store's head, so
|
|
104
|
+
running it again sends only what the store lacks. Prints the result as JSON.
|
|
105
|
+
Exits 1 when the store holds a different chain for the search.
|
|
90
106
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
107
|
+
show <search-ledger.jsonl>
|
|
108
|
+
Verifies the ledger and prints its search summary: the leading nodes
|
|
109
|
+
against the root, the most recently discarded nodes and why, and a log
|
|
110
|
+
of recent proposals. The same text a proposer reads as context, on the
|
|
111
|
+
search's own ranking split.`;
|
|
96
112
|
async function runSearchCommand(argv) {
|
|
97
113
|
const [subcommand, ...rest] = argv;
|
|
98
|
-
if (
|
|
114
|
+
if (subcommand === void 0 || subcommand === "--help" || subcommand === "-h") {
|
|
99
115
|
process.stdout.write(`${USAGE}\n`);
|
|
100
116
|
return 0;
|
|
101
117
|
}
|
|
118
|
+
if (subcommand === "show") return await runShowCommand(rest);
|
|
102
119
|
if (subcommand !== "ship") {
|
|
103
120
|
process.stderr.write(`unknown search subcommand: ${subcommand}\n${USAGE}\n`);
|
|
104
121
|
return 1;
|
|
105
122
|
}
|
|
123
|
+
if (rest.some((arg) => arg === void 0 || arg === "--help" || arg === "-h")) {
|
|
124
|
+
process.stdout.write(`${USAGE}\n`);
|
|
125
|
+
return 0;
|
|
126
|
+
}
|
|
106
127
|
const { path, flags } = parseShipArgs(rest);
|
|
107
128
|
const runKind = SearchRunKindSchema.safeParse(flags["run-kind"]);
|
|
108
129
|
if (!runKind.success) throw new Error(`--run-kind must be optimization or eval\n${USAGE}`);
|
|
@@ -129,6 +150,18 @@ async function runSearchCommand(argv) {
|
|
|
129
150
|
return 1;
|
|
130
151
|
}
|
|
131
152
|
}
|
|
153
|
+
async function runShowCommand(argv) {
|
|
154
|
+
if (argv.length !== 1 || argv[0] === "--help" || argv[0] === "-h") {
|
|
155
|
+
process.stdout.write(`${USAGE}\n`);
|
|
156
|
+
return argv.length === 1 ? 0 : 1;
|
|
157
|
+
}
|
|
158
|
+
const path = argv[0];
|
|
159
|
+
const searchId = await firstLineSearchId(path);
|
|
160
|
+
const state = replaySearchLedgerText(await readFile(path, "utf8"), searchId, path);
|
|
161
|
+
const split = state.header && state.header.splits.selection.tasks.length > 0 ? "selection" : "train";
|
|
162
|
+
process.stdout.write(`${renderSearchSummary(state, { split })}\n`);
|
|
163
|
+
return 0;
|
|
164
|
+
}
|
|
132
165
|
function parseShipArgs(argv) {
|
|
133
166
|
const flags = {};
|
|
134
167
|
const positional = [];
|
|
@@ -176,6 +209,7 @@ async function firstLineSearchId(path) {
|
|
|
176
209
|
* agent-eval analyst-benchmark ... # benchmark a real-model trace analyst
|
|
177
210
|
* agent-eval supervisor-run report <runDir> [--format headline|markdown|json]
|
|
178
211
|
* agent-eval search ship <search-ledger.jsonl> --run-kind optimization|eval
|
|
212
|
+
* agent-eval search show <search-ledger.jsonl>
|
|
179
213
|
* agent-eval openapi [--out path] # write OpenAPI spec
|
|
180
214
|
* agent-eval version
|
|
181
215
|
*
|
|
@@ -239,6 +273,9 @@ Commands:
|
|
|
239
273
|
search ship <search-ledger.jsonl> --run-kind optimization|eval [--content full|digests]
|
|
240
274
|
Ship a search ledger and its blobs to the hosted store in TANGLE_INGEST_URL,
|
|
241
275
|
starting from the store's head. Run with --help for the environment it reads.
|
|
276
|
+
search show <search-ledger.jsonl>
|
|
277
|
+
Verify a search ledger and print its summary: leading nodes, recently
|
|
278
|
+
discarded nodes and recent proposals, the same text a proposer reads.
|
|
242
279
|
version
|
|
243
280
|
Print server + wire-protocol version JSON.
|
|
244
281
|
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","names":[],"sources":["../src/cli-config.ts","../src/search-command.ts","../src/cli.ts"],"sourcesContent":["/**\n * Provider configuration for the `agent-eval` binary.\n *\n * The binary reads endpoint and credential values from its environment.\n * TypeScript library callers bind a transport explicitly. The maintained\n * HTTP transport accepts their credential and sends provider requests.\n */\n\nimport { type ChatClient, createChatClient } from './analyst/chat-client'\n\nexport interface CliLlmConfig {\n /** Judge transport for the wire handlers. Absent when no provider is configured. */\n chat?: ChatClient\n model?: string\n}\n\n/** The endpoint the binary resolved from its environment. */\nexport interface CliProviderRoute {\n baseUrl: string\n apiKey: string\n model?: string\n}\n\n/**\n * Environment precedence for the binary's provider route, with no client built.\n *\n * Both halves are required: a base URL without a key, or a key without an\n * endpoint, is a half-configured server. `/v1/judge` then refuses with\n * `llm_not_configured` instead of calling an unintended endpoint.\n */\nexport function resolveCliProviderRoute(\n env: NodeJS.ProcessEnv = process.env,\n): CliProviderRoute | undefined {\n const explicitBaseUrl = nonEmpty(env.AGENT_EVAL_LLM_BASE_URL)\n const explicitApiKey = nonEmpty(env.AGENT_EVAL_LLM_API_KEY)\n const openAiApiKey = nonEmpty(env.OPENAI_API_KEY)\n const tangleApiKey = nonEmpty(env.TANGLE_API_KEY)\n const baseUrl =\n explicitBaseUrl ??\n nonEmpty(env.OPENAI_BASE_URL) ??\n nonEmpty(env.TANGLE_ROUTER_URL) ??\n (openAiApiKey ? 'https://api.openai.com/v1' : undefined) ??\n (tangleApiKey ? 'https://router.tangle.tools/v1' : undefined)\n const apiKey = explicitApiKey ?? openAiApiKey ?? tangleApiKey\n const model =\n nonEmpty(env.AGENT_EVAL_LLM_MODEL) ?? nonEmpty(env.OPENAI_MODEL) ?? nonEmpty(env.TANGLE_MODEL)\n\n if (!baseUrl || !apiKey) return undefined\n return { baseUrl, apiKey, ...(model ? { model } : {}) }\n}\n\nexport function resolveCliLlmConfig(env: NodeJS.ProcessEnv = process.env): CliLlmConfig {\n const route = resolveCliProviderRoute(env)\n if (!route) return {}\n return {\n chat: cliChatClient({ baseUrl: route.baseUrl, apiKey: route.apiKey }, route.model),\n ...(route.model ? { model: route.model } : {}),\n }\n}\n\n/**\n * The binary's transport IS the published one — `createChatClient({ transport:\n * 'openai-compatible' })` — so the server and a library consumer cannot drift\n * onto two different clients for the same endpoint.\n *\n * The one thing kept local is the error text. A generic \"no model on the\n * request\" tells a server operator nothing; this names the variable to set.\n */\nfunction cliChatClient(\n route: { baseUrl: string; apiKey: string },\n defaultModel: string | undefined,\n): ChatClient {\n const client = createChatClient({\n transport: 'openai-compatible',\n baseUrl: route.baseUrl,\n apiKey: route.apiKey,\n ...(defaultModel ? { defaultModel } : {}),\n })\n return {\n ...client,\n chat: (req, callOpts) => {\n if (!req.model && !defaultModel) {\n throw new Error(\n 'agent-eval: no model on the request and no AGENT_EVAL_LLM_MODEL configured',\n )\n }\n return client.chat(req, callOpts)\n },\n }\n}\n\nfunction nonEmpty(value: string | undefined): string | undefined {\n const trimmed = value?.trim()\n return trimmed ? trimmed : undefined\n}\n","/**\n * `agent-eval search <subcommand>`: work with a search ledger from a terminal.\n *\n * agent-eval search ship <search-ledger.jsonl> --run-kind optimization|eval [--content full|digests]\n *\n * `ship` sends the ledger to the hosted store named by `TANGLE_INGEST_URL`,\n * `TANGLE_INGEST_API_KEY` and `TANGLE_TENANT_ID`, starting from the store's\n * head, so it finishes or resumes a ship that a loop could not complete.\n */\n\nimport { open } from 'node:fs/promises'\nimport { hostedTenantFromEnv } from './hosted/client'\nimport { SEARCH_LEDGER_BATCH_MAX_BYTES, SearchRunKindSchema } from './hosted/search-ledger-wire'\nimport { SearchShipConflictError, shipSearchLedger } from './hosted/search-shipper'\n\nconst USAGE = `usage: agent-eval search ship <search-ledger.jsonl> --run-kind optimization|eval [--content full|digests]\n\nShips the ledger's entries, and the blobs they name, to the hosted store in\nTANGLE_INGEST_URL (or TANGLE_ORCHESTRATOR_URL) as tenant TANGLE_TENANT_ID with\nTANGLE_INGEST_API_KEY (or TANGLE_API_KEY). It starts from the store's head, so\nrunning it again sends only what the store lacks. Prints the result as JSON.\nExits 1 when the store holds a different chain for the search.`\n\nexport async function runSearchCommand(argv: string[]): Promise<number> {\n const [subcommand, ...rest] = argv\n if ([subcommand, ...rest].some((arg) => arg === undefined || arg === '--help' || arg === '-h')) {\n process.stdout.write(`${USAGE}\\n`)\n return 0\n }\n if (subcommand !== 'ship') {\n process.stderr.write(`unknown search subcommand: ${subcommand}\\n${USAGE}\\n`)\n return 1\n }\n const { path, flags } = parseShipArgs(rest)\n const runKind = SearchRunKindSchema.safeParse(flags['run-kind'])\n if (!runKind.success) throw new Error(`--run-kind must be optimization or eval\\n${USAGE}`)\n const content = flags.content ?? 'full'\n if (content !== 'full' && content !== 'digests') {\n throw new Error(`--content must be full or digests\\n${USAGE}`)\n }\n const tenant = hostedTenantFromEnv()\n if (!tenant) {\n throw new Error(\n 'set TANGLE_INGEST_URL, TANGLE_INGEST_API_KEY and TANGLE_TENANT_ID to name the store',\n )\n }\n const searchId = await firstLineSearchId(path)\n try {\n const shipped = await shipSearchLedger({\n tenant,\n ledger: { path, searchId },\n runKind: runKind.data,\n content,\n })\n process.stdout.write(`${JSON.stringify(shipped, null, 2)}\\n`)\n return shipped.head.nextSequence === shipped.localLines ? 0 : 1\n } catch (error) {\n if (!(error instanceof SearchShipConflictError)) throw error\n process.stderr.write(`${error.message}\\n`)\n return 1\n }\n}\n\nfunction parseShipArgs(argv: string[]): { path: string; flags: Record<string, string> } {\n const flags: Record<string, string> = {}\n const positional: string[] = []\n for (let index = 0; index < argv.length; index++) {\n const token = argv[index]!\n if (!token.startsWith('--')) {\n positional.push(token)\n continue\n }\n const [name, inline] = token.slice(2).split('=', 2) as [string, string | undefined]\n if (name !== 'run-kind' && name !== 'content') throw new Error(`unknown flag --${name}`)\n const value = inline ?? argv[++index]\n if (value === undefined) throw new Error(`--${name} needs a value`)\n flags[name] = value\n }\n if (positional.length !== 1) throw new Error(USAGE)\n return { path: positional[0]!, flags }\n}\n\n/** The ledger names its search on every line; read the first. */\nasync function firstLineSearchId(path: string): Promise<string> {\n const handle = await open(path, 'r')\n try {\n // A line longer than one request's limit cannot ship anyway.\n const bytes = Buffer.alloc(SEARCH_LEDGER_BATCH_MAX_BYTES + 1)\n const { bytesRead } = await handle.read(bytes, 0, bytes.byteLength, 0)\n const newline = bytes.subarray(0, bytesRead).indexOf(0x0a)\n if (newline < 0) throw new Error(`${path} holds no complete ledger line`)\n const first = JSON.parse(bytes.toString('utf8', 0, newline)) as { searchId?: unknown }\n if (typeof first.searchId !== 'string') throw new Error(`${path} line 1 names no searchId`)\n return first.searchId\n } finally {\n await handle.close()\n }\n}\n","#!/usr/bin/env node\n/**\n * agent-eval CLI.\n *\n * agent-eval serve [--port 5005] [--host 127.0.0.1]\n * agent-eval rpc <method> # one request from stdin → one response on stdout\n * agent-eval rpc-batch <method> # JSONL stdin → JSONL stdout\n * agent-eval analyst-benchmark ... # benchmark a real-model trace analyst\n * agent-eval supervisor-run report <runDir> [--format headline|markdown|json]\n * agent-eval search ship <search-ledger.jsonl> --run-kind optimization|eval\n * agent-eval openapi [--out path] # write OpenAPI spec\n * agent-eval version\n *\n * <method> is one of: judge, listRubrics, version. When omitted, the\n * stdin payload must be a full {method, params} envelope.\n */\nimport { writeFileSync } from 'node:fs'\nimport { runAnalystBenchmarkCommand } from './analyst/benchmark-command'\nimport { resolveCliLlmConfig } from './cli-config'\nimport { runRolloutReleaseCli } from './rollout/release/hf-dataset'\nimport { runSearchCommand } from './search-command'\nimport { runSupervisorRunCommand } from './supervisor-run/report-command'\nimport { handleVersion } from './wire/handlers'\nimport { buildOpenApi } from './wire/openapi'\nimport { runRpcBatch, runRpcOnce } from './wire/rpc'\nimport { startServerAsync } from './wire/server'\n\ninterface Args {\n command: string\n positional: string[]\n flags: Record<string, string>\n}\n\nfunction parseArgs(argv: string[]): Args {\n const [command, ...rest] = argv\n const positional: string[] = []\n const flags: Record<string, string> = {}\n for (let i = 0; i < rest.length; i++) {\n const tok = rest[i]!\n if (tok.startsWith('--')) {\n const raw = tok.slice(2)\n const equalsAt = raw.indexOf('=')\n if (equalsAt >= 0) {\n flags[raw.slice(0, equalsAt)] = raw.slice(equalsAt + 1)\n continue\n }\n const key = raw\n if (key === 'help') {\n flags[key] = 'true'\n continue\n }\n const next = rest[i + 1]\n if (next != null && !next.startsWith('--')) {\n flags[key] = next\n i++\n } else {\n flags[key] = 'true'\n }\n } else if (tok === '-h') {\n flags.help = 'true'\n } else {\n positional.push(tok)\n }\n }\n return { command: command ?? 'help', positional, flags }\n}\n\nconst HELP = `agent-eval: evaluation RPC and HTTP server.\n\nCommands:\n serve [--port 5005] [--host 127.0.0.1]\n Start the HTTP server. POST /v1/judge, GET /v1/rubrics, GET /v1/version, GET /openapi.json.\n rpc <method>\n Read one JSON object from stdin (the params for <method>), write one\n JSON object to stdout. Methods: judge, listRubrics, version.\n rpc-batch <method>\n Like 'rpc' but JSONL in / JSONL out.\n openapi [--out openapi.json]\n Write the OpenAPI 3.1 spec.\n rollout-release <ledger.jsonl...> --out <dir> [--formats sft,verifiers,rft,raw] [--include-proposers] [--push <org/name>]\n Build a HuggingFace-ready dataset dir from tangle.rollout.v1 ledgers:\n validate, fail-closed split filter, scrub, export formats + card.\n analyst-benchmark --dataset <agentrx|codetracebench> --labels <path> --trace-dir <path> [--artifact-dir <path>] --out <dir> ...\n Compare an empty baseline with a real-model trace analyst on public labels.\n Run with --help for all required inputs and controls.\n supervisor-run report <runDir> [--format headline|markdown|json]\n Report one Runtime or loops supervisor run directory. The status comes\n from Runtime's own result.json / failure.json; every missing measurement\n stays named. Exits 1 when the directory cannot be read.\n search ship <search-ledger.jsonl> --run-kind optimization|eval [--content full|digests]\n Ship a search ledger and its blobs to the hosted store in TANGLE_INGEST_URL,\n starting from the store's head. Run with --help for the environment it reads.\n version\n Print server + wire-protocol version JSON.\n\nJudge provider:\n Set AGENT_EVAL_LLM_BASE_URL, AGENT_EVAL_LLM_API_KEY, and AGENT_EVAL_LLM_MODEL.\n OPENAI_* and TANGLE_* equivalents are also accepted. This binary is the only\n place that reads a provider credential; the library never does. Without both\n a base URL and a key, /v1/judge refuses with llm_not_configured.\n\nWithout arguments, prints this help.`\n\nasync function main(): Promise<number> {\n const { command, positional, flags } = parseArgs(process.argv.slice(2))\n assertKnownFlags(command, flags)\n\n if (command === 'analyst-benchmark' && flags.help === 'true') {\n return await runAnalystBenchmarkCommand(process.argv.slice(3))\n }\n if (command === 'search') return await runSearchCommand(process.argv.slice(3))\n if (flags.help === 'true') {\n process.stdout.write(`${HELP}\\n`)\n return 0\n }\n\n switch (command) {\n case 'serve': {\n const port = parsePort(flags.port ?? '5005')\n const host = flags.host ?? '127.0.0.1'\n const llm = resolveCliLlmConfig()\n const { server } = await startServerAsync({\n port,\n host,\n ...(llm.chat ? { chat: llm.chat } : {}),\n ...(llm.model ? { judgeModel: llm.model } : {}),\n })\n // Keep process alive on SIGINT/SIGTERM\n const shutdown = (sig: string) => {\n // eslint-disable-next-line no-console\n console.log(`[agent-eval] received ${sig}, shutting down`)\n server.close(() => process.exit(0))\n // Force exit after 5s if close hangs\n setTimeout(() => process.exit(1), 5000).unref()\n }\n process.on('SIGINT', () => shutdown('SIGINT'))\n process.on('SIGTERM', () => shutdown('SIGTERM'))\n // Block forever\n await new Promise(() => {})\n return 0\n }\n case 'rpc': {\n const [method] = positional\n const llm = resolveCliLlmConfig()\n return await runRpcOnce(method, {\n ...(llm.chat ? { chat: llm.chat } : {}),\n ...(llm.model ? { judgeModel: llm.model } : {}),\n })\n }\n case 'rpc-batch': {\n const [method] = positional\n const llm = resolveCliLlmConfig()\n return await runRpcBatch(method, {\n ...(llm.chat ? { chat: llm.chat } : {}),\n ...(llm.model ? { judgeModel: llm.model } : {}),\n })\n }\n case 'openapi': {\n const out = flags.out ?? 'openapi.json'\n const spec = buildOpenApi(handleVersion().version)\n writeFileSync(out, `${JSON.stringify(spec, null, 2)}\\n`, 'utf-8')\n // eslint-disable-next-line no-console\n console.log(`[agent-eval] wrote OpenAPI 3.1 spec to ${out}`)\n return 0\n }\n case 'rollout-release': {\n // The subcommand owns its own flag grammar (multi-value --formats,\n // boolean --include-proposers) — pass raw argv through untouched.\n return await runRolloutReleaseCli(process.argv.slice(3))\n }\n case 'analyst-benchmark': {\n return await runAnalystBenchmarkCommand(process.argv.slice(3))\n }\n case 'supervisor-run': {\n // The subcommand owns its own flag grammar; pass raw argv through.\n return await runSupervisorRunCommand(process.argv.slice(3))\n }\n case 'version': {\n process.stdout.write(`${JSON.stringify(handleVersion(), null, 2)}\\n`)\n return 0\n }\n case '--version': {\n process.stdout.write(`${handleVersion().version}\\n`)\n return 0\n }\n case 'help':\n case '--help':\n case '-h':\n case '':\n process.stdout.write(`${HELP}\\n`)\n return 0\n default:\n process.stderr.write(`unknown command: ${command}\\n${HELP}\\n`)\n return 1\n }\n}\n\nconst FLAGS_BY_COMMAND: Record<string, ReadonlySet<string>> = {\n serve: new Set(['help', 'host', 'port']),\n rpc: new Set(['help']),\n 'rpc-batch': new Set(['help']),\n openapi: new Set(['help', 'out']),\n version: new Set(['help']),\n help: new Set(),\n '--help': new Set(),\n '-h': new Set(),\n '--version': new Set(),\n '': new Set(),\n}\n\nfunction assertKnownFlags(command: string, flags: Record<string, string>): void {\n // These subcommands parse their own argv.\n if (\n command === 'rollout-release' ||\n command === 'analyst-benchmark' ||\n command === 'supervisor-run' ||\n command === 'search'\n ) {\n return\n }\n const allowed = FLAGS_BY_COMMAND[command]\n if (!allowed) return\n const unknown = Object.keys(flags).filter((flag) => !allowed.has(flag))\n if (unknown.length > 0) {\n throw new Error(`unknown flag for ${command || 'help'}: --${unknown[0]}`)\n }\n}\n\nfunction parsePort(raw: string): number {\n const port = Number(raw)\n if (!Number.isInteger(port) || port < 0 || port > 65_535) {\n throw new Error(`--port must be an integer from 0 to 65535; received ${JSON.stringify(raw)}`)\n }\n return port\n}\n\nmain()\n .then((code) => process.exit(code))\n .catch((err) => {\n // eslint-disable-next-line no-console\n console.error('[agent-eval] cli error:', err)\n process.exit(1)\n })\n"],"mapp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AM,oBAAoB,WAAW,OAAO,MAAM,QAAQ,IAAI;AAE5E;AAEA,SAAS,UAAU,KAAqB;CACtC,MAAM,OAAO,OAAO,GAAG;CACvB,IAAI,CAAC,OAAO,UAAU,IAAI,KAAK,OAAO,KAAK,OAAO,OAChD,MAAM,IAAI,MAAM,uDAAuD,KAAK,UAAU,GAAG,GAAG;CAE9F,OAAO;AACT;AAEA,KAAK,CAAC,CACH,MAAM,SAAS,QAAQ,KAAK,IAAI,CAAC,CAAC,CAClC,OAAO,QAAQ;CAEd,QAAQ,MAAM,2BAA2B,GAAG;CAC5C,QAAQ,KAAK,CAAC;AAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"cli.js","names":[],"sources":["../src/cli-config.ts","../src/search-command.ts","../src/cli.ts"],"sourcesContent":["/**\n * Provider configuration for the `agent-eval` binary.\n *\n * The binary reads endpoint and credential values from its environment.\n * TypeScript library callers bind a transport explicitly. The maintained\n * HTTP transport accepts their credential and sends provider requests.\n */\n\nimport { type ChatClient, createChatClient } from './analyst/chat-client'\n\nexport interface CliLlmConfig {\n /** Judge transport for the wire handlers. Absent when no provider is configured. */\n chat?: ChatClient\n model?: string\n}\n\n/** The endpoint the binary resolved from its environment. */\nexport interface CliProviderRoute {\n baseUrl: string\n apiKey: string\n model?: string\n}\n\n/**\n * Environment precedence for the binary's provider route, with no client built.\n *\n * Both halves are required: a base URL without a key, or a key without an\n * endpoint, is a half-configured server. `/v1/judge` then refuses with\n * `llm_not_configured` instead of calling an unintended endpoint.\n */\nexport function resolveCliProviderRoute(\n env: NodeJS.ProcessEnv = process.env,\n): CliProviderRoute | undefined {\n const explicitBaseUrl = nonEmpty(env.AGENT_EVAL_LLM_BASE_URL)\n const explicitApiKey = nonEmpty(env.AGENT_EVAL_LLM_API_KEY)\n const openAiApiKey = nonEmpty(env.OPENAI_API_KEY)\n const tangleApiKey = nonEmpty(env.TANGLE_API_KEY)\n const baseUrl =\n explicitBaseUrl ??\n nonEmpty(env.OPENAI_BASE_URL) ??\n nonEmpty(env.TANGLE_ROUTER_URL) ??\n (openAiApiKey ? 'https://api.openai.com/v1' : undefined) ??\n (tangleApiKey ? 'https://router.tangle.tools/v1' : undefined)\n const apiKey = explicitApiKey ?? openAiApiKey ?? tangleApiKey\n const model =\n nonEmpty(env.AGENT_EVAL_LLM_MODEL) ?? nonEmpty(env.OPENAI_MODEL) ?? nonEmpty(env.TANGLE_MODEL)\n\n if (!baseUrl || !apiKey) return undefined\n return { baseUrl, apiKey, ...(model ? { model } : {}) }\n}\n\nexport function resolveCliLlmConfig(env: NodeJS.ProcessEnv = process.env): CliLlmConfig {\n const route = resolveCliProviderRoute(env)\n if (!route) return {}\n return {\n chat: cliChatClient({ baseUrl: route.baseUrl, apiKey: route.apiKey }, route.model),\n ...(route.model ? { model: route.model } : {}),\n }\n}\n\n/**\n * The binary's transport IS the published one — `createChatClient({ transport:\n * 'openai-compatible' })` — so the server and a library consumer cannot drift\n * onto two different clients for the same endpoint.\n *\n * The one thing kept local is the error text. A generic \"no model on the\n * request\" tells a server operator nothing; this names the variable to set.\n */\nfunction cliChatClient(\n route: { baseUrl: string; apiKey: string },\n defaultModel: string | undefined,\n): ChatClient {\n const client = createChatClient({\n transport: 'openai-compatible',\n baseUrl: route.baseUrl,\n apiKey: route.apiKey,\n ...(defaultModel ? { defaultModel } : {}),\n })\n return {\n ...client,\n chat: (req, callOpts) => {\n if (!req.model && !defaultModel) {\n throw new Error(\n 'agent-eval: no model on the request and no AGENT_EVAL_LLM_MODEL configured',\n )\n }\n return client.chat(req, callOpts)\n },\n }\n}\n\nfunction nonEmpty(value: string | undefined): string | undefined {\n const trimmed = value?.trim()\n return trimmed ? trimmed : undefined\n}\n","/**\n * `agent-eval search <subcommand>`: work with a search ledger from a terminal.\n *\n * agent-eval search ship <search-ledger.jsonl> --run-kind optimization|eval [--content full|digests]\n * agent-eval search show <search-ledger.jsonl>\n *\n * `ship` sends the ledger to the hosted store named by `TANGLE_INGEST_URL`,\n * `TANGLE_INGEST_API_KEY` and `TANGLE_TENANT_ID`, starting from the store's\n * head, so it finishes or resumes a ship that a loop could not complete.\n *\n * `show` verifies the ledger and prints `renderSearchSummary`: the same\n * compact text a proposer reads, on the search's own ranking split (the\n * selection split when the search declares one, else train). There is no\n * local HTML renderer; the hosted store's page is the visual view (§5 of the\n * search-tree design).\n */\n\nimport { open, readFile } from 'node:fs/promises'\nimport { replaySearchLedgerText } from './campaign/search-ledger'\nimport { renderSearchSummary } from './campaign/search-summary'\nimport { hostedTenantFromEnv } from './hosted/client'\nimport { SEARCH_LEDGER_BATCH_MAX_BYTES, SearchRunKindSchema } from './hosted/search-ledger-wire'\nimport { SearchShipConflictError, shipSearchLedger } from './hosted/search-shipper'\n\nconst USAGE = `usage: agent-eval search <subcommand> ...\n\n ship <search-ledger.jsonl> --run-kind optimization|eval [--content full|digests]\n Ships the ledger's entries, and the blobs they name, to the hosted store in\n TANGLE_INGEST_URL (or TANGLE_ORCHESTRATOR_URL) as tenant TANGLE_TENANT_ID with\n TANGLE_INGEST_API_KEY (or TANGLE_API_KEY). It starts from the store's head, so\n running it again sends only what the store lacks. Prints the result as JSON.\n Exits 1 when the store holds a different chain for the search.\n\n show <search-ledger.jsonl>\n Verifies the ledger and prints its search summary: the leading nodes\n against the root, the most recently discarded nodes and why, and a log\n of recent proposals. The same text a proposer reads as context, on the\n search's own ranking split.`\n\nexport async function runSearchCommand(argv: string[]): Promise<number> {\n const [subcommand, ...rest] = argv\n if (subcommand === undefined || subcommand === '--help' || subcommand === '-h') {\n process.stdout.write(`${USAGE}\\n`)\n return 0\n }\n if (subcommand === 'show') return await runShowCommand(rest)\n if (subcommand !== 'ship') {\n process.stderr.write(`unknown search subcommand: ${subcommand}\\n${USAGE}\\n`)\n return 1\n }\n if (rest.some((arg) => arg === undefined || arg === '--help' || arg === '-h')) {\n process.stdout.write(`${USAGE}\\n`)\n return 0\n }\n const { path, flags } = parseShipArgs(rest)\n const runKind = SearchRunKindSchema.safeParse(flags['run-kind'])\n if (!runKind.success) throw new Error(`--run-kind must be optimization or eval\\n${USAGE}`)\n const content = flags.content ?? 'full'\n if (content !== 'full' && content !== 'digests') {\n throw new Error(`--content must be full or digests\\n${USAGE}`)\n }\n const tenant = hostedTenantFromEnv()\n if (!tenant) {\n throw new Error(\n 'set TANGLE_INGEST_URL, TANGLE_INGEST_API_KEY and TANGLE_TENANT_ID to name the store',\n )\n }\n const searchId = await firstLineSearchId(path)\n try {\n const shipped = await shipSearchLedger({\n tenant,\n ledger: { path, searchId },\n runKind: runKind.data,\n content,\n })\n process.stdout.write(`${JSON.stringify(shipped, null, 2)}\\n`)\n return shipped.head.nextSequence === shipped.localLines ? 0 : 1\n } catch (error) {\n if (!(error instanceof SearchShipConflictError)) throw error\n process.stderr.write(`${error.message}\\n`)\n return 1\n }\n}\n\nasync function runShowCommand(argv: string[]): Promise<number> {\n if (argv.length !== 1 || argv[0] === '--help' || argv[0] === '-h') {\n process.stdout.write(`${USAGE}\\n`)\n return argv.length === 1 ? 0 : 1\n }\n const path = argv[0]!\n const searchId = await firstLineSearchId(path)\n const text = await readFile(path, 'utf8')\n const state = replaySearchLedgerText(text, searchId, path)\n const split =\n state.header && state.header.splits.selection.tasks.length > 0 ? 'selection' : 'train'\n process.stdout.write(`${renderSearchSummary(state, { split })}\\n`)\n return 0\n}\n\nfunction parseShipArgs(argv: string[]): { path: string; flags: Record<string, string> } {\n const flags: Record<string, string> = {}\n const positional: string[] = []\n for (let index = 0; index < argv.length; index++) {\n const token = argv[index]!\n if (!token.startsWith('--')) {\n positional.push(token)\n continue\n }\n const [name, inline] = token.slice(2).split('=', 2) as [string, string | undefined]\n if (name !== 'run-kind' && name !== 'content') throw new Error(`unknown flag --${name}`)\n const value = inline ?? argv[++index]\n if (value === undefined) throw new Error(`--${name} needs a value`)\n flags[name] = value\n }\n if (positional.length !== 1) throw new Error(USAGE)\n return { path: positional[0]!, flags }\n}\n\n/** The ledger names its search on every line; read the first. */\nasync function firstLineSearchId(path: string): Promise<string> {\n const handle = await open(path, 'r')\n try {\n // A line longer than one request's limit cannot ship anyway.\n const bytes = Buffer.alloc(SEARCH_LEDGER_BATCH_MAX_BYTES + 1)\n const { bytesRead } = await handle.read(bytes, 0, bytes.byteLength, 0)\n const newline = bytes.subarray(0, bytesRead).indexOf(0x0a)\n if (newline < 0) throw new Error(`${path} holds no complete ledger line`)\n const first = JSON.parse(bytes.toString('utf8', 0, newline)) as { searchId?: unknown }\n if (typeof first.searchId !== 'string') throw new Error(`${path} line 1 names no searchId`)\n return first.searchId\n } finally {\n await handle.close()\n }\n}\n","#!/usr/bin/env node\n/**\n * agent-eval CLI.\n *\n * agent-eval serve [--port 5005] [--host 127.0.0.1]\n * agent-eval rpc <method> # one request from stdin → one response on stdout\n * agent-eval rpc-batch <method> # JSONL stdin → JSONL stdout\n * agent-eval analyst-benchmark ... # benchmark a real-model trace analyst\n * agent-eval supervisor-run report <runDir> [--format headline|markdown|json]\n * agent-eval search ship <search-ledger.jsonl> --run-kind optimization|eval\n * agent-eval search show <search-ledger.jsonl>\n * agent-eval openapi [--out path] # write OpenAPI spec\n * agent-eval version\n *\n * <method> is one of: judge, listRubrics, version. When omitted, the\n * stdin payload must be a full {method, params} envelope.\n */\nimport { writeFileSync } from 'node:fs'\nimport { runAnalystBenchmarkCommand } from './analyst/benchmark-command'\nimport { resolveCliLlmConfig } from './cli-config'\nimport { runRolloutReleaseCli } from './rollout/release/hf-dataset'\nimport { runSearchCommand } from './search-command'\nimport { runSupervisorRunCommand } from './supervisor-run/report-command'\nimport { handleVersion } from './wire/handlers'\nimport { buildOpenApi } from './wire/openapi'\nimport { runRpcBatch, runRpcOnce } from './wire/rpc'\nimport { startServerAsync } from './wire/server'\n\ninterface Args {\n command: string\n positional: string[]\n flags: Record<string, string>\n}\n\nfunction parseArgs(argv: string[]): Args {\n const [command, ...rest] = argv\n const positional: string[] = []\n const flags: Record<string, string> = {}\n for (let i = 0; i < rest.length; i++) {\n const tok = rest[i]!\n if (tok.startsWith('--')) {\n const raw = tok.slice(2)\n const equalsAt = raw.indexOf('=')\n if (equalsAt >= 0) {\n flags[raw.slice(0, equalsAt)] = raw.slice(equalsAt + 1)\n continue\n }\n const key = raw\n if (key === 'help') {\n flags[key] = 'true'\n continue\n }\n const next = rest[i + 1]\n if (next != null && !next.startsWith('--')) {\n flags[key] = next\n i++\n } else {\n flags[key] = 'true'\n }\n } else if (tok === '-h') {\n flags.help = 'true'\n } else {\n positional.push(tok)\n }\n }\n return { command: command ?? 'help', positional, flags }\n}\n\nconst HELP = `agent-eval: evaluation RPC and HTTP server.\n\nCommands:\n serve [--port 5005] [--host 127.0.0.1]\n Start the HTTP server. POST /v1/judge, GET /v1/rubrics, GET /v1/version, GET /openapi.json.\n rpc <method>\n Read one JSON object from stdin (the params for <method>), write one\n JSON object to stdout. Methods: judge, listRubrics, version.\n rpc-batch <method>\n Like 'rpc' but JSONL in / JSONL out.\n openapi [--out openapi.json]\n Write the OpenAPI 3.1 spec.\n rollout-release <ledger.jsonl...> --out <dir> [--formats sft,verifiers,rft,raw] [--include-proposers] [--push <org/name>]\n Build a HuggingFace-ready dataset dir from tangle.rollout.v1 ledgers:\n validate, fail-closed split filter, scrub, export formats + card.\n analyst-benchmark --dataset <agentrx|codetracebench> --labels <path> --trace-dir <path> [--artifact-dir <path>] --out <dir> ...\n Compare an empty baseline with a real-model trace analyst on public labels.\n Run with --help for all required inputs and controls.\n supervisor-run report <runDir> [--format headline|markdown|json]\n Report one Runtime or loops supervisor run directory. The status comes\n from Runtime's own result.json / failure.json; every missing measurement\n stays named. Exits 1 when the directory cannot be read.\n search ship <search-ledger.jsonl> --run-kind optimization|eval [--content full|digests]\n Ship a search ledger and its blobs to the hosted store in TANGLE_INGEST_URL,\n starting from the store's head. Run with --help for the environment it reads.\n search show <search-ledger.jsonl>\n Verify a search ledger and print its summary: leading nodes, recently\n discarded nodes and recent proposals, the same text a proposer reads.\n version\n Print server + wire-protocol version JSON.\n\nJudge provider:\n Set AGENT_EVAL_LLM_BASE_URL, AGENT_EVAL_LLM_API_KEY, and AGENT_EVAL_LLM_MODEL.\n OPENAI_* and TANGLE_* equivalents are also accepted. This binary is the only\n place that reads a provider credential; the library never does. Without both\n a base URL and a key, /v1/judge refuses with llm_not_configured.\n\nWithout arguments, prints this help.`\n\nasync function main(): Promise<number> {\n const { command, positional, flags } = parseArgs(process.argv.slice(2))\n assertKnownFlags(command, flags)\n\n if (command === 'analyst-benchmark' && flags.help === 'true') {\n return await runAnalystBenchmarkCommand(process.argv.slice(3))\n }\n if (command === 'search') return await runSearchCommand(process.argv.slice(3))\n if (flags.help === 'true') {\n process.stdout.write(`${HELP}\\n`)\n return 0\n }\n\n switch (command) {\n case 'serve': {\n const port = parsePort(flags.port ?? '5005')\n const host = flags.host ?? '127.0.0.1'\n const llm = resolveCliLlmConfig()\n const { server } = await startServerAsync({\n port,\n host,\n ...(llm.chat ? { chat: llm.chat } : {}),\n ...(llm.model ? { judgeModel: llm.model } : {}),\n })\n // Keep process alive on SIGINT/SIGTERM\n const shutdown = (sig: string) => {\n // eslint-disable-next-line no-console\n console.log(`[agent-eval] received ${sig}, shutting down`)\n server.close(() => process.exit(0))\n // Force exit after 5s if close hangs\n setTimeout(() => process.exit(1), 5000).unref()\n }\n process.on('SIGINT', () => shutdown('SIGINT'))\n process.on('SIGTERM', () => shutdown('SIGTERM'))\n // Block forever\n await new Promise(() => {})\n return 0\n }\n case 'rpc': {\n const [method] = positional\n const llm = resolveCliLlmConfig()\n return await runRpcOnce(method, {\n ...(llm.chat ? { chat: llm.chat } : {}),\n ...(llm.model ? { judgeModel: llm.model } : {}),\n })\n }\n case 'rpc-batch': {\n const [method] = positional\n const llm = resolveCliLlmConfig()\n return await runRpcBatch(method, {\n ...(llm.chat ? { chat: llm.chat } : {}),\n ...(llm.model ? { judgeModel: llm.model } : {}),\n })\n }\n case 'openapi': {\n const out = flags.out ?? 'openapi.json'\n const spec = buildOpenApi(handleVersion().version)\n writeFileSync(out, `${JSON.stringify(spec, null, 2)}\\n`, 'utf-8')\n // eslint-disable-next-line no-console\n console.log(`[agent-eval] wrote OpenAPI 3.1 spec to ${out}`)\n return 0\n }\n case 'rollout-release': {\n // The subcommand owns its own flag grammar (multi-value --formats,\n // boolean --include-proposers) — pass raw argv through untouched.\n return await runRolloutReleaseCli(process.argv.slice(3))\n }\n case 'analyst-benchmark': {\n return await runAnalystBenchmarkCommand(process.argv.slice(3))\n }\n case 'supervisor-run': {\n // The subcommand owns its own flag grammar; pass raw argv through.\n return await runSupervisorRunCommand(process.argv.slice(3))\n }\n case 'version': {\n process.stdout.write(`${JSON.stringify(handleVersion(), null, 2)}\\n`)\n return 0\n }\n case '--version': {\n process.stdout.write(`${handleVersion().version}\\n`)\n return 0\n }\n case 'help':\n case '--help':\n case '-h':\n case '':\n process.stdout.write(`${HELP}\\n`)\n return 0\n default:\n process.stderr.write(`unknown command: ${command}\\n${HELP}\\n`)\n return 1\n }\n}\n\nconst FLAGS_BY_COMMAND: Record<string, ReadonlySet<string>> = {\n serve: new Set(['help', 'host', 'port']),\n rpc: new Set(['help']),\n 'rpc-batch': new Set(['help']),\n openapi: new Set(['help', 'out']),\n version: new Set(['help']),\n help: new Set(),\n '--help': new Set(),\n '-h': new Set(),\n '--version': new Set(),\n '': new Set(),\n}\n\nfunction assertKnownFlags(command: string, flags: Record<string, string>): void {\n // These subcommands parse their own argv.\n if (\n command === 'rollout-release' ||\n command === 'analyst-benchmark' ||\n command === 'supervisor-run' ||\n command === 'search'\n ) {\n return\n }\n const allowed = FLAGS_BY_COMMAND[command]\n if (!allowed) return\n const unknown = Object.keys(flags).filter((flag) => !allowed.has(flag))\n if (unknown.length > 0) {\n throw new Error(`unknown flag for ${command || 'help'}: --${unknown[0]}`)\n }\n}\n\nfunction parsePort(raw: string): number {\n const port = Number(raw)\n if (!Number.isInteger(port) || port < 0 || port > 65_535) {\n throw new Error(`--port must be an integer from 0 to 65535; received ${JSON.stringify(raw)}`)\n }\n return port\n}\n\nmain()\n .then((code) => process.exit(code))\n .catch((err) => {\n // eslint-disable-next-line no-console\n console.error('[agent-eval] cli error:', err)\n process.exit(1)\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,wBACd,MAAyB,QAAQ,KACH;CAC9B,MAAM,kBAAkB,SAAS,IAAI,uBAAuB;CAC5D,MAAM,iBAAiB,SAAS,IAAI,sBAAsB;CAC1D,MAAM,eAAe,SAAS,IAAI,cAAc;CAChD,MAAM,eAAe,SAAS,IAAI,cAAc;CAChD,MAAM,UACJ,mBACA,SAAS,IAAI,eAAe,KAC5B,SAAS,IAAI,iBAAiB,MAC7B,eAAe,8BAA8B,KAAA,OAC7C,eAAe,mCAAmC,KAAA;CACrD,MAAM,SAAS,kBAAkB,gBAAgB;CACjD,MAAM,QACJ,SAAS,IAAI,oBAAoB,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY;CAE/F,IAAI,CAAC,WAAW,CAAC,QAAQ,OAAO,KAAA;CAChC,OAAO;EAAE;EAAS;EAAQ,GAAI,QAAQ,EAAE,MAAM,IAAI,CAAC;CAAG;AACxD;AAEA,SAAgB,oBAAoB,MAAyB,QAAQ,KAAmB;CACtF,MAAM,QAAQ,wBAAwB,GAAG;CACzC,IAAI,CAAC,OAAO,OAAO,CAAC;CACpB,OAAO;EACL,MAAM,cAAc;GAAE,SAAS,MAAM;GAAS,QAAQ,MAAM;EAAO,GAAG,MAAM,KAAK;EACjF,GAAI,MAAM,QAAQ,EAAE,OAAO,MAAM,MAAM,IAAI,CAAC;CAC9C;AACF;;;;;;;;;AAUA,SAAS,cACP,OACA,cACY;CACZ,MAAM,SAAS,iBAAiB;EAC9B,WAAW;EACX,SAAS,MAAM;EACf,QAAQ,MAAM;EACd,GAAI,eAAe,EAAE,aAAa,IAAI,CAAC;CACzC,CAAC;CACD,OAAO;EACL,GAAG;EACH,OAAO,KAAK,aAAa;GACvB,IAAI,CAAC,IAAI,SAAS,CAAC,cACjB,MAAM,I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SearchLedgerEvent } from "./search-ledger-types-B3El5xgS.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/hosted/search-ledger-wire.d.ts
|
|
4
4
|
/** At most this many lines in one ingest request. */
|
|
@@ -233,4 +233,4 @@ declare function hostedClientFromEnv(overrides?: Partial<HostedTenant> & {
|
|
|
233
233
|
}): HostedClient | undefined;
|
|
234
234
|
//#endregion
|
|
235
235
|
export { admitSearchLedgerBatch as A, SearchLedgerBatchAdmission as C, SearchLedgerHeadSchema as D, SearchLedgerHead as E, searchLedgerArtifactRefs as M, searchLedgerHeadPath as N, SearchRunKind as O, SearchBlobPutResponseSchema as S, SearchLedgerConflictSchema as T, IngestSearchLedgerRequestSchema as _, createHostedClient as a, SEARCH_LEDGER_INGEST_PATH as b, HOSTED_WIRE_VERSION as c, IngestResponse as d, IngestTracesRequest as f, IngestSearchLedgerRequest as g, AdmitSearchLedgerBatchInput as h, SearchLedgerIngestOutcome as i, searchBlobPath as j, SearchRunKindSchema as k, HostedIngestHeaders as l, UnixNanoTimestamp as m, HostedRequestError as n, hostedClientFromEnv as o, TraceSpanEvent as p, HostedTenant as r, hostedTenantFromEnv as s, HostedClient as t, HostedWireVersion as u, SEARCH_LEDGER_BATCH_MAX_BYTES as v, SearchLedgerConflict as w, SearchBlobPutResponse as x, SEARCH_LEDGER_BATCH_MAX_LINES as y };
|
|
236
|
-
//# sourceMappingURL=client-
|
|
236
|
+
//# sourceMappingURL=client-dMMKoQNS.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-
|
|
1
|
+
{"version":3,"file":"client-dMMKoQNS.d.ts","names":[],"sources":["../src/hosted/search-ledger-wire.ts","../src/hosted/types.ts","../src/hosted/client.ts"],"mappings":";;;;cAkCa;;;cAGA;cAEA;iBAEG,qBAAqB;;iBAKrB,eAAe,QAAQ;;cAe1B,qBAAmB,EAAA;;;;KACpB,gBAAgB,EAAE,aAAa;;;cAI9B,wBAAsB,EAAA;;;;G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;iBAqG1C,oBACd,YAAW,QAAQ;EAAkB,MAAM;IAC1C;;;iBAmBa,oBACd,YAAW,QAAQ;EAAkB,MAAM;IAC1C"}
|
package/dist/contract/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { c as CostLedgerHandle } from "../cost-ledger-DbQdN3nO.js";
|
|
2
2
|
import { _ as ProposalFinding, i as AnalystFinding, v as ProposalFindingOrigin, x as makeProposalFinding } from "../types-CeDfCRXp.js";
|
|
3
3
|
import { A as createChatClient, T as CreateChatClientOpts, x as ChatClient } from "../types-C0bWoSKC.js";
|
|
4
|
-
import { $ as paretoSignificanceGate, G as BuildEvidenceVectorOptions, J as ParetoSignificanceGateOptions, K as EvidenceVector, Q as paretoPolicy, U as AxisEvidence, W as AxisVerdict, X as PromotionPolicy, Y as PromotionObjective, Z as buildEvidenceVector, q as ObjectiveSource } from "../statistical-heldout-
|
|
5
|
-
import { C as JudgeDimension, H as SurfaceProposer, M as OptimizerConfig, R as Scenario, S as JudgeConfig, V as SessionScript, _ as GateDecision, a as CampaignResult, b as GenerationRecord, c as CampaignTraceWriter, d as DispatchContext, f as DispatchFn, g as GateContribution, h as GateContext, i as CampaignCostMeter, j as MutableSurface, l as CodeSurface, m as GateCheckStatus, n as CampaignArtifactWriter, p as Gate, r as CampaignCellResult, t as CampaignAggregates, v as GateResult, w as JudgeScore, y as GenerationCandidate } from "../types-
|
|
6
|
-
import {
|
|
4
|
+
import { $ as paretoSignificanceGate, G as BuildEvidenceVectorOptions, J as ParetoSignificanceGateOptions, K as EvidenceVector, Q as paretoPolicy, U as AxisEvidence, W as AxisVerdict, X as PromotionPolicy, Y as PromotionObjective, Z as buildEvidenceVector, q as ObjectiveSource } from "../statistical-heldout-D-xBpbrd.js";
|
|
5
|
+
import { C as JudgeDimension, H as SurfaceProposer, M as OptimizerConfig, R as Scenario, S as JudgeConfig, V as SessionScript, _ as GateDecision, a as CampaignResult, b as GenerationRecord, c as CampaignTraceWriter, d as DispatchContext, f as DispatchFn, g as GateContribution, h as GateContext, i as CampaignCostMeter, j as MutableSurface, l as CodeSurface, m as GateCheckStatus, n as CampaignArtifactWriter, p as Gate, r as CampaignCellResult, t as CampaignAggregates, v as GateResult, w as JudgeScore, y as GenerationCandidate } from "../types-BWwRXofp.js";
|
|
6
|
+
import { $r as DefaultProductionGateOptions, Ai as externalTextOptimizationMethod, Ao as runCampaign, Ci as GepaEngineRun, Da as runImprovementLoop, Di as gepaOptimizationMethod, Do as CampaignCellFailureReceipt, Ea as RunImprovementLoopResult, Ei as GepaRunnerCommand, Eo as runEval, Fi as ExternalTextEvaluationResponse, Go as FinalEvidencePolicy, Ji as OptimizationTokenUsage, Ko as FinalEvidenceUse, Li as CompareOptimizationMethodsOptions, Mi as ExternalTextOptimizerContext, Ni as ExternalTextOptimizerResult, Oi as OpenAICompatibleOptimizerModel, Oo as CampaignCellRetryPolicy, Pi as ExternalOptimizationExample, Qr as DefaultProductionGateCheck, Ri as OptimizationMethod, Si as GepaEngineOptions, Ta as RunImprovementLoopOptions, Ti as GepaOptimizationRecipe, To as RunEvalOptions, Ui as OptimizationMethodProvenance, Uo as fsCampaignStorage, Vi as OptimizationMethodInput, Vo as CampaignStorage, Wi as OptimizationMethodResult, Wo as inMemoryCampaignStorage, Xo as campaignSplitDigest, Xr as HeldOutGateOptions, Yi as compareOptimizationMethods, Zi as ComparisonCost, Zr as heldOutGate, _a as runReferenceEquivalenceJudge, _i as SkillOptOptimizationMethodConfig, ba as llmJudge, bi as skillOptOptimizationMethod, da as REFERENCE_EQUIVALENCE_JUDGE_VERSION, ei as DefaultProductionRewardHackingOptions, fa as ReferenceEquivalenceJudgeInput, ga as createReferenceEquivalenceJudge, gi as composeGate, ha as ReferenceEquivalenceScenario, ji as ExternalTextOptimizationMethodConfig, ki as OptimizerModelBudget, ko as RunCampaignOptions, ma as ReferenceEquivalenceJudgeResult, pa as ReferenceEquivalenceJudgeOptions, qi as OptimizationPackageSource, ti as defaultProductionGate, ua as REFERENCE_EQUIVALENCE_INPUT_LIMITS, va as LlmJudgeDimension, vi as SkillOptRunnerCommand, wa as transientDispatchFailure, wi as GepaOptimizationMethodConfig, xi as GepaAdaptiveEngineRun, ya as LlmJudgeOptions, yi as SkillOptTrainerConfig, zi as OptimizationMethodComparison } from "../index-DMPLG226.js";
|
|
7
7
|
import { i as InMemoryOutcomeStore, n as FileSystemOutcomeStore, o as OutcomeStore, r as FileSystemOutcomeStoreOptions, t as DeploymentOutcome } from "../outcome-store-CNt4iZ67.js";
|
|
8
|
-
import { r as HostedTenant } from "../client-
|
|
8
|
+
import { r as HostedTenant } from "../client-dMMKoQNS.js";
|
|
9
9
|
import { _ as ReleaseSummary, a as summarizeExecution, c as ExecutionInsight, d as InsightReport, f as InterRaterInsight, g as Recommendation, h as OutcomeCorrelationInsight, i as analyzeRuns, l as FailureClassTally, m as LiftInsight, n as ExecutionReport, o as CostProvenanceSummary, p as JudgeInsight, r as SummarizeExecutionOptions, s as ExecutionErrorOutcomeCell, t as AnalyzeRunsOptions, u as FailureClusterInsight, v as ScalarDistribution, y as TokenUsageInsight } from "../analyze-runs-CPiKLJFs.js";
|
|
10
|
-
import { _ as SelfImproveMethodResult, a as DefinedAgentEval, c as SelfImproveMethodOptions, d as SelfImproveProposerOptions, f as SelfImproveProposerResult, g as SelfImproveMethodProvenance, h as selfImprove, i as DefineAgentEvalOptions, l as SelfImproveOptions, m as SelfImproveRunError, n as AgentEvalEvaluateOptions, o as defineAgentEval, p as SelfImproveResult, r as AgentEvalImproveOptions, s as SelfImproveBudget, t as AgentEvalAgent, u as SelfImproveProgressEvent } from "../define-agent-eval-
|
|
11
|
-
import { $ as FromRunRecordDirResult, A as CodeAgentSessionActionStatus, B as AgentTraceFile, C as fromOpenCodeSession, Ct as measuredComparisonFromCandidateExperiment, D as streamCodeAgentJsonlFile, Dt as sealCandidateExperiment, E as parseCodeAgentJsonlFile, Et as sealCandidateBenchmarkTask, F as CodeAgentSessionTerminalStatus, G as PartitionByAuthoringModelResult, H as AgentTraceRange, I as observeCodeAgentSession, J as EvalReportingSuiteInput, K as parseAgentTrace, L as AgentTraceContributor, M as CodeAgentSessionExecutionReceipt, N as CodeAgentSessionObservation, O as CodeAgentSessionAction, Ot as verifyCandidateExperiment, P as CodeAgentSessionSource, Q as FromRunRecordDirOptions, R as AgentTraceContributorType, S as fromKimiCodeSession, St as evaluatePairedMeasurements, T as parseCodeAgentJsonl, Tt as sealCandidateBenchmarkSuite, U as AgentTraceRecord, V as AgentTraceIndex, W as AuthoringProvenance, X as EvalReportingSuiteResult, Y as EvalReportingSuiteOptions, Z as evalReportingSuite, _ as CodeAgentSessionIntakeResult, _t as PairedMeasurement, a as FromFeedbackTableOptions, at as RunAgentProfileImprovementExperimentOptions, b as fromClaudeCodeSession, bt as RunCandidateExperimentOptions, c as CodeAgentStoreObservation, ct as runAgentProfileImprovementExperiment, d as CodeAgentStoreScope, dt as sealAgentProfileImprovementTask, et as RunRecordRejection, f as CodeAgentStoreSession, ft as verifyAgentProfileImprovementExperimentComparison, g as CodeAgentSessionIntakeOptions, gt as EvaluatePairedMeasurementsOptions, h as CodeAgentSessionDiagnostic, ht as CompareCandidateExperimentOptions, i as FeedbackTableRow, it as CompareAgentProfileImprovementExperimentOptions, j as CodeAgentSessionActionSurface, k as CodeAgentSessionActionKind, kt as verifyCandidateExperimentComparison, l as CodeAgentStoreRejection, lt as sealAgentProfileImprovementExperiment, m as CodeAgentJsonlLine, mt as CandidateExperimentRun, n as fromOtelSpans, nt as AgentProfileImprovementExperimentExecutionInput, o as FromFeedbackTableResult, ot as SealAgentProfileImprovementSuiteOptions, p as observeCodeAgentStore, pt as CandidateExperimentExecutionInput, q as partitionRunsByAuthoringModel, r as FeedbackTableMeta, rt as AgentProfileImprovementExperimentRun, s as fromFeedbackTable, st as measuredComparisonFromAgentProfileImprovementExperiment, t as FromOtelSpansOptions, tt as fromRunRecordDir, u as CodeAgentStoreRejections, ut as sealAgentProfileImprovementSuite, v as CodeAgentSessionMetrics, vt as PairedMeasurementAdapter, w as fromPiSession, wt as runCandidateExperiment, x as fromCodexSession, xt as SealCandidateBenchmarkSuiteOptions, y as ParsedCodeAgentJsonl, yt as PairedMeasurementEvaluation, z as AgentTraceConversation } from "../index-
|
|
12
|
-
import { n as buildDefaultAnalystRegistry, t as DefaultAnalystRegistryOptions } from "../default-registry-
|
|
10
|
+
import { _ as SelfImproveMethodResult, a as DefinedAgentEval, c as SelfImproveMethodOptions, d as SelfImproveProposerOptions, f as SelfImproveProposerResult, g as SelfImproveMethodProvenance, h as selfImprove, i as DefineAgentEvalOptions, l as SelfImproveOptions, m as SelfImproveRunError, n as AgentEvalEvaluateOptions, o as defineAgentEval, p as SelfImproveResult, r as AgentEvalImproveOptions, s as SelfImproveBudget, t as AgentEvalAgent, u as SelfImproveProgressEvent } from "../define-agent-eval-DQJvVa1P.js";
|
|
11
|
+
import { $ as FromRunRecordDirResult, A as CodeAgentSessionActionStatus, B as AgentTraceFile, C as fromOpenCodeSession, Ct as measuredComparisonFromCandidateExperiment, D as streamCodeAgentJsonlFile, Dt as sealCandidateExperiment, E as parseCodeAgentJsonlFile, Et as sealCandidateBenchmarkTask, F as CodeAgentSessionTerminalStatus, G as PartitionByAuthoringModelResult, H as AgentTraceRange, I as observeCodeAgentSession, J as EvalReportingSuiteInput, K as parseAgentTrace, L as AgentTraceContributor, M as CodeAgentSessionExecutionReceipt, N as CodeAgentSessionObservation, O as CodeAgentSessionAction, Ot as verifyCandidateExperiment, P as CodeAgentSessionSource, Q as FromRunRecordDirOptions, R as AgentTraceContributorType, S as fromKimiCodeSession, St as evaluatePairedMeasurements, T as parseCodeAgentJsonl, Tt as sealCandidateBenchmarkSuite, U as AgentTraceRecord, V as AgentTraceIndex, W as AuthoringProvenance, X as EvalReportingSuiteResult, Y as EvalReportingSuiteOptions, Z as evalReportingSuite, _ as CodeAgentSessionIntakeResult, _t as PairedMeasurement, a as FromFeedbackTableOptions, at as RunAgentProfileImprovementExperimentOptions, b as fromClaudeCodeSession, bt as RunCandidateExperimentOptions, c as CodeAgentStoreObservation, ct as runAgentProfileImprovementExperiment, d as CodeAgentStoreScope, dt as sealAgentProfileImprovementTask, et as RunRecordRejection, f as CodeAgentStoreSession, ft as verifyAgentProfileImprovementExperimentComparison, g as CodeAgentSessionIntakeOptions, gt as EvaluatePairedMeasurementsOptions, h as CodeAgentSessionDiagnostic, ht as CompareCandidateExperimentOptions, i as FeedbackTableRow, it as CompareAgentProfileImprovementExperimentOptions, j as CodeAgentSessionActionSurface, k as CodeAgentSessionActionKind, kt as verifyCandidateExperimentComparison, l as CodeAgentStoreRejection, lt as sealAgentProfileImprovementExperiment, m as CodeAgentJsonlLine, mt as CandidateExperimentRun, n as fromOtelSpans, nt as AgentProfileImprovementExperimentExecutionInput, o as FromFeedbackTableResult, ot as SealAgentProfileImprovementSuiteOptions, p as observeCodeAgentStore, pt as CandidateExperimentExecutionInput, q as partitionRunsByAuthoringModel, r as FeedbackTableMeta, rt as AgentProfileImprovementExperimentRun, s as fromFeedbackTable, st as measuredComparisonFromAgentProfileImprovementExperiment, t as FromOtelSpansOptions, tt as fromRunRecordDir, u as CodeAgentStoreRejections, ut as sealAgentProfileImprovementSuite, v as CodeAgentSessionMetrics, vt as PairedMeasurementAdapter, w as fromPiSession, wt as runCandidateExperiment, x as fromCodexSession, xt as SealCandidateBenchmarkSuiteOptions, y as ParsedCodeAgentJsonl, yt as PairedMeasurementEvaluation, z as AgentTraceConversation } from "../index-DWQNDqPd.js";
|
|
12
|
+
import { n as buildDefaultAnalystRegistry, t as DefaultAnalystRegistryOptions } from "../default-registry-C3HTE08O.js";
|
|
13
13
|
export { type AgentEvalAgent, type AgentEvalEvaluateOptions, type AgentEvalImproveOptions, type AgentProfileImprovementExperimentExecutionInput, type AgentProfileImprovementExperimentRun, type AgentTraceContributor, type AgentTraceContributorType, type AgentTraceConversation, type AgentTraceFile, type AgentTraceIndex, type AgentTraceRange, type AgentTraceRecord, type AnalystFinding, type AnalyzeRunsOptions, type AuthoringProvenance, type AxisEvidence, type AxisVerdict, type BuildEvidenceVectorOptions, type CampaignAggregates, type CampaignArtifactWriter, type CampaignCellFailureReceipt, type CampaignCellResult, type CampaignCellRetryPolicy, type CampaignCostMeter, type CampaignResult, type CampaignStorage, type CampaignTraceWriter, type CandidateExperimentExecutionInput, type CandidateExperimentRun, type ChatClient, type CodeAgentJsonlLine, type CodeAgentSessionAction, type CodeAgentSessionActionKind, type CodeAgentSessionActionStatus, type CodeAgentSessionActionSurface, type CodeAgentSessionDiagnostic, type CodeAgentSessionExecutionReceipt, type CodeAgentSessionIntakeOptions, type CodeAgentSessionIntakeResult, type CodeAgentSessionMetrics, type CodeAgentSessionObservation, type CodeAgentSessionSource, type CodeAgentSessionTerminalStatus, type CodeAgentStoreObservation, type CodeAgentStoreRejection, type CodeAgentStoreRejections, type CodeAgentStoreScope, type CodeAgentStoreSession, type CodeSurface, type CompareAgentProfileImprovementExperimentOptions, type CompareCandidateExperimentOptions, type CompareOptimizationMethodsOptions, type ComparisonCost, type CostLedgerHandle, type CostProvenanceSummary, type CreateChatClientOpts, type DefaultAnalystRegistryOptions, type DefaultProductionGateCheck, type DefaultProductionGateOptions, type DefaultProductionRewardHackingOptions, type DefineAgentEvalOptions, type DefinedAgentEval, type DeploymentOutcome, type DispatchFn as Dispatch, type DispatchContext, type EvalReportingSuiteInput, type EvalReportingSuiteOptions, type EvalReportingSuiteResult, type EvaluatePairedMeasurementsOptions, type EvidenceVector, type ExecutionErrorOutcomeCell, type ExecutionInsight, type ExecutionReport, type ExternalOptimizationExample, type ExternalTextEvaluationResponse, type ExternalTextOptimizationMethodConfig, type ExternalTextOptimizerContext, type ExternalTextOptimizerResult, type FailureClassTally, type FailureClusterInsight, type FeedbackTableMeta, type FeedbackTableRow, FileSystemOutcomeStore, type FileSystemOutcomeStoreOptions, type FinalEvidencePolicy, type FinalEvidenceUse, type FromFeedbackTableOptions, type FromFeedbackTableResult, type FromOtelSpansOptions, type FromRunRecordDirOptions, type FromRunRecordDirResult, type Gate, type GateCheckStatus, type GateContext, type GateContribution, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaAdaptiveEngineRun, type GepaEngineOptions, type GepaEngineRun, type GepaOptimizationMethodConfig, type GepaOptimizationRecipe, type GepaRunnerCommand, type HeldOutGateOptions, type HostedTenant, InMemoryOutcomeStore, type InsightReport, type InterRaterInsight, type JudgeConfig, type JudgeDimension, type JudgeInsight, type JudgeScore, type LiftInsight, type LlmJudgeDimension, type LlmJudgeOptions, type MutableSurface, type ObjectiveSource, type OpenAICompatibleOptimizerModel, type OptimizationMethod, type OptimizationMethodComparison, type OptimizationMethodInput, type OptimizationMethodProvenance, type OptimizationMethodResult, type OptimizationPackageSource, type OptimizationTokenUsage, type OptimizerConfig, type OptimizerModelBudget, type OutcomeCorrelationInsight, type OutcomeStore, type PairedMeasurement, type PairedMeasurementAdapter, type PairedMeasurementEvaluation, type ParetoSignificanceGateOptions, type ParsedCodeAgentJsonl, type PartitionByAuthoringModelResult, type PromotionObjective, type PromotionPolicy, type ProposalFinding, type ProposalFindingOrigin, REFERENCE_EQUIVALENCE_INPUT_LIMITS, REFERENCE_EQUIVALENCE_JUDGE_VERSION, type Recommendation, type ReferenceEquivalenceJudgeInput, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceJudgeResult, type ReferenceEquivalenceScenario, type ReleaseSummary, type RunAgentProfileImprovementExperimentOptions, type RunCampaignOptions, type RunCandidateExperimentOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunRecordRejection, type ScalarDistribution, type Scenario, type SealAgentProfileImprovementSuiteOptions, type SealCandidateBenchmarkSuiteOptions, type SelfImproveBudget, type SelfImproveMethodOptions, type SelfImproveMethodProvenance, type SelfImproveMethodResult, type SelfImproveOptions, type SelfImproveProgressEvent, type SelfImproveProposerOptions, type SelfImproveProposerResult, type SelfImproveResult, SelfImproveRunError, type SessionScript, type SkillOptOptimizationMethodConfig, type SkillOptRunnerCommand, type SkillOptTrainerConfig, type SummarizeExecutionOptions, type SurfaceProposer, type TokenUsageInsight, analyzeRuns, buildDefaultAnalystRegistry, buildEvidenceVector, campaignSplitDigest, compareOptimizationMethods, composeGate, createChatClient, createReferenceEquivalenceJudge, defaultProductionGate, defineAgentEval, evalReportingSuite, evaluatePairedMeasurements, externalTextOptimizationMethod, fromClaudeCodeSession, fromCodexSession, fromFeedbackTable, fromKimiCodeSession, fromOpenCodeSession, fromOtelSpans, fromPiSession, fromRunRecordDir, fsCampaignStorage, gepaOptimizationMethod, heldOutGate, inMemoryCampaignStorage, llmJudge, makeProposalFinding, measuredComparisonFromAgentProfileImprovementExperiment, measuredComparisonFromCandidateExperiment, observeCodeAgentSession, observeCodeAgentStore, paretoPolicy, paretoSignificanceGate, parseAgentTrace, parseCodeAgentJsonl, parseCodeAgentJsonlFile, partitionRunsByAuthoringModel, runAgentProfileImprovementExperiment, runCampaign, runCandidateExperiment, runEval, runImprovementLoop, runReferenceEquivalenceJudge, sealAgentProfileImprovementExperiment, sealAgentProfileImprovementSuite, sealAgentProfileImprovementTask, sealCandidateBenchmarkSuite, sealCandidateBenchmarkTask, sealCandidateExperiment, selfImprove, skillOptOptimizationMethod, streamCodeAgentJsonlFile, summarizeExecution, transientDispatchFailure, verifyAgentProfileImprovementExperimentComparison, verifyCandidateExperiment, verifyCandidateExperimentComparison };
|
package/dist/contract/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { a as hashCanonical } from "../canonical-BsZVgBhW.js";
|
|
2
2
|
import { r as pairedBootstrap } from "../paired-tests-C8iCsioC.js";
|
|
3
|
-
import { t as decidePairedPromotion } from "../paired-promotion-decision-
|
|
4
|
-
import { a as heldoutSignificance } from "../statistical-heldout-
|
|
5
|
-
import { n as summarizeExecution, t as analyzeRuns } from "../analyze-runs-
|
|
3
|
+
import { t as decidePairedPromotion } from "../paired-promotion-decision-DTKl6-G8.js";
|
|
4
|
+
import { a as heldoutSignificance } from "../statistical-heldout-DANVmyug.js";
|
|
5
|
+
import { n as summarizeExecution, t as analyzeRuns } from "../analyze-runs-B6gv7vAT.js";
|
|
6
6
|
import { a as parseRunRecordSafe } from "../run-record-BRlM99rX.js";
|
|
7
|
-
import {
|
|
7
|
+
import { Z as defaultProductionGate, a as transientDispatchFailure, c as compareOptimizationMethods, ct as runCampaign, h as runImprovementLoop, st as runEval, t as llmJudge } from "../llm-judge-ChbWfeWl.js";
|
|
8
8
|
import { i as isModelPriced, n as estimateCost } from "../metrics-DOMpkoeb.js";
|
|
9
9
|
import { i as CostLedger } from "../cost-ledger-_IbkejCF.js";
|
|
10
|
-
import { q as campaignSplitDigest } from "../campaign-evidence-
|
|
10
|
+
import { q as campaignSplitDigest } from "../campaign-evidence-DJc60F9C.js";
|
|
11
11
|
import { h as mapConcurrentRange } from "../journal-DvKCvjty.js";
|
|
12
12
|
import { C as fsCampaignStorage, w as inMemoryCampaignStorage } from "../external-optimizer-subprocess-kbqC-iWf.js";
|
|
13
|
-
import { n as SelfImproveRunError, r as selfImprove, t as defineAgentEval } from "../define-agent-eval-
|
|
13
|
+
import { n as SelfImproveRunError, r as selfImprove, t as defineAgentEval } from "../define-agent-eval-DkPbnJEY.js";
|
|
14
14
|
import { t as buildDefaultAnalystRegistry } from "../default-registry-xMLX160E.js";
|
|
15
15
|
import { t as extractUsage } from "../extract-usage-DFATEuWW.js";
|
|
16
16
|
import { i as makeProposalFinding } from "../types-CW5b90JH.js";
|
|
17
17
|
import { t as createChatClient } from "../chat-client-B_ItsSBw.js";
|
|
18
18
|
import { n as InMemoryOutcomeStore, t as FileSystemOutcomeStore } from "../outcome-store-BXlkwMPR.js";
|
|
19
|
-
import { c as composeGate, f as REFERENCE_EQUIVALENCE_INPUT_LIMITS, h as runReferenceEquivalenceJudge, l as externalTextOptimizationMethod, m as createReferenceEquivalenceJudge, n as gepaOptimizationMethod, p as REFERENCE_EQUIVALENCE_JUDGE_VERSION, s as heldOutGate, t as skillOptOptimizationMethod } from "../skillopt-optimization-method-
|
|
20
|
-
import { n as paretoPolicy, r as paretoSignificanceGate, t as buildEvidenceVector } from "../promotion-policy-
|
|
19
|
+
import { c as composeGate, f as REFERENCE_EQUIVALENCE_INPUT_LIMITS, h as runReferenceEquivalenceJudge, l as externalTextOptimizationMethod, m as createReferenceEquivalenceJudge, n as gepaOptimizationMethod, p as REFERENCE_EQUIVALENCE_JUDGE_VERSION, s as heldOutGate, t as skillOptOptimizationMethod } from "../skillopt-optimization-method-DXQdaBjx.js";
|
|
20
|
+
import { n as paretoPolicy, r as paretoSignificanceGate, t as buildEvidenceVector } from "../promotion-policy-Cy5OV8BV.js";
|
|
21
21
|
import { t as fromOtelSpans } from "../otel-spans-DS7t1t1J.js";
|
|
22
22
|
import { createHash } from "node:crypto";
|
|
23
23
|
import { agentCandidateBenchmarkSuiteSchema, agentCandidateBenchmarkTaskSchema, agentCandidateBundleSchema, agentCandidateEvaluationPolicySchema, agentCandidateExperimentSchema, agentImprovementMeasuredComparisonSchema, agentProfileImprovementExperimentSchema, agentProfileImprovementMeasuredComparisonSchema, agentProfileImprovementRunCellSchema, agentProfileImprovementRunReceiptSchema, agentProfileImprovementSuiteInputsSchema, agentProfileImprovementSuiteSchema, agentProfileImprovementTaskSchema, candidateExecutionEvidenceSchema, canonicalCandidateDigest, canonicalCandidateJson, numbersApproximatelyEqual, omitTopLevelDigest } from "@tangle-network/agent-interface";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { O as TraceAnalysisStore, i as AnalystFinding, n as AnalystContext } from "./types-CeDfCRXp.js";
|
|
2
2
|
import { l as ExactCapableAnalyst } from "./exact-types-KGxBWH4b.js";
|
|
3
3
|
import { n as AnalystRegistry, r as AnalystRegistryOptions } from "./registry-Bu3lNole.js";
|
|
4
|
-
import { a as TraceAnalystLimits, i as TraceAnalysisEngineResult, l as RawAnalystFinding, n as TraceAnalysisEngine } from "./engine-
|
|
5
|
-
import { t as TraceToolGroupName } from "./tool-groups-
|
|
4
|
+
import { a as TraceAnalystLimits, i as TraceAnalysisEngineResult, l as RawAnalystFinding, n as TraceAnalysisEngine } from "./engine-DjRV55F9.js";
|
|
5
|
+
import { t as TraceToolGroupName } from "./tool-groups-BC9O7Epn.js";
|
|
6
6
|
//#region src/trace-analyst/behavioral-metrics.d.ts
|
|
7
7
|
type SuboptimalCode = 'monotonic-input-growth' | 'output-length-decay' | 'single-tool-dependency' | 'no-self-verification';
|
|
8
8
|
interface SuboptimalSignal {
|
|
@@ -110,4 +110,4 @@ interface DefaultAnalystRegistryOptions {
|
|
|
110
110
|
declare function buildDefaultAnalystRegistry(options?: DefaultAnalystRegistryOptions): AnalystRegistry;
|
|
111
111
|
//#endregion
|
|
112
112
|
export { createTraceAnalyst as a, BehavioralAnalystOptions as c, TraceAnalystDefinition as i, behavioralAnalyst as l, buildDefaultAnalystRegistry as n, renderPriorFindings as o, CreateTraceAnalystOptions as r, runTraceAnalyst as s, DefaultAnalystRegistryOptions as t, deriveEfficiencyFindings as u };
|
|
113
|
-
//# sourceMappingURL=default-registry-
|
|
113
|
+
//# sourceMappingURL=default-registry-C3HTE08O.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-registry-
|
|
1
|
+
{"version":3,"file":"default-registry-C3HTE08O.d.ts","names":[],"sources":["../src/trace-analyst/behavioral-metrics.ts","../src/analyst/behavioral-analyst.ts","../src/analyst/kind-factory.ts","../src/analyst/default-registry.ts"],"mappings":";;;;;;KAoBY;UAMK;EACf,MAAM;EACN;;EAEA;;EAEA,UAAU;;UAGK;;EAEf;EACA;;EAEA,gBAAgB;;EAEhB;EACA;EACA,eAAe;EACf;EACA;;EAEA;EACA;EACA,SAAS;;UAGM;EACf;EACA;EACA,sBAAsB;EACtB,uBAAuB;;;;UC1BR;;EAEf;;EAEA;;;;;;iBA+Dc,yBACd,SAAS,mBACT;EAAQ;EAAoB;IAC3B;;iBAkCa,kBACd,UAAS,2BACR,oBAAoB;;;;UCrHN;EACf;EACA;EACA;EACA;;EAEA,sBAAsB,SAAS;;EAE/B;;EAEA,WAAW;;EAEX,kBACE,OAAO,oBACP,SAAS,wCACe;EAC1B,SAAS,QAAQ;EACjB,eAAe,KAAK,mBAAmB,SAAS,mBAAmB;EACnE;EACA;;UAGe;EACf,QAAQ;;EAER;EACA;;;iBAIoB,gBAAgB;EACpC,YAAY;EACZ,QAAQ;EACR,OAAO;EACP,SAAS;EACT;IACE,QAAQ;;iBAgHI,mBACd,YAAY,wBACZ,SAAS,4BACR,oBAAoB;iBA2RP,oBAAoB,OAAO;;;UChc1B;;;;;;EAMf,SAAS;EACT,uBAAuB;;EAEvB;EACA,aAAa;EACb,WAAW;;iBAGG,4BACd,UAAS,gCACR"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c as CostLedgerHandle, f as CostLedgerSummary, m as CostReceipt } from "./cost-ledger-DbQdN3nO.js";
|
|
2
2
|
import { _ as ProposalFinding } from "./types-CeDfCRXp.js";
|
|
3
|
-
import { B as PowerPreflight, ft as EvidenceReceipt, it as CampaignEvidenceContext } from "./statistical-heldout-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { r as HostedTenant } from "./client-
|
|
3
|
+
import { B as PowerPreflight, ft as EvidenceReceipt, it as CampaignEvidenceContext } from "./statistical-heldout-D-xBpbrd.js";
|
|
4
|
+
import { nt as EvaluationClaim } from "./search-ledger-types-B3El5xgS.js";
|
|
5
|
+
import { H as SurfaceProposer, R as Scenario, S as JudgeConfig, a as CampaignResult, d as DispatchContext, j as MutableSurface, k as LabeledScenarioStore, p as Gate, v as GateResult } from "./types-BWwRXofp.js";
|
|
6
|
+
import { Ea as RunImprovementLoopResult, Go as FinalEvidencePolicy, Ir as LoopProvenanceRecord, Ko as FinalEvidenceUse, Oa as PremeasuredOptimizationBaseline, Oo as CampaignCellRetryPolicy, Ri as OptimizationMethod, To as RunEvalOptions, Ui as OptimizationMethodProvenance, Vo as CampaignStorage, Wi as OptimizationMethodResult, Za as SearchHistoryAdmissionOptions, Zi as ComparisonCost, eo as SearchHistoryCoverageRow, ka as RunOptimizationOptions, ko as RunCampaignOptions, no as SearchHistoryReceipt, qr as CampaignComparisonUnits, wo as openAutoPr } from "./index-DMPLG226.js";
|
|
7
|
+
import { r as HostedTenant } from "./client-dMMKoQNS.js";
|
|
8
8
|
import { d as InsightReport } from "./analyze-runs-CPiKLJFs.js";
|
|
9
9
|
//#region src/campaign/presets/run-final-comparison.d.ts
|
|
10
10
|
interface FinalComparisonOptions<TScenario extends Scenario, TArtifact> extends Omit<RunCampaignOptions<TScenario, TArtifact>, 'dispatch'> {
|
|
@@ -511,4 +511,4 @@ interface DefinedAgentEval<TScenario extends Scenario, TArtifact> {
|
|
|
511
511
|
declare function defineAgentEval<TScenario extends Scenario, TArtifact>(defaults: DefineAgentEvalOptions<TScenario, TArtifact>): DefinedAgentEval<TScenario, TArtifact>;
|
|
512
512
|
//#endregion
|
|
513
513
|
export { SelfImproveMethodResult as _, DefinedAgentEval as a, SelfImproveMethodOptions as c, SelfImproveProposerOptions as d, SelfImproveProposerResult as f, SelfImproveMethodProvenance as g, selfImprove as h, DefineAgentEvalOptions as i, SelfImproveOptions as l, SelfImproveRunError as m, AgentEvalEvaluateOptions as n, defineAgentEval as o, SelfImproveResult as p, AgentEvalImproveOptions as r, SelfImproveBudget as s, AgentEvalAgent as t, SelfImproveProgressEvent as u };
|
|
514
|
-
//# sourceMappingURL=define-agent-eval-
|
|
514
|
+
//# sourceMappingURL=define-agent-eval-DQJvVa1P.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-agent-eval-
|
|
1
|
+
{"version":3,"file":"define-agent-eval-DQJvVa1P.d.ts","names":[],"sources":["../src/campaign/presets/run-final-comparison.ts","../src/contract/self-improve-method.ts","../src/contract/self-improve.ts","../src/contract/define-agent-eval.ts"],"mappings":";;;;;;;;;UAaiB,uBAAuB,kBAAkB,UAAU,mBAC1D,KAAK,m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B,WAAW"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { s as ValidationError } from "./errors-Dngq5h35.js";
|
|
2
|
-
import { t as analyzeRuns } from "./analyze-runs-
|
|
2
|
+
import { t as analyzeRuns } from "./analyze-runs-B6gv7vAT.js";
|
|
3
3
|
import { i as modelHasSnapshot } from "./run-record-BRlM99rX.js";
|
|
4
|
-
import { J as
|
|
4
|
+
import { J as runFinalComparison, O as assertSearchHistoryAdmissionOptions, X as captureJudge, Y as openAutoPr, Z as defaultProductionGate, at as evaluationUnitMap, d as combineComparisonCosts, f as costFromLedgerSummary, h as runImprovementLoop, it as captureFinalEvidencePolicy, ot as reserveFinalEvidence, rt as assertIndependentEvaluationSplit, st as runEval, u as executeOptimizationMethod, ut as resolveRunDir } from "./llm-judge-ChbWfeWl.js";
|
|
5
5
|
import { n as campaignCellToRunRecord } from "./run-record-tNnlQIrD.js";
|
|
6
|
-
import { C as pairedCampaignComposites, D as powerPreflight, F as surfaceContentHash, I as surfaceDispatchRef, L as surfaceHash, f as campaignMeasurementDigest, h as loopProvenanceArgsFromResult, m as emitLoopProvenance, p as canonicalDigest, q as campaignSplitDigest, t as createCampaignEvidenceReceipt } from "./campaign-evidence-
|
|
6
|
+
import { C as pairedCampaignComposites, D as powerPreflight, F as surfaceContentHash, I as surfaceDispatchRef, L as surfaceHash, f as campaignMeasurementDigest, h as loopProvenanceArgsFromResult, m as emitLoopProvenance, p as canonicalDigest, q as campaignSplitDigest, t as createCampaignEvidenceReceipt } from "./campaign-evidence-DJc60F9C.js";
|
|
7
7
|
import { C as fsCampaignStorage, S as createRunCostLedger, w as inMemoryCampaignStorage } from "./external-optimizer-subprocess-kbqC-iWf.js";
|
|
8
8
|
import { t as defineEvaluationClaim } from "./claim-V9Zqbq0J.js";
|
|
9
|
-
import { i as startSearchShipper, n as shipBestEffort, o as createHostedClient, r as shipSearchLedger } from "./search-shipper-
|
|
9
|
+
import { i as startSearchShipper, n as shipBestEffort, o as createHostedClient, r as shipSearchLedger } from "./search-shipper-DUlwlCsK.js";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
11
|
//#region src/contract/self-improve-reporting.ts
|
|
12
12
|
function pairedCompositeSummary(baseline, winner, independentUnitByScenarioId) {
|
|
@@ -727,4 +727,4 @@ function requirePositiveInteger(value, field) {
|
|
|
727
727
|
//#endregion
|
|
728
728
|
export { SelfImproveRunError as n, selfImprove as r, defineAgentEval as t };
|
|
729
729
|
|
|
730
|
-
//# sourceMappingURL=define-agent-eval-
|
|
730
|
+
//# sourceMappingURL=define-agent-eval-DkPbnJEY.js.map
|