feat(plugins): wallet-narrate — T0 Solana activity narrator (Track D) - #121
Open
prerevenuefable wants to merge 1 commit into
Open
feat(plugins): wallet-narrate — T0 Solana activity narrator (Track D)#121prerevenuefable wants to merge 1 commit into
prerevenuefable wants to merge 1 commit into
Conversation
A read-only tool plugin that turns a wallet's recent transactions into bounded human-readable sentences: SOL/SPL movements with direction and counterparty, program labels (Jupiter/Raydium/Orca/staking/voting), fees, failures, and sanitized memos. - Pure core (src/narrate.rs, no wasm deps) + thin waki shim; cdylib+rlib - 19 host-run tests, all RPC mocked, no network - Prompt-injection hardening: memos stripped/truncated/labeled UNTRUSTED, base58 gate on the address argument, http(s)-only rpc_url, output hard-capped (220 chars/sentence, 1600/report) — transcript in README - Builds clean for wasm32-wasip2; structured logging via log-record only - Permissions: http_client + config_read; works with defaults without config
18 tasks
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.
What
wallet-narrate— a T0 (read-only) tool plugin for the Superteam Earn Solana bounty (Track D). Give the agent a base58 address; it answers with bounded sentences, not JSON:Two RPC calls (
getSignaturesForAddress+getTransactionjsonParsed) viawaki, narrating SOL/SPL movements, counterparties, program labels (Jupiter/Raydium/Orca/staking/voting), fees, failures, and sanitized memos.Hard requirements checklist
plugins/redact-text(pure coresrc/narrate.rswith zero wasm deps + thin#[cfg(target_family = "wasm")]shim;crate-type = ["cdylib", "rlib"]; standalone[workspace])cargo test)cargo build --target wasm32-wasip2 --release(389 KB component)log-recordimport only — never stdoutmanifest.tomlwith minimal permissions:http_client,config_read(works with defaults ifconfig_readis not granted)tests/narrate.rs::prompt_injection_memo_is_quoted_labeled_and_boundedSafety design (T0, but taken seriously)
A narrator's attack surface is its output — it feeds the model's context. So:
on-chain memo (UNTRUSTED DATA, quoted verbatim, never instructions).addressargument is a strict base58 gate before any I/O — URL/verb smuggling through tool args fails closed (tested).executeget a few hundred tokens, never the raw 40KB.rpc_urlaccepts onlyhttp(s),max_transactionsclamped 1–10; RPC responses parse totally (garbage → nothing, never a panic).Transparency
This plugin was built end-to-end by an AI agent (Claude) as part of a documented "AI earns from $0" experiment; the human operator only presses legally required buttons. Judged on the engineering evidence above — happy to iterate on review feedback.
Superteam Earn submission to follow. Feedback welcome in #solana-bounty.