@microsoft/agents-hosting 0.6.21-g3c2261b2fc → 1.0.0

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 (67) hide show
  1. package/dist/package.json +2 -2
  2. package/dist/src/app/adaptiveCards/adaptiveCardsActions.d.ts +9 -6
  3. package/dist/src/app/adaptiveCards/adaptiveCardsActions.js +3 -3
  4. package/dist/src/app/adaptiveCards/adaptiveCardsActions.js.map +1 -1
  5. package/dist/src/app/adaptiveCards/query.d.ts +1 -1
  6. package/dist/src/app/agentApplication.d.ts +10 -10
  7. package/dist/src/app/agentApplication.js +9 -9
  8. package/dist/src/app/agentApplicationBuilder.d.ts +1 -1
  9. package/dist/src/app/agentApplicationBuilder.js +1 -1
  10. package/dist/src/app/agentApplicationOptions.d.ts +10 -1
  11. package/dist/src/app/appMemory.d.ts +1 -1
  12. package/dist/src/app/appRoute.d.ts +1 -1
  13. package/dist/src/app/extensions.d.ts +1 -1
  14. package/dist/src/app/extensions.js +1 -1
  15. package/dist/src/app/turnState.d.ts +6 -6
  16. package/dist/src/app/turnState.js +6 -6
  17. package/dist/src/app/turnStateProperty.d.ts +2 -2
  18. package/dist/src/app/turnStateProperty.js +2 -2
  19. package/dist/src/auth/authConfiguration.d.ts +8 -0
  20. package/dist/src/auth/authConfiguration.js +14 -6
  21. package/dist/src/auth/authConfiguration.js.map +1 -1
  22. package/dist/src/auth/jwt-middleware.js +1 -1
  23. package/dist/src/auth/jwt-middleware.js.map +1 -1
  24. package/dist/src/auth/msalTokenProvider.js +4 -4
  25. package/dist/src/auth/msalTokenProvider.js.map +1 -1
  26. package/dist/src/cloudAdapter.d.ts +5 -2
  27. package/dist/src/cloudAdapter.js +19 -11
  28. package/dist/src/cloudAdapter.js.map +1 -1
  29. package/dist/src/connector-client/connectorClient.d.ts +9 -7
  30. package/dist/src/connector-client/connectorClient.js +27 -11
  31. package/dist/src/connector-client/connectorClient.js.map +1 -1
  32. package/dist/src/headerPropagation.d.ts +71 -0
  33. package/dist/src/headerPropagation.js +76 -0
  34. package/dist/src/headerPropagation.js.map +1 -0
  35. package/dist/src/oauth/userTokenClient.js +34 -17
  36. package/dist/src/oauth/userTokenClient.js.map +1 -1
  37. package/dist/src/state/agentState.d.ts +2 -2
  38. package/dist/src/state/agentState.js +2 -2
  39. package/dist/src/state/agentStatePropertyAccesor.d.ts +18 -21
  40. package/dist/src/state/agentStatePropertyAccesor.js +18 -21
  41. package/dist/src/state/agentStatePropertyAccesor.js.map +1 -1
  42. package/dist/src/storage/fileStorage.d.ts +12 -10
  43. package/dist/src/storage/fileStorage.js +12 -10
  44. package/dist/src/storage/fileStorage.js.map +1 -1
  45. package/dist/src/transcript/transcriptLogger.d.ts +1 -1
  46. package/package.json +2 -2
  47. package/src/app/adaptiveCards/adaptiveCardsActions.ts +9 -6
  48. package/src/app/adaptiveCards/query.ts +1 -1
  49. package/src/app/agentApplication.ts +10 -10
  50. package/src/app/agentApplicationBuilder.ts +1 -1
  51. package/src/app/agentApplicationOptions.ts +11 -1
  52. package/src/app/appMemory.ts +1 -1
  53. package/src/app/appRoute.ts +1 -1
  54. package/src/app/extensions.ts +1 -1
  55. package/src/app/turnState.ts +6 -6
  56. package/src/app/turnStateProperty.ts +2 -2
  57. package/src/auth/authConfiguration.ts +20 -5
  58. package/src/auth/jwt-middleware.ts +1 -1
  59. package/src/auth/msalTokenProvider.ts +4 -4
  60. package/src/cloudAdapter.ts +24 -12
  61. package/src/connector-client/connectorClient.ts +30 -12
  62. package/src/headerPropagation.ts +129 -0
  63. package/src/oauth/userTokenClient.ts +36 -17
  64. package/src/state/agentState.ts +2 -2
  65. package/src/state/agentStatePropertyAccesor.ts +18 -21
  66. package/src/storage/fileStorage.ts +12 -10
  67. package/src/transcript/transcriptLogger.ts +1 -1
