@looopy-ai/aws 2.0.4 → 2.0.5
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.
|
@@ -4,7 +4,7 @@ import type pino from 'pino';
|
|
|
4
4
|
export type ServeConfig = {
|
|
5
5
|
agent: (contextId: string) => Promise<Agent>;
|
|
6
6
|
decodeAuthorization?: (authorization: string) => Promise<AuthContext | null>;
|
|
7
|
-
shutdown
|
|
7
|
+
shutdown?: ShutdownManager;
|
|
8
8
|
logger?: pino.Logger;
|
|
9
9
|
port?: number;
|
|
10
10
|
};
|
|
@@ -59,7 +59,7 @@ export const hono = (config) => {
|
|
|
59
59
|
if (!state.agent) {
|
|
60
60
|
state.agent = await config.agent(contextId);
|
|
61
61
|
logger.info({ contextId }, 'Created new agent instance');
|
|
62
|
-
config.shutdown
|
|
62
|
+
config.shutdown?.registerWatcher(async () => {
|
|
63
63
|
logger.info({ contextId }, 'Shutting down agent');
|
|
64
64
|
state.agent = undefined;
|
|
65
65
|
});
|
package/dist/nodejs.js
CHANGED
|
@@ -6,7 +6,7 @@ export const serve = (config) => {
|
|
|
6
6
|
fetch: app.fetch,
|
|
7
7
|
port: config.port || 8080,
|
|
8
8
|
});
|
|
9
|
-
config.shutdown
|
|
9
|
+
config.shutdown?.registerWatcher(async () => {
|
|
10
10
|
server.close();
|
|
11
11
|
config.logger?.info('Server has been shut down');
|
|
12
12
|
}, 1000);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@looopy-ai/aws",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
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": "1.1.
|
|
55
|
+
"@looopy-ai/core": "1.1.2"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|