import { Session, Agent, Tool } from '@openai/agents'; interface Message { id: number; version: number; type: 'prompt' | 'user' | 'agent' | 'tool' | 'interrupted'; handled?: boolean; text: string; args?: string; callId?: string; } type PlanItemStatus = 'todo' | 'in-progress' | 'done' | 'not-needed'; interface PlanItemPersisted { id: number; text: string; status: PlanItemStatus; } interface PlanState { planDescription: string; planItems: PlanItemPersisted[]; progress?: number; } interface WithPlanState { /** * Returns the persisted plan state for the current session, or null if none exists. */ getPlanState(): Promise; /** * Merges and persists a partial plan state for the current session. */ setPlanState(state: Partial): Promise | void; } type WithRunCompaction = { runCompaction: (args?: any) => Promise; }; interface WithSkillsRead { addSkillRead(skill: string): Promise | void; getSkillsRead(): Promise; } interface WithLatestAddedTimestamp { getLatestAddedTimestamp(): Promise; } type CombinedSession = Session & WithRunCompaction & WithSkillsRead & WithPlanState & WithLatestAddedTimestamp; declare class AgentManager { private isInitialized; private controller; private queuedUserInputs; private resumeState; agent: Agent | null; session: CombinedSession | null; initialMessages: Message[]; static instantiateAgent(tools: Tool[], instructions?: string): Agent; initialize(agent?: Agent, session?: CombinedSession): Promise; enqueueUserInput(text: string): void; runTask(task: string, isPrompt?: boolean): Promise; private runCompactionIfWeWereIdle; interrupt(): void; } export { AgentManager };