/**
 * Unified Socket.IO event types.
 */
export declare const NAMESPACE: "/events";
export declare const ClientEvents: {
    readonly SUBSCRIBE: "subscribe";
    readonly UNSUBSCRIBE: "unsubscribe";
    readonly INPUT: "input";
    readonly RESIZE: "resize";
    readonly TERMINAL_INPUT: "terminal:input";
    readonly TERMINAL_RESIZE: "terminal:resize";
};
export declare const ServerEvents: {
    readonly SESSION_SUBSCRIBED: "session:subscribed";
    readonly SESSION_UNSUBSCRIBED: "session:unsubscribed";
    readonly SESSION_STDOUT: "session:stdout";
    readonly SESSION_PATCH: "session:patch";
    readonly SESSION_EXIT: "session:exit";
    readonly SESSION_COMPLETED: "session:completed";
    readonly SESSION_ID: "session:sessionId";
    readonly SESSION_ERROR: "session:error";
    readonly TASK_UPDATED: "task:updated";
    readonly TASK_DELETED: "task:deleted";
    readonly AGENT_STATUS_CHANGED: "agent:status_changed";
    readonly TERMINAL_STDOUT: "terminal:stdout";
    readonly TERMINAL_EXIT: "terminal:exit";
    readonly TERMINAL_SUBSCRIBED: "terminal:subscribed";
    readonly TERMINAL_UNSUBSCRIBED: "terminal:unsubscribed";
    readonly WORKSPACE_SETUP_PROGRESS: "workspace:setup_progress";
    readonly WORKSPACE_COMMIT_MESSAGE_UPDATED: "workspace:commit_message_updated";
    readonly WORKSPACE_HIBERNATED: "workspace:hibernated";
};
export interface SubscribePayload {
    topic: 'session' | 'task' | 'agent' | 'terminal' | 'project';
    id?: string;
}
export interface UnsubscribePayload {
    topic: 'session' | 'task' | 'agent' | 'terminal' | 'project';
    id?: string;
}
export interface SessionInputPayload {
    sessionId: string;
    data: string;
}
export interface SessionResizePayload {
    sessionId: string;
    cols: number;
    rows: number;
}
export interface SessionStdoutPayload {
    sessionId: string;
    data: string;
}
export interface SessionPatchPayload {
    sessionId: string;
    patch: JsonPatchOperation[];
    seq: number;
}
export interface SessionExitPayload {
    sessionId: string;
    exitCode: number;
}
export interface SessionCompletedPayload {
    sessionId: string;
    status: string;
}
export interface SessionIdPayload {
    sessionId: string;
    agentSessionId: string;
}
export interface SessionErrorPayload {
    sessionId: string;
    message: string;
}
export interface SessionSubscribedPayload {
    sessionId: string;
}
export interface SessionUnsubscribedPayload {
    sessionId: string;
}
export interface JsonPatchOperation {
    op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test';
    path: string;
    value?: unknown;
    from?: string;
}
export type AgentStatus = 'idle' | 'starting' | 'running' | 'stopped' | 'error';
export interface AgentStatusPayload {
    agentId: string;
    sessionId: string;
    status: AgentStatus;
    error?: string;
    timestamp: number;
}
export interface TaskUpdatedPayload {
    taskId: string;
    projectId: string;
    status: string;
}
export interface TaskDeletedPayload {
    taskId: string;
    projectId: string;
}
export interface TerminalInputPayload {
    terminalId: string;
    data: string;
}
export interface TerminalResizePayload {
    terminalId: string;
    cols: number;
    rows: number;
}
export interface TerminalStdoutPayload {
    terminalId: string;
    data: string;
}
export interface TerminalExitPayload {
    terminalId: string;
    exitCode: number;
}
export interface TerminalSubscribedPayload {
    terminalId: string;
}
export interface TerminalUnsubscribedPayload {
    terminalId: string;
}
export interface AckResponse<T = unknown> {
    success: boolean;
    data?: T;
    error?: {
        code: string;
        message: string;
    };
}
export type WorkspaceSetupStatus = 'running' | 'completed' | 'failed';
export interface WorkspaceSetupProgressPayload {
    workspaceId: string;
    taskId: string;
    status: WorkspaceSetupStatus;
    /** 当前正在执行的命令 */
    currentCommand?: string;
    /** 当前命令序号（从 1 开始） */
    currentIndex?: number;
    /** 命令总数 */
    totalCommands: number;
    /** 失败时的错误信息 */
    error?: string;
}
export interface WorkspaceCommitMessageUpdatedPayload {
    workspaceId: string;
    taskId: string;
    commitMessage: string | null;
}
export interface WorkspaceHibernatedPayload {
    workspaceId: string;
    taskId: string;
    projectId: string;
}
export type ClientEventType = typeof ClientEvents[keyof typeof ClientEvents];
export type ServerEventType = typeof ServerEvents[keyof typeof ServerEvents];
//# sourceMappingURL=events.d.ts.map