Files
opencode-manager/backend
Chris Scott d07eb7f523 feat: switch workspace plugin to remote adaptor with manager proxy
Switch the @opencode-manager/workspace-plugin adaptor from type local to
type remote so opencode TUIs running on machines without filesystem access
can use the manager's managed opencode server as their workspace backend.

Phase 1 - Plugin adaptor:
- Update target() to return type remote with manager URL and bearer auth
- Export makeAdaptor for testing
- Add tests for remote URL construction, slug encoding, and trailing slash

Phase 2 - HTTP proxy route:
- Add ALL /opencode/:slug/* catch-all proxy in workspace-plugin routes
- Reuses existing proxyRequest helper with slug-to-directory translation
- Rewrites inbound URL to /api/opencode/* shape for shared proxy logic
- Includes bearer token scope validation and project service

Phase 3 - WebSocket proxy:
- Extract verifyPluginBearerAuth as named function for reuse
- Attach second WebSocket proxy mount for /api/workspace-plugin/opencode prefix
- Both /api/opencode and /api/workspace-plugin/opencode prefixes supported

Phase 4 - Tests:
- Add 8 backend route tests covering auth, proxy forwarding, and POST body
- Add 3 plugin adaptor tests for remote target construction
2026-04-20 23:05:44 -04:00
..
2025-11-23 23:25:27 -05:00
2025-11-23 23:25:27 -05:00
2025-11-23 23:25:27 -05:00