@tangle-network/agent-eval 0.190.0 → 0.190.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 +15 -0
- package/dist/adapters/http.d.ts +1 -1
- package/dist/analyst/index.d.ts +2 -2
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/analyst/index.js +4 -4
- package/dist/{benchmark-command-TZlsuAh9.js → benchmark-command-BXIr_k8D.js} +10 -9
- package/dist/benchmark-command-BXIr_k8D.js.map +1 -0
- package/dist/benchmarks/index.d.ts +1 -1
- package/dist/benchmarks/index.js +3 -3
- package/dist/campaign/index.d.ts +1 -1
- package/dist/campaign/index.js +6 -6
- package/dist/{campaign-_29Qpc9Z.js → campaign-B7q74uIh.js} +8 -8
- package/dist/{campaign-_29Qpc9Z.js.map → campaign-B7q74uIh.js.map} +1 -1
- package/dist/{campaign-evidence-CWF8pEIk.js → campaign-evidence-D40-LHIL.js} +2 -2
- package/dist/{campaign-evidence-CWF8pEIk.js.map → campaign-evidence-D40-LHIL.js.map} +1 -1
- package/dist/{chat-client-DbH06Ek6.js → chat-client-B_ItsSBw.js} +2 -2
- package/dist/{chat-client-DbH06Ek6.js.map → chat-client-B_ItsSBw.js.map} +1 -1
- package/dist/{chat-json-call-B0xTEY0I.js → chat-json-call-CXHBvUz8.js} +2 -2
- package/dist/{chat-json-call-B0xTEY0I.js.map → chat-json-call-CXHBvUz8.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/contract/index.d.ts +3 -3
- package/dist/contract/index.js +7 -7
- package/dist/{define-agent-eval-DrGfrCTZ.js → define-agent-eval-DPizhHfy.js} +4 -4
- package/dist/{define-agent-eval-DrGfrCTZ.js.map → define-agent-eval-DPizhHfy.js.map} +1 -1
- package/dist/{define-agent-eval-BWeyIpny.d.ts → define-agent-eval-DblGedQk.d.ts} +2 -2
- package/dist/{define-agent-eval-BWeyIpny.d.ts.map → define-agent-eval-DblGedQk.d.ts.map} +1 -1
- package/dist/diagnosis/index.d.ts +14 -2
- package/dist/diagnosis/index.d.ts.map +1 -1
- package/dist/diagnosis/index.js +9 -2
- package/dist/diagnosis/index.js.map +1 -1
- package/dist/{dspy-rlm-engine-CTIGomgr.js → dspy-rlm-engine-Cs5LzJ-f.js} +2 -2
- package/dist/{dspy-rlm-engine-CTIGomgr.js.map → dspy-rlm-engine-Cs5LzJ-f.js.map} +1 -1
- package/dist/{eval-campaign-CMKRjWl0.js → eval-campaign-CwsBn0Gm.js} +2 -2
- package/dist/{eval-campaign-CMKRjWl0.js.map → eval-campaign-CwsBn0Gm.js.map} +1 -1
- package/dist/experiment/index.js +1 -1
- package/dist/{external-optimizer-process-Mc83UoWl.js → external-optimizer-process-BnSmrkgL.js} +3 -3
- package/dist/{external-optimizer-process-Mc83UoWl.js.map → external-optimizer-process-BnSmrkgL.js.map} +1 -1
- package/dist/{external-optimizer-subprocess-C0dHXH8e.js → external-optimizer-subprocess-kbcPu5po.js} +3 -3
- package/dist/{external-optimizer-subprocess-C0dHXH8e.js.map → external-optimizer-subprocess-kbcPu5po.js.map} +1 -1
- package/dist/{index-Ci0-EYzc.d.ts → index-CJv56rhX.d.ts} +2 -2
- package/dist/{index-Ci0-EYzc.d.ts.map → index-CJv56rhX.d.ts.map} +1 -1
- package/dist/{index-BR_R1eBE.d.ts → index-CWoIJHmy.d.ts} +3 -3
- package/dist/{index-BR_R1eBE.d.ts.map → index-CWoIJHmy.d.ts.map} +1 -1
- package/dist/{index-BqDJ6fUK.d.ts → index-I4UJGRno.d.ts} +74 -2
- package/dist/index-I4UJGRno.d.ts.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +13 -13
- package/dist/{journal-CDP0Vhx_.js → journal-c3qY0SDP.js} +246 -5
- package/dist/journal-c3qY0SDP.js.map +1 -0
- package/dist/ledger-core/index.d.ts +2 -2
- package/dist/ledger-core/index.js +2 -2
- package/dist/{llm-client-BqmRnibA.js → llm-client-KYQBh9C8.js} +2 -2
- package/dist/{llm-client-BqmRnibA.js.map → llm-client-KYQBh9C8.js.map} +1 -1
- package/dist/{llm-judge-bwbgDMP0.js → llm-judge-BnxAv7ed.js} +6 -6
- package/dist/{llm-judge-bwbgDMP0.js.map → llm-judge-BnxAv7ed.js.map} +1 -1
- package/dist/openapi.json +1 -1
- package/dist/pipelines/index.d.ts +1 -1
- package/dist/pipelines/index.js +1 -1
- package/dist/pipelines/index.js.map +1 -1
- package/dist/{produced-state-zSaGDC_Q.js → produced-state-BXjXJHJT.js} +4 -4
- package/dist/{produced-state-zSaGDC_Q.js.map → produced-state-BXjXJHJT.js.map} +1 -1
- package/dist/{raw-provider-sink-DIRCZjP_.js → raw-provider-sink-DYh4Bszw.js} +2 -2
- package/dist/{raw-provider-sink-DIRCZjP_.js.map → raw-provider-sink-DYh4Bszw.js.map} +1 -1
- package/dist/{redact-8fX8-uKr.js → redact-B7rt9Zot.js} +117 -6
- package/dist/redact-B7rt9Zot.js.map +1 -0
- package/dist/{redact-Du3WKUOP.d.ts → redact-CopuMxll.d.ts} +2 -2
- package/dist/{redact-Du3WKUOP.d.ts.map → redact-CopuMxll.d.ts.map} +1 -1
- package/dist/rl.js +1 -1
- package/dist/{semantic-concept-judge-BY0me-Jq.js → semantic-concept-judge-ClB73cei.js} +5 -5
- package/dist/{semantic-concept-judge-BY0me-Jq.js.map → semantic-concept-judge-ClB73cei.js.map} +1 -1
- package/dist/{server-DnJCDLf8.js → server-DtetGGoA.js} +2 -2
- package/dist/{server-DnJCDLf8.js.map → server-DtetGGoA.js.map} +1 -1
- package/dist/{skillopt-optimization-method-CfnQEjgT.js → skillopt-optimization-method-l2vDBtKp.js} +6 -6
- package/dist/{skillopt-optimization-method-CfnQEjgT.js.map → skillopt-optimization-method-l2vDBtKp.js.map} +1 -1
- package/dist/{spans-D1RftP_w.d.ts → spans-BWtjk_9c.d.ts} +2 -2
- package/dist/{spans-D1RftP_w.d.ts.map → spans-BWtjk_9c.d.ts.map} +1 -1
- package/dist/{store-tool-spans-DSbYpl7f.js → store-tool-spans-DUiqyHvR.js} +2 -2
- package/dist/{store-tool-spans-DSbYpl7f.js.map → store-tool-spans-DUiqyHvR.js.map} +1 -1
- package/dist/traces.d.ts +1 -1
- package/dist/traces.js +3 -3
- package/dist/wire/index.js +1 -1
- package/docs/public-api.md +16 -12
- package/package.json +1 -1
- package/dist/benchmark-command-TZlsuAh9.js.map +0 -1
- package/dist/index-BqDJ6fUK.d.ts.map +0 -1
- package/dist/journal-CDP0Vhx_.js.map +0 -1
- package/dist/redact-8fX8-uKr.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as LlmClient } from "./llm-client-
|
|
1
|
+
import { n as LlmClient } from "./llm-client-KYQBh9C8.js";
|
|
2
2
|
//#region src/analyst/chat-client.ts
|
|
3
3
|
/**
|
|
4
4
|
* Provider-neutral chat contract for every model call made by agent-eval.
|
|
@@ -112,4 +112,4 @@ function openAiCompatibleClient(opts) {
|
|
|
112
112
|
//#endregion
|
|
113
113
|
export { createChatClient as t };
|
|
114
114
|
|
|
115
|
-
//# sourceMappingURL=chat-client-
|
|
115
|
+
//# sourceMappingURL=chat-client-B_ItsSBw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-client-DbH06Ek6.js","names":[],"sources":["../src/analyst/chat-client.ts"],"sourcesContent":["/**\n * Provider-neutral chat contract for every model call made by agent-eval.\n *\n * The caller owns model execution. Evaluation code receives canonical requests\n * and results without importing a provider SDK, and agent-eval reads no\n * environment variable to find a provider credential: every transport is bound\n * at the call site.\n *\n * Two ways to bind one. `custom` and `sandbox-sdk` take a `chat` function the\n * caller wrote. `openai-compatible` takes an endpoint and a credential the\n * caller passes as values, and agent-eval issues the HTTP request itself.\n *\n * WHY THE THIRD ONE EXISTS. Every consumer that wanted a plain OpenAI-style\n * endpoint had to hand-write the same fetch loop — retry on 429 and 5xx,\n * `json_schema` degrade, fenced-JSON stripping, and, load-bearing here, the\n * `servedModel` echo that `assertServedModel` and `assertCrossFamilyServed`\n * read. A hand-written transport that omits `servedModel` makes both identity\n * checks read `unreported`, so the two-vendor judge rule they enforce silently\n * measures nothing. Measured motive: agent-eval 0.172.1 exported no such\n * transport, so a two-model judge panel in discovery-lab reached\n * `createChatClient({ transport: 'custom', baseUrl, apiKey })` — fields that\n * exist on no transport option — and every call threw\n * `TypeError: opts.chat is not a function`, which surfaced as\n * `aggregateJudgeVerdicts: all 2 judges failed`.\n *\n * The credential still never comes from agent-eval's environment. `baseUrl`\n * and the bearer are required arguments with no default and no fallback, so a\n * misconfigured caller gets a refusal at construction, never a call to an\n * endpoint it did not name.\n */\n\nimport {\n type LlmCallRequest,\n type LlmCallResult,\n LlmClient,\n type LlmClientOptions,\n} from '../llm-client'\n\n/**\n * Unified chat interface using the package's canonical LLM request and result.\n */\nexport interface ChatClient {\n /** Display name of the bound transport, included in telemetry. */\n readonly transport: ChatTransport\n /** Default model when the caller omits one. */\n readonly defaultModel?: string\n /** Total provider attempts this transport can make for one chat call. */\n readonly maximumAttempts?: number\n\n /** Implementations must enforce `req.maxTokens` when it is present. */\n chat(req: ChatRequest, opts?: ChatCallOpts): Promise<ChatResponse>\n}\n\nexport type ChatTransport =\n | 'sandbox-sdk' // box.streamPrompt() — chat completion via sandbox SDK\n | 'custom' // caller-adapted SDK or transport\n | 'openai-compatible' // caller-named /v1 endpoint, driven by this package\n | 'mock' // test-time injection\n\nexport interface ChatRequest extends Omit<LlmCallRequest, 'model'> {\n /** Optional — falls back to ChatClient.defaultModel. */\n model?: string\n}\n\nexport type ChatResponse = LlmCallResult\n\nexport interface ChatCallOpts {\n /** Cancel the in-flight request. */\n signal?: AbortSignal\n /** Hard USD ceiling for this single call (informational; the underlying transport may not enforce). */\n maxCostUsd?: number\n /** Correlation tag carried into request headers when the transport allows. */\n correlationId?: string\n /** Stable provider idempotency key for retries/redrives of one paid call. */\n idempotencyKey?: string\n}\n\n// ── Factory ─────────────────────────────────────────────────────────\n\nexport type CreateChatClientOpts =\n | SandboxSdkTransportOpts\n | CustomTransportOpts\n | OpenAiCompatibleTransportOpts\n | MockTransportOpts\n\ninterface BaseTransportOpts {\n defaultModel?: string\n /** Total provider attempts. Required for opaque transports used in capped runs. */\n maximumAttempts?: number\n}\n\n/**\n * Sandbox-SDK transport. The caller supplies a canonical chat function for an\n * already-configured Sandbox handle, so agent-eval does not import the SDK.\n */\nexport interface SandboxSdkTransportOpts extends BaseTransportOpts {\n transport: 'sandbox-sdk'\n chat: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>\n}\n\n/** Caller-adapted SDK or transport returning the canonical ChatResponse shape. */\nexport interface CustomTransportOpts extends BaseTransportOpts {\n transport: 'custom'\n chat: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>\n}\n\n/**\n * OpenAI-compatible HTTP transport: the caller names a `/v1` endpoint and\n * hands over a bearer, and this package drives `POST {baseUrl}/chat/completions`.\n *\n * Use this instead of hand-rolling a `custom` transport around `fetch`. The\n * result carries `servedModel` — the model id the provider echoed, verbatim —\n * which is the only field `assertServedModel` and `assertCrossFamilyServed`\n * can read to witness a gateway answering from a different model than the one\n * requested.\n *\n * `baseUrl` ends at the `/v1` prefix; the `/chat/completions` path is this\n * package's to append. A `baseUrl` that already carries the path is a\n * construction error, not a request to a doubled URL.\n *\n * Exactly one credential form is required — `apiKey`, `bearer`, or\n * `authHeader`. There is no environment fallback: agent-eval never goes\n * looking for a key.\n */\nexport interface OpenAiCompatibleTransportOpts\n extends BaseTransportOpts,\n Pick<\n LlmClientOptions,\n | 'assertServedModel'\n | 'customTokenPricing'\n | 'deadlineMs'\n | 'defaultTimeoutMs'\n | 'fetch'\n | 'jsonPayloadMode'\n | 'jsonSchemaTransport'\n | 'provider'\n | 'rawSink'\n | 'signal'\n | 'thinking'\n > {\n transport: 'openai-compatible'\n /** Endpoint ending at the `/v1` prefix. Required — there is no default endpoint. */\n baseUrl: string\n /** Bearer credential. One of `apiKey`, `bearer`, or `authHeader` is required. */\n apiKey?: string\n /** Bearer credential, alternate spelling. */\n bearer?: string\n /** Non-bearer authorization header, for endpoints that want their own scheme. */\n authHeader?: { name: string; value: string }\n}\n\n/**\n * Mock transport for tests. The handler receives the request and returns\n * whatever the test wants. No retries, no JSON-schema degrade.\n */\nexport interface MockTransportOpts extends BaseTransportOpts {\n transport: 'mock'\n handler: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>\n}\n\n/**\n * Build a ChatClient bound to a specific transport. The returned client\n * is safe to share across analysts in a single registry run.\n */\nexport function createChatClient(opts: CreateChatClientOpts): ChatClient {\n switch (opts.transport) {\n case 'sandbox-sdk':\n return {\n transport: 'sandbox-sdk',\n defaultModel: opts.defaultModel,\n maximumAttempts: opts.maximumAttempts,\n chat: async (req, callOpts) => opts.chat(resolveModel(req, opts.defaultModel), callOpts),\n }\n case 'custom':\n return {\n transport: 'custom',\n defaultModel: opts.defaultModel,\n maximumAttempts: opts.maximumAttempts,\n chat: async (req, callOpts) => opts.chat(resolveModel(req, opts.defaultModel), callOpts),\n }\n case 'openai-compatible':\n return openAiCompatibleClient(opts)\n case 'mock':\n return {\n transport: 'mock',\n defaultModel: opts.defaultModel,\n maximumAttempts: 1,\n chat: async (req, callOpts) => opts.handler(resolveModel(req, opts.defaultModel), callOpts),\n }\n }\n}\n\nfunction resolveModel(req: ChatRequest, defaultModel: string | undefined): ChatRequest {\n if (req.model) return req\n if (!defaultModel) {\n throw new Error(\n 'ChatClient.chat: no model on request and no defaultModel on the client. ' +\n 'Either pass req.model or bind defaultModel at createChatClient().',\n )\n }\n return { ...req, model: defaultModel }\n}\n\n/**\n * Build the OpenAI-compatible client, refusing a half-configured one first.\n *\n * Both refusals are construction-time on purpose. A missing credential or a\n * doubled path is a caller mistake that a request would turn into a 401 or a\n * 404 from an endpoint the caller did not intend to reach — the failure then\n * reads as a provider problem instead of a configuration one.\n */\nfunction openAiCompatibleClient(opts: OpenAiCompatibleTransportOpts): ChatClient {\n const baseUrl = opts.baseUrl?.trim().replace(/\\/+$/, '') ?? ''\n if (!baseUrl) {\n throw new Error(\n \"createChatClient({ transport: 'openai-compatible' }): baseUrl is required and has no default.\",\n )\n }\n if (/\\/chat\\/completions$/.test(baseUrl)) {\n throw new Error(\n \"createChatClient({ transport: 'openai-compatible' }): baseUrl ends at the /v1 prefix; \" +\n `this package appends /chat/completions. Got ${baseUrl}`,\n )\n }\n if (!opts.apiKey?.trim() && !opts.bearer?.trim() && !opts.authHeader) {\n throw new Error(\n \"createChatClient({ transport: 'openai-compatible' }): one of apiKey, bearer, or authHeader \" +\n 'is required. agent-eval reads no environment variable for a credential.',\n )\n }\n\n const clientOptions: LlmClientOptions = {\n baseUrl,\n ...(opts.apiKey ? { apiKey: opts.apiKey } : {}),\n ...(opts.bearer ? { bearer: opts.bearer } : {}),\n ...(opts.authHeader ? { authHeader: opts.authHeader } : {}),\n ...(opts.maximumAttempts === undefined ? {} : { maximumAttempts: opts.maximumAttempts }),\n ...(opts.assertServedModel === undefined ? {} : { assertServedModel: opts.assertServedModel }),\n ...(opts.customTokenPricing === undefined\n ? {}\n : { customTokenPricing: opts.customTokenPricing }),\n ...(opts.deadlineMs === undefined ? {} : { deadlineMs: opts.deadlineMs }),\n ...(opts.defaultTimeoutMs === undefined ? {} : { defaultTimeoutMs: opts.defaultTimeoutMs }),\n ...(opts.fetch === undefined ? {} : { fetch: opts.fetch }),\n ...(opts.jsonPayloadMode === undefined ? {} : { jsonPayloadMode: opts.jsonPayloadMode }),\n ...(opts.jsonSchemaTransport === undefined\n ? {}\n : { jsonSchemaTransport: opts.jsonSchemaTransport }),\n ...(opts.provider === undefined ? {} : { provider: opts.provider }),\n ...(opts.rawSink === undefined ? {} : { rawSink: opts.rawSink }),\n ...(opts.signal === undefined ? {} : { signal: opts.signal }),\n ...(opts.thinking === undefined ? {} : { thinking: opts.thinking }),\n }\n const client = new LlmClient(clientOptions)\n\n return {\n transport: 'openai-compatible',\n ...(opts.defaultModel ? { defaultModel: opts.defaultModel } : {}),\n maximumAttempts: client.maximumAttempts,\n chat: async (req, callOpts) => {\n const resolved = resolveModel(req, opts.defaultModel)\n return client.call(resolved as LlmCallRequest, {\n ...(callOpts?.signal ? { signal: callOpts.signal } : {}),\n ...(callOpts?.idempotencyKey ? { idempotencyKey: callOpts.idempotencyKey } : {}),\n })\n },\n }\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"chat-client-B_ItsSBw.js","names":[],"sources":["../src/analyst/chat-client.ts"],"sourcesContent":["/**\n * Provider-neutral chat contract for every model call made by agent-eval.\n *\n * The caller owns model execution. Evaluation code receives canonical requests\n * and results without importing a provider SDK, and agent-eval reads no\n * environment variable to find a provider credential: every transport is bound\n * at the call site.\n *\n * Two ways to bind one. `custom` and `sandbox-sdk` take a `chat` function the\n * caller wrote. `openai-compatible` takes an endpoint and a credential the\n * caller passes as values, and agent-eval issues the HTTP request itself.\n *\n * WHY THE THIRD ONE EXISTS. Every consumer that wanted a plain OpenAI-style\n * endpoint had to hand-write the same fetch loop — retry on 429 and 5xx,\n * `json_schema` degrade, fenced-JSON stripping, and, load-bearing here, the\n * `servedModel` echo that `assertServedModel` and `assertCrossFamilyServed`\n * read. A hand-written transport that omits `servedModel` makes both identity\n * checks read `unreported`, so the two-vendor judge rule they enforce silently\n * measures nothing. Measured motive: agent-eval 0.172.1 exported no such\n * transport, so a two-model judge panel in discovery-lab reached\n * `createChatClient({ transport: 'custom', baseUrl, apiKey })` — fields that\n * exist on no transport option — and every call threw\n * `TypeError: opts.chat is not a function`, which surfaced as\n * `aggregateJudgeVerdicts: all 2 judges failed`.\n *\n * The credential still never comes from agent-eval's environment. `baseUrl`\n * and the bearer are required arguments with no default and no fallback, so a\n * misconfigured caller gets a refusal at construction, never a call to an\n * endpoint it did not name.\n */\n\nimport {\n type LlmCallRequest,\n type LlmCallResult,\n LlmClient,\n type LlmClientOptions,\n} from '../llm-client'\n\n/**\n * Unified chat interface using the package's canonical LLM request and result.\n */\nexport interface ChatClient {\n /** Display name of the bound transport, included in telemetry. */\n readonly transport: ChatTransport\n /** Default model when the caller omits one. */\n readonly defaultModel?: string\n /** Total provider attempts this transport can make for one chat call. */\n readonly maximumAttempts?: number\n\n /** Implementations must enforce `req.maxTokens` when it is present. */\n chat(req: ChatRequest, opts?: ChatCallOpts): Promise<ChatResponse>\n}\n\nexport type ChatTransport =\n | 'sandbox-sdk' // box.streamPrompt() — chat completion via sandbox SDK\n | 'custom' // caller-adapted SDK or transport\n | 'openai-compatible' // caller-named /v1 endpoint, driven by this package\n | 'mock' // test-time injection\n\nexport interface ChatRequest extends Omit<LlmCallRequest, 'model'> {\n /** Optional — falls back to ChatClient.defaultModel. */\n model?: string\n}\n\nexport type ChatResponse = LlmCallResult\n\nexport interface ChatCallOpts {\n /** Cancel the in-flight request. */\n signal?: AbortSignal\n /** Hard USD ceiling for this single call (informational; the underlying transport may not enforce). */\n maxCostUsd?: number\n /** Correlation tag carried into request headers when the transport allows. */\n correlationId?: string\n /** Stable provider idempotency key for retries/redrives of one paid call. */\n idempotencyKey?: string\n}\n\n// ── Factory ─────────────────────────────────────────────────────────\n\nexport type CreateChatClientOpts =\n | SandboxSdkTransportOpts\n | CustomTransportOpts\n | OpenAiCompatibleTransportOpts\n | MockTransportOpts\n\ninterface BaseTransportOpts {\n defaultModel?: string\n /** Total provider attempts. Required for opaque transports used in capped runs. */\n maximumAttempts?: number\n}\n\n/**\n * Sandbox-SDK transport. The caller supplies a canonical chat function for an\n * already-configured Sandbox handle, so agent-eval does not import the SDK.\n */\nexport interface SandboxSdkTransportOpts extends BaseTransportOpts {\n transport: 'sandbox-sdk'\n chat: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>\n}\n\n/** Caller-adapted SDK or transport returning the canonical ChatResponse shape. */\nexport interface CustomTransportOpts extends BaseTransportOpts {\n transport: 'custom'\n chat: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>\n}\n\n/**\n * OpenAI-compatible HTTP transport: the caller names a `/v1` endpoint and\n * hands over a bearer, and this package drives `POST {baseUrl}/chat/completions`.\n *\n * Use this instead of hand-rolling a `custom` transport around `fetch`. The\n * result carries `servedModel` — the model id the provider echoed, verbatim —\n * which is the only field `assertServedModel` and `assertCrossFamilyServed`\n * can read to witness a gateway answering from a different model than the one\n * requested.\n *\n * `baseUrl` ends at the `/v1` prefix; the `/chat/completions` path is this\n * package's to append. A `baseUrl` that already carries the path is a\n * construction error, not a request to a doubled URL.\n *\n * Exactly one credential form is required — `apiKey`, `bearer`, or\n * `authHeader`. There is no environment fallback: agent-eval never goes\n * looking for a key.\n */\nexport interface OpenAiCompatibleTransportOpts\n extends BaseTransportOpts,\n Pick<\n LlmClientOptions,\n | 'assertServedModel'\n | 'customTokenPricing'\n | 'deadlineMs'\n | 'defaultTimeoutMs'\n | 'fetch'\n | 'jsonPayloadMode'\n | 'jsonSchemaTransport'\n | 'provider'\n | 'rawSink'\n | 'signal'\n | 'thinking'\n > {\n transport: 'openai-compatible'\n /** Endpoint ending at the `/v1` prefix. Required — there is no default endpoint. */\n baseUrl: string\n /** Bearer credential. One of `apiKey`, `bearer`, or `authHeader` is required. */\n apiKey?: string\n /** Bearer credential, alternate spelling. */\n bearer?: string\n /** Non-bearer authorization header, for endpoints that want their own scheme. */\n authHeader?: { name: string; value: string }\n}\n\n/**\n * Mock transport for tests. The handler receives the request and returns\n * whatever the test wants. No retries, no JSON-schema degrade.\n */\nexport interface MockTransportOpts extends BaseTransportOpts {\n transport: 'mock'\n handler: (req: ChatRequest, opts?: ChatCallOpts) => Promise<ChatResponse>\n}\n\n/**\n * Build a ChatClient bound to a specific transport. The returned client\n * is safe to share across analysts in a single registry run.\n */\nexport function createChatClient(opts: CreateChatClientOpts): ChatClient {\n switch (opts.transport) {\n case 'sandbox-sdk':\n return {\n transport: 'sandbox-sdk',\n defaultModel: opts.defaultModel,\n maximumAttempts: opts.maximumAttempts,\n chat: async (req, callOpts) => opts.chat(resolveModel(req, opts.defaultModel), callOpts),\n }\n case 'custom':\n return {\n transport: 'custom',\n defaultModel: opts.defaultModel,\n maximumAttempts: opts.maximumAttempts,\n chat: async (req, callOpts) => opts.chat(resolveModel(req, opts.defaultModel), callOpts),\n }\n case 'openai-compatible':\n return openAiCompatibleClient(opts)\n case 'mock':\n return {\n transport: 'mock',\n defaultModel: opts.defaultModel,\n maximumAttempts: 1,\n chat: async (req, callOpts) => opts.handler(resolveModel(req, opts.defaultModel), callOpts),\n }\n }\n}\n\nfunction resolveModel(req: ChatRequest, defaultModel: string | undefined): ChatRequest {\n if (req.model) return req\n if (!defaultModel) {\n throw new Error(\n 'ChatClient.chat: no model on request and no defaultModel on the client. ' +\n 'Either pass req.model or bind defaultModel at createChatClient().',\n )\n }\n return { ...req, model: defaultModel }\n}\n\n/**\n * Build the OpenAI-compatible client, refusing a half-configured one first.\n *\n * Both refusals are construction-time on purpose. A missing credential or a\n * doubled path is a caller mistake that a request would turn into a 401 or a\n * 404 from an endpoint the caller did not intend to reach — the failure then\n * reads as a provider problem instead of a configuration one.\n */\nfunction openAiCompatibleClient(opts: OpenAiCompatibleTransportOpts): ChatClient {\n const baseUrl = opts.baseUrl?.trim().replace(/\\/+$/, '') ?? ''\n if (!baseUrl) {\n throw new Error(\n \"createChatClient({ transport: 'openai-compatible' }): baseUrl is required and has no default.\",\n )\n }\n if (/\\/chat\\/completions$/.test(baseUrl)) {\n throw new Error(\n \"createChatClient({ transport: 'openai-compatible' }): baseUrl ends at the /v1 prefix; \" +\n `this package appends /chat/completions. Got ${baseUrl}`,\n )\n }\n if (!opts.apiKey?.trim() && !opts.bearer?.trim() && !opts.authHeader) {\n throw new Error(\n \"createChatClient({ transport: 'openai-compatible' }): one of apiKey, bearer, or authHeader \" +\n 'is required. agent-eval reads no environment variable for a credential.',\n )\n }\n\n const clientOptions: LlmClientOptions = {\n baseUrl,\n ...(opts.apiKey ? { apiKey: opts.apiKey } : {}),\n ...(opts.bearer ? { bearer: opts.bearer } : {}),\n ...(opts.authHeader ? { authHeader: opts.authHeader } : {}),\n ...(opts.maximumAttempts === undefined ? {} : { maximumAttempts: opts.maximumAttempts }),\n ...(opts.assertServedModel === undefined ? {} : { assertServedModel: opts.assertServedModel }),\n ...(opts.customTokenPricing === undefined\n ? {}\n : { customTokenPricing: opts.customTokenPricing }),\n ...(opts.deadlineMs === undefined ? {} : { deadlineMs: opts.deadlineMs }),\n ...(opts.defaultTimeoutMs === undefined ? {} : { defaultTimeoutMs: opts.defaultTimeoutMs }),\n ...(opts.fetch === undefined ? {} : { fetch: opts.fetch }),\n ...(opts.jsonPayloadMode === undefined ? {} : { jsonPayloadMode: opts.jsonPayloadMode }),\n ...(opts.jsonSchemaTransport === undefined\n ? {}\n : { jsonSchemaTransport: opts.jsonSchemaTransport }),\n ...(opts.provider === undefined ? {} : { provider: opts.provider }),\n ...(opts.rawSink === undefined ? {} : { rawSink: opts.rawSink }),\n ...(opts.signal === undefined ? {} : { signal: opts.signal }),\n ...(opts.thinking === undefined ? {} : { thinking: opts.thinking }),\n }\n const client = new LlmClient(clientOptions)\n\n return {\n transport: 'openai-compatible',\n ...(opts.defaultModel ? { defaultModel: opts.defaultModel } : {}),\n maximumAttempts: client.maximumAttempts,\n chat: async (req, callOpts) => {\n const resolved = resolveModel(req, opts.defaultModel)\n return client.call(resolved as LlmCallRequest, {\n ...(callOpts?.signal ? { signal: callOpts.signal } : {}),\n ...(callOpts?.idempotencyKey ? { idempotencyKey: callOpts.idempotencyKey } : {}),\n })\n },\n }\n}\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as extractJsonPayload, o as costReceiptFromLlm, s as costReceiptFromLlmError, u as maximumChargeForLlmRequest } from "./llm-client-
|
|
1
|
+
import { c as extractJsonPayload, o as costReceiptFromLlm, s as costReceiptFromLlmError, u as maximumChargeForLlmRequest } from "./llm-client-KYQBh9C8.js";
|
|
2
2
|
//#region src/chat-json-call.ts
|
|
3
3
|
/** Parse a JSON answer out of a model response. The transport may fence it. */
|
|
4
4
|
function parseJsonAnswer(response, actor) {
|
|
@@ -60,4 +60,4 @@ async function paidJsonChat(input) {
|
|
|
60
60
|
//#endregion
|
|
61
61
|
export { paidJsonChat as n, paidChat as t };
|
|
62
62
|
|
|
63
|
-
//# sourceMappingURL=chat-json-call-
|
|
63
|
+
//# sourceMappingURL=chat-json-call-CXHBvUz8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-json-call-
|
|
1
|
+
{"version":3,"file":"chat-json-call-CXHBvUz8.js","names":[],"sources":["../src/chat-json-call.ts"],"sourcesContent":["/**\n * One paid model call through a caller-owned `ChatClient`, metered by the\n * cost ledger.\n *\n * agent-eval executes no paid model: the transport is supplied by the caller\n * and the credential never enters this package. What stays here is the\n * accounting around the call — the priced maximum reserved before it runs, the\n * stable call id forwarded as the provider idempotency key, the receipt\n * settled from the response, and an honest unknown-usage receipt when the\n * transport failed.\n *\n * The judges, the wire judge endpoint, and the in-process trace-analysis\n * engine all make the same call in the same order; this is the one copy of\n * that sequence. `paidChat` is the sequence; `paidJsonChat` adds the JSON\n * answer parse that a structured caller needs.\n */\n\nimport type { ChatClient, ChatResponse } from './analyst/chat-client'\nimport type { CostChannel, CostLedgerHandle, CostReceipt, CustomTokenPricing } from './cost-ledger'\nimport {\n costReceiptFromLlm,\n costReceiptFromLlmError,\n extractJsonPayload,\n type LlmCallRequest,\n maximumChargeForLlmRequest,\n} from './llm-client'\n\nexport interface PaidChatInput {\n /** Caller-owned transport. One `chat()` call. */\n chat: ChatClient\n /** The exact canonical request, including its JSON-mode or schema fields. */\n request: LlmCallRequest\n ledger: CostLedgerHandle\n channel: CostChannel\n phase: string\n actor: string\n tags?: Record<string, string>\n signal?: AbortSignal\n /** Endpoint rates used when the transport reports no billed amount. */\n pricing?: CustomTokenPricing\n}\n\nexport type PaidJsonChatInput = PaidChatInput\n\nexport type PaidChatResult =\n | { succeeded: true; response: ChatResponse; receipt: CostReceipt }\n | { succeeded: false; error: Error; receipt?: CostReceipt }\n\nexport type PaidJsonChatResult<T> =\n | { succeeded: true; value: T; response: ChatResponse; receipt: CostReceipt }\n | { succeeded: false; error: Error; receipt?: CostReceipt }\n\n/** Parse a JSON answer out of a model response. The transport may fence it. */\nfunction parseJsonAnswer<T>(response: ChatResponse, actor: string): T {\n try {\n return JSON.parse(extractJsonPayload(response.content)) as T\n } catch (error) {\n throw new Error(\n `${actor}: model answer was not JSON — ${error instanceof Error ? error.message : String(error)}`,\n )\n }\n}\n\n/** Reserve, execute, and settle one caller-owned chat call. */\nexport async function paidChat(input: PaidChatInput): Promise<PaidChatResult> {\n const paid = await input.ledger.runPaidCall({\n channel: input.channel,\n phase: input.phase,\n actor: input.actor,\n model: input.request.model,\n ...(input.tags && Object.keys(input.tags).length > 0 ? { tags: input.tags } : {}),\n maximumCharge: maximumChargeForLlmRequest(input.request, {\n ...(input.chat.maximumAttempts === undefined\n ? {}\n : { maximumAttempts: input.chat.maximumAttempts }),\n ...(input.pricing ? { customTokenPricing: input.pricing } : {}),\n }),\n ...(input.signal ? { signal: input.signal } : {}),\n execute: (signal, callId) => input.chat.chat(input.request, { signal, idempotencyKey: callId }),\n receipt: (response) => costReceiptFromLlm(response, input.pricing),\n receiptFromError: (error) => costReceiptFromLlmError(error, input.pricing),\n })\n if (!paid.succeeded) {\n return {\n succeeded: false,\n error: paid.error,\n ...(paid.receipt ? { receipt: paid.receipt } : {}),\n }\n }\n return { succeeded: true, response: paid.value, receipt: paid.receipt }\n}\n\nexport async function paidJsonChat<T>(input: PaidJsonChatInput): Promise<PaidJsonChatResult<T>> {\n const paid = await paidChat(input)\n if (!paid.succeeded) return paid\n // The call completed and was billed. A malformed answer is a contract\n // failure AFTER the money was spent, so it keeps the settled receipt instead\n // of reporting the spend as unknown.\n try {\n return {\n succeeded: true,\n value: parseJsonAnswer<T>(paid.response, input.actor),\n response: paid.response,\n receipt: paid.receipt,\n }\n } catch (error) {\n return {\n succeeded: false,\n error: error instanceof Error ? error : new Error(String(error)),\n receipt: paid.receipt,\n }\n }\n}\n"],"mappings":";;;AAqDA,SAAS,gBAAmB,UAAwB,OAAkB;CACpE,IAAI;EACF,OAAO,KAAK,MAAM,mBAAmB,SAAS,OAAO,CAAC;CACxD,SAAS,OAAO;EACd,MAAM,IAAI,MACR,GAAG,MAAM,gCAAgC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAChG;CACF;AACF;;AAGA,eAAsB,SAAS,OAA+C;CAC5E,MAAM,OAAO,MAAM,MAAM,OAAO,YAAY;EAC1C,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO,MAAM;EACb,OAAO,MAAM,QAAQ;EACrB,GAAI,MAAM,QAAQ,OAAO,KAAK,MAAM,IAAI,CAAC,CAAC,SAAS,IAAI,EAAE,MAAM,MAAM,KAAK,IAAI,CAAC;EAC/E,eAAe,2BAA2B,MAAM,SAAS;GACvD,GAAI,MAAM,KAAK,oBAAoB,KAAA,IAC/B,CAAC,IACD,EAAE,iBAAiB,MAAM,KAAK,gBAAgB;GAClD,GAAI,MAAM,UAAU,EAAE,oBAAoB,MAAM,QAAQ,IAAI,CAAC;EAC/D,CAAC;EACD,GAAI,MAAM,SAAS,EAAE,QAAQ,MAAM,OAAO,IAAI,CAAC;EAC/C,UAAU,QAAQ,WAAW,MAAM,KAAK,KAAK,MAAM,SAAS;GAAE;GAAQ,gBAAgB;EAAO,CAAC;EAC9F,UAAU,aAAa,mBAAmB,UAAU,MAAM,OAAO;EACjE,mBAAmB,UAAU,wBAAwB,OAAO,MAAM,OAAO;CAC3E,CAAC;CACD,IAAI,CAAC,KAAK,WACR,OAAO;EACL,WAAW;EACX,OAAO,KAAK;EACZ,GAAI,KAAK,UAAU,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;CAClD;CAEF,OAAO;EAAE,WAAW;EAAM,UAAU,KAAK;EAAO,SAAS,KAAK;CAAQ;AACxE;AAEA,eAAsB,aAAgB,OAA0D;CAC9F,MAAM,OAAO,MAAM,SAAS,KAAK;CACjC,IAAI,CAAC,KAAK,WAAW,OAAO;CAI5B,IAAI;EACF,OAAO;GACL,WAAW;GACX,OAAO,gBAAmB,KAAK,UAAU,MAAM,KAAK;GACpD,UAAU,KAAK;GACf,SAAS,KAAK;EAChB;CACF,SAAS,OAAO;EACd,OAAO;GACL,WAAW;GACX,OAAO,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC;GAC/D,SAAS,KAAK;EAChB;CACF;AACF"}
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { i as runRolloutReleaseCli } from "./hf-dataset-CRqtSjnR.js";
|
|
3
|
-
import { t as createChatClient } from "./chat-client-
|
|
4
|
-
import { t as runAnalystBenchmarkCommand } from "./benchmark-command-
|
|
5
|
-
import { a as runRpcBatch, o as runRpcOnce, p as handleVersion, r as startServerAsync, s as buildOpenApi } from "./server-
|
|
3
|
+
import { t as createChatClient } from "./chat-client-B_ItsSBw.js";
|
|
4
|
+
import { t as runAnalystBenchmarkCommand } from "./benchmark-command-BXIr_k8D.js";
|
|
5
|
+
import { a as runRpcBatch, o as runRpcOnce, p as handleVersion, r as startServerAsync, s as buildOpenApi } from "./server-DtetGGoA.js";
|
|
6
6
|
import { t as runSupervisorRunCommand } from "./report-command-DKJ_yAIj.js";
|
|
7
7
|
import { writeFileSync } from "node:fs";
|
|
8
8
|
//#region src/cli-config.ts
|
package/dist/contract/index.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ import { _ as ProposalFinding, i as AnalystFinding, v as ProposalFindingOrigin,
|
|
|
3
3
|
import { A as createChatClient, T as CreateChatClientOpts, x as ChatClient } from "../types-C0bWoSKC.js";
|
|
4
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-CLpjYffJ.js";
|
|
5
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-BvmWNjjs.js";
|
|
6
|
-
import { $i as RunImprovementLoopOptions, $r as GepaOptimizationRecipe, Ao as inMemoryCampaignStorage, Bi as ReferenceEquivalenceJudgeInput, Ci as compareOptimizationMethods, Do as CampaignStorage, Dr as DefaultProductionGateOptions, Er as DefaultProductionGateCheck, Gi as runReferenceEquivalenceJudge, Gr as SkillOptOptimizationMethodConfig, Hi as ReferenceEquivalenceJudgeResult, Io as campaignSplitDigest, Ji as llmJudge, Jr as skillOptOptimizationMethod, Ki as LlmJudgeDimension, Kr as SkillOptRunnerCommand, Mo as FinalEvidenceUse, Or as DefaultProductionRewardHackingOptions, Qi as transientDispatchFailure, Qr as GepaOptimizationMethodConfig, Ri as REFERENCE_EQUIVALENCE_INPUT_LIMITS, Si as OptimizationTokenUsage, Ti as ComparisonCost, Tr as heldOutGate, Ui as ReferenceEquivalenceScenario, Vi as ReferenceEquivalenceJudgeOptions, Wi as createReferenceEquivalenceJudge, Wr as composeGate, Xr as GepaEngineOptions, Yr as GepaAdaptiveEngineRun, Zr as GepaEngineRun, _i as OptimizationMethodProvenance, ai as ExternalTextOptimizationMethodConfig, ci as ExternalOptimizationExample, di as CompareOptimizationMethodsOptions, do as RunEvalOptions, ea as RunImprovementLoopResult, ei as GepaRunnerCommand, fi as OptimizationMethod, fo as runEval, go as runCampaign, hi as OptimizationMethodInput, ho as RunCampaignOptions, ii as externalTextOptimizationMethod, jo as FinalEvidencePolicy, ko as fsCampaignStorage, kr as defaultProductionGate, li as ExternalTextEvaluationResponse, mo as CampaignCellRetryPolicy, ni as OpenAICompatibleOptimizerModel, oi as ExternalTextOptimizerContext, pi as OptimizationMethodComparison, po as CampaignCellFailureReceipt, qi as LlmJudgeOptions, qr as SkillOptTrainerConfig, ri as OptimizerModelBudget, si as ExternalTextOptimizerResult, ta as runImprovementLoop, ti as gepaOptimizationMethod, vi as OptimizationMethodResult, wr as HeldOutGateOptions, xi as OptimizationPackageSource, zi as REFERENCE_EQUIVALENCE_JUDGE_VERSION } from "../index-
|
|
6
|
+
import { $i as RunImprovementLoopOptions, $r as GepaOptimizationRecipe, Ao as inMemoryCampaignStorage, Bi as ReferenceEquivalenceJudgeInput, Ci as compareOptimizationMethods, Do as CampaignStorage, Dr as DefaultProductionGateOptions, Er as DefaultProductionGateCheck, Gi as runReferenceEquivalenceJudge, Gr as SkillOptOptimizationMethodConfig, Hi as ReferenceEquivalenceJudgeResult, Io as campaignSplitDigest, Ji as llmJudge, Jr as skillOptOptimizationMethod, Ki as LlmJudgeDimension, Kr as SkillOptRunnerCommand, Mo as FinalEvidenceUse, Or as DefaultProductionRewardHackingOptions, Qi as transientDispatchFailure, Qr as GepaOptimizationMethodConfig, Ri as REFERENCE_EQUIVALENCE_INPUT_LIMITS, Si as OptimizationTokenUsage, Ti as ComparisonCost, Tr as heldOutGate, Ui as ReferenceEquivalenceScenario, Vi as ReferenceEquivalenceJudgeOptions, Wi as createReferenceEquivalenceJudge, Wr as composeGate, Xr as GepaEngineOptions, Yr as GepaAdaptiveEngineRun, Zr as GepaEngineRun, _i as OptimizationMethodProvenance, ai as ExternalTextOptimizationMethodConfig, ci as ExternalOptimizationExample, di as CompareOptimizationMethodsOptions, do as RunEvalOptions, ea as RunImprovementLoopResult, ei as GepaRunnerCommand, fi as OptimizationMethod, fo as runEval, go as runCampaign, hi as OptimizationMethodInput, ho as RunCampaignOptions, ii as externalTextOptimizationMethod, jo as FinalEvidencePolicy, ko as fsCampaignStorage, kr as defaultProductionGate, li as ExternalTextEvaluationResponse, mo as CampaignCellRetryPolicy, ni as OpenAICompatibleOptimizerModel, oi as ExternalTextOptimizerContext, pi as OptimizationMethodComparison, po as CampaignCellFailureReceipt, qi as LlmJudgeOptions, qr as SkillOptTrainerConfig, ri as OptimizerModelBudget, si as ExternalTextOptimizerResult, ta as runImprovementLoop, ti as gepaOptimizationMethod, vi as OptimizationMethodResult, wr as HeldOutGateOptions, xi as OptimizationPackageSource, zi as REFERENCE_EQUIVALENCE_JUDGE_VERSION } from "../index-CJv56rhX.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
8
|
import { a as FailureClusterInsight, c as JudgeInsight, d as Recommendation, f as ReleaseSummary, i as FailureClassTally, l as LiftInsight, m as TokenUsageInsight, n as ExecutionErrorOutcomeCell, o as InsightReport, p as ScalarDistribution, r as ExecutionInsight, s as InterRaterInsight, t as CostProvenanceSummary, u as OutcomeCorrelationInsight } from "../insight-report-CvPkEIcC.js";
|
|
9
9
|
import { n as HostedTenant } from "../client-BhEyAdfe.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 diffRunBaselineToWinner, A as CodeAgentSessionActionStatus, At as measuredComparisonFromCandidateExperiment, B as AgentTraceFile, C as fromOpenCodeSession, Ct as EvaluatePairedMeasurementsOptions, D as streamCodeAgentJsonlFile, Dt as RunCandidateExperimentOptions, E as parseCodeAgentJsonlFile, Et as PairedMeasurementEvaluation, F as CodeAgentSessionTerminalStatus, Ft as verifyCandidateExperiment, G as PartitionByAuthoringModelResult, H as AgentTraceRange, I as observeCodeAgentSession, It as verifyCandidateExperimentComparison, J as EvalCellScoreDelta, K as parseAgentTrace, L as AgentTraceContributor, M as CodeAgentSessionExecutionReceipt, Mt as sealCandidateBenchmarkSuite, N as CodeAgentSessionObservation, Nt as sealCandidateBenchmarkTask, O as CodeAgentSessionAction, Ot as SealCandidateBenchmarkSuiteOptions, P as CodeAgentSessionSource, Pt as sealCandidateExperiment, Q as diffGenerations, R as AgentTraceContributorType, S as fromKimiCodeSession, St as CompareCandidateExperimentOptions, T as parseCodeAgentJsonl, Tt as PairedMeasurementAdapter, U as AgentTraceRecord, V as AgentTraceIndex, W as AuthoringProvenance, X as EvalGenerationDiff, Y as EvalDimensionDelta, Z as EvalRunDiff, _ as CodeAgentSessionIntakeResult, _t as sealAgentProfileImprovementSuite, a as FromFeedbackTableOptions, at as FromRunRecordDirOptions, b as fromClaudeCodeSession, bt as CandidateExperimentExecutionInput, c as CodeAgentStoreObservation, ct as fromRunRecordDir, d as CodeAgentStoreScope, dt as CompareAgentProfileImprovementExperimentOptions, et as diffRuns, f as CodeAgentStoreSession, ft as RunAgentProfileImprovementExperimentOptions, g as CodeAgentSessionIntakeOptions, gt as sealAgentProfileImprovementExperiment, h as CodeAgentSessionDiagnostic, ht as runAgentProfileImprovementExperiment, i as FeedbackTableRow, it as evalReportingSuite, j as CodeAgentSessionActionSurface, jt as runCandidateExperiment, k as CodeAgentSessionActionKind, kt as evaluatePairedMeasurements, l as CodeAgentStoreRejection, lt as AgentProfileImprovementExperimentExecutionInput, m as CodeAgentJsonlLine, mt as measuredComparisonFromAgentProfileImprovementExperiment, n as fromOtelSpans, nt as EvalReportingSuiteOptions, o as FromFeedbackTableResult, ot as FromRunRecordDirResult, p as observeCodeAgentStore, pt as SealAgentProfileImprovementSuiteOptions, q as partitionRunsByAuthoringModel, r as FeedbackTableMeta, rt as EvalReportingSuiteResult, s as fromFeedbackTable, st as RunRecordRejection, t as FromOtelSpansOptions, tt as EvalReportingSuiteInput, u as CodeAgentStoreRejections, ut as AgentProfileImprovementExperimentRun, v as CodeAgentSessionMetrics, vt as sealAgentProfileImprovementTask, w as fromPiSession, wt as PairedMeasurement, x as fromCodexSession, xt as CandidateExperimentRun, y as ParsedCodeAgentJsonl, yt as verifyAgentProfileImprovementExperimentComparison, z as AgentTraceConversation } from "../index-
|
|
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-DblGedQk.js";
|
|
11
|
+
import { $ as diffRunBaselineToWinner, A as CodeAgentSessionActionStatus, At as measuredComparisonFromCandidateExperiment, B as AgentTraceFile, C as fromOpenCodeSession, Ct as EvaluatePairedMeasurementsOptions, D as streamCodeAgentJsonlFile, Dt as RunCandidateExperimentOptions, E as parseCodeAgentJsonlFile, Et as PairedMeasurementEvaluation, F as CodeAgentSessionTerminalStatus, Ft as verifyCandidateExperiment, G as PartitionByAuthoringModelResult, H as AgentTraceRange, I as observeCodeAgentSession, It as verifyCandidateExperimentComparison, J as EvalCellScoreDelta, K as parseAgentTrace, L as AgentTraceContributor, M as CodeAgentSessionExecutionReceipt, Mt as sealCandidateBenchmarkSuite, N as CodeAgentSessionObservation, Nt as sealCandidateBenchmarkTask, O as CodeAgentSessionAction, Ot as SealCandidateBenchmarkSuiteOptions, P as CodeAgentSessionSource, Pt as sealCandidateExperiment, Q as diffGenerations, R as AgentTraceContributorType, S as fromKimiCodeSession, St as CompareCandidateExperimentOptions, T as parseCodeAgentJsonl, Tt as PairedMeasurementAdapter, U as AgentTraceRecord, V as AgentTraceIndex, W as AuthoringProvenance, X as EvalGenerationDiff, Y as EvalDimensionDelta, Z as EvalRunDiff, _ as CodeAgentSessionIntakeResult, _t as sealAgentProfileImprovementSuite, a as FromFeedbackTableOptions, at as FromRunRecordDirOptions, b as fromClaudeCodeSession, bt as CandidateExperimentExecutionInput, c as CodeAgentStoreObservation, ct as fromRunRecordDir, d as CodeAgentStoreScope, dt as CompareAgentProfileImprovementExperimentOptions, et as diffRuns, f as CodeAgentStoreSession, ft as RunAgentProfileImprovementExperimentOptions, g as CodeAgentSessionIntakeOptions, gt as sealAgentProfileImprovementExperiment, h as CodeAgentSessionDiagnostic, ht as runAgentProfileImprovementExperiment, i as FeedbackTableRow, it as evalReportingSuite, j as CodeAgentSessionActionSurface, jt as runCandidateExperiment, k as CodeAgentSessionActionKind, kt as evaluatePairedMeasurements, l as CodeAgentStoreRejection, lt as AgentProfileImprovementExperimentExecutionInput, m as CodeAgentJsonlLine, mt as measuredComparisonFromAgentProfileImprovementExperiment, n as fromOtelSpans, nt as EvalReportingSuiteOptions, o as FromFeedbackTableResult, ot as FromRunRecordDirResult, p as observeCodeAgentStore, pt as SealAgentProfileImprovementSuiteOptions, q as partitionRunsByAuthoringModel, r as FeedbackTableMeta, rt as EvalReportingSuiteResult, s as fromFeedbackTable, st as RunRecordRejection, t as FromOtelSpansOptions, tt as EvalReportingSuiteInput, u as CodeAgentStoreRejections, ut as AgentProfileImprovementExperimentRun, v as CodeAgentSessionMetrics, vt as sealAgentProfileImprovementTask, w as fromPiSession, wt as PairedMeasurement, x as fromCodexSession, xt as CandidateExperimentRun, y as ParsedCodeAgentJsonl, yt as verifyAgentProfileImprovementExperimentComparison, z as AgentTraceConversation } from "../index-CWoIJHmy.js";
|
|
12
12
|
import { n as buildDefaultAnalystRegistry, t as DefaultAnalystRegistryOptions } from "../default-registry-B5HrwrPM.js";
|
|
13
13
|
import { a as summarizeExecution, i as analyzeRuns, n as ExecutionReport, r as SummarizeExecutionOptions, t as AnalyzeRunsOptions } from "../analyze-runs-BvK4-wSs.js";
|
|
14
14
|
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 EvalCellScoreDelta, type EvalDimensionDelta, type EvalGenerationDiff, type EvalReportingSuiteInput, type EvalReportingSuiteOptions, type EvalReportingSuiteResult, type EvalRunDiff, 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, diffGenerations, diffRunBaselineToWinner, diffRuns, 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
|
@@ -4,19 +4,19 @@ import { t as decidePairedPromotion } from "../paired-promotion-decision-6cn3bLc
|
|
|
4
4
|
import { a as heldoutSignificance } from "../statistical-heldout-GcLIPxk4.js";
|
|
5
5
|
import { n as summarizeExecution, t as analyzeRuns } from "../analyze-runs-SCSWYpy0.js";
|
|
6
6
|
import { a as parseRunRecordSafe } from "../run-record-BRlM99rX.js";
|
|
7
|
-
import { Y as defaultProductionGate, a as transientDispatchFailure, at as runEval, c as compareOptimizationMethods, h as runImprovementLoop, ot as runCampaign, t as llmJudge } from "../llm-judge-
|
|
7
|
+
import { Y as defaultProductionGate, a as transientDispatchFailure, at as runEval, c as compareOptimizationMethods, h as runImprovementLoop, ot as runCampaign, t as llmJudge } from "../llm-judge-BnxAv7ed.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-
|
|
11
|
-
import {
|
|
12
|
-
import { C as inMemoryCampaignStorage, S as fsCampaignStorage } from "../external-optimizer-subprocess-
|
|
13
|
-
import { n as SelfImproveRunError, r as selfImprove, t as defineAgentEval } from "../define-agent-eval-
|
|
10
|
+
import { Q as campaignSplitDigest } from "../campaign-evidence-D40-LHIL.js";
|
|
11
|
+
import { m as mapConcurrentRange } from "../journal-c3qY0SDP.js";
|
|
12
|
+
import { C as inMemoryCampaignStorage, S as fsCampaignStorage } from "../external-optimizer-subprocess-kbcPu5po.js";
|
|
13
|
+
import { n as SelfImproveRunError, r as selfImprove, t as defineAgentEval } from "../define-agent-eval-DPizhHfy.js";
|
|
14
14
|
import { t as buildDefaultAnalystRegistry } from "../default-registry-16I-Bxlf.js";
|
|
15
15
|
import { t as extractUsage } from "../extract-usage-BrQ8mCLX.js";
|
|
16
16
|
import { i as makeProposalFinding } from "../types-CW5b90JH.js";
|
|
17
|
-
import { t as createChatClient } from "../chat-client-
|
|
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-
|
|
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-l2vDBtKp.js";
|
|
20
20
|
import { n as paretoPolicy, r as paretoSignificanceGate, t as buildEvidenceVector } from "../promotion-policy-CfMNUro2.js";
|
|
21
21
|
import { t as fromOtelSpans } from "../otel-spans-CQY1pNiN.js";
|
|
22
22
|
import { createHash } from "node:crypto";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { s as ValidationError } from "./errors-Dngq5h35.js";
|
|
2
2
|
import { t as analyzeRuns } from "./analyze-runs-SCSWYpy0.js";
|
|
3
3
|
import { i as modelHasSnapshot } from "./run-record-BRlM99rX.js";
|
|
4
|
-
import { J as captureJudge, K as runFinalComparison, Y as defaultProductionGate, at as runEval, ct as resolveRunDir, d as combineComparisonCosts, f as costFromLedgerSummary, h as runImprovementLoop, it as reserveFinalEvidence, nt as captureFinalEvidencePolicy, q as openAutoPr, rt as evaluationUnitMap, tt as assertIndependentEvaluationSplit, u as executeOptimizationMethod, w as assertSearchHistoryAdmissionOptions } from "./llm-judge-
|
|
4
|
+
import { J as captureJudge, K as runFinalComparison, Y as defaultProductionGate, at as runEval, ct as resolveRunDir, d as combineComparisonCosts, f as costFromLedgerSummary, h as runImprovementLoop, it as reserveFinalEvidence, nt as captureFinalEvidencePolicy, q as openAutoPr, rt as evaluationUnitMap, tt as assertIndependentEvaluationSplit, u as executeOptimizationMethod, w as assertSearchHistoryAdmissionOptions } from "./llm-judge-BnxAv7ed.js";
|
|
5
5
|
import { a as campaignCellToRunRecord, i as campaignCellTaskScore, n as campaignCellExecutionEvidence, r as campaignCellJudgeDimensions } from "./run-record-DnMFyg_g.js";
|
|
6
|
-
import { B as surfaceContentHash, H as surfaceHash, N as defineEvaluationClaim, Q as campaignSplitDigest, T as pairedCampaignComposites, V as surfaceDispatchRef, f as campaignMeasurementDigest, h as loopProvenanceArgsFromResult, k as powerPreflight, m as emitLoopProvenance, p as canonicalDigest, t as createCampaignEvidenceReceipt } from "./campaign-evidence-
|
|
7
|
-
import { C as inMemoryCampaignStorage, S as fsCampaignStorage, x as createRunCostLedger } from "./external-optimizer-subprocess-
|
|
6
|
+
import { B as surfaceContentHash, H as surfaceHash, N as defineEvaluationClaim, Q as campaignSplitDigest, T as pairedCampaignComposites, V as surfaceDispatchRef, f as campaignMeasurementDigest, h as loopProvenanceArgsFromResult, k as powerPreflight, m as emitLoopProvenance, p as canonicalDigest, t as createCampaignEvidenceReceipt } from "./campaign-evidence-D40-LHIL.js";
|
|
7
|
+
import { C as inMemoryCampaignStorage, S as fsCampaignStorage, x as createRunCostLedger } from "./external-optimizer-subprocess-kbcPu5po.js";
|
|
8
8
|
import { t as createHostedClient } from "./client-QwJpsNYU.js";
|
|
9
9
|
//#region src/contract/self-improve-reporting.ts
|
|
10
10
|
function pairedCompositeSummary(baseline, winner, independentUnitByScenarioId) {
|
|
@@ -810,4 +810,4 @@ function requirePositiveInteger(value, field) {
|
|
|
810
810
|
//#endregion
|
|
811
811
|
export { SelfImproveRunError as n, selfImprove as r, defineAgentEval as t };
|
|
812
812
|
|
|
813
|
-
//# sourceMappingURL=define-agent-eval-
|
|
813
|
+
//# sourceMappingURL=define-agent-eval-DPizhHfy.js.map
|