Commit graph

7 commits

Author SHA1 Message Date
3a81d86ff8 chore: idx direnv switch 2026-03-18 11:08:51 +07:00
Ciphercat
6671e22976 feat(ownership): complete ownership intelligence module
Sprints 0-8: Types, schema, KSEI parser, entity resolution, DB CRUD,
Bing API client, import pipeline, query commands, graph traversal,
changes diff, entity resolution CLI, FTS5 search.

- KSEI PDF parser (mutool stext + quick-xml, 99.2% accuracy)
- 7 query commands: ticker, entity, search, cross-holders, concentration, flow, releases
- Ownership graph with recursive CTE (ASCII tree + Graphviz DOT)
- Release diff/changes between KSEI snapshots
- Entity resolution CLI: unresolved, map, merge
- FTS5 trigram search on entity names
- Feature-gated under 'ownership' (default-on)
- 82 tests passing
2026-03-07 21:10:58 +00:00
Ciphercat
3383fdd983 docs: update TODO.md — crumb auth resolved, fix flake.nix package rename 2026-03-06 07:49:57 +00:00
Ciphercat
f89f4c90ce fix(yahoo): use curl-impersonate for crumb auth (TLS fingerprinting)
Yahoo Finance blocks standard ureq/rustls via TLS fingerprinting (JA3/JA4).
Reverse-engineered from yfinance source: they use curl_cffi with Chrome impersonation.

Fix:
- Fetch cookie via curl-impersonate from fc.yahoo.com
- Fetch crumb via curl-impersonate from query1.finance.yahoo.com/v1/test/getcrumb
  (correct URL: getcrumb, not getCrumb or csrfToken)
- Parse Netscape cookie jar format, send cookies as header to quoteSummary
- 401 retry: clear crumb + cookie jar, re-auth on next attempt
- Crumb validation: reject HTML, empty, rate-limit responses
- Add curl-impersonate-chrome to flake.nix devShell
2026-03-06 07:31:11 +00:00
Ciphercat
a4b8a1b64e dev: remove sqlite from flake (ownership DB moved to idx-api) 2026-03-05 17:26:43 +00:00
Ciphercat
4f46a4d787 dev: add prek to flake.nix devshell 2026-03-05 17:23:43 +00:00
Ciphercat
d457c630c4 dev: add flake.nix and .envrc for Rust dev environment
- rust-overlay for stable toolchain + rust-src + rust-analyzer
- pkg-config, openssl, sqlite for reqwest + ownership DB
- cargo-watch, cargo-nextest for dev workflow
- direnv integration via .envrc
2026-03-05 16:23:49 +00:00