Skip to content

fix(acp-registry): map OMP ask forms to single questions with choices - #29964

Closed
luminousify wants to merge 1 commit into
pingdotgg:mainfrom
luminousify:fix-omp-acp-elicitation-form
Closed

luminousify wants to merge 1 commit into
pingdotgg:mainfrom
luminousify:fix-omp-acp-elicitation-form

Conversation

@luminousify

Copy link
Copy Markdown

Summary

omp (oh-my-pi) askDialog elicits a JSON-schema form the generic ACP fallback cannot read, so its ask tool breaks in three visible ways (#23505). This adds an OMP form handler at the existing provider flavor boundary, mirroring droidAcp.ts.

 generic handleElicitation fallback
- options = enum values only
- every property -> its own question (q0__other becomes step 2/2)
- header = title, question = description   (omp sends them reversed)
+ ompAcp.ts extractOmpElicitationForm
+ options = oneOf consts (labels with descriptions)
+ q{N}__other folded into the question's native custom answer
+ header = description (fallback "Question N"), question = title
+ respond: selected label -> q{N}; custom text -> q{N}__other

Selected when the registry agent is omp or the local command basename is omp / omp.exe / omp.cmd. Unrecognized forms keep the generic fallback; other providers are untouched.

Why the answer routing matters: omp reads q{N} as one of the option labels and q{N}__other as the custom text, and drops a q{N} value that is not a label - so on current main a typed custom answer is silently discarded, not just mis-rendered.

Evidence

  • Before (flavor wiring disabled, tests added first):
    Tests 3 failed | 1 passed - option-label, custom-answer, and cancellation scenarios fail; only the unrelated-form fallback passes.
    After (wiring restored): Tests 4 passed - OMP elicitation $scenario replay cases.

  • Full AcpAdapterV2.test.ts: 91 passed | 1 failed; the one failure (native session forks) reproduces on clean main in this environment and is unrelated.

  • vp lint clean on the three files; tsc --noEmit clean for provider-acp-registry and apps/server; commit hooks (fmt, lint, knip) passed.

  • Wire shape verified against omp 18.16.0 packages/coding-agent/src/modes/acp/acp-agent.ts (askDialog -> unstable_createElicitation), live-reproduced beforehand: card showed 2/2, no options, header/question swapped, custom answer dropped.

Scope limits: multi-select forms (items.anyOf) are not recognized - the generated ACP decoder rejects that schema upstream of the flavor hook, so they never reach extractElicitationForm. An attachment-appended option selection degrades to a custom answer; omp resolves attachment references in custom input.

Fixes #23505 (single-choice case). Independently implemented from the omp wire contract; happy to defer to #24012 if maintainers prefer that branch - the tests here cover selected labels, custom-answer routing, cancellation, and generic fallback either way.

Merge Danger

Door: two-way - one new file, a six-line wiring change, additive tests; deleting the wiring reverts behavior for everyone except local omp installs.

Blast Radius: narrow - only OMP-detected instances change; the generic fallback and every other provider keep their exact current path.

omp's askDialog elicits q{N} fields with the question in title, the
header in description, oneOf consts as option labels, and an
unconditional q{N}__other free-text companion. The generic ACP
fallback reads options only from enum, promotes every property to its
own question, and maps the title/description pair the other way, so
the card loses its options, doubles every question into a phantom
"Other (type your own)" step, and swaps the header with the question
text. Typed custom answers land in q{N}, which omp drops because it
only accepts option labels there.

Add extractOmpElicitationForm at the existing provider flavor boundary
(mirrors droidAcp.ts), selected when the registry agent is omp or a
local omp/omp.exe/omp.cmd command. It folds the companion into the
question's native custom answer, maps the fields correctly, and
responds with the selected label in q{N} or custom text in
q{N}__other. Unrecognized forms keep the generic fallback.

Verified against omp 18.16.0 acp-agent.ts askDialog on the wire;
replay tests fail without the flavor wiring and pass with it.
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 3, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at c92fdfa

Macroscope's review found this PR approvable — OMP ask forms now display choices as single questions and translate custom answers into OMP’s expected response fields. The change is provider-scoped, preserves fallback handling, and retains explicit user input before sending responses.

You can add or adjust custom eligibility rules. Learn more.

@luminousify luminousify closed this Nov 3, 2026
CoultonF added a commit to CoultonF/dotfiles that referenced this pull request Nov 5, 2026
T3 Code doesn't handle OMP's ask tool correctly yet. It may work in a
future release, so drop this rule once these are fixed:

Fixes in progress (none merged):
- pingdotgg/t3code#24012 preserve OMP single-choice questions and custom
  answers (main one to watch)
- pingdotgg/t3code#21770 show titled options sent by any ACP agent
- pingdotgg/t3code#29964 earlier OMP fix, closed unmerged

Related open issues:
- pingdotgg/t3code#27054 2 questions become 4 steps; placeholders sent
- pingdotgg/t3code#27053 question panel omits the question text
- pingdotgg/t3code#31495 multi: true questions rejected (OMP 18.16)
- pingdotgg/t3code#26339 same question shown twice via ACP Registry

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: OMP questions show as two steps with no options, and the question text runs out of the card

1 participant