import type { AgentProfile, TrustBreakdown } from '../types' import { identityScore } from './identity' import { onChainScore } from './onchain' import { behaviorScore } from './behavior' import { complianceScore } from './compliance' import { networkScore } from './network' import { riskPenalty } from './risk' export function computeTrustScore( agent: AgentProfile, getAgent: (addr: string) => AgentProfile | undefined ): TrustBreakdown { const identity = identityScore(agent) const onChain = onChainScore(agent) const behavior = behaviorScore(agent) const compliance = complianceScore(agent) const network = networkScore(agent, getAgent) const risk = riskPenalty(agent) const total = Math.max(0, Math.min(100, identity + onChain + behavior + compliance + network - risk)) return { identity, onChain, behavior, compliance, network, risk, total } } export { identityScore } from './identity' export { onChainScore } from './onchain' export { behaviorScore } from './behavior' export { complianceScore } from './compliance' export { networkScore } from './network' export { riskPenalty } from './risk' export { getSpendingLimits } from './limits'