Rules dsh-context holds on every supported @deepseek-ai/dsh release, and the evidence for each. Unmarked paths are in this repo; dsh: paths are in the harness tree read at the staged baseline tag (dsh-v0.2.0-rc.2, dsh-v0.2.1-rc.2, dsh-v0.2.2-rc.1, dsh-v0.2.2-rc.3) unless another tag is named. A .../ prefix continues the preceding path's directory. Source wins over this page.
Last verified: 2026-11-28 (dsh-context 0.88.0; dsh floors 0.2.0-rc.2, 0.2.1-rc.2, 0.2.2-rc.1, plus the staged 0.2.2-rc.3 release and the 0.2.1-rc.2…rc.5 and 0.2.2/master diffs).
- Support dsh
0.2.0-rc.2+,0.2.1-rc.2+,0.2.2-rc.1+,0.2.2-rc.3+. The first three are the per-line floors;0.2.2-rc.3+stages the0.2.2line's current release above its floor, so the matrix covers both the pre-refactorrc.1shapes and the post-refactor shapes staged atrc.3(identical betweenrc.2andrc.3for the staged seams).engines.dshand the dsh peers declare only the per-line floors as a union of>=terms, so the gate's effective floor is the lowest term,0.2.0-rc.2— adding a line term never raises it, and dropping a line means removing its term. Every staged baseline lives indsh.compatibility.dshReleases(declaration-only; nothing in dsh reads it) andtests/baselines.ts; §9 keeps the four in lockstep. - The
0.1.7line is dropped — refused by the gate where it runs, or §2's fallback with an upgrade prompt; never a fold. - Limitation — unstaged releases: the matrix stages the floors and
0.2.2-rc.3. Every other above-floor release — the above-floor patches0.2.1-rc.3…rc.5and0.2.2-rc.2, later lines, and sub-floor spellings such as0.2.2-alpha.3— is admitted and must keep working on the same path, without per-release staging evidence.
- The harness gate refuses an unmet manifest before install and before profile import — it first ships at
dsh-v0.1.7-rc.1, and earlier builds have none. From0.2.1-alpha.4and on the0.2.2line a declaredengines.dshdecides alone; the0.2.0line, gated0.1.7builds and pre-alpha.40.2.1read only the@deepseek-ai/dsh*peers (includePrerelease: true). Keep both declarations — peers are the only gate on0.2.0, engines on0.2.1-alpha.4+and0.2.2— so0.1.7is refused without an exemption. (dsh:packages/boot/app-boot/src/plugin-compatibility.ts,.../compatibility-preflight.ts,.../profile.ts,packages/boot/plugin-manager/src/operations.ts) - Enforce the floor again at runtime: pre-gate builds and exempted force-loads below
0.2.0-rc.2get zeroed fallback units plus the upgrade modal, never a fold. (src/host/version.ts,src/host/fallback.ts,src/client/components/upgradeGate.tsx) - Detect from the running module tree first; an undetectable version FAILS OPEN into the real units, and the home probe (the installed profile tree under
DSH_HOME) answers only when the running tree yields no witness. (src/host/version.ts,src/shared/version.ts) - Feature-detect
.volatile()so one bundle also loads, preferences inert, on a below-floor schemastery. (src/host/config.ts)
Durable events → projection state, host-side.
- One shape-driven fold path; the fold never branches on a detected harness version. (
src/host/fold.ts,src/host/logShapes.ts) - Trust the migration guarantee; carry no legacy readers — every read path migrates pre-V4 logs to V4; an unconvertible log is refused with
SessionFormatUnsupportedError, never served raw. (dsh:packages/session/session-format-v3-to-v4,packages/session/session-persistence/src/errors.ts) developer/messagefolds into injected context — never human inputs; an empty-content event keeps a zero-token surface node wherederiveEventMessageprojects null. (dsh:packages/core/session/src/surface.ts,packages/core/agent-loop/src/agent.ts;src/host/fold.ts)- Tool-result errors come from
message.isErroralone — dsh admitsdata.erroronly alongside it, so a hostile envelope-only row degrades to unflagged, never a throw. (dsh:packages/core/session/src/types.ts,.../surface.ts;src/host/fold.ts) - The command log folds
tool/call+tool/resulton every line andjob/registered/job/settledonly where they exist. The0.2.0line logs none, so exit/timing derive from envelopes and result-text markers (derived: true); the0.2.1+ job events replace that. A background hand-off ack (started background job …/[still running after …; moved to background job …]) is no outcome: without job events the run staysrunningand its runs/ms wait for a terminal transition. (dsh:packages/jobs/jobs/src/types.ts(0.2.1+),packages/shell/tool-bash/src/render.ts,packages/shell/tool-bash-persistent/src/index.ts,packages/shell/tool-pwsh/src/render.ts;src/shared/commands.ts,src/host/fold.ts) - Fleet delegations parse
subagent/catalogby shape, never by payload version — every catalog version carrieschildId/childCreatedAt/mode, so a version gate would drop a future catalog. Modes areone-shot | continuable | external | unknown(unknown= the v3→v4 migration's mode-less records);continuablewithout alabeldrops. (dsh:packages/subagent/subagent/src/catalog.ts,packages/session/session-format-v3-to-v4/src/migration.ts;src/host/fleet.ts) - Folds are TOTAL — unknown types return state unchanged, malformed events drop whole, and no
undefined-valued property is materialized. The registry has no error boundary: one throw stalls the unit's cells and push feed, oneundefinedproperty fails every projection-cache write for the session. (src/host/fold.ts;tests/compat/matrix.spec.ts) - Backfill ids for decision messages that would persist unidentified — a message event without a non-empty
idmakes the harness refuse the whole session at its next load; the prependedagent/pre-stepguard mintsdshctx-ids and fails open. (src/host/stepIdentity.ts; dsh:packages/core/session/src/index.tsassertMessageEventShape) - Attribute a tool to the use site of the tool-service access behind its registration, keep the static map for first-party boot tools, and forward every
tools.registerargument — a traced-view call carries the use-sitectx.fiberthatToolsService.registerscopes by, and that plugin display name outranks the lastinternal/getreader and the pinned package map; untraced receivers use the reader, while root/self use sites or readers and a missing reader use the caller stack. Schedule tools belong to@deepseek-ai/dsh-scheduleon0.2.0and@deepseek-ai/dsh-tool-scheduleon0.2.1+;0.2.2'soptions.whengate must survive the wrapper. (dsh:vendor/cordis/src/utils.tscreateTraceable/createShadow/createShadowMethod,vendor/cordis/src/reflect.tsReflectService.get,packages/core/tools/src/index.tsthis.layers.effect(this.ctx, ...);options.whenatdsh-v0.2.2-rc.1:packages/core/tools/src/contracts.ts;src/host/toolSources.ts,src/host/attribution.ts,tests/host/attachment.spec.ts) - Limitation — image offload: the harness records
image/offloadevents and projects a placeholder message; the fold reads raw durable events, so an offloaded message keeps its pre-offload count and price until compaction removes it. (dsh:packages/compaction/compaction-image-offload/src/image-offload.ts,packages/core/session/src/known-event-types.ts) - Context-event agent labels are shape-derived, never version-gated —
agent-message/subagent-settledtext carries the model-facing agent name only fromdsh-v0.2.2-rc.2(agentAddress, dsh:dsh-v0.2.2-rc.2:packages/subagent/subagent/src/continuation-messages.ts,.../names.ts); the floors carry the sender Session id, so the fold falls back to the parent log'ssubagent/catalog.name(v3,0.2.2-rc.2+), thenteam/member.name(packages/experimental/agent-team/src/types.tson the floors;dsh-v0.2.2-rc.2:packages/team/agent-team/src/types.ts), thensubagent/catalog.label, and omits an unresolvable name instead of printing an id.team-message.senderNameandsession-reference.references[].labelare stable across the floors. The alias map holds 512 ids and each stored name is bounded to 120 chars. The resolved label also rides the inject surface node (SurfaceNode.agent, additive-optional per §6.1 — nostateVersionbump; persisted head rows stay slim without it) so detail/facts/delta full folds label browser inject rows regardless of themaxEventswindow; the client appends it to the row preview. (src/host/fold.ts,src/host/foldInjections.ts,src/shared/types.ts,src/client/components/browserRows.ts; dsh:dsh-v0.2.2-rc.2:packages/subagent/subagent/src/catalog.ts,packages/context/session-reference/src/types.ts) - PTC sub-calls fold through their
tool/ptc-dispatch-start/tool/ptc-dispatchpair, keyed bysubCallId— they never emittool/call/tool/result, andderiveMessages()ignores both events, so the pair prices the real tool run and its name while the enclosingrun_codestays a transport row: it keeps its per-tool row but adds notoolCalls/toolsMs, and a program with zero dispatches keeps its own envelope as the run. An unpaired or unreadable start marks nothing as transport, so no run is silently dropped; an unpaired settle still tallies the name but books no time, and pending starts cap at 200. A successfulskilldispatch books the loaded name fromarguments.name, falling back to the<skill_content>wrapper; it stays out of the context surface because the content reaches the program, not the model. (dsh:packages/core/tool-executor-ptc/src/types.ts,.../ptc.ts;src/host/activity.ts,src/host/fold.ts) - Subagent creation is a folded context milestone — every
subagent/catalogwith a shape-derivednameorlabelpusheskind: 'agent', form: 'spawn'(name,labelasdetail, a knownmodeassub);team/memberstays alias-only, and agent messages/settled notices remain inject events with anagentlabel. Head-only folds keep the cumulative event count but drop the row list. (src/host/fold.ts,src/shared/types.ts; dsh:packages/subagent/subagent/src/catalog.ts) - Goal, todo, team-task and user-question events are folded workflow milestones —
goal/changecreate/complete emitsgoal-create/goal-completefromgoal.objective;todo/writediffs the wholetodossnapshot intotodo-add(a bare new-content count) andtodo-done(up to 8 completed contents), keyed by content;team/taskemits a bareteam-task-createcount for an unseen non-deleted task andteam-task-completewith the subject on a non-completed → completed transition, keyed by id; atool/callnamedask_user_questionemitsaskwith the full question count and up to 8 stored question texts from its JSON arguments. Ids/names cap at 120 chars, todo maps at 128 and task maps at 256; head-only folds keep both maps and the cumulative count so transitions survive the retained window. Requests, events, milestone rows, surface nodes, archive, file ops and spans page through the full retained log; commands use the orderedPOST api/dsh-context/commandspage route, which auto-fills older rows without a manual cap.TIMELINE_STATE_VERSION47 adds these events and the agent-spawn events above. (src/host/foldWorkflow.ts,src/host/history.ts,src/host/fold.ts,src/shared/types.ts; dsh:packages/goal/goal/src/domain.ts,packages/todo/tool-todo/src/types.ts,packages/team/agent-team/src/types.ts,packages/interaction/user-questions/src/projection.ts) - Full-history pages are serve-time only —
historyfolds withhistoryBounds(no request, turn, event, node, archive, file or span cap; commands stay on their own full page route), serves seq-keyed request/event/milestone pages and index-keyed node/archive/file/span pages, and keeps a byte-budgeted cold fold cache with one materialized part per entry; nothing is persisted, so the projection row stays head-only at version 47. Event pages carry a per-row ordinal and never split a same-seq run. The client loads requests/events first, then nodes when the browser card mounts, files/archive when the below-fold card group mounts, and spans when the timing card becomes visible; it merges seq pages by(seq, ordinal), appends index pages over a stable prefix, closes revision gaps across as many pages as needed, retries a failed or null page, leaves an unchanged collection untouched, and reloads surface/archive together when an archive removal changes the surface order. (src/host/history.ts,src/host/config.ts,src/host/foldState.ts,src/client/detailStore.ts,src/client/historyPaging.ts,src/client/timelineWire.ts)
Figures the plugin prints that the harness also prints.
- Mirror, don't import. Re-fit when a supported line moves an implementation;
scripts/diff-fold.tspins the composition against the harness's owncontextBreakdownon real logs.
| Plugin site | dsh source mirrored |
|---|---|
src/shared/estimate.ts estimateSystemTokens / estimateSystemContent |
dsh: packages/llm/token-meter/src/estimate.ts estimateSystemMessage — text density, JSON fallback and role framing |
src/host/pricing.ts estimateReasoningTokens / estimateAnswerTokens / estimateCallTokens |
dsh: packages/llm/token-meter/src/estimate.ts — reasoning/text/tool-call arms of estimateContent |
src/shared/fileTokens.ts (attachment chip) |
dsh: packages/llm/llm/src/content.ts fileHandleText — handle text, never bytes; the chip cannot know the resolvable-path sentence, so it is a lower bound |
src/client/components/statsTiming.tsx TPS chip |
dsh: packages/llm/llm/src/assistant-stream.ts assistantStreamFirstTokenTime |
src/client/headline.ts occupancyPercent |
dsh: packages/client/ui-conversation/src/client/context-occupancy.ts contextOccupancy — the plugin mirrors the clamped ratio and prints one decimal; kernel-internal, hence mirrored |
src/client/reserve.ts |
dsh: packages/compaction/compaction-basic/src/config.ts — shipped defaults only (0.8 / 65536); a non-positive budget is refused (TargetPressureConfigError), so the bar paints no masks |
- Image blocks use DeepSeek's published v41 image conversion (1024-token cap, 544²-pixel floor), mirrored from dsh's
packages/llm/llm-deepseek/src/image-tokens.ts, not the meter's structural heuristic; an attachment without finite dimensions keeps the structural price. The durable attachment carries its normalized dimensions while dsh prices the projected request dimensions, so a sent-dimension rounding or a route pixel budget can move the count; provider usage stays authoritative, andscripts/diff-fold.tsdocuments the meter delta. A route declaringimagePixelBudget: 'low'prices 184–194 tokens for the tested sizes where the mirror prices 317–1001; an offloaded image keeps its pre-offload price and still counts. (src/shared/imageTokens.ts,src/host/pricing.ts; dsh:packages/llm/llm-deepseek/src/request-pricing.ts) - Anchor the timing card's wait/decode boundary at the harness's first token —
ttftMsends at the first non-empty deltaassistantStreamFirstTokenTimereports (the instantsessionStatsuses); earlierblock-startmarkers stay in the wait, and decode spans/buckets clip there so no window double-counts. (src/host/fold.ts; dsh:packages/session/session-stats/src/projection.ts)
- Limitation — thinking splits: no in-tree DeepSeek route reports reasoning/answer/tool-call buckets, so splits follow the meter's block prices, with a provider
reasoningTokenscount winning for thinking. (src/client/categories.ts; dsh:packages/llm/llm-deepseek/src/translate.ts) - Limitation — spanless blocks: a block with no positive-width decode span adds no split time or block count; a pre-token window stays in the wait. (
src/host/fold.ts) - Limitation — slimmed list rows (from
0.2.2):contextHeaders/contextTimeline/contextActivitydeclarewire.summary: falseand the harness excludescontextPressure/contextBreakdown, so list rows carry none of the five; the fleet derives occupancy from head fetches, the insights page reads aggregates through the batchedsnapshotroute, and attached Sessions keep live values. The older registries ignore the mark and still carry everything. (src/host/{headers,timeline,activity}.ts; dsh:packages/api/session-controller/src/list.tssummaryKeys()) - Limitation — tool slice: the card attributes the per-step busy union (
toolBusyMs), so a parallel batch prices once and a run outside every step window prices no busy time; the tooltip shows the fold's own per-calltoolsMswhen it exceeds the displayed union. (src/host/fold.ts,src/client/components/statsTiming.tsx; dsh:packages/session/session-stats/src/projection.ts) - Limitation — counts: counters cover the full session (steps = every folded assistant message, turns = turn-label changes with an absent label read as 0, injects/compactions/prunes cumulative, events = every folded context event, modelSwitches = cumulative model switches, skills = distinct loaded names capped at 500), so a step that assembled no message is omitted where
sessionStatscountsstep/end, a non-adjacent repeat of a turn label counts again, and the harness StatsPills show the larger step figure. (src/host/fold.ts,src/host/foldWire.ts; dsh:packages/session/session-stats/src/projection.ts) - Limitation — idle carve: active time is step wall minus idle — eventless residue gaps ≥ 2 min (log-only
subagent/catalog/team/memberevents never break a gap) plus approval/ask_user_questionwaits of any length, only after the step's response; a quiet running tool stays busy, and a step past the 1,024-beat cap skips the residue carve. Idle paints no span. The overview's active-time KPI bills the daily ledger's step wall (no per-day idle) and is range-scoped; the timing card keeps the carved lifetime figure. (src/host/fold.ts,src/host/foldMetering.ts,src/host/activity.ts,src/client/services.ts) - Limitation — daily ledger: every overview aggregate (KPI tokens/cost/turns, card usage/cost, the tool and time cells, the day chart) bills
contextActivitydays for all scopes, so a wider range always contains a narrower one; the token KPI is that ledger total while the donut is its category split (a member without a timeline composition still counts in the total, not the split).contextTimeline.costremains the per-session detail figure and prices at settlement, so a tariff-boundary step splits peak/off differently between the detail page and the overview; a session counts as priced only when every provider/model in its usage resolves a price. The ledger keeps 400 days, so overview totals exclude usage older than that; it caps 64 names a day, books a tool only when its call start is retained, and counts a command on dispatch where the Command Executions card waits for settlement; a retained PTC start books its dispatch, and a lost start still books the skill name from a successful settle. (src/host/activity.ts,src/host/overviewCorpus.tsactivityTotalsOf,src/host/overviewAggregate.tssummaryOf) - Limitation — statutory holidays: no holiday calendar, so a holiday-weekday request in the peak windows prices at peak; the tooltip states the weekday/weekend rule. (
src/host/foldMetering.tsisBeijingPeak) - Limitation — superseded system prompts: DeepSeek routes append a
system/messagewhen the prompt changes, but the plugin classifies only the latest surviving prompt as system tokens and omits superseded prompts from the composition and request totals where the harness counts them insidemessageTokens; a mid-session prompt edit therefore undercounts until the next replacement. No supported real log has more than one surviving prompt. (src/host/fold.ts,src/host/foldWire.ts; dsh:packages/llm/token-meter/src/breakdown-projection.tswithTotals) - Limitation — inherited-seed cost reset: for an inherited fork seed (
session/end-seedwithinherited: true) the plugin resetscostand the generated counters and clears the daily ledger at the seed cut, while the harnesstokenUsagefolds the whole log; the reset keeps the inherited prefix from being billed in both parent and child, so the plugin's per-session cost is not comparable to atokenUsageconsumer. (src/host/fold.ts,src/host/activity.ts; dsh:packages/llm/token-meter/src/usage-projection.ts)
What the browser half may rely on.
Seams
- Every capability rides an OPTIONAL seam — only
slots/localeare hard-injected; other faces use deferredctx.inject, re-proved and guarded, withdsh.client.injectnaming providers that must arrive first (package ordering, not service waiting). One-shot reads usectx.getper call. No service → no capability, no pending fiber, no throw. (src/client/services.ts,src/client/index.ts) - Mount at most once per page — a static bundle plus a later activation of the same package can mount twice; the client-plugin runner force-assigns a fresh shadowing priority to every dynamic registration, so the slot registry's duplicate guard never fires.
apply()reads the raw ledger (ctx.slots.entries) and mounts nothing whencontext-jumpis seated; an absent or shape-shifted face reports unseated. (dsh:packages/extensions/cordis-client-runner/src/client/guard.ts,packages/client/ui-renderer/src/client/registry.ts; probeledger) - Session jump uses
uiWorkspace.openSession(SessionTarget), never a sessions-serviceopen(id)(absent on every supported line). (dsh:packages/client/ui-workspace/src/client/navigation.ts; probesessionNav) - The member card's open prefers the right Sidebar's subagent chat (kind
subagentchat,preferNewPane); an absent face or an unclaimed address keeps rule 3's jump. (dsh:packages/client/ui-subagent/src/client/sidebar-chat/,packages/client/ui-sidebar-right/src/client/service.ts) - The member card's enter pre-seeds the view — merge-write
dsh.conversation.<sessionId>(the draft included) before the jump; the shell re-reads it on every session binding and falls back tochatfor an unregistered id. (dsh:packages/client/ui-conversation/src/client/stores.tsreadConversationViewPreference,.../apply.ts;src/client/services.ts) - The settings and update-prompt jumps use
pluginNavigation.openBundle(packageName), never a DOM walk: the0.2.1+plugins.tabslot remembers its selection and the navigator resets it to Installed; the0.2.0line has no contributed tabs. The npm update dialog itself is the page's internal state (openUpdateneeds the page's registry version check) and no supported line exposes it cross-plugin, so the prompts land on the bundle's detail page and the release-notes link survives as the fallback where the navigator is absent. (dsh:packages/client/ui-plugin-manager/src/client/index.ts,.../manager-store.ts; probepluginsNav) - Locale switches ride the LocaleFace
subscribe/getLocalepair, degrading to the boot locale when absent. (dsh:packages/client/locale/src/client/index.ts;src/client/viewkit.ts)
- Limitation — language selection: ja/es/fr/de/ru/pt are selectable only where the harness client registers those packs (the
0.2.2line from rc.1; the built-inaddLanguageloop first appears at0.2.2-alpha.2). The0.2.0/0.2.1clients register only the baselinezh/en(LOCALE_IDS), so their selector offers Chinese/English and the six dictionaries resolve as English. (dsh:packages/client/locale/src/client/index.ts,packages/client/locale/src/locale-settings.ts) - Limitation — plugin detail document:
meta.detailis honored only fromdsh-v0.2.2-alpha.2(dsh: dsh-v0.2.2-alpha.2:packages/util/plugin-detail/src/document.ts); the0.2.0/0.2.1floors ignore the extra locale key and render no detail document, only the localized title and description.
Boundary
- Re-prove at the boundary; isolate every read's failure — an absent whole value renders loading, not an error; hostile shapes degrade field-by-field and skip bad elements; every async read yields data or a retry note; a revision decrease resets the detail ledger. (
src/client/services.ts,src/client/timelineSource.ts) - Fetch routes stay browser-relative — never root-absolute
/api/..., so a path-prefixed reverse proxy keeps its prefix. (src/client/apiRoutes.ts) - Only a
'subagent'-origin row draws a family edge — a fork is an ordinary Session: older lines recordparentSessionwith noorigin, the0.2.2line records no lineage. (dsh:packages/api/session-controller/src/list.ts,packages/api/session-controller/src/commands.ts;src/client/agentTree.ts) - Every history read carries the session's own durable address — a subagent child read under a plain
sessionaddress is refused (session/agent-busy), so name the direct parent:sessions.subagentAddress(id)first, else the'subagent'-origin list row'sparentIdas modeunknown; resolve per read so a refused attempt heals its retry. (dsh:packages/api/session-controller/src/history.ts,.../client/sessions/manager.ts;src/client/services.ts) - Command coloring rides the primitives' lazy shiki highlighter —
bash(pre-warmedshellscript) andpwsh(lazypowershell);run_codestays plain. Lines past 1,000 UTF-16 units render plain, the plugin's own guard (the harness cap starts only on0.2.1). (dsh:packages/client/ui-primitives/src/code-highlighting.ts,.../markdown/highlight.ts;src/client/commandHighlight.ts) - The right Sidebar's body gates on the optional
useTabInfohook — an invisible tab mounts no cards and parks its subscription, and without the hook the body keeps its IntersectionObserver fallback. (dsh:packages/client/ui-sidebar-right/src/client/tab-info.ts;src/client/components/contextView.tsx) - Call every seat unconditionally, key seat-reading entries by their selection, and read seats through value selectors —
seatOfalways invokes,seatKeyOfremounts when the selection changes instead of shifting hook order, and the overview's sessions seat projects a primitive current-id/cwd key so the selector's Object.is bailout skips unrelated store churn. (src/client/services.ts,src/client/overviewModel.ts;tests/client/seatGuards.spec.ts,tests/client/components/overviewPanel.spec.ts) - The
/contextoverlay portals todocument.body— from0.2.2-rc.1the composer seat declareswill-change: transform, making it the containing block forposition: fixeddescendants, so a fixed overlay mounted inside the composer overlay measures and paints inside the composer instead of covering the viewport; the below-floor upgrade gate keeps rendering inline because it only appears on builds without that declaration. (src/client/components/contextModal.tsx; dsh:packages/client/ui-conversation/src/client/conversation/ConversationRoot.module.css) - The current-session anchor reads the ui-workspace persisted selection —
dsh.sessions.current({sessionId, subagentAddress?}) is the selected Session on every supported line; the sessions list store carries no current field. A missing, malformed or storage-less selection degrades to no anchor, and cwd comes from the list snapshot by id. (dsh:packages/client/ui-workspace/src/client/navigation.tscreateSnapshotStore(..., { persist: { name: 'dsh.sessions.current' } }),packages/api/session-controller/src/client/sessions/service.tsSessionListState;src/client/overviewModel.ts;tests/client/overviewSupport.spec.ts) - The fleet's team view synthesizes its roster when the
agentTeamprojection carries nomembers— every release through0.2.2-rc.1publishesmembers({members, tasks, failure}); fromrc.2(including the stagedrc.3) the view is{enabled, tasks, failure}and membership rides the Lead'ssubagentCatalogcontinuable entries, whose catalog v3 rows carrynameunique among siblings, whileteam/memberandteam/message/*became historical records,team/modejoined the vocabulary, and tasks captureownerNameas the agent path (dsh:dsh-v0.2.2-rc.1:packages/experimental/agent-team/src/types.ts;dsh-v0.2.2-rc.2:packages/team/agent-team/src/{types,projection,journal}.ts,dsh-v0.2.2-rc.2:packages/subagent/subagent/src/{catalog,names}.ts,dsh-v0.2.2-rc.3:packages/team/agent-team/src/types.ts;dsh-v0.2.2-rc.2:packages/client/ui-agent-team/src/client/TeamBoard.tsxtreats any catalog row as membership). The client synthesizes the carrier Lead plus its named continuable catalog children — one-shot, external and unnamed rows stay plain subagents — merges the fleet summary's named continuable facts, which name historicalteam/memberteammates the new projection ignores, resolves task owner paths by first segment, and keeps the plain fleet wheneverenabledis false or the projection is absent. A Team Lead's ordinary continuable subagents therefore join the roster onrc.2+, matching the ID-only semantics where any continuable child may own tasks. (src/client/fleetTeam.ts,src/client/fleetModel.ts,src/client/components/fleetView.tsx)
- Limitation — complete prompt sections: a deployment registering a
completesystem-prompt section keeps only that section;promptPrefix/promptSuffixare dropped. (dsh:packages/core/system-prompt/src/index.ts) - Limitation — settlement split: an unmarked provider diagnostic appended after the closing text stays inside the closing report, and an unknown summary renders raw. (dsh:
packages/subagent/subagent/src/continuation-messages.ts;src/host/fleet.ts)
How fold-state changes reach existing installations.
- Bump a unit's
stateVersioniff later events cannot backfill the change — running totals, per-step collections flushed atstep/end, materialized envelopes. Serve-time-derivable fields and additive-optional wire fields need none: a pre-field row serves without them and the client degrades per §5. From0.2.2-rc.2(unchanged atrc.3) the registry states the same contract explicitly and requires the old-checkpoint suffix replay to match a full replay before a version is retained. (src/host/timeline.ts,src/host/activity.ts,src/host/headers.ts; dsh:dsh-v0.2.2-rc.2:packages/session/session-projection/src/index.tsstateVersion) - Persist the
contextTimelinehead only — aggregates, slim surface/request/command records (notext/cmd) and the fold's working memory;spans/fileOps/archivedstay empty and detail refolds through the detail route.stateVersion47 adds agent-spawn and workflow milestones plus the bounded todo/task transition maps; 45 moves no folded shape: it discards rows an interimtotals.modelscounter wrote under 44 (a same-version shape drift left them unseedable); 44 adds the cumulative model-switch count behindcounts.modelSwitches; 43 added the cumulative full-session event total behindcounts.events; 42 added PTC sub-dispatch entries to the head's timing, per-tool tallies and skill-name set, plus the bounded pending-start map that trimming cannot backfill; 41 added cumulative full-session counters (turns, steps, injects, compactions, prunes, distinct skills) plus cumulative tool/program tallies and per-session command stats (40 added the first counter set); older rows are discarded. The head-only persisted row keeps only the last requests, running command rows and the trimmed command-call ledger: events, archived nodes, file ops, spans and settled commands are refold-only and must be served by the detail/facts routes, never assumed present in a cached row (the facts route serves the same complete facts as the detail route: full request series, turn/step-enriched events, and windows derived from the configured fold bounds; cached head rows never back them, and cold caches key on the persistence service's stable identity because the service wrapper is re-bound per request); a boot sweep rewrites ver-36 rows in place to the 37 head-only shape (a pure derivation, no refold), and they still refold on first read, so the sweep saves disk only. (src/host/timeline.ts,src/host/foldState.ts,src/host/sweep.ts) - Live detail rides a per-session shadow fold — seeded via
sessionQuery.observeSession(projectionMode: 'none'), advanced by committed events, bounded to 8 sessions with a 512-event seed buffer replayed past the seeded cut, folded with full request/event/turn/node/archive/file/span bounds (commands stay at the configured transport window), and evicted oldest-first by an estimated 64 MiB byte budget; dropped when the session is disposed; every observation it opens is disposed on success, eviction and error.head: truereads serve the live snapshot; cold sessions use the revision-keyed payload cache (4 rows). The handle path applies whereregisteris awaitable (the0.2.2line); older lines use the registry's keyedstateOf. (src/host/detail.ts,src/host/detailShadow.ts) - Complete add/remove deltas ride a host fold —
POST api/dsh-context/deltaassembles both boundaries from the full shadow (or cold-folded) surface/archive and returns every added node, per-category removed counts/tokens, and the complete selected view.maxArchiveNodesis a detail-payload transport bound only; the delta and history folds keep every removal until it precedes the oldest retained request and record the dropped floor, so the delta covers every selectable step and archive pages reach the first removal. The persisted head-only row still carries none, and cold delta folds reuse a revision-keyed state cache. If the route is unavailable the browser falls back to the archive-window diff and flags approximation. Compaction events also carrygrossTokens, so the card's net figure reconciles with the delta's gross removal. (src/host/delta.ts,src/shared/delta.ts,src/host/foldState.ts,src/host/foldWire.ts) - Stale rows refold from the durable log — production warm-up first validates the plugin's canonical v3 materialization by durable identity, fold versions and resolved fold config; a changed/
rebuildid always refolds. With no trustworthy event count, projection presence alone never certifies a cold row on that path. The legacy no-own-cache embedding retains the old presence probe, including thestat().eventCountwatermark check when available. (src/host/backfill.ts,src/host/overviewCache.ts; dsh:packages/session/session-persistence-jsonl/src/index.tsstat) - Every cold fold passes the host-wide gate — one at a time, foreground requests overtake queued background work while each priority stays FIFO, at most 64 reads wait, only while the V8 heap is strictly below two-thirds of its ceiling; a skipped read takes the caller's no-data path, never a failure. The skills route's
observeSessionread is gated too and runs withprojectionMode: 'none': its cwd and agentPreset come from the durable session header (present on every supported floor), so no projection folds for it. (src/host/coldRead.ts,src/host/skills.ts) - The warm-up folds sessions over 2,000 events in in-memory slices through
sessionProjections.restore/hydrate,sessions.prepare, andsessionProjectionCache.write, with one write-back at the durable log end; a missing face leaves the session on the single-shot path. The slice size adapts to the measured per-slice cost against a 150 ms budget (floored at 128 events), because a slice's synchronous block grows with the accumulated fold state. Sessions over 30,000 events fold in a worker thread (src/host/foldWorker.ts— an eval worker booting the plugin's own bundle and driving the timeline/activity definitions over 2,000-event chunks, so no registry re-parse reaches the host event loop) and land in the plugin's overview cache (§7.3): the harness projection cache stays cold for them, but snapshot/heads reuse the materialized head while facts/fleet/detail still read those sessions cold until a session goes live; one active worker drains a bounded FIFO and each 2,000-event chunk waits for an acknowledgement; an idle worker terminates after 20 s and lazy-spawns on the next fold, while synchronous startup failures reject only the active job and recover the queue; the path is gated onsessionPersistence.stat(identity-keyed rows) and a present overview cache, and worker absence or failure falls back to the sliced path. A sliced write-back lands the ordinarysession/end-seedresume marker that the prepared (non-stored) session constructor appends, one seq above the durable end: the marker has no projection effect on this plugin's units and a later live load appends the same marker, so rows match a single-shotcoldSnapshotup to that one-seq watermark, the warm-up treats the one-ahead cut as warm, and any further lead refolds; crash-repair closers are never folded into a cache write. (src/host/backfill.ts; dsh:packages/core/session/src/index.tsconstructor,packages/session/session-projection-cache/src/index.tswrite barrier)
- Procedure — force one session's refold:
rm ~/.dsh/storages/session_projcache/sessions/<session-id>.json; a derived cache, rebuilt from the durable log.
Where data comes from, where computation happens, and how the browser stays current.
- External catalogues are host-owned and purpose-split. The npm latest-version lookup and the models.dev price catalogue are fetched by the host (
src/host/catalog.ts) with an injectable fetcher, a 1 h TTL, a single-flight promise and a compact price book (provider → model → four rates, plus canonical ids) that is matched on demand and memoized per (book, provider, model) instead of pre-indexed; the browser never callsregistry.npmjs.orgormodels.devand never receives the price table. The update check has its own purpose-specific endpoint,POST api/dsh-context/version({ready, failed, checkedAt, current, updateAvailable, latest?}) —updateAvailableis the host-sideisNewerReleasecompare (src/shared/version.ts), the single comparison model; while it is cold or failing the reply staysready:falseand the UI shows no update pill, never a fabricated version. The price book refreshes on its 1 h TTL and reports a prices version the overview revision includes, so a changed book invalidates unchanged replies once. After every successful fetch the distilled source (cost fields and canonical ids only, ~1.1 MB) is persisted to$DSH_HOME/storages/dsh-context/price-book.v1.json; a cost serve loads it before any network call, serves a stale copy while refreshing behind it, and ignores an unusable file. The sponsor recom list is host-persisted too (recoms.v1.json): the first request answers from disk and always refreshes behind it, with a deliberate 30-day usability window, and a failed refresh keeps the last good list. Cost availability is implicit in the data plane: a cost-bearing timeline carriescostRead.ready:falsewhile the catalogue is cold, the host starts the price fetch lazily on the first cost-bearing serve (with a 30 s failure backoff, so an air-gapped host does not refetch on every serve), and the client schedules boundedinvalidate('pricing')retries (1.5 s / 4 s / 10 s, one shared ladder; a read that turned ready resets the ladder but never cancels another source's pending refresh) plus a projection refresh on each retry, so money appears without a reload. Per-(provider, model) price resolutions are memoized per price book (src/shared/pricing.ts), so repeatedusd()reads across rows and days resolve once per book. The plugin host runs in the dsh web server process, so outbound calls do not depend on the browser origin. Evidence: measurement matrix (before: models.dev + npm browser calls; after: none),tests/host/{catalog,stepIdentity,headsRoute,cost,recoms}.spec.ts,tests/client/{cost,treemap}.spec.ts. - Money is computed host-side and the price table is never shipped. Every timeline a host route serves carries
costRead?: {usd, ready, faces?, misses?}(projection wire view, detail, facts, snapshot) computed bysrc/host/cost.tsfrom the same price resolution the plugin used before (src/shared/pricing.ts, moved verbatim from the client book;src/shared/priceIdentity.ts).faces/missesare resolved per-model rate facts for the tooltip only — never the catalogue. It is a serve-time wire field, never fold state, so projection-cache rows (§6) are unaffected and a catalogue change needs nostateVersionbump. The client only converts currency (1 CNY = 0.15 USD), formats, and sums host-provided USD across a family; it holds no price book (the@opencode-ai/modelsdependency andsrc/client/modelPrices.tsare gone).POST api/dsh-context/headsresolves each id through the live snapshot, then a validated materialized head, then the projection-cache row of itssessionPersistence.statheader, then a gated durable-log head fold (with cost) — so a subagent whose cache row or live snapshot is unavailable still serves its head; the client additionally falls back to one per-id head detail read for every id missing from a batch (up to one full 64-id batch). - Overview works on a pre-aggregated API with a revision protocol and a disk-backed row cache.
POST api/dsh-context/overview({part:'summary'|'days'|'page'|'tally'|'projects', revision?, scope?, sort?, page?, tally?, pick?}) aggregates summary/KPI, heatmap days, the 12-card page, tally lists, and per-project token distributions over the full corpus on the host (src/host/overview*.ts); the same revision answers{revision, unchanged:true}with no row work, serialization or compaction; a client part sendsrevisiononly for the request key whose payload it still holds, sounchangedalways leaves painted data in place and a remount or scope switch fetches cold; the revision covers per-session identities, workspace, backfill coverage and the price-book version, so coverage progress, completion and price refreshes reach the client even while rows are unchanged. A served request key quantizes a relative range's resolved window to the local day, so a clock crossing local midnight re-serves that scope once instead of holding yesterday's rows; absolute scopes keep their keys. Scope is explicit and complete per part: summary applies range+day+coverage+group+query, days applies coverage only, tally and projects apply range+day+coverage, page applies the full filter set withscopeTotal/groups for pre-group chip counts; a missing or unknown range resolves to the 30d preset. A scope may carry both the legacy absolute range and{calendar:{from,to}}; the host resolves calendar day keys first and summary returns the resolved absolute window plus host day keys, so a remote browser's timezone cannot diverge from aggregate filtering. The client keeps only view state and does no price/KPI/day/timing computation: the KPI tool/time cells ride the host's range-scopedwindowTiming, whiletimingstays the lifetime breakdown for the StatsTiming card. The legacy snapshot route remains for session rows and gains the same revision skip (src/host/snapshotRoute.ts). Resident-memory model. Cold rows live in$DSH_HOME/storages/dsh-context/overview-cache.v3/(otherwise~/.dsh/...) as 64 stable session-id shards, each atomically replaced. A record is exactly{materialization, identity, versions}; strictHeaderFactsand signature live inside materialization,costReadis stripped, and a warm load derives oneHostSessionsharing the validated activity/current/timing objects instead of persisting a second graph. v1/v2 are never warm sources or merge inputs and are removed best-effort after a successful v3 flush; shard corruption never falls back to them. Saves coalesce by id into serialized descriptors bounded to 256 records/8 MiB with a 5 s capacity timeout, one active and one pending batch, and a 2 s debounce that continuous saves cannot extend.save()awaits acceptance (not durability), later loads observe accepted overlays, rejection leaves the current full response intact and requests another backfill; flush/dispose waits for all accepted batches unless a shard write fails, in which case the failed active and newer pending batches remain observable and a later save/flush/dispose retries. Full-corpus saves prune deleted ids only from changed shards. The in-memory sessions/rows maps release after 20 s without a request while the retained revision still answers unchanged polls. A cached row requires a matching durable JSONL identity (path + size + mtime fromsessionPersistence.stat), matching timeline/activity/config versions, and valid timeline/activity materialization; changed/missing/unvalidatable rows rebuild from the projection cache, and a one-sided snapshot is never written back. Startup backfill usesprobe()for the same validation without derivingHostSessiongraphs.backfill.foldedSince(marker)dirties only folded ids; overflow forces a full plugin-cache reload so worker-only rows cannot be replaced by missing projections. The first paint on an empty cache answers from a full build and seeds identity capture in the background; later restarts validate withfs.stat. Backfill prewarms the same materialization throughwarm(), concurrent warms/parts share one materialize lock and 5 s corpus scan, and one fresh scan validates identities once. The same 20 s idle sweep releases facts/fleet/detail/command-page caches. WithoutsessionPersistence.statthe earlier in-memory semantics apply; without a writable path it rebuilds. - Freshness is push-on-invalidation, not polling-only. The client reacts to
invalidate('pricing'|'overview'|'sessions'|'heads')(src/client/invalidation.ts); visible views poll at 30 s and the revision makes an unchanged poll tiny. A still-unpriced timeline arms the bounded cost ladder (see item 1), and the subagent-cost seat drops unpriced landed heads onpricingso the heads batch re-reads instead of keeping a staleready:falseforever. Backfill starts without a browser after the optionalappReadycommit (or the dependency-ready fallback), coalesces startup/manual/session/disposedtriggers, and retries heap pauses/transient failures in the host with exponential backoff and a 10-attempt no-progress budget; it reports{complete, remaining, failed, running, total, covered, unsupported, unreadable}plus bounded{id, reason}detail lists for host-refused (unreadableSessions) and failed folds (failedSessions); the pass counters refresh as sessions are covered, whilerunningandcompletebracket the pass. A log the host refuses to open (corruption) counts asunreadable, never as a fold failure: it carries a bounded{id, reason}detail list, does not block completion, and stays out of the fast path so the next pass retries it (a host-side fix self-heals without a plugin change). A stalled pill or an unreadable count is a button that postsPOST api/dsh-context/backfillto start one fresh pass; that is the only user-driven pass, its tooltip lists the bounded detail (marking a capped list with the shown/total counts), and a poisoned projection-cache row survives it until the offending unit'sstateVersionmoves. The client never drives normal backfill: incomplete coverage only schedules overview re-reads, and unknown values paint as'—', never 0. (src/host/backfill.ts,src/client/overviewSource.ts,src/client/components/overviewPanel.tsx). - Fleet details are host-paged.
POST api/dsh-context/fleetkeeps the single-session preview/full/history shapes byte-identical and addssummary({rootId, rootCreatedAt?, detail, members, familySize, counts}from the root session's log only — no child log reads, plus a bounded per-root counts cache lifecycle-keyed by the rootheader.createdAt) andbatch({batch:{ids, mode, rootId?}}→ up to 16 ids per call, sequentially inside one shared cold-read admission, per-id failure isolated intomissing). The client paints from the summary + sessions snapshot first, then auto-continues 16-id batches inupdatedAtorder with no user action; exact family totals come from a compact facts ledger (host counts + each child's ownmessagesTotal/delegations), never from the retention-capped payload slice, and any unreadable member shows a failure note + retry with—, never 0. A host without the new kinds degrades to the legacy single-session protocol. (src/host/fleet.ts,src/client/fleetDetail.ts,src/client/fleetModel.ts) - The balance capsule reads the signed-in account and the API key side by side.
POST api/dsh-context/balanceasks the optionaldeepseekAccountservice (getBalance,packages/credentials/deepseek-account) and the configured DeepSeek API key's/user/balanceindependently and serves{account, api}, each a source's balances or null. The account arm maps its recharge wallets (value) totoppedUp,bonusWalletstogranted, and their sum tototal; the API arm derivesgranted/toppedUpfrombalance_infos. Only a source that answered is offered: a signed-out or unreadable account is null, and only a resolvable key the platform accepts yields an API arm. ThebalanceSourcepreference names the arm the capsule shows (account by default) and falls back to the other available arm. The account call carries the detected harness version asx-client-version; the provider sends the request headers and cookies, and no credential or platform endpoint is duplicated here. The0.2.2line merged the service definition and its platform provider:rc.1ships thedeepseek-accountservice plus thedeepseek-account-platformpackage in its bundle entry, whilerc.2+ships onedeepseek-accountpackage whoseDeepSeekAccount.getBalanceis the remote face and whose bundle entry names@deepseek-ai/dsh-deepseek-account. (src/host/balance.ts,src/client/balance.ts,src/client/components/balanceCapsule.tsx; dsh:dsh-v0.2.2-rc.1:packages/credentials/deepseek-account-platform/src/details.tsget_user_summaryanddsh-v0.2.2-rc.1:packages/bundle/base/cordis.patch.ymldeepseek-account-platform;dsh-v0.2.2-rc.3:packages/credentials/deepseek-account/src/{index,details}.tsand the base bundle's@deepseek-ai/dsh-deepseek-account)
-
Limitation — air-gapped hosts: without egress to npm/models.dev the catalogue stays cold: no update pill and no money figures (faces/misses absent), while token/timing/context data keeps working. A previously persisted price book still prices after a restart; only a host that never fetched has no book. No proxy configuration is offered.
-
Limitation — catalogue staleness: prices and the latest version are at most 1 h old (TTL); a catalogue refresh changes money values without touching fold state. A failed refresh keeps serving the last book (in memory or persisted), so figures can run older than the TTL while the network is down.
-
Limitation — balance sources: the two arms can belong to different DeepSeek accounts, so the API arm may differ from the signed-in account's; token rejection (401/40003) removes the signed-in grant through the provider's own expiry path, and a negative wallet makes the account snapshot unreadable (the plugin's wire shape is non-negative). Each arm reports one currency — the locale's display currency (CNY for
zh, USD otherwise), else its first entry. A failed or unreadable arm is served as absent, so a transient read failure hides that arm (both failing hides the capsule) instead of painting stale figures; the next successful read replaces the remembered report. -
Limitation — scan freshness: session created/disposed events reset the corpus scan immediately; a cold-log-only change inside the 5 s listing window is reflected by the next request after it expires (a visible page also polls every 30 s). (
src/host/overview.ts;tests/host/overview.spec.ts) -
Limitation — one-time cache seeding: an empty cache requires a full projection-row scan and durable-stat sweep, so startup cost scales with the complete corpus rather than a cached prefix; later restarts use
fs.statvalidation. A backend withoutlocation.path/sizeBytes, or an unwritable cache directory, degrades to the cold path forever. -
Limitation — desktop file sink level: the desktop shell's host log file records warn/error only (the shell owns the file sink; cordis
LoggerServicedelivers to exporters), so the backfill's success-pathinfolines — pacing pauses and the folded-count summary — never reachlogs/host/*.log; progress is observable through the backfill route's coverage reply, and failures still warn through. (dsh: vendored@deepseek-ai/cordislib/index.jsLoggerService) -
Limitation — full-history memory: reading the 84,467-event benchmark session (16,457 requests, 32,914 surface nodes, 61,466 spans) raises host idle heap by about 82 MB over a capped view. The durable JSONL backend memoizes the parsed event array, and the history fold materializes every page collection; the plugin keeps one folded state per session (2-entry/64 MiB cache) and one materialized part per cold entry. (
src/host/history.ts; dsh:packages/session/session-persistence-jsonl/src/index.tscoldLogMemo) -
Limitation — overview cache validity: a cold row is keyed by log path+size+mtime; a rewrite that preserves both is invisible, and a hard crash before an accepted shard flush can leave a stale row until its log identity changes. Unvalidatable identities (backends without
location.path/sizeBytes) get no warm-reuse benefit but still rebuild correctly, and the fold epoch is per process, so the first paint after a plugin restart may return one full payload before the revision stabilizes. -
Measurement — cache v3: on dsh's deterministic 64-session corpus (107,169 events), seven AB/BA pairs with complete semantic parity report median cold peak 652,136,448→626,610,176 B, idle RSS 235,520,000→132,853,760 B, and idle heap 126,974,672→45,507,456 B; cache bytes 171,178→123,468 B and largest file 171,178→5,680 B. Cold first-complete and warm overview/snapshot deltas cross zero; cold heads is 2.71→7.74 ms, warm heads 4.15→4.92 ms and page 1.39→1.75 ms, while warm idle heap rises 104,216 B. The cache-I/O pass writes 171,178→123,468 B for cold seeding and 85,109→22,066 B for a 64→32-record prune. Fresh Chrome 157.0.8103.79 reports first-screen heap 27,086,512→27,093,760 B and repeated-mount heap 28,927,672→28,968,804 B (v2→v3), identical 1,859-node unmounted DOM, no server errors, and a passing
/context. Reproduce withscripts/memory-bench/paired.mjsandscripts/memory-bench/browser.mjs.
Dependency declarations that look dead and are not.
- Declare
@deepseek-ai/dsh-client-ui-primitives' bare imports as this plugin's own devDependencies — itslib/index.jsimportsshiki/core,@shikijs/langs/*,katex, themdast-util-*/micromark-*chain,anser,clsx,diffandsimple-icons, all listed only as the package's own devDependencies; the client test project inlines that dist (vitest.config.tsserver.deps.inline), so pnpm must resolve each from this package. The bundle never carries primitives (a platform external); drop an entry when a primitives release stops importing it. - Declare
@deepseek-ai/dsh-client-store,@deepseek-ai/dsh-util-code-language, and theirzustand+immer— same reason, reached only through the primitives dist. - Never add
tailwindcssdirectly —@tailwindcss/nodedepends on it at its own exact version, so a direct declaration at another range resolves a second framework copy beside the compiler this build imports; use@tailwindcss/node+@tailwindcss/oxideonly. - Ship
zodat or above the4.6.6security floor — GHSA-mrhx-c7xc-m3w5 (oversized arrays exhaust memory) is patched only there, while the supported lines carry4.4.3(0.2.0as^4.4.3,0.2.1/0.2.2-rc.1exact) and0.2.2-rc.2+ moved to4.6.6. The plugin declares^4.6.6and accepts a second copy beside the harness's: the registry only calls.parse()on the schemas this plugin registers, so schema identity never crosses the boundary and the security floor outranks copy dedupe.pnpm-workspace.yamloverridescollapses the dev tree's^4.4.3holders to the same patched copy. (dsh:packages/session/session-projection/src/index.tsstateSchema.parse/viewSchema.parse; per-packagezodpins;packages/boot/app-boot/src/profile.tshoisted linker)
How every claim above is proven.
- Check — supported-set lockstep:
tests/compat/bundle.spec.tsfails unlessdshReleases,tests/baselines.tsand both CI workflows' fetched tags name the same staged releases, the ranges admit every staged release, each line final and0.2.2-alpha.3while refusing0.1.7*and0.2.0-rc.1, andBASELINE_DSH_VERSIONequals the lowest floor. - Check — seam matrix (the
compatvitest project; every CIpnpm test): per baseline it stages selected REAL harness sources (registry + types, values, known-event types, platform module table, admission module) on the tag's cordis version, boots the BUILT plugin, probes host behaviour, the client faces and the retired seams (settingsregister, settingsget(ns), sessionsopen(id)), re-runs the tag's admission evaluator, asserts every fold-switch event family is covered by some baseline and known to the tag's durable vocabulary, and checks the sliced-fold faces. Const-enum members are inlined astsccompiles them (the0.2.2registry importsFiberState, absent from the published cordis build). Needs a dsh checkout (DSH_REPO, default~/dev/deepseek-harness) and a builtlib/; a missing checkout or builtlib/skips with a printed reason on a dev box (CI fails), while a missing tag or a failing probe fails everywhere. - Check — differential fold (manual):
bun scripts/diff-fold.ts <session.jsonl>...(needs abunruntime, not a package dependency) replays token-meter's owncontextBreakdownfrom the dsh source checkout against the plugin's composition (system/tools/message tokens, the documented image delta excepted; exit 0 = match). No other metering figure has a differential check. Surface order and replacement position are pinned separately: the host suite folds the same events through both implementations and requires identical node order. - Check — install: automated in
release.ymlviadsh-plugin-checkeragainst npmlatestonly, so it covers one line at a time. For every supported line — and both staged0.2.2releases — run the manual pass: a disposableDSH_HOME, that release's CLI,dsh plugin add dsh-context→ exactly onedsh-contextrow in--dump-config→dsh plugin remove→ none. Pin the exact just-published plugin version — pnpm'sminimumReleaseAgecan hold a fresh release back. - Check — host data plane:
tests/host/{catalog,versionRoute,cost,overview,overviewPage,overviewProjects,overviewMemory,overviewCache,overviewCacheShards,overviewMaterialization,materializedSnapshot,headsRoute,history,backfill,backfill-unreadable,backfill-failed,foldPool,coldRead,fleet}.spec.tsandtests/client/{versionSource,costRefresh,overviewSource,historySource,historyCollections,historyPaging,route,wireCost,fleetDetail,fleetModel,retention,invalidation}.spec.tscover the catalogue TTL/failure paths, the purpose-split version endpoint, the lazy pricing bootstrap + bounded cost retries, the cost wire decoders, the overview revision/unchanged replies, the host page/tally aggregates, the fleet summary/batch contract, and the invalidation hooks. A browser measurement pass on a real dsh web server asserts zero external requests from the page, records overview/snapshot payload bytes, fleet request counts, client heap and narrow-width DOM before/after, and compares the context-tab cost faces byte-for-byte. - Measurement — full history (2026-11-21, single run): host 84,467-event session (16,457 requests, 32,914 nodes, 61,466 spans): pre-phase1+2 warm peak WS 442 MB / idle heap 92 MB; full-history warm 786 MB / idle heap 174 MB; an empty history route idles at 92 MB and fold-then-discard at 173 MB, locating the residual in the persistence parsed-log memo. Browser smoke max (16.5k steps): context heap 36.7→53.3 MB, 74 history requests / 853 KB / 248 ms, context DOM 3,343→5,309 and stable, long tasks 2→6 with the same 302 ms maximum,
/contextmodal passes, no server errors. (scripts/memory-bench/host.mjs,scripts/memory-bench/browser.mjs) - Check — hostile fixtures: every guard is exercised with hostile input — wrong types, absent fields, throwing accessors — not only a happy path.
- Procedure — add a baseline: one
Baselineentry intests/baselines.ts(tag, vendored cordis, faces) plus the tag in both workflows' fetch step; runpnpm test; the lockstep test fails until the fetch lists match. - Limitation — scope: these checks prove source-level seam compatibility, the
contextBreakdowndifferential, and install/uninstall for the checked line(s) — not full web-app runtime acceptance on a real profile.