feat: change --timeout from milliseconds to seconds

Accept seconds (including decimals like 0.5) instead of milliseconds
for the --timeout flag. Converts to ms internally. Default is now 10
(seconds) instead of 10000. Error messages display seconds.

Update AGENTS.md, tests, and skill docs to match.
This commit is contained in:
2026-05-02 20:10:20 -04:00
parent 6adb5111de
commit d02df19469
3 changed files with 13 additions and 13 deletions

View File

@@ -254,7 +254,7 @@ test(
assert.equal(output.ok, false);
assert.equal(output.error.code, "INVALID_OPTION");
assert.match(output.error.message, /--timeout must be a positive integer/);
assert.match(output.error.message, /--timeout must be a positive number/);
assert.equal(typeof output.elapsedMs, "number");
},
);
@@ -290,7 +290,7 @@ test("wait-js timeout returns wait timeout", ["wait", "errors"], () => {
dataHtml("<title>Hello</title>"),
"--no-reader",
"--wait-js=return false",
"--timeout=1",
"--timeout=0.001",
]);
assert.equal(output.ok, false);