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

@huiliyi37/dsh-session-title-first-message-llm

v0.4.0

Published

First-message LLM provider plugin for Tianshu Harness session titles

Readme

@huiliyi37/dsh-session-title-first-message-llm

English | 中文

可选的 ctx.sessionTitle 提供方,通过 ctx.llm 总结第一条符合条件的用户消息。它注册 first-message 节奏,只在全新非 fork 会话首次创建回退时自动运行,并将结果归因于该消息的确切 seq。自动失败会保留回退,之后只能通过 ctx.sessionTitle.refresh() 重试。

该插件使用完整且必填的共享大语言模型(LLM)配置。路由解析遵循共享辅助模块的顺序:可选 ctx.modelRoles 服务中的 secondary 角色 pin 优先,其次是配置的 provider/model 对,最后才继承当前已记录主请求的确切路由。

模型体验

首消息标题请求

模型看到的内容

标题模型会收到共享标题指令,以及一个只包含第一条符合条件用户消息的 JSON 数组。后续提示词与继承的 fork 历史不会触发再次自动调用。

Token 影响

全新会话最多自动发出一次辅助请求,并受 maxInputBytesmaxOutputTokens 约束;显式刷新可能发出额外调用。主 agent(智能体)请求不会增加 token。

KV Cache 影响

不会使主请求的 KV Cache 失效。辅助请求使用已配置或已记录路由,其缓存行为由提供方决定。

已知限制与暂缓事项

  • 对于长期会话,第一条消息可能不再具有代表性;如果后续提示词应触发重新生成标题,请使用全消息提供方。
  • fork 会保留继承的标题,绝不会自动运行此提供方,即使其预置的首消息来自父会话。