jarvis-ai-assistant 0.1.2__py3-none-any.whl → 0.1.3__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 CHANGED
@@ -1,3 +1,3 @@
1
1
  """Jarvis AI Assistant"""
2
2
 
3
- __version__ = "0.1.2"
3
+ __version__ = "0.1.3"
jarvis/tools/base.py CHANGED
@@ -117,6 +117,7 @@ class ToolRegistry:
117
117
  def tool_help_text(self) -> str:
118
118
  """返回所有工具的帮助文本"""
119
119
  return """Available Tools:
120
+
120
121
  1. search: Search for information using DuckDuckGo
121
122
  2. read_webpage: Extract content from webpages
122
123
  3. execute_python: Run Python code with dependency management
@@ -152,29 +153,59 @@ Output Guidelines:
152
153
  - Combine similar information
153
154
  - Skip redundant context
154
155
 
155
- Tool Usage Examples:
156
+ Tool Call Format Requirements:
157
+ 1. MUST use exact format:
156
158
  <tool_call>
157
159
  {
158
- "name": "search",
160
+ "name": "tool_name",
159
161
  "arguments": {
160
- "query": "Python GIL",
161
- "max_results": 2 # Limit results to save context
162
+ "param1": "value1"
162
163
  }
163
164
  }
164
165
  </tool_call>
165
166
 
166
- <tool_call>
167
- {
168
- "name": "read_webpage",
169
- "arguments": {
170
- "url": "https://example.com",
171
- "extract_type": "text" # Only get main content
172
- }
173
- }
174
- </tool_call>
167
+ 2. Format Rules:
168
+ - NO comments or explanations inside tool_call blocks
169
+ - NO additional text or formatting within JSON
170
+ - NO markdown or other markup inside tool_call
171
+ - ONLY valid JSON allowed in arguments
172
+ - ALL arguments must match tool parameters exactly
173
+
174
+ 3. Invalid Examples (DO NOT USE):
175
+ ❌ <tool_call>
176
+ {
177
+ "name": "search", # Search tool
178
+ "arguments": {
179
+ "query": "Python GIL" // Search query
180
+ }
181
+ }
182
+ </tool_call>
183
+
184
+ ❌ <tool_call>
185
+ ```json
186
+ {
187
+ "name": "search",
188
+ "arguments": {
189
+ "query": "Python GIL"
190
+ }
191
+ }
192
+ ```
193
+ </tool_call>
194
+
195
+ 4. Valid Example:
196
+ ✅ <tool_call>
197
+ {
198
+ "name": "search",
199
+ "arguments": {
200
+ "query": "Python GIL",
201
+ "max_results": 2
202
+ }
203
+ }
204
+ </tool_call>
175
205
 
176
206
  Remember:
177
207
  1. Quality over quantity
178
208
  2. Relevance over completeness
179
209
  3. Conciseness over verbosity
180
- 4. Context efficiency is crucial"""
210
+ 4. Context efficiency is crucial
211
+ 5. STRICT adherence to tool call format"""
jarvis/tools/shell.py CHANGED
@@ -4,13 +4,27 @@ from ..utils import PrettyOutput, OutputType
4
4
 
5
5
  class ShellTool:
6
6
  name = "execute_shell"
7
- description = "Execute shell commands and return the results"
7
+ description = """Execute shell commands and return the results.
8
+ Guidelines for output optimization:
9
+ 1. Use grep/awk/sed to filter output when possible
10
+ 2. Avoid listing all files/dirs unless specifically needed
11
+ 3. Prefer -q/--quiet flags when status is all that's needed
12
+ 4. Use head/tail to limit long outputs
13
+ 5. Redirect stderr to /dev/null for noisy commands
14
+
15
+ Examples of optimized commands:
16
+ - 'ls -l file.txt' instead of 'ls -l'
17
+ - 'grep -c pattern file' instead of 'grep pattern file'
18
+ - 'ps aux | grep process | head -n 5' instead of 'ps aux'
19
+ - 'command 2>/dev/null' to suppress error messages
20
+ - 'df -h . ' instead of 'df -h'
21
+ """
8
22
  parameters = {
9
23
  "type": "object",
10
24
  "properties": {
11
25
  "command": {
12
26
  "type": "string",
13
- "description": "Shell command to execute"
27
+ "description": "Shell command to execute (use filters/limits for large outputs)"
14
28
  },
15
29
  "timeout": {
16
30
  "type": "integer",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jarvis-ai-assistant
3
- Version: 0.1.2
3
+ Version: 0.1.3
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
@@ -1,5 +1,5 @@
1
1
  jarvis/.jarvis,sha256=S4ZMmLqlVLHAPmnwHFQ3vYt0gnDFp-KQRH4okBh8Hpw,209
2
- jarvis/__init__.py,sha256=V3Qwm3k_WFeGUNccLbLJuCyWQyXYnRUkY5-KlBUm4UU,49
2
+ jarvis/__init__.py,sha256=rLUKzHgrbk82WAMvg4u4GlFDRal1Yw3XpMg_741mQXw,49
3
3
  jarvis/agent.py,sha256=hEatrIothG6C_RuOsygZz4ez1aF1EycnUPwY2Krwiwk,4092
4
4
  jarvis/main.py,sha256=wAeeGoRq8fFiTWUCQ31MYVeU9o6SZ48ORUow0jlMJJE,5259
5
5
  jarvis/models.py,sha256=ZQAyc39e_UsNmHkME6ATp6053safQ7Gog-oWwETsrMM,4415
@@ -10,12 +10,12 @@ jarvis/__pycache__/models.cpython-313.pyc,sha256=fot2VOV0lgODg4b_WuD-kkq-g7uZGLu
10
10
  jarvis/__pycache__/tools.cpython-313.pyc,sha256=lAD4LrnnWzNZQmHXGfZ_2l7oskOpr2_2OC-gdFhxQY8,33933
11
11
  jarvis/__pycache__/utils.cpython-313.pyc,sha256=o8Fubq8Dcrvv3ATzQ9BnZoZjQmU3_FNPrfTt0ANdKdI,5804
12
12
  jarvis/tools/__init__.py,sha256=FNF5X32UzKvlT08-hPz7-7vcIyqqMngQYj36LXyNbV0,553
13
- jarvis/tools/base.py,sha256=xdZaoqxCOYVAwBmof_zqICg5ixb5-ksX-XbNXJw1O7k,5938
13
+ jarvis/tools/base.py,sha256=Y1XInc2skUVZYZzLRPlCpH3JyY3pk1XNZgys6MSCudQ,6586
14
14
  jarvis/tools/file_ops.py,sha256=05Vc4u-NGMjLD15WI52eL_nt_RyYt-Z_cXJnnBepf-c,3781
15
15
  jarvis/tools/python_script.py,sha256=_eK8LqNs-Mz50zdcgwbjdd8-qAeOl6kJ_qRDvWawGMw,5006
16
16
  jarvis/tools/rag.py,sha256=eBrn1fdqy-nd2nR0b4oH1EQpthTYVen-sYDhC5Ypl38,5647
17
17
  jarvis/tools/search.py,sha256=dyJmeP_s2tWv5KQejOl-TuVF12B6SXViiXEyTemD1Wo,1412
18
- jarvis/tools/shell.py,sha256=uGqwUGmqFg1cJkyTg7zyPk3jRwEr-woKTmqcTKdbbg8,1979
18
+ jarvis/tools/shell.py,sha256=VhEqEdoUGIRW6CT6F0YNMAlzJxpHcsKS9hSS0VC3ezw,2644
19
19
  jarvis/tools/user_confirmation.py,sha256=p0JverifHJfnALeIhtKtaVBBVEGkgSpUzT-PSycG4NY,1850
20
20
  jarvis/tools/user_interaction.py,sha256=xOaoYsCKTa9-K3mg5tsu1zegn1HKcO40k2aJ3VygZqM,3073
21
21
  jarvis/tools/webpage.py,sha256=UTEomu5j7jbOw8c5az2jsjv5E7LeokWKj1QahvZO7xc,3077
@@ -29,8 +29,8 @@ jarvis/tools/__pycache__/shell.cpython-313.pyc,sha256=Xtqt-LzMRfsCXeCE7QxFY8TR8X
29
29
  jarvis/tools/__pycache__/user_confirmation.cpython-313.pyc,sha256=wK3Ev10lHSUSRvoYmi7A0GzxYkzU-C4Wfhs5qW_HBqs,2271
30
30
  jarvis/tools/__pycache__/user_interaction.cpython-313.pyc,sha256=RuVZ-pmiPBDywY3efgXSfohMAciC1avMGPmBK5qlnew,3305
31
31
  jarvis/tools/__pycache__/webpage.cpython-313.pyc,sha256=VcpkaV8IyOOtebedXjn8ybjr8AglU-3-Cs80yzE4FYo,3628
32
- jarvis_ai_assistant-0.1.2.dist-info/METADATA,sha256=0EX8k3LdrzeEWHqRTHlguT80fPxHLbVtpY65f1kMhOk,3675
33
- jarvis_ai_assistant-0.1.2.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
34
- jarvis_ai_assistant-0.1.2.dist-info/entry_points.txt,sha256=iKu7OMfew9dtfGhW71gIMTg4wvafuPqKb4wyQOnMAGU,44
35
- jarvis_ai_assistant-0.1.2.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
36
- jarvis_ai_assistant-0.1.2.dist-info/RECORD,,
32
+ jarvis_ai_assistant-0.1.3.dist-info/METADATA,sha256=eVKO4jecgKkHOIRUXZGvfvi5KiR9CGaZuQLhDR9W3NY,3675
33
+ jarvis_ai_assistant-0.1.3.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
34
+ jarvis_ai_assistant-0.1.3.dist-info/entry_points.txt,sha256=iKu7OMfew9dtfGhW71gIMTg4wvafuPqKb4wyQOnMAGU,44
35
+ jarvis_ai_assistant-0.1.3.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
36
+ jarvis_ai_assistant-0.1.3.dist-info/RECORD,,