Skip to content

OMP commands, options and composer over ACP #71

Open

Description

@44madfire

Summary

Give every legacy OMP slash command a defined ACP outcome, switch models over config options, and keep composer behaviors (mentions, file/image references) at parity.

Context

  • 44madfire/orca#20 parity rows: model switching, thinking/session options, slash commands, local commands such as /usage, skills/autocomplete, attachments.
  • Legacy catalog: 22 OMP commands (src/shared/native-chat-slash-commands.ts:100-126 @76d1b7b), all host-claimed because OMP has no profile (src/shared/native-chat-agent-profiles.ts:104-113); /context answered locally (:117), /usage typed into the TUI (:118).
  • Structured composer answers every claimed command except model/effort/clear/compact with "not available" (src/shared/structured-agent-session-composer.ts:136-140,179-181 @76d1b7b).
  • OMP ACP executes builtins with a text-mode handle and forwards everything else — TUI-only builtins, their aliases and unknown tokens — to the model as prompt text with stopReason: end_turn (packages/coding-agent/src/slash-commands/acp-builtins.ts:53-54,59-70, packages/coding-agent/src/modes/acp/acp-agent.ts:1025 @53f253f).
  • Verified by source and live omp acp 18.6.3 probes (docs/plans/omp-acp-migration/v2/risk-findings/acp-commands.md): of the 22 catalog commands, 11 are handled (model, switch, compact, session, rename, context, usage, fast, tools, jobs, export) and 11 are TUI-only (clear, new, resume, fork, branch, tree, git, settings, extensions, hotkeys, plan — builtin-modes.ts:326-345 has only handleTui). Forwarded commands produced fabricated outcomes ("Screen cleared" with history intact) and real tool calls (/plan 16, /rewind 28 over 90 s). /compact <text> treats any argument as focus and really compacts (same as the TUI); /export <file> writes into the session cwd; /trace (advertised, not in the catalog) starts a loopback stats server.
  • OMP ACP plan mode is a session mode: session/set_mode plan, offered when OMP's plan setting is on (acp-agent.ts:746-755,1829-1839 @53f253f).
  • Model/effort writes use session/set_config_option when the agent offers the selects (src/main/acp/acp-structured-options.ts:91-101 @76d1b7b); OMP offers model and thinking/thought_level (acp-agent.ts:1739-1786 @53f253f).
  • Without image input the structured composer references images by path (src/renderer/src/components/native-chat/use-native-chat-resolved-path-attachments.ts:19-20,122-123 @76d1b7b); legacy uses OMP's file-URI form for paths with both quote kinds (src/shared/agent-image-paste.ts:43-56).

Scope

  • OMP profile for the structured transport: exactly the 11 handled catalog commands pass through as text; /model and /switch open Orca's picker (an argument applies through config).
  • /plan stays claimed and toggles ACP plan mode via session/set_mode (explicit message when OMP does not offer the plan mode); never sent as text.
  • TUI-only commands stay claimed: /new opens a new OMP chat tab; resume/fork/branch/tree/git/settings/extensions/hotkeys and the /rewind alias show an explicit message with an "Open OMP in a terminal tab" action, which starts a separate session (replaced by Continue in Terminal once Post-cutover migration: persisted ACP↔Terminal handoff for OMP chats #84 lands, post-cutover); /clear passes through once ACP: reject TUI-only slash commands explicitly; implement /clear in text mode oh-my-pi#15 implements it (claimed with a message before).
  • /trace claimed with a message (loopback server side effect); /export <file> shows where the file was written.
  • Slash menu merges the catalog with available_commands_update (non-catalog OMP commands are expansion); mobile gets the agent-answered subset.
  • Legacy PTY chat claim behavior and skills discovery stay unchanged.
  • Composer: @ mention autocomplete and path references verified for OMP, including the file-URI quoting case.

Non-goals

Depends on

Parity rows owned

  • P-MSWC-02, P-SCMD-01, P-SCMD-02, P-SKIL-02, P-ATTC-01, P-PLAN-01, P-LCMD-01, P-LCMD-02.

Acceptance criteria

  • Each of the 22 legacy commands executes in OMP, opens an Orca surface, or shows an explicit message; none reaches the model as prompt text.
  • /context and /usage answers appear in the chat.
  • /plan toggles plan mode through session/set_mode, never as prompt text; /model <id> and picker changes apply to the next turn and survive reattach.
  • /rewind and /trace never reach OMP; /export <file> writes inside the workspace and the chat shows the path.
  • Dropped images/files become @path mentions OMP resolves, including Windows paths with spaces and both quote kinds.
  • Legacy PTY chat command behavior is unchanged.

Required tests

  • Table-driven outcome test over the 22 commands + /rewind + an unknown token + /compact <text> (asserts focus compaction, not an error) + /export <file> (asserts location) + /trace (asserts the claim message), against a scripted OMP, plus one recorded real-omp acp run.
  • /plan with OMP's plan setting on and off.
  • Unknown /token stays blocked; a command sent mid-turn.
  • /model with ambiguous label; restore of a picked model after reattach.
  • Path quoting cases; legacy claimed-set snapshot unchanged.

Base branch

acp-migration (44madfire/orca).

Metadata

Metadata

Assignees

No one assigned

    Labels

    acp-migrationOMP Native Chat ACP migrationphase-BPhase B parity completion

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions