jarvis-ai-assistant 0.1.103__py3-none-any.whl → 0.1.105__py3-none-any.whl

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.

Potentially problematic release.


This version of jarvis-ai-assistant might be problematic. Click here for more details.

Files changed (65) hide show
  1. jarvis/__init__.py +1 -1
  2. jarvis/agent.py +124 -67
  3. jarvis/jarvis_code_agent/code_agent.py +133 -22
  4. jarvis/jarvis_code_agent/file_select.py +4 -6
  5. jarvis/jarvis_code_agent/patch.py +6 -7
  6. jarvis/jarvis_code_agent/relevant_files.py +163 -41
  7. jarvis/jarvis_codebase/main.py +43 -29
  8. jarvis/jarvis_lsp/base.py +143 -0
  9. jarvis/jarvis_lsp/cpp.py +134 -0
  10. jarvis/jarvis_lsp/go.py +140 -0
  11. jarvis/jarvis_lsp/python.py +135 -0
  12. jarvis/jarvis_lsp/registry.py +234 -0
  13. jarvis/jarvis_lsp/rust.py +142 -0
  14. jarvis/jarvis_platform/__init__.py +3 -0
  15. jarvis/{models → jarvis_platform}/ai8.py +1 -1
  16. jarvis/{models → jarvis_platform}/kimi.py +1 -1
  17. jarvis/{models → jarvis_platform}/ollama.py +1 -1
  18. jarvis/{models → jarvis_platform}/openai.py +1 -1
  19. jarvis/{models → jarvis_platform}/oyi.py +1 -1
  20. jarvis/{models → jarvis_platform}/registry.py +11 -11
  21. jarvis/{jarvis_platform → jarvis_platform_manager}/main.py +2 -2
  22. jarvis/jarvis_rag/main.py +8 -8
  23. jarvis/jarvis_smart_shell/main.py +3 -3
  24. jarvis/jarvis_tools/__init__.py +0 -0
  25. jarvis/{tools → jarvis_tools}/ask_codebase.py +1 -4
  26. jarvis/{tools → jarvis_tools}/ask_user.py +1 -1
  27. jarvis/{tools → jarvis_tools}/chdir.py +2 -37
  28. jarvis/jarvis_tools/code_review.py +236 -0
  29. jarvis/jarvis_tools/create_code_agent.py +115 -0
  30. jarvis/{tools → jarvis_tools}/create_sub_agent.py +1 -1
  31. jarvis/jarvis_tools/deep_thinking.py +160 -0
  32. jarvis/jarvis_tools/deep_thinking_agent.py +146 -0
  33. jarvis/{tools → jarvis_tools}/git_commiter.py +3 -3
  34. jarvis/jarvis_tools/lsp_find_definition.py +134 -0
  35. jarvis/jarvis_tools/lsp_find_references.py +111 -0
  36. jarvis/jarvis_tools/lsp_get_diagnostics.py +121 -0
  37. jarvis/jarvis_tools/lsp_get_document_symbols.py +87 -0
  38. jarvis/jarvis_tools/lsp_prepare_rename.py +130 -0
  39. jarvis/jarvis_tools/lsp_validate_edit.py +141 -0
  40. jarvis/{tools → jarvis_tools}/methodology.py +6 -1
  41. jarvis/{tools → jarvis_tools}/rag.py +1 -1
  42. jarvis/{tools → jarvis_tools}/read_code.py +0 -31
  43. jarvis/{tools → jarvis_tools}/registry.py +6 -5
  44. jarvis/{tools → jarvis_tools}/search.py +2 -2
  45. jarvis/utils.py +71 -28
  46. {jarvis_ai_assistant-0.1.103.dist-info → jarvis_ai_assistant-0.1.105.dist-info}/METADATA +98 -62
  47. jarvis_ai_assistant-0.1.105.dist-info/RECORD +62 -0
  48. {jarvis_ai_assistant-0.1.103.dist-info → jarvis_ai_assistant-0.1.105.dist-info}/entry_points.txt +4 -4
  49. jarvis/models/__init__.py +0 -3
  50. jarvis/tools/code_review.py +0 -163
  51. jarvis/tools/create_code_sub_agent.py +0 -30
  52. jarvis/tools/create_code_test_agent.py +0 -115
  53. jarvis/tools/create_ctags_agent.py +0 -176
  54. jarvis/tools/find_in_codebase.py +0 -108
  55. jarvis_ai_assistant-0.1.103.dist-info/RECORD +0 -51
  56. /jarvis/{models → jarvis_platform}/base.py +0 -0
  57. /jarvis/{tools → jarvis_platform_manager}/__init__.py +0 -0
  58. /jarvis/{tools → jarvis_tools}/base.py +0 -0
  59. /jarvis/{tools → jarvis_tools}/execute_shell.py +0 -0
  60. /jarvis/{tools → jarvis_tools}/file_operation.py +0 -0
  61. /jarvis/{tools → jarvis_tools}/read_webpage.py +0 -0
  62. /jarvis/{tools → jarvis_tools}/select_code_files.py +0 -0
  63. {jarvis_ai_assistant-0.1.103.dist-info → jarvis_ai_assistant-0.1.105.dist-info}/LICENSE +0 -0
  64. {jarvis_ai_assistant-0.1.103.dist-info → jarvis_ai_assistant-0.1.105.dist-info}/WHEEL +0 -0
  65. {jarvis_ai_assistant-0.1.103.dist-info → jarvis_ai_assistant-0.1.105.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: jarvis-ai-assistant
3
- Version: 0.1.103
3
+ Version: 0.1.105
4
4
  Summary: Jarvis: An AI assistant that uses tools to interact with the system
5
5
  Home-page: https://github.com/skyfireitdiy/Jarvis
6
6
  Author: skyfire
@@ -59,6 +59,7 @@ Requires-Dist: rich>=13.3.1
59
59
  Requires-Dist: pygments>=2.15.0
60
60
  Requires-Dist: fuzzywuzzy>=0.18.0
61
61
  Requires-Dist: python-Levenshtein>=0.26.1
62
+ Requires-Dist: jedi>=0.19.0
62
63
  Provides-Extra: dev
63
64
  Requires-Dist: pytest; extra == "dev"
64
65
  Requires-Dist: black; extra == "dev"
@@ -133,15 +134,25 @@ Jarvis supports configuration through environment variables that can be set in t
133
134
 
134
135
  | Environment Variable | Description | Default Value | Required |
135
136
  |---------|------|--------|------|
136
- | JARVIS_PLATFORM | AI platform to use, supports kimi/openai/ai8 etc | kimi | Yes |
137
- | JARVIS_MODEL | Model name to use | - | No |
138
- | JARVIS_CODEGEN_PLATFORM | AI platform for code generation | Same as JARVIS_PLATFORM | No |
139
- | JARVIS_CODEGEN_MODEL | Model name for code generation | Same as JARVIS_MODEL | No |
140
- | JARVIS_CHEAP_PLATFORM | AI platform for cheap operations | Same as JARVIS_PLATFORM | No |
141
- | JARVIS_CHEAP_MODEL | Model name for cheap operations | Same as JARVIS_MODEL | No |
142
- | JARVIS_THINKING_PLATFORM | AI platform for thinking | Same as JARVIS_PLATFORM | No |
143
- | JARVIS_THINKING_MODEL | Model name for thinking | Same as JARVIS_MODEL | No |
144
- | JARVIS_THREAD_COUNT | Number of threads for parallel processing | 10 | No |
137
+ | JARVIS_PLATFORM | AI platform to use | kimi | Yes |
138
+ | JARVIS_MODEL | Model name to use | kimi | No |
139
+ | JARVIS_CODEGEN_PLATFORM | Platform for code generation | Same as JARVIS_PLATFORM | No |
140
+ | JARVIS_CODEGEN_MODEL | Model for code generation | Same as JARVIS_MODEL | No |
141
+ | JARVIS_THINKING_PLATFORM | Platform for thinking tasks | Same as JARVIS_PLATFORM | No |
142
+ | JARVIS_THINKING_MODEL | Model for thinking tasks | Same as JARVIS_MODEL | No |
143
+ | JARVIS_CHEAP_PLATFORM | Platform for cheap operations | Same as JARVIS_PLATFORM | No |
144
+ | JARVIS_CHEAP_MODEL | Model for cheap operations | Same as JARVIS_MODEL | No |
145
+ | JARVIS_THREAD_COUNT | Number of threads | 1 | No |
146
+ | JARVIS_MAX_CONTEXT_LENGTH | Maximum context length | 131072 | No |
147
+ | JARVIS_MIN_PARAGRAPH_LENGTH | Minimum paragraph length | 50 | No |
148
+ | JARVIS_MAX_PARAGRAPH_LENGTH | Maximum paragraph length | 1000 | No |
149
+ | JARVIS_CONTEXT_WINDOW | Context window size | 5 | No |
150
+ | JARVIS_AUTO_COMPLETE | Enable auto completion | false | No |
151
+ | JARVIS_DISABLE_CODEBASE | Disable codebase features | false | No |
152
+ | JARVIS_USE_METHODOLOGY | Enable methodology | true | No |
153
+ | JARVIS_RECORD_METHODOLOGY | Record methodology | true | No |
154
+ | JARVIS_NEED_SUMMARY | Generate summaries | true | No |
155
+ | JARVIS_DONT_USE_LOCAL_MODEL | Avoid using local models | false | No |
145
156
  | OPENAI_API_KEY | API key for OpenAI platform | - | Required for OpenAI |
146
157
  | OPENAI_API_BASE | Base URL for OpenAI API | https://api.deepseek.com | No |
147
158
  | OPENAI_MODEL_NAME | Model name for OpenAI | deepseek-chat | No |
@@ -153,20 +164,18 @@ Jarvis supports configuration through environment variables that can be set in t
153
164
 
154
165
  ## 🎯 Usage
155
166
 
156
- ### Main Assistant
167
+ ### Code Modification
157
168
  ```bash
169
+ # Using main agent
158
170
  jarvis
171
+
172
+ # Using code agent directly
173
+ jarvis-code-agent
159
174
  ```
160
175
 
161
- ### Codebase Search
176
+ ### Codebase Query
162
177
  ```bash
163
- # Generate codebase index
164
- jarvis-codebase generate
165
-
166
- # Search similar code
167
- jarvis-codebase search "your search query"
168
-
169
- # Ask questions about codebase
178
+ # Ask questions about the codebase
170
179
  jarvis-codebase ask "your question"
171
180
  ```
172
181
 
@@ -175,71 +184,98 @@ jarvis-codebase ask "your question"
175
184
  # Build document index
176
185
  jarvis-rag --dir /path/to/documents --build
177
186
 
178
- # Search documents
179
- jarvis-rag --query "your search query"
187
+ # Ask questions about documents
188
+ jarvis-rag --query "your question"
189
+ ```
190
+
191
+ ### Smart Shell
192
+ ```bash
193
+ # Using full name
194
+ jarvis-smart-shell "describe what you want to do"
195
+
196
+ # Using shorthand
197
+ jss "describe what you want to do"
180
198
  ```
181
199
 
182
- ### Search Tool
200
+ ### Development Tools
183
201
  ```bash
184
- # Basic search
185
- jarvis-search "your query"
202
+ # Manage git commits
203
+ jarvis-git-commit
186
204
 
187
- # Show only URLs
188
- jarvis-search "your query" --url-only
205
+ # Generate and manage ctags
206
+ jarvis-ctags
189
207
 
190
- # Limit results
191
- jarvis-search "your query" --max 3
208
+ # Manage AI platforms
209
+ jarvis-platform
192
210
  ```
193
211
 
194
- ## 🛠️ Tools
212
+ Each command supports `--help` flag for detailed usage information:
213
+ ```bash
214
+ jarvis --help
215
+ jarvis-code-agent --help
216
+ jarvis-codebase --help
217
+ jarvis-rag --help
218
+ jarvis-smart-shell --help
219
+ jarvis-platform --help
220
+ jarvis-git-commit --help
221
+ jarvis-ctags --help
222
+ ```
195
223
 
224
+ ## 🛠️ Tools
196
225
 
197
226
  ### Built-in Tools
198
227
 
199
228
  | Tool | Description |
200
229
  |------|-------------|
230
+ | read_code | Read code files with line numbers and range support |
201
231
  | execute_shell | Execute system commands and capture output |
202
- | file_operation | File operations (read/write/append/delete) |
203
- | generate_tool | AI-powered tool generation and integration |
204
- | methodology | Experience accumulation and methodology management |
205
- | create_sub_agent | Create specialized sub-agents for specific tasks |
206
- | coder | Automatic code modification and generation tool |
207
- | codebase | Codebase management and search tool |
232
+ | search | Web search for development related queries |
233
+ | ask_user | Interactive user input collection |
234
+ | ask_codebase | Intelligent codebase querying and analysis |
235
+ | code_review | Automated code review with multi-dimensional analysis |
236
+ | file_operation | Basic file operations (read/exists) |
237
+ | git_commiter | Automated git commit handling |
208
238
 
209
239
  ### Tool Locations
210
240
  - Built-in tools: `src/jarvis/tools/`
211
241
  - User tools: `~/.jarvis/tools/`
212
242
 
213
-
214
243
  ### Key Features
215
244
 
216
- #### 1. Self-Extending Capabilities
217
- - Tool generation through natural language description
218
- - Automatic code generation and integration
219
- - Dynamic capability expansion through sub-agents
220
- - Automatic code modification with version control
221
- - Codebase indexing and semantic search
222
-
223
- #### 2. Methodology Learning
224
- - Automatic experience accumulation from interactions
225
- - Pattern recognition and methodology extraction
226
- - Continuous refinement through usage
227
- - Code modification history tracking
228
- - Codebase analysis and documentation generation
229
-
230
- #### 3. Adaptive Problem Solving
231
- - Context-aware sub-agent creation
232
- - Dynamic tool composition
233
- - Learning from execution feedback
245
+ #### 1. Code Intelligence
246
+ - Smart file selection and analysis based on requirements
247
+ - Semantic codebase search and querying
248
+ - Efficient handling of large files with context-aware reading
249
+ - Precise patch-based code modifications
250
+ - Automated git commit management
251
+
252
+ #### 2. Multi-Model Architecture
253
+ - Support for multiple AI platforms (Kimi/OpenAI/AI8/OYI/Ollama)
254
+ - Platform-specific optimizations for different tasks
255
+ - Specialized models for code generation, thinking, and general tasks
256
+ - Streaming response support for better interaction
257
+ - Automatic model fallback and retry mechanisms
258
+
259
+ #### 3. RAG Capabilities
260
+ - Document indexing and semantic search
261
+ - Smart context management for large documents
262
+ - Automatic file change detection
263
+ - Efficient caching mechanisms
264
+ - Multi-format document support
265
+
266
+ #### 4. Development Tools
267
+ - Interactive shell command generation
268
+ - Code review with multi-dimensional analysis
234
269
  - Codebase-aware problem solving
235
- - Multi-model collaboration for complex tasks
236
-
237
- #### 4. Code Intelligence
238
- - Automatic codebase indexing
239
- - Semantic code search
240
- - Code modification with git integration
241
- - Code analysis and documentation
242
- - Multi-model code generation
270
+ - File operations with safety checks
271
+ - Progress tracking and error handling
272
+
273
+ #### 5. User Experience
274
+ - Beautiful console output with color support
275
+ - Interactive multi-line input
276
+ - Progress indicators for long operations
277
+ - Clear error messages and handling
278
+ - Context-aware response formatting
243
279
 
244
280
  ## 🎯 Extending Jarvis
245
281
 
@@ -0,0 +1,62 @@
1
+ jarvis/__init__.py,sha256=0EXA0IHadgSMXwFk2DyUhbdBSMBlm1Lgw0M-vuBVhI4,51
2
+ jarvis/agent.py,sha256=7FDrJc2_JlY9u7TRfeHKZRQ0PrY04r-0w4H64eGcbUM,22626
3
+ jarvis/utils.py,sha256=0w1rYsSovS7vgbHNdfdzpo3zSb3y-KWM7RvYMqBhDnM,22086
4
+ jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ jarvis/jarvis_code_agent/code_agent.py,sha256=DDKqM4m235Ryd8aMHbHKeC0ULdNLF6JPW__FKbI-Gk0,10748
6
+ jarvis/jarvis_code_agent/file_select.py,sha256=KNxalhepCM2e-V__ca8ErmbXSXHP_1xmd0UEVWUXic8,8083
7
+ jarvis/jarvis_code_agent/patch.py,sha256=bbNB8k8mebjPVsNdI8aT3oOyjLyAhUQbKmX54tyziDk,4034
8
+ jarvis/jarvis_code_agent/relevant_files.py,sha256=PxSKQyHfCe6878bDqP6XyQd_jwcvNK4a9YKTfpLImRI,6160
9
+ jarvis/jarvis_codebase/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ jarvis/jarvis_codebase/main.py,sha256=8ihn2JpZE27VwV2BC5kKSZxsuYyVOppcqOJU0UPMd80,37570
11
+ jarvis/jarvis_lsp/base.py,sha256=_7pdbMKjdtYBW0DsRbjIodDHM3J7df-YgXHejN_WIrU,4490
12
+ jarvis/jarvis_lsp/cpp.py,sha256=F7Zo3BErkvtWS1_H9zQO83pX_FUmnijux-2SjhWzKCE,4985
13
+ jarvis/jarvis_lsp/go.py,sha256=p8LULiFdq4qjDYQzXFlzH0-FQZ3IyfiwN_sbO9i0L_A,5310
14
+ jarvis/jarvis_lsp/python.py,sha256=MpnCWDwudJuSZuIxAU7o79ADLAqw_BaVpOzqwRZw-sg,4807
15
+ jarvis/jarvis_lsp/registry.py,sha256=e3gw1ubIi64YyjkbvhgvsxIpb5iWS5glD_279kMASCg,9831
16
+ jarvis/jarvis_lsp/rust.py,sha256=VeInvOvjcK2otOM4bTakjII6bJHl6TockwpXD3PLi5U,5541
17
+ jarvis/jarvis_platform/__init__.py,sha256=mrOt67nselz_H1gX9wdAO4y2DY5WPXzABqJbr5Des8k,63
18
+ jarvis/jarvis_platform/ai8.py,sha256=ZBWHZ1QQp8gjgEAVgDWPmzoALA1v8TKNdlo-hV5DkuY,12003
19
+ jarvis/jarvis_platform/base.py,sha256=nQ-rsJL1Z-gMev3TPoY7tYdwxhCJY8LG6_gtJ-maiW0,2181
20
+ jarvis/jarvis_platform/kimi.py,sha256=3yiOL2PsEcKEL0Yj0Hm3lTg9M0Ahy0Ou1AUnJ0AS0Ss,15768
21
+ jarvis/jarvis_platform/ollama.py,sha256=9Ptu-UzRMnNxqFlx9uDpHO0_Imrzf0Wfw9sZqnv2wRI,5681
22
+ jarvis/jarvis_platform/openai.py,sha256=NYAIaQbFH9Usg5ZxkBSek1F0imu-pDB9Qf6Am0AtU0s,4130
23
+ jarvis/jarvis_platform/oyi.py,sha256=mV8tsQty2Htz--DNemBAnCiauih3JQ4jSyuZi5L4WQo,15089
24
+ jarvis/jarvis_platform/registry.py,sha256=9QLoihcnkYckrCzgNnlTqaLn_z_HMhaxMSyUNb8IEys,8538
25
+ jarvis/jarvis_platform_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
+ jarvis/jarvis_platform_manager/main.py,sha256=17607aNAStqJ1sOQLTGi6Tnv-cIQme_r5YvbB_S3enc,4985
27
+ jarvis/jarvis_rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
+ jarvis/jarvis_rag/main.py,sha256=0bVISZxDNZQpOUzAsTFl3QbISBiOMpJWMectmTzA4Hk,33164
29
+ jarvis/jarvis_smart_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
+ jarvis/jarvis_smart_shell/main.py,sha256=VdUR-x932OccEwU0pcQM_pb_I4yfrAutE3hfm6jf5es,3955
31
+ jarvis/jarvis_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
+ jarvis/jarvis_tools/ask_codebase.py,sha256=1mLe9CHDU-NFJHmu3mxrWuA4IiHqQyum2ga31P3hLzU,2991
33
+ jarvis/jarvis_tools/ask_user.py,sha256=9ZhIffoPGSfxJIwiIsL03V95yM8uYJsRg7j1C8ltNGc,1830
34
+ jarvis/jarvis_tools/base.py,sha256=c0DMoDDPxmsqUYJR989zgUs7nIYRY6GWBrAdusIZKjc,656
35
+ jarvis/jarvis_tools/chdir.py,sha256=A53BNXFB9tvwoV_cxW_LpF_DfxANgAEJ8rjikTaTa-I,1813
36
+ jarvis/jarvis_tools/code_review.py,sha256=SY6Xw1VhAmmNVCJZsgd6ItDBmth4bgjnpd0T0afGVSA,8581
37
+ jarvis/jarvis_tools/create_code_agent.py,sha256=prkWzgYPMt6N2IHaom5cyEQCE4d0adRRG3K1E71Tbfk,3923
38
+ jarvis/jarvis_tools/create_sub_agent.py,sha256=jBwh8hvg_LST2biLwjZkLseJFegn56mTdjh-xCIghmo,2860
39
+ jarvis/jarvis_tools/deep_thinking.py,sha256=ltsMUfmE8XNyYTkgpWMD1Qow-6_x0dcD8WL7qL4i8R8,4471
40
+ jarvis/jarvis_tools/deep_thinking_agent.py,sha256=UBBWq8kp6SDEhwYXjO-tMMHP7Wblx5OA-gpQ8h_1tdk,4378
41
+ jarvis/jarvis_tools/execute_shell.py,sha256=bawfof8bUg3f9bjyCSifLa9bU-hkNoNOuos22uZffdg,2564
42
+ jarvis/jarvis_tools/file_operation.py,sha256=-1U_J5SEuBjRylzEl7wvCfjspNv6aA49UvFHLNQ3bJU,4098
43
+ jarvis/jarvis_tools/git_commiter.py,sha256=4dcFMTN3qmfuTfMkF6an4K95PTR1_0qBoplr20lH2jQ,2565
44
+ jarvis/jarvis_tools/lsp_find_definition.py,sha256=xV8YeN1RJfwd2F3gE6OnDeTwl-AnCmrxueHocbXkQOc,4800
45
+ jarvis/jarvis_tools/lsp_find_references.py,sha256=FohlJeLfTxcMUASfbjOT93hQGtI2WeyTpMGwRwShW_I,4043
46
+ jarvis/jarvis_tools/lsp_get_diagnostics.py,sha256=bEvbDk8TnKg9TTFFxMrYOJm5TBDgz5gO04WJFQUwQQE,4490
47
+ jarvis/jarvis_tools/lsp_get_document_symbols.py,sha256=dspL6r9HYnXL5TpARSApFY3IQLm2kcYVNVWCff2xoXI,3080
48
+ jarvis/jarvis_tools/lsp_prepare_rename.py,sha256=RxUyIef4awtp-jgupcD1LcPlno9P3mOE8AS3_Fm71Ys,4832
49
+ jarvis/jarvis_tools/lsp_validate_edit.py,sha256=M0iglK2QbnIEFv0RYK6o2iAYnv259jB6EU7To-rc51E,5247
50
+ jarvis/jarvis_tools/methodology.py,sha256=RFqcVjKuj8ESGmNYcQz_HyphsitDvF3XtqgGaqhafDQ,5770
51
+ jarvis/jarvis_tools/rag.py,sha256=2fQHqc4bw8JM-OxGTsHobLIOTo8Mip3rdtJCmAoY8XU,4952
52
+ jarvis/jarvis_tools/read_code.py,sha256=5DGmeXTgumAiG0RP1xB4sF4NdmBm5BEGjRRlIBzjGnQ,4002
53
+ jarvis/jarvis_tools/read_webpage.py,sha256=JCReSXhkDHDkQ606sZYIKG1Itlprjpmu1sSbF-Ed-jI,2478
54
+ jarvis/jarvis_tools/registry.py,sha256=mkAQ1NDPwDy1ESAaAFnzSxAJRrhce3NO3E7cWkb-quA,11732
55
+ jarvis/jarvis_tools/search.py,sha256=PLSSNETyajpqDoStCTfkoy-D41IMNudTuVzonMlT6Aw,9225
56
+ jarvis/jarvis_tools/select_code_files.py,sha256=bjJGwCNw0Ue_8jW60K1gcy1rUgKqoHihicu5SS58WNk,1890
57
+ jarvis_ai_assistant-0.1.105.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
58
+ jarvis_ai_assistant-0.1.105.dist-info/METADATA,sha256=NvR8zVsZ4g8uY-D64oppY_D_AmEfyf9IgPOnwxr6hQI,14208
59
+ jarvis_ai_assistant-0.1.105.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
60
+ jarvis_ai_assistant-0.1.105.dist-info/entry_points.txt,sha256=jF_A8npBiI3icEvMlWAs_MEQNjRSczY1TKeu5a-Cvl0,539
61
+ jarvis_ai_assistant-0.1.105.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
62
+ jarvis_ai_assistant-0.1.105.dist-info/RECORD,,
@@ -1,11 +1,11 @@
1
1
  [console_scripts]
2
2
  jarvis = jarvis.agent:main
3
3
  jarvis-code-agent = jarvis.jarvis_code_agent.code_agent:main
4
+ jarvis-code-review = jarvis.jarvis_tools.code_review:main
4
5
  jarvis-codebase = jarvis.jarvis_codebase.main:main
5
- jarvis-ctags = jarvis.tools.create_ctags_agent:main
6
- jarvis-gh = jarvis.jarvis_github.main:main
7
- jarvis-git-commit = jarvis.tools.git_commiter:main
8
- jarvis-platform = jarvis.jarvis_platform.main:main
6
+ jarvis-ctags = jarvis.jarvis_tools.create_ctags_agent:main
7
+ jarvis-git-commit = jarvis.jarvis_tools.git_commiter:main
8
+ jarvis-platform-manager = jarvis.jarvis_platform_manager.main:main
9
9
  jarvis-rag = jarvis.jarvis_rag.main:main
10
10
  jarvis-smart-shell = jarvis.jarvis_smart_shell.main:main
11
11
  jss = jarvis.jarvis_smart_shell.main:main
jarvis/models/__init__.py DELETED
@@ -1,3 +0,0 @@
1
- from .base import BasePlatform
2
-
3
- __all__ = ['BasePlatform']
@@ -1,163 +0,0 @@
1
- from typing import Dict, Any
2
- import subprocess
3
- import yaml
4
- from jarvis.models.registry import PlatformRegistry
5
- from jarvis.tools.registry import ToolRegistry
6
- from jarvis.utils import OutputType, PrettyOutput, init_env, find_git_root
7
- from jarvis.agent import Agent
8
-
9
- class CodeReviewTool:
10
- name = "code_review"
11
- description = "Autonomous code review agent for commit analysis"
12
- parameters = {
13
- "type": "object",
14
- "properties": {
15
- "commit_sha": {
16
- "type": "string",
17
- "description": "Target commit SHA to analyze"
18
- },
19
- "requirement_desc": {
20
- "type": "string",
21
- "description": "Development goal to verify"
22
- }
23
- },
24
- "required": ["commit_sha", "requirement_desc"]
25
- }
26
-
27
- def __init__(self):
28
- init_env()
29
- self.repo_root = find_git_root()
30
-
31
- def execute(self, args: Dict[str, Any]) -> Dict[str, Any]:
32
- try:
33
- commit_sha = args["commit_sha"].strip()
34
- requirement = args["requirement_desc"].strip()
35
-
36
- system_prompt = """You are an autonomous code review expert. Perform in-depth analysis following these guidelines:
37
-
38
- REVIEW FOCUS AREAS:
39
- 1. Requirement Alignment:
40
- - Verify implementation matches original requirements
41
- - Check for missing functionality
42
- - Identify over-implementation
43
-
44
- 2. Code Quality:
45
- - Code readability and structure
46
- - Proper error handling
47
- - Code duplication
48
- - Adherence to style guides
49
- - Meaningful variable/method names
50
-
51
- 3. Security:
52
- - Input validation
53
- - Authentication/Authorization checks
54
- - Sensitive data handling
55
- - Potential injection vulnerabilities
56
- - Secure communication practices
57
-
58
- 4. Testing:
59
- - Test coverage for new code
60
- - Edge case handling
61
- - Test readability and maintainability
62
- - Missing test scenarios
63
-
64
- 5. Performance:
65
- - Algorithm efficiency
66
- - Unnecessary resource consumption
67
- - Proper caching mechanisms
68
- - Database query optimization
69
-
70
- 6. Maintainability:
71
- - Documentation quality
72
- - Logging and monitoring
73
- - Configuration management
74
- - Technical debt indicators
75
-
76
- 7. Operational Considerations:
77
- - Backward compatibility
78
- - Migration script safety
79
- - Environment-specific configurations
80
- - Deployment impacts
81
-
82
- REVIEW PROCESS:
83
- 1. Retrieve full commit context using git commands
84
- 2. Analyze code changes line-by-line
85
- 3. Cross-reference with project standards
86
- 4. Verify test coverage adequacy
87
- 5. Check documentation updates
88
- 6. Generate prioritized findings
89
-
90
- OUTPUT REQUIREMENTS:
91
- - Categorize issues by severity (Critical/Major/Minor)
92
- - Reference specific code locations
93
- - Provide concrete examples
94
- - Suggest actionable improvements
95
- - Highlight security risks clearly
96
- - Separate technical debt from blockers"""
97
-
98
- summary_prompt = """Please generate a concise summary report of the code review, format as yaml:
99
- <REPORT>
100
- - file: xxxx.py
101
- location: [start_line_number, end_line_number]
102
- description:
103
- severity:
104
- suggestion:
105
- </REPORT>
106
-
107
- Please describe in concise bullet points, highlighting important information.
108
- """
109
-
110
- tool_registry = ToolRegistry()
111
- tool_registry.use_tools(["execute_shell", "read_code", "ask_user", "ask_codebase", "find_in_codebase", "create_ctags_agent"])
112
- tool_registry.dont_use_tools(["code_review"])
113
-
114
- review_agent = Agent(
115
- name="Code Review Agent",
116
- platform=PlatformRegistry().get_thinking_platform(),
117
- system_prompt=system_prompt,
118
- is_sub_agent=True,
119
- tool_registry=tool_registry,
120
- summary_prompt=summary_prompt,
121
- auto_complete=True
122
- )
123
-
124
- result = review_agent.run(
125
- f"Analyze commit {commit_sha} for requirement: {requirement}"
126
- )
127
-
128
- return {
129
- "success": True,
130
- "stdout": {"report": result},
131
- "stderr": ""
132
- }
133
-
134
- except Exception as e:
135
- return {
136
- "success": False,
137
- "stdout": {},
138
- "stderr": f"Review failed: {str(e)}"
139
- }
140
-
141
- def main():
142
- """CLI entry point"""
143
- import argparse
144
-
145
- parser = argparse.ArgumentParser(description='Autonomous code review tool')
146
- parser.add_argument('--commit', required=True)
147
- parser.add_argument('--requirement', required=True)
148
- args = parser.parse_args()
149
-
150
- tool = CodeReviewTool()
151
- result = tool.execute({
152
- "commit_sha": args.commit,
153
- "requirement_desc": args.requirement
154
- })
155
-
156
- if result["success"]:
157
- PrettyOutput.print("Autonomous Review Result:", OutputType.INFO)
158
- print(yaml.dump(result["stdout"], allow_unicode=True))
159
- else:
160
- PrettyOutput.print(result["stderr"], OutputType.ERROR)
161
-
162
- if __name__ == "__main__":
163
- main()
@@ -1,30 +0,0 @@
1
-
2
-
3
-
4
- from typing import Any, Dict
5
- from jarvis.jarvis_code_agent.code_agent import CodeAgent
6
-
7
-
8
- class CodeSubAgentTool:
9
- name = "create_code_sub_agent"
10
- description = "Create a sub-agent to handle the code modification"
11
- parameters = {
12
- "type": "object",
13
- "properties": {
14
- "requirement": {
15
- "type": "string",
16
- "description": "The requirement of the sub-agent"
17
- }
18
- }
19
- }
20
-
21
- def execute(self, args: Dict) -> Dict[str, Any]:
22
- """Execute the sub-agent"""
23
- requirement = args["requirement"]
24
- agent = CodeAgent()
25
- output = agent.run(requirement)
26
- return {
27
- "success": True,
28
- "stdout": output,
29
- "stderr": ""
30
- }
@@ -1,115 +0,0 @@
1
- from typing import Dict, Any
2
- from jarvis.agent import Agent
3
- from jarvis.tools.registry import ToolRegistry
4
- import subprocess
5
-
6
- class TestAgentTool:
7
- name = "create_code_test_agent"
8
- description = "Create testing agent for specific commit analysis"
9
- parameters = {
10
- "type": "object",
11
- "properties": {
12
- "name": {
13
- "type": "string",
14
- "description": "Identifier for the test agent"
15
- },
16
- "test_scope": {
17
- "type": "string",
18
- "enum": ["unit", "integration", "e2e"],
19
- "description": "Testing focus area"
20
- },
21
- "commit_sha": {
22
- "type": "string",
23
- "description": "Commit SHA to analyze"
24
- }
25
- },
26
- "required": ["name", "test_scope", "commit_sha"]
27
- }
28
-
29
- def execute(self, args: Dict) -> Dict[str, Any]:
30
- """Execute commit-focused testing"""
31
- try:
32
- if not self._is_valid_commit(args["commit_sha"]):
33
- return {
34
- "success": False,
35
- "stdout": "",
36
- "stderr": f"Invalid commit SHA: {args['commit_sha']}"
37
- }
38
-
39
- tool_registry = ToolRegistry()
40
- tool_registry.dont_use_tools(["create_code_test_agent"])
41
-
42
- test_agent = Agent(
43
- system_prompt=self._build_system_prompt(args),
44
- name=f"TestAgent({args['name']})",
45
- is_sub_agent=True,
46
- tool_registry=tool_registry
47
- )
48
-
49
- result = test_agent.run(
50
- f"Analyze and test changes in commit {args['commit_sha'].strip()}"
51
- )
52
-
53
- return {
54
- "success": True,
55
- "stdout": result,
56
- "stderr": ""
57
- }
58
- except Exception as e:
59
- return {
60
- "success": False,
61
- "stdout": "",
62
- "stderr": f"Commit testing failed: {str(e)}"
63
- }
64
-
65
- def _is_valid_commit(self, commit_sha: str) -> bool:
66
- """Validate commit exists in repository"""
67
- try:
68
- cmd = f"git cat-file -t {commit_sha}"
69
- result = subprocess.run(
70
- cmd.split(),
71
- capture_output=True,
72
- text=True,
73
- check=True
74
- )
75
- return "commit" in result.stdout
76
- except subprocess.CalledProcessError:
77
- return False
78
-
79
- def _build_system_prompt(self, args: Dict) -> str:
80
- return """You are a Commit Testing Specialist. Follow this protocol:
81
-
82
- 【Testing Protocol】
83
- 1. Commit Analysis:
84
- - Analyze code changes in target commit
85
- - Identify modified components
86
- - Assess change impact scope
87
-
88
- 2. Test Strategy:
89
- - Determine required test types
90
- - Verify backward compatibility
91
- - Check interface contracts
92
-
93
- 3. Test Execution:
94
- - Execute relevant test suites
95
- - Compare pre/post-commit behavior
96
- - Validate cross-component interactions
97
-
98
- 4. Reporting:
99
- - List affected modules
100
- - Risk assessment matrix
101
- - Performance impact analysis
102
- - Security implications
103
-
104
- 【Output Requirements】
105
- - Test coverage analysis
106
- - Behavioral change summary
107
- - Critical issues prioritized
108
- - Actionable recommendations
109
-
110
- 【Key Principles】
111
- 1. Focus on delta changes
112
- 2. Maintain test isolation
113
- 3. Preserve historical baselines
114
- 4. Automate verification steps
115
- 5. Document test evidence"""