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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/server/tools/lib/request.ts","../../src/shared/neverthrow/x402/index.ts","../../src/shared/neverthrow/mpp/index.ts","../../src/shared/protocol.ts","../../src/shared/operations/fetch-with-payment.ts","../../src/shared/token.ts","../../src/server/lib/x402-extensions.ts","../../src/shared/operations/fetch-with-auth.ts"],"sourcesContent":["import z from 'zod';\n\nimport type { Address } from 'viem';\n\nimport { REQUEST_PARAMS } from '@/shared/descriptions';\n\nexport const requestSchema = z.object({\n url: z.string().describe(REQUEST_PARAMS.url),\n method: z\n .enum(['GET', 'POST', 'PUT', 'DELETE', 'PATCH'])\n .optional()\n .describe(REQUEST_PARAMS.method),\n body: z.unknown().optional().describe(REQUEST_PARAMS.body),\n headers: z\n .record(z.string(), z.string())\n .optional()\n .describe(REQUEST_PARAMS.headers)\n .default({}),\n timeout: z\n .number()\n .int()\n .positive()\n .optional()\n .describe(REQUEST_PARAMS.timeout),\n});\n\ninterface BuildRequestProps {\n input: z.infer<typeof requestSchema>;\n address?: Address;\n sessionId?: string;\n provider?: string;\n}\n\nexport const buildRequest = ({\n input,\n address,\n sessionId,\n provider,\n}: BuildRequestProps) => {\n return new Request(input.url, {\n method: input.method ?? 'GET',\n body: input.body\n ? typeof input.body === 'string'\n ? input.body\n : JSON.stringify(input.body)\n : undefined,\n headers: {\n ...(input.body ? { 'Content-Type': 'application/json' } : {}),\n ...input.headers,\n ...(address\n ? { 'X-Wallet-Address': address, 'X-Client-ID': provider }\n : {}),\n ...(sessionId ? { 'X-Session-ID': sessionId } : {}),\n },\n });\n};\n","import {\n err,\n ok,\n resultFromPromise,\n resultFromThrowable,\n} from '@agentcash/neverthrow';\nimport { createSIWxPayload } from '@x402/extensions/sign-in-with-x';\n\nimport type { BaseX402Error } from './types';\nimport type { x402HTTPClient } from '@x402/core/http';\nimport type { PaymentRequired } from '@x402/core/types';\nimport type { CompleteSIWxInfo } from '@x402/extensions/sign-in-with-x';\nimport type { PrivateKeyAccount } from 'viem';\n\nconst errorType = 'x402';\n\nexport const x402Ok = <T>(value: T) => ok(value);\nexport const x402Err = (cause: string, error: BaseX402Error) =>\n err(errorType, cause, error);\n\nconst x402ResultFromPromise = <T>(\n surface: string,\n promise: Promise<T>,\n error: (e: unknown) => BaseX402Error\n) => resultFromPromise(errorType, surface, promise, error);\n\nconst x402ResultFromThrowable = <T>(\n surface: string,\n fn: () => T,\n error: (e: unknown) => BaseX402Error\n) => resultFromThrowable(errorType, surface, fn, error);\n\nexport const safeGetPaymentRequired = (\n surface: string,\n client: x402HTTPClient,\n response: Response\n) => {\n return x402ResultFromPromise(\n surface,\n response.json().then(\n json =>\n client.getPaymentRequiredResponse(\n name => response.headers.get(name),\n json\n ),\n () =>\n client.getPaymentRequiredResponse(name => response.headers.get(name))\n ),\n error => ({\n cause: 'parse_payment_required',\n message:\n error instanceof Error\n ? error.message\n : 'Failed to parse payment required',\n })\n );\n};\n\nexport const safeCreatePaymentPayload = (\n surface: string,\n client: x402HTTPClient,\n paymentRequired: PaymentRequired\n) => {\n return x402ResultFromPromise(\n surface,\n client.createPaymentPayload(paymentRequired),\n error => ({\n cause: 'create_payment_payload',\n message:\n error instanceof Error\n ? error.message\n : 'Failed to create payment payload',\n })\n );\n};\n\nexport const safeGetPaymentSettlement = (\n surface: string,\n client: x402HTTPClient,\n response: Response\n) => {\n return x402ResultFromThrowable(\n surface,\n () => client.getPaymentSettleResponse(name => response.headers.get(name)),\n error => ({\n cause: 'get_payment_settlement',\n message:\n error instanceof Error\n ? error.message\n : 'Failed to get payment settlement',\n })\n );\n};\n\nexport const safeCreateSIWxPayload = (\n surface: string,\n serverInfo: CompleteSIWxInfo,\n signer: PrivateKeyAccount\n) => {\n return x402ResultFromPromise(\n surface,\n createSIWxPayload(serverInfo, signer),\n error => ({\n cause: 'create_siwx_payload',\n message:\n error instanceof Error\n ? error.message\n : 'Failed to create SIWX payload',\n })\n );\n};\n","import { Challenge, Receipt } from 'mppx';\nimport {\n err,\n ok,\n resultFromPromise,\n resultFromThrowable,\n} from '@agentcash/neverthrow';\n\nimport type { BaseMppError } from './types';\nconst errorType = 'mpp';\n\nexport const mppOk = <T>(value: T) => ok(value);\nexport const mppErr = (surface: string, error: BaseMppError) =>\n err(errorType, surface, error);\n\nconst mppResultFromPromise = <T>(\n surface: string,\n promise: Promise<T>,\n error: (e: unknown) => BaseMppError\n) => resultFromPromise(errorType, surface, promise, error);\n\nconst mppResultFromThrowable = <T>(\n surface: string,\n fn: () => T,\n error: (e: unknown) => BaseMppError\n) => resultFromThrowable(errorType, surface, fn, error);\n\nexport const safeGetMppChallenge = (surface: string, response: Response) => {\n return mppResultFromThrowable(\n surface,\n () => Challenge.fromResponse(response),\n error => ({\n cause: 'parse_mpp_challenge',\n message:\n error instanceof Error\n ? error.message\n : 'Failed to parse MPP challenge from response',\n })\n );\n};\n\nexport const safeCreateMppCredential = (\n surface: string,\n mppxClient: { createCredential: (response: Response) => Promise<string> },\n response: Response\n) => {\n return mppResultFromPromise(\n surface,\n mppxClient.createCredential(response),\n error => ({\n cause: 'create_mpp_credential',\n message:\n error instanceof Error\n ? error.message\n : 'Failed to create MPP credential',\n })\n );\n};\n\nexport const safeGetMppReceipt = (surface: string, response: Response) => {\n return mppResultFromThrowable(\n surface,\n () => Receipt.fromResponse(response),\n error => ({\n cause: 'parse_mpp_receipt',\n message:\n error instanceof Error\n ? error.message\n : 'Failed to parse MPP receipt from response',\n })\n );\n};\n","import { isMppEnabled } from '@/shared/mpp-enabled';\n\nexport type PaymentProtocol = 'x402' | 'mpp';\n\n/**\n * Detects all payment protocols present in a 402 response.\n * MPP responses include a `WWW-Authenticate` header starting with \"Payment\".\n * x402 responses include a `payment-required` header.\n * If neither is explicitly detected, defaults to x402.\n *\n * MPP detection is gated behind {@link isMppEnabled} so it never surfaces\n * in agent context on the `latest` dist-tag.\n */\nexport function detectPaymentProtocols(response: Response): PaymentProtocol[] {\n const protocols: PaymentProtocol[] = [];\n if (isMppEnabled()) {\n const wwwAuth = response.headers.get('WWW-Authenticate');\n if (wwwAuth?.startsWith('Payment')) {\n protocols.push('mpp');\n }\n }\n const paymentRequired = response.headers.get('payment-required');\n if (paymentRequired) {\n protocols.push('x402');\n }\n // If we couldn't detect either explicitly, default to x402\n if (protocols.length === 0) {\n protocols.push('x402');\n }\n return protocols;\n}\n\n/**\n * Convenience: returns the first/preferred protocol from a 402 response.\n * Useful when a single protocol must be chosen (e.g. for payment).\n */\nexport function detectPaymentProtocol(response: Response): PaymentProtocol {\n return detectPaymentProtocols(response)[0]!;\n}\n","import { formatUnits } from 'viem';\n\nimport type { x402HTTPClient } from '@x402/core/client';\nimport type { Address } from 'viem';\nimport type { GlobalFlags } from '@/types';\n\nimport { resultFromPromise } from '@agentcash/neverthrow';\n\nimport { fetchErr, fetchOk, safeFetch } from '@/shared/neverthrow/fetch';\nimport {\n safeCreatePaymentPayload,\n safeGetPaymentRequired,\n safeGetPaymentSettlement,\n x402Err,\n x402Ok,\n} from '@/shared/neverthrow/x402';\nimport {\n safeGetMppChallenge,\n safeCreateMppCredential,\n safeGetMppReceipt,\n mppErr,\n mppOk,\n} from '@/shared/neverthrow/mpp';\n\nimport { log } from '@/shared/log';\nimport { detectPaymentProtocols } from '@/shared/protocol';\nimport { tokenStringToNumber } from '@/shared/token';\nimport { getBalance } from '@/shared/balance';\nimport { getTempoBalance } from '@/shared/tempo-balance';\n\n/**\n * Hook called before a payment is executed.\n * Throw to abort. Return to proceed.\n * Matches existing checkBalance/checkTempoBalance throw-to-abort behavior.\n */\nexport type BeforePaymentHook = (ctx: {\n protocol: 'x402' | 'mpp';\n amount: number;\n currency: string;\n network: string;\n}) => Promise<void>;\n\nexport interface PaymentClients {\n x402: x402HTTPClient;\n mpp: { createCredential: (response: Response) => Promise<string> };\n}\n\nexport interface PaymentInfo {\n protocol: 'x402' | 'mpp';\n price?: string;\n payment?: {\n success: boolean;\n transactionHash?: string;\n };\n}\n\nexport interface FetchWithPaymentResult {\n response: Response;\n paymentInfo: PaymentInfo | null;\n}\n\nexport interface FetchWithPaymentOptions {\n surface: string;\n clients: PaymentClients;\n paymentMethod: 'x402' | 'mpp' | 'auto';\n account: { address: Address };\n flags: GlobalFlags;\n beforePayment?: BeforePaymentHook;\n timeout?: number;\n}\n\n/**\n * Create a fetch function with automatic dual-protocol payment handling.\n *\n * 1. Makes initial request\n * 2. If 402 response, detects protocol(s)\n * 3. Calls beforePayment hook (for balance checks)\n * 4. Creates payment credential/payload\n * 5. Retries request with payment headers\n */\nexport function createFetchWithPayment(options: FetchWithPaymentOptions) {\n const { surface, clients, paymentMethod, beforePayment, timeout } = options;\n\n return async (request: Request) => {\n const clonedRequest = request.clone();\n const fallbackRequest = request.clone();\n\n const probeResult = await safeFetch(surface, request, timeout);\n\n if (probeResult.isErr()) {\n return fetchErr(surface, probeResult.error);\n }\n\n // Not a 402 response — return as-is\n if (probeResult.value.status !== 402) {\n return probeResult.andThen(response =>\n fetchOk<FetchWithPaymentResult>({ response, paymentInfo: null })\n );\n }\n\n const response = probeResult.value;\n\n // User explicitly chose a protocol — use that, no fallback\n if (paymentMethod !== 'auto') {\n if (paymentMethod === 'mpp') {\n return handleMppPayment(surface, response, clonedRequest, options);\n }\n return handleX402Payment(\n surface,\n response,\n clonedRequest,\n clients.x402,\n beforePayment,\n timeout\n );\n }\n\n // Auto: detect available protocols, pick by higher balance\n const available = detectPaymentProtocols(response);\n\n let preferred: 'x402' | 'mpp';\n\n if (available.length === 1) {\n preferred = available[0]!;\n } else {\n // Both protocols available — pick by balance\n preferred = await pickByBalance(surface, response, options);\n }\n\n const fallback =\n available.length > 1 ? (preferred === 'mpp' ? 'x402' : 'mpp') : null;\n\n const result =\n preferred === 'mpp'\n ? await handleMppPayment(surface, response, clonedRequest, options)\n : await handleX402Payment(\n surface,\n response,\n clonedRequest,\n clients.x402,\n beforePayment,\n timeout\n );\n\n if (result.isErr() && fallback) {\n // Preferred failed — try fallback with a fresh request clone\n return fallback === 'mpp'\n ? handleMppPayment(surface, response, fallbackRequest, options)\n : handleX402Payment(\n surface,\n response,\n fallbackRequest,\n clients.x402,\n beforePayment,\n timeout\n );\n }\n\n return result;\n };\n}\n\n/**\n * Pick the preferred protocol by comparing wallet balances.\n * Falls back to 'mpp' if both balances fail to fetch.\n */\nasync function pickByBalance(\n surface: string,\n response: Response,\n options: FetchWithPaymentOptions\n): Promise<'x402' | 'mpp'> {\n const { account, flags } = options;\n\n // Get x402 (USDC on Base) balance\n const x402BalanceResult = await resultFromPromise(\n 'balance',\n surface,\n getBalance({\n address: account.address,\n surface,\n dev: flags.dev,\n }).then(r => (r.isOk() ? r.value.balance : 0)),\n () => ({\n cause: 'x402_balance' as const,\n message: 'Failed to get x402 balance',\n })\n );\n\n if (x402BalanceResult.isErr()) {\n log.debug('Balance comparison failed, defaulting to mpp');\n return 'mpp';\n }\n\n const x402Balance = x402BalanceResult.value;\n\n // Get MPP (Tempo) balance — need token address from the challenge\n let mppBalance = 0;\n const challengeResult = safeGetMppChallenge(surface, response);\n if (challengeResult.isOk()) {\n const currency = challengeResult.value.request.currency as\n | string\n | undefined;\n const decimals =\n (challengeResult.value.request.decimals as number | undefined) ?? 6;\n if (currency) {\n const tempoResult = await resultFromPromise(\n 'tempo',\n surface,\n getTempoBalance({\n address: account.address,\n tokenAddress: currency as Address,\n }),\n () => ({\n cause: 'tempo_balance' as const,\n message: 'Tempo balance check failed',\n })\n );\n if (tempoResult.isOk()) {\n mppBalance = Number(formatUnits(tempoResult.value.balance, decimals));\n }\n }\n }\n\n log.info(`Protocol selection — x402: $${x402Balance}, mpp: $${mppBalance}`);\n return x402Balance >= mppBalance ? 'x402' : 'mpp';\n}\n\nasync function handleX402Payment(\n surface: string,\n response: Response,\n clonedRequest: Request,\n client: x402HTTPClient,\n beforePayment?: BeforePaymentHook,\n timeout?: number\n) {\n const paymentRequiredResult = await safeGetPaymentRequired(\n surface,\n client,\n response\n );\n\n if (paymentRequiredResult.isErr()) {\n return paymentRequiredResult;\n }\n\n const paymentRequired = paymentRequiredResult.value;\n\n // Call beforePayment hook (e.g. balance check) before signing\n if (beforePayment) {\n const accept = paymentRequired.accepts[0];\n if (accept) {\n const amount = tokenStringToNumber(accept.amount);\n const hookResult = await resultFromPromise(\n 'x402',\n surface,\n beforePayment({\n protocol: 'x402',\n amount,\n currency: 'USDC',\n network: accept.network,\n }),\n e => ({\n cause: 'payment_already_attempted' as const,\n message:\n e instanceof Error ? e.message : 'Before-payment hook failed',\n })\n );\n if (hookResult.isErr()) {\n return x402Err(surface, hookResult.error);\n }\n }\n }\n\n const paymentPayloadResult = await safeCreatePaymentPayload(\n surface,\n client,\n paymentRequired\n );\n\n if (paymentPayloadResult.isErr()) {\n return paymentPayloadResult;\n }\n\n const paymentPayload = paymentPayloadResult.value;\n\n // Encode payment header\n const paymentHeaders = client.encodePaymentSignatureHeader(paymentPayload);\n\n // Check if this is already a retry to prevent infinite loops\n if (\n clonedRequest.headers.has('PAYMENT-SIGNATURE') ||\n clonedRequest.headers.has('X-PAYMENT')\n ) {\n return x402Err(surface, {\n cause: 'payment_already_attempted',\n message: 'Payment already attempted',\n });\n }\n\n // Add payment headers to cloned request\n for (const [key, value] of Object.entries(paymentHeaders)) {\n clonedRequest.headers.set(key, value);\n }\n clonedRequest.headers.set(\n 'Access-Control-Expose-Headers',\n 'PAYMENT-RESPONSE,X-PAYMENT-RESPONSE'\n );\n\n // Retry the request with payment\n return await safeFetch(surface, clonedRequest, timeout).andThen(\n paidResponse => {\n const settlementResult = safeGetPaymentSettlement(\n surface,\n client,\n paidResponse\n );\n\n return x402Ok<FetchWithPaymentResult>({\n response: paidResponse,\n paymentInfo: {\n protocol: 'x402',\n price: tokenStringToNumber(\n paymentPayload.accepted.amount\n ).toLocaleString('en-US', {\n style: 'currency',\n currency: 'USD',\n }),\n ...(settlementResult.isOk()\n ? {\n payment: {\n success: settlementResult.value.success,\n transactionHash: settlementResult.value.transaction,\n },\n }\n : {}),\n },\n });\n }\n );\n}\n\nasync function handleMppPayment(\n surface: string,\n response: Response,\n clonedRequest: Request,\n options: FetchWithPaymentOptions\n) {\n const { clients, beforePayment, timeout } = options;\n const mppxClient = clients.mpp;\n\n // Prevent retry loops\n if (clonedRequest.headers.has('Authorization')) {\n return mppErr(surface, {\n cause: 'mpp_payment_already_attempted',\n message: 'MPP payment already attempted',\n });\n }\n\n // Parse the challenge from the WWW-Authenticate header\n const challengeResult = safeGetMppChallenge(surface, response);\n\n if (challengeResult.isErr()) {\n return challengeResult;\n }\n\n const challenge = challengeResult.value;\n\n // Extract payment info from challenge request\n const amount = challenge.request.amount as string | undefined;\n const decimals = (challenge.request.decimals as number | undefined) ?? 6;\n const currency = challenge.request.currency as string | undefined;\n\n // Call beforePayment hook (e.g. balance check)\n if (beforePayment && amount && currency) {\n const numericAmount = Number(formatUnits(BigInt(amount), decimals));\n const hookResult = await resultFromPromise(\n 'mpp',\n surface,\n beforePayment({\n protocol: 'mpp',\n amount: numericAmount,\n currency,\n network: `tempo:${challenge.method}`,\n }),\n e => ({\n cause: 'mpp_payment_already_attempted' as const,\n message: e instanceof Error ? e.message : 'Before-payment hook failed',\n })\n );\n if (hookResult.isErr()) {\n return mppErr(surface, hookResult.error);\n }\n }\n\n // Create credential (signs transaction on Tempo)\n const credentialResult = await safeCreateMppCredential(\n surface,\n mppxClient,\n response\n );\n\n if (credentialResult.isErr()) {\n return credentialResult;\n }\n\n const credential = credentialResult.value;\n\n // Set Authorization header on cloned request\n clonedRequest.headers.set('Authorization', credential);\n\n // Retry the fetch with the credential\n return await safeFetch(surface, clonedRequest, timeout).andThen(\n paidResponse => {\n // Parse the receipt for transaction hash\n const receiptResult = safeGetMppReceipt(surface, paidResponse);\n\n const priceDisplay = amount\n ? Number(formatUnits(BigInt(amount), decimals)).toLocaleString(\n 'en-US',\n {\n style: 'currency',\n currency: 'USD',\n }\n )\n : undefined;\n\n return mppOk<FetchWithPaymentResult>({\n response: paidResponse,\n paymentInfo: {\n protocol: 'mpp',\n ...(priceDisplay ? { price: priceDisplay } : {}),\n ...(receiptResult.isOk()\n ? {\n payment: {\n success: true,\n transactionHash: receiptResult.value.reference,\n },\n }\n : {}),\n },\n });\n }\n );\n}\n","import { formatUnits } from 'viem';\n\nexport const tokenStringToNumber = (amount: string, decimals = 6) => {\n return Number(formatUnits(BigInt(amount), decimals));\n};\n","import type { PaymentRequired } from '@x402/core/types';\nimport type { DiscoveryExtension } from '@x402/extensions/bazaar';\nimport type {\n CompleteSIWxInfo,\n SIWxExtensionInfo,\n SupportedChain,\n} from '@x402/extensions/sign-in-with-x';\n\nconst getBazaarExtension = (extensions: PaymentRequired['extensions']) => {\n const { bazaar } = extensions ?? {};\n\n if (!bazaar) {\n return undefined;\n }\n\n return bazaar as DiscoveryExtension;\n};\n\nexport const getInputSchema = (extensions: PaymentRequired['extensions']) =>\n getBazaarExtension(extensions)?.schema.properties.input;\n\nexport const getSiwxExtension = (\n extensions: PaymentRequired['extensions']\n): CompleteSIWxInfo | undefined => {\n const siwx = extensions?.['sign-in-with-x'] as\n | { info?: SIWxExtensionInfo; supportedChains?: SupportedChain[] }\n | undefined;\n\n if (!siwx?.info) {\n return undefined;\n }\n\n // Pick the first EVM chain from supportedChains, falling back to defaults\n const chain = siwx.supportedChains?.find(c =>\n c.chainId.startsWith('eip155:')\n );\n\n return {\n ...siwx.info,\n chainId: chain?.chainId ?? 'eip155:8453',\n type: chain?.type ?? 'eip191',\n signatureScheme: chain?.signatureScheme,\n };\n};\n","import { x402Client, x402HTTPClient } from '@x402/core/client';\nimport { encodeSIWxHeader } from '@x402/extensions/sign-in-with-x';\n\nimport type { PrivateKeyAccount } from 'viem';\n\nimport {\n DEFAULT_USER_FETCH_TIMEOUT,\n fetchOk,\n safeFetch,\n} from '@/shared/neverthrow/fetch';\nimport {\n safeCreateSIWxPayload,\n safeGetPaymentRequired,\n} from '@/shared/neverthrow/x402';\nimport { getSiwxExtension } from '@/server/lib/x402-extensions';\n\nexport type FetchWithAuthResult =\n | { outcome: 'response'; response: Response; authenticated: boolean }\n | { outcome: 'no_siwx_extension'; extensions: string[] };\n\nexport interface FetchWithAuthOptions {\n surface: string;\n account: PrivateKeyAccount;\n timeout?: number;\n}\n\n/**\n * Create a fetch function with automatic SIWX (Sign-In With X) authentication.\n *\n * 1. Makes initial request\n * 2. If 402, parses for SIWX extension\n * 3. Creates signed wallet proof\n * 4. Retries with SIGN-IN-WITH-X header\n *\n * Returns a discriminated result:\n * - `outcome: 'response'` — a Response (authenticated or not), consumer handles ok/error\n * - `outcome: 'no_siwx_extension'` — 402 without SIWX, consumer decides how to present\n */\nexport function createFetchWithAuth(options: FetchWithAuthOptions) {\n const { surface, account, timeout = DEFAULT_USER_FETCH_TIMEOUT } = options;\n\n return async (request: Request) => {\n const retryRequest = request.clone();\n const httpClient = new x402HTTPClient(new x402Client());\n\n const firstResult = await safeFetch(surface, request, timeout);\n\n if (firstResult.isErr()) return firstResult;\n\n const firstResponse = firstResult.value;\n\n if (firstResponse.status !== 402) {\n return fetchOk<FetchWithAuthResult>({\n outcome: 'response',\n response: firstResponse,\n authenticated: false,\n });\n }\n\n const paymentRequiredResult = await safeGetPaymentRequired(\n surface,\n httpClient,\n firstResponse\n );\n\n if (paymentRequiredResult.isErr()) return paymentRequiredResult;\n\n const paymentRequired = paymentRequiredResult.value;\n const siwxExtension = getSiwxExtension(paymentRequired.extensions);\n\n if (!siwxExtension) {\n return fetchOk<FetchWithAuthResult>({\n outcome: 'no_siwx_extension',\n extensions: Object.keys(paymentRequired.extensions ?? {}),\n });\n }\n\n const payloadResult = await safeCreateSIWxPayload(\n surface,\n siwxExtension,\n account\n );\n\n if (payloadResult.isErr()) return payloadResult;\n\n const siwxHeader = encodeSIWxHeader(payloadResult.value);\n\n retryRequest.headers.set('SIGN-IN-WITH-X', siwxHeader);\n\n return (await safeFetch(surface, retryRequest, timeout)).andThen(response =>\n fet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AAgB,MAAM;AAAA,MAC1B;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAEA,QAAI,cAAc,MAAM,EAAG,QAAO;AAElC,UAAM,aAAa,iBAAiB,cAAc,KAAK;AAEvD,iBAAa,QAAQ,IAAI,kBAAkB,UAAU;AAErD,YAAQ,MAAM,UAAU,SAAS,cAAc,OAAO,GAAG;AAAA,MAAQ,cAC/D,QAA6B;AAAA,QAC3B,SAAS;AAAA,QACT;AAAA,QACA,eAAe;AAAA,MACjB,CAAC;AAAA,IACH;AAAA,EACF;AACF;","names":["errorType","formatUnits","response","formatUnits"]}
@@ -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.4";
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-HXRJ5ES4.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-JNYAKINU.js";
4
4
  import {
5
5
  DIST_TAG
6
- } from "./chunk-L6FT4XVY.js";
6
+ } from "./chunk-HXRJ5ES4.js";
7
7
  import {
8
8
  wait
9
9
  } from "./chunk-DZNSJ2BA.js";
