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
Commit 150d9f9
Browse filesBrowse the repository at this point in the historyBrowse files
Complete earlier fixes and align the reader further with reference parsers
Five earlier review threads were addressed for the case raised but not
its neighbour. This commit closes them properly:
- InMemoryMcpSkillCatalog now hands out copies from ListAsync and GetAsync,
not only on construction, so a mutated result cannot change later responses.
- URI validation decodes each path segment before checking for '.', '..',
and separators, since System.Uri (and therefore the resource collection)
treats "%2e%2e" as "..".
- An unterminated quoted scalar is malformed and no longer reaches the
explicit-frontmatter escape hatch; a quote closed on a later line is
still classified as unsupported multi-line YAML and remains bypassable.
- Directory loading reads each file with a buffer of the length it
checked and fails if the file changed size, so a file growing between
the check and the read can neither exceed the limit nor be served with
a manifest that does not describe it.
- URI aliases that differ only in scheme or authority case are rejected
even with identical content, because the resource collection would
serve one resource whose contents carry the first URI, failing a
verified read of the second.
Further alignment with reference YAML parsers, each confirmed against the
yaml npm package: plain mapping keys resolve like values ("TRUE:" is the
key "true", "0x10:" is "16"), flow mappings honour YAML's separator rules
("{version:1}" is the key "version:1" with a null value), a plain scalar
ended by a comment cannot continue on the next line, and only space and
tab are trimmed, so non-breaking spaces stay in scalars. Nesting is capped
at 32 levels so a hostile file cannot exhaust the stack.
Skill names accept Unicode lowercase and caseless letters, per the Agent
Skills wording "unicode lowercase alphanumeric characters". A test that
relied on reflection-based serialization now uses the SDK's options, so
the skills tests pass on net9.0 and net8.0 as well as net10.0.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01P6omaTvQiryHtzFHRqUE3b
/// so a server cannot publish an entry a conforming host would refuse to load.
12
12
/// </para>
13
13
/// <para>
14
-
/// The catalog keeps its own copy of every entry, so later changes to the objects passed to the constructor do
15
-
/// not affect what is served. Entries are ordered by URI so that pagination is stable across calls. Cursors are
14
+
/// The catalog keeps its own copy of every entry and hands out copies, so neither later changes to the objects
15
+
/// passed to the constructor nor changes to a returned entry affect what is served. Entries are ordered by URI so that pagination is stable across calls. Cursors are
16
16
/// keyset cursors over that order rather than offsets.
17
17
/// </para>
18
18
/// <para>
@@ -91,7 +91,10 @@ public ValueTask<McpSkillPage> ListAsync(string? cursor, McpSkillRequestContext
?$"The file '{entry.Uri}' is listed by more than one skill with different content."
85
-
:$"The file '{entry.Uri}' is equivalent to '{existing.Uri}', which another skill lists with different content. Resource URIs are compared case-insensitively in their scheme and authority.",
94
+
$"The file '{entry.Uri}' is listed by more than one skill with different content.",
0 commit comments