GrayCodeTeam/graycode-for-dsh--packages-client ↗★ 3
@graycode/dsh-client
GrayCode client plugin for DeepSeek Harness: browser bundle (React slot contribution, locale namespace) registered via the dsh.client manifest 作为GrayCode的前端UI配套,适合需要该界面呈现的用户。
설치
검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗
@graycode/dsh-client
GrayCode client plugin for DeepSeek Harness (DSH): the browser half of the
GrayCode UI surface, registered through DSH's dsh.client manifest.
Package layout
packages/client/
├── package.json # dsh.client manifest + exports["./client"]
├── tsconfig.json # tsc: src → lib (node half + browser entry)
├── tsdown.config.ts # browser bundle: lib/client/index.js → lib/client.js
└── src/
├── index.ts # Node half (cordis plugin entry; no host behavior yet)
└── client/ # Browser bundle
├── index.ts # definitions/locales/overlay registration + mountable exports
├── locales.ts # `graycode` locale namespace (zh/en + ja placeholder)
├── GrayCodeBadge.tsx # "Gray Code loaded" marker (React)
└── / # workflow, memory, checkpoint, restore, staged diff,
# settings, activity, scope map and notifications
How DSH loads this package
Registration is declarative, not an API call. The host's
ClientModuleRegistry (@deepseek-ai/dsh-client-modules) scans loader
entries for a dsh.client manifest and serves each qualifying package's
exports["./client"] artifact at /plugins//client.js?rev=. The
bundle is executed as a classic script and must register itself via
window.__ModuleLoader__.load({ id, factory: (require) => { /* CJS body */ } })
The dsh.client manifest fields used by Harness 0.1.1-rc.2 are:
| field | type | required | meaning |
|---|---|---|---|
platform | string | yes | must be "web" for the entry to qualify |
inject | string[] | no | package-name dependency edges (load order) |
immediately | boolean | no | stage-one prefetch tier |
There is no name/entry field — the entry name is the package name, and
the bundle path comes from exports["./client"].
Build
pnpm --filter @graycode/dsh-client build # tsc -p tsconfig.json && tsdown
tsccompilessrc/→lib/(both halves,lib/client/index.jsis the browser entry).tsdownbundles the browser entry intolib/client.jsin the exact CJS closure shape DSH requires (mirrors the officialpackages/client/tsdown.client.tspreset in deepseek-harness: same banner/footer/intro, platform-module externals, purity gate).
What the browser half registers
- Locale namespace
graycode— typedzh/endictionaries (Harness ships exactlyLocaleId = 'zh' | 'en') plus ajaplaceholder via the untyped single-locale overload (see GAP-1). - Slot contribution — a "Gray Code loaded" marker registered into
shell.overlay(the additive frame-wide list slot declared by@deepseek-ai/dsh-client-ui-layout), deferred viactx.slots.injectuntil the slot is declared. The marker is a list entry (id: graycode.loaded), so it never shadows or replaces other entries. - Conversation definition and renderer — Gray workflow tool events are
projected to
kind: 'graycode.workflow'nodes throughconversationEventsand rendered through the keyedconversation.chat.nodeslot. - Mountable surfaces — workflow node/overview, memory management, checkpoint list, restore preview, staged diff, settings, activity heatmap, scope mapping and notification center components are exported with their locale namespaces and contract-driven data sources.
Runtime boundary
- Japanese placeholder: Harness
0.1.1-rc.2shipsLocaleIdas'zh' | 'en'only;setLocale('ja')throws and the language selector has nojaentry. Thejadictionary is registered as an inert placeholder for a future DSH release; it cannot become selectable without an upstream change. - Host half: the Node half is intentionally a no-op plugin. The manifest is
the client-module registration; Host Remote endpoints live in
@graycode/dsh-plugin. - GrayCode data transport: the native settings section and Gray management
surfaces use the plugin-owned
/graycodeconnection channel. Harness's own settings, Agent Preset, subagent and trajectory surfaces remain host-owned.