Skip to content

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

Open
davidwed wants to merge 9 commits into
DeusData:mainfrom
davidwed:agentty-install
Open

davidwed wants to merge 9 commits into
DeusData:mainfrom
davidwed:agentty-install

Conversation

@davidwed

@davidwed davidwed commented Nov 3, 2026

Copy link
Copy Markdown

feat: add agentty agent support to the install CLI
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

  • 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 and others added 9 commits October 5, 2026 10:40
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>
…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>
Resolve the README conflict: keep main's rewording and re-apply the
agentty additions (46 client surfaces, 40 detected automatically, the
agentty row in the support matrix), including the client count in the
intro sentence main added since.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Read $AGENTTY_MCP_CONFIG in the registry setup in cli.c, through the
same cbm_agent_registry_env_path helper (cbm_safe_getenv plus
cbm_expand_user_path) that resolves every other client override, and
hand it to agent_clients.c as a resolve option. The resolver keeps no
environment reads of its own, and the separate public helper is gone.

Absolute and ~ values resolve as before. A relative value is now
ignored, as for the other overrides, instead of naming a file relative
to whatever directory install runs from.

Tests: the env-override test checks the resolve option directly and the
environment path through the install plan (absolute, ~, relative). The
install/uninstall roundtrip restores HOME and PATH before it reports a
failure, so a failure no longer leaves the rest of the cli suite without
git on PATH, and it also checks the exit code of the override uninstall.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
The 2026-10-23 merge of main took main's reworded text in README.md,
pkg/npm/README.md, docs/llms.txt and docs/index.html, and with it the old
45 surfaces / 39 detected counts. This branch registers agentty as the
46th client surface (40 detected automatically, 6 conditional/explicit),
so the docs disagreed with the installer and with the CLI help in
src/main.c.

Re-apply the counts on top of main's wording: 46 surfaces and 40
detected, with agentty in the detected lists of the npm README, the
landing page and llms.txt.

cli_supported_agent_surfaces_match_installers (tests/test_cli.c) checks
these strings and failed on every test leg at tests/test_cli.c:7326.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Bring the branch up to date with main (83109dd) so CI checks the
agentty integration against the current tree. No conflicts.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
@davidwed
davidwed requested a review from DeusData as a code owner November 3, 2026 13:08
@github-actions

github-actions Bot commented Nov 3, 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.

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