Files
deepseek-harness/packages/credentials
Yichen Jiang 69d8621e2e test: close the per-file coverage gaps this PR opened
The layered-env reader gained an unreadable-layer path, a default
reporter, and two absent-layer arms with no cases; the credential store
gained two error paths that must not be mistaken for an absent file.

The platform arms and the `linePos` guard cannot be reached from a POSIX
test run — the first is covered by the native Windows job, the second
only satisfies an optional type that `prettyErrors` always fills — so
both carry a v8 ignore naming why.
2026-08-05 13:20:56 +08:00
..

credentials/

English | 中文

The credential capability seam, as three-package shape dictates (interface / implementation / consumers):

Package Role
credentials/ Abstract ctx.credentials: branded CredentialRef references, per-operation resolve, UI-safe describe, fail-loud set/unset, the credentials/updated commit event
credentials-local/ File/environment provider: the live process environment (read-only, wins) layered over $DSH_HOME/.credentials.yaml (writable, comment-preserving edits, hot-reloaded)

Configuration files carry references to secrets (apiKeyEnv: DEEPSEEK_API_KEY), never the secrets: the settings document stays safe to sync and render, and rotating a value touches no configuration. The LLM adapters are the first consumers — they resolve their reference once per model request, which is what makes a key stored moments ago reach the very next request without restarting anything.

The seam shape leaves room for keyring-, helper-command-, and KMS-backed providers.