@microsoft/agents-hosting-express 0.3.5 → 0.4.1

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.
package/README.md CHANGED
@@ -11,7 +11,7 @@ Provides integration to host the agent in Express using `startServer`
11
11
  import { startServer } from '@microsoft/agents-hosting-express';
12
12
 
13
13
  const app = new AgentApplication<TurnState>();
14
- app.message('hello', async (context, state) => {
14
+ app.onMessage('hello', async (context, state) => {
15
15
  await context.sendActivity('Hello, world!');
16
16
  });
17
17
  startServer(app);
@@ -22,11 +22,11 @@ import { ActivityHandler, AgentApplication, AuthConfiguration, TurnState } from
22
22
  * import { startServer } from '@microsoft/agents-hosting-express';
23
23
  *
24
24
  * const app = new AgentApplication<TurnState>();
25
- * app.message('hello', async (context, state) => {
25
+ * app.onMessage('hello', async (context, state) => {
26
26
  * await context.sendActivity('Hello, world!');
27
27
  * });
28
28
  *
29
29
  * startServer(app);
30
30
  * ```
31
31
  */
32
- export declare const startServer: (agent: AgentApplication<TurnState> | ActivityHandler, authConfiguration?: AuthConfiguration) => void;
32
+ export declare const startServer: (agent: AgentApplication<TurnState<any, any>> | ActivityHandler, authConfiguration?: AuthConfiguration) => void;
@@ -62,7 +62,7 @@ const agents_hosting_1 = require("@microsoft/agents-hosting");
62
62
  * import { startServer } from '@microsoft/agents-hosting-express';
63
63
  *
64
64
  * const app = new AgentApplication<TurnState>();
65
- * app.message('hello', async (context, state) => {
65
+ * app.onMessage('hello', async (context, state) => {
66
66
  * await context.sendActivity('Hello, world!');
67
67
  * });
68
68
  *
@@ -1 +1 @@
1
- {"version":3,"file":"startServer.js","sourceRoot":"","sources":["../../src/startServer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,sDAA2C;AAC3C,8DAAuK;AAEvK;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACI,MAAM,WAAW,GAAG,CAAC,KAAoD,EAA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osting-express",
4
- "version": "0.3.5",
4
+ "version": "0.4.1",
5
5
  "homepage": "https://github.com/microsoft/Agents-for-js",
6
6
  "repository": {
7
7
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "main": "dist/src/index.js",
20
20
  "types": "dist/src/index.d.ts",
21
21
  "dependencies": {
22
- "@microsoft/agents-hosting": "0.3.5",
22
+ "@microsoft/agents-hosting": "0.4.1",
23
23
  "express": "^5.1.0"
24
24
  },
25
25
  "license": "MIT",
@@ -25,14 +25,14 @@ import { ActivityHandler, AgentApplication, AuthConfiguration, authorizeJWT, Clo
25
25
  * import { startServer } from '@microsoft/agents-hosting-express';
26
26
  *
27
27
  * const app = new AgentApplication<TurnState>();
28
- * app.message('hello', async (context, state) => {
28
+ * app.onMessage('hello', async (context, state) => {
29
29
  * await context.sendActivity('Hello, world!');
30
30
  * });
31
31
  *
32
32
  * startServer(app);
33
33
  * ```
34
34
  */
35
- export const startServer = (agent: AgentApplication<TurnState> | ActivityHandler, authConfiguration?: AuthConfiguration) => {
35
+ export const startServer = (agent: AgentApplication<TurnState<any, any>> | ActivityHandler, authConfiguration?: AuthConfiguration) => {
36
36
  const authConfig: AuthConfiguration = authConfiguration ?? loadAuthConfigFromEnv()
37
37
  const adapter = new CloudAdapter(authConfig)
38
38
  const server = express()