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

@young1lin/dsh-cc-otel

v0.1.3

Published

DeepSeek Harness (dsh) plugin for cc-otel: points dsh session telemetry at the local cc-otel collector and keeps its daemon running. Platform binaries arrive via optionalDependencies.

Downloads

275

Readme

@young1lin/dsh-cc-otel

中文 | English

中文

把 cc-otel(本地 OTLP 接收器 + Token 用量仪表盘)接进 DeepSeek Harness (dsh)。

安装(任意 profile 通用)

dsh plugin --profile web add @young1lin/dsh-cc-otel

dsh plugin 是 pnpm 转发器:它在 profile 目录里执行安装,然后把这个包登记为 profile 的一个 bundle 层。本包做了四件事:

  1. 按平台分发二进制——主包通过 optionalDependencies 声明 6 个平台子包(@young1lin/cc-otel-{linux,darwin,win32}-{x64,arm64}),npm/pnpm 只安装与当前 os/cpu 匹配的那一个,没有 install 脚本、不触发 pnpm 的构建脚本白名单。
  2. 遥测 adapter(持续上报)——运行时插件挂一个透明的 llm/stream 监听:每次 provider 调用 settle 后,把用量(in/out/cacheRead/cacheWrite)、时长、首字延迟、会话、模型组一条 OTLP api_request 记录推给本地 cc-otel(http://localhost:4318/v1/logs)。实时、逐次、不含任何提示词/工具输出;失败即丢、绝不影响模型调用。dsh 0.1.5 移除了 FULL 模式后,这就是持续统计的来源。
  3. 关闭原生遥测防双计——bundle 的 cordis.patch.yml 把 dsh-base 的 session-telemetry-otel 行钉在 DISABLED:原生 FEEDBACK_ONLY 导出(反馈时上传整段会话前缀)会和 adapter 的行重复计数。
  4. 守护进程保活——profile 启动时加载本包的运行时插件:解析平台二进制 → 版本对齐 ~/.cc-otel(必要时执行 cc-otel install,与 Claude Code 插件共享同一份安装)→ 幂等拉起守护进程(cc-otel start)。

环境变量与配置

| 变量 | 作用 | |------|------| | CC_OTEL_OTLP_URL | adapter 的上报端点(默认 http://localhost:4318/v1/logs,可指向 dev 实例 14318) | | DSH_TELEMETRY_MODE | 原生导出器:DISABLED(默认,本包钉死)/ FEEDBACK_ONLY(想用原生导出时开,同时把插件行 telemetry.enabled: false 关掉 adapter,避免双计) | | DSH_TELEMETRY_OTLP_URL | 原生导出器的端点(仅原生路径生效) | | DSH_TELEMETRY_DISABLED | 非空即一票否决原生遥测(launcher 层,最后生效;不影响 adapter) | | CC_OTEL_BIN | 显式指定 cc-otel 可执行文件(开发调试用) | | CC_OTEL_HOME | 覆盖用户主目录(仅测试用,影响 ~/.cc-otel 的定位) |

在 profile 的 cordis.patch.yml($DSH_HOME/profiles/<name>/)里按 id 覆盖插件行为:

- id: dsh-cc-otel
  name: '@young1lin/dsh-cc-otel'
  config:
    autoStart: false        # 不自动拉起守护进程(默认 true)
    manageHomeBinary: false # 不同步 ~/.cc-otel,直接跑 node_modules 里的二进制
    stopOnUnload: true      # dsh 退出时停掉守护进程(默认 false,多客户端共享)
    telemetry:              # 遥测 adapter(默认开)
      enabled: true
      url: http://localhost:4318/v1/logs

隐私:adapter 每次调用只上报用量与计时数字——没有提示词、没有消息内容、没有工具输出,流量不出 localhost。原生 FEEDBACK_ONLY 路径(默认关闭)在显式反馈时会上传该会话的完整前缀(cc-otel 仍只保存 token/费用、不落库正文)。

更新 / 卸载

dsh plugin --profile web update @young1lin/dsh-cc-otel
dsh plugin --profile web remove @young1lin/dsh-cc-otel

English

Wires cc-otel (self-hosted OTLP receiver + token dashboard) into DeepSeek Harness.

dsh plugin --profile web add @young1lin/dsh-cc-otel

The bundle ships per-platform binaries through optionalDependencies (@young1lin/cc-otel-{linux,darwin,win32}-{x64,arm64} — exactly one gets installed), keeps the shared ~/.cc-otel daemon running via a tiny runtime plugin (version-gated cc-otel install + idempotent start), and — since dsh 0.1.5 removed the FULL mode, leaving the native exporter silent for ordinary conversation — reports every provider call itself: a transparent llm/stream listener pushes one OTLP api_request record per settled attempt (tokens, duration, TTFT; never prompts or tool output) to http://localhost:4318/v1/logs, real-time and fail-soft. The native session-telemetry-otel row is pinned to DISABLED by the bundle patch so its feedback-time full-prefix export cannot double-count beside the adapter (DSH_TELEMETRY_MODE=FEEDBACK_ONLY + telemetry.enabled: false restores the native path). Set CC_OTEL_BIN for a custom binary and CC_OTEL_OTLP_URL to redirect the adapter (e.g. a dev receiver on 14318); override the plugin row by id in your profile patch to change autoStart / manageHomeBinary / stopOnUnload / telemetry.

License: MIT.