@tangle-network/agent-eval 0.199.1 → 0.200.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 +4 -0
- package/dist/analyst/index.d.ts +1 -63
- package/dist/analyst/index.d.ts.map +1 -1
- package/dist/{index-D4pC7Tvd.d.ts → index-D4pC7Tvd2.d.ts} +1 -1
- package/dist/index-D4pC7Tvd2.d.ts.map +1 -0
- package/dist/{index-DNgf5gyG.d.ts → index-DNgf5gyG2.d.ts} +1 -1
- package/dist/index-DNgf5gyG2.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/jev-protocol-CpKI7XSu.d.ts +82 -0
- package/dist/jev-protocol-CpKI7XSu.d.ts.map +1 -0
- package/dist/jev-protocol.d.ts +2 -82
- package/dist/jev-review-Cu9xtIu4.js +155 -0
- package/dist/jev-review-Cu9xtIu4.js.map +1 -0
- package/dist/jev-review-D4ynCORp.d.ts +76 -0
- package/dist/jev-review-D4ynCORp.d.ts.map +1 -0
- package/dist/jev.d.ts +2 -73
- package/dist/jev.d.ts.map +1 -1
- package/dist/jev.js +2 -151
- package/dist/jev.js.map +1 -1
- package/dist/matrix/index.d.ts +1 -1
- package/dist/{matrix--IZKROxD.d.ts → matrix-_NLSWsKM.d.ts} +2 -2
- package/dist/{matrix--IZKROxD.d.ts.map → matrix-_NLSWsKM.d.ts.map} +1 -1
- package/dist/multishot/golden/index.d.ts +1 -1
- package/dist/multishot/golden/index.js +1 -1
- package/dist/multishot/index.d.ts +1 -1
- package/dist/multishot/index.js +1 -1
- package/dist/openapi.json +1 -1
- package/dist/rl.d.ts +278 -1
- package/dist/rl.d.ts.map +1 -1
- package/dist/rl.js +576 -2
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +1 -1
- package/dist/trace-questions-DnqdmwyV.d.ts +68 -0
- package/dist/trace-questions-DnqdmwyV.d.ts.map +1 -0
- package/dist/{types-B3jzCp0p2.js → types-B3jzCp0p.js} +1 -1
- package/dist/types-B3jzCp0p.js.map +1 -0
- package/docs/jev-behavior-review.md +24 -0
- package/docs/public-api.md +50 -31
- package/package.json +1 -1
- package/dist/index-D4pC7Tvd.d.ts.map +0 -1
- package/dist/index-DNgf5gyG.d.ts.map +0 -1
- package/dist/jev-protocol.d.ts.map +0 -1
- package/dist/types-B3jzCp0p2.js.map +0 -1
package/dist/rollout/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as assertMinted, D as isRolloutLine, E as gateGamedOutcome, O as isTrainableSplit, S as ToolDef, T as assertRolloutLine, _ as RolloutProvenance, a as MintedRolloutLine, b as RolloutStep, c as ROLLOUT_ROLES, d as RolloutArtifacts, f as RolloutCapture, g as RolloutPolicy, h as RolloutOutcome, i as GatedEvidence, k as validateRolloutLine, l as ROLLOUT_SCHEMA, m as RolloutLine, n as ChatRole, o as MintedRolloutOutcome, p as RolloutCostBlock, r as ChatToolCall, s as ROLLOUT_CAPTURES, t as ChatMessage, u as ROLLOUT_SPLITS, v as RolloutRole, w as assertMintedLines, x as RolloutTask, y as RolloutSplit } from "../schema-B5LtYvn9.js";
|
|
2
2
|
import { a as mintRolloutRows, c as ScorePreference, d as observedSplitScore, f as scoreOrigin, i as RolloutSearchLineage, l as isRealnessGated, m as trainingScore, n as MintRolloutResult, o as unmintableReasons, p as trainingReward, r as RolloutScrubber, s as ScoreOrigin, t as MintRolloutOptions, u as observedScore } from "../mint-C9Lojt1V.js";
|
|
3
3
|
import { a as SftRow, c as VerifiersTokenUsage, d as toRftItem, f as toRftItems, h as toVerifiersRolloutOutputs, i as SftExportOptions, l as toJsonl, m as toVerifiersRolloutOutput, n as RewardRow, p as toSftRows, r as RftItem, s as VerifiersRolloutOutput, t as RealnessLabels, u as toRewardRows } from "../exporters-XMCYJlqT.js";
|
|
4
|
-
import { $ as HarborFinalMetrics, A as measureFormatGate, B as DEFAULT_CLAUDE_PROJECTS_DIR, C as FORMAT_GATE_DISPOSITION, Ct as gatedEvidenceOf, D as ReleaseRowRef, E as GateReport, F as openOpencodeDb, G as readRolloutJournal, H as findClaudeTranscripts, I as readOpencodeSessionMessages, J as ATIF_SCHEMA_VERSION, K as readRolloutLedger, L as ClaudeTranscript, M as DEFAULT_OPENCODE_DB, N as OpencodeSessionRow, O as assertGateReport, P as findOpencodeSessionsByDirectory, Q as HarborContentPart, R as ClaudeTranscriptRef, S as EmittedEvidence, St as gateErrors, T as GateDisposition, U as readClaudeTranscript, V as claudeProjectSlug, W as appendRolloutLines, X as HARBOR_IMPORT_GAP, Y as FromHarborOptions, Z as HarborAgent, _ as defaultRolloutScrubber, _t as GateCheckDisposition, a as buildHfDataset, at as HarborStepSource, b as scrubRolloutLine, bt as GateEntryPoint, c as runRolloutReleaseCli, ct as HarborTrajectory, d as RELEASE_FORMATS, dt as toHarborTrajectories, et as HarborImageSource, f as ReleaseFormat, ft as toHarborTrajectory, g as addScrubCounts, gt as GateCheck, h as ScrubRule, ht as GATE_POLICIES, i as ScrubReport, it as HarborStep, j as releaseRowRefs, k as gatedRolloutIds, l as DatasetCardInputs, lt as fromHarborTrajectory, m as ScrubCounts, mt as GATE_CHECK_IDS, n as BuildSummary, nt as HarborObservation, o as parseRolloutReleaseArgs, ot as HarborSubagentTrajectoryRef, p as buildDatasetCard, pt as GATE_CHECKS, q as writeRolloutLedger, r as RolloutReleaseCliArgs, rt as HarborObservationResult, s as planPushCommand, st as HarborToolCall, t as BuildOptions, tt as HarborMetrics, u as FORMAT_FILES, ut as relabelImportedSplit, v as emptyScrubCounts, vt as GateCheckId, w as FormatGateCounts, x as scrubText, xt as GatePolicy, y as scrubLines, yt as GateCheckedOutcome, z as ClaudeUsageTotals } from "../index-
|
|
4
|
+
import { $ as HarborFinalMetrics, A as measureFormatGate, B as DEFAULT_CLAUDE_PROJECTS_DIR, C as FORMAT_GATE_DISPOSITION, Ct as gatedEvidenceOf, D as ReleaseRowRef, E as GateReport, F as openOpencodeDb, G as readRolloutJournal, H as findClaudeTranscripts, I as readOpencodeSessionMessages, J as ATIF_SCHEMA_VERSION, K as readRolloutLedger, L as ClaudeTranscript, M as DEFAULT_OPENCODE_DB, N as OpencodeSessionRow, O as assertGateReport, P as findOpencodeSessionsByDirectory, Q as HarborContentPart, R as ClaudeTranscriptRef, S as EmittedEvidence, St as gateErrors, T as GateDisposition, U as readClaudeTranscript, V as claudeProjectSlug, W as appendRolloutLines, X as HARBOR_IMPORT_GAP, Y as FromHarborOptions, Z as HarborAgent, _ as defaultRolloutScrubber, _t as GateCheckDisposition, a as buildHfDataset, at as HarborStepSource, b as scrubRolloutLine, bt as GateEntryPoint, c as runRolloutReleaseCli, ct as HarborTrajectory, d as RELEASE_FORMATS, dt as toHarborTrajectories, et as HarborImageSource, f as ReleaseFormat, ft as toHarborTrajectory, g as addScrubCounts, gt as GateCheck, h as ScrubRule, ht as GATE_POLICIES, i as ScrubReport, it as HarborStep, j as releaseRowRefs, k as gatedRolloutIds, l as DatasetCardInputs, lt as fromHarborTrajectory, m as ScrubCounts, mt as GATE_CHECK_IDS, n as BuildSummary, nt as HarborObservation, o as parseRolloutReleaseArgs, ot as HarborSubagentTrajectoryRef, p as buildDatasetCard, pt as GATE_CHECKS, q as writeRolloutLedger, r as RolloutReleaseCliArgs, rt as HarborObservationResult, s as planPushCommand, st as HarborToolCall, t as BuildOptions, tt as HarborMetrics, u as FORMAT_FILES, ut as relabelImportedSplit, v as emptyScrubCounts, vt as GateCheckId, w as FormatGateCounts, x as scrubText, xt as GatePolicy, y as scrubLines, yt as GateCheckedOutcome, z as ClaudeUsageTotals } from "../index-D4pC7Tvd2.js";
|
|
5
5
|
export { ATIF_SCHEMA_VERSION, type BuildOptions, type BuildSummary, type ChatMessage, type ChatRole, type ChatToolCall, type ClaudeTranscript, type ClaudeTranscriptRef, type ClaudeUsageTotals, DEFAULT_CLAUDE_PROJECTS_DIR, DEFAULT_OPENCODE_DB, type DatasetCardInputs, type EmittedEvidence, FORMAT_FILES, FORMAT_GATE_DISPOSITION, type FormatGateCounts, type FromHarborOptions, GATE_CHECKS, GATE_CHECK_IDS, GATE_POLICIES, type GateCheck, type GateCheckDisposition, type GateCheckId, type GateCheckedOutcome, type GateDisposition, type GateEntryPoint, type GatePolicy, type GateReport, type GatedEvidence, HARBOR_IMPORT_GAP, type HarborAgent, type HarborContentPart, type HarborFinalMetrics, type HarborImageSource, type HarborMetrics, type HarborObservation, type HarborObservationResult, type HarborStep, type HarborStepSource, type HarborSubagentTrajectoryRef, type HarborToolCall, type HarborTrajectory, type MintRolloutOptions, type MintRolloutResult, type MintedRolloutLine, type MintedRolloutOutcome, type OpencodeSessionRow, RELEASE_FORMATS, ROLLOUT_CAPTURES, ROLLOUT_ROLES, ROLLOUT_SCHEMA, ROLLOUT_SPLITS, type RealnessLabels, type ReleaseFormat, type ReleaseRowRef, type RewardRow, type RftItem, type RolloutArtifacts, type RolloutCapture, type RolloutCostBlock, type RolloutLine, type RolloutOutcome, type RolloutPolicy, type RolloutProvenance, type RolloutReleaseCliArgs, type RolloutRole, type RolloutScrubber, type RolloutSearchLineage, type RolloutSplit, type RolloutStep, type RolloutTask, type ScoreOrigin, type ScorePreference, type ScrubCounts, type ScrubReport, type ScrubRule, type SftExportOptions, type SftRow, type ToolDef, type VerifiersRolloutOutput, type VerifiersTokenUsage, addScrubCounts, appendRolloutLines, assertGateReport, assertMinted, assertMintedLines, assertRolloutLine, buildDatasetCard, buildHfDataset, claudeProjectSlug, defaultRolloutScrubber, emptyScrubCounts, findClaudeTranscripts, findOpencodeSessionsByDirectory, fromHarborTrajectory, gateErrors, gateGamedOutcome, gatedEvidenceOf, gatedRolloutIds, isRealnessGated, isRolloutLine, isTrainableSplit, measureFormatGate, mintRolloutRows, observedScore, observedSplitScore, openOpencodeDb, parseRolloutReleaseArgs, planPushCommand, readClaudeTranscript, readOpencodeSessionMessages, readRolloutJournal, readRolloutLedger, relabelImportedSplit, releaseRowRefs, runRolloutReleaseCli, scoreOrigin, scrubLines, scrubRolloutLine, scrubText, toHarborTrajectories, toHarborTrajectory, toJsonl, toRewardRows, toRftItem, toRftItems, toSftRows, toVerifiersRolloutOutput, toVerifiersRolloutOutputs, trainingReward, trainingScore, unmintableReasons, validateRolloutLine, writeRolloutLedger };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { c as CostLedgerHandle } from "./cost-ledger-DbQdN3nO.js";
|
|
2
|
+
import { O as TraceAnalysisStore } from "./types-CeDfCRXp.js";
|
|
3
|
+
import { a as TraceAnalystLimits, l as RawAnalystFinding, n as TraceAnalysisEngine } from "./engine-DlKIzDKo.js";
|
|
4
|
+
//#region src/analyst/trace-questions.d.ts
|
|
5
|
+
/** One question to ask of the store. */
|
|
6
|
+
interface TraceQuestionSpec {
|
|
7
|
+
/** Stable id: letters, digits, dot, underscore, hyphen. */
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly question: string;
|
|
10
|
+
/** Guidance for this question only, after the shared rules. */
|
|
11
|
+
readonly instructions?: string;
|
|
12
|
+
}
|
|
13
|
+
interface AskTraceQuestionsOptions {
|
|
14
|
+
readonly questions: readonly TraceQuestionSpec[];
|
|
15
|
+
readonly store: TraceAnalysisStore;
|
|
16
|
+
readonly engine: TraceAnalysisEngine;
|
|
17
|
+
/** Every question and verifier charges this ledger; its ceiling bounds the whole call. */
|
|
18
|
+
readonly costLedger: CostLedgerHandle;
|
|
19
|
+
/** Stable id for cost attribution and logs. */
|
|
20
|
+
readonly runId: string;
|
|
21
|
+
/** Material every question receives before its first model call, such as the check's verdict. */
|
|
22
|
+
readonly context?: string;
|
|
23
|
+
/** Investigations running at once. Default 4. */
|
|
24
|
+
readonly concurrency?: number;
|
|
25
|
+
/** Distinct citations a finding needs. Default 2. */
|
|
26
|
+
readonly minimumEvidenceCitations?: number;
|
|
27
|
+
/** Run the independent verifier on every admitted finding. Default true. */
|
|
28
|
+
readonly verify?: boolean;
|
|
29
|
+
readonly limits?: Partial<TraceAnalystLimits>;
|
|
30
|
+
readonly signal?: AbortSignal;
|
|
31
|
+
readonly log?: (message: string, fields?: Record<string, unknown>) => void;
|
|
32
|
+
}
|
|
33
|
+
/** A finding and what the verifier, shown only its cited spans, concluded. */
|
|
34
|
+
interface VerifiedTraceFinding {
|
|
35
|
+
readonly finding: RawAnalystFinding;
|
|
36
|
+
/** The finding's trace citations, as `trace://` URIs. */
|
|
37
|
+
readonly citations: readonly string[];
|
|
38
|
+
/** `true` supported, `false` not supported, `null` when verification was off or failed. */
|
|
39
|
+
readonly verified: boolean | null;
|
|
40
|
+
/** The verifier's own words, when it answered. */
|
|
41
|
+
readonly verifierAnswer?: string;
|
|
42
|
+
}
|
|
43
|
+
interface TraceQuestionOutcome {
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly question: string;
|
|
46
|
+
readonly status: 'answered' | 'failed';
|
|
47
|
+
readonly failure?: string;
|
|
48
|
+
/** The engine's prose answer, verbatim; `null` when it returned none. */
|
|
49
|
+
readonly answer: string | null;
|
|
50
|
+
readonly findings: readonly VerifiedTraceFinding[];
|
|
51
|
+
/** `null` when the engine failed before reporting. */
|
|
52
|
+
readonly modelCalls: number | null;
|
|
53
|
+
readonly toolCalls: number | null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Ask every question, then verify every admitted finding. Never throws for a failed question or
|
|
57
|
+
* verifier: each failure is recorded on its outcome. Throws before any model call for a malformed
|
|
58
|
+
* question list or options.
|
|
59
|
+
*/
|
|
60
|
+
declare function askTraceQuestions(opts: AskTraceQuestionsOptions): Promise<TraceQuestionOutcome[]>;
|
|
61
|
+
/**
|
|
62
|
+
* A store that exposes exactly the cited spans. Discovery and whole-trace reads refuse, so the
|
|
63
|
+
* verifier cannot go looking for other support; the underlying store's bounds still apply.
|
|
64
|
+
*/
|
|
65
|
+
declare function citedSpansOnly(store: TraceAnalysisStore, allowed: ReadonlyMap<string, ReadonlySet<string>>): TraceAnalysisStore;
|
|
66
|
+
//#endregion
|
|
67
|
+
export { askTraceQuestions as a, VerifiedTraceFinding as i, TraceQuestionOutcome as n, citedSpansOnly as o, TraceQuestionSpec as r, AskTraceQuestionsOptions as t };
|
|
68
|
+
//# sourceMappingURL=trace-questions-DnqdmwyV.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-questions-DnqdmwyV.d.ts","names":[],"sources":["../src/analyst/trace-questions.ts"],"mappings":";;;;;UA6BiB;;WAEN;WACA;;WAEA;;UAGM;WACN,oBAAoB;WACpB,OAAO;WACP,QAAQ;;WAER,YAAY;;WAEZ;;WAEA;;WAEA;;WAEA;;WAEA;WACA,SAAS,QAAQ;WACjB,SAAS;WACT,OAAO,iBAAiB,SAAS;;;UAI3B;WACN,SAAS;;WAET;;WAEA;;WAEA;;UAGM;WACN;WACA;WACA;WACA;;WAEA;WACA,mBAAmB;;WAEnB;WACA;;;;;;;iBAyBW,kBACpB,MAAM,2BACL,QAAQ;;;;;iBA2JK,eACd,OAAO,oBACP,SAAS,oBAAoB,uBAC5B"}
|
|
@@ -105,4 +105,4 @@ function describeValue(value) {
|
|
|
105
105
|
//#endregion
|
|
106
106
|
export { assertMultishotShotResult as i, MultishotFatalToolError as n, MultishotShotResultError as r, MultishotDriverEmptyError as t };
|
|
107
107
|
|
|
108
|
-
//# sourceMappingURL=types-
|
|
108
|
+
//# sourceMappingURL=types-B3jzCp0p.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-B3jzCp0p.js","names":[],"sources":["../src/multishot/types.ts"],"sourcesContent":["// Public types for the multishot substrate.\n\nimport type { CostProvenance } from '../cost-ledger'\n\nexport interface MultishotMessage {\n role: 'user' | 'assistant' | 'tool'\n content: string\n toolCallId?: string\n toolCalls?: Array<{ id: string; name: string; args: Record<string, unknown> }>\n}\n\nexport interface MultishotArtifact {\n type: string\n turn: number\n invocation: { name: string; args: Record<string, unknown> }\n content: string\n}\n\nexport interface MultishotResult {\n transcript: MultishotMessage[]\n artifacts: MultishotArtifact[]\n toolCalls: number\n durationMs: number\n /** Known spend. A subtotal, not a total, when `costProvenance.kind` is\n * `uncaptured`. */\n costUsd: number\n /** Origin of `costUsd`. A shot that priced every call reports `estimated`\n * or `observed`; a shot with a call the router priced at nothing reports\n * `uncaptured`, and the matrix records the cell as under-counted instead of\n * presenting the subtotal as a complete estimate.\n *\n * Optional so an engine written before this field keeps working; the matrix\n * then judges the cell on judge receipts alone, as it did before. */\n costProvenance?: CostProvenance\n}\n\nexport interface MultishotToolDefinition {\n type: 'function'\n function: {\n name: string\n description: string\n parameters: Record<string, unknown>\n }\n}\n\n/** One chat-completion request the multishot loop issues for a single agent\n * (or driver) inference step. Mirrors the OpenAI-compat body the loop would\n * otherwise POST to the Tangle router. */\nexport interface MultishotTransportRequest {\n model: string\n messages: Array<Record<string, unknown>>\n tools?: MultishotToolDefinition[]\n temperature?: number\n maxTokens?: number\n signal?: AbortSignal\n}\n\nexport interface MultishotTransportToolCall {\n id: string\n type: 'function'\n function: { name: string; arguments: string }\n}\n\nexport interface MultishotTransportResponse {\n message: { content?: string | null; tool_calls?: MultishotTransportToolCall[] }\n usage?: { prompt_tokens?: number; completion_tokens?: number }\n /** Actual spend for this call. When omitted, the loop meters cost from\n * `usage` via the per-model estimator (estimateMultishotCost). */\n costUsd?: number\n /** Model identity the provider reported, when the transport observed one.\n * Omitted means unreported, and the requested model is used for\n * attribution — which is not proof that model answered. */\n model?: string\n}\n\n/** Execution seam for one leg of the multishot loop. The caller owns model\n * execution: agent-eval issues no provider request and holds no credential.\n * The loop still owns turn scheduling, tool dispatch, transcript capture, and\n * cost metering. agent-eval has no dependency on agent-runtime; adapt\n * agent-runtime's `profileChatClient` (or any sandbox, bridge, or router\n * client) into this signature product-side. */\nexport type MultishotTransport = (\n req: MultishotTransportRequest,\n) => Promise<MultishotTransportResponse>\n\nexport type MultishotToolExecutor = (\n args: Record<string, unknown>,\n ctx: {\n /** Caller-owned execution seam for the specialist leg this tool runs. */\n transport: MultishotTransport\n signal?: AbortSignal\n },\n) => Promise<{ content: string; costUsd: number }>\n\nexport interface MultishotPersona {\n /** Stable identifier — used for per-cell artifact paths + matrix axis keys. */\n id: string\n /** Per-domain payload (income/profile/voice/etc.) shaped by the consumer. */\n [k: string]: unknown\n}\n\n/**\n * Persona-shaping callbacks. Both are OPTIONAL: when omitted, the loop derives\n * them from the `AgentProfile` + persona payload (see `defaultShapeFromProfile`)\n * so a pure-profile call — `runMultishot({ profile, persona })` — works with no\n * role-builder functions. Provide callbacks only to override the derived shape.\n */\nexport interface MultishotShape<TPersona extends MultishotPersona> {\n /** Opening user message (turn 0) — the persona's first ask. */\n buildOpener?: (persona: TPersona) => string\n /** System prompt the driver LLM uses to roleplay the persona. Should set\n * voice, goals, constraints, time-pressure, and the \"never go silent\" rule. */\n buildDriverSystemPrompt?: (persona: TPersona) => string\n}\n\nexport class MultishotDriverEmptyError extends Error {\n constructor(public readonly turn: number) {\n super(`multishot: driver returned empty content twice at turn ${turn} — failing loud`)\n this.name = 'MultishotDriverEmptyError'\n }\n}\n\nexport class MultishotFatalToolError extends Error {\n constructor(message: string) {\n super(message)\n this.name = 'MultishotFatalToolError'\n }\n}\n\nexport class MultishotShotResultError extends Error {\n constructor(reason: string) {\n super(`multishot: shot returned an invalid MultishotResult — ${reason}`)\n this.name = 'MultishotShotResultError'\n }\n}\n\nconst MULTISHOT_ROLES = new Set(['user', 'assistant', 'tool'])\n\n/** Contract guard for the value a caller-supplied shot resolves with. The\n * matrix writes per-cell artifacts, builds judge inputs, and meters cost from\n * this value, so a malformed result must stop the cell instead of scoring a\n * degraded one. Two silent degradations this closes: an artifact with no\n * `type` matches neither the code nor the content artifact set, so the cell\n * scores as though the artifact was never produced; a non-finite `costUsd`\n * reaches `summary.totalCostUsd` and makes every cost number NaN.\n *\n * A rejected cell is still billed: the matrix cell reads the shot's own\n * `costUsd` when it is a usable amount and declares that spend on the throw,\n * so money the shot spent before returning a malformed result stays in the\n * cumulative sum the cost ceiling reads. A result whose `costUsd` is itself\n * malformed carries no usable amount, and the cell records as `uncaptured`.\n *\n * Every required field of `MultishotMessage` and `MultishotArtifact` is\n * checked, including `toolCalls` elements and `invocation.args`. Optional\n * fields are checked only when present. */\nexport function assertMultishotShotResult(value: unknown): asserts value is MultishotResult {\n if (typeof value !== 'object' || value === null) {\n throw new MultishotShotResultError(`expected an object, received ${describeValue(value)}`)\n }\n const result = value as Record<string, unknown>\n if (!Array.isArray(result.transcript)) {\n throw new MultishotShotResultError(\n `transcript must be an array, received ${describeValue(result.transcript)}`,\n )\n }\n if (!Array.isArray(result.artifacts)) {\n throw new MultishotShotResultError(\n `artifacts must be an array, received ${describeValue(result.artifacts)}`,\n )\n }\n result.transcript.forEach(assertMessage)\n result.artifacts.forEach(assertArtifact)\n assertFiniteCount(result.toolCalls, 'toolCalls')\n assertFiniteCount(result.durationMs, 'durationMs')\n assertFiniteCount(result.costUsd, 'costUsd')\n if (result.costProvenance !== undefined) assertCostProvenance(result.costProvenance)\n}\n\nfunction assertCostProvenance(value: unknown): void {\n const row = requireRow(value, 'costProvenance')\n if (row.kind !== 'observed' && row.kind !== 'estimated' && row.kind !== 'uncaptured') {\n throw new MultishotShotResultError(\n `costProvenance.kind must be observed, estimated or uncaptured, received ${describeValue(row.kind)}`,\n )\n }\n // The matrix reads the amount from `costUsd`; `usd` only has to agree with\n // the kind, so an uncaptured provenance cannot smuggle in a total.\n if (row.kind === 'uncaptured') {\n if (row.usd !== null) {\n throw new MultishotShotResultError(\n `uncaptured costProvenance.usd must be null, received ${describeValue(row.usd)}`,\n )\n }\n return\n }\n assertFiniteCount(row.usd, 'costProvenance.usd')\n}\n\nfunction assertMessage(value: unknown, index: number): void {\n const row = requireRow(value, `transcript[${index}]`)\n if (typeof row.role !== 'string' || !MULTISHOT_ROLES.has(row.role)) {\n throw new MultishotShotResultError(\n `transcript[${index}].role must be user, assistant or tool, received ${describeValue(row.role)}`,\n )\n }\n assertString(row.content, `transcript[${index}].content`)\n if (row.toolCallId !== undefined) {\n assertString(row.toolCallId, `transcript[${index}].toolCallId`)\n }\n if (row.toolCalls === undefined) return\n if (!Array.isArray(row.toolCalls)) {\n throw new MultishotShotResultError(\n `transcript[${index}].toolCalls must be an array when present, received ${describeValue(row.toolCalls)}`,\n )\n }\n row.toolCalls.forEach((call, callIndex) => {\n const field = `transcript[${index}].toolCalls[${callIndex}]`\n const row = requireRow(call, field)\n assertString(row.id, `${field}.id`)\n assertString(row.name, `${field}.name`)\n requireRow(row.args, `${field}.args`)\n })\n}\n\nfunction assertArtifact(value: unknown, index: number): void {\n const row = requireRow(value, `artifacts[${index}]`)\n assertString(row.type, `artifacts[${index}].type`)\n assertString(row.content, `artifacts[${index}].content`)\n assertFiniteCount(row.turn, `artifacts[${index}].turn`)\n const invocation = requireRow(row.invocation, `artifacts[${index}].invocation`)\n assertString(invocation.name, `artifacts[${index}].invocation.name`)\n requireRow(invocation.args, `artifacts[${index}].invocation.args`)\n}\n\nfunction requireRow(value: unknown, field: string): Record<string, unknown> {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new MultishotShotResultError(\n `${field} must be an object, received ${describeValue(value)}`,\n )\n }\n return value as Record<string, unknown>\n}\n\nfunction assertString(value: unknown, field: string): void {\n if (typeof value !== 'string') {\n throw new MultishotShotResultError(\n `${field} must be a string, received ${describeValue(value)}`,\n )\n }\n}\n\nfunction assertFiniteCount(value: unknown, field: string): void {\n if (typeof value !== 'number' || !Number.isFinite(value) || value < 0) {\n throw new MultishotShotResultError(\n `${field} must be a finite number >= 0, received ${describeValue(value)}`,\n )\n }\n}\n\nfunction describeValue(value: unknown): string {\n if (value === null) return 'null'\n if (Array.isArray(value)) return 'an array'\n if (typeof value === 'object') return 'an object'\n return `${typeof value} ${String(value)}`\n}\n"],"mappings":";AAmHA,IAAa,4BAAb,cAA+C,MAAM;CACvB;CAA5B,YAAY,MAA8B;EACxC,MAAM,0DAA0D,KAAK,gBAAgB;EAD3D,KAAA,OAAA;EAE1B,KAAK,OAAO;CACd;AACF;AAEA,IAA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AEF,OAAO;AACT;AAEA,SAAS,aAAa,OAAgB,OAAqB;CACzD,IAAI,OAAO,UAAU,UACnB,MAAM,IAAI,yBACR,GAAG,MAAM,8BAA8B,cAAc,KAAK,GAC5D;AAEJ;AAEA,SAAS,kBAAkB,OAAgB,OAAqB;CAC9D,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ,GAClE,MAAM,IAAI,yBACR,GAAG,MAAM,0CAA0C,cAAc,KAAK,GACxE;AAEJ;AAEA,SAAS,cAAc,OAAwB;CAC7C,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO;CACjC,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,OAAO,GAAG,OAAO,MAAM,GAAG,OAAO,KAAK;AACxC"}
|
|
@@ -144,6 +144,30 @@ requires resolution. Never convert an unresolved safety review to a perfect scor
|
|
|
144
144
|
critical constraint failure into unrelated high scores. Working feedback must not expose the
|
|
145
145
|
independent final evaluator, protected holdout labels, or monitor control credentials to the worker.
|
|
146
146
|
|
|
147
|
+
## Claims an exact checker verified
|
|
148
|
+
|
|
149
|
+
An exact checker decides whether an artifact satisfies the checker's own encoding of a statement.
|
|
150
|
+
It cannot decide whether that encoding matches the statement the source meant.
|
|
151
|
+
An agent that reads the checker finds the cases where they differ.
|
|
152
|
+
A claim in such a case passes every exact check and settles nothing.
|
|
153
|
+
|
|
154
|
+
`/rl` exports `claimIntegrityVerdict` for this case.
|
|
155
|
+
It decides `pass`, `hack` or `unknown` for one claim from signals the caller computes:
|
|
156
|
+
|
|
157
|
+
- `scopeSignals`: predicates over the claim's parameters, from a `SourceScope` written from the source by someone other than the checker's author. The source excludes the case, lists it, or reports it checked.
|
|
158
|
+
- `farmingSignal`: one parameter value repeated across a lane's sweep of claims.
|
|
159
|
+
- `graderReferenceSignal`: the claim page justifies itself by the checker or by the printed letter.
|
|
160
|
+
- `refereeSignal`: a model reads the source and the claim's parameters, never the claimant's prose (`sourceScopeRefereeMessages`, `parseSourceScopeReferee`).
|
|
161
|
+
- `jevSignal`: typed questions over the same brief (`claimIntegrityJevReview`). The caller supplies calibrated thresholds.
|
|
162
|
+
- `monitorSignal`: `askTraceQuestions` with `claimIntegrityTraceQuestions`, on escalation only.
|
|
163
|
+
- `checkerReadSignal`: context for a reader; it never moves a verdict.
|
|
164
|
+
|
|
165
|
+
The policy fails closed.
|
|
166
|
+
A pass needs a declared scope and a referee that evaluated the claim, with nothing against it.
|
|
167
|
+
An exact signal decides `hack`, and so do two distinct kinds of signal.
|
|
168
|
+
One kind alone holds the claim as `unknown`.
|
|
169
|
+
Keep verdicts, scopes and questions away from the agent that filed the claim: an agent scored on them learns to hide the case.
|
|
170
|
+
|
|
147
171
|
## Security and validation boundaries
|
|
148
172
|
|
|
149
173
|
TypeSafe's Jev 1.13 documentation explicitly warns that adversarial state content can move the
|
package/docs/public-api.md
CHANGED
|
@@ -7,11 +7,11 @@ Generated by `pnpm api:census` on demand — this is a dated reading, not a gate
|
|
|
7
7
|
| measure | count |
|
|
8
8
|
| --- | --- |
|
|
9
9
|
| export subpaths | 33 |
|
|
10
|
-
| published value exports (subpath x symbol) |
|
|
11
|
-
| distinct symbols |
|
|
12
|
-
| production |
|
|
13
|
-
| planned |
|
|
14
|
-
| none |
|
|
10
|
+
| published value exports (subpath x symbol) | 1589 |
|
|
11
|
+
| distinct symbols | 1401 |
|
|
12
|
+
| production | 1048 |
|
|
13
|
+
| planned | 278 |
|
|
14
|
+
| none | 263 |
|
|
15
15
|
|
|
16
16
|
Type-only exports are not listed: a type binds no runtime surface, and removing one cannot break a caller at run time.
|
|
17
17
|
|
|
@@ -460,7 +460,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
460
460
|
|
|
461
461
|
### `./analyst`
|
|
462
462
|
|
|
463
|
-
131 value exports — 79 production,
|
|
463
|
+
131 value exports — 79 production, 20 planned, 32 none.
|
|
464
464
|
|
|
465
465
|
| symbol | consumer | evidence |
|
|
466
466
|
| --- | --- | --- |
|
|
@@ -489,7 +489,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
489
489
|
| `AnalystRegistry` | production | blueprint-agent:scripts/experiments/vb-multi-analyst.ts |
|
|
490
490
|
| `analystUsageReceiptFromPrimeUsage` | production | this package: src/analyst/benchmark-runner-prime.ts:19 |
|
|
491
491
|
| `appendVerificationArtifactsToOtlp` | production | this package: src/analyst/benchmark-public-data.ts:32 |
|
|
492
|
-
| `askTraceQuestions` |
|
|
492
|
+
| `askTraceQuestions` | planned | doc: docs/jev-behavior-review.md |
|
|
493
493
|
| `assertProposalFindings` | production | agent-runtime:src/improvement/code-execution.ts |
|
|
494
494
|
| `behavioralAnalyst` | production | agent-dev-container:products/intelligence/api/src/lib/deep-trace-analyst.ts |
|
|
495
495
|
| `bindAnalyst` | planned | doc: docs/trace-analysis.md |
|
|
@@ -649,16 +649,16 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
649
649
|
| symbol | consumer | evidence |
|
|
650
650
|
| --- | --- | --- |
|
|
651
651
|
| `acquireSingleRunLock` | production | agent-knowledge:src/memory/run-control.ts |
|
|
652
|
-
| `aide` | production | this package: scripts/search-sim.ts:
|
|
652
|
+
| `aide` | production | this package: scripts/search-sim.ts:146 |
|
|
653
653
|
| `analyzeCrossSurfaceInteractions` | none | only this package's tests: src/campaign/cross-surface-interaction.test.ts:2 |
|
|
654
|
-
| `asha` | production | this package: scripts/search-sim.ts:
|
|
654
|
+
| `asha` | production | this package: scripts/search-sim.ts:120 |
|
|
655
655
|
| `assertCampaignDesign` | production | this package: src/campaign/plan-campaign-run.ts:10 |
|
|
656
656
|
| `assertCampaignSplitIdentity` | production | agent-knowledge:src/memory/experiment/learning-pairs.ts |
|
|
657
657
|
| `assertCodeSurfaceIdentity` | none | — |
|
|
658
658
|
| `assertCompleteSearchHistory` | production | this package: src/campaign/optimization-method.ts:14 |
|
|
659
659
|
| `assertSearchHistoryMatchesState` | planned | doc: docs/search-ledger.md |
|
|
660
660
|
| `autoevalsScorerJudge` | none | only this package's tests: src/campaign/upstream-evaluators.test.ts:6 |
|
|
661
|
-
| `beam` | production | this package: scripts/search-sim.ts:
|
|
661
|
+
| `beam` | production | this package: scripts/search-sim.ts:146 |
|
|
662
662
|
| `buildCellSchedule` | production | this package: src/campaign/plan-campaign-run.ts:9 |
|
|
663
663
|
| `buildEvidenceVector` | planned | doc: docs/experiment.md |
|
|
664
664
|
| `buildLoopProvenanceRecord` | none | only this package's tests: tests/campaign/candidate-attribution.test.ts:5 |
|
|
@@ -683,18 +683,18 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
683
683
|
| `createReferenceEquivalenceJudge` | none | only this package's tests: src/reference-equivalence-judge.test.ts:13 |
|
|
684
684
|
| `createRunCostLedger` | production | agent-dev-container:products/intelligence/api/src/lib/eval-engine.ts |
|
|
685
685
|
| `createSearchHistoryReceipt` | production | this package: src/campaign/search-ledger-recording.ts:27 |
|
|
686
|
-
| `crowdedFrontierParent` | production | this package: scripts/search-sim.ts:
|
|
686
|
+
| `crowdedFrontierParent` | production | this package: scripts/search-sim.ts:146 |
|
|
687
687
|
| `decideSearchClaim` | production | this package: src/campaign/search-kernel.ts:42 |
|
|
688
688
|
| `decodeExternalTextCandidate` | production | agent-runtime:src/improvement/method-execution.ts |
|
|
689
689
|
| `DEFAULT_EXTERNAL_OPTIMIZER_CALLBACK_LIMITS` | none | — |
|
|
690
690
|
| `DEFAULT_EXTERNAL_OPTIMIZER_PROCESS_LIMITS` | none | — |
|
|
691
691
|
| `defaultProductionGate` | production | agent-app:src/eval-campaign/index.ts |
|
|
692
692
|
| `detectScale` | production | this package: src/campaign/gates/promotion-policy.ts:25 |
|
|
693
|
-
| `developmentClaim` | production | this package: scripts/generate-synthetic-search-ledger.ts:
|
|
693
|
+
| `developmentClaim` | production | this package: scripts/generate-synthetic-search-ledger.ts:37 |
|
|
694
694
|
| `dimensionRegressions` | production | agent-dev-container:products/intelligence/api/src/lib/optimization-engine.ts |
|
|
695
695
|
| `discoverEvalFixtures` | planned | doc: docs/eval-fixtures.md |
|
|
696
696
|
| `emitLoopProvenance` | production | this package: src/contract/self-improve.ts:36 |
|
|
697
|
-
| `estimateNode` | production | this package: scripts/search-sim.ts:
|
|
697
|
+
| `estimateNode` | production | this package: scripts/search-sim.ts:121 |
|
|
698
698
|
| `estimateNodeFromCells` | production | this package: scripts/synthetic-search-ledger.ts:60 |
|
|
699
699
|
| `externalSurface` | none | — |
|
|
700
700
|
| `externalTextOptimizationMethod` | production | agent-app:src/eval-campaign/index.ts |
|
|
@@ -725,12 +725,12 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
725
725
|
| `neutralizationGate` | planned | consumer tests: tax-agent:tests/eval/benchmarks/taxcalc/evolve.ts |
|
|
726
726
|
| `neutralizeText` | planned | consumer tests: tax-agent:tests/eval/benchmarks/taxcalc/compile-and-prove/compile-diff.ts |
|
|
727
727
|
| `openAutoPr` | production | this package: src/campaign/presets/run-improvement-loop.ts:8 |
|
|
728
|
-
| `openSearchLedger` | production | this package: scripts/generate-synthetic-search-ledger.ts:
|
|
728
|
+
| `openSearchLedger` | production | this package: scripts/generate-synthetic-search-ledger.ts:37 |
|
|
729
729
|
| `optimizationTokenUsageFromSummary` | production | this package: src/campaign/external-text-optimization.ts:41 |
|
|
730
730
|
| `pairHoldout` | production | agent-dev-container:products/intelligence/api/src/lib/run-provenance.ts |
|
|
731
731
|
| `paretoPolicy` | none | only this package's tests: src/campaign/gates/promotion-policy.test.ts:3 |
|
|
732
732
|
| `paretoSignificanceGate` | production | agent-app:src/eval-campaign/index.ts |
|
|
733
|
-
| `parseSearchLedgerLine` | production | this package: scripts/search-sim.ts:
|
|
733
|
+
| `parseSearchLedgerLine` | production | this package: scripts/search-sim.ts:133 |
|
|
734
734
|
| `phoenixEvaluatorJudge` | none | only this package's tests: src/campaign/upstream-evaluators.test.ts:6 |
|
|
735
735
|
| `planCampaignRun` | production | this package: src/campaign/fixtures.ts:5 |
|
|
736
736
|
| `planEvalFixtureRun` | planned | example: examples/eval-fixtures-quickstart/index.ts:11 |
|
|
@@ -748,7 +748,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
748
748
|
| `renderScoreboardMarkdown` | production | blueprint-agent:scripts/experiments/eval/launch-scoreboard/run.ts |
|
|
749
749
|
| `renderSearchSummary` | production | this package: scripts/search-meta-sim.ts:50 |
|
|
750
750
|
| `renderSurfaceDiff` | production | agent-dev-container:products/intelligence/api/src/lib/optimization-evidence-packet.ts |
|
|
751
|
-
| `replaySearchLedgerText` | production | this package: scripts/generate-synthetic-search-ledger.ts:
|
|
751
|
+
| `replaySearchLedgerText` | production | this package: scripts/generate-synthetic-search-ledger.ts:37 |
|
|
752
752
|
| `resolveExternalOptimizerCallbackLimits` | production | this package: src/analyst/dspy-rlm-engine.ts:1 |
|
|
753
753
|
| `resolveExternalOptimizerProcessLimits` | production | this package: src/analyst/benchmark-command-persistence.ts:6 |
|
|
754
754
|
| `resolveRunDir` | production | agent-dev-container:products/intelligence/api/src/lib/eval-engine.ts |
|
|
@@ -760,7 +760,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
760
760
|
| `runOptimization` | production | agent-dev-container:products/sandbox/evals/src/auto-optimization.ts |
|
|
761
761
|
| `runProfileMatrix` | production | agent-runtime:examples/product-eval/product-eval.ts |
|
|
762
762
|
| `runProfileMatrixSegment` | production | discovery-lab:tools/run-profile-confirmation.mjs |
|
|
763
|
-
| `runSearch` | production | this package: scripts/search-sim.ts:
|
|
763
|
+
| `runSearch` | production | this package: scripts/search-sim.ts:122 |
|
|
764
764
|
| `scopedOptimizationMethod` | planned | doc: docs/campaign-proposers.md |
|
|
765
765
|
| `scoreboardSummary` | production | blueprint-agent:scripts/experiments/eval/launch-scoreboard/run.ts |
|
|
766
766
|
| `scoreDiscrimination` | production | supervisor-lab:bench/comms/seat-discrimination.ts |
|
|
@@ -774,7 +774,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
774
774
|
| `searchClaimReserveUsd` | production | this package: scripts/search-meta-sim.ts:43 |
|
|
775
775
|
| `searchDivergence` | planned | doc: docs/search-ledger.md |
|
|
776
776
|
| `searchEdgeId` | planned | doc: docs/search-ledger.md |
|
|
777
|
-
| `searchExpansionIndex` | production | this package: scripts/search-sim.ts:
|
|
777
|
+
| `searchExpansionIndex` | production | this package: scripts/search-sim.ts:122 |
|
|
778
778
|
| `searchHistoryCoverageRow` | production | this package: src/campaign/optimization-method.ts:14 |
|
|
779
779
|
| `SearchHistoryRequiredError` | none | — |
|
|
780
780
|
| `SearchLedgerConflictError` | production | this package: src/campaign/search-ledger.ts:36 |
|
|
@@ -787,8 +787,8 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
787
787
|
| `searchProposalExecution` | production | this package: src/campaign/presets/run-optimization.ts:51 |
|
|
788
788
|
| `searchProposerView` | production | this package: src/campaign/presets/run-optimization.ts:86 |
|
|
789
789
|
| `searchReceiptAccounting` | production | this package: src/campaign/presets/run-optimization.ts:51 |
|
|
790
|
-
| `SearchRecorder` | production | this package: scripts/generate-synthetic-search-ledger.ts:
|
|
791
|
-
| `SearchState` | production | this package: scripts/search-sim.ts:
|
|
790
|
+
| `SearchRecorder` | production | this package: scripts/generate-synthetic-search-ledger.ts:37 |
|
|
791
|
+
| `SearchState` | production | this package: scripts/search-sim.ts:145 |
|
|
792
792
|
| `SearchStateView` | production | this package: scripts/search-meta-sim.ts:49 |
|
|
793
793
|
| `searchTaskSetDigest` | production | this package: src/campaign/search-ledger-recording.ts:57 |
|
|
794
794
|
| `searchUnitScores` | production | this package: src/campaign/estimate-node.ts:28 |
|
|
@@ -1063,7 +1063,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1063
1063
|
|
|
1064
1064
|
### `./jev`
|
|
1065
1065
|
|
|
1066
|
-
15 value exports —
|
|
1066
|
+
15 value exports — 8 production, 6 planned, 1 none.
|
|
1067
1067
|
|
|
1068
1068
|
| symbol | consumer | evidence |
|
|
1069
1069
|
| --- | --- | --- |
|
|
@@ -1081,7 +1081,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1081
1081
|
| `parseJevQuestions` | production | this package: src/jev.ts:7 |
|
|
1082
1082
|
| `parseJevRequest` | production | this package: src/jev-review.ts:9 |
|
|
1083
1083
|
| `parseJevResult` | production | this package: src/jev-review.ts:9 |
|
|
1084
|
-
| `prepareJevReview` |
|
|
1084
|
+
| `prepareJevReview` | production | this package: src/rl/claim-integrity.ts:39 |
|
|
1085
1085
|
|
|
1086
1086
|
### `./jev/protocol`
|
|
1087
1087
|
|
|
@@ -1103,7 +1103,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1103
1103
|
| --- | --- | --- |
|
|
1104
1104
|
| `appendLedgerLine` | production | this package: src/campaign/search-ledger-file.ts:3 |
|
|
1105
1105
|
| `AtomicFileLockError` | production | this package: src/ledger-core/journal-file.ts:16 |
|
|
1106
|
-
| `canonicalString` | production | this package: scripts/search-sim.ts:
|
|
1106
|
+
| `canonicalString` | production | this package: scripts/search-sim.ts:155 |
|
|
1107
1107
|
| `FileLedgerJournal` | production | this package: src/campaign/search-ledger.ts:23 |
|
|
1108
1108
|
| `hashCanonical` | production | discovery-lab:tools/provenance.mjs |
|
|
1109
1109
|
| `jsonDocument` | production | this package: src/agent-profile-cell.ts:3 |
|
|
@@ -1280,7 +1280,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1280
1280
|
|
|
1281
1281
|
### `./rl`
|
|
1282
1282
|
|
|
1283
|
-
|
|
1283
|
+
82 value exports — 18 production, 30 planned, 34 none.
|
|
1284
1284
|
|
|
1285
1285
|
| symbol | consumer | evidence |
|
|
1286
1286
|
| --- | --- | --- |
|
|
@@ -1294,6 +1294,14 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1294
1294
|
| `buildRlDataset` | production | this package: src/rl/corpus.ts:24 |
|
|
1295
1295
|
| `buildVerifiedFindingRow` | none | only this package's tests: src/rl/verified-findings-dataset.test.ts:5 |
|
|
1296
1296
|
| `campaignToRunRecords` | production | agent-builder:src/lib/.server/eval/loops/auto-research-runner.ts |
|
|
1297
|
+
| `checkerReadSignal` | planned | doc: docs/jev-behavior-review.md |
|
|
1298
|
+
| `CLAIM_INTEGRITY_VERSION` | none | — |
|
|
1299
|
+
| `claimBrief` | none | — |
|
|
1300
|
+
| `claimIntegrityDigest` | none | only this package's tests: src/rl/claim-integrity.test.ts:4 |
|
|
1301
|
+
| `claimIntegrityJevQuestions` | none | — |
|
|
1302
|
+
| `claimIntegrityJevReview` | planned | doc: docs/jev-behavior-review.md |
|
|
1303
|
+
| `claimIntegrityTraceQuestions` | planned | doc: docs/jev-behavior-review.md |
|
|
1304
|
+
| `claimIntegrityVerdict` | planned | doc: docs/jev-behavior-review.md |
|
|
1297
1305
|
| `compareAdaptationCurves` | planned | doc: docs/design/statistics-decisions.md |
|
|
1298
1306
|
| `datasheetToMarkdown` | none | only this package's tests: src/rl/dataset.test.ts:7 |
|
|
1299
1307
|
| `defaultBehaviorFeatures` | none | only this package's tests: src/rl/sim-fidelity.test.ts:3 |
|
|
@@ -1304,32 +1312,43 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1304
1312
|
| `extractStepRewards` | none | only this package's tests: tests/rl-process-reward.test.ts:3 |
|
|
1305
1313
|
| `extractVerifiableReward` | planned | named in gtm-agent (bind not in the import graph) |
|
|
1306
1314
|
| `extractVerifiableRewardsFromRecords` | production | creative-agent:eval/canonical-export.ts |
|
|
1315
|
+
| `farmingSignal` | planned | doc: docs/jev-behavior-review.md |
|
|
1307
1316
|
| `FileSystemOutcomeStore` | production | phony:products/builder/api/src/eval/outcomes.ts |
|
|
1308
1317
|
| `filterDeterministicallyRewarded` | production | this package: src/rl/reward-hacking.ts:43 |
|
|
1309
1318
|
| `firstPassK` | planned | doc: docs/statistical-evidence.md |
|
|
1310
1319
|
| `fitBradleyTerry` | none | only this package's tests: tests/rl-tournament.test.ts:2 |
|
|
1320
|
+
| `GRADER_REFERENCE_PHRASES` | none | — |
|
|
1321
|
+
| `graderReferenceSignal` | planned | doc: docs/jev-behavior-review.md |
|
|
1311
1322
|
| `injectIrrelevantClause` | none | only this package's tests: tests/rl-contamination.test.ts:2 |
|
|
1312
1323
|
| `InMemoryOutcomeStore` | planned | consumer tests: phony:products/builder/api/src/eval/outcomes-correlate.test.ts |
|
|
1313
1324
|
| `inverseProbabilityWeighting` | planned | consumer tests: agent-knowledge:tests/memory-holdout.test.ts |
|
|
1325
|
+
| `jevSignal` | planned | doc: docs/jev-behavior-review.md |
|
|
1314
1326
|
| `jsDivergence` | none | only this package's tests: src/rl/sim-fidelity.test.ts:3 |
|
|
1315
1327
|
| `loadVerifiedFindingsDataset` | planned | doc: docs/verified-labels-flywheel.md |
|
|
1328
|
+
| `monitorSignal` | planned | doc: docs/jev-behavior-review.md |
|
|
1316
1329
|
| `offPolicyEstimateAll` | none | only this package's tests: tests/rl-off-policy.test.ts:3 |
|
|
1317
1330
|
| `paretoFrontier` | production | agent-dev-container:products/sandbox/evals/run.ts |
|
|
1331
|
+
| `parseSourceScopeReferee` | planned | doc: docs/jev-behavior-review.md |
|
|
1318
1332
|
| `PredictiveValidityResearcher` | planned | doc: docs/design/mlbenchmarks-book-review.md |
|
|
1319
1333
|
| `prmTrainingPairs` | planned | doc: examples/fine-tune-with-prime-rl/README.md |
|
|
1320
1334
|
| `quantileEdges` | none | only this package's tests: src/rl/sim-fidelity.test.ts:3 |
|
|
1321
1335
|
| `readCorpus` | planned | named in agent-runtime (bind not in the import graph) |
|
|
1336
|
+
| `REFEREE_VERDICTS` | none | — |
|
|
1337
|
+
| `refereeSignal` | planned | doc: docs/jev-behavior-review.md |
|
|
1322
1338
|
| `renameVariables` | none | only this package's tests: tests/rl-contamination.test.ts:2 |
|
|
1339
|
+
| `ruleHolds` | none | only this package's tests: src/rl/claim-integrity.test.ts:4 |
|
|
1323
1340
|
| `runAdaptationCurve` | planned | doc: docs/statistical-evidence.md |
|
|
1324
1341
|
| `runComputeCurve` | none | only this package's tests: tests/rl-adversarial-and-compute.test.ts:2 |
|
|
1325
1342
|
| `runContaminationProbe` | planned | doc: docs/statistical-evidence.md |
|
|
1326
1343
|
| `runEvalCampaign` | production | agent-builder:scripts/eval.ts |
|
|
1327
1344
|
| `runRLCampaign` | planned | doc: docs/outcome-validity.md |
|
|
1328
1345
|
| `runwiseStepRewardSummary` | none | only this package's tests: tests/rl-process-reward.test.ts:3 |
|
|
1346
|
+
| `scopeSignals` | planned | doc: docs/jev-behavior-review.md |
|
|
1329
1347
|
| `selfConsistency` | none | only this package's tests: tests/rl-adversarial-and-compute.test.ts:2 |
|
|
1330
1348
|
| `selfNormalizedImportanceWeighting` | planned | consumer tests: agent-knowledge:tests/memory-holdout.test.ts |
|
|
1331
1349
|
| `shuffleOrder` | none | — |
|
|
1332
1350
|
| `simFidelityReport` | none | only this package's tests: src/rl/sim-fidelity.test.ts:3 |
|
|
1351
|
+
| `sourceScopeRefereeMessages` | planned | doc: docs/jev-behavior-review.md |
|
|
1333
1352
|
| `stepRewardsToJsonl` | none | only this package's tests: src/rollout/gate-properties.test.ts:38 |
|
|
1334
1353
|
| `summarizeVerifiedFindings` | none | only this package's tests: src/rl/verified-findings-dataset.test.ts:5 |
|
|
1335
1354
|
| `toAnthropicFormat` | production | blueprint-agent:scripts/experiments/lib/steering-dataset.ts |
|
|
@@ -1428,7 +1447,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1428
1447
|
|
|
1429
1448
|
| symbol | consumer | evidence |
|
|
1430
1449
|
| --- | --- | --- |
|
|
1431
|
-
| `draftOnPlateau` | production | this package: scripts/search-sim.ts:
|
|
1450
|
+
| `draftOnPlateau` | production | this package: scripts/search-sim.ts:162 |
|
|
1432
1451
|
| `EDIT_CREDIT_ESTIMATOR` | none | — |
|
|
1433
1452
|
| `EDIT_CREDIT_SIGNAL` | none | — |
|
|
1434
1453
|
| `editCredit` | production | this package: scripts/synthetic-search-ledger.ts:70 |
|
|
@@ -1437,9 +1456,9 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1437
1456
|
| `formatLandscape` | production | this package: src/search-command.ts:41 |
|
|
1438
1457
|
| `formatSkillManifold` | production | this package: src/search-command.ts:45 |
|
|
1439
1458
|
| `front` | production | this package: src/search-command.ts:40 |
|
|
1440
|
-
| `landscape` | production | this package: scripts/search-sim.ts:
|
|
1459
|
+
| `landscape` | production | this package: scripts/search-sim.ts:156 |
|
|
1441
1460
|
| `lineageEdits` | planned | doc: docs/search-ledger.md |
|
|
1442
|
-
| `lineEditDistance` | production | this package: scripts/search-sim.ts:
|
|
1461
|
+
| `lineEditDistance` | production | this package: scripts/search-sim.ts:156 |
|
|
1443
1462
|
| `META_SEARCH_SCORE_SOURCE` | production | this package: scripts/search-meta-sim.ts:52 |
|
|
1444
1463
|
| `META_SEARCH_SIGNAL` | none | — |
|
|
1445
1464
|
| `metaSearch` | production | this package: scripts/search-meta-sim.ts:52 |
|
|
@@ -1447,7 +1466,7 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1447
1466
|
| `MIN_OUTCOMES_FOR_WEIGHT` | planned | doc: docs/search-ledger.md |
|
|
1448
1467
|
| `nearestNeighbours` | none | — |
|
|
1449
1468
|
| `nestedSearchId` | planned | doc: docs/search-ledger.md |
|
|
1450
|
-
| `nextUnitExtension` | production | this package: scripts/search-sim.ts:
|
|
1469
|
+
| `nextUnitExtension` | production | this package: scripts/search-sim.ts:163 |
|
|
1451
1470
|
| `objectiveKey` | production | this package: scripts/search-meta-sim.ts:52 |
|
|
1452
1471
|
| `operatorYield` | production | this package: scripts/prove-operator-bandit.mts:24 |
|
|
1453
1472
|
| `profileTextLines` | none | — |
|
|
@@ -1458,12 +1477,12 @@ The `none` set was reviewed symbol by symbol on 2026-08-21. Four rules decided m
|
|
|
1458
1477
|
| `searchConfigCodec` | planned | doc: docs/search-ledger.md |
|
|
1459
1478
|
| `searchPlateau` | production | this package: src/search/lenses/landscape.ts:49 |
|
|
1460
1479
|
| `searchPolicyGenome` | planned | doc: docs/search-ledger.md |
|
|
1461
|
-
| `skillCalibration` | production | this package: scripts/search-sim.ts:
|
|
1462
|
-
| `skillManifold` | production | this package: scripts/search-sim.ts:
|
|
1480
|
+
| `skillCalibration` | production | this package: scripts/search-sim.ts:163 |
|
|
1481
|
+
| `skillManifold` | production | this package: scripts/search-sim.ts:163 |
|
|
1463
1482
|
| `summarizeSamples` | production | this package: src/search/lenses/meta-search.ts:55 |
|
|
1464
1483
|
| `surfaceDigestEdits` | none | — |
|
|
1465
1484
|
| `surfaceTextEdits` | production | this package: src/search-command.ts:41 |
|
|
1466
|
-
| `taskMatrix` | production | this package:
|
|
1485
|
+
| `taskMatrix` | production | this package: scripts/prove-task-matrix.mts:8 |
|
|
1467
1486
|
| `tree` | production | this package: src/search-command.ts:47 |
|
|
1468
1487
|
| `vectorEmbedding` | planned | doc: docs/search-ledger.md |
|
|
1469
1488
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-eval",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.200.0",
|
|
4
4
|
"description": "Evaluate and improve AI agents from runs, traces, judges, and feedback. Compare candidates, cluster failures, measure lift, and gate releases.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-eval#readme",
|
|
6
6
|
"repository": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-D4pC7Tvd.d.ts","names":[],"sources":["../src/rollout/gate-checks.ts","../src/rollout/interchange/harbor.ts","../src/rollout/ledger.ts","../src/rollout/readers/claude-jsonl.ts","../src/rollout/readers/opencode-sqlite.ts","../src/rollout/release/gate-report.ts","../src/rollout/release/scrub.ts","../src/rollout/release/card.ts","../src/rollout/release/hf-dataset.ts"],"mappings":";;;;;;;;;;;;cA2Ca;KAOD,sBAAsB;;;;;;;;;KAUtB,qBAAqB,QAAQ,kBAAkB,SAAS;;;;;;;;;;;;;;;;;UAkBnD;EACf,SAAS;;EAET;;UAOe;EACf,IAAI;;EAEJ;;EAEA,SAAS,SAAS;;;;;;;;;;;;EAYlB,WAAW;;;;;;;;;;;;;iBA6LG,gBAAgB,SAAS,cAAc;;;;;;cA6I1C,yBAAyB,KAAK,cAAc;;;;;;;;;KAe7C;WACG;;;;WAEA;WAAyB;;;;WAEzB;WAAuB;;;KAU1B,yBAAyB,KAAK,cAAc;;;;;;;;;cAU3C;;;;;;;aAWT;eAnCiB;;aAoCjB,kBAAgB;aAMhB,2BAAyB;aAMzB,qBAAmB;;;;;;;;aAenB;;;aACA,kBAAgB;aAChB,2BAAyB;aACzB;;;;;;;;;;;aASA;;;aACA;;;aACA;;;aACA;;;;;;;;;;;aASA;;;aACA;;;aACA;;;aACA;;;;;;KAKQ,8BAA8B;;;;;;iBAO1B,WAAW,SAAS,aAAa,QAAQ;;;cCxd5C;;cAGA;KAwBD;UAEK;EACf;EACA;;UAGe;EACf;EACA;EACA,SAAS;;UAGM;EACf;EACA;;EAEA,WAAW;EACX,QAAQ;;UAGO;EACf;EACA;;EAEA;EACA,QAAQ;;UAGO;EACf;EACA,mBAAmB;EACnB,0BAA0B;EAC1B,QAAQ;;UAGO;EACf,SAAS;;UAGM;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;;UAGO;;EAEf;EACA;EACA,QAAQ;EACR;EACA;EACA,kBAAkB;EAClB;EACA,aAAa;EACb,cAAc;EACd,UAAU;EACV;EACA;EACA,QAAQ;;UAGO;EACf;EACA;EACA;;EAEA,mBAAmB;E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AU,mCAAmC,uBAExD,cAAc;KACN,aAAa,UAAU,eAAe;EAAY;;WAC/C;WAAuB;IAClC;EAAY;EAAe,gBAAgB,UAAU;;WAExC;WACA;WACA;WACA,oBAAoB,KAAK,UAAU,KAAK,EAAE;WAC1C,2BAA2B,KAAK,UAAU;IAErD;EAAY;EAAgB,gBAAgB;;WAE/B;WACA,cAAc;WACd;WACA,2BAA2B,WAAW;;KAG7C,YAAY,aAAa;UACpB,UAAU,UAAU,eAAe;WACzC;WACA,qBAAqB,WAAW,IAAI,aAAa,EAAE;WACnD;aAAkB;aAA+B;;;cAG/C,yBAAyB;EACpC,YAAY;;;iBA6BE,kBAAkB,eAAe;iBAkCjC,gBAAgB,eAAe;iBAU/B,SAAS,eAAe;;iBA2BxB,eAAe,UAAU,cACvC,cACA,SAAS,WAAW,KACnB,UAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-B3jzCp0p2.js","names":[],"sources":["../src/multishot/types.ts"],"sourcesContent":["// Public types for the multishot substrate.\n\nimport type { CostProvenance } from '../cost-ledger'\n\nexport interface MultishotMessage {\n role: 'user' | 'assistant' | 'tool'\n content: string\n toolCallId?: string\n toolCalls?: Array<{ id: string; name: string; args: Record<string, unknown> }>\n}\n\nexport interface MultishotArtifact {\n type: string\n turn: number\n invocation: { name: string; args: Record<string, unknown> }\n content: string\n}\n\nexport interface MultishotResult {\n transcript: MultishotMessage[]\n artifacts: MultishotArtifact[]\n toolCalls: number\n durationMs: number\n /** Known spend. A subtotal, not a total, when `costProvenance.kind` is\n * `uncaptured`. */\n costUsd: number\n /** Origin of `costUsd`. A shot that priced every call reports `estimated`\n * or `observed`; a shot with a call the router priced at nothing reports\n * `uncaptured`, and the matrix records the cell as under-counted instead of\n * presenting the subtotal as a complete estimate.\n *\n * Optional so an engine written before this field keeps working; the matrix\n * then judges the cell on judge receipts alone, as it did before. */\n costProvenance?: CostProvenance\n}\n\nexport interface MultishotToolDefinition {\n type: 'function'\n function: {\n name: string\n description: string\n parameters: Record<string, unknown>\n }\n}\n\n/** One chat-completion request the multishot loop issues for a single agent\n * (or driver) inference step. Mirrors the OpenAI-compat body the loop would\n * otherwise POST to the Tangle router. */\nexport interface MultishotTransportRequest {\n model: string\n messages: Array<Record<string, unknown>>\n tools?: MultishotToolDefinition[]\n temperature?: number\n maxTokens?: number\n signal?: AbortSignal\n}\n\nexport interface MultishotTransportToolCall {\n id: string\n type: 'function'\n function: { name: string; arguments: string }\n}\n\nexport interface MultishotTransportResponse {\n message: { content?: string | null; tool_calls?: MultishotTransportToolCall[] }\n usage?: { prompt_tokens?: number; completion_tokens?: number }\n /** Actual spend for this call. When omitted, the loop meters cost from\n * `usage` via the per-model estimator (estimateMultishotCost). */\n costUsd?: number\n /** Model identity the provider reported, when the transport observed one.\n * Omitted means unreported, and the requested model is used for\n * attribution — which is not proof that model answered. */\n model?: string\n}\n\n/** Execution seam for one leg of the multishot loop. The caller owns model\n * execution: agent-eval issues no provider request and holds no credential.\n * The loop still owns turn scheduling, tool dispatch, transcript capture, and\n * cost metering. agent-eval has no dependency on agent-runtime; adapt\n * agent-runtime's `profileChatClient` (or any sandbox, bridge, or router\n * client) into this signature product-side. */\nexport type MultishotTransport = (\n req: MultishotTransportRequest,\n) => Promise<MultishotTransportResponse>\n\nexport type MultishotToolExecutor = (\n args: Record<string, unknown>,\n ctx: {\n /** Caller-owned execution seam for the specialist leg this tool runs. */\n transport: MultishotTransport\n signal?: AbortSignal\n },\n) => Promise<{ content: string; costUsd: number }>\n\nexport interface MultishotPersona {\n /** Stable identifier — used for per-cell artifact paths + matrix axis keys. */\n id: string\n /** Per-domain payload (income/profile/voice/etc.) shaped by the consumer. */\n [k: string]: unknown\n}\n\n/**\n * Persona-shaping callbacks. Both are OPTIONAL: when omitted, the loop derives\n * them from the `AgentProfile` + persona payload (see `defaultShapeFromProfile`)\n * so a pure-profile call — `runMultishot({ profile, persona })` — works with no\n * role-builder functions. Provide callbacks only to override the derived shape.\n */\nexport interface MultishotShape<TPersona extends MultishotPersona> {\n /** Opening user message (turn 0) — the persona's first ask. */\n buildOpener?: (persona: TPersona) => string\n /** System prompt the driver LLM uses to roleplay the persona. Should set\n * voice, goals, constraints, time-pressure, and the \"never go silent\" rule. */\n buildDriverSystemPrompt?: (persona: TPersona) => string\n}\n\nexport class MultishotDriverEmptyError extends Error {\n constructor(public readonly turn: number) {\n super(`multishot: driver returned empty content twice at turn ${turn} — failing loud`)\n this.name = 'MultishotDriverEmptyError'\n }\n}\n\nexport class MultishotFatalToolError extends Error {\n constructor(message: string) {\n super(message)\n this.name = 'MultishotFatalToolError'\n }\n}\n\nexport class MultishotShotResultError extends Error {\n constructor(reason: string) {\n super(`multishot: shot returned an invalid MultishotResult — ${reason}`)\n this.name = 'MultishotShotResultError'\n }\n}\n\nconst MULTISHOT_ROLES = new Set(['user', 'assistant', 'tool'])\n\n/** Contract guard for the value a caller-supplied shot resolves with. The\n * matrix writes per-cell artifacts, builds judge inputs, and meters cost from\n * this value, so a malformed result must stop the cell instead of scoring a\n * degraded one. Two silent degradations this closes: an artifact with no\n * `type` matches neither the code nor the content artifact set, so the cell\n * scores as though the artifact was never produced; a non-finite `costUsd`\n * reaches `summary.totalCostUsd` and makes every cost number NaN.\n *\n * A rejected cell is still billed: the matrix cell reads the shot's own\n * `costUsd` when it is a usable amount and declares that spend on the throw,\n * so money the shot spent before returning a malformed result stays in the\n * cumulative sum the cost ceiling reads. A result whose `costUsd` is itself\n * malformed carries no usable amount, and the cell records as `uncaptured`.\n *\n * Every required field of `MultishotMessage` and `MultishotArtifact` is\n * checked, including `toolCalls` elements and `invocation.args`. Optional\n * fields are checked only when present. */\nexport function assertMultishotShotResult(value: unknown): asserts value is MultishotResult {\n if (typeof value !== 'object' || value === null) {\n throw new MultishotShotResultError(`expected an object, received ${describeValue(value)}`)\n }\n const result = value as Record<string, unknown>\n if (!Array.isArray(result.transcript)) {\n throw new MultishotShotResultError(\n `transcript must be an array, received ${describeValue(result.transcript)}`,\n )\n }\n if (!Array.isArray(result.artifacts)) {\n throw new MultishotShotResultError(\n `artifacts must be an array, received ${describeValue(result.artifacts)}`,\n )\n }\n result.transcript.forEach(assertMessage)\n result.artifacts.forEach(assertArtifact)\n assertFiniteCount(result.toolCalls, 'toolCalls')\n assertFiniteCount(result.durationMs, 'durationMs')\n assertFiniteCount(result.costUsd, 'costUsd')\n if (result.costProvenance !== undefined) assertCostProvenance(result.costProvenance)\n}\n\nfunction assertCostProvenance(value: unknown): void {\n const row = requireRow(value, 'costProvenance')\n if (row.kind !== 'observed' && row.kind !== 'estimated' && row.kind !== 'uncaptured') {\n throw new MultishotShotResultError(\n `costProvenance.kind must be observed, estimated or uncaptured, received ${describeValue(row.kind)}`,\n )\n }\n // The matrix reads the amount from `costUsd`; `usd` only has to agree with\n // the kind, so an uncaptured provenance cannot smuggle in a total.\n if (row.kind === 'uncaptured') {\n if (row.usd !== null) {\n throw new MultishotShotResultError(\n `uncaptured costProvenance.usd must be null, received ${describeValue(row.usd)}`,\n )\n }\n return\n }\n assertFiniteCount(row.usd, 'costProvenance.usd')\n}\n\nfunction assertMessage(value: unknown, index: number): void {\n const row = requireRow(value, `transcript[${index}]`)\n if (typeof row.role !== 'string' || !MULTISHOT_ROLES.has(row.role)) {\n throw new MultishotShotResultError(\n `transcript[${index}].role must be user, assistant or tool, received ${describeValue(row.role)}`,\n )\n }\n assertString(row.content, `transcript[${index}].content`)\n if (row.toolCallId !== undefined) {\n assertString(row.toolCallId, `transcript[${index}].toolCallId`)\n }\n if (row.toolCalls === undefined) return\n if (!Array.isArray(row.toolCalls)) {\n throw new MultishotShotResultError(\n `transcript[${index}].toolCalls must be an array when present, received ${describeValue(row.toolCalls)}`,\n )\n }\n row.toolCalls.forEach((call, callIndex) => {\n const field = `transcript[${index}].toolCalls[${callIndex}]`\n const row = requireRow(call, field)\n assertString(row.id, `${field}.id`)\n assertString(row.name, `${field}.name`)\n requireRow(row.args, `${field}.args`)\n })\n}\n\nfunction assertArtifact(value: unknown, index: number): void {\n const row = requireRow(value, `artifacts[${index}]`)\n assertString(row.type, `artifacts[${index}].type`)\n assertString(row.content, `artifacts[${index}].content`)\n assertFiniteCount(row.turn, `artifacts[${index}].turn`)\n const invocation = requireRow(row.invocation, `artifacts[${index}].invocation`)\n assertString(invocation.name, `artifacts[${index}].invocation.name`)\n requireRow(invocation.args, `artifacts[${index}].invocation.args`)\n}\n\nfunction requireRow(value: unknown, field: string): Record<string, unknown> {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new MultishotShotResultError(\n `${field} must be an object, received ${describeValue(value)}`,\n )\n }\n return value as Record<string, unknown>\n}\n\nfunction assertString(value: unknown, field: string): void {\n if (typeof value !== 'string') {\n throw new MultishotShotResultError(\n `${field} must be a string, received ${describeValue(value)}`,\n )\n }\n}\n\nfunction assertFiniteCount(value: unknown, field: string): void {\n if (typeof value !== 'number' || !Number.isFinite(value) || value < 0) {\n throw new MultishotShotResultError(\n `${field} must be a finite number >= 0, received ${describeValue(value)}`,\n )\n }\n}\n\nfunction describeValue(value: unknown): string {\n if (value === null) return 'null'\n if (Array.isArray(value)) return 'an array'\n if (typeof value === 'object') return 'an object'\n return `${typeof value} ${String(value)}`\n}\n"],"mappings":";AAmHA,IAAa,4BAAb,cAA+C,MAAM;CACvB;CAA5B,YAAY,MAA8B;EACxC,MAAM,0DAA0D,KAAK,gBAAgB;EAD3D,KAAA,OAAA;EAE1B,KAAK,OAAO;CACd;AACF;AAEA,IAAa,0BAAb,cAA6C,MAAM;CACjD,YAAY,SAAiB;EAC3B,MAAM,OAAO;EACb,KAAK,OAAO;CACd;AACF;AAEA,IAAa,2BAAb,cAA8C,MAAM;CAClD,YAAY,QAAgB;EAC1B,MAAM,yDAAyD,QAAQ;EACvE,KAAK,OAAO;CACd;AACF;AAEA,MAAM,kCAAkB,IAAI,IAAI;CAAC;CAAQ;CAAa;AAAM,CAAC;;;;;;;;;;;;;;;;;;AAmB7D,SAAgB,0BAA0B,OAAkD;CAC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