@celljs/ta-sync 4.24.0 → 4.25.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 +9 -7
- package/README.md +9 -7
- package/host/index.mjs +571 -35
- package/package.json +4 -4
- package/web/index.js +559 -86
package/README.en.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cell - Ta Sync
|
|
2
2
|
|
|
3
|
-
A pi package that comes with Ta (on by default; turn it off in Settings → Extensions): sync. Your settings, instructions, skills and extensions the same on each of your computers, **without an account**: the computers share a
|
|
3
|
+
A pi package that comes with Ta (on by default; turn it off in Settings → Extensions): sync. Your settings, instructions, skills and extensions the same on each of your computers, **without an account**: the computers share a group chat of the relay that only they are in, sealed end to end, which the relay cannot read. Design record: [docs/design/ta-sync.md](../../docs/design/ta-sync.md).
|
|
4
4
|
|
|
5
5
|
- **Turn it on**: Settings → Sync, Turn on sync. This computer adds the others.
|
|
6
6
|
- **Add a computer**: Add a device gives a link and a QR code (7 days); in Ta on the other computer, Join a sync, paste the link or scan the code; back on the first computer, Allow. The new computer takes what the sync has, keeping aside what it had.
|
|
@@ -9,11 +9,13 @@ A pi package that comes with Ta (on by default; turn it off in Settings → Exte
|
|
|
9
9
|
- **Conflicts**: settings merge key by key; a file changed on both takes the later. What a sync replaced or deleted here is kept in `sync/replaced/<time>/` of the agent directory, and the page says so.
|
|
10
10
|
- **Stop**: a computer that stops only stops itself; when the one that turned sync on stops, every computer does. Each keeps what it has. That computer can also remove another.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Conversations are synced too, but only through a folder of a drive, WebDAV or S3 (never a relay or git; section 10 of the design): a new computer that joins such a sync has its conversations moved in.
|
|
13
|
+
|
|
14
|
+
Never synced: sign-ins (`auth.json`), the identity and keys of group chats, the state of a device or of a directory.
|
|
13
15
|
|
|
14
16
|
## Sync through a folder of a cloud drive (no relay)
|
|
15
17
|
|
|
16
|
-
In Settings →
|
|
18
|
+
In Settings → Sync → Where it syncs, iCloud Drive (or another drive; or Drive folder and a `~/…` path) makes sync go through that folder, **with no relay at all**: the drive keeps the folder the same on your computers, and what Ta writes there is sealed, names included, so the drive sees nothing of it.
|
|
17
19
|
|
|
18
20
|
- Turning on and joining: once on, Add a device gives a `ta-sync://folder#…` link; on the other computer, Join a sync and paste it, nobody need allow it. The link holds the key of the sync for good: show it only to your own computers. The other computer needs the same folder of the drive.
|
|
19
21
|
- How fast depends on the drive bringing the files (iCloud often takes seconds to minutes); Ta watches the folder and looks every 30 seconds too.
|
|
@@ -21,20 +23,20 @@ In Settings → Relays, Sync in iCloud Drive (or another drive; or type a `~/…
|
|
|
21
23
|
|
|
22
24
|
## Sync through WebDAV, S3 or a git repository of your own
|
|
23
25
|
|
|
24
|
-
In Settings →
|
|
26
|
+
In Settings → Sync → Where it syncs, WebDAV, S3 or Git: fill in the address and keys (Jianguoyun, Nextcloud, a NAS, AWS, Cloudflare R2, MinIO, a private repository on GitHub or Gitee…), and once Ta wrote there it syncs there, **with no relay**, content and names sealed first. The `ta-sync://store#…` link of Add a device carries the sign-in of the store, so another computer joins by pasting it: show it only to your own computers. The built-in extension `@celljs/ta-sync-cloud` adds both.
|
|
25
27
|
|
|
26
28
|
## Move to another computer
|
|
27
29
|
|
|
28
|
-
On a new computer or after a reinstall, move everything at once, **the conversations too**, as WeChat moves a chat history: Settings → Move
|
|
30
|
+
On a new computer or after a reinstall, move everything at once, **the conversations too**, as WeChat moves a chat history: Settings → Sync → Move at once.
|
|
29
31
|
|
|
30
32
|
- **Over your network**: on the old computer choose what goes and press Start; a QR code shows. On the new one, under To this computer, pick it among the computers nearby, or paste its link, or scan the code with the Ta app; both show the same six digits, and once they match you Allow it on the old computer. Sealed end to end, never through the relay, as fast as your network.
|
|
31
33
|
- **Backup file**: when the two are on different networks, or to keep a copy, back up to one `.tabackup` file (in Downloads by default) and restore it on the new computer. A password seals it; sign-ins and the identity go only with one.
|
|
32
34
|
- **How it merges**: conversations the new computer has stay, never doubled; settings merge key by key, the old computer's winning; the directories of conversations and the paths in the data of extensions become the new computer's. What was replaced is kept in `sync/replaced/<time>/`.
|
|
33
|
-
- **Identity and
|
|
35
|
+
- **Identity and group chats** (off by default): who you are in group chats, the group chats and your friends go too, so others still see you on the new computer and nobody invites you again. Group chats the new computer was in keep its own identity. Whoever has your identity can pass for you: a backup file needs a password for it.
|
|
34
36
|
|
|
35
37
|
## The same you on several computers
|
|
36
38
|
|
|
37
|
-
Turn on Identity and
|
|
39
|
+
Turn on Identity and group chats in device sync (off by default, asked first): your computers are one identity in group chats, with the same group chats, friends and permissions of your double. When someone asks your double, one computer answers, the one you are at first. The identity of the computer that turned it on first holds; group chats a later one was in keep the identity it joined them with. See `docs/design/ta-sync.md` 9.
|
|
38
40
|
|
|
39
41
|
## Data of extensions that goes with the user
|
|
40
42
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cell - Ta Sync
|
|
2
2
|
|
|
3
|
-
Ta 自带的 pi 包(默认开启,可在 设置 → 扩展
|
|
3
|
+
Ta 自带的 pi 包(默认开启,可在 设置 → 扩展 关闭):设备同步。让你的每台电脑都有同样的设置、指令、技能和扩展,**不用登录账号**:几台电脑在中继上共用一个只有它们自己的群聊,内容端到端加密,中继读不到。设计记录见 [docs/design/ta-sync.md](../../docs/design/ta-sync.md)。
|
|
4
4
|
|
|
5
5
|
- **开启**:设置 → 设备同步,点"开启同步"。这台电脑负责添加设备。
|
|
6
6
|
- **添加电脑**:点"添加设备"得到链接和二维码(7 天有效);在另一台电脑的 Ta 里点"加入已有的同步",粘贴链接或扫码;回到第一台电脑点"同意"。新电脑以已有的同步为准,原有内容留底。
|
|
@@ -9,11 +9,13 @@ Ta 自带的 pi 包(默认开启,可在 设置 → 扩展 关闭):设备
|
|
|
9
9
|
- **冲突**:设置按键合并;同一个文件两边都改了,以较新的为准。被覆盖或删除的本机内容保存在 agent 目录的 `sync/replaced/<时间>/`,同步页上有提示。
|
|
10
10
|
- **停止**:一台电脑停止只影响它自己;开启同步的电脑停止,所有电脑都停止。各自保留现有内容。开启同步的电脑可以移除别的电脑。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
对话只在经网盘文件夹、WebDAV、S3 同步时一起同步(中继和 git 不带,设计记录第 10 节):新电脑加入这样的同步,就等于把对话迁了过来。
|
|
13
|
+
|
|
14
|
+
不同步:登录凭据(`auth.json`)、身份与群聊密钥、按设备或按目录的界面状态。
|
|
13
15
|
|
|
14
16
|
## 经网盘文件夹同步(不经过中继)
|
|
15
17
|
|
|
16
|
-
在 设置 →
|
|
18
|
+
在 设置 → 设备同步 → 同步存在哪 里选 iCloud Drive(或别的网盘,也可以点"网盘文件夹"填 `~/…` 路径),设备同步就改为经这个文件夹进行,**完全不经过中继**:网盘负责把文件夹在你的几台电脑间保持一致,Ta 写进去的内容和文件名都先加密,网盘看不到。
|
|
17
19
|
|
|
18
20
|
- 开启和加入:开启同步后点"添加设备"得到 `ta-sync://folder#…` 链接,在另一台电脑上"加入已有的同步"粘贴即可,不需要谁同意;链接里有同步密钥且长期有效,只给自己的电脑。另一台电脑要能访问网盘里的同一个文件夹。
|
|
19
21
|
- 速度取决于网盘把文件同步过来的快慢(iCloud 常是几秒到几分钟);Ta 监听文件夹变化,另外每 30 秒检查一次。
|
|
@@ -21,20 +23,20 @@ Ta 自带的 pi 包(默认开启,可在 设置 → 扩展 关闭):设备
|
|
|
21
23
|
|
|
22
24
|
## 经自己的 WebDAV、S3 或 git 仓库同步
|
|
23
25
|
|
|
24
|
-
设置 →
|
|
26
|
+
设置 → 设备同步 → 同步存在哪 里点 WebDAV、S3 或 Git,填好地址和密钥(坚果云、Nextcloud、NAS、AWS、Cloudflare R2、MinIO,或 GitHub、Gitee 上的私有仓库都可以),Ta 试写成功后就用它同步,同样**不经过中继**,内容和文件名先加密。"添加设备"给出的 `ta-sync://store#…` 链接里带着存储的登录信息,另一台电脑粘贴就能加入,只发给自己的电脑。这几种存储由内置扩展 `@celljs/ta-sync-cloud` 提供。
|
|
25
27
|
|
|
26
28
|
## 迁移到另一台电脑
|
|
27
29
|
|
|
28
|
-
换电脑或重装时,像微信迁移聊天记录一样一次搬完,**包括对话**:设置 →
|
|
30
|
+
换电脑或重装时,像微信迁移聊天记录一样一次搬完,**包括对话**:设置 → 设备同步 → 一次搬过去。
|
|
29
31
|
|
|
30
32
|
- **局域网直连**:旧电脑选好内容点"开始",出现二维码;新电脑在"迁入到这台电脑"里从附近的电脑中选它,或粘贴链接、用 Ta 手机 App 扫码;两边显示同一串 6 位数字,核对后在旧电脑上点"同意"。端到端加密,不经过中继,速度取决于你的网络。
|
|
31
33
|
- **备份文件**:两台电脑不在同一网络,或者想留一份,就备份成一个 `.tabackup` 文件(默认放在"下载"),带到新电脑上恢复。可以设密码加密;登录凭据和身份只有设了密码才会写进去。
|
|
32
34
|
- **合并方式**:新电脑已有的对话保留,不会重复;设置按键合并,旧电脑的值优先;对话的目录、扩展数据里的路径都换成新电脑的。被替换的原有内容保存在 `sync/replaced/<时间>/`。
|
|
33
|
-
-
|
|
35
|
+
- **身份与群聊**(默认不勾):你在群聊里的身份、所在的群聊和 好友一起带过去,新电脑上别人看到的还是你,不用重新邀请。新电脑原来所在的群聊保留原来的身份。拿到身份的人就能冒充你,所以备份文件必须设密码。
|
|
34
36
|
|
|
35
37
|
## 几台电脑是同一个你
|
|
36
38
|
|
|
37
|
-
设备同步里打开"
|
|
39
|
+
设备同步里打开"身份与群聊"(默认关,打开时会确认):这几台电脑在群聊里是同一个身份,群聊、好友和分身的授权都一样。别人 @ 你的分身时,只由一台回答:优先是你正在用的那台。先打开的电脑的身份为准,后打开的电脑原来所在的群聊保留原来的身份。详见 `docs/design/ta-sync.md` 第 9 节。
|
|
38
40
|
|
|
39
41
|
## 扩展的数据跟着用户走
|
|
40
42
|
|