@microsoft/agents-copilotstudio-client 0.6.21-g3c2261b2fc → 0.6.22

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.
@@ -13,6 +13,8 @@ declare abstract class ConnectionOptions implements Omit<CopilotStudioConnection
13
13
  appClientId: string;
14
14
  /** The tenant ID of the application. */
15
15
  tenantId: string;
16
+ /** The login authority to use for the connection */
17
+ authority?: string;
16
18
  /** The environment ID of the application. */
17
19
  environmentId: string;
18
20
  /** The identifier of the agent. */
@@ -16,6 +16,8 @@ class ConnectionOptions {
16
16
  this.appClientId = '';
17
17
  /** The tenant ID of the application. */
18
18
  this.tenantId = '';
19
+ /** The login authority to use for the connection */
20
+ this.authority = '';
19
21
  /** The environment ID of the application. */
20
22
  this.environmentId = '';
21
23
  /** The identifier of the agent. */
@@ -39,13 +41,16 @@ class ConnectionSettings extends ConnectionOptions {
39
41
  }
40
42
  const cloud = (_a = options.cloud) !== null && _a !== void 0 ? _a : powerPlatformCloud_1.PowerPlatformCloud.Prod;
41
43
  const copilotAgentType = (_b = options.copilotAgentType) !== null && _b !== void 0 ? _b : agentType_1.AgentType.Published;
44
+ const authority = options.authority && options.authority.trim() !== ''
45
+ ? options.authority
46
+ : 'https://login.microsoftonline.com';
42
47
  if (!Object.values(powerPlatformCloud_1.PowerPlatformCloud).includes(cloud)) {
43
48
  throw new Error(`Invalid PowerPlatformCloud: '${cloud}'. Supported values: ${Object.values(powerPlatformCloud_1.PowerPlatformCloud).join(', ')}`);
44
49
  }
45
50
  if (!Object.values(agentType_1.AgentType).includes(copilotAgentType)) {
46
51
  throw new Error(`Invalid AgentType: '${copilotAgentType}'. Supported values: ${Object.values(agentType_1.AgentType).join(', ')}`);
47
52
  }
48
- Object.assign(this, { ...options, cloud, copilotAgentType });
53
+ Object.assign(this, { ...options, cloud, copilotAgentType, authority });
49
54
  }
50
55
  }
51
56
  exports.ConnectionSettings = ConnectionSettings;
@@ -54,17 +59,18 @@ exports.ConnectionSettings = ConnectionSettings;
54
59
  * @returns The connection settings.
55
60
  */
56
61
  const loadCopilotStudioConnectionSettingsFromEnv = () => {
57
- var _a, _b, _c, _d, _e;
62
+ var _a, _b, _c, _d, _e, _f;
58
63
  return new ConnectionSettings({
59
64
  appClientId: (_a = process.env.appClientId) !== null && _a !== void 0 ? _a : '',
60
65
  tenantId: (_b = process.env.tenantId) !== null && _b !== void 0 ? _b : '',
61
- environmentId: (_c = process.env.environmentId) !== null && _c !== void 0 ? _c : '',
62
- agentIdentifier: (_d = process.env.agentIdentifier) !== null && _d !== void 0 ? _d : '',
66
+ authority: (_c = process.env.authorityEndpoint) !== null && _c !== void 0 ? _c : 'https://login.microsoftonline.com',
67
+ environmentId: (_d = process.env.environmentId) !== null && _d !== void 0 ? _d : '',
68
+ agentIdentifier: (_e = process.env.agentIdentifier) !== null && _e !== void 0 ? _e : '',
63
69
  cloud: process.env.cloud,
64
70
  customPowerPlatformCloud: process.env.customPowerPlatformCloud,
65
71
  copilotAgentType: process.env.copilotAgentType,
66
72
  directConnectUrl: process.env.directConnectUrl,
67
- useExperimentalEndpoint: ((_e = process.env.useExperimentalEndpoint) === null || _e === void 0 ? void 0 : _e.toLowerCase()) === 'true'
73
+ useExperimentalEndpoint: ((_f = process.env.useExperimentalEndpoint) === null || _f === void 0 ? void 0 : _f.toLowerCase()) === 'true'
68
74
  });
69
75
  };
70
76
  exports.loadCopilotStudioConnectionSettingsFromEnv = loadCopilotStudioConnectionSettingsFromEnv;
