import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { Broker } from "./broker/index.js"; import type { MessageRouter } from "./broker/router.js"; import type { InboundMessage, MessageAdapter } from "./broker/types.js"; export interface PinetRuntimeAdapterBinding { /** Transport adapter to attach to the broker runtime. */ adapter: MessageAdapter; /** Optional compatibility status used by Slack bridge startup/status surfaces. */ getBotUserId?: () => string | null; } export interface PinetRuntimeAdapterFactoryContext { broker: Broker; router: MessageRouter; selfId: string; ctx: ExtensionContext; } export type PinetRuntimeAdapterFactory = (context: PinetRuntimeAdapterFactoryContext) => PinetRuntimeAdapterBinding | PinetRuntimeAdapterBinding[] | Promise; export interface ConnectPinetRuntimeAdaptersOptions { broker: Pick; bindings: PinetRuntimeAdapterBinding[]; onInbound: (message: InboundMessage) => void; } export interface ConnectPinetRuntimeAdaptersResult { botUserId: string | null; } export declare function buildPinetRuntimeAdapterBindings(factories: readonly PinetRuntimeAdapterFactory[], context: PinetRuntimeAdapterFactoryContext): Promise; export declare function connectPinetRuntimeAdapters({ broker, bindings, onInbound, }: ConnectPinetRuntimeAdaptersOptions): Promise;