Return success before scheduling the existing shutdown path, coalesce pending requests, and mark #loop invocations with SAUSAGE_LOOP=1. Keep core.exit compatibility and document explicit per-call approval for all agents. Card: SAU-134
31 lines
633 B
Rust
31 lines
633 B
Rust
//! A host for worlds of JSON-RPC plugins.
|
|
mod activation;
|
|
pub mod cargo;
|
|
mod components;
|
|
pub mod console;
|
|
mod core;
|
|
mod execution;
|
|
mod filesystem;
|
|
mod graph;
|
|
mod host;
|
|
mod journal;
|
|
mod locks;
|
|
mod native;
|
|
mod process;
|
|
mod restart;
|
|
mod routing;
|
|
pub mod runtime;
|
|
mod services;
|
|
mod upgrades;
|
|
mod watcher;
|
|
pub mod world;
|
|
pub use host::Host;
|
|
pub use native::{NativeContext, NativeFuture, NativePlugin};
|
|
pub use process::ProcessInfo;
|
|
use serde_json::{Value, json};
|
|
/// A JSON result or a JSON-RPC error object.
|
|
pub type RpcResult = Result<Value, Value>;
|
|
fn error(code: i64, text: &str) -> Value {
|
|
json!({"code":code,"message":text})
|
|
}
|