jarvis-ai-assistant 0.1.124__py3-none-any.whl → 0.1.126__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 (70) hide show
  1. jarvis/__init__.py +1 -1
  2. jarvis/jarvis_agent/__init__.py +134 -136
  3. jarvis/jarvis_code_agent/code_agent.py +198 -52
  4. jarvis/jarvis_code_agent/file_select.py +6 -19
  5. jarvis/jarvis_code_agent/patch.py +183 -312
  6. jarvis/jarvis_code_agent/shell_input_handler.py +22 -0
  7. jarvis/jarvis_codebase/main.py +89 -86
  8. jarvis/jarvis_dev/main.py +695 -715
  9. jarvis/jarvis_git_squash/__init__.py +0 -0
  10. jarvis/jarvis_git_squash/main.py +81 -0
  11. jarvis/jarvis_lsp/base.py +0 -12
  12. jarvis/jarvis_lsp/cpp.py +1 -10
  13. jarvis/jarvis_lsp/go.py +1 -10
  14. jarvis/jarvis_lsp/python.py +0 -28
  15. jarvis/jarvis_lsp/registry.py +2 -3
  16. jarvis/jarvis_lsp/rust.py +1 -10
  17. jarvis/jarvis_multi_agent/__init__.py +53 -53
  18. jarvis/jarvis_platform/ai8.py +2 -1
  19. jarvis/jarvis_platform/base.py +19 -24
  20. jarvis/jarvis_platform/kimi.py +2 -3
  21. jarvis/jarvis_platform/ollama.py +3 -1
  22. jarvis/jarvis_platform/openai.py +1 -1
  23. jarvis/jarvis_platform/oyi.py +2 -1
  24. jarvis/jarvis_platform/registry.py +2 -1
  25. jarvis/jarvis_platform_manager/main.py +4 -6
  26. jarvis/jarvis_platform_manager/openai_test.py +0 -1
  27. jarvis/jarvis_rag/main.py +5 -2
  28. jarvis/jarvis_smart_shell/main.py +9 -4
  29. jarvis/jarvis_tools/ask_codebase.py +18 -13
  30. jarvis/jarvis_tools/ask_user.py +5 -4
  31. jarvis/jarvis_tools/base.py +22 -8
  32. jarvis/jarvis_tools/chdir.py +8 -9
  33. jarvis/jarvis_tools/code_review.py +19 -20
  34. jarvis/jarvis_tools/create_code_agent.py +6 -6
  35. jarvis/jarvis_tools/create_sub_agent.py +9 -9
  36. jarvis/jarvis_tools/execute_shell.py +55 -20
  37. jarvis/jarvis_tools/execute_shell_script.py +7 -7
  38. jarvis/jarvis_tools/file_operation.py +39 -10
  39. jarvis/jarvis_tools/git_commiter.py +20 -17
  40. jarvis/jarvis_tools/lsp_find_definition.py +8 -8
  41. jarvis/jarvis_tools/lsp_find_references.py +1 -1
  42. jarvis/jarvis_tools/lsp_get_diagnostics.py +19 -11
  43. jarvis/jarvis_tools/lsp_get_document_symbols.py +1 -1
  44. jarvis/jarvis_tools/lsp_prepare_rename.py +8 -8
  45. jarvis/jarvis_tools/methodology.py +10 -7
  46. jarvis/jarvis_tools/rag.py +27 -20
  47. jarvis/jarvis_tools/read_webpage.py +4 -3
  48. jarvis/jarvis_tools/registry.py +143 -140
  49. jarvis/jarvis_tools/{search.py → search_web.py} +10 -7
  50. jarvis/jarvis_tools/select_code_files.py +4 -4
  51. jarvis/jarvis_tools/tool_generator.py +33 -34
  52. jarvis/jarvis_utils/__init__.py +19 -982
  53. jarvis/jarvis_utils/config.py +138 -0
  54. jarvis/jarvis_utils/embedding.py +201 -0
  55. jarvis/jarvis_utils/git_utils.py +120 -0
  56. jarvis/jarvis_utils/globals.py +82 -0
  57. jarvis/jarvis_utils/input.py +161 -0
  58. jarvis/jarvis_utils/methodology.py +128 -0
  59. jarvis/jarvis_utils/output.py +235 -0
  60. jarvis/jarvis_utils/utils.py +150 -0
  61. jarvis_ai_assistant-0.1.126.dist-info/METADATA +305 -0
  62. jarvis_ai_assistant-0.1.126.dist-info/RECORD +74 -0
  63. {jarvis_ai_assistant-0.1.124.dist-info → jarvis_ai_assistant-0.1.126.dist-info}/WHEEL +1 -1
  64. {jarvis_ai_assistant-0.1.124.dist-info → jarvis_ai_assistant-0.1.126.dist-info}/entry_points.txt +1 -0
  65. jarvis/jarvis_tools/lsp_validate_edit.py +0 -141
  66. jarvis/jarvis_tools/read_code.py +0 -191
  67. jarvis_ai_assistant-0.1.124.dist-info/METADATA +0 -460
  68. jarvis_ai_assistant-0.1.124.dist-info/RECORD +0 -65
  69. {jarvis_ai_assistant-0.1.124.dist-info → jarvis_ai_assistant-0.1.126.dist-info}/LICENSE +0 -0
  70. {jarvis_ai_assistant-0.1.124.dist-info → jarvis_ai_assistant-0.1.126.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,305 @@
1
+ Metadata-Version: 2.1
2
+ Name: jarvis-ai-assistant
3
+ Version: 0.1.126
4
+ Summary: Jarvis: An AI assistant that uses tools to interact with the system
5
+ Home-page: https://github.com/skyfireitdiy/Jarvis
6
+ Author: skyfire
7
+ Author-email: skyfire <skyfireitdiy@hotmail.com>
8
+ License: MIT License
9
+
10
+ Copyright (c) 2025 skyfire
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+ Project-URL: Homepage, https://github.com/skyfireitdiy/Jarvis
30
+ Keywords: jarvis,ai,assistant,tools,automation
31
+ Classifier: Development Status :: 3 - Alpha
32
+ Classifier: Intended Audience :: Developers
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Operating System :: POSIX :: Linux
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.8
37
+ Classifier: Programming Language :: Python :: 3.9
38
+ Classifier: Programming Language :: Python :: 3.10
39
+ Classifier: Programming Language :: Python :: 3.11
40
+ Requires-Python: >=3.8
41
+ Description-Content-Type: text/markdown
42
+ License-File: LICENSE
43
+ Requires-Dist: requests>=2.25.1
44
+ Requires-Dist: pyyaml>=5.1
45
+ Requires-Dist: colorama>=0.4.6
46
+ Requires-Dist: prompt-toolkit>=3.0.0
47
+ Requires-Dist: openai>=1.20.0
48
+ Requires-Dist: playwright>=1.41.1
49
+ Requires-Dist: numpy>=1.19.5
50
+ Requires-Dist: faiss-cpu>=1.8.0
51
+ Requires-Dist: sentence-transformers>=2.2.2
52
+ Requires-Dist: bs4>=0.0.1
53
+ Requires-Dist: PyMuPDF>=1.21.0
54
+ Requires-Dist: python-docx>=0.8.11
55
+ Requires-Dist: tiktoken>=0.3.0
56
+ Requires-Dist: tqdm>=4.65.0
57
+ Requires-Dist: docx>=0.2.4
58
+ Requires-Dist: yaspin>=2.5.0
59
+ Requires-Dist: rich>=13.3.1
60
+ Requires-Dist: pygments>=2.15.0
61
+ Requires-Dist: fuzzywuzzy>=0.18.0
62
+ Requires-Dist: python-Levenshtein>=0.25.0
63
+ Requires-Dist: jedi>=0.17.2
64
+ Requires-Dist: psutil>=7.0.0
65
+ Requires-Dist: fastapi>=0.115.4
66
+ Requires-Dist: uvicorn>=0.33.0
67
+ Provides-Extra: dev
68
+ Requires-Dist: pytest; extra == "dev"
69
+ Requires-Dist: black; extra == "dev"
70
+ Requires-Dist: isort; extra == "dev"
71
+ Requires-Dist: mypy; extra == "dev"
72
+
73
+ # 🤖 Jarvis AI 助手
74
+ <p align="center">
75
+ <img src="docs/images/jarvis-logo.png" alt="Jarvis Logo" width="200"/>
76
+ </p>
77
+ <div align="center">
78
+
79
+ [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
80
+
81
+ *您的智能开发和系统交互助手*
82
+
83
+ [快速开始](#quick-start) •
84
+ [配置说明](#configuration) •
85
+ [工具说明](#tools) •
86
+ [扩展开发](#extensions) •
87
+ [贡献指南](#contributing) •
88
+ [许可证](#license) •
89
+ </div>
90
+
91
+ ---
92
+
93
+ ## 🚀 快速开始 <a id="quick-start"></a>
94
+ ### 安装
95
+ ```bash
96
+ pip install jarvis-ai-assistant # 安装jarvis-ai-assistant
97
+ playwright install # 安装playwright
98
+ ```
99
+
100
+ ### 最小化配置
101
+ ```bash
102
+ JARVIS_PLATFORM=openai # 设置AI平台
103
+ JARVIS_MODEL=deepseek-chat # 设置AI模型
104
+ OPENAI_API_KEY=your_openai_api_key # 设置OpenAI API密钥
105
+ OPENAI_API_BASE=https://api.deepseek.com/v1 # 设置OpenAI API基础URL
106
+ ```
107
+
108
+ 以上配置编写到`~/.jarvis/env`文件中。
109
+
110
+ ### 基本使用
111
+ ```bash
112
+ # 使用通用代理
113
+ jarvis
114
+ # 使用代码代理
115
+ jarvis-code-agent
116
+ # 或者 jca
117
+ # 使用codebase的功能
118
+ jarvis-codebase --help
119
+ # 使用rag的功能
120
+ jarvis-rag --help
121
+ # 使用智能shell的功能
122
+ jarvis-smart-shell --help
123
+ # 或者 jss
124
+ # 使用平台管理的功能
125
+ jarvis-platform-manager --help
126
+ # 使用自动化git commit的功能
127
+ jarvis-git-commit --help
128
+ # 或者 jgc
129
+ # 使用代码审查的功能
130
+ jarvis-code-review --help
131
+ # 使用dev功能(开发中)
132
+ jarvis-dev --help
133
+ # 使用git squash的功能
134
+ jarvis-git-squash --help
135
+ ```
136
+
137
+ ---
138
+
139
+ ## ⚙️ 配置说明 <a id="configuration"></a>
140
+ ### 环境变量配置
141
+ | 分类 | 变量名称 | 默认值 | 说明 |
142
+ |------|----------|--------|------|
143
+ | 核心配置 | `JARVIS_MAX_TOKEN_COUNT` | 131072 | 上下文窗口的最大token数量 |
144
+ | 核心配置 | `JARVIS_THREAD_COUNT` | 1 | 并行处理的线程数量 |
145
+ | 核心配置 | `JARVIS_AUTO_COMPLETE` | false | 是否启用自动补全功能 |
146
+ | 核心配置 | `JARVIS_EXECUTE_TOOL_CONFIRM` | false | 执行工具前是否需要确认 |
147
+ | 核心配置 | `JARVIS_CONFIRM_BEFORE_APPLY_PATCH` | true | 应用补丁前是否需要确认 |
148
+ | 模型配置 | `JARVIS_DONT_USE_LOCAL_MODEL` | false | 是否禁用本地模型 |
149
+ | 模型配置 | `JARVIS_PLATFORM` | kimi | 默认AI平台 |
150
+ | 模型配置 | `JARVIS_MODEL` | kimi | 默认模型 |
151
+ | 模型配置 | `JARVIS_CODEGEN_PLATFORM` | JARVIS_PLATFORM | 代码生成任务使用的平台 |
152
+ | 模型配置 | `JARVIS_CODEGEN_MODEL` | JARVIS_MODEL | 代码生成任务使用的模型 |
153
+ | 模型配置 | `JARVIS_THINKING_PLATFORM` | JARVIS_PLATFORM | 思考任务使用的平台 |
154
+ | 模型配置 | `JARVIS_THINKING_MODEL` | JARVIS_MODEL | 思考任务使用的模型 |
155
+ | 模型配置 | `JARVIS_CHEAP_PLATFORM` | JARVIS_PLATFORM | 低成本任务使用的平台 |
156
+ | 模型配置 | `JARVIS_CHEAP_MODEL` | JARVIS_MODEL | 低成本任务使用的模型 |
157
+ | 方法论配置 | `JARVIS_USE_METHODOLOGY` | true | 是否启用方法论系统 |
158
+ | 方法论配置 | `JARVIS_RECORD_METHODOLOGY` | true | 是否记录方法论 |
159
+ | 方法论配置 | `JARVIS_NEED_SUMMARY` | true | 是否自动生成摘要 |
160
+ | 文本处理 | `JARVIS_MIN_PARAGRAPH_LENGTH` | 50 | 文本处理的最小段落长度 |
161
+ | 文本处理 | `JARVIS_MAX_PARAGRAPH_LENGTH` | 12800 | 文本处理的最大段落长度 |
162
+ ---
163
+ ## 🛠️ 工具说明 <a id="tools"></a>
164
+ ### 内置工具
165
+ | 工具名称 | 描述 |
166
+ |----------|------|
167
+ | read_code | 支持行号和范围的代码文件读取 |
168
+ | execute_shell | 执行系统命令并捕获输出 |
169
+ | execute_shell_script | 执行shell脚本文件 |
170
+ | ask_codebase | 智能代码库查询和分析 |
171
+ | ask_user | 交互式用户输入收集 |
172
+ | file_operation | 基础文件操作(读取/写入/存在性检查) |
173
+ | git_commiter | 自动化git提交处理 |
174
+ | code_review | 多维度的自动代码审查 |
175
+ | search_web | 使用bing进行网络搜索 |
176
+ | read_webpage | 读取网页内容 |
177
+ | chdir | 更改工作目录 |
178
+ | create_code_agent | 创建新的代码代理 |
179
+ | create_sub_agent | 创建子代理 |
180
+ | lsp_find_definition | 查找符号定义 |
181
+ | lsp_find_references | 查找符号引用 |
182
+ | lsp_get_diagnostics | 获取代码诊断信息 |
183
+ | lsp_get_document_symbols | 获取文档符号 |
184
+ | lsp_prepare_rename | 准备符号重命名 |
185
+ | lsp_validate_edit | 验证代码编辑 |
186
+ | rag | 文档检索和问答 |
187
+ | select_code_files | 选择代码文件 |
188
+ ### 工具位置
189
+ - 内置工具:`src/jarvis/tools/`
190
+ - 用户工具:`~/.jarvis/tools/`
191
+ ---
192
+ ## 🛠️ 扩展开发 <a id="extensions"></a>
193
+ ### 添加新工具
194
+ 在 `~/.jarvis/tools/》 中创建新的 Python 文件:
195
+ ```python
196
+ from typing import Dict, Any
197
+ from jarvis.utils import OutputType, PrettyOutput
198
+ class CustomTool:
199
+ name = "工具名称" # 调用时使用的工具名称
200
+ description = "工具描述" # 工具用途
201
+ parameters = { # 参数的 JSON Schema
202
+ "type": "object",
203
+ "properties": {
204
+ "param1": {
205
+ "type": "string",
206
+ "description": "参数描述"
207
+ }
208
+ },
209
+ "required": ["param1"]
210
+ }
211
+ def execute(self, args: Dict[str, Any]) -> Dict[str, Any]:
212
+ """执行工具功能
213
+
214
+ 参数:
215
+ args: 传递给工具的参数
216
+
217
+ 返回:
218
+ 包含执行结果的字典:
219
+ {
220
+ "success": bool,
221
+ "stdout": str, # 成功时的输出
222
+ "stderr": str, # 可选的错误详情
223
+ }
224
+ """
225
+ try:
226
+ # 在此实现工具逻辑
227
+ result = "工具执行结果"
228
+ return {
229
+ "success": True,
230
+ "stdout": result,
231
+ "stderr": ""
232
+ }
233
+ except Exception as e:
234
+ return {
235
+ "success": False,
236
+ "stdout": "",
237
+ "stderr": str(e)
238
+ }
239
+ ```
240
+
241
+
242
+ ### 添加新大模型平台
243
+ 在 `~/.jarvis/platforms/》 中创建新的 Python 文件:
244
+ ```python
245
+ from jarvis.jarvis_platform.base import BasePlatform
246
+ class CustomPlatform(BasePlatform):
247
+ def __init__(self):
248
+ # 初始化平台
249
+ pass
250
+
251
+ def __del__(self):
252
+ # 销毁平台
253
+ pass
254
+
255
+ def chat(self, message: str) -> str:
256
+ # 执行对话
257
+ pass
258
+
259
+ def upload_files(self, file_list: List[str]) -> List[Dict]:
260
+ # 上传文件
261
+ pass
262
+
263
+ def reset(self):
264
+ # 重置平台
265
+ pass
266
+
267
+ def delete_chat(self):
268
+ # 删除对话
269
+ pass
270
+
271
+ def set_model_name(self, model_name: str):
272
+ # 设置模型名称
273
+ pass
274
+
275
+ def set_system_message(self, message: str):
276
+ # 设置系统消息
277
+ pass
278
+
279
+ def get_model_list(self) -> List[Tuple[str, str]]:
280
+ # 获取模型列表
281
+ pass
282
+
283
+ def name(self) -> str:
284
+ # 获取平台名称
285
+ pass
286
+ ```
287
+
288
+
289
+ ## 🤝 贡献指南 <a id="contributing"></a>
290
+ 1. Fork 仓库
291
+ 2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
292
+ 3. 提交更改 (`git commit -m '添加某个很棒的特性'`)
293
+ 4. 推送到分支 (`git push origin feature/AmazingFeature`)
294
+ 5. 开启 Pull Request
295
+
296
+ ---
297
+
298
+ ## 📄 许可证 <a id="license"></a>
299
+
300
+ 本项目采用 MIT 许可证 - 详见 [LICENSE](LICENSE) 文件。
301
+
302
+ ---
303
+ <div align="center">
304
+ 由 Jarvis 团队用 ❤️ 制作
305
+ </div>
@@ -0,0 +1,74 @@
1
+ jarvis/__init__.py,sha256=R5EpDNRlO11OAaRP_zNCt96v69LCMfRX9dawMjZRJGo,51
2
+ jarvis/jarvis_agent/__init__.py,sha256=ZgT9jFWh7lKvCEqxWe2oRQxLbdWTLqBQMHBJa5irL5M,21859
3
+ jarvis/jarvis_agent/output_handler.py,sha256=kJeFTjjSu0K_2p0wyhq2veSZuhRXoaFC_8wVaoBKX0w,401
4
+ jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ jarvis/jarvis_code_agent/code_agent.py,sha256=9Y-VaZW_n_WmxKGZQGTBKQMA9mL2AkMboHQzvc4J-Fk,10554
6
+ jarvis/jarvis_code_agent/file_select.py,sha256=2nSy1FW-kK-wvtz0YbbgSbd4ZwXMlA7sBP0nC80FzLI,8160
7
+ jarvis/jarvis_code_agent/patch.py,sha256=fLZNnfhxe0lT5PMRJ7xGT84PKNaV0cRChrseW9OWnds,9252
8
+ jarvis/jarvis_code_agent/shell_input_handler.py,sha256=UqR8oPVTmsPc1RAaOET4jPgbTGpz1otLkxhcIqT0r1c,790
9
+ jarvis/jarvis_codebase/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ jarvis/jarvis_codebase/main.py,sha256=UveaSk8L9o5h1ahm6eLhQgjWQ9h2nx3TbUM-8CFD3b0,39445
11
+ jarvis/jarvis_dev/main.py,sha256=miyXHIuIiUffLwnizoWMSUBkvVZeBGfWbx-9XwTFBB8,21241
12
+ jarvis/jarvis_git_squash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ jarvis/jarvis_git_squash/main.py,sha256=g4csaRDYH3n3MCHc8aZb2N4wWVCVZ-pIgd0oanXDnD8,2798
14
+ jarvis/jarvis_lsp/base.py,sha256=ceJBQoOU7JHsvQEAA3agUTedh7_ki_HgK0re7-V9rqg,4119
15
+ jarvis/jarvis_lsp/cpp.py,sha256=Fx2c57omtBQVWB2648TBXufAV2za-u9bF0oe4928pHU,4605
16
+ jarvis/jarvis_lsp/go.py,sha256=fgYBhZaiU2OQPAFQh4fBFOO--HKxkXcr8PEYyF_YlcE,4930
17
+ jarvis/jarvis_lsp/python.py,sha256=NYatk1rlah-bPnTKOn_BXwkYp0IsCUFYRGdLTVVYsCM,3708
18
+ jarvis/jarvis_lsp/registry.py,sha256=slD6p3FAMjL8pQx2id-RxX1pwMjP4FgyMsM3ZbckQJI,9884
19
+ jarvis/jarvis_lsp/rust.py,sha256=nV1EKtq5y57E47DbQlD2DsfvwFVE2JoUTs-9paxeyDo,5161
20
+ jarvis/jarvis_multi_agent/__init__.py,sha256=aTLtKa4vbjT-eZzF1eab79vmghyA48wi6m9WVRltCw4,5991
21
+ jarvis/jarvis_platform/__init__.py,sha256=mrOt67nselz_H1gX9wdAO4y2DY5WPXzABqJbr5Des8k,63
22
+ jarvis/jarvis_platform/ai8.py,sha256=xjgoiF7QHx_5FHj-npTFVvZFYg8RBzkqTGAOQ-MJiL0,11972
23
+ jarvis/jarvis_platform/base.py,sha256=TNBvCm_rkQ6rLfxPS5VAc8ieKMMhQOHmmc_b4-Rwbys,3221
24
+ jarvis/jarvis_platform/kimi.py,sha256=Qwb81flbKPvj-qZyJAMS_u0lQatRFQztYxUGDbj1keM,15713
25
+ jarvis/jarvis_platform/ollama.py,sha256=NHQMJSpC91WtSFuHKJuwD8qO-z4yDTF9mZX6BzWTKRU,5658
26
+ jarvis/jarvis_platform/openai.py,sha256=GSxTB69WitXJS3pL0sxCoB2F0EVHmvhrwLBC_JT8s34,4470
27
+ jarvis/jarvis_platform/oyi.py,sha256=pa72TtBYlhs3KPpqO4Y78a1Jvx4mN0pojBklu8X3F-k,15024
28
+ jarvis/jarvis_platform/registry.py,sha256=DrL6ZoIX9ZKAvFgDadiWPpVnO9GdWJMcXM8dsoNR3ds,8559
29
+ jarvis/jarvis_platform_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
+ jarvis/jarvis_platform_manager/main.py,sha256=l0bxxPrQ41OJc9GANgUYl0ecWNDXIIk3Zp94I_gOZz0,20943
31
+ jarvis/jarvis_platform_manager/openai_test.py,sha256=bkcVG6o2nNazj4zjkENgA4yOEzdTI9Qbm5dco-2MGYM,5190
32
+ jarvis/jarvis_rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ jarvis/jarvis_rag/main.py,sha256=O5qluUvp73q1-0kdtQtOK-fMOLgqbqPFF47iBfpdyeg,31848
34
+ jarvis/jarvis_smart_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
+ jarvis/jarvis_smart_shell/main.py,sha256=dkIudGGfLQCGr4u5E5Q8jfjN361cZdyK0S3WV5lXqhs,4658
36
+ jarvis/jarvis_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ jarvis/jarvis_tools/ask_codebase.py,sha256=YeRPCQJQiaaZ95QHEB04WqyvJOotEnV_pIvmdd_8Ado,3350
38
+ jarvis/jarvis_tools/ask_user.py,sha256=kU6BOhFz_mKfqABd0l_00TL7Mqp_dhV3r0qkKLy8yRM,1745
39
+ jarvis/jarvis_tools/base.py,sha256=8gIgIx9LJAKOxdpPu7zMDItWqwXmXVTWAGfUkpQonzw,1196
40
+ jarvis/jarvis_tools/chdir.py,sha256=_cXiF2ycWt8p5ePcZEhEXqAQrb-5WzCfcN3R4Lm3c8k,2881
41
+ jarvis/jarvis_tools/code_review.py,sha256=r4zs-nhTUtIdLzlim49UCD1rvQSZW7YTiWCCupiXeyY,9686
42
+ jarvis/jarvis_tools/create_code_agent.py,sha256=lVnTP1Kq4q8aWOJ97YTf8POds-Hb3qeYS6MNOiM0wF4,3768
43
+ jarvis/jarvis_tools/create_sub_agent.py,sha256=lPiTXU0F8RZ-mEBB0ec9fdZ1UUtrpUQ2WoV8g-M5lHg,2774
44
+ jarvis/jarvis_tools/execute_shell.py,sha256=VTp9Ax_vuYg7zenkroiVwAvvukEZxADN5qNhO_ZAyHg,4039
45
+ jarvis/jarvis_tools/execute_shell_script.py,sha256=JLs_4p3rXS_d0PdfS6lP_4ojFlD0SayAe0PNEGVfyzE,2030
46
+ jarvis/jarvis_tools/file_operation.py,sha256=uSrVo85ocxZYGaV03Tv-087R6Hd8Yt4SY78KQ0tn_gI,6800
47
+ jarvis/jarvis_tools/git_commiter.py,sha256=sRp-ymQlRW7ZQfm9K9TwC3hz2PyBMuGOk4Pn1WcB_Yo,5012
48
+ jarvis/jarvis_tools/lsp_find_definition.py,sha256=LqAOf6W4_WZR2GmtQXb7pMSduJzK_g3ysaOrgxu8CDE,4755
49
+ jarvis/jarvis_tools/lsp_find_references.py,sha256=IR1QcRi-p4zHS0YENb7vDNMUSuGQUTA4W9bPa9-VO-Y,4028
50
+ jarvis/jarvis_tools/lsp_get_diagnostics.py,sha256=_u2lsSFY7GkOlyKD2CFnvEpkZzAjNfEUMsM9dKGQz40,4754
51
+ jarvis/jarvis_tools/lsp_get_document_symbols.py,sha256=c7_9jP1toe_kepaTmZf1R1jn-JZVCwr6_0ox-KRd8bo,3065
52
+ jarvis/jarvis_tools/lsp_prepare_rename.py,sha256=HIeJjup8luIH25XuLqTVdejWDT5vOn-IWSo-TKDFjZ4,4821
53
+ jarvis/jarvis_tools/methodology.py,sha256=jLYFji3hP7Gff7WFRuR-_VmPHI8Rqq0EGDIgackhqtc,5787
54
+ jarvis/jarvis_tools/rag.py,sha256=WuTlyGV5rgZTRxts9eJPC3QABrsoNYKratdO8UzUFDw,5132
55
+ jarvis/jarvis_tools/read_webpage.py,sha256=yV7zSsMcAp55R7aKUiGqHTnnw6c_bmWSspGJuU2VQTQ,3060
56
+ jarvis/jarvis_tools/registry.py,sha256=f_kBiLDDJ3rdKya8mlDEpF8NVbZsqet7HjF43c6t2HM,14351
57
+ jarvis/jarvis_tools/search_web.py,sha256=qJHCCui7r4lhKEajFRpyvAyqKQBpkDdRBWCPBu9X_M4,11436
58
+ jarvis/jarvis_tools/select_code_files.py,sha256=xCqHTjIGju9Pb1Yh2C1Y7l6uT_3pfVB6ARU0VQmeRNI,1879
59
+ jarvis/jarvis_tools/tool_generator.py,sha256=w1P497YPfqESnInuhqJ_VcyM_28ann0mal4VDYr90Ss,6175
60
+ jarvis/jarvis_utils/__init__.py,sha256=YQ4ZUGGIrjQj2nrYAHJxmCPbakcH5g01RWf1zmhBE4Y,953
61
+ jarvis/jarvis_utils/config.py,sha256=KxjJhqOuBYwK28gHAKyJ3joEascwsl9SIFJxO14c2Dg,4472
62
+ jarvis/jarvis_utils/embedding.py,sha256=sZofBOwLCsa4MLv4jSpTZ0bI05FZoYQpWrZXKwIsqM8,6200
63
+ jarvis/jarvis_utils/git_utils.py,sha256=1w3Tgas5JTfB5IM4aGioMJIL9dSpDt9PTSi_2w78oT4,4565
64
+ jarvis/jarvis_utils/globals.py,sha256=tVR3Z1h1scfSGgyYpVvUXILVjCBiG97fZuy4Ac6DLOY,2348
65
+ jarvis/jarvis_utils/input.py,sha256=U6SRkdiZvkpSA2vfw0EocayQvyjUOjtkSI05dsqZuIE,5985
66
+ jarvis/jarvis_utils/methodology.py,sha256=xGXcxfvQAC1a822Rkdu-ZfXKJqlyH3XzSWT657KUnzs,5387
67
+ jarvis/jarvis_utils/output.py,sha256=ip6wC0tMgJysK4d7DiIqZVU93MlYeqGoRlC_wsxAJ0M,8542
68
+ jarvis/jarvis_utils/utils.py,sha256=NZwbJWVC4cd30DEoVvfV4bcau2cU9k9ID07rpEvxZ-I,5578
69
+ jarvis_ai_assistant-0.1.126.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
70
+ jarvis_ai_assistant-0.1.126.dist-info/METADATA,sha256=tmPors5GPxGp7-pd-tM5ckGDod0g8NDyPeR-Cak8gG8,10519
71
+ jarvis_ai_assistant-0.1.126.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
72
+ jarvis_ai_assistant-0.1.126.dist-info/entry_points.txt,sha256=1oZg_a7zwEjnsFkOTkcGWcYfhA2-1-XTcqS1VS6sXgQ,674
73
+ jarvis_ai_assistant-0.1.126.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
74
+ jarvis_ai_assistant-0.1.126.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -5,6 +5,7 @@ jarvis-code-review = jarvis.jarvis_tools.code_review:main
5
5
  jarvis-codebase = jarvis.jarvis_codebase.main:main
6
6
  jarvis-dev = jarvis.jarvis_dev.main:main
7
7
  jarvis-git-commit = jarvis.jarvis_tools.git_commiter:main
8
+ jarvis-git-squash = jarvis.jarvis_git_squash.main:main
8
9
  jarvis-platform-manager = jarvis.jarvis_platform_manager.main:main
9
10
  jarvis-rag = jarvis.jarvis_rag.main:main
10
11
  jarvis-smart-shell = jarvis.jarvis_smart_shell.main:main
@@ -1,141 +0,0 @@
1
- import os
2
- from typing import Dict, Any
3
- from jarvis.jarvis_lsp.registry import LSPRegistry
4
-
5
- class LSPValidateEditTool:
6
- """Tool for validating code edits using LSP."""
7
-
8
- name = "lsp_validate_edit"
9
- description = "Validate if a proposed code edit is syntactically correct"
10
- parameters = {
11
- "file_path": "Path to the file to edit",
12
- "start_line": "Starting line number (0-based) of the edit",
13
- "start_character": "Starting character position in the start line",
14
- "end_line": "Ending line number (0-based) of the edit",
15
- "end_character": "Ending character position in the end line",
16
- "new_text": "New text to insert",
17
- "language": f"Programming language of the file ({', '.join(LSPRegistry.get_global_lsp_registry().get_supported_languages())})"
18
- }
19
-
20
- @staticmethod
21
- def check() -> bool:
22
- """Check if any LSP server is available."""
23
- registry = LSPRegistry.get_global_lsp_registry()
24
- return len(registry.get_supported_languages()) > 0
25
-
26
- def execute(self, args: Dict[str, Any]) -> Dict[str, Any]:
27
- """Execute the tool."""
28
- file_path = args.get("file_path", "")
29
- start_line = args.get("start_line", None)
30
- start_character = args.get("start_character", None)
31
- end_line = args.get("end_line", None)
32
- end_character = args.get("end_character", None)
33
- new_text = args.get("new_text", "")
34
- language = args.get("language", "")
35
-
36
- # Validate inputs
37
- if not all([file_path, start_line is not None, start_character is not None,
38
- end_line is not None, end_character is not None, language]):
39
- return {
40
- "success": False,
41
- "stderr": "All parameters except new_text must be provided",
42
- "stdout": ""
43
- }
44
-
45
- try:
46
- start_line = int(start_line)
47
- start_character = int(start_character)
48
- end_line = int(end_line)
49
- end_character = int(end_character)
50
- except ValueError:
51
- return {
52
- "success": False,
53
- "stderr": "Line and character positions must be integers",
54
- "stdout": ""
55
- }
56
-
57
- if not os.path.exists(file_path):
58
- return {
59
- "success": False,
60
- "stderr": f"File not found: {file_path}",
61
- "stdout": ""
62
- }
63
-
64
- # Get LSP instance
65
- registry = LSPRegistry.get_global_lsp_registry()
66
- lsp = registry.create_lsp(language)
67
-
68
- if not lsp:
69
- return {
70
- "success": False,
71
- "stderr": f"No LSP support for language: {language}",
72
- "stdout": ""
73
- }
74
-
75
- try:
76
- # Initialize LSP
77
- if not lsp.initialize(os.path.dirname(os.path.abspath(file_path))):
78
- return {
79
- "success": False,
80
- "stderr": "LSP initialization failed",
81
- "stdout": ""
82
- }
83
-
84
- # Prepare edit operation
85
- edit = {
86
- "range": {
87
- "start": {"line": start_line, "character": start_character},
88
- "end": {"line": end_line, "character": end_character}
89
- },
90
- "newText": new_text
91
- }
92
-
93
- # Show the edit preview
94
- output = ["Edit Preview:"]
95
-
96
- # Show original code
97
- try:
98
- with open(file_path, 'r') as f:
99
- lines = f.readlines()
100
- context_start = max(0, start_line - 2)
101
- context_end = min(len(lines), end_line + 3)
102
-
103
- output.append("\nOriginal code:")
104
- for i in range(context_start, context_end):
105
- prefix = ">" if start_line <= i <= end_line else " "
106
- output.append(f"{prefix} {i+1:4d} | {lines[i].rstrip()}")
107
- except Exception:
108
- pass
109
-
110
- # Show new text
111
- output.extend([
112
- "\nNew text to insert:",
113
- new_text,
114
- "\nEdit range:",
115
- f"From line {start_line + 1}, character {start_character}",
116
- f"To line {end_line + 1}, character {end_character}"
117
- ])
118
-
119
- # Validate edit
120
- is_valid = lsp.validate_edit(file_path, edit)
121
-
122
- if is_valid:
123
- output.append("\nValidation Result: The edit is syntactically correct ✓")
124
- else:
125
- output.append("\nValidation Result: The edit would introduce syntax errors ✗")
126
-
127
- return {
128
- "success": True,
129
- "stdout": "\n".join(output),
130
- "stderr": ""
131
- }
132
-
133
- except Exception as e:
134
- return {
135
- "success": False,
136
- "stderr": f"Error validating edit: {str(e)}",
137
- "stdout": ""
138
- }
139
- finally:
140
- if lsp:
141
- lsp.shutdown()