carlos / platform Public

rootfs-apps-6-interactive

Rootfs Plan 6: interactive sessions, carlos run -it and carlos console

A member can type into a live terminal on one instance (carlos run -it --app shop --instance shop.example.com -- bin/rails console, or carlos console for the manifest's declared console process). Sessions are off until the app allows them (carlos apps set --interactive on|off).

The CLI opens a WebSocket to the console, which reserves the session in its hub, admits it on the instance record and writes a grant signed with the release key. The owning box verifies the grant, dials the console's box door, and the console splices the two legs. On the box the agent allocates a pty and starts a one-shot carlos-instance-tty@ unit (or its rootfs twin) through the control service; the trampoline receives the pty over its stdin socket and runs the command on it as the controlling terminal. Every instance template hides /dev/pts. The session joins the instance's writer lifecycle: at lease loss tty and cmd holds are killed and proven gone beside workers (root accepts kill=1 for rootfs one-shot roles); a release is refused while a session start is in flight.

Also: carlos run on rootfs rows (Task 7a, without --version, #431), and carlos run on fleet boxes over the box door (Task 16, Paul's ruling R7). Sessions and refusals of authenticated callers are audited (interactive-refused rows; 429s and unauthenticated refusals get rate-limited journal lines only). Docs: ### carlos console.

Copy RFS-6-C58..C75 approved by Paul. Reviews: per-task Astra reviews with fix rounds (Tasks 2-13); Task 15 Steps 1-2 witnessed on the arm64 root runner under real systemd; whole-branch Astra R1 NOT READY (P1 grant expiry at pickup, fixed), R2 READY. Census approved by Astra on #280. Spec docs/superpowers/specs/2026-10-24-rootfs-apps-design.md rev 5 (§5.10, C9); plan docs/superpowers/plans/ 2026-10-24-rootfs-apps-6-interactive.md. Not released; the first release with this must be v0.33.1 or later. Task 15 Step 3 (dev-box checklist) runs after the dev roll.

🤖 Generated with Claude Code

Commits 54
Discussions 0 0 open
Tasks 18/19 done

Discussions

  • No discussions on this branch yet.

Tasks 18/19 done

  • Task 1: Preflight and copy rows Done
  • Task 2: `internal/interactive`, the shared vocabulary Done
  • Task 3: The record marker and reconcile's hook Done
  • Task 4: The per-app setting (`carlos apps set --interactive on|off`) Done
  • Task 5: The tty role's names, the templates, `/dev/pts` hidden, the probe check Done

Activity