@houtini/lm 1.0.13 → 2.0.1

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 (264) hide show
  1. package/README.md +67 -237
  2. package/dist/index.d.ts +5 -3
  3. package/dist/index.js +149 -213
  4. package/dist/index.js.map +1 -1
  5. package/package.json +23 -32
  6. package/server.json +44 -0
  7. package/CHANGELOG.md +0 -282
  8. package/dist/cache/analysis-cache.d.ts +0 -33
  9. package/dist/cache/analysis-cache.d.ts.map +0 -1
  10. package/dist/cache/analysis-cache.js +0 -56
  11. package/dist/cache/analysis-cache.js.map +0 -1
  12. package/dist/cache/cache-manager.d.ts +0 -29
  13. package/dist/cache/cache-manager.d.ts.map +0 -1
  14. package/dist/cache/cache-manager.js +0 -85
  15. package/dist/cache/cache-manager.js.map +0 -1
  16. package/dist/cache/index.d.ts +0 -16
  17. package/dist/cache/index.d.ts.map +0 -1
  18. package/dist/cache/index.js +0 -17
  19. package/dist/cache/index.js.map +0 -1
  20. package/dist/cache/prompt-cache.d.ts +0 -33
  21. package/dist/cache/prompt-cache.d.ts.map +0 -1
  22. package/dist/cache/prompt-cache.js +0 -61
  23. package/dist/cache/prompt-cache.js.map +0 -1
  24. package/dist/config.d.ts +0 -41
  25. package/dist/config.d.ts.map +0 -1
  26. package/dist/config.js +0 -71
  27. package/dist/config.js.map +0 -1
  28. package/dist/core/ThreeStagePromptManager.d.ts +0 -23
  29. package/dist/core/ThreeStagePromptManager.d.ts.map +0 -1
  30. package/dist/core/ThreeStagePromptManager.js +0 -118
  31. package/dist/core/ThreeStagePromptManager.js.map +0 -1
  32. package/dist/index.d.ts.map +0 -1
  33. package/dist/plugins/base-plugin.d.ts +0 -55
  34. package/dist/plugins/base-plugin.d.ts.map +0 -1
  35. package/dist/plugins/base-plugin.js +0 -120
  36. package/dist/plugins/base-plugin.js.map +0 -1
  37. package/dist/plugins/index.d.ts +0 -58
  38. package/dist/plugins/index.d.ts.map +0 -1
  39. package/dist/plugins/index.js +0 -162
  40. package/dist/plugins/index.js.map +0 -1
  41. package/dist/plugins/types.d.ts +0 -5
  42. package/dist/plugins/types.d.ts.map +0 -1
  43. package/dist/plugins/types.js +0 -5
  44. package/dist/plugins/types.js.map +0 -1
  45. package/dist/prompts/analyze/code-quality.d.ts +0 -116
  46. package/dist/prompts/analyze/code-quality.d.ts.map +0 -1
  47. package/dist/prompts/analyze/code-quality.js +0 -437
  48. package/dist/prompts/analyze/code-quality.js.map +0 -1
  49. package/dist/prompts/analyze/compare-integration.d.ts +0 -130
  50. package/dist/prompts/analyze/compare-integration.d.ts.map +0 -1
  51. package/dist/prompts/analyze/compare-integration.js +0 -547
  52. package/dist/prompts/analyze/compare-integration.js.map +0 -1
  53. package/dist/prompts/analyze/count-files.d.ts +0 -109
  54. package/dist/prompts/analyze/count-files.d.ts.map +0 -1
  55. package/dist/prompts/analyze/count-files.js +0 -403
  56. package/dist/prompts/analyze/count-files.js.map +0 -1
  57. package/dist/prompts/analyze/database-queries.d.ts +0 -156
  58. package/dist/prompts/analyze/database-queries.d.ts.map +0 -1
  59. package/dist/prompts/analyze/database-queries.js +0 -763
  60. package/dist/prompts/analyze/database-queries.js.map +0 -1
  61. package/dist/prompts/analyze/dependencies.d.ts +0 -97
  62. package/dist/prompts/analyze/dependencies.d.ts.map +0 -1
  63. package/dist/prompts/analyze/dependencies.js +0 -337
  64. package/dist/prompts/analyze/dependencies.js.map +0 -1
  65. package/dist/prompts/analyze/diff-signatures.d.ts +0 -139
  66. package/dist/prompts/analyze/diff-signatures.d.ts.map +0 -1
  67. package/dist/prompts/analyze/diff-signatures.js +0 -708
  68. package/dist/prompts/analyze/diff-signatures.js.map +0 -1
  69. package/dist/prompts/analyze/find-patterns.d.ts +0 -128
  70. package/dist/prompts/analyze/find-patterns.d.ts.map +0 -1
  71. package/dist/prompts/analyze/find-patterns.js +0 -524
  72. package/dist/prompts/analyze/find-patterns.js.map +0 -1
  73. package/dist/prompts/analyze/find-unused-css.d.ts +0 -151
  74. package/dist/prompts/analyze/find-unused-css.d.ts.map +0 -1
  75. package/dist/prompts/analyze/find-unused-css.js +0 -760
  76. package/dist/prompts/analyze/find-unused-css.js.map +0 -1
  77. package/dist/prompts/analyze/n8n-workflow.d.ts +0 -137
  78. package/dist/prompts/analyze/n8n-workflow.d.ts.map +0 -1
  79. package/dist/prompts/analyze/n8n-workflow.js +0 -533
  80. package/dist/prompts/analyze/n8n-workflow.js.map +0 -1
  81. package/dist/prompts/analyze/project-structure.d.ts +0 -126
  82. package/dist/prompts/analyze/project-structure.d.ts.map +0 -1
  83. package/dist/prompts/analyze/project-structure.js +0 -573
  84. package/dist/prompts/analyze/project-structure.js.map +0 -1
  85. package/dist/prompts/analyze/security-audit.d.ts +0 -142
  86. package/dist/prompts/analyze/security-audit.d.ts.map +0 -1
  87. package/dist/prompts/analyze/security-audit.js +0 -641
  88. package/dist/prompts/analyze/security-audit.js.map +0 -1
  89. package/dist/prompts/analyze/single-file.d.ts +0 -162
  90. package/dist/prompts/analyze/single-file.d.ts.map +0 -1
  91. package/dist/prompts/analyze/single-file.js +0 -669
  92. package/dist/prompts/analyze/single-file.js.map +0 -1
  93. package/dist/prompts/analyze/trace-execution.d.ts +0 -126
  94. package/dist/prompts/analyze/trace-execution.d.ts.map +0 -1
  95. package/dist/prompts/analyze/trace-execution.js +0 -613
  96. package/dist/prompts/analyze/trace-execution.js.map +0 -1
  97. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts +0 -116
  98. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts.map +0 -1
  99. package/dist/prompts/analyze/wordpress-plugin-audit.js +0 -456
  100. package/dist/prompts/analyze/wordpress-plugin-audit.js.map +0 -1
  101. package/dist/prompts/analyze/wordpress-plugin-readiness.d.ts +0 -103
  102. package/dist/prompts/analyze/wordpress-plugin-readiness.d.ts.map +0 -1
  103. package/dist/prompts/analyze/wordpress-plugin-readiness.js +0 -506
  104. package/dist/prompts/analyze/wordpress-plugin-readiness.js.map +0 -1
  105. package/dist/prompts/analyze/wordpress-security.d.ts +0 -146
  106. package/dist/prompts/analyze/wordpress-security.d.ts.map +0 -1
  107. package/dist/prompts/analyze/wordpress-security.js +0 -702
  108. package/dist/prompts/analyze/wordpress-security.js.map +0 -1
  109. package/dist/prompts/analyze/wordpress-theme-audit.d.ts +0 -114
  110. package/dist/prompts/analyze/wordpress-theme-audit.d.ts.map +0 -1
  111. package/dist/prompts/analyze/wordpress-theme-audit.js +0 -540
  112. package/dist/prompts/analyze/wordpress-theme-audit.js.map +0 -1
  113. package/dist/prompts/custom/custom-prompt.d.ts +0 -135
  114. package/dist/prompts/custom/custom-prompt.d.ts.map +0 -1
  115. package/dist/prompts/custom/custom-prompt.js +0 -421
  116. package/dist/prompts/custom/custom-prompt.js.map +0 -1
  117. package/dist/prompts/fun/arcade-game.d.ts +0 -152
  118. package/dist/prompts/fun/arcade-game.d.ts.map +0 -1
  119. package/dist/prompts/fun/arcade-game.js +0 -657
  120. package/dist/prompts/fun/arcade-game.js.map +0 -1
  121. package/dist/prompts/fun/create_text_adventure.d.ts +0 -100
  122. package/dist/prompts/fun/create_text_adventure.d.ts.map +0 -1
  123. package/dist/prompts/fun/create_text_adventure.js +0 -401
  124. package/dist/prompts/fun/create_text_adventure.js.map +0 -1
  125. package/dist/prompts/fun/css-art-generator.d.ts +0 -168
  126. package/dist/prompts/fun/css-art-generator.d.ts.map +0 -1
  127. package/dist/prompts/fun/css-art-generator.js +0 -831
  128. package/dist/prompts/fun/css-art-generator.js.map +0 -1
  129. package/dist/prompts/generate/project-documentation.d.ts +0 -137
  130. package/dist/prompts/generate/project-documentation.d.ts.map +0 -1
  131. package/dist/prompts/generate/project-documentation.js +0 -670
  132. package/dist/prompts/generate/project-documentation.js.map +0 -1
  133. package/dist/prompts/generate/refactoring.d.ts +0 -164
  134. package/dist/prompts/generate/refactoring.d.ts.map +0 -1
  135. package/dist/prompts/generate/refactoring.js +0 -625
  136. package/dist/prompts/generate/refactoring.js.map +0 -1
  137. package/dist/prompts/generate/responsive-component.d.ts +0 -147
  138. package/dist/prompts/generate/responsive-component.d.ts.map +0 -1
  139. package/dist/prompts/generate/responsive-component.js +0 -957
  140. package/dist/prompts/generate/responsive-component.js.map +0 -1
  141. package/dist/prompts/generate/typescript-conversion.d.ts +0 -144
  142. package/dist/prompts/generate/typescript-conversion.d.ts.map +0 -1
  143. package/dist/prompts/generate/typescript-conversion.js +0 -531
  144. package/dist/prompts/generate/typescript-conversion.js.map +0 -1
  145. package/dist/prompts/generate/unit-tests.d.ts +0 -139
  146. package/dist/prompts/generate/unit-tests.d.ts.map +0 -1
  147. package/dist/prompts/generate/unit-tests.js +0 -582
  148. package/dist/prompts/generate/unit-tests.js.map +0 -1
  149. package/dist/prompts/generate/wordpress-plugin.d.ts +0 -179
  150. package/dist/prompts/generate/wordpress-plugin.d.ts.map +0 -1
  151. package/dist/prompts/generate/wordpress-plugin.js +0 -767
  152. package/dist/prompts/generate/wordpress-plugin.js.map +0 -1
  153. package/dist/prompts/generate/wordpress-theme-from-static.d.ts +0 -177
  154. package/dist/prompts/generate/wordpress-theme-from-static.d.ts.map +0 -1
  155. package/dist/prompts/generate/wordpress-theme-from-static.js +0 -699
  156. package/dist/prompts/generate/wordpress-theme-from-static.js.map +0 -1
  157. package/dist/prompts/shared/cache-manager.d.ts +0 -45
  158. package/dist/prompts/shared/cache-manager.d.ts.map +0 -1
  159. package/dist/prompts/shared/cache-manager.js +0 -129
  160. package/dist/prompts/shared/cache-manager.js.map +0 -1
  161. package/dist/prompts/shared/helpers.d.ts +0 -39
  162. package/dist/prompts/shared/helpers.d.ts.map +0 -1
  163. package/dist/prompts/shared/helpers.js +0 -151
  164. package/dist/prompts/shared/helpers.js.map +0 -1
  165. package/dist/prompts/shared/templates.d.ts +0 -35
  166. package/dist/prompts/shared/templates.d.ts.map +0 -1
  167. package/dist/prompts/shared/templates.js +0 -77
  168. package/dist/prompts/shared/templates.js.map +0 -1
  169. package/dist/prompts/shared/types.d.ts +0 -112
  170. package/dist/prompts/shared/types.d.ts.map +0 -1
  171. package/dist/prompts/shared/types.js +0 -5
  172. package/dist/prompts/shared/types.js.map +0 -1
  173. package/dist/prompts/system/find-unused-files.d.ts +0 -106
  174. package/dist/prompts/system/find-unused-files.d.ts.map +0 -1
  175. package/dist/prompts/system/find-unused-files.js +0 -357
  176. package/dist/prompts/system/find-unused-files.js.map +0 -1
  177. package/dist/security/index.d.ts +0 -39
  178. package/dist/security/index.d.ts.map +0 -1
  179. package/dist/security/index.js +0 -46
  180. package/dist/security/index.js.map +0 -1
  181. package/dist/security/integration-helpers.d.ts +0 -121
  182. package/dist/security/integration-helpers.d.ts.map +0 -1
  183. package/dist/security/integration-helpers.js +0 -190
  184. package/dist/security/integration-helpers.js.map +0 -1
  185. package/dist/security/output-encoder.d.ts +0 -94
  186. package/dist/security/output-encoder.d.ts.map +0 -1
  187. package/dist/security/output-encoder.js +0 -295
  188. package/dist/security/output-encoder.js.map +0 -1
  189. package/dist/security/prompt-injection-guard.d.ts +0 -59
  190. package/dist/security/prompt-injection-guard.d.ts.map +0 -1
  191. package/dist/security/prompt-injection-guard.js +0 -249
  192. package/dist/security/prompt-injection-guard.js.map +0 -1
  193. package/dist/security/sanitisation.d.ts +0 -67
  194. package/dist/security/sanitisation.d.ts.map +0 -1
  195. package/dist/security/sanitisation.js +0 -398
  196. package/dist/security/sanitisation.js.map +0 -1
  197. package/dist/security/security-service.d.ts +0 -103
  198. package/dist/security/security-service.d.ts.map +0 -1
  199. package/dist/security/security-service.js +0 -303
  200. package/dist/security/security-service.js.map +0 -1
  201. package/dist/security-config.d.ts +0 -45
  202. package/dist/security-config.d.ts.map +0 -1
  203. package/dist/security-config.js +0 -63
  204. package/dist/security-config.js.map +0 -1
  205. package/dist/system/function-list.d.ts +0 -61
  206. package/dist/system/function-list.d.ts.map +0 -1
  207. package/dist/system/function-list.js +0 -111
  208. package/dist/system/function-list.js.map +0 -1
  209. package/dist/system/function-registry.d.ts +0 -23
  210. package/dist/system/function-registry.d.ts.map +0 -1
  211. package/dist/system/function-registry.js +0 -136
  212. package/dist/system/function-registry.js.map +0 -1
  213. package/dist/system/health-check.d.ts +0 -33
  214. package/dist/system/health-check.d.ts.map +0 -1
  215. package/dist/system/health-check.js +0 -98
  216. package/dist/system/health-check.js.map +0 -1
  217. package/dist/system/path-resolver.d.ts +0 -55
  218. package/dist/system/path-resolver.d.ts.map +0 -1
  219. package/dist/system/path-resolver.js +0 -90
  220. package/dist/system/path-resolver.js.map +0 -1
  221. package/dist/templates/plugin-template.d.ts +0 -121
  222. package/dist/templates/plugin-template.d.ts.map +0 -1
  223. package/dist/templates/plugin-template.js +0 -454
  224. package/dist/templates/plugin-template.js.map +0 -1
  225. package/dist/types/chunking-types.d.ts +0 -88
  226. package/dist/types/chunking-types.d.ts.map +0 -1
  227. package/dist/types/chunking-types.js +0 -18
  228. package/dist/types/chunking-types.js.map +0 -1
  229. package/dist/types/prompt-stages.d.ts +0 -30
  230. package/dist/types/prompt-stages.d.ts.map +0 -1
  231. package/dist/types/prompt-stages.js +0 -6
  232. package/dist/types/prompt-stages.js.map +0 -1
  233. package/dist/types.d.ts +0 -45
  234. package/dist/types.d.ts.map +0 -1
  235. package/dist/types.js +0 -6
  236. package/dist/types.js.map +0 -1
  237. package/dist/utils/css-parser.d.ts +0 -26
  238. package/dist/utils/css-parser.d.ts.map +0 -1
  239. package/dist/utils/css-parser.js +0 -117
  240. package/dist/utils/css-parser.js.map +0 -1
  241. package/dist/utils/path-resolver.d.ts +0 -13
  242. package/dist/utils/path-resolver.d.ts.map +0 -1
  243. package/dist/utils/path-resolver.js +0 -78
  244. package/dist/utils/path-resolver.js.map +0 -1
  245. package/dist/utils/plugin-utilities.d.ts +0 -176
  246. package/dist/utils/plugin-utilities.d.ts.map +0 -1
  247. package/dist/utils/plugin-utilities.js +0 -269
  248. package/dist/utils/plugin-utilities.js.map +0 -1
  249. package/dist/utils/streamHandler.d.ts +0 -3
  250. package/dist/utils/streamHandler.d.ts.map +0 -1
  251. package/dist/utils/streamHandler.js +0 -137
  252. package/dist/utils/streamHandler.js.map +0 -1
  253. package/dist/validation/output-validator.d.ts +0 -136
  254. package/dist/validation/output-validator.d.ts.map +0 -1
  255. package/dist/validation/output-validator.js +0 -262
  256. package/dist/validation/output-validator.js.map +0 -1
  257. package/dist/validation/response-factory.d.ts +0 -44
  258. package/dist/validation/response-factory.d.ts.map +0 -1
  259. package/dist/validation/response-factory.js +0 -202
  260. package/dist/validation/response-factory.js.map +0 -1
  261. package/dist/validation/schemas.d.ts +0 -519
  262. package/dist/validation/schemas.d.ts.map +0 -1
  263. package/dist/validation/schemas.js +0 -6
  264. package/dist/validation/schemas.js.map +0 -1
