Skip to content

Add Google Antigravity tracing integration - #18

Open
Stephen Belanger (Qard) wants to merge 1 commit into
mainfrom
t3code/assess-antigravity-integration
Open

Add Google Antigravity tracing integration#18
Stephen Belanger (Qard) wants to merge 1 commit into
mainfrom
t3code/assess-antigravity-integration

Conversation

@Qard

Copy link
Copy Markdown
Collaborator

Summary

  • add a thin, fail-open Google Antigravity hook plugin for PreInvocation, PostInvocation, PostToolUse, and Stop
  • add a daemon translator that combines lifecycle hooks with bounded transcript_full.jsonl records to produce session, turn, LLM, and tool spans
  • preserve deterministic replay and correct multi-turn resume behavior when Antigravity resets its process-local invocation counter
  • allow resumed sessions to extend an already-ended root span and route explicit project IDs without registering a project name
  • add plugin validation plus translator and sink regression coverage

Why

Antigravity's hook payloads provide model/tool lifecycle boundaries, while its full transcript contains the message and tool content needed for useful traces. Combining both sources makes the core integration feasible without changing Antigravity's permission behavior.

PreToolUse is intentionally omitted because its response participates in authorization. The adapter remains credential-free and fails open; authentication and destination routing stay in the bt host.

Live validation

A real Antigravity 1.1.12 session was delivered automatically through the daemon to the existing coding-agents project:

https://www.braintrust.dev/app/Braintrust%20SDKs/p/c77f5203-f2ef-4ed6-8f45-049d082bc5f0/logs?r=47982939-b057-5e9d-a4c1-b5a60425f0c3&s=47982939-b057-5e9d-a4c1-b5a60425f0c3

The resulting trace contains:

  • Turn 1 with an LLM tool request, successful list_dir span, and final LLM response
  • Turn 2 with its own correctly parented LLM span and response
  • a session root whose duration extends through Turn 2

Validation

  • make validate-antigravity
  • cargo test --manifest-path bt-daemon/Cargo.toml --all-features
  • cargo clippy --manifest-path bt-daemon/Cargo.toml --all-targets --all-features -- -D warnings
  • cargo fmt --manifest-path bt-daemon/Cargo.toml -- --check
  • git diff --check

The all-feature test run passed; four unrelated real-agent tests remained intentionally ignored because they require their respective installed CLIs or built extensions.

Current scope

This establishes the core hooks and translator prototype. Persistent setup, managed run, historical import/attach, Windows support, and production distribution remain follow-up work.

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.

2 participants