traw 0.1.1 → 0.1.2
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/package.json +1 -1
- package/src/index.ts +6 -7
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ const defaultConfig: AgentConfig = {
|
|
|
6
6
|
moUrl: "http://localhost:8080",
|
|
7
7
|
model: "glm-4.7",
|
|
8
8
|
headless: false,
|
|
9
|
-
recordVideo:
|
|
9
|
+
recordVideo: false,
|
|
10
10
|
maxSteps: 20,
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -34,8 +34,8 @@ async function main() {
|
|
|
34
34
|
config.headless = true
|
|
35
35
|
continue
|
|
36
36
|
}
|
|
37
|
-
if (arg === "--
|
|
38
|
-
config.recordVideo =
|
|
37
|
+
if (arg === "--video") {
|
|
38
|
+
config.recordVideo = true
|
|
39
39
|
continue
|
|
40
40
|
}
|
|
41
41
|
if (arg.startsWith("--steps=")) {
|
|
@@ -81,21 +81,20 @@ async function main() {
|
|
|
81
81
|
|
|
82
82
|
function printHelp() {
|
|
83
83
|
console.log(`
|
|
84
|
-
|
|
84
|
+
traw - AI browser agent
|
|
85
85
|
|
|
86
86
|
Usage:
|
|
87
87
|
traw run "your goal here"
|
|
88
|
-
traw run # interactive mode (coming soon)
|
|
89
88
|
|
|
90
89
|
Options:
|
|
91
90
|
--headless run without visible browser
|
|
92
|
-
--
|
|
91
|
+
--video enable video recording
|
|
93
92
|
--steps=N max steps (default: 20)
|
|
94
93
|
--mo=URL mo server url (default: http://localhost:8080)
|
|
95
94
|
|
|
96
95
|
Examples:
|
|
97
96
|
traw run "find the weather in Moscow"
|
|
98
|
-
traw run "search for bun.js documentation"
|
|
97
|
+
traw run --video "search for bun.js documentation"
|
|
99
98
|
`)
|
|
100
99
|
}
|
|
101
100
|
|