Add auth controls and headers

This commit is contained in:
2026-09-02 09:57:20 +00:00
parent 0cf140ff17
commit 50eed7c4d6
10 changed files with 376 additions and 36 deletions
+7
View File
@@ -1,5 +1,8 @@
import type { BaseStream } from '../services/stream/base-stream.js';
/** Canonical request headers exposed to transport-neutral route handlers. */
export type RequestHeaders = Readonly<Record<string, string>>;
export type RouteSendOptions = {
/** Defaults to `response`; any other value sends an application event. */
@@ -20,7 +23,11 @@ export interface RouteStream {
/** Connection shared by every request on the same transport session. */
readonly connection: BaseStream;
/** Canonical route path selected for this request. */
readonly path: string;
readonly body: unknown;
readonly headers: RequestHeaders;
readonly streaming: boolean;
readonly bidirectional: boolean;