fix: rename bash tool to exec (#748) (thanks @myfunc)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
---
|
||||
summary: "Elevated bash mode and /elevated directives"
|
||||
summary: "Elevated exec mode and /elevated directives"
|
||||
read_when:
|
||||
- Adjusting elevated mode defaults, allowlists, or slash command behavior
|
||||
---
|
||||
# Elevated Mode (/elevated directives)
|
||||
|
||||
## What it does
|
||||
- Elevated mode allows the bash tool to run with elevated privileges when the feature is available and the sender is approved.
|
||||
- Elevated mode allows the exec tool to run with elevated privileges when the feature is available and the sender is approved.
|
||||
- **Optional for sandboxed agents**: elevated only changes behavior when the agent is running in a sandbox. If the agent already runs unsandboxed, elevated is effectively a no-op.
|
||||
- Directive forms: `/elevated on`, `/elevated off`, `/elev on`, `/elev off`.
|
||||
- Only `on|off` are accepted; anything else returns a hint and does not change state.
|
||||
@@ -16,16 +16,16 @@ read_when:
|
||||
- **Per-session state**: `/elevated on|off` sets the elevated level for the current session key.
|
||||
- **Inline directive**: `/elevated on` inside a message applies to that message only.
|
||||
- **Groups**: In group chats, elevated directives are only honored when the agent is mentioned. Command-only messages that bypass mention requirements are treated as mentioned.
|
||||
- **Host execution**: elevated runs `bash` on the host (bypasses sandbox).
|
||||
- **Unsandboxed agents**: when there is no sandbox to bypass, elevated does not change where `bash` runs.
|
||||
- **Tool policy still applies**: if `bash` is denied by tool policy, elevated cannot be used.
|
||||
- **Host execution**: elevated runs `exec` on the host (bypasses sandbox).
|
||||
- **Unsandboxed agents**: when there is no sandbox to bypass, elevated does not change where `exec` runs.
|
||||
- **Tool policy still applies**: if `exec` is denied by tool policy, elevated cannot be used.
|
||||
|
||||
Note:
|
||||
- Sandbox on: `/elevated on` runs that `bash` command on the host.
|
||||
- Sandbox on: `/elevated on` runs that `exec` command on the host.
|
||||
- Sandbox off: `/elevated on` does not change execution (already on host).
|
||||
|
||||
## When elevated matters
|
||||
- Only impacts `bash` when the agent is running sandboxed (it drops the sandbox for that command).
|
||||
- Only impacts `exec` when the agent is running sandboxed (it drops the sandbox for that command).
|
||||
- For unsandboxed agents, elevated does not change execution; it only affects gating, logging, and status.
|
||||
|
||||
## Resolution order
|
||||
@@ -48,5 +48,5 @@ Note:
|
||||
- All gates must pass; otherwise elevated is treated as unavailable.
|
||||
|
||||
## Logging + status
|
||||
- Elevated bash calls are logged at info level.
|
||||
- Elevated exec calls are logged at info level.
|
||||
- Session status includes elevated mode (e.g. `elevated=on`).
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
---
|
||||
summary: "Bash tool usage, stdin modes, and TTY support"
|
||||
summary: "Exec tool usage, stdin modes, and TTY support"
|
||||
read_when:
|
||||
- Using or modifying the bash tool
|
||||
- Using or modifying the exec tool
|
||||
- Debugging stdin or TTY behavior
|
||||
---
|
||||
|
||||
# Bash tool
|
||||
# Exec tool
|
||||
|
||||
Run shell commands in the workspace. Supports foreground + background execution via `process`.
|
||||
If `process` is disallowed, `bash` runs synchronously and ignores `yieldMs`/`background`.
|
||||
If `process` is disallowed, `exec` runs synchronously and ignores `yieldMs`/`background`.
|
||||
Background sessions are scoped per agent; `process` only sees sessions from the same agent.
|
||||
|
||||
## Parameters
|
||||
@@ -19,17 +19,17 @@ Background sessions are scoped per agent; `process` only sees sessions from the
|
||||
- `timeout` (seconds, default 1800): kill on expiry
|
||||
- `elevated` (bool): run on host if elevated mode is enabled/allowed (only changes behavior when the agent is sandboxed)
|
||||
- Need a real TTY? Use the tmux skill.
|
||||
Note: `elevated` is ignored when sandboxing is off (bash already runs on the host).
|
||||
Note: `elevated` is ignored when sandboxing is off (exec already runs on the host).
|
||||
|
||||
## Examples
|
||||
|
||||
Foreground:
|
||||
```json
|
||||
{"tool":"bash","command":"ls -la"}
|
||||
{"tool":"exec","command":"ls -la"}
|
||||
```
|
||||
|
||||
Background + poll:
|
||||
```json
|
||||
{"tool":"bash","command":"npm run build","yieldMs":1000}
|
||||
{"tool":"exec","command":"npm run build","yieldMs":1000}
|
||||
{"tool":"process","action":"poll","sessionId":"<id>"}
|
||||
```
|
||||
@@ -31,7 +31,7 @@ alongside tools (for example, the voice-call plugin).
|
||||
|
||||
## Tool inventory
|
||||
|
||||
### `bash`
|
||||
### `exec`
|
||||
Run shell commands in the workspace.
|
||||
|
||||
Core parameters:
|
||||
@@ -45,12 +45,12 @@ Core parameters:
|
||||
Notes:
|
||||
- Returns `status: "running"` with a `sessionId` when backgrounded.
|
||||
- Use `process` to poll/log/write/kill/clear background sessions.
|
||||
- If `process` is disallowed, `bash` runs synchronously and ignores `yieldMs`/`background`.
|
||||
- If `process` is disallowed, `exec` runs synchronously and ignores `yieldMs`/`background`.
|
||||
- `elevated` is gated by `tools.elevated` plus any `agents.list[].tools.elevated` override (both must allow) and runs on the host.
|
||||
- `elevated` only changes behavior when the agent is sandboxed (otherwise it’s a no-op).
|
||||
|
||||
### `process`
|
||||
Manage background bash sessions.
|
||||
Manage background exec sessions.
|
||||
|
||||
Core actions:
|
||||
- `list`, `poll`, `log`, `write`, `kill`, `clear`, `remove`
|
||||
|
||||
@@ -80,7 +80,7 @@ Override via config:
|
||||
// deny wins
|
||||
deny: ["gateway", "cron"],
|
||||
// if allow is set, it becomes allow-only (deny still wins)
|
||||
// allow: ["read", "bash", "process"]
|
||||
// allow: ["read", "exec", "process"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user