Commit Graph
31 Commits
Author SHA1 Message Date
Chris Scott cbe92c92ad refactor(goals): replace the Manager session-goal API with OpenCode built-in /goal 2026-10-29 12:38:39 -04:00
Chris Scott 469d65de79 docs(readme): refresh the hero screenshot and add a desktop one 2026-10-25 21:57:03 -04:00
Chris Scott 4d227e32da docs: allow declaration-attached doc comments in the code style rules 2026-10-24 14:31:20 -04:00
Chris Scott 19b52ecd58 chore(opencode): move the pinned OpenCode version to 2.1.2
The supported floor is derived from the pin, so this raises the accepted
range to >=2.1.2 <3.0.0 for the bundled image, managed installs, and the
version check that gates startup.

- Dockerfile ARG OPENCODE_VERSION and the shared pin move together
- CI e2e installs 2.1.2 instead of 2.0.24
- contract, installer, manager, registry and settings fixtures follow the new
  floor, keeping their below-floor and wrong-major rejection cases
2026-10-23 14:41:48 -04:00
Chris Scott 2580cdf863 test(e2e): add Playwright suite covering every app route 2026-10-11 22:30:55 -04:00
Chris Scott ea27f481ab chore(release): bump manager to 1.0.0 and refresh README 2026-10-09 11:48:25 -04:00
Chris Scott ae4ce0e81c docs: move documentation to hosted site and refresh branding
Remove the in-repo MkDocs site, its deploy workflow, and the tests that
asserted its content. Repoint README, CONTRIBUTING, and .env.example links
to opencodemanager.app/docs, and update logos, favicon, PWA icons, manifest,
and image alt text to the OpenCode Manager branding.
2026-10-04 18:19:35 -04:00
Chris Scott 8b806e865f ci(ocm-cli): publish via npm OIDC trusted publishing 2026-09-26 13:28:19 -04:00
Chris Scott dacde879d6 feat(opencode): migrate OpenCode Manager to OpenCode 2 (#359)
* feat(opencode): migrate OpenCode Manager to OpenCode 2

Port the backend lifecycle, generated plugins, event aggregation,
schedules, worktrees, provider credentials, MCP, config handling, the
frontend chat model, and the ocm CLI to OpenCode 2.

Adopt @opencode/client 2.0.15 as the single typed V2 API contract,
require OpenCode 2.0.0 or newer (pinned 2.0.15), and delete every
V1-only code path.

* refactor(opencode): reload config in place and drop v1 compatibility shims

Route config/skill/AGENTS.md changes through the OpenCode location reload
API instead of a full server restart, stop auto-resuming interrupted
sessions, remove the restart coordinator and v1 MCP/version shims, and pin
support to OpenCode >=2.0.15 <3.0.0. Adds integration-ready retries,
service-mode launch, ocm-cli repo proxy, and new frontend form/MCP helpers.

* refactor(opencode): consolidate v2 migration helpers and harden install, proxy, and session flows

- extract shared semver and model-ref utilities, reuse across version checks
- share the OpenCode release download script across Docker, entrypoint, dev setup
- unify install/upgrade failure recovery and guard externally managed OPENCODE_BIN
- scope the repo proxy location rewrite and surface ocm proxy errors
- rework frontend session projection, permission lookup, and cache invalidation

* fix(schedules): reject unavailable agents before creating a session

* feat(opencode): add ocm install, schedule agent fallback, and session move guards
2026-09-26 13:16:45 -04:00
Chris Scott 65f5bd0e6a build(docker): bake chromium runtime libs and refresh pinned tools (#357)
* build(docker): bake chromium runtime libs and refresh pinned tools

Install the Chromium runtime libraries in the runner image from Playwright's
own resolver instead of a hand-maintained package list, so a Playwright e2e
suite runs in the Manager container without root or sudo. PLAYWRIGHT_VERSION
is shared with the sandbox guest image and the docker-build workflow.

Refresh the remaining pins: node 24.21.0, pnpm 10.28.1, OpenCode 1.18.31,
microsandbox 0.7.2 and @opencode-ai/sdk 1.18.31. CI moves to Node 24 to match
the image and the documented requirement.

uv stays at 0.12.7. The runner previously fetched the unversioned installer
URL, so UV_VERSION and the workflow build argument had no effect; it now
installs from the versioned URL and asserts the installed version, and the
workflow pins the release instead of resolving the newest tag. The pin cannot
move past 0.12.7 yet because 0.12.8 and later segfault under qemu-user x86_64
emulation, which is how an arm64 host builds the amd64 platform.

* chore(docker): bump the sandbox image digest to the 1.63 build

The guest image was rebuilt and republished for Playwright 1.63.0, uv 0.12.7
and pnpm 10.28.1. Moving the digest is what makes deployments adopt it:
attestation compares the reference string, so a rebuilt image behind the old
digest would never be pulled or recreated.

* build(sandbox): align toolchain pins and verify on native runners

* feat(sandbox): run Docker with persistent guest storage

* chore(docker): pin the Docker-enabled sandbox image
2026-09-19 22:30:29 -04:00
Chris Scott 5beb3432d4 chore(ci): remove the Sandbox Image workflow and document the local build 2026-08-28 12:45:05 -04:00
Chris Scott d63198ec8a fix(sandbox): guard enable path and harden UI rendering performance (#341)
* fix(sandbox): guard enable path and harden UI rendering performance

* chore(deps): allow esbuild postinstall in pnpm onlyBuiltDependencies

* fix(sandbox): align availability reporting and address PR review feedback

* fix(sandbox): block planning without process attestation
2026-08-27 08:58:23 -04:00
Chris Scott ba8e8f4b29 ci(sandbox-image): build only on manual dispatch 2026-08-25 23:56:08 -04:00
Chris Scott 90a3c29c12 feat(sandbox): add KVM-backed agent sandboxing via microsandbox (#338)
* 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
2026-08-25 23:38:52 -04:00
Chris Scott 906e3c4812 fix(ci): resolve opencode version via git ls-remote instead of GitHub API 2026-07-31 14:08:56 -04:00
Chris Scott e53b4fd32c chore: add workflow_dispatch to Docker build workflow 2026-06-18 10:53:08 -04:00
Chris Scott af1013a255 fix: strip v prefix from opencode version in Docker workflow 2026-06-18 10:52:58 -04:00
Chris Scott d59ba90b66 feat(ocm-cli): add --version flag, version display, and publish workflow 2026-05-23 21:42:07 -04:00
Chris Scott 0f9caad98d Migrate memory plugin to standalone repository and remove Kasm files (#182)
Remove packages/memory from monorepo - plugin now lives at
chriswritescode-dev/opencode-memory and is installed from npm.

Update Dockerfile, docs, and workspace config to reflect the change.
Remove Dockerfile.kasm, kasm-startup.sh, and Kasm CI workflow.
2026-04-06 11:47:42 -04:00
Chris Scott 27352ea5cf Refactor Ralph session rotation with watchdog and stall detection (#170)
* Improve scroll-to-bottom UI and session status handling

* Enhance Ralph service with session rotation and watchdog

* Add tests for Ralph session rotation and cleanup

* Add Kasm Docker build workflow
2026-03-24 17:36:35 -04:00
Chris Scott fcfab08b0e Update documentation and configuration for production deployment
- Fix documentation drift across README, AGENTS.md, and CONTRIBUTING.md
- Update Docker configuration with process timing and OAuth env vars
- Simplify shared env config by removing unused Redis and OpenCode API URL
- Add skills documentation to navigation
- Improve .env.example with clearer AUTH_SECRET instructions
2026-03-22 18:54:15 -04:00
Chris Scott b42f7b5010 Resize social preview image to 1200x630 2026-02-13 13:44:36 -05:00
Chris Scott 67ace0ae89 Update README with hero social preview image 2026-02-06 23:26:22 -05:00
Chris Scott e3716bb294 Refactor: Consolidate git services into single GitService class + Settings dialog improvements (#111)
* refactor: consolidate git services into single GitService class

Merges GitBranchService, GitCommitService, GitDiffService, GitFetchPullService,
GitLogService, GitPushService, and GitStatusService into one cohesive GitService
that simplifies architecture and follows SOLID principles. Updates all route
handlers and tests to use the new consolidated service. Moves GitBranch interface
to shared types location.

* Refactor settings dialog to use URL-based state management with tab synchronization

* Update social preview image
2026-02-06 21:59:18 -05:00
Chris Scott 6dab89d6c4 Add GitHub Copilot code review setup and CI workflow (#93) 2026-01-29 08:44:28 -05:00
Chris Scott 5562228703 Add GitHub Actions workflow to deploy MkDocs to GitHub Pages 2026-01-26 23:12:09 -05:00
Chris Scott 43a456317b Fix Docker build: pass OpenCode version to installer and use correct repo 2026-01-13 00:02:30 -05:00
Chris Scott 9851ec06e0 Add version-based Docker cache invalidation for uv/opencode
Alternative approach to PR #37 - instead of busting cache on every build,
use git ls-remote to fetch latest version tags and pass them as build args.
Docker layer only rebuilds when tool versions actually change.

- Move uv install from base to runner stage alongside opencode
- Add UV_VERSION and OPENCODE_VERSION build args as cache keys
- Fetch versions via git ls-remote (no API rate limits)
- Log installed versions in build output for debugging

Ref: #37
2026-01-11 15:51:34 -05:00
b28f069576 Fix/permission request directory (#31)
* Fix permission response by including directory parameter

Extract directory from query key in useActiveRepos hook and pass it
to OpenCodeClient when responding to permissions. Use composite keys
for client and SSE connection tracking to support multiple repos with
the same URL but different directories.

* Keep permission dialog open on response failure and show error toast

* Fix permission request proxying to preserve query parameters

The backend proxy was incorrectly handling URL query parameters when stripping the /api/opencode prefix. This caused the directory parameter to not be passed correctly to the OpenCode server, breaking the permission request/response flow.

Changes:
- Separate pathname and search parameters explicitly
- Only strip /api/opencode from pathname, preserve search params
- Add logging for permission requests to aid debugging
- Update error logging to use correct variables

This fix ensures that permission responses are properly forwarded to the OpenCode server with all necessary query parameters, allowing the session to proceed correctly when users grant permissions.

* Fix permission client lookup when only individual sessions are loaded

The PermissionContext failed to find a client when responding to permissions because it only scanned the sessions list query, but SessionDetail and other pages only load individual sessions via useSession.

Changes:
- Update useActiveRepos to also scan individual session queries
- Match query keys like ['opencode', 'session', url, sessionId, directory]
- Extract session ID from individual session query data
- Build active repos map from both sessions list and individual session queries

This ensures permission dialogs can find the appropriate client to send responses, even when viewing a single session without loading the full sessions list.

* Fix permission client lookup with fallback to query cache

The activeRepos state was often empty when permission dialogs appeared due to timing issues with the React Query cache subscription. This caused No client found for session errors.

Changes:
- Add fallback scan of query cache directly in getClient when activeRepos is empty
- Remove excessive debug logging that was spamming console
- Add minimal log only when fallback is actually used
- Fix query key length checks to be more robust

This ensures permission responses work correctly even if the useActiveRepos hook hasn't yet populated the state, by falling back to scanning the query cache directly to find the session and creating the appropriate OpenCodeClient.

* Add directory-based permission requests with global notification and message auto-refresh

---------

Co-authored-by: OpenCode Agent <agent@opencode.ai>
Co-authored-by: Chris Scott <chris@cstech.dev>
2025-12-27 09:21:45 -05:00
Chris Scott 7cec19f7cc Trigger Docker build only on published releases 2025-12-13 23:05:56 -05:00
Copilotandtheepicsaxguy d6cdf308ec Add Docker build workflow with multi-arch support and caching (#3)
* Initial plan

* Add Docker build workflow with multi-arch support and intelligent caching

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

* Simplify Docker workflow - remove over-engineering

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

* Update docker-build.yml

* Update docker-build.yml

* Fix Dockerfile permission issues for bun and opencode installers

Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: theepicsaxguy <39008574+theepicsaxguy@users.noreply.github.com>
2025-12-03 16:08:01 +01:00