import type { QueryContext } from './query-engine.js'; import { type DhfConfigV2 } from './dhf-config-v2.js'; export interface CompileOptions { /** Template ID or path (relative to template_dir or built-in) */ templateId: string; /** Query context for model access */ ctx: QueryContext; /** DHF config V2 */ config: DhfConfigV2; /** Custom template base directory (absolute) */ customTemplateDir?: string; /** Additional metadata injected into project scope */ extraMeta?: Record; } export interface CompileResult { /** Fully resolved markdown content */ markdown: string; /** Extracted frontmatter from the template */ frontmatter: Record; /** Template ID used */ templateId: string; /** Resolved title (frontmatter.title or templateId) */ title: string; /** List of warnings accumulated during compilation */ warnings: string[]; } /** Options for compiling raw markdown content (a workbench document) */ export interface CompileContentOptions { /** Markdown body — frontmatter, if any, is stripped */ content: string; /** Base directory for relative {{include:...}} resolution */ baseDir?: string; ctx: QueryContext; config: DhfConfigV2; customTemplateDir?: string; extraMeta?: Record; } /** * Compile already-loaded markdown content (e.g. a workbench document from * dhf/documents/) through the same pipeline as template compilation: * includes → project directives → ref/diagram/toc/glossary → queries → scripts. */ export declare function compileMarkdownContent(options: CompileContentOptions): Promise<{ markdown: string; warnings: string[]; }>; export declare function compileMarkdownDocument(options: CompileOptions): Promise; export interface BatchCompileOptions { templates: Array<{ id: string; outputPath?: string; }>; ctx: QueryContext; config: DhfConfigV2; outputDir: string; customTemplateDir?: string; } export interface BatchCompileResult { results: Map; failed: string[]; } export declare function batchCompileMarkdown(options: BatchCompileOptions): Promise; export declare function loadDhfMarkdownFile(filePath: string): { content: string; frontmatter: Record; body: string; } | null; //# sourceMappingURL=document-compiler.d.ts.map