- Add device/session/step DB persistence in server agent loop - Add goal preprocessor for compound goals (e.g., "open YouTube and search X") - Add step-level logging to agent loop - Fix dashboard WebSocket auth (direct DB token lookup instead of auth.api) - Fix web layout to use locals.session.token instead of cookie - Add dashboard-ws.svelte.ts WebSocket store with auto-reconnect - Rewrite devices page with direct DB queries and real-time updates - Add device detail page with live step display and session history - Add Android companion app resources, themes, and screen capture consent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
500 B
TypeScript
18 lines
500 B
TypeScript
import { svelteKitHandler } from 'better-auth/svelte-kit';
|
|
import { auth } from '$lib/server/auth';
|
|
import { building } from '$app/environment';
|
|
import type { Handle } from '@sveltejs/kit';
|
|
|
|
export const handle: Handle = async ({ event, resolve }) => {
|
|
const session = await auth.api.getSession({
|
|
headers: event.request.headers
|
|
});
|
|
|
|
if (session) {
|
|
event.locals.session = session.session;
|
|
event.locals.user = session.user;
|
|
}
|
|
|
|
return svelteKitHandler({ event, resolve, auth, building });
|
|
};
|