Skip to main content

anyclaw_sdk_runtime/
lib.rs

1//! Runtime SDK for anyclaw.
2//!
3//! Provides the [`Runtime`] trait for building runtime extensions that manage
4//! agent sandbox environments (containers, VMs, etc.) and the
5//! [`RuntimeHarness`] for JSON-RPC stdio framing.
6//!
7//! A runtime extension is responsible for:
8//! - Creating and managing the execution environment (container, network, proxy)
9//! - Providing process execution capability via [`Runtime::exec`]
10//! - Health reporting and graceful shutdown
11//!
12//! The supervisor uses `exec()` to spawn agent worker processes inside the
13//! runtime environment. All internal infrastructure (proxy, networking, auth)
14//! is the runtime's concern — the supervisor only sees the trait interface.
15//!
16//! # Stability
17//!
18//! This crate is **unstable** — APIs may change between releases.
19#![warn(missing_docs)]
20
21/// Error types for runtime SDK operations.
22pub mod error;
23/// The [`Runtime`] trait that runtime authors implement.
24pub mod trait_def;
25/// Types for the runtime initialize handshake, exec, and health reporting.
26// D-03 boundary: options values are runtime-defined, no fixed schema.
27#[allow(clippy::disallowed_types)]
28pub mod types;
29
30pub use error::RuntimeSdkError;
31pub use trait_def::Runtime;
32pub use types::*;