Replex 开源 Spellbook:人与 AI 在同一 PPTX 文件上协同编辑并校验
replexme/spellbook
Replex 开源 Spellbook,让用户与 AI 在真实浏览器编辑器中打开同一份可编辑文档,结果需通过文档结构与渲染画面双重校验后才被接受,当前可用格式为 PowerPoint(.pptx),DOCX 与自有页面排版格式仍为规划中的适配器。
Spellbook opens an existing document in a real browser editor, lets a person and an AI work on the same editable file, and checks the result against both the document structure and the rendered screen before it is accepted.
The current usable vertical is PowerPoint (.pptx). DOCX and Spellbook's native page-layout format are planned adapters; they are not advertised as working features yet.
What is public
This repository is the complete self-hosted product: the web workspace, WOPI host, AI connector, PPTX structure-preserving editor, LibreOffice renderer customizations, and public evaluation harness. It does not require Replex accounts or Google Cloud.
The hosted Replex service adds private deployment, billing, entitlement, managed identity, managed credential storage, and private evaluation data outside this repository. Hosted modules depend on this public core; the public core never imports hosted modules.
Run locally
Prerequisites: Docker with Compose, Node.js 22, and pnpm 10.26.
pnpm selfhost:setup pnpm selfhost:up
Open http://localhost:3000 and sign in with the email and generated password printed by the setup command. Connect a supported local AI subscription from the workspace when you want AI editing; direct editing remains available without an AI connection.
The Compose profile uses its private connector by default. The optional user-device flow used by hosted deployments is available with SPELLBOOK_AI_CONNECTOR_MODE=local and pnpm connector:start; see self-hosting for the exact boundary and current verification status.
The browser editor defaults to the pinned ONLYOFFICE distribution. Stage that distribution with pnpm browser-office:stage <distribution-directory> before starting Compose; a missing or mismatched distribution stops startup. Host JavaScript is bundled locally without compiling the editor engine. LibreOffice remains the server-side renderer and an explicit browser rollback option. Public release of the selected browser distribution is still held pending auxiliary WASM source/build verification. See the engine selection. Run pnpm selfhost:doctor to validate configuration and service health.
pnpm selfhost:up builds the services, waits for their health checks and then
removes unused Spellbook service images automatically, including after failed
builds or starts. pnpm docker:cleanup shows the exact plan; its explicit
--execute mode keeps every image used by a container and removes all unused
Spellbook images plus unused build cache. Persistent document and database
volumes are never part of this cleanup.
Product contract
- The uploaded file remains the immutable original.
- Edits create versions; accepted versions remain editable files, not flattened images.
- The AI receives the current rendered view plus format-specific structure and permissions.
- A changed candidate is rendered and structurally validated before it can be presented for approval.
- Unsupported constructs are preserved or blocked, never silently rewritten.
See the architecture, format status, multi-format roadmap, and open-core boundary.
Development
pnpm install --frozen-lockfile pnpm verify pnpm test:e2e
The public boundary test fails if hosted infrastructure, private identities, credentials, or private corpus paths enter this repository.
The regression catalog is committed, but upstream PPTX binaries are not. Fetch the pinned, hash-checked corpus into the ignored eval/public/downloads/ directory when you need fidelity tests. The renderer image and release are recorded with the coverage report, so name the LibreOffice build the references were rendered with:
pnpm corpus:fetch-public -- \ --renderer-image <libreoffice-image> \ --renderer-version <libreoffice-release>
License
Spellbook-authored source is licensed under MPL-2.0. Third-party components and adapted files retain their own licenses; see THIRD_PARTY_NOTICES.md and LICENSES/.
来源:GitHub · github.com