npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@eigenpal/docx-editor-agents

v1.0.2

Published

Agent SDK and chat UI for the DOCX editor — framework-agnostic bridge, MCP server, AI SDK adapters, plus React UI (and Vue UI in 1.x)

Readme

@eigenpal/docx-editor-agents

Word-like API for AI agents to review DOCX documents. Read, comment, suggest tracked changes, accept/reject. Headless, server-friendly, browser-friendly. The library you build your AI document features on top of.

Quick Start

npm install @eigenpal/docx-editor-agents
import { readFile, writeFile } from 'node:fs/promises';
import { DocxReviewer } from '@eigenpal/docx-editor-agents';

const buffer = await readFile('contract.docx');
const reviewer = await DocxReviewer.fromBuffer(buffer, 'AI Reviewer');

reviewer.addComment(5, 'This cap seems too low.');
reviewer.replace(5, '$50k', '$500k');

await writeFile('contract.reviewed.docx', new Uint8Array(await reviewer.toBuffer()));

That's the static-review path: drop into a CI bot, queue worker, or Lambda. No editor needed. ~50 KB.

Packages

| Package | Description | | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | @eigenpal/docx-editor-react |   React adapter. Toolbar, paged editor, plugins. | | @eigenpal/docx-editor-vue |   Vue 3 adapter. Toolbar, paged editor, plugins. | | @eigenpal/docx-editor-core | Framework-agnostic core: OOXML parser, serializer, layout engine, ProseMirror schema. Depend on this if you fork the React or Vue adapter. | | @eigenpal/docx-editor-i18n | Shared locale strings and types consumed by both adapters. | | @eigenpal/docx-editor-agents | Agent SDK and chat UI: framework-agnostic bridge, MCP server, AI SDK adapters, plus React UI. |

Forking the adapter? Keep your fork thin. Depend on @eigenpal/docx-editor-core directly so parser, serializer, and rendering fixes land in your build automatically, without backporting each upstream change by hand.

Live editor bridge

Wire AI tools into a running <DocxEditor> so add_comment, suggest_change, find_text etc. show up live in the user's editor.

// React
import { useAgentChat } from '@eigenpal/docx-editor-agents/react';
const { executeToolCall, toolSchemas } = useAgentChat({ editorRef, author: 'Assistant' });

// Vue
import { useAgentBridge } from '@eigenpal/docx-editor-agents/vue';
const { executeToolCall, toolSchemas } = useAgentBridge({ editorRef, author: 'Assistant' });

Both share the same EditorRefLike contract from /bridge, the same tool catalog, and the same AgentMessage[] chat shape. For other frameworks, build the bridge directly via createEditorBridge from @eigenpal/docx-editor-agents/bridge.

MCP server

Transport-agnostic core. Wrap it with your own auth, storage, and transport (HTTP-SSE, WebSocket, queue worker, anything).

import { McpServer, createReviewerBridge, DocxReviewer } from '@eigenpal/docx-editor-agents';

app.post('/api/mcp', requireAuth, async (req, res) => {
  const buffer = await loadDocxForUser(req.user, req.params.docId);
  const reviewer = await DocxReviewer.fromBuffer(buffer, req.user.name);
  const server = new McpServer(createReviewerBridge(reviewer), {
    name: 'acme-review',
    version: '1.0.0',
  });

  res.json(server.handle(JSON.parse(req.body))); // sync, transport-free, never throws

  await saveDocxForUser(req.user, req.params.docId, await reviewer.toBuffer());
});

Ten built-in agent tools (read_document, find_text, add_comment, suggest_change, read_comments, read_changes, reply_comment, resolve_comment, read_selection, scroll) are exposed automatically via MCP tools/list and tools/call. MCP spec version: 2025-06-18.

A local stdio MCP bin is one-document-per-config (Claude Desktop loads its list at startup), which doesn't fit a multi-doc product. Host the server yourself with your own auth and storage.

Subpaths

| Subpath | Use when | | -------------------------------------------- | -------------------------------------------------------------- | | @eigenpal/docx-editor-agents | Server-side review, library glue | | @eigenpal/docx-editor-agents/bridge | Wiring AI tools into a running editor adapter | | @eigenpal/docx-editor-agents/server | Backend routes needing agent tooling without the MCP transport | | @eigenpal/docx-editor-agents/mcp | Building an MCP server (any transport) | | @eigenpal/docx-editor-agents/ai-sdk/server | Server-side streaming chat with the Vercel ai package | | @eigenpal/docx-editor-agents/react | React apps wiring <DocxEditor> to an agent | | @eigenpal/docx-editor-agents/ai-sdk/react | React chat UI over the bridge | | @eigenpal/docx-editor-agents/vue | Vue apps wiring <DocxEditor> to an agent | | @eigenpal/docx-editor-agents/ai-sdk/vue | Vue chat UI over the bridge |

Each subpath tree-shakes independently. Vue and AI SDK peers are optional via peerDependenciesMeta.

Word API parity

The bridge mirrors the Office.js Word API pattern: locate a stable handle (paraId) first, then mutate. The contract is type-enforced at compile time:

import type { WordCompatBridge } from '@eigenpal/docx-editor-agents';

EditorBridge is statically required to satisfy WordCompatBridge. Drop a method that maps to a Word API call and typecheck breaks.

Contributing

Contributions welcome. See CONTRIBUTING.md for setup, tests, and the one-time CLA signature.

Commercial Support

[!TIP] Questions or custom features? Email [email protected].