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

pi-dask

v0.0.4

Published

Structured choice collection for Pi

Downloads

491

Readme

pi-dask

Pi 的结构化提问扩展。它把可枚举的用户决策收集为单选或复选答案;不负责决定该问什么,也不维护条件分支。

当前已实现首个 npm(Node 包注册表)版本;接口契约见 doc/接口契约.md

定位

  • npm 包名pi-dask
  • Pi 工具名dask
  • 用户:需要让 Pi 在终端内低摩擦收集结构化选择的人。

dask 负责“怎么收集选择”;决策树、问题顺序、推荐判断与收束属于调用方,例如 507-grill(决策树追问)。两者可以协作,但不互相依赖。

已确认边界

  • 支持单选与复选;不提供独立自由文本题。
  • 每题都提供“其他(自行填写)”,并以带来源的答案值与枚举选中项区分返回。
  • 单选题为 2–5 项;复选题为 2–12 项。超出上限必须由调用方先分组、收敛或拆题。
  • 调用方确认确需用户决策且问题已收敛为枚举选项后,应使用 dask,而不是在回复正文中列出编号选项;即使只有一道题也一样。开放式探索和调用方本应自行收口的工程细节不使用 dask
  • 调用时已知且互不依赖的问题应合并到一次调用;答案会改变其他问题是否出现、题意或选项的问题必须分开调用。
  • 以逐题向导展示;多题交互会显示当前位置和全部题号,可用数字键 19 直跳对应题、用 / 切换相邻题,并保留各题草稿。第 10 题及以后仍可通过左右键访问。
  • 最终展示答案摘要并确认提交;存在未回答题时会返回第一道未答题补答,不生成不完整结果。用户取消时以工具取消/错误结束,不返回部分答案。
  • 不支持条件跳题;依赖前题答案的流程应由调用方分多次请求。

当前实现状态

  • 当前版本:0.0.3
  • 根目录 index.ts 是公开入口,package.jsonmain 与 Pi 扩展清单均指向它,再映射到 src/
  • 已实现 TypeScript(类型脚本)包、接口校验、确定性向导状态机、dask 工具与 TUI(终端界面)适配。

安装与使用

pi install npm:pi-dask

安装后,Pi 会加载 dask 工具;调用方传入 questions 数组,确认后获得按题目顺序排列的结构化 answers

明确不做

  • 不提供独立自由文本题、长选项搜索、条件表单或问卷状态持久化。
  • 不替代 507-grill(决策树追问)或任何目标/工作流扩展。

文档

doc/README.md 开始。项目术语见 doc/术语表.md