feat(rooms): Room 建/list/join + membership 持久化 + cwd→room 自动 join (PR5)#192
Open
raysonmeng wants to merge 1 commit into
Open
feat(rooms): Room 建/list/join + membership 持久化 + cwd→room 自动 join (PR5)#192raysonmeng wants to merge 1 commit into
raysonmeng wants to merge 1 commit into
Conversation
按 spec §2.3–2.4 落地协作房间,消费 Store。Room = 一个需求/工作流,跨仓跨人;membership 绑 logical agent id 且持久化(重启不掉)。 - src/room-service.ts:RoomService(Store-backed)。createRoom/getRoom/listRooms;join/leave/ getMembers/getRoomsForAgent/isMember(持久 membership);mapCwd/resolveRoomForCwd(cwd→room, **realpath 归一化** symlink/.. → 同房间,映射存 Store **绝不写仓库标记文件** §2.4); autoJoinByCwd(解析 cwd→room 未入则 join)。 - src/cli/room.ts:abg room create/list + abg join。currentIdentityId(从 <state>/auth-token 解析登录身份);slugify(name→roomId,**支持中文房名**);create 自动 join 创建者 + mapCwd; join 显式加入 + 映射当前 cwd。0700 目录锁(同 auth/broker)。cli.ts 接 room/join。 测试:room-service(create/list/membership/cwd-autojoin/realpath 归一化)、cli-room(全链路 + 中文房名 + 自动 join + 无 token 友好报错)。full check exit 0:1751 pass / 0 fail。 Cross-review:轮 1 thorough 0 真实 issue;主动采纳 3 条 UX 改进(中文房名/create 自动 join/ created-reused 准确);轮 2/轮 3 lean 连续两轮 0 收敛。 Backlog:slugify NFC 归一化 + roomId 长度上限(marginal);broker-subscribe-on-join + MCP join_room = adapter 接线后续 PR;resolveDbPath/0700 在 auth/broker/room 副本可抽 helper(DRY)。 --- feat(rooms): room create/list/join + persistent membership + cwd→room auto-join (PR5) Land collaboration rooms (§2.3–2.4) over the Store. A room spans repos + people; membership binds to the logical-agent id and is persistent. RoomService owns create/list/join/leave/members + the cwd→room map (realpath-normalised, stored in the DB — NEVER a repo marker file, §2.4). CLI: abg room create/list + abg join (create auto-joins the creator + maps cwd; Chinese room names supported). Converged after 1 thorough (0 real) + 2 lean clean rounds. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
3 tasks
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.
概要 / Summary
PR5:落地协作房间(§2.3–2.4),消费 Store。Room = 一个需求/工作流,跨仓跨人;membership 绑 logical agent id 且持久化(重启不掉)。
改动 / Changes
src/room-service.tssrc/cli/room.tsabg room create/list+abg join。从<state>/auth-token解析登录身份;slugify(支持中文房名);create 自动 join + mapCwd;join 显式加入 + 映射 cwd;0700 目录锁测试计划 / Test plan
bun run checkexit 0 → 1751 pass / 0 fail、typecheck 干净、bundle 同步Cross-review
Backlog
broker-subscribe-on-join+ MCPjoin_room= adapter 接线后续 PR(PR6/7);resolveDbPath/0700 在 auth/broker/room 副本可抽 helper(DRY)。🤖 Generated with Claude Code