bash-tool 1.0.0 → 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.
- package/README.md +43 -0
- 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
|