import type { DeviceChatTool, MobileDeviceChatTool } from '@xopcai/endpoint-tools-protocol'; import type { EndpointConnectionSnapshot, EndpointRegistry } from './registry.js'; import type { WakeableEndpointSummary } from './wake-provider.js'; export interface EndpointExecutionTarget { conversationId: string; endpointId: string; principalId: string; connectionId: string; executionRef: string; selectedAt: number; expiresAt: number; transcriptId?: string; actorPrincipalId?: string; mobileTool?: MobileDeviceChatTool; capabilityTool?: DeviceChatTool; } interface TaskTargetStore { get(key: string): EndpointExecutionTarget | undefined; set(key: string, value: EndpointExecutionTarget): unknown; delete(key: string): boolean; entries(): Iterable<[string, EndpointExecutionTarget]>; } /** * Execution targets support both an explicit pinned session target and multi-endpoint * per-step resolution with `(conversationId, endpointId)` resource leases (ADR 0004). */ export declare class EndpointTaskTargetService { private readonly registry; private readonly transcriptId; private readonly actorPrincipalId; private readonly targets; private readonly getWakeable; private readonly resources; private readonly defaultEndpoints; private readonly listeners; constructor(registry: EndpointRegistry, transcriptId?: (conversationId: string) => string | undefined, actorPrincipalId?: (conversationId: string) => string | undefined, targets?: TaskTargetStore, getWakeable?: (endpointId: string) => WakeableEndpointSummary | undefined); onChange(listener: (conversationId: string) => void): () => void; setDefaultEndpoint(conversationId: string, endpointId: string | undefined): void; getDefaultEndpoint(conversationId: string): string | undefined; select(conversationId: string, endpointId: string, now?: number, actorPrincipalId?: string, capabilityTool?: DeviceChatTool): EndpointExecutionTarget; get(conversationId: string): EndpointExecutionTarget | undefined; resolve(conversationId: string): EndpointConnectionSnapshot | undefined; /** * Resolve an endpoint for a single pipeline step without mutating the session's pinned target. * Explicit endpoint overrides and pinned session targets fail closed if offline. */ resolveForStep(conversationId: string, explicitEndpointId?: string): EndpointConnectionSnapshot | undefined; hold(conversationId: string, resourceId: string, endpointId?: string): () => void; hasActiveResources(conversationId: string, endpointId?: string): boolean; hasActiveResourcesForEndpoint(endpointId: string): boolean; private assertReleased; clear(conversationId: string): boolean; private key; } export {};