mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
* feat(sandbox): add KVM-backed agent sandboxing via microsandbox * feat(sandbox): route host-shell surfaces into microVM via shell wrapper * feat(sandbox): route host-shell surfaces into microVM via shell wrapper * fix(sandbox): harden enforcement validation and backup handling * fix(sandbox): bound lifecycle queue and harden install/backup paths Bound the OpenCode supervisor lifecycle queue to one running plus one pending operation so repeated restarts cannot stack unbounded HTTP requests, while exempting stop() so shutdown is never dropped. Reject enforcement backups that carry no recoverable removed sections, matching the existing fail-closed handling of unparseable backups. Install OpenCode through a private mktemp staging directory instead of the predictable /tmp/opencode path. Use named path/os imports in the files added by this branch. * refactor(sandbox): remove OpenCode version allowlist gating under enforcement * fix(settings): use resolved opencode binary and verify installed version * refactor(sandbox): scope enforcement to agent bash tool only * fix(sandbox): plan bash against factory directory and attest runtime tmpfs; align permission reply API * fix(sandbox): pin neutral entrypoint and persist opencode upgrades across rebuilds * fix(sandbox): align canonical spec with msb 0.6.8 runtime defaults * feat(sandbox): show unwrapped sandboxed bash commands in message UI * refactor(sandbox): pin shell shim to sandbox agent bash without rewriting commands * feat(sandbox): route notifications through a host-side manager tool * feat(sandbox): route all assistant capabilities through the ocm tool Add an allow-listed request action to the generated ocm plugin so agents reach settings, assistant reload, repos, git-info, workspaces, and schedules through the tool instead of curling the internal API with a bearer token, which is impossible under sandboxing. Rewrite the curl-based skills to use the ocm request action and drop the apiBaseUrl plumbing. Remove the now-unread .opencode/internal-token file and the sandbox tmpfs mask that hid it; attestation now rejects any tmpfs other than the runtime /tmp mount. * fix(sidebar): wire new-session and new-schedule actions to every page AssistantRedirect never registered a listener for the sidebar's new-session event, so the desktop sidebar CTA on /assistant was a no-op; the Schedules pages had the same gap for new-schedule. Make useSidebarAction the single source of truth for action keys and event dispatch, and warn when an action is dispatched with no mounted handler so an unhandled CTA fails loudly instead of silently. Wire the missing listeners to the existing per-page handlers. * feat(sandbox): forward git credentials into the microVM and add sandbox guest image * feat(sandbox): add git credential forwarding toggle to settings
108 lines
2.6 KiB
Markdown
108 lines
2.6 KiB
Markdown
# Installation
|
|
|
|
Choose your preferred installation method.
|
|
|
|
## Docker (Recommended)
|
|
|
|
Docker is the fastest way to get started and recommended for production use.
|
|
|
|
```bash
|
|
git clone https://github.com/chriswritescode-dev/opencode-manager.git
|
|
cd opencode-manager
|
|
cp .env.example .env
|
|
# Generate AUTH_SECRET and add to .env
|
|
echo "AUTH_SECRET=$(openssl rand -base64 32)" >> .env
|
|
docker-compose up -d
|
|
```
|
|
|
|
Open [http://localhost:5003](http://localhost:5003) in your browser.
|
|
|
|
### What Docker Sets Up
|
|
|
|
The container automatically:
|
|
|
|
- Installs OpenCode if not present
|
|
- Builds and serves the frontend
|
|
- Creates persistent volumes for the workspace, database, and OpenCode binary
|
|
- Configures health checks and auto-restart
|
|
|
|
### Docker Commands
|
|
|
|
```bash
|
|
# Start the container
|
|
docker-compose up -d
|
|
|
|
# Stop and remove containers (named volumes are preserved)
|
|
docker-compose down
|
|
|
|
# Stop and remove containers and all named volumes (workspace, database, OpenCode binary)
|
|
docker-compose down -v
|
|
|
|
# Rebuild the image
|
|
docker-compose build
|
|
|
|
# View logs
|
|
docker-compose logs -f
|
|
|
|
# Restart
|
|
docker-compose restart
|
|
|
|
# Access container shell
|
|
docker exec -it opencode-manager sh
|
|
```
|
|
|
|
### Volumes
|
|
|
|
| Volume | Container Path | Purpose |
|
|
|--------|---------------|---------|
|
|
| `opencode-workspace` | `/workspace` | Repository storage |
|
|
| `opencode-data` | `/app/data` | Database and config |
|
|
| `opencode-bin` | `/home/node/.opencode/bin` | OpenCode binary, persisted across container recreations |
|
|
|
|
## Local Development
|
|
|
|
For contributors who want to develop locally instead of using Docker.
|
|
|
|
### Prerequisites
|
|
|
|
- [pnpm](https://pnpm.io/installation) - Package manager (required for workspaces)
|
|
- [Bun](https://bun.sh) - Backend runtime
|
|
- [OpenCode TUI](https://opencode.ai) - `curl -fsSL https://opencode.ai/install | bash`
|
|
- [Node.js 24+](https://nodejs.org/en/about/previous-releases)
|
|
|
|
### Setup
|
|
|
|
```bash
|
|
# Clone the repository
|
|
git clone https://github.com/chriswritescode-dev/opencode-manager.git
|
|
cd opencode-manager
|
|
|
|
# Install dependencies
|
|
pnpm install
|
|
|
|
# Copy environment configuration
|
|
cp .env.example .env
|
|
|
|
# Start development servers
|
|
pnpm dev
|
|
```
|
|
|
|
This starts:
|
|
|
|
- Backend on http://localhost:5003
|
|
- Frontend on http://localhost:5173 (with HMR)
|
|
|
|
## Verifying Installation
|
|
|
|
After starting the application:
|
|
|
|
1. Open your browser to the appropriate URL
|
|
2. You should see the login page or setup wizard
|
|
3. Check logs if you encounter issues: `docker-compose logs -f`
|
|
|
|
## Next Steps
|
|
|
|
- [Quick Start](quickstart.md) - First steps after installation
|
|
- [First Run Setup](first-run.md) - Creating your admin account
|
|
- [Docker Configuration](../configuration/docker.md) - Advanced Docker settings
|