import { z } from "zod"; export const connectionsSearchInputSchema = z.object({ query: z.string().trim().max(4000).default(""), retryProviderChoice: z.boolean().optional().describe("Only when the user explicitly asks to reconsider a previous provider choice or decline"), }).strict(); export const connectionRequestInputSchema = z.object({ service: z.string().trim().min(1).max(120), connectionId: z.string().guid().optional().describe("Reuse this saved connection; never create a replacement gateway"), toolNames: z.array(z.string().trim().min(1).max(160)).min(1).max(20).refine(names => new Set(names).size === names.length, "Requested tools must be unique").optional().describe("Exact indexed tool names needed by this agent; writes require approval"), selectionInteractionId: z.string().guid().optional(), targetService: z.string().regex(/^[a-z0-9][a-z0-9-]{0,79}$/).optional().describe("App slug returned by search only when the user explicitly named this external provider"), }).strict(); export const completeConnectionIntentSchema = z.object({ connectionId: z.string().guid(), }).strict(); export const declineConnectionIntentSchema = z.object({ reason: z.string().trim().max(4000).optional(), }).strict(); export type ConnectionsSearchInput = z.infer; export type ConnectionRequestInput = z.infer; export type CompleteConnectionIntent = z.infer; export type DeclineConnectionIntent = z.infer;