jarvis-ai-assistant 0.1.192__py3-none-any.whl → 0.1.194__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.
Files changed (91) hide show
  1. jarvis/__init__.py +1 -1
  2. jarvis/jarvis_agent/__init__.py +69 -37
  3. jarvis/jarvis_agent/builtin_input_handler.py +26 -4
  4. jarvis/jarvis_agent/jarvis.py +38 -22
  5. jarvis/jarvis_agent/main.py +20 -12
  6. jarvis/jarvis_agent/output_handler.py +7 -7
  7. jarvis/jarvis_agent/shell_input_handler.py +14 -11
  8. jarvis/jarvis_code_agent/code_agent.py +93 -90
  9. jarvis/jarvis_code_agent/lint.py +92 -105
  10. jarvis/jarvis_code_analysis/checklists/__init__.py +1 -1
  11. jarvis/jarvis_code_analysis/checklists/c_cpp.py +1 -1
  12. jarvis/jarvis_code_analysis/checklists/csharp.py +1 -1
  13. jarvis/jarvis_code_analysis/checklists/data_format.py +1 -1
  14. jarvis/jarvis_code_analysis/checklists/devops.py +1 -1
  15. jarvis/jarvis_code_analysis/checklists/docs.py +1 -1
  16. jarvis/jarvis_code_analysis/checklists/go.py +1 -1
  17. jarvis/jarvis_code_analysis/checklists/infrastructure.py +1 -1
  18. jarvis/jarvis_code_analysis/checklists/java.py +1 -1
  19. jarvis/jarvis_code_analysis/checklists/javascript.py +1 -1
  20. jarvis/jarvis_code_analysis/checklists/kotlin.py +1 -1
  21. jarvis/jarvis_code_analysis/checklists/loader.py +51 -35
  22. jarvis/jarvis_code_analysis/checklists/php.py +1 -1
  23. jarvis/jarvis_code_analysis/checklists/python.py +1 -1
  24. jarvis/jarvis_code_analysis/checklists/ruby.py +1 -1
  25. jarvis/jarvis_code_analysis/checklists/rust.py +1 -1
  26. jarvis/jarvis_code_analysis/checklists/shell.py +1 -1
  27. jarvis/jarvis_code_analysis/checklists/sql.py +1 -1
  28. jarvis/jarvis_code_analysis/checklists/swift.py +1 -1
  29. jarvis/jarvis_code_analysis/checklists/web.py +1 -1
  30. jarvis/jarvis_code_analysis/code_review.py +293 -192
  31. jarvis/jarvis_dev/main.py +73 -56
  32. jarvis/jarvis_git_details/main.py +29 -33
  33. jarvis/jarvis_git_squash/main.py +13 -11
  34. jarvis/jarvis_git_utils/git_commiter.py +12 -3
  35. jarvis/jarvis_mcp/__init__.py +8 -10
  36. jarvis/jarvis_mcp/sse_mcp_client.py +182 -205
  37. jarvis/jarvis_mcp/stdio_mcp_client.py +93 -120
  38. jarvis/jarvis_mcp/streamable_mcp_client.py +117 -142
  39. jarvis/jarvis_methodology/main.py +81 -47
  40. jarvis/jarvis_multi_agent/__init__.py +24 -16
  41. jarvis/jarvis_multi_agent/main.py +10 -4
  42. jarvis/jarvis_platform/__init__.py +1 -1
  43. jarvis/jarvis_platform/base.py +49 -21
  44. jarvis/jarvis_platform/human.py +5 -3
  45. jarvis/jarvis_platform/kimi.py +96 -72
  46. jarvis/jarvis_platform/openai.py +23 -28
  47. jarvis/jarvis_platform/registry.py +50 -33
  48. jarvis/jarvis_platform/tongyi.py +16 -10
  49. jarvis/jarvis_platform/yuanbao.py +205 -147
  50. jarvis/jarvis_platform_manager/main.py +4 -2
  51. jarvis/jarvis_smart_shell/main.py +35 -29
  52. jarvis/jarvis_tools/ask_user.py +8 -16
  53. jarvis/jarvis_tools/base.py +3 -2
  54. jarvis/jarvis_tools/chdir.py +7 -19
  55. jarvis/jarvis_tools/cli/main.py +14 -10
  56. jarvis/jarvis_tools/code_plan.py +10 -31
  57. jarvis/jarvis_tools/create_code_agent.py +10 -13
  58. jarvis/jarvis_tools/create_sub_agent.py +10 -22
  59. jarvis/jarvis_tools/edit_file.py +98 -76
  60. jarvis/jarvis_tools/execute_script.py +46 -46
  61. jarvis/jarvis_tools/file_analyzer.py +22 -34
  62. jarvis/jarvis_tools/file_operation.py +69 -62
  63. jarvis/jarvis_tools/generate_new_tool.py +0 -2
  64. jarvis/jarvis_tools/methodology.py +19 -23
  65. jarvis/jarvis_tools/read_code.py +42 -33
  66. jarvis/jarvis_tools/read_webpage.py +7 -16
  67. jarvis/jarvis_tools/registry.py +65 -32
  68. jarvis/jarvis_tools/rewrite_file.py +26 -29
  69. jarvis/jarvis_tools/search_web.py +5 -8
  70. jarvis/jarvis_tools/virtual_tty.py +133 -122
  71. jarvis/jarvis_utils/__init__.py +0 -1
  72. jarvis/jarvis_utils/builtin_replace_map.py +96 -8
  73. jarvis/jarvis_utils/config.py +59 -32
  74. jarvis/jarvis_utils/embedding.py +17 -14
  75. jarvis/jarvis_utils/file_processors.py +16 -9
  76. jarvis/jarvis_utils/git_utils.py +140 -99
  77. jarvis/jarvis_utils/globals.py +1 -1
  78. jarvis/jarvis_utils/input.py +84 -52
  79. jarvis/jarvis_utils/methodology.py +28 -21
  80. jarvis/jarvis_utils/output.py +159 -78
  81. jarvis/jarvis_utils/tag.py +2 -1
  82. jarvis/jarvis_utils/utils.py +85 -51
  83. {jarvis_ai_assistant-0.1.192.dist-info → jarvis_ai_assistant-0.1.194.dist-info}/METADATA +337 -204
  84. jarvis_ai_assistant-0.1.194.dist-info/RECORD +97 -0
  85. jarvis/jarvis_agent/file_input_handler.py +0 -112
  86. jarvis/jarvis_event/__init__.py +0 -0
  87. jarvis_ai_assistant-0.1.192.dist-info/RECORD +0 -99
  88. {jarvis_ai_assistant-0.1.192.dist-info → jarvis_ai_assistant-0.1.194.dist-info}/WHEEL +0 -0
  89. {jarvis_ai_assistant-0.1.192.dist-info → jarvis_ai_assistant-0.1.194.dist-info}/entry_points.txt +0 -0
  90. {jarvis_ai_assistant-0.1.192.dist-info → jarvis_ai_assistant-0.1.194.dist-info}/licenses/LICENSE +0 -0
  91. {jarvis_ai_assistant-0.1.192.dist-info → jarvis_ai_assistant-0.1.194.dist-info}/top_level.txt +0 -0
