Expand description
§agentos-client
High-level Rust client SDK for the Agent OS native sidecar. This is a 1:1 port of the TypeScript
AgentOs client (packages/core/src/agent-os.ts): every public method, option type, return
type, event, and error maps across with identical semantics.
The client spawns the native agentos-sidecar binary and speaks the existing framed BARE
protocol over its stdio (see transport). It does NOT embed the kernel in-process and does NOT
define a new sidecar wire protocol. The generated Secure Exec schema surface comes from
secure_exec_client::wire; Agent OS layers ACP/session semantics on top of those generated wire
frames through the wrapper client.
See the companion design docs in ~/.agents/specs/rust-client-sdk/ (ADR-001, spec, reference,
checklist) for the architecture, type-mapping, error taxonomy, and streaming model.
Re-exports§
pub use agent_os::AgentOs;pub use error::ClientError;pub use error::ClientResult;pub use sidecar::AgentOsSidecar;pub use sidecar::AgentOsSidecarDescription;pub use sidecar::AgentOsSidecarPlacement;pub use sidecar::SidecarState;pub use stream::ByteStream;pub use stream::Subscription;pub use config::AcpLimits;pub use config::AgentOsConfig;pub use config::AgentOsConfigBuilder;pub use config::AgentOsLimits;pub use config::AgentOsSidecarConfig;pub use config::FsPermissionRule;pub use config::FsPermissions;pub use config::HostTool;pub use config::HttpLimits;pub use config::JsRuntimeLimits;pub use config::MountConfig;pub use config::MountPlugin;pub use config::OverlayMountConfig;pub use config::PatternPermissionRule;pub use config::PatternPermissions;pub use config::PermissionMode;pub use config::Permissions;pub use config::PluginLimits;pub use config::PythonLimits;pub use config::ResourceLimits;pub use config::RootFilesystemConfig;pub use config::RootFilesystemKind;pub use config::RootFilesystemMode;pub use config::RootLowerInput;pub use config::RulePermissions;pub use config::ScheduleCallback;pub use config::ScheduleDriver;pub use config::ScheduleEntry;pub use config::ScheduleHandle;pub use config::SidecarJsBridgeCall;pub use config::SidecarJsBridgeCallback;pub use config::SoftwareInput;pub use config::SoftwareKind;pub use config::TimerScheduleDriver;pub use config::ToolCallback;pub use config::ToolKit;pub use config::ToolLimits;pub use config::WasmLimits;pub use process::ExecOptions;pub use process::ExecResult;pub use process::ProcessInfo;pub use process::ProcessStatus;pub use process::ProcessTreeNode;pub use process::SpawnHandle;pub use process::SpawnOptions;pub use process::SpawnStdio;pub use process::SpawnedProcessInfo;pub use process::StdinInput;pub use process::TimingMitigation;pub use fs::BatchReadResult;pub use fs::BatchWriteEntry;pub use fs::BatchWriteResult;pub use fs::DeleteOptions;pub use fs::DirEntry;pub use fs::DirEntryType;pub use fs::FileContent;pub use fs::FilesystemEntry;pub use fs::FilesystemEntryEncoding;pub use fs::FilesystemSnapshotEntries;pub use fs::FilesystemSnapshotExport;pub use fs::MkdirOptions;pub use fs::MountFsOptions;pub use fs::ReaddirRecursiveOptions;pub use fs::RootSnapshotExport;pub use fs::SnapshotExportKind;pub use fs::VirtualDirEntry;pub use fs::VirtualFileSystem;pub use fs::VirtualStat;pub use shell::ConnectTerminalOptions;pub use shell::OpenShellOptions;pub use shell::ShellHandle;pub use session::AgentCapabilities;pub use session::AgentInfo;pub use session::AgentRegistryEntry;pub use session::ConfigAllowedValue;pub use session::CreateSessionOptions;pub use session::McpServerConfig;pub use session::PermissionReply;pub use session::PermissionRequest;pub use session::PromptCapabilities;pub use session::PromptResult;pub use session::ResumeSessionOptions;pub use session::ResumeSessionResult;pub use session::SessionConfigOption;pub use session::SessionId;pub use session::SessionInfo;pub use session::SessionInitData;pub use session::SessionMode;pub use session::SessionModeState;pub use json_rpc::is_unknown_session;pub use json_rpc::AcpTimeoutErrorData;pub use json_rpc::JsonRpcError;pub use json_rpc::JsonRpcId;pub use json_rpc::JsonRpcNotification;pub use json_rpc::JsonRpcResponse;pub use json_rpc::UnknownSessionErrorData;pub use cron::CronAction;pub use cron::CronEvent;pub use cron::CronJobHandle;pub use cron::CronJobInfo;pub use cron::CronJobOptions;pub use cron::CronManager;pub use cron::CronOverlap;
Modules§
- agent_
os - The
AgentOsstruct (all fields from ADR-001 §3), thecreatebuilder, and theshutdown(dispose) teardown. - config
- Configuration types:
AgentOsConfig(= TSAgentOsOptions), the permissions tree, root filesystem config, mount config, and the schedule-driver abstraction. - cron
- Cron scheduling + the
CronManager. - error
- Error taxonomy for the Agent OS client SDK.
- fs
- Filesystem methods + path guards + supporting types + the in-process
VirtualFileSystemmount contract. - json_
rpc - JSON-RPC 2.0 types used by the ACP session layer.
- net
- Port-based virtual networking (
fetch). - process
- Process execution & management methods + supporting types.
- session
- Agent sessions (ACP) methods + supporting types.
- shell
- Network (fetch) and Shell / terminal methods + supporting types.
- sidecar
AgentOsSidecar(public transport handle) + placement/description + the process-global shared pool + internal lease accounting.- stream
- Streaming / subscription primitives.
- transport
Constants§
- ACP_
PROTOCOL_ VERSION - ACP protocol version negotiated on session creation.
- CLOSED_
SESSION_ ID_ RETENTION_ LIMIT - Bounded closed-session-id set capacity (for
close_sessionidempotence). - CRON_
JOB_ LIMIT - Maximum scheduled cron jobs per VM.
- PERMISSION_
TIMEOUT_ MS - Per-request permission timeout (milliseconds).
- SHELL_
DISPOSE_ TIMEOUT_ MS - Two-phase shell-drain timeout during dispose (milliseconds).
- VM_
READY_ TIMEOUT_ MS - VM lifecycle ready timeout during
create(milliseconds).