{"record":{"id":"074a66d2349303d7","repo":"deepseek-ai/deepseek-harness","slug":"expected-a-json-object","errorCode":null,"errorMessage":"expected a JSON object","messagePattern":"expected a JSON object","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/tool-cordis/src/index.ts","lineNumber":403,"sourceCode":"    if (ids.length === 0) return decision\n    signal.throwIfAborted()\n    const contexts = ids.map((id) => {\n      const reference = ctx.dynamicCordisRunner.reference(agent, CordisDynamicPluginId(id))\n      return createUserMessage({\n        content: [{\n          type: 'text',\n          text: reference === undefined ? renderUnavailableReference(id) : renderReference(reference),\n        }],\n        source: { kind: 'plugin', plugin: name, form: 'instructions' },\n      })\n    })\n    return { kind: 'enter', messages: [...decision.messages, ...contexts] }\n  })\n}\n\nfunction requireJsonObject(value: JsonValue): Record<string, JsonValue> {\n  if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n    throw new Error('expected a JSON object')\n  }\n  return value\n}\n\nfunction requireJsonString(value: Record<string, JsonValue>, key: string): string {\n  const field = value[key]\n  if (typeof field !== 'string') throw new Error(`expected JSON string field \"${key}\"`)\n  return field\n}\n\ntype SelfState = 'defined' | 'awaiting-approval' | 'client-pending' | 'stopped' | 'running' | 'waiting' | 'failed'\n\nfunction selfSummary(reference: DynamicCordisReference & { packages?: readonly unknown[] }): Record<string, JsonValue> {\n  const latest = reference.latestRun\n  const state = selfState(reference)\n  return {\n    pluginId: String(reference.pluginId),\n    name: reference.name,","sourceCodeStart":385,"sourceCodeEnd":421,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/tool-cordis/src/index.ts#L385-L421","documentation":"Error \"expected a JSON object\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/tool-cordis/src/index.ts:403 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"}