/** * DiscoveryQuestionInput and nested types. * Leaf types have full Zod schemas. The composite DiscoveryQuestionInput is * a pure interface referencing cross-schema types (DiscoveryNegotiationDigest, * ChatContextDigest) to avoid Zod cross-schema runtime coupling. */ import { z } from "zod"; import type { DiscoveryNegotiationDigest } from "./negotiation-digest.schema.js"; import type { ChatContextDigest } from "./chat-context.schema.js"; export declare const NegotiationRoleSchema: z.ZodEnum<["agent", "patient", "peer"]>; export type NegotiationRole = z.infer; export declare const DiscoveryTurnSchema: z.ZodObject<{ action: z.ZodEnum<["propose", "accept", "reject", "counter", "question", "outreach", "withdraw", "decline", "ask_user"]>; reasoning: z.ZodString; suggestedRoles: z.ZodObject<{ ownUser: z.ZodEnum<["agent", "patient", "peer"]>; otherUser: z.ZodEnum<["agent", "patient", "peer"]>; }, "strip", z.ZodTypeAny, { ownUser: "agent" | "patient" | "peer"; otherUser: "agent" | "patient" | "peer"; }, { ownUser: "agent" | "patient" | "peer"; otherUser: "agent" | "patient" | "peer"; }>; }, "strip", z.ZodTypeAny, { reasoning: string; suggestedRoles: { ownUser: "agent" | "patient" | "peer"; otherUser: "agent" | "patient" | "peer"; }; action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user"; }, { reasoning: string; suggestedRoles: { ownUser: "agent" | "patient" | "peer"; otherUser: "agent" | "patient" | "peer"; }; action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user"; }>; export type DiscoveryTurn = z.infer; export declare const DiscoveryOutcomeSchema: z.ZodObject<{ hasOpportunity: z.ZodBoolean; reasoning: z.ZodString; agreedRoles: z.ZodOptional; }, "strip", z.ZodTypeAny, { userId: string; role: "agent" | "patient" | "peer"; }, { userId: string; role: "agent" | "patient" | "peer"; }>, "many">>; reason: z.ZodOptional>; }, "strip", z.ZodTypeAny, { reasoning: string; hasOpportunity: boolean; reason?: "timeout" | "turn_cap" | "screened_out" | undefined; agreedRoles?: { userId: string; role: "agent" | "patient" | "peer"; }[] | undefined; }, { reasoning: string; hasOpportunity: boolean; reason?: "timeout" | "turn_cap" | "screened_out" | undefined; agreedRoles?: { userId: string; role: "agent" | "patient" | "peer"; }[] | undefined; }>; export type DiscoveryOutcome = z.infer; export declare const DiscoveryNegotiationSchema: z.ZodObject<{ counterpartyId: z.ZodString; counterpartyHint: z.ZodString; indexContext: z.ZodString; turns: z.ZodArray; reasoning: z.ZodString; suggestedRoles: z.ZodObject<{ ownUser: z.ZodEnum<["agent", "patient", "peer"]>; otherUser: z.ZodEnum<["agent", "patient", "peer"]>; }, "strip", z.ZodTypeAny, { ownUser: "agent" | "patient" | "peer"; otherUser: "agent" | "patient" | "peer"; }, { ownUser: "agent" | "patient" | "peer"; otherUser: "agent" | "patient" | "peer"; }>; }, "strip", z.ZodTypeAny, { reasoning: string; suggestedRoles: { ownUser: "agent" | "patient" | "peer"; otherUser: "agent" | "patient" | "peer"; }; action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user"; }, { reasoning: string; suggestedRoles: { ownUser: "agent" | "patient" | "peer"; otherUser: "agent" | "patient" | "peer"; }; action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user"; }>, "many">; outcome: z.ZodObject<{ hasOpportunity: z.ZodBoolean; reasoning: z.ZodString; agreedRoles: z.ZodOptional; }, "strip", z.ZodTypeAny, { userId: string; role: "agent" | "patient" | "peer"; }, { userId: string; role: "agent" | "patient" | "peer"; }>, "many">>; reason: z.ZodOptional>; }, "strip", z.ZodTypeAny, { reasoning: string; hasOpportunity: boolean; reason?: "timeout" | "turn_cap" | "screened_out" | undefined; agreedRoles?: { userId: string; role: "agent" | "patient" | "peer"; }[] | undefined; }, { reasoning: string; hasOpportunity: boolean; reason?: "timeout" | "turn_cap" | "screened_out" | undefined; agreedRoles?: { userId: string; role: "agent" | "patient" | "peer"; }[] | undefined; }>; seedAssessmentScore: z.ZodOptional; }, "strip", z.ZodTypeAny, { counterpartyHint: string; indexContext: string; counterpartyId: string; turns: { reasoning: string; suggestedRoles: { ownUser: "agent" | "patient" | "peer"; otherUser: "agent" | "patient" | "peer"; }; action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user"; }[]; outcome: { reasoning: string; hasOpportunity: boolean; reason?: "timeout" | "turn_cap" | "screened_out" | undefined; agreedRoles?: { userId: string; role: "agent" | "patient" | "peer"; }[] | undefined; }; seedAssessmentScore?: number | undefined; }, { counterpartyHint: string; indexContext: string; counterpartyId: string; turns: { reasoning: string; suggestedRoles: { ownUser: "agent" | "patient" | "peer"; otherUser: "agent" | "patient" | "peer"; }; action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user"; }[]; outcome: { reasoning: string; hasOpportunity: boolean; reason?: "timeout" | "turn_cap" | "screened_out" | undefined; agreedRoles?: { userId: string; role: "agent" | "patient" | "peer"; }[] | undefined; }; seedAssessmentScore?: number | undefined; }>; export type DiscoveryNegotiation = z.infer; export declare const DiscoverySummarySchema: z.ZodObject<{ totalCandidates: z.ZodNumber; opportunitiesFound: z.ZodNumber; noOpportunityCount: z.ZodNumber; timeoutCount: z.ZodNumber; roleDistribution: z.ZodRecord, z.ZodNumber>; }, "strip", z.ZodTypeAny, { totalCandidates: number; opportunitiesFound: number; noOpportunityCount: number; timeoutCount: number; roleDistribution: Partial>; }, { totalCandidates: number; opportunitiesFound: number; noOpportunityCount: number; timeoutCount: number; roleDistribution: Partial>; }>; export type DiscoverySummary = { totalCandidates: number; opportunitiesFound: number; noOpportunityCount: number; timeoutCount: number; roleDistribution: Partial>; }; export declare const DiscoverySourceProfileSchema: z.ZodObject<{ name: z.ZodOptional; bio: z.ZodOptional; location: z.ZodOptional; skills: z.ZodOptional>; interests: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string | undefined; bio?: string | undefined; location?: string | undefined; skills?: string[] | undefined; interests?: string[] | undefined; }, { name?: string | undefined; bio?: string | undefined; location?: string | undefined; skills?: string[] | undefined; interests?: string[] | undefined; }>; export type DiscoverySourceProfile = z.infer; /** * Full input to the question generator. * Defined as a pure interface so it can reference DiscoveryNegotiationDigest * and ChatContextDigest from sibling schemas without Zod runtime coupling. */ export interface DiscoveryQuestionInput { query: string; /** The seeker's global user_context paragraph (profile-replacing identity text). */ userContext: string; negotiationDigests: DiscoveryNegotiationDigest[]; summary: DiscoverySummary; chatContext?: ChatContextDigest; now: string; }