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配套,适合需要该界面呈现的用户。

패키지
@graycode/dsh-client
호환성
미검증
Harness peer 범위
^0.1.1-rc.2
Cordis peer 범위
^4.0.1
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 8. 23.

설치

검증된 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:

fieldtyperequiredmeaning
platformstringyesmust be "web" for the entry to qualify
injectstring[]nopackage-name dependency edges (load order)
immediatelybooleannostage-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
  • tsc compiles src/ → lib/ (both halves, lib/client/index.js is the browser entry).
  • tsdown bundles the browser entry into lib/client.js in the exact CJS closure shape DSH requires (mirrors the official packages/client/tsdown.client.ts preset in deepseek-harness: same banner/footer/intro, platform-module externals, purity gate).

What the browser half registers

  • Locale namespace graycode — typed zh/en dictionaries (Harness ships exactly LocaleId = 'zh' | 'en') plus a ja placeholder 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 via ctx.slots.inject until 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 through conversationEvents and rendered through the keyed conversation.chat.node slot.
  • 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.2 ships LocaleId as 'zh' | 'en' only; setLocale('ja') throws and the language selector has no ja entry. The ja dictionary 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 /graycode connection channel. Harness's own settings, Agent Preset, subagent and trajectory surfaces remain host-owned.