Needs You
An inbox of agents waiting on you, oldest first: approvals, questions with choices and blocked tasks, answered in place, with waits that count up and mark themselves overdue.
Needs you3
Oldest 23mInstallation
npx shadcn@latest add "@aiellie/needs-you"shadcn needs the @aiellie registry in components.json first. npx aiellie add needs-you adds it on its first run, then installs the same way.
Needs You collects every agent that's waiting on you into one list, longest wait first. An approval shows the command or file in question with Deny and Approve. A question shows its choices. A blocked task links to its thread.
Waits count up while the list is open, and turn to the destructive colour, marked overdue, past staleAfter. An answered item folds away, and focus moves to the one that takes its place.
Getting started
Pass what's waiting
Send the answer on, then take the item out of
items. It folds away whoever removes it.components/inbox.tsximport { NeedsYou } from "@/components/aiellie/needs-you" export function Inbox({ waiting }: { waiting: WaitingItem[] }) { return ( <NeedsYou items={waiting} onAnswer={(id, answer) => respond(id, answer)} onOpen={(id) => router.push(`/threads/${id}`)} /> ) }
Anatomy
<div data-slot="needs-you" role="region">
<div data-slot="needs-you-header" />
<ul>
<li data-item data-leaving>
<div data-slot="needs-you-item" data-kind="approval" data-stale role="group" />
</li>
</ul>
</div>Each answer is read out with the thread it frees. The list scrolls inside the region once it's taller than its container, so give it a max-h-* where space is short.
formatWait is exported too: "now", "45s", "12m", "3h".
Examples
Read only
Without onAnswer and onOpen, it lists what's waiting with no buttons, for a summary elsewhere.
Needs you2
Oldest 10mAPI reference
NeedsYou
| Prop | Type | Default | Description |
|---|---|---|---|
items | WaitingItem[] | required | |
onAnswer | (id: string, answer: WaitingAnswer) => void | { kind: "approval"; approved } or { kind: "question"; answer }. | |
onOpen | (id: string) => void | Links each thread, and adds Open to blocked tasks. | |
staleAfter | number | 600 | Seconds after which a wait is overdue. |
All other div props are forwarded.
WaitingItem
| Field | Type | Default | Description |
|---|---|---|---|
id, thread, prompt | string | required | |
kind | "approval" | "question" | "blocked" | required | |
detail | string | Shown in mono. | |
options | string[] | The choices for a question. | |
waitingSeconds | number | required | How long it had waited when the list was built. |