refactor: replace the info suffix on RPC names with get/list - #9
Merged
Merged
Conversation
Every RPC name ended in `info`, which told a caller nothing the area segment had not already said. Name the last segment with a verb instead, the way devframe shapes its own ids (`<namespace>:<area>:<fn>`, as in `devframe:state:read`), taking the verb each tool description already opens with: - `astro-devtools:overview:info` → `astro-devtools:overview:get` - `astro-devtools:routes:info` → `astro-devtools:routes:list` - `astro-devtools:actions:info` → `astro-devtools:actions:list` - `astro-devtools:config:info` → `astro-devtools:config:get` (panel-only) devframe derives the MCP tool names from these ids, so the agent tools become `astro-devtools_overview_get`, `astro-devtools_routes_list` and `astro-devtools_actions_list`. A verb also leaves room for a sibling query on the same area, such as a future `routes:match`. The payload types (`OverviewInfo`, `RoutesInfo`, …) keep their names, and `project:context` is left as it is. The package is not on npm yet, so no released version carries the old names. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rz6UdQD5h8aKSP4KP91912
commit: |
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.
Summary
Renames the four RPC queries whose names ended in
info. The suffix told a caller nothing the area segment had not already said. The last segment is now a verb, following the shape devframe uses for its own ids (<namespace>:<area>:<fn>, as indevframe:state:read→devframe_state_read). Each verb is the one the tool's description already opens with ("Get …" / "List …").astro-devtools:overview:infoastro-devtools:overview:getastro-devtools_overview_getastro-devtools:routes:infoastro-devtools:routes:listastro-devtools_routes_listastro-devtools:actions:infoastro-devtools:actions:listastro-devtools_actions_listastro-devtools:config:infoastro-devtools:config:getThe MCP names change along with the ids because devframe derives them (
toAgentToolNameturns every run of characters outside[\w-]into_). A verb also leaves room for a second query on the same area, such as a futureroutes:match. With a bare noun, that would sit awkwardly next to anastro-devtools:routes.Changes
src/types.ts,src/rpc.ts: the renamed keys ofAstroDevtoolsRpcFunctionsand their definitions. Descriptions and handlers are unchanged.useRpcDatacalls in Overview, Routes, Actions and Config.rpc,devframe,actions-metadata,hooks) and e2e (rpc,server).skills/astro-devtools/SKILL.md(its tool table and curl example), and the maintainer skill.agents/skills/verify-astro-devtools/.What stays
OverviewInfo,RoutesInfo,ActionsInfo,ConfigInfo) keep their names. They sit alongside the existingProjectInfo.astro-devtools:project:contextis unchanged.Verification
vp run readypasses: build, sync, check, knip, publint, and the 373 unit tests.vp run playground#e2epasses locally (51 tests), including the MCP tool list and atools/callagainst the renamed tools.🤖 Generated with Claude Code
https://claude.ai/code/session_01Rz6UdQD5h8aKSP4KP91912