forked from vhaudiquet/rhema-claw
feat(claw): choose where bash runs, this host or a remote sandbox
The daemon's `bash` always ran on its own host. A deployment that wants the shell isolated, or on a machine with the project's toolchain, had no way to say so, and the web settings had no surface for it. A sandbox choice now persists in the settings table, and the daemon can be seeded from `sandbox` in claw.yaml. `local` keeps the existing shell; `http` wraps `rhema-sandbox-http` in a `ShellSandbox` and gives every handler a `ShellTools` built over it. Chat turns, forge turns, and coding jobs all read the choice per dispatch, so a switch applies on the next turn without a restart. A remote sandbox starts empty. The first command for a workspace probes `/workspace` and, when it is empty, sends the host workspace as a tarball through the protocol's seed route. Later edits stay in the sandbox; the claw does not copy them back. The web settings gain a System > Sandbox page: the two kinds, the URL and a write-only token, a forget-token action, and the effective workspace. `GET /v1/sandbox` never returns the token; `PUT` validates and persists the choice. Tests: the sandbox state and config validation, the HTTP route round trip, and a remote turn that seeds a fresh sandbox and runs its shell there. fmt, clippy with -D warnings, the workspace tests, and the web typecheck and build pass.
This commit is contained in:
1 parent
5dc8402107
commit
1aa8d5578e
20 files changed
+1502
-23
No files matched your search
@@ -67,7 +67,7 @@ FROM debian:stable-slim
|
||||
# load-bearing too: a `{git}` seed is a `git clone` (tarball seeds need
|
||||
# neither).
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends bash git ca-certificates \
|
||||
&& apt-get install -y --no-install-recommends bash git tar ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Numeric USER: Kubernetes cannot verify runAsNonRoot against a name.
|
||||
|
||||
Reference in new issue
Block a user