Skip to main content

Crate codex_extension_api

Crate codex_extension_api 

Source

Structs§

ConversationHistory
Raw response history snapshot available when an extension tool is invoked.
ExtensionData
Typed extension-owned data attached to one host object.
ExtensionDataInit
Typed values supplied before an ExtensionData scope is created.
ExtensionRegistry
Immutable typed registry produced after extensions are installed.
ExtensionRegistryBuilder
Mutable registry used while hosts register typed runtime contributions.
ExtensionTurnItem
Visible turn items that an extension may publish into the host lifecycle.
JsonToolOutput
LoadedUserInstructions
Result of loading host-provided user instructions.
McpServerContributionContext
Input supplied while resolving MCP server contributions.
NoopExtensionEventSink
Event sink used when the host does not expose extension event emission.
NoopResponseItemInjector
Injector used when a host does not expose same-turn model steering.
NoopTurnItemEmitter
Turn-item emitter used when a caller does not expose visible item emission.
PromptFragment
RenderedWorldStateFragment
Plain model-visible data rendered by an extension-owned World State section.
ResponsesApiTool
SkillInvocationInput
Input supplied when the host or an extension observes one skill invocation.
ThreadIdleInput
Input supplied when the host has no immediately pending thread work.
ThreadOriginator
Trusted, host-resolved billing attribution for a thread.
ThreadResumeInput
Input supplied when the host resumes an existing thread.
ThreadStartInput
Input supplied when the host starts a runtime for a thread.
ThreadStopInput
Input supplied when the host stops a thread runtime.
ToolCall
ToolEnvironment
Host-owned turn environment summary visible to extension tools.
ToolFinishInput
Input supplied when the host finishes executing one tool call.
ToolName
Identifies a callable tool, preserving the namespace split when the model provides one.
ToolStartInput
Input supplied when the host starts executing one tool call.
TurnAbortInput
Input supplied when the host aborts a turn.
TurnContextContributionInput
Host context available while extensions contribute turn-scoped context fragments.
TurnErrorInput
Input supplied when the host observes an error for a turn.
TurnInputContext
Turn facts supplied before the host records turn-local model input items.
TurnInputEnvironment
Host-owned turn environment summary visible to turn-input contributors.
TurnStartInput
Input supplied when the host starts a turn.
TurnStopInput
Input supplied when the host completes a turn.
UserInstructions
User instructions supplied by the host.
WorldStateContributionInput
Host state available while an extension contributes one sampling step’s World State.
WorldStateSectionContribution
One extension-owned World State section captured for a sampling step.

Enums§

FunctionCallError
Error returned while executing a model-visible tool invocation.
McpServerContribution
One extension-owned overlay for the runtime MCP server configuration.
PreviousWorldStateSection
What the harness knows about the previous value of one extension-owned section.
PromptSlot
ResponseItem
SkillInvocationKind
How an observed skill invocation was initiated.
ToolCallOutcome
Extension-facing outcome for a finished tool call.
ToolCallSource
Host-visible source for a model tool call.
ToolPayload
Canonical payload shapes accepted by model-visible tool runtimes.
ToolSpec
When serialized as JSON, this produces a valid “Tool” in the OpenAI Responses API.

Traits§

AgentSpawner
Constructor-injected host helper for extensions that need to spawn subagents.
ApprovalReviewContributor
Extension contribution that can claim rendered approval-review prompts.
ConfigContributor
Contributor for host-owned configuration changes.
ContextContributor
Extension contribution that adds prompt fragments during prompt assembly.
ContextualUserFragment
Context payload that is injected as a message fragment.
ExtensionEventSink
Host-provided fire-and-forget sink for extension-generated events.
McpServerContributor
Extension contribution that resolves runtime MCP servers from host config.
ResponseItemInjector
Host-provided helper for extensions that need to steer the active model turn.
SkillInvocationContributor
Contributor for skill invocations observed by the host or an owning extension.
ThreadLifecycleContributor
Contributor for host-owned thread lifecycle gates.
TokenUsageContributor
Contributor for token usage checkpoints reported by the model provider.
ToolContributor
Extension contribution that exposes native tools owned by a feature.
ToolExecutor
Shared runtime contract for model-visible tools.
ToolLifecycleContributor
Contributor for host-owned tool lifecycle gates.
ToolOutput
Model-facing output contract returned by executable tool runtimes.
TurnInputContributor
Extension contribution that can add turn-local model input.
TurnItemContributor
Ordered post-processing contribution for one parsed turn item.
TurnItemEmitter
Host-provided capability for extension tools to emit visible turn items.
TurnLifecycleContributor
Contributor for host-owned turn lifecycle gates.
UserInstructionsProvider
Loads the user instructions that apply when a root thread runtime starts.

Functions§

empty_extension_registry
Creates an empty shared registry for hosts that do not register contributions.
parse_tool_input_schema
Parse the tool input_schema or return an error for invalid schema.
parse_tool_input_schema_without_compaction
Parse a trusted tool input_schema without running large-schema compaction.

Type Aliases§

AgentSpawnFuture
Future returned by one injected subagent-spawn helper.
ExtensionFuture
Boxed, sendable future returned by asynchronous extension contributors.
LoadUserInstructionsFuture
Future returned by a UserInstructionsProvider.
ResponseItemInjectionFuture
Future returned when an extension asks the host to inject model-visible input.
ToolExecutorFuture
The boxed future returned by ToolExecutor::handle.
ToolLifecycleFuture
Future returned by one tool-lifecycle callback.
TurnItemEmissionFuture
Future returned when an extension tool emits a visible turn-item lifecycle event.