# Needs you A sidebar block that collects every agent that is waiting for you. Each blocked agent gets a card. The card shows the end of the agent's screen, which is usually the question. You can reply from the card, go to the agent, or peek at it. The block shrinks to a one-line header when no agent is waiting.  ## What you see The block sits in the left sidebar column, between the `spaces` and `agents` blocks of a clone of the `main` layout. - **Header**, 34 px high, 11 px side padding. It shows "Needs you" (11.5 px, semibold) and the count (11 px, theme `dim`). The title uses theme `blocked` when the count is above zero, else `dim`. Background is theme `chrome`. - **Cards**, one for each blocked agent, in a vertical list that scrolls. The list has 8 px side and bottom padding and 8 px between cards. Each card has: - 8 px padding, 8 px radius, 6 px gap. - Border: theme `blocked` at alpha `66`. Background: theme `blocked` at alpha `14`. - A title row: the program icon (14 px), then `space · tab`, then the machine name (10 px, `dim`) for an agent on another machine. A tab named only by its number is left out. A sub-agent's title is `parent's space · sub-agent name`. - A screen box: the agent's screen text in the person's terminal font, 10.5 px, theme `muted`, on theme `background`, 6 px padding, 5 px radius. Text wraps. - A reply input, 28 px high, placeholder "Reply, Enter sends". - A button row: Go, Peek, and "All N lines" when the screen has more than 8 lines. Buttons are 22 px high, 8 px side padding, 6 px radius, 11 px text, theme `raised` with an `input` border. ## How it behaves - **Which agents:** agents with status `blocked`, on every machine. Sub-agents without a pane count too, as the shipped `agents` mod shows them: live descendants of any agent, with status `blocked` or `error`. An agent with a pane is listed once only. - **Working, done and idle agents** are not shown. A card goes away when its agent stops being blocked. - **Empty:** the block resizes itself to 34 px (header only). With one or more cards it resizes to weight 1.4. - **Collapsed card (default):** the screen box shows the last 8 non-empty lines, max 150 px high. If wrapped lines are taller than that, the top is cut, never the bottom. - **Expanded card:** click the screen box or "All N lines". The box grows to show the whole visible screen. The block's list scrolls. The button reads "Less" and collapses the card again. Each card keeps its own state until the agent leaves the list. - **Reply:** type and press Enter. The text goes to the agent with `hc send --force` (pasted, then Enter). "Sending…" shows while it runs. On success the input clears. On failure the error shows in theme `blocked` under the input. - **Go** runs `agent.focus` for that agent. **Peek** runs `terminal.peek`. - The screen text refreshes every 2 seconds. The list itself follows live data at once. ## Built from - Layout: a clone of `main` (`herdr-app do layout.clone '{"name":"main","as":"my-main"}'`). In the sidebar column, put this block between `spaces` and `agents`: ```json { "id": "needs-you", "type": "block", "content": { "mod": "needs-you" }, "size": { "px": 34 }, "min": 34 } ``` The block id must be `needs-you`: the mod resizes it by that id. - Mod `mods/needs-you/`: `main.js` and `mod.json` (`{ "place": "none", "title": "Needs you" }`). - `herdr` functions: `agents()`, `terminals()`, `hc()`, `run()`, `settings()`, `theme()`. - Commands: `layout.resize`, `agent.focus`, `terminal.peek`. - Programs: `hc read
` for the screen text, `hc send --force