import { C as validatePlanCoordinates, S as validateEndpointOffer, _ as EndpointIdentity, a as CapabilityHandlerContext, b as createEndpointOffer, c as ConnectionInvocationError, d as CapabilityBinding, f as CapabilityParticipant, g as ConnectionPlan, h as ConnectionNegotiationPolicy, i as CapabilityHandler, l as StandardConnection, m as ConnectionIssue, n as CapabilityClient, o as CapabilityImplementation, p as ConnectionEndpointReference, r as CapabilityDispatch, s as ConnectionEndpoint, t as CapabilityCall, u as CONNECTION_API_VERSION, v as EndpointOffer, x as freezeEndpoint, y as ResolveConnectionOptions } from "./connection-CdGcSQnu.js"; import { ProtocolDeclaration, ProtocolDefinition, ProtocolRequirement, ProtocolSupport } from "@dsh-std/core"; //#region src/broker.d.ts interface ConnectionTarget { /** Implementation-neutral target. Its URI scheme is interpreted by registered connectors. */ readonly uri: string; readonly metadata?: Readonly>; } interface ConnectRequest { readonly target: ConnectionTarget; /** Live endpoint, including the dispatcher used for peer-to-local calls. */ readonly local: ConnectionEndpoint; readonly signal?: AbortSignal; } /** Client half of one concrete connection implementation. */ interface ConnectionConnector { /** Namespaced implementation identity, not a transport or product name exposed to domain consumers. */ readonly id: string; supports(target: ConnectionTarget): boolean; connect(request: ConnectRequest): Promise; } declare class ConnectionSelectionError extends Error { readonly code: 'implementation-unavailable' | 'implementation-ambiguous'; readonly implementations: readonly string[]; constructor(code: 'implementation-unavailable' | 'implementation-ambiguous', message: string, implementations: readonly string[]); } /** * Implementation registry used by an adapter or application composition root. * Domain consumers request a connection; they never import the selected implementation. */ declare class ConnectionBroker { private readonly connectors; register(connector: ConnectionConnector): () => void; implementations(target?: ConnectionTarget): readonly string[]; connect(request: ConnectRequest): Promise; } //#endregion //#region src/endpoint.d.ts interface EndpointPublication { readonly declaration: ProtocolDeclaration; readonly implementations?: readonly CapabilityImplementation[]; } interface EndpointRuntimeOptions extends EndpointIdentity { readonly revision?: number; } declare class StandardEndpointRuntime implements ConnectionEndpoint { private readonly declarations; private readonly implementations; private readonly listeners; private readonly identity; private revision; private currentOffer; constructor(options: EndpointRuntimeOptions); get offer(): EndpointOffer; register(publication: EndpointPublication): () => void; dispatch(invocation: CapabilityDispatch): Promise; onOfferChange(listener: (offer: EndpointOffer) => void): () => void; private createOffer; private publishOffer; } //#endregion //#region src/resolve.d.ts declare function resolveConnection(left: EndpointOffer, right: EndpointOffer, options: ResolveConnectionOptions): ConnectionPlan; //#endregion //#region src/rpc.d.ts interface CapabilityBindingDraft { readonly consumer: string; readonly provider: string; readonly requirement: ProtocolRequirement; readonly support: ProtocolSupport; } interface CapabilityAgreement { readonly kind: 'CapabilityBindings'; readonly bindings: readonly CapabilityBindingDraft[]; } interface CapabilityProtocolOptions { readonly apiVersion: string; readonly kind: string; readonly accepts?: readonly string[]; readonly multipleProviders?: boolean; validateRequirement?(spec: unknown): unknown; validateSupport?(spec: unknown): unknown; } /** Reusable RPC-shaped protocol definition. Domain packages opt into these semantics explicitly. */ declare function defineCapabilityProtocol(options: CapabilityProtocolOptions): ProtocolDefinition; declare function isCapabilityAgreement(value: unknown): value is CapabilityAgreement; //#endregion export { CONNECTION_API_VERSION, CapabilityAgreement, CapabilityBinding, CapabilityBindingDraft, CapabilityCall, CapabilityClient, CapabilityDispatch, CapabilityHandler, CapabilityHandlerContext, CapabilityImplementation, CapabilityParticipant, CapabilityProtocolOptions, ConnectRequest, ConnectionBroker, ConnectionConnector, ConnectionEndpoint, ConnectionEndpointReference, ConnectionInvocationError, ConnectionIssue, ConnectionNegotiationPolicy, ConnectionPlan, ConnectionSelectionError, ConnectionTarget, EndpointIdentity, EndpointOffer, EndpointPublication, EndpointRuntimeOptions, ResolveConnectionOptions, StandardConnection, StandardEndpointRuntime, createEndpointOffer, defineCapabilityProtocol, freezeEndpoint, isCapabilityAgreement, resolveConnection, validateEndpointOffer, validatePlanCoordinates }; //# sourceMappingURL=index.d.ts.map