Skip to main content

bevy_agent_remote/
lib.rs

1#![doc = include_str!("../README.md")]
2
3/// Maximum complete JSON message size, including a stdio line delimiter.
4pub const MAX_MESSAGE_BYTES: usize = 8 * 1024 * 1024;
5
6/// Maximum number of actions accepted in a single `agent.step_many` call.
7pub const MAX_ACTIONS_PER_REQUEST: usize = 1024;
8/// Maximum number of ticks accepted in a single `agent.fast_forward` call.
9pub const MAX_TICKS_PER_REQUEST: u64 = 10_000;
10/// Upper bound on asynchronous capture deadlines and watchdog lifetimes.
11pub const MAX_CAPTURE_TIMEOUT_FRAMES: u32 = 1_800;
12mod http;
13mod main_thread;
14mod operations;
15mod protocol;
16mod rpc;
17mod schema;
18mod security;
19mod server;
20mod transport;
21mod websocket;
22
23pub use main_thread::BevyRemoteControlPlugin;
24pub use operations::{OperationState, OperationStatus, OperationStatusParams};
25pub use protocol::{RpcMethod, method_params_schema, rpc_method_schema};
26pub use rpc::{
27    JsonRpcBridge, JsonRpcError, JsonRpcRequest, JsonRpcResponse, PreparedRequest,
28    timeout_frames_to_duration,
29};
30pub use schema::*;
31pub use security::{
32    AgentCapability, RPC_AUTH_ERROR, RPC_INTERNAL_ERROR, RPC_INVALID_PARAMS, RPC_INVALID_REQUEST,
33    RPC_METHOD_NOT_FOUND, RPC_PARSE_ERROR, RPC_REQUEST_TIMEOUT, RPC_SERVER_BUSY, RemoteSecurity,
34    capability_for_observation_mode,
35};
36pub use server::HttpRemoteServer;
37pub use transport::{RemoteServerLimits, RemoteServerStatus};
38
39#[cfg(test)]
40mod tests;