@@ -1,269 +0,0 @@
1
- /**
2
- * Plugin Execution Utilities - Modern v4.2
3
- *
4
- * Shared utilities to reduce code duplication across plugins
5
- * Common patterns for model setup, token calculation, and response processing
6
- */
7
- import { ResponseFactory } from '../validation/response-factory.js';
8
- import { promises as fs } from 'fs';
9
- import { join, extname } from 'path';
10
- /**
11
- * Model setup and validation utility
12
- * Handles common model loading and context length detection
13
- */
14
- export class ModelSetup {
15
- static async getReadyModel(llmClient) {
16
- const models = await llmClient.llm.listLoaded();
17
- if (models.length === 0) {
18
- throw new Error('No model loaded in LM Studio. Please load a model first.');
19
- }
20
- const model = models[0];
21
- const contextLength = await model.getContextLength() || 23832;
22
- return { model, contextLength };
23
- }
24
- }
25
- /**
26
- * Dynamic token calculation utility
27
- * Calculates optimal maxTokens based on content size and context window
28
- * Moved from ThreeStagePromptManager to centralize all context management
29
- */
30
- export class TokenCalculator {
31
- /**
32
- * Estimate token count (moved from ThreeStagePromptManager)
33
- * Conservative approximation: 3 chars ≈ 1 token (safer than 4)
34
- */
35
- static estimateTokens(text) {
36
- return Math.ceil(text.length / 3);
37
- }
38
- /**
39
- * Calculate if stages need chunking based on context length
40
- * Uses conservative 80% context usage with no additional buffers
41
- */
42
- static needsChunking(stages, contextLength) {
43
- const systemTokens = this.estimateTokens(stages.systemAndContext);
44
- const dataTokens = this.estimateTokens(stages.dataPayload);
45
- const outputTokens = this.estimateTokens(stages.outputInstructions);
46
- // Conservative: Use 80% of context (built-in safety margin)
47
- const usableContext = Math.floor(contextLength * 0.80);
48
- const fixedOverhead = systemTokens + outputTokens;
49
- const availableForData = Math.max(1000, usableContext - fixedOverhead);
50
- return dataTokens > availableForData;
51
- }
52
- /**
53
- * Calculate optimal chunk size for data payload
54
- * Uses conservative 80% context usage with no additional buffers
55
- */
56
- static calculateOptimalChunkSize(stages, contextLength) {
57
- const systemTokens = this.estimateTokens(stages.systemAndContext);
58
- const outputTokens = this.estimateTokens(stages.outputInstructions);
59
- // Conservative: Use 80% of context (built-in safety margin)
60
- const usableContext = Math.floor(contextLength * 0.80);
61
- const fixedOverhead = systemTokens + outputTokens;
62
- const availableForData = Math.max(1000, usableContext - fixedOverhead);
63
- return availableForData;
64
- }
65
- /**
66
- * Calculate optimal maxTokens for single-stage execution
67
- * Uses conservative 80% context with consistent safety margin
68
- */
69
- static calculateForDirect(stages, contextLength, options = {}) {
70
- const { minTokens = 1000 } = options;
71
- // Conservative: Use 80% of context (built-in safety margin)
72
- const usableContext = Math.floor(contextLength * 0.80);
73
- const estimatedInputTokens = this.estimateTokens(stages.systemAndContext) +
74
- this.estimateTokens(stages.dataPayload) +
75
- this.estimateTokens(stages.outputInstructions);
76
- const calculatedMaxTokens = Math.max(minTokens, usableContext - estimatedInputTokens);
77
- return calculatedMaxTokens;
78
- }
79
- /**
80
- * Calculate optimal maxTokens for chunked execution
81
- * Uses conservative 80% context with consistent safety margin
82
- */
83
- static calculateForChunked(messages, contextLength, options = {}) {
84
- const { minTokens = 1500 } = options;
85
- // Conservative: Use 80% of context (built-in safety margin)
86
- const usableContext = Math.floor(contextLength * 0.80);
87
- const totalContent = messages.map(m => m.content).join(' ');
88
- const estimatedInputTokens = this.estimateTokens(totalContent);
89
- const calculatedMaxTokens = Math.max(minTokens, usableContext - estimatedInputTokens);
90
- return calculatedMaxTokens;
91
- }
92
- /**
93
- * Calculate optimal maxTokens for multi-file analysis
94
- * Uses conservative 80% context with consistent safety margin
95
- */
96
- static calculateForMultiFile(messages, contextLength, options = {}) {
97
- const { minTokens = 2000 } = options;
98
- // Conservative: Use 80% of context (built-in safety margin)
99
- const usableContext = Math.floor(contextLength * 0.80);
100
- const totalContent = messages.map(m => m.content).join(' ');
101
- const estimatedInputTokens = this.estimateTokens(totalContent);
102
- const calculatedMaxTokens = Math.max(minTokens, usableContext - estimatedInputTokens);
103
- return calculatedMaxTokens;
104
- }
105
- }
106
- /**
107
- * LM Studio response processing utility
108
- * Handles streaming response collection with consistent patterns
109
- */
110
- export class ResponseProcessor {
111
- /**
112
- * Stream and collect response from LM Studio model
113
- */
114
- static async collectStreamingResponse(prediction) {
115
- let response = '';
116
- for await (const chunk of prediction) {
117
- if (chunk.content) {
118
- response += chunk.content;
119
- }
120
- }
121
- return response;
122
- }
123
- /**
124
- * Execute direct model call with standard settings
125
- * Uses consistent 80% context calculation
126
- */
127
- static async executeDirect(stages, model, contextLength, functionName, options = {}) {
128
- const { temperature = 0.1 } = options;
129
- const messages = [
130
- { role: 'system', content: stages.systemAndContext },
131
- { role: 'user', content: stages.dataPayload },
132
- { role: 'user', content: stages.outputInstructions }
133
- ];
134
- const maxTokens = TokenCalculator.calculateForDirect(stages, contextLength);
135
- const prediction = model.respond(messages, {
136
- temperature,
137
- maxTokens
138
- });
139
- const response = await this.collectStreamingResponse(prediction);
140
- ResponseFactory.setStartTime();
141
- return ResponseFactory.parseAndCreateResponse(functionName, response, model.identifier || 'unknown');
142
- }
143
- /**
144
- * Execute chunked model call with standard settings
145
- * Uses consistent 80% context calculation
146
- */
147
- static async executeChunked(messages, model, contextLength, functionName, analysisType = 'single', options = {}) {
148
- const { temperature = 0.1 } = options;
149
- const maxTokens = analysisType === 'multifile'
150
- ? TokenCalculator.calculateForMultiFile(messages, contextLength)
151
- : TokenCalculator.calculateForChunked(messages, contextLength);
152
- const prediction = model.respond(messages, {
153
- temperature,
154
- maxTokens
155
- });
156
- const response = await this.collectStreamingResponse(prediction);
157
- ResponseFactory.setStartTime();
158
- return ResponseFactory.parseAndCreateResponse(functionName, response, model.identifier || 'unknown');
159
- }
160
- }
161
- /**
162
- * Common parameter validation utility
163
- * Standard validation patterns used across plugins
164
- */
165
- export class ParameterValidator {
166
- /**
167
- * Validate code/filePath parameter pattern
168
- */
169
- static validateCodeOrFile(params, parameterName = 'code/filePath') {
170
- if (!params.code && !params.filePath) {
171
- throw new Error(`Either code or filePath must be provided for ${parameterName}`);
172
- }
173
- }
174
- /**
175
- * Validate project path for multi-file operations
176
- */
177
- static validateProjectPath(params) {
178
- if (!params.projectPath && !params.files) {
179
- throw new Error('Either projectPath or files array must be provided');
180
- }
181
- }
182
- /**
183
- * Validate depth parameter range
184
- */
185
- static validateDepth(params, min = 1, max = 5) {
186
- if (params.maxDepth && (params.maxDepth < min || params.maxDepth > max)) {
187
- throw new Error(`maxDepth must be between ${min} and ${max}`);
188
- }
189
- }
190
- /**
191
- * Validate enum parameter
192
- */
193
- static validateEnum(params, paramName, allowedValues) {
194
- if (params[paramName] && !allowedValues.includes(params[paramName])) {
195
- throw new Error(`${paramName} must be one of: ${allowedValues.join(', ')}`);
196
- }
197
- }
198
- }
199
- /**
200
- * Error response utility
201
- * Consistent error handling patterns
202
- */
203
- export class ErrorHandler {
204
- /**
205
- * Create standardized error response
206
- */
207
- static createExecutionError(functionName, error, operation = 'execute') {
208
- return ResponseFactory.createErrorResponse(functionName, 'EXECUTION_ERROR', `Failed to ${operation}: ${error.message}`, { originalError: error.message }, 'unknown');
209
- }
210
- /**
211
- * Create parameter validation error response
212
- */
213
- static createValidationError(functionName, error) {
214
- return ResponseFactory.createErrorResponse(functionName, 'VALIDATION_ERROR', `Parameter validation failed: ${error.message}`, { originalError: error.message }, 'unknown');
215
- }
216
- /**
217
- * Create model error response
218
- */
219
- static createModelError(functionName, error) {
220
- return ResponseFactory.createErrorResponse(functionName, 'MODEL_ERROR', `Model execution failed: ${error.message}`, { originalError: error.message }, 'unknown');
221
- }
222
- }
223
- /**
224
- * Multi-file analysis utility
225
- * Handles file discovery, batching, and processing for cross-file analysis
226
- */
227
- export class MultiFileAnalysis {
228
- /**
229
- * Discover files in a project directory with filtering
230
- */
231
- async discoverFiles(projectPath, extensions, maxDepth = 3) {
232
- const files = [];
233
- async function scanDirectory(dir, currentDepth) {
234
- if (currentDepth > maxDepth)
235
- return;
236
- try {
237
- const entries = await fs.readdir(dir, { withFileTypes: true });
238
- for (const entry of entries) {
239
- const fullPath = join(dir, entry.name);
240
- if (entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'node_modules') {
241
- await scanDirectory(fullPath, currentDepth + 1);
242
- }
243
- else if (entry.isFile() && extensions.includes(extname(entry.name))) {
244
- files.push(fullPath);
245
- }
246
- }
247
- }
248
- catch (error) {
249
- // Skip inaccessible directories
250
- }
251
- }
252
- await scanDirectory(projectPath, 0);
253
- return files;
254
- }
255
- /**
256
- * Process files in batches with a callback function
257
- */
258
- async analyzeBatch(files, analyzeFunction, contextLength, batchSize = 10) {
259
- const results = [];
260
- // Process in batches to avoid overwhelming the system
261
- for (let i = 0; i < files.length; i += batchSize) {
262
- const batch = files.slice(i, i + batchSize);
263
- const batchResults = await Promise.all(batch.map(file => analyzeFunction(file)));
264
- results.push(...batchResults);
265
- }
266
- return results;
267
- }
268
- }
269
- //# sourceMappingURL=plugin-utilities.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin-utilities.js","sourceRoot":"","sources":["../../src/utils/plugin-utilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAErC;;;GAGG;AACH,MAAM,OAAO,UAAU;IACrB,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AS,EAAE,CAAC;YACjD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;YAC5C,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CACpC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CACzC,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;QAChC,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
@@ -1,3 +0,0 @@
1
- export declare function handleLLMResponse(prediction: AsyncIterable<any>): Promise<string>;
2
- export declare function formatWithSchema(response: string, schema?: any): any;
3
- //# sourceMappingURL=streamHandler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"streamHandler.d.ts","sourceRoot":"","sources":["../../src/utils/streamHandler.ts"],"names":[],"mappings":"AAGA,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CA0CvF;AAGD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,GAAG,CAkCpE"}
@@ -1,137 +0,0 @@
1
- // Fixed streaming response handler for Houtini LM MCP
2
- // This fixes the [object Object] issue when streaming from LM Studio
3
- export async function handleLLMResponse(prediction) {
4
- let response = '';
5
- try {
6
- for await (const chunk of prediction) {
7
- // Handle different chunk types
8
- if (typeof chunk === 'string') {
9
- response += chunk;
10
- }
11
- else if (chunk && typeof chunk === 'object') {
12
- // If it's an object with content property (common in streaming)
13
- if ('content' in chunk) {
14
- response += chunk.content;
15
- }
16
- else if ('text' in chunk) {
17
- response += chunk.text;
18
- }
19
- else if ('choices' in chunk && Array.isArray(chunk.choices)) {
20
- // Handle OpenAI-style streaming format
21
- for (const choice of chunk.choices) {
22
- if (choice.delta?.content) {
23
- response += choice.delta.content;
24
- }
25
- else if (choice.text) {
26
- response += choice.text;
27
- }
28
- }
29
- }
30
- else {
31
- // Try to stringify if it's a plain object
32
- try {
33
- const str = JSON.stringify(chunk);
34
- if (str !== '[object Object]') {
35
- response += str;
36
- }
37
- }
38
- catch {
39
- console.warn('Skipping non-serializable chunk:', chunk);
40
- }
41
- }
42
- }
43
- }
44
- }
45
- catch (error) {
46
- console.error('Error processing streaming response:', error);
47
- throw error;
48
- }
49
- return response;
50
- }
51
- // Enhanced response formatter with schema enforcement
52
- export function formatWithSchema(response, schema) {
53
- // First, try to extract JSON from the response
54
- let jsonData = null;
55
- // Try direct JSON parse
56
- try {
57
- jsonData = JSON.parse(response);
58
- }
59
- catch {
60
- // Try to extract JSON from markdown code blocks
61
- const jsonMatch = response.match(/```(?:json)?\s*\n?([\s\S]*?)\n?```/);
62
- if (jsonMatch) {
63
- try {
64
- jsonData = JSON.parse(jsonMatch[1]);
65
- }
66
- catch {
67
- // Continue with text processing
68
- }
69
- }
70
- }
71
- // If we have a schema and JSON data, validate and structure it
72
- if (schema && jsonData) {
73
- return enforceSchema(jsonData, schema);
74
- }
75
- // Otherwise, return structured text response
76
- return {
77
- summary: extractSummary(response),
78
- content: response,
79
- confidence: 0.85,
80
- metadata: {
81
- format: jsonData ? 'json' : 'text',
82
- length: response.length
83
- }
84
- };
85
- }
86
- function enforceSchema(data, schema) {
87
- const result = {};
88
- if (schema.type === 'object' && schema.properties) {
89
- for (const [key, propSchema] of Object.entries(schema.properties)) {
90
- const prop = propSchema;
91
- if (data[key] !== undefined) {
92
- if (prop.type === 'string') {
93
- result[key] = String(data[key]);
94
- }
95
- else if (prop.type === 'number' || prop.type === 'integer') {
96
- result[key] = Number(data[key]) || 0;
97
- }
98
- else if (prop.type === 'boolean') {
99
- result[key] = Boolean(data[key]);
100
- }
101
- else if (prop.type === 'array') {
102
- result[key] = Array.isArray(data[key]) ? data[key] : [];
103
- }
104
- else if (prop.type === 'object') {
105
- result[key] = typeof data[key] === 'object' ? data[key] : {};
106
- }
107
- else {
108
- result[key] = data[key];
109
- }
110
- }
111
- else if (schema.required?.includes(key)) {
112
- // Provide default for required fields
113
- if (prop.type === 'string')
114
- result[key] = '';
115
- else if (prop.type === 'number' || prop.type === 'integer')
116
- result[key] = 0;
117
- else if (prop.type === 'boolean')
118
- result[key] = false;
119
- else if (prop.type === 'array')
120
- result[key] = [];
121
- else if (prop.type === 'object')
122
- result[key] = {};
123
- }
124
- }
125
- }
126
- return result;
127
- }
128
- function extractSummary(text) {
129
- // Extract first meaningful line or paragraph
130
- const lines = text.split('\n').filter(line => line.trim());
131
- if (lines.length > 0) {
132
- // Remove markdown headers
133
- return lines[0].replace(/^#+\s*/, '').trim();
134
- }
135
- return 'Analysis complete';
136
- }
137
- //# sourceMappingURL=streamHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"streamHandler.js","sourceRoot":"","sources":["../../src/utils/streamHandler.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,qEAAqE;AAErE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,UAA8B;IACpE,IAAI,QAAQ,GAAG,EAAE,CAAC;IAElB,IAAI,CAAC;QACH,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;YACrC,+BAA+B;YAC/B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC9B,QAAQ,IAAI,KAAK,CAAC;YACpB,CAAC;iBAAM,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC9C,gEAAgE;gBAChE,IAAI,SAAS,IAAI,KAAK,EAAE,CAAC;oBACvB,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC;gBAC5B,CAAC;qBAAM,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;oBAC3B,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC;gBACzB,CAAC;qBAAM,IAAI,SAAS,IAAI,KAAK,IAAI,KAAK,CAAC,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BACjD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;oBAAE,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;qBAC5C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ;oBAAE,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;YACpD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,cAAc,CAAC,IAAY;IAClC,6CAA6C;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3D,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,0BAA0B;QAC1B,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,CAAC;IACD,OAAO,mBAAmB,CAAC;AAC7B,CAAC"}
@@ -1,136 +0,0 @@
1
- /**
2
- * Output Validation System for Houtini LM MCP
3
- * Centralized validation and formatting for all function outputs
4
- * Based on Functional Specification v4.0
5
- */
6
- export interface BaseResponse {
7
- success: boolean;
8
- timestamp: string;
9
- modelUsed: string;
10
- executionTimeMs: number;
11
- error?: {
12
- code: string;
13
- message: string;
14
- details?: any;
15
- };
16
- }
17
- export interface AnalyzeResponse extends BaseResponse {
18
- data: {
19
- summary: string;
20
- findings: Finding[];
21
- suggestions: string[];
22
- metadata?: Record<string, any>;
23
- };
24
- }
25
- export interface GenerateResponse extends BaseResponse {
26
- data: {
27
- content: string;
28
- metadata: {
29
- type: string;
30
- language?: string;
31
- framework?: string;
32
- [key: string]: any;
33
- };
34
- statistics: {
35
- linesGenerated: number;
36
- tokensUsed?: number;
37
- [key: string]: any;
38
- };
39
- };
40
- }
41
- export interface MultiFileResponse extends BaseResponse {
42
- data: {
43
- filesAnalyzed: string[];
44
- summary: string;
45
- results: any[];
46
- insights: string[];
47
- };
48
- }
49
- export interface SystemResponse extends BaseResponse {
50
- data: {
51
- status: string;
52
- details: Record<string, any>;
53
- };
54
- }
55
- export interface Finding {
56
- type: "issue" | "suggestion" | "info" | "warning" | "error";
57
- severity: "critical" | "high" | "medium" | "low";
58
- message: string;
59
- location?: {
60
- file?: string;
61
- line?: number;
62
- column?: number;
63
- code?: string;
64
- };
65
- recommendation?: string;
66
- }
67
- /**
68
- * Central Output Validator Class
69
- * All functions should use this to ensure consistent output format
70
- */
71
- export declare class OutputValidator {
72
- private static startTime;
73
- /**
74
- * Create a successful analysis response
75
- */
76
- static createAnalyzeResponse(data: Omit<AnalyzeResponse['data'], never>, modelUsed: string, executionTimeMs?: number): AnalyzeResponse;
77
- /**
78
- * Create a successful generation response
79
- */
80
- static createGenerateResponse(data: Omit<GenerateResponse['data'], never>, modelUsed: string, executionTimeMs?: number): GenerateResponse;
81
- /**
82
- * Create a successful multi-file response
83
- */
84
- static createMultiFileResponse(data: Omit<MultiFileResponse['data'], never>, modelUsed: string, executionTimeMs?: number): MultiFileResponse;
85
- /**
86
- * Create a successful system response
87
- */
88
- static createSystemResponse(data: Omit<SystemResponse['data'], never>, modelUsed?: string, executionTimeMs?: number): SystemResponse;
89
- /**
90
- * Create an error response (for any function type)
91
- */
92
- static createErrorResponse(errorCode: string, errorMessage: string, details?: any, modelUsed?: string, executionTimeMs?: number): BaseResponse;
93
- /**
94
- * Validate that a response matches the expected schema
95
- */
96
- static validateResponse(response: any, expectedType: 'analyze' | 'generate' | 'multifile' | 'system'): boolean;
97
- /**
98
- * Set execution start time for timing calculations
99
- */
100
- static setStartTime(): void;
101
- /**
102
- * Get execution time since start
103
- */
104
- static getExecutionTime(): number;
105
- /**
106
- * Standardize error codes
107
- */
108
- static ErrorCodes: {
109
- readonly INVALID_INPUT: "INVALID_INPUT";
110
- readonly FILE_NOT_FOUND: "FILE_NOT_FOUND";
111
- readonly MODEL_ERROR: "MODEL_ERROR";
112
- readonly PARSING_ERROR: "PARSING_ERROR";
113
- readonly VALIDATION_ERROR: "VALIDATION_ERROR";
114
- readonly TIMEOUT: "TIMEOUT";
115
- readonly SYSTEM_ERROR: "SYSTEM_ERROR";
116
- };
117
- }
118
- export declare class AnalysisOutputParser {
119
- /**
120
- * Parse LLM response into structured analysis data
121
- */
122
- static parseAnalysisResponse(llmResponse: string, functionName: string): AnalyzeResponse['data'];
123
- private static validateAndNormalizeAnalysis;
124
- private static parseStructuredText;
125
- private static normalizeFinding;
126
- private static extractFindings;
127
- private static extractSuggestions;
128
- }
129
- export declare class GenerationOutputParser {
130
- /**
131
- * Parse LLM response into structured generation data
132
- */
133
- static parseGenerationResponse(llmResponse: string, functionName: string, language?: string): GenerateResponse['data'];
134
- private static getContentType;
135
- }
136
- //# sourceMappingURL=output-validator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output-validator.d.ts","sourceRoot":"","sources":["../../src/validation/output-validator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,GAAG,CAAC;KACf,CAAC;CACH;AAGD,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,OAAO,EAAE,CAAC;QACpB,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAChC,CAAC;CACH;AAGD,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,IAAI,EAAE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