opencode: add the OpenCode sidecar (step 1 — serve lifecycle + port report)
New officer-opencode sidecar (same philosophy as officer-claude): a singleton that owns an `opencode serve` running from DATA_PATH/opencode-sidecar (created if missing) on a random port, registers with the API as capability 'opencode', and reports its port via a new `opencode:server` protocol event. The API stores it (sidecar-server.ts, wired in server.tsx via getOpenCodeServerUrl). ecosystem.config.cjs runs the sidecar instead of a bare pm2 serve. Turn-running + API rewiring come in later steps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,8 @@ export type SidecarEvent =
|
||||
| { type: 'vnc:error'; id: string; error: string }
|
||||
// Email
|
||||
| { type: 'email:new'; userEmail: string }
|
||||
// OpenCode — the sidecar reports where its `opencode serve` is listening (random port) on connect
|
||||
| { type: 'opencode:server'; port: number }
|
||||
// Generic
|
||||
| { type: 'error'; id?: string; error: string };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user