crewx 0.1.1 → 0.1.2

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 (195) hide show
  1. package/LICENSE +197 -9
  2. package/README.md +120 -27
  3. package/crewx.yaml +1273 -0
  4. package/dist/agent.types.d.ts +92 -0
  5. package/dist/agent.types.js +16 -0
  6. package/dist/agent.types.js.map +1 -0
  7. package/dist/ai-provider.service.d.ts +25 -0
  8. package/dist/ai-provider.service.js +138 -0
  9. package/dist/ai-provider.service.js.map +1 -0
  10. package/dist/ai.service.d.ts +50 -0
  11. package/dist/ai.service.js +625 -0
  12. package/dist/ai.service.js.map +1 -0
  13. package/dist/app.module.d.ts +5 -0
  14. package/dist/app.module.js +88 -0
  15. package/dist/app.module.js.map +1 -0
  16. package/dist/cli/chat.handler.d.ts +19 -0
  17. package/dist/cli/chat.handler.js +429 -0
  18. package/dist/cli/chat.handler.js.map +1 -0
  19. package/dist/cli/cli.handler.d.ts +4 -0
  20. package/dist/cli/cli.handler.js +93 -0
  21. package/dist/cli/cli.handler.js.map +1 -0
  22. package/dist/cli/doctor.handler.d.ts +36 -0
  23. package/dist/cli/doctor.handler.js +382 -0
  24. package/dist/cli/doctor.handler.js.map +1 -0
  25. package/dist/cli/execute.handler.d.ts +2 -0
  26. package/dist/cli/execute.handler.js +269 -0
  27. package/dist/cli/execute.handler.js.map +1 -0
  28. package/dist/cli/help.handler.d.ts +2 -0
  29. package/dist/cli/help.handler.js +10 -0
  30. package/dist/cli/help.handler.js.map +1 -0
  31. package/dist/cli/init.handler.d.ts +25 -0
  32. package/dist/cli/init.handler.js +355 -0
  33. package/dist/cli/init.handler.js.map +1 -0
  34. package/dist/cli/query.handler.d.ts +2 -0
  35. package/dist/cli/query.handler.js +351 -0
  36. package/dist/cli/query.handler.js.map +1 -0
  37. package/dist/cli/templates.handler.d.ts +2 -0
  38. package/dist/cli/templates.handler.js +100 -0
  39. package/dist/cli/templates.handler.js.map +1 -0
  40. package/dist/cli-options.d.ts +22 -0
  41. package/dist/cli-options.js +195 -0
  42. package/dist/cli-options.js.map +1 -0
  43. package/dist/config/timeout.config.d.ts +14 -0
  44. package/dist/config/timeout.config.js +34 -0
  45. package/dist/config/timeout.config.js.map +1 -0
  46. package/dist/constants.d.ts +4 -0
  47. package/dist/constants.js +8 -0
  48. package/dist/constants.js.map +1 -0
  49. package/dist/conversation/base-conversation-history.provider.d.ts +12 -0
  50. package/dist/conversation/base-conversation-history.provider.js +45 -0
  51. package/dist/conversation/base-conversation-history.provider.js.map +1 -0
  52. package/dist/conversation/cli-conversation-history.provider.d.ts +16 -0
  53. package/dist/conversation/cli-conversation-history.provider.js +104 -0
  54. package/dist/conversation/cli-conversation-history.provider.js.map +1 -0
  55. package/dist/conversation/conversation-config.d.ts +9 -0
  56. package/dist/conversation/conversation-config.js +25 -0
  57. package/dist/conversation/conversation-config.js.map +1 -0
  58. package/dist/conversation/conversation-history.interface.d.ts +25 -0
  59. package/dist/conversation/conversation-history.interface.js +3 -0
  60. package/dist/conversation/conversation-history.interface.js.map +1 -0
  61. package/dist/conversation/conversation-provider.factory.d.ts +10 -0
  62. package/dist/conversation/conversation-provider.factory.js +50 -0
  63. package/dist/conversation/conversation-provider.factory.js.map +1 -0
  64. package/dist/conversation/conversation-storage.service.d.ts +15 -0
  65. package/dist/conversation/conversation-storage.service.js +182 -0
  66. package/dist/conversation/conversation-storage.service.js.map +1 -0
  67. package/dist/conversation/index.d.ts +7 -0
  68. package/dist/conversation/index.js +24 -0
  69. package/dist/conversation/index.js.map +1 -0
  70. package/dist/conversation/slack-conversation-history.provider.d.ts +22 -0
  71. package/dist/conversation/slack-conversation-history.provider.js +239 -0
  72. package/dist/conversation/slack-conversation-history.provider.js.map +1 -0
  73. package/dist/crewx.tool.d.ts +421 -0
  74. package/dist/crewx.tool.js +1240 -0
  75. package/dist/crewx.tool.js.map +1 -0
  76. package/dist/knowledge/DocumentManager.d.ts +4 -0
  77. package/dist/knowledge/DocumentManager.js +119 -0
  78. package/dist/knowledge/DocumentManager.js.map +1 -0
  79. package/dist/main.d.ts +1 -0
  80. package/dist/main.js +230 -0
  81. package/dist/main.js.map +1 -0
  82. package/dist/mcp.controller.d.ts +8 -0
  83. package/dist/mcp.controller.js +60 -0
  84. package/dist/mcp.controller.js.map +1 -0
  85. package/dist/project.service.d.ts +44 -0
  86. package/dist/project.service.js +299 -0
  87. package/dist/project.service.js.map +1 -0
  88. package/dist/providers/ai-provider.interface.d.ts +30 -0
  89. package/dist/providers/ai-provider.interface.js +11 -0
  90. package/dist/providers/ai-provider.interface.js.map +1 -0
  91. package/dist/providers/base-ai.provider.d.ts +42 -0
  92. package/dist/providers/base-ai.provider.js +515 -0
  93. package/dist/providers/base-ai.provider.js.map +1 -0
  94. package/dist/providers/claude.provider.d.ts +25 -0
  95. package/dist/providers/claude.provider.js +376 -0
  96. package/dist/providers/claude.provider.js.map +1 -0
  97. package/dist/providers/copilot.provider.d.ts +25 -0
  98. package/dist/providers/copilot.provider.js +280 -0
  99. package/dist/providers/copilot.provider.js.map +1 -0
  100. package/dist/providers/gemini.provider.d.ts +22 -0
  101. package/dist/providers/gemini.provider.js +163 -0
  102. package/dist/providers/gemini.provider.js.map +1 -0
  103. package/dist/services/agent-loader.service.d.ts +23 -0
  104. package/dist/services/agent-loader.service.js +313 -0
  105. package/dist/services/agent-loader.service.js.map +1 -0
  106. package/dist/services/config-validator.service.d.ts +28 -0
  107. package/dist/services/config-validator.service.js +427 -0
  108. package/dist/services/config-validator.service.js.map +1 -0
  109. package/dist/services/config.service.d.ts +25 -0
  110. package/dist/services/config.service.js +102 -0
  111. package/dist/services/config.service.js.map +1 -0
  112. package/dist/services/context-enhancement.service.d.ts +13 -0
  113. package/dist/services/context-enhancement.service.js +169 -0
  114. package/dist/services/context-enhancement.service.js.map +1 -0
  115. package/dist/services/document-loader.service.d.ts +16 -0
  116. package/dist/services/document-loader.service.js +137 -0
  117. package/dist/services/document-loader.service.js.map +1 -0
  118. package/dist/services/help.service.d.ts +5 -0
  119. package/dist/services/help.service.js +112 -0
  120. package/dist/services/help.service.js.map +1 -0
  121. package/dist/services/intelligent-compression.service.d.ts +20 -0
  122. package/dist/services/intelligent-compression.service.js +179 -0
  123. package/dist/services/intelligent-compression.service.js.map +1 -0
  124. package/dist/services/parallel-processing.service.d.ts +108 -0
  125. package/dist/services/parallel-processing.service.js +266 -0
  126. package/dist/services/parallel-processing.service.js.map +1 -0
  127. package/dist/services/result-formatter.service.d.ts +27 -0
  128. package/dist/services/result-formatter.service.js +126 -0
  129. package/dist/services/result-formatter.service.js.map +1 -0
  130. package/dist/services/task-management.service.d.ts +63 -0
  131. package/dist/services/task-management.service.js +270 -0
  132. package/dist/services/task-management.service.js.map +1 -0
  133. package/dist/services/template.service.d.ts +36 -0
  134. package/dist/services/template.service.js +195 -0
  135. package/dist/services/template.service.js.map +1 -0
  136. package/dist/services/tool-call.service.d.ts +53 -0
  137. package/dist/services/tool-call.service.js +819 -0
  138. package/dist/services/tool-call.service.js.map +1 -0
  139. package/dist/slack/formatters/message.formatter.d.ts +25 -0
  140. package/dist/slack/formatters/message.formatter.js +246 -0
  141. package/dist/slack/formatters/message.formatter.js.map +1 -0
  142. package/dist/slack/slack-bot.d.ts +23 -0
  143. package/dist/slack/slack-bot.js +435 -0
  144. package/dist/slack/slack-bot.js.map +1 -0
  145. package/dist/stderr.logger.d.ts +8 -0
  146. package/dist/stderr.logger.js +26 -0
  147. package/dist/stderr.logger.js.map +1 -0
  148. package/dist/tsconfig.tsbuildinfo +1 -0
  149. package/dist/utils/config-utils.d.ts +15 -0
  150. package/dist/utils/config-utils.js +69 -0
  151. package/dist/utils/config-utils.js.map +1 -0
  152. package/dist/utils/error-utils.d.ts +3 -0
  153. package/dist/utils/error-utils.js +27 -0
  154. package/dist/utils/error-utils.js.map +1 -0
  155. package/dist/utils/math-utils.d.ts +3 -0
  156. package/dist/utils/math-utils.js +10 -0
  157. package/dist/utils/math-utils.js.map +1 -0
  158. package/dist/utils/mcp-installer.d.ts +20 -0
  159. package/dist/utils/mcp-installer.js +199 -0
  160. package/dist/utils/mcp-installer.js.map +1 -0
  161. package/dist/utils/mention-parser.d.ts +18 -0
  162. package/dist/utils/mention-parser.js +136 -0
  163. package/dist/utils/mention-parser.js.map +1 -0
  164. package/dist/utils/simple-security.d.ts +3 -0
  165. package/dist/utils/simple-security.js +20 -0
  166. package/dist/utils/simple-security.js.map +1 -0
  167. package/dist/utils/stdin-utils.d.ts +2 -0
  168. package/dist/utils/stdin-utils.js +87 -0
  169. package/dist/utils/stdin-utils.js.map +1 -0
  170. package/dist/utils/string-utils.d.ts +1 -0
  171. package/dist/utils/string-utils.js +10 -0
  172. package/dist/utils/string-utils.js.map +1 -0
  173. package/dist/utils/template-processor.d.ts +32 -0
  174. package/dist/utils/template-processor.js +188 -0
  175. package/dist/utils/template-processor.js.map +1 -0
  176. package/docs/agent-configuration.md +373 -0
  177. package/docs/agent-registry-strategy.md +348 -0
  178. package/docs/branding-decision-crewx.md +395 -0
  179. package/docs/claude-code-docker-guide.md +264 -0
  180. package/docs/cli-guide.md +295 -0
  181. package/docs/development.md +595 -0
  182. package/docs/guides/agent-best-practices.md +97 -0
  183. package/docs/guides/bug-management.md +600 -0
  184. package/docs/guides/git-bug-reference.md +366 -0
  185. package/docs/mcp-integration.md +187 -0
  186. package/docs/process/development-workflow.md +84 -0
  187. package/docs/roadmap.md +528 -0
  188. package/docs/rules/branch-protection.md +40 -0
  189. package/docs/standards/rc-versioning.md +60 -0
  190. package/docs/standards/report-structure.md +67 -0
  191. package/docs/templates.md +517 -0
  192. package/docs/tools.md +583 -0
  193. package/docs/troubleshooting.md +585 -0
  194. package/package.json +108 -19
  195. package/bin/crewx.js +0 -20
