Skip to content

feat: add agy runner and devkit_ask bridge tool#114

Draft
Hieraphant wants to merge 1 commit into
5uck1ess:mainfrom
Hieraphant:feat/agy-runner-devkit-ask
Draft

feat: add agy runner and devkit_ask bridge tool#114
Hieraphant wants to merge 1 commit into
5uck1ess:mainfrom
Hieraphant:feat/agy-runner-devkit-ask

Conversation

@Hieraphant

Copy link
Copy Markdown

What

Turns devkit into a direct, commutative bridge between the three AI CLIs — Claude, Codex, and agy (Google Antigravity) — instead of the parallel fan-out/consolidate model. Any MCP host can send a prompt to any peer and get its answer synchronously.

Changes

  • src/runners/agy.go (new): AgyRunner — a stdin-piped one-shot runner mirroring CodexRunner. Binary and argv are env-overridable via AGY_CMD / AGY_ARGS (with a {workdir} token) since agy's headless flags aren't verified yet. Registered in DetectRunners; added to --agent choices.
  • devkit_ask MCP tool (src/mcp/tools.go, src/mcp/server.go): {to: claude|codex|agy, prompt, workdir?} → resolves the peer via FindRunner and returns its output synchronously, bounded by commandTimeout. This is the commutative primitive.
  • Tests: src/runners/agy_test.go (name, argv builder incl. AGY_ARGS/{workdir}, AGY_CMD, Available) and src/mcp/ask_test.go (missing-arg, unknown-peer, unavailable-peer). Hermetic, matching the existing style.

Verification

go build ./..., go vet ./..., and go test ./... all pass. Built devkit-engine, booted it as an MCP server, and confirmed over JSON-RPC that devkit_ask is advertised and its handler returns correctly (unknown peer, not available, missing argument).

Follow-ups (need a host with agy installed)

  • TODO(agy): probe agy --help / agy exec --help / agy models to replace the placeholder argv (or set AGY_ARGS). agy is reachable as a target now; the exact invocation is a documented guess until probed.
  • agy-as-initiator: depends on whether agy can attach an MCP server (agy mcp --help). If not, agy is target-only and Claude/Codex broker for it; Claude↔Codex is already fully commutative.

🤖 Generated with Claude Code

Wire Claude, Codex, and agy (Google Antigravity CLI) into a direct,
commutative bridge instead of the parallel fan-out model.

- runners/agy.go: new AgyRunner (stdin-piped one-shot, mirrors CodexRunner)
  with AGY_CMD / AGY_ARGS env overrides since agy's headless flags are not
  yet verified. Registered in DetectRunners; added to --agent choices.
- mcp: new devkit_ask tool — {to: claude|codex|agy, prompt, workdir?} resolves
  the peer via FindRunner and returns its answer synchronously, bounded by
  commandTimeout. Any MCP host (Claude, Codex) can ask any peer and block for
  the reply.
- Tests: agy_test.go (name, argv builder incl. AGY_ARGS/{workdir}, AGY_CMD,
  Available) and ask_test.go (missing-arg, unknown-peer, unavailable-peer).

Note: agy's exact non-interactive argv is a documented TODO(agy) placeholder;
agy is reachable as a target now, and works once the argv is probed or AGY_ARGS
is set. agy-initiated calls depend on agy supporting MCP-client attach (TBD).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7VdbGfPkkce5UGQqjeSE9
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.

1 participant