62 Commits

Author SHA1 Message Date
self 5ec6198da2 docs: document shared HTTP wrapper usage
Advise plugin runtime code to use Tribes.HTTP for outbound requests while allowing standalone test and supertest scripts to keep raw Req usage.
2026-07-13 15:47:16 +02:00
self cdbfef7cd3 fix: serve sender hls public path
Accept the current /sender/hls route in the Sender HLS plug while preserving the legacy plugin-slug path. Add direct plug coverage for both path shapes.
2026-06-18 02:16:57 +02:00
self 3e288a7e95 feat: prefix Sender plugin slug
Rename Sender plugin identity to tribe-one-sender across manifest, runtime API routes, metrics, e2e fixtures, and tests.
2026-06-17 22:33:33 +02:00
self ee7d0ac29f dev: add en_GB locale archive to devenv
Provide a Nix glibc locale archive with en_GB.UTF-8 so tools inside the devenv shell inherit a valid UTF-8 locale.
2026-06-02 00:01:42 +02:00
self 73dcc48a9b fix: make HLS edge start idempotent
Treat an already-started HLS edge media session as a successful stream.start response so the edge reconciler can race safely with explicit cluster starts.
2026-06-02 00:01:42 +02:00
self 1fb848b8cb feat: namespace plugin identity
Adopt canonical plugin id/slug manifest fields, vendor-prefixed OTP app naming, and fully-qualified capability ids for Sender.
2026-05-27 19:05:39 +02:00
self e3fb9937d2 fix: bundle sender assets for plugin script loading
Build Sender TypeScript through esbuild as an IIFE so host plugin asset tags can load it as a classic script, and suppress noisy host Ash domain warnings during dev compilation.
2026-05-27 16:19:18 +02:00
self f8e2bfaada refactor: use chat capability surfaces
Move Sender modules under TribeOne.TribesPlugin.Sender and replace the Aether-specific chat integration with the public chat@1 surface contract.
2026-05-26 01:13:38 +02:00
self e771ab3c35 refactor: embed chat as live component
Resolve the optional Aether chat component dynamically and forward chat PubSub messages into it, removing the iframe integration.
2026-05-25 12:51:59 +02:00
self 38ff2fa2b2 feat: embed optional stream chat
Declare chat@1 as an optional enhancement and show an Aether chat iframe beside the Sender player when a chat provider is installed.
2026-05-25 05:44:06 +02:00
self a5ec731ad3 docs: clarify plugin hook registration
Document that external plugin hooks are registered through global_js bundles and window.TribesPluginHooks rather than host-side colocated imports.
2026-05-24 23:46:17 +02:00
self df2335b915 build: configure npm release delay
Use npm's native min-release-age setting in devenv and assets npm config so dependency resolution avoids very fresh publishes.
2026-05-24 19:53:37 +02:00
self 7dd5c525f5 feat: add local stream control API
Add Sender.LocalStreams for IEx and no-Legion local stream operation. The helper composes existing management handlers and can optionally launch a MuonTrap-supervised ffmpeg test-video publisher. Document the public API surface in docs/API.md and cover the helper with tests.
2026-05-24 17:32:10 +02:00
self 2757f7cdd7 build: update devenv inputs
Run devenv update to refresh pinned devenv and related inputs.
2026-05-24 16:26:29 +02:00
self 095690642b build: refresh devenv lock
Refresh devenv.lock after the devenv update normalized lock-file inputs.
2026-05-24 16:16:56 +02:00
self 0f833b422d chore: declare git-hooks input in devenv.yaml
Newer devenv versions require git-hooks.nix to be declared as an
explicit input when devenv.nix uses `git-hooks.hooks`.
2026-05-24 15:20:28 +02:00
self 006f352cac refactor: mark sender topology sync as control
Declare control lanes on Sender topology/state-machine resources now that AshNostrSync defaults new resources to bulk.

