@livx.cc/agentx 0.99.38 → 0.99.39
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/dist/cli.js +3 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/tools.shell.js +3 -2
- package/dist/tools.shell.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1986,9 +1986,10 @@ function makeRealShellTool(options) {
|
|
|
1986
1986
|
timeoutMs: { type: "number", description: "wall-clock cap for THIS command, overriding the default (clamped to the tool max)" }
|
|
1987
1987
|
}
|
|
1988
1988
|
},
|
|
1989
|
-
async run({ command, background, timeoutMs: askedTimeoutMs }, ctx) {
|
|
1989
|
+
async run({ command, background, timeoutMs: askedTimeoutMs, timeout: aliasTimeout }, ctx) {
|
|
1990
1990
|
const cmd = String(command ?? "");
|
|
1991
|
-
const
|
|
1991
|
+
const asked = Number.isFinite(askedTimeoutMs) ? askedTimeoutMs : aliasTimeout;
|
|
1992
|
+
const timeoutMs = Number.isFinite(asked) && Number(asked) > 0 ? Math.min(Number(asked), maxTimeoutMs) : defaultTimeoutMs;
|
|
1992
1993
|
if (!cmd.trim()) return "[exit 1] empty command";
|
|
1993
1994
|
if (background) {
|
|
1994
1995
|
if (!options.registry) return "Error: background execution is not enabled in this host (no job registry).";
|