Repository navigation
feat(unstable-v2): remove pattern from elicitation string properties - #2864
Merged
Merged
Conversation
ACP added `pattern` on top of MCP's string schema, which the elicitation form schema is based on. A Client then evaluates a regular expression it did not write, and the Elicitation RFD had to require bounded evaluation for it. MCP's string schema has no `pattern`. - Remove `pattern` from `StringPropertySchema` in the v2 types and schema. The v2 type ignores a `pattern` it receives. - Drop the keyword from the elicitation page, stable and draft. - Add an Elicitation section and checklist items to the migration guide. - Record the removal in the tracking RFD and note it in the Elicitation RFD. v1 keeps `pattern`.
Open
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.
Removes
patternfrom string properties in v2 elicitation forms. v1 keeps it.ACP's form schema is based on the MCP elicitation specification. MCP's string schema has
minLength,maxLength,format, anddefault, and nopattern. ACP addedpatternon top. A Client then evaluates a regular expression it did not write against what the user types, and the Elicitation RFD had to require bounded evaluation for it. The v2 spec pages never carried that rule. Withpatterngone, v2 has the same string keywords as MCP and needs no such rule.Wire change
This changes the v2 wire format. A v2 form no longer carries
pattern.patternand check the submitted value themselves. The elicitation page already says Agents SHOULD validate submitted values.pattern.patternwhen it serves v2.Adapters
Neither adapter needs a change. codex-acp and claude-agent-acp do not send
pattern.Changes
agent-client-protocol-schema/src/v2/elicitation.rs:StringPropertySchemaloses thepatternfield and its builder method. A test shows that the type reads a form that still haspatternand does not keep the keyword.schema/v2/schema.json,schema/v2/schema.unstable.json, and bothschema.mdxpages: regenerated.elicitation.mdx, stable and draft: the text property row and the sentence about ECMA-262 syntax.migration.mdx: a new Elicitation section, theelicitation/createrow in the method table, and one item at the end of the Agent and Client checklists.pattern. The RFD describes v1, so the rest stays.Checks
The generator tests in all four feature sets,
cargo test --all-features, the three clippy runs, rustdoc, Prettier,cargo fmt, andtypospass. Regenerating the schema again produces no further diff.