Skip to content

feat: add agentty agent support to the install CLI - #2483

Open
davidwed wants to merge 3 commits into
DeusData:mainfrom
davidwed:main
Open

davidwed wants to merge 3 commits into
DeusData:mainfrom
davidwed:main

Conversation

@davidwed

@davidwed davidwed commented Oct 2, 2026

Copy link
Copy Markdown

What does this PR do?

Add automatic detection, skill installation, MCP registration, uninstall, and --clients selection for the agentty coding agent (https://github.com/1ay1/agentty), following the established detected-agent pattern (OpenHands template):

  • Detection: ~/.agentty/ directory or agentty CLI on PATH; new cbm_detected_agents_t.agentty field probed in cbm_detect_agents()
  • Selection: --clients=agentty token via the CLI_CLIENTS table
  • Install: codebase-memory skill to ~/.agentty/skills/ (Claude-compatible SKILL.md; user scope = trusted on load) and MCP server entry in ~/.agentty/mcp.json (standard mcpServers shape via the existing cbm_install_editor_mcp adapter). Instructions/hooks/tiered profiles deliberately withheld — agentty documents no AGENTS.md equivalent.
  • Uninstall: owned-document matching counterpart; user-modified files and foreign servers survive; skill dir removed only when empty
  • Docs: README agent table row, pkg/npm/README.md (40 detected), docs/llms.txt + docs/index.html + badge (46 surfaces / 40 detected), contract test cli_supported_agent_surfaces_match_installers and the --help enumeration aligned to 46/40 in lockstep

Tests: detection, --clients vocabulary + leak guard, install plan and schema checks, and an install/uninstall roundtrip asserting foreign-server and user-skill preservation in both directions.

Checklist

  • Every commit is signed off (git commit -s) — required, CI rejects
    unsigned commits (DCO, see CONTRIBUTING.md)
  • Tests pass locally (make -f Makefile.cbm test)
  • Lint passes (make -f Makefile.cbm lint-ci)
  • New behavior is covered by a test (reproduce-first for bug fixes)

@davidwed
davidwed requested a review from DeusData as a code owner October 2, 2026 11:08
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Thanks for opening this — it has been seen, and it is queued.

This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence.

Current review status: working through a backlog. 0.9.1-rc.1 is out, so the release freeze that held reviews is over — but it left a large queue of open pull requests behind it, and we are reading through them oldest-first. The background is in discussion #1144.

What that means for this PR, concretely:

  • It will not be closed for inactivity. No stale bot touches pull requests here.
  • It may still sit a while before a human reads it. That is on us, not on you.
  • Older PRs are read first, so a recent one is not being skipped — it is behind a queue.

Things that will genuinely speed it up whenever review does happen:

  • Keep it rebased on main — the tree is moving quickly right now, and a conflicting branch cannot be reviewed as the diff you intended.
  • Get CI green, or say which failures you believe are pre-existing.
  • Keep the change to one claim. Bundled features and refactors get split before they get merged, which costs you a round trip.
  • Every commit needs a sign-off (git commit -s) — CI enforces DCO.

If this fixes a bug, a reproduction we can run is worth more than a description of the symptom.

Thanks for contributing, and sorry in advance for the wait.

Add automatic detection, skill installation, MCP registration, uninstall,
and --clients selection for the agentty coding agent
(https://github.com/1ay1/agentty), following the established
detected-agent pattern (OpenHands template):

- Detection: ~/.agentty/ directory or agentty CLI on PATH; new
  cbm_detected_agents_t.agentty field probed in cbm_detect_agents()
- Selection: --clients=agentty token via the CLI_CLIENTS table
- Install: codebase-memory skill to ~/.agentty/skills/ (Claude-compatible
  SKILL.md; user scope = trusted on load) and MCP server entry in
  ~/.agentty/mcp.json (standard mcpServers shape via the existing
  cbm_install_editor_mcp adapter). Instructions/hooks/tiered profiles
  deliberately withheld — agentty documents no AGENTS.md equivalent.
- Uninstall: owned-document matching counterpart; user-modified files
  and foreign servers survive; skill dir removed only when empty
- Docs: README agent table row, pkg/npm/README.md (40 detected),
  docs/llms.txt + docs/index.html + badge (46 surfaces / 40 detected),
  contract test cli_supported_agent_surfaces_match_installers and the
  --help enumeration aligned to 46/40 in lockstep

Tests: detection, --clients vocabulary + leak guard, install plan and
schema checks, and an install/uninstall roundtrip asserting foreign-server
and user-skill preservation in both directions.

Signed-off-by: davidwe <davidwe@posteo.de>

@DeusData DeusData left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you, @davidwed! This is a clean, well-tested addition:

  • The paths match agentty's own docs (~/.agentty/mcp.json at user scope, ~/.agentty/skills/).
  • Uninstall removes only what we own.
  • Every headline count and the contract test stay in lockstep.

We'd like agentty in, with two changes before merge:

  1. Please register agentty in the table-driven client registry (src/cli/agent_clients.c) instead of the legacy detector.

    • Every client added since Grok Build lives there: Qoder, Kimi Code, GitLab Duo, Rovo Dev, Amp, Devin, Tabnine, CodeBuddy, IBM Bob Shell, Pochi, Pi and Oh My Pi. Each entry carries its stability class, capability bits, detection command and install/remove callbacks.
    • The legacy path is cbm_detected_agents_t, CLI_CLIENTS, the plan-names table and the hand-written install/uninstall blocks. We are no longer extending it.
    • Moving agentty to the registry also gives you detection output, --clients, --plan and uninstall from that one entry.
    • On the current legacy path, print_detected_agents doesn't list agentty. A machine with only agentty would print "Detected agents: (none)" and then install anyway.
  2. Honor $AGENTTY_MCP_CONFIG.

    • agentty's plugin docs say this variable points at an explicit file that overrides both the user and the project mcp.json.
    • When it is set, agentty never reads the entry in ~/.agentty/mcp.json, yet install still reports success.
    • Writing to the override file when the variable is set, as we already do for CLAUDE_CONFIG_DIR, GROK_HOME and VIBE_HOME, closes that gap.

One small thing: the suite comment in tests/test_cli.c changes "6 tests" to "7 tests", but the group already has more than that, so it's fine to drop the count.

Thanks again for picking this up and for modelling it so carefully on the existing clients!

davidwed added a commit to davidwed/codebase-memory-mcp that referenced this pull request Oct 8, 2026
…TTY_MCP_CONFIG

Address the two pre-merge review requests on PR DeusData#2483:

1. Move agentty from the legacy detector to the table-driven client
   registry (src/cli/agent_clients.c), the home of every client added
   since Grok Build. The entry carries its stability class, capability
   bits (MCP | SKILL), detection command, and install/remove callbacks,
   which gives detection output, --clients selection, --plan receipts,
   and uninstall from that one row. The legacy path —
   cbm_detected_agents_t.agentty, the CLI_CLIENTS token, the plan-names
   row, and the hand-written install/uninstall blocks — is removed, so
   print_detected_agents no longer shows a machine with only agentty as
   "(none)" while installing anyway.

2. Honor $AGENTTY_MCP_CONFIG in both directions. When the variable is
   set, install and uninstall target that explicit file (with leading-~
   expansion against HOME, matching CLAUDE_CONFIG_DIR/GROK_HOME/
   VIBE_HOME) and leave ~/.agentty/mcp.json untouched, closing the gap
   where install reported success while agentty read only its override.

Also drop the stale "7 tests" count from the suite comment and cover
the registry entry, the env override, and the override-aware
install/uninstall roundtrip in the CLI and registry suites.

Validated: build clean; focused cli + agent_clients + agent_profiles
runs at 388 passed / 20 failed, the identical pre-change baseline
(install/uninstall staging under the local ASan runner; green on CI).
The seven touched agentty/registry tests pass in isolation.
…TTY_MCP_CONFIG

1. Move agentty from the legacy detector to the table-driven client
   registry (src/cli/agent_clients.c), the home of every client added
   since Grok Build. The entry carries its stability class, capability
   bits (MCP | SKILL), detection command, and install/remove callbacks,
   which gives detection output, --clients selection, --plan receipts,
   and uninstall from that one row. The legacy path —
   cbm_detected_agents_t.agentty, the CLI_CLIENTS token, the plan-names
   row, and the hand-written install/uninstall blocks — is removed, so
   print_detected_agents no longer shows a machine with only agentty as
   "(none)" while installing anyway.

2. Honor $AGENTTY_MCP_CONFIG in both directions. When the variable is
   set, install and uninstall target that explicit file (with leading-~
   expansion against HOME, matching CLAUDE_CONFIG_DIR/GROK_HOME/
   VIBE_HOME) and leave ~/.agentty/mcp.json untouched, closing the gap
   where install reported success while agentty read only its override.

Also drop the stale "7 tests" count from the suite comment and cover
the registry entry, the env override, and the override-aware
install/uninstall roundtrip in the CLI and registry suites.

Signed-off-by: davidwed <davidwe@posteo.de>

This branch has not been deployed

No deployments
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