{"record":{"id":"334bbb031d02c751","repo":"deepseek-ai/deepseek-harness","slug":"harness-string-prop-belongs-to-the-host-half","errorCode":null,"errorMessage":"harness.${String(prop)} belongs to the HOST half (`code`): register handlers there with harness.handle(method, fn); the browser half calls them via host.call(method, args).","messagePattern":"harness\\.(.+?) belongs to the HOST half \\(`code`\\): register handlers there with harness\\.handle\\(method, fn\\); the browser half calls them via host\\.call\\(method, args\\)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-client-runner/src/client/evaluator.ts","lineNumber":69,"sourceCode":"    'modules cannot be imported here. React arrives as the `React` closure symbol; everything else goes through ctx services or host.call.',\n}\n\n/** Callable teaching traps shadowing the ambient globals the closure must not reach. */\nfunction closureTraps(): Record<string, () => never> {\n  const traps: Record<string, () => never> = {}\n  for (const [name, redirect] of Object.entries(DYNAMIC_CLIENT_REDIRECTS)) {\n    traps[name] = (): never => {\n      throw new Error(`${name} is not available in a dynamic client half — ${redirect}`)\n    }\n  }\n  return traps\n}\n\n/** The `harness` seat exists only host-side; any touch teaches the split. */\nfunction harnessTrap(): unknown {\n  return new Proxy({}, {\n    get(_target, prop) {\n      throw new Error(\n        `harness.${String(prop)} belongs to the HOST half (\\`code\\`): register handlers there with harness.handle(method, fn); `\n        + 'the browser half calls them via host.call(method, args).',\n      )\n    },\n  })\n}\n\n/** Per-package style-tag bookkeeping behind the `styles.insert` symbol. */\nexport class DynamicCordisStyles {\n  private readonly tags = new Set<HTMLStyleElement>()\n\n  /** @param pluginId - owning Plugin ID, stamped as `data-dyn` on every tag. */\n  constructor(private readonly pluginId: CordisDynamicPluginId) {}\n\n  /**\n   * Inject one stylesheet, removed automatically on package unload.\n   * @param css - raw CSS text.\n   * @returns disposer removing this one tag early.","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-client-runner/src/client/evaluator.ts#L51-L87","documentation":"Error \"harness.${String(prop)} belongs to the HOST half (`code`): register handlers there with harness.handle(method, fn); the browser half calls them via host.call(method, args).\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:69 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"}