@quackai/q402-mcp 0.7.5 → 0.7.6

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.
Files changed (2) hide show
  1. package/dist/index.js +75 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -211,7 +211,7 @@ var isValidPrivateKey = (s) => typeof s === "string" && PRIVATE_KEY_RE.test(s);
211
211
 
212
212
  // src/version.ts
213
213
  var PACKAGE_NAME = "@quackai/q402-mcp";
214
- var PACKAGE_VERSION = "0.7.5";
214
+ var PACKAGE_VERSION = "0.7.6";
215
215
 
216
216
  // src/tools/quote.ts
217
217
  import { z } from "zod";
@@ -1354,7 +1354,8 @@ async function runBatchPay(input) {
1354
1354
  } catch {
1355
1355
  }
1356
1356
  }
1357
- const scopeRequest = input.keyScope ?? "auto";
1357
+ const rawScopeRequest = input.keyScope ?? "auto";
1358
+ const scopeRequest = effectiveMode === "agentic-server" && rawScopeRequest === "auto" ? "multichain" : rawScopeRequest;
1358
1359
  if (scopeRequest === "trial" && input.recipients.length > RECIPIENT_LIMIT_TRIAL) {
1359
1360
  guardsApplied.push("trial_cap_exceeded");
1360
1361
  return {
@@ -2815,6 +2816,16 @@ async function runRecurringList(input = {}) {
2815
2816
  setupHint: "No live Q402 API key configured. Run q402_doctor to set one up, or open the dashboard to create rules from the UI."
2816
2817
  };
2817
2818
  }
2819
+ if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
2820
+ return {
2821
+ configured: false,
2822
+ walletId: null,
2823
+ rules: [],
2824
+ count: 0,
2825
+ dashboardUrl,
2826
+ setupHint: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Trial keys can't see recurring rules. Activate a paid plan at https://q402.quackai.ai/payment."
2827
+ };
2828
+ }
2818
2829
  const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
2819
2830
  try {
2820
2831
  const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
@@ -2951,6 +2962,16 @@ async function runRecurringCreate(input) {
2951
2962
  dashboardUrl
2952
2963
  };
2953
2964
  }
2965
+ if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
2966
+ return {
2967
+ ok: false,
2968
+ walletId: null,
2969
+ rule: null,
2970
+ error: "MULTICHAIN_KEY_REQUIRED",
2971
+ message: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Trial keys can't schedule recurring rules. Activate a paid plan at https://q402.quackai.ai/payment.",
2972
+ dashboardUrl
2973
+ };
2974
+ }
2954
2975
  const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
2955
2976
  try {
2956
2977
  const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
@@ -3040,6 +3061,16 @@ async function runRecurringCancel(input) {
3040
3061
  dashboardUrl
3041
3062
  };
3042
3063
  }
3064
+ if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
3065
+ return {
3066
+ ok: false,
3067
+ walletId: null,
3068
+ rule: null,
3069
+ error: "MULTICHAIN_KEY_REQUIRED",
3070
+ message: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Activate a paid plan at https://q402.quackai.ai/payment.",
3071
+ dashboardUrl
3072
+ };
3073
+ }
3043
3074
  const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
3044
3075
  try {
3045
3076
  const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
@@ -3132,6 +3163,18 @@ async function runRecurringFires(input) {
3132
3163
  setupHint: "No live Q402 API key configured. Run q402_doctor to set one up, or open the dashboard to view fire history from the UI."
3133
3164
  };
3134
3165
  }
3166
+ if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
3167
+ return {
3168
+ configured: false,
3169
+ walletId: null,
3170
+ ruleId: input.ruleId,
3171
+ rule: null,
3172
+ fires: [],
3173
+ count: 0,
3174
+ dashboardUrl,
3175
+ setupHint: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Trial keys can't see fire history. Activate a paid plan at https://q402.quackai.ai/payment."
3176
+ };
3177
+ }
3135
3178
  const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
3136
3179
  try {
3137
3180
  const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
@@ -3225,6 +3268,16 @@ async function runRecurringPause(input) {
3225
3268
  dashboardUrl
3226
3269
  };
3227
3270
  }
3271
+ if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
3272
+ return {
3273
+ ok: false,
3274
+ walletId: null,
3275
+ rule: null,
3276
+ error: "MULTICHAIN_KEY_REQUIRED",
3277
+ message: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Activate a paid plan at https://q402.quackai.ai/payment.",
3278
+ dashboardUrl
3279
+ };
3280
+ }
3228
3281
  const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
3229
3282
  try {
3230
3283
  const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
@@ -3308,6 +3361,16 @@ async function runRecurringResume(input) {
3308
3361
  dashboardUrl
3309
3362
  };
3310
3363
  }
3364
+ if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
3365
+ return {
3366
+ ok: false,
3367
+ walletId: null,
3368
+ rule: null,
3369
+ error: "MULTICHAIN_KEY_REQUIRED",
3370
+ message: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Activate a paid plan at https://q402.quackai.ai/payment.",
3371
+ dashboardUrl
3372
+ };
3373
+ }
3311
3374
  const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
3312
3375
  try {
3313
3376
  const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
@@ -3391,6 +3454,16 @@ async function runRecurringSkipNext(input) {
3391
3454
  dashboardUrl
3392
3455
  };
3393
3456
  }
3457
+ if (!CONFIG.multichainApiKey || !CONFIG.multichainApiKey.startsWith("q402_live_")) {
3458
+ return {
3459
+ ok: false,
3460
+ walletId: null,
3461
+ rule: null,
3462
+ error: "MULTICHAIN_KEY_REQUIRED",
3463
+ message: "Recurring payments require a paid Multichain API key (Q402_MULTICHAIN_API_KEY). Activate a paid plan at https://q402.quackai.ai/payment.",
3464
+ dashboardUrl
3465
+ };
3466
+ }
3394
3467
  const explicitWalletId = typeof input.walletId === "string" && input.walletId.length > 0 ? input.walletId.toLowerCase() : CONFIG.walletId;
3395
3468
  try {
3396
3469
  const res = await fetch(`${base}/wallet/agentic/recurring-by-key`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quackai/q402-mcp",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "MCP server for Q402 — gasless USDC, USDT, and RLUSD payments across 9 EVM chains, callable from Claude (Desktop / Code), OpenAI Codex CLI, and any other Model Context Protocol client.",
5
5
  "mcpName": "io.github.bitgett/q402-mcp",
6
6
  "keywords": [