UNPKG

@kya-os/mcp-i

Version:

The TypeScript MCP framework with identity features built-in

141 lines (140 loc) 3.62 kB
/** * Example usage of XMCP-I test infrastructure * * This file demonstrates how to use the test infrastructure for testing * XMCP-I applications without hitting external services. */ import { MockIdentityProvider } from "../index.js"; /** * Example: Setting up test environment */ export declare function setupTestEnvironment(): void; /** * Example: Using mock identity provider */ export declare function exampleMockIdentityProvider(): MockIdentityProvider; /** * Example: Testing proof generation and verification */ export declare function exampleProofTesting(): Promise<{ valid: boolean; warnings: string[]; session: { valid: boolean; expired: boolean; error?: string | undefined; }; signature: { valid: boolean; algorithm: string; error?: string | undefined; }; proof: { valid: boolean; structure: boolean; timestamps: boolean; hashes: boolean; error?: string | undefined; }; errors: string[]; did?: string | undefined; kid?: string | undefined; }>; /** * Example: Intercepting KTA calls */ export declare function exampleKTAInterception(): Promise<{ registrationResult: { success: boolean; agentURL: string; agentId: string; agentSlug: string; verificationEndpoint: string; conformanceCapabilities: string[]; mirrorStatus: string; }; delegationResult: never; }>; /** * Example: Using test runtime integration */ export declare function exampleRuntimeIntegration(): { testIdentity: { did: string; kid: string; privateKey: string; publicKey: string; createdAt: string; lastRotated?: string | undefined; }; sessionContext: { sessionId: string; audience: string; nonce: string; timestamp: number; createdAt: number; lastActivity: number; ttlMinutes: number; }; }; /** * Example: Complete test scenario */ export declare function exampleCompleteTestScenario(): Promise<{ mockProvider: MockIdentityProvider; proofResult: { valid: boolean; warnings: string[]; session: { valid: boolean; expired: boolean; error?: string | undefined; }; signature: { valid: boolean; algorithm: string; error?: string | undefined; }; proof: { valid: boolean; structure: boolean; timestamps: boolean; hashes: boolean; error?: string | undefined; }; errors: string[]; did?: string | undefined; kid?: string | undefined; }; ktaResults: { registrationResult: { success: boolean; agentURL: string; agentId: string; agentSlug: string; verificationEndpoint: string; conformanceCapabilities: string[]; mirrorStatus: string; }; delegationResult: never; }; runtimeResults: { testIdentity: { did: string; kid: string; privateKey: string; publicKey: string; createdAt: string; lastRotated?: string | undefined; }; sessionContext: { sessionId: string; audience: string; nonce: string; timestamp: number; createdAt: number; lastActivity: number; ttlMinutes: number; }; }; }>;