From 7dd7ddb053a377b043e9df7f3ee9547e6370d4ff Mon Sep 17 00:00:00 2001 From: jif-oai Date: Thu, 7 May 2026 22:08:46 +0100 Subject: [PATCH] nit 3 --- .../ext/extension-api/src/contributors/prompt.rs | 4 ++-- codex-rs/ext/extension-api/src/lib.rs | 14 +++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/codex-rs/ext/extension-api/src/contributors/prompt.rs b/codex-rs/ext/extension-api/src/contributors/prompt.rs index 010d91a80a..1e29b72f9e 100644 --- a/codex-rs/ext/extension-api/src/contributors/prompt.rs +++ b/codex-rs/ext/extension-api/src/contributors/prompt.rs @@ -1,4 +1,5 @@ -/// Prompt region targeted by a contributed fragment. +// All this file should be replaced by the existing fragment implementation ofc + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub enum PromptSlot { DeveloperPolicy, @@ -7,7 +8,6 @@ pub enum PromptSlot { SeparateDeveloper, } -/// One text fragment contributed to prompt assembly by an extension. (wiring not done yet on purpose) #[derive(Clone, Debug, PartialEq, Eq)] pub struct PromptFragment { slot: PromptSlot, diff --git a/codex-rs/ext/extension-api/src/lib.rs b/codex-rs/ext/extension-api/src/lib.rs index 279e5e1f25..f0b984e962 100644 --- a/codex-rs/ext/extension-api/src/lib.rs +++ b/codex-rs/ext/extension-api/src/lib.rs @@ -1,15 +1,7 @@ -//! Semantic ports and typed assembly for first-party Codex extensions. -//! -//! This crate owns the small stable assembly layer: host-independent semantic -//! ports plus the registry used to collect their implementations. Port -//! contracts should live here only once they can be expressed without pulling -//! `codex-core` internals across the boundary. - -#![forbid(unsafe_code)] - mod contributors; mod extension; mod registry; +mod state; pub use contributors::ApprovalInterceptorContributor; pub use contributors::ContextContributor; @@ -24,3 +16,7 @@ pub use contributors::ToolHandler; pub use extension::CodexExtension; pub use registry::ExtensionRegistry; pub use registry::ExtensionRegistryBuilder; +pub use state::ExtensionData; +pub use state::Stores; +pub use state::Thread; +pub use state::Turn;