@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/cli.js
CHANGED
|
@@ -2150,9 +2150,10 @@ function makeRealShellTool(options) {
|
|
|
2150
2150
|
timeoutMs: { type: "number", description: "wall-clock cap for THIS command, overriding the default (clamped to the tool max)" }
|
|
2151
2151
|
}
|
|
2152
2152
|
},
|
|
2153
|
-
async run({ command, background, timeoutMs: askedTimeoutMs }, ctx) {
|
|
2153
|
+
async run({ command, background, timeoutMs: askedTimeoutMs, timeout: aliasTimeout }, ctx) {
|
|
2154
2154
|
const cmd = String(command ?? "");
|
|
2155
|
-
const
|
|
2155
|
+
const asked = Number.isFinite(askedTimeoutMs) ? askedTimeoutMs : aliasTimeout;
|
|
2156
|
+
const timeoutMs = Number.isFinite(asked) && Number(asked) > 0 ? Math.min(Number(asked), maxTimeoutMs) : defaultTimeoutMs;
|
|
2156
2157
|
if (!cmd.trim()) return "[exit 1] empty command";
|
|
2157
2158
|
if (background) {
|
|
2158
2159
|
if (!options.registry) return "Error: background execution is not enabled in this host (no job registry).";
|