import { type BoundDocApi, type DocCloseBoundParams, type DocCloseResult, type DocFormatApplyBoundParams, type DocFormatApplyResult, type DocOpenParams as GeneratedDocOpenParams, type DocOpenResult, type DocSaveBoundParams, type DocSaveResult } from './generated/client.js';
import { SuperDocRuntime, type SuperDocClientOptions, type InvokeOptions, type OperationSpec, type RuntimeInvoker } from './runtime/process.js';
/**
 * Wraps a raw runtime and injects a fixed sessionId into every invoke call.
 * Implements RuntimeInvoker so generated code can use it directly.
 *
 * @internal
 */
declare class BoundRuntime implements RuntimeInvoker {
    private readonly runtime;
    private readonly sessionId;
    private closed;
    constructor(runtime: SuperDocRuntime, sessionId: string);
    invoke<TData = unknown>(operation: OperationSpec, params?: Record<string, unknown>, options?: InvokeOptions): Promise<TData>;
    markClosed(): void;
}
export interface DocFormatRangeBoundParams extends Omit<DocFormatApplyBoundParams, 'inline'> {
    properties: NonNullable<DocFormatApplyBoundParams['inline']>;
}
/**
 * Bound document handle. All document operations are available as typed methods.
 * The handle injects its session id automatically — callers never pass
 * doc or sessionId.
 */
declare class SuperDocDocumentCore {
    private readonly boundRuntime;
    private readonly _sessionId;
    private readonly _openResult;
    private readonly client;
    /** @internal */
    constructor(boundRuntime: BoundRuntime, sessionId: string, openResult: DocOpenResult, client: SuperDocClient);
    get sessionId(): string;
    /** Read-only snapshot of the initial doc.open response metadata. */
    get openResult(): DocOpenResult;
    save(params?: DocSaveBoundParams, options?: InvokeOptions): Promise<DocSaveResult>;
    close(params?: DocCloseBoundParams, options?: InvokeOptions): Promise<DocCloseResult>;
    /** @internal */
    markClosed(): void;
    formatRange(params: DocFormatRangeBoundParams, options?: InvokeOptions): Promise<DocFormatApplyResult>;
}
type SuperDocDocumentInstance = SuperDocDocumentCore & BoundDocApi;
export declare const SuperDocDocument: new (boundRuntime: BoundRuntime, sessionId: string, openResult: DocOpenResult, client: SuperDocClient) => SuperDocDocumentInstance;
export type SuperDocDocument = SuperDocDocumentInstance;
export type DocOpenParams = GeneratedDocOpenParams;
export interface DocDescribeCommandParams {
    operationId: string;
    [key: string]: unknown;
}
/**
 * SuperDoc client — transport manager and document factory.
 *
 * Use `client.open()` to get bound document handles. Each handle is
 * independently session-scoped and safe for concurrent use.
 *
 *     const client = new SuperDocClient({ user: { name: 'bot' } });
 *     await client.connect();
 *     const doc = await client.open({ doc: './file.docx' });
 *     const markdown = await doc.getMarkdown();
 *     await doc.close();
 *     await client.dispose();
 */
export declare class SuperDocClient {
    private readonly runtime;
    private readonly rawApi;
    private readonly handles;
    constructor(options?: SuperDocClientOptions);
    connect(): Promise<void>;
    /**
     * Open a document and return a bound document handle.
     *
     * The returned handle injects its session id into every operation
     * automatically. The same file can be opened multiple times with
     * different session ids (useful for diff workflows).
     */
    open(params: DocOpenParams, options?: InvokeOptions): Promise<SuperDocDocument>;
    describe(params?: Record<string, unknown>, options?: InvokeOptions): Promise<unknown>;
    describeCommand(params: DocDescribeCommandParams, options?: InvokeOptions): Promise<unknown>;
    dispose(): Promise<void>;
    /** @internal */
    removeHandle(sessionId: string): void;
}
export declare function createSuperDocClient(options?: SuperDocClientOptions): SuperDocClient;
export { getSkill, installSkill, listSkills } from './skills.js';
export { chooseTools, dispatchSuperDocTool, getMcpPrompt, getSystemPrompt, getSystemPromptForProvider, getToolCatalog, listTools, DEFAULT_PRESET, getPreset, listPresets, } from './tools.js';
export type { AnthropicSystemPrompt, CacheStrategy, SystemPromptForProviderResult, ToolCatalog, ToolCatalogEntry, ToolCatalogOperation, ToolChooserInput, ToolProvider, } from './tools.js';
export { dispatchIntentTool } from './generated/intent-dispatch.generated.js';
export { SuperDocCliError } from './runtime/errors.js';
export type { InvokeOptions, OperationSpec, OperationParamSpec, RuntimeInvoker, SuperDocClientOptions, } from './runtime/process.js';
export type { DocOpenResult } from './generated/client.js';
//# sourceMappingURL=index.d.ts.map