@myagentroam/agent 0.9.160 → 0.9.162

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.
@@ -6,7 +6,6 @@ export declare const TOOL_EXECUTION_LIMITS: Readonly<{
6
6
  readBatchConcurrency: 4;
7
7
  readMaxBatchBytes: 4194304;
8
8
  viewImageMaxBytes: 20971520;
9
- execDefaultTimeoutMs: 120000;
10
9
  execMaxTimeoutMs: 3600000;
11
10
  execDefaultYieldMs: 10000;
12
11
  execMaxYieldMs: 30000;
@@ -6,7 +6,6 @@ export const TOOL_EXECUTION_LIMITS = Object.freeze({
6
6
  readBatchConcurrency: 4,
7
7
  readMaxBatchBytes: 4_194_304,
8
8
  viewImageMaxBytes: 20_971_520,
9
- execDefaultTimeoutMs: 120_000,
10
9
  execMaxTimeoutMs: 3_600_000,
11
10
  execDefaultYieldMs: 10_000,
12
11
  execMaxYieldMs: 30_000,
@@ -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: { type: 'integer', minimum: 1, maximum: TOOL_EXECUTION_LIMITS.execMaxTimeoutMs },
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
- managed.timer = setTimeout(() => {
180
- void this.#terminate(managed, true).then(() => this.#retainCompleted(id, managed));
181
- }, Math.min(input.timeoutMs ?? TOOL_EXECUTION_LIMITS.execDefaultTimeoutMs, TOOL_EXECUTION_LIMITS.execMaxTimeoutMs));
182
- managed.timer.unref();
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')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/agent",
3
- "version": "0.9.160",
3
+ "version": "0.9.162",
4
4
  "description": "Embeddable MAR coding agent SDK and CLI.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",