MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / parseJsonWithSchema

Function parseJsonWithSchema

packages/shared/src/mcp/protocol.ts:62–71  ·  view source on GitHub ↗
(data: string, schema: ZodType<T>)

Source from the content-addressed store, hash-verified

60 action: DesignActionSchema
61 })
62 .strict()
63
64export const MessageToExtensionSchema = z.discriminatedUnion('type', [
65 DesignActionResultMessageSchema,
66 RegisteredMessageSchema,
67 StateMessageSchema,
68 DesignTaskStateMessageSchema,
69 ToolCallMessageSchema
70])
71
72// Messages from extension to hub. These stay strict: the Hub updates on every launch, so an
73// unexpected field means a real mismatch rather than an older peer.
74export const ActivateMessageSchema = z

Callers 2

parseMessageToExtensionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected