Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: connected storage in rb - #159

Merged
a-essawy merged 15 commits into
mainfrom
feat/connected-storage
Sep 13, 2026
Merged

feat: connected storage in rb#159
a-essawy merged 15 commits into
mainfrom
feat/connected-storage

Conversation

@a-essawy

Copy link
Copy Markdown
Contributor

rb ffmpeg, rb generate and rb edit accept --deliver storage://<id>[/path], repeatable, and --deliver= works too. With it, rb waits up to five minutes for the deliveries, prints where each one landed, adds deliveries to --json, and exits 1 when one did not land. A job that only picks up the account's default destination is not waited on and never changes the exit code, so existing scripts behave as before.

New rb storage list and rb storage ls <id>[/folder] (--all, --json). The list prints the connection row (id, provider, bucket, region, access, pending, default destination), never endpoints or credentials. A key without storage access exits 2 with how to fix it.

rb login now asks for storage:read. The rendobar-cli OAuth client already carries that scope in production (read back from the database), and the production authorize endpoint accepts the new scope list. The commands that call the API share one session helper.

Checks: typecheck and 267 tests green. A production run of this branch listed and browsed storage, delivered an output, refused an unknown destination (exit 1), ran without --deliver (exit 0), and reported an HLS output with --deliver as not deliverable (exit 1).

After release, accounts signed in before this change run rb login again to use rb storage.

Adds src/lib/deliver.ts: --deliver flag parsing, delivery status
parsing off a job, per-delivery report lines, the delivery exit
code, and a bounded wait for pending deliveries to settle. Not
wired into any command yet, so nothing user-facing changes.
buildResult now parses the job's deliveries onto ProgressResult so a
later command can wait on them and report them. Empty when the job
named none. No command reads the field yet.
A rejected read no longer escapes waitForDeliveries and crashes the
command, since the job it's polling already completed. It keeps the
last known deliveries and tries again next interval, still bounded
by the deadline. An aborted signal still rethrows so Ctrl+C works.

Also documents the finishDeliveries test stub's `as never` and adds
coverage for a renamed delivery through parseDeliveries and
deliveryLine.
The API applies an org's default destination to every job and closes an
unstored result (HLS, multi-file, data-only) as not_deliverable, so a run
without --deliver could wait up to five minutes and exit 1 for a delivery
nobody asked for. finishDeliveries now takes a requested flag and returns
immediately when it is false, leaving the result exactly as the job read
at completion reported it so --json is unaffected. All three commands
pass requested: destinations.length > 0.
readDeliverFlags now parses --deliver=<uri> with the same validation and
de-duplication as the two-argument form. ffmpeg's own arg extraction drops
a --deliver=... token too, so it never reaches the ffmpeg command string.
By the time a command waits on deliveries the job has already completed,
so there is nothing left to cancel. Clearing jobId right before that wait
stops the SIGINT handler from posting a cancel for a job that already
finished. Ctrl+C still exits 130.
A 403 INSUFFICIENT_SCOPE is an authorization problem like a bad token, so
it now exits 2 instead of 1, via a small storageExitCode helper the same
tests can cover directly. The connection-shape comments now name the local
MCP server specifically, since the hosted one returns more fields. The
storage-page URL comes from getDashboardBaseUrl() instead of a hardcoded
string, and the missing-scope hint now names the September 13, 2026 cutoff
by explaining which credentials predate it. rb ffprobe no longer destructures
cred and baseUrl from openSession, since it never used either.
@a-essawy
a-essawy merged commit dc4ef49 into main Sep 13, 2026
2 checks passed
@a-essawy a-essawy mentioned this pull request Sep 13, 2026
@a-essawy
a-essawy deleted the feat/connected-storage branch September 13, 2026 11:17
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