@houtini/lm 1.0.13 → 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 (262) hide show
  1. package/dist/index.d.ts +5 -3
  2. package/dist/index.js +142 -213
  3. package/dist/index.js.map +1 -1
  4. package/package.json +10 -33
  5. package/CHANGELOG.md +0 -282
  6. package/dist/cache/analysis-cache.d.ts +0 -33
  7. package/dist/cache/analysis-cache.d.ts.map +0 -1
  8. package/dist/cache/analysis-cache.js +0 -56
  9. package/dist/cache/analysis-cache.js.map +0 -1
  10. package/dist/cache/cache-manager.d.ts +0 -29
  11. package/dist/cache/cache-manager.d.ts.map +0 -1
  12. package/dist/cache/cache-manager.js +0 -85
  13. package/dist/cache/cache-manager.js.map +0 -1
  14. package/dist/cache/index.d.ts +0 -16
  15. package/dist/cache/index.d.ts.map +0 -1
  16. package/dist/cache/index.js +0 -17
  17. package/dist/cache/index.js.map +0 -1
  18. package/dist/cache/prompt-cache.d.ts +0 -33
  19. package/dist/cache/prompt-cache.d.ts.map +0 -1
  20. package/dist/cache/prompt-cache.js +0 -61
  21. package/dist/cache/prompt-cache.js.map +0 -1
  22. package/dist/config.d.ts +0 -41
  23. package/dist/config.d.ts.map +0 -1
  24. package/dist/config.js +0 -71
  25. package/dist/config.js.map +0 -1
  26. package/dist/core/ThreeStagePromptManager.d.ts +0 -23
  27. package/dist/core/ThreeStagePromptManager.d.ts.map +0 -1
  28. package/dist/core/ThreeStagePromptManager.js +0 -118
  29. package/dist/core/ThreeStagePromptManager.js.map +0 -1
  30. package/dist/index.d.ts.map +0 -1
  31. package/dist/plugins/base-plugin.d.ts +0 -55
  32. package/dist/plugins/base-plugin.d.ts.map +0 -1
  33. package/dist/plugins/base-plugin.js +0 -120
  34. package/dist/plugins/base-plugin.js.map +0 -1
  35. package/dist/plugins/index.d.ts +0 -58
  36. package/dist/plugins/index.d.ts.map +0 -1
  37. package/dist/plugins/index.js +0 -162
  38. package/dist/plugins/index.js.map +0 -1
  39. package/dist/plugins/types.d.ts +0 -5
  40. package/dist/plugins/types.d.ts.map +0 -1
  41. package/dist/plugins/types.js +0 -5
  42. package/dist/plugins/types.js.map +0 -1
  43. package/dist/prompts/analyze/code-quality.d.ts +0 -116
  44. package/dist/prompts/analyze/code-quality.d.ts.map +0 -1
  45. package/dist/prompts/analyze/code-quality.js +0 -437
  46. package/dist/prompts/analyze/code-quality.js.map +0 -1
  47. package/dist/prompts/analyze/compare-integration.d.ts +0 -130
  48. package/dist/prompts/analyze/compare-integration.d.ts.map +0 -1
  49. package/dist/prompts/analyze/compare-integration.js +0 -547
  50. package/dist/prompts/analyze/compare-integration.js.map +0 -1
  51. package/dist/prompts/analyze/count-files.d.ts +0 -109
  52. package/dist/prompts/analyze/count-files.d.ts.map +0 -1
  53. package/dist/prompts/analyze/count-files.js +0 -403
  54. package/dist/prompts/analyze/count-files.js.map +0 -1
  55. package/dist/prompts/analyze/database-queries.d.ts +0 -156
  56. package/dist/prompts/analyze/database-queries.d.ts.map +0 -1
  57. package/dist/prompts/analyze/database-queries.js +0 -763
  58. package/dist/prompts/analyze/database-queries.js.map +0 -1
  59. package/dist/prompts/analyze/dependencies.d.ts +0 -97
  60. package/dist/prompts/analyze/dependencies.d.ts.map +0 -1
  61. package/dist/prompts/analyze/dependencies.js +0 -337
  62. package/dist/prompts/analyze/dependencies.js.map +0 -1
  63. package/dist/prompts/analyze/diff-signatures.d.ts +0 -139
  64. package/dist/prompts/analyze/diff-signatures.d.ts.map +0 -1
  65. package/dist/prompts/analyze/diff-signatures.js +0 -708
  66. package/dist/prompts/analyze/diff-signatures.js.map +0 -1
  67. package/dist/prompts/analyze/find-patterns.d.ts +0 -128
  68. package/dist/prompts/analyze/find-patterns.d.ts.map +0 -1
  69. package/dist/prompts/analyze/find-patterns.js +0 -524
  70. package/dist/prompts/analyze/find-patterns.js.map +0 -1
  71. package/dist/prompts/analyze/find-unused-css.d.ts +0 -151
  72. package/dist/prompts/analyze/find-unused-css.d.ts.map +0 -1
  73. package/dist/prompts/analyze/find-unused-css.js +0 -760
  74. package/dist/prompts/analyze/find-unused-css.js.map +0 -1
  75. package/dist/prompts/analyze/n8n-workflow.d.ts +0 -137
  76. package/dist/prompts/analyze/n8n-workflow.d.ts.map +0 -1
  77. package/dist/prompts/analyze/n8n-workflow.js +0 -533
  78. package/dist/prompts/analyze/n8n-workflow.js.map +0 -1
  79. package/dist/prompts/analyze/project-structure.d.ts +0 -126
  80. package/dist/prompts/analyze/project-structure.d.ts.map +0 -1
  81. package/dist/prompts/analyze/project-structure.js +0 -573
  82. package/dist/prompts/analyze/project-structure.js.map +0 -1
  83. package/dist/prompts/analyze/security-audit.d.ts +0 -142
  84. package/dist/prompts/analyze/security-audit.d.ts.map +0 -1
  85. package/dist/prompts/analyze/security-audit.js +0 -641
  86. package/dist/prompts/analyze/security-audit.js.map +0 -1
  87. package/dist/prompts/analyze/single-file.d.ts +0 -162
  88. package/dist/prompts/analyze/single-file.d.ts.map +0 -1
  89. package/dist/prompts/analyze/single-file.js +0 -669
  90. package/dist/prompts/analyze/single-file.js.map +0 -1
  91. package/dist/prompts/analyze/trace-execution.d.ts +0 -126
  92. package/dist/prompts/analyze/trace-execution.d.ts.map +0 -1
  93. package/dist/prompts/analyze/trace-execution.js +0 -613
  94. package/dist/prompts/analyze/trace-execution.js.map +0 -1
  95. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts +0 -116
  96. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts.map +0 -1
  97. package/dist/prompts/analyze/wordpress-plugin-audit.js +0 -456
  98. package/dist/prompts/analyze/wordpress-plugin-audit.js.map +0 -1
  99. package/dist/prompts/analyze/wordpress-plugin-readiness.d.ts +0 -103
  100. package/dist/prompts/analyze/wordpress-plugin-readiness.d.ts.map +0 -1
  101. package/dist/prompts/analyze/wordpress-plugin-readiness.js +0 -506
  102. package/dist/prompts/analyze/wordpress-plugin-readiness.js.map +0 -1
  103. package/dist/prompts/analyze/wordpress-security.d.ts +0 -146
  104. package/dist/prompts/analyze/wordpress-security.d.ts.map +0 -1
  105. package/dist/prompts/analyze/wordpress-security.js +0 -702
  106. package/dist/prompts/analyze/wordpress-security.js.map +0 -1
  107. package/dist/prompts/analyze/wordpress-theme-audit.d.ts +0 -114
  108. package/dist/prompts/analyze/wordpress-theme-audit.d.ts.map +0 -1
  109. package/dist/prompts/analyze/wordpress-theme-audit.js +0 -540
  110. package/dist/prompts/analyze/wordpress-theme-audit.js.map +0 -1
  111. package/dist/prompts/custom/custom-prompt.d.ts +0 -135
  112. package/dist/prompts/custom/custom-prompt.d.ts.map +0 -1
  113. package/dist/prompts/custom/custom-prompt.js +0 -421
  114. package/dist/prompts/custom/custom-prompt.js.map +0 -1
  115. package/dist/prompts/fun/arcade-game.d.ts +0 -152
  116. package/dist/prompts/fun/arcade-game.d.ts.map +0 -1
  117. package/dist/prompts/fun/arcade-game.js +0 -657
  118. package/dist/prompts/fun/arcade-game.js.map +0 -1
  119. package/dist/prompts/fun/create_text_adventure.d.ts +0 -100
  120. package/dist/prompts/fun/create_text_adventure.d.ts.map +0 -1
  121. package/dist/prompts/fun/create_text_adventure.js +0 -401
  122. package/dist/prompts/fun/create_text_adventure.js.map +0 -1
  123. package/dist/prompts/fun/css-art-generator.d.ts +0 -168
  124. package/dist/prompts/fun/css-art-generator.d.ts.map +0 -1
  125. package/dist/prompts/fun/css-art-generator.js +0 -831
  126. package/dist/prompts/fun/css-art-generator.js.map +0 -1
  127. package/dist/prompts/generate/project-documentation.d.ts +0 -137
  128. package/dist/prompts/generate/project-documentation.d.ts.map +0 -1
  129. package/dist/prompts/generate/project-documentation.js +0 -670
  130. package/dist/prompts/generate/project-documentation.js.map +0 -1
  131. package/dist/prompts/generate/refactoring.d.ts +0 -164
  132. package/dist/prompts/generate/refactoring.d.ts.map +0 -1
  133. package/dist/prompts/generate/refactoring.js +0 -625
  134. package/dist/prompts/generate/refactoring.js.map +0 -1
  135. package/dist/prompts/generate/responsive-component.d.ts +0 -147
  136. package/dist/prompts/generate/responsive-component.d.ts.map +0 -1
  137. package/dist/prompts/generate/responsive-component.js +0 -957
  138. package/dist/prompts/generate/responsive-component.js.map +0 -1
  139. package/dist/prompts/generate/typescript-conversion.d.ts +0 -144
  140. package/dist/prompts/generate/typescript-conversion.d.ts.map +0 -1
  141. package/dist/prompts/generate/typescript-conversion.js +0 -531
  142. package/dist/prompts/generate/typescript-conversion.js.map +0 -1
  143. package/dist/prompts/generate/unit-tests.d.ts +0 -139
  144. package/dist/prompts/generate/unit-tests.d.ts.map +0 -1
  145. package/dist/prompts/generate/unit-tests.js +0 -582
  146. package/dist/prompts/generate/unit-tests.js.map +0 -1
  147. package/dist/prompts/generate/wordpress-plugin.d.ts +0 -179
  148. package/dist/prompts/generate/wordpress-plugin.d.ts.map +0 -1
  149. package/dist/prompts/generate/wordpress-plugin.js +0 -767
  150. package/dist/prompts/generate/wordpress-plugin.js.map +0 -1
  151. package/dist/prompts/generate/wordpress-theme-from-static.d.ts +0 -177
  152. package/dist/prompts/generate/wordpress-theme-from-static.d.ts.map +0 -1
  153. package/dist/prompts/generate/wordpress-theme-from-static.js +0 -699
  154. package/dist/prompts/generate/wordpress-theme-from-static.js.map +0 -1
  155. package/dist/prompts/shared/cache-manager.d.ts +0 -45
  156. package/dist/prompts/shared/cache-manager.d.ts.map +0 -1
  157. package/dist/prompts/shared/cache-manager.js +0 -129
  158. package/dist/prompts/shared/cache-manager.js.map +0 -1
  159. package/dist/prompts/shared/helpers.d.ts +0 -39
  160. package/dist/prompts/shared/helpers.d.ts.map +0 -1
  161. package/dist/prompts/shared/helpers.js +0 -151
  162. package/dist/prompts/shared/helpers.js.map +0 -1
  163. package/dist/prompts/shared/templates.d.ts +0 -35
  164. package/dist/prompts/shared/templates.d.ts.map +0 -1
  165. package/dist/prompts/shared/templates.js +0 -77
  166. package/dist/prompts/shared/templates.js.map +0 -1
  167. package/dist/prompts/shared/types.d.ts +0 -112
  168. package/dist/prompts/shared/types.d.ts.map +0 -1
  169. package/dist/prompts/shared/types.js +0 -5
  170. package/dist/prompts/shared/types.js.map +0 -1
  171. package/dist/prompts/system/find-unused-files.d.ts +0 -106
  172. package/dist/prompts/system/find-unused-files.d.ts.map +0 -1
  173. package/dist/prompts/system/find-unused-files.js +0 -357
  174. package/dist/prompts/system/find-unused-files.js.map +0 -1
  175. package/dist/security/index.d.ts +0 -39
  176. package/dist/security/index.d.ts.map +0 -1
  177. package/dist/security/index.js +0 -46
  178. package/dist/security/index.js.map +0 -1
  179. package/dist/security/integration-helpers.d.ts +0 -121
  180. package/dist/security/integration-helpers.d.ts.map +0 -1
  181. package/dist/security/integration-helpers.js +0 -190
  182. package/dist/security/integration-helpers.js.map +0 -1
  183. package/dist/security/output-encoder.d.ts +0 -94
  184. package/dist/security/output-encoder.d.ts.map +0 -1
  185. package/dist/security/output-encoder.js +0 -295
  186. package/dist/security/output-encoder.js.map +0 -1
  187. package/dist/security/prompt-injection-guard.d.ts +0 -59
  188. package/dist/security/prompt-injection-guard.d.ts.map +0 -1
  189. package/dist/security/prompt-injection-guard.js +0 -249
  190. package/dist/security/prompt-injection-guard.js.map +0 -1
  191. package/dist/security/sanitisation.d.ts +0 -67
  192. package/dist/security/sanitisation.d.ts.map +0 -1
  193. package/dist/security/sanitisation.js +0 -398
  194. package/dist/security/sanitisation.js.map +0 -1
  195. package/dist/security/security-service.d.ts +0 -103
  196. package/dist/security/security-service.d.ts.map +0 -1
  197. package/dist/security/security-service.js +0 -303
  198. package/dist/security/security-service.js.map +0 -1
  199. package/dist/security-config.d.ts +0 -45
  200. package/dist/security-config.d.ts.map +0 -1
  201. package/dist/security-config.js +0 -63
  202. package/dist/security-config.js.map +0 -1
  203. package/dist/system/function-list.d.ts +0 -61
  204. package/dist/system/function-list.d.ts.map +0 -1
  205. package/dist/system/function-list.js +0 -111
  206. package/dist/system/function-list.js.map +0 -1
  207. package/dist/system/function-registry.d.ts +0 -23
  208. package/dist/system/function-registry.d.ts.map +0 -1
  209. package/dist/system/function-registry.js +0 -136
  210. package/dist/system/function-registry.js.map +0 -1
  211. package/dist/system/health-check.d.ts +0 -33
  212. package/dist/system/health-check.d.ts.map +0 -1
  213. package/dist/system/health-check.js +0 -98
  214. package/dist/system/health-check.js.map +0 -1
  215. package/dist/system/path-resolver.d.ts +0 -55
  216. package/dist/system/path-resolver.d.ts.map +0 -1
  217. package/dist/system/path-resolver.js +0 -90
  218. package/dist/system/path-resolver.js.map +0 -1
  219. package/dist/templates/plugin-template.d.ts +0 -121
  220. package/dist/templates/plugin-template.d.ts.map +0 -1
  221. package/dist/templates/plugin-template.js +0 -454
  222. package/dist/templates/plugin-template.js.map +0 -1
  223. package/dist/types/chunking-types.d.ts +0 -88
  224. package/dist/types/chunking-types.d.ts.map +0 -1
  225. package/dist/types/chunking-types.js +0 -18
  226. package/dist/types/chunking-types.js.map +0 -1
  227. package/dist/types/prompt-stages.d.ts +0 -30
  228. package/dist/types/prompt-stages.d.ts.map +0 -1
  229. package/dist/types/prompt-stages.js +0 -6
  230. package/dist/types/prompt-stages.js.map +0 -1
  231. package/dist/types.d.ts +0 -45
  232. package/dist/types.d.ts.map +0 -1
  233. package/dist/types.js +0 -6
  234. package/dist/types.js.map +0 -1
  235. package/dist/utils/css-parser.d.ts +0 -26
  236. package/dist/utils/css-parser.d.ts.map +0 -1
  237. package/dist/utils/css-parser.js +0 -117
  238. package/dist/utils/css-parser.js.map +0 -1
  239. package/dist/utils/path-resolver.d.ts +0 -13
  240. package/dist/utils/path-resolver.d.ts.map +0 -1
  241. package/dist/utils/path-resolver.js +0 -78
  242. package/dist/utils/path-resolver.js.map +0 -1
  243. package/dist/utils/plugin-utilities.d.ts +0 -176
  244. package/dist/utils/plugin-utilities.d.ts.map +0 -1
  245. package/dist/utils/plugin-utilities.js +0 -269
  246. package/dist/utils/plugin-utilities.js.map +0 -1
  247. package/dist/utils/streamHandler.d.ts +0 -3
  248. package/dist/utils/streamHandler.d.ts.map +0 -1
  249. package/dist/utils/streamHandler.js +0 -137
  250. package/dist/utils/streamHandler.js.map +0 -1
  251. package/dist/validation/output-validator.d.ts +0 -136
  252. package/dist/validation/output-validator.d.ts.map +0 -1
  253. package/dist/validation/output-validator.js +0 -262
  254. package/dist/validation/output-validator.js.map +0 -1
  255. package/dist/validation/response-factory.d.ts +0 -44
  256. package/dist/validation/response-factory.d.ts.map +0 -1
  257. package/dist/validation/response-factory.js +0 -202
  258. package/dist/validation/response-factory.js.map +0 -1
  259. package/dist/validation/schemas.d.ts +0 -519
  260. package/dist/validation/schemas.d.ts.map +0 -1
  261. package/dist/validation/schemas.js +0 -6
  262. package/dist/validation/schemas.js.map +0 -1
