mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
791b69dd53
## What - Add a small extension capability for injecting model-visible response items into the active turn - Have the goal extension inject hidden goal-context steering when tool-finish accounting reaches `BudgetLimited` - Cover the extension backend path with an assertion on the injected steering item ## Why PR #23696 persists and emits the budget-limited goal update from tool-finish accounting, but it leaves the model unaware of that transition. The existing core runtime steers the model to wrap up in this case; the extension path should do the same through an explicit host capability. ## Testing - `just fmt` - `cargo test -p codex-goal-extension` - `cargo test -p codex-extension-api`
63 lines
2.8 KiB
Rust
63 lines
2.8 KiB
Rust
//! Context fragments injected into model input.
|
|
|
|
mod approved_command_prefix_saved;
|
|
mod apps_instructions;
|
|
mod available_plugins_instructions;
|
|
mod available_skills_instructions;
|
|
mod collaboration_mode_instructions;
|
|
mod contextual_user_message;
|
|
mod environment_context;
|
|
mod fragment;
|
|
mod goal_context;
|
|
mod guardian_followup_review_reminder;
|
|
mod hook_additional_context;
|
|
mod image_generation_instructions;
|
|
mod legacy_apply_patch_exec_command_warning;
|
|
mod legacy_model_mismatch_warning;
|
|
mod legacy_unified_exec_process_limit_warning;
|
|
mod model_switch_instructions;
|
|
mod network_rule_saved;
|
|
mod permissions_instructions;
|
|
mod personality_spec_instructions;
|
|
mod plugin_instructions;
|
|
mod realtime_end_instructions;
|
|
mod realtime_start_instructions;
|
|
mod realtime_start_with_instructions;
|
|
mod skill_instructions;
|
|
mod subagent_notification;
|
|
mod turn_aborted;
|
|
mod user_instructions;
|
|
mod user_shell_command;
|
|
|
|
pub(crate) use approved_command_prefix_saved::ApprovedCommandPrefixSaved;
|
|
pub(crate) use apps_instructions::AppsInstructions;
|
|
pub(crate) use available_plugins_instructions::AvailablePluginsInstructions;
|
|
pub(crate) use available_skills_instructions::AvailableSkillsInstructions;
|
|
pub(crate) use collaboration_mode_instructions::CollaborationModeInstructions;
|
|
pub(crate) use contextual_user_message::is_contextual_user_fragment;
|
|
pub(crate) use contextual_user_message::parse_visible_hook_prompt_message;
|
|
pub(crate) use environment_context::EnvironmentContext;
|
|
pub use fragment::ContextualUserFragment;
|
|
pub(crate) use fragment::FragmentRegistration;
|
|
pub(crate) use fragment::FragmentRegistrationProxy;
|
|
pub use goal_context::GoalContext;
|
|
pub(crate) use guardian_followup_review_reminder::GuardianFollowupReviewReminder;
|
|
pub(crate) use hook_additional_context::HookAdditionalContext;
|
|
pub(crate) use image_generation_instructions::ImageGenerationInstructions;
|
|
pub(crate) use legacy_apply_patch_exec_command_warning::LegacyApplyPatchExecCommandWarning;
|
|
pub(crate) use legacy_model_mismatch_warning::LegacyModelMismatchWarning;
|
|
pub(crate) use legacy_unified_exec_process_limit_warning::LegacyUnifiedExecProcessLimitWarning;
|
|
pub(crate) use model_switch_instructions::ModelSwitchInstructions;
|
|
pub(crate) use network_rule_saved::NetworkRuleSaved;
|
|
pub use permissions_instructions::PermissionsInstructions;
|
|
pub(crate) use personality_spec_instructions::PersonalitySpecInstructions;
|
|
pub(crate) use plugin_instructions::PluginInstructions;
|
|
pub(crate) use realtime_end_instructions::RealtimeEndInstructions;
|
|
pub(crate) use realtime_start_instructions::RealtimeStartInstructions;
|
|
pub(crate) use realtime_start_with_instructions::RealtimeStartWithInstructions;
|
|
pub(crate) use skill_instructions::SkillInstructions;
|
|
pub(crate) use subagent_notification::SubagentNotification;
|
|
pub(crate) use turn_aborted::TurnAborted;
|
|
pub(crate) use user_instructions::UserInstructions;
|
|
pub(crate) use user_shell_command::UserShellCommand;
|