Skip to content

Upgrade to @mux/ts v15.1.0 and add commands for the new API surface - #75

Merged
davekiss merged 9 commits into
mainfrom
chore/mux-node-v15
Sep 2, 2026
Merged

Upgrade to @mux/ts v15.1.0 and add commands for the new API surface#75
davekiss merged 9 commits into
mainfrom
chore/mux-node-v15

Conversation

@davekiss

@davekiss davekiss commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades the SDK from @mux/mux-node ^14.0.0 to the renamed @mux/ts v15.1.0 and adds CLI commands for the new API surface introduced in v15.0.0 and v15.1.0.

SDK upgrade (v15 breaking changes)

  • Dependency renamed to @mux/ts (the @mux/mux-node alias is expected to stop after v15)
  • client.robotsPreviewclient.robots (Robots left preview), import paths updated
  • Renamed static rendition response type (AssetCreateStaticRenditionResponseStaticRendition)
  • Not affected: the removed deprecated Data filters/exports endpoints (the CLI already used dimensions and exports.listVideoViews()), and the signed-token query param fix (the CLI builds its own URLs with lowercase token=)

New commands

Robots — six new workflows, following the existing job command pattern (typed flags, --file escape hatch, --wait polling):

  • mux robots edit-captions (find/replace rules, profanity censoring)
  • mux robots find-best-thumbnails (with output steering and --update-asset-thumbnail)
  • mux robots find-scenes
  • mux robots generate-engagement-insights
  • mux robots generate-premium-captions
  • mux robots translate-audio
  • robots get/list and the shared retrieval dispatch cover the new workflows

Assets

  • mux assets update --thumbnail-time <sec> / --clear-thumbnail-time (new default thumbnail time endpoints)
  • mux assets shots get|generate|delete (new shot detection endpoints)
  • mux assets tracks update (new track PATCH endpoint)

Webhooks — configuration CRUD from the new System API endpoints (v15.1.0), alongside the existing listen/trigger/events:

  • mux webhooks create|list|get|update|delete

Engagement — new mux engagement group for the Mux Data engagement endpoints:

  • mux engagement heatmap|hotspots with --asset-id / --playback-id / --video-id

Deferred for a follow-up (as discussed): Robots directives commands, the System usage-exports listing, and output-steering flags on pre-existing robots jobs (--file already covers steering there).

Test plan

  • bun test — 1,100 tests pass (new structural/validation tests for every new command)
  • pnpm exec tsc --noEmit and pnpm run check clean
  • pnpm run build bundles successfully
  • Smoke-tested help output for all new groups, plus JSON-mode error paths (--json without --force on deletes, missing engagement target selector)

🤖 Generated with Claude Code

https://claude.ai/code/session_01C58A2m5UJhJf34CVqQfGmg


Note

Medium Risk
Wide SDK bump and many new API-backed commands affect Robots, assets, webhooks, and Data paths; mistakes could break existing workflows or misconfigure production webhooks, though patterns match existing CLI conventions.

Overview
Upgrades the Mux client from @mux/mux-node v14 to @mux/ts v15.1.0, including the robotsPreviewrobots rename and related type/import updates across the codebase.

New and extended CLI surface:

  • Robots: six workflows (edit-captions, find-best-thumbnails, find-scenes, generate-engagement-insights, generate-premium-captions, translate-audio) with the same --file / --wait / --json patterns; job get/list routing covers all workflows.
  • Assets: default thumbnail time on mux assets update; mux assets shots get/generate/delete; mux assets tracks update for text tracks.
  • Webhooks: create, list, get, update, delete for environment webhook endpoints (alongside existing listen/trigger/events).
  • Mux Data: new mux engagement heatmap and hotspots (exactly one of --asset-id, --playback-id, or --video-id).

README documents the new commands; structural/validation tests were added for the new command groups.

Reviewed by Cursor Bugbot for commit 2c4ab53. Bugbot is set up for automated code reviews on this repo. Configure here.

davekiss and others added 7 commits September 1, 2026 18:48
Replace @mux/mux-node ^14.0.0 with the renamed @mux/ts package,
rename the robotsPreview accessor to robots (the Robots API left
preview in v15), and update the moved import paths and the renamed
static rendition response type.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C58A2m5UJhJf34CVqQfGmg
Add edit-captions, find-best-thumbnails, find-scenes,
generate-engagement-insights, generate-premium-captions, and
translate-audio commands under mux robots, following the existing job
command pattern (typed flags, --file escape hatch, --wait polling).
Extend the shared job union, retrieval dispatch, and the get/list
workflow lists to cover the new workflows.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C58A2m5UJhJf34CVqQfGmg
Add --thumbnail-time and --clear-thumbnail-time to mux assets update
(set via the update endpoint, unset via the new thumbnail-time delete
endpoint), a mux assets shots group (get, generate, delete) for the new
shot detection endpoints, and mux assets tracks update for the new
track PATCH endpoint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C58A2m5UJhJf34CVqQfGmg
Add create, list, get, update, and delete commands to mux webhooks,
backed by the System API webhooks CRUD endpoints introduced in
@mux/ts v15.1.0. The existing listen, trigger, and events commands are
unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C58A2m5UJhJf34CVqQfGmg
Add a mux engagement group with heatmap and hotspots commands for the
new Mux Data engagement endpoints, addressable by --asset-id,
--playback-id, or --video-id.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C58A2m5UJhJf34CVqQfGmg
…scope

Live QA against the API showed the engagement endpoints return
{ asset_id, heatmap } / { asset_id, hotspots } rather than the SDK's
declared { total_views, value } shape, which crashed the pretty
printers. Accept both shapes and print total views only when present.

Also note in the tracks update help and README that the track PATCH
endpoint applies to text tracks only; the API rejects audio and video
tracks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C58A2m5UJhJf34CVqQfGmg
davekiss and others added 2 commits September 1, 2026 20:26
The engagement envelope fields already diverged from the SDK types
against the live API; guard the per-hotspot fields the same way so an
undocumented shape prints raw JSON instead of NaN timestamps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C58A2m5UJhJf34CVqQfGmg
@davekiss
davekiss merged commit 767585b into main Sep 2, 2026
8 checks passed
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