@forsion/extend 0.10.10 → 0.10.12

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,21 @@
1
1
  # 更新日志
2
2
 
3
+ ## 0.10.12 — 2026-11-25
4
+
5
+ - 商店「会员」页的付费周期多了「自动续费」一格,和月付、季付、年付并排,云端开着自动续费时进来就停在这一格:卡片上是自动续费价,划掉的是原价、写明省多少;格下面可以选每月还是每季扣款。点「开通自动续费」会在浏览器里打开支付页,看完条款、在支付宝确认后才开通。已经开着一份自动续费时,进来停在月付。月付、季付、年付三格是一次性购买,和以前一样。
6
+
7
+ - The Membership page in the store now has an "Auto-renew" option next to Monthly, Quarterly and Yearly, and opens on it when the service offers auto-renew. Cards show the auto-renew price with the regular price struck through and how much you save, and you can choose to be billed every month or every quarter. "Turn on auto-renew" opens the payment page in your browser; it only starts after you review the terms and confirm in Alipay. If auto-renew is already on, the page opens on Monthly. Monthly, Quarterly and Yearly are one-time purchases, as before.
8
+
9
+ ## 0.10.11 — 2026-11-23
10
+
11
+ - 「安全」页可以直接在应用里扫码绑定微信:点「绑定」会出现微信二维码,用手机微信扫一扫并在手机上确认,这里就自动绑好,不用再跳到网页。需要较新的桌面版本和云端支持,不满足时照旧点「去绑定」在网页里完成;扫码框下面也随时可以点「改在浏览器里绑定」。
12
+ - 上传的诊断数据里,同步离线的次数更准了:连着的同步通道短暂断开、马上又连上,不再算作一次离线;离线时的报错按实际原因(服务器出错、登录失效、超时等)分别计数。同步本身和界面都没有变。
13
+ - 「帮助改进 Forsion」开着时,多统计几项次数:额度提示从哪里弹出、点了哪个按钮;装了哪些插件、开了几个(商店和随附插件记插件 ID,本地插件只记个数);对模型回复重新生成、停止、改了重发的次数(只记公开的模型名);第一次运行是否成功。都不含对话内容。
14
+
15
+ - You can now link WeChat right in the app from the Security page: click "Link" to show a WeChat QR code, scan it with WeChat on your phone and confirm there, and linking finishes on its own without opening the web. This needs a newer desktop version and service support; otherwise, "Link" opens the web as before. "Link in your browser instead" is always available under the QR code.
16
+ - In uploaded diagnostics, sync offline counts are more accurate: when the sync connection drops briefly and reconnects right away, it no longer counts as going offline, and errors while offline are counted by their actual cause (server error, expired sign-in, timeout, and so on). Sync itself and the interface are unchanged.
17
+ - With "Help improve Forsion" on, a few more counts are collected: where quota prompts appear and which button was clicked; which plugins are installed and how many are on (plugin IDs for store and bundled plugins, only a count for local plugins); how often model replies are regenerated, stopped, or edited and resent (public model names only); and whether the first run succeeded. None of this includes conversation content.
18
+
3
19
  ## 0.10.10 — 2026-11-19
4
20
 
5
21
  - 桌面端的云笔记镜像目录丢失后,可从云端重新下载笔记。恢复过程中退出应用,下次启动会继续,并保留其他设备已经完成的删除。
package/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  # Forsion Extend
2
2
 
