Merge PR #48: feat: add Xiaohongshu source + Reddit public fallback

- Xiaohongshu search via local MCP service (opt-in, zero impact if service not running)
- Reddit public JSON fallback (works with zero API keys)
- Reddit priority: ScrapeCreators -> OpenAI -> public fallback
- Updated env.py: Reddit always available via public fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Van Horn
2026-03-07 16:11:35 -08:00
254 changed files with 18608 additions and 87 deletions
+25
View File
@@ -0,0 +1,25 @@
const TWEET_URL_REGEX = /^(?:https?:\/\/)?(?:www\.)?(?:twitter\.com|x\.com)\/[^/]+\/status\/\d+/i;
const TWEET_ID_REGEX = /^\d{8,}$/;
export function looksLikeTweetInput(value) {
const trimmed = value.trim();
if (!trimmed) {
return false;
}
return TWEET_URL_REGEX.test(trimmed) || TWEET_ID_REGEX.test(trimmed);
}
export function resolveCliInvocation(rawArgs, knownCommands) {
if (rawArgs.length === 0) {
return { argv: null, showHelp: true };
}
const hasKnownCommand = rawArgs.some((arg) => knownCommands.has(arg));
if (!hasKnownCommand) {
const tweetArgIndex = rawArgs.findIndex(looksLikeTweetInput);
if (tweetArgIndex >= 0) {
const rewrittenArgs = [...rawArgs];
rewrittenArgs.splice(tweetArgIndex, 0, 'read');
return { argv: ['node', 'bird', ...rewrittenArgs], showHelp: false };
}
}
return { argv: null, showHelp: false };
}
//# sourceMappingURL=cli-args.js.map