Expand description
§pf-world
Captures and restores the world a sandboxed agent inhabits: the filesystem, environment variables, in-flight subprocess state (Linux only via CRIU), and — eventually — an attached browser DOM via CDP.
See agent_docs/world-layer.md for the spec.
§What ships in Phase 2 (this commit)
WalkFsCapture: portable rayon-parallel file walker that content-addresses every file into apf_core::cas::BlobStoreand emits a tree manifest. Restorable viarestore_tree.EnvCapture: serializesstd::env::vars()+ cwd, with--scrub-env <regex>redaction.ProcsCapture: CRIU dump on Linux (shellout); on every other host a self-describing JSON placeholder peragent_docs/world-layer.md.
§What’s planned but stubbed
- macOS APFS clone fast-path via
clonefile(2): when the source dir sits on APFS,WalkFsCapture::with_apfs_clonefirst clones the dir in O(1), then walks the clone — giving a stable read-snapshot without pausing the agent. Wired but not enabled by default; seeWalkFsCapture::use_apfs_clone. - Linux overlayfs upper-dir capture: deferred to v1.1 (documented in
the v2 list of
claude-progress.json).
Re-exports§
pub use browser::BrowserBlob;pub use browser::BrowserCapture;pub use browser::PageSnapshot;pub use env::EnvCapture;pub use fs::FsEntryKind;pub use fs::FsTree;pub use fs::FsTreeEntry;pub use fs::RestoreOptions;pub use fs::WalkFsCapture;pub use fs::restore_tree;pub use fs::restore_tree_with_options;pub use procs::ProcsCapture;