import { Event } from "../../../../base/common/event.js";
import { IDisposable } from "../../../../base/common/lifecycle.js";
import { URI } from "../../../../base/common/uri.js";
import { IChatDebugEvent, ChatDebugLogLevel, IChatDebugLogProvider, IChatDebugResolvedEventContent } from "./chatDebugService.js";
export declare const IChatDebugService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<IChatDebugService>;
/**
* Service for collecting and exposing chat debug events.
* Internal components can log events,
* and the debug editor pane can display them.
*/
export interface IChatDebugService extends IDisposable {
    readonly _serviceBrand: undefined;
    /**
    * Fired when a new event is added.
    */
    readonly onDidAddEvent: Event<IChatDebugEvent>;
    /**
    * Fired when provider events are cleared for a session (before re-invoking providers).
    */
    readonly onDidClearProviderEvents: Event<URI>;
    /**
    * Log a generic event to the debug service.
    */
    log(sessionResource: URI, name: string, details?: string, level?: ChatDebugLogLevel, options?: {
        id?: string;
        category?: string;
        parentEventId?: string;
    }): void;
    /**
    * Add a typed event to the debug service.
    */
    addEvent(event: IChatDebugEvent): void;
    /**
    * Add an event sourced from an external provider.
    * These events are cleared before re-invoking providers to avoid duplicates.
    */
    addProviderEvent(event: IChatDebugEvent): void;
    /**
    * Get all events for a specific session.
    */
    getEvents(sessionResource?: URI): readonly IChatDebugEvent[];
    /**
    * Get all session resources that have logged events.
    */
    getSessionResources(): readonly URI[];
    /**
    * The currently active session resource for debugging.
    */
    activeSessionResource: URI | undefined;
    /**
    * Clear all logged events.
    */
    clear(): void;
    /**
    * Register an external provider that can supply additional debug events.
    * This is used by the extension API (ChatDebugLogProvider).
    */
    registerProvider(provider: IChatDebugLogProvider): IDisposable;
    /**
    * Check whether providers have already been invoked for a given session.
    */
    hasInvokedProviders(sessionResource: URI): boolean;
    /**
    * Invoke all registered providers for a given session resource.
    * Called when the Debug View is opened to fetch events from extensions.
    */
    invokeProviders(sessionResource: URI): Promise<void>;
    /**
    * End a debug session: cancels any in-flight provider invocation,
    * disposes the associated CancellationTokenSource, and removes it.
    * Called when the chat session is disposed/archived.
    */
    endSession(sessionResource: URI): void;
    /**
    * Resolve the full details of an event by its id.
    * Delegates to the registered provider's resolveChatDebugLogEvent.
    */
    resolveEvent(eventId: string): Promise<IChatDebugResolvedEventContent | undefined>;
    /**
    /**
    * Export the debug log for a session via the registered provider.
    */
    exportLog(sessionResource: URI): Promise<Uint8Array | undefined>;
    /**
    * Import a previously exported debug log via the registered provider.
    * Returns the session URI for the imported data.
    */
    importLog(data: Uint8Array): Promise<URI | undefined>;
    /**
    * Returns true if the event was logged by VS Code core
    * (not sourced from an external provider).
    */
    isCoreEvent(event: IChatDebugEvent): boolean;
    /**
    * Store a human-readable title for an imported session.
    */
    setImportedSessionTitle(sessionResource: URI, title: string): void;
    /**
    * Get the stored title for an imported session, if available.
    */
    getImportedSessionTitle(sessionResource: URI): string | undefined;
    /**
    * Fired when debug data is attached to a session.
    */
    readonly onDidAttachDebugData: Event<URI>;
    /**
    * Mark a session as having debug data attached.
    */
    markDebugDataAttached(sessionResource: URI): void;
    /**
    * Check whether a session has had debug data attached.
    */
    hasAttachedDebugData(sessionResource: URI): boolean;
}
