feat(cursor): cli 接入本地模型路由与配置

- feat(服务配置): 本地响应配置并禁用 HTTP/2 传输
- feat(模型目录): 提供默认模型接口及本地路由凭据
- fix(待办状态): 基于检查点合并增量待办并保留未变更项
- fix(模型参数): 忽略未知参数以兼容新版 Cursor 请求
- test(本地路由): 覆盖模型元数据路由与凭据行为
This commit is contained in:
leokun
2026-09-03 16:01:25 +08:00
parent 543f618fee
commit 924b5e5926
10 changed files with 489 additions and 11 deletions
+3 -1
View File
@@ -21,6 +21,7 @@ use cursor_server::{
proto::{agent::v1 as pb, aiserver::v1 as ai},
},
cursor::transport::TransportRegistry,
network::NetworkClients,
};
use flate2::{write::GzEncoder, Compression};
use prost::Message;
@@ -102,6 +103,7 @@ async fn bidi_append_gzip_body_is_decompressed_before_protobuf_decode() {
.as_path(),
)
.unwrap();
let clients = NetworkClients::new(store.clone());
let registry = TransportRegistry::new(
store,
Arc::new(fake_provider::FakeProvider::default()),
@@ -118,7 +120,7 @@ async fn bidi_append_gzip_body_is_decompressed_before_protobuf_decode() {
encoder.write_all(&wire).unwrap();
let compressed = encoder.finish().unwrap();
let response = cursor::router(registry)
let response = cursor::router(registry, clients)
.unwrap()
.oneshot(
Request::post("/aiserver.v1.BidiService/BidiAppend")