@autonoma-ai/server-web 0.2.2 → 0.2.4-canary.2dc39bb

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.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -5,7 +5,7 @@ Web standard server adapter for the Autonoma SDK. Works with Next.js App Router,
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- pnpm add @autonoma-ai/sdk @autonoma-ai/sdk-prisma @autonoma-ai/server-web
8
+ pnpm add @autonoma-ai/sdk @autonoma-ai/server-web zod
9
9
  ```
10
10
 
11
11
  ## Usage
@@ -15,14 +15,14 @@ pnpm add @autonoma-ai/sdk @autonoma-ai/sdk-prisma @autonoma-ai/server-web
15
15
  ```typescript
16
16
  // app/api/autonoma/route.ts
17
17
  import { createHandler } from '@autonoma-ai/server-web'
18
- import { prismaExecutor } from '@autonoma-ai/sdk-prisma'
19
- import { prisma } from '@/lib/db'
18
+ import { defineFactory } from '@autonoma-ai/sdk'
19
+ import { z } from 'zod'
20
20
 
21
21
  export const POST = createHandler({
22
- executor: prismaExecutor(prisma),
23
22
  scopeField: 'organizationId',
24
23
  sharedSecret: process.env.AUTONOMA_SHARED_SECRET!,
25
24
  signingSecret: process.env.AUTONOMA_SIGNING_SECRET!,
25
+ factories: { Organization, User },
26
26
  auth: async (user, context) => {
27
27
  const session = await createSession(user.id as string)
28
28
  return { headers: { Authorization: `Bearer ${session.token}` } }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autonoma-ai/server-web",
3
- "version": "0.2.2",
3
+ "version": "0.2.4-canary.2dc39bb",
4
4
  "description": "Web standard (Hono, Next App Router, Bun, Deno) server adapter for Autonoma SDK",
5
5
  "type": "module",
6
6
  "exports": {
@@ -16,7 +16,7 @@
16
16
  "access": "public"
17
17
  },
18
18
  "dependencies": {
19
- "@autonoma-ai/sdk": "0.2.2"
19
+ "@autonoma-ai/sdk": "0.2.4-canary.2dc39bb"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/node": "^22.0.0",