@celljs/ta-rooms 0.0.0-stage → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +23 -0
- package/README.md +22 -2
- package/package.json +48 -4
- package/web/index.js +1932 -0
package/README.en.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Cell - Ta Rooms
|
|
2
|
+
|
|
3
|
+
A pi package that comes with Ta (on by default; Settings → Extensions turns it off): rooms shared with other Ta. The design is in [docs/design/ta-link.md](../../docs/design/ta-link.md), section 3.
|
|
4
|
+
|
|
5
|
+
The rooms themselves are the Ta service's (`TaRoomServer`, `pi.rooms` for web extensions); this package is what the user sees of them:
|
|
6
|
+
|
|
7
|
+
- **The Rooms page** (Discover → Rooms), as a messenger lists its chats: who asks to join on top; a row for each room (the faces of its members, its name, the time, who said the last thing and what, an amber dot for what you have not read); your Ta friends and your name in rooms under them. The + of its head: a new room, join by a link, scan a code, your name. The page knows no extension: a room an extension made shows the icon and the name of its page (the Town).
|
|
8
|
+
- **Group chat**: on a computer or a tablet beside the list; on a phone, pushed over it (back in the head or a swipe from the left edge). Every room has one, the Town's too: others on the left, you on the right, and above it, for a room of an extension, Open Town. What is said is kept in the shared state of the room, for those who come later; each member writes keys of its own alone, so nobody speaks as another.
|
|
9
|
+
- **Web guests**: one without Ta who opens a link that invites in a browser asks to join there; the dialog of asks and the members say so (Web guest). Let in, they only chat, and are no Ta friend.
|
|
10
|
+
- **Members of the room** (··· of the chat, in the workbench): who is in it and online, invite and take out (the owner), open its page, your name, and leave or close the room.
|
|
11
|
+
- **Asking to join**: when someone asks to join a room of yours by its link or code, a dialog says whether they are a Ta friend or new, for you to let them in or refuse. Asks that came while you were away are shown when Ta opens.
|
|
12
|
+
- **Links that invite**: it opens `https://<relay>/r#…` links (clicked, scanned or pasted in Quick open), asking you first, and saying that your name goes to the owner; once let in, you are told, and a room you just asked to join opens its page (the Ta town).
|
|
13
|
+
- **Invite**: the owner gets the link and its QR code, to copy, send or make anew (the old one stops working).
|
|
14
|
+
|
|
15
|
+
## Safety
|
|
16
|
+
|
|
17
|
+
- A link or a code only asks to join: the owner lets one in, in their own Ta; neither a double nor a tool can say yes for them.
|
|
18
|
+
- Messages, the shared state and the roster of a room are signed and sealed on the members' computers before they pass the relay, which sees ciphertext and ids of members of one room each.
|
|
19
|
+
- The keys of your identity (`identity.json`), of your rooms (`rooms.json`) and your friends (`friends.json`) are in the agent directory, readable by you alone.
|
|
20
|
+
|
|
21
|
+
## Development
|
|
22
|
+
|
|
23
|
+
`bun run build` compiles and bundles `web/index.js`.
|
package/README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Cell - Ta Rooms
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Ta 自带的 pi 包(默认开启,可在 设置 → 扩展 关闭):和别人的 Ta 共用的房间。设计记录见 [docs/design/ta-link.md](../../docs/design/ta-link.md) 第 3 节。
|
|
4
|
+
|
|
5
|
+
房间本身由 Ta 服务持有(`TaRoomServer`,Web 扩展的 `pi.rooms`),这个包只负责界面:
|
|
6
|
+
|
|
7
|
+
- **房间页**(发现 → 房间):照微信的会话列表。待处理的加入申请在最上面;每个房间一行(成员拼图头像、名字、时间、"谁:最后一句",有新消息时头像角上有黄点);下面是 Ta 好友和你在房间里的名字。顶栏 + 号:新建房间、用邀请链接加入、扫一扫、改名字。房间页不认识具体扩展:扩展建的房间显示它页面的图标和名字(如"小镇")。
|
|
8
|
+
- **群聊**:电脑和平板上列表和群聊左右并排,手机上点房间推入群聊(顶栏返回或左边缘右滑回到列表)。每个房间都有群聊,小镇的房间也是:别人在左、自己在右,扩展建的房间上方有"打开小镇"。聊天记录存在房间的共享状态里,后来的人也看得到;每人只写自己的键,谁也不能冒充别人。
|
|
9
|
+
- **网页访客**:没装 Ta 的人在浏览器里打开邀请链接,也能申请加入;申请框和成员列表里标着"网页访客"。进来后只能聊天,不会成为 Ta 好友。
|
|
10
|
+
- **房间成员**(群聊右上角 ···,在右侧工作台打开):成员与在线状态、邀请和移出(房主)、打开小镇、我的名字,以及退出或解散房间。
|
|
11
|
+
- **加入申请**:有人用邀请链接或扫码申请加入你的房间时弹出确认框,写明对方是 Ta 好友还是新朋友,由你同意或拒绝。离线期间收到的申请,下次打开 Ta 时提示。
|
|
12
|
+
- **邀请链接**:认领 `https://<中继>/r#…` 链接(点击、扫码、在快捷打开里粘贴)。先问你是否申请加入、会把你的名字发给房主;房主同意后提示"已加入",刚申请过的房间自动打开它的页面(如 Ta 小镇)。
|
|
13
|
+
- **邀请框**:房主点"邀请"看到链接和二维码,可复制、发送或换一个链接(旧链接作废)。
|
|
14
|
+
|
|
15
|
+
## 安全
|
|
16
|
+
|
|
17
|
+
- 链接和扫码只能发出申请,只有房主本人在界面上同意才能进;分身和工具都不能替你同意。
|
|
18
|
+
- 房间里的消息、共享状态和成员名单都在成员的电脑上签名、加密后才经过中继,中继只看到密文和每个房间各自的随机成员 id。
|
|
19
|
+
- 身份密钥(`identity.json`)、房间密钥(`rooms.json`)和好友(`friends.json`)存在 agent 目录,只有你自己可读。
|
|
20
|
+
|
|
21
|
+
## 开发
|
|
22
|
+
|
|
23
|
+
`bun run build`:编译并打包 `web/index.js`。
|
package/package.json
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-rooms",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "4.11.0",
|
|
4
|
+
"description": "A pi package for Ta: rooms shared with other Ta through the relay, end to end: who asks to join and the owner's answer, your rooms and their members, your Ta friends, and links that invite",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pi-package"
|
|
7
|
+
],
|
|
8
|
+
"homepage": "https://github.com/cellbang/cell",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/cellbang/cell/issues"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/cellbang/cell.git"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"files": [
|
|
18
|
+
"web",
|
|
19
|
+
"!**/*.map"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc -b && bun build web-src/index.tsx --format esm --target browser --outfile web/index.js",
|
|
23
|
+
"clean": "rm -rf lib web *.tsbuildinfo",
|
|
24
|
+
"test": "bun test ./lib",
|
|
25
|
+
"watch": "tsc -b -w --preserveWatchOutput"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@celljs/ta-protocol": "4.11.0",
|
|
29
|
+
"@celljs/ta-relay": "4.11.0",
|
|
30
|
+
"@celljs/ta-web": "4.11.0",
|
|
31
|
+
"@types/react": "^19.3.0"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"pi": {
|
|
37
|
+
"title": {
|
|
38
|
+
"en": "Rooms",
|
|
39
|
+
"zh-CN": "房间"
|
|
40
|
+
},
|
|
41
|
+
"summary": {
|
|
42
|
+
"en": "Rooms shared with other Ta, end to end: let in who asks, see who is there, invite by a link or a QR code, and your Ta friends.",
|
|
43
|
+
"zh-CN": "和别人的 Ta 共用的房间,端到端加密:处理加入申请、查看成员和在线状态、用链接或二维码邀请,以及你的 Ta 好友。"
|
|
44
|
+
},
|
|
45
|
+
"icon": "Users",
|
|
46
|
+
"web": [
|
|
47
|
+
"./web/index.js"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|