import { type OwlConstructResult, type OwlQueryResult } from '@oml/owl';
import type { MdExecuteBlocksParams, MdExecuteBlocksResult } from './md-execution.js';
export interface MarkdownExecutionBackend {
    ensureContext(modelUri: string): Promise<void>;
    resolveContextIri(modelUri: string): string;
    countContextQuads?: (modelUri: string) => Promise<number>;
    query(modelUri: string, sparql: string): Promise<OwlQueryResult>;
    construct(modelUri: string, sparql: string): Promise<OwlConstructResult>;
    isKnownOntologyIriNamespace?: (ontologyIri: string) => boolean;
    /**
     * Run `action` with the given quads temporarily injected into the model's reasoning store.
     * Used to materialize SHACL `sh:rule` CONSTRUCT outputs for the duration of a query.
     * Implementations must ensure the quads are removed after `action` completes (success or error).
     */
    withMaterializedQuads?: <T>(modelUri: string, quads: OwlConstructResult['quads'], action: () => Promise<T>) => Promise<T>;
}
export declare class MarkdownExecutor {
    private readonly backend;
    constructor(backend: MarkdownExecutionBackend);
    executeBlocks(params: MdExecuteBlocksParams): Promise<MdExecuteBlocksResult>;
    private executeMatrixBlock;
    private executeTableBlock;
    private enrichQuantityLiterals;
    private executeGraphBlock;
    private executeDiagramBlock;
    private executeTreeBlock;
    private executeTextBlock;
    private executeListBlock;
}
