import { AsyncLocalStorage } from 'async_hooks'; import type { AdapterContext, AdapterCapability, AdapterStore, AgentRunner, AuditSink, BlobStorage, EventResolution, HttpRouter, InboundEvent, InboundMessage, Logger, OutboundMessage, RawResponse, ResolvedUser, RouteResolution } from './types'; export interface SyncWindow { res: RawResponse; timeoutMs: number; } export declare function getSyncWindowStore(): AsyncLocalStorage; export declare function runInSyncWindow(window: SyncWindow, fn: () => Promise): Promise; export interface AdapterContextOptions { instanceId: string; config: TConfig; capabilities: ReadonlySet; log?: Logger; agentRunner?: AgentRunner; db?: AdapterStore; storage?: BlobStorage; audit?: AuditSink; abortSignal?: AbortSignal; onInbound?: (msg: InboundMessage) => Promise; onEmitEvent?: (event: InboundEvent) => Promise; onUpdateMessage?: (messageId: string, patch: Partial) => Promise; onResolveUser?: (userId: string) => Promise; httpRouter?: HttpRouter; logger?: Logger; } export declare function createAdapterContext(opts: AdapterContextOptions): AdapterContext;