forked from MCERQUA/OpenVoiceUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.js
More file actions
49 lines (46 loc) · 1.56 KB
/
Copy pathstart.js
File metadata and controls
49 lines (46 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
module.exports = {
daemon: true,
run: [
// Start containers in foreground (Pinokio daemon mode manages lifecycle)
{
method: "shell.run",
params: {
message: "docker compose -f docker-compose.yml -f docker-compose.local.yml up",
on: [{
// Match OpenVoiceUI's startup message (not OpenClaw's earlier "listening on ws://")
event: "/OpenVoiceUI starting on port/i",
done: true,
}],
},
},
// Inject the pre-paired device identity into the OpenVoiceUI container.
// This was generated during install (setup-config.js) and pre-registered
// in openclaw-data/devices/paired.json. We docker exec it in because
// file bind-mounts into Docker named volumes break on Windows.
// This runs BEFORE the user can open the browser, so the identity is
// already in place when OpenVoiceUI first connects to OpenClaw.
{
method: "shell.run",
params: {
message: "node inject-device-identity.js",
},
},
// Set URL so Pinokio shows "Open" button.
// Device is already pre-paired — no approval step needed.
{
method: "local.set",
params: {
url: "http://localhost:{{local.PORT||5001}}",
},
},
// Safety fallback: if inject failed (e.g. container restarted and lost
// the injected file), auto-approve will catch the device when the user
// opens the browser. Runs in background with long poll.
{
method: "shell.run",
params: {
message: "node auto-approve-devices.js",
},
},
],
}