Skip to content

Commit 2e45b82

Browse files
ochafikclaude
andcommitted
refactor: re-export JSONRPCResponseSchema from generated
JSONRPCResponseSchema is identical in both files (z.union of result/error), so re-export from generated to get the .describe() call. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7603a44 commit 2e45b82

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ import {
197197
// Derived capability schemas (generated from extracted types)
198198
ClientTasksCapabilitySchema,
199199
ServerTasksCapabilitySchema,
200+
// JSON-RPC schemas
201+
JSONRPCResponseSchema,
200202
} from './generated/sdk.schemas.js';
201203

202204
export {
@@ -339,6 +341,7 @@ export {
339341
SamplingMessageContentBlockSchema,
340342
ClientTasksCapabilitySchema,
341343
ServerTasksCapabilitySchema,
344+
JSONRPCResponseSchema,
342345
};
343346

344347
export const LATEST_PROTOCOL_VERSION = '2025-11-25';
@@ -425,9 +428,8 @@ export const JSONRPCMessageSchema = z.union([
425428
JSONRPCResultResponseSchema,
426429
JSONRPCErrorResponseSchema
427430
]);
428-
export const JSONRPCResponseSchema = z.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
429431

430-
// Note: EmptyResultSchema (with .strict()), CancelledNotificationParamsSchema are re-exported from generated.
432+
// Note: JSONRPCResponseSchema, EmptyResultSchema (with .strict()), CancelledNotificationParamsSchema are re-exported from generated.
431433

432434
/* Cancellation */
433435
/**

0 commit comments

Comments
 (0)