import type { AgentAdapter, AgentSpawnConfig, Backend } from '../../agent-adapter/types.js'; import type { RoleToolSurfaceInput } from '../agent-run/identity.js'; import type { AgentSlot } from '../agent-run/journal.js'; import { type PinnedTrialPaths } from '../agent-run/pinned-node-process.js'; import type { ResolvedAgentRunConfig } from '../agent-run/run-config.js'; import { type AgentConfig, type RunAgentOptions } from '../agents/spawn-config.js'; import { type ResolvedTrialPolicy } from './resolved-policy.js'; /** S1: the closed input list. It carries no spawner — S6.1 makes `spawnConfig.processSpawner` the * single supervisor injection point, applied by the caller after construction. */ export interface TrialAdapterSpec { policy: ResolvedTrialPolicy; slot: AgentSlot; /** Retained only because the legacy non-benchmark path already builds from it (S2). */ config: ResolvedAgentRunConfig; paths: PinnedTrialPaths; supervisor: { binary: string; graceMs: number; deadlineMs?: number; }; cwd: string; } export interface TrialAdapter { adapter: AgentAdapter; spawnConfig: AgentSpawnConfig; roleSurface: RoleToolSurfaceInput; backend: Backend; close(): Promise; } export declare function trialSessionKey(policy: ResolvedTrialPolicy): string; /** The directive bytes the role was compiled from, located through the inventory the compiler * wrote: `ResolvedAgentRunRole` carries no directive and GT3 forbids widening it. A directive * that no longer matches its compiled bytes moves the role hash, which R4 then refuses. */ export declare function trialDirective(policy: ResolvedTrialPolicy, slot: AgentSlot): string; /** C4: role composition is sourced from the policy, never from the disposable projection. */ export declare function trialRunOptions(spec: TrialAdapterSpec): RunAgentOptions; export declare function trialAgentConfig(policy: ResolvedTrialPolicy, backend: Backend): AgentConfig; export declare function createTrialAdapter(spec: TrialAdapterSpec): TrialAdapter;