--- id: gateway-routes name: The 5 core gateway routes wired into the router status: pending depends_on: [gateway-dispatch, server-adapter] scope: moderate risk: medium impact: component level: implementation tags: [gateway, phase-1] --- ## Description Port `server/gateway_routes.rs` from `/workspace/@alkdev/alknet/crates/alknet-http/src/server/gateway_routes.rs`: `GET /search` (AccessControl-filtered services/list), `GET /schema`, `POST /call` (`{operation, input}`), `POST /batch`, and `POST /subscribe` (SSE projection: `text/event-stream`, `call.responded` → `data:` frames, terminal error event, abort on client disconnect). Auth middleware applied to all five. The route set intentionally excludes `/publish` (separate task). Integration tests over DuplexStream: search filtering by identity scopes, call round-trip, subscribe stream of multiple events, batch correlation. ## Acceptance Criteria - [ ] 5 routes ported and wired in server-adapter's router - [ ] SSE framing tests (multi-event, error-terminates, client-disconnect) - [ ] /search returns only ops the caller's identity can invoke - [ ] Full request→dispatch→response test over DuplexStream - [ ] `cargo test` passes ## References - docs/architecture/http-server.md (§router list, §Streaming projection) - docs/architecture/decisions/042-openapi-gateway-pattern.md, 047-remove-direct-call-http-surface.md ## Notes > Agent fills during implementation. ## Summary > Agent fills on completion.