Skip to main content

Module cell

Module cell 

Source
Expand description

One cell’s tool result text: UltronRlmKernel.executeCell (experimental/session-worker.ts) over truncateToolOutput (ultron/rlm/output-truncation.ts) and maskCellOutputCounted (ultron/rlm/output-secrets.ts).

A cell’s stdout, stderr and value are joined by newlines, secrets are masked, and an oversized text keeps its head and tail (the whole text spilled to a private file when a spill directory is given). A failed cell becomes CellFailure: what it printed, then the traceback.

Structs§

CellFailure
A cell that raised (RlmCellError): the message is the output and traceback; ename the exception type.
CellFormat
How a cell’s text is finished: the masker, ULTRON_MASK_SECRETS, the byte budget and the spill directory.
CellOutput
A cell’s tool result: its text and how many secrets were masked in it.

Constants§

SPILL_KEEP

Functions§

cell_output
executeCell’s text for a kernel result.
spill_output
spillOutput: text in a new 0600 file in the 0700 dir, dropping the oldest .txt files beyond SPILL_KEEP; the path, or None when it cannot be written.
truncate_tool_output
truncateToolOutput: keep the head and tail of text within max_bytes (UTF-8) and say what was elided.