import { type AgentFailureRegime } from "@agent-native/core/agent/engine"; export interface ThreadDebugSource { id: string; label: string; kind: "current" | "env" | "configured"; current: boolean; connected: boolean; databaseUrlEnv: string | null; databaseAuthTokenEnv: string | null; canInspectAll: boolean; } export interface DebugAccess { viewerEmail: string; orgId: string | null; role: string | null; envAdmin: boolean; canInspectAll: boolean; memberEmails: string[]; } declare const UNSUCCESSFUL_RUN_STATUSES: readonly ["errored", "aborted", "truncated"]; export type AgentRunFailureStatus = (typeof UNSUCCESSFUL_RUN_STATUSES)[number]; type ThreadDebugSourceHealthStatus = "ok" | "disconnected" | "unsupported" | "unavailable"; export declare function listThreadDebugSources(): Promise<{ access: Omit & { envAdmin: boolean; memberCount: number; }; sources: ThreadDebugSource[]; }>; export declare function listAgentRunFailures(input: { sourceId?: string; ownerEmail?: string; status?: AgentRunFailureStatus | "all"; regime?: AgentFailureRegime | "all"; lookbackHours?: number; limit?: number; }): Promise<{ sourceId: string; status: "aborted" | "all" | "errored" | "truncated"; regime: "all" | AgentFailureRegime; lookbackHours: number; limit: number; count: number; partial: boolean; access: { viewerEmail: string; scope: string; canInspectAll: boolean; }; sources: { source: { id: string; label: string; kind: "configured" | "current" | "env"; databaseUrlEnv: string | null; }; status: ThreadDebugSourceHealthStatus; failureCount: number; errorCode: "thread_debug_schema_unsupported" | "thread_debug_source_disconnected" | "thread_debug_source_unavailable" | null; }[]; failures: { source: { id: string; label: string; kind: "configured" | "current" | "env"; databaseUrlEnv: string | null; }; id: string; threadId: string; turnId: string | null; ownerEmail: string; threadTitle: string; threadPreview: string; status: AgentRunFailureStatus; abortReason: string | null; errorCode: string | null; errorDetail: string | null; terminalReason: string | null; startedAt: number; completedAt: number | null; heartbeatAt: number | null; lastProgressAt: number | null; durationMs: number | null; dispatchMode: string | null; workerStage: string | null; diagStage: string | null; peakRssMb: number | null; terminalEvent: Record | null; regime: AgentFailureRegime; failureTaxonomy: import("@agent-native/core/agent/engine").AgentFailureTaxonomy; }[]; }>; export declare function searchAgentThreads(input: { sourceId?: string; query?: string; ownerEmail?: string; limit?: number; }): Promise<{ source: { id: string; label: string; kind: "configured" | "current" | "env"; databaseUrlEnv: string | null; }; access: { viewerEmail: string; scope: string; canInspectAll: boolean; }; query: string; count: number; threads: { id: string; ownerEmail: string; title: string; preview: string; messageCount: number; createdAt: number; updatedAt: number; snippet: string; }[]; }>; export declare function getAgentThreadDebug(input: { sourceId?: string; threadId?: string; runId?: string; ownerEmail?: string; maxRuns?: number; maxEvents?: number; maxTraceSpans?: number; }): Promise<{ source: { id: string; label: string; kind: "configured" | "current" | "env"; databaseUrlEnv: string | null; }; access: { viewerEmail: string; scope: string; canInspectAll: boolean; }; thread: { id: string; ownerEmail: string; title: string; preview: string; messageCount: number; createdAt: number; updatedAt: number; }; lookup: { requestedId: string; threadId: string; runId: string | null; }; messages: any; debug: any; debugRuns: any; queuedMessages: any; threadData: Record; rawThreadData: string; runs: { id: string; threadId: string; turnId: string | null; status: string; abortReason: string | null; errorCode: string | null; errorDetail: string | null; terminalReason: string | null; startedAt: number; completedAt: number | null; heartbeatAt: number | null; lastProgressAt: number | null; dispatchMode: string | null; workerStage: string | null; diagStage: string | null; peakRssMb: number | null; inFlightSince: number | null; hasDispatchPayload: boolean; events: any[]; }[]; traces: { summaries: Record[]; spans: Record[]; }; feedback: Record[]; satisfaction: Record[]; evals: Record[]; checkpoints: Record[]; }>; export {}; //# sourceMappingURL=thread-debug-store.d.ts.map