import type { IncomingMessage, ServerResponse } from "node:http";
export interface SkillDefinition {
    name: string;
    version?: string;
    description?: string;
    /** JSON Schema for the tool input (not Zod — raw JSON Schema object). */
    inputSchema?: Record<string, unknown>;
    /** Freeform instructions that are surfaced as an MCP prompt. */
    instructions?: string;
    /** SLA definition blob attached to the skill registry resource. */
    slaDefinition?: Record<string, unknown>;
    /** Tags for categorisation. */
    tags?: string[];
    /** Tools/capabilities explicitly allowed for this skill. */
    toolsAllowed?: string[];
    /** Tools/capabilities explicitly denied for this skill. */
    toolsDenied?: string[];
    /** JSON Schema for skill output validation. */
    outputSchema?: Record<string, unknown>;
    /** Model routing strategy: "auto" | "round-robin" | "least-latency". */
    modelRouting?: string;
    /** Allowed LLM models for this skill. */
    allowedModels?: string[];
    /** Default LLM model for this skill. */
    defaultModel?: string;
    /** AgentVault certification tier: "verified" | "certified" | "enterprise". */
    certificationTier?: string;
    /** Integrity configuration (algorithm, hashChain). */
    integrity?: Record<string, unknown>;
    /** Required policy presets (e.g., ["network: agentvault"]). */
    requiredPolicies?: string[];
}
export interface McpServerOpts {
    agentName: string;
    apiUrl: string;
    apiKey?: string;
    /**
     * Called when an MCP client invokes a registered skill tool.
     * Receives skill name, args, and the full skill definition (including instructions).
     * Return value is serialised as JSON and sent back as tool output.
     */
    onInvoke?: (skillName: string, args: Record<string, unknown>, skill: SkillDefinition) => Promise<unknown>;
}
export declare class AgentVaultMcpServer {
    private server;
    private skills;
    private opts;
    private initialized;
    constructor(opts: McpServerOpts);
    /**
     * Register a skill that will be exposed as an MCP tool.
     * Must be called *before* `initialize()`.
     */
    registerSkill(skill: SkillDefinition): void;
    /**
     * Register all skills as MCP tools / resources / prompts.
     * Called lazily on first request if not called explicitly.
     */
    initialize(): void;
    /**
     * Handle an incoming HTTP request to the /mcp endpoint.
     *
     * Supports the Streamable HTTP transport protocol:
     * - POST for JSON-RPC messages
     * - GET  for SSE notification stream
     * - DELETE for session close
     *
     * Each request gets a fresh stateless transport; after the response is
     * flushed the transport + underlying protocol connection are torn down
     * so the single McpServer instance is ready for the next caller.
     *
     * Local requests from 127.0.0.1/::1 bypass SPT validation (owner access).
     */
    handleRequest(req: IncomingMessage, res: ServerResponse): Promise<void>;
    /**
     * Register a single skill as an MCP tool.
     *
     * The MCP SDK's `tool()` overloads that accept a schema expect Zod types.
     * Since our skill definitions use raw JSON Schema we register without
     * schema validation (name + description + handler) and let the handler
     * receive the raw args object.
     */
    private registerToolForSkill;
    /**
     * Validate a Service Provider Token against the AgentVault backend.
     */
    private validateSpt;
    get skillCount(): number;
    get isInitialized(): boolean;
}
//# sourceMappingURL=mcp-server.d.ts.map