@sparkelf/dsh-patch-browser-auth-mode 0.2.0-rc.20 → 0.2.0-rc.21
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/package.json +3 -3
- package/patches/browser-auth-mode.patch +12 -12
package/package.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"formatVersion": 1,
|
|
5
5
|
"variants": [
|
|
6
6
|
{
|
|
7
|
-
"dsh": ">=0.1.
|
|
7
|
+
"dsh": ">=0.1.7-alpha.2",
|
|
8
8
|
"file": "./patches/browser-auth-mode.patch",
|
|
9
9
|
"id": "browser-authentication-policy-mode",
|
|
10
10
|
"target": {
|
|
11
|
-
"baseRevision": "
|
|
11
|
+
"baseRevision": "00102833dfaee1da9f48a3a8eae9d34005a75218",
|
|
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.2.0-rc.
|
|
34
|
+
"version": "0.2.0-rc.21"
|
|
35
35
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/packages/client/connection/src/browser-auth.ts b/packages/client/connection/src/browser-auth.ts
|
|
2
|
-
index
|
|
2
|
+
index 5691180d96..823c23debf 100644
|
|
3
3
|
--- a/packages/client/connection/src/browser-auth.ts
|
|
4
4
|
+++ b/packages/client/connection/src/browser-auth.ts
|
|
5
5
|
@@ -177,12 +177,29 @@ async function initializeSecret(credentials: CredentialProvider): Promise<Buffer
|
|
@@ -34,10 +34,10 @@ index 10353d9a06..dbeb256022 100644
|
|
|
34
34
|
private readonly maxAgeMilliseconds: number
|
|
35
35
|
|
|
36
36
|
diff --git a/packages/client/connection/src/index.ts b/packages/client/connection/src/index.ts
|
|
37
|
-
index
|
|
37
|
+
index 647174f743..1ee4898b58 100644
|
|
38
38
|
--- a/packages/client/connection/src/index.ts
|
|
39
39
|
+++ b/packages/client/connection/src/index.ts
|
|
40
|
-
@@ -
|
|
40
|
+
@@ -9,7 +9,7 @@ import type { WebRoute } from '@deepseek-ai/dsh-host-webserver'
|
|
41
41
|
import { API_PATH } from './api-path.ts'
|
|
42
42
|
import { bridge, DEFAULT_MAX_REQUEST_BODY_BYTES } from './http-bridge.ts'
|
|
43
43
|
import { assertTrustedAuthority } from './api-request-trust.ts'
|
|
@@ -46,7 +46,7 @@ index 98a4354760..b895a649c2 100644
|
|
|
46
46
|
import { HostConnectionService } from './rpc-host.ts'
|
|
47
47
|
import { ConnectionRecoveryConfigSchema, resolveConnectionConfig, type ConnectionRecoveryConfig } from './recovery-config.ts'
|
|
48
48
|
|
|
49
|
-
@@ -
|
|
49
|
+
@@ -101,6 +101,8 @@ export interface ConnectionConfig {
|
|
50
50
|
* bind. An entry that is not a bare, canonical authority fails plugin load.
|
|
51
51
|
*/
|
|
52
52
|
trustedHosts?: string[]
|
|
@@ -55,7 +55,7 @@ index 98a4354760..b895a649c2 100644
|
|
|
55
55
|
/** Absolute browser-session lifetime in days. Default: 30. */
|
|
56
56
|
cookieMaxAgeDays?: number
|
|
57
57
|
/** Maximum buffered JSON body for every `/api` request. Default: 300 MiB. */
|
|
58
|
-
@@ -
|
|
58
|
+
@@ -110,6 +112,7 @@ export interface ConnectionConfig {
|
|
59
59
|
export const Config: z<ConnectionConfig> = z.object({
|
|
60
60
|
recovery: ConnectionRecoveryConfigSchema.default({}),
|
|
61
61
|
trustedHosts: z.array(String).default([]),
|
|
@@ -63,7 +63,7 @@ index 98a4354760..b895a649c2 100644
|
|
|
63
63
|
cookieMaxAgeDays: z.natural().min(1).default(30),
|
|
64
64
|
maxRequestBodyBytes: z.natural().min(1).default(DEFAULT_MAX_REQUEST_BODY_BYTES),
|
|
65
65
|
})
|
|
66
|
-
@@ -
|
|
66
|
+
@@ -125,16 +128,21 @@ export async function apply(ctx: Context, config?: ConnectionConfig): Promise<vo
|
|
67
67
|
const recovery = resolveConnectionConfig(config?.recovery)
|
|
68
68
|
// The Loader resolves schema defaults; hand-built test contexts may pass none.
|
|
69
69
|
const trustedHosts = config?.trustedHosts ?? []
|
|
@@ -87,19 +87,19 @@ index 98a4354760..b895a649c2 100644
|
|
|
87
87
|
ctx.inject(['webServer'], (webCtx) => {
|
|
88
88
|
assertImageBodyCapacity(webCtx, maxRequestBodyBytes)
|
|
89
89
|
diff --git a/packages/client/connection/src/rpc-host.ts b/packages/client/connection/src/rpc-host.ts
|
|
90
|
-
index
|
|
90
|
+
index 0f98bc1f19..1fc5c528a7 100644
|
|
91
91
|
--- a/packages/client/connection/src/rpc-host.ts
|
|
92
92
|
+++ b/packages/client/connection/src/rpc-host.ts
|
|
93
|
-
@@ -
|
|
93
|
+
@@ -12,7 +12,7 @@ import { clientRequestSchema } from './rpc-schema.ts'
|
|
94
94
|
import { bridge } from './http-bridge.ts'
|
|
95
95
|
import { isTrustedApiRequest } from './api-request-trust.ts'
|
|
96
96
|
import { API_PATH } from './api-path.ts'
|
|
97
97
|
-import type { BrowserAuth } from './browser-auth.ts'
|
|
98
98
|
+import type { BrowserAuthentication } from './browser-auth.ts'
|
|
99
|
+
import { OperatorPeer } from './operator-peer.ts'
|
|
99
100
|
import type {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
@@ -65,12 +65,12 @@ export class HostConnectionService extends Service implements HostConnectionHand
|
|
101
|
+
PeerAdmission,
|
|
102
|
+
@@ -70,12 +70,12 @@ export class HostConnectionService extends Service implements HostConnectionHand
|
|
103
103
|
* Provide the Host half over the active HTTP server.
|
|
104
104
|
* @param ctx - owning Connection plugin context.
|
|
105
105
|
* @param trustedHosts - deployment authorities accepted by the Host/Origin fence.
|
|
@@ -113,4 +113,4 @@ index d74734e132..df5dc854fb 100644
|
|
|
113
113
|
+ private readonly browserAuth: BrowserAuthentication,
|
|
114
114
|
) {
|
|
115
115
|
super(ctx, 'connection')
|
|
116
|
-
|
|
116
|
+
this.operator = new OperatorPeer(ctx)
|