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

@felan-ai/ext-ask-user

v0.1.3

Published

Portable Felan ask-user extension with a rich Pi TUI adapter

Readme

@felan-ai/ext-ask-user

Portable Felan ask_user extension with an explicit delivery host and a rich local Pi-TUI adapter.

Usage

import { createAskUserExtension } from '@felan-ai/ext-ask-user';
import { createTuiAskUserHost } from '@felan-ai/ext-ask-user/tui';

const extension = createAskUserExtension(createTuiAskUserHost());

Cloud or remote hosts implement AskUserHost. The core extension owns the tool schema, normalization, response validation, sequential tool execution, progress details, and agent-facing result text. The host owns presentation and delivery. Host outcomes are answered, cancelled, or deferred; deferred outcomes carry a required interaction ID so a remote host can correlate the next user turn. Each host call also receives the Pi tool-call ID and session ID.

Tool input

ask_user supports:

  • one question or a 1-4 question wizard
  • provider-safe { title, description? } option objects in the tool schema, with runtime compatibility for legacy string options and common proxy aliases
  • searchable single-select, multi-select, and freeform answers
  • optional comments on structured selections
  • overlay and inline display modes
  • automatic split-pane or always-list single-select layouts
  • configurable overlay and comment shortcuts
  • prompt timeout

Top-level question fields provide defaults to entries in questions[]. Questions receive stable q1 through q4 IDs in normalized requests and structured result details.

Local adapter

createTuiAskUserHost() uses the ExtensionContext supplied to each tool execution. TUI mode provides searchable option descriptions, split-pane previews on wide terminals, multi-select, freeform and comment editors, wizard navigation and review, overlay hiding, abort handling, and timeout handling. Long context starts collapsed so choices remain visible; press ctrl+e to expand or collapse it. Multi-select viewports are bounded by rendered rows and keep the active choice visible. RPC mode uses Pi's dialog methods. Print and JSON modes return an unavailable cancellation outcome.

For compatibility with older transcripts and schema-mangling proxies, runtime option normalization also accepts string, number, and boolean entries and the object keys label, text, value, name, and option. Unusable entries return a validation error instead of silently falling back to a freeform prompt.

Environment defaults remain available for local use:

  • PI_ASK_USER_DISPLAY_MODE
  • PI_ASK_USER_SINGLE_SELECT_LAYOUT (auto or list)
  • PI_ASK_USER_OVERLAY_TOGGLE_KEY
  • PI_ASK_USER_COMMENT_TOGGLE_KEY

Per-call values take precedence. Display-mode and single-select-layout environment values are trimmed and case-normalized. off, none, disabled, or null disables a shortcut.

Attribution

The local interface is adapted from pi-ask-user by Enzo Lucchesi. See NOTICE and LICENSE for source and license details.