{"record":{"id":"7e2d7555e6b05940","repo":"deepseek-ai/deepseek-harness","slug":"harness-definetool-path-must-contain-only-own-e","errorCode":null,"errorMessage":"harness.defineTool ${path} must contain only own enumerable string keys","messagePattern":"harness\\.defineTool (.+?) must contain only own enumerable string keys","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-host-runner/src/guard.ts","lineNumber":82,"sourceCode":"    && hasIntrinsicConstructor(objectPrototype, 'Object')\n}\n/* jscpd:ignore-end */\n\n/** Whether a schema list is a dense intrinsic array with no JSON-invisible decorations. */\nfunction isDensePlainArray(value: unknown): value is unknown[] {\n  if (!Array.isArray(value) || !hasPlainArrayPrototype(value) || Reflect.ownKeys(value).length !== value.length + 1) {\n    return false\n  }\n  for (let index = 0; index < value.length; index++) {\n    if (!Object.hasOwn(value, index)) return false\n  }\n  return true\n}\n\n/** Reject schema records whose declarations would disappear from object enumeration. */\nfunction assertSchemaContainerKeys(value: Record<string, unknown>, path: string): void {\n  if (Reflect.ownKeys(value).some(key => typeof key !== 'string' || !Object.prototype.propertyIsEnumerable.call(value, key))) {\n    throw new Error(`harness.defineTool ${path} must contain only own enumerable string keys`)\n  }\n}\n\n/** Where one cloned JSON value is installed. */\ntype CloneDestination =\n  | { kind: 'root' }\n  | { kind: 'array'; target: unknown[]; index: number }\n  | { kind: 'object'; target: Record<string, unknown>; key: string }\n\n/** Deferred work for stack-safe cross-realm JSON cloning. */\ntype CloneTask =\n  | { kind: 'visit'; value: unknown; path: string; destination: CloneDestination }\n  | { kind: 'array-item'; source: unknown[]; index: number; path: string; target: unknown[] }\n  | { kind: 'leave'; source: object }\n\n/** Materialize realm-foreign lossless JSON without allowing JSON.stringify coercions; `path` carries the caller's own error prefix. */\nfunction cloneJson(value: unknown, path: string): unknown {\n  const ancestors = new Set<object>()","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-host-runner/src/guard.ts#L64-L100","documentation":"Error \"harness.defineTool ${path} must contain only own enumerable string keys\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-host-runner/src/guard.ts:82 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"}