Disallow Object.create() and reflect. (#22408)

This commit is contained in:
Christian Gunderman
2026-03-16 16:24:27 +00:00
committed by GitHub
parent b5f6417574
commit e3fdc290d0
9 changed files with 229 additions and 66 deletions
+9
View File
@@ -233,6 +233,15 @@ export class ToolRegistry {
return this.messageBus;
}
/**
* Creates a shallow clone of the registry and its current known tools.
*/
clone(): ToolRegistry {
const clone = new ToolRegistry(this.config, this.messageBus);
clone.allKnownTools = new Map(this.allKnownTools);
return clone;
}
/**
* Registers a tool definition.
*