@quackai/q402-mcp 0.6.2 → 0.6.3

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 +13 -5
  2. package/package.json +3 -2
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.6.2";
214
+ var PACKAGE_VERSION = "0.6.3";
215
215
 
216
216
  // src/tools/quote.ts
217
217
  import { z } from "zod";
@@ -2049,7 +2049,7 @@ function envSlot(name, purpose) {
2049
2049
  }
2050
2050
  function mask2(key) {
2051
2051
  if (!key || key.length < 12) return key ?? "";
2052
- return `${key.slice(0, 12)}\u2026${key.slice(-4)}`;
2052
+ return `${key.slice(0, 12)}...${key.slice(-4)}`;
2053
2053
  }
2054
2054
  function detectPhase() {
2055
2055
  const anyKey = !!(CONFIG.trialApiKey || CONFIG.multichainApiKey || CONFIG.legacyApiKey);
@@ -2435,10 +2435,10 @@ async function runDoctor() {
2435
2435
  nextStep: ready ? "Show userInstructions verbatim. Then offer to make a small test quote (q402_quote) to confirm everything works end-to-end." : "Walk the user through each warning in order. Show userInstructions verbatim for the cleanup steps.",
2436
2436
  agentInstructions: ready ? "[AI-ONLY \u2014 do not show this paragraph to the user verbatim] Live mode is fully configured. Summarize the wallet address (mask middle), plan tier(s), remaining quota, and any non-zero delegation counts to the user as a checklist. Offer a tiny test (q402_quote, not q402_pay) to confirm. Don't echo the full keys array verbatim \u2014 pick the most useful 2-3 fields per scope." : "[AI-ONLY \u2014 do not show this paragraph to the user verbatim] Walk the user through each warning IN ORDER, plain language. For slot-mismatch warnings, the fix is editing ~/.q402/mcp.env and restarting the client (Cursor / Cline: reload window; Claude / Codex: quit + relaunch). Surface body.error strings from any verify failure as the user-visible reason (e.g. 'your Trial expired 3 days ago', 'API key has been rotated') \u2014 don't generic-out to 'check the key value'.",
2437
2437
  userInstructions: ready ? [
2438
- `Your wallet: ${walletAddress ? walletAddress.slice(0, 6) + "\u2026" + walletAddress.slice(-4) : "(derive failed \u2014 check Q402_PRIVATE_KEY)"}`,
2438
+ walletAddress ? `Your wallet: ${walletAddress.slice(0, 6)}...${walletAddress.slice(-4)}` : modes.modeC && !modes.modeA && !modes.modeB ? "Wallet: server-managed (Mode C) \u2014 Q402 holds your Agent Wallet key. No local wallet to show." : "(wallet derive failed \u2014 check Q402_PRIVATE_KEY or Q402_AGENTIC_PRIVATE_KEY in ~/.q402/mcp.env)",
2439
2439
  "Q402 is live. You can now ask me to quote, pay, batch-pay, or check Trust Receipts.",
2440
2440
  "Want me to run a quick gas comparison across all 9 chains as a smoke test?",
2441
- "Need to chain-test against sandbox without changing keys? Set Q402_ENABLE_REAL_PAYMENTS=0 in ~/.q402/mcp.env and restart \u2014 every q402_pay returns a fake hash until you flip it back to 1."
2441
+ "Need to chain-test against sandbox without changing keys? Set Q402_ENABLE_REAL_PAYMENTS=0 in ~/.q402/mcp.env and restart - every q402_pay returns a fake hash until you flip it back to 1."
2442
2442
  ] : [
2443
2443
  `Q402 has ${warnings.length} issue${warnings.length === 1 ? "" : "s"} to fix:`,
2444
2444
  ...warnings.map((w) => `\u2022 ${w}`),
@@ -2650,6 +2650,9 @@ import { z as z11 } from "zod";
2650
2650
  var ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;
2651
2651
  var AMOUNT_RE = /^\d+(\.\d{1,18})?$/;
2652
2652
  var RecurringCreateInputSchema = z11.object({
2653
+ confirm: z11.literal(true).describe(
2654
+ 'REQUIRED. Must be literally `true`. Authoring a recurring rule schedules future on-chain payments that the user does not click through one-by-one \u2014 the user has to explicitly say yes BEFORE this is called. Echo back the frequency + recipient + amount + chain + token + cancelWindow you intend to create, get a plain-language confirmation from the user (e.g. "yes, create the schedule"), and ONLY then call this with confirm: true. Mirrors the same guard q402_pay / q402_batch_pay use on one-shot sends.'
2655
+ ),
2653
2656
  frequency: z11.string().min(1).describe(
2654
2657
  'Cadence string. One of: "hourly:N" (N=1..23), "daily", "weekly:{mon|tue|wed|thu|fri|sat|sun}", "monthly:N" (N=1..31), "monthly:last". Examples: "hourly:1" fires every hour, "weekly:fri" fires every Friday, "monthly:1" fires on the 1st of each month.'
2655
2658
  ),
@@ -2675,6 +2678,11 @@ var RECURRING_CREATE_TOOL = {
2675
2678
  inputSchema: {
2676
2679
  type: "object",
2677
2680
  properties: {
2681
+ confirm: {
2682
+ type: "boolean",
2683
+ const: true,
2684
+ description: "REQUIRED. Must be literally `true`. Recurring rules schedule future on-chain payments without per-fire user prompts, so the agent must get an explicit user yes BEFORE setting `confirm: true` and calling this. Same guard q402_pay / q402_batch_pay use on one-shot sends."
2685
+ },
2678
2686
  frequency: {
2679
2687
  type: "string",
2680
2688
  description: 'Required. "hourly:N" (N=1..23), "daily", "weekly:{day}", "monthly:N", or "monthly:last".'
@@ -2714,7 +2722,7 @@ var RECURRING_CREATE_TOOL = {
2714
2722
  description: "Optional. Defaults to default wallet on server."
2715
2723
  }
2716
2724
  },
2717
- required: ["frequency", "recipient", "amount"],
2725
+ required: ["confirm", "frequency", "recipient", "amount"],
2718
2726
  additionalProperties: false
2719
2727
  }
2720
2728
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quackai/q402-mcp",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
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": [
@@ -68,6 +68,7 @@
68
68
  "access": "public"
69
69
  },
70
70
  "overrides": {
71
- "ws": "^8.20.1"
71
+ "ws": "^8.20.1",
72
+ "qs": "^6.15.2"
72
73
  }
73
74
  }