import type WebSocket from "ws"; import type { EndpointBackgroundExchangeMode, EndpointExecutionSurface, RuntimeEndpointCapability, WorkspaceMetadata } from "../runtime-endpoint-client.js"; import { CorrelationRingBuffer } from "./correlation-ring.js"; export interface DisplayMetadata { session_name?: string; kind: string; started_at: string; workspace?: WorkspaceMetadata; tracking_ref?: string; task_hint?: string; } export interface BrokerEndpointEntry { endpoint_id: string; endpoint_nonce: string; endpoint_owner_token: string; agent_id: string; plugin_pid: number; ipc_ws: WebSocket; state: "active" | "reconnecting"; state_since: Date; grace_deadline?: Date; runtime_capabilities?: RuntimeEndpointCapability[]; execution_surface?: EndpointExecutionSurface; runtime_session_id?: string; background_exchange_mode?: EndpointBackgroundExchangeMode; display_metadata: DisplayMetadata; correlation_ring: CorrelationRingBuffer; } export interface RegisterArgs { endpoint_id: string; endpoint_nonce?: string; endpoint_owner_token?: string; agent_id: string; plugin_pid: number; ipc_ws: WebSocket; runtime_capabilities?: RuntimeEndpointCapability[]; execution_surface?: EndpointExecutionSurface; runtime_session_id?: string; background_exchange_mode?: EndpointBackgroundExchangeMode; display_metadata: DisplayMetadata; } export declare class EndpointRegistry { private readonly byId; register(args: RegisterArgs): BrokerEndpointEntry; get(endpoint_id: string): BrokerEndpointEntry | undefined; listActive(): BrokerEndpointEntry[]; listActiveByPluginPid(plugin_pid: number): BrokerEndpointEntry[]; unregister(endpoint_id: string): BrokerEndpointEntry | undefined; markReconnecting(endpoint_id: string, grace_deadline: Date): BrokerEndpointEntry; markActive(endpoint_id: string, new_ws: WebSocket): BrokerEndpointEntry; preconditionForReattach(endpoint_id: string, plugin_pid: number): BrokerEndpointEntry | undefined; getReattachStatus(endpoint_id: string, plugin_pid: number): { ok: true; entry: BrokerEndpointEntry; } | { ok: false; reason: "endpoint_unknown"; } | { ok: false; reason: "reattach_pid_mismatch"; } | { ok: false; reason: "endpoint_not_reconnecting"; }; list(): BrokerEndpointEntry[]; size(): number; } //# sourceMappingURL=endpoint-registry.d.ts.map