UNPKG

mycoder-agent

Version:

Agent module for mycoder - an AI-powered software development assistant

43 lines 1.28 kB
export declare enum SessionStatus { RUNNING = "running", COMPLETED = "completed", ERROR = "error", TERMINATED = "terminated" } export interface SessionInfo { id: string; status: SessionStatus; startTime: Date; endTime?: Date; metadata: { url?: string; contentLength?: number; closedExplicitly?: boolean; error?: string; actionType?: string; }; } /** * Registry to keep track of browser sessions */ export declare class SessionTracker { ownerAgentId: string | undefined; private sessions; constructor(ownerAgentId: string | undefined); registerBrowser(url?: string): string; updateSessionStatus(id: string, status: SessionStatus, metadata?: Record<string, any>): boolean; getSessions(): SessionInfo[]; getSessionById(id: string): SessionInfo | undefined; getSessionsByStatus(status: SessionStatus): SessionInfo[]; /** * Cleans up all browser sessions associated with this tracker * @returns A promise that resolves when cleanup is complete */ cleanup(): Promise<void>; /** * Cleans up a browser session * @param session The browser session to clean up */ private cleanupSession; } //# sourceMappingURL=SessionTracker.d.ts.map