x402-proxy 0.10.6 → 0.10.7
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/CHANGELOG.md +8 -1
- package/dist/bin/cli.js +31 -10
- package/dist/openclaw/plugin.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.10.7] - 2026-04-01
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- `claude` and `claude --model` shown in default `npx x402-proxy` commands output
|
|
14
|
+
- `claude --help` lists available models and usage examples
|
|
15
|
+
|
|
10
16
|
## [0.10.6] - 2026-04-01
|
|
11
17
|
|
|
12
18
|
### Fixed
|
|
@@ -387,7 +393,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
387
393
|
- `appendHistory` / `readHistory` / `calcSpend` - JSONL transaction history
|
|
388
394
|
- Re-exports from `@x402/fetch`, `@x402/svm`, `@x402/evm`
|
|
389
395
|
|
|
390
|
-
[Unreleased]: https://github.com/cascade-protocol/x402-proxy/compare/v0.10.
|
|
396
|
+
[Unreleased]: https://github.com/cascade-protocol/x402-proxy/compare/v0.10.7...HEAD
|
|
397
|
+
[0.10.7]: https://github.com/cascade-protocol/x402-proxy/compare/v0.10.6...v0.10.7
|
|
391
398
|
[0.10.6]: https://github.com/cascade-protocol/x402-proxy/compare/v0.10.5...v0.10.6
|
|
392
399
|
[0.10.5]: https://github.com/cascade-protocol/x402-proxy/compare/v0.10.4...v0.10.5
|
|
393
400
|
[0.10.4]: https://github.com/cascade-protocol/x402-proxy/compare/v0.10.3...v0.10.4
|
package/dist/bin/cli.js
CHANGED
|
@@ -1083,18 +1083,36 @@ Examples:
|
|
|
1083
1083
|
//#endregion
|
|
1084
1084
|
//#region src/commands/claude.ts
|
|
1085
1085
|
const DEFAULT_MODEL = "stepfun/step-3.5-flash";
|
|
1086
|
+
const modelList = [
|
|
1087
|
+
"stepfun/step-3.5-flash",
|
|
1088
|
+
"minimax/minimax-m2.5",
|
|
1089
|
+
"minimax/minimax-m2.7",
|
|
1090
|
+
"z-ai/glm-5",
|
|
1091
|
+
"z-ai/glm-5-turbo",
|
|
1092
|
+
"moonshotai/kimi-k2.5"
|
|
1093
|
+
].map((id) => ` ${id}`).join("\n");
|
|
1086
1094
|
function normalizeClaudeArgs(args) {
|
|
1087
1095
|
return args[0] === "--" ? args.slice(1) : args;
|
|
1088
1096
|
}
|
|
1089
1097
|
const claudeCommand = buildCommand({
|
|
1090
1098
|
docs: {
|
|
1091
1099
|
brief: "Run Claude Code through a paid local proxy",
|
|
1092
|
-
fullDescription: `
|
|
1100
|
+
fullDescription: `Starts a local x402-proxy server and launches Claude Code with
|
|
1101
|
+
ANTHROPIC_BASE_URL pointed at it. All inference requests go through
|
|
1102
|
+
the proxy, which handles payments automatically via MPP.
|
|
1093
1103
|
|
|
1094
|
-
|
|
1095
|
-
$ x402-proxy claude
|
|
1096
|
-
$ x402-proxy claude --model z-ai/glm-5
|
|
1097
|
-
$ x402-proxy claude -- --print "explain this
|
|
1104
|
+
Usage:
|
|
1105
|
+
$ x402-proxy claude Start with default model
|
|
1106
|
+
$ x402-proxy claude --model z-ai/glm-5 Use a specific model
|
|
1107
|
+
$ x402-proxy claude -- --print "explain this" Pass args to Claude Code
|
|
1108
|
+
$ x402-proxy claude -- -p "summarize *.ts" Print mode (non-interactive)
|
|
1109
|
+
|
|
1110
|
+
Available models (via surf.cascade.fyi):
|
|
1111
|
+
${modelList}
|
|
1112
|
+
|
|
1113
|
+
The --model value is passed as ANTHROPIC_MODEL and ANTHROPIC_CUSTOM_MODEL_OPTION
|
|
1114
|
+
to Claude Code. Any model supported by the upstream endpoint will work, even if
|
|
1115
|
+
not listed above.`
|
|
1098
1116
|
},
|
|
1099
1117
|
parameters: {
|
|
1100
1118
|
flags: {
|
|
@@ -1453,6 +1471,8 @@ Examples:
|
|
|
1453
1471
|
console.log(pc.dim(" Commands:"));
|
|
1454
1472
|
console.log(` ${pc.cyan("$ npx x402-proxy <url>")} Fetch a paid API`);
|
|
1455
1473
|
console.log(` ${pc.cyan("$ npx x402-proxy mcp <url>")} MCP proxy for AI agents`);
|
|
1474
|
+
console.log(` ${pc.cyan("$ npx x402-proxy claude")} Run Claude Code via paid proxy`);
|
|
1475
|
+
console.log(` ${pc.cyan("$ npx x402-proxy claude --model <id>")} Use a specific model`);
|
|
1456
1476
|
console.log(` ${pc.cyan("$ npx x402-proxy setup")} Reconfigure wallet`);
|
|
1457
1477
|
console.log(` ${pc.cyan("$ npx x402-proxy wallet")} Addresses and balances`);
|
|
1458
1478
|
console.log(` ${pc.cyan("$ npx x402-proxy wallet history")} Full payment history`);
|
|
@@ -1470,6 +1490,7 @@ Examples:
|
|
|
1470
1490
|
console.log(` ${pc.cyan("$ npx x402-proxy setup")} Create a wallet`);
|
|
1471
1491
|
console.log(` ${pc.cyan("$ npx x402-proxy <url>")} Fetch a paid API`);
|
|
1472
1492
|
console.log(` ${pc.cyan("$ npx x402-proxy mcp <url>")} MCP proxy for AI agents`);
|
|
1493
|
+
console.log(` ${pc.cyan("$ npx x402-proxy claude")} Run Claude Code via paid proxy`);
|
|
1473
1494
|
console.log(` ${pc.cyan("$ npx x402-proxy wallet")} Addresses and balances`);
|
|
1474
1495
|
console.log(` ${pc.cyan("$ npx x402-proxy wallet history")} Payment history`);
|
|
1475
1496
|
console.log(` ${pc.cyan("$ npx x402-proxy --help")} All options`);
|
|
@@ -1919,7 +1940,7 @@ Wallet is auto-generated on first run. No env vars needed.`
|
|
|
1919
1940
|
}
|
|
1920
1941
|
const remoteClient = new Client({
|
|
1921
1942
|
name: "x402-proxy",
|
|
1922
|
-
version: "0.10.
|
|
1943
|
+
version: "0.10.7"
|
|
1923
1944
|
});
|
|
1924
1945
|
const x402Mcp = new x402MCPClient(remoteClient, x402PaymentClient, {
|
|
1925
1946
|
autoPayment: true,
|
|
@@ -1957,7 +1978,7 @@ Wallet is auto-generated on first run. No env vars needed.`
|
|
|
1957
1978
|
}
|
|
1958
1979
|
const localServer = new Server({
|
|
1959
1980
|
name: "x402-proxy",
|
|
1960
|
-
version: "0.10.
|
|
1981
|
+
version: "0.10.7"
|
|
1961
1982
|
}, { capabilities: {
|
|
1962
1983
|
tools: tools.length > 0 ? {} : void 0,
|
|
1963
1984
|
resources: remoteResources.length > 0 ? {} : void 0
|
|
@@ -2052,7 +2073,7 @@ Wallet is auto-generated on first run. No env vars needed.`
|
|
|
2052
2073
|
}));
|
|
2053
2074
|
const remoteClient = new Client({
|
|
2054
2075
|
name: "x402-proxy",
|
|
2055
|
-
version: "0.10.
|
|
2076
|
+
version: "0.10.7"
|
|
2056
2077
|
});
|
|
2057
2078
|
await connectTransport(remoteClient);
|
|
2058
2079
|
const mppClient = McpClient.wrap(remoteClient, { methods: wrappedMethods });
|
|
@@ -2067,7 +2088,7 @@ Wallet is auto-generated on first run. No env vars needed.`
|
|
|
2067
2088
|
}
|
|
2068
2089
|
const localServer = new Server({
|
|
2069
2090
|
name: "x402-proxy",
|
|
2070
|
-
version: "0.10.
|
|
2091
|
+
version: "0.10.7"
|
|
2071
2092
|
}, { capabilities: {
|
|
2072
2093
|
tools: tools.length > 0 ? {} : void 0,
|
|
2073
2094
|
resources: remoteResources.length > 0 ? {} : void 0
|
|
@@ -2466,7 +2487,7 @@ const app = buildApplication(buildRouteMap({
|
|
|
2466
2487
|
docs: { brief: "curl for x402 paid APIs" }
|
|
2467
2488
|
}), {
|
|
2468
2489
|
name: "x402-proxy",
|
|
2469
|
-
versionInfo: { currentVersion: "0.10.
|
|
2490
|
+
versionInfo: { currentVersion: "0.10.7" },
|
|
2470
2491
|
scanner: { caseStyle: "allow-kebab-for-camel" }
|
|
2471
2492
|
});
|
|
2472
2493
|
//#endregion
|
package/dist/openclaw/plugin.js
CHANGED
|
@@ -1159,7 +1159,7 @@ function createWalletCommand(ctx) {
|
|
|
1159
1159
|
if (parts[0]?.toLowerCase() === "send") return { text: "Use `/x_send <amount|all> <address>` for transfers." };
|
|
1160
1160
|
try {
|
|
1161
1161
|
const snap = await getWalletSnapshot(ctx.rpcUrl, solanaWallet, evmWallet, ctx.historyPath);
|
|
1162
|
-
const lines = [`x402-proxy v0.10.
|
|
1162
|
+
const lines = [`x402-proxy v0.10.7`];
|
|
1163
1163
|
const defaultModel = ctx.allModels[0];
|
|
1164
1164
|
if (defaultModel) lines.push("", `**Model** - ${defaultModel.name} (${defaultModel.provider})`);
|
|
1165
1165
|
lines.push("", `**Protocol** - ${ctx.getDefaultRequestProtocol()}`);
|
package/package.json
CHANGED