Skip to content

feat(connect): Qwen Code + Antigravity + Kiro adapters; docs(ports)#651

Merged
rohitg00 merged 1 commit into
mainfrom
feat/tier3-agents-docs
May 25, 2026
Merged

feat(connect): Qwen Code + Antigravity + Kiro adapters; docs(ports)#651
rohitg00 merged 1 commit into
mainfrom
feat/tier3-agents-docs

Conversation

@rohitg00
Copy link
Copy Markdown
Owner

@rohitg00 rohitg00 commented May 25, 2026

Summary

Four Tier-3 issues, one PR. All docs fetched against the upstream agent's own documentation before writing the adapter — no guessing at config schemas.

Issue Fix
#647 Qwen Code New agentmemory connect qwen writing to ~/.qwen/settings.json
#614 Antigravity New agentmemory connect antigravity writing to platform-specific mcp_config.json (Gemini CLI replacement, sunset 2026-06-18)
#618 Kiro New agentmemory connect kiro writing to ~/.kiro/settings/mcp.json
#629 Port docs New "Ports" table in Configuration section: 3111 / 3112 / 3113 / 49134 with env overrides + stale-cleanup recipe

All three adapters use the shared json-mcp-adapter, so they inherit the ${VAR:-default} env block from PR #650 — no surprise parse failures on fresh installs.

Docs verified against

Qwen Code's 16-event hook system reuses Claude Code's payload field names (session_id, cwd, tool_name, tool_input, tool_response), so existing compiled hook scripts run against Qwen without modification. Plugin-format extension (qwen-extension.json) is a separate follow-up — current PR ships MCP wiring only.

Test plan

  • npm test — 1156/1156 pass (107 files), +6 new cases in test/connect-new-agents.test.ts
  • npm run build — 21 files, 2456 KB
  • Existing test/cli-connect.test.ts agent-count assertion bumped 8 → 11
  • Each adapter test verifies ${VAR:-default} env form in the wired output

Summary by CodeRabbit

  • New Features

    • Added support for Qwen, Antigravity, and Kiro AI agents
    • New agents can be configured via the connect command with agent-specific setup
  • Documentation

    • Updated setup table with instructions for Qwen, Antigravity, and Kiro integration
    • Added Ports section documenting default ports, environment variable overrides, and platform-specific process cleanup commands
  • Tests

    • Added validation tests for new agent adapters

Review Change Stack

Three new connect adapters and a Port Mapping section in README.

#647 Qwen Code (~/.qwen/settings.json) — standard mcpServers shape.
Qwen's 16-event hook system reuses Claude Code's payload field names
(session_id, cwd, tool_name, tool_input, tool_response), so the
existing compiled hook scripts run against Qwen without modification.
Plugin extension support (qwen-extension.json) is a separate follow-up.

#614 Antigravity (mcp_config.json under platform-specific User dir)
— standard mcpServers shape. Gemini CLI is scheduled to stop serving
Pro/Ultra/Code-Assist requests 2026-06-18 per Google's announcement;
Antigravity is the GA replacement.

#618 Kiro (~/.kiro/settings/mcp.json) — standard mcpServers shape.
Workspace-level overrides live in .kiro/settings/mcp.json next to the
code; we wire user-level by default.

All three use the shared json-mcp-adapter, so they inherit the
${VAR:-default} env block from PR #650.

#629 Port docs — README now has a Ports table under Configuration:
3111 REST, 3112 streams, 3113 viewer, 49134 engine WS. Env overrides
called out. Stale-process cleanup recipe for macOS/Linux/Windows.

Test coverage:
  - test/connect-new-agents.test.ts: 6 cases (detect + install +
    env-default form for each agent, plus a registry-membership check)
  - test/cli-connect.test.ts: bumped agent count 8 → 11
  - 1156/1156 vitest pass

Docs fetched first via context7:
  - Qwen Code docs (qwenlm.github.io/qwen-code-docs)
  - Kiro CLI docs (kiro.dev/docs/cli/mcp)
  - Antigravity docs (settings file layout)
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agentmemory Building Building Preview May 25, 2026 7:44pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

📝 Walkthrough

Walkthrough

