--- description: Check for Operator/LAN access before running operator scripts; then run or recommend accordingly alwaysApply: false globs: - "scripts/run-all-operator-tasks-from-lan.sh" - "scripts/run-operator-tasks-from-lan.sh" - "docs/00-meta/OPERATOR*.md" - "docs/00-meta/STEPS_FROM_PROXMOX*.md" --- # Operator/LAN access check When the user asks to run **operator tasks**, **LAN tasks**, or scripts that require 192.168.11.x (NPMplus, Chain 138 RPC, Blockscout, Proxmox), **check for Operator/LAN access first**, then run or recommend accordingly. ## 1. Check (before running operator scripts) Run from **repo root**: ```bash # RPC reachable? curl -s -o /dev/null -w "%{http_code}" --connect-timeout 3 http://192.168.11.211:8545 # Env files present (operator scripts load these automatically) test -f .env && test -f smom-dbis-138/.env && echo "env OK" || echo "env missing" ``` - **RPC 200/201 or 400** and **env OK** → treat as **Operator/LAN available**; operator scripts can be run. - **Timeout / unreachable** or **env missing** → treat as **no Operator/LAN**; do not run `run-all-operator-tasks-from-lan.sh`; suggest `./scripts/run-completable-tasks-from-anywhere.sh` and note that operator tasks require a host on 192.168.11.x with `.env` and optional `NPM_PASSWORD` (see OPERATOR_CREDENTIALS_CHECKLIST). ## 2. When access is available - Run operator scripts from repo root. They **load dotenv automatically** via `scripts/lib/load-project-env.sh` (no need to `source .env`). - **Primary:** `./scripts/run-all-operator-tasks-from-lan.sh` (use `--skip-backup` if `NPM_PASSWORD` not set; add `--deploy` or `--create-vms` if needed). - **Completable first (optional):** `./scripts/run-completable-tasks-from-anywhere.sh` then operator script. ## 3. When access is not available - Suggest: `./scripts/run-completable-tasks-from-anywhere.sh` (config validation, on-chain check, reconcile output). - Tell the user that NPMplus backup, Blockscout verify, RPC proxy updates, and deploy require a host on **LAN (192.168.11.x)** with root `.env` and `smom-dbis-138/.env`; see **docs/00-meta/OPERATOR_CREDENTIALS_CHECKLIST.md** and **OPERATOR_READY_CHECKLIST.md**. ## 4. References - **Operator context (always):** `.cursor/rules/operator-context-lan-proxmox.mdc` — this machine is assumed LAN/operator when that rule applies. - **Credentials:** `docs/00-meta/OPERATOR_CREDENTIALS_CHECKLIST.md` — per-task LAN, PRIVATE_KEY, NPM_PASSWORD, RPC_URL_138. - **Commands:** `docs/00-meta/OPERATOR_READY_CHECKLIST.md` — copy-paste operator commands.