@elizaos/plugin-mcp 1.3.4 → 1.3.5
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/actions/callToolAction.d.ts.map +1 -1
- package/dist/cjs/index.cjs +10 -6
- package/dist/cjs/index.js.map +7 -7
- package/dist/index.js +10 -6
- package/dist/index.js.map +7 -7
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/processing.d.ts +1 -1
- package/dist/utils/processing.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callToolAction.d.ts","sourceRoot":"","sources":["../../src/actions/callToolAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EAOZ,MAAM,eAAe,CAAC;AAQvB,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"callToolAction.d.ts","sourceRoot":"","sources":["../../src/actions/callToolAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EAOZ,MAAM,eAAe,CAAC;AAQvB,eAAO,MAAM,cAAc,EAAE,MAsK5B,CAAC"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -843,7 +843,9 @@ function buildMcpProviderData(servers) {
|
|
|
843
843
|
}
|
|
844
844
|
}
|
|
845
845
|
return {
|
|
846
|
-
values: { mcp: mcpData
|
|
846
|
+
values: { mcp: mcpData, mcpText: `# MCP Configuration
|
|
847
|
+
|
|
848
|
+
${textContent}` },
|
|
847
849
|
data: { mcp: mcpData },
|
|
848
850
|
text: `# MCP Configuration
|
|
849
851
|
|
|
@@ -966,6 +968,7 @@ async function handleToolResponse(runtime2, message, serverName, toolName, toolA
|
|
|
966
968
|
attachments: hasAttachments && attachments.length > 0 ? attachments : undefined
|
|
967
969
|
});
|
|
968
970
|
}
|
|
971
|
+
return replyMemory;
|
|
969
972
|
}
|
|
970
973
|
async function sendInitialResponse(callback) {
|
|
971
974
|
if (callback) {
|
|
@@ -1528,15 +1531,16 @@ var callToolAction = {
|
|
|
1528
1531
|
${JSON.stringify(toolSelectionArgument, null, 2)}`);
|
|
1529
1532
|
const result = await mcpService.callTool(serverName, toolName, toolSelectionArgument.toolArguments);
|
|
1530
1533
|
const { toolOutput, hasAttachments, attachments } = processToolResult(result, serverName, toolName, runtime2, message.entityId);
|
|
1531
|
-
await handleToolResponse(runtime2, message, serverName, toolName, toolSelectionArgument.toolArguments, toolOutput, hasAttachments, attachments, composedState, mcpProvider, callback);
|
|
1534
|
+
const replyMemory = await handleToolResponse(runtime2, message, serverName, toolName, toolSelectionArgument.toolArguments, toolOutput, hasAttachments, attachments, composedState, mcpProvider, callback);
|
|
1532
1535
|
return {
|
|
1533
|
-
text: `Successfully called tool: ${serverName}/${toolName}`,
|
|
1536
|
+
text: `Successfully called tool: ${serverName}/${toolName}. Reasoned response: ${replyMemory.content.text}`,
|
|
1534
1537
|
values: {
|
|
1535
1538
|
success: true,
|
|
1536
1539
|
toolExecuted: true,
|
|
1537
1540
|
serverName,
|
|
1538
1541
|
toolName,
|
|
1539
|
-
hasAttachments
|
|
1542
|
+
hasAttachments,
|
|
1543
|
+
output: toolOutput
|
|
1540
1544
|
},
|
|
1541
1545
|
data: {
|
|
1542
1546
|
actionName: "CALL_MCP_TOOL",
|
|
@@ -1813,7 +1817,7 @@ class McpService extends import_core8.Service {
|
|
|
1813
1817
|
connections = new Map;
|
|
1814
1818
|
connectionStates = new Map;
|
|
1815
1819
|
mcpProvider = {
|
|
1816
|
-
values: { mcp: {} },
|
|
1820
|
+
values: { mcp: {}, mcpText: "" },
|
|
1817
1821
|
data: { mcp: {} },
|
|
1818
1822
|
text: ""
|
|
1819
1823
|
};
|
|
@@ -2303,4 +2307,4 @@ var mcpPlugin = {
|
|
|
2303
2307
|
};
|
|
2304
2308
|
var src_default = mcpPlugin;
|
|
2305
2309
|
|
|
2306
|
-
//# debugId=
|
|
2310
|
+
//# debugId=06B19883B039D4B264756E2164756E21
|