UNPKG

@kya-os/mcp-i

Version:

The TypeScript MCP framework with identity features built-in

51 lines (50 loc) 1.44 kB
/** * Memory Delegation Verifier * * Simple in-memory delegation storage for testing and development. * NOT suitable for production - delegations lost on restart. * * Use for: * - Unit tests * - Local development * - Integration tests * * Related: PHASE_1_XMCP_I_SERVER.md Testing section */ import { DelegationRecord } from '@kya-os/contracts/delegation'; import { DelegationVerifier, DelegationVerifierConfig, VerifyDelegationResult, VerifyDelegationOptions } from './delegation-verifier'; /** * Memory Delegation Verifier * * Simple in-memory storage (for testing only) */ export declare class MemoryDelegationVerifier implements DelegationVerifier { private delegations; private agentIndex; private debug; constructor(config: DelegationVerifierConfig); /** * Verify agent delegation */ verify(agentDid: string, scopes: string[], _options?: VerifyDelegationOptions): Promise<VerifyDelegationResult>; /** * Get delegation by ID */ get(delegationId: string): Promise<DelegationRecord | null>; /** * Store delegation */ put(delegation: DelegationRecord): Promise<void>; /** * Revoke delegation */ revoke(delegationId: string, reason?: string): Promise<void>; /** * Clear all delegations (for testing) */ clear(): void; /** * Get all delegations (for testing/debugging) */ getAll(): DelegationRecord[]; }