@8wave/ai-elements 0.119.0-beta.65 → 0.119.0-beta.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ import { getSessionFromCtx } from 'better-auth/api';
2
+ import { MiddlewareContext } from './two-factor-policy-plugin';
3
+ type HookSession = Awaited<ReturnType<typeof getSessionFromCtx>>;
4
+ /**
5
+ * The session of a request, read from a before hook as the route will see it.
6
+ * `getSessionFromCtx` sees only the cookie there: the bearer plugin turns an
7
+ * `Authorization: Bearer` header into the session cookie once every before
8
+ * hook has run, so a hook that relied on it took a bearer request for one
9
+ * with no session and let it through. This reads `/get-session` through the
10
+ * hook pipeline, where the bearer plugin runs first. Nothing is cached on the
11
+ * context: the route reads its own session.
12
+ */
13
+ export declare function readHookSession(ctx: MiddlewareContext): Promise<HookSession>;
14
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8wave/ai-elements",
3
3
  "private": false,
4
- "version": "0.119.0-beta.65",
4
+ "version": "0.119.0-beta.66",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite --port 8082 --open --host",