Skip to content

Fix Gemini CLI extension issues (gm-gc)#19

Open
lanmower wants to merge 1 commit into
mainfrom
fix-gemini-cli-gc-1162609706878532573
Open

Fix Gemini CLI extension issues (gm-gc)#19
lanmower wants to merge 1 commit into
mainfrom
fix-gemini-cli-gc-1162609706878532573

Conversation

@lanmower
Copy link
Copy Markdown
Member

This PR fixes several issues identified during testing with the Gemini CLI (gm-gc platform):

  1. Agent Validation: Gemini CLI was rejecting agents with agent: and enforce: keys in their frontmatter. The transformAgentFrontmatter function in platforms/cli-config-shared.js was updated to correctly strip these keys even with leading whitespace.
  2. Context Loading: Switched the primary context file from GEMINI.md to AGENTS.md for the Gemini platform. This ensures that the core project rules are loaded correctly by Gemini CLI's memory system.
  3. Missing Files: Ensured AGENTS.md is included in the package manifest and handled correctly by the installer scripts.
  4. Hook Execution: Gemini CLI treats non-zero exit codes from hooks as failures, which caused deadlocks when a hook correctly wanted to "block" an action (exit code 2). Updated gm-starter/bin/plugkit.js to map exit code 2 to 0 for hooks, allowing the CLI to process the JSON decision instead of crashing.
  5. Tool Mappings: Updated platforms/cli-config-factory.js to include correct tool names for skill and agent on the Gemini platform.
  6. Build Reporting: Updated lib/build-reporter.js regex to recognize ${extensionPath} as a valid path variable, removing false-positive warnings during the build process.

Verified the fixes by building the platforms and running gemini in a test directory with the generated extension.


PR created automatically by Jules for task 1162609706878532573 started by @lanmower

- Strip 'agent' and 'enforce' from agent frontmatter for Gemini
- Switch context file from GEMINI.md to AGENTS.md for Gemini platform
- Include AGENTS.md in gemini package and installer
- Normalize hook exit codes in plugkit.js (map 2 to 0)
- Update tool mappings for Gemini (skill, agent)
- Fix build reporter regex for lowercase path variables

Co-authored-by: lanmower <657315+lanmower@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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