Skip to main content

greentic_ext_runtime/
lib.rs

1//! Wasmtime-based runtime for Greentic Designer Extensions.
2#![forbid(unsafe_code)]
3
4pub mod broker;
5pub mod capability;
6pub mod discovery;
7mod error;
8mod ext_error;
9pub mod guardrail_map;
10mod health;
11pub mod host_bindings;
12pub mod host_ports;
13mod host_state;
14mod loaded;
15pub mod oauth;
16mod pool;
17mod runtime;
18mod runtime_deploy;
19mod runtime_dw_composer;
20mod runtime_roles;
21pub mod types;
22pub mod url_matcher;
23pub mod watcher;
24
25pub use self::broker::{Broker, BrokerError, BrokerResult};
26pub use self::capability::{CapabilityRegistry, OfferedBinding, ResolutionPlan};
27pub use self::discovery::DiscoveryPaths;
28pub use self::error::RuntimeError;
29pub use self::guardrail_map::GuardrailVerdictWire;
30pub use self::health::{ExtensionHealth, HealthReason};
31pub use self::host_ports::{
32    InMemorySecrets, KeyTranslator, SecretsBackend, SecretsError, Translator,
33};
34pub use self::host_state::HostState;
35pub use self::loaded::{ExtensionId, HostOverrides, LoadedExtension, LoadedExtensionRef};
36pub use self::runtime::{
37    ExtensionRuntime, RuntimeConfig, RuntimeEvent, WatcherGuard, contribution_tool_to_definition,
38};
39pub use self::types::{
40    BundleArtifact, BundleSession, CompileContext, DeployExtensionError, DeployJob, DeployRequest,
41    DeployStatus, Diagnostic, HostExtensionError, KnowledgeEntry, KnowledgeEntrySummary,
42    PromptFragment, RoleError, RoleSpec, Severity, TargetKind, TargetSummary, ToolDefinition,
43    ValidateResult,
44};
45pub use self::url_matcher::UrlMatcher;
46
47/// Re-export `reqwest` so consumers wiring `HostOverrides::http_client`
48/// always construct the `Client` against the same crate version this
49/// crate compiles against. Without this, a downstream crate that pulls
50/// `reqwest` at a different semver (e.g. 0.13 vs the 0.12 we depend on)
51/// produces two distinct `reqwest::blocking::Client` types and the
52/// `http_client: Some(client)` assignment fails with a confusing
53/// `expected reqwest::blocking::Client, found reqwest::blocking::Client`.
54pub use reqwest;