{"record":{"id":"8d582477b4cbee87","repo":"deepseek-ai/deepseek-harness","slug":"command-command-success-sourceeventseq-must-b","errorCode":null,"errorMessage":"command \"${command}\" success sourceEventSeq must be a non-negative safe integer when supplied","messagePattern":"command \"(.+?)\" success sourceEventSeq must be a non-negative safe integer when supplied","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/interaction/commands/src/index.ts","lineNumber":228,"sourceCode":"    description: normalized.description,\n    ...normalized.input === undefined ? {} : { input: normalized.input },\n  })\n  return { definition: normalized, descriptor }\n}\n\n/** Validate and detach an untrusted handler result at the registry boundary. */\nfunction normalizeResult(command: string, value: unknown): CommandResult {\n  if (typeof value !== 'object' || value === null || !('kind' in value)) {\n    throw new TypeError(`command \"${command}\" handler must return a CommandResult`)\n  }\n  const result = value as { kind?: unknown; text?: unknown; sourceEventSeq?: unknown }\n  if (result.kind === 'success') {\n    if (result.text !== undefined && typeof result.text !== 'string') {\n      throw new TypeError(`command \"${command}\" success text must be a string when supplied`)\n    }\n    if (result.sourceEventSeq !== undefined\n      && (!Number.isSafeInteger(result.sourceEventSeq) || (result.sourceEventSeq as number) < 0)) {\n      throw new TypeError(`command \"${command}\" success sourceEventSeq must be a non-negative safe integer when supplied`)\n    }\n    return Object.freeze({\n      kind: 'success',\n      ...result.text === undefined ? {} : { text: result.text },\n      ...result.sourceEventSeq === undefined ? {} : { sourceEventSeq: result.sourceEventSeq as number },\n    })\n  }\n  if (result.kind === 'error') {\n    if (typeof result.text !== 'string' || result.text.trim().length === 0) {\n      throw new TypeError(`command \"${command}\" error text must be a non-empty string`)\n    }\n    return Object.freeze({ kind: 'error', text: result.text })\n  }\n  throw new TypeError(`command \"${command}\" returned unknown result kind \"${String(result.kind)}\"`)\n}\n\n/**\n * Human-command registry. Plain-context definitions are global; definitions","sourceCodeStart":210,"sourceCodeEnd":246,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/interaction/commands/src/index.ts#L210-L246","documentation":"Error \"command \"${command}\" success sourceEventSeq must be a non-negative safe integer when supplied\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/interaction/commands/src/index.ts:228 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}