The only browser-trust guard covered host.pickDirectory, while the consequential methods (session.prompt drives bash) accepted any Host — open to DNS rebinding, where a rebound page reads and writes the API as if same-origin and only the Host header betrays the attacker's domain. The pickDirectory-specific loopback guard becomes a prefix-wide fence: Host must be loopback or an exact host[:port] from the new trustedHosts config, an attached Origin must equal that authority, and explicit cross-site markers are refused; requests without browser markers (curl, tests, native clients) pass, because without a browser there is no confused deputy. The loopback-socket check is dropped — binding policy expresses reachability, and the fence is not an auth layer. The Agent Note records the full threat model and the alternatives.
57 lines
1.5 KiB
JSON
57 lines
1.5 KiB
JSON
{
|
|
"name": "@deepseek-ai/dsh-client-connection",
|
|
"description": "Wire consumer layer: IApiClient subclasses, ConnectionController (SSE dual-stream + reconnect), fixture api (no cordis)",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "lib/index.js",
|
|
"types": "lib/types/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./lib/types/index.d.ts",
|
|
"default": "./lib/index.js"
|
|
},
|
|
"./invariant": {
|
|
"types": "./lib/types/invariant.d.ts",
|
|
"default": "./lib/invariant.js"
|
|
},
|
|
"./client": {
|
|
"types": "./lib/types/client/index.d.ts",
|
|
"default": "./lib/client.js"
|
|
},
|
|
"./src/*": "./src/*",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"dshClient": {
|
|
"inject": [],
|
|
"platform": "web",
|
|
"immediately": true
|
|
},
|
|
"license": "BSD-3-Clause",
|
|
"dependencies": {
|
|
"@deepseek-ai/dsh-host-apiproxy": "workspace:^",
|
|
"@deepseek-ai/dsh-llm": "workspace:^",
|
|
"@deepseek-ai/dsh-session": "workspace:^",
|
|
"@deepseek-ai/dsh-tools": "workspace:^",
|
|
"schemastery": "^3.18.0"
|
|
},
|
|
"files": [
|
|
"lib/index.js",
|
|
"lib/invariant.js",
|
|
"lib/client.js",
|
|
"lib/types/**/*.d.ts",
|
|
"lib/types/**/*.d.ts.map",
|
|
"src"
|
|
],
|
|
"peerDependencies": {
|
|
"@deepseek-ai/dsh-host-webserver": "^0.0.1",
|
|
"@deepseek-ai/dsh-invariants": "^0.0.1",
|
|
"cordis": "^4.0.0-rc.7"
|
|
},
|
|
"devDependencies": {
|
|
"@deepseek-ai/dsh-host-webserver": "workspace:^",
|
|
"@deepseek-ai/dsh-invariants": "workspace:^",
|
|
"cordis": "^4.0.0-rc.7"
|
|
}
|
|
}
|