interface CacheOptions { fresh?: boolean; offline?: boolean; ttlMs?: number; /** Network timeout in ms for the underlying fetch (default 10s). */ timeoutMs?: number; } type Section = 'props' | 'usage' | 'examples' | 'all'; interface PageDocs { kind: 'component' | 'page'; name: string; slug: string; category: string; description?: string; section: Section; markdown: string; url: string; cacheHit: boolean; } interface GetPageDocsOptions extends CacheOptions { section?: Section; } export declare const getPageDocs: (input: string, options?: GetPageDocsOptions) => Promise; /** * @internal Re-exported from `@marigold/cli` for the in-tree MCP server only. * Not part of the public API surface — shape may change without a major bump. */ interface ManifestComponent { name: string; slug: string; description?: string; badge?: string; } /** @internal See {@link ManifestComponent}. */ interface ManifestCategory { name: string; label: string; components: ManifestComponent[]; } /** @internal See {@link ManifestComponent}. */ interface ManifestPage { title: string; slug: string; category: string; description?: string; } /** @internal See {@link ManifestComponent}. */ interface Manifest { version?: string; generatedAt?: string; baseUrl: string; packages?: Record; categories: ManifestCategory[]; pages: ManifestPage[]; } interface LoadManifestResult { manifest: Manifest; cacheHit: boolean; } export declare const loadManifest: (options?: CacheOptions) => Promise; interface ResolveResult { component: ManifestComponent; category: ManifestCategory; } export declare const resolveComponent: (manifest: Manifest, input: string) => ResolveResult | null; export declare const resolvePage: (manifest: Manifest, input: string) => ManifestPage | null; interface ExampleSummary { slug: string; title: string; brief: string; patterns: string[]; } interface ExamplesManifest { version?: string; generatedAt?: string; baseUrl: string; examples: ExampleSummary[]; } interface ExampleMockData { alias: string; shape: string; } interface ExampleFile { path: string; source: string; } interface ExampleDetail extends ExampleSummary { mockData: ExampleMockData[]; keyFiles: string[]; scaffoldingFiles: string[]; peerDeps: string[]; files: ExampleFile[]; url: string; } interface LoadExamplesResult { manifest: ExamplesManifest; cacheHit: boolean; } export declare const loadExamplesManifest: (options?: CacheOptions) => Promise; export declare const listExamples: (options?: CacheOptions) => Promise<{ examples: ExampleSummary[]; cacheHit: boolean; }>; export declare const resolveExample: (manifest: ExamplesManifest, input: string) => ExampleSummary | null; export declare const getExample: (input: string, options?: CacheOptions) => Promise<{ example: ExampleDetail; cacheHit: boolean; }>; type OutputFormat = 'markdown' | 'json' | 'plain'; interface RunDocsOptions { component: string; section?: Section; format?: OutputFormat; fresh?: boolean; offline?: boolean; } interface RunDocsResult { output: string; cacheHit: boolean; slug: string; } export declare const runDocs: (options: RunDocsOptions) => Promise; interface RunListOptions { category?: string; search?: string; format?: OutputFormat; fresh?: boolean; offline?: boolean; } interface RunListResult { output: string; cacheHit: boolean; category?: string; } export declare const runList: (options?: RunListOptions) => Promise; type ExamplesSubcommand = 'list' | 'get'; interface RunExamplesOptions { subcommand: ExamplesSubcommand; slug?: string; format?: OutputFormat; fresh?: boolean; offline?: boolean; } interface RunExamplesResult { output: string; cacheHit: boolean; slug?: string; } export declare const runExamples: (options: RunExamplesOptions) => Promise; type Framework = 'nextjs' | 'vite' | 'unknown'; type PackageManager = 'pnpm' | 'yarn' | 'npm' | 'bun'; interface ProjectInfo { cwd: string; framework: Framework; packageManager: PackageManager; hasTailwindConfig: boolean; tailwindVersion: 3 | 4 | null; rootLayout: string | null; } interface RunInitOptions { cwd?: string; yes?: boolean; framework?: Framework; skipInstall?: boolean; } interface RunInitResult { installed: boolean; project: ProjectInfo; nextSteps: string; } export declare const runInit: (options?: RunInitOptions) => Promise; type ValidateFormat = 'json' | 'text'; type ValidateChecks = 'technical' | 'spatial' | 'a11y' | 'all'; type RunValidateOptions = { file: string; checks?: ValidateChecks; format?: ValidateFormat; }; type RunValidateResult = { output: string; hasErrors: boolean; }; export declare const runValidate: (options: RunValidateOptions) => Promise; declare const doctorFormatValues: readonly ["text", "json"]; type DoctorFormat = (typeof doctorFormatValues)[number]; interface RunDoctorOptions { cwd?: string; format?: DoctorFormat; /** Skip the network entirely; freshness relies on the local cache only. */ offline?: boolean; } interface RunDoctorResult { output: string; hasErrors: boolean; } export declare const runDoctor: (options?: RunDoctorOptions) => Promise; type IssueSeverity = 'error' | 'warning'; type CheckId = 'package-presence' | 'version-match' | 'version-freshness' | 'provider-wrapper' | 'theme-passed' | 'tailwind-config' | 'react-peer'; interface DoctorIssue { /** Stable check id, e.g. 'package-presence'. */ check: CheckId; severity: IssueSeverity; /** What is wrong. */ message: string; /** How to fix it — a command or an edit. */ suggestion: string; /** Structured extras, e.g. { installed, latest } or { missing: [...] }. */ details?: Record; } interface DoctorReport { errors: DoctorIssue[]; warnings: DoctorIssue[]; /** Titles of the checks that passed. */ passed: string[]; /** Rendered, human-readable checklist. */ text: string; } type TelemetrySubcommand = 'status' | 'enable' | 'disable'; interface RunTelemetryOptions { subcommand: TelemetrySubcommand; } export declare const runTelemetry: (options: RunTelemetryOptions) => string; interface RunCompletionResult { output: string; exitCode: number; } export declare const runCompletion: (shell: string | undefined) => RunCompletionResult; export declare const runCompleteSuggest: (words: string[]) => string; export type { DoctorIssue, DoctorReport, ExampleDetail, ExampleFile, ExampleMockData, ExampleSummary, ExamplesManifest, Manifest, ManifestCategory, ManifestComponent, ManifestPage, PageDocs, RunDoctorOptions, RunDoctorResult, ValidateChecks, ValidateFormat };