This PR extends the agentmemory CLI to support three new agents—Qwen, Antigravity, and Kiro—by implementing platform-aware JSON MCP adapters, registering them in the adapter system, validating behavior with comprehensive tests, and documenting setup and port configuration in the README.

Changes

Add Qwen, Antigravity, and Kiro agent adapters

Layer / File(s) Summary
New adapter implementations for Qwen, Antigravity, and Kiro
src/cli/connect/qwen.ts, src/cli/connect/antigravity.ts, src/cli/connect/kiro.ts
Three adapters use createJsonMcpAdapter to configure MCP settings for each agent. Qwen stores config at ~/.qwen/settings.json, Antigravity uses macOS-specific ~/Library/Application Support/Antigravity/User or ~/.config/Antigravity/User on Linux, and Kiro uses ~/.kiro/settings/mcp.json. Each includes name/display metadata and protocol documentation.
CLI adapter registration and wiring
src/cli/connect/index.ts
The CLI imports and registers Qwen, Antigravity, and Kiro adapters in the ADAPTERS array, enabling them to be discovered by resolveAdapter() and listed by knownAgents().
Adapter validation and test coverage
test/cli-connect.test.ts, test/connect-new-agents.test.ts
Dispatcher test expectations increase from 8 to 11 adapters. New comprehensive test file validates each adapter's detect() (directory existence) and install() behavior with isolated temp HOME directories. Tests assert mcpServers.agentmemory JSON includes correct command (npx), args (@agentmemory/mcp), and environment variable placeholders (${AGENTMEMORY_URL:-...}, ${AGENTMEMORY_TOOLS:-...} for Qwen). Registry test confirms knownAgents() includes all three new agents.
README documentation for agents and ports
README.md
Three new rows added to "Works with every agent" table documenting Qwen, Antigravity, and Kiro setup and config paths. New Ports subsection lists default port mappings (3111, 3112, 3113, 49134), their purposes, environment-variable overrides, and platform-specific stale-process cleanup commands for post-crash recovery.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • rohitg00/agentmemory#650: Adds the env-default interpolation logic (${AGENTMEMORY_URL:-...} / ${AGENTMEMORY_TOOLS:-...}) that this PR's new adapters depend on for correct MCP wiring configuration.

Poem

🐰 Three new agents hop into the warren,
With settings files placed just right,
Qwen, Antigravity, Kiro—no more sorrow,
Tests verify each platform's light,
The CLI now dances with eleven bright friends! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main changes: adding three new connect adapters (Qwen Code, Antigravity, Kiro) and documentation for ports configuration.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/tier3-agents-docs

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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
Copy Markdown
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.

🧹 Nitpick comments (3)
src/cli/connect/antigravity.ts (1)

5-12: ⚡ Quick win

Drop WHAT-style block comments and keep intent in identifiers/docs fields.

The long comment block duplicates logic already visible in ANTIGRAVITY_DIR and adapter metadata.

♻️ Suggested cleanup
-// Antigravity stores MCP config in mcp_config.json under its app
-// support directory. The schema follows the standard MCP envelope —
-// `{ mcpServers: { ... } }`. Path varies by platform:
-//   macOS:   ~/Library/Application Support/Antigravity/User/mcp_config.json
-//   Linux:   ~/.config/Antigravity/User/mcp_config.json
-//   Windows: %APPDATA%/Antigravity/User/mcp_config.json
-// Connect is gated on win32 elsewhere; we cover macOS + Linux here.

