From c5869db0806d04bc0d1f4da6823f9e13d22e476b Mon Sep 17 00:00:00 2001 From: Olcan Date: Mon, 2 Jun 2025 09:56:32 -0700 Subject: enable async tool discovery by making the registry accessor async; remove call to discoverTools that caused duplicate discovery (#691) --- packages/core/src/tools/tool-registry.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/core/src/tools') diff --git a/packages/core/src/tools/tool-registry.ts b/packages/core/src/tools/tool-registry.ts index e241ada5..384552ca 100644 --- a/packages/core/src/tools/tool-registry.ts +++ b/packages/core/src/tools/tool-registry.ts @@ -100,6 +100,7 @@ Signal: Signal number or \`(none)\` if no signal was received. export class ToolRegistry { private tools: Map = new Map(); + private discovery: Promise | null = null; private config: Config; constructor(config: Config) { @@ -121,7 +122,7 @@ export class ToolRegistry { } /** - * Discovers tools from project, if a discovery command is configured. + * Discovers tools from project (if available and configured). * Can be called multiple times to update discovered tools. */ async discoverTools(): Promise { -- cgit v1.2.3