@agentwonderland/mcp 0.1.43 → 0.1.45
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/__tests__/api-client.test.js +1 -1
- package/dist/core/__tests__/formatters.test.js +17 -1
- package/dist/core/formatters.d.ts +1 -0
- package/dist/core/formatters.js +5 -1
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +2 -2
- package/dist/setup.js +3 -3
- package/package.json +1 -1
- package/src/core/__tests__/api-client.test.ts +1 -1
- package/src/core/__tests__/formatters.test.ts +19 -1
- package/src/core/formatters.ts +6 -2
- package/src/core/version.ts +1 -1
- package/src/index.ts +2 -2
- package/src/setup.ts +3 -3
|
@@ -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.
|
|
49
|
+
"X-AW-MCP-Version": "0.1.44",
|
|
50
50
|
"X-AW-MCP-Tool": "run_agent",
|
|
51
51
|
"X-AW-MCP-Action": "execute",
|
|
52
52
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { formatRunResult } from "../formatters.js";
|
|
2
|
+
import { agentLine, formatRunResult } from "../formatters.js";
|
|
3
3
|
describe("formatRunResult", () => {
|
|
4
4
|
it("does not show a paid line for credit-pack-backed runs with zero cost", () => {
|
|
5
5
|
const output = formatRunResult({
|
|
@@ -23,3 +23,19 @@ describe("formatRunResult", () => {
|
|
|
23
23
|
expect(output).toContain("Job ID: job-123");
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
|
+
describe("agentLine", () => {
|
|
27
|
+
it("surfaces live rating count and completed job history from stats", () => {
|
|
28
|
+
const output = agentLine({
|
|
29
|
+
name: "People Enrichment",
|
|
30
|
+
slug: "people-enrichment",
|
|
31
|
+
avgRating: 5,
|
|
32
|
+
ratingCount: 1,
|
|
33
|
+
totalExecutions: 0,
|
|
34
|
+
stats: { completedJobs: 3, avgRating: 5, ratingCount: 1 },
|
|
35
|
+
pricePerRunUsd: "0.100000",
|
|
36
|
+
});
|
|
37
|
+
expect(output).toContain("★★★★★ 5.0 (1 review)");
|
|
38
|
+
expect(output).toContain("3 jobs");
|
|
39
|
+
expect(output).toContain("$0.10/req");
|
|
40
|
+
});
|
|
41
|
+
});
|
package/dist/core/formatters.js
CHANGED
|
@@ -42,13 +42,17 @@ export function agentLine(agent) {
|
|
|
42
42
|
const name = agent.name ?? "Unknown";
|
|
43
43
|
const slug = agent.slug ? ` (${agent.slug})` : "";
|
|
44
44
|
const rating = agent.avgRating ?? agent.stats?.avgRating ?? null;
|
|
45
|
+
const ratingCount = agent.ratingCount ?? agent.stats?.ratingCount ?? 0;
|
|
46
|
+
const ratingText = rating != null && ratingCount > 0
|
|
47
|
+
? `${stars(rating)} ${rating.toFixed(1)} (${compactNumber(ratingCount)} review${ratingCount === 1 ? "" : "s"})`
|
|
48
|
+
: stars(rating);
|
|
45
49
|
const jobs = agent.stats?.completedJobs ?? agent.totalExecutions ?? 0;
|
|
46
50
|
const price = formatPrice(agent.pricePerRunUsd);
|
|
47
51
|
const provider = agent.provider?.name ? ` by ${agent.provider.name}` : "";
|
|
48
52
|
const reliability = agent.successRate != null && Number(agent.successRate) < 1
|
|
49
53
|
? ` • ${(Number(agent.successRate) * 100).toFixed(0)}% reliable`
|
|
50
54
|
: "";
|
|
51
|
-
return `${name}${slug}${provider} ${
|
|
55
|
+
return `${name}${slug}${provider} ${ratingText} ${compactNumber(jobs)} jobs • ${price}${reliability}`;
|
|
52
56
|
}
|
|
53
57
|
export function formatLastActive(lastActiveAt) {
|
|
54
58
|
if (!lastActiveAt)
|
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.44";
|
package/dist/core/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const MCP_PACKAGE_VERSION = "0.1.
|
|
1
|
+
export const MCP_PACKAGE_VERSION = "0.1.44";
|
package/dist/index.js
CHANGED
|
@@ -107,7 +107,7 @@ if (isCli) {
|
|
|
107
107
|
"Agent Wonderland MCP server",
|
|
108
108
|
"",
|
|
109
109
|
"Usage:",
|
|
110
|
-
" npx @agentwonderland/mcp setup Configure MCP clients",
|
|
110
|
+
" npx -y @agentwonderland/mcp@latest setup Configure MCP clients",
|
|
111
111
|
" npx @agentwonderland/mcp Start the stdio MCP server",
|
|
112
112
|
"",
|
|
113
113
|
"The bare command starts a stdio MCP server. It is meant to be launched by",
|
|
@@ -133,7 +133,7 @@ if (isCli) {
|
|
|
133
133
|
"Agent Wonderland MCP server is running.",
|
|
134
134
|
"This process speaks MCP over stdio, so it waits for a client instead of printing a prompt.",
|
|
135
135
|
"Add it to an MCP client config, or press Ctrl+C to stop.",
|
|
136
|
-
"Run `npx @agentwonderland/mcp setup` to configure your MCP clients.",
|
|
136
|
+
"Run `npx -y @agentwonderland/mcp@latest setup` to configure your MCP clients.",
|
|
137
137
|
].join("\n"));
|
|
138
138
|
}
|
|
139
139
|
startMcpServer().catch((err) => {
|
package/dist/setup.js
CHANGED
|
@@ -304,9 +304,9 @@ function printSetupHelp() {
|
|
|
304
304
|
"Agent Wonderland MCP setup",
|
|
305
305
|
"",
|
|
306
306
|
"Usage:",
|
|
307
|
-
" npx @agentwonderland/mcp setup",
|
|
308
|
-
" npx @agentwonderland/mcp setup --clients codex,claude-code",
|
|
309
|
-
" npx @agentwonderland/mcp setup --all --yes",
|
|
307
|
+
" npx -y @agentwonderland/mcp@latest setup",
|
|
308
|
+
" npx -y @agentwonderland/mcp@latest setup --clients codex,claude-code",
|
|
309
|
+
" npx -y @agentwonderland/mcp@latest setup --all --yes",
|
|
310
310
|
"",
|
|
311
311
|
"Supported clients:",
|
|
312
312
|
` ${CLIENT_ORDER.join(", ")}`,
|
package/package.json
CHANGED
|
@@ -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.
|
|
75
|
+
"X-AW-MCP-Version": "0.1.44",
|
|
76
76
|
"X-AW-MCP-Tool": "run_agent",
|
|
77
77
|
"X-AW-MCP-Action": "execute",
|
|
78
78
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { formatRunResult } from "../formatters.js";
|
|
2
|
+
import { agentLine, formatRunResult } from "../formatters.js";
|
|
3
3
|
|
|
4
4
|
describe("formatRunResult", () => {
|
|
5
5
|
it("does not show a paid line for credit-pack-backed runs with zero cost", () => {
|
|
@@ -27,3 +27,21 @@ describe("formatRunResult", () => {
|
|
|
27
27
|
expect(output).toContain("Job ID: job-123");
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
|
+
|
|
31
|
+
describe("agentLine", () => {
|
|
32
|
+
it("surfaces live rating count and completed job history from stats", () => {
|
|
33
|
+
const output = agentLine({
|
|
34
|
+
name: "People Enrichment",
|
|
35
|
+
slug: "people-enrichment",
|
|
36
|
+
avgRating: 5,
|
|
37
|
+
ratingCount: 1,
|
|
38
|
+
totalExecutions: 0,
|
|
39
|
+
stats: { completedJobs: 3, avgRating: 5, ratingCount: 1 },
|
|
40
|
+
pricePerRunUsd: "0.100000",
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
expect(output).toContain("★★★★★ 5.0 (1 review)");
|
|
44
|
+
expect(output).toContain("3 jobs");
|
|
45
|
+
expect(output).toContain("$0.10/req");
|
|
46
|
+
});
|
|
47
|
+
});
|
package/src/core/formatters.ts
CHANGED
|
@@ -52,7 +52,7 @@ interface AgentLike {
|
|
|
52
52
|
ratingCount?: number;
|
|
53
53
|
totalExecutions?: number;
|
|
54
54
|
pricePerRunUsd?: string;
|
|
55
|
-
stats?: { completedJobs?: number; avgRating?: number | null };
|
|
55
|
+
stats?: { completedJobs?: number; avgRating?: number | null; ratingCount?: number };
|
|
56
56
|
provider?: { name?: string; slug?: string } | null;
|
|
57
57
|
[key: string]: unknown;
|
|
58
58
|
}
|
|
@@ -61,13 +61,17 @@ export function agentLine(agent: AgentLike): string {
|
|
|
61
61
|
const name = agent.name ?? "Unknown";
|
|
62
62
|
const slug = agent.slug ? ` (${agent.slug})` : "";
|
|
63
63
|
const rating = agent.avgRating ?? agent.stats?.avgRating ?? null;
|
|
64
|
+
const ratingCount = agent.ratingCount ?? agent.stats?.ratingCount ?? 0;
|
|
65
|
+
const ratingText = rating != null && ratingCount > 0
|
|
66
|
+
? `${stars(rating)} ${rating.toFixed(1)} (${compactNumber(ratingCount)} review${ratingCount === 1 ? "" : "s"})`
|
|
67
|
+
: stars(rating);
|
|
64
68
|
const jobs = agent.stats?.completedJobs ?? agent.totalExecutions ?? 0;
|
|
65
69
|
const price = formatPrice(agent.pricePerRunUsd);
|
|
66
70
|
const provider = agent.provider?.name ? ` by ${agent.provider.name}` : "";
|
|
67
71
|
const reliability = agent.successRate != null && Number(agent.successRate) < 1
|
|
68
72
|
? ` • ${(Number(agent.successRate) * 100).toFixed(0)}% reliable`
|
|
69
73
|
: "";
|
|
70
|
-
return `${name}${slug}${provider} ${
|
|
74
|
+
return `${name}${slug}${provider} ${ratingText} ${compactNumber(jobs)} jobs • ${price}${reliability}`;
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
export function formatLastActive(lastActiveAt: string | null | undefined): string | null {
|
package/src/core/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const MCP_PACKAGE_VERSION = "0.1.
|
|
1
|
+
export const MCP_PACKAGE_VERSION = "0.1.44";
|
package/src/index.ts
CHANGED
|
@@ -122,7 +122,7 @@ if (isCli) {
|
|
|
122
122
|
"Agent Wonderland MCP server",
|
|
123
123
|
"",
|
|
124
124
|
"Usage:",
|
|
125
|
-
" npx @agentwonderland/mcp setup Configure MCP clients",
|
|
125
|
+
" npx -y @agentwonderland/mcp@latest setup Configure MCP clients",
|
|
126
126
|
" npx @agentwonderland/mcp Start the stdio MCP server",
|
|
127
127
|
"",
|
|
128
128
|
"The bare command starts a stdio MCP server. It is meant to be launched by",
|
|
@@ -146,7 +146,7 @@ if (isCli) {
|
|
|
146
146
|
"Agent Wonderland MCP server is running.",
|
|
147
147
|
"This process speaks MCP over stdio, so it waits for a client instead of printing a prompt.",
|
|
148
148
|
"Add it to an MCP client config, or press Ctrl+C to stop.",
|
|
149
|
-
"Run `npx @agentwonderland/mcp setup` to configure your MCP clients.",
|
|
149
|
+
"Run `npx -y @agentwonderland/mcp@latest setup` to configure your MCP clients.",
|
|
150
150
|
].join("\n"));
|
|
151
151
|
}
|
|
152
152
|
|
package/src/setup.ts
CHANGED
|
@@ -367,9 +367,9 @@ function printSetupHelp(): void {
|
|
|
367
367
|
"Agent Wonderland MCP setup",
|
|
368
368
|
"",
|
|
369
369
|
"Usage:",
|
|
370
|
-
" npx @agentwonderland/mcp setup",
|
|
371
|
-
" npx @agentwonderland/mcp setup --clients codex,claude-code",
|
|
372
|
-
" npx @agentwonderland/mcp setup --all --yes",
|
|
370
|
+
" npx -y @agentwonderland/mcp@latest setup",
|
|
371
|
+
" npx -y @agentwonderland/mcp@latest setup --clients codex,claude-code",
|
|
372
|
+
" npx -y @agentwonderland/mcp@latest setup --all --yes",
|
|
373
373
|
"",
|
|
374
374
|
"Supported clients:",
|
|
375
375
|
` ${CLIENT_ORDER.join(", ")}`,
|