gsm_core/
lib.rs

1//! Greentic Messaging core contracts and value types.
2//!
3//! This crate exposes the shared data structures exchanged between ingress, runner, and egress
4//! components. It also provides validation helpers and small utilities for subject naming and
5//! idempotency tracking.
6pub mod adapter_registry;
7pub mod cards;
8#[cfg(feature = "component-host")]
9pub mod component_host;
10pub mod context;
11pub mod default_packs;
12pub mod egress;
13pub mod http;
14pub mod idempotency;
15pub mod ingress;
16pub mod interfaces;
17#[cfg(feature = "adaptive-cards")]
18pub mod messaging_card;
19pub mod oauth;
20pub mod outbound;
21pub mod platforms;
22pub mod prelude;
23pub mod provider;
24pub mod registry;
25pub mod runner_client;
26pub mod secrets_paths;
27pub mod subjects;
28pub mod telemetry;
29pub mod types;
30pub mod validate;
31pub mod worker;
32
33pub use adapter_registry::*;
34pub use cards::*;
35#[cfg(feature = "component-host")]
36pub use component_host::*;
37pub use context::*;
38pub use default_packs::*;
39pub use greentic_pack::messaging::MessagingAdapterKind;
40pub use http::*;
41pub use idempotency::*;
42pub use ingress::*;
43pub use interfaces::*;
44#[cfg(feature = "adaptive-cards")]
45pub use messaging_card::types::{
46    Action as AdaptiveAction, ImageRef as AdaptiveImageRef, MessageCard as AdaptiveMessageCard,
47    MessageCardKind as AdaptiveMessageCardKind, OauthCard as AdaptiveOauthCard,
48    OauthPrompt as AdaptiveOauthPrompt, OauthProvider as AdaptiveOauthProvider,
49};
50#[cfg(feature = "adaptive-cards")]
51pub use messaging_card::{
52    MessageCardEngine,
53    adaptive::{AdaptiveCardPayload, AdaptiveCardVersion, ValidateError, normalizer},
54    downgrade::{CapabilityProfile, DowngradeContext, DowngradeEngine, PolicyDowngradeEngine},
55    ir::{AppLink, Element, InputChoice, MessageCardIr, MessageCardIrBuilder},
56    renderers::{
57        NullRenderer, PlatformRenderer, RendererRegistry, SlackRenderer, TeamsRenderer,
58        TelegramRenderer, WebChatRenderer, WebexRenderer,
59    },
60    spec::{AuthRenderSpec, FallbackButton, RenderIntent, RenderSpec},
61    telemetry::{CardTelemetry, NullTelemetry, TelemetryEvent, TelemetryHook},
62    tier::{Tier, TierPolicy},
63};
64pub use outbound::*;
65pub use platforms::*;
66pub use prelude::*;
67pub use provider::*;
68pub use registry::*;
69pub use runner_client::*;
70pub use secrets_paths::*;
71pub use subjects::*;
72pub use telemetry::*;
73pub use types::*;
74pub use validate::*;
75pub use worker::*;
76
77/// Returns the semantic version advertised by this crate.
78///
79/// ```
80/// assert_eq!(gsm_core::version(), "0.1.0");
81/// ```
82pub fn version() -> &'static str {
83    "0.1.0"
84}