fix: complete OpenCode and Antigravity provider integration - #9
Open
eliautobot wants to merge 5 commits into
Open
fix: complete OpenCode and Antigravity provider integration#9eliautobot wants to merge 5 commits into
eliautobot wants to merge 5 commits into
Conversation
Add native provider support for OpenCode and Antigravity coding agents: - OpenCodeProvider: discovers agents from OpenCode config, sends chat via opencode run, manages sessions - AntigravityProvider: one-shot agy --print interface, stateless Gemini-powered code analyst Both follow the existing provider pattern (CodexProvider, ClaudeCodeProvider) and integrate with the discovery system, config parsing, and roster management.
…eedback)
- Add /api/opencode/{test,chat,interrupt} HTTP endpoints
- Add /api/antigravity/{test,chat,interrupt} HTTP endpoints
- Add handler functions: _handle_opencode_test, _handle_opencode_chat,
_handle_opencode_interrupt, _handle_antigravity_test,
_handle_antigravity_chat, _handle_antigravity_interrupt
- Include 'error' key on non-zero exit codes for API contract consistency
- Sanitize profile names from agent metadata to prevent path traversal
- Add 'desktopAvailable' key for API contract parity with other providers
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.
Summary
Builds on #8 and completes the OpenCode + Antigravity provider integration as a follow-up/child branch.
VO_OPENCODE_ENABLED=1/VO_ANTIGRAVITY_ENABLED=1PATHwhile still supporting explicit binary pathsSecurity audit
I reviewed PR #8 and this follow-up for malware, malicious/hidden code, credential theft, and stealthy exfiltration patterns.
Findings:
_VO_INT, orVO_DEVreferences were found in the staged PR diff.shell=True, and the provider code does not useeval/exec.opencode/agycan read workspace files and talk to their upstream services. This PR mitigates that by making both providers disabled by default, requiring explicit operator opt-in, using provider-specific workspaces, and passing a narrow subprocess environment with explicit allowlists for any extra env vars.Verification
python3 -m py_compile app/providers/process_env.py app/providers/opencode.py app/providers/antigravity.py app/discovery.py app/server.py tests/test_opencode_antigravity_providers.py tests/test_chat_sessions.pypython3 tests/test_opencode_antigravity_providers.py— 29 checkspython3 tests/test_chat_sessions.py— 28 checkspython3 tests/test_hermes_desktop_discovery.pypython3 tests/test_openclaw_managed_auth.pypython3 tests/test_hermes_platform_bridge.pypython3 tests/test_hermes_platform_plugin.pypython3 tests/test_review_parser.pygit diff --cached --checkDid not run
tests/test_workflow_e2e.pybecause it targets a live Product server on port 8090 by default.