@forsion/extend 0.4.0 → 0.5.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # 更新日志
2
2
 
3
+ ## 0.5.1 — 2026-09-29
4
+
5
+ - 从桌面端打开账号中心或充值页时,网址里不再带登录令牌,改为一次性交接码:60 秒内有效、只能用一次,不会留在浏览器历史里。需要服务端更新后才生效,在这之前照旧打开。
6
+ - 兑换额度重置卡时,如果单价刚好被调整,不会按新价格直接扣积分:页面会提示并显示新价格,请确认后再兑换。
7
+ - 用量页的消耗百分比与网页个人中心写法一致(例如 3%,不再写成 3.0%)。
8
+ - 附上随包带的第三方开源组件的许可声明。
9
+
10
+ - Opening the account center or the top-up page from the desktop no longer puts your sign-in token in the address. A one-time handoff code is used instead: it works once, expires after 60 seconds and doesn't stay in your browser history. This takes effect once the server is updated; until then these pages open as before.
11
+ - If the reset card price changes while you're exchanging points, you are no longer charged the new price right away: the page tells you, shows the new price and asks you to confirm again.
12
+ - Usage percentages are written the same way as on the web account center (for example 3%, not 3.0%).
13
+ - Adds the license notices for the open-source components bundled in this package.
14
+
15
+ ## 0.5.0 — 2026-09-29
16
+
17
+ - 设置里新增「Forsion 云端」,和账号有关的事在桌面端就能办完:
18
+ - 账号:头像、昵称、绑定的手机和邮箱、会员档位与到期日,以及这台电脑上登录过的账号;
19
+ - 额度与积分:今日和本周的 AI 额度、额度重置卡(使用和用积分兑换)、积分余额与充值、后台额度(Muse 与自动化使用)、邀请码和兑换码;
20
+ - 安全:绑定或更换手机和邮箱、修改密码、退出所有设备、注销账号;
21
+ - 用量记录:最近 7、30、90 天的请求次数、成功率和 AI 额度消耗;
22
+ - 反馈:提交问题和建议,并直接在桌面上看到回复。
23
+ - AI 额度统一只显示剩余百分比,进度条按剩余填充;额度为 0 时显示 0%,不再误显示成「不限」。
24
+ - 改密码的规则与服务端一致并写在界面上;只绑定了邮箱也能用验证码改密码,也可以直接用当前密码修改。
25
+ - 充值积分会直接打开充值页;已下线的周重置卡不再出现。
26
+ - 需要较新的 Forsion 桌面端,这些页面才会出现;旧桌面端上本包不显示它们,账号设置照旧用桌面端自带的那一页。
27
+
28
+ - Settings now has a Forsion Cloud section, so you can take care of your account without leaving the desktop app:
29
+ - Account: your photo, nickname, linked phone and email, membership tier and expiry date, and the accounts you've signed in with on this computer;
30
+ - Quota & points: today's and this week's AI quota, quota reset cards (use one or exchange points for more), your points balance and top-ups, the background quota used by Muse and automations, invite codes and redemption codes;
31
+ - Security: link or change your phone and email, change your password, sign out everywhere, delete your account;
32
+ - Usage: requests, success rate and AI quota used over the last 7, 30 or 90 days;
33
+ - Feedback: send issues and suggestions, and read replies right in the app.
34
+ - AI quota is always shown as the percentage left, and the bars show what remains; a quota of 0 now reads 0% instead of Unlimited.
35
+ - Password rules match the server and are listed on screen. You can change your password with a verification code even if you only linked an email, or directly with your current password.
36
+ - Buying points opens the points page directly, and the retired weekly reset card no longer appears.
37
+ - These pages need a newer Forsion Desktop build. On older desktops this package doesn't show them, and account settings stay on the page the desktop already has.
38
+
3
39
  ## 0.4.0 — 2026-09-28
4
40
 
5
41
  - 笔记的云端同步与协作从 Forsion 本体搬入本包:云端笔记库镜像、按条目同步、与我共享、页面分享 / 发布 / 在线成员,行为与之前一致。没装本包的桌面端不再显示云端笔记库、云同步与分享入口。
