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-tasks-local

v0.5.0

Published

Process-local implementation of the Tianshu Harness background task registry seam

Readme

@huiliyi37/dsh-tasks-local

English | 中文

@huiliyi37/dsh-tasks 注册表约定的进程本地实现:LocalTaskService 把每条记录保存在内存中,按 kind 签发 <kind>-N id,并且只交出全新快照,从不交出实时状态。它没有配置;作为插件加载后即注册为 ctx.tasks

生命周期

任务属于其所有者和后端,而不是生产方工具 fiber,因此重载生产方或接口不会停止任务。某个所有者的第一个任务会把一个会被等待的 effect 附加到对应 Agent 对象的 scope 上。所有者的 dispose(资源释放)会取消该对象的任务,等待生产方完全停稳,并移除其快照;复用的 agent(智能体)id 或会话 id 无法重定向旧的清理操作。

服务 dispose 会关闭监听器、取消所有存活任务、等待其记录完成,并从仍存活的所有者 scope 中分离 effect。如果销毁期间的取消操作抛出异常,服务会强制将记录标为失败,并警告工作可能成为孤立工作,而不会死锁。取消操作已返回但 done 始终未结算时,系统无法将其与缓慢停止区分开,销毁过程可能因此停滞。

结算遵循首次结算优先原则:最早出现的终止结果(生产方结算、作为 failed 隔离处理的 done 拒绝,或销毁时的强制失败)只记录一次,也只通知监听器一次;各监听器的故障会单独隔离,随后释放等待方。挂起的等待会在监听器运行前把任务标记为已报告,因此呈现完成情况的表层不会重复发出通知。

模型体验

通过生产方插件和 dsh-tool-tasks 间接影响;它们会呈现任务 id、输出、状态、取消和完成通知。

KV Cache 影响

不会直接导致 KV Cache 失效;请求前缀变更由上述消费方负责。

已知限制与暂缓事项

  • 任务只存在于进程本地:记录会随 harness 进程终止而消失;持久或跨重启执行需要一个单独实现该 seam 的后端。
  • 静默无效的取消可能使销毁过程停滞:只有显式抛出异常才能安全地强制标为失败。