20 lines
686 B
TypeScript
20 lines
686 B
TypeScript
|
|
/**
|
||
|
|
* host domain zod schemas (names derived from map keys).
|
||
|
|
*/
|
||
|
|
|
||
|
|
import { z } from 'zod'
|
||
|
|
import type { RequestPayload, ResponseValue } from './rpc-map.ts'
|
||
|
|
import type { Wire } from './rpc.schema.ts'
|
||
|
|
|
||
|
|
/** host.describe request payload (empty object literal). */
|
||
|
|
export const hostDescribeRequestSchema = z.object({}) satisfies z.ZodType<Wire<RequestPayload<'host.describe'>>>
|
||
|
|
|
||
|
|
/** host.describe response value. */
|
||
|
|
export const hostDescribeValueSchema = z.object({
|
||
|
|
version: z.string(),
|
||
|
|
cwd: z.string(),
|
||
|
|
provider: z.string().optional(),
|
||
|
|
model: z.string().optional(),
|
||
|
|
attachedSessions: z.number().int().nonnegative(),
|
||
|
|
}) satisfies z.ZodType<Wire<ResponseValue<'host.describe'>>>
|