Repository navigation
feat: space daemon plugins with git and skills daemons - #156
Merged
Merged
Conversation
Base automatically changed from
claude/desktop-app-pr-148-merge-3292ee
to
canary
November 13, 2026 06:11
Space daemons keep a space's state current from inside CodeWork instead of clients pulling it: one instance per space, started on a drain's mount, fed the events of runs in that space, reading the space only through I/O it borrows while a drain or a short handover already holds the sandbox, so a daemon never wakes one. - plugin: the daemon contract (scope, events, methods, start with io.use, work, events.on/publish, handle). - harness: the space host (lifecycle, attribution between space.mount.attached and detached, handover holds, idle stop, last-event replay, daemon.call), controller borrow/held/hold, the git daemon (status push, per-file diff, patch cache for detached spaces, untracked folders as one entry) and the skills daemon. - codework: event.subscribe types filter with replay, daemon.call; the skill.list pull is gone. - apps/server: space_state mirror fed per machine, sync/state notices; the Skills section reads the mirror and refreshes live. - E2E on host, Daytona, Vercel, a relink across all three, a CodeWork server on an OrbStack machine with and without Daytona, and the real CLI server; artifacts under __artifacts__/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Borrow pins only a transport still built: an invalidated one is never rebuilt by a daemon, and wake keeps the transport while a handover holds it. - A daemon's work runs in its own scope, so a failed start stops it. - Idle stop waits for pending work instead of interrupting it. - Git daemon: untracked names stay NUL-separated end to end (no path injection through a newline in a name), git errors fail diff instead of returning no changes, C-quoted patch paths are decoded, sections are split by a record of their own, and a shell that cannot run publishes available: false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sanchitrk
force-pushed
the
claude/daemon-plugin-v2-8961fd
branch
from
November 13, 2026 06:12
8b2c260 to
04b5d78
Compare
Nothing is in production yet, so the app keeps one init migration: the space_state table replaces the skill table there instead of a second migration creating one and dropping the other. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #155: this replaces its pull path for skills (
skill.list,projects.skillsreading live, theskilltable) with daemons that keep space state current from inside CodeWork.What
Space daemons: one instance per space (one folder in one env), started on the first drain that mounts the space. Each daemon is fed the events of runs in that space, from
space.mount.attachedtospace.mount.detached. It publishes what it finds as its own events, and clients mirror those instead of pulling.Never wakes a sandbox: a daemon reads only through
borrow. That pins a transport a drain lease or a handover hold already attached, under the gatestopclaims with, and only while the row isonline. A short handover keeps the sandbox readable after the last drain while work is pending.plugin/daemon).borrow/held/hold, and two builtin daemons.diff; a patch cache servingdiffon a detached space; untracked folders as one entry.event.subscribegainedtypes, filtered before the queue, with the last daemon event per space replayed first.daemon.call.skill.listis removed.space_statemirror, fed per machine connection.sync/statenotices.projects.skillsreads the mirror, and the Skills section refreshes live.Verified
daemon.call, restart), and theapps/servermirror.diff, provider still offline).vp checkandvp run typecheckpass.Peer review
A second model reviewed the code and re-ran every suite above, plus about 20 real-world situations.
index.lock, conflicts, submodules, binary files, hostile file names, a 50k-file untracked folder, an 11 MB change, two worktree spaces, skills edge cases, idle stop and restart.wakeduring a handover.diffread a path outside the repository; names now stay NUL-separated end to end.diff.Known
apps/server'sreads.test.tscan time out under the default parallel run next to the new mirror test (it passes alone and with--maxWorkers=3).🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.