@artinet/agent-relay-mcp 0.0.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/LICENSE +201 -0
- package/README.md +170 -0
- package/dist/bin/stdio.d.ts +2 -0
- package/dist/bin/stdio.js +42 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/manager.d.ts +19 -0
- package/dist/src/manager.js +56 -0
- package/dist/src/relay.d.ts +36 -0
- package/dist/src/relay.js +157 -0
- package/dist/src/scan.d.ts +7 -0
- package/dist/src/scan.js +30 -0
- package/dist/src/server.d.ts +15 -0
- package/dist/src/server.js +218 -0
- package/dist/src/sync.d.ts +26 -0
- package/dist/src/sync.js +98 -0
- package/dist/src/types/config.d.ts +76 -0
- package/dist/src/types/config.js +12 -0
- package/dist/src/types/index.d.ts +4 -0
- package/dist/src/types/index.js +4 -0
- package/dist/src/types/manager.d.ts +14 -0
- package/dist/src/types/manager.js +1 -0
- package/dist/src/types/relay.d.ts +16 -0
- package/dist/src/types/relay.js +1 -0
- package/dist/src/types/schema.d.ts +19 -0
- package/dist/src/types/schema.js +16 -0
- package/package.json +76 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The Artinet Project
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { AgentType, IAgentManager } from "./manager.js";
|
|
6
|
+
import { ClientConfig } from "./schema.js";
|
|
7
|
+
import { AgentCard, TaskQueryParams, Task, TaskIdParams, MessageSendParams, SendMessageSuccessResult } from "@artinet/sdk";
|
|
8
|
+
export interface IAgentRelay extends IAgentManager {
|
|
9
|
+
registerAgent(agent: AgentType | ClientConfig): Promise<AgentCard>;
|
|
10
|
+
deregisterAgent(agentId: string): Promise<void>;
|
|
11
|
+
sendMessage(agentId: string, messageParams: MessageSendParams): Promise<SendMessageSuccessResult>;
|
|
12
|
+
getTask(agentId: string, taskQuery: TaskQueryParams): Promise<Task>;
|
|
13
|
+
cancelTask(agentId: string, taskId: TaskIdParams): Promise<Task>;
|
|
14
|
+
getAgentCard(agentId: string): Promise<AgentCard | undefined>;
|
|
15
|
+
searchAgents(query: string): Promise<AgentCard[]>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The Artinet Project
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import z from "zod";
|
|
6
|
+
export declare const ClientConfigSchema: z.ZodObject<{
|
|
7
|
+
url: z.ZodString;
|
|
8
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
9
|
+
fallbackPath: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
url: string;
|
|
12
|
+
headers?: Record<string, string> | undefined;
|
|
13
|
+
fallbackPath?: string | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
url: string;
|
|
16
|
+
headers?: Record<string, string> | undefined;
|
|
17
|
+
fallbackPath?: string | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export type ClientConfig = z.infer<typeof ClientConfigSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 The Artinet Project
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import z from "zod";
|
|
6
|
+
export const ClientConfigSchema = z.object({
|
|
7
|
+
url: z.string().url().describe("The URL of the agent to register."),
|
|
8
|
+
headers: z
|
|
9
|
+
.record(z.string(), z.string())
|
|
10
|
+
.optional()
|
|
11
|
+
.describe("The headers to send to the agent."),
|
|
12
|
+
fallbackPath: z
|
|
13
|
+
.string()
|
|
14
|
+
.optional()
|
|
15
|
+
.describe("The fallback path to use if the agent does not support the request."),
|
|
16
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@artinet/agent-relay-mcp",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A Model Context Protocol (MCP) server for relaying messages between A2A enabled AI agents.",
|
|
5
|
+
"author": "artinet",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/the-artinet-project/mcp/tree/main/servers/relay"
|
|
10
|
+
},
|
|
11
|
+
"issues": {
|
|
12
|
+
"url": "https://github.com/the-artinet-project/mcp/issues"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"package.json",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"bin": {
|
|
21
|
+
"agent-relay-mcp": "./dist/bin/stdio.js"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"artinet",
|
|
25
|
+
"agent2agent",
|
|
26
|
+
"modelcontextprotocol",
|
|
27
|
+
"mcp",
|
|
28
|
+
"a2a",
|
|
29
|
+
"agentic",
|
|
30
|
+
"ai",
|
|
31
|
+
"agent",
|
|
32
|
+
"sdk",
|
|
33
|
+
"artificial intelligence",
|
|
34
|
+
"ai agent",
|
|
35
|
+
"multi-agent",
|
|
36
|
+
"multi-agent system",
|
|
37
|
+
"orchestration"
|
|
38
|
+
],
|
|
39
|
+
"type": "module",
|
|
40
|
+
"main": "./dist/src/index.js",
|
|
41
|
+
"module": "./dist/src/index.js",
|
|
42
|
+
"types": "./dist/src/index.d.ts",
|
|
43
|
+
"rootDir": ".",
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc --project tsconfig.json",
|
|
46
|
+
"clean": "rimraf dist",
|
|
47
|
+
"clean:all": "rimraf dist node_modules package-lock.json",
|
|
48
|
+
"dev": "tsc --watch",
|
|
49
|
+
"start": "node dist/bin/stdio.js",
|
|
50
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
51
|
+
"prepublishOnly": "npm run clean:all && npm i && npm run build && npm test"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@artinet/sdk": "^0.5.11",
|
|
55
|
+
"@artinet/types": "^0.0.4",
|
|
56
|
+
"@modelcontextprotocol/sdk": "^1.20.0",
|
|
57
|
+
"p-limit": "^7.2.0",
|
|
58
|
+
"portscanner": "^2.2.0",
|
|
59
|
+
"zod": "^3.23.8",
|
|
60
|
+
"uuid": "^11.1.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@types/node": "^20.17.50",
|
|
64
|
+
"@types/portscanner": "^2.1.4",
|
|
65
|
+
"eslint": "^9.25.1",
|
|
66
|
+
"jest": "^29.7.0",
|
|
67
|
+
"rimraf": "^5.0.5",
|
|
68
|
+
"ts-jest": "^29.2.5",
|
|
69
|
+
"ts-node": "^10.9.2",
|
|
70
|
+
"typescript": "^5.9.3",
|
|
71
|
+
"typescript-eslint": "^8.31.0"
|
|
72
|
+
},
|
|
73
|
+
"engines": {
|
|
74
|
+
"node": ">=18.9.1"
|
|
75
|
+
}
|
|
76
|
+
}
|