@forsion/extend 0.10.8 → 0.10.11

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,35 @@
1
1
  # 更新日志
2
2
 
3
+ ## 0.10.11 — 2026-11-23
4
+
5
+ - 「安全」页可以直接在应用里扫码绑定微信:点「绑定」会出现微信二维码,用手机微信扫一扫并在手机上确认,这里就自动绑好,不用再跳到网页。需要较新的桌面版本和云端支持,不满足时照旧点「去绑定」在网页里完成;扫码框下面也随时可以点「改在浏览器里绑定」。
6
+ - 上传的诊断数据里,同步离线的次数更准了:连着的同步通道短暂断开、马上又连上,不再算作一次离线;离线时的报错按实际原因(服务器出错、登录失效、超时等)分别计数。同步本身和界面都没有变。
7
+ - 「帮助改进 Forsion」开着时,多统计几项次数:额度提示从哪里弹出、点了哪个按钮;装了哪些插件、开了几个(商店和随附插件记插件 ID,本地插件只记个数);对模型回复重新生成、停止、改了重发的次数(只记公开的模型名);第一次运行是否成功。都不含对话内容。
8
+
9
+ - 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.
10
+ - 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.
11
+ - 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.
12
+
13
+ ## 0.10.10 — 2026-11-19
14
+
15
+ - 桌面端的云笔记镜像目录丢失后,可从云端重新下载笔记。恢复过程中退出应用,下次启动会继续,并保留其他设备已经完成的删除。
16
+ - Windows 上,其他程序短暂占用正在下载的文件时,同步会稍后重试。替换文件前会重新检查本地内容,保留重试期间保存的编辑。
17
+
18
+ - Desktop can download cloud notes again when the local mirror folder goes missing. Recovery resumes after a restart and respects notes deleted on another device.
19
+ - On Windows, sync retries when another program briefly holds a file being updated. It checks the local contents again before replacing the file so edits saved during the wait are preserved.
20
+
21
+ ## 0.10.9 — 2026-11-19
22
+
23
+ - 「安全」页加上微信和 GitHub:能看到有没有绑定,点「去绑定」在网页里完成绑定,也能直接在应用里解绑(要确认两次)。微信是你唯一的登录方式时不能解绑。云端没开这两项时不显示。
24
+ - 「会员与额度」的会员卡里加上自动续费:能看到下次扣款的金额和日期,可以取消;取消后还能恢复,恢复要在支付宝里确认。
25
+ - 个人主页改成默认公开后,主页最上面会提示一次,可以去看看、设为不公开或关掉提示。
26
+ - 「我的网页」:下线的网页马上从列表里消失;后台关闭「作者付」时按访客付显示;保存 AI 设置只提交你改过的项,不会把别处刚改的设置盖回去。
27
+
28
+ - The Security page now shows WeChat and GitHub: see whether each is linked, click "Link" to finish linking on the web, or unlink right in the app (after confirming twice). You can't unlink WeChat while it's your only way to sign in. Hidden when the service doesn't offer them.
29
+ - The membership card under Membership & quota now shows auto-renewal: the next charge and its date, with a way to cancel. After canceling you can resume it, which you confirm in Alipay.
30
+ - Now that profiles are public by default, your profile shows a one-time notice at the top where you can take a look, make it private, or dismiss it.
31
+ - My web pages: a page you take offline leaves the list right away; when author pays is turned off by the service, pages show visitor pays; saving AI settings sends only what you changed, so settings changed elsewhere are no longer overwritten.
32
+
3
33
  ## 0.10.8 — 2026-11-17
4
34
 
