Skip to content

Conversation

@gauravverma
Copy link
Contributor

@gauravverma gauravverma commented Oct 9, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a new Gemini CLI extension "suprsend" with a manifest to enable integration and automated MCP server start.
  • Chores

    • Added cross-platform build artifacts for the extension (Linux, macOS, Windows; x64 and ARM64).
    • Updated packaging to produce Windows-friendly names and ZIPs on Windows, tar.gz elsewhere.
    • Included the extension manifest in release bundles and removed the deprecated raw-binaries artifact.
  • Bug Fixes

    • Improved URL construction and error handling in client requests to prevent malformed requests.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Walkthrough

Adds a GoReleaser build target and artifact for a Gemini CLI extension with Windows packaging rules, adds a Gemini extension manifest gemini-extension.json (version 0.1.1) declaring an MCP server command, and updates a mgmnt client to build request URLs using url.JoinPath with error handling.

Changes

Cohort / File(s) Summary
Release config updates
.goreleaser.yaml
Adds build target gemini-cli-extension; adds suprsend to archives.tarballs; replaces raw-binaries artifact with gemini-cli-extension artifact that includes gemini-extension.json, outputs tar.gz, emits zip for Windows via format_overrides, and updates name templates and architecture mappings.
Gemini extension manifest
gemini-extension.json
New manifest declaring extension suprsend v0.1.1 with an MCP server entry suprsend that maps its command to ${extensionPath}${/}suprsend and starts with the start-mcp-server argument.
Client URL construction
mgmnt/client.go
Replaces string-concatenated request URL construction with url.JoinPath, adds error handling and logging around URL joining, and uses a requestURL variable when creating the HTTP request.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User
  participant GeminiCLI as Gemini CLI (host)
  participant Extension as gemini-extension.json
  participant MCP as suprsend (binary)

  User->>GeminiCLI: Start Gemini with extensions
  GeminiCLI->>Extension: Load manifest `gemini-extension.json`
  Note right of Extension: name: "suprsend"\nversion: "0.1.1"
  GeminiCLI->>MCP: Spawn command: ${extensionPath}${/}suprsend (arg: start-mcp-server)
  MCP-->>GeminiCLI: MCP handshake / ready
  GeminiCLI-->>User: Extension available
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I packed a gem in tars and zips with care,
Suprsend hops out—version 0.1.1 to share.
The manifest hums, “start-mcp-server, go!”
The binary wakes, the handshake starts to flow.
Rabbit thumbs the release and off I go. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly captures the primary change of enabling support for the Gemini extension by focusing on the main feature added, and it is clear, concise, and directly relevant to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/gemini-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d594dc and d4a0ebb.

📒 Files selected for processing (2)
  • .goreleaser.yaml (2 hunks)
  • gemini-extension.json (1 hunks)

Comment on lines 1 to 9
{
"name": "suprsend",
"version": "0.1.0",
"mcpServers": {
"suprsend": {
"command": "${extensionPath}${/}suprsend"
}
}
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix Windows command path

The manifest hardcodes "command": "${extensionPath}${/}suprsend", but the Go build emits suprsend.exe on Windows. Gemini launches the binary by exact path, so on Windows this will fail because the file lacks the .exe suffix. Please either ship a filename without the .exe suffix or make the manifest Windows-aware (e.g., include a wrapper script or add the .exe suffix conditionally) so Windows users can launch the extension.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
mgmnt/client.go (1)

98-103: Excellent refactor to url.JoinPath for security and correctness.

Replacing string concatenation with url.JoinPath is a significant improvement:

  • Properly encodes path segments (e.g., if workspace contains special characters)
  • Prevents potential path traversal or injection issues
  • Handles URL separators correctly
  • Error handling is appropriate

Minor observability suggestion: Consider using log.Error instead of log.Info for error cases to improve log filtering and alerting. This applies to the error logs throughout this function (lines 100, 105, 113, 120).

To improve observability, apply this diff:

 	requestURL, err := url.JoinPath(c.hub_base_URL, "v1", workspace, "ws_key", "bridge")
 	if err != nil {
-		log.Info("Error joining URL path: ", err)
+		log.Error("Error joining URL path: ", err)
 		return "", "", err
 	}
 	req, err := http.NewRequest("GET", requestURL, nil)
 	if err != nil {
-		log.Info("Error creating request: ", err)
+		log.Error("Error creating request: ", err)
 		return "", "", err
 	}

And similarly for lines 113 and 120:

 	response, err := client.Do(req)
 	if err != nil {
-		log.Info("Error sending request: ", err)
+		log.Error("Error sending request: ", err)
 		return "", "", err
 	}
 	body, err := io.ReadAll(response.Body)
 	if err != nil {
-		log.Info("Error reading response body: ", err)
+		log.Error("Error reading response body: ", err)
 		return "", "", err
 	}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be9c779 and 97addd7.

📒 Files selected for processing (2)
  • gemini-extension.json (1 hunks)
  • mgmnt/client.go (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • gemini-extension.json
🧰 Additional context used
📓 Path-based instructions (1)
mgmnt/**/*.go

📄 CodeRabbit inference engine (.cursor/rules/cli-structure.mdc)

Place management and client-related Go code under the mgmnt/ directory

Files:

  • mgmnt/client.go
🔇 Additional comments (1)
mgmnt/client.go (1)

8-8: LGTM!

The import of net/url is appropriate and necessary for the url.JoinPath usage below.

@gauravverma gauravverma merged commit 59a8122 into main Oct 9, 2025
1 check passed
@gauravverma gauravverma deleted the feature/gemini-support branch October 9, 2025 14:18
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.

2 participants