## API Report File for "@eigenpal/docx-editor-agents"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

// @public
export interface AgentToolDefinition<TInput = Record<string, unknown>> {
    description: string;
    displayName?: string;
    handler: (input: TInput, bridge: EditorBridge) => AgentToolResult;
    inputSchema: Record<string, unknown>;
    name: string;
}

// @public
export interface AgentToolResult {
    // (undocumented)
    data?: unknown;
    // (undocumented)
    error?: string;
    // (undocumented)
    success: boolean;
}

// @public
export const agentTools: AgentToolDefinition<any>[];

// @public
export interface ContentChangeEvent {
    changeCount: number;
    changes: ReviewChange[];
    commentCount: number;
    comments: ReviewComment[];
}

// @public
export function createEditorBridge(editorRef: EditorRefLike, author?: string): EditorBridge;

// @public
export function createReviewerBridge(reviewer: DocxReviewer): EditorBridge;

// @public
export interface EditorBridge {
    addComment(options: AddCommentByParaIdOptions): number | null;
    applyFormatting(options: ApplyFormattingOptions): boolean;
    findText(query: string, options?: {
        caseSensitive?: boolean;
        limit?: number;
    }): FoundMatch[];
    getChanges(filter?: ChangeFilter): ReviewChange[];
    getComments(filter?: CommentFilter): ReviewComment[];
    getContent(options?: GetContentOptions): ContentBlock[];
    getContentAsText(options?: GetContentOptions): string;
    getCurrentPage(): number;
    getPage(pageNumber: number): PageContent | null;
    getPages(options: {
        from: number;
        to: number;
    }): PageContent[];
    getSelection(): SelectionInfo | null;
    getTotalPages(): number;
    insertBreak(options: InsertBreakOptions): boolean;
    onContentChange(listener: (event: ContentChangeEvent) => void): () => void;
    onSelectionChange(listener: (event: SelectionChangeEvent) => void): () => void;
    proposeChange(options: ProposeChangeOptions): boolean;
    replyTo(commentId: number, options: ReplyOptions): number | null;
    resolveComment(commentId: number): void;
    scrollTo(paraId: string): boolean;
    setParagraphStyle(options: SetParagraphStyleOptions): boolean;
}

// @public
export interface EditorRefLike {
    // (undocumented)
    addComment(options: {
        paraId: string;
        text: string;
        author: string;
        search?: string;
    }): number | null;
    applyFormatting(options: {
        paraId: string;
        search?: string;
        marks: CharacterFormatting;
    }): boolean;
    // (undocumented)
    findInDocument(query: string, options?: {
        caseSensitive?: boolean;
        limit?: number;
    }): FoundMatch[];
    // (undocumented)
    getComments(): Array<{
        id: number;
        author: string;
        date?: string;
        parentId?: number;
        content: unknown[];
        done?: boolean;
    }>;
    getCurrentPage(): number;
    // (undocumented)
    getDocument(): unknown | null;
    // (undocumented)
    getEditorRef(): {
        getDocument(): unknown | null;
    } | null;
    getPageContent(pageNumber: number): PageContent | null;
    // (undocumented)
    getSelectionInfo(): SelectionInfo | null;
    getTotalPages(): number;
    insertBreak(options: {
        paraId: string;
        type: 'page' | 'sectionNextPage' | 'sectionContinuous';
    }): boolean;
    // (undocumented)
    onContentChange(listener: (doc: unknown) => void): () => void;
    // (undocumented)
    onSelectionChange(listener: (selection: unknown) => void): () => void;
    // (undocumented)
    proposeChange(options: {
        paraId: string;
        search: string;
        replaceWith: string;
        author: string;
    }): boolean;
    // (undocumented)
    replyToComment(commentId: number, text: string, author: string): number | null;
    // (undocumented)
    resolveComment(commentId: number): void;
    // (undocumented)
    scrollToParaId(paraId: string): boolean;
    setParagraphStyle(options: {
        paraId: string;
        styleId: string;
    }): boolean;
}

// @public
export function executeToolCall(toolName: string, input: Record<string, unknown>, bridge: EditorBridge): AgentToolResult;

// @public
export function getToolSchemas(): {
    type: "function";
    function: {
        name: string;
        description: string;
        parameters: Record<string, unknown>;
    };
}[];

// @public
export type SelectionChangeEvent = SelectionInfo | null;

```
