@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,447 @@
1
+ # Contributing to voria
2
+
3
+ Guidelines for contributing to the voria project.
4
+
5
+ ## Welcome Contributors!
6
+
7
+ voria is a community project. We welcome contributions from people of all experience levels—from fixing documentation to implementing complex features.
8
+
9
+ **Not sure where to start?** Check [#good-first-issue](https://github.com/Srizdebnath/voria/labels/good-first-issue) on GitHub.
10
+
11
+ ---
12
+
13
+ ## Getting Started
14
+
15
+ ### 1. Fork & Clone
16
+ ```bash
17
+ # Fork on GitHub, then:
18
+ git clone https://github.com/Srizdebnath/voria.git
19
+ cd voria
20
+ ```
21
+
22
+ ### 2. Set Up Development Environment
23
+ ```bash
24
+ # See DEVELOPMENT.md for full setup
25
+ # Quick version:
26
+ cd rust && cargo build
27
+ cd ../python && pip install -e .
28
+ ```
29
+
30
+ ### 3. Create a Branch
31
+ ```bash
32
+ # Follow conventional naming
33
+ git checkout -b feature/my-feature
34
+ git checkout -b fix/issue-123
35
+ git checkout -b docs/update-readme
36
+ ```
37
+
38
+ ### 4. Make Changes & Test
39
+ ```bash
40
+ # Write code
41
+ # Run tests
42
+ cd rust && cargo test
43
+ cd ../python && pytest
44
+
45
+ # Check formatting
46
+ cargo fmt && cargo clippy
47
+ black . && mypy .
48
+ ```
49
+
50
+ ### 5. Commit with Conventional Commits
51
+ ```bash
52
+ git commit -m "feat: add new LLM provider support"
53
+ git commit -m "fix: resolve issue #123"
54
+ git commit -m "docs: update installation guide"
55
+ git commit -m "test: add test for graph analyzer"
56
+ git commit -m "refactor: simplify token manager"
57
+ ```
58
+
59
+ **Commit types:**
60
+ - `feat`: New feature
61
+ - `fix`: Bug fix
62
+ - `docs`: Documentation
63
+ - `test`: Test coverage
64
+ - `refactor`: Code cleanup (no behavior change)
65
+ - `perf`: Performance improvement
66
+ - `ci`: CI/CD changes
67
+
68
+ ### 6. Push & Create Pull Request
69
+ ```bash
70
+ git push origin feature/my-feature
71
+ # Go to GitHub and create pull request
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Project Structure
77
+
78
+ ```
79
+ voria/
80
+ ├── rust/ # Rust CLI and orchestration
81
+ │ ├── src/
82
+ │ │ ├── main.rs # Entry point
83
+ │ │ ├── cli.rs # Command-line interface
84
+ │ │ ├── ipc.rs # NDJSON IPC protocol
85
+ │ │ ├── orchestrator.rs # Main orchestration
86
+ │ │ ├── config.rs # Configuration management
87
+ │ │ └── ui.rs # Output formatting
88
+ │ ├── Cargo.toml
89
+ │ └── tests/ # Integration tests
90
+
91
+ ├── python/ # Python core logic
92
+ │ ├── voria/
93
+ │ │ ├── core/
94
+ │ │ │ ├── llm/ # LLM providers & discovery
95
+ │ │ │ ├── patcher/ # Code patching (diff apply)
96
+ │ │ │ ├── executor/ # Test execution
97
+ │ │ │ ├── agent/ # Main orchestration loop
98
+ │ │ │ └── github/ # GitHub integration
99
+ │ │ ├── plugins/ # Plugin system
100
+ │ │ ├── utils/ # Utilities
101
+ │ │ └── engine.py # NDJSON protocol handler
102
+ │ ├── tests/ # Unit & integration tests
103
+ │ ├── setup.py
104
+ │ └── requirements.txt
105
+
106
+ ├── docs/ # Documentation (Markdown)
107
+ │ ├── README.md # Start here
108
+ │ ├── QUICKSTART.md # 5-minute setup
109
+ │ ├── USER_GUIDE.md # How to use voria
110
+ │ ├── EXAMPLES.md # Real-world examples
111
+ │ ├── ARCHITECTURE.md # System design
112
+ │ ├── IPC_PROTOCOL.md # NDJSON protocol spec
113
+ │ ├── DESIGN_DECISIONS.md # Why things are the way they are
114
+ │ ├── MODULES.md # API reference
115
+ │ ├── DEVELOPMENT.md # Development setup
116
+ │ ├── CONTRIBUTING.md # This file
117
+ │ ├── PLUGINS.md # Plugin development
118
+ │ ├── LLM_INTEGRATION.md # Adding new LLM providers
119
+ │ ├── PERFORMANCE.md # Optimization guide
120
+ │ ├── SECURITY.md # Security practices
121
+ │ ├── TROUBLESHOOTING.md # Common issues & solutions
122
+ │ └── ROADMAP.md # Feature roadmap
123
+
124
+ ├── README.md # Project overview
125
+ ├── Cargo.toml # Rust workspace config
126
+ └── Cargo.lock
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Testing
132
+
133
+ ### Python Tests
134
+ ```bash
135
+ cd python
136
+
137
+ # Run all tests
138
+ pytest
139
+
140
+ # Run specific test
141
+ pytest tests/test_patcher.py::test_apply_patch
142
+
143
+ # With coverage
144
+ pytest --cov=voria
145
+
146
+ # Verbose output
147
+ pytest -vv
148
+ ```
149
+
150
+ ### Rust Tests
151
+ ```bash
152
+ cd rust
153
+
154
+ # Run all tests
155
+ cargo test
156
+
157
+ # Run specific test
158
+ cargo test test_command_parsing
159
+
160
+ # With output
161
+ cargo test -- --nocapture
162
+ ```
163
+
164
+ ### Integration Tests
165
+ ```bash
166
+ # Full workflow test (all systems)
167
+ ./script/test-integration.sh
168
+
169
+ # Specific integration test
170
+ cd tests && python3 test_end_to_end.py
171
+ ```
172
+
173
+ ### Manual Testing
174
+ ```bash
175
+ # Test locally modified code
176
+ cd rust
177
+ cargo build
178
+
179
+ cd ../python
180
+ pip install -e .
181
+
182
+ # Run test command
183
+ ./target/release/voria plan 123
184
+ ```
185
+
186
+ ---
187
+
188
+ ## Code Style
189
+
190
+ ### Python
191
+ We use:
192
+ - **Black** for formatting
193
+ - **MyPy** for type checking
194
+ - **Pylint** for linting
195
+ - **Google-style docstrings**
196
+
197
+ ```bash
198
+ cd python
199
+
200
+ # Format code
201
+ black .
202
+
203
+ # Type checking
204
+ mypy .
205
+
206
+ # Linting
207
+ pylint voria/
208
+
209
+ # Before commit, run all:
210
+ black . && mypy . && pylint voria/ && pytest
211
+ ```
212
+
213
+ **Example Python style:**
214
+ ```python
215
+ """Module docstring describing the module."""
216
+
217
+ from typing import Optional, Dict, List
218
+ import logging
219
+
220
+ logger = logging.getLogger(__name__)
221
+
222
+
223
+ class CodePatcher:
224
+ """Applies patches to source code files.
225
+
226
+ Attributes:
227
+ backup_dir: Directory for storing backups
228
+ verify_checksum: Whether to verify checksums
229
+ """
230
+
231
+ def __init__(self, backup_dir: str, verify_checksum: bool = True):
232
+ """Initialize the patcher.
233
+
234
+ Args:
235
+ backup_dir: Path to backup directory
236
+ verify_checksum: Whether to verify file checksums
237
+ """
238
+ self.backup_dir = backup_dir
239
+ self.verify_checksum = verify_checksum
240
+
241
+ def apply_patch(self, filepath: str, patch: str) -> bool:
242
+ """Apply a unified diff patch to a file.
243
+
244
+ Args:
245
+ filepath: Path to the file to patch
246
+ patch: Unified diff format patch
247
+
248
+ Returns:
249
+ True if patch applied successfully, False otherwise
250
+
251
+ Raises:
252
+ FileNotFoundError: If file doesn't exist
253
+ ValueError: If patch is invalid
254
+ """
255
+ # Implementation here
256
+ pass
257
+ ```
258
+
259
+ ### Rust
260
+ We use:
261
+ - **rustfmt** for formatting
262
+ - **clippy** for linting
263
+
264
+ ```bash
265
+ cd rust
266
+
267
+ # Format code
268
+ cargo fmt
269
+
270
+ # Linting
271
+ cargo clippy -- -D warnings
272
+
273
+ # Before commit:
274
+ cargo fmt && cargo clippy && cargo test
275
+ ```
276
+
277
+ **Example Rust style:**
278
+ ```rust
279
+ use std::path::PathBuf;
280
+
281
+ /// Applies patches to source code.
282
+ #[derive(Debug)]
283
+ pub struct CodePatcher {
284
+ backup_dir: PathBuf,
285
+ verify_checksum: bool,
286
+ }
287
+
288
+ impl CodePatcher {
289
+ /// Creates a new code patcher.
290
+ ///
291
+ /// # Arguments
292
+ ///
293
+ /// * `backup_dir` - Directory for storing backups
294
+ /// * `verify_checksum` - Whether to verify checksums
295
+ pub fn new(backup_dir: PathBuf, verify_checksum: bool) -> Self {
296
+ CodePatcher {
297
+ backup_dir,
298
+ verify_checksum,
299
+ }
300
+ }
301
+
302
+ /// Applies a unified diff patch to a file.
303
+ ///
304
+ /// # Arguments
305
+ ///
306
+ /// * `filepath` - Path to the file to patch
307
+ /// * `patch` - Unified diff format patch
308
+ ///
309
+ /// # Returns
310
+ ///
311
+ /// `Result<(), PatchError>` indicating success or failure
312
+ pub fn apply_patch(&self, filepath: &str, patch: &str) -> Result<(), PatchError> {
313
+ // Implementation here
314
+ Ok(())
315
+ }
316
+ }
317
+ ```
318
+
319
+ ---
320
+
321
+ ## Pull Request Process
322
+
323
+ ### Before Submitting PR
324
+
325
+ - [ ] **Tests pass** - `cargo test` and `pytest` succeed
326
+ - [ ] **Code is formatted** - `cargo fmt`, `black .`
327
+ - [ ] **Linting passes** - `cargo clippy`, `mypy .`
328
+ - [ ] **Tests added** - New features have tests
329
+ - [ ] **Documentation updated** - Docs reflect changes
330
+ - [ ] **Changelog noted** - Add entry to version history (if applicable)
331
+
332
+ ### PR Checklist
333
+
334
+ ```markdown
335
+ ## Description
336
+ Brief description of your changes
337
+
338
+ ## Type of Change
339
+ - [ ] Bug fix
340
+ - [ ] New feature
341
+ - [ ] Documentation update
342
+ - [ ] Performance improvement
343
+ - [ ] Refactoring
344
+
345
+ ## Testing
346
+ - [ ] Tests pass locally
347
+ - [ ] Added new test cases
348
+ - [ ] Tested manually with: [describe]
349
+
350
+ ## Documentation
351
+ - [ ] Updated relevant .md files
352
+ - [ ] Added docstrings
353
+ - [ ] Updated examples
354
+
355
+ ## Breaking Changes
356
+ - [ ] This is a breaking change
357
+ - [ ] If yes, describe migration path
358
+ ```
359
+
360
+ ### What to Expect
361
+
362
+ 1. **Review** - A maintainer will review within 48 hours
363
+ 2. **Feedback** - We might request changes
364
+ 3. **Merge** - Once approved, your code goes in! 🎉
365
+
366
+ ---
367
+
368
+ ## Types of Contributions
369
+
370
+ ### Bug Reports
371
+ Found a bug? Create an issue with:
372
+ - Steps to reproduce
373
+ - Expected behavior
374
+ - Actual behavior
375
+ - Environment (OS, Rust version, Python version)
376
+ - Screenshots/logs if helpful
377
+
378
+ ### Documentation
379
+ Help is always welcome to:
380
+ - Fix typos
381
+ - Clarify instructions
382
+ - Add examples
383
+ - Improve organization
384
+ - Translate to other languages
385
+
386
+ ### New Features
387
+ Before starting a big feature:
388
+ 1. **Check** open issues - might already be planned
389
+ 2. **Discuss** on GitHub Discussions
390
+ 3. **Implement** when approved
391
+ 4. **Test** thoroughly
392
+ 5. **Document** clearly
393
+
394
+ ### Plugin Development
395
+ Create plugins for:
396
+ - New languages ([PLUGINS.md](PLUGINS.md))
397
+ - New VCS systems (Git, Hg, Perforce)
398
+ - New CI/CD systems (Jenkins, GitLab CI)
399
+ - New LLM providers ([LLM_INTEGRATION.md](LLM_INTEGRATION.md))
400
+
401
+ ---
402
+
403
+ ## Code of Conduct
404
+
405
+ ### Be Respectful
406
+ - Welcome newcomers and help them get started
407
+ - Assume good intent
408
+ - Address problems directly and professionally
409
+
410
+ ### Be Inclusive
411
+ - Use inclusive language
412
+ - Consider diverse perspectives
413
+ - Make space for different experience levels
414
+
415
+ ### Be Collaborative
416
+ - Ask questions instead of making assumptions
417
+ - Explain your reasoning
418
+ - Help others succeed
419
+
420
+ ---
421
+
422
+ ## Questions?
423
+
424
+ - **GitHub Issues** - For bugs and specific problems
425
+ - **GitHub Discussions** - For questions and ideas
426
+ - **Email** - support@voria.dev for serious concerns
427
+
428
+ ---
429
+
430
+ ## Thank You!
431
+
432
+ Every contribution - big or small - helps make voria better. Thank you for being part of this project!
433
+
434
+ ---
435
+
436
+ **Next Steps:**
437
+ - Read [DEVELOPMENT.md](DEVELOPMENT.md) for detailed setup
438
+ - Check out [good-first-issue](https://github.com/Srizdebnath/voria/labels/good-first-issue) on GitHub
439
+ - Join our [Discord community](https://discord.gg/voria)
440
+
441
+ ---
442
+
443
+ **See Also:**
444
+ - [DEVELOPMENT.md](DEVELOPMENT.md) - Development setup and workflow
445
+ - [ROADMAP.md](ROADMAP.md) - Where we're heading
446
+ - [PLUGINS.md](PLUGINS.md) - Plugin development guide
447
+ - [LLM_INTEGRATION.md](LLM_INTEGRATION.md) - Adding LLM providers