Repository navigation
feat: update types present in both schema versions (T7) - #275
sideeffffect wants to merge 5 commits into
Conversation
|
Is plumbing |
) Add the 2026-07-28 shared metadata: - new Icon and Annotations types - icons on Implementation, ToolDefinition, Resource, ResourceTemplate, Prompt, ResourceLink - annotations and _meta on content blocks (Text/Image/Audio/ResourceContent) and Resource/ResourceTemplate - Implementation.websiteUrl/description, PromptReference.title, ResourceLink.title/size - server DSL builders (icons/annotations) on the resource, resource-template and prompt builders - schema conformance tests for the new fields against the 2026-07-28 schema All additive (optional, default None) so the 2025-11-25 wire is unchanged. Tool-builder `.icons(...)` deferred (threads through the multi-step Tool[I,O] chain); ToolDefinition still carries icons at the protocol level. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ange The mdoc client examples/quickstart matched ToolContent.Text with two patterns; T7 added annotations and _meta. Switch to a type pattern so the snippets survive further field additions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d3d8c23 to
6f405bf
Compare
|
Follow-up, not this PR. #275 only adds the shared metadata types — |
|
Automated review Scope: the T7 delta only ( 1. The tests contradict the PR's own titleAll 9 new conformance cases went into I diffed the two bundled schemas. AGENTS.md rule 2 covers exactly this. 2.
|
|
Points 1, 2, 3 need addressing @sideeffffect |
Both schemas declare Icon.theme as the closed enum ["dark","light"] and bound Annotations.priority to 0.0..1.0. Modelling them as Option[String] and Option[Double] let invalid values compile and reach the wire. - Icon.theme is now an IconTheme enum (Dark/Light) with a hand-written codec, matching Role/LoggingLevel/CacheScope and the other closed string sets in chimp.protocol. - Annotations.priority is now an opaque Priority bounded to 0.0..1.0, rejecting out-of-range values on construction and decode. Doing this pre-1.0 avoids a later String->enum / Double->refined widening that would break source compatibility on these public types. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Icon, Annotations, Implementation, Tool, Resource, Prompt, PromptReference, ResourceLink and TextContent are byte-identical in the 2025-11-25 and 2026-07-28 schemas, and every field T7 adds already exists in 2025-11-25. With the nine cases living only in the 2026-07-28 spec, a regression that breaks the older revision was invisible (AGENTS.md rule 2). Move them into the shared SchemaConformance trait so both concrete specs validate them. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
README.md matched ToolContent.Text with two patterns on three lines;
T7 added annotations and _meta, so the arity is now four. The README is
not mdoc-compiled (mdocIn := file("docs")), so this was missed.
Switch to the type pattern `case t: ToolContent.Text => t.text`, the
same form used in docs/, so the snippets survive further field
additions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Addressed points 1–3 from the automated review (head 1. Conformance now runs under both revisions — 2. Closed domains are now typed — 3. README snippets compile —
|
|
@kubinio123 all three points are addressed above — ready for another look when you have a moment. (A formal re-review request via the reviewers panel isn't available to me as a fork contributor, hence the ping.) |
Stacked on #273 (T6) → #271 (T3). Base is
2026-07-28-protocol-support, so the diff also shows T3+T6 until they merge — review the T7 delta: sideeffffect/chimp@feat/t6-subscriptions...feat/t7-shared-typesT7 — #245: update types present in both schema versions
IconandAnnotationstypesiconsonImplementation,ToolDefinition,Resource,ResourceTemplate,Prompt,ResourceLinkannotationsand_metaon content blocks (Text/Image/Audio/ResourceContent) and onResource/ResourceTemplateImplementation.websiteUrl/description,PromptReference.title,ResourceLink.title/sizeicons/annotations) on the resource, resource-template and prompt buildersToolContent.Textfield additions (mdoc)All additive (optional, default
None) → 2025-11-25 wire unchanged. Verified: core + server unit suites green; all four conformance combos green (client/server × 2025-11-25 / 2026-07-28).Note: tool-builder
.icons(...)deferred (threads through the multi-stepTool[I,O]chain);ToolDefinitionstill carriesiconsat the protocol level.Closes #245.
Stack (bottom → top, all on
2026-07-28-protocol-support)#271 (T3) → #273 (T6) → #275 (T7, this PR) → #276 (T5) → #274 (T8)
🤖 Generated with Claude Code