Skip to content

Commit 05f64f6

Browse files
ochafikclaude
andcommitted
Add compatibility tests for new sampling tool types
- Add type checks for ToolChoice, ToolUseContent, ToolResultContent, SamplingMessageContentBlock - Update expected spec types count from 119 to 123 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 05ef2b1 commit 05f64f6

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/spec.types.test.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,22 @@ const sdkTypeChecks = {
587587
ModelPreferences: (sdk: SDKTypes.ModelPreferences, spec: SpecTypes.ModelPreferences) => {
588588
sdk = spec;
589589
spec = sdk;
590+
},
591+
ToolChoice: (sdk: SDKTypes.ToolChoice, spec: SpecTypes.ToolChoice) => {
592+
sdk = spec;
593+
spec = sdk;
594+
},
595+
ToolUseContent: (sdk: SDKTypes.ToolUseContent, spec: SpecTypes.ToolUseContent) => {
596+
sdk = spec;
597+
spec = sdk;
598+
},
599+
ToolResultContent: (sdk: SDKTypes.ToolResultContent, spec: SpecTypes.ToolResultContent) => {
600+
sdk = spec;
601+
spec = sdk;
602+
},
603+
SamplingMessageContentBlock: (sdk: SDKTypes.SamplingMessageContentBlock, spec: SpecTypes.SamplingMessageContentBlock) => {
604+
sdk = spec;
605+
spec = sdk;
590606
}
591607
};
592608

@@ -615,7 +631,7 @@ describe('Spec Types', () => {
615631
it('should define some expected types', () => {
616632
expect(specTypes).toContain('JSONRPCNotification');
617633
expect(specTypes).toContain('ElicitResult');
618-
expect(specTypes).toHaveLength(119);
634+
expect(specTypes).toHaveLength(123);
619635
});
620636

621637
it('should have up to date list of missing sdk types', () => {

0 commit comments

Comments
 (0)