Skip to content

Commit c23c80d

Browse files
committed
Update EnumSchema and extend Elicitation result to support string array return type. See [SEP-1330](modelcontextprotocol/modelcontextprotocol#1330)
* In types.ts - add UntitledSingleSelectEnumSchema, TitledSingleSelectEnumSchema, LegacyTitledEnumSchema - add SingleSelectEnumSchema that is a union of these three - add UntitledMultiSelectEnumSchema, TitledMultiSelectEnumSchema - add MultiSelectEnumSchema that is a union of these two - refactor EnumSchemaSchema to be a union of SingleSelectEnumSchema and MultiSelectEnumSchema * In elicitation.test.ts - simplify tests by extracting the duplicated client and server creation and connection into a beforeEach run in the describe for each flow - add positive/negative tests for all enum permutations (single-select, multi-select, titled, untitled, and legacy - "should succeed with valid selection in single-select untitled enum" - "should succeed with valid selection in single-select titled enum" - "should succeed with valid selection in single-select titled legacy enum" - "should succeed with valid selection in multi-select untitled enum" - "should succeed with valid selection in multi-select titled enum" - "should reject invalid selection in single-select untitled enum" - "should reject invalid selection in single-select titled enum" - "should reject invalid selection in single-select titled legacy enum" - "should reject invalid selection in multi-select untitled enum" - "should reject invalid selection in multi-select titled enum"
1 parent ee9fed2 commit c23c80d

File tree

2 files changed

+481
-211
lines changed

2 files changed

+481
-211
lines changed

0 commit comments

Comments
 (0)