Conversation
Add @floatboat/nexus-plugin-collab: a multi-user realtime editing plugin built on a CRDT model, awareness (remote cursors/selections), offline editing with reconnect merge, replayable session snapshots, and a deterministic convergence test suite. - Layered architecture (UI / Awareness / Sync / Model / Codec / Storage) behind a ProviderAdapter abstraction so the CRDT engine is swappable. - Versioned, idempotent markdown<->CRDT codec with stable node-id<->offset index. - Zero core changes: integrates only via public capabilities (EDITOR_TRANSACTIONS / EDITOR_HOST / PLUGIN_STORAGE / UI / VAULT). - WAL-style offline persistence, zero-trust awareness sanitization, graceful degradation when the server is unavailable. - Converges under arbitrary delivery order (proven by test/convergence.sim.mjs; 2320 ops / up to 12 clients / 20 orderings, identical text+offset hashes). - Three delivery docs added: 需求描述文档 / 技术架构文档 / 测试和验证文档. Co-Authored-By: WorkBuddy <noreply@workbuddy.ai>
|
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 为 Nexus-Editor 提交
@floatboat/nexus-plugin-collab—— 一个 CRDT 驱动的实时协同编辑插件(离线优先)。目标是在不侵入 Nexus 核心的前提下,为编辑器提供多人实时协作能力。交付产物
packages/plugin-collab/—— 插件包(分层脚手架 + 收敛性证明)需求描述文档.md—— 业务问题 / 目标用户 / Hero / 输入输出 / 完整流程 / AI·规则·人工分工 / 关键取舍 / 实际完成范围 / 贡献边界技术架构文档.md—— 分层架构 / ProviderAdapter 抽象 / 写路径数据流 / 版本化 Codec / 六大难点解法测试和验证文档.md—— DoD 映射 / 收敛性证明 / Codec 往返 / 性能预算 / 零核心改动验证 / CI 门禁架构亮点
EDITOR_TRANSACTIONS/EDITOR_HOST/PLUGIN_STORAGE/UI/VAULT),未修改@floatboat/nexus-core。init/applyUpdate/onUpdate/awareness/destroy),参考实现为内置树形 CRDT,预留 Yjs 适配骨架,便于后续替换实现。{ v:1, format:'nexus-collab-v1' }头,未知版本拒绝;维护 stable node-id ↔ 偏移索引。test/convergence.sim.mjs零依赖可运行 —— 2320 次操作 / 最多 12 客户端 / 20 种乱序投递,文本哈希与偏移映射哈希全部一致(与投递顺序无关的交换律/确定性)。authorize(roomId)异步鉴权钩子由宿主实现。实际完成范围(透明声明)
node_modules且网络受限,未执行pnpm install/build/test全量验证;convergence.sim.mjs已用 Node 单独跑通。建议合入前在 CI 或本地补跑。如何测试
合规性