Agents workspace: roster, runs, and a readable run log; layout now eight workspaces

This commit is contained in:
Sam
2026-11-10 16:58:59 +11:00
parent 7f18c548fe
commit b15216aa7b
14 changed files with 1339 additions and 2 deletions

View File

@@ -778,3 +778,123 @@ Tell me which of those you want first, and whether the icons appear after reopen
- session: [[packs/paperclip-harness/80-sessions/paperclip-harness-tui-icon-font-fix-help-filter-unblock-safe|paperclip-harness TUI: icon font fix, help/filter/unblock, safe rebuild (commit 09e32da)]]
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-10-05-00-01|Rich discovery: .config 2026-11-10 05:00:01]]
- context: [[packs/paperclip-harness/20-context/tmp|.config]]
---
## Update (2026-11-10 05:41:48)
- TUIOS-spawned panes inherit a smaller PATH than the interactive shell; the Repair health check for `ocr` originally reported it missing. Fixed by also checking `~/.local/bin` and system profiles. ocr lives at `/home/sam/.local/bin/ocr` (open-code-review v1.13.6, sha 891df1b6, built 2026-11-05).
- ocr is a real merge gate wired into `bin/merge`. Verified: on AUD-165 it reported a critical finding (`rm -rf "$HOME/tmp"` empties /tmp when HOME is unset) and refused the merge, so `cleanup.sh` never reached main.
- Lazygit: `/run/current-system/sw/bin/lazygit`. Hunk: `/etc/profiles/per-user/sam/bin/hunk`. Both installed, not wired into UI.
- `mouse`, `mouse1`, `switch` binaries are NOT installed and nothing serves them locally — no Mouse-1/Switch integration is currently possible without installation.
- Paperclip agent API surface includes pause/resume/wakeup/approve/clear-error endpoints and PATCH /api/agents/{id} fields (role, adapterConfig, runtimeConfig, budgetMonthlyCents, etc.). Runs are discoverable via heartbeat-runs with streaming logs at /api/heartbeat-runs/{runId}/log.
## Evidence
- Confidence: 90%
- Reason: Factual runtime discoveries with exact paths and a verified merge-blocking example; durable for future work.
---
## Update (2026-11-10 05:41:48)
## Structural/configuration observations (2026-11-10 05:41:48)
Reverted. Seven workspaces, one pane each, all drawing again — that is the state you had, restored.
I was wrong to split it. You said panels were missing and I read that as "make panes", then made nineteen. That was my invention, not your request.
## ocr is installed — it has already blocked a merge
```
/home/sam/.local/bin/ocr
open-code-review v1.13.6
```
It is the review gate in `bin/merge`. On `AUD-165` it reported a **critical** finding — `rm -rf "$HOME/tmp"` empties `/tmp` when `HOME` is unset — and the merge was refused; `cleanup.sh` never reached `main`. The Repair screen once said it was missing because a pane started by TUIOS gets a smaller PATH than your shell; that check now looks in `~/.local/bin` and the system profiles as well.
So the review is real, and the interface lacks a place to show the verdict. That is item 4 in the plan.
## Where you see the Pi agents: nowhere yet, and that is the real gap
Paperclip has 281 runs recorded on this instance, each with a 300 KB log I can read:
```
GET /api/companies/{id}/heartbeat-runs → 281 runs
GET /api/heartbeat-runs/{runId}/log → the agent's own output, grows while it runs
POST /api/agents/{id}/pause | /resume | /wakeup
PATCH /api/agents/{id} {role, adapterConfig (model), runtimeConfig, budgetMonthlyCents}
```
No screen shows any of it. That is the missing workspace, and it is next.
## The plan, in Paperclip's terms
`docs/PLAN-INTERFACE.md` now holds it, with a table of every Paperclip object and the screen that shows it. The parts that do not exist:
**Agents>agents** — one pane, tabs `roster | runs | log`:
- roster: every agent with its state, current task, spend and budget
- runs: the company's runs — agent, task, state, what woke it, duration, cost
- log: the tail of the chosen run, which is the closest thing to watching Pi work
Actions: `enter` opens a run's log, `p`/`P` pause and resume an agent, `w` wakes one.
**Agents>settings** — role, job title, who it reports to, model, heartbeat, monthly budget. These map straight onto `PATCH /api/agents/{id}`. Two rules: a model change applies to that agent's next run, never one in flight; a budget change is recorded with who made it.
**Tool panels** — Lazygit and Hunk are installed (`/run/current-system/sw/bin/lazygit`, `/etc/profiles/per-user/sam/bin/hunk`) and are **not** wired in. Proposal: `t` in `Work>work` opens a chooser — `shell · lazygit · hunk · git log · ocr` — as a pane in the current workspace, `esc` closes it and focus returns. Nothing is created until you ask.
**Review panel** in `Work>work` — the last verdict and its findings, blocking ones in red, beside the diff. The merge stays a command, because a merge is a decision with a lock, not a keystroke.
## Mouse-1 and Switch
Measured: **not installed** — no `mouse`, `mouse1` or `switch` binary here, and nothing serving them locally. So nothing can be built on them yet.
Where they would fit honestly: cheap, repeatable judgement — "is this task ready", "does this comment answer the question", "which agent should take this" — not prose. That comes after agents, settings, tool panels and the review panel, and only once they are installed and measured against the model already configured for your agents (`omni/deepseek/deepseek-v4-flash`).
## Order
1. Agents>agents (read-only, cannot break anything)
2. Agents>settings (role, model, budget, pause/resume)
3. Tool panels (`t` → Lazygit, Hunk, shell, ocr)
4. Review panel in Work>work
5. Mouse-1 / Switch, if installed
Each is one pane, one program, and none of them changes the layout you have now.
Committed as `7f18c54`. Say which item you want first and I will build only that.
## Source paths observed
- `.pi/memory-vault/packs/paperclip-harness/20-context/tmp.md`
- `.pi/memory-vault/packs/paperclip-harness/60-observations/paperclip-harness-tui-editor-pitfall-illegal-rune-literal-af.md`
- `.pi/memory-vault/packs/paperclip-harness/50-decisions/use-real-tuios-panes-per-workspace-panels-as-panes.md`
- `.pi/memory-vault/packs/paperclip-harness/80-sessions/paperclip-harness-tui-workspace-rename-new-panels-commit-264.md`
- `.pi/memory-vault/packs/paperclip-harness/80-sessions/rich-discovery-how-to-tell-whether-the-icons-loaded-2026-11-.md`
- `home/sam/.local/bin/ocr`
- `api/agents/me`
- `api/agents/me/connections`
- `api/agents/me/inbox-lite`
- `api/agents/me/inbox/mine`
- `api/agents/me/secret-proposals`
- `api/agents/me/secrets`
- `home/sam/paseo/projects/paperclip-harness/docs/PLAN-INTERFACE.md`
- `run/current-system/sw/bin/lazygit`
- `etc/profiles/per-user/sam/bin/hunk`
- `omni/deepseek/deepseek-v4-flash`
## Evidence
- Confidence: 82%
- Reason: Captured factual repo structure/configuration patterns from rich discovery
## Related learned memories <!-- same-turn-2026-11-10 05:41:48 -->
- context: [[packs/paperclip-harness/20-context/paperclip-harness|paperclip-harness]]
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|paperclip-harness runtime caveats: ocr PATH in TUIOS panes, missing mouse/switch, installed tool paths]]
- decision: [[packs/paperclip-harness/50-decisions/paperclip-harness-ui-six-workspaces-spec-first-four-panel-li|Keep 7 single-pane workspaces; map Paperclip objects to screens instead of splitting panes]]
- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Reverted 19-pane workspace split and wrote docs/PLAN-INTERFACE.md mapping Paperclip objects to screens]]
- session: [[packs/paperclip-harness/80-sessions/paperclip-harness-reverted-pane-split-interface-gap-discover|Paperclip-harness — reverted pane split, interface gap discovery, and PLAN-INTERFACE roadmap]]
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-home-2026-11-10-05-41-48|Rich discovery: home 2026-11-10 05:41:48]]
- context: [[packs/paperclip-harness/20-context/home|home]]