Commit Graph
9 Commits
Author SHA1 Message Date
vhaudiquet 6b2624f0ba room: advance the steer cursor after the checkpoint
ci / test (push) Successful in 59s
ci / checks (push) Successful in 55s
ci / web (push) Successful in 17s
ci / publish-edge-image (push) Skipped
ci / chart (push) Successful in 5s
ci / docker (push) Successful in 1m49s
ci / publish-edge-chart (push) Skipped
ci / checks (pull_request) Canceled after 0s
ci / test (pull_request) Canceled after 0s
ci / chart (pull_request) Canceled after 0s
ci / web (pull_request) Canceled after 0s
ci / docker (pull_request) Canceled after 0s
ci / publish-edge-image (pull_request) Canceled after 0s
ci / publish-edge-chart (pull_request) Canceled after 0s
The steering source seeded from `config.absorbed_seq`, which the runner
loaded before the boundary pass advanced the row. When the burst that
started the turn held a chat line before the mention, the first drain read
that line back, appended it a second time, and moved the row backwards,
so the next boundary pass appended the mention again.

The row now has one writer. `RoomSteering::drain` keeps the cursor in
memory, `commit` writes it after `save_session` succeeds, and the
boundary pass hands its own cursor down in the config the turn reads.
That is the order the boundary pass already uses, append then checkpoint
then advance, and the framework's contract for a steering source: a line
that comes back is deduped within the turn, a line retired too early is
gone.

A failed commit leaves the row behind, so a line can repeat, and it
reports the failure instead of swallowing it. The drain rule moves to
`steerable`, a pure function over the messages, and four tests cover it,
the cursor handoff, and the row's waits.
2026-12-02 18:01:38 +01:00
kosmos d310735c71 room: steer mid-turn chat to the next step boundary
ci / test (pull_request) Successful in 54s
ci / chart (pull_request) Successful in 4s
ci / web (pull_request) Successful in 16s
ci / docker (pull_request) Successful in 1m42s
ci / publish-edge-image (pull_request) Skipped
ci / publish-edge-chart (pull_request) Skipped
ci / checks (pull_request) Successful in 51s
A message posted without a mention while the agent worked waited for the
next turn, so the model read it only once the work the line was about was
finished. The spec's turn rules already promised the mid-turn half ("the
next step of the running turn"); the runner implemented the turn-boundary
half only.

The turn now hands the framework a steering source. The driver drains it
between two steps and appends one User-role message per drain, so the line
lands in the history without the step in flight dying. The drain stops at
the first line it cannot carry -- a mention, which the drop path owns, or a
message with images, which a line cannot -- and leaves the cursor there, so
the boundary pass appends them in the log's order. What it drains advances
`absorbed_seq`, so nothing is appended twice.

A mention still drops the turn: that is the only way to stop a running
command, and this change does not touch it.
2026-12-02 13:18:14 +00:00
vhaudiquet b5babb682e build: depend on the Rhema crates by version
ci / chart (push) Successful in 5s
ci / checks (push) Successful in 55s
ci / test (push) Successful in 1m1s
ci / web (push) Successful in 18s
ci / docker (push) Successful in 2m1s
ci / publish-edge-image (push) Successful in 11s
ci / publish-edge-chart (push) Successful in 3s
The manifest pointed at `../rhema`, so a build needed that checkout
beside the repository. CI cloned it in two jobs and the Dockerfile
cloned a tag and rewrote the paths. The committed lock had drifted to
0.5.1 entries after the framework bumped to 0.5.2, so the first cargo
command in a clean tree rewrote it.

All twelve crates are on crates.io at 0.5.2, so the manifest names that
version and the lock pins it. The clone steps, the `RHEMA_REF`
argument, and the path rewrite are gone from the workflows and the
image. Moving the framework now means `cargo update` on the `rhema-*`
packages.
2026-11-30 22:42:01 +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 2d36790fe1 prompt: ask for shorter, conversational room messages
ci / test (push) Successful in 2m0s
ci / chart (push) Successful in 5s
ci / checks (push) Successful in 1m53s
ci / web (push) Successful in 16s
ci / publish-edge-image (push) Successful in 10s
ci / docker (push) Successful in 1m44s
ci / publish-edge-chart (push) Successful in 4s
Replace the generic "something to say" rule with a length and
conversation-style rule, allow "Ack." or "Done." before the last message,
and drop the request for a file and check summary at the end of a turn.
2026-11-28 16:37:44 +01:00
vhaudiquet 36de0aace7 feat: add static previews to the room pane
The preview tool could only name a port, so a static build needed a
server the terminal had to keep alive. `preview` now accepts a path:
the app reads the file or folder over the room's ssh sandbox and serves
it from a signed host, with `..` and dotfiles refused and a 16 MiB cap.

The target is stored with the room and replayed as a durable event. The
pane shows a static path with a reload control and keeps the port field
as a local fallback.
2026-11-28 11:24:57 +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