import type { ChatKitStore, StoreContext } from '../chatkit/store'; import type { RunContextRetriever, RunExecutionBackend, RunExecutionInput } from './RunExecutionBackend'; import { type RunRecordData, type RunStore } from './store'; export type ManagedRunStore = ChatKitStore & RunStore; export interface ManagedRunWorkerOptions { store: ManagedRunStore; runtimeDriver: RunExecutionBackend; leaseOwner?: string; leaseDurationSeconds?: number; contextRetriever?: RunContextRetriever; } export interface ManagedRunExecutionResult { runId: string; status: RunRecordData['status'] | 'skipped'; } /** * Store-backed Managed Agent worker. * * The worker is the durable Inngest callback path: it restores Run/Thread/ * Message state from the configured store, invokes the stateless Agent Runtime, * then projects runtime output back into RunStep and assistant Message facts. */ export declare class ManagedRunWorker { private readonly store; private readonly runtimeDriver; private readonly leaseOwner; private readonly leaseDurationSeconds; private readonly contextRetriever?; constructor(options: ManagedRunWorkerOptions); executeRun(runId: string, context: TContext): Promise; private retrieveRunContext; private claimRun; private claimRunWithSave; private canExecuteClaimedRun; private checkCancellation; loadExecutionInput(runId: string, context: TContext): Promise; private loadRunInput; private resolveUserMessage; private resolveRuntimeConfig; private authBindingIdFromRun; private asRuntimeConfig; private parseRunner; private isRunnerType; private handleRuntimeControlEvent; private markRunStarted; private finishRun; private stepTypeForStatus; private appendRunStep; private createAssistantMessage; private loadConversation; private threadRefFromRun; private extractThreadId; private resolveRunResource; private resolvePodBaseUrl; }