sam-4screen-desktop 2026-7-31:7:44:15
This commit is contained in:
@@ -384,6 +384,91 @@ Paper: [arXiv:2603.27277](https://arxiv.org/abs/2603.27277)
|
||||
|
||||
---
|
||||
|
||||
## Pi Dashboard
|
||||
|
||||
A multi-component system for live agent visibility across all machines. Built in this conversation (Jul 2026).
|
||||
|
||||
### Architecture
|
||||
|
||||
```
|
||||
pi sessions (each machine)
|
||||
└─ dashboard.ts extension ── writes ──► ~/.pi/agent/dashboard/<session>.json
|
||||
│
|
||||
pi-dashboard (Go TUI)
|
||||
reads all state files
|
||||
│
|
||||
Enter → tmux attach d → Hunk diff
|
||||
Tab → Tuxedo tasks q → quit
|
||||
```
|
||||
|
||||
| Component | Type | Purpose |
|
||||
|-----------|------|---------|
|
||||
| **dashboard.ts** | pi extension (`~/.pi/agent/extensions/`) | Listens to `agent_start`/`agent_end`/`tool_call`, writes JSON state files, tracks tasks via todo.txt, sends NTFY/Apprise notifications |
|
||||
| **pi-dashboard** | Go binary (`~/.local/bin/pi-dashboard`) | Bubble Tea TUI. Reads state files from all machines (local + SSH pull). Renders agent table with keyboard controls |
|
||||
| **Tuxedo** | Companion TUI (Rust binary, `tuxedo`) | todo.txt task manager. The dashboard extension writes tasks to `~/.pi/agent/dashboard/tasks/todo.txt` in standard todo.txt format, Tuxedo reads it natively with vim keys, phone capture QR, project/context filters |
|
||||
| **Hunk** | Companion TUI (Node CL | npx hunk) | Review-first terminal diff viewer for agent-authored changesets. Triggered from dashboard with `d` key. Supports split/stack/responsive layouts, inline AI annotations, watch mode, Git/jj/Sapling |
|
||||
|
||||
### dashboard.ts extension
|
||||
|
||||
- **Location:** `~/.pi/agent/extensions/dashboard.ts`
|
||||
- **Events:** `agent_start` (status→running), `agent_end` (status→completed, send notification), `tool_call` (track last tool, count)
|
||||
- **Tasks:** Registers tools `register_task`, `complete_task`, `list_tasks` — writes to todo.txt
|
||||
- **Notifications:** Calls NTFY (`$PI_NTFY_TOPIC`) and Apprise on agent completion and blocked state
|
||||
- **State files:** `~/.pi/agent/dashboard/<session>.json` (atomic writes)
|
||||
- **Session naming:** Derives from tmux session name when in tmux, otherwise working directory basename
|
||||
|
||||
### pi-dashboard TUI viewer
|
||||
|
||||
- **Location:** `~/src/pi-dashboard/` (Go module), `~/.local/bin/pi-dashboard` (binary)
|
||||
- **Built with:** Go + Bubble Tea v2
|
||||
- **Reads:** Local `~/.pi/agent/dashboard/*.json` + SSH pull from remote machines
|
||||
- **Config:** `~/.config/pi-dashboard.yaml`
|
||||
|
||||
| Key | Action |
|
||||
|-----|--------|
|
||||
| `↑↓` | Select agent |
|
||||
| `Enter` | `tmux attach -t <session>` (local) or `ssh -t user@host tmux attach` (remote) |
|
||||
| `d` | Open Hunk diff in agent's worktree |
|
||||
| `Tab` | Launch Tuxedo with task todo.txt |
|
||||
| `r` | Force refresh |
|
||||
| `q` | Quit |
|
||||
|
||||
### Cross-machine config (`~/.config/pi-dashboard.yaml`)
|
||||
|
||||
```yaml
|
||||
poll_interval: 2s
|
||||
local:
|
||||
path: /home/sam/.pi/agent/dashboard/
|
||||
remote:
|
||||
- host: 192.168.20.13
|
||||
user: sam
|
||||
path: /home/sam/.pi/agent/dashboard/
|
||||
- host: 192.168.20.51
|
||||
user: sam
|
||||
path: /home/sam/.pi/agent/dashboard/
|
||||
```
|
||||
|
||||
### Deployment
|
||||
|
||||
The extension deploys via Gitea (in `pi-config`) or manually placed in `~/.pi/agent/extensions/`. The Go binary is built from source and scp'd to remote machines.
|
||||
|
||||
### Tuxedo
|
||||
|
||||
- **Site:** https://github.com/webstonehq/tuxedo
|
||||
- **Install:** Built from source via nix
|
||||
- **Format:** Standard todo.txt — `~/.pi/agent/dashboard/tasks/todo.txt`
|
||||
- **Phone capture:** Press `s` for QR code pointing at LAN PWA — type tasks from phone
|
||||
- **Vim keys:** `j/k`, `dd`, `gg/G`, `u` (undo, 50 levels)
|
||||
|
||||
### Hunk
|
||||
|
||||
- **Site:** https://github.com/modem-dev/hunk
|
||||
- **Install:** `npm i -g hunkdiff` (also available in nixpkgs)
|
||||
- **Usage:** `hunk diff --watch` (live review), `hunk show` (review last commit)
|
||||
- **Features:** Multi-file review with sidebar, inline AI annotations, split/stack/responsive layouts, watch mode for auto-reloading
|
||||
|
||||
---
|
||||
|
||||
## engram + gentle-engram
|
||||
|
||||
engram v1.16.1 runs on nixos-desktop (.13) at `~/.local/bin/engram`. Systemd user service auto-starts. Binds `127.0.0.1:7437`, accessed via SSH tunnel: `ssh -fNL 7437:127.0.0.1:7437 192.168.20.13`.
|
||||
|
||||
Reference in New Issue
Block a user