Files
oh-my-pi/packages/coding-agent/src/commands/acp.ts
T
Ogrodevandcan1357 275108974a feat(acp): add acp CLI subcommand and wire terminal-auth into launch
- Adds omp acp subcommand that launches the agent as an ACP stdio server
- Registers the subcommand in the CLI dispatcher
- Threads terminal-auth args and ACP flags through the launch and main orchestrators
- Exports AgentSession on the public SDK surface
- Updates skills loader to support skill→slash-command conversion and prompt injection
- Updates input-controller to dispatch ACP built-in slash commands
2026-05-13 06:00:44 +02:00

25 lines
828 B
TypeScript

/**
* Run Oh My Pi as an ACP (Agent Client Protocol) server over stdio.
*
* Thin wrapper around the launch flow that forces `mode: "acp"` unless the
* ACP terminal-auth flag asks the same command to open the interactive TUI.
*/
import { Command } from "@oh-my-pi/pi-utils/cli";
import { parseArgs } from "../cli/args";
import { runRootCommand } from "../main";
import { prepareAcpTerminalAuthArgs } from "../modes/acp/terminal-auth";
export default class Acp extends Command {
static description = "Run Oh My Pi as an ACP (Agent Client Protocol) server over stdio";
static strict = false;
async run(): Promise<void> {
const { args, terminalAuth } = prepareAcpTerminalAuthArgs(this.argv);
const parsed = parseArgs(args);
if (!terminalAuth) {
parsed.mode = "acp";
}
await runRootCommand(parsed, args);
}
}