@deepseek-ai/dsh-deepseek-account 0.2.1-alpha.2 → 0.2.1-alpha.4
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/README.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/types/index.d.ts +4 -3
- package/package.json +9 -9
package/README.i18n.yaml
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
en: 30a2d1a634d60f4a
|
|
7
7
|
zh: 9fbf972d342f8ba2
|
|
8
8
|
/deepseek-ai-dsh-deepseek-account:
|
|
9
|
-
en:
|
|
10
|
-
zh:
|
|
9
|
+
en: 4333ad7e5c2d257f
|
|
10
|
+
zh: 1f1acbb68131d328
|
|
11
11
|
/deepseek-ai-dsh-deepseek-account/summary:
|
|
12
12
|
en: 26e77d24d904dd48
|
|
13
13
|
zh: abc2d141826091f9
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ kind: "package-reference"
|
|
|
7
7
|
|
|
8
8
|
English | [中文](README.zh.md)
|
|
9
9
|
|
|
10
|
-
getPlatformSession returns a Host-only origin/token snapshot for native Platform embedding, or null when signed out. Its userId repeats the stable account ID from the most recent successful getProfile, and is null until one succeeds or when that profile holds no ID. The snapshot reuses that ID without issuing a profile request, so an unknown ID leaves userId null instead of delaying the caller; a profile read whose stable ID first becomes available or changes notifies
|
|
10
|
+
getPlatformSession returns a Host-only origin/token snapshot for native Platform embedding, or null when signed out. Its userId repeats the stable account ID from the most recent successful getProfile, and is null until one succeeds or when that profile holds no ID. The snapshot reuses that ID without issuing a profile request, so an unknown ID leaves userId null instead of delaying the caller; a profile read whose stable ID first becomes available or changes notifies only Host subscribers using `watch(signal, true)`, which lets identity consumers re-read the snapshot. Consumers key persistent browser preference storage by origin and userId and use temporary storage while userId is null. It is absent from account-controller RPC and Client state. Consumers destroy documents holding a snapshot when the account changes. The snapshot carries deployment request headers only; the embedding client composes the Platform client identity of its own UI.
|
|
11
11
|
|
|
12
12
|
`platformClientHeaders` builds the five Platform client headers for one call from its `AccountClientMetadata` and the composition's desktop platform: `x-client-bundle-id` is intentionally empty, `x-client-platform` is `web` unless the Desktop profile supplies `darwin` or `win32`, `x-client-version` is the calling build's version, `x-client-locale` reduces the active UI language to `zh_CN` or `en_US` through the exported `platformWireLocale`, and `x-client-timezone-offset` is whole seconds east of UTC. A consumer whose request body carries that same wire locale reuses `platformWireLocale` so the header and body cannot disagree.
|
|
13
13
|
|
package/README.zh.md
CHANGED
|
@@ -7,7 +7,7 @@ kind: "package-reference"
|
|
|
7
7
|
|
|
8
8
|
[English](README.md) | 中文
|
|
9
9
|
|
|
10
|
-
getPlatformSession 为原生 Platform 内嵌提供仅限 Host 的 origin/token 快照,退登时返回 null。其 userId 复制最近一次成功 getProfile 得到的稳定账号 ID;尚无一次成功读取或资料不含 ID 时为 null。快照复用该 ID,不自行发起资料请求,因此 ID 未知时只会让 userId 为 null,而不会延迟调用方;资料读取首次取得稳定 ID 或该 ID
|
|
10
|
+
getPlatformSession 为原生 Platform 内嵌提供仅限 Host 的 origin/token 快照,退登时返回 null。其 userId 复制最近一次成功 getProfile 得到的稳定账号 ID;尚无一次成功读取或资料不含 ID 时为 null。快照复用该 ID,不自行发起资料请求,因此 ID 未知时只会让 userId 为 null,而不会延迟调用方;资料读取首次取得稳定 ID 或该 ID 变化时仅通知使用 `watch(signal, true)` 的 Host 订阅者,供标识使用方重新读取快照。使用方以 origin 和 userId 作为持久化浏览器偏好存储的键,userId 为 null 时改用临时存储。账号控制器 RPC 和 Client 状态不包含此方法及快照。账号变化时,使用方销毁持有旧快照的文档。快照只携带部署请求头;Platform 客户端身份由发起请求的内嵌客户端自行组装。
|
|
11
11
|
|
|
12
12
|
`platformClientHeaders` 依据单次调用的 `AccountClientMetadata` 与组合出的桌面平台生成五个 Platform 客户端请求头:`x-client-bundle-id` 有意保持为空字符串,`x-client-platform` 在没有 Desktop profile 提供 `darwin` 或 `win32` 时为 `web`,`x-client-version` 为调用方构建的版本,`x-client-locale` 通过导出的 `platformWireLocale` 将当前界面语言归约为 `zh_CN` 或 `en_US`,`x-client-timezone-offset` 为东为正的整秒偏移。请求正文需要同一个线上语言值时,消费方复用 `platformWireLocale`,使请求头与正文不会不一致。
|
|
13
13
|
|
package/lib/types/index.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ export declare abstract class DeepSeekAccount extends Service {
|
|
|
36
36
|
abstract getState(): Promise<AccountView>;
|
|
37
37
|
/**
|
|
38
38
|
* Query Platform profile independently of wallet balances.
|
|
39
|
-
* A ready result whose stable profile ID first becomes available or changes notifies watch
|
|
40
|
-
* consumers, so
|
|
39
|
+
* A ready result whose stable profile ID first becomes available or changes notifies identity-enabled watch
|
|
40
|
+
* consumers, so they re-read getPlatformSession; repeated IDs stay silent.
|
|
41
41
|
* @param client - identity of the requesting UI for this call.
|
|
42
42
|
* @returns profile outcome, or null if signed out or the grant changed during the query.
|
|
43
43
|
*/
|
|
@@ -85,9 +85,10 @@ export declare abstract class DeepSeekAccount extends Service {
|
|
|
85
85
|
/**
|
|
86
86
|
* Subscribe to snapshots including a complete initial state.
|
|
87
87
|
* @param signal - subscription lifetime; ending it never cancels login.
|
|
88
|
+
* @param includeIdentityChanges - also notify when cached Platform identity changes; defaults to false.
|
|
88
89
|
* @returns complete snapshots as account state changes.
|
|
89
90
|
*/
|
|
90
|
-
abstract watch(signal: AbortSignal): AsyncIterable<AccountView>;
|
|
91
|
+
abstract watch(signal: AbortSignal, includeIdentityChanges?: boolean): AsyncIterable<AccountView>;
|
|
91
92
|
/**
|
|
92
93
|
* Resolve a credential only for the inference origin allowed by the provider.
|
|
93
94
|
* @param url - actual request destination or API base URL.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-deepseek-account",
|
|
3
3
|
"description": "Read account state and resolve official API credentials",
|
|
4
|
-
"version": "0.2.1-alpha.
|
|
4
|
+
"version": "0.2.1-alpha.4",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
],
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
36
|
-
"@deepseek-ai/dsh-brand": "0.2.1-alpha.
|
|
37
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.
|
|
38
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
35
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
36
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.4",
|
|
37
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.4",
|
|
38
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
42
|
-
"@deepseek-ai/dsh-brand": "0.2.1-alpha.
|
|
43
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.
|
|
44
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
41
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
42
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.4",
|
|
43
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.4",
|
|
44
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.4"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"@deepseek-ai/dsh-agent": {
|