Streamd v0.2.0: rename, modules panel, stable/beta channels
All checks were successful
release / build-and-upload (push) Successful in 7m5s

- Rename product/host binary to streamd (drm compat copy still shipped)
- Go module path streamd; STREAMD_* env aliases; agent UA streamd-agent
- Panel Modules store + agent pull sync (modstore / modsync)
- Rolling stable + beta download tags; README/docs channel curl blocks
- Release notes in docs/releases/v0.2.0.md attached by Forgejo Actions
This commit is contained in:
404errordeveloper 2026-10-10 15:58:26 +02:00
parent 066e018749
commit da8e1123ec
140 changed files with 2949 additions and 851 deletions

View file

@ -1,16 +1,16 @@
# Control plane and agent
Two long-running pieces: `drm serve` holds the state and the dashboard, `drm agent
Two long-running pieces: `streamd serve` holds the state and the dashboard, `streamd agent
run` keeps credentials fresh using real phones.
**New to Linux servers?** Start with the copy-paste guide:
[streamd-server-setup.md](streamd-server-setup.md) (download, chmod, add MPD
streams, screen/systemd so it survives closing the terminal).
## drm serve
## streamd serve
```bash
./bin/drm serve --bind 127.0.0.1:8083 --data .cache/streamd
./bin/streamd serve --bind 127.0.0.1:8083 --data .cache/streamd
```
| Flag | Default | Purpose |
@ -53,9 +53,14 @@ warning.
| Route | Purpose |
|---|---|
| `GET /api/health` | liveness + uptime + `deps` paths |
| `GET /api/apps` | modules under `modules/`, their channels, registered rewriters |
| `GET /api/modules` | list `modules/<name>/` with `has_yaml` + `yaml_sha256` |
| `PUT /api/modules/:name` | write `modules/<name>/module.yaml` (bearer; raw YAML or `{"yaml":…}`) |
| `GET /api/apps` | modules under the panel store (`--data/modules`), channels, rewriters |
| `GET /api/modules` | list panel modules with yaml/package hashes + arches |
| `GET /api/modules/:name` | metadata; `?include=yaml` returns YAML (operator+) |
| `GET /api/modules/:name/yaml` | raw `module.yaml` (operator / agent pull) |
| `GET /api/modules/:name/package` | download `package.zip` (operator / agent pull) |
| `PUT /api/modules/:name` | save `module.yaml` (operator; JSON `{"yaml":…}` or raw YAML) |
| `POST /api/modules/upload` | multipart zip upload (`file` + optional `name`) |
| `DELETE /api/modules/:name` | remove a module from the panel store |
| `GET /api/streams` | all streams with runtime state |
| `POST /api/streams` | create |
| `PATCH /api/streams/:id` | update |
@ -72,7 +77,7 @@ the UI or the schema.
### Creating a stream
```bash
./bin/drm catalog --app tg4 --channel ioi --keys --wvd data/device.wvd --json > s.json
./bin/streamd catalog --app tg4 --channel ioi --keys --wvd data/device.wvd --json > s.json
curl -X POST http://127.0.0.1:8083/api/streams \
-H 'Authorization: Bearer SECRET' -H 'Content-Type: application/json' \
@ -113,13 +118,13 @@ The log line is `stream X: rewritten MPD http://127.0.0.1:…`. Streamd never im
a provider package to do this — the module registered the rewriter under that name
at init time.
## drm agent run
## streamd agent run
```bash
# Prefer an operator API key from the streamd dashboard (Settings → API keys).
export STREAMD_API_KEY=ndk_…
# or: export STREAMD_TOKEN=… (legacy alias)
./bin/drm agent run --config apps/agent/agent.yaml
./bin/streamd agent run --config apps/agent/agent.yaml
```
What it does, in a loop:
@ -139,10 +144,10 @@ push a capture immediately (`POST /api/streams/:id/capture` or the dashboard
### Subcommands
```bash
./bin/drm agent devices # phones it can use
./bin/drm agent status # recent jobs
./bin/drm agent enqueue --stream tg4-ioi --reason manual
./bin/drm agent cancel --job 3
./bin/streamd agent devices # phones it can use
./bin/streamd agent status # recent jobs
./bin/streamd agent enqueue --stream tg4-ioi --reason manual
./bin/streamd agent cancel --job 3
```
### Config
@ -167,8 +172,15 @@ capture_wait_sec: 180
# agent_id: defaults to hostname
```
Providers are discovered under `modules/<name>/` next to the install (built and
run by the host; not linked into `drm.exe`).
### Modules on the panel
The dashboard **Modules** page is the source of truth for provider packages:
1. Upload a release zip (`bbc.zip`, `c4.zip`, … from `modules-v*` tags) via drag-and-drop.
2. Edit `module.yaml` in the panel (fill secrets after upload — release zips ship the publish template).
3. Agents with `sync_modules: true` **pull** `package.zip` + YAML into `<data_dir>/modules/` (default). YAML-only edits skip re-downloading the zip.
Panel storage is under `--data/modules/` (not the repo `modules/` tree). `/api/apps` channel pickers read that store. Local `streamd capture` without an agent still uses repo `modules/` unless `--modules-dir` / `STREAMD_MODULES_DIR` points at a synced cache.
`wvd` must be set (here or on the phone capture) or key fetches fail.
@ -176,18 +188,18 @@ run by the host; not linked into `drm.exe`).
```bash
# terminal 1
./bin/drm serve --bind 127.0.0.1:8083 --data .cache/streamd
./bin/streamd serve --bind 127.0.0.1:8083 --data .cache/streamd
# terminal 2 — after creating an operator API key in the dashboard
export STREAMD_API_KEY=ndk_…
./bin/drm agent run --config apps/agent/agent.yaml
./bin/streamd agent run --config apps/agent/agent.yaml
```
Then create a stream, leave **Enabled** checked (required for on-demand wake),
and watch the agent pick it up:
```bash
./bin/drm agent status
./bin/streamd agent status
```
## External tools