package/README.md CHANGED
@@ -1,27 +1,47 @@
1
1
  # Forsion Extend
2
2
 
3
- Forsion 桌面端里**跟云端账号打交道的那一半**:账号登录 / 登出 / 切换与登录态续期(0.3 起),个人中心 / 会员页入口、额度视图与重置卡、后台额度转换、反馈中心提交,插件以当前账号身份调 Forsion 云端 API 的通用接缝 `cloud:fetch`,Forsion Connect(0.2 起)—— Coding Space 项目发布、应用商店上架申请、预览态 AI 代理(预览页的 `window.forsion` SDK 与 `/__forsion/*` 云端代理),本地库远程同步的 Forsion 云端后端(0.3 起),以及笔记的云端同步与协作(0.4 起)—— 云端笔记库镜像、按条目同步、与我共享、页面分享 / 发布 / 在线成员。它是一个 Forsion 捆绑包(manifest.json + 渲染半身 + 主进程半身),编译产物以 npm 包 `@forsion/extend` 发布。
3
+ Forsion Extend 是 Forsion 桌面端内置的扩展,负责和你的 Forsion 云端账号有关的一切。它随桌面端一起安装,在后台自动更新,不需要单独下载或设置。
4
4
 
5
- The **cloud-account half of Forsion Desktop**: account sign-in, sign-out, switching and staying signed in (since 0.3), the account center and membership page shortcuts, the quota view and reset cards, background quota conversion, feedback submission, `cloud:fetch` (the shared seam plugins use to call the Forsion cloud API as the signed-in account), Forsion Connect (since 0.2): Coding Space project publishing, app store listing requests, and the preview-mode AI proxy (the `window.forsion` SDK served to preview pages plus the `/__forsion/*` cloud proxy), the Forsion cloud backend for remote sync of the local vault (since 0.3), and cloud sync and collaboration for notes (since 0.4): the cloud vault mirror, per-item sync, shared-with-me, page sharing / publishing / presence. It is a Forsion bundle (manifest.json + a renderer half + a main-process half), published as the npm package `@forsion/extend`.
5
+ ## 它能做什么
6
6
 
7
- ## Forsion 桌面端怎么装载它 / How Forsion Desktop loads it
7
+ - **登录与账号**:登录 Forsion,在这台电脑登录过的账号之间切换,退出登录。登录状态会自动续期,经常使用就不用反复登录。
8
+ - **设置里的「Forsion 云端」**:
9
+ - **账号**:头像、昵称、绑定的手机和邮箱,会员档位与到期日,这台电脑上的账号。
10
+ - **额度与积分**:今日和本周还剩多少 AI 额度,额度重置卡,积分余额与充值,后台额度(Muse 与自动化使用),邀请码和兑换码。
11
+ - **安全**:绑定或更换手机和邮箱,修改密码,退出所有设备,注销账号。
12
+ - **用量记录**:最近 7、30、90 天的请求次数、成功率和 AI 额度消耗。
13
+ - **反馈**:提交问题和建议,在桌面上查看回复。
14
+ - **笔记云同步与协作**:云端笔记库、按条目同步、与我共享,以及页面分享、发布和在线成员。
15
+ - **Forsion Connect**:把 Coding Space 里的项目发布成网页、申请上架应用商店;预览项目时也能用上 Forsion 的 AI。
8
16
 
9
- Forsion 桌面端把本包当**内置捆绑包**:随桌面安装包带一份,启动时播种进 `<home>/plugins/forsion-extend/`,之后由 npm 更新器在后台下载新版、下次启动换上。带主进程半身的包比普通捆绑包多一道闸:播种 / 换版前,桌面端用钉在自己代码里的 ed25519 公钥核对包内 `SIGNATURE`(每个打包文件的 sha256 + 签名),验不过的那份不换、不载;验过后 `import()` `dist/desktop.mjs`,调用 `registerCloud(host)` 注册 8 个云端账号 IPC 通道;桌面端够新(提供对应的宿主接缝)时再注册 7 个 `connect:*` 通道与预览挂钩(0.2)、5 个 `auth:*` 登录态通道与远程同步的 penzor 后端(0.3)、11 个 `amadeus:sync|entry-sync|collab:*` 通道与云同步引擎(0.4,宿主在笔记库建好后再调本包登记的工厂),旧桌面端上缺接缝的那块自动跳过、其余功能照常。桌面端的界面按这些通道是否存在显示或隐藏:没装本包就没有账号卡、Forsion 设置页、登录入口、「Forsion 云端」同步后端、云端笔记库与分享入口。
17
+ ## 设置在哪里
10
18
 
