···11+import "./index.css";
22+13import { StrictMode } from "react";
24import { createRoot } from "react-dom/client";
33-import "./index.css";
55+46import App from "./App.tsx";
5768createRoot(document.getElementById("root")!).render(
+2-1
src/common/crypto-enc.ts
···11+import { base64url } from "@panva/jose";
12import { nanoid } from "@sitnik/nanoid";
33+24import { encrAlgo } from "./crypto-algos.ts";
33-import { base64url } from "@panva/jose";
4556export interface Cipher {
67 encrypt(input: string): Promise<string>;
+2-2
src/common/crypto-sig.ts
···11import { decodeJwt, importJWK, JWTPayload, jwtVerify, JWTVerifyResult } from "@panva/jose";
22-import { generateKeyPair } from "@panva/jose/key/generate/keypair";
32import { calculateJwkThumbprint } from "@panva/jose/jwk/thumbprint";
43import { exportJWK } from "@panva/jose/key/export";
55-import { z, ZodError } from "zod/v4";
44+import { generateKeyPair } from "@panva/jose/key/generate/keypair";
65import { signAlgo } from "@repo/common/crypto-algos.ts";
66+import { z, ZodError } from "zod/v4";
7788const CLOCK_TOLERANCE_S = 30;
99
+1-1
src/common/socket.ts
···11import { BlockingAtom } from "./blocking-atom.ts";
22import { BlockingQueue } from "./blocking-queue.ts";
33-import { makeGate } from "./gate.ts";
43import { CancellationError } from "./errors.ts";
44+import { makeGate } from "./gate.ts";
5566const STREAM_CONFIG_DEFAULT = {
77 signal: undefined as AbortSignal | undefined,
+2-1
src/schema/proto.ts
···11+import { jwkSchema } from "@repo/common/crypto-sig.ts";
12import { z } from "zod/v4";
22-import { jwkSchema } from "@repo/common/crypto-sig.ts";
33+34import { identIdSchema, realmIdSchema } from "./state.ts";
4556export const preauthAuthnMessageSchema = z.object({
+1-1
src/server/main.ts
···11-import { parseArgs } from "jsr:@std/cli/parse-args";
21import { Application } from "@oak/oak/application";
22+import { parseArgs } from "jsr:@std/cli/parse-args";
3344import { apiMiddleware } from "./routes-api/middleware.ts";
55import { notFound } from "./routes-error.ts";
+1-1
src/server/routes-socket/handler-error.ts
···11-import { z } from "zod/v4";
21import { BaseError, ValidationError } from "@repo/common/errors.ts";
22+import { z } from "zod/v4";
3344export function errorHandler(ws: WebSocket, e: unknown) {
55 if (e instanceof BaseError) {
+1-2
src/server/routes-socket/handler-preauth.ts
···11import { jwtVerify } from "@panva/jose";
22-32import { combineSignals, timeoutSignal } from "@repo/common/aborts.ts";
33+import { jwtDecodedSchema } from "@repo/common/crypto-sig.ts";
44import { AuthError, normalizeError } from "@repo/common/errors.ts";
55import { takeSocket } from "@repo/common/socket.ts";
66import { StrictMap } from "@repo/common/strict-map.ts";
77-import { jwtDecodedSchema } from "@repo/common/crypto-sig.ts";
87import { preauthAuthnMessageSchema } from "@repo/schema/proto.ts";
98import { parseIdentId, parseRealmId } from "@repo/schema/state.ts";
109
+1-1
src/server/routes-socket/handler-realm.ts
···11-import { Realm, Session } from "./state.ts";
21import { streamSocket } from "../../common/socket.ts";
22+import { Realm, Session } from "./state.ts";
3344export async function realmHandler(ws: WebSocket, realm: Realm, auth: Session, signal: AbortSignal) {
55 ws.send(`welcome ${auth.identid} to ${auth.realmid} - ${realm.identities.keys()} `);
+1-1
src/server/routes-socket/handler.ts
···2233import { errorHandler } from "./handler-error.ts";
44import { preauthHandler } from "./handler-preauth.ts";
55-import { attachSocket, detachSocket } from "./state.ts";
65import { realmHandler } from "./handler-realm.ts";
66+import { attachSocket, detachSocket } from "./state.ts";
7788export async function socketHandler(this: WebSocket) {
99 const controller = new AbortController();
···11-import { escape } from "jsr:@std/regexp/escape";
21import { nanoid } from "@sitnik/nanoid";
22+import { escape } from "jsr:@std/regexp/escape";
33import { z } from "zod/v4";
4455/** result from a branded id maker invocation */
+2-2
vite.config.ts
···11-import { defineConfig } from "vite";
22-import react from "@vitejs/plugin-react";
31import deno from "@deno/vite-plugin";
22+import react from "@vitejs/plugin-react";
33+import { defineConfig } from "vite";
4455export default defineConfig({
66 root: "./src/client",