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

@volcengine/tls-observer-cursor

v0.0.6

Published

Export Cursor hook telemetry and agent transcripts to Volcengine TLS with OTLP traces.

Downloads

438

Readme

TLS Observer for Cursor

采集 Cursor 本地 hooks 和 agent-transcripts/*.jsonl,转换为 GenAI Trace,并通过 Volcengine TLS Producer 写入 Trace Topic。

数据源

  • Cursor 原生 hooks:beforeSubmitPromptpreToolUsepostToolUsepostToolUseFailurestopsessionEndsubagentStartsubagentStoppreCompact。主 tool.call 链路只使用 Cursor generic tool hooks。
  • Cursor transcript:~/.cursor/projects/<workspace>/agent-transcripts/<conversation-id>/<conversation-id>.jsonl

Span

  • agent.turn:一个用户 turn 的根 span。
  • llm.request:从 assistant transcript entry 还原的模型请求。
  • tool.call:从 tool_use block 与 tool hook observation 还原的工具调用,挂在产出该 tool_usellm.request 下。
  • agent.subagent / agent.compact:Cursor subagent 和 compact hook 事件。

所有 span 都包含 tls.app.type=cursor。Cursor 专属字段使用 cursor.* attribute,例如 cursor.versioncursor.workspace.rootscursor.transcript_path

本地接入

构建:

pnpm --dir packages/cursor build

准备 env:

cat > ~/.cursor/tls-observer-cursor.env <<'EOF'
CURSOR_TLS_ENDPOINT=https://tls-cn-beijing.volces.com
CURSOR_TLS_REGION=cn-beijing
CURSOR_TLS_TRACE_TOPIC_ID=<trace-topic-id>
CURSOR_TLS_API_KEY=<api-key>
CURSOR_TLS_CAPTURE_CONTENT=1
EOF

在 Cursor hooks 中引用构建产物。用户级示例:

{
  "version": 1,
  "hooks": {
    "beforeSubmitPrompt": [
      {
        "command": "node \"/Users/bytedance/TLSProjects/storage-tls-observer/packages/cursor/dist/index.js\""
      }
    ],
    "stop": [
      {
        "command": "node \"/Users/bytedance/TLSProjects/storage-tls-observer/packages/cursor/dist/index.js\"",
        "timeout": 120
      }
    ]
  }
}

完整 hook 模板见 hooks/hooks.json

配置

| 环境变量 | 说明 | | --- | --- | | CURSOR_TLS_EXPORT | 设为 0 可关闭上报 | | CURSOR_TLS_CAPTURE_CONTENT | 设为 0 时不写 prompt/response/tool body | | CURSOR_TLS_DEBUG_ARTIFACTS | 设为 1 输出本地 trace/OTLP 调试文件 | | CURSOR_TLS_DATA_ROOT | 默认 ~/.cursor/plugins/data/tls-observer-cursor | | CURSOR_TLS_ENDPOINT / CURSOR_TLS_OTEL_ENDPOINT | TLS endpoint | | CURSOR_TLS_REGION | TLS region | | CURSOR_TLS_TRACE_TOPIC_ID | Trace Topic ID | | CURSOR_TLS_API_KEY | TLS API key | | CURSOR_TLS_AK / CURSOR_TLS_SK | AK/SK 鉴权 |

最近一次发送结果:

cat ~/.cursor/plugins/data/tls-observer-cursor/logs/send/latest.send-log.json