greentic-distributor-dev

Crates.iogreentic-distributor-dev
lib.rsgreentic-distributor-dev
version0.4.26
created_at2025-12-08 17:59:59.707017+00
updated_at2026-01-17 11:41:04.847702+00
descriptionDev-only distributor source that serves packs and components from the local filesystem.
homepagehttps://github.com/greentic
repositoryhttps://github.com/greentic/greentic-distributor-client
max_upload_size
id1974147
size99,245
Greentic - the greener Agentic AI (greentic-ai)

documentation

README

greentic-distributor-dev

Dev-only distributor source that serves packs and components directly from the local filesystem. Useful for running flows locally without publishing packs/components to a remote store.

Layouts

  • Flat (default)
    • Packs: {root}/{packs_dir}/{pack_id}-{version}.gtpack
    • Components: {root}/{components_dir}/{component_id}-{version}.wasm
  • ByIdAndVersion
    • Packs: {root}/{packs_dir}/{pack_id}/{version}/pack.gtpack
    • Components: {root}/{components_dir}/{component_id}/{version}/component.wasm

Default config points at .greentic/dev with packs and components subdirectories.

Usage

use greentic_distributor_client::{ChainedDistributorSource, DistributorSource, PackId, Version};
use greentic_distributor_dev::{DevConfig, DevDistributorSource};

let dev_source = DevDistributorSource::new(DevConfig::default());
let sources = ChainedDistributorSource::new(vec![Box::new(dev_source)]);

let pack_id = PackId::try_from("dev.local.hello-flow")?;
let version = Version::parse("0.1.0")?;
let pack_bytes = sources.fetch_pack(&pack_id, &version)?;
println!("loaded {} bytes", pack_bytes.len());

Future greentic-dev integration can build packs/components into .greentic/dev/{packs,components} and resolve them via this source without any remote distributor.

Commit count: 0

cargo fmt