rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:kevindawn11-hash/dsh-cookie-guard
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A tiny fix for DeepSeek Harness Desktop: it caps the lifetime of the desktop
browser-session cookies (dsh-auth-*) from the default 30 days to 7 days, so
stale cookies can no longer pile up and overflow the request header — a failure
that prevents the app from starting at all.
app.asar).At launch the app shows:
DeepSeek Harness is unavailable
The application could not start or stopped unexpectedly.
The diagnostic report (%APPDATA%\@deepseek-ai\dsh-desktop\logs\crash-*-host.log)
contains either:
desktop welcome: Web authentication failed
or the host logs an HTTP 431 (Request Header Fields Too Large).
Not an account, network or plugin issue — it is unbounded cookie growth:
@deepseek-ai/dsh-client-connection names its cookie
"dsh-auth-" + sha256(host:port) — one cookie per authority, port included.--port 0 (main() in
dsh-desktop-host), so every start gets a new random port.cookieMaxAgeDays: 30 and nothing ever prunes them.net.fetch, which sends
every historical dsh-auth-* cookie in one Cookie header.maxHeaderSize defaults to 16 KB; one cookie is ≈200 B, so
~90 cookies overflow the header, the Host answers 431 and Electron throws
desktop welcome: Web authentication failed.Measured: 71 cookies (~12 KB) accumulated in 13 days were enough to reproduce.
At 3–5 launches/day, any long-term desktop user hits this within a month.
Web mode uses a fixed port and is unaffected — this is desktop-only, present in
both 0.2.1-rc.3 and rc.5.
Requires Node.js >= 22 and a DSH build that ships the desktop profile
(0.2.1-rc.3 and later).
dsh plugin --profile desktop add dsh-cookie-guard
Then restart DeepSeek Harness. This is the same install path the community
plugin markets use (dsh-plugin.org, dsh-market).
dsh plugin --profile desktop add github:kevindawn11-hash/dsh-cookie-guard
cd $env:USERPROFILE\.dsh\profiles\desktop
pnpm add dsh-cookie-guard
Append "dsh-cookie-guard" to dsh.profile.bundles in the same package.json,
then restart DeepSeek Harness.
With DSH fully closed:
node tools/prune-cookies.mjs
The script backs up Network\Cookies, then deletes every dsh-auth-* row.
The next launch issues a fresh cookie and the app recovers.
The package is just a bundle patch:
- id: connection
config:
cookieMaxAgeDays: 7
DSH applies bundle patches after @deepseek-ai/dsh-web-app, so this overrides the
connection node's config. A 7-day lifetime means at most "launches in 7 days"
cookies (< 35, ~7 KB), far from the 16 KB ceiling, while still covering sessions
that stay open for a week.
Use 1 for a tighter cap (daily restarts, but sessions older than a day expire);
increase it if you keep the app open longer.
After a restart:
node -e "const{DatabaseSync}=require('node:sqlite');const db=new DatabaseSync(process.env.APPDATA+'\\@deepseek-ai\\dsh-desktop\\Network\\Cookies');console.log(db.prepare(\"select name,expires_utc from cookies where name like 'dsh-auth-%'\").all())"
Chromium timestamps are microseconds since 1601.
A plugin runs inside the Host process; it cannot read or delete the Electron main process's Chromium cookie store (exclusively locked at runtime). So a plugin can only cap growth, not clean history. A real fix belongs upstream — two minimal options are in docs/upstream-issue.md:
dsh-auth-* cookies before host.start();127.0.0.1) so each start
overwrites the same cookie instead of adding one.| DSH Desktop | Status |
|---|---|
| 0.2.1-rc.3 | reproduces, patch works |
| 0.2.1-rc.5 | reproduces, patch works |
Desktop (packaged Windows/macOS) only; CLI / dsh web is unaffected.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。