You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(skills): name each client's own catalog-budget remedies - #2698
When --verify / verify-all hits the skills catalog budget, the incomplete message was hard-coded in core/mcp/skillsVerification.ts with the web's "raise it in the server's Skills settings" and the one-shot CLI's --method skills/get --uri <uri> --verify — in every client. mcpdo and the TUI have neither.
Change
verifySkills takes a SkillBudgetHint (raise + verifyOne clauses). The walk still owns the sentence. Each caller supplies the two remedies. With no hint it falls back to DEFAULT_SKILL_BUDGET_HINT, which names no client, so a new caller can't pick up another client's commands by accident.
mcpdo (MCPDO_SKILL_BUDGET_HINT): raise with skillCatalogMaxSkills / skillCatalogMaxBytes in the connection's catalog entry, and verify with `mcpdo @<conn> skills/get <uri> --verify`. runMethod gains an optional third RunMethodOptions argument, which defaults to the CLI hint. The daemon passes mcpdo's hint at all three runMethod sites. The hint is kept out of MethodArgs on purpose: mcpdo builds those from caller-sent RPC params.
TUI (SkillsTab): raise with --skill-catalog-max-skills / --skill-catalog-max-bytes at launch, and verify a single skill by selecting it and pressing Enter.
The skill URI is still never spliced into a command; each command uses the <uri> placeholder.
Tests
clients/mcpdo/__tests__/skills-budget-hint.test.ts (new) runs end to end against an HTTP skills server with skillCatalogMaxSkills: 1. It checks that mcpdo's remedies appear and the CLI/web ones don't. It then runs the suggested mcpdo @<conn> skills/get <uri> --verify back through mcpdo and gets a full verdict for the skipped skill.
Core: the default hint is client-neutral, and a caller-supplied hint replaces it.
TUI: the verify-all budget test asserts the pane's own remedies and the absence of --method.
npm run local:gate passed.
TUI output
The only TUI change is this message text. Here is the rendered frame from the SkillsTab test, for a skill past a budget of one:
│ Incomplete:
│ Not read: this run already reached its catalog budget of 1 skills / 67108864
│ bytes (raise it with --skill-catalog-max-skills / --skill-catalog-max-bytes at
│ launch). Nothing about this skill's files has been checked — verify it on its
│ own by selecting it and pressing Enter to get a verdict.
The incomplete message for a skill past the run's catalog budget was
hard-coded in core with the web's "Skills settings" and the one-shot CLI's
`--method skills/get --uri <uri> --verify`, so mcpdo and the TUI sent their
users to a setting and a command that do not exist there.
verifySkills now takes a SkillBudgetHint (where to raise the budget, how to
verify one skill alone), defaulting to client-neutral text. The one-shot CLI
names --skill-catalog-max-*; mcpdo (via a new runMethod options argument the
daemon passes) names the catalog entry and `mcpdo @<conn> skills/get <uri>
--verify`; the TUI names its launch flags and Enter.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
Copilot round 1: one finding (the mcpdo test's 20s command timers were inside Vitest's 15s default). Fixed in 50a057b with an explicit outer test timeout above the three command budgets, and replied in the thread. No suppressed comments. Requesting round 2.
daemon/stop only queues shutdown and returns its response before stop() finishes (clients/mcpdo/src/daemon/server.ts:534-537). Removing the directory immediately can therefore race a still-running daemon and leave it alive across tests. Wait for the socket to disappear before deleting the directory, as the other spawned-daemon suites do.
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
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.
Closes #2633
Problem
When
--verify/ verify-all hits the skills catalog budget, theincompletemessage was hard-coded incore/mcp/skillsVerification.tswith the web's "raise it in the server's Skills settings" and the one-shot CLI's--method skills/get --uri <uri> --verify— in every client. mcpdo and the TUI have neither.Change
verifySkillstakes aSkillBudgetHint(raise+verifyOneclauses). The walk still owns the sentence. Each caller supplies the two remedies. With no hint it falls back toDEFAULT_SKILL_BUDGET_HINT, which names no client, so a new caller can't pick up another client's commands by accident.CLI_SKILL_BUDGET_HINT, incore/cli/handlers/skills-verify.ts): raise with--skill-catalog-max-skills / --skill-catalog-max-bytesor the server'sskillCatalogMaxSkills / skillCatalogMaxBytes, and verify with`--method skills/get --uri <uri> --verify`. The command is the same as before, so the Skills-verification budget-exceeded message names a--method skills/get --uriescape hatch with no test asserting it round-trips #2428 round-trip test still covers it.MCPDO_SKILL_BUDGET_HINT): raise withskillCatalogMaxSkills / skillCatalogMaxBytesin the connection's catalog entry, and verify with`mcpdo @<conn> skills/get <uri> --verify`.runMethodgains an optional thirdRunMethodOptionsargument, which defaults to the CLI hint. The daemon passes mcpdo's hint at all threerunMethodsites. The hint is kept out ofMethodArgson purpose: mcpdo builds those from caller-sent RPC params.SkillsTab): raise with--skill-catalog-max-skills / --skill-catalog-max-bytesat launch, and verify a single skill by selecting it and pressing Enter.<uri>placeholder.Tests
clients/mcpdo/__tests__/skills-budget-hint.test.ts(new) runs end to end against an HTTP skills server withskillCatalogMaxSkills: 1. It checks that mcpdo's remedies appear and the CLI/web ones don't. It then runs the suggestedmcpdo @<conn> skills/get <uri> --verifyback through mcpdo and gets a full verdict for the skipped skill.--method skills/get --uriescape hatch with no test asserting it round-trips #2428 round-trip now also asserts the--skill-catalog-max-*remedy.--method.npm run local:gatepassed.TUI output
The only TUI change is this message text. Here is the rendered frame from the
SkillsTabtest, for a skill past a budget of one:🤖 Generated with Claude Code