cp.nvim/lua/cp
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
..
commands fix(security): harden credential storage and transmission (#369) 2026-03-07 18:14:34 -05:00
pickers feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
runner feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
ui feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
cache.lua feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
config.lua fix(scraper): httpx login fast paths, proactive validation, and slug filename fix (#358) 2026-03-07 15:38:12 -05:00
constants.lua fix(scrapers): bad credentials detection and error message cleanup (#367) 2026-03-07 17:58:25 -05:00
credentials.lua feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
git_credential.lua feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
health.lua feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
helpers.lua feat(ui): auto-hide source buffer on close 2025-10-24 14:47:12 -04:00
init.lua feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
log.lua fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
race.lua fix(race): log initial countdown on start (#356) 2026-03-06 23:59:56 -05:00
restore.lua fix(submit): use file path over stdin; fix CF CodeMirror textarea (#305) 2026-03-05 14:34:14 -05:00
scraper.lua feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
setup.lua feat: file conflict prompt, empty submit guard, and lint fixes (#366) 2026-03-07 16:30:51 -05:00
state.lua refactor(run): remove I/O view test navigation keymaps 2026-03-04 00:26:22 -05:00
stress.lua feat(codechef): implement full CodeChef support (#354) 2026-03-06 23:10:44 -05:00
submit.lua feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
utils.lua feat: git credential backend for credential storage (#371) 2026-03-07 20:15:06 -05:00
version.lua fix: refactor 2025-09-21 11:19:00 -04:00