dsh-anonymous-user-id/packages/identity/anonymous-user-id官方

175.3kStar19.0kFork0Issue752Watching

生成并持久化跨会话的匿名 UUID v4,用于 DeepSeek Harness 遥测、反馈确认和 LLM 请求头的用户身份关联,实现跨记录用户活动追踪而不暴露真实身份

机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科

此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。

语言
TypeScript
License
MIT
分支
master
ai-agentscordisdshdsh-plugin

安装

$ dsh plugin --profile web add npm:@deepseek-ai/dsh-anonymous-user-id

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/identity/anonymous-user-id:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

English | 中文

Shared anonymous identity for session telemetry, direct feedback acknowledgement, and DeepSeek provider requests. getOrCreateAnonymousUserId() returns a random UUID v4 scoped to one harness home, persisted as the bare line $DSH_HOME/.anonymous-user-id (~/.dsh/.anonymous-user-id when DSH_HOME is unset). The OpenTelemetry backend reports it as Resource user.id; /feedback includes the same value in its acknowledgement; and dsh-llm-deepseek sends it as x-deepseek-harness-user-id, allowing the receiving systems to correlate records without independently generated identities.

The identity is never derived from the hostname, network address, git remote, or another identifying source. Deleting .anonymous-user-id resets the identity on the next process launch. Separate harness homes have separate identities.

Storage contract

Reads and writes are synchronous because both boot-time telemetry construction and direct command execution need one API. The result is memoized per resolved file path for the process lifetime. A first writer uses exclusive creation and a concurrent loser adopts the persisted winner; a corrupt file is replaced. Persistence is best-effort, so an unwritable home still receives a process-local UUID rather than blocking telemetry or feedback.

Composition

This package is a shared library, not a Cordis plugin. Consumers import getOrCreateAnonymousUserId() directly. Its invariant companion is intentionally empty because the package owns no event stream or public mutable relation that can be checked without creating the identity as a side effect. DSH_TELEMETRY_DISABLED stops telemetry export only; it does not suppress direct feedback acknowledgement or the DeepSeek provider header.

Model Experience

None, as the identifier reaches DeepSeek only as model-hidden HTTP transport metadata and never enters the request body, prompt, or model-visible content.

KV Cache effect

None; the transport header changes neither tokens nor the model-visible prefix.

Known Limitations and Deferred Work

  • No recovery after deletion — loss mints a new anonymous identity by design; recovery would require stable derivation material that weakens anonymity.
  • Best-effort concurrency — a reader landing in the narrow interval between a concurrent process's exclusive create and completed write can use a different in-memory UUID for that run; later launches converge on the persisted value.
  • No cross-home identity — different $DSH_HOME values cannot be correlated.
  • Configured DeepSeek gateways receive the iddsh-llm-deepseek sends the stable header to its resolved baseURL, including deployment overrides, independently of telemetry sharing mode.

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/identity/anonymous-user-id)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录
dsh-anonymous-user-id/packages/identity/anonymous-user-id — DeepSeek Harness 插件 | deepseek-plugin.org