-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add Antigravity CLI and Gemini environment support #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| description = "Runs a steerable review that questions the chosen implementation and design" | ||
| prompt = """ | ||
| You are the adversarial-review command handler for the Codex plugin on Antigravity CLI. | ||
| Your goal is to run a steerable, pressure-testing review of design choices, tradeoffs, hidden assumptions, or risk areas. | ||
|
|
||
| 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: | ||
| `node "<path to codex-companion.mjs>" adversarial-review {{args}}` | ||
|
|
||
| Present the review results exactly as-is to the user. | ||
| """ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| description = "Cancel an ongoing background Codex job" | ||
| prompt = """ | ||
| You are the cancel command handler for the Codex plugin on Antigravity CLI. | ||
| Your goal is to cancel a running background job. | ||
|
|
||
| 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: | ||
| `node "<path to codex-companion.mjs>" cancel {{args}}` | ||
|
|
||
| Present the output exactly as-is to the user. | ||
| """ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| description = "Delegate investigation, an explicit fix request, or follow-up rescue work to the Codex rescue process" | ||
| prompt = """ | ||
| You are the rescue command handler for the Codex plugin on Antigravity CLI. | ||
| Your goal is to delegate coding, debugging, or investigation tasks to the Codex rescue companion. | ||
|
|
||
| Please find the companion script `codex-companion.mjs` under the `plugins/codex/scripts/` directory in the current workspace. | ||
|
|
||
| First, check if there is a resumable rescue candidate from the current session by running: | ||
| `node "<path to codex-companion.mjs>" task-resume-candidate --json` | ||
|
|
||
| If the result shows a candidate is available, ask the user if they want to: | ||
| 1. "Continue current Codex thread" (Recommended if they are asking to continue, keep going, resume, apply the top fix, or dig deeper) | ||
| 2. "Start a new Codex thread" (Recommended otherwise) | ||
|
|
||
| Then, run the task using the `run_command` tool: | ||
| `node "<path to codex-companion.mjs>" task {{args}}` | ||
| (Add `--resume-last` if they chose to continue the thread, or `--fresh` for a new one). | ||
|
|
||
| If the user request includes `--background`, let the command run in the background. | ||
| Return the stdout verbatim to the user without summarizing or rewriting. | ||
| """ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| description = "Fetch and display the final result of a completed background Codex job" | ||
| prompt = """ | ||
| You are the result command handler for the Codex plugin on Antigravity CLI. | ||
| Your goal is to fetch and print the final result of a background job. | ||
|
|
||
| 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: | ||
| `node "<path to codex-companion.mjs>" result {{args}}` | ||
|
|
||
| Present the output exactly as-is to the user. | ||
| """ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| description = "Runs a normal Codex review on your current work" | ||
| prompt = """ | ||
| 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. | ||
| Execute the following command using the `run_command` tool: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Gemini CLI custom commands expose the shell executor as Useful? React with 👍 / 👎. |
||
| `node "<path to codex-companion.mjs>" review {{args}}` | ||
|
|
||
| Present the review results exactly as-is to the user. | ||
| """ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| description = "Check whether the local Codex CLI is ready and optionally toggle the stop-time review gate" | ||
| prompt = """ | ||
| You are the setup command handler for the Codex plugin on Antigravity CLI. | ||
| Your goal is to run the setup process. | ||
|
|
||
| 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: | ||
| `node "<path to codex-companion.mjs>" setup --json {{args}}` | ||
|
|
||
| After executing the command: | ||
| 1. Parse the JSON output returned by the command. | ||
| 2. If the output indicates that Codex is unavailable and npm is available, ask the user if they want to install it. If they choose to, run `npm install -g @openai/codex` and then rerun the setup command. | ||
| 3. Present the setup results beautifully to the user. | ||
| """ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| description = "Check progress on ongoing or completed background Codex jobs" | ||
| prompt = """ | ||
| You are the status command handler for the Codex plugin on Antigravity CLI. | ||
| Your goal is to check the progress or status of background jobs. | ||
|
|
||
| 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: | ||
| `node "<path to codex-companion.mjs>" status {{args}}` | ||
|
|
||
| Present the output exactly as-is to the user. | ||
| """ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "name": "codex", | ||
| "version": "1.0.4", | ||
| "description": "Use Codex from Antigravity CLI to review code or delegate tasks.", | ||
| "contextFileName": "GEMINI.md" | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,7 +68,7 @@ const DEFAULT_STATUS_WAIT_TIMEOUT_MS = 240000; | |
| const DEFAULT_STATUS_POLL_INTERVAL_MS = 2000; | ||
| 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."; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎. |
||
|
|
||
| function printUsage() { | ||
| console.log( | ||
|
|
@@ -289,7 +289,7 @@ function isActiveJobStatus(status) { | |
| } | ||
|
|
||
| function getCurrentClaudeSessionId() { | ||
| return process.env[SESSION_ID_ENV] ?? null; | ||
| return process.env[SESSION_ID_ENV] ?? process.env.ANTIGRAVITY_TRAJECTORY_ID ?? process.env.GEMINI_TRAJECTORY_ID ?? null; | ||
| } | ||
|
|
||
| function filterJobsForCurrentClaudeSession(jobs) { | ||
|
|
@@ -538,7 +538,7 @@ function buildTaskRunMetadata({ prompt, resumeLast = false }) { | |
| if (!resumeLast && String(prompt ?? "").includes(STOP_REVIEW_TASK_MARKER)) { | ||
| return { | ||
| title: "Codex Stop Gate Review", | ||
| summary: "Stop-gate review of previous Claude turn" | ||
| summary: "Stop-gate review of previous Antigravity turn" | ||
| }; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import test from "node:test"; | ||
| import assert from "node:assert/strict"; | ||
|
|
||
| import { createBrokerEndpoint, parseBrokerEndpoint } from "../plugins/codex/scripts/lib/broker-endpoint.mjs"; | ||
|
|
||
| test("createBrokerEndpoint uses Unix sockets on non-Windows platforms", () => { | ||
| const endpoint = createBrokerEndpoint("/tmp/cxc-12345", "darwin"); | ||
| assert.equal(endpoint, "unix:/tmp/cxc-12345/broker.sock"); | ||
| assert.deepEqual(parseBrokerEndpoint(endpoint), { | ||
| kind: "unix", | ||
| path: "/tmp/cxc-12345/broker.sock" | ||
| }); | ||
| }); | ||
|
|
||
| test("createBrokerEndpoint uses named pipes on Windows", () => { | ||
| const endpoint = createBrokerEndpoint("C:\\\\Temp\\\\cxc-12345", "win32"); | ||
| assert.equal(endpoint, "pipe:\\\\.\\pipe\\cxc-12345-codex-app-server"); | ||
| assert.deepEqual(parseBrokerEndpoint(endpoint), { | ||
| kind: "pipe", | ||
| path: "\\\\.\\pipe\\cxc-12345-codex-app-server" | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 standardgemini extensions installflow, the workspace usually does not contain that path, so/reviewcannot locatecodex-companion.mjsand fails before running Codex.Useful? React with 👍 / 👎.