Skip to content

feat(omp): show native questions in chat - #30688

Closed
NarryG wants to merge 4 commits into
stablyai:mainfrom
NarryG:feat/acp-form-elicitation
Closed

NarryG wants to merge 4 commits into
stablyai:mainfrom
NarryG:feat/acp-form-elicitation

Conversation

@NarryG

@NarryG NarryG commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

OMP can ask you a question while it works, but native chat could not display its forms. Supported forms now appear in Orca's existing question cards. You can answer, decline or cancel; Full access never answers these human decisions for you.

What Changed

Opt OMP into form-only ACP elicitation when a handler is available. Translate supported choices, text, numbers and confirmations into existing desktop/mobile cards, then validate answers on the execution host. Keep the question and field instructions visible, including text-only asks. Preserve Other text, exclusive choices, empty values and omitted optional choices; blank empty-string choices have a readable label without changing the answer. Accept, decline and cancel stay distinct. Unsupported schemas fail explicitly; URL elicitation is not included.

Why

Reusing ACP and the existing question cards avoids another prompt framework. Bounded host validation prevents malformed or conflicting answers from becoming approval. Existing private request/authentication handling remains unchanged.

Linked Issue

Fixes #26924.

Visual Proof

Windows: before at 51530bb, after at cbee6dff.

Before: same native command, no form cards.

Before: native forms unavailable

After: OMP multi-select waits for the person under Full access.

After: OMP form in existing question card

Resolved answers, decline and cancel

Resolved native form answers

Testing

  • Rebuilt Windows app at cbee6dff: ten real native form scenarios; light/dark pending cards and 150 ms added ACP input latency (not real SSH).
  • Automated coverage for schema/answer boundaries, empty/omitted values, exclusive/Other choices, decline, cancellation and mobile responses.
  • Final ad2a53d4 source: full Linux lint, typecheck, changed-code quality and all four canonical pnpm test shards passed in run 39241886811.
  • Rebuilt hidden Windows app at 508f560: clicked the visible Empty value option; native OMP received exactly an empty string, not omission. Final ad2a53d4 production smoke separately checked explicit-title/constant precedence and exact answer roundtrips; the app was not rerun at that later head.
  • Affected empty-value regressions: two passed, 23 unselected; changed-code quality passed. Earlier cbee6dff Windows full build/typecheck and context regressions passed.
  • Earlier broader Windows focus had six SQLite fixture-cleanup EBUSY failures; no fixture workaround, default change or skip is included.
  • The 508f560 proof completed, but its controller exited 1 while waiting for the debugger; Electron exit code was unobserved. A fresh read-only census found no recorded private app/native owners, then private resources were removed without process signals. Auxiliary conversation naming tried a dummy key and received 401; no successful or paid inference.
  • Upstream PR Checks at ad2a53d4 is action_required with no jobs: run. Fork verification does not replace maintainer approval or the upstream aggregate.

AI Disclosure

OpenAI Codex GPT-6.1 Sol assisted implementation, integration and review. Earlier independent Standards review used Claude Fable 5.1. Checks were agent-run, not human testing.

Review

Cross-platform: existing Node/TypeScript paths; no new OS-specific behavior. Local/folder/SSH: execution host owns validation and settlement. Agents: OMP opt-in only; other integrations unchanged. Compatibility: optional journal fields and existing answer transport; no new stream opcode or Git-provider assumption. Security/performance: bounded schemas and answers, no automatic approval or credential changes. UI/mobile: existing cards/tokens, visible question context and explicit decline/cancel; no new prompt framework.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer material copied.

Notes

Native timeouts without a withdrawal can leave a pending card; Stop clears it. Rendered checks were Windows-only; real SSH/WSL, mixed-peer, macOS and mobile devices were not tested. No dependency or release-version changes.

Author

GitHub @NarryG · X @NarryOnTheNet.

Checklist

  • Focused change, rationale, issue, genuine before/after and review dimensions documented.
  • Final-source Linux checks completed; Windows limits and pending upstream workflow approval disclosed above.

@NarryG
NarryG requested a review from brennanb2025 as a code owner October 19, 2026 09:26
@NarryG

NarryG commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 78025890-3879-4323-8e23-7fc9c69a9912
📥 Commits

Reviewing files that changed from the base of the PR and between 508f560 and ad2a53d.

📒 Files selected for processing: 1
  • src/main/acp/acp-form-elicitation.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

📝 Walkthrough