@@ -1 +1 @@
1
- {"version":3,"file":"connectionSettings.js","sourceRoot":"","sources":["../../src/connectionSettings.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2CAAuC;AAEvC,6DAAyD;AAEzD;;GAEG;AACH,MAAe,iBAAiB;IAAhC;QACE,wCAAwC;QACjC,gBAAW,GAAW,EAAE,CAAA;QAC/B,wCAAwC;QACjC,aAAQ,GAAW,EAAE,CAAA;QAC5B,6CAA6C;QACtC,kBAAa,GAA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A,OAAO,CAAC,GAAG,CAAC,iBAAiB,mCAAI,mCAAmC;QAC/E,aAAa,EAAE,MAAA,OAAO,CAAC,GAAG,CAAC,aAAa,mCAAI,EAAE;QAC9C,eAAe,EAAE,MAAA,OAAO,CAAC,GAAG,CAAC,eAAe,mCAAI,EAAE;QAClD,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,KAA2B;QAC9C,wBAAwB,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB;QAC9D,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAA6B;QAC3D,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;QAC9C,uBAAuB,EAAE,CAAA,MAAA,OAAO,CAAC,GAAG,CAAC,uBAAuB,0CAAE,WAAW,EAAE,MAAK,MAAM;KACvF,CAAC,CAAA;AACJ,CAAC,CAAA;AAbY,QAAA,0CAA0C,8CAatD"}
@@ -22,4 +22,6 @@ export interface CopilotStudioConnectionSettings {
22
22
  directConnectUrl?: string;
23
23
  /** Directs Copilot Studio Client to use the experimental endpoint if available. */
24
24
  useExperimentalEndpoint?: boolean;
25
+ /** The login authority to use for the connection. */
26
+ authority?: string;
25
27
  }
@@ -20,7 +20,8 @@ export interface CopilotStudioWebChatSettings {
20
20
  showTyping?: boolean;
21
21
  }
22
22
  /**
23
- * Represents a connection interface for integrating Copilot Studio with WebChat.
23
+ * @summary Represents a connection interface for integrating Copilot Studio with WebChat.
24
+ * @remarks
24
25
  * This interface provides the necessary methods and observables to facilitate
25
26
  * bidirectional communication between a WebChat client and the Copilot Studio service.
26
27
  *
@@ -73,7 +74,8 @@ export interface CopilotStudioWebChatConnection {
73
74
  end(): void;
74
75
  }
75
76
  /**
76
- * A utility class that provides WebChat integration capabilities for Copilot Studio services.
77
+ * @summary A utility class that provides WebChat integration capabilities for Copilot Studio services.
78
+ * @remarks
77
79
  * This class acts as a bridge between Microsoft Bot Framework WebChat and Copilot Studio,
78
80
  * enabling seamless communication through a DirectLine-compatible interface.
79
81
  *
@@ -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
- * A utility class that provides WebChat integration capabilities for Copilot Studio services.
13
+ * @summary A utility class that provides WebChat integration capabilities for Copilot Studio services.
14
+ * @remarks
14
15
  * This class acts as a bridge between Microsoft Bot Framework WebChat and Copilot Studio,
15
16
  * enabling seamless communication through a DirectLine-compatible interface.
16
17
  *
@@ -210,7 +211,7 @@ exports.CopilotStudioWebChat = CopilotStudioWebChat;
210
211
  * The created Observable handles promise resolution and rejection automatically,
211
212
  * converting them to appropriate next/error signals for subscribers.
212
213
  *
213
- * @template T - The type of value that the observable will emit
214
+ * @typeParam T - The type of value that the observable will emit
214
215
  * @param fn - An asynchronous function that receives a Subscriber and performs
215
216
  * the desired async operation. The function should call subscriber.next()
216
217
  * with results and subscriber.complete() when finished.
@@ -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;AA0E9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;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,CAA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,QAAQ,EAAE,CAAA;wBACrB,MAAM,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAA;oBACrE,CAAC;oBAAC,OAAO,KAAK,EAAE,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;AAlJD,oDAkJC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;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": "0.6.21-g3c2261b2fc",
3
+ "version": "0.6.22",
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": "0.6.21-g3c2261b2fc",
30
+ "@microsoft/agents-activity": "0.6.22",
31
31
  "axios": "^1.9.0",
32
32
  "rxjs": "7.8.2",
33
33
  "uuid": "^11.1.0"
@@ -15,6 +15,8 @@ abstract class ConnectionOptions implements Omit<CopilotStudioConnectionSettings
15
15
  public appClientId: string = ''
16
16
  /** The tenant ID of the application. */
17
17
  public tenantId: string = ''
18
+ /** The login authority to use for the connection */
19
+ public authority?: string = ''
18
20
  /** The environment ID of the application. */
19
21
  public environmentId: string = ''
20
22
  /** The identifier of the agent. */
@@ -63,6 +65,9 @@ export class ConnectionSettings extends ConnectionOptions {
63
65
 
64
66
  const cloud = options.cloud ?? PowerPlatformCloud.Prod
65
67
  const copilotAgentType = options.copilotAgentType ?? AgentType.Published
68
+ const authority = options.authority && options.authority.trim() !== ''
69
+ ? options.authority
70
+ : 'https://login.microsoftonline.com'
66
71
 
67
72
  if (!Object.values(PowerPlatformCloud).includes(cloud as PowerPlatformCloud)) {
68
73
  throw new Error(`Invalid PowerPlatformCloud: '${cloud}'. Supported values: ${Object.values(PowerPlatformCloud).join(', ')}`)
@@ -72,7 +77,7 @@ export class ConnectionSettings extends ConnectionOptions {
72
77
  throw new Error(`Invalid AgentType: '${copilotAgentType}'. Supported values: ${Object.values(AgentType).join(', ')}`)
73
78
  }
74
79
 
75
- Object.assign(this, { ...options, cloud, copilotAgentType })
80
+ Object.assign(this, { ...options, cloud, copilotAgentType, authority })
76
81
  }
77
82
  }
78
83
 
@@ -84,6 +89,7 @@ export const loadCopilotStudioConnectionSettingsFromEnv: () => ConnectionSetting
84
89
  return new ConnectionSettings({
85
90
  appClientId: process.env.appClientId ?? '',
86
91
  tenantId: process.env.tenantId ?? '',
92
+ authority: process.env.authorityEndpoint ?? 'https://login.microsoftonline.com',
87
93
  environmentId: process.env.environmentId ?? '',
88
94
  agentIdentifier: process.env.agentIdentifier ?? '',
89
95
  cloud: process.env.cloud as PowerPlatformCloud,
@@ -29,5 +29,8 @@ export interface CopilotStudioConnectionSettings {
29
29
  directConnectUrl?: string
30
30
 
31
31
  /** Directs Copilot Studio Client to use the experimental endpoint if available. */
32
- useExperimentalEndpoint?: boolean
32
+ useExperimentalEndpoint?: boolean,
33
+
34
+ /** The login authority to use for the connection. */
35
+ authority?: string
33
36
  }
@@ -29,7 +29,8 @@ export interface CopilotStudioWebChatSettings {
29
29
  }
30
30
 
31
31
  /**
32
- * Represents a connection interface for integrating Copilot Studio with WebChat.
32
+ * @summary Represents a connection interface for integrating Copilot Studio with WebChat.
33
+ * @remarks
33
34
  * This interface provides the necessary methods and observables to facilitate
34
35
  * bidirectional communication between a WebChat client and the Copilot Studio service.
35
36
  *
@@ -86,7 +87,8 @@ export interface CopilotStudioWebChatConnection {
86
87
  }
87
88
 
88
89
  /**
89
- * A utility class that provides WebChat integration capabilities for Copilot Studio services.
90
+ * @summary A utility class that provides WebChat integration capabilities for Copilot Studio services.
91
+ * @remarks
90
92
  * This class acts as a bridge between Microsoft Bot Framework WebChat and Copilot Studio,
91
93
  * enabling seamless communication through a DirectLine-compatible interface.
92
94
  *
@@ -302,7 +304,7 @@ export class CopilotStudioWebChat {
302
304
  * The created Observable handles promise resolution and rejection automatically,
303
305
  * converting them to appropriate next/error signals for subscribers.
304
306
  *
305
- * @template T - The type of value that the observable will emit
307
+ * @typeParam T - The type of value that the observable will emit
306
308
  * @param fn - An asynchronous function that receives a Subscriber and performs
307
309
  * the desired async operation. The function should call subscriber.next()
308
310
  * with results and subscriber.complete() when finished.