Repository navigation
Lint resource templates and icons (MCPP025-MCPP028) - #33
Merged
Merged
Conversation
ShmueLior
force-pushed
the
feat/resource-lint
branch
from
December 4, 2026 08:15
6d64bce to
25f85a0
Compare
…ntries, write resourceTemplate kind
…) bound to options A path such as C:\a.txt matches a scheme-prefix regex as C: and can parse as a file URI on Windows. The parsed scheme must now also be a prefix of the original text. Lint overloads for prompts and listed contracts are non-nullable so Lint(surface, null) still means options. Docs now say MCPP028 does not run on --from-file, which stays true after snapshots gain icons.
ShmueLior
force-pushed
the
feat/resource-lint
branch
from
December 4, 2026 08:25
25f85a0 to
5415531
Compare
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.
Lint resource templates and icons (MCPP025-MCPP028), add --resources
Stacked on #32; review after it merges. Based on
feat/prompt-lintso this PR is only the resource-lint commits.When the server declares the resources capability, lint checks resource templates. Resources from
resources/listare checked only with--resources(configlint.resources), because file-style servers can list hundreds of them.uriis an absolute URI with a scheme, templateuriTemplateis non-empty with a scheme before the first{, and prompt names, URIs and uriTemplates aren't listed twice.name.srcishttp:,https:ordata:;mimeTypelooks liketype/subtype; sizes areWxHorany;themeislightordark. Nothing is fetched.LintListedContractsbag (prompts, resource templates, resources, protocol tools) andToolLinter.Lint(surface, contracts, options).--from-filedoes not run it, because that path lints the snapshot's tools only. After PR A lands, a follow-up could also read snapshot icons.weather://cities) inresources/list, notresources/templates/list. So it is only linted with--resources. Noted in the README./docs/a.txt, and Windows paths likeC:\a.txt, count as invalid resource URIs (Uri.TryCreatecan treat them as file URIs; the parsed scheme must also be a prefix of the original text)."kind": "resourceTemplate".Tests: full suite 1552 passed on net8.0 and net10.0, Release, 0 warnings. Rebuilt on updated B after PR #30 (F14), including B's non-nullable
Lint(surface, prompts)overload. Resource and resource-template findings use the same optional JSONkindfield as B.Conflicts while rebuilding onto B+main were resolved by keeping both sides: CHANGELOG (resource-lint bullet first, including the F14 optional finding
kindsentence, then F14/F15/F16); CliApp (F14--format/--sarifandWriteOutputAsync, plus--resourcescapture andcontracts is null ? Lint(surface, options) : Lint(surface, contracts, options)); Host and ServerOptions (FromFilePathplus listed contracts). Listed-kinds hunks in ToolLinter were re-checked and kept (prompts, resource templates, and resources when--resourcesis set). The lint SARIF golden gained rules MCPP025-MCPP028; lint JSON was unchanged.Likely remaining conflicts:
PublicAPI.Unshipped.txt,CliTests.cs,LintConfigTests.cs,ToolLinterTests.cs(rule id list), CHANGELOG.