mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 22:03:48 +00:00
1.2 KiB
1.2 KiB
Spec: TUI Control Flow
Proposed API Changes
- Add a TUI control queue and state machine to the core session manager.
- Expose request/response transport for OpenCode TUI controls.
Summary OpenCode’s TUI endpoints allow a remote controller to drive the UI. We need a server-side queue for control messages and a way to emit responses.
OpenCode Endpoints (Reference)
GET /opencode/tui/control/nextPOST /opencode/tui/control/responsePOST /opencode/tui/append-promptPOST /opencode/tui/clear-promptPOST /opencode/tui/execute-commandPOST /opencode/tui/open-helpPOST /opencode/tui/open-modelsPOST /opencode/tui/open-sessionsPOST /opencode/tui/open-themesPOST /opencode/tui/publishPOST /opencode/tui/select-sessionPOST /opencode/tui/show-toastPOST /opencode/tui/submit-prompt
Core Functionality Required
- Persistent queue of pending UI control actions.
- Response correlation (request/response IDs).
- Optional integration with session events for UI feedback.
OpenCode Compat Wiring + Tests
- Replace stubs for all
/tui/*endpoints. - Add E2E tests for control queue ordering and response handling.