@tangle-network/agent-eval 0.177.0 → 0.179.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 +9 -0
- package/dist/adapters/http.d.ts +2 -2
- package/dist/{agent-profile-_xPxqVJt.d.ts → agent-profile-B7yErX0q.d.ts} +3 -3
- package/dist/{agent-profile-_xPxqVJt.d.ts.map → agent-profile-B7yErX0q.d.ts.map} +1 -1
- package/dist/analyst/index.d.ts +10 -10
- package/dist/analyst/index.js +5 -5
- package/dist/{benchmark-command-BrsZhMSk.js → benchmark-command-CY6Dg5t5.js} +6 -6
- package/dist/{benchmark-command-BrsZhMSk.js.map → benchmark-command-CY6Dg5t5.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 +3 -3
- package/dist/{campaign-CIn-ErlJ.js → campaign-BGEurASO.js} +8 -4
- package/dist/campaign-BGEurASO.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/{client-vyYQg3bm.d.ts → client-CuQgX33c.d.ts} +2 -2
- package/dist/{client-vyYQg3bm.d.ts.map → client-CuQgX33c.d.ts.map} +1 -1
- package/dist/contract/index.d.ts +9 -9
- package/dist/contract/index.js +6 -6
- package/dist/{default-registry-DBqVI4pq.js → default-registry-BryMEmr8.js} +2 -2
- package/dist/{default-registry-DBqVI4pq.js.map → default-registry-BryMEmr8.js.map} +1 -1
- package/dist/{default-registry-FfNzaUHV.d.ts → default-registry-IGDE9XIC.d.ts} +6 -6
- package/dist/{default-registry-FfNzaUHV.d.ts.map → default-registry-IGDE9XIC.d.ts.map} +1 -1
- package/dist/{define-agent-eval-CqmlXUfQ.d.ts → define-agent-eval-Cx4Ls9ta.d.ts} +6 -6
- package/dist/{define-agent-eval-CqmlXUfQ.d.ts.map → define-agent-eval-Cx4Ls9ta.d.ts.map} +1 -1
- package/dist/{define-agent-eval-CJG7LD9M.js → define-agent-eval-Dzidv34q.js} +2 -2
- package/dist/{define-agent-eval-CJG7LD9M.js.map → define-agent-eval-Dzidv34q.js.map} +1 -1
- package/dist/{dspy-rlm-engine-DqjER2sV.js → dspy-rlm-engine-xKiWmj_G.js} +2 -2
- package/dist/{dspy-rlm-engine-DqjER2sV.js.map → dspy-rlm-engine-xKiWmj_G.js.map} +1 -1
- package/dist/{engine-CvW_I72-.d.ts → engine-CX8ReXkn.d.ts} +5 -5
- package/dist/{engine-CvW_I72-.d.ts.map → engine-CX8ReXkn.d.ts.map} +1 -1
- package/dist/{exact-types-BKOEILRP.d.ts → exact-types-B7LC1EyX.d.ts} +2 -2
- package/dist/{exact-types-BKOEILRP.d.ts.map → exact-types-B7LC1EyX.d.ts.map} +1 -1
- package/dist/experiment/index.d.ts +2 -2
- package/dist/{experiment-tracker-CNwqCZFD.d.ts → experiment-tracker-B3TiF5-u.d.ts} +2 -2
- package/dist/{experiment-tracker-CNwqCZFD.d.ts.map → experiment-tracker-B3TiF5-u.d.ts.map} +1 -1
- package/dist/{feedback-trajectory-CMnv_uYs.d.ts → feedback-trajectory-eHWNv5Aj.d.ts} +3 -3
- package/dist/{feedback-trajectory-CMnv_uYs.d.ts.map → feedback-trajectory-eHWNv5Aj.d.ts.map} +1 -1
- package/dist/hosted/index.d.ts +1 -1
- package/dist/{index-CtGf6e6X.d.ts → index-BxWvILU8.d.ts} +10 -6
- package/dist/index-BxWvILU8.d.ts.map +1 -0
- package/dist/{index-BAAiSF3_.d.ts → index-CbLmrWCa.d.ts} +6 -6
- package/dist/{index-BAAiSF3_.d.ts.map → index-CbLmrWCa.d.ts.map} +1 -1
- package/dist/{index-DuaNwvse.d.ts → index-DxNYmx4a.d.ts} +9 -9
- package/dist/{index-DuaNwvse.d.ts.map → index-DxNYmx4a.d.ts.map} +1 -1
- package/dist/index.d.ts +15 -15
- package/dist/index.js +9 -9
- package/dist/{kind-factory-BLvL-E44.js → kind-factory-D5HOW3R0.js} +119 -15
- package/dist/kind-factory-D5HOW3R0.js.map +1 -0
- package/dist/{llm-judge-CV80fkYA.js → llm-judge-v80Kmu9g.js} +4 -3
- package/dist/{llm-judge-CV80fkYA.js.map → llm-judge-v80Kmu9g.js.map} +1 -1
- package/dist/{matrix-CJtXz1ky.d.ts → matrix-DeMmnWrP.d.ts} +2 -2
- package/dist/{matrix-CJtXz1ky.d.ts.map → matrix-DeMmnWrP.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/{produced-state-CQFi465p.js → produced-state-Cv0kJJuP.js} +2 -2
- package/dist/{produced-state-CQFi465p.js.map → produced-state-Cv0kJJuP.js.map} +1 -1
- package/dist/{registry-7pOUBrtX.d.ts → registry-ByVld1-5.d.ts} +3 -3
- package/dist/{registry-7pOUBrtX.d.ts.map → registry-ByVld1-5.d.ts.map} +1 -1
- package/dist/rl.d.ts +1 -1
- package/dist/{semantic-concept-judge-Dw-f7TEs.js → semantic-concept-judge-Bi6_iGqg.js} +3 -3
- package/dist/{semantic-concept-judge-Dw-f7TEs.js.map → semantic-concept-judge-Bi6_iGqg.js.map} +1 -1
- package/dist/{skillopt-optimization-method-D0o2c2yM.js → skillopt-optimization-method-C3oYul8v.js} +2 -2
- package/dist/{skillopt-optimization-method-D0o2c2yM.js.map → skillopt-optimization-method-C3oYul8v.js.map} +1 -1
- package/dist/{statistical-heldout-Z9NROFFS.d.ts → statistical-heldout-0La5ZTlv.d.ts} +2 -2
- package/dist/{statistical-heldout-Z9NROFFS.d.ts.map → statistical-heldout-0La5ZTlv.d.ts.map} +1 -1
- package/dist/{store-otlp-DV_H2HDu.js → store-otlp-DWGUwlyj.js} +7 -2
- package/dist/store-otlp-DWGUwlyj.js.map +1 -0
- package/dist/{store-tool-spans-4o55ABER.d.ts → store-tool-spans-4J1EDElP.d.ts} +7 -4
- package/dist/{store-tool-spans-4o55ABER.d.ts.map → store-tool-spans-4J1EDElP.d.ts.map} +1 -1
- package/dist/{store-tool-spans-B9tjys_h.js → store-tool-spans-ceJoiUgS.js} +3 -3
- package/dist/{store-tool-spans-B9tjys_h.js.map → store-tool-spans-ceJoiUgS.js.map} +1 -1
- package/dist/{task-failure-attributes-CUy9mkIY.js → task-failure-attributes-B072KO_n.js} +2 -2
- package/dist/{task-failure-attributes-CUy9mkIY.js.map → task-failure-attributes-B072KO_n.js.map} +1 -1
- package/dist/{tool-groups-DAe1t6zb.d.ts → tool-groups-2QA0S7dK.d.ts} +4 -4
- package/dist/tool-groups-2QA0S7dK.d.ts.map +1 -0
- package/dist/trace-repair/index.d.ts +1 -1
- package/dist/traces.d.ts +4 -4
- package/dist/traces.js +4 -4
- package/dist/{types-Dd1ejaeI.d.ts → types-BmlkCrg0.d.ts} +2 -2
- package/dist/{types-Dd1ejaeI.d.ts.map → types-BmlkCrg0.d.ts.map} +1 -1
- package/dist/{types-BJz2CPTM.d.ts → types-C34V4Vto.d.ts} +2 -2
- package/dist/{types-BJz2CPTM.d.ts.map → types-C34V4Vto.d.ts.map} +1 -1
- package/dist/{types-DN2WdT5S.d.ts → types-DzuaM493.d.ts} +40 -2
- package/dist/types-DzuaM493.d.ts.map +1 -0
- package/dist/wire/index.d.ts +1 -1
- package/docs/campaign-proposers.md +7 -0
- package/docs/trace-analysis.md +45 -0
- package/package.json +1 -1
- package/dist/campaign-CIn-ErlJ.js.map +0 -1
- package/dist/index-CtGf6e6X.d.ts.map +0 -1
- package/dist/kind-factory-BLvL-E44.js.map +0 -1
- package/dist/store-otlp-DV_H2HDu.js.map +0 -1
- package/dist/tool-groups-DAe1t6zb.d.ts.map +0 -1
- package/dist/types-DN2WdT5S.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveModelPricing } from "./metrics-Qv-cpptD.js";
|
|
2
2
|
import { _ as removeCredentialEnvironment, a as closeServer, c as waitForActiveHandlers, d as assertExternalOptimizerModelBudget, i as startExternalOptimizerModelProxy, o as listenLocal, r as runWithCleanup, s as sendJsonIfOpen, t as runExternalOptimizerProcess, v as resolveExternalOptimizerCallbackLimits, y as resolveExternalOptimizerProcessLimits } from "./external-optimizer-subprocess-q3VzlGAO.js";
|
|
3
|
-
import {
|
|
3
|
+
import { F as coerceJson, M as RawAnalystFindingSchema, V as parseFindingSubject } from "./kind-factory-D5HOW3R0.js";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
/**
|
|
@@ -462,4 +462,4 @@ function isRecord(value) {
|
|
|
462
462
|
//#endregion
|
|
463
463
|
export { decodeRawFindingArray as n, createDspyRlmTraceEngine as t };
|
|
464
464
|
|
|
465
|
-
//# sourceMappingURL=dspy-rlm-engine-
|
|
465
|
+
//# sourceMappingURL=dspy-rlm-engine-xKiWmj_G.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dspy-rlm-engine-DqjER2sV.js","names":["isRecord"],"sources":["../src/analyst/finding-codec.ts","../src/analyst/trace-tool-callback.ts","../src/analyst/dspy-rlm-engine.ts"],"sourcesContent":["/**\n * The raw-finding wire contract — one decoder for both sides of the process\n * boundary.\n *\n * A finding array crosses a process boundary twice: an optimizer bridge writes\n * it in Python, TypeScript reads it back. Two decoders written independently\n * accept different shapes, so Python could report a completed investigation\n * whose rows TypeScript then dropped — the paid work disappearing between two\n * \"successes\". This module is the TypeScript half; `finding_contract.json`\n * carries the same rules to the Python half, generated from the schema here.\n *\n * Decoding never invents an empty result. A value that is not an array of rows\n * fails with the exact type it was, and a malformed row is reported with its\n * index and path while its valid siblings survive.\n */\n\nimport { type RawAnalystFinding, RawAnalystFindingSchema } from './finding-signature'\nimport { parseFindingSubject } from './finding-subject'\nimport { coerceJson } from './parse-tolerant'\n\n/**\n * Version of the wire contract both languages implement. Bump when the\n * accepted row shape changes; the Python package pins the same value, and the\n * emitted contract carries it so a mismatched pair is visible.\n */\nexport const FINDING_WIRE_CONTRACT_VERSION = 1\n\n/** Why one row was refused. Stable across languages: Python reports the same codes. */\nexport type FindingRejectionCode = 'not-an-object' | 'schema' | 'invalid-subject' | 'row-limit'\n\n/** A refused row, named precisely enough to repair or report. */\nexport interface RejectedFindingRow {\n /** Position in the submitted array. */\n readonly index: number\n /** Dotted path to the offending field, `''` for the row itself. */\n readonly path: string\n readonly code: FindingRejectionCode\n readonly message: string\n}\n\nexport interface DecodedFindingArray {\n readonly accepted: RawAnalystFinding[]\n readonly rejected: RejectedFindingRow[]\n /**\n * Set when the value was not a finding array at all — the array itself is\n * the failure, so `accepted` and `rejected` are both empty and a caller must\n * not read the result as \"no findings\".\n */\n readonly topLevelError?: string\n}\n\n/**\n * Rows past this count are refused rather than validated. A model that emits\n * thousands of rows has lost the plot, and the diagnostics for them would\n * dwarf the answer they came with.\n */\nexport const MAX_FINDING_ROWS = 500\n\n/**\n * Decode a submitted findings value into accepted rows plus per-row\n * diagnostics.\n *\n * Accepts an array of rows, or a string carrying one (a JSON array, possibly\n * fenced). Anything else — an object, a number, null, undefined — sets\n * `topLevelError` naming the type received: a caller that asked for findings\n * and got a number has a defect to report, not an empty result to record.\n */\nexport function decodeRawFindingArray(value: unknown): DecodedFindingArray {\n const rows = findingRows(value)\n if (typeof rows === 'string') return { accepted: [], rejected: [], topLevelError: rows }\n\n const accepted: RawAnalystFinding[] = []\n const rejected: RejectedFindingRow[] = []\n for (const [index, row] of rows.entries()) {\n if (index >= MAX_FINDING_ROWS) {\n rejected.push({\n index,\n path: '',\n code: 'row-limit',\n message: `findings array exceeds ${MAX_FINDING_ROWS} rows`,\n })\n continue\n }\n const decoded = decodeRow(row, index)\n if ('finding' in decoded) accepted.push(decoded.finding)\n else rejected.push(decoded.rejection)\n }\n return { accepted, rejected }\n}\n\nfunction decodeRow(\n row: unknown,\n index: number,\n): { finding: RawAnalystFinding } | { rejection: RejectedFindingRow } {\n if (row === null || typeof row !== 'object' || Array.isArray(row)) {\n return {\n rejection: {\n index,\n path: '',\n code: 'not-an-object',\n message: `finding row must be an object, received ${describe(row)}`,\n },\n }\n }\n const parsed = RawAnalystFindingSchema.safeParse(row)\n if (!parsed.success) {\n const issue = parsed.error.issues[0]\n const path = (issue?.path ?? []).join('.')\n // The schema refines `subject` against the grammar; name that refusal\n // separately so a repair turn can be told which rule the row broke.\n const code: FindingRejectionCode =\n path === 'subject' && parseFindingSubject((row as { subject?: string }).subject) === null\n ? 'invalid-subject'\n : 'schema'\n return {\n rejection: { index, path, code, message: issue?.message ?? 'row does not match the schema' },\n }\n }\n return { finding: parsed.data }\n}\n\n/**\n * Narrow a submitted value to candidate rows, or return the message naming why\n * it is not a findings array at all.\n */\nfunction findingRows(value: unknown): unknown[] | string {\n if (Array.isArray(value)) return value\n if (typeof value === 'string') {\n const parsed = coerceJson(value)\n if (parsed === undefined) {\n return 'findings must be a JSON array; the string received is not JSON'\n }\n if (Array.isArray(parsed)) return parsed\n const unwrapped = findingsProperty(parsed)\n if (unwrapped !== undefined) return unwrapped\n return `findings must be a JSON array, received ${describe(parsed)}`\n }\n const unwrapped = findingsProperty(value)\n if (unwrapped !== undefined) return unwrapped\n return `findings must be an array, received ${describe(value)}`\n}\n\n/** `{ findings: [...] }` is the one wrapper models emit often enough to unwrap. */\nfunction findingsProperty(value: unknown): unknown[] | undefined {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return undefined\n const inner = (value as Record<string, unknown>).findings\n return Array.isArray(inner) ? inner : undefined\n}\n\nfunction describe(value: unknown): string {\n if (value === null) return 'null'\n if (Array.isArray(value)) return 'an array'\n return `a ${typeof value}`\n}\n\n/** One line per refused row, for a repair prompt or an error message. */\nexport function describeRejectedRows(rejected: readonly RejectedFindingRow[]): string {\n return rejected\n .map((row) => `row ${row.index}${row.path ? ` field '${row.path}'` : ''}: ${row.message}`)\n .join('\\n')\n}\n","import { randomBytes } from 'node:crypto'\nimport { createServer, type IncomingMessage, type ServerResponse } from 'node:http'\nimport {\n type ExternalOptimizerCallbackLimits,\n resolveExternalOptimizerCallbackLimits,\n} from '../campaign/external-optimizer-contracts'\nimport {\n closeServer,\n listenLocal,\n sendJsonIfOpen,\n waitForActiveHandlers,\n} from '../campaign/external-optimizer-http'\nimport type { TraceAnalysisToolDescriptor } from '../trace-analyst/tools'\n\nexport interface TraceToolCallback {\n url: string\n token: string\n calls: () => number\n close: () => Promise<void>\n}\n\nexport type TraceToolCallbackLimits = ExternalOptimizerCallbackLimits\n\n/** Expose one bounded trace-tool set only on an authenticated loopback socket. */\nexport async function startTraceToolCallback(args: {\n tools: readonly TraceAnalysisToolDescriptor[]\n maxCalls: number\n /** Trace-tool request/response byte limits. Omitted fields use finite defaults. */\n limits?: Partial<TraceToolCallbackLimits>\n signal?: AbortSignal\n}): Promise<TraceToolCallback> {\n if (!Number.isSafeInteger(args.maxCalls) || args.maxCalls <= 0) {\n throw new TypeError('trace tool callback maxCalls must be a positive safe integer')\n }\n const limits = resolveExternalOptimizerCallbackLimits(args.limits, 'trace tool callback limits')\n args.signal?.throwIfAborted()\n const byName = new Map(args.tools.map((tool) => [tool.name, tool]))\n if (byName.size !== args.tools.length) {\n throw new Error('trace tool callback received duplicate tool names')\n }\n\n const token = randomBytes(32).toString('hex')\n let calls = 0\n let accepting = true\n let closePromise: Promise<void> | undefined\n const activeControllers = new Set<AbortController>()\n const activeHandlers = new Set<Promise<void>>()\n const server = createServer((request, response) => {\n if (!accepting) {\n sendJsonIfOpen(response, 503, { error: 'trace tool callback is closing' })\n return\n }\n const controller = new AbortController()\n const abortRequest = (): void => {\n request.destroy()\n response.destroy()\n }\n activeControllers.add(controller)\n controller.signal.addEventListener('abort', abortRequest, { once: true })\n\n let handler!: Promise<void>\n handler = handleRequest(request, response, controller.signal).finally(() => {\n controller.signal.removeEventListener('abort', abortRequest)\n activeControllers.delete(controller)\n activeHandlers.delete(handler)\n })\n activeHandlers.add(handler)\n void handler.catch(() => undefined)\n })\n const port = await listenLocal(server)\n const close = (): Promise<void> => {\n closePromise ??= closeCallback()\n return closePromise\n }\n const onAbort = (): void => {\n void close().catch(() => undefined)\n }\n args.signal?.addEventListener('abort', onAbort, { once: true })\n if (args.signal?.aborted) onAbort()\n\n return {\n url: `http://127.0.0.1:${port}/call`,\n token,\n calls: () => calls,\n close,\n }\n\n async function handleRequest(\n request: IncomingMessage,\n response: ServerResponse,\n signal: AbortSignal,\n ): Promise<void> {\n try {\n if (request.method !== 'POST' || request.url !== '/call') {\n sendJsonIfOpen(response, 404, { error: 'not found' })\n return\n }\n if (request.headers.authorization !== `Bearer ${token}`) {\n sendJsonIfOpen(response, 401, { error: 'unauthorized' })\n return\n }\n if (calls >= args.maxCalls) {\n sendJsonIfOpen(response, 429, { error: 'trace tool call limit reached' })\n return\n }\n const body = await readJson(request, limits.maxRequestBytes)\n if (!isRecord(body) || typeof body.name !== 'string' || !('args' in body)) {\n sendJsonIfOpen(response, 400, { error: 'name and args are required' })\n return\n }\n const tool = byName.get(body.name)\n if (!tool) {\n sendJsonIfOpen(response, 404, { error: `unknown trace tool '${body.name}'` })\n return\n }\n calls += 1\n const result = await tool.handler(body.args, { signal })\n const encoded = JSON.stringify({ result })\n if (Buffer.byteLength(encoded) > limits.maxResponseBytes) {\n sendJsonIfOpen(response, 413, { error: 'trace tool response too large' })\n return\n }\n response.writeHead(200, {\n 'content-type': 'application/json; charset=utf-8',\n 'content-length': String(Buffer.byteLength(encoded)),\n })\n response.end(encoded)\n } catch (error) {\n sendJsonIfOpen(response, signal.aborted ? 499 : 400, {\n error: error instanceof Error ? error.message : String(error),\n })\n }\n }\n\n async function closeCallback(): Promise<void> {\n args.signal?.removeEventListener('abort', onAbort)\n accepting = false\n const closingServer = closeServer(server)\n server.closeIdleConnections?.()\n for (const controller of activeControllers) controller.abort()\n const [serverResult] = await Promise.allSettled([\n closingServer,\n waitForActiveHandlers(activeHandlers),\n ])\n if (activeControllers.size !== 0 || activeHandlers.size !== 0) {\n throw new Error('trace tool callback closed with active requests')\n }\n if (serverResult?.status === 'rejected') throw serverResult.reason\n }\n}\n\nfunction readJson(request: IncomingMessage, maxRequestBytes: number): Promise<unknown> {\n return new Promise((resolve, reject) => {\n let size = 0\n const chunks: Buffer[] = []\n request.on('data', (chunk: Buffer) => {\n size += chunk.length\n if (size > maxRequestBytes) {\n reject(new Error('trace tool request too large'))\n request.destroy()\n return\n }\n chunks.push(chunk)\n })\n request.on('error', reject)\n request.on('end', () => {\n try {\n resolve(JSON.parse(Buffer.concat(chunks).toString('utf8')))\n } catch (error) {\n reject(error)\n }\n })\n })\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n","import {\n assertExternalOptimizerModelBudget,\n type ExternalOptimizerModelCall,\n type ExternalOptimizerModelExecutionObservation,\n type ExternalOptimizerModelProxy,\n type ExternalOptimizerRunnerCommand,\n removeCredentialEnvironment,\n resolveExternalOptimizerCallbackLimits,\n resolveExternalOptimizerProcessLimits,\n} from '../campaign/external-optimizer-contracts'\nimport { startExternalOptimizerModelProxy } from '../campaign/external-optimizer-model-proxy'\nimport { runWithCleanup } from '../campaign/external-optimizer-resources'\nimport { runExternalOptimizerProcess } from '../campaign/external-optimizer-subprocess'\nimport type { CustomTokenPricing } from '../cost-ledger'\nimport { resolveModelPricing } from '../metrics'\nimport {\n DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS,\n type TraceAnalysisEngine,\n type TraceAnalysisEngineResult,\n} from './engine'\nimport { decodeRawFindingArray } from './finding-codec'\nimport { startTraceToolCallback, type TraceToolCallbackLimits } from './trace-tool-callback'\n\nconst DEFAULT_TIMEOUT_MS = 10 * 60_000\nconst DEFAULT_MAX_COST_USD = 1\nconst DEFAULT_MAX_MODEL_REQUEST_BYTES = 16 * 1024 * 1024\nconst DEFAULT_MAX_MODEL_RESPONSE_BYTES = 4 * 1024 * 1024\nconst DEFAULT_TRACE_TOOL_TIMEOUT_MS = 60_000\nconst MAX_TIMER_DELAY_MS = 2_147_483_647\nconst BRIDGE_MODULE = 'agent_eval_rpc.dspy_rlm_bridge'\n/** Bumped whenever this engine's execution behavior changes. */\nconst DSPY_RLM_ENGINE_VERSION = '1.0.0'\n\nexport interface DspyRlmTraceEngineOptions {\n /** Caller-owned execution path. Agent Eval never receives provider credentials. */\n call: ExternalOptimizerModelCall\n /** Stable public identity for the caller-owned path, such as an AgentProfile digest. */\n callRef: string\n /** Persist the finite execution record returned for every admitted call. */\n recordExecution: (observation: ExternalOptimizerModelExecutionObservation) => void\n model: string\n /** Exact provider rates. Required when the model is absent from the pricing table. */\n pricing?: CustomTokenPricing\n /** Maximum provider spend for one investigation. Default: 1 USD. */\n maxCostUsd?: number\n /** Controller response cap. Default: {@link DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS}. */\n maxOutputTokens?: number\n /**\n * Thinking tokens one controller turn may bill on top of its completion.\n * A reasoning model bills these beyond `maxOutputTokens`, so the cost\n * reservation must cover them. Default: four times the completion cap.\n */\n maxReasoningTokens?: number\n /** Maximum caller-owned model invocations. Default derives from the analysis limits. */\n maxModelRequests?: number\n /** Maximum model request bytes. Default: 16 MiB. */\n maxModelRequestBytes?: number\n /** Maximum model response bytes. Default: 4 MiB. */\n maxModelResponseBytes?: number\n /** Deadline for one caller-owned model invocation. Default: the whole analysis deadline. */\n modelRequestTimeoutMs?: number\n /** Trace-tool loopback request/response byte limits. */\n traceToolLimits?: Partial<TraceToolCallbackLimits>\n /** Deadline for one Python-to-Node trace-tool call. Default: 60 seconds. */\n traceToolTimeoutMs?: number\n /**\n * How the controller's reasoning and code fields are obtained.\n *\n * `tolerant` parses marker output strictly first, then recovers the fields\n * deterministically from prose plus a fenced code block — the shape coding\n * models naturally emit — at no extra model cost. `two-step` extracts with a\n * second call per turn. `chat` accepts marker output only. Default:\n * `tolerant`.\n */\n controlAdapter?: 'chat' | 'two-step' | 'tolerant'\n /** Python command used to load agent-eval-rpc[dspy]. Default: python. */\n runner?: ExternalOptimizerRunnerCommand\n /** Whole investigation deadline. Default: 10 minutes. */\n timeoutMs?: number\n}\n\n/** Use the official DSPy RLM as a bounded recursive trace-analysis engine. */\nexport function createDspyRlmTraceEngine(options: DspyRlmTraceEngineOptions): TraceAnalysisEngine {\n assertOptions(options)\n const maxOutputTokens = options.maxOutputTokens ?? DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS\n if (!Number.isSafeInteger(maxOutputTokens) || maxOutputTokens <= 0) {\n throw new TypeError('DSPy RLM maxOutputTokens must be a positive safe integer')\n }\n const controlAdapter = options.controlAdapter ?? 'tolerant'\n const maxReasoningTokens = options.maxReasoningTokens ?? maxOutputTokens * 4\n if (!Number.isSafeInteger(maxReasoningTokens) || maxReasoningTokens < 0) {\n throw new TypeError('DSPy RLM maxReasoningTokens must be a non-negative safe integer')\n }\n const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS\n assertTimerDelay(timeoutMs, 'timeoutMs')\n const maxCostUsd = options.maxCostUsd ?? DEFAULT_MAX_COST_USD\n if (!Number.isFinite(maxCostUsd) || maxCostUsd <= 0) {\n throw new TypeError('DSPy RLM maxCostUsd must be positive and finite')\n }\n const pricing = options.pricing ?? pricingForModel(options.model)\n const maxModelRequestBytes = options.maxModelRequestBytes ?? DEFAULT_MAX_MODEL_REQUEST_BYTES\n const maxModelResponseBytes = options.maxModelResponseBytes ?? DEFAULT_MAX_MODEL_RESPONSE_BYTES\n const modelRequestTimeoutMs = options.modelRequestTimeoutMs ?? timeoutMs\n const traceToolTimeoutMs = options.traceToolTimeoutMs ?? DEFAULT_TRACE_TOOL_TIMEOUT_MS\n assertExternalOptimizerModelBudget(\n {\n maxCostUsd,\n maxRequests: options.maxModelRequests ?? 1,\n maxRequestBytes: maxModelRequestBytes,\n maxResponseBytes: maxModelResponseBytes,\n maxOutputTokensPerRequest: maxOutputTokens,\n maxReasoningTokensPerRequest: maxReasoningTokens,\n pricing,\n requestTimeoutMs: modelRequestTimeoutMs,\n },\n 'DSPy RLM model limits',\n )\n resolveExternalOptimizerCallbackLimits(options.traceToolLimits, 'DSPy RLM trace tool limits')\n assertTimerDelay(traceToolTimeoutMs, 'traceToolTimeoutMs')\n\n const runner = sanitizedRunner(options.runner)\n const processLimits = resolveExternalOptimizerProcessLimits(runner?.limits)\n return {\n id: 'dspy-rlm',\n description: 'Official DSPy RLM with bounded trace tools and metered model calls.',\n model: options.model,\n version: DSPY_RLM_ENGINE_VERSION,\n executionConfig: {\n bridge_module: BRIDGE_MODULE,\n call_ref: options.callRef,\n model: options.model,\n pricing: { ...pricing },\n max_cost_usd: maxCostUsd,\n max_output_tokens: maxOutputTokens,\n max_reasoning_tokens: maxReasoningTokens,\n control_adapter: controlAdapter,\n timeout_ms: timeoutMs,\n max_model_requests: options.maxModelRequests ?? null,\n max_request_bytes: maxModelRequestBytes,\n max_response_bytes: maxModelResponseBytes,\n model_request_timeout_ms: modelRequestTimeoutMs,\n trace_tool_limits: options.traceToolLimits ?? null,\n trace_tool_timeout_ms: traceToolTimeoutMs,\n process_limits: processLimits,\n runner: runner ? 'caller-supplied' : 'default',\n runner_command: runner?.command ?? null,\n },\n async analyze(request) {\n const callback = await startTraceToolCallback({\n tools: request.tools,\n maxCalls: request.limits.maxToolCalls,\n ...(options.traceToolLimits ? { limits: options.traceToolLimits } : {}),\n ...(request.signal ? { signal: request.signal } : {}),\n })\n let modelProxy: ExternalOptimizerModelProxy | undefined\n const modelExecutions: ExternalOptimizerModelExecutionObservation[] = []\n const result = await runWithCleanup({\n label: 'DSPy RLM trace-analysis resources',\n run: async () => {\n modelProxy = await startExternalOptimizerModelProxy({\n call: options.call,\n callRef: options.callRef,\n recordExecution: (observation) => {\n modelExecutions.push(structuredClone(observation))\n options.recordExecution(observation)\n },\n model: options.model,\n budget: {\n maxCostUsd,\n maxRequests: resolveMaxModelRequests(options.maxModelRequests, request.limits),\n maxRequestBytes: maxModelRequestBytes,\n maxResponseBytes: maxModelResponseBytes,\n maxOutputTokensPerRequest: maxOutputTokens,\n maxReasoningTokensPerRequest: maxReasoningTokens,\n requestTimeoutMs: modelRequestTimeoutMs,\n pricing,\n },\n costLedger: request.costLedger,\n channel: 'analyst',\n phase: request.costPhase,\n actor: request.analystId,\n ...(request.costTags ? { tags: request.costTags } : {}),\n ...(request.signal ? { signal: request.signal } : {}),\n })\n request.log?.('trace analyst engine started', {\n engine: 'dspy-rlm',\n model: options.model,\n tools: request.tools.map((tool) => tool.name),\n limits: request.limits,\n })\n const raw = await runExternalOptimizerProcess<unknown>({\n label: 'DSPy RLM trace analysis',\n tempPrefix: 'agent-eval-dspy-rlm-',\n module: BRIDGE_MODULE,\n input: {\n operation: 'analyze',\n question: request.question,\n instructions: request.instructions,\n modelProxy: {\n baseUrl: modelProxy.baseUrl,\n apiKey: modelProxy.apiKey,\n model: options.model,\n maxOutputTokens,\n },\n toolCallback: {\n url: callback.url,\n token: callback.token,\n timeoutMs: traceToolTimeoutMs,\n },\n toolSpecs: request.tools.map(({ name, description, parameters }) => ({\n name,\n description,\n parameters,\n })),\n controlAdapter,\n limits: {\n maxIterations: request.limits.maxIterations,\n maxLlmCalls: request.limits.maxLlmCalls,\n maxOutputChars: request.limits.maxOutputChars,\n },\n // Omitted entirely when the caller supplied none, so a request\n // without structured inputs sends the payload it always sent.\n ...(request.taskInputs ? { taskInputs: request.taskInputs } : {}),\n },\n ...(runner ? { runner } : {}),\n additionalArgs: ['--max-input-bytes', String(processLimits.maxInputBytes)],\n timeoutMs,\n ...(request.signal ? { signal: request.signal } : {}),\n })\n const parsed = parseBridgeOutput(raw, (index, reason) => {\n request.log?.('finding rejected: bridge row failed schema validation', {\n engine: 'dspy-rlm',\n index,\n reason,\n })\n })\n const successfulCompletions = modelProxy.successfulCompletions()\n const requestAttempts = modelProxy.requestAttempts()\n if (parsed.modelCalls !== successfulCompletions) {\n throw new Error(\n `DSPy RLM reported ${parsed.modelCalls} model calls, but the provider proxy recorded ${successfulCompletions}`,\n )\n }\n modelProxy.assertExecutionComplete()\n return {\n ...parsed,\n toolCalls: callback.calls(),\n runtime: {\n ...parsed.runtime,\n modelRequestAttempts: requestAttempts,\n modelSuccessfulCompletions: successfulCompletions,\n modelExecutions,\n },\n } satisfies TraceAnalysisEngineResult\n },\n cleanup: async () => {\n const results = await Promise.allSettled([\n ...(modelProxy ? [modelProxy.close()] : []),\n callback.close(),\n ])\n const errors = results.flatMap((entry) =>\n entry.status === 'rejected' ? [entry.reason] : [],\n )\n if (errors.length > 0) {\n throw new AggregateError(errors, 'DSPy RLM resource cleanup failed')\n }\n },\n })\n request.log?.('trace analyst engine completed', {\n engine: 'dspy-rlm',\n model_calls: result.modelCalls,\n model_request_attempts: result.runtime.modelRequestAttempts,\n tool_calls: result.toolCalls,\n findings: result.findings.length,\n })\n return result\n },\n }\n}\n\nfunction parseBridgeOutput(\n value: unknown,\n onRejectedFinding: (index: number, reason: string) => void,\n): Omit<TraceAnalysisEngineResult, 'toolCalls'> {\n if (!isRecord(value)) throw new Error('DSPy RLM bridge output must be an object')\n if (typeof value.answer !== 'string' || !value.answer.trim()) {\n throw new Error('DSPy RLM bridge returned no answer')\n }\n // Findings are model output: one malformed row is model noise, not a bridge\n // fault, and the rest of the paid investigation must survive it. The codec\n // is the same decoder the Python side runs, so a row this bridge accepts is\n // a row the optimizer could report, and vice versa.\n const decoded = decodeRawFindingArray(value.findings)\n if (decoded.topLevelError !== undefined) {\n throw new Error(`DSPy RLM bridge findings must be an array: ${decoded.topLevelError}`)\n }\n const findings = decoded.accepted\n const rejectedFindings = decoded.rejected.length\n for (const rejection of decoded.rejected) {\n onRejectedFinding(\n rejection.index,\n `${rejection.code}${rejection.path ? ` at ${rejection.path}` : ''}: ${rejection.message}`,\n )\n }\n if (!Array.isArray(value.trajectory)) {\n throw new Error('DSPy RLM bridge trajectory must be an array')\n }\n if (!Number.isSafeInteger(value.modelCalls) || (value.modelCalls as number) <= 0) {\n throw new Error('DSPy RLM bridge modelCalls must be a positive safe integer')\n }\n if (!isRecord(value.runtime)) {\n throw new Error('DSPy RLM bridge runtime must be an object')\n }\n return {\n answer: value.answer,\n findings,\n trajectory: value.trajectory,\n modelCalls: value.modelCalls as number,\n runtime: { ...value.runtime, rejectedFindings },\n }\n}\n\nfunction assertOptions(options: DspyRlmTraceEngineOptions): void {\n for (const [name, value] of [\n ['callRef', options.callRef],\n ['model', options.model],\n ] as const) {\n if (typeof value !== 'string' || !value.trim() || value !== value.trim()) {\n throw new TypeError(`DSPy RLM ${name} must be a trimmed non-empty string`)\n }\n }\n if (typeof options.call !== 'function') {\n throw new TypeError('DSPy RLM call must be a function')\n }\n if (typeof options.recordExecution !== 'function') {\n throw new TypeError('DSPy RLM recordExecution must be a function')\n }\n if (\n options.maxModelRequests !== undefined &&\n (!Number.isSafeInteger(options.maxModelRequests) || options.maxModelRequests <= 0)\n ) {\n throw new TypeError('DSPy RLM maxModelRequests must be a positive safe integer')\n }\n}\n\nfunction resolveMaxModelRequests(\n configured: number | undefined,\n limits: { maxIterations: number; maxLlmCalls: number },\n): number {\n if (configured !== undefined) return configured\n const derived = limits.maxIterations + limits.maxLlmCalls + 1\n if (!Number.isSafeInteger(derived) || derived <= 0) {\n throw new Error('DSPy RLM analysis limits produce an invalid model request limit')\n }\n return derived\n}\n\nfunction assertTimerDelay(value: number, field: string): void {\n if (!Number.isSafeInteger(value) || value <= 0 || value > MAX_TIMER_DELAY_MS) {\n throw new TypeError(`DSPy RLM ${field} must be between 1 and ${MAX_TIMER_DELAY_MS}`)\n }\n}\n\nfunction pricingForModel(model: string): CustomTokenPricing {\n const pricing = resolveModelPricing(model)\n if (!pricing) {\n throw new Error(\n `no pricing is configured for '${model}'; provide DspyRlmTraceEngineOptions.pricing`,\n )\n }\n return {\n inputUsdPerMillion: pricing.input * 1_000,\n outputUsdPerMillion: pricing.output * 1_000,\n }\n}\n\nfunction sanitizedRunner(\n runner: ExternalOptimizerRunnerCommand | undefined,\n): ExternalOptimizerRunnerCommand | undefined {\n if (!runner) return undefined\n return {\n ...(runner.command ? { command: runner.command } : {}),\n ...(runner.args ? { args: runner.args } : {}),\n ...(runner.env ? { env: removeCredentialEnvironment(runner.env) } : {}),\n ...(runner.limits ? { limits: { ...runner.limits } } : {}),\n }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n"],"mappings":";;;;;;;;;;;;;;AAmEA,SAAgB,sBAAsB,OAAqC;CACzE,MAAM,OAAO,YAAY,KAAK;CAC9B,IAAI,OAAO,SAAS,UAAU,OAAO;EAAE,UAAU,CAAC;EAAG,UAAU,CAAC;EAAG,eAAe;CAAK;CAEvF,MAAM,WAAgC,CAAC;CACvC,MAAM,WAAiC,CAAC;CACxC,KAAK,MAAM,CAAC,OAAO,QAAQ,KAAK,QAAQ,GAAG;EACzC,IAAI,SAAA,KAA2B;GAC7B,SAAS,KAAK;IACZ;IACA,MAAM;IACN,MAAM;IACN,SAAS;GACX,CAAC;GACD;EACF;EACA,MAAM,UAAU,UAAU,KAAK,KAAK;EACpC,IAAI,aAAa,SAAS,SAAS,KAAK,QAAQ,OAAO;OAClD,SAAS,KAAK,QAAQ,SAAS;CACtC;CACA,OAAO;EAAE;EAAU;CAAS;AAC9B;AAEA,SAAS,UACP,KACA,OACoE;CACpE,IAAI,QAAQ,QAAQ,OAAO,QAAQ,YAAY,MAAM,QAAQ,GAAG,GAC9D,OAAO,EACL,WAAW;EACT;EACA,MAAM;EACN,MAAM;EACN,SAAS,2CAA2C,SAAS,GAAG;CAClE,EACF;CAEF,MAAM,SAAS,wBAAwB,UAAU,GAAG;CACpD,IAAI,CAAC,OAAO,SAAS;EACnB,MAAM,QAAQ,OAAO,MAAM,OAAO;EAClC,MAAM,QAAQ,OAAO,QAAQ,CAAC,EAAA,CAAG,KAAK,GAAG;EAOzC,OAAO,EACL,WAAW;GAAE;GAAO;GAAM,MAJ1B,SAAS,aAAa,oBAAqB,IAA6B,OAAO,MAAM,OACjF,oBACA;GAE4B,SAAS,OAAO,WAAW;EAAgC,EAC7F;CACF;CACA,OAAO,EAAE,SAAS,OAAO,KAAK;AACh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m-engine.ts"],"sourcesContent":["/**\n * The raw-finding wire contract — one decoder for both sides of the process\n * boundary.\n *\n * A finding array crosses a process boundary twice: an optimizer bridge writes\n * it in Python, TypeScript reads it back. Two decoders written independently\n * accept different shapes, so Python could report a completed investigation\n * whose rows TypeScript then dropped — the paid work disappearing between two\n * \"successes\". This module is the TypeScript half; `finding_contract.json`\n * carries the same rules to the Python half, generated from the schema here.\n *\n * Decoding never invents an empty result. A value that is not an array of rows\n * fails with the exact type it was, and a malformed row is reported with its\n * index and path while its valid siblings survive.\n */\n\nimport { type RawAnalystFinding, RawAnalystFindingSchema } from './finding-signature'\nimport { parseFindingSubject } from './finding-subject'\nimport { coerceJson } from './parse-tolerant'\n\n/**\n * Version of the wire contract both languages implement. Bump when the\n * accepted row shape changes; the Python package pins the same value, and the\n * emitted contract carries it so a mismatched pair is visible.\n */\nexport const FINDING_WIRE_CONTRACT_VERSION = 1\n\n/** Why one row was refused. Stable across languages: Python reports the same codes. */\nexport type FindingRejectionCode = 'not-an-object' | 'schema' | 'invalid-subject' | 'row-limit'\n\n/** A refused row, named precisely enough to repair or report. */\nexport interface RejectedFindingRow {\n /** Position in the submitted array. */\n readonly index: number\n /** Dotted path to the offending field, `''` for the row itself. */\n readonly path: string\n readonly code: FindingRejectionCode\n readonly message: string\n}\n\nexport interface DecodedFindingArray {\n readonly accepted: RawAnalystFinding[]\n readonly rejected: RejectedFindingRow[]\n /**\n * Set when the value was not a finding array at all — the array itself is\n * the failure, so `accepted` and `rejected` are both empty and a caller must\n * not read the result as \"no findings\".\n */\n readonly topLevelError?: string\n}\n\n/**\n * Rows past this count are refused rather than validated. A model that emits\n * thousands of rows has lost the plot, and the diagnostics for them would\n * dwarf the answer they came with.\n */\nexport const MAX_FINDING_ROWS = 500\n\n/**\n * Decode a submitted findings value into accepted rows plus per-row\n * diagnostics.\n *\n * Accepts an array of rows, or a string carrying one (a JSON array, possibly\n * fenced). Anything else — an object, a number, null, undefined — sets\n * `topLevelError` naming the type received: a caller that asked for findings\n * and got a number has a defect to report, not an empty result to record.\n */\nexport function decodeRawFindingArray(value: unknown): DecodedFindingArray {\n const rows = findingRows(value)\n if (typeof rows === 'string') return { accepted: [], rejected: [], topLevelError: rows }\n\n const accepted: RawAnalystFinding[] = []\n const rejected: RejectedFindingRow[] = []\n for (const [index, row] of rows.entries()) {\n if (index >= MAX_FINDING_ROWS) {\n rejected.push({\n index,\n path: '',\n code: 'row-limit',\n message: `findings array exceeds ${MAX_FINDING_ROWS} rows`,\n })\n continue\n }\n const decoded = decodeRow(row, index)\n if ('finding' in decoded) accepted.push(decoded.finding)\n else rejected.push(decoded.rejection)\n }\n return { accepted, rejected }\n}\n\nfunction decodeRow(\n row: unknown,\n index: number,\n): { finding: RawAnalystFinding } | { rejection: RejectedFindingRow } {\n if (row === null || typeof row !== 'object' || Array.isArray(row)) {\n return {\n rejection: {\n index,\n path: '',\n code: 'not-an-object',\n message: `finding row must be an object, received ${describe(row)}`,\n },\n }\n }\n const parsed = RawAnalystFindingSchema.safeParse(row)\n if (!parsed.success) {\n const issue = parsed.error.issues[0]\n const path = (issue?.path ?? []).join('.')\n // The schema refines `subject` against the grammar; name that refusal\n // separately so a repair turn can be told which rule the row broke.\n const code: FindingRejectionCode =\n path === 'subject' && parseFindingSubject((row as { subject?: string }).subject) === null\n ? 'invalid-subject'\n : 'schema'\n return {\n rejection: { index, path, code, message: issue?.message ?? 'row does not match the schema' },\n }\n }\n return { finding: parsed.data }\n}\n\n/**\n * Narrow a submitted value to candidate rows, or return the message naming why\n * it is not a findings array at all.\n */\nfunction findingRows(value: unknown): unknown[] | string {\n if (Array.isArray(value)) return value\n if (typeof value === 'string') {\n const parsed = coerceJson(value)\n if (parsed === undefined) {\n return 'findings must be a JSON array; the string received is not JSON'\n }\n if (Array.isArray(parsed)) return parsed\n const unwrapped = findingsProperty(parsed)\n if (unwrapped !== undefined) return unwrapped\n return `findings must be a JSON array, received ${describe(parsed)}`\n }\n const unwrapped = findingsProperty(value)\n if (unwrapped !== undefined) return unwrapped\n return `findings must be an array, received ${describe(value)}`\n}\n\n/** `{ findings: [...] }` is the one wrapper models emit often enough to unwrap. */\nfunction findingsProperty(value: unknown): unknown[] | undefined {\n if (value === null || typeof value !== 'object' || Array.isArray(value)) return undefined\n const inner = (value as Record<string, unknown>).findings\n return Array.isArray(inner) ? inner : undefined\n}\n\nfunction describe(value: unknown): string {\n if (value === null) return 'null'\n if (Array.isArray(value)) return 'an array'\n return `a ${typeof value}`\n}\n\n/** One line per refused row, for a repair prompt or an error message. */\nexport function describeRejectedRows(rejected: readonly RejectedFindingRow[]): string {\n return rejected\n .map((row) => `row ${row.index}${row.path ? ` field '${row.path}'` : ''}: ${row.message}`)\n .join('\\n')\n}\n","import { randomBytes } from 'node:crypto'\nimport { createServer, type IncomingMessage, type ServerResponse } from 'node:http'\nimport {\n type ExternalOptimizerCallbackLimits,\n resolveExternalOptimizerCallbackLimits,\n} from '../campaign/external-optimizer-contracts'\nimport {\n closeServer,\n listenLocal,\n sendJsonIfOpen,\n waitForActiveHandlers,\n} from '../campaign/external-optimizer-http'\nimport type { TraceAnalysisToolDescriptor } from '../trace-analyst/tools'\n\nexport interface TraceToolCallback {\n url: string\n token: string\n calls: () => number\n close: () => Promise<void>\n}\n\nexport type TraceToolCallbackLimits = ExternalOptimizerCallbackLimits\n\n/** Expose one bounded trace-tool set only on an authenticated loopback socket. */\nexport async function startTraceToolCallback(args: {\n tools: readonly TraceAnalysisToolDescriptor[]\n maxCalls: number\n /** Trace-tool request/response byte limits. Omitted fields use finite defaults. */\n limits?: Partial<TraceToolCallbackLimits>\n signal?: AbortSignal\n}): Promise<TraceToolCallback> {\n if (!Number.isSafeInteger(args.maxCalls) || args.maxCalls <= 0) {\n throw new TypeError('trace tool callback maxCalls must be a positive safe integer')\n }\n const limits = resolveExternalOptimizerCallbackLimits(args.limits, 'trace tool callback limits')\n args.signal?.throwIfAborted()\n const byName = new Map(args.tools.map((tool) => [tool.name, tool]))\n if (byName.size !== args.tools.length) {\n throw new Error('trace tool callback received duplicate tool names')\n }\n\n const token = randomBytes(32).toString('hex')\n let calls = 0\n let accepting = true\n let closePromise: Promise<void> | undefined\n const activeControllers = new Set<AbortController>()\n const activeHandlers = new Set<Promise<void>>()\n const server = createServer((request, response) => {\n if (!accepting) {\n sendJsonIfOpen(response, 503, { error: 'trace tool callback is closing' })\n return\n }\n const controller = new AbortController()\n const abortRequest = (): void => {\n request.destroy()\n response.destroy()\n }\n activeControllers.add(controller)\n controller.signal.addEventListener('abort', abortRequest, { once: true })\n\n let handler!: Promise<void>\n handler = handleRequest(request, response, controller.signal).finally(() => {\n controller.signal.removeEventListener('abort', abortRequest)\n activeControllers.delete(controller)\n activeHandlers.delete(handler)\n })\n activeHandlers.add(handler)\n void handler.catch(() => undefined)\n })\n const port = await listenLocal(server)\n const close = (): Promise<void> => {\n closePromise ??= closeCallback()\n return closePromise\n }\n const onAbort = (): void => {\n void close().catch(() => undefined)\n }\n args.signal?.addEventListener('abort', onAbort, { once: true })\n if (args.signal?.aborted) onAbort()\n\n return {\n url: `http://127.0.0.1:${port}/call`,\n token,\n calls: () => calls,\n close,\n }\n\n async function handleRequest(\n request: IncomingMessage,\n response: ServerResponse,\n signal: AbortSignal,\n ): Promise<void> {\n try {\n if (request.method !== 'POST' || request.url !== '/call') {\n sendJsonIfOpen(response, 404, { error: 'not found' })\n return\n }\n if (request.headers.authorization !== `Bearer ${token}`) {\n sendJsonIfOpen(response, 401, { error: 'unauthorized' })\n return\n }\n if (calls >= args.maxCalls) {\n sendJsonIfOpen(response, 429, { error: 'trace tool call limit reached' })\n return\n }\n const body = await readJson(request, limits.maxRequestBytes)\n if (!isRecord(body) || typeof body.name !== 'string' || !('args' in body)) {\n sendJsonIfOpen(response, 400, { error: 'name and args are required' })\n return\n }\n const tool = byName.get(body.name)\n if (!tool) {\n sendJsonIfOpen(response, 404, { error: `unknown trace tool '${body.name}'` })\n return\n }\n calls += 1\n const result = await tool.handler(body.args, { signal })\n const encoded = JSON.stringify({ result })\n if (Buffer.byteLength(encoded) > limits.maxResponseBytes) {\n sendJsonIfOpen(response, 413, { error: 'trace tool response too large' })\n return\n }\n response.writeHead(200, {\n 'content-type': 'application/json; charset=utf-8',\n 'content-length': String(Buffer.byteLength(encoded)),\n })\n response.end(encoded)\n } catch (error) {\n sendJsonIfOpen(response, signal.aborted ? 499 : 400, {\n error: error instanceof Error ? error.message : String(error),\n })\n }\n }\n\n async function closeCallback(): Promise<void> {\n args.signal?.removeEventListener('abort', onAbort)\n accepting = false\n const closingServer = closeServer(server)\n server.closeIdleConnections?.()\n for (const controller of activeControllers) controller.abort()\n const [serverResult] = await Promise.allSettled([\n closingServer,\n waitForActiveHandlers(activeHandlers),\n ])\n if (activeControllers.size !== 0 || activeHandlers.size !== 0) {\n throw new Error('trace tool callback closed with active requests')\n }\n if (serverResult?.status === 'rejected') throw serverResult.reason\n }\n}\n\nfunction readJson(request: IncomingMessage, maxRequestBytes: number): Promise<unknown> {\n return new Promise((resolve, reject) => {\n let size = 0\n const chunks: Buffer[] = []\n request.on('data', (chunk: Buffer) => {\n size += chunk.length\n if (size > maxRequestBytes) {\n reject(new Error('trace tool request too large'))\n request.destroy()\n return\n }\n chunks.push(chunk)\n })\n request.on('error', reject)\n request.on('end', () => {\n try {\n resolve(JSON.parse(Buffer.concat(chunks).toString('utf8')))\n } catch (error) {\n reject(error)\n }\n })\n })\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n","import {\n assertExternalOptimizerModelBudget,\n type ExternalOptimizerModelCall,\n type ExternalOptimizerModelExecutionObservation,\n type ExternalOptimizerModelProxy,\n type ExternalOptimizerRunnerCommand,\n removeCredentialEnvironment,\n resolveExternalOptimizerCallbackLimits,\n resolveExternalOptimizerProcessLimits,\n} from '../campaign/external-optimizer-contracts'\nimport { startExternalOptimizerModelProxy } from '../campaign/external-optimizer-model-proxy'\nimport { runWithCleanup } from '../campaign/external-optimizer-resources'\nimport { runExternalOptimizerProcess } from '../campaign/external-optimizer-subprocess'\nimport type { CustomTokenPricing } from '../cost-ledger'\nimport { resolveModelPricing } from '../metrics'\nimport {\n DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS,\n type TraceAnalysisEngine,\n type TraceAnalysisEngineResult,\n} from './engine'\nimport { decodeRawFindingArray } from './finding-codec'\nimport { startTraceToolCallback, type TraceToolCallbackLimits } from './trace-tool-callback'\n\nconst DEFAULT_TIMEOUT_MS = 10 * 60_000\nconst DEFAULT_MAX_COST_USD = 1\nconst DEFAULT_MAX_MODEL_REQUEST_BYTES = 16 * 1024 * 1024\nconst DEFAULT_MAX_MODEL_RESPONSE_BYTES = 4 * 1024 * 1024\nconst DEFAULT_TRACE_TOOL_TIMEOUT_MS = 60_000\nconst MAX_TIMER_DELAY_MS = 2_147_483_647\nconst BRIDGE_MODULE = 'agent_eval_rpc.dspy_rlm_bridge'\n/** Bumped whenever this engine's execution behavior changes. */\nconst DSPY_RLM_ENGINE_VERSION = '1.0.0'\n\nexport interface DspyRlmTraceEngineOptions {\n /** Caller-owned execution path. Agent Eval never receives provider credentials. */\n call: ExternalOptimizerModelCall\n /** Stable public identity for the caller-owned path, such as an AgentProfile digest. */\n callRef: string\n /** Persist the finite execution record returned for every admitted call. */\n recordExecution: (observation: ExternalOptimizerModelExecutionObservation) => void\n model: string\n /** Exact provider rates. Required when the model is absent from the pricing table. */\n pricing?: CustomTokenPricing\n /** Maximum provider spend for one investigation. Default: 1 USD. */\n maxCostUsd?: number\n /** Controller response cap. Default: {@link DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS}. */\n maxOutputTokens?: number\n /**\n * Thinking tokens one controller turn may bill on top of its completion.\n * A reasoning model bills these beyond `maxOutputTokens`, so the cost\n * reservation must cover them. Default: four times the completion cap.\n */\n maxReasoningTokens?: number\n /** Maximum caller-owned model invocations. Default derives from the analysis limits. */\n maxModelRequests?: number\n /** Maximum model request bytes. Default: 16 MiB. */\n maxModelRequestBytes?: number\n /** Maximum model response bytes. Default: 4 MiB. */\n maxModelResponseBytes?: number\n /** Deadline for one caller-owned model invocation. Default: the whole analysis deadline. */\n modelRequestTimeoutMs?: number\n /** Trace-tool loopback request/response byte limits. */\n traceToolLimits?: Partial<TraceToolCallbackLimits>\n /** Deadline for one Python-to-Node trace-tool call. Default: 60 seconds. */\n traceToolTimeoutMs?: number\n /**\n * How the controller's reasoning and code fields are obtained.\n *\n * `tolerant` parses marker output strictly first, then recovers the fields\n * deterministically from prose plus a fenced code block — the shape coding\n * models naturally emit — at no extra model cost. `two-step` extracts with a\n * second call per turn. `chat` accepts marker output only. Default:\n * `tolerant`.\n */\n controlAdapter?: 'chat' | 'two-step' | 'tolerant'\n /** Python command used to load agent-eval-rpc[dspy]. Default: python. */\n runner?: ExternalOptimizerRunnerCommand\n /** Whole investigation deadline. Default: 10 minutes. */\n timeoutMs?: number\n}\n\n/** Use the official DSPy RLM as a bounded recursive trace-analysis engine. */\nexport function createDspyRlmTraceEngine(options: DspyRlmTraceEngineOptions): TraceAnalysisEngine {\n assertOptions(options)\n const maxOutputTokens = options.maxOutputTokens ?? DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS\n if (!Number.isSafeInteger(maxOutputTokens) || maxOutputTokens <= 0) {\n throw new TypeError('DSPy RLM maxOutputTokens must be a positive safe integer')\n }\n const controlAdapter = options.controlAdapter ?? 'tolerant'\n const maxReasoningTokens = options.maxReasoningTokens ?? maxOutputTokens * 4\n if (!Number.isSafeInteger(maxReasoningTokens) || maxReasoningTokens < 0) {\n throw new TypeError('DSPy RLM maxReasoningTokens must be a non-negative safe integer')\n }\n const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS\n assertTimerDelay(timeoutMs, 'timeoutMs')\n const maxCostUsd = options.maxCostUsd ?? DEFAULT_MAX_COST_USD\n if (!Number.isFinite(maxCostUsd) || maxCostUsd <= 0) {\n throw new TypeError('DSPy RLM maxCostUsd must be positive and finite')\n }\n const pricing = options.pricing ?? pricingForModel(options.model)\n const maxModelRequestBytes = options.maxModelRequestBytes ?? DEFAULT_MAX_MODEL_REQUEST_BYTES\n const maxModelResponseBytes = options.maxModelResponseBytes ?? DEFAULT_MAX_MODEL_RESPONSE_BYTES\n const modelRequestTimeoutMs = options.modelRequestTimeoutMs ?? timeoutMs\n const traceToolTimeoutMs = options.traceToolTimeoutMs ?? DEFAULT_TRACE_TOOL_TIMEOUT_MS\n assertExternalOptimizerModelBudget(\n {\n maxCostUsd,\n maxRequests: options.maxModelRequests ?? 1,\n maxRequestBytes: maxModelRequestBytes,\n maxResponseBytes: maxModelResponseBytes,\n maxOutputTokensPerRequest: maxOutputTokens,\n maxReasoningTokensPerRequest: maxReasoningTokens,\n pricing,\n requestTimeoutMs: modelRequestTimeoutMs,\n },\n 'DSPy RLM model limits',\n )\n resolveExternalOptimizerCallbackLimits(options.traceToolLimits, 'DSPy RLM trace tool limits')\n assertTimerDelay(traceToolTimeoutMs, 'traceToolTimeoutMs')\n\n const runner = sanitizedRunner(options.runner)\n const processLimits = resolveExternalOptimizerProcessLimits(runner?.limits)\n return {\n id: 'dspy-rlm',\n description: 'Official DSPy RLM with bounded trace tools and metered model calls.',\n model: options.model,\n version: DSPY_RLM_ENGINE_VERSION,\n executionConfig: {\n bridge_module: BRIDGE_MODULE,\n call_ref: options.callRef,\n model: options.model,\n pricing: { ...pricing },\n max_cost_usd: maxCostUsd,\n max_output_tokens: maxOutputTokens,\n max_reasoning_tokens: maxReasoningTokens,\n control_adapter: controlAdapter,\n timeout_ms: timeoutMs,\n max_model_requests: options.maxModelRequests ?? null,\n max_request_bytes: maxModelRequestBytes,\n max_response_bytes: maxModelResponseBytes,\n model_request_timeout_ms: modelRequestTimeoutMs,\n trace_tool_limits: options.traceToolLimits ?? null,\n trace_tool_timeout_ms: traceToolTimeoutMs,\n process_limits: processLimits,\n runner: runner ? 'caller-supplied' : 'default',\n runner_command: runner?.command ?? null,\n },\n async analyze(request) {\n const callback = await startTraceToolCallback({\n tools: request.tools,\n maxCalls: request.limits.maxToolCalls,\n ...(options.traceToolLimits ? { limits: options.traceToolLimits } : {}),\n ...(request.signal ? { signal: request.signal } : {}),\n })\n let modelProxy: ExternalOptimizerModelProxy | undefined\n const modelExecutions: ExternalOptimizerModelExecutionObservation[] = []\n const result = await runWithCleanup({\n label: 'DSPy RLM trace-analysis resources',\n run: async () => {\n modelProxy = await startExternalOptimizerModelProxy({\n call: options.call,\n callRef: options.callRef,\n recordExecution: (observation) => {\n modelExecutions.push(structuredClone(observation))\n options.recordExecution(observation)\n },\n model: options.model,\n budget: {\n maxCostUsd,\n maxRequests: resolveMaxModelRequests(options.maxModelRequests, request.limits),\n maxRequestBytes: maxModelRequestBytes,\n maxResponseBytes: maxModelResponseBytes,\n maxOutputTokensPerRequest: maxOutputTokens,\n maxReasoningTokensPerRequest: maxReasoningTokens,\n requestTimeoutMs: modelRequestTimeoutMs,\n pricing,\n },\n costLedger: request.costLedger,\n channel: 'analyst',\n phase: request.costPhase,\n actor: request.analystId,\n ...(request.costTags ? { tags: request.costTags } : {}),\n ...(request.signal ? { signal: request.signal } : {}),\n })\n request.log?.('trace analyst engine started', {\n engine: 'dspy-rlm',\n model: options.model,\n tools: request.tools.map((tool) => tool.name),\n limits: request.limits,\n })\n const raw = await runExternalOptimizerProcess<unknown>({\n label: 'DSPy RLM trace analysis',\n tempPrefix: 'agent-eval-dspy-rlm-',\n module: BRIDGE_MODULE,\n input: {\n operation: 'analyze',\n question: request.question,\n instructions: request.instructions,\n modelProxy: {\n baseUrl: modelProxy.baseUrl,\n apiKey: modelProxy.apiKey,\n model: options.model,\n maxOutputTokens,\n },\n toolCallback: {\n url: callback.url,\n token: callback.token,\n timeoutMs: traceToolTimeoutMs,\n },\n toolSpecs: request.tools.map(({ name, description, parameters }) => ({\n name,\n description,\n parameters,\n })),\n controlAdapter,\n limits: {\n maxIterations: request.limits.maxIterations,\n maxLlmCalls: request.limits.maxLlmCalls,\n maxOutputChars: request.limits.maxOutputChars,\n },\n // Omitted entirely when the caller supplied none, so a request\n // without structured inputs sends the payload it always sent.\n ...(request.taskInputs ? { taskInputs: request.taskInputs } : {}),\n },\n ...(runner ? { runner } : {}),\n additionalArgs: ['--max-input-bytes', String(processLimits.maxInputBytes)],\n timeoutMs,\n ...(request.signal ? { signal: request.signal } : {}),\n })\n const parsed = parseBridgeOutput(raw, (index, reason) => {\n request.log?.('finding rejected: bridge row failed schema validation', {\n engine: 'dspy-rlm',\n index,\n reason,\n })\n })\n const successfulCompletions = modelProxy.successfulCompletions()\n const requestAttempts = modelProxy.requestAttempts()\n if (parsed.modelCalls !== successfulCompletions) {\n throw new Error(\n `DSPy RLM reported ${parsed.modelCalls} model calls, but the provider proxy recorded ${successfulCompletions}`,\n )\n }\n modelProxy.assertExecutionComplete()\n return {\n ...parsed,\n toolCalls: callback.calls(),\n runtime: {\n ...parsed.runtime,\n modelRequestAttempts: requestAttempts,\n modelSuccessfulCompletions: successfulCompletions,\n modelExecutions,\n },\n } satisfies TraceAnalysisEngineResult\n },\n cleanup: async () => {\n const results = await Promise.allSettled([\n ...(modelProxy ? [modelProxy.close()] : []),\n callback.close(),\n ])\n const errors = results.flatMap((entry) =>\n entry.status === 'rejected' ? [entry.reason] : [],\n )\n if (errors.length > 0) {\n throw new AggregateError(errors, 'DSPy RLM resource cleanup failed')\n }\n },\n })\n request.log?.('trace analyst engine completed', {\n engine: 'dspy-rlm',\n model_calls: result.modelCalls,\n model_request_attempts: result.runtime.modelRequestAttempts,\n tool_calls: result.toolCalls,\n findings: result.findings.length,\n })\n return result\n },\n }\n}\n\nfunction parseBridgeOutput(\n value: unknown,\n onRejectedFinding: (index: number, reason: string) => void,\n): Omit<TraceAnalysisEngineResult, 'toolCalls'> {\n if (!isRecord(value)) throw new Error('DSPy RLM bridge output must be an object')\n if (typeof value.answer !== 'string' || !value.answer.trim()) {\n throw new Error('DSPy RLM bridge returned no answer')\n }\n // Findings are model output: one malformed row is model noise, not a bridge\n // fault, and the rest of the paid investigation must survive it. The codec\n // is the same decoder the Python side runs, so a row this bridge accepts is\n // a row the optimizer could report, and vice versa.\n const decoded = decodeRawFindingArray(value.findings)\n if (decoded.topLevelError !== undefined) {\n throw new Error(`DSPy RLM bridge findings must be an array: ${decoded.topLevelError}`)\n }\n const findings = decoded.accepted\n const rejectedFindings = decoded.rejected.length\n for (const rejection of decoded.rejected) {\n onRejectedFinding(\n rejection.index,\n `${rejection.code}${rejection.path ? ` at ${rejection.path}` : ''}: ${rejection.message}`,\n )\n }\n if (!Array.isArray(value.trajectory)) {\n throw new Error('DSPy RLM bridge trajectory must be an array')\n }\n if (!Number.isSafeInteger(value.modelCalls) || (value.modelCalls as number) <= 0) {\n throw new Error('DSPy RLM bridge modelCalls must be a positive safe integer')\n }\n if (!isRecord(value.runtime)) {\n throw new Error('DSPy RLM bridge runtime must be an object')\n }\n return {\n answer: value.answer,\n findings,\n trajectory: value.trajectory,\n modelCalls: value.modelCalls as number,\n runtime: { ...value.runtime, rejectedFindings },\n }\n}\n\nfunction assertOptions(options: DspyRlmTraceEngineOptions): void {\n for (const [name, value] of [\n ['callRef', options.callRef],\n ['model', options.model],\n ] as const) {\n if (typeof value !== 'string' || !value.trim() || value !== value.trim()) {\n throw new TypeError(`DSPy RLM ${name} must be a trimmed non-empty string`)\n }\n }\n if (typeof options.call !== 'function') {\n throw new TypeError('DSPy RLM call must be a function')\n }\n if (typeof options.recordExecution !== 'function') {\n throw new TypeError('DSPy RLM recordExecution must be a function')\n }\n if (\n options.maxModelRequests !== undefined &&\n (!Number.isSafeInteger(options.maxModelRequests) || options.maxModelRequests <= 0)\n ) {\n throw new TypeError('DSPy RLM maxModelRequests must be a positive safe integer')\n }\n}\n\nfunction resolveMaxModelRequests(\n configured: number | undefined,\n limits: { maxIterations: number; maxLlmCalls: number },\n): number {\n if (configured !== undefined) return configured\n const derived = limits.maxIterations + limits.maxLlmCalls + 1\n if (!Number.isSafeInteger(derived) || derived <= 0) {\n throw new Error('DSPy RLM analysis limits produce an invalid model request limit')\n }\n return derived\n}\n\nfunction assertTimerDelay(value: number, field: string): void {\n if (!Number.isSafeInteger(value) || value <= 0 || value > MAX_TIMER_DELAY_MS) {\n throw new TypeError(`DSPy RLM ${field} must be between 1 and ${MAX_TIMER_DELAY_MS}`)\n }\n}\n\nfunction pricingForModel(model: string): CustomTokenPricing {\n const pricing = resolveModelPricing(model)\n if (!pricing) {\n throw new Error(\n `no pricing is configured for '${model}'; provide DspyRlmTraceEngineOptions.pricing`,\n )\n }\n return {\n inputUsdPerMillion: pricing.input * 1_000,\n outputUsdPerMillion: pricing.output * 1_000,\n }\n}\n\nfunction sanitizedRunner(\n runner: ExternalOptimizerRunnerCommand | undefined,\n): ExternalOptimizerRunnerCommand | undefined {\n if (!runner) return undefined\n return {\n ...(runner.command ? { command: runner.command } : {}),\n ...(runner.args ? { args: runner.args } : {}),\n ...(runner.env ? { env: removeCredentialEnvironment(runner.env) } : {}),\n ...(runner.limits ? { limits: { ...runner.limits } } : {}),\n }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n"],"mappings":";;;;;;;;;;;;;;AAmEA,SAAgB,sBAAsB,OAAqC;CACzE,MAAM,OAAO,YAAY,KAAK;CAC9B,IAAI,OAAO,SAAS,UAAU,OAAO;EAAE,UAAU,CAAC;EAAG,UAAU,CAAC;EAAG,eAAe;CAAK;CAEvF,MAAM,WAAgC,CAAC;CACvC,MAAM,WAAiC,CAAC;CACxC,KAAK,MAAM,CAAC,OAAO,QAAQ,KAAK,QAAQ,GAAG;EACzC,IAAI,SAAA,KAA2B;GAC7B,SAAS,KAAK;IACZ;IACA,MAAM;IACN,MAAM;IACN,SAAS;GACX,CAAC;GACD;EACF;EACA,MAAM,UAAU,UAAU,KAAK,KAAK;EACpC,IAAI,aAAa,SAAS,SAAS,KAAK,QAAQ,OAAO;OAClD,SAAS,KAAK,QAAQ,SAAS;CACtC;CACA,OAAO;EAAE;EAAU;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AAC,QAAQ,OAAO,KAAA;CACpB,OAAO;EACL,GAAI,OAAO,UAAU,EAAE,SAAS,OAAO,QAAQ,IAAI,CAAC;EACpD,GAAI,OAAO,OAAO,EAAE,MAAM,OAAO,KAAK,IAAI,CAAC;EAC3C,GAAI,OAAO,MAAM,EAAE,KAAK,4BAA4B,OAAO,GAAG,EAAE,IAAI,CAAC;EACrE,GAAI,OAAO,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,OAAO,EAAE,IAAI,CAAC;CAC1D;AACF;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { c as CostLedgerHandle } from "./cost-ledger-DbQdN3nO.js";
|
|
2
2
|
import { a as RunRecord } from "./run-record-DTv1MdjK.js";
|
|
3
|
-
import {
|
|
4
|
-
import "./types-
|
|
3
|
+
import { D as TraceAnalysisStore, S as BoundedTraceAnalysisStoreOptions, p as EvidenceRef } from "./types-DzuaM493.js";
|
|
4
|
+
import "./types-C34V4Vto.js";
|
|
5
5
|
import { r as DatasetScenario } from "./dataset-DQqhOCPt.js";
|
|
6
6
|
import "./summary-report-gMrbYawB.js";
|
|
7
7
|
import { o as InsightReport, r as ExecutionInsight, t as CostProvenanceSummary } from "./insight-report-DETqPc_A.js";
|
|
8
|
-
import { n as AnalystRegistry } from "./registry-
|
|
8
|
+
import { n as AnalystRegistry } from "./registry-ByVld1-5.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/contract/analyze-runs.d.ts
|
|
11
11
|
interface AnalyzeRunsOptions {
|
|
@@ -91,7 +91,7 @@ interface BuildTraceAnalysisToolsOptions extends BoundedTraceAnalysisStoreOption
|
|
|
91
91
|
interface TraceAnalysisToolDescriptor extends EvalToolDef {
|
|
92
92
|
namespace: typeof TRACE_ANALYST_TOOL_NAMESPACE;
|
|
93
93
|
}
|
|
94
|
-
/** Bind
|
|
94
|
+
/** Bind available trace reads without exposing an agent framework type. */
|
|
95
95
|
declare function buildTraceAnalysisToolDescriptors(options: BuildTraceAnalysisToolsOptions): TraceAnalysisToolDescriptor[];
|
|
96
96
|
declare function traceAnalystFunctionGroup(options: BuildTraceAnalysisToolsOptions): {
|
|
97
97
|
namespace: string;
|
|
@@ -227,4 +227,4 @@ interface TraceAnalysisEngine {
|
|
|
227
227
|
declare function resolveTraceAnalystLimits(limits: Partial<TraceAnalystLimits> | undefined): TraceAnalystLimits;
|
|
228
228
|
//#endregion
|
|
229
229
|
export { summarizeExecution as S, traceAnalystFunctionGroup as _, TraceAnalystLimits as a, SummarizeExecutionOptions as b, RawAnalystEvidence as c, evidenceRefsFromRawFinding as d, parseRawFinding as f, buildTraceAnalysisToolDescriptors as g, TraceAnalysisToolDescriptor as h, TraceAnalysisEngineResult as i, RawAnalystFinding as l, TRACE_ANALYST_TOOL_NAMESPACE as m, TraceAnalysisEngine as n, resolveTraceAnalystLimits as o, BuildTraceAnalysisToolsOptions as p, TraceAnalysisEngineRequest as r, RAW_FINDING_SCHEMA_PROMPT as s, DEFAULT_TRACE_ANALYST_OUTPUT_TOKENS as t, RawAnalystFindingSchema as u, AnalyzeRunsOptions as v, analyzeRuns as x, ExecutionReport as y };
|
|
230
|
-
//# sourceMappingURL=engine-
|
|
230
|
+
//# sourceMappingURL=engine-CX8ReXkn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-
|
|
1
|
+
{"version":3,"file":"engine-CX8ReXkn.d.ts","names":[],"sources":["../src/contract/analyze-runs.ts","../src/eval-tools.ts","../src/trace-analyst/tools.ts","../src/analyst/finding-signature.ts","../src/analyst/engine.ts"],"mappings":";;;;;;;;;;UAoEiB;;EAEf,MAAM;;;EAGN;;;;;EAKA;EACA;;;EAGA,kBAAkB;;;EAGlB,UAAU;;;;EAIV;IACE;IACA,cAAc;;;;;EAKhB,cAAc;IAAQ;IAAe;IAAe;;;EAEpD;;;;EAIA;;;;;;;;;EASA,eAAe;;;EAGf;;UAGe;EACf,MAAM;EACN;;UAGe;EACf,WAAW;EACX,gBAAgB;;;iBAIF,mBAAmB,MAAM,4BAA4B;iBAgB/C,YAAY,MAAM,qBAAqB,QAAQ;;;;UCpHpD;EACf;EACA;EACA,YAAY;EACZ,UAAU,eAAe;IAAQ,SAAS;QAAkB;;;;cClBjD;UAEI,uCAAuC;EACtD,OAAO;;UAGQ,oCAAoC;EACnD,kBAAkB;;;iBAIJ,kCACd,SAAS,iCACR;iBAoIa,0BAA0B,SAAS;EACjD;EACA;EACA;EACA;EACA,WAAW;;;;cCxJP,0BAAwB,EAAA;;;GAKnB,EAAA,KAAA;KAEC,qBAAqB,EAAE,aAAa;cAiBnC,yBAAuB,EAAA;;;;;;;;;;;;;;;;;GAKzB,EAAA,KAAA;KAEC,oBAAoB,EAAE,aAAa;;;;;;cAOlC;;iBAYG,2BAA2B,SAAS,oBAAoB;iBAQxD,gBACd,cACA,OAAO,aAAa,SAAS,mCAC5B;;;;UCpEc;;EAEf;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;cAwBW;UAEI;EACf;EACA;EACA;EACA,gBAAgB;;;;;;;;;;;EAWhB,aAAa,SAAS;EACtB,QAAQ;EACR,YAAY;EACZ;EACA,WAAW;EACX,SAAS;EACT,OAAO,iBAAiB,SAAS;;;UAIlB;EACf;EACA,UAAU;;EAEV;;;;;EAKA;;EAEA;EACA,SAAS;;;;;;;;;UAUM;WACN;WACA;WACA;;WAEA;;;;;;;;WAQA,iBAAiB,SAAS;EACnC,QAAQ,SAAS,6BAA6B,QAAQ;;iBAGxC,0BACd,QAAQ,QAAQ,kCACf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as AnalystRunResult, s as AnalystRunEvent, t as Analyst, u as AnalystRunSummary } from "./types-
|
|
1
|
+
import { l as AnalystRunResult, s as AnalystRunEvent, t as Analyst, u as AnalystRunSummary } from "./types-DzuaM493.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/analyst/exact-types.d.ts
|
|
4
4
|
/** Analyst metadata required before the exact registry path will execute it. */
|
|
@@ -231,4 +231,4 @@ declare const exactExecutionPlanSchema: z.ZodObject<{
|
|
|
231
231
|
}, z.core.$strict>;
|
|
232
232
|
//#endregion
|
|
233
233
|
export { ExactAnalystRunPolicySnapshot as a, ExactAnalystSnapshot as c, ExactExecutionComponentSnapshot as d, ExactAnalystRunEvent as i, ExactCapableAnalyst as l, ExactAnalystExecutionPlanSnapshot as n, ExactAnalystRunResult as o, ExactAnalystRunCompletion as r, ExactAnalystRunSummary as s, ExactAnalystBudgetSnapshot as t, ExactExecutionComponentIdentity as u };
|
|
234
|
-
//# sourceMappingURL=exact-types-
|
|
234
|
+
//# sourceMappingURL=exact-types-B7LC1EyX.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exact-types-
|
|
1
|
+
{"version":3,"file":"exact-types-B7LC1EyX.d.ts","names":[],"sources":["../src/analyst/exact-types.ts"],"mappings":";;;;UAMiB,oBAAoB,0BAA0B,QAAQ;;WAE5D,iBAAiB,SAAS;;KAGhC,aAAa,KAAK,0BAA0B,mBACpC,aAAa,UACtB,+BACc,aAAa,IAAI,aAAa,EAAE,WAC5C;KAEM,uBAAuB,aAAa,EAAE,aAAa;KACnD,6BAA6B,aAAa,EAAE,aAAa;;UAGpD;EACf;EACA;EACA,QAAQ,SAAS;;;UAIF;EACf;EACA;EACA;;KAyBU,gCAAgC,aAAa,EAAE,aAAa;KAC5D,oCAAoC,aAC9C,EAAE,aAAa;KAGL,yBAAyB;;EAEnC;;KAGU;EACN;;EAEA;EACA;IAAS;IAAe;;;UAGb,8BAA8B;EAC7C,aAAa;EACb,gBAAgB;EAChB,YAAY;;;KAIF,wBACP,QAAQ;EAAmB;;EAC1B,gBAAgB;MAEjB,KAAK,QAAQ;EAAmB;;EAC/B,SAAS;KAEX,QAAQ;EAAmB;MAC1B,KAAK,QAAQ;EAAmB;;EAC/B,SAAS;MAEV,KAAK,QAAQ;EAAmB;;EAC/B,QAAQ;;cAwCR,uBAAqB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAOzB,EAAA,KAAA;cAII,sBAAoB,EAAA,uBAAA,EAAA;;;;;;;;;;;GAaxB,EAAA,KAAA;cAiBI,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYxB,EAAA,KAAA;cAEI,0BAAwB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+E1B,EAAA,KAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as ValidationError, r as CaptureIntegrityError } from "../errors-DEE6u6ot.js";
|
|
2
2
|
import { n as bonferroni, r as holm, t as benjaminiHochberg } from "../multiplicity-DIWHvysC.js";
|
|
3
|
-
import { $ as paretoSignificanceGate, A as PairArmsOptions, B as PowerPreflight, C as hashJson, Dt as EProcessStep, E as verifyManifest, Et as EProcessState, Ft as mcnemar, H as powerPreflight, K as EvidenceVector, L as comparePairedArms, Lt as pairedRiskDifference, N as PairedArmRow, O as MatchedPair, Ot as eProcess, Q as paretoPolicy, R as pairArms, Rt as pairedRiskDifferenceExact, S as evaluateHypothesis, T as signManifest, Tt as EProcessOptions, V as PowerPreflightOptions, Vt as wilson, X as PromotionPolicy, Z as buildEvidenceVector, _ as sequentialPairedGate, _t as verifyEvidenceReceipt, at as createCampaignEvidenceReceipt, b as SignedManifest, c as pairHoldout, ct as EVIDENCE_RECEIPT_VERSION, d as SequentialDecision, dt as EvidenceBinding, f as SequentialObservation, ft as EvidenceReceipt, g as sequentialDecide, gt as isIndependentEvidence, ht as createEvidenceReceipt, i as PairedHoldout, it as CampaignEvidenceContext, j as PairArmsResult, jt as ProportionInterval, lt as EvidenceAuthority, m as SequentialPairedGateOptions, mt as INDEPENDENT_EVIDENCE_AUTHORITY_KINDS, n as HeldoutSignificance, ot as CreateEvidenceReceiptInput, p as SequentialPairedGate, pt as EvidenceReceiptVerification, r as HeldoutSignificanceOptions, s as heldoutSignificance, st as EVIDENCE_AUTHORITY_KINDS, ut as EvidenceAuthorityKind, v as HypothesisManifest, w as manifestContentDigest, wt as EProcess, x as SignedManifestAlgo, y as HypothesisResult, z as pairRunRecords, zt as pairedRiskDifferenceScore } from "../statistical-heldout-
|
|
3
|
+
import { $ as paretoSignificanceGate, A as PairArmsOptions, B as PowerPreflight, C as hashJson, Dt as EProcessStep, E as verifyManifest, Et as EProcessState, Ft as mcnemar, H as powerPreflight, K as EvidenceVector, L as comparePairedArms, Lt as pairedRiskDifference, N as PairedArmRow, O as MatchedPair, Ot as eProcess, Q as paretoPolicy, R as pairArms, Rt as pairedRiskDifferenceExact, S as evaluateHypothesis, T as signManifest, Tt as EProcessOptions, V as PowerPreflightOptions, Vt as wilson, X as PromotionPolicy, Z as buildEvidenceVector, _ as sequentialPairedGate, _t as verifyEvidenceReceipt, at as createCampaignEvidenceReceipt, b as SignedManifest, c as pairHoldout, ct as EVIDENCE_RECEIPT_VERSION, d as SequentialDecision, dt as EvidenceBinding, f as SequentialObservation, ft as EvidenceReceipt, g as sequentialDecide, gt as isIndependentEvidence, ht as createEvidenceReceipt, i as PairedHoldout, it as CampaignEvidenceContext, j as PairArmsResult, jt as ProportionInterval, lt as EvidenceAuthority, m as SequentialPairedGateOptions, mt as INDEPENDENT_EVIDENCE_AUTHORITY_KINDS, n as HeldoutSignificance, ot as CreateEvidenceReceiptInput, p as SequentialPairedGate, pt as EvidenceReceiptVerification, r as HeldoutSignificanceOptions, s as heldoutSignificance, st as EVIDENCE_AUTHORITY_KINDS, ut as EvidenceAuthorityKind, v as HypothesisManifest, w as manifestContentDigest, wt as EProcess, x as SignedManifestAlgo, y as HypothesisResult, z as pairRunRecords, zt as pairedRiskDifferenceScore } from "../statistical-heldout-0La5ZTlv.js";
|
|
4
4
|
import { c as BOOTSTRAP_GATE_MIN_N, d as PairedBootstrapResult, h as pairedBootstrap, u as PairedBootstrapOptions } from "../paired-promotion-decision-CGzg0cI_.js";
|
|
5
|
-
import { _ as requiredSampleSize, a as ExperimentVerdict, d as inMemoryExperimentStore, f as mulberry32, g as requiredPairedSampleSize, h as pairedMde, i as ExperimentTracker, l as fileExperimentStore, m as mcnemarRequiredN, n as ExperimentRep, p as mcnemarPower, r as ExperimentStats, t as Experiment } from "../experiment-tracker-
|
|
5
|
+
import { _ as requiredSampleSize, a as ExperimentVerdict, d as inMemoryExperimentStore, f as mulberry32, g as requiredPairedSampleSize, h as pairedMde, i as ExperimentTracker, l as fileExperimentStore, m as mcnemarRequiredN, n as ExperimentRep, p as mcnemarPower, r as ExperimentStats, t as Experiment } from "../experiment-tracker-B3TiF5-u.js";
|
|
6
6
|
import { a as PairedEvalueStep, d as sequentialCrossingHorizon, i as PairedEvalueSequence, o as SequentialCrossingHorizon, r as PairedEvalueOptions, s as SequentialCrossingHorizonOptions, u as pairedEvalueSequence } from "../sequential-BhsrMupG.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#region src/experiment/ast.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as EvidenceRef } from "./types-
|
|
1
|
+
import { p as EvidenceRef } from "./types-DzuaM493.js";
|
|
2
2
|
//#region src/statistics/power-and-mde.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Required N per arm for a two-sample comparison at target effect size,
|
|
@@ -234,4 +234,4 @@ declare class ExperimentTracker {
|
|
|
234
234
|
}
|
|
235
235
|
//#endregion
|
|
236
236
|
export { requiredSampleSize as _, ExperimentVerdict as a, computeExperimentStats as c, inMemoryExperimentStore as d, mulberry32 as f, requiredPairedSampleSize as g, pairedMde as h, ExperimentTracker as i, fileExperimentStore as l, mcnemarRequiredN as m, ExperimentRep as n, ImprovementThresholds as o, mcnemarPower as p, ExperimentStats as r, ImprovementVerdictResult as s, Experiment as t, improvementVerdict as u };
|
|
237
|
-
//# sourceMappingURL=experiment-tracker-
|
|
237
|
+
//# sourceMappingURL=experiment-tracker-B3TiF5-u.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experiment-tracker-
|
|
1
|
+
{"version":3,"file":"experiment-tracker-B3TiF5-u.d.ts","names":[],"sources":["../src/statistics/power-and-mde.ts","../src/statistics/random.ts","../src/experiment-tracker.ts"],"mappings":";;;;;;;;iBAWgB,mBAAmB;EACjC;EACA;EACA;EACA;;;;;;;;;;;iBAsBc,yBAAyB;EACvC;EACA;EACA;EACA;;;;;;;;iBAkBc,UAAU;EACxB;EACA;EACA;EACA;;;;;;;;;;;;;;;;iBAyBc,iBAAiB;EAC/B;EACA;EACA;EACA;EACA;;;;;;;iBAyBc,aAAa;EAC3B;EACA;EACA;EACA;EACA;;;;;;;;iBCrHc,WAAW;;;;;KCyBf;;UAGK;;EAEf;;EAEA;;EAEA;;;;UAKe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA,WAAW;;EAEX;;EAEA,UAAU;;UAGK;EACf;EACA;EACA;EACA;;EAEA;;EAEA;;;EAGA;;EAEA;;EAEA;;UAGe;;EAEf;;EAEA;;EAEA,YAAY;;EAEZ;;EAEA;EACA,MAAM;EACN,OAAO;EACP,SAAS;;EAET;;UAGe;;EAEf;;EAEA;;EAEA;;EAEA;;;EAGA;;UAGe;EACf,SAAS;;EAET;;EAEA;;;;;;;iBAkDc,uBACd,MAAM,iBACN,aAAa,wBACZ;;;;;;;iBAgDa,mBACd,WAAW,iBACX,QAAQ,wBACR,aAAa,wBACZ;;;KA6CS,yBAAyB,uBAAuB,QAAQ;;;UAInD;EACf,QAAQ,QAAQ;EAChB,KAAK,aAAa,eAAe;;;;iBAoBnB,wBAAwB,UAAS,eAAoB;;iBAarD,oBAAoB,eAAe;UAyBlC;EACf,QAAQ;EACR,mBAAmB;EACnB,aAAa;;EAEb;;UAGe;EACf;EACA;EACA;EACA;;EAEA,aAAa;;;;;;;;;cAUF;mBACM;mBACA;mBACA;mBACA;EAEjB,YAAY,UAAS;EAOf,OAAO,OAAO,wBAAwB,QAAQ;;;EA6B9C,OACJ,sBACA,KAAK,KAAK;IAAwC;IAAc;MAC/D,QAAQ;EAqCL,IAAI,uBAAuB,QAAQ;EAMnC,QAAQ,QAAQ;;EAKhB,WAAW,uBAAuB,QAAQ"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as FailureClass } from "./schema-CR5cpjQ3.js";
|
|
2
|
-
import { i as AnalystFinding, l as AnalystRunResult, p as EvidenceRef } from "./types-
|
|
2
|
+
import { i as AnalystFinding, l as AnalystRunResult, p as EvidenceRef } from "./types-DzuaM493.js";
|
|
3
3
|
import { i as DatasetSplit, r as DatasetScenario } from "./dataset-DQqhOCPt.js";
|
|
4
4
|
import { s as TraceStore } from "./store-BErPvYBr.js";
|
|
5
|
-
import "./exact-types-
|
|
5
|
+
import "./exact-types-B7LC1EyX.js";
|
|
6
6
|
import { i as TraceEmitter } from "./emitter-Cs0egaFd.js";
|
|
7
7
|
//#region src/control-runtime.d.ts
|
|
8
8
|
type ControlSeverity = 'info' | 'warning' | 'error' | 'critical';
|
|
@@ -394,4 +394,4 @@ declare function controlRunToFeedbackTrajectory<TState, TAction, TActionResult>(
|
|
|
394
394
|
}): FeedbackTrajectory;
|
|
395
395
|
//#endregion
|
|
396
396
|
export { AnalystFindingDigest as A, ControlRunResult as B, createFeedbackTrajectory as C, renderPreferenceMemoryMarkdown as D, feedbackTrajectoryToOptimizerRow as E, ControlActionOutcome as F, StopDecision as G, ControlRuntimeError as H, ControlBudget as I, subjectiveEval as J, objectiveEval as K, ControlContext as L, AnalystRunDigest as M, analystFindingDigest as N, summarizePreferenceMemory as O, analystRunDigest as P, ControlDecision as R, controlRunToFeedbackTrajectory as S, feedbackTrajectoriesToOptimizerRows as T, ControlSeverity as U, ControlRuntimeConfig as V, ControlStep as W, PreferenceMemoryEntry as _, FeedbackLabel as a, analystRunToReviewRequests as b, FeedbackOptimizerRow as c, FeedbackTask as d, FeedbackTrajectory as f, InMemoryFeedbackTrajectoryStore as g, FileSystemFeedbackTrajectoryStore as h, FeedbackAttempt as i, AnalystReviewDecision as j, withAssignedFeedbackSplit as k, FeedbackOutcome as l, FeedbackTrajectoryStore as m, AnalystReviewRequest as n, FeedbackLabelKind as o, FeedbackTrajectoryFilter as p, runAgentControlLoop as q, FeedbackArtifactType as r, FeedbackLabelSource as s, AnalystFeedbackTrajectoryOptions as t, FeedbackSplitPolicy as u, ProposedSideEffect as v, feedbackTrajectoriesToDatasetScenarios as w, assignFeedbackSplit as x, analystRunToFeedbackTrajectory as y, ControlEvalResult as z };
|
|
397
|
-
//# sourceMappingURL=feedback-trajectory-
|
|
397
|
+
//# sourceMappingURL=feedback-trajectory-eHWNv5Aj.d.ts.map
|
package/dist/{feedback-trajectory-CMnv_uYs.d.ts.map → feedback-trajectory-eHWNv5Aj.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-trajectory-
|
|
1
|
+
{"version":3,"file":"feedback-trajectory-eHWNv5Aj.d.ts","names":[],"sources":["../src/control-runtime.ts","../src/feedback-trajectory-review.ts","../src/feedback-trajectory.ts"],"mappings":";;;;;;;KAkBY;KACA;UAEK;;EAEf;;EAEA;;EAEA;;EAEA,WAAW;;EAEX;;EAEA;;EAEA;;EAEA,WAAW;;UAGI;EACf;EACA;EACA;;UAGe,oBAAoB,QAAQ;;;;;EAK3C;;;;;EAKA;;EAEA;;EAEA,oBAAoB,OAAO;;EAE3B,qBAAqB,QAAQ;;UAGd,eACf,QACA,SACA,eACA,cAAc,oBAAoB;EAElC;EACA,OAAO;EACP,OAAO;EACP,SAAS,YAAY,QAAQ,SAAS,eAAe;EACrD,QAAQ;EACR;EACA;EACA;EACA;EACA,aAAa;EACb,UAAU;;KAGA,gBAAgB;EAEtB;EACA,QAAQ;EACR;;EAGA;EACA;EACA;EACA;;EAEA,e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F,WAAW;;UAGI;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA,UAAU;EACV;EACA;;cAUW,2CAA2C;mBACrC;EAEX,KAAK,YAAY,qBAAqB;EAItC,IAAI,aAAa,QAAQ;EAKzB,KAAK,SAAQ,2BAAgC,QAAQ;EAMrD,cAAc,YAAY,SAAS,kBAAkB,QAAQ;EAa7D,YACJ,YACA,OAAO,eACP,qBACC,QAAQ;;cAsBA,6CAA6C;mBACvC;mBACA;UACT;EAER,YAAY;IAAW;;EAIjB,KAAK,YAAY,qBAAqB;EAMtC,IAAI,aAAa,QAAQ;EAKzB,KAAK,SAAQ,2BAAgC,QAAQ;EAKrD,cAAc,YAAY,SAAS,kBAAkB,QAAQ;EAO7D,YACJ,YACA,OAAO,eACP,qBACC,QAAQ;UAOG;UAWA;;iBA8BA,yBAAyB;EACvC;EACA;EACA;EACA,MAAM;EACN,WAAW;EACX,SAAS;EACT,UAAU;EACV,QAAQ;EACR,OAAO;EACP;EACA,WAAW;IACT;;iBAqBY,+BACd,KAAK,kBACL,SAAS,mCACR;;iBAsFa,2BACd,KAAK,kBACL;EAAW;IACV;iBA4Da,oBACd,YAAY,KAAK,iEACjB,SAAQ,sBACP;iBAca,0BACd,YAAY,oBACZ,SAAS,sBACR;iBAuBa,uCACd,cAAc,uBACb;iBAIa,iCACd,YAAY,qBACX;iBA6Ca,oCACd,cAAc,uBACb;iBAoDa,0BACd,cAAc,sBACd;EAAW;IACV;iBA2Ba,+BAA+B,SAAS;iBA+BxC,+BAA+B,QAAQ,SAAS,eAC9D,KAAK,iBAAiB,QAAQ,SAAS,gBACvC;EACE;EACA;EACA,eAAe;EACf,oBAAoB,MAAM,YAAY,QAAQ,SAAS;EACvD,0BACE,MAAM,YAAY,QAAQ,SAAS,mBAChC;EACL;IAED"}
|
package/dist/hosted/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as InsightReport } from "../insight-report-DETqPc_A.js";
|
|
2
|
-
import { _ as UnixNanoTimestamp, a as hostedTenantFromEnv, c as EvalRunGenerationSnapshot, d as HostedIngestHeaders, f as HostedWireVersion, g as TraceSpanEvent, h as IngestTracesRequest, i as hostedClientFromEnv, l as EvalRunStatus, m as IngestResponse, n as HostedTenant, o as EvalRunCellScore, p as IngestEvalRunsRequest, r as createHostedClient, s as EvalRunEvent, t as HostedClient, u as HOSTED_WIRE_VERSION } from "../client-
|
|
2
|
+
import { _ as UnixNanoTimestamp, a as hostedTenantFromEnv, c as EvalRunGenerationSnapshot, d as HostedIngestHeaders, f as HostedWireVersion, g as TraceSpanEvent, h as IngestTracesRequest, i as hostedClientFromEnv, l as EvalRunStatus, m as IngestResponse, n as HostedTenant, o as EvalRunCellScore, p as IngestEvalRunsRequest, r as createHostedClient, s as EvalRunEvent, t as HostedClient, u as HOSTED_WIRE_VERSION } from "../client-CuQgX33c.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/hosted/schemas.d.ts
|
|
5
5
|
declare const UnixNanoTimestampSchema: z.ZodType<UnixNanoTimestamp>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { c as ValidationError, t as AgentEvalError } from "./errors-DEE6u6ot.js";
|
|
2
2
|
import { T as RunPaidCallInput, c as CostLedgerHandle, f as CostLedgerSummary, m as CostReceipt, o as CostLedger, p as CostProvenance } from "./cost-ledger-DbQdN3nO.js";
|
|
3
3
|
import { a as RunRecord, s as RunSplitTag } from "./run-record-DTv1MdjK.js";
|
|
4
|
-
import { _ as ProposalFinding, f as AnalystUsageReceipt, i as AnalystFinding, l as AnalystRunResult
|
|
4
|
+
import { D as TraceAnalysisStore, _ as ProposalFinding, f as AnalystUsageReceipt, i as AnalystFinding, l as AnalystRunResult } from "./types-DzuaM493.js";
|
|
5
5
|
import { Y as RawProviderSink, it as ServedModelPolicy, p as ChatClient, w as LlmCallMetadata } from "./types-gvRsyJLh.js";
|
|
6
|
-
import { P as PairedArmsComparison, ft as EvidenceReceipt, it as CampaignEvidenceContext } from "./statistical-heldout-
|
|
6
|
+
import { P as PairedArmsComparison, ft as EvidenceReceipt, it as CampaignEvidenceContext } from "./statistical-heldout-0La5ZTlv.js";
|
|
7
7
|
import { d as PairedBootstrapResult } from "./paired-promotion-decision-CGzg0cI_.js";
|
|
8
|
-
import { A as LabeledScenarioWrite, B as ScoredSurfaceOutcome, C as JudgeDimension, D as LabeledScenarioSampleArgs, E as LabeledScenarioRecord, H as SurfaceProposer, N as ParetoParent, O as LabeledScenarioSource, R as Scenario, S as JudgeConfig, T as LabelTrust, _ as GateDecision, a as CampaignResult, b as GenerationRecord, c as CampaignTraceWriter, d as DispatchContext, f as DispatchFn, g as GateContribution, i as CampaignCostMeter, j as MutableSurface, k as LabeledScenarioStore, l as CodeSurface, o as CampaignScenarioIdentity, p as Gate, r as CampaignCellResult, u as ComponentSurface, v as GateResult, y as GenerationCandidate } from "./types-
|
|
8
|
+
import { A as LabeledScenarioWrite, B as ScoredSurfaceOutcome, C as JudgeDimension, D as LabeledScenarioSampleArgs, E as LabeledScenarioRecord, H as SurfaceProposer, N as ParetoParent, O as LabeledScenarioSource, R as Scenario, S as JudgeConfig, T as LabelTrust, _ as GateDecision, a as CampaignResult, b as GenerationRecord, c as CampaignTraceWriter, d as DispatchContext, f as DispatchFn, g as GateContribution, i as CampaignCostMeter, j as MutableSurface, k as LabeledScenarioStore, l as CodeSurface, o as CampaignScenarioIdentity, p as Gate, r as CampaignCellResult, u as ComponentSurface, v as GateResult, y as GenerationCandidate } from "./types-C34V4Vto.js";
|
|
9
9
|
import { h as LedgerTrustedHeadRemoval, m as LedgerTrustedHead } from "./index-u0d1Jp4F.js";
|
|
10
10
|
import { r as LedgerHash } from "./canonical-CFpojCN5.js";
|
|
11
|
-
import { B as ExternalOptimizerModelBudget, E as AnalystIssueExpectation, F as ExternalOptimizerCallbackLimits, J as ExternalOptimizerWireCounts, K as ExternalOptimizerResumeMode, R as ExternalOptimizerEvaluationObservation, V as ExternalOptimizerModelCall, X as ExternalTextEvaluationRequest, Y as ExternalTextCandidate, m as AnalystBenchmarkLabelState, q as ExternalOptimizerRunnerCommand, t as AgentProfile$1, u as AnalystBenchmarkCase } from "./agent-profile-
|
|
11
|
+
import { B as ExternalOptimizerModelBudget, E as AnalystIssueExpectation, F as ExternalOptimizerCallbackLimits, J as ExternalOptimizerWireCounts, K as ExternalOptimizerResumeMode, R as ExternalOptimizerEvaluationObservation, V as ExternalOptimizerModelCall, X as ExternalTextEvaluationRequest, Y as ExternalTextCandidate, m as AnalystBenchmarkLabelState, q as ExternalOptimizerRunnerCommand, t as AgentProfile$1, u as AnalystBenchmarkCase } from "./agent-profile-B7yErX0q.js";
|
|
12
12
|
import { r as DatasetScenario, t as Dataset } from "./dataset-DQqhOCPt.js";
|
|
13
13
|
import { a as CheckerIdentity, n as VerdictCertification, t as DefaultVerdict, x as VerificationStrategySource } from "./verdict-E4eRNf7-.js";
|
|
14
14
|
import { t as DetectRewardHackingInput } from "./reward-hacking-ZXEi9VCq.js";
|
|
15
|
-
import { g as TraceSpanEvent, t as HostedClient } from "./client-
|
|
15
|
+
import { g as TraceSpanEvent, t as HostedClient } from "./client-CuQgX33c.js";
|
|
16
16
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
17
17
|
import { z } from "zod";
|
|
18
18
|
//#region src/campaign/coverage.d.ts
|
|
@@ -1595,6 +1595,10 @@ interface OptimizationMethodInput<TScenario extends Scenario, TArtifact> {
|
|
|
1595
1595
|
readonly runOptions: Readonly<OptimizationMethodRunOptions<TScenario, TArtifact>>;
|
|
1596
1596
|
/** Durable spend account shared by every method and final scoring. */
|
|
1597
1597
|
readonly costLedger: CostLedgerHandle;
|
|
1598
|
+
/** Invokes each method at the shared execution boundary, including composed children. */
|
|
1599
|
+
invokeMethod?(method: OptimizationMethod<TScenario, TArtifact>, input: OptimizationMethodInput<TScenario, TArtifact>): Promise<OptimizationMethodResult>;
|
|
1600
|
+
/** Maps this method's local surface into the complete outer candidate. */
|
|
1601
|
+
readonly surfaceToRoot?: (surface: MutableSurface) => MutableSurface;
|
|
1598
1602
|
}
|
|
1599
1603
|
/** Exact child results; costs and usage remain attributable to their owning methods. */
|
|
1600
1604
|
interface OptimizationMethodComposition {
|
|
@@ -3877,4 +3881,4 @@ declare function verifyCodeSurface(surface: CodeSurface, worktreeDir?: string):
|
|
|
3877
3881
|
declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
|
|
3878
3882
|
//#endregion
|
|
3879
3883
|
export { UserStoryVerdict as $, SearchLedgerError as $a, CreateSearchHistoryReceiptInput as $i, LoopProvenanceRecord as $n, OptimizationMethodComposition as $r, EvalFixtureValidationMode as $t, ScenarioSignal as A, SearchLedgerEvent as Aa, isTransientTransportFailure as Ai, CrossSurfaceNaiveStackSelection as An, campaignScenarioIdentity as Ao, SkillOptOptimizationMethodConfig as Ar, completionVerdict as At, ProfileMatrixRow as B, SearchPlannedOperation as Ba, MeasuredSearchCandidate as Bi, BuildTraceAnalystSurfaceDispatchOptions as Bn, gepaOptimizationMethod as Br, RolloutArgumentDiffOptions as Bt, SingleRunLockOptions as C, SearchCandidateSurface as Ca, ReferenceEquivalenceScenario as Ci, CrossSurfaceEvidenceBreakdown as Cn, cellCachePath as Co, CanaryAlert as Cr, CorrectnessChecker as Ct, campaignMeanComposite as D, SearchLedger as Da, LlmJudgeOptions as Di, CrossSurfaceInteractionPath as Dn, inMemoryCampaignStorage as Do, CanaryReport as Dr, RequirementCheck as Dt, campaignBreakdown as E, SearchFailureReason as Ea, LlmJudgeDimension as Ei, CrossSurfaceInteractionEffect as En, fsCampaignStorage as Eo, CanaryOptions as Er, ProducedState as Et, CreateProfileMatrixPlanOptions as F, SearchOperationKind as Fa, runImprovementLoop as Fi, CrossSurfaceRankedSingle as Fn, GepaEngineOptions as Fr, neutralizeText as Ft, runProfileMatrixSegment as G, SearchSurfaceKind as Ga, SearchRecorderOptions as Gi, BuildLoopProvenanceArgs as Gn, ExternalTextOptimizerContext as Gr, rolloutArgumentDiff as Gt, RunProfileMatrixSegmentOptions as H, SearchSourceRef as Ha, SearchExecutionIdentity as Hi, TraceAnalystScenario as Hn, OptimizerModelBudget as Hr, ScoredRollout as Ht, FinalizeProfileMatrixOptions as I, SearchOperationRecordedEvent as Ia, PremeasuredOptimizationBaseline as Ii, CrossSurfaceRelativeCost as In, GepaEngineRun as Ir, FsLabeledScenarioStore as It, PlaybackStep as J, SearchTokenAccounting as Ja, GepaCandidatePopulationArtifact as Ji, LoopProvenanceArgsFromResult as Jn, ExternalTextEvaluationResponse as Jr, EvalFixture as Jt, PlaybackContext as K, SearchTaskAttemptedEvent as Ka, SearchRunIdentity as Ki, EmitLoopProvenanceArgs as Kn, ExternalTextOptimizerResult as Kr, NeutralizationGateOptions as Kt, FinalizedProfileMatrixResult as L, SearchPlan as La, RunOptimizationOptions as Li, CrossSurfaceSelectionPolicy as Ln, GepaOptimizationMethodConfig as Lr, FsLabeledScenarioStoreOptions as Lt, selectDiscriminative as M, SearchLedgerReplay as Ma, transientDispatchFailure as Mi, CrossSurfacePairEvidence as Mn, campaignSplitDigestFromIdentities as Mo, SkillOptTrainerConfig as Mr, verifyCompletion as Mt, resolveRunDir as N, SearchLedgerTrustedHeadMode as Na, RunImprovementLoopOptions as Ni, CrossSurfacePairIncompatibilityReason as Nn, skillOptOptimizationMethod as Nr, scopedOptimizationMethod as Nt, compareRankKeys as O, SearchLedgerAppendResult as Oa, llmJudge as Oi, CrossSurfaceInteractionReport as On, assertCampaignDesign as Oo, runCanaries as Or, SatisfiedBy as Ot, tangleTracesRoot as P, SearchModelIdentity as Pa, RunImprovementLoopResult as Pi, CrossSurfacePairwiseEntry as Pn, GepaAdaptiveEngineRun as Pr, sequentialOptimizationMethod as Pt, UserStory as Q, SearchLedgerConflictError as Qa, readGepaCandidatePopulationArtifact as Qi, LoopProvenanceOptimizationMethod as Qn, OptimizationMethodComparison as Qr, EvalFixtureScenario as Qt, ProfileMatrixCoverage as R, SearchPlanExtendedEvent as Ra, RunOptimizationResult as Ri, CrossSurfaceSelections as Rn, GepaOptimizationRecipe as Rr, LabeledScenarioStoreError as Rt, SingleRunLock as S, SearchCandidateSlotClosedEvent as Sa, ReferenceEquivalenceJudgeResult as Si, CrossSurfaceEligibility as Sn, buildCellSchedule as So, scoreRedTeamOutput as Sr, CompletionVerdict as St, CampaignBreakdown as T, SearchCostAccounting as Ta, runReferenceEquivalenceJudge as Ti, CrossSurfaceInteractionAwareSelection as Tn, createRunCostLedger as To, CanaryKind as Tr, ProducedProposal as Tt, createProfileMatrixPlan as U, SearchSurfaceEffect as Ua, SearchLedgerBinding as Ui, buildTraceAnalystSurfaceDispatch as Un, externalTextOptimizationMethod as Ur, UngroundedLiteralReport as Ut, ProfileMatrixSegmentResult as V, SearchPlannedTask as Va, ProposedSearchCandidate as Vi, TraceAnalystArtifact as Vn, OpenAICompatibleOptimizerModel as Vr, RolloutCall as Vt, finalizeProfileMatrix as W, SearchSurfaceEvidence as Wa, SearchRecorder as Wi, traceAnalystQualityJudge as Wn, ExternalTextOptimizationMethodConfig as Wr, classifyUngroundedLiterals as Wt, ScoreboardRow as X, replaySearchLedgerText as Xa, GepaCandidatePopulationSummary as Xi, LoopProvenanceCandidate as Xn, CompareOptimizationMethodsOptions as Xr, EvalFixtureLoadOptions as Xt, ScoreboardRenderOptions as Y, openSearchLedger as Ya, GepaCandidatePopulationCandidate as Yi, LoopProvenanceBackend as Yn, decodeExternalTextCandidate as Yr, EvalFixtureFile as Yt, ScoreboardSummary as Z, validateSearchLedgerEvent as Za, GepaCandidateSelectionScore as Zi, LoopProvenanceEvidence as Zn, OptimizationMethod as Zr, EvalFixtureRunPlan as Zt, componentSurfaceIdentityMaterial as _, SearchAttemptAccounting as _a, readExternalOptimizerObservationArtifact as _i, CrossSurfaceCandidateSummary as _n, planCampaignRun as _o, RedTeamCategory as _r, ProposalEventLike as _t, WorktreeAdapterError as a, SearchHistoryReceipt as aa, OptimizationMethodScore as ai, planEvalFixtureRun as an, OpenAutoPrOptions as ao, loopProvenanceSpans as ar, ProfileDispatchFn as at, surfaceDispatchRef as b, SearchCandidateRegisteredEvent as ba, ReferenceEquivalenceJudgeInput as bi, CrossSurfaceCompositionStep as bn, readCachedCell as bo, redTeamDataset as br, extractProducedState as bt, verifyCodeSurface as c, assertSearchHistoryMatchesReplay as ca, compareOptimizationMethods as ci, CrossSurfaceAdditionDecision as cn, RunEvalOptions as co, verifyLoopProvenanceRecord as cr, RunProfileMatrixOptions as ct, PhoenixEvaluationResultLike as d, verifySearchHistoryArtifact as da, combineComparisonCosts as di, CrossSurfaceBestSingleSelection as dn, CampaignCellRetryPolicy as do, DefaultProductionGateCheck as dr, runProfileMatrix as dt, SearchHistoryAdmissionOptions as ea, OptimizationMethodInput as ei, LoadEvalFixtureScenariosOptions as en, SearchLedgerIntegrityError as eo, buildLoopProvenanceRecord as er, makePlaybackDispatch as et, PhoenixEvaluatorLike as f, verifySearchHistoryReceipt as fa, costFromLedgerSummary as fi, CrossSurfaceBootstrapPolicy as fn, RunCampaignOptions as fo, DefaultProductionGateOptions as fr, BackendIntegrityError as ft, codeSurfaceIdentityMaterial as g, SearchArtifactRef as ga, ExternalOptimizerSubmittedCandidate as gi, CrossSurfaceCandidateOutcome as gn, PlanCampaignRunOptions as go, RedTeamCase as gr, ArtifactEventLike as gt, assertCodeSurfaceIdentity as h, SearchAccountingAudit as ha, ExternalOptimizerObservationSummary as hi, CrossSurfaceCandidateEvidence as hn, CampaignRunPlanCell as ho, DEFAULT_RED_TEAM_CORPUS as hr, summarizeBackendIntegrity as ht, WorktreeAdapter as i, SearchHistoryPolicy as ia, OptimizationMethodRunOptions as ii, loadEvalFixtureScenarios as in, crowdedFrontierParent as io, loopProvenanceArgsFromResult as ir, userStoryScoreboard as it, scoreDiscrimination as j, SearchLedgerHash as ja, quotaExhaustedUntil as ji, CrossSurfacePairCompatibility as jn, campaignSplitDigest as jo, SkillOptRunnerCommand as jr, createLlmCorrectnessChecker as jt, DiscriminationScore as k, SearchLedgerEntry as ka, TransientFailureOptions as ki, CrossSurfaceInteractionTask as kn, assertCampaignSplitIdentity as ko, composeGate as kr, TaskGold as kt, AutoevalsScoreLike as l, createSearchHistoryReceipt as la, optimizationTokenUsageFromSummary as li, CrossSurfaceAdditionRejectionReason as ln, runEval as lo, HeldOutGateOptions as lr, RunProfileMatrixResult as lt, phoenixEvaluatorJudge as m, OpenSearchLedgerOptions as ma, ExternalOptimizerObservationArtifact as mi, CrossSurfaceCandidateComparison as mn, CampaignRunPlan as mo, defaultProductionGate as mr, assertRealBackend as mt, GitWorktreeAdapterOptions as n, SearchHistoryCoverage as na, OptimizationMethodProvenance as ni, discoverEvalFixtures as nn, ParentSelectionContext as no, canonicalDigest as nr, scoreUserStory as nt, gitWorktreeAdapter as o, SearchHistoryRequiredError as oa, OptimizationPackageSource as oi, analyzeCrossSurfaceInteractions as on, OpenAutoPrResult as oo, provenanceRecordPath as or, ProfileMatrixError as ot, autoevalsScorerJudge as p, FileSearchLedger as pa, ExternalOptimizerExecutionSummary as pi, CrossSurfaceCandidate as pn, runCampaign as po, DefaultProductionRewardHackingOptions as pr, BackendIntegrityReport as pt, PlaybackDriver as q, SearchTaskOutcome as qa, recordCandidatePopulationSearch as qi, EmitLoopProvenanceResult as qn, ExternalOptimizationExample as qr, neutralizationGate as qt, Worktree as r, SearchHistoryCoverageRow as ra, OptimizationMethodResult as ri, loadEvalFixture as rn, ParentSelector as ro, emitLoopProvenance as rr, scoreboardSummary as rt, resolveWorktreePath as s, assertCompleteSearchHistory as sa, OptimizationTokenUsage as si, AnalyzeCrossSurfaceInteractionsInput as sn, openAutoPr as so, provenanceSpansPath as sr, ProfileSummary as st, CodeSurfaceVerification as t, SearchHistoryAuditSummary as ta, OptimizationMethodPairwise as ti, PlanEvalFixtureRunOptions as tn, CrowdedFrontierParentOptions as to, campaignMeasurementDigest as tr, renderScoreboardMarkdown as tt, AutoevalsScorerLike as u, searchHistoryCoverageRow as ua, ComparisonCost as ui, CrossSurfaceAttemptCompleteness as un, CampaignCellFailureReceipt as uo, heldOutGate as ur, ScenarioRollup as ut, renderSurfaceDiff as v, SearchCandidateDecidedEvent as va, REFERENCE_EQUIVALENCE_INPUT_LIMITS as vi, CrossSurfaceComponent as vn, CacheIssueReason as vo, RedTeamFinding as vr, RuntimeEventLike as vt, acquireSingleRunLock as w, SearchCompletedEvent as wa, createReferenceEquivalenceJudge as wi, CrossSurfaceIneligibilityReason as wn, CampaignStorage as wo, CanaryEvaluation as wr, LlmCorrectnessCheckerOpts as wt, surfaceHash as x, SearchCandidateSlot as xa, ReferenceEquivalenceJudgeOptions as xi, CrossSurfaceDistribution as xn, CellScheduleSlot as xo, redTeamReport as xr, CompletionRequirement as xt, surfaceContentHash as y, SearchCandidateLineage as ya, REFERENCE_EQUIVALENCE_JUDGE_VERSION as yi, CrossSurfaceComponentEvidence as yn, CacheRead as yo, RedTeamReport as yr, ToolCallEventLike as yt, ProfileMatrixPlan as z, SearchPlannedEvent as za, runOptimization as zi, CrossSurfaceTaskRow as zn, GepaRunnerCommand as zr, RolloutArgumentDiff as zt };
|
|
3880
|
-
//# sourceMappingURL=index-
|
|
3884
|
+
//# sourceMappingURL=index-BxWvILU8.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BxWvILU8.d.ts","names":[],"sources":["../src/campaign/coverage.ts","../src/campaign/storage.ts","../src/campaign/cell-schedule.ts","../src/campaign/cell-cache.ts","../src/campaign/plan-campaign-run.ts","../src/campaign/run-campaign.ts","../src/campaign/presets/run-eval.ts","../src/campaign/auto-pr.ts","../src/campaign/parent-selection.ts","../src/campaign/search-ledger-errors.ts","../src/campaign/search-ledger.ts","../src/campaign/search-history-receipt.ts","../src/campaign/gepa-candidate-population.ts","../src/campaign/search-ledger-recording.ts","../src/campaign/presets/run-optimization.ts","../src/campaign/presets/run-improvement-loop.ts","../src/campaign/transient-failure.ts","../src/llm-judge.ts","../src/reference-equivalence-judge.ts","../src/campaign/external-optimizer-observations.ts","../src/campaign/optimization-cost.ts","../src/campaign/presets/compare-optimization-methods.ts","../src/campaign/external-text-evaluation.ts","../src/campaign/external-text-optimization-contract.ts","../src/campaign/external-text-optimization.ts","../src/campaign/optimizer-model.ts","../src/campaign/gepa-optimization-method.ts","../src/campaign/skillopt-optimization-method.ts","../src/campaign/gates/compose.ts","../src/canary.ts","../src/red-team.ts","../src/campaign/gates/default-production-gate.ts","../src/campaign/gates/heldout-gate.ts","../src/campaign/provenance.ts","../src/campaign/analyst-surface.ts","../src/campaign/cross-surface-types.ts","../src/campaign/cross-surface-interaction.ts","../src/campaign/fixtures.ts","../src/campaign/gates/neutralization-gate.ts","../src/campaign/grounded-reflection.ts","../src/campaign/labeled-store/fs-adapter.ts","../src/campaign/neutralize.ts","../src/campaign/optimization-method-composition.ts","../src/artifact-validator.ts","../src/completion-verifier.ts","../src/produced-state.ts","../src/integrity/backend-integrity.ts","../src/campaign/presets/run-profile-matrix.ts","../src/campaign/presets/playback.ts","../src/campaign/presets/segmented-profile-matrix.ts","../src/campaign/run-dir.ts","../src/campaign/scenario-selection.ts","../src/campaign/score-utils.ts","../src/campaign/single-run-lock.ts","../src/campaign/surface-identity.ts","../src/campaign/upstream-evaluators.ts","../src/campaign/worktree/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;iBAgBgB,qBAAqB,kBAAkB,UACrD,oBAAoB,aACpB;;iBA2Bc,yBAAyB,kBAAkB,UACzD,UAAU,YACT,2BAA2B,KAAK;;iBAUnB,kCACd,oBAAoB,4BACpB;;iBAgBc,oBAAoB,kBAAkB,UACpD,oBAAoB,aACpB;;iBAOc,4BACd,oBAAoB,4BACpB,cACA;;;;;;;;;;;;;;;;;;UCnEe;;EAEf,UAAU;;EAEV,OAAO;;EAEP,KAAK;;EAEL,MAAM,cAAc,kBAAkB;;;EAGtC,OAAO,cAAc,iBAAiB;;;;;;;;;iBAUxB,qBAAqB;;;;iBA0CrB,2BAA2B;;iBAmC3B,oBAAoB;E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AAc;EAC/D,WAAW,sBAAsB;IAElC,YAAY,WAAW;iBA8CV,qBACd,eAAe,yBACf,WACA,kBAAkB,WAAW,UAE7B,QAAQ,oBAAoB,SAC5B,SAAS,qBAAqB;EAC5B;EACA,SAAS;IAAS,UAAU;IAAW,UAAU;MAAc;;EAEzD;EAAc;;EACd;EAAa,UAAU,sBAAsB;KAEpD,YAAY,WAAW;;;KCxFrB,qBAAqB;KACrB,iBAAiB,SAAS;KAC1B,aAAa,gBAAgB,aAAa,MAAM,mBAAmB;UAcvD;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;UAGM;;EAEf,OAAO;IAAQ;IAAiB;MAAkB,QAAQ;;;EAG1D,SAAS,UAAU,UAAU,kBAAkB,QAAQ;;EAEvD,QAAQ,UAAU,WAAW;;;cAIlB,6BAA6B;WAG7B;EAFX,YACE,iBACS;;UAOI;;EAEf;;EAEA;;EAEA;;;;EAIA,MAAM;;UAobS;;EAEf;;EAEA;;EAEA;;;EAGA,YAAY;;;;;iBAoJE,mBAAmB,MAAM,4BAA4B;;;;iBAgGrD,kBACd,SAAS,aACT,uBACC;;;iBAOa,oBAAoB,SAAS,aAAa"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { b as CustomTokenPricing, c as CostLedgerHandle } from "./cost-ledger-DbQdN3nO.js";
|
|
2
|
-
import { i as AnalystFinding, n as AnalystContext } from "./types-
|
|
2
|
+
import { i as AnalystFinding, n as AnalystContext } from "./types-DzuaM493.js";
|
|
3
3
|
import { A as LlmThinkingMode, p as ChatClient } from "./types-gvRsyJLh.js";
|
|
4
|
-
import { F as ExternalOptimizerCallbackLimits, V as ExternalOptimizerModelCall, W as ExternalOptimizerModelExecutionObservation, q as ExternalOptimizerRunnerCommand } from "./agent-profile-
|
|
4
|
+
import { F as ExternalOptimizerCallbackLimits, V as ExternalOptimizerModelCall, W as ExternalOptimizerModelExecutionObservation, q as ExternalOptimizerRunnerCommand } from "./agent-profile-B7yErX0q.js";
|
|
5
5
|
import { o as Severity } from "./multi-layer-verifier-BUaQ4C17.js";
|
|
6
|
-
import { l as ExactCapableAnalyst } from "./exact-types-
|
|
7
|
-
import { i as TraceAnalystDefinition } from "./default-registry-
|
|
8
|
-
import { n as TraceAnalysisEngine } from "./engine-
|
|
6
|
+
import { l as ExactCapableAnalyst } from "./exact-types-B7LC1EyX.js";
|
|
7
|
+
import { i as TraceAnalystDefinition } from "./default-registry-IGDE9XIC.js";
|
|
8
|
+
import { n as TraceAnalysisEngine } from "./engine-CX8ReXkn.js";
|
|
9
9
|
import { S as SupervisorRunTree, x as SupervisorRunSources } from "./types-vUdAx2Cj.js";
|
|
10
10
|
//#region src/semantic-concept-judge.d.ts
|
|
11
11
|
/**
|
|
@@ -476,4 +476,4 @@ declare const KNOWLEDGE_POISONING_KIND_SPEC: TraceAnalystDefinition;
|
|
|
476
476
|
declare const DEFAULT_TRACE_ANALYST_KINDS: readonly TraceAnalystDefinition[];
|
|
477
477
|
//#endregion
|
|
478
478
|
export { SemanticConceptJudgeInput as A, DspyRlmTraceEngineOptions as C, ConceptFinding as D, createChatTraceEngine as E, SemanticConceptJudgeResult as M, runSemanticConceptJudge as N, ConceptSpec as O, renderFindingSubject as S, ChatTraceEngineOptions as T, FindingSubject as _, FAILURE_MODE_KIND_SPEC as a, findingSubjectGrammarPromptFor as b, emitControlIntegrityFindings as c, FindingsStore as d, PersistedFinding as f, FINDING_SUBJECT_SYNTAX as g, FINDING_SUBJECT_KINDS as h, IMPROVEMENT_KIND_SPEC as i, SemanticConceptJudgeOptions as j, SEMANTIC_CONCEPT_JUDGE_VERSION as k, DiffPolicy as l, diffFindings as m, KNOWLEDGE_POISONING_KIND_SPEC as n, CONTROL_INTEGRITY_ANALYST as o, defaultIsMaterial as p, KNOWLEDGE_GAP_KIND_SPEC as r, ControlIntegrityAnalyst as s, DEFAULT_TRACE_ANALYST_KINDS as t, FindingsDiff as u, FindingSubjectKind as v, createDspyRlmTraceEngine as w, parseFindingSubject as x, KIND_EXPECTED_SUBJECTS as y };
|
|
479
|
-
//# sourceMappingURL=index-
|
|
479
|
+
//# sourceMappingURL=index-CbLmrWCa.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-CbLmrWCa.d.ts","names":[],"sources":["../src/semantic-concept-judge.ts","../src/analyst/chat-trace-engine.ts","../src/analyst/trace-tool-callback.ts","../src/analyst/dspy-rlm-engine.ts","../src/analyst/finding-subject.ts","../src/analyst/findings-store.ts","../src/analyst/kinds/control-integrity.ts","../src/analyst/kinds/failure-mode.ts","../src/analyst/kinds/improvement.ts","../src/analyst/kinds/knowledge-gap.ts","../src/analyst/kinds/knowledge-poisoning.ts","../src/analyst/kinds/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuDY;UAEK;EACf;;EAEA;;EAEA;;EAEA,aAAa;;UAGE;EACf;EACA;;EAEA;EACA;EACA,UAAU;;UAGK;;EAEf;;EAEA;;EAEA,aAAa;IAAQ;IAAc;;;EAEnC,kBAAkB;;EAElB;EACA;;UAGe;EACf;EACA;;EAEA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;;EAEA;EACA;;;;;;;;KASU;UAQK;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,MAAM;;EAEN,UAAU;EACV,aAAa;EACb;EACA,WAAW;EACX,SAAS;;;;;;EAMT,iBAAiB;;EAEjB,oBAAoB,QAAQ,OAAO;;cAKxB;;;;;;iBAkGS,wBACpB,OAAO,2BACP,SAAS,8BACR,QAAQ;;;UCjMM;;;;;EAKf,MAAM;;EAEN;;EAEA,UAAU;;EAEV;;EAEA;;EAEA,WAAW;;EAEX;;;;;;;;;;EAUA;;;;;;iBAkCc,sBAAsB,SAAS,yBAAyB;;;KCrG5D,0BAA0B;;;UCYrB;;EAEf,MAAM;;EAEN;;EAEA,kBAAkB,aAAa;EAC/B;;EAEA,UAAU;;EAEV;;EAEA;;;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IAAgC;;WACzC;WACA;aACP;aACA;;EAGI,QACJ,OAAO,uBAAuB,mBAC9B,KAAK,iBACJ,QAAQ;;cAUA,2BAAyB;;;cCHzB,wBAAwB;;;cC3BxB,uBAAuB;;;cCGvB,yBAAyB;;;cCPzB,+BAA+B;;;;;;;;;;;;cCP/B,sCAAsC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as CostLedgerHandle } from "./cost-ledger-DbQdN3nO.js";
|
|
2
2
|
import { a as RunRecord, n as RunCostProvenance, s as RunSplitTag } from "./run-record-DTv1MdjK.js";
|
|
3
|
-
import "./types-
|
|
4
|
-
import "./statistical-heldout-
|
|
5
|
-
import { _ as GateDecision } from "./types-
|
|
6
|
-
import "./index-
|
|
3
|
+
import "./types-DzuaM493.js";
|
|
4
|
+
import "./statistical-heldout-0La5ZTlv.js";
|
|
5
|
+
import { _ as GateDecision } from "./types-C34V4Vto.js";
|
|
6
|
+
import "./index-BxWvILU8.js";
|
|
7
7
|
import { o as InsightReport } from "./insight-report-DETqPc_A.js";
|
|
8
|
-
import { c as EvalRunGenerationSnapshot, g as TraceSpanEvent, o as EvalRunCellScore, s as EvalRunEvent } from "./client-
|
|
9
|
-
import "./define-agent-eval-
|
|
10
|
-
import "./default-registry-
|
|
11
|
-
import { v as AnalyzeRunsOptions } from "./engine-
|
|
8
|
+
import { c as EvalRunGenerationSnapshot, g as TraceSpanEvent, o as EvalRunCellScore, s as EvalRunEvent } from "./client-CuQgX33c.js";
|
|
9
|
+
import "./define-agent-eval-Cx4Ls9ta.js";
|
|
10
|
+
import "./default-registry-IGDE9XIC.js";
|
|
11
|
+
import { v as AnalyzeRunsOptions } from "./engine-CX8ReXkn.js";
|
|
12
12
|
import { AgentCandidateBenchmarkCellRef, AgentCandidateBenchmarkSuiteInputs, AgentCandidateBenchmarkTask, AgentCandidateBenchmarkTaskMaterial, AgentCandidateBundle, AgentCandidateEvaluationPolicy, AgentCandidateExperiment, AgentCandidateExperimentMaterial, AgentCandidateExperimentMeasurement, AgentImprovementCost, AgentImprovementMeasuredComparison, AgentProfileImprovementExperiment, AgentProfileImprovementExperimentMaterial, AgentProfileImprovementMeasuredComparison, AgentProfileImprovementMeasurement, AgentProfileImprovementRunCell, AgentProfileImprovementRunReceipt, AgentProfileImprovementSuiteInputs, AgentProfileImprovementTask, AgentProfileImprovementTaskMaterial, CandidateExecutionEvidence, Sha256Digest } from "@tangle-network/agent-interface";
|
|
13
13
|
//#region src/contract/measured-comparison.d.ts
|
|
14
14
|
interface SealCandidateBenchmarkSuiteOptions {
|
|
@@ -781,4 +781,4 @@ interface FromOtelSpansOptions {
|
|
|
781
781
|
declare function fromOtelSpans(opts: FromOtelSpansOptions): RunRecord[];
|
|
782
782
|
//#endregion
|
|
783
783
|
export { diffRunBaselineToWinner as $, CodeAgentSessionActionStatus as A, measuredComparisonFromCandidateExperiment as At, AgentTraceFile as B, fromOpenCodeSession as C, EvaluatePairedMeasurementsOptions as Ct, streamCodeAgentJsonlFile as D, RunCandidateExperimentOptions as Dt, parseCodeAgentJsonlFile as E, PairedMeasurementEvaluation as Et, CodeAgentSessionTerminalStatus as F, verifyCandidateExperiment as Ft, PartitionByAuthoringModelResult as G, AgentTraceRange as H, observeCodeAgentSession as I, verifyCandidateExperimentComparison as It, EvalCellScoreDelta as J, parseAgentTrace as K, AgentTraceContributor as L, CodeAgentSessionExecutionReceipt as M, sealCandidateBenchmarkSuite as Mt, CodeAgentSessionObservation as N, sealCandidateBenchmarkTask as Nt, CodeAgentSessionAction as O, SealCandidateBenchmarkSuiteOptions as Ot, CodeAgentSessionSource as P, sealCandidateExperiment as Pt, diffGenerations as Q, AgentTraceContributorType as R, fromKimiCodeSession as S, CompareCandidateExperimentOptions as St, parseCodeAgentJsonl as T, PairedMeasurementAdapter as Tt, AgentTraceRecord as U, AgentTraceIndex as V, AuthoringProvenance as W, EvalGenerationDiff as X, EvalDimensionDelta as Y, EvalRunDiff as Z, CodeAgentSessionIntakeResult as _, sealAgentProfileImprovementSuite as _t, FromFeedbackTableOptions as a, FromRunRecordDirOptions as at, fromClaudeCodeSession as b, CandidateExperimentExecutionInput as bt, CodeAgentStoreObservation as c, fromRunRecordDir as ct, CodeAgentStoreScope as d, CompareAgentProfileImprovementExperimentOptions as dt, diffRuns as et, CodeAgentStoreSession as f, RunAgentProfileImprovementExperimentOptions as ft, CodeAgentSessionIntakeOptions as g, sealAgentProfileImprovementExperiment as gt, CodeAgentSessionDiagnostic as h, runAgentProfileImprovementExperiment as ht, FeedbackTableRow as i, evalReportingSuite as it, CodeAgentSessionActionSurface as j, runCandidateExperiment as jt, CodeAgentSessionActionKind as k, evaluatePairedMeasurements as kt, CodeAgentStoreRejection as l, AgentProfileImprovementExperimentExecutionInput as lt, CodeAgentJsonlLine as m, measuredComparisonFromAgentProfileImprovementExperiment as mt, fromOtelSpans as n, EvalReportingSuiteOptions as nt, FromFeedbackTableResult as o, FromRunRecordDirResult as ot, observeCodeAgentStore as p, SealAgentProfileImprovementSuiteOptions as pt, partitionRunsByAuthoringModel as q, FeedbackTableMeta as r, EvalReportingSuiteResult as rt, fromFeedbackTable as s, RunRecordRejection as st, FromOtelSpansOptions as t, EvalReportingSuiteInput as tt, CodeAgentStoreRejections as u, AgentProfileImprovementExperimentRun as ut, CodeAgentSessionMetrics as v, sealAgentProfileImprovementTask as vt, fromPiSession as w, PairedMeasurement as wt, fromCodexSession as x, CandidateExperimentRun as xt, ParsedCodeAgentJsonl as y, verifyAgentProfileImprovementExperimentComparison as yt, AgentTraceConversation as z };
|
|
784
|
-
//# sourceMappingURL=index-
|
|
784
|
+
//# sourceMappingURL=index-DxNYmx4a.d.ts.map
|