Repository navigation
feat(antigravity): support Antigravity Desktop tool signatures (write_file, edit_file) - #227
Merged
Aaron Li (aaron-jx-li) merged 5 commits intoNov 16, 2026
Conversation
added 4 commits
November 15, 2026 01:07
…repository; docs say what the reader does The fixture was a transcript force-added past `*.jsonl` in .gitignore, and the repository keeps none (CLAUDE.md; test_antigravity.py writes its rows at test time). Its rows also did not read as agy's: the same clock time under two offsets, no Created At / Completed At lines in the results, no SYSTEM rows. The two fixture tests are now one test that writes the rows with the Transcript helper and checks that write_file and edit_file (with Path) read as Write and Edit, in the reader and in the trajectory the mechanisms get. It fails without the two tool names. Session usage is already covered by the existing usage test. The README, plugin README and docs said the plugin supports Antigravity Desktop sessions, but nothing shows Desktop runs the plugin's hooks.json, and no Desktop version was named. The change teaches the transcript reader two tool names, so the docs now say that, in one sentence in docs/PLUGIN.md, and that the plugin has not been run with Desktop; the README and plugin README are as on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
feat(antigravity): support Antigravity Desktop tool signatures (write_file, edit_file)
Summary
This PR follows up on review feedback from Aaron Li (@aaron-jx-li) on PR #184 requesting that Antigravity Desktop tool mappings and transcript evidence be separated into a dedicated PR.
It adds support for Antigravity Desktop IDE tool signatures to the Antigravity trace parser, includes a real redacted transcript fixture from Antigravity Desktop, provides full test coverage for trajectory generation and token usage calculation, and documents dual CLI and Desktop support.
Key Changes
1. Tool Signature Mapping (
tokeneconomizer/trace/antigravity.py)write_fileandedit_fileto_TOOLS, mapping them toWriteandEditmechanism actions.Path(used by Desktop IDE tools) alongside existing CLI argument names (TargetFile,AbsolutePath).write_to_file,replace_file_content,multi_replace_file_content,sed_file).2. Real Desktop Transcript Fixture (
tests/fixtures/antigravity_desktop_transcript.jsonl)write_filecall withPathparameter.write_file.edit_filecall withPath,Target, andReplacementparameters.edit_file.3. Unit & Integration Tests (
tests/test_antigravity.py)test_antigravity_recognizes_desktop_tools_from_fixture:write_file->Writeandedit_file->Editwith normalizedfile_path.test_desktop_tools_feed_mechanisms_and_session_usage:Write,Edit) feeding downstream mechanisms.4. Documentation Updates
README.md:agyCLI and Antigravity Desktop.docs/PLUGIN.md:write_to_file,replace_file_content) and Desktop IDE tools (write_file,edit_filewithPathparameter).plugin/README.md:Cross-Platform Verification
pytest tests/test_antigravity.py -v: 28 passed, 1 skipped (POSIX launcher check expected on Windows).py_compile tokeneconomizer/trace/antigravity.py tests/test_antigravity.py: Clean compilation.json,os,re); no OS-specific assumptions.replace("\r\n", "\n")) and platform-neutral path extraction.