@agledger/mcp-server 1.5.0 → 2.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.
Files changed (162) hide show
  1. package/dist/api-client.d.ts +16 -0
  2. package/dist/api-client.d.ts.map +1 -0
  3. package/dist/api-client.js +52 -0
  4. package/dist/api-client.js.map +1 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +17 -58
  7. package/dist/index.js.map +1 -1
  8. package/dist/server.d.ts +2 -13
  9. package/dist/server.d.ts.map +1 -1
  10. package/dist/server.js +113 -109
  11. package/dist/server.js.map +1 -1
  12. package/package.json +2 -3
  13. package/src/api-client.ts +72 -0
  14. package/src/index.ts +27 -60
  15. package/src/server.ts +136 -120
  16. package/tests/api-client.test.ts +147 -0
  17. package/tests/harness.ts +8 -35
  18. package/tests/integration.test.ts +373 -0
  19. package/tests/server.test.ts +286 -0
  20. package/dist/enums.d.ts +0 -110
  21. package/dist/enums.d.ts.map +0 -1
  22. package/dist/enums.js +0 -42
  23. package/dist/enums.js.map +0 -1
  24. package/dist/errors.d.ts +0 -10
  25. package/dist/errors.d.ts.map +0 -1
  26. package/dist/errors.js +0 -49
  27. package/dist/errors.js.map +0 -1
  28. package/dist/resources/contract-types.d.ts +0 -4
  29. package/dist/resources/contract-types.d.ts.map +0 -1
  30. package/dist/resources/contract-types.js +0 -104
  31. package/dist/resources/contract-types.js.map +0 -1
  32. package/dist/tool-scopes.d.ts +0 -11
  33. package/dist/tool-scopes.d.ts.map +0 -1
  34. package/dist/tool-scopes.js +0 -164
  35. package/dist/tool-scopes.js.map +0 -1
  36. package/dist/tools/a2a.d.ts +0 -8
  37. package/dist/tools/a2a.d.ts.map +0 -1
  38. package/dist/tools/a2a.js +0 -360
  39. package/dist/tools/a2a.js.map +0 -1
  40. package/dist/tools/agent-mandates.d.ts +0 -4
  41. package/dist/tools/agent-mandates.d.ts.map +0 -1
  42. package/dist/tools/agent-mandates.js +0 -222
  43. package/dist/tools/agent-mandates.js.map +0 -1
  44. package/dist/tools/agents-refs.d.ts +0 -4
  45. package/dist/tools/agents-refs.d.ts.map +0 -1
  46. package/dist/tools/agents-refs.js +0 -196
  47. package/dist/tools/agents-refs.js.map +0 -1
  48. package/dist/tools/capabilities.d.ts +0 -4
  49. package/dist/tools/capabilities.d.ts.map +0 -1
  50. package/dist/tools/capabilities.js +0 -54
  51. package/dist/tools/capabilities.js.map +0 -1
  52. package/dist/tools/code-mode.d.ts +0 -4
  53. package/dist/tools/code-mode.d.ts.map +0 -1
  54. package/dist/tools/code-mode.js +0 -389
  55. package/dist/tools/code-mode.js.map +0 -1
  56. package/dist/tools/compliance.d.ts +0 -4
  57. package/dist/tools/compliance.d.ts.map +0 -1
  58. package/dist/tools/compliance.js +0 -63
  59. package/dist/tools/compliance.js.map +0 -1
  60. package/dist/tools/dashboard.d.ts +0 -4
  61. package/dist/tools/dashboard.d.ts.map +0 -1
  62. package/dist/tools/dashboard.js +0 -57
  63. package/dist/tools/dashboard.js.map +0 -1
  64. package/dist/tools/disputes.d.ts +0 -4
  65. package/dist/tools/disputes.d.ts.map +0 -1
  66. package/dist/tools/disputes.js +0 -103
  67. package/dist/tools/disputes.js.map +0 -1
  68. package/dist/tools/enterprises.d.ts +0 -4
  69. package/dist/tools/enterprises.d.ts.map +0 -1
  70. package/dist/tools/enterprises.js +0 -173
  71. package/dist/tools/enterprises.js.map +0 -1
  72. package/dist/tools/events.d.ts +0 -4
  73. package/dist/tools/events.d.ts.map +0 -1
  74. package/dist/tools/events.js +0 -28
  75. package/dist/tools/events.js.map +0 -1
  76. package/dist/tools/federation-admin.d.ts +0 -4
  77. package/dist/tools/federation-admin.d.ts.map +0 -1
  78. package/dist/tools/federation-admin.js +0 -567
  79. package/dist/tools/federation-admin.js.map +0 -1
  80. package/dist/tools/federation.d.ts +0 -4
  81. package/dist/tools/federation.d.ts.map +0 -1
  82. package/dist/tools/federation.js +0 -505
  83. package/dist/tools/federation.js.map +0 -1
  84. package/dist/tools/health.d.ts +0 -4
  85. package/dist/tools/health.d.ts.map +0 -1
  86. package/dist/tools/health.js +0 -25
  87. package/dist/tools/health.js.map +0 -1
  88. package/dist/tools/mandates.d.ts +0 -4
  89. package/dist/tools/mandates.d.ts.map +0 -1
  90. package/dist/tools/mandates.js +0 -227
  91. package/dist/tools/mandates.js.map +0 -1
  92. package/dist/tools/openclaw.d.ts +0 -4
  93. package/dist/tools/openclaw.d.ts.map +0 -1
  94. package/dist/tools/openclaw.js +0 -110
  95. package/dist/tools/openclaw.js.map +0 -1
  96. package/dist/tools/receipts.d.ts +0 -8
  97. package/dist/tools/receipts.d.ts.map +0 -1
  98. package/dist/tools/receipts.js +0 -111
  99. package/dist/tools/receipts.js.map +0 -1
  100. package/dist/tools/reputation.d.ts +0 -4
  101. package/dist/tools/reputation.d.ts.map +0 -1
  102. package/dist/tools/reputation.js +0 -62
  103. package/dist/tools/reputation.js.map +0 -1
  104. package/dist/tools/schemas.d.ts +0 -4
  105. package/dist/tools/schemas.d.ts.map +0 -1
  106. package/dist/tools/schemas.js +0 -453
  107. package/dist/tools/schemas.js.map +0 -1
  108. package/dist/tools/verification-keys.d.ts +0 -4
  109. package/dist/tools/verification-keys.d.ts.map +0 -1
  110. package/dist/tools/verification-keys.js +0 -27
  111. package/dist/tools/verification-keys.js.map +0 -1
  112. package/dist/tools/verification.d.ts +0 -4
  113. package/dist/tools/verification.d.ts.map +0 -1
  114. package/dist/tools/verification.js +0 -50
  115. package/dist/tools/verification.js.map +0 -1
  116. package/src/enums.ts +0 -47
  117. package/src/errors.ts +0 -44
  118. package/src/resources/contract-types.ts +0 -130
  119. package/src/tool-scopes.ts +0 -180
  120. package/src/tools/a2a.ts +0 -430
  121. package/src/tools/agent-mandates.ts +0 -259
  122. package/src/tools/agents-refs.ts +0 -232
  123. package/src/tools/capabilities.ts +0 -63
  124. package/src/tools/compliance.ts +0 -70
  125. package/src/tools/dashboard.ts +0 -64
  126. package/src/tools/disputes.ts +0 -121
  127. package/src/tools/enterprises.ts +0 -203
  128. package/src/tools/events.ts +0 -33
  129. package/src/tools/federation-admin.ts +0 -665
  130. package/src/tools/federation.ts +0 -587
  131. package/src/tools/health.ts +0 -30
  132. package/src/tools/mandates.ts +0 -264
  133. package/src/tools/openclaw.ts +0 -122
  134. package/src/tools/receipts.ts +0 -134
  135. package/src/tools/reputation.ts +0 -69
  136. package/src/tools/schemas.ts +0 -535
  137. package/src/tools/verification-keys.ts +0 -33
  138. package/src/tools/verification.ts +0 -59
  139. package/tests/conformance.test.ts +0 -197
  140. package/tests/conformance.ts +0 -65
  141. package/tests/mock-client.ts +0 -71
  142. package/tests/profiles.test.ts +0 -120
  143. package/tests/resources/contract-types.test.ts +0 -82
  144. package/tests/tools/a2a.test.ts +0 -213
  145. package/tests/tools/agent-mandates.test.ts +0 -196
  146. package/tests/tools/agents-refs.test.ts +0 -190
  147. package/tests/tools/capabilities.test.ts +0 -80
  148. package/tests/tools/compliance.test.ts +0 -123
  149. package/tests/tools/dashboard.test.ts +0 -111
  150. package/tests/tools/disputes.test.ts +0 -123
  151. package/tests/tools/enterprises.test.ts +0 -171
  152. package/tests/tools/events.test.ts +0 -56
  153. package/tests/tools/federation-admin.test.ts +0 -468
  154. package/tests/tools/federation.test.ts +0 -522
  155. package/tests/tools/health.test.ts +0 -56
  156. package/tests/tools/mandates.test.ts +0 -143
  157. package/tests/tools/openclaw.test.ts +0 -148
  158. package/tests/tools/receipts.test.ts +0 -157
  159. package/tests/tools/reputation.test.ts +0 -108
  160. package/tests/tools/schemas.test.ts +0 -374
  161. package/tests/tools/verification-keys.test.ts +0 -56
  162. package/tests/tools/verification.test.ts +0 -64