As per coding guidelines, "Avoid code comments explaining WHAT — use clear naming instead".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cli/connect/antigravity.ts` around lines 5 - 12, Remove the long
WHAT-style block comment above ANTIGRAVITY_DIR and instead keep intent in
concise documentation and identifiers: delete the multi-line platform path
explanation and replace it with a short one-line JSDoc or single-line comment
that states purpose (e.g., "Antigravity MCP config directory") and rely on the
ANTIGRAVITY_DIR constant name and existing adapter metadata to convey platform
specifics; ensure any necessary platform notes live in adapter metadata or a
brief comment directly adjacent to ANTIGRAVITY_DIR rather than a large
explanatory block.
src/cli/connect/qwen.ts (1)

5-8: ⚡ Quick win

Remove WHAT-style inline comments in this adapter module.

These lines restate behavior already expressed by the adapter config and naming.

♻️ Suggested cleanup
-// Qwen Code stores its settings (mcpServers + hooks) in
-// ~/.qwen/settings.json. Schema for mcpServers matches Claude Code's
-// shape, so the shared JSON adapter handles the wiring.
-// Source: qwenlm.github.io/qwen-code-docs/en/users/features/mcp

As per coding guidelines, "Avoid code comments explaining WHAT — use clear naming instead".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cli/connect/qwen.ts` around lines 5 - 8, Remove the WHAT-style
explanatory comment block at the top of the qwen adapter module (the three-line
comment describing settings.json, mcpServers schema, and source link) — delete
those inline comments in src/cli/connect/qwen.ts and rely on clear naming and
the adapter config to convey the behavior; ensure no functional code or required
metadata is removed while cleaning up the comment lines.
src/cli/connect/kiro.ts (1)

5-7: ⚡ Quick win

Remove WHAT-oriented comments in this source module.

This context is already clear from the adapter configuration itself.

♻️ Suggested cleanup
-// Kiro stores user-level MCP servers in ~/.kiro/settings/mcp.json.
-// Schema follows the standard MCP envelope { mcpServers: { ... } }.
-// Source: kiro.dev/docs/cli/mcp

As per coding guidelines, "Avoid code comments explaining WHAT — use clear naming instead".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cli/connect/kiro.ts` around lines 5 - 7, Remove the WHAT-oriented
explanatory comment block at the top of the module (the lines describing where
Kiro stores user-level MCP servers, the schema, and the source URL) from the
kiro.ts module; instead rely on clear naming in the adapter and, if needed, move
any remaining integration notes to external docs or a short WHY-oriented
comment. Ensure no functional code changes—only delete or replace the top
comment block so the file no longer contains WHAT-focused documentation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/cli/connect/antigravity.ts`:
- Around line 5-12: Remove the long WHAT-style block comment above
ANTIGRAVITY_DIR and instead keep intent in concise documentation and
identifiers: delete the multi-line platform path explanation and replace it with
a short one-line JSDoc or single-line comment that states purpose (e.g.,
"Antigravity MCP config directory") and rely on the ANTIGRAVITY_DIR constant
name and existing adapter metadata to convey platform specifics; ensure any
necessary platform notes live in adapter metadata or a brief comment directly
adjacent to ANTIGRAVITY_DIR rather than a large explanatory block.

In `@src/cli/connect/kiro.ts`:
- Around line 5-7: Remove the WHAT-oriented explanatory comment block at the top
of the module (the lines describing where Kiro stores user-level MCP servers,
the schema, and the source URL) from the kiro.ts module; instead rely on clear
naming in the adapter and, if needed, move any remaining integration notes to
external docs or a short WHY-oriented comment. Ensure no functional code
changes—only delete or replace the top comment block so the file no longer
contains WHAT-focused documentation.

In `@src/cli/connect/qwen.ts`:
- Around line 5-8: Remove the WHAT-style explanatory comment block at the top of
the qwen adapter module (the three-line comment describing settings.json,
mcpServers schema, and source link) — delete those inline comments in
src/cli/connect/qwen.ts and rely on clear naming and the adapter config to
convey the behavior; ensure no functional code or required metadata is removed
while cleaning up the comment lines.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e899ba7c-6c72-4f98-a934-a5ceae5fb614

📥 Commits

Reviewing files that changed from the base of the PR and between 426bbdd and e69c441.

📒 Files selected for processing (7)
  • README.md
  • src/cli/connect/antigravity.ts
  • src/cli/connect/index.ts
  • src/cli/connect/kiro.ts
  • src/cli/connect/qwen.ts
  • test/cli-connect.test.ts
  • test/connect-new-agents.test.ts

@rohitg00 rohitg00 merged commit bfb5e66 into main May 25, 2026
7 checks passed
@rohitg00 rohitg00 deleted the feat/tier3-agents-docs branch May 25, 2026 22:41
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