agentwallet-mcp 1.14.5 → 1.14.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.
package/build/index.js CHANGED
@@ -1175,7 +1175,7 @@ function resolveChainId(network) {
1175
1175
  const AddressSchema = z.string().regex(/^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$/, 'Must be a 0x-prefixed 40-hex EVM address or a base58 Solana address');
1176
1176
  const server = new McpServer({
1177
1177
  name: 'agentwallet',
1178
- version: '1.14.5',
1178
+ version: '1.14.6',
1179
1179
  }, {
1180
1180
  instructions: `AgentWallet gives AI agents their own blockchain wallets. ${anyLocalMode()
1181
1181
  ? 'This server runs in LOCAL (self-custody) mode: the operator supplied the key, signing happens in this process, and the only spend guards are the environment caps (AGENTWALLET_MAX_TX_NATIVE / _TOKEN / _SOL per transaction, AGENTWALLET_MAX_AUTOPAY and AGENTWALLET_AUTOPAY_ASSETS for x402, AGENTWALLET_X402_MAX_TIMEOUT for authorization windows). There is no server-side pause, daily limit or approval email; pause_wallet, unpause_wallet and delete_wallet are refused.'
package/build/policy.js CHANGED
@@ -13,6 +13,7 @@
13
13
  */
14
14
  import { readFileSync } from 'node:fs';
15
15
  import { createHash } from 'node:crypto';
16
+ import { dirname, isAbsolute, join } from 'node:path';
16
17
  import { z } from 'zod';
17
18
  const Dec = z.string().regex(/^\d+(\.\d+)?$/, 'a decimal number as a string, like "5" or "0.25"');
18
19
  const Window = z.object({ daily: Dec.optional(), monthly: Dec.optional(), total: Dec.optional() }).strict();
@@ -118,12 +119,15 @@ export function loadPolicy(env = process.env) {
118
119
  }
119
120
  const policy = parsePolicy(text);
120
121
  const hash = createHash('sha256').update(text).digest('hex');
121
- const dir = file.replace(/[\\/][^\\/]*$/, '') || '.';
122
+ // The ledger lives beside the policy file. dirname() gives '.' for a bare
123
+ // filename; a hand-rolled strip-after-last-slash left the filename itself as
124
+ // the directory, so AGENTWALLET_POLICY=policy.json could not start (1.14.6).
125
+ const dir = dirname(file);
122
126
  let ledgerPath = ledgerEnv || null;
123
127
  if (!ledgerPath && policy.ledger)
124
- ledgerPath = /^([a-zA-Z]:)?[\\/]/.test(policy.ledger) ? policy.ledger : `${dir}/${policy.ledger}`;
128
+ ledgerPath = isAbsolute(policy.ledger) ? policy.ledger : join(dir, policy.ledger);
125
129
  if (!ledgerPath && needsLedger(policy))
126
- ledgerPath = `${dir}/agentwallet-ledger.jsonl`;
130
+ ledgerPath = join(dir, 'agentwallet-ledger.jsonl');
127
131
  return { policy, path: file, hash, ledgerPath };
128
132
  }
129
133
  /** A budget is only meaningful across restarts, so it needs a file. */
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hifriendbot/agentwallet-mcp.git"
7
7
  },
8
- "version": "1.14.5",
8
+ "version": "1.14.6",
9
9
  "description": "MCP server for AgentWallet: self-custody local signing on EVM and Solana, or hosted wallets. Sign, broadcast, pay x402 invoices, and accept x402 payments.",
10
10
  "type": "module",
11
11
  "main": "build/index.js",
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "build": "tsc",
22
22
  "start": "node build/index.js",
23
- "test": "node test/x402-payment.test.mjs && node test/eip3009.test.mjs && node test/permit2-risk.test.mjs && node test/token-cap.test.mjs && node test/spl-cap.test.mjs && node test/unknown-decimals-cap.test.mjs && node test/decimals-range-cap.test.mjs && node test/local-mode.test.mjs && node test/ssrf-guard.test.mjs && node test/x402-policy.test.mjs && node test/local-guard-shape.test.mjs && node test/allowance-total-cap.test.mjs && node test/autopay-scheme.test.mjs && node test/spl-recipient-guard.test.mjs && node test/approval-binding.test.mjs && node test/ata-rent-size.test.mjs && node test/final-url-guard.test.mjs && node test/audit-1135.test.mjs && node test/local-no-autopay.test.mjs && node test/audit-1136.test.mjs && node test/delete-confirm.test.mjs && node test/audit-1138.test.mjs && node test/audit-1139.test.mjs && node test/audit-11310.test.mjs && node test/audit-11311.test.mjs && node test/audit-11312.test.mjs && node test/audit-11313.test.mjs && node test/audit-11316.test.mjs && node test/spend-policy.test.mjs",
23
+ "test": "node test/x402-payment.test.mjs && node test/eip3009.test.mjs && node test/permit2-risk.test.mjs && node test/token-cap.test.mjs && node test/spl-cap.test.mjs && node test/unknown-decimals-cap.test.mjs && node test/decimals-range-cap.test.mjs && node test/local-mode.test.mjs && node test/ssrf-guard.test.mjs && node test/x402-policy.test.mjs && node test/local-guard-shape.test.mjs && node test/allowance-total-cap.test.mjs && node test/autopay-scheme.test.mjs && node test/spl-recipient-guard.test.mjs && node test/approval-binding.test.mjs && node test/ata-rent-size.test.mjs && node test/final-url-guard.test.mjs && node test/audit-1135.test.mjs && node test/local-no-autopay.test.mjs && node test/audit-1136.test.mjs && node test/delete-confirm.test.mjs && node test/audit-1138.test.mjs && node test/audit-1139.test.mjs && node test/audit-11310.test.mjs && node test/audit-11311.test.mjs && node test/audit-11312.test.mjs && node test/audit-11313.test.mjs && node test/audit-11316.test.mjs && node test/spend-policy.test.mjs && node test/policy-path-resolution.test.mjs",
24
24
  "prepublishOnly": "npm run build"
25
25
  },
26
26
  "keywords": [