{"record":{"id":"268b1109ea17aa1d","repo":"deepseek-ai/deepseek-harness","slug":"remote-declaration-invocation-id-is-outside-its","errorCode":null,"errorMessage":"Remote declaration ${invocation.id} is outside its package root ${packageModel.root}","messagePattern":"Remote declaration (.+?) is outside its package root (.+?)","errorType":"exception","errorClass":"TypertEmitError","httpStatus":null,"severity":"error","filePath":"packages/typert/generator/src/emitter.ts","lineNumber":480,"sourceCode":"    referenceNames: ReadonlyMap<SymbolId, string>,\n    scoped: boolean,\n  ): string {\n    const parameters = invocation.parameters.filter(parameter =>\n      !scoped || invocation.invocation.kind === 'context' || parameter.wire !== invocation.scope?.wire).map(parameter =>\n      `${safeIdentifier(parameter.wire)}${parameter.optional === true ? '?' : ''}: ${this.renderer.renderType(parameter.boundary.type, referenceNames)}`)\n    if (invocation.cancellation !== undefined) parameters.push('signal?: AbortSignal')\n    const result = this.renderer.renderType(invocation.result.type, referenceNames)\n    // The Client Remote face delivers the carrier's outcome, so every generated\n    // consumer signature resolves to a result the caller reads instead of a\n    // value it must guard with its own try/catch.\n    return `(${parameters.join(', ')}) => Promise<RemoteResult<${result}>>`\n  }\n}\n\nfunction remoteDeclarationSource(packageModel: PackageModel, invocation: InvocationModel): string {\n  const relativeSource = posix.relative(packageModel.root, invocation.location.file)\n  if (relativeSource === '' || relativeSource === '..' || relativeSource.startsWith('../') || posix.isAbsolute(relativeSource)) {\n    throw new TypertEmitError(\n      `Remote declaration ${invocation.id} is outside its package root ${packageModel.root}`,\n    )\n  }\n  return posix.join('..', relativeSource)\n}\n\nfunction uniqueNamespaces(invocations: readonly InvocationModel[]): string[] {\n  return [...new Set(invocations.map(invocation => invocation.namespace))].sort()\n}\n\nfunction remoteNamespaceInterface(namespace: string): string {\n  return `TypertRemoteNamespace$${Buffer.from(namespace, 'utf8').toString('hex')}`\n}\n\ninterface SchemaExport {\n  readonly model: SchemaModel\n  readonly exportName: string\n  readonly internalName: string","sourceCodeStart":462,"sourceCodeEnd":498,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/typert/generator/src/emitter.ts#L462-L498","documentation":"Error \"Remote declaration ${invocation.id} is outside its package root ${packageModel.root}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/typert/generator/src/emitter.ts:480 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Move the Remote declaration file under its package root, or fix the package root configuration."],"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"}