Skip to content

feat: CLI/core split — shim + versioned core binary#137

Merged
donbader merged 13 commits into
mainfrom
feat/cli-core-split
Jun 9, 2026
Merged

feat: CLI/core split — shim + versioned core binary#137
donbader merged 13 commits into
mainfrom
feat/cli-core-split

Conversation

@donbader

@donbader donbader commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

Replace the Go CLI binary with a POSIX shell shim that auto-downloads and delegates to a versioned core binary. Core becomes the primary release artifact.

Architecture

User runs agent-sandbox <cmd>
        │
        ▼
┌─────────────────────────────┐
│  Shim (~/.agent-sandbox/bin)│
│  POSIX shell, ~80 lines    │
├─────────────────────────────┤
│  Owns: upgrade, version    │
│  Everything else → core    │
└──────────────┬──────────────┘
               │ resolve version → download/cache → exec
               ▼
┌─────────────────────────────┐
│  Core Binary (Go)           │
│  agent-sandbox-core         │
├─────────────────────────────┤
│  init, generate, compose,   │
│  gateway-url, audit         │
└─────────────────────────────┘

What Changed

  • scripts/shim.sh — POSIX shell version-resolving shim (the new agent-sandbox command)
  • scripts/install.shcurl | sh installer
  • cmd/agent-sandbox-core/ — new Go binary with all real CLI logic (no release fetching, resolves assets from own directory)
  • cmd/agent-sandbox/main.go — upgrade command becomes migration to shim (v1.27.0 final release)
  • internal/release/fetcher.go — cache aligned to ~/.agent-sandbox/core/
  • .github/workflows/core-release.yml — builds 4 platform-specific tarballs with host binary
  • .github/workflows/shim-release.yml — tags shim versions
  • .github/workflows/ci.yml — builds + tests core binary, shellcheck for scripts
  • docs/ — full documentation update (getting-started, cli reference, migration guide, architecture)

Migration Path

Existing users run agent-sandbox upgrade (v1.27.0) which installs the shim. After updating PATH and removing the old binary, they're on the new system.

What's NOT in this PR

  • Task 10 (removing old cmd/agent-sandbox/ and GoReleaser workflow) — happens after migration period
  • Checksum verification for downloads — future enhancement

Testing

  • Both binaries build: go build ./cmd/agent-sandbox/ and go build ./cmd/agent-sandbox-core/
  • All existing tests pass: go test ./...

Spec: docs/superpowers/specs/2025-06-09-cli-core-split-design.md
Plan: docs/superpowers/plans/2025-06-09-cli-core-split.md

@donbader donbader merged commit 78e46f6 into main Jun 9, 2026
7 checks passed
@donbader donbader deleted the feat/cli-core-split branch June 9, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant