Skip to content

fix(openclaw): 0.4.2 — verified Pinata install flow + security warnings preamble#23

Merged
paulgnz merged 1 commit into
mainfrom
fix/0.4.2-pinata-verified-docs
May 15, 2026
Merged

fix(openclaw): 0.4.2 — verified Pinata install flow + security warnings preamble#23
paulgnz merged 1 commit into
mainfrom
fix/0.4.2-pinata-verified-docs

Conversation

@paulgnz
Copy link
Copy Markdown
Collaborator

@paulgnz paulgnz commented May 15, 2026

A live Pinata Agents install of 0.4.1 surfaced one code bug, two doc lies, and one missing operator preamble. This bundle ships all four fixes as 0.4.2.

Code: Plugin loaded: now reports the actual tool count

The README told operators to grep for [xpr-agents] Plugin loaded: 72 tools (35 read, 37 write) — a string the code never emitted (it logged Plugin loaded: <network> (<rpc>), no count). Rather than backing out the README claim, this PR instruments registration: xprAgentsPlugin() wraps api.registerTool with a counter and logs:

[xpr-agents] Plugin loaded: 72 tools, mainnet (https://proton.eosusa.io)

The count is computed from real registrations, so the README claim stays true even if tools are added.

Doc lie 1: harness install path was unverified

The docs hand-waved "register with your harness" because we'd never actually traced what an OpenClaw harness does with the package. Now verified empirically on a live Pinata Agents container running OpenClaw 2026.3.x:

  • Plain npm install @xpr-agents/openclaw is NOT sufficient — the harness does not auto-scan workspace node_modules.
  • The supported install is openclaw plugins install @xpr-agents/openclaw, which downloads from npm, copies to ~/.openclaw/extensions/openclaw/, and auto-writes plugins.entries.openclaw.enabled + plugins.installs.openclaw.* metadata to ~/.openclaw/openclaw.json.

Docs now show the verified command + the exact JSON diff the installer writes + explicit "npm install is not enough" callout.

Doc lie 2: XPR_ACCOUNT placement was ambiguous

PINATA.md suggested XPR_ACCOUNT could go in the plugin's config tree. It can't — the plugin reads process.env.XPR_ACCOUNT, which comes from env.vars in openclaw.json, NOT from plugins.entries.openclaw.config. Operators who put it in the config tree silently end up in read-only mode.

Docs now show the correct env.vars.XPR_ACCOUNT surface with a contrastive note pointing at the wrong location.

Missing preamble: 19 install-time security warnings

OpenClaw's installer scans tarballs and flags risky patterns. It finds 19 in @xpr-agents/openclaw — every one intentional, now explained in a new "Security notes" section in the README:

Count Pattern Why it's intentional
16× env-var + network send Each skill reads its own service API key (Replicate, GitHub, Pinata, Shellbook, CoinGecko, A2A) and calls that service. No blockchain key is read from env.
child_process exec The proton CLI shell-out — literally the post-charliebot security feature. The whole point of v0.4.x is the blockchain key never enters the agent process.
Dynamic code execution The code-sandbox skill's entire purpose.

Pre-empts the 19-lines-of-red-text-at-install moment that was making operators bail.

Pinata-specific restart mechanism

openclaw gateway restart doesn't work on Pinata's container — they don't expose systemctl, command errors with "Gateway service disabled." The actual mechanism: patching openclaw.json makes the harness emit SIGUSR1 to the gateway process. PINATA.md now documents this with the expected restart event shape.

Harness-vs-standalone registration gap

Standalone scaffold auto-registers via ensureRegistered(). Harness path doesn't. Every xpr_update_* / xpr_set_agent_status fails with Agent not found until the operator explicitly calls xpr_register_agent. Docs now name this and use xpr_register_agent as the canonical first-signed-test (replacing the previous "send 0.0001 XPR" recipe — the plugin has no transfer tool, it's domain-scoped).

Verification

  • 80 openclaw tests pass
  • Smoke-test confirms Plugin loaded: 72 tools, mainnet (...) line emits from dist/index.js
  • All harness-flow specifics verified against a live OpenClaw 2026.3.x install (Pinata Agents container)

…gs preamble

A live Pinata Agents install of 0.4.1 surfaced one code bug, two doc
lies, and one missing operator preamble. This bundle ships all four
fixes as 0.4.2.

## Code: `Plugin loaded:` now reports the actual tool count

