/** * Request types for Humancy plugin * * Defines the message types sent from agents to humans. */ import { z } from 'zod'; /** * Urgency levels for human interaction requests */ export declare enum Urgency { /** Agent is blocked, needs immediate response */ BLOCKING_NOW = "blocking_now", /** Agent can continue briefly but needs response soon */ BLOCKING_SOON = "blocking_soon", /** Informational, no rush */ WHEN_AVAILABLE = "when_available" } /** * Base fields common to all request types */ export interface BaseRequest { /** UUID v4 for correlation */ id: string; /** Priority level */ urgency: Urgency; /** Additional context for human */ context?: string; /** Max wait time in milliseconds */ timeout?: number; /** When request was created */ timestamp: Date; } /** * Request for humancy.ask_question tool */ export interface QuestionRequest extends BaseRequest { type: 'question'; /** The freeform question */ question: string; } /** * Request for humancy.request_review tool */ export interface ReviewRequest extends BaseRequest { type: 'review'; /** Path or content to review */ artifact: string; } /** * Tradeoffs for decision options */ export interface Tradeoffs { /** Advantages of this option */ pros: string[]; /** Disadvantages of this option */ cons: string[]; } /** * Option for decision requests (enhanced with tradeoffs) */ export interface DecisionOption { /** Unique identifier for selection */ id: string; /** Display text */ label: string; /** Optional explanation */ description?: string; /** Optional tradeoff analysis for this option */ tradeoffs?: Tradeoffs; } /** * Structured context for decision requests */ export interface RequestDecisionContext { /** Project-level constraints that may apply */ projectConstraints?: string[]; /** Related issue reference */ relatedIssue?: string; /** Additional context fields */ [key: string]: unknown; } /** * Request for humancy.request_decision tool (enhanced with three-layer support) */ export interface DecisionRequest extends BaseRequest { type: 'decision'; /** The decision question */ question: string; /** Available choices */ options: DecisionOption[]; /** Domain tags for principle matching */ domain?: string[]; /** Structured context for decision */ decisionContext?: RequestDecisionContext; /** Whether to include baseline/protégé recommendations in response */ includeRecommendations?: boolean; } /** * Request for humancy.notify tool (fire-and-forget) */ export interface NotificationRequest { /** UUID v4 for tracking */ id: string; type: 'notification'; /** The notification message */ message: string; /** Additional context */ context?: string; /** Notification priority */ urgency: Urgency; /** When notification was created */ timestamp: Date; } /** * Union of all request types */ export type HumancyRequest = QuestionRequest | ReviewRequest | DecisionRequest | NotificationRequest; export declare const urgencySchema: z.ZodEnum<["blocking_now", "blocking_soon", "when_available"]>; export declare const decisionOptionObjectSchema: z.ZodObject<{ id: z.ZodString; label: z.ZodString; description: z.ZodOptional; tradeoffs: z.ZodOptional; cons: z.ZodArray; }, "strip", z.ZodTypeAny, { pros: string[]; cons: string[]; }, { pros: string[]; cons: string[]; }>>; }, "strip", z.ZodTypeAny, { id: string; label: string; description?: string | undefined; tradeoffs?: { pros: string[]; cons: string[]; } | undefined; }, { id: string; label: string; description?: string | undefined; tradeoffs?: { pros: string[]; cons: string[]; } | undefined; }>; /** Accepts both string shorthand ("Option A") and full object ({ id, label }) */ export declare const decisionOptionSchema: z.ZodUnion<[z.ZodEffects, z.ZodObject<{ id: z.ZodString; label: z.ZodString; description: z.ZodOptional; tradeoffs: z.ZodOptional; cons: z.ZodArray; }, "strip", z.ZodTypeAny, { pros: string[]; cons: string[]; }, { pros: string[]; cons: string[]; }>>; }, "strip", z.ZodTypeAny, { id: string; label: string; description?: string | undefined; tradeoffs?: { pros: string[]; cons: string[]; } | undefined; }, { id: string; label: string; description?: string | undefined; tradeoffs?: { pros: string[]; cons: string[]; } | undefined; }>]>; export declare const askQuestionParamsSchema: z.ZodObject<{ question: z.ZodString; context: z.ZodOptional; urgency: z.ZodDefault>; timeout: z.ZodOptional; }, "strip", z.ZodTypeAny, { question: string; urgency: "blocking_now" | "blocking_soon" | "when_available"; timeout?: number | undefined; context?: string | undefined; }, { question: string; timeout?: number | undefined; context?: string | undefined; urgency?: "blocking_now" | "blocking_soon" | "when_available" | undefined; }>; export declare const requestReviewParamsSchema: z.ZodObject<{ artifact: z.ZodString; context: z.ZodOptional; urgency: z.ZodDefault>; timeout: z.ZodOptional; }, "strip", z.ZodTypeAny, { urgency: "blocking_now" | "blocking_soon" | "when_available"; artifact: string; timeout?: number | undefined; context?: string | undefined; }, { artifact: string; timeout?: number | undefined; context?: string | undefined; urgency?: "blocking_now" | "blocking_soon" | "when_available" | undefined; }>; export declare const requestDecisionParamsSchema: z.ZodObject<{ question: z.ZodString; options: z.ZodArray, z.ZodObject<{ id: z.ZodString; label: z.ZodString; description: z.ZodOptional; tradeoffs: z.ZodOptional; cons: z.ZodArray; }, "strip", z.ZodTypeAny, { pros: string[]; cons: string[]; }, { pros: string[]; cons: string[]; }>>; }, "strip", z.ZodTypeAny, { id: string; label: string; description?: string | undefined; tradeoffs?: { pros: string[]; cons: string[]; } | undefined; }, { id: string; label: string; description?: string | undefined; tradeoffs?: { pros: string[]; cons: string[]; } | undefined; }>]>, "many">; context: z.ZodOptional; urgency: z.ZodDefault>; timeout: z.ZodOptional; domain: z.ZodOptional>; decisionContext: z.ZodOptional>; relatedIssue: z.ZodOptional; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ projectConstraints: z.ZodOptional>; relatedIssue: z.ZodOptional; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ projectConstraints: z.ZodOptional>; relatedIssue: z.ZodOptional; }, z.ZodTypeAny, "passthrough">>>; includeRecommendations: z.ZodOptional; }, "strip", z.ZodTypeAny, { options: { id: string; label: string; description?: string | undefined; tradeoffs?: { pros: string[]; cons: string[]; } | undefined; }[]; question: string; urgency: "blocking_now" | "blocking_soon" | "when_available"; timeout?: number | undefined; domain?: string[] | undefined; context?: string | undefined; decisionContext?: z.objectOutputType<{ projectConstraints: z.ZodOptional>; relatedIssue: z.ZodOptional; }, z.ZodTypeAny, "passthrough"> | undefined; includeRecommendations?: boolean | undefined; }, { options: (string | { id: string; label: string; description?: string | undefined; tradeoffs?: { pros: string[]; cons: string[]; } | undefined; })[]; question: string; timeout?: number | undefined; domain?: string[] | undefined; context?: string | undefined; urgency?: "blocking_now" | "blocking_soon" | "when_available" | undefined; decisionContext?: z.objectInputType<{ projectConstraints: z.ZodOptional>; relatedIssue: z.ZodOptional; }, z.ZodTypeAny, "passthrough"> | undefined; includeRecommendations?: boolean | undefined; }>; export declare const notifyParamsSchema: z.ZodObject<{ message: z.ZodString; context: z.ZodOptional; urgency: z.ZodDefault>; }, "strip", z.ZodTypeAny, { message: string; urgency: "blocking_now" | "blocking_soon" | "when_available"; context?: string | undefined; }, { message: string; context?: string | undefined; urgency?: "blocking_now" | "blocking_soon" | "when_available" | undefined; }>; /** * Parameter types inferred from Zod schemas */ export type AskQuestionParams = z.infer; export type RequestReviewParams = z.infer; export type RequestDecisionParams = z.infer; export type NotifyParams = z.infer; //# sourceMappingURL=requests.d.ts.map