import type { EngineCatalog } from '../spec/engine-catalog.js';
import type { WorkspaceSpec } from '../spec/workspace-spec.js';
import { type ValidationCode } from '../validate/validate-spec.js';
export type WorkspaceHost = {
    replaceChildren: (...nodes: unknown[]) => void;
};
export type WorkspaceMounter = {
    mount: (host: WorkspaceHost, spec: WorkspaceSpec) => void | Promise<void>;
};
export type LoadWorkspaceComponent = (id: string) => Promise<WorkspaceMounter | undefined>;
export type InterpretRefuse = {
    mounted: false;
    code: ValidationCode | 'invalid_result';
    reason: string;
};
export type InterpretMounted = {
    mounted: true;
    spec: WorkspaceSpec;
};
export type InterpretResult = InterpretRefuse | InterpretMounted;
/**
 * Validate then mount. Hostile specs never reach load() or the host.
 * Mount is a catalog loader on a known id — not host markup or element registry APIs.
 */
export declare function interpretWorkspace(toolResult: unknown, catalog: EngineCatalog, load: LoadWorkspaceComponent, host: WorkspaceHost): Promise<InterpretResult>;
