interface ConfigParam { name: string; envVar: string; type: string; required: boolean; description: string; default?: string; } interface ToolParam { name: string; type: string; optional: boolean; description: string; constraintsFormatted?: string; example?: string; } interface Tool { name: string; description: string; params: ToolParam[]; example?: string; isGenerator?: boolean; outputFormat?: string; layoutHints?: Record; exportFormats?: string[]; scopes?: string[]; } type PhotonType = 'workflow' | 'streaming' | 'api'; export interface PhotonMetadata { name: string; label?: string; version: string; description: string; author?: string; license?: string; repository?: string; homepage?: string; icon?: string; internal?: boolean; tags?: string[]; category?: string; configParams?: ConfigParam[]; setupInstructions?: string; tools?: Tool[]; dependencies?: string; runtime?: string; stateful?: boolean; channel?: string[]; idleTimeout?: number; assets?: string[]; forkedFrom?: string; photonType: PhotonType; features: string[]; externalDeps: { mcps: string[]; photons: string[]; npm: string[]; }; diagram?: string; hash: string; } /** * Extracts comprehensive documentation from Photon files * * Parses JSDoc comments, constructor parameters, tool methods, and examples * to generate complete documentation metadata. */ export declare class PhotonDocExtractor { private filePath; private embeddedSource?; private content; private schemaExtractor; constructor(filePath: string, embeddedSource?: string | undefined); /** * Extract all metadata from the Photon file */ extractFullMetadata(): Promise>; /** * Extract photon name from filename */ private extractName; /** * Extract main description from file-level JSDoc comment */ private extractDescription; /** * Extract a specific JSDoc tag value */ private extractTag; /** * Extract marketplace/search tags from @tags or repeated @tag entries. */ private extractTags; /** * Extract all values for a specific JSDoc tag. */ private extractAllTags; /** * Extract configuration parameters from constructor */ private extractConfigParams; /** * Extract class name */ private extractClassName; /** * Extract configuration descriptions from "Configuration:" section * Returns a map of parameter name to description */ private extractConfigDescriptions; /** * Extract setup instructions from "Configuration:" section in JSDoc */ private extractSetupInstructions; /** * Extract assets associated with the Photon * Scans for ui/, prompts/, resources/ folders and @ui annotations */ private extractAssets; /** * Extract tool methods with their documentation */ private extractTools; /** * Parse inline JSDoc constraint tags from parameter description * Extracts tags like {@min 1}, {@max 100}, {@format email}, {@example test} * Returns cleaned description and formatted constraints string */ private parseInlineJSDocTags; /** * Strip JSDoc tags from description text. * Removes @emits, @internal, @deprecated, @format, and other @ tags that leak into user-facing descriptions. * These should only appear in structured metadata, not in the description shown to users. */ private stripJSDocTagsFromDescription; /** * Parse a single tool method from its JSDoc content */ private parseToolMethodFromJSDoc; /** * Detect platform features used by this Photon */ private detectFeatures; /** * Generate a Mermaid diagram for this Photon * Automatically detects the Photon type and generates appropriate diagram */ generateDiagram(): Promise; /** * Generate diagram synchronously when content and tools are already loaded */ private generateDiagramSync; /** * Detect the type of Photon based on its methods */ private detectPhotonType; /** * Check if content has ask/emit yield patterns */ private hasAskEmitPatterns; /** * Extract dependencies from JSDoc tags */ private extractDependencies; /** * Extract yield statements from content */ private extractYieldStatements; /** * Extract MCP and Photon calls from content */ private extractExternalCalls; /** * Infer emoji based on method/tool name */ private inferEmoji; /** * Get emoji for ask type */ private getAskEmoji; /** * Get emoji for emit type */ private getEmitEmoji; /** * Generate API surface diagram for tool collection Photons */ private generateApiSurfaceDiagram; /** * Generate streaming diagram for generator Photons without ask/emit */ private generateStreamingDiagram; /** * Generate workflow flowchart for Photons with ask/emit patterns */ private generateWorkflowDiagram; /** * Sanitize string for use as Mermaid node ID */ private sanitizeId; /** * Convert kebab-case to Title Case */ private titleCase; /** * Truncate string to max length */ private truncate; } export {}; //# sourceMappingURL=photon-doc-extractor.d.ts.map