mirror of
https://github.com/openai/codex.git
synced 2026-11-09 08:40:33 +00:00
Require content kinds for extension prompt fragments (#40177)
## What changed - Require each `PromptFragment` to include a producer-owned `ContentItemKind`. - Re-export `ContentItemKind` from `codex_extension_api` and assign stable kinds to skills, memories, examples, and test contributors. - Limit prompt slots to developer policy and developer capabilities, and combine contributed fragments into a single developer update. ## Testing - Update extension registry tests to verify fragment ordering with the new content-kind metadata. GitOrigin-RevId: ef8624a9b4ae9dce025bca9c0954d91dd8075e85
This commit is contained in:
1 parent
eff640f458
commit
546eed94ac
9 files changed
+67
-83
No files matched your search
@@ -2,6 +2,7 @@ use std::sync::Arc;
|
||||
|
||||
use codex_core::config::Config;
|
||||
use codex_extension_api::ConfigContributor;
|
||||
use codex_extension_api::ContentItemKind;
|
||||
use codex_extension_api::ContextContributor;
|
||||
use codex_extension_api::ExtensionData;
|
||||
use codex_extension_api::ExtensionFuture;
|
||||
@@ -63,7 +64,12 @@ impl ContextContributor for MemoriesExtension {
|
||||
|
||||
build_memory_tool_developer_instructions(&config.codex_home)
|
||||
.await
|
||||
.map(PromptFragment::developer_policy)
|
||||
.map(|instructions| {
|
||||
PromptFragment::developer_policy(
|
||||
instructions,
|
||||
ContentItemKind("memories.instructions".to_string()),
|
||||
)
|
||||
})
|
||||
.into_iter()
|
||||
.collect()
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user