bash-tool 0.1.5 → 1.0.1

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 (2) hide show
  1. package/README.md +43 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -35,6 +35,49 @@ const result = await agent.generate({
35
35
  });
36
36
  ```
37
37
 
38
+ ## Tools
39
+
40
+ The `tools` object contains three tools that can be used by AI agents:
41
+
42
+ ### `bash`
43
+
44
+ Execute bash commands in the sandbox environment. For analysis agents, this may be the only tool you need to give to the agent.
45
+
46
+ **Input:**
47
+
48
+ - `command` (string): The bash command to execute
49
+
50
+ **Returns:**
51
+
52
+ - `stdout` (string): Standard output from the command
53
+ - `stderr` (string): Standard error from the command
54
+ - `exitCode` (number): Exit code of the command
55
+
56
+ ### `readFile`
57
+
58
+ Read the contents of a file from the sandbox.
59
+
60
+ **Input:**
61
+
62
+ - `path` (string): The path to the file to read
63
+
64
+ **Returns:**
65
+
66
+ - `content` (string): The file contents
67
+
68
+ ### `writeFile`
69
+
70
+ Write content to a file in the sandbox. Creates parent directories if needed.
71
+
72
+ **Input:**
73
+
74
+ - `path` (string): The path where the file should be written
75
+ - `content` (string): The content to write to the file
76
+
77
+ **Returns:**
78
+
79
+ - `success` (boolean): `true` if the write succeeded
80
+
38
81
  ## Advanced Usage
39
82
 
40
83
  ### Upload a local directory
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.1.5",
6
+ "version": "1.0.1",
7
7
  "description": "Generic bash tool for AI agents, compatible with AI SDK",
8
8
  "type": "module",
9
9
  "main": "dist/index.js",