/**
 * Well-Known Endpoints for the KYA-OS / MCP Runtime
 *
 * Handles /.well-known/did.json and /.well-known/agent.json endpoints
 * according to requirements 7.1, 7.2, 7.3, 7.4, 7.5.
 *
 * C2 (#2916) classification: **product-layer, stays product-side.** The DIF
 * `@kya-os/mcp` core does not generate `.well-known` manifests, and its
 * `buildDidWebDocument` is intentionally NOT adopted here: it produces a
 * byte-different DID document (full `kid` rather than a `#fragment`
 * verification-method id, emits both `publicKeyJwk` and `publicKeyMultibase`,
 * and requires a `did:web` DID). `did.json` is a W3C-standard wire artifact
 * that must stay byte-stable, so this generator is left in place and its wire
 * output is frozen by `__tests__/well-known-wire-freeze.test.ts`. Any future
 * relocation/rename is gated by the C4 (#2918) dual-accept window — never
 * change the `.well-known/did.json` path.
 */
import { AgentIdentity } from "./identity";
/**
 * DID Document structure (W3C DID Core specification)
 */
export interface DIDDocument {
    "@context": string[];
    id: string;
    verificationMethod: VerificationMethod[];
    authentication: string[];
    assertionMethod: string[];
    keyAgreement?: string[];
    capabilityInvocation?: string[];
    capabilityDelegation?: string[];
    service?: ServiceEndpoint[];
}
/**
 * Verification Method for DID Document
 */
export interface VerificationMethod {
    id: string;
    type: string;
    controller: string;
    publicKeyMultibase?: string;
    publicKeyJwk?: any;
}
/**
 * Service Endpoint for DID Document
 */
export interface ServiceEndpoint {
    id: string;
    type: string;
    serviceEndpoint: string;
}
/**
 * Agent Document structure (XMCP-I specific)
 */
export interface AgentDocument {
    id: string;
    capabilities: {
        "mcp-i": ["handshake", "signing", "verification"];
    };
    registry?: {
        kta?: string;
        mcp?: string;
    };
    metadata?: {
        name?: string;
        description?: string;
        version?: string;
    };
}
/**
 * Well-known endpoint configuration
 */
export interface WellKnownConfig {
    environment: "development" | "production";
    baseUrl?: string;
    agentMetadata?: {
        name?: string;
        description?: string;
        version?: string;
    };
    registryUrls?: {
        kta?: string;
        mcp?: string;
    };
}
/**
 * Well-known endpoints manager
 */
export declare class WellKnownManager {
    private identity;
    private config;
    constructor(identity: AgentIdentity, config: WellKnownConfig);
    /**
     * Generate DID document for /.well-known/did.json
     * Requirements: 7.1, 7.5
     */
    generateDIDDocument(): DIDDocument;
    /**
     * Generate agent document for /.well-known/agent.json
     * Requirements: 7.2, 7.3
     */
    generateAgentDocument(): AgentDocument;
    /**
     * Get HTTP headers for DID document
     * Requirements: 7.4, 7.5
     */
    getDIDDocumentHeaders(): Record<string, string>;
    /**
     * Get HTTP headers for agent document
     * Requirements: 7.2, 7.5
     */
    getAgentDocumentHeaders(): Record<string, string>;
    /**
     * Encode public key as multibase (base58btc with 'z' prefix for Ed25519)
     */
    private encodePublicKeyMultibase;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<WellKnownConfig>): void;
    /**
     * Get current configuration
     */
    getConfig(): WellKnownConfig;
}
/**
 * Express/HTTP handler for well-known endpoints
 */
export interface WellKnownHandler {
    handleDIDDocument(): {
        status: number;
        headers: Record<string, string>;
        body: string;
    };
    handleAgentDocument(): {
        status: number;
        headers: Record<string, string>;
        body: string;
    };
}
/**
 * Create well-known endpoint handler
 */
export declare function createWellKnownHandler(identity: AgentIdentity, config: WellKnownConfig): WellKnownHandler;
/**
 * Utility functions
 */
/**
 * Validate DID document structure
 */
export declare function validateDIDDocument(doc: any): doc is DIDDocument;
/**
 * Validate agent document structure
 */
export declare function validateAgentDocument(doc: any): doc is AgentDocument;
/**
 * Extract DID from URL path (for did:web resolution)
 */
export declare function extractDIDFromPath(path: string, baseUrl: string): string | null;
