@voria/cli 0.0.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 (67) hide show
  1. package/README.md +439 -0
  2. package/bin/voria +730 -0
  3. package/docs/ARCHITECTURE.md +419 -0
  4. package/docs/CHANGELOG.md +189 -0
  5. package/docs/CONTRIBUTING.md +447 -0
  6. package/docs/DESIGN_DECISIONS.md +380 -0
  7. package/docs/DEVELOPMENT.md +535 -0
  8. package/docs/EXAMPLES.md +434 -0
  9. package/docs/INSTALL.md +335 -0
  10. package/docs/IPC_PROTOCOL.md +310 -0
  11. package/docs/LLM_INTEGRATION.md +416 -0
  12. package/docs/MODULES.md +470 -0
  13. package/docs/PERFORMANCE.md +346 -0
  14. package/docs/PLUGINS.md +432 -0
  15. package/docs/QUICKSTART.md +184 -0
  16. package/docs/README.md +133 -0
  17. package/docs/ROADMAP.md +346 -0
  18. package/docs/SECURITY.md +334 -0
  19. package/docs/TROUBLESHOOTING.md +565 -0
  20. package/docs/USER_GUIDE.md +700 -0
  21. package/package.json +63 -0
  22. package/python/voria/__init__.py +8 -0
  23. package/python/voria/__pycache__/__init__.cpython-312.pyc +0 -0
  24. package/python/voria/__pycache__/engine.cpython-312.pyc +0 -0
  25. package/python/voria/core/__init__.py +1 -0
  26. package/python/voria/core/__pycache__/__init__.cpython-312.pyc +0 -0
  27. package/python/voria/core/__pycache__/setup.cpython-312.pyc +0 -0
  28. package/python/voria/core/agent/__init__.py +9 -0
  29. package/python/voria/core/agent/__pycache__/__init__.cpython-312.pyc +0 -0
  30. package/python/voria/core/agent/__pycache__/loop.cpython-312.pyc +0 -0
  31. package/python/voria/core/agent/loop.py +343 -0
  32. package/python/voria/core/executor/__init__.py +19 -0
  33. package/python/voria/core/executor/__pycache__/__init__.cpython-312.pyc +0 -0
  34. package/python/voria/core/executor/__pycache__/executor.cpython-312.pyc +0 -0
  35. package/python/voria/core/executor/executor.py +431 -0
  36. package/python/voria/core/github/__init__.py +33 -0
  37. package/python/voria/core/github/__pycache__/__init__.cpython-312.pyc +0 -0
  38. package/python/voria/core/github/__pycache__/client.cpython-312.pyc +0 -0
  39. package/python/voria/core/github/client.py +438 -0
  40. package/python/voria/core/llm/__init__.py +55 -0
  41. package/python/voria/core/llm/__pycache__/__init__.cpython-312.pyc +0 -0
  42. package/python/voria/core/llm/__pycache__/base.cpython-312.pyc +0 -0
  43. package/python/voria/core/llm/__pycache__/claude_provider.cpython-312.pyc +0 -0
  44. package/python/voria/core/llm/__pycache__/gemini_provider.cpython-312.pyc +0 -0
  45. package/python/voria/core/llm/__pycache__/modal_provider.cpython-312.pyc +0 -0
  46. package/python/voria/core/llm/__pycache__/model_discovery.cpython-312.pyc +0 -0
  47. package/python/voria/core/llm/__pycache__/openai_provider.cpython-312.pyc +0 -0
  48. package/python/voria/core/llm/base.py +152 -0
  49. package/python/voria/core/llm/claude_provider.py +188 -0
  50. package/python/voria/core/llm/gemini_provider.py +148 -0
  51. package/python/voria/core/llm/modal_provider.py +228 -0
  52. package/python/voria/core/llm/model_discovery.py +289 -0
  53. package/python/voria/core/llm/openai_provider.py +146 -0
  54. package/python/voria/core/patcher/__init__.py +9 -0
  55. package/python/voria/core/patcher/__pycache__/__init__.cpython-312.pyc +0 -0
  56. package/python/voria/core/patcher/__pycache__/patcher.cpython-312.pyc +0 -0
  57. package/python/voria/core/patcher/patcher.py +375 -0
  58. package/python/voria/core/planner/__init__.py +1 -0
  59. package/python/voria/core/setup.py +201 -0
  60. package/python/voria/core/token_manager/__init__.py +29 -0
  61. package/python/voria/core/token_manager/__pycache__/__init__.cpython-312.pyc +0 -0
  62. package/python/voria/core/token_manager/__pycache__/manager.cpython-312.pyc +0 -0
  63. package/python/voria/core/token_manager/manager.py +241 -0
  64. package/python/voria/engine.py +1185 -0
  65. package/python/voria/plugins/__init__.py +1 -0
  66. package/python/voria/plugins/python/__init__.py +1 -0
  67. package/python/voria/plugins/typescript/__init__.py +1 -0
