{"record":{"id":"50aad4898f934f70","repo":"deepseek-ai/deepseek-harness","slug":"name-is-not-available-in-the-dynamic-package-sa","errorCode":null,"errorMessage":"${name} is not available in the dynamic package sandbox — ${redirect}","messagePattern":"(.+?) is not available in the dynamic package sandbox — (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-host-runner/src/sandbox.ts","lineNumber":115,"sourceCode":"  require:\n    'Node modules are unavailable. Use the cordis services on ctx instead — e.g. inject: [\\'fs\\'] for files, '\n    + '[\\'web\\'] for HTTP, [\\'bash\\'] for processes; query Service.listService with cordis_inspect_query first.',\n  setTimeout: TIMER_REDIRECT,\n  setInterval: TIMER_REDIRECT,\n  setImmediate: TIMER_REDIRECT,\n  clearTimeout: TIMER_REDIRECT,\n  clearInterval: TIMER_REDIRECT,\n  fetch:\n    'Network access goes through the cordis web service: declare inject: [\\'web\\'] and call ctx.web '\n    + '(query Host Service.listService with cordis_inspect_query for its methods).',\n}\n\n/** Build the trap functions for {@link NODE_API_REDIRECTS}: calling one throws the redirect. */\nfunction nodeApiTraps(): Record<string, () => never> {\n  const traps: Record<string, () => never> = {}\n  for (const [name, redirect] of Object.entries(NODE_API_REDIRECTS)) {\n    traps[name] = () => {\n      throw new Error(`${name} is not available in the dynamic package sandbox — ${redirect}`)\n    }\n  }\n  return traps\n}\n\n/**\n * Build the vm context one host half evaluates in: the tagged console, the\n * `harness` registration helpers, the encoding primitives, the Node-API traps,\n * and the dual-realm `instanceof` patch, already `createContext`-ed.\n * @param id - the package id (`dyn-<n>`), used as the console tag and filename stem.\n * @param harnessExtras - per-package `harness` verbs beyond the registration pair (`handle`).\n * @returns the contextified sandbox object to pass to {@link evaluateHostCode}.\n */\nexport function createSandbox(id: string, harnessExtras: Record<string, unknown> = {}): object {\n  const sandbox = {\n    ...nodeApiTraps(),\n    console: taggedConsole(id),\n    harness: { defineTool: sandboxDefineTool, registerTool: sandboxRegisterTool, ...harnessExtras },","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-host-runner/src/sandbox.ts#L97-L133","documentation":"Error \"${name} is not available in the dynamic package sandbox — ${redirect}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-host-runner/src/sandbox.ts:115 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"}