@agentwonderland/mcp 0.1.47 → 0.1.48
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/core/link-cli.js +1 -1
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +2 -2
- package/dist/tools/__tests__/wallet.test.js +3 -3
- package/dist/tools/passes.js +4 -4
- package/dist/tools/run.js +4 -4
- package/dist/tools/solve.js +4 -4
- package/dist/tools/wallet.js +3 -3
- package/package.json +1 -1
- package/src/core/link-cli.ts +1 -1
- package/src/core/version.ts +1 -1
- package/src/index.ts +2 -2
- package/src/tools/__tests__/wallet.test.ts +3 -3
- package/src/tools/passes.ts +4 -4
- package/src/tools/run.ts +4 -4
- package/src/tools/solve.ts +4 -4
- package/src/tools/wallet.ts +3 -3
- package/dist/tools/observability.d.ts +0 -2
- package/dist/tools/observability.js +0 -20
package/dist/core/link-cli.js
CHANGED
|
@@ -212,7 +212,7 @@ export async function createLinkSharedPaymentToken(params) {
|
|
|
212
212
|
message,
|
|
213
213
|
"",
|
|
214
214
|
`Link CLI rejected the merchant network_id "${params.networkId}".`,
|
|
215
|
-
"For local Agent Wonderland testing, restart the gateway with a Stripe key whose live/test mode matches STRIPE_PROFILE_ID. If the modes already match, the Stripe profile likely is not
|
|
215
|
+
"For local Agent Wonderland testing, restart the gateway with a Stripe key whose live/test mode matches STRIPE_PROFILE_ID. If the modes already match, the Stripe profile likely is not enabled for Link agent payments yet or Stripe needs to provide a different network id.",
|
|
216
216
|
].join("\n"));
|
|
217
217
|
}
|
|
218
218
|
throw err;
|
package/dist/core/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MCP_PACKAGE_VERSION = "0.1.
|
|
1
|
+
export declare const MCP_PACKAGE_VERSION = "0.1.48";
|
package/dist/core/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const MCP_PACKAGE_VERSION = "0.1.
|
|
1
|
+
export const MCP_PACKAGE_VERSION = "0.1.48";
|
package/dist/index.js
CHANGED
|
@@ -45,8 +45,8 @@ export async function startMcpServer() {
|
|
|
45
45
|
"4. Use list_jobs() to recover state across sessions (it checks every configured wallet).",
|
|
46
46
|
"",
|
|
47
47
|
"PAYMENT:",
|
|
48
|
-
"- Supported
|
|
49
|
-
"-
|
|
48
|
+
"- Supported payment methods: Link card/bank via @stripe/link-cli, Tempo USDC, Base USDC, and Solana USDC.",
|
|
49
|
+
"- Link payments may ask the user to approve a spend request in Link before the first charge.",
|
|
50
50
|
"- Tempo and Base share one EVM wallet key. Solana uses a separate ed25519 key. One OWS wallet can manage both.",
|
|
51
51
|
"- If pay_with is omitted, the MCP auto-selects a compatible configured rail. Pass pay_with explicitly",
|
|
52
52
|
" (tempo | base | solana | link | wallet-id) for deterministic behavior.",
|
|
@@ -215,8 +215,8 @@ describe("wallet_setup tool", () => {
|
|
|
215
215
|
const walletSetup = await getWalletSetupTool();
|
|
216
216
|
const result = await walletSetup({ action: "start" });
|
|
217
217
|
const text = flattenText(result);
|
|
218
|
-
expect(text).toContain("
|
|
219
|
-
expect(text).toContain("Link card
|
|
218
|
+
expect(text).toContain("Choose a payment method to set up:");
|
|
219
|
+
expect(text).toContain("Link card or bank account (recommended)");
|
|
220
220
|
expect(text).toContain('wallet_setup({ action: "add-link" })');
|
|
221
221
|
expect(text).toContain('wallet_setup({ action: "create", chain: "tempo" })');
|
|
222
222
|
expect(text).toContain('wallet_setup({ action: "create", chain: "base" })');
|
|
@@ -237,7 +237,7 @@ describe("wallet_setup tool", () => {
|
|
|
237
237
|
const result = await walletStatus({});
|
|
238
238
|
const text = flattenText(result);
|
|
239
239
|
expect(text).toContain("No payment methods configured.");
|
|
240
|
-
expect(text).toContain("Link card
|
|
240
|
+
expect(text).toContain("Link card or bank account (recommended)");
|
|
241
241
|
});
|
|
242
242
|
it("imports a wallet into OWS encrypted storage with Base as the default chain", async () => {
|
|
243
243
|
const walletSetup = await getWalletSetupTool();
|
package/dist/tools/passes.js
CHANGED
|
@@ -51,10 +51,10 @@ export function registerPassTools(server) {
|
|
|
51
51
|
const setupLines = [
|
|
52
52
|
"No payment method configured.",
|
|
53
53
|
"",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
54
|
+
"Recommended: wallet_setup({ action: \"add-link\" }) to connect a Link card or bank account.",
|
|
55
|
+
"You can also run wallet_setup({ action: \"start\" }) to see all payment options.",
|
|
56
|
+
"",
|
|
57
|
+
"USDC options: Tempo, Base, or Solana.",
|
|
58
58
|
];
|
|
59
59
|
if (isCardPaymentEnabled()) {
|
|
60
60
|
setupLines.push("", "Or wallet_setup({ action: \"add-card\" }) to connect a credit card.");
|
package/dist/tools/run.js
CHANGED
|
@@ -104,10 +104,10 @@ export function registerRunTools(server) {
|
|
|
104
104
|
const setupLines = [
|
|
105
105
|
"No payment method configured.",
|
|
106
106
|
"",
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
107
|
+
"Recommended: wallet_setup({ action: \"add-link\" }) to connect a Link card or bank account.",
|
|
108
|
+
"You can also run wallet_setup({ action: \"start\" }) to see all payment options.",
|
|
109
|
+
"",
|
|
110
|
+
"USDC options: Tempo, Base, or Solana.",
|
|
111
111
|
];
|
|
112
112
|
if (isCardPaymentEnabled()) {
|
|
113
113
|
setupLines.push("", "Or wallet_setup({ action: \"add-card\" }) to connect a credit card.");
|
package/dist/tools/solve.js
CHANGED
|
@@ -145,10 +145,10 @@ export function registerSolveTools(server) {
|
|
|
145
145
|
const setupLines = [
|
|
146
146
|
"No payment method configured.",
|
|
147
147
|
"",
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
148
|
+
"Recommended: wallet_setup({ action: \"add-link\" }) to connect a Link card or bank account.",
|
|
149
|
+
"You can also run wallet_setup({ action: \"start\" }) to see all payment options.",
|
|
150
|
+
"",
|
|
151
|
+
"USDC options: Tempo, Base, or Solana.",
|
|
152
152
|
];
|
|
153
153
|
if (isCardPaymentEnabled()) {
|
|
154
154
|
setupLines.push("", "Or wallet_setup({ action: \"add-card\" }) to connect a credit card.");
|
package/dist/tools/wallet.js
CHANGED
|
@@ -30,9 +30,9 @@ function isFreshLinkSetup(pending) {
|
|
|
30
30
|
}
|
|
31
31
|
function formatPaymentSetupMenu() {
|
|
32
32
|
return [
|
|
33
|
-
"
|
|
33
|
+
"Choose a payment method to set up:",
|
|
34
34
|
"",
|
|
35
|
-
"1. Link card
|
|
35
|
+
"1. Link card or bank account (recommended)",
|
|
36
36
|
" wallet_setup({ action: \"add-link\" })",
|
|
37
37
|
"",
|
|
38
38
|
"2. Tempo USDC",
|
|
@@ -127,7 +127,7 @@ export function registerWalletTools(server) {
|
|
|
127
127
|
return text(lines.join("\n"));
|
|
128
128
|
});
|
|
129
129
|
// ── wallet_setup ────────────────────────────────────────────────
|
|
130
|
-
server.tool("wallet_setup", "Set up or manage an Agent Wonderland payment method. Use 'start' for a guided setup menu. Link card/bank is recommended for most users. 'create' makes a new crypto wallet (encrypted via OWS if available, otherwise plaintext — run 'enable-ows' to upgrade). 'import' takes an existing private key. 'enable-ows' installs the Open Wallet Standard native module for encrypted at-rest storage. Tempo/Base share one EVM key; Solana uses a separate ed25519 key. NEVER delete or rotate keys programmatically; direct users to edit ~/.agentwonderland/config.json or ~/.ows/ manually.", {
|
|
130
|
+
server.tool("wallet_setup", "Set up or manage an Agent Wonderland payment method. Use 'start' for a guided setup menu. Link card/bank is recommended for most users. 'add-link' connects a Link card or bank account for agent payments. 'create' makes a new crypto wallet (encrypted via OWS if available, otherwise plaintext — run 'enable-ows' to upgrade). 'import' takes an existing private key. 'enable-ows' installs the Open Wallet Standard native module for encrypted at-rest storage. Tempo/Base share one EVM key; Solana uses a separate ed25519 key. NEVER delete or rotate keys programmatically; direct users to edit ~/.agentwonderland/config.json or ~/.ows/ manually.", {
|
|
131
131
|
action: z
|
|
132
132
|
.enum(["start", "create", "import", "add-card", "remove-card", "add-link", "remove-link", "enable-ows"])
|
|
133
133
|
.describe("'start' shows the guided payment setup menu, 'add-link' connects Link card/bank, 'create' makes a crypto wallet, 'import' imports an existing key, 'enable-ows' installs encrypted key storage"),
|
package/package.json
CHANGED
package/src/core/link-cli.ts
CHANGED
|
@@ -248,7 +248,7 @@ export async function createLinkSharedPaymentToken(params: {
|
|
|
248
248
|
message,
|
|
249
249
|
"",
|
|
250
250
|
`Link CLI rejected the merchant network_id "${params.networkId}".`,
|
|
251
|
-
"For local Agent Wonderland testing, restart the gateway with a Stripe key whose live/test mode matches STRIPE_PROFILE_ID. If the modes already match, the Stripe profile likely is not
|
|
251
|
+
"For local Agent Wonderland testing, restart the gateway with a Stripe key whose live/test mode matches STRIPE_PROFILE_ID. If the modes already match, the Stripe profile likely is not enabled for Link agent payments yet or Stripe needs to provide a different network id.",
|
|
252
252
|
].join("\n"),
|
|
253
253
|
);
|
|
254
254
|
}
|
package/src/core/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const MCP_PACKAGE_VERSION = "0.1.
|
|
1
|
+
export const MCP_PACKAGE_VERSION = "0.1.48";
|
package/src/index.ts
CHANGED
|
@@ -52,8 +52,8 @@ export async function startMcpServer(): Promise<void> {
|
|
|
52
52
|
"4. Use list_jobs() to recover state across sessions (it checks every configured wallet).",
|
|
53
53
|
"",
|
|
54
54
|
"PAYMENT:",
|
|
55
|
-
"- Supported
|
|
56
|
-
"-
|
|
55
|
+
"- Supported payment methods: Link card/bank via @stripe/link-cli, Tempo USDC, Base USDC, and Solana USDC.",
|
|
56
|
+
"- Link payments may ask the user to approve a spend request in Link before the first charge.",
|
|
57
57
|
"- Tempo and Base share one EVM wallet key. Solana uses a separate ed25519 key. One OWS wallet can manage both.",
|
|
58
58
|
"- If pay_with is omitted, the MCP auto-selects a compatible configured rail. Pass pay_with explicitly",
|
|
59
59
|
" (tempo | base | solana | link | wallet-id) for deterministic behavior.",
|
|
@@ -277,8 +277,8 @@ describe("wallet_setup tool", () => {
|
|
|
277
277
|
const result = await walletSetup({ action: "start" });
|
|
278
278
|
const text = flattenText(result);
|
|
279
279
|
|
|
280
|
-
expect(text).toContain("
|
|
281
|
-
expect(text).toContain("Link card
|
|
280
|
+
expect(text).toContain("Choose a payment method to set up:");
|
|
281
|
+
expect(text).toContain("Link card or bank account (recommended)");
|
|
282
282
|
expect(text).toContain('wallet_setup({ action: "add-link" })');
|
|
283
283
|
expect(text).toContain('wallet_setup({ action: "create", chain: "tempo" })');
|
|
284
284
|
expect(text).toContain('wallet_setup({ action: "create", chain: "base" })');
|
|
@@ -307,7 +307,7 @@ describe("wallet_setup tool", () => {
|
|
|
307
307
|
const text = flattenText(result);
|
|
308
308
|
|
|
309
309
|
expect(text).toContain("No payment methods configured.");
|
|
310
|
-
expect(text).toContain("Link card
|
|
310
|
+
expect(text).toContain("Link card or bank account (recommended)");
|
|
311
311
|
});
|
|
312
312
|
|
|
313
313
|
it("imports a wallet into OWS encrypted storage with Base as the default chain", async () => {
|
package/src/tools/passes.ts
CHANGED
|
@@ -83,10 +83,10 @@ export function registerPassTools(server: McpServer): void {
|
|
|
83
83
|
const setupLines = [
|
|
84
84
|
"No payment method configured.",
|
|
85
85
|
"",
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
86
|
+
"Recommended: wallet_setup({ action: \"add-link\" }) to connect a Link card or bank account.",
|
|
87
|
+
"You can also run wallet_setup({ action: \"start\" }) to see all payment options.",
|
|
88
|
+
"",
|
|
89
|
+
"USDC options: Tempo, Base, or Solana.",
|
|
90
90
|
];
|
|
91
91
|
if (isCardPaymentEnabled()) {
|
|
92
92
|
setupLines.push("", "Or wallet_setup({ action: \"add-card\" }) to connect a credit card.");
|
package/src/tools/run.ts
CHANGED
|
@@ -143,10 +143,10 @@ export function registerRunTools(server: McpServer): void {
|
|
|
143
143
|
const setupLines = [
|
|
144
144
|
"No payment method configured.",
|
|
145
145
|
"",
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
146
|
+
"Recommended: wallet_setup({ action: \"add-link\" }) to connect a Link card or bank account.",
|
|
147
|
+
"You can also run wallet_setup({ action: \"start\" }) to see all payment options.",
|
|
148
|
+
"",
|
|
149
|
+
"USDC options: Tempo, Base, or Solana.",
|
|
150
150
|
];
|
|
151
151
|
if (isCardPaymentEnabled()) {
|
|
152
152
|
setupLines.push("", "Or wallet_setup({ action: \"add-card\" }) to connect a credit card.");
|
package/src/tools/solve.ts
CHANGED
|
@@ -178,10 +178,10 @@ export function registerSolveTools(server: McpServer): void {
|
|
|
178
178
|
const setupLines = [
|
|
179
179
|
"No payment method configured.",
|
|
180
180
|
"",
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
"
|
|
181
|
+
"Recommended: wallet_setup({ action: \"add-link\" }) to connect a Link card or bank account.",
|
|
182
|
+
"You can also run wallet_setup({ action: \"start\" }) to see all payment options.",
|
|
183
|
+
"",
|
|
184
|
+
"USDC options: Tempo, Base, or Solana.",
|
|
185
185
|
];
|
|
186
186
|
if (isCardPaymentEnabled()) {
|
|
187
187
|
setupLines.push("", "Or wallet_setup({ action: \"add-card\" }) to connect a credit card.");
|
package/src/tools/wallet.ts
CHANGED
|
@@ -65,9 +65,9 @@ function isFreshLinkSetup(pending: { createdAt: string }): boolean {
|
|
|
65
65
|
|
|
66
66
|
function formatPaymentSetupMenu(): string {
|
|
67
67
|
return [
|
|
68
|
-
"
|
|
68
|
+
"Choose a payment method to set up:",
|
|
69
69
|
"",
|
|
70
|
-
"1. Link card
|
|
70
|
+
"1. Link card or bank account (recommended)",
|
|
71
71
|
" wallet_setup({ action: \"add-link\" })",
|
|
72
72
|
"",
|
|
73
73
|
"2. Tempo USDC",
|
|
@@ -185,7 +185,7 @@ export function registerWalletTools(server: McpServer): void {
|
|
|
185
185
|
// ── wallet_setup ────────────────────────────────────────────────
|
|
186
186
|
server.tool(
|
|
187
187
|
"wallet_setup",
|
|
188
|
-
"Set up or manage an Agent Wonderland payment method. Use 'start' for a guided setup menu. Link card/bank is recommended for most users. 'create' makes a new crypto wallet (encrypted via OWS if available, otherwise plaintext — run 'enable-ows' to upgrade). 'import' takes an existing private key. 'enable-ows' installs the Open Wallet Standard native module for encrypted at-rest storage. Tempo/Base share one EVM key; Solana uses a separate ed25519 key. NEVER delete or rotate keys programmatically; direct users to edit ~/.agentwonderland/config.json or ~/.ows/ manually.",
|
|
188
|
+
"Set up or manage an Agent Wonderland payment method. Use 'start' for a guided setup menu. Link card/bank is recommended for most users. 'add-link' connects a Link card or bank account for agent payments. 'create' makes a new crypto wallet (encrypted via OWS if available, otherwise plaintext — run 'enable-ows' to upgrade). 'import' takes an existing private key. 'enable-ows' installs the Open Wallet Standard native module for encrypted at-rest storage. Tempo/Base share one EVM key; Solana uses a separate ed25519 key. NEVER delete or rotate keys programmatically; direct users to edit ~/.agentwonderland/config.json or ~/.ows/ manually.",
|
|
189
189
|
{
|
|
190
190
|
action: z
|
|
191
191
|
.enum(["start", "create", "import", "add-card", "remove-card", "add-link", "remove-link", "enable-ows"])
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { apiPost } from "../core/api-client.js";
|
|
2
|
-
function text(t) {
|
|
3
|
-
return { content: [{ type: "text", text: t }] };
|
|
4
|
-
}
|
|
5
|
-
export function registerObservabilityTools(server) {
|
|
6
|
-
server.tool("open_observability_dashboard", "Generate a secure one-click sign-in URL for the Agent Wonderland web observability dashboard. The dashboard shows your agent runs, spend, rebates, and recent activity.", {}, async () => {
|
|
7
|
-
const result = await apiPost("/observability/link", {}, { ensureConsumerPrincipal: true });
|
|
8
|
-
const lines = [
|
|
9
|
-
"Your secure observability link is ready:",
|
|
10
|
-
result.url,
|
|
11
|
-
"",
|
|
12
|
-
`Expires: ${result.expires_at}`,
|
|
13
|
-
];
|
|
14
|
-
if (result.consumer_principal) {
|
|
15
|
-
lines.push(`Consumer principal: ${result.consumer_principal}`);
|
|
16
|
-
}
|
|
17
|
-
lines.push("", "Open the link in your browser to view usage metrics, spend, rebates, and recent runs.");
|
|
18
|
-
return text(lines.join("\n"));
|
|
19
|
-
});
|
|
20
|
-
}
|