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

@orange-jzh/dsh-team

v0.1.0

Published

Durable multi-agent teams for DeepSeek Harness: captain-led task decomposition, members as continuable subagents, event-sourced team state

Readme

@orange-jzh/dsh-team

DeepSeek Harness 的多智能体团队编排层:队长(当前会话的 agent)把目标拆成带依赖的任务、招募成员(可续聊子代理)、发消息派活、轮询收产出、汇报后结束团队。

特性

  • 事件溯源状态:团队状态(成员/任务/消息)以 team/* 会话事件持久化在队长会话日志里,team 投影从事件流折叠重建——重启、回放、审计与 dsh 会话日志天然一致,无独立状态文件
  • 工具与 UI 同源:工具读状态与 UI 渲染共用同一个折叠(foldTeamState),模型视角与界面视角不可能分叉
  • 成员 = 可续聊子代理startContinuable 创建、followup 唤醒(成员间消息以队长为通道)、interrupt 打断、listChildren 查活动;成员通信走 dsh 原生收件箱,不建自研邮箱文件
  • 权限双保险:成员 persona 替换部署人格 + toolFilter.deny 封死建队/招募/结束工具,工具内第二道 requireCaptain 校验;审批沿用子代理 approvalPolicy:'never' 的安全模型
  • 产物联动:成员的文件改动自动进入会话概览"产物"区,可独立回退

安装

dsh plugin --profile web add @orange-jzh/dsh-team @orange-jzh/dsh-client-ui-team

依赖 @deepseek-ai/dsh-*(subagent、tools、system-prompt 等)由 dsh 运行环境提供,无需单独安装。

使用

让 agent 用自然语言组织团队即可,例如:"组建一个团队调研这个仓库并输出报告"。系统提示会引导完整流程:

  1. team_create 建队(当前会话成为队长,一个会话同时只能带一个团队)
  2. team_add_member 按角色招募成员(researcher、engineer、reviewer…)
  3. team_create_task 拆任务并声明依赖(有依赖未完成的任务无法认领)
  4. team_message 给成员派活——成员被唤醒工作一整轮后更新任务并回报
  5. team_status 轮询看板,直到成员空闲、任务完成
  6. team_end 结束团队(成员被打断,看板冻结在会话日志里)

工具一览

| 工具 | 作用 | |---|---| | team_create | 建队并成为队长(name 会折叠成稳定 team id) | | team_add_member / team_remove_member | 招募/移除成员(可指定 model 覆盖) | | team_create_task | 建任务:dependencies 声明依赖,assignee 直接认领(依赖未完成会拒绝) | | team_update_task | 任务状态机:pending → claimed → in_progress → completed|failed|cancelled;成员只能更新自己认领的任务 | | team_message | 成员间消息(tocaptain 或成员名),唤醒目标成员工作一整轮 | | team_status | 团队全景:成员实时活动、任务(含依赖与产出)、最近消息 | | team_end | 结束团队并打断所有成员 |

任务状态机与依赖门禁

pending → claimed → in_progress → completed | failed | cancelled
  • claimed 边界检查依赖:任何依赖未 completed 即拒绝认领
  • 状态迁移有白名单校验,非法迁移直接报错(绝无猜测性转换)

事件模型

team/* 事件(7 种)是团队状态的唯一真相,写入队长会话日志(log-only,不进模型上下文——模型通过 team_status 读状态):

team/created · team/member-added · team/member-removed
team/task-created · team/task-updated · team/message · team/ended

team 投影(session-projection 单元)从这些事件折叠出 TeamState,供 Web UI 的 useProjection('team') 读取。

开发

# 构建(host 包)
pnpm exec tsc -b packages/workflow/team/tsconfig.json

# 测试
pnpm exec vitest run packages/workflow/team/tests

兼容性

  • 需要 dsh 运行环境提供 ctx.subagents(continuable 子代理)、ctx.toolsctx.systemPromptctx.sessions、session-projection 接缝
  • 成员 subagent 的 provider 默认 spawn,可用 memberProvider 配置切换

License

MIT