Skip to content

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 14:47
· 559 commits to main since this release

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 serve is 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, start and 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 or inbox = true sandbox). A newer devsandbox takes over from an older daemon by itself. devsandbox serve install runs 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, and serve uninstall removes it. To keep it from idling without a unit, use devsandbox serve --keep-alive or ~/.local/share/devsandbox/daemon.config.toml. exec, start and run no 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 = true
devsandbox serve install
  • Port forwards outlive the dashboard. Ports-tab forwards and every sandbox's forwardPorts now 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.toml and come back on the same host port after a daemon restart or a reboot, until d stops them. devsandbox port still forwards in the foreground until you stop it.

  • Inbox threads. A sandbox that declares inbox = true can keep one thread per item in the Inbox (a PR, an email to answer). devsbd thread put sets its header: a title, a link, a state (needs-you, active or done), a status, the child instance it's about, up to 9 buttons and an optional reply box (compose, with a hint line 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 enters needs-you, and state and status changes show as one-line markers in the thread. devsbd thread send adds a message under the header: markdown and key/value fields blocks, 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 withdraw takes one back. Everything is queued like notify, so it works with no daemon running. devsbd thread rm drops a thread, devsbd thread ls [--feed] lists yours back, messages included. dispatcher alone 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 = true
devsbd 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: tab between questions, space to pick, e to edit a text answer, enter to see what will be sent and enter again to submit. Half-filled answers are saved as you go, so they survive a restart and show the same in every dashboard. Submitting sends one submit event with every answer, defaults filled in, and the thread shows what you answered (you answered "<title>" over each label: 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 as null when you pick "Don't reply".

  • devsandbox inbox answers threads from a shell. ls and show (with --json) read the Inbox without the daemon; reply, act, submit, done and reopen answer a thread, named <owner>/<key> or by the id ls shows. 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 --stdio relays 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's connect() wraps it with typed inbox, instances and forwards methods and events. Whoever can open the socket can act as you on every sandbox, like docker.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 rm with 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 its thread). --wait SECS returns as soon as there's one; --follow keeps 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 KEY narrows either to one thread. Delivery is at least once: events stay until the owner acks them with devsbd events ack <id>… after saving its own state. devsbd features lists 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) in ps, until you remove it. Mark it with devsandbox done <instance>, a thread's Done, or a dispatcher's devsbd done <key>; clear it with devsandbox undone, u on the thread, or a dispatcher's ensure reusing it. devsbd ls, ps --json and status --json report done. npm: done(name) / undone(name), and done on instance rows.
  • d removes the selected instance in the dashboard. Like s, it acts right away with no prompt: it runs rm, which still refuses a dirty worktree and asks before deleting the branch.
devsandbox done web-pr-123
  • devsandbox vscode --goto opens 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-c or cmd-c copies it, and so does ctrl-c over a selection, for terminals that send that key plain or keep ctrl-shift-c for their own copy (Alacritty, GNOME Terminal, kitty and most Linux terminals: there the dashboard tells you ctrl-c). The copy goes through your terminal (OSC 52), so it works over SSH and from a container; under tmux, enable allow-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 with space, enter or a click (tab moves 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 ✉N on 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. enter moves focus into the thread pane: 1–9 run buttons, r replies 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-enter adds a line), tab moves to an open form, d marks done, u reopens, o/t/l/p act on the thread's child, and enter opens the link; esc steps 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. d on a notification dismisses it and on a thread marks it done; D clears 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. Press m on 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 devsbd verbs after devsandbox 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 and devsandbox inbox. On first use, the notifications of the old inbox.toml are carried over; threads from earlier builds aren't (their owners re-send them on their next pass).

  • devsbd ensure, stop, rm and done answer JSON. Each prints one JSON line instead of the bare instance name, so a dispatcher never parses prose: ensure gives name, key, sandbox, state, and whether the child was created or started; stop gives state: "stopped", rm removed: true, done done: true. A script that read the name from stdout reads .name now. Errors are unchanged: a message on stderr and a non-zero exit.

  • rm cleans up merged branches without asking. With no flag, rm first runs git 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 --branch follow the same rules now. The default branch (origin/HEAD, main, master) is never deleted. When rm deletes a branch, it also deletes the branch run created if that branch is an ancestor of it. --delete-branch / --keep-branch still 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, rebuild or rm running 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: every devsbd ensure failed with container … already exists but is not in state. State changes are now applied under a lock to the current file, written atomically. A dispatcher's ensure also replaces such a leftover container when it carries that dispatcher's label and its worktree is gone; if the worktree is still on disk, ensure refuses 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 ensure returns. A child that ensure had just started had no working ssh-agent for about a second, so a devsbd exec right after it (git fetch, git push) failed with Permission denied (publickey). ensure now 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 a note saying 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.

  • rm asks about the right branch. It used to name the branch run created, 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