Skip to main content

Crate keel_core

Crate keel_core 

Source
Expand description

Keel core: bind a Policy to an EnforceBackend and a RecordSink as a durable execution space.

Structs§

BackendInfo
CredentialGrant
Just-in-time credential handle (opaque to the agent; injected by Keel).
FsRule
A single filesystem rule.
JsonlSink
Append-only JSONL file sink.
LocalProcessBackend
Landlock / Seatbelt enforce backend.
LocalProcessOptions
Options for LocalProcessBackend.
MemorySink
In-memory sink for tests and demos.
MultiSink
Fan-out sink.
NetworkRule
NullBackend
Policy
Bound execution policy. Immutable after space creation (v0).
PolicyBuilder
PolicyId
ProcessGuardBackend
RecordEvent
SandboxConfig
Merged view of global + project sandbox config.
Space
Live execution space: one policy, one backend, one record stream.
SpaceHandle
Public handle returned after create.
SpaceId
SpaceOptions
Options for opening a space.
SpawnRequest
SpawnedProcess
TaskId
TaskSpec
Requested changes when forking a space for a subtask.
WorktreeBackend
Worktree isolation backend (optionally layered on another backend).
WorktreeOptions
Options for WorktreeBackend.

Enums§

EgressDecision
Result of an egress decision.
EventKind
ExecPolicy
Whether the agent may spawn subprocesses / shells.
FsAccess
How a path may be accessed.
KeelError
NetworkPolicy
Network reach for the execution space.
SpaceState

Traits§

EnforceBackend
A live enforcement context for one space.
RecordSink

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_process_guard
Soft process-guard only.
check_egress
Evaluate whether a dial to host:port is permitted.
default_space_sink
Create the default on-disk JSONL sink for a space (~/.keel/spaces/<id>/events.jsonl).
keel_home
Keel state directory ($KEEL_HOME or ~/.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.
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.
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).

Type Aliases§

KeelResult