mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
## What changed Move completed REPL response rendering into `codex-guardian-context` and register a synchronous-only `NodeReplEvidence` section. Core supplies a borrowed view of its evidence snapshot and retains responsibility for capture, storage eviction, and the delivery cursor. Preserve the existing text and multimodal layouts, rendering bounds, omission markers, image ordering, and deduplication. Exclude evidence payloads from the rendered section's debug output. ## Testing Adapt the existing evidence tests to exercise the shared renderer. Extend registry coverage to verify synchronous-only inclusion, rendered content, and omission of evidence payloads from debug output. GitOrigin-RevId: eb181870558a7f2f77270dee7c17d36700f3e148
32 lines
1.3 KiB
Rust
32 lines
1.3 KiB
Rust
//! Section identities survive consumer-specific transcript selection and rendering.
|
|
|
|
use crate::ConversationTranscriptEntry;
|
|
use crate::PlannedAction;
|
|
use crate::PreviousReviews;
|
|
use crate::RenderedNodeReplEvidence;
|
|
use crate::TranscriptImages;
|
|
use crate::TrustedSkills;
|
|
use crate::TrustedTool;
|
|
|
|
/// Ordered evidence with a stable section identity and source-specific content.
|
|
///
|
|
/// Variants preserve provenance: transcript entries carry their original roles,
|
|
/// root messages remain line-role-labeled, and answers are host-verified fragments.
|
|
/// Conversation, authorization and action evidence retain user-role delivery.
|
|
/// Host-attested reviews and tool identities use separate developer messages.
|
|
/// Review actions/rationales and remote tool descriptions remain untrusted.
|
|
#[derive(Clone, Debug, PartialEq)]
|
|
pub enum ContextSection<T = ConversationTranscriptEntry> {
|
|
ConversationTranscript { items: Vec<T> },
|
|
RootConversation { items: Vec<String> },
|
|
TrustedUserAnswers { items: Vec<String> },
|
|
RetainedUserInstructions { items: Vec<String> },
|
|
PlannedAction(PlannedAction),
|
|
PreviousReviews(PreviousReviews),
|
|
TrustedTool(TrustedTool),
|
|
TrustedSkills(TrustedSkills),
|
|
TranscriptImages(TranscriptImages),
|
|
NodeReplEvidence(RenderedNodeReplEvidence),
|
|
PermissionContext { items: Vec<String> },
|
|
}
|