import { IServiceTransport, ServiceConnectionInfo, ServiceListenAddress, ServiceTransportRequest, ServiceTransportResponse, ServiceTransportStream, ServiceTransportHealth } from '@kb-labs/sdk'; export { IServiceTransport, ServiceConnectionInfo, ServiceTransportHealth, ServiceTransportRequest, ServiceTransportResponse, ServiceTransportStream } from '@kb-labs/sdk'; export { manifest } from './manifest.js'; import '@kb-labs/sdk/adapters'; interface HttpServiceTransportConfig { services: Record; /** * Per-environment TCP port shift, added to every service url's port. Sockets * are unaffected (they isolate via KB_SOCKET_HASH path, not port). This is a * LOCAL mechanism for running multiple environments on one host; in * cloud/k8s the offset is 0 and isolation comes from namespace/DNS. Falls * back to the KB_NET_OFFSET env var when not set in config. */ offset?: number; } /** * Shift the port of a TCP url by offset, leaving scheme/host/path intact. * No-op for offset 0, urls without an explicit port (e.g. socket placeholders), * or unparseable urls. The single helper used for both route and bind so the * two never drift. */ declare function applyPortOffset(url: string, offset: number): string; declare class HttpServiceTransport implements IServiceTransport { private readonly config; private readonly pools; private readonly offset; constructor(config: HttpServiceTransportConfig); connectionInfo(serviceId: string): ServiceConnectionInfo | undefined; listenAddress(serviceId: string): ServiceListenAddress | undefined; call(serviceId: string, req: ServiceTransportRequest): Promise; stream(serviceId: string, req: ServiceTransportRequest): Promise; private _request; health(): Promise; /** Drain and close all connection pools. */ destroy(): Promise; } /** * @module @kb-labs/adapters-service-transport-http * HTTP/unix-socket implementation of IServiceTransport. * * Uses undici connection pools — supports both TCP and unix domain sockets. * Platform-only: never exposed to plugin context. */ declare function createAdapter(config: HttpServiceTransportConfig): HttpServiceTransport; export { HttpServiceTransport, type HttpServiceTransportConfig, applyPortOffset, createAdapter };