@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.
Files changed (260) hide show
  1. package/CHANGELOG.md +273 -0
  2. package/LICENSE +21 -0
  3. package/README.md +203 -0
  4. package/dist/cache/analysis-cache.d.ts +33 -0
  5. package/dist/cache/analysis-cache.d.ts.map +1 -0
  6. package/dist/cache/analysis-cache.js +56 -0
  7. package/dist/cache/analysis-cache.js.map +1 -0
  8. package/dist/cache/cache-manager.d.ts +29 -0
  9. package/dist/cache/cache-manager.d.ts.map +1 -0
  10. package/dist/cache/cache-manager.js +85 -0
  11. package/dist/cache/cache-manager.js.map +1 -0
  12. package/dist/cache/index.d.ts +16 -0
  13. package/dist/cache/index.d.ts.map +1 -0
  14. package/dist/cache/index.js +17 -0
  15. package/dist/cache/index.js.map +1 -0
  16. package/dist/cache/prompt-cache.d.ts +33 -0
  17. package/dist/cache/prompt-cache.d.ts.map +1 -0
  18. package/dist/cache/prompt-cache.js +61 -0
  19. package/dist/cache/prompt-cache.js.map +1 -0
  20. package/dist/config.d.ts +43 -0
  21. package/dist/config.d.ts.map +1 -0
  22. package/dist/config.js +70 -0
  23. package/dist/config.js.map +1 -0
  24. package/dist/core/ThreeStagePromptManager.d.ts +39 -0
  25. package/dist/core/ThreeStagePromptManager.d.ts.map +1 -0
  26. package/dist/core/ThreeStagePromptManager.js +176 -0
  27. package/dist/core/ThreeStagePromptManager.js.map +1 -0
  28. package/dist/index.d.ts +6 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +230 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/plugins/base-plugin.d.ts +47 -0
  33. package/dist/plugins/base-plugin.d.ts.map +1 -0
  34. package/dist/plugins/base-plugin.js +90 -0
  35. package/dist/plugins/base-plugin.js.map +1 -0
  36. package/dist/plugins/index.d.ts +58 -0
  37. package/dist/plugins/index.d.ts.map +1 -0
  38. package/dist/plugins/index.js +161 -0
  39. package/dist/plugins/index.js.map +1 -0
  40. package/dist/plugins/types.d.ts +5 -0
  41. package/dist/plugins/types.d.ts.map +1 -0
  42. package/dist/plugins/types.js +5 -0
  43. package/dist/plugins/types.js.map +1 -0
  44. package/dist/prompts/analyze/code-quality.d.ts +116 -0
  45. package/dist/prompts/analyze/code-quality.d.ts.map +1 -0
  46. package/dist/prompts/analyze/code-quality.js +433 -0
  47. package/dist/prompts/analyze/code-quality.js.map +1 -0
  48. package/dist/prompts/analyze/compare-integration.d.ts +130 -0
  49. package/dist/prompts/analyze/compare-integration.d.ts.map +1 -0
  50. package/dist/prompts/analyze/compare-integration.js +543 -0
  51. package/dist/prompts/analyze/compare-integration.js.map +1 -0
  52. package/dist/prompts/analyze/count-files.d.ts +109 -0
  53. package/dist/prompts/analyze/count-files.d.ts.map +1 -0
  54. package/dist/prompts/analyze/count-files.js +399 -0
  55. package/dist/prompts/analyze/count-files.js.map +1 -0
  56. package/dist/prompts/analyze/database-queries.d.ts +156 -0
  57. package/dist/prompts/analyze/database-queries.d.ts.map +1 -0
  58. package/dist/prompts/analyze/database-queries.js +759 -0
  59. package/dist/prompts/analyze/database-queries.js.map +1 -0
  60. package/dist/prompts/analyze/dependencies.d.ts +97 -0
  61. package/dist/prompts/analyze/dependencies.d.ts.map +1 -0
  62. package/dist/prompts/analyze/dependencies.js +333 -0
  63. package/dist/prompts/analyze/dependencies.js.map +1 -0
  64. package/dist/prompts/analyze/diff-signatures.d.ts +139 -0
  65. package/dist/prompts/analyze/diff-signatures.d.ts.map +1 -0
  66. package/dist/prompts/analyze/diff-signatures.js +702 -0
  67. package/dist/prompts/analyze/diff-signatures.js.map +1 -0
  68. package/dist/prompts/analyze/find-patterns.d.ts +128 -0
  69. package/dist/prompts/analyze/find-patterns.d.ts.map +1 -0
  70. package/dist/prompts/analyze/find-patterns.js +520 -0
  71. package/dist/prompts/analyze/find-patterns.js.map +1 -0
  72. package/dist/prompts/analyze/find-unused-css.d.ts +151 -0
  73. package/dist/prompts/analyze/find-unused-css.d.ts.map +1 -0
  74. package/dist/prompts/analyze/find-unused-css.js +754 -0
  75. package/dist/prompts/analyze/find-unused-css.js.map +1 -0
  76. package/dist/prompts/analyze/n8n-workflow.d.ts +137 -0
  77. package/dist/prompts/analyze/n8n-workflow.d.ts.map +1 -0
  78. package/dist/prompts/analyze/n8n-workflow.js +529 -0
  79. package/dist/prompts/analyze/n8n-workflow.js.map +1 -0
  80. package/dist/prompts/analyze/project-structure.d.ts +126 -0
  81. package/dist/prompts/analyze/project-structure.d.ts.map +1 -0
  82. package/dist/prompts/analyze/project-structure.js +569 -0
  83. package/dist/prompts/analyze/project-structure.js.map +1 -0
  84. package/dist/prompts/analyze/security-audit.d.ts +142 -0
  85. package/dist/prompts/analyze/security-audit.d.ts.map +1 -0
  86. package/dist/prompts/analyze/security-audit.js +637 -0
  87. package/dist/prompts/analyze/security-audit.js.map +1 -0
  88. package/dist/prompts/analyze/single-file.d.ts +162 -0
  89. package/dist/prompts/analyze/single-file.d.ts.map +1 -0
  90. package/dist/prompts/analyze/single-file.js +665 -0
  91. package/dist/prompts/analyze/single-file.js.map +1 -0
  92. package/dist/prompts/analyze/trace-execution.d.ts +126 -0
  93. package/dist/prompts/analyze/trace-execution.d.ts.map +1 -0
  94. package/dist/prompts/analyze/trace-execution.js +609 -0
  95. package/dist/prompts/analyze/trace-execution.js.map +1 -0
  96. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts +116 -0
  97. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts.map +1 -0
  98. package/dist/prompts/analyze/wordpress-plugin-audit.js +454 -0
  99. package/dist/prompts/analyze/wordpress-plugin-audit.js.map +1 -0
  100. package/dist/prompts/analyze/wordpress-security.d.ts +146 -0
  101. package/dist/prompts/analyze/wordpress-security.d.ts.map +1 -0
  102. package/dist/prompts/analyze/wordpress-security.js +698 -0
  103. package/dist/prompts/analyze/wordpress-security.js.map +1 -0
  104. package/dist/prompts/analyze/wordpress-theme-audit.d.ts +114 -0
  105. package/dist/prompts/analyze/wordpress-theme-audit.d.ts.map +1 -0
  106. package/dist/prompts/analyze/wordpress-theme-audit.js +538 -0
  107. package/dist/prompts/analyze/wordpress-theme-audit.js.map +1 -0
  108. package/dist/prompts/custom/custom-prompt.d.ts +135 -0
  109. package/dist/prompts/custom/custom-prompt.d.ts.map +1 -0
  110. package/dist/prompts/custom/custom-prompt.js +419 -0
  111. package/dist/prompts/custom/custom-prompt.js.map +1 -0
  112. package/dist/prompts/fun/arcade-game.d.ts +152 -0
  113. package/dist/prompts/fun/arcade-game.d.ts.map +1 -0
  114. package/dist/prompts/fun/arcade-game.js +653 -0
  115. package/dist/prompts/fun/arcade-game.js.map +1 -0
  116. package/dist/prompts/fun/create_text_adventure.d.ts +100 -0
  117. package/dist/prompts/fun/create_text_adventure.d.ts.map +1 -0
  118. package/dist/prompts/fun/create_text_adventure.js +397 -0
  119. package/dist/prompts/fun/create_text_adventure.js.map +1 -0
  120. package/dist/prompts/fun/css-art-generator.d.ts +168 -0
  121. package/dist/prompts/fun/css-art-generator.d.ts.map +1 -0
  122. package/dist/prompts/fun/css-art-generator.js +827 -0
  123. package/dist/prompts/fun/css-art-generator.js.map +1 -0
  124. package/dist/prompts/generate/project-documentation.d.ts +137 -0
  125. package/dist/prompts/generate/project-documentation.d.ts.map +1 -0
  126. package/dist/prompts/generate/project-documentation.js +666 -0
  127. package/dist/prompts/generate/project-documentation.js.map +1 -0
  128. package/dist/prompts/generate/refactoring.d.ts +164 -0
  129. package/dist/prompts/generate/refactoring.d.ts.map +1 -0
  130. package/dist/prompts/generate/refactoring.js +621 -0
  131. package/dist/prompts/generate/refactoring.js.map +1 -0
  132. package/dist/prompts/generate/responsive-component.d.ts +147 -0
  133. package/dist/prompts/generate/responsive-component.d.ts.map +1 -0
  134. package/dist/prompts/generate/responsive-component.js +955 -0
  135. package/dist/prompts/generate/responsive-component.js.map +1 -0
  136. package/dist/prompts/generate/typescript-conversion.d.ts +144 -0
  137. package/dist/prompts/generate/typescript-conversion.d.ts.map +1 -0
  138. package/dist/prompts/generate/typescript-conversion.js +527 -0
  139. package/dist/prompts/generate/typescript-conversion.js.map +1 -0
  140. package/dist/prompts/generate/unit-tests.d.ts +139 -0
  141. package/dist/prompts/generate/unit-tests.d.ts.map +1 -0
  142. package/dist/prompts/generate/unit-tests.js +578 -0
  143. package/dist/prompts/generate/unit-tests.js.map +1 -0
  144. package/dist/prompts/generate/wordpress-plugin.d.ts +179 -0
  145. package/dist/prompts/generate/wordpress-plugin.d.ts.map +1 -0
  146. package/dist/prompts/generate/wordpress-plugin.js +763 -0
  147. package/dist/prompts/generate/wordpress-plugin.js.map +1 -0
  148. package/dist/prompts/generate/wordpress-theme-from-static.d.ts +177 -0
  149. package/dist/prompts/generate/wordpress-theme-from-static.d.ts.map +1 -0
  150. package/dist/prompts/generate/wordpress-theme-from-static.js +695 -0
  151. package/dist/prompts/generate/wordpress-theme-from-static.js.map +1 -0
  152. package/dist/prompts/shared/cache-manager.d.ts +45 -0
  153. package/dist/prompts/shared/cache-manager.d.ts.map +1 -0
  154. package/dist/prompts/shared/cache-manager.js +129 -0
  155. package/dist/prompts/shared/cache-manager.js.map +1 -0
  156. package/dist/prompts/shared/helpers.d.ts +39 -0
  157. package/dist/prompts/shared/helpers.d.ts.map +1 -0
  158. package/dist/prompts/shared/helpers.js +151 -0
  159. package/dist/prompts/shared/helpers.js.map +1 -0
  160. package/dist/prompts/shared/templates.d.ts +35 -0
  161. package/dist/prompts/shared/templates.d.ts.map +1 -0
  162. package/dist/prompts/shared/templates.js +77 -0
  163. package/dist/prompts/shared/templates.js.map +1 -0
  164. package/dist/prompts/shared/types.d.ts +112 -0
  165. package/dist/prompts/shared/types.d.ts.map +1 -0
  166. package/dist/prompts/shared/types.js +5 -0
  167. package/dist/prompts/shared/types.js.map +1 -0
  168. package/dist/prompts/system/find-unused-files.d.ts +106 -0
  169. package/dist/prompts/system/find-unused-files.d.ts.map +1 -0
  170. package/dist/prompts/system/find-unused-files.js +353 -0
  171. package/dist/prompts/system/find-unused-files.js.map +1 -0
  172. package/dist/security/index.d.ts +39 -0
  173. package/dist/security/index.d.ts.map +1 -0
  174. package/dist/security/index.js +46 -0
  175. package/dist/security/index.js.map +1 -0
  176. package/dist/security/integration-helpers.d.ts +121 -0
  177. package/dist/security/integration-helpers.d.ts.map +1 -0
  178. package/dist/security/integration-helpers.js +190 -0
  179. package/dist/security/integration-helpers.js.map +1 -0
  180. package/dist/security/output-encoder.d.ts +94 -0
  181. package/dist/security/output-encoder.d.ts.map +1 -0
  182. package/dist/security/output-encoder.js +295 -0
  183. package/dist/security/output-encoder.js.map +1 -0
  184. package/dist/security/prompt-injection-guard.d.ts +59 -0
  185. package/dist/security/prompt-injection-guard.d.ts.map +1 -0
  186. package/dist/security/prompt-injection-guard.js +249 -0
  187. package/dist/security/prompt-injection-guard.js.map +1 -0
  188. package/dist/security/sanitisation.d.ts +67 -0
  189. package/dist/security/sanitisation.d.ts.map +1 -0
  190. package/dist/security/sanitisation.js +398 -0
  191. package/dist/security/sanitisation.js.map +1 -0
  192. package/dist/security/security-service.d.ts +103 -0
  193. package/dist/security/security-service.d.ts.map +1 -0
  194. package/dist/security/security-service.js +303 -0
  195. package/dist/security/security-service.js.map +1 -0
  196. package/dist/security-config.d.ts +45 -0
  197. package/dist/security-config.d.ts.map +1 -0
  198. package/dist/security-config.js +63 -0
  199. package/dist/security-config.js.map +1 -0
  200. package/dist/system/function-list.d.ts +61 -0
  201. package/dist/system/function-list.d.ts.map +1 -0
  202. package/dist/system/function-list.js +111 -0
  203. package/dist/system/function-list.js.map +1 -0
  204. package/dist/system/function-registry.d.ts +23 -0
  205. package/dist/system/function-registry.d.ts.map +1 -0
  206. package/dist/system/function-registry.js +136 -0
  207. package/dist/system/function-registry.js.map +1 -0
  208. package/dist/system/health-check.d.ts +33 -0
  209. package/dist/system/health-check.d.ts.map +1 -0
  210. package/dist/system/health-check.js +98 -0
  211. package/dist/system/health-check.js.map +1 -0
  212. package/dist/system/path-resolver.d.ts +55 -0
  213. package/dist/system/path-resolver.d.ts.map +1 -0
  214. package/dist/system/path-resolver.js +90 -0
  215. package/dist/system/path-resolver.js.map +1 -0
  216. package/dist/templates/plugin-template.d.ts +121 -0
  217. package/dist/templates/plugin-template.d.ts.map +1 -0
  218. package/dist/templates/plugin-template.js +450 -0
  219. package/dist/templates/plugin-template.js.map +1 -0
  220. package/dist/types/chunking-types.d.ts +88 -0
  221. package/dist/types/chunking-types.d.ts.map +1 -0
  222. package/dist/types/chunking-types.js +18 -0
  223. package/dist/types/chunking-types.js.map +1 -0
  224. package/dist/types/prompt-stages.d.ts +42 -0
  225. package/dist/types/prompt-stages.d.ts.map +1 -0
  226. package/dist/types/prompt-stages.js +6 -0
  227. package/dist/types/prompt-stages.js.map +1 -0
  228. package/dist/types.d.ts +46 -0
  229. package/dist/types.d.ts.map +1 -0
  230. package/dist/types.js +6 -0
  231. package/dist/types.js.map +1 -0
  232. package/dist/utils/css-parser.d.ts +26 -0
  233. package/dist/utils/css-parser.d.ts.map +1 -0
  234. package/dist/utils/css-parser.js +117 -0
  235. package/dist/utils/css-parser.js.map +1 -0
  236. package/dist/utils/path-resolver.d.ts +13 -0
  237. package/dist/utils/path-resolver.d.ts.map +1 -0
  238. package/dist/utils/path-resolver.js +78 -0
  239. package/dist/utils/path-resolver.js.map +1 -0
  240. package/dist/utils/plugin-utilities.d.ts +171 -0
  241. package/dist/utils/plugin-utilities.d.ts.map +1 -0
  242. package/dist/utils/plugin-utilities.js +221 -0
  243. package/dist/utils/plugin-utilities.js.map +1 -0
  244. package/dist/utils/streamHandler.d.ts +3 -0
  245. package/dist/utils/streamHandler.d.ts.map +1 -0
  246. package/dist/utils/streamHandler.js +137 -0
  247. package/dist/utils/streamHandler.js.map +1 -0
  248. package/dist/validation/output-validator.d.ts +136 -0
  249. package/dist/validation/output-validator.d.ts.map +1 -0
  250. package/dist/validation/output-validator.js +262 -0
  251. package/dist/validation/output-validator.js.map +1 -0
  252. package/dist/validation/response-factory.d.ts +44 -0
  253. package/dist/validation/response-factory.d.ts.map +1 -0
  254. package/dist/validation/response-factory.js +202 -0
  255. package/dist/validation/response-factory.js.map +1 -0
  256. package/dist/validation/schemas.d.ts +519 -0
  257. package/dist/validation/schemas.d.ts.map +1 -0
  258. package/dist/validation/schemas.js +6 -0
  259. package/dist/validation/schemas.js.map +1 -0
  260. package/package.json +72 -0
