From ac76c5aba7a872933e3e5c4b7f34ec3dbfda58c5 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Thu, 23 Apr 2026 15:44:41 -0700 Subject: [PATCH] docs(tools): convert exec and image-generation params to ParamField --- docs/tools/exec.md | 59 +++++++++++++++++++++++++++------- docs/tools/image-generation.md | 51 ++++++++++++++++++++++------- 2 files changed, 86 insertions(+), 24 deletions(-) diff --git a/docs/tools/exec.md b/docs/tools/exec.md index 2f21e98aa25..8c910568fb4 100644 --- a/docs/tools/exec.md +++ b/docs/tools/exec.md @@ -12,18 +12,53 @@ Background sessions are scoped per agent; `process` only sees sessions from the ## Parameters -- `command` (required) -- `workdir` (defaults to cwd) -- `env` (key/value overrides) -- `yieldMs` (default 10000): auto-background after delay -- `background` (bool): background immediately -- `timeout` (seconds, default 1800): kill on expiry -- `pty` (bool): run in a pseudo-terminal when available (TTY-only CLIs, coding agents, terminal UIs) -- `host` (`auto | sandbox | gateway | node`): where to execute -- `security` (`deny | allowlist | full`): enforcement mode for `gateway`/`node` -- `ask` (`off | on-miss | always`): approval prompts for `gateway`/`node` -- `node` (string): node id/name for `host=node` -- `elevated` (bool): request elevated mode (escape the sandbox onto the configured host path); `security=full` is only forced when elevated resolves to `full` + +Shell command to run. + + + +Working directory for the command. + + + +Key/value environment overrides merged on top of the inherited environment. + + + +Auto-background the command after this delay (ms). + + + +Background the command immediately instead of waiting for `yieldMs`. + + + +Kill the command after this many seconds. + + + +Run in a pseudo-terminal when available. Use for TTY-only CLIs, coding agents, and terminal UIs. + + + +Where to execute. `auto` resolves to `sandbox` when a sandbox runtime is active and `gateway` otherwise. + + + +Enforcement mode for `gateway` / `node` execution. + + + +Approval prompt behavior for `gateway` / `node` execution. + + + +Node id/name when `host=node`. + + + +Request elevated mode — escape the sandbox onto the configured host path. `security=full` is forced only when elevated resolves to `full`. + Notes: diff --git a/docs/tools/image-generation.md b/docs/tools/image-generation.md index 18c66645533..28e3e597dbd 100644 --- a/docs/tools/image-generation.md +++ b/docs/tools/image-generation.md @@ -60,18 +60,45 @@ Use `action: "list"` to inspect available providers and models at runtime: ## Tool parameters -| Parameter | Type | Description | -| ------------- | -------- | ------------------------------------------------------------------------------------- | -| `prompt` | string | Image generation prompt (required for `action: "generate"`) | -| `action` | string | `"generate"` (default) or `"list"` to inspect providers | -| `model` | string | Provider/model override, e.g. `openai/gpt-image-2` | -| `image` | string | Single reference image path or URL for edit mode | -| `images` | string[] | Multiple reference images for edit mode (up to 5) | -| `size` | string | Size hint: `1024x1024`, `1536x1024`, `1024x1536`, `2048x2048`, `3840x2160` | -| `aspectRatio` | string | Aspect ratio: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9` | -| `resolution` | string | Resolution hint: `1K`, `2K`, or `4K` | -| `count` | number | Number of images to generate (1–4) | -| `filename` | string | Output filename hint | + +Image generation prompt. Required for `action: "generate"`. + + + +Use `"list"` to inspect available providers and models at runtime. + + + +Provider/model override, e.g. `openai/gpt-image-2`. + + + +Single reference image path or URL for edit mode. + + + +Multiple reference images for edit mode (up to 5). + + + +Size hint: `1024x1024`, `1536x1024`, `1024x1536`, `2048x2048`, `3840x2160`. + + + +Aspect ratio: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`. + + + +Resolution hint. + + + +Number of images to generate (1–4). + + + +Output filename hint. + Not all providers support all parameters. When a fallback provider supports a nearby geometry option instead of the exact requested one, OpenClaw remaps to the closest supported size, aspect ratio, or resolution before submission. Truly unsupported overrides are still reported in the tool result.