# @deepseek-ai/dsh-brand

> Type-only Branded nominal-typing primitive for the DeepSeek Harness

Latest version **0.0.1-rc.1** (published 2026-08-10) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @deepseek-ai/dsh-brand
pnpm add @deepseek-ai/dsh-brand
yarn add @deepseek-ai/dsh-brand
bun add @deepseek-ai/dsh-brand
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.1-rc.1 |
| Published | 2026-08-10 |
| First published | 2026-08-10 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 222461 |
| Maintainers | imccyu, tianyicui-deepseek |

## Links

- npm: https://www.npmjs.com/package/@deepseek-ai/dsh-brand
- Repository: https://github.com/deepseek-ai/deepseek-harness
- Homepage: https://github.com/deepseek-ai/deepseek-harness#readme
- Issues: https://github.com/deepseek-ai/deepseek-harness/issues
- npm.io page: https://npm.io/package/@deepseek-ai/dsh-brand

## Recent versions

- 0.0.1-rc.1 (latest) — 2026-08-10
- 0.1.7-rc.1 (next) — 2026-09-23
- 0.1.7-alpha.2 (alpha) — 2026-09-22
- 0.1.7-alpha.1 — 2026-09-22
- 0.1.5-rc.3 — 2026-09-22
- 0.1.6-alpha.2 — 2026-09-17
- 0.1.6-alpha.1 — 2026-09-15
- 0.1.5-rc.2 — 2026-09-10
- 0.1.5-rc.1 — 2026-09-10
- 0.1.5-alpha.2 — 2026-09-09
- 0.1.5-alpha.1 — 2026-09-08
- 0.1.3-alpha.2 — 2026-09-07
- 0.1.2-rc.1 — 2026-09-03
- 0.1.2-alpha.5 — 2026-09-02
- 0.1.2-alpha.4 — 2026-09-01
- … 12 more at https://npm.io/package/@deepseek-ai/dsh-brand/versions

## README

# dsh-brand

English | [中文](README.zh.md)

The `Branded<B>` nominal-typing primitive — a tiny, **type-only** package (no runtime code, no harness-package dependency) shared by every package that owns a cross-boundary id.

## What `Branded` is

A brand makes structurally-identical strings non-interchangeable at the type level: a `SessionId` cannot be passed where a `CallId` is expected, even though both are plain `string`s at runtime.

```ts
import type { Branded } from '@deepseek-ai/dsh-brand'

export type SessionId = Branded<'SessionId'>

/** Brand a string as a SessionId (a plain cast — zero runtime cost). */
export function SessionId(id: string): SessionId {
  return id as SessionId
}
```

Construction goes through the per-id factory in the owning package. Comparison, logging, JSON serialization, and the wire format behave as for an ordinary string; the brand is erased at compile time.

## Policy: brand ids that cross package boundaries

A package brands the ids it owns — `CallId` in `dsh-llm`, the shared agent/session `SessionId` in `dsh-session`, and `TaskId` in `dsh-tasks`. Brand cross-package ids that could plausibly be confused; not every string needs one.

This package owns only the primitive. Keeping it dependency-free lets `dsh-tasks`, for example, brand `TaskId` without importing an unrelated capability package merely to reach `Branded`.

---
_Source: https://npm.io/package/@deepseek-ai/dsh-brand · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
