{"record":{"id":"7a55d18de0fa090d","repo":"nexu-io/open-design","slug":"unsupported-local-daemon-refresh-tool-options-s","errorCode":null,"errorMessage":"unsupported local daemon refresh tool: ${options.source.toolName}","messagePattern":"unsupported local daemon refresh tool: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/daemon/src/live-artifacts/refresh.ts","lineNumber":726,"sourceCode":"    const toolName = options.source.toolName ?? 'project_files.read_json';\n    if (toolName !== 'project_files.read_json') {\n      throw new Error(`unsupported local_file refresh tool: ${toolName}`);\n    }\n    return executeProjectFilesReadJson({\n      ...options,\n      source: {\n        ...options.source,\n        type: 'daemon_tool',\n        toolName,\n      },\n    });\n  }\n\n  if (options.source.type !== 'daemon_tool') {\n    throw new Error('local daemon refresh sources require source.type daemon_tool or local_file');\n  }\n  if (!isLocalDaemonRefreshToolName(options.source.toolName)) {\n    throw new Error(`unsupported local daemon refresh tool: ${options.source.toolName ?? '<missing>'}`);\n  }\n\n  switch (options.source.toolName) {\n    case 'project_files.search':\n      return executeProjectFilesSearch(options);\n    case 'project_files.read_json':\n      return executeProjectFilesReadJson(options);\n    case 'git.summary':\n      return executeGitSummary(options);\n    case 'public_github_repository_metric':\n      return executePublicGithubRepositoryMetric(options);\n  }\n}\n","sourceCodeStart":708,"sourceCodeEnd":740,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/apps/daemon/src/live-artifacts/refresh.ts#L708-L740","documentation":"Thrown by executeLocalDaemonRefreshSource when source.type is 'daemon_tool' but source.toolName is not in the recognized set (validated by isLocalDaemonRefreshToolName). The placeholder '<missing>' is interpolated when toolName is undefined/null, signalling that the field was omitted entirely rather than mis-spelled.","triggerScenarios":"source = { type: 'daemon_tool' } (no toolName); source = { type: 'daemon_tool', toolName: 'github.metric' }; source = { type: 'daemon_tool', toolName: 'files.read' }; toolName uses a retired or future name not yet registered.","commonSituations":"Model invents a plausible tool name not in the supported list; copy-paste left toolName out; refactor renamed a tool but old payloads still reference it; tool name typo or case mismatch (the registry is case-sensitive).","solutions":["Use one of the registered tool names exactly: 'project_files.search', 'project_files.read_json', 'git.summary', 'public_github_repository_metric'.","If toolName is missing, add it explicitly to the source object.","When adding a new tool, register it in isLocalDaemonRefreshToolName AND add a case to the switch in executeLocalDaemonRefreshSource; both must change together."],"exampleFix":"// before\nsource: { type: 'daemon_tool', toolName: 'github_metric', input: {...} }\n// after\nsource: { type: 'daemon_tool', toolName: 'public_github_repository_metric', input: {...} }","handlingStrategy":"validation","validationCode":"const KNOWN_TOOLS = new Set(['project_files.search','project_files.read_json','git.summary','public_github_repository_metric']);\nfunction assertRefreshTool(t: unknown): asserts t is string {\n  if (typeof t !== 'string' || !KNOWN_TOOLS.has(t)) throw new Error(`unknown refresh tool: ${String(t)}`);\n}","typeGuard":"function isKnownRefreshTool(v: unknown): v is string {\n  return typeof v === 'string' && new Set(['project_files.search','project_files.read_json','git.summary','public_github_repository_metric']).has(v);\n}","tryCatchPattern":null,"preventionTips":["Always set toolName explicitly on daemon_tool sources; don't rely on defaults.","Cross-check tool names against the dispatcher when refactoring.","Register new tools in both isLocalDaemonRefreshToolName and the switch."],"tags":["validation","routing","live-artifacts","refresh-source"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}