Skip to main content

Crate hm_plugin_protocol

Crate hm_plugin_protocol 

Source
Expand description

Wire-level types shared between the hm binary and hm plugins.

This crate is pure data: serde structs, enums, and the HM_PLUGIN_API_VERSION constant. It has no runtime — no async, no Extism, no Tokio. Bumping HM_PLUGIN_API_VERSION is the explicit signal that the wire format changed and plugins must be rebuilt.

Re-exports§

pub use error::ExitInfo;
pub use error::PluginError;
pub use events::BuildEvent;
pub use events::PlanSummary;
pub use events::StdStream;
pub use executor::ArchiveId;
pub use executor::ArtifactRef;
pub use executor::CacheDecision;
pub use executor::ExecutorInput;
pub use executor::SnapshotRef;
pub use executor::StepResult;
pub use hook::HookEvent;
pub use hook::HookEventKind;
pub use hook::HookOutcome;
pub use hook::HookPhase;
pub use host_abi::ArchiveReadArgs;
pub use host_abi::CallbackData;
pub use host_abi::DockerCommitArgs;
pub use host_abi::DockerExecArgs;
pub use host_abi::DockerExtractArgs;
pub use host_abi::DockerStartArgs;
pub use host_abi::KeyringArgs;
pub use host_abi::KeyringSetArgs;
pub use host_abi::KvScope;
pub use host_abi::Level;
pub use host_abi::LoopbackHandle;
pub use host_abi::LoopbackRecvArgs;
pub use host_abi::SocketHandle;
pub use host_abi::SocketReadArgs;
pub use host_abi::SocketWriteArgs;
pub use host_abi::TtyConfirmArgs;
pub use host_abi::TtyPromptArgs;
pub use ir::Cache;
pub use ir::CommandStep;
pub use ir::Pipeline;
pub use ir::Step;
pub use ir::WaitStep;
pub use manifest::Capability;
pub use manifest::ClapJson;
pub use manifest::JsonSchema;
pub use manifest::LifecycleHookSpec;
pub use manifest::OutputFormatterSpec;
pub use manifest::PluginManifest;
pub use manifest::StepExecutorSpec;
pub use manifest::SubcommandSpec;
pub use subcommand::SubcommandInput;

Modules§

error
Error and exit-info types returned by plugin capability exports.
events
Build-time events. Produced by the orchestrator (host) and fanned out to output formatters, lifecycle hooks, and (via the host re-broadcast of hm_emit_step_log) any subscriber.
executor
Wire types passed to and returned by step-executor plugins.
hook
Lifecycle hook wire types.
host_abi
Wire types used as host-function arguments and return values. Plugins import these to talk to the hm host fns; the host imports them to expose those fns.
ir
Pipeline IR, the v0 wire format consumed by the hm binary.
manifest
Plugin manifest types. A plugin advertises what it provides by returning a PluginManifest from its mandatory hm_manifest export at load time.
subcommand
Wire type for subcommand invocations.

Constants§

HM_PLUGIN_API_VERSION
Wire-format version. Plugins whose manifest reports a different version are rejected at load time. Bump when adding any new required field to any wire-level struct.