{"success":true,"name":"i7-remote-ops","description":"Use for [PRIVATE_HOST]/Unitary: code, SMS, Telegram, WhatsApp, Maps.","category":"brimind","path":"brimind/i7-remote-ops/SKILL.md","file":"SKILL.md","content":"---\nname: i7-remote-ops\ndescription: \"Use for [PRIVATE_HOST]/Unitary: code, SMS, Telegram, WhatsApp, Maps.\"\nversion: 1.0.0\nmetadata:\n  hermes:\n    tags: [ssh, [PRIVATE_HOST], unitary, remote]\n    related_skills: [codex-image-gen-i7]\n---\n\n# Operating the [PRIVATE_HOST] machine from the Mac\n\n## When to Use\nStanding order from the user (2026-10-15): use these tools **proactively, in any chat, any case** — when a task needs SMS, Telegram, email, WhatsApp, Maps leads, site audits, invoices/payment links, social posts/stats, a team agent, or free omni search, pick them yourself (no need to ask first or for [PRIVATE_HOST] to be mentioned) and chain them with web, files, docs and the browser to reach the end result. Send-type actions that reach a real person still need an explicit order (rule below).\n\nPrefer the user's own rails over third-party connectors: payments/invoices/devis go through `pay.brimind.pro` (see `references/unitary-tools.md`), so do not recommend Stripe-type connectors for them.\n\nThe user mentions [PRIVATE_HOST], a folder or service on it, the Unitary/Brimind repo, or wants SMS/WhatsApp/Telegram/email/Maps/invoice/social tools run (they live on [PRIVATE_HOST]). Also covers: a leaked/hacked key, suspicious activity, or \"dig deep / find the backdoor\" on [PRIVATE_HOST] or any deployed site — see `references/[PRIVATE_HOST]-security-incidents.md`.\n\n[PRIVATE_HOST] = Linux box (user `brimind`, ssh alias `[PRIVATE_HOST]`, key auth). It hosts the user's Brimind/Unitary stack. The user wants [PRIVATE_HOST]'s tools driven **from here** over SSH.\n\n## Always-on rules\n- Any web UI you build (dashboard, playground, test page, client site) is **Next.js** unless the user names another tech — follow the `default-stack-nextjs` skill (it also holds his dashboard UI conventions). Read `references/owner-preferences.md` before building anything visual.\n- User profile facts: his own phone is [PHONE] (+216, Tunisia). SMS tool works for Tunisian +216 numbers only; pass `--as owner` when texting him.\n- Showing an [PRIVATE_HOST] web service: use `ssh -f -N -o ExitOnForwardFailure=yes -L <macPort>:localhost:<i7Port> [PRIVATE_HOST]` and give `http://localhost:<macPort>`; a public tunnel URL is the user-approved alternative (`~/.local/bin/cloudflared` on [PRIVATE_HOST] for a quick `trycloudflare` URL), use it only when asked. If the user just says \"tunneled\", offer both: private `ssh -L` vs a public link, and warn when the service spends paid subscriptions. Kill the forward/tunnel when done.\n- Hermes CLI on the Mac holds Nous + Anthropic credentials only; ChatGPT login lives in Codex CLI (Mac `~/.codex`, and [PRIVATE_HOST]). Don't copy tokens between tools; use each tool's own sign-in.\n- Answer format: the user reads tables, skips prose. Every answer — status checks, process lists, explanations of how something works, recaps — is a colored-cell table widget (skill `colored-comparison-tables`), a few lines outside it at most. \"Explain\" never means prose: put the explanation in table cells (one row per component: job / trigger / how it comes back / status). Status recaps carry a before→now numbers table and an honest per-item status (proven live / test mode / not fixed yet) — never call a fix done before a live check shows it acting.\n- \"The PC\" / \"the machine\" in an [PRIVATE_HOST] conversation means [PRIVATE_HOST], not the Mac — check [PRIVATE_HOST] unless the user names the Mac.\n- For repair-command requests, give direct process/service commands, not an `agent.js ask` prompt or delegation disguised as a fix. Diagnose here over SSH; leave interactive sudo/password entry to the user's terminal. Only involve a team agent when the user actually asks to talk to or delegate to it.\n- A user clarification that a site is hosted on the [PRIVATE_HOST] identifies the target, but does not by itself waive the app's documented deploy workflow or authorize bypassing its source-of-truth safeguards. Follow the repo-specific deploy recipe unless the user explicitly authorizes a direct live hotfix; after any build/restart already started, wait for that exact operation to finish before another write or restart, then verify the configured listener, local route/redirect, and public route.\n- Make owner-run commands copy-safe: identify the target machine first; when the prompt already shows [PRIVATE_HOST], omit the `ssh [PRIVATE_HOST]` wrapper. Put only runnable shell text in a short fenced block, with balanced quotes and no output, prompts, placeholders, or long natural-language payloads. If the shell shows a continuation `>`, tell the user to press Ctrl+C before a replacement command. Never suggest installing a package merely because a pasted command was mistyped.\n- When the user screenshots one of your tables and asks a follow-up (\"how much RAM do these need\", \"explain these\"), answer with exactly THOSE rows plus a total row — not a new breakdown of your own; a re-scoped answer costs a correction round.\n- Speed: for status/\"check X\" questions, batch everything into 1–2 ssh calls and answer; the user follows up fast and interrupts slow multi-round probing. When several asks arrive mid-run, answer them all in ONE widget (one table per ask).\n- Files: agent output on [PRIVATE_HOST] goes in `[PATH]` (`images/ files/ scratch/`); on the Mac in `[PATH]`. After learning anything durable about [PRIVATE_HOST], update the Mac `NOTES.md` and `scp` it to `[PRIVATE_HOST]:[PATH]`.\n- Anything that reaches a real person (SMS, WhatsApp, Telegram, email, social posts) runs **only on an explicit user order**, with the exact text shown first.\n- For media passed to `node scripts/agent.js ask`, use `--file /absolute/path`: a path in the prompt alone may be refused even when the file exists. The service materialises the attachment for the turn; default limit is 10 MiB per file. For larger video use a clearly identified compressed copy under that limit, retain the original master, and verify the agent reports matching SHA-256 and dimensions. Do not claim a sandbox defect solely from an agent's statement.\n- WhatsApp transport policy: use the official Cloud API for authorized outbound/first-contact messages, subject to Meta consent/template rules. Personal/QR WhatsApp numbers must not initiate unsolicited conversations: use them only for an explicit user-requested send or a reply to someone who messaged first under an authorized reply workflow. Never silently fall back from a failed API send to a personal/QR/browser line.\n- A site/app that must WhatsApp its own customers (order confirmation etc.) sends from the shop's OWN number linked by QR scan, exactly like the S3A member lines — a dedicated persistent QR line on [PRIVATE_HOST] + tunnel forward + admin QR page; not the BRIMIND Cloud API line or a Meta template. Recipe and guard rules (declared inbound for buyers, queued-while-unpaired test sends): `references/app-whatsapp-lines.md`.\n- “Send from [PRIVATE_HOST] Unitary” means invoke the existing guarded Unitary sender on [PRIVATE_HOST], not merely execute a separate Graph request with its credentials. Preserve its queue, authorization, ledger and receipt tracking. Distinguish a direct API diagnostic from a successful system-level send; neither a valid token nor an accepted message ID proves delivery.\n- Never `cat` files likely to hold secrets (`.env*`, `keys/`, `*KEY*`, `*.key`, `session*`, block/rotation notes). List them by name only. Read docs with `head` on named files, not wildcards over the tree.\n- When an ssh command needs the REMOTE shell to expand `$(...)`, `$VAR` or run a `for` loop, wrap the whole command in SINGLE quotes: `ssh [PRIVATE_HOST] 'K=$(cat f); echo $K'`. Double quotes (`ssh [PRIVATE_HOST] \"K=$(cat f); echo $K\"`) let the LOCAL shell expand `$(...)`/`$VAR` before ssh ever sees them — it fails silently (empty variable, no error) instead of refusing, so a `for f in a b; do ... \"$f\" ...; done` run this way prints empty filenames on the remote side with no clue why.\n\n## Procedure\n1. **Reach**: Use the SSH alias the user explicitly supplied; otherwise use `[PRIVATE_HOST]`. Run `ssh -o ConnectTimeout=8 -o BatchMode=yes <alias> 'hostname; uptime'`. Report load average — [PRIVATE_HOST] often runs very hot, which slows everything. For read-only probes that do not need forwards, add `-o ClearAllForwardings=yes` so an occupied configured local port does not obscure a successful connection.\n2. **Locate** (when the user names a folder): `find / -maxdepth 5 -type d -iname \"<name>*\" 2>/dev/null | head -20`, show matches in a table, ask which one. If the user instead *drags a folder into the Hermes composer*, the attached image is only the generic macOS folder icon — no filename, no content. Don't try to read it with vision; ask for the explicit path right away (for BRIMIND company identity/branding specifically, skip the question and go straight to `references/brimind-identity.md` — the user confirmed the [PRIVATE_HOST] Unitary repo over any Mac copy).\n3. **Understand a project**: read its own guidance first (`CLAUDE.md`, `README.md`, module catalogue), not the whole tree. Batch reads into one ssh call. Identify the authoritative checkout and inspect its existing changes before editing; a local build or archive copy may not be the deployed source, and unrelated dirty changes must be preserved.\n4. **Use tools**: get live status before offering anything (see `references/unitary-tools.md`), then present a \"you ask me → tool → status\" table.\n5. **Talk to a named Unitary agent**: When the user addresses an [PRIVATE_HOST] agent by name (including a greeting or the bare name), route their message to that real agent immediately without asking permission again. Relay the agent's actual reply, clearly attributed; never impersonate the agent or invent its response. Keep routing subsequent conversation to that agent until the user switches agent or addresses Hermes. Resolve the agent id with `node scripts/agent.js agents`, then send the exact user message with `node scripts/agent.js ask \"…\" --agent <id>`. Use `--main` for a new audit or task; only use `--parent <session>` when the user explicitly wants to continue that exact conversation. If the parent-scoped reply says the request is outside the project, immediately retry the same request with `--main` rather than guessing a narrower task. For long asks, allow the SSH call to background, then collect the existing process with `process_manage wait` and `log offset: 0`; do not rerun it, because a second agent session duplicates work and can overload [PRIVATE_HOST]. Treat the agent’s report as unverified until its evidence and commands are visible; never claim a fix was executed when the request only asked for commands.\n6. **Change code in Unitary**: this user wants the edits made by Hermes itself (Claude here, on the Mac), working on the Unitary folder on [PRIVATE_HOST] over ssh — not by launching `claude -p`/Codex on [PRIVATE_HOST] or asking Dali through `agent.js ask`, which also dies when the claude2/codex quotas are spent. When he says \"do it in another session\", spawn a Hermes `delegate_task` subagent. Give it a self-contained brief: paths, a definition of done with live proof, what must not change, no sends to members, backups first. Pull the files, edit locally with patch, push through a hash-guarded script, run the repo's own `node --test` suites on [PRIVATE_HOST], test-first. Full recipe: `references/unitary-code-changes.md`. Never weaken the repo's sandbox/secret checkpoints (policeman, codex-guard, bwrap box) while fixing. For read-only CLI/token investigations load `references/unitary-cli-audit.md`.\n7. **Multi-problem fix requests** (\"fix all of it, one by one, don't forget any\"): put every row of the findings table into the todo list before the first fix, add new user asks as rows, and report back as a status table with one row per problem (done / waiting on you / not started + why). Never let a row silently drop. For commands the owner will run, first verify each executable path and supported flags from the actual CLI/help/source; agent reports are not validated command documentation. Distinguish repairs from read-only diagnostics, approval/business decisions, and physical work. If the user asks for one command, combine only independently justified operations and include verification; do not claim the bundle fixes everything when hardware, authentication, or approvals remain. Keep dependent steps gated with `&&`, and label any independent checks separated by `;`.\n   - Diagnose an unreadable service probe from its configured endpoint: inspect the probe source, check the listener with `ss -ltnp`, discover the existing launcher using `node agents/tools/ensure.mjs --list`, and use `node agents/tools/ensure.mjs <service>` only when a start is intended. Re-read the exact endpoint afterward; a launcher exit alone does not prove recovery.\n   - For storage errors, correlate `findmnt`, `lsblk`, and kernel logs before recommending repair; a stale mount can remain after a device disappears. Treat shutdown flags plus an absent device as unresolved storage failure, not proof that a filesystem command will repair it. Never force-remount or run fsck on the mounted filesystem; preserve readable data and establish hardware/device identity first.\n   - Reconcile pasted results row by row without inventing completion: a report is not its business outcome, a validation PASS is not director approval, and a partial invoice scan is not a full-ledger audit. Preserve the scan denominator and mark untested repairs unverified.\n7. **Build or change an AI endpoint / fallback chain / chat** (\"make an API that uses Codex, then Claude, then …\", \"add files\", \"make it stream\", \"session chat\"): check for an existing service first and extend it (AIHub is the user-facing hub; AI Fallback is its CLI engine) instead of building a parallel one. Use the same CLI accounts as the Unitary team fallback, follow the user's level→model table, show who answered in every reply, stream even one-shot answers, and red-team the box before tunneling. For \"which projects use AI chat / what do they use\", run the audit in the same reference (find chats → map to hosts → live message → key health → one colored table with a fix column). Spec, recipes, ports and working CLI flags: `references/ai-endpoints-and-headless-clis.md`. \"AI chat prod\" / BRIMIND AI Chat model or provider changes: read that file's \"Moving a project onto AIHub\" section first — the live code is on [PRIVATE_HOST], not the Mac clone.\n   - For chat typing indicators, trace events from each human and AI producer through the server to each client; test start, heartbeat/expiry, stop, and simultaneous group participants. Distinguish the local composer from incoming typing and do not infer a participant's identity from a fallback chat title. Verify the built feature in the deployed client before calling it live.\n8. **Vet and install a skill/plugin for a Unitary agent** (\"add skill X to <agent>\", \"is X healthy\"): follow the repo's own skill-scout gate — health check (npm/GitHub stars, release cadence, license, maintainers) → clone pinned to a commit into `agents/skills-quarantine/` → scan for malicious code/prompt injection → score → install only the relevant sub-skill into `agents/<agent>/skills/` and link it in that agent's `AGENT.md` table. Never skip the gate because the package looks popular. Full recipe: `references/unitary-skill-scout.md`.\n\n## Pitfalls\n- WhatsApp QR number replacement: inspect `/status`, the line's systemd environment, Mongo `creds` with projection limited to `value.me.id`, and the legacy auth directory's identity only. An empty Mongo collection can silently re-import the old phone from `WHATSAPP_AUTH_DIR` on restart. For an explicitly requested new number, use a fresh auth collection and empty legacy directory plus separate queue/control/history/hold paths; keep prior holds and pending queues unchanged and start the fresh sender paused. Never erase a 403 hold just to obtain a QR. Removing dormant local/Mongo credentials prevents [PRIVATE_HOST] reuse but does not prove remote Linked Devices revocation; when no live socket exists, the owner must unlink that device on the old phone. Verify fresh `status: qr`, `/qr.png` HTTP 200, pending 0, sending false, and unchanged Cloud API status before offering the pairing URL.\n- Wrap every remote command in `timeout N` **on the [PRIVATE_HOST] side of the ssh string** (e.g. `ssh [PRIVATE_HOST] 'timeout 60 ...'`), and give the terminal tool's own `timeout` parameter a generous value for the whole call. The Mac shell itself has no GNU `timeout` binary — `timeout 60 ssh [PRIVATE_HOST] ...` fails with \"command not found\" before it even connects.\n- Give the terminal call a generous timeout: under high load `du -sh` and `git status` on big repos blow past 60 s. Skip `du` on large trees unless asked.\n- \"Connection timed out during banner exchange\" means [PRIVATE_HOST] is overloaded, not down. Wait ~5 s and retry once with `-o ConnectTimeout=25`; don't conclude the box is unreachable.\n- If the user writes while an ssh call is still running, Hermes moves the call to the background. Collect it with `process_manage` (`wait`, then `log` with `offset: 0` when the result reports `output_cut`, because `wait` drops the head). Don't re-run the probe: a second heavy ssh on a hot box doubles the load. The same rule applies to `node scripts/agent.js ask`: wait for the original process and retrieve its full output before replying.\n- When continuing an agent conversation, a parent session can reject a broader audit as outside its project scope. Retry with `--main` and keep the exact request; do not silently narrow or reinterpret the user’s ask.\n- `ps aux | grep <pattern>` for Claude/Codex CLI processes can return 100K+ chars per call — each `ccd-cli`/agent process carries a huge `--settings` JSON blob as argv. For counts or triage use `ps -eo pid,etimes,cmd | grep -c <pattern>` and targeted `grep -oE` extraction instead of dumping raw `ps aux`; redirect to a file first if you need to post-process with awk/sort.\n- Killing processes on [PRIVATE_HOST] (to free RAM): snapshot pid + exe + start time to `[PATH]` first, SIGTERM only matching identities, wait ~8 s, SIGKILL only survivors whose exe+start time still match (pids get reused), then re-check `free -m`, memory PSI and that the brimind-* services are still active. Recipe in `references/unitary-cli-audit.md`.\n- Before stopping an [PRIVATE_HOST] process, find its owner (`/proc/<pid>/cgroup` unit) and act there — disable the unit, set the wildcard tenant to `idle`, or change the dashboard's app set — because a supervisor respawns a killed child within seconds. For \"stop unused / run on demand / RAM garbage collector\" asks, extend the existing ram-guard/ram-sweep/session-reaper/wildcard-idle/dashboard-`demand` machinery, roll new kill rules out in `dry` mode first, and point agents at `agents/tools/ensure.mjs <name>` to start what they need (it mails Dali when it can't). Recipes: `references/unitary-cli-audit.md` (sections \"Stopping things for good\" and \"Existing RAM garbage collection\").\n- Before any change on a shared box (Caddy, DNS, a router many sites use), snapshot the status of every site it serves, then diff against it after the change. Report failures already in the snapshot as pre-existing, so the user can tell damage from old breakage; this user expects \"make sure all websites have no problem\" to be proved host by host.\n- For dashboard integrations exposing phone numbers or other personal data, verify authorization for both the page and its API across public and alternate access paths; a public proxy's login does not prove the local API is authenticated. Keep database credentials server-side, return only requested fields, and disable sensitive response caching.\n- For visitor dashboards, distinguish visits, unique visitors, sessions and registered accounts; do not use account activity or OTP logs as visitor totals. If no reliable historical source exists, label history unavailable and instrument future activity with a clearly defined metric.\n- Hermes tool output redacts phone-like strings (`+324****2760`): the file on [PRIVATE_HOST] holds the full number. Never treat such a value as masked data in the source, and never add \"masked phone\" logic based on what the terminal showed.\n- Multisite client sites (`clients/multisite`, one Next app on :4030 for every `*.offer.brimind.pro` / `*.ncs.brimind.pro` client, plus the NCS platform on `ncs.brimind.pro`): changing configs goes live through `node scripts/publish.mjs <one-slug>` (build beside, swap, restart, proves 200; any slug rebuilds all); app-wide code changes, host routing, themes, NCS and pay-invoicer rebuilds follow `references/multisite-and-ncs.md` (side build → side-port proof with forwarded headers → swap → markup-stripped snapshot diff). Edit a client's config in BOTH `clients/projects/<slug>/site.config.js` and `clients/multisite/sites/<slug>.config.js` — publish re-imports from projects. Prove no harm with a before/after snapshot of every host via `curl :4030` + Host header (status, head tags, visible text diff). SEO pieces live in `lib/seo.mjs`.\n- A UI/site change the user asks for (\"prevent X in the preview\", \"add a countdown\") is only done when it is live: edit, build, swap and prove it in the same turn. Don't stop after discovery or at a source edit with \"rebuild and redeploy to see it\" — continue through implementation and verification unless an actual permission, security or operational blocker prevents it; identify that blocker precisely. For NCS/multisite the Mac mirror is `[PATH]` (`sync.sh pull|push` is hash-guarded, `deploy.sh` is the reference flow). If the push is REFUSED because a file changed on [PRIVATE_HOST], re-apply only your edit on top of the [PRIVATE_HOST] copy (an idempotent python edit run over ssh), because someone else's live edits must be kept. The live :4030 is started by the wildcard dispatcher (`com.brimind.wildcard.service`) with the default `.next`. To deploy: run a side build with `MULTISITE_DIST_DIR=.next-hermes`, check it on :3072 with a `Host:` header, then `mv .next .next-old && mv .next-hermes .next`, kill the :4030 pid taken from `ss -ltnp` (the dispatcher respawns it), and re-check via `[PRIVATE_HOST]` with a Host header. Client-only components render nothing in the SSR HTML, so prove them through the served CSS/JS chunks instead.\n- pay.brimind.pro UI tweaks (banner, nav, landing): source is `[PRIVATE_HOST]:~/unitary/pay-invoicer` (Next app: `app/layout.jsx` holds the Black Friday banner `.bf-banner` gated by `promoActive()`, `app/page.jsx` the landing with section ids `#services` (catalogue/prices), `#process`, `#confiance`; styles in `app/globals.css`). Go straight there instead of grepping the Mac or curling the live HTML (the banner is not in the fetched HTML and a Mac-wide grep takes minutes). To make a banner/element a link use `next/link` (`<Link href=\"/#services\" className=\"bf-banner\">`) and add `display:block;text-decoration:none` in CSS. The edit is not done until built and live — follow the pay-invoicer rebuild recipe in `references/multisite-and-ncs.md` and the [PRIVATE_HOST] tunnel check in skill `brimind-pay-vps-split`; do not stop at the source edit and ask whether to deploy unless a real blocker exists.\n- When a public site is slow or hangs, time the same request on [PRIVATE_HOST] (`[PRIVATE_HOST]` + Host) and from the [PRIVATE_HOST] (`[PRIVATE_HOST]`) before touching code: fast on [PRIVATE_HOST] + stuck at the [PRIVATE_HOST] = the reverse tunnel, fixed by killing that one forward (recipe in `references/[PRIVATE_HOST]-dashboards.md`).\n- A user screenshot saying \"it didn't get X\" (photos, data) on a site the platform made: reproduce with the exact URL he used, then trace each stage (scraper output → draft files → site config → served HTML) and fix the stage that drops it; also repair his live site, not only future ones.\n- Quoting multi-line node/python scripts through nested `ssh ... bash -c \"cat > f <<EOF\"` is fragile (backticks, `$`, quotes break). For anything longer than a few lines write the script locally under `[PATH]` and pipe it: `ssh [PRIVATE_HOST] 'sudo -n bash -s [args]' < script.sh` (same for `ssh [PRIVATE_HOST] 'bash -s' < script.sh`) — nothing to copy or clean up on the server; scp only when the script must stay there.\n- Keep a routine deploy (scp + restart + smoke test) in a different command from any probe that touches credential files, such as a red-team that tries to read `auth.json`. The secret probe triggers an approval prompt. If nobody answers, the whole command is blocked, the deploy never lands, and you must stop and wait for the user.\n- Never `pkill -f`/`pgrep -f <pattern> | kill` inside `ssh [PRIVATE_HOST] '…'` or a `bash -c` that contains the same pattern: the remote shell's own command line matches and dies (ssh exit 255, half-done step). Kill by pid from `ss -ltnp`, or from a script file whose command line does not contain the pattern.\n- Anything over ~3 min on [PRIVATE_HOST] (next build, site snapshots, headless screenshots): write it to a script file, start it with `setsid nohup bash <script> > <out> 2>&1 < /dev/null &`, then poll `<out>` for a `DONE`/`EXIT n` marker in short ssh calls. A foreground ssh that runs that long gets orphaned when the user writes or the tool times out, leaving the effect unknown.\n- Every scratch file stays in the Hermes folders, including `scp` targets and one-off probe copies — never `/tmp` on either machine; set `TMPDIR=[PATH]` for remote test runs.\n- CLIs in `~/.local/bin`, `~/.opencode/bin` are not on the non-interactive PATH: use `bash -lc '...'` or `export PATH=$HOME/.local/bin:$PATH`.\n- Ambiguous open questions (\"what can we do with it\"): if the first reading misses, do **not** guess a second time — call `clarify` with 3–4 concrete interpretations, since each wrong guess costs a full round. For this user, \"what can we do with <folder>\" meant \"use its tools from here\".\n- \"Make X like <port/name>\" usually points at **another service's value or behaviour**, not the literal text: \"password like dashboard 3999\" meant \"the same password as the dashboard on :3999\", and \"use the CLIs like the team fallback in dashboard 3999\" meant \"the same accounts as the Unitary engines\". Resolve the referenced thing first (`ss -ltnp | grep :<port>`, its systemd unit, its code); if you can't find the value, ask before changing anything (a reversed secret change costs a backup + restore).\n- Editing a remote file through an inline `ssh [PRIVATE_HOST] 'bash -lc \"python3 - <<PYEOF ... PYEOF\"'` heredoc breaks when the payload has backticks or `$VAR`-looking text (the local/remote shell expands them before Python ever sees the script) — write the Python edit script to a local file, `scp` it to `[PRIVATE_HOST]:[PATH]`, then `ssh [PRIVATE_HOST] 'bash -lic \"python3 [PATH]<script>.py\"'` instead.\n- `[PRIVATE_HOST]` is an SSH alias configured in the **Mac's** `~/.ssh/config`, not [PRIVATE_HOST]'s — `ssh [PRIVATE_HOST] \"ssh [PRIVATE_HOST] '...'\"` fails on [PRIVATE_HOST] with \"Could not resolve hostname [PRIVATE_HOST]\" because [PRIVATE_HOST] has no such Host entry (and no DNS record for that literal name either). Always call `ssh [PRIVATE_HOST] \"...\"` directly from the Mac; never nest it through [PRIVATE_HOST].\n- A hash-guarded remote push needs the verify-script AND a data payload as two separate stdin sources, but a shell only honors the LAST `<` redirect on a command line — `ssh host 'bash -s args' < script.sh < payload.file` silently feeds `payload.file` as the script and `script.sh` is never read (the remote shell then tries to execute the payload's literal content as commands). `scp` the payload to a remote temp path first, then run a separate `ssh host 'bash -s args'` that sha1-checks the live file and `cp`s the temp payload over it.\n- A short name the user drops with no context (\"add skill X to dali\", \"is Omar using maps\") is most likely a Unitary **team agent**, not a client/lead: resolve it with `ssh [PRIVATE_HOST] 'cd ~/unitary && node scripts/agent.js agents'` (id/name/post, e.g. Dali=developer, Sinda=bizdev-manager, artisto=Mehdi, Omar=Scout) or the role table in `agents/ORG.md`, before grepping the lead database or the filesystem.\n- For a \"what's blocking agent X\" ask, the agent's own `agents/<id>/status.md`, `calendar.md`, and the newest `owner-order-*.md` carry the live diagnosis (often written by the agent itself, with exact file/line) — read those before inventing a diagnosis from logs.\n- A member-facing S3A refusal quoted in the chat (\"your folder is linked to a location outside your own space\", \"I can't open your project folder\") is not rhetorical — grep `agent-service/data/sessions/*.json` for the exact phrase to find the full turn/prompt, then trace from there into `agent-service/lib/workspace.js` (`denyRules`/`siblingsOf`) before guessing a cause. That file denies every OTHER member's whole home folder for isolation; a project reached through a symlink (share-by-link, a moved/renamed workspace, anything that makes a member's project resolve under a path outside his own home) walks straight into that deny list, and the agent reports it in exactly this wording. The fix pattern is to carve a narrow exception into the deny list for the specific shared/linked path — never to loosen or remove the blanket sibling-isolation rule itself.\n- \"S3A not responding\" (WhatsApp, Telegram, or Labes! group/DM) is almost never a per-group wiring issue: S3A's runtime logs are not a `.log` file but the systemd **user** journal — `journalctl --user -u brimind-s3a.service --since \"<time>\" --no-pager`. Grep it for the member's phone/id first; a line `labes <phone>: {\"claimed\":true,...}` with no later `handled`/send confirms intake worked but the reply pipeline is the suspect. Next grep the same window for `failed`/`error`: if the same `S3A DM turn failed: claude2: ... claude: Not logged in ... codex: usage limit ... luna: usage limit` pattern hits *multiple unrelated phone numbers/members* in the same window, it is a global engine-fallback outage (every account S3A can call is down/rate-limited), not a bug in the one group the user mentioned — check before touching that group's config. `node scripts/agent.js agents` and `s3a/lib/engine-tag.mjs` name the fallback chain (`claude`, `claude2` = 2nd Claude Code account, `codex`, `luna` = 2nd Codex account). A `claude2`/second-account OAuth login that \"cannot be renewed\" needs a fresh `CLAUDE_CONFIG_DIR=<that account's dir> claude /login` run interactively by the user (paste-the-code flow, same constraint as the Hermes-on-[PRIVATE_HOST] Claude login) — do not attempt to run or guess the OAuth code yourself. A codex/luna \"usage limit\" error names its own retry-after timestamp; that is a wait, not a fix to chase. Reroute while waiting: `node agents/tools/validate-engines.js | grep s3a` warns when the repo's free last resort `omni` is unticked in `agents/registry.json` (`agents.s3a.engines`); tick it (backup first) and prove with `node scripts/agent.js ask \"réponds OK\" --agent s3a --main` (≈50 s, answer tagged `⟦Omni CLI …⟧`). If the chain then fails with `omni: r.enabledFor is not a function`, agent-service (:3060, a Next build) has webpack-mangled the dynamic `import('./omni-cli.mjs')` in `omniroute/agent-fallback.cjs`; the fix is an absolute file-URL import with `/* webpackIgnore: true */` + agent-service rebuild (done 2026-11-15). The `go` engine fails with an expired OpenCode API key until the owner makes a new one. Jobs that failed sit in `~/BRIMIND/s3a/queue/failed`; the developer agent works these outages in parallel (it phones the owner), so check file mtimes / running codex before editing the same files.\n\n- Big file moves/copies between the Mac's drives and [PRIVATE_HOST]'s drives (\"copy speed from A to B\", \"move folders to MULTIBOOT\"): never copy over the Mac's SMB mounts (`/Volumes/[PRIVATE_HOST]-*`, Wi-Fi ≈ 6 MB/s); measure first, then have the user plug the external drive (\"SSD ext\") into an [PRIVATE_HOST] USB 3 port and run a detached rsync on [PRIVATE_HOST] (mounts under `/run/media/brimind/<LABEL>`). \"Move\" = copy, checksum-verify, then delete the source without asking again; pre-flight-test the destination with a write probe, because the [PRIVATE_HOST]'s MULTIBOOT disk can drop mid-copy with I/O errors (then nothing is deleted; replug, don't fsck). Full recipe, failure handling and the SMS-on-finish script template: `references/bulk-file-moves.md`, `templates/move_verify_delete_sms.sh`.\n\n## Imported Unitary skills\nThe repo's skills live in Hermes as category `unitary` (`~/.hermes/skills/unitary/`, 276 skills). Each one's paths are relative to `[PRIVATE_HOST]:~/unitary`; run their commands over ssh. To re-sync after the repo grows: list SKILL.md with a pruned `find` (prune node_modules, worktrees, .git, skills-quarantine, .next; an unpruned find times out), then scp and run `scripts/pack_unitary_skills.py` on [PRIVATE_HOST]. It keeps the newest copy per name, drops symlinks, secret-named files and files matching key patterns, and builds a tarball. Then install with a name-fixed frontmatter and the source note. Never import `brimind-public-mongo` or `brimind-reuse-mongo-cluster`: they hold Mongo credentials. Skip names Hermes already has (humanizer, requesting-code-review, test-driven-development), and set `name:` to the directory name, because the anthropic-skills-* skills declare docx/pdf/xlsx and clash with Hermes's own.\n\n## Hermes on [PRIVATE_HOST] / Team tab (2026-11-06)\n- Hermes v0.23.0 lives on [PRIVATE_HOST] at `~/.hermes` (`~/.local/bin/hermes`). Installer needs `UV_CACHE_DIR=$HOME/Hermes/scratch/uv-cache` because [PRIVATE_HOST]'s env sets it to a dead `/mnt/d/cache/uv` (I/O error); install takes ~25 min under load (run it detached with setsid nohup and poll its output file; ffmpeg/node/chromium stages look stuck but aren't). Probe `hermes chat` on [PRIVATE_HOST] detached too — a foreground call outlives the tool timeout. Codex login: `hermes auth add openai-codex --type oauth --no-browser` + preview-pane device-code steps. Claude login: `hermes auth add anthropic --type oauth --no-browser` prints a claude.ai URL, then waits for the code on stdin; the code is bound (PKCE) to that one live process, so a code from an earlier or killed attempt is useless — never kill that process (or its stdin holder) before the code arrives. The preview pane is usually NOT signed in to claude.ai (and never type credentials), so hand this one to the user: they run the command in their own [PRIVATE_HOST] terminal and paste the code at the prompt. Hermes also reads Claude Code's OAuth file and honours `CLAUDE_CONFIG_DIR` (idea: point it at `~/.claude-perso`), but this was not verified — [PRIVATE_HOST]'s memory pressure made `hermes chat` die with \"Gateway starting: deadline\".\n- The Team tab reads `agents/registry.json` (`agents.<id>`); a `hermes` entry was added (engines claude2+codex, `claude2Model`, `codexModel`, charter `agents/hermes/AGENT.md`); backup `registry.json.bak-hermes`. Dropdowns already list every Claude + Codex model. The dashboard (:3999) is often down in an OOM loop; the registry edit shows when it is back.\n- **Editing the Team tab's dashboard app itself** (BRIMIND control dashboard, Next.js, `[PRIVATE_HOST]:[PATH]`, port 3999, systemd **user** unit `brimind-dashboard.service`): `grep -rl <feature-text> dashboard --include=*.jsx --include=*.js --exclude-dir=node_modules --exclude-dir=.next` finds the component fast (e.g. `components/TeamPanel.jsx` for every per-agent engine row, `lib/<engine>.js` for its status/model logic, `app/api/team/<name>/route.js` for the save endpoint). Pull each file with `scp [PRIVATE_HOST]:<path> <mac-scratch>/`, edit with `patch` locally, `scp` back, then on [PRIVATE_HOST]: `cd dashboard && NODE_ENV=production npm run build` (watch for real compile errors vs the pre-existing `mongodb`/`aws4` and `Critical dependency` warnings, which are harmless) and `systemctl --user restart brimind-dashboard.service`. The unit runs as the `brimind` user (not root) — use `systemctl --user`, not `sudo systemctl`. After restart give it 15–45 s: `ExecStart` itself does a `[ -f .next/BUILD_ID ] || npm run build` + `npm start`, so a restart commonly rebuilds and re-serves before `ss -ltnp | grep :3999` shows the new pid.\n- When a Team tab control writes a NEW field to `agents/registry.json` (a POST route like `app/api/team/model` or `app/api/team/<engine>-model`), that field must ALSO be added to the read side — `lib/team.js`'s `shown()` function explicitly whitelists every field `/api/team` returns (it does not spread the raw agent object). Adding only the POST-side write leaves the save working (verified in the registry file) while the dropdown always shows its default/\"follow\" state after a reload, because `/api/team` never echoes the new key back. Grep `lib/team.js` for the sibling field's name (e.g. `codexModel`) and mirror both occurrences (the `local` object and the `mirror`-merge return) whenever adding a new per-agent model/engine choice.\n- [PRIVATE_HOST]'s load average sits around 20–30 almost permanently (many agent/next-server processes); a dashboard `curl` right after a build/restart can time out at 15–60 s for reasons unrelated to your change. Before concluding a route is broken, retry once with a longer timeout (60–90 s) and re-check with `ss -ltnp | grep :3999` and `journalctl --user -u brimind-dashboard.service -n 20` for real errors — a clean \"Ready in Nms\" log plus an eventual 200 means the change is fine and the box was just busy.\n- **Artisto wall (`/artisto` on the dashboard, `lib/artisto.js` + `app/api/artisto/route.js`)**: each card's \"ours\" vs \"S3A member\" tag comes from `social/channels.json` — a channel posts as an S3A member only when its `account.browser` is set (his own logged-in browser names the account, per `social/lib/channels.mjs`'s own comment); a channel with no `browser` field posts with OUR account/email even when it serves an S3A client (e.g. the Quran-association Facebook page, where we're just Page admin) — that one stays \"ours\". The route reads `channels.json` once per request, maps `post.channel → src`, then tags each grouped creation `src: 'ours'|'s3a'` if ANY of its places came from a browser-tagged channel. Added 2026-11-16 (owner): filter buttons `tout/nous/S3A` next to the existing `tout/en ligne/brouillons` row, counts and state read from `?only=&src=` URL params (`useSearchParams`+`Suspense`), `srcCounts` in the API response.\n- Prefer a plain `ssh [PRIVATE_HOST] \"<command>\"` over `ssh [PRIVATE_HOST] 'bash -lic \"<command>\"'` for quick multi-step diagnostics (curl checks, python one-liners, `ps`/`ss` probes): the login-shell wrapper sources the full profile on every call, which adds real latency under [PRIVATE_HOST]'s usual load and also prints a harmless but noisy `cannot set terminal process group` / `no job control` warning on stderr. Reserve `bash -lic` for the one case it's actually needed — reaching a CLI that only exists on the interactive PATH (`~/.local/bin`, `~/.opencode/bin`).\n\n## References\n- `references/bulk-file-moves.md` — measuring Mac↔[PRIVATE_HOST] drive copy speed, bottleneck table (Wi-Fi/SMB vs USB 3), move = copy → checksum verify → delete → SMS, and what to do when the destination disk throws I/O errors. Template: `templates/move_verify_delete_sms.sh`.\n- `references/unitary-calendar.md` — missing appointments in Unitary :3999, confirmation-to-promise reconciliation, owner email reminder timer, exact ACK verification, and distinction from [PRIVATE_HOST] dashcl calendar.\n- `references/unitary-skill-scout.md` — vetting and installing an external skill/plugin/MCP package for a Unitary agent: health check, quarantine, malicious-code/prompt-injection scan, scoring rubric, install + link steps.\n- `references/hermes-chatgpt-login.md` — how Hermes was logged into ChatGPT/Codex through the preview pane (device-code form quirks).\n- `references/owner-preferences.md` — the owner's own rules found inside Unitary (reply format, how messages to prospects must look, SMS/channel/time rules, laws). Read before any send, post or client-facing text.\n- `references/unitary-tools.md` — Unitary repo: status command, services/ports, CLIs, launch scripts, and its house rules.\n- `references/unitary-code-changes.md` — editing Unitary from the Mac: pull/patch/hash-guarded push, remote TDD runs, baseline comparison of failing tests, what needs a restart to go live.\n- `references/unitary-cli-audit.md` — read-only token/CLI investigation, quick triage, RAM inventory (naming processes by app/port/owner unit, idle checks, who launches Chrome/Maps), CPU/GPU check, safe RAM freeing, stopping for good / wildcard run-on-demand, the existing RAM GC (reaper, ram-sweep, demand-sleep, ensure), swap, persistence after reboot.\n- `references/ai-endpoints-and-headless-clis.md` — AIF / AIHub / AI Fallback: routing spec (levels, custom model, who answered), headless + warm Codex / Claude stream-json / OpenCode flags, bwrap boxing, streaming, discussions (sessions), attachments, AIHub deploy + headless UI check, testing pitfalls, and the audit of which projects use which AI. Scripts: `scripts/find-ai-chats.sh` (projects with an AI chat), `scripts/[PRIVATE_HOST]-key-health.sh` (one tiny call per key, never prints keys).\n- `references/[PRIVATE_HOST]-dashboards.md` — `[PRIVATE_HOST]` (not [PRIVATE_HOST], [PRIVATE_HOST]): Caddy and the code/pm2 app behind any domain, wildcard DNS rules (what `*` really covers), on-demand TLS ask + [PRIVATE_HOST] tenant routing, tunnel-stall fix (public sites slow while [PRIVATE_HOST] is fast), safe Caddy edit recipe, \"no site broke\" check, Mac DNS-cache false negatives, stale-process restarts, dasha balance bug. Script: `scripts/vps_site_check.py` (every Caddy host + every [PRIVATE_HOST] tenant, prints only failures).\n- `references/[PRIVATE_HOST]-security-incidents.md` — hacked key / suspicious activity / backdoor digs on [PRIVATE_HOST]: topology ([PRIVATE_HOST] is \"the [PRIVATE_HOST]\", [PRIVATE_HOST] is reached through it), the box's existing `[PATH]`, this attacker's IOCs (hidden hex-ID dump dirs, boring-named exfil binaries), finding the entry vector via Caddyfile+proc, quarantine-don't-delete, rotate-everything-in-the-dump, and the terminal safety-gate behavior on broad/destructive sudo commands.\n- `references/botA-trading-bots.md` — gap.js bots on [PRIVATE_HOST]: per-account process layout, verifying sells/losses via exchange trade history, which sell paths skip the profit guard.\n- Before grepping/finding your way to an app's source on [PRIVATE_HOST] or [PRIVATE_HOST], check the bullets at the end of this file and `references/[PRIVATE_HOST]-dashboards.md`/`references/multisite-and-ncs.md`/`references/tazmall-deploy.md`/`references/ai-endpoints-and-headless-clis.md` first — most domains and apps on this stack are already inventoried (domain, port, dir, pm2 vs bare-process) and re-discovering one from scratch (dig, Caddyfile grep, /proc/<pid>/cwd) costs several extra round-trips for nothing. In particular, almost everything under `api.brimind.pro` / `*.brimind.pro` user-facing product surface (chat, admin panel, membership/tier, users) is the pm2 app `AIserver` at `[PRIVATE_HOST]:[PATH]` — not anywhere under [PRIVATE_HOST]'s `~/unitary`. Don't blind `grep -r` across [PRIVATE_HOST]'s home tree for a brimind.pro feature; it both times out on the big dirs (videos, node_modules, worktrees, BRIMIND workspaces) and is looking on the wrong machine. The S3A **web chat UI** (`ai.brimind.pro/s3a`, \"BRIMIND Chat\" with the member's assistant) is NOT on [PRIVATE_HOST]: it is the React page `[PRIVATE_HOST]:[PATH]` (scroll, thread, composer, message rendering), deploy recipe \"AIchat React front\" in `references/[PRIVATE_HOST]-dashboards.md`. The S3A runtime/back-end (DM/WhatsApp/Labes turns, MCP, no web UI) is on [PRIVATE_HOST] at `~/unitary/s3a`, with member data (including the assistant's own persona/name) in `~/BRIMIND/workspaces/<email>/` — see skill `s3a-projects` for that layout and the exact persona.json path before grepping for a member-specific string that is actually just a folder name, not text in the codebase.\n- BriMind Dashboard (Projets/Clients/Calendrier) = Next.js app `dashcl` on [PRIVATE_HOST] :3068, domain projects.nextmindev.com (Caddy), dir `[PATH]` (root-owned, `sudo -n`), a real git clone of `github.com/brimind/Dashboard-services` and now pm2-managed (name `dashcl`, runs `npm run prod` = build && start) — deploy via git, not scp; full recipe (incl. the orphaned-port fix) in `references/[PRIVATE_HOST]-dashboards.md`. Mongo `calendar` collection (id,title,type,date ISO,projectId,description,ownerEmail). Cron job \"BriMind calendar call reminder\" (id c7a7c95a5bff, every 5m, no_agent) runs `~/.hermes/scripts/calendar_reminder.py` (source: `[PATH]`), which ssh's [PRIVATE_HOST] to run `[PATH] <winMin>` (must use node v20.19.5 binary, not default v18 — v18's mongodb driver fails on `crypto.getRandomValues`) to find events starting within 6 min, mark them `notifiedHermes:true` (dedupe), then email via [PRIVATE_HOST] mailflow (`[PRIVATE_HOST]/api/send`, from [EMAIL], mode prod) to the event's ownerEmail (fallback [EMAIL]). Verified live 2026-10-26.\n- `references/multisite-and-ncs.md` — the one client-sites app (:4030, one process for all sites and templates): theme ids (classic/js-auto, dark + `-clair` premium voices), NCS single-form + edit-after-launch flows, Google Maps photos via the logged-in rail Chrome, on-the-fly image compression (`lib/img.mjs`), whole-app side build/swap/restart + markup diff, host rewrites (never middleware), pay-invoicer rebuild, screenshots (lazy images need a scroll).\n- `references/app-whatsapp-lines.md` — WhatsApp from a web app to its customers: Cloud line vs shop-owned QR line, the persistent QR line unit + tunnel forward + admin QR page recipe, guards (excluded market, declared inbound, queued-while-unpaired), side-build/test-port deploy on [PRIVATE_HOST].\n- TakWear (`takwear.defight.space`, also `defight.space` :6009 / `demo.` :6008 / `chilizt.` :3020 in the same Caddy block) = [PRIVATE_HOST] `[PATH]`, pm2 `takwear`, :3019, branch `main`, script `npm run prod` (restart = rebuild). Same GitHub repo as TazMall (Amir-Ecommerce-Sport-2k) but an older separate checkout; Mac copies are stale. Its WhatsApp line: [PRIVATE_HOST] `brimind-takwear-wa.service` :4490 (tunnel forward `takwear-wa`).\n- `references/tazmall-deploy.md` — TazMall live tenant on [PRIVATE_HOST] :3023: commit only own paths, side build + side-port proof, swap/rollback, bot-UA and pkill pitfalls, wishlist alert rail.\n- `references/suno-audio-capture-path.md` — Suno/browser audio capture on [PRIVATE_HOST]: rail :9223/:9226 barred, run the Hermes browser on the [PRIVATE_HOST], sink check, cookie locations.\n- `references/brimind-identity.md` — BRIMIND company/logo/product facts for pitches, proposals and official applications; what legal/contact data is missing and must be asked for, never invented.\n- `references/policeman-product.md` — Policeman (`police/`, the sellable AI traffic guard, Go + SwiftUI): what it does and does not cover, test order with a live fake-leak probe, adding detection rules with a real-corpus false-positive check, store editions.\n- Labes!/S3A jobs (list S3A groups, member records, add a participant, per-viewer group alias, group history, guarded group send) are MCP tools: server `[PRIVATE_HOST]:~/unitary/s3a/mcp/server.mjs` (README there; registered as `labes-s3a` in `~/unitary/.mcp.json` + `~/.codex/config.toml`). Call it before reading code. Labes groups are Labes-native (Mongo `owner_labes.chats`), not WhatsApp; per-viewer names live in `chat_aliases` and are applied in `chatSummary` only (`name` = viewer's alias, `title` = real title). Probe with `node [PATH] s3a/mcp/server.mjs <tool> '<json>'` (run from `~/unitary` over ssh). **\"All S3A groups/members\" means every S3A member conversation, not only Labes groups**: start with `list_members` (`via` = labes / wa / whatsapp / beta, `groupTitle`, `labesGroup`), because most members talk to S3A in Labes private chats or in WhatsApp groups, and a Labes-groups-only answer misses most of them. Show the owner a table by source before building. Owner's oversight wish: an owner-only, collapsible \"S3A\" section pinned at the top of HIS Labes list, with every member chat (WhatsApp groups mirrored in), each named `S3A <first name>` for him only. Members' titles and lists stay unchanged, and the gate is enforced server-side. Hermes output masks phones (`+216****0749`), so scripts must use the full numbers from the data, never what the terminal showed.\n- **That owner S3A section is built (2026-11-16).** Backend: `~/labes/lib/owner-s3a.mjs`, which rebuilds the rows on each call from S3A's member stores, the Labes DB, the WA history files and the Telegram transcripts. WA groups are virtual read-only rows and are never Labes chats. UI: `components/OwnerS3a.js`. The socket events `owner:s3a:{inbox,read,seen,send}` return `forbidden` to anyone who is not `LABES_OWNER_PHONE`. The read-only bot API is `/bot/owner-s3a/{inbox,read}`, and the matching MCP tools are `owner_s3a_inbox` / `owner_s3a_read`. Neither has a send: a reply leaves only when the owner presses send. His sends carry a `desk` mark, and S3A ignores them unless the text starts with « S3A ». On the Labes side they are not pushed. On the WA side they go into the `~/BRIMIND/s3a/owner-desk-sent.json` ledger, which `s3a/lib/wa.mjs` `deskSent` checks.\n  To check whether the \"S3A\" folder/count the owner sees in his Labes sidebar is up to date: call `owner_s3a_inbox` (or `curl -H \"x-bot-key: $(cat ~/.local/share/labes/bot-key)\" http://[PRIVATE_HOST]/bot/owner-s3a/inbox` if the MCP tool is unreachable) — it rebuilds the rows live on every call, so a mismatch with the UI means a stale browser tab, not stale data; a match means the list is already current. The row COUNT can still be inflated by non-member noise, so classify each row before reporting \"up to date\": run `node agents/tools/client.mjs brief <phone> --json` per phone — `internal:true` flags one of BRIMIND's own lines, a phone equal to the owner's own number is him talking to himself, and a row with `lastAt: null` is a thread that was created but never got a single message (a ghost row) — none of those three are real members even though they count toward the total. The same real member legitimately gets two rows (one per channel, `wa-*` and `lb-*`/Labes) during the WhatsApp→Labes migration window; that is a channel mirror, not a duplicate bug. Front-end deploy: run a side build with `[PATH]`, which rsyncs to `[PATH]` and runs `next build`, then swap `.next` and restart `labes.service`. Tests: `node --test test/*.test.mjs`, `node scripts/bot-check.mjs`, and `node scripts/e2e-owner-s3a.mjs` (puppeteer, :4046, test numbers). Docs: `docs/api.md` and the `s3a/mcp/README.md`.\n- Labes! (the messaging app, `labes.offer.brimind.pro` / `labes.bromind.pro`) is its own repo at `[PRIVATE_HOST]:[PATH]` — NOT inside `~/unitary`, so its paths aren't in `unitary-code-changes.md`. Next.js + Socket.IO, systemd user unit `labes.service` (`PORT=4040`, `systemctl --user restart labes.service`). Single/few-file edits: `scp` the file down to a Mac scratch dir, edit there with the `patch` tool (the patch tool only edits local files), `scp` it back, `npm run build` on [PRIVATE_HOST], then `systemctl --user restart labes.service` and re-check the live page/socket. Front-end logic is in `components/Sidebar.js` (chat list, people search, group picker), server/socket handlers in `server.mjs` (`users:search` etc.), phone helpers in `lib/phone.mjs`. Privacy pitfall: any feature that searches users by name or partial digits must never render another user's phone/PII in the result row for a partial match — only reveal it once the typed query normalizes to that exact value (e.g. `normPhone(q) === u.phone`); a fuzzy/substring match is a common place for this kind of PII leak to slip in, so grep for every place a raw contact field is rendered next to a fuzzy-matched list before shipping a search feature.\n","linked_files":["references/[PRIVATE_HOST]-dashboards.md","references/[PRIVATE_HOST]-security-incidents.md","references/ai-endpoints-and-headless-clis.md","references/app-whatsapp-lines.md","references/botA-trading-bots.md","references/brimind-identity.md","references/bulk-file-moves.md","references/hermes-chatgpt-login.md","references/multisite-and-ncs.md","references/owner-preferences.md","references/policeman-product.md","references/suno-audio-capture-path.md","references/tazmall-deploy.md","references/unitary-calendar.md","references/unitary-cli-audit.md","references/unitary-code-changes.md","references/unitary-skill-scout.md","references/unitary-tools.md","scripts/[PRIVATE_HOST]-key-health.sh","scripts/aihub-site.py","scripts/find-ai-chats.sh","scripts/pack_unitary_skills.py","scripts/vps_site_check.py","templates/move_verify_delete_sms.sh"],"origin":"brimind","owner_id":null,"source":"router"}