omp packages

pi-steer-queue0.1.1

Type ahead while pi works: Enter queues, Enter again steers at the next safe point, Enter once more interrupts and sends now.

GitHub Actions Published 2 hours ago MIT ~323 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

pi-steer-queue

Type your next instruction while pi is still working, see it in a box, and choose how it reaches the agent:

pi-steer-queue

You press What happens
Enter (with text) The instruction is added to the steer queue box. The current run is not affected.
Enter (empty editor) Steer: the first instruction reaches the agent at the next safe point, after the current tool calls. Nothing in progress is cut off.
Enter (empty) again Interrupt: the run stops and the instruction is sent right away.
↑ / ↓ (empty editor) Select a queued instruction and edit it. Enter saves; an empty text removes the item. Esc cancels the edit.
Alt+↑ Moves the queued instructions back into the editor.

Queued: the instruction waits in the box while the run continues.

queued instruction

Steering: after an empty Enter, the instruction is delivered when the current command finishes.

steering instruction

Several queued: each one becomes the next prompt, in order, when a run ends normally.

several queued instructions

  • If you never promote an instruction, it stays in the queue. When the run ends normally, it becomes the next prompt. Several instructions are consumed one at a time, in order.
  • After you stop the run with Esc, the queue pauses. Instructions stay in the box until you press Enter on an empty editor (sends the first one now) or until a later run ends normally.
  • Known /commands still run immediately. Attached images travel with the instruction.
  • Pending instructions are not saved when you quit or switch sessions.

Install

pi install npm:pi-steer-queue
# or
pi install git:github.com/IgorGuariroba/pi-steer-queue

How it works

The extension keeps its own queue, because pi's native queue can't be read or edited from an extension. An instruction you promote to steering is handed to pi only at turn_end, right before pi polls for steering messages. This way an interrupt never delivers it twice. See docs/adr/0001 and GLOSSARY.md.

Develop

npm install
npm test          # vitest
npm run typecheck
pi -e ./extensions/steer-queue.ts

License

MIT