@dudousxd/nestjs-agent-core 0.14.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1915,6 +1915,18 @@ var ToolRegistry = class {
1915
1915
  has(name) {
1916
1916
  return this.entries.has(name);
1917
1917
  }
1918
+ /**
1919
+ * Give a name back, and report whether it was held. For an importer that registered tools on
1920
+ * someone else's behalf — the MCP client is the one in this repo — and has to hand back the ones
1921
+ * its source stopped offering.
1922
+ *
1923
+ * The registry cannot tell whether a caller owns a name, so it does not try: whoever registered a
1924
+ * name is responsible for tracking that it did. Unregistering a name it does not own would
1925
+ * silently take a tool away from whoever does.
1926
+ */
1927
+ unregister(name) {
1928
+ return this.entries.delete(name);
1929
+ }
1918
1930
  spec(name) {
1919
1931
  return this.entries.get(name)?.spec;
1920
1932
  }