import { getTemplateById, getTemplateSelectOptions, isBuiltInTemplateId, listTemplates } from './template-registry.js'; import type { TemplateDefinition } from './template-registry.js'; /** * Stable logical source metadata exposed by structured template discovery. * * Filesystem paths remain an internal implementation detail used to render a * template. CLI consumers receive a built-in id or official package locator * instead, so output is reproducible across npm caches and worktrees. */ export type CliTemplateSource = { kind: 'built-in'; id: string; } | { kind: 'npm'; packageName: string; alias: string; }; /** Public template metadata returned by `templates ... --format json`. */ export interface CliTemplateMetadata { id: string; description: string; defaultCategory: string; features: string[]; source: CliTemplateSource; } /** * Converts internal template registry metadata into a portable CLI payload. * * @param template Internal template definition used for scaffold resolution. * @returns Stable public metadata without the installation-local template directory. */ export declare function toCliTemplateMetadata(template: TemplateDefinition): CliTemplateMetadata; /** Returns all registered templates as portable structured-output metadata. */ export declare function listCliTemplateMetadata(): readonly CliTemplateMetadata[]; /** * Finds one registered template as portable structured-output metadata. * * @param templateId Built-in id, official package name, or workspace alias. * @returns Stable public metadata, or `undefined` when the id is not registered. */ export declare function findCliTemplateMetadata(templateId: string): CliTemplateMetadata | undefined; /** * Resolves one registered template as portable structured-output metadata. * * @param templateId Built-in id, official package name, or workspace alias. * @returns Stable public metadata for the requested template. * @throws {Error} When the id does not match a registered template or alias. */ export declare function getCliTemplateMetadata(templateId: string): CliTemplateMetadata; /** * Format one line of template list output for a built-in template. * * @param template Template metadata including `id` and `description`. * @returns One-line summary text for `templates list`. */ export declare function formatTemplateSummary(template: TemplateDefinition): string; /** * Format the feature and capability hint lines shown under a template summary. * * @param template Template metadata including the `features` list. * @returns Indented feature and capability text for CLI list output. */ export declare function formatTemplateFeatures(template: TemplateDefinition): string; /** * Format the detailed template description for `templates inspect`. * * This expands special layer combinations for the `persistence` and `compound` * templates and returns a multi-line block centered on human-facing identity, * capabilities, and logical layer composition. * * @param template Template metadata including `id`, `defaultCategory`, * `templateDir`, and `features`. * @returns Multi-line template details text for CLI output. */ export declare function formatTemplateDetails(template: TemplateDefinition): string; export { getTemplateById, getTemplateSelectOptions, listTemplates }; export { isBuiltInTemplateId };