@myagentroam/agent 0.9.160 → 0.9.161
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.
|
@@ -53,7 +53,12 @@ export const execToolDefinition = {
|
|
|
53
53
|
type: 'string',
|
|
54
54
|
description: 'Optional relative/absolute start directory; defaults to workspace. Command-internal relative paths resolve from this directory.'
|
|
55
55
|
},
|
|
56
|
-
timeoutMs: {
|
|
56
|
+
timeoutMs: {
|
|
57
|
+
type: 'integer',
|
|
58
|
+
minimum: 1,
|
|
59
|
+
maximum: TOOL_EXECUTION_LIMITS.execMaxTimeoutMs,
|
|
60
|
+
description: 'Optional process lifetime limit in milliseconds. Omitted means no process timeout; yieldMs only controls waiting.'
|
|
61
|
+
},
|
|
57
62
|
yieldMs: {
|
|
58
63
|
type: 'integer',
|
|
59
64
|
minimum: 0,
|
|
@@ -176,10 +181,12 @@ export class ExecTool {
|
|
|
176
181
|
...(signal === undefined ? {} : { signal })
|
|
177
182
|
};
|
|
178
183
|
}, owner?.sessionId, false);
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
184
|
+
if (input.timeoutMs !== undefined) {
|
|
185
|
+
managed.timer = setTimeout(() => {
|
|
186
|
+
void this.#terminate(managed, true).then(() => this.#retainCompleted(id, managed));
|
|
187
|
+
}, Math.min(input.timeoutMs, TOOL_EXECUTION_LIMITS.execMaxTimeoutMs));
|
|
188
|
+
managed.timer.unref();
|
|
189
|
+
}
|
|
183
190
|
await waitForExitOrDelay(managed.settled, Math.min(input.yieldMs ?? TOOL_EXECUTION_LIMITS.execDefaultYieldMs, TOOL_EXECUTION_LIMITS.execMaxYieldMs), signal);
|
|
184
191
|
const result = this.#result(id, managed);
|
|
185
192
|
if (managed.status !== 'running')
|