Repository navigation
feat(cli): mount generated api operations in subgroups, api <group> <command> - #3141
Merged
Merged
Conversation
…command> An operation whose manifest names a group (cli-base names.groups) is mounted as api <group> <command>, the command without the repeated group word, and checked against its path: api.contacts.list, with api.contacts covering the group. alsoChecks, the delete defaults, api list (path and group) and api show (quoted path, old name or id) follow the path. A profile that still names the old flat key api.contacts-list keeps its hold on that one command: the key is known, checked beside the new one through the keyed guard (deny refuses, ask asks, readonly stops a write), lifts nothing with allow, and warns to rename it. The old path stops working (WC-CMD-8). A manifest without groups mounts flat as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leemour
force-pushed
the
feat/api-subgroups
branch
from
November 19, 2026 04:26
2e123de to
57b9797
Compare
This was referenced Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
Owner decision NEED-2754 B: a generated CLI's
apigroup stops being one flat list. This PR is the cli-core half. The cli-base half (the manifest'sgroup,names.groups) is WireCatLabs/cli-base#661, merged.Why
A flat
apiof 100–500 operations is hard to read and to search. Grouping by resource follows the service's own reference, and one key (api.contacts) can then cover a resource.What
generatedApiCommandmounts an operation whose manifest has agroupasapi <group> <command>, without the repeated word (contacts-list→api contacts list). It readsgroupas an optional field, so cli-core keeps working with the published cli-base 0.118 pin. A manifest without groups mounts flat, exactly as before.configuration_error).serviceApiCommand: the key is the path (api.contacts.list).alsoChecks, the delete defaults,--alland the schema loading follow the path through a newconfigurehook, not a flat name lookup.api.contacts-listkeeps its hold on that one command. The key is known, so the unknown-key check does not refuse the config. It is checked beside the new key through the keyed guard:denyrefuses,askasks,readonlystops a write. Itsallowlifts nothing. Each call warns to rename it.--dry-runshows it as a conditional key.api contacts-liststops working (WC-CMD-8).api listprints the path and agroupcolumn.api showtakes the quoted path, the old name or the id. It is still one argument, so its MCP input schema does not change.changes/feat-api-subgroups.md(Added).The rule is WC-CMD-33 in cli-base. Design: cli-private
plans/2026-11-19-api-subgroups.md(branchplans/hubspot-cli).Testing
src/cli/service-api-groups.test.ts: mounting, keys by path, the alias (deny, allow under a group deny, readonly on a read and on a write), list and show,--dry-runkeys, and the clash refusal.vitest runofsrc/cli/service-api*,src/cli/bot,src/mcp,profile-site,kit/own-catalogue: 547 pass.typecheck,docs:check, and biome on the changed files.🤖 Generated with Claude Code