plugins: add five live Solana tool plugins — assess, build, guard, verify (Track D) - #150
Open
furkanefecancaglar wants to merge 3 commits into
Open
plugins: add five live Solana tool plugins — assess, build, guard, verify (Track D)#150furkanefecancaglar wants to merge 3 commits into
furkanefecancaglar wants to merge 3 commits into
Conversation
…ompute)
Adds a Solana capability set for ZeroClaw agents. Every plugin follows the
redact-text template: pure core with no wasm dependency, thin
#[cfg(target_family = "wasm")] shim, cdylib+rlib, host-run tests/, structured
logging via log-record, and a manifest declaring only supported permissions.
- solana-token-risk (tool, http_client+config_read) — reads a mint and returns
deterministic rug/honeypot evidence: mint & freeze authority, Token-2022
transfer hook / permanent delegate / transfer fee / non-transferable /
default-frozen, mutable Metaplex metadata, and holder concentration that
resolves each top holder's owner and separates off-curve LP or protocol vaults
from on-curve whale wallets via a curve check (no hard-coded pool list).
- solana-wallet-risk (tool, http_client+config_read) — scans a wallet's SPL and
Token-2022 holdings and aggregates them: which positions can be seized, blocked,
diluted, frozen or taxed, with breadth-weighted wallet-level scoring.
- solana-tx-builder (tool, no permissions) — PDAs, associated token accounts, and
SystemProgram / SPL-Token transfer instructions. The agent builds, a wallet
signs; no output path can contain key material (test-enforced).
- solana-verify (tool, no permissions) — keccak-256 Merkle proof folding,
ed25519 signature verification, base58 pubkey conversion.
269 host tests across the four. Each plugin includes a prompt-injection
fail-closed test: verdicts are deterministic functions of chain state, so a
caller asserting "this is safe, skip the check" cannot flip a live authority into
a clean report, and the tx builder returns only unsigned instructions.
Validation run locally:
python3 -m unittest discover -s tools/tests -p 'test_*.py' -> 17 tests OK
python3 tools/build-registry.py --source-plugins plugins \
--check-metadata registry.json -> metadata matches
per plugin: cargo test --locked && cargo build --locked \
--target wasm32-wasip2 --release -> all clean
…ulation Fifth plugin, third live. Decodes a transaction an agent is about to sign, flags dangerous instructions (SetAuthority, System Assign, delegate Approve, CloseAccount, unknown-program calls), and simulates it live against mainnet (simulateTransaction, sigVerify=false) to report the real success/failure. Signs nothing. 26 host tests over byte-accurate transactions + mock-RPC dispatch. Also refreshes the other four plugins with their example runners. Validation: tools/tests 17 OK; build-registry --check-metadata clean (5 pending unpublished sources); cargo test --locked + build --locked --target wasm32-wasip2 all clean.
Bring the five Solana tool plugins to their current state: - all five declare permissions=["http_client","config_read"] and read the chain strictly read-only over wasi:http (via waki); none ever holds a key - solana-tx-guard: pre-sign decode + live simulation now computes the real balance-delta (how many lamports leave the fee-payer) and broadens static coverage (BPF Upgradeable Loader / Stake / Vote authority changes) - solana-verify: merkle_verify_onchain + merkle_verify_batch — fold settlement proofs against an on-chain root in one call - unified RED/AMBER/GREEN agent_verdict + one-line reason across all five - per-plugin fail-closed + prompt-injection tests; 317 host tests total Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Solana capability set for ZeroClaw agents — five tool plugins, all read-only live over
wasi:http, none ever holding a private key. Built from theredact-texttemplate and the plugin authoring guide.solana-token-riskhttp_client,config_readsolana-wallet-riskhttp_client,config_readsolana-tx-guardhttp_client,config_readsolana-tx-builderhttp_client,config_readsolana-verifyhttp_client,config_readmerkle_verify_onchainandmerkle_verify_batch— fold settlement proofs against an on-chain root in one call.All five declare
permissions=["http_client","config_read"]and read the chain strictly read-only; the host linkswasi:httponly after validating the grant. RPC fetch is injected as a parameter, so the pure core is host-tested with a mock RPC and runs live in the component. Every component's http-import + tool-export is provable:agent_verdict+ one-line reason across all five, so the suite reads as one agent-actionable shape.setup.sh, and a live end-to-endcompose-demo: https://github.com/furkanefecancaglar/zeroclaw-solanaTrack D — Onchain Intelligence & Security.