feat: add plugin-scout for x402 trust intelligence and transaction safety#6513
Open
yaooooooooooooooo wants to merge 1 commit intoelizaOS:developfrom
Open
feat: add plugin-scout for x402 trust intelligence and transaction safety#6513yaooooooooooooooo wants to merge 1 commit intoelizaOS:developfrom
yaooooooooooooooo wants to merge 1 commit intoelizaOS:developfrom
Conversation
Contributor
|
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 |
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.
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!