deepseek-ai/deepseek-harness · error · Error

harness.${String(prop)} belongs to the HOST half (`code`): r

Error message

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).

What it means

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.

Source

Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:69

    'modules cannot be imported here. React arrives as the `React` closure symbol; everything else goes through ctx services or host.call.',
}

/** Callable teaching traps shadowing the ambient globals the closure must not reach. */
function closureTraps(): Record<string, () => never> {
  const traps: Record<string, () => never> = {}
  for (const [name, redirect] of Object.entries(DYNAMIC_CLIENT_REDIRECTS)) {
    traps[name] = (): never => {
      throw new Error(`${name} is not available in a dynamic client half — ${redirect}`)
    }
  }
  return traps
}

/** The `harness` seat exists only host-side; any touch teaches the split. */
function harnessTrap(): unknown {
  return new Proxy({}, {
    get(_target, prop) {
      throw new 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).',
      )
    },
  })
}

/** Per-package style-tag bookkeeping behind the `styles.insert` symbol. */
export class DynamicCordisStyles {
  private readonly tags = new Set<HTMLStyleElement>()

  /** @param pluginId - owning Plugin ID, stamped as `data-dyn` on every tag. */
  constructor(private readonly pluginId: CordisDynamicPluginId) {}

  /**
   * Inject one stylesheet, removed automatically on package unload.
   * @param css - raw CSS text.
   * @returns disposer removing this one tag early.

View on GitHub (pinned to b150a551b8)

When it happens

Trigger: Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:69 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/334bbb031d02c751. Report an issue: GitHub.