{"record":{"id":"937bcc307d85566e","repo":"different-ai/openwork","slug":"unknowntool","errorCode":"UnknownTool","errorMessage":"Unknown tool namespace '${path.join(\".\")}'.","messagePattern":"Unknown tool namespace '(.+?)'\\.","errorType":"error_code","errorClass":"ToolRuntimeError","httpStatus":null,"severity":"error","filePath":"packages/codemode/src/tool-runtime.ts","lineNumber":666,"sourceCode":"}\n\n/**\n * The enumerable names at one node of the callable tool tree - namespace names at the root,\n * tool/namespace names below - powering `Object.keys(tools)` and `for...in` over tool\n * references. A callable tool is a leaf and enumerates as `[]` (like `Object.keys` of a\n * function in JS). An unknown path is an `UnknownTool` error pointing at the working\n * discovery idioms, mirroring how calling an unknown tool fails.\n */\nconst namespaceKeys = <R>(tools: HostTools<R>, path: ReadonlyArray<string>): ReadonlyArray<string> => {\n  let value: HostTool<R> | Definition<R> | HostTools<R> = tools\n  for (const segment of path) {\n    if (\n      isBlockedMember(segment) ||\n      typeof value === \"function\" ||\n      isDefinition(value) ||\n      !Object.hasOwn(value, segment)\n    ) {\n      throw new ToolRuntimeError(\"UnknownTool\", `Unknown tool namespace '${path.join(\".\")}'.`, [\n        \"Object.keys(tools) lists the available namespaces; tools.$codemode.search({ query }) finds described tools.\",\n      ])\n    }\n    value = value[segment] as HostTool<R> | Definition<R> | HostTools<R>\n  }\n  if (typeof value === \"function\" || isDefinition(value)) return []\n  return Object.keys(value)\n}\n\nconst resolve = <R>(tools: HostTools<R>, path: ReadonlyArray<string>): HostTool<R> | Definition<R> => {\n  let value: HostTool<R> | Definition<R> | HostTools<R> = tools\n\n  for (const segment of path) {\n    if (\n      isBlockedMember(segment) ||\n      typeof value === \"function\" ||\n      isDefinition(value) ||\n      !Object.hasOwn(value, segment)","sourceCodeStart":648,"sourceCodeEnd":684,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/packages/codemode/src/tool-runtime.ts#L648-L684","documentation":"Error \"Unknown tool namespace '${path.join(\".\")}'.\" thrown in different-ai/openwork.","triggerScenarios":"Thrown at packages/codemode/src/tool-runtime.ts:666 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":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}