/** * LocalRuntime — IAgentRuntime implementation that runs the agent in the same process. * * Mirror image of AgentClient: same interface, no WebSocket. * Uses InProcessTransport + startAgentServer() internally. * * Usage: * const runtime = new LocalRuntime(); * runtime.onEvent(e => console.log(e)); * await runtime.start({ projectDir: "/path/to/workspace" }); * await runtime.prompt("Hello"); * await runtime.dispose(); * * @docLink packages/sdk/concepts#local-runtime */ import type { AgentEvent, IAgentRuntime } from "@skaile/workspaces/types"; /** * Options passed to {@link LocalRuntime.start}. * * `projectDir` is the only required field — it points to the workspace directory * containing `skaile.yaml`. All other fields override the manifest's agent configuration. * * @docLink packages/sdk/concepts#local-runtime */ export interface LocalRuntimeStartOptions { projectDir: string; agentDir?: string; driver?: string; model?: string; provider?: string; onLog?: (line: string) => void; } export declare class LocalRuntime implements Omit { private readonly transport; private readonly handlers; private started; private resolveReady; private readonly readyPromise; constructor(); /** * Start the agent server. Resolves when the runner is wired and ready * to accept commands. Must be called before prompt() / reply(). */ start(opts: LocalRuntimeStartOptions): Promise; /** * Resolves once the runner is wired and accepting commands. Await this * before issuing commands that expect a reply (e.g. debug queries) so a * pre-start command isn't buffered indefinitely. Never rejects. */ whenReady(): Promise; prompt(message: string): Promise; reply(answer: string): Promise; abort(): Promise; dispose(): Promise; onEvent(handler: (e: AgentEvent) => void): void; offEvent(handler: (e: AgentEvent) => void): void; get isRunning(): boolean; } //# sourceMappingURL=local-runtime.d.ts.map