Keep endpoint history and snapshots on bulk and add coverage for the Sender lane split.
2026-05-23 18:48:54 +02:00
self 3df6e5c091 feat: assign sender telemetry to bulk sync
Mark endpoint history and endpoint snapshots as bulk AshNostrSync resources so topology stays on the default control lane.
2026-05-23 18:23:47 +02:00
self 2c9f5a23b3 docs: update plugin service references
Replace Sender architecture references to context.services with direct Tribes.Plugin.Services usage. Refresh the lockfile after fetching the host-backed test dependencies.
2026-05-23 16:26:28 +02:00
self 9c1b394882 fix: align sender topology migration
Add a forward-only compatibility migration for databases that already ran the earlier Sender streaming migration before the topology model was simplified.

The migration backfills media endpoint type values from the legacy kind column, adds the source endpoint relation expected by current resources, and adds the stream generation delivery mode default.
2026-05-23 16:24:39 +02:00
self 5f33d8ee10 feat: expose plugin migration commands
Forward ash.codegen and ecto.migration through the Sender plugin wrapper and update agent guidance to prefer AshPostgres codegen for resource-driven migrations.
2026-05-23 15:58:01 +02:00
self 28ad5359d2 feat: allow ffmpeg executable env override
Keep Sender's default as ffmpeg on PATH, while allowing Guix deployments to inject an exact store ffmpeg path via SENDER_FFMPEG_EXECUTABLE. Remove per-stream executable selection so the runtime has one simple executable resolution model.
2026-05-19 16:56:37 +02:00
self 07eb4e01c4 fix: align sender startup with current node info
Use the current node_info node_pubkey field in the Docker e2e runner and refresh the Nix Mix dependency hash after the muontrap dependency update. Keep edge session reconciliation alive when it runs before the host repo is ready during startup.
2026-05-18 18:30:57 +02:00
self c727ee04de feat: prune sender hls spools
Share HLS timing and retention config across origin and edge sessions, pass live-window settings through to ffmpeg, prune edge pull-through segments, and schedule stopped generation spool cleanup. Include the dependency lock refresh present in this worktree.
2026-05-18 11:14:33 +02:00
self 42a6ed22ca fix: recover Sender edge sessions after reboot
Persist edge start options that affect source fetching and add a periodic reconciler that restarts missing local HLS edge sessions from synced endpoint and generation state. This lets an edge node resume pull-through service after a reboot without Legion re-pushing the stream setup.
2026-05-17 18:52:32 +02:00
self 64f0ce1396 fix: allow self-signed HLS edge sources
Pass the source TLS verification option from stream lifecycle into the HLS pull-through worker so Legion can disable origin certificate verification during self-signed supertest runs. Cover the default and explicit disabled paths in sender tests.
2026-05-17 17:05:33 +02:00
self b11089adb6 feat: declare vinyl sender rollups
Move stream-specific Vinyl metrics into the sender plugin contract. Sender now declares viewer, playlist request, and HLS log parse error rollups while keeping host Vinyl rollups operational-only.
2026-05-16 16:42:39 +02:00
self b4e806e90d feat: count sender viewers by request sessions
Use Tribes.RequestInfo for HLS and player event attribution so trusted proxy traffic is served without feeding Sender's internal viewer metric.

Append a stable vsid query parameter to browser HLS playlist URLs, count playlist reloads as viewer sessions in standalone mode, keep IP fallback for plain HLS clients, and update docs plus e2e coverage.
2026-05-15 13:40:46 +02:00
self bdaa292278 feat: add sender viewer metrics
Track active Sender viewers from browser heartbeats and HLS IP fallback, filtering localhost access and exporting a low-cardinality plugin metric for Tribes rollups.

Extend the Docker origin/edge E2E harness with VictoriaMetrics/vmagent scraping and assertions for live /metrics export plus compact rollup storage. Update docs for the host metrics path.
2026-05-14 19:00:12 +02:00
self 4f24560224 build: package sender with tribes release
Add flake outputs for the sender assets, packaged plugin, bundled Tribes release, and single-image Docker E2E target.

Update the Docker E2E runner to build that image through Nix with the local Tribes checkout override before running the origin/edge compose scenario.
2026-05-11 13:09:34 +02:00
self c2ea5ea290 feat: add edge HLS repeater flow
Add the edge-side pull-through startup path and make stream startup tolerant of sources that are not live yet. Keep ffmpeg managed through MuonTrap while adding the options needed by the multi-node flow.