OMP ACP sessions now advertise form elicitation and convert supported requests into native-chat questions with validated answers, decline handling, and cancellation handling. Desktop and mobile question flows support exclusive options and whole-form decline actions. Shared RPC schemas validate grouped answers, including packed answers that exceed the scalar option-ID limit. Receipts display declined copy, and the documentation describes form behavior and turn cancellation.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to ad2a5

No actionable issue is established in the reviewed change; it is ready to merge after routine checks.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Linked Issues check Warning For [#26924], the PR implements OMP-only form advertisement, supported schema conversion, native desktop and mobile cards, host-side answer validation, accept, decline, Stop cancellation, and late-req… Implement provider timeout or withdrawal handling for [#26924] when ACP exposes that event. Remove the pending card and reject late answers on that path. Add an automated test for the provider-triggered timeout or withdrawal.
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 36 functions across 36 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the primary change: showing OMP native questions in chat. It is concise and specific.
Out of Scope Changes check Passed The changes stay within [#26924]. ACP negotiation, form conversion, bounded validation, native desktop and mobile cards, structured answer transport, decline and cancellation handling, localization, d…
Description check Passed The pull request description is complete and follows the repository template. It explains the change, rationale, linked issue, visual proof, testing, AI disclosure, compatibility considerations, limit…
Full details: Out of Scope Changes check

Explanation

The changes stay within [#26924]. ACP negotiation, form conversion, bounded validation, native desktop and mobile cards, structured answer transport, decline and cancellation handling, localization, documentation, and supporting tests all implement OMP form elicitation in chat. No unrelated product, dependency, or release changes are shown.

Full details: Description check

Explanation

The pull request description is complete and follows the repository template. It explains the change, rationale, linked issue, visual proof, testing, AI disclosure, compatibility considerations, limitations, and checklist status. It also clearly identifies untested environments and known limitations.

Full details: Linked Issues check

Explanation

For [#26924], the PR implements OMP-only form advertisement, supported schema conversion, native desktop and mobile cards, host-side answer validation, accept, decline, Stop cancellation, and late-request rejection. The timeout requirement remains unmet. AcpStructuredPrompts withdraws requests on an aborted signal or withdrawAll(), but no provider-timeout notification path removes a card. The current tests cover Stop cancellation and late requests, not provider-triggered timeout withdrawal.

Resolution

Implement provider timeout or withdrawal handling for [#26924] when ACP exposes that event. Remove the pending card and reject late answers on that path. Add an automated test for the provider-triggered timeout or withdrawal.

  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 19d8d2bd-3984-4726-b76f-00dfca98f304
📥 Commits

Reviewing files that changed from the base of the PR and between 0e1d0ad and cbee6df.

📒 Files selected for processing: 39
  • docs/site/content/docs/agents/native-chat.mdx
  • mobile/src/session/MobileNativeChatQuestion.tsx
  • mobile/src/session/MobileNativeChatResolutionReceipt.tsx
  • mobile/src/session/mobile-native-chat-question.ts
  • mobile/src/session/mobile-structured-agent-prompts.ts
  • mobile/src/session/mobile-structured-grouped-question.ts
  • mobile/src/session/mobile-structured-question-consumer.test.tsx
  • mobile/src/session/use-mobile-structured-prompt-responses.ts
  • src/main/acp/acp-dialects/acp-dialect.ts
  • src/main/acp/acp-dialects/antigravity-dialect.ts
  • src/main/acp/acp-dialects/grok-requests.ts
  • src/main/acp/acp-form-elicitation.test.ts
  • src/main/acp/acp-form-elicitation.ts
  • src/main/acp/acp-launch-specs.ts
  • src/main/acp/acp-session-runtime.ts
  • src/main/acp/acp-structured-acquire.ts
  • src/main/acp/acp-structured-adapter.test-support.ts
  • src/main/acp/acp-structured-prompts.ts
  • src/main/acp/acp-timeline-requests.ts
  • src/main/native-chat/agent-session-journal/journal-prompt-body-bounds.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-grouped-prompt.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-turns-prompt.ts
  • src/renderer/src/components/native-chat/NativeChatQuestionCard.test.tsx
  • src/renderer/src/components/native-chat/NativeChatQuestionCard.tsx
  • src/renderer/src/components/native-chat/NativeChatQuestionOptionRow.tsx
  • src/renderer/src/components/native-chat/NativeChatResolutionReceipt.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredQuestionCard.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredQuestionCard.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/shared/agent-session-journal-schemas.ts
  • src/shared/agent-session-journal-types.ts
  • src/shared/agent-session-question-answer.ts
  • src/shared/native-chat-ask-types.ts
  • src/shared/native-chat-resolution-receipt.ts
  • src/shared/rpc-contract/structured-agent-session-agent-params.test.ts
  • src/shared/rpc-contract/structured-agent-session-params.ts
  • src/shared/rpc-contract/structured-agent-session-question-answers.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@NarryG

NarryG commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Current head 3e3b3ed corrects the one actionable documentation thread. Please reassess the two summary warnings too:

  • Docstring percentage: repository AGENTS.md requires concise non-obvious WHY comments only, explicitly not verbose/obvious HOW walkthroughs. Adding comments solely to reach 80% would violate repository standards.
  • Provider timeout/withdrawal: the disclosed limit is an OMP-local timeout for which no ACP cancellation notification is sent; Orca cannot infer that remote event or invent a matching timeout without changing behavior. AcpStructuredPrompts.ts:61-64,91-103,129-154 withdraws on actual context abort, handles already-aborted/synchronous-cancellation races, and refuses late answers after withdrawal; acp-form-elicitation.test.ts:330-373 exercises Stop and late answers. Native OMP18.12.2 actual transport was exercised without inference in the supplied verification. Please identify a concrete provider wire method/payload currently emitted but unhandled if the warning refers to an observable cancellation path rather than the explicitly disclosed absent notification. Do not substitute an arbitrary deadline. The limitation remains explicit in docs and PR description.

@NarryG

NarryG commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@NarryG

NarryG commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai Please respond to the remaining summary warnings, not just rerun review.

The current summary marks exact head3e3b3ed2ad7675f1254f17da7aeff91d8e83d5cd reviewed/minimal risk with no remaining issue blocking the docs correction, but still asks for an unspecified provider timeout/withdrawal signal. Which concrete ACP notification method and payload does OMP actually send on its local dialog timeout, and which handler currently drops it? The documented limitation is specifically a timeout with no withdrawal sent, not an ignored observed signal. We must not invent a host deadline, infer remote process state from silence, change provider defaults, or fabricate a cancellation notification. If no actual wire signal exists, please classify this as the documented upstream transport limitation rather than an actionable Orca handler defect. Orca-owned Stop/context-abort withdrawal and late-answer refusal remain implemented.

Also please waive the percentage-only docstring warning in favor of this repository AGENTS.md rule: concise non-obvious comments only, WHY not HOW. We will not pad obvious function comments solely to satisfy an arbitrary percentage. No runtime source/default/test changes are proposed for either warning.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 196eb52a-3942-4660-9eb2-8554e08dd85f
📥 Commits

Reviewing files that changed from the base of the PR and between 0e1d0ad and 3e3b3ed.

📒 Files selected for processing: 39
  • docs/site/content/docs/agents/native-chat.mdx
  • mobile/src/session/MobileNativeChatQuestion.tsx
  • mobile/src/session/MobileNativeChatResolutionReceipt.tsx
  • mobile/src/session/mobile-native-chat-question.ts
  • mobile/src/session/mobile-structured-agent-prompts.ts
  • mobile/src/session/mobile-structured-grouped-question.ts
  • mobile/src/session/mobile-structured-question-consumer.test.tsx
  • mobile/src/session/use-mobile-structured-prompt-responses.ts
  • src/main/acp/acp-dialects/acp-dialect.ts
  • src/main/acp/acp-dialects/antigravity-dialect.ts
  • src/main/acp/acp-dialects/grok-requests.ts
  • src/main/acp/acp-form-elicitation.test.ts
  • src/main/acp/acp-form-elicitation.ts
  • src/main/acp/acp-launch-specs.ts
  • src/main/acp/acp-session-runtime.ts
  • src/main/acp/acp-structured-acquire.ts
  • src/main/acp/acp-structured-adapter.test-support.ts
  • src/main/acp/acp-structured-prompts.ts
  • src/main/acp/acp-timeline-requests.ts
  • src/main/native-chat/agent-session-journal/journal-prompt-body-bounds.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-grouped-prompt.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-turns-prompt.ts
  • src/renderer/src/components/native-chat/NativeChatQuestionCard.test.tsx
  • src/renderer/src/components/native-chat/NativeChatQuestionCard.tsx
  • src/renderer/src/components/native-chat/NativeChatQuestionOptionRow.tsx
  • src/renderer/src/components/native-chat/NativeChatResolutionReceipt.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredQuestionCard.test.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredQuestionCard.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/shared/agent-session-journal-schemas.ts
  • src/shared/agent-session-journal-types.ts
  • src/shared/agent-session-question-answer.ts
  • src/shared/native-chat-ask-types.ts
  • src/shared/native-chat-resolution-receipt.ts
  • src/shared/rpc-contract/structured-agent-session-agent-params.test.ts
  • src/shared/rpc-contract/structured-agent-session-params.ts
  • src/shared/rpc-contract/structured-agent-session-question-answers.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

Comment thread src/main/acp/acp-form-elicitation.ts Resolved
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
git rev-parse HEAD
fd -i '^AGENTS\.md$|^acp-structured-prompts\.ts$|^acp-form-elicitation\.test\.ts$|^native-chat\.mdx$'
rg -n -C 4 'WHY|HOW|non-obvious|comments|docstring' AGENTS.md
ast-grep outline src/main/acp/acp-structured-prompts.ts --items all
sed -n '1,210p' src/main/acp/acp-structured-prompts.ts
ast-grep outline src/main/acp/acp-form-elicitation.test.ts --items all
sed -n '315,390p' src/main/acp/acp-form-elicitation.test.ts
rg -n -C 3 'timeout|withdraw|cancell|OMP' docs/site/content/docs/agents/native-chat.mdx

Length of output: 13037


@NarryG, I withdraw both summary warnings for head 3e3b3ed2ad7675f1254f17da7aeff91d8e83d5cd.

Provider timeout/withdrawal: I cannot identify a concrete ACP notification method, payload, or Orca handler that drops an OMP-local dialog-timeout signal. My warning implied an observable signal without evidence. That was incorrect.

The reported behavior is a documented upstream transport limitation, not an actionable Orca handler defect. Without a withdrawal notification, Orca cannot detect that remote timeout from silence. No host deadline, provider-default change, or fabricated cancellation notification is warranted.

I verified that AcpStructuredPrompts.handle handles context abort, already-aborted requests, and synchronous-cancellation races. Withdrawal prevents late answers from claiming the request. The form tests cover Stop, late requests, and late-answer rejection. The documentation states the remaining upstream limitation.

Docstring percentage: I waive the percentage-only warning for this PR. AGENTS.md requires concise, non-obvious comments that explain WHY, not HOW. Adding obvious comments solely to reach 80% would conflict with that rule.

Neither warning requires runtime source, default, or test changes. Neither is a blocker for the documentation correction. Thanks for the guidance.


✏️ Learnings added
Learnt from: NarryG
URL: https://github.com/stablyai/orca/pull/30688

Timestamp: 2026-10-19T10:32:45.194Z
Learning: In stablyai/orca, AGENTS.md requires concise, non-obvious comments that explain WHY rather than HOW. A docstring-percentage shortfall alone does not justify adding obvious function comments or comment padding.
Learnt from: NarryG
URL: https://github.com/stablyai/orca/pull/30688

Timestamp: 2026-10-19T10:32:45.194Z
Learning: For stablyai/orca OMP ACP form elicitation, the reported OMP 18.12.2 local dialog timeout sends no ACP withdrawal notification. Treat this as the documented upstream transport limitation, not an Orca handler defect without evidence of a concrete emitted method and payload that Orca ignores. Do not propose an arbitrary host deadline, infer remote process state from silence, change provider defaults, or fabricate cancellation notifications. Orca-owned Stop/context-abort withdrawal and late-answer refusal are implemented in src/main/acp/acp-structured-prompts.ts, with Stop and late-answer regression coverage in src/main/acp/acp-form-elicitation.test.ts.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@NarryG

NarryG commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@NarryG

NarryG commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@hadufer

hadufer commented Nov 4, 2026

Copy link
Copy Markdown

+1, this is blocking for us. We run OMP from Orca's chat UI on Windows. Right now the model has no ask tool there, and tool approvals are denied silently (see can1357/oh-my-pi#11686, labeled wontfix on the OMP side, so the fix has to land in Orca). Could a maintainer review this PR? Happy to test a build.

@AmoabaKelvin

Copy link
Copy Markdown
Collaborator

Thanks for tracking this down. You found the real cause: Orca never advertised form elicitation, so OMP left out ask. Your branch had drifted about 4,000 commits behind main, so I rebuilt the core of it as a smaller, host-side change in #38684 and credited you as co-author. It also sets PI_NO_PTY, because advertising forms makes OMP's pty: true bash fail in ACP. We'll close this one once #38684 merges.

@AmoabaKelvin

Copy link
Copy Markdown
Collaborator

Closing now that #38684 is merged. It's built on what you found here, and you're credited as co-author. Thanks!

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.

[Feature]: Support ACP form elicitation so OMP sessions started in the chat UI get the ask tool

3 participants