import type { ControlTransport } from "./control.js"; export interface ControlLogSnapshot { source: "gateway"; text: string; truncated: boolean; exists: boolean; } export declare const controlLogSources: readonly ["manager", "gateway", "operation"]; export type ControlLogSource = (typeof controlLogSources)[number]; export interface ControlLogQuery { source: ControlLogSource; /** Opaque cursor returned by a prior query. Omit it to read the latest bounded window. */ cursor?: string; } export interface ControlLogStreamOptions { signal?: AbortSignal; } export interface ControlLogBatch { schemaVersion: 1; source: ControlLogSource; text: string; cursor: string; truncated: boolean; exists: boolean; /** The file was replaced or shortened since cursor was issued. */ reset: boolean; } export declare function isControlLogBatch(value: unknown): value is ControlLogBatch; export declare function isControlLogSnapshot(value: unknown): value is ControlLogSnapshot; /** 移除终端命令、不可见控制符和双向覆盖,保留换行及制表符。 */ export declare function sanitizeLogText(text: string): string; export declare class ControlLogClient { private readonly transport; constructor(transport: ControlTransport); query(query: ControlLogQuery): Promise; stream(query: ControlLogQuery, options?: ControlLogStreamOptions): AsyncGenerator; gateway(): Promise; }