@@ -71,4 +71,4 @@ CHECKLIST = """
71
71
  - [ ] 复杂逻辑是否抽象成可测试的函数
72
72
  - [ ] 是否遵循 DRY 原则
73
73
  - [ ] 状态管理是否合理
74
- """
74
+ """
@@ -105,4 +105,4 @@ CHECKLIST = """
105
105
  - [ ] API 参数和返回值是否有文档说明
106
106
  - [ ] 是否包含了示例代码或用例
107
107
  - [ ] 是否维护了 CHANGELOG 记录
108
- """
108
+ """
@@ -5,59 +5,75 @@ Utility module for loading language-specific code review checklists.
5
5
  from typing import Dict, Optional
6
6
 
7
7
  # Import checklist modules
8
- from jarvis.jarvis_code_analysis.checklists import (c_cpp, csharp, data_format,
9
- devops, docs, go,
10
- infrastructure, java,
11
- javascript, kotlin, php,
12
- python, ruby, rust, shell,
13
- sql, swift, web)
8
+ from jarvis.jarvis_code_analysis.checklists import (
9
+ c_cpp,
10
+ csharp,
11
+ data_format,
12
+ devops,
13
+ docs,
14
+ go,
15
+ infrastructure,
16
+ java,
17
+ javascript,
18
+ kotlin,
19
+ php,
20
+ python,
21
+ ruby,
22
+ rust,
23
+ shell,
24
+ sql,
25
+ swift,
26
+ web,
27
+ )
14
28
 
15
29
  # Map of language identifiers to their checklist content
