deepseek-ai/deepseek-harness · error · TypeError
command "${command}" success sourceEventSeq must be a non-ne
Error message
command "${command}" success sourceEventSeq must be a non-negative safe integer when supplied What it means
Error "command "${command}" success sourceEventSeq must be a non-negative safe integer when supplied" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/interaction/commands/src/index.ts:228
description: normalized.description,
...normalized.input === undefined ? {} : { input: normalized.input },
})
return { definition: normalized, descriptor }
}
/** Validate and detach an untrusted handler result at the registry boundary. */
function normalizeResult(command: string, value: unknown): CommandResult {
if (typeof value !== 'object' || value === null || !('kind' in value)) {
throw new TypeError(`command "${command}" handler must return a CommandResult`)
}
const result = value as { kind?: unknown; text?: unknown; sourceEventSeq?: unknown }
if (result.kind === 'success') {
if (result.text !== undefined && typeof result.text !== 'string') {
throw new TypeError(`command "${command}" success text must be a string when supplied`)
}
if (result.sourceEventSeq !== undefined
&& (!Number.isSafeInteger(result.sourceEventSeq) || (result.sourceEventSeq as number) < 0)) {
throw new TypeError(`command "${command}" success sourceEventSeq must be a non-negative safe integer when supplied`)
}
return Object.freeze({
kind: 'success',
...result.text === undefined ? {} : { text: result.text },
...result.sourceEventSeq === undefined ? {} : { sourceEventSeq: result.sourceEventSeq as number },
})
}
if (result.kind === 'error') {
if (typeof result.text !== 'string' || result.text.trim().length === 0) {
throw new TypeError(`command "${command}" error text must be a non-empty string`)
}
return Object.freeze({ kind: 'error', text: result.text })
}
throw new TypeError(`command "${command}" returned unknown result kind "${String(result.kind)}"`)
}
/**
* Human-command registry. Plain-context definitions are global; definitionsView on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/interaction/commands/src/index.ts:228 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/8d582477b4cbee87.
Report an issue: GitHub.