async function monitorTriggers(companyHandle, domain) {
// Step 1: Get recent tweets mentioning the company
const tweets = await run('shofo', '/x/user-posts', {
username: companyHandle
});
// Step 2: Search for recent news/announcements
const news = await run('linkup', '/search', {
q: `${domain} announcement funding launch 2026`,
depth: 'standard'
});
// Step 3: Extract structured triggers from the news
const triggers = await run('riveter', '/v1/run', {
input: news.data?.results?.map(r => r.content).join('\n\n'),
output_schema: {
type: 'object',
properties: {
funding_events: { type: 'array', items: { type: 'string' } },
product_launches: { type: 'array', items: { type: 'string' } },
hiring_signals: { type: 'array', items: { type: 'string' } },
expansion_news: { type: 'array', items: { type: 'string' } }
}
}
});
return {
socialActivity: tweets.data,
news: news.data,
triggers: triggers.data
};
}
const signals = await monitorTriggers('stripe', 'stripe.com');