Minimal Node.js/TypeScript analyzer plus Chrome extension bridge for Polymarket event pages.
npm install- Create
.envfrom.env.example.
- Start service:
npm run service - Load extension unpacked from
extension/in Chrome.
Terminal A:
npm run serviceTerminal B:
npm run smoke:health && npm run smoke:service && npm run smoke:history{
"ok": true,
"status": "ok",
"service_version": "8.0.0",
"time_utc": "2026-02-13T12:00:00.000Z",
"uptime_sec": 42
}Returns structured analysis JSON with required fields including schema_version, timestamp_utc, resolved_via, cache, and quick_view.
Returns HTML history view. Supports empty and populated history payloads.
- Version bumped to
8.0.0inextension/manifest.jsonand reflected in popup UI (Extension version). - Service health version bumped to
8.0.0and surfaced in popup UI (Service version). - Added deterministic packaging command:
npm run package:zip. - Popup summary/history spacing and typography tightened for production feel.
- Report and history pages polished for card/table readability and narrow-width layout.
- Intentional empty states added for:
- no popup history yet
- no key facts/sources in report
- no/filtered history rows in history page
- In popup header, confirm
Extension version: 8.0.0. - Click
Test health; confirmService version: 8.0.0. - Open
/healthand verifyservice_versionis8.0.0.
Use at least 22 unique market pages to validate history bound behavior.
- History bound (
N=20)
- Run analysis on 22 unique slugs.
- In extension debug (
Copy debug) andchrome.storage.local.analysis_history, confirm length is exactly20. - Re-run one existing slug and verify it moves to the top (upsert behavior).
- View all history
- Click
View allin popup. - Confirm
/history#history=...opens and rows match popup data. - Validate slug, timestamp, yes/no, confidence, request id, cache expiry, service URL, evidence mode.
- Confirm slug/confidence/time filters reduce rows as expected.
- Export buttons (report page)
- Open
Full report. - Click
Copy JSONand validate clipboard is valid JSON. - Click
Copy short summaryand confirm compact text with slug, yes/no, confidence, context. - Click
Download JSONand confirm file downloads and contains same payload.
- Clear data behavior
- Click
Clear datain popup. - Confirm
last_analysis,last_slug,last_updated, andanalysis_historyare removed. - Confirm
service_urlremains persisted. - Reopen popup and verify empty-state rendering is intentional.
- Offline behavior
- Stop local service.
- Click
Test healthand verify popup shows service offline state + hint. - Attempt analysis and confirm graceful error state (no crash, actionable status).
- Restart service and verify state recovers without reload loops.
Shipping path selected:
Local unpackedfor day-to-day development.Zip artifactfor sharing builds now.Chrome Web Storedeferred until a later release.
npm run package:zipOutput:
artifacts/polymarket-analyzer-v8.0.0.zip
This command always reads the version from extension/manifest.json and recreates the zip at the same output path.
- Return to Stage 6 external search (API key + provider).
- Evidence mode and stronger source-linking logic.
- More robust market parsing (rules and resolution details).
AI_API_KEY(required)AI_PROVIDER(openaioropenrouter, default:openai)AI_BASE_URL(optional)AI_MODEL(optional)AI_RESPONSE_FORMAT(json_objectornone)AI_PROMPT_PATH(optional, default./prompts/base.txt)POLYMARKET_GAMMA_API_ENDPOINT(optional, defaulthttps://gamma-api.polymarket.com)
Build and run the analyzer as needed:
npm run buildnpm run dev -- --event <event-slug>npm run dev -- --slug <market-slug>npm run dev -- --id <market-id>