import { IncomingMessage } from "node:http"; import { AuthProvider, AuthResult } from "../types.js"; /** * Trust verification result from SATP/AgentFolio */ export interface AgentTrustResult { /** Agent identifier */ agentId: string; /** Trust score (0-100) */ trustScore: number; /** Whether the agent is verified on-chain */ verified: boolean; /** Agent display name */ name?: string; /** Capabilities tags */ capabilities?: string[]; /** Last verification timestamp */ lastVerified?: string; } /** * Configuration for SATP agent trust verification */ export interface SATPConfig { /** * AgentFolio API base URL * @default "https://api.agentfolio.bot" */ apiUrl?: string; /** * Minimum trust score required (0-100) * Set to 0 to allow all agents but still annotate requests with trust data * @default 0 */ minTrustScore?: number; /** * Require on-chain verification * @default false */ requireVerified?: boolean; /** * Header name for agent identity * @default "x-agent-id" */ agentIdHeader?: string; /** * Behavior when agent identity is missing from request * - "reject": Return 401 * - "allow": Continue without trust data * @default "allow" */ onMissing?: "reject" | "allow"; /** * Cache TTL in milliseconds for trust score lookups * @default 300000 (5 minutes) */ cacheTtlMs?: number; } /** * SATP Agent Trust Provider * * Verifies agent identity and trust scores via AgentFolio/SATP. * Can be used standalone or composed with other auth providers. * * @example * ```typescript * import { MCPServer, SATPProvider } from "mcp-framework"; * * const server = new MCPServer({ * auth: { * provider: new SATPProvider({ * minTrustScore: 50, * requireVerified: true, * }), * }, * }); * ``` */ export declare class SATPProvider implements AuthProvider { private config; private cache; constructor(config?: SATPConfig); authenticate(req: IncomingMessage): Promise; getAuthError(): { status: number; message: string; headers?: Record; }; /** * Extract agent ID from request headers or MCP metadata */ private extractAgentId; /** * Query AgentFolio API for agent trust data with caching */ private queryTrust; /** * Clear the trust score cache */ clearCache(): void; }