Skip to content

feat: add Mux Robots API commands#65

Merged
dylanjha merged 5 commits intomainfrom
add-robots-api
Apr 16, 2026
Merged

feat: add Mux Robots API commands#65
dylanjha merged 5 commits intomainfrom
add-robots-api

Conversation

@dylanjha
Copy link
Copy Markdown
Contributor

@dylanjha dylanjha commented Apr 14, 2026

Summary

  • Adds mux robots command group with 10 subcommands covering the full Robots API
  • Job management: list, get, delete, cancel
  • Workflow commands: summarize, moderate, generate-chapters, ask-questions, find-key-moments, translate-captions
  • Uses direct fetch calls via a shared src/lib/robots.ts helper (the Mux Node SDK does not yet support the Robots API)
  • Surfaces specific API error messages (e.g. TOS acceptance required) instead of generic permission errors
  • Updates README with full command documentation

Test plan

  • 66 unit tests pass (bun test src/commands/robots/)
  • Full test suite passes (743 tests, 0 failures)
  • pnpm run check (biome) passes
  • All 10 commands tested end-to-end against live Mux API (fam-vids environment)
  • Verify --agent mode works with robots commands

🤖 Generated with Claude Code


Note

Medium Risk
Introduces new API-integrating commands and upgrades the Mux SDK, which may change runtime behavior or types; however changes are mostly additive and isolated to new command paths.

Overview
Adds a new mux robots command group wired into the main CLI, enabling job listing/retrieval/cancellation plus workflow job creation for summarize, moderate, generate chapters, ask questions, find key moments, and translate captions.

Updates docs to describe the new Robots commands/options and bumps @mux/mux-node to ^14.0.0 to use the robotsPreview API surface. Also hardens mux assets create --upload by erroring if Mux returns an upload without a signed url.

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

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: --no-upload flag silently ignored due to wrong property
    • Updated translate-captions option handling to use Cliffy’s parsed upload === false value so --no-upload correctly sets upload_to_mux to false.

Create PR

Or push these changes by commenting:

@cursor push 5e7498be26
Preview (5e7498be26)
diff --git a/src/commands/robots/translate-captions.ts b/src/commands/robots/translate-captions.ts
--- a/src/commands/robots/translate-captions.ts
+++ b/src/commands/robots/translate-captions.ts
@@ -5,7 +5,7 @@
 interface TranslateCaptionsOptions {
   trackId: string;
   toLanguageCode: string;
-  noUpload?: boolean;
+  upload?: boolean;
   passthrough?: string;
   json?: boolean;
 }
@@ -44,7 +44,7 @@
         track_id: options.trackId,
         to_language_code: options.toLanguageCode,
       };
-      if (options.noUpload) {
+      if (options.upload === false) {
         params.upload_to_mux = false;
       }

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f2f158f. Configure here.

Comment thread src/commands/robots/translate-captions.ts
@dylanjha dylanjha merged commit 27651eb into main Apr 16, 2026
8 checks passed
@dylanjha dylanjha deleted the add-robots-api branch April 16, 2026 17:56
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