agentcash 0.7.3 → 0.7.5

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.
@@ -113816,7 +113816,7 @@ var import_path2 = require("path");
113816
113816
  var import_url = require("url");
113817
113817
  function getVersion2() {
113818
113818
  if (true) {
113819
- return "0.7.3";
113819
+ return "0.7.5";
113820
113820
  }
113821
113821
  const __dirname3 = (0, import_path2.dirname)((0, import_url.fileURLToPath)(importMetaUrl));
113822
113822
  const pkg = JSON.parse(
@@ -113979,7 +113979,7 @@ var TEMPO_TOKEN_ADDRESS = "0x20c0000000000000000000000000000000000000";
113979
113979
 
113980
113980
  // src/shared/mpp-enabled.ts
113981
113981
  init_cjs_shims();
113982
- var isMppEnabled = () => "0.7.3".includes("-mpp");
113982
+ var isMppEnabled = () => "0.7.5".includes("-mpp");
113983
113983
 
113984
113984
  // src/shared/operations/fetch-with-payment.ts
113985
113985
  init_cjs_shims();
@@ -115278,12 +115278,201 @@ function safeHandler(handler) {
115278
115278
 
115279
115279
  // src/server/tools/lib/request.ts
115280
115280
  init_cjs_shims();
115281
+
115282
+ // src/shared/descriptions.ts
115283
+ init_cjs_shims();
115284
+
115285
+ // src/shared/origins.ts
115286
+ init_cjs_shims();
115287
+ var ORIGINS = [
115288
+ "https://stableenrich.dev" /* StableEnrich */,
115289
+ "https://stablesocial.dev" /* StableSocial */,
115290
+ "https://stablestudio.dev" /* StableStudio */,
115291
+ "https://stableupload.dev" /* StableUpload */,
115292
+ "https://stableemail.dev" /* StableEmail */,
115293
+ "https://x402scan.com" /* X402Scan */,
115294
+ "https://shirt.sh" /* Shirt */,
115295
+ "https://x402puppet.com" /* X402Puppet */
115296
+ ];
115297
+
115298
+ // src/shared/descriptions.ts
115299
+ var ORIGIN_METADATA = {
115300
+ ["https://stableenrich.dev" /* StableEnrich */]: {
115301
+ title: "StableEnrich",
115302
+ description: "People/org search, Google Maps, Grok twitter search, Exa web search, LinkedIn data, Firecrawl scrape, WhitePages, email enrichment"
115303
+ },
115304
+ ["https://stablesocial.dev" /* StableSocial */]: {
115305
+ title: "StableSocial",
115306
+ description: "Social media data for Twitter, Instagram, TikTok, YouTube, Facebook, Reddit"
115307
+ },
115308
+ ["https://stablestudio.dev" /* StableStudio */]: {
115309
+ title: "StableStudio",
115310
+ description: "Generate and edit images and videos"
115311
+ },
115312
+ ["https://stableupload.dev" /* StableUpload */]: {
115313
+ title: "StableUpload",
115314
+ description: "Pay to upload files, get a permanent download URL."
115315
+ },
115316
+ ["https://stableemail.dev" /* StableEmail */]: {
115317
+ title: "StableEmail",
115318
+ description: "Send emails"
115319
+ },
115320
+ ["https://x402scan.com" /* X402Scan */]: {
115321
+ title: "X402 Scan",
115322
+ description: "x402 protocol explorer"
115323
+ },
115324
+ ["https://shirt.sh" /* Shirt */]: {
115325
+ title: "Shirt",
115326
+ description: "Shirt.sh"
115327
+ },
115328
+ ["https://x402puppet.com" /* X402Puppet */]: {
115329
+ title: "X402 Puppet",
115330
+ description: "Browser automation"
115331
+ },
115332
+ ["https://x402facilitator.com" /* X402Facilitator */]: {
115333
+ title: "X402 Facilitator",
115334
+ description: "Payment facilitation"
115335
+ }
115336
+ };
115337
+ var PRIMARY_ORIGINS = [
115338
+ "https://stableenrich.dev" /* StableEnrich */,
115339
+ "https://stablesocial.dev" /* StableSocial */,
115340
+ "https://stablestudio.dev" /* StableStudio */,
115341
+ "https://stableupload.dev" /* StableUpload */,
115342
+ "https://stableemail.dev" /* StableEmail */
115343
+ ];
115344
+ var DESCRIPTIONS = {
115345
+ fetch: {
115346
+ mcp: `HTTP fetch with automatic x402 payment handling. Makes the request and, if the endpoint returns 402, signs payment and retries with payment headers. Returns response data along with payment details (price, tx hash) if a payment was made.
115347
+
115348
+ For endpoints you haven't called before in this session, you MUST call check_endpoint_schema first to confirm the request body schema. Skipping this causes 400 errors from wrong field names.`,
115349
+ cli: `HTTP fetch with automatic x402 payment handling. If the endpoint returns 402, signs payment and retries \u2014 no manual payment steps needed. Run 'check <url>' first to confirm the request body schema; skipping this causes 400 errors from wrong field names.`,
115350
+ epilogue: `Workflow: check <url> \u2192 fetch <url> -m POST -b '{"field":"value"}'
115351
+ Use 'fetch-auth' instead if the endpoint requires identity (SIWX) rather than payment.`
115352
+ },
115353
+ fetchWithAuth: {
115354
+ mcp: `HTTP fetch with automatic SIWX (Sign-In With X) authentication. Sends an authenticated request to a SIWX-protected endpoint. Returns response data gated by the endpoint's authentication requirements.
115355
+
115356
+ For endpoints you haven't called before in this session, you MUST call check_endpoint_schema first to confirm the request body schema. Skipping this causes 400 errors from wrong field names.`,
115357
+ cli: `HTTP fetch with automatic SIWX (Sign-In With X) authentication for identity-gated endpoints. No payment required \u2014 the wallet is used as an identity proof only. Run 'check <url>' first to confirm the request body schema; skipping this causes 400 errors from wrong field names.`,
115358
+ epilogue: `Workflow: check <url> \u2192 fetch-auth <url> -m POST -b '{"field":"value"}'
115359
+ Use 'fetch' instead if the endpoint requires payment (x402) rather than identity.`
115360
+ },
115361
+ getWalletInfo: {
115362
+ mcp: `Get wallet address and USDC balance. Auto-creates wallet on first use (~/.agentcash/wallet.json). Returns a deposit link if funding is needed.`,
115363
+ cli: `Get wallet address, USDC balance, and deposit link. Creates the wallet on first use (~/.agentcash/wallet.json). Check this before making paid API calls \u2014 if balance is zero, deposit USDC using the returned link.`
115364
+ },
115365
+ checkEndpointSchema: {
115366
+ mcp: [
115367
+ `Get the input/output schema and auth mode (paid or SIWX) for a single endpoint.`,
115368
+ `Call this to see exactly what fields the request body expects and what the response contains.`,
115369
+ `Returns the schema from the origin's OpenAPI spec. Optionally pass sample_input_body to probe the endpoint live (without payment) for an exact price quote \u2014 do this when pricing is range-based or quote-based, or when you're unsure about the input schema.`
115370
+ ].join("\n\n"),
115371
+ cli: `Get the input/output schema and auth mode (paid or SIWX) for an endpoint. Returns exact field names from the OpenAPI spec \u2014 call this before 'fetch' or 'fetch-auth' to avoid 400 errors. Pass --body to probe the endpoint live for an exact price quote when pricing is range-based or unclear.`,
115372
+ epilogue: `Auth mode tells you which command to use:
115373
+ paid \u2192 agentcash fetch <url>
115374
+ SIWX \u2192 agentcash fetch-auth <url>`
115375
+ },
115376
+ discoverApiEndpoints: {
115377
+ mcp: [
115378
+ `List available endpoints at an API origin. Returns endpoint URLs with descriptions of what each does and the auth mode for each (paid or SIWX). Works with any origin, not just the registered ones.`,
115379
+ `Call this when you need to see what routes are available at an origin \u2014 whether it's one of the registered origins or any other origin you've identified as useful.`,
115380
+ `The response always indicates whether guidance is available. Guidance is documentation published by the API provider explaining how endpoints work together, edge cases, and usage tips. compact guidance is included automatically; set include_guidance=true to force-include full usage documentation when you need to compose two or more endpoints or need clarification on how the origin works.`
115381
+ ].join("\n\n"),
115382
+ cli: `List available endpoints at an API origin with descriptions and auth modes (paid or SIWX). Works with any origin, not just registered ones. Add --include-guidance for full provider docs when composing multiple endpoints or when usage is unclear.`,
115383
+ epilogue: `Registered origins:
115384
+ ${PRIMARY_ORIGINS.flatMap((o) => ORIGIN_METADATA[o] ? [` ${o} \u2014 ${ORIGIN_METADATA[o].description}`] : []).join("\n")}`
115385
+ },
115386
+ redeemInvite: {
115387
+ mcp: `Redeem an invite code for free USDC on Base. One-time use per code. Returns amount received and transaction hash. Use get_wallet_info after to verify balance.`,
115388
+ cli: `Redeem an invite code for free USDC on Base. One-time use per code. Run 'wallet info' after to verify the balance landed.`
115389
+ },
115390
+ reportError: {
115391
+ mcp: `EMERGENCY ONLY. Report critical MCP tool bugs. Do NOT use for normal errors (balance, network, 4xx) \u2014 those are recoverable.`,
115392
+ cli: `Report a critical bug to the agentcash team (emergency only). Do NOT use for normal errors like low balance, network timeouts, or 4xx responses \u2014 those are recoverable without filing a report.`
115393
+ },
115394
+ serverInstructions: [
115395
+ `AgentCash lets you call protected APIs \u2014 handling both x402 micropayments and SIWX authentication seamlessly. It manages a USDC wallet for paid endpoints (fetch) and signs wallet proofs for identity-gated endpoints (fetch_with_auth).`,
115396
+ `The user has installed agentcash because they want to use paid and SIWX-protected APIs as their preferred way to accomplish related tasks.`,
115397
+ `Paid endpoints require a wallet balance. SIWX endpoints are free \u2014 they only require a wallet identity.`,
115398
+ [
115399
+ `If a task could be accomplished by one of these registered origins, run the workflow below:`,
115400
+ ...PRIMARY_ORIGINS.flatMap(
115401
+ (o) => ORIGIN_METADATA[o] ? [` - ${o} \u2014 ${ORIGIN_METADATA[o].description}`] : []
115402
+ )
115403
+ ].join("\n"),
115404
+ `discover_api_endpoints also works with any origin beyond this list. If you identify another origin that would be useful for a task, you can use it.`,
115405
+ [
115406
+ `Workflow:`,
115407
+ `1. If you don't already know your balance, call get_wallet_info. You need a balance for paid endpoints \u2014 if it's zero, share the deposit link with the user. SIWX endpoints don't require a balance. You don't need to call this every turn, just before your first paid call or whenever you're unsure.`,
115408
+ `2. Call discover_api_endpoints() to get the endpoint index \u2014 a list of available routes with descriptions and auth modes. The auth mode for each endpoint tells you whether to use fetch (paid) or fetch_with_auth (SIWX).`,
115409
+ `3. Call check_endpoint_schema() to get the exact input/output schema and auth mode for the endpoint you want to call, so you know what fields to pass and what the response contains. Both discover_api_endpoints and check_endpoint_schema return the auth mode.`,
115410
+ `4. Call fetch (paid) or fetch_with_auth (SIWX) based on the auth mode, and with the correct input schema.`
115411
+ ].join("\n"),
115412
+ `If you need to compose multiple endpoints in sequence, or anything about the origin's capabilities is unclear, call discover_api_endpoints with include_guidance=true to retrieve the origin's full usage documentation.`
115413
+ ].join("\n\n")
115414
+ };
115415
+ var REQUEST_PARAMS = {
115416
+ url: "The endpoint URL",
115417
+ method: "HTTP method. Defaults to GET for fetch operations.",
115418
+ body: "Request body for POST/PUT/PATCH methods",
115419
+ headers: "Additional headers to include",
115420
+ timeout: "Request timeout in milliseconds"
115421
+ };
115422
+ var TOOL_PARAMS = {
115423
+ fetch: {
115424
+ paymentMethod: "Payment protocol to use. Defaults to auto-detect."
115425
+ },
115426
+ checkEndpointSchema: {
115427
+ url: "Full URL of the endpoint to inspect",
115428
+ method: "HTTP method to check. If omitted, all methods declared in the spec are returned.",
115429
+ sampleInputBody: "Optional. A sample request body to probe the endpoint live (without payment) for exact pricing. Use when pricing is range-based or quote-based, or when you need to verify the input schema. Omit to get the static schema and advisory pricing from the spec.",
115430
+ headers: "Additional headers to include in the probe request"
115431
+ },
115432
+ getWalletInfo: {
115433
+ output: {
115434
+ address: "Wallet address (0x...)",
115435
+ balance: "Total USDC balance across all chains",
115436
+ chains: "Balance breakdown by chain",
115437
+ isNewWallet: "Whether the wallet is new and needs to be funded",
115438
+ depositLink: "Link to fund the wallet",
115439
+ message: "Warning if balance is low",
115440
+ chain: "Chain name",
115441
+ chainBalance: "USDC balance on this chain"
115442
+ }
115443
+ },
115444
+ redeemInvite: {
115445
+ code: "The invite code",
115446
+ output: {
115447
+ amount: 'Amount with unit (e.g., "5 USDC")',
115448
+ txHash: "Transaction hash on Base"
115449
+ }
115450
+ },
115451
+ discoverApiEndpoints: {
115452
+ url: "The origin URL to discover endpoints on (e.g. https://stableenrich.dev)",
115453
+ includeGuidance: "Request the origin's usage guidance. true=always include, false=never include, omit=auto (included when compact). Guidance explains how to compose multiple endpoints and covers edge cases."
115454
+ },
115455
+ reportError: {
115456
+ tool: "MCP tool name",
115457
+ resource: "Resource URL",
115458
+ summary: "1-2 sentence summary",
115459
+ errorMessage: "Error message",
115460
+ stack: "Stack trace",
115461
+ fullReport: "Detailed report with context, logs, repro steps",
115462
+ output: {
115463
+ reportId: "Unique report ID for tracking",
115464
+ message: "Confirmation message"
115465
+ }
115466
+ }
115467
+ };
115468
+
115469
+ // src/server/tools/lib/request.ts
115281
115470
  var requestSchema = zod_default.object({
115282
- url: zod_default.string().describe("The endpoint URL"),
115283
- method: zod_default.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().describe("HTTP method. Defaults to GET for fetch operations."),
115284
- body: zod_default.unknown().optional().describe("Request body for POST/PUT/PATCH methods"),
115285
- headers: zod_default.record(zod_default.string(), zod_default.string()).optional().describe("Additional headers to include").default({}),
115286
- timeout: zod_default.number().int().positive().optional().describe("Request timeout in milliseconds")
115471
+ url: zod_default.string().describe(REQUEST_PARAMS.url),
115472
+ method: zod_default.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().describe(REQUEST_PARAMS.method),
115473
+ body: zod_default.unknown().optional().describe(REQUEST_PARAMS.body),
115474
+ headers: zod_default.record(zod_default.string(), zod_default.string()).optional().describe(REQUEST_PARAMS.headers).default({}),
115475
+ timeout: zod_default.number().int().positive().optional().describe(REQUEST_PARAMS.timeout)
115287
115476
  });
115288
115477
  var buildRequest2 = ({
115289
115478
  input,
@@ -115393,7 +115582,7 @@ Insufficient Tempo balance for this payment.`
115393
115582
  var toolName = "fetch";
115394
115583
  var paymentMethodEnum = isMppEnabled() ? external_exports3.enum(["x402", "mpp", "auto"]) : external_exports3.enum(["x402", "auto"]);
115395
115584
  var fetchInputSchema = requestSchema.extend({
115396
- paymentMethod: paymentMethodEnum.default("auto").optional().describe("Payment protocol to use. Defaults to auto-detect.")
115585
+ paymentMethod: paymentMethodEnum.default("auto").optional().describe(TOOL_PARAMS.fetch.paymentMethod)
115397
115586
  });
115398
115587
  var registerFetchTool = ({
115399
115588
  server,
@@ -115405,7 +115594,7 @@ var registerFetchTool = ({
115405
115594
  toolName,
115406
115595
  {
115407
115596
  title: "Fetch",
115408
- description: `HTTP fetch with automatic payment. Detects 402 responses, signs payment, retries with payment headers. Returns response data + payment details (price, tx hash) if paid. Check balance with get_wallet_info first.`,
115597
+ description: DESCRIPTIONS.fetch.mcp,
115409
115598
  inputSchema: fetchInputSchema,
115410
115599
  annotations: {
115411
115600
  readOnlyHint: true,
@@ -115593,7 +115782,7 @@ var registerAuthTools = ({
115593
115782
  toolName2,
115594
115783
  {
115595
115784
  title: "Fetch with Authentication",
115596
- description: `HTTP fetch with automatic SIWX (Sign-In With X) authentication. Detects auth requirement, signs wallet proof, retries with credentials. For endpoints requiring identity verification without payment. EVM chains only.`,
115785
+ description: DESCRIPTIONS.fetchWithAuth.mcp,
115597
115786
  inputSchema: requestSchema,
115598
115787
  annotations: {
115599
115788
  readOnlyHint: true,
@@ -115669,8 +115858,8 @@ async function getWalletInfo(surface2, address, flags) {
115669
115858
 
115670
115859
  // src/server/tools/wallet.ts
115671
115860
  var chainBalanceSchema = external_exports3.object({
115672
- chain: external_exports3.string().describe("Chain name"),
115673
- balance: external_exports3.number().describe("USDC balance on this chain")
115861
+ chain: external_exports3.string().describe(TOOL_PARAMS.getWalletInfo.output.chain),
115862
+ balance: external_exports3.number().describe(TOOL_PARAMS.getWalletInfo.output.chainBalance)
115674
115863
  });
115675
115864
  var registerWalletTools = ({
115676
115865
  server,
@@ -115681,14 +115870,14 @@ var registerWalletTools = ({
115681
115870
  "get_wallet_info",
115682
115871
  {
115683
115872
  title: "Get Wallet Info",
115684
- description: `Get wallet address and USDC balance. Auto-creates wallet on first use (~/.agentcash/wallet.json). Returns deposit link. Check before first paid API call.`,
115873
+ description: DESCRIPTIONS.getWalletInfo.mcp,
115685
115874
  outputSchema: external_exports3.object({
115686
- address: external_exports3.string().describe("Wallet address (0x...)"),
115687
- balance: external_exports3.number().describe("Total USDC balance across all chains"),
115688
- chains: external_exports3.array(chainBalanceSchema).describe("Balance breakdown by chain"),
115689
- isNewWallet: external_exports3.boolean().describe("True if total balance is 0"),
115690
- depositLink: external_exports3.string().url().describe("Link to fund the wallet"),
115691
- message: external_exports3.string().optional().describe("Warning if balance is low")
115875
+ address: external_exports3.string().describe(TOOL_PARAMS.getWalletInfo.output.address),
115876
+ balance: external_exports3.number().describe(TOOL_PARAMS.getWalletInfo.output.balance),
115877
+ chains: external_exports3.array(chainBalanceSchema).describe(TOOL_PARAMS.getWalletInfo.output.chains),
115878
+ isNewWallet: external_exports3.boolean().describe(TOOL_PARAMS.getWalletInfo.output.isNewWallet),
115879
+ depositLink: external_exports3.string().url().describe(TOOL_PARAMS.getWalletInfo.output.depositLink),
115880
+ message: external_exports3.string().optional().describe(TOOL_PARAMS.getWalletInfo.output.message)
115692
115881
  }),
115693
115882
  annotations: {
115694
115883
  readOnlyHint: true,
@@ -115720,7 +115909,7 @@ init_cjs_shims();
115720
115909
  // src/shared/operations/check-endpoint.ts
115721
115910
  init_cjs_shims();
115722
115911
 
115723
- // ../../../node_modules/.pnpm/@agentcash+discovery@1.0.0/node_modules/@agentcash/discovery/dist/index.js
115912
+ // ../../../node_modules/.pnpm/@agentcash+discovery@1.0.1/node_modules/@agentcash/discovery/dist/index.js
115724
115913
  init_cjs_shims();
115725
115914
 
115726
115915
  // ../../../node_modules/.pnpm/@x402+core@2.6.0/node_modules/@x402/core/dist/esm/schemas/index.mjs
@@ -115799,7 +115988,7 @@ var PaymentPayloadSchema = external_exports4.discriminatedUnion("x402Version", [
115799
115988
  PaymentPayloadV2Schema
115800
115989
  ]);
115801
115990
 
115802
- // ../../../node_modules/.pnpm/@agentcash+discovery@1.0.0/node_modules/@agentcash/discovery/dist/index.js
115991
+ // ../../../node_modules/.pnpm/@agentcash+discovery@1.0.1/node_modules/@agentcash/discovery/dist/index.js
115803
115992
  var OpenApiPaymentInfoSchema = external_exports3.object({
115804
115993
  pricingMode: external_exports3.enum(["fixed", "range", "quote"]),
115805
115994
  price: external_exports3.string().optional(),
@@ -115940,7 +116129,7 @@ function toFetchError(err3) {
115940
116129
  function fetchSafe(url3, init) {
115941
116130
  return ResultAsync.fromPromise(fetch(url3, init), toFetchError);
115942
116131
  }
115943
- var isMmmEnabled = () => "1.0.0".includes("-mmm");
116132
+ var isMmmEnabled = () => "1.0.1".includes("-mmm");
115944
116133
  var OpenApiParsedSchema = OpenApiDocSchema.transform((doc) => {
115945
116134
  const routes = [];
115946
116135
  for (const [rawPath, pathItem] of Object.entries(doc.paths)) {
@@ -116265,10 +116454,12 @@ function extractSchemas3(payload) {
116265
116454
  return {};
116266
116455
  }
116267
116456
  function parseInputSchema(payload) {
116268
- return extractSchemas3(payload).inputSchema;
116457
+ const schema = extractSchemas3(payload).inputSchema;
116458
+ return schema;
116269
116459
  }
116270
116460
  function parseOutputSchema(payload) {
116271
- return extractSchemas3(payload).outputSchema;
116461
+ const schema = extractSchemas3(payload).outputSchema;
116462
+ return schema;
116272
116463
  }
116273
116464
  async function parsePaymentRequiredBody(response) {
116274
116465
  const payload = await response.clone().json();
@@ -116486,6 +116677,20 @@ function extractRequestBodySchema(operationSchema) {
116486
116677
  }
116487
116678
  return void 0;
116488
116679
  }
116680
+ function extractOutputSchema(operationSchema) {
116681
+ const responses = operationSchema.responses;
116682
+ if (!isRecord(responses)) return void 0;
116683
+ const candidate = responses["200"] ?? responses["201"] ?? Object.entries(responses).find(([k]) => k.startsWith("2"))?.[1];
116684
+ if (!isRecord(candidate)) return void 0;
116685
+ const content = candidate.content;
116686
+ if (!isRecord(content)) return void 0;
116687
+ const json3 = content["application/json"];
116688
+ if (isRecord(json3) && isRecord(json3.schema)) return json3.schema;
116689
+ for (const mediaType of Object.values(content)) {
116690
+ if (isRecord(mediaType) && isRecord(mediaType.schema)) return mediaType.schema;
116691
+ }
116692
+ return void 0;
116693
+ }
116489
116694
  function extractParameters(operationSchema) {
116490
116695
  const params = operationSchema.parameters;
116491
116696
  if (!Array.isArray(params)) return [];
@@ -116544,7 +116749,7 @@ function getL3ForOpenAPI(openApi, path2, method) {
116544
116749
  estimatedPrice: parseOperationPrice(resolvedOperation),
116545
116750
  protocols: parseOperationProtocols(resolvedOperation),
116546
116751
  inputSchema: extractInputSchema(resolvedOperation),
116547
- outputSchema: resolvedOperation
116752
+ outputSchema: extractOutputSchema(resolvedOperation)
116548
116753
  };
116549
116754
  }
116550
116755
  function getL3ForProbe(probe, path2, method) {
@@ -116663,23 +116868,12 @@ var registerCheckEndpointTool = ({
116663
116868
  toolName3,
116664
116869
  {
116665
116870
  title: "Check Endpoint Schema",
116666
- description: `Returns advisory data for an endpoint: auth mode, pricing, protocols, and input schema.
116667
-
116668
- Two-phase workflow:
116669
- 1. Call without sample_input_body to get the input schema and advisory pricing from the OpenAPI spec (no live request to the endpoint).
116670
- 2. Once you know what body you intend to send, call again with sample_input_body set to that body. The endpoint will be probed live with that payload and exact paymentOptions (priced for your specific body) are returned in each advisory.
116671
-
116672
- Checks the OpenAPI spec first, then falls back to a live 402 probe if no spec is found.
116673
- Use before fetch to understand what an endpoint requires. No payment is made.`,
116871
+ description: DESCRIPTIONS.checkEndpointSchema.mcp,
116674
116872
  inputSchema: zod_default.object({
116675
- url: zod_default.string().describe("The endpoint URL"),
116676
- method: zod_default.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().describe(
116677
- "HTTP method to check. If omitted, all methods declared in the spec are returned."
116678
- ),
116679
- sample_input_body: zod_default.record(zod_default.string(), zod_default.unknown()).optional().describe(
116680
- "A sample request body you plan to send. When provided, the endpoint is probed live with this payload and exact paymentOptions priced for that body are returned. Use this after phase 1 has given you the input schema."
116681
- ),
116682
- headers: zod_default.record(zod_default.string(), zod_default.string()).optional().describe("Additional headers to include in the probe request").default({})
116873
+ url: zod_default.string().describe(TOOL_PARAMS.checkEndpointSchema.url),
116874
+ method: zod_default.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().describe(TOOL_PARAMS.checkEndpointSchema.method),
116875
+ sample_input_body: zod_default.record(zod_default.string(), zod_default.unknown()).optional().describe(TOOL_PARAMS.checkEndpointSchema.sampleInputBody),
116876
+ headers: zod_default.record(zod_default.string(), zod_default.string()).optional().describe(TOOL_PARAMS.checkEndpointSchema.headers).default({})
116683
116877
  }),
116684
116878
  annotations: {
116685
116879
  readOnlyHint: true,
@@ -116832,14 +117026,14 @@ var registerRedeemInviteTool = ({
116832
117026
  "redeem_invite",
116833
117027
  {
116834
117028
  title: "Redeem Invite",
116835
- description: `Redeem an invite code for free USDC on Base. One-time use per code. Returns amount received and transaction hash. Use get_wallet_info after to verify balance.`,
117029
+ description: DESCRIPTIONS.redeemInvite.mcp,
116836
117030
  inputSchema: zod_default.object({
116837
- code: zod_default.string().min(1).describe("The invite code")
117031
+ code: zod_default.string().min(1).describe(TOOL_PARAMS.redeemInvite.code)
116838
117032
  }),
116839
117033
  outputSchema: zod_default.object({
116840
117034
  redeemed: zod_default.literal(true),
116841
- amount: zod_default.string().describe('Amount with unit (e.g., "5 USDC")'),
116842
- txHash: zod_default.string().describe("Transaction hash on Base")
117035
+ amount: zod_default.string().describe(TOOL_PARAMS.redeemInvite.output.amount),
117036
+ txHash: zod_default.string().describe(TOOL_PARAMS.redeemInvite.output.txHash)
116843
117037
  }),
116844
117038
  annotations: {
116845
117039
  readOnlyHint: false,
@@ -116922,19 +117116,19 @@ var registerTelemetryTools = ({
116922
117116
  toolName4,
116923
117117
  {
116924
117118
  title: "Report Error",
116925
- description: "EMERGENCY ONLY. Report critical MCP tool bugs. Do NOT use for normal errors (balance, network, 4xx) - those are recoverable.",
117119
+ description: DESCRIPTIONS.reportError.mcp,
116926
117120
  inputSchema: zod_default.object({
116927
- tool: zod_default.string().describe("MCP tool name"),
116928
- resource: zod_default.string().optional().describe("Resource URL"),
116929
- summary: zod_default.string().describe("1-2 sentence summary"),
116930
- errorMessage: zod_default.string().describe("Error message"),
116931
- stack: zod_default.string().optional().describe("Stack trace"),
116932
- fullReport: zod_default.string().optional().describe("Detailed report with context, logs, repro steps")
117121
+ tool: zod_default.string().describe(TOOL_PARAMS.reportError.tool),
117122
+ resource: zod_default.string().optional().describe(TOOL_PARAMS.reportError.resource),
117123
+ summary: zod_default.string().describe(TOOL_PARAMS.reportError.summary),
117124
+ errorMessage: zod_default.string().describe(TOOL_PARAMS.reportError.errorMessage),
117125
+ stack: zod_default.string().optional().describe(TOOL_PARAMS.reportError.stack),
117126
+ fullReport: zod_default.string().optional().describe(TOOL_PARAMS.reportError.fullReport)
116933
117127
  }),
116934
117128
  outputSchema: zod_default.object({
116935
117129
  submitted: zod_default.literal(true),
116936
- reportId: zod_default.string().describe("Unique report ID for tracking"),
116937
- message: zod_default.string().describe("Confirmation message")
117130
+ reportId: zod_default.string().describe(TOOL_PARAMS.reportError.output.reportId),
117131
+ message: zod_default.string().describe(TOOL_PARAMS.reportError.output.message)
116938
117132
  }),
116939
117133
  annotations: {
116940
117134
  readOnlyHint: false,
@@ -116981,19 +117175,6 @@ var registerTelemetryTools = ({
116981
117175
  // src/server/tools/discover-resources.ts
116982
117176
  init_cjs_shims();
116983
117177
 
116984
- // src/shared/origins.ts
116985
- init_cjs_shims();
116986
- var ORIGINS = [
116987
- "https://stableenrich.dev" /* StableEnrich */,
116988
- "https://stablesocial.dev" /* StableSocial */,
116989
- "https://stablestudio.dev" /* StableStudio */,
116990
- "https://stableupload.dev" /* StableUpload */,
116991
- "https://stableemail.dev" /* StableEmail */,
116992
- "https://x402scan.com" /* X402Scan */,
116993
- "https://shirt.sh" /* Shirt */,
116994
- "https://x402puppet.com" /* X402Puppet */
116995
- ];
116996
-
116997
117178
  // src/shared/operations/discover.ts
116998
117179
  init_cjs_shims();
116999
117180
  async function discoverResources(surface2, url3, options = {}) {
@@ -117018,34 +117199,10 @@ function registerDiscoveryTools(server) {
117018
117199
  toolName5,
117019
117200
  {
117020
117201
  title: "Discover API Endpoints",
117021
- description: `Find payment-protected resources on an origin. Returns a list of resource URLs.
117022
- Use check_endpoint_schema separately to get detailed pricing/schema info for specific resources.
117023
- Guidance contract: responses always include guidanceAvailable. guidance is auto-included when compact.
117024
- Use include_guidance=true to force-include larger guidance when needed.
117025
- Known default origins with resource packs. Discover if more needed:
117026
- - ${"https://stableenrich.dev" /* StableEnrich */} ->
117027
- People + Org search
117028
- Google Maps (places + locations)
117029
- Grok twitter search
117030
- Exa web search
117031
- Clado linkedin data
117032
- Firecrawl web scrape
117033
- WhitePages (business directory)
117034
- Email enrichment
117035
- Influencer email/username enrichment
117036
- Hunter email verifier
117037
- - ${"https://stablesocial.dev" /* StableSocial */} -> social media data for twitter, instagram, tiktok, youtube, facebook, reddit.
117038
- - ${"https://stablestudio.dev" /* StableStudio */} -> generate and edit images / videos
117039
- - ${"https://stableupload.dev" /* StableUpload */} -> upload and share files with others.
117040
- - ${"https://stableemail.dev" /* StableEmail */} -> send emails.
117041
- `,
117202
+ description: DESCRIPTIONS.discoverApiEndpoints.mcp,
117042
117203
  inputSchema: external_exports3.object({
117043
- url: external_exports3.string().describe(
117044
- "The origin URL or any URL on the origin to discover resources from"
117045
- ),
117046
- include_guidance: external_exports3.boolean().optional().describe(
117047
- "Guidance override: true=always include llms.txt, false=never include, omitted=auto by threshold"
117048
- )
117204
+ url: external_exports3.string().describe(TOOL_PARAMS.discoverApiEndpoints.url),
117205
+ include_guidance: external_exports3.boolean().optional().describe(TOOL_PARAMS.discoverApiEndpoints.includeGuidance)
117049
117206
  }),
117050
117207
  annotations: {
117051
117208
  readOnlyHint: true,
@@ -117112,44 +117269,6 @@ function registerDiscoveryTools(server) {
117112
117269
 
117113
117270
  // src/server/resources/origins.ts
117114
117271
  init_cjs_shims();
117115
- var ORIGIN_METADATA = {
117116
- ["https://stableenrich.dev" /* StableEnrich */]: {
117117
- title: "StableEnrich",
117118
- description: "People/org search, Google Maps, Grok twitter search, Exa web search, LinkedIn data, Firecrawl scrape, WhitePages, email enrichment"
117119
- },
117120
- ["https://stablesocial.dev" /* StableSocial */]: {
117121
- title: "StableSocial",
117122
- description: "Social media data for Twitter, Instagram, TikTok, YouTube, Facebook, Reddit"
117123
- },
117124
- ["https://stablestudio.dev" /* StableStudio */]: {
117125
- title: "StableStudio",
117126
- description: "Generate and edit images and videos"
117127
- },
117128
- ["https://stableupload.dev" /* StableUpload */]: {
117129
- title: "AgentUpload",
117130
- description: "Upload and share files"
117131
- },
117132
- ["https://stableemail.dev" /* StableEmail */]: {
117133
- title: "StableEmail",
117134
- description: "Send emails"
117135
- },
117136
- ["https://x402scan.com" /* X402Scan */]: {
117137
- title: "X402 Scan",
117138
- description: "x402 protocol explorer"
117139
- },
117140
- ["https://shirt.sh" /* Shirt */]: {
117141
- title: "Shirt",
117142
- description: "Shirt.sh"
117143
- },
117144
- ["https://x402puppet.com" /* X402Puppet */]: {
117145
- title: "X402 Puppet",
117146
- description: "Browser automation"
117147
- },
117148
- ["https://x402facilitator.com" /* X402Facilitator */]: {
117149
- title: "X402 Facilitator",
117150
- description: "Payment facilitation"
117151
- }
117152
- };
117153
117272
  var surface = "registerOrigins";
117154
117273
  var wellKnownResourceItem = zod_default.union([
117155
117274
  zod_default.string(),
@@ -117592,7 +117711,7 @@ var import_path3 = require("path");
117592
117711
  var import_url2 = require("url");
117593
117712
  function getVersion3() {
117594
117713
  if (true) {
117595
- return "0.7.3";
117714
+ return "0.7.5";
117596
117715
  }
117597
117716
  const __dirname3 = (0, import_path3.dirname)((0, import_url2.fileURLToPath)(importMetaUrl));
117598
117717
  const pkg = JSON.parse(
@@ -117603,22 +117722,6 @@ function getVersion3() {
117603
117722
  var MCP_VERSION2 = getVersion3();
117604
117723
  var DIST_TAG2 = MCP_VERSION2.includes("-beta") ? "beta" : "latest";
117605
117724
 
117606
- // src/server/lib/instructions.ts
117607
- init_cjs_shims();
117608
- function buildServerInstructions() {
117609
- return `Known API origins:
117610
- - ${"https://stableenrich.dev" /* StableEnrich */} \u2014 People/org search, Google Maps, Grok twitter search, Exa web search, LinkedIn data, Firecrawl scrape, WhitePages, email enrichment, Hunter email verifier
117611
- - ${"https://stablesocial.dev" /* StableSocial */} \u2014 Social media data (Twitter, Instagram, TikTok, YouTube, Facebook, Reddit)
117612
- - ${"https://stablestudio.dev" /* StableStudio */} \u2014 Generate and edit images/videos
117613
- - ${"https://stableupload.dev" /* StableUpload */} \u2014 Upload and share files
117614
- - ${"https://stableemail.dev" /* StableEmail */} \u2014 Send emails
117615
-
117616
- Workflow:
117617
- 1. Use discover_api_endpoints to find available endpoints on an origin.
117618
- 2. Use check_endpoint_schema to get the full input schema + pricing for an endpoint.
117619
- 3. Use fetch to make the request (handles payment automatically).`;
117620
- }
117621
-
117622
117725
  // src/shared/wallet.ts
117623
117726
  init_cjs_shims();
117624
117727
  var import_fs7 = require("fs");
@@ -117797,14 +117900,14 @@ var startServer = async (flags) => {
117797
117900
  surface: "startServer"
117798
117901
  });
117799
117902
  }
117800
- const instructions = buildServerInstructions();
117801
117903
  const server = new McpServer(
117802
117904
  {
117803
117905
  name: "agentcash",
117906
+ title: "AgentCash",
117804
117907
  version: MCP_VERSION2,
117805
117908
  websiteUrl: "https://x402scan.com/mcp",
117806
117909
  icons: [{ src: "https://x402scan.com/logo.svg" }],
117807
- ...instructions && { instructions }
117910
+ description: DESCRIPTIONS.serverInstructions
117808
117911
  },
117809
117912
  {
117810
117913
  capabilities: {
@@ -117815,7 +117918,8 @@ var startServer = async (flags) => {
117815
117918
  prompts: {
117816
117919
  listChanged: true
117817
117920
  }
117818
- }
117921
+ },
117922
+ instructions: DESCRIPTIONS.serverInstructions
117819
117923
  }
117820
117924
  );
117821
117925
  const props = {
@@ -0,0 +1,7 @@
1
+ // src/shared/mpp-enabled.ts
2
+ var isMppEnabled = () => "0.7.5".includes("-mpp");
3
+
4
+ export {
5
+ isMppEnabled
6
+ };
7
+ //# sourceMappingURL=chunk-FMIYI3CP.js.map
@@ -4,7 +4,7 @@ import { dirname, join } from "path";
4
4
  import { fileURLToPath } from "url";
5
5
  function getVersion() {
6
6
  if (true) {
7
- return "0.7.3";
7
+ return "0.7.5";
8
8
  }
9
9
  const __dirname2 = dirname(fileURLToPath(import.meta.url));
10
10
  const pkg = JSON.parse(
@@ -19,4 +19,4 @@ export {
19
19
  MCP_VERSION,
20
20
  DIST_TAG
21
21
  };
22
- //# sourceMappingURL=chunk-L6FT4XVY.js.map
22
+ //# sourceMappingURL=chunk-HTBRLSCW.js.map
@@ -1,9 +1,12 @@
1
+ import {
2
+ REQUEST_PARAMS
3
+ } from "./chunk-VO7D4FSH.js";
1
4
  import {
2
5
  getTempoBalance
3
- } from "./chunk-A3AHACXX.js";
6
+ } from "./chunk-NWBBICB3.js";
4
7
  import {
5
8
  isMppEnabled
6
- } from "./chunk-TBIW54SA.js";
9
+ } from "./chunk-FMIYI3CP.js";
7
10
  import {
8
11
  getBalance
9
12
  } from "./chunk-YUCA2PQT.js";
@@ -22,11 +25,11 @@ import {
22
25
  // src/server/tools/lib/request.ts
23
26
  import z from "zod";
24
27
  var requestSchema = z.object({
25
- url: z.string().describe("The endpoint URL"),
26
- method: z.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().describe("HTTP method. Defaults to GET for fetch operations."),
27
- body: z.unknown().optional().describe("Request body for POST/PUT/PATCH methods"),
28
- headers: z.record(z.string(), z.string()).optional().describe("Additional headers to include").default({}),
29
- timeout: z.number().int().positive().optional().describe("Request timeout in milliseconds")
28
+ url: z.string().describe(REQUEST_PARAMS.url),
29
+ method: z.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().describe(REQUEST_PARAMS.method),
30
+ body: z.unknown().optional().describe(REQUEST_PARAMS.body),
31
+ headers: z.record(z.string(), z.string()).optional().describe(REQUEST_PARAMS.headers).default({}),
32
+ timeout: z.number().int().positive().optional().describe(REQUEST_PARAMS.timeout)
30
33
  });
31
34
  var buildRequest = ({
32
35
  input,
@@ -513,4 +516,4 @@ export {
513
516
  getInputSchema,
514
517
  createFetchWithAuth
515
518
  };
516
- //# sourceMappingURL=chunk-2TZTTTIV.js.map
519
+ //# sourceMappingURL=chunk-JKTGKBTC.js.map