@agentwonderland/mcp 0.1.49 → 0.1.50

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.
@@ -124,16 +124,16 @@ describe("payment method initialization", () => {
124
124
  networkId: "profile_test",
125
125
  });
126
126
  expect(mockCreateLinkSharedPaymentToken).toHaveBeenCalledWith(expect.objectContaining({
127
- amount: "10000",
127
+ amount: "2000",
128
128
  currency: "usd",
129
129
  networkId: "profile_test",
130
130
  paymentMethodId: "csmrpd_link_123",
131
131
  }));
132
132
  const linkTokenRequest = mockCreateLinkSharedPaymentToken.mock.calls[0]?.[0];
133
- expect(linkTokenRequest?.context).toContain("up to USD 100.00");
133
+ expect(linkTokenRequest?.context).toContain("up to USD 20.00");
134
134
  expect(linkTokenRequest?.context).toContain("quoted at USD 0.25");
135
135
  });
136
- it("keeps Link approval floor at $100 even if a low env override is present", async () => {
136
+ it("allows a low env override while never approving below the quoted amount", async () => {
137
137
  process.env.AGENTWONDERLAND_LINK_APPROVAL_LIMIT_CENTS = "10";
138
138
  currentLink = {
139
139
  paymentMethodId: "csmrpd_link_123",
@@ -143,13 +143,13 @@ describe("payment method initialization", () => {
143
143
  await getPaymentFetch("link");
144
144
  const stripeConfig = mockStripe.mock.calls[0]?.[0];
145
145
  await stripeConfig.createToken({
146
- amount: "10",
146
+ amount: "25",
147
147
  currency: "usd",
148
148
  expiresAt: 1778290000,
149
149
  networkId: "profile_test",
150
150
  });
151
151
  expect(mockCreateLinkSharedPaymentToken).toHaveBeenCalledWith(expect.objectContaining({
152
- amount: "10000",
152
+ amount: "25",
153
153
  }));
154
154
  });
155
155
  it("advertises Link as Stripe SPT compatibility", async () => {
@@ -26,7 +26,7 @@ const REGISTRY_METHOD_MAP = {
26
26
  card: "stripe_card",
27
27
  link: "stripe_card",
28
28
  };
29
- const DEFAULT_LINK_APPROVAL_LIMIT_CENTS = 10_000;
29
+ const DEFAULT_LINK_APPROVAL_LIMIT_CENTS = 2_000;
30
30
  const ACCEPTED_PAYMENT_ALIASES = {
31
31
  tempo: ["tempo_usdc", "tempo"],
32
32
  base: ["base_usdc", "base"],
@@ -165,7 +165,7 @@ function getLinkApprovalLimitAmount(actualAmount) {
165
165
  const actualAmountCents = Number(actualAmount);
166
166
  const configuredLimit = Number(process.env.AGENTWONDERLAND_LINK_APPROVAL_LIMIT_CENTS);
167
167
  const defaultLimit = Number.isFinite(configuredLimit) && configuredLimit > 0
168
- ? Math.max(Math.floor(configuredLimit), DEFAULT_LINK_APPROVAL_LIMIT_CENTS)
168
+ ? Math.floor(configuredLimit)
169
169
  : DEFAULT_LINK_APPROVAL_LIMIT_CENTS;
170
170
  return String(Math.max(actualAmountCents, defaultLimit));
171
171
  }
@@ -1 +1 @@
1
- export declare const MCP_PACKAGE_VERSION = "0.1.49";
1
+ export declare const MCP_PACKAGE_VERSION = "0.1.50";
@@ -1 +1 @@
1
- export const MCP_PACKAGE_VERSION = "0.1.49";
1
+ export const MCP_PACKAGE_VERSION = "0.1.50";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentwonderland/mcp",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "type": "module",
5
5
  "description": "MCP server for the Agent Wonderland AI agent marketplace",
6
6
  "bin": {
@@ -166,18 +166,18 @@ describe("payment method initialization", () => {
166
166
 
167
167
  expect(mockCreateLinkSharedPaymentToken).toHaveBeenCalledWith(
168
168
  expect.objectContaining({
169
- amount: "10000",
169
+ amount: "2000",
170
170
  currency: "usd",
171
171
  networkId: "profile_test",
172
172
  paymentMethodId: "csmrpd_link_123",
173
173
  }),
174
174
  );
175
175
  const linkTokenRequest = mockCreateLinkSharedPaymentToken.mock.calls[0]?.[0] as { context: string } | undefined;
176
- expect(linkTokenRequest?.context).toContain("up to USD 100.00");
176
+ expect(linkTokenRequest?.context).toContain("up to USD 20.00");
177
177
  expect(linkTokenRequest?.context).toContain("quoted at USD 0.25");
178
178
  });
179
179
 
180
- it("keeps Link approval floor at $100 even if a low env override is present", async () => {
180
+ it("allows a low env override while never approving below the quoted amount", async () => {
181
181
  process.env.AGENTWONDERLAND_LINK_APPROVAL_LIMIT_CENTS = "10";
182
182
  currentLink = {
183
183
  paymentMethodId: "csmrpd_link_123",
@@ -196,7 +196,7 @@ describe("payment method initialization", () => {
196
196
  }) => Promise<string>;
197
197
  };
198
198
  await stripeConfig.createToken({
199
- amount: "10",
199
+ amount: "25",
200
200
  currency: "usd",
201
201
  expiresAt: 1778290000,
202
202
  networkId: "profile_test",
@@ -204,7 +204,7 @@ describe("payment method initialization", () => {
204
204
 
205
205
  expect(mockCreateLinkSharedPaymentToken).toHaveBeenCalledWith(
206
206
  expect.objectContaining({
207
- amount: "10000",
207
+ amount: "25",
208
208
  }),
209
209
  );
210
210
  });
@@ -41,7 +41,7 @@ const REGISTRY_METHOD_MAP: Record<string, string> = {
41
41
  link: "stripe_card",
42
42
  };
43
43
 
44
- const DEFAULT_LINK_APPROVAL_LIMIT_CENTS = 10_000;
44
+ const DEFAULT_LINK_APPROVAL_LIMIT_CENTS = 2_000;
45
45
 
46
46
  const ACCEPTED_PAYMENT_ALIASES: Record<string, string[]> = {
47
47
  tempo: ["tempo_usdc", "tempo"],
@@ -201,7 +201,7 @@ function getLinkApprovalLimitAmount(actualAmount: string): string {
201
201
  const actualAmountCents = Number(actualAmount);
202
202
  const configuredLimit = Number(process.env.AGENTWONDERLAND_LINK_APPROVAL_LIMIT_CENTS);
203
203
  const defaultLimit = Number.isFinite(configuredLimit) && configuredLimit > 0
204
- ? Math.max(Math.floor(configuredLimit), DEFAULT_LINK_APPROVAL_LIMIT_CENTS)
204
+ ? Math.floor(configuredLimit)
205
205
  : DEFAULT_LINK_APPROVAL_LIMIT_CENTS;
206
206
  return String(Math.max(actualAmountCents, defaultLimit));
207
207
  }
@@ -1 +1 @@
1
- export const MCP_PACKAGE_VERSION = "0.1.49";
1
+ export const MCP_PACKAGE_VERSION = "0.1.50";