Releases: rbelem/opencode2-cow-worktree
Release list
v0.3.0
0.3.0
Adapted to the projectID-era opencode2 worktree API (20260915 nightlies and
later; verified against 0.0.0-next-20260917). The API now requires the
project id on every worktree call, dropped the per-request strategy field,
and dropped the location query. spawn_workspace and list_worktrees
derive the id from the plugin's own location context, pass the source as
from, and still send strategy for 2.0.2-era binaries, where it is what
selects the git fallback's mechanism.
Behavior notes:
- On projectID-era binaries the
gitfallback cannot be requested through
the create API: a non-CoW source fails with the cow refusal, and the
refusal is final. The option still works on 2.0.2-era builds. Documented
in the README. - Create no longer assembles
<parent>/<name>verbatim when the path is
taken; the server suffixesname-2throughname-10. Named
spawn_workspacecalls are unaffected: the tool refuses anything it
cannot attach to before create runs.
Also in this release:
- Issue #14 (Desktop hardcodes
strategy: "git") resolved upstream by the
same refactor and closed. - The e2e harness speaks the projectID-era API end to end: 112 checks, 0
failed against a real0.0.0-next-20260917server
(docs/e2e/run-2026-09-17.md). Unit suite: 307 tests, coverage gate at
100% lines on all 21 shipped files.
v0.2.0
0.2.0
spawn_workspace refuses to attach a new session onto a cow worktree a live
session is still using (ADR 0004). The tool records occupancy itself: on both
the create and attach flows it writes .cow-session.json at the worktree root
(kept out of git status through .git/info/exclude), and at attach time it
probes the recorded session through the session API. Only a positive proof
that the session is gone lets attach proceed: a 404, or silence past a
60-minute window. A live session, a malformed marker, or a probe failure that
proves nothing refuses the attach and names the occupying session plus the
three recoveries (pick another name, delete the session out of band, remove a
known-stale marker). Legacy worktrees without a marker keep today's fail-open
behavior and gain a marker; the git fallback is untouched. A failed marker
write never fails the call; the result carries an "unguarded" warning.
Verified against a real opencode2 serve (0.0.0-next-20260912.3): the
attach scenario refuses on a live session, proceeds after the occupying
session is deleted, and backfills markers onto legacy worktrees
(docs/e2e/run-2026-09-16.md). Unit suite: 307 tests, coverage gate at 100%
lines on all 21 shipped files.
Also in this release:
- The e2e harness stays runnable across the 20260915 nightly split; its
readiness probe polls/api/pluginbecause the nightly answers 404 on
/api/health. The pinned0.0.0-next-20260912.3is unaffected. - Docs: ADR 0004, the announcement draft, the ecosystem listing draft, and
upstream filing candidates 6-8 (the nightly's/api/health404, its
projectIDrequirement that breaks plugin worktree creates, and the
realpath-firstWorktree.removethat strands dangling rows).
v0.1.1
0.1.1
Documentation-only release; no code changes. It carries the new install
story to the npm package page: the plugin installs as a single config entry
(opencode2 downloads it from npm at startup) or one
opencode2 plugin add command, with options in the same entry and the
checkout recipe kept for development. Also new: user-side verification with
opencode2 plugin list, the plugin-cache reset for stuck updates, the
recorded release procedure, and the ecosystem listing draft.
v0.1.0
0.1.0
The first release: tagged v0.1.0 and published to npm.
cowStrategy: Deep clones via forced reflink (Linux
COPYFILE_FICLONE_FORCE, macOScopyfile(3)throughbun:ffi), a fail-loud
capability probe, and a same-device pre-flight. Refuses an occupied target
before the first write, and a failed create removes only what it cloned.spawn_workspace: create-plus-session with attach-to-existing semantics
(attached: true),mechanismreporting, an opt-ingitfallback, and a
loud refusal of anything at the target path the inventory does not know as a
cow worktree.list_worktrees: the location's cow worktrees, derived from opencode2's
inventory alone.- Post-create hooks (
hooks.postCreate): sequentialsh -cin the new
worktree,COW_WORKTREE_PATH/COW_SOURCE_DIRECTORYin the environment, a
five-minute per-command timeout, stdin detached, captured output capped in
errors, and a first failure that rolls the create back. - Removal: an uncommitted-work guard that fails closed on unknown state, an
identity-captured quarantine rename, and two-phase deletion with an async
tail fornode_modules. - Every plugin option validated once at setup; misconfiguration fails the
plugin load rather than surfacing mid-session. - macOS backend verified on real APFS by CI (arm64 and x86_64, shared extents
measured). A 31-scenario parallel-agent swarm and a four-scenario e2e
harness are recorded underdocs/e2e/. - Development:
scripts/lane.tsspawns and absorbs parallel CoW lane clones
(origin-stripped,--no-ffabsorb); conventions indocs/lane-workflow.md.