summaryrefslogtreecommitdiff
path: root/packages/core/src/tools/tool-registry.ts
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-06-02 09:56:32 -0700
committerGitHub <[email protected]>2025-06-02 09:56:32 -0700
commitc5869db0806d04bc0d1f4da6823f9e13d22e476b (patch)
tree6e5b4c112dd14f948f6deed7b80c2e10589967cc /packages/core/src/tools/tool-registry.ts
parent467dec4edf17abcb03784caadc1694aac29d0373 (diff)
enable async tool discovery by making the registry accessor async; remove call to discoverTools that caused duplicate discovery (#691)
Diffstat (limited to 'packages/core/src/tools/tool-registry.ts')
-rw-r--r--packages/core/src/tools/tool-registry.ts3
1 files changed, 2 insertions, 1 deletions
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<string, Tool> = new Map();
+ private discovery: Promise<void> | 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<void> {