diff --git a/README.md b/README.md index df185b3..ea17f11 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,9 @@ python remote.py exec "Moritz PC" whoami ```bash python remote.py sessions # list sessions python remote.py screenshot # capture screenshot → /tmp/helios-remote-screenshot.png -python remote.py exec # run shell command +python remote.py exec # run shell command (PowerShell, no wrapper needed) +python remote.py exec --timeout 600 # with custom timeout (seconds, default: 30) +python remote.py prompt "Please click Save, then OK" # ask user to do something manually python remote.py click # mouse click python remote.py type # keyboard input python remote.py windows # list windows diff --git a/skills/SKILL.md b/skills/SKILL.md index ef76965..26f9e5b 100644 --- a/skills/SKILL.md +++ b/skills/SKILL.md @@ -8,99 +8,81 @@ Wenn Moritz sagt, dass ich etwas auf einem verbundenen PC tun soll: - "Mach auf meinem PC..." - "Schau mal was auf dem Rechner läuft..." - "Nimm einen Screenshot von..." -- "Klick auf..." +- "Klick auf X, tippe Y..." - Allgemein: Remote-Zugriff auf einen PC der gerade online ist ## Setup - **Script:** `skills/helios-remote/remote.py` - **Config:** `skills/helios-remote/config.env` (URL + API-Key, nicht ändern) -- **Abhängigkeit:** `pip install requests` (falls fehlt) +- `SKILL_DIR=/home/moritz/.openclaw/workspace/skills/helios-remote` -## Label-Routing +## Wichtige Regeln -`session_id` kann ein UUID oder ein Label-Name sein. Falls kein UUID, wird der Name in der Session-Liste nachgeschlagen: - -```bash -python $SKILL_DIR/remote.py screenshot "Moritz PC" # sucht nach Label -``` +- **Vor destruktiven Aktionen** (Wallpaper, Registry, Systemeinstellungen, Dateien löschen) immer erst den aktuellen Zustand lesen und merken! +- Wallpaper auslesen: `(Get-ItemProperty 'HKCU:\Control Panel\Desktop').WallPaper` +- **Label-Routing:** `session_id` kann UUID oder Label-Name sein → einfach `"Moritz PC"` verwenden ## Befehle ```bash -# Skill-Verzeichnis SKILL_DIR=/home/moritz/.openclaw/workspace/skills/helios-remote -# Alle verbundenen Sessions anzeigen +# Sessions python $SKILL_DIR/remote.py sessions +python $SKILL_DIR/remote.py server-version +python $SKILL_DIR/remote.py version "Moritz PC" -# Session benennen -python $SKILL_DIR/remote.py label "Moritz-Laptop" +# Screenshot → /tmp/helios-remote-screenshot.png +python $SKILL_DIR/remote.py screenshot "Moritz PC" -# Screenshot machen → /tmp/helios-remote-screenshot.png -python $SKILL_DIR/remote.py screenshot +# Shell-Befehl (PowerShell, kein wrapper nötig) +python $SKILL_DIR/remote.py exec "Moritz PC" "Get-Process" +python $SKILL_DIR/remote.py exec "Moritz PC" "hostname" +# Mit längerer Timeout für Downloads etc. (default: 30s) +python $SKILL_DIR/remote.py exec "Moritz PC" --timeout 600 "Invoke-WebRequest -Uri https://... -OutFile C:\file.zip" -# Shell-Befehl ausführen -python $SKILL_DIR/remote.py exec whoami -python $SKILL_DIR/remote.py exec ls -la ~/Desktop +# Mausklick / Text tippen +python $SKILL_DIR/remote.py click "Moritz PC" 960 540 +python $SKILL_DIR/remote.py type "Moritz PC" "Hello World" -# Mausklick senden -python $SKILL_DIR/remote.py click 960 540 - -# Text tippen -python $SKILL_DIR/remote.py type "Hello World" - -# Fenster auflisten -python $SKILL_DIR/remote.py windows - -# Fenster nach Titel suchen (case-insensitive substring) -python $SKILL_DIR/remote.py find-window "chrome" - -# Alle Fenster minimieren -python $SKILL_DIR/remote.py minimize-all - -# Fenster fokussieren / maximieren -python $SKILL_DIR/remote.py focus -python $SKILL_DIR/remote.py maximize +# Fenster (nur sichtbare werden angezeigt) +python $SKILL_DIR/remote.py windows "Moritz PC" +python $SKILL_DIR/remote.py find-window "Moritz PC" "chrome" +python $SKILL_DIR/remote.py focus "Moritz PC" +python $SKILL_DIR/remote.py maximize "Moritz PC" +python $SKILL_DIR/remote.py minimize-all "Moritz PC" # Programm starten (fire-and-forget) -python $SKILL_DIR/remote.py run notepad.exe -python $SKILL_DIR/remote.py run "C:\Program Files\app.exe" --arg1 +python $SKILL_DIR/remote.py run "Moritz PC" notepad.exe -# Clipboard lesen / setzen -python $SKILL_DIR/remote.py clipboard-get -python $SKILL_DIR/remote.py clipboard-set "Text in die Zwischenablage" +# User um etwas bitten (zeigt MessageBox, blockiert bis OK) +python $SKILL_DIR/remote.py prompt "Moritz PC" "Bitte klicke auf Speichern, dann OK" +python $SKILL_DIR/remote.py prompt "Moritz PC" "UAC-Dialog erscheint gleich - bitte bestätigen" --title "Aktion erforderlich" -# Datei hoch-/runterladen -python $SKILL_DIR/remote.py upload /tmp/local.txt "C:\Users\User\Desktop\remote.txt" -python $SKILL_DIR/remote.py download "C:\Users\User\file.txt" /tmp/downloaded.txt +# Clipboard +python $SKILL_DIR/remote.py clipboard-get "Moritz PC" +python $SKILL_DIR/remote.py clipboard-set "Moritz PC" "Text in Zwischenablage" + +# Dateien hoch-/runterladen +python $SKILL_DIR/remote.py upload "Moritz PC" /tmp/local.txt "C:\Users\Moritz\Desktop\remote.txt" +python $SKILL_DIR/remote.py download "Moritz PC" "C:\Users\Moritz\file.txt" /tmp/downloaded.txt + +# Label setzen +python $SKILL_DIR/remote.py label "Moritz PC" "Neues Label" ``` -## Beispiel-Workflow +## Typischer Workflow: UI-Aufgabe -1. Sessions abfragen um die Session-ID zu finden: - ```bash - python $SKILL_DIR/remote.py sessions - ``` - → Ausgabe z.B.: `a1b2c3d4-... [Moritz-Laptop] (Windows 11)` +1. `screenshot` → Bildschirm anschauen +2. `find-window` → Fenster-ID holen +3. `focus` → Fenster in den Vordergrund +4. `exec` / `click` / `type` → Aktion ausführen +5. `screenshot` → Ergebnis prüfen -2. Screenshot machen und anzeigen: - ```bash - python $SKILL_DIR/remote.py screenshot a1b2c3d4-... - # → /tmp/helios-remote-screenshot.png - ``` - Dann mit `Read` tool oder als Bild an Moritz senden. +## Wenn etwas geklickt werden muss das ich nicht finde -3. Etwas ausführen: - ```bash - python $SKILL_DIR/remote.py exec a1b2c3d4-... tasklist - ``` - -## Fehlerbehandlung - -Das Script gibt bei Fehlern immer aus: -- HTTP-Status + Reason -- Vollständige URL -- Response Body - -Keine unklaren Fehlermeldungen - alles ist beschreibend. +```bash +python $SKILL_DIR/remote.py prompt "Moritz PC" "Bitte klicke auf [X], dann drücke OK" +``` +→ Warte auf ACK, dann weitermachen.