Skip to content

feat: add Antigravity CLI and Gemini environment support#340

Open
EladAriel wants to merge 3 commits into
openai:mainfrom
EladAriel:feat/antigravity-support
Open

feat: add Antigravity CLI and Gemini environment support#340
EladAriel wants to merge 3 commits into
openai:mainfrom
EladAriel:feat/antigravity-support

Conversation

@EladAriel
Copy link
Copy Markdown

Summary

This PR adds support for Antigravity CLI and Gemini-based developer environments, transforming this plugin into a unified multi-client companion for both Claude Code and Antigravity/Gemini terminals.

Changes

  • Multi-Client Detection: Restructured session initialization and stop-hooks to dynamically detect CLAUDE, ANTIGRAVITY, and GEMINI environment flags.
  • Client Coexistence: Retained all original .claude-plugin hooks while co-locating gemini-extension.json configuration and commands/ declarations.
  • Dynamic Context Rendering: Dynamic detection changes prompts and stop review markers depending on the active companion client.
  • Test Resilience: Updated tests to handle either client environment cleanly.

Verification

  • Run local test suite: npm run test (all tests passing)
  • Verified build: npm run build
  • Verified dynamic routing under both client setups.

@EladAriel EladAriel requested a review from a team May 20, 2026 09:56
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14ae8f931d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

import { terminateProcessTree } from "./process.mjs";

const PLUGIN_MANIFEST_URL = new URL("../../.claude-plugin/plugin.json", import.meta.url);
const PLUGIN_MANIFEST_URL = new URL("../../../../gemini-extension.json", import.meta.url);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Read manifest from plugin-scoped path

Load the manifest from a path that exists inside the shipped plugin bundle instead of ../../../../gemini-extension.json. The Claude marketplace entry publishes ./plugins/codex as the plugin source, so this relative lookup escapes that directory and fails with ENOENT when app-server.mjs is imported outside this repo layout, which breaks setup/review/task flows that initialize the app-server client.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread plugins/codex/scripts/stop-review-gate-hook.mjs Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 81c1c84ab2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

const VALID_REASONING_EFFORTS = new Set(["none", "minimal", "low", "medium", "high", "xhigh"]);
const MODEL_ALIASES = new Map([["spark", "gpt-5.3-codex-spark"]]);
const STOP_REVIEW_TASK_MARKER = "Run a stop-gate review of the previous Claude turn.";
const STOP_REVIEW_TASK_MARKER = "Run a stop-gate review of the previous Antigravity turn.";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep stop-gate marker aligned with prompt template text

buildTaskRunMetadata now detects stop-gate runs by looking for "Run a stop-gate review of the previous Antigravity turn.", but the shipped prompt template still starts with "Run a stop-gate review of the previous Claude turn." (plugins/codex/prompts/stop-review-gate.md). Because of this mismatch, stop-hook tasks are no longer tagged as Codex Stop Gate Review and are recorded as generic Codex Task, which changes status/reporting behavior and breaks the stop-gate flow expectations.

Useful? React with 👍 / 👎.

Comment thread commands/review.toml Outdated
You are the review command handler for the Codex plugin on Antigravity CLI.
Your goal is to run a normal, read-only Codex review on the current uncommitted changes or branch comparison.
Please find the companion script `codex-companion.mjs` under the `codex-plugin-agy/plugins/codex/scripts/` directory in the current workspace.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove repo-name-specific path from Antigravity commands

These new command prompts hardcode the companion script under codex-plugin-agy/plugins/codex/scripts/, but plugin installs/checkouts are not guaranteed to use that parent directory name (the current repo is codex-plugin-cc, and plugin source is plugins/codex). In environments where that folder name differs, the handler cannot resolve codex-companion.mjs, so /codex:* command execution fails with file-not-found before invoking Codex.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e93d99d5be

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread commands/review.toml
Your goal is to run a normal, read-only Codex review on the current uncommitted changes or branch comparison.

Please find the companion script `codex-companion.mjs` under the `plugins/codex/scripts/` directory in the current workspace.
Execute the following command using the `run_command` tool:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use Gemini's shell tool name in command prompts

Gemini CLI custom commands expose the shell executor as run_shell_command (per the Gemini shell-tool docs), not run_command; instructing the handler to use a non-existent tool means /review can fail at execution time with an unknown-tool path instead of invoking codex-companion.mjs. This affects normal Gemini extension installs where these TOML prompts are the runtime contract for command execution.

Useful? React with 👍 / 👎.

Comment thread commands/review.toml
You are the review command handler for the Codex plugin on Antigravity CLI.
Your goal is to run a normal, read-only Codex review on the current uncommitted changes or branch comparison.

Please find the companion script `codex-companion.mjs` under the `plugins/codex/scripts/` directory in the current workspace.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve companion script from extension install path

This prompt tells the model to find plugins/codex/scripts/ under the current workspace, but Gemini extensions are loaded from the extension install directory (e.g. ~/.gemini/extensions/<name>), not from the project root. In a standard gemini extensions install flow, the workspace usually does not contain that path, so /review cannot locate codex-companion.mjs and fails before running Codex.

Useful? React with 👍 / 👎.

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.

1 participant