@@ -626,4 +626,4 @@ export {
626
626
  tryAddServer,
627
627
  addServer
628
628
  };
629
- //# sourceMappingURL=chunk-Q36ALLOZ.js.map
629
+ //# sourceMappingURL=chunk-MQLBI77V.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isMppEnabled
3
- } from "./chunk-TBIW54SA.js";
3
+ } from "./chunk-OW3UV227.js";
4
4
  import {
5
5
  MCP_VERSION
6
- } from "./chunk-L6FT4XVY.js";
6
+ } from "./chunk-HXRJ5ES4.js";
7
7
  import {
8
8
  getBalance,
9
9
  getBaseUrl,
@@ -119,4 +119,4 @@ export {
119
119
  getWalletInfo,
120
120
  submitErrorReport
121
121
  };
122
- //# sourceMappingURL=chunk-A3AHACXX.js.map
122
+ //# sourceMappingURL=chunk-NFKU5GQE.js.map
@@ -0,0 +1,7 @@
1
+ // src/shared/mpp-enabled.ts
2
+ var isMppEnabled = () => "0.7.4".includes("-mpp");
3
+
4
+ export {
5
+ isMppEnabled
6
+ };
7
+ //# sourceMappingURL=chunk-OW3UV227.js.map
@@ -0,0 +1,182 @@
1
+ // src/shared/origins.ts
2
+ var ORIGINS = [
3
+ "https://stableenrich.dev" /* StableEnrich */,
4
+ "https://stablesocial.dev" /* StableSocial */,
5
+ "https://stablestudio.dev" /* StableStudio */,
6
+ "https://stableupload.dev" /* StableUpload */,
7
+ "https://stableemail.dev" /* StableEmail */,
8
+ "https://x402scan.com" /* X402Scan */,
9
+ "https://shirt.sh" /* Shirt */,
10
+ "https://x402puppet.com" /* X402Puppet */
11
+ ];
12
+
13
+ // src/shared/descriptions.ts
14
+ var ORIGIN_METADATA = {
15
+ ["https://stableenrich.dev" /* StableEnrich */]: {
16
+ title: "StableEnrich",
17
+ description: "People/org search, Google Maps, Grok twitter search, Exa web search, LinkedIn data, Firecrawl scrape, WhitePages, email enrichment"
18
+ },
19
+ ["https://stablesocial.dev" /* StableSocial */]: {
20
+ title: "StableSocial",
21
+ description: "Social media data for Twitter, Instagram, TikTok, YouTube, Facebook, Reddit"
22
+ },
23
+ ["https://stablestudio.dev" /* StableStudio */]: {
24
+ title: "StableStudio",
25
+ description: "Generate and edit images and videos"
26
+ },
27
+ ["https://stableupload.dev" /* StableUpload */]: {
28
+ title: "StableUpload",
29
+ description: "Pay to upload files, get a permanent download URL."
30
+ },
31
+ ["https://stableemail.dev" /* StableEmail */]: {
32
+ title: "StableEmail",
33
+ description: "Send emails"
34
+ },
35
+ ["https://x402scan.com" /* X402Scan */]: {
36
+ title: "X402 Scan",
37
+ description: "x402 protocol explorer"
38
+ },
39
+ ["https://shirt.sh" /* Shirt */]: {
40
+ title: "Shirt",
41
+ description: "Shirt.sh"
42
+ },
43
+ ["https://x402puppet.com" /* X402Puppet */]: {
44
+ title: "X402 Puppet",
45
+ description: "Browser automation"
46
+ },
47
+ ["https://x402facilitator.com" /* X402Facilitator */]: {
48
+ title: "X402 Facilitator",
49
+ description: "Payment facilitation"
50
+ }
51
+ };
52
+ var PRIMARY_ORIGINS = [
53
+ "https://stableenrich.dev" /* StableEnrich */,
54
+ "https://stablesocial.dev" /* StableSocial */,
55
+ "https://stablestudio.dev" /* StableStudio */,
56
+ "https://stableupload.dev" /* StableUpload */,
57
+ "https://stableemail.dev" /* StableEmail */
58
+ ];
59
+ var DESCRIPTIONS = {
60
+ fetch: {
61
+ 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.
62
+
63
+ 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.`,
64
+ cli: `HTTP fetch with automatic x402 payment handling.`
65
+ },
66
+ fetchWithAuth: {
67
+ 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.
68
+
69
+ 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.`,
70
+ cli: `HTTP fetch with automatic SIWX (Sign-In With X) authentication`
71
+ },
72
+ getWalletInfo: {
73
+ mcp: `Get wallet address and USDC balance. Auto-creates wallet on first use (~/.agentcash/wallet.json). Returns a deposit link if funding is needed.`,
74
+ cli: `Get wallet address, balance, and deposit link`
75
+ },
76
+ checkEndpointSchema: {
77
+ mcp: [
78
+ `Get the input/output schema and auth mode (paid or SIWX) for a single endpoint.`,
79
+ `Call this to see exactly what fields the request body expects and what the response contains.`,
80
+ `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.`
81
+ ].join("\n\n"),
82
+ cli: `Check endpoint for schema and pricing without making payment`
83
+ },
84
+ discoverApiEndpoints: {
85
+ mcp: [
86
+ `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.`,
87
+ `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.`,
88
+ `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.`
89
+ ].join("\n\n"),
90
+ cli: `Discover x402-protected or SIWX-protected endpoints on an origin`
91
+ },
92
+ redeemInvite: {
93
+ 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.`,
94
+ cli: `Redeem an invite code for free USDC`
95
+ },
96
+ reportError: {
97
+ mcp: `EMERGENCY ONLY. Report critical MCP tool bugs. Do NOT use for normal errors (balance, network, 4xx) \u2014 those are recoverable.`,
98
+ cli: `Report a critical bug to the agentcash team (emergency only)`
99
+ },
100
+ serverInstructions: [
101
+ `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).`,
102
+ `The user has installed agentcash because they want to use paid and SIWX-protected APIs as their preferred way to accomplish related tasks.`,
103
+ `Paid endpoints require a wallet balance. SIWX endpoints are free \u2014 they only require a wallet identity.`,
104
+ [
105
+ `If a task could be accomplished by one of these registered origins, run the workflow below:`,
106
+ ...PRIMARY_ORIGINS.flatMap(
107
+ (o) => ORIGIN_METADATA[o] ? [` - ${o} \u2014 ${ORIGIN_METADATA[o].description}`] : []
108
+ )
109
+ ].join("\n"),
110
+ `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.`,
111
+ [
112
+ `Workflow:`,
113
+ `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.`,
114
+ `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).`,
115
+ `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.`,
116
+ `4. Call fetch (paid) or fetch_with_auth (SIWX) based on the auth mode, and with the correct input schema.`
117
+ ].join("\n"),
118
+ `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.`
119
+ ].join("\n\n")
120
+ };
121
+ var REQUEST_PARAMS = {
122
+ url: "The endpoint URL",
123
+ method: "HTTP method. Defaults to GET for fetch operations.",
124
+ body: "Request body for POST/PUT/PATCH methods",
125
+ headers: "Additional headers to include",
126
+ timeout: "Request timeout in milliseconds"
127
+ };
128
+ var TOOL_PARAMS = {
129
+ fetch: {
130
+ paymentMethod: "Payment protocol to use. Defaults to auto-detect."
131
+ },
132
+ checkEndpointSchema: {
133
+ url: "Full URL of the endpoint to inspect",
134
+ method: "HTTP method to check. If omitted, all methods declared in the spec are returned.",
135
+ 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.",
136
+ headers: "Additional headers to include in the probe request"
137
+ },
138
+ getWalletInfo: {
139
+ output: {
140
+ address: "Wallet address (0x...)",
141
+ balance: "Total USDC balance across all chains",
142
+ chains: "Balance breakdown by chain",
143
+ isNewWallet: "Whether the wallet is new and needs to be funded",
144
+ depositLink: "Link to fund the wallet",
145
+ message: "Warning if balance is low",
146
+ chain: "Chain name",
147
+ chainBalance: "USDC balance on this chain"
148
+ }
149
+ },
150
+ redeemInvite: {
151
+ code: "The invite code",
152
+ output: {
153
+ amount: 'Amount with unit (e.g., "5 USDC")',
154
+ txHash: "Transaction hash on Base"
155
+ }
156
+ },
157
+ discoverApiEndpoints: {
158
+ url: "The origin URL to discover endpoints on (e.g. https://stableenrich.dev)",
159
+ 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."
160
+ },
161
+ reportError: {
162
+ tool: "MCP tool name",
163
+ resource: "Resource URL",
164
+ summary: "1-2 sentence summary",
165
+ errorMessage: "Error message",
166
+ stack: "Stack trace",
167
+ fullReport: "Detailed report with context, logs, repro steps",
168
+ output: {
169
+ reportId: "Unique report ID for tracking",
170
+ message: "Confirmation message"
171
+ }
172
+ }
173
+ };
174
+
175
+ export {
176
+ ORIGINS,
177
+ ORIGIN_METADATA,
178
+ DESCRIPTIONS,
179
+ REQUEST_PARAMS,
180
+ TOOL_PARAMS
181
+ };
182
+ //# sourceMappingURL=chunk-RY34EBJ4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/shared/origins.ts","../../src/shared/descriptions.ts"],"sourcesContent":["/**\n * Known x402-protected API origins.\n * Using const enum so values are inlined at build time.\n */\nexport const enum Origin {\n StableEnrich = 'https://stableenrich.dev',\n StableSocial = 'https://stablesocial.dev',\n StableStudio = 'https://stablestudio.dev',\n StableUpload = 'https://stableupload.dev',\n StableEmail = 'https://stableemail.dev',\n X402Scan = 'https://x402scan.com',\n Shirt = 'https://shirt.sh',\n X402Puppet = 'https://x402puppet.com',\n X402Facilitator = 'https://x402facilitator.com',\n}\n\n/**\n * Array of all known origins for iteration.\n * Const enums are erased at compile time, so we need a regular array for runtime iteration.\n */\nexport const ORIGINS = [\n Origin.StableEnrich,\n Origin.StableSocial,\n Origin.StableStudio,\n Origin.StableUpload,\n Origin.StableEmail,\n Origin.X402Scan,\n Origin.Shirt,\n Origin.X402Puppet,\n] as const;\n","/**\n * Single source of truth for all LLM-facing text in the MCP package.\n *\n * `DESCRIPTIONS` covers every tool with both an `mcp` variant (detailed,\n * AI-audience) and a `cli` variant (concise, human-readable for --help).\n * `serverInstructions` is shared across both surfaces.\n *\n * Additional exports cover parameter/output schema descriptions, origin\n * metadata, and prompt content — all LLM-facing text in one place.\n */\n\nimport { Origin } from './origins';\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Origin metadata (used for MCP resource registration descriptions)\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const ORIGIN_METADATA: Record<\n string,\n { title: string; description: string }\n> = {\n [Origin.StableEnrich]: {\n title: 'StableEnrich',\n description:\n 'People/org search, Google Maps, Grok twitter search, Exa web search, LinkedIn data, Firecrawl scrape, WhitePages, email enrichment',\n },\n [Origin.StableSocial]: {\n title: 'StableSocial',\n description:\n 'Social media data for Twitter, Instagram, TikTok, YouTube, Facebook, Reddit',\n },\n [Origin.StableStudio]: {\n title: 'StableStudio',\n description: 'Generate and edit images and videos',\n },\n [Origin.StableUpload]: {\n title: 'StableUpload',\n description: 'Pay to upload files, get a permanent download URL.',\n },\n [Origin.StableEmail]: {\n title: 'StableEmail',\n description: 'Send emails',\n },\n [Origin.X402Scan]: {\n title: 'X402 Scan',\n description: 'x402 protocol explorer',\n },\n [Origin.Shirt]: {\n title: 'Shirt',\n description: 'Shirt.sh',\n },\n [Origin.X402Puppet]: {\n title: 'X402 Puppet',\n description: 'Browser automation',\n },\n [Origin.X402Facilitator]: {\n title: 'X402 Facilitator',\n description: 'Payment facilitation',\n },\n};\n\nconst PRIMARY_ORIGINS = [\n Origin.StableEnrich,\n Origin.StableSocial,\n Origin.StableStudio,\n Origin.StableUpload,\n Origin.StableEmail,\n] as const;\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Tool descriptions — { mcp, cli } per tool + shared serverInstructions\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const DESCRIPTIONS = {\n fetch: {\n 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.\\n\\nFor 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.`,\n cli: `HTTP fetch with automatic x402 payment handling.`,\n },\n\n fetchWithAuth: {\n 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.\\n\\nFor 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.`,\n cli: `HTTP fetch with automatic SIWX (Sign-In With X) authentication`,\n },\n\n getWalletInfo: {\n mcp: `Get wallet address and USDC balance. Auto-creates wallet on first use (~/.agentcash/wallet.json). Returns a deposit link if funding is needed.`,\n cli: `Get wallet address, balance, and deposit link`,\n },\n\n checkEndpointSchema: {\n mcp: [\n `Get the input/output schema and auth mode (paid or SIWX) for a single endpoint.`,\n `Call this to see exactly what fields the request body expects and what the response contains.`,\n `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 — do this when pricing is range-based or quote-based, or when you're unsure about the input schema.`,\n ].join('\\n\\n'),\n cli: `Check endpoint for schema and pricing without making payment`,\n },\n\n discoverApiEndpoints: {\n mcp: [\n `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.`,\n `Call this when you need to see what routes are available at an origin — whether it's one of the registered origins or any other origin you've identified as useful.`,\n `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.`,\n ].join('\\n\\n'),\n cli: `Discover x402-protected or SIWX-protected endpoints on an origin`,\n },\n\n redeemInvite: {\n 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.`,\n cli: `Redeem an invite code for free USDC`,\n },\n\n reportError: {\n mcp: `EMERGENCY ONLY. Report critical MCP tool bugs. Do NOT use for normal errors (balance, network, 4xx) — those are recoverable.`,\n cli: `Report a critical bug to the agentcash team (emergency only)`,\n },\n\n serverInstructions: [\n `AgentCash lets you call protected APIs — 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).`,\n `The user has installed agentcash because they want to use paid and SIWX-protected APIs as their preferred way to accomplish related tasks.`,\n `Paid endpoints require a wallet balance. SIWX endpoints are free — they only require a wallet identity.`,\n [\n `If a task could be accomplished by one of these registered origins, run the workflow below:`,\n ...PRIMARY_ORIGINS.flatMap(o =>\n ORIGIN_METADATA[o]\n ? [` - ${o} — ${ORIGIN_METADATA[o].description}`]\n : []\n ),\n ].join('\\n'),\n `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.`,\n [\n `Workflow:`,\n `1. If you don't already know your balance, call get_wallet_info. You need a balance for paid endpoints — 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.`,\n `2. Call discover_api_endpoints() to get the endpoint index — 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).`,\n `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.`,\n `4. Call fetch (paid) or fetch_with_auth (SIWX) based on the auth mode, and with the correct input schema.`,\n ].join('\\n'),\n `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.`,\n ].join('\\n\\n'),\n} as const;\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Shared request schema parameter descriptions\n// (used by fetch, fetch_with_auth tools)\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const REQUEST_PARAMS = {\n url: 'The endpoint URL',\n method: 'HTTP method. Defaults to GET for fetch operations.',\n body: 'Request body for POST/PUT/PATCH methods',\n headers: 'Additional headers to include',\n timeout: 'Request timeout in milliseconds',\n} as const;\n\n// ─────────────────────────────────────────────────────────────────────────────\n// Per-tool parameter and output schema descriptions\n// ─────────────────────────────────────────────────────────────────────────────\n\nexport const TOOL_PARAMS = {\n fetch: {\n paymentMethod: 'Payment protocol to use. Defaults to auto-detect.',\n },\n\n checkEndpointSchema: {\n url: 'Full URL of the endpoint to inspect',\n method:\n 'HTTP method to check. If omitted, all methods declared in the spec are returned.',\n sampleInputBody:\n '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.',\n headers: 'Additional headers to include in the probe request',\n },\n\n getWalletInfo: {\n output: {\n address: 'Wallet address (0x...)',\n balance: 'Total USDC balance across all chains',\n chains: 'Balance breakdown by chain',\n isNewWallet: 'Whether the wallet is new and needs to be funded',\n depositLink: 'Link to fund the wallet',\n message: 'Warning if balance is low',\n chain: 'Chain name',\n chainBalance: 'USDC balance on this chain',\n },\n },\n\n redeemInvite: {\n code: 'The invite code',\n output: {\n amount: 'Amount with unit (e.g., \"5 USDC\")',\n txHash: 'Transaction hash on Base',\n },\n },\n\n discoverApiEndpoints: {\n url: 'The origin URL to discover endpoints on (e.g. https://stableenrich.dev)',\n includeGuidance:\n \"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.\",\n },\n\n reportError: {\n tool: 'MCP tool name',\n resource: 'Resource URL',\n summary: '1-2 sentence summary',\n errorMessage: 'Error message',\n stack: 'Stack trace',\n fullReport: 'Detailed report with context, logs, repro steps',\n output: {\n reportId: 'Unique report ID for tracking',\n message: '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AA,EAEA,sBAAsB;AAAA,IACpB,KAAK;AAAA,IACL,iBACE;AAAA,EACJ;AAAA,EAEA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,IACT,cAAc;AAAA,IACd,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,QAAQ;AAAA,MACN,UAAU;AAAA,MACV,SAAS;AAAA,IACX;AAAA,EACF;AACF;","names":[]}
@@ -6,13 +6,14 @@ import {
6
6
  createFetchWithAuth,
7
7
  createFetchWithPayment,
8
8
  requestSchema
9
- } from "./chunk-2TZTTTIV.js";
9
+ } from "./chunk-DBDSS3CQ.js";
10
+ import "./chunk-RY34EBJ4.js";
10
11
  import {
11
12
  TEMPO_RPC_URL,
12
13
  getWalletInfo,
13
14
  submitErrorReport
14
- } from "./chunk-A3AHACXX.js";
15
- import "./chunk-TBIW54SA.js";
15
+ } from "./chunk-NFKU5GQE.js";
16
+ import "./chunk-OW3UV227.js";
16
17
  import {
17
18
  checkEndpoint,
18
19
  discoverResources
@@ -20,11 +21,11 @@ import {
20
21
  import {
21
22
  getPlatformPath,
22
23
  tryAddServer
23
- } from "./chunk-Q36ALLOZ.js";
24
+ } from "./chunk-MQLBI77V.js";
24
25
  import "./chunk-JNYAKINU.js";
25
26
  import {
26
27
  MCP_VERSION
27
- } from "./chunk-L6FT4XVY.js";
28
+ } from "./chunk-HXRJ5ES4.js";
28
29
  import "./chunk-DZNSJ2BA.js";
29
30
  import {
30
31
  DEFAULT_NETWORK,
@@ -637,7 +638,7 @@ async function reportErrorCommand(args, flags) {
637
638
 
638
639
  // src/cli/commands/server.ts
639
640
  async function serverCommand(flags) {
640
- const { startServer } = await import("./server-GGPRVDHK.js");
641
+ const { startServer } = await import("./server-GJVD7VNR.js");
641
642
  await startServer(flags);
642
643
  }
643
644
 
@@ -1499,4 +1500,4 @@ export {
1499
1500
  walletInfoCommand,
1500
1501
  walletRedeemCommand
1501
1502
  };
1502
- //# sourceMappingURL=commands-CVVQU55P.js.map
1503
+ //# sourceMappingURL=commands-M66YQJM7.js.map