@@ -0,0 +1,585 @@
1
+ # Troubleshooting Guide
2
+
3
+ Common issues and solutions for CrewX.
4
+
5
+ ## Installation Issues
6
+
7
+ ### Command Not Found
8
+
9
+ **Problem:** `crewx: command not found`
10
+
11
+ **Solution:**
12
+ ```bash
13
+ # Install globally
14
+ npm install -g crewx
15
+
16
+ # Verify installation
17
+ crewx --version
18
+
19
+ # Check PATH
20
+ echo $PATH | grep npm
21
+ ```
22
+
23
+ ### Permission Errors (macOS/Linux)
24
+
25
+ **Problem:** Permission denied during installation
26
+
27
+ **Solution:**
28
+ ```bash
29
+ # Use sudo (not recommended)
30
+ sudo npm install -g crewx
31
+
32
+ # Better: Fix npm permissions
33
+ mkdir ~/.npm-global
34
+ npm config set prefix '~/.npm-global'
35
+ echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
36
+ source ~/.bashrc
37
+
38
+ # Then install
39
+ npm install -g crewx
40
+ ```
41
+
42
+ ## Windows-Specific Issues
43
+
44
+ ### PowerShell Execution Policy
45
+
46
+ **Problem:** `'crewx' is not recognized as an internal or external command`
47
+
48
+ **Cause:** PowerShell execution policy restrictions prevent `npx` scripts.
49
+
50
+ **Solution 1 (Recommended): Use cmd.exe**
51
+
52
+ Update MCP configuration:
53
+ ```json
54
+ {
55
+ "servers": {
56
+ "crewx": {
57
+ "command": "cmd.exe",
58
+ "args": ["/c", "crewx", "mcp"],
59
+ "env": {
60
+ "CREWX_CONFIG": "${workspaceFolder}/crewx.yaml"
61
+ }
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ **Solution 2: Change execution policy (requires admin)**
68
+ ```powershell
69
+ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
70
+ ```
71
+
72
+ **Solution 3: Direct node execution**
73
+ ```bash
74
+ # Install globally
75
+ npm install -g crewx
76
+
77
+ # Find installation path
78
+ npm root -g
79
+
80
+ # Update MCP config
81
+ {
82
+ "servers": {
83
+ "crewx": {
84
+ "command": "node",
85
+ "args": ["C:\\Users\\YourName\\AppData\\Roaming\\npm\\node_modules\\crewx\\dist\\main.js", "mcp"]
86
+ }
87
+ }
88
+ }
89
+ ```
90
+
91
+ ## Configuration Issues
92
+
93
+ ### Configuration File Not Found
94
+
95
+ **Problem:** `Error: crewx.yaml not found` (or `agents.yaml not found`)
96
+
97
+ **Solution:**
98
+ ```bash
99
+ # Create crewx.yaml (preferred)
100
+ crewx init
101
+
102
+ # Verify file exists
103
+ ls crewx.yaml
104
+
105
+ # Check MCP config points to correct path
106
+ cat .vscode/mcp.json # or Claude Desktop config
107
+ ```
108
+
109
+ > **Note:** Both `crewx.yaml` (preferred) and `agents.yaml` (legacy) are supported.
110
+
111
+ ### Invalid YAML Syntax
112
+
113
+ **Problem:** `Error: Invalid YAML syntax`
114
+
115
+ **Solution:**
116
+ ```bash
117
+ # Run doctor to validate
118
+ crewx doctor
119
+
120
+ # Common YAML errors:
121
+ # - Incorrect indentation (use spaces, not tabs)
122
+ # - Missing quotes around special characters
123
+ # - Missing colons or dashes
124
+ ```
125
+
126
+ **Valid YAML:**
127
+ ```yaml
128
+ agents:
129
+ - id: "my_agent" # ✓ Correct indentation
130
+ name: "My Agent" # ✓ Quotes around strings
131
+ provider: "claude" # ✓ Proper spacing
132
+ ```
133
+
134
+ **Invalid YAML:**
135
+ ```yaml
136
+ agents:
137
+ - id: my_agent # ✗ No quotes (may break with special chars)
138
+ name: My Agent # ✗ No quotes
139
+ provider: claude # ✗ Wrong indentation
140
+ ```
141
+
142
+ ## MCP Integration Issues
143
+
144
+ ### MCP Server Won't Start
145
+
146
+ **Problem:** MCP server fails to start in VS Code/Claude Desktop
147
+
148
+ **Checklist:**
149
+ 1. Verify `crewx.yaml` (or `agents.yaml`) exists at specified path
150
+ 2. Check CrewX is installed: `crewx --version`
151
+ 3. Validate MCP config syntax (valid JSON)
152
+ 4. Check environment variable `CREWX_CONFIG` is set
153
+ 5. Restart MCP client after config changes
154
+
155
+ **Debugging:**
156
+ ```bash
157
+ # Test MCP server manually
158
+ crewx mcp
159
+
160
+ # Check for error messages
161
+ # Verify config file path is correct
162
+ cat $CREWX_CONFIG
163
+ ```
164
+
165
+ ### MCP Tools Not Appearing
166
+
167
+ **Problem:** CrewX tools don't show up in MCP client
168
+
169
+ **Solution:**
170
+ 1. Restart MCP client (VS Code, Claude Desktop, etc.)
171
+ 2. Check MCP client logs for connection errors
172
+ 3. Verify `CREWX_CONFIG` environment variable
173
+ 4. Test server manually: `crewx mcp`
174
+
175
+ **VS Code specific:**
176
+ ```bash
177
+ # Check VS Code MCP logs
178
+ # View > Output > Select "MCP" from dropdown
179
+ ```
180
+
181
+ ## AI Provider Issues
182
+
183
+ ### Provider Not Available
184
+
185
+ **Problem:** `Error: AI provider not available`
186
+
187
+ **Solution:**
188
+ ```bash
189
+ # Check provider status
190
+ crewx doctor
191
+
192
+ # Verify CLI tools are installed
193
+ claude --version
194
+ gemini --version
195
+ gh copilot --version
196
+
197
+ # Install missing tools
198
+ npm install -g @anthropic/claude-code
199
+ npm install -g @google/generative-ai-cli
200
+ gh extension install github/gh-copilot
201
+ ```
202
+
203
+ ### Provider Authentication Failed
204
+
205
+ **Problem:** Authentication errors with AI providers
206
+
207
+ **Claude Code:**
208
+ ```bash
209
+ # Re-authenticate
210
+ claude login
211
+
212
+ # Verify session
213
+ claude session
214
+ ```
215
+
216
+ **Gemini CLI:**
217
+ ```bash
218
+ # Set API key
219
+ export GOOGLE_API_KEY="your-api-key"
220
+
221
+ # Or configure
222
+ gemini config set apiKey YOUR_API_KEY
223
+ ```
224
+
225
+ **Copilot CLI:**
226
+ ```bash
227
+ # Re-authenticate
228
+ gh auth login
229
+
230
+ # Verify
231
+ gh auth status
232
+ ```
233
+
234
+ ### Session Limit Reached
235
+
236
+ **Problem:** `Error: Session limit reached`
237
+
238
+ **Solution:**
239
+ ```bash
240
+ # Wait for session reset (usually 5 minutes)
241
+ # Or use a different provider
242
+
243
+ # Use provider fallback
244
+ crewx query "@flexible_agent your question"
245
+ # Where flexible_agent has: provider: ["claude", "gemini", "copilot"]
246
+ ```
247
+
248
+ ## Execution Issues
249
+
250
+ ### Agent Execution Fails
251
+
252
+ **Problem:** Agent tasks fail or timeout
253
+
254
+ **Diagnostics:**
255
+ ```bash
256
+ # Run doctor
257
+ crewx doctor
258
+
259
+ # Check task logs
260
+ crewx logs <task-id>
261
+
262
+ # Verify agent configuration
263
+ cat crewx.yaml
264
+ ```
265
+
266
+ **Common causes:**
267
+ 1. Working directory doesn't exist
268
+ 2. Incorrect provider options
269
+ 3. Timeout too short for complex tasks
270
+ 4. Provider session limit
271
+ 5. **Cross-platform path issues** (hardcoded OS-specific paths)
272
+
273
+ **Solutions:**
274
+ ```yaml
275
+ # Fix working directory
276
+ working_directory: "./src" # Ensure path exists
277
+
278
+ # Adjust timeout
279
+ CODECREW_TIMEOUT_CLAUDE_EXECUTE=120000 crewx execute "@claude task"
280
+
281
+ # Use provider fallback
282
+ provider: ["claude", "gemini", "copilot"]
283
+ ```
284
+
285
+ ### Cross-Platform Path Issues
286
+
287
+ **Problem:** Agent fails with `ENOENT` error on different operating systems
288
+
289
+ **Cause:** Hardcoded absolute paths in `crewx.yaml` that only work on specific OS
290
+
291
+ **Example error:**
292
+ ```
293
+ ERROR: Process error: spawn C:\WINDOWS\system32\cmd.exe ENOENT
294
+ ```
295
+
296
+ **Bad configuration (OS-specific):**
297
+ ```yaml
298
+ agents:
299
+ - id: "my_agent"
300
+ working_directory: "/Users/username/project" # ✗ macOS only
301
+ # or
302
+ working_directory: "C:\\Users\\username\\project" # ✗ Windows only
303
+ ```
304
+
305
+ **Good configuration (cross-platform):**
306
+ ```yaml
307
+ agents:
308
+ - id: "my_agent"
309
+ # Option 1: Use relative path (recommended)
310
+ working_directory: "."
311
+
312
+ # Option 2: Omit working_directory (uses current directory)
313
+ # working_directory not specified = current directory
314
+
315
+ # Option 3: Use environment variable
316
+ working_directory: "${PROJECT_ROOT}/src"
317
+ ```
318
+
319
+ **Quick fix:**
320
+ 1. Edit `crewx.yaml`
321
+ 2. Change absolute paths to relative paths (`.`, `./src`, etc.)
322
+ 3. Or remove `working_directory` entirely to use current directory
323
+ 4. Test: `crewx query "@agent hello"`
324
+
325
+ **Debugging:**
326
+ ```bash
327
+ # Check agent configuration
328
+ cat crewx.yaml | grep -A 3 "working_directory"
329
+
330
+ # Test agent
331
+ crewx query "@agent test query"
332
+
333
+ # Check logs for path errors
334
+ cat .crewx/logs/*.log | grep -i "enoent\|working"
335
+ ```
336
+
337
+ ### Timeout Errors
338
+
339
+ **Problem:** Tasks timeout before completion
340
+
341
+ **Solution:**
342
+ ```bash
343
+ # Increase timeout via environment variables
344
+ export CODECREW_TIMEOUT_CLAUDE_QUERY=1800000 # 30 min
345
+ export CODECREW_TIMEOUT_GEMINI_EXECUTE=2400000 # 40 min
346
+
347
+ # Or inline
348
+ CODECREW_TIMEOUT_CLAUDE_QUERY=1800000 crewx query "@claude complex task"
349
+ ```
350
+
351
+ **Available timeout variables:**
352
+ ```bash
353
+ CODECREW_TIMEOUT_CLAUDE_QUERY=600000
354
+ CODECREW_TIMEOUT_CLAUDE_EXECUTE=45000
355
+ CODECREW_TIMEOUT_GEMINI_QUERY=600000
356
+ CODECREW_TIMEOUT_GEMINI_EXECUTE=1200000
357
+ CODECREW_TIMEOUT_COPILOT_QUERY=600000
358
+ CODECREW_TIMEOUT_COPILOT_EXECUTE=1200000
359
+ CODECREW_TIMEOUT_PARALLEL=300000
360
+ ```
361
+
362
+ ### Pipeline Failures
363
+
364
+ **Problem:** Piped commands fail or lose context
365
+
366
+ **Solution:**
367
+ ```bash
368
+ # Ensure each stage completes successfully
369
+ crewx query "@claude design" && \
370
+ crewx execute "@gemini implement"
371
+
372
+ # Check pipeline output
373
+ crewx query "@claude design" | tee design.txt | \
374
+ crewx execute "@gemini implement"
375
+
376
+ # Use thread for context instead
377
+ crewx query "@claude design" --thread "project"
378
+ crewx execute "@gemini implement" --thread "project"
379
+ ```
380
+
381
+ ## Thread/Conversation Issues
382
+
383
+ ### Thread Not Found
384
+
385
+ **Problem:** `Error: Thread not found`
386
+
387
+ **Solution:**
388
+ ```bash
389
+ # Check existing threads
390
+ ls .crewx/conversations/
391
+
392
+ # Create new thread
393
+ crewx query "@claude start" --thread "new-thread"
394
+
395
+ # Thread names are case-sensitive
396
+ crewx query "@claude continue" --thread "auth-feature" # Correct
397
+ crewx query "@claude continue" --thread "Auth-Feature" # Different thread
398
+ ```
399
+
400
+ ### Context Not Preserved
401
+
402
+ **Problem:** Agent doesn't remember previous conversation
403
+
404
+ **Solution:**
405
+ ```bash
406
+ # Ensure using same thread name
407
+ crewx query "@claude design" --thread "myproject"
408
+ crewx query "@claude refine" --thread "myproject" # Same name
409
+
410
+ # Check thread file exists
411
+ cat .crewx/conversations/myproject.json
412
+
413
+ # Thread is agent-specific
414
+ crewx query "@claude talk" --thread "chat" # Claude's thread
415
+ crewx query "@gemini talk" --thread "chat" # Different (Gemini's thread)
416
+ ```
417
+
418
+ ## Slack Integration Issues
419
+
420
+ ### Slack Bot Not Responding
421
+
422
+ **Problem:** Bot doesn't respond to messages
423
+
424
+ **Checklist:**
425
+ 1. Verify environment variables in `.env.slack`
426
+ 2. Check bot token permissions (chat:write, app_mentions:read, etc.)
427
+ 3. Ensure bot is invited to channel
428
+ 4. Check socket mode is enabled
429
+
430
+ **Solution:**
431
+ ```bash
432
+ # Verify .env.slack
433
+ cat .env.slack
434
+
435
+ # Required variables:
436
+ # SLACK_BOT_TOKEN=xoxb-...
437
+ # SLACK_APP_TOKEN=xapp-...
438
+ # SLACK_SIGNING_SECRET=...
439
+
440
+ # Restart bot
441
+ npm run start:slack
442
+ ```
443
+
444
+ ### Slack Message Too Large
445
+
446
+ **Problem:** `invalid_blocks` error
447
+
448
+ **Solution:**
449
+ ```bash
450
+ # Reduce max response length
451
+ echo "SLACK_MAX_RESPONSE_LENGTH=200000" >> .env.slack
452
+
453
+ # Restart bot
454
+ npm run start:slack
455
+ ```
456
+
457
+ ## Performance Issues
458
+
459
+ ### Slow Responses
460
+
461
+ **Problem:** Queries take too long to respond
462
+
463
+ **Optimization:**
464
+ ```bash
465
+ # Use faster models
466
+ crewx query "@claude:haiku quick question"
467
+ crewx query "@gemini:gemini-2.5-flash fast task"
468
+
469
+ # Reduce context size
470
+ # In crewx.yaml, limit --add-dir scope
471
+ options:
472
+ query:
473
+ - "--add-dir=./src/specific-module" # Instead of "."
474
+
475
+ # Use parallel execution
476
+ crewx query "@claude task1" "@gemini task2" # Parallel
477
+ ```
478
+
479
+ ### High Memory Usage
480
+
481
+ **Problem:** CrewX consuming too much memory
482
+
483
+ **Solution:**
484
+ ```bash
485
+ # Use lazy loading for documents
486
+ # In documents.yaml:
487
+ documents:
488
+ large-doc:
489
+ path: "docs/large.md"
490
+ lazy: true # Only load when needed
491
+
492
+ # Limit conversation history
493
+ # Delete old threads
494
+ rm .crewx/conversations/old-thread.json
495
+
496
+ # Clear old logs
497
+ crewx clear-logs
498
+ ```
499
+
500
+ ## Debugging
501
+
502
+ ### Enable Debug Logging
503
+
504
+ ```bash
505
+ # Set debug environment variable
506
+ export DEBUG=crewx:*
507
+
508
+ # Run with verbose output
509
+ crewx query "@claude test" --verbose
510
+
511
+ # Check logs
512
+ cat .crewx/logs/*.log
513
+ ```
514
+
515
+ ### Check System Status
516
+
517
+ ```bash
518
+ # Comprehensive health check
519
+ crewx doctor
520
+
521
+ # Check provider availability
522
+ crewx query "@claude hello"
523
+ crewx query "@gemini hello"
524
+ crewx query "@copilot hello"
525
+
526
+ # Verify configuration
527
+ cat agents.yaml
528
+ ```
529
+
530
+ ### Get Task Logs
531
+
532
+ ```bash
533
+ # View specific task
534
+ crewx logs <task-id>
535
+
536
+ # View all recent tasks
537
+ crewx logs
538
+
539
+ # Find task ID from previous output
540
+ # Look for: "Task ID: abc123"
541
+ ```
542
+
543
+ ## Getting Help
544
+
545
+ If issues persist:
546
+
547
+ 1. **Run diagnostics:**
548
+ ```bash
549
+ crewx doctor
550
+ ```
551
+
552
+ 2. **Check logs:**
553
+ ```bash
554
+ ls .crewx/logs/
555
+ cat .crewx/logs/latest.log
556
+ ```
557
+
558
+ 3. **Verify configuration:**
559
+ ```bash
560
+ cat crewx.yaml # or agents.yaml
561
+ crewx init --force # Reset to defaults
562
+ ```
563
+
564
+ 4. **Test providers individually:**
565
+ ```bash
566
+ claude "hello"
567
+ gemini -p "hello"
568
+ gh copilot suggest "hello"
569
+ ```
570
+
571
+ 5. **Report issue:**
572
+ - GitHub: https://github.com/sowonlabs/crewx/issues
573
+ - Include: Error message, `crewx doctor` output, logs
574
+
575
+ ## Common Error Messages
576
+
577
+ | Error | Cause | Solution |
578
+ |-------|-------|----------|
579
+ | `crewx.yaml not found` | Missing configuration | Run `crewx init` |
580
+ | `Provider not available` | CLI tool not installed | Install provider CLI |
581
+ | `Session limit reached` | Too many requests | Wait or use different provider |
582
+ | `Timeout exceeded` | Task too complex | Increase timeout via env vars |
583
+ | `Invalid YAML syntax` | Malformed config | Run `crewx doctor` |
584
+ | `Thread not found` | Wrong thread name | Check `.crewx/conversations/` |
585
+ | `Permission denied` | File/directory access | Check working directory permissions |
package/package.json CHANGED
@@ -1,26 +1,115 @@
1
1
  {
2
2
  "name": "crewx",
3
- "version": "0.1.1",
4
- "description": "Execute AI crews instantly without installation - Part of CrewCode AI Agent Platform",
5
- "main": "index.js",
3
+ "version": "0.1.2",
4
+ "license": "Apache-2.0",
5
+ "description": "Bring Your Own AI(BYOA) team in Slack/IDE(MCP) with your existing subscriptions",
6
+ "main": "dist/main.js",
7
+ "module": "dist/main.js",
6
8
  "bin": {
7
- "crewx": "./bin/crewx.js"
9
+ "crewx": "dist/main.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/main.js",
14
+ "require": "./dist/main.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md",
20
+ "crewx.yaml",
21
+ "docs"
22
+ ],
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/sowonlabs/crewx"
26
+ },
27
+ "homepage": "https://github.com/sowonlabs/crewx",
28
+ "bugs": {
29
+ "url": "https://github.com/sowonlabs/crewx/issues"
30
+ },
31
+ "author": "SowonLabs",
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "scripts": {
36
+ "build": "nest build",
37
+ "postbuild": "node -e \"const fs = require('fs'); let content = fs.readFileSync('dist/main.js', 'utf8'); const lines = content.split('\\n'); if (lines[0] === '#!/usr/bin/env node' && lines[1] === '#!/usr/bin/env node') { lines.shift(); content = lines.join('\\n'); fs.writeFileSync('dist/main.js', content); console.log('✅ Removed duplicate shebang'); } else if (!content.startsWith('#!/usr/bin/env node')) { fs.writeFileSync('dist/main.js', '#!/usr/bin/env node\\n' + content); console.log('✅ Added shebang to dist/main.js'); } else { console.log('✅ Shebang already present'); }\"",
38
+ "build:install": "npm run build && npm install -g .",
39
+ "start": "node dist/main.js",
40
+ "start:mcp": "node dist/main.js mcp",
41
+ "start:slack": "caffeinate -i dotenv -e .env.slack -- node dist/main.js slack --log --agent crewx_dev",
42
+ "dev": "dotenv -e .env.test -- nest start --watch -- --log",
43
+ "dev:install": "ts-node src/main.ts --install --log",
44
+ "debug": "dotenv -e .env.test -- nest start --debug --watch -- --log --protocol HTTP",
45
+ "inspector": "npx @modelcontextprotocol/inspector --config inspector.config.json --server crewx",
46
+ "test": "vitest run",
47
+ "test:watch": "vitest",
48
+ "test:ui": "vitest --ui",
49
+ "cli": "npm run build && node dist/main.js",
50
+ "cli:help": "npm run build && node dist/main.js",
51
+ "cli:init": "npm run build && node dist/main.js init",
52
+ "cli:doctor": "npm run build && node dist/main.js doctor",
53
+ "cli:query": "npm run build && node dist/main.js query",
54
+ "cli:execute": "npm run build && node dist/main.js execute",
55
+ "mcp": "npm run build && node dist/main.js mcp",
56
+ "mcp:log": "npm run build && node dist/main.js mcp --log",
57
+ "prepack": "npm run build"
58
+ },
59
+ "dependencies": {
60
+ "@modelcontextprotocol/sdk": "^1.0.0",
61
+ "@nestjs/common": "^11.0.0",
62
+ "@nestjs/core": "^11.0.0",
63
+ "@nestjs/platform-express": "^11.0.0",
64
+ "@slack/bolt": "^4.4.0",
65
+ "@slack/web-api": "^7.10.0",
66
+ "@sowonai/nestjs-mcp-adapter": "^0.1.3",
67
+ "@types/js-yaml": "^4.0.9",
68
+ "@types/mdast": "^4.0.4",
69
+ "@types/unist": "^3.0.3",
70
+ "ajv": "^8.17.1",
71
+ "ajv-formats": "^3.0.1",
72
+ "chalk": "^4.1.2",
73
+ "execa": "^8.0.1",
74
+ "fast-glob": "^3.3.0",
75
+ "handlebars": "^4.7.8",
76
+ "ignore": "^5.2.0",
77
+ "js-yaml": "^4.1.0",
78
+ "md-to-slack": "^1.0.0",
79
+ "reflect-metadata": "^0.1.13",
80
+ "remark-parse": "^11.0.0",
81
+ "remark-stringify": "^11.0.0",
82
+ "rxjs": "^7.8.0",
83
+ "unified": "^11.0.5",
84
+ "unist-util-visit": "^5.0.0",
85
+ "yargs": "^17.7.0",
86
+ "zod": "^3.22.0"
87
+ },
88
+ "devDependencies": {
89
+ "@nestjs/cli": "^11.0.0",
90
+ "@nestjs/schematics": "^11.0.0",
91
+ "@nestjs/testing": "^11.0.0",
92
+ "@types/ajv": "^0.0.5",
93
+ "@types/express": "^5.0.3",
94
+ "@types/node": "^20.19.19",
95
+ "@types/yargs": "^17.0.0",
96
+ "@vitest/ui": "^1.0.0",
97
+ "dotenv-cli": "^6.0.0",
98
+ "ts-loader": "^9.0.0",
99
+ "ts-node": "^10.0.0",
100
+ "tsconfig-paths": "^4.2.0",
101
+ "typescript": "^5.0.0",
102
+ "vitest": "^1.0.0"
8
103
  },
9
104
  "keywords": [
105
+ "crewx",
106
+ "claude",
107
+ "gemini",
108
+ "copilot",
109
+ "mcp",
10
110
  "ai",
11
- "agents",
12
- "crew",
13
- "ai-agents",
14
- "llm",
15
- "development",
16
- "automation",
17
- "crewcode"
18
- ],
19
- "author": "Doha Park <dohapark81@gmail.com>",
20
- "license": "UNLICENSED",
21
- "private": false,
22
- "homepage": "https://crewcode.dev",
23
- "engines": {
24
- "node": ">=18.0.0"
25
- }
111
+ "model-context-protocol",
112
+ "multi-agent",
113
+ "ai-collaboration"
114
+ ]
26
115
  }