import type { AgentContextImportRequest, AgentContextImportResult, AgentLiveInputOffer, AgentLiveInputRequest } from "@mono-agent/agent-contracts"; import type { LiveSessionRunLifecycle } from "./live-session.js"; import type { AgentHarness, AgentHarnessOptions, AgentHarnessRequest, AgentHarnessResponse } from "./types.js"; import { AgentHarnessError } from "./harness/error.js"; import { requestOverridesModel, runSourceFromRequest } from "./harness/request-routing.js"; export { AgentHarnessError }; export { requestOverridesModel, runSourceFromRequest }; interface MonoAgentHarnessInternalOptions { /** Deterministic test seam; production callers use the bounded default. */ readonly shutdownDrainTimeoutMs?: number; } export declare class MonoAgentHarness implements AgentHarness { readonly liveInputOwnership: { readonly version: 1; }; private readonly options; private readonly runtimeForSession; private readonly sessionStore; private readonly liveSessionManager; private readonly activeLiveInputs; private readonly skillsCache; private readonly runLimiter; private readonly maxPendingRuns; private pendingRuns; private supportsResumeCache; private activeRuns; private readonly activeRunWaiters; private readonly activeRunWarningSinks; private readonly pendingTerminalReseeds; private readonly turnContinuityPublicationBarriers; private readonly shutdownDrainTimeoutMs; private disposed; private disposePromise; constructor(options: AgentHarnessOptions, internalOptions?: MonoAgentHarnessInternalOptions); submit(request: AgentHarnessRequest): Promise; offerLiveInput(request: AgentLiveInputRequest): AgentLiveInputOffer; cancel(conversationId: string, reason?: unknown): void; resetConversation(conversationId: string): Promise; appendVerbatimTurn(conversationId: string, text: string, options?: { readonly idempotencyKey?: string; }): Promise; performContextImport(conversationId: string, request: AgentContextImportRequest): Promise; run(request: AgentHarnessRequest, lifecycle?: LiveSessionRunLifecycle): Promise; private runActive; private registerTurnContinuityPublication; private republishTurnContinuityPublication; private turnContinuityUnavailableError; private awaitAbortablePublication; private waitForTurnContinuityPublication; dispose(): Promise; private disposeActiveResources; private waitForActiveRuns; private assertAcceptingRuns; /** * Whether THIS run should be handled as an isolated proactive turn: the * `session.isolateProactive` opt-in is on AND the request is a cron/proactive * request (it carries `metadata.cron`, set by the cron scheduler). When false, * the run uses the shared continuous-session machinery exactly as before. */ private isProactiveIsolated; private sessionsEnabled; private saveSession; private nowIso; private publishSessionEvent; private sessionStoreSnapshot; } export declare function createAgentHarness(options: AgentHarnessOptions): AgentHarness; //# sourceMappingURL=harness.d.ts.map