## 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 AgentContextSnapshot {
    currentPage: number;
    selection: SelectionInfo | null;
    totalPages: number;
}

// @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 function createReviewerBridge(reviewer: DocxReviewer): EditorBridge;

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

// @public
export class DocxReviewer {
    constructor(document: Document_2, author?: string, originalBuffer?: ArrayBuffer);
    acceptAll(opts?: AcceptChangesOptions): number;
    acceptChange(target: number | ReviewChange): void;
    addComment(paragraphIndex: number, text: string): number;
    addComment(options: AddCommentOptions): number;
    applyReview(ops: BatchReviewOptions): BatchResult;
    readonly author: string;
    static fromBuffer(buffer: ArrayBuffer, author?: string): Promise<DocxReviewer>;
    getChanges(filter?: ChangeFilter): ReviewChange[];
    getComments(filter?: CommentFilter): ReviewComment[];
    getContent(options?: GetContentOptions): ContentBlock[];
    getContentAsText(options?: GetContentOptions): string;
    proposeDeletion(options: ProposeDeletionOptions): void;
    proposeInsertion(options: ProposeInsertionOptions): void;
    // @deprecated (undocumented)
    proposeReplacement(options: ProposeReplacementOptions): void;
    rejectAll(opts?: AcceptChangesOptions): number;
    rejectChange(target: number | ReviewChange): void;
    removeComment(commentId: number): void;
    replace(paragraphIndex: number, search: string, replaceWith: string): void;
    replace(options: ProposeReplacementOptions): void;
    replyTo(commentId: number, text: string): number;
    replyTo(commentId: number, options: ReplyOptions): number;
    toBuffer(): Promise<ArrayBuffer>;
    toDocument(): Document_2;
}

// @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 function executeToolCall(toolName: string, input: Record<string, unknown>, bridge: EditorBridge): AgentToolResult;

// @public
export function getToolDisplayName(name: string): string;

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

// @public (undocumented)
export interface SelectionInfo {
    // (undocumented)
    after: string;
    // (undocumented)
    before: string;
    // (undocumented)
    paragraphText: string;
    // (undocumented)
    paraId: string | null;
    // (undocumented)
    selectedText: string;
}

```
