import type { ExecutionContext } from '../core/ExecutionContext.ts'; import type { AnomalyDetector } from '../core/AnomalyDetector.ts'; import type { LLMConfig } from '../llm/types.ts'; import type { MemberRegistry } from '../members/MemberRegistry.ts'; import type { MemberRunResult } from '../evals/EvalRunner.ts'; import type { AgentRegistry } from '../core/AgentRegistry.ts'; import type { EpisodeLearner } from '../evals/EpisodeLearner.ts'; import { type CheckpointStore } from '../checkpoint/RunCheckpoint.ts'; export interface MemberRunnerDeps { agents: AgentRegistry; members: MemberRegistry; episodeLearner: EpisodeLearner; anomalyDetector: AnomalyDetector; alertsPath: string; checkpointStore?: CheckpointStore; } export declare function applySandboxProfile(config: LLMConfig): void; /** * Runs members and core agents, flushes traces, and scores anomalies. The * shared ExecutionContext is assigned by the composition root after it is * fully built, so member runs observe the same context as the rest of the * application. Kept out of ApplicationContext to bound its size (warden). */ export declare class MemberRunner { private readonly deps; ctx: ExecutionContext; constructor(deps: MemberRunnerDeps); /** Member-specific executor: preferred provider + its own tool loop */ runMember(memberName: string, task: string, config: LLMConfig, resumeFrom?: string): Promise; /** * Runs a member without any presentation: captures the raw output and * duration for evaluation while still recording metrics and flushing * traces. Throws on failure instead of exiting the process. * * @param resumeFrom - optional checkpoint ID to resume from */ runMemberTask(memberName: string, task: string, config: LLMConfig, resumeFrom?: string | { checkpointId: string; reply?: string; }): Promise; /** LLM + tool setup for a member run: sandbox profile, provider chain, * tool registry, and checkpoint state. The ReAct loop and event flow stay * in runMemberTask. */ private prepareMemberContext; private completeRunSuccess; private recordRunFailure; private emitParkedEvent; /** Loads an existing checkpoint or creates and persists a fresh running one. */ private prepareCheckpoint; /** Replays checkpoint history for the loop, closing a dangling ask_human tool call with the human reply. */ private resumeSeed; /** Fallback for non-member agent names (core agents). */ runAgent(agentName: string, task: string): Promise; private runAndReport; /** Flushes pending trace envelopes to the store before the process exits. */ flushTraces(): Promise; /** Scores the recent in-process envelopes and appends any anomalies. */ private evaluateAnomalies; } //# sourceMappingURL=MemberRunner.d.ts.map