/** * Feedback collection module for the iranti CLI. * * Surfaces satisfaction signals via the `iranti feedback` command: * single-keypress rating, optional free-text comment, anonymous persistent * UUID, local throttle, and offline fallback queue. No DB required — relies * only on .iranti/ local files and the telemetry endpoint. * * Passive usage signals (session-stats.json) are read here so that Phase 3 * (milestone nudges in iranti_handshake) has rich data without any active * user action. The MCP server writes that file; this module only reads it. * * Exported types are also used by the MCP nudge system (Phase 3) which reads * SessionStats and calls recordMilestoneNudgeSeen() to prevent repeat nudges. */ export type FeedbackType = 'bug' | 'praise' | 'suggestion' | 'general'; export type FeedbackPayload = { feedbackId: string; rating: number; comment: string | null; type: FeedbackType; version: string; os: string; arch: string; nodeVersion: string; sessionCount: number | null; factCount: number | null; instanceId: string; milestoneContext: string | null; submittedAt: string; }; /** Passive usage stats written by the MCP server at each session. */ export type SessionStats = { totalSessions: number; totalWrites: number; totalAttends: number; totalValueDeliveries: number; uniqueHosts: string[]; firstSessionAt: string; lastSessionAt: string; feedbackMilestonesSeen: string[]; }; export type FeedbackRunOptions = { rating?: number; comment?: string; type?: FeedbackType; dryRun?: boolean; offline?: boolean; milestoneContext?: string | null; factCount?: number | null; version: string; }; /** Read passive usage stats accumulated by the MCP server. Returns null if absent. */ export declare function readSessionStats(irantiDir: string): Promise; /** * Record that a milestone nudge key was shown so it doesn't repeat. * Used by the MCP nudge system (Phase 3). */ export declare function recordMilestoneNudgeSeen(irantiDir: string, milestoneKey: string): Promise; /** * Run the full feedback collection flow. * * Respects user's time: throttled by default (7 days), bugs by 1 day. * If the endpoint is unreachable, saves to .iranti/pending-feedback.json * for silent retry on the next run. */ export declare function runFeedbackCommand(opts: FeedbackRunOptions): Promise; //# sourceMappingURL=feedbackCollector.d.ts.map