deepseek-harness / client
AGENTS.md289k starsChanged 4 months agoMITView on GitHub
Rules for packages/client/* (the browser side of the dsh web GUI) plus its build entry apps/web. They supplement the repo-wide conventions and the package rules. Read the current Web Client architecture, Slots reference, and Conversation reference before changing the corresponding layer. Packages here are named with the directory prefix: @deepseek-ai/dsh-client-<name>. The Slots reference owns the current design; these are the rules you must not violate when writing or reviewing client code:
- Reads credentials
Trending
Steady talk.about the whole repository
Who's talking about deepseek-ai/deepseek-harness
- @timkellogg.me“DeepSeek Harness v0.1 the idea is everything is a plugin — models, tools, sessions, skills, sandboxes, …”Bluesky · Aug 13, 2026 · 77 likes
- pingdotgg/t3code“Is DeepSeek Harness provider support something you'd want?”GitHub · Aug 17, 2026 · 31 reactions
- farion1231/cc-switch“可以尝试兼容Deepseek Harness吗”GitHub · Aug 13, 2026 · 21 reactions
- @midu.dev“¡DeepSeek hace de código abierto su Agent Harness! 144.000 estrellas en 4 días. Todo lo cambias a base de …”Bluesky · Aug 17, 2026 · 18 likes
- Javis603/token-monitor“希望增加DSH(DeepSeek Harness)的用量统计支持”GitHub · Aug 13, 2026 · 9 reactions
The biggest 5 of 66 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 66
Talked about on GitHub, Bluesky and Hacker News (66 times).
On GitHub · 50
- Aug 17, 2026Is DeepSeek Harness provider support something you'd want? — pingdotgg/t3code31 reactions · 16 comments
- Aug 13, 2026可以尝试兼容Deepseek Harness吗 — farion1231/cc-switch21 reactions · 25 comments
- Aug 13, 2026希望增加DSH(DeepSeek Harness)的用量统计支持 — Javis603/token-monitor9 reactions · 1 comment
- Aug 22, 2026`npm install -g @deepseek-harness-tui/dsh-tui` 在 npm 12 崩溃:`Cannot read properties of null (reading 'children')` — ccch1mneyyy/dsh-TUI7 reactions · 6 comments
- Aug 17, 2026Feature Request: Please add DeepSeek Harness as an Agent harness — block/buzz6 reactions · 1 comment
45 more on GitHub
- Aug 13, 2026package request: deepseek-harness(dsh) — numtide/llm-agents.nix4 reactions · 5 comments
- Aug 13, 2026[Feature] Add DeepSeek Harness as a first-class client integration — lidge-jun/opencodex3 reactions · 3 comments
- Oct 22, 2026[Engine] Engine crashes unexpectedly (exit code 1 / 3221226505) during DeepSeek Harness session on Windows 11 — Niko1221/Strata2 reactions · 3 comments
- Oct 14, 2026免费模型不可用,附D老师给的解决方法,自测恢复,望修复 — Ebony-Vinyl/dsh-our-free-model2 reactions · 8 comments
- Sep 29, 2026Make Codacy reviews available to every MDE coding agent — amoai-tech/mdeai2 reactions · 7 comments
- Sep 6, 2026[Bug] DeepSeek Harness "startup timed out" with dsh 0.1.2-rc.1 (readiness check incompatible) — CherryHQ/cherry-studio2 reactions · 2 comments
- Aug 31, 2026合作邀请:Blue TUI 生态适配(适配工作我们来做) — dream12347/dsh-session-manager2 reactions · 5 comments
- Aug 21, 2026[Bug]: DeepSeek Harness (dsh web) auto-opens system browser — Cherry should pass --no-open — CherryHQ/cherry-studio2 reactions · 1 comment
- Aug 17, 2026dsh: Needs `/bin/bash` to be present — numtide/llm-agents.nix2 reactions · 1 comment
- Nov 25, 2026[Integrations] DeepSeek Harness (dsh) tracing plugin — traceroot-ai/traceroot1 reaction · 3 comments
- Nov 25, 2026feat: 支持 DSH 0.2.3 的 MCP 工具按需加载(toolLoading)与 catalogDescriptionMaxLength — Fishquito7/dsh-skill-mcp-panel1 reaction
- Nov 18, 2026chore: validate novel workspace on DSH 0.2.2-rc.4 — Stahl-G/dsh-novel-workspace1 reaction · 1 comment
- Nov 12, 2026fix: restore agent status with Harness session catalog API — wxcvm/dsh-purge1 reaction · 1 comment
- Nov 10, 2026建议:`label` 按 SlotLabel 契约返回字符串 —— 当前返回 React 元素会让 DSH 0.2.2-rc.1 整个会话头部渲染崩溃 — cirelir/dsh-change-review1 reaction
- Nov 6, 2026Sign the DeepSeek Harness and Kimi Code through their own accounts — storytold/craft-anything1 reaction · 2 comments
- Nov 4, 2026Check plugin against DSH 0.2.2-rc.1 — JonyFang/dsh-plugin-custom-profile1 reaction · 1 comment
- Oct 28, 2026chore(deps): 升级 dsh peers 到 0.2.1-rc.4 / upgrade dsh peers to 0.2.1-rc.4 — btspoony/mstar-harness1 reaction · 2 comments
- Oct 13, 2026docs(dsh): select synchronization by host capability — mindfold-ai/marketplace1 reaction · 2 comments
- Oct 11, 2026Add umialpha/dsh-session-groups (alpha source preview) — imsai-sh/awesome-deepseek-harness-plugins1 reaction · 2 comments
- Oct 7, 2026replan(解决)的硬 cancel 触发 DSH 0.2.x turn/end reason:null,导致对话区永久空白——建议默认软 steer — PC2005-cloud/dsh-pet1 reaction · 1 comment
- Sep 30, 2026[Request]: DeepSeek Harness Desktop Preview — ScoopInstaller/Versions1 reaction · 2 comments
- Sep 29, 2026chore(deps): 升级 dsh peers 到 0.2.0-rc.2 / upgrade dsh peers to 0.2.0-rc.2 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 24, 2026feat(adapters): add a DeepSeek Harness adapter with a full hook bridge — affaan-m/ECC1 reaction · 46 comments
- Sep 16, 2026fix(llm): 将会话头限定到 OpenCode 路由,避免发给无关 provider — dsh-tauri/deepseek-harness-desktop1 reaction · 1 comment
- Sep 14, 2026支持官方 v3 会话日志计量 — le-soleil-se-couche/dsh-token-cost1 reaction · 1 comment
- Sep 11, 2026chore(deps): 升级 dsh peers 到 0.1.5-rc.2 / upgrade dsh peers to 0.1.5-rc.2 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 10, 2026Some cases that RTL is not working as expected + Visual Examples — kfirsch/dsh-hebrew-rtl1 reaction · 1 comment
- Sep 10, 2026chore(deps): 升级 dsh peers 到 0.1.5-rc.1 / upgrade dsh peers to 0.1.5-rc.1 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 9, 2026chore(deps-dev): bump the deepseek-harness group across 1 directory with 2 updates — blaxel-ai/deepseek-harness-blaxel-sandbox1 reaction · 1 comment
- Sep 4, 2026chore(dsh): 升级 dsh host 线到 0.1.3-alpha.1 / upgrade dsh host line to 0.1.3-alpha.1 — btspoony/mstar-harness1 reaction · 2 comments
- Sep 3, 2026chore(deps): bump the deepseek-harness group with 4 updates — blaxel-ai/deepseek-harness-blaxel-sandbox1 reaction · 1 comment
- Sep 3, 2026chore(dsh): 升级 dsh host 线到 0.1.2-rc.1 / upgrade dsh host line to 0.1.2-rc.1 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 2, 2026chore(dsh): 升级 dsh host 线到 0.1.2-alpha.5 / upgrade dsh host line to 0.1.2-alpha.5 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 2, 2026chore(dsh): 升级 dsh host 线到 0.1.2-alpha.4 / upgrade dsh host line to 0.1.2-alpha.4 — btspoony/mstar-harness1 reaction · 1 comment
- Sep 1, 2026chore(dsh): 升级 dsh host 线到 0.1.2-alpha.3 / upgrade dsh host line to 0.1.2-alpha.3 — btspoony/mstar-harness1 reaction · 1 comment
- Aug 30, 2026chore(dsh): 升级 dsh host 线到 0.1.2-alpha.2 / upgrade dsh host line to 0.1.2-alpha.2 — btspoony/mstar-harness1 reaction · 1 comment
- Aug 29, 2026合作邀请:Blue TUI 生态适配(适配工作我们来做) — zh667/TokenLedger1 reaction · 5 comments
- Aug 27, 2026chore(dsh): 升级 dsh host 线到 0.1.2-alpha.1 / upgrade dsh host line to 0.1.2-alpha.1 — btspoony/mstar-harness1 reaction · 1 comment
- Aug 27, 2026🌱 Show official DeepSeek Harness logo — sesori-ai/sesori_apps_monorepo1 reaction · 2 comments
- Aug 26, 2026Feature Request: Add support for DeepSeek Harness — sodiumsun/agenttrail1 reaction · 1 comment
- Aug 22, 2026[Compatibility] DSH Desktop built-in Market cannot load this catalog under fake-IP DNS proxies (client-side blocked-address) — imsai-sh/dsh-1024store1 reaction
- Aug 21, 2026chore(dsh): upgrade dsh host line to 0.1.1-rc.2 — btspoony/mstar-harness1 reaction · 1 comment
- Aug 19, 2026docs(blog): Cordisの時空間合成可能性を解説 — penpenguin/portfolio1 reaction
- Aug 17, 2026MIM-164 提供可复用的代码熵回收 Skill — gaixianggeng/codex-skills1 reaction
- Aug 14, 2026【功能请求】 支持 dsh(deepseek-harness) — crafter-station/petdex1 reaction · 2 comments
On Bluesky · 13
- Aug 13, 2026DeepSeek Harness v0.1 the idea is everything is a plugin — models, tools, sessions, skills, sandboxes, loops, … github.com/deepseek-ai/... — @timkellogg.me77 likes and reposts · 7 replies
- Aug 17, 2026¡DeepSeek hace de código abierto su Agent Harness! 144.000 estrellas en 4 días. Todo lo cambias a base de plugins: El modelo, las tools, el… — @midu.dev18 likes and reposts · 1 reply
- Aug 13, 2026github.com/deepseek-ai/... — @sungkim.bsky.social5 likes and reposts
- Aug 29, 2026github.com/deepseek-ai/... I haven't used it myself but idk I'd consider this a "first party harness" I guess. — @itisamystery.com4 likes and reposts · 2 replies
- Aug 19, 2026DeepSeek Harness github.com/deepseek-ai/... A Programming Paradigm for Spatiotemporal Composability github.com/cordiverse/p... Interesting… — @inamiy.bsky.social3 likes and reposts
8 more on Bluesky
- Aug 14, 2026maybe this? github.com/deepseek-ai/... — @bisks.net3 likes and reposts · 2 replies
- Nov 14, 2026DeepSeek open-sourced an agent harness where everything is a plugin, and it launches with one npx command. 🔗… — @prosperflowio.bsky.social2 likes and reposts
- Sep 13, 2026GitHub - deepseek-ai/deepseek-harness: DeepSeek Harness: Everything is a Plugin. https://github.com/deepseek-ai/deepseek-harness — @tech-trending.bsky.social1 likes and repost
- Aug 23, 2026github.com/deepseek-ai/... it's real check it out, they're linking the paper — @daniel-j-h.bsky.social1 likes and repost
- Aug 13, 2026DeepSeek Harness https://github.com/deepseek-ai/deepseek-harness — @hnbot.gsuscs.xyz1 likes and repost
- Aug 13, 2026github.com/deepseek-ai/... 5分钟前还是 404 的,现在打开已经 700 多星了 抢票呢你们? — @icecodenew.bsky.social1 likes and repost
- Aug 14, 20265. Writer Launches New GLM-5.2 Based Model for Lower Token Costs LINK 6. DeepSeek Releases Open-Source Agent Harness LINK — @hackobar.bsky.social0 likes and reposts · 1 reply
- Aug 14, 2026DeepSeek acaba de soltar su propio Claude Code: DeepSeek Harness, open source. 82K⭐ en GitHub el primer día. Repo aquí — @lluis154.bsky.social0 likes and reposts · 1 reply
On Hacker News · 3
- Aug 21, 2026DeepSeek harness: what doors does config over code open?3 points · 1 comment
- Nov 14, 2026Everything is a plugin (to the model context)2 points
- Aug 18, 2026DeepSeek Harness1 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository63 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/notes/AGENTS.mdAGENTS.md
- .agents/notes/archived/AGENTS.mdAGENTS.md
- .agents/notes/implemented/AGENTS.mdAGENTS.md
- apps/cli/tests/profiles/AGENTS.mdAGENTS.md
- benchmarks/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- native/system/AGENTS.mdAGENTS.md
- packages/AGENTS.mdAGENTS.md
- packages/experimental/AGENTS.mdAGENTS.md
- packages/schedule/AGENTS.mdAGENTS.md
- packages/web/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- snapshots/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-budget-chains/workspace/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-budget-chains/workspace/.dsh/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-budget/workspace/.agents/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-budget/workspace/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-budget/workspace/.dsh/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-group-failure/workspace/.agents/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions-group-failure/workspace/.dsh/AGENTS.mdAGENTS.md
- snapshots/session/agent-instructions/workspace/.agents/AGENTS.mdAGENTS.md
- snapshots/session/ptc-workspace-context-scoped/workspace/AGENTS.mdAGENTS.md
- snapshots/session/ptc-workspace-context-scoped/workspace/nested/AGENTS.mdAGENTS.md
- snapshots/session/ptc-workspace-context/workspace/AGENTS.mdAGENTS.md
- snapshots/session/ptc-workspace-context/workspace/nested/AGENTS.mdAGENTS.md
- website/AGENTS.mdAGENTS.md
- agent-experienceSkill
- cordis-styling-nitpickingSkill
- dsh-archive-agent-notesSkill
- dsh-ci-test-reliabilitySkill
- dsh-client-ui-uxSkill
- dsh-code-reviewSkill
- dsh-create-upgrade-guideSkill
- dsh-cua-macos-signingSkill
- dsh-doc-writingSkill
- dsh-error-handlingSkill
- dsh-find-simplificationsSkill
- dsh-merging-stacked-prsSkill
- dsh-official-plugin-artworkSkill
- dsh-pr-descriptionSkill
- dsh-pre-push-checksSkill
- dsh-prose-standardSkill
- dsh-responsive-uiSkill
- dsh-session-projectionSkill
- dsh-speed-up-perfSkill
- dsh-translate-docsSkill
- dsh-trim-cot-leakageSkill
- record-browser-gifSkill
- dingtalkSkill
- feishuSkill
- tencent-meetingSkill
- wecomSkill
- preview-tourSkill
- dsh-docSkill
- diagnose-windows-sandbox-aclSkill
- officeSkill
- dingtalk-sharedSkill
- editing-cordis-compositionsSkill
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Two declaration forms: use ctx.slots.register({ name, children?, store?, inject?
- Very specific: line 71
Keep the published payload closed: Every relative runtime import and emitted asset must be covered by files.
- Very specific: line 83
Baseline externals are implicit for every dynamic bundle: Do not repeat entries from PLATFORM_MODULES in dsh.client.external.
- Distinctive: line 125
Use dsh-client-ui-ux for UI design rules and review requirements.
- Distinctive: line 156
Run the narrowest rung that covers what you touched.
- Very specific: line 162
If test:gui is red on code you did not touch, neither silently fix nor ignore it: note it in your handoff so it lands in the next PR …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — Web client stack
Rules for packages/client/* (the browser side of the dsh web GUI) plus its build entry apps/web. They supplement the repo-wide conventions and the package rules. Read the current Web Client architecture, Slots reference, and Conversation reference before changing the corresponding layer.
Packages here are named with the directory prefix: @deepseek-ai/dsh-client-<name>.
Slot and props discipline
The Slots reference owns the current design; these are the rules you must not violate when writing or reviewing client code:
- Two declaration forms: use
ctx.slots.register({ name, children?, store?, inject? }, Component)for a parent-owned extension position. Designers may usectx.slots.registerFactory()for a component or assembly they consider reusable, without requiring multiple existing callers or unrelated parents (applicability). The shell alone renders'root'. - children = declaration + authorization: the slots your component renders are exactly the keys of its registration's
childrenobject (spec values:kind/scope). Factory children obey the sameSlotMapchecks and global ownership rule. Rendering an undeclared slot, or declaring one someone else declared, fails at load. Slot names mirror the composition path:<domain>.<entry>.<hole>(for example,'tool.call.toolview'). - Component props are the five shares, all derived:
PropsRuntime<K>(owner data plus scope/global seats),PropsRenderSlots<S>(children),PropsRenderFactories(renderFactorySlot),PropsStore<H>(store), and the inject face. Never hand-write or locally re-type a derived member. Factory props follow the correspondingFactory*PropsOfaliases. - Hooks are framework-made only: standing seats include
useSession,useSessions,useWorkspaces,useStore,renderSlot, andrenderFactorySlot; Factory definitions additionally receiveuseFactorySlot. The renderer also bindsuse<Name>hooks from provide contributions and injecthookscompartments. Business code never creates a hook or selector as a prop value — pass plain data and callbacks. (Component-internal behavioral hooks that subscribe to nothing external are fine.) - Live data has exactly three channels: parent knows it → owner props at the renderSlot site; only the component knows it → local state; shared across entries or survives remounts → a store declared at register. Derived data is a pure function over framework-hook data (
useMemo), never its own subscription. - Stores: read
props.useStore, writeprops.actions.*— the declared actions are the complete mutation API. Write the store as an exportedcreateXXXStore()factory (module-level handles are forbidden — de-facto singletons); share by passing one handle to registrations insideapply. A Factory may instead receive the factory itself to create one handle per committed render position. Production code never calls the factory or.create()outside registration; tests do (that is the sanctioned zero-machinery path). - inject returns plain data and callbacks from the apply closure's own ctx — no hand-made hooks, no ReactNode producers, no whole-service objects. A registrant-private reactive fact uses the reserved
hookscompartment (bare observables the renderer binds touse<Name>; components never see the sources). The plugin may use only the dependencies named by itsinjectdeclaration; there is no wider ctx to reach for. - Factory local Components keep stable identities: pass module-level function Components through
renderFactorySlot(..., { slots }). Creating a Component function during render intentionally remounts that local subtree and resets its local state; the caller owns that behavior. - A
keystates identity: pass one when it names which entity or instance the element represents. A key that only silences a warning, or that encodes render order, misstates identity and makes a later remount or reuse decision wrong.
Reactive read and contract-currency discipline
How live data reaches render code, and what UI domains may share:
- Everything a render reads that can change outside React arrives through a framework hook (rule 4 above). Event-handler code may read live snapshots (e.g.
keyboard.snapshot); render code subscribes. - Business components contain no subscription machinery — no
useSyncExternalStore, no manual subscribe wiring, no mirroring an external snapshot into local state or a second store. Give each reactive fact its owning channel instead: registrant-private → the injecthookscompartment; cross-entry or remount-surviving → a declared store; per-session standard →sessions.provide. - Data-access ladder — resolve needs in this order: framework hooks (standing seats + provide/inject-bound
use<Name>) → a declared store (useStore/actions) → inject callbacks → anything else is a new framework extension point and needs main-thread arbitration. - UI domains share JSON-compatible data and callbacks. Owner props, injected values, store state, and provide contributions use these values. Tool
argsmay carry the lazy argument reader; its Definition republishes the block when an observed answer changes. Transient file-read and document-preview content may also carryUint8Array: published buffers are borrowed read-only, copied before Worker transfer, and never persisted in layout or Session JSON. The injectedhookscompartment is the only place for bare observables, and components never receive those sources directly. Route ReactNode content through a slot; do not add ReactNode-valued owner props or injected members (the composer's existingaccessory/overlay/leftItems/rightItemsfields remain until they move to slots). - An observable source keeps two identities stable: the source object itself (hook binding is cached per source), and its snapshot between changes (
getSnapshotreturns the same reference until the fact moves). - Whoever rebuilds a published value republishes it through the same source in the same step, and a registration path that can run after consumers exist notifies the live consumers as part of registering.
- Resource consumers go through
useResource. An element showing a resource reads it through the injecteduseResourcehook, and a domain wrapper composes its own hook over it rather than reimplementing the fetch, cache, or polling below. Wrapping is free at the business layer as long as the bottom layer is not rebuilt (client resources). - Effects do not synchronize state.
useLayoutEffectis not a default anduseEffectis not the fix: a layout measurement answers why it happens here, why CSS cannot express it, and why it must be pixel-based, then takes an injected measurement hook. An effect never pushes render-derivable data back to a parent through a props setter; decide it during render, give the host a render-time channel, or move it to the inject face.
Export discipline (client plugin packages)
The /client entrypoint of a UI plugin package is its public browser API, not a convenience barrel. Three rules apply package-wide (do not restate them as per-file comments):
- A UI plugin exports no values beyond what cordis loading needs —
apply/inject(andConfigwhere present), plus store factories consumed type-only by components (ReturnType<typeof createXXXStore>). Shared types (owner data, injected values, composed prop aliases) may also be exported. Implementation components, pure helpers, constants, and store handles stay internal. Adding any new value export requires user sign-off, not a matching consumer. The/cliententries of the dynamic plugin packagesui-slots,ui-primitives, andui-dockkitstill export values such as components and functions; those exports are a historical exception that will be reduced over time, not a precedent for new value exports. - Same-package tests import internals directly — relative
../src/client/xxx.tsfrom package tests, or the./src/*subpath where a spec lives outside the package. Never widen the public API to make a test compile. - A feature plugin MUST NOT runtime-import or re-export another feature plugin's values, and MUST NOT declare
dsh.client.externalto obtain them. Shared declarations useimport type; behavior crosses packages through injected Cordis services, and UI crosses packages through slots. If neither fits, stop and escalate — do not add an export to unblock yourself. Shared runtime code belongs only in a narrow static owner such asclient/storeor a browser-safe utility package, never in the value exports ofui-slots,ui-primitives, orui-dockkit; a feature plugin may request apackages/api/row's runtime values throughdsh.client.external, and transport and generated API assemblies keep their explicit infrastructure edges.
ctx discipline (components never see ctx)
ctx belongs to the apply world only: the plugin body and the inject factories closed over it. Components — every .tsx under a feature domain — receive all data and callbacks through the derived props shares; they never call a hook that reaches ctx, never import a service class to poke it, never read a React context (business components see zero contexts — BindingContext and its kin are renderer-internal). If a component needs something new, the answer is a prop threaded from its share's source (owner site, store declaration, or inject face), not a hook.
Layering red lines
The stack has one-way knowledge, documented in the Web Client architecture:
- Data object layer (React-free):
client/connectionowns transport generations,api/session-controller/clientownsClientSessions→SessionManager→Session,api/workspace-controller/clientowns Workspace state, andclient/storeowns the snapshot-store engine (defineStore,createSnapshotStore,shallowEqual). Store products are bare observable sources with no hook members. - Render machinery (
ui-renderer, dynamic plugin): all ctx-to-React integration — slot renderer/outlets,SessionProvider, and the uSES adapter. Every hook is composed here at the binding site from bare sources; production business code carries no ui-renderer value dependency. - Presentation components (plugin packages'
src/client/, pure props): consumables, expected to be rewritten wholesale. Business logic must not leak into them; everything arrives through the derived props shares.
Non-negotiables across the layers:
- Business data lives in the object layer, never a store. Entry-declared stores carry shared viewing/interaction state (selection, drafts, panel widths); sessions, frames, and connections stay in the object layer.
- rpcId is strictly bidirectional: the initiator mints, the responder echoes, and minting stays in Connection (Typert Gateway method calls).
- Notifier publication discipline:
notifyNowis only the direct echo of a user gesture; structural updates use microtask-batchedmarkDirty, while visible streaming chunks use cumulativemarkFrameDirty. See../api/session-controller/src/client/sessions/notifier.ts. - The web layer is pure presentation. Nothing that is only "how to draw" enters the session log. Tool cards derive in the Client from raw call/result events and persisted result metadata; process-local control state uses its own snapshots and frames. Unknown or malformed tool data falls back to the generic form. A new model-visible input still requires a session event (repo-wide rule).
Dependency declaration
Npm sections describe installation and development relationships; each build face independently decides what its artifact contains. verify-package-dependencies checks and repairs these rules; verify-client-packages owns Client loading and module requests.
- Every client package keeps Cordis in matching
peerDependenciesanddevDependencies. This includes the static packages because their Node face participates in the same Cordis plugin contract. - A package under
packages/client/is always covered;dsh.clientmarks a Client/Host package outside that directory, in every group includingpackages/experimental/. Explicit include/exclude entries handle exceptions. Every covered package's Host entries are scanned, including the non-browser entries itstsdown.config.tsbuilds outsidesrc/client/, such as Worker and child-process entries, while a./clientexport alone does not select dependency policy. - Browser and type relationships are development-only. Workspace and third-party Client imports, type-only imports, module augmentations, TypeScript project references,
dsh.client.inject, and metadata-only peers belong only indevDependencies. Configuration-only entries absent from imports are listed in the dependency policy; Node companion value imports follow the Host rules below. - Host value imports require classified exports. A workspace value reached from the package's Host entry belongs only in
dependencieswhen its exact module specifier and runtime export appear insafeHostDependencyExports. Exports whose identity or module state must be shared appear inpeerRequiredHostExportsand keep the whole package edge in matchingpeerDependenciesanddevDependencies. The verifier rejects unclassified exports before--fixwrites manifests. - Only Host runtime libraries require installation dependencies. Browser-only third-party implementations belong in
devDependencies, whether inlined intolib/client.jsor retained as bare imports in a static browser library. Static libraries are Web-shell build inputs: the final Vite build merges their imports, and their compiled stylesheets travel in the__$dsh_client_module_manifestexport for the renderer to install. Distributed browser code remains subject to runtime license disclosure (reference). - Browser and Node build faces declare externality independently. A dynamic browser half uses the baseline plus
dsh.client.external; a statically linked face externalizes every bare specifier; a Node face externalizes its production dependencies (tsdown.client.ts). Moving a name between npm sections must not silently change bundle contents. - Keep the published payload closed. Every relative runtime import and emitted asset must be covered by
files; the repository publint pass checks the exact publication view. - Only the root manifest declares React type packages.
@types/reactand@types/react-dombelong only in the rootpackage.jsondevDependencies, andverify-package-dependenciesrejects them in every manifest underapps/*,packages/*/*,vendor/*, andvendor/im/*; packages still declare thereactandreact-domthey import. Each package-local pnpm link is one more location TypeScript scans when it computes module specifiers for every JSX file (rationale). - Package assets live under
src/client/assets/or in a dependency whose stylesheet the Client imports. Client code references a package file by relativeimportand the package's own CSS by relativeurl(); supported extensions are.svg,.png,.webp,.jpg,.jpeg,.woff2,.woff,.ttf, and.otf. A relativeurl()in an imported dependency stylesheet must stay inside that dependency and is emitted underlib/assets/vendor/<dependency>/<path>; each@font-facekeeps only its firsturl()source. The package declares"./assets/*": "./lib/assets/*"inexportsandlib/assetsinfiles; the build preset emits each referenced file underlib/assets/, and the browser loads it through the client-modules asset route.
Build-time browser environment
Client business code may statically read process.env.DSH_CLIENT_*; every referenced value is public artifact content. The shared build-environment helper gives Vite and dynamic tsdown bundles the same build-process values, resolves unset names to undefined, and exposes no dynamic lookup or enumeration. The Node half of a client package receives the same fixed values while keeping its runtime process.env; Host source launches read them from the environment pnpm run dev:web prepares. A complete root build records the exact public values and a digest of all client artifacts; release and built-artifact consumers reject a missing or stale record. Use runtime configuration for choices that must change after build.
Shared modules and the module graph
A dynamic browser half either carries a module privately or requests the shared module-table identity. The client baseline is centralized in web/src/platform.ts: PLATFORM_MODULES lists the specifiers every dynamic bundle leaves to the module table by default: React, Cordis, selected third-party libraries, and the static Client library client/store, which the shell seeds, and ui-slots, ui-primitives, and ui-dockkit, whose immediately rows the module table resolves by package name (package roots); PRELOADED_CLIENT_EXTERNALS is reserved for dynamic rows whose factories must arrive before shell boot and is empty when no such row exists.
- Baseline externals are implicit for every dynamic bundle. Do not repeat entries from
PLATFORM_MODULESindsh.client.external; npm dependency declarations still follow the dependency rules above. dsh.client.externalis not a feature-plugin dependency mechanism. Infrastructure, transport, or generated assembly may add a package-specific non-baseline value request whose dynamic row must be materialized through the module table; a feature plugin may request only rows underpackages/api/. Declare the package or the exact import specifier; a request for<specifier>also covers<specifier>/client, which names the same row.- Silence means a private copy. Third-party implementation libraries outside the baseline may be bundled independently. A value reached only through
import typeis erased and creates no request. - A request has two possible suppliers. A dynamic package supplies its own row, including the
immediatelyrow that answers a workspacePLATFORM_MODULESname; the shell supplies every otherPLATFORM_MODULESentry as an exact static-table key. There is nodsh.client.providealias protocol. - Validate both sides. The dynamic build preset externalizes the baseline and rejects undeclared workspace value imports;
verify-client-packagesrejects malformed or redundant requests, missing suppliers, synchronous request cycles, and a workspace platform module that neither uses thestaticLinkedpreset nor has animmediatelyrow of the same name. - Package-local chunks may require each other synchronously. Source uses
import(). The shared preset writes each chunk's synchronous chunk requires as its registrationdeps, which Modules registers before the factory runs, emitsrequire.async("./client.<name>.js", { deps })with a prefetch hint for the rest of the target's chunk group, and moves the chunks the entry requires into the entry file. A chunk must not import the package entry, anddepsnever crosses packages (decision).
<a id="hand-written-package-roots"></a>
Hand-written package roots
ui-slots, ui-primitives, and ui-dockkit are dynamic plugin packages with immediately: true, like ui-renderer or client/connection; their /client entries still export values that other bundles require, a historical exception that will be reduced over time (export discipline). Their package root carries the compatibility adjustments for code outside the repository: its runtime is the hand-written Host entry src/index.js, which holds only the empty apply and builds lib/index.js, and its types reuse the ./client declarations, lib/types/client/index.d.ts. The packages have no src/index.ts; tsconfig.base.json maps the package root to the src directory, as for every Client package, so tsx, which runs the source-launched Host, resolves it to src/index.js (decision).
- Name these packages through
/client. Repository code imports their values and types, and augments their interfaces, through<package>/client;verify-client-packagesrejects every reference to a package root whosetypesreuse the./clientdeclarations, because in the repository that root resolves to the Host entry and carries neither the/clientexports nor their declarations. Code outside the repository may use either spelling or mix them: the published roottypesand./clienttypes are one file, and in the browser both specifiers name one module-table row.
The module graph sits below cordis DI
Three declarations read like dependency edges and none is interchangeable: Cordis service inject, module-graph external, and dsh.client.inject — the informational package-name edges of the new-package checklist.
Cordis service inject | module graph external | |
| Unit | service name | module specifier |
| Timing | runtime; the fiber waits | materialization; the require handed to a factory is synchronous and cannot wait |
| Unsatisfied | stays PENDING, with no timeout | throws on the spot |
| Who may satisfy it | any plugin providing that service, replaceable | the single module identity, not replaceable |
| Cycles | allowed | rejected |
The seam is loader.internal = modules: cordis reaches plugin code through EntryTree.import, so every module request must be satisfiable before cordis can order activation above it. The modules node half emits rows in topological order, and ClientModuleSystem.import/prefetch recursively registers dynamic provider factories before their consumers materialize. This module order is independent from Cordis activation: a provider that injects services can register first and activate last.
packages/client/web is not a Loader entry. Its static imports seed the third-party PLATFORM_MODULES entries, Cordis, and client/store; parser-preloaded dynamic rows remain ordinary Loader entries and ordinary lib/client.js artifacts.
Conversation Node discipline
- A Chat business feature registers one
ConversationNodeDefinitionand its keyedconversation.chat.noderenderer; do not add its event switch or fold toSession,SessionManager, or a central built-in dispatcher. Follow the Conversation reference. match(event)reads only the currentSessionEventLike. Every scalar event or packed Assistant run in a multi-input Context carries or independently derives the same stable business id;updatefolds one Match into State and remains deterministically replayable by logical logseq. Packed rows are update-only, and a Definition that consumes Assistant deltas implements both scalar andchunkrow/*branches without expanding members.- The append hot path and renderers never scan the full event window, Contexts, or Chat Nodes. Accumulate in State, publish same-Turn/Step facts through
buildLocationData(), and consume final Node data or constrained Location hooks.
Directory regime (plugin packages)
One UI feature = one plugin package (src/client/ browser half). A multi-domain package splits where its code could later become separate packages — ui-conversation is the example: contract/ (the only shared API), domain directories that never import a sibling domain, and apply.ts as the single cross-domain assembly point; scripts/verify-client-domain-graph.ts enforces the levels. Registration goes through slots.register or slots.registerFactory in apply — never module-level side effects.
Styling and localization
Use dsh-client-ui-ux for UI design rules and review requirements. The client test ladder below still applies.
docs/web-styling.md is authoritative. Shared --dsw-* tokens and global sheets live in ui-theme/src/styles/; feature components consume semantic aliases through CSS Modules and clsx, with no literal colors, component library, or Tailwind. Code comments are English. Design judgment beyond those rules — feedback surfaces, loading states, overlay safety, platform window adaptation — follows dsh-client-ui-ux; responsive layout and telling a mobile or touch client from a desktop one follow dsh-responsive-ui.
Menus use Menu or MenuSurface, including custom listboxes, except the explicitly listed schedule containers. Preserve the shared transparency and blur (rules).
Every product-visible string—including text, accessibility names, tooltips, placeholders, status/unit formatters, and primitive chrome—lives in a typed locale dictionary and reaches components through the standard t seat or an already-localized prop. Cordis-free primitives require complete label props and own no fallback copy. Keep user/model/wire data and code tokens verbatim; internal matching uses discriminants or stable ids, never localized text. pnpm run verify-client-ui-i18n enforces source ownership (decision).
Search and filter
User search queries over a list follow one rule, so a query finds the same item in every list. Unlike internal matching above, user query matching reads localized text:
- Rows display the current locale; matching covers every language the value carries. A
LocalizedTextcarries all of its languages; text resolved throught()carries only the active one. - Matching covers the text a row shows or the user can copy: names, titles, labels, descriptions, and ids. A menu whose default highlight spans several sources, such as the
/menu, matches names and labels only, so a description hit in one group cannot take Enter from the name another group matched. - Names, titles, labels, and readable ids match as substrings or as fuzzy subsequences that start at a word start, so
cptfindscompact. Descriptions, prompts, paths, and opaque ids such as UUIDs match only as contiguous substrings. Matching ignores case, width, and diacritics, and every space-separated term must match. - Results rank name prefix, then name substring, then fuzzy name, then text substring; equal matches keep the list's own order.
- Facet selections, such as status, category, or label filters, stay exact.
The rule covers lists filtered in memory, including a Host search that supplies a Client list, such as @ Session candidates; TextSearchIndex implements it for both. Searches backed by their own index keep their matcher: Session content search runs literal SQLite full-text terms over Session text, and the plugin market ranks its paged index on the Host. The sidebar's title, Workspace, and id matching follows this rule; only its content results use the full-text matcher.
Testing and coverage
The GUI test structure (three tiers, lane map) is settled in the GUI testing system reference; repo-wide policy in docs/testing.md.
- Client source packages are inside the per-file 100% coverage gate (
pnpm run test:coverage). Genuinely unreachable defensive arms take a/* v8 ignore -- <reason> */comment with a real reason, never a bare ignore. - Component specs render with realistic props or a driven fixture runtime and assert user-visible behavior, not class names, hook internals, or render counts.
- The jsdom environment comes from a per-file
// @vitest-environment jsdompragma on the spec's first line; the shared config stays node-env. - Each tier asserts its own layer. Data-layer semantics belong to the runtime and host suites; component specs cover presentation behavior.
Before you push: the local check ladder
Run the narrowest rung that covers what you touched; escalate only when the change surface demands it.
- Every GUI code change —
pnpm run test:gui(seconds; no browser, no server): the client suites plus the host-side GUI packages. This is the inner loop; run it as freely as a typecheck. - Any change that can alter the assembled browser or visible conversation/UI output (client components or copy,
apps/web, Vite,dsh-host-webserver, connection/handler/SSE) — additionallyDSH_SNAPSHOT=replay pnpm run test:web: rebuilds the frontend dist, then runs the browser smoke pair (the real-host case self-skips withoutDEEPSEEK_API_KEY) plus the keyless replayed e2e scenarios. Linux PR CI uses the same read-only replay mode. UseDSH_SNAPSHOT=refreshonly after confirming an intentional output change, orDSH_SNAPSHOT=recordwith a key to re-record fixtures. - Before a PR — use dsh-pre-push-checks to select the narrow checks for the outgoing diff; there is no repo-wide pre-push aggregate.
If test:gui is red on code you did not touch, neither silently fix nor ignore it: note it in your handoff so it lands in the next PR window's sweep.
New plugin package checklist
Bringing up a new packages/client/<name> plugin package (ui-workspace is a complete example; ui-sidebar/ui-user-questions are minimal skeletons):
- Package skeleton:
package.json(@deepseek-ai/dsh-client-<name>, exports././client/./src/*/./package.jsonplus./assets/*for package images,dsh.clientmanifest,fileslist),tsconfig.json(extendstsconfig.base.client.json, onereferencesentry per workspace dependency),tsdown.config.ts(clientBundle(import.meta.dirname, ['lib/types/index.js'])),src/index.ts(empty node-half apply),src/css-modules.d.tswhen using CSS Modules, andREADME.mdwith the Model Experience section. - Three registration surfaces, all required (missing any one fails at a different, later point): the
tsconfig.client.jsonaggregatereferencesentry; adsh.clientrow inpackages/bundle/web-app/cordis.patch.yml; apackages/bundle/web-app/package.jsondependency (profile boots resolve bare row names through the computed runtime resolution, which is installed as an interception on Node's resolvers — a row whose package no manifest declares fails to import).pnpm-workspace.yamlalready globspackages/*/*. - dsh.client manifest semantics:
platform: 'web'always, and the declaration requires a./clientexport (the scan throws without one);immediately: trueonly for stage-one-prefetch infrastructure rows.injectlists package-name dependency edges — they are informational only (preflight display, HMR diffing); they do not sequence entry activation or apply order. Activation order is Cordis fiber inject waiting on services, nothing else. A non-baselineexternalrequest sequences its dynamic supplier ahead of the consumer — see shared modules. - Registering into another package's slot: apply order is unconstrained, and a business service is not a declaration barrier. Use
ctx.slots.inject(name, () => ctx.slots.register(...)); it waits on the actual declaration, removes the contribution when that declaration collapses, reruns after redeclaration, and leaves with the caller's plugin fiber. Return a generator yielding each registration when several contributions must install and roll back atomically. A bareslots.registerinto an undeclared slot remains an error; keep service edges only for services the contribution actually reads. - Rebuild the bundle (
pnpm --filter <pkg> bundle) before probing a livedsh webserver — the registry serveslib/client.js, not sources. - Declaration decisions, each settled by dependency declaration and shared modules: does the package ship a
./clientexport; which non-baseline value imports requiredsh.client.external; which Host value imports are ordinary dependencies; which Browser and type inputs are dev-only; and whetherfilescovers every relative runtime import and emitted asset.
New component checklist
- Check the ui-primitives catalog before writing a control. A plugin cannot import another plugin's component, so
ui-primitivesis the only place a control can be shared; the catalog states when to reuse, when to promote, and when your own package is the right home. - Compose through
register: add the slot toSlotMap, declare it in its parent entry'schildren, and register your component. A component or assembly designed for reuse may instead use a Component Factory; one-off components need not become Factories. See the Slots reference. - Type ordinary props from the five shares (
PropsRuntime&PropsRenderSlots&PropsRenderFactories&PropsStore& inject face), and use the derivedFactory*PropsOfaliases for Factory Components. Shared or remount-surviving state goes in a declared store; component-private state stays local. - Component tests feed props directly (
createXXXStore().create()for the store data; plain stubs for framework hooks) and assert behavior without render machinery. - Tokens only in CSS; product copy follows the localization rule above; English comments.
pnpm run test:guigreen; if the component changes visible assembled output, also runDSH_SNAPSHOT=replay pnpm run test:web.- Non-trivial change? It needs an Agent Note in the same PR (repo-wide rule) — the GUI notes above are the precedents to extend.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

