import type { DaemonRuntimeSessionRouteHandlers, DaemonRuntimeTaskRouteHandlers } from './context.js'; import type { DaemonRuntimeRouteContext } from './runtime-route-types.js'; import { type JsonRecord } from './route-helpers.js'; export type SharedSessionRecordResponse = { readonly id: string; readonly kind: 'tui' | 'agent' | 'webui' | 'companion-task' | 'companion-chat' | 'automation' | 'channel' | 'acp' | 'hosted'; readonly project: string; readonly title: string; readonly status: 'active' | 'closed'; readonly createdAt: number; readonly updatedAt: number; readonly lastMessageAt?: number | undefined; readonly closedAt?: number | undefined; readonly lastActivityAt: number; readonly messageCount: number; readonly retainedMessageCount?: number | undefined; readonly pendingInputCount: number; readonly routeIds: readonly string[]; readonly surfaceKinds: readonly string[]; readonly participants: readonly SharedSessionParticipantResponse[]; readonly activeAgentId?: string | undefined; readonly lastAgentId?: string | undefined; readonly lastError?: string | undefined; readonly metadata: Record; }; type SharedSessionParticipantResponse = { readonly surfaceKind: string; readonly surfaceId: string; readonly externalId?: string | undefined; readonly userId?: string | undefined; readonly displayName?: string | undefined; readonly routeId?: string | undefined; readonly lastSeenAt: number; }; export declare const SHARED_SESSION_KINDS: Set<"channel" | "acp" | "automation" | "tui" | "agent" | "webui" | "companion-task" | "companion-chat" | "hosted">; export declare function toSharedSessionRecordResponse(sessionId: string, session: unknown, options?: { readonly status?: SharedSessionRecordResponse['status'] | undefined; readonly messageCount?: number | undefined; readonly pendingInputCount?: number | undefined; }): SharedSessionRecordResponse; export declare function createDaemonRuntimeSessionRouteHandlers(context: DaemonRuntimeRouteContext): DaemonRuntimeSessionRouteHandlers & DaemonRuntimeTaskRouteHandlers; /** * Extract the canonical `body` field from an incoming POST envelope. Returns '' * when absent or non-string; the caller must check for '' and return 400. */ export declare function readSharedSessionMessageBody(body: JsonRecord): string; export {}; //# sourceMappingURL=runtime-session-routes.d.ts.map