Expand description
Helpers shared across stdlib libraries.
Constants§
- MAX_
DESCRIPTION_ CHARS - Characters a
Model.descriptionmay carry into a guest model’s model-selection reasoning.
Functions§
- check_
security - Call at the top of each gated host fn body — after argument parsing,
before any I/O. Attributes the call to whoever’s code is running, via
[
running_package]. A denial surfaces to the guest as a catchablePermissionDeniedError. - contain_
trap - The single translation from a containment failure to a guest-visible trap. Every escape reaches the guest as the same diagnostic regardless of which operation hit it, so an LLM reading one recognises the rest.
- resolve_
content_ or_ trap - Resolve a guest path for an operation that reaches its contents — every component, including the last, traversed under containment.
- resolve_
link_ or_ trap - Resolve a guest path for an operation that acts on the link itself — the final component is never followed.
- write_
target_ trap - Distinguish a missing parent from an escaping one at the point a write first touches the filesystem.