@@ -0,0 +1,578 @@
1
+ /**
2
+ * Plugin Template - Modern v4.2 (Single Source of Truth)
3
+ *
4
+ * Universal template that intelligently handles both single-file and multi-file analysis
5
+ * Automatically detects analysis type based on provided parameters
6
+ *
7
+ * Copy this template for creating any new plugin - it adapts to your needs
8
+ */
9
+ import { BasePlugin } from '../../plugins/base-plugin.js';
10
+ import { ThreeStagePromptManager } from '../../core/ThreeStagePromptManager.js';
11
+ import { withSecurity } from '../../security/integration-helpers.js';
12
+ import { readFileContent } from '../shared/helpers.js';
13
+ import { ModelSetup, ResponseProcessor, ParameterValidator, ErrorHandler, MultiFileAnalysis } from '../../utils/plugin-utilities.js';
14
+ import { getAnalysisCache } from '../../cache/index.js';
15
+ export class UnitTestGenerator extends BasePlugin {
16
+ constructor() {
17
+ super();
18
+ this.name = 'generate_unit_tests';
19
+ this.category = 'generate';
20
+ this.description = 'Generate comprehensive unit tests for code with framework-specific patterns and complete coverage strategies';
21
+ // Universal parameter set - supports both single and multi-file scenarios
22
+ this.parameters = {
23
+ // Single-file parameters
24
+ code: {
25
+ type: 'string',
26
+ description: 'The code to generate tests for (for single-file analysis)',
27
+ required: false
28
+ },
29
+ filePath: {
30
+ type: 'string',
31
+ description: 'Path to single file to generate tests for',
32
+ required: false
33
+ },
34
+ // Multi-file parameters
35
+ projectPath: {
36
+ type: 'string',
37
+ description: 'Path to project root (for multi-file test generation)',
38
+ required: false
39
+ },
40
+ files: {
41
+ type: 'array',
42
+ description: 'Array of specific file paths (for multi-file test generation)',
43
+ required: false,
44
+ items: { type: 'string' }
45
+ },
46
+ maxDepth: {
47
+ type: 'number',
48
+ description: 'Maximum directory depth for multi-file discovery (1-5)',
49
+ required: false,
50
+ default: 3
51
+ },
52
+ // Universal parameters
53
+ language: {
54
+ type: 'string',
55
+ description: 'Programming language',
56
+ required: false,
57
+ default: 'javascript'
58
+ },
59
+ testFramework: {
60
+ type: 'string',
61
+ description: 'Testing framework to use (jest, mocha, pytest, phpunit, etc.)',
62
+ required: false,
63
+ default: 'jest'
64
+ },
65
+ coverageTarget: {
66
+ type: 'string',
67
+ description: 'Test coverage target level',
68
+ enum: ['basic', 'comprehensive', 'edge-cases'],
69
+ default: 'comprehensive',
70
+ required: false
71
+ },
72
+ context: {
73
+ type: 'object',
74
+ description: 'Optional context for framework-specific testing patterns',
75
+ required: false,
76
+ properties: {
77
+ projectType: {
78
+ type: 'string',
79
+ enum: ['wordpress-plugin', 'wordpress-theme', 'react-app', 'react-component', 'node-api', 'browser-extension', 'cli-tool', 'n8n-node', 'n8n-workflow', 'generic'],
80
+ description: 'Project type for appropriate test patterns'
81
+ },
82
+ testStyle: {
83
+ type: 'string',
84
+ enum: ['bdd', 'tdd', 'aaa', 'given-when-then'],
85
+ description: 'Testing style preference'
86
+ },
87
+ mockStrategy: {
88
+ type: 'string',
89
+ enum: ['minimal', 'comprehensive', 'integration-preferred'],
90
+ description: 'Mocking approach',
91
+ default: 'minimal'
92
+ }
93
+ }
94
+ }
95
+ };
96
+ this.analysisCache = getAnalysisCache();
97
+ this.multiFileAnalysis = new MultiFileAnalysis();
98
+ // Cache and analysis utilities are initialized above
99
+ }
100
+ async execute(params, llmClient) {
101
+ return await withSecurity(this, params, llmClient, async (secureParams) => {
102
+ try {
103
+ // 1. Auto-detect analysis mode based on parameters
104
+ const analysisMode = this.detectAnalysisMode(secureParams);
105
+ // 2. Validate parameters based on detected mode
106
+ this.validateParameters(secureParams, analysisMode);
107
+ // 3. Setup model
108
+ const { model, contextLength } = await ModelSetup.getReadyModel(llmClient);
109
+ // 4. Route to appropriate analysis method
110
+ if (analysisMode === 'single-file') {
111
+ return await this.executeSingleFileAnalysis(secureParams, model, contextLength);
112
+ }
113
+ else {
114
+ return await this.executeMultiFileAnalysis(secureParams, model, contextLength);
115
+ }
116
+ }
117
+ catch (error) {
118
+ return ErrorHandler.createExecutionError('generate_unit_tests', error);
119
+ }
120
+ });
121
+ }
122
+ /**
123
+ * Auto-detect whether this is single-file or multi-file analysis
124
+ */
125
+ detectAnalysisMode(params) {
126
+ // Single-file indicators take priority (avoids default parameter issues)
127
+ if (params.code || params.filePath) {
128
+ return 'single-file';
129
+ }
130
+ // Multi-file indicators
131
+ if (params.projectPath || params.files) {
132
+ return 'multi-file';
133
+ }
134
+ // Default to single-file for test generation
135
+ return 'single-file';
136
+ }
137
+ /**
138
+ * Validate parameters based on detected analysis mode
139
+ */
140
+ validateParameters(params, mode) {
141
+ if (mode === 'single-file') {
142
+ ParameterValidator.validateCodeOrFile(params);
143
+ }
144
+ else {
145
+ ParameterValidator.validateProjectPath(params);
146
+ ParameterValidator.validateDepth(params);
147
+ }
148
+ // Universal validations
149
+ ParameterValidator.validateEnum(params, 'coverageTarget', ['basic', 'comprehensive', 'edge-cases']);
150
+ ParameterValidator.validateEnum(params, 'testFramework', ['jest', 'mocha', 'pytest', 'phpunit', 'vitest', 'jasmine']);
151
+ }
152
+ /**
153
+ * Execute single-file analysis
154
+ */
155
+ async executeSingleFileAnalysis(params, model, contextLength) {
156
+ // Process single file input
157
+ let codeToAnalyze = params.code;
158
+ if (params.filePath) {
159
+ codeToAnalyze = await readFileContent(params.filePath);
160
+ }
161
+ // Generate prompt stages for single file
162
+ const promptStages = this.getSingleFilePromptStages({
163
+ ...params,
164
+ code: codeToAnalyze
165
+ });
166
+ // Execute with appropriate method
167
+ const promptManager = new ThreeStagePromptManager(contextLength);
168
+ const needsChunking = promptManager.needsChunking(promptStages);
169
+ if (needsChunking) {
170
+ const conversation = promptManager.createChunkedConversation(promptStages);
171
+ const messages = [
172
+ conversation.systemMessage,
173
+ ...conversation.dataMessages,
174
+ conversation.analysisMessage
175
+ ];
176
+ return await ResponseProcessor.executeChunked(messages, model, contextLength, 'generate_unit_tests', 'single');
177
+ }
178
+ else {
179
+ return await ResponseProcessor.executeDirect(promptStages, model, contextLength, 'generate_unit_tests');
180
+ }
181
+ }
182
+ /**
183
+ * Execute multi-file analysis
184
+ */
185
+ async executeMultiFileAnalysis(params, model, contextLength) {
186
+ // Discover files
187
+ let filesToAnalyze = params.files ||
188
+ await this.discoverRelevantFiles(params.projectPath, params.maxDepth, params.language);
189
+ // Perform multi-file analysis with caching
190
+ const analysisResult = await this.performMultiFileAnalysis(filesToAnalyze, params, model, contextLength);
191
+ // Generate prompt stages for multi-file
192
+ const promptStages = this.getMultiFilePromptStages({
193
+ ...params,
194
+ analysisResult,
195
+ fileCount: filesToAnalyze.length
196
+ });
197
+ // Always use chunking for multi-file
198
+ const promptManager = new ThreeStagePromptManager(contextLength);
199
+ const conversation = promptManager.createChunkedConversation(promptStages);
200
+ const messages = [
201
+ conversation.systemMessage,
202
+ ...conversation.dataMessages,
203
+ conversation.analysisMessage
204
+ ];
205
+ return await ResponseProcessor.executeChunked(messages, model, contextLength, 'generate_unit_tests', 'multifile');
206
+ }
207
+ /**
208
+ * Implement single-file prompt stages for test generation
209
+ */
210
+ getSingleFilePromptStages(params) {
211
+ const { code, language, testFramework, coverageTarget, context = {} } = params;
212
+ const projectType = context.projectType || 'generic';
213
+ const testStyle = context.testStyle || 'bdd';
214
+ const mockStrategy = context.mockStrategy || 'minimal';
215
+ const systemAndContext = `You are an expert test engineer and quality assurance specialist with 15+ years of experience in ${testFramework} testing and ${language} development.
216
+
217
+ **YOUR EXPERTISE:**
218
+ - Advanced ${testFramework} patterns and best practices
219
+ - ${language} testing ecosystem and frameworks
220
+ - Test-driven development (TDD) and behavior-driven development (BDD)
221
+ - Mock strategies, fixtures, and test data management
222
+ - Performance testing and security testing methodologies
223
+ - CI/CD integration and test automation workflows
224
+
225
+ **TESTING CONTEXT:**
226
+ - Framework: ${testFramework}
227
+ - Language: ${language}
228
+ - Coverage Target: ${this.getCoveragePercent(coverageTarget)}%
229
+ - Project Type: ${projectType}
230
+ - Test Style: ${testStyle}
231
+ - Mock Strategy: ${mockStrategy}
232
+ - Mode: Single File Test Generation
233
+
234
+ **YOUR MISSION:**
235
+ Generate comprehensive, production-ready unit tests that serve as both documentation and quality assurance. Your tests should be so thorough and well-written that they become the definitive specification of how the code should behave.
236
+
237
+ **QUALITY STANDARDS:**
238
+ - Tests must be maintainable, readable, and serve as living documentation
239
+ - Each test should have a single, clear responsibility
240
+ - Test names should read like specifications in plain English
241
+ - Setup and teardown should be clean and predictable
242
+ - Mocks should be realistic and properly isolated
243
+ - Error scenarios should be as thoroughly tested as success cases`;
244
+ const dataPayload = `Code requiring comprehensive test coverage:
245
+
246
+ \`\`\`${language}
247
+ ${code}
248
+ \`\`\``;
249
+ const outputInstructions = `Generate a complete, production-ready test suite that includes:
250
+
251
+ ## 🎯 REQUIRED TEST CATEGORIES
252
+
253
+ ### 1. Happy Path Tests (Core Functionality)
254
+ - Standard successful operations with valid inputs
255
+ - Expected return values and side effects
256
+ - Normal flow execution paths
257
+
258
+ ### 2. Edge Cases & Boundary Conditions
259
+ - Empty inputs, null/undefined values
260
+ - Minimum and maximum valid values
261
+ - Zero-length arrays, empty strings, edge numbers
262
+ - Large datasets and performance boundaries
263
+
264
+ ### 3. Error Handling & Validation
265
+ - Invalid input types and formats
266
+ - Out-of-range values and malformed data
267
+ - Network failures, timeouts, and external service errors
268
+ - Permission denied and authentication failures
269
+ - Proper error types and meaningful error messages
270
+
271
+ ### 4. ${projectType === 'generic' ? 'Security Validation' : this.getProjectSpecificTests(projectType)}
272
+ ${this.getSecurityTestsForProject(projectType)}
273
+
274
+ ### 5. Integration Points & Dependencies
275
+ - External API calls and responses
276
+ - Database operations and transactions
277
+ - File system operations
278
+ - Environment variable dependencies
279
+ - Third-party library interactions
280
+
281
+ ## 🏗️ TEST STRUCTURE REQUIREMENTS
282
+
283
+ ### Framework: ${testFramework}
284
+ ${this.getFrameworkGuidelines(testFramework)}
285
+
286
+ ### Test Organization:
287
+ - Group related tests using describe/context blocks
288
+ - Use descriptive test names following ${testStyle} style: ${this.getTestNamingPattern(testStyle)}
289
+ - Include proper setup (beforeEach/beforeAll) and cleanup (afterEach/afterAll)
290
+ - Organize tests from most common to least common scenarios
291
+
292
+ ### Mocking Strategy: ${mockStrategy}
293
+ ${this.getMockingGuidelines(mockStrategy, testFramework)}
294
+
295
+ ## 📋 DELIVERABLE REQUIREMENTS
296
+
297
+ Provide a complete test file that includes:
298
+ - All necessary imports and dependencies
299
+ - Proper test suite structure with clear organization
300
+ - Comprehensive coverage of all identified functions/methods
301
+ - Realistic test data and fixtures
302
+ - Proper assertions with meaningful failure messages
303
+ - Performance considerations where relevant
304
+ - Accessibility testing (if UI components)
305
+ - Documentation comments for complex test scenarios
306
+
307
+ **Coverage Target**: Achieve ${this.getCoveragePercent(coverageTarget)}% coverage with meaningful tests, not just line coverage.
308
+
309
+ **Test Quality**: Each test should be independently runnable, deterministic, and provide clear diagnostics on failure.`;
310
+ return { systemAndContext, dataPayload, outputInstructions };
311
+ }
312
+ /**
313
+ * Implement multi-file prompt stages for project-wide test generation
314
+ */
315
+ getMultiFilePromptStages(params) {
316
+ const { analysisResult, testFramework, coverageTarget, fileCount, context = {} } = params;
317
+ const projectType = context.projectType || 'generic';
318
+ const systemAndContext = `You are a senior test architect with expertise in large-scale test suite design and ${testFramework} testing frameworks.
319
+
320
+ **YOUR EXPERTISE:**
321
+ - Multi-file test suite architecture and organization
322
+ - Test strategy design for complex applications
323
+ - Integration testing across components
324
+ - Test data management and shared fixtures
325
+ - Performance testing at scale
326
+ - Continuous integration and test automation
327
+
328
+ **PROJECT CONTEXT:**
329
+ - Framework: ${testFramework}
330
+ - Files Analyzed: ${fileCount}
331
+ - Coverage Target: ${this.getCoveragePercent(coverageTarget)}%
332
+ - Project Type: ${projectType}
333
+ - Mode: Multi-File Test Generation
334
+
335
+ **YOUR MISSION:**
336
+ Design and generate a comprehensive test suite architecture that covers all analyzed files while maintaining clean separation of concerns, shared utilities, and consistent testing patterns across the entire project.`;
337
+ const dataPayload = `Multi-file project analysis:
338
+
339
+ ${JSON.stringify(analysisResult, null, 2)}`;
340
+ const outputInstructions = `Generate a comprehensive test suite architecture with:
341
+
342
+ ## 🏗️ TEST SUITE ARCHITECTURE
343
+
344
+ ### Test File Organization:
345
+ - One test file per source file following naming conventions
346
+ - Shared test utilities and fixtures in common directories
347
+ - Integration test suites for cross-file functionality
348
+ - Performance test suites for system-wide benchmarks
349
+
350
+ ### Cross-File Testing Strategy:
351
+ - **Unit Tests**: Individual file/module testing in isolation
352
+ - **Integration Tests**: Inter-module communication and data flow
353
+ - **System Tests**: End-to-end functionality across the entire application
354
+ - **Contract Tests**: API boundaries and interface compliance
355
+
356
+ ### Test Data Management:
357
+ - Centralized test fixtures and mock data
358
+ - Database seeding and cleanup strategies
359
+ - Shared mock implementations for common dependencies
360
+ - Environment-specific test configurations
361
+
362
+ ### Shared Testing Utilities:
363
+ - Common setup and teardown helpers
364
+ - Custom matchers and assertions
365
+ - Mock factories and test builders
366
+ - Utility functions for data generation
367
+
368
+ ## 📁 DELIVERABLES
369
+
370
+ For each analyzed file, provide:
371
+ 1. **Individual test file** with comprehensive coverage
372
+ 2. **Integration tests** where cross-file dependencies exist
373
+ 3. **Shared utilities** for common testing patterns
374
+ 4. **Test configuration** for the project
375
+ 5. **README documentation** explaining the test strategy
376
+
377
+ ## 🎯 QUALITY STANDARDS
378
+
379
+ - Maintain consistency in test style and structure across all files
380
+ - Ensure tests are maintainable and don't duplicate logic unnecessarily
381
+ - Create realistic integration scenarios based on actual file dependencies
382
+ - Provide clear documentation for running and maintaining the test suite
383
+ - Consider performance implications of the full test suite execution
384
+
385
+ **Overall Coverage**: Achieve comprehensive testing across all ${fileCount} files while maintaining clean, maintainable test architecture.`;
386
+ return { systemAndContext, dataPayload, outputInstructions };
387
+ }
388
+ /**
389
+ * Implement for backwards compatibility
390
+ */
391
+ getPromptStages(params) {
392
+ const mode = this.detectAnalysisMode(params);
393
+ if (mode === 'single-file') {
394
+ return this.getSingleFilePromptStages(params);
395
+ }
396
+ else {
397
+ return this.getMultiFilePromptStages(params);
398
+ }
399
+ }
400
+ // Helper methods for test generation
401
+ async discoverRelevantFiles(projectPath, maxDepth, language) {
402
+ const extensions = this.getFileExtensions(language);
403
+ return await this.multiFileAnalysis.discoverFiles(projectPath, extensions, maxDepth);
404
+ }
405
+ async performMultiFileAnalysis(files, params, model, contextLength) {
406
+ const cacheKey = this.analysisCache.generateKey('generate_unit_tests', params, files);
407
+ const cached = await this.analysisCache.get(cacheKey);
408
+ if (cached)
409
+ return cached;
410
+ const fileAnalysisResults = await this.multiFileAnalysis.analyzeBatch(files, (file) => this.analyzeIndividualFile(file, params, model), contextLength);
411
+ // Aggregate results into proper analysis result format
412
+ const aggregatedResult = {
413
+ summary: `Test generation analysis for ${files.length} files`,
414
+ findings: fileAnalysisResults,
415
+ data: {
416
+ fileCount: files.length,
417
+ totalFunctions: fileAnalysisResults.reduce((sum, result) => sum + (result.functionCount || 0), 0),
418
+ complexity: this.calculateOverallComplexity(fileAnalysisResults),
419
+ dependencies: this.extractDependencies(fileAnalysisResults)
420
+ }
421
+ };
422
+ await this.analysisCache.cacheAnalysis(cacheKey, aggregatedResult, {
423
+ modelUsed: model.identifier || 'unknown',
424
+ executionTime: Date.now() - Date.now(),
425
+ timestamp: new Date().toISOString()
426
+ });
427
+ return aggregatedResult;
428
+ }
429
+ async analyzeIndividualFile(file, params, model) {
430
+ const content = await import('fs/promises').then(fs => fs.readFile(file, 'utf-8'));
431
+ return {
432
+ filePath: file,
433
+ size: content.length,
434
+ lines: content.split('\n').length,
435
+ functionCount: this.estimateFunctionCount(content, params.language),
436
+ complexity: this.estimateComplexity(content),
437
+ dependencies: this.extractFileDependencies(content),
438
+ testable: this.isFileTestable(content, params.language)
439
+ };
440
+ }
441
+ getFileExtensions(language) {
442
+ const extensionMap = {
443
+ 'javascript': ['.js', '.jsx', '.mjs'],
444
+ 'typescript': ['.ts', '.tsx'],
445
+ 'python': ['.py'],
446
+ 'php': ['.php', '.inc', '.module'],
447
+ 'java': ['.java'],
448
+ 'csharp': ['.cs'],
449
+ 'cpp': ['.cpp', '.cc', '.cxx', '.c++'],
450
+ 'c': ['.c', '.h']
451
+ };
452
+ return extensionMap[language] || ['.js', '.ts', '.jsx', '.tsx', '.py', '.php', '.java', '.cs', '.cpp', '.c'];
453
+ }
454
+ getCoveragePercent(target) {
455
+ const targets = {
456
+ 'basic': 60,
457
+ 'comprehensive': 80,
458
+ 'edge-cases': 90
459
+ };
460
+ return targets[target] || 80;
461
+ }
462
+ getTestNamingPattern(style) {
463
+ const patterns = {
464
+ 'bdd': '"should [expected behavior] when [condition]"',
465
+ 'given-when-then': '"Given [context], when [action], then [outcome]"',
466
+ 'aaa': '"[methodName]: [scenario] - [expected result]"',
467
+ 'tdd': '"test [functionality] with [input] expects [output]"'
468
+ };
469
+ return patterns[style] || patterns.bdd;
470
+ }
471
+ getProjectSpecificTests(projectType) {
472
+ const tests = {
473
+ 'wordpress-plugin': 'WordPress-Specific Security & Integration Tests',
474
+ 'react-app': 'React Component & State Management Tests',
475
+ 'node-api': 'API Endpoint & Database Integration Tests',
476
+ 'browser-extension': 'Extension Permissions & Cross-Origin Tests',
477
+ 'cli-tool': 'Command Line Interface & System Integration Tests',
478
+ 'n8n-node': 'N8N Node Execution & Workflow Tests',
479
+ 'n8n-workflow': 'Workflow Logic & Data Transformation Tests'
480
+ };
481
+ return tests[projectType] || 'Application-Specific Security Tests';
482
+ }
483
+ getSecurityTestsForProject(projectType) {
484
+ const security = {
485
+ 'wordpress-plugin': '- Nonce validation and CSRF protection\n- Capability checks and authorization\n- SQL injection prevention\n- XSS escaping and output sanitization\n- File upload security and path traversal prevention',
486
+ 'react-app': '- XSS prevention in JSX rendering\n- Props validation and sanitization\n- State injection attacks\n- Route guard authentication\n- Component security boundaries',
487
+ 'node-api': '- Input validation and sanitization\n- Authentication and authorization\n- Rate limiting and DDoS protection\n- SQL injection and NoSQL injection prevention\n- JWT token validation and refresh',
488
+ 'browser-extension': '- Content Security Policy compliance\n- Cross-origin request validation\n- Permission boundary testing\n- Message passing security\n- DOM injection prevention',
489
+ 'cli-tool': '- Command injection prevention\n- Path traversal attacks\n- Privilege escalation protection\n- Environment variable sanitization\n- File system permission validation',
490
+ 'n8n-node': '- Credential handling and encryption\n- Input data sanitization\n- API security and rate limiting\n- Webhook validation\n- Error information leakage prevention',
491
+ 'n8n-workflow': '- Data validation between nodes\n- Webhook security testing\n- Error handling without data exposure\n- Authentication token management\n- Input/output data sanitization'
492
+ };
493
+ return security[projectType] || '- Input validation and sanitization\n- Output encoding and escaping\n- Authentication and authorization checks\n- Error handling without information leakage';
494
+ }
495
+ getFrameworkGuidelines(framework) {
496
+ const guidelines = {
497
+ 'jest': '- Use describe() for test grouping and it()/test() for individual tests\n- Utilize beforeEach/afterEach for setup/teardown\n- Mock modules with jest.mock() and manual mocks\n- Use expect() assertions with Jest matchers\n- Implement snapshot testing for UI components',
498
+ 'mocha': '- Structure tests with describe() and it() blocks\n- Use Chai for assertions (expect, should, assert)\n- Implement Sinon for spies, stubs, and mocks\n- Handle async tests with done() callbacks or promises\n- Use before/after hooks for test setup',
499
+ 'pytest': '- Use fixtures for test setup and dependency injection\n- Parametrize tests with @pytest.mark.parametrize\n- Mock dependencies with unittest.mock or pytest-mock\n- Use assert statements for simple assertions\n- Mark tests with decorators for organization',
500
+ 'phpunit': '- Extend TestCase class for all test classes\n- Use setUp() and tearDown() for test preparation\n- Create data providers for parametrized testing\n- Mock objects with getMockBuilder() or Prophecy\n- Use annotations (@covers, @group, @dataProvider)',
501
+ 'vitest': '- Similar to Jest with describe() and it()/test()\n- Use vi.mock() for module mocking\n- Leverage Vitest UI for debugging\n- Implement in-source testing capabilities\n- Use expect() with extended Vitest matchers'
502
+ };
503
+ return guidelines[framework] || guidelines.jest;
504
+ }
505
+ getMockingGuidelines(strategy, framework) {
506
+ const strategies = {
507
+ 'minimal': `Mock only external dependencies and side effects:
508
+ - Network calls and API requests
509
+ - Database operations
510
+ - File system operations
511
+ - External services and third-party libraries
512
+ - Keep internal logic unmocked for integration confidence`,
513
+ 'comprehensive': `Mock most dependencies for isolation:
514
+ - All external dependencies and services
515
+ - Internal modules and complex dependencies
516
+ - Database and network operations
517
+ - Time-dependent functions (Date.now(), setTimeout)
518
+ - Random functions and non-deterministic behavior`,
519
+ 'integration-preferred': `Minimize mocks to test real integration:
520
+ - Mock only external services outside your control
521
+ - Use real database with test data
522
+ - Test actual file operations with temporary files
523
+ - Mock only network calls to external APIs
524
+ - Prefer dependency injection over mocking`
525
+ };
526
+ return strategies[strategy] || strategies.minimal;
527
+ }
528
+ // Helper methods for file analysis
529
+ estimateFunctionCount(content, language) {
530
+ const patterns = {
531
+ 'javascript': /function\s+\w+|const\s+\w+\s*=\s*\(|class\s+\w+/g,
532
+ 'typescript': /function\s+\w+|const\s+\w+\s*=\s*\(|class\s+\w+/g,
533
+ 'python': /def\s+\w+|class\s+\w+/g,
534
+ 'php': /function\s+\w+|class\s+\w+/g,
535
+ 'java': /public\s+\w+\s+\w+\(|private\s+\w+\s+\w+\(/g
536
+ };
537
+ const pattern = patterns[language] || patterns.javascript;
538
+ const matches = content.match(pattern);
539
+ return matches ? matches.length : 0;
540
+ }
541
+ estimateComplexity(content) {
542
+ const lines = content.split('\n').length;
543
+ const cyclomaticIndicators = (content.match(/if\s*\(|while\s*\(|for\s*\(|switch\s*\(|catch\s*\(/g) || []).length;
544
+ if (lines < 50 && cyclomaticIndicators < 5)
545
+ return 'low';
546
+ if (lines < 200 && cyclomaticIndicators < 15)
547
+ return 'medium';
548
+ return 'high';
549
+ }
550
+ extractFileDependencies(content) {
551
+ const importMatches = content.match(/(?:import|require)\s*\(?['"`]([^'"`]+)['"`]/g) || [];
552
+ return importMatches.map(match => {
553
+ const result = match.match(/['"`]([^'"`]+)['"`]/);
554
+ return result ? result[1] : '';
555
+ }).filter(dep => dep && !dep.startsWith('.'));
556
+ }
557
+ isFileTestable(content, language) {
558
+ const functionCount = this.estimateFunctionCount(content, language);
559
+ const hasExports = /export|module\.exports/g.test(content);
560
+ return functionCount > 0 || hasExports;
561
+ }
562
+ calculateOverallComplexity(results) {
563
+ const complexities = results.map(r => r.complexity);
564
+ const highCount = complexities.filter(c => c === 'high').length;
565
+ const mediumCount = complexities.filter(c => c === 'medium').length;
566
+ if (highCount > results.length * 0.3)
567
+ return 'high';
568
+ if (mediumCount > results.length * 0.5)
569
+ return 'medium';
570
+ return 'low';
571
+ }
572
+ extractDependencies(results) {
573
+ const allDeps = results.flatMap(r => r.dependencies || []);
574
+ return [...new Set(allDeps)];
575
+ }
576
+ }
577
+ export default UnitTestGenerator;
578
+ //# sourceMappingURL=unit-tests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unit-tests.js","sourceRoot":"","sources":["../../../src/prompts/generate/unit-tests.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAsF/C;QACE,KAAK,EAAE,CAAC;QAtFV,SAAI,GAAG,qBAAqB,CAAC;QAC7B,aAAQ,GAAG,UAAmB,CAAC;QAC/B,gBAAW,GAAG,8GAA8G,CAAC;QAE7H,0EAA0E;QAC1E,eAAU,GAAG;YACX,yBAAyB;YACzB,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