agentcash 0.7.3 → 0.7.4

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/esm/index.js CHANGED
@@ -1,11 +1,14 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ DESCRIPTIONS
4
+ } from "./chunk-RY34EBJ4.js";
2
5
  import {
3
6
  isMppEnabled
4
- } from "./chunk-TBIW54SA.js";
7
+ } from "./chunk-OW3UV227.js";
5
8
  import "./chunk-JNYAKINU.js";
6
9
  import {
7
10
  MCP_VERSION
8
- } from "./chunk-L6FT4XVY.js";
11
+ } from "./chunk-HXRJ5ES4.js";
9
12
 
10
13
  // src/index.ts
11
14
  import yargs from "yargs";
@@ -54,7 +57,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
54
57
  }
55
58
  }).command(
56
59
  "fetch <url>",
57
- "HTTP fetch with automatic x402 payment handling",
60
+ DESCRIPTIONS.fetch.cli,
58
61
  (yargs2) => yargs2.positional("url", {
59
62
  type: "string",
60
63
  description: "The endpoint URL to fetch",
@@ -81,7 +84,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
81
84
  default: "auto"
82
85
  }),
83
86
  async (args) => {
84
- const { fetchCommand } = await import("./commands-CVVQU55P.js");
87
+ const { fetchCommand } = await import("./commands-M66YQJM7.js");
85
88
  await fetchCommand(
86
89
  {
87
90
  url: args.url,
@@ -95,7 +98,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
95
98
  }
96
99
  ).command(
97
100
  "fetch-auth <url>",
98
- "HTTP fetch with automatic SIWX (Sign-In With X) authentication",
101
+ DESCRIPTIONS.fetchWithAuth.cli,
99
102
  (yargs2) => yargs2.positional("url", {
100
103
  type: "string",
101
104
  description: "The endpoint URL to fetch",
@@ -116,7 +119,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
116
119
  description: "Additional headers as JSON object"
117
120
  }),
118
121
  async (args) => {
119
- const { fetchAuthCommand } = await import("./commands-CVVQU55P.js");
122
+ const { fetchAuthCommand } = await import("./commands-M66YQJM7.js");
120
123
  await fetchAuthCommand(
121
124
  {
122
125
  url: args.url,
@@ -129,7 +132,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
129
132
  }
130
133
  ).command(
131
134
  "check <url>",
132
- "Check endpoint for x402 pricing and schema without making payment",
135
+ DESCRIPTIONS.checkEndpointSchema.cli,
133
136
  (yargs2) => yargs2.positional("url", {
134
137
  type: "string",
135
138
  description: "The endpoint URL to check",
@@ -149,7 +152,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
149
152
  description: "Additional headers as JSON object"
150
153
  }),
151
154
  async (args) => {
152
- const { checkCommand } = await import("./commands-CVVQU55P.js");
155
+ const { checkCommand } = await import("./commands-M66YQJM7.js");
153
156
  await checkCommand(
154
157
  {
155
158
  url: args.url,
@@ -162,7 +165,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
162
165
  }
163
166
  ).command(
164
167
  "discover <url>",
165
- "Discover x402-protected endpoints on an origin",
168
+ DESCRIPTIONS.discoverApiEndpoints.cli,
166
169
  (yargs2) => yargs2.positional("url", {
167
170
  type: "string",
168
171
  description: "The origin URL to discover endpoints from",
@@ -172,7 +175,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
172
175
  description: "Guidance override: true=always include, false=never include, omitted=auto by threshold"
173
176
  }),
174
177
  async (args) => {
175
- const { discoverCommand } = await import("./commands-CVVQU55P.js");
178
+ const { discoverCommand } = await import("./commands-M66YQJM7.js");
176
179
  await discoverCommand(
177
180
  { url: args.url, includeGuidance: args.includeGuidance },
178
181
  args
@@ -187,7 +190,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
187
190
  demandOption: true
188
191
  }),
189
192
  async (args) => {
190
- const { registerCommand } = await import("./commands-CVVQU55P.js");
193
+ const { registerCommand } = await import("./commands-M66YQJM7.js");
191
194
  await registerCommand({ url: args.url }, args);
192
195
  }
193
196
  ).command(
@@ -199,7 +202,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
199
202
  demandOption: true
200
203
  }),
201
204
  async (args) => {
202
- const { addSkillCommand } = await import("./commands-CVVQU55P.js");
205
+ const { addSkillCommand } = await import("./commands-M66YQJM7.js");
203
206
  await addSkillCommand({ url: args.url }, args);
204
207
  }
205
208
  ).command(
@@ -210,7 +213,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
210
213
  description: "The invite code to redeem (optional)"
211
214
  }),
212
215
  async (args) => {
213
- const { onboardCommand } = await import("./commands-CVVQU55P.js");
216
+ const { onboardCommand } = await import("./commands-M66YQJM7.js");
214
217
  await onboardCommand({ code: args.code ?? args.invite }, args);
215
218
  }
216
219
  ).command(
@@ -218,22 +221,22 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
218
221
  "Wallet management commands",
219
222
  (yargs2) => yargs2.command(
220
223
  "info",
221
- "Get wallet address, balance, and deposit link",
224
+ DESCRIPTIONS.getWalletInfo.cli,
222
225
  (yargs3) => yargs3,
223
226
  async (args) => {
224
- const { walletInfoCommand } = await import("./commands-CVVQU55P.js");
227
+ const { walletInfoCommand } = await import("./commands-M66YQJM7.js");
225
228
  await walletInfoCommand({}, args);
226
229
  }
227
230
  ).command(
228
231
  "redeem <code>",
229
- "Redeem an invite code for free USDC",
232
+ DESCRIPTIONS.redeemInvite.cli,
230
233
  (yargs3) => yargs3.positional("code", {
231
234
  type: "string",
232
235
  description: "The invite code to redeem",
233
236
  demandOption: true
234
237
  }),
235
238
  async (args) => {
236
- const { walletRedeemCommand } = await import("./commands-CVVQU55P.js");
239
+ const { walletRedeemCommand } = await import("./commands-M66YQJM7.js");
237
240
  await walletRedeemCommand({ code: args.code }, args);
238
241
  }
239
242
  ).command(
@@ -241,7 +244,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
241
244
  "Get wallet address",
242
245
  (yargs3) => yargs3,
243
246
  async (args) => {
244
- const { walletAddressCommand } = await import("./commands-CVVQU55P.js");
247
+ const { walletAddressCommand } = await import("./commands-M66YQJM7.js");
245
248
  await walletAddressCommand({}, args);
246
249
  }
247
250
  ).demandCommand(1, "You must specify a wallet subcommand").strict(),
@@ -249,7 +252,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
249
252
  }
250
253
  ).command(
251
254
  "report-error",
252
- "Report a critical bug to the agentcash team (emergency only)",
255
+ DESCRIPTIONS.reportError.cli,
253
256
  (yargs2) => yargs2.option("tool", {
254
257
  type: "string",
255
258
  description: "The tool/command that failed",
@@ -273,7 +276,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
273
276
  description: "Detailed report with context and repro steps"
274
277
  }),
275
278
  async (args) => {
276
- const { reportErrorCommand } = await import("./commands-CVVQU55P.js");
279
+ const { reportErrorCommand } = await import("./commands-M66YQJM7.js");
277
280
  await reportErrorCommand(
278
281
  {
279
282
  tool: args.tool,
@@ -291,7 +294,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
291
294
  "Start the MCP server (default when no command specified)",
292
295
  (yargs2) => yargs2,
293
296
  async (args) => {
294
- const { serverCommand } = await import("./commands-CVVQU55P.js");
297
+ const { serverCommand } = await import("./commands-M66YQJM7.js");
295
298
  await serverCommand(args);
296
299
  }
297
300
  ).command(
@@ -304,7 +307,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
304
307
  default: isClaudeCode ? "claude-code" /* ClaudeCode */ : void 0
305
308
  }),
306
309
  async (args) => {
307
- const { installMcpServer } = await import("./install-FGWA5K3W.js");
310
+ const { installMcpServer } = await import("./install-4YDF4G6T.js");
308
311
  await installMcpServer(args);
309
312
  }
310
313
  ).command(
@@ -330,7 +333,7 @@ void yargs(hideBin(process.argv)).scriptName("agentcash").usage("$0 [command] [o
330
333
  ).example(
331
334
  "$0 onboard ABC123",
332
335
  "Install onboarding skill, configure MCP, and redeem an invite"
333
- ).example("$0 wallet info", "Get wallet balance").example("$0 wallet redeem ABC123", "Redeem invite code").example("$0", "Start MCP server (default)").example("$0 install --client cursor", "Install MCP for Cursor").strict().help().version(MCP_VERSION).parseAsync().catch((err) => {
336
+ ).example("$0 wallet info", "Get wallet balance").example("$0 wallet redeem ABC123", "Redeem invite code").example("$0", "Start MCP server (default)").example("$0 install --client cursor", "Install MCP for Cursor").strict().epilogue(DESCRIPTIONS.serverInstructions).help().version(MCP_VERSION).parseAsync().catch((err) => {
334
337
  const response = {
335
338
  success: false,
336
339
  error: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { Clients } from './cli/install/clients';\nimport { isMppEnabled } from '@/shared/mpp-enabled';\nimport { MCP_VERSION } from '@/shared/version';\n\nconst isClaudeCode = Boolean(process.env.CLAUDECODE);\nconst defaultYes = isClaudeCode || Boolean(process.env.CI);\n\nvoid yargs(hideBin(process.argv))\n .scriptName('agentcash')\n .usage('$0 [command] [options]')\n .option('dev', {\n type: 'boolean',\n description: 'Enable dev mode (use localhost endpoints)',\n default: false,\n })\n .option('invite', {\n type: 'string',\n description: 'Invite code to redeem for starter money',\n required: false,\n })\n .option('yes', {\n alias: 'y',\n type: 'boolean',\n description: 'Yes to all prompts',\n default: defaultYes ? true : undefined,\n })\n .option('sessionId', {\n type: 'string',\n description:\n 'Session ID for matching requests (auto-generated if not provided)',\n required: false,\n })\n .option('provider', {\n type: 'string',\n description: 'Provider to use for the MCP server',\n required: false,\n })\n .option('format', {\n type: 'string',\n description:\n 'Output format: json (default for pipes) or pretty (default for TTY)',\n choices: ['json', 'pretty'],\n })\n .option('quiet', {\n alias: 'q',\n type: 'boolean',\n description: 'Suppress stderr output',\n default: false,\n })\n .option('verbose', {\n alias: 'v',\n type: 'boolean',\n description: 'Enable verbose logging (debug output to stderr)',\n default: false,\n })\n .middleware(async argv => {\n // Configure CLI context for shared modules (like logging)\n if (argv.verbose) {\n const { configureCliContext } = await import('@/shared/cli-context');\n configureCliContext({ verbose: true });\n }\n })\n // ============================================================\n // Core CLI Commands (for agent/programmatic use)\n // ============================================================\n .command(\n 'fetch <url>',\n 'HTTP fetch with automatic x402 payment handling',\n yargs =>\n yargs\n .positional('url', {\n type: 'string',\n description: 'The endpoint URL to fetch',\n demandOption: true,\n })\n .option('method', {\n alias: 'm',\n type: 'string',\n description: 'HTTP method',\n choices: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],\n default: 'GET',\n })\n .option('body', {\n alias: 'b',\n type: 'string',\n description: 'Request body as JSON string',\n })\n .option('headers', {\n alias: 'H',\n type: 'string',\n description: 'Additional headers as JSON object',\n })\n .option('payment-method', {\n alias: 'p',\n type: 'string',\n description: 'Payment protocol to use',\n choices: isMppEnabled() ? ['x402', 'mpp', 'auto'] : ['x402', 'auto'],\n default: 'auto',\n }),\n async args => {\n const { fetchCommand } = await import('@/cli/commands');\n await fetchCommand(\n {\n url: args.url,\n method: args.method,\n body: args.body,\n headers: args.headers,\n paymentMethod: args.paymentMethod,\n },\n args\n );\n }\n )\n .command(\n 'fetch-auth <url>',\n 'HTTP fetch with automatic SIWX (Sign-In With X) authentication',\n yargs =>\n yargs\n .positional('url', {\n type: 'string',\n description: 'The endpoint URL to fetch',\n demandOption: true,\n })\n .option('method', {\n alias: 'm',\n type: 'string',\n description: 'HTTP method',\n choices: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],\n default: 'GET',\n })\n .option('body', {\n alias: 'b',\n type: 'string',\n description: 'Request body as JSON string',\n })\n .option('headers', {\n alias: 'H',\n type: 'string',\n description: 'Additional headers as JSON object',\n }),\n async args => {\n const { fetchAuthCommand } = await import('@/cli/commands');\n await fetchAuthCommand(\n {\n url: args.url,\n method: args.method,\n body: args.body,\n headers: args.headers,\n },\n args\n );\n }\n )\n .command(\n 'check <url>',\n 'Check endpoint for x402 pricing and schema without making payment',\n yargs =>\n yargs\n .positional('url', {\n type: 'string',\n description: 'The endpoint URL to check',\n demandOption: true,\n })\n .option('method', {\n alias: 'm',\n type: 'string',\n description:\n 'HTTP method to check. If omitted, all methods declared in the spec are returned.',\n choices: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],\n })\n .option('body', {\n alias: 'b',\n type: 'string',\n description: 'Request body as JSON string',\n })\n .option('headers', {\n alias: 'H',\n type: 'string',\n description: 'Additional headers as JSON object',\n }),\n async args => {\n const { checkCommand } = await import('@/cli/commands');\n await checkCommand(\n {\n url: args.url,\n method: args.method,\n body: args.body,\n headers: args.headers,\n },\n args\n );\n }\n )\n .command(\n 'discover <url>',\n 'Discover x402-protected endpoints on an origin',\n yargs =>\n yargs\n .positional('url', {\n type: 'string',\n description: 'The origin URL to discover endpoints from',\n demandOption: true,\n })\n .option('include-guidance', {\n type: 'boolean',\n description:\n 'Guidance override: true=always include, false=never include, omitted=auto by threshold',\n }),\n async args => {\n const { discoverCommand } = await import('@/cli/commands');\n await discoverCommand(\n { url: args.url, includeGuidance: args.includeGuidance },\n args\n );\n }\n )\n .command(\n 'register <url>',\n 'Register an origin with agentcash (discover + index endpoints)',\n yargs =>\n yargs.positional('url', {\n type: 'string',\n description: 'The origin URL to register',\n demandOption: true,\n }),\n async args => {\n const { registerCommand } = await import('@/cli/commands');\n await registerCommand({ url: args.url }, args);\n }\n )\n .command(\n 'add <url>',\n 'Add a skill to the agentcash MCP server',\n yargs =>\n yargs.positional('url', {\n type: 'string',\n description: 'The URL of the skill to add',\n demandOption: true,\n }),\n async args => {\n const { addSkillCommand } = await import('@/cli/commands');\n await addSkillCommand({ url: args.url }, args);\n }\n )\n .command(\n 'onboard [code]',\n 'Non-interactive onboarding flow for agentcash wallet + MCP setup',\n yargs =>\n yargs\n .positional('code', {\n type: 'string',\n description: 'The invite code to redeem (optional)',\n }),\n async args => {\n const { onboardCommand } = await import('@/cli/commands');\n await onboardCommand({ code: args.code ?? args.invite }, args);\n }\n )\n .command(\n 'wallet',\n 'Wallet management commands',\n yargs =>\n yargs\n .command(\n 'info',\n 'Get wallet address, balance, and deposit link',\n yargs => yargs,\n async args => {\n const { walletInfoCommand } = await import('@/cli/commands');\n await walletInfoCommand({}, args);\n }\n )\n .command(\n 'redeem <code>',\n 'Redeem an invite code for free USDC',\n yargs =>\n yargs.positional('code', {\n type: 'string',\n description: 'The invite code to redeem',\n demandOption: true,\n }),\n async args => {\n const { walletRedeemCommand } = await import('@/cli/commands');\n await walletRedeemCommand({ code: args.code }, args);\n }\n )\n .command(\n 'address',\n 'Get wallet address',\n yargs => yargs,\n async args => {\n const { walletAddressCommand } = await import('@/cli/commands');\n await walletAddressCommand({}, args);\n }\n )\n .demandCommand(1, 'You must specify a wallet subcommand')\n .strict(),\n () => {\n // Show help for wallet command\n }\n )\n .command(\n 'report-error',\n 'Report a critical bug to the agentcash team (emergency only)',\n yargs =>\n yargs\n .option('tool', {\n type: 'string',\n description: 'The tool/command that failed',\n demandOption: true,\n })\n .option('summary', {\n type: 'string',\n description: '1-2 sentence summary of the issue',\n demandOption: true,\n })\n .option('error-message', {\n type: 'string',\n description: 'The error message',\n demandOption: true,\n })\n .option('resource', {\n type: 'string',\n description: 'The x402 resource URL (if applicable)',\n })\n .option('stack', {\n type: 'string',\n description: 'Stack trace (if available)',\n })\n .option('full-report', {\n type: 'string',\n description: 'Detailed report with context and repro steps',\n }),\n async args => {\n const { reportErrorCommand } = await import('@/cli/commands');\n await reportErrorCommand(\n {\n tool: args.tool,\n summary: args.summary,\n errorMessage: args.errorMessage,\n resource: args.resource,\n stack: args.stack,\n fullReport: args.fullReport,\n },\n args\n );\n }\n )\n // ============================================================\n // Server & Installation Commands\n // ============================================================\n .command(\n ['$0', 'server'],\n 'Start the MCP server (default when no command specified)',\n yargs => yargs,\n async args => {\n const { serverCommand } = await import('@/cli/commands');\n await serverCommand(args);\n }\n )\n .command(\n 'install',\n 'Install the MCP server configuration for a client',\n yargs =>\n yargs.option('client', {\n type: 'string',\n description: 'The client name',\n required: false,\n default: isClaudeCode ? Clients.ClaudeCode : undefined,\n }),\n async args => {\n const { installMcpServer } = await import('@/cli/install');\n await installMcpServer(args);\n }\n )\n .command(\n 'fund',\n 'Open the funding page to add USDC to your wallet',\n yargs => yargs,\n async args => {\n const { fundMcpServer } = await import('@/cli/fund');\n await fundMcpServer(args);\n }\n )\n .example(\n '$0 fetch \"https://stableenrich.dev/api/apollo/people-enrich\" -m POST -b \\'{\"email\":\"user@example.com\"}\\'',\n 'Fetch with x402 payment'\n )\n .example(\n '$0 check \"https://stableenrich.dev/api/apollo/people-enrich\"',\n 'Check endpoint pricing'\n )\n .example(\n '$0 discover \"https://stableenrich.dev\"',\n 'Discover endpoints on origin'\n )\n .example(\n '$0 register \"https://stableenrich.dev\"',\n 'Register origin with agentcash'\n )\n .example(\n '$0 onboard ABC123',\n 'Install onboarding skill, configure MCP, and redeem an invite'\n )\n .example('$0 wallet info', 'Get wallet balance')\n .example('$0 wallet redeem ABC123', 'Redeem invite code')\n .example('$0', 'Start MCP server (default)')\n .example('$0 install --client cursor', 'Install MCP for Cursor')\n .strict()\n .help()\n .version(MCP_VERSION)\n .parseAsync()\n .catch(err => {\n // Output error in JSON format for agent consumption\n const response = {\n success: false,\n error: {\n code: 'GENERAL_ERROR',\n message: err instanceof Error ? err.message : String(err),\n surface: 'cli',\n cause: 'unknown',\n },\n };\n console.log(JSON.stringify(response, null, 2));\n process.exit(1);\n });\n"],"mappings":";;;;;;;;;;AAEA,OAAO,WAAW;AAClB,SAAS,eAAe;AAKxB,IAAM,eAAe,QAAQ,QAAQ,IAAI,UAAU;AACnD,IAAM,aAAa,gBAAgB,QAAQ,QAAQ,IAAI,EAAE;AAEzD,KAAK,MAAM,QAAQ,QAAQ,IAAI,CAAC,EAC7B,WAAW,W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sourcesContent":["#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { Clients } from './cli/install/clients';\nimport { isMppEnabled } from '@/shared/mpp-enabled';\nimport { MCP_VERSION } from '@/shared/version';\nimport { DESCRIPTIONS } from '@/shared/descriptions';\n\nconst isClaudeCode = Boolean(process.env.CLAUDECODE);\nconst defaultYes = isClaudeCode || Boolean(process.env.CI);\n\nvoid yargs(hideBin(process.argv))\n .scriptName('agentcash')\n .usage('$0 [command] [options]')\n .option('dev', {\n type: 'boolean',\n description: 'Enable dev mode (use localhost endpoints)',\n default: false,\n })\n .option('invite', {\n type: 'string',\n description: 'Invite code to redeem for starter money',\n required: false,\n })\n .option('yes', {\n alias: 'y',\n type: 'boolean',\n description: 'Yes to all prompts',\n default: defaultYes ? true : undefined,\n })\n .option('sessionId', {\n type: 'string',\n description:\n 'Session ID for matching requests (auto-generated if not provided)',\n required: false,\n })\n .option('provider', {\n type: 'string',\n description: 'Provider to use for the MCP server',\n required: false,\n })\n .option('format', {\n type: 'string',\n description:\n 'Output format: json (default for pipes) or pretty (default for TTY)',\n choices: ['json', 'pretty'],\n })\n .option('quiet', {\n alias: 'q',\n type: 'boolean',\n description: 'Suppress stderr output',\n default: false,\n })\n .option('verbose', {\n alias: 'v',\n type: 'boolean',\n description: 'Enable verbose logging (debug output to stderr)',\n default: false,\n })\n .middleware(async argv => {\n // Configure CLI context for shared modules (like logging)\n if (argv.verbose) {\n const { configureCliContext } = await import('@/shared/cli-context');\n configureCliContext({ verbose: true });\n }\n })\n // ============================================================\n // Core CLI Commands (for agent/programmatic use)\n // ============================================================\n .command(\n 'fetch <url>',\n DESCRIPTIONS.fetch.cli,\n yargs =>\n yargs\n .positional('url', {\n type: 'string',\n description: 'The endpoint URL to fetch',\n demandOption: true,\n })\n .option('method', {\n alias: 'm',\n type: 'string',\n description: 'HTTP method',\n choices: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],\n default: 'GET',\n })\n .option('body', {\n alias: 'b',\n type: 'string',\n description: 'Request body as JSON string',\n })\n .option('headers', {\n alias: 'H',\n type: 'string',\n description: 'Additional headers as JSON object',\n })\n .option('payment-method', {\n alias: 'p',\n type: 'string',\n description: 'Payment protocol to use',\n choices: isMppEnabled() ? ['x402', 'mpp', 'auto'] : ['x402', 'auto'],\n default: 'auto',\n }),\n async args => {\n const { fetchCommand } = await import('@/cli/commands');\n await fetchCommand(\n {\n url: args.url,\n method: args.method,\n body: args.body,\n headers: args.headers,\n paymentMethod: args.paymentMethod,\n },\n args\n );\n }\n )\n .command(\n 'fetch-auth <url>',\n DESCRIPTIONS.fetchWithAuth.cli,\n yargs =>\n yargs\n .positional('url', {\n type: 'string',\n description: 'The endpoint URL to fetch',\n demandOption: true,\n })\n .option('method', {\n alias: 'm',\n type: 'string',\n description: 'HTTP method',\n choices: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],\n default: 'GET',\n })\n .option('body', {\n alias: 'b',\n type: 'string',\n description: 'Request body as JSON string',\n })\n .option('headers', {\n alias: 'H',\n type: 'string',\n description: 'Additional headers as JSON object',\n }),\n async args => {\n const { fetchAuthCommand } = await import('@/cli/commands');\n await fetchAuthCommand(\n {\n url: args.url,\n method: args.method,\n body: args.body,\n headers: args.headers,\n },\n args\n );\n }\n )\n .command(\n 'check <url>',\n DESCRIPTIONS.checkEndpointSchema.cli,\n yargs =>\n yargs\n .positional('url', {\n type: 'string',\n description: 'The endpoint URL to check',\n demandOption: true,\n })\n .option('method', {\n alias: 'm',\n type: 'string',\n description:\n 'HTTP method to check. If omitted, all methods declared in the spec are returned.',\n choices: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],\n })\n .option('body', {\n alias: 'b',\n type: 'string',\n description: 'Request body as JSON string',\n })\n .option('headers', {\n alias: 'H',\n type: 'string',\n description: 'Additional headers as JSON object',\n }),\n async args => {\n const { checkCommand } = await import('@/cli/commands');\n await checkCommand(\n {\n url: args.url,\n method: args.method,\n body: args.body,\n headers: args.headers,\n },\n args\n );\n }\n )\n .command(\n 'discover <url>',\n DESCRIPTIONS.discoverApiEndpoints.cli,\n yargs =>\n yargs\n .positional('url', {\n type: 'string',\n description: 'The origin URL to discover endpoints from',\n demandOption: true,\n })\n .option('include-guidance', {\n type: 'boolean',\n description:\n 'Guidance override: true=always include, false=never include, omitted=auto by threshold',\n }),\n async args => {\n const { discoverCommand } = await import('@/cli/commands');\n await discoverCommand(\n { url: args.url, includeGuidance: args.includeGuidance },\n args\n );\n }\n )\n .command(\n 'register <url>',\n 'Register an origin with agentcash (discover + index endpoints)',\n yargs =>\n yargs.positional('url', {\n type: 'string',\n description: 'The origin URL to register',\n demandOption: true,\n }),\n async args => {\n const { registerCommand } = await import('@/cli/commands');\n await registerCommand({ url: args.url }, args);\n }\n )\n .command(\n 'add <url>',\n 'Add a skill to the agentcash MCP server',\n yargs =>\n yargs.positional('url', {\n type: 'string',\n description: 'The URL of the skill to add',\n demandOption: true,\n }),\n async args => {\n const { addSkillCommand } = await import('@/cli/commands');\n await addSkillCommand({ url: args.url }, args);\n }\n )\n .command(\n 'onboard [code]',\n 'Non-interactive onboarding flow for agentcash wallet + MCP setup',\n yargs =>\n yargs\n .positional('code', {\n type: 'string',\n description: 'The invite code to redeem (optional)',\n }),\n async args => {\n const { onboardCommand } = await import('@/cli/commands');\n await onboardCommand({ code: args.code ?? args.invite }, args);\n }\n )\n .command(\n 'wallet',\n 'Wallet management commands',\n yargs =>\n yargs\n .command(\n 'info',\n DESCRIPTIONS.getWalletInfo.cli,\n yargs => yargs,\n async args => {\n const { walletInfoCommand } = await import('@/cli/commands');\n await walletInfoCommand({}, args);\n }\n )\n .command(\n 'redeem <code>',\n DESCRIPTIONS.redeemInvite.cli,\n yargs =>\n yargs.positional('code', {\n type: 'string',\n description: 'The invite code to redeem',\n demandOption: true,\n }),\n async args => {\n const { walletRedeemCommand } = await import('@/cli/commands');\n await walletRedeemCommand({ code: args.code }, args);\n }\n )\n .command(\n 'address',\n 'Get wallet address',\n yargs => yargs,\n async args => {\n const { walletAddressCommand } = await import('@/cli/commands');\n await walletAddressCommand({}, args);\n }\n )\n .demandCommand(1, 'You must specify a wallet subcommand')\n .strict(),\n () => {\n // Show help for wallet command\n }\n )\n .command(\n 'report-error',\n DESCRIPTIONS.reportError.cli,\n yargs =>\n yargs\n .option('tool', {\n type: 'string',\n description: 'The tool/command that failed',\n demandOption: true,\n })\n .option('summary', {\n type: 'string',\n description: '1-2 sentence summary of the issue',\n demandOption: true,\n })\n .option('error-message', {\n type: 'string',\n description: 'The error message',\n demandOption: true,\n })\n .option('resource', {\n type: 'string',\n description: 'The x402 resource URL (if applicable)',\n })\n .option('stack', {\n type: 'string',\n description: 'Stack trace (if available)',\n })\n .option('full-report', {\n type: 'string',\n description: 'Detailed report with context and repro steps',\n }),\n async args => {\n const { reportErrorCommand } = await import('@/cli/commands');\n await reportErrorCommand(\n {\n tool: args.tool,\n summary: args.summary,\n errorMessage: args.errorMessage,\n resource: args.resource,\n stack: args.stack,\n fullReport: args.fullReport,\n },\n args\n );\n }\n )\n // ============================================================\n // Server & Installation Commands\n // ============================================================\n .command(\n ['$0', 'server'],\n 'Start the MCP server (default when no command specified)',\n yargs => yargs,\n async args => {\n const { serverCommand } = await import('@/cli/commands');\n await serverCommand(args);\n }\n )\n .command(\n 'install',\n 'Install the MCP server configuration for a client',\n yargs =>\n yargs.option('client', {\n type: 'string',\n description: 'The client name',\n required: false,\n default: isClaudeCode ? Clients.ClaudeCode : undefined,\n }),\n async args => {\n const { installMcpServer } = await import('@/cli/install');\n await installMcpServer(args);\n }\n )\n .command(\n 'fund',\n 'Open the funding page to add USDC to your wallet',\n yargs => yargs,\n async args => {\n const { fundMcpServer } = await import('@/cli/fund');\n await fundMcpServer(args);\n }\n )\n .example(\n '$0 fetch \"https://stableenrich.dev/api/apollo/people-enrich\" -m POST -b \\'{\"email\":\"user@example.com\"}\\'',\n 'Fetch with x402 payment'\n )\n .example(\n '$0 check \"https://stableenrich.dev/api/apollo/people-enrich\"',\n 'Check endpoint pricing'\n )\n .example(\n '$0 discover \"https://stableenrich.dev\"',\n 'Discover endpoints on origin'\n )\n .example(\n '$0 register \"https://stableenrich.dev\"',\n 'Register origin with agentcash'\n )\n .example(\n '$0 onboard ABC123',\n 'Install onboarding skill, configure MCP, and redeem an invite'\n )\n .example('$0 wallet info', 'Get wallet balance')\n .example('$0 wallet redeem ABC123', 'Redeem invite code')\n .example('$0', 'Start MCP server (default)')\n .example('$0 install --client cursor', 'Install MCP for Cursor')\n .strict()\n .epilogue(DESCRIPTIONS.serverInstructions)\n .help()\n .version(MCP_VERSION)\n .parseAsync()\n .catch(err => {\n // Output error in JSON format for agent consumption\n const response = {\n success: false,\n error: {\n code: 'GENERAL_ERROR',\n message: err instanceof Error ? err.message : String(err),\n surface: 'cli',\n cause: 'unknown',\n },\n };\n console.log(JSON.stringify(response, null, 2));\n process.exit(1);\n });\n"],"mappings":";;;;;;;;;;;;;AAEA,OAAO,WAAW;AAClB,SAAS,eAAe;AAMxB,IAAM,eAAe,QAAQ,QAAQ,IAAI,UAAU;AACnD,IAAM,aAAa,gBAAgB,QAAQ,QAAQ,IAAI,EAAE;AAEzD,KAAK,MAAM,QAAQ,QAAQ,IAAI,CAAC,EAC7B,WAAW,WAAW,EACtB,MAAM,wBAAwB,EAC9B,OAAO,OAAO;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS;AACX,CAAC,EACA,OAAO,UAAU;AAAA,EAChB,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU;AACZ,CAAC,EACA,OAAO,OAAO;AAAA,EACb,OAAO;AAAA,EACP,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS,aAAa,OAAO;AAC/B,CAAC,EACA,OAAO,aAAa;AAAA,EACnB,MAAM;AAAA,EACN,aACE;AAAA,EACF,UAAU;AACZ,CAAC,EACA,OAAO,YAAY;AAAA,EAClB,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU;AACZ,C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uBAAe;AACzD,UAAM,iBAAiB,IAAI;AAAA,EAC7B;AACF,EACC;AAAA,EACC;AAAA,EACA;AAAA,EACA,CAAAA,WAASA;AAAA,EACT,OAAM,SAAQ;AACZ,UAAM,EAAE,cAAc,IAAI,MAAM,OAAO,oBAAY;AACnD,UAAM,cAAc,IAAI;AAAA,EAC1B;AACF,EACC;AAAA,EACC;AAAA,EACA;AACF,EACC;AAAA,EACC;AAAA,EACA;AACF,EACC;AAAA,EACC;AAAA,EACA;AACF,EACC;AAAA,EACC;AAAA,EACA;AACF,EACC;AAAA,EACC;AAAA,EACA;AACF,EACC,QAAQ,kBAAkB,oBAAoB,EAC9C,QAAQ,2BAA2B,oBAAoB,EACvD,QAAQ,MAAM,4BAA4B,EAC1C,QAAQ,8BAA8B,wBAAwB,EAC9D,OAAO,EACP,SAAS,aAAa,kBAAkB,EACxC,KAAK,EACL,QAAQ,WAAW,EACnB,WAAW,EACX,MAAM,SAAO;AAEZ,QAAM,WAAW;AAAA,IACf,SAAS;AAAA,IACT,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,MACxD,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,EACF;AACA,UAAQ,IAAI,KAAK,UAAU,UAAU,MAAM,CAAC,CAAC;AAC7C,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":["yargs"]}
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  addServer
3
- } from "./chunk-Q36ALLOZ.js";
3
+ } from "./chunk-MQLBI77V.js";
4
4
  import {
5
5
  Clients,
6
6
  clientMetadata
7
7
  } from "./chunk-JNYAKINU.js";
8
- import "./chunk-L6FT4XVY.js";
8
+ import "./chunk-HXRJ5ES4.js";
9
9
  import {
10
10
  promptDeposit
11
11
  } from "./chunk-KOMAKKV3.js";
@@ -176,4 +176,4 @@ var installMcpServer = async (flags) => {
176
176
  export {
177
177
  installMcpServer
178
178
  };
179
- //# sourceMappingURL=install-FGWA5K3W.js.map
179
+ //# sourceMappingURL=install-4YDF4G6T.js.map
@@ -7,23 +7,29 @@ import {
7
7
  requestSchema,
8
8
  safeGetMppChallenge,
9
9
  safeGetPaymentRequired
10
- } from "./chunk-2TZTTTIV.js";
10
+ } from "./chunk-DBDSS3CQ.js";
11
+ import {
12
+ DESCRIPTIONS,
13
+ ORIGINS,
14
+ ORIGIN_METADATA,
15
+ TOOL_PARAMS
16
+ } from "./chunk-RY34EBJ4.js";
11
17
  import {
12
18
  TEMPO_RPC_URL,
13
19
  getTempoBalance,
14
20
  getWalletInfo,
15
21
  submitErrorReport
16
- } from "./chunk-A3AHACXX.js";
22
+ } from "./chunk-NFKU5GQE.js";
17
23
  import {
18
24
  isMppEnabled
19
- } from "./chunk-TBIW54SA.js";
25
+ } from "./chunk-OW3UV227.js";
20
26
  import {
21
27
  checkEndpoint,
22
28
  discoverResources
23
29
  } from "./chunk-5EMDWOPZ.js";
24
30
  import {
25
31
  MCP_VERSION
26
- } from "./chunk-L6FT4XVY.js";
32
+ } from "./chunk-HXRJ5ES4.js";
27
33
  import {
28
34
  DEFAULT_NETWORK,
29
35
  getWallet,
@@ -280,7 +286,7 @@ Insufficient Tempo balance for this payment.`
280
286
  var toolName = "fetch";
281
287
  var paymentMethodEnum = isMppEnabled() ? z.enum(["x402", "mpp", "auto"]) : z.enum(["x402", "auto"]);
282
288
  var fetchInputSchema = requestSchema.extend({
283
- paymentMethod: paymentMethodEnum.default("auto").optional().describe("Payment protocol to use. Defaults to auto-detect.")
289
+ paymentMethod: paymentMethodEnum.default("auto").optional().describe(TOOL_PARAMS.fetch.paymentMethod)
284
290
  });
285
291
  var registerFetchTool = ({
286
292
  server,
@@ -292,7 +298,7 @@ var registerFetchTool = ({
292
298
  toolName,
293
299
  {
294
300
  title: "Fetch",
295
- 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.`,
301
+ description: DESCRIPTIONS.fetch.mcp,
296
302
  inputSchema: fetchInputSchema,
297
303
  annotations: {
298
304
  readOnlyHint: true,
@@ -400,7 +406,7 @@ var registerAuthTools = ({
400
406
  toolName2,
401
407
  {
402
408
  title: "Fetch with Authentication",
403
- 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.`,
409
+ description: DESCRIPTIONS.fetchWithAuth.mcp,
404
410
  inputSchema: requestSchema,
405
411
  annotations: {
406
412
  readOnlyHint: true,
@@ -443,8 +449,8 @@ var registerAuthTools = ({
443
449
  // src/server/tools/wallet.ts
444
450
  import { z as z2 } from "zod";
445
451
  var chainBalanceSchema = z2.object({
446
- chain: z2.string().describe("Chain name"),
447
- balance: z2.number().describe("USDC balance on this chain")
452
+ chain: z2.string().describe(TOOL_PARAMS.getWalletInfo.output.chain),
453
+ balance: z2.number().describe(TOOL_PARAMS.getWalletInfo.output.chainBalance)
448
454
  });
449
455
  var registerWalletTools = ({
450
456
  server,
@@ -455,14 +461,14 @@ var registerWalletTools = ({
455
461
  "get_wallet_info",
456
462
  {
457
463
  title: "Get Wallet Info",
458
- 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.`,
464
+ description: DESCRIPTIONS.getWalletInfo.mcp,
459
465
  outputSchema: z2.object({
460
- address: z2.string().describe("Wallet address (0x...)"),
461
- balance: z2.number().describe("Total USDC balance across all chains"),
462
- chains: z2.array(chainBalanceSchema).describe("Balance breakdown by chain"),
463
- isNewWallet: z2.boolean().describe("True if total balance is 0"),
464
- depositLink: z2.string().url().describe("Link to fund the wallet"),
465
- message: z2.string().optional().describe("Warning if balance is low")
466
+ address: z2.string().describe(TOOL_PARAMS.getWalletInfo.output.address),
467
+ balance: z2.number().describe(TOOL_PARAMS.getWalletInfo.output.balance),
468
+ chains: z2.array(chainBalanceSchema).describe(TOOL_PARAMS.getWalletInfo.output.chains),
469
+ isNewWallet: z2.boolean().describe(TOOL_PARAMS.getWalletInfo.output.isNewWallet),
470
+ depositLink: z2.string().url().describe(TOOL_PARAMS.getWalletInfo.output.depositLink),
471
+ message: z2.string().optional().describe(TOOL_PARAMS.getWalletInfo.output.message)
466
472
  }),
467
473
  annotations: {
468
474
  readOnlyHint: true,
@@ -500,23 +506,12 @@ var registerCheckEndpointTool = ({
500
506
  toolName3,
501
507
  {
502
508
  title: "Check Endpoint Schema",
503
- description: `Returns advisory data for an endpoint: auth mode, pricing, protocols, and input schema.
504
-
505
- Two-phase workflow:
506
- 1. Call without sample_input_body to get the input schema and advisory pricing from the OpenAPI spec (no live request to the endpoint).
507
- 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.
508
-
509
- Checks the OpenAPI spec first, then falls back to a live 402 probe if no spec is found.
510
- Use before fetch to understand what an endpoint requires. No payment is made.`,
509
+ description: DESCRIPTIONS.checkEndpointSchema.mcp,
511
510
  inputSchema: z3.object({
512
- url: z3.string().describe("The endpoint URL"),
513
- method: z3.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().describe(
514
- "HTTP method to check. If omitted, all methods declared in the spec are returned."
515
- ),
516
- sample_input_body: z3.record(z3.string(), z3.unknown()).optional().describe(
517
- "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."
518
- ),
519
- headers: z3.record(z3.string(), z3.string()).optional().describe("Additional headers to include in the probe request").default({})
511
+ url: z3.string().describe(TOOL_PARAMS.checkEndpointSchema.url),
512
+ method: z3.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().describe(TOOL_PARAMS.checkEndpointSchema.method),
513
+ sample_input_body: z3.record(z3.string(), z3.unknown()).optional().describe(TOOL_PARAMS.checkEndpointSchema.sampleInputBody),
514
+ headers: z3.record(z3.string(), z3.string()).optional().describe(TOOL_PARAMS.checkEndpointSchema.headers).default({})
520
515
  }),
521
516
  annotations: {
522
517
  readOnlyHint: true,
@@ -579,14 +574,14 @@ var registerRedeemInviteTool = ({
579
574
  "redeem_invite",
580
575
  {
581
576
  title: "Redeem Invite",
582
- 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.`,
577
+ description: DESCRIPTIONS.redeemInvite.mcp,
583
578
  inputSchema: z4.object({
584
- code: z4.string().min(1).describe("The invite code")
579
+ code: z4.string().min(1).describe(TOOL_PARAMS.redeemInvite.code)
585
580
  }),
586
581
  outputSchema: z4.object({
587
582
  redeemed: z4.literal(true),
588
- amount: z4.string().describe('Amount with unit (e.g., "5 USDC")'),
589
- txHash: z4.string().describe("Transaction hash on Base")
583
+ amount: z4.string().describe(TOOL_PARAMS.redeemInvite.output.amount),
584
+ txHash: z4.string().describe(TOOL_PARAMS.redeemInvite.output.txHash)
590
585
  }),
591
586
  annotations: {
592
587
  readOnlyHint: false,
@@ -630,19 +625,19 @@ var registerTelemetryTools = ({
630
625
  toolName4,
631
626
  {
632
627
  title: "Report Error",
633
- description: "EMERGENCY ONLY. Report critical MCP tool bugs. Do NOT use for normal errors (balance, network, 4xx) - those are recoverable.",
628
+ description: DESCRIPTIONS.reportError.mcp,
634
629
  inputSchema: z5.object({
635
- tool: z5.string().describe("MCP tool name"),
636
- resource: z5.string().optional().describe("Resource URL"),
637
- summary: z5.string().describe("1-2 sentence summary"),
638
- errorMessage: z5.string().describe("Error message"),
639
- stack: z5.string().optional().describe("Stack trace"),
640
- fullReport: z5.string().optional().describe("Detailed report with context, logs, repro steps")
630
+ tool: z5.string().describe(TOOL_PARAMS.reportError.tool),
631
+ resource: z5.string().optional().describe(TOOL_PARAMS.reportError.resource),
632
+ summary: z5.string().describe(TOOL_PARAMS.reportError.summary),
633
+ errorMessage: z5.string().describe(TOOL_PARAMS.reportError.errorMessage),
634
+ stack: z5.string().optional().describe(TOOL_PARAMS.reportError.stack),
635
+ fullReport: z5.string().optional().describe(TOOL_PARAMS.reportError.fullReport)
641
636
  }),
642
637
  outputSchema: z5.object({
643
638
  submitted: z5.literal(true),
644
- reportId: z5.string().describe("Unique report ID for tracking"),
645
- message: z5.string().describe("Confirmation message")
639
+ reportId: z5.string().describe(TOOL_PARAMS.reportError.output.reportId),
640
+ message: z5.string().describe(TOOL_PARAMS.reportError.output.message)
646
641
  }),
647
642
  annotations: {
648
643
  readOnlyHint: false,
@@ -688,20 +683,6 @@ var registerTelemetryTools = ({
688
683
 
689
684
  // src/server/tools/discover-resources.ts
690
685
  import { z as z6 } from "zod";
691
-
692
- // src/shared/origins.ts
693
- var ORIGINS = [
694
- "https://stableenrich.dev" /* StableEnrich */,
695
- "https://stablesocial.dev" /* StableSocial */,
696
- "https://stablestudio.dev" /* StableStudio */,
697
- "https://stableupload.dev" /* StableUpload */,
698
- "https://stableemail.dev" /* StableEmail */,
699
- "https://x402scan.com" /* X402Scan */,
700
- "https://shirt.sh" /* Shirt */,
701
- "https://x402puppet.com" /* X402Puppet */
702
- ];
703
-
704
- // src/server/tools/discover-resources.ts
705
686
  var toolName5 = "discover_api_endpoints";
706
687
  var OPENAPI_TRIED_PATHS = "/openapi.json, /.well-known/openapi.json";
707
688
  function registerDiscoveryTools(server) {
@@ -709,34 +690,10 @@ function registerDiscoveryTools(server) {
709
690
  toolName5,
710
691
  {
711
692
  title: "Discover API Endpoints",
712
- description: `Find payment-protected resources on an origin. Returns a list of resource URLs.
713
- Use check_endpoint_schema separately to get detailed pricing/schema info for specific resources.
714
- Guidance contract: responses always include guidanceAvailable. guidance is auto-included when compact.
715
- Use include_guidance=true to force-include larger guidance when needed.
716
- Known default origins with resource packs. Discover if more needed:
717
- - ${"https://stableenrich.dev" /* StableEnrich */} ->
718
- People + Org search
719
- Google Maps (places + locations)
720
- Grok twitter search
721
- Exa web search
722
- Clado linkedin data
723
- Firecrawl web scrape
724
- WhitePages (business directory)
725
- Email enrichment
726
- Influencer email/username enrichment
727
- Hunter email verifier
728
- - ${"https://stablesocial.dev" /* StableSocial */} -> social media data for twitter, instagram, tiktok, youtube, facebook, reddit.
729
- - ${"https://stablestudio.dev" /* StableStudio */} -> generate and edit images / videos
730
- - ${"https://stableupload.dev" /* StableUpload */} -> upload and share files with others.
731
- - ${"https://stableemail.dev" /* StableEmail */} -> send emails.
732
- `,
693
+ description: DESCRIPTIONS.discoverApiEndpoints.mcp,
733
694
  inputSchema: z6.object({
734
- url: z6.string().describe(
735
- "The origin URL or any URL on the origin to discover resources from"
736
- ),
737
- include_guidance: z6.boolean().optional().describe(
738
- "Guidance override: true=always include llms.txt, false=never include, omitted=auto by threshold"
739
- )
695
+ url: z6.string().describe(TOOL_PARAMS.discoverApiEndpoints.url),
696
+ include_guidance: z6.boolean().optional().describe(TOOL_PARAMS.discoverApiEndpoints.includeGuidance)
740
697
  }),
741
698
  annotations: {
742
699
  readOnlyHint: true,
@@ -805,44 +762,6 @@ function registerDiscoveryTools(server) {
805
762
  import z7 from "zod";
806
763
  import { x402HTTPClient as x402HTTPClient2 } from "@x402/core/client";
807
764
  import { x402Client as x402Client2 } from "@x402/core/client";
808
- var ORIGIN_METADATA = {
809
- ["https://stableenrich.dev" /* StableEnrich */]: {
810
- title: "StableEnrich",
811
- description: "People/org search, Google Maps, Grok twitter search, Exa web search, LinkedIn data, Firecrawl scrape, WhitePages, email enrichment"
812
- },
813
- ["https://stablesocial.dev" /* StableSocial */]: {
814
- title: "StableSocial",
815
- description: "Social media data for Twitter, Instagram, TikTok, YouTube, Facebook, Reddit"
816
- },
817
- ["https://stablestudio.dev" /* StableStudio */]: {
818
- title: "StableStudio",
819
- description: "Generate and edit images and videos"
820
- },
821
- ["https://stableupload.dev" /* StableUpload */]: {
822
- title: "AgentUpload",
823
- description: "Upload and share files"
824
- },
825
- ["https://stableemail.dev" /* StableEmail */]: {
826
- title: "StableEmail",
827
- description: "Send emails"
828
- },
829
- ["https://x402scan.com" /* X402Scan */]: {
830
- title: "X402 Scan",
831
- description: "x402 protocol explorer"
832
- },
833
- ["https://shirt.sh" /* Shirt */]: {
834
- title: "Shirt",
835
- description: "Shirt.sh"
836
- },
837
- ["https://x402puppet.com" /* X402Puppet */]: {
838
- title: "X402 Puppet",
839
- description: "Browser automation"
840
- },
841
- ["https://x402facilitator.com" /* X402Facilitator */]: {
842
- title: "X402 Facilitator",
843
- description: "Payment facilitation"
844
- }
845
- };
846
765
  var surface = "registerOrigins";
847
766
  var wellKnownResourceItem = z7.union([
848
767
  z7.string(),
@@ -1280,7 +1199,7 @@ import { dirname, join } from "path";
1280
1199
  import { fileURLToPath } from "url";
1281
1200
  function getVersion() {
1282
1201
  if (true) {
1283
- return "0.7.3";
1202
+ return "0.7.4";
1284
1203
  }
1285
1204
  const __dirname2 = dirname(fileURLToPath(import.meta.url));
1286
1205
  const pkg = JSON.parse(
@@ -1291,21 +1210,6 @@ function getVersion() {
1291
1210
  var MCP_VERSION2 = getVersion();
1292
1211
  var DIST_TAG = MCP_VERSION2.includes("-beta") ? "beta" : "latest";
1293
1212
 
1294
- // src/server/lib/instructions.ts
1295
- function buildServerInstructions() {
1296
- return `Known API origins:
1297
- - ${"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
1298
- - ${"https://stablesocial.dev" /* StableSocial */} \u2014 Social media data (Twitter, Instagram, TikTok, YouTube, Facebook, Reddit)
1299
- - ${"https://stablestudio.dev" /* StableStudio */} \u2014 Generate and edit images/videos
1300
- - ${"https://stableupload.dev" /* StableUpload */} \u2014 Upload and share files
1301
- - ${"https://stableemail.dev" /* StableEmail */} \u2014 Send emails
1302
-
1303
- Workflow:
1304
- 1. Use discover_api_endpoints to find available endpoints on an origin.
1305
- 2. Use check_endpoint_schema to get the full input schema + pricing for an endpoint.
1306
- 3. Use fetch to make the request (handles payment automatically).`;
1307
- }
1308
-
1309
1213
  // src/server/index.ts
1310
1214
  var startServer = async (flags) => {
1311
1215
  log.info("Starting agentcash...");
@@ -1327,14 +1231,14 @@ var startServer = async (flags) => {
1327
1231
  surface: "startServer"
1328
1232
  });
1329
1233
  }
1330
- const instructions = buildServerInstructions();
1331
1234
  const server = new McpServer(
1332
1235
  {
1333
1236
  name: "agentcash",
1237
+ title: "AgentCash",
1334
1238
  version: MCP_VERSION2,
1335
1239
  websiteUrl: "https://x402scan.com/mcp",
1336
1240
  icons: [{ src: "https://x402scan.com/logo.svg" }],
1337
- ...instructions && { instructions }
1241
+ description: DESCRIPTIONS.serverInstructions
1338
1242
  },
1339
1243
  {
1340
1244
  capabilities: {
@@ -1345,7 +1249,8 @@ var startServer = async (flags) => {
1345
1249
  prompts: {
1346
1250
  listChanged: true
1347
1251
  }
1348
- }
1252
+ },
1253
+ instructions: DESCRIPTIONS.serverInstructions
1349
1254
  }
1350
1255
  );
1351
1256
  const props = {
@@ -1376,4 +1281,4 @@ var startServer = async (flags) => {
1376
1281
  export {
1377
1282
  startServer
1378
1283
  };
1379
- //# sourceMappingURL=server-GGPRVDHK.js.map
1284
+ //# sourceMappingURL=server-GJVD7VNR.js.map