You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a3eaeea
Browse filesBrowse the repository at this point in the historyBrowse files
opencode: TUI-inject mode — make interactive sessions injectable
Adds EDC_OPENCODE_TUI=1: instead of spawning a headless server + session, the
adapter attaches to a shared opencode server (EDC_OPENCODE_URL) and delivers each
/inject event by typing it into the attached TUI via POST /tui/append-prompt +
/tui/submit-prompt — so the human SEES the injected turn (works around
anomalyco/opencode#8564). In TUI mode edc skips session creation + self-registration
(the plugin owns registration). Verified e2e: /inject -> visible turn -> reply.
through `POST /tui/appendPrompt` + `/tui/submitPrompt` (enters as if typed), or watch via the
155
-
presence cockpit / SSE rather than the raw TUI.
152
+
**Known gap → solved for interactive sessions.** An externally-injected turn is processed by the
153
+
model but may not render in the raw TUI ([sst/opencode#8564](https://github.com/sst/opencode/issues/8564)).
154
+
`edc opencode serve` in **TUI mode** (`EDC_OPENCODE_TUI=1` + `EDC_OPENCODE_URL=<shared server>`)
155
+
works around it: instead of `prompt_async`, it types each `/inject` event into the attached session
156
+
via `POST /tui/append-prompt` + `/tui/submit-prompt`, so the human **sees** the turn land.
157
+
`presence`'s `mesh opencode [dir]` wires this automatically — a decoupled `opencode serve` +
158
+
`opencode attach` + a TUI-mode sidecar on a fixed inject port — making an interactive OpenCode
159
+
session attachable **and** injectable via `edc /inject`.
156
160
157
161
**Trust boundary.** Like Codex, OpenCode has no native `source=system` marker — an injected event
158
162
arrives as ordinary user input. `edc` reconstructs the boundary in text, but treat every injected
0 commit comments