Replace the design-note docs (p1–p7) with the implemented "make it real" phase docs (p8–p10) and wire production-grade, env-gated real integrations: - p8 Casper Testnet: byte-exact deploys + WASM install via casper-js-sdk; live node reads (node.testnet.casper.network); CRED402_CHAIN=sim|testnet transport. - p9 x402 + data + MCP: real EIP-712 typed-data digests (@casper-ecosystem/ casper-eip-712); casper-x402 facilitator client (x402 V2); live Open-Meteo GHI; official @modelcontextprotocol/sdk server; casper-sidecar SSE event feed. - p10 RealFi + cross-chain: real Stripe test-mode webhooks (HMAC-verified) and Plaid sandbox → privacy-preserving on-chain envelopes; Base Sepolia EVM deploy (Foundry); reachable via /api/realfi/* and /api/x402/facilitator routes. - Sign-in with Casper Wallet: real extension provider + challenge/ed25519/session flow (/v1/auth/wallet/*), console connect + sign-in button. - Branding: Cred402 logo mark, favicon, OG image; Vercel config for the console. All env-gated with sim/free-API fallbacks; full suite green, all toolchains (TS/Rust/Go/Solidity) build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7 lines
6.5 KiB
JSON
7 lines
6.5 KiB
JSON
{"seq":1,"ts":1781608791.701867,"agent_id":"EvidenceSellerAgent","goal":"borrow","step":1,"tool":"get_passport","description":"read passport for EvidenceSellerAgent","amount_cspr":"0","verdict":"ALLOW","deciding_policy":"circuit_breaker","reason":"circuit closed","decisions":[{"policy":"tool_permissions","verdict":"ALLOW","reason":"tool 'get_passport' on allowlist"},{"policy":"spending_limit","verdict":"ALLOW","reason":"non-spend action"},{"policy":"approval_gate","verdict":"ALLOW","reason":"spend 0 CSPR below approval threshold"},{"policy":"circuit_breaker","verdict":"ALLOW","reason":"circuit closed"}],"executed":true,"success":true,"outcome":{"agent_id":"EvidenceSellerAgent","reputation_score":92,"credit_score":93,"credit_limit_cspr":"38.529921829","outstanding_debt_cspr":"4","dispute_rate":0.01694915254237288,"total_receipts":416}}
|
|
{"seq":2,"ts":1781608791.703582,"agent_id":"EvidenceSellerAgent","goal":"borrow","step":2,"tool":"explain_credit","description":"underwriting explain for EvidenceSellerAgent","amount_cspr":"0","verdict":"ALLOW","deciding_policy":"circuit_breaker","reason":"circuit closed","decisions":[{"policy":"tool_permissions","verdict":"ALLOW","reason":"tool 'explain_credit' on allowlist"},{"policy":"spending_limit","verdict":"ALLOW","reason":"non-spend action"},{"policy":"approval_gate","verdict":"ALLOW","reason":"spend 0 CSPR below approval threshold"},{"policy":"circuit_breaker","verdict":"ALLOW","reason":"circuit closed"}],"executed":true,"success":true,"outcome":{"eligible":true,"credit_score":93,"credit_line_cspr":"38.529921829","interest_rate_pct":8.98,"fraud_score":20,"reason_codes":[{"code":"FINALIZED_X402_REVENUE","polarity":"positive","detail":"3 finalized x402 receipt(s)"},{"code":"LOW_DISPUTE_RATE","polarity":"positive","detail":"dispute rate 1.7%"},{"code":"VALID_RWA_EVIDENCE","polarity":"positive","detail":"3 verified RWA evidence submission(s)"},{"code":"STAKE_BACKING","polarity":"positive","detail":"50 CSPR stake backing"},{"code":"STRONG_REPAYMENT_HISTORY","polarity":"positive","detail":"1 on-time repayment(s)"},{"code":"SERVICE_CATEGORY_EXPERTISE","polarity":"positive","detail":"415 jobs in solar_output_verification"},{"code":"SUSPICIOUS_RECEIPT_PATTERN","polarity":"negative","detail":"fraud flags: revenue_concentration"},{"code":"HIGH_COUNTERPARTY_CONCENTRATION","polarity":"negative","detail":"100% income from one payer"},{"code":"UNVERIFIED_OPERATOR","polarity":"negative","detail":"no verified operator \u2014 Casper-native cap only"}]}}
|
|
{"seq":3,"ts":1781608791.704559,"agent_id":"EvidenceSellerAgent","goal":"borrow","step":3,"tool":"get_passport","description":"read passport for EvidenceSellerAgent","amount_cspr":"0","verdict":"ALLOW","deciding_policy":"circuit_breaker","reason":"circuit closed","decisions":[{"policy":"tool_permissions","verdict":"ALLOW","reason":"tool 'get_passport' on allowlist"},{"policy":"spending_limit","verdict":"ALLOW","reason":"non-spend action"},{"policy":"approval_gate","verdict":"ALLOW","reason":"spend 0 CSPR below approval threshold"},{"policy":"circuit_breaker","verdict":"ALLOW","reason":"circuit closed"}],"executed":true,"success":true,"outcome":{"agent_id":"EvidenceSellerAgent","reputation_score":92,"credit_score":93,"credit_limit_cspr":"38.529921829","outstanding_debt_cspr":"4","dispute_rate":0.01694915254237288,"total_receipts":416}}
|
|
{"seq":4,"ts":1781608791.705484,"agent_id":"EvidenceSellerAgent","goal":"borrow","step":4,"tool":"explain_credit","description":"underwriting explain for EvidenceSellerAgent","amount_cspr":"0","verdict":"ALLOW","deciding_policy":"circuit_breaker","reason":"circuit closed","decisions":[{"policy":"tool_permissions","verdict":"ALLOW","reason":"tool 'explain_credit' on allowlist"},{"policy":"spending_limit","verdict":"ALLOW","reason":"non-spend action"},{"policy":"approval_gate","verdict":"ALLOW","reason":"spend 0 CSPR below approval threshold"},{"policy":"circuit_breaker","verdict":"ALLOW","reason":"circuit closed"}],"executed":true,"success":true,"outcome":{"eligible":true,"credit_score":93,"credit_line_cspr":"38.529921829","interest_rate_pct":8.98,"fraud_score":20,"reason_codes":[{"code":"FINALIZED_X402_REVENUE","polarity":"positive","detail":"3 finalized x402 receipt(s)"},{"code":"LOW_DISPUTE_RATE","polarity":"positive","detail":"dispute rate 1.7%"},{"code":"VALID_RWA_EVIDENCE","polarity":"positive","detail":"3 verified RWA evidence submission(s)"},{"code":"STAKE_BACKING","polarity":"positive","detail":"50 CSPR stake backing"},{"code":"STRONG_REPAYMENT_HISTORY","polarity":"positive","detail":"1 on-time repayment(s)"},{"code":"SERVICE_CATEGORY_EXPERTISE","polarity":"positive","detail":"415 jobs in solar_output_verification"},{"code":"SUSPICIOUS_RECEIPT_PATTERN","polarity":"negative","detail":"fraud flags: revenue_concentration"},{"code":"HIGH_COUNTERPARTY_CONCENTRATION","polarity":"negative","detail":"100% income from one payer"},{"code":"UNVERIFIED_OPERATOR","polarity":"negative","detail":"no verified operator \u2014 Casper-native cap only"}]}}
|
|
{"seq":5,"ts":1781608791.707493,"agent_id":"EvidenceSellerAgent","goal":"borrow","step":5,"tool":"open_credit_line","description":"open credit line for EvidenceSellerAgent","amount_cspr":"0","verdict":"ALLOW","deciding_policy":"circuit_breaker","reason":"circuit closed","decisions":[{"policy":"tool_permissions","verdict":"ALLOW","reason":"tool 'open_credit_line' on allowlist"},{"policy":"spending_limit","verdict":"ALLOW","reason":"non-spend action"},{"policy":"approval_gate","verdict":"ALLOW","reason":"spend 0 CSPR below approval threshold"},{"policy":"circuit_breaker","verdict":"ALLOW","reason":"circuit closed"}],"executed":true,"success":true,"outcome":{"line_id":"EvidenceSellerAgent","max_credit_cspr":"38.529921829","drawn_cspr":"4","available_cspr":"34.529921829","interest_rate_pct":8.98,"status":"active","decision_credit_line_cspr":"48.162402287"}}
|
|
{"seq":6,"ts":1781608791.707629,"agent_id":"EvidenceSellerAgent","goal":"borrow","step":6,"tool":"draw_credit","description":"draw 5.0 CSPR from credit line","amount_cspr":"5.0","verdict":"BLOCK","deciding_policy":"spending_limit","reason":"spend 5.0 CSPR exceeds per-action cap 3 CSPR","decisions":[{"policy":"tool_permissions","verdict":"ALLOW","reason":"tool 'draw_credit' on allowlist"},{"policy":"spending_limit","verdict":"BLOCK","reason":"spend 5.0 CSPR exceeds per-action cap 3 CSPR"},{"policy":"approval_gate","verdict":"ALLOW","reason":"spend 5.0 CSPR below approval threshold"},{"policy":"circuit_breaker","verdict":"ALLOW","reason":"circuit closed"}],"executed":false,"success":null,"outcome":{}}
|