@@ -0,0 +1,565 @@
1
+ # Troubleshooting Guide
2
+
3
+ Solutions to common voria issues.
4
+
5
+ ## Installation Issues
6
+
7
+ ### "cargo not found"
8
+
9
+ **Error:**
10
+ ```
11
+ command not found: cargo
12
+ ```
13
+
14
+ **Solution:**
15
+ ```bash
16
+ # Install Rust
17
+ curl --proto '=https' --tlsvv0.0.1 -sSf https://sh.rustup.rs | sh
18
+
19
+ # Add to PATH
20
+ source $HOME/.cargo/env
21
+
22
+ # Verify
23
+ cargo --version
24
+ ```
25
+
26
+ ### "Python command not found"
27
+
28
+ **Error:**
29
+ ```
30
+ python3: command not found
31
+ ```
32
+
33
+ **Solution:**
34
+ ```bash
35
+ # macOS
36
+ brew install python@3.11
37
+
38
+ # Ubuntu/Debian
39
+ sudo apt install python3
40
+
41
+ # Verify
42
+ python3 --version # Should be 3.9+
43
+ ```
44
+
45
+ ### "Build fails: can't find Tokio"
46
+
47
+ **Error:**
48
+ ```
49
+ error[E0432]: unresolved import `tokio`
50
+ ```
51
+
52
+ **Solution:**
53
+ ```bash
54
+ cd rust
55
+ cargo clean
56
+ cargo build
57
+ ```
58
+
59
+ ### "Python import error"
60
+
61
+ **Error:**
62
+ ```
63
+ ModuleNotFoundError: No module named 'voria'
64
+ ```
65
+
66
+ **Solution:**
67
+ ```bash
68
+ cd python
69
+ pip install -e .
70
+
71
+ # Verify
72
+ python3 -c "import voria; print('OK')"
73
+ ```
74
+
75
+ ## Runtime Issues
76
+
77
+ ### "Command hangs or takes forever"
78
+
79
+ **Symptoms:**
80
+ - Command doesn't respond
81
+ - Cursor stuck
82
+
83
+ **Solutions:**
84
+
85
+ 1. **Check if Python process is stuck:**
86
+ ```bash
87
+ # In another terminal
88
+ ps aux | grep python
89
+
90
+ # Kill the stuck process
91
+ pkill -f voria.engine
92
+ ```
93
+
94
+ 2. **Increase timeout:**
95
+ ```bash
96
+ voria_TIMEOUT=3600 ./target/release/voria plan 1
97
+ ```
98
+
99
+ 3. **Use different LLM** (might be down):
100
+ ```bash
101
+ ./target/release/voria plan 1 --llm gemini
102
+ ```
103
+
104
+ 4. **Check network:**
105
+ ```bash
106
+ # Can you access the LLM API?
107
+ curl -I https://api.openai.com/
108
+ ```
109
+
110
+ ### "API Key not working"
111
+
112
+ **Error:**
113
+ ```
114
+ Authentication failed
115
+ Unauthorized: Invalid API key
116
+ ```
117
+
118
+ **Solutions:**
119
+
120
+ 1. **Ensure key is set:**
121
+ ```bash
122
+ echo $OPENAI_API_KEY # Should not be empty
123
+ ```
124
+
125
+ 2. **Check key is correct:**
126
+ ```bash
127
+ # Visit provider console to verify
128
+ # https://platform.openai.com/logout (wait, this logs out)
129
+ # https://platform.openai.com/account/api-keys
130
+ ```
131
+
132
+ 3. **Reconfigure:**
133
+ ```bash
134
+ python3 -m voria.core.setup
135
+ # Choose provider → Enter key again → Select model
136
+ ```
137
+
138
+ 4. **Test key directly:**
139
+ ```python
140
+ import httpx
141
+ import asyncio
142
+
143
+ async def test():
144
+ client = httpx.AsyncClient()
145
+ resp = await client.post(
146
+ "https://api.openai.com/v1/models",
147
+ headers={"Authorization": f"Bearer {KEY}"}
148
+ )
149
+ print(resp.status_code)
150
+ asyncio.run(test())
151
+ ```
152
+
153
+ ### "Patch apply fails"
154
+
155
+ **Error:**
156
+ ```
157
+ Failed to apply patch: hunk FAILED
158
+ ```
159
+
160
+ **Solutions:**
161
+
162
+ 1. **Check patch is valid:**
163
+ ```bash
164
+ # Look at generated patchfile
165
+ voria issue 42 --dry-run --verbose
166
+ ```
167
+
168
+ 2. **Try fuzzy matching:**
169
+ ```bash
170
+ voria issue 42 --patch-strategy fuzzy
171
+ ```
172
+
173
+ 3. **Rollback and retry:**
174
+ ```bash
175
+ # Recovery from auto-backup
176
+ cp ~/.voria/backups/file_* restored_file
177
+ ```
178
+
179
+ ### "Tests fail after patch"
180
+
181
+ **Error:**
182
+ ```
183
+ ❌ Test suite failed
184
+ Tests: 24 passed, 1 failed
185
+ ```
186
+
187
+ **Solutions:**
188
+
189
+ 1. **Review generated code:**
190
+ ```bash
191
+ # View the patch that was applied
192
+ git diff HEAD
193
+ ```
194
+
195
+ 2. **Increase iterations** (let voria refine):
196
+ ```bash
197
+ voria issue 42 --max-iterations 5
198
+ ```
199
+
200
+ 3. **Use different LLM** (better quality):
201
+ ```bash
202
+ voria issue 42 --llm claude
203
+ ```
204
+
205
+ 4. **Check test output:**
206
+ ```bash
207
+ # Detailed test failure info
208
+ pytest -vv # Run locally
209
+ ```
210
+
211
+ ## Cost & Token Issues
212
+
213
+ ### "Token budget exceeded"
214
+
215
+ **Error:**
216
+ ```
217
+ BudgetExceededError: Daily budget of $5.00 exceeded
218
+ ```
219
+
220
+ **Solutions:**
221
+
222
+ 1. **Check spending:**
223
+ ```bash
224
+ voria token info
225
+ ```
226
+
227
+ 2. **Increase budget:**
228
+ ```bash
229
+ python3 -m voria.core.setup # Reconfigure
230
+ ```
231
+
232
+ 3. **Use cheaper LLM:**
233
+ ```bash
234
+ voria issue 42 --llm gemini # Cheaper than OpenAI
235
+ ```
236
+
237
+ 4. **Skip iterations** (don't refine):
238
+ ```bash
239
+ voria issue 42 --max-iterations 1
240
+ ```
241
+
242
+ ### "High token usage"
243
+
244
+ **Symptom:**
245
+ - Tokens used much higher than expected
246
+
247
+ **Solutions:**
248
+
249
+ 1. **Reduce context:**
250
+ ```bash
251
+ voria issue 42 --max-files 10 --exclude "tests/"
252
+ ```
253
+
254
+ 2. **Shorter prompts:**
255
+ - Customize prompts in `~/.voria/prompts/`
256
+ - Remove unnecessary instructions
257
+
258
+ 3. **Use faster model:**
259
+ ```bash
260
+ voria issue 42 --model gpt-4-mini
261
+ ```
262
+
263
+ ## Network Issues
264
+
265
+ ### "Connection timeout"
266
+
267
+ **Error:**
268
+ ```
269
+ Connection timeout: Unable to reach api.openai.com
270
+ ```
271
+
272
+ **Solutions:**
273
+
274
+ 1. **Check internet connection:**
275
+ ```bash
276
+ ping google.com
277
+ ```
278
+
279
+ 2. **Check DNS:**
280
+ ```bash
281
+ nslookup api.openai.com
282
+ ```
283
+
284
+ 3. **Add network retry:**
285
+ ```python
286
+ # In settings
287
+ voria_retry_count=3
288
+ voria_retry_delay=2
289
+ ```
290
+
291
+ 4. **Use VPN** (if behind corporate proxy):
292
+ ```bash
293
+ # Configure system proxy
294
+ export HTTP_PROXY="http://proxy:8080"
295
+ export HTTPS_PROXY="https://proxy:8443"
296
+ ```
297
+
298
+ ### "TLS certificate error"
299
+
300
+ **Error:**
301
+ ```
302
+ SSL: CERTIFICATE_VERIFY_FAILED
303
+ ```
304
+
305
+ **Solutions (Development only):**
306
+
307
+ ```bash
308
+ # Disable cert verification (unsafe!)
309
+ export INSECURE_SKIP_VERIFY=true
310
+ voria plan 1
311
+
312
+ # Better: Update CA certificates
313
+ # macOS
314
+ /usr/local/opt/openssl/bin/c_rehash
315
+
316
+ # Linux
317
+ sudo update-ca-certificates
318
+ ```
319
+
320
+ ## Protocol Issues
321
+
322
+ ### "NDJSON protocol error"
323
+
324
+ **Error:**
325
+ ```
326
+ JSON parsing error: extra data
327
+ PyErr_SetString: Protocol error
328
+ ```
329
+
330
+ **Solutions:**
331
+
332
+ 1. **Clear cache:**
333
+ ```bash
334
+ rm -rf ~/.voria/
335
+ ```
336
+
337
+ 2. **Reinstall Python:**
338
+ ```bash
339
+ cd python
340
+ pip uninstall voria
341
+ pip install -e .
342
+ ```
343
+
344
+ 3. **Check for corruption:**
345
+ ```bash
346
+ # Test protocol manually
347
+ echo '{"command":"plan","issue_id":1}' | python3 -m voria.engine | head -1
348
+ ```
349
+
350
+ ### "Process communication broken"
351
+
352
+ **Symptoms:**
353
+ - Python subprocess crashes
354
+ - No response from engine
355
+
356
+ **Solutions:**
357
+
358
+ 1. **Kill stray processes:**
359
+ ```bash
360
+ pkill -f voria.engine
361
+ ```
362
+
363
+ 2. **Check stderr for errors:**
364
+ ```bash
365
+ voria -v plan 1 2>&1 | tail -20
366
+ ```
367
+
368
+ 3. **Test Python directly:**
369
+ ```bash
370
+ python3 -m voria.engine # See if it starts
371
+ ```
372
+
373
+ ## Test Execution Issues
374
+
375
+ ### "Framework not detected"
376
+
377
+ **Error:**
378
+ ```
379
+ Could not detect test framework
380
+ ```
381
+
382
+ **Solutions:**
383
+
384
+ 1. **Specify manually:**
385
+ ```bash
386
+ voria issue 42 --test-cmd "pytest -v tests/"
387
+ ```
388
+
389
+ 2. **Check framework installed:**
390
+ ```bash
391
+ pytest --version
392
+ # or
393
+ npm test -- --version
394
+ ```
395
+
396
+ 3. **Verify test directory exists:**
397
+ ```bash
398
+ ls tests/
399
+ ls test/
400
+ # (check for capital T)
401
+ ```
402
+
403
+ ### "Tests timeout"
404
+
405
+ **Error:**
406
+ ```
407
+ Test execution timeout: Exceeded 300s
408
+ ```
409
+
410
+ **Solutions:**
411
+
412
+ 1. **Increase timeout:**
413
+ ```bash
414
+ voria issue 42 --test-timeout 600
415
+ ```
416
+
417
+ 2. **Run tests individually:**
418
+ ```bash
419
+ # Identify slow test
420
+ pytest --durations=10 # Show 10 slowest
421
+ ```
422
+
423
+ 3. **Skip slow tests:**
424
+ ```bash
425
+ voria issue 42 --test-cmd "pytest -v -m 'not slow'"
426
+ ```
427
+
428
+ ## Permission Issues
429
+
430
+ ### "Permission denied"
431
+
432
+ **Error:**
433
+ ```
434
+ PermissionError: [Errno 13] Permission denied: '/repo/file.py'
435
+ ```
436
+
437
+ **Solutions:**
438
+
439
+ ```bash
440
+ # Check permissions
441
+ ls -la /repo/file.py
442
+
443
+ # Fix permissions
444
+ chmod 644 /repo/file.py
445
+ chmod 755 /repo/
446
+
447
+ # Or run with adequate permissions
448
+ sudo voria issue 42 # ⚠️ Use cautiously
449
+ ```
450
+
451
+ ### "Cannot write to backup directory"
452
+
453
+ **Error:**
454
+ ```
455
+ PermissionError: ~/.voria/backups
456
+ ```
457
+
458
+ **Solutions:**
459
+
460
+ ```bash
461
+ # Create backup directory
462
+ mkdir -p ~/.voria/backups
463
+
464
+ # Fix permissions
465
+ chmod 700 ~/.voria/
466
+
467
+ # Verify
468
+ ls -ld ~/.voria/
469
+ ```
470
+
471
+ ## Output Issues
472
+
473
+ ### "Garbled output / strange characters"
474
+
475
+ **Symptoms:**
476
+ - Unicode characters not displaying
477
+ - Colored output broken
478
+
479
+ **Solutions:**
480
+
481
+ ```bash
482
+ # Force UTF-8
483
+ export LANG=en_US.UTF-8
484
+ export LC_ALL=en_US.UTF-8
485
+
486
+ # Disable colors (if terminal doesn't support)
487
+ voria --no-color plan 1
488
+
489
+ # Verify terminal encoding
490
+ locale
491
+ ```
492
+
493
+ ### "No output at all"
494
+
495
+ **Symptoms:**
496
+ - Command runs but shows nothing
497
+
498
+ **Solutions:**
499
+
500
+ 1. **Use verbose flag:**
501
+ ```bash
502
+ voria -v plan 1
503
+ ```
504
+
505
+ 2. **Check if running:**
506
+ ```bash
507
+ # In another terminal
508
+ watch -n 1 'ps aux | grep voria'
509
+ ```
510
+
511
+ 3. **Check logs:**
512
+ ```bash
513
+ tail -f ~/.voria/voria.log
514
+ ```
515
+
516
+ ## Getting Help
517
+
518
+ ### Collect Debug Information
519
+
520
+ ```bash
521
+ # Generate debug bundle
522
+ mkdir voria-debug
523
+ cd voria-debug
524
+
525
+ # Collect versions
526
+ echo "Rust:" && rustc --version && cargo --version
527
+ echo "Python:" && python3 --version
528
+ echo "voria:" && ./target/release/voria --version
529
+
530
+ # Test setup
531
+ ./target/release/voria --help > cli_help.txt
532
+ python3 -m voria.engine < /dev/null 2> engine.log
533
+
534
+ # System info
535
+ uname -a > system.txt
536
+ env | grep voria > voria_env.txt
537
+
538
+ # Create bundle
539
+ tar czf voria-debug.tar.gz *.txt *.log
540
+
541
+ # Upload to issue
542
+ ```
543
+
544
+ ### Report an Issue
545
+
546
+ 1. **Search existing issues** (might be solved)
547
+ 2. **Create new issue** with:
548
+ - Error message (full text)
549
+ - Commands you ran
550
+ - Expected behavior
551
+ - Actual behavior
552
+ - Debug bundle (if complex)
553
+ 3. **Check** [GitHub Issues](https://github.com/Srizdebnath/voria/issues)
554
+
555
+ ### Ask for Help
556
+
557
+ - [GitHub Discussions](https://github.com/Srizdebnath/voria/discussions)
558
+ - Email: srizd449@gmail.com
559
+
560
+ ---
561
+
562
+ **See Also:**
563
+ - [PERFORMANCE.md](PERFORMANCE.md) - Speed optimization
564
+ - [SECURITY.md](SECURITY.md) - Security issues
565
+ - [DEVELOPMENT.md](DEVELOPMENT.md) - Development setup issues