feat: add Antigravity CLI adapter and session parser#1326
Draft
shreem26 wants to merge 1 commit into
Draft
Conversation
Add full IDE adapter for Google Antigravity CLI (agy), including: - CLI adapter: scan home, scan project, MCP discovery, hook detection - Server adapter: config file generation for agent installs - Session parser: parse brain/<id>/transcript.jsonl into normalized traces - Hook spec: hooks.json format with PreInvocation + Stop events - Session push hook: for when agy hook execution is functional - Reconcile command: observal reconcile --ide antigravity for manual push - WSL path resolution: transparent Windows/Linux/macOS support - IDE registry entries on both server and CLI sides - 19 tests covering adapter protocol, scanning, and hook detection SPDX-FileCopyrightText: 2026 Hari Srinivasan <harisrini21@gmail.com> SPDX-License-Identifier: AGPL-3.0-only
27fd313 to
95a6470
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add full IDE adapter for Google Antigravity CLI (
agy), enabling Observal to scan, detect, and capture sessions from Antigravity installations. This brings Antigravity to first-class IDE status with session parsing support.Approach
Follows the existing adapter pattern (one adapter per IDE on both CLI and server sides):
CLI side:
observal_cli/ide/antigravity.py— scan home/project for MCPs, skills, hooks, agentsobserval_cli/ide_specs/antigravity_hooks_spec.py— hook spec usinghooks.jsonformat withPreInvocation+Stopeventsobserval_cli/sessions/antigravity.py— session file helpers with WSL path resolutionobserval_cli/hooks/antigravity_session_push.py— hook-based session push (for when agy hook execution works)observal_cli/cmd_reconcile_cli.py—observal reconcile --ide antigravityfor manual session pushobserval_cli/cmd_doctor.py—_patch_antigravity()writes hooks to~/.gemini/config/hooks.jsonServer side:
observal-server/services/ide/antigravity.py— config file generation for agent installsobserval-server/services/session_parsers/antigravity.py— parsesbrain/<id>/.system_generated/logs/transcript.jsonlinto normalized trace eventsShared:
observal_cli/shared/utils.py—resolve_wsl_windows_home(),resolve_antigravity_dir(),resolve_antigravity_config_dir()for cross-platform path resolutionsession_parser: "antigravity"Key paths:
~/.gemini/antigravity-cli/(sessions, MCPs, settings)~/.gemini/config/hooks.json(separate from settings.json)~/.gemini/antigravity-cli/brain/<conversation-id>/.system_generated/logs/transcript.jsonl~/.gemini/config/mcp_config.jsonHow has this been tested
tests/test_antigravity_adapter.pycovering:serverUrlfor remote MCPs)hooks.jsonobserval scan --ide antigravitydetects the IDE and shows hook statusobserval doctor patch --hook --ide antigravitywrites correcthooks.jsonobserval reconcile --ide antigravity --dry-rundiscovers sessions with transcript dataLearnings
agybinary has a different hook implementation from the open-source Gemini CLI. It logs "executing command" for hooks but does not actually spawn child processes in v1.0.3. The open-source Gemini CLI hooks are synchronous and functional.brain/<id>/.system_generated/logs/transcript.jsonlin real-time during sessions. Format includesstep_index,source,type,status,created_at,content, andtool_calls.~/.gemini/, (2)cmd.exe + wslpath, (3) scan/mnt/c/Users/for username match.observal reconcileis the reliable path: Until agy fixes hook execution, manual reconcile is the only way to push sessions. The hook infrastructure is ready for when it works.Known limitations
observal reconcile --ide antigravityrequires the server ingest endpoint to accept the payload (needs server rebuild)