extension: add initial typed extension API (#21736)

## Why

`codex-core` still owns a growing amount of product-specific behavior.
This PR starts the extraction path by introducing a small, typed
first-party extension seam: features can install the contribution
families they actually own, while the host keeps lifecycle and state
ownership instead of pushing a broad service locator into the API.

See the `examples/` for illustration

## Known limitations
* Tool contract definition will be shared with core
* Fragments must be extracted
* Missing some contributors
This commit is contained in:
jif-oai
2026-05-11 11:06:24 +02:00
committed by GitHub
parent 2abdeb34d5
commit d2c3ebac1f
14 changed files with 648 additions and 0 deletions

10
codex-rs/Cargo.lock generated
View File

@@ -2816,6 +2816,16 @@ dependencies = [
"syn 2.0.114",
]
[[package]]
name = "codex-extension-api"
version = "0.0.0"
dependencies = [
"codex-protocol",
"codex-tools",
"serde_json",
"thiserror 2.0.18",
]
[[package]]
name = "codex-external-agent-migration"
version = "0.0.0"