fix(agents): document process poll cap · openclaw/openclaw@1825f61
steipete
·
2026-04-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,6 +8,7 @@ import {
|
8 | 8 | } from "./bash-process-registry.js"; |
9 | 9 | import { createProcessSessionFixture } from "./bash-process-registry.test-helpers.js"; |
10 | 10 | import { createProcessTool } from "./bash-tools.process.js"; |
| 11 | +import { processSchema } from "./bash-tools.schemas.js"; |
11 | 12 | |
12 | 13 | afterEach(() => { |
13 | 14 | resetProcessRegistryForTests(); |
@@ -125,6 +126,13 @@ test("process poll clamps long waits to 30 seconds", async () => {
|
125 | 126 | } |
126 | 127 | }); |
127 | 128 | |
| 129 | +test("process poll schema advertises the 30 second wait cap", () => { |
| 130 | +const timeoutSchema = processSchema.properties.timeout; |
| 131 | +expect(timeoutSchema).toMatchObject({ |
| 132 | +description: expect.stringContaining("max 30000 ms"), |
| 133 | +}); |
| 134 | +}); |
| 135 | + |
128 | 136 | test("process poll aborts while waiting for completion", async () => { |
129 | 137 | vi.useFakeTimers(); |
130 | 138 | try { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -64,7 +64,8 @@ export const processSchema = Type.Object({
|
64 | 64 | limit: Type.Optional(Type.Number({ description: "Log length" })), |
65 | 65 | timeout: Type.Optional( |
66 | 66 | Type.Number({ |
67 | | -description: "For poll: wait up to this many milliseconds before returning", |
| 67 | +description: |
| 68 | +"For poll: wait up to this many milliseconds before returning; max 30000 ms, higher values are clamped to 30000", |
68 | 69 | minimum: 0, |
69 | 70 | }), |
70 | 71 | ), |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。