@houtini/lm 1.0.12 → 2.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.
Files changed (263) hide show
  1. package/README.md +5 -6
  2. package/dist/index.d.ts +5 -3
  3. package/dist/index.js +142 -213
  4. package/dist/index.js.map +1 -1
  5. package/package.json +10 -33
  6. package/CHANGELOG.md +0 -282
  7. package/dist/cache/analysis-cache.d.ts +0 -33
  8. package/dist/cache/analysis-cache.d.ts.map +0 -1
  9. package/dist/cache/analysis-cache.js +0 -56
  10. package/dist/cache/analysis-cache.js.map +0 -1
  11. package/dist/cache/cache-manager.d.ts +0 -29
  12. package/dist/cache/cache-manager.d.ts.map +0 -1
  13. package/dist/cache/cache-manager.js +0 -85
  14. package/dist/cache/cache-manager.js.map +0 -1
  15. package/dist/cache/index.d.ts +0 -16
  16. package/dist/cache/index.d.ts.map +0 -1
  17. package/dist/cache/index.js +0 -17
  18. package/dist/cache/index.js.map +0 -1
  19. package/dist/cache/prompt-cache.d.ts +0 -33
  20. package/dist/cache/prompt-cache.d.ts.map +0 -1
  21. package/dist/cache/prompt-cache.js +0 -61
  22. package/dist/cache/prompt-cache.js.map +0 -1
  23. package/dist/config.d.ts +0 -41
  24. package/dist/config.d.ts.map +0 -1
  25. package/dist/config.js +0 -71
  26. package/dist/config.js.map +0 -1
  27. package/dist/core/ThreeStagePromptManager.d.ts +0 -23
  28. package/dist/core/ThreeStagePromptManager.d.ts.map +0 -1
  29. package/dist/core/ThreeStagePromptManager.js +0 -118
  30. package/dist/core/ThreeStagePromptManager.js.map +0 -1
  31. package/dist/index.d.ts.map +0 -1
  32. package/dist/plugins/base-plugin.d.ts +0 -55
  33. package/dist/plugins/base-plugin.d.ts.map +0 -1
  34. package/dist/plugins/base-plugin.js +0 -120
  35. package/dist/plugins/base-plugin.js.map +0 -1
  36. package/dist/plugins/index.d.ts +0 -58
  37. package/dist/plugins/index.d.ts.map +0 -1
  38. package/dist/plugins/index.js +0 -162
  39. package/dist/plugins/index.js.map +0 -1
  40. package/dist/plugins/types.d.ts +0 -5
  41. package/dist/plugins/types.d.ts.map +0 -1
  42. package/dist/plugins/types.js +0 -5
  43. package/dist/plugins/types.js.map +0 -1
  44. package/dist/prompts/analyze/code-quality.d.ts +0 -116
  45. package/dist/prompts/analyze/code-quality.d.ts.map +0 -1
  46. package/dist/prompts/analyze/code-quality.js +0 -437
  47. package/dist/prompts/analyze/code-quality.js.map +0 -1
  48. package/dist/prompts/analyze/compare-integration.d.ts +0 -130
  49. package/dist/prompts/analyze/compare-integration.d.ts.map +0 -1
  50. package/dist/prompts/analyze/compare-integration.js +0 -547
  51. package/dist/prompts/analyze/compare-integration.js.map +0 -1
  52. package/dist/prompts/analyze/count-files.d.ts +0 -109
  53. package/dist/prompts/analyze/count-files.d.ts.map +0 -1
  54. package/dist/prompts/analyze/count-files.js +0 -403
  55. package/dist/prompts/analyze/count-files.js.map +0 -1
  56. package/dist/prompts/analyze/database-queries.d.ts +0 -156
  57. package/dist/prompts/analyze/database-queries.d.ts.map +0 -1
  58. package/dist/prompts/analyze/database-queries.js +0 -763
  59. package/dist/prompts/analyze/database-queries.js.map +0 -1
  60. package/dist/prompts/analyze/dependencies.d.ts +0 -97
  61. package/dist/prompts/analyze/dependencies.d.ts.map +0 -1
  62. package/dist/prompts/analyze/dependencies.js +0 -337
  63. package/dist/prompts/analyze/dependencies.js.map +0 -1
  64. package/dist/prompts/analyze/diff-signatures.d.ts +0 -139
  65. package/dist/prompts/analyze/diff-signatures.d.ts.map +0 -1
  66. package/dist/prompts/analyze/diff-signatures.js +0 -708
  67. package/dist/prompts/analyze/diff-signatures.js.map +0 -1
  68. package/dist/prompts/analyze/find-patterns.d.ts +0 -128
  69. package/dist/prompts/analyze/find-patterns.d.ts.map +0 -1
  70. package/dist/prompts/analyze/find-patterns.js +0 -524
  71. package/dist/prompts/analyze/find-patterns.js.map +0 -1
  72. package/dist/prompts/analyze/find-unused-css.d.ts +0 -151
  73. package/dist/prompts/analyze/find-unused-css.d.ts.map +0 -1
  74. package/dist/prompts/analyze/find-unused-css.js +0 -760
  75. package/dist/prompts/analyze/find-unused-css.js.map +0 -1
  76. package/dist/prompts/analyze/n8n-workflow.d.ts +0 -137
  77. package/dist/prompts/analyze/n8n-workflow.d.ts.map +0 -1
  78. package/dist/prompts/analyze/n8n-workflow.js +0 -533
  79. package/dist/prompts/analyze/n8n-workflow.js.map +0 -1
  80. package/dist/prompts/analyze/project-structure.d.ts +0 -126
  81. package/dist/prompts/analyze/project-structure.d.ts.map +0 -1
  82. package/dist/prompts/analyze/project-structure.js +0 -573
  83. package/dist/prompts/analyze/project-structure.js.map +0 -1
  84. package/dist/prompts/analyze/security-audit.d.ts +0 -142
  85. package/dist/prompts/analyze/security-audit.d.ts.map +0 -1
  86. package/dist/prompts/analyze/security-audit.js +0 -641
  87. package/dist/prompts/analyze/security-audit.js.map +0 -1
  88. package/dist/prompts/analyze/single-file.d.ts +0 -162
  89. package/dist/prompts/analyze/single-file.d.ts.map +0 -1
  90. package/dist/prompts/analyze/single-file.js +0 -669
  91. package/dist/prompts/analyze/single-file.js.map +0 -1
  92. package/dist/prompts/analyze/trace-execution.d.ts +0 -126
  93. package/dist/prompts/analyze/trace-execution.d.ts.map +0 -1
  94. package/dist/prompts/analyze/trace-execution.js +0 -613
  95. package/dist/prompts/analyze/trace-execution.js.map +0 -1
  96. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts +0 -116
  97. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts.map +0 -1
  98. package/dist/prompts/analyze/wordpress-plugin-audit.js +0 -456
  99. package/dist/prompts/analyze/wordpress-plugin-audit.js.map +0 -1
  100. package/dist/prompts/analyze/wordpress-plugin-readiness.d.ts +0 -103
  101. package/dist/prompts/analyze/wordpress-plugin-readiness.d.ts.map +0 -1
  102. package/dist/prompts/analyze/wordpress-plugin-readiness.js +0 -506
  103. package/dist/prompts/analyze/wordpress-plugin-readiness.js.map +0 -1
  104. package/dist/prompts/analyze/wordpress-security.d.ts +0 -146
  105. package/dist/prompts/analyze/wordpress-security.d.ts.map +0 -1
  106. package/dist/prompts/analyze/wordpress-security.js +0 -702
  107. package/dist/prompts/analyze/wordpress-security.js.map +0 -1
  108. package/dist/prompts/analyze/wordpress-theme-audit.d.ts +0 -114
  109. package/dist/prompts/analyze/wordpress-theme-audit.d.ts.map +0 -1
  110. package/dist/prompts/analyze/wordpress-theme-audit.js +0 -540
  111. package/dist/prompts/analyze/wordpress-theme-audit.js.map +0 -1
  112. package/dist/prompts/custom/custom-prompt.d.ts +0 -135
  113. package/dist/prompts/custom/custom-prompt.d.ts.map +0 -1
  114. package/dist/prompts/custom/custom-prompt.js +0 -421
  115. package/dist/prompts/custom/custom-prompt.js.map +0 -1
  116. package/dist/prompts/fun/arcade-game.d.ts +0 -152
  117. package/dist/prompts/fun/arcade-game.d.ts.map +0 -1
  118. package/dist/prompts/fun/arcade-game.js +0 -657
  119. package/dist/prompts/fun/arcade-game.js.map +0 -1
  120. package/dist/prompts/fun/create_text_adventure.d.ts +0 -100
  121. package/dist/prompts/fun/create_text_adventure.d.ts.map +0 -1
  122. package/dist/prompts/fun/create_text_adventure.js +0 -401
  123. package/dist/prompts/fun/create_text_adventure.js.map +0 -1
  124. package/dist/prompts/fun/css-art-generator.d.ts +0 -168
  125. package/dist/prompts/fun/css-art-generator.d.ts.map +0 -1
  126. package/dist/prompts/fun/css-art-generator.js +0 -831
  127. package/dist/prompts/fun/css-art-generator.js.map +0 -1
  128. package/dist/prompts/generate/project-documentation.d.ts +0 -137
  129. package/dist/prompts/generate/project-documentation.d.ts.map +0 -1
  130. package/dist/prompts/generate/project-documentation.js +0 -670
  131. package/dist/prompts/generate/project-documentation.js.map +0 -1
  132. package/dist/prompts/generate/refactoring.d.ts +0 -164
  133. package/dist/prompts/generate/refactoring.d.ts.map +0 -1
  134. package/dist/prompts/generate/refactoring.js +0 -625
  135. package/dist/prompts/generate/refactoring.js.map +0 -1
  136. package/dist/prompts/generate/responsive-component.d.ts +0 -147
  137. package/dist/prompts/generate/responsive-component.d.ts.map +0 -1
  138. package/dist/prompts/generate/responsive-component.js +0 -957
  139. package/dist/prompts/generate/responsive-component.js.map +0 -1
  140. package/dist/prompts/generate/typescript-conversion.d.ts +0 -144
  141. package/dist/prompts/generate/typescript-conversion.d.ts.map +0 -1
  142. package/dist/prompts/generate/typescript-conversion.js +0 -531
  143. package/dist/prompts/generate/typescript-conversion.js.map +0 -1
  144. package/dist/prompts/generate/unit-tests.d.ts +0 -139
  145. package/dist/prompts/generate/unit-tests.d.ts.map +0 -1
  146. package/dist/prompts/generate/unit-tests.js +0 -582
  147. package/dist/prompts/generate/unit-tests.js.map +0 -1
  148. package/dist/prompts/generate/wordpress-plugin.d.ts +0 -179
  149. package/dist/prompts/generate/wordpress-plugin.d.ts.map +0 -1
  150. package/dist/prompts/generate/wordpress-plugin.js +0 -767
  151. package/dist/prompts/generate/wordpress-plugin.js.map +0 -1
  152. package/dist/prompts/generate/wordpress-theme-from-static.d.ts +0 -177
  153. package/dist/prompts/generate/wordpress-theme-from-static.d.ts.map +0 -1
  154. package/dist/prompts/generate/wordpress-theme-from-static.js +0 -699
  155. package/dist/prompts/generate/wordpress-theme-from-static.js.map +0 -1
  156. package/dist/prompts/shared/cache-manager.d.ts +0 -45
  157. package/dist/prompts/shared/cache-manager.d.ts.map +0 -1
  158. package/dist/prompts/shared/cache-manager.js +0 -129
  159. package/dist/prompts/shared/cache-manager.js.map +0 -1
  160. package/dist/prompts/shared/helpers.d.ts +0 -39
  161. package/dist/prompts/shared/helpers.d.ts.map +0 -1
  162. package/dist/prompts/shared/helpers.js +0 -151
  163. package/dist/prompts/shared/helpers.js.map +0 -1
  164. package/dist/prompts/shared/templates.d.ts +0 -35
  165. package/dist/prompts/shared/templates.d.ts.map +0 -1
  166. package/dist/prompts/shared/templates.js +0 -77
  167. package/dist/prompts/shared/templates.js.map +0 -1
  168. package/dist/prompts/shared/types.d.ts +0 -112
  169. package/dist/prompts/shared/types.d.ts.map +0 -1
  170. package/dist/prompts/shared/types.js +0 -5
  171. package/dist/prompts/shared/types.js.map +0 -1
  172. package/dist/prompts/system/find-unused-files.d.ts +0 -106
  173. package/dist/prompts/system/find-unused-files.d.ts.map +0 -1
  174. package/dist/prompts/system/find-unused-files.js +0 -357
  175. package/dist/prompts/system/find-unused-files.js.map +0 -1
  176. package/dist/security/index.d.ts +0 -39
  177. package/dist/security/index.d.ts.map +0 -1
  178. package/dist/security/index.js +0 -46
  179. package/dist/security/index.js.map +0 -1
  180. package/dist/security/integration-helpers.d.ts +0 -121
  181. package/dist/security/integration-helpers.d.ts.map +0 -1
  182. package/dist/security/integration-helpers.js +0 -190
  183. package/dist/security/integration-helpers.js.map +0 -1
  184. package/dist/security/output-encoder.d.ts +0 -94
  185. package/dist/security/output-encoder.d.ts.map +0 -1
  186. package/dist/security/output-encoder.js +0 -295
  187. package/dist/security/output-encoder.js.map +0 -1
  188. package/dist/security/prompt-injection-guard.d.ts +0 -59
  189. package/dist/security/prompt-injection-guard.d.ts.map +0 -1
  190. package/dist/security/prompt-injection-guard.js +0 -249
  191. package/dist/security/prompt-injection-guard.js.map +0 -1
  192. package/dist/security/sanitisation.d.ts +0 -67
  193. package/dist/security/sanitisation.d.ts.map +0 -1
  194. package/dist/security/sanitisation.js +0 -398
  195. package/dist/security/sanitisation.js.map +0 -1
  196. package/dist/security/security-service.d.ts +0 -103
  197. package/dist/security/security-service.d.ts.map +0 -1
  198. package/dist/security/security-service.js +0 -303
  199. package/dist/security/security-service.js.map +0 -1
  200. package/dist/security-config.d.ts +0 -45
  201. package/dist/security-config.d.ts.map +0 -1
  202. package/dist/security-config.js +0 -63
  203. package/dist/security-config.js.map +0 -1
  204. package/dist/system/function-list.d.ts +0 -61
  205. package/dist/system/function-list.d.ts.map +0 -1
  206. package/dist/system/function-list.js +0 -111
  207. package/dist/system/function-list.js.map +0 -1
  208. package/dist/system/function-registry.d.ts +0 -23
  209. package/dist/system/function-registry.d.ts.map +0 -1
  210. package/dist/system/function-registry.js +0 -136
  211. package/dist/system/function-registry.js.map +0 -1
  212. package/dist/system/health-check.d.ts +0 -33
  213. package/dist/system/health-check.d.ts.map +0 -1
  214. package/dist/system/health-check.js +0 -98
  215. package/dist/system/health-check.js.map +0 -1
  216. package/dist/system/path-resolver.d.ts +0 -55
  217. package/dist/system/path-resolver.d.ts.map +0 -1
  218. package/dist/system/path-resolver.js +0 -90
  219. package/dist/system/path-resolver.js.map +0 -1
  220. package/dist/templates/plugin-template.d.ts +0 -121
  221. package/dist/templates/plugin-template.d.ts.map +0 -1
  222. package/dist/templates/plugin-template.js +0 -454
  223. package/dist/templates/plugin-template.js.map +0 -1
  224. package/dist/types/chunking-types.d.ts +0 -88
  225. package/dist/types/chunking-types.d.ts.map +0 -1
  226. package/dist/types/chunking-types.js +0 -18
  227. package/dist/types/chunking-types.js.map +0 -1
  228. package/dist/types/prompt-stages.d.ts +0 -30
  229. package/dist/types/prompt-stages.d.ts.map +0 -1
  230. package/dist/types/prompt-stages.js +0 -6
  231. package/dist/types/prompt-stages.js.map +0 -1
  232. package/dist/types.d.ts +0 -45
  233. package/dist/types.d.ts.map +0 -1
  234. package/dist/types.js +0 -6
  235. package/dist/types.js.map +0 -1
  236. package/dist/utils/css-parser.d.ts +0 -26
  237. package/dist/utils/css-parser.d.ts.map +0 -1
  238. package/dist/utils/css-parser.js +0 -117
  239. package/dist/utils/css-parser.js.map +0 -1
  240. package/dist/utils/path-resolver.d.ts +0 -13
  241. package/dist/utils/path-resolver.d.ts.map +0 -1
  242. package/dist/utils/path-resolver.js +0 -78
  243. package/dist/utils/path-resolver.js.map +0 -1
  244. package/dist/utils/plugin-utilities.d.ts +0 -176
  245. package/dist/utils/plugin-utilities.d.ts.map +0 -1
  246. package/dist/utils/plugin-utilities.js +0 -269
  247. package/dist/utils/plugin-utilities.js.map +0 -1
  248. package/dist/utils/streamHandler.d.ts +0 -3
  249. package/dist/utils/streamHandler.d.ts.map +0 -1
  250. package/dist/utils/streamHandler.js +0 -137
  251. package/dist/utils/streamHandler.js.map +0 -1
  252. package/dist/validation/output-validator.d.ts +0 -136
  253. package/dist/validation/output-validator.d.ts.map +0 -1
  254. package/dist/validation/output-validator.js +0 -262
  255. package/dist/validation/output-validator.js.map +0 -1
  256. package/dist/validation/response-factory.d.ts +0 -44
  257. package/dist/validation/response-factory.d.ts.map +0 -1
  258. package/dist/validation/response-factory.js +0 -202
  259. package/dist/validation/response-factory.js.map +0 -1
  260. package/dist/validation/schemas.d.ts +0 -519
  261. package/dist/validation/schemas.d.ts.map +0 -1
  262. package/dist/validation/schemas.js +0 -6
  263. package/dist/validation/schemas.js.map +0 -1
