1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// LIMITATION: No std::env::var in service binaries
// Config flows through the initialize handshake (ServiceInitializeParams.options),
// not through environment variables. Service binaries must NOT read config
// from std::env::var because: (1) the supervisor controls the subprocess environment,
// (2) env vars set on the subprocess are visible in /proc/<pid>/environ, and
// (3) the initialize handshake provides a typed, validated config path.
// See also: AGENTS.md §Anti-Patterns
//! Service SDK for anyclaw.
//!
//! Provides the [`Service`] trait for building infrastructure service extensions
//! and [`ServiceHarness`] for JSON-RPC stdio framing and method dispatch.
//!
//! # Stability
//!
//! This crate is **unstable** — APIs may change between releases.
//! Enums marked `#[non_exhaustive]` will have new variants added; match arms must include `_`.
/// Error types for service SDK operations.
/// JSON-RPC stdio harness that drives a [`Service`] implementation.
// D-03 boundary: initialize params/result contain service-defined options and installation data.
// D-03 boundary: JSON-RPC wire types use serde_json::Value for extensible params/result/data.
/// The [`Service`] trait that service authors implement.
// D-03 boundary: handle_unknown params/return are Value — unknown methods have no schema
/// Types for the service initialize handshake and health reporting.
// D-03 boundary: options and installation values are service-defined, no fixed schema.
pub use ServiceSdkError;
pub use ServiceHarness;
pub use Service;
pub use *;