@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.d.cts CHANGED
@@ -3470,6 +3470,16 @@ declare class ToolRegistry {
3470
3470
  private readonly entries;
3471
3471
  register(spec: ToolSpec, handler: ToolHandler): void;
3472
3472
  has(name: string): boolean;
3473
+ /**
3474
+ * Give a name back, and report whether it was held. For an importer that registered tools on
3475
+ * someone else's behalf — the MCP client is the one in this repo — and has to hand back the ones
3476
+ * its source stopped offering.
3477
+ *
3478
+ * The registry cannot tell whether a caller owns a name, so it does not try: whoever registered a
3479
+ * name is responsible for tracking that it did. Unregistering a name it does not own would
3480
+ * silently take a tool away from whoever does.
3481
+ */
3482
+ unregister(name: string): boolean;
3473
3483
  spec(name: string): ToolSpec | undefined;
3474
3484
  allSpecs(): ToolSpec[];
3475
3485
  /**
package/dist/index.d.ts CHANGED
@@ -3470,6 +3470,16 @@ declare class ToolRegistry {
3470
3470
  private readonly entries;
3471
3471
  register(spec: ToolSpec, handler: ToolHandler): void;
3472
3472
  has(name: string): boolean;
3473
+ /**
3474
+ * Give a name back, and report whether it was held. For an importer that registered tools on
3475
+ * someone else's behalf — the MCP client is the one in this repo — and has to hand back the ones
3476
+ * its source stopped offering.
3477
+ *
3478
+ * The registry cannot tell whether a caller owns a name, so it does not try: whoever registered a
3479
+ * name is responsible for tracking that it did. Unregistering a name it does not own would
3480
+ * silently take a tool away from whoever does.
3481
+ */
3482
+ unregister(name: string): boolean;
3473
3483
  spec(name: string): ToolSpec | undefined;
3474
3484
  allSpecs(): ToolSpec[];
3475
3485
  /**
package/dist/index.js CHANGED
@@ -1746,6 +1746,18 @@ var ToolRegistry = class {
1746
1746
  has(name) {
1747
1747
  return this.entries.has(name);
1748
1748
  }
1749
+ /**
1750
+ * Give a name back, and report whether it was held. For an importer that registered tools on
1751
+ * someone else's behalf — the MCP client is the one in this repo — and has to hand back the ones
1752
+ * its source stopped offering.
1753
+ *
1754
+ * The registry cannot tell whether a caller owns a name, so it does not try: whoever registered a
1755
+ * name is responsible for tracking that it did. Unregistering a name it does not own would
1756
+ * silently take a tool away from whoever does.
1757
+ */
1758
+ unregister(name) {
1759
+ return this.entries.delete(name);
1760
+ }
1749
1761
  spec(name) {
1750
1762
  return this.entries.get(name)?.spec;
1751
1763
  }