//! 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 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.0 ships an intentionally empty body — the call site exists so /// future PRs (KV first) drop their registration logic here rather /// than reaching into `engine.rs::build_engine`. The signature is /// locked: subsequent PRs MUST keep the same parameter shape so that /// hosts don't have to re-thread the plumbing. pub fn register_all(engine: &mut RhaiEngine, services: &Services, cx: Arc) { // Intentionally inert in v1.1.0. The unused-suppression below is a // load-bearing placeholder: future PRs replace this `let _` with // real `register_kv(engine, services, cx.clone())` calls etc. let _ = (engine, services, cx); }