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 a [pf_core::cas::BlobStore] and emits a tree manifest. Restorable via [restore_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; see [WalkFsCapture::use_apfs_clone]. - Linux overlayfs upper-dir capture: deferred to v1.1 (documented in
the v2 list of
claude-progress.json).