Shell
/**
* Core types for Reddit Research Agent
*/
export interface RedditPost {
id: string;
title: string;
selftext: string;
score: number;
upvoteRatio: number;
numComments: number;
author: string;
subreddit: string;
permalink: string;
url: string;
createdUtc: number;
flair?: string;
}
export interface RedditComment {
id: string;
body: string;
score: number;
author: string;
depth: number;
createdUtc: number;
repliesCount: number;
}
export interface ThreadData {
extractedAt: string;
post: RedditPost;
metrics: ThreadMetrics;
topComments: RedditComment[];
allComments: RedditComment[];
}
export interface ThreadMetrics {
totalComments: number;
totalCommentScore: number;
avgCommentScore: number;
maxDepth: number;
uniqueAuthors: number;
}
export interface GoldmineScore {
url: string;
title: string;
score: number;
numComments: number;
upvoteRatio: number;
goldmineScore: number;
subreddit: string;
}
export interface MarketInsight {
id: string;
threadUrl: string;
subreddit: string;
extractedAt: string;
painPoints: PainPoint[];
opportunities: Opportunity[];
competitorMentions: CompetitorMention[];
buyingSignals: BuyingSignal[];
keyQuotes: KeyQuote[];
summary: string;
}
export interface PainPoint {
description: string;
frequency: number;
sentiment: 'frustrated' | 'annoyed' | 'desperate' | 'neutral';
quotes: string[];
}
export interface Opportunity {
description: string;
type: 'product' | 'feature' | 'service' | 'content';
confidence: 'high' | 'medium' | 'low';
targetAudience: string;
}
export interface CompetitorMention {
name: string;
sentiment: 'positive' | 'negative' | 'neutral';
context: string;
frequency: number;
}
export interface BuyingSignal {
quote: string;
author: string;
signalType: 'looking' | 'considering' | 'ready' | 'switched';
score: number;
}
export interface KeyQuote {
text: string;
author: string;
score: number;
insightType: string;
}
export interface ScanConfig {
subreddits: string[];
queries: string[];
schedule: string; // cron expression
maxThreadsPerScan: number;
minGoldmineScore: number;
}
export interface AgentState {
lastScan: string;
threadsAnalyzed: number;
insightsFound: number;
totalCost: number;
}