Add a docker-oriented origin/edge E2E scenario that starts both nodes before RTMP ingest and verifies HLS playback from the edge node.
2026-05-11 13:09:25 +02:00
self e933e5858d feat: add sender hls edge repeater
Expose standalone /sender/hls file serving for local spool playback and add the hls_edge media-session mode for tribes_edge endpoints.\n\nThe edge backend mirrors an upstream generation playlist and referenced segments into the local spool, while management lifecycle methods can start, stop, and report hls_edge sessions separately from origin ingest.\n\nVerified with scripts/plugin test, scripts/plugin validate, scripts/plugin precommit, and scripts/plugin smoke.
2026-05-10 20:04:39 +02:00
self 799800b66d refactor: simplify sender topology model
Collapse endpoint routing around endpoint types and source links, remove the StreamRoute resource and HLS fallback plug, and move generated HLS paths to /sender/hls for Vinyl-backed serving.\n\nUpdate the initial schema, management payloads, docs, and tests to match generation-level renditions and stream generation delivery modes.
2026-05-10 19:22:22 +02:00
self 61d9477840 fix: expose sender runtime children
Register Sender supervision children through the Tribes plugin spec so the host PluginManager starts the media session, backend, readiness, stats, and snapshot processes in packaged deployments.

Reuse the same child list from Sender.Application and cover the plugin spec with a management test.
2026-05-09 22:27:49 +02:00
self 6d6f821102 feat: track sender HLS readiness 2026-05-09 20:24:13 +02:00
self 5285988037 fix: use host-backed plugin test aliases
Route raw Mix test and precommit aliases through the plugin wrapper workflow.

Document that normal plugin checks should use plugin test or plugin precommit.
2026-05-09 19:43:27 +02:00
self c3a57c7e6e fix: align sender plugin contract 2026-05-09 17:31:18 +02:00
self b1aa7fb10f fix: align Ash dependency for packaging 2026-05-09 16:03:02 +02:00
self 9e6024d196 improve: Keep media sessions alive for reconnects 2026-05-09 12:16:58 +02:00
self b4a6ba55d1 feat: Add Sender management API 2026-05-09 12:16:53 +02:00
self 45918235d2 feat: Add origin media session runtime 2026-05-09 12:16:48 +02:00
self c5f85f26a5 chore: Update plugin scaffolding 2026-05-07 16:50:14 +02:00
self 4b8df8b495 feat: Expose Sender config schema 2026-05-07 16:50:08 +02:00
self 33d49c749a fix: compile sender against host app in prod 2026-05-07 16:49:39 +02:00
self 1f3df4c8ed fix: compile sender against host app in prod 2026-05-02 23:29:43 +02:00
self 0ee0afecc2 fix: render streaming page inside host chrome
Wrap the sender LiveView with the plugin-facing Tribes layout and mount optional host auth so the player appears inside the normal Tribes navigation chrome. Declare ui@1 because the host chrome is provided through the UI capability and assert that chrome in the page test.
2026-05-02 13:21:57 +02:00
self 64cf4869fe build: ignore generated static assets
Keep sender build output and vendored frontend artifacts out of git while preserving the static directory placeholder.
2026-05-02 01:46:32 +02:00
self 4932d5b481 fix: compile sender plugin in dev
Add the Tribes host path dependency for dev compilation as compile-only so the plugin manager can load the generated entry-module beam from _build/dev.

Keep the test dependency runtime-enabled so Tribes.Repo starts for migration-backed tests, and move the bridge module out of the old template path.
2026-05-01 22:56:57 +02:00
self 86dbb61a27 feat: publish local endpoint stats
Add local streaming counters, telemetry emissions, snapshot publishing into EndpointSnapshot rows, and an optional periodic snapshot worker with tests.
2026-05-01 22:33:43 +02:00
self ca86a31b25 feat: add playback API and player shell
Expose plugin API routes for playback metadata, HLS file serving, and player events. Add a typed Video.js v10 HTML player bootstrap and host-backed API tests.
2026-05-01 22:31:29 +02:00