Files
deepseek-harness/packages/host
LegGasai 50fde0cb2a fix(web): expire other ports' auth cookies at browser sign-in
Browsers send one hostname's cookies to every port, and each `dsh web`
port names its 30-day cookie after its own authority. A browser that
signed in to about 70 ports therefore sent more than Node.js's 16,384
bytes of request headers to every local Host and received HTTP 431
before any handler ran.

A successful root token exchange now also expires the other
authorities' generated-name cookies its request carries, except the 16
with the latest claimed issue time. Cookie names, format, lifetime and
the `/connect` exchange are unchanged, and a sign-in with nothing to
expire answers with the same single Set-Cookie value as before.

Measured with Chromium 149 against a real `dsh web`: a jar of 69
cookies (15,515 bytes of Cookie header) shrinks to 18 (3,887 bytes)
after one sign-in, and two Hosts on different ports stay signed in
together. A browser already over the limit still receives 431 until
its site data for that hostname is cleared.
2026-11-20 14:34:53 +08:00
..
2026-11-18 17:43:56 +08:00
2026-10-08 19:49:01 +08:00

description, kind
description kind
Package map for the web GUI host half: the HTTP and SPA servers, workspace-directory picking implementations, the open-in-app launch routes, the plugin inventory projection, and explicit product event reporting. package-group

host/ — web-GUI host half

English | 中文

Summary

The host/ group provides the web GUI's HTTP(S) server, the SPA dist server that serves the built Web shell, the workspace-directory picking seam with its native, browse, and adaptive composition packages, the open-in-app application probe and launch routes, the read-only plugin inventory projection, and explicit product event reporting. These packages are product packages; the browser transport lives in client/, and the composed application is apps/cli booting the dsh-base bundle that serves the web app under apps/web/. The picker backends replace one another behind the shared seam.

Table of Contents


Packages

The packages play the host roles; each package README owns its contract and configuration.

Package Role ctx key
webserver/ Browser HTTP server: named routes, upgrades, index taps, and the fallback seat ctx.webServer
frontend-static/ SPA dist server on the webserver fallback seat consumes ctx.webServer
directory-picker/ Workspace-directory picking seam: capability contract and error vocabulary ctx.directoryPicker
directory-picker-native/ Native-OS-chooser backend for operators at the host display registers ctx.directoryPicker
directory-picker-browse/ In-app directory-browser backend, including for remote clients registers ctx.directoryPicker
directory-picker-auto/ Host-adaptive chooser that mounts the matching backend at boot mounts a backend
open-in-app/ Application probe, icon, and launch routes opening the workspace directory in an installed application consumes ctx.webServer
plugin-inventory/ Read-only projection of current Loader entries Remote pluginInventory/list
product-telemetry-otel/ Explicit product usage events over OTLP/HTTP ctx.productTelemetry

Start with the subsystem references for the transport and the workspace records, then the layering decision behind the Web client.

Dev Note

Working context for maintainers — click to expand

None.