//! SDK plumbing — types and the per-call registration entry point. //! //! `executor-core` is responsible for building the per-invocation Rhai //! engine and wiring stateful services into it. v1.1.0 ships the //! shapes (`Services` bundle, `SdkCallCx`, `register_all` entry point) //! but no actual services — subsequent v1.1.x PRs (KV in v1.1.1, //! docs in v1.1.2, …) extend `register_all` rather than re-threading //! plumbing through `engine.rs`. //! //! Bridge functions (`json_to_dynamic` / `dynamic_to_json`) also live //! here so service modules can convert values without `engine.rs` //! being the only home for the conversion logic. pub mod bridge; pub mod cx; pub mod dead_letters; pub mod docs; pub mod files; pub mod http; pub mod kv; pub mod pubsub; pub mod secrets; pub mod stdlib; pub use bridge::{dynamic_to_json, json_to_dynamic}; pub use cx::SdkCallCx; use std::sync::Arc; use picloud_shared::Services; use rhai::Engine as RhaiEngine; /// Single hook every v1.1.x stateful service registers into. Called /// once per invocation, just after `build_engine` constructs the /// sandboxed Rhai engine and just before script compilation. /// /// v1.1.1 wires the first stateful service (KV). Subsequent PRs add a /// single `::register(...)` line per service. pub fn register_all(engine: &mut RhaiEngine, services: &Services, cx: Arc) { kv::register(engine, services, cx.clone()); docs::register(engine, services, cx.clone()); dead_letters::register(engine, services, cx.clone()); http::register(engine, services, cx.clone()); files::register(engine, services, cx.clone()); pubsub::register(engine, services, cx.clone()); secrets::register(engine, services, cx); }