3
- Forsion Extend 是 Forsion 桌面端内置的扩展,负责和你的 Forsion 云端账号有关的一切。它随桌面端一起安装,在后台自动更新,不需要单独下载或设置。
3
+ Forsion Extend 属于 [Forsion](https://forsion.net/zh/)(本地优先的第二大脑工作台),是桌面端内置的扩展,负责和你的 Forsion 云端账号有关的一切。它随桌面端一起安装,在后台自动更新,不需要单独下载或设置。
4
4
 
5
5
  ## 它能做什么
6
6
 
7
7
  - **登录与账号**:登录 Forsion,在这台电脑登录过的账号之间切换,退出登录。登录状态会自动续期,经常使用就不用反复登录。
8
8
  - **设置里的「Forsion 云端」**:
9
9
  - **账号**:头像、昵称、绑定的手机和邮箱,会员档位与到期日,这台电脑上的账号。
10
+ - **安全**(在「账号 → 安全」里):手机、邮箱、密码、微信与 GitHub 绑定、登录设备、注销账号。微信可以直接在这一页扫码绑定;桌面端版本较老、或在手机上时,改为在浏览器里打开网页个人中心绑定。
10
11
  - **微信剪藏助手**(在「账号 → 登录与资料」里,云端开了这个功能才出现):拿一个绑定码,在微信里发给 Forsion 企业微信号完成绑定;之后发给它的链接会剪藏进你云端智库的 Plugins/wechat-helper。可以解绑。
11
12
  - **个人主页**:和网页个人中心是同一张主页。可以改简介和链接、选放上去的作品,换封面和头像框,决定显示哪些模块,给公开页选配色和明暗;可以公开或设回私有,公开后能复制地址、在浏览器里查看。公开页开在网页个人中心的域名上。需要 Forsion 云端 2.3.37 或更新版本。
12
13
  - **额度与积分**:今日和本周还剩多少 AI 额度,额度重置卡,「额度用完后用积分继续」开关,积分余额与充值,后台额度(Muse 与自动化使用),邀请码和兑换码。
@@ -32,13 +33,14 @@ Forsion Extend 是 Forsion 桌面端内置的扩展,负责和你的 Forsion
32
33
 
33
34
  ---
34
35
 
35
- 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.
36
+ Forsion Extend is part of [Forsion](https://forsion.net), the local-first second-brain workbench. It 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.
36
37
 
37
38
  ## What it does
38
39
 
39
40
  - **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.
40
41
  - **Forsion Cloud in Settings**:
41
42
  - **Account**: your photo, nickname, linked phone and email, membership tier and expiry date, and the accounts on this computer.
43
+ - **Security** (under Account → Security): phone, email, password, WeChat and GitHub linking, signed-in devices and account deletion. You can link WeChat by scanning right on this page; on older desktop versions and on phones, it opens the web account center in your browser instead.
42
44
  - **WeChat Helper** (under Account → Sign-in & details; it only appears when the cloud has it turned on): get a binding code and send it to the Forsion WeCom account in WeChat; links you send it afterwards are clipped into Plugins/wechat-helper in your cloud vault. You can unbind.
43
45
  - **Profile**: the same profile as in the web account center. Edit your bio and links, choose which works to feature, change the cover and avatar frame, decide which sections to show, and pick the public page's color scheme and appearance. Make it public or private again; once public you can copy its address or view it in your browser. The public page lives on the web account center's domain. Requires Forsion Cloud 2.3.37 or later.
44
46
  - **Quota & points**: how much AI quota is left today and this week, quota reset cards, the Continue with points switch, your points balance and top-ups, the background quota used by Muse and automations, invite codes and redemption codes.
@@ -62,102 +64,6 @@ Open Settings → Forsion Cloud. The pages on the left are Account, Profile, Quo
62
64
 
63
65
  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.
64
66
 
65
- ## 同步响应验证 / Sync responsiveness
66
-
67
- 同步主进程响应验证 / Sync main-process responsiveness: `npm run check:sync-responsive`。使用隔离的真实 Electron、1.2 万个临时文件和本机 HTTP 夹具,记录渲染层到主进程的最大 IPC 延迟;需要相邻 Genesis desktop 已安装依赖(也可设置 `FORSION_DESKTOP_DIR`)。`-- --baseline` 对照远端 main,只记录不强制延迟预算。
68
-
69
- `npm run check:sync-responsive` runs the sync runtime in an isolated Electron process against 12,000 temporary files and a loopback HTTP fixture, and measures renderer-to-main IPC latency. Install the sibling Genesis desktop dependencies first, or set `FORSION_DESKTOP_DIR`. Use `-- --baseline` to measure origin/main without enforcing the latency budget.
70
-
71
67
  ## License
72
68
 
73
69
  专有授权,见 [LICENSE](./LICENSE):仅允许作为 Forsion 的一部分使用与再分发。Proprietary, see [LICENSE](./LICENSE): use and redistribution only as part of Forsion.
74
-
75
- ## 统一云盘 / Unified drive
76
-
77
- 蓬洲云默认进入「我的云盘」概览,八个来源统一列出。只有「我上传的」接收上传;同步来源只读,普通应用文件保留管理能力,来源声明只读时隐藏修改。插件数据仅展示元信息。统一用量使用服务端 `/storage/ledger`,T2 阶段只提醒,不新增拦截;失败保留并标注上次统计,旧来源限制仍生效。
78
-
79
- Penzor Cloud opens My drive with eight source folders. Uploads go to My uploads; synced sources are read-only, ordinary app files retain management unless the source declares otherwise, and plugin data exposes metadata only. Unified quota is notice-only. Failed refreshes explicitly label the last sample as stale; existing source limits remain in force.
80
-
81
- 验证 / Validation: `npm run test:vitest -- test/vitest/renderer/penzorData.test.ts test/vitest/renderer/penzorState.test.ts test/vitest/renderer/penzorSync.test.ts`. Real desktop acceptance lives in Genesis `desktop/scripts/penzor-space.e2e.cjs`.
82
-
83
- ## Web 与原生手机 / Web and native mobile
84
-
85
- Web 主入口与原生手机复用本包的账号、会员与积分商店、公告和蓬洲云界面。读取当前登录账号已有的云端资料与云盘,不创建另一份手机账号。手机上传交浏览器 `File`,下载交宿主保存;电脑笔记同步开关、本机设备诊断不在手机上注册。Web 仍使用浏览器下载和标签页,手机付款与公告链接使用系统浏览器。
86
-
87
- The Web entry and native mobile reuse Extend's account pages, membership and points store, announcements, and Penzor Cloud. They read the signed-in account's existing cloud data. Mobile uploads use browser `File` objects and downloads use the native host. Desktop note-sync controls and local diagnostics are hidden on mobile. Web keeps its browser downloads/tabs; mobile opens payments and announcement links in the system browser.
88
-
89
- 宿主契约 / Host contract:
90
-
91
- - Web: `window.tangu.unitPage && window.tangu.unitPublicEntry`; mobile: `window.tangu.mobile && window.tangu.extendMobile`. The mobile marker belongs to the bundled, verified Extend loader.
92
- - `ctx.account.status()` returns `{ loggedIn, cloudUrl }`, where `cloudUrl` identifies the account API origin (`https://…/api`). `ctx.account.request(url, init)` accepts absolute same-account `/api/…` URLs, injects authentication in the host, preserves multipart `Blob` bodies and `AbortSignal`, and rejects other origins. Extend never receives the token.
93
- - `window.tangu.onAuthChanged(cb)` fires for sign-in, sign-out and account changes. Extend aborts in-flight requests, clears transfer filenames and directory caches, and ignores old responses. The host must change authentication and notify atomically before another account request can run.
94
- - Mobile `ctx.account.saveDownload(blob, name)` returns `Promise<{ ok: boolean; error?: string }>`; `{ ok: true }` means the host accepted and saved the file. Missing/rejected saving produces a failed transfer. `window.tangu.openExternal(url)` opens the native browser; the existing native `openAccountCenter(section)` is preserved.
95
- - The account adapter's `cloudFetch` and `cloudInvoke` stay private to Extend. They are never assigned to `window.tangu`, so desktop-only host capabilities are not accidentally enabled.
96
-
97
- 验证 / Validation: `npm run typecheck`; `npx vitest run test/vitest/renderer/webEntry.test.ts test/vitest/renderer/webTransfers.test.ts test/vitest/renderer/penzorState.test.ts`. The focused tests cover mobile registration, native browser/save routing, signed-download fallback, active/queued uploads, sign-out and account switches, late quota responses, and nested-folder cancellation.
98
-
99
- ## 目录同步 / Folder sync
100
-
101
- 新版 Genesis 宿主与 Server 配合时,蓬洲云「同步」使用规则表:默认双向同步到云端 `/Forsion/`,子路径可改到 `/Forsion-设备ID/` 或设为不同步。最具体的路径优先;未匹配内容不参与同步。第一次开启和修改范围先预览、再确认。切换目标保留原云端副本,重新选择范围会重新对齐基线,断开的目录不会被当作删除。
102
-
103
- 文件夹使用独立身份跟踪改名,同名目录合并。数据库沿用宿主按行 ID 的合并,文本安全三方合并;无法合并时保留冲突副本。传输页显示实际文件、方向、字节进度、暂停和重试。human 默认日历仍是 `human/CALENDAR.db`;只有同步到默认目录的内容供网页端默认读取。旧宿主保留原同步页。
104
-
105
- With the matching Genesis host and Server, Penzor Cloud provides per-folder bidirectional rules. The deepest path wins; destinations are the default `/Forsion/`, a device directory, or off. Scope changes require a fresh preview. Old destinations are retained; newly selected scopes reconcile before any deletion, and unavailable roots stop reconciliation. Stable directory identities carry renames. Database rows use the host merger, ordinary conflicts retain both versions, and transfers show actual byte progress. `human/CALENDAR.db` remains the shared default calendar. Older hosts keep their original sync page.
106
-
107
- Validation: `npm test` and `npm run typecheck`. The filesystem/HTTP two-client suite is `test/vitest/contentSync.test.ts`; renderer acceptance is `test/vitest/renderer/contentRules.test.tsx`. Real desktop acceptance: Genesis `EXTEND_PKG=<built Extend checkout> npm run e2e:contentsync` under the repository devlock.
108
-
109
- ### 同步提交与凭据续期 / Sync commits and credential refresh
110
-
111
- Amadeus 入站拉取和三方合并通过 `CoreHost.compareAndReplace` 提交。桌面实现复用 Genesis 的 `contentSync.withWriteLock`,在与编辑器相同的锁内复查目标字节和会话条件;不匹配时保留本地编辑并重新对账。旧宿主缺少这把共享锁时,入站覆盖会明确失败并保持可重试状态,不能退回无锁替换。该保证针对遵循宿主写锁协议的写入,不承诺与任意外部程序之间的文件系统级 CAS。
112
-
113
- REST 请求和 SSE 重连读取当前同账号令牌;旧令牌 401 的完整正文返回后若凭据已续期,REST 最多重试一次。换账号或退出登录时拒绝继续使用旧会话。未完成上传的节点身份先写入本地日志;仅本机创建且服务端确认无内容的节点可被取消,已上传但响应丢失的内容会重新下载保留。
114
-
115
- Amadeus downloads and merges commit through `CoreHost.compareAndReplace`. The desktop adapter uses Genesis's `contentSync.withWriteLock` to verify target bytes and session guards under the editor's lock. A mismatch retains local edits and reconciles again. Older hosts without that shared lock reject inbound replacement with a retryable error; they never fall back to an unguarded overwrite. This protects writers participating in the host lock protocol, not arbitrary external processes.
116
-
117
- REST requests and SSE reconnects read current credentials for the same account. An old-token 401 can retry once after its complete body arrives if credentials have refreshed; account changes and sign-out reject the old session. Pending node identities are journaled before creation. Cancellation applies only to this device's unpopulated nodes; content uploaded before a lost response is downloaded and preserved.
118
-
119
- 验证 / Validation: `npx vitest run test/vitest/engine.localCas.test.ts test/vitest/tokenRefresh.test.ts test/vitest/contentSync.test.ts`; `npm run typecheck`; `npm run check:core`. These tests use real temporary files and controlled local/fixture transports, without production accounts or storage.
120
-
121
- ### 桌面云笔记镜像恢复 / Desktop cloud mirror recovery
122
-
123
- 账号的 `Amadeus Accounts/<account>/Cloud` 目录缺失时,桌面端从云端重新下载笔记。已有共享子目录可以保留。遇到尚待确认的删除、排队中的移动或含个人文件的替换目录时,引擎会保留原同步记录,等待原目录恢复。
124
-
125
- Desktop can rebuild a missing account-owned Cloud directory from the server. Shared subdirectories stay in place. Pending deletions, queued moves and populated replacement directories retain their original sync state. Run `npm run test:vitest -- test/vitest/engine.massdelete.test.ts` to exercise recovery and interrupted downloads against a temporary filesystem.
126
-
127
- ### macOS sync root identity after a reboot
128
-
129
- Local APFS roots retain their volume UUID, inode and available birth time across
130
- restarts; in-process writes still check the current mount device and inode.
131
- Legacy shadows whose device number already changed cannot be silently rebound.
132
- Do not delete their files, cursor, pending deletion or move baselines.
133
-
134
- `npm run sync:root:inspect -- /absolute/path/to/amadeus-sync-ACCOUNT.json` is a
135
- read-only inspection. If the owner confirms this is the intended original
136
- directory, quit every application using that Electron profile and repeat with
137
- `--confirm INSPECTION_TOKEN`. The shadow must be the original file directly in
138
- that profile's `userData` directory. Independent profiles (for example, the
139
- installed app while recovering dev) may remain running; the command checks the
140
- target profile's `SingletonLock` and `SingletonSocket`, including stale locks,
141
- before inspection and immediately before writing. It does not infer ownership
142
- from executable names. Separately check whether another profile uses the same
143
- physical note directory before performing recovery on shared directories.
144
- Keep the target profile closed until the command finishes; these checks do not
145
- reserve its single-instance lock against a concurrent relaunch.
146
- The offline command checks the current root and exact shadow again, creates an
147
- exact backup, then changes only root identity. Install the fixed Extend build
148
- before restarting; older builds still compare device numbers after future reboots.
149
- Unknown/network filesystems without a durable volume ID keep the strict mount
150
- check. Regression: `npx vitest run test/vitest/directoryIdentity.test.ts
151
- test/vitest/amadeusLifecycle.saturation.test.ts test/vitest/contentSync.test.ts
152
- test/vitest/rebindSyncRoot.test.ts`.
153
-
154
- Local reboot/remount/account regressions: `npm run test:sync-lifecycle` runs with
155
- an isolated temporary home and a loopback-only network guard. It includes fresh
156
- Node processes, abrupt child termination after a synthetic cloud commit, changed
157
- mount identities, delayed writes and account transitions. All notes, accounts,
158
- shadows and cloud responses are fixtures; no production account, user vault,
159
- installed Electron window or real disk unmount is used.
160
-
161
- Official inbox state is stored in the account database and exposed to Genesis through the optional first-party
162
- `ctx.app.provideInboxChannel` seam. Native Agent/system messages retain their engine storage.
163
- Run `npx vitest run test/vitest/renderer/inbox.test.ts` for provider routing and lifecycle checks.
package/SIGNATURE CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "alg": "ed25519",
3
3
  "files": {
4
- "CHANGELOG.md": "089b690d28c8d83e2458523a8b719a9c815fa63ea5005170ac0e2935acb4cb39",
4
+ "CHANGELOG.md": "b6ce7052c0cf4d082e99d9aceffc410dd9460887644da2fb02b458b7f3ec9866",
5
5
  "LICENSE": "5594544ee08011ed5785ee26410f1f2ef005f66e9283833e8d435e34c10de1ed",
6
- "README.md": "4942da654a30c6071a095d3a2810b5944eaee5c5942f64e01d8950c811f59e8f",
6
+ "README.md": "e95bb992fb97d53845b41176eb62b3b27eaa88d462dbb5fcd3eb8654977ee789",
7
7
  "dist/THIRD_PARTY_NOTICES.md": "0af426bcae1e6cd82d3f6255768ac232eea116c7079706ae237d2f1f494531b4",
8
- "dist/desktop.mjs": "b0088bc0c7f361a2bac5dab52be1eca45a938c295dfe643cf72319f6cb846409",
9
- "dist/main.js": "4877fc992a5073abed7cb4d5800f63e62e34cf71521fce98af37d8f32b94b5a6",
10
- "manifest.json": "e73c5bc0232bd8f020fb43fe84167e8e8cef4035202267ba49433cd7ba915445",
11
- "package.json": "0910142eef61e3a5d49c8ab66c238c53d405580b24c43b534475205c56f44888",
8
+ "dist/desktop.mjs": "7dee07492ceeb623e576ed4e681c7258f24c68b163af1c3e0e5aaaf0de3193db",
9
+ "dist/main.js": "8cbef784009f908f0f93bbf96bfa23226108fb0b9dece35a7f16483a98499df5",
10
+ "manifest.json": "aa98a0be0a634ce665d87b22a9c8ac5094cc6bef6e7ffeaf88412aba23292da1",
11
+ "package.json": "816a59d363b386b11c30b8f32fe52626962afcca93a7eaf8f5a19dd4856c3cf6",
12
12
  "spaces/guide/space.json": "7da9fb9373278e9e1f75c65f697a21f25b0b45792def0ce94ed5e7f6473979b1",
13
13
  "spaces/penzor/icon.svg": "3c212d9f121ae54a0a84042c19ff5573e22cb236718ae4de11fc3c19f0c3b634",
14
14
  "spaces/penzor/space.json": "a3b6c4d86c54dca38b24d3efe352fed860ce7accc934f9f160600ff65ed4f0e6",
@@ -18,5 +18,5 @@
18
18
  "tangu-plugins/store-update/tangu-plugin.json": "a99e71329e705793eec46d9e8d4b790017136c328f670161cd4d57e49ee4dd0a",
19
19
  "widgets/sync/manifest.json": "98c3165cb6c523223565283ba35d1069536181adc0a29f764a932ef543df677e"
20
20
  },
21
- "sig": "7wkxT/NLWIanNG2Ileugs7Pb5sF8nLJzavQsMKUFS7hAbJ7NidKRkbDXVV+bBQ1LyCGe+Co9C4GbbkAlU53pDw=="
21
+ "sig": "kmu2SMyhMyGrws2IW3tcM1hWYDx7D9I3GQhAFW8HMT3Xg+eYErBHHJs3qrkX/Qr08SoAzxJ8SXhDa+d+THXlAA=="
22
22
  }