Open History to see the last commit
1/**
2 * Hidden CLI entry points for the Antigravity ACP bridge.
3 *
4 * Both are internal plumbing rather than user-facing commands: the provider
5 * spawns `t3 agy-acp` as an ACP agent, and that bridge registers `t3 agy-hook
6 * <event>` as Antigravity's tool-lifecycle hook. Shipping them as subcommands
7 * of the server binary keeps the bridge inside the same bundle.
8 *
9 * @module cli/agy
10 */
11import * as Effect from "effect/Effect";
12import { Command, Flag } from "effect/unstable/cli";
13
14import { runAgyBridge, runAgyHook } from "../provider/acp/antigravity/agyBridge.ts";
15
16export const agyAcpCommand = Command.make("agy-acp").pipe(
17 Command.withDescription("Run the Antigravity ACP compatibility bridge over stdio."),
18 Command.withHidden,
19 Command.withHandler(() => Effect.promise(() => runAgyBridge())),
20);
21
22export const agyHookCommand = Command.make("agy-hook", {
23 event: Flag.string("event").pipe(
24 Flag.withDescription("Antigravity hook event name."),
25 Flag.withDefault("unknown"),
26 ),
27}).pipe(
28 Command.withDescription("Handle one Antigravity tool-lifecycle hook event."),
29 Command.withHidden,
30 Command.withHandler(({ event }) => Effect.promise(() => runAgyHook(event))),
31);