/** * Input source types for ralph-starter * * Sources allow fetching specs from various locations: * - Built-in: files, URLs, PDFs * - Integrations: Linear, Notion, GitHub, Figma */ /** * Result from fetching a source */ export interface SourceResult { /** The spec content in markdown format */ content: string; /** Original source identifier */ source: string; /** Optional title/name extracted from source */ title?: string; /** Metadata about the fetch */ metadata?: Record; } /** * Options passed to source fetch */ export interface SourceOptions { /** Project name/ID for task app integrations */ project?: string; /** Label/tag filter for task app integrations */ label?: string; /** Status filter (e.g., 'open', 'in_progress') */ status?: string; /** Maximum items to fetch */ limit?: number; /** Custom headers for URL fetches */ headers?: Record; /** Specific issue/item number to fetch */ issue?: number; /** Default repository for issues (GitHub) */ defaultIssuesRepo?: string; /** Figma mode: spec, tokens, components, assets, content */ figmaMode?: 'spec' | 'tokens' | 'components' | 'assets' | 'content'; /** Figma component framework: react, vue, svelte, astro, nextjs, nuxt, html */ figmaFramework?: 'react' | 'vue' | 'svelte' | 'astro' | 'nextjs' | 'nuxt' | 'html'; /** Figma token format: css, scss, json, tailwind */ figmaFormat?: 'css' | 'scss' | 'json' | 'tailwind'; /** Figma specific node IDs (comma-separated) */ figmaNodes?: string; /** Figma image export scale */ figmaScale?: number; /** Figma content mode target directory */ figmaTarget?: string; /** Figma content mode preview flag */ figmaPreview?: boolean; /** Figma content mode custom mapping file */ figmaMapping?: string; } /** * Credentials for authenticated sources */ export interface SourceCredentials { apiKey?: string; token?: string; secret?: string; [key: string]: string | undefined; } /** * Source configuration stored in config file */ export interface SourceConfig { credentials?: SourceCredentials; defaults?: SourceOptions; enabled?: boolean; } /** * All sources configuration */ export interface SourcesConfig { sources: Record; } /** * Input source interface * All sources (builtin and integrations) implement this */ export interface InputSource { /** Unique identifier for the source */ name: string; /** Human-readable description */ description: string; /** Source type category */ type: 'builtin' | 'integration'; /** * Check if this source is available * For integrations, checks if credentials are configured * For builtins, checks if dependencies are available */ isAvailable(): Promise; /** * Whether this source requires authentication */ requiresAuth(): boolean; /** * Fetch content from this source * @param identifier - Source-specific identifier (path, URL, project name, etc.) * @param options - Additional options for the fetch */ fetch(identifier: string, options?: SourceOptions): Promise; /** * Validate that credentials are configured correctly * Only relevant for sources that require auth */ validateCredentials?(): Promise; /** * Get help text for using this source */ getHelp(): string; } /** * Source metadata for registry */ export interface SourceInfo { name: string; description: string; type: 'builtin' | 'integration'; requiresAuth: boolean; available: boolean; } //# sourceMappingURL=types.d.ts.map