|
| 1 | +# Demo Recorder |
| 2 | + |
| 3 | +openclaWP can now generate a demo recording plan from inside WordPress and hand |
| 4 | +that plan to a local recorder service. The browser/video/audio work stays |
| 5 | +outside WordPress, which keeps Atomic installs safe. |
| 6 | + |
| 7 | +## What It Demonstrates |
| 8 | + |
| 9 | +- An existing WordPress site becomes the starting point. |
| 10 | +- openclaWP audits the site for agency automation opportunities. |
| 11 | +- The Agency page generates a client-specific automation package. |
| 12 | +- The Chat page proves live tool calling against WordPress. |
| 13 | +- The generated plan includes captions and a voice-over script. |
| 14 | +- A local Playwright recorder can synthesize voice-over with the macOS `say` |
| 15 | + command and mux it with `ffmpeg` when available. |
| 16 | + |
| 17 | +## Abilities |
| 18 | + |
| 19 | +- `openclawp/create-demo-recording-plan` |
| 20 | + - Builds the storyboard, browser steps, captions, narration, viewport, and |
| 21 | + output naming. |
| 22 | +- `openclawp/record-demo-video` |
| 23 | + - Sends a plan to a recorder endpoint such as |
| 24 | + `http://127.0.0.1:8765/record`. |
| 25 | + - This ability is tagged as `external`, so normal tool confirmation policy |
| 26 | + can gate it. |
| 27 | + |
| 28 | +The bundled workflow is `openclawp/record-agency-demo`. |
| 29 | + |
| 30 | +## Local Recorder |
| 31 | + |
| 32 | +Start the local recorder from the repo: |
| 33 | + |
| 34 | +```bash |
| 35 | +node bin/demo-recorder.mjs --port=8765 |
| 36 | +``` |
| 37 | + |
| 38 | +Then run the WordPress ability or workflow with: |
| 39 | + |
| 40 | +```php |
| 41 | +wp_get_ability( 'openclawp/record-demo-video' )->execute( |
| 42 | + array( |
| 43 | + 'endpoint' => 'http://127.0.0.1:8765/record', |
| 44 | + 'site_url' => 'http://localhost:8894/', |
| 45 | + 'login_url' => 'http://localhost:8894/studio-auto-login?redirect_to=%2Fwp-admin%2F', |
| 46 | + 'client_name' => 'Northstar Clinic', |
| 47 | + 'industry' => 'clinic', |
| 48 | + 'blueprint' => 'booking-agent', |
| 49 | + 'voice' => array( |
| 50 | + 'enabled' => true, |
| 51 | + 'mode' => 'auto', |
| 52 | + ), |
| 53 | + ) |
| 54 | +); |
| 55 | +``` |
| 56 | + |
| 57 | +The recorder writes artifacts to `OPENCLAWP_DEMO_OUT_DIR` when set, otherwise |
| 58 | +to the OS temp directory under `openclawp-demo-artifacts`. |
| 59 | + |
| 60 | +## Atomic Demo Shape |
| 61 | + |
| 62 | +On Atomic, use openclaWP to create the plan. The video recorder should still |
| 63 | +run from your laptop or CI worker and browse the Atomic site remotely. Do not |
| 64 | +try to install Playwright, Chromium, `ffmpeg`, or a TTS stack inside the |
| 65 | +WordPress runtime. |
| 66 | + |
| 67 | +If Atomic cannot reach your laptop recorder endpoint, run the local recorder |
| 68 | +with a saved plan instead: |
| 69 | + |
| 70 | +```bash |
| 71 | +node bin/demo-recorder.mjs --plan=/path/to/openclawp-plan.json |
| 72 | +``` |
| 73 | + |
| 74 | +## Voice Behavior |
| 75 | + |
| 76 | +Voice is best-effort: |
| 77 | + |
| 78 | +- `voice.enabled=true` asks the recorder to create narration. |
| 79 | +- `voice.mode=script-only` writes only the narration script. |
| 80 | +- `voice.mode=auto` tries local TTS and falls back to script-only. |
| 81 | +- On macOS, `say` creates the audio file. |
| 82 | +- If `ffmpeg` exists, the recorder also creates an MP4 with audio. |
0 commit comments