Skip to main content

Module openshell

Module openshell 

Source
Expand description

OpenShell projection: the Cell IR becomes an NVIDIA OpenShell sandbox policy plus the parameters OpenShell keeps outside the policy.

This is an execution-policy view of the same CellIr the cell target renders; there is no second reading of the .sea source. Targets the OpenShell policy schema version: 1 as shipped in OPENSHELL_VERSION.

What OpenShell enforces, and when (its own split, not ours):

  • filesystem_policy, landlock, process: fixed at sandbox startup.
  • network_policies: may be updated on a running sandbox.
  • CPU, memory and disk: not in the policy at all. The MicroVM driver takes them as the VM shape in the gateway’s [openshell.drivers.vm] table; container drivers take CPU and memory at creation and have no disk limit.
  • Execution timeout: per exec call.

Anything the Cell requires that OpenShell cannot enforce is a typed OpenShellProjectionError::Unrepresentable or, where the executor can discharge it, an entry under obligations in sandbox.json. Nothing is omitted, and no rule is emitted in audit mode or with a wildcard.

Output (deterministic; only openshell.lock carries created_at):

policy.yaml          OpenShell policy; also the boundary the effective
                     policy is checked against
sandbox.json         VM shape, exec timeout, workspace, probes, obligations
mapping-report.json  source Cell element for every enforcement rule
openshell.lock       binds the artifacts to the Cell and model identity

Enums§

OpenShellProjectionError

Constants§

LOCK_FILE
LOCK_SCHEMA
MAPPING_FILE
MAPPING_SCHEMA
OPENSHELL_VERSION
OpenShell release whose policy schema and CLI this projection targets.
POLICY_FILE
PROJECTION_VERSION
SANDBOX_FILE
SANDBOX_SCHEMA

Functions§

emit
Emit the OpenShell projection into sink; returns the emitted relative paths.
project_openshell_in_memory
Binding surface: source in, path→content map out, no filesystem.