@agentforge-io/core 2.0.2 → 2.0.3
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.
|
@@ -68,6 +68,9 @@ class McpClientService {
|
|
|
68
68
|
execute: async (input) => {
|
|
69
69
|
return this.callTool(config.name, tool.name, input);
|
|
70
70
|
},
|
|
71
|
+
// Carry the MCP origin through to the registry so /tools can label
|
|
72
|
+
// and group these distinctly from built-ins / connector tools.
|
|
73
|
+
mcpServerName: config.name,
|
|
71
74
|
};
|
|
72
75
|
this.registry.register(wrapped);
|
|
73
76
|
handles.push({
|
|
@@ -48,4 +48,11 @@ export interface ToolDescription {
|
|
|
48
48
|
connectorId?: string;
|
|
49
49
|
/** Human-readable connector label paired with `connectorId`. */
|
|
50
50
|
connectorName?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Set when this tool was discovered from an MCP server. The tool's
|
|
53
|
+
* `name` is already prefixed `<server>__<tool>`, but the UI uses this
|
|
54
|
+
* field to group tools by their MCP origin and label them distinctly
|
|
55
|
+
* from built-ins / connector tools.
|
|
56
|
+
*/
|
|
57
|
+
mcpServerName?: string;
|
|
51
58
|
}
|
|
@@ -95,6 +95,9 @@ class ToolRegistryService {
|
|
|
95
95
|
description: t.description,
|
|
96
96
|
inputSchema: t.inputSchema,
|
|
97
97
|
agents: t.agents,
|
|
98
|
+
...(t.connectorId ? { connectorId: t.connectorId } : {}),
|
|
99
|
+
...(t.connectorName ? { connectorName: t.connectorName } : {}),
|
|
100
|
+
...(t.mcpServerName ? { mcpServerName: t.mcpServerName } : {}),
|
|
98
101
|
}));
|
|
99
102
|
}
|
|
100
103
|
}
|
|
@@ -90,6 +90,13 @@ export interface AgentToolDefinition {
|
|
|
90
90
|
execute: (input: Record<string, unknown>, context: ToolExecutionContext) => Promise<string>;
|
|
91
91
|
/** Restrict to specific agents */
|
|
92
92
|
agents?: string[];
|
|
93
|
+
/** OAuth connector this tool belongs to. Set by ConnectorRegistryService
|
|
94
|
+
* when materializing per-user toolbelts; left undefined for built-ins. */
|
|
95
|
+
connectorId?: string;
|
|
96
|
+
connectorName?: string;
|
|
97
|
+
/** MCP server this tool was discovered from. Set by McpClientService when
|
|
98
|
+
* wrapping a remote tool; left undefined for built-ins and connector tools. */
|
|
99
|
+
mcpServerName?: string;
|
|
93
100
|
}
|
|
94
101
|
export interface ToolExecutionContext {
|
|
95
102
|
userId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge-io/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Framework-free AI runtime SDK. Owns: agent loop (Anthropic), conversations, tools, streaming, agent-job queue, SdkHooks. Identity, billing, infra (email/uploads/secrets) live in the host's modules — not here.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|