dsh-brand/packages/util/brandOfficial
Type-only Branded<B> nominal-typing primitive for the DeepSeek Harness
ⓘ This plugin is a sub-package of the deepseek-ai/deepseek-harness monorepo — stars and activity count the whole repository.
- Language
- TypeScript
- License
- MIT
- Branch
- master
Install
$ dsh plugin --profile web add npm:@deepseek-ai/dsh-brandRun the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial
Install via your agent
Install the DeepSeek Harness plugin deepseek-ai/deepseek-harness/packages/util/brand for me: review the repository at https://github.com/deepseek-ai/deepseek-harness first, then run the install command and verify the plugin loads successfully.
Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.
English | 中文
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 strings at runtime.
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 JobId in dsh-jobs. 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-jobs, for example, brand JobId without importing an unrelated capability package merely to reach Branded.
Read the usage guide →
Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.
Listing badge
[](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/util/brand)Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.