@forsion/extend 0.9.2 → 0.9.3

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,15 @@
1
1
  # 更新日志
2
2
 
3
+ ## 0.9.3 — 2026-10-22
4
+
5
+ - 原生手机复用账号、个人主页、会员与积分商店、公告和蓬洲云,直接读取当前账号已有的云端资料。手机上传交文件选择器,下载通过宿主保存,付款与外部链接沿用系统浏览器;本机同步开关和诊断仅在桌面提供。需要带 `mobileHostApi: 1` 接缝的手机宿主。
6
+ - Web 与手机登出或切换账号后,立即取消旧传输并清除队列与文件夹缓存;延迟返回的资料、上传额度与登录交接不再影响新账号。
7
+ - 桌面同步支持按文件夹选择范围、方向与默认或设备专属云端位置;启用和修改规则前先预览,传输中可查看进度、暂停和重试。重命名保留同步身份,冲突保留待处理版本;旧桌面仍使用原有同步页。
8
+
9
+ - Native mobile now reuses the account/profile pages, membership and points store, announcements, and Penzor Cloud with the signed-in account’s existing cloud data. Uploads use the file picker, downloads are saved by the host, and payments/external links use the system browser. Local sync controls and diagnostics remain desktop-only. Requires a mobile host supporting `mobileHostApi: 1`.
10
+ - Signing out or switching accounts on Web/mobile cancels old transfers and clears the queue and folder cache. Late account responses, upload quota checks and browser handoffs cannot affect the new account.
11
+ - Desktop sync supports per-folder scope, direction and default or device-specific cloud destinations. Preview changes before enabling or editing rules, and follow, pause or retry transfers. Renames retain sync identity and unresolved versions stay available; older desktop hosts keep the original sync page.
12
+
3
13
  ## 0.9.2 — 2026-10-21
4
14
 
5
15
  - 「我的云盘」统一按来源显示笔记库、Agents、我的资料、应用、插件数据和上传文件。同步与应用维护的内容只读,上传文件仍可整理。
package/README.md CHANGED
@@ -69,3 +69,29 @@ Don't see Forsion Cloud? Check that Forsion Extend is turned on under Settings
69
69
  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.
70
70
 
71
71
  验证 / 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`.
72
+
73
+ ## Web 与原生手机 / Web and native mobile
74
+
75
+ Web 主入口与原生手机复用本包的账号、会员与积分商店、公告和蓬洲云界面。读取当前登录账号已有的云端资料与云盘,不创建另一份手机账号。手机上传交浏览器 `File`,下载交宿主保存;电脑笔记同步开关、本机设备诊断不在手机上注册。Web 仍使用浏览器下载和标签页,手机付款与公告链接使用系统浏览器。
76
+
77
+ 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.
78
+
79
+ 宿主契约 / Host contract:
80
+
81
+ - Web: `window.tangu.unitPage && window.tangu.unitPublicEntry`; mobile: `window.tangu.mobile && window.tangu.extendMobile`. The mobile marker belongs to the bundled, verified Extend loader.
82
+ - `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.
83
+ - `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.
84
+ - 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.
85
+ - 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.
86
+
87
+ 验证 / 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.
88
+
89
+ ## 目录同步 / Folder sync
90
+
91
+ 新版 Genesis 宿主与 Server 配合时,蓬洲云「同步」使用规则表:默认双向同步到云端 `/Forsion/`,子路径可改到 `/Forsion-设备ID/` 或设为不同步。最具体的路径优先;未匹配内容不参与同步。第一次开启和修改范围先预览、再确认。切换目标保留原云端副本,重新选择范围会重新对齐基线,断开的目录不会被当作删除。
92
+
93
+ 文件夹使用独立身份跟踪改名,同名目录合并。数据库沿用宿主按行 ID 的合并,文本安全三方合并;无法合并时保留冲突副本。传输页显示实际文件、方向、字节进度、暂停和重试。human 默认日历仍是 `human/CALENDAR.db`;只有同步到默认目录的内容供网页端默认读取。旧宿主保留原同步页。
94
+
95
+ 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.
96
+
97
+ 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.
package/SIGNATURE CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "alg": "ed25519",
3
3
  "files": {
4
- "CHANGELOG.md": "d9ef0e6e15649f0c8213a30cff127f74b634b34f76d537147afe2db7a57ee661",
4
+ "CHANGELOG.md": "2d9edd314ae0efab7c3e23754036110844d1b5baa9418cd4395c1b6bd7d9d097",
5
5
  "LICENSE": "5594544ee08011ed5785ee26410f1f2ef005f66e9283833e8d435e34c10de1ed",
6
- "README.md": "331a0fa9721d8c31f0fd62e7908117138d1be2fe54af223e63d0dbc791d95f49",
6
+ "README.md": "0a380a139bbb2d78096b040d267676e118e7669907a797d379db680bd3d733a8",
7
7
  "dist/THIRD_PARTY_NOTICES.md": "0af426bcae1e6cd82d3f6255768ac232eea116c7079706ae237d2f1f494531b4",
8
- "dist/desktop.mjs": "889d6f4ec0bcd84b1f02e164b7edc63250d43d3eb91741cae97420d38279c71c",
9
- "dist/main.js": "217d70debf9ebce52e4e79bfa1094c5943703a4bb63c319e0742c4d44d657dc3",
10
- "manifest.json": "cb329836eb2328cd7ea1ad6af881550ad943ff3e8d6f12900e1814d01fd25532",
11
- "package.json": "19fcebe2d92a5135609797615c39c5b6253f2f3e8dda4757fa5e387004bfecff",
8
+ "dist/desktop.mjs": "7f84cc0d0096f50b36f9bcf2320d8cba1b7cf732a45d25cf81a593b770547607",
9
+ "dist/main.js": "1bfb39b07a3cab6440ef22f70379cc53f7c40fa25e08a311b2b5d1ab1a70ca63",
10
+ "manifest.json": "7d51593cded16f88770fe052dca33ecdab86d608df2de71a7873fd587a87dc4a",
11
+ "package.json": "e1232ae2c757d774c9016f000c739a44617fb391cb8731792e29c64a017fb79a",
12
12
  "spaces/guide/space.json": "7da9fb9373278e9e1f75c65f697a21f25b0b45792def0ce94ed5e7f6473979b1",
13
13
  "spaces/penzor/space.json": "478ccfc5f4fec4cd339f7e48e6dd530f45978804ea7cd9e579612e2cc2915429"
14
14
  },
15
- "sig": "PiskAE0ETse548GTSKsQnL68dDJmZTJWOqkodRsESCfDXa1J5cZSAVZP/uPtPkzuOu4Xzon0ge+FuDNO/Z/mCQ=="
15
+ "sig": "PE1nXluOW/Bf1j4B6j4qlvgwcOnlxHipUZm+qFe3cZ1obA7pq7YPKbCX8eIpAH6Sc+cXRUSbK7SjExucXOtnAg=="
16
16
  }