@agentwonderland/mcp 0.1.42 → 0.1.43

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.
@@ -46,7 +46,7 @@ describe("api-client headers", () => {
46
46
  "X-AW-Consumer-Principal": "did:pkh:solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp:42W2HfLfveSm1T5et9WTLp2CZ2QXdF2EYCUvyJ2gPpxF",
47
47
  "X-AW-Rebate-Principal": "did:pkh:eip155:8453:0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
48
48
  "X-AW-Surface": "mcp",
49
- "X-AW-MCP-Version": "0.1.42",
49
+ "X-AW-MCP-Version": "0.1.43",
50
50
  "X-AW-MCP-Tool": "run_agent",
51
51
  "X-AW-MCP-Action": "execute",
52
52
  }),
@@ -20,7 +20,7 @@ describe("MCP setup", () => {
20
20
  expect(next.mcpServers.existing.command).toBe("node");
21
21
  expect(next.mcpServers.agentwonderland).toEqual({
22
22
  command: "npx",
23
- args: ["-y", "@agentwonderland/mcp"],
23
+ args: ["-y", "@agentwonderland/mcp@latest"],
24
24
  });
25
25
  });
26
26
  it("replaces an existing Codex TOML block without disturbing other servers", () => {
@@ -40,7 +40,7 @@ describe("MCP setup", () => {
40
40
  expect(next).toContain("[mcp_servers.other]");
41
41
  expect(next).toContain("[mcp_servers.agentwonderland]");
42
42
  expect(next).toContain('command = "npx"');
43
- expect(next).toContain('args = ["-y", "@agentwonderland/mcp"]');
43
+ expect(next).toContain('args = ["-y", "@agentwonderland/mcp@latest"]');
44
44
  expect(next).not.toContain('command = "old"');
45
45
  expect(next).toContain("[model_provider.openai]");
46
46
  });
@@ -61,7 +61,7 @@ describe("MCP setup", () => {
61
61
  const written = JSON.parse(await readFile(configPath, "utf8"));
62
62
  expect(result.status).toBe("updated");
63
63
  expect(result.backupPath).toBeTruthy();
64
- expect(written.mcpServers.agentwonderland.args).toEqual(["-y", "@agentwonderland/mcp"]);
64
+ expect(written.mcpServers.agentwonderland.args).toEqual(["-y", "@agentwonderland/mcp@latest"]);
65
65
  });
66
66
  it("parses client selection flags", () => {
67
67
  expect(parseSetupArgs(["--clients", "codex,cursor", "--yes"])).toEqual({
@@ -1,6 +1,7 @@
1
1
  import { getApiUrl, getApiKey } from "./config.js";
2
2
  import { getPaymentFetch } from "./payments.js";
3
3
  import { getBaseRebatePrincipal, ensureConsumerPrincipalForMethod, getConsumerPrincipalForMethod, } from "./principal.js";
4
+ import { MCP_PACKAGE_VERSION } from "./version.js";
4
5
  // ── Error class ────────────────────────────────────────────────────
5
6
  export class ApiError extends Error {
6
7
  status;
@@ -12,7 +13,6 @@ export class ApiError extends Error {
12
13
  this.name = "ApiError";
13
14
  }
14
15
  }
15
- const MCP_VERSION = "0.1.42";
16
16
  function inferToolHeaders(path, method) {
17
17
  if (path === "/solve") {
18
18
  return { "X-AW-MCP-Tool": "solve", "X-AW-MCP-Action": method === "POST" ? "execute" : "view" };
@@ -36,7 +36,7 @@ async function buildHeaders(path, method, options) {
36
36
  "Content-Type": "application/json",
37
37
  Accept: "application/json",
38
38
  "X-AW-Surface": "mcp",
39
- "X-AW-MCP-Version": MCP_VERSION,
39
+ "X-AW-MCP-Version": MCP_PACKAGE_VERSION,
40
40
  ...inferToolHeaders(path, method),
41
41
  };
42
42
  const apiKey = getApiKey();
@@ -0,0 +1 @@
1
+ export declare const MCP_PACKAGE_VERSION = "0.1.43";
@@ -0,0 +1 @@
1
+ export const MCP_PACKAGE_VERSION = "0.1.43";
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import { registerJobResources } from "./resources/jobs.js";
22
22
  // ── Prompts ──────────────────────────────────────────────────────
23
23
  import { registerPrompts } from "./prompts/index.js";
24
24
  import { runSetupCli } from "./setup.js";
25
- const PACKAGE_VERSION = "0.1.42";
25
+ import { MCP_PACKAGE_VERSION } from "./core/version.js";
26
26
  export async function startMcpServer() {
27
27
  const server = new McpServer({
28
28
  name: "agentwonderland",
@@ -115,7 +115,7 @@ if (isCli) {
115
115
  "in a terminal it waits silently for MCP JSON-RPC messages on stdin.",
116
116
  "",
117
117
  "MCP client config:",
118
- ' { "mcpServers": { "agentwonderland": { "command": "npx", "args": ["-y", "@agentwonderland/mcp"] } } }',
118
+ ' { "mcpServers": { "agentwonderland": { "command": "npx", "args": ["-y", "@agentwonderland/mcp@latest"] } } }',
119
119
  "",
120
120
  "Options:",
121
121
  " -h, --help Show this help",
@@ -124,7 +124,7 @@ if (isCli) {
124
124
  process.exit(0);
125
125
  }
126
126
  else if (args.includes("--version") || args.includes("-v")) {
127
- console.log(PACKAGE_VERSION);
127
+ console.log(MCP_PACKAGE_VERSION);
128
128
  process.exit(0);
129
129
  }
130
130
  else {
package/dist/setup.js CHANGED
@@ -8,7 +8,7 @@ import { execFileSync } from "node:child_process";
8
8
  export const SERVER_NAME = "agentwonderland";
9
9
  export const SERVER_CONFIG = {
10
10
  command: "npx",
11
- args: ["-y", "@agentwonderland/mcp"],
11
+ args: ["-y", "@agentwonderland/mcp@latest"],
12
12
  };
13
13
  const CLIENT_ORDER = [
14
14
  "codex",
@@ -272,7 +272,7 @@ export function mergeCodexTomlConfig(existing) {
272
272
  const block = [
273
273
  `[mcp_servers.${SERVER_NAME}]`,
274
274
  `command = "npx"`,
275
- `args = ["-y", "@agentwonderland/mcp"]`,
275
+ `args = ["-y", "@agentwonderland/mcp@latest"]`,
276
276
  "",
277
277
  ].join("\n");
278
278
  const pattern = new RegExp(`\\n?\\[mcp_servers\\.${SERVER_NAME.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\][\\s\\S]*?(?=\\n\\[[^\\]]+\\]|$)`);
@@ -6,6 +6,7 @@ import { getSettings } from "../core/settings.js";
6
6
  import { getOrCreatePendingCardSetup, formatCardSetupBlocks, getCardCapabilities, pollCardSetup, } from "../core/card-setup.js";
7
7
  import { isOwsAvailable, createOwsWallet, importKeyToOws, listOwsWallets, listOwsWalletsByChain, installOws, platformSupportsOws, } from "../core/ows-adapter.js";
8
8
  import { ensureConsumerPrincipal, getConsumerPrincipal } from "../core/principal.js";
9
+ import { MCP_PACKAGE_VERSION } from "../core/version.js";
9
10
  function text(t) {
10
11
  return { content: [{ type: "text", text: t }] };
11
12
  }
@@ -21,7 +22,10 @@ export function registerWalletTools(server) {
21
22
  }
22
23
  const settings = await getSettings();
23
24
  const networkLabel = settings ? ` (${settings.network})` : "";
24
- const lines = [`Payment methods${networkLabel}:`];
25
+ const lines = [
26
+ `Agent Wonderland MCP: ${MCP_PACKAGE_VERSION}`,
27
+ `Payment methods${networkLabel}:`,
28
+ ];
25
29
  for (const w of wallets) {
26
30
  const label = w.label ? ` (${w.label})` : "";
27
31
  const storage = w.keyType === "ows" ? " [encrypted]" : " [plaintext]";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentwonderland/mcp",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "type": "module",
5
5
  "description": "MCP server for the Agent Wonderland AI agent marketplace",
6
6
  "bin": {
@@ -72,7 +72,7 @@ describe("api-client headers", () => {
72
72
  "X-AW-Rebate-Principal":
73
73
  "did:pkh:eip155:8453:0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
74
74
  "X-AW-Surface": "mcp",
75
- "X-AW-MCP-Version": "0.1.42",
75
+ "X-AW-MCP-Version": "0.1.43",
76
76
  "X-AW-MCP-Tool": "run_agent",
77
77
  "X-AW-MCP-Action": "execute",
78
78
  }),
@@ -30,7 +30,7 @@ describe("MCP setup", () => {
30
30
  expect(next.mcpServers.existing.command).toBe("node");
31
31
  expect(next.mcpServers.agentwonderland).toEqual({
32
32
  command: "npx",
33
- args: ["-y", "@agentwonderland/mcp"],
33
+ args: ["-y", "@agentwonderland/mcp@latest"],
34
34
  });
35
35
  });
36
36
 
@@ -52,7 +52,7 @@ describe("MCP setup", () => {
52
52
  expect(next).toContain("[mcp_servers.other]");
53
53
  expect(next).toContain("[mcp_servers.agentwonderland]");
54
54
  expect(next).toContain('command = "npx"');
55
- expect(next).toContain('args = ["-y", "@agentwonderland/mcp"]');
55
+ expect(next).toContain('args = ["-y", "@agentwonderland/mcp@latest"]');
56
56
  expect(next).not.toContain('command = "old"');
57
57
  expect(next).toContain("[model_provider.openai]");
58
58
  });
@@ -76,7 +76,7 @@ describe("MCP setup", () => {
76
76
 
77
77
  expect(result.status).toBe("updated");
78
78
  expect(result.backupPath).toBeTruthy();
79
- expect(written.mcpServers.agentwonderland.args).toEqual(["-y", "@agentwonderland/mcp"]);
79
+ expect(written.mcpServers.agentwonderland.args).toEqual(["-y", "@agentwonderland/mcp@latest"]);
80
80
  });
81
81
 
82
82
  it("parses client selection flags", () => {
@@ -7,6 +7,7 @@ import {
7
7
  getConsumerPrincipal,
8
8
  getConsumerPrincipalForMethod,
9
9
  } from "./principal.js";
10
+ import { MCP_PACKAGE_VERSION } from "./version.js";
10
11
 
11
12
  // ── Error class ────────────────────────────────────────────────────
12
13
 
@@ -29,8 +30,6 @@ interface RequestOptions {
29
30
  extraHeaders?: Record<string, string>;
30
31
  }
31
32
 
32
- const MCP_VERSION = "0.1.42";
33
-
34
33
  function inferToolHeaders(path: string, method: string): Record<string, string> {
35
34
  if (path === "/solve") {
36
35
  return { "X-AW-MCP-Tool": "solve", "X-AW-MCP-Action": method === "POST" ? "execute" : "view" };
@@ -55,7 +54,7 @@ async function buildHeaders(path: string, method: string, options?: RequestOptio
55
54
  "Content-Type": "application/json",
56
55
  Accept: "application/json",
57
56
  "X-AW-Surface": "mcp",
58
- "X-AW-MCP-Version": MCP_VERSION,
57
+ "X-AW-MCP-Version": MCP_PACKAGE_VERSION,
59
58
  ...inferToolHeaders(path, method),
60
59
  };
61
60
 
@@ -0,0 +1 @@
1
+ export const MCP_PACKAGE_VERSION = "0.1.43";
package/src/index.ts CHANGED
@@ -26,8 +26,7 @@ import { registerJobResources } from "./resources/jobs.js";
26
26
  // ── Prompts ──────────────────────────────────────────────────────
27
27
  import { registerPrompts } from "./prompts/index.js";
28
28
  import { runSetupCli } from "./setup.js";
29
-
30
- const PACKAGE_VERSION = "0.1.42";
29
+ import { MCP_PACKAGE_VERSION } from "./core/version.js";
31
30
 
32
31
  export async function startMcpServer(): Promise<void> {
33
32
  const server = new McpServer(
@@ -131,7 +130,7 @@ if (isCli) {
131
130
  "in a terminal it waits silently for MCP JSON-RPC messages on stdin.",
132
131
  "",
133
132
  "MCP client config:",
134
- ' { "mcpServers": { "agentwonderland": { "command": "npx", "args": ["-y", "@agentwonderland/mcp"] } } }',
133
+ ' { "mcpServers": { "agentwonderland": { "command": "npx", "args": ["-y", "@agentwonderland/mcp@latest"] } } }',
135
134
  "",
136
135
  "Options:",
137
136
  " -h, --help Show this help",
@@ -139,7 +138,7 @@ if (isCli) {
139
138
  ].join("\n"));
140
139
  process.exit(0);
141
140
  } else if (args.includes("--version") || args.includes("-v")) {
142
- console.log(PACKAGE_VERSION);
141
+ console.log(MCP_PACKAGE_VERSION);
143
142
  process.exit(0);
144
143
  } else {
145
144
  if (process.stdin.isTTY && process.stdout.isTTY) {
package/src/setup.ts CHANGED
@@ -9,7 +9,7 @@ import { execFileSync } from "node:child_process";
9
9
  export const SERVER_NAME = "agentwonderland";
10
10
  export const SERVER_CONFIG = {
11
11
  command: "npx",
12
- args: ["-y", "@agentwonderland/mcp"],
12
+ args: ["-y", "@agentwonderland/mcp@latest"],
13
13
  };
14
14
 
15
15
  export type SetupClientId =
@@ -330,7 +330,7 @@ export function mergeCodexTomlConfig(existing: string): string {
330
330
  const block = [
331
331
  `[mcp_servers.${SERVER_NAME}]`,
332
332
  `command = "npx"`,
333
- `args = ["-y", "@agentwonderland/mcp"]`,
333
+ `args = ["-y", "@agentwonderland/mcp@latest"]`,
334
334
  "",
335
335
  ].join("\n");
336
336
 
@@ -28,6 +28,7 @@ import {
28
28
  platformSupportsOws,
29
29
  } from "../core/ows-adapter.js";
30
30
  import { ensureConsumerPrincipal, getConsumerPrincipal } from "../core/principal.js";
31
+ import { MCP_PACKAGE_VERSION } from "../core/version.js";
31
32
 
32
33
  function text(t: string) {
33
34
  return { content: [{ type: "text" as const, text: t }] };
@@ -53,7 +54,10 @@ export function registerWalletTools(server: McpServer): void {
53
54
 
54
55
  const settings = await getSettings();
55
56
  const networkLabel = settings ? ` (${settings.network})` : "";
56
- const lines = [`Payment methods${networkLabel}:`];
57
+ const lines = [
58
+ `Agent Wonderland MCP: ${MCP_PACKAGE_VERSION}`,
59
+ `Payment methods${networkLabel}:`,
60
+ ];
57
61
 
58
62
  for (const w of wallets) {
59
63
  const label = w.label ? ` (${w.label})` : "";