Repository navigation
fix(dialog): handle opencode builds that advertise forms they never show - #1773
Merged
Merged
Conversation
opencode advertised MCP elicitation from 2.0.18 but dropped every elicitation/create until 2.1.4 (anomalyco/opencode#58184). ue-mcp read the capability, resolved dialogs to interactive, and the blocked call waited on a form the person never saw. The elicitation probe now treats opencode below 2.1.4 as unable to elicit, so dialogs default to defer and interactive falls back to defer. The defer refusal names the opencode version and says to upgrade, and the elicit function refuses rather than sending a request that cannot be answered. opencode 2.1.4 and later are untouched and keep the form. Refs #1459
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1459
opencode advertised MCP elicitation from 2.0.18 but never displayed the form until 2.1.4 (anomalyco/opencode#58184). ue-mcp resolved blocking dialogs to
interactiveon those builds and the call waited on a form nobody saw.elicitationUnrenderedNoteinsrc/dispatch/client-quirks.tsidentifies opencode below 2.1.4 by theclientInfoit sends (opencode, app version).buildElicitreports such a client as unable to elicit, so dialogs default todeferand an explicitinteractivefalls back todefer. Its elicit function refuses instead of sending an unanswerable request.elicitation: { form, url }, renders form schemas (enum, oneOf, multiselect arrays, boolean) in the TUI, desktop and web, and allows a 12 hour tool call, so the existing interactive path works by spec.Verification:
npx tsc --noEmit,npx vitest run tests/unit/opencode-elicitation.test.ts tests/unit/client-quirks.test.ts tests/unit/dialog-guard.test.ts tests/unit/stop-editor-unsaved.test.ts tests/unit/guards.test.ts tests/unit/pie-script-watch.test.ts, integrationtests/integration/dialog-mode.test.ts. Two failures on integration/next (module-inventorymissingeditor/module-owner.ts,offlineclassification) predate this branch.Remaining live check: drive a blocking dialog from opencode 2.1.4+ and confirm the form appears and the chosen button is pressed.