omp packages

@tduyng/pi-ask0.0.2

One tool that stops and waits: ask the user up to 4 questions with options and a stated guess, answered in the terminal.

tienduy-nguyen Published 8 hours ago Apache-2.0 ~312 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@tduyng/pi-ask

Ask the user a question in the terminal and wait for the answer. One ask_user tool.

pi core ships no question tool. Claude Code has AskUserQuestion, opencode ships its own, pi has none, so a model facing a fork it cannot resolve falls back to asking in prose: a turn spent, a block that renders badly, and a question that reads as a guess.

The tool

ask_user takes questions, an array of at most four. Each question carries:

Field Meaning
question The question to ask
guess Your best guess, one line of reasoning, shown in the dialog
options Predefined choices, single select, plus a free-text escape
ask_user(questions: [
  { question: "Which Windows surface first?", guess: "WSL gwt plus Windows Terminal",
    options: ["WSL first", "native gwt.exe first", "both"] }
])

The dialog shows the guess under the question, so a wrong guess is corrected in one keystroke. The call blocks until every question is answered or cancelled.

Result

One Q: and A: block per question:

Q: Which Windows surface first?
A: WSL first

A cancelled dialog records (skipped), so the transcript shows a question that was asked and not answered rather than nothing at all.

Without a UI

Headless, RPC, print, and subagent runs have nobody to answer. The tool says so once and tells the model to proceed on each question's stated guess and record it as an assumption.

Install

pi install npm:@tduyng/pi-ask

Local checkout: pi install /path/to/extensions/pi-ask

Tests

bun test extensions/pi-ask