Skip to content

WRI-534 Add Antigravity CLI worker support#76

Open
fazpu wants to merge 1 commit into
mainfrom
wri-534-antigravity-cli-support
Open

WRI-534 Add Antigravity CLI worker support#76
fazpu wants to merge 1 commit into
mainfrom
wri-534-antigravity-cli-support

Conversation

@fazpu

@fazpu fazpu commented May 28, 2026

Copy link
Copy Markdown
Member

Summary

Adds Google Antigravity CLI (agy) as a first-class built-in team-harness worker type. The new antigravity template runs workers through agy --print so they can execute as non-interactive subprocesses, matching the official Antigravity CLI positioning as a terminal-first agent surface and the local agy --help command surface.

Context

Linear: WRI-534 (TH - add Antigravity CLI support)

Docs reviewed:

I also verified the installed local CLI (agy --version -> 1.0.0) and agy --help, which exposes:

  • --print / --prompt / -p for non-interactive single-prompt execution
  • --dangerously-skip-permissions for auto-approving tool permissions
  • --print-timeout for print-mode wait control
  • --conversation <id> for explicit conversation resume
  • no model flag, so the built-in template intentionally sets model_flag = false

Implementation

  • Adds antigravity to DEFAULT_AGENT_TEMPLATES with:
    • command = ["agy"]
    • shared_flags = ["--dangerously-skip-permissions", "--print", "--print-timeout", "60m"]
    • resume_flags = ["--conversation", "{session_id}"]
    • model_flag = None because the CLI does not expose a model override flag
    • deduplication for standalone --dangerously-skip-permissions and --print flags
  • Updates generated global/local config samples so th init documents the new worker and includes antigravity in the commented allowlist.
  • Marks Antigravity resume metadata as supported/preferred resume mode when a caller already has a conversation id. Automatic capture remains unset because print mode does not emit stream-json session events.
  • Adds Antigravity display styling in the console agent panel/event output.
  • Updates README, changelog, package metadata keywords/description, and tests.

Validation

Passed:

uv run pytest src/tests/test_registry.py src/tests/test_config.py src/tests/test_worker_sessions.py src/tests/test_agent_tools.py
uv run pytest -k 'not test_stream_token_bold_rendering and not test_stream_token_heading_rendering'
uv run ruff check src
uv run ruff format --check src
uv run pyright
git diff --check

Notes:

  • uv run pytest without exclusions currently fails on two unrelated console ANSI-style assertions: test_stream_token_bold_rendering and test_stream_token_heading_rendering. The output text is rendered, but the expected bold ANSI escape sequence is absent in this local environment.
  • uv run ruff check . also reports issues in pre-existing untracked .agents/skills/skill-creator/... files. This PR leaves those untracked files untouched and validates tracked source with ruff check src.

User-facing behavior

After this change, users with Antigravity CLI installed and authenticated can run workers with:

th repl --agents antigravity

or include it in config allowlists as antigravity.

Model overrides passed through spawn_agent(model=...) are intentionally ignored for this worker until Antigravity CLI exposes a stable model flag.

@fazpu fazpu left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review completed. I rechecked the command construction, generated config round-trip behavior, resume metadata, docs, and validation notes. No blocking issues found.

On --print-timeout: I think it should stay in the default Antigravity template. agy --help shows print mode has a built-in 5-minute timeout; the other worker CLIs do not expose an equivalent default timeout in their harness invocation path. Team-harness workers are expected to run longer than 5 minutes for normal delegated implementation/research tasks, so --print-timeout 60m prevents Antigravity from ending the worker before team-harness can manage it.

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