/** * Agent Orchestrator API Types */ export type SessionStatus = 'waiting' | 'running' | 'needs_input' | 'failed' | 'archived'; export type LogLevel = 'info' | 'error' | 'debug' | 'warning' | 'verbose'; export type SubagentStatus = 'running' | 'completed' | 'failed'; export interface Pagination { page: number; per_page: number; total_count: number; total_pages: number; } export interface Session { id: number; slug: string | null; title: string; status: SessionStatus; agent_runtime: string; prompt: string | null; git_root: string | null; branch: string | null; subdirectory: string | null; execution_provider: string; goal: string | null; mcp_servers: string[]; catalog_skills?: string[]; catalog_plugins?: string[]; config: Record; metadata: Record; custom_metadata: Record; session_id: string | null; job_id: string | null; running_job_id: string | null; archived_at: string | null; category_id?: number | null; category?: CategorySummary | null; heartbeat_enabled?: boolean; heartbeat_interval_seconds?: number; created_at: string; updated_at: string; transcript?: string; } export interface Log { id: number; session_id: number; content: string; level: LogLevel; created_at: string; updated_at: string; } export interface SubagentTranscript { id: number; session_id: number; agent_id: string; tool_use_id: string | null; transcript?: string; filename: string | null; message_count: number | null; subagent_type: string | null; description: string | null; status: SubagentStatus | null; duration_ms: number | null; total_tokens: number | null; tool_use_count: number | null; formatted_duration: string | null; formatted_tokens: string | null; display_label: string | null; created_at: string; updated_at: string; } export interface SessionsResponse { sessions: Session[]; pagination: Pagination; } export interface SearchSessionsResponse { query: string; sessions: Session[]; pagination: Pagination; } export interface SessionResponse { session: Session; } export interface SessionActionResponse { session: Session; message?: string; } export interface SetHeartbeatResponse { session: Session; heartbeat_enabled: boolean; heartbeat_interval_seconds: number; } export interface LogsResponse { logs: Log[]; pagination: Pagination; } export interface LogResponse { log: Log; } export interface SubagentTranscriptsResponse { subagent_transcripts: SubagentTranscript[]; pagination: Pagination; } export interface SubagentTranscriptResponse { subagent_transcript: SubagentTranscript; } export interface ApiError { error: string; message?: string; messages?: string[]; } export interface MCPServerInfo { name: string; title: string; description: string; } export interface MCPServersResponse { mcp_servers: MCPServerInfo[]; } export interface AgentRootInfo { name: string; title: string; description: string; git_root: string; default_branch?: string; default_subdirectory?: string; default_goal?: string; default_mcp_servers?: string[]; default_skills?: string[]; default_model?: string; } export interface GoalInfo { id: string; name: string; description: string; } export interface ConfigsResponse { mcp_servers: MCPServerInfo[]; agent_roots: AgentRootInfo[]; goals: GoalInfo[]; } export interface SendPushNotificationResponse { success: boolean; message: string; session_id: number; } export interface CreateSessionRequest { agent_runtime?: string; prompt?: string; git_root?: string; branch?: string; subdirectory?: string; title?: string; slug?: string; goal?: string; execution_provider?: string; mcp_servers?: string[]; skills?: string[]; plugins?: string[]; agent_root?: string; config?: Record; custom_metadata?: Record; auto_compact_window?: number; } export interface UpdateSessionRequest { title?: string; slug?: string; goal?: string; mcp_servers?: string[]; custom_metadata?: Record; } export interface CreateLogRequest { content: string; level: LogLevel; } export interface UpdateLogRequest { content?: string; level?: LogLevel; } export interface CreateSubagentTranscriptRequest { agent_id: string; tool_use_id?: string; transcript?: string; filename?: string; message_count?: number; subagent_type?: string; description?: string; status?: SubagentStatus; duration_ms?: number; total_tokens?: number; tool_use_count?: number; } export interface UpdateSubagentTranscriptRequest { agent_id?: string; tool_use_id?: string; transcript?: string; filename?: string; message_count?: number; subagent_type?: string; description?: string; status?: SubagentStatus; duration_ms?: number; total_tokens?: number; tool_use_count?: number; } export interface Category { id: number; name: string; description: string | null; position: number; is_frozen: boolean; session_count: number; created_at: string; updated_at: string; } export interface CategorySummary { id: number; name: string; position: number; is_frozen: boolean; } export interface CategoriesResponse { categories: Category[]; } export interface CategoryResponse { category: Category; } export interface CreateCategoryRequest { name: string; description?: string; } export interface UpdateCategoryRequest { name?: string; description?: string; is_frozen?: boolean; } export interface SetSessionCategoryResponse { session: Session; message: string; } export type EnqueuedMessageStatus = 'pending' | 'processing' | 'sent'; export interface EnqueuedMessage { id: number; session_id: number; content: string; goal: string | null; position: number; status: EnqueuedMessageStatus; created_at: string; updated_at: string; } export interface EnqueuedMessagesResponse { enqueued_messages: EnqueuedMessage[]; pagination: Pagination; } export interface EnqueuedMessageResponse { enqueued_message: EnqueuedMessage; } export interface EnqueuedMessageInterruptResponse { session: Session; message: string; } export type TriggerConditionType = 'slack' | 'schedule' | 'ao_event'; export type TriggerType = TriggerConditionType; export type TriggerStatus = 'enabled' | 'disabled'; export interface TriggerCondition { id: number; condition_type: TriggerConditionType; configuration: Record; description: string; last_triggered_at: string | null; last_polled_at: string | null; } export interface Trigger { id: number; name: string; status: TriggerStatus; agent_root_name: string; prompt_template: string; goal: string | null; reuse_session: boolean; enqueue_messages?: boolean; resuscitate_archived?: boolean; mcp_servers: string[]; conditions: TriggerCondition[]; last_session_id: number | null; last_triggered_at: string | null; sessions_created_count: number; created_at: string; updated_at: string; } export interface TriggersResponse { triggers: Trigger[]; pagination: Pagination; } export interface TriggerResponse { trigger: Trigger; recent_sessions?: Session[]; } export interface TriggerChannelsResponse { channels: Array<{ id: string; name: string; is_private: boolean; num_members: number; }>; } export interface TriggerConditionAttributes { id?: number; condition_type: TriggerConditionType; configuration: Record; } export interface CreateTriggerRequest { name: string; agent_root_name: string; prompt_template: string; status?: TriggerStatus; goal?: string; reuse_session?: boolean; mcp_servers?: string[]; last_session_id?: number; trigger_conditions_attributes?: TriggerConditionAttributes[]; trigger_type?: TriggerConditionType; configuration?: Record; } export interface UpdateTriggerRequest { name?: string; agent_root_name?: string; prompt_template?: string; status?: TriggerStatus; goal?: string; reuse_session?: boolean; mcp_servers?: string[]; trigger_conditions_attributes?: TriggerConditionAttributes[]; trigger_type?: TriggerConditionType; configuration?: Record; } export interface Notification { id: number; session_id: number; notification_type: string; read: boolean; stale: boolean; created_at: string; updated_at: string; session?: { id: number; slug: string | null; title: string; status: string; }; } export interface NotificationsResponse { notifications: Notification[]; pagination: Pagination; } export interface NotificationResponse { notification: Notification; } export interface NotificationBadgeResponse { pending_count: number; } export interface NotificationMarkAllReadResponse { marked_count: number; pending_count: number; } export interface NotificationDismissAllReadResponse { dismissed_count: number; pending_count: number; } export interface HealthReport { health_report: Record; timestamp: string; rails_env: string; ruby_version: string; } export interface HealthActionResponse { [key: string]: unknown; } export interface CliStatusResponse { cli_status: Record; unauthenticated_count: number; } export interface CliActionResponse { queued: boolean; message: string; [key: string]: unknown; } export interface ForkSessionResponse { session: Session; message: string; } export interface RefreshSessionResponse { session: Session; message: string; } export interface RefreshAllSessionsResponse { message: string; refreshed: number; restarted: number; continued: number; errors: number; } export interface BulkArchiveResponse { archived_count: number; errors: Array<{ id: number; error: string; }>; } export interface TranscriptResponse { transcript_text: string; } /** Action taken when responding to a pending elicitation. */ export type ElicitationActionType = 'accept' | 'decline'; /** * Poll-response shape returned by the elicitation endpoints. * * `action` is `"pending"` while the elicitation is still open, or the resolved * status (e.g. `"accept"` / `"decline"`) once a response has been recorded. * `content` carries the structured payload supplied with an accepted response * (null when pending or when no content was provided). */ export interface ElicitationResponse { action: string; content: Record | null; _meta?: Record; } export interface TranscriptArchiveStatusResponse { generated_at: string; session_count: number; file_size_bytes: number; } //# sourceMappingURL=types.d.ts.map