Expand description
§graphrt-bundle
A bundle (.grt) is one portable file holding everything a workflow needs to
run on any graphrt host — the CLI, graphrt serve, or a phone through
graphrt-ffi: the workflow document(s), WebAssembly plugins, knowledge-base
configuration and data, a providers file without secrets, and assets.
A bundle is a zip archive with a bundle.json manifest listing the SHA-256 of
every file. Hosts check every hash when opening a bundle, and can require an
Ed25519 signature (bundle.sig) from a trusted key, so a bundle exported by a
builder platform is verifiable wherever it lands.
use graphrt_bundle::{Bundle, OpenOptions};
let bytes = std::fs::read("app.grt")?;
let bundle = Bundle::open(&bytes, &OpenOptions::default())?;
let workflow = bundle.workflow(None)?;Secrets never travel in a bundle: providers files with inline keys are rejected, and environment variables are only declared (names), never stored.
Structs§
- Bundle
- An opened, fully verified bundle held in memory.
- Bundle
Builder - Assembles a bundle.
- Bundle
Manifest - Bundle manifest.
- Bundle
Signature - Contents of
bundle.sig. - Bundled
Plugin - A plugin shipped in the bundle.
- Compat
Report - Result of
Bundle::check. - KeyPair
- A generated signing key pair, hex encoded.
- Open
Options - Options for
Bundle::open. - Plugin
Ref - A plugin shipped in the bundle (under
plugins/<name>/). - Requires
- What a host needs to run the bundle.
- Wasm
Limits - Limits applied to every guest call. Operators set these; workflow documents cannot raise them.
Enums§
- Bundle
Error - Error building, opening or verifying a bundle.
Constants§
- BUNDLE_
FORMAT_ VERSION - Current bundle format version.
- MANIFEST_
PATH - Path of the manifest inside the archive.
- SIGNATURE_
PATH - Path of the optional signature inside the archive.
Functions§
- check_
no_ inline_ secrets - Fail when
valuecontains an inline credential: a non-empty string under a secret-looking key (api_key,token,password, anAuthorizationheader…) that is not an environment reference (${VAR}). Keys ending in_envname a variable and are allowed.whatnames the file in the error message. - generate_
keypair - Generate a new Ed25519 key pair from the operating system’s random source.
- parse_
public_ key - Parse a hex public key.
- sha256_
hex - Hex-encoded SHA-256 of
bytes. - sign_
bundle - Return a copy of
bundle(archive bytes) signed withsecret_key(hex seed). Any previous signature is replaced. The bundle is fully verified first.