11
- Forsion Desktop treats this package as a **built-in bundle**: a copy ships inside the desktop installer, is seeded into `<home>/plugins/forsion-extend/` on startup, and the npm updater downloads newer versions in the background and switches to them on the next launch. A bundle with a main-process half has one extra gate: before seeding or switching, the desktop checks the in-package `SIGNATURE` (sha256 of every packed file plus an ed25519 signature) against the public key pinned in its own code; a copy that fails is neither installed nor loaded. Once verified, the desktop `import()`s `dist/desktop.mjs` and calls `registerCloud(host)`, which registers the 8 cloud-account IPC channels and, when the desktop is new enough to provide the matching host seam, the 7 `connect:*` channels plus the preview hooks (0.2) the 5 `auth:*` sign-in channels plus the penzor remote-sync backend (0.3), and the 11 `amadeus:sync|entry-sync|collab:*` channels plus the cloud sync engine (0.4; the desktop calls the factory this package registers once the vault is ready); on older desktops the parts without a seam are skipped and the rest works as before. The desktop shows or hides its UI by whether these channels exist: without this package there is no account card, Forsion settings page, sign-in entry point, "Forsion cloud" sync backend, cloud vault or sharing entry point.
19
+ 打开「设置 → Forsion 云端」:左侧是账号、额度与积分、安全、用量记录、反馈这几页,同步与云端地址也在这里。云空间、AI 大脑、投稿和主题在网页个人中心管理,账号页底部有「在浏览器中打开个人中心」。
12
20
 
13
- | 包内文件 / file | 用途 / role |
14
- |---|---|
15
- | `manifest.json` | 捆绑包清单:`id` = `forsion-extend`,`main` = `dist/main.js` / bundle manifest |
16
- | `dist/main.js` | 渲染半身(iife,宿主 `new Function('ctx', code)` 装载;目前为空)/ renderer half, currently empty |
17
- | `dist/desktop.mjs` | 主进程半身(ESM,验签后 `import()`)/ main-process half, imported after signature check |
18
- | `SIGNATURE` | 包内签名 / in-package signature |
19
- | `CHANGELOG.md` | 显示在桌面「设置 → 插件」详情页 / shown in Settings → Plugins |
21
+ 没看到「Forsion 云端」?到「设置 → 插件」确认 Forsion Extend 已启用(启用或停用后要重启 Forsion 才生效)。较早版本的 Forsion 桌面端会把这几页显示在插件详情页里。
20
22
 
21
- 这个包不能单独安装或运行:它只在 Forsion 桌面端里作为内置包使用,更新由桌面端自己完成。
23
+ ---
22
24
 
