Skip to main content

Crate greentic_setup

Crate greentic_setup 

Source
Expand description

End-to-end bundle setup engine for the Greentic platform.

Provides pack discovery, QA-driven configuration, secrets persistence, and bundle lifecycle management as a library crate.

Re-exports§

pub use bundle_source::BundleSource;
pub use engine::SetupEngine;
pub use plan::SetupMode;
pub use plan::SetupPlan;
pub use plan::SetupStep;
pub use plan::SetupStepKind;
pub use qa::wizard::ProviderFormSpec;
pub use qa::wizard::SHARED_QUESTION_IDS;
pub use qa::wizard::SharedQuestionsResult;
pub use qa::wizard::build_provider_form_specs;
pub use qa::wizard::collect_shared_questions;
pub use qa::wizard::prompt_shared_questions;
pub use qa::wizard::run_qa_setup_with_shared;

Modules§

admin
Admin API types and configuration for secure bundle lifecycle management.
answers_crypto
bundle
Bundle directory structure creation and management.
bundle_source
Bundle source resolution — parse and resolve bundle references from various protocols.
capabilities
Capability validation and auto-upgrade for provider gtpacks.
card_setup
Adaptive Card setup flow types.
cli_args
CLI argument definitions for greentic-setup.
cli_commands
CLI command implementations for greentic-setup.
cli_helpers
CLI helper functions for greentic-setup.
cli_i18n
CLI i18n support for greentic-setup.
config_envelope
Provider configuration envelope — CBOR-serialized config with provenance.
deployment_targets
discovery
Pack discovery — scans a bundle directory for .gtpack files across provider domains (messaging, events, oauth) and extracts metadata.
doctor
Read-only diagnostics for greentic-setup bundles.
engine
Setup engine — orchestrates plan building and execution for create/update/remove workflows.
env_mode
Env-manifest mode: route a greentic.env-manifest.v1 answers document to the deployer’s env-apply engine (operator-surface PR-4).
env_wizard
Bare --env wizard (operator-surface PR-6): author or gap-fill a greentic.env-manifest.v1 manifest interactively, persist it, and hand off to the deployer’s env-apply engine via crate::env_mode.
flow
QAFlowSpec builder for multi-step setup with conditional jumps.
gtbundle
.gtbundle archive format support.
no_ui_oauth
oauth_callback
Provider-agnostic OAuth callback completion helpers.
oauth_device
Provider-agnostic OAuth device-code setup helpers.
plan
Setup plan types — mode, steps, and metadata for bundle lifecycle operations.
platform_setup
Bundle-level platform setup types and static routes policy handling.
provider_state
Provider-level setup state shared by CLI, web UI, and executors.
qa
QA-driven configuration: FormSpec bridge, wizard prompts, answers persistence, and setup input loading.
reload
Hot reload types and diffing for bundle changes.
secret_name
Normalize secret names to a store-friendly canonical form.
secrets
Dev secrets store management for bundle setup.
setup_actions
Provider-agnostic setup actions and OAuth setup helpers.
setup_input
Load and validate user-provided setup answers from JSON/YAML files.
setup_to_formspec
Converts legacy setup.yaml (SetupSpec) into qa_spec::FormSpec.
setup_tunnel
tenant_config
Tenant config synchronization for webchat-gui OAuth settings.
ui
Web-based setup UI server.
webhook
Webhook registration for messaging providers during setup.

Constants§

DEFAULT_ENV_ID
Default environment id when nothing is set. Flipped from "dev" to "local" as part of A4b — the local env is what gtc setup and gtc start auto-create per A4.
DISABLE_ALIAS_ENV_VAR
Env-var that disables the LEGACY_ENV_IDDEFAULT_ENV_ID compat alias. Set to 1, true, yes, or on (case-insensitive) to make any resolved value of dev hard-fail with a remediation hint. Intended for CI assertions that prove no production code-path still resolves to the legacy env id; remove once A4b PR3 flips the default in greentic-config and downstream consumers no longer pass dev.
LEGACY_ENV_ID
Legacy env id this crate accepts via the compat alias. Resolved values that match this string are remapped to DEFAULT_ENV_ID with a once-per-process warning, unless the operator disables the alias.

Functions§

canonical_secret_uri
Build a canonical secret URI: secrets://{env}/{tenant}/{team}/{provider}/{key}.
resolve_env
Resolve the effective environment string.
version
Returns the crate version.