greentic_interfaces_host/
lib.rs

1#![deny(unsafe_code)]
2#![warn(missing_docs, clippy::unwrap_used, clippy::expect_used)]
3//! Host-facing bindings and mappers re-exported from `greentic-interfaces`.
4
5#[cfg(target_arch = "wasm32")]
6compile_error!("greentic-interfaces-host is intended for native host targets.");
7
8pub use greentic_interfaces::{bindings, mappers, validate};
9
10/// Component control and exports.
11pub mod component {
12    /// Compatibility exports for `greentic:component/component@0.4.0`.
13    pub mod v0_4 {
14        pub use greentic_interfaces::component_v0_4::*;
15    }
16    /// Describe-only schema export world `greentic:component/component@1.0.0`.
17    pub mod describe_v1 {
18        pub use greentic_interfaces::component_describe_v1::*;
19    }
20    /// Lifecycle hooks world `greentic:lifecycle/component-lifecycle@1.0.0`.
21    pub mod lifecycle_v1 {
22        pub use greentic_interfaces::component_lifecycle_v1::*;
23    }
24}
25
26/// Legacy host import bundles.
27pub mod host_import {
28    /// Host imports `0.2.0` bundle.
29    pub mod v0_2 {
30        pub use greentic_interfaces::host_import_v0_2::*;
31    }
32    /// Host imports `0.4.0` bundle.
33    pub mod v0_4 {
34        pub use greentic_interfaces::host_import_v0_4::*;
35    }
36    /// Host imports `0.6.0` bundle.
37    pub mod v0_6 {
38        pub use greentic_interfaces::host_import_v0_6::*;
39    }
40    /// Runner host bundle `greentic:host@1.0.0`.
41    pub mod runner_host_v1 {
42        pub use greentic_interfaces::runner_host_v1::*;
43    }
44}
45
46/// Pack exporters.
47pub mod pack_exports {
48    /// Pack exports `0.2.0` world.
49    pub mod v0_2 {
50        pub use greentic_interfaces::pack_export_v0_2::*;
51    }
52    /// Pack exports `0.4.0` world.
53    pub mod v0_4 {
54        pub use greentic_interfaces::pack_export_v0_4::*;
55    }
56}
57
58/// Core types.
59pub mod types {
60    /// Shared event envelope types.
61    pub mod events_v1 {
62        pub use greentic_interfaces::events_v1::*;
63    }
64    /// Core type defs for the 0.2 line.
65    pub mod types_core_v0_2 {
66        pub use greentic_interfaces::types_core_v0_2::*;
67    }
68    /// Core type defs for the 0.4 line.
69    pub mod types_core_v0_4 {
70        pub use greentic_interfaces::types_core_v0_4::*;
71    }
72}
73
74/// v1 host capability contracts.
75pub mod secrets {
76    /// `greentic:secrets/store@1.0.0` host imports.
77    pub mod store_v1 {
78        pub use greentic_interfaces::secrets_store_v1::*;
79    }
80    /// Legacy `greentic:secrets/host@0.1.0`.
81    pub mod secrets_v0_1 {
82        pub use greentic_interfaces::secrets_v0_1::*;
83    }
84}
85
86/// v1 host capability contracts.
87pub mod state {
88    pub use greentic_interfaces::state_store_v1::*;
89}
90
91/// v1 host capability contracts.
92pub mod messaging_session {
93    pub use greentic_interfaces::messaging_session_v1::*;
94}
95
96/// v1 host capability contracts.
97pub mod events_broker {
98    pub use greentic_interfaces::events_broker_v1::*;
99}
100
101/// v1 host capability contracts.
102pub mod events_source {
103    pub use greentic_interfaces::events_source_v1::*;
104}
105
106/// v1 host capability contracts.
107pub mod events_sink {
108    pub use greentic_interfaces::events_sink_v1::*;
109}
110
111/// v1 host capability contracts.
112pub mod events_bridge {
113    pub use greentic_interfaces::events_bridge_event_to_message_v1::EventToMessageBridge;
114    pub use greentic_interfaces::events_bridge_message_to_event_v1::MessageToEventBridge;
115
116    pub use greentic_interfaces::bindings::greentic_events_bridge_1_0_0_event_to_message_bridge::exports::greentic::events_bridge::bridge_api as event_to_message_bridge;
117    pub use greentic_interfaces::bindings::greentic_events_bridge_1_0_0_message_to_event_bridge::exports::greentic::events_bridge::bridge_api as message_to_event_bridge;
118}
119
120/// v1 host capability contracts.
121pub mod http_client {
122    pub use greentic_interfaces::http_client_v1::*;
123}
124
125/// v1 host capability contracts.
126pub mod telemetry {
127    pub use greentic_interfaces::telemetry_logger_v1::*;
128}
129
130/// v1 host capability contracts.
131#[cfg(feature = "oauth-broker-v1")]
132pub mod oauth_broker {
133    pub use greentic_interfaces::oauth_broker_v1::*;
134}
135
136/// v1 OAuth broker client imports.
137#[cfg(feature = "oauth-broker-v1")]
138pub mod oauth_broker_client {
139    pub use greentic_interfaces::oauth_broker_client_v1::*;
140}
141
142/// Generic worker ABI world.
143#[cfg(feature = "worker-v1")]
144pub mod worker {
145    pub use greentic_interfaces::worker_v1::*;
146}
147
148/// GUI fragment renderers implemented by components.
149#[cfg(feature = "gui-fragment")]
150pub mod gui_fragment {
151    pub use greentic_interfaces::bindings::greentic_gui_1_0_0_gui_fragment::exports::greentic::gui::fragment_api as bindings;
152    pub use bindings::FragmentContext;
153    pub use bindings::Guest as GuiFragment;
154}
155
156/// Supply-chain provider contracts.
157pub mod supply_chain {
158    /// Source provider world `greentic:source/source-sync@1.0.0`.
159    pub mod source {
160        pub use greentic_interfaces::bindings::greentic_source_1_0_0_source_sync::exports::greentic::source::source_api::*;
161    }
162    /// Build provider world `greentic:build/builder@1.0.0`.
163    pub mod build {
164        pub use greentic_interfaces::bindings::greentic_build_1_0_0_builder::exports::greentic::build::builder_api::*;
165    }
166    /// Scanner world `greentic:scan/scanner@1.0.0`.
167    pub mod scan {
168        pub use greentic_interfaces::bindings::greentic_scan_1_0_0_scanner::exports::greentic::scan::scanner_api::*;
169    }
170    /// Signing world `greentic:signing/signer@1.0.0`.
171    pub mod signing {
172        pub use greentic_interfaces::bindings::greentic_signing_1_0_0_signer::exports::greentic::signing::signer_api::*;
173    }
174    /// Attestation world `greentic:attestation/attester@1.0.0`.
175    pub mod attestation {
176        pub use greentic_interfaces::bindings::greentic_attestation_1_0_0_attester::exports::greentic::attestation::attester_api::*;
177    }
178    /// Policy evaluation world `greentic:policy/policy-evaluator@1.0.0`.
179    pub mod policy {
180        pub use greentic_interfaces::bindings::greentic_policy_1_0_0_policy_evaluator::exports::greentic::policy::policy_api::*;
181    }
182    /// Metadata store world `greentic:metadata/metadata-store@1.0.0`.
183    pub mod metadata {
184        pub use greentic_interfaces::bindings::greentic_metadata_1_0_0_metadata_store::exports::greentic::metadata::metadata_api::*;
185    }
186    /// OCI distribution world `greentic:oci/oci-distribution@1.0.0`.
187    pub mod oci {
188        pub use greentic_interfaces::bindings::greentic_oci_1_0_0_oci_distribution::exports::greentic::oci::oci_api::*;
189    }
190}
191
192/// Desired state distribution contracts.
193pub mod distribution {
194    /// `greentic:distribution/distribution@1.0.0`.
195    pub mod v1 {
196        pub use greentic_interfaces::bindings::greentic_distribution_1_0_0_distribution::exports::greentic::distribution::distribution_api::*;
197    }
198}
199
200/// Distributor API contracts.
201pub mod distributor_api {
202    /// `greentic:distributor-api/distributor-api@1.0.0`.
203    pub mod v1 {
204        pub use greentic_interfaces::bindings::greentic_distributor_api_1_0_0_distributor_api::exports::greentic::distributor_api::distributor::*;
205    }
206}
207
208/// Stable alias for messaging session imports.
209pub mod messaging {
210    pub use super::messaging_session::*;
211}
212
213/// Stable alias for HTTP client imports.
214pub mod http {
215    pub use super::http_client::*;
216}
217
218/// Stable alias for OAuth broker imports.
219#[cfg(feature = "oauth-broker-v1")]
220pub mod oauth {
221    pub use super::oauth_broker::*;
222}
223
224/// MCP router surfaces (multiple protocol snapshots).
225pub mod mcp {
226    /// `wasix:mcp@24.11.5` snapshot (2024-11-05 spec).
227    #[cfg(feature = "wasix-mcp-24-11-05-host")]
228    pub mod v24_11_05 {
229        pub use greentic_interfaces::wasix_mcp_24_11_05::*;
230    }
231
232    /// `wasix:mcp@25.3.26` snapshot with annotations/audio/completions/progress.
233    #[cfg(feature = "wasix-mcp-25-03-26-host")]
234    pub mod v25_03_26 {
235        pub use greentic_interfaces::wasix_mcp_25_03_26::*;
236    }
237
238    /// `wasix:mcp@25.6.18` snapshot with structured output/resources/elicitation.
239    #[cfg(feature = "wasix-mcp-25-06-18-host")]
240    pub mod v25_06_18 {
241        pub use greentic_interfaces::wasix_mcp_25_06_18::*;
242    }
243}
244
245/// UI action handler contracts.
246pub mod ui_actions {
247    /// UI action handler world `greentic:repo-ui-actions/repo-ui-worker@1.0.0`.
248    pub mod repo_ui_worker {
249        pub use greentic_interfaces::bindings::greentic_repo_ui_actions_1_0_0_repo_ui_worker::exports::greentic::repo_ui_actions::ui_action_api::*;
250    }
251}