import type { AgentProfile } from '../types' export function identityScore(agent: AgentProfile): number { let score = 4 // base: fresh wallet if (agent.totalRequests > 0) score = 12 // funded with tx history if (agent.isOWSWallet && agent.totalApproved > 0) score = 20 // OWS wallet with policy trail if (agent.webBotAuthVerified) score += 4 // +4 request-level crypto identity if (agent.worldIdVerified) score += 11 // +11 human verified return Math.min(35, score) }