Commit Graph
6 Commits
Author SHA1 Message Date
vhaudiquet a40a7a6b36 room: close turns a restart left open
ci / checks (push) Successful in 51s
ci / test (push) Successful in 57s
ci / chart (push) Successful in 5s
ci / web (push) Successful in 19s
ci / docker (push) Successful in 1m42s
ci / publish-edge-image (push) Successful in 10s
ci / publish-edge-chart (push) Successful in 3s
A turn writes turn_start before it runs and turn_end only after the
work settles. A restart in between leaves the log with one open turn,
and the client replays it as running, so the room shows
"Rhema is working..." over no task.

At startup, close every start without an end with an interrupted
turn_end, which the log already renders as "rhema stopped".
2026-12-03 12:45:17 +01:00
vhaudiquet 4d9530cc34 Revert "feat: add reverse ssh sandbox targets"
This reverts commit d85f68a176.
2026-11-29 21:34:09 +01:00
vhaudiquet d85f68a176 feat: add reverse ssh sandbox targets
A sandbox behind NAT could not reach the room. A reverse target dials a tunnel-only sshd on the server, forwards localhost:22 to a loopback port, and the worker connects there.

The server assigns the port and writes one authorized_keys line per tunnel target. The key carries permitlisten for that port; the sshd allows remote forwarding only, with no shell or local forwarding. The tunnel private key is shown once and never stored; rotating it rewrites the file. The target list and setup dialog carry the command, and the docs include the sshd config and sidecar requirements.
2026-11-29 19:25:14 +01:00
vhaudiquet fc684115b5 feat: run sandbox transports in disposable workers
The control plane opened ssh connections itself, so a malicious ssh
server attacked the process that held the database, the master key, and
every room's keys. It now starts one worker per target and workspace.
The worker gets one target key on stdin, binds loopback behind a random
token, and serves exec, files, the pty, and the preview proxy. It has no
database and no master key, and a closed stdin ends it.

The preview HTTP client moved into the worker too. The app sees a typed
response, and the worker caps bodies, output tails, handshakes, and
transport waits.

Direct targets now reject loopback, private, link-local, multicast,
unspecified, carrier-grade NAT, and documentation addresses when a
target is created and again when its worker starts.
TOGETHER_ALLOW_PRIVATE_TARGETS=1 lifts the check for a server that runs
on one private network.
2026-11-29 18:22:44 +01:00
vhaudiquet f5087220da feat: sign in to Copilot, ChatGPT, and Mistral Vibe
Three provider kinds have a browser sign-in, but the add-provider
dialog only accepted a pasted key. A per-account login record now runs
the adapter's InteractiveLogin on the server, reports the instruction,
URL, and code to the dialog, and stores the credential before the
browser sees completion. The credential never reaches the client.

The dialog gets a sign-in stage for flow kinds, with a link, a
copyable code, and retry after failure. Closing the dialog cancels the
flow. ChatGPT's callback lands on the server's loopback port, and the
instruction names the port to forward.
2026-11-28 18:06:21 +01:00
vhaudiquet 0035f4e031 feat: add the multiplayer room server and client
A room is one conversation, one ssh sandbox, and one agent. Accounts
create rooms; friends join through a single-use invite link and a
display name; the agent speaks only through the message tool.

The server is Axum and SQLite. It serves the built Nuxt client, streams
room events over SSE, and runs one serialized turn loop per room with
turn-level steering copied from rhema-code. The client has the chat,
preview iframe, read-only file pane, xterm terminal, and presence.

Preview URLs are signed wildcard hosts, and the proxy tunnels HTTP over
ssh direct-tcpip. HostAgent::step remains deferred in the framework.
2026-11-28 01:09:37 +01:00