Expand description
Daemon-safe runtime services.
The TUI reducer remains the correctness core, but durable concerns that a daemon or future remote client will also need live here. The first slice is SQLite-backed state for tasks, approvals, processes, and the future provider/memory/checkpoint tables.
Re-exports§
pub use atomic::write_atomic;pub use approval::ApprovalReplayResult;pub use approval::approve_and_replay;pub use approval::deny_approval;pub use checkpoint::CheckpointFile;pub use checkpoint::CheckpointManifest;pub use checkpoint::create_checkpoint;pub use checkpoint::create_checkpoint_for_task;pub use checkpoint::gc_old_checkpoint_dirs;pub use checkpoint::restore_checkpoint;pub use daemon::DEFAULT_PAIRING_TTL_DAYS;pub use daemon::clamp_pairing_ttl_days;pub use daemon::daemon_socket_path;pub use daemon::generate_pairing_token;pub use daemon::hash_pairing_token;pub use daemon::pairing_expiry_from_now;pub use daemon::request_daemon_json;pub use daemon::request_daemon_text;pub use daemon::snapshot_field_from_daemon;pub use plugin::PluginCapabilityPreview;pub use plugin::PluginManifest;pub use plugin::install_plugin_from_path;pub use plugin::plugin_capability_preview;pub use plugin::run_plugin_hooks;pub use plugin::validate_plugin_manifest;pub use plugin::write_plugin_lockfile;pub use policy::ActionRequest;pub use policy::PolicyDecision;pub use policy::PolicyEngine;pub use policy::PolicyOverride;pub use policy::PolicyOverrideDecision;pub use policy::RiskClass;pub use policy::SafetyMode;pub use policy::ToolCategory;pub use policy::is_destructive_command;pub use storage::ApprovalRecord;pub use storage::ApprovalsRepo;pub use storage::CheckpointRecord;pub use storage::CheckpointsRepo;pub use storage::CompactionRecord;pub use storage::CompactionsRepo;pub use storage::MessageRecord;pub use storage::MessagesRepo;pub use storage::NewApproval;pub use storage::NewCheckpoint;pub use storage::NewCompaction;pub use storage::NewMessage;pub use storage::NewPluginInstall;pub use storage::NewProcess;pub use storage::NewProviderProbe;pub use storage::NewSession;pub use storage::NewTask;pub use storage::NewToolRun;pub use storage::PairingTokenRecord;pub use storage::PairingTokensRepo;pub use storage::PluginInstallRecord;pub use storage::PluginsRepo;pub use storage::ProcessRecord;pub use storage::ProcessStatus;pub use storage::ProcessesRepo;pub use storage::ProviderProbeRecord;pub use storage::ProviderProbesRepo;pub use storage::RuntimeStore;pub use storage::SessionRecord;pub use storage::SessionsRepo;pub use storage::TaskPriority;pub use storage::TaskRecord;pub use storage::TaskStatus;pub use storage::TaskTimelineEvent;pub use storage::TasksRepo;pub use storage::ToolRunRecord;pub use storage::ToolRunsRepo;pub use storage::data_dir;pub use storage::try_exclusive_lock;
Modules§
Enums§
- Open
Intent - What kind of access an
open_beneathcall needs.
Functions§
- create_
dir_ all_ beneath - Confined
mkdir -pfor aroot-relative directory path: creates each missing component beneathroot, refusing to descend through a symlink that escapes (#77). On Linux:mkdirat+openat2(RESOLVE_BENEATH)per component; otherwise thecontain_within_canonical+std::fsfallback. - open_
beneath - Open
root-relativerelforintentwithout ever traversing out ofroot— closing the check-then-write TOCTOU where an intermediate directory is swapped for a symlink after a lexical path check but before the operation (#77). The returnedFileis bound to the exact inode the confinement resolved, so subsequent reads/writes can’t be redirected. - remove_
file_ beneath - Confined unlink of a
root-relative file (#77): opens the parent underRESOLVE_BENEATHandunlinkats the leaf, so a swapped-in symlink parent can’t redirect the delete outsideroot. - write_
atomic_ beneath - Atomically write
bytestoroot-relativerelwithout ever traversing out ofroot. The temp file is created andrenameat-swapped beneath the same confined directory fd as the destination (Linuxopenat2(RESOLVE_BENEATH)), so a parent dir swapped for an escaping symlink after a path check can’t redirect the write (#77), AND a crash/kill/disk-full mid-write leaves the previous file intact instead of a truncated one —open_beneath+WriteTruncategives the first guarantee but not the second. Falls back tocontain_within_canonical+ by-pathcrate::write_atomicon non-Linux / pre-openat2kernels (the same best-effort posture as the other helpers).