Repository navigation
Open
Description
Parent design mill: #10389
Design mill pass 3: the ID binary's REST session + presentation model
Part of the fleet-surface design mill (Drew, 2026-11-14). Parent issue cross-links all passes. NOTE: this pass is about the ID binary itself, not fleet — fleet reaches it through pass 1/2.
What to design
An ID mode that serves every ID subcommand over REST with full argument parity:
- Invocation shape: a REST call carries the full command — every flag and argument, environment variables, and the ability to send a long-lived, indefinite stream of user input. Design how the API distinguishes piped input from a user typing interactively while the binary runs.
- Output streaming: output streams back as server-sent events (or WebSocket / WebTransport). An app built for this (like the roc app inside ID) may close immediately — effectively a plain REST response — or the stream may live until the app exits or an idle timeout closes the session.
- Sessions: an option to get a connection/session ID back immediately, then attach later over WebTransport, WebSocket, or SSE at different times.
- Resumability + caching: all of these surfaces support some degree of caching and resumability. For apps written for REST that close:
start session,receive since last time,receive after/receive before and after,receive all. Nothing is kept indefinitely — configurable timeouts, which may be hours while local. - App loader compatibility: a standard app-loader shape so a website or shop-style frontend can set an app up through the API and start a session through the loader, gathering data for apps with client-side-required portions. Non-web (Wasm/WASI-style) clients may need permissions, filesystem, and device access — design the capability declaration. Clients announce what kind of client they are to improve compatibility with arbitrary apps. We host our own websites with everything set up; this is the compatibility layer for others.
Presentation layers (kept local to the ID binary where possible)
- HTML presentation: apps can return native DOM/JS/CSS/HTML assets — static, dynamically rendered, or provided by the app. The ID server can host each asset (images, JS libraries, CSS, JS, HTML).
- Bundles: the whole web version as a zip or .tar.gz/.zst, or a single HTML file with everything inlined; for multi-page apps, either one call per page or one single HTML file whose JS switches between pages. Useful where a user gets only one or two calls.
- Terminal presentation: the same app rendered server-side to ASCII/text and carried over SSH (ID acting in REST mode, rendered on their side), WebSocket, WebTransport, or REST+SSE — the web analogue of fleet's SSH mode. Fleet already accepts SSH; it should also be able to serve a port passed through to an ID endpoint.
- Keep presentation and wrapping/unwrapping in the ID binary (client side) so only data objects, commands, and state changes cross the wire as long as possible. When fleet connects to a remote ID server, it passes through the ID binary so the ID binary does the website conversion.
Acceptance
A design section naming: the REST invocation envelope (args, env, input stream semantics incl. pipe-vs-typing), the session lifecycle (start, attach, receive-since/after/all, timeouts), the transport matrix (SSE / WebSocket / WebTransport), and the presentation outputs (per-asset, bundle, single-file, terminal) with which component produces each.
Metadata
Metadata
Assignees
Labels
No labels
Activity
developing-today commentedon Nov 14, 2026
CODE-3754
dezren39 commentedon Nov 17, 2026
Triage verdict (repo-queue task 19251, openchamber scheduled lane, 2026-11-17 UTC)
Fresh state: issue OPEN, no labels. Pass 3 of the design mill under parent #10389, which is still open. The issue says this pass is about the ID binary itself, not fleet.
It is a design pass for the REST session and presentation model of the ID binary: invocation shape, stdin versus interactive input, and SSE/WebSocket output streaming. It has no implementation in scope, and nothing merged covers it.
Verdict: keep open, triaged. Route to the design-mill owner under #10389. It depends on the transport decisions from #10391 (pass 2), so it should be sequenced after that. No worker packet from here.