deepseek-ai/deepseek-harness · error · Error
credentials-local: ${filename} declares version ${JSON.strin
Error message
credentials-local: ${filename} declares version ${JSON.stringify(fields['version'])}; this build reads version ${DOCUMENT_VERSION} What it means
Error "credentials-local: ${filename} declares version ${JSON.stringify(fields['version'])}; this build reads version ${DOCUMENT_VERSION}" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/credentials/credentials-local/src/index.ts:216
}
const root: unknown = document.toJS() ?? {}
if (typeof root !== 'object' || root === null || Array.isArray(root)) {
throw new TypeError(`credentials-local: ${filename} must be a mapping`)
}
const fields = root as Record<string, unknown>
const keys = Object.keys(fields)
// An empty (or comment-only) document is the empty store and needs no
// version: there is nothing in it a later layout could have meant.
if (keys.length === 0) return { refs: new Map(), records: new Map() }
if (!('version' in fields)) {
throw new Error(
`credentials-local: ${filename} uses the pre-release flat layout. Add \`version: ${DOCUMENT_VERSION}\``
+ ` and nest the existing ${keys.length} ${keys.length === 1 ? 'entry' : 'entries'} under \`refs:\`.`
+ ' No values need to change.',
)
}
if (fields['version'] !== DOCUMENT_VERSION) {
throw new Error(
`credentials-local: ${filename} declares version ${JSON.stringify(fields['version'])};`
+ ` this build reads version ${DOCUMENT_VERSION}`,
)
}
for (const key of keys) {
if (key !== 'version' && key !== 'refs' && key !== 'records') {
throw new Error(`credentials-local: unknown top-level key "${key}" in ${filename}`)
}
}
return { refs: parseRefs(fields['refs'], filename), records: parseRecords(fields['records'], filename) }
}
/**
* Render the version-1 layout for a pre-release flat document, or `undefined`
* for anything else. The flat layout is recognized exactly — a non-empty
* top-level mapping of addressable reference names to non-empty string
* scalars, with no `version` key and no document directives — and the rewrite
* nests the original lines verbatim under `refs:` at two spaces' indent, soView on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/credentials/credentials-local/src/index.ts:216 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/3ad5ff67ad8d2879.
Report an issue: GitHub.