Proposal: optional working-directory boundary for executeCommand on remote servers
In core/runtime/tools/domains/shell.ts, the check that kept executeCommand's cwd inside the workspace is commented out (TODO: Re-enable this check). We looked at the history: it went away with the file-organization skill (fdbd7343), which tidies the user's Desktop and Downloads through this very tool. On the desktop that is the intended behavior, and we are not asking to bring the check back.
The situation differs when rowboat-server runs on a remote box (REMOTE_SERVER.md). There, "the user's Desktop" does not exist, and an operator may want the shell tool confined to the workspace, or to a list of roots.
What we would propose
- An opt-in setting, e.g.
shell.allowedRootsinconfig/server.json(or an env var), unset by default, so the desktop keeps today's behavior. - When set,
cwdmust resolve inside one of the roots, with the existingInvalid cwdmessage. - A note in the docs that
cwdis a convenience boundary, not a sandbox: a command can stillcdon its own. Real isolation comes from the host (container, VM).
We are glad to send the PR with tests if this direction suits you. Does it, and would you prefer it in server.json or as an environment variable?
Source: rowboatlabs/rowboat