@microsoft/agents-a365-runtime 0.1.0-preview.30
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 +33 -0
- package/dist/cjs/agentic-authorization-service.d.ts +5 -0
- package/dist/cjs/agentic-authorization-service.d.ts.map +1 -0
- package/dist/cjs/agentic-authorization-service.js +14 -0
- package/dist/cjs/agentic-authorization-service.js.map +1 -0
- package/dist/cjs/environment-utils.d.ts +33 -0
- package/dist/cjs/environment-utils.d.ts.map +1 -0
- package/dist/cjs/environment-utils.js +58 -0
- package/dist/cjs/environment-utils.js.map +1 -0
- package/dist/cjs/index.d.ts +5 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +21 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/power-platform-api-discovery.d.ts +13 -0
- package/dist/cjs/power-platform-api-discovery.d.ts.map +1 -0
- package/dist/cjs/power-platform-api-discovery.js +67 -0
- package/dist/cjs/power-platform-api-discovery.js.map +1 -0
- package/dist/cjs/utility.d.ts +20 -0
- package/dist/cjs/utility.d.ts.map +1 -0
- package/dist/cjs/utility.js +82 -0
- package/dist/cjs/utility.js.map +1 -0
- package/dist/esm/agentic-authorization-service.d.ts +5 -0
- package/dist/esm/agentic-authorization-service.d.ts.map +1 -0
- package/dist/esm/agentic-authorization-service.js +10 -0
- package/dist/esm/agentic-authorization-service.js.map +1 -0
- package/dist/esm/environment-utils.d.ts +33 -0
- package/dist/esm/environment-utils.d.ts.map +1 -0
- package/dist/esm/environment-utils.js +51 -0
- package/dist/esm/environment-utils.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/power-platform-api-discovery.d.ts +13 -0
- package/dist/esm/power-platform-api-discovery.d.ts.map +1 -0
- package/dist/esm/power-platform-api-discovery.js +63 -0
- package/dist/esm/power-platform-api-discovery.js.map +1 -0
- package/dist/esm/utility.d.ts +20 -0
- package/dist/esm/utility.d.ts.map +1 -0
- package/dist/esm/utility.js +45 -0
- package/dist/esm/utility.js.map +1 -0
- package/package.json +60 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @microsoft/agents-a365-runtime
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@microsoft/agents-a365-runtime)
|
|
4
|
+
[](https://www.npmjs.com/package/@microsoft/agents-a365-runtime)
|
|
5
|
+
|
|
6
|
+
Core runtime utilities and services for applications built with the Microsoft Agent 365 SDK. This package provides authentication, authorization, and Power Platform API discovery capabilities for building enterprise-ready AI agents.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @microsoft/agents-a365-runtime
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
For detailed usage examples and implementation guidance, see the [Microsoft Agent 365 Developer Documentation](https://learn.microsoft.com/microsoft-agent-365/developer/?tabs=nodejs).
|
|
17
|
+
|
|
18
|
+
## Support
|
|
19
|
+
|
|
20
|
+
For issues, questions, or feedback:
|
|
21
|
+
|
|
22
|
+
- File issues in the [GitHub Issues](https://github.com/microsoft/Agent365-nodejs/issues) section
|
|
23
|
+
- See the [main documentation](../../README.md) for more information
|
|
24
|
+
|
|
25
|
+
## Trademarks
|
|
26
|
+
|
|
27
|
+
*Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.*
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
32
|
+
|
|
33
|
+
Licensed under the MIT License - see the [LICENSE](../../LICENSE.md) file for details
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TurnContext, Authorization } from '@microsoft/agents-hosting';
|
|
2
|
+
export declare class AgenticAuthenticationService {
|
|
3
|
+
static GetAgenticUserToken(authorization: Authorization, authHandlerName: string, turnContext: TurnContext): Promise<string>;
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=agentic-authorization-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentic-authorization-service.d.ts","sourceRoot":"","sources":["../../src/agentic-authorization-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,qBAAa,4BAA4B;WACnB,mBAAmB,CAAC,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW;CAIxH"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AgenticAuthenticationService = void 0;
|
|
6
|
+
const environment_utils_1 = require("./environment-utils");
|
|
7
|
+
class AgenticAuthenticationService {
|
|
8
|
+
static async GetAgenticUserToken(authorization, authHandlerName, turnContext) {
|
|
9
|
+
const scope = (0, environment_utils_1.getMcpPlatformAuthenticationScope)();
|
|
10
|
+
return (await authorization.exchangeToken(turnContext, authHandlerName, { scopes: [scope] })).token || '';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.AgenticAuthenticationService = AgenticAuthenticationService;
|
|
14
|
+
//# sourceMappingURL=agentic-authorization-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentic-authorization-service.js","sourceRoot":"","sources":["../../src/agentic-authorization-service.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,2DAAwE;AAExE,MAAa,4BAA4B;IAChC,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,aAA4B,EAAE,eAAuB,EAAE,WAAwB;QACrH,MAAM,KAAK,GAAG,IAAA,qDAAiC,GAAE,CAAC;QAClD,OAAO,CAAC,MAAM,aAAa,CAAC,aAAa,CAAC,WAAW,EAAE,eAAe,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;IAC5G,CAAC;CACF;AALD,oEAKC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility logic for environment-related operations.
|
|
3
|
+
*/
|
|
4
|
+
export declare const PROD_OBSERVABILITY_SCOPE = "https://api.powerplatform.com/.default";
|
|
5
|
+
export declare const PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE = "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1/.default";
|
|
6
|
+
export declare const PROD_OBSERVABILITY_CLUSTER_CATEGORY = "prod";
|
|
7
|
+
export declare const PRODUCTION_ENVIRONMENT_NAME = "production";
|
|
8
|
+
export declare const DEVELOPMENT_ENVIRONMENT_NAME = "Development";
|
|
9
|
+
/**
|
|
10
|
+
* Returns the scope for authenticating to the observability service
|
|
11
|
+
*
|
|
12
|
+
* @returns The authentication scope for the current environment.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getObservabilityAuthenticationScope(): string[];
|
|
15
|
+
/**
|
|
16
|
+
* Gets the cluster category from environment variables.
|
|
17
|
+
*
|
|
18
|
+
* @returns The cluster category from CLUSTER_CATEGORY env var, defaults to 'prod'.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getClusterCategory(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Returns true if the current environment is a development environment.
|
|
23
|
+
*
|
|
24
|
+
* @returns True if the current environment is development, false otherwise.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isDevelopmentEnvironment(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the MCP platform authentication scope from environment variables.
|
|
29
|
+
*
|
|
30
|
+
* @returns The MCP platform authentication scope from MCP_PLATFORM_AUTHENTICATION_SCOPE env var, defaults to production scope.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getMcpPlatformAuthenticationScope(): string;
|
|
33
|
+
//# sourceMappingURL=environment-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment-utils.d.ts","sourceRoot":"","sources":["../../src/environment-utils.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,eAAO,MAAM,wBAAwB,2CAA2C,CAAC;AACjF,eAAO,MAAM,sCAAsC,kDAAkD,CAAC;AACtG,eAAO,MAAM,mCAAmC,SAAS,CAAC;AAG1D,eAAO,MAAM,2BAA2B,eAAe,CAAC;AACxD,eAAO,MAAM,4BAA4B,gBAAgB,CAAC;AAE1D;;;;GAIG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,EAAE,CAG9D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAQ3C;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAGlD;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,IAAI,MAAM,CAE1D"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ------------------------------------------------------------------------------
|
|
3
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
// ------------------------------------------------------------------------------
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DEVELOPMENT_ENVIRONMENT_NAME = exports.PRODUCTION_ENVIRONMENT_NAME = exports.PROD_OBSERVABILITY_CLUSTER_CATEGORY = exports.PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE = exports.PROD_OBSERVABILITY_SCOPE = void 0;
|
|
7
|
+
exports.getObservabilityAuthenticationScope = getObservabilityAuthenticationScope;
|
|
8
|
+
exports.getClusterCategory = getClusterCategory;
|
|
9
|
+
exports.isDevelopmentEnvironment = isDevelopmentEnvironment;
|
|
10
|
+
exports.getMcpPlatformAuthenticationScope = getMcpPlatformAuthenticationScope;
|
|
11
|
+
/**
|
|
12
|
+
* Utility logic for environment-related operations.
|
|
13
|
+
*/
|
|
14
|
+
exports.PROD_OBSERVABILITY_SCOPE = 'https://api.powerplatform.com/.default';
|
|
15
|
+
exports.PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE = 'ea9ffc3e-8a23-4a7d-836d-234d7c7565c1/.default';
|
|
16
|
+
exports.PROD_OBSERVABILITY_CLUSTER_CATEGORY = 'prod';
|
|
17
|
+
// Default environment names
|
|
18
|
+
exports.PRODUCTION_ENVIRONMENT_NAME = 'production';
|
|
19
|
+
exports.DEVELOPMENT_ENVIRONMENT_NAME = 'Development';
|
|
20
|
+
/**
|
|
21
|
+
* Returns the scope for authenticating to the observability service
|
|
22
|
+
*
|
|
23
|
+
* @returns The authentication scope for the current environment.
|
|
24
|
+
*/
|
|
25
|
+
function getObservabilityAuthenticationScope() {
|
|
26
|
+
// Always return production scope
|
|
27
|
+
return [exports.PROD_OBSERVABILITY_SCOPE];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Gets the cluster category from environment variables.
|
|
31
|
+
*
|
|
32
|
+
* @returns The cluster category from CLUSTER_CATEGORY env var, defaults to 'prod'.
|
|
33
|
+
*/
|
|
34
|
+
function getClusterCategory() {
|
|
35
|
+
const clusterCategory = process.env.CLUSTER_CATEGORY;
|
|
36
|
+
if (!clusterCategory) {
|
|
37
|
+
return 'prod';
|
|
38
|
+
}
|
|
39
|
+
return clusterCategory.toLowerCase();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Returns true if the current environment is a development environment.
|
|
43
|
+
*
|
|
44
|
+
* @returns True if the current environment is development, false otherwise.
|
|
45
|
+
*/
|
|
46
|
+
function isDevelopmentEnvironment() {
|
|
47
|
+
const clusterCategory = getClusterCategory();
|
|
48
|
+
return ['local', 'dev'].includes(clusterCategory);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Gets the MCP platform authentication scope from environment variables.
|
|
52
|
+
*
|
|
53
|
+
* @returns The MCP platform authentication scope from MCP_PLATFORM_AUTHENTICATION_SCOPE env var, defaults to production scope.
|
|
54
|
+
*/
|
|
55
|
+
function getMcpPlatformAuthenticationScope() {
|
|
56
|
+
return process.env.MCP_PLATFORM_AUTHENTICATION_SCOPE || exports.PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=environment-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment-utils.js","sourceRoot":"","sources":["../../src/environment-utils.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,4DAA4D;AAC5D,iFAAiF;;;AAmBjF,kFAGC;AAOD,gDAQC;AAOD,4DAGC;AAOD,8EAEC;AAtDD;;GAEG;AAEU,QAAA,wBAAwB,GAAG,wCAAwC,CAAC;AACpE,QAAA,sCAAsC,GAAG,+CAA+C,CAAC;AACzF,QAAA,mCAAmC,GAAG,MAAM,CAAC;AAE1D,4BAA4B;AACf,QAAA,2BAA2B,GAAG,YAAY,CAAC;AAC3C,QAAA,4BAA4B,GAAG,aAAa,CAAC;AAE1D;;;;GAIG;AACH,SAAgB,mCAAmC;IACjD,iCAAiC;IACjC,OAAO,CAAC,gCAAwB,CAAC,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB;IAChC,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAErD,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,EAAE,CAAC;AACvC,CAAC;AAED;;;;GAIG;AACH,SAAgB,wBAAwB;IACtC,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;IAC7C,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACpD,CAAC;AAED;;;;GAIG;AACH,SAAgB,iCAAiC;IAC/C,OAAO,OAAO,CAAC,GAAG,CAAC,iCAAiC,IAAI,8CAAsC,CAAC;AACjG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./power-platform-api-discovery"), exports);
|
|
18
|
+
__exportStar(require("./agentic-authorization-service"), exports);
|
|
19
|
+
__exportStar(require("./environment-utils"), exports);
|
|
20
|
+
__exportStar(require("./utility"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,kEAAgD;AAChD,sDAAoC;AACpC,4CAA0B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ClusterCategory = 'local' | 'dev' | 'test' | 'preprod' | 'firstrelease' | 'prod' | 'gov' | 'high' | 'dod' | 'mooncake' | 'ex' | 'rx';
|
|
2
|
+
export declare class PowerPlatformApiDiscovery {
|
|
3
|
+
readonly clusterCategory: ClusterCategory;
|
|
4
|
+
constructor(clusterCategory: ClusterCategory);
|
|
5
|
+
getTokenAudience(): string;
|
|
6
|
+
getTokenEndpointHost(): string;
|
|
7
|
+
getTenantEndpoint(tenantId: string): string;
|
|
8
|
+
getTenantIslandClusterEndpoint(tenantId: string): string;
|
|
9
|
+
private _generatePowerPlatformApiDomain;
|
|
10
|
+
private _getHexApiSuffixLength;
|
|
11
|
+
private _getEnvironmentApiHostNameSuffix;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=power-platform-api-discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"power-platform-api-discovery.d.ts","sourceRoot":"","sources":["../../src/power-platform-api-discovery.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,KAAK,GACL,MAAM,GACN,SAAS,GACT,cAAc,GACd,MAAM,GACN,KAAK,GACL,MAAM,GACN,KAAK,GACL,UAAU,GACV,IAAI,GACJ,IAAI,CAAC;AAET,qBAAa,yBAAyB;IACpC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;gBAE9B,eAAe,EAAE,eAAe;IAIrC,gBAAgB,IAAI,MAAM;IAI1B,oBAAoB,IAAI,MAAM;IAI9B,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAI3C,8BAA8B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAI/D,OAAO,CAAC,+BAA+B;IAkCvC,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,gCAAgC;CAuBzC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PowerPlatformApiDiscovery = void 0;
|
|
4
|
+
class PowerPlatformApiDiscovery {
|
|
5
|
+
constructor(clusterCategory) {
|
|
6
|
+
this.clusterCategory = clusterCategory;
|
|
7
|
+
}
|
|
8
|
+
getTokenAudience() {
|
|
9
|
+
return `https://${this._getEnvironmentApiHostNameSuffix()}`;
|
|
10
|
+
}
|
|
11
|
+
getTokenEndpointHost() {
|
|
12
|
+
return this._getEnvironmentApiHostNameSuffix();
|
|
13
|
+
}
|
|
14
|
+
getTenantEndpoint(tenantId) {
|
|
15
|
+
return this._generatePowerPlatformApiDomain(tenantId);
|
|
16
|
+
}
|
|
17
|
+
getTenantIslandClusterEndpoint(tenantId) {
|
|
18
|
+
return this._generatePowerPlatformApiDomain(tenantId, 'il-');
|
|
19
|
+
}
|
|
20
|
+
_generatePowerPlatformApiDomain(hostNameIdentifier, hostNamePrefix = '') {
|
|
21
|
+
if (!/^[a-zA-Z0-9-]+$/.test(hostNameIdentifier)) {
|
|
22
|
+
throw new Error(`Cannot generate Power Platform API endpoint because the tenant identifier contains invalid host name characters, only alphanumeric and dash characters are expected: ${hostNameIdentifier}`);
|
|
23
|
+
}
|
|
24
|
+
const hostNameInfix = 'tenant';
|
|
25
|
+
const hexNameSuffixLength = this._getHexApiSuffixLength();
|
|
26
|
+
const hexName = hostNameIdentifier.toLowerCase().replace(/-/g, '');
|
|
27
|
+
if (hexNameSuffixLength >= hexName.length) {
|
|
28
|
+
throw new Error(`Cannot generate Power Platform API endpoint because the normalized tenant identifier must be at least ${hexNameSuffixLength + 1} characters in length: ${hexName}`);
|
|
29
|
+
}
|
|
30
|
+
const hexNameSuffix = hexName.substring(hexName.length - hexNameSuffixLength);
|
|
31
|
+
const hexNamePrefix = hexName.substring(0, hexName.length - hexNameSuffixLength);
|
|
32
|
+
const hostNameSuffix = this._getEnvironmentApiHostNameSuffix();
|
|
33
|
+
return `${hostNamePrefix}${hexNamePrefix}.${hexNameSuffix}.${hostNameInfix}.${hostNameSuffix}`;
|
|
34
|
+
}
|
|
35
|
+
_getHexApiSuffixLength() {
|
|
36
|
+
switch (this.clusterCategory) {
|
|
37
|
+
case 'firstrelease':
|
|
38
|
+
case 'prod':
|
|
39
|
+
return 2;
|
|
40
|
+
default:
|
|
41
|
+
return 1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
_getEnvironmentApiHostNameSuffix() {
|
|
45
|
+
const apiHostNameSuffixMap = {
|
|
46
|
+
local: 'api.powerplatform.localhost',
|
|
47
|
+
dev: 'api.powerplatform.com', //default to prod
|
|
48
|
+
test: 'api.powerplatform.com', //default to prod
|
|
49
|
+
preprod: 'api.powerplatform.com', //default to prod
|
|
50
|
+
firstrelease: 'api.powerplatform.com',
|
|
51
|
+
prod: 'api.powerplatform.com',
|
|
52
|
+
gov: 'api.gov.powerplatform.microsoft.us',
|
|
53
|
+
high: 'api.high.powerplatform.microsoft.us',
|
|
54
|
+
dod: 'api.appsplatform.us',
|
|
55
|
+
mooncake: 'api.powerplatform.partner.microsoftonline.cn',
|
|
56
|
+
ex: 'api.powerplatform.eaglex.ic.gov',
|
|
57
|
+
rx: 'api.powerplatform.microsoft.scloud',
|
|
58
|
+
};
|
|
59
|
+
const suffix = apiHostNameSuffixMap[this.clusterCategory];
|
|
60
|
+
if (!suffix) {
|
|
61
|
+
throw new Error(`Invalid ClusterCategory value: ${this.clusterCategory}`);
|
|
62
|
+
}
|
|
63
|
+
return suffix;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.PowerPlatformApiDiscovery = PowerPlatformApiDiscovery;
|
|
67
|
+
//# sourceMappingURL=power-platform-api-discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"power-platform-api-discovery.js","sourceRoot":"","sources":["../../src/power-platform-api-discovery.ts"],"names":[],"mappings":";;;AAcA,MAAa,yBAAyB;IAGpC,YAAY,eAAgC;QAC1C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAEM,gBAAgB;QACrB,OAAO,WAAW,IAAI,CAAC,gCAAgC,EAAE,EAAE,CAAC;IAC9D,CAAC;IAEM,oBAAoB;QACzB,OAAO,IAAI,CAAC,gCAAgC,EAAE,CAAC;IACjD,CAAC;IAEM,iBAAiB,CAAC,QAAgB;QACvC,OAAO,IAAI,CAAC,+BAA+B,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC;IAEM,8BAA8B,CAAC,QAAgB;QACpD,OAAO,IAAI,CAAC,+BAA+B,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC/D,CAAC;IAEO,+BAA+B,CACrC,kBAA0B,EAC1B,iBAAyB,EAAE;QAE3B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAChD,MAAM,IAAI,KAAK,CACb,wKAAwK,kBAAkB,EAAE,CAC7L,CAAC;QACJ,CAAC;QAED,MAAM,aAAa,GAAG,QAAQ,CAAC;QAC/B,MAAM,mBAAmB,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC1D,MAAM,OAAO,GAAG,kBAAkB,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAEnE,IAAI,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YAC1C,MAAM,IAAI,KAAK,CACb,yGACE,mBAAmB,GAAG,CACxB,0BAA0B,OAAO,EAAE,CACpC,CAAC;QACJ,CAAC;QAED,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CACrC,OAAO,CAAC,MAAM,GAAG,mBAAmB,CACrC,CAAC;QACF,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CACrC,CAAC,EACD,OAAO,CAAC,MAAM,GAAG,mBAAmB,CACrC,CAAC;QACF,MAAM,cAAc,GAAG,IAAI,CAAC,gCAAgC,EAAE,CAAC;QAE/D,OAAO,GAAG,cAAc,GAAG,aAAa,IAAI,aAAa,IAAI,aAAa,IAAI,cAAc,EAAE,CAAC;IACjG,CAAC;IAEO,sBAAsB;QAC5B,QAAQ,IAAI,CAAC,eAAe,EAAE,CAAC;YAC/B,KAAK,cAAc,CAAC;YACpB,KAAK,MAAM;gBACT,OAAO,CAAC,CAAC;YACX;gBACE,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAEO,gCAAgC;QACtC,MAAM,oBAAoB,GAA8C;YACtE,KAAK,EAAE,6BAA6B;YACpC,GAAG,EAAE,uBAAuB,EAAE,iBAAiB;YAC/C,IAAI,EAAE,uBAAuB,EAAE,iBAAiB;YAChD,OAAO,EAAE,uBAAuB,EAAE,iBAAiB;YACnD,YAAY,EAAE,uBAAuB;YACrC,IAAI,EAAE,uBAAuB;YAC7B,GAAG,EAAE,oCAAoC;YACzC,IAAI,EAAE,qCAAqC;YAC3C,GAAG,EAAE,qBAAqB;YAC1B,QAAQ,EAAE,8CAA8C;YACxD,EAAE,EAAE,iCAAiC;YACrC,EAAE,EAAE,oCAAoC;SACzC,CAAC;QACF,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,kCAAkC,IAAI,CAAC,eAAe,EAAE,CACzD,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA1FD,8DA0FC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TurnContext } from '@microsoft/agents-hosting';
|
|
2
|
+
/**
|
|
3
|
+
* Utility class providing helper methods for agent runtime operations.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Utility {
|
|
6
|
+
/**
|
|
7
|
+
* Decodes the current token and retrieves the App ID (appid or azp claim).
|
|
8
|
+
* @param token Token to Decode
|
|
9
|
+
* @returns AppId
|
|
10
|
+
*/
|
|
11
|
+
static GetAppIdFromToken(token: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Resolves the agent identity from the turn context or auth token.
|
|
14
|
+
* @param context Turn Context of the turn.
|
|
15
|
+
* @param authToken Auth token if available.
|
|
16
|
+
* @returns Agent identity (App ID)
|
|
17
|
+
*/
|
|
18
|
+
static ResolveAgentIdentity(context: TurnContext, authToken: string): string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=utility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD;;GAEG;AACH,qBAAa,OAAO;IAClB;;;;OAIG;WACW,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAoBtD;;;;;OAKG;WACW,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;CAQpF"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
+
var ownKeys = function(o) {
|
|
22
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
+
var ar = [];
|
|
24
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
return ownKeys(o);
|
|
28
|
+
};
|
|
29
|
+
return function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.Utility = void 0;
|
|
39
|
+
const jwt = __importStar(require("jsonwebtoken"));
|
|
40
|
+
/**
|
|
41
|
+
* Utility class providing helper methods for agent runtime operations.
|
|
42
|
+
*/
|
|
43
|
+
class Utility {
|
|
44
|
+
/**
|
|
45
|
+
* Decodes the current token and retrieves the App ID (appid or azp claim).
|
|
46
|
+
* @param token Token to Decode
|
|
47
|
+
* @returns AppId
|
|
48
|
+
*/
|
|
49
|
+
static GetAppIdFromToken(token) {
|
|
50
|
+
if (!token || token.trim() === '') {
|
|
51
|
+
return '00000000-0000-0000-0000-000000000000';
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
const decoded = jwt.decode(token);
|
|
55
|
+
if (!decoded) {
|
|
56
|
+
return '';
|
|
57
|
+
}
|
|
58
|
+
// Look for appid claim first, then azp claim as fallback
|
|
59
|
+
const appIdClaim = decoded['appid'] || decoded['azp'];
|
|
60
|
+
return appIdClaim || '';
|
|
61
|
+
}
|
|
62
|
+
catch (_error) {
|
|
63
|
+
// Silent error handling - return empty string on decode failure
|
|
64
|
+
return '';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Resolves the agent identity from the turn context or auth token.
|
|
69
|
+
* @param context Turn Context of the turn.
|
|
70
|
+
* @param authToken Auth token if available.
|
|
71
|
+
* @returns Agent identity (App ID)
|
|
72
|
+
*/
|
|
73
|
+
static ResolveAgentIdentity(context, authToken) {
|
|
74
|
+
// App ID is required to pass to MCP server URL.
|
|
75
|
+
const agenticAppId = context.activity.isAgenticRequest()
|
|
76
|
+
? context.activity.getAgenticInstanceId() || ''
|
|
77
|
+
: this.GetAppIdFromToken(authToken);
|
|
78
|
+
return agenticAppId;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.Utility = Utility;
|
|
82
|
+
//# sourceMappingURL=utility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGlC,kDAAoC;AAEpC;;GAEG;AACH,MAAa,OAAO;IAClB;;;;OAIG;IACI,MAAM,CAAC,iBAAiB,CAAC,KAAa;QAC3C,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAClC,OAAO,sCAAsC,CAAC;QAChD,CAAC;QAED,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAmB,CAAC;YACpD,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,OAAO,EAAE,CAAC;YACZ,CAAC;YAED,yDAAyD;YACzD,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;YACtD,OAAO,UAAU,IAAI,EAAE,CAAC;QAC1B,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,gEAAgE;YAChE,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oBAAoB,CAAC,OAAoB,EAAE,SAAiB;QACxE,gDAAgD;QAChD,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,gBAAgB,EAAE;YACtD,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,EAAE,IAAI,EAAE;YAC/C,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAEtC,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AAxCD,0BAwCC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TurnContext, Authorization } from '@microsoft/agents-hosting';
|
|
2
|
+
export declare class AgenticAuthenticationService {
|
|
3
|
+
static GetAgenticUserToken(authorization: Authorization, authHandlerName: string, turnContext: TurnContext): Promise<string>;
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=agentic-authorization-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentic-authorization-service.d.ts","sourceRoot":"","sources":["../../src/agentic-authorization-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,qBAAa,4BAA4B;WACnB,mBAAmB,CAAC,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW;CAIxH"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { getMcpPlatformAuthenticationScope } from './environment-utils';
|
|
4
|
+
export class AgenticAuthenticationService {
|
|
5
|
+
static async GetAgenticUserToken(authorization, authHandlerName, turnContext) {
|
|
6
|
+
const scope = getMcpPlatformAuthenticationScope();
|
|
7
|
+
return (await authorization.exchangeToken(turnContext, authHandlerName, { scopes: [scope] })).token || '';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=agentic-authorization-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentic-authorization-service.js","sourceRoot":"","sources":["../../src/agentic-authorization-service.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AAExE,MAAM,OAAO,4BAA4B;IAChC,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,aAA4B,EAAE,eAAuB,EAAE,WAAwB;QACrH,MAAM,KAAK,GAAG,iCAAiC,EAAE,CAAC;QAClD,OAAO,CAAC,MAAM,aAAa,CAAC,aAAa,CAAC,WAAW,EAAE,eAAe,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;IAC5G,CAAC;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility logic for environment-related operations.
|
|
3
|
+
*/
|
|
4
|
+
export declare const PROD_OBSERVABILITY_SCOPE = "https://api.powerplatform.com/.default";
|
|
5
|
+
export declare const PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE = "ea9ffc3e-8a23-4a7d-836d-234d7c7565c1/.default";
|
|
6
|
+
export declare const PROD_OBSERVABILITY_CLUSTER_CATEGORY = "prod";
|
|
7
|
+
export declare const PRODUCTION_ENVIRONMENT_NAME = "production";
|
|
8
|
+
export declare const DEVELOPMENT_ENVIRONMENT_NAME = "Development";
|
|
9
|
+
/**
|
|
10
|
+
* Returns the scope for authenticating to the observability service
|
|
11
|
+
*
|
|
12
|
+
* @returns The authentication scope for the current environment.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getObservabilityAuthenticationScope(): string[];
|
|
15
|
+
/**
|
|
16
|
+
* Gets the cluster category from environment variables.
|
|
17
|
+
*
|
|
18
|
+
* @returns The cluster category from CLUSTER_CATEGORY env var, defaults to 'prod'.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getClusterCategory(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Returns true if the current environment is a development environment.
|
|
23
|
+
*
|
|
24
|
+
* @returns True if the current environment is development, false otherwise.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isDevelopmentEnvironment(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the MCP platform authentication scope from environment variables.
|
|
29
|
+
*
|
|
30
|
+
* @returns The MCP platform authentication scope from MCP_PLATFORM_AUTHENTICATION_SCOPE env var, defaults to production scope.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getMcpPlatformAuthenticationScope(): string;
|
|
33
|
+
//# sourceMappingURL=environment-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment-utils.d.ts","sourceRoot":"","sources":["../../src/environment-utils.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,eAAO,MAAM,wBAAwB,2CAA2C,CAAC;AACjF,eAAO,MAAM,sCAAsC,kDAAkD,CAAC;AACtG,eAAO,MAAM,mCAAmC,SAAS,CAAC;AAG1D,eAAO,MAAM,2BAA2B,eAAe,CAAC;AACxD,eAAO,MAAM,4BAA4B,gBAAgB,CAAC;AAE1D;;;;GAIG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,EAAE,CAG9D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAQ3C;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CAGlD;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,IAAI,MAAM,CAE1D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// ------------------------------------------------------------------------------
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
// ------------------------------------------------------------------------------
|
|
4
|
+
/**
|
|
5
|
+
* Utility logic for environment-related operations.
|
|
6
|
+
*/
|
|
7
|
+
export const PROD_OBSERVABILITY_SCOPE = 'https://api.powerplatform.com/.default';
|
|
8
|
+
export const PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE = 'ea9ffc3e-8a23-4a7d-836d-234d7c7565c1/.default';
|
|
9
|
+
export const PROD_OBSERVABILITY_CLUSTER_CATEGORY = 'prod';
|
|
10
|
+
// Default environment names
|
|
11
|
+
export const PRODUCTION_ENVIRONMENT_NAME = 'production';
|
|
12
|
+
export const DEVELOPMENT_ENVIRONMENT_NAME = 'Development';
|
|
13
|
+
/**
|
|
14
|
+
* Returns the scope for authenticating to the observability service
|
|
15
|
+
*
|
|
16
|
+
* @returns The authentication scope for the current environment.
|
|
17
|
+
*/
|
|
18
|
+
export function getObservabilityAuthenticationScope() {
|
|
19
|
+
// Always return production scope
|
|
20
|
+
return [PROD_OBSERVABILITY_SCOPE];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Gets the cluster category from environment variables.
|
|
24
|
+
*
|
|
25
|
+
* @returns The cluster category from CLUSTER_CATEGORY env var, defaults to 'prod'.
|
|
26
|
+
*/
|
|
27
|
+
export function getClusterCategory() {
|
|
28
|
+
const clusterCategory = process.env.CLUSTER_CATEGORY;
|
|
29
|
+
if (!clusterCategory) {
|
|
30
|
+
return 'prod';
|
|
31
|
+
}
|
|
32
|
+
return clusterCategory.toLowerCase();
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Returns true if the current environment is a development environment.
|
|
36
|
+
*
|
|
37
|
+
* @returns True if the current environment is development, false otherwise.
|
|
38
|
+
*/
|
|
39
|
+
export function isDevelopmentEnvironment() {
|
|
40
|
+
const clusterCategory = getClusterCategory();
|
|
41
|
+
return ['local', 'dev'].includes(clusterCategory);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Gets the MCP platform authentication scope from environment variables.
|
|
45
|
+
*
|
|
46
|
+
* @returns The MCP platform authentication scope from MCP_PLATFORM_AUTHENTICATION_SCOPE env var, defaults to production scope.
|
|
47
|
+
*/
|
|
48
|
+
export function getMcpPlatformAuthenticationScope() {
|
|
49
|
+
return process.env.MCP_PLATFORM_AUTHENTICATION_SCOPE || PROD_MCP_PLATFORM_AUTHENTICATION_SCOPE;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=environment-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment-utils.js","sourceRoot":"","sources":["../../src/environment-utils.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,4DAA4D;AAC5D,iFAAiF;AAEjF;;GAEG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,wCAAwC,CAAC;AACjF,MAAM,CAAC,MAAM,sCAAsC,GAAG,+CAA+C,CAAC;AACtG,MAAM,CAAC,MAAM,mCAAmC,GAAG,MAAM,CAAC;AAE1D,4BAA4B;AAC5B,MAAM,CAAC,MAAM,2BAA2B,GAAG,YAAY,CAAC;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,aAAa,CAAC;AAE1D;;;;GAIG;AACH,MAAM,UAAU,mCAAmC;IACjD,iCAAiC;IACjC,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAErD,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,EAAE,CAAC;AACvC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB;IACtC,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;IAC7C,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACpD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iCAAiC;IAC/C,OAAO,OAAO,CAAC,GAAG,CAAC,iCAAiC,IAAI,sCAAsC,CAAC;AACjG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ClusterCategory = 'local' | 'dev' | 'test' | 'preprod' | 'firstrelease' | 'prod' | 'gov' | 'high' | 'dod' | 'mooncake' | 'ex' | 'rx';
|
|
2
|
+
export declare class PowerPlatformApiDiscovery {
|
|
3
|
+
readonly clusterCategory: ClusterCategory;
|
|
4
|
+
constructor(clusterCategory: ClusterCategory);
|
|
5
|
+
getTokenAudience(): string;
|
|
6
|
+
getTokenEndpointHost(): string;
|
|
7
|
+
getTenantEndpoint(tenantId: string): string;
|
|
8
|
+
getTenantIslandClusterEndpoint(tenantId: string): string;
|
|
9
|
+
private _generatePowerPlatformApiDomain;
|
|
10
|
+
private _getHexApiSuffixLength;
|
|
11
|
+
private _getEnvironmentApiHostNameSuffix;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=power-platform-api-discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"power-platform-api-discovery.d.ts","sourceRoot":"","sources":["../../src/power-platform-api-discovery.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,KAAK,GACL,MAAM,GACN,SAAS,GACT,cAAc,GACd,MAAM,GACN,KAAK,GACL,MAAM,GACN,KAAK,GACL,UAAU,GACV,IAAI,GACJ,IAAI,CAAC;AAET,qBAAa,yBAAyB;IACpC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;gBAE9B,eAAe,EAAE,eAAe;IAIrC,gBAAgB,IAAI,MAAM;IAI1B,oBAAoB,IAAI,MAAM;IAI9B,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAI3C,8BAA8B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAI/D,OAAO,CAAC,+BAA+B;IAkCvC,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,gCAAgC;CAuBzC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export class PowerPlatformApiDiscovery {
|
|
2
|
+
constructor(clusterCategory) {
|
|
3
|
+
this.clusterCategory = clusterCategory;
|
|
4
|
+
}
|
|
5
|
+
getTokenAudience() {
|
|
6
|
+
return `https://${this._getEnvironmentApiHostNameSuffix()}`;
|
|
7
|
+
}
|
|
8
|
+
getTokenEndpointHost() {
|
|
9
|
+
return this._getEnvironmentApiHostNameSuffix();
|
|
10
|
+
}
|
|
11
|
+
getTenantEndpoint(tenantId) {
|
|
12
|
+
return this._generatePowerPlatformApiDomain(tenantId);
|
|
13
|
+
}
|
|
14
|
+
getTenantIslandClusterEndpoint(tenantId) {
|
|
15
|
+
return this._generatePowerPlatformApiDomain(tenantId, 'il-');
|
|
16
|
+
}
|
|
17
|
+
_generatePowerPlatformApiDomain(hostNameIdentifier, hostNamePrefix = '') {
|
|
18
|
+
if (!/^[a-zA-Z0-9-]+$/.test(hostNameIdentifier)) {
|
|
19
|
+
throw new Error(`Cannot generate Power Platform API endpoint because the tenant identifier contains invalid host name characters, only alphanumeric and dash characters are expected: ${hostNameIdentifier}`);
|
|
20
|
+
}
|
|
21
|
+
const hostNameInfix = 'tenant';
|
|
22
|
+
const hexNameSuffixLength = this._getHexApiSuffixLength();
|
|
23
|
+
const hexName = hostNameIdentifier.toLowerCase().replace(/-/g, '');
|
|
24
|
+
if (hexNameSuffixLength >= hexName.length) {
|
|
25
|
+
throw new Error(`Cannot generate Power Platform API endpoint because the normalized tenant identifier must be at least ${hexNameSuffixLength + 1} characters in length: ${hexName}`);
|
|
26
|
+
}
|
|
27
|
+
const hexNameSuffix = hexName.substring(hexName.length - hexNameSuffixLength);
|
|
28
|
+
const hexNamePrefix = hexName.substring(0, hexName.length - hexNameSuffixLength);
|
|
29
|
+
const hostNameSuffix = this._getEnvironmentApiHostNameSuffix();
|
|
30
|
+
return `${hostNamePrefix}${hexNamePrefix}.${hexNameSuffix}.${hostNameInfix}.${hostNameSuffix}`;
|
|
31
|
+
}
|
|
32
|
+
_getHexApiSuffixLength() {
|
|
33
|
+
switch (this.clusterCategory) {
|
|
34
|
+
case 'firstrelease':
|
|
35
|
+
case 'prod':
|
|
36
|
+
return 2;
|
|
37
|
+
default:
|
|
38
|
+
return 1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
_getEnvironmentApiHostNameSuffix() {
|
|
42
|
+
const apiHostNameSuffixMap = {
|
|
43
|
+
local: 'api.powerplatform.localhost',
|
|
44
|
+
dev: 'api.powerplatform.com', //default to prod
|
|
45
|
+
test: 'api.powerplatform.com', //default to prod
|
|
46
|
+
preprod: 'api.powerplatform.com', //default to prod
|
|
47
|
+
firstrelease: 'api.powerplatform.com',
|
|
48
|
+
prod: 'api.powerplatform.com',
|
|
49
|
+
gov: 'api.gov.powerplatform.microsoft.us',
|
|
50
|
+
high: 'api.high.powerplatform.microsoft.us',
|
|
51
|
+
dod: 'api.appsplatform.us',
|
|
52
|
+
mooncake: 'api.powerplatform.partner.microsoftonline.cn',
|
|
53
|
+
ex: 'api.powerplatform.eaglex.ic.gov',
|
|
54
|
+
rx: 'api.powerplatform.microsoft.scloud',
|
|
55
|
+
};
|
|
56
|
+
const suffix = apiHostNameSuffixMap[this.clusterCategory];
|
|
57
|
+
if (!suffix) {
|
|
58
|
+
throw new Error(`Invalid ClusterCategory value: ${this.clusterCategory}`);
|
|
59
|
+
}
|
|
60
|
+
return suffix;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=power-platform-api-discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"power-platform-api-discovery.js","sourceRoot":"","sources":["../../src/power-platform-api-discovery.ts"],"names":[],"mappings":"AAcA,MAAM,OAAO,yBAAyB;IAGpC,YAAY,eAAgC;QAC1C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAEM,gBAAgB;QACrB,OAAO,WAAW,IAAI,CAAC,gCAAgC,EAAE,EAAE,CAAC;IAC9D,CAAC;IAEM,oBAAoB;QACzB,OAAO,IAAI,CAAC,gCAAgC,EAAE,CAAC;IACjD,CAAC;IAEM,iBAAiB,CAAC,QAAgB;QACvC,OAAO,IAAI,CAAC,+BAA+B,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC;IAEM,8BAA8B,CAAC,QAAgB;QACpD,OAAO,IAAI,CAAC,+BAA+B,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC/D,CAAC;IAEO,+BAA+B,CACrC,kBAA0B,EAC1B,iBAAyB,EAAE;QAE3B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAChD,MAAM,IAAI,KAAK,CACb,wKAAwK,kBAAkB,EAAE,CAC7L,CAAC;QACJ,CAAC;QAED,MAAM,aAAa,GAAG,QAAQ,CAAC;QAC/B,MAAM,mBAAmB,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC1D,MAAM,OAAO,GAAG,kBAAkB,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAEnE,IAAI,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YAC1C,MAAM,IAAI,KAAK,CACb,yGACE,mBAAmB,GAAG,CACxB,0BAA0B,OAAO,EAAE,CACpC,CAAC;QACJ,CAAC;QAED,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CACrC,OAAO,CAAC,MAAM,GAAG,mBAAmB,CACrC,CAAC;QACF,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CACrC,CAAC,EACD,OAAO,CAAC,MAAM,GAAG,mBAAmB,CACrC,CAAC;QACF,MAAM,cAAc,GAAG,IAAI,CAAC,gCAAgC,EAAE,CAAC;QAE/D,OAAO,GAAG,cAAc,GAAG,aAAa,IAAI,aAAa,IAAI,aAAa,IAAI,cAAc,EAAE,CAAC;IACjG,CAAC;IAEO,sBAAsB;QAC5B,QAAQ,IAAI,CAAC,eAAe,EAAE,CAAC;YAC/B,KAAK,cAAc,CAAC;YACpB,KAAK,MAAM;gBACT,OAAO,CAAC,CAAC;YACX;gBACE,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAEO,gCAAgC;QACtC,MAAM,oBAAoB,GAA8C;YACtE,KAAK,EAAE,6BAA6B;YACpC,GAAG,EAAE,uBAAuB,EAAE,iBAAiB;YAC/C,IAAI,EAAE,uBAAuB,EAAE,iBAAiB;YAChD,OAAO,EAAE,uBAAuB,EAAE,iBAAiB;YACnD,YAAY,EAAE,uBAAuB;YACrC,IAAI,EAAE,uBAAuB;YAC7B,GAAG,EAAE,oCAAoC;YACzC,IAAI,EAAE,qCAAqC;YAC3C,GAAG,EAAE,qBAAqB;YAC1B,QAAQ,EAAE,8CAA8C;YACxD,EAAE,EAAE,iCAAiC;YACrC,EAAE,EAAE,oCAAoC;SACzC,CAAC;QACF,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,kCAAkC,IAAI,CAAC,eAAe,EAAE,CACzD,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TurnContext } from '@microsoft/agents-hosting';
|
|
2
|
+
/**
|
|
3
|
+
* Utility class providing helper methods for agent runtime operations.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Utility {
|
|
6
|
+
/**
|
|
7
|
+
* Decodes the current token and retrieves the App ID (appid or azp claim).
|
|
8
|
+
* @param token Token to Decode
|
|
9
|
+
* @returns AppId
|
|
10
|
+
*/
|
|
11
|
+
static GetAppIdFromToken(token: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Resolves the agent identity from the turn context or auth token.
|
|
14
|
+
* @param context Turn Context of the turn.
|
|
15
|
+
* @param authToken Auth token if available.
|
|
16
|
+
* @returns Agent identity (App ID)
|
|
17
|
+
*/
|
|
18
|
+
static ResolveAgentIdentity(context: TurnContext, authToken: string): string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=utility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD;;GAEG;AACH,qBAAa,OAAO;IAClB;;;;OAIG;WACW,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAoBtD;;;;;OAKG;WACW,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;CAQpF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import * as jwt from 'jsonwebtoken';
|
|
4
|
+
/**
|
|
5
|
+
* Utility class providing helper methods for agent runtime operations.
|
|
6
|
+
*/
|
|
7
|
+
export class Utility {
|
|
8
|
+
/**
|
|
9
|
+
* Decodes the current token and retrieves the App ID (appid or azp claim).
|
|
10
|
+
* @param token Token to Decode
|
|
11
|
+
* @returns AppId
|
|
12
|
+
*/
|
|
13
|
+
static GetAppIdFromToken(token) {
|
|
14
|
+
if (!token || token.trim() === '') {
|
|
15
|
+
return '00000000-0000-0000-0000-000000000000';
|
|
16
|
+
}
|
|
17
|
+
try {
|
|
18
|
+
const decoded = jwt.decode(token);
|
|
19
|
+
if (!decoded) {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
// Look for appid claim first, then azp claim as fallback
|
|
23
|
+
const appIdClaim = decoded['appid'] || decoded['azp'];
|
|
24
|
+
return appIdClaim || '';
|
|
25
|
+
}
|
|
26
|
+
catch (_error) {
|
|
27
|
+
// Silent error handling - return empty string on decode failure
|
|
28
|
+
return '';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Resolves the agent identity from the turn context or auth token.
|
|
33
|
+
* @param context Turn Context of the turn.
|
|
34
|
+
* @param authToken Auth token if available.
|
|
35
|
+
* @returns Agent identity (App ID)
|
|
36
|
+
*/
|
|
37
|
+
static ResolveAgentIdentity(context, authToken) {
|
|
38
|
+
// App ID is required to pass to MCP server URL.
|
|
39
|
+
const agenticAppId = context.activity.isAgenticRequest()
|
|
40
|
+
? context.activity.getAgenticInstanceId() || ''
|
|
41
|
+
: this.GetAppIdFromToken(authToken);
|
|
42
|
+
return agenticAppId;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=utility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AAEpC;;GAEG;AACH,MAAM,OAAO,OAAO;IAClB;;;;OAIG;IACI,MAAM,CAAC,iBAAiB,CAAC,KAAa;QAC3C,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAClC,OAAO,sCAAsC,CAAC;QAChD,CAAC;QAED,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAmB,CAAC;YACpD,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,OAAO,EAAE,CAAC;YACZ,CAAC;YAED,yDAAyD;YACzD,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;YACtD,OAAO,UAAU,IAAI,EAAE,CAAC;QAC1B,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,gEAAgE;YAChE,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oBAAoB,CAAC,OAAoB,EAAE,SAAiB;QACxE,gDAAgD;QAChD,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,gBAAgB,EAAE;YACtD,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,EAAE,IAAI,EAAE;YAC/C,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAEtC,OAAO,YAAY,CAAC;IACtB,CAAC;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@microsoft/agents-a365-runtime",
|
|
3
|
+
"version": "0.1.0-preview.30",
|
|
4
|
+
"description": "Agent 365 Runtime SDK for AI agents built with TypeScript/Node.js",
|
|
5
|
+
"main": "dist/cjs/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/esm/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build:cjs": "npx tsc --project tsconfig.cjs.json",
|
|
10
|
+
"build:esm": "npx tsc --project tsconfig.esm.json",
|
|
11
|
+
"build": "npm run build:cjs && npm run build:esm",
|
|
12
|
+
"build:watch": "npx tsc --watch",
|
|
13
|
+
"clean": "npx rimraf dist",
|
|
14
|
+
"test": "jest --passWithNoTests",
|
|
15
|
+
"test:watch": "jest --watch",
|
|
16
|
+
"lint": "eslint src/**/*.ts",
|
|
17
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
18
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
19
|
+
"ci": "npm ci",
|
|
20
|
+
"pack": "npm pack --pack-destination=../"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"ai",
|
|
24
|
+
"agents",
|
|
25
|
+
"azure",
|
|
26
|
+
"typescript"
|
|
27
|
+
],
|
|
28
|
+
"author": "Microsoft Corporation",
|
|
29
|
+
"license": "See license file",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/microsoft/Agent365-nodejs.git",
|
|
33
|
+
"directory": "packages/agents-a365-runtime"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@microsoft/agents-hosting": "*",
|
|
37
|
+
"@azure/identity": "*",
|
|
38
|
+
"jsonwebtoken": "^9.0.2"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/jest": "^29.5.14",
|
|
42
|
+
"@types/jsonwebtoken": "^9.0.10",
|
|
43
|
+
"@types/node": "^20.0.0",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
45
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
46
|
+
"eslint": "^8.0.0",
|
|
47
|
+
"jest": "^29.0.0",
|
|
48
|
+
"rimraf": "^5.0.0",
|
|
49
|
+
"ts-jest": "^29.0.0",
|
|
50
|
+
"typescript": "^5.0.0"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=18.0.0"
|
|
54
|
+
},
|
|
55
|
+
"files": [
|
|
56
|
+
"dist/**/*",
|
|
57
|
+
"README.md",
|
|
58
|
+
"CHANGELOG.md"
|
|
59
|
+
]
|
|
60
|
+
}
|