phase-10.5: screener enhancements

This commit is contained in:
saikiranvella
2026-06-11 19:18:19 -04:00
parent bac00ab5d5
commit e953822bab
51 changed files with 3745 additions and 36 deletions
+43
View File
@@ -102,6 +102,37 @@ Defaults to `http://localhost:5173`. Change if the UI is served from a different
CLIENT_ORIGIN=https://yourdomain.com
```
### `EDGAR_USER_AGENT` — SEC filings poller *(recommended)*
The news pipeline polls SEC EDGAR for 8-K / SC 13D / S-4 / DEFM14A filings.
The SEC requires a descriptive User-Agent with contact info:
```env
EDGAR_USER_AGENT=market-screener/1.0 you@example.com
```
### `DISCORD_WEBHOOK_URL` — Daily digest alerts *(optional)*
The daily change digest (`npm run digest:daily`) posts signal flips + their
news catalysts to Discord. Create: channel → Settings → Integrations →
Webhooks → New Webhook → copy URL. Paste it RAW (no quotes, no escaping).
Forum channels are supported (each digest becomes a dated post).
Test with `npm run discord:test`.
```env
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
```
### `NEWS_PRWIRE_FEEDS` — Override press-release RSS feeds *(optional)*
Comma-separated RSS URLs. Defaults to GlobeNewswire + PR Newswire. Only
needed if a default feed goes stale or you want to add one.
### `NEWS_POLL` — Disable in-server news polling *(optional)*
Set `NEWS_POLL=off` if you prefer running `npm run news:poll` from cron
instead of polling inside the server (EDGAR 10 min, PR-wire 15 min).
### Complete `.env` example
```env
@@ -109,6 +140,8 @@ ANTHROPIC_API_KEY=sk-ant-...
SIMPLEFIN_SETUP_TOKEN=aHR0cHM6Ly...
API_KEY=optional-secret
CLIENT_ORIGIN=http://localhost:5173
EDGAR_USER_AGENT=market-screener/1.0 you@example.com
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
```
---
@@ -127,6 +160,16 @@ CLIENT_ORIGIN=http://localhost:5173
| `npm run format:check` | Check formatting without writing (used in CI) |
| `npm run lint` | Run ESLint on all TypeScript files |
| `npm run lint:fix` | Auto-fix ESLint issues |
| `npm run screen:daily` | Screen watchlist + holdings, write signal snapshots (cron at market close) |
| `npm run news:poll` | One-shot news poll: EDGAR + PR wires → news DB (cron alternative) |
| `npm run digest:daily` | Daily change digest: signal flips + catalysts → terminal/Discord (run after screen:daily) |
| `npm run discord:test` | Send a fake digest to verify the Discord webhook |
**Recommended cron (weekdays, market close):**
```
30 16 * * 1-5 cd /path/to/market_screener && npm run screen:daily && npm run digest:daily
```
---