dsh-auth-remote 0.3.4 → 0.3.6
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 +16 -0
- package/CHANGELOG.zh-CN.md +16 -0
- package/CONTRIBUTING.md +2 -2
- package/CONTRIBUTING.zh-CN.md +2 -2
- package/README.md +19 -18
- package/README.zh-CN.md +19 -18
- package/dist/client.js +106 -16
- package/dist/client.js.map +3 -3
- package/dist/index.js +17 -20
- package/dist/index.js.map +2 -2
- package/dist/types/shared/dsh-support.d.ts +3 -0
- package/dist/types/shared/dsh-support.d.ts.map +1 -1
- package/docs/deployment.md +8 -6
- package/docs/deployment.zh-CN.md +8 -6
- package/docs/development.md +57 -50
- package/docs/development.zh-CN.md +57 -50
- package/docs/legacy-compatibility.md +140 -100
- package/docs/legacy-compatibility.zh-CN.md +132 -92
- package/docs/releasing.md +27 -14
- package/docs/releasing.zh-CN.md +27 -14
- package/docs/reverse-proxy.md +1 -1
- package/docs/reverse-proxy.zh-CN.md +1 -1
- package/docs/support-history.md +69 -65
- package/docs/support-history.zh-CN.md +52 -48
- package/docs/support-policy.md +24 -20
- package/docs/support-policy.zh-CN.md +25 -19
- package/package.json +17 -18
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,22 @@ This file records user-visible changes to the released package. Version numbers
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## 0.3.6 - 2026-11-13
|
|
10
|
+
|
|
11
|
+
- Preserve the native DSH `0.2.2-rc.2` account entry, notification children and ownership through real client/native-component HMR, disposal and later-writer protection. Older entries without children retain public registration. Document the private adaptation and its evidence boundaries in both languages.
|
|
12
|
+
- Declare eight exact hosts, with minimum support `0.2.1-rc.1` and recommended development/migration RC prerelease `0.2.2-rc.2`. Retire maintenance of `0.2.1-alpha.3`, `0.2.1-alpha.4` and `0.2.1-alpha.5`, preserving the original window and last-supporting plugin `0.3.5`. Technical admission remains `>=0.2.1-alpha.3`, including prereleases without a new upper bound.
|
|
13
|
+
- Pin DSH `0.2.2-rc.2` development dependencies and the merged account provider. Local Platform/notification stand-ins cover account lifecycles and native Search/Fetch billing, credential save/replace/remove, refusal and restart persistence, without real external authorization or paid services.
|
|
14
|
+
- Remove LiveShare Owner/Relay product-flow E2E and exclusive fixtures. Retain production Origin adaptation, real native viewer, Connection business-Origin/configuration-HMR and shared authentication checks; product flows are unverified.
|
|
15
|
+
- Keep complete eight-host CLI/browser/smoke in ordinary/full. Only plugin `0.3.6` full/releases add three maintenance-retirement targets; independent `0.2.1-alpha.2` technical refusal remains. An unpackaged index binds each producer’s source, same archive, actual runtimes/SDKs and raw reports, refusing omissions, wrong hashes and partial suites.
|
|
16
|
+
- Synchronize published `0.3.5` facts, full backups/independent-profile migration and rollback with matching host/plugin/configuration/data. This date records release preparation; final same-archive acceptance, Actions and publication remain pending.
|
|
17
|
+
|
|
18
|
+
## 0.3.5 - 2026-11-06
|
|
19
|
+
|
|
20
|
+
- Prepare plugin `0.3.5` for release with exact DSH `0.2.2-rc.1` support, retaining all nine existing targets. Use this RC prerelease as the development default, recommended host and current migration target; admission and legacy/retirement history stay unchanged.
|
|
21
|
+
- Pin the development DSH SDK to `0.2.2-rc.1`, Cordis to `4.1.0` and Schemastery to `3.19.0`, without changing production authentication behavior.
|
|
22
|
+
- Extend exact browser coverage and registration checks for native resources, mux, HMR rollback, LiveShare, eight languages and the native shield on both `0.2.2-alpha.3` and `0.2.2-rc.1`; add their real host-switch round trip and retain full ten-host same-archive release verification.
|
|
23
|
+
- Align bilingual support, compatibility inventories and upgrade/release guides. Publication remains subject to PR/master CI and the tagged release workflow.
|
|
24
|
+
|
|
9
25
|
## 0.3.4 - 2026-11-05
|
|
10
26
|
|
|
11
27
|
- Upgrade the development SDK to DSH `0.2.2-alpha.3` and observe the Loader-owned effective configuration without replacing volatile references.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -6,6 +6,22 @@
|
|
|
6
6
|
|
|
7
7
|
## 未发布
|
|
8
8
|
|
|
9
|
+
## 0.3.6 - 2026-11-13
|
|
10
|
+
|
|
11
|
+
- 保留 DSH `0.2.2-rc.2` 原生账号入口、通知子槽及其所有权,支持真实客户端/原生组件 HMR、卸载和后写保护;无children的旧宿主继续公开注册。新增私有适配维护条目及双语证据边界。
|
|
12
|
+
- 声明八个精确宿主,最低支持 `0.2.1-rc.1`;默认及推荐迁移目标为RC预发布 `0.2.2-rc.2`。维护退役 `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`,保留原窗口及最后支持插件 `0.3.5`;技术准入仍为 `>=0.2.1-alpha.3`,包含预发布、无新增上限。
|
|
13
|
+
- 固定 `0.2.2-rc.2` 开发依赖及合并账号provider;以本地Platform/通知协议替身覆盖账号生命周期与新版Search/Fetch独立计费、凭据保存/替换/移除、拒绝和重启持久化,不访问真实外部授权或付费服务。
|
|
14
|
+
- 移除LiveShare Owner/Relay产品流程E2E及专用夹具,保留生产Origin适配、真实native viewer、Connection业务Origin/配置HMR和共享认证安全验证;不宣称产品流程已验证。
|
|
15
|
+
- ordinary/full均完整验证八版CLI/browser/smoke;仅0.3.6 full/发布增加三版维护退役专项,独立 `0.2.1-alpha.2` 技术拒绝保持。包外索引绑定每个producer的源码、同一归档、实际runtime/SDK和原始报告,拒绝缺失、错摘要和部分套件。
|
|
16
|
+
- 同步已发布0.3.5事实、完整备份/独立profile迁移及匹配宿主/插件/配置/数据的回退说明。日期为发布准备日;最终同包验收、Actions和公开发布仍待完成。
|
|
17
|
+
|
|
18
|
+
## 0.3.5 - 2026-11-06
|
|
19
|
+
|
|
20
|
+
- 准备发布插件 `0.3.5`,新增精确 DSH `0.2.2-rc.1` 支持并保留现有九版;此 RC 预发布宿主作为开发默认、推荐宿主和当前迁移目标,准入及 legacy/退役历史保持。
|
|
21
|
+
- 开发 DSH SDK 固定为 `0.2.2-rc.1`、Cordis `4.1.0`、Schemastery `3.19.0`,不改变生产认证行为。
|
|
22
|
+
- 为 `0.2.2-alpha.3` 和 `0.2.2-rc.1` 扩展原生资源、mux、HMR 回滚、LiveShare、八语和原生盾牌的精确浏览器覆盖与注册门禁;新增两版真实往返切换,保留十版同包完整发布验收。
|
|
23
|
+
- 同步双语支持、兼容库存及升级/发布指南;实际发布仍须通过 PR/master CI 和标签发布工作流。
|
|
24
|
+
|
|
9
25
|
## 0.3.4 - 2026-11-05
|
|
10
26
|
|
|
11
27
|
- 开发 SDK 更新至 DSH `0.2.2-alpha.3`;观测 Loader 有效配置并保留动态引用身份。
|
package/CONTRIBUTING.md
CHANGED
|
@@ -6,7 +6,7 @@ Thanks for helping improve dsh-auth-remote. Changes to authentication or deploym
|
|
|
6
6
|
|
|
7
7
|
## Prepare a checkout
|
|
8
8
|
|
|
9
|
-
Use Linux with `/proc`, Node.js 24
|
|
9
|
+
Use Linux with `/proc`, Node.js 24 (at least `24.9.0` for the default host), and pnpm 12.5.1. Install dependencies and the managed browser from the repository root:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
12
|
pnpm install --frozen-lockfile
|
|
@@ -26,4 +26,4 @@ Create a focused branch from `master`. Include the reason for the change, its us
|
|
|
26
26
|
|
|
27
27
|
The `CI Verify` check runs on pull requests and again after a merge to `master`. A maintainer updates the version and dated changelog entry before creating a release tag. The [release guide](docs/releasing.md) describes that process.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Current source candidate `0.3.6` declares eight exact DSH targets, defaulting to recommended RC prerelease `0.2.2-rc.2`. Published `0.3.5` retains ten historical declarations and is the last supporting plugin for `0.2.1-alpha.3`, `0.2.1-alpha.4` and `0.2.1-alpha.5`. Support/shared-host changes require one final archive across all eight complete CLI/browser/smoke targets; ordinary/full both keep complete eight-host coverage. Full/releases retain independent `0.2.1-alpha.2` technical refusal. Only validated plugin `0.3.6` full/releases add the three Alpha maintenance-retirement checks; they must not block other plugin versions. Each local/PR/master/tag producer has an unpackaged acceptance index linking source, archive, actual runtime/SDK and raw reports. Follow PR CI, master CI, annotated-tag and trusted publication; never rebuild or pack in the final consumer loop. Current LiveShare verification retains native viewer/Origin/authentication boundaries; Owner/Relay product flows are unverified.
|
package/CONTRIBUTING.zh-CN.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## 准备源码环境
|
|
10
10
|
|
|
11
|
-
使用带 `/proc` 的 Linux、Node.js 24
|
|
11
|
+
使用带 `/proc` 的 Linux、Node.js 24(默认宿主至少 `24.9.0`)、pnpm 12.5.1。在仓库根目录安装依赖和测试浏览器:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
pnpm install --frozen-lockfile
|
|
@@ -26,4 +26,4 @@ pnpm check
|
|
|
26
26
|
|
|
27
27
|
`CI Verify` 会在 Pull Request 和合入 `master` 后运行。维护者在创建发布标签前更新版本号和带日期的更新日志;具体流程见[发布指南](docs/releasing.zh-CN.md)。
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
当前源码候选 `0.3.6` 声明八个精确 DSH 目标,默认及推荐迁移宿主为 RC 预发布 `0.2.2-rc.2`。已发布 `0.3.5` 保留十版历史声明,是 `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 的最后支持插件。支持或共享宿主变更须消费同一最终归档,八版完整 CLI/browser/smoke;ordinary/full 均完整验证八版。full/发布保留独立 `0.2.1-alpha.2` 技术拒绝;仅已校验插件 `0.3.6` 的 full/发布增加三个 Alpha 的维护退役专项,其他版本不能被其阻塞。每个本地/PR/master/tag producer 的源码、归档、实际 runtime/SDK 和原始报告由包外验收索引关联。依次完成 PR CI、master CI、附注标签及可信发布;最终消费循环禁止重建或打包。当前 LiveShare 验证保留 native viewer/Origin/认证边界,未验证 Owner/Relay 产品流程。
|
package/README.md
CHANGED
|
@@ -6,38 +6,37 @@ Single-user remote sign-in for DeepSeek Harness (DSH), with password, TOTP, one-
|
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
|
-
- Linux with `/proc` and Node.js 24. DSH `0.2.2-
|
|
9
|
+
- Linux with `/proc` and Node.js 24. DSH `0.2.2-rc.2` requires Node.js `>=24.9.0`.
|
|
10
10
|
- A supported DSH release and a `web` profile. One account and its sessions belong to that profile.
|
|
11
11
|
|
|
12
12
|
## DSH compatibility
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Source candidate **`0.3.6`** declares these eight exact DSH releases. **`0.2.2-rc.2`** is the development default and recommended migration host, still an upstream RC prerelease. The candidate is unpublished; final same-archive acceptance and PR/master/tag gates must precede publication. Declarations do not establish testing or distribution. Published `0.3.5` retains its original ten declarations and archive.
|
|
15
15
|
|
|
16
|
-
| DSH release | Maintenance
|
|
17
|
-
| --------------- |
|
|
18
|
-
| `0.2.1-
|
|
19
|
-
| `0.2.1-
|
|
20
|
-
| `0.2.1-
|
|
21
|
-
| `0.2.1-rc.
|
|
22
|
-
| `0.2.1-rc.
|
|
23
|
-
| `0.2.
|
|
24
|
-
| `0.2.
|
|
25
|
-
| `0.2.
|
|
26
|
-
| `0.2.2-alpha.3` | Recommended host |
|
|
16
|
+
| DSH release | Maintenance |
|
|
17
|
+
| --------------- | ------------------------------------ |
|
|
18
|
+
| `0.2.1-rc.1` | Supported; minimum supported release |
|
|
19
|
+
| `0.2.1-rc.2` | Supported |
|
|
20
|
+
| `0.2.1-rc.3` | Supported |
|
|
21
|
+
| `0.2.1-rc.4` | Supported |
|
|
22
|
+
| `0.2.1-rc.5` | Supported |
|
|
23
|
+
| `0.2.2-alpha.3` | Supported |
|
|
24
|
+
| `0.2.2-rc.1` | Supported |
|
|
25
|
+
| `0.2.2-rc.2` | Recommended host (RC prerelease) |
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
`0.2.1-alpha.3`, `0.2.1-alpha.4` and `0.2.1-alpha.5` leave maintenance in `0.3.6`; their last supporting plugin is available `0.3.5`. Technical admission remains `>=0.2.1-alpha.3`, including prereleases without a new upper bound. Retired hosts may run with a warning after necessary checks; that is not a compatibility commitment. See the [support policy](docs/support-policy.md) for dates and migration, and the [bidirectional history](docs/support-history.md) for exact historical pairs. Dates never change installed plugin behavior, and unknown newer releases inherit no exact support.
|
|
29
28
|
|
|
30
|
-
DSH `0.2.2-alpha.2`
|
|
29
|
+
DSH `0.2.2-alpha.2` retired in plugin `0.3.4` because fresh SDK resolution breaks native settings updates; an old plugin cannot repair that dependency combination. Migrate to the recommended host with a verified matching plugin; see the [retirement exception](docs/support-policy.md#upstream-failure-exception).
|
|
31
30
|
|
|
32
31
|
## Install
|
|
33
32
|
|
|
34
33
|
```sh
|
|
35
34
|
dsh --version
|
|
36
|
-
dsh plugin --profile web add dsh-auth-remote@0.3.
|
|
35
|
+
dsh plugin --profile web add dsh-auth-remote@0.3.6
|
|
37
36
|
dsh plugin --profile web list
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
Use this npm command after the release workflow has published the version. For an offline installation, substitute the absolute path to the verified release archive. Published `
|
|
39
|
+
Use this npm command after the release workflow has published the version. For an offline installation, substitute the absolute path to the verified release archive. Published `0.3.5` remains available for its historical ten hosts, including the three retired Alphas. Use the same data directory and profile for installation, initialization, and the running service. These commands use DSH's default `~/.dsh` directory and the `web` profile. First rehearse upgrades in an independent profile, following the [backup and rollback procedure](docs/deployment.md#backup-recovery-and-changes).
|
|
41
40
|
|
|
42
41
|
## Initialize the account
|
|
43
42
|
|
|
@@ -84,10 +83,12 @@ Mutating commands require interactive confirmation. If a submitted command loses
|
|
|
84
83
|
|
|
85
84
|
Browser text supports English, Chinese, Japanese, Spanish, French, German, Russian, and Brazilian Portuguese. The embedded page follows DSH's language setting. The standalone login page uses the remembered DSH preference, then the browser language, then English; it has no language selector. CLI output is English.
|
|
86
85
|
|
|
87
|
-
On DSH `0.2.2-alpha.3`, the native navigation uses a shield for this page; the other
|
|
86
|
+
On DSH `0.2.2-alpha.3`, `0.2.2-rc.1` and `0.2.2-rc.2`, the native navigation uses a shield for this page; the other five declared hosts retain their default icon.
|
|
88
87
|
|
|
89
88
|
## Sign in to an official DeepSeek account
|
|
90
89
|
|
|
90
|
+
On `0.2.2-rc.2`, the adapter preserves the native account entry and notification children; older hosts retain public registration. Notifications use local protocol stand-ins; cross-product notification localization mapping is not fully verified.
|
|
91
|
+
|
|
91
92
|
Remote DeepSeek account sign-in is enabled by default (`manualAccountLogin: true`):
|
|
92
93
|
|
|
93
94
|
1. Choose **Sign in** in the account menu, then **Open sign-in page** in the instruction dialog.
|
package/README.zh-CN.md
CHANGED
|
@@ -6,38 +6,37 @@ DeepSeek Harness(DSH)的单用户远程登录插件,提供密码、TOTP、
|
|
|
6
6
|
|
|
7
7
|
## 前置条件
|
|
8
8
|
|
|
9
|
-
- Linux(含 `/proc`)和 Node.js 24。DSH `0.2.2-
|
|
9
|
+
- Linux(含 `/proc`)和 Node.js 24。DSH `0.2.2-rc.2` 要求 Node.js `>=24.9.0`。
|
|
10
10
|
- 一个受支持的 DSH 版本和 `web` profile。一个账号及其会话属于该 profile。
|
|
11
11
|
|
|
12
12
|
## DSH 兼容性
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
源码候选 **`0.3.6`** 声明以下八个精确 DSH 版本;**`0.2.2-rc.2`** 是开发默认和推荐迁移宿主,仍是上游 RC 预发布。候选尚未发布,最终同包验收及 PR/master/tag 门禁须完成后发布;声明不等于实测或分发。已发布 `0.3.5` 保留原十版声明和原归档。
|
|
15
15
|
|
|
16
|
-
| DSH 版本 | 维护状态
|
|
17
|
-
| --------------- |
|
|
18
|
-
| `0.2.1-
|
|
19
|
-
| `0.2.1-
|
|
20
|
-
| `0.2.1-
|
|
21
|
-
| `0.2.1-rc.
|
|
22
|
-
| `0.2.1-rc.
|
|
23
|
-
| `0.2.
|
|
24
|
-
| `0.2.
|
|
25
|
-
| `0.2.
|
|
26
|
-
| `0.2.2-alpha.3` | 推荐宿主 |
|
|
16
|
+
| DSH 版本 | 维护状态 |
|
|
17
|
+
| --------------- | ---------------------- |
|
|
18
|
+
| `0.2.1-rc.1` | 支持中;最低受支持版本 |
|
|
19
|
+
| `0.2.1-rc.2` | 支持中 |
|
|
20
|
+
| `0.2.1-rc.3` | 支持中 |
|
|
21
|
+
| `0.2.1-rc.4` | 支持中 |
|
|
22
|
+
| `0.2.1-rc.5` | 支持中 |
|
|
23
|
+
| `0.2.2-alpha.3` | 支持中 |
|
|
24
|
+
| `0.2.2-rc.1` | 支持中 |
|
|
25
|
+
| `0.2.2-rc.2` | 推荐宿主(RC 预发布) |
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5` 在 `0.3.6` 撤回维护承诺,最后支持插件为可获取的 `0.3.5`。技术准入仍为 `>=0.2.1-alpha.3`,包含预发布、无新增上限;通过必要检查的退役宿主可带告警运行,这不构成兼容承诺。退役日期及迁移方法见[支持规范](docs/support-policy.zh-CN.md),历史精确组合见[双向支持历史](docs/support-history.zh-CN.md)。日期不会改变已安装插件行为,未知新版本也不继承精确支持。
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
DSH `0.2.2-alpha.2` 在插件 `0.3.4` 因新解析 SDK 导致原生设置更新失败而退役;旧插件不能修复该依赖组合。迁移至推荐宿主和已验证的匹配插件,详见[退役例外](docs/support-policy.zh-CN.md#upstream-failure-exception)。
|
|
31
30
|
|
|
32
31
|
## 安装
|
|
33
32
|
|
|
34
33
|
```sh
|
|
35
34
|
dsh --version
|
|
36
|
-
dsh plugin --profile web add dsh-auth-remote@0.3.
|
|
35
|
+
dsh plugin --profile web add dsh-auth-remote@0.3.6
|
|
37
36
|
dsh plugin --profile web list
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
发布工作流成功发布该版本后使用此 npm 命令;离线安装时替换为已验证发布归档的绝对路径。已发布 `
|
|
39
|
+
发布工作流成功发布该版本后使用此 npm 命令;离线安装时替换为已验证发布归档的绝对路径。已发布 `0.3.5` 仍可获取,保留含三个退役 Alpha 的十版历史声明。安装、初始化和运行服务须使用相同的数据目录及 profile。这些命令使用 DSH 默认的 `~/.dsh` 目录和 `web` profile。升级前先在独立 profile 演练,按[备份与回滚步骤](docs/deployment.zh-CN.md#备份恢复与变更)操作。
|
|
41
40
|
|
|
42
41
|
## 初始化账号
|
|
43
42
|
|
|
@@ -84,10 +83,12 @@ dsh plugin --profile web exec dsh-auth-remote revoke-sessions
|
|
|
84
83
|
|
|
85
84
|
浏览器文案支持英、中、日、西、法、德、俄和巴西葡萄牙语。内嵌页面跟随 DSH 语言设置;独立登录页依次使用已记住的 DSH 偏好、浏览器语言、英文,不提供语言选择器。CLI 文案固定英语。
|
|
86
85
|
|
|
87
|
-
DSH `0.2.2-alpha.3`
|
|
86
|
+
DSH `0.2.2-alpha.3`、`0.2.2-rc.1`、`0.2.2-rc.2` 的原生导航为此页显示盾牌;其余五个声明宿主保留默认图标。
|
|
88
87
|
|
|
89
88
|
## 登录 DeepSeek 官方账号
|
|
90
89
|
|
|
90
|
+
在 `0.2.2-rc.2`,适配保留原生账号入口和通知子槽;旧宿主沿用原公开注册路径。通知以本地协议替身验证,跨产品通知本地化映射未完全验证。
|
|
91
|
+
|
|
91
92
|
远程 DeepSeek 账号登录默认开启(`manualAccountLogin: true`):
|
|
92
93
|
|
|
93
94
|
1. 在账号菜单中选择“登录”,再点击步骤说明弹窗中的“打开登录页”。
|
package/dist/client.js
CHANGED
|
@@ -6467,6 +6467,39 @@ function ManualSignInDialog({
|
|
|
6467
6467
|
);
|
|
6468
6468
|
}
|
|
6469
6469
|
|
|
6470
|
+
// src/client/account/native-entry.ts
|
|
6471
|
+
function decorateNativeAccountEntry(entry, wrapper, slots, deactivate) {
|
|
6472
|
+
const property = Object.getOwnPropertyDescriptor(entry, "component");
|
|
6473
|
+
if (!property?.writable || typeof entry.component !== "function" || typeof wrapper !== "function" || !entry.children || typeof entry.children !== "object" || Array.isArray(entry.children) || !entry.options || typeof entry.options !== "object" || typeof entry.inject !== "function" || typeof slots.provideRoot !== "function")
|
|
6474
|
+
throw new Error("auth-remote: native account entry cannot preserve child ownership");
|
|
6475
|
+
const native = entry.component;
|
|
6476
|
+
let release;
|
|
6477
|
+
let active = true;
|
|
6478
|
+
const dispose = () => {
|
|
6479
|
+
if (!active) return;
|
|
6480
|
+
active = false;
|
|
6481
|
+
try {
|
|
6482
|
+
deactivate();
|
|
6483
|
+
} finally {
|
|
6484
|
+
try {
|
|
6485
|
+
if (entry.component === wrapper) entry.component = native;
|
|
6486
|
+
} finally {
|
|
6487
|
+
release?.();
|
|
6488
|
+
}
|
|
6489
|
+
}
|
|
6490
|
+
};
|
|
6491
|
+
try {
|
|
6492
|
+
entry.component = wrapper;
|
|
6493
|
+
const redraw = slots.provideRoot({ props: { authRemoteAccountDecoration: true } });
|
|
6494
|
+
if (typeof redraw !== "function") throw new Error("auth-remote: account redraw is unavailable");
|
|
6495
|
+
release = redraw;
|
|
6496
|
+
} catch (error) {
|
|
6497
|
+
dispose();
|
|
6498
|
+
throw error;
|
|
6499
|
+
}
|
|
6500
|
+
return dispose;
|
|
6501
|
+
}
|
|
6502
|
+
|
|
6470
6503
|
// src/client/account/index.tsx
|
|
6471
6504
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
6472
6505
|
function hasManualAccountClient(ctx, requireEntry = true) {
|
|
@@ -6558,15 +6591,38 @@ function installManualAccountLogin(ctx) {
|
|
|
6558
6591
|
let unregister;
|
|
6559
6592
|
const update = () => {
|
|
6560
6593
|
const native = slots.entries(name2).find(
|
|
6561
|
-
(entry) => entry.locale === "settings.account" && entry.inject !== void 0 && !wrappers.has(entry.component)
|
|
6594
|
+
(entry) => entry.locale === "settings.account" && entry.inject !== void 0 && (entry === current || !wrappers.has(entry.component))
|
|
6562
6595
|
);
|
|
6563
6596
|
if (native === current) return;
|
|
6564
6597
|
current = native;
|
|
6565
|
-
unregister
|
|
6598
|
+
const releasePrevious = unregister;
|
|
6566
6599
|
unregister = void 0;
|
|
6600
|
+
try {
|
|
6601
|
+
releasePrevious?.();
|
|
6602
|
+
} catch (error) {
|
|
6603
|
+
current = void 0;
|
|
6604
|
+
throw error;
|
|
6605
|
+
}
|
|
6567
6606
|
if (!native) return;
|
|
6568
6607
|
const Native = native.component;
|
|
6569
|
-
|
|
6608
|
+
let active = true;
|
|
6609
|
+
let ownedDialog;
|
|
6610
|
+
const showOwned = (owner) => {
|
|
6611
|
+
if (!active) return;
|
|
6612
|
+
if (ownedDialog?.complete) completions.delete(ownedDialog.complete);
|
|
6613
|
+
ownedDialog = owner;
|
|
6614
|
+
show(owner);
|
|
6615
|
+
};
|
|
6616
|
+
const deactivate = () => {
|
|
6617
|
+
active = false;
|
|
6618
|
+
if (ownedDialog?.complete) completions.delete(ownedDialog.complete);
|
|
6619
|
+
if (dialog && dialog === ownedDialog) {
|
|
6620
|
+
dialog = void 0;
|
|
6621
|
+
notify();
|
|
6622
|
+
}
|
|
6623
|
+
ownedDialog = void 0;
|
|
6624
|
+
};
|
|
6625
|
+
function ActiveManualAccountEntry(props) {
|
|
6570
6626
|
const latest = (0, import_react6.useRef)(props);
|
|
6571
6627
|
latest.current = props;
|
|
6572
6628
|
const enabled = (0, import_react6.useSyncExternalStore)(subscribePreference, preference);
|
|
@@ -6577,6 +6633,7 @@ function installManualAccountLogin(ctx) {
|
|
|
6577
6633
|
(0, import_react6.useEffect)(() => {
|
|
6578
6634
|
if (name2 !== "settings.launcher" && manualOnboarding === true) {
|
|
6579
6635
|
const complete = () => {
|
|
6636
|
+
if (!active) return;
|
|
6580
6637
|
latest.current.showLogin?.(false);
|
|
6581
6638
|
latest.current.complete?.();
|
|
6582
6639
|
};
|
|
@@ -6584,13 +6641,15 @@ function installManualAccountLogin(ctx) {
|
|
|
6584
6641
|
complete,
|
|
6585
6642
|
...latest.current.useApiKey ? {
|
|
6586
6643
|
useApiKey: () => {
|
|
6644
|
+
if (!active) return;
|
|
6587
6645
|
latest.current.showLogin?.(false);
|
|
6588
6646
|
latest.current.useApiKey?.();
|
|
6589
6647
|
}
|
|
6590
6648
|
} : {}
|
|
6591
6649
|
};
|
|
6592
|
-
|
|
6650
|
+
showOwned(owner);
|
|
6593
6651
|
return () => {
|
|
6652
|
+
if (ownedDialog === owner) ownedDialog = void 0;
|
|
6594
6653
|
completions.delete(complete);
|
|
6595
6654
|
if (dialog === owner && owner.useApiKey) {
|
|
6596
6655
|
dialog = {};
|
|
@@ -6602,13 +6661,16 @@ function installManualAccountLogin(ctx) {
|
|
|
6602
6661
|
return name2 === "settings.launcher" ? (0, import_react6.createElement)(Native, {
|
|
6603
6662
|
...props,
|
|
6604
6663
|
start: async () => {
|
|
6664
|
+
if (!active) return;
|
|
6605
6665
|
if (preference() === void 0) await mirror?.ensure();
|
|
6666
|
+
if (!active) return;
|
|
6606
6667
|
const manual = preference();
|
|
6607
6668
|
if (manual === void 0) return;
|
|
6608
6669
|
if (!manual) return latest.current.start?.();
|
|
6609
|
-
|
|
6670
|
+
showOwned(
|
|
6610
6671
|
latest.current.openOnboarding ? {
|
|
6611
6672
|
useApiKey: () => {
|
|
6673
|
+
if (!active) return;
|
|
6612
6674
|
latest.current.showLogin?.(false);
|
|
6613
6675
|
latest.current.openOnboarding?.("deepseek-official");
|
|
6614
6676
|
}
|
|
@@ -6617,20 +6679,48 @@ function installManualAccountLogin(ctx) {
|
|
|
6617
6679
|
}
|
|
6618
6680
|
}) : manualOnboarding === false ? (0, import_react6.createElement)(Native, props) : null;
|
|
6619
6681
|
}
|
|
6682
|
+
function ManualAccountEntry(props) {
|
|
6683
|
+
return active ? (0, import_react6.createElement)(ActiveManualAccountEntry, props) : (0, import_react6.createElement)(Native, props);
|
|
6684
|
+
}
|
|
6620
6685
|
wrappers.add(ManualAccountEntry);
|
|
6621
|
-
|
|
6622
|
-
{
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6686
|
+
try {
|
|
6687
|
+
if (native.children) {
|
|
6688
|
+
unregister = decorateNativeAccountEntry(
|
|
6689
|
+
native,
|
|
6690
|
+
ManualAccountEntry,
|
|
6691
|
+
activeSlots,
|
|
6692
|
+
deactivate
|
|
6693
|
+
);
|
|
6694
|
+
} else {
|
|
6695
|
+
const release = slots.register(
|
|
6696
|
+
{
|
|
6697
|
+
name: name2,
|
|
6698
|
+
priority: (native.options.priority ?? 0) - 100,
|
|
6699
|
+
// Framework still binds the native menu's translations and Hooks.
|
|
6700
|
+
...native.locale ? { locale: native.locale } : {},
|
|
6701
|
+
inject: native.inject
|
|
6702
|
+
},
|
|
6703
|
+
ManualAccountEntry
|
|
6704
|
+
);
|
|
6705
|
+
unregister = () => {
|
|
6706
|
+
deactivate();
|
|
6707
|
+
release();
|
|
6708
|
+
};
|
|
6709
|
+
}
|
|
6710
|
+
} catch (error) {
|
|
6711
|
+
current = void 0;
|
|
6712
|
+
deactivate();
|
|
6713
|
+
throw error;
|
|
6714
|
+
}
|
|
6631
6715
|
};
|
|
6632
6716
|
const stop = slots.subscribe(name2, update);
|
|
6633
|
-
|
|
6717
|
+
try {
|
|
6718
|
+
update();
|
|
6719
|
+
} catch (error) {
|
|
6720
|
+
stop();
|
|
6721
|
+
unregister?.();
|
|
6722
|
+
throw error;
|
|
6723
|
+
}
|
|
6634
6724
|
return () => {
|
|
6635
6725
|
stop();
|
|
6636
6726
|
unregister?.();
|