@mcpc-tech/core 0.3.31 → 0.3.32

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.
Files changed (3) hide show
  1. package/index.cjs +3 -7
  2. package/index.mjs +3 -7
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -19715,6 +19715,7 @@ var PluginManager = class {
19715
19715
  /**
19716
19716
  * Trigger registerAgentTool hook - allows plugins to register the main agent tool
19717
19717
  * Returns true if any plugin handled the registration
19718
+ * Throws the original error if plugin fails (instead of swallowing it)
19718
19719
  */
19719
19720
  async triggerRegisterAgentTool(context2) {
19720
19721
  const registerPlugins = this.plugins.filter((p2) => p2.registerAgentTool && shouldApplyPlugin(p2, context2.mode));
@@ -19724,13 +19725,8 @@ var PluginManager = class {
19724
19725
  const sortedPlugins = sortPluginsByOrder(registerPlugins).reverse();
19725
19726
  for (const plugin of sortedPlugins) {
19726
19727
  if (plugin.registerAgentTool) {
19727
- try {
19728
- await plugin.registerAgentTool(context2);
19729
- return true;
19730
- } catch (error2) {
19731
- const errorMsg = error2 instanceof Error ? error2.message : String(error2);
19732
- await this.logger.error(`Plugin "${plugin.name}" registerAgentTool failed: ${errorMsg}`);
19733
- }
19728
+ await plugin.registerAgentTool(context2);
19729
+ return true;
19734
19730
  }
19735
19731
  }
19736
19732
  return false;
package/index.mjs CHANGED
@@ -19700,6 +19700,7 @@ var PluginManager = class {
19700
19700
  /**
19701
19701
  * Trigger registerAgentTool hook - allows plugins to register the main agent tool
19702
19702
  * Returns true if any plugin handled the registration
19703
+ * Throws the original error if plugin fails (instead of swallowing it)
19703
19704
  */
19704
19705
  async triggerRegisterAgentTool(context2) {
19705
19706
  const registerPlugins = this.plugins.filter((p2) => p2.registerAgentTool && shouldApplyPlugin(p2, context2.mode));
@@ -19709,13 +19710,8 @@ var PluginManager = class {
19709
19710
  const sortedPlugins = sortPluginsByOrder(registerPlugins).reverse();
19710
19711
  for (const plugin of sortedPlugins) {
19711
19712
  if (plugin.registerAgentTool) {
19712
- try {
19713
- await plugin.registerAgentTool(context2);
19714
- return true;
19715
- } catch (error2) {
19716
- const errorMsg = error2 instanceof Error ? error2.message : String(error2);
19717
- await this.logger.error(`Plugin "${plugin.name}" registerAgentTool failed: ${errorMsg}`);
19718
- }
19713
+ await plugin.registerAgentTool(context2);
19714
+ return true;
19719
19715
  }
19720
19716
  }
19721
19717
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpc-tech/core",
3
- "version": "0.3.31",
3
+ "version": "0.3.32",
4
4
  "homepage": "https://jsr.io/@mcpc/core",
5
5
  "dependencies": {
6
6
  "@ai-sdk/provider": "^2.0.0",