@@ -1,540 +0,0 @@
1
- /**
2
- * WordPress Theme Comprehensive Auditor - Modern v4.3
3
- *
4
- * Chains multiple analysis steps for comprehensive WordPress theme audit
5
- * Covers theme-specific security, performance, accessibility, and code quality
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 { ModelSetup, ResponseProcessor, ParameterValidator, ErrorHandler, MultiFileAnalysis, TokenCalculator } from '../../utils/plugin-utilities.js';
11
- import { getAnalysisCache } from '../../cache/index.js';
12
- export class WordPressThemeAuditor extends BasePlugin {
13
- constructor() {
14
- super();
15
- this.name = 'audit_wordpress_theme';
16
- this.category = 'analyze';
17
- this.description = 'Comprehensive WordPress theme audit - chains multiple analysis steps for security, performance, accessibility, SEO, and code quality';
18
- this.parameters = {
19
- // Multi-file parameters (primary mode for theme audit)
20
- projectPath: {
21
- type: 'string',
22
- description: 'Path to WordPress theme root directory',
23
- required: true
24
- },
25
- // Analysis configuration
26
- auditDepth: {
27
- type: 'string',
28
- description: 'Depth of audit analysis',
29
- enum: ['basic', 'detailed', 'comprehensive'],
30
- default: 'comprehensive',
31
- required: false
32
- },
33
- auditType: {
34
- type: 'string',
35
- description: 'Type of audit focus',
36
- enum: ['security', 'performance', 'accessibility', 'seo', 'quality', 'full-audit'],
37
- default: 'full-audit',
38
- required: false
39
- },
40
- // Theme-specific analysis steps
41
- includeSteps: {
42
- type: 'array',
43
- description: 'Analysis steps to include in theme audit',
44
- required: false,
45
- items: { type: 'string' },
46
- default: ['structure', 'security', 'performance', 'accessibility', 'quality', 'seo']
47
- },
48
- maxDepth: {
49
- type: 'number',
50
- description: 'Maximum directory depth for analysis (1-5)',
51
- required: false,
52
- default: 4
53
- },
54
- // WordPress-specific context
55
- wpVersion: {
56
- type: 'string',
57
- description: 'Target WordPress version for compatibility checks',
58
- required: false,
59
- default: '6.4'
60
- },
61
- phpVersion: {
62
- type: 'string',
63
- description: 'Target PHP version for compatibility checks',
64
- required: false,
65
- default: '8.0'
66
- },
67
- // Theme-specific options
68
- themeType: {
69
- type: 'string',
70
- description: 'Type of WordPress theme',
71
- enum: ['classic', 'block', 'hybrid'],
72
- default: 'classic',
73
- required: false
74
- },
75
- checkAccessibility: {
76
- type: 'boolean',
77
- description: 'Include detailed accessibility audit',
78
- default: true,
79
- required: false
80
- }
81
- };
82
- this.analysisCache = getAnalysisCache();
83
- this.multiFileAnalysis = new MultiFileAnalysis();
84
- }
85
- async execute(params, llmClient) {
86
- return await withSecurity(this, params, llmClient, async (secureParams) => {
87
- try {
88
- // 1. Validate WordPress theme structure
89
- this.validateWordPressTheme(secureParams);
90
- // 2. Setup model
91
- const { model, contextLength } = await ModelSetup.getReadyModel(llmClient);
92
- // 3. Execute chained theme analysis workflow
93
- return await this.executeChainedThemeAnalysis(secureParams, llmClient, model, contextLength);
94
- }
95
- catch (error) {
96
- return ErrorHandler.createExecutionError('audit_wordpress_theme', error);
97
- }
98
- });
99
- }
100
- /**
101
- * Validate WordPress theme structure
102
- */
103
- validateWordPressTheme(params) {
104
- ParameterValidator.validateProjectPath(params);
105
- ParameterValidator.validateDepth(params);
106
- ParameterValidator.validateEnum(params, 'auditType', ['security', 'performance', 'accessibility', 'seo', 'quality', 'full-audit']);
107
- ParameterValidator.validateEnum(params, 'auditDepth', ['basic', 'detailed', 'comprehensive']);
108
- ParameterValidator.validateEnum(params, 'themeType', ['classic', 'block', 'hybrid']);
109
- }
110
- /**
111
- * Execute the chained theme analysis workflow
112
- */
113
- async executeChainedThemeAnalysis(params, llmClient, model, contextLength) {
114
- const auditSteps = params.includeSteps || ['structure', 'security', 'performance', 'accessibility', 'quality', 'seo'];
115
- const results = {};
116
- const stepExecutionLog = [];
117
- try {
118
- stepExecutionLog.push(`Starting WordPress theme audit with ${auditSteps.length} steps`);
119
- stepExecutionLog.push(`Theme type: ${params.themeType || 'classic'}`);
120
- // Step 1: Theme Structure Overview
121
- if (auditSteps.includes('structure')) {
122
- stepExecutionLog.push('Executing: Theme structure analysis');
123
- results.structure = await this.runAnalysisStep('count_files', {
124
- projectPath: params.projectPath,
125
- analysisType: 'comprehensive',
126
- maxDepth: params.maxDepth
127
- }, llmClient);
128
- stepExecutionLog.push(`Structure analysis: ${results.structure.success ? 'SUCCESS' : 'FAILED'}`);
129
- }
130
- // Step 2: WordPress Theme Security Audit
131
- if (auditSteps.includes('security')) {
132
- stepExecutionLog.push('Executing: WordPress theme security analysis');
133
- results.security = await this.runAnalysisStep('analyze_wordpress_security', {
134
- projectPath: params.projectPath,
135
- wpType: 'theme',
136
- wpVersion: params.wpVersion,
137
- analysisType: 'comprehensive',
138
- includeOwaspTop10: true
139
- }, llmClient);
140
- stepExecutionLog.push(`Security analysis: ${results.security.success ? 'SUCCESS' : 'FAILED'}`);
141
- }
142
- // Step 3: Performance Analysis (theme-specific)
143
- if (auditSteps.includes('performance')) {
144
- stepExecutionLog.push('Executing: Theme performance analysis');
145
- results.performance = await this.runAnalysisStep('analyze_code_quality', {
146
- projectPath: params.projectPath,
147
- analysisType: 'performance',
148
- language: 'php',
149
- context: {
150
- projectType: 'wordpress-theme',
151
- themeType: params.themeType,
152
- focusAreas: ['performance', 'optimization']
153
- }
154
- }, llmClient);
155
- stepExecutionLog.push(`Performance analysis: ${results.performance.success ? 'SUCCESS' : 'FAILED'}`);
156
- }
157
- // Step 4: Accessibility Audit
158
- if (auditSteps.includes('accessibility') && params.checkAccessibility) {
159
- stepExecutionLog.push('Executing: Accessibility analysis');
160
- results.accessibility = await this.runAnalysisStep('analyze_single_file', {
161
- projectPath: params.projectPath,
162
- analysisType: 'comprehensive',
163
- context: {
164
- projectType: 'wordpress-theme',
165
- focusAreas: ['accessibility', 'wcag', 'semantic-html'],
166
- standards: ['WCAG 2.1 AA', 'Section 508']
167
- }
168
- }, llmClient);
169
- stepExecutionLog.push(`Accessibility analysis: ${results.accessibility.success ? 'SUCCESS' : 'FAILED'}`);
170
- }
171
- // Step 5: Code Quality Assessment
172
- if (auditSteps.includes('quality')) {
173
- stepExecutionLog.push('Executing: Code quality analysis');
174
- results.quality = await this.runAnalysisStep('analyze_code_quality', {
175
- projectPath: params.projectPath,
176
- analysisType: 'comprehensive',
177
- language: 'php',
178
- context: { projectType: 'wordpress-theme' }
179
- }, llmClient);
180
- stepExecutionLog.push(`Quality analysis: ${results.quality.success ? 'SUCCESS' : 'FAILED'}`);
181
- }
182
- // Step 6: SEO Analysis
183
- if (auditSteps.includes('seo')) {
184
- stepExecutionLog.push('Executing: SEO structure analysis');
185
- results.seo = await this.runAnalysisStep('analyze_single_file', {
186
- projectPath: params.projectPath,
187
- analysisType: 'comprehensive',
188
- context: {
189
- projectType: 'wordpress-theme',
190
- focusAreas: ['seo', 'structured-data', 'meta-tags', 'performance']
191
- }
192
- }, llmClient);
193
- stepExecutionLog.push(`SEO analysis: ${results.seo.success ? 'SUCCESS' : 'FAILED'}`);
194
- }
195
- // Step 7: Database Query Analysis (if applicable)
196
- if (auditSteps.includes('database')) {
197
- stepExecutionLog.push('Executing: Database query analysis');
198
- results.database = await this.runAnalysisStep('analyze_database_queries', {
199
- projectPath: params.projectPath,
200
- analysisType: 'comprehensive',
201
- context: { projectType: 'wordpress-theme' }
202
- }, llmClient);
203
- stepExecutionLog.push(`Database analysis: ${results.database.success ? 'SUCCESS' : 'FAILED'}`);
204
- }
205
- // Step 8: Synthesize all results
206
- stepExecutionLog.push('Synthesizing comprehensive theme audit report');
207
- const synthesizedResults = await this.synthesizeThemeAuditResults({
208
- ...results,
209
- executionLog: stepExecutionLog,
210
- completedSteps: auditSteps.filter(step => results[step]?.success),
211
- failedSteps: auditSteps.filter(step => results[step]?.success === false)
212
- }, params, model, contextLength);
213
- stepExecutionLog.push('Theme audit synthesis: COMPLETED');
214
- return synthesizedResults;
215
- }
216
- catch (error) {
217
- stepExecutionLog.push(`Theme audit failed: ${error.message}`);
218
- return ErrorHandler.createExecutionError('audit_wordpress_theme', error);
219
- }
220
- }
221
- /**
222
- * Run individual analysis step by calling other MCP functions
223
- */
224
- async runAnalysisStep(functionName, stepParams, llmClient) {
225
- try {
226
- // Check cache first
227
- const cacheKey = this.analysisCache.generateKey(functionName, stepParams, []);
228
- const cached = await this.analysisCache.get(cacheKey);
229
- if (cached)
230
- return cached;
231
- // Import the plugin loader to call other MCP functions
232
- const { PluginRegistry } = await import('../../plugins/index.js');
233
- const pluginLoader = PluginRegistry.getInstance();
234
- // Execute the specific analysis function
235
- let result;
236
- try {
237
- result = await pluginLoader.executePlugin(functionName, stepParams, llmClient);
238
- // Wrap successful results
239
- const wrappedResult = {
240
- stepName: functionName,
241
- parameters: stepParams,
242
- status: 'completed',
243
- timestamp: new Date().toISOString(),
244
- data: result.data || result,
245
- summary: `Completed ${functionName} analysis`,
246
- success: true
247
- };
248
- // Cache the result
249
- await this.analysisCache.cacheAnalysis(cacheKey, wrappedResult, {
250
- modelUsed: result.modelUsed || 'unknown',
251
- executionTime: result.executionTimeMs || 0,
252
- timestamp: new Date().toISOString()
253
- });
254
- return wrappedResult;
255
- }
256
- catch (pluginError) {
257
- // If the plugin doesn't exist or fails, return error result
258
- const errorResult = {
259
- stepName: functionName,
260
- status: 'failed',
261
- error: pluginError.message,
262
- timestamp: new Date().toISOString(),
263
- summary: `Failed ${functionName} analysis`,
264
- success: false
265
- };
266
- return errorResult;
267
- }
268
- }
269
- catch (error) {
270
- return {
271
- stepName: functionName,
272
- status: 'system-error',
273
- error: error.message,
274
- timestamp: new Date().toISOString(),
275
- summary: 'System error during analysis',
276
- success: false
277
- };
278
- }
279
- }
280
- /**
281
- * Synthesize all theme audit results into comprehensive report
282
- */
283
- async synthesizeThemeAuditResults(results, params, model, contextLength) {
284
- // Generate final synthesis prompt stages
285
- const promptStages = this.getMultiFilePromptStages({
286
- ...params,
287
- analysisResult: results,
288
- stepCount: Object.keys(results).length
289
- });
290
- // Always use chunking for comprehensive synthesis
291
- const promptManager = new ThreeStagePromptManager();
292
- const chunkSize = TokenCalculator.calculateOptimalChunkSize(promptStages, contextLength);
293
- const dataChunks = promptManager.chunkDataPayload(promptStages.dataPayload, chunkSize);
294
- const conversation = promptManager.createChunkedConversation(promptStages, dataChunks);
295
- const messages = [
296
- conversation.systemMessage,
297
- ...conversation.dataMessages,
298
- conversation.analysisMessage
299
- ];
300
- return await ResponseProcessor.executeChunked(messages, model, contextLength, 'audit_wordpress_theme', 'multifile');
301
- }
302
- /**
303
- * Single-file mode not applicable for theme audit
304
- */
305
- getSingleFilePromptStages(params) {
306
- const systemAndContext = `WordPress Theme Auditor - Single File Mode
307
-
308
- This mode is not recommended for WordPress theme audits.
309
- Use multi-file mode with projectPath parameter for comprehensive theme analysis.`;
310
- const dataPayload = `Single file analysis not supported for WordPress theme audits.
311
- Please use projectPath parameter to analyze the entire theme structure.`;
312
- const outputInstructions = `{
313
- "error": "Single file mode not supported for WordPress theme audits",
314
- "recommendation": "Use projectPath parameter for comprehensive theme analysis"
315
- }`;
316
- return { systemAndContext, dataPayload, outputInstructions };
317
- }
318
- /**
319
- * Multi-file prompt stages for comprehensive theme audit synthesis
320
- */
321
- getMultiFilePromptStages(params) {
322
- const { analysisResult, auditType, auditDepth, wpVersion, phpVersion, themeType, stepCount } = params;
323
- const systemAndContext = `You are a senior WordPress theme developer and security expert with 15+ years of experience auditing enterprise WordPress themes for performance, accessibility, and security.
324
-
325
- **THEME AUDIT CONTEXT:**
326
- - Audit Type: ${auditType}
327
- - Audit Depth: ${auditDepth}
328
- - Analysis Steps Completed: ${stepCount}
329
- - Theme Type: ${themeType}
330
- - Target WordPress Version: ${wpVersion}
331
- - Target PHP Version: ${phpVersion}
332
-
333
- **YOUR EXPERTISE:**
334
- You are internationally recognized for:
335
- - WordPress theme security auditing and vulnerability assessment
336
- - Frontend performance optimization for WordPress themes
337
- - Accessibility compliance (WCAG 2.1 AA, Section 508)
338
- - SEO optimization and Core Web Vitals improvement
339
- - Theme architecture and template hierarchy mastery
340
- - WordPress.org theme repository review standards
341
-
342
- **THEME-SPECIFIC AUDIT METHODOLOGY:**
343
- 1. **Security Assessment**: Template injection, XSS, CSRF, data sanitization
344
- 2. **Performance Analysis**: Asset loading, image optimization, caching strategies
345
- 3. **Accessibility Review**: ARIA labels, keyboard navigation, screen reader support
346
- 4. **SEO Optimization**: Structured data, meta tags, page speed, mobile responsiveness
347
- 5. **Code Quality**: WordPress Coding Standards, template hierarchy compliance
348
- 6. **Architecture Review**: Child theme compatibility, customizer integration
349
-
350
- **CRITICAL THEME FOCUS AREAS:**
351
- - Template security: Proper escaping and sanitization in templates
352
- - Asset optimization: CSS/JS minification, critical path optimization
353
- - Accessibility compliance: Color contrast, focus management, semantic HTML
354
- - SEO implementation: Schema markup, Open Graph, Twitter Cards
355
- - Performance bottlenecks: Render-blocking resources, unused CSS
356
- - WordPress integration: Proper enqueueing, theme supports, customizer
357
- - Cross-browser compatibility and responsive design
358
- - Template hierarchy compliance and hook usage`;
359
- const dataPayload = `**COMPREHENSIVE THEME AUDIT RESULTS:**
360
-
361
- ${JSON.stringify(analysisResult, null, 2)}`;
362
- const outputInstructions = `**PROVIDE COMPREHENSIVE WORDPRESS THEME AUDIT REPORT:**
363
-
364
- {
365
- "executiveSummary": {
366
- "overallRating": "critical|high-risk|medium-risk|low-risk|excellent",
367
- "themeReadiness": "production-ready|needs-fixes|major-issues|not-ready",
368
- "primaryConcerns": ["concern1", "concern2", "concern3"],
369
- "strengths": ["strength1", "strength2"],
370
- "timeToFix": "immediate|1-2 days|1 week|2+ weeks",
371
- "wpOrgCompliance": "compliant|minor-issues|major-issues|non-compliant"
372
- },
373
-
374
- "securityAssessment": {
375
- "criticalVulnerabilities": [
376
- {
377
- "type": "XSS|CSRF|Template Injection|Data Exposure",
378
- "severity": "critical|high|medium|low",
379
- "location": "specific template and line",
380
- "description": "detailed vulnerability description",
381
- "exploit": "how this could be exploited in theme context",
382
- "fix": "specific theme security fix with code example"
383
- }
384
- ],
385
- "templateSecurity": {
386
- "escaping": "proper|inconsistent|missing",
387
- "sanitization": "proper|inconsistent|missing",
388
- "authorization": "proper|inconsistent|missing"
389
- },
390
- "securityScore": "A|B|C|D|F"
391
- },
392
-
393
- "performanceAssessment": {
394
- "coreWebVitals": {
395
- "lcp": "good|needs-improvement|poor",
396
- "fid": "good|needs-improvement|poor",
397
- "cls": "good|needs-improvement|poor"
398
- },
399
- "assetOptimization": {
400
- "css": "optimized|needs-optimization|poor",
401
- "javascript": "optimized|needs-optimization|poor",
402
- "images": "optimized|needs-optimization|poor"
403
- },
404
- "performanceIssues": [
405
- {
406
- "type": "Render Blocking|Unused CSS|Large Images|Slow Queries",
407
- "severity": "critical|high|medium|low",
408
- "location": "specific file or template",
409
- "impact": "performance impact description",
410
- "optimization": "specific optimization recommendation"
411
- }
412
- ],
413
- "performanceScore": "A|B|C|D|F"
414
- },
415
-
416
- "accessibilityAssessment": {
417
- "wcagCompliance": {
418
- "level": "AA|A|Non-compliant",
419
- "score": "A|B|C|D|F"
420
- },
421
- "accessibilityIssues": [
422
- {
423
- "type": "Color Contrast|Keyboard Navigation|Screen Reader|ARIA|Focus Management",
424
- "severity": "critical|high|medium|low",
425
- "location": "specific template or component",
426
- "wcagCriterion": "1.4.3|2.1.1|4.1.2|etc",
427
- "fix": "specific accessibility fix with code example"
428
- }
429
- ],
430
- "keyboardNavigation": "full|partial|broken",
431
- "screenReaderSupport": "excellent|good|poor"
432
- },
433
-
434
- "seoAssessment": {
435
- "technicalSeo": {
436
- "structuredData": "implemented|partial|missing",
437
- "metaTags": "complete|incomplete|missing",
438
- "performance": "fast|average|slow"
439
- },
440
- "seoIssues": [
441
- {
442
- "type": "Missing Meta|No Structured Data|Slow Loading|Poor Mobile",
443
- "severity": "high|medium|low",
444
- "impact": "SEO impact description",
445
- "recommendation": "specific SEO improvement"
446
- }
447
- ],
448
- "seoScore": "A|B|C|D|F"
449
- },
450
-
451
- "codeQualityAssessment": {
452
- "wordpressStandards": {
453
- "phpCompliance": "high|medium|low",
454
- "cssCompliance": "high|medium|low",
455
- "jsCompliance": "high|medium|low"
456
- },
457
- "themeStructure": {
458
- "templateHierarchy": "proper|issues|broken",
459
- "childThemeSupport": "excellent|good|poor",
460
- "customizerIntegration": "complete|partial|missing"
461
- },
462
- "qualityScore": "A|B|C|D|F"
463
- },
464
-
465
- "actionPlan": {
466
- "immediate": [
467
- {
468
- "priority": 1,
469
- "task": "fix critical security vulnerability",
470
- "category": "security|performance|accessibility|seo|quality",
471
- "estimatedTime": "2 hours",
472
- "risk": "critical|high|medium|low"
473
- }
474
- ],
475
- "shortTerm": [
476
- {
477
- "priority": 2,
478
- "task": "optimize Core Web Vitals",
479
- "category": "performance",
480
- "estimatedTime": "4 hours",
481
- "risk": "medium"
482
- }
483
- ],
484
- "longTerm": [
485
- {
486
- "priority": 3,
487
- "task": "improve accessibility compliance",
488
- "category": "accessibility",
489
- "estimatedTime": "2 days",
490
- "risk": "low"
491
- }
492
- ]
493
- },
494
-
495
- "complianceReport": {
496
- "wordpressOrgReady": true,
497
- "accessibilityCompliant": true,
498
- "performanceOptimized": false,
499
- "issuesBlocking": ["issue1", "issue2"],
500
- "recommendationsForSubmission": ["recommendation1", "recommendation2"]
501
- }
502
- }
503
-
504
- **REQUIREMENTS:**
505
- - Provide specific template file names and line numbers for all issues
506
- - Include code examples for theme-specific fixes where applicable
507
- - Prioritize findings by user impact and compliance requirements
508
- - Focus on WordPress theme-specific best practices and standards
509
- - Ensure all recommendations are testable and implementable
510
- - Consider theme type (classic vs block) in recommendations`;
511
- return { systemAndContext, dataPayload, outputInstructions };
512
- }
513
- /**
514
- * Backwards compatibility method
515
- */
516
- getPromptStages(params) {
517
- return this.getMultiFilePromptStages(params);
518
- }
519
- // Unused methods for theme audit workflow
520
- async discoverRelevantFiles(projectPath, maxDepth, analysisType) {
521
- const extensions = ['.php', '.css', '.js', '.json', '.xml', '.txt', '.md', '.scss', '.sass'];
522
- return await this.multiFileAnalysis.discoverFiles(projectPath, extensions, maxDepth);
523
- }
524
- async performMultiFileAnalysis(files, params, model, contextLength) {
525
- return {};
526
- }
527
- async analyzeIndividualFile(file, params, model) {
528
- return {};
529
- }
530
- getFileExtensions(analysisType) {
531
- return ['.php', '.css', '.js', '.json', '.xml', '.txt', '.md', '.scss', '.sass'];
532
- }
533
- generateCacheKey(files, params) {
534
- const fileHash = files.join('|');
535
- const paramHash = JSON.stringify(params);
536
- return `${fileHash}_${paramHash}`.substring(0, 64);
537
- }
538
- }
539
- export default WordPressThemeAuditor;
540
- //# sourceMappingURL=wordpress-theme-audit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wordpress-theme-audit.js","sourceRoot":"","sources":["../../../src/prompts/analyze/wordpress-theme-audit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMxD,MAAM,OAAO,qBAAsB,SAAQ,UAAU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