@microsoft/agents-hosting 0.2.9-g361635b71c → 0.2.14
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/dist/src/activityHandler.d.ts +304 -46
- package/dist/src/activityHandler.js +298 -45
- package/dist/src/activityHandler.js.map +1 -1
- package/dist/src/agent-client/agentClient.d.ts +50 -0
- package/dist/src/agent-client/agentClient.js +28 -0
- package/dist/src/agent-client/agentClient.js.map +1 -1
- package/dist/src/app/agentApplication.d.ts +256 -3
- package/dist/src/app/agentApplication.js +256 -0
- package/dist/src/app/agentApplication.js.map +1 -1
- package/dist/src/app/agentApplicationBuilder.d.ts +32 -0
- package/dist/src/app/agentApplicationBuilder.js +32 -0
- package/dist/src/app/agentApplicationBuilder.js.map +1 -1
- package/dist/src/app/appMemory.d.ts +34 -0
- package/dist/src/app/{memory.js → appMemory.js} +1 -1
- package/dist/src/app/appMemory.js.map +1 -0
- package/dist/src/app/index.d.ts +3 -0
- package/dist/src/app/index.js +3 -0
- package/dist/src/app/index.js.map +1 -1
- package/dist/src/app/turnEvents.d.ts +6 -0
- package/dist/src/app/turnState.d.ts +2 -2
- package/dist/src/app/turnStateEntry.d.ts +32 -0
- package/dist/src/app/turnStateEntry.js +32 -0
- package/dist/src/app/turnStateEntry.js.map +1 -1
- package/dist/src/cards/index.d.ts +1 -0
- package/dist/src/cards/index.js +1 -0
- package/dist/src/cards/index.js.map +1 -1
- package/dist/src/cloudAdapter.d.ts +25 -3
- package/dist/src/cloudAdapter.js +25 -3
- package/dist/src/cloudAdapter.js.map +1 -1
- package/dist/src/getProductInfo.d.ts +6 -0
- package/dist/src/getProductInfo.js +6 -0
- package/dist/src/getProductInfo.js.map +1 -1
- package/dist/src/logger.d.ts +34 -2
- package/dist/src/logger.js +35 -0
- package/dist/src/logger.js.map +1 -1
- package/dist/src/state/agentState.d.ts +79 -27
- package/dist/src/state/agentState.js +58 -27
- package/dist/src/state/agentState.js.map +1 -1
- package/dist/src/state/agentStatePropertyAccesor.d.ts +67 -11
- package/dist/src/state/agentStatePropertyAccesor.js +58 -11
- package/dist/src/state/agentStatePropertyAccesor.js.map +1 -1
- package/dist/src/storage/memoryStorage.d.ts +48 -14
- package/dist/src/storage/memoryStorage.js +48 -14
- package/dist/src/storage/memoryStorage.js.map +1 -1
- package/dist/src/storage/storage.d.ts +43 -13
- package/dist/src/turnContext.d.ts +142 -56
- package/dist/src/turnContext.js +123 -53
- package/dist/src/turnContext.js.map +1 -1
- package/package.json +5 -5
- package/src/activityHandler.ts +304 -46
- package/src/agent-client/agentClient.ts +55 -5
- package/src/app/agentApplication.ts +259 -2
- package/src/app/agentApplicationBuilder.ts +32 -0
- package/src/app/appMemory.ts +38 -0
- package/src/app/index.ts +3 -0
- package/src/app/turnEvents.ts +6 -0
- package/src/app/turnState.ts +2 -2
- package/src/app/turnStateEntry.ts +32 -0
- package/src/cards/index.ts +1 -0
- package/src/cloudAdapter.ts +28 -3
- package/src/getProductInfo.ts +7 -0
- package/src/logger.ts +34 -1
- package/src/state/agentState.ts +81 -29
- package/src/state/agentStatePropertyAccesor.ts +67 -11
- package/src/storage/memoryStorage.ts +48 -14
- package/src/storage/storage.ts +51 -18
- package/src/turnContext.ts +142 -56
- package/dist/src/app/memory.d.ts +0 -10
- package/dist/src/app/memory.js.map +0 -1
- package/src/app/memory.ts +0 -14
package/dist/src/turnContext.js
CHANGED
|
@@ -6,11 +6,24 @@ const activityHandler_1 = require("./activityHandler");
|
|
|
6
6
|
const agents_activity_1 = require("@microsoft/agents-activity");
|
|
7
7
|
const turnContextStateCollection_1 = require("./turnContextStateCollection");
|
|
8
8
|
/**
|
|
9
|
-
* Key for the agent callback handler.
|
|
9
|
+
* Key for the agent callback handler in TurnState collection.
|
|
10
10
|
*/
|
|
11
11
|
exports.AgentCallbackHandlerKey = 'agentCallbackHandler';
|
|
12
12
|
/**
|
|
13
|
-
* Represents the context
|
|
13
|
+
* Represents the context for a single turn in a conversation between a user and an agent.
|
|
14
|
+
*
|
|
15
|
+
* TurnContext is a central concept in the Agents framework - it contains:
|
|
16
|
+
* - The incoming activity that started the turn
|
|
17
|
+
* - Access to the adapter that can be used to send responses
|
|
18
|
+
* - A state collection for storing information during the turn
|
|
19
|
+
* - Methods for sending, updating, and deleting activities
|
|
20
|
+
* - Middleware hooks for intercepting activity operations
|
|
21
|
+
*
|
|
22
|
+
* The TurnContext object is created by the adapter when an activity is received
|
|
23
|
+
* and is passed to the agent's logic to process the turn. It maintains information
|
|
24
|
+
* about the conversation and provides methods to send responses.
|
|
25
|
+
*
|
|
26
|
+
* This class follows the builder pattern for registering middleware handlers.
|
|
14
27
|
*/
|
|
15
28
|
class TurnContext {
|
|
16
29
|
constructor(adapterOrContext, request) {
|
|
@@ -22,7 +35,10 @@ class TurnContext {
|
|
|
22
35
|
this._turn = 'turn';
|
|
23
36
|
this._locale = 'locale';
|
|
24
37
|
/**
|
|
25
|
-
* A list of buffered
|
|
38
|
+
* A list of reply activities that are buffered until the end of the turn.
|
|
39
|
+
*
|
|
40
|
+
* This is primarily used with the 'expectReplies' delivery mode where all
|
|
41
|
+
* activities during a turn are collected and returned as a single response.
|
|
26
42
|
*/
|
|
27
43
|
this.bufferedReplyActivities = [];
|
|
28
44
|
if (adapterOrContext instanceof TurnContext) {
|
|
@@ -34,12 +50,16 @@ class TurnContext {
|
|
|
34
50
|
}
|
|
35
51
|
}
|
|
36
52
|
/**
|
|
37
|
-
* Sends a trace activity.
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* @
|
|
53
|
+
* Sends a trace activity for debugging purposes.
|
|
54
|
+
*
|
|
55
|
+
* Trace activities are typically used for debugging and are only visible in
|
|
56
|
+
* channels that support them, like the Bot Framework Emulator.
|
|
57
|
+
*
|
|
58
|
+
* @param name The name/category of the trace
|
|
59
|
+
* @param value The value/data to include in the trace
|
|
60
|
+
* @param valueType Optional type name for the value
|
|
61
|
+
* @param label Optional descriptive label for the trace
|
|
62
|
+
* @returns A promise that resolves to the resource response or undefined
|
|
43
63
|
*/
|
|
44
64
|
async sendTraceActivity(name, value, valueType, label) {
|
|
45
65
|
const traceActivityObj = {
|
|
@@ -54,11 +74,16 @@ class TurnContext {
|
|
|
54
74
|
return await this.sendActivity(traceActivity);
|
|
55
75
|
}
|
|
56
76
|
/**
|
|
57
|
-
* Sends an activity.
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
77
|
+
* Sends an activity to the sender of the incoming activity.
|
|
78
|
+
*
|
|
79
|
+
* This is the primary method used to respond to the user. It automatically
|
|
80
|
+
* addresses the response to the correct conversation and recipient using
|
|
81
|
+
* information from the incoming activity.
|
|
82
|
+
*
|
|
83
|
+
* @param activityOrText The activity to send or a string for a simple message
|
|
84
|
+
* @param speak Optional text to be spoken by the agent
|
|
85
|
+
* @param inputHint Optional input hint to indicate if the agent is expecting input
|
|
86
|
+
* @returns A promise that resolves to the resource response or undefined
|
|
62
87
|
*/
|
|
63
88
|
async sendActivity(activityOrText, speak, inputHint) {
|
|
64
89
|
let activityObject;
|
|
@@ -76,9 +101,14 @@ class TurnContext {
|
|
|
76
101
|
return responses[0];
|
|
77
102
|
}
|
|
78
103
|
/**
|
|
79
|
-
* Sends multiple activities.
|
|
80
|
-
*
|
|
81
|
-
*
|
|
104
|
+
* Sends multiple activities to the sender of the incoming activity.
|
|
105
|
+
*
|
|
106
|
+
* This method applies conversation references to each activity and
|
|
107
|
+
* emits them through the middleware chain before sending them to
|
|
108
|
+
* the adapter.
|
|
109
|
+
*
|
|
110
|
+
* @param activities The array of activities to send
|
|
111
|
+
* @returns A promise that resolves to an array of resource responses
|
|
82
112
|
*/
|
|
83
113
|
async sendActivities(activities) {
|
|
84
114
|
let sentNonTraceActivity = false;
|
|
@@ -128,9 +158,13 @@ class TurnContext {
|
|
|
128
158
|
});
|
|
129
159
|
}
|
|
130
160
|
/**
|
|
131
|
-
* Updates an activity.
|
|
132
|
-
*
|
|
133
|
-
*
|
|
161
|
+
* Updates an existing activity in the conversation.
|
|
162
|
+
*
|
|
163
|
+
* This can be used to edit previously sent activities, for example to
|
|
164
|
+
* update the content of an adaptive card or change a message.
|
|
165
|
+
*
|
|
166
|
+
* @param activity The activity to update with its ID specified
|
|
167
|
+
* @returns A promise that resolves when the activity has been updated
|
|
134
168
|
*/
|
|
135
169
|
async updateActivity(activity) {
|
|
136
170
|
const ref = this.activity.getConversationReference();
|
|
@@ -138,9 +172,10 @@ class TurnContext {
|
|
|
138
172
|
return await this.emit(this._onUpdateActivity, a, async () => await this.adapter.updateActivity(this, a).then(() => { }));
|
|
139
173
|
}
|
|
140
174
|
/**
|
|
141
|
-
* Deletes an activity.
|
|
142
|
-
*
|
|
143
|
-
* @
|
|
175
|
+
* Deletes an activity from the conversation.
|
|
176
|
+
*
|
|
177
|
+
* @param idOrReference The ID of the activity to delete or a conversation reference
|
|
178
|
+
* @returns A promise that resolves when the activity has been deleted
|
|
144
179
|
*/
|
|
145
180
|
async deleteActivity(idOrReference) {
|
|
146
181
|
let reference;
|
|
@@ -154,53 +189,62 @@ class TurnContext {
|
|
|
154
189
|
return await this.emit(this._onDeleteActivity, reference, async () => await this.adapter.deleteActivity(this, reference));
|
|
155
190
|
}
|
|
156
191
|
/**
|
|
157
|
-
* Uploads an attachment.
|
|
158
|
-
*
|
|
159
|
-
* @param
|
|
160
|
-
* @
|
|
192
|
+
* Uploads an attachment to the conversation.
|
|
193
|
+
*
|
|
194
|
+
* @param conversationId The ID of the conversation
|
|
195
|
+
* @param attachmentData The attachment data to upload
|
|
196
|
+
* @returns A promise that resolves to the resource response
|
|
161
197
|
*/
|
|
162
198
|
async uploadAttachment(conversationId, attachmentData) {
|
|
163
199
|
return await this.adapter.uploadAttachment(conversationId, attachmentData);
|
|
164
200
|
}
|
|
165
201
|
/**
|
|
166
|
-
* Gets attachment
|
|
167
|
-
*
|
|
168
|
-
* @
|
|
202
|
+
* Gets information about an attachment.
|
|
203
|
+
*
|
|
204
|
+
* @param attachmentId The ID of the attachment
|
|
205
|
+
* @returns A promise that resolves to the attachment information
|
|
169
206
|
*/
|
|
170
207
|
async getAttachmentInfo(attachmentId) {
|
|
171
208
|
return await this.adapter.getAttachmentInfo(attachmentId);
|
|
172
209
|
}
|
|
173
210
|
/**
|
|
174
|
-
* Gets an attachment.
|
|
175
|
-
*
|
|
176
|
-
* @param
|
|
177
|
-
* @
|
|
211
|
+
* Gets the content of an attachment.
|
|
212
|
+
*
|
|
213
|
+
* @param attachmentId The ID of the attachment
|
|
214
|
+
* @param viewId The view to get
|
|
215
|
+
* @returns A promise that resolves to a readable stream of the attachment content
|
|
178
216
|
*/
|
|
179
217
|
async getAttachment(attachmentId, viewId) {
|
|
180
218
|
return await this.adapter.getAttachment(attachmentId, viewId);
|
|
181
219
|
}
|
|
182
220
|
/**
|
|
183
|
-
* Registers a handler for
|
|
184
|
-
*
|
|
185
|
-
*
|
|
221
|
+
* Registers a handler for intercepting and processing activities being sent.
|
|
222
|
+
*
|
|
223
|
+
* This method follows a middleware pattern, allowing multiple handlers to
|
|
224
|
+
* be chained together. Handlers can modify activities or inject new ones.
|
|
225
|
+
*
|
|
226
|
+
* @param handler The handler to register
|
|
227
|
+
* @returns The current TurnContext instance for chaining
|
|
186
228
|
*/
|
|
187
229
|
onSendActivities(handler) {
|
|
188
230
|
this._onSendActivities.push(handler);
|
|
189
231
|
return this;
|
|
190
232
|
}
|
|
191
233
|
/**
|
|
192
|
-
* Registers a handler for
|
|
193
|
-
*
|
|
194
|
-
* @
|
|
234
|
+
* Registers a handler for intercepting activity updates.
|
|
235
|
+
*
|
|
236
|
+
* @param handler The handler to register
|
|
237
|
+
* @returns The current TurnContext instance for chaining
|
|
195
238
|
*/
|
|
196
239
|
onUpdateActivity(handler) {
|
|
197
240
|
this._onUpdateActivity.push(handler);
|
|
198
241
|
return this;
|
|
199
242
|
}
|
|
200
243
|
/**
|
|
201
|
-
* Registers a handler for
|
|
202
|
-
*
|
|
203
|
-
* @
|
|
244
|
+
* Registers a handler for intercepting activity deletions.
|
|
245
|
+
*
|
|
246
|
+
* @param handler The handler to register
|
|
247
|
+
* @returns The current TurnContext instance for chaining
|
|
204
248
|
*/
|
|
205
249
|
onDeleteActivity(handler) {
|
|
206
250
|
this._onDeleteActivity.push(handler);
|
|
@@ -208,25 +252,38 @@ class TurnContext {
|
|
|
208
252
|
}
|
|
209
253
|
/**
|
|
210
254
|
* Copies the properties of this TurnContext to another TurnContext.
|
|
211
|
-
*
|
|
255
|
+
*
|
|
256
|
+
* Used internally when cloning contexts.
|
|
257
|
+
*
|
|
258
|
+
* @param context The context to copy to
|
|
259
|
+
* @protected
|
|
212
260
|
*/
|
|
213
261
|
copyTo(context) {
|
|
214
262
|
['_adapter', '_activity', '_respondedRef', '_services', '_onSendActivities', '_onUpdateActivity', '_onDeleteActivity'].forEach((prop) => (context[prop] = this[prop]));
|
|
215
263
|
}
|
|
216
264
|
/**
|
|
217
|
-
* Gets the adapter
|
|
265
|
+
* Gets the adapter that created this context.
|
|
266
|
+
*
|
|
267
|
+
* The adapter is responsible for sending and receiving activities
|
|
268
|
+
* to and from the user's channel.
|
|
218
269
|
*/
|
|
219
270
|
get adapter() {
|
|
220
271
|
return this._adapter;
|
|
221
272
|
}
|
|
222
273
|
/**
|
|
223
|
-
* Gets the activity
|
|
274
|
+
* Gets the incoming activity that started this turn.
|
|
275
|
+
*
|
|
276
|
+
* This is the activity that was received from the user or channel
|
|
277
|
+
* and triggered the creation of this context.
|
|
224
278
|
*/
|
|
225
279
|
get activity() {
|
|
226
280
|
return this._activity;
|
|
227
281
|
}
|
|
228
282
|
/**
|
|
229
|
-
* Gets or sets whether the turn has
|
|
283
|
+
* Gets or sets whether the turn has sent a response to the user.
|
|
284
|
+
*
|
|
285
|
+
* This is used to track whether the agent has responded to the user's
|
|
286
|
+
* activity. Once set to true, it cannot be set back to false.
|
|
230
287
|
*/
|
|
231
288
|
get responded() {
|
|
232
289
|
return this._respondedRef.responded;
|
|
@@ -239,6 +296,9 @@ class TurnContext {
|
|
|
239
296
|
}
|
|
240
297
|
/**
|
|
241
298
|
* Gets or sets the locale for the turn.
|
|
299
|
+
*
|
|
300
|
+
* The locale affects language-dependent operations like
|
|
301
|
+
* formatting dates or numbers.
|
|
242
302
|
*/
|
|
243
303
|
get locale() {
|
|
244
304
|
const turnObj = this._turnState.get(this._turn);
|
|
@@ -258,17 +318,27 @@ class TurnContext {
|
|
|
258
318
|
}
|
|
259
319
|
}
|
|
260
320
|
/**
|
|
261
|
-
* Gets the turn state collection.
|
|
321
|
+
* Gets the turn state collection for storing data during the turn.
|
|
322
|
+
*
|
|
323
|
+
* The turn state collection provides a dictionary-like interface
|
|
324
|
+
* for storing arbitrary data that needs to be accessible during
|
|
325
|
+
* the processing of the current turn.
|
|
262
326
|
*/
|
|
263
327
|
get turnState() {
|
|
264
328
|
return this._turnState;
|
|
265
329
|
}
|
|
266
330
|
/**
|
|
267
|
-
* Emits events to
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
331
|
+
* Emits events to registered middleware handlers.
|
|
332
|
+
*
|
|
333
|
+
* This internal method implements the middleware pattern, allowing
|
|
334
|
+
* handlers to be chained together with each having the option to
|
|
335
|
+
* short-circuit the chain.
|
|
336
|
+
*
|
|
337
|
+
* @param handlers Array of handlers to execute
|
|
338
|
+
* @param arg The argument to pass to each handler
|
|
339
|
+
* @param next The function to execute at the end of the middleware chain
|
|
340
|
+
* @returns A promise that resolves to the result from the handlers or next function
|
|
341
|
+
* @private
|
|
272
342
|
*/
|
|
273
343
|
async emit(handlers, arg, next) {
|
|
274
344
|
const runHandlers = async ([handler, ...remaining]) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turnContext.js","sourceRoot":"","sources":["../../src/turnContext.ts"],"names":[],"mappings":";;;AAAA,oGAAoG;AACpG,uDAAuD;AAEvD,gEAAsH;AAEtH,6EAAyE;
|
|
1
|
+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AAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAED;;;;;;;;;;;;OAYG;IACK,KAAK,CAAC,IAAI,CAAO,QAAqF,EAAE,GAAM,EAAE,IAAsB;QAC5I,MAAM,WAAW,GAAG,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,SAAS,CAAkB,EAAc,EAAE;YACjF,IAAI,CAAC;gBACH,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;YACrH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YAClC,CAAC;QACH,CAAC,CAAA;QACD,OAAO,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAA;IACpC,CAAC;CACF;AAnWD,kCAmWC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@microsoft/agents-hosting",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.14",
|
|
5
5
|
"homepage": "https://github.com/microsoft/Agents-for-js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"main": "dist/src/index.js",
|
|
20
20
|
"types": "dist/src/index.d.ts",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@microsoft/agents-activity": "0.2.9-g361635b71c",
|
|
23
22
|
"@azure/msal-node": "^3.5.1",
|
|
24
|
-
"
|
|
25
|
-
"jwks-rsa": "^3.2.0",
|
|
23
|
+
"@microsoft/agents-activity": "0.2.14",
|
|
26
24
|
"axios": "^1.8.2",
|
|
27
|
-
"debug": "^4.3.7"
|
|
25
|
+
"debug": "^4.3.7",
|
|
26
|
+
"jsonwebtoken": "^9.0.2",
|
|
27
|
+
"jwks-rsa": "^3.2.0"
|
|
28
28
|
},
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"files": [
|