Expand description
Host side of rlm.infer and rlm.map (inference.ts): one private, bounded model conversation per frame over
explicit context views, with {calls, tokens, depth} budget accounting, contract validation and bounded re-asks,
and Incomplete observations when budget or repairs run out or timeout_ms passes. Also serves rlm.load
(content-addressed handles under the session) and rlm.frames (frame traces); every other request goes to the
inner handler.
A session’s frames share one FrameSession: the budget ledger (a nested frame draws on its parent frame’s
pool), the traces (kept as session values, so rlm.frames reads them in any later cell), and the frames still
running. With a task host (FrameTasks) every frame is an rlm-frame@1 task: admitted under its caller,
journaled, cancelled with the calling cell, charged to the usage ledger request by request; a frame with
budget.depth > 1 runs its conversation on a lane of its own with the rlm cell as its only tool.
Modules§
- payload
- What the frame path adds to a provider payload (inference.ts
beforePayload): the contract as the Claude Code CLI’sjson_schema(withContractSchema), and the output cap at the request’s tranche (capOutputTokens), whatever the API’s payload shape.
Structs§
- Frame
Execution - One
rlm-frame@1task run, as the task host hands it over (NativeFrameRun). - Frame
Session - The frames of one session; clones of the
Arcshare them. - Frames
- Serves
rlm.map,rlm.modelsand the frame-model defaults ofrlm.infer; everything else goes toinference. - Inference
- Serves
rlm.infer,rlm.loadandrlm.framesfor one lane; everything else goes toinner. - Memory
Trace Store - Traces in memory (
createMemoryFrameStore): a session without durable storage. - Model
Settings - The saved model settings (
/settings -> Models), read for every request so a change applies to the next frame.
Enums§
- Frame
Gate - What the tree-limit gate decided for a frame’s request.
Constants§
- INFERENCE_
PROMPT - The bounded-inference API description for the model’s runtime guide.
Traits§
- Frame
Tasks - The task host frames are admitted through (
NativeHostApi):rlm-frame@1tasks in the session’s task journal, the usage ledger they charge, and the lanes that frames with depth run theirrlmcells on. - Trace
Store - Where frame traces live (
FrameTraceStore): one document per key, replaced whole.
Functions§
- contract_
errors - typebox
Errors(contract, value)asparseReplywords them:"<instancePath or value> <message>". - frame_
env - The variables frames read (the frame and review models, the map token cap), with their values in
var.
Type Aliases§
- Frame
Meter - A frame conversation’s context use, once it has one.
- Model
Resolver - Resolves a
provider/modela frame names (model=,rlm.frameModel) to the model and the key its requests carry, as the session resolves a lane’s model; an error refuses the frame.