@looopy-ai/aws 2.1.0 → 2.1.2

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.
@@ -3,7 +3,7 @@ import { Hono } from 'hono';
3
3
  import type pino from 'pino';
4
4
  export type ServeConfig<AuthContext> = {
5
5
  agent: (contextId: string) => Promise<Agent<AuthContext>>;
6
- decodeAuthorization?: (authorization: string) => Promise<AuthContext | null>;
6
+ decodeAuthorization?: (authorization: string) => Promise<AuthContext | undefined>;
7
7
  shutdown?: ShutdownManager;
8
8
  logger?: pino.Logger;
9
9
  port?: number;
@@ -77,7 +77,7 @@ export const hono = (config) => {
77
77
  }
78
78
  const { prompt } = promptValidation.data;
79
79
  const sseServer = new SSEServer();
80
- const turn = await agent.startTurn(prompt);
80
+ const turn = await agent.startTurn(prompt, { authContext });
81
81
  turn.subscribe({
82
82
  next: (evt) => {
83
83
  sseServer.emit(contextId, evt);
@@ -119,7 +119,7 @@ export const hono = (config) => {
119
119
  };
120
120
  const getAuthContext = async (authorization, decoder) => {
121
121
  if (!authorization || !decoder) {
122
- return null;
122
+ return undefined;
123
123
  }
124
124
  return await decoder(authorization);
125
125
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@looopy-ai/aws",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "AWS storage and providers for Looopy AI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "@smithy/types": "^4.9.0",
53
53
  "hono": "^4.10.5",
54
54
  "pino-http": "^11.0.0",
55
- "@looopy-ai/core": "2.1.0"
55
+ "@looopy-ai/core": "2.1.1"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public"