sam-4screen-desktop 2026-9-14:12:18:7

This commit is contained in:
2026-09-14 12:18:07 +10:00
parent 02571394e8
commit 309121b291
2 changed files with 41 additions and 9 deletions

View File

@@ -114,6 +114,7 @@ pi is **Nix-managed on all three** — the nixpkgs **`pi-coding-agent`** package
| **pi-mermaid** | `~/.agents` (vendored from npm 0.3.0, commit `8e68df0`) | Renders ` ```mermaid ` blocks as ASCII in the TUI (beautiful-mermaid) + Mermaid parser syntax warnings/errors. `/pi-mermaid` re-renders last assistant message. Per project: `/config-add ext pi-mermaid` |
| **pi-tool-display** | `~/.agents` (vendored npm 0.5.0, commit `41cc33d`) | OpenCode-style compact tool rendering, adaptive edit/write diffs, pending-edit previews, thinking labels. **Global** — 0 tools / 0 token cost (added via home.nix settings). `/tool-display` presets: opencode / balanced / verbose |
| **pi-lsp-extension** | `~/.agents` (vendored npm 1.3.0, commit `41cc33d`) | LSP diagnostics, hover, definition, references, symbols, rename, completions, code_actions + tree-sitter `code_overview`/`ast_search`/`code_rewrite`. **Per-project** via `/config-add ext pi-lsp-extension` (10 tools — token-lean). Commands: `/lsp`, `/lsp-config`, `/lsp-restart`, `/lsp-lombok` |
| **pi-browser-harness** | `~/.agents` (vendored npm 0.11.0, commit `a34b41e`) | Direct browser control of the user's **real running Chrome** via CDP — 40+ `browser_*` tools (snapshot/AX-tree, click, fill, execute_js, screenshot, console, network, web_search, read_page). **Per-project** via `/config-add ext pi-browser-harness`. Commands: `/browser-setup`, `/browser-profile`. See [[#pi-browser-harness]] below for full docs + other-machine rollout |
### pi-tool-display
@@ -141,6 +142,22 @@ LSP integration for pi (vendored from npm `pi-lsp-extension@1.3.0`, by samfoy, c
| **Auto-diagnostics** | After `edit`/`write`, appends compile errors for the changed file when a server is running (configurable via `.pi-lsp.json` in workspace root) |
| **⚠️ Vendoring pitfall** | The published package imports `vscode-languageserver-protocol/node.js` — the `.js` subpath was dropped from v3.18's `exports` map, which crashes the whole extension at load (no commands appear). Fixed in our vendor (commit `57c5cd2`): import `/node` instead. **Re-apply if re-vendoring from npm** |
### pi-browser-harness
Direct browser control of your real Chrome via CDP (vendored from npm `pi-browser-harness@0.11.0`, commit `a34b41e`, 2026-09-10). Drives the Chrome **you're already using** — profile, logins, cookies — no second browser, no MCP hop, no extra API keys.
| Aspect | Detail |
|---|---|
| **What it does** | 40+ `browser_*` tools over a single CDP connection: `browser_snapshot` (AX-tree, default), `browser_execute_js` (surgical reads), `browser_click`/`browser_fill`/`browser_type`/`browser_press_key` (interaction), `browser_screenshot` (visual only), `browser_console`/`browser_network_requests` (diagnostics), `browser_web_search`/`browser_read_page` (research, isolated tabs). Element handles are stable refs (`@(x,y)`) that re-resolve at action time |
| **Commands** | `/browser-setup` (start daemon + connect to Chrome), `/browser-profile` (choose which Chrome profile the harness uses; persists in `~/.pi/agent/`) |
| **Placement** | **Per-project** via `/config-add ext pi-browser-harness` (active in `pi-browser_testing`) |
| **Runtime deps** | `ws` only — **sharp dropped from optionalDeps** (libvips/libheif CVEs; screenshots work without auto-resize). `@mariozechner/pi-coding-agent` is dev-only (loader aliases to bundled runtime). vet scan: 0 critical/0 high/0 other on production tree; npm audit clean |
| **Security model** | Agent gets access to your real Chrome session — the most powerful & least sandboxed option. Prefer a throwaway profile for untrusted pages. Chrome needs **remote debugging enabled**: `chrome://inspect/#remote-debugging` → tick Allow (per-session toggle) **or** relaunch once with `google-chrome --remote-debugging-port=9222` (persistent, and required to let the harness open its own window) |
| **Prereqs** | Chrome installed & running (only `.27` has Chrome today; `.13` none; `.51` laptop offline). Daemon socket: `/tmp/pi-browser-daemon.sock` |
| **Other machines** | `git -C ~/.agents pull` → `/config-add ext pi-browser-harness` → `/reload` → Chrome running with debug enabled → `/browser-setup` |
| **Known quirks** | With the `chrome://inspect` *toggle* (not the launch flag), the harness cannot open its own window for the pinned profile — fix by relaunching Chrome with `--remote-debugging-port=9222`, or clear the profile selection to use whichever window exists. The daemon discovers Chrome via `DevToolsActivePort` files / port 9222 / `BU_CDP_WS` |
| **Obsidian research** | Assessment of this + 4 other browser options (incl. camofox): [[AI Tools to try]] · Outline collection `Pi Browser Harness` · AGENT.md in `pi-browser_testing` |
### pi-subagents (@tintinweb)
v0.10.2, installed globally. 18 custom agent types in `~/.pi/agent/agents/` → `~/.agents/agents/`. Tools: `Agent()`, `get_subagent_result()`, `steer_subagent()`. `/agents` command for interactive management. Features: background agents with concurrency (4 default), mid-run steering, session resume, worktree isolation, scheduling, persistent widget showing live agent status. Cross-extension RPC event bus. Patched: 24h agent survival (was 10min), clearDisabled on session start. See [[Pi Subagent]] for full documentation.