@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
package/README.md CHANGED
@@ -1,293 +1,123 @@
1
- # Houtini LM - LM Studio MCP Server with Expert Prompt Library and Custom Prompting
1
+ # @houtini/lm
2
2
 
3
- **Your unlimited AI companion: This MCP server connects Claude to LM Studio for code analysis, generation, and creativity**
3
+ [![npm version](https://img.shields.io/npm/v/@houtini/lm)](https://www.npmjs.com/package/@houtini/lm)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
5
 
5
- Transform your development workflow with our expert-level prompt library for code analysis, professional documentation generation, and creative project scaffolding - all running locally without API costs. For developers, vibe coders and creators alike.
6
+ MCP server that connects Claude to **any OpenAI-compatible LLM endpoint** LM Studio, Ollama, vLLM, llama.cpp, or any remote API.
6
7
 
7
- ## What This Does
8
+ Offload routine work to a local model. Keep your Claude context window for the hard stuff.
8
9
 
9
- Houtini LM **saves your Claude context window** by offloading detailed analysis tasks to LM Studio locally or on your company network whilst Claude focuses on strategy and complex problem-solving. Think of it as your intelligent coding assistant that never runs out of tokens.
10
+ ## Why
10
11
 
11
- **Perfect for:**
12
- - 🔍 **Code analysis** - Deep insights into quality, security, and architecture
13
- - 📝 **Documentation generation** - Professional docs from code analysis
14
- - 🏗️ **Project scaffolding** - Complete applications, themes, and components
15
- - 🎮 **Creative projects** - Games, CSS art, and interactive experiences
16
- - 🛡️ **Security audits** - OWASP compliance and vulnerability detection
12
+ Claude is great at orchestration and reasoning. Local models are great at bulk analysis, classification, extraction, and summarisation. This server lets Claude delegate to a local model on the fly — no API keys, no cloud round-trips, no context wasted.
17
13
 
18
- ## Quick Start Prompt Guide
14
+ **Common use cases:**
19
15
 
20
- Once installed, simply use natural language prompts with Claude:
16
+ - Classify or tag hundreds of items without burning Claude tokens
17
+ - Extract structured data from long documents
18
+ - Run a second opinion on generated code
19
+ - Summarise research before Claude synthesises it
21
20
 
22
- ```
23
- Use houtini-lm to analyse the code quality in C:/my-project/src/UserAuth.js
24
- ```
25
-
26
- ```
27
- Generate comprehensive unit tests using houtini-lm for my React component at C:/components/Dashboard.jsx
28
- ```
29
-
30
- ```
31
- Use houtini-lm to create a WordPress plugin called "Event Manager" with custom post types and admin interface
32
- ```
33
-
34
- ```
35
- Audit the security of my WordPress theme using houtini-lm at C:/themes/my-theme
36
- ```
37
-
38
- ```
39
- Create a CSS art generator project using houtini-lm with space theme and neon colours
40
- ```
41
-
42
- ```
43
- Use houtini-lm to convert my JavaScript file to TypeScript with strict mode enabled
44
- ```
45
-
46
- ```
47
- Generate responsive HTML components using houtini-lm for a pricing card with dark mode support
48
- ```
49
-
50
- ## Prerequisites
51
-
52
- **Essential Requirements:**
53
-
54
- 1. **LM Studio** - Download from [lmstudio.ai](https://lmstudio.ai)
55
- - Must be running at `ws://127.0.0.1:1234`
56
- - Model loaded and ready (13B+ parameters recommended)
57
-
58
- 2. **Desktop Commander MCP** - Essential for file operations
59
- - Repository: [DesktopCommanderMCP](https://github.com/wonderwhy-er/DesktopCommanderMCP)
60
- - Required for reading files and writing generated code
21
+ ## Install
61
22
 
62
- 3. **Node.js 24.6.0 or later** - For MCP server functionality
63
- - Download from [nodejs.org](https://nodejs.org)
64
-
65
- 4. **Claude Desktop** - For the best experience
66
- - Download from [claude.ai/download](https://claude.ai/download)
67
-
68
- ## Installation
69
-
70
- ### 1. Install the Package
23
+ ### Claude Code (recommended)
71
24
 
72
25
  ```bash
73
- # Install globally via npm
74
- npm install -g @houtini/lm
75
-
76
- # Or use npx (no installation required)
77
- npx @houtini/lm
26
+ claude mcp add houtini-lm -e LM_STUDIO_URL=http://localhost:1234 -- npx -y @houtini/lm
78
27
  ```
79
28
 
80
- ### 2. Configure Claude Desktop
81
-
82
- Add to your Claude Desktop configuration file:
29
+ ### Claude Desktop
83
30
 
84
- **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
85
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
31
+ Add to `claude_desktop_config.json`:
86
32
 
87
33
  ```json
88
34
  {
89
35
  "mcpServers": {
90
36
  "houtini-lm": {
91
37
  "command": "npx",
92
- "args": ["@houtini/lm"],
38
+ "args": ["-y", "@houtini/lm"],
93
39
  "env": {
94
- "LLM_MCP_ALLOWED_DIRS": "C:/your-projects,C:/dev,C:/websites"
40
+ "LM_STUDIO_URL": "http://localhost:1234"
95
41
  }
96
42
  }
97
43
  }
98
44
  }
99
45
  ```
100
46
 
101
- ### 3. Start LM Studio
102
-
103
- 1. Launch LM Studio
104
- 2. Load a model (13B+ parameters recommended for best results)
105
- 3. Start the server at `ws://127.0.0.1:1234`
106
- 4. Verify the model is ready and responding
107
-
108
- ### 4. Verify Installation
47
+ ### npx (standalone)
109
48
 
110
- Restart Claude Desktop, then test with:
111
-
112
- ```
113
- Use houtini-lm health check to verify everything is working
49
+ ```bash
50
+ npx @houtini/lm
114
51
  ```
115
52
 
116
- ## Available Functions
117
-
118
- ### 🔍 Analysis Functions (17 functions)
119
- - **`analyze_single_file`** - Deep code analysis and quality assessment
120
- - **`count_files`** - Project structure with beautiful markdown trees
121
- - **`find_unused_files`** - Dead code detection with risk assessment
122
- - **`security_audit`** - OWASP compliance and vulnerability scanning
123
- - **`analyze_dependencies`** - Circular dependencies and unused imports
124
- - And 12 more specialized analysis tools...
125
-
126
- ### 🛠️ Generation Functions (10 functions)
127
- - **`generate_unit_tests`** - Comprehensive test suites with framework patterns
128
- - **`generate_documentation`** - Professional docs from code analysis
129
- - **`convert_to_typescript`** - JavaScript to TypeScript with type safety
130
- - **`generate_wordpress_plugin`** - Complete WordPress plugin creation
131
- - **`generate_responsive_component`** - Accessible HTML/CSS components
132
- - And 5 more generation tools...
133
-
134
- ### 🎮 Creative Functions (3 functions)
135
- - **`css_art_generator`** - Pure CSS art and animations
136
- - **`arcade_game`** - Complete playable HTML5 games
137
- - **`create_text_adventure`** - Interactive fiction with branching stories
138
-
139
- ### ⚙️ System Functions (5 functions)
140
- - **`health_check`** - Verify LM Studio connection
141
- - **`list_functions`** - Discover all available functions
142
- - **`resolve_path`** - Path analysis and suggestions
143
- - And 2 more system utilities...
53
+ ## Configuration
144
54
 
145
- ## Context Window Management
55
+ Set via environment variables or in your MCP client config:
146
56
 
147
- Houtini LM implements intelligent context window management to maximize the efficiency of your local LM models while ensuring reliable processing of large files and complex analysis tasks.
57
+ | Variable | Default | Description |
58
+ |----------|---------|-------------|
59
+ | `LM_STUDIO_URL` | `http://localhost:1234` | Base URL of the OpenAI-compatible API |
60
+ | `LM_STUDIO_MODEL` | *(auto-detect)* | Model identifier — leave blank to use whatever's loaded |
61
+ | `LM_STUDIO_PASSWORD` | *(none)* | Bearer token for authenticated endpoints |
148
62
 
149
- ### Dynamic Context Allocation
63
+ ## Tools
150
64
 
151
- **Adaptive Context Utilization**: Unlike systems with hardcoded token limits, Houtini LM dynamically detects your model's context window and allocates **95% of available tokens** for optimal performance:
65
+ ### `chat`
152
66
 
153
- ```typescript
154
- // Context detection from your loaded model
155
- const contextLength = await model.getContextLength(); // e.g., 16,384 tokens
67
+ Send a message, get a response. The workhorse.
156
68
 
157
- // Dynamic allocation - 95% utilization
158
- const responseTokens = Math.floor(contextLength * 0.95); // 15,565 tokens available
159
69
  ```
160
-
161
- **Benefits:**
162
- - **Maximum efficiency** - No wasted context space
163
- - **Model-agnostic** - Works with any context size (4K, 16K, 32K+)
164
- - ✅ **Future-proof** - Automatically adapts to larger models
165
-
166
- ### Three-Stage Prompt System
167
-
168
- Houtini LM uses a sophisticated prompt architecture that separates concerns for optimal token management:
169
-
170
- **Stage 1: System Context** - Expert persona and analysis methodology
171
- **Stage 2: Data Payload** - Your code, files, or project content
172
- **Stage 3: Output Instructions** - Structured response requirements
173
-
174
- ```
175
- ┌─────────────────────┐
176
- │ System Context │ ← Expert role, methodologies
177
- ├─────────────────────┤
178
- │ Data Payload │ ← Your files/code (chunked if needed)
179
- ├─────────────────────┤
180
- │ Output Instructions │ ← Response format, requirements
181
- └─────────────────────┘
70
+ message (required) — what to send
71
+ system — system prompt
72
+ temperature — 0–2, default 0.3
73
+ max_tokens — default 4096
182
74
  ```
183
75
 
184
- **Intelligent Processing:**
185
- - **Small files** → Single-stage execution for speed
186
- - **Large files** → Automatic chunking with coherent aggregation
187
- - **Multi-file projects** → Optimized batch processing
188
-
189
- ### Automatic Chunking Capability
190
-
191
- When files exceed available context space, Houtini LM automatically chunks content while maintaining analysis quality:
76
+ ### `custom_prompt`
192
77
 
193
- **Smart Chunking Features:**
194
- - 🔍 **Natural boundaries** - Splits at logical sections, not arbitrary points
195
- - 🔄 **Context preservation** - Maintains analysis continuity across chunks
196
- - 📊 **Intelligent aggregation** - Combines chunk results into coherent reports
197
- - ⚡ **Performance optimization** - Parallel processing where possible
78
+ Structured prompt with separate system, context, and instruction fields. Better for analysis tasks where you're passing data + instructions.
198
79
 
199
- **Example Chunking Process:**
200
80
  ```
201
- Large File (50KB) Context Analysis Exceeds Limit
202
-
203
- Split into 3 logical chunks → Process each chunk → Aggregate results
204
-
205
- Single comprehensive analysis report
81
+ instruction (required) what to do with the context
82
+ system — system prompt / persona
83
+ context — data or background to analyse
84
+ temperature — default 0.3
85
+ max_tokens — default 4096
206
86
  ```
207
87
 
208
- ### Timeout Configuration
88
+ ### `list_models`
209
89
 
210
- Houtini LM uses **120-second timeouts** (2 minutes) to accommodate thorough analysis on lower-powered systems:
90
+ Returns the models currently loaded on the LLM server.
211
91
 
212
- **Why Extended Timeouts:**
213
- - 🔍 **Complex analysis** - Security audits, architecture analysis, and comprehensive code reviews take time
214
- - 💻 **System compatibility** - Works reliably on older hardware and resource-constrained environments
215
- - 🧠 **Model processing** - Larger local models (13B-33B parameters) require more inference time
216
- - 📊 **Quality over speed** - Comprehensive reports are worth the wait
92
+ ### `health_check`
217
93
 
218
- **Timeout Guidelines:**
219
- - **Simple analysis** (100 lines): 15-30 seconds
220
- - **Medium files** (500 lines): 30-60 seconds
221
- - **Large files** (1000+ lines): 60-120 seconds
222
- - **Multi-file projects**: 90-180 seconds
94
+ Checks connectivity. Returns response time, auth status, and loaded model count.
223
95
 
224
- **Performance Tips:**
225
- - Use faster models (13B vs 33B) for quicker responses
226
- - Enable GPU acceleration in LM Studio for better performance
227
- - Consider using `analysisDepth="basic"` for faster results when appropriate
96
+ ## Compatible endpoints
228
97
 
229
- ### Memory Efficiency
98
+ | Provider | URL | Notes |
99
+ |----------|-----|-------|
100
+ | [LM Studio](https://lmstudio.ai) | `http://localhost:1234` | Default, zero config |
101
+ | [Ollama](https://ollama.com) | `http://localhost:11434` | Use OpenAI-compatible mode |
102
+ | [vLLM](https://docs.vllm.ai) | `http://localhost:8000` | Native OpenAI API |
103
+ | [llama.cpp](https://github.com/ggml-org/llama.cpp) | `http://localhost:8080` | Server mode |
104
+ | Remote / cloud APIs | Any URL | Set `LM_STUDIO_URL` + `LM_STUDIO_PASSWORD` |
230
105
 
231
- **Intelligent Caching**: Results are cached to prevent redundant processing
232
- **Resource Management**: Automatic cleanup of large contexts after processing
233
- **Streaming Responses**: Progressive output delivery for better user experience
106
+ ## Development
234
107
 
235
- This architecture ensures Houtini LM can handle everything from small utility functions to entire enterprise codebases while maintaining consistent quality and performance across different hardware configurations.
236
-
237
- ## Documentation
238
-
239
- **Complete guides available:**
240
- - [Analysis Functions Guide](docs/analysis-functions-md.md) - All 17 analysis tools
241
- - [Generation Functions Guide](docs/generation-functions-md.md) - All 10 creation tools
242
- - [Creative Functions Guide](docs/creative-functions-md.md) - Games and art tools
243
- - [System Functions Guide](docs/system-functions-md.md) - Utilities and diagnostics
244
- - [Complete User Guide](docs/user-guide-md.md) - Comprehensive usage manual
245
-
246
- ## Recommended Setup
247
-
248
- **For Professional Development:**
249
- - **CPU**: 8-core or better (for local LLM processing)
250
- - **RAM**: 32GB (24GB for model, 8GB for development)
251
- - **Storage**: SSD with 100GB+ free space
252
- - **Model**: Qwen2.5-Coder-14B-Instruct or similar
253
-
254
- **Performance Tips:**
255
- - Use 13B+ parameter models for professional-quality results
256
- - Configure `LLM_MCP_ALLOWED_DIRS` to include your project directories
257
- - Install Desktop Commander MCP for complete file operation support
258
- - Keep LM Studio running and model loaded for instant responses
108
+ ```bash
109
+ git clone https://github.com/houtini-ai/lm.git
110
+ cd lm
111
+ npm install
112
+ npm run build
113
+ ```
259
114
 
260
- ## Version History
115
+ Run the test suite against a live LLM server:
261
116
 
262
- ### Version 1.0.0 (Current)
263
- - ✅ Complete function library (35+ functions)
264
- - ✅ Professional documentation system
265
- - ✅ WordPress-specific tools and auditing
266
- - ✅ Creative project generators
267
- - ✅ Comprehensive security analysis
268
- - ✅ TypeScript conversion and test generation
269
- - ✅ Cross-file integration analysis
117
+ ```bash
118
+ node test.mjs
119
+ ```
270
120
 
271
121
  ## License
272
122
 
273
- **MIT License** - Use this project freely for personal and commercial projects. See [LICENSE](LICENSE) for details.
274
-
275
- ## Contributing
276
-
277
- We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on:
278
- - Code standards and patterns
279
- - Testing requirements
280
- - Documentation updates
281
- - Issue reporting
282
-
283
- ## Support
284
-
285
- - **Issues**: [GitHub Issues](https://github.com/houtini-ai/lm/issues)
286
- - **Discussions**: [GitHub Discussions](https://github.com/houtini-ai/lm/discussions)
287
- - **Documentation**: Complete guides in the `docs/` directory
288
-
289
- ---
290
-
291
- **Ready to supercharge your development workflow?** Install Houtini LM and start building amazing things with unlimited local AI assistance.
292
-
293
- *Built for developers who think clearly but can't afford to think expensively.*
123
+ MIT
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
+ #!/usr/bin/env node
1
2
  /**
2
- * Houtini LM MCP Server - Plugin Architecture v1.0
3
- * Complete plugin-based replacement of legacy switch-case system
3
+ * Houtini LM MCP Server for Local LLMs via OpenAI-compatible API
4
+ *
5
+ * Connects to LM Studio (or any OpenAI-compatible endpoint) and exposes
6
+ * chat, custom prompts, and model info as MCP tools.
4
7
  */
5
8
  export {};
6
- //# sourceMappingURL=index.d.ts.map