@houtini/lm 1.0.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/CHANGELOG.md +273 -0
- package/LICENSE +21 -0
- package/README.md +203 -0
- package/dist/cache/analysis-cache.d.ts +33 -0
- package/dist/cache/analysis-cache.d.ts.map +1 -0
- package/dist/cache/analysis-cache.js +56 -0
- package/dist/cache/analysis-cache.js.map +1 -0
- package/dist/cache/cache-manager.d.ts +29 -0
- package/dist/cache/cache-manager.d.ts.map +1 -0
- package/dist/cache/cache-manager.js +85 -0
- package/dist/cache/cache-manager.js.map +1 -0
- package/dist/cache/index.d.ts +16 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +17 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/prompt-cache.d.ts +33 -0
- package/dist/cache/prompt-cache.d.ts.map +1 -0
- package/dist/cache/prompt-cache.js +61 -0
- package/dist/cache/prompt-cache.js.map +1 -0
- package/dist/config.d.ts +43 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +70 -0
- package/dist/config.js.map +1 -0
- package/dist/core/ThreeStagePromptManager.d.ts +39 -0
- package/dist/core/ThreeStagePromptManager.d.ts.map +1 -0
- package/dist/core/ThreeStagePromptManager.js +176 -0
- package/dist/core/ThreeStagePromptManager.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +230 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins/base-plugin.d.ts +47 -0
- package/dist/plugins/base-plugin.d.ts.map +1 -0
- package/dist/plugins/base-plugin.js +90 -0
- package/dist/plugins/base-plugin.js.map +1 -0
- package/dist/plugins/index.d.ts +58 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +161 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/types.d.ts +5 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +5 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/prompts/analyze/code-quality.d.ts +116 -0
- package/dist/prompts/analyze/code-quality.d.ts.map +1 -0
- package/dist/prompts/analyze/code-quality.js +433 -0
- package/dist/prompts/analyze/code-quality.js.map +1 -0
- package/dist/prompts/analyze/compare-integration.d.ts +130 -0
- package/dist/prompts/analyze/compare-integration.d.ts.map +1 -0
- package/dist/prompts/analyze/compare-integration.js +543 -0
- package/dist/prompts/analyze/compare-integration.js.map +1 -0
- package/dist/prompts/analyze/count-files.d.ts +109 -0
- package/dist/prompts/analyze/count-files.d.ts.map +1 -0
- package/dist/prompts/analyze/count-files.js +399 -0
- package/dist/prompts/analyze/count-files.js.map +1 -0
- package/dist/prompts/analyze/database-queries.d.ts +156 -0
- package/dist/prompts/analyze/database-queries.d.ts.map +1 -0
- package/dist/prompts/analyze/database-queries.js +759 -0
- package/dist/prompts/analyze/database-queries.js.map +1 -0
- package/dist/prompts/analyze/dependencies.d.ts +97 -0
- package/dist/prompts/analyze/dependencies.d.ts.map +1 -0
- package/dist/prompts/analyze/dependencies.js +333 -0
- package/dist/prompts/analyze/dependencies.js.map +1 -0
- package/dist/prompts/analyze/diff-signatures.d.ts +139 -0
- package/dist/prompts/analyze/diff-signatures.d.ts.map +1 -0
- package/dist/prompts/analyze/diff-signatures.js +702 -0
- package/dist/prompts/analyze/diff-signatures.js.map +1 -0
- package/dist/prompts/analyze/find-patterns.d.ts +128 -0
- package/dist/prompts/analyze/find-patterns.d.ts.map +1 -0
- package/dist/prompts/analyze/find-patterns.js +520 -0
- package/dist/prompts/analyze/find-patterns.js.map +1 -0
- package/dist/prompts/analyze/find-unused-css.d.ts +151 -0
- package/dist/prompts/analyze/find-unused-css.d.ts.map +1 -0
- package/dist/prompts/analyze/find-unused-css.js +754 -0
- package/dist/prompts/analyze/find-unused-css.js.map +1 -0
- package/dist/prompts/analyze/n8n-workflow.d.ts +137 -0
- package/dist/prompts/analyze/n8n-workflow.d.ts.map +1 -0
- package/dist/prompts/analyze/n8n-workflow.js +529 -0
- package/dist/prompts/analyze/n8n-workflow.js.map +1 -0
- package/dist/prompts/analyze/project-structure.d.ts +126 -0
- package/dist/prompts/analyze/project-structure.d.ts.map +1 -0
- package/dist/prompts/analyze/project-structure.js +569 -0
- package/dist/prompts/analyze/project-structure.js.map +1 -0
- package/dist/prompts/analyze/security-audit.d.ts +142 -0
- package/dist/prompts/analyze/security-audit.d.ts.map +1 -0
- package/dist/prompts/analyze/security-audit.js +637 -0
- package/dist/prompts/analyze/security-audit.js.map +1 -0
- package/dist/prompts/analyze/single-file.d.ts +162 -0
- package/dist/prompts/analyze/single-file.d.ts.map +1 -0
- package/dist/prompts/analyze/single-file.js +665 -0
- package/dist/prompts/analyze/single-file.js.map +1 -0
- package/dist/prompts/analyze/trace-execution.d.ts +126 -0
- package/dist/prompts/analyze/trace-execution.d.ts.map +1 -0
- package/dist/prompts/analyze/trace-execution.js +609 -0
- package/dist/prompts/analyze/trace-execution.js.map +1 -0
- package/dist/prompts/analyze/wordpress-plugin-audit.d.ts +116 -0
- package/dist/prompts/analyze/wordpress-plugin-audit.d.ts.map +1 -0
- package/dist/prompts/analyze/wordpress-plugin-audit.js +454 -0
- package/dist/prompts/analyze/wordpress-plugin-audit.js.map +1 -0
- package/dist/prompts/analyze/wordpress-security.d.ts +146 -0
- package/dist/prompts/analyze/wordpress-security.d.ts.map +1 -0
- package/dist/prompts/analyze/wordpress-security.js +698 -0
- package/dist/prompts/analyze/wordpress-security.js.map +1 -0
- package/dist/prompts/analyze/wordpress-theme-audit.d.ts +114 -0
- package/dist/prompts/analyze/wordpress-theme-audit.d.ts.map +1 -0
- package/dist/prompts/analyze/wordpress-theme-audit.js +538 -0
- package/dist/prompts/analyze/wordpress-theme-audit.js.map +1 -0
- package/dist/prompts/custom/custom-prompt.d.ts +135 -0
- package/dist/prompts/custom/custom-prompt.d.ts.map +1 -0
- package/dist/prompts/custom/custom-prompt.js +419 -0
- package/dist/prompts/custom/custom-prompt.js.map +1 -0
- package/dist/prompts/fun/arcade-game.d.ts +152 -0
- package/dist/prompts/fun/arcade-game.d.ts.map +1 -0
- package/dist/prompts/fun/arcade-game.js +653 -0
- package/dist/prompts/fun/arcade-game.js.map +1 -0
- package/dist/prompts/fun/create_text_adventure.d.ts +100 -0
- package/dist/prompts/fun/create_text_adventure.d.ts.map +1 -0
- package/dist/prompts/fun/create_text_adventure.js +397 -0
- package/dist/prompts/fun/create_text_adventure.js.map +1 -0
- package/dist/prompts/fun/css-art-generator.d.ts +168 -0
- package/dist/prompts/fun/css-art-generator.d.ts.map +1 -0
- package/dist/prompts/fun/css-art-generator.js +827 -0
- package/dist/prompts/fun/css-art-generator.js.map +1 -0
- package/dist/prompts/generate/project-documentation.d.ts +137 -0
- package/dist/prompts/generate/project-documentation.d.ts.map +1 -0
- package/dist/prompts/generate/project-documentation.js +666 -0
- package/dist/prompts/generate/project-documentation.js.map +1 -0
- package/dist/prompts/generate/refactoring.d.ts +164 -0
- package/dist/prompts/generate/refactoring.d.ts.map +1 -0
- package/dist/prompts/generate/refactoring.js +621 -0
- package/dist/prompts/generate/refactoring.js.map +1 -0
- package/dist/prompts/generate/responsive-component.d.ts +147 -0
- package/dist/prompts/generate/responsive-component.d.ts.map +1 -0
- package/dist/prompts/generate/responsive-component.js +955 -0
- package/dist/prompts/generate/responsive-component.js.map +1 -0
- package/dist/prompts/generate/typescript-conversion.d.ts +144 -0
- package/dist/prompts/generate/typescript-conversion.d.ts.map +1 -0
- package/dist/prompts/generate/typescript-conversion.js +527 -0
- package/dist/prompts/generate/typescript-conversion.js.map +1 -0
- package/dist/prompts/generate/unit-tests.d.ts +139 -0
- package/dist/prompts/generate/unit-tests.d.ts.map +1 -0
- package/dist/prompts/generate/unit-tests.js +578 -0
- package/dist/prompts/generate/unit-tests.js.map +1 -0
- package/dist/prompts/generate/wordpress-plugin.d.ts +179 -0
- package/dist/prompts/generate/wordpress-plugin.d.ts.map +1 -0
- package/dist/prompts/generate/wordpress-plugin.js +763 -0
- package/dist/prompts/generate/wordpress-plugin.js.map +1 -0
- package/dist/prompts/generate/wordpress-theme-from-static.d.ts +177 -0
- package/dist/prompts/generate/wordpress-theme-from-static.d.ts.map +1 -0
- package/dist/prompts/generate/wordpress-theme-from-static.js +695 -0
- package/dist/prompts/generate/wordpress-theme-from-static.js.map +1 -0
- package/dist/prompts/shared/cache-manager.d.ts +45 -0
- package/dist/prompts/shared/cache-manager.d.ts.map +1 -0
- package/dist/prompts/shared/cache-manager.js +129 -0
- package/dist/prompts/shared/cache-manager.js.map +1 -0
- package/dist/prompts/shared/helpers.d.ts +39 -0
- package/dist/prompts/shared/helpers.d.ts.map +1 -0
- package/dist/prompts/shared/helpers.js +151 -0
- package/dist/prompts/shared/helpers.js.map +1 -0
- package/dist/prompts/shared/templates.d.ts +35 -0
- package/dist/prompts/shared/templates.d.ts.map +1 -0
- package/dist/prompts/shared/templates.js +77 -0
- package/dist/prompts/shared/templates.js.map +1 -0
- package/dist/prompts/shared/types.d.ts +112 -0
- package/dist/prompts/shared/types.d.ts.map +1 -0
- package/dist/prompts/shared/types.js +5 -0
- package/dist/prompts/shared/types.js.map +1 -0
- package/dist/prompts/system/find-unused-files.d.ts +106 -0
- package/dist/prompts/system/find-unused-files.d.ts.map +1 -0
- package/dist/prompts/system/find-unused-files.js +353 -0
- package/dist/prompts/system/find-unused-files.js.map +1 -0
- package/dist/security/index.d.ts +39 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +46 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/integration-helpers.d.ts +121 -0
- package/dist/security/integration-helpers.d.ts.map +1 -0
- package/dist/security/integration-helpers.js +190 -0
- package/dist/security/integration-helpers.js.map +1 -0
- package/dist/security/output-encoder.d.ts +94 -0
- package/dist/security/output-encoder.d.ts.map +1 -0
- package/dist/security/output-encoder.js +295 -0
- package/dist/security/output-encoder.js.map +1 -0
- package/dist/security/prompt-injection-guard.d.ts +59 -0
- package/dist/security/prompt-injection-guard.d.ts.map +1 -0
- package/dist/security/prompt-injection-guard.js +249 -0
- package/dist/security/prompt-injection-guard.js.map +1 -0
- package/dist/security/sanitisation.d.ts +67 -0
- package/dist/security/sanitisation.d.ts.map +1 -0
- package/dist/security/sanitisation.js +398 -0
- package/dist/security/sanitisation.js.map +1 -0
- package/dist/security/security-service.d.ts +103 -0
- package/dist/security/security-service.d.ts.map +1 -0
- package/dist/security/security-service.js +303 -0
- package/dist/security/security-service.js.map +1 -0
- package/dist/security-config.d.ts +45 -0
- package/dist/security-config.d.ts.map +1 -0
- package/dist/security-config.js +63 -0
- package/dist/security-config.js.map +1 -0
- package/dist/system/function-list.d.ts +61 -0
- package/dist/system/function-list.d.ts.map +1 -0
- package/dist/system/function-list.js +111 -0
- package/dist/system/function-list.js.map +1 -0
- package/dist/system/function-registry.d.ts +23 -0
- package/dist/system/function-registry.d.ts.map +1 -0
- package/dist/system/function-registry.js +136 -0
- package/dist/system/function-registry.js.map +1 -0
- package/dist/system/health-check.d.ts +33 -0
- package/dist/system/health-check.d.ts.map +1 -0
- package/dist/system/health-check.js +98 -0
- package/dist/system/health-check.js.map +1 -0
- package/dist/system/path-resolver.d.ts +55 -0
- package/dist/system/path-resolver.d.ts.map +1 -0
- package/dist/system/path-resolver.js +90 -0
- package/dist/system/path-resolver.js.map +1 -0
- package/dist/templates/plugin-template.d.ts +121 -0
- package/dist/templates/plugin-template.d.ts.map +1 -0
- package/dist/templates/plugin-template.js +450 -0
- package/dist/templates/plugin-template.js.map +1 -0
- package/dist/types/chunking-types.d.ts +88 -0
- package/dist/types/chunking-types.d.ts.map +1 -0
- package/dist/types/chunking-types.js +18 -0
- package/dist/types/chunking-types.js.map +1 -0
- package/dist/types/prompt-stages.d.ts +42 -0
- package/dist/types/prompt-stages.d.ts.map +1 -0
- package/dist/types/prompt-stages.js +6 -0
- package/dist/types/prompt-stages.js.map +1 -0
- package/dist/types.d.ts +46 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/css-parser.d.ts +26 -0
- package/dist/utils/css-parser.d.ts.map +1 -0
- package/dist/utils/css-parser.js +117 -0
- package/dist/utils/css-parser.js.map +1 -0
- package/dist/utils/path-resolver.d.ts +13 -0
- package/dist/utils/path-resolver.d.ts.map +1 -0
- package/dist/utils/path-resolver.js +78 -0
- package/dist/utils/path-resolver.js.map +1 -0
- package/dist/utils/plugin-utilities.d.ts +171 -0
- package/dist/utils/plugin-utilities.d.ts.map +1 -0
- package/dist/utils/plugin-utilities.js +221 -0
- package/dist/utils/plugin-utilities.js.map +1 -0
- package/dist/utils/streamHandler.d.ts +3 -0
- package/dist/utils/streamHandler.d.ts.map +1 -0
- package/dist/utils/streamHandler.js +137 -0
- package/dist/utils/streamHandler.js.map +1 -0
- package/dist/validation/output-validator.d.ts +136 -0
- package/dist/validation/output-validator.d.ts.map +1 -0
- package/dist/validation/output-validator.js +262 -0
- package/dist/validation/output-validator.js.map +1 -0
- package/dist/validation/response-factory.d.ts +44 -0
- package/dist/validation/response-factory.d.ts.map +1 -0
- package/dist/validation/response-factory.js +202 -0
- package/dist/validation/response-factory.js.map +1 -0
- package/dist/validation/schemas.d.ts +519 -0
- package/dist/validation/schemas.d.ts.map +1 -0
- package/dist/validation/schemas.js +6 -0
- package/dist/validation/schemas.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text Adventure Generator - Fun Plugin for Houtini LM MCP
|
|
3
|
+
*
|
|
4
|
+
* Creates complete interactive text adventure games with branching storylines,
|
|
5
|
+
* inventory systems, character stats, and multiple endings.
|
|
6
|
+
*/
|
|
7
|
+
import { BasePlugin } from '../../plugins/base-plugin.js';
|
|
8
|
+
import { IPromptPlugin } from '../shared/types.js';
|
|
9
|
+
import { PromptStages } from '../../types/prompt-stages.js';
|
|
10
|
+
export declare class TextAdventureGenerator extends BasePlugin implements IPromptPlugin {
|
|
11
|
+
name: string;
|
|
12
|
+
category: "generate";
|
|
13
|
+
description: string;
|
|
14
|
+
parameters: {
|
|
15
|
+
code: {
|
|
16
|
+
type: "string";
|
|
17
|
+
description: string;
|
|
18
|
+
required: boolean;
|
|
19
|
+
};
|
|
20
|
+
filePath: {
|
|
21
|
+
type: "string";
|
|
22
|
+
description: string;
|
|
23
|
+
required: boolean;
|
|
24
|
+
};
|
|
25
|
+
projectPath: {
|
|
26
|
+
type: "string";
|
|
27
|
+
description: string;
|
|
28
|
+
required: boolean;
|
|
29
|
+
};
|
|
30
|
+
files: {
|
|
31
|
+
type: "array";
|
|
32
|
+
description: string;
|
|
33
|
+
required: boolean;
|
|
34
|
+
items: {
|
|
35
|
+
type: "string";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
maxDepth: {
|
|
39
|
+
type: "number";
|
|
40
|
+
description: string;
|
|
41
|
+
required: boolean;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
theme: {
|
|
45
|
+
type: "string";
|
|
46
|
+
description: string;
|
|
47
|
+
enum: string[];
|
|
48
|
+
default: string;
|
|
49
|
+
required: boolean;
|
|
50
|
+
};
|
|
51
|
+
complexity: {
|
|
52
|
+
type: "string";
|
|
53
|
+
description: string;
|
|
54
|
+
enum: string[];
|
|
55
|
+
default: string;
|
|
56
|
+
required: boolean;
|
|
57
|
+
};
|
|
58
|
+
length: {
|
|
59
|
+
type: "string";
|
|
60
|
+
description: string;
|
|
61
|
+
enum: string[];
|
|
62
|
+
default: string;
|
|
63
|
+
required: boolean;
|
|
64
|
+
};
|
|
65
|
+
features: {
|
|
66
|
+
type: "array";
|
|
67
|
+
description: string;
|
|
68
|
+
items: {
|
|
69
|
+
type: "string";
|
|
70
|
+
};
|
|
71
|
+
default: string[];
|
|
72
|
+
required: boolean;
|
|
73
|
+
};
|
|
74
|
+
playerClass: {
|
|
75
|
+
type: "string";
|
|
76
|
+
description: string;
|
|
77
|
+
enum: string[];
|
|
78
|
+
default: string;
|
|
79
|
+
required: boolean;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
private analysisCache;
|
|
83
|
+
private multiFileAnalysis;
|
|
84
|
+
constructor();
|
|
85
|
+
execute(params: any, llmClient: any): Promise<any>;
|
|
86
|
+
private detectAnalysisMode;
|
|
87
|
+
private validateParameters;
|
|
88
|
+
private executeSingleFileGeneration;
|
|
89
|
+
private executeMultiFileGeneration;
|
|
90
|
+
private getSingleFilePromptStages;
|
|
91
|
+
private getMultiFilePromptStages;
|
|
92
|
+
getPromptStages(params: any): PromptStages;
|
|
93
|
+
private getFeatureDescriptions;
|
|
94
|
+
private getComplexityGuidelines;
|
|
95
|
+
private getLengthSpecifications;
|
|
96
|
+
private getMinimumScenes;
|
|
97
|
+
private getMinimumEndings;
|
|
98
|
+
}
|
|
99
|
+
export default TextAdventureGenerator;
|
|
100
|
+
//# sourceMappingURL=create_text_adventure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_text_adventure.d.ts","sourceRoot":"","sources":["../../../src/prompts/fun/create_text_adventure.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAgB5D,qBAAa,sBAAuB,SAAQ,UAAW,YAAW,aAAa;IAC7E,IAAI,SAA2B;IAC/B,QAAQ,EAAG,UAAU,CAAU;IAC/B,WAAW,SAA2H;IAEtI,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoER;IAEF,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,iBAAiB,CAA2B;;IAM9C,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IAyBzC,OAAO,CAAC,kBAAkB;IAe1B,OAAO,CAAC,kBAAkB;YAcZ,2BAA2B;YA0C3B,0BAA0B;IAsBxC,OAAO,CAAC,yBAAyB;IAgEjC,OAAO,CAAC,wBAAwB;IA0GhC,eAAe,CAAC,MAAM,EAAE,GAAG,GAAG,YAAY;IAW1C,OAAO,CAAC,sBAAsB;IAiB9B,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,uBAAuB;IAW/B,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,iBAAiB;CAS1B;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text Adventure Generator - Fun Plugin for Houtini LM MCP
|
|
3
|
+
*
|
|
4
|
+
* Creates complete interactive text adventure games with branching storylines,
|
|
5
|
+
* inventory systems, character stats, and multiple endings.
|
|
6
|
+
*/
|
|
7
|
+
import { BasePlugin } from '../../plugins/base-plugin.js';
|
|
8
|
+
import { ThreeStagePromptManager } from '../../core/ThreeStagePromptManager.js';
|
|
9
|
+
import { withSecurity } from '../../security/integration-helpers.js';
|
|
10
|
+
import { readFileContent } from '../shared/helpers.js';
|
|
11
|
+
import { ModelSetup, ResponseProcessor, ParameterValidator, ErrorHandler, MultiFileAnalysis } from '../../utils/plugin-utilities.js';
|
|
12
|
+
import { getAnalysisCache } from '../../cache/index.js';
|
|
13
|
+
export class TextAdventureGenerator extends BasePlugin {
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
this.name = 'create_text_adventure';
|
|
17
|
+
this.category = 'generate';
|
|
18
|
+
this.description = 'Generate complete interactive text adventure games with branching storylines, inventory systems, and multiple endings';
|
|
19
|
+
this.parameters = {
|
|
20
|
+
// Single-file parameters (for analyzing existing adventures)
|
|
21
|
+
code: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'Existing adventure code to enhance (for single-file analysis)',
|
|
24
|
+
required: false
|
|
25
|
+
},
|
|
26
|
+
filePath: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Path to existing adventure file to enhance',
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
// Multi-file parameters (for generating complete adventure projects)
|
|
32
|
+
projectPath: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
description: 'Path to project root where adventure will be created',
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
files: {
|
|
38
|
+
type: 'array',
|
|
39
|
+
description: 'Array of specific adventure files to analyze/enhance',
|
|
40
|
+
required: false,
|
|
41
|
+
items: { type: 'string' }
|
|
42
|
+
},
|
|
43
|
+
maxDepth: {
|
|
44
|
+
type: 'number',
|
|
45
|
+
description: 'Maximum directory depth for adventure file discovery (1-5)',
|
|
46
|
+
required: false,
|
|
47
|
+
default: 3
|
|
48
|
+
},
|
|
49
|
+
// Adventure-specific parameters
|
|
50
|
+
theme: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: 'Adventure theme',
|
|
53
|
+
enum: ['fantasy', 'sci-fi', 'mystery', 'horror', 'historical', 'modern', 'steampunk', 'cyberpunk'],
|
|
54
|
+
default: 'fantasy',
|
|
55
|
+
required: false
|
|
56
|
+
},
|
|
57
|
+
complexity: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
description: 'Adventure complexity level',
|
|
60
|
+
enum: ['simple', 'intermediate', 'advanced'],
|
|
61
|
+
default: 'intermediate',
|
|
62
|
+
required: false
|
|
63
|
+
},
|
|
64
|
+
length: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
description: 'Expected adventure length',
|
|
67
|
+
enum: ['short', 'medium', 'long', 'epic'],
|
|
68
|
+
default: 'medium',
|
|
69
|
+
required: false
|
|
70
|
+
},
|
|
71
|
+
features: {
|
|
72
|
+
type: 'array',
|
|
73
|
+
description: 'Adventure features to include',
|
|
74
|
+
items: { type: 'string' },
|
|
75
|
+
default: ['inventory', 'stats', 'save_game', 'multiple_endings'],
|
|
76
|
+
required: false
|
|
77
|
+
},
|
|
78
|
+
playerClass: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
description: 'Player character class/type',
|
|
81
|
+
enum: ['warrior', 'mage', 'rogue', 'ranger', 'detective', 'scientist', 'explorer', 'custom'],
|
|
82
|
+
default: 'custom',
|
|
83
|
+
required: false
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
this.analysisCache = getAnalysisCache();
|
|
87
|
+
this.multiFileAnalysis = new MultiFileAnalysis();
|
|
88
|
+
}
|
|
89
|
+
async execute(params, llmClient) {
|
|
90
|
+
return await withSecurity(this, params, llmClient, async (secureParams) => {
|
|
91
|
+
try {
|
|
92
|
+
// Auto-detect analysis mode
|
|
93
|
+
const analysisMode = this.detectAnalysisMode(secureParams);
|
|
94
|
+
// Validate parameters
|
|
95
|
+
this.validateParameters(secureParams, analysisMode);
|
|
96
|
+
// Setup model
|
|
97
|
+
const { model, contextLength } = await ModelSetup.getReadyModel(llmClient);
|
|
98
|
+
// Route to appropriate generation method
|
|
99
|
+
if (analysisMode === 'single-file') {
|
|
100
|
+
return await this.executeSingleFileGeneration(secureParams, model, contextLength);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return await this.executeMultiFileGeneration(secureParams, model, contextLength);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
return ErrorHandler.createExecutionError('create_text_adventure', error);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
detectAnalysisMode(params) {
|
|
112
|
+
// Single-file: enhancing existing adventure
|
|
113
|
+
if (params.code || params.filePath) {
|
|
114
|
+
return 'single-file';
|
|
115
|
+
}
|
|
116
|
+
// Multi-file: creating new adventure project
|
|
117
|
+
if (params.projectPath || params.files) {
|
|
118
|
+
return 'multi-file';
|
|
119
|
+
}
|
|
120
|
+
// Default for text adventures: multi-file project generation
|
|
121
|
+
return 'multi-file';
|
|
122
|
+
}
|
|
123
|
+
validateParameters(params, mode) {
|
|
124
|
+
if (mode === 'single-file') {
|
|
125
|
+
ParameterValidator.validateCodeOrFile(params);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
ParameterValidator.validateProjectPath(params);
|
|
129
|
+
}
|
|
130
|
+
// Adventure-specific validations
|
|
131
|
+
ParameterValidator.validateEnum(params, 'theme', ['fantasy', 'sci-fi', 'mystery', 'horror', 'historical', 'modern', 'steampunk', 'cyberpunk']);
|
|
132
|
+
ParameterValidator.validateEnum(params, 'complexity', ['simple', 'intermediate', 'advanced']);
|
|
133
|
+
ParameterValidator.validateEnum(params, 'length', ['short', 'medium', 'long', 'epic']);
|
|
134
|
+
ParameterValidator.validateEnum(params, 'playerClass', ['warrior', 'mage', 'rogue', 'ranger', 'detective', 'scientist', 'explorer', 'custom']);
|
|
135
|
+
}
|
|
136
|
+
async executeSingleFileGeneration(params, model, contextLength) {
|
|
137
|
+
// Process existing adventure code
|
|
138
|
+
let adventureCode = params.code;
|
|
139
|
+
if (params.filePath) {
|
|
140
|
+
adventureCode = await readFileContent(params.filePath);
|
|
141
|
+
}
|
|
142
|
+
// Generate enhancement prompt
|
|
143
|
+
const promptStages = this.getSingleFilePromptStages({
|
|
144
|
+
...params,
|
|
145
|
+
code: adventureCode
|
|
146
|
+
});
|
|
147
|
+
// Execute with appropriate method
|
|
148
|
+
const promptManager = new ThreeStagePromptManager(contextLength);
|
|
149
|
+
const needsChunking = promptManager.needsChunking(promptStages);
|
|
150
|
+
if (needsChunking) {
|
|
151
|
+
const conversation = promptManager.createChunkedConversation(promptStages);
|
|
152
|
+
const messages = [
|
|
153
|
+
conversation.systemMessage,
|
|
154
|
+
...conversation.dataMessages,
|
|
155
|
+
conversation.analysisMessage
|
|
156
|
+
];
|
|
157
|
+
return await ResponseProcessor.executeChunked(messages, model, contextLength, 'create_text_adventure', 'single');
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
return await ResponseProcessor.executeDirect(promptStages, model, contextLength, 'create_text_adventure');
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
async executeMultiFileGeneration(params, model, contextLength) {
|
|
164
|
+
// For new adventure generation, we create the complete project
|
|
165
|
+
const promptStages = this.getMultiFilePromptStages(params);
|
|
166
|
+
// Always use chunking for complete adventure generation
|
|
167
|
+
const promptManager = new ThreeStagePromptManager(contextLength);
|
|
168
|
+
const conversation = promptManager.createChunkedConversation(promptStages);
|
|
169
|
+
const messages = [
|
|
170
|
+
conversation.systemMessage,
|
|
171
|
+
...conversation.dataMessages,
|
|
172
|
+
conversation.analysisMessage
|
|
173
|
+
];
|
|
174
|
+
return await ResponseProcessor.executeChunked(messages, model, contextLength, 'create_text_adventure', 'multifile');
|
|
175
|
+
}
|
|
176
|
+
getSingleFilePromptStages(params) {
|
|
177
|
+
const { code, theme, complexity, length, features, playerClass } = params;
|
|
178
|
+
const systemAndContext = `You are a master game designer and interactive fiction writer with 20+ years of experience creating engaging text adventures. You specialize in narrative design, player engagement, and technical implementation of interactive storytelling systems.
|
|
179
|
+
|
|
180
|
+
**Your Mission**: Enhance and expand the existing text adventure code to create a more engaging, feature-rich experience.
|
|
181
|
+
|
|
182
|
+
**Your Expertise**:
|
|
183
|
+
- Interactive fiction design and narrative structure
|
|
184
|
+
- Player choice consequences and branching storylines
|
|
185
|
+
- Game mechanics integration (inventory, stats, combat)
|
|
186
|
+
- Technical implementation of text-based game systems
|
|
187
|
+
- User experience optimization for text adventures
|
|
188
|
+
|
|
189
|
+
**Enhancement Context**:
|
|
190
|
+
- Theme: ${theme}
|
|
191
|
+
- Complexity: ${complexity}
|
|
192
|
+
- Target Length: ${length}
|
|
193
|
+
- Features: ${features.join(', ')}
|
|
194
|
+
- Player Class: ${playerClass}
|
|
195
|
+
|
|
196
|
+
**Enhancement Approach**:
|
|
197
|
+
1. Analyze existing adventure structure and identify expansion opportunities
|
|
198
|
+
2. Enhance narrative depth and player choice consequences
|
|
199
|
+
3. Improve game mechanics and feature integration
|
|
200
|
+
4. Optimize user interface and experience
|
|
201
|
+
5. Add replayability elements and multiple story paths`;
|
|
202
|
+
const dataPayload = `Existing adventure code to enhance:
|
|
203
|
+
|
|
204
|
+
\`\`\`javascript
|
|
205
|
+
${code}
|
|
206
|
+
\`\`\``;
|
|
207
|
+
const outputInstructions = `Provide your enhanced text adventure as complete, working code with the following structure:
|
|
208
|
+
|
|
209
|
+
**Return the enhanced code in this format:**
|
|
210
|
+
|
|
211
|
+
\`\`\`javascript
|
|
212
|
+
// Enhanced adventure code here
|
|
213
|
+
\`\`\`
|
|
214
|
+
|
|
215
|
+
**Requirements for Enhancement:**
|
|
216
|
+
- Expand narrative depth with richer descriptions and character development
|
|
217
|
+
- Add new story branches and meaningful player choices
|
|
218
|
+
- Implement requested features: ${features.join(', ')}
|
|
219
|
+
- Improve game mechanics and user interface
|
|
220
|
+
- Add multiple endings based on player choices
|
|
221
|
+
- Include save/load functionality if requested
|
|
222
|
+
- Optimize code structure and readability
|
|
223
|
+
|
|
224
|
+
**Technical Standards:**
|
|
225
|
+
- Clean, modular JavaScript code
|
|
226
|
+
- Comprehensive error handling
|
|
227
|
+
- Intuitive user interface
|
|
228
|
+
- Mobile-friendly design
|
|
229
|
+
- Local storage for save games
|
|
230
|
+
- Proper game state management
|
|
231
|
+
|
|
232
|
+
Focus on creating an enhanced adventure that's significantly more engaging than the original while maintaining technical excellence.`;
|
|
233
|
+
return { systemAndContext, dataPayload, outputInstructions };
|
|
234
|
+
}
|
|
235
|
+
getMultiFilePromptStages(params) {
|
|
236
|
+
const { theme, complexity, length, features, playerClass } = params;
|
|
237
|
+
const systemAndContext = `You are a master game designer and interactive fiction writer with 20+ years of experience creating captivating text adventures. You specialize in complete game architecture, narrative design, and creating immersive interactive experiences.
|
|
238
|
+
|
|
239
|
+
**Your Mission**: Create a complete, professional-quality text adventure game from scratch.
|
|
240
|
+
|
|
241
|
+
**Your Expertise**:
|
|
242
|
+
- Interactive fiction architecture and game engine design
|
|
243
|
+
- Compelling narrative structure with branching storylines
|
|
244
|
+
- Advanced game mechanics (inventory, combat, character progression)
|
|
245
|
+
- Professional web development for gaming applications
|
|
246
|
+
- User experience design for text-based adventures
|
|
247
|
+
- Replayability and engagement optimization
|
|
248
|
+
|
|
249
|
+
**Adventure Specifications**:
|
|
250
|
+
- Theme: ${theme}
|
|
251
|
+
- Complexity Level: ${complexity}
|
|
252
|
+
- Expected Length: ${length}
|
|
253
|
+
- Features: ${features.join(', ')}
|
|
254
|
+
- Player Class: ${playerClass}
|
|
255
|
+
|
|
256
|
+
**Game Architecture Approach**:
|
|
257
|
+
1. Design modular game engine with extensible components
|
|
258
|
+
2. Create rich, atmospheric narrative with meaningful choices
|
|
259
|
+
3. Implement sophisticated game mechanics and systems
|
|
260
|
+
4. Build intuitive, responsive user interface
|
|
261
|
+
5. Include multiple story paths and endings for replayability
|
|
262
|
+
6. Ensure professional code quality and structure
|
|
263
|
+
|
|
264
|
+
**Quality Standards**:
|
|
265
|
+
- Professional game architecture with clean separation of concerns
|
|
266
|
+
- Engaging storytelling with character development and world-building
|
|
267
|
+
- Sophisticated game mechanics appropriate for the complexity level
|
|
268
|
+
- Modern web technologies with responsive design
|
|
269
|
+
- Comprehensive save/load system and game state management
|
|
270
|
+
- Multiple difficulty levels and replayability features`;
|
|
271
|
+
const dataPayload = `Adventure Generation Requirements:
|
|
272
|
+
|
|
273
|
+
**Theme**: ${theme}
|
|
274
|
+
**Complexity**: ${complexity}
|
|
275
|
+
**Length**: ${length}
|
|
276
|
+
**Features**: ${features.join(', ')}
|
|
277
|
+
**Player Class**: ${playerClass}
|
|
278
|
+
|
|
279
|
+
**Expected Output**: Complete, multi-file text adventure game project
|
|
280
|
+
|
|
281
|
+
**Feature Details**:
|
|
282
|
+
${this.getFeatureDescriptions(features).map(f => `- ${f}`).join('\n')}
|
|
283
|
+
|
|
284
|
+
**Complexity Guidelines**:
|
|
285
|
+
${this.getComplexityGuidelines(complexity)}
|
|
286
|
+
|
|
287
|
+
**Length Specifications**:
|
|
288
|
+
${this.getLengthSpecifications(length)}`;
|
|
289
|
+
const outputInstructions = `Create a complete text adventure game with the following file structure:
|
|
290
|
+
|
|
291
|
+
**File Structure Required:**
|
|
292
|
+
1. **index.html** - Main game interface with modern styling
|
|
293
|
+
2. **game-engine.js** - Core game engine and state management
|
|
294
|
+
3. **story-data.js** - All story content, choices, and narrative text
|
|
295
|
+
4. **game-mechanics.js** - Inventory, combat, stats, and game systems
|
|
296
|
+
5. **ui-manager.js** - User interface management and interactions
|
|
297
|
+
6. **save-system.js** - Save/load functionality and persistence
|
|
298
|
+
7. **styles.css** - Professional styling with theme-appropriate design
|
|
299
|
+
|
|
300
|
+
**Output Format:**
|
|
301
|
+
For each file, provide:
|
|
302
|
+
|
|
303
|
+
\`\`\`
|
|
304
|
+
// File: [filename]
|
|
305
|
+
[complete file content]
|
|
306
|
+
\`\`\`
|
|
307
|
+
|
|
308
|
+
**Technical Requirements:**
|
|
309
|
+
- Modern, clean JavaScript with ES6+ features
|
|
310
|
+
- Responsive CSS design that works on mobile and desktop
|
|
311
|
+
- Comprehensive error handling and edge case management
|
|
312
|
+
- Modular architecture for easy expansion
|
|
313
|
+
- Local storage save system with multiple save slots
|
|
314
|
+
- Professional UI/UX with smooth transitions and feedback
|
|
315
|
+
- Accessibility features (keyboard navigation, screen reader support)
|
|
316
|
+
|
|
317
|
+
**Game Content Requirements:**
|
|
318
|
+
- Rich, immersive storyline appropriate for ${theme} theme
|
|
319
|
+
- At least ${this.getMinimumScenes(length)} unique scenes/locations
|
|
320
|
+
- Multiple story paths leading to different outcomes
|
|
321
|
+
- Character development and meaningful player choices
|
|
322
|
+
- Atmospheric descriptions and engaging dialogue
|
|
323
|
+
- ${this.getMinimumEndings(complexity)} distinct endings based on player choices
|
|
324
|
+
|
|
325
|
+
**Quality Assurance:**
|
|
326
|
+
- All code must be production-ready and fully functional
|
|
327
|
+
- Include comprehensive comments and documentation
|
|
328
|
+
- Implement proper game state validation
|
|
329
|
+
- Handle all user input edge cases gracefully
|
|
330
|
+
- Provide clear instructions for players
|
|
331
|
+
|
|
332
|
+
Create an adventure that demonstrates professional game development standards while delivering an engaging, memorable interactive experience.`;
|
|
333
|
+
return { systemAndContext, dataPayload, outputInstructions };
|
|
334
|
+
}
|
|
335
|
+
// Backwards compatibility
|
|
336
|
+
getPromptStages(params) {
|
|
337
|
+
const mode = this.detectAnalysisMode(params);
|
|
338
|
+
if (mode === 'single-file') {
|
|
339
|
+
return this.getSingleFilePromptStages(params);
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
return this.getMultiFilePromptStages(params);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
// Helper methods for adventure generation
|
|
346
|
+
getFeatureDescriptions(features) {
|
|
347
|
+
const featureMap = {
|
|
348
|
+
'inventory': 'Advanced inventory system with item interactions and combinations',
|
|
349
|
+
'stats': 'Character statistics (health, strength, intelligence, etc.) affecting gameplay',
|
|
350
|
+
'save_game': 'Multiple save slot system with game state persistence',
|
|
351
|
+
'multiple_endings': 'At least 3-5 different endings based on player choices and actions',
|
|
352
|
+
'combat': 'Turn-based or choice-based combat system with strategic elements',
|
|
353
|
+
'puzzles': 'Logic puzzles and riddles integrated into the narrative',
|
|
354
|
+
'character_creation': 'Detailed character creation affecting story and gameplay',
|
|
355
|
+
'dialogue_trees': 'Complex conversation systems with relationship impacts',
|
|
356
|
+
'time_system': 'Day/night cycle or time progression affecting story events',
|
|
357
|
+
'reputation': 'Reputation system tracking player actions and NPC relationships'
|
|
358
|
+
};
|
|
359
|
+
return features.map(f => featureMap[f] || `${f} system integration`);
|
|
360
|
+
}
|
|
361
|
+
getComplexityGuidelines(complexity) {
|
|
362
|
+
const guidelines = {
|
|
363
|
+
'simple': '- Linear story with 2-3 major choice points\n- Basic inventory (5-10 items)\n- Simple text interface\n- 2-3 possible endings',
|
|
364
|
+
'intermediate': '- Branching narrative with multiple story paths\n- Full inventory and stats system\n- Enhanced UI with images/styling\n- 4-6 different endings\n- Character progression elements',
|
|
365
|
+
'advanced': '- Complex multi-layered narrative with consequences\n- Sophisticated game mechanics and systems\n- Professional-grade UI and animations\n- 6+ unique endings with variations\n- Advanced features like crafting, relationships, or time mechanics'
|
|
366
|
+
};
|
|
367
|
+
return guidelines[complexity] || guidelines.intermediate;
|
|
368
|
+
}
|
|
369
|
+
getLengthSpecifications(length) {
|
|
370
|
+
const specs = {
|
|
371
|
+
'short': '- 15-30 minutes gameplay\n- 8-12 unique scenes\n- 2,000-4,000 words of content',
|
|
372
|
+
'medium': '- 45-90 minutes gameplay\n- 15-25 unique scenes\n- 5,000-10,000 words of content',
|
|
373
|
+
'long': '- 2-4 hours gameplay\n- 25-40 unique scenes\n- 10,000-20,000 words of content',
|
|
374
|
+
'epic': '- 4+ hours gameplay\n- 40+ unique scenes\n- 20,000+ words of content\n- Multiple character arcs and subplots'
|
|
375
|
+
};
|
|
376
|
+
return specs[length] || specs.medium;
|
|
377
|
+
}
|
|
378
|
+
getMinimumScenes(length) {
|
|
379
|
+
const scenes = {
|
|
380
|
+
'short': '10-15',
|
|
381
|
+
'medium': '20-30',
|
|
382
|
+
'long': '35-50',
|
|
383
|
+
'epic': '50+'
|
|
384
|
+
};
|
|
385
|
+
return scenes[length] || scenes.medium;
|
|
386
|
+
}
|
|
387
|
+
getMinimumEndings(complexity) {
|
|
388
|
+
const endings = {
|
|
389
|
+
'simple': '2-3',
|
|
390
|
+
'intermediate': '4-6',
|
|
391
|
+
'advanced': '6+'
|
|
392
|
+
};
|
|
393
|
+
return endings[complexity] || endings.intermediate;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
export default TextAdventureGenerator;
|
|
397
|
+
//# sourceMappingURL=create_text_adventure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_text_adventure.js","sourceRoot":"","sources":["../../../src/prompts/fun/create_text_adventure.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAE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ACvC,CAAC;IAEO,gBAAgB,CAAC,MAAc;QACrC,MAAM,MAAM,GAA2B;YACrC,OAAO,EAAE,OAAO;YAChB,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,OAAO;YACf,MAAM,EAAE,KAAK;SACd,CAAC;QAEF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;IACzC,CAAC;IAEO,iBAAiB,CAAC,UAAkB;QAC1C,MAAM,OAAO,GAA2B;YACtC,QAAQ,EAAE,KAAK;YACf,cAAc,EAAE,KAAK;YACrB,UAAU,EAAE,IAAI;SACjB,CAAC;QAEF,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC;IACrD,CAAC;CACF;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS Art Generator Plugin - Modern v4.3
|
|
3
|
+
*
|
|
4
|
+
* Creates pure CSS drawings, animations, and interactive art
|
|
5
|
+
* Automatically detects single-art or multi-art generation mode
|
|
6
|
+
*
|
|
7
|
+
* Built with the universal template for consistency and performance
|
|
8
|
+
*/
|
|
9
|
+
import { BasePlugin } from '../../plugins/base-plugin.js';
|
|
10
|
+
import { IPromptPlugin } from '../shared/types.js';
|
|
11
|
+
import { PromptStages } from '../../types/prompt-stages.js';
|
|
12
|
+
export declare class CSSArtGenerator extends BasePlugin implements IPromptPlugin {
|
|
13
|
+
name: string;
|
|
14
|
+
category: "generate";
|
|
15
|
+
description: string;
|
|
16
|
+
parameters: {
|
|
17
|
+
code: {
|
|
18
|
+
type: "string";
|
|
19
|
+
description: string;
|
|
20
|
+
required: boolean;
|
|
21
|
+
};
|
|
22
|
+
filePath: {
|
|
23
|
+
type: "string";
|
|
24
|
+
description: string;
|
|
25
|
+
required: boolean;
|
|
26
|
+
};
|
|
27
|
+
projectPath: {
|
|
28
|
+
type: "string";
|
|
29
|
+
description: string;
|
|
30
|
+
required: boolean;
|
|
31
|
+
};
|
|
32
|
+
files: {
|
|
33
|
+
type: "array";
|
|
34
|
+
description: string;
|
|
35
|
+
required: boolean;
|
|
36
|
+
items: {
|
|
37
|
+
type: "string";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
maxDepth: {
|
|
41
|
+
type: "number";
|
|
42
|
+
description: string;
|
|
43
|
+
required: boolean;
|
|
44
|
+
default: number;
|
|
45
|
+
};
|
|
46
|
+
artType: {
|
|
47
|
+
type: "string";
|
|
48
|
+
description: string;
|
|
49
|
+
enum: string[];
|
|
50
|
+
default: string;
|
|
51
|
+
required: boolean;
|
|
52
|
+
};
|
|
53
|
+
complexity: {
|
|
54
|
+
type: "string";
|
|
55
|
+
description: string;
|
|
56
|
+
enum: string[];
|
|
57
|
+
default: string;
|
|
58
|
+
required: boolean;
|
|
59
|
+
};
|
|
60
|
+
animationStyle: {
|
|
61
|
+
type: "string";
|
|
62
|
+
description: string;
|
|
63
|
+
enum: string[];
|
|
64
|
+
default: string;
|
|
65
|
+
required: boolean;
|
|
66
|
+
};
|
|
67
|
+
colorScheme: {
|
|
68
|
+
type: "string";
|
|
69
|
+
description: string;
|
|
70
|
+
enum: string[];
|
|
71
|
+
default: string;
|
|
72
|
+
required: boolean;
|
|
73
|
+
};
|
|
74
|
+
theme: {
|
|
75
|
+
type: "string";
|
|
76
|
+
description: string;
|
|
77
|
+
enum: string[];
|
|
78
|
+
default: string;
|
|
79
|
+
required: boolean;
|
|
80
|
+
};
|
|
81
|
+
techniques: {
|
|
82
|
+
type: "array";
|
|
83
|
+
description: string;
|
|
84
|
+
items: {
|
|
85
|
+
type: "string";
|
|
86
|
+
};
|
|
87
|
+
default: string[];
|
|
88
|
+
required: boolean;
|
|
89
|
+
};
|
|
90
|
+
responsive: {
|
|
91
|
+
type: "boolean";
|
|
92
|
+
description: string;
|
|
93
|
+
default: boolean;
|
|
94
|
+
required: boolean;
|
|
95
|
+
};
|
|
96
|
+
language: {
|
|
97
|
+
type: "string";
|
|
98
|
+
description: string;
|
|
99
|
+
required: boolean;
|
|
100
|
+
default: string;
|
|
101
|
+
};
|
|
102
|
+
analysisDepth: {
|
|
103
|
+
type: "string";
|
|
104
|
+
description: string;
|
|
105
|
+
enum: string[];
|
|
106
|
+
default: string;
|
|
107
|
+
required: boolean;
|
|
108
|
+
};
|
|
109
|
+
analysisType: {
|
|
110
|
+
type: "string";
|
|
111
|
+
description: string;
|
|
112
|
+
enum: string[];
|
|
113
|
+
default: string;
|
|
114
|
+
required: boolean;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
private analysisCache;
|
|
118
|
+
private multiFileAnalysis;
|
|
119
|
+
constructor();
|
|
120
|
+
execute(params: any, llmClient: any): Promise<any>;
|
|
121
|
+
/**
|
|
122
|
+
* Auto-detect whether this is single-art or multi-art generation
|
|
123
|
+
*/
|
|
124
|
+
private detectAnalysisMode;
|
|
125
|
+
/**
|
|
126
|
+
* Validate parameters based on detected analysis mode
|
|
127
|
+
*/
|
|
128
|
+
private validateParameters;
|
|
129
|
+
/**
|
|
130
|
+
* Execute single-art generation
|
|
131
|
+
*/
|
|
132
|
+
private executeSingleArtGeneration;
|
|
133
|
+
/**
|
|
134
|
+
* Execute multi-art generation
|
|
135
|
+
*/
|
|
136
|
+
private executeMultiArtGeneration;
|
|
137
|
+
/**
|
|
138
|
+
* Single-art prompt stages - Generate a beautiful CSS art piece
|
|
139
|
+
*/
|
|
140
|
+
private getSingleArtPromptStages;
|
|
141
|
+
/**
|
|
142
|
+
* Multi-art prompt stages - Generate CSS art collections or enhance projects
|
|
143
|
+
*/
|
|
144
|
+
private getMultiArtPromptStages;
|
|
145
|
+
/**
|
|
146
|
+
* Backwards compatibility method - routes to appropriate stages
|
|
147
|
+
*/
|
|
148
|
+
getPromptStages(params: any): PromptStages;
|
|
149
|
+
private discoverRelevantFiles;
|
|
150
|
+
private performMultiArtAnalysis;
|
|
151
|
+
private analyzeArtFile;
|
|
152
|
+
private identifyArtTypes;
|
|
153
|
+
private identifyCSSFeatures;
|
|
154
|
+
private assessArtComplexity;
|
|
155
|
+
private detectTheme;
|
|
156
|
+
private getArtTypeInspiration;
|
|
157
|
+
private getComplexityGuidelines;
|
|
158
|
+
private getAnimationGuidelines;
|
|
159
|
+
private getColorSchemeGuidelines;
|
|
160
|
+
private getThemeInspiration;
|
|
161
|
+
private getBackgroundSuggestion;
|
|
162
|
+
private getPrimaryColor;
|
|
163
|
+
private getSecondaryColor;
|
|
164
|
+
private getAccentColor;
|
|
165
|
+
private getFileExtensions;
|
|
166
|
+
}
|
|
167
|
+
export default CSSArtGenerator;
|
|
168
|
+
//# sourceMappingURL=css-art-generator.d.ts.map
|