/** * Shared template-listing module. * * Canonical helpers for listing templates with metadata, used by: * - CLI `list --json` command * - the openagreements.org deploy (private `UseJunior/openagreements-org-deploy` repo) * - MCP `tools.ts` (via dynamic import or npm dependency) */ import { type FieldDefinition, type TemplateCredit } from './metadata.js'; export type { TemplateCredit } from './metadata.js'; export interface TemplateListField { name: string; type: string; required: boolean; section: string | null; description: string; display_label?: string; default: string | null; default_value_rationale: string | null; options?: string[]; items?: TemplateListField[]; } export interface TemplateListItem { name: string; display_name: string; category: string; description: string; license?: string; source_url: string; source: string | null; attribution_text?: string; allow_derivatives: boolean; /** Maturity signal (open-agreements#243); undefined for templates that don't declare it. */ stability?: string; /** Expository provenance text (open-agreements#533); undefined for templates that don't declare it. */ derived_from?: string; /** Structured contributor provenance (open-agreements#533); empty for templates that don't declare it. */ credits: TemplateCredit[]; fields: TemplateListField[]; } export declare function categoryFromId(id: string): string; /** Extract a human-friendly source name from a URL */ export declare function sourceName(url: string): string | null; export declare function mapFields(fields: FieldDefinition[], priorityFields: string[]): TemplateListField[]; export declare function listTemplateItems(): TemplateListItem[]; //# sourceMappingURL=template-listing.d.ts.map