@aura-payments/mcp-server 1.0.1 → 1.2.0
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/bin.js +593 -18
- package/dist/bin.mjs +593 -18
- package/dist/index.d.mts +77 -8
- package/dist/index.d.ts +77 -8
- package/dist/index.js +586 -18
- package/dist/index.mjs +579 -19
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -5,13 +5,58 @@ var sdk = require('@aura-payments/sdk');
|
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
|
|
7
7
|
// src/index.ts
|
|
8
|
+
|
|
9
|
+
// src/api-key.ts
|
|
10
|
+
var API_KEY_PREFIXES = [
|
|
11
|
+
"sk_test_",
|
|
12
|
+
"sk_live_",
|
|
13
|
+
"pk_test_",
|
|
14
|
+
"pk_live_"
|
|
15
|
+
];
|
|
16
|
+
function maskApiKey(apiKey) {
|
|
17
|
+
const revealed = Math.min(8, Math.floor(apiKey.length / 2));
|
|
18
|
+
return `${apiKey.slice(0, revealed)}\u2026(${apiKey.length} chars)`;
|
|
19
|
+
}
|
|
20
|
+
function parseApiKey(apiKey) {
|
|
21
|
+
if (!apiKey || apiKey.trim() === "") {
|
|
22
|
+
throw new MissingAuraApiKeyError();
|
|
23
|
+
}
|
|
24
|
+
const prefix = API_KEY_PREFIXES.find((p) => apiKey.startsWith(p));
|
|
25
|
+
if (!prefix) {
|
|
26
|
+
throw new MalformedAuraApiKeyError(apiKey);
|
|
27
|
+
}
|
|
28
|
+
return { prefix, mode: prefix.includes("_test_") ? "test" : "live" };
|
|
29
|
+
}
|
|
30
|
+
function resolveKeyMode(apiKey) {
|
|
31
|
+
try {
|
|
32
|
+
return parseApiKey(apiKey).mode;
|
|
33
|
+
} catch (err) {
|
|
34
|
+
return err instanceof MissingAuraApiKeyError ? "unconfigured" : "invalid";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
var MissingAuraApiKeyError = class extends Error {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(
|
|
40
|
+
'AURA_API_KEY not set. Configure it in your MCP client config \u2014 for example in mcp.json: { "mcpServers": { "aura": { "command": "aura-mcp", "env": { "AURA_API_KEY": "pk_live_..." } } } }. Get a key at https://getaura.sh.'
|
|
41
|
+
);
|
|
42
|
+
this.name = "MissingAuraApiKeyError";
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var MalformedAuraApiKeyError = class extends Error {
|
|
46
|
+
constructor(apiKey) {
|
|
47
|
+
super(
|
|
48
|
+
`AURA_API_KEY is malformed (got ${maskApiKey(apiKey)}). An Aura API key must start with one of: ${API_KEY_PREFIXES.join(", ")}. Check for a truncated copy/paste, a shell-quoting problem, or a key from a different service. Issue a new key at https://getaura.sh.`
|
|
49
|
+
);
|
|
50
|
+
this.name = "MalformedAuraApiKeyError";
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// src/client.ts
|
|
8
55
|
var cached = null;
|
|
9
56
|
function getClient() {
|
|
10
57
|
if (cached) return cached;
|
|
11
58
|
const apiKey = process.env.AURA_API_KEY;
|
|
12
|
-
|
|
13
|
-
throw new MissingAuraApiKeyError();
|
|
14
|
-
}
|
|
59
|
+
parseApiKey(apiKey);
|
|
15
60
|
cached = new sdk.AuraClient({
|
|
16
61
|
apiKey,
|
|
17
62
|
baseUrl: process.env.AURA_BASE_URL,
|
|
@@ -20,14 +65,6 @@ function getClient() {
|
|
|
20
65
|
});
|
|
21
66
|
return cached;
|
|
22
67
|
}
|
|
23
|
-
var MissingAuraApiKeyError = class extends Error {
|
|
24
|
-
constructor() {
|
|
25
|
-
super(
|
|
26
|
-
'AURA_API_KEY not set. Configure it in your MCP client config \u2014 for example in mcp.json: { "mcpServers": { "aura": { "command": "aura-mcp", "env": { "AURA_API_KEY": "pk_live_..." } } } }. Get a key at https://getaura.sh.'
|
|
27
|
-
);
|
|
28
|
-
this.name = "MissingAuraApiKeyError";
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
68
|
|
|
32
69
|
// src/resources/agents.ts
|
|
33
70
|
function registerAgentResources(server) {
|
|
@@ -66,6 +103,55 @@ function registerAgentResources(server) {
|
|
|
66
103
|
}
|
|
67
104
|
);
|
|
68
105
|
}
|
|
106
|
+
var COLLECTION_LIMIT = 50;
|
|
107
|
+
function registerEscrowResources(server) {
|
|
108
|
+
server.resource("escrows", "aura://escrows", async (uri) => {
|
|
109
|
+
const client = getClient();
|
|
110
|
+
const page = await client.escrows.list({ limit: COLLECTION_LIMIT });
|
|
111
|
+
return {
|
|
112
|
+
contents: [
|
|
113
|
+
{
|
|
114
|
+
uri: uri.href,
|
|
115
|
+
mimeType: "application/json",
|
|
116
|
+
text: JSON.stringify(page, null, 2)
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
};
|
|
120
|
+
});
|
|
121
|
+
server.resource(
|
|
122
|
+
"escrow",
|
|
123
|
+
new mcp_js.ResourceTemplate("aura://escrows/{id}", { list: void 0 }),
|
|
124
|
+
async (uri, { id }) => {
|
|
125
|
+
const client = getClient();
|
|
126
|
+
const escrow = await client.escrows.get(String(id));
|
|
127
|
+
return {
|
|
128
|
+
contents: [
|
|
129
|
+
{
|
|
130
|
+
uri: uri.href,
|
|
131
|
+
mimeType: "application/json",
|
|
132
|
+
text: JSON.stringify(escrow, null, 2)
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// src/resources/insights.ts
|
|
141
|
+
function registerInsightsResources(server, clientFactory = getClient) {
|
|
142
|
+
server.resource("insights-overview", "aura://insights/overview", async (uri) => {
|
|
143
|
+
const overview = await clientFactory().insights.overview();
|
|
144
|
+
return {
|
|
145
|
+
contents: [
|
|
146
|
+
{
|
|
147
|
+
uri: uri.href,
|
|
148
|
+
mimeType: "application/json",
|
|
149
|
+
text: JSON.stringify(overview, null, 2)
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
};
|
|
153
|
+
});
|
|
154
|
+
}
|
|
69
155
|
function registerMandateResources(server) {
|
|
70
156
|
server.resource(
|
|
71
157
|
"mandates-pending",
|
|
@@ -102,6 +188,108 @@ function registerMandateResources(server) {
|
|
|
102
188
|
}
|
|
103
189
|
);
|
|
104
190
|
}
|
|
191
|
+
var COLLECTION_LIMIT2 = 50;
|
|
192
|
+
function registerWalletResources(server) {
|
|
193
|
+
server.resource("wallets", "aura://wallets", async (uri) => {
|
|
194
|
+
const client = getClient();
|
|
195
|
+
const page = await client.wallets.list({ limit: COLLECTION_LIMIT2 });
|
|
196
|
+
return {
|
|
197
|
+
contents: [
|
|
198
|
+
{
|
|
199
|
+
uri: uri.href,
|
|
200
|
+
mimeType: "application/json",
|
|
201
|
+
text: JSON.stringify(page, null, 2)
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
server.resource(
|
|
207
|
+
"wallet",
|
|
208
|
+
new mcp_js.ResourceTemplate("aura://wallets/{id}", { list: void 0 }),
|
|
209
|
+
async (uri, { id }) => {
|
|
210
|
+
const client = getClient();
|
|
211
|
+
const wallet = await client.wallets.get(String(id));
|
|
212
|
+
return {
|
|
213
|
+
contents: [
|
|
214
|
+
{
|
|
215
|
+
uri: uri.href,
|
|
216
|
+
mimeType: "application/json",
|
|
217
|
+
text: JSON.stringify(wallet, null, 2)
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
server.resource(
|
|
224
|
+
"wallet-balance",
|
|
225
|
+
new mcp_js.ResourceTemplate("aura://wallets/{id}/balance", { list: void 0 }),
|
|
226
|
+
async (uri, { id }) => {
|
|
227
|
+
const client = getClient();
|
|
228
|
+
const balance = await client.wallets.getBalance(String(id));
|
|
229
|
+
return {
|
|
230
|
+
contents: [
|
|
231
|
+
{
|
|
232
|
+
uri: uri.href,
|
|
233
|
+
mimeType: "application/json",
|
|
234
|
+
text: JSON.stringify(balance, null, 2)
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
var COLLECTION_LIMIT3 = 50;
|
|
242
|
+
var WithdrawalIdSchema = zod.z.string().uuid();
|
|
243
|
+
function registerWithdrawalResources(server, clientFactory = getClient) {
|
|
244
|
+
server.resource("withdrawals", "aura://withdrawals", async (uri) => {
|
|
245
|
+
const page = await clientFactory().withdrawals.list({ limit: COLLECTION_LIMIT3 });
|
|
246
|
+
return {
|
|
247
|
+
contents: [
|
|
248
|
+
{
|
|
249
|
+
uri: uri.href,
|
|
250
|
+
mimeType: "application/json",
|
|
251
|
+
text: JSON.stringify(page, null, 2)
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
};
|
|
255
|
+
});
|
|
256
|
+
server.resource(
|
|
257
|
+
"withdrawal",
|
|
258
|
+
new mcp_js.ResourceTemplate("aura://withdrawals/{id}", { list: void 0 }),
|
|
259
|
+
async (uri, { id }) => {
|
|
260
|
+
const parsed = WithdrawalIdSchema.safeParse(Array.isArray(id) ? id[0] : id);
|
|
261
|
+
if (!parsed.success) {
|
|
262
|
+
throw new Error(`Invalid withdrawal id in ${uri.href}: expected a UUID`);
|
|
263
|
+
}
|
|
264
|
+
const withdrawal = await clientFactory().withdrawals.get(parsed.data);
|
|
265
|
+
return {
|
|
266
|
+
contents: [
|
|
267
|
+
{
|
|
268
|
+
uri: uri.href,
|
|
269
|
+
mimeType: "application/json",
|
|
270
|
+
text: JSON.stringify(withdrawal, null, 2)
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// src/annotations.ts
|
|
279
|
+
function readOnly(title) {
|
|
280
|
+
return { title, readOnlyHint: true };
|
|
281
|
+
}
|
|
282
|
+
function write(title, idempotent = false) {
|
|
283
|
+
return {
|
|
284
|
+
title,
|
|
285
|
+
readOnlyHint: false,
|
|
286
|
+
destructiveHint: false,
|
|
287
|
+
...idempotent ? { idempotentHint: true } : {}
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function destructive(title) {
|
|
291
|
+
return { title, readOnlyHint: false, destructiveHint: true };
|
|
292
|
+
}
|
|
105
293
|
async function withToolErrorHandling(body, successFormatter = defaultJsonFormatter) {
|
|
106
294
|
try {
|
|
107
295
|
const result = await body();
|
|
@@ -116,7 +304,7 @@ function defaultJsonFormatter(data) {
|
|
|
116
304
|
return JSON.stringify(data, null, 2);
|
|
117
305
|
}
|
|
118
306
|
function formatError(err) {
|
|
119
|
-
if (err instanceof MissingAuraApiKeyError) {
|
|
307
|
+
if (err instanceof MissingAuraApiKeyError || err instanceof MalformedAuraApiKeyError) {
|
|
120
308
|
return errorResult("CONFIG_ERROR", err.message);
|
|
121
309
|
}
|
|
122
310
|
if (err instanceof sdk.AuraAuthenticationError) {
|
|
@@ -204,6 +392,8 @@ function registerAgentTools(server) {
|
|
|
204
392
|
autoApproveBelow: zod.z.string().optional()
|
|
205
393
|
}).optional()
|
|
206
394
|
},
|
|
395
|
+
// Additive: provisions a new agent and its wallet. No funds move.
|
|
396
|
+
write("Create Agent"),
|
|
207
397
|
async (args) => withToolErrorHandling(async () => {
|
|
208
398
|
const client = getClient();
|
|
209
399
|
return client.agents.create(args);
|
|
@@ -218,6 +408,7 @@ function registerAgentTools(server) {
|
|
|
218
408
|
limit: zod.z.number().int().min(1).max(200).optional(),
|
|
219
409
|
offset: zod.z.number().int().min(0).optional()
|
|
220
410
|
},
|
|
411
|
+
readOnly("List Agents"),
|
|
221
412
|
async (args) => withToolErrorHandling(async () => {
|
|
222
413
|
const client = getClient();
|
|
223
414
|
return client.agents.list(args);
|
|
@@ -229,6 +420,7 @@ function registerAgentTools(server) {
|
|
|
229
420
|
{
|
|
230
421
|
agentId: zod.z.string().uuid()
|
|
231
422
|
},
|
|
423
|
+
readOnly("Get Agent"),
|
|
232
424
|
async ({ agentId }) => withToolErrorHandling(async () => {
|
|
233
425
|
const client = getClient();
|
|
234
426
|
return client.agents.get(agentId);
|
|
@@ -240,6 +432,7 @@ function registerAgentTools(server) {
|
|
|
240
432
|
{
|
|
241
433
|
agentId: zod.z.string().uuid()
|
|
242
434
|
},
|
|
435
|
+
readOnly("Get Agent Balance"),
|
|
243
436
|
async ({ agentId }) => withToolErrorHandling(async () => {
|
|
244
437
|
const client = getClient();
|
|
245
438
|
return client.agents.getBalance(agentId);
|
|
@@ -252,6 +445,8 @@ function registerAgentTools(server) {
|
|
|
252
445
|
agentId: zod.z.string().uuid(),
|
|
253
446
|
reason: zod.z.string().max(500).optional().describe("Surfaced in activity event metadata for audit trail")
|
|
254
447
|
},
|
|
448
|
+
// Halts an existing agent AND cascade-rejects its in-flight mandates.
|
|
449
|
+
destructive("Freeze Agent (kill switch)"),
|
|
255
450
|
async (args) => withToolErrorHandling(async () => {
|
|
256
451
|
const client = getClient();
|
|
257
452
|
return client.agents.freeze(args);
|
|
@@ -263,6 +458,8 @@ function registerAgentTools(server) {
|
|
|
263
458
|
{
|
|
264
459
|
agentId: zod.z.string().uuid()
|
|
265
460
|
},
|
|
461
|
+
// Re-enables autonomous spending on an existing agent.
|
|
462
|
+
destructive("Unfreeze Agent (resumes autonomous spending)"),
|
|
266
463
|
async (args) => withToolErrorHandling(async () => {
|
|
267
464
|
const client = getClient();
|
|
268
465
|
return client.agents.unfreeze(args);
|
|
@@ -279,11 +476,24 @@ function registerAgentTools(server) {
|
|
|
279
476
|
reasoning: zod.z.string().optional(),
|
|
280
477
|
metadata: zod.z.record(zod.z.unknown()).optional()
|
|
281
478
|
},
|
|
479
|
+
// NOT read-only despite being a dry run: when the decision requires human
|
|
480
|
+
// approval the engine persists a new mandate row. Additive, never
|
|
481
|
+
// destructive — it cannot execute the transaction it evaluates.
|
|
482
|
+
write("Evaluate Policy (dry run, may create a mandate)"),
|
|
282
483
|
async (args) => withToolErrorHandling(async () => {
|
|
283
484
|
const client = getClient();
|
|
284
485
|
return client.agents.evaluate(args);
|
|
285
486
|
})
|
|
286
487
|
);
|
|
488
|
+
return [
|
|
489
|
+
"aura_create_agent",
|
|
490
|
+
"aura_list_agents",
|
|
491
|
+
"aura_get_agent",
|
|
492
|
+
"aura_get_agent_balance",
|
|
493
|
+
"aura_freeze_agent",
|
|
494
|
+
"aura_unfreeze_agent",
|
|
495
|
+
"aura_evaluate_policy"
|
|
496
|
+
];
|
|
287
497
|
}
|
|
288
498
|
var ChainSchema2 = zod.z.enum(["ARC", "ARB", "BASE", "ETH", "MATIC"]);
|
|
289
499
|
var SplitInputSchema = zod.z.object({
|
|
@@ -320,6 +530,8 @@ function registerEscrowTools(server) {
|
|
|
320
530
|
chain: ChainSchema2.optional().describe("Target chain. Defaults to ARC"),
|
|
321
531
|
splits: zod.z.array(SplitInputSchema).min(1).describe("Payment splits. Percentages must sum to 100.")
|
|
322
532
|
},
|
|
533
|
+
// Additive: creates a new escrow record. No funds move until `fund`.
|
|
534
|
+
write("Create Escrow"),
|
|
323
535
|
async (args) => withToolErrorHandling(async () => {
|
|
324
536
|
const client = getClient();
|
|
325
537
|
return client.escrows.create(args);
|
|
@@ -331,6 +543,7 @@ function registerEscrowTools(server) {
|
|
|
331
543
|
{
|
|
332
544
|
escrowId: zod.z.string().uuid()
|
|
333
545
|
},
|
|
546
|
+
readOnly("Get Escrow"),
|
|
334
547
|
async ({ escrowId }) => withToolErrorHandling(async () => {
|
|
335
548
|
const client = getClient();
|
|
336
549
|
return client.escrows.get(escrowId);
|
|
@@ -355,6 +568,7 @@ function registerEscrowTools(server) {
|
|
|
355
568
|
limit: zod.z.number().int().min(1).max(200).optional(),
|
|
356
569
|
offset: zod.z.number().int().min(0).optional()
|
|
357
570
|
},
|
|
571
|
+
readOnly("List Escrows"),
|
|
358
572
|
async (args) => withToolErrorHandling(async () => {
|
|
359
573
|
const client = getClient();
|
|
360
574
|
return client.escrows.list(args);
|
|
@@ -369,6 +583,8 @@ function registerEscrowTools(server) {
|
|
|
369
583
|
amount: zod.z.string().describe("USDC amount to fund (whole-number string)"),
|
|
370
584
|
correlationId: zod.z.string().optional()
|
|
371
585
|
},
|
|
586
|
+
// Moves USDC out of the buyer wallet.
|
|
587
|
+
destructive("Fund Escrow (moves USDC)"),
|
|
372
588
|
async (args) => withToolErrorHandling(async () => {
|
|
373
589
|
const client = getClient();
|
|
374
590
|
return client.escrows.fund(args);
|
|
@@ -383,6 +599,8 @@ function registerEscrowTools(server) {
|
|
|
383
599
|
reason: zod.z.string().optional(),
|
|
384
600
|
correlationId: zod.z.string().optional()
|
|
385
601
|
},
|
|
602
|
+
// Irreversible payout to the split recipients.
|
|
603
|
+
destructive("Release Escrow (pays out USDC)"),
|
|
386
604
|
async (args) => withToolErrorHandling(async () => {
|
|
387
605
|
const client = getClient();
|
|
388
606
|
return client.escrows.release(args);
|
|
@@ -396,6 +614,8 @@ function registerEscrowTools(server) {
|
|
|
396
614
|
reason: zod.z.string().min(10),
|
|
397
615
|
actorId: zod.z.string().uuid()
|
|
398
616
|
},
|
|
617
|
+
// Irreversible return of funds to the buyer.
|
|
618
|
+
destructive("Refund Escrow (returns USDC to buyer)"),
|
|
399
619
|
async (args) => withToolErrorHandling(async () => {
|
|
400
620
|
const client = getClient();
|
|
401
621
|
return client.escrows.refund(args);
|
|
@@ -415,11 +635,134 @@ function registerEscrowTools(server) {
|
|
|
415
635
|
waitForDeploymentMs: zod.z.number().int().min(0).optional().describe("Max ms to wait for on-chain deployment. Default 60000."),
|
|
416
636
|
waitForFundingMs: zod.z.number().int().min(0).optional().describe("Max ms to wait for funds to settle (funded/locked) before releasing. Default 60000.")
|
|
417
637
|
},
|
|
638
|
+
// Composes create -> fund -> release: money moves and is paid out.
|
|
639
|
+
destructive("Receive and Split (moves and pays out USDC)"),
|
|
418
640
|
async (args) => withToolErrorHandling(async () => {
|
|
419
641
|
const client = getClient();
|
|
420
642
|
return client.escrows.receiveAndSplit(args);
|
|
421
643
|
})
|
|
422
644
|
);
|
|
645
|
+
return [
|
|
646
|
+
"aura_create_escrow",
|
|
647
|
+
"aura_get_escrow",
|
|
648
|
+
"aura_list_escrows",
|
|
649
|
+
"aura_fund_escrow",
|
|
650
|
+
"aura_release_escrow",
|
|
651
|
+
"aura_refund_escrow",
|
|
652
|
+
"aura_receive_and_split"
|
|
653
|
+
];
|
|
654
|
+
}
|
|
655
|
+
function validationError(error) {
|
|
656
|
+
const detail = error.issues.map((issue) => `${issue.path.join(".") || "(input)"}: ${issue.message}`).join("; ");
|
|
657
|
+
return toolError("VALIDATION_ERROR", detail);
|
|
658
|
+
}
|
|
659
|
+
function addCustomRangeIssues(ctx, field, selector, start, end) {
|
|
660
|
+
if (selector === "custom" && (start === void 0 || end === void 0)) {
|
|
661
|
+
ctx.addIssue({
|
|
662
|
+
code: zod.z.ZodIssueCode.custom,
|
|
663
|
+
path: [start === void 0 ? "start" : "end"],
|
|
664
|
+
message: `start and end are both required when ${field} is 'custom'`
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
if (start !== void 0 && end !== void 0 && Date.parse(start) > Date.parse(end)) {
|
|
668
|
+
ctx.addIssue({
|
|
669
|
+
code: zod.z.ZodIssueCode.custom,
|
|
670
|
+
path: ["end"],
|
|
671
|
+
message: "end must be at or after start"
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
// src/tools/insights.ts
|
|
677
|
+
var PeriodSchema = zod.z.enum(["today", "7d", "30d", "90d", "custom"]);
|
|
678
|
+
var DateTimeSchema = zod.z.string().datetime();
|
|
679
|
+
var overviewShape = {
|
|
680
|
+
period: PeriodSchema.optional().describe(
|
|
681
|
+
"Window to report on (default 7d). 'custom' requires start and end."
|
|
682
|
+
),
|
|
683
|
+
start: DateTimeSchema.optional().describe("ISO 8601 datetime; required when period is custom"),
|
|
684
|
+
end: DateTimeSchema.optional().describe("ISO 8601 datetime; required when period is custom")
|
|
685
|
+
};
|
|
686
|
+
var InsightsOverviewInput = zod.z.object(overviewShape).superRefine(
|
|
687
|
+
(value, ctx) => addCustomRangeIssues(ctx, "period", value.period, value.start, value.end)
|
|
688
|
+
);
|
|
689
|
+
var auditShape = {
|
|
690
|
+
action: zod.z.string().min(1).optional().describe("Audit action name, e.g. escrow.released"),
|
|
691
|
+
actor: zod.z.enum(["user", "system", "api", "cron", "webhook"]).optional(),
|
|
692
|
+
resourceType: zod.z.string().min(1).optional().describe("Resource kind, e.g. escrow"),
|
|
693
|
+
// `.min(1)`, not `.uuid()`: the route accepts any string here
|
|
694
|
+
// (`resourceId: z.string().optional()`, insights/audit/route.ts:26) and the
|
|
695
|
+
// audit log records ids from several subsystems, not all of them UUIDs.
|
|
696
|
+
resourceId: zod.z.string().min(1).optional().describe("Id of the audited resource"),
|
|
697
|
+
range: PeriodSchema.optional().describe(
|
|
698
|
+
"Window to query (default 30d). 'custom' requires start and end."
|
|
699
|
+
),
|
|
700
|
+
start: DateTimeSchema.optional().describe("ISO 8601 datetime; required when range is custom"),
|
|
701
|
+
end: DateTimeSchema.optional().describe("ISO 8601 datetime; required when range is custom"),
|
|
702
|
+
page: zod.z.number().int().min(1).optional().describe("1-based page number (default 1)"),
|
|
703
|
+
limit: zod.z.number().int().min(1).max(100).optional().describe("Page size, 1-100 (default 50)")
|
|
704
|
+
};
|
|
705
|
+
var InsightsAuditInput = zod.z.object(auditShape).superRefine(
|
|
706
|
+
(value, ctx) => addCustomRangeIssues(ctx, "range", value.range, value.start, value.end)
|
|
707
|
+
);
|
|
708
|
+
function registerInsightsTools(server, clientFactory = getClient) {
|
|
709
|
+
server.tool(
|
|
710
|
+
"aura_insights_overview",
|
|
711
|
+
"Revenue, transaction count, active escrows and commissions for a period, each with its change against the previous period, plus sparkline and success-rate charts.",
|
|
712
|
+
overviewShape,
|
|
713
|
+
readOnly("Insights Overview"),
|
|
714
|
+
async (args) => {
|
|
715
|
+
const parsed = InsightsOverviewInput.safeParse(args);
|
|
716
|
+
if (!parsed.success) return validationError(parsed.error);
|
|
717
|
+
const { period, start, end } = parsed.data;
|
|
718
|
+
return withToolErrorHandling(
|
|
719
|
+
async () => clientFactory().insights.overview(period, start, end)
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
);
|
|
723
|
+
server.tool(
|
|
724
|
+
"aura_insights_forecast",
|
|
725
|
+
"Project a metric forward over a horizon using the requested algorithm. Requires a Growth or higher plan \u2014 lower tiers return feature_not_available.",
|
|
726
|
+
{
|
|
727
|
+
metric: zod.z.enum([
|
|
728
|
+
"revenue",
|
|
729
|
+
"transaction_count",
|
|
730
|
+
"escrow_count",
|
|
731
|
+
"commission",
|
|
732
|
+
"avg_transaction_value"
|
|
733
|
+
]),
|
|
734
|
+
algorithm: zod.z.enum([
|
|
735
|
+
"linear_regression",
|
|
736
|
+
"moving_average",
|
|
737
|
+
"exponential_smoothing",
|
|
738
|
+
"arima",
|
|
739
|
+
"prophet",
|
|
740
|
+
"ensemble"
|
|
741
|
+
]).optional(),
|
|
742
|
+
period: zod.z.enum(["daily", "weekly", "monthly"]).optional().describe("Granularity of each projected point"),
|
|
743
|
+
horizon: zod.z.number().int().min(1).max(365).optional().describe("Number of periods to project"),
|
|
744
|
+
// Known platform quirk: the route parses this with `z.coerce.boolean()`
|
|
745
|
+
// on a query string, where any non-empty value — including "false" —
|
|
746
|
+
// coerces to true. Passing false therefore does not currently suppress
|
|
747
|
+
// history; that is a platform-side fix, not one to paper over here.
|
|
748
|
+
includeHistory: zod.z.boolean().optional().describe("Include the historical series alongside the projection"),
|
|
749
|
+
historyPeriods: zod.z.number().int().min(1).max(365).optional()
|
|
750
|
+
},
|
|
751
|
+
readOnly("Insights Forecast"),
|
|
752
|
+
async (args) => withToolErrorHandling(async () => clientFactory().insights.forecast(args))
|
|
753
|
+
);
|
|
754
|
+
server.tool(
|
|
755
|
+
"aura_insights_audit",
|
|
756
|
+
"Query the account audit log by action, actor, resource and date range. Paginated, most recent first.",
|
|
757
|
+
auditShape,
|
|
758
|
+
readOnly("Insights Audit"),
|
|
759
|
+
async (args) => {
|
|
760
|
+
const parsed = InsightsAuditInput.safeParse(args);
|
|
761
|
+
if (!parsed.success) return validationError(parsed.error);
|
|
762
|
+
return withToolErrorHandling(async () => clientFactory().insights.audit(parsed.data));
|
|
763
|
+
}
|
|
764
|
+
);
|
|
765
|
+
return ["aura_insights_overview", "aura_insights_forecast", "aura_insights_audit"];
|
|
423
766
|
}
|
|
424
767
|
function registerMandateTools(server) {
|
|
425
768
|
server.tool(
|
|
@@ -431,6 +774,7 @@ function registerMandateTools(server) {
|
|
|
431
774
|
limit: zod.z.number().int().min(1).max(200).optional(),
|
|
432
775
|
cursor: zod.z.string().uuid().optional().describe("Last mandate id from the previous page")
|
|
433
776
|
},
|
|
777
|
+
readOnly("List Mandates (approval inbox)"),
|
|
434
778
|
async (args) => withToolErrorHandling(async () => {
|
|
435
779
|
const client = getClient();
|
|
436
780
|
return client.mandates.list(args);
|
|
@@ -442,6 +786,7 @@ function registerMandateTools(server) {
|
|
|
442
786
|
{
|
|
443
787
|
mandateId: zod.z.string().uuid()
|
|
444
788
|
},
|
|
789
|
+
readOnly("Get Mandate"),
|
|
445
790
|
async ({ mandateId }) => withToolErrorHandling(async () => {
|
|
446
791
|
const client = getClient();
|
|
447
792
|
return client.mandates.get(mandateId);
|
|
@@ -456,6 +801,8 @@ function registerMandateTools(server) {
|
|
|
456
801
|
decisionSignature: zod.z.string().min(16).describe("HMAC-SHA256 hex digest, computed by the caller"),
|
|
457
802
|
decidedAt: zod.z.string().datetime().optional().describe('ISO-8601 timestamp the signature commits to. Defaults to "now" server-side.')
|
|
458
803
|
},
|
|
804
|
+
// Authorizes the agent's intended payment — the money-moving decision.
|
|
805
|
+
destructive("Approve Mandate (authorizes payment)"),
|
|
459
806
|
async (args) => withToolErrorHandling(async () => {
|
|
460
807
|
const client = getClient();
|
|
461
808
|
return client.mandates.approve(args);
|
|
@@ -471,11 +818,31 @@ function registerMandateTools(server) {
|
|
|
471
818
|
decidedAt: zod.z.string().datetime().optional(),
|
|
472
819
|
reason: zod.z.string().optional().describe("Human-readable reason logged to the activity feed")
|
|
473
820
|
},
|
|
821
|
+
// Terminal decision on an existing mandate — the agent cannot resume it.
|
|
822
|
+
destructive("Reject Mandate"),
|
|
474
823
|
async (args) => withToolErrorHandling(async () => {
|
|
475
824
|
const client = getClient();
|
|
476
825
|
return client.mandates.reject(args);
|
|
477
826
|
})
|
|
478
827
|
);
|
|
828
|
+
return [
|
|
829
|
+
"aura_list_mandates",
|
|
830
|
+
"aura_get_mandate",
|
|
831
|
+
"aura_approve_mandate",
|
|
832
|
+
"aura_reject_mandate"
|
|
833
|
+
];
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
// src/tools/treasury.ts
|
|
837
|
+
function registerTreasuryTools(server, clientFactory = getClient) {
|
|
838
|
+
server.tool(
|
|
839
|
+
"aura_treasury_optimize",
|
|
840
|
+
"Analyze treasury balances, active escrows and pending payouts, and return an AI recommendation on how to rebalance. Read-only: it recommends, it does not move funds. Requires a Growth or higher plan \u2014 lower tiers return feature_not_available.",
|
|
841
|
+
{},
|
|
842
|
+
readOnly("Treasury Optimize"),
|
|
843
|
+
async () => withToolErrorHandling(async () => clientFactory().treasury.optimize())
|
|
844
|
+
);
|
|
845
|
+
return ["aura_treasury_optimize"];
|
|
479
846
|
}
|
|
480
847
|
var TestnetChainSchema = zod.z.enum(["ARC", "ARB", "BASE"]);
|
|
481
848
|
function walletCreateEnabled() {
|
|
@@ -489,6 +856,7 @@ function registerWalletTools(server) {
|
|
|
489
856
|
{
|
|
490
857
|
walletId: zod.z.string().uuid()
|
|
491
858
|
},
|
|
859
|
+
readOnly("Get Wallet Balance"),
|
|
492
860
|
async ({ walletId }) => withToolErrorHandling(async () => {
|
|
493
861
|
const client = getClient();
|
|
494
862
|
return client.wallets.getBalance(walletId);
|
|
@@ -512,6 +880,8 @@ function registerWalletTools(server) {
|
|
|
512
880
|
"tax"
|
|
513
881
|
]).optional().describe("Wallet owner type. Defaults to BUSINESS.")
|
|
514
882
|
},
|
|
883
|
+
// Additive and create-or-get: provisions a receive address, moves no money.
|
|
884
|
+
write("Create Wallet (receive address)", true),
|
|
515
885
|
async ({ entityId, chain, type }) => {
|
|
516
886
|
if (!walletCreateEnabled()) {
|
|
517
887
|
return toolError(
|
|
@@ -533,28 +903,226 @@ function registerWalletTools(server) {
|
|
|
533
903
|
token: zod.z.string().optional().describe("Token to drip. Defaults to 'USDC'."),
|
|
534
904
|
chain: TestnetChainSchema.optional().describe("Override the wallet's chain.")
|
|
535
905
|
},
|
|
906
|
+
// Additive: testnet-only drip that adds play funds, destroys nothing.
|
|
907
|
+
write("Request Testnet Funds"),
|
|
536
908
|
async ({ walletId, token, chain }) => withToolErrorHandling(async () => {
|
|
537
909
|
const client = getClient();
|
|
538
910
|
return client.wallets.requestTestnetFunds(walletId, { token, chain });
|
|
539
911
|
})
|
|
540
912
|
);
|
|
913
|
+
return [
|
|
914
|
+
"aura_get_wallet_balance",
|
|
915
|
+
"aura_create_wallet",
|
|
916
|
+
"aura_request_testnet_funds"
|
|
917
|
+
];
|
|
918
|
+
}
|
|
919
|
+
var WebhookEventTypeSchema = zod.z.enum([
|
|
920
|
+
"*",
|
|
921
|
+
"escrow.created",
|
|
922
|
+
"escrow.funded",
|
|
923
|
+
"escrow.locked",
|
|
924
|
+
"escrow.released",
|
|
925
|
+
"escrow.refunded",
|
|
926
|
+
"escrow.disputed",
|
|
927
|
+
"transfer.completed",
|
|
928
|
+
"transfer.failed",
|
|
929
|
+
"withdrawal.created",
|
|
930
|
+
"withdrawal.processing",
|
|
931
|
+
"withdrawal.completed",
|
|
932
|
+
"withdrawal.failed",
|
|
933
|
+
"account.kyc_approved",
|
|
934
|
+
"account.kyc_rejected",
|
|
935
|
+
"account.tier_upgraded",
|
|
936
|
+
"security.api_key_created",
|
|
937
|
+
"security.api_key_revoked"
|
|
938
|
+
]);
|
|
939
|
+
function registerWebhookTools(server) {
|
|
940
|
+
server.tool(
|
|
941
|
+
"aura_get_webhook_config",
|
|
942
|
+
"Get the current webhook configuration for the authenticated account: delivery URL, subscribed event types, and status. The signing secret is never returned by this endpoint.",
|
|
943
|
+
{},
|
|
944
|
+
readOnly("Get Webhook Config"),
|
|
945
|
+
async () => withToolErrorHandling(async () => {
|
|
946
|
+
const client = getClient();
|
|
947
|
+
return client.webhooks.getConfig();
|
|
948
|
+
})
|
|
949
|
+
);
|
|
950
|
+
server.tool(
|
|
951
|
+
"aura_set_webhook_config",
|
|
952
|
+
"Set the webhook delivery endpoint for the account. An account has ONE configuration, so this REPLACES any existing one \u2014 events stop going to the previous URL. Must be an https:// URL you control. Returns the signing secret; store it, it is shown only on initial configuration.",
|
|
953
|
+
{
|
|
954
|
+
url: zod.z.string().url().describe("HTTPS endpoint that will receive event POSTs"),
|
|
955
|
+
events: zod.z.array(WebhookEventTypeSchema).min(1).optional().describe(
|
|
956
|
+
"Event types to subscribe to. Omit to subscribe to all events, or pass ['*'] explicitly."
|
|
957
|
+
),
|
|
958
|
+
description: zod.z.string().optional().describe("Optional human-readable label")
|
|
959
|
+
},
|
|
960
|
+
destructive("Set Webhook Config (replaces existing)"),
|
|
961
|
+
async (args) => withToolErrorHandling(async () => {
|
|
962
|
+
const client = getClient();
|
|
963
|
+
return client.webhooks.configure(args);
|
|
964
|
+
})
|
|
965
|
+
);
|
|
966
|
+
server.tool(
|
|
967
|
+
"aura_delete_webhook_config",
|
|
968
|
+
"Delete the account webhook configuration. Event delivery stops immediately and the signing secret is invalidated \u2014 reconfiguring issues a new secret.",
|
|
969
|
+
{},
|
|
970
|
+
destructive("Delete Webhook Config"),
|
|
971
|
+
async () => withToolErrorHandling(async () => {
|
|
972
|
+
const client = getClient();
|
|
973
|
+
return client.webhooks.delete();
|
|
974
|
+
})
|
|
975
|
+
);
|
|
976
|
+
return [
|
|
977
|
+
"aura_get_webhook_config",
|
|
978
|
+
"aura_set_webhook_config",
|
|
979
|
+
"aura_delete_webhook_config"
|
|
980
|
+
];
|
|
981
|
+
}
|
|
982
|
+
var ChainSchema3 = zod.z.enum(["ARC", "ETH", "BASE", "ARB", "MATIC"]);
|
|
983
|
+
var AmountSchema = zod.z.string().regex(
|
|
984
|
+
/^\d+(\.\d{1,6})?$/,
|
|
985
|
+
'Amount must be a number string with up to 6 decimal places, e.g. "100.00"'
|
|
986
|
+
);
|
|
987
|
+
var EvmAddressSchema = zod.z.string().regex(
|
|
988
|
+
/^0x[a-fA-F0-9]{40}$/,
|
|
989
|
+
"Must be an EVM address: 0x followed by 40 hexadecimal characters"
|
|
990
|
+
);
|
|
991
|
+
var ExchangeSchema = zod.z.enum(["binance", "coinbase", "kraken", "other"]);
|
|
992
|
+
var FeeConfigSchema = zod.z.enum(["FREE", "GAS_ONLY", "STANDARD"]);
|
|
993
|
+
var StatusSchema = zod.z.enum(["pending", "submitted", "confirmed", "failed", "cancelled"]);
|
|
994
|
+
var WithdrawalIdSchema2 = zod.z.string().uuid("Withdrawal id must be a UUID");
|
|
995
|
+
var estimateShape = {
|
|
996
|
+
// `.min(1)`, not `.uuid()`: the route accepts any non-empty string here
|
|
997
|
+
// (`walletId: z.string().min(1)`, estimate/route.ts:56). Requiring a UUID
|
|
998
|
+
// would make this tool reject wallet ids the platform itself accepts.
|
|
999
|
+
walletId: zod.z.string().min(1).describe("Source wallet id to debit"),
|
|
1000
|
+
amount: AmountSchema.describe('USDC amount as a string, e.g. "100.00"'),
|
|
1001
|
+
destinationType: zod.z.enum(["exchange", "wallet"]).describe("Where the funds land. 'exchange' also requires `exchange`."),
|
|
1002
|
+
destinationAddress: EvmAddressSchema.describe("Destination EVM address"),
|
|
1003
|
+
chain: ChainSchema3.describe("Chain the funds are delivered on"),
|
|
1004
|
+
exchange: ExchangeSchema.optional().describe(
|
|
1005
|
+
"Required when destinationType is 'exchange'"
|
|
1006
|
+
),
|
|
1007
|
+
sourceChain: ChainSchema3.optional().describe(
|
|
1008
|
+
"Chain the funds start on. Differs from `chain` for a bridged withdrawal; defaults to ARC."
|
|
1009
|
+
),
|
|
1010
|
+
feeConfig: FeeConfigSchema.optional()
|
|
1011
|
+
};
|
|
1012
|
+
var EstimateWithdrawalInput = zod.z.object(estimateShape).superRefine((value, ctx) => {
|
|
1013
|
+
if (value.destinationType === "exchange" && value.exchange === void 0) {
|
|
1014
|
+
ctx.addIssue({
|
|
1015
|
+
code: zod.z.ZodIssueCode.custom,
|
|
1016
|
+
path: ["exchange"],
|
|
1017
|
+
message: "exchange is required when destinationType is 'exchange'"
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
});
|
|
1021
|
+
function registerWithdrawalTools(server, clientFactory = getClient) {
|
|
1022
|
+
server.tool(
|
|
1023
|
+
"aura_get_withdrawal",
|
|
1024
|
+
"Get a single withdrawal by id: status, amount, fees, destination, chain and transaction hash.",
|
|
1025
|
+
{ withdrawalId: WithdrawalIdSchema2.describe("The withdrawal id (UUID)") },
|
|
1026
|
+
readOnly("Get Withdrawal"),
|
|
1027
|
+
async ({ withdrawalId }) => withToolErrorHandling(async () => clientFactory().withdrawals.get(withdrawalId))
|
|
1028
|
+
);
|
|
1029
|
+
server.tool(
|
|
1030
|
+
"aura_list_withdrawals",
|
|
1031
|
+
"List withdrawals for the account, most recent first. Filter by status, chain and date range.",
|
|
1032
|
+
{
|
|
1033
|
+
limit: zod.z.number().int().min(1).max(100).optional().describe("Page size, 1-100 (default 50)"),
|
|
1034
|
+
offset: zod.z.number().int().min(0).optional().describe("Rows to skip (default 0)"),
|
|
1035
|
+
status: StatusSchema.optional(),
|
|
1036
|
+
chain: ChainSchema3.optional(),
|
|
1037
|
+
fromDate: zod.z.string().datetime().optional().describe("ISO 8601 datetime, inclusive lower bound"),
|
|
1038
|
+
toDate: zod.z.string().datetime().optional().describe("ISO 8601 datetime, inclusive upper bound")
|
|
1039
|
+
},
|
|
1040
|
+
readOnly("List Withdrawals"),
|
|
1041
|
+
async (args) => withToolErrorHandling(async () => clientFactory().withdrawals.list(args))
|
|
1042
|
+
);
|
|
1043
|
+
server.tool(
|
|
1044
|
+
"aura_estimate_withdrawal",
|
|
1045
|
+
"Preview the fees, net amount and confirmation time for a withdrawal WITHOUT creating it. Moves no funds. Use this before quoting a payout to a user.",
|
|
1046
|
+
estimateShape,
|
|
1047
|
+
readOnly("Estimate Withdrawal"),
|
|
1048
|
+
async (args) => {
|
|
1049
|
+
const parsed = EstimateWithdrawalInput.safeParse(args);
|
|
1050
|
+
if (!parsed.success) return validationError(parsed.error);
|
|
1051
|
+
return withToolErrorHandling(
|
|
1052
|
+
async () => clientFactory().withdrawals.estimate(parsed.data)
|
|
1053
|
+
);
|
|
1054
|
+
}
|
|
1055
|
+
);
|
|
1056
|
+
server.tool(
|
|
1057
|
+
"aura_get_withdrawal_limits",
|
|
1058
|
+
"Get the account KYC-tier withdrawal limits and how much of the daily and monthly allowance is still available.",
|
|
1059
|
+
{},
|
|
1060
|
+
readOnly("Get Withdrawal Limits"),
|
|
1061
|
+
async () => withToolErrorHandling(async () => clientFactory().withdrawals.limits())
|
|
1062
|
+
);
|
|
1063
|
+
server.tool(
|
|
1064
|
+
"aura_validate_withdrawal_address",
|
|
1065
|
+
"Check that a destination address is well-formed and usable on a chain, and preview the fee when an amount is given. Moves no funds.",
|
|
1066
|
+
{
|
|
1067
|
+
address: EvmAddressSchema.describe("Destination EVM address to check"),
|
|
1068
|
+
chain: ChainSchema3,
|
|
1069
|
+
amount: AmountSchema.optional().describe(
|
|
1070
|
+
"Optional \u2014 when supplied the response includes a fee preview"
|
|
1071
|
+
),
|
|
1072
|
+
feeConfig: FeeConfigSchema.optional()
|
|
1073
|
+
},
|
|
1074
|
+
readOnly("Validate Withdrawal Address"),
|
|
1075
|
+
async (args) => withToolErrorHandling(async () => clientFactory().withdrawals.validate(args))
|
|
1076
|
+
);
|
|
1077
|
+
return [
|
|
1078
|
+
"aura_get_withdrawal",
|
|
1079
|
+
"aura_list_withdrawals",
|
|
1080
|
+
"aura_estimate_withdrawal",
|
|
1081
|
+
"aura_get_withdrawal_limits",
|
|
1082
|
+
"aura_validate_withdrawal_address"
|
|
1083
|
+
];
|
|
541
1084
|
}
|
|
542
1085
|
|
|
543
1086
|
// src/index.ts
|
|
1087
|
+
var SERVER_NAME = "aura-payments";
|
|
1088
|
+
var SERVER_VERSION = "1.2.0";
|
|
1089
|
+
var toolManifests = /* @__PURE__ */ new WeakMap();
|
|
1090
|
+
function getRegisteredToolNames(server) {
|
|
1091
|
+
return toolManifests.get(server) ?? [];
|
|
1092
|
+
}
|
|
544
1093
|
function createServer(options = {}) {
|
|
545
1094
|
const server = new mcp_js.McpServer({
|
|
546
|
-
name: options.name ??
|
|
547
|
-
version: options.version ??
|
|
1095
|
+
name: options.name ?? SERVER_NAME,
|
|
1096
|
+
version: options.version ?? SERVER_VERSION
|
|
548
1097
|
});
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
1098
|
+
const toolNames = [
|
|
1099
|
+
...registerEscrowTools(server),
|
|
1100
|
+
...registerAgentTools(server),
|
|
1101
|
+
...registerMandateTools(server),
|
|
1102
|
+
...registerWalletTools(server),
|
|
1103
|
+
...registerWebhookTools(server),
|
|
1104
|
+
...registerWithdrawalTools(server),
|
|
1105
|
+
...registerTreasuryTools(server),
|
|
1106
|
+
...registerInsightsTools(server)
|
|
1107
|
+
];
|
|
1108
|
+
toolManifests.set(server, Object.freeze(toolNames));
|
|
553
1109
|
registerAgentResources(server);
|
|
554
1110
|
registerMandateResources(server);
|
|
1111
|
+
registerEscrowResources(server);
|
|
1112
|
+
registerWalletResources(server);
|
|
1113
|
+
registerWithdrawalResources(server);
|
|
1114
|
+
registerInsightsResources(server);
|
|
555
1115
|
return server;
|
|
556
1116
|
}
|
|
557
1117
|
|
|
1118
|
+
exports.API_KEY_PREFIXES = API_KEY_PREFIXES;
|
|
1119
|
+
exports.MalformedAuraApiKeyError = MalformedAuraApiKeyError;
|
|
558
1120
|
exports.MissingAuraApiKeyError = MissingAuraApiKeyError;
|
|
1121
|
+
exports.SERVER_NAME = SERVER_NAME;
|
|
1122
|
+
exports.SERVER_VERSION = SERVER_VERSION;
|
|
559
1123
|
exports.createServer = createServer;
|
|
560
1124
|
exports.getClient = getClient;
|
|
1125
|
+
exports.getRegisteredToolNames = getRegisteredToolNames;
|
|
1126
|
+
exports.maskApiKey = maskApiKey;
|
|
1127
|
+
exports.parseApiKey = parseApiKey;
|
|
1128
|
+
exports.resolveKeyMode = resolveKeyMode;
|