mirror of
https://github.com/openai/codex.git
synced 2026-05-03 12:52:11 +03:00
[codex] Add remote thread store implementation (#17826)
- Add a "remote" thread store implementation - Implement the remote thread store as a thin wrapper that makes grpc calls to a configurable service endpoint - Implement only the thread/list method to start - Encode the grpc method/param shape as protobufs in the remote implementation A wart: the proto generation script is an "example" binary target. This is an example target only because Cargo lets examples use dev-dependencies, which keeps tonic-prost-build out of the normal codex-thread-store dependency surface. A regular bin would either need to add proto generation deps as normal runtime deps, or use a feature-gated optional dep, which this repo’s manifest checks explicitly reject.
This commit is contained in:
14
codex-rs/thread-store/examples/generate-proto.rs
Normal file
14
codex-rs/thread-store/examples/generate-proto.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let proto_dir = PathBuf::from(std::env::args().nth(1).expect("proto dir"));
|
||||
let proto_file = proto_dir.join("codex.thread_store.v1.proto");
|
||||
|
||||
tonic_prost_build::configure()
|
||||
.build_client(true)
|
||||
.build_server(true)
|
||||
.out_dir(&proto_dir)
|
||||
.compile_protos(&[proto_file], &[proto_dir])?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user