Repository navigation
feat(antigravity): add cross-platform Windows support for agy CLI and Antigravity 2.0 - #184
Open
Joy Mondal (Equlient-Joy) wants to merge 1 commit into
Conversation
… Antigravity 2.0 Add Windows batch hook and CLI launchers (plugin/scripts/te-hook.cmd, te.cmd) to support cmd.exe /c execution. Update plugin/hooks.json to execute cleanly across Windows, macOS, and Linux. Add support for Antigravity 2.0 native tool signatures (write_file, edit_file) and document universal cross-platform support.
Author
|
@microsoft-github-policy-service agree |
Aaron Li (aaron-jx-li)
requested changes
Nov 10, 2026
Aaron Li (aaron-jx-li)
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the contribution. This PR needs a bit of refinements before it can be merged:
plugin/hooks.jsonis what agy runs on macOS and Linux too, throughsh -c. There,scripts\te-hook.cmdbecomesscriptste-hook.cmd, which is not found, and2>nulwrites a file namednulinto the plugin directory on every hook call. One option to try (we haven't tested it on Windows): put the POSIX launcher first (./scripts/te-hook … || scripts\te-hook.cmd …).te-hookfails open with exit 0, so sh never reaches the Windows half.- In both
.cmdfiles, everyexit /b %ERRORLEVEL%sits inside a( … )block. cmd expands it when it reads the block, before Python runs, so the launcher always exits 0. Please usesetlocal EnableDelayedExpansionwith!ERRORLEVEL!, or move the call out of the block. - Please have the Windows launcher pick the first Python >= 3.10, as #194 does for POSIX.
- Please keep the docs to what was tested: the agy version and Windows version you ran, and no "dual .cmd/.sh launchers" (there is no .sh launcher). The docs also still send Windows users to
~/.tokeneconomizer/bin/te, which is a/bin/shscript. - Please move the Antigravity 2.0 parts (
write_file/edit_file, theproductdetection) to a separate PR, with a redacted real transcript showing those tool names. Nothing in the repo shows them yet, and theproductbranch never runs becausehooks.jsonalways passes--host antigravity. - Please mark the
.cmdfileseol=crlfin.gitattributes.
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.
Extends the experimental
antigravityhost adapter (#147) with full cross-platform Windows support and compatibility with Antigravity 2.0.Background & Motivation
In #147, the Antigravity CLI host was introduced with a limitation noting "macOS and Linux only: on Windows agy runs hook commands through cmd /c, and this plugin's launcher is a POSIX shell script." On Windows machines,
cmd.exefails to run./scripts/te-hook, preventing hook execution. Additionally, Antigravity 2.0 native tool signatures (write_fileandedit_filewith parameterPath) were unmapped.Key Changes
plugin/scripts/te-hook.cmd&te.cmd):te-hookandteshell scripts.TE_PYTHON, searchesPATHforpython.exe/py.exe(skipping non-functional WindowsApps stubs), and fails open ({}) on errors.plugin/hooks.json:scripts\te-hook.cmd ... 2>nul || ./scripts/te-hook ..., allowing transparent execution under both Windows (cmd.exe /c) and Unix (sh -c).write_fileandedit_fileintokeneconomizer/trace/antigravity.pyto correctly track file writes and edits asWriteandEditactions.detect()intokeneconomizer/plugin/hosts.pyto identify bothantigravity(Desktop) andantigravity-cli.tests/test_antigravity.pywith tests for modern Antigravity tools and launcher script presence.README.md,plugin/README.md, anddocs/PLUGIN.mdto reflect cross-platform support.Verification
python -m pytest tests/test_antigravity.py tests/test_plugin_package.py: 53 passed, 3 skipped.agyCLI and Antigravity 2.0.