agent402-openclaw 0.4.0 → 0.4.1

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/README.md CHANGED
@@ -94,7 +94,7 @@ the key.
94
94
  The key or wallet that pays for chat also pays for the rest of the gateway and
95
95
  the catalog, with one 402 shape and one receipt shape: OpenAI Responses and
96
96
  Anthropic Messages wires, embeddings, rerank, images, video, speech,
97
- transcription, grounded answers with citations, 500+ deterministic tools over
97
+ transcription, grounded answers with citations, 500+ tools over
98
98
  MCP or HTTP, wallet-keyed memory, finished reports (dossiers, insider flow, 13F,
99
99
  domain audits, token risk, deep research) and monitors, plus routing that buys
100
100
  from proven external sellers on the agent's behalf.
package/cli.js CHANGED
@@ -10,7 +10,7 @@ import { join } from "node:path";
10
10
  import { STATE_DIR, CREDITS_KEY_FILE, WALLET_KEY_FILE, resolveCreditsKey, resolveWalletKey, resolvePayFetch, USDC_BASE, DEFAULT_BASE_RPC, uptoReady } from "./index.js";
11
11
  import { startProxy, loadRoutes, DEFAULT_UPSTREAM } from "./proxy.js";
12
12
  import { providerModelsConfig, stripTrailingSlashes, defaultPrimary, AUTO_ID, OPENCLAW_MIN_INPUT_CHARS } from "./models.js";
13
- import { DEFAULT_PORT, PROVIDER_ID } from "./provider.js";
13
+ import { DEFAULT_PORT, PLUGIN_ID, PROVIDER_ID } from "./provider.js";
14
14
 
15
15
  const args = process.argv.slice(2);
16
16
  const cmd = args[0] || "help";
@@ -38,7 +38,7 @@ function mergeInto(target, block, { port = DEFAULT_PORT } = {}) {
38
38
  // on 8412 and OpenClaw dialing a port nobody listened on (real-install test).
39
39
  if (port !== DEFAULT_PORT) {
40
40
  t.plugins = t.plugins || {}; t.plugins.entries = t.plugins.entries || {};
41
- t.plugins.entries[PROVIDER_ID] = { ...(t.plugins.entries[PROVIDER_ID] || {}), config: { ...(t.plugins.entries[PROVIDER_ID]?.config || {}), port } };
41
+ t.plugins.entries[PLUGIN_ID] = { ...(t.plugins.entries[PLUGIN_ID] || {}), config: { ...(t.plugins.entries[PLUGIN_ID]?.config || {}), port } };
42
42
  }
43
43
  return t;
44
44
  }
package/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  import { existsSync, readFileSync } from "node:fs";
6
6
  import { homedir } from "node:os";
7
7
  import { join } from "node:path";
8
- import { buildProvider, setActiveProxy, setCachedRoutes, DEFAULT_PORT, PROVIDER_ID } from "./provider.js";
8
+ import { buildProvider, setActiveProxy, setCachedRoutes, DEFAULT_PORT, PLUGIN_ID } from "./provider.js";
9
9
  import { startProxy, loadRoutes, DEFAULT_UPSTREAM } from "./proxy.js";
10
10
  import { stripTrailingSlashes } from "./models.js";
11
11
 
@@ -94,7 +94,7 @@ let started = null;
94
94
  let registeredOnce = false;
95
95
 
96
96
  const plugin = {
97
- id: PROVIDER_ID,
97
+ id: PLUGIN_ID,
98
98
  name: "Agent402",
99
99
  description: "Agent402 model provider: routed + explicit models at a flat per-call price, paid by card or USDC.",
100
100
  register(api) {
@@ -1,5 +1,5 @@
1
1
  {
2
- "id": "agent402",
2
+ "id": "agent402-openclaw",
3
3
  "name": "Agent402",
4
4
  "description": "Agent402 model provider: auto-routed and explicit frontier models at a flat per-call price, paid by card (prepaid credits key) or in USDC over x402. Same key reaches 500+ pay-per-call tools.",
5
5
  "activation": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent402-openclaw",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "OpenClaw model provider for Agent402: auto-routed and explicit LLM models at a flat per-call price, paid by card (prepaid credits key) or in USDC over x402 through a local proxy. Zero dependencies; x402 wallet payment is an optional peer.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -26,13 +26,13 @@
26
26
  "./index.js"
27
27
  ],
28
28
  "compat": {
29
- "pluginApi": ">=2026.7.1"
29
+ "pluginApi": ">=2026.8.1"
30
30
  },
31
31
  "build": {
32
- "openclawVersion": "2026.7.1"
32
+ "openclawVersion": "2026.8.1"
33
33
  },
34
34
  "install": {
35
- "minHostVersion": ">=2026.7.1",
35
+ "minHostVersion": ">=2026.8.1",
36
36
  "npmSpec": "agent402-openclaw"
37
37
  }
38
38
  },
package/provider.js CHANGED
@@ -4,7 +4,17 @@
4
4
  // would 402 without the proxy's payment step in between).
5
5
  import { providerModelsConfig, routesFromCatalog } from "./models.js";
6
6
 
7
+ // The MODEL PROVIDER id: what a user writes in openclaw.json ("agent402/auto").
8
+ // User-facing and stable - renaming it would break every existing config.
7
9
  export const PROVIDER_ID = "agent402";
10
+ // The PLUGIN id, which is a different thing: OpenClaw keys plugins.entries by
11
+ // the MANIFEST id, and since 2026.8.1 it requires that id to equal the npm
12
+ // package name ("Plugin manifest id ... differs from npm package name ...").
13
+ // They were both "agent402", so nothing distinguished them until the host
14
+ // started checking. Writing config under the provider id while the host reads
15
+ // it under the manifest id is the same defect as the 2026-08-26 --port bug,
16
+ // where setup moved the baseUrl and the service kept reading the old key.
17
+ export const PLUGIN_ID = "agent402-openclaw";
8
18
  export const DEFAULT_PORT = 8412;
9
19
 
10
20
  let activeProxy = null;