run_command
Execute commands inside a workspace using mode-based allowlists to restrict operations, supporting safe dev tasks and expert tools while preventing dangerous commands.
Instructions
Execute a command inside a workspace.
The ``mode`` argument controls the command allowlist. Supported values:
* ``safe`` (default): Only allow a restricted set of commands (git, uv, pip install,
pytest/unittest, ruff, mypy). This prevents dangerous operations.
* ``expert``: Allows the same commands plus additional dev tools (not implemented here).
Commands that violate the allowlist will raise a ``PermissionError``.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | . | |
| mode | No | safe | |
| command | Yes | ||
| timeout_s | No | ||
| workspace_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||