/** * agent-presets domain zod schemas (names derived from map keys: * agentPresetListRequestSchema / agentPresetListValueSchema). */ import { z } from 'zod' import type { RequestPayload, ResponseValue } from './rpc-map.ts' import type { Wire } from './rpc.schema.ts' import { sessionIdSchema } from './sessions.schema.ts' import type { AgentPresetEntry } from './agent-presets.ts' /** AgentPresetEntry row of agentPreset.list. */ export const agentPresetEntrySchema = z.object({ id: z.string().min(1), trust: z.union([z.literal('system'), z.literal('user')]), isDefault: z.boolean(), }) satisfies z.ZodType> /** agentPreset.list request payload. */ export const agentPresetListRequestSchema = z.object({ }) satisfies z.ZodType>> /** agentPreset.list response value. */ export const agentPresetListValueSchema = z.object({ presets: z.array(agentPresetEntrySchema), }) satisfies z.ZodType>> /** agentPreset.select request payload. */ export const agentPresetSelectRequestSchema = z.object({ sessionId: sessionIdSchema, agentPreset: z.string().min(1), }) satisfies z.ZodType>> /** agentPreset.select response value. */ export const agentPresetSelectValueSchema = z.object({ agentPreset: z.string(), }) satisfies z.ZodType>>