cp.nvim/scrapers
Barrett Ruth da4e2ebeba
feat: git credential backend for credential storage (#371)
## Problem

Credentials were stored as plaintext JSON in
`stdpath('data')/cp-nvim.json`, with no integration with system
credential managers.

## Solution

Replace file-based credential storage with `git credential
fill/approve/reject`, delegating to whatever credential helper the user
has configured (`cache`, `store`, `libsecret`, macOS Keychain, etc.).

- New `lua/cp/git_credential.lua` module wrapping the git credential
protocol
- All credential consumers (`credentials.lua`, `submit.lua`,
`scraper.lua`) use `git_credential` directly — `cache.lua` no longer
handles credentials
- CSES API token packed into the password field (`password<TAB>token`)
so it works with helpers that ignore the `path` field
- `has_helper()` guard on `:CP login`, `:CP logout`, and `:CP submit`
with an error message if no helper is configured
- Healthcheck split into `[required]`/`[optional]` sections; git version
and credential helper status shown
- `git` checked at startup in `check_required_runtime()`
- Cache version system (`CACHE_VERSION`, v1→v2 migration) removed — the
cache file is now a plain JSON blob
- `:CP` command gets `bar = true`
2026-03-07 20:15:06 -05:00
..
__init__.py lol 2025-09-24 21:23:06 -04:00
atcoder.py fix(scrapers): bad credentials detection and error message cleanup (#367) 2026-03-07 17:58:25 -05:00
base.py feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
codechef.py fix(scrapers): bad credentials detection and error message cleanup (#367) 2026-03-07 17:58:25 -05:00
codeforces.py fix(scrapers): bad credentials detection and error message cleanup (#367) 2026-03-07 17:58:25 -05:00
cses.py feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
kattis.py fix(security): harden credential storage and transmission (#369) 2026-03-07 18:14:34 -05:00
language_ids.py feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
models.py feat: race countdown support and language version selection (#346) 2026-03-06 18:18:21 -05:00
timeouts.py fix: codechef submit fixes and atcoder cleanup (#355) 2026-03-06 23:40:12 -05:00
usaco.py fix(security): harden credential storage and transmission (#369) 2026-03-07 18:14:34 -05:00