Repository navigation
docs(skills): stream commands in the agent skill - #254
Conversation
🦋 Changeset detectedLatest commit: e2afcb3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
e715084 to
ed85d0e
Compare
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed85d0eb20
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| **Ctrl-C** stops queuing new videos, lets a hand-off already sent to Bunny finish so it is recorded, prints the `--resume` command, and exits 130. A second Ctrl-C exits at once. | ||
| - **`upload`** creates the entry, then sends the bytes. Files over 2 GB switch to resumable TUS uploads automatically. If the byte upload fails, an entry that never received bytes is deleted; one that may hold the upload is kept with a warning naming its GUID. Encoding continues after the command returns, so the status is usually `Uploaded` or `Processing`. | ||
| - **`fetch`** returns once the fetch is queued and reports no video ID; the video shows up in `video list` once fetched. | ||
| - **`cleanup`** deletes renditions, MP4 fallbacks, or the original, and requires at least one selector (`--resolutions`, `--non-configured`, `--all`, `--original`, `--mp4`, `--outputs hls|mp4|all`). `--dry-run` lists what would go and skips the confirmation. |
There was a problem hiding this comment.
Treat
--outputs as a modifier, not a selector
When an agent follows this list and runs cleanup with only --outputs hls|mp4|all, the command fails with “Nothing selected to clean up.” cleanupQuery() deliberately excludes outputs from its selector check; this flag only scopes a real selector such as --resolutions, --non-configured, or --all, so the reference should not present it as sufficient by itself.
Useful? React with 👍 / 👎.
| - `--transcribing` bills per use on every new upload and re-encode. | ||
| - `--add-replication-regions` is add-only: regions can never be removed. | ||
| - `--content-tagging` is accepted on `update` only. | ||
| - `--force` is required for `update`, `unlink`, `delete`, and `credentials --rotate` without a TTY. |
There was a problem hiding this comment.
Do not require
--force for flagged updates
For non-interactive library update calls that already provide a change flag, --force is not required and no confirmation is performed; the option only disables the interactive editor and resource picker. Listing update alongside destructive operations as requiring --force teaches agents to add an unnecessary flag and misstates the command's automation contract.
Useful? React with 👍 / 👎.
| ## Resolving the library | ||
|
|
||
| The library's own Stream API key is read from the account automatically; nothing extra to configure, and it is never printed. | ||
| `library` commands take the library as an optional positional (name or numeric ID). Every other stream command takes it as `--lib` (alias `--library`), because its positional is a video GUID, a collection ID, or a local file path. When omitted, the library resolves in this order: |
There was a problem hiding this comment.
Limit the positional-library rule to targeted commands
Not every library command accepts a library positional: library list accepts none, and library unlink operates only on the linked .bunny/stream.json manifest. With strict argument parsing, an agent following this blanket rule and running bunny stream library unlink <name-or-id> gets an unexpected-argument error, so this should be qualified to commands that actually target an existing library.
Useful? React with 👍 / 👎.
| Reads the saved run (pass `--source` when more than one platform was imported into the library), asks Bunny for the current state of every video it queued, and prints Bunny's status, encode percentage, size, and when each was queued. A video still processing with no data after 30 minutes is marked `(stalled?)`: delete it in the dashboard and re-run the import. Exits 1 when any video failed, so it works as a poll in scripts. JSON: `{ library, source, status, completed, processing, failed, stalled, stalledAfterMinutes, saved, videos }`. | ||
| All three state the cost before running. | ||
|
|
||
| - **`encode enable`** bills per output codec per minute; `--jit`, `--codecs`, `--resolutions` apply in the same request. `encode reencode` bills at the same rate. |
There was a problem hiding this comment.
Qualify re-encoding charges by the library tier
When the selected library is on the free encoding tier, encode reencode does not incur the Premium Encoding per-codec rate; even the command's runtime warning qualifies that Premium rates apply only on the premium tier. Saying that re-encoding is billed “at the same rate” unconditionally misrepresents a free-tier re-encode as a paid operation.
Useful? React with 👍 / 👎.
|
|
||
| ```bash | ||
| bunny stream import list --source vimeo # folders: ID, name, video count | ||
| bunny stream import list --source vimeo --videos # every video, with folder, duration, size |
There was a problem hiding this comment.
State the 10,000-video cap for
import list
For a source containing more than 10,000 videos, import list --videos does not list “every video”: the CLI invokes the tool with MAX_PLAN_LIMIT and the result slices the array to 10,000 while setting truncated. An agent using this command for an exhaustive inventory can silently omit the remaining videos unless this example calls out the cap.
Useful? React with 👍 / 👎.
|
|
||
| **Re-running is safe.** Every imported video carries a per-source metaTag (`vimeoId`, `s3Source`, `wistiaId`, `muxAssetId`, `cfStreamId`, `jwPlayerId`, `brightcoveId`). A re-run skips tagged videos Bunny has finished, leaves ones still encoding alone, and imports again only the ones Bunny failed on. Source folders become Stream collections of the same name. Videos the source reports as beyond Bunny's limits (over 72 hours, or above 2160p) are flagged before you confirm. | ||
|
|
||
| **Progress** is saved to `$XDG_STATE_HOME/bunnynet/stream-import/<account>/<source>-<library>.json` (default `~/.local/state/...`). `--resume` retries failed videos, works outstanding ones, and keeps the `--folder` scope the run started with. It does **not** retry videos Bunny rejected for a reason the same file cannot get past (over limits, invalid framerate, corrupt original), ones no longer at the source, or ones that failed 3 times; use `--clean-failed` for those. Two imports cannot share one state file. |
There was a problem hiding this comment.
Do not prescribe
--clean-failed for a missing source video
When a resumed journal entry is no longer listed by the source, --clean-failed cannot retry it: without rediscovering the source video or finding an existing Bunny copy, the entry is excluded from the queue and is marked permanently failed again. This sentence groups that case with rejected and three-attempt failures and tells users to use --clean-failed for all of them; the missing-source case instead requires restoring the source video.
Useful? React with 👍 / 👎.
…ands Plural libraries, videos, and collections namespaces; captions, encode, transcribe, and smart under videos; stream link, unlink, and regions; the new create, credentials, and rotate flags; and drop the preview label.
Adds the stream commands and import reference to the bunny-cli agent skill, plus a hosted agent-setup.md prompt that walks coding agents through installing the CLI, signing in, installing the skill, and verifying with whoami.