Merge branch 'sidecars-opencode' into sidecars
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { MessageCost, ChatEvent, TurnMessage } from '../api/chat/types';
|
||||
import type { MessageCost, TurnMessage } from '../api/chat/types';
|
||||
|
||||
// ── Envelope ──
|
||||
|
||||
@@ -54,9 +54,12 @@ export type SidecarEvent =
|
||||
| { type: 'email:new'; userEmail: string }
|
||||
// OpenCode — the sidecar reports where its `opencode serve` is listening (random port) on connect
|
||||
| { type: 'opencode:server'; port: number }
|
||||
// OpenCode turn streaming (analog of claude:*): spawned ack, per-event stream, session id report
|
||||
// OpenCode turn streaming (analog of claude:*): spawned ack, per-message stream, session id report
|
||||
| { type: 'opencode:spawned'; id: string; sessionKey: string }
|
||||
| { type: 'opencode:event'; sessionKey: string; event: ChatEvent }
|
||||
// Same contract as `claude:message`: a finished turn message the sidecar has already committed to
|
||||
// chat_session_events, plus the cursor id it landed on. Officer relays it and folds it into its
|
||||
// in-memory transcript; it does not translate or persist.
|
||||
| { type: 'opencode:message'; sessionKey: string; msg: TurnMessage; seq?: number }
|
||||
| { type: 'opencode:session'; sessionKey: string; sessionId: string }
|
||||
| { type: 'opencode:error'; id: string; error: string }
|
||||
// Music — the sidecar reports where its audio-streaming HTTP server is listening (random port) on connect
|
||||
@@ -117,6 +120,7 @@ export type OpenCodeRunParams = {
|
||||
cwd?: string; // passed to `opencode run --dir` — hard-re-anchors tools to this directory
|
||||
model?: string; // `providerID/modelID` (e.g. opencode/claude-haiku-4-5); passed to --model verbatim
|
||||
resumeSessionId?: string; // OpenCode `ses_…` id to continue (`--session`)
|
||||
durable?: boolean; // commit turn output to chat_session_events (default true) — see ClaudeSpawnStreamingParams
|
||||
};
|
||||
|
||||
// ── VNC types ──
|
||||
|
||||
Reference in New Issue
Block a user