Align safety guard and docs with the real Sprites MCP API - #1
Merged
Conversation
The PreToolUse guard and the bundled skill documented parameters and tools that the hosted MCP server does not expose, so the exposure confirmation never fired and the skill could emit invalid calls. - Detect service exposure via `http_port` on `service_create`, which is what actually puts a service behind the Sprite's URL. The previous patterns looked for `public_url`/`is_public`/`expose_*`, none of which exist in the service schema, so that branch was unreachable. - Drop guard patterns for tools that have never existed (`delete_sprite`, `restore_sprite`, `delete_checkpoint`, privilege/resource policy) and anchor the remaining ones. Give each its own confirmation reason. - Correct `checkpoint_create` guidance to the `comment` parameter, not `reason`. - Document that `policy_network_update` replaces the entire rule set, and tell the skill to read merged rules back from `policy_network_get` first. - Replace the blanket "every Sprite URL is potentially internet-accessible" claim: URLs are auth-gated by default and no tool here can make one public. - Note that Sprite-level tools are generated from the Sprite environment API and may change, so the live tool list wins over the map in the skill. - Rework the guard tests to use real tool parameters; the exposure test had been asserting against an invented `public_url` field.
- Run `claude plugin validate --strict` for both the plugin and the marketplace in CI, pinned to CLI 2.1.224. The README already told contributors to run it; now a misspelled or stale manifest field fails the build instead of shipping. - Move the marketplace description to the top-level `description` field, which supersedes the backward-compatible `metadata.description`, and add the schemastore `$schema` plus the owner URL. - Reference the previously unused logo from the plugin README, and teach the repository checker to resolve `src` paths in HTML tags so that reference is covered by the same broken-link check as Markdown links. - Drop the empty `argument-hint` from the status skill; the key is only useful when the skill actually takes arguments.
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.
Reviewed the plugin against the Claude Code plugin docs and the authoritative tool reference in
superfly/sprites-mcp. The structure was already correct —claude plugin validatepassed, the hook matcher used the rightmcp__plugin_sprites_sprites__…scoped form, and the 18 tools in the skill matched the server exactly. The problems were in the content: the guard fired on parameters that don't exist, and several doc statements didn't match the real API.Guard and API alignment (64f8dee)
The exposure confirmation never fired. It looked for
public_url,is_public,make_public, andexpose_*. The realservice_createschema isservice_name,cmd,args,needs,http_port,duration— none of those keys exist, so the branch was unreachable. Worse, the unit test asserted against an inventedpublic_url: true, so the suite was green on a fiction.The actual exposure signal is
http_port: per the services docs, without it "the proxy routes to port 8080, not to your service." The guard now keys on that.Also in this commit:
delete_sprite,restore_sprite,delete_checkpoint, privilege/resource policy), anchored the three real ones, and gave each its own confirmation reason instead of one generic string.checkpoint_createtakescomment, notreason— the skill had the wrong parameter name, which is exactly the kind of thing that produces an invalid tool call.policy_network_updatereplaces the entire rule set. Nothing told the model to read the current policy back first, so a "block one domain" request could silently drop every existing rule.concepts/networking.mdx, URL auth defaults tosprite, and no MCP tool in this plugin can flip it — that is a separate--url-auth publicchange. The accurate framing keeps the real constraint (anything onhttp_portis reachable there) without a warning the model learns to discount.checkpoint_restore,policy_network_update,service_createwithout a port, and a read-onlyservice_get.Manifest, CI, and asset tidy-up (0b8151f)
claude plugin validate --strictfor both the plugin and the marketplace, pinned to CLI 2.1.224. The README already told contributors to run it; now a stale or misspelled manifest field fails the build. Verified locally that--strictpasses on this tree and thatvalidateruns clean against an emptyCLAUDE_CONFIG_DIR, so it won't hang the runner.metadata.description→ top-leveldescription(the former is only accepted for backward compatibility), plus$schemaandowner.url.iconfield in the plugin or marketplace schema — so it shipped in every install for nothing. It is now shown in the plugin README, and the repository checker resolvessrcpaths in HTML tags so that reference is covered by the same broken-link check as Markdown links.argument-hintfrom the status skill.Verification
13 tests,
check_repository.py,compileall, andclaude plugin validate --stricton both manifests all pass.Worth a second opinion
checkpoint_rollbackwould slip past the guard silently. The skill instructs Claude to confirm anyway. A looserestore|destroy|deletecatch-all would trade some false prompts for that coverage.