npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@harness-desktop/dsh-brand

v1.0.0

Published

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

Downloads

3,125

Readme

dsh-brand

English | 中文

Branded<B> 名义类型原语:一个微小的仅类型包,无运行时代码,也不依赖其他 harness 包;所有负责跨边界 id 的包都会共享它。

Branded 是什么

品牌使 SessionIdCallId 这样结构相同的字符串在类型层面不可互换,尽管两者在运行时都是普通 string

import type { Branded } from '@harness-desktop/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
}

构造操作通过所属包中各 id 专用的工厂完成。比较、日志记录、JSON 序列化和协议格式(wire format)的行为与普通字符串相同;品牌信息会在编译时被擦除。

策略:为跨包边界的 id 添加品牌

包为自己拥有的 id 添加品牌:CallId 位于 dsh-llm,共享的 agent/会话 SessionId 位于 dsh-sessionJobId 位于 dsh-jobs。为可能被混淆的跨包 id 添加品牌,但无需为每个字符串都添加。

该包只负责这一原语。保持无依赖意味着,例如 dsh-jobs 可以为 JobId 使用品牌类型,而无需仅为使用 Branded 而导入不相关的功能包。