claude-presentation-master 4.2.0 → 4.3.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/dist/index.d.mts +172 -6
- package/dist/index.d.ts +172 -6
- package/dist/index.js +815 -88
- package/dist/index.mjs +748 -24
- package/package.json +5 -3
package/dist/index.d.mts
CHANGED
|
@@ -538,7 +538,10 @@ declare function initContentAnalyzer(): Promise<ContentAnalyzer>;
|
|
|
538
538
|
* - Respect for KB word limits and rules
|
|
539
539
|
* - SCQA/Sparkline narrative structure when detected
|
|
540
540
|
*
|
|
541
|
-
*
|
|
541
|
+
* DESIGN PHILOSOPHY:
|
|
542
|
+
* - All type-specific rules (word limits, allowed slide types) come from KB
|
|
543
|
+
* - Defensive fallbacks exist for edge cases (e.g., bullet limit defaults to 5)
|
|
544
|
+
* - Slide structure decisions (agenda, section dividers) are algorithmic
|
|
542
545
|
*/
|
|
543
546
|
|
|
544
547
|
declare class SlideGenerator {
|
|
@@ -935,6 +938,150 @@ declare class RendererV2 {
|
|
|
935
938
|
*/
|
|
936
939
|
declare function createRendererV2(presentationType?: PresentationType, kb?: KnowledgeGateway): RendererV2;
|
|
937
940
|
|
|
941
|
+
/**
|
|
942
|
+
* VisualQAEngine - REAL Visual Quality Assurance
|
|
943
|
+
*
|
|
944
|
+
* This is NOT a rule checker. This SEES the actual rendered presentation.
|
|
945
|
+
*
|
|
946
|
+
* How it works:
|
|
947
|
+
* 1. Playwright renders the HTML presentation
|
|
948
|
+
* 2. Screenshots each slide at 1920x1080
|
|
949
|
+
* 3. Analyzes screenshots with:
|
|
950
|
+
* - Pixel-based whitespace calculation
|
|
951
|
+
* - Color contrast checking (WCAG)
|
|
952
|
+
* - Text density measurement
|
|
953
|
+
* - Visual balance assessment
|
|
954
|
+
* 4. Vision API for qualitative "would you present this?" check
|
|
955
|
+
* 5. Scores against KB criteria
|
|
956
|
+
* 6. Provides specific visual feedback
|
|
957
|
+
* 7. Loops until 95+ or max iterations
|
|
958
|
+
*
|
|
959
|
+
* This is the REAL QA that evaluates what the audience SEES.
|
|
960
|
+
*/
|
|
961
|
+
|
|
962
|
+
interface VisualSlideAnalysis {
|
|
963
|
+
slideIndex: number;
|
|
964
|
+
title: string;
|
|
965
|
+
screenshot: Buffer;
|
|
966
|
+
whitespacePercentage: number;
|
|
967
|
+
textDensity: number;
|
|
968
|
+
colorContrast: number;
|
|
969
|
+
visualBalance: number;
|
|
970
|
+
glanceTestPassed: boolean;
|
|
971
|
+
hierarchyClear: boolean;
|
|
972
|
+
professionalLook: boolean;
|
|
973
|
+
score: number;
|
|
974
|
+
issues: VisualIssue[];
|
|
975
|
+
passed: boolean;
|
|
976
|
+
}
|
|
977
|
+
interface VisualIssue {
|
|
978
|
+
severity: 'critical' | 'major' | 'minor';
|
|
979
|
+
category: 'whitespace' | 'contrast' | 'density' | 'balance' | 'hierarchy' | 'professional';
|
|
980
|
+
issue: string;
|
|
981
|
+
measurement?: number;
|
|
982
|
+
threshold?: number;
|
|
983
|
+
fix: string;
|
|
984
|
+
}
|
|
985
|
+
interface VisualDeckAnalysis {
|
|
986
|
+
slides: VisualSlideAnalysis[];
|
|
987
|
+
overallScore: number;
|
|
988
|
+
passed: boolean;
|
|
989
|
+
consistency: number;
|
|
990
|
+
deckIssues: string[];
|
|
991
|
+
summary: string;
|
|
992
|
+
}
|
|
993
|
+
interface RemediationFeedback {
|
|
994
|
+
slideIndex: number;
|
|
995
|
+
currentScore: number;
|
|
996
|
+
targetScore: number;
|
|
997
|
+
specificFixes: string[];
|
|
998
|
+
visualProblems: string[];
|
|
999
|
+
}
|
|
1000
|
+
interface QALoopResult {
|
|
1001
|
+
finalScore: number;
|
|
1002
|
+
passed: boolean;
|
|
1003
|
+
iterations: number;
|
|
1004
|
+
initialScore: number;
|
|
1005
|
+
improvements: string[];
|
|
1006
|
+
finalAnalysis: VisualDeckAnalysis;
|
|
1007
|
+
}
|
|
1008
|
+
declare class VisualQAEngine {
|
|
1009
|
+
private kb;
|
|
1010
|
+
private browser;
|
|
1011
|
+
private initialized;
|
|
1012
|
+
private minWhitespace;
|
|
1013
|
+
private minContrast;
|
|
1014
|
+
private maxWordsPerSlide;
|
|
1015
|
+
private targetScore;
|
|
1016
|
+
constructor();
|
|
1017
|
+
/**
|
|
1018
|
+
* Initialize Playwright browser.
|
|
1019
|
+
*/
|
|
1020
|
+
initialize(): Promise<void>;
|
|
1021
|
+
/**
|
|
1022
|
+
* Load quality thresholds from Knowledge Base.
|
|
1023
|
+
*/
|
|
1024
|
+
private loadKBThresholds;
|
|
1025
|
+
/**
|
|
1026
|
+
* Capture screenshots of all slides in a presentation.
|
|
1027
|
+
*/
|
|
1028
|
+
captureSlides(html: string): Promise<Buffer[]>;
|
|
1029
|
+
/**
|
|
1030
|
+
* Analyze a single slide screenshot.
|
|
1031
|
+
*/
|
|
1032
|
+
analyzeSlide(screenshot: Buffer, slideIndex: number, slideTitle: string, presentationType: PresentationType): Promise<VisualSlideAnalysis>;
|
|
1033
|
+
/**
|
|
1034
|
+
* Analyze entire deck visually.
|
|
1035
|
+
*/
|
|
1036
|
+
analyzeDeck(html: string, slides: SlideV2[], presentationType: PresentationType): Promise<VisualDeckAnalysis>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Generate remediation feedback for failing slides.
|
|
1039
|
+
*/
|
|
1040
|
+
generateRemediationFeedback(analysis: VisualDeckAnalysis): RemediationFeedback[];
|
|
1041
|
+
/**
|
|
1042
|
+
* Run the full QA loop until passing or max iterations.
|
|
1043
|
+
*/
|
|
1044
|
+
runQALoop(generateFn: () => Promise<{
|
|
1045
|
+
html: string;
|
|
1046
|
+
slides: SlideV2[];
|
|
1047
|
+
}>, remediateFn: (feedback: RemediationFeedback[]) => Promise<void>, presentationType: PresentationType, maxIterations?: number): Promise<QALoopResult>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Close browser and cleanup.
|
|
1050
|
+
*/
|
|
1051
|
+
cleanup(): Promise<void>;
|
|
1052
|
+
/**
|
|
1053
|
+
* Measure whitespace percentage from screenshot.
|
|
1054
|
+
* Uses actual pixel analysis.
|
|
1055
|
+
*/
|
|
1056
|
+
private measureWhitespace;
|
|
1057
|
+
/**
|
|
1058
|
+
* Measure color contrast ratio.
|
|
1059
|
+
*/
|
|
1060
|
+
private measureContrast;
|
|
1061
|
+
/**
|
|
1062
|
+
* Measure text density (approximation based on non-background pixels).
|
|
1063
|
+
*/
|
|
1064
|
+
private measureTextDensity;
|
|
1065
|
+
/**
|
|
1066
|
+
* Measure visual balance (how evenly distributed is the content).
|
|
1067
|
+
* Uses a 3x3 grid to properly detect centered layouts (common in keynotes).
|
|
1068
|
+
*/
|
|
1069
|
+
private measureBalance;
|
|
1070
|
+
/**
|
|
1071
|
+
* Check if there's clear visual hierarchy.
|
|
1072
|
+
*/
|
|
1073
|
+
private checkHierarchy;
|
|
1074
|
+
private getTypeThresholds;
|
|
1075
|
+
private detectBackgroundColor;
|
|
1076
|
+
private detectTextColor;
|
|
1077
|
+
private isSimilarColor;
|
|
1078
|
+
private relativeLuminance;
|
|
1079
|
+
private calculateConsistency;
|
|
1080
|
+
private variance;
|
|
1081
|
+
}
|
|
1082
|
+
declare function getVisualQAEngine(): VisualQAEngine;
|
|
1083
|
+
declare function initVisualQAEngine(): Promise<VisualQAEngine>;
|
|
1084
|
+
|
|
938
1085
|
/**
|
|
939
1086
|
* PresentationEngineV2 - Knowledge-Driven Excellence
|
|
940
1087
|
*
|
|
@@ -946,9 +1093,14 @@ declare function createRendererV2(presentationType?: PresentationType, kb?: Know
|
|
|
946
1093
|
* 5. Review ruthlessly (must score 95/100+)
|
|
947
1094
|
* 6. Output ONLY if quality passes
|
|
948
1095
|
*
|
|
949
|
-
*
|
|
950
|
-
* The
|
|
951
|
-
*
|
|
1096
|
+
* DESIGN PHILOSOPHY:
|
|
1097
|
+
* - The Knowledge Base (YAML) is the single source of truth for all design decisions
|
|
1098
|
+
* - Uses KnowledgeGateway.queryRequired() for critical paths (throws on missing data)
|
|
1099
|
+
* - Defensive fallbacks exist only for:
|
|
1100
|
+
* 1. Optional fields that may not exist in older KB versions
|
|
1101
|
+
* 2. Type coercion safety (undefined → default string)
|
|
1102
|
+
* 3. Map lookups that might fail for new palette names
|
|
1103
|
+
* - Critical errors (missing presentation types, validation rules) will throw
|
|
952
1104
|
*/
|
|
953
1105
|
|
|
954
1106
|
interface DesignSpecs {
|
|
@@ -1011,6 +1163,14 @@ interface EngineOptions {
|
|
|
1011
1163
|
verbose?: boolean;
|
|
1012
1164
|
/** Maximum remediation attempts per slide */
|
|
1013
1165
|
maxRemediationAttempts?: number;
|
|
1166
|
+
/** Run visual QA analysis using Playwright screenshots (default: false) */
|
|
1167
|
+
runVisualQA?: boolean;
|
|
1168
|
+
/**
|
|
1169
|
+
* Use V1's richer slide generation pipeline (default: true)
|
|
1170
|
+
* V1 creates agenda, section dividers, SCQA structure, metrics, STAR moments, call-to-action
|
|
1171
|
+
* V2 is minimalist - just sections parsed from markdown
|
|
1172
|
+
*/
|
|
1173
|
+
useRichPipeline?: boolean;
|
|
1014
1174
|
}
|
|
1015
1175
|
interface EngineResult {
|
|
1016
1176
|
slides: SlideV2[];
|
|
@@ -1020,6 +1180,8 @@ interface EngineResult {
|
|
|
1020
1180
|
designSpecs: DesignSpecs;
|
|
1021
1181
|
review: DeckReview;
|
|
1022
1182
|
warnings: string[];
|
|
1183
|
+
/** Visual QA analysis (only present if runVisualQA option is true) */
|
|
1184
|
+
visualQA?: VisualDeckAnalysis;
|
|
1023
1185
|
}
|
|
1024
1186
|
declare class PresentationEngineV2 {
|
|
1025
1187
|
private options;
|
|
@@ -1802,7 +1964,11 @@ declare function runCodeQualityCheck(srcDir: string): Promise<boolean>;
|
|
|
1802
1964
|
* 5. DeckQualityReviewer -> Holistic deck review (must pass 95)
|
|
1803
1965
|
* 6. Renderer -> Premium HTML/PPTX output
|
|
1804
1966
|
*
|
|
1805
|
-
*
|
|
1967
|
+
* DESIGN PHILOSOPHY:
|
|
1968
|
+
* - The Knowledge Base (YAML) is the source of truth for all design decisions
|
|
1969
|
+
* - Critical paths use queryRequired() which throws on missing data
|
|
1970
|
+
* - Defensive fallbacks exist for optional fields and type safety
|
|
1971
|
+
* - Both V1 (generate) and V2 (generatePresentation) APIs use the same KB
|
|
1806
1972
|
*/
|
|
1807
1973
|
|
|
1808
1974
|
declare const VERSION = "4.2.0";
|
|
@@ -1874,4 +2040,4 @@ interface GenerateResult {
|
|
|
1874
2040
|
*/
|
|
1875
2041
|
declare function generate(options: GenerateOptions): Promise<GenerateResult>;
|
|
1876
2042
|
|
|
1877
|
-
export { CodeQualityValidator, type ValidationResult as CodeValidationResult, type ContentAnalysis, ContentAnalyzer, DeckQualityReviewer, type DeckScore, type GenerateOptions, type GenerateResult, type HardcodedViolation, type ImageGenerationRequest, type ImageGenerationResult, KnowledgeGateway, type MetricData, type NanoBananaConfig, NanoBananaProvider, type OutputFormat, PresentationEngineV2, type PresentationMetadata, type PresentationMode, type PresentationResult, type PresentationType, type QualitativeDeckReview, type QualitativeSlideReview, type RemediationResult, Remediator, Renderer, RendererV2, type Slide, type SlideContent as SlideContentV2, SlideGenerator, SlideGeneratorV2, SlideQualityReviewer, type SlideScore, type SlideType as SlideTypeV2, type SlideV2, type TableData, VERSION, type Violation, VisualDesignSystem, createNanoBananaProvider, createPresentationEngineV2, createRendererV2, createSlideGeneratorV2, generate, generatePresentation, getContentAnalyzer, getDeckQualityReviewer, getKB, getNanoBananaPrompt, getRemediator, getRenderer, getSlideGenerator, getSlideQualityReviewer, getVisualDesignSystem, initContentAnalyzer, initDeckQualityReviewer, initKB, initRemediator, initRenderer, initSlideGenerator, initSlideQualityReviewer, initVisualDesignSystem, runCodeQualityCheck, validateCodeQuality };
|
|
2043
|
+
export { CodeQualityValidator, type ValidationResult as CodeValidationResult, type ContentAnalysis, ContentAnalyzer, DeckQualityReviewer, type DeckScore, type GenerateOptions, type GenerateResult, type HardcodedViolation, type ImageGenerationRequest, type ImageGenerationResult, KnowledgeGateway, type MetricData, type NanoBananaConfig, NanoBananaProvider, type OutputFormat, PresentationEngineV2, type PresentationMetadata, type PresentationMode, type PresentationResult, type PresentationType, type QALoopResult, type QualitativeDeckReview, type QualitativeSlideReview, type RemediationFeedback, type RemediationResult, Remediator, Renderer, RendererV2, type Slide, type SlideContent as SlideContentV2, SlideGenerator, SlideGeneratorV2, SlideQualityReviewer, type SlideScore, type SlideType as SlideTypeV2, type SlideV2, type TableData, VERSION, type Violation, type VisualDeckAnalysis, VisualDesignSystem, VisualQAEngine, type VisualSlideAnalysis, createNanoBananaProvider, createPresentationEngineV2, createRendererV2, createSlideGeneratorV2, generate, generatePresentation, getContentAnalyzer, getDeckQualityReviewer, getKB, getNanoBananaPrompt, getRemediator, getRenderer, getSlideGenerator, getSlideQualityReviewer, getVisualDesignSystem, getVisualQAEngine, initContentAnalyzer, initDeckQualityReviewer, initKB, initRemediator, initRenderer, initSlideGenerator, initSlideQualityReviewer, initVisualDesignSystem, initVisualQAEngine, runCodeQualityCheck, validateCodeQuality };
|
package/dist/index.d.ts
CHANGED
|
@@ -538,7 +538,10 @@ declare function initContentAnalyzer(): Promise<ContentAnalyzer>;
|
|
|
538
538
|
* - Respect for KB word limits and rules
|
|
539
539
|
* - SCQA/Sparkline narrative structure when detected
|
|
540
540
|
*
|
|
541
|
-
*
|
|
541
|
+
* DESIGN PHILOSOPHY:
|
|
542
|
+
* - All type-specific rules (word limits, allowed slide types) come from KB
|
|
543
|
+
* - Defensive fallbacks exist for edge cases (e.g., bullet limit defaults to 5)
|
|
544
|
+
* - Slide structure decisions (agenda, section dividers) are algorithmic
|
|
542
545
|
*/
|
|
543
546
|
|
|
544
547
|
declare class SlideGenerator {
|
|
@@ -935,6 +938,150 @@ declare class RendererV2 {
|
|
|
935
938
|
*/
|
|
936
939
|
declare function createRendererV2(presentationType?: PresentationType, kb?: KnowledgeGateway): RendererV2;
|
|
937
940
|
|
|
941
|
+
/**
|
|
942
|
+
* VisualQAEngine - REAL Visual Quality Assurance
|
|
943
|
+
*
|
|
944
|
+
* This is NOT a rule checker. This SEES the actual rendered presentation.
|
|
945
|
+
*
|
|
946
|
+
* How it works:
|
|
947
|
+
* 1. Playwright renders the HTML presentation
|
|
948
|
+
* 2. Screenshots each slide at 1920x1080
|
|
949
|
+
* 3. Analyzes screenshots with:
|
|
950
|
+
* - Pixel-based whitespace calculation
|
|
951
|
+
* - Color contrast checking (WCAG)
|
|
952
|
+
* - Text density measurement
|
|
953
|
+
* - Visual balance assessment
|
|
954
|
+
* 4. Vision API for qualitative "would you present this?" check
|
|
955
|
+
* 5. Scores against KB criteria
|
|
956
|
+
* 6. Provides specific visual feedback
|
|
957
|
+
* 7. Loops until 95+ or max iterations
|
|
958
|
+
*
|
|
959
|
+
* This is the REAL QA that evaluates what the audience SEES.
|
|
960
|
+
*/
|
|
961
|
+
|
|
962
|
+
interface VisualSlideAnalysis {
|
|
963
|
+
slideIndex: number;
|
|
964
|
+
title: string;
|
|
965
|
+
screenshot: Buffer;
|
|
966
|
+
whitespacePercentage: number;
|
|
967
|
+
textDensity: number;
|
|
968
|
+
colorContrast: number;
|
|
969
|
+
visualBalance: number;
|
|
970
|
+
glanceTestPassed: boolean;
|
|
971
|
+
hierarchyClear: boolean;
|
|
972
|
+
professionalLook: boolean;
|
|
973
|
+
score: number;
|
|
974
|
+
issues: VisualIssue[];
|
|
975
|
+
passed: boolean;
|
|
976
|
+
}
|
|
977
|
+
interface VisualIssue {
|
|
978
|
+
severity: 'critical' | 'major' | 'minor';
|
|
979
|
+
category: 'whitespace' | 'contrast' | 'density' | 'balance' | 'hierarchy' | 'professional';
|
|
980
|
+
issue: string;
|
|
981
|
+
measurement?: number;
|
|
982
|
+
threshold?: number;
|
|
983
|
+
fix: string;
|
|
984
|
+
}
|
|
985
|
+
interface VisualDeckAnalysis {
|
|
986
|
+
slides: VisualSlideAnalysis[];
|
|
987
|
+
overallScore: number;
|
|
988
|
+
passed: boolean;
|
|
989
|
+
consistency: number;
|
|
990
|
+
deckIssues: string[];
|
|
991
|
+
summary: string;
|
|
992
|
+
}
|
|
993
|
+
interface RemediationFeedback {
|
|
994
|
+
slideIndex: number;
|
|
995
|
+
currentScore: number;
|
|
996
|
+
targetScore: number;
|
|
997
|
+
specificFixes: string[];
|
|
998
|
+
visualProblems: string[];
|
|
999
|
+
}
|
|
1000
|
+
interface QALoopResult {
|
|
1001
|
+
finalScore: number;
|
|
1002
|
+
passed: boolean;
|
|
1003
|
+
iterations: number;
|
|
1004
|
+
initialScore: number;
|
|
1005
|
+
improvements: string[];
|
|
1006
|
+
finalAnalysis: VisualDeckAnalysis;
|
|
1007
|
+
}
|
|
1008
|
+
declare class VisualQAEngine {
|
|
1009
|
+
private kb;
|
|
1010
|
+
private browser;
|
|
1011
|
+
private initialized;
|
|
1012
|
+
private minWhitespace;
|
|
1013
|
+
private minContrast;
|
|
1014
|
+
private maxWordsPerSlide;
|
|
1015
|
+
private targetScore;
|
|
1016
|
+
constructor();
|
|
1017
|
+
/**
|
|
1018
|
+
* Initialize Playwright browser.
|
|
1019
|
+
*/
|
|
1020
|
+
initialize(): Promise<void>;
|
|
1021
|
+
/**
|
|
1022
|
+
* Load quality thresholds from Knowledge Base.
|
|
1023
|
+
*/
|
|
1024
|
+
private loadKBThresholds;
|
|
1025
|
+
/**
|
|
1026
|
+
* Capture screenshots of all slides in a presentation.
|
|
1027
|
+
*/
|
|
1028
|
+
captureSlides(html: string): Promise<Buffer[]>;
|
|
1029
|
+
/**
|
|
1030
|
+
* Analyze a single slide screenshot.
|
|
1031
|
+
*/
|
|
1032
|
+
analyzeSlide(screenshot: Buffer, slideIndex: number, slideTitle: string, presentationType: PresentationType): Promise<VisualSlideAnalysis>;
|
|
1033
|
+
/**
|
|
1034
|
+
* Analyze entire deck visually.
|
|
1035
|
+
*/
|
|
1036
|
+
analyzeDeck(html: string, slides: SlideV2[], presentationType: PresentationType): Promise<VisualDeckAnalysis>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Generate remediation feedback for failing slides.
|
|
1039
|
+
*/
|
|
1040
|
+
generateRemediationFeedback(analysis: VisualDeckAnalysis): RemediationFeedback[];
|
|
1041
|
+
/**
|
|
1042
|
+
* Run the full QA loop until passing or max iterations.
|
|
1043
|
+
*/
|
|
1044
|
+
runQALoop(generateFn: () => Promise<{
|
|
1045
|
+
html: string;
|
|
1046
|
+
slides: SlideV2[];
|
|
1047
|
+
}>, remediateFn: (feedback: RemediationFeedback[]) => Promise<void>, presentationType: PresentationType, maxIterations?: number): Promise<QALoopResult>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Close browser and cleanup.
|
|
1050
|
+
*/
|
|
1051
|
+
cleanup(): Promise<void>;
|
|
1052
|
+
/**
|
|
1053
|
+
* Measure whitespace percentage from screenshot.
|
|
1054
|
+
* Uses actual pixel analysis.
|
|
1055
|
+
*/
|
|
1056
|
+
private measureWhitespace;
|
|
1057
|
+
/**
|
|
1058
|
+
* Measure color contrast ratio.
|
|
1059
|
+
*/
|
|
1060
|
+
private measureContrast;
|
|
1061
|
+
/**
|
|
1062
|
+
* Measure text density (approximation based on non-background pixels).
|
|
1063
|
+
*/
|
|
1064
|
+
private measureTextDensity;
|
|
1065
|
+
/**
|
|
1066
|
+
* Measure visual balance (how evenly distributed is the content).
|
|
1067
|
+
* Uses a 3x3 grid to properly detect centered layouts (common in keynotes).
|
|
1068
|
+
*/
|
|
1069
|
+
private measureBalance;
|
|
1070
|
+
/**
|
|
1071
|
+
* Check if there's clear visual hierarchy.
|
|
1072
|
+
*/
|
|
1073
|
+
private checkHierarchy;
|
|
1074
|
+
private getTypeThresholds;
|
|
1075
|
+
private detectBackgroundColor;
|
|
1076
|
+
private detectTextColor;
|
|
1077
|
+
private isSimilarColor;
|
|
1078
|
+
private relativeLuminance;
|
|
1079
|
+
private calculateConsistency;
|
|
1080
|
+
private variance;
|
|
1081
|
+
}
|
|
1082
|
+
declare function getVisualQAEngine(): VisualQAEngine;
|
|
1083
|
+
declare function initVisualQAEngine(): Promise<VisualQAEngine>;
|
|
1084
|
+
|
|
938
1085
|
/**
|
|
939
1086
|
* PresentationEngineV2 - Knowledge-Driven Excellence
|
|
940
1087
|
*
|
|
@@ -946,9 +1093,14 @@ declare function createRendererV2(presentationType?: PresentationType, kb?: Know
|
|
|
946
1093
|
* 5. Review ruthlessly (must score 95/100+)
|
|
947
1094
|
* 6. Output ONLY if quality passes
|
|
948
1095
|
*
|
|
949
|
-
*
|
|
950
|
-
* The
|
|
951
|
-
*
|
|
1096
|
+
* DESIGN PHILOSOPHY:
|
|
1097
|
+
* - The Knowledge Base (YAML) is the single source of truth for all design decisions
|
|
1098
|
+
* - Uses KnowledgeGateway.queryRequired() for critical paths (throws on missing data)
|
|
1099
|
+
* - Defensive fallbacks exist only for:
|
|
1100
|
+
* 1. Optional fields that may not exist in older KB versions
|
|
1101
|
+
* 2. Type coercion safety (undefined → default string)
|
|
1102
|
+
* 3. Map lookups that might fail for new palette names
|
|
1103
|
+
* - Critical errors (missing presentation types, validation rules) will throw
|
|
952
1104
|
*/
|
|
953
1105
|
|
|
954
1106
|
interface DesignSpecs {
|
|
@@ -1011,6 +1163,14 @@ interface EngineOptions {
|
|
|
1011
1163
|
verbose?: boolean;
|
|
1012
1164
|
/** Maximum remediation attempts per slide */
|
|
1013
1165
|
maxRemediationAttempts?: number;
|
|
1166
|
+
/** Run visual QA analysis using Playwright screenshots (default: false) */
|
|
1167
|
+
runVisualQA?: boolean;
|
|
1168
|
+
/**
|
|
1169
|
+
* Use V1's richer slide generation pipeline (default: true)
|
|
1170
|
+
* V1 creates agenda, section dividers, SCQA structure, metrics, STAR moments, call-to-action
|
|
1171
|
+
* V2 is minimalist - just sections parsed from markdown
|
|
1172
|
+
*/
|
|
1173
|
+
useRichPipeline?: boolean;
|
|
1014
1174
|
}
|
|
1015
1175
|
interface EngineResult {
|
|
1016
1176
|
slides: SlideV2[];
|
|
@@ -1020,6 +1180,8 @@ interface EngineResult {
|
|
|
1020
1180
|
designSpecs: DesignSpecs;
|
|
1021
1181
|
review: DeckReview;
|
|
1022
1182
|
warnings: string[];
|
|
1183
|
+
/** Visual QA analysis (only present if runVisualQA option is true) */
|
|
1184
|
+
visualQA?: VisualDeckAnalysis;
|
|
1023
1185
|
}
|
|
1024
1186
|
declare class PresentationEngineV2 {
|
|
1025
1187
|
private options;
|
|
@@ -1802,7 +1964,11 @@ declare function runCodeQualityCheck(srcDir: string): Promise<boolean>;
|
|
|
1802
1964
|
* 5. DeckQualityReviewer -> Holistic deck review (must pass 95)
|
|
1803
1965
|
* 6. Renderer -> Premium HTML/PPTX output
|
|
1804
1966
|
*
|
|
1805
|
-
*
|
|
1967
|
+
* DESIGN PHILOSOPHY:
|
|
1968
|
+
* - The Knowledge Base (YAML) is the source of truth for all design decisions
|
|
1969
|
+
* - Critical paths use queryRequired() which throws on missing data
|
|
1970
|
+
* - Defensive fallbacks exist for optional fields and type safety
|
|
1971
|
+
* - Both V1 (generate) and V2 (generatePresentation) APIs use the same KB
|
|
1806
1972
|
*/
|
|
1807
1973
|
|
|
1808
1974
|
declare const VERSION = "4.2.0";
|
|
@@ -1874,4 +2040,4 @@ interface GenerateResult {
|
|
|
1874
2040
|
*/
|
|
1875
2041
|
declare function generate(options: GenerateOptions): Promise<GenerateResult>;
|
|
1876
2042
|
|
|
1877
|
-
export { CodeQualityValidator, type ValidationResult as CodeValidationResult, type ContentAnalysis, ContentAnalyzer, DeckQualityReviewer, type DeckScore, type GenerateOptions, type GenerateResult, type HardcodedViolation, type ImageGenerationRequest, type ImageGenerationResult, KnowledgeGateway, type MetricData, type NanoBananaConfig, NanoBananaProvider, type OutputFormat, PresentationEngineV2, type PresentationMetadata, type PresentationMode, type PresentationResult, type PresentationType, type QualitativeDeckReview, type QualitativeSlideReview, type RemediationResult, Remediator, Renderer, RendererV2, type Slide, type SlideContent as SlideContentV2, SlideGenerator, SlideGeneratorV2, SlideQualityReviewer, type SlideScore, type SlideType as SlideTypeV2, type SlideV2, type TableData, VERSION, type Violation, VisualDesignSystem, createNanoBananaProvider, createPresentationEngineV2, createRendererV2, createSlideGeneratorV2, generate, generatePresentation, getContentAnalyzer, getDeckQualityReviewer, getKB, getNanoBananaPrompt, getRemediator, getRenderer, getSlideGenerator, getSlideQualityReviewer, getVisualDesignSystem, initContentAnalyzer, initDeckQualityReviewer, initKB, initRemediator, initRenderer, initSlideGenerator, initSlideQualityReviewer, initVisualDesignSystem, runCodeQualityCheck, validateCodeQuality };
|
|
2043
|
+
export { CodeQualityValidator, type ValidationResult as CodeValidationResult, type ContentAnalysis, ContentAnalyzer, DeckQualityReviewer, type DeckScore, type GenerateOptions, type GenerateResult, type HardcodedViolation, type ImageGenerationRequest, type ImageGenerationResult, KnowledgeGateway, type MetricData, type NanoBananaConfig, NanoBananaProvider, type OutputFormat, PresentationEngineV2, type PresentationMetadata, type PresentationMode, type PresentationResult, type PresentationType, type QALoopResult, type QualitativeDeckReview, type QualitativeSlideReview, type RemediationFeedback, type RemediationResult, Remediator, Renderer, RendererV2, type Slide, type SlideContent as SlideContentV2, SlideGenerator, SlideGeneratorV2, SlideQualityReviewer, type SlideScore, type SlideType as SlideTypeV2, type SlideV2, type TableData, VERSION, type Violation, type VisualDeckAnalysis, VisualDesignSystem, VisualQAEngine, type VisualSlideAnalysis, createNanoBananaProvider, createPresentationEngineV2, createRendererV2, createSlideGeneratorV2, generate, generatePresentation, getContentAnalyzer, getDeckQualityReviewer, getKB, getNanoBananaPrompt, getRemediator, getRenderer, getSlideGenerator, getSlideQualityReviewer, getVisualDesignSystem, getVisualQAEngine, initContentAnalyzer, initDeckQualityReviewer, initKB, initRemediator, initRenderer, initSlideGenerator, initSlideQualityReviewer, initVisualDesignSystem, initVisualQAEngine, runCodeQualityCheck, validateCodeQuality };
|