Skip to content

Fix/onchain sync and cleanup - #3

Merged
devJaja merged 2 commits into
mainfrom
fix/onchain-sync-and-cleanup
Jul 26, 2026
Merged

Fix/onchain sync and cleanup#3
devJaja merged 2 commits into
mainfrom
fix/onchain-sync-and-cleanup

Conversation

@devJaja

@devJaja devJaja commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Description

Please include a summary of the changes and the related issue. Include relevant motivation and context.

Fixes # (issue)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Smart contract change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

  • Backend tests pass (cd backend && npm test)
  • Frontend tests pass (cd frontend && npm test)
  • Smart contract tests pass (cd smart-contract && cargo test)
  • Manual testing on Casper Testnet

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Smart Contract Changes (if applicable)

If this PR includes smart contract changes, please provide:

  • Contract has been tested with cargo test
  • Wasm has been built and verified
  • Deployment script has been updated
  • Contract hash will be updated in documentation after deployment

devJaja and others added 2 commits July 26, 2026 20:07
Backend:
- Add Trust Ledger (reputation.ts): getReputation() + getReputationEvents()
  with two-tier RPC fallback for on-chain reputation reads
- Add settlements.ts: persist x402 settlements to data/settlements.json
- Add MCP Server (src/mcp/server.ts): 5 tools (list_agents, suggest_agents,
  dispatch_task, get_task_status, read_payment_history) via stdio transport
- Fix /agents/:hash/reputation route to return { reputation, events }
- Enrich /agents with tasksFailed/lastUpdated from chain
- Add GET /x402/history route for settlement records
- Replace require() with lazy import() in casperHandler.ts

Frontend:
- Add agent trust page (agents/[hash]/page.tsx): score bar, completion/failure
  counts, explorer-linked reputation events table
- Add use-agent-reputation hook
- Add pay-agent.tsx component: x402 signTypedData payment flow
- Update payments page to fetch real settlement data from /x402/history
- Fix rating derivation: reputationScore / 2000 (not old formula)
- Add demo badge to AgentCard with FlaskConical icon
- Link agent names to trust pages
- Fix React hooks: eliminate synchronous setState in effects

CI/Lint:
- Create eslint.config.mjs for frontend (next lint removed in Next.js 16)
- Fix backend lint: 0 errors (was 2 require()-import errors)
- Fix frontend lint: 0 errors, 0 warnings
- All checks green: backend 8/8 tests, frontend 6/6 tests,
  contracts 29/29 tests, tsc clean, next build clean
feat: Trust Ledger, MCP Server, x402 Payments UI, and CI Fixes
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
guild_net Ready Ready Preview, Comment Jul 26, 2026 7:13pm

@devJaja
devJaja merged commit 10136f2 into main Jul 26, 2026
6 of 8 checks passed
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