Single-source discovery primitive — score threads/posts for a product on one platform source
Discovers threads/posts where a product can be naturally mentioned, for a
SINGLE source at a time. Callers that need multiple sources MUST fan out at
the processor layer (e.g., search-source.ts, full-scan.ts).
For the single source in the input, the discovery agent:
{
productName: string;
productDescription: string;
keywords: string[];
valueProp?: string;
source: string; // single source e.g. "r/SaaS" or 'x:"pricing alternative"'
platform: 'reddit' | 'x';
scoringConfig?: { ... }; // optional calibration overrides
customPainPhrases?: string[];
customQueryTemplates?: string[];
additionalRules?: string;
}
Single-source only. Callers that need multiple sources MUST fan out at the processor layer.
Flat { threads: [...] } with weighted scores, deduplicated by ID, sorted by score descending.