mirror of
https://github.com/openai/codex.git
synced 2026-06-03 11:52:03 +00:00
Fix stale app-server protocol paths
This commit is contained in:
@@ -178,7 +178,7 @@ If you don’t 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:
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user