Expand description
Keel core: bind a Policy to an EnforceBackend and a RecordSink
as a durable execution space.
Structs§
- Backend
Info - Cancellation
Token - Re-export for hosts (e.g. Zene) using
ManagedProcess::wait_with_output_cancel. A token which can be used to signal a cancellation request to one or more tasks. - Credential
Grant - Just-in-time credential handle (opaque to the agent; injected by Keel).
- FsRule
- A single filesystem rule.
- Hash
Chain Sink - Wraps an inner sink and seals each event into a SHA-256 hash chain.
- Jsonl
Sink - Append-only JSONL file sink.
- Local
Process Backend - Landlock / Seatbelt enforce backend.
- Local
Process Options - Options for
LocalProcessBackend. - Managed
Process - Process spawned under a space: stdio access + tree kill + audit on wait.
- Memory
Sink - In-memory sink for tests and demos.
- Multi
Sink - Fan-out sink.
- Network
Rule - Null
Backend - Policy
- Bound execution policy. Immutable after space creation (v0).
- Policy
Builder - Policy
Id - Process
Exit - Result of waiting on a
SpawnedProcess. - Process
Guard Backend - Record
Event - Sandbox
Config - Merged view of global + project sandbox config.
- Space
- Live execution space: one policy, one backend, one record stream.
- SpaceFs
- Filesystem facade bound to an open space.
- Space
Handle - Public handle returned after create.
- SpaceId
- Space
Options - Options for opening a space.
- Space
Path Meta - Spawn
Request - Spawned
Process - Low-level child handle with process-group / Job / AppContainer-aware wait/kill.
- TaskId
- Task
Spec - Requested changes when forking a space for a subtask.
- Worktree
Backend - Worktree isolation backend (optionally layered on another backend).
- Worktree
Options - Options for
WorktreeBackend.
Enums§
- Chain
Verify Error - Result of verifying a sequence of chained events.
- Egress
Decision - Result of an egress decision.
- Event
Kind - Exec
Policy - Whether the agent may spawn subprocesses / shells.
- FsAccess
- How a path may be accessed.
- Keel
Error - Network
Policy - Network reach for the execution space.
- Space
State - Stdio
Mode - How to connect a child’s standard stream.
- Termination
Reason - Why a managed process stopped.
Constants§
- GENESIS_
PREV - Genesis previous-hash for the first event in a chain.
Traits§
- Enforce
Backend - A live enforcement context for one space.
- Record
Sink
Functions§
- apply_
policy_ file_ and_ ready - Load policy JSON from path and apply (used by
keel sandbox-exec). - backend_
local_ process - Local-process only (no worktree).
- backend_
local_ process_ confined - Local-process with host Landlock/Seatbelt (
isolate_apply = false). Prefer [keel_core::Space::create_confined] for the full Space lifecycle. - backend_
process_ guard - Soft process-guard only.
- baseline_
deny_ rules - Full baseline deny set (paths + globs).
- check_
egress - Evaluate whether a dial to
host:portis permitted. - content_
sha256 - SHA-256 hex of arbitrary bytes (e.g. file contents written via SpaceFs).
- default_
space_ sink - Create the default on-disk JSONL sink for a space
(
~/.keel/spaces/<id>/events.jsonl). - keel_
home - Keel state directory (
$KEEL_HOMEor~/.keel). - load_
policy_ from_ sandbox_ toml - Load config for workspace and resolve a profile name.
- narrow_
policy - Build a child policy from
parent+spec. Fails if the child would expand reach. - prepare_
kernel - Validate that the policy can be mapped and the platform supports sandboxing.
- profile_
read_ only - Explore without modifying the project tree. Writes only to keel home + temps.
- profile_
strict - Narrower reach: no default world-read; workspace + essential system paths only.
- profile_
workspace - Everyday coding: broad read, write limited to workspace + keel home + temps.
- resolve_
policy_ with_ files - Resolve policy: optional explicit file path overrides name lookup.
- soft_
fs_ allowed - Soft filesystem allow check.
- soft_
fs_ resolve - Resolve a path for SpaceFs-style I/O: workspace-relative join, then
canonicalize existing paths (follows symlinks). For new paths, canonicalize
the nearest existing ancestor and rejoin the full relative suffix after it
(so
foo/bar.txtkeeps bothfoo/andbar.txt, not only the leaf). - space_
dir - Directory for one space:
~/.keel/spaces/<id>/. - space_
events_ path - Default event log path:
~/.keel/spaces/<id>/events.jsonl. - space_
policy_ path - Optional persisted policy snapshot path.
- verify_
chain - Verify an ordered event list forms a valid hash chain.
- verify_
jsonl - Load JSONL from a string and verify the chain.
- worktree_
sandboxed - Worktree + LocalProcess (kernel FS on children) — closest to Grok’s “isolated tree + OS sandbox” stack for coding agents.
- worktree_
soft - Worktree isolation only (soft process-guard inside).