@houtini/lm 1.0.5 → 1.0.7

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 (112) hide show
  1. package/README.md +293 -202
  2. package/dist/config.d.ts +1 -3
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js +6 -5
  5. package/dist/config.js.map +1 -1
  6. package/dist/core/ThreeStagePromptManager.d.ts +7 -23
  7. package/dist/core/ThreeStagePromptManager.d.ts.map +1 -1
  8. package/dist/core/ThreeStagePromptManager.js +22 -80
  9. package/dist/core/ThreeStagePromptManager.js.map +1 -1
  10. package/dist/index.js +15 -10
  11. package/dist/index.js.map +1 -1
  12. package/dist/plugins/index.d.ts.map +1 -1
  13. package/dist/plugins/index.js +3 -2
  14. package/dist/plugins/index.js.map +1 -1
  15. package/dist/prompts/analyze/code-quality.d.ts.map +1 -1
  16. package/dist/prompts/analyze/code-quality.js +10 -6
  17. package/dist/prompts/analyze/code-quality.js.map +1 -1
  18. package/dist/prompts/analyze/compare-integration.d.ts.map +1 -1
  19. package/dist/prompts/analyze/compare-integration.js +10 -6
  20. package/dist/prompts/analyze/compare-integration.js.map +1 -1
  21. package/dist/prompts/analyze/count-files.d.ts.map +1 -1
  22. package/dist/prompts/analyze/count-files.js +10 -6
  23. package/dist/prompts/analyze/count-files.js.map +1 -1
  24. package/dist/prompts/analyze/database-queries.d.ts.map +1 -1
  25. package/dist/prompts/analyze/database-queries.js +10 -6
  26. package/dist/prompts/analyze/database-queries.js.map +1 -1
  27. package/dist/prompts/analyze/dependencies.d.ts.map +1 -1
  28. package/dist/prompts/analyze/dependencies.js +10 -6
  29. package/dist/prompts/analyze/dependencies.js.map +1 -1
  30. package/dist/prompts/analyze/diff-signatures.d.ts.map +1 -1
  31. package/dist/prompts/analyze/diff-signatures.js +15 -9
  32. package/dist/prompts/analyze/diff-signatures.js.map +1 -1
  33. package/dist/prompts/analyze/find-patterns.d.ts.map +1 -1
  34. package/dist/prompts/analyze/find-patterns.js +10 -6
  35. package/dist/prompts/analyze/find-patterns.js.map +1 -1
  36. package/dist/prompts/analyze/find-unused-css.d.ts.map +1 -1
  37. package/dist/prompts/analyze/find-unused-css.js +15 -9
  38. package/dist/prompts/analyze/find-unused-css.js.map +1 -1
  39. package/dist/prompts/analyze/n8n-workflow.d.ts.map +1 -1
  40. package/dist/prompts/analyze/n8n-workflow.js +10 -6
  41. package/dist/prompts/analyze/n8n-workflow.js.map +1 -1
  42. package/dist/prompts/analyze/project-structure.d.ts.map +1 -1
  43. package/dist/prompts/analyze/project-structure.js +10 -6
  44. package/dist/prompts/analyze/project-structure.js.map +1 -1
  45. package/dist/prompts/analyze/security-audit.d.ts.map +1 -1
  46. package/dist/prompts/analyze/security-audit.js +10 -6
  47. package/dist/prompts/analyze/security-audit.js.map +1 -1
  48. package/dist/prompts/analyze/single-file.d.ts.map +1 -1
  49. package/dist/prompts/analyze/single-file.js +10 -6
  50. package/dist/prompts/analyze/single-file.js.map +1 -1
  51. package/dist/prompts/analyze/trace-execution.d.ts.map +1 -1
  52. package/dist/prompts/analyze/trace-execution.js +10 -6
  53. package/dist/prompts/analyze/trace-execution.js.map +1 -1
  54. package/dist/prompts/analyze/wordpress-plugin-audit.d.ts.map +1 -1
  55. package/dist/prompts/analyze/wordpress-plugin-audit.js +5 -3
  56. package/dist/prompts/analyze/wordpress-plugin-audit.js.map +1 -1
  57. package/dist/prompts/analyze/wordpress-security.d.ts.map +1 -1
  58. package/dist/prompts/analyze/wordpress-security.js +10 -6
  59. package/dist/prompts/analyze/wordpress-security.js.map +1 -1
  60. package/dist/prompts/analyze/wordpress-theme-audit.d.ts.map +1 -1
  61. package/dist/prompts/analyze/wordpress-theme-audit.js +5 -3
  62. package/dist/prompts/analyze/wordpress-theme-audit.js.map +1 -1
  63. package/dist/prompts/custom/custom-prompt.d.ts.map +1 -1
  64. package/dist/prompts/custom/custom-prompt.js +9 -5
  65. package/dist/prompts/custom/custom-prompt.js.map +1 -1
  66. package/dist/prompts/fun/arcade-game.d.ts.map +1 -1
  67. package/dist/prompts/fun/arcade-game.js +10 -6
  68. package/dist/prompts/fun/arcade-game.js.map +1 -1
  69. package/dist/prompts/fun/create_text_adventure.d.ts.map +1 -1
  70. package/dist/prompts/fun/create_text_adventure.js +10 -6
  71. package/dist/prompts/fun/create_text_adventure.js.map +1 -1
  72. package/dist/prompts/fun/css-art-generator.d.ts.map +1 -1
  73. package/dist/prompts/fun/css-art-generator.js +10 -6
  74. package/dist/prompts/fun/css-art-generator.js.map +1 -1
  75. package/dist/prompts/generate/project-documentation.d.ts.map +1 -1
  76. package/dist/prompts/generate/project-documentation.js +10 -6
  77. package/dist/prompts/generate/project-documentation.js.map +1 -1
  78. package/dist/prompts/generate/refactoring.d.ts.map +1 -1
  79. package/dist/prompts/generate/refactoring.js +10 -6
  80. package/dist/prompts/generate/refactoring.js.map +1 -1
  81. package/dist/prompts/generate/responsive-component.d.ts.map +1 -1
  82. package/dist/prompts/generate/responsive-component.js +6 -4
  83. package/dist/prompts/generate/responsive-component.js.map +1 -1
  84. package/dist/prompts/generate/typescript-conversion.d.ts.map +1 -1
  85. package/dist/prompts/generate/typescript-conversion.js +10 -6
  86. package/dist/prompts/generate/typescript-conversion.js.map +1 -1
  87. package/dist/prompts/generate/unit-tests.d.ts.map +1 -1
  88. package/dist/prompts/generate/unit-tests.js +10 -6
  89. package/dist/prompts/generate/unit-tests.js.map +1 -1
  90. package/dist/prompts/generate/wordpress-plugin.d.ts.map +1 -1
  91. package/dist/prompts/generate/wordpress-plugin.js +10 -6
  92. package/dist/prompts/generate/wordpress-plugin.js.map +1 -1
  93. package/dist/prompts/generate/wordpress-theme-from-static.d.ts.map +1 -1
  94. package/dist/prompts/generate/wordpress-theme-from-static.js +10 -6
  95. package/dist/prompts/generate/wordpress-theme-from-static.js.map +1 -1
  96. package/dist/prompts/system/find-unused-files.d.ts.map +1 -1
  97. package/dist/prompts/system/find-unused-files.js +10 -6
  98. package/dist/prompts/system/find-unused-files.js.map +1 -1
  99. package/dist/system/function-registry.js +1 -1
  100. package/dist/system/function-registry.js.map +1 -1
  101. package/dist/templates/plugin-template.d.ts.map +1 -1
  102. package/dist/templates/plugin-template.js +10 -6
  103. package/dist/templates/plugin-template.js.map +1 -1
  104. package/dist/types/prompt-stages.d.ts +0 -12
  105. package/dist/types/prompt-stages.d.ts.map +1 -1
  106. package/dist/types.d.ts +0 -1
  107. package/dist/types.d.ts.map +1 -1
  108. package/dist/utils/plugin-utilities.d.ts +19 -0
  109. package/dist/utils/plugin-utilities.d.ts.map +1 -1
  110. package/dist/utils/plugin-utilities.js +49 -6
  111. package/dist/utils/plugin-utilities.js.map +1 -1
  112. package/package.json +74 -71
