import type { Backend } from '../../agent-adapter/types.js'; import type { ThreadTemplate } from '../../core/types/thread-types.js'; import { type ResolvedTrialPolicy } from '../benchmark/resolved-policy.js'; import type { ResolvedProfileConfig } from '../agents/profile-manager.js'; import { type FrozenIdentity } from './identity.js'; export interface BenchmarkIdentityRequest { workspaceCwd: string; template: string; instruction: string; profileName: string; rootRunId: string; trajectoryRoot: string; /** Present exactly when the policy below was compiled in this process from that document. Only * then are the parent's compile and this one two independent compiles of the same bytes, which * is what makes comparing them evidence rather than a tautology. */ runConfigPath?: string; limits: { maxSteps: number; maxCostUsd: number; deadlineEpochMs: number; }; } export interface BenchmarkRoleIdentity extends FrozenIdentity { systemPromptSha256: string; toolManifestSha256: string; pluginManifestSha256: string; } export interface BenchmarkThreadIdentities { entry: BenchmarkRoleIdentity; roles: Map; modelProtocolProblem: string | null; /** Divergence between the template projection and the compiled policy role for some slot. Null * when no policy is present, because then the projection is the only source there is. */ roleIdentityProblem: string | null; /** Divergence between the parent role surface this process compiled and the one the parent's own * `agent-run` recorded in the started marker. Null unless the policy was compiled here from a * named run config. Design section 16 (16.3.2) PW4. */ parentIdentityProblem: string | null; } export declare class BenchmarkIdentityProtocolError extends Error { readonly reason: "protocol_violation"; } export declare function freezeBenchmarkThreadIdentities(request: BenchmarkIdentityRequest, profile: ResolvedProfileConfig, template: ThreadTemplate, backend: Backend, trialPolicy?: ResolvedTrialPolicy): BenchmarkThreadIdentities; export declare function benchmarkInstructionHashes(instruction: string, modelVisiblePrompt?: string): { canonicalInstructionSha256: string; modelVisiblePromptSha256: string; };