@dexto/tools-process 1.5.3 → 1.5.4

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.
@@ -46,7 +46,51 @@ const BashExecInputSchema = import_zod.z.object({
46
46
  function createBashExecTool(processService) {
47
47
  return {
48
48
  id: "bash_exec",
49
- description: "Execute a shell command with 2-minute default timeout. Returns stdout, stderr, exit code, and duration. For long-running commands (servers, watchers, npm run dev), MUST use run_in_background=true (use bash_output to retrieve results later). Commands ending with & are blocked - use run_in_background instead. Requires approval (with pattern-based session memory). Always quote file paths with spaces. Security: dangerous commands are blocked, injection attempts are detected.",
49
+ description: `Execute a shell command in the project root directory.
50
+
51
+ IMPORTANT: This tool is for terminal operations like git, npm, docker, etc. Do NOT use it for file operations - use the specialized tools instead:
52
+ - File search: Use glob_files (NOT find or ls)
53
+ - Content search: Use grep_content (NOT grep or rg)
54
+ - Read files: Use read_file (NOT cat/head/tail)
55
+ - Edit files: Use edit_file (NOT sed/awk)
56
+ - Write files: Use write_file (NOT echo/cat with heredoc)
57
+
58
+ Before executing the command, follow these steps:
59
+
60
+ 1. Directory Verification:
61
+ - If the command will create new directories or files, first use ls to verify the parent directory exists and is the correct location
62
+ - For example, before running "mkdir foo/bar", first use ls foo to check that "foo" exists
63
+
64
+ 2. Command Execution:
65
+ - Always quote file paths that contain spaces with double quotes
66
+ - Examples of proper quoting:
67
+ - cd "/Users/name/My Documents" (correct)
68
+ - cd /Users/name/My Documents (incorrect - will fail)
69
+ - python "/path/with spaces/script.py" (correct)
70
+ - python /path/with spaces/script.py (incorrect - will fail)
71
+
72
+ Usage notes:
73
+ - The command argument is required.
74
+ - You can specify an optional timeout in milliseconds (max 600000ms / 10 minutes). Default is 120000ms (2 minutes).
75
+ - The description parameter should be a clear, concise summary of what the command does (5-10 words for simple commands, more context for complex commands).
76
+ - If the output exceeds 1MB, it will be truncated.
77
+ - You can use run_in_background=true to run the command in the background. Use this when you don't need the result immediately. You do not need to check the output right away - use bash_output to retrieve results later. Commands ending with & are blocked; use run_in_background instead.
78
+
79
+ When issuing multiple commands:
80
+ - If the commands are independent and can run in parallel, make multiple bash_exec calls in a single response.
81
+ - If the commands depend on each other and must run sequentially, use a single call with && to chain them (e.g., git add . && git commit -m "msg" && git push).
82
+ - Use ; only when you need to run commands sequentially but don't care if earlier commands fail.
83
+ - Do NOT use newlines to separate commands (newlines are ok in quoted strings).
84
+
85
+ Try to maintain your working directory throughout the session by using absolute paths and avoiding usage of cd. You may use cd if the user explicitly requests it.
86
+ - GOOD: pnpm test
87
+ - GOOD: pytest /absolute/path/to/tests
88
+ - BAD: cd /project && pnpm test
89
+ - BAD: cd /some/path && command
90
+
91
+ Each command runs in a fresh shell, so cd does not persist between calls.
92
+
93
+ Security: Dangerous commands are blocked. Injection attempts are detected. Requires approval with pattern-based session memory.`,
50
94
  inputSchema: BashExecInputSchema,
51
95
  /**
52
96
  * Generate preview for approval UI - shows the command to be executed
@@ -13,7 +13,51 @@ const BashExecInputSchema = z.object({
13
13
  function createBashExecTool(processService) {
14
14
  return {
15
15
  id: "bash_exec",
16
- description: "Execute a shell command with 2-minute default timeout. Returns stdout, stderr, exit code, and duration. For long-running commands (servers, watchers, npm run dev), MUST use run_in_background=true (use bash_output to retrieve results later). Commands ending with & are blocked - use run_in_background instead. Requires approval (with pattern-based session memory). Always quote file paths with spaces. Security: dangerous commands are blocked, injection attempts are detected.",
16
+ description: `Execute a shell command in the project root directory.
17
+
18
+ IMPORTANT: This tool is for terminal operations like git, npm, docker, etc. Do NOT use it for file operations - use the specialized tools instead:
19
+ - File search: Use glob_files (NOT find or ls)
20
+ - Content search: Use grep_content (NOT grep or rg)
21
+ - Read files: Use read_file (NOT cat/head/tail)
22
+ - Edit files: Use edit_file (NOT sed/awk)
23
+ - Write files: Use write_file (NOT echo/cat with heredoc)
24
+
25
+ Before executing the command, follow these steps:
26
+
27
+ 1. Directory Verification:
28
+ - If the command will create new directories or files, first use ls to verify the parent directory exists and is the correct location
29
+ - For example, before running "mkdir foo/bar", first use ls foo to check that "foo" exists
30
+
31
+ 2. Command Execution:
32
+ - Always quote file paths that contain spaces with double quotes
33
+ - Examples of proper quoting:
34
+ - cd "/Users/name/My Documents" (correct)
35
+ - cd /Users/name/My Documents (incorrect - will fail)
36
+ - python "/path/with spaces/script.py" (correct)
37
+ - python /path/with spaces/script.py (incorrect - will fail)
38
+
39
+ Usage notes:
40
+ - The command argument is required.
41
+ - You can specify an optional timeout in milliseconds (max 600000ms / 10 minutes). Default is 120000ms (2 minutes).
42
+ - The description parameter should be a clear, concise summary of what the command does (5-10 words for simple commands, more context for complex commands).
43
+ - If the output exceeds 1MB, it will be truncated.
44
+ - You can use run_in_background=true to run the command in the background. Use this when you don't need the result immediately. You do not need to check the output right away - use bash_output to retrieve results later. Commands ending with & are blocked; use run_in_background instead.
45
+
46
+ When issuing multiple commands:
47
+ - If the commands are independent and can run in parallel, make multiple bash_exec calls in a single response.
48
+ - If the commands depend on each other and must run sequentially, use a single call with && to chain them (e.g., git add . && git commit -m "msg" && git push).
49
+ - Use ; only when you need to run commands sequentially but don't care if earlier commands fail.
50
+ - Do NOT use newlines to separate commands (newlines are ok in quoted strings).
51
+
52
+ Try to maintain your working directory throughout the session by using absolute paths and avoiding usage of cd. You may use cd if the user explicitly requests it.
53
+ - GOOD: pnpm test
54
+ - GOOD: pytest /absolute/path/to/tests
55
+ - BAD: cd /project && pnpm test
56
+ - BAD: cd /some/path && command
57
+
58
+ Each command runs in a fresh shell, so cd does not persist between calls.
59
+
60
+ Security: Dangerous commands are blocked. Injection attempts are detected. Requires approval with pattern-based session memory.`,
17
61
  inputSchema: BashExecInputSchema,
18
62
  /**
19
63
  * Generate preview for approval UI - shows the command to be executed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/tools-process",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Process tools provider for Dexto agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "zod": "^3.25.0",
23
- "@dexto/core": "1.5.3"
23
+ "@dexto/core": "1.5.4"
24
24
  },
25
25
  "devDependencies": {
26
26
  "tsup": "^8.0.0",