Skip to main content

Module records_dir

Module records_dir 

Source
Expand description

The session’s records directory: every record the runtime writes about a session, outside the workdir the capsule’s commands can write, and kept after the session ends.

~/.murmur/records/                              0700
└── <workdir root without its leading />/       0700, each component
    └── <session-id>/                           0700, created at staging, kept after the session
        ├── trace.jsonl
        ├── blobs/<sha256>
        ├── logs/bootstrap.log | otel.log | hook-<name>.log
        ├── logs/shell-<ms>.log | <work-id>.log
        │                                       a shell command's full output
        ├── completion.json                     a delegated child's outcome
        ├── hooks/                              `.` of every hook declared
        │                                       `capabilities.filesystem.records: true`
        ├── out/result.txt | result_<task-id>.txt | compaction-summaries.jsonl
        │                                       an agent's answers and compaction summaries
        ├── tmp/                                `$TMPDIR` of every command
        ├── home/                               `$HOME` of every command, created at staging
        └── children/<capsule>-<16 hex>/        0700, a delegated child's `--workdir`

The group a session’s directory sits in is its workdir root: the directory passed to mur run --workdir, otherwise the directory holding the accessible workdir (<manifest-dir>/workdir). Neither is beneath the accessible workdir, so no capsule command can rename or replace it, and every reader given the same directory computes the same group.

The Landlock rule and sealed bind that keep it read-only to commands are the runtime directory’s (crate::runtime_dir). tmp/ and home/ are the two exceptions, granted the work folder’s rights by their own rule and bind; [crate::containment::records_dir_report] says per tier what holds. Unlike the runtime directory it is not removed when the session ends; trace.retain (crate::retention::prune_sessions) prunes it.

Structs§

RecordsDir
One session’s records directory, created at staging and kept after the session.

Constants§

HOME_SUBDIR
The directory beneath <session-id>/ that is $HOME for every shell command, plan shell step and murmur:process program, created at staging and granted the work folder’s rights.
HOOKS_SUBDIR
The directory beneath <session-id>/ a hook declared capabilities.filesystem.records: true is preopened at as ".", read-write.
RECORDS_DIR_ENV
The variable naming the records directory in every shell command’s, plan shell step’s, murmur:process program’s and transport: process harness’s environment. Runtime-owned like crate::runtime_dir::RUNTIME_DIR_ENV: no manifest, override or host value can set it.
RECORDS_DIR_NAME
~/.murmur/records, relative to the murmur home.
RESULTS_SUBDIR
The directory beneath <session-id>/ an agent’s result.txt, result_<task-id>.txt and compaction-summaries.jsonl are written to, by the runtime alone.
RESULT_FILE
RESULTS_SUBDIR’s result.txt, relative to <session-id>/.

Functions§

records_dir_root
~/.murmur/records, decided without creating anything.
records_group
The directory every session of workdir_root keeps its records in: ~/.murmur/records/<workdir_root, absolute and canonical, without its leading />. Creates nothing.
records_group_under
records_group beneath murmur_home instead of the process’s ~/.murmur, for a caller that knows the home a session ran under without it being this process’s HOME.