import type { MarketplaceTemplate, MarketplaceTemplateManifest, MarketplaceTemplateVar } from '../types/spec-marketplace.js';
/**
 * List all available templates (builtin only for now).
 */
export declare function listTemplates(): Promise<MarketplaceTemplate[]>;
/**
 * Search templates by name, description, or tags. Returns all templates when query is empty.
 */
export declare function searchTemplates(query: string): Promise<MarketplaceTemplate[]>;
/**
 * Apply variable substitution to template content.
 * Replaces all occurrences of {{variable_name}} with the provided value.
 * Missing variables fall back to the variable's default, then to the placeholder.
 */
export declare function applyVariables(content: string, variables: Record<string, string>, variableDefs: MarketplaceTemplateVar[]): string;
/**
 * Instantiate a template by name with the given variables.
 * Returns the rendered spec.md content, or null if the template does not exist.
 */
export declare function applyTemplate(templateName: string, variables: Record<string, string>): Promise<string | null>;
/**
 * Build a MarketplaceTemplateManifest from a spec's content and the provided variable names.
 * Used for the "publish" flow.
 */
export declare function buildPublishManifest(specId: string, templateName: string, variableNames: string[], specContent: string): MarketplaceTemplateManifest;
//# sourceMappingURL=spec-template-engine.d.ts.map