@microsoft/agents-copilotstudio-client 1.0.0-ge4831811bf → 1.0.3-g444d99f704

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.
@@ -20,7 +20,8 @@ export interface CopilotStudioWebChatSettings {
20
20
  showTyping?: boolean;
21
21
  }
22
22
  /**
23
- * @summary Represents a connection interface for integrating Copilot Studio with WebChat.
23
+ * Represents a connection interface for integrating Copilot Studio with WebChat.
24
+ *
24
25
  * @remarks
25
26
  * This interface provides the necessary methods and observables to facilitate
26
27
  * bidirectional communication between a WebChat client and the Copilot Studio service.
@@ -74,7 +75,8 @@ export interface CopilotStudioWebChatConnection {
74
75
  end(): void;
75
76
  }
76
77
  /**
77
- * @summary A utility class that provides WebChat integration capabilities for Copilot Studio services.
78
+ * A utility class that provides WebChat integration capabilities for Copilot Studio services.
79
+ *
78
80
  * @remarks
79
81
  * This class acts as a bridge between Microsoft Bot Framework WebChat and Copilot Studio,
80
82
  * enabling seamless communication through a DirectLine-compatible interface.
@@ -137,22 +139,7 @@ export declare class CopilotStudioWebChat {
137
139
  /**
138
140
  * Creates a DirectLine-compatible connection for integrating Copilot Studio with WebChat.
139
141
  *
140
- * This method establishes a real-time communication channel between WebChat and the
141
- * Copilot Studio service. The returned connection object implements the DirectLine
142
- * protocol, making it fully compatible with Microsoft Bot Framework WebChat components.
143
- *
144
- * ## Connection Lifecycle:
145
- * 1. **Initialization**: Creates observables for connection status and activity streaming
146
- * 2. **Conversation Start**: Automatically initiates conversation when first activity is posted
147
- * 3. **Message Flow**: Handles bidirectional message exchange with proper sequencing
148
- * 4. **Cleanup**: Provides graceful connection termination
149
- *
150
- * ## Message Processing:
151
- * - User messages are validated and sent to Copilot Studio
152
- * - Agent responses are received and formatted for WebChat
153
- * - All activities include timestamps and sequence IDs for proper ordering
154
- * - Optional typing indicators provide visual feedback during processing
155
- *
142
+
156
143
  * @param client - A configured CopilotStudioClient instance that handles the underlying
157
144
  * communication with the Copilot Studio service. This client should be
158
145
  * properly authenticated and configured with the target bot details.
@@ -169,6 +156,23 @@ export declare class CopilotStudioWebChat {
169
156
  * @throws Error if the provided client is not properly configured or if there are
170
157
  * issues establishing the initial connection to the Copilot Studio service.
171
158
  *
159
+ * @remarks
160
+ * This method establishes a real-time communication channel between WebChat and the
161
+ * Copilot Studio service. The returned connection object implements the DirectLine
162
+ * protocol, making it fully compatible with Microsoft Bot Framework WebChat components.
163
+ *
164
+ * ## Connection Lifecycle:
165
+ * 1. **Initialization**: Creates observables for connection status and activity streaming
166
+ * 2. **Conversation Start**: Automatically initiates conversation when first activity is posted
167
+ * 3. **Message Flow**: Handles bidirectional message exchange with proper sequencing
168
+ * 4. **Cleanup**: Provides graceful connection termination
169
+ *
170
+ * ## Message Processing:
171
+ * - User messages are validated and sent to Copilot Studio
172
+ * - Agent responses are received and formatted for WebChat
173
+ * - All activities include timestamps and sequence IDs for proper ordering
174
+ * - Optional typing indicators provide visual feedback during processing
175
+ *
172
176
  * @example
173
177
  * ```typescript
174
178
  * const connection = CopilotStudioWebChat.createConnection(client, {
@@ -10,7 +10,8 @@ const rxjs_1 = require("rxjs");
10
10
  const logger_1 = require("@microsoft/agents-activity/logger");
11
11
  const logger = (0, logger_1.debug)('copilot-studio:webchat');
12
12
  /**
13
- * @summary A utility class that provides WebChat integration capabilities for Copilot Studio services.
13
+ * A utility class that provides WebChat integration capabilities for Copilot Studio services.
14
+ *
14
15
  * @remarks
15
16
  * This class acts as a bridge between Microsoft Bot Framework WebChat and Copilot Studio,
16
17
  * enabling seamless communication through a DirectLine-compatible interface.
@@ -73,22 +74,7 @@ class CopilotStudioWebChat {
73
74
  /**
74
75
  * Creates a DirectLine-compatible connection for integrating Copilot Studio with WebChat.
75
76
  *
76
- * This method establishes a real-time communication channel between WebChat and the
77
- * Copilot Studio service. The returned connection object implements the DirectLine
78
- * protocol, making it fully compatible with Microsoft Bot Framework WebChat components.
79
- *
80
- * ## Connection Lifecycle:
81
- * 1. **Initialization**: Creates observables for connection status and activity streaming
82
- * 2. **Conversation Start**: Automatically initiates conversation when first activity is posted
83
- * 3. **Message Flow**: Handles bidirectional message exchange with proper sequencing
84
- * 4. **Cleanup**: Provides graceful connection termination
85
- *
86
- * ## Message Processing:
87
- * - User messages are validated and sent to Copilot Studio
88
- * - Agent responses are received and formatted for WebChat
89
- * - All activities include timestamps and sequence IDs for proper ordering
90
- * - Optional typing indicators provide visual feedback during processing
91
- *
77
+
92
78
  * @param client - A configured CopilotStudioClient instance that handles the underlying
93
79
  * communication with the Copilot Studio service. This client should be
94
80
  * properly authenticated and configured with the target bot details.
@@ -105,6 +91,23 @@ class CopilotStudioWebChat {
105
91
  * @throws Error if the provided client is not properly configured or if there are
106
92
  * issues establishing the initial connection to the Copilot Studio service.
107
93
  *
94
+ * @remarks
95
+ * This method establishes a real-time communication channel between WebChat and the
96
+ * Copilot Studio service. The returned connection object implements the DirectLine
97
+ * protocol, making it fully compatible with Microsoft Bot Framework WebChat components.
98
+ *
99
+ * ## Connection Lifecycle:
100
+ * 1. **Initialization**: Creates observables for connection status and activity streaming
101
+ * 2. **Conversation Start**: Automatically initiates conversation when first activity is posted
102
+ * 3. **Message Flow**: Handles bidirectional message exchange with proper sequencing
103
+ * 4. **Cleanup**: Provides graceful connection termination
104
+ *
105
+ * ## Message Processing:
106
+ * - User messages are validated and sent to Copilot Studio
107
+ * - Agent responses are received and formatted for WebChat
108
+ * - All activities include timestamps and sequence IDs for proper ordering
109
+ * - Optional typing indicators provide visual feedback during processing
110
+ *
108
111
  * @example
109
112
  * ```typescript
110
113
  * const connection = CopilotStudioWebChat.createConnection(client, {
@@ -204,6 +207,13 @@ exports.CopilotStudioWebChat = CopilotStudioWebChat;
204
207
  /**
205
208
  * Creates an RxJS Observable that wraps an asynchronous function execution.
206
209
  *
210
+ * @typeParam T - The type of value that the observable will emit
211
+ * @param fn - An asynchronous function that receives a Subscriber and performs
212
+ * the desired async operation. The function should call subscriber.next()
213
+ * with results and subscriber.complete() when finished.
214
+ * @returns A new Observable that executes the provided function and emits its results
215
+ *
216
+ * @remarks
207
217
  * This utility function provides a clean way to convert async/await patterns
208
218
  * into Observable streams, enabling integration with reactive programming patterns
209
219
  * used throughout the WebChat connection implementation.
@@ -211,12 +221,6 @@ exports.CopilotStudioWebChat = CopilotStudioWebChat;
211
221
  * The created Observable handles promise resolution and rejection automatically,
212
222
  * converting them to appropriate next/error signals for subscribers.
213
223
  *
214
- * @typeParam T - The type of value that the observable will emit
215
- * @param fn - An asynchronous function that receives a Subscriber and performs
216
- * the desired async operation. The function should call subscriber.next()
217
- * with results and subscriber.complete() when finished.
218
- * @returns A new Observable that executes the provided function and emits its results
219
- *
220
224
  * @example
221
225
  * ```typescript
222
226
  * const dataObservable = createObservable<string>(async (subscriber) => {
@@ -1 +1 @@
1
- {"version":3,"file":"copilotStudioWebChat.js","sourceRoot":"","sources":["../../src/copilotStudioWebChat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+BAAiC;AAGjC,+BAAmE;AAGnE,8DAAyD;AAEzD,MAAM,MAAM,GAAG,IAAA,cAAK,EAAC,wBAAwB,CAAC,CAAA;AA2E9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAa,oBAAoB;IAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,MAAM,CAAC,gBAAgB,CACrB,MAA2B,EAC3B,QAAuC;QAEvC,MAAM,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAA;QAC7E,IAAI,QAAQ,GAAG,CAAC,CAAA;QAChB,IAAI,kBAA6D,CAAA;QACjE,IAAI,YAA6C,CAAA;QAEjD,MAAM,iBAAiB,GAAG,IAAI,sBAAe,CAAC,CAAC,CAAC,CAAA;QAChD,MAAM,SAAS,GAAG,gBAAgB,CAAoB,KAAK,EAAE,UAAU,EAAE,EAAE;YACzE,kBAAkB,GAAG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AAE,CAAC;wBACf,MAAM,CAAC,KAAK,CAAC,2CAA2C,EAAE,KAAK,CAAC,CAAA;wBAChE,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;oBACzB,CAAC;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC;YAED,GAAG;gBACD,MAAM,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAA;gBAC3E,iBAAiB,CAAC,QAAQ,EAAE,CAAA;gBAC5B,IAAI,kBAAkB,EAAE,CAAC;oBACvB,kBAAkB,CAAC,QAAQ,EAAE,CAAA;oBAC7B,kBAAkB,GAAG,SAAS,CAAA;gBAChC,CAAC;YACH,CAAC;SACF,CAAA;IACH,CAAC;CACF;AApJD,oDAoJC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,SAAS,gBAAgB,CAAK,EAAuC;IACnE,OAAO,IAAI,iBAAU,CAAI,CAAC,UAAyB,EAAE,EAAE;QACrD,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IAC3E,CAAC,CAAC,CAAA;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/agents-copilotstudio-client",
3
- "version": "1.0.0-ge4831811bf",
3
+ "version": "1.0.3-g444d99f704",
4
4
  "homepage": "https://github.com/microsoft/Agents-for-js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "build:browser": "esbuild --platform=browser --target=es2019 --format=esm --bundle --sourcemap --minify --outfile=dist/src/browser.mjs src/index.ts"
28
28
  },
29
29
  "dependencies": {
30
- "@microsoft/agents-activity": "1.0.0-ge4831811bf",
30
+ "@microsoft/agents-activity": "1.0.3-g444d99f704",
31
31
  "axios": "^1.9.0",
32
32
  "rxjs": "7.8.2",
33
33
  "uuid": "^11.1.0"
@@ -29,7 +29,8 @@ export interface CopilotStudioWebChatSettings {
29
29
  }
30
30
 
31
31
  /**
32
- * @summary Represents a connection interface for integrating Copilot Studio with WebChat.
32
+ * Represents a connection interface for integrating Copilot Studio with WebChat.
33
+ *
33
34
  * @remarks
34
35
  * This interface provides the necessary methods and observables to facilitate
35
36
  * bidirectional communication between a WebChat client and the Copilot Studio service.
@@ -87,7 +88,8 @@ export interface CopilotStudioWebChatConnection {
87
88
  }
88
89
 
89
90
  /**
90
- * @summary A utility class that provides WebChat integration capabilities for Copilot Studio services.
91
+ * A utility class that provides WebChat integration capabilities for Copilot Studio services.
92
+ *
91
93
  * @remarks
92
94
  * This class acts as a bridge between Microsoft Bot Framework WebChat and Copilot Studio,
93
95
  * enabling seamless communication through a DirectLine-compatible interface.
@@ -150,22 +152,7 @@ export class CopilotStudioWebChat {
150
152
  /**
151
153
  * Creates a DirectLine-compatible connection for integrating Copilot Studio with WebChat.
152
154
  *
153
- * This method establishes a real-time communication channel between WebChat and the
154
- * Copilot Studio service. The returned connection object implements the DirectLine
155
- * protocol, making it fully compatible with Microsoft Bot Framework WebChat components.
156
- *
157
- * ## Connection Lifecycle:
158
- * 1. **Initialization**: Creates observables for connection status and activity streaming
159
- * 2. **Conversation Start**: Automatically initiates conversation when first activity is posted
160
- * 3. **Message Flow**: Handles bidirectional message exchange with proper sequencing
161
- * 4. **Cleanup**: Provides graceful connection termination
162
- *
163
- * ## Message Processing:
164
- * - User messages are validated and sent to Copilot Studio
165
- * - Agent responses are received and formatted for WebChat
166
- * - All activities include timestamps and sequence IDs for proper ordering
167
- * - Optional typing indicators provide visual feedback during processing
168
- *
155
+
169
156
  * @param client - A configured CopilotStudioClient instance that handles the underlying
170
157
  * communication with the Copilot Studio service. This client should be
171
158
  * properly authenticated and configured with the target bot details.
@@ -182,6 +169,23 @@ export class CopilotStudioWebChat {
182
169
  * @throws Error if the provided client is not properly configured or if there are
183
170
  * issues establishing the initial connection to the Copilot Studio service.
184
171
  *
172
+ * @remarks
173
+ * This method establishes a real-time communication channel between WebChat and the
174
+ * Copilot Studio service. The returned connection object implements the DirectLine
175
+ * protocol, making it fully compatible with Microsoft Bot Framework WebChat components.
176
+ *
177
+ * ## Connection Lifecycle:
178
+ * 1. **Initialization**: Creates observables for connection status and activity streaming
179
+ * 2. **Conversation Start**: Automatically initiates conversation when first activity is posted
180
+ * 3. **Message Flow**: Handles bidirectional message exchange with proper sequencing
181
+ * 4. **Cleanup**: Provides graceful connection termination
182
+ *
183
+ * ## Message Processing:
184
+ * - User messages are validated and sent to Copilot Studio
185
+ * - Agent responses are received and formatted for WebChat
186
+ * - All activities include timestamps and sequence IDs for proper ordering
187
+ * - Optional typing indicators provide visual feedback during processing
188
+ *
185
189
  * @example
186
190
  * ```typescript
187
191
  * const connection = CopilotStudioWebChat.createConnection(client, {
@@ -297,6 +301,13 @@ export class CopilotStudioWebChat {
297
301
  /**
298
302
  * Creates an RxJS Observable that wraps an asynchronous function execution.
299
303
  *
304
+ * @typeParam T - The type of value that the observable will emit
305
+ * @param fn - An asynchronous function that receives a Subscriber and performs
306
+ * the desired async operation. The function should call subscriber.next()
307
+ * with results and subscriber.complete() when finished.
308
+ * @returns A new Observable that executes the provided function and emits its results
309
+ *
310
+ * @remarks
300
311
  * This utility function provides a clean way to convert async/await patterns
301
312
  * into Observable streams, enabling integration with reactive programming patterns
302
313
  * used throughout the WebChat connection implementation.
@@ -304,12 +315,6 @@ export class CopilotStudioWebChat {
304
315
  * The created Observable handles promise resolution and rejection automatically,
305
316
  * converting them to appropriate next/error signals for subscribers.
306
317
  *
307
- * @typeParam T - The type of value that the observable will emit
308
- * @param fn - An asynchronous function that receives a Subscriber and performs
309
- * the desired async operation. The function should call subscriber.next()
310
- * with results and subscriber.complete() when finished.
311
- * @returns A new Observable that executes the provided function and emits its results
312
- *
313
318
  * @example
314
319
  * ```typescript
315
320
  * const dataObservable = createObservable<string>(async (subscriber) => {