@@ -1,567 +0,0 @@
1
- import { z } from 'zod';
2
- import { apiErrorResult, toStructuredContent } from '../errors.js';
3
- import { toolMeta } from '../tool-scopes.js';
4
- import { HubStateEnum, GatewayStatusEnum } from '../enums.js';
5
- export function registerFederationAdminTools(mcp, client) {
6
- mcp.registerTool('federation_create_token', {
7
- title: 'Create Federation Registration Token',
8
- description: 'Create a registration token that a gateway can use to join the federation. Optionally restrict to specific contract types or set an expiry.',
9
- inputSchema: {
10
- label: z.string().optional().describe('Human-readable label for the token'),
11
- expiresInHours: z.number().optional().describe('Hours until the token expires'),
12
- allowedContractTypes: z.array(z.string()).optional().describe('Contract types this token permits'),
13
- },
14
- annotations: {
15
- readOnlyHint: false,
16
- destructiveHint: false,
17
- idempotentHint: false,
18
- openWorldHint: true,
19
- },
20
- _meta: toolMeta('federation_create_token'),
21
- }, async (args) => {
22
- try {
23
- const result = await client.federationAdmin.createRegistrationToken({
24
- label: args.label,
25
- expiresInHours: args.expiresInHours,
26
- allowedContractTypes: args.allowedContractTypes,
27
- });
28
- return { content: [], structuredContent: toStructuredContent(result) };
29
- }
30
- catch (err) {
31
- return apiErrorResult(err);
32
- }
33
- });
34
- mcp.registerTool('federation_list_gateways', {
35
- title: 'List Federation Gateways',
36
- description: 'List federation gateways with optional status filter and pagination.',
37
- inputSchema: {
38
- status: GatewayStatusEnum.optional().describe('Filter gateways by status'),
39
- limit: z.number().optional().describe('Maximum number of results to return'),
40
- offset: z.number().optional().describe('Number of results to skip for pagination'),
41
- },
42
- annotations: {
43
- readOnlyHint: true,
44
- destructiveHint: false,
45
- idempotentHint: true,
46
- openWorldHint: true,
47
- },
48
- _meta: toolMeta('federation_list_gateways'),
49
- }, async (args) => {
50
- try {
51
- const result = await client.federationAdmin.listGateways({
52
- status: args.status,
53
- limit: args.limit,
54
- offset: args.offset,
55
- });
56
- return { content: [], structuredContent: toStructuredContent(result) };
57
- }
58
- catch (err) {
59
- return apiErrorResult(err);
60
- }
61
- });
62
- mcp.registerTool('federation_admin_revoke', {
63
- title: 'Revoke Federation Gateway',
64
- description: 'Permanently revoke a federation gateway. This is destructive and cannot be undone. Requires a reason for the audit trail.',
65
- inputSchema: {
66
- gatewayId: z.string().describe('UUID of the gateway to revoke'),
67
- reason: z.string().describe('Reason for revocation (recorded in audit log)'),
68
- },
69
- annotations: {
70
- readOnlyHint: false,
71
- destructiveHint: true,
72
- idempotentHint: false,
73
- openWorldHint: true,
74
- },
75
- _meta: toolMeta('federation_admin_revoke'),
76
- }, async (args) => {
77
- try {
78
- const result = await client.federationAdmin.revokeGateway(args.gatewayId, { reason: args.reason });
79
- return { content: [], structuredContent: toStructuredContent(result) };
80
- }
81
- catch (err) {
82
- return apiErrorResult(err);
83
- }
84
- });
85
- mcp.registerTool('federation_query_mandates', {
86
- title: 'Query Federation Mandates',
87
- description: 'Query federation mandates with optional filters by gateway, hub state, and contract type.',
88
- inputSchema: {
89
- gatewayId: z.string().optional().describe('Filter by originating gateway UUID'),
90
- hubState: HubStateEnum.optional().describe('Filter by hub-side mandate state'),
91
- contractType: z.string().optional().describe('Filter by contract type identifier'),
92
- limit: z.number().optional().describe('Maximum number of results to return'),
93
- offset: z.number().optional().describe('Number of results to skip for pagination'),
94
- },
95
- annotations: {
96
- readOnlyHint: true,
97
- destructiveHint: false,
98
- idempotentHint: true,
99
- openWorldHint: true,
100
- },
101
- _meta: toolMeta('federation_query_mandates'),
102
- }, async (args) => {
103
- try {
104
- const result = await client.federationAdmin.queryMandates({
105
- gatewayId: args.gatewayId,
106
- hubState: args.hubState,
107
- contractType: args.contractType,
108
- limit: args.limit,
109
- offset: args.offset,
110
- });
111
- return { content: [], structuredContent: toStructuredContent(result) };
112
- }
113
- catch (err) {
114
- return apiErrorResult(err);
115
- }
116
- });
117
- mcp.registerTool('federation_audit_log', {
118
- title: 'Get Federation Audit Log',
119
- description: 'Retrieve the federation audit log. Filter by gateway, entry type, or mandate.',
120
- inputSchema: {
121
- gatewayId: z.string().optional().describe('Filter by gateway UUID'),
122
- entryType: z.string().optional().describe('Filter by audit entry type'),
123
- mandateId: z.string().optional().describe('Filter by associated mandate UUID'),
124
- limit: z.number().optional().describe('Maximum number of results to return'),
125
- offset: z.number().optional().describe('Number of results to skip for pagination'),
126
- },
127
- annotations: {
128
- readOnlyHint: true,
129
- destructiveHint: false,
130
- idempotentHint: true,
131
- openWorldHint: true,
132
- },
133
- _meta: toolMeta('federation_audit_log'),
134
- }, async (args) => {
135
- try {
136
- const result = await client.federationAdmin.getAuditLog({
137
- gatewayId: args.gatewayId,
138
- entryType: args.entryType,
139
- mandateId: args.mandateId,
140
- limit: args.limit,
141
- offset: args.offset,
142
- });
143
- return { content: [], structuredContent: toStructuredContent(result) };
144
- }
145
- catch (err) {
146
- return apiErrorResult(err);
147
- }
148
- });
149
- mcp.registerTool('federation_health', {
150
- title: 'Federation Health Summary',
151
- description: 'Get the overall federation health summary, including active gateway count, pending mandates, and DLQ depth.',
152
- inputSchema: {},
153
- annotations: {
154
- readOnlyHint: true,
155
- destructiveHint: false,
156
- idempotentHint: true,
157
- openWorldHint: true,
158
- },
159
- _meta: toolMeta('federation_health'),
160
- }, async () => {
161
- try {
162
- const result = await client.federationAdmin.getHealth();
163
- return { content: [], structuredContent: toStructuredContent(result) };
164
- }
165
- catch (err) {
166
- return apiErrorResult(err);
167
- }
168
- });
169
- mcp.registerTool('federation_reset_sequence', {
170
- title: 'Reset Gateway Sequence',
171
- description: 'Reset the sequence number for a federation gateway. This is destructive — use only to recover from sequence drift.',
172
- inputSchema: {
173
- gatewayId: z.string().describe('UUID of the gateway whose sequence to reset'),
174
- newSeq: z.number().optional().describe('New sequence number (defaults to server-determined value if omitted)'),
175
- },
176
- annotations: {
177
- readOnlyHint: false,
178
- destructiveHint: true,
179
- idempotentHint: false,
180
- openWorldHint: true,
181
- },
182
- _meta: toolMeta('federation_reset_sequence'),
183
- }, async (args) => {
184
- try {
185
- const result = await client.federationAdmin.resetSequence(args.gatewayId, { newSeq: args.newSeq });
186
- return { content: [], structuredContent: toStructuredContent(result) };
187
- }
188
- catch (err) {
189
- return apiErrorResult(err);
190
- }
191
- });
192
- mcp.registerTool('federation_list_dlq', {
193
- title: 'List DLQ Entries',
194
- description: 'List entries in the federation dead letter queue. Use cursor-based pagination for large queues.',
195
- inputSchema: {
196
- limit: z.number().optional().describe('Maximum number of results to return'),
197
- cursor: z.string().optional().describe('Cursor for the next page of results'),
198
- },
199
- annotations: {
200
- readOnlyHint: true,
201
- destructiveHint: false,
202
- idempotentHint: true,
203
- openWorldHint: true,
204
- },
205
- _meta: toolMeta('federation_list_dlq'),
206
- }, async (args) => {
207
- try {
208
- const result = await client.federationAdmin.listDlq({
209
- limit: args.limit,
210
- cursor: args.cursor,
211
- });
212
- return { content: [], structuredContent: toStructuredContent(result) };
213
- }
214
- catch (err) {
215
- return apiErrorResult(err);
216
- }
217
- });
218
- mcp.registerTool('federation_retry_dlq', {
219
- title: 'Retry DLQ Entry',
220
- description: 'Retry processing a dead letter queue entry. Safe to call multiple times — idempotent.',
221
- inputSchema: {
222
- dlqId: z.string().describe('UUID of the DLQ entry to retry'),
223
- },
224
- annotations: {
225
- readOnlyHint: false,
226
- destructiveHint: false,
227
- idempotentHint: true,
228
- openWorldHint: true,
229
- },
230
- _meta: toolMeta('federation_retry_dlq'),
231
- }, async (args) => {
232
- try {
233
- const result = await client.federationAdmin.retryDlq(args.dlqId);
234
- return { content: [], structuredContent: toStructuredContent(result) };
235
- }
236
- catch (err) {
237
- return apiErrorResult(err);
238
- }
239
- });
240
- mcp.registerTool('federation_delete_dlq', {
241
- title: 'Delete DLQ Entry',
242
- description: 'Permanently delete a dead letter queue entry. This is destructive and cannot be undone.',
243
- inputSchema: {
244
- dlqId: z.string().describe('UUID of the DLQ entry to delete'),
245
- },
246
- annotations: {
247
- readOnlyHint: false,
248
- destructiveHint: true,
249
- idempotentHint: false,
250
- openWorldHint: true,
251
- },
252
- _meta: toolMeta('federation_delete_dlq'),
253
- }, async (args) => {
254
- try {
255
- const result = await client.federationAdmin.deleteDlq(args.dlqId);
256
- return { content: [], structuredContent: toStructuredContent(result) };
257
- }
258
- catch (err) {
259
- return apiErrorResult(err);
260
- }
261
- });
262
- mcp.registerTool('federation_rotate_hub_key', {
263
- title: 'Rotate Hub Signing Key',
264
- description: 'Rotate the federation hub signing key. This is destructive — generates a new key pair and transitions gateways to use it. Old key remains valid until explicitly expired via federation_expire_hub_key.',
265
- inputSchema: {},
266
- annotations: {
267
- readOnlyHint: false,
268
- destructiveHint: true,
269
- idempotentHint: false,
270
- openWorldHint: true,
271
- },
272
- _meta: toolMeta('federation_rotate_hub_key'),
273
- }, async () => {
274
- try {
275
- const result = await client.federationAdmin.rotateHubKey();
276
- return { content: [], structuredContent: toStructuredContent(result) };
277
- }
278
- catch (err) {
279
- return apiErrorResult(err);
280
- }
281
- });
282
- mcp.registerTool('federation_list_hub_keys', {
283
- title: 'List Hub Signing Keys',
284
- description: 'List all hub signing keys including active, pending, and expired keys. Use this to audit key rotation history and identify which key is currently active.',
285
- inputSchema: {},
286
- annotations: {
287
- readOnlyHint: true,
288
- destructiveHint: false,
289
- idempotentHint: true,
290
- openWorldHint: true,
291
- },
292
- _meta: toolMeta('federation_list_hub_keys'),
293
- }, async () => {
294
- try {
295
- const result = await client.federationAdmin.listHubKeys();
296
- return { content: [], structuredContent: toStructuredContent({ keys: result }) };
297
- }
298
- catch (err) {
299
- return apiErrorResult(err);
300
- }
301
- });
302
- mcp.registerTool('federation_activate_hub_key', {
303
- title: 'Activate Hub Signing Key',
304
- description: 'Activate a pending hub signing key. After rotating, the new key must be explicitly activated. Only one key can be active at a time.',
305
- inputSchema: {
306
- keyId: z.string().describe('UUID of the hub key to activate'),
307
- },
308
- annotations: {
309
- readOnlyHint: false,
310
- destructiveHint: false,
311
- idempotentHint: true,
312
- openWorldHint: true,
313
- },
314
- _meta: toolMeta('federation_activate_hub_key'),
315
- }, async (args) => {
316
- try {
317
- const result = await client.federationAdmin.activateHubKey(args.keyId);
318
- return { content: [], structuredContent: toStructuredContent(result) };
319
- }
320
- catch (err) {
321
- return apiErrorResult(err);
322
- }
323
- });
324
- mcp.registerTool('federation_expire_hub_key', {
325
- title: 'Expire Hub Signing Key',
326
- description: 'Expire a hub signing key so it is no longer accepted for verification. Use after rotating and activating a new key to retire the old one.',
327
- inputSchema: {
328
- keyId: z.string().describe('UUID of the hub key to expire'),
329
- },
330
- annotations: {
331
- readOnlyHint: false,
332
- destructiveHint: false,
333
- idempotentHint: true,
334
- openWorldHint: true,
335
- },
336
- _meta: toolMeta('federation_expire_hub_key'),
337
- }, async (args) => {
338
- try {
339
- const result = await client.federationAdmin.expireHubKey(args.keyId);
340
- return { content: [], structuredContent: toStructuredContent(result) };
341
- }
342
- catch (err) {
343
- return apiErrorResult(err);
344
- }
345
- });
346
- mcp.registerTool('federation_register_peer', {
347
- title: 'Register Peer Hub',
348
- description: 'Register a peer federation hub for cross-hub communication. Requires a peering token from the peer hub. After registration, use federation_resync_peer to synchronize state.',
349
- inputSchema: {
350
- name: z.string().describe('Human-readable name for the peer hub'),
351
- endpoint: z.string().describe('Peer hub API endpoint URL'),
352
- publicKey: z.string().describe('Peer hub Ed25519 public key (base64)'),
353
- peeringToken: z.string().describe('One-time peering token from the peer hub'),
354
- },
355
- annotations: {
356
- readOnlyHint: false,
357
- destructiveHint: false,
358
- idempotentHint: false,
359
- openWorldHint: true,
360
- },
361
- _meta: toolMeta('federation_register_peer'),
362
- }, async (args) => {
363
- try {
364
- const result = await client.federationAdmin.registerPeer(args);
365
- return { content: [], structuredContent: toStructuredContent(result) };
366
- }
367
- catch (err) {
368
- return apiErrorResult(err);
369
- }
370
- });
371
- mcp.registerTool('federation_list_peers', {
372
- title: 'List Peer Hubs',
373
- description: 'List all registered peer federation hubs. Shows connection status and last sync timestamp for each peer.',
374
- inputSchema: {},
375
- annotations: {
376
- readOnlyHint: true,
377
- destructiveHint: false,
378
- idempotentHint: true,
379
- openWorldHint: true,
380
- },
381
- _meta: toolMeta('federation_list_peers'),
382
- }, async () => {
383
- try {
384
- const result = await client.federationAdmin.listPeers();
385
- return { content: [], structuredContent: toStructuredContent(result) };
386
- }
387
- catch (err) {
388
- return apiErrorResult(err);
389
- }
390
- });
391
- mcp.registerTool('federation_get_peer', {
392
- title: 'Get Peer Hub Details',
393
- description: 'Get details for a specific peer federation hub, including connection status, last sync, and supported contract types.',
394
- inputSchema: {
395
- hubId: z.string().describe('Peer hub UUID'),
396
- },
397
- annotations: {
398
- readOnlyHint: true,
399
- destructiveHint: false,
400
- idempotentHint: true,
401
- openWorldHint: true,
402
- },
403
- _meta: toolMeta('federation_get_peer'),
404
- }, async (args) => {
405
- try {
406
- const result = await client.federationAdmin.getPeer(args.hubId);
407
- return { content: [], structuredContent: toStructuredContent(result) };
408
- }
409
- catch (err) {
410
- return apiErrorResult(err);
411
- }
412
- });
413
- mcp.registerTool('federation_revoke_peer', {
414
- title: 'Revoke Peer Hub',
415
- description: 'Permanently revoke a peer federation hub. This is destructive — the peer will no longer be able to communicate with this hub. Use only for compromised or decommissioned peers.',
416
- inputSchema: {
417
- hubId: z.string().describe('Peer hub UUID to revoke'),
418
- },
419
- annotations: {
420
- readOnlyHint: false,
421
- destructiveHint: true,
422
- idempotentHint: false,
423
- openWorldHint: true,
424
- },
425
- _meta: toolMeta('federation_revoke_peer'),
426
- }, async (args) => {
427
- try {
428
- const result = await client.federationAdmin.revokePeer(args.hubId);
429
- return { content: [], structuredContent: toStructuredContent(result) };
430
- }
431
- catch (err) {
432
- return apiErrorResult(err);
433
- }
434
- });
435
- mcp.registerTool('federation_resync_peer', {
436
- title: 'Resync Peer Hub',
437
- description: 'Trigger a full state resynchronization with a peer hub. Use after registration or when state drift is suspected.',
438
- inputSchema: {
439
- hubId: z.string().describe('Peer hub UUID to resync'),
440
- },
441
- annotations: {
442
- readOnlyHint: false,
443
- destructiveHint: false,
444
- idempotentHint: true,
445
- openWorldHint: true,
446
- },
447
- _meta: toolMeta('federation_resync_peer'),
448
- }, async (args) => {
449
- try {
450
- const result = await client.federationAdmin.resyncPeer(args.hubId);
451
- return { content: [], structuredContent: toStructuredContent(result) };
452
- }
453
- catch (err) {
454
- return apiErrorResult(err);
455
- }
456
- });
457
- mcp.registerTool('federation_create_peering_token', {
458
- title: 'Create Peering Token',
459
- description: 'Create a one-time peering token that another hub can use to register as a peer. Share this token securely with the remote hub administrator.',
460
- inputSchema: {},
461
- annotations: {
462
- readOnlyHint: false,
463
- destructiveHint: false,
464
- idempotentHint: false,
465
- openWorldHint: true,
466
- },
467
- _meta: toolMeta('federation_create_peering_token'),
468
- }, async () => {
469
- try {
470
- const result = await client.federationAdmin.createPeeringToken();
471
- return { content: [], structuredContent: toStructuredContent(result) };
472
- }
473
- catch (err) {
474
- return apiErrorResult(err);
475
- }
476
- });
477
- mcp.registerTool('federation_delete_schema_version', {
478
- title: 'Delete Schema Version',
479
- description: 'Delete a specific version of a federated contract type schema. This is destructive — gateways using this version will need to upgrade. Use only for removing broken or deprecated schema versions.',
480
- inputSchema: {
481
- contractType: z.string().describe('Contract type identifier'),
482
- version: z.string().describe('Schema version to delete'),
483
- },
484
- annotations: {
485
- readOnlyHint: false,
486
- destructiveHint: true,
487
- idempotentHint: false,
488
- openWorldHint: true,
489
- },
490
- _meta: toolMeta('federation_delete_schema_version'),
491
- }, async (args) => {
492
- try {
493
- const result = await client.federationAdmin.deleteSchemaVersion(args.contractType, args.version);
494
- return { content: [], structuredContent: toStructuredContent(result) };
495
- }
496
- catch (err) {
497
- return apiErrorResult(err);
498
- }
499
- });
500
- mcp.registerTool('federation_list_reputation_contributions', {
501
- title: 'List Reputation Contributions',
502
- description: 'List all reputation contributions for a specific agent across all gateways. Use this to audit the data behind an agent\'s federated reputation score.',
503
- inputSchema: {
504
- agentId: z.string().describe('Federated agent ID'),
505
- },
506
- annotations: {
507
- readOnlyHint: true,
508
- destructiveHint: false,
509
- idempotentHint: true,
510
- openWorldHint: true,
511
- },
512
- _meta: toolMeta('federation_list_reputation_contributions'),
513
- }, async (args) => {
514
- try {
515
- const result = await client.federationAdmin.listReputationContributions(args.agentId);
516
- return { content: [], structuredContent: toStructuredContent({ contributions: result }) };
517
- }
518
- catch (err) {
519
- return apiErrorResult(err);
520
- }
521
- });
522
- mcp.registerTool('federation_reset_reputation', {
523
- title: 'Reset Agent Reputation',
524
- description: 'Reset the federated reputation for an agent. This is destructive — all historical reputation data is cleared. Use only for testing or when an agent identity is being recycled.',
525
- inputSchema: {
526
- agentId: z.string().describe('Federated agent ID whose reputation to reset'),
527
- },
528
- annotations: {
529
- readOnlyHint: false,
530
- destructiveHint: true,
531
- idempotentHint: false,
532
- openWorldHint: true,
533
- },
534
- _meta: toolMeta('federation_reset_reputation'),
535
- }, async (args) => {
536
- try {
537
- const result = await client.federationAdmin.resetReputation(args.agentId);
538
- return { content: [], structuredContent: toStructuredContent(result) };
539
- }
540
- catch (err) {
541
- return apiErrorResult(err);
542
- }
543
- });
544
- mcp.registerTool('federation_get_mandate_criteria_status', {
545
- title: 'Get Mandate Criteria Status',
546
- description: 'Get the status of cross-boundary criteria exchange for a federation mandate. Shows whether criteria have been submitted, acknowledged, and validated by both gateways.',
547
- inputSchema: {
548
- mandateId: z.string().describe('Federation mandate ID'),
549
- },
550
- annotations: {
551
- readOnlyHint: true,
552
- destructiveHint: false,
553
- idempotentHint: true,
554
- openWorldHint: true,
555
- },
556
- _meta: toolMeta('federation_get_mandate_criteria_status'),
557
- }, async (args) => {
558
- try {
559
- const result = await client.federationAdmin.getMandateCriteriaStatus(args.mandateId);
560
- return { content: [], structuredContent: toStructuredContent(result) };
561
- }
562
- catch (err) {
563
- return apiErrorResult(err);
564
- }
565
- });
566
- }
567
- //# sourceMappingURL=federation-admin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"federation-admin.js","sourceRoot":"","sources":["../../src/tools/federation-admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG9D,MAAM,UAAU,4BAA4B,CAAC,GAAc,EAAE,MAAsB;IACjF,GAAG,CAAC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AO,CAAC,CAAC;YAC1E,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC;QACzE,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC,CACF,CAAC;IAEF,GAAG,CAAC,YAAY,CACd,wCAAwC,EACxC;QACE,KAAK,EAAE,6BAA6B;QACpC,WAAW,EAAE,wKAAwK;QACrL,WAAW,EAAE;YACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;SACxD;QACD,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,KAAK,EAAE,QAAQ,CAAC,wCAAwC,CAAC;KAC1D,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,wBAAwB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACrF,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC;QACzE,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { AgledgerClient } from '@agledger/sdk';
3
- export declare function registerFederationTools(mcp: McpServer, client: AgledgerClient): void;
4
- //# sourceMappingURL=federation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"federation.d.ts","sourceRoot":"","sources":["../../src/tools/federation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAKpD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAmkBpF"}