import type { AgentHandle } from '../../core/types/agent-types.js'; import type { PinnedTrialPaths } from '../agent-run/pinned-node-process.js'; import type { ResolvedAgentRunConfig } from '../agent-run/run-config.js'; import type { RunAgentOptions } from '../agents/spawn-config.js'; import type { ResolvedTrialPolicy } from './resolved-policy.js'; import type { LeaseState } from './workspace-lease.js'; /** Everything a trial fixes for its whole lifetime. What varies per step — the role, the workspace, * the resume target and the admission boundary — is read from that step's own run options. */ export interface TrialThreadAdapterInput { policy: ResolvedTrialPolicy; config: ResolvedAgentRunConfig; paths: PinnedTrialPaths; supervisor: { binary: string; graceMs: number; deadlineMs?: number; }; /** The live lease, as a reader. This factory runs once per trial while the closure it returns * runs once per step, so a `LeaseState` value member would be read at construction and frozen * for the whole thread — the staleness the rule exists to forbid (design section 16 (16.1) LS3). */ leaseState: () => LeaseState; } /** The thread runtime's `runAgent`, replaced for the duration of one trial. Each step builds its own * adapter in the workspace it was armed in and closes it before the next step is armed. */ export declare function createBenchmarkTrialRunAgent(input: TrialThreadAdapterInput): (message: string, options?: RunAgentOptions) => AgentHandle;