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

@muzi3/next-step-waiting

v0.1.4

Published

Pi extension: wait_for_condition tool — pause and wait for an external action to complete or ask the user whether to continue, with pluggable detectors (shell command polling or sub-agent judgment).

Readme

@muzi3/next-step-waiting

Pi 扩展:wait_for_condition 工具 —— 让 AI 暂停并等待外部动作完成,或向用户确认「是否继续」,检测器可插拔。

安装

pi install npm:@muzi3/next-step-waiting

工具用法

agent 在需要等待外部动作(登录、手动配置、部署、CI、线下联调、用户操作),或想询问用户「要继续吗」时调用 wait_for_condition,它会弹出等待面板并启动检测器,直到:

  1. 检测器判定完成(detected)
  2. 用户按回车手动继续(manual;等待期间回车优先给面板,编辑器里有草稿也一样)
  3. 用户按 Esc 取消(cancelled),或总超时(timeout)

面板是非抢占式 overlay:等待期间不抢键盘焦点,正文照常滚动/滚轮/选中,官方内置的 ↓ Jump to latest message · End 也可用。

参数

| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | instruction | string | 是 | 告诉用户要完成什么外部操作,显示在等待面板 | | check | string | 否 | shell 检测命令,exit 0 = 完成(适合查文件/进程/日志/接口) | | checkPrompt | string | 否 | 需要智能判断时的检测任务描述(交给子 agent) | | intervalMs | number | 否 | 检测间隔。命令默认 3000,子 agent 默认 30000 | | timeoutMs | number | 否 | 总超时。0 = 不限时(默认) |

检测器(可插拔)

  • check:周期执行 shell 命令,exit 0 判定完成。单次超时 max(2×间隔, 60s),上限 15min。
  • checkPrompt:spawn 独立 pi --mode json 子进程,用它的工具查证并智能判断(YES/NO)。单次超时 max(2×间隔, 5min),上限 15min。

纯确认模式

check 与 checkPrompt 都不提供时,进入纯确认模式:无检测器,仅等待用户按回车继续或 Esc 取消。 适合 AI 想询问用户「要继续吗」的场景——instruction 写清楚要确认的问题即可。

返回 status

  • detected / manual / cancelled / timeout