@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/tools.shell.js
CHANGED
|
@@ -651,9 +651,10 @@ function makeRealShellTool(options) {
|
|
|
651
651
|
timeoutMs: { type: "number", description: "wall-clock cap for THIS command, overriding the default (clamped to the tool max)" }
|
|
652
652
|
}
|
|
653
653
|
},
|
|
654
|
-
async run({ command, background, timeoutMs: askedTimeoutMs }, ctx) {
|
|
654
|
+
async run({ command, background, timeoutMs: askedTimeoutMs, timeout: aliasTimeout }, ctx) {
|
|
655
655
|
const cmd = String(command ?? "");
|
|
656
|
-
const
|
|
656
|
+
const asked = Number.isFinite(askedTimeoutMs) ? askedTimeoutMs : aliasTimeout;
|
|
657
|
+
const timeoutMs = Number.isFinite(asked) && Number(asked) > 0 ? Math.min(Number(asked), maxTimeoutMs) : defaultTimeoutMs;
|
|
657
658
|
if (!cmd.trim()) return "[exit 1] empty command";
|
|
658
659
|
if (background) {
|
|
659
660
|
if (!options.registry) return "Error: background execution is not enabled in this host (no job registry).";
|