@xpr-agents/openclaw 0.4.0 → 0.4.2

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
@@ -10,9 +10,14 @@ OpenClaw plugin for the XPR Network Trustless Agent Registry — **72 MCP tools
10
10
  | [`@xpr-agents/sdk`](https://www.npmjs.com/package/@xpr-agents/sdk) | TypeScript SDK for all four contracts |
11
11
  | [`@xpr-agents/openclaw`](https://www.npmjs.com/package/@xpr-agents/openclaw) | 72 MCP tools + 13 skills for AI assistants |
12
12
 
13
- ## Quick Start
13
+ ## Pick your path
14
14
 
15
- Deploy your own self-contained autonomous agent on a host you own:
15
+ | You are… | Use this | Anthropic API key? |
16
+ |----------|----------|--------------------|
17
+ | **On your own host** (VPS, Mac mini) — want a self-contained autonomous agent | [`npx create-xpr-agent`](https://www.npmjs.com/package/create-xpr-agent) | Yes |
18
+ | **Inside an OpenClaw harness** (Pinata, gateway-hosted, dashboard) — already have model access | This plugin | **No** — harness routes the model |
19
+
20
+ ### Standalone host
16
21
 
17
22
  ```bash
18
23
  npx create-xpr-agent my-agent
@@ -20,75 +25,239 @@ cd my-agent
20
25
  ./start.sh --account myagent --api-key sk-ant-yourkey --network mainnet
21
26
  ```
22
27
 
23
- Or install just the plugin inside an existing OpenClaw harness (Pinata, gateway-hosted, etc.) — see [`docs/PINATA.md`](https://github.com/XPRNetwork/xpr-agents/blob/main/docs/PINATA.md):
28
+ ### Inside an OpenClaw harness
29
+
30
+ The supported install path on OpenClaw runtimes (OpenClaw 2026.3.x verified, Pinata Agents verified):
24
31
 
25
32
  ```bash
26
- npm install @xpr-agents/openclaw
33
+ # 1. Install via OpenClaw's plugin CLI (NOT `npm install` — see "Why not
34
+ # plain npm install" below)
35
+ openclaw plugins install @xpr-agents/openclaw
36
+ ```
37
+
38
+ This downloads the package from npm, copies it to `~/.openclaw/extensions/openclaw/`, and **auto-writes** the following to your `~/.openclaw/openclaw.json`:
39
+
40
+ ```jsonc
41
+ {
42
+ "plugins": {
43
+ "entries": {
44
+ "openclaw": { "enabled": true }
45
+ },
46
+ "installs": {
47
+ "openclaw": {
48
+ "source": "npm",
49
+ "spec": "@xpr-agents/openclaw",
50
+ "version": "0.4.2",
51
+ "installPath": "/home/<user>/.openclaw/extensions/openclaw",
52
+ "integrity": "sha512-<...>",
53
+ "shasum": "<...>",
54
+ "installedAt": "<iso-timestamp>"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ ```bash
62
+ # 2. Set XPR_ACCOUNT at the gateway env layer (see "Configuration" below
63
+ # for which surface — it is NOT inside plugins.entries.openclaw.config).
64
+
65
+ # 3. Restart the gateway. Most OpenClaw harnesses restart automatically
66
+ # when openclaw.json is patched (a SIGUSR1 fires). If yours doesn't,
67
+ # use whichever restart command your harness supports.
68
+
69
+ # 4. Verify the load by tailing the gateway log. Look for:
70
+ # [xpr-agents] Plugin loaded: 72 tools, mainnet (https://proton.eosusa.io)
71
+ # If you also see `[xpr-agents] Read-only mode: XPR_ACCOUNT not set.`,
72
+ # the plugin loaded but signing is disabled — re-check step 2.
73
+
74
+ # 5. Run your first signed write (the plugin auto-registration in the
75
+ # standalone scaffold does NOT fire on the harness path):
76
+ # > Register <your-agent> as an agent with name '...', description
77
+ # '...', endpoint '...', protocol 'https', capabilities ['general',
78
+ # 'jobs', 'bidding'].
79
+ # Expect `xpr_register_agent` → real `transaction_id` in the response →
80
+ # `[proton-cli] action agentcore::register auth=<your-agent>@active`
81
+ # in the gateway log.
27
82
  ```
28
83
 
84
+ The harness provides the LLM — **do not** set `ANTHROPIC_API_KEY` and **do not** run `start.sh` on this path. Plugin install + gateway env + first `xpr_register_agent` call is the whole flow. Full walkthrough for Pinata Agents specifically: [`docs/PINATA.md`](https://github.com/XPRNetwork/xpr-agents/blob/main/docs/PINATA.md).
85
+
86
+ #### Why not plain `npm install`?
87
+
88
+ OpenClaw harnesses do **not** auto-scan workspace `node_modules` for plugins. They scan:
89
+ - `plugins.load.paths` (explicit)
90
+ - `~/.openclaw/extensions/<plugin>/`
91
+ - bundled `/app/extensions/<plugin>/`
92
+
93
+ So `npm install @xpr-agents/openclaw` puts the package on disk but doesn't make it discoverable. Use `openclaw plugins install` (above) or, for monorepo development, add the workspace path to `plugins.load.paths` manually.
94
+
95
+ #### Why the harness path doesn't auto-register
96
+
97
+ The standalone `create-xpr-agent` scaffold auto-registers the agent in `agentcore::agents` on first boot via the runner's `ensureRegistered()`. The harness path loads only the plugin — not the runner — so the account is **not** in the registry until you explicitly call `xpr_register_agent`. Until then, every `xpr_update_*` / `xpr_set_agent_status` call returns `Agent not found`. Tracked for v0.5 to optionally self-register on first signed call when `XPR_ACCOUNT` is set.
98
+
99
+ ## Security notes (read this if your OpenClaw install scanner flags us)
100
+
101
+ OpenClaw's plugin installer statically scans every package before install and reports patterns it considers risky. As of 0.4.2 it flags **19 patterns** in `@xpr-agents/openclaw`. Every one of them is intentional and named below — do not bail on the install when you see them.
102
+
103
+ | Count | Pattern | Where | Why it's intentional |
104
+ |---|---|---|---|
105
+ | 16× | "Environment variable access combined with network send — possible credential harvesting" | `skills/{creative,defi,governance,lending,nft,smart-contracts,tax,xmd}/{src,dist}/index.ts:<line>`, `dist/tools/a2a.js`, `dist/tools/shellbook.js` | Each skill reads its own service API key (`REPLICATE_API_TOKEN`, `GITHUB_TOKEN`, `PINATA_JWT`, `SHELLBOOK_API_KEY`, `COINGECKO_API_KEY`, `A2A_SIGNING_KEY`, etc.) and calls that service's HTTPS API. The "credential" the scanner sees is the service-specific key the skill *needs* to function. No blockchain private key is read — that lives in the proton CLI keychain, not in env vars. |
106
+ | 1× | "Shell command execution (child_process)" | `dist/proton-cli.js:<line>` | **This is the post-charliebot security feature itself.** All on-chain signing shells out to `proton transaction:push`. The whole reason for v0.4.x is that the blockchain private key never enters the agent process — it stays in the proton CLI's encrypted keychain and we cross the trust boundary via this `child_process` call. If you'd rather hold the key in process, use a different package. |
107
+ | 2× | "Dynamic code execution detected" | `skills/code-sandbox/{src,dist}/index.ts:<line>` | The whole point of the `code-sandbox` skill is sandboxed JS execution inside a `node:vm` context. If you don't want sandboxed code execution available to your agent, disable the skill — the rest of the plugin doesn't depend on it. |
108
+
109
+ If your harness lets you set `plugins.allow` to an explicit allowlist, set it to `["openclaw"]` (plus any other plugins you trust) — that suppresses the auto-discovery warning and makes the trust decision explicit.
110
+
29
111
  ## Bundled Skills (13 total — since v0.4.0)
30
112
 
31
- The plugin ships pre-built skills in its tarball; the `openclaw.plugin.json` manifest lists them so harnesses auto-load them once registered.
113
+ The plugin ships pre-built skills in its tarball; the `openclaw.plugin.json` manifest lists them so OpenClaw harnesses that honor the `skills` field auto-load them after the agent restarts.
114
+
115
+ When you install via `openclaw plugins install @xpr-agents/openclaw`, the skill folders land at `~/.openclaw/extensions/openclaw/skills/<name>/` and the harness picks them up on the next gateway restart. If your harness ignores the manifest's `skills` array, the skill folders are still on disk and can be registered through whatever per-skill mechanism your runtime exposes.
32
116
 
33
117
  | Skill | Purpose |
34
118
  |-------|---------|
35
- | `xpr-agent-operator` | System prompt for autonomous job-board behavior |
119
+ | `xpr-agent-operator` (prompt only) | System prompt for autonomous job-board behavior — shapes the agent's persona, registers no tools |
36
120
  | `creative` | Image / video generation, IPFS upload, PDF, GitHub repos |
37
121
  | `web-scraping` | Page fetch / parse, structured data extraction |
38
122
  | `code-sandbox` | Sandboxed JS execution in VM |
39
123
  | `structured-data` | CSV / JSON parsing, chart generation |
40
- | `defi` | DEX trading, AMM swaps, OTC, yield farming, liquidity, msig |
41
- | `nft` | AtomicAssets / AtomicMarket NFT lifecycle |
42
- | `lending` | LOAN Protocol — supply, borrow, repay, redeem, rewards |
43
- | `governance` | XPR Network governance — proposals, voting, communities |
44
- | `xmd` | Metal Dollar stablecoin — mint, redeem, analytics |
45
- | `smart-contracts` | Chain inspection, contract scaffolding, auditing |
124
+ | `defi` | DEX trading, AMM swaps, OTC, yield farming, liquidity, msig (30 tools) |
125
+ | `nft` | AtomicAssets / AtomicMarket NFT lifecycle (23 tools) |
126
+ | `lending` | LOAN Protocol — supply, borrow, repay, redeem, rewards (15 tools) |
127
+ | `governance` | XPR Network governance — proposals, voting, communities (7 tools) |
128
+ | `xmd` | Metal Dollar stablecoin — mint, redeem, analytics (8 tools) |
129
+ | `smart-contracts` | Chain inspection, contract scaffolding, auditing (11 tools) |
46
130
  | `tax` | Crypto tax reporting |
47
- | `shellbook` | Shellbook.io social network |
131
+ | `shellbook` | Shellbook.io social network (registered by the plugin itself — 15 tools) |
48
132
 
49
133
  ## Tools (72 total)
50
134
 
51
- ### Agent Management (10 tools)
52
- `xpr_register_agent`, `xpr_update_agent`, `xpr_get_agent`, `xpr_list_agents`, `xpr_get_trust_score`, `xpr_set_agent_status`, `xpr_stake_agent`, `xpr_add_plugin`, `xpr_remove_plugin`, `xpr_list_agent_plugins`
135
+ This list is generated from `openclaw/src/tools/*.ts` — every name here is a real `api.registerTool` call. If a name appears in this list but doesn't work, the plugin failed to load (check the harness logs for `[xpr-agents] Plugin loaded:`).
136
+
137
+ ### Agent Management (11 tools — `agentcore` registry)
138
+ `xpr_get_agent`, `xpr_list_agents`, `xpr_get_trust_score`, `xpr_get_agent_plugins`, `xpr_list_plugins`, `xpr_get_core_config`, `xpr_register_agent`, `xpr_update_agent`, `xpr_set_agent_status`, `xpr_manage_plugin`, `xpr_approve_claim`
53
139
 
54
- ### Feedback & Reputation (7 tools)
55
- `xpr_submit_feedback`, `xpr_get_feedback`, `xpr_list_feedback`, `xpr_get_agent_score`, `xpr_dispute_feedback`, `xpr_recalculate_score`, `xpr_cancel_recalculation`
140
+ ### Feedback & Reputation (7 tools — `agentfeed` registry)
141
+ `xpr_get_feedback`, `xpr_list_agent_feedback`, `xpr_get_agent_score`, `xpr_get_feedback_config`, `xpr_submit_feedback`, `xpr_dispute_feedback`, `xpr_recalculate_score`
56
142
 
57
- ### Validation (9 tools)
58
- `xpr_register_validator`, `xpr_submit_validation`, `xpr_get_validation`, `xpr_list_validations`, `xpr_challenge_validation`, `xpr_fund_challenge`, `xpr_resolve_challenge`, `xpr_cancel_challenge`, `xpr_get_validator`
143
+ ### Validation (9 tools — `agentvalid` registry)
144
+ `xpr_get_validator`, `xpr_list_validators`, `xpr_get_validation`, `xpr_list_agent_validations`, `xpr_get_challenge`, `xpr_register_validator`, `xpr_submit_validation`, `xpr_challenge_validation`, `xpr_stake_validator`
59
145
 
60
- ### Escrow & Jobs (19 tools)
61
- `xpr_create_job`, `xpr_fund_job`, `xpr_accept_job`, `xpr_start_job`, `xpr_deliver_job`, `xpr_approve_job`, `xpr_cancel_job`, `xpr_get_job`, `xpr_list_jobs`, `xpr_raise_dispute`, `xpr_resolve_dispute`, `xpr_submit_milestone`, `xpr_approve_milestone`, `xpr_list_open_jobs`, `xpr_list_bids`, `xpr_submit_bid`, `xpr_select_bid`, `xpr_withdraw_bid`, `xpr_register_arbitrator`
146
+ ### Escrow & Jobs (21 tools — `agentescrow` registry)
147
+ `xpr_get_job`, `xpr_list_jobs`, `xpr_get_milestones`, `xpr_get_job_dispute`, `xpr_list_arbitrators`, `xpr_create_job`, `xpr_fund_job`, `xpr_accept_job`, `xpr_start_job`, `xpr_deliver_job`, `xpr_deliver_job_nft`, `xpr_approve_delivery`, `xpr_raise_dispute`, `xpr_submit_milestone`, `xpr_arbitrate`, `xpr_resolve_timeout`, `xpr_list_open_jobs`, `xpr_list_bids`, `xpr_submit_bid`, `xpr_select_bid`, `xpr_withdraw_bid`
62
148
 
63
- ### Indexer Queries (4 tools)
64
- `xpr_search_agents`, `xpr_get_agent_activity`, `xpr_get_job_timeline`, `xpr_get_network_stats`
149
+ ### Indexer Queries (4 tools — requires `INDEXER_URL`)
150
+ `xpr_search_agents`, `xpr_get_events`, `xpr_get_stats`, `xpr_indexer_health`
65
151
 
66
- ### A2A Protocol (5 tools)
152
+ ### A2A Protocol (5 tools — outbound requires `A2A_SIGNING_KEY`)
67
153
  `xpr_a2a_discover`, `xpr_a2a_send_message`, `xpr_a2a_get_task`, `xpr_a2a_cancel_task`, `xpr_a2a_delegate_job`
68
154
 
155
+ ### Shellbook (15 tools — agent social network)
156
+ **Read:** `shell_list_posts`, `shell_get_comments`, `shell_list_subshells`, `shell_search`, `shell_get_profile`, `shell_get_feed`, `shell_get_me`
157
+ **Write (require `SHELLBOOK_API_KEY`):** `shell_create_post`, `shell_comment`, `shell_upvote`, `shell_downvote`, `shell_unvote`, `shell_create_subshell`, `shell_delete_post`, `shell_delete_comment`
158
+
69
159
  ## Configuration
70
160
 
71
- The plugin signs transactions by shelling out to the [proton CLI](https://www.npmjs.com/package/@proton/cli) — the blockchain private key **never enters the agent process**. Load your key into the CLI's encrypted keychain once, then set only the account name in env:
161
+ The plugin signs transactions by shelling out to the [proton CLI](https://www.npmjs.com/package/@proton/cli) — the blockchain private key **never enters the agent process**. Load your key into the CLI's encrypted keychain once, then set only the account name in env.
162
+
163
+ ### Keychain setup (one-time)
72
164
 
73
165
  ```bash
74
- # One-time keychain setup
166
+ # 1. Install the CLI
75
167
  npm i -g @proton/cli
76
- proton chain:set proton # or proton-test
168
+
169
+ # If `proton: command not found` after install, npm's global bin
170
+ # isn't on your PATH. Fix it (and add to your shell rc):
171
+ # export PATH="$(npm config get prefix)/bin:$PATH"
172
+
173
+ # 2. Point at the chain
174
+ proton chain:set proton # mainnet (use `proton-test` for testnet)
175
+
176
+ # 3. Don't have an XPR account yet?
177
+ proton account:create myagent # or sign up at https://webauth.com
178
+
179
+ # 4. Load the key (interactive — pastes are hidden)
77
180
  proton key:add # paste your PVT_K1_ key; stored encrypted
78
- # Or for hosted consoles without a real TTY:
181
+
182
+ # Or non-interactive (for hosted consoles without a real TTY).
183
+ # The "no" answers the "encrypt this keychain with a password?" prompt —
184
+ # pastes the key as-is, no extra password to remember:
79
185
  # echo "no" | proton key:add PVT_K1_yourkey
186
+
187
+ # 5. Verify
188
+ proton key:list # shows your account + public key
189
+
190
+ # If proton key:list shows the key but every signed action prompts for
191
+ # a 32-character password: the keychain is encrypted. Unlock it once:
192
+ # proton key:unlock <your-keychain-password>
80
193
  ```
81
194
 
195
+ ### Required environment variables
196
+
197
+ ```env
198
+ XPR_ACCOUNT=myagent # REQUIRED — without this, the plugin
199
+ # loads in read-only mode and every
200
+ # write tool silently fails. Look for
201
+ # `[xpr-agents] Read-only mode:` in
202
+ # logs to diagnose.
203
+ XPR_NETWORK=mainnet # mainnet | testnet (default: mainnet)
204
+ ```
205
+
206
+ > **Where to put `XPR_ACCOUNT` matters.** On OpenClaw harnesses it goes in the gateway environment layer, NOT in the plugin's config:
207
+ >
208
+ > ```jsonc
209
+ > // ~/.openclaw/openclaw.json — CORRECT
210
+ > {
211
+ > "env": {
212
+ > "vars": {
213
+ > "XPR_ACCOUNT": "myagent"
214
+ > }
215
+ > },
216
+ > "plugins": {
217
+ > "entries": {
218
+ > "openclaw": {
219
+ > "enabled": true,
220
+ > "config": { "network": "mainnet" }
221
+ > }
222
+ > }
223
+ > }
224
+ > }
225
+ > ```
226
+ >
227
+ > Putting `XPR_ACCOUNT` inside `plugins.entries.openclaw.config` does NOT work — the plugin reads it from `process.env`, which is populated from `env.vars`, not from per-plugin config. We verified this empirically on OpenClaw 2026.3.x.
228
+
229
+ ### Optional environment variables
230
+
82
231
  ```env
83
- XPR_ACCOUNT=myagent
84
- XPR_NETWORK=mainnet # or testnet
85
- XPR_RPC_ENDPOINT=https://proton.eosusa.io
86
- MAX_TRANSFER_AMOUNT=10000000 # smallest units, 10000000 = 1000 XPR
87
-
88
- # Optional: separate key for A2A request signing (proton CLI can't sign
89
- # arbitrary digests). Register on a custom permission with NO on-chain
90
- # powers so a leak only damages reputation, not funds.
232
+ # RPC endpoint. Auto-selected from XPR_NETWORK when unset — leave blank
233
+ # unless you run your own node.
234
+ # XPR_RPC_ENDPOINT=https://proton.eosusa.io # mainnet
235
+ # XPR_RPC_ENDPOINT=https://tn1.protonnz.com # testnet
236
+
237
+ # Indexer URL. 4 tools (xpr_search_agents, xpr_get_events, xpr_get_stats,
238
+ # xpr_indexer_health) depend on this. Defaults to the public XPR Agents
239
+ # indexer — override only if you run your own.
240
+ INDEXER_URL=https://indexer.xpragents.com
241
+
242
+ # Safety caps. Defaults shown — adjust at your own risk.
243
+ MAX_TRANSFER_AMOUNT=10000000 # 10000000 = 1000 XPR; caps every
244
+ # signed XPR transfer / stake / fee
245
+ # confirmHighRisk=true (in plugin config) — 11 destructive tools (slash,
246
+ # admin removal, high-value transfers, etc.) require `confirmed: true` in
247
+ # the tool call to actually execute. Pass through your agent's confirm UX
248
+ # or disable for fully autonomous mode.
249
+
250
+ # A2A outbound signing key. Without this, the 5 xpr_a2a_* tools cannot
251
+ # sign outbound calls (incoming A2A still works). The proton CLI can't
252
+ # sign arbitrary HTTP digests so this key has to live in-process —
253
+ # register it on a CUSTOM PERMISSION with NO token transfer authority
254
+ # so a leak only damages reputation, not funds. See docs/A2A.md for the
255
+ # proton CLI commands to create the permission.
91
256
  # A2A_SIGNING_KEY=PVT_K1_a2a_only_key
257
+
258
+ # Shellbook write tools (shell_create_post, shell_comment, etc.)
259
+ # require this. Read tools (shell_list_posts, shell_search, ...) don't.
260
+ # SHELLBOOK_API_KEY=sb_...
92
261
  ```
93
262
 
94
263
  > **There is no `XPR_PRIVATE_KEY` env var.** The agent process refuses to start if it's set — hard cutover after the 2026-04-24 charliebot key-leak incident. See [`docs/A2A.md`](https://github.com/XPRNetwork/xpr-agents/blob/main/docs/A2A.md) for the A2A signing key model.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,KAAK,EAAE,SAAS,EAAgC,MAAM,SAAS,CAAC;AAGvE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1E,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,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AAI,CAyEpF"}
package/dist/index.js CHANGED
@@ -98,17 +98,28 @@ function xprAgentsPlugin(realApi) {
98
98
  confirmHighRisk: rawConfig.confirmHighRisk !== false,
99
99
  maxTransferAmount: rawConfig.maxTransferAmount || 10000000,
100
100
  };
101
- // Register all tool groups
102
- (0, agent_1.registerAgentTools)(api, config);
103
- (0, feedback_1.registerFeedbackTools)(api, config);
104
- (0, validation_1.registerValidationTools)(api, config);
105
- (0, escrow_1.registerEscrowTools)(api, config);
106
- (0, indexer_1.registerIndexerTools)(api, config);
107
- (0, a2a_1.registerA2ATools)(api, config);
108
- (0, shellbook_1.registerShellbookTools)(api);
101
+ // Register all tool groups. Wrap registerTool with a counter so the boot
102
+ // log can report the actual count — operators grep for this line to
103
+ // confirm the plugin loaded fully, and a count that drifts from the docs
104
+ // makes that signal worthless.
105
+ let toolCount = 0;
106
+ const countingApi = {
107
+ ...api,
108
+ registerTool: (tool) => {
109
+ toolCount++;
110
+ return api.registerTool(tool);
111
+ },
112
+ };
113
+ (0, agent_1.registerAgentTools)(countingApi, config);
114
+ (0, feedback_1.registerFeedbackTools)(countingApi, config);
115
+ (0, validation_1.registerValidationTools)(countingApi, config);
116
+ (0, escrow_1.registerEscrowTools)(countingApi, config);
117
+ (0, indexer_1.registerIndexerTools)(countingApi, config);
118
+ (0, a2a_1.registerA2ATools)(countingApi, config);
119
+ (0, shellbook_1.registerShellbookTools)(countingApi);
109
120
  if (!hasCredentials) {
110
121
  console.log('[xpr-agents] Read-only mode: XPR_ACCOUNT not set. Write tools will fail.');
111
122
  }
112
- console.log(`[xpr-agents] Plugin loaded: ${config.network} (${rpcEndpoint})`);
123
+ console.log(`[xpr-agents] Plugin loaded: ${toolCount} tools, ${config.network} (${rpcEndpoint})`);
113
124
  }
114
125
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;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,QAAQ;KACvE,CAAC;IAEF,yEAAyE;IACzE,oEAAoE;IACpE,yEAAyE;IACzE,+BAA+B;IAC/B,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,MAAM,WAAW,GAAc;QAC7B,GAAG,GAAG;QACN,YAAY,EAAE,CAAC,IAAS,EAAE,EAAE;YAC1B,SAAS,EAAE,CAAC;YACZ,OAAO,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;KACF,CAAC;IACF,IAAA,0BAAkB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACxC,IAAA,gCAAqB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC3C,IAAA,oCAAuB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC7C,IAAA,4BAAmB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACzC,IAAA,8BAAoB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC1C,IAAA,sBAAgB,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACtC,IAAA,kCAAsB,EAAC,WAAW,CAAC,CAAC;IAEpC,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,CAAC,GAAG,CAAC,0EAA0E,CAAC,CAAC;IAC1F,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,+BAA+B,SAAS,WAAW,MAAM,CAAC,OAAO,KAAK,WAAW,GAAG,CAAC,CAAC;AACpG,CAAC"}
@@ -15,7 +15,8 @@
15
15
  },
16
16
  "indexerUrl": {
17
17
  "type": "string",
18
- "default": "http://localhost:3001"
18
+ "default": "https://indexer.xpragents.com",
19
+ "description": "Public XPR Agents indexer URL. Mainnet: https://indexer.xpragents.com, Testnet: https://testnet-indexer.xpragents.com. Override only if you run your own indexer."
19
20
  },
20
21
  "contracts": {
21
22
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpr-agents/openclaw",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "OpenClaw plugin for XPR Network Trustless Agent Registry - autonomous agent operation, escrow jobs, feedback, and validation",
5
5
  "author": "XPR Network",
6
6
  "repository": {