@@ -1,547 +0,0 @@
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, TokenCalculator } from '../../utils/plugin-utilities.js';
14
- import { getAnalysisCache } from '../../cache/index.js';
15
- export class IntegrationComparator extends BasePlugin {
16
- constructor() {
17
- super();
18
- this.name = 'compare_integration';
19
- this.category = 'analyze';
20
- this.description = 'Compare integration between multiple files to identify mismatches, missing imports, and compatibility issues. Returns actionable fixes with line numbers.';
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 analyze (for single-file analysis)',
27
- required: false
28
- },
29
- filePath: {
30
- type: 'string',
31
- description: 'Path to single file to analyze',
32
- required: false
33
- },
34
- // Multi-file parameters
35
- projectPath: {
36
- type: 'string',
37
- description: 'Path to project root (for multi-file analysis)',
38
- required: false
39
- },
40
- files: {
41
- type: 'array',
42
- description: 'Array of absolute file paths to analyze',
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
- analysisDepth: {
60
- type: 'string',
61
- description: 'Level of analysis detail',
62
- enum: ['basic', 'detailed', 'comprehensive'],
63
- default: 'detailed',
64
- required: false
65
- },
66
- analysisType: {
67
- type: 'string',
68
- description: 'Type of integration analysis to perform',
69
- enum: ['integration', 'compatibility', 'dependencies'],
70
- default: 'integration',
71
- required: false
72
- },
73
- focus: {
74
- type: 'array',
75
- description: 'Specific areas to focus on: method_compatibility, namespace_dependencies, data_flow, missing_connections',
76
- required: false,
77
- default: [],
78
- items: { type: 'string' }
79
- }
80
- };
81
- this.analysisCache = getAnalysisCache();
82
- this.multiFileAnalysis = new MultiFileAnalysis();
83
- // Cache and analysis utilities are initialized above
84
- }
85
- async execute(params, llmClient) {
86
- return await withSecurity(this, params, llmClient, async (secureParams) => {
87
- try {
88
- // 1. Auto-detect analysis mode based on parameters
89
- const analysisMode = this.detectAnalysisMode(secureParams);
90
- // 2. Validate parameters based on detected mode
91
- this.validateParameters(secureParams, analysisMode);
92
- // 3. Setup model
93
- const { model, contextLength } = await ModelSetup.getReadyModel(llmClient);
94
- // 4. Route to appropriate analysis method
95
- if (analysisMode === 'single-file') {
96
- return await this.executeSingleFileAnalysis(secureParams, model, contextLength);
97
- }
98
- else {
99
- return await this.executeMultiFileAnalysis(secureParams, model, contextLength);
100
- }
101
- }
102
- catch (error) {
103
- return ErrorHandler.createExecutionError('compare_integration', error);
104
- }
105
- });
106
- }
107
- /**
108
- * Auto-detect whether this is single-file or multi-file analysis
109
- * Integration comparison is primarily a multi-file operation
110
- */
111
- detectAnalysisMode(params) {
112
- // Single-file indicators (for analyzing integration patterns within one file)
113
- if (params.code || (params.filePath && !params.files && !params.projectPath)) {
114
- return 'single-file';
115
- }
116
- // Multi-file indicators - primary use case
117
- if (params.projectPath || params.files) {
118
- return 'multi-file';
119
- }
120
- // Default to multi-file for integration comparison
121
- return 'multi-file';
122
- }
123
- /**
124
- * Validate parameters based on detected analysis mode
125
- */
126
- validateParameters(params, mode) {
127
- if (mode === 'single-file') {
128
- ParameterValidator.validateCodeOrFile(params);
129
- }
130
- else {
131
- // For multi-file, we need either projectPath OR files (at least 2)
132
- if (!params.projectPath && (!params.files || params.files.length < 2)) {
133
- throw new Error('Multi-file integration analysis requires either projectPath or at least 2 files');
134
- }
135
- if (params.projectPath) {
136
- ParameterValidator.validateProjectPath(params);
137
- ParameterValidator.validateDepth(params);
138
- }
139
- }
140
- // Universal validations
141
- ParameterValidator.validateEnum(params, 'analysisType', ['integration', 'compatibility', 'dependencies']);
142
- ParameterValidator.validateEnum(params, 'analysisDepth', ['basic', 'detailed', 'comprehensive']);
143
- }
144
- /**
145
- * Execute single-file analysis for integration patterns
146
- */
147
- async executeSingleFileAnalysis(params, model, contextLength) {
148
- // Process single file input
149
- let codeToAnalyze = params.code;
150
- if (params.filePath) {
151
- codeToAnalyze = await readFileContent(params.filePath);
152
- }
153
- // Generate prompt stages for single file
154
- const promptStages = this.getSingleFilePromptStages({
155
- ...params,
156
- code: codeToAnalyze
157
- });
158
- // Execute with appropriate method
159
- const promptManager = new ThreeStagePromptManager();
160
- const needsChunking = TokenCalculator.needsChunking(promptStages, contextLength);
161
- if (needsChunking) {
162
- const chunkSize = TokenCalculator.calculateOptimalChunkSize(promptStages, contextLength);
163
- const dataChunks = promptManager.chunkDataPayload(promptStages.dataPayload, chunkSize);
164
- const conversation = promptManager.createChunkedConversation(promptStages, dataChunks);
165
- const messages = [
166
- conversation.systemMessage,
167
- ...conversation.dataMessages,
168
- conversation.analysisMessage
169
- ];
170
- return await ResponseProcessor.executeChunked(messages, model, contextLength, 'compare_integration', 'single');
171
- }
172
- else {
173
- return await ResponseProcessor.executeDirect(promptStages, model, contextLength, 'compare_integration');
174
- }
175
- }
176
- /**
177
- * Execute multi-file analysis for cross-file integration
178
- */
179
- async executeMultiFileAnalysis(params, model, contextLength) {
180
- // Discover files
181
- let filesToAnalyze = params.files ||
182
- await this.discoverRelevantFiles(params.projectPath, params.maxDepth, params.analysisType);
183
- // Perform multi-file analysis with caching
184
- const analysisResult = await this.performMultiFileAnalysis(filesToAnalyze, params, model, contextLength);
185
- // Generate prompt stages for multi-file
186
- const promptStages = this.getMultiFilePromptStages({
187
- ...params,
188
- analysisResult,
189
- fileCount: filesToAnalyze.length
190
- });
191
- // Always use chunking for multi-file
192
- const promptManager = new ThreeStagePromptManager();
193
- const chunkSize = TokenCalculator.calculateOptimalChunkSize(promptStages, contextLength);
194
- const dataChunks = promptManager.chunkDataPayload(promptStages.dataPayload, chunkSize);
195
- const conversation = promptManager.createChunkedConversation(promptStages, dataChunks);
196
- const messages = [
197
- conversation.systemMessage,
198
- ...conversation.dataMessages,
199
- conversation.analysisMessage
200
- ];
201
- return await ResponseProcessor.executeChunked(messages, model, contextLength, 'compare_integration', 'multifile');
202
- }
203
- /**
204
- * Single-file integration pattern analysis
205
- */
206
- getSingleFilePromptStages(params) {
207
- const { code, language, analysisDepth, analysisType, focus } = params;
208
- const systemAndContext = `You are a senior software architect and integration specialist with 15+ years of experience analyzing ${language} codebases.
209
-
210
- **ANALYSIS CONTEXT:**
211
- - Language: ${language}
212
- - Analysis Depth: ${analysisDepth}
213
- - Analysis Type: ${analysisType}
214
- - Focus Areas: ${focus && focus.length > 0 ? focus.join(', ') : 'General integration patterns'}
215
- - Mode: Single File Integration Pattern Analysis
216
-
217
- **YOUR EXPERTISE:**
218
- - Deep understanding of integration patterns and anti-patterns
219
- - Master of API design, interface contracts, and dependency management
220
- - Expert in identifying potential integration issues before they cause runtime problems
221
- - Specialist in providing actionable, specific recommendations with code examples
222
-
223
- Your task is to analyze this single file for integration readiness, interface design quality, and potential compatibility issues with other components.`;
224
- const dataPayload = `**FILE TO ANALYZE FOR INTEGRATION PATTERNS:**
225
-
226
- \`\`\`${language}
227
- ${code}
228
- \`\`\``;
229
- const outputInstructions = `**PROVIDE CLEAN MARKDOWN INTEGRATION ANALYSIS:**
230
-
231
- # Single File Integration Analysis
232
-
233
- ## Integration Readiness: [Excellent/Good/Fair/Poor]
234
-
235
- ## Key Findings
236
- - **Interface Quality**: [Assessment of exports/public methods]
237
- - **Dependency Health**: [Import/dependency structure assessment]
238
- - **Contract Clarity**: [Method signatures and types assessment]
239
-
240
- ## Integration Issues Found
241
-
242
- ### Critical Issues
243
- - [Issue description with line numbers if applicable]
244
-
245
- ### Recommendations
246
- 1. [Specific actionable recommendations]
247
- 2. [Interface improvements needed]
248
- 3. [Type safety enhancements]
249
-
250
- ## Integration Strengths
251
- - [Good patterns already in use]
252
- - [Defensive programming practices]
253
-
254
- **Analysis Complete** - Focus on actionable insights, not raw code dumps.`;
255
- return { systemAndContext, dataPayload, outputInstructions };
256
- }
257
- /**
258
- * Multi-file cross-integration analysis
259
- */
260
- getMultiFilePromptStages(params) {
261
- const { analysisResult, analysisType, analysisDepth, fileCount, focus } = params;
262
- const systemAndContext = `You are a senior software architect and integration specialist with 15+ years of experience analyzing complex multi-file systems.
263
-
264
- **ANALYSIS CONTEXT:**
265
- - Analysis Type: ${analysisType}
266
- - Analysis Depth: ${analysisDepth}
267
- - Files Analyzed: ${fileCount}
268
- - Focus Areas: ${focus && focus.length > 0 ? focus.join(', ') : 'Comprehensive integration analysis'}
269
- - Mode: Multi-File Integration Comparison
270
-
271
- **YOUR EXPERTISE:**
272
- - Master of cross-file dependency analysis and interface compatibility
273
- - Expert in identifying integration anti-patterns that cause runtime failures
274
- - Specialist in API contract validation and method signature compatibility
275
- - Authority on data flow analysis and architectural integration patterns
276
- - Expert at providing specific, actionable fixes with line numbers and code examples
277
-
278
- **CRITICAL ANALYSIS AREAS:**
279
- - Method signature mismatches between files
280
- - Missing imports and unused exports
281
- - Data type incompatibilities across interfaces
282
- - Circular dependency detection
283
- - Interface contract violations
284
- - Error handling consistency across file boundaries
285
-
286
- Your task is to perform deep cross-file integration analysis, identifying ALL compatibility issues with specific fixes.`;
287
- const dataPayload = `**MULTI-FILE INTEGRATION ANALYSIS DATA:**
288
-
289
- ${JSON.stringify(analysisResult, null, 2)}`;
290
- const outputInstructions = `**PROVIDE CLEAN MARKDOWN MULTI-FILE INTEGRATION ANALYSIS:**
291
-
292
- # Multi-File Integration Analysis Report
293
-
294
- ## Executive Summary
295
- - **Overall Integration Health**: [Excellent/Good/Fair/Poor/Critical]
296
- - **Files Analyzed**: ${fileCount}
297
- - **Critical Issues**: [Count]
298
- - **Integration Risk**: [Low/Medium/High/Critical]
299
-
300
- ## Key Integration Issues Found
301
-
302
- ### 🚨 Critical Issues (Fix Immediately)
303
- 1. **[Issue Type]** in [filename.ts:123]
304
- - **Problem**: [Brief description]
305
- - **Impact**: [What breaks]
306
- - **Fix**: [Specific solution]
307
-
308
- ### ⚠️ High Priority Issues
309
- 1. **[Issue Type]** between [file1.ts] and [file2.ts]
310
- - **Problem**: [Description]
311
- - **Fix**: [Solution]
312
-
313
- ### 📋 Medium Priority Issues
314
- - [List of less critical but important issues]
315
-
316
- ## Method Compatibility Analysis
317
- - **Compatible Calls**: [Count] ✅
318
- - **Signature Mismatches**: [Count] ❌
319
- - **Missing Implementations**: [Count] ⚠️
320
-
321
- ## Import/Export Health
322
- - **Clean Dependencies**: [Count] ✅
323
- - **Unused Exports**: [Count] 🧹
324
- - **Missing Imports**: [Count] ❌
325
- - **Circular Dependencies**: [Count] 🔄
326
-
327
- ## Architecture Assessment
328
- - **Design Patterns**: [Good patterns found]
329
- - **Anti-Patterns**: [Problematic patterns]
330
- - **Coupling**: [Tight/Loose assessment]
331
-
332
- ## Priority Action Plan
333
-
334
- ### Phase 1: Critical Fixes (Do First)
335
- 1. [Fix critical integration breakages]
336
- 2. [Resolve method signature mismatches]
337
-
338
- ### Phase 2: Improvements (Do Next)
339
- 1. [Clean up unused exports]
340
- 2. [Improve interface consistency]
341
-
342
- ### Phase 3: Long-term (Do Later)
343
- 1. [Architectural improvements]
344
- 2. [Enhanced error handling]
345
-
346
- ## Integration Testing Recommendations
347
- - [Specific integration tests to write]
348
- - [Mock strategies to use]
349
- - [Error scenarios to test]
350
-
351
- **Analysis Complete** - Focused on actionable insights, not data dumps.`;
352
- return { systemAndContext, dataPayload, outputInstructions };
353
- }
354
- /**
355
- * Backwards compatibility method
356
- */
357
- getPromptStages(params) {
358
- const mode = this.detectAnalysisMode(params);
359
- if (mode === 'single-file') {
360
- return this.getSingleFilePromptStages(params);
361
- }
362
- else {
363
- return this.getMultiFilePromptStages(params);
364
- }
365
- }
366
- // Multi-file helper methods
367
- async discoverRelevantFiles(projectPath, maxDepth, analysisType) {
368
- const extensions = this.getFileExtensions(analysisType);
369
- return await this.multiFileAnalysis.discoverFiles(projectPath, extensions, maxDepth);
370
- }
371
- async performMultiFileAnalysis(files, params, model, contextLength) {
372
- const cacheKey = this.analysisCache.generateKey('compare_integration', params, files);
373
- const cached = await this.analysisCache.get(cacheKey);
374
- if (cached)
375
- return cached;
376
- const fileAnalysisResults = await this.multiFileAnalysis.analyzeBatch(files, (file) => this.analyzeIndividualFile(file, params, model), contextLength);
377
- // Aggregate results for integration analysis (focus on insights, not raw content)
378
- const aggregatedResult = {
379
- summary: `Integration analysis of ${files.length} files`,
380
- integrationInsights: {
381
- fileCount: files.length,
382
- totalSize: fileAnalysisResults.reduce((sum, result) => sum + (result.size || 0), 0),
383
- exportCount: this.countExports(fileAnalysisResults),
384
- importCount: this.countImports(fileAnalysisResults),
385
- methodCount: this.countMethods(fileAnalysisResults),
386
- interfaceCount: this.countInterfaces(fileAnalysisResults),
387
- integrationPatterns: this.identifyIntegrationPatterns(fileAnalysisResults),
388
- potentialIssues: this.identifyPotentialIssues(fileAnalysisResults)
389
- },
390
- fileList: fileAnalysisResults.map(f => ({
391
- fileName: f.fileName,
392
- filePath: f.filePath,
393
- size: f.size,
394
- lines: f.lines,
395
- hasExports: f.integrationInfo?.exports?.length > 0,
396
- hasImports: f.integrationInfo?.imports?.length > 0,
397
- methodCount: f.integrationInfo?.methods?.length || 0
398
- }))
399
- };
400
- await this.analysisCache.cacheAnalysis(cacheKey, aggregatedResult, {
401
- modelUsed: model.identifier || 'unknown',
402
- executionTime: Date.now() - Date.now(), // TODO: Track actual execution time
403
- timestamp: new Date().toISOString()
404
- });
405
- return aggregatedResult;
406
- }
407
- async analyzeIndividualFile(file, params, model) {
408
- const content = await import('fs/promises').then(fs => fs.readFile(file, 'utf-8'));
409
- const stats = await import('fs/promises').then(fs => fs.stat(file));
410
- // Extract integration-relevant information
411
- const imports = this.extractFileImports(content);
412
- const exports = this.extractFileExports(content);
413
- const methods = this.extractFileMethods(content);
414
- const interfaces = this.extractFileInterfaces(content);
415
- return {
416
- filePath: file,
417
- fileName: file.split(/[/\\]/).pop(),
418
- size: content.length,
419
- lines: content.split('\n').length,
420
- extension: file.split('.').pop() || '',
421
- modified: stats.mtime,
422
- content: content.length < 2000 ? content : `[${content.length} characters] - Content available for analysis`, // Minimal content for context
423
- integrationInfo: {
424
- imports,
425
- exports,
426
- methods,
427
- interfaces
428
- }
429
- };
430
- }
431
- countExports(fileResults) {
432
- return fileResults.reduce((sum, file) => sum + (file.integrationInfo?.exports?.length || 0), 0);
433
- }
434
- countImports(fileResults) {
435
- return fileResults.reduce((sum, file) => sum + (file.integrationInfo?.imports?.length || 0), 0);
436
- }
437
- countMethods(fileResults) {
438
- return fileResults.reduce((sum, file) => sum + (file.integrationInfo?.methods?.length || 0), 0);
439
- }
440
- countInterfaces(fileResults) {
441
- return fileResults.reduce((sum, file) => sum + (file.integrationInfo?.interfaces?.length || 0), 0);
442
- }
443
- identifyIntegrationPatterns(fileResults) {
444
- const patterns = [];
445
- // Simple pattern detection based on file analysis
446
- if (fileResults.some(f => f.fileName?.includes('base-') || f.fileName?.includes('Base'))) {
447
- patterns.push('Inheritance Pattern');
448
- }
449
- if (fileResults.some(f => f.fileName?.includes('interface') || f.fileName?.includes('Interface'))) {
450
- patterns.push('Interface Segregation');
451
- }
452
- if (fileResults.some(f => f.fileName?.includes('factory') || f.fileName?.includes('Factory'))) {
453
- patterns.push('Factory Pattern');
454
- }
455
- return patterns;
456
- }
457
- identifyPotentialIssues(fileResults) {
458
- const issues = [];
459
- // Simple issue detection
460
- const largeFiles = fileResults.filter(f => f.size > 50000);
461
- if (largeFiles.length > 0) {
462
- issues.push(`Large files detected: ${largeFiles.length} files > 50KB`);
463
- }
464
- const filesWithManyMethods = fileResults.filter(f => (f.integrationInfo?.methods?.length || 0) > 20);
465
- if (filesWithManyMethods.length > 0) {
466
- issues.push(`High method count: ${filesWithManyMethods.length} files with >20 methods`);
467
- }
468
- return issues;
469
- }
470
- extractExports(fileResults) {
471
- return fileResults.flatMap(file => file.integrationInfo?.exports || []);
472
- }
473
- extractImports(fileResults) {
474
- return fileResults.flatMap(file => file.integrationInfo?.imports || []);
475
- }
476
- extractMethods(fileResults) {
477
- return fileResults.flatMap(file => file.integrationInfo?.methods || []);
478
- }
479
- extractInterfaces(fileResults) {
480
- return fileResults.flatMap(file => file.integrationInfo?.interfaces || []);
481
- }
482
- // Simple pattern matching for integration elements (can be enhanced)
483
- extractFileImports(content) {
484
- const importRegex = /import\s+.*\s+from\s+['"`]([^'"`]+)['"`]/g;
485
- const imports = [];
486
- let match;
487
- while ((match = importRegex.exec(content)) !== null) {
488
- imports.push({
489
- module: match[1],
490
- line: content.substring(0, match.index).split('\n').length
491
- });
492
- }
493
- return imports;
494
- }
495
- extractFileExports(content) {
496
- const exportRegex = /export\s+(function|class|const|let|var|interface|type)\s+(\w+)/g;
497
- const exports = [];
498
- let match;
499
- while ((match = exportRegex.exec(content)) !== null) {
500
- exports.push({
501
- type: match[1],
502
- name: match[2],
503
- line: content.substring(0, match.index).split('\n').length
504
- });
505
- }
506
- return exports;
507
- }
508
- extractFileMethods(content) {
509
- const methodRegex = /(function\s+(\w+)|(\w+)\s*\(.*?\)\s*[{:])/g;
510
- const methods = [];
511
- let match;
512
- while ((match = methodRegex.exec(content)) !== null) {
513
- methods.push({
514
- name: match[2] || match[3],
515
- line: content.substring(0, match.index).split('\n').length
516
- });
517
- }
518
- return methods;
519
- }
520
- extractFileInterfaces(content) {
521
- const interfaceRegex = /interface\s+(\w+)/g;
522
- const interfaces = [];
523
- let match;
524
- while ((match = interfaceRegex.exec(content)) !== null) {
525
- interfaces.push({
526
- name: match[1],
527
- line: content.substring(0, match.index).split('\n').length
528
- });
529
- }
530
- return interfaces;
531
- }
532
- getFileExtensions(analysisType) {
533
- const extensionMap = {
534
- 'integration': ['.js', '.ts', '.jsx', '.tsx', '.py', '.php', '.java', '.cs'],
535
- 'compatibility': ['.js', '.ts', '.jsx', '.tsx', '.d.ts'],
536
- 'dependencies': ['.js', '.ts', '.jsx', '.tsx', '.json', '.package.json']
537
- };
538
- return extensionMap[analysisType] || extensionMap.integration;
539
- }
540
- generateCacheKey(files, params) {
541
- const fileHash = files.join('|');
542
- const paramHash = JSON.stringify(params);
543
- return `${fileHash}_${paramHash}`.substring(0, 64);
544
- }
545
- }
546
- export default IntegrationComparator;
547
- //# sourceMappingURL=compare-integration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compare-integration.js","sourceRoot":"","sources":["../../../src/prompts/analyze/compare-integration.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,EACjB,eAAe,EAChB,MAAM,iCAAiC,CA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AC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM;aAC3D,CAAC,CAAC;QACL,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAEO,iBAAiB,CAAC,YAAoB;QAC5C,MAAM,YAAY,GAA6B;YAC7C,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;YAC5E,eAAe,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;YACxD,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,CAAC;SACzE,CAAC;QAEF,OAAO,YAAY,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC,WAAW,CAAC;IAChE,CAAC;IAEO,gBAAgB,CAAC,KAAe,EAAE,MAAW;QACnD,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACzC,OAAO,GAAG,QAAQ,IAAI,SAAS,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC;CACF;AAED,eAAe,qBAAqB,CAAC"}
@@ -1,109 +0,0 @@
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 { IPromptPlugin } from '../shared/types.js';
11
- import { PromptStages } from '../../types/prompt-stages.js';
12
- export declare class CountFilesAnalyzer extends BasePlugin implements IPromptPlugin {
13
- name: string;
14
- category: "analyze";
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
- language: {
47
- type: "string";
48
- description: string;
49
- required: boolean;
50
- default: string;
51
- };
52
- analysisDepth: {
53
- type: "string";
54
- description: string;
55
- enum: string[];
56
- default: string;
57
- required: boolean;
58
- };
59
- analysisType: {
60
- type: "string";
61
- description: string;
62
- enum: string[];
63
- default: string;
64
- required: boolean;
65
- };
66
- };
67
- private analysisCache;
68
- private multiFileAnalysis;
69
- constructor();
70
- execute(params: any, llmClient: any): Promise<any>;
71
- /**
72
- * Auto-detect whether this is single-file or multi-file analysis
73
- */
74
- private detectAnalysisMode;
75
- /**
76
- * Validate parameters based on detected analysis mode
77
- */
78
- private validateParameters;
79
- /**
80
- * Execute single-file analysis
81
- */
82
- private executeSingleFileAnalysis;
83
- /**
84
- * Execute multi-file analysis
85
- */
86
- private executeMultiFileAnalysis;
87
- /**
88
- * Implement single-file prompt stages for file analysis
89
- */
90
- private getSingleFilePromptStages;
91
- /**
92
- * Implement multi-file prompt stages for directory structure analysis
93
- */
94
- private getMultiFilePromptStages;
95
- /**
96
- * Implement for backwards compatibility
97
- * The system still expects this method, so we intelligently route to the appropriate stages
98
- */
99
- getPromptStages(params: any): PromptStages;
100
- private discoverRelevantFiles;
101
- private performMultiFileAnalysis;
102
- private analyzeIndividualFile;
103
- private getFileExtensions;
104
- private groupFilesByType;
105
- private buildDirectoryStructure;
106
- private generateCacheKey;
107
- }
108
- export default CountFilesAnalyzer;
109
- //# sourceMappingURL=count-files.d.ts.map