@sparkelf/dsh-patch-browser-auth-mode 0.1.0-rc.13 → 0.1.0-rc.22

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 CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write patches/npm/browser-auth-mode/README.md
5
- README.md: 6e514a93ca25599c0daa2f5607bd5eb4db098575
6
- README.zh.md: 861ecc1f3695f77852919da5fc4b984e98b77db8
5
+ README.md: 4f4c0f8d9a14eb9318fc4eedeab899b2e37ede54
6
+ README.zh.md: cb9910445171567bcc0b9d17f8aee7d6d0e40753
package/README.md CHANGED
@@ -6,4 +6,4 @@ This data-only package adds one explicit `browserAuthentication: required | disa
6
6
 
7
7
  Plus selects `disabled` because its accepted local Web workflow prioritizes direct access over browser identity. This exposes the complete Host API, including Shell, files, and Sessions, to every process that can reach an accepted authority; it does not only affect DataOps. The shipped CLI still binds loopback and rejects `--host 0.0.0.0`, while custom trusted authorities remain a deployment responsibility.
8
8
 
9
- The target is exact official source base `0a53fb55bea101816fa226bb964ae2bed71c343b`. The package has no JavaScript entry, lifecycle script, credential material, or fallback variant. Retire it when official DSH exposes an equivalent profile-selected browser-authentication policy.
9
+ The target is exact official source base `d347e703908d0406b7a7ef80e3a0e594d86b2215`. The package has no JavaScript entry, lifecycle script, credential material, or fallback variant. Retire it when official DSH exposes an equivalent profile-selected browser-authentication policy.
package/README.zh.md CHANGED
@@ -6,4 +6,4 @@
6
6
 
7
7
  Plus选择`disabled`,因为其accepted local Web workflow优先保证直接访问,不保留browser identity。该选择会把包含Shell、files与Sessions在内的完整Host API开放给所有能访问accepted authority的进程,并非只影响DataOps。shipped CLI仍绑定loopback并拒绝`--host 0.0.0.0`,custom trusted authorities仍由deployment负责。
8
8
 
9
- target是exact official source base `0a53fb55bea101816fa226bb964ae2bed71c343b`。本package没有JavaScript entry、lifecycle script、credential material或fallback variant。official DSH暴露等价profile-selected browser-authentication policy后retire本package。
9
+ target是exact official source base `d347e703908d0406b7a7ef80e3a0e594d86b2215`。本package没有JavaScript entry、lifecycle script、credential material或fallback variant。official DSH暴露等价profile-selected browser-authentication policy后retire本package。
package/package.json CHANGED
@@ -4,11 +4,11 @@
4
4
  "formatVersion": 1,
5
5
  "variants": [
6
6
  {
7
- "dsh": ">=0.1.2-alpha.2",
7
+ "dsh": ">=0.1.3-alpha.1",
8
8
  "file": "./patches/browser-auth-mode.patch",
9
9
  "id": "browser-authentication-policy-mode",
10
10
  "target": {
11
- "baseRevision": "0a53fb55bea101816fa226bb964ae2bed71c343b",
11
+ "baseRevision": "d347e703908d0406b7a7ef80e3a0e594d86b2215",
12
12
  "kind": "dsh-source",
13
13
  "paths": [
14
14
  "packages/client/connection/"
@@ -31,5 +31,5 @@
31
31
  "url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
32
32
  },
33
33
  "type": "module",
34
- "version": "0.1.0-rc.13"
34
+ "version": "0.1.0-rc.22"
35
35
  }
@@ -1,25 +1,25 @@
1
1
  diff --git a/packages/client/connection/README.i18n.yaml b/packages/client/connection/README.i18n.yaml
2
- index 528a378161..8baa29134d 100644
2
+ index e1e4ff6e1c..36cdef1d32 100644
3
3
  --- a/packages/client/connection/README.i18n.yaml
4
4
  +++ b/packages/client/connection/README.i18n.yaml
5
5
  @@ -2,5 +2,5 @@
6
6
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
7
7
  # after editing either side, bring the other along and re-record with:
8
8
  # pnpm run verify-translation-pairing --write packages/client/connection/README.md
9
- -README.md: ee0566bf811a0bad32f7d59b4c8849e26efea613
10
- -README.zh.md: 48425a428247b7749bf0dd75f592b5f7e4088ef2
11
- +README.md: 6454dfa7d8d69a10480f9bd310325300f7c9cec0
12
- +README.zh.md: 9fd600d1fcf3d9ade970436e544a7d9c3b67fac4
9
+ -README.md: 91e96a34d15463fd4246bf8fd8aee6112aaa54c4
10
+ -README.zh.md: fc6686e688170427528cb51db51e166f3c447f26
11
+ +README.md: 4abcf01ffc9a4bed9e6b8499e7fe6ea7f8efd2f7
12
+ +README.zh.md: 8584c9063d1fd941a13ae9bd14c5ff58067e0778
13
13
  diff --git a/packages/client/connection/README.md b/packages/client/connection/README.md
14
- index ee0566bf81..6454dfa7d8 100644
14
+ index 91e96a34d1..4abcf01ffc 100644
15
15
  --- a/packages/client/connection/README.md
16
16
  +++ b/packages/client/connection/README.md
17
17
  @@ -25,18 +25,18 @@ The package carries browser-to-Host Remote calls, exact Fetch responses, and con
18
18
  <a id="use-this-package"></a>
19
19
  ## Use this package
20
20
 
21
- -The browser uses HTTP POST for Remote unary calls. API Gateway owns the `/api/remote.mux` WebSocket and its logical streams; in-process compositions provide equivalent Remote streams through `connection.rpc.open` without opening a WebSocket. The Host half owns the sole `/api` route, Fetch bridge, browser authentication, Host/Origin checks, and exact `GET`/`HEAD` route registry. Typert Gateway claims generated Remote endpoints, feature packages register non-JSON responses such as Session-log downloads, and unclaimed requests return 404. Loopback hostname classification remains package-internal to the browser-facing Client state.
22
- +The browser uses HTTP POST for Remote unary calls. API Gateway owns the `/api/remote.mux` WebSocket and its logical streams; in-process compositions provide equivalent Remote streams through `connection.rpc.open` without opening a WebSocket. The Host half owns the sole `/api` route, Fetch bridge, browser-authentication policy, Host/Origin checks, and exact `GET`/`HEAD` route registry. Typert Gateway claims generated Remote endpoints, feature packages register non-JSON responses such as Session-log downloads, and unclaimed requests return 404. Loopback hostname classification remains package-internal to the browser-facing Client state.
21
+ -The browser uses HTTP POST for Remote unary calls. API Gateway owns the `/api/remote.mux` WebSocket and its logical streams; in-process compositions provide equivalent Remote streams through `connection.rpc.open` without opening a WebSocket. The Host half owns the sole `/api` route, Fetch bridge, browser authentication, Host/Origin checks, and exact `GET`/`HEAD`/`POST` route registry. Each exact route declares buffered or streaming request-body handling before the bridge reads any bytes. Typert Gateway claims generated Remote endpoints, feature packages register non-JSON responses such as Session-log downloads and raw file uploads, and unclaimed requests return 404. Loopback hostname classification remains package-internal to the browser-facing Client state. Browser raw-body transfer is provided by [`dsh-client-file-upload`](../file-upload/README.md).
22
+ +The browser uses HTTP POST for Remote unary calls. API Gateway owns the `/api/remote.mux` WebSocket and its logical streams; in-process compositions provide equivalent Remote streams through `connection.rpc.open` without opening a WebSocket. The Host half owns the sole `/api` route, Fetch bridge, browser-authentication policy, Host/Origin checks, and exact `GET`/`HEAD`/`POST` route registry. Each exact route declares buffered or streaming request-body handling before the bridge reads any bytes. Typert Gateway claims generated Remote endpoints, feature packages register non-JSON responses such as Session-log downloads and raw file uploads, and unclaimed requests return 404. Loopback hostname classification remains package-internal to the browser-facing Client state. Browser raw-body transfer is provided by [`dsh-client-file-upload`](../file-upload/README.md).
23
23
 
24
24
  -----
25
25
 
@@ -38,15 +38,15 @@ index ee0566bf81..6454dfa7d8 100644
38
38
  <a id="connection-generation"></a>
39
39
  ## Connection generation
40
40
  diff --git a/packages/client/connection/README.zh.md b/packages/client/connection/README.zh.md
41
- index 48425a4282..9fd600d1fc 100644
41
+ index fc6686e688..8584c9063d 100644
42
42
  --- a/packages/client/connection/README.zh.md
43
43
  +++ b/packages/client/connection/README.zh.md
44
44
  @@ -25,18 +25,18 @@ kind: "package-reference"
45
45
  <a id="use-this-package"></a>
46
46
  ## 使用本包
47
47
 
48
- -浏览器通过 HTTP POST 执行 Remote 一元调用;API Gateway 自己拥有 `/api/remote.mux` WebSocket 及其逻辑流。进程内组合通过 `connection.rpc.open` 提供等价的 Remote 流,不打开 WebSocket。Host half 拥有唯一 `/api` route、Fetch bridge、浏览器认证、Host/Origin 校验与精确 `GET`/`HEAD` 路由注册表。Typert Gateway 认领生成的 Remote endpoint,功能包注册 Session 日志下载等非 JSON 响应,未认领的请求返回 404。Loopback hostname 判定只供浏览器侧当前页面状态使用,留在包内。
49
- +浏览器通过 HTTP POST 执行 Remote 一元调用;API Gateway 自己拥有 `/api/remote.mux` WebSocket 及其逻辑流。进程内组合通过 `connection.rpc.open` 提供等价的 Remote 流,不打开 WebSocket。Host half 拥有唯一 `/api` route、Fetch bridge、浏览器认证策略、Host/Origin 校验与精确 `GET`/`HEAD` 路由注册表。Typert Gateway 认领生成的 Remote endpoint,功能包注册 Session 日志下载等非 JSON 响应,未认领的请求返回 404。Loopback hostname 判定只供浏览器侧当前页面状态使用,留在包内。
48
+ -浏览器通过 HTTP POST 执行 Remote 一元调用。API Gateway 自己拥有 `/api/remote.mux` WebSocket 及其逻辑流。进程内组合通过 `connection.rpc.open` 提供等价的 Remote 流,不打开 WebSocket。Host half 拥有唯一 `/api` route、Fetch bridge、浏览器认证、Host/Origin 校验与精确 `GET`/`HEAD`/`POST` 路由注册表。每条精确路由会在 bridge 读取任何字节前声明缓冲或流式请求体处理方式。Typert Gateway 认领生成的 Remote endpoint,功能包注册 Session 日志下载、原始文件上传等非 JSON 响应,未认领的请求返回 404。Loopback hostname 判定只供浏览器侧当前页面状态使用,留在包内。浏览器原始请求体传输由 [`dsh-client-file-upload`](../file-upload/README.zh.md) 提供。
49
+ +浏览器通过 HTTP POST 执行 Remote 一元调用。API Gateway 自己拥有 `/api/remote.mux` WebSocket 及其逻辑流。进程内组合通过 `connection.rpc.open` 提供等价的 Remote 流,不打开 WebSocket。Host half 拥有唯一 `/api` route、Fetch bridge、浏览器认证策略、Host/Origin 校验与精确 `GET`/`HEAD`/`POST` 路由注册表。每条精确路由会在 bridge 读取任何字节前声明缓冲或流式请求体处理方式。Typert Gateway 认领生成的 Remote endpoint,功能包注册 Session 日志下载、原始文件上传等非 JSON 响应,未认领的请求返回 404。Loopback hostname 判定只供浏览器侧当前页面状态使用,留在包内。浏览器原始请求体传输由 [`dsh-client-file-upload`](../file-upload/README.zh.md) 提供。
50
50
 
51
51
  -----
52
52
 
@@ -100,7 +100,7 @@ index 10353d9a06..dbeb256022 100644
100
100
  private readonly maxAgeMilliseconds: number
101
101
 
102
102
  diff --git a/packages/client/connection/src/index.ts b/packages/client/connection/src/index.ts
103
- index 34cf79bd65..6bed1e1c9a 100644
103
+ index a274cef190..b4ff8cfda6 100644
104
104
  --- a/packages/client/connection/src/index.ts
105
105
  +++ b/packages/client/connection/src/index.ts
106
106
  @@ -8,7 +8,7 @@ import type { WebRoute } from '@deepseek-ai/dsh-host-webserver'
@@ -112,7 +112,7 @@ index 34cf79bd65..6bed1e1c9a 100644
112
112
  import { HostConnectionService } from './rpc-host.ts'
113
113
 
114
114
  export type {
115
- @@ -77,6 +77,8 @@ export interface ConnectionConfig {
115
+ @@ -78,6 +78,8 @@ export interface ConnectionConfig {
116
116
  * bind. An entry that is not a bare, canonical authority fails plugin load.
117
117
  */
118
118
  trustedHosts?: string[]
@@ -121,7 +121,7 @@ index 34cf79bd65..6bed1e1c9a 100644
121
121
  /** Absolute browser-session lifetime in days. Default: 30. */
122
122
  cookieMaxAgeDays?: number
123
123
  /** Maximum buffered JSON body for every `/api` request. Default: 300 MiB. */
124
- @@ -85,6 +87,7 @@ export interface ConnectionConfig {
124
+ @@ -86,6 +88,7 @@ export interface ConnectionConfig {
125
125
 
126
126
  export const Config: z<ConnectionConfig> = z.object({
127
127
  trustedHosts: z.array(String).default([]),
@@ -129,7 +129,7 @@ index 34cf79bd65..6bed1e1c9a 100644
129
129
  cookieMaxAgeDays: z.natural().min(1).default(30),
130
130
  maxRequestBodyBytes: z.natural().min(1).default(DEFAULT_MAX_REQUEST_BODY_BYTES),
131
131
  })
132
- @@ -99,16 +102,21 @@ export const Config: z<ConnectionConfig> = z.object({
132
+ @@ -100,16 +103,21 @@ export const Config: z<ConnectionConfig> = z.object({
133
133
  export async function apply(ctx: Context, config?: ConnectionConfig): Promise<void> {
134
134
  // The Loader resolves schema defaults; hand-built test contexts may pass none.
135
135
  const trustedHosts = config?.trustedHosts ?? []
@@ -153,11 +153,11 @@ index 34cf79bd65..6bed1e1c9a 100644
153
153
  const fetchHandler = connection.createSharedFetchHandler(API_PATH)
154
154
  const route: WebRoute = {
155
155
  diff --git a/packages/client/connection/src/rpc-host.ts b/packages/client/connection/src/rpc-host.ts
156
- index a9bbc72954..486c669ea2 100644
156
+ index d74734e132..df5dc854fb 100644
157
157
  --- a/packages/client/connection/src/rpc-host.ts
158
158
  +++ b/packages/client/connection/src/rpc-host.ts
159
159
  @@ -11,7 +11,7 @@ import { clientRequestSchema } from './rpc-schema.ts'
160
- import { bridge, type FetchHandler } from './http-bridge.ts'
160
+ import { bridge } from './http-bridge.ts'
161
161
  import { isTrustedApiRequest } from './api-request-trust.ts'
162
162
  import { API_PATH } from './api-path.ts'
163
163
  -import type { BrowserAuth } from './browser-auth.ts'
@@ -165,7 +165,7 @@ index a9bbc72954..486c669ea2 100644
165
165
  import type {
166
166
  ConnectionIndexRequest,
167
167
  ConnectionIndexResponse,
168
- @@ -64,12 +64,12 @@ export class HostConnectionService extends Service implements HostConnectionHand
168
+ @@ -65,12 +65,12 @@ export class HostConnectionService extends Service implements HostConnectionHand
169
169
  * Provide the Host half over the active HTTP server.
170
170
  * @param ctx - owning Connection plugin context.
171
171
  * @param trustedHosts - deployment authorities accepted by the Host/Origin fence.