Skip to content

Latest commit

 

History

History
128 lines (88 loc) · 8.4 KB

File metadata and controls

128 lines (88 loc) · 8.4 KB

v3.0.3 Ionic

Released: 2026-05-12

A patch update on the Ionic line that turns .builders/<id>/ worktrees into runnable, reviewable environments — from both the CLI and the VS Code sidebar — and aligns the workspace on a single lockstep version. Almost all of this release is the work of Amr Elsayed (@amrmelsayed).

Runnable worktrees (#689 + #690, PR #731)

Builder worktrees were already isolated git checkouts. They are now first-class environments you can install, run, and review.

New worktree block in .codev/config.json

Opt-in, zero behavior change for repos that don't add it:

{
  "worktree": {
    "symlinks": [
      "apps/web/.env",
      "apps/server/.env"
    ],
    "postSpawn": [
      "pnpm install",
      "cd apps/server && uv sync"
    ],
    "devCommand": "pnpm dev:local"
  }
}
  • symlinks — files/globs symlinked from the main worktree into the builder's worktree on spawn. Designed for .env files and other host-only secrets you don't want copied into a sibling checkout.
  • postSpawn — commands run inside the builder's worktree right after creation. Output streams live to the spawn terminal via the new runStreaming helper, so pnpm install / uv sync progress is visible instead of buffered.
  • devCommand — the command afx dev <builder-id> and Run Dev Server invoke.

New CLI commands

  • afx dev <builder-id> — spawn the worktree's dev server as a Tower-managed PTY. Serial swap by design: only one builder's dev is running at a time, so OAuth callbacks, CORS allowlists, cookie scoping, and webhook URLs keep working without reconfiguration.
  • afx setup <builder-id> — re-apply worktree.symlinks and re-run worktree.postSpawn against an existing worktree. Handy after lockfile changes, evolving config, or recovering from an aborted spawn.

Dev terminals are ephemeral by design — they die with Tower and are not persisted to SQLite. The 'dev' TerminalType was added to @cluesmith/codev-core/tower-client and gated at tower-routes.ts. Killing a dev PTY signals the entire process group (SIGTERMSIGKILL after 5s), so a monorepo pnpm dev with N children gets cascade-killed by one syscall.

VS Code sidebar context menu

Right-click any builder row in Builders or Needs Attention:

Codev: Open Builder Terminal
─────────────────────────────────
Codev: Open Worktree Folder        ← OS file manager
─────────────────────────────────
Codev: View Diff                   ← unified main↔HEAD multi-file diff
─────────────────────────────────
Codev: Run Worktree Setup          ← shells out to `afx setup`
Codev: Run Dev Server              ← spawns the dev PTY
Codev: Stop Dev Server

View Diff uses vscode.changes for a single tab with a file-list pane, instead of opening N diff editors. The brand icon is now theme-aware (light/dark SVG pair) so it doesn't render as a black square on dark themes.

Plus command-palette tightening: hidden palette entries that need a builder-id argument, and a BuilderTreeItem subclass so context-menu commands resolve the right builder regardless of which row was right-clicked.

Recipes

CLAUDE.md and AGENTS.md gain a Runnable Worktrees section with copy-paste recipes for pnpm monorepo, npm, yarn, bun, cargo, poetry/uv, and go mod stacks.

Lockstep version bumps (#692, PR #732)

pnpm bump-version replaces the per-package pnpm version flow. Anchors on root package.json (Vue/Babel pattern), updates root + every publishable workspace package in one shot, and preserves byte-level JSON formatting (the regex-only rewrite avoids the JSON.stringify churn that would have rewritten compact arrays in packages/vscode/package.json).

Command Effect
pnpm bump-version Patch bump from the current root version
pnpm bump-version patch / minor / major Semantic bumps
pnpm bump-version 3.1.0-rc.1 Explicit version (auto-skips packages/vscode because the VS Code Marketplace rejects pre-release suffixes)

This release is the one-time alignment that pulls @cluesmith/codev-core and @cluesmith/codev-types up from their stale 0.0.x values to match @cluesmith/codev. From now on, every workspace package ships at the same version — closing the class of bug where the main package shipped pointing at outdated internal deps.

prepublishOnly: pnpm build is now wired on packages/core and packages/types so dist/ can't be stale at publish time. The release protocol's Step 4 was rewritten around the new flow; the backport path keeps the per-package pnpm version semantics.

VS Code reliability and sidebar UX (PR #729)

Three themes in one bundle — Amr's PR #682 review follow-up, sidebar UX, and the #718/#728 bugfixes.

PR #682 follow-up

  • Dropped the SSE rate limiter. Every consumer self-throttles where it matters (the overview-data loading guard, tree views' batched EventEmitters), so the 1s coalescer was solving a problem that wasn't there while creating a real one — a builder-spawned event arriving inside a coalesced overview-changed window was silently dropped. Removed entirely.
  • openBuilder close-race fix. When a stale terminal is replaced under the same mapKey, the stale onDidCloseTerminal event can fire after registration; the new entry was being deleted from under itself. Identity-check the current map entry before deleting.
  • Workspace path normalization in BuilderSpawnHandler so trailing-slash variants don't drop events. Plus new unit coverage for parsing/dedup/path-norm/mode-dispatch (builder-spawn-handler.test.ts, sse-client.test.ts) and a contract test pinning BuilderTerminalLinkProvider to a pure regex implementation.

Sidebar UX

  • Clickable rows. Builders and Needs Attention rows now open the builder's terminal on click. Resolution goes through TerminalManager.openBuilderByRoleOrId — one shared path for link-provider, sidebar, and palette.
  • Tail-match builder IDs. Fixes the "No active terminal for 153" toast: sidebar IDs were '153', Tower's runtime IDs were 'builder-spir-153'. resolveAgentName and stripLeadingZeros moved into a new @cluesmith/codev-core/agent-names subpath shared by agent-farm and vscode.
  • Focus parameter threaded through the terminal-open path. Click paths opt in; auto-spawn paths don't steal focus mid-typing. Also primes new pseudoterminals with an empty write to work around microsoft/vscode#108298 (writes emitted before open() are dropped, leaving the pane blank until first input).
  • Codev SVG terminal icons. Architect, builder, and shell tabs now show the Codev mark instead of >_.
  • New Workspace sidebar view above Needs Attention: Open Architect and Open Web Interface entries, sharing codev.openArchitectTerminal with the palette and Cmd-K A keybinding.

Bugfixes #718, #728, #688

  • #718 — VS Code extension wasn't showing builder terminals from Tower. Tower's wsTerminals rehydration is now centralised so /api/overview self-heals like /api/state. The extension also activates the workspace before announcing 'connected', and the sidebar gains refresh + reconnect buttons.
  • #728 — Cold-start failures can leave VS Code stuck Offline. New codev.reconnect command + status-bar click; connect() has a re-entry guard; cold-start self-heal added.
  • #688 — Review nits on local-install.sh addressed.

Breaking changes

None. The new worktree config block is opt-in; the version-bump scripting is internal; sidebar UX and bugfixes are purely additive.

Migration

npm install -g @cluesmith/codev@3.0.3
afx tower stop && afx tower start

To opt into runnable worktrees, add a worktree block to .codev/config.json and codev update. See the new Runnable Worktrees section in CLAUDE.md for stack-specific recipes.

Install

npm install -g @cluesmith/codev@3.0.3

Contributors

  • Amr Elsayed (@amrmelsayed) — runnable worktrees, VS Code review tooling, lockstep version bumps, sidebar UX, PR #682 follow-up
  • M Waleed Kadous (@waleedkadous) — release coordination
  • MachineWisdomAI — bugfixes #718 / #728 / #688 follow-up under parallel agent
  • Builders working under SPIR, ASPIR, AIR, and BUGFIX protocols