import type { AgentId, AgentStatus, AiProfile, AiProfileInput, CredentialInput, EffortLevel, HealthResult, PermissionMode, ProfileTestResult, Project, ProjectInput, ProjectPatch, RuntimeInfo, AttachmentInput, SlashCommand, SessionSnapshot, SessionSummary, WorkbenchContext, WorkbenchEvent, } from "@claude-ai-workbench/contracts"; export interface RequestOptions { signal?: AbortSignal; [key: string]: unknown; } export interface StartSessionOptions extends RequestOptions { permissionMode?: PermissionMode; agentId?: AgentId; effort?: EffortLevel; aiProfileId?: string | null; model?: string | null; } export interface ListSessionsOptions extends RequestOptions { archived?: boolean; } export interface SendOptions { permissionMode?: PermissionMode; [key: string]: unknown; } export interface StreamHandlers { onEvent?: (event: WorkbenchEvent) => void; onError?: (error: Error) => void; onOpen?: () => void; afterSequence?: number; } export interface ClientResourceCounts { streams: number; requests: number; reconnects: number; } export interface ClaudeWorkbenchClientOptions { apiBase?: string; fetch?: typeof fetch; EventSource?: typeof EventSource; } export interface ClaudeWorkbenchClient { health(): Promise; runtime(): Promise; listAgents(): Promise; listProjects(): Promise; createProject(project: ProjectInput): Promise; getProject(id: string): Promise; renameProject(id: string, name: string): Promise; updateProject(id: string, patch: ProjectPatch): Promise; removeProject(id: string): Promise; listProfiles(): Promise; saveProfile(profile: AiProfileInput): Promise; deleteProfile(id: string): Promise; setCredential(id: string, credential: string | CredentialInput): Promise; testProfile(id: string): Promise; testProfileDraft(profile: AiProfileInput, credential?: string): Promise; listSessions(context: WorkbenchContext | string, options?: ListSessionsOptions): Promise; startSession(context: WorkbenchContext, options?: StartSessionOptions): Promise; loadSession(id: string, options?: RequestOptions): Promise; listCommands(id: string, options?: RequestOptions): Promise; subscribe(id: string, handlers: StreamHandlers | ((event: WorkbenchEvent) => void), onError?: (error: Error) => void, options?: {afterSequence?: number}): () => void; send(sessionId: string, text: string, options?: SendOptions): Promise; send(args: {sessionId: string; text?: string; attachments?: AttachmentInput[]; options?: SendOptions}): Promise; resolvePermission(sessionId: string, requestId: string, allow: boolean, message?: string): Promise; resolvePermission(args: {sessionId: string; requestId: string; allow: boolean; message?: string}): Promise; abort(sessionId: string | {sessionId: string}): Promise; setPermissionMode(sessionId: string, mode: PermissionMode): Promise; setPermissionMode(args: {sessionId: string; mode: PermissionMode}): Promise; archiveSession(sessionId: string | {sessionId: string}): Promise<{sessionId: string; archivedAt: string}>; restoreSession(sessionId: string | {sessionId: string}): Promise; resourceCounts(): ClientResourceCounts; destroy(): void; } export declare const EVENT_TYPES: readonly string[]; export declare function createClaudeWorkbenchClient(options?: ClaudeWorkbenchClientOptions): ClaudeWorkbenchClient;