@awcp/mcp 0.0.1 → 0.0.2
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/README.md +305 -0
- package/dist/auto-daemon.d.ts +63 -0
- package/dist/auto-daemon.d.ts.map +1 -0
- package/dist/auto-daemon.js +152 -0
- package/dist/auto-daemon.js.map +1 -0
- package/dist/bin/awcp-mcp.d.ts +3 -18
- package/dist/bin/awcp-mcp.d.ts.map +1 -1
- package/dist/bin/awcp-mcp.js +221 -46
- package/dist/bin/awcp-mcp.js.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/peer-discovery.d.ts +27 -0
- package/dist/peer-discovery.d.ts.map +1 -0
- package/dist/peer-discovery.js +117 -0
- package/dist/peer-discovery.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +4 -2
- package/dist/server.js.map +1 -0
- package/dist/tools/delegate-cancel.d.ts +2 -5
- package/dist/tools/delegate-cancel.d.ts.map +1 -1
- package/dist/tools/delegate-cancel.js +8 -26
- package/dist/tools/delegate-cancel.js.map +1 -0
- package/dist/tools/delegate-cancel.txt +16 -0
- package/dist/tools/delegate-output.d.ts +1 -1
- package/dist/tools/delegate-output.d.ts.map +1 -1
- package/dist/tools/delegate-output.js +8 -25
- package/dist/tools/delegate-output.js.map +1 -0
- package/dist/tools/delegate-output.txt +22 -0
- package/dist/tools/delegate.d.ts +6 -1
- package/dist/tools/delegate.d.ts.map +1 -1
- package/dist/tools/delegate.js +35 -26
- package/dist/tools/delegate.js.map +1 -0
- package/dist/tools/delegate.txt +46 -0
- package/package.json +7 -4
package/dist/bin/awcp-mcp.js
CHANGED
|
@@ -3,79 +3,254 @@
|
|
|
3
3
|
* AWCP MCP Server CLI
|
|
4
4
|
*
|
|
5
5
|
* Starts an MCP server that provides AWCP delegation tools.
|
|
6
|
-
*
|
|
6
|
+
* Automatically starts the Delegator Daemon if not already running.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
|
-
* awcp-mcp [
|
|
9
|
+
* awcp-mcp [options]
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* --daemon-url URL of Delegator Daemon (default: http://localhost:3100)
|
|
13
|
-
* --help Show this help message
|
|
14
|
-
*
|
|
15
|
-
* Example:
|
|
16
|
-
* awcp-mcp --daemon-url http://localhost:3100
|
|
17
|
-
*
|
|
18
|
-
* Claude Desktop config (claude_desktop_config.json):
|
|
19
|
-
* {
|
|
20
|
-
* "mcpServers": {
|
|
21
|
-
* "awcp": {
|
|
22
|
-
* "command": "npx",
|
|
23
|
-
* "args": ["awcp-mcp", "--daemon-url", "http://localhost:3100"]
|
|
24
|
-
* }
|
|
25
|
-
* }
|
|
26
|
-
* }
|
|
11
|
+
* See --help for all options.
|
|
27
12
|
*/
|
|
28
13
|
import { createAwcpMcpServer } from '../server.js';
|
|
14
|
+
import { ensureDaemonRunning } from '../auto-daemon.js';
|
|
15
|
+
import { discoverPeers } from '../peer-discovery.js';
|
|
29
16
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
function parseArgs(args) {
|
|
18
|
+
const result = {
|
|
19
|
+
port: 3100,
|
|
20
|
+
transport: 'archive',
|
|
21
|
+
peerUrls: [],
|
|
22
|
+
};
|
|
34
23
|
for (let i = 0; i < args.length; i++) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
const arg = args[i];
|
|
25
|
+
const nextArg = args[i + 1] ?? '';
|
|
26
|
+
switch (arg) {
|
|
27
|
+
// Help
|
|
28
|
+
case '--help':
|
|
29
|
+
case '-h':
|
|
30
|
+
printHelp();
|
|
31
|
+
process.exit(0);
|
|
32
|
+
// Daemon
|
|
33
|
+
case '--daemon-url':
|
|
34
|
+
result.daemonUrl = nextArg;
|
|
35
|
+
i++;
|
|
36
|
+
break;
|
|
37
|
+
case '--port':
|
|
38
|
+
result.port = parseInt(nextArg, 10);
|
|
39
|
+
i++;
|
|
40
|
+
break;
|
|
41
|
+
// Export
|
|
42
|
+
case '--exports-dir':
|
|
43
|
+
result.exportsDir = nextArg;
|
|
44
|
+
i++;
|
|
45
|
+
break;
|
|
46
|
+
case '--export-strategy':
|
|
47
|
+
result.exportStrategy = nextArg;
|
|
48
|
+
i++;
|
|
49
|
+
break;
|
|
50
|
+
// Transport
|
|
51
|
+
case '--transport':
|
|
52
|
+
result.transport = nextArg;
|
|
53
|
+
i++;
|
|
54
|
+
break;
|
|
55
|
+
// Admission
|
|
56
|
+
case '--max-total-bytes':
|
|
57
|
+
result.maxTotalBytes = parseInt(nextArg, 10);
|
|
58
|
+
i++;
|
|
59
|
+
break;
|
|
60
|
+
case '--max-file-count':
|
|
61
|
+
result.maxFileCount = parseInt(nextArg, 10);
|
|
62
|
+
i++;
|
|
63
|
+
break;
|
|
64
|
+
case '--max-single-file-bytes':
|
|
65
|
+
result.maxSingleFileBytes = parseInt(nextArg, 10);
|
|
66
|
+
i++;
|
|
67
|
+
break;
|
|
68
|
+
// Defaults
|
|
69
|
+
case '--default-ttl':
|
|
70
|
+
result.defaultTtl = parseInt(nextArg, 10);
|
|
71
|
+
i++;
|
|
72
|
+
break;
|
|
73
|
+
case '--default-access-mode':
|
|
74
|
+
result.defaultAccessMode = nextArg;
|
|
75
|
+
i++;
|
|
76
|
+
break;
|
|
77
|
+
// Archive transport
|
|
78
|
+
case '--temp-dir':
|
|
79
|
+
result.tempDir = nextArg;
|
|
80
|
+
i++;
|
|
81
|
+
break;
|
|
82
|
+
// SSHFS transport
|
|
83
|
+
case '--ssh-ca-key':
|
|
84
|
+
result.sshCaKey = nextArg;
|
|
85
|
+
i++;
|
|
86
|
+
break;
|
|
87
|
+
case '--ssh-host':
|
|
88
|
+
result.sshHost = nextArg;
|
|
89
|
+
i++;
|
|
90
|
+
break;
|
|
91
|
+
case '--ssh-port':
|
|
92
|
+
result.sshPort = parseInt(nextArg, 10);
|
|
93
|
+
i++;
|
|
94
|
+
break;
|
|
95
|
+
case '--ssh-user':
|
|
96
|
+
result.sshUser = nextArg;
|
|
97
|
+
i++;
|
|
98
|
+
break;
|
|
99
|
+
case '--ssh-key-dir':
|
|
100
|
+
result.sshKeyDir = nextArg;
|
|
101
|
+
i++;
|
|
102
|
+
break;
|
|
103
|
+
// Peers
|
|
104
|
+
case '--peers':
|
|
105
|
+
result.peerUrls = nextArg.split(',').map(u => u.trim()).filter(Boolean);
|
|
106
|
+
i++;
|
|
107
|
+
break;
|
|
38
108
|
}
|
|
39
|
-
|
|
40
|
-
|
|
109
|
+
}
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
async function main() {
|
|
113
|
+
const parsed = parseArgs(process.argv.slice(2));
|
|
114
|
+
if (!parsed) {
|
|
115
|
+
process.exit(1);
|
|
116
|
+
}
|
|
117
|
+
// Discover peers (fetch Agent Cards)
|
|
118
|
+
let peersContext;
|
|
119
|
+
if (parsed.peerUrls.length > 0) {
|
|
120
|
+
console.error(`[AWCP MCP] Discovering ${parsed.peerUrls.length} peer(s)...`);
|
|
121
|
+
peersContext = await discoverPeers(parsed.peerUrls);
|
|
122
|
+
}
|
|
123
|
+
// Determine daemon URL
|
|
124
|
+
let finalDaemonUrl;
|
|
125
|
+
if (parsed.daemonUrl) {
|
|
126
|
+
// Use provided daemon URL (no auto-start)
|
|
127
|
+
finalDaemonUrl = parsed.daemonUrl;
|
|
128
|
+
console.error(`[AWCP MCP] Using existing daemon at ${parsed.daemonUrl}`);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
// Build auto-daemon options from parsed args
|
|
132
|
+
const options = {
|
|
133
|
+
port: parsed.port,
|
|
134
|
+
exportsDir: parsed.exportsDir,
|
|
135
|
+
exportStrategy: parsed.exportStrategy,
|
|
136
|
+
transport: parsed.transport,
|
|
137
|
+
maxTotalBytes: parsed.maxTotalBytes,
|
|
138
|
+
maxFileCount: parsed.maxFileCount,
|
|
139
|
+
maxSingleFileBytes: parsed.maxSingleFileBytes,
|
|
140
|
+
defaultTtl: parsed.defaultTtl,
|
|
141
|
+
defaultAccessMode: parsed.defaultAccessMode,
|
|
142
|
+
tempDir: parsed.tempDir,
|
|
143
|
+
sshCaKey: parsed.sshCaKey,
|
|
144
|
+
sshHost: parsed.sshHost,
|
|
145
|
+
sshPort: parsed.sshPort,
|
|
146
|
+
sshUser: parsed.sshUser,
|
|
147
|
+
sshKeyDir: parsed.sshKeyDir,
|
|
148
|
+
};
|
|
149
|
+
const result = await ensureDaemonRunning(options);
|
|
150
|
+
finalDaemonUrl = result.url;
|
|
151
|
+
// Handle shutdown to clean up daemon
|
|
152
|
+
if (result.daemon) {
|
|
153
|
+
const cleanup = async () => {
|
|
154
|
+
console.error('[AWCP MCP] Shutting down daemon...');
|
|
155
|
+
await result.daemon.stop();
|
|
156
|
+
process.exit(0);
|
|
157
|
+
};
|
|
158
|
+
process.on('SIGINT', cleanup);
|
|
159
|
+
process.on('SIGTERM', cleanup);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// Create MCP server with peers context
|
|
163
|
+
const server = createAwcpMcpServer({
|
|
164
|
+
daemonUrl: finalDaemonUrl,
|
|
165
|
+
peers: peersContext,
|
|
166
|
+
});
|
|
167
|
+
// Connect via stdio
|
|
168
|
+
const transport = new StdioServerTransport();
|
|
169
|
+
await server.connect(transport);
|
|
170
|
+
console.error(`[AWCP MCP] Server started, daemon at ${finalDaemonUrl}`);
|
|
171
|
+
if (peersContext && peersContext.peers.length > 0) {
|
|
172
|
+
const available = peersContext.peers.filter(p => p.card).length;
|
|
173
|
+
console.error(`[AWCP MCP] ${available}/${peersContext.peers.length} peers available`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function printHelp() {
|
|
177
|
+
console.error(`AWCP MCP Server - Workspace Delegation Tools
|
|
41
178
|
|
|
42
|
-
Provides MCP tools for
|
|
43
|
-
- delegate: Delegate a
|
|
179
|
+
Provides MCP tools for AI agents to delegate work to remote Executors:
|
|
180
|
+
- delegate: Delegate a workspace to a remote Executor
|
|
44
181
|
- delegate_output: Get delegation status/results
|
|
45
182
|
- delegate_cancel: Cancel active delegations
|
|
46
183
|
|
|
184
|
+
The daemon is automatically started if not running.
|
|
185
|
+
|
|
47
186
|
Usage:
|
|
48
187
|
awcp-mcp [options]
|
|
49
188
|
|
|
50
|
-
Options:
|
|
51
|
-
--daemon-url URL
|
|
52
|
-
--
|
|
189
|
+
Daemon Options:
|
|
190
|
+
--daemon-url URL Use existing Delegator Daemon (skips auto-start)
|
|
191
|
+
--port PORT Port for daemon (default: 3100)
|
|
53
192
|
|
|
54
|
-
|
|
55
|
-
|
|
193
|
+
Export Options:
|
|
194
|
+
--exports-dir DIR Directory for exports (default: ~/.awcp/exports)
|
|
195
|
+
--export-strategy TYPE Strategy: symlink, bind, worktree (default: symlink)
|
|
56
196
|
|
|
57
|
-
|
|
197
|
+
Transport Options:
|
|
198
|
+
--transport TYPE Transport: archive, sshfs (default: archive)
|
|
199
|
+
|
|
200
|
+
Admission Control:
|
|
201
|
+
--max-total-bytes N Max workspace size in bytes (default: 100MB)
|
|
202
|
+
--max-file-count N Max number of files (default: 10000)
|
|
203
|
+
--max-single-file-bytes N Max single file size (default: 50MB)
|
|
204
|
+
|
|
205
|
+
Delegation Defaults:
|
|
206
|
+
--default-ttl SECONDS Default lease duration (default: 3600)
|
|
207
|
+
--default-access-mode MODE Default access: ro, rw (default: rw)
|
|
208
|
+
|
|
209
|
+
Archive Transport Options:
|
|
210
|
+
--temp-dir DIR Temp directory for archives (default: ~/.awcp/temp)
|
|
211
|
+
|
|
212
|
+
SSHFS Transport Options:
|
|
213
|
+
--ssh-ca-key PATH CA private key path (required for SSHFS)
|
|
214
|
+
--ssh-host HOST SSH server host (default: localhost)
|
|
215
|
+
--ssh-port PORT SSH server port (default: 22)
|
|
216
|
+
--ssh-user USER SSH username (default: current user)
|
|
217
|
+
--ssh-key-dir DIR SSH key directory (default: ~/.awcp/keys)
|
|
218
|
+
|
|
219
|
+
Peer Discovery:
|
|
220
|
+
--peers URL,... Comma-separated list of executor base URLs
|
|
221
|
+
|
|
222
|
+
Other:
|
|
223
|
+
--help, -h Show this help message
|
|
224
|
+
|
|
225
|
+
Examples:
|
|
226
|
+
# Basic usage with one peer
|
|
227
|
+
awcp-mcp --peers http://localhost:4001
|
|
228
|
+
|
|
229
|
+
# Multiple peers
|
|
230
|
+
awcp-mcp --peers http://agent1:4001,http://agent2:4002
|
|
231
|
+
|
|
232
|
+
# Custom admission limits
|
|
233
|
+
awcp-mcp --peers http://localhost:4001 --max-total-bytes 200000000
|
|
234
|
+
|
|
235
|
+
# Use SSHFS transport
|
|
236
|
+
awcp-mcp --peers http://localhost:4001 --transport sshfs --ssh-ca-key ~/.awcp/ca
|
|
237
|
+
|
|
238
|
+
Claude Desktop config (claude_desktop_config.json):
|
|
58
239
|
{
|
|
59
240
|
"mcpServers": {
|
|
60
241
|
"awcp": {
|
|
61
242
|
"command": "npx",
|
|
62
|
-
"args": ["awcp
|
|
243
|
+
"args": ["@awcp/mcp", "--peers", "http://localhost:4001"]
|
|
63
244
|
}
|
|
64
245
|
}
|
|
65
246
|
}
|
|
247
|
+
|
|
248
|
+
The --peers flag fetches A2A Agent Cards at startup to provide context
|
|
249
|
+
about available executors and their capabilities to the LLM.
|
|
66
250
|
`);
|
|
67
|
-
process.exit(0);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
// Create server
|
|
71
|
-
const server = createAwcpMcpServer({ daemonUrl });
|
|
72
|
-
// Connect via stdio
|
|
73
|
-
const transport = new StdioServerTransport();
|
|
74
|
-
await server.connect(transport);
|
|
75
|
-
// Log to stderr (stdout is for MCP protocol)
|
|
76
|
-
console.error(`[AWCP MCP] Server started, connected to daemon at ${daemonUrl}`);
|
|
77
251
|
}
|
|
78
252
|
main().catch((error) => {
|
|
79
253
|
console.error('[AWCP MCP] Fatal error:', error);
|
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CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED,uCAAuC;IACvC,MAAM,MAAM,GAAG,mBAAmB,CAAC;QACjC,SAAS,EAAE,cAAc;QACzB,KAAK,EAAE,YAAY;KACpB,CAAC,CAAC;IAEH,oBAAoB;IACpB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,OAAO,CAAC,KAAK,CAAC,wCAAwC,cAAc,EAAE,CAAC,CAAC;IACxE,IAAI,YAAY,IAAI,YAAY,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAClD,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;QAChE,OAAO,CAAC,KAAK,CAAC,cAAc,SAAS,IAAI,YAAY,CAAC,KAAK,CAAC,MAAM,kBAAkB,CAAC,CAAC;IACxF,CAAC;AACH,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyEf,CAAC,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -20,3 +20,4 @@ export { DelegatorDaemonClient } from '@awcp/sdk/delegator/client';
|
|
|
20
20
|
export { delegateSchema } from './tools/delegate.js';
|
|
21
21
|
export { delegateOutputSchema, } from './tools/delegate-output.js';
|
|
22
22
|
export { delegateCancelSchema, } from './tools/delegate-cancel.js';
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,mBAAmB,EAA6B,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAuB,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EACL,oBAAoB,GAErB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,oBAAoB,GAErB,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Peer Discovery - Fetches A2A Agent Cards from configured peers
|
|
3
|
+
*
|
|
4
|
+
* Provides context to LLM about available executors and their capabilities.
|
|
5
|
+
*/
|
|
6
|
+
import type { AgentCard } from '@a2a-js/sdk';
|
|
7
|
+
export interface PeerInfo {
|
|
8
|
+
/** Base URL of the peer (e.g., http://localhost:4001) */
|
|
9
|
+
url: string;
|
|
10
|
+
/** AWCP endpoint URL (e.g., http://localhost:4001/awcp) */
|
|
11
|
+
awcpUrl: string;
|
|
12
|
+
card?: AgentCard;
|
|
13
|
+
error?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface PeersContext {
|
|
16
|
+
peers: PeerInfo[];
|
|
17
|
+
summary: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Discover all configured peers and fetch their Agent Cards
|
|
21
|
+
*/
|
|
22
|
+
export declare function discoverPeers(peerUrls: string[]): Promise<PeersContext>;
|
|
23
|
+
/**
|
|
24
|
+
* Format peers context for MCP resource
|
|
25
|
+
*/
|
|
26
|
+
export declare function formatPeersAsResource(context: PeersContext): string;
|
|
27
|
+
//# sourceMappingURL=peer-discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"peer-discovery.d.ts","sourceRoot":"","sources":["../src/peer-discovery.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,QAAQ;IACvB,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAiDD;;GAEG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAyB7E;AA2CD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAEnE"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Peer Discovery - Fetches A2A Agent Cards from configured peers
|
|
3
|
+
*
|
|
4
|
+
* Provides context to LLM about available executors and their capabilities.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Fetch Agent Card from a peer URL
|
|
8
|
+
*
|
|
9
|
+
* Tries both /.well-known/agent-card.json and /.well-known/agent.json
|
|
10
|
+
* Returns the card and the normalized base URL
|
|
11
|
+
*/
|
|
12
|
+
async function fetchAgentCard(peerUrl) {
|
|
13
|
+
// Normalize URL (remove trailing slash, remove /awcp suffix)
|
|
14
|
+
let baseUrl = peerUrl.replace(/\/+$/, '');
|
|
15
|
+
if (baseUrl.endsWith('/awcp')) {
|
|
16
|
+
baseUrl = baseUrl.slice(0, -5);
|
|
17
|
+
}
|
|
18
|
+
// Try standard A2A paths
|
|
19
|
+
const paths = [
|
|
20
|
+
'/.well-known/agent-card.json',
|
|
21
|
+
'/.well-known/agent.json',
|
|
22
|
+
];
|
|
23
|
+
for (const path of paths) {
|
|
24
|
+
try {
|
|
25
|
+
const res = await fetch(`${baseUrl}${path}`, {
|
|
26
|
+
signal: AbortSignal.timeout(5000),
|
|
27
|
+
});
|
|
28
|
+
if (res.ok) {
|
|
29
|
+
const card = await res.json();
|
|
30
|
+
return { card, baseUrl };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
// Try next path
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Normalize peer URL to base URL (without /awcp suffix)
|
|
41
|
+
*/
|
|
42
|
+
function normalizeBaseUrl(peerUrl) {
|
|
43
|
+
let baseUrl = peerUrl.replace(/\/+$/, '');
|
|
44
|
+
if (baseUrl.endsWith('/awcp')) {
|
|
45
|
+
baseUrl = baseUrl.slice(0, -5);
|
|
46
|
+
}
|
|
47
|
+
return baseUrl;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Discover all configured peers and fetch their Agent Cards
|
|
51
|
+
*/
|
|
52
|
+
export async function discoverPeers(peerUrls) {
|
|
53
|
+
const peers = [];
|
|
54
|
+
for (const inputUrl of peerUrls) {
|
|
55
|
+
const baseUrl = normalizeBaseUrl(inputUrl);
|
|
56
|
+
const awcpUrl = `${baseUrl}/awcp`;
|
|
57
|
+
try {
|
|
58
|
+
const result = await fetchAgentCard(inputUrl);
|
|
59
|
+
if (result) {
|
|
60
|
+
peers.push({ url: result.baseUrl, awcpUrl, card: result.card });
|
|
61
|
+
console.error(`[AWCP] Discovered peer: ${result.card.name} at ${result.baseUrl}`);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
peers.push({ url: baseUrl, awcpUrl, error: 'Agent Card not found' });
|
|
65
|
+
console.error(`[AWCP] Peer ${baseUrl}: Agent Card not found`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
70
|
+
peers.push({ url: baseUrl, awcpUrl, error: msg });
|
|
71
|
+
console.error(`[AWCP] Peer ${baseUrl}: ${msg}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const summary = generatePeersSummary(peers);
|
|
75
|
+
return { peers, summary };
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Generate a human-readable summary of available peers
|
|
79
|
+
*/
|
|
80
|
+
function generatePeersSummary(peers) {
|
|
81
|
+
const availablePeers = peers.filter(p => p.card);
|
|
82
|
+
if (availablePeers.length === 0) {
|
|
83
|
+
return 'No executor peers available. Configure peers with --peers flag.';
|
|
84
|
+
}
|
|
85
|
+
const lines = [
|
|
86
|
+
`Available Executor Agents (${availablePeers.length}):`,
|
|
87
|
+
'',
|
|
88
|
+
];
|
|
89
|
+
for (const peer of availablePeers) {
|
|
90
|
+
const card = peer.card;
|
|
91
|
+
lines.push(`## ${card.name}`);
|
|
92
|
+
lines.push(`URL: ${peer.url}`);
|
|
93
|
+
if (card.description) {
|
|
94
|
+
lines.push(`Description: ${card.description}`);
|
|
95
|
+
}
|
|
96
|
+
if (card.skills && card.skills.length > 0) {
|
|
97
|
+
lines.push('Skills:');
|
|
98
|
+
for (const skill of card.skills) {
|
|
99
|
+
lines.push(` - ${skill.name}: ${skill.description}`);
|
|
100
|
+
if (skill.examples && skill.examples.length > 0) {
|
|
101
|
+
lines.push(` Examples: ${skill.examples.slice(0, 2).join('; ')}`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
lines.push('');
|
|
106
|
+
}
|
|
107
|
+
lines.push('---');
|
|
108
|
+
lines.push('Use the `delegate` tool to delegate workspace tasks to these agents.');
|
|
109
|
+
return lines.join('\n');
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Format peers context for MCP resource
|
|
113
|
+
*/
|
|
114
|
+
export function formatPeersAsResource(context) {
|
|
115
|
+
return context.summary;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=peer-discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"peer-discovery.js","sourceRoot":"","sources":["../src/peer-discovery.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH;;;;;GAKG;AACH,KAAK,UAAU,cAAc,CAAC,OAAe;IAC3C,6DAA6D;IAC7D,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC1C,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,yBAAyB;IACzB,MAAM,KAAK,GAAG;QACZ,8BAA8B;QAC9B,yBAAyB;KAC1B,CAAC;IAEF,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,EAAE,EAAE;gBAC3C,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC;aAClC,CAAC,CAAC;YACH,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC;gBACX,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAe,CAAC;gBAC3C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YAC3B,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,gBAAgB;QAClB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CAAC,OAAe;IACvC,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC1C,IAAI,OAAO,CAAC,QA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;gBACtD,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAChD,KAAK,CAAC,IAAI,CAAC,iBAAiB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACvE,CAAC;YACH,CAAC;QACH,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;IAEnF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAqB;IACzD,OAAO,OAAO,CAAC,OAAO,CAAC;AACzB,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* - delegate_cancel: Cancel active delegations
|
|
10
10
|
*/
|
|
11
11
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
12
|
+
import { type PeersContext } from './peer-discovery.js';
|
|
12
13
|
export interface AwcpMcpServerOptions {
|
|
13
14
|
/** URL of the Delegator Daemon (default: http://localhost:3100) */
|
|
14
15
|
daemonUrl?: string;
|
|
@@ -16,6 +17,8 @@ export interface AwcpMcpServerOptions {
|
|
|
16
17
|
timeout?: number;
|
|
17
18
|
/** Default TTL for delegations in seconds (default: 3600) */
|
|
18
19
|
defaultTtl?: number;
|
|
20
|
+
/** Discovered peers context (from --peers flag) */
|
|
21
|
+
peers?: PeersContext;
|
|
19
22
|
}
|
|
20
23
|
/**
|
|
21
24
|
* Create an AWCP MCP Server instance
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmBpE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,oBAAyB,aA+LrE;AA2DD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
12
12
|
import { DelegatorDaemonClient } from '@awcp/sdk/delegator/client';
|
|
13
|
-
import { delegateSchema,
|
|
13
|
+
import { delegateSchema, generateDelegateDescription, } from './tools/delegate.js';
|
|
14
14
|
import { delegateOutputSchema, delegateOutputDescription, } from './tools/delegate-output.js';
|
|
15
15
|
import { delegateCancelSchema, delegateCancelDescription, } from './tools/delegate-cancel.js';
|
|
16
16
|
/**
|
|
@@ -33,6 +33,7 @@ export function createAwcpMcpServer(options = {}) {
|
|
|
33
33
|
const daemonUrl = options.daemonUrl ?? 'http://localhost:3100';
|
|
34
34
|
const timeout = options.timeout ?? 30000;
|
|
35
35
|
const defaultTtl = options.defaultTtl ?? 3600;
|
|
36
|
+
const peers = options.peers;
|
|
36
37
|
const client = new DelegatorDaemonClient(daemonUrl, { timeout });
|
|
37
38
|
const server = new McpServer({
|
|
38
39
|
name: 'awcp',
|
|
@@ -41,7 +42,7 @@ export function createAwcpMcpServer(options = {}) {
|
|
|
41
42
|
// ============================================
|
|
42
43
|
// Tool: delegate
|
|
43
44
|
// ============================================
|
|
44
|
-
server.tool('delegate',
|
|
45
|
+
server.tool('delegate', generateDelegateDescription(peers), delegateSchema.shape, async (params) => {
|
|
45
46
|
const { description, prompt, workspace_dir, peer_url, ttl_seconds, access_mode, background, } = params;
|
|
46
47
|
try {
|
|
47
48
|
const result = await client.delegate({
|
|
@@ -230,3 +231,4 @@ function formatDelegationStatus(delegation) {
|
|
|
230
231
|
return lines.join('\n');
|
|
231
232
|
}
|
|
232
233
|
export { DelegatorDaemonClient } from '@awcp/sdk/delegator/client';
|
|
234
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,EACL,cAAc,EACd,2BAA2B,GAE5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAE1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAE1B,MAAM,4BAA4B,CAAC;AAcpC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAgC,EAAE;IACpE,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,uBAAuB,CAAC;IAC/D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC;IACzC,MAAM,UAAU,GAAG,OAAO,CAA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AC,OAAO,CAAC,CAAC;QAC1D,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;SAAM,IAAI,UAAU,CAAC,KAAK,KAAK,WAAW,EAAE,CAAC;QAC5C,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,2BAA2B,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* delegate_cancel tool - Cancel
|
|
3
|
-
*
|
|
4
|
-
* This will terminate the delegation, unmount the remote filesystem,
|
|
5
|
-
* revoke credentials, and clean up resources.
|
|
2
|
+
* delegate_cancel tool - Cancel background delegations
|
|
6
3
|
*/
|
|
7
4
|
import { z } from 'zod';
|
|
8
5
|
export declare const delegateCancelSchema: z.ZodObject<{
|
|
@@ -16,5 +13,5 @@ export declare const delegateCancelSchema: z.ZodObject<{
|
|
|
16
13
|
all?: boolean | undefined;
|
|
17
14
|
}>;
|
|
18
15
|
export type DelegateCancelParams = z.infer<typeof delegateCancelSchema>;
|
|
19
|
-
export declare const delegateCancelDescription
|
|
16
|
+
export declare const delegateCancelDescription: string;
|
|
20
17
|
//# sourceMappingURL=delegate-cancel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegate-cancel.d.ts","sourceRoot":"","sources":["../../src/tools/delegate-cancel.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"delegate-cancel.d.ts","sourceRoot":"","sources":["../../src/tools/delegate-cancel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,oBAAoB;;;;;;;;;EAS/B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,eAAO,MAAM,yBAAyB,QAGrC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* delegate_cancel tool - Cancel
|
|
3
|
-
*
|
|
4
|
-
* This will terminate the delegation, unmount the remote filesystem,
|
|
5
|
-
* revoke credentials, and clean up resources.
|
|
2
|
+
* delegate_cancel tool - Cancel background delegations
|
|
6
3
|
*/
|
|
7
4
|
import { z } from 'zod';
|
|
5
|
+
import { readFileSync } from 'node:fs';
|
|
6
|
+
import { dirname, join } from 'node:path';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
9
|
export const delegateCancelSchema = z.object({
|
|
9
10
|
delegation_id: z
|
|
10
11
|
.string()
|
|
@@ -13,26 +14,7 @@ export const delegateCancelSchema = z.object({
|
|
|
13
14
|
all: z
|
|
14
15
|
.boolean()
|
|
15
16
|
.optional()
|
|
16
|
-
.describe('Cancel all
|
|
17
|
+
.describe('Cancel all running delegations'),
|
|
17
18
|
});
|
|
18
|
-
export const delegateCancelDescription =
|
|
19
|
-
|
|
20
|
-
## Parameters
|
|
21
|
-
- **delegation_id** (optional): Specific delegation ID to cancel
|
|
22
|
-
- **all** (optional): Cancel all active delegations
|
|
23
|
-
|
|
24
|
-
## Usage
|
|
25
|
-
Cancel a specific delegation:
|
|
26
|
-
\`\`\`
|
|
27
|
-
delegate_cancel(delegation_id: "dlg_abc123")
|
|
28
|
-
\`\`\`
|
|
29
|
-
|
|
30
|
-
Cancel all active delegations:
|
|
31
|
-
\`\`\`
|
|
32
|
-
delegate_cancel(all: true)
|
|
33
|
-
\`\`\`
|
|
34
|
-
|
|
35
|
-
## Notes
|
|
36
|
-
- Cancellation triggers cleanup: unmount, credential revocation, export removal
|
|
37
|
-
- The Executor will receive a cancellation signal
|
|
38
|
-
`;
|
|
19
|
+
export const delegateCancelDescription = readFileSync(join(__dirname, 'delegate-cancel.txt'), 'utf-8');
|
|
20
|
+
//# sourceMappingURL=delegate-cancel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delegate-cancel.js","sourceRoot":"","sources":["../../src/tools/delegate-cancel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,kCAAkC,CAAC;IAC/C,GAAG,EAAE,CAAC;SACH,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,gCAAgC,CAAC;CAC9C,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,yBAAyB,GAAG,YAAY,CACnD,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,EACtC,OAAO,CACR,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Cancel background delegations.
|
|
2
|
+
|
|
3
|
+
## Parameters
|
|
4
|
+
- **delegation_id** (optional): Specific delegation ID to cancel
|
|
5
|
+
- **all** (optional): Cancel all running delegations
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
Cancel a specific delegation:
|
|
9
|
+
```
|
|
10
|
+
delegate_cancel(delegation_id: "dlg_abc123")
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Cancel all running delegations:
|
|
14
|
+
```
|
|
15
|
+
delegate_cancel(all: true)
|
|
16
|
+
```
|
|
@@ -18,5 +18,5 @@ export declare const delegateOutputSchema: z.ZodObject<{
|
|
|
18
18
|
timeout?: number | undefined;
|
|
19
19
|
}>;
|
|
20
20
|
export type DelegateOutputParams = z.infer<typeof delegateOutputSchema>;
|
|
21
|
-
export declare const delegateOutputDescription
|
|
21
|
+
export declare const delegateOutputDescription: string;
|
|
22
22
|
//# sourceMappingURL=delegate-output.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delegate-output.d.ts","sourceRoot":"","sources":["../../src/tools/delegate-output.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"delegate-output.d.ts","sourceRoot":"","sources":["../../src/tools/delegate-output.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAc/B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,eAAO,MAAM,yBAAyB,QAGrC,CAAC"}
|