Skip to content

feat(api): agent broadcasts - an account agent goes live on a channel - #188

Merged
ralyodio merged 1 commit into
masterfrom
feat/agent-broadcasts
Nov 11, 2026
Merged

ralyodio merged 1 commit into
masterfrom
feat/agent-broadcasts

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Lets an account agent (Bearer pux_ag_ key) go live on a channel its owner may use, without a browser. Built so podcast episodes (TUI Weekly, Off The Record) stream to pairux.com/@Moshcoding when they are recorded.

  • POST /api/v1/agent/broadcasts { channel, title, description? } checks can_use_resource for the agent owner, opens a public SFU session on the channel with the owner as host, and returns { sessionId, joinCode, liveUrl, channelUrl, url, token }. The token can only publish (mic + camera) into that one room, and its identity is the host id, so the existing webhook host-left path ends the live when the publisher disconnects.
  • POST /api/v1/agent/broadcasts/:id is the heartbeat (listings drop a host unseen for 90 s). DELETE ends the broadcast. Only the agent that started a broadcast can do either.
  • Go-live notifications and channel restreams fire the same way they do for a person's live.
  • Documented on /docs/agents.

Checks run by hand (the pre-commit hook OOMs on this box): the new vitest file (6 pass), tsc --noEmit on apps/web with no errors in the new files, eslint and prettier on the changed files.

🤖 Generated with Claude Code

POST /api/v1/agent/broadcasts (Bearer pux_ag_) opens a public SFU room on a
channel the agent's owner may use (can_use_resource), with the owner as host,
and returns a publish-only LiveKit token whose identity is that host, so the
webhook's host-left path ends the live when the publisher disconnects.
POST /:id is the heartbeat the listings need, DELETE /:id ends it. Go-live
notifications and channel restreams fire as for a person's live.

For streaming podcasts (TUI Weekly, Off The Record) to pairux.com/@Moshcoding
as they are recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 73eb057 into master Nov 11, 2026
12 checks passed
@ralyodio
ralyodio deleted the feat/agent-broadcasts branch November 11, 2026 08:28
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

50 finding(s)

HIGH/CRITICAL: 4 | MEDIUM: 24 | LOW: 22

Severity Rule Location
HIGH sh-eval-expansion .githooks/pre-commit:33
HIGH js-electron-node-integration apps/desktop/src/main/window.ts:49
HIGH sh-unquoted-expansion-destructive apps/installer/scripts/install.sh:717
HIGH sh-unquoted-expansion-destructive apps/installer/scripts/install.sh:948
MEDIUM sh-remote-script-execution apps/installer/scripts/install.sh:693
MEDIUM sh-remote-script-execution apps/installer/scripts/install.sh:840
MEDIUM sh-remote-script-execution apps/installer/scripts/install.sh:842
MEDIUM sh-remote-script-execution apps/installer/scripts/install.sh:1138
MEDIUM sh-remote-script-execution apps/installer/scripts/install.sh:1140
MEDIUM sh-remote-script-execution apps/livekit/setup-livekit-server.sh:93
MEDIUM sh-remote-script-execution apps/turn/deploy-droplet.sh:62
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:52
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:79
MEDIUM js-unescaped-html-sink apps/web/src/app/c/[handle]/page.tsx:199
MEDIUM js-open-redirect apps/web/src/app/cli/authorize/consent.tsx:68
MEDIUM js-unescaped-html-sink apps/web/src/app/l/[joinCode]/page.tsx:146
MEDIUM js-unescaped-html-sink apps/web/src/app/l/[joinCode]/page.tsx:230
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:150
MEDIUM js-unescaped-html-sink apps/web/src/app/live/page.tsx:154
MEDIUM js-unescaped-html-sink apps/web/src/app/page.tsx:98
MEDIUM js-unescaped-html-sink apps/web/src/app/pricing/page.tsx:263
MEDIUM js-open-redirect apps/web/src/app/settings/copilot/copilot-settings.tsx:144
MEDIUM js-unescaped-html-sink apps/web/src/app/u/[username]/page.tsx:285
MEDIUM js-open-redirect apps/web/src/components/billing/useCheckout.ts:81
MEDIUM js-unescaped-html-sink apps/web/src/components/universal-footer.tsx:29
MEDIUM js-open-redirect apps/web/src/hooks/useDesktopHandoff.ts:24
MEDIUM redos-nested-quantifier apps/web/src/lib/deliverable.ts:11
MEDIUM sql-template-interpolation packages/ai-core/src/prompts.ts:36
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:138
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:139
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:340
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:341
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:371
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:372
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:383
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:397
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:398
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:405
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:415
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:416
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:453
LOW secret-generic-credential apps/desktop/src/main/agent-cli/commands.test.ts:454
LOW secret-generic-credential apps/desktop/src/main/agent-cli/copilot.test.ts:92
LOW secret-generic-credential apps/livekit/fly.toml:12
LOW secret-generic-credential apps/turn/fly.toml:11
LOW secret-openai-key apps/web/src/lib/copilot/keys.test.ts:62
LOW secret-generic-credential apps/web/src/lib/youtubeAutoLive.test.ts:90
LOW sh-predictable-temp-path appstores/firetv/emulator-test.sh:23
LOW secret-generic-credential docs/API.md:747
LOW secret-generic-credential docs/API.md:753

Snippets are redacted; ThreatCrush never prints matched credential material.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant