@forgespace/siza-gen 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,26 +1,22 @@
1
1
  # @forgespace/siza-gen
2
2
 
3
- Siza AI generation engine — multi-framework code generation,
4
- component registry, and ML-powered quality scoring.
3
+ Siza AI generation engine — multi-framework code generation, component registry,
4
+ and ML-powered quality scoring.
5
5
 
6
6
  ## Overview
7
7
 
8
8
  `@forgespace/siza-gen` is the AI brain extracted from
9
- [siza-mcp](https://github.com/Forge-Space/ui-mcp). It
10
- provides:
11
-
12
- - **Framework generators** — React, Vue, Angular, Svelte,
13
- HTML
14
- - **Component registry** — 502 curated snippets (357
15
- component + 85 animation + 60 backend)
16
- - **ML quality scoring** — Embeddings, quality validation,
17
- anti-generic rules
18
- - **Feedback system** — Self-learning, pattern promotion,
19
- feedback-boosted search
20
- - **Template compositions** — Pre-built page templates with
21
- quality gating
22
- - **Brand integration** — Transform branding-mcp tokens into
23
- design context
9
+ [siza-mcp](https://github.com/Forge-Space/ui-mcp). It provides:
10
+
11
+ - **Framework generators** — React, Vue, Angular, Svelte, HTML
12
+ - **Component registry** — 502 curated snippets (357 component + 85 animation +
13
+ 60 backend)
14
+ - **ML quality scoring** — Embeddings, quality validation, anti-generic rules
15
+ - **Feedback system** Self-learning, pattern promotion, feedback-boosted
16
+ search
17
+ - **Template compositions** — Pre-built page templates with quality gating
18
+ - **Brand integration** — Transform branding-mcp tokens into design context
19
+ - **LLM providers** — Ollama, OpenAI, Anthropic, Gemini with auto-fallback
24
20
 
25
21
  ## Installation
26
22
 
@@ -42,13 +38,79 @@ const results = searchComponents('hero section');
42
38
  const generator = GeneratorFactory.create('react');
43
39
  ```
44
40
 
41
+ ## What's inside
42
+
43
+ | Module | Description |
44
+ | ------------- | ----------------------------------------------------------------- |
45
+ | `generators/` | React, Vue, Angular, Svelte, HTML code generators |
46
+ | `registry/` | 502 snippets — 357 component + 85 animation + 60 backend |
47
+ | `ml/` | Embeddings (all-MiniLM-L6-v2), quality scoring, training pipeline |
48
+ | `feedback/` | Self-learning loop, pattern promotion, feedback-boosted search |
49
+ | `quality/` | Anti-generic rules, diversity tracking |
50
+ | `artifacts/` | Generated artifact storage and learning loop |
51
+
52
+ ## LLM Providers
53
+
54
+ Built-in multi-provider support with auto-fallback:
55
+
56
+ ```typescript
57
+ import { createProviderWithFallback } from '@forgespace/siza-gen';
58
+
59
+ // Tries Ollama first (local), falls back to OpenAI/Anthropic/Gemini
60
+ const provider = await createProviderWithFallback();
61
+ ```
62
+
63
+ Supports: **Ollama** (local), **OpenAI**, **Anthropic**, **Gemini** (via OpenAI
64
+ adapter).
65
+
66
+ ## Brand Integration
67
+
68
+ Transform [branding-mcp](https://github.com/Forge-Space/branding-mcp) tokens
69
+ into design context:
70
+
71
+ ```typescript
72
+ import { brandToDesignContext } from '@forgespace/siza-gen';
73
+
74
+ const designContext = brandToDesignContext(brandIdentity);
75
+ ```
76
+
77
+ ## Python ML Sidecar
78
+
79
+ An optional Python FastAPI sidecar handles compute-intensive ML operations. When
80
+ unavailable, the system gracefully degrades to Transformers.js and heuristics.
81
+
82
+ ```bash
83
+ cd python && pip install -e ".[dev]"
84
+ python -m uvicorn siza_ml.app:app --port 8100
85
+ ```
86
+
87
+ Or via npm:
88
+
89
+ ```bash
90
+ npm run sidecar:start # Launch Python sidecar
91
+ npm run sidecar:test # Run Python tests (41 tests)
92
+ ```
93
+
94
+ | Endpoint | Description |
95
+ | --------------------- | ------------------------------- |
96
+ | `POST /embed` | Sentence-transformer embeddings |
97
+ | `POST /embed/batch` | Batch embeddings |
98
+ | `POST /vector/search` | FAISS k-NN similarity search |
99
+ | `POST /score` | LLM-based quality scoring |
100
+ | `POST /enhance` | LLM-based prompt enhancement |
101
+ | `POST /train/start` | LoRA fine-tuning via PEFT |
102
+ | `GET /health` | Liveness check |
103
+ | `GET /metrics/report` | ML observability metrics |
104
+
105
+ **Fallback chain**: Python sidecar → Transformers.js/local LLM → heuristics.
106
+
45
107
  ## Development
46
108
 
47
109
  ```bash
48
- npm install
49
- npm run build
50
- npm test
51
- npm run lint
110
+ npm install && npm run build
111
+ npm test # 424 tests, 21 suites
112
+ npm run validate # lint + format + typecheck + test
113
+ npm run registry:stats # Report snippet counts
52
114
  ```
53
115
 
54
116
  ## License
package/dist/index.d.ts CHANGED
@@ -3,6 +3,89 @@ import * as pino from 'pino';
3
3
  import pino__default, { Logger } from 'pino';
4
4
  import { z } from 'zod';
5
5
 
6
+ type LLMProviderType = 'ollama' | 'openai' | 'anthropic' | 'gemini';
7
+ interface ILLMConfig {
8
+ provider: LLMProviderType;
9
+ model: string;
10
+ baseUrl?: string;
11
+ apiKey?: string;
12
+ timeoutMs?: number;
13
+ maxTokens?: number;
14
+ temperature?: number;
15
+ }
16
+ interface ILLMGenerateOptions {
17
+ maxTokens?: number;
18
+ temperature?: number;
19
+ systemPrompt?: string;
20
+ timeoutMs?: number;
21
+ }
22
+ interface ILLMResponse {
23
+ text: string;
24
+ model: string;
25
+ provider: LLMProviderType;
26
+ tokensUsed?: number;
27
+ latencyMs: number;
28
+ }
29
+ interface ILLMProvider {
30
+ readonly type: LLMProviderType;
31
+ readonly model: string;
32
+ generate(prompt: string, options?: ILLMGenerateOptions): Promise<ILLMResponse>;
33
+ isAvailable(): Promise<boolean>;
34
+ }
35
+ declare const DEFAULT_TIMEOUT_MS = 30000;
36
+ declare const DEFAULT_MAX_TOKENS = 1024;
37
+ declare const DEFAULT_TEMPERATURE = 0.3;
38
+
39
+ declare class OllamaProvider implements ILLMProvider {
40
+ readonly type: "ollama";
41
+ readonly model: string;
42
+ private readonly baseUrl;
43
+ private readonly defaultTimeout;
44
+ constructor(opts?: {
45
+ model?: string;
46
+ baseUrl?: string;
47
+ timeoutMs?: number;
48
+ });
49
+ generate(prompt: string, options?: ILLMGenerateOptions): Promise<ILLMResponse>;
50
+ isAvailable(): Promise<boolean>;
51
+ }
52
+
53
+ declare class OpenAIProvider implements ILLMProvider {
54
+ readonly type: "openai";
55
+ readonly model: string;
56
+ private readonly baseUrl;
57
+ private readonly apiKey;
58
+ private readonly defaultTimeout;
59
+ constructor(opts: {
60
+ apiKey: string;
61
+ model?: string;
62
+ baseUrl?: string;
63
+ timeoutMs?: number;
64
+ });
65
+ generate(prompt: string, options?: ILLMGenerateOptions): Promise<ILLMResponse>;
66
+ isAvailable(): Promise<boolean>;
67
+ }
68
+
69
+ declare class AnthropicProvider implements ILLMProvider {
70
+ readonly type: "anthropic";
71
+ readonly model: string;
72
+ private readonly baseUrl;
73
+ private readonly apiKey;
74
+ private readonly defaultTimeout;
75
+ constructor(opts: {
76
+ apiKey: string;
77
+ model?: string;
78
+ baseUrl?: string;
79
+ timeoutMs?: number;
80
+ });
81
+ generate(prompt: string, options?: ILLMGenerateOptions): Promise<ILLMResponse>;
82
+ isAvailable(): Promise<boolean>;
83
+ }
84
+
85
+ declare function createProvider(config: ILLMConfig): ILLMProvider;
86
+ declare function detectOllama(baseUrl?: string): Promise<boolean>;
87
+ declare function createProviderWithFallback(config?: ILLMConfig): Promise<ILLMProvider | null>;
88
+
6
89
  /**
7
90
  * Type definitions for the ML subsystem.
8
91
  */
@@ -91,11 +174,12 @@ declare function configureEmbeddings(overrides: Partial<IEmbeddingConfig>): void
91
174
  declare function getEmbeddingConfig(): IEmbeddingConfig;
92
175
  /**
93
176
  * Generate an embedding vector for a single text string.
177
+ * Delegates to Python sidecar when available, falls back to Transformers.js.
94
178
  */
95
179
  declare function embed(text: string): Promise<Float32Array>;
96
180
  /**
97
181
  * Generate embeddings for multiple texts in batch.
98
- * More efficient than calling embed() in a loop.
182
+ * Delegates to Python sidecar when available, falls back to Transformers.js.
99
183
  */
100
184
  declare function embedBatch(texts: string[]): Promise<Float32Array[]>;
101
185
  /**
@@ -376,10 +460,10 @@ declare function checkTrainingReadiness(adapter: AdapterType, modelId: ModelId,
376
460
  *
377
461
  * Returns the job ID for status tracking.
378
462
  */
379
- declare function startTrainingJob(adapter: AdapterType, modelId: ModelId, db: Database.Database, config?: ILoRAConfig, trainingCommand?: string): {
463
+ declare function startTrainingJob(adapter: AdapterType, modelId: ModelId, db: Database.Database, config?: ILoRAConfig, trainingCommand?: string): Promise<{
380
464
  jobId: number;
381
465
  status: ITrainingStatus;
382
- };
466
+ }>;
383
467
  /**
384
468
  * Cancel a running training job.
385
469
  */
@@ -405,6 +489,9 @@ declare function getTrainingSummary(db: Database.Database): {
405
489
  *
406
490
  * Score range: 0-10 (0 = likely rejected, 10 = likely accepted).
407
491
  */
492
+
493
+ declare function setQualityScorerLLM(provider: ILLMProvider | null): void;
494
+ declare function getQualityScorerLLM(): ILLMProvider | null;
408
495
  /** Quality score result. */
409
496
  interface IQualityScore {
410
497
  /** Score from 0-10. */
@@ -452,6 +539,9 @@ declare function isLikelyAccepted(prompt: string, generatedCode: string, params?
452
539
  * 2. Expand vague terms into specific design tokens
453
540
  * 3. Inject best-practice hints based on component type
454
541
  */
542
+
543
+ declare function setPromptEnhancerLLM(provider: ILLMProvider | null): void;
544
+ declare function getPromptEnhancerLLM(): ILLMProvider | null;
455
545
  /** Enhancement result. */
456
546
  interface IEnhancedPrompt {
457
547
  /** The enhanced prompt text. */
@@ -675,6 +765,64 @@ interface ITrainingDataResult {
675
765
  */
676
766
  declare function storeDesignLearning(analysis: IDesignAnalysis, generatedCode: string, componentName: string, framework: string, db: Database.Database): ITrainingDataResult;
677
767
 
768
+ declare function setSidecarUrl(url: string): void;
769
+ declare function getSidecarUrl(): string;
770
+ declare function isSidecarAvailable(): Promise<boolean>;
771
+ declare function resetAvailabilityCache(): void;
772
+ declare function sidecarEmbed(text: string): Promise<Float32Array>;
773
+ declare function sidecarEmbedBatch(texts: string[]): Promise<Float32Array[]>;
774
+ interface ISidecarScoreResult {
775
+ score: number;
776
+ confidence: number;
777
+ factors: Record<string, number>;
778
+ source: string;
779
+ }
780
+ declare function sidecarScoreQuality(prompt: string, code: string, componentType?: string, framework?: string): Promise<ISidecarScoreResult>;
781
+ interface ISidecarEnhanceResult {
782
+ enhanced: string;
783
+ additions: string[];
784
+ source: string;
785
+ }
786
+ declare function sidecarEnhancePrompt(prompt: string, context?: {
787
+ componentType?: string;
788
+ framework?: string;
789
+ style?: string;
790
+ mood?: string;
791
+ industry?: string;
792
+ }): Promise<ISidecarEnhanceResult>;
793
+ interface ISidecarVectorSearchResult {
794
+ id: string;
795
+ distance: number;
796
+ metadata?: Record<string, string>;
797
+ }
798
+ declare function sidecarVectorSearch(vector: Float32Array, topK?: number): Promise<ISidecarVectorSearchResult[]>;
799
+ declare function sidecarVectorIndex(vectors: {
800
+ id: string;
801
+ vector: Float32Array;
802
+ metadata?: Record<string, string>;
803
+ }[]): Promise<{
804
+ indexed: number;
805
+ }>;
806
+ interface ISidecarTrainingJob {
807
+ job_id: string;
808
+ status: string;
809
+ }
810
+ declare function sidecarStartTraining(adapterType: string, dataPath: string, config?: {
811
+ rank?: number;
812
+ epochs?: number;
813
+ learningRate?: number;
814
+ batchSize?: number;
815
+ }): Promise<ISidecarTrainingJob>;
816
+ declare function sidecarGetTrainingStatus(jobId: string): Promise<{
817
+ job_id: string;
818
+ status: string;
819
+ progress: number;
820
+ error?: string;
821
+ }>;
822
+ declare function sidecarCancelTraining(jobId: string): Promise<{
823
+ cancelled: boolean;
824
+ }>;
825
+
678
826
  interface IDesignContext {
679
827
  typography: {
680
828
  fontFamily: string;
@@ -2421,4 +2569,4 @@ declare function isNetworkError(error: unknown): boolean;
2421
2569
  */
2422
2570
  declare function retry<T>(fn: () => Promise<T>, maxAttempts?: number, delay?: number): Promise<T>;
2423
2571
 
2424
- export { ANIMATION_PRESETS, type AdapterType, AngularGenerator, type AppType, type Architecture, type ArtifactType, type BackendCategory, type BackendFramework, BaseGenerator, type BrandIdentityInput, COLOR_SYSTEMS, COMPONENT_LIBRARIES, type ComponentCategory, type ComponentLibrary, type ComponentLibraryId, type ComponentLibraryIntegration, type ComponentLibrarySetupOptions, type Config, DEFAULT_COLOR_SYSTEM, DEFAULT_CONTEXT, DEFAULT_DESIGN_CONTEXT, DEFAULT_FONT_PAIRING, DEFAULT_LORA_CONFIG, DEFAULT_PRESET, type DeployTarget, FONT_PAIRINGS, type Framework, GeneratorFactory, HtmlGenerator, type IAccessibilityIssue, type IAccessibilityReport, type IArtifactQuery, type IBackendSnippet, ICON_LIBRARIES, type ICodePattern, type IComponentLibrary, type IComponentQuery, type IComponentSnippet, type IComponentStructure, type IConfigFile, type IDesignAnalysisResult, type IDesignContext, type IDirectoryStructure, type IEmbedding, type IEmbeddingConfig, type IEnhancedPrompt, type IEnhancementContext, type IExplicitFeedbackInput, type IFeedback, type IFigmaDesignToken, type IFigmaVariable, type IGeneratedArtifact, type IGeneratedFile, type IGeneration, type IImageAnalysis, type IImplicitSignal, type ILearningStats, type ILoRAConfig, type IModelPaths, INSPIRATION_SOURCES, type IPatternMatch, type IPresetConfig, type IProjectTemplate, type IPromptClassification, type IQualityScore, type IScaffoldOptions, type IScrapedPage, type IScreenElement, type ISearchResult, type ISimilarityResult, type IStyleContext, type IStyleRecommendation, type ITailwindMapping, type ITemplateSelectionCriteria, type ITrainingExample, type ITrainingStatus, type ITransition, type IValidationResult, type ImageType, type IndustryTag, LAYOUT_PATTERNS, type ModelId, type MoodTag, PRESETS, type PageTemplateType, type ProjectType, ReactGenerator, SPACING_SYSTEM, type Scale, type StateManagement$1 as StateManagement, SvelteGenerator, TYPE_SCALE, type VisualStyleId, VueGenerator, applyVisualStyle, brandToDesignContext, buildPromptEnhancerData, buildQualityScorerData, buildStyleRecommenderData, cancelTrainingJob, capitalize, checkTrainingReadiness, classifyPromptPair, classifyPromptText, cleanJsxSyntax, clearAllMicroInteractions, clearCompositions, clearHistory as clearDiversityHistory, clearRegistry, clearSessionCache, closeDatabase, composePageFromTemplate, composeSection, configureEmbeddings, configureModelDir, convertPathForFramework, convertStyleObjectToString, cosineSimilarity, createEmbedding, createError, createLogger, createTrainingJob, customizeTemplate, deleteArtifact, deleteEmbeddings, designContextStore, embed, embedBatch, enhancePrompt, enhancePromptWithRAG, enhanceWithRules, ensureDirectories, ensurePatternsTable, escapeHtml, exportForAdapter, exportRawExamples, exportTrainingData, expressApiTemplate, extractDesignPatterns, extractSkeleton, feedbackBoostedSearch, findBestComposition, findSimilar, fingerprint, fullstackMonoTemplate, generateArtifactId, generateComponent, generateComponentFromLibrary, generateRandomId, getAdapterPath, getAggregateScore, getAllCompositions, getAllInteractions, getAllJobStatuses, getAllPacks, getAllSnippets, getAllTemplates, getAnimationsByCategory, getArtifact, getArtifactCount, getAvailableComponentLibraries, getAvailableComponentsForLibrary, getAvailablePatternsForLibrary, getAvailableTypes, getBaseDir, getBestMatch, getBestMatchWithFeedback, getByCategory, getByIndustry, getByMood, getColorSystem, getColorSystemsByMood, getComponentLibrariesForFramework, getComponentLibrary, getComposition, getConfig, getDatabase, getDefaultIconLibrary, getDiskUsage, getEmbedding, getEmbeddingConfig, getEmbeddingCount, getFallbackDesignReference, getFeedbackBoost, getFeedbackCount, getFeedbackStats, getFileExtension, getFileName, getFontPairing, getFontPairingsByMood, getInspirationByCategory, getInspirationByPriority, getInteractionsByCategory, getLatestJobStatus, getLayoutPattern, getLayoutPatternsByUseCase, getLearningStats, getMicroInteraction, getModelDownloadUrl, getModelPath, getModelPaths, getPack, getPatternStats, getPreset, getPrimaryDesignReference, getPromotablePatternsFromDb, getPromotionCandidates, getRecentArtifacts, getRecommendations, getRecommendedLibrary, getRegistrySize, getSimilarArtifacts, getSnippetById, getTemplate, getTopArtifacts, getTrainingDataPath, getTrainingSummary, getVariants, groupBy, hasEnoughData, hashSkeleton, htmlToJsxAttributes, includesCaseInsensitive, initializeBackendRegistry, initializeInteractions, initializeRegistry, injectAnimations, isAdapterAvailable, isArray, isDuplicateConsecutive, isFunction, isLikelyAccepted, isModelAvailable, isModelLoaded, isNetworkError, isNumber, isObject, isPromotable, isString, isTraining, isValidComponentName, isValidEmail, isValidHexColor, isValidProjectName, isValidUrl, jsxToHtml, jsxToHtmlAttributes, jsxToSvelte, listAdapters, listModels, listPresets, loadConfig, loadEmbeddings, logger, mergeStyles, needsEnhancement, nextAppTemplate, nextSaasTemplate, parseStyleString, pluralize, promotePattern, queryArtifacts, reactEventsToHtml, reactEventsToSvelte, reactSpaTemplate, recommendStyle, recordGeneration as recordDiversityGeneration, recordExplicitFeedback, recordGeneratedArtifact, recordGeneration$1 as recordGeneration, recordPattern, reduxToolkitPattern as reduxToolkitPatterns, registerComposition, registerInteraction, registerInteractions, registerPack, registerSnippet, registerSnippets, resetSchemaInit, retry, runPromotionCycle, safeJSONParse, sanitizeClassName, scoreQuality, scoreQualityWithRAG, searchBackendSnippets, searchComponents, searchPacks, selectTemplate, semanticSearch, setupComponentLibraryProject, sortBy, startTrainingJob, stateManagementPatterns, storeArtifact, storeDesignLearning, storeEmbedding, storeEmbeddings, suggestDiverseVariant, tanstackQueryPattern as tanstackQueryPatterns, templateList, templates, toCamelCase, toKebabCase, toPascalCase, toSnakeCase, triggerPatternPromotion, truncate, unique, unloadModel, updateFeedbackScore, updateJobStatus, updateQualityScore, validateSnippet, validateSnippetStrict, writeJsonl, zustandPatterns };
2572
+ export { ANIMATION_PRESETS, type AdapterType, AngularGenerator, AnthropicProvider, type AppType, type Architecture, type ArtifactType, type BackendCategory, type BackendFramework, BaseGenerator, type BrandIdentityInput, COLOR_SYSTEMS, COMPONENT_LIBRARIES, type ComponentCategory, type ComponentLibrary, type ComponentLibraryId, type ComponentLibraryIntegration, type ComponentLibrarySetupOptions, type Config, DEFAULT_COLOR_SYSTEM, DEFAULT_CONTEXT, DEFAULT_DESIGN_CONTEXT, DEFAULT_FONT_PAIRING, DEFAULT_LORA_CONFIG, DEFAULT_MAX_TOKENS, DEFAULT_PRESET, DEFAULT_TEMPERATURE, DEFAULT_TIMEOUT_MS, type DeployTarget, FONT_PAIRINGS, type Framework, GeneratorFactory, HtmlGenerator, type IAccessibilityIssue, type IAccessibilityReport, type IArtifactQuery, type IBackendSnippet, ICON_LIBRARIES, type ICodePattern, type IComponentLibrary, type IComponentQuery, type IComponentSnippet, type IComponentStructure, type IConfigFile, type IDesignAnalysisResult, type IDesignContext, type IDirectoryStructure, type IEmbedding, type IEmbeddingConfig, type IEnhancedPrompt, type IEnhancementContext, type IExplicitFeedbackInput, type IFeedback, type IFigmaDesignToken, type IFigmaVariable, type IGeneratedArtifact, type IGeneratedFile, type IGeneration, type IImageAnalysis, type IImplicitSignal, type ILLMConfig, type ILLMGenerateOptions, type ILLMProvider, type ILLMResponse, type ILearningStats, type ILoRAConfig, type IModelPaths, INSPIRATION_SOURCES, type IPatternMatch, type IPresetConfig, type IProjectTemplate, type IPromptClassification, type IQualityScore, type IScaffoldOptions, type IScrapedPage, type IScreenElement, type ISearchResult, type ISidecarEnhanceResult, type ISidecarScoreResult, type ISidecarTrainingJob, type ISidecarVectorSearchResult, type ISimilarityResult, type IStyleContext, type IStyleRecommendation, type ITailwindMapping, type ITemplateSelectionCriteria, type ITrainingExample, type ITrainingStatus, type ITransition, type IValidationResult, type ImageType, type IndustryTag, LAYOUT_PATTERNS, type LLMProviderType, type ModelId, type MoodTag, OllamaProvider, OpenAIProvider, PRESETS, type PageTemplateType, type ProjectType, ReactGenerator, SPACING_SYSTEM, type Scale, type StateManagement$1 as StateManagement, SvelteGenerator, TYPE_SCALE, type VisualStyleId, VueGenerator, applyVisualStyle, brandToDesignContext, buildPromptEnhancerData, buildQualityScorerData, buildStyleRecommenderData, cancelTrainingJob, capitalize, checkTrainingReadiness, classifyPromptPair, classifyPromptText, cleanJsxSyntax, clearAllMicroInteractions, clearCompositions, clearHistory as clearDiversityHistory, clearRegistry, clearSessionCache, closeDatabase, composePageFromTemplate, composeSection, configureEmbeddings, configureModelDir, convertPathForFramework, convertStyleObjectToString, cosineSimilarity, createEmbedding, createError, createLogger, createProvider, createProviderWithFallback, createTrainingJob, customizeTemplate, deleteArtifact, deleteEmbeddings, designContextStore, detectOllama, embed, embedBatch, enhancePrompt, enhancePromptWithRAG, enhanceWithRules, ensureDirectories, ensurePatternsTable, escapeHtml, exportForAdapter, exportRawExamples, exportTrainingData, expressApiTemplate, extractDesignPatterns, extractSkeleton, feedbackBoostedSearch, findBestComposition, findSimilar, fingerprint, fullstackMonoTemplate, generateArtifactId, generateComponent, generateComponentFromLibrary, generateRandomId, getAdapterPath, getAggregateScore, getAllCompositions, getAllInteractions, getAllJobStatuses, getAllPacks, getAllSnippets, getAllTemplates, getAnimationsByCategory, getArtifact, getArtifactCount, getAvailableComponentLibraries, getAvailableComponentsForLibrary, getAvailablePatternsForLibrary, getAvailableTypes, getBaseDir, getBestMatch, getBestMatchWithFeedback, getByCategory, getByIndustry, getByMood, getColorSystem, getColorSystemsByMood, getComponentLibrariesForFramework, getComponentLibrary, getComposition, getConfig, getDatabase, getDefaultIconLibrary, getDiskUsage, getEmbedding, getEmbeddingConfig, getEmbeddingCount, getFallbackDesignReference, getFeedbackBoost, getFeedbackCount, getFeedbackStats, getFileExtension, getFileName, getFontPairing, getFontPairingsByMood, getInspirationByCategory, getInspirationByPriority, getInteractionsByCategory, getLatestJobStatus, getLayoutPattern, getLayoutPatternsByUseCase, getLearningStats, getMicroInteraction, getModelDownloadUrl, getModelPath, getModelPaths, getPack, getPatternStats, getPreset, getPrimaryDesignReference, getPromotablePatternsFromDb, getPromotionCandidates, getPromptEnhancerLLM, getQualityScorerLLM, getRecentArtifacts, getRecommendations, getRecommendedLibrary, getRegistrySize, getSidecarUrl, getSimilarArtifacts, getSnippetById, getTemplate, getTopArtifacts, getTrainingDataPath, getTrainingSummary, getVariants, groupBy, hasEnoughData, hashSkeleton, htmlToJsxAttributes, includesCaseInsensitive, initializeBackendRegistry, initializeInteractions, initializeRegistry, injectAnimations, isAdapterAvailable, isArray, isDuplicateConsecutive, isFunction, isLikelyAccepted, isModelAvailable, isModelLoaded, isNetworkError, isNumber, isObject, isPromotable, isSidecarAvailable, isString, isTraining, isValidComponentName, isValidEmail, isValidHexColor, isValidProjectName, isValidUrl, jsxToHtml, jsxToHtmlAttributes, jsxToSvelte, listAdapters, listModels, listPresets, loadConfig, loadEmbeddings, logger, mergeStyles, needsEnhancement, nextAppTemplate, nextSaasTemplate, parseStyleString, pluralize, promotePattern, queryArtifacts, reactEventsToHtml, reactEventsToSvelte, reactSpaTemplate, recommendStyle, recordGeneration as recordDiversityGeneration, recordExplicitFeedback, recordGeneratedArtifact, recordGeneration$1 as recordGeneration, recordPattern, reduxToolkitPattern as reduxToolkitPatterns, registerComposition, registerInteraction, registerInteractions, registerPack, registerSnippet, registerSnippets, resetAvailabilityCache, resetSchemaInit, retry, runPromotionCycle, safeJSONParse, sanitizeClassName, scoreQuality, scoreQualityWithRAG, searchBackendSnippets, searchComponents, searchPacks, selectTemplate, semanticSearch, setPromptEnhancerLLM, setQualityScorerLLM, setSidecarUrl, setupComponentLibraryProject, sidecarCancelTraining, sidecarEmbed, sidecarEmbedBatch, sidecarEnhancePrompt, sidecarGetTrainingStatus, sidecarScoreQuality, sidecarStartTraining, sidecarVectorIndex, sidecarVectorSearch, sortBy, startTrainingJob, stateManagementPatterns, storeArtifact, storeDesignLearning, storeEmbedding, storeEmbeddings, suggestDiverseVariant, tanstackQueryPattern as tanstackQueryPatterns, templateList, templates, toCamelCase, toKebabCase, toPascalCase, toSnakeCase, triggerPatternPromotion, truncate, unique, unloadModel, updateFeedbackScore, updateJobStatus, updateQualityScore, validateSnippet, validateSnippetStrict, writeJsonl, zustandPatterns };