/** * Bounded in-memory lifecycle logs for one managed MCP server. * @module @anht3889/dsh-mcp-mgmt-bundle/manager/logs */ import type { McpLogEntry } from '@anht3889/dsh-mcp-mgmt-mcp/types'; /** A cursor-addressable buffer of MCP lifecycle log entries. */ export interface LogBuffer { /** * Stores one lifecycle entry. * * @param entry - The lifecycle event to retain. */ append(entry: McpLogEntry): void; /** * Reads entries newer than an optional exclusive cursor. * * @param after - The exclusive cursor from a prior read. * @returns The newest cursor and matching retained entries. */ read(after?: number): { next: number; entries: McpLogEntry[]; }; /** Removes all retained entries without reusing previous cursors. */ clear(): void; } /** * Creates a bounded, cursor-addressable lifecycle log buffer. * * @param capacity - Maximum number of entries retained in memory. * @returns A buffer that keeps the newest entries. * @throws {Error} When capacity is not a positive integer. */ export declare function createLogBuffer(capacity?: number): LogBuffer;