Skip to content

feat(opencode): V2 text.complete alongside V1 trigger - #80

Merged
filipeforattini merged 1 commit into
mainfrom
feat/text-complete-shim
Aug 21, 2026
Merged

feat(opencode): V2 text.complete alongside V1 trigger#80
filipeforattini merged 1 commit into
mainfrom
feat/text-complete-shim

Conversation

@filipeforattini

@filipeforattini filipeforattini commented Aug 21, 2026

Copy link
Copy Markdown

Seventh V1→V2 shim in the series (#70 #72 #75 #76 #77 #78 #79). Adds SessionEvent.Text.Complete (live waterfall event, type session.next.text.complete) carrying { sessionID, messageID, partID, text } and wires EventV2Bridge.waterfall into the text-complete dispatch next to the existing V1 plugin.trigger('experimental.text.complete', ...).

What this PR does

  • Adds Text.Complete as a sibling to the existing Text.Started/Delta/Ended.
  • The text-complete dispatch now runs a waterfall with a single listener that delegates to the V1 trigger so existing plugins keep working unchanged.
  • Listeners return { text } to transform the final text; throwing short-circuits the text part.

Pattern

Same as the rest: waterfall returns the (possibly transformed) result, V1 listener falls back to the V1-mutated shared value when no V2 plugin exists, and V2 plugins get right of last say when they do.

Out of scope

  • experimental.compaction.autocontinue (V1 doesn't mutate, just decides continue/stop — observation only)
  • Agent loop decomposition (turn flow as events)
  • Profiles + bundles

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Adds `SessionEvent.Text.Complete` (live waterfall event, type `session.next.text.complete`) carrying `{ sessionID, messageID, partID, text }` and wires `EventV2Bridge.waterfall` into the text-complete dispatch next to the existing V1 `plugin.trigger('experimental.text.complete', ...)`.

The waterfall currently has a single listener that delegates to the V1 trigger so existing plugins keep working. Listeners return `{ text }` to transform the final text; throwing short-circuits the text part. Same shim pattern as #70 #72 #75 #76 #77 #78 #79.
@filipeforattini
filipeforattini merged commit 6e2e4ee into main Aug 21, 2026
4 of 7 checks passed
@filipeforattini
filipeforattini deleted the feat/text-complete-shim branch August 21, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant