@eigenpal/docx-editor-agents

中文文档
1.9.0发布于 2026/06/21Apache-2.0TypeScriptESM + CJS构建来源已验证近 30 天下载 20.6万

DOCX编辑器的代理SDK和聊天UI——框架-不可知桥,MCP服务器,AI SDK适配器,外加回放UI(和1.x中的Vue UI)

此软件包已被标记为弃用

deprecated

中文使用文档
文档目录8 节
  1. 快速启动
  2. 软件包
  3. 实时编辑器桥
  4. MCP 服务器
  5. 子路径
  6. 单词 API 对等
  7. 捐款
  8. 商业支助

DOCX Editor — .docx in, .docx out. Open source, agent ready, client-side.

npm version npm downloads license Demo Documentation

@eigenpal/docx-editor-代理服务器

Word-like API供AI代理审查DOCX文档. 读取,评论,建议跟踪更改,接受/拒绝. 无头,服务器友好,浏览器友好. 上面建有您的 AI 文档特性的库 .

快速启动

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()));

这就是静态审查路径: 投入CI机器人,排队工人,或者Lambda. 不需要编辑 ~50克贝.

软件包

软件包说明
@eigenpal/docx-editor-react   反应适配器. 工具栏 页面编辑器 插件.
@eigenpal/docx-editor-vue   Vue 3适配器. 工具栏 页面编辑器 插件.
@eigenpal/docx-editor-core框架-不可知核:OOXML 解析器,序列器,布局引擎,ProseMirror schema. 取决于此, 如果您要叉出反应或 Vue 适配器 .
@eigenpal/docx-editor-i18n两个适配器消耗的共享地块串和类型.
@eigenpal/docx-editor-agents代理SDK和聊天UI:框架-不可知桥,MCP服务器,AI SDK适配器,外加React UI.

伪造适配器? 取出叉子细. 取决于 @eigenpal/docx-editor-core 直接如此解析器,序列器, 和渲染自动修复您的建筑中的地块, 不回转每个上游变化的手.

实时编辑器桥

连接AI工具进入运行 <DocxEditor> 这样 add_comment, (中文(简体) ), suggest_change, (中文(简体) ), find_text 等在用户编辑器中现场显示.

// 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' });

都一样 EditorRefLike 合同来源 /bridge,相同的工具目录,和相同的 AgentMessage[] 聊天形状。 对于其他框架,直接通过下列途径建造桥梁: createEditorBridge 从 @eigenpal/docx-editor-agents/bridge。 。 。 .

MCP 服务器

交通-不可知核. 用你自己的认证、存储和运输(HTTP-SSE、WebSocket、队列工人、任何东西)包起来.

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());
});

内置代理工具(read_document, (中文(简体) ), read_selection, (中文(简体) ), read_page, (中文(简体) ), read_pages, (中文(简体) ), find_text, (中文(简体) ), read_comments, (中文(简体) ), read_changes, (中文(简体) ), add_comment, (中文(简体) ), suggest_change, (中文(简体) ), apply_formatting, (中文(简体) ), set_paragraph_style, (中文(简体) ), insert_break, (中文(简体) ), reply_comment, (中文(简体) ), resolve_comment, (中文(简体) ), scroll通过 MCP 自动曝光 tools/list 财务报告和审定财务报表 tools/call. MCP spec 版本 : 2025-06-18。 。 。 .

本地stdio MCP bin是一文档一配置(Claude Desktop在启动时加载其列表),不符合多文档产品. 使用您自己的认证和存储器自控服务器 .

子路径

子路径使用时间
@eigenpal/docx-editor-agents服务器侧审查, 库胶水
@eigenpal/docx-editor-agents/bridge将 AI 工具连接到运行中的编辑器适配器
@eigenpal/docx-editor-agents/server后端路线需要没有MCP运输的代理工具
@eigenpal/docx-editor-agents/mcp建造 MCP 服务器( 任何运输)
@eigenpal/docx-editor-agents/ai-sdk/server服务器侧流与 Vercel 聊天 ai 软件包
@eigenpal/docx-editor-agents/react反应应用程序接线 <DocxEditor> 给代理人
@eigenpal/docx-editor-agents/ai-sdk/react在桥上反弹聊天
@eigenpal/docx-editor-agents/vueVue apps 接线 <DocxEditor> 给代理人
@eigenpal/docx-editor-agents/ai-sdk/vue在桥上聊天

每个亚道树摇晃独立. Vue 和 AI SDK 同伴通过 peerDependenciesMeta。 。 。 .

单词 API 对等

桥与Office.js Word API模式相仿:定位一个稳定的手柄(paraId),先是变异. 合同在编译时按类型执行:

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

EditorBridge 静态需要满足 WordCompatBridge。丢弃一种将地图映射到 Word API 呼叫和打字间隔的方法.

捐款

欢迎捐款。 见 捐款额 用于设置,测试,以及一次性CLA签名.

商业支助

[TIP] 问题还是习惯特征? 电子邮件 docx-编辑器@eigenpal.com。 。 。 .

版本与发布记录

@eigenpal/docx-editor-agents 共发布 41 个版本,首次发布于 2026/03/18;过去 12 个月发布了 41 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.9.0latest2026/06/214 个月前
1.8.32026/06/204 个月前
1.8.22026/06/194 个月前
1.8.12026/06/194 个月前
1.8.02026/06/194 个月前
1.7.02026/06/184 个月前

关于 @eigenpal/docx-editor-agents 的常见问题

@eigenpal/docx-editor-agents 是什么?

DOCX编辑器的代理SDK和聊天UI——框架-不可知桥,MCP服务器,AI SDK适配器,外加回放UI(和1.x中的Vue UI)注意:该包已被作者标记为弃用——deprecated

如何安装 @eigenpal/docx-editor-agents?

在项目目录运行 npm install @eigenpal/docx-editor-agents,或使用 pnpm add / yarn add / bun add。

@eigenpal/docx-editor-agents 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@eigenpal/docx-editor-agents 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@eigenpal/docx-editor-agents 可以商用吗?

@eigenpal/docx-editor-agents 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@eigenpal/docx-editor-agents 的下载量有多少?

根据 npm 官方下载统计,@eigenpal/docx-editor-agents 在 2026/10/13 – 2026/11/11 这 30 天内被下载 205,895 次,日均约 6,863 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@eigenpal/docx-editor-agents 还在维护吗?

最新版本 1.9.0 发布于 2026/06/21(4 个月前);至今共发布 41 个版本,其中过去 12 个月发布了 41 个;首次发布于 2026/03/18。作者已将其标记为弃用,新项目建议寻找替代方案。