/**
 * Worker composition root — assembles the embedded runtime, controller, and
 * worker-port adapter inside a Web Worker. Sits on the runtime side of the
 * worker boundary; consumed from the worker entry script.
 */
import { type ChildAgentEventEmitter, type EmbeddedAgentRuntime } from '../../contracts/agent-api.js';
import type { ToolRegistry } from '../../contracts/host-tool-api.js';
import { type ComposeEmbeddedAgentRuntimeOptions } from '../index.js';
import { type EmbeddedAgentDispatch } from './dispatch.js';
import { type WorkerGlobalBinding } from './worker-global.js';
import { type WorkerPort, type WorkerPortBinding, type WorkerPortHostToolExecutorBinding, type WorkerPortHostToolExecutorOptions } from './worker-port.js';
/** Worker-global binding that also exposes the underlying runtime. */
export interface EmbeddedAgentWorkerBinding extends WorkerGlobalBinding {
    readonly runtime: EmbeddedAgentRuntime;
}
/** Port binding that also exposes the underlying controller. */
export interface EmbeddedAgentDispatchBinding extends WorkerPortBinding {
    readonly controller: EmbeddedAgentDispatch;
}
/** Build the worker-side client adapter that proxies host requests over the port. */
export declare function createEmbeddedAgentWorkerHostToolExecutor(port: WorkerPort | undefined, options: WorkerPortHostToolExecutorOptions): WorkerPortHostToolExecutorBinding;
/** Attach a controller for `runtime` to `port` and return its binding. */
export declare function attachEmbeddedAgentDispatch(runtime: EmbeddedAgentRuntime, hostToolExecutor: WorkerPortHostToolExecutorBinding['hostToolExecutor'], registry: ToolRegistry, port?: WorkerPort): EmbeddedAgentDispatchBinding;
/**
 * Build the closure that every composition root wires into
 * `createDefaultHostTools({ emitChildAgentEvent: ... })`. Centralizes
 * the `AgentEventMessage` + `AgentChildLoopEvent` envelope
 * construction so composition roots don't hand-roll it.
 */
export declare function createChildAgentEventEmitter(port: Pick<WorkerPort, 'postMessage'>): ChildAgentEventEmitter;
/** Bring up an embedded runtime inside the worker and bind it to the port. */
export declare function createEmbeddedAgentWorkerBinding(options: ComposeEmbeddedAgentRuntimeOptions, port?: WorkerPort, registry?: ToolRegistry): Promise<EmbeddedAgentWorkerBinding>;
//# sourceMappingURL=embedded-agent-worker.d.ts.map