Repository navigation
land kanban 534 - #400
Merged
StevenTCramer merged 6 commits intoNov 13, 2026
Merged
land kanban 534#400StevenTCramer merged 6 commits into
StevenTCramer merged 6 commits into
Conversation
Land-Holder: cramer
…r-schema-publish-typed-ids-and-other
…s (526)
A type with its own [JsonConverter] that implements IParsable<TSelf> (typed IDs)
was exported untyped by JsonSchemaExporter, and an array of them had no items.
The generator now finds those types at build time and passes them to
NuruJsonMemberSchema.Create, which publishes {"type":"string"} (plus
"format":"uuid" for a Guid Value) at the root, nested, as array items and as
dictionary values, keeping [Description] and nullability.
A JSON member whose own type is a typed ID now takes a JSON string in
--json-args and MCP arguments; the kind gate accepted only object or array.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StevenTCramer
deleted the
task/526-json-member-schema-publish-typed-ids-and-other
branch
November 13, 2026 23:53
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.
Summary
What changed
operation-endpoint-extractor.json-string-types.cs, new): for each[Operation]JSON memberthe extractor walks the member type (type arguments, array elements, public instance properties of
non-framework types, base types included) and records each type that has its own
[JsonConverter](string-enum converter excluded) and implements
IParsable<TSelf>.IsUuidis set when it has a publicinstance
Guid Value. Carried onOptionDefinition.JsonStringTypes(JsonStringTyperecord, equatable).capabilities-emitter.cs): passes them toNuruJsonMemberSchema.Create(..., stringTypes: [...], uuidTypes: [...]); members with none emit the old call unchanged.nuru-json-member-schema.cs):Creategained optionalstringTypes/uuidTypes. Thetransform rewrites an untyped node (
trueor a typeless object) of those types to{"type":"string"}(+
"format":"uuid"),["string","null"]forNullable<T>or a nullable reference property, and fillsmissing
items/additionalPropertiesfor collections and dictionaries of them (the exporter omitsthem).
[Description]runs after, so it is kept. Done at compile time becausetimewarp-nuruisIsAotCompatible+ trim analyzed: noGetInterfaces()reflection.[Operation]property of a typed-ID typeis not a scalar, so it is a JSON member (
typejson Ns.PrincipalId). Before: itsschemawastrue(untyped) in
--capabilitiesand McpHost, and the--json-args/MCP binder's kind gate accepted only anobject or array, so every value was rejected (
wrong JSON type. Expected json). Now the schema is{"type":"string","format":"uuid"}and the kind gate (json-args-emitter.validation.cs) takes a JSONstring for a member whose own type is a typed ID (
OptionDefinition.IsJsonStringValue; expected typereads
string). Argv still rejects JSON members (--Owner is JSON. Pass it with --json-args.); acceptinga typed ID on argv is a separate change, not done here.
tests/timewarp-nuru-mcphost-tests/mcphost-08-typed-id-schema.cs(in CI multi-mode via themcphost glob): test-local Guid-backed
TidPrincipalId(record struct, converter writing the Guid string,ISpanParsable) and string-backed referenceTidSlug. Covers top-level (capabilities option schema +McpHost inputSchema, non-null and nullable), array items, nested object with
[Description], nullablestruct, nullable reference without format, nested list, dictionary values, string-enum unchanged, and
binding through
--json-argsandNuruMcpToolInvoker(good value, object rejected withExpected string, unparsable rejected as a bind error).documentation/user/features/agent-invocation.md(JSON member schema section),documentation/user/features/neutral-contracts.md(derivation table),changelog.md(Unreleased / Fixed).untyped; property-level
[JsonConverter]is not detected.4.0.0-beta.13(released); ships in the next Nuru beta when one is asked for.Gates
./bin/dev build./bin/dev test(afterganda runfile cache --clear)ganda repo auditvscode-window-icon, gitignored.vscode/settings.json);ganda repo audit --fixfixed it, all checks passTest plan
Smoke:
Expect:
Passed: 3(Should_publish_a_top_level_typed_id_as_a_uuid_string,Should_publish_typed_ids_nested_in_arrays_objects_and_dictionaries,Should_bind_typed_ids_through_json_args_and_mcp_arguments). TheOwnerschema is{"type":"string","format":"uuid"},Members.itemsis the same,Details.properties.Backupis["string","null"], andtid-assign --json-args '{"Owner":"<guid>",...}'exits 0.Kanban task 526
Session: Roslynk