1import * as Effect from "effect/Effect";
2import { Argument, Command } from "effect/cli";
3
4import { runAcpMcpCliFastPath } from "../mcp/AcpMcpStdioBridge.ts";
5
6/** The credential stays in the environment, never on the command line. */
7export const acpMcpBridgeCommand = Command.make("acp-mcp-bridge").pipe(
8 Command.withDescription("Bridge T3 Code's MCP endpoint to stdio for ACP agents."),
9 Command.unlisted,
10 Command.withHandler(() => Effect.promise(() => runAcpMcpCliFastPath("acp-mcp-bridge", []))),
11);
12
13export const acpMcpCallCommand = Command.make("acp-mcp-call", {
14 tool: Argument.String("tool"),
15 argumentsJson: Argument.String("arguments-json"),
16}).pipe(
17 Command.withDescription("Call one T3 Code MCP tool from an ACP agent terminal."),
18 Command.unlisted,
19 Command.withHandler(({ tool, argumentsJson }) =>
20 Effect.promise(() => runAcpMcpCliFastPath("acp-mcp-call", [tool, argumentsJson])),
21 ),
22);