5
35
  - 新增「反馈给 Forsion」:Agent 碰到 Forsion 自己的问题时(Forsion 自带工具出内部错误、行为和文档对不上、开发插件时宿主接口缺能力),会在对话里起草一张反馈卡,日志已经备好。卡上可以改标题和描述、逐项选附带的内容(缺省带这次运行的报错和运行日志,不带会话内容),点「发送」才发出。你之前报过同一个问题时,发送会补充到那一条。在「设置 → 插件 → 反馈给 Forsion」里可以改成「起草并直接发送」(不带会话内容,10 分钟内可以撤回)或「不用起草」。需要新版桌面与云端服务。
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,96 +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
- ### macOS sync root identity after a reboot
122
-
123
- Local APFS roots retain their volume UUID, inode and available birth time across
124
- restarts; in-process writes still check the current mount device and inode.
125
- Legacy shadows whose device number already changed cannot be silently rebound.
126
- Do not delete their files, cursor, pending deletion or move baselines.
127
-
128
- `npm run sync:root:inspect -- /absolute/path/to/amadeus-sync-ACCOUNT.json` is a
129
- read-only inspection. If the owner confirms this is the intended original
130
- directory, quit every application using that Electron profile and repeat with
131
- `--confirm INSPECTION_TOKEN`. The shadow must be the original file directly in
132
- that profile's `userData` directory. Independent profiles (for example, the
133
- installed app while recovering dev) may remain running; the command checks the
134
- target profile's `SingletonLock` and `SingletonSocket`, including stale locks,
135
- before inspection and immediately before writing. It does not infer ownership
136
- from executable names. Separately check whether another profile uses the same
137
- physical note directory before performing recovery on shared directories.
138
- Keep the target profile closed until the command finishes; these checks do not
139
- reserve its single-instance lock against a concurrent relaunch.
140
- The offline command checks the current root and exact shadow again, creates an
141
- exact backup, then changes only root identity. Install the fixed Extend build
142
- before restarting; older builds still compare device numbers after future reboots.
143
- Unknown/network filesystems without a durable volume ID keep the strict mount
144
- check. Regression: `npx vitest run test/vitest/directoryIdentity.test.ts
145
- test/vitest/amadeusLifecycle.saturation.test.ts test/vitest/contentSync.test.ts
146
- test/vitest/rebindSyncRoot.test.ts`.
147
-
148
- Local reboot/remount/account regressions: `npm run test:sync-lifecycle` runs with
149
- an isolated temporary home and a loopback-only network guard. It includes fresh
150
- Node processes, abrupt child termination after a synthetic cloud commit, changed
151
- mount identities, delayed writes and account transitions. All notes, accounts,
152
- shadows and cloud responses are fixtures; no production account, user vault,
153
- installed Electron window or real disk unmount is used.
154
-
155
- Official inbox state is stored in the account database and exposed to Genesis through the optional first-party
156
- `ctx.app.provideInboxChannel` seam. Native Agent/system messages retain their engine storage.
157
- 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": "db1ae1e4d38405ec80c20303188fc3943079ff8ed080b3e46d1f35e1234002fb",
4
+ "CHANGELOG.md": "b5386af8067c9a8d416f7f6fcfbc60cf5919aef9c992073c4850bb53beb6136f",
5
5
  "LICENSE": "5594544ee08011ed5785ee26410f1f2ef005f66e9283833e8d435e34c10de1ed",
6
- "README.md": "922bf69a9f41e77167d73b6d508b2a88c1e7e5c54f3ad746b57bc0d6d96098a8",
6
+ "README.md": "e95bb992fb97d53845b41176eb62b3b27eaa88d462dbb5fcd3eb8654977ee789",
7
7
  "dist/THIRD_PARTY_NOTICES.md": "0af426bcae1e6cd82d3f6255768ac232eea116c7079706ae237d2f1f494531b4",
8
- "dist/desktop.mjs": "19f624f6a81094e679f91d0eb7a133c686c21b05f0484fd30a2cd2832eb54949",
9
- "dist/main.js": "8ce62d557b57aaddb1cd397bf6b9bf54f24f1344207ec877ffdb0471fa490b0e",
10
- "manifest.json": "3d010140610f6aaea78f7fae9b0040cb25fd773da69aa551591246583181cb15",
11
- "package.json": "9825019d206cf7ce6f8d41aef2015eb3cee4c7c094474e8abb967fea35e4b53a",
8
+ "dist/desktop.mjs": "12d36e0947e0b95b0767eb2a2d9e6d849ed4df0badadbad89ad408888da60152",
9
+ "dist/main.js": "31efe2e46f6eb338fa5b65184a10768d3caf335ebdb270c223fd2dd5bbdbcc2e",
10
+ "manifest.json": "5aeacc825cfea1a2df655902adfa9b65f8c1ba9af10e86f27da3d45a696bc287",
11
+ "package.json": "82e6c570e6e69696c000c1dbf9e7210ad51164116075710ec99ca5f49af35560",
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": "Kqg0KR2z+ggXGOIeAfuQwnY4OqCLcSWcLA9QStXEjytPXAK4nqUafyIkFIVh95Xjh+15I/8afbB7SAEKFMQjDg=="
21
+ "sig": "IQlMOj61Rhs3oDud2+obOJydKp2NLkQ98YdlwDM/uoJ06jthGz7AXX/ECf5irUNFoiu/mbuE5QwVffdir4FmBA=="
22
22
  }