Documentation

Python API

Validate and bundle an application with build_bundle.

build_bundle

build_bundle accepts a path to an application directory. It returns the canonical archive bytes and a record describing the bundle and its included files.

Python
from recurse import build_bundle

bundle_bytes, bundle_record = build_bundle("./my-agent")
print(bundle_record["sha256"])
print(bundle_record["size_bytes"])

Return values and errors

The bundle record contains api_version, sha256, size_bytes, and members. Each member records its path, mode, size, and digest.

Building an unchanged directory produces the same bytes and record. Invalid applications raise ValueError with a message beginning bundle authoring failed:.