Repository navigation
v0.7.0
A per-user host daemon now keeps notifications, dispatchers and port forwards working with the dashboard closed, and serves an API that editors, GUIs and the new npm connect() client can drive. Sandboxes can keep one Inbox thread per item: a header with a state and buttons, and a conversation of messages, forms and your replies, answered from the dashboard, the new devsandbox inbox command or any API client, with events streamed back as they happen. The Inbox becomes a list of what's waiting on you rather than a log, and instances can be marked done instead of removed. VS Code can open straight at a file and line.
Added
- A host daemon keeps devsandbox live with the dashboard closed.
devsandbox serveis a per-user background process that now owns the connection to every running sandbox's helper: the ssh-agent relay, notifications and desktop popups, dispatcher control commands and port forwards. You don't start it: the dashboard,run,startand the commands that relay your ssh-agent start it when needed, and it exits 10 minutes after its last user left (a dashboard, a forward, a running dispatcher orinbox = truesandbox). A newer devsandbox takes over from an older daemon by itself.devsandbox serve installruns it from login as a systemd user unit (Linux) or a LaunchAgent (macOS), for sandboxes the container runtime restarts on boot; an upgrade repoints the installed unit at the new binary, andserve uninstallremoves it. To keep it from idling without a unit, usedevsandbox serve --keep-aliveor~/.local/share/devsandbox/daemon.config.toml.exec,startandrunno longer start an ssh-agent bridge of their own: one bridge per container, relaying the agent of whichever session last ran a command. Details:docs/serve.md.
# ~/.local/share/devsandbox/daemon.config.toml
[serve]
keep-alive = truedevsandbox serve install-
Port forwards outlive the dashboard. Ports-tab forwards and every sandbox's
forwardPortsnow run in the host daemon, so closing the dashboard no longer drops them, and every open dashboard shows the same ones. Forwards you add are saved in~/.local/share/devsandbox/forwards.tomland come back on the same host port after a daemon restart or a reboot, untildstops them.devsandbox portstill forwards in the foreground until you stop it. -
Inbox threads. A sandbox that declares
inbox = truecan keep one thread per item in the Inbox (a PR, an email to answer).devsbd thread putsets its header: a title, a link, a state (needs-you,activeordone), a status, the child instance it's about, up to 9 buttons and an optional reply box (compose, with ahintline under it saying what sending does). A put that changes nothing is ignored (no unread mark, no popup), so a sandbox can simply re-send all its threads on every pass; a desktop popup only fires when a thread entersneeds-you, and state and status changes show as one-line markers in the thread.devsbd thread sendadds a message under the header: markdown and key/valuefieldsblocks, identified by an id of your choosing, so re-sending the same message is free and sending changed content edits it in place;devsbd thread withdrawtakes one back. Everything is queued likenotify, so it works with no daemon running.devsbd thread rmdrops a thread,devsbd thread ls [--feed]lists yours back, messages included.dispatcheralone only grants the child commands, so a dispatcher that wants threads declares both. A rejected put or send shows up as an error notification from your instance, with the reason. Full reference:docs/automations-guide.md.
[sandbox.pr-dispatcher]
dispatcher = { spawn = ["web"] }
inbox = truedevsbd thread put --json '{"key":"pr-123","title":"#123 fix login","state":"needs-you","status":"review replies","child":"pr-123","actions":[{"id":"retry","label":"Retry"},{"id":"done","label":"Done","done":true}],"compose":{"hint":"Starts a run with your message"}}'
devsbd thread send --json '{"thread":"pr-123","id":"run-1","blocks":[{"type":"markdown","text":"Addressed 3 of 4 comments, **1 needs your call**."}]}'-
Forms in messages. A message can carry a form: choice, text and yes/no questions, with defaults (a text default is how you offer a draft for editing). The dashboard pins open forms under the thread's header:
tabbetween questions,spaceto pick,eto edit a text answer,enterto see what will be sent andenteragain to submit. Half-filled answers are saved as you go, so they survive a restart and show the same in every dashboard. Submitting sends onesubmitevent with every answer, defaults filled in, and the thread shows what you answered (you answered "<title>"over eachlabel: value) where you'll read the owner's reply to it. A question can follow up another (under), shown indented under it, and only be asked while one of its options is picked (when): a reply text that only matters for "Post the reply" is hidden, not required and sent asnullwhen you pick "Don't reply". -
devsandbox inboxanswers threads from a shell.lsandshow(with--json) read the Inbox without the daemon;reply,act,submit,doneandreopenanswer a thread, named<owner>/<key>or by the idlsshows. The owner gets the same events as from the dashboard.
devsandbox inbox ls --view needs-you
devsandbox inbox reply pr-dispatcher/pr-123 "Rebase it first"- An API for editors and GUIs. The host daemon serves a JSON-lines API on a unix socket: the Inbox (threads, replies, actions, forms, done/reopen, notifications), instances, port forwards, and change notifications.
devsandbox api --stdiorelays it over stdin/stdout for clients that can only spawn a process; it exits 0 when its input ends and 75 only when the daemon hung up first. The npm package'sconnect()wraps it with typedinbox,instancesandforwardsmethods and events. Whoever can open the socket can act as you on every sandbox, likedocker.sock. Reference:docs/api.md.
const api = await devsandbox.connect({ name: 'my-tool' });
await api.subscribe(['inbox']);
const [t] = await api.inbox.list('needs-you');-
Thread buttons that act right away. A button can carry a built-in host action that runs in the dashboard with no round trip: open VS Code on the thread's child (at a file and line), a terminal, its logs, a port forward, a link, or
rmwith the usual confirm. On a stopped child, VS Code, the terminal and the forward start it first (the button says(stopped)); logs don't, since a stopped container's log says why it stopped. The target is always the thread's child or the thread's owner itself, never another instance, and there is no arbitrary host command. -
Events: your answers, back to the thread's owner. Every other button, a reply, a form submission, marking a thread done and reopening it become events the owner reads with
devsbd events(JSON lines, each naming itsthread).--wait SECSreturns as soon as there's one;--followkeeps a stream open and prints each event the moment it happens, with a ping after 30 s of quiet, and a newer follower from the same instance replaces the older one, so two copies of a loop never both act on a click.--thread KEYnarrows either to one thread. Delivery is at least once: events stay until the owner acks them withdevsbd events ack <id>…after saving its own state.devsbd featureslists the newer verbs a helper has (thread-send,events-follow, …), so a script can check before using them.
devsbd events --follow
devsbd events ack e-1790900001-3f2a- Done instances. An instance marked done keeps its container, worktree and runs, and shows dimmed with a
✓in the dashboard and(done)inps, until you remove it. Mark it withdevsandbox done <instance>, a thread's Done, or a dispatcher'sdevsbd done <key>; clear it withdevsandbox undone,uon the thread, or a dispatcher'sensurereusing it.devsbd ls,ps --jsonandstatus --jsonreportdone. npm:done(name)/undone(name), anddoneon instance rows. dremoves the selected instance in the dashboard. Likes, it acts right away with no prompt: it runsrm, which still refuses a dirty worktree and asks before deleting the branch.
devsandbox done web-pr-123devsandbox vscode --gotoopens VS Code at a file and line. The path is relative to the instance's workspace folder. It opens (or focuses) the window as before, then has the in-container helper open the file in that window, waiting up to 30 s for it to attach; if that fails, the window still opens and the output says why the line was dropped. In the dashboard::code <instance> --goto path:line.
devsandbox vscode web-2 --goto src/main.rs:42:7-
Select and copy text with the mouse in the dashboard. Drag in any pane to select text inside it, without borders or the panes next to it. Releasing copies it to your clipboard (copy on select, on by default); with that setting off,
ctrl-shift-corcmd-ccopies it, and so doesctrl-cover a selection, for terminals that send that key plain or keepctrl-shift-cfor their own copy (Alacritty, GNOME Terminal, kitty and most Linux terminals: there the dashboard tells youctrl-c). The copy goes through your terminal (OSC 52), so it works over SSH and from a container; under tmux, enableallow-passthrough. Inbox threads copy as rendered, with bullets, quotes, tables and links as shown and wrapped lines joined back, and dragging past the edge scrolls so a long message copies whole; the config, help and logs views work the same way.shift-drag still gives your terminal's own selection. In the integrated terminal, apps that use the mouse (vim, tmux, zidane) now get your clicks, drags and hover, and what they copy to the clipboard now reaches yours (a setting turns that off); in a plain shell you select the output, scrollback included. -
Dashboard settings.
?is now Settings & help: the settings on top, toggled withspace,enteror a click (tabmoves between them), and the key reference below. They are saved per user in~/.local/share/devsandbox/dashboard.toml. copy on select (on) copies a mouse selection on release; terminal clipboard (on) lets apps in the integrated terminal set your clipboard.
Changed
-
The Inbox shows what's waiting on you. Side by side: a card list on the left (title, compact age, state/level chip and sender; a selected card gets an accent bar), the selected thread always open on the right, with a
‹ Needs you │ Active │ Done │ All ›strip above the list stepped by←/→. The tab count and the yellow✉Non instance rows now count threads that need you and unread notifications, not every unread record. In the thread, the header stays pinned at the top (title, the same state and status chip as the card, the child and whether it's stopped, the buttons), open forms sit under it, and the conversation runs newest first, so the newest thing is read first.entermoves focus into the thread pane:1–9run buttons,rreplies in a box at the bottom of the pane (shown only when the thread takes replies; it wraps, grows to six rows, and the line under it says what sending does;alt-enteradds a line),tabmoves to an open form,dmarks done,ureopens,o/t/l/pact on the thread's child, andenteropens the link;escsteps back. The per-instance grouping and inline folding are gone: a notification's earlier records are listed in the pane. A thread is read when selected and again if it changes while selected; notifications are marked read the same way or when you leave the Inbox after seeing them.don a notification dismisses it and on a thread marks it done;Dclears notifications only. -
The dashboard takes more mouse clicks. Click a tab title to switch tabs. In the Inbox, click a card to select it, a view name to switch views, the thread or its reply box to focus them; the wheel moves through the cards or scrolls the thread.
-
Inbox text is rendered as markdown. Thread messages, replies and notification bodies show headings, lists, code blocks, quotes, links and tables (aligned when they fit) instead of raw
**and backticks; titles and statuses get inline code and emphasis. Long lines wrap at word boundaries. Pressmon a thread to see the source. Control characters from containers are stripped before they are stored or drawn. -
A newer devsandbox updates the helper in running instances. Before, a running dispatcher only got new
devsbdverbs afterdevsandbox start; now the host daemon of a newer devsandbox installs them, so opening its dashboard (or any command that starts the daemon) is enough. -
The Inbox is stored in
inbox.json. It's shared by every dashboard, the host daemon anddevsandbox inbox. On first use, the notifications of the oldinbox.tomlare carried over; threads from earlier builds aren't (their owners re-send them on their next pass). -
devsbd ensure,stop,rmanddoneanswer JSON. Each prints one JSON line instead of the bare instance name, so a dispatcher never parses prose:ensuregivesname,key,sandbox,state, and whether the child wascreatedorstarted;stopgivesstate: "stopped",rmremoved: true,donedone: true. A script that read the name from stdout reads.namenow. Errors are unchanged: a message on stderr and a non-zero exit. -
rmcleans up merged branches without asking. With no flag,rmfirst runsgit fetch --prune origin, then decides about the branch the worktree has checked out. If every commit on it is already on its remote branch, or the remote branch it tracked has been deleted (a merged PR), the branch is deleted without a prompt. Only a branch with commits that exist nowhere else still prompts, and off a TTY it is kept. Branches you reused with--branchfollow the same rules now. The default branch (origin/HEAD,main,master) is never deleted. Whenrmdeletes a branch, it also deletes the branchruncreated if that branch is an ancestor of it.--delete-branch/--keep-branchstill decide outright.
Fixed
-
Instances no longer vanish from state while their container stays. Commands saved the whole state as they had loaded it, so a slow
run,rebuildorrmrunning alongside another command could drop the instance that command had just recorded, leaving its container and worktree behind with no entry. A dispatcher child lost this way blocked its key for good: everydevsbd ensurefailed withcontainer … already exists but is not in state. State changes are now applied under a lock to the current file, written atomically. A dispatcher'sensurealso replaces such a leftover container when it carries that dispatcher's label and its worktree is gone; if the worktree is still on disk,ensurerefuses and names the worktree, so you can check it for work before removing it on the host. -
SSH works in a dispatcher's child as soon as
devsbd ensurereturns. A child thatensurehad just started had no working ssh-agent for about a second, so adevsbd execright after it (git fetch,git push) failed withPermission denied (publickey).ensurenow waits (up to 12 s) for the agent relay of a child it created or started; if it isn't ready by then, its answer carries anotesaying why. -
Long commands in the
:prompt stay visible. Text past the prompt's width was hidden though it was still run; the prompt now scrolls sideways to keep the cursor in view. -
A press in the Inbox thread pane no longer grabs the divider. A press on the pane's first text column started resizing the list/thread split; now only the borders do.
-
The help and logs screens keep the mouse to themselves. With either open, clicks and the wheel reached the integrated terminal hidden underneath.
-
Apps in the integrated terminal get the mouse and the clipboard. They never received clicks or drags, and what they copied to the clipboard was dropped.
-
Dismissed notifications no longer come back with several dashboards open. Each dashboard kept its own copy of the Inbox and saved it over the others', so records dismissed in one reappeared from another, and restarts seemed to add clutter. All dashboards now share one store, so a dismissal in one is gone from all.
-
A notification is no longer lost if the dashboard dies while receiving it. The container's copy was dropped as soon as the dashboard said it had it, before it was saved; now it's saved first, and resent otherwise.
-
rmasks about the right branch. It used to name the branchruncreated, even after the worktree had switched to or renamed another branch. Now it reads the worktree's current branch before removing it. For instances from before branches were recorded that have since been renamed, the old fallback guessed the branch name from the new name; it now uses the instance's original name.
Commits
- b0f96a0 fix(state): apply state changes under a lock to the current file
- b006504 feat(inbox): show a submission's answers where the user reads the outcome, and let a form question follow up another (under/when) so a reply for one option no longer reads as a separate question
- b89fb10 fix(dispatch): ensure waits for a child's ssh-agent relay after bringing it up, so an exec right after can use ssh instead of failing with publickey
- 3e997c7 feat(tui): d removes the selected instance instead of marking it done
- cdea7cd feat(inbox): drop the v2 put and event compat so old-shape puts are rejected with a pointer to thread send and compose, and events name only their thread
- 4d10d56 fix(serve): retry a restored forward's saved port for a second before moving it, since a draining predecessor or a forked child can hold it for a moment
- b48e4a9 docs: describe the daemon, owner threads, messages, forms, follow and the inbox cli as they now work, and mark the old threads design superseded
- 4858573 feat(tui): start a stopped child before running its vscode, terminal or forward action and answer dispatcher child ops with json, so thread buttons work on parked children and scripts never parse prose
- ca97a65 feat(inbox): add devsandbox inbox ls|show|reply|act|submit|done|reopen so scripts and terminals can read and answer threads without the dashboard
- 24bd49e feat(inbox): stream owner events with devsbd events --follow, one live follower per owner, so a dispatcher reacts at once instead of long-polling the store
- b6e421e fix(api): report stdin's eof before half-closing the relay's socket, since a fast daemon hang-up was read as the daemon leaving and exited 75
- 1f3a563 feat(inbox): name the event's thread field thread and let devsbd events filter by --thread, keeping key as an alias until the dispatcher moves over
- 619e8b0 test(serve): give the relay test's daemon a 1 s idle timeout since 200 ms flaked under a loaded parallel run
- 07e75b5 feat(tui): pin open forms under the thread header with choice, text and confirm widgets, a draft saved on every change and an enter-to-confirm submit
- e77f363 feat(inbox): add forms to messages with host-kept drafts, a one-shot submission and a submit event with defaults filled, so structured input is data instead of files in the child
- 4866133 feat(tui): pin the thread header and action row, show the feed newest first and the compose hint under the box, so the newest thing is read first and sending says what it does
- 0cb96ec feat(inbox): add devsbd thread send and withdraw for idempotent owner messages with markdown and fields blocks, so explanations live in the feed instead of an overwritten header
- 24e07eb feat(inbox): store threads as a v3 json feed of messages, replies, actions and collapsing markers, since the overwritten message and per-field timeline made threads read backwards
- 1874d60 feat(config): gate inbox threads and events on a new inbox = true sandbox setting so owning threads is its own capability and dispatcher only grants child ops
- a7f45f8 docs(inbox): name feed items by direction (message, reply, action, submission) and make enter confirm a form, since post was ambiguous next to submissions
- 6058656 test(serve): run serve install under the real systemd and launchd
- e16f8fd fix(serve): keep a literal $ in the systemd unit's executable path
- 55e133c docs(serve): record the snapshot, forward-holder and forward-bridge trade-offs as future work so they're revisited deliberately
- 05e4252 feat(serve): persist ad-hoc forwards in the data dir so a restarted or upgraded daemon brings them back on the same host ports
- b044237 feat(serve): start and hand off through the installed unit, repointing it at the newer binary, so an upgrade no longer leaves the managed daemon stopped
- ff8167b feat(serve): read keep-alive from a per-user daemon.config.toml in the data dir so the daemon setting needs no flag
- c36ded7 docs(inbox): record the post-step-10 follow-ups agreed after the daemon review so they're implemented before the content model
- 666641d feat(serve): add serve install|uninstall for a keep-alive systemd user unit or launchagent so runtime-restarted dispatchers find a live host at login
- 685c0e6 feat(api): add the api --stdio relay and a typed npm client so editor extensions and guis can drive the inbox, instances and forwards without socket handling
- 1902817 feat(serve): own port forwards in the daemon and serve them over the api so configured and ad-hoc forwards outlive the dashboard
- 5cc83cc feat(serve): relay ssh-agent through the daemon's one bridge per container and pick the newest live agent a client reports, since per-command bridges duplicated relays and the daemon's inherited agent could be stale
- 29323e7 feat(tui): talk to the daemon through one reconnecting worker so inbox writes, change pokes and container status lines flow through the api and survive a handoff
- e17d1d8 feat(serve): serve a json-lines api for the inbox and instances with change subscriptions so every client acts through one path
- 19ccee0 feat(serve): run bridges, the notify drain, popups and autostart in the daemon so dispatchers keep a live host when no dashboard is open
- f681248 feat(serve): add the devsandbox serve daemon skeleton (socket, start lock, lazy start, version handoff, idle exit) so bridges and the inbox can outlive the dashboard
- 582a8bc refactor(inbox): route every inbox read and write through inbox::ops so the coming daemon api, cli and tui share one code path and produce identical events
- 8299e8d fix(tui): build the inbox chip in one place and show replies in full, since the card hid the status the pane showed and multi-line replies were folded onto one row
- 203b06a fix(tui): wrap and grow the inbox reply box and scroll the : prompt sideways, since text past the box width was invisible though it was still sent
- dc19ab7 docs(inbox): plan the inbox redesign so each step can be implemented and reviewed on its own
- 9c74eba fix(rm): decide on the worktree's current branch and delete merged or pushed ones without asking, since the prompt named the stale recorded branch and merged prs left branches behind
- 69a6cbb feat(tui): copy on select by default again and name ctrl-c as the copy key in terminals that keep ctrl-shift-c, since alacritty and most linux terminals never pass it on
- 99f2025 docs(tui): document dashboard settings, copy keys, terminal clipboard relay and hover, and changelog the mouse fixes found along the way
- 7d5e1dd feat(tui): forward hover to integrated-terminal apps that track all motion, since they got no pointer movement without a button held
- c4c80de feat(tui): add dashboard settings to the ? screen and make copy on select an option, off by default, since copying every selection clobbers the clipboard
- 46954fb fix(tui): relay osc 52 copies from apps in the integrated terminal to the outer clipboard, since the emulator dropped them and copying in zidane did nothing
- c5a8484 docs(tui): plan selection follow-ups (terminal app clipboard, settings, hover), from first use feedback
- c342d45 docs(tui): document mouse selection and let ctrl-shift-c copy it again, since most terminals keep that key for their own (now empty) selection
- ca77669 feat(tui): forward mouse presses, drags and releases to terminal apps that track the mouse and select locally otherwise, since apps in the integrated terminal never saw a drag
- a802bf1 feat(tui): copy whole rendered markdown from a thread, rejoining wrapped lines and autoscrolling past the pane edge, so a long llm message pastes as it was written
- bd1d29d docs(tui): plan mouse text selection, since mouse capture leaves the dashboard with no way to copy text
- abd2a63 chore: more simplifications
- 680db64 chore: simplified README.md
- 5473290 feat(tui): lay out markdown tables in threads as aligned columns when they fit, since llm summaries lean on them
- 4fd02eb feat(tui): render thread and notification markdown with word wrap and a raw toggle, and strip control characters from container text, since dispatcher text is mostly llm markdown
- 9bdbbb4 docs(inbox): plan markdown rendering in threads, since dispatcher text is mostly llm markdown
- 268c006 feat(tui): make the tab bar, inbox cards, view strip and thread pane clickable, like the terminal panel already was
- 44a37c9 perf(mux): shrink per-stream thread stacks to 128 KiB
- a9b93b2 docs(tui): describe the side-by-side inbox, cards, focus zones and reply box
- 16217a6 feat(tui): let the inbox list/thread divider be dragged, so long titles or long threads get the room they need
- 37e8a80 feat(tui): render inbox items as compact two-line cards with a view strip, so the list reads at a glance instead of as a log table
- a572f71 feat(tui): show the inbox list and the selected thread side by side with a reply box in the thread, so reading and answering need no pane switching
- 510ca74 docs(inbox): plan the side-by-side inbox layout with cards and an inline reply box, from first-build feedback
- caeb4a8 test(devsbd): retry the refused-dial check on a fresh port, since a freed ephemeral port can be taken by a parallel test
- 010a60e docs(inbox): document threads, events, done instances and vscode --goto for dispatcher authors and dashboard users
- 0bdab8f feat(vscode): add --goto and use it for the thread vscode action, so a thread can open the draft at the line that needs a decision
- 69462cd feat(devsbd): add vscode-goto, which finds the attached window's extension host and runs its own remote cli as its owner, so the host can open a file at a line
- 069e639 feat(done): let users and dispatchers mark an instance done, so 'I've looked, carry on' no longer means removing the child
- 7fa8d35 feat(inbox): queue user actions and replies as events a dispatcher pulls with devsbd events, so users can answer from the inbox
- 4351ba9 feat(tui): run a thread's host actions on its child or sender from the pane, so looking at the work needs no dispatcher round trip
- fd255fc feat(tui): show the inbox as threads in needs-you/active/done views with a focused thread pane, so the badge counts what waits on the user, not noise
- 7c8d623 feat(inbox): let dispatchers put and remove stateful threads through the outbox, applied idempotently so re-asserting every pass adds no clutter
- d1ae90b feat(inbox): share one locked inbox store across dashboards and ack records only once stored, so dismissed records stay gone and a dying dashboard can't lose one
- 25d2a4d docs(inbox): give archiving on rm a step, it had none
- c05ee41 fix(tui): reinstall a stale helper before spawning a bridge so running dispatchers get new devsbd verbs without a restart
- e0472aa docs(inbox): plan inbox threads so dispatchers can show state, offer actions and take answers instead of re-sending notifications