import { harnessV1BridgeInboundCommandSchemas, harnessV1BridgeOutboundMessageSchema, harnessV1BridgeReadySchema, harnessV1BridgeStartBaseSchema, } from '@ai-sdk/harness'; import { z } from 'zod/v4'; export const outboundMessageSchema = harnessV1BridgeOutboundMessageSchema; export type OutboundMessage = z.infer; export const startMessageSchema = harnessV1BridgeStartBaseSchema.extend({ operation: z.enum(['prompt', 'compact']).optional(), provider: z.string().optional(), variant: z.string().optional(), instructions: z.string().optional(), resumeSessionId: z.string().optional(), mcpServers: z.record(z.string(), z.unknown()).optional(), }); export type StartMessage = z.infer; export const inboundMessageSchema = z.discriminatedUnion('type', [ startMessageSchema, ...harnessV1BridgeInboundCommandSchemas, ]); export type InboundMessage = z.infer; export const bridgeReadySchema = harnessV1BridgeReadySchema; export type BridgeReady = z.infer;