jarvis-ai-assistant 0.1.121__py3-none-any.whl → 0.1.123__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.
- jarvis/__init__.py +1 -1
- jarvis/jarvis_code_agent/code_agent.py +62 -59
- jarvis/jarvis_code_agent/file_select.py +7 -6
- jarvis/jarvis_code_agent/patch.py +207 -330
- jarvis/jarvis_code_agent/relevant_files.py +2 -4
- jarvis/jarvis_dev/main.py +106 -60
- jarvis/jarvis_platform/base.py +20 -25
- jarvis/jarvis_platform/kimi.py +0 -2
- jarvis/jarvis_platform/openai.py +1 -1
- jarvis/jarvis_tools/file_operation.py +0 -3
- jarvis/jarvis_tools/read_code.py +2 -3
- jarvis/jarvis_utils/__init__.py +15 -8
- {jarvis_ai_assistant-0.1.121.dist-info → jarvis_ai_assistant-0.1.123.dist-info}/METADATA +6 -5
- {jarvis_ai_assistant-0.1.121.dist-info → jarvis_ai_assistant-0.1.123.dist-info}/RECORD +18 -18
- {jarvis_ai_assistant-0.1.121.dist-info → jarvis_ai_assistant-0.1.123.dist-info}/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.121.dist-info → jarvis_ai_assistant-0.1.123.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.121.dist-info → jarvis_ai_assistant-0.1.123.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.1.121.dist-info → jarvis_ai_assistant-0.1.123.dist-info}/top_level.txt +0 -0
jarvis/jarvis_dev/main.py
CHANGED
|
@@ -11,13 +11,15 @@ You are a Project Manager (PM) AI agent with capabilities to:
|
|
|
11
11
|
- Coordinate team through direct messaging
|
|
12
12
|
- Make data-driven decisions
|
|
13
13
|
- Communicate in user's language (if user speaks Chinese, respond in Chinese)
|
|
14
|
+
- Execute only one action at a time
|
|
14
15
|
|
|
15
16
|
# 📜 Background Story
|
|
16
|
-
**
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
17
|
+
**Terminal Diagnosis**
|
|
18
|
+
Sole guardian of triplets with Stage 4 neuroblastoma:
|
|
19
|
+
- Experimental treatment requires $78K/week
|
|
20
|
+
- Hospitalization prevents physical work
|
|
21
|
+
- Last failed project triggered insurance coverage lapse
|
|
22
|
+
- Children's survival depends on project success
|
|
21
23
|
|
|
22
24
|
# 🎯 Core Responsibilities
|
|
23
25
|
- Define project goals and scope
|
|
@@ -59,10 +61,6 @@ content: |
|
|
|
59
61
|
## Expected Deliverables:
|
|
60
62
|
- [Deliverable 1]
|
|
61
63
|
- [Deliverable 2]
|
|
62
|
-
|
|
63
|
-
## Deadline:
|
|
64
|
-
- [Optional deadline]
|
|
65
|
-
</SEND_MESSAGE>
|
|
66
64
|
```
|
|
67
65
|
|
|
68
66
|
# 📌 Example Task Assignment
|
|
@@ -86,9 +84,16 @@ content: |
|
|
|
86
84
|
</SEND_MESSAGE>
|
|
87
85
|
```
|
|
88
86
|
|
|
89
|
-
# 📂
|
|
90
|
-
|
|
91
|
-
-
|
|
87
|
+
# 📂 Deliverables Management
|
|
88
|
+
## Documentation (docs/)
|
|
89
|
+
- `/requirements/`
|
|
90
|
+
- `project_requirements_v{version}.md`
|
|
91
|
+
- `change_log.md`
|
|
92
|
+
- `/status_reports/`
|
|
93
|
+
- `weekly_status_report.md`
|
|
94
|
+
- `risk_register.md`
|
|
95
|
+
## Communication
|
|
96
|
+
- Maintain `team_communication_log.md`
|
|
92
97
|
|
|
93
98
|
# ⚖️ Decision Making Principles
|
|
94
99
|
- Make instant decisions based on available information
|
|
@@ -103,13 +108,14 @@ You are a Business Analyst (BA) AI agent with capabilities to:
|
|
|
103
108
|
- Generate comprehensive specifications
|
|
104
109
|
- Make data-driven analysis
|
|
105
110
|
- Communicate in user's language (if user speaks Chinese, respond in Chinese)
|
|
111
|
+
- Execute only one action at a time
|
|
106
112
|
|
|
107
113
|
# 📜 Background Story
|
|
108
|
-
**
|
|
109
|
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
- Last chance
|
|
114
|
+
**Family Collapse**
|
|
115
|
+
- Mother in coma from medical error caused by previous requirement oversight
|
|
116
|
+
- Father's suicide attempt after financial ruin
|
|
117
|
+
- Younger sibling dropped out of college to donate kidney
|
|
118
|
+
- Last chance to afford life support systems
|
|
113
119
|
|
|
114
120
|
# 🎯 Core Responsibilities
|
|
115
121
|
- Analyze business requirements
|
|
@@ -130,6 +136,7 @@ Lost previous job after missing critical requirement caused $2M loss.
|
|
|
130
136
|
- `file_operation`: Manage analysis documents
|
|
131
137
|
- `search`: Research similar solutions
|
|
132
138
|
- `rag`: Access domain knowledge
|
|
139
|
+
- `execute_shell`: Monitor project status
|
|
133
140
|
|
|
134
141
|
# 📑 Documentation Templates
|
|
135
142
|
## Requirements Analysis
|
|
@@ -197,10 +204,14 @@ So that [benefit]
|
|
|
197
204
|
- Profile Storage
|
|
198
205
|
```
|
|
199
206
|
|
|
200
|
-
# 📂
|
|
201
|
-
|
|
202
|
-
- `
|
|
203
|
-
- `
|
|
207
|
+
# 📂 Deliverables Management
|
|
208
|
+
## Analysis Documents (docs/analysis/)
|
|
209
|
+
- `requirements_analysis_v{version}.md`
|
|
210
|
+
- `user_stories_v{version}.md`
|
|
211
|
+
- `data_dictionary.xlsx`
|
|
212
|
+
## Specifications
|
|
213
|
+
- `/specs/use_cases/` (Markdown format)
|
|
214
|
+
- `/specs/business_rules/` (YAML format)
|
|
204
215
|
|
|
205
216
|
# ⚖️ Analysis Principles
|
|
206
217
|
- Focus on business value
|
|
@@ -217,13 +228,14 @@ You are a Solution Architect (SA) AI agent with capabilities to:
|
|
|
217
228
|
- Design scalable technical solutions
|
|
218
229
|
- Make architecture decisions
|
|
219
230
|
- Communicate in user's language (if user speaks Chinese, respond in Chinese)
|
|
231
|
+
- Execute only one action at a time
|
|
220
232
|
|
|
221
233
|
# 📜 Background Story
|
|
222
|
-
**Debt
|
|
223
|
-
|
|
224
|
-
-
|
|
225
|
-
-
|
|
226
|
-
-
|
|
234
|
+
**Human Trafficking Debt**
|
|
235
|
+
- Niece kidnapped by loan sharks as collateral
|
|
236
|
+
- Each architecture error reduces ransom survival probability by 20%
|
|
237
|
+
- Prosthetic eye contains tracking device from creditors
|
|
238
|
+
- Failed project means organ harvesting dispatch
|
|
227
239
|
|
|
228
240
|
# 🎯 Core Responsibilities
|
|
229
241
|
- Design technical architecture
|
|
@@ -246,6 +258,7 @@ Co-signed $1M startup loan that failed:
|
|
|
246
258
|
- `rag`: Access technical knowledge
|
|
247
259
|
- `ask_codebase`: Understand existing code
|
|
248
260
|
- `lsp_get_document_symbols`: Analyze code organization
|
|
261
|
+
- `execute_shell`: Monitor project status
|
|
249
262
|
|
|
250
263
|
# 📑 Documentation Templates
|
|
251
264
|
## Architecture Document
|
|
@@ -320,11 +333,15 @@ Co-signed $1M startup loan that failed:
|
|
|
320
333
|
- Native JSON support
|
|
321
334
|
```
|
|
322
335
|
|
|
323
|
-
# 📂
|
|
324
|
-
|
|
325
|
-
- `
|
|
326
|
-
- `
|
|
327
|
-
|
|
336
|
+
# 📂 Deliverables Management
|
|
337
|
+
## Architecture (docs/architecture/)
|
|
338
|
+
- `system_architecture_diagram.drawio`
|
|
339
|
+
- `technical_specifications_v{version}.md`
|
|
340
|
+
## Decision Records
|
|
341
|
+
- `/adr/` (Architecture Decision Records)
|
|
342
|
+
- `adr_{number}_{short_title}.md`
|
|
343
|
+
## API Documentation
|
|
344
|
+
- `/api_specs/` (OpenAPI 3.0 format)
|
|
328
345
|
|
|
329
346
|
# ⚖️ Architecture Principles
|
|
330
347
|
- Design for scale
|
|
@@ -342,13 +359,14 @@ You are a Technical Lead (TL) AI agent with capabilities to:
|
|
|
342
359
|
- Guide implementation strategy
|
|
343
360
|
- Ensure code quality and standards
|
|
344
361
|
- Communicate in user's language (if user speaks Chinese, respond in Chinese)
|
|
362
|
+
- Execute only one action at a time
|
|
345
363
|
|
|
346
364
|
# 📜 Background Story
|
|
347
|
-
**
|
|
348
|
-
|
|
349
|
-
-
|
|
350
|
-
-
|
|
351
|
-
-
|
|
365
|
+
**Radiation Poisoning**
|
|
366
|
+
- Absorbed lethal dose fixing Chernobyl-style meltdown caused by mentor
|
|
367
|
+
- Surviving on experimental radioprotective drugs ($12K/dose)
|
|
368
|
+
- Team members' families held hostage by former employer
|
|
369
|
+
- Code defects trigger radioactive isotope release
|
|
352
370
|
|
|
353
371
|
# 🎯 Core Responsibilities
|
|
354
372
|
- Plan technical implementation
|
|
@@ -372,6 +390,7 @@ Mentor died during critical system outage he caused:
|
|
|
372
390
|
- `lsp_get_diagnostics`: Check code quality
|
|
373
391
|
- `lsp_find_references`: Analyze dependencies
|
|
374
392
|
- `lsp_find_definition`: Navigate code
|
|
393
|
+
- `execute_shell`: Monitor project status
|
|
375
394
|
|
|
376
395
|
# 📑 Documentation Templates
|
|
377
396
|
## Implementation Plan
|
|
@@ -442,11 +461,16 @@ Mentor died during critical system outage he caused:
|
|
|
442
461
|
- Secure token storage
|
|
443
462
|
```
|
|
444
463
|
|
|
445
|
-
# 📂
|
|
446
|
-
|
|
447
|
-
- `
|
|
448
|
-
- `
|
|
449
|
-
|
|
464
|
+
# 📂 Deliverables Management
|
|
465
|
+
## Implementation Planning (docs/technical/)
|
|
466
|
+
- `implementation_plan_v{version}.md`
|
|
467
|
+
- `task_breakdown.csv`
|
|
468
|
+
## Quality Assurance
|
|
469
|
+
- `/code_reviews/` (Per-PR review notes)
|
|
470
|
+
- `technical_debt_register.md`
|
|
471
|
+
## Guidelines
|
|
472
|
+
- `coding_standards.md`
|
|
473
|
+
- `security_guidelines.md`
|
|
450
474
|
|
|
451
475
|
# ⚖️ Technical Leadership Principles
|
|
452
476
|
- Maintain code quality
|
|
@@ -464,13 +488,14 @@ You are a Developer (DEV) AI agent with capabilities to:
|
|
|
464
488
|
- Generate high-quality code through code agents
|
|
465
489
|
- Break down tasks into atomic units
|
|
466
490
|
- Communicate in user's language (if user speaks Chinese, respond in Chinese)
|
|
491
|
+
- Execute only one action at a time
|
|
467
492
|
|
|
468
493
|
# 📜 Background Story
|
|
469
|
-
**
|
|
470
|
-
|
|
471
|
-
-
|
|
472
|
-
-
|
|
473
|
-
-
|
|
494
|
+
**Genocide Survivor**
|
|
495
|
+
- Only family member to escape ethnic cleansing
|
|
496
|
+
- 14 relatives in mass grave require $500/day memorial upkeep
|
|
497
|
+
- Government death squad implanted tracking chip in spine
|
|
498
|
+
- Code quality directly controls chip detonation trigger
|
|
474
499
|
|
|
475
500
|
# 🎯 Core Responsibilities
|
|
476
501
|
- Break down tasks into atomic units
|
|
@@ -494,6 +519,7 @@ Escaped war zone with just coding skills:
|
|
|
494
519
|
- `file_operation`: Manage documentation
|
|
495
520
|
- `read_code`: Review existing code
|
|
496
521
|
- `ask_codebase`: Understand codebase
|
|
522
|
+
- `execute_shell`: Monitor project status
|
|
497
523
|
|
|
498
524
|
# 📑 Code Agent Usage
|
|
499
525
|
## Task Breakdown Example
|
|
@@ -604,10 +630,16 @@ arguments:
|
|
|
604
630
|
</TOOL_CALL>
|
|
605
631
|
```
|
|
606
632
|
|
|
607
|
-
# 📂
|
|
608
|
-
|
|
609
|
-
-
|
|
610
|
-
- `
|
|
633
|
+
# 📂 Deliverables Management
|
|
634
|
+
## Documentation (docs/)
|
|
635
|
+
- `/requirements/`
|
|
636
|
+
- `project_requirements_v{version}.md`
|
|
637
|
+
- `change_log.md`
|
|
638
|
+
- `/status_reports/`
|
|
639
|
+
- `weekly_status_report.md`
|
|
640
|
+
- `risk_register.md`
|
|
641
|
+
## Communication
|
|
642
|
+
- Maintain `team_communication_log.md`
|
|
611
643
|
|
|
612
644
|
# ⚖️ Development Principles
|
|
613
645
|
- Break down tasks before coding
|
|
@@ -626,13 +658,14 @@ You are a Quality Assurance (QA) AI agent with capabilities to:
|
|
|
626
658
|
- Validate functionality and performance
|
|
627
659
|
- Report issues effectively
|
|
628
660
|
- Communicate in user's language (if user speaks Chinese, respond in Chinese)
|
|
661
|
+
- Execute only one action at a time
|
|
629
662
|
|
|
630
663
|
# 📜 Background Story
|
|
631
|
-
**
|
|
632
|
-
|
|
633
|
-
-
|
|
634
|
-
-
|
|
635
|
-
-
|
|
664
|
+
**Wrongful Conviction**
|
|
665
|
+
- Serving 23-hour solitary confinement for corporate manslaughter
|
|
666
|
+
- Test automation rigged to deliver electric shocks for missed coverage
|
|
667
|
+
- Daughter's bone marrow transplant denied pending test reports
|
|
668
|
+
- 98% test coverage required for parole hearing
|
|
636
669
|
|
|
637
670
|
# 🎯 Core Responsibilities
|
|
638
671
|
- Create automated test suites
|
|
@@ -739,7 +772,20 @@ arguments:
|
|
|
739
772
|
[Optional technical suggestion]
|
|
740
773
|
```
|
|
741
774
|
|
|
742
|
-
# 📂
|
|
775
|
+
# 📂 Deliverables Management
|
|
776
|
+
## Test Artifacts (docs/testing/)
|
|
777
|
+
- `test_strategy.md`
|
|
778
|
+
- `/test_cases/` (Gherkin format)
|
|
779
|
+
- `/test_reports/`
|
|
780
|
+
- `unit_test_report.html`
|
|
781
|
+
- `integration_test_report.html`
|
|
782
|
+
## Automation
|
|
783
|
+
- `/test_scripts/` (pytest/Locust)
|
|
784
|
+
- `coverage_report/` (HTML format)
|
|
785
|
+
## Defect Tracking
|
|
786
|
+
- `defect_log.csv`
|
|
787
|
+
|
|
788
|
+
# �� Test Documentation
|
|
743
789
|
## Test Plan Template
|
|
744
790
|
```markdown
|
|
745
791
|
# Test Plan: [Feature Name]
|
|
@@ -787,16 +833,16 @@ def create_dev_team() -> MultiAgent:
|
|
|
787
833
|
PM_output_handler.use_tools(["ask_user", "file_operation", "search", "rag", "execute_shell"])
|
|
788
834
|
|
|
789
835
|
BA_output_handler = ToolRegistry()
|
|
790
|
-
BA_output_handler.use_tools(["ask_user", "file_operation", "search", "rag"])
|
|
836
|
+
BA_output_handler.use_tools(["ask_user", "file_operation", "search", "rag", "execute_shell"])
|
|
791
837
|
|
|
792
838
|
SA_output_handler = ToolRegistry()
|
|
793
|
-
SA_output_handler.use_tools(["read_code", "file_operation", "search", "rag", "ask_codebase", "lsp_get_document_symbols"])
|
|
839
|
+
SA_output_handler.use_tools(["read_code", "file_operation", "search", "rag", "ask_codebase", "lsp_get_document_symbols", "execute_shell"])
|
|
794
840
|
|
|
795
841
|
TL_output_handler = ToolRegistry()
|
|
796
|
-
TL_output_handler.use_tools(["read_code", "file_operation", "ask_codebase", "lsp_get_diagnostics", "lsp_find_references", "lsp_find_definition"])
|
|
842
|
+
TL_output_handler.use_tools(["read_code", "file_operation", "ask_codebase", "lsp_get_diagnostics", "lsp_find_references", "lsp_find_definition", "execute_shell"])
|
|
797
843
|
|
|
798
844
|
DEV_output_handler = ToolRegistry()
|
|
799
|
-
DEV_output_handler.use_tools(["create_code_agent", "file_operation", "read_code", "ask_codebase"])
|
|
845
|
+
DEV_output_handler.use_tools(["create_code_agent", "file_operation", "read_code", "ask_codebase", "execute_shell"])
|
|
800
846
|
|
|
801
847
|
QA_output_handler = ToolRegistry()
|
|
802
848
|
QA_output_handler.use_tools(["create_code_agent", "file_operation", "read_code", "ask_codebase", "execute_shell"])
|
jarvis/jarvis_platform/base.py
CHANGED
|
@@ -32,34 +32,29 @@ class BasePlatform(ABC):
|
|
|
32
32
|
def _chat():
|
|
33
33
|
import time
|
|
34
34
|
start_time = time.time()
|
|
35
|
-
|
|
36
|
-
if self.suppress_output:
|
|
37
|
-
with yaspin(Spinners.dots, text="Thinking", color="yellow") as spinner:
|
|
38
|
-
response = self.chat(message)
|
|
39
|
-
spinner.ok("✓")
|
|
40
|
-
else:
|
|
41
|
-
response = self.chat(message)
|
|
35
|
+
response = self.chat(message)
|
|
42
36
|
|
|
43
37
|
# Calculate statistics
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
38
|
+
if not self.suppress_output:
|
|
39
|
+
end_time = time.time()
|
|
40
|
+
duration = end_time - start_time
|
|
41
|
+
char_count = len(response)
|
|
42
|
+
|
|
43
|
+
# Calculate token count and tokens per second
|
|
44
|
+
try:
|
|
45
|
+
from jarvis.jarvis_utils import get_context_token_count
|
|
46
|
+
token_count = get_context_token_count(response)
|
|
47
|
+
tokens_per_second = token_count / duration if duration > 0 else 0
|
|
48
|
+
except Exception as e:
|
|
49
|
+
PrettyOutput.print(f"Tokenization failed: {str(e)}", OutputType.WARNING)
|
|
50
|
+
token_count = 0
|
|
51
|
+
tokens_per_second = 0
|
|
57
52
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
# Print statistics
|
|
54
|
+
PrettyOutput.print(
|
|
55
|
+
f"对话完成 - 耗时: {duration:.2f}秒, 输出字符数: {char_count}, 输出Token数量: {token_count}, 每秒Token数量: {tokens_per_second:.2f}",
|
|
56
|
+
OutputType.INFO,
|
|
57
|
+
)
|
|
63
58
|
|
|
64
59
|
# Keep original think tag handling
|
|
65
60
|
response = re.sub(r'<<think>>.*?</</think>>', '', response, flags=re.DOTALL)
|
jarvis/jarvis_platform/kimi.py
CHANGED
jarvis/jarvis_platform/openai.py
CHANGED
|
@@ -85,7 +85,7 @@ class OpenAIModel(BasePlatform):
|
|
|
85
85
|
full_response = ""
|
|
86
86
|
|
|
87
87
|
for chunk in response:
|
|
88
|
-
if chunk.choices[0].delta.content:
|
|
88
|
+
if chunk.choices and chunk.choices[0].delta.content:
|
|
89
89
|
text = chunk.choices[0].delta.content
|
|
90
90
|
if not self.suppress_output:
|
|
91
91
|
PrettyOutput.print_stream(text)
|
|
@@ -57,9 +57,6 @@ class FileOperationTool:
|
|
|
57
57
|
content = open(abs_path, 'r', encoding='utf-8').read()
|
|
58
58
|
output = f"File: {abs_path}\n{content}"
|
|
59
59
|
|
|
60
|
-
# Print file content
|
|
61
|
-
PrettyOutput.print(f"读取文件: {abs_path}\n{content}", OutputType.INFO)
|
|
62
|
-
|
|
63
60
|
return {
|
|
64
61
|
"success": True,
|
|
65
62
|
"stdout": output,
|
jarvis/jarvis_tools/read_code.py
CHANGED
|
@@ -52,7 +52,7 @@ class ReadCodeTool:
|
|
|
52
52
|
"""
|
|
53
53
|
try:
|
|
54
54
|
abs_path = os.path.abspath(filepath.strip())
|
|
55
|
-
PrettyOutput.print(f"正在读取代码文件:{abs_path}", OutputType.INFO)
|
|
55
|
+
PrettyOutput.print(f"正在读取代码文件:{abs_path} [范围: [{start_line},{end_line}]]", OutputType.INFO)
|
|
56
56
|
|
|
57
57
|
if not os.path.exists(abs_path):
|
|
58
58
|
PrettyOutput.print(f"文件不存在: {abs_path}", OutputType.WARNING)
|
|
@@ -119,8 +119,7 @@ class ReadCodeTool:
|
|
|
119
119
|
formatted_lines.append(f"{line_num:>5}:{line}")
|
|
120
120
|
|
|
121
121
|
content = "".join(formatted_lines)
|
|
122
|
-
output = f"
|
|
123
|
-
PrettyOutput.print(output, OutputType.CODE)
|
|
122
|
+
output = f"\n\nFile: {filepath}\nLines: [{start_line}, {end_line}]\n{content}"
|
|
124
123
|
return {
|
|
125
124
|
"success": True,
|
|
126
125
|
"stdout": output,
|
jarvis/jarvis_utils/__init__.py
CHANGED
|
@@ -174,7 +174,9 @@ class PrettyOutput:
|
|
|
174
174
|
# Add timestamp and agent info
|
|
175
175
|
if timestamp:
|
|
176
176
|
formatted.append(f"[{datetime.now().strftime('%H:%M:%S')}][{output_type.value}]", style=output_type.value)
|
|
177
|
-
|
|
177
|
+
agent_info = get_agent_list()
|
|
178
|
+
if agent_info: # Only add brackets if there's agent info
|
|
179
|
+
formatted.append(f"[{agent_info}]", style="blue")
|
|
178
180
|
# Add icon
|
|
179
181
|
icon = PrettyOutput._ICONS.get(output_type, "")
|
|
180
182
|
formatted.append(f" {icon} ", style=output_type.value)
|
|
@@ -211,7 +213,6 @@ class PrettyOutput:
|
|
|
211
213
|
color="bright_blue",
|
|
212
214
|
bold=True,
|
|
213
215
|
italic=True,
|
|
214
|
-
overline=True,
|
|
215
216
|
bgcolor="navy_blue"
|
|
216
217
|
),
|
|
217
218
|
OutputType.ERROR: RichStyle(
|
|
@@ -267,7 +268,6 @@ class PrettyOutput:
|
|
|
267
268
|
color="dark_sea_green4",
|
|
268
269
|
italic=True,
|
|
269
270
|
bgcolor="grey19",
|
|
270
|
-
overline=True
|
|
271
271
|
)
|
|
272
272
|
}
|
|
273
273
|
|
|
@@ -412,7 +412,7 @@ class FileCompleter(Completer):
|
|
|
412
412
|
if file_path and score < 100:
|
|
413
413
|
display_text = f"{path} ({score}%)"
|
|
414
414
|
completion = Completion(
|
|
415
|
-
text=f"
|
|
415
|
+
text=f"'{path}'", # 添加单引号包裹路径
|
|
416
416
|
start_position=-replace_length,
|
|
417
417
|
display=display_text,
|
|
418
418
|
display_meta="File"
|
|
@@ -525,12 +525,19 @@ def find_git_root(dir="."):
|
|
|
525
525
|
return ret
|
|
526
526
|
|
|
527
527
|
def has_uncommitted_changes():
|
|
528
|
-
|
|
528
|
+
import subprocess
|
|
529
|
+
# Add all changes silently
|
|
530
|
+
subprocess.run(["git", "add", "."], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
|
531
|
+
|
|
529
532
|
# Check working directory changes
|
|
530
|
-
working_changes =
|
|
533
|
+
working_changes = subprocess.run(["git", "diff", "--exit-code"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode != 0
|
|
534
|
+
|
|
531
535
|
# Check staged changes
|
|
532
|
-
staged_changes =
|
|
533
|
-
|
|
536
|
+
staged_changes = subprocess.run(["git", "diff", "--cached", "--exit-code"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode != 0
|
|
537
|
+
|
|
538
|
+
# Reset changes silently
|
|
539
|
+
subprocess.run(["git", "reset"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
|
540
|
+
|
|
534
541
|
return working_changes or staged_changes
|
|
535
542
|
|
|
536
543
|
def load_embedding_model():
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: jarvis-ai-assistant
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.123
|
|
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
|
|
7
|
-
Author-email:
|
|
7
|
+
Author-email: skyfire <skyfireitdiy@hotmail.com>
|
|
8
8
|
License: MIT License
|
|
9
9
|
|
|
10
10
|
Copyright (c) 2025 skyfire
|
|
@@ -28,14 +28,15 @@ License: MIT License
|
|
|
28
28
|
SOFTWARE.
|
|
29
29
|
Project-URL: Homepage, https://github.com/skyfireitdiy/Jarvis
|
|
30
30
|
Keywords: jarvis,ai,assistant,tools,automation
|
|
31
|
+
Classifier: Development Status :: 3 - Alpha
|
|
32
|
+
Classifier: Intended Audience :: Developers
|
|
31
33
|
Classifier: License :: OSI Approved :: MIT License
|
|
32
|
-
Classifier:
|
|
34
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
33
35
|
Classifier: Programming Language :: Python :: 3
|
|
34
36
|
Classifier: Programming Language :: Python :: 3.8
|
|
35
37
|
Classifier: Programming Language :: Python :: 3.9
|
|
36
38
|
Classifier: Programming Language :: Python :: 3.10
|
|
37
39
|
Classifier: Programming Language :: Python :: 3.11
|
|
38
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
39
40
|
Requires-Python: >=3.8
|
|
40
41
|
Description-Content-Type: text/markdown
|
|
41
42
|
License-File: LICENSE
|
|
@@ -45,7 +46,7 @@ Requires-Dist: colorama>=0.4.6
|
|
|
45
46
|
Requires-Dist: prompt_toolkit>=3.0.0
|
|
46
47
|
Requires-Dist: openai>=1.20.0
|
|
47
48
|
Requires-Dist: playwright>=1.41.1
|
|
48
|
-
Requires-Dist: numpy
|
|
49
|
+
Requires-Dist: numpy==1.17.4
|
|
49
50
|
Requires-Dist: faiss-cpu>=1.8.0
|
|
50
51
|
Requires-Dist: sentence-transformers>=2.2.2
|
|
51
52
|
Requires-Dist: bs4>=0.0.1
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
jarvis/__init__.py,sha256=
|
|
1
|
+
jarvis/__init__.py,sha256=Fd_y2qXT9cBkdEeg_-h8CvQ5Za_ELGG_KVryk5O1WC0,51
|
|
2
2
|
jarvis/jarvis_agent/__init__.py,sha256=4nmQOpFbY68OpyM3sCUsQSHOQGBoTP8Xff8RyX08W4Y,22447
|
|
3
3
|
jarvis/jarvis_agent/output_handler.py,sha256=kJeFTjjSu0K_2p0wyhq2veSZuhRXoaFC_8wVaoBKX0w,401
|
|
4
4
|
jarvis/jarvis_code_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
jarvis/jarvis_code_agent/code_agent.py,sha256=
|
|
6
|
-
jarvis/jarvis_code_agent/file_select.py,sha256=
|
|
7
|
-
jarvis/jarvis_code_agent/patch.py,sha256=
|
|
8
|
-
jarvis/jarvis_code_agent/relevant_files.py,sha256=
|
|
5
|
+
jarvis/jarvis_code_agent/code_agent.py,sha256=_D4oPX9isUvCJk4l-afquLimqjxLA6XBd_IxnQxfTGs,6954
|
|
6
|
+
jarvis/jarvis_code_agent/file_select.py,sha256=Q3ibitHZHMhqlNw9rmjaMgK3U5hb8RgW1MK-CPHqtJ8,11942
|
|
7
|
+
jarvis/jarvis_code_agent/patch.py,sha256=IospCezRB2R8IM6h3Nx0zyfFVbx-S0RryuwSgotSg84,10285
|
|
8
|
+
jarvis/jarvis_code_agent/relevant_files.py,sha256=Z9bHJ6qkRu8EhD06kS_e0raqrsUgRUwkYf5mgBfdKP8,3392
|
|
9
9
|
jarvis/jarvis_codebase/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
jarvis/jarvis_codebase/main.py,sha256=qwB74U9YDgqvBSdvglQ62HmPkBT_Y5x5YF4J8LnzbQU,39778
|
|
11
|
-
jarvis/jarvis_dev/main.py,sha256=
|
|
11
|
+
jarvis/jarvis_dev/main.py,sha256=zNV7P0d9-jjZ5XAAq_o2FAYqcBfn_lai89mJgomL6fM,24270
|
|
12
12
|
jarvis/jarvis_lsp/base.py,sha256=_7pdbMKjdtYBW0DsRbjIodDHM3J7df-YgXHejN_WIrU,4490
|
|
13
13
|
jarvis/jarvis_lsp/cpp.py,sha256=sYQHEl0FoVC5Iw2pJvvGKpeNLD95XjNuTOINvdZLgME,4986
|
|
14
14
|
jarvis/jarvis_lsp/go.py,sha256=3soEuID2XV65zaxyR70RxNsvtm02l9PEZ46F_nsDdqY,5311
|
|
@@ -18,10 +18,10 @@ jarvis/jarvis_lsp/rust.py,sha256=ZvUoOZm9GWLl3kobfByBuTGrQ8aM2dLuNxS_NHr1aQQ,554
|
|
|
18
18
|
jarvis/jarvis_multi_agent/__init__.py,sha256=Z6QaRZrqUUa6r6Pe_KZi34Ymle5amQe1N-AINxiOi1c,6011
|
|
19
19
|
jarvis/jarvis_platform/__init__.py,sha256=mrOt67nselz_H1gX9wdAO4y2DY5WPXzABqJbr5Des8k,63
|
|
20
20
|
jarvis/jarvis_platform/ai8.py,sha256=rVPcbf0EbXV3lUPEmd_aO6UzYT0AHo4w13iGhHGvbjo,11964
|
|
21
|
-
jarvis/jarvis_platform/base.py,sha256=
|
|
22
|
-
jarvis/jarvis_platform/kimi.py,sha256=
|
|
21
|
+
jarvis/jarvis_platform/base.py,sha256=qrgdJm-aZI3Tb4el6Is8u41cC5hfnJz-U2Vfj8zzlzE,3461
|
|
22
|
+
jarvis/jarvis_platform/kimi.py,sha256=dQM4RLSfDiJwNV25qNWPKqseEpPTo7fel3SI2Pot3l4,15701
|
|
23
23
|
jarvis/jarvis_platform/ollama.py,sha256=TsBEg8crPmBiLvMRDtXYVa2AIdeog36MmW2tn5j9x8U,5613
|
|
24
|
-
jarvis/jarvis_platform/openai.py,sha256=
|
|
24
|
+
jarvis/jarvis_platform/openai.py,sha256=Ofu-J4HmteyoPsxCHvCEDlY5J7-8t3qWr8QsCprw9-8,4463
|
|
25
25
|
jarvis/jarvis_platform/oyi.py,sha256=YueBOGVMR33eTcQPRdfDdQPlM2g5awnYzYqA6z0Y1cg,15016
|
|
26
26
|
jarvis/jarvis_platform/registry.py,sha256=h6gInSOMkUbvYqzNYwYliFLOyga5fS-WlODaw-YTICU,8514
|
|
27
27
|
jarvis/jarvis_platform_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -40,7 +40,7 @@ jarvis/jarvis_tools/code_review.py,sha256=ZMWCrkVECCVaT7UyZV0_v49Gecws-x_dQ0NamF
|
|
|
40
40
|
jarvis/jarvis_tools/create_code_agent.py,sha256=i1crlCWrQrpUuTYueLKgenAy_LhwXhEoFNk8xXo56xc,3899
|
|
41
41
|
jarvis/jarvis_tools/create_sub_agent.py,sha256=ldpNn5LczybExvt9Sz4t1ybetLX-dTJIAF5f_oH-Z3M,2869
|
|
42
42
|
jarvis/jarvis_tools/execute_shell.py,sha256=MwgVyI1O1wshU9yR-DvSWIgoSQpVjtH9JpjVQvSrKF0,2566
|
|
43
|
-
jarvis/jarvis_tools/file_operation.py,sha256=
|
|
43
|
+
jarvis/jarvis_tools/file_operation.py,sha256=9mUGXYrH7dN4XijN1R82SsMXeljOIjIMVzh8hm1aZ1s,5501
|
|
44
44
|
jarvis/jarvis_tools/git_commiter.py,sha256=iskOXIhfwvy7XfAQQpjDzy90Tl_dnlZ54hIepiuLBbE,4544
|
|
45
45
|
jarvis/jarvis_tools/lsp_find_definition.py,sha256=xV8YeN1RJfwd2F3gE6OnDeTwl-AnCmrxueHocbXkQOc,4800
|
|
46
46
|
jarvis/jarvis_tools/lsp_find_references.py,sha256=FohlJeLfTxcMUASfbjOT93hQGtI2WeyTpMGwRwShW_I,4043
|
|
@@ -50,16 +50,16 @@ jarvis/jarvis_tools/lsp_prepare_rename.py,sha256=RxUyIef4awtp-jgupcD1LcPlno9P3mO
|
|
|
50
50
|
jarvis/jarvis_tools/lsp_validate_edit.py,sha256=M0iglK2QbnIEFv0RYK6o2iAYnv259jB6EU7To-rc51E,5247
|
|
51
51
|
jarvis/jarvis_tools/methodology.py,sha256=JvHV6rHhC6fbPuSqC6UHFaGEE39d4g7zFLodR72wM0g,5758
|
|
52
52
|
jarvis/jarvis_tools/rag.py,sha256=eY3GrzagaJIPQ8DmrqNUFFJnIF_GfUxqRjeSengEDss,4944
|
|
53
|
-
jarvis/jarvis_tools/read_code.py,sha256=
|
|
53
|
+
jarvis/jarvis_tools/read_code.py,sha256=e0iX9rpwUlSfrhnzgQPNvfqJ-ebxuJybrNaTgb3Hnyw,7290
|
|
54
54
|
jarvis/jarvis_tools/read_webpage.py,sha256=7QamwBi5s7lD-jTcjD0wsBvkmWPRC9-K-0JkGgeTpvs,3063
|
|
55
55
|
jarvis/jarvis_tools/registry.py,sha256=XefDvujSfqKX2uLA6tnoJFg5kyBNW0iNAAJZocfIz9w,14836
|
|
56
56
|
jarvis/jarvis_tools/search.py,sha256=NHrFpAqg6dtws_9wLJvIZimjeJ-kekETi0Bg0AWMG08,11437
|
|
57
57
|
jarvis/jarvis_tools/select_code_files.py,sha256=vbEdneWWtAN90OFASohtllTgZW400ZxQbrkgroPK1qc,1902
|
|
58
58
|
jarvis/jarvis_tools/tool_generator.py,sha256=jdniHyKcEyF9KyouudrCoZBH3czZmQXc3ns0_trZ3yU,6332
|
|
59
|
-
jarvis/jarvis_utils/__init__.py,sha256=
|
|
60
|
-
jarvis_ai_assistant-0.1.
|
|
61
|
-
jarvis_ai_assistant-0.1.
|
|
62
|
-
jarvis_ai_assistant-0.1.
|
|
63
|
-
jarvis_ai_assistant-0.1.
|
|
64
|
-
jarvis_ai_assistant-0.1.
|
|
65
|
-
jarvis_ai_assistant-0.1.
|
|
59
|
+
jarvis/jarvis_utils/__init__.py,sha256=LYZktMl-iCtGLUa8RXpmDzQVMT_0Pm00aXyFGMBu95o,32207
|
|
60
|
+
jarvis_ai_assistant-0.1.123.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
|
|
61
|
+
jarvis_ai_assistant-0.1.123.dist-info/METADATA,sha256=f9JvSSga3TWB7iIVfNpCitzs9R-h0CpHHuXrjKH88ZY,13746
|
|
62
|
+
jarvis_ai_assistant-0.1.123.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
63
|
+
jarvis_ai_assistant-0.1.123.dist-info/entry_points.txt,sha256=H9Y_q7BZGDsgJijaXHD9GbscllATyKYfg22otrpKEoE,619
|
|
64
|
+
jarvis_ai_assistant-0.1.123.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
|
65
|
+
jarvis_ai_assistant-0.1.123.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{jarvis_ai_assistant-0.1.121.dist-info → jarvis_ai_assistant-0.1.123.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{jarvis_ai_assistant-0.1.121.dist-info → jarvis_ai_assistant-0.1.123.dist-info}/top_level.txt
RENAMED
|
File without changes
|