clap_noun_verb_deploy/
lib.rs1mod executor;
15mod gateway;
16mod policy;
17mod receipt;
18pub mod registry_executor;
19mod schema;
20
21#[cfg(feature = "container")]
22pub mod container;
23#[cfg(feature = "http")]
24pub mod http;
25#[cfg(feature = "kubernetes")]
26pub mod kubernetes;
27#[cfg(feature = "mcp")]
28pub mod mcp;
29#[cfg(feature = "container")]
30pub mod oci_builder;
31
32pub use executor::{Execution, Executor, Invocation, ProcessExecutionError, ProcessExecutor};
33pub use gateway::{Gateway, GatewayError};
34pub use policy::{
35 Admission, AdmissionError, AdmissionPolicy, AdmitValidated, CommandAllowList,
36 EnvironmentAllowList,
37};
38pub use receipt::{ExecutionRecord, ReplayError, ReplayVerification};
39pub use schema::{
40 ArgumentBehavior, ArgumentKind, ArgumentSchema, CliSchema, CommandSchema, InvocationBuildError,
41 ManifestError, ToolSchema,
42};
43
44use clap_noun_verb::CommandRegistry;
45
46#[derive(Debug, Clone)]
48pub struct Deploy {
49 schema: CliSchema,
50}
51
52impl Deploy {
53 #[must_use]
57 pub fn from_registry(registry: &CommandRegistry) -> Self {
58 Self { schema: CliSchema::from_command(®istry.build_command()) }
59 }
60
61 #[must_use]
63 pub fn from_command(command: &clap_noun_verb::Command) -> Self {
64 Self { schema: CliSchema::from_command(command) }
65 }
66
67 #[must_use]
71 pub const fn from_schema(schema: CliSchema) -> Self {
72 Self { schema }
73 }
74
75 #[must_use]
77 pub const fn schema(&self) -> &CliSchema {
78 &self.schema
79 }
80
81 #[must_use]
83 pub fn into_schema(self) -> CliSchema {
84 self.schema
85 }
86}