feat: webfetch

This commit is contained in:
leookun
2026-08-30 11:54:32 +08:00
parent 66ac94d5b1
commit 2ff74bc6a8
11 changed files with 185 additions and 28 deletions
+2
View File
@@ -31,6 +31,7 @@ pub fn router(registry: TransportRegistry) -> Result<Router> {
}
fn router_with_proxy(registry: TransportRegistry, proxy: CursorProxy) -> Router {
let web_cache = registry.web_cache().router();
Router::new()
.route("/__byok-api__/healthz", get(health))
.route("/agent.v1.AgentService/RunSSE", post(run_sse_handler))
@@ -80,6 +81,7 @@ fn router_with_proxy(registry: TransportRegistry, proxy: CursorProxy) -> Router
.method_not_allowed_fallback(proxy::forward)
.layer(Extension(proxy))
.with_state(registry)
.merge(web_cache)
}
async fn health() -> StatusCode {