deepseek-ai/deepseek-harness · error · TypertEmitError

Remote declaration ${invocation.id} is outside its package r

Error message

Remote declaration ${invocation.id} is outside its package root ${packageModel.root}

What it means

Error "Remote declaration ${invocation.id} is outside its package root ${packageModel.root}" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/typert/generator/src/emitter.ts:480

    referenceNames: ReadonlyMap<SymbolId, string>,
    scoped: boolean,
  ): string {
    const parameters = invocation.parameters.filter(parameter =>
      !scoped || invocation.invocation.kind === 'context' || parameter.wire !== invocation.scope?.wire).map(parameter =>
      `${safeIdentifier(parameter.wire)}${parameter.optional === true ? '?' : ''}: ${this.renderer.renderType(parameter.boundary.type, referenceNames)}`)
    if (invocation.cancellation !== undefined) parameters.push('signal?: AbortSignal')
    const result = this.renderer.renderType(invocation.result.type, referenceNames)
    // The Client Remote face delivers the carrier's outcome, so every generated
    // consumer signature resolves to a result the caller reads instead of a
    // value it must guard with its own try/catch.
    return `(${parameters.join(', ')}) => Promise<RemoteResult<${result}>>`
  }
}

function remoteDeclarationSource(packageModel: PackageModel, invocation: InvocationModel): string {
  const relativeSource = posix.relative(packageModel.root, invocation.location.file)
  if (relativeSource === '' || relativeSource === '..' || relativeSource.startsWith('../') || posix.isAbsolute(relativeSource)) {
    throw new TypertEmitError(
      `Remote declaration ${invocation.id} is outside its package root ${packageModel.root}`,
    )
  }
  return posix.join('..', relativeSource)
}

function uniqueNamespaces(invocations: readonly InvocationModel[]): string[] {
  return [...new Set(invocations.map(invocation => invocation.namespace))].sort()
}

function remoteNamespaceInterface(namespace: string): string {
  return `TypertRemoteNamespace$${Buffer.from(namespace, 'utf8').toString('hex')}`
}

interface SchemaExport {
  readonly model: SchemaModel
  readonly exportName: string
  readonly internalName: string

View on GitHub (pinned to b150a551b8)

Solutions

  1. Move the Remote declaration file under its package root, or fix the package root configuration.

When it happens

Trigger: Thrown at packages/typert/generator/src/emitter.ts:480 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/268b1109ea17aa1d. Report an issue: GitHub.