Fix stale app-server protocol paths

This commit is contained in:
Eric Traut
2026-05-26 08:53:02 -07:00
parent 8a94430bb2
commit 6cc8cdb2b7
3 changed files with 4 additions and 4 deletions

View File

@@ -178,7 +178,7 @@ If you dont have the tool:
These guidelines apply to app-server protocol work in `codex-rs`, especially:
- `app-server-protocol/src/protocol/common.rs`
- `app-server-protocol/src/protocol/v2.rs`
- `app-server-protocol/src/protocol/v2/`
- `app-server/README.md`
### Core Rules
@@ -188,7 +188,7 @@ These guidelines apply to app-server protocol work in `codex-rs`, especially:
`*Params` for request payloads, `*Response` for responses, and `*Notification` for notifications.
- Expose RPC methods as `<resource>/<method>` and keep `<resource>` singular (for example, `thread/read`, `app/list`).
- Always expose fields as camelCase on the wire with `#[serde(rename_all = "camelCase")]` unless a tagged union or explicit compatibility requirement needs a targeted rename.
- Exception: config RPC payloads are expected to use snake_case to mirror config.toml keys (see the config read/write/list APIs in `app-server-protocol/src/protocol/v2.rs`).
- Exception: config RPC payloads are expected to use snake_case to mirror config.toml keys (see the config read/write/list APIs in `app-server-protocol/src/protocol/v2/`).
- Always set `#[ts(export_to = "v2/")]` on v2 request/response/notification types so generated TypeScript lands in the correct namespace.
- Never use `#[serde(skip_serializing_if = "Option::is_none")]` for v2 API payload fields.
Exception: client->server requests that intentionally have no params may use:

View File

@@ -1906,7 +1906,7 @@ Use this checklist when introducing a field/method that should only be available
At runtime, clients must send `initialize` with `capabilities.experimentalApi = true` to use experimental methods or fields.
1. Annotate the field in the protocol type (usually `app-server-protocol/src/protocol/v2.rs`) with:
1. Annotate the field in the relevant protocol type under `app-server-protocol/src/protocol/v2/` with:
```rust
#[experimental("thread/start.myField")]
pub my_field: Option<String>,

View File

@@ -54,7 +54,7 @@ Use the v2 thread and turn APIs for all new integrations. `thread/start` creates
`getConversationSummary` remains as a compatibility helper for clients that still need a summary lookup by `conversationId` or `rolloutPath`. Lookups by `conversationId` are preferred; lookups by `rolloutPath` won't work with non-local thread stores.
For complete request and response shapes, see the app-server README and the protocol definitions in `app-server-protocol/src/protocol/v2.rs`.
For complete request and response shapes, see the app-server README and the protocol definitions in `app-server-protocol/src/protocol/v2/`.
## Models