{"success":true,"name":"pc-cluster","description":"Use when managing the [PRIVATE_HOST]-hub multi-PC cluster of workers.","category":"brimind","path":"brimind/pc-cluster/SKILL.md","file":"SKILL.md","content":"---\nname: pc-cluster\ndescription: Use when managing the [PRIVATE_HOST]-hub multi-PC cluster of workers.\n---\n\n# PC Cluster ([PRIVATE_HOST]-hub model)\n\n## Architecture (fixed, do not deviate)\n- **[PRIVATE_HOST]** = the HUB/controller. All orchestration (job dispatch, disk mounts, resource checks) runs from/through [PRIVATE_HOST].\n- **This Mac** = CLIENT-ONLY. Never enable Remote Login/SSH server on the Mac. Never add the Mac as a worker/resource. The Mac only issues commands (via Hermes -> ssh [PRIVATE_HOST]) to the hub; it is never reachable from [PRIVATE_HOST] or workers.\n- **Worker PCs** (e.g. [PRIVATE_HOST] laptop, old [PRIVATE_HOST]-2nd-gen desktop w/ GTX1050, future additions) = resources. They run an SSH server so [PRIVATE_HOST] can reach them; [PRIVATE_HOST] dispatches jobs to them and/or mounts their disks. They do NOT initiate control of anything.\n\nFlow: Mac -> (ssh) -> [PRIVATE_HOST] -> (ssh) -> worker PCs. Never the reverse into the Mac.\n\n## Agent-control scope and acceptance\n- Treat requests for worker “full control” as practical access to desktop/browser actions, jobs, installed tools, materials, file transfers and external-disk workspaces through [PRIVATE_HOST]—not merely resource statistics or an SSH connection. Preserve secret isolation and destructive-operation safeguards; do not silently grant new account-wide sudo or expose SSH keys.\n- Inventory the requested resources first, then track separate acceptance rows for host connectivity, isolated-agent invocation, file read/write, tool/job execution, desktop/browser control and visual interpretation. Mark a row working only after its own end-to-end test; a mounted disk is not agent access, a visible browser is not agent control, and a readable video is not vision.\n- For every unfinished row, continue implementation and verification rather than repeatedly returning architecture suggestions. Give progress in a colored inline table, distinguishing already-working routes from newly applied fixes and from unverified work.\n- Make proven routes discoverable in the agents’ persistent guidance. Instructions alone do not establish runtime access; test the documented command from the actual configured engine/access mode.\n- Design reusable rail execution with an explicit [PRIVATE_HOST]-or-worker target so agents can choose the machine; inspect each rail’s dependencies, files, credentials and browser session before claiming parity, because a target variable alone does not migrate them. The user authorizes building a dedicated access service when existing rails are insufficient; retain credential isolation and destructive-operation safeguards.\n- Verify browser control against the same worker browser session the rail actually opens: perform a harmless interaction and read back its result or screenshot from the agent runtime. A separate browser, an installation success, or a launch exit code does not prove control of that session.\n- When isolating a credential-visibility issue, do not present a reproduction of mount isolation as a live agent test. Report the distinction and test the actual agent launcher before claiming completion.\n\n## Adding a worker PC\n1. Enable OpenSSH server on the worker (Windows: Settings > Optional features > OpenSSH Server, then `Start-Service sshd` + `Set-Service sshd -StartupType Automatic`; Linux: openssh-server).\n2. Get IP/hostname + username, then authenticate from [PRIVATE_HOST] to the worker. If a password is needed, let the user enter it directly into the interactive terminal, never into chat. Install only [PRIVATE_HOST]'s public key on the worker and verify a new noninteractive SSH connection from [PRIVATE_HOST]; an open password-authenticated session alone does not prove key access.\n   - Before sending a command to an existing Terminal session, inspect its window ID and shell prompt and target that exact window; the front window may instead be the Mac's local shell. Reconfirm the target before any filesystem write.\n   - Distinguish SSH access as the worker user from root or passwordless sudo access; verify privileges separately and do not silently grant elevated access. Before granting account-wide passwordless sudo, explain that it applies to every login to that account, not just [PRIVATE_HOST]'s key; validate the sudoers rule with `visudo` and verify with `sudo -n id`.\n3. Register the worker in [PRIVATE_HOST]'s inventory (e.g. `[PATH]` or SSH config aliases on [PRIVATE_HOST]) with IP, OS, specs, resource-check command. Verify agent access from the actual agent execution environment as well as the [PRIVATE_HOST] shell: sandboxed agents can have different SSH configuration, host keys, and credential visibility. Report each test separately; do not equate a shell connection with agent access.\n4. Resource check commands: Linux `free -m`, `nproc`, `df -h`; Windows via `ssh user@ip powershell -Command \"Get-Counter ...\"` or `wmic`/`systeminfo`.\n   - For a requested visible desktop action on a Linux worker, inspect the logged-in graphical session and pass its `DISPLAY`, `WAYLAND_DISPLAY`, `XDG_RUNTIME_DIR` and `DBUS_SESSION_BUS_ADDRESS` to the remote GUI command. Firefox accepted `firefox --new-window about:blank` with those session variables through [PRIVATE_HOST] SSH; exit status alone does not prove that a window appeared, so verify on the worker's screen or ask the user.\n   - When informing an agent about worker access, send through the existing agent mailbox and read back the exact message; distinguish queued/unread from acknowledged, and do not claim the agent can use the worker until its own runtime test succeeds.\n5. Disk pooling: mount worker disk on [PRIVATE_HOST] via SSHFS/SFTP (needs sshfs installed on [PRIVATE_HOST], the client side of the mount). Inventory actual mountpoints and filesystem types on both hub and worker; distinguish capacity from free space. Verify a harmless uniquely named file write/readback in each authorized agent workspace from the actual sandbox before reporting read/write access.\n   - For Unitary local-video vision, first test the existing route inside the agent’s configured box: confirm video readability, extract a frame with `ffmpeg`, then run `node agents/method/see.mjs --image <frame.png> --ask \"Describe the visible content\" --agent <id>`. Artisto’s full-access boxedCodex route has completed this end to end. Test other access modes separately; do not generalize full-mode success to read-only mode. Persist the proven recipe in agent guidance instead of assuming a copied workspace file is inaccessible or that file access automatically provides visual interpretation.\n6. Job routing script (on [PRIVATE_HOST]): check free RAM/CPU per registered worker, pick best candidate, `ssh worker 'command'`, return result.\n7. For an explicitly requested persistent SSH connection, use a dedicated [PRIVATE_HOST] user systemd service running `ssh -N -T` with `BatchMode=yes`, `ServerAliveInterval=30`, `ServerAliveCountMax=3`, `Restart=always`, and `RestartSec=10`; enable it and verify `systemctl --user show <unit> -p ActiveState -p SubState -p UnitFileState`, then restart and verify again. Check user lingering so the service can start without an interactive login; explain that reconnection still depends on both machines and the network being available.\n\n## Matching workload to old/weak hardware\nOld PCs (e.g. 2nd-gen [PRIVATE_HOST], 10GB RAM, GTX 1050 4GB) are NOT for heavy training or modern gaming-tier GPU work, but are solid for:\n- Disk pooling / bulk file & backup storage (CPU-light)\n- Background batch jobs: ffmpeg transcoding (GTX1050 has NVENC), scraping, cron jobs, hosting a file server / lightweight web service\n- Small local LLM inference via llama.cpp with 4-7B quantized models (CPU or partial GPU offload) — not large models\n- Folding/distributed-compute style parallel tasks, small Stable Diffusion (slow but functional on 4GB VRAM)\nNot suited for: large LLM training/inference, modern AAA workloads, anything needing >4GB VRAM or high single-thread perf.\n\n## Current known machines (update as added)\n- [PRIVATE_HOST]: hub, Linux, reachable via `ssh [PRIVATE_HOST]` (key auth).\n- Mac: client only, never a worker.\n- [PRIVATE_HOST] laptop: Linux `brinis-[PRIVATE_HOST]`, reachable from [PRIVATE_HOST] as `ssh [PRIVATE_HOST]` (brinis@[IP]) using a dedicated [PRIVATE_HOST] key. Passwordless sudo for the entire brinis account was explicitly enabled; `sudo -n id` verified root. The enabled [PRIVATE_HOST] user service `[PRIVATE_HOST]-ssh-connection.service` maintains and retries an SSH session. Agent sandbox access still requires separate verification.\n- Old desktop: [PRIVATE_HOST] 2nd gen, 10GB RAM, GTX 1050, not yet added (pending IP/username/OS confirm).\n","linked_files":[],"origin":"brimind","owner_id":null,"source":"router"}