Commit Graph
6988 Commits
Author SHA1 Message Date
Michael Bolin 7f6baaa1fd merge commit for archive created by Sapling 2026-02-02 11:03:31 -08:00
Michael Bolin 82792e49af feat: migrate MCP implementation from mcp-types to rmcp 2026-02-02 11:03:02 -08:00
Michael Bolin 7d80b9a910 merge commit for archive created by Sapling 2026-02-02 10:00:58 -08:00
Michael Bolin 0e0969df95 chore: remove deprecated mcp-types crate 2026-02-02 10:00:35 -08:00
Michael Bolin 0ae34768da feat: migrate MCP implementation from mcp-types to rmcp 2026-02-02 10:00:35 -08:00
Michael Bolin a03b20bd55 merge commit for archive created by Sapling 2026-02-02 08:41:42 -08:00
Michael Bolin fc7ebe2c9b chore: remove deprecated mcp-types crate 2026-02-02 08:41:32 -08:00
Michael Bolin 9177b966e4 feat: migrate MCP implementation from mcp-types to rmcp 2026-02-02 08:41:32 -08:00
Michael Bolin d1e71cd202 feat: add MCP protocol types and rmcp adapters (#10356)
Currently, types from our custom `mcp-types` crate are part of some of
our APIs:


https://github.com/openai/codex/blob/03fcd12e77fedf4fa327af27e2e476e1ebc5f651/codex-rs/app-server-protocol/src/protocol/v2.rs#L43-L46

To eliminate this crate in #10349 by switching to `rmcp`, we need our
own wrappers for the `rmcp` types that we can use in our API, which is
what this PR does.

Note this PR introduces the new API types, but we do not make use of
them until #10349.





---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/10356).
* #10357
* #10349
* __->__ #10356
2026-02-02 08:41:02 -08:00
jif-oai 4f1cfaf892 fix: Rfc3339 casting (#10386) 2026-02-02 13:33:28 +00:00
jif-oai e9a774e7ae fix: thread listing (#10383) 2026-02-02 12:52:49 +00:00
jif-oai 4971e96a98 nit: shell snapshot retention to 3 days (#10382) 2026-02-02 12:52:45 +00:00
jif-oai 3cc9122ee2 feat: experimental flags (#10231)
## Problem being solved
- We need a single, reliable way to mark app-server API surface as
experimental so that:
  1. the runtime can reject experimental usage unless the client opts in
2. generated TS/JSON schemas can exclude experimental methods/fields for
stable clients.

Right now that’s easy to drift or miss when done ad-hoc.

## How to declare experimental methods and fields
- **Experimental method**: add `#[experimental("method/name")]` to the
`ClientRequest` variant in `client_request_definitions!`.
- **Experimental field**: on the params struct, derive `ExperimentalApi`
and annotate the field with `#[experimental("method/name.field")]` + set
`inspect_params: true` for the method variant so
`ClientRequest::experimental_reason()` inspects params for experimental
fields.

## How the macro solves it
- The new derive macro lives in
`codex-rs/codex-experimental-api-macros/src/lib.rs` and is used via
`#[derive(ExperimentalApi)]` plus `#[experimental("reason")]`
attributes.
- **Structs**:
- Generates `ExperimentalApi::experimental_reason(&self)` that checks
only annotated fields.
  - The “presence” check is type-aware:
    - `Option<T>`: `is_some_and(...)` recursively checks inner.
    - `Vec`/`HashMap`/`BTreeMap`: must be non-empty.
    - `bool`: must be `true`.
    - Other types: considered present (returns `true`).
- Registers each experimental field in an `inventory` with `(type_name,
serialized field name, reason)` and exposes `EXPERIMENTAL_FIELDS` for
that type. Field names are converted from `snake_case` to `camelCase`
for schema/TS filtering.
- **Enums**:
- Generates an exhaustive `match` returning `Some(reason)` for annotated
variants and `None` otherwise (no wildcard arm).
- **Wiring**:
- Runtime gating uses `ExperimentalApi::experimental_reason()` in
`codex-rs/app-server/src/message_processor.rs` to reject requests unless
`InitializeParams.capabilities.experimental_api == true`.
- Schema/TS export filters use the inventory list and
`EXPERIMENTAL_CLIENT_METHODS` from `client_request_definitions!` to
strip experimental methods/fields when `experimental_api` is false.
2026-02-02 11:06:50 +00:00
jif-oai 9513f18bfe chore: collab experimental (#10381) 2026-02-02 10:57:44 +00:00
pap-openai 1644cbfc6d Session picker shows thread_name if set (#10340)
- shows names of threads in the ResumePicker used by `/resume` and
`codex resume` if set, default to preview (previous behaviour) if none
- adds a `find_thread_names_by_ids` that maps names to IDs in
`codex-rs/core/src/rollout/session_index.rs`. It reads sequentially in
normal (instead of reverse order in `codex resume <name>`) the index
mapping file. This function is called from a list of session (default
page is 25, pages loaded depends of height of terminal), for which most
of them will always have at least one session unnamed and require the
whole file to be read therefore. Could be better and sqlite integration
will make this better
- those reads won't be needed when leveraging sqlite
 

Opened questions:
- We could rename the TUI "Conversation" column to "Name" or "Thread"
that would feel more accurate. Could be a fast-follow if we implement
auto-naming as it'll always be a name instead?
2026-02-02 08:13:17 +00:00
Michael Bolin 9b2ce7e5f9 merge commit for archive created by Sapling 2026-02-01 23:46:03 -08:00
Michael Bolin 4f8662d796 chore: remove deprecated mcp-types crate 2026-02-01 23:45:54 -08:00
Michael Bolin 3276401a96 feat: migrate MCP implementation from mcp-types to rmcp
***
feat: add MCP protocol types and rmcp adapters
2026-02-01 23:45:38 -08:00
Michael Bolin 1851fd27ae feat: add MCP protocol types (ts/JsonSchema friendly) 2026-02-01 23:38:51 -08:00
Michael Bolin 974355cfdd feat: vendor app-server protocol schema fixtures (#10371)
Similar to what @sayan-oai did in openai/codex#8956 for
`config.schema.json`, this PR updates the repo so that it includes the
output of `codex app-server generate-json-schema` and `codex app-server
generate-ts` and adds a test to verify it is in sync with the current
code.

Motivation:
- This makes any schema changes introduced by a PR transparent during
code review.
- In particular, this should help us catch PRs that would introduce a
non-backwards-compatible change to the app schema (eventually, this
should also be enforced by tooling).
- Once https://github.com/openai/codex/pull/10231 is in to formalize the
notion of "experimental" fields, we can work on ensuring the
non-experimental bits are backwards-compatible.

`codex-rs/app-server-protocol/tests/schema_fixtures.rs` was added as the
test and `just write-app-server-schema` can be use to generate the
vendored schema files.

Incidentally, when I run:

```
rg _ codex-rs/app-server-protocol/schema/typescript/v2
```

I see a number of `snake_case` names that should be `camelCase`.
2026-02-01 23:38:43 -08:00
Dylan Hurd 08a5ad95a8 fix(personality) prompt patch (#10375)
## Summary
We had 2 typos in #10373

## Testing
- [x] unit tests pass
2026-02-01 23:32:07 -08:00
Michael Bolin 1c6d4feaa8 merge commit for archive created by Sapling 2026-02-01 23:24:09 -08:00
Michael Bolin d75cd60fcb Remove stray .snap.new filtering from schema fixtures reader
Motivation:
- `codex-app-server-protocol` schema fixtures are not insta snapshots.
- Filtering `*.snap.new` is confusing and risks hiding real files.

What changed:
- Remove the `.snap.new` filename special case in `read_schema_fixture_tree`.

Refs: macOS Bazel schema fixture mismatch investigation
2026-02-01 23:24:03 -08:00
Michael Bolin 9097d74cd8 merge commit for archive created by Sapling 2026-02-01 23:05:17 -08:00
Michael Bolin 5be57b490e Remove stray .snap.new filtering from schema fixtures reader
Motivation:
- `codex-app-server-protocol` schema fixtures are not insta snapshots.
- Filtering `*.snap.new` is confusing and risks hiding real files.

What changed:
- Remove the `.snap.new` filename special case in `read_schema_fixture_tree`.

Refs: macOS Bazel schema fixture mismatch investigation
2026-02-01 23:05:10 -08:00
Dylan Hurd a90ff831e7 chore(core) gpt-5.2-codex personality template (#10373)
## Summary
Consolidate prompts

## Testing
- [x] Existing tests pass
2026-02-01 22:54:12 -08:00
Michael Bolin 07d3fc6077 merge commit for archive created by Sapling 2026-02-01 22:50:35 -08:00
Michael Bolin dfdf5e9def Remove stray .snap.new filtering from schema fixtures reader
Motivation:
- `codex-app-server-protocol` schema fixtures are not insta snapshots.
- Filtering `*.snap.new` is confusing and risks hiding real files.

What changed:
- Remove the `.snap.new` filename special case in `read_schema_fixture_tree`.

Refs: macOS Bazel schema fixture mismatch investigation
2026-02-01 22:48:50 -08:00
Michael Bolin e7d0954b24 Merge c2828d9774 into sapling-pr-archive-bolinfest 2026-02-01 22:41:39 -08:00
Michael Bolin c2828d9774 Avoid JSON-schema canonicalization (preserve field order)
Motivation:
- App-server JSON schema output is already stable; sorting object keys is unnecessary.
- Alphabetical key canonicalization is potentially harmful because it obscures intentional ordering (e.g. struct field order) and makes diffs noisier.

What changed:
- Remove JSON key-sorting from schema emission.
- Regenerate vendored JSON schema fixtures.

Refs: openai/codex#8956 (fixture sync test pattern)
2026-02-01 22:40:15 -08:00
Michael Bolin af40fe7abc merge commit for archive created by Sapling 2026-02-01 22:35:22 -08:00
Michael Bolin 989b5a647d Fix clippy in app-server schema fixture test
Motivation:
- `cargo clippy --tests` is run in CI with `-D clippy::expect-used`; the new schema fixture test used `expect()`.

What changed:
- Convert test helpers to return `anyhow::Result` and add context instead of using `expect()`.

Refs: 3b069fda39 (schema fixture vendoring commit)
2026-02-01 22:28:28 -08:00
Michael Bolin dfe883c9ef merge commit for archive created by Sapling 2026-02-01 22:23:03 -08:00
Michael Bolin 3b069fda39 Vendor app-server protocol schema fixtures
Motivation:
- Keep `codex app-server` protocol artifacts (TypeScript + JSON Schema) checked in for consumers (e.g. IDE integrations) and make changes reviewable.
- Prevent drift between generated output (`codex app-server generate-ts` / `codex app-server generate-json-schema`) and what is vendored in the repo.

What changed:
- Vendor generated artifacts under `codex-rs/app-server-protocol/schema/typescript/` and `codex-rs/app-server-protocol/schema/json/`.
- Add `just write-app-server-schema` to fully regenerate fixtures (including deleting stale files).
- Add a fixture sync test for `codex-app-server-protocol` to assert the vendored trees match freshly generated output.
- Canonicalize JSON schema output (sorted object keys) for deterministic diffs.
- Wire Bazel test data so remote tests can read the vendored fixtures.

Refs: openai/codex#8956 (config.schema.json vendoring + sync test pattern)
2026-02-01 22:22:25 -08:00
Michael Bolin e3a75d8288 merge commit for archive created by Sapling 2026-02-01 21:35:11 -08:00
Michael Bolin 2063d61273 chore: remove deprecated mcp-types crate 2026-02-01 21:27:38 -08:00
Michael Bolin dbb97b1ce9 feat: migrate MCP implementation from mcp-types to rmcp
***
feat: add MCP protocol types and rmcp adapters
2026-02-01 21:27:38 -08:00
Michael Bolin 1ccba470cb merge commit for archive created by Sapling 2026-02-01 21:07:03 -08:00
Dylan Hurd 6c22360bcb fix(core) Deduplicate prefix_rules before appending (#10309)
## Summary
We ideally shouldn't make it to this point in the first place, but if we
do try to append a rule that already exists, we shouldn't append the
same rule twice.

## Testing
- [x] Added unit test for this case
2026-02-01 20:30:38 -08:00
Michael Bolin db4a855318 chore: remove deprecated mcp-types crate 2026-02-01 19:58:08 -08:00
Michael Bolin cffa4bc4fe feat: migrate MCP implementation from mcp-types to rmcp
***
feat: add MCP protocol types and rmcp adapters
2026-02-01 19:58:08 -08:00
Michael Bolin d8e2e706eb merge commit for archive created by Sapling 2026-02-01 19:50:57 -08:00
Michael Bolin cecd6caccf feat: add MCP protocol types (ts/JsonSchema friendly) 2026-02-01 19:44:58 -08:00
Michael Bolin dbf41653da chore: remove deprecated mcp-types crate 2026-02-01 19:44:58 -08:00
Michael Bolin 8ce41a48e5 feat: migrate MCP implementation from mcp-types to rmcp
***
feat: add MCP protocol types and rmcp adapters
2026-02-01 19:44:58 -08:00
Michael Bolin e34851baf0 merge commit for archive created by Sapling 2026-02-01 19:13:42 -08:00
Michael Bolin dae183ce3f chore: remove deprecated mcp-types crate 2026-02-01 19:08:53 -08:00
Michael Bolin c14c2ce6a0 feat: migrate MCP implementation from mcp-types to rmcp 2026-02-01 19:08:53 -08:00
Michael Bolin 5e9ceccc40 feat: add MCP protocol types and rmcp adapters 2026-02-01 19:08:53 -08:00
pakrym-oai 03fcd12e77 Do not append items on override turn context (#10354) 2026-02-01 18:51:26 -08:00