package/README.md CHANGED
@@ -1,203 +1,294 @@
1
- # Houtini LM - LM Studio MCP Server with Expert Prompt Library and Custom Prompting
2
-
3
- **Version**: 1.0.1
4
- **Your unlimited AI companion: This MCP server connects Claude to LM Studio for code analysis, generation, and creativity**
5
-
6
- 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.
7
-
8
- ## What This Does
9
-
10
- 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.
11
-
12
- **Perfect for:**
13
- - 🔍 **Code analysis** - Deep insights into quality, security, and architecture
14
- - 📝 **Documentation generation** - Professional docs from code analysis
15
- - 🏗️ **Project scaffolding** - Complete applications, themes, and components
16
- - 🎮 **Creative projects** - Games, CSS art, and interactive experiences
17
- - 🛡️ **Security audits** - OWASP compliance and vulnerability detection
18
-
19
- ## Quick Start Prompt Guide
20
-
21
- Once installed, simply use natural language prompts with Claude:
22
-
23
- ```
24
- Use houtini-lm to analyse the code quality in C:/my-project/src/UserAuth.js
25
- ```
26
-
27
- ```
28
- Generate comprehensive unit tests using houtini-lm for my React component at C:/components/Dashboard.jsx
29
- ```
30
-
31
- ```
32
- Use houtini-lm to create a WordPress plugin called "Event Manager" with custom post types and admin interface
33
- ```
34
-
35
- ```
36
- Audit the security of my WordPress theme using houtini-lm at C:/themes/my-theme
37
- ```
38
-
39
- ```
40
- Create a CSS art generator project using houtini-lm with space theme and neon colours
41
- ```
42
-
43
- ```
44
- Use houtini-lm to convert my JavaScript file to TypeScript with strict mode enabled
45
- ```
46
-
47
- ```
48
- Generate responsive HTML components using houtini-lm for a pricing card with dark mode support
49
- ```
50
-
51
- ## Prerequisites
52
-
53
- **Essential Requirements:**
54
-
55
- 1. **LM Studio** - Download from [lmstudio.ai](https://lmstudio.ai)
56
- - Must be running at `ws://127.0.0.1:1234`
57
- - Model loaded and ready (13B+ parameters recommended)
58
-
59
- 2. **Desktop Commander MCP** - Essential for file operations
60
- - Repository: [DesktopCommanderMCP](https://github.com/wonderwhy-er/DesktopCommanderMCP)
61
- - Required for reading files and writing generated code
62
-
63
- 3. **Node.js 24.6.0 or later** - For MCP server functionality
64
- - Download from [nodejs.org](https://nodejs.org)
65
-
66
- 4. **Claude Desktop** - For the best experience
67
- - Download from [claude.ai/download](https://claude.ai/download)
68
-
69
- ## Installation
70
-
71
- ### 1. Install Dependencies
72
-
73
- ```bash
74
- # Clone the repository
75
- git clone https://github.com/houtini-ai/lm.git
76
- cd lm
77
-
78
- # Install Node.js dependencies
79
- npm install
80
- ```
81
-
82
- ### 2. Configure Claude Desktop
83
-
84
- Add to your Claude Desktop configuration file:
85
-
86
- **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
87
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
88
-
89
- ```json
90
- {
91
- "mcpServers": {
92
- "houtini-lm": {
93
- "command": "node",
94
- "args": ["path/to/houtini-lm/index.js"],
95
- "env": {
96
- "LLM_MCP_ALLOWED_DIRS": "C:/your-projects,C:/dev,C:/websites"
97
- }
98
- }
99
- }
100
- }
101
- ```
102
-
103
- ### 3. Start LM Studio
104
-
105
- 1. Launch LM Studio
106
- 2. Load a model (13B+ parameters recommended for best results)
107
- 3. Start the server at `ws://127.0.0.1:1234`
108
- 4. Verify the model is ready and responding
109
-
110
- ### 4. Verify Installation
111
-
112
- Restart Claude Desktop, then test with:
113
-
114
- ```
115
- Use houtini-lm health check to verify everything is working
116
- ```
117
-
118
- ## Available Functions
119
-
120
- ### 🔍 Analysis Functions (17 functions)
121
- - **`analyze_single_file`** - Deep code analysis and quality assessment
122
- - **`count_files`** - Project structure with beautiful markdown trees
123
- - **`find_unused_files`** - Dead code detection with risk assessment
124
- - **`security_audit`** - OWASP compliance and vulnerability scanning
125
- - **`analyze_dependencies`** - Circular dependencies and unused imports
126
- - And 12 more specialized analysis tools...
127
-
128
- ### 🛠️ Generation Functions (10 functions)
129
- - **`generate_unit_tests`** - Comprehensive test suites with framework patterns
130
- - **`generate_documentation`** - Professional docs from code analysis
131
- - **`convert_to_typescript`** - JavaScript to TypeScript with type safety
132
- - **`generate_wordpress_plugin`** - Complete WordPress plugin creation
133
- - **`generate_responsive_component`** - Accessible HTML/CSS components
134
- - And 5 more generation tools...
135
-
136
- ### 🎮 Creative Functions (3 functions)
137
- - **`css_art_generator`** - Pure CSS art and animations
138
- - **`arcade_game`** - Complete playable HTML5 games
139
- - **`create_text_adventure`** - Interactive fiction with branching stories
140
-
141
- ### ⚙️ System Functions (5 functions)
142
- - **`health_check`** - Verify LM Studio connection
143
- - **`list_functions`** - Discover all available functions
144
- - **`resolve_path`** - Path analysis and suggestions
145
- - And 2 more system utilities...
146
-
147
- ## Documentation
148
-
149
- **Complete guides available:**
150
- - [Analysis Functions Guide](docs/analysis-functions-md.md) - All 17 analysis tools
151
- - [Generation Functions Guide](docs/generation-functions-md.md) - All 10 creation tools
152
- - [Creative Functions Guide](docs/creative-functions-md.md) - Games and art tools
153
- - [System Functions Guide](docs/system-functions-md.md) - Utilities and diagnostics
154
- - [Complete User Guide](docs/user-guide-md.md) - Comprehensive usage manual
155
-
156
- ## Recommended Setup
157
-
158
- **For Professional Development:**
159
- - **CPU**: 8-core or better (for local LLM processing)
160
- - **RAM**: 32GB (24GB for model, 8GB for development)
161
- - **Storage**: SSD with 100GB+ free space
162
- - **Model**: Qwen2.5-Coder-14B-Instruct or similar
163
-
164
- **Performance Tips:**
165
- - Use 13B+ parameter models for professional-quality results
166
- - Configure `LLM_MCP_ALLOWED_DIRS` to include your project directories
167
- - Install Desktop Commander MCP for complete file operation support
168
- - Keep LM Studio running and model loaded for instant responses
169
-
170
- ## Version History
171
-
172
- ### Version 1.0.0 (Current)
173
- - Complete function library (35+ functions)
174
- - ✅ Professional documentation system
175
- - ✅ WordPress-specific tools and auditing
176
- - ✅ Creative project generators
177
- - Comprehensive security analysis
178
- - ✅ TypeScript conversion and test generation
179
- - Cross-file integration analysis
180
-
181
- ## License
182
-
183
- **MIT License** - Use this project freely for personal and commercial projects. See [LICENSE](LICENSE) for details.
184
-
185
- ## Contributing
186
-
187
- We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on:
188
- - Code standards and patterns
189
- - Testing requirements
190
- - Documentation updates
191
- - Issue reporting
192
-
193
- ## Support
194
-
195
- - **Issues**: [GitHub Issues](https://github.com/houtini-ai/lm/issues)
196
- - **Discussions**: [GitHub Discussions](https://github.com/houtini-ai/lm/discussions)
197
- - **Documentation**: Complete guides in the `docs/` directory
198
-
199
- ---
200
-
201
- **Ready to supercharge your development workflow?** Install Houtini LM and start building amazing things with unlimited local AI assistance.
202
-
1
+ # Houtini LM - LM Studio MCP Server with Expert Prompt Library and Custom Prompting
2
+
3
+ **Your unlimited AI companion: This MCP server connects Claude to LM Studio for code analysis, generation, and creativity**
4
+
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
+
7
+ ## What This Does
8
+
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
+
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
17
+
18
+ ## Quick Start Prompt Guide
19
+
20
+ Once installed, simply use natural language prompts with Claude:
21
+
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
61
+
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 Dependencies
71
+
72
+ ```bash
73
+ # Clone the repository
74
+ git clone https://github.com/houtini-ai/lm.git
75
+ cd lm
76
+
77
+ # Install Node.js dependencies
78
+ npm install
79
+ ```
80
+
81
+ ### 2. Configure Claude Desktop
82
+
83
+ Add to your Claude Desktop configuration file:
84
+
85
+ **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
86
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
87
+
88
+ ```json
89
+ {
90
+ "mcpServers": {
91
+ "houtini-lm": {
92
+ "command": "node",
93
+ "args": ["path/to/houtini-lm/index.js"],
94
+ "env": {
95
+ "LLM_MCP_ALLOWED_DIRS": "C:/your-projects,C:/dev,C:/websites"
96
+ }
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ ### 3. Start LM Studio
103
+
104
+ 1. Launch LM Studio
105
+ 2. Load a model (13B+ parameters recommended for best results)
106
+ 3. Start the server at `ws://127.0.0.1:1234`
107
+ 4. Verify the model is ready and responding
108
+
109
+ ### 4. Verify Installation
110
+
111
+ Restart Claude Desktop, then test with:
112
+
113
+ ```
114
+ Use houtini-lm health check to verify everything is working
115
+ ```
116
+
117
+ ## Available Functions
118
+
119
+ ### 🔍 Analysis Functions (17 functions)
120
+ - **`analyze_single_file`** - Deep code analysis and quality assessment
121
+ - **`count_files`** - Project structure with beautiful markdown trees
122
+ - **`find_unused_files`** - Dead code detection with risk assessment
123
+ - **`security_audit`** - OWASP compliance and vulnerability scanning
124
+ - **`analyze_dependencies`** - Circular dependencies and unused imports
125
+ - And 12 more specialized analysis tools...
126
+
127
+ ### 🛠️ Generation Functions (10 functions)
128
+ - **`generate_unit_tests`** - Comprehensive test suites with framework patterns
129
+ - **`generate_documentation`** - Professional docs from code analysis
130
+ - **`convert_to_typescript`** - JavaScript to TypeScript with type safety
131
+ - **`generate_wordpress_plugin`** - Complete WordPress plugin creation
132
+ - **`generate_responsive_component`** - Accessible HTML/CSS components
133
+ - And 5 more generation tools...
134
+
135
+ ### 🎮 Creative Functions (3 functions)
136
+ - **`css_art_generator`** - Pure CSS art and animations
137
+ - **`arcade_game`** - Complete playable HTML5 games
138
+ - **`create_text_adventure`** - Interactive fiction with branching stories
139
+
140
+ ### ⚙️ System Functions (5 functions)
141
+ - **`health_check`** - Verify LM Studio connection
142
+ - **`list_functions`** - Discover all available functions
143
+ - **`resolve_path`** - Path analysis and suggestions
144
+ - And 2 more system utilities...
145
+
146
+ ## Context Window Management
147
+
148
+ 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.
149
+
150
+ ### Dynamic Context Allocation
151
+
152
+ **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:
153
+
154
+ ```typescript
155
+ // Context detection from your loaded model
156
+ const contextLength = await model.getContextLength(); // e.g., 16,384 tokens
157
+
158
+ // Dynamic allocation - 95% utilization
159
+ const responseTokens = Math.floor(contextLength * 0.95); // 15,565 tokens available
160
+ ```
161
+
162
+ **Benefits:**
163
+ - ✅ **Maximum efficiency** - No wasted context space
164
+ - ✅ **Model-agnostic** - Works with any context size (4K, 16K, 32K+)
165
+ - **Future-proof** - Automatically adapts to larger models
166
+
167
+ ### Three-Stage Prompt System
168
+
169
+ Houtini LM uses a sophisticated prompt architecture that separates concerns for optimal token management:
170
+
171
+ **Stage 1: System Context** - Expert persona and analysis methodology
172
+ **Stage 2: Data Payload** - Your code, files, or project content
173
+ **Stage 3: Output Instructions** - Structured response requirements
174
+
175
+ ```
176
+ ┌─────────────────────┐
177
+ │ System Context │ ← Expert role, methodologies
178
+ ├─────────────────────┤
179
+ │ Data Payload │ ← Your files/code (chunked if needed)
180
+ ├─────────────────────┤
181
+ Output Instructions │ ← Response format, requirements
182
+ └─────────────────────┘
183
+ ```
184
+
185
+ **Intelligent Processing:**
186
+ - **Small files** → Single-stage execution for speed
187
+ - **Large files** Automatic chunking with coherent aggregation
188
+ - **Multi-file projects** Optimized batch processing
189
+
190
+ ### Automatic Chunking Capability
191
+
192
+ When files exceed available context space, Houtini LM automatically chunks content while maintaining analysis quality:
193
+
194
+ **Smart Chunking Features:**
195
+ - 🔍 **Natural boundaries** - Splits at logical sections, not arbitrary points
196
+ - 🔄 **Context preservation** - Maintains analysis continuity across chunks
197
+ - 📊 **Intelligent aggregation** - Combines chunk results into coherent reports
198
+ - ⚡ **Performance optimization** - Parallel processing where possible
199
+
200
+ **Example Chunking Process:**
201
+ ```
202
+ Large File (50KB) → Context Analysis → Exceeds Limit
203
+
204
+ Split into 3 logical chunks → Process each chunk → Aggregate results
205
+
206
+ Single comprehensive analysis report
207
+ ```
208
+
209
+ ### Timeout Configuration
210
+
211
+ Houtini LM uses **120-second timeouts** (2 minutes) to accommodate thorough analysis on lower-powered systems:
212
+
213
+ **Why Extended Timeouts:**
214
+ - 🔍 **Complex analysis** - Security audits, architecture analysis, and comprehensive code reviews take time
215
+ - 💻 **System compatibility** - Works reliably on older hardware and resource-constrained environments
216
+ - 🧠 **Model processing** - Larger local models (13B-33B parameters) require more inference time
217
+ - 📊 **Quality over speed** - Comprehensive reports are worth the wait
218
+
219
+ **Timeout Guidelines:**
220
+ - **Simple analysis** (100 lines): 15-30 seconds
221
+ - **Medium files** (500 lines): 30-60 seconds
222
+ - **Large files** (1000+ lines): 60-120 seconds
223
+ - **Multi-file projects**: 90-180 seconds
224
+
225
+ **Performance Tips:**
226
+ - Use faster models (13B vs 33B) for quicker responses
227
+ - Enable GPU acceleration in LM Studio for better performance
228
+ - Consider using `analysisDepth="basic"` for faster results when appropriate
229
+
230
+ ### Memory Efficiency
231
+
232
+ **Intelligent Caching**: Results are cached to prevent redundant processing
233
+ **Resource Management**: Automatic cleanup of large contexts after processing
234
+ **Streaming Responses**: Progressive output delivery for better user experience
235
+
236
+ 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.
237
+
238
+ ## Documentation
239
+
240
+ **Complete guides available:**
241
+ - [Analysis Functions Guide](docs/analysis-functions-md.md) - All 17 analysis tools
242
+ - [Generation Functions Guide](docs/generation-functions-md.md) - All 10 creation tools
243
+ - [Creative Functions Guide](docs/creative-functions-md.md) - Games and art tools
244
+ - [System Functions Guide](docs/system-functions-md.md) - Utilities and diagnostics
245
+ - [Complete User Guide](docs/user-guide-md.md) - Comprehensive usage manual
246
+
247
+ ## Recommended Setup
248
+
249
+ **For Professional Development:**
250
+ - **CPU**: 8-core or better (for local LLM processing)
251
+ - **RAM**: 32GB (24GB for model, 8GB for development)
252
+ - **Storage**: SSD with 100GB+ free space
253
+ - **Model**: Qwen2.5-Coder-14B-Instruct or similar
254
+
255
+ **Performance Tips:**
256
+ - Use 13B+ parameter models for professional-quality results
257
+ - Configure `LLM_MCP_ALLOWED_DIRS` to include your project directories
258
+ - Install Desktop Commander MCP for complete file operation support
259
+ - Keep LM Studio running and model loaded for instant responses
260
+
261
+ ## Version History
262
+
263
+ ### Version 1.0.0 (Current)
264
+ - ✅ Complete function library (35+ functions)
265
+ - ✅ Professional documentation system
266
+ - ✅ WordPress-specific tools and auditing
267
+ - ✅ Creative project generators
268
+ - ✅ Comprehensive security analysis
269
+ - ✅ TypeScript conversion and test generation
270
+ - ✅ Cross-file integration analysis
271
+
272
+ ## License
273
+
274
+ **MIT License** - Use this project freely for personal and commercial projects. See [LICENSE](LICENSE) for details.
275
+
276
+ ## Contributing
277
+
278
+ We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on:
279
+ - Code standards and patterns
280
+ - Testing requirements
281
+ - Documentation updates
282
+ - Issue reporting
283
+
284
+ ## Support
285
+
286
+ - **Issues**: [GitHub Issues](https://github.com/houtini-ai/lm/issues)
287
+ - **Discussions**: [GitHub Discussions](https://github.com/houtini-ai/lm/discussions)
288
+ - **Documentation**: Complete guides in the `docs/` directory
289
+
290
+ ---
291
+
292
+ **Ready to supercharge your development workflow?** Install Houtini LM and start building amazing things with unlimited local AI assistance.
293
+
203
294
  *Built for developers who think clearly but can't afford to think expensively.*
package/dist/config.d.ts CHANGED
@@ -22,21 +22,19 @@ export declare const fileProcessingLimits: {
22
22
  };
23
23
  /**
24
24
  * Model parameters for different operation types
25
+ * maxTokens now calculated dynamically by TokenCalculator based on context window
25
26
  */
26
27
  export declare const modelParameters: {
27
28
  analysis: {
28
29
  temperature: number;
29
- maxTokens: number;
30
30
  topP: number;
31
31
  };
32
32
  generation: {
33
33
  temperature: number;
34
- maxTokens: number;
35
34
  topP: number;
36
35
  };
37
36
  creative: {
38
37
  temperature: number;
39
- maxTokens: number;
40
38
  topP: number;
41
39
  };
42
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,eAAO,MAAM,MAAM,EAAE,MA6BpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc;;;CAG1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;CAKhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;CAgB3B,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,eAAO,MAAM,MAAM,EAAE,MA6BpB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc;;;CAG1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;CAKhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAgB3B,CAAC"}
package/dist/config.js CHANGED
@@ -6,9 +6,9 @@ export const config = {
6
6
  lmStudioUrl: process.env.LM_STUDIO_URL || 'ws://localhost:1234',
7
7
  modelName: process.env.LM_STUDIO_MODEL || 'auto',
8
8
  temperature: 0.1,
9
- maxTokens: 2000,
9
+ // maxTokens removed - now calculated dynamically by TokenCalculator
10
10
  topP: 0.95,
11
- timeout: 30000,
11
+ timeout: 120000, // Increased from 30s to 2 minutes for complex analysis
12
12
  maxFileSize: 200 * 1024 * 1024, // 200MB limit
13
13
  supportedFileTypes: [
14
14
  '.csv', '.json', '.txt', '.js', '.ts', '.py', '.md', '.log',
@@ -49,22 +49,23 @@ export const fileProcessingLimits = {
49
49
  };
50
50
  /**
51
51
  * Model parameters for different operation types
52
+ * maxTokens now calculated dynamically by TokenCalculator based on context window
52
53
  */
53
54
  export const modelParameters = {
54
55
  analysis: {
55
56
  temperature: 0.1,
56
- maxTokens: 2000,
57
57
  topP: 0.95
58
+ // maxTokens removed - calculated dynamically
58
59
  },
59
60
  generation: {
60
61
  temperature: 0.3,
61
- maxTokens: 4000,
62
62
  topP: 0.9
63
+ // maxTokens removed - calculated dynamically
63
64
  },
64
65
  creative: {
65
66
  temperature: 0.7,
66
- maxTokens: 4000,
67
67
  topP: 0.9
68
+ // maxTokens removed - calculated dynamically
68
69
  }
69
70
  };
70
71
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,MAAM,MAAM,GAAW;IAC5B,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,qBAAqB;IAC/D,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,MAAM;IAChD,WAAW,EAAE,GAAG;IAChB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI,EAAG,cAAc;IAC/C,kBAAkB,EAAE;QAClB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM;QAC3D,MAAM,EAAE,MAAM,EA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AAC,SAAS,EAAE,SAAS,CAAC;QAC1F,YAAY,EAAE;YACZ,WAAW,EAAE,IAAI;YACjB,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,KAAK;SAChB;KACF;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC,WAAW;IAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,WAAW,EAAE,MAAM,CAAC,WAAW;IAC/B,cAAc,EAAE,MAAM,CAAC,kBAAkB;IACzC,SAAS,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,EAAE,8BAA8B;IAC3D,2BAA2B,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,yCAAyC;CACxF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE;QACR,WAAW,EAAE,GAAG;QAChB,IAAI,EAAE,IAAI;QACV,6CAA6C;KAC9C;IACD,UAAU,EAAE;QACV,WAAW,EAAE,GAAG;QAChB,IAAI,EAAE,GAAG;QACT,6CAA6C;KAC9C;IACD,QAAQ,EAAE;QACR,WAAW,EAAE,GAAG;QAChB,IAAI,EAAE,GAAG;QACT,6CAA6C;KAC9C;CACF,CAAC"}
@@ -2,38 +2,22 @@
2
2
  * 3-Stage Prompt Manager
3
3
  * Handles the breakdown of prompts into managed stages for optimal context usage
4
4
  */
5
- import { PromptStages, StageMetrics, ChunkedConversation } from '../types/prompt-stages.js';
5
+ import { PromptStages, ChunkedConversation } from '../types/prompt-stages.js';
6
6
  export declare class ThreeStagePromptManager {
7
- private contextLimit;
8
- private safetyMargin;
9
- constructor(contextLimit: number, safetyMargin?: number);
7
+ constructor();
10
8
  /**
11
- * Estimate token count (rough approximation: 4 chars ≈ 1 token)
9
+ * Split data payload into chunks of specified size
10
+ * Now receives chunk size from TokenCalculator
12
11
  */
13
- private estimateTokens;
14
- /**
15
- * Calculate stage metrics to determine available space for data
16
- */
17
- calculateStageMetrics(stages: PromptStages): StageMetrics;
18
- /**
19
- * Check if data payload needs chunking
20
- */
21
- needsChunking(stages: PromptStages): boolean;
22
- /**
23
- * Split data payload into appropriately sized chunks
24
- */
25
- chunkDataPayload(dataPayload: string, availableTokens: number): string[];
12
+ chunkDataPayload(dataPayload: string, maxChunkSize: number): string[];
26
13
  /**
27
14
  * Split a large section that doesn't fit in one chunk
28
15
  */
29
16
  private splitLargeSection;
30
17
  /**
31
18
  * Create a chunked conversation from prompt stages
19
+ * Now receives pre-calculated chunks from TokenCalculator
32
20
  */
33
- createChunkedConversation(stages: PromptStages): ChunkedConversation;
34
- /**
35
- * Get metrics for debugging/logging
36
- */
37
- getDebugInfo(stages: PromptStages): any;
21
+ createChunkedConversation(stages: PromptStages, dataChunks: string[]): ChunkedConversation;
38
22
  }
39
23
  //# sourceMappingURL=ThreeStagePromptManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThreeStagePromptManager.d.ts","sourceRoot":"","sources":["../../src/core/ThreeStagePromptManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE5F,qBAAa,uBAAuB;IAClC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,YAAY,CAAe;gBAEvB,YAAY,EAAE,MAAM,EAAE,YAAY,GAAE,MAAY;IAK5D;;OAEG;IACH,OAAO,CAAC,cAAc;IAItB;;OAEG;IACH,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY;IAkBzD;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO;IAK5C;;OAEG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,EAAE;IAuDxE;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA8BzB;;OAEG;IACH,yBAAyB,CAAC,MAAM,EAAE,YAAY,GAAG,mBAAmB;IAwCpE;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG;CAcxC"}
1
+ {"version":3,"file":"ThreeStagePromptManager.d.ts","sourceRoot":"","sources":["../../src/core/ThreeStagePromptManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE9E,qBAAa,uBAAuB;;IAKlC;;;OAGG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE;IAmDrE;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA6BzB;;;OAGG;IACH,yBAAyB,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,mBAAmB;CA8B3F"}