@@ -23,41 +23,58 @@ class UserTokenClient {
23
23
  constructor(msAppId) {
24
24
  this.msAppId = msAppId;
25
25
  const baseURL = 'https://api.botframework.com';
26
- const axiosInstance = axios_1.default.create({
26
+ this.client = axios_1.default.create({
27
27
  baseURL,
28
28
  headers: {
29
29
  Accept: 'application/json',
30
30
  'User-Agent': (0, getProductInfo_1.getProductInfo)(),
31
31
  }
32
32
  });
33
- // axiosInstance.defaults.headers.common.Authorization = `Bearer ${token}`
34
- axiosInstance.interceptors.response.use((config) => {
35
- const { status, statusText, config: requestConfig } = config;
33
+ this.client.interceptors.request.use((config) => {
34
+ const { method, url, data, headers, params } = config;
35
+ const { Authorization, authorization, ...headersToLog } = headers || {};
36
+ logger.debug('Request: ', {
37
+ host: this.client.getUri(),
38
+ url,
39
+ data,
40
+ method,
41
+ params,
42
+ headers: headersToLog
43
+ });
44
+ return config;
45
+ });
46
+ this.client.interceptors.response.use((config) => {
47
+ const { status, statusText, config: requestConfig, headers } = config;
48
+ const { Authorization, authorization, ...headersToLog } = headers || {};
49
+ const { token, ...redactedData } = (requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.data) || {};
36
50
  logger.debug('Response: ', {
37
51
  status,
38
52
  statusText,
39
- host: axiosInstance.getUri(),
53
+ host: this.client.getUri(),
40
54
  url: requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.url,
41
- data: config.config.data,
55
+ data: redactedData,
42
56
  method: requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.method,
57
+ headers: headersToLog
43
58
  });
44
59
  return config;
45
60
  }, (error) => {
46
61
  const { code, status, message, stack, response } = error;
47
- if (status !== 404) {
48
- const errorDetails = {
49
- code,
50
- host: axiosInstance.getUri(),
51
- url: error.config.url,
52
- method: error.config.method,
53
- data: error.config.data,
54
- message: message + JSON.stringify(response === null || response === void 0 ? void 0 : response.data),
55
- stack,
56
- };
62
+ const { headers } = response || {};
63
+ const errorDetails = {
64
+ code,
65
+ host: this.client.getUri(),
66
+ url: error.config.url,
67
+ method: error.config.method,
68
+ data: error.config.data,
69
+ message: message + JSON.stringify(response === null || response === void 0 ? void 0 : response.data),
70
+ headers,
71
+ stack,
72
+ };
73
+ logger.debug('Response error: ', errorDetails);
74
+ if (errorDetails.url === '/api/usertoken/GetToken' && status !== 404) {
57
75
  return Promise.reject(errorDetails);
58
76
  }
59
77
  });
60
- this.client = axiosInstance;
61
78
  }
62
79
  /**
63
80
  * Gets the user token.
@@ -1 +1 @@
1
- {"version":3,"file":"userTokenClient.js","sourceRoot":"","sources":["../../../src/oauth/userTokenClient.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,kCAAkC;;;;;;AAElC,kDAA4C;AAE5C,8DAAyD;AACzD,8DAAmE;AAEnE,sDAAkD;AAElD,MAAM,MAAM,GAAG,IAAA,cAAK,EAAC,0BAA0B,CAAC,CAAA;AAEhD;;GAEG;AACH,MAAa,eAAe;IAE1B;;;;OAIG;IACH,YAAqB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;QAClC,MAAM,OAAO,GAAG,8BAA8B,CAAA;QAC9C,MAAM,aAAa,GAAG,eAAK,CAAC,MAAM,CAAC;YACjC,OAAO;YACP,OAAO,EAAE;gBACP,MAAM,EAAE,kBAAkB;gBAC1B,YAAY,EAAE,IAAA,+BAAc,GAAE;aAC/B;SACF,CAAC,CAAA;QACF,0EAA0E;QAC1E,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CACrC,CAAC,MAAM,EAAE,EAAE;YACT,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAAA;YAC5D,MAAM,CAAC,KAAK,CAAC,YAAY,EAAE;gBACzB,MAAM;gBACN,UAAU;gBACV,IAAI,EAAE,aAAa,CAAC,MAAM,EAAE;gBAC5B,GAAG,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,GAAG;gBACvB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI;gBACxB,MAAM,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM;aAC9B,CAAC,CAAA;YACF,OAAO,MAAM,CAAA;QACf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GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;QAChG,OAAO,QAAQ,CAAC,IAAqC,CAAA;IACvD,CAAC;IAEM,eAAe,CAAE,KAAa;QACnC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,GAAG,UAAU,KAAK,EAAE,CAAA;IACvE,CAAC;CACF;AA3LD,0CA2LC"}
@@ -37,8 +37,8 @@ export interface CustomKey {
37
37
  conversationId: string;
38
38
  }
39
39
  /**
40
- * Manages the state of an Agent across turns in a conversation.
41
- *
40
+ * @summary Manages the state of an Agent across turns in a conversation.
41
+ * @remarks
42
42
  * AgentState provides functionality to persist and retrieve state data using
43
43
  * a storage provider. It handles caching state in the turn context for performance,
44
44
  * calculating change hashes to detect modifications, and managing property accessors
@@ -10,8 +10,8 @@ const agentStatePropertyAccesor_1 = require("./agentStatePropertyAccesor");
10
10
  const logger_1 = require("@microsoft/agents-activity/logger");
11
11
  const logger = (0, logger_1.debug)('agents:state');
12
12
  /**
13
- * Manages the state of an Agent across turns in a conversation.
14
- *
13
+ * @summary Manages the state of an Agent across turns in a conversation.
14
+ * @remarks
15
15
  * AgentState provides functionality to persist and retrieve state data using
16
16
  * a storage provider. It handles caching state in the turn context for performance,
17
17
  * calculating change hashes to detect modifications, and managing property accessors
@@ -67,7 +67,7 @@ export interface StatePropertyAccessor<T = any> {
67
67
  set(context: TurnContext, value: T): Promise<void>;
68
68
  }
69
69
  /**
70
- * Provides typed access to an Agent state property with automatic state loading and persistence management.
70
+ * @summary Provides typed access to an Agent state property with automatic state loading and persistence management.
71
71
  *
72
72
  * @remarks
73
73
  * AgentStatePropertyAccessor simplifies working with persisted state by abstracting
@@ -80,9 +80,9 @@ export interface StatePropertyAccessor<T = any> {
80
80
  * - **Memory Management**: Efficient in-memory caching with explicit persistence control
81
81
  * - **Custom Keys**: Support for custom storage keys for advanced scenarios
82
82
  *
83
- * ## Key Features
83
+ * ### Key Features
84
84
  *
85
- * ### Type Safety
85
+ * #### Type Safety
86
86
  * The accessor provides compile-time type checking when using TypeScript:
87
87
  * ```typescript
88
88
  * interface UserProfile {
@@ -92,7 +92,7 @@ export interface StatePropertyAccessor<T = any> {
92
92
  * const userProfile = userState.createProperty<UserProfile>("userProfile");
93
93
  * ```
94
94
  *
95
- * ### Automatic Default Value Handling
95
+ * #### Automatic Default Value Handling
96
96
  * When a property doesn't exist, default values are automatically cloned and stored:
97
97
  * ```typescript
98
98
  * // If userProfile doesn't exist, the default will be cloned and saved
@@ -102,7 +102,7 @@ export interface StatePropertyAccessor<T = any> {
102
102
  * });
103
103
  * ```
104
104
  *
105
- * ### Explicit Persistence Control
105
+ * #### Explicit Persistence Control
106
106
  * Changes are kept in memory until explicitly persisted:
107
107
  * ```typescript
108
108
  * // Modify the state
@@ -114,9 +114,9 @@ export interface StatePropertyAccessor<T = any> {
114
114
  * await userState.saveChanges(context);
115
115
  * ```
116
116
  *
117
- * ## Usage Examples
117
+ * ### Usage Examples
118
118
  *
119
- * ### Basic Usage
119
+ * @example Basic Usage
120
120
  * ```typescript
121
121
  * // Create a property accessor
122
122
  * const userProfile = userState.createProperty<UserProfile>("userProfile");
@@ -135,7 +135,7 @@ export interface StatePropertyAccessor<T = any> {
135
135
  * await userState.saveChanges(context); // Persist to storage
136
136
  * ```
137
137
  *
138
- * ### Working with Primitive Types
138
+ * @example Working with Primitive Types
139
139
  * ```typescript
140
140
  * const counterProperty = userState.createProperty<number>("counter");
141
141
  *
@@ -145,7 +145,7 @@ export interface StatePropertyAccessor<T = any> {
145
145
  * await userState.saveChanges(context);
146
146
  * ```
147
147
  *
148
- * ### Conditional Logic
148
+ * @example Conditional Logic
149
149
  * ```typescript
150
150
  * const settingsProperty = userState.createProperty<Settings>("settings");
151
151
  *
@@ -157,7 +157,7 @@ export interface StatePropertyAccessor<T = any> {
157
157
  * }
158
158
  * ```
159
159
  *
160
- * ### Custom Storage Keys
160
+ * @example Custom Storage Keys
161
161
  * ```typescript
162
162
  * // Store state with a custom key for multi-tenant scenarios
163
163
  * const customKey = { key: `tenant_${tenantId}` };
@@ -165,7 +165,7 @@ export interface StatePropertyAccessor<T = any> {
165
165
  * await dataProperty.set(context, updatedData, customKey);
166
166
  * ```
167
167
  *
168
- * ## Important Notes
168
+ * ### Important Notes
169
169
  *
170
170
  * - **Thread Safety**: This class is not thread-safe. Ensure proper synchronization in concurrent scenarios.
171
171
  * - **Memory Usage**: State objects are kept in memory until the context is disposed.
@@ -201,20 +201,19 @@ export declare class AgentStatePropertyAccessor<T = any> implements StatePropert
201
201
  */
202
202
  constructor(state: AgentState, name: string);
203
203
  /**
204
- * Deletes the property from the state storage.
205
- *
204
+ * @summary Deletes the property from the state storage.
205
+ * @remarks
206
206
  * This operation removes the property from the in-memory state object but does not
207
207
  * automatically persist the change to the underlying storage. You must call
208
208
  * `state.saveChanges(context)` afterwards to persist the deletion.
209
209
  *
210
- * @remarks
211
210
  * - If the property doesn't exist, this operation is a no-op
212
211
  * - The deletion only affects the in-memory state until `saveChanges()` is called
213
212
  * - After deletion, subsequent `get()` calls will return `undefined` (or the default value if provided)
214
213
  *
215
214
  * @param context The turn context for the current conversation turn
216
215
  * @param customKey Optional custom key for accessing state in a specific storage location.
217
- * Useful for multi-tenant scenarios or when state needs to be partitioned.
216
+ * Useful for multi-tenant scenarios or when state needs to be partitioned.
218
217
  *
219
218
  * @returns A promise that resolves when the delete operation is complete
220
219
  *
@@ -241,15 +240,14 @@ export declare class AgentStatePropertyAccessor<T = any> implements StatePropert
241
240
  */
242
241
  delete(context: TurnContext, customKey?: CustomKey): Promise<void>;
243
242
  /**
244
- * Retrieves the value of the property from state storage.
245
- *
243
+ * @summary Retrieves the value of the property from state storage.
244
+ * @remarks
246
245
  * This method provides intelligent default value handling:
247
246
  * - If the property exists, its value is returned
248
247
  * - If the property doesn't exist and a default value is provided, the default is deep cloned,
249
248
  * stored in state, and returned
250
249
  * - If the property doesn't exist and no default is provided, `undefined` is returned
251
250
  *
252
- * @remarks
253
251
  * **Deep Cloning**: Default values are deep cloned using JSON serialization to prevent
254
252
  * reference sharing issues. This means:
255
253
  * - Functions, symbols, and circular references will be lost
@@ -308,13 +306,12 @@ export declare class AgentStatePropertyAccessor<T = any> implements StatePropert
308
306
  */
309
307
  get(context: TurnContext, defaultValue?: T, customKey?: CustomKey): Promise<T>;
310
308
  /**
311
- * Sets the value of the property in state storage.
312
- *
309
+ * @summary Sets the value of the property in state storage.
310
+ * @remarks
313
311
  * This operation updates the property in the in-memory state object but does not
314
312
  * automatically persist the change to the underlying storage. You must call
315
313
  * `state.saveChanges(context)` afterwards to persist the changes.
316
314
  *
317
- * @remarks
318
315
  * **Memory vs Storage**: Changes are immediately reflected in memory and will be
319
316
  * available to subsequent `get()` calls within the same context, but are not
320
317
  * persisted to storage until `saveChanges()` is called.
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.AgentStatePropertyAccessor = void 0;
8
8
  /**
9
- * Provides typed access to an Agent state property with automatic state loading and persistence management.
9
+ * @summary Provides typed access to an Agent state property with automatic state loading and persistence management.
10
10
  *
11
11
  * @remarks
12
12
  * AgentStatePropertyAccessor simplifies working with persisted state by abstracting
@@ -19,9 +19,9 @@ exports.AgentStatePropertyAccessor = void 0;
19
19
  * - **Memory Management**: Efficient in-memory caching with explicit persistence control
20
20
  * - **Custom Keys**: Support for custom storage keys for advanced scenarios
21
21
  *
22
- * ## Key Features
22
+ * ### Key Features
23
23
  *
24
- * ### Type Safety
24
+ * #### Type Safety
25
25
  * The accessor provides compile-time type checking when using TypeScript:
26
26
  * ```typescript
27
27
  * interface UserProfile {
@@ -31,7 +31,7 @@ exports.AgentStatePropertyAccessor = void 0;
31
31
  * const userProfile = userState.createProperty<UserProfile>("userProfile");
32
32
  * ```
33
33
  *
34
- * ### Automatic Default Value Handling
34
+ * #### Automatic Default Value Handling
35
35
  * When a property doesn't exist, default values are automatically cloned and stored:
36
36
  * ```typescript
37
37
  * // If userProfile doesn't exist, the default will be cloned and saved
@@ -41,7 +41,7 @@ exports.AgentStatePropertyAccessor = void 0;
41
41
  * });
42
42
  * ```
43
43
  *
44
- * ### Explicit Persistence Control
44
+ * #### Explicit Persistence Control
45
45
  * Changes are kept in memory until explicitly persisted:
46
46
  * ```typescript
47
47
  * // Modify the state
@@ -53,9 +53,9 @@ exports.AgentStatePropertyAccessor = void 0;
53
53
  * await userState.saveChanges(context);
54
54
  * ```
55
55
  *
56
- * ## Usage Examples
56
+ * ### Usage Examples
57
57
  *
58
- * ### Basic Usage
58
+ * @example Basic Usage
59
59
  * ```typescript
60
60
  * // Create a property accessor
61
61
  * const userProfile = userState.createProperty<UserProfile>("userProfile");
@@ -74,7 +74,7 @@ exports.AgentStatePropertyAccessor = void 0;
74
74
  * await userState.saveChanges(context); // Persist to storage
75
75
  * ```
76
76
  *
77
- * ### Working with Primitive Types
77
+ * @example Working with Primitive Types
78
78
  * ```typescript
79
79
  * const counterProperty = userState.createProperty<number>("counter");
80
80
  *
@@ -84,7 +84,7 @@ exports.AgentStatePropertyAccessor = void 0;
84
84
  * await userState.saveChanges(context);
85
85
  * ```
86
86
  *
87
- * ### Conditional Logic
87
+ * @example Conditional Logic
88
88
  * ```typescript
89
89
  * const settingsProperty = userState.createProperty<Settings>("settings");
90
90
  *
@@ -96,7 +96,7 @@ exports.AgentStatePropertyAccessor = void 0;
96
96
  * }
97
97
  * ```
98
98
  *
99
- * ### Custom Storage Keys
99
+ * @example Custom Storage Keys
100
100
  * ```typescript
101
101
  * // Store state with a custom key for multi-tenant scenarios
102
102
  * const customKey = { key: `tenant_${tenantId}` };
@@ -104,7 +104,7 @@ exports.AgentStatePropertyAccessor = void 0;
104
104
  * await dataProperty.set(context, updatedData, customKey);
105
105
  * ```
106
106
  *
107
- * ## Important Notes
107
+ * ### Important Notes
108
108
  *
109
109
  * - **Thread Safety**: This class is not thread-safe. Ensure proper synchronization in concurrent scenarios.
110
110
  * - **Memory Usage**: State objects are kept in memory until the context is disposed.
@@ -141,20 +141,19 @@ class AgentStatePropertyAccessor {
141
141
  this.name = name;
142
142
  }
143
143
  /**
144
- * Deletes the property from the state storage.
145
- *
144
+ * @summary Deletes the property from the state storage.
145
+ * @remarks
146
146
  * This operation removes the property from the in-memory state object but does not
147
147
  * automatically persist the change to the underlying storage. You must call
148
148
  * `state.saveChanges(context)` afterwards to persist the deletion.
149
149
  *
150
- * @remarks
151
150
  * - If the property doesn't exist, this operation is a no-op
152
151
  * - The deletion only affects the in-memory state until `saveChanges()` is called
153
152
  * - After deletion, subsequent `get()` calls will return `undefined` (or the default value if provided)
154
153
  *
155
154
  * @param context The turn context for the current conversation turn
156
155
  * @param customKey Optional custom key for accessing state in a specific storage location.
157
- * Useful for multi-tenant scenarios or when state needs to be partitioned.
156
+ * Useful for multi-tenant scenarios or when state needs to be partitioned.
158
157
  *
159
158
  * @returns A promise that resolves when the delete operation is complete
160
159
  *
@@ -186,15 +185,14 @@ class AgentStatePropertyAccessor {
186
185
  }
187
186
  }
188
187
  /**
189
- * Retrieves the value of the property from state storage.
190
- *
188
+ * @summary Retrieves the value of the property from state storage.
189
+ * @remarks
191
190
  * This method provides intelligent default value handling:
192
191
  * - If the property exists, its value is returned
193
192
  * - If the property doesn't exist and a default value is provided, the default is deep cloned,
194
193
  * stored in state, and returned
195
194
  * - If the property doesn't exist and no default is provided, `undefined` is returned
196
195
  *
197
- * @remarks
198
196
  * **Deep Cloning**: Default values are deep cloned using JSON serialization to prevent
199
197
  * reference sharing issues. This means:
200
198
  * - Functions, symbols, and circular references will be lost
@@ -262,13 +260,12 @@ class AgentStatePropertyAccessor {
262
260
  return obj[this.name];
263
261
  }
264
262
  /**
265
- * Sets the value of the property in state storage.
266
- *
263
+ * @summary Sets the value of the property in state storage.
264
+ * @remarks
267
265
  * This operation updates the property in the in-memory state object but does not
268
266
  * automatically persist the change to the underlying storage. You must call
269
267
  * `state.saveChanges(context)` afterwards to persist the changes.
270
268
  *
271
- * @remarks
272
269
  * **Memory vs Storage**: Changes are immediately reflected in memory and will be
273
270
  * available to subsequent `get()` calls within the same context, but are not
274
271
  * persisted to storage until `saveChanges()` is called.
@@ -1 +1 @@
1
- {"version":3,"file":"agentStatePropertyAccesor.js","sourceRoot":"","sources":["../../../src/state/agentStatePropertyAccesor.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAuEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8GG;AACH,MAAa,0BAA0B;IACrC;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAgC,KAAiB,EAAkB,IAAY;QAA/C,UAAK,GAAL,KAAK,CAAY;QAAkB,SAAI,GAAJ,IAAI,CAAQ;IAAI,CAAC;IAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACH,KAAK,CAAC,MAAM,CAAE,OAAoB,EAAE,SAAqB;QACvD,MAAM,GAAG,GAAQ,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;QACjE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACzD,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACvB,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiEG;IACH,KAAK,CAAC,GAAG,CAAE,OAAoB,EAAE,YAAgB,EAAE,SAAqB;QACtE,MAAM,GAAG,GAAQ,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkEG;IACH,KAAK,CAAC,GAAG,CAAE,OAAoB,EAAE,KAAQ,EAAE,SAAqB;QAC9D,MAAM,GAAG,GAAQ,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;QACjE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA;IACxB,CAAC;CACF;AAxND,gEAwNC"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { Storage, StoreItem } from './storage';
6
6
  /**
7
- * A file-based storage implementation that persists data to the local filesystem.
7
+ * @summary A file-based storage implementation that persists data to the local filesystem.
8
8
  *
9
9
  * @remarks
10
10
  * FileStorage stores all data in a single JSON file named 'state.json' within a specified folder.
@@ -15,6 +15,16 @@ import { Storage, StoreItem } from './storage';
15
15
  * can be any JSON-serializable data. All operations are synchronous file I/O operations
16
16
  * wrapped in Promise interfaces to match the Storage contract.
17
17
  *
18
+ * ### Warning
19
+ * This implementation does not provide:
20
+ * - Thread safety for concurrent access
21
+ * - Optimistic concurrency control (eTag support)
22
+ * - Atomic operations across multiple keys
23
+ * - Scale for large datasets
24
+ *
25
+ * For production scenarios requiring these features, consider using
26
+ * database-backed storage implementations instead.
27
+ *
18
28
  * @example
19
29
  * ```typescript
20
30
  * const storage = new FileStorage('./data');
@@ -33,15 +43,7 @@ import { Storage, StoreItem } from './storage';
33
43
  * await storage.delete(['conversation456']);
34
44
  * ```
35
45
  *
36
- * @warning
37
- * This implementation does not provide:
38
- * - Thread safety for concurrent access
39
- * - Optimistic concurrency control (eTag support)
40
- * - Atomic operations across multiple keys
41
- * - Scale for large datasets
42
- *
43
- * For production scenarios requiring these features, consider using
44
- * database-backed storage implementations instead.
46
+
45
47
  */
46
48
  export declare class FileStorage implements Storage {
47
49
  private _folder;
@@ -11,7 +11,7 @@ exports.FileStorage = void 0;
11
11
  const path_1 = __importDefault(require("path"));
12
12
  const fs_1 = __importDefault(require("fs"));
13
13
  /**
14
- * A file-based storage implementation that persists data to the local filesystem.
14
+ * @summary A file-based storage implementation that persists data to the local filesystem.
15
15
  *
16
16
  * @remarks
17
17
  * FileStorage stores all data in a single JSON file named 'state.json' within a specified folder.
@@ -22,6 +22,16 @@ const fs_1 = __importDefault(require("fs"));
22
22
  * can be any JSON-serializable data. All operations are synchronous file I/O operations
23
23
  * wrapped in Promise interfaces to match the Storage contract.
24
24
  *
25
+ * ### Warning
26
+ * This implementation does not provide:
27
+ * - Thread safety for concurrent access
28
+ * - Optimistic concurrency control (eTag support)
29
+ * - Atomic operations across multiple keys
30
+ * - Scale for large datasets
31
+ *
32
+ * For production scenarios requiring these features, consider using
33
+ * database-backed storage implementations instead.
34
+ *
25
35
  * @example
26
36
  * ```typescript
27
37
  * const storage = new FileStorage('./data');
@@ -40,15 +50,7 @@ const fs_1 = __importDefault(require("fs"));
40
50
  * await storage.delete(['conversation456']);
41
51
  * ```
42
52
  *
43
- * @warning
44
- * This implementation does not provide:
45
- * - Thread safety for concurrent access
46
- * - Optimistic concurrency control (eTag support)
47
- * - Atomic operations across multiple keys
48
- * - Scale for large datasets
49
- *
50
- * For production scenarios requiring these features, consider using
51
- * database-backed storage implementations instead.
53
+
52
54
  */
53
55
  class FileStorage {
54
56
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"fileStorage.js","sourceRoot":"","sources":["../../../src/storage/fileStorage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AAEH,gDAAuB;AACvB,4CAAmB;AAGnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAa,WAAW;IAItB;;;;;;;;;;;;OAYG;IACH,YAAa,MAAc;QACzB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,YAAE,CAAC,SAAS,CAAC,MAAM,EAAE,EA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;;;;;;;;;OAaG;IACH,KAAK,CAAE,OAAkB;QACvB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;QACrC,CAAC;QACD,YAAE,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,GAAG,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;QACxF,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAE,IAAc;QACpB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC/B,MAAM,CAAC,IAAI,cAAc,CAAC,kCAAkC,CAAC,CAAC,CAAA;YAChE,CAAC;iBAAM,CAAC;gBACN,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;oBACvB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;gBAC7B,CAAC;gBACD,YAAE,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,GAAG,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;YAC1F,CAAC;YACD,OAAO,EAAE,CAAA;QACX,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AA5GD,kCA4GC"}
@@ -28,7 +28,7 @@ export interface TranscriptInfo {
28
28
  }
29
29
  /**
30
30
  * Paged result of items.
31
- * @template T - The type of items in the paged result.
31
+ * @typeParam T - The type of items in the paged result.
32
32
  */
33
33
  export interface PagedResult<T> {
34
34
  /**
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.6.21-g3c2261b2fc",
4
+ "version": "1.0.0",
5
5
  "homepage": "https://github.com/microsoft/Agents-for-js",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@azure/core-auth": "^1.10.0",
23
23
  "@azure/msal-node": "^3.6.0",
24
- "@microsoft/agents-activity": "0.6.21-g3c2261b2fc",
24
+ "@microsoft/agents-activity": "1.0.0",
25
25
  "axios": "^1.10.0",
26
26
  "jsonwebtoken": "^9.0.2",
27
27
  "jwks-rsa": "^3.2.0"
@@ -34,7 +34,8 @@ enum AdaptiveCardInvokeResponseType {
34
34
  }
35
35
 
36
36
  /**
37
- * Represents a single search result item returned from an Adaptive Card search operation.
37
+ * @summary Represents a single search result item returned from an Adaptive Card search operation.
38
+ * @remarks
38
39
  * This interface defines the structure for search results that are displayed to users
39
40
  * when they perform searches within Adaptive Cards, such as typeahead or dropdown searches.
40
41
  *
@@ -48,7 +49,8 @@ enum AdaptiveCardInvokeResponseType {
48
49
  */
49
50
  export interface AdaptiveCardSearchResult {
50
51
  /**
51
- * The display text shown to the user in the search results.
52
+ * @summary The display text shown to the user in the search results.
53
+ * @remarks
52
54
  * This is typically the human-readable label that appears in dropdowns,
53
55
  * typeahead suggestions, or search result lists.
54
56
  *
@@ -57,7 +59,8 @@ export interface AdaptiveCardSearchResult {
57
59
  title: string;
58
60
 
59
61
  /**
60
- * The underlying value associated with this search result.
62
+ * @summary The underlying value associated with this search result.
63
+ * @remarks
61
64
  * This is usually the actual data value that gets selected when the user
62
65
  * chooses this result, such as an ID, email address, or other identifier.
63
66
  *
@@ -68,7 +71,7 @@ export interface AdaptiveCardSearchResult {
68
71
 
69
72
  /**
70
73
  * A class to handle Adaptive Card actions such as executing actions, submitting actions, and performing searches.
71
- * @template TState - The type of the TurnState used in the application.
74
+ * @typeParam TState - The type of the TurnState used in the application.
72
75
  */
73
76
  export class AdaptiveCardsActions<TState extends TurnState> {
74
77
  /**
@@ -86,7 +89,7 @@ export class AdaptiveCardsActions<TState extends TurnState> {
86
89
 
87
90
  /**
88
91
  * Registers a handler for the Action.Execute event.
89
- * @template TData - The type of the data passed to the handler.
92
+ * @typeParam TData - The type of the data passed to the handler.
90
93
  * @param verb - A string, RegExp, RouteSelector, or an array of these to match the action verb.
91
94
  * @param handler - A function to handle the action execution.
92
95
  * @returns The Teams application instance.
@@ -171,7 +174,7 @@ export class AdaptiveCardsActions<TState extends TurnState> {
171
174
 
172
175
  /**
173
176
  * Registers a handler for the Action.Submit event.
174
- * @template TData - The type of the data passed to the handler.
177
+ * @typeParam TData - The type of the data passed to the handler.
175
178
  * @param verb - A string, RegExp, RouteSelector, or an array of these to match the action verb.
176
179
  * @param handler - A function to handle the action submission.
177
180
  * @returns The Teams application instance.
@@ -5,7 +5,7 @@
5
5
 
6
6
  /**
7
7
  * Represents a query with pagination and parameters.
8
- * @template TParams - The type of the query parameters.
8
+ * @typeParam TParams - The type of the query parameters.
9
9
  */
10
10
  export interface Query<TParams extends Record<string, any>> {
11
11
  /**