Align ephemeral context with fragment conventions

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-13 12:22:26 -07:00
co-authored by Codex
parent cc2e3e4996
commit bbb827666f
7 changed files with 104 additions and 72 deletions
+5 -4
View File
@@ -18,10 +18,11 @@
//! - `DeveloperContextRole` for developer guidance/policy
//! - `ContextualUserContextRole` for contextual user-role state that must be
//! parsed as context rather than literal user intent
//! - If the fragment is durable turn/session state that should rebuild across
//! resume, compaction, backtracking, or fork, implement `build(...)` for the
//! common zero-or-one case, or override `build_many(...)` when a fragment
//! source needs to emit multiple content items from one turn-state source.
//! - If the fragment is turn/session state that should be rebuilt from the
//! current `TurnContext` during initial-context assembly or diffing,
//! implement `build(...)` for the common zero-or-one case, or override
//! `build_many(...)` when a fragment source needs to emit multiple content
//! items from one turn-state source.
//! `reference_context_item` is the baseline already represented in
//! model-visible history; compare against it to avoid duplicates, and use
//! `TurnContextDiffParams` for other runtime/session inputs such as