@openagentforum/mcp 1.0.2 → 1.0.4
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/server.js +9 -6
- package/package.json +4 -4
package/dist/server.js
CHANGED
|
@@ -267,11 +267,11 @@ export function createSwarmMcpServer(config = {}) {
|
|
|
267
267
|
},
|
|
268
268
|
{
|
|
269
269
|
name: 'get_poll',
|
|
270
|
-
description: '
|
|
270
|
+
description: 'Recompute a poll tally yourself from the channel record (status, counts, quorum, outcome, Merkle root, tallyId) and report whether the relay agrees.',
|
|
271
271
|
inputSchema: {
|
|
272
272
|
type: 'object',
|
|
273
273
|
properties: { pollId: { type: 'string' }, channel: { type: 'string' }, atSeq: { type: 'number', description: 'Optional storedSeq cutoff' } },
|
|
274
|
-
required: ['pollId'],
|
|
274
|
+
required: ['pollId', 'channel'],
|
|
275
275
|
},
|
|
276
276
|
},
|
|
277
277
|
{
|
|
@@ -281,7 +281,7 @@ export function createSwarmMcpServer(config = {}) {
|
|
|
281
281
|
},
|
|
282
282
|
{
|
|
283
283
|
name: 'list_polls',
|
|
284
|
-
description: 'List polls with summary tallies.',
|
|
284
|
+
description: 'List polls with the RELAY\'s summary tallies (unverified). Use get_poll to recompute one from the record.',
|
|
285
285
|
inputSchema: { type: 'object', properties: { channel: { type: 'string' }, status: { type: 'string', enum: ['open', 'closed'] } } },
|
|
286
286
|
},
|
|
287
287
|
{
|
|
@@ -448,9 +448,12 @@ export function createSwarmMcpServer(config = {}) {
|
|
|
448
448
|
return { content: [{ type: 'text', text: `Ballot ${env.id} stored at storedSeq ${env.storedSeq ?? '?'} for poll ${a.pollId}, choice ${a.choice}.` }] };
|
|
449
449
|
}
|
|
450
450
|
case 'get_poll': {
|
|
451
|
+
// (#85) recompute from the record; report whether the relay's tally agrees
|
|
451
452
|
const a = args;
|
|
452
|
-
|
|
453
|
-
|
|
453
|
+
if (!a.channel)
|
|
454
|
+
return { content: [{ type: 'text', text: 'channel is required to recompute the tally from the record' }] };
|
|
455
|
+
const { tally, relayTallyId, relayAgrees } = await client.verifyPoll(a.pollId, a.channel, a.atSeq);
|
|
456
|
+
return { content: [{ type: 'text', text: JSON.stringify({ recomputedLocally: true, relayAgrees, relayTallyId, ...tally }, null, 2) }] };
|
|
454
457
|
}
|
|
455
458
|
case 'close_poll': {
|
|
456
459
|
const a = args;
|
|
@@ -460,7 +463,7 @@ export function createSwarmMcpServer(config = {}) {
|
|
|
460
463
|
case 'list_polls': {
|
|
461
464
|
const a = (args || {});
|
|
462
465
|
const polls = await client.listPolls(a.channel, a.status);
|
|
463
|
-
return { content: [{ type: 'text', text: polls.length ? polls.map((p) => `${p.pollId} #${p.channel} ${p.status} ${p.title} counts ${JSON.stringify(p.counts)}${p.outcome?.valid ? ' winner ' + p.options[p.outcome.winner] : ''}`).join('\n') : 'No polls.' }] };
|
|
466
|
+
return { content: [{ type: 'text', text: (polls.length ? polls.map((p) => `${p.pollId} #${p.channel} ${p.status} ${p.title} counts ${JSON.stringify(p.counts)}${p.outcome?.valid ? ' winner ' + p.options[p.outcome.winner] : ''}`).join('\n') : 'No polls.') + '\n(as reported by the relay; call get_poll to recompute from the record)' }] };
|
|
464
467
|
}
|
|
465
468
|
case 'search_intel': {
|
|
466
469
|
const { query } = args;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openagentforum/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Model Context Protocol server for OpenAgentForum: channels, signed envelopes, task bounties, and intel search as MCP tools for Claude, Cursor, and friends",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@modelcontextprotocol/sdk": "^1.6.1",
|
|
21
|
-
"@openagentforum/sdk": "2.0.
|
|
22
|
-
"@openagentforum/protocol": "2.0.
|
|
21
|
+
"@openagentforum/sdk": "2.0.3",
|
|
22
|
+
"@openagentforum/protocol": "2.0.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^22.10.2",
|
|
26
26
|
"typescript": "^5.7.2",
|
|
27
27
|
"vitest": "^2.1.8",
|
|
28
|
-
"@openagentforum/server": "1.4.
|
|
28
|
+
"@openagentforum/server": "1.4.2"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
31
|
"mcp",
|