Skip to main content

Crate distributed_cli

Crate distributed_cli 

Source
Expand description

The distributed CLI for Distributed applications — both a binary and a library.

It bundles pure generation (generate / atlas), the contract lifecycle surface (contracts), and the clap command surface (cli). The standalone binary parses DistributedArgs and dispatches with run_distributed. Host CLIs such as hops may mount ServiceArgs and dispatch with run.

Re-exports§

pub use contracts::check_migration_history;
pub use contracts::check_migration_inventory;
pub use contracts::check_predecessor_chain;
pub use contracts::classify_release_programs;
pub use contracts::classify_snapshot_diff;
pub use contracts::close_local_contract_chain;
pub use contracts::contracts_accept;
pub use contracts::contracts_check;
pub use contracts::diff_snapshots;
pub use contracts::snapshot_from_json;
pub use contracts::ArtifactIdentity;
pub use contracts::ArtifactPredecessor;
pub use contracts::ArtifactProvenance;
pub use contracts::BaselineAvailability;
pub use contracts::ClassifiedChange;
pub use contracts::ClientDeclaration;
pub use contracts::ClientInventory;
pub use contracts::ClientProgramArtifact;
pub use contracts::ClientProgramAsset;
pub use contracts::ClientProgramDescriptor;
pub use contracts::ClientProgramSurface;
pub use contracts::ContractAcceptScope;
pub use contracts::ContractArtifactKind;
pub use contracts::ContractCatalog;
pub use contracts::ContractCheckResult;
pub use contracts::ContractDiagnostic;
pub use contracts::ContractDiagnosticCode;
pub use contracts::ContractEntry;
pub use contracts::ContractError;
pub use contracts::ContractScope;
pub use contracts::ContractsAcceptReport;
pub use contracts::ContractsCheckReport;
pub use contracts::EnvironmentPolicyReference;
pub use contracts::LifecycleDecision;
pub use contracts::MigrationDialect;
pub use contracts::MigrationEntry;
pub use contracts::MigrationFile;
pub use contracts::MigrationHistoryCheck;
pub use contracts::MigrationInventory;
pub use contracts::ObservedPredecessor;
pub use contracts::ProgramCompatibility;
pub use contracts::SafeDiagnosticValue;
pub use contracts::SemanticSnapshot;
pub use contracts::SnapshotChange;
pub use contracts::SnapshotDiff;
pub use contracts::SnapshotEntry;
pub use contracts::MAX_CATALOG_BYTES;
pub use contracts::MAX_CATALOG_DIRECTORIES;
pub use contracts::MAX_CATALOG_DIRECTORY_DEPTH;
pub use contracts::MAX_CATALOG_DIRECTORY_ENTRIES;
pub use contracts::MAX_CATALOG_ENTRIES;
pub use contracts::MAX_CATALOG_FILES;
pub use contracts::MAX_CATALOG_GLOB_MATCHES;
pub use contracts::MAX_CATALOG_JSON_DEPTH;
pub use contracts::MAX_MIGRATIONS;
pub use contracts::MAX_MIGRATION_INVENTORY_BYTES;
pub use contracts::MAX_MIGRATION_SQL_BYTES;
pub use contracts::MAX_SNAPSHOT_DEPTH;
pub use contracts::MAX_SNAPSHOT_PATHS;
pub use contracts::MAX_SNAPSHOT_VALUE_BYTES;
pub use contracts::MIGRATION_INVENTORY_PATH;
pub use contracts::MIGRATION_INVENTORY_SCHEMA_VERSION;
pub use contracts::MIGRATION_OWNER;
pub use contracts::MIGRATION_SCOPE;

Modules§

contracts
Generic contract lifecycle records used by the CLI and its future checks.

Structs§

AtlasSchemaSpec
Input for render_atlas_schema. Plain data — the caller maps its flags onto this and supplies the desired-state schema SQL.
ClientArgs
ClientCompileError
Stable, source-located error returned for every unsupported or invalid construct. The first compiler slice never silently weakens an operation.
ClientCompileInput
Complete input to one deterministic client compilation.
ClientDocument
One already-loaded GraphQL source.
ClientManifestArgs
ClientRouteRegistration
Explicit @load route fallback, keyed by the GraphQL operation name.
ClientSourceLocation
ContractsAcceptArgs
ContractsArgs
ContractsCheckArgs
DescribeArgs
DistributedArgs
Top-level standalone CLI arguments for the distributed binary.
EmbeddedFile
One file of an embedded skill, addressed relative to the skill’s folder.
EmbeddedSkill
A skill embedded in the binary at compile time.
GeneratedClientFile
GeneratedClientProject
Pure compiler output. files is sorted by portable relative path.
GeneratedFile
A single generated file: a relative path and its contents.
GeneratedOperationSummary
GeneratedProject
The result of generating a scaffold: the files to write, advisory warnings, and side effects for the caller to perform. Filesystem-agnostic.
GeneratedRoutePlan
GithubRepo
An owner/repo GitHub identifier.
ScaffoldArgs
ScaffoldError
A scaffold generation error (bad spec value).
SchemaArgs
ServiceArgs
Library adapter for embedding service-related commands under another CLI.
ServiceScaffoldSpec
What to scaffold. The pure input to generate_service_scaffold.
SkillsArgs
SkillsInitArgs
SkillsInitSpec
What to generate. The pure input to generate_skills. All paths in the output are relative to the anchor — the parent of the skills container — which is where .claude/, .agents/, and AGENTS.md belong.

Enums§

AgentHarness
Which agent harnesses to wire. codex/grok/openai/gemini/pi are aliases for agents — they all discover .agents/skills/ — and exist so users can name their tool.
AtlasDatabaseUrl
How the generated AtlasSchema reaches its target database URL.
Bus
BusTarget
Message bus backend to scaffold.
ClientRouteDiscovery
ClientSurfaceSelector
Explicit client authorization surface. This value only verifies manifest provenance; it can never relabel a broader manifest.
ContractsCommands
ContractsOutput
DistributedCommands
FileMode
File mode hint for a GeneratedFile.
Framework
GitopsPromote
GitopsPromoteTarget
GitOps promotion flavor.
ManifestFormat
Metrics
MetricsTarget
Metrics integration to scaffold.
PostCreateAction
A side effect the caller should perform after writing the generated files.
SchemaDialect
SchemaFormat
ServiceCommands
ServiceTransport
Runtime transport for the scaffolded service.
SkillsCommands
Store
StoreTarget
Read-model / schema storage target.
Transport

Functions§

compile_client
Compile one selected manifest and its colocated GraphQL sources.
embedded_skills
The registry of skills embedded in this binary.
generate_service_scaffold
Generate a Distributed service project from a spec. The public entry point.
generate_skills
Generate every entry skills init should write: the canonical <container>/skills/ tree, a per-skill symlink (or copy fallback) at each wired harness location, and the merged AGENTS.md. No I/O — the caller owns writes and per-file drift decisions.
package_name
Normalize a free-form service name to its kebab-case package/crate directory name — the same normalization generate_service_scaffold applies. Callers need this to compute a default output directory before generating.
render_atlas_schema
Render an AtlasSchema (db.atlasgo.io/v1alpha1) resource as YAML.
run
Dispatch a parsed service command. Host CLIs (for example hops service) call this without mounting the aggregate contracts surface.
run_distributed
Dispatch the standalone distributed binary command tree.