import type { LiveActivityItem, SessionTreeResponse } from "../../types.js"; import type { RuntimeInstanceRecord } from "../../runtime-instance-store.js"; import type { AgentLaunchContext, RunLaunchContext } from "../../agent-context-store.js"; import type { Router } from "../router.js"; type LocalSnapshot = Awaited>; type AgentContextBundle = { agents: Record; runs?: Record; }; type LocalLiveActivity = { activities: LiveActivityItem[]; total: number; }; type LiveActivityPage = { activities: LiveActivityItem[]; total?: number; storeUpdatedAt?: string; cursor?: string | null; nextCursor?: string | null; prevCursor?: string | null; hasMore?: boolean; }; type LiveSessionsResponse = SessionTreeResponse; type LiveActivityResponse = { activities: LiveActivityItem[]; total?: number; } & Record; type RouteReqLike = { on?: (event: string, listener: () => void) => void; }; type RouteResLike = { write?: (chunk: string | Buffer) => boolean | void; writeHead: (statusCode: number, headers?: Record) => unknown; end: (chunk?: string | Buffer) => void; writableEnded?: boolean; on?: (event: string, listener: () => void) => void; once?: (event: string, listener: () => void) => void; }; type RegisterLiveLegacyRoutesDeps = { getLiveSessions: (input: { initiative: string | null; projectId: string | null; limit: number | undefined; }) => Promise; getLiveActivity: (input: { run: string | null; since: string | null; projectId: string | null; limit: number | undefined; }) => Promise; listInitiativeIdsForProject: (input: { projectId: string; }) => Promise; listRuntimeInstances: (input: { limit: number; }) => RuntimeInstanceRecord[]; injectRuntimeInstancesAsSessions: (input: SessionTreeResponse, instances: RuntimeInstanceRecord[]) => SessionTreeResponse; enrichSessionsWithRuntime: (input: SessionTreeResponse, instances: RuntimeInstanceRecord[]) => SessionTreeResponse; loadLocalOpenClawSnapshot: (limit: number) => Promise; toLocalSessionTree: (snapshot: LocalSnapshot, limit?: number) => SessionTreeResponse; readAgentContexts: () => AgentContextBundle; applyAgentContextsToSessionTree: (input: SessionTreeResponse, contexts: { agents: Record; runs: Record; }) => SessionTreeResponse; listActivityPage: (input: { limit: number; runId: string | null; since: string | null; until: string | null; cursor: string | null; }) => LiveActivityPage; applyAgentContextsToActivity: (input: LiveActivityItem[], contexts: { agents: Record; runs: Record; }) => LiveActivityItem[]; appendActivityItems: (items: LiveActivityItem[]) => void; activityWarmByKey: Map; activityWarmThrottleMs: number; outboxReadAllItems: () => Promise; toLocalLiveActivity: (snapshot: LocalSnapshot, limit?: number) => Promise; loadLocalTurnDetail: (input: { turnId: string; sessionKey: string | null; runId: string | null; }) => Promise | null>; summarizeActivityHeadline: (input: { text: string; title: string | null; type: string | null; }) => Promise<{ headline: string; source: string; model: string | null; }>; sendJson: (res: TRes, status: number, payload: unknown) => void; safeErrorMessage: (err: unknown) => string; sendHtml: (res: TRes, status: number, html: string) => void; resolveFilesystemOpenPath: (rawPath: string) => string; escapeHtml: (value: string) => string; statSync: (path: string) => { isDirectory: () => boolean; isFile: () => boolean; size: number; }; readdirSync: (path: string) => string[]; existsSync: (path: string) => boolean; resolvePath: (...segments: string[]) => string; readFilePreview: (path: string, totalBytes: number) => { previewBuffer: Buffer; truncated: boolean; }; filePreviewMaxBytes: number; filePreviewMaxDirEntries: number; resolveAutopilotLogCandidates?: (runId: string) => string[]; openPathInTerminal?: (path: string) => Promise; securityHeaders: Record; corsHeaders: Record; config: { baseUrl: string; apiKey: string; userId: string; }; isUserScopedApiKey: (apiKey: string) => boolean; streamIdleTimeoutMs: number; renderLiveStreamV2?: (input: { path: string; query: URLSearchParams; req: TReq; res: TRes; }) => Promise; }; export declare function registerLiveLegacyRoutes(router: Router, TReq, TRes>, deps: RegisterLiveLegacyRoutesDeps): void; export {};