import type { ConversationContext, ContextHandle } from "../../context-v2/conversation-context.js";
import type { StreamConfig } from "../config.js";
import type { StreamEventBus } from "../event-bus.js";
import type { StreamObserver } from "../observer.js";
export type { ConversationContext, ContextHandle };
export interface ContextObserverOptions {
    contextHandle: ContextHandle;
}
/**
 * Observer that manages conversation context during LLM interactions.
 *
 * Handles:
 * - Starting and ending steps in the context
 * - Ending the turn on completion
 * - Releasing the context handle on completion/error/abort
 *
 * @example
 * ```typescript
 * const observer = new ContextObserver({
 *   contextHandle: await contextManager.acquireContext(contextId, ownerId),
 * });
 * ```
 */
export declare class ContextObserver implements StreamObserver {
    private readonly contextHandle;
    private released;
    constructor(options: ContextObserverOptions);
    attach(events: StreamEventBus, _config: StreamConfig): void;
    private onStepComplete;
    private onStreamFinish;
    private release;
}
//# sourceMappingURL=context.d.ts.map