Skip to main content

Crate aft_base

Crate aft_base 

Source

Modules§

agent_commands
Best-effort attribution of agent shell roots over the supervised connection.
alert_records
Durable observation records for the alert channel.
alloc_trace
Names the operation behind large or bursty heap use in the daemon.
atomic_replace
Atomic publication through a pinned directory with explicit durability.
bash_env
The fixed deny list for bash.env and per-call env names.
bounded_io
Bound first access to a protection/filesystem boundary, not every file read.
build_state
Build-domain identifiers and suspension facts shared with durable readers.
cache_freshness
cache_location
Explicit durable/artifact locations and conservative cache-volume repair.
clock
Clock samples shared by execution and search timing.
cold_build_limiter
compress
Output compression for hoisted bash.
config
config_fix
The retired-key configuration migration behind aft doctor --fix and the automatic rewrite of the user config file.
config_resolve
Pure aft.jsonc tier resolver.
config_sources
Recorded configuration tiers and the paths that supplied them.
cross_volume
Moves between storage folders that may sit on different volumes.
developer_tools
Keep AFT from running Apple’s developer-tool shims on a Mac without them.
dir_identity
Filesystem identity of a directory, independent of its path spelling.
disk_floor
The free disk space AFT keeps on a storage device, and the free-space probe it is measured with. A store refuses a write that would leave less than free_disk_floor free, and records the measurement behind each refusal so the agent-facing pause message can name the sizes.
durability
Durable file commits use the platform’s full sync, including F_FULLFSYNC on macOS, or fsync when the mount does not support it. Rebuildable and process-lifetime stores deliberately do not call these sync helpers. Atomic writes select their durability explicitly. The test ledger observes the real calls, never substitutes for them.
durable_dir
Publish private durable directories before committing records inside them.
effective_path
Process-wide PATH enrichment for children spawned by AFT.
engram_catalog
AFT’s backup catalog for ENGRAM, the fleet backup service.
error
executor
feature_config
Feature-based configuration policy shared by the resolver, the configure handler and (later) the setup/doctor CLI.
file_identity
A file’s identity on its volume, for in-memory change stamps.
file_kind
What kind of content a file holds, decided once for every tool that asks.
fleet_status
Publisher for AFT’s segment on the fleet status-holder plane.
fs_lock
gh_shim_paths
git_head
Where a checkout’s Git HEAD lives and when it last changed, read from the .git directory or gitdir: marker without running Git.
git_probe
Machine-parsed Git probes that keep “this is not a repository” separate from failures whose meaning is uncertain (damaged metadata, broken refs, signals).
git_revision
Deadline- and output-bounded reads from git’s object store.
git_root_resolution
Resolve a path the user named (a tool’s path argument, which may start with ~) to the root a scan of it uses: the Git checkout containing it, or a narrow plain folder when it is in no checkout.
github_address
GitHub resource spellings must not be interpreted as filesystem paths.
grammar_state
harness
harness_partition_guard
Refuses writes into the legacy per-harness partitions <storage>/<harness>/(callgraph|inspect): a write meant for today’s storage layout must never land inside one.
host_tool_names
The names a host registers AFT’s command tool and patch tool under.
inspect_category
io_accounting
Process-wide work counters and the path context attached to I/O errors. The counters are shared by every root and by background work, so a difference between two readings can include work done for other roots.
jsonc
Helpers for preprocessing JSONC before handing it to serde_json.
jsonc_edit
Comment-preserving edits to a JSONC document.
lang_id
Language names and extension-only classification, without loading grammars.
language
large_read_counts
Shared large-read health counters, independent of the readers.
launch_nonce
The launch nonce: the secret the subc daemon gives AFT when it spawns it as a supervised module (aft --subc), which AFT presents on its HELLO and on the routes it opens as a consumer, so the daemon admits it as itself.
list_envelope
list_surfaces
live_db_files
Which file on disk each open SQLite connection is actually attached to.
lock_diagnostics
Records the current holder’s source line and acquisition time using atomics, so watchdog diagnostics never need to lock the observed mutex.
log_ctx
Thread-local session context for log lines.
log_redact
Credential masking for durable logs and background completion previews.
logging
Durable process logging and low-cost periodic performance summaries.
memory
memory_profile
Memory mode values and platform limit tables shared by configuration and runtime.
native_stat
A file’s native identity and change stamps, read from its metadata. Two equal stamps prove a file unchanged only when the filesystem reports precise times and the stamp predates the observation (see NativeStat::reusable).
ndjson_text
NDJSON text builder for standalone command responses.
no_follow_file
Open checked file paths without following replaced components.
ort_lifecycle
Keeps native ONNX Runtime work out of process exit.
ort_pin
Integrity pin for the ONNX Runtime library AFT loads at run time.
os_metadata
Operating-system metadata files that project walks and the file watcher skip.
path_identity
Project-root identity primitives for per-checkout routing and state.
pattern_compile
pending_notices
pending_response
Completion channels and wake scopes shared by deferred producers and transports.
persistence_gate
Which commands require the root’s aft.db runtime before they may execute.
pinned_dir
pinned_executable
Process-lifetime re-exec identity, independent of the deployment pathname.
platform_tls
policy_path
Filesystem identity used only for policy comparisons.
posix_spawn
Session-isolated pipe children without a fork of the daemon.
prefrontal
Recognition of Prefrontal’s reserved module identity.
privacy_spawn
macOS privacy boundary for agent commands, not AFT’s own file/index work.
process_group
Process-group isolation and cleanup for deadline-bound subprocesses.
process_identity
OS process start timestamps distinguish reused PIDs from their prior owners.
process_io
Process-wide I/O counters and snapshot payloads.
process_spawn
production_storage
Debug builds may inspect the account’s store, but must not change it. Unix protects the effective account’s passwd home, independent of HOME/XDG. Windows always protects the process token’s profile-derived LocalAppData, independent of HOME/USERPROFILE/LOCALAPPDATA. A successful shell known-folder lookup adds another root; that lookup can reflect redirected or expanded environment paths. If neither OS lookup supplies a root, writes fail closed.
project_content
Files that must not be opened as project source by indexers and walkers.
project_walk
Shared project-walk ignore policy without request-local state.
protocol
pty_render
query_shape
read_policy
Runtime-supplied path authorization for lower-layer readers.
registration
Consumer identity readiness shared with the daemon registration channel.
runner_status_state
Coalesced per-session status values; transport and publication stay with the consumer.
scope_watch_events
secret
The secret vault seam and its consent adapter.
secret_proxy
A command-private CONNECT proxy. The launcher supplies only scanned, resolved labels and arms the new command session before releasing the child. The job owner retains the handle and reports process-tree end or the end of the configured lifetime SecretScope, either of which stops the proxy. The armed leader’s start time pins its generation. Loss or replacement of that leader also stops the proxy, even if orphaned descendants remain. Each proxy admits at most 16 connections and 32 in-flight requests/streams. Sockets have a 30-second activity-based idle timeout (also the TCP connect deadline). Response coding depth is at most four. At most 32 label/key matcher sets and 4096 bytes per material value are accepted; old matchers are never evicted to make room. JSON input remains capped at 1 MiB and grows only as body bytes arrive. Limits refuse new work rather than weaken scrub. On an approved target, a header placeholder whose label was not granted at launch refuses by label and host without fetching material. It is not added to the command’s substitution set. Other destinations remain literal.
shared_timer
Process-wide deadlines. Callbacks only check state or enqueue work: blocking I/O and cache destruction belong on the caller’s existing work pool.
shell_format
Stateless text primitives shared by shell persistence and reply renderers.
stage_timer
Wall-clock timing of the stages inside one longer operation, for profiling by hand.
storage_path
subc_config
Subc-mode local config read (subc edge only).
symbols
system_temp
task_temp_reads
Open scratch content without letting a replaced symlink widen a read grant.
task_watch_lines
Bounded, line-oriented delivery for opt-in asynchronous watches.
task_watches
tool_gate
Dispatch-time enforcement of disabled_tools.
tool_path
Cross-platform tool binary resolution on PATH and well-known install dirs.
tool_progress
A call-scoped, non-blocking progress channel. Completed work and live child supervision report here; a blocked observation must not report progress.
url_fetch
view_storage_reserve
volume
The volume and boot a path lives on: which mounted filesystem holds it, that filesystem’s identity, and this boot’s identity. Path identity uses them to tell a project root from a volume root, the consent probe to judge a directory’s scope, the cache location check to notice a cache folder that moved to another disk, and speech process identities to tell one boot’s process ids from another’s.
walk_boundary
Filesystem-boundary guards for recursive directory walks.
watcher_markers
Filename protocols reserved for watcher acknowledgments, not project content.
windows_command
Safe Windows process invocation for .cmd and .bat wrapper scripts.
windows_path
Windows extended-length path normalization.
worker_jail_canary
A kernel-enforced marker that tells the gh shim it runs inside AFT’s own worker jail.
write_counters
Process-wide attribution of AFT-owned writes.
write_intent
Synchronous write intent around every AFT filesystem mutation.

Macros§

slog_debug
Log at DEBUG level with the optional [ses_xxx] session tag.
slog_error
Log at ERROR level with the optional [ses_xxx] session tag.
slog_info
Log at INFO level with the optional [ses_xxx] session tag.
slog_warn
Log at WARN level with the optional [ses_xxx] session tag.