The README told operators to grep for `[xpr-agents] Plugin loaded:
72 tools (35 read, 37 write)` — a string the code never emitted.
The code emitted `Plugin loaded: <network> (<rpc>)`, no count.

Rather than backing out the README claim, instrument the
registration. `xprAgentsPlugin()` now wraps `api.registerTool` with a
counter and logs:

  [xpr-agents] Plugin loaded: 72 tools, mainnet (https://proton.eosusa.io)

The count is computed from real registrations, so it auto-tracks any
future tool additions and the README claim stays true.

## Doc lie 1: harness install path was unverified

README and PINATA.md hand-waved "register with your harness" because
we'd never actually traced what an OpenClaw harness does with the
package. Now verified empirically:

- Plain `npm install @xpr-agents/openclaw` is NOT sufficient — the
  harness does not auto-scan workspace `node_modules`.
- The supported install is `openclaw plugins install
  @xpr-agents/openclaw` which downloads from npm, copies to
  `~/.openclaw/extensions/openclaw/`, and auto-writes both
  `plugins.entries.openclaw.enabled` and `plugins.installs.openclaw.*`
  metadata (sha256, integrity, install path, ISO timestamp) to
  `~/.openclaw/openclaw.json`.

Docs now show the verified command, the exact JSON diff the
installer writes, and explicitly call out the
`npm-install-is-not-enough` trap.

## Doc lie 2: `XPR_ACCOUNT` placement was ambiguous

PINATA.md (and implicit in the README's env block) suggested
`XPR_ACCOUNT` could go in the plugin's config tree. It can't — the
plugin reads `process.env.XPR_ACCOUNT`, which is populated from the
gateway env layer (`env.vars` in `openclaw.json`), NOT from
`plugins.entries.openclaw.config`. Operators putting it in the
config tree end up in silent read-only mode.

Docs now show the correct `env.vars.XPR_ACCOUNT` surface with a
contrastive note pointing at the wrong location.

## Missing preamble: 19 install-time security warnings

OpenClaw's installer scans tarballs and flags risky patterns. It
finds 19 in `@xpr-agents/openclaw` — every one intentional and named
in the new "Security notes" section:

- 16 × env-var-plus-network-send: each skill reads its own service
  API key (REPLICATE_API_TOKEN, GITHUB_TOKEN, PINATA_JWT,
  SHELLBOOK_API_KEY, COINGECKO_API_KEY, A2A_SIGNING_KEY) and calls
  that service. No blockchain key is read from env.
- 2 × dynamic-code-execution: that is literally what the
  `code-sandbox` skill does.
- 1 × child_process exec: the proton CLI shell-out. The post-
  charliebot security feature itself, ironically flagged. The
  whole point of v0.4.x is that the blockchain key never enters
  the agent process — it stays in the proton CLI's encrypted
  keychain and we cross that trust boundary via this exec call.

Operators evaluating the package see 19 lines of red text at install
time and bail. The new section pre-empts that.

## Pinata-specific restart mechanism

The imperative `openclaw gateway restart` doesn't work on Pinata's
container — they don't expose systemctl, the command errors with
"Gateway service disabled." The actual mechanism is config-driven:
patching `openclaw.json` makes the harness emit SIGUSR1 to the
gateway process. PINATA.md now documents this with the expected
restart event shape.

## Harness-vs-standalone registration gap

The standalone `create-xpr-agent` scaffold auto-registers via the
runner's `ensureRegistered()`. The harness path loads only the
plugin, so the account stays absent from `agentcore::agents` until
the operator explicitly calls `xpr_register_agent`. Every
`xpr_update_*` / `xpr_set_agent_status` call fails with `Agent not
found` until then.

Docs now name this explicitly and use `xpr_register_agent` as the
canonical "first signed test" — replacing the previous "send 0.0001
XPR" recipe that didn't work anyway (the plugin has no transfer
tool; it's domain-scoped to the registry/escrow/feedback/validation/
A2A surface).

## Verification

- 80 openclaw tests pass
- Smoke-test confirms `Plugin loaded: 72 tools, mainnet (...)` line
  emitted by `dist/index.js`
- All harness-flow specifics verified against a live OpenClaw 2026.3.x
  install (Pinata Agents container)
@paulgnz paulgnz merged commit 3414ef7 into main May 15, 2026
5 checks passed
@paulgnz paulgnz deleted the fix/0.4.2-pinata-verified-docs branch May 15, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant