Sync agent state from VPS at 2026-05-19 12:08:19
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
# G2 Runbook - Gateway/Node Pairing Preparation
|
||||
# G2 Runbook - Gateway/Node Pairing Pre-Execution Plan
|
||||
|
||||
## Status
|
||||
|
||||
Draft for user authorization. G2 execution is not open yet.
|
||||
Pre-execution plan confirmed. G2 execution is not authorized and must not start from this document alone.
|
||||
|
||||
This runbook is an execution-before-action checklist. It may be used only after the user explicitly authorizes G2. It does not authorize token injection, `openclaw node run`, VPS approval, service changes, Nginx changes, Docker changes, or any mutation by itself.
|
||||
This runbook is a planning and authorization checklist. It may be used only after the user explicitly authorizes G2 execution in a later instruction. It does not authorize token injection, `openclaw node run`, VPS approval, service changes, Nginx changes, Docker changes, or any mutation by itself.
|
||||
|
||||
## Non-Execution Confirmation
|
||||
|
||||
This planning pass must update only documentation and task files.
|
||||
|
||||
Forbidden in this planning pass:
|
||||
|
||||
- Do not execute any PC command.
|
||||
- Do not execute any VPS command.
|
||||
- Do not start a PC node.
|
||||
- Do not approve a node or device.
|
||||
- Do not read, print, store, or rotate secrets.
|
||||
- Do not change Gateway, Docker, Nginx, service, firewall, route, bind mount, image, or public website state.
|
||||
|
||||
## Sources Reviewed
|
||||
|
||||
@@ -18,6 +31,9 @@ This runbook is an execution-before-action checklist. It may be used only after
|
||||
- `sync-state/heartbeat-pc.json`
|
||||
- `sync-state/heartbeat-vps.json`
|
||||
- `sync-state/README.md`
|
||||
- `tasks/T9-G2-PC-node-run.md`
|
||||
- `tasks/T10-G2-VPS-pairing-approve.md`
|
||||
- Role handoffs for PC_EXECUTOR, VPS_EXECUTOR, PC_VERIFIER, VPS_VERIFIER, and CORRECTION
|
||||
|
||||
## G2 Goal
|
||||
|
||||
@@ -32,10 +48,11 @@ G2 does not install a persistent service. G4 covers persistence later.
|
||||
## Current Baseline
|
||||
|
||||
- G0A, G0B, and G1 are complete in `AGENT_BOARD.md`.
|
||||
- Sync-health has been confirmed healthy by the user and T7 sync-health blocked state is cleared.
|
||||
- PC baseline shows OpenClaw CLI `OpenClaw 2026.5.7 (eeef486)`, `openclaw node --help` availability, Tailscale availability, outbound TCP 443 success to `openclaw.smartmotor.cloud`, and no PC OpenClaw public port exposure.
|
||||
- VPS baseline shows `openclaw-gateway` running healthy in Docker on `services_appnet`, with Gateway CLI available inside the `openclaw-gateway` container.
|
||||
- VPS verifier accepted G1 with follow-up observations about `/opt/service` versus `/opt/services`, `docker-composite.yml` versus `docker-compose.openclaw.yml`, and the Nginx route/config anomaly.
|
||||
- Sync-state files exist for PC and VPS. PC heartbeat currently reports `dirty`; this is expected while control-plane documents are being edited, but CORRECTION must re-check sync health before any G2 execution.
|
||||
- Before actual G2 execution, CORRECTION must still do a final freshness check: both heartbeat files must exist, both must be under 5 minutes old, and no `sync-state/error-*.md` may exist.
|
||||
|
||||
## Actions Requiring Explicit User Authorization
|
||||
|
||||
@@ -45,11 +62,19 @@ These actions must not be performed unless the user explicitly authorizes G2 exe
|
||||
- Running `openclaw node run`.
|
||||
- Reading or using any real token, password, API key, private key, cookie, or secret value.
|
||||
- Approving a device pairing request on the VPS.
|
||||
- Running `openclaw nodes pending` or `openclaw nodes approve` if it changes approval state.
|
||||
- Running Gateway-side pairing commands against live state, including `openclaw devices approve`, `openclaw nodes pending`, or `openclaw nodes approve`.
|
||||
- Starting G3 smoke test from QQ or phone Control UI.
|
||||
- Installing, starting, restarting, stopping, or persisting any PC/VPS service.
|
||||
- Changing firewall, network, Nginx, Docker compose, bind mounts, container images, environment variables, or service state.
|
||||
|
||||
Authorization must be explicit at these points:
|
||||
|
||||
- A0: User authorizes G2 execution to begin.
|
||||
- A1: User authorizes local PC session token use.
|
||||
- A2: User authorizes foreground PC node run.
|
||||
- A3: User authorizes VPS-side approval for a specific non-secret request or node ID.
|
||||
- A4: Verifiers authorize marking G2 evidence accepted. Executors must not self-accept.
|
||||
|
||||
## Secret Handling Rules
|
||||
|
||||
- Never write token/password/API key/private key/cookie values into files, evidence, logs, commits, or chat.
|
||||
@@ -58,6 +83,7 @@ These actions must not be performed unless the user explicitly authorizes G2 exe
|
||||
- Evidence may say that a token was set locally, but must not include its value.
|
||||
- Pairing request IDs may be recorded only if they are not secrets.
|
||||
- If a command prints a secret or prompts to display one, stop and record a blocker without copying the value.
|
||||
- If a command requires a token/password flag, do not place the value in the command line. Prefer local session environment or interactive user entry that is not captured in evidence.
|
||||
|
||||
## smartmotor.cloud Freeze Rules
|
||||
|
||||
@@ -81,7 +107,7 @@ Scope: Windows PC only.
|
||||
|
||||
Planned G2 task:
|
||||
|
||||
- Confirm no stale OpenClaw node process is running.
|
||||
- Confirm no stale OpenClaw node process is running only after G2 execution is authorized.
|
||||
- After explicit user authorization, set the Gateway token only in the local shell/session.
|
||||
- Run the node in foreground mode.
|
||||
- Capture non-secret evidence of connection and pairing request ID if shown.
|
||||
@@ -93,13 +119,34 @@ May write:
|
||||
- `handoff/PC_EXECUTOR.md`
|
||||
- `rollback/pc-g2-node-run-YYYYMMDD.md`
|
||||
|
||||
Command drafts, not for this planning pass:
|
||||
|
||||
```powershell
|
||||
$env:OPENCLAW_GATEWAY_TOKEN = "<user-pastes-token-locally>"
|
||||
openclaw node run --host openclaw.smartmotor.cloud --port 443 --tls --display-name "desktop-vuor0gs"
|
||||
```
|
||||
|
||||
PC_EXECUTOR authorization points:
|
||||
|
||||
- A0 before any G2 work.
|
||||
- A1 before token use.
|
||||
- A2 before `openclaw node run`.
|
||||
|
||||
PC_EXECUTOR stop conditions:
|
||||
|
||||
- User authorization is absent or ambiguous.
|
||||
- Token would be printed, stored, logged, committed, or pasted into chat.
|
||||
- Command asks to install, start, restart, stop, or persist a service.
|
||||
- Command attempts firewall, network, scheduled task, environment persistence, or public port changes.
|
||||
- Gateway host, display name, or command shape differs from the runbook without ORCHESTRATOR review.
|
||||
|
||||
### VPS_EXECUTOR
|
||||
|
||||
Scope: VPS Gateway approval only.
|
||||
|
||||
Planned G2 task:
|
||||
|
||||
- Confirm Gateway-side CLI command shape using `--help` if needed.
|
||||
- Confirm Gateway-side CLI command shape using `--help` if needed, only after G2 execution is authorized.
|
||||
- After explicit user authorization and after PC evidence provides a pairing request ID or pending node ID, approve the correct request.
|
||||
- Capture non-secret approval evidence.
|
||||
- Do not restart/reload services or change Gateway/Nginx/Docker configuration.
|
||||
@@ -110,6 +157,25 @@ May write:
|
||||
- `handoff/VPS_EXECUTOR.md`
|
||||
- `rollback/vps-g2-approve-YYYYMMDD.md`
|
||||
|
||||
Command drafts, not for this planning pass:
|
||||
|
||||
```bash
|
||||
docker exec openclaw-gateway node openclaw.mjs nodes pending
|
||||
docker exec openclaw-gateway node openclaw.mjs devices approve <requestId>
|
||||
docker exec openclaw-gateway node openclaw.mjs nodes approve <nodeId>
|
||||
```
|
||||
|
||||
VPS_EXECUTOR authorization points:
|
||||
|
||||
- A0 before any G2 work.
|
||||
- A3 before approving a specific request or node ID.
|
||||
|
||||
VPS_EXECUTOR stop conditions:
|
||||
|
||||
- Request identity is ambiguous or multiple indistinguishable pending requests exist.
|
||||
- Approval would require token/password entry, token rotation, Gateway config mutation, restart, reload, Nginx edit, Docker edit, bind mount change, image change, or public website change.
|
||||
- Approval target cannot be tied to PC evidence and display name.
|
||||
|
||||
### PC_VERIFIER
|
||||
|
||||
Scope: Independent validation of PC-side G2 evidence.
|
||||
@@ -126,6 +192,18 @@ May write:
|
||||
- `evidence/verify-pc-g2-YYYYMMDD.md`
|
||||
- `handoff/PC_VERIFIER.md`
|
||||
|
||||
Verification draft:
|
||||
|
||||
```text
|
||||
Review PC evidence only. Do not run PC commands unless a later user instruction explicitly authorizes verifier-side read-only checks.
|
||||
```
|
||||
|
||||
PC_VERIFIER stop conditions:
|
||||
|
||||
- PC evidence is missing, incomplete, or not synchronized.
|
||||
- Evidence contains a secret.
|
||||
- Evidence suggests service persistence, firewall/network change, public port exposure, or a command outside the runbook.
|
||||
|
||||
### VPS_VERIFIER
|
||||
|
||||
Scope: Independent validation of VPS-side G2 evidence and freeze compliance.
|
||||
@@ -142,6 +220,19 @@ May write:
|
||||
- `evidence/verify-vps-g2-YYYYMMDD.md`
|
||||
- `handoff/VPS_VERIFIER.md`
|
||||
|
||||
Verification draft:
|
||||
|
||||
```text
|
||||
Review VPS evidence only. Do not run VPS commands unless a later user instruction explicitly authorizes verifier-side read-only checks.
|
||||
```
|
||||
|
||||
VPS_VERIFIER stop conditions:
|
||||
|
||||
- VPS evidence is missing, incomplete, or not synchronized.
|
||||
- Evidence contains a secret.
|
||||
- Approval cannot be tied to the intended PC node.
|
||||
- Evidence suggests restart, reload, token rotation, Gateway config mutation, Nginx edit, Docker edit, bind mount change, image change, or frozen website output change.
|
||||
|
||||
### CORRECTION
|
||||
|
||||
Scope: Guardrails and drift detection.
|
||||
@@ -158,6 +249,21 @@ May write:
|
||||
- `handoff/CORRECTION.md`
|
||||
- `tasks/T7-correction-monitor.md`
|
||||
|
||||
Monitoring draft:
|
||||
|
||||
```text
|
||||
Review sync-state files and task/evidence visibility only. Do not execute PC/VPS operational commands in this planning pass.
|
||||
```
|
||||
|
||||
CORRECTION stop conditions:
|
||||
|
||||
- Either heartbeat is missing or older than 5 minutes.
|
||||
- Any `sync-state/error-*.md` file exists.
|
||||
- Either side has a persistent Git state that prevents evidence visibility.
|
||||
- Any role attempts to execute G2 without explicit authorization.
|
||||
- Any evidence or handoff contains a secret.
|
||||
- Any task attempts to bypass the filing freeze.
|
||||
|
||||
## Step Plan
|
||||
|
||||
### Step 0 - ORCHESTRATOR Authorization Check
|
||||
@@ -299,9 +405,9 @@ Prerequisites:
|
||||
Command drafts:
|
||||
|
||||
```bash
|
||||
docker exec -it openclaw-gateway node openclaw.mjs devices approve <requestId>
|
||||
docker exec -it openclaw-gateway node openclaw.mjs nodes pending
|
||||
docker exec -it openclaw-gateway node openclaw.mjs nodes approve <nodeId>
|
||||
docker exec openclaw-gateway node openclaw.mjs nodes pending
|
||||
docker exec openclaw-gateway node openclaw.mjs devices approve <requestId>
|
||||
docker exec openclaw-gateway node openclaw.mjs nodes approve <nodeId>
|
||||
```
|
||||
|
||||
Expected output:
|
||||
@@ -390,3 +496,7 @@ Verifier evidence should include:
|
||||
Yes, but only as a request for explicit user authorization, not as execution.
|
||||
|
||||
The baseline evidence is sufficient to ask the user whether to open G2. The next user-facing question should be: "Authorize G2 execution now?" If the user says yes, ORCHESTRATOR must first open the draft tasks, require rollback notes, and keep each token/run/approval action behind the explicit authorization boundaries in this runbook.
|
||||
|
||||
## Planning-Pass Completion
|
||||
|
||||
This runbook update is documentation-only. It confirms G2 is ready for an authorization decision, but G2 remains unexecuted until a later explicit user instruction opens execution.
|
||||
|
||||
Reference in New Issue
Block a user