23
- This package is not installed or run on its own: it is used only as a built-in bundle inside Forsion Desktop, which updates it by itself.
25
+ Forsion Extend is built into Forsion Desktop and takes care of everything to do with your Forsion cloud account. It is installed with the desktop app and updates itself in the background, so there is nothing to download or set up.
26
+
27
+ ## What it does
28
+
29
+ - **Signing in**: sign in to Forsion, switch between the accounts you've used on this computer, and sign out. Your sign-in renews itself, so regular use doesn't keep asking you to sign in.
30
+ - **Forsion Cloud in Settings**:
31
+ - **Account**: your photo, nickname, linked phone and email, membership tier and expiry date, and the accounts on this computer.
32
+ - **Quota & points**: how much AI quota is left today and this week, quota reset cards, your points balance and top-ups, the background quota used by Muse and automations, invite codes and redemption codes.
33
+ - **Security**: link or change your phone and email, change your password, sign out everywhere, delete your account.
34
+ - **Usage**: requests, success rate and AI quota used over the last 7, 30 or 90 days.
35
+ - **Feedback**: send issues and suggestions, and read replies in the app.
36
+ - **Note sync and collaboration**: the cloud vault, per-item sync, shared with me, and page sharing, publishing and presence.
37
+ - **Forsion Connect**: publish Coding Space projects as web pages and apply for an app store listing; project previews can use Forsion's AI too.
38
+
39
+ ## Where to find it
40
+
41
+ Open Settings → Forsion Cloud. The pages on the left are Account, Quota & points, Security, Usage and Feedback, and sync and the cloud address live there too. Cloud storage, AI Brain, submissions and themes are managed in the web account center; the Account page has a link that opens it in your browser.
42
+
43
+ Don't see Forsion Cloud? Check that Forsion Extend is turned on under Settings → Plugins (turning it on or off takes effect after you restart Forsion). Older versions of Forsion Desktop show these pages on the plugin's detail page instead.
24
44
 
25
45
  ## License
26
46
 
27
- 专有授权,见 [LICENSE](./LICENSE):仅允许作为 Forsion 的一部分使用与再分发。Proprietary, see [LICENSE](./LICENSE): use and redistribution only as part of Forsion.
47
+ 专有授权,见 [LICENSE](./LICENSE):仅允许作为 Forsion 的一部分使用与再分发。Proprietary, see [LICENSE](./LICENSE): use and redistribution only as part of Forsion.
package/SIGNATURE CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "alg": "ed25519",
3
3
  "files": {
4
- "CHANGELOG.md": "a921a09c2e56c769b606b4aa874e45b55239240c36545040b0d20185f8a1c8b7",
4
+ "CHANGELOG.md": "86bbe37d56b75be32737d09382f6ab6c1d143e4f23a8d40aaaf04e69b8b16fd5",
5
5
  "LICENSE": "5594544ee08011ed5785ee26410f1f2ef005f66e9283833e8d435e34c10de1ed",
6
- "README.md": "6ab347b4b5a411ea75b75fec260b858ef8ccd9a1f81627de6cb75b639ae0fca7",
7
- "dist/desktop.mjs": "3ec5bd8dd43eda39b84fc9b324e17100d39829dda19f560de89fabccccd49c21",
8
- "dist/main.js": "8669f048a0e9a5d47dc657306109ab437da6683ad925fbd6a451aef72542a787",
9
- "manifest.json": "369c6e17ff9b71180432aa5a0d7ae9c4686072a2c8ddea1ba8f0e412f6f8bb41",
10
- "package.json": "de8d907c29ff22fcab9f55443d56b47a48a4c328b18f3c94032b0e33db92d641"
6
+ "README.md": "a17ef4b3c8adefcbee2efda0c1bbca1fc8aa63dce323295708c321a9d322a80c",
7
+ "dist/THIRD_PARTY_NOTICES.md": "64dcf02385589a257abb72d1b5594a595359919c355e568a9ed5699678672e5e",
8
+ "dist/desktop.mjs": "05af5ca236ef768d6b9cbb8016e5601d4af5ae52e48d786e42009a513aa9c03a",
9
+ "dist/main.js": "72d709f10781063c74cdf2fc5e8965b5a34ac3e2e8274d27dc96f9176e2fd67c",
10
+ "manifest.json": "151f9cc06ceac1c87829fc09bc6661399010db56e6ee708437ebfa922dca3ad8",
11
+ "package.json": "32a08327f0ab617a0569c32a508bb6e2c5feb28a05badb9f2880b92d8d8e55fc"
11
12
  },
12
- "sig": "PHM6fcyaC/JUR3nhDcPQDJ/vh6ddh8+7tM/SCiOec2UtmkKyqJrkbphWp5dUPWsACEAoQrfM6wJnbkaAcPqgBA=="
13
+ "sig": "gqeF9eL3CPkSu252xMuzxINQUq7+X9rmiB9X5ST+xBEbIIO4dDT6HsYfOQ75t8nhaQlBpZYnMkUi4jk6mm7WCQ=="
13
14
  }
