Keyless data stack — the server now runs fully live with no API key.
- New provider layer under
src/core/providers/: http.mjs (shared browser-UA fetch, bounded retries with exponential backoff, mapLimit), yahoo.mjs, nasdaq.mjs, sec.mjs, aidc.mjs (AI-DC domain layer), index.mjs (merge + provenance), cache.mjs (disk TTL cache in data/.cache/).
- Yahoo Finance — two paths:
fundamentals-timeseries (fully anonymous) and quoteSummary (cookie + crumb handshake). Yahoo rejects bursts with HTTP 401 Invalid Crumb, so requests go through a serialised queue (max 2 in flight, 180 ms gap) with 401 re-prime and 429 retry. Without the queue ~1 in 4 tickers silently lost its PE and forward-growth metrics.
- Nasdaq — public analyst target price, earnings forecast (
yearlyForecast, not annualForecast) and financials endpoints.
- SEC EDGAR XBRL — company concept + company facts for revenue / net income / capex, with descriptive
User-Agent (SEC_USER_AGENT) as required by SEC policy.
- Per-metric provenance — the winning source is recorded per metric in
metricsProvenance and as an SRC: flag on each row. source in the snapshot is now a merged string, e.g. nasdaq+sec+yahoo.
get_methodology reports requiresApiKey: false, the active mode (fmp+keyless / keyless-merged), the provider list and the metric→provider priority table. The OFFLINE warning is now only shown when every live provider is unreachable.
OFFLINE-DEMO mode now means "no provider responded", not "no API key". data/baseline-metrics.json is used only in that case.
- New tool
get_dc_exposure — AI data-centre revenue exposure per ticker, read from the segment tables in each company's latest 10-K (SEC XBRL viewer R-files). Reports disclosure: 'not-disaggregated' and n/d rather than a misleading 0% for companies that simply do not split revenue by end market.
- New tool
get_demand_context — combined hyperscaler capex (MSFT / AMZN / GOOGL / META) from SEC 10-K XBRL with YoY growth — the top-down demand driver for the BOM basket.
- Capex tag fallback (
PaymentsToAcquirePropertyPlantAndEquipment → PaymentsToAcquireProductiveAssets), picking the series with the most recent fiscal year. Amazon alone reports FY2016 on the old tag; it now resolves to FY2025 ($131.8B).
- Correctness fix — SEC tag selection now picks the most RECENT series, not the first one that returns data. NVIDIA reports revenue under
RevenueFromContractWithCustomerExcludingAssessedTax only through FY2022 and switched to Revenues from FY2023; taking the first usable tag therefore produced a 36-month revenue growth computed from FY2020 filings (146.5%) instead of the true FY2023→FY2026 figure (700.5%). The same trap applies to NetIncomeLoss vs ProfitLoss.
- Freshness guard — an SEC series whose latest fiscal year end is more than 550 days old is no longer allowed to win the merge, so a stale-but-valid filing cannot outrank fresher Yahoo/Nasdaq values.
- New unit tests
tests/providers.test.mjs (6 cases) lock in the tag-selection and staleness rules; the end-to-end scan test's request timeout was raised from 6 s to 180 s because a cold, uncached scan of the whole universe legitimately takes ~50 s and was flaking.
- Geographic segments (Americas / EMEA / Asia-Pacific …) are excluded from the AI-DC calculation; only end-market segments count.
- Disk TTL cache: 6h Yahoo/Nasdaq, 24h SEC, 1h FMP. Cold scan ≈ 49 s → warm ≈ 2 s.
- New
scripts/check-providers.mjs health check (npm run check:providers) — merged coverage, per-metric source wins, segment-exposure table, demand context. PASS threshold: ≥90% metrics complete and ≥50% segment coverage. Current state: 30/30 metrics complete, 26/30 with segment data.
docs/DATA-SOURCES.md — full research inventory: 13 candidate sources, per-source detail, the metric→provider priority table with rationale, caching, switching instructions, rejected sources and recommended next sources.
docs/ARCHITECTURE.md updated: FMP is now an optional top-priority source, pitfalls C1/C2/C6 rewritten for the keyless constraints (Yahoo burst rejection, SEC 10 req/s + UA, Nasdaq UA/Referer), and the cost model restated as $0/month marginal data cost.
- PPE:
get_dc_exposure ($0.01) and get_demand_context ($0.01) registered in both actor.json and pay_per_event.json — a billable handler event with no registered price would fail to charge.
- README updated in English, 简体中文 and 繁體中文 with the new "no API key required" source table and the two new tools.
Initial release.
Hosted (Apify Standby) hardening — all verified by scripts/http-smoke.mjs (37 assertions):
- Rewrote the hosted HTTP entry as a zero-dependency
node:http server that reuses the existing hand-written JSON-RPC dispatcher, replacing the MCP SDK + Express + Apify SDK handler. Removes three runtime dependencies, the cloud npm install step and any lockfile / peer-dependency drift from the build.
- Added the
x-apify-container-server-readiness-probe response. Without it a standby container never reports ready and every caller sees a timeout.
- Billing moved to Apify's public REST charge API with an explicit
Actor.charge equivalent; it no longer depends on an SDK import succeeding, and a failed charge is logged loudly instead of swallowed.
- Platform detection now includes
APIFY_META_ORIGIN, which is what standby actually injects — checking only APIFY_TOKEN silently disabled billing in the exact mode being sold.
- Correct Streamable HTTP semantics:
GET /mcp → 405, DELETE /mcp → 204, missing text/event-stream in Accept → 406, malformed body → 400, notifications → 202.
- Pricing consolidated into one
pricingInfos record with all four billable events. Apify activates only the most recently appended record, so events split across records are served free.
- Removed the two
$0 events (mcp-initialize, mcp-list-tools); a zero-price event is rejected by the API and discovery must never be billable. get_methodology is likewise free.
actor.json: version corrected to MAJOR.MINOR (a three-segment version fails schema validation on push), conflicting webServerMcpPath removed so the process owns its own listener, and the input schema required before publishing added.
- Honesty fix: with no data provider configured,
scan / get_list now print an explicit *** OFFLINE DEMO DATA — NOT LIVE MARKET DATA *** banner, and get_methodology returns a dataSource.warning. Every row already carried OFFLINE_DEMO, but a paying caller could still read a stale ranking as current.
- Added
handleMessageAsync so the hosted path can await a tool result; the stdio path stays fire-and-forget.
- License changed to proprietary (source available on request) to match the private-repository distribution model.
Core:
- 7-signal composite ranking (analyst Buy %, PE inverted, 36m earnings/revenue growth, 12m forecast earnings/revenue growth, curated moat 1–5).
- Curated AI data-center BOM universe (~30 U.S.-listed tickers across 10 supply-chain categories) with moat scores.
- Zero-dependency stdio MCP server (hand-rolled JSON-RPC 2.0) + 5 tools +
sunday_scan prompt.
- Offline demo mode (illustrative baseline when no
FMP_API_KEY).
- Static weekly ranked-list site (dark "ink + amber" theme, responsive, accessible) + RSS 2.0 + iCalendar feeds.
- FMP (Financial Modeling Prep) live-data client with defensive parsing and imputation.
- Apify Standby + Pay-Per-Event configuration (
actor.json, pay_per_event.json, Dockerfile).
- GitHub Actions:
preflight (tests + smoke + P0 check) and refresh (Sunday scan → GitHub Pages).
- Tests: scoring edge cases, server JSON-RPC lifecycle, universe validation.
- Trilingual README (English / 简体中文 / 繁體中文), SPEC.md, docs/ (PRD, ARCHITECTURE, UIUX).