The decorator turns a function signature into a binding.
Types and defaults become JSON Schema, while the returned argv list becomes a deterministic command template.
import urirun
from urirun.v2 import decorated_bindings
@urirun.command("media://local/video/transcode")
def transcode(input: str, output: str, width: int = 1280, height: int = 720):
return ["ffmpeg", "-i", "{input}", "-vf", "scale={width}:{height}", "{output}"]
from urirun.v2 import compile_registry, decorated_bindings
bindings = decorated_bindings()
registry = compile_registry(bindings)
