ggen-config
Configuration loader, parser, schema validator, and cryptographic receipt manager for the ggen framework.
This crate manages the load and validation cycles of ggen.toml workspace files, environment variable expansions, and the cryptographic chain-of-custody ledger for system configurations.
Features
- Type-Safe Configuration: Deserializes
ggen.tomlconfigurations into structured models covering:AiConfig: LLM provider, credentials, temperature, and models.McpConfig: Stdio/TLS transports, tool registries, and server mappings.A2AConfig: Peer messaging endpoints, transport ports, and retry policies.TelemetryConfig: OTel logging, Jaeger exporters, and tracing configurations.
- Environment Expansion: Dynamically resolves
${VAR}environment strings during configuration parsing. - Config Validator: Rejects malformed configuration options early (checks URL forms, certificate paths, port ranges).
- Cryptographic Receipt Envelopes: Integrates a domain-agnostic
ReceiptEnvelopeledger implementing Ed25519 signatures and BLAKE3 hash chains (EnvelopeChain) to verify the provenance of configurations and outputs.
Usage
1. Loading and Validating a Project Configuration
use ;
use Path;
2. Creating and Signing a Receipt Envelope
use ;
use ;
Architecture
src/config_lib/: Type definitions (schema.rs), loaders (parser.rs), and validation criteria (validator.rs).src/receipt/: Implements the causal chain envelope primitives:envelope.rs:ReceiptEnvelopeformatting, Ed25519 signing, and validation.chain.rs: Verification of the backward-linked BLAKE3 hash chains (EnvelopeChain).