16
30
  CHECKLIST_MAP = {
17
- 'c_cpp': c_cpp.CHECKLIST,
18
- 'go': go.CHECKLIST,
19
- 'python': python.CHECKLIST,
20
- 'rust': rust.CHECKLIST,
21
- 'java': java.CHECKLIST,
22
- 'javascript': javascript.CHECKLIST,
23
- 'typescript': javascript.CHECKLIST, # TypeScript uses the same checklist as JavaScript
24
- 'csharp': csharp.CHECKLIST,
25
- 'swift': swift.CHECKLIST,
26
- 'php': php.CHECKLIST,
27
- 'shell': shell.CHECKLIST,
28
- 'sql': sql.CHECKLIST,
29
- 'ruby': ruby.CHECKLIST,
30
- 'kotlin': kotlin.CHECKLIST,
31
- 'html': web.CHECKLIST,
32
- 'css': web.CHECKLIST,
33
- 'xml': data_format.CHECKLIST,
34
- 'json': data_format.CHECKLIST,
35
- 'yaml': data_format.CHECKLIST,
36
- 'docker': infrastructure.CHECKLIST,
37
- 'terraform': infrastructure.CHECKLIST,
38
- 'markdown': docs.CHECKLIST,
39
- 'docs': docs.CHECKLIST,
40
- 'makefile': devops.CHECKLIST,
41
- 'devops': devops.CHECKLIST,
31
+ "c_cpp": c_cpp.CHECKLIST,
32
+ "go": go.CHECKLIST,
33
+ "python": python.CHECKLIST,
34
+ "rust": rust.CHECKLIST,
35
+ "java": java.CHECKLIST,
36
+ "javascript": javascript.CHECKLIST,
37
+ "typescript": javascript.CHECKLIST, # TypeScript uses the same checklist as JavaScript
38
+ "csharp": csharp.CHECKLIST,
39
+ "swift": swift.CHECKLIST,
40
+ "php": php.CHECKLIST,
41
+ "shell": shell.CHECKLIST,
42
+ "sql": sql.CHECKLIST,
43
+ "ruby": ruby.CHECKLIST,
44
+ "kotlin": kotlin.CHECKLIST,
45
+ "html": web.CHECKLIST,
46
+ "css": web.CHECKLIST,
47
+ "xml": data_format.CHECKLIST,
48
+ "json": data_format.CHECKLIST,
49
+ "yaml": data_format.CHECKLIST,
50
+ "docker": infrastructure.CHECKLIST,
51
+ "terraform": infrastructure.CHECKLIST,
52
+ "markdown": docs.CHECKLIST,
53
+ "docs": docs.CHECKLIST,
54
+ "makefile": devops.CHECKLIST,
55
+ "devops": devops.CHECKLIST,
42
56
  }
43
57
 
58
+
44
59
  def get_language_checklist(language: str) -> Optional[str]:
45
60
  """
46
61
  Get the checklist for a specific language.
47
-
62
+
48
63
  Args:
49
64
  language: The language identifier ('c_cpp', 'go', 'python', 'rust', etc.)
50
-
65
+
51
66
  Returns:
52
67
  The checklist content as a string, or None if not found
53
68
  """
54
69
  return CHECKLIST_MAP.get(language)
55
70
 
71
+
56
72
  def get_all_checklists() -> Dict[str, str]:
57
73
  """
58
74
  Get all available language checklists.
59
-
75
+
60
76
  Returns:
61
77
  Dictionary mapping language identifiers to their checklist content
62
78
  """
63
- return CHECKLIST_MAP
79
+ return CHECKLIST_MAP
@@ -75,4 +75,4 @@ CHECKLIST = """
75
75
  - [ ] 是否适当使用中间件
76
76
  - [ ] 路由定义是否合理
77
77
  - [ ] MVC 结构是否清晰
78
- """
78
+ """
@@ -54,4 +54,4 @@ CHECKLIST = """
54
54
  - [ ] 是否遵循 SOLID 原则
55
55
  - [ ] 是否避免了过度工程
56
56
  - [ ] 是否实现了适当的抽象
57
- """
57
+ """
@@ -105,4 +105,4 @@ CHECKLIST = """
105
105
  - [ ] 是否有示例或者教程
106
106
  - [ ] 是否有 CHANGELOG 记录变更
107
107
  - [ ] API 参数和返回值是否有文档描述
108
- """
108
+ """
@@ -56,4 +56,4 @@ CHECKLIST = """
56
56
  ### 资源管理
57
57
  - [ ] 资源是否通过 Drop trait 正确释放
58
58
  - [ ] 是否避免了资源泄漏
59
- """
59
+ """
@@ -73,4 +73,4 @@ CHECKLIST = """
73
73
  - [ ] 是否有自动化测试
74
74
  - [ ] 测试是否涵盖主要功能和错误路径
75
75
  - [ ] 是否可以使用 mock 替换外部依赖
76
- """
76
+ """
@@ -70,4 +70,4 @@ CHECKLIST = """
70
70
  - [ ] 是否验证了结果集的正确性
71
71
  - [ ] 是否测试了性能和负载
72
72
  - [ ] 是否有数据恢复测试
73
- """
73
+ """
@@ -75,4 +75,4 @@ CHECKLIST = """
75
75
  - [ ] 复杂逻辑是否有注释说明
76
76
  - [ ] 公开 API 是否有文档注释
77
77
  - [ ] 注释是否与代码保持同步
78
- """
78
+ """
@@ -95,4 +95,4 @@ CHECKLIST = """
95
95
  - [ ] 是否有清晰的 README 或风格指南
96
96
  - [ ] CSS 变量是否有适当的命名和注释
97
97
  - [ ] 不明显的布局决策是否有解释
98
- """
98
+ """