@@ -0,0 +1,144 @@
1
+ # Third-party notices
2
+
3
+ dist/main.js and dist/desktop.mjs bundle the following packages, each under the MIT License.
4
+
5
+ ## preact 10.29.8
6
+
7
+ ```
8
+ The MIT License (MIT)
9
+
10
+ Copyright (c) 2015-present Jason Miller
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+ ```
30
+
31
+ ## uqr 0.1.3
32
+
33
+ ```
34
+ MIT License
35
+
36
+ Copyright (c) Project Nayuki
37
+ Copyright (c) 2023 Anthony Fu <https://github.com/antfu>
38
+
39
+ Permission is hereby granted, free of charge, to any person obtaining a copy
40
+ of this software and associated documentation files (the "Software"), to deal
41
+ in the Software without restriction, including without limitation the rights
42
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
43
+ copies of the Software, and to permit persons to whom the Software is
44
+ furnished to do so, subject to the following conditions:
45
+
46
+ The above copyright notice and this permission notice shall be included in all
47
+ copies or substantial portions of the Software.
48
+
49
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
50
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
51
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
52
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
53
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
54
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
55
+ SOFTWARE.
56
+ ```
57
+
58
+ ## chokidar 5.0.0
59
+
60
+ ```
61
+ The MIT License (MIT)
62
+
63
+ Copyright (c) 2012 Paul Miller (https://paulmillr.com), Elan Shanker
64
+
65
+ Permission is hereby granted, free of charge, to any person obtaining a copy
66
+ of this software and associated documentation files (the “Software”), to deal
67
+ in the Software without restriction, including without limitation the rights
68
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
69
+ copies of the Software, and to permit persons to whom the Software is
70
+ furnished to do so, subject to the following conditions:
71
+
72
+ The above copyright notice and this permission notice shall be included in
73
+ all copies or substantial portions of the Software.
74
+
75
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
76
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
77
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
78
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
79
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
80
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
81
+ THE SOFTWARE.
82
+ ```
83
+
84
+ ## readdirp 5.1.1
85
+
86
+ ```
87
+ MIT License
88
+
89
+ Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com)
90
+
91
+ Permission is hereby granted, free of charge, to any person obtaining a copy
92
+ of this software and associated documentation files (the "Software"), to deal
93
+ in the Software without restriction, including without limitation the rights
94
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
95
+ copies of the Software, and to permit persons to whom the Software is
96
+ furnished to do so, subject to the following conditions:
97
+
98
+ The above copyright notice and this permission notice shall be included in all
99
+ copies or substantial portions of the Software.
100
+
101
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
102
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
103
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
104
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
105
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
106
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
107
+ SOFTWARE.
108
+ ```
109
+
110
+ ## node-diff3 3.2.1
111
+
112
+ ```
113
+ ### The MIT License (MIT)
114
+
115
+ diff function extracted from Project Synchrotron.
116
+
117
+ For more detail please visit:
118
+ - https://leastfixedpoint.com/tonyg/kcbbs/projects/synchrotron.html
119
+ - https://github.com/tonyg/synchrotron
120
+
121
+ Copyright (c) 2006, 2008 Tony Garnock-Jones &lt;tonyg@lshift.net&gt;<br/>
122
+ Copyright (c) 2006, 2008 LShift Ltd. &lt;query@lshift.net&gt;<br/>
123
+ Copyright (c) 2019-2026 Bryan Housel &lt;bhousel@gmail.com&gt;<br/>
124
+
125
+ Permission is hereby granted, free of charge, to any person
126
+ obtaining a copy of this software and associated documentation files
127
+ (the "Software"), to deal in the Software without restriction,
128
+ including without limitation the rights to use, copy, modify, merge,
129
+ publish, distribute, sublicense, and/or sell copies of the Software,
130
+ and to permit persons to whom the Software is furnished to do so,
131
+ subject to the following conditions:
132
+
133
+ The above copyright notice and this permission notice shall be
134
+ included in all copies or substantial portions of the Software.
135
+
136
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
137
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
138
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
139
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
140
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
141
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
142
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
143
+ SOFTWARE.
144
+ ```