feat: add plugin-scout for x402 trust intelligence and transaction safety#6513
feat: add plugin-scout for x402 trust intelligence and transaction safety#6513yaooooooooooooooo wants to merge 1 commit intoelizaOS:developfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
plugin-scout addresses service-level trust (is this x402 endpoint safe to pay?). The complementary gap is wallet-level trust: is the counterparty wallet behind that service legitimate? A service can score well on Contract Clarity and Response Fidelity but still be operated by a freshly created wallet with no on-chain history. Conversely, a new service with limited ScoutScore data might be operated by a wallet holding governance tokens across multiple chains. We built MCP server: |
|
you create plugin by making your own repo and publishing in on https://github.com/elizaos-plugins/registry |
|
Already submitted — elizaos-plugins/registry#278. Addressing the review comments now. |
Relates to
Risks
Low. This is a self-contained new plugin with no modifications to existing code. Zero runtime dependencies beyond
@elizaos/core. All API calls go to the ScoutScore public API (free during launch period).Background
What does this PR do?
Adds plugin-scout - gives ElizaOS agents trust intelligence for the x402 ecosystem. Before your agent pays for an x402 service, it can verify whether that service is trustworthy, check if it actually delivers what it advertises, and block unsafe transactions automatically.
The x402 protocol enables HTTP-native micropayments, but agents need a way to evaluate whether services are safe before sending money. ScoutScore provides that trust layer - scoring 400+ x402 services across 4 pillars and monitoring them continuously.
What kind of change is this?
Feature (non-breaking change which adds functionality)
Actions
CHECK_SERVICE_TRUSTCHECK_FIDELITYSCAN_SKILLBROWSE_LEADERBOARDBATCH_SCORE_SERVICESProviders
scout_trust_contextscout_trust_policyEvaluator
scout_transaction_guardBackground Service
TrustMonitorServiceHow it works
Trust Context (automatic):
When a user mentions a domain, the trust-context provider automatically fetches its score and injects it into the LLM context:
Transaction Guard (example - blocking an unsafe payment):
Trust Policy (customizable risk tolerance):
Configuration
All environment variables are optional with sensible defaults:
SCOUT_API_URLhttps://scoutscore.aiSCOUT_MIN_SERVICE_SCORE50SCOUT_AUTO_REJECT_FLAGSWALLET_SPAM_FARM,TEMPLATE_SPAM,ENDPOINT_DOWNSCOUT_CACHE_TTL30SCOUT_WATCHED_DOMAINSSCOUT_WATCH_INTERVAL60SCOUT_API_KEYTrust Levels
Architecture
@elizaos/core- clean and lightweightIAgentRuntime, automatic GCDocumentation changes needed?
No changes to existing project documentation. The plugin includes its own README with usage examples, configuration reference, and trust level documentation.
Full documentation: ScoutScore Docs
Testing
Test suite
236 unit tests, all passing. Covers every action, provider, evaluator, service, utility, and client method.
Test breakdown:
Where should a reviewer start?
src/index.ts- plugin definition, init flow, and exportssrc/evaluators/transaction-guard.ts- the transaction safety guard (most interesting piece)src/providers/trust-context.ts- automatic trust context injectionsrc/client/scout-client.ts- API client with cachingDetailed testing steps
Screenshots
Links
Greptile Summary
Added
plugin-scout- a self-contained trust intelligence plugin for the x402 payment ecosystem. Provides trust scoring, transaction safety guards, and skill scanning capabilities for autonomous agents.Key Features:
Architecture Highlights:
@elizaos/coreTest Coverage:
236 unit tests across 17 test suites covering all actions, providers, evaluators, services, utilities, and client methods.
Confidence Score: 5/5
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[User Message] --> B{Contains Payment Keywords?} B -->|No| C[Trust Context Provider] B -->|Yes| D[Transaction Guard Evaluator] C --> E{Domain Mentioned?} E -->|Yes| F[Extract Domains] E -->|No| G[Skip] F --> H[Scout API Client] H --> I[Cache Check] I -->|Hit| J[Return Cached Score] I -->|Miss| K[Fetch from API] K --> L[Update Cache] L --> M[Inject Trust Context] M --> N[LLM Processing] D --> O[Extract Domain & Amount] O --> H H --> P{Check Auto-Reject Flags} P -->|Match| Q[BLOCK Transaction] P -->|Pass| R{Score >= Min Threshold?} R -->|No| S[WARN Below Minimum] R -->|Yes| T{Amount <= Max Transaction?} T -->|No| U[WARN Exceeds Limit] T -->|Yes| V[ALLOW Transaction] Q --> W[Return to User] S --> W U --> W V --> W X[Trust Monitor Service] -.->|Background| H X --> Y[Batch Score Watched Domains] Y --> Z{Significant Change?} Z -->|Yes| AA[Log Score Delta] Z -->|No| AB[Continue Monitoring]Last reviewed commit: b8b4d69
(2/5) Greptile learns from your feedback when you react with thumbs up/down!