Skip to main content

Mux

@craftquest/muxv2026.08.09.1· 12d agoMODELSREPORTSSKILLS
01README

Manage a Mux video library from swamp — sync the asset catalog, ingest from URLs or direct uploads, mint playback IDs, and delete assets behind a confirmation gate. Pure HTTPS, credentials from your vault.

02Models1
@craftquest/muxv2026.08.09.1mux.ts
fn sync_assets()
Sync the full Mux asset catalog into the library resource (paginates to completion)
fn get_asset()
Fetch one asset's full detail into the asset resource
fn create_asset()
Create an asset by having Mux ingest a video from a URL (videoUrl argument)
fn create_direct_upload()
Create a direct-upload URL; PUT the video file to it, then run check_upload
fn check_upload()
Refresh a direct upload's status (uploadId argument, or the stored current upload)
fn wait_asset_ready()
Poll an asset (assetId argument) until it is ready or errored (5s interval, 5 min cap)
fn create_playback_id()
Add a playback ID (playbackPolicy argument) to an asset and refresh its detail
fn delete_playback_id()
Remove a playback ID (playbackId argument) from an asset — breaks existing URLs using it
fn delete_asset()
Permanently delete an asset. Gated: confirmAssetId must equal assetId, and the asset must exist in the synced library.
fn create_signing_key()
Create a Mux signing key for signed playback. The private key goes straight to the vault; only the key ID is plainly visible. Refuses if a key already exists.
fn sign_playback_token()
Mint a short-lived RS256 playback token (playbackId + audience arguments) and its ready-to-use signed URL
fn revoke_signing_key()
Revoke the signing key on Mux. Gated: confirmSigningKeyId must equal the stored key ID. Every token signed with it stops working immediately.
fn create_live_stream()
Create a live stream (latencyMode/reconnectWindow/playbackPolicy arguments). Stream key goes to the vault; recordings inherit the playback policy.
fn sync_live_streams()
Sync the live-stream catalog into the liveStreams resource (paginates; never stores stream keys)
fn get_live_stream()
Fetch one live stream's full detail (liveStreamId argument) into the live resource
fn complete_live_stream()
Signal the end of a live stream (liveStreamId argument) — stops waiting for reconnects and finalizes the recording. Gated only while the stream is actively broadcasting: then confirmLiveStreamId must match.
fn reset_stream_key()
Rotate a live stream's key. Gated: confirmLiveStreamId must equal liveStreamId — the old key stops working immediately.
fn delete_live_stream()
Permanently delete a live stream. Gated: confirmLiveStreamId must equal liveStreamId, and the stream must exist in the synced catalog. Recorded assets are not deleted.
fn get_video_views()
Pull the most recent video views from Mux Data (timeframe/metricFilter arguments) into the views resource
fn get_metrics()
Pull a Mux Data metric's overall value (metricId/timeframe arguments), plus a breakdown when groupBy is set
fn list_playback_errors()
Pull playback errors from Mux Data (timeframe argument) into the playbackErrors resource

Resources

library(infinite)— Synced Mux asset catalog with counts and sync timestamp
asset(infinite)— Full detail of the most recently touched asset
upload(7d)— Latest direct upload: PUT URL, status, resulting asset ID
signing(infinite)— Active signing key: ID in plain state, private key vault-referenced
playbackToken(1d)— Most recently minted signed playback token and URL
liveStreams(infinite)— Synced live-stream catalog (never contains stream keys)
views(30d)— Latest video-views pull from Mux Data (most recent 100)
metrics(30d)— Latest metric pull: overall value + optional breakdown
playbackErrors(30d)— Latest playback-errors pull from Mux Data
live(infinite)— Most recently touched live stream: ingest URL plain, stream key vault-referenced
03Reports1
@craftquest/mux-engagementmethod
mux_engagement.ts

Views, engagement, and playback-error digest for Mux Data pulls

analyticsmux
04Skills1
mux1 file
05Stats
A
100 / 100
Downloads
0
Archive size
37.6 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels