-f/--file is required everywhere, and the file it names is
loaded before anything else happens.
The file is parsed by extension: .yaml, .yml and .json all work, and the same manifest written in YAML or
in JSON loads identically. An unsupported extension is FORMAT_UNSUPPORTED; a file that does not parse is
FORMAT_PARSE_ERROR.
The shared base
Four fields sit at the top of every manifest the CLI reads, whatever blob type it belongs to. The base is parsed and validated by itself, before the body is looked at;type is what selects the body.
All four must be non-empty strings. That is the whole base — the scheduler group’s manifest carries exactly these
four fields and then its own body, and a future blob type does the same. Nothing on the shared side changes
when one arrives.
blob
acme-corp/checkout qualifies the org in the file. A bare checkout does not, and inherits the org from the
global --org option or the BLOBHUB_ORG environment variable — which org a checkout belongs to is a property
of the checkout, not of the key being used to reach it, so a profile is deliberately not a source for it.
With a bare name and neither supplied, the manifest is MANIFEST_INVALID and the message names all three ways
to fix it, since two of them are not in the file in front of you.
An org-scoped API key checks its target as a raw string against the org UUID. Addressing that org by its
alias yields a confusing 403 on every call, so under an org-scoped key qualify the manifest — or --org — with
the UUID.
The blob’s type is confirmed before any data command: a workflow manifest pointed at a blob of another type
stops with BLOB_NOT_WORKFLOW rather than an opaque 500 one round trip later.
revision
Resolved through Resolve Revision — GET /blobs/:org/:blob/revisions/:ref
— rather than by reading the blob’s pointer and fetching the revision separately, because that route resolves
against this blob specifically. default follows whatever the blob’s default_revision_id names at the
moment the command runs. A pinned UUID names one revision for as long as the manifest says so — and because
the route checks that the revision actually belongs to the blob in the path, a pinned revision naming a
different blob than blob: now fails with REVISION_NOT_ACCESSIBLE, where it previously resolved silently
against the wrong blob.
Which revisions a command will accept depends on the direction it moves data:
The CLI fetches the revision and applies this itself, so a refusal names the phase and points at
diff. The platform’s own rejection is a bare 400 that does not mention the
revision at all. build is exempt from all of it — it never resolves a revision.
Every path anchors to the manifest’s own directory
source, code.base_path and value.source all resolve against the directory holding the manifest file, never
against the current working directory and never against each other. A manifest is revision-scoped, and its
definitions are typically scattered across several directories, so a source-relative anchor would make the
meaning of a ../.. depend on which subdirectory a given definition happened to sit in.
entry_point is the one exception: it resolves against base_path, because it names a module inside the Python
package base_path roots rather than a file in the project.
A widget entry’s widget.source and widget.build anchor to the manifest’s directory too.
Paths are collapsed lexically, so .. segments work and are resolved without touching the filesystem.
The workflow_blob_deployment body
One key: definitions, a list with at least one entry. An empty or absent list is MANIFEST_INVALID.
Unlisted keys are ignored rather than rejected, so a typo’d field name is silently inert. There is no schema
beyond what is described here.
category
Inferred from the source document’s own type: workflow_definition gives workflow, playground_definition gives
playground, listener_definition gives listener, and widget_definition gives widget. One function owns this
rule for every command in the group, build included, so no two commands can disagree about what an entry is.
- Omitted, document present,
typerecognized — the inferred category wins. - Omitted, document present,
typeunrecognized —DEFINITION_CATEGORY_UNKNOWN. Declarecategory. - Omitted, document absent (before a first
pull) — defaults toworkflow. An entry with awidgetbinding is not omitted: the binding declarescategory: widget. - Declared,
typeunrecognized — the declared category wins. This is what declaring it is for: atypethat names no native category contradicts nothing. - Declared, and it contradicts the document —
DEFINITION_CATEGORY_UNKNOWN, naming both.
(category, alias) pair, so one alias may
legitimately name a workflow definition and a playground definition on the same revision.
components[]
Each binding says which component it addresses, and what to put in it.
code and value are mutually exclusive; declaring both is MANIFEST_INVALID. A binding with neither resolves
the component and writes nothing, which makes it a no-op that can still fail with COMPONENT_NOT_FOUND.
A code binding is what build and
deploy act on, and the only thing the
compiler is ever pointed at. The bound component’s language port must be exactly
python; anything else, including no language port at all, is LANGUAGE_NOT_PYTHON.
Listener entries
A listener is a definition with categorylistener, and a manifest entry
for one has the same shape as any other: an alias, a source, and no components. The source file holds the whole
body, YAML or JSON, receipt and every template included:
listeners/orchestrate.yaml
- Order.
pushanddeploywrite workflow entries first, then widgets, then playgrounds, then listeners, so a listener’s untemplatedworkflowreference resolves, when it is saved, to a workflow the same run created. - Offline check.
deploy,checkanddiffcheck a listener body against the platform’s rules before any write: its keys, its filter (withobject_where),batch,concurrency,retry(only on aworkflowaction,attempts1 to 3,delay_seconds0 to 900 and 30 when omitted), target andreceipt, worded as the platform words them. Templates are only checked for being strings; their syntax and names are the platform’s. An untemplateddefinitionalias must name a workflow entry of the manifest or a deployed workflow definition; an id is left to the platform. The ceilings that depend on the revision’s limits are checked when the served limits are at hand. A failure isLISTENER_INVALID, and its message opens with the listener’s alias. - Comparison. The platform stores the validated body with its defaults filled in, so a download is not
byte-equal to what was uploaded.
diffanddeploytherefore fill the documented defaults on both sides before comparing:enabled: true,concurrency: {mode: serial}, and for abatchthewindow_seconds: 0andmax_events: 100, and for aretryitsdelay_seconds: 30.concurrency.max_parallelis compared only when the local body sets it, because its stored default depends on a limit resolved when the body is saved. An unchanged listener is not uploaded again. deployvalidates every listener entry in pass one, before any write, and in pass two uploads only a changed body, exactly as written; it never rewrites the local file. It runs nocheck_definitionon a listener, because the upload already ran the same validator. A refused upload (invalid_listener,invalid_filter,invalid_invocation_target,invalid_workflow_reference) isLISTENER_INVALID; a 403 on the upload isDEFINITION_NOT_ACCESSIBLE, naming the workflow reference.diffgives each listener reportbody_changedandvalidation_error({code, message}ornull), reported and never raised. A workflow or playground reports both asfalseandnull, and a widget reports its own, asdiffdescribes.checkvalidates every listener entry offline, then runscheck_definitionon each deployed one; a failure of either isCHECK_FAILED, naming the listener.pullwrites the stored body verbatim, defaults included.pushuploads the file verbatim with no validation, as for every category.buildandejectskip listeners, which hold no code.eject --definition <listener>lists it underskipped.lsandprunelist and delete listeners like any definition.
blobhub.compute.workflow.listeners_per_revision listeners.
Widget entries
A custom widget is a definition with categorywidget: one JSON
document holding what the widget’s widget.yaml says and every file the widget project’s own build wrote. Its entry
names that document as source, takes no components, and binds the widget’s project with a widget mapping:
widget.sourcenames the widget’swidget.yaml(JSON works too), andwidget.buildthe directory the widget project’s own build wrote. Both are non-empty strings, resolved against the manifest’s directory likesource.- A
widgetbinding makes the entry a widget, even before its document exists. Declaring anothercategorybeside it, orcomponents, isMANIFEST_INVALID; so iscomponentson awidgetentry without one. category: widgetwithout a binding is valid.buildskips the entry, and every other command uses itssourceas it stands: an install that ships only the committed document needs no build directory and no Node.- Inference. With no binding and no
category, a source document whosetypeiswidget_definitiongiveswidget, as the other three types give theirs.
widget.yaml holds exactly the eight keys listed under
widget.yaml: label and entry are required, entry
naming a .js or .mjs file in the build directory, and description, group, icon, ports, permissions and
libraries are optional. Any other key, a missing label or entry, an icon key with no value, or an entry of
another kind is WIDGET_INVALID; a widget.yaml that does not parse is FORMAT_PARSE_ERROR.
permissions takes only what Permissions lists:
objects, graph and files with read or write; threads with read or post; sessions with read or
select; executions, a list of workflow references; clipboard: write; notifications: show; and links, either
exactly ["*"], meaning any website, or a list of at most 16 hosts, none repeated and none "*": a "*" among other
entries is refused as "*" must be the only entry. Each host is at most 253 characters, ASCII only, and matches in full
(\*\.)?([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]([a-z0-9-]{0,61}[a-z0-9])?: two or more lowercase labels of 1
to 63 characters, none starting or ending with -, the last starting with a letter, so an IP address is refused; *.
only as the whole first label, before at least two more; no scheme, path, port or trailing dot; an internationalised
name in its xn-- form. Anything else is WIDGET_INVALID, naming the path at fault, such as permissions.links[2].
build packs the two into the document at source. It walks the build directory
recursively in sorted path order, skipping every path with a segment that begins with . (a dotfile, or anything under
a dot-directory), and refuses a symlink, a file it cannot read, and a path a widget definition refuses: anything but
letters, digits, ., _, - and /, or .. anywhere. A missing build directory, or an entry that is not in it, is
WIDGET_INVALID, asking for the widget project’s own build first. Each file’s media type comes from a fixed table of
lower-cased extensions, never from the machine’s, so one build packs to one hash everywhere:
It assembles the document in the order
type, version, label, description, group, icon, ports,
permissions, libraries, bridge, entry, files. It writes group, ports, permissions and libraries even
when widget.yaml leaves them to their defaults, so a committed document states everything it grants, and leaves out
description and icon when widget.yaml does not name them. It then appends content_hash, runs the offline checks
with no size limit, and writes the document to source, as JSON or YAML by its extension; .json is recommended. The
definition shows the result and the rules it must pass.
What the CLI does with a widget entry differs from a workflow’s in a few places:
- Order.
pushanddeploywrite workflows first, then widgets, then playgrounds, then listeners. - Offline check.
build,deployanddiffcheck a widget before anything is uploaded: the document rules, each declared library and version against the library catalog, the entry module’s imports, and, ondeployanddiff, the size against the blob’s servedblobhub.compute.workflow.widget_definition_bytes.buildreads a catalog only from--library-catalog;deployanddiffread it from there or fromhttps://blobhub.io/libs/catalog.json, once per run and only when a widget declares a library. deployuploads the document atsourceas it stands, and never packs or rewrites it. A widget is unchanged when its hash equals thecontent_hashon its listing row, so it is never downloaded. A build directory that now packs to a different document drawsWIDGET_SOURCE_STALE, and one that cannot be packed stops the deploy before any write. Nocheck_definitionruns on a widget. Before any write it lists each widget it will upload whosepermissionschanged, and refuses it unless the installer passes--yes.diff,lsandpulltell a widget created but never uploaded, whose row has nocontent_hash, from a deployed one:diffandlsmark it(not deployed), andpullskips it, leaving its local source as it is.pushandpruneupload and delete widgets like any definition, except thatpushreads a widget’spermissionswith the rules, refusing invalid ones asWIDGET_INVALIDbefore any write, and, likedeploy, refuses a widget whosepermissionschanged unless the installer passes--yes.checkandejectskip them;ejectlists one underskipped.
blobhub.compute.workflow.widgets_per_revision widgets, each at
most blobhub.compute.workflow.widget_definition_bytes in canonical form.
Deploying walks through the whole loop, from the widget’s
own build to a playground.
A worked example
A revision holding two definitions: a workflow whoselogic.code component (id: c1) is compiled from pkg/
and whose pricing table is loaded from a JSON file, plus a playground with nothing bound into it.
pkg/entry.py — entry_point is relative
to base_path, while base_path itself, source and value.source are all relative to the manifest.
The playground entry declares no category, so it is inferred from its document’s type. It declares no
components either: playground definitions are moved verbatim by
pull and push, and nothing compiles into them.
Errors
Every code above, with its remediation, is in Error codes.
See also
- Workflow overview — the shape of a deployable project and the ten commands that move it.
- Compiler — what a
codebinding produces, and every check it runs first. - Sandbox — what the compiled code executes against.
- Concepts — why a manifest is revision-scoped, and why category participates in identity.
- Workflow definition format — the document a
sourcepoints at. - Custom Widgets — the widget a widget entry deploys, and the rules its document passes.

