Install / Update
Install the dsh-context plugin on DeepSeek Harness with released NPM package:
dsh plugin --profile web add dsh-context@latestUpdate the dsh-context plugin:
dsh plugin --profile web update dsh-context@latestWhat's New
Three headline areas this release: the Current Context bar's right-side reserve becomes two segments(#104 ), the Context browser learns to handle non-image file attachments, and a performance overhaul that ends the long-session freeze reported in #145.
Features
- The Current Context reserve splits from one band into two real reservations (#104)— the bar used to show a single hatched band mirroring dsh's default 80% threshold ratio, which read wrong whenever the pressure budget binds instead (small windows, or a large routed output cap). It now tiles the window's end with the two reservations the harness actually spends, priced by dsh-compaction-basic's own
min()rule:- Compaction headroom (mirrored default 65,536 tokens, pointed at the upstream default), then LLM output reservation — the routed request's output cap read from the durable
request/header's materializedconfig.maxTokens, never guessed, and described as the model's max output tokens. - Both masks render at true size with matching hatching; when the 80% ratio detaches from the masks, a trigger line marks where auto-compaction is expected to fire (stated as expected, not certain). A deployment whose route dsh refuses reserves nothing.
- The bar's tooltip grows into three named rows (head / figure / note) shared by all four hover kinds.
- Compaction headroom (mirrored default 65,536 tokens, pointed at the upstream default), then LLM output reservation — the routed request's output cap read from the durable
- The Context browser supports and upgrades non-image file attachments — a user message's image and file blocks now render as one ordered attachment block:
- Images keep their session-authorized thumbnail; other files show a type glyph, extension, and stored size; the row chip counts every attachment.
- One click previews through dsh's own preview column — markdown, code, PDF, office, and image viewers open under the file's real name, resolved by the plugin's new
/api/dsh-context/attachmentroute (same authenticated/apifence and cold-read gate as the detail route; answers only an attachment the session's own log cites, via a published-or-reused named hard link in a disposable cache). A refused or unavailable open reports on that card alone. - File attachments are now priced like the model sees them: dsh hands the model a
fileHandleTexthandle, so a file block costs a fixed ~60 tokens whatever its size — shown beside the size as an estimate (≈), exactly the token meter's own text arm.
- Insights page polish — an update capsule joins the page head beside the balance capsule (one shared newer-version read); every bar in the usage chart prints its own day's tokens; the task board and comms cards fold under measured caps with edge fades.
Fixes
- #145: opening a long session or the Context Insights page no longer freezes the desktop — a 27,735-event session with 111 stored sessions reproduced the report: the projection backfill folded whole logs as uninterruptible synchronous blocks (~1s per 30k events) at ~60% duty for 47 seconds, and the renderer watchdog killed the page. All three paths are fixed, with byte-identical results asserted against the current folds:
- The backfill folds monster sessions in 2,000-event slices, yielding between slices and writing the cache rows back once at the end — final rows byte-identical to a single-shot fold, no partial rows ever durable, and identical crash semantics. Max single stall measured 994ms → 170ms; any face missing on an older harness falls back to the previous whole-log path (probed present on both supported baselines).
- The pass paces itself proportionally to measured work (≤~50% duty) and takes a logged, self-resuming recovery pause every 8s of fold work (
projection backfill pausing after Ns of fold work; resuming in Ns) — the scan is now visibly bounded and background-driven, exactly as the report asked. All 118 sessions' rows ready in 10.7s, interactively, versus a 16.8s near-death window in simulation. - Cold
/detailreads yield every 1,000 events and cache the payload by durable revision (the same trust tuple dsh's own observation reader uses: persistence instance, session id, revision) — a repeated cold open drops from a ~340ms synchronous refold to ~1ms, with stale serves structurally impossible. - Bonus effect: with backfilled rows in place, opening a long session attaches with zero refold (the rows already sit at the log's end).
- Composition-bar accuracy — reserve masks renamed to Compaction Headroom and LLM Output Reservation, hatched consistently, and priced per the routed request's own envelope.
Changes
docs/compatibility.mdrewritten as a staged, evidence-anchored rule set, now recording the attachment preview route and the sliced cold fold's face rule (probed per baseline).- Build/CI chores: the pre-commit gate runs lint + typecheck + coverage as one parallel check; typecheck restored in both workflows and covers
tsdown.config.ts; redundant directtailwindcssdependency dropped.
Notes
- The timeline projection's
stateVersionbumps 27 → 28 (the output cap now folds offrequest/header): cached rows refold from the durable log on the next Context Insights open — the warm-up does this in the background, so the first page open after upgrading may fill progressively over a few seconds. - One residual boundary for #145: attaching a monster session that has never been folded by any process still costs one whole-log synchronous fold inside the harness's own
hydratePrepared(upstream scope; warm cache rows make it a no-op in every normal flow, and this release's backfill keeps them warm).
Commits
- feat(client): fold the task board and comms cards under measured caps (3fef32e)
- feat(client): add an update capsule to the Insights page head (018e929)
- feat(client): print each day's tokens on its own bar in the usage chart (e4b3012)
- chore(build): drop redundant tailwindcss direct dependency (a1772d9)
- docs(compatibility): record dependency constraints invisible to static audit (fd8e3b8)
- doc(readme): update agent network screenshot image (31aa178)
- doc(readme): update agent network screenshot image (d9f4829)
- doc(readme): update agent network screenshot image (0e12475)
- doc(agents): enhance guidance on using codegraph queries effectively (a1d3276)
- feat(client): split the Current Context reserve into headroom and output masks (e421a35)
- fix(client): reserve nothing when dsh refuses the route, per code review (fc01269)
- feat(client): give the composition bar tooltip three named rows (1358603)
- feat(client): true-size reserve masks, with a trigger line when the ratio detaches it (863d3cd)
- doc(agents): improve build and run instructions for clarity and usability (68d20bf)
- feat(client): rename the reserve masks to Compaction Headroom and LLM Output Reservation (396ada8)
- fix(client): hatch the output reserve mask like the headroom one (d82cd04)
- fix(client): describe the output reserve as the model's max output tokens (1ff2610)
- doc(client): point the compaction headroom at its upstream default (39f510e)
- fix(client): state the compaction trigger as expected, not certain (a543885)
- feat(client): render message attachments in order and preview them in the sidebar (6487602)
- doc(readme): describe the ordered attachment cards (c0e2fb4)
- docs(compatibility): record the attachment preview route (ec76a22)
- style(client): put the preview invite over the thumbnail, not in the card facts (47f8ad4)
- style(client): calm the attachment cards, and stop re-reading thumbnails (f348196)
- docs(AGENTS): update linting and testing instructions for improved efficiency (c27d082)
- docs(AGENTS): add instructions for running individual tests with vitest (da43fe4)
- feat(client): price a file attachment by the handle the model receives (dd05bbd)
- ci: restore the typecheck gate in both workflows (d9d3868)
- chore(pre-commit): run lint, typecheck and coverage as one parallel gate (e0b42ee)
- chore(typecheck): include tsdown.config.ts in the test project (3f67d62)
- fix(client): report a file attachment's token estimate as ≈ instead of ≥ (bb29bca)
- docs(compatibility): rewrite as a staged, evidence-anchored rule set (b6037a6)
- fix(host): fold monster sessions in slices during projection backfill (issue #145) (8d74f6e)
- feat(host): pace the projection backfill proportionally with a logged work budget (issue #145) (f5ef57d)
- fix(host): yield during the cold detail fold and cache payloads by durable revision (issue #145) (5f20076)
- test(compat): pin the sliced cold fold's faces in the baseline matrix (issue #145) (6184f0f)
- chore: release v0.70.0 (854ce14)
v0.69.1...v0.70.0 · 36 commits
Contributors
- @bowenliang123
- @Sakimi36 — the long-session freeze report with full host-log forensics (#145)