Skip to main content

Module context_frame

Module context_frame 

Source
Expand description

Immutable context-frame event object.

ContextFrame stores one durable piece of incremental workflow context.

§How to use this object

  • Create one frame whenever an incremental context fact should survive history: intent analysis, step summary, code change, checkpoint, tool call, or recovery note.
  • Attach intent_id, run_id, plan_id, and step_id when known so the frame can be joined back to analysis or execution history.
  • Persist each frame independently instead of mutating a shared pipeline object.

§How it works with other objects

  • Intent.analysis_context_frames freezes the analysis-time context set used to derive one IntentSpec revision.
  • Plan.context_frames freezes the planning-time context set.
  • PlanStepEvent.consumed_frames and produced_frames express runtime context flow.
  • Libra’s live context window is a projection over stored frame IDs.

§How Libra should call it

Libra should store every durable context increment as its own ContextFrame, then maintain a separate in-memory or database-backed window of which frame IDs are currently active.

Structs§

ContextFrame
Immutable incremental context record.

Enums§

FrameKind