@xuda.io/ai_module 1.1.5168 → 1.1.5169

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 (2) hide show
  1. package/index.mjs +7 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -4281,6 +4281,8 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4281
4281
  ai_agents.push(reference_id);
4282
4282
  }
4283
4283
 
4284
+ let eligible_agent = true;
4285
+
4284
4286
  for (const agent_id of ai_agents) {
4285
4287
  try {
4286
4288
  let ai_agent_doc;
@@ -4322,6 +4324,11 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4322
4324
  }
4323
4325
 
4324
4326
  case 'mcp': {
4327
+ if (reference_type !== 'ai_agents') {
4328
+ eligible_agent = false;
4329
+ break;
4330
+ }
4331
+
4325
4332
  tools.push(
4326
4333
  hostedMcpTool({
4327
4334
  serverLabel: 'mcp_' + (val?.name?.replaceAll(' ', '_') || key), //ai_agent_doc.properties.menuName,
@@ -4622,7 +4629,6 @@ const ai_chat_conversation = async function (req, job_id, headers) {
4622
4629
  });
4623
4630
 
4624
4631
  init_agent_hooks(agent);
4625
-
4626
4632
  list.push(agent);
4627
4633
  } catch (err) {
4628
4634
  console.error(err.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5168",
3
+ "version": "1.1.5169",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",