walla-page 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -7
- package/bin/walla.mjs +18 -4
- package/llms.txt +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ This project uses `npm`.
|
|
|
10
10
|
|
|
11
11
|
- Install dependencies with `npm install`
|
|
12
12
|
- Run the CLI locally with `npm run walla -- ...`
|
|
13
|
-
- Publish the package to npm as `
|
|
13
|
+
- Publish the package to npm as `walla-page`
|
|
14
14
|
|
|
15
15
|
Keeping one lockfile is simpler for contributors, and `npm` is the most common default in open source JavaScript projects.
|
|
16
16
|
|
|
@@ -21,7 +21,7 @@ The published npm package is just the Node CLI. Installing it does not require W
|
|
|
21
21
|
For CLI users:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm install -g
|
|
24
|
+
npm install -g walla-page
|
|
25
25
|
walla help
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -50,7 +50,7 @@ This keeps the hackathon surface area small and testable.
|
|
|
50
50
|
|
|
51
51
|
## Core Capabilities
|
|
52
52
|
|
|
53
|
-
- Show fullscreen HTML now (`show`)
|
|
53
|
+
- Show fullscreen HTML now (`show`, alias: `push`)
|
|
54
54
|
- Schedule fullscreen HTML for later (`schedule`)
|
|
55
55
|
- Generate ElevenLabs speech and schedule it (`say`)
|
|
56
56
|
- Delete room state and disconnect clients (`delete`, `delete --force`)
|
|
@@ -84,6 +84,7 @@ One room contains:
|
|
|
84
84
|
|
|
85
85
|
Displays are multi-screen by default.
|
|
86
86
|
|
|
87
|
+
- Default: public display link per room
|
|
87
88
|
- Default: unlimited display websocket connections per room
|
|
88
89
|
- Optional cap at room creation via `displayLimit`
|
|
89
90
|
- When capped and full, new display ws attempts return `429`
|
|
@@ -91,8 +92,10 @@ Displays are multi-screen by default.
|
|
|
91
92
|
CLI flag:
|
|
92
93
|
|
|
93
94
|
- `walla create --display-limit <n>`
|
|
95
|
+
- `walla create --private-display`
|
|
94
96
|
- `n >= 1` sets a cap
|
|
95
97
|
- `0` means unlimited
|
|
98
|
+
- `--private-display` requires a display token instead of a bare room link
|
|
96
99
|
|
|
97
100
|
## Alarm + Lifecycle
|
|
98
101
|
|
|
@@ -135,7 +138,7 @@ npm run walla -- help
|
|
|
135
138
|
|
|
136
139
|
Commands:
|
|
137
140
|
|
|
138
|
-
- `walla create [--display-limit <n>]`
|
|
141
|
+
- `walla create [--display-limit <n>] [--private-display]`
|
|
139
142
|
- `walla delete [--force]`
|
|
140
143
|
- `walla display`
|
|
141
144
|
- `walla config`
|
|
@@ -143,6 +146,7 @@ Commands:
|
|
|
143
146
|
- `walla status`
|
|
144
147
|
- `walla quickstart`
|
|
145
148
|
- `walla show <file.html> [--title <title>] [--duration <seconds>]`
|
|
149
|
+
- `walla push <file.html> [--title <title>] [--duration <seconds>]`
|
|
146
150
|
- `walla schedule <file.html> --at <time> [--title <title>] [--duration <seconds>]`
|
|
147
151
|
- `walla say <text> [--at <time>] [--title <title>] [--duration <seconds>] [--voice-id <id>] [--max-words <n>]`
|
|
148
152
|
|
|
@@ -172,20 +176,24 @@ Create payload:
|
|
|
172
176
|
|
|
173
177
|
```json
|
|
174
178
|
{
|
|
175
|
-
"displayLimit": 0
|
|
179
|
+
"displayLimit": 0,
|
|
180
|
+
"publicDisplay": true
|
|
176
181
|
}
|
|
177
182
|
```
|
|
178
183
|
|
|
179
184
|
- `displayLimit >= 1`: cap displays
|
|
180
185
|
- `displayLimit = 0` or omitted: unlimited
|
|
186
|
+
- `publicDisplay = true` or omitted: bare room display link
|
|
187
|
+
- `publicDisplay = false`: token-protected display link
|
|
181
188
|
|
|
182
189
|
Display route:
|
|
183
190
|
|
|
184
|
-
- `GET /rooms/:roomId
|
|
191
|
+
- Public: `GET /rooms/:roomId`
|
|
192
|
+
- Private: `GET /rooms/:roomId?token=...`
|
|
185
193
|
|
|
186
194
|
Built-in audio route (allow-listed asset endpoint):
|
|
187
195
|
|
|
188
|
-
- `GET /audio/campfire.mp3`
|
|
196
|
+
- `GET /audio/campfire-demo.mp3`
|
|
189
197
|
|
|
190
198
|
## Quickstart
|
|
191
199
|
|
|
@@ -215,6 +223,7 @@ Drive the room:
|
|
|
215
223
|
```bash
|
|
216
224
|
npm run walla -- status
|
|
217
225
|
npm run walla -- show ./examples/campfire.html --duration 120
|
|
226
|
+
npm run walla -- push ./examples/campfire.html --duration 120
|
|
218
227
|
npm run walla -- say "Dinner in five minutes."
|
|
219
228
|
npm run walla -- delete
|
|
220
229
|
# if displays are still connected:
|
package/bin/walla.mjs
CHANGED
|
@@ -8,7 +8,7 @@ const CONFIG_DIR = path.join(os.homedir(), ".config", "wallapage");
|
|
|
8
8
|
const CONFIG_PATH = path.join(CONFIG_DIR, "config.json");
|
|
9
9
|
const LEGACY_CONFIG_PATH = path.join(os.homedir(), ".config", "wallapalooza", "config.json");
|
|
10
10
|
const DEFAULT_TTS_MAX_WORDS = 60;
|
|
11
|
-
const DEFAULT_SERVER = "https://
|
|
11
|
+
const DEFAULT_SERVER = "https://walla.page";
|
|
12
12
|
|
|
13
13
|
async function main() {
|
|
14
14
|
const args = process.argv.slice(2);
|
|
@@ -45,6 +45,9 @@ async function main() {
|
|
|
45
45
|
case "show":
|
|
46
46
|
await showOrSchedule("show", args);
|
|
47
47
|
return;
|
|
48
|
+
case "push":
|
|
49
|
+
await showOrSchedule("show", args);
|
|
50
|
+
return;
|
|
48
51
|
case "schedule":
|
|
49
52
|
await showOrSchedule("schedule", args);
|
|
50
53
|
return;
|
|
@@ -64,7 +67,7 @@ function printHelp() {
|
|
|
64
67
|
console.log(`Walla Page CLI
|
|
65
68
|
|
|
66
69
|
Usage:
|
|
67
|
-
walla create [--display-limit <n>] [--server <url>]
|
|
70
|
+
walla create [--display-limit <n>] [--private-display] [--server <url>]
|
|
68
71
|
walla delete [--force]
|
|
69
72
|
walla display
|
|
70
73
|
walla config [--server <url>]
|
|
@@ -72,6 +75,7 @@ Usage:
|
|
|
72
75
|
walla status
|
|
73
76
|
walla quickstart
|
|
74
77
|
walla show <file.html> [--title <title>] [--duration <seconds>]
|
|
78
|
+
walla push <file.html> [--title <title>] [--duration <seconds>]
|
|
75
79
|
walla schedule <file.html> --at <time> [--title <title>] [--duration <seconds>]
|
|
76
80
|
walla say <text> [--at <time>] [--title <title>] [--duration <seconds>] [--voice-id <id>] [--max-words <n>]
|
|
77
81
|
|
|
@@ -79,7 +83,9 @@ Notes:
|
|
|
79
83
|
- HTML scene commands send raw HTML directly to the room runtime.
|
|
80
84
|
- Times can be ISO timestamps, "now", or relative values like "+5m", "+30s", "+2h".
|
|
81
85
|
- Set WALLA_SERVER or use --server to point the CLI at a different backend.
|
|
82
|
-
-
|
|
86
|
+
- 'push' is an alias for 'show'.
|
|
87
|
+
- Rooms default to a public display link. Pass --private-display to require a display token.
|
|
88
|
+
- The default CLI flow is create -> open display -> status/show/say. Use delete to remove a room and display to rotate the wall link for private rooms.`);
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
function quickstart() {
|
|
@@ -106,10 +112,11 @@ async function createRoom(args) {
|
|
|
106
112
|
const existing = await maybeCurrentRoom();
|
|
107
113
|
const server = resolveServer(existing, flags.server);
|
|
108
114
|
const displayLimit = parseDisplayLimitFlag(flags["display-limit"]);
|
|
115
|
+
const publicDisplay = !Boolean(flags["private-display"]);
|
|
109
116
|
const created = await fetchJson(`${server}/api/rooms`, {
|
|
110
117
|
method: "POST",
|
|
111
118
|
headers: { "content-type": "application/json" },
|
|
112
|
-
body: JSON.stringify({ displayLimit })
|
|
119
|
+
body: JSON.stringify({ displayLimit, publicDisplay })
|
|
113
120
|
});
|
|
114
121
|
const next = await upsertRoom({
|
|
115
122
|
server,
|
|
@@ -127,12 +134,18 @@ async function createRoom(args) {
|
|
|
127
134
|
} else {
|
|
128
135
|
console.log("Display WS limit: unlimited");
|
|
129
136
|
}
|
|
137
|
+
console.log(`Display access: ${publicDisplay ? "public" : "private"}`);
|
|
130
138
|
console.log(`Display: ${created.display.link}`);
|
|
131
139
|
await saveConfig(next);
|
|
132
140
|
}
|
|
133
141
|
|
|
134
142
|
async function displayLink() {
|
|
135
143
|
const room = await requireCurrentRoom();
|
|
144
|
+
const snapshot = await api(room, "GET", `/api/rooms/${room.roomId}/state?token=${encodeURIComponent(room.token)}`);
|
|
145
|
+
if (snapshot.publicDisplay) {
|
|
146
|
+
console.log(`${room.server}/rooms/${room.roomId}`);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
136
149
|
const pair = await api(room, "POST", `/api/rooms/${room.roomId}/pair`, { role: "display" });
|
|
137
150
|
console.log(pair.link);
|
|
138
151
|
}
|
|
@@ -197,6 +210,7 @@ async function status() {
|
|
|
197
210
|
const snapshot = await api(room, "GET", `/api/rooms/${room.roomId}/state?token=${encodeURIComponent(room.token)}`);
|
|
198
211
|
console.log(JSON.stringify({
|
|
199
212
|
roomId: snapshot.roomId,
|
|
213
|
+
publicDisplay: snapshot.publicDisplay,
|
|
200
214
|
displayWsLimit: snapshot.displayWsLimit,
|
|
201
215
|
currentScene: snapshot.currentScene?.title ?? null,
|
|
202
216
|
upcomingScenes: snapshot.upcomingScenes.length,
|
package/llms.txt
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "walla-page",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "CLI for controlling Walla Page rooms from Node.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"dev": "wrangler dev",
|
|
19
19
|
"deploy": "wrangler deploy",
|
|
20
20
|
"check": "tsc --noEmit",
|
|
21
|
+
"generate:campfire-audio": "node ./scripts/generate-campfire-audio.mjs",
|
|
21
22
|
"walla": "node ./bin/walla.mjs",
|
|
22
23
|
"test:smoke": "node test/smoke.test.mjs"
|
|
23
24
|
},
|
|
@@ -38,6 +39,5 @@
|
|
|
38
39
|
"hono": "^4.10.1",
|
|
39
40
|
"typescript": "^6.0.2",
|
|
40
41
|
"wrangler": "^4.78.0"
|
|
41
|
-
}
|
|
42
|
-
"package-lock": "false"
|
|
42
|
+
}
|
|
43
43
|
}
|