Skip to main content

TEMPLATE

Constant TEMPLATE 

Source
pub const TEMPLATE: &str = r#"# A Celln cell spec.
#
# This describes the cell an agent runs in: how big it is, which tools it may
# be lent, and what it intends to run. Anything not listed here cannot execute
# inside the cell — that is the point of the file.
#
#   celln spec check agent.toml   # validate, and show what would happen
#   celln run agent.toml          # seal a cell and do it

name = "my-agent"

[cell]
# Guest memory. A cell's real cost is the pages it dirties, not the size it is
# given, so being generous here is cheap.
memory = "256MiB"

# The weakest tier a tool may be admitted at and still carry full authority:
#   forged   — rebuilt from source and signed  (minutes, background)
#   verified — upstream binary, pinned+scanned (seconds, the cold path)
#   unsealed — no attestation at all           (instant, never tool-lane)
require_tier = "verified"

# Each tool is lent to the cell as sealed, read-only memory. The guest can read
# and execute it and cannot modify it — not even as root, not even with its own
# page tables. Revoking it stops it in every running cell.
[[tool]]
alias = "/usr/bin/python"      # the name the agent uses
path = "/usr/bin/python3"      # where the bytes come from on this host
interpreter = true             # see below

# `interpreter = true` is the most consequential line in this file. An
# interpreter fed something the agent wrote is moved to the agent lane for
# that invocation, so `python evil.py` and `python -c "..."` do not get to
# launder agent-authored code into full authority. Mark interpreters as
# interpreters.

[run]
exec = "/usr/bin/python"
args = ["review.py"]
# Where the input came from:
#   none — nothing interpreted
#   tool — came in through the attestation gate
#   data — the agent wrote it  (demotes an interpreter)
input = "data"
"#;
Expand description

A starter spec, written to be read: every field is explained where it is.