mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
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