/** * InProcessTransport — ServerTransport that runs entirely in-process. * * Used internally by {@link LocalRuntime}. Also exported for consumers building * custom integrations that need direct transport access without WebSocket overhead. * * Runner side (startAgentServer): * onCommand(handler) — registers the runner's command handler * send(event) — delivers AgentEvents to onEvent subscribers * * Application side: * inject(command) — sends a command to the agent (deferred to avoid re-entrancy) * onEvent(handler) — subscribes to AgentEvents; returns unsubscribe fn * * @docLink packages/sdk/concepts#in-process-transport */ import type { AgentCommand, AgentEvent, ServerTransport } from "@skaile/workspaces/types"; export declare class InProcessTransport implements ServerTransport { private readonly commandHandlers; private readonly eventHandlers; private readonly pendingCommands; listen(): Promise; close(): Promise; send(event: AgentEvent): void; onCommand(handler: (cmd: AgentCommand) => void): () => void; onConnect(_handler: () => void): () => void; onDisconnect(_handler: () => void): () => void; /** True once a command handler is wired (i.e. the runner has started). */ get connected(): boolean; /** * Send a command into the agent runner. Deferred to avoid re-entrancy. * Commands injected before a handler is registered are buffered and * flushed when the runner wires its handler, so none are dropped. */ inject(command: AgentCommand): void; /** Subscribe to AgentEvents. Returns an unsubscribe function. */ onEvent(handler: (event: AgentEvent) => void): () => void; } //# sourceMappingURL=transport.d.ts.map