Skip to main content

Crate agentos_client

Crate agentos_client 

Source
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-native-sidecar binary and speaks the 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 agentOS language execution schema surface comes from agentos_sidecar_client::wire.

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 agent_os::PackageDescriptor;
pub use agent_os::SoftwareInfo;
pub use error::ClientError;
pub use error::ClientResult;
pub use error::ResourceLimitDetails;
pub use language_execution::CodeEvaluationResult;
pub use language_execution::CodeExecutionResult;
pub use language_execution::ContextDescriptor;
pub use language_execution::ExecutionPtyOptions;
pub use language_execution::InlineExecutionOptions;
pub use language_execution::JavaScriptExecutionOptions;
pub use language_execution::JavaScriptModuleFormat;
pub use language_execution::LanguageExecutionOptions;
pub use language_execution::LanguageSpawnOptions;
pub use language_execution::ProcessDescriptor;
pub use language_execution::TypeScriptDiagnostic;
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::node_modules_mount;
pub use config::AgentOsConfig;
pub use config::AgentOsConfigBuilder;
pub use config::AgentOsLimits;
pub use config::AgentOsPackageLimits;
pub use config::AgentOsSidecarConfig;
pub use config::ExecutionLimits;
pub use config::FsPermissionRule;
pub use config::FsPermissions;
pub use config::HostFunction;
pub use config::HostFunctionCallback;
pub use config::HostFunctionCollection;
pub use config::HostFunctionCollections;
pub use config::HostFunctionLimits;
pub use config::HttpLimits;
pub use config::JsRuntimeLimits;
pub use config::MountConfig;
pub use config::MountPlugin;
pub use config::OverlayMountConfig;
pub use config::PackageRef;
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::SidecarSqliteCallback;
pub use config::SoftwareInput;
pub use config::SoftwareKind;
pub use config::TimerScheduleDriver;
pub use config::TlsLimits;
pub use config::WasmLimits;
pub use process::ExecOptions;
pub use process::ExecResult;
pub use process::ProcessExit;
pub use process::ProcessInfo;
pub use process::ProcessOutput;
pub use process::ProcessOutputEvent;
pub use process::ProcessOutputReplay;
pub use process::ProcessStatus;
pub use process::ProcessStream;
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 net::HttpRequest;
pub use net::HttpResponse;
pub use net::HttpStreamChunk;
pub use net::HttpStreamHead;
pub use software::configure_process_package_cache;
pub use software::process_package_cache_stats;
pub use software::validate_package_source;
pub use software::InstalledSoftware;
pub use software::PackageManifestInfo;
pub use software::PackageResolver;
pub use software::PackageResolverOptions;
pub use software::PackageSource;
pub use software::ProcessPackageCacheOptions;
pub use software::ProcessPackageCacheStats;
pub use software::VerifiedPackage;
pub use software::DEFAULT_MAX_PACKAGE_BYTES;
pub use software_registry::default_registry_version;
pub use software_registry::resolve_registry_software;
pub use software_registry::ResolvedRegistrySoftware;
pub use software_registry::SoftwareRegistryOptions;
pub use software_registry::SoftwareSource;
pub use software_registry::DEFAULT_SOFTWARE_REGISTRY_URL;
pub use software_registry::SOFTWARE_REGISTRY_URL_ENV;
pub use fs::BatchReadResult;
pub use fs::BatchWriteEntry;
pub use fs::BatchWriteResult;
pub use fs::DirEntry;
pub use fs::DirEntryType;
pub use fs::DynamicMountDescriptor;
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::MountInfo;
pub use fs::ReaddirRecursiveOptions;
pub use fs::RemoveOptions;
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::ShellData;
pub use shell::ShellExit;
pub use shell::ShellHandle;
pub use shell::TerminalInfo;
pub use shell::TerminalOutputEvent;
pub use shell::TerminalSnapshot;
pub use cron::CronAction;
pub use cron::CronActionInfo;
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 AgentOs struct (all fields from ADR-001 §3), the create builder, and the shutdown (dispose) teardown.
config
Configuration types: AgentOsConfig (= TS AgentOsOptions), 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 VirtualFileSystem mount contract.
language_execution
First-class JavaScript, TypeScript, Python, and shared execution lifecycle.
net
Port-based virtual networking (fetch).
process
Process execution & management 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.
software
software_registry
Registry software resolution (= TS packages/core/src/software-registry.ts).
stream
Streaming / subscription primitives.
transport

Structs§

VmGroupConfig
VmSqliteQueryResult
VmSqliteStatement
VmUserAccountConfig
VmUserConfig
Initial Linux-style credentials and account record for processes in a VM.

Enums§

VmSqliteCallbackRequest
VmSqliteCallbackResponse
VmSqliteDescriptor
Transport used by the VM-scoped SQLite substrate.
VmSqliteValue

Constants§

CLOSED_SHELL_EXIT_CODE_RETENTION_LIMIT
Bounded exited-shell exit-code retention (for wait_shell after exit).
CRON_JOB_LIMIT
Maximum scheduled cron jobs per VM.
SHELL_DISPOSE_TIMEOUT_MS
Two-phase shell-drain timeout during dispose (milliseconds).
VM_READY_TIMEOUT_MS
VM lifecycle ready timeout during create (milliseconds).
VM_SQLITE_CALLBACK_NAMESPACE