@microsoft/agents-a365-runtime 0.1.0-preview.93 → 0.2.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/agentic-authorization-service.d.ts +23 -0
- package/dist/cjs/agentic-authorization-service.d.ts.map +1 -1
- package/dist/cjs/agentic-authorization-service.js +7 -3
- package/dist/cjs/agentic-authorization-service.js.map +1 -1
- package/dist/cjs/configuration/DefaultConfigurationProvider.d.ts +39 -0
- package/dist/cjs/configuration/DefaultConfigurationProvider.d.ts.map +1 -0
- package/dist/cjs/configuration/DefaultConfigurationProvider.js +47 -0
- package/dist/cjs/configuration/DefaultConfigurationProvider.js.map +1 -0
- package/dist/cjs/configuration/IConfigurationProvider.d.ts +8 -0
- package/dist/cjs/configuration/IConfigurationProvider.d.ts.map +1 -0
- package/dist/cjs/configuration/IConfigurationProvider.js +5 -0
- package/dist/cjs/configuration/IConfigurationProvider.js.map +1 -0
- package/dist/cjs/configuration/RuntimeConfiguration.d.ts +35 -0
- package/dist/cjs/configuration/RuntimeConfiguration.d.ts.map +1 -0
- package/dist/cjs/configuration/RuntimeConfiguration.js +71 -0
- package/dist/cjs/configuration/RuntimeConfiguration.js.map +1 -0
- package/dist/cjs/configuration/RuntimeConfigurationOptions.d.ts +35 -0
- package/dist/cjs/configuration/RuntimeConfigurationOptions.d.ts.map +1 -0
- package/dist/cjs/configuration/RuntimeConfigurationOptions.js +5 -0
- package/dist/cjs/configuration/RuntimeConfigurationOptions.js.map +1 -0
- package/dist/cjs/configuration/index.d.ts +5 -0
- package/dist/cjs/configuration/index.d.ts.map +1 -0
- package/dist/cjs/configuration/index.js +23 -0
- package/dist/cjs/configuration/index.js.map +1 -0
- package/dist/cjs/environment-utils.d.ts +69 -11
- package/dist/cjs/environment-utils.d.ts.map +1 -1
- package/dist/cjs/environment-utils.js +79 -26
- package/dist/cjs/environment-utils.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/power-platform-api-discovery.d.ts +18 -1
- package/dist/cjs/power-platform-api-discovery.d.ts.map +1 -1
- package/dist/cjs/power-platform-api-discovery.js +22 -3
- package/dist/cjs/power-platform-api-discovery.js.map +1 -1
- package/dist/cjs/utility.d.ts +48 -1
- package/dist/cjs/utility.d.ts.map +1 -1
- package/dist/cjs/utility.js +91 -1
- package/dist/cjs/utility.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.d.ts.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/agentic-authorization-service.d.ts +23 -0
- package/dist/esm/agentic-authorization-service.d.ts.map +1 -1
- package/dist/esm/agentic-authorization-service.js +8 -4
- package/dist/esm/agentic-authorization-service.js.map +1 -1
- package/dist/esm/configuration/DefaultConfigurationProvider.d.ts +39 -0
- package/dist/esm/configuration/DefaultConfigurationProvider.d.ts.map +1 -0
- package/dist/esm/configuration/DefaultConfigurationProvider.js +43 -0
- package/dist/esm/configuration/DefaultConfigurationProvider.js.map +1 -0
- package/dist/esm/configuration/IConfigurationProvider.d.ts +8 -0
- package/dist/esm/configuration/IConfigurationProvider.d.ts.map +1 -0
- package/dist/esm/configuration/IConfigurationProvider.js +4 -0
- package/dist/esm/configuration/IConfigurationProvider.js.map +1 -0
- package/dist/esm/configuration/RuntimeConfiguration.d.ts +35 -0
- package/dist/esm/configuration/RuntimeConfiguration.d.ts.map +1 -0
- package/dist/esm/configuration/RuntimeConfiguration.js +67 -0
- package/dist/esm/configuration/RuntimeConfiguration.js.map +1 -0
- package/dist/esm/configuration/RuntimeConfigurationOptions.d.ts +35 -0
- package/dist/esm/configuration/RuntimeConfigurationOptions.d.ts.map +1 -0
- package/dist/esm/configuration/RuntimeConfigurationOptions.js +4 -0
- package/dist/esm/configuration/RuntimeConfigurationOptions.js.map +1 -0
- package/dist/esm/configuration/index.d.ts +5 -0
- package/dist/esm/configuration/index.d.ts.map +1 -0
- package/dist/esm/configuration/index.js +7 -0
- package/dist/esm/configuration/index.js.map +1 -0
- package/dist/esm/environment-utils.d.ts +69 -11
- package/dist/esm/environment-utils.d.ts.map +1 -1
- package/dist/esm/environment-utils.js +79 -26
- package/dist/esm/environment-utils.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/power-platform-api-discovery.d.ts +18 -1
- package/dist/esm/power-platform-api-discovery.d.ts.map +1 -1
- package/dist/esm/power-platform-api-discovery.js +21 -2
- package/dist/esm/power-platform-api-discovery.js.map +1 -1
- package/dist/esm/utility.d.ts +48 -1
- package/dist/esm/utility.d.ts.map +1 -1
- package/dist/esm/utility.js +91 -1
- package/dist/esm/utility.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.d.ts.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"power-platform-api-discovery.js","sourceRoot":"","sources":["../../src/power-platform-api-discovery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"power-platform-api-discovery.js","sourceRoot":"","sources":["../../src/power-platform-api-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAN,IAAY,eAaX;AAbD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,8BAAW,CAAA;IACX,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,gDAA6B,CAAA;IAC7B,gCAAa,CAAA;IACb,8BAAW,CAAA;IACX,gCAAa,CAAA;IACb,8BAAW,CAAA;IACX,wCAAqB,CAAA;IACrB,4BAAS,CAAA;IACT,4BAAS,CAAA;AACX,CAAC,EAbW,eAAe,KAAf,eAAe,QAa1B;AAED,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AAI,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,eAAe,CAAC,YAAY,CAAC;YAClC,KAAK,eAAe,CAAC,IAAI;gBACvB,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"}
|
package/dist/esm/utility.d.ts
CHANGED
|
@@ -3,12 +3,48 @@ import { TurnContext } from '@microsoft/agents-hosting';
|
|
|
3
3
|
* Utility class providing helper methods for agent runtime operations.
|
|
4
4
|
*/
|
|
5
5
|
export declare class Utility {
|
|
6
|
+
private static cachedPackageName;
|
|
6
7
|
/**
|
|
8
|
+
* Reads the application name from package.json at module load time.
|
|
9
|
+
* This ensures file I/O happens during initialization, not during requests.
|
|
10
|
+
*
|
|
11
|
+
* Note: Uses process.cwd() which assumes the application is started from its root directory.
|
|
12
|
+
* This is a fallback mechanism - npm_package_name (checked first in getApplicationName) is
|
|
13
|
+
* the preferred source as it's reliably set by npm/pnpm when running package scripts.
|
|
14
|
+
*/
|
|
15
|
+
private static initPackageName;
|
|
16
|
+
/**
|
|
17
|
+
* **WARNING: NO SIGNATURE VERIFICATION** - This method uses jwt.decode() which does NOT
|
|
18
|
+
* verify the token signature. The token claims can be spoofed by malicious actors.
|
|
19
|
+
* This method is ONLY suitable for logging, analytics, and diagnostics purposes.
|
|
20
|
+
* Do NOT use the returned value for authorization, access control, or security decisions.
|
|
21
|
+
*
|
|
7
22
|
* Decodes the current token and retrieves the App ID (appid or azp claim).
|
|
23
|
+
*
|
|
24
|
+
* Note: Returns a default GUID ('00000000-0000-0000-0000-000000000000') for empty tokens
|
|
25
|
+
* for backward compatibility with callers that expect a valid-looking GUID.
|
|
26
|
+
* For agent identification where empty string is preferred, use {@link getAgentIdFromToken}.
|
|
27
|
+
*
|
|
8
28
|
* @param token Token to Decode
|
|
9
|
-
* @returns AppId
|
|
29
|
+
* @returns AppId, or default GUID for empty token, or empty string if decode fails
|
|
10
30
|
*/
|
|
11
31
|
static GetAppIdFromToken(token: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* **WARNING: NO SIGNATURE VERIFICATION** - This method uses jwt.decode() which does NOT
|
|
34
|
+
* verify the token signature. The token claims can be spoofed by malicious actors.
|
|
35
|
+
* This method is ONLY suitable for logging, analytics, and diagnostics purposes.
|
|
36
|
+
* Do NOT use the returned value for authorization, access control, or security decisions.
|
|
37
|
+
*
|
|
38
|
+
* Decodes the token and retrieves the best available agent identifier.
|
|
39
|
+
* Checks claims in priority order: xms_par_app_azp (agent blueprint ID) > appid > azp.
|
|
40
|
+
*
|
|
41
|
+
* Note: Returns empty string for empty/missing tokens (unlike {@link GetAppIdFromToken} which
|
|
42
|
+
* returns a default GUID). This allows callers to omit headers when no identifier is available.
|
|
43
|
+
*
|
|
44
|
+
* @param token JWT token to decode
|
|
45
|
+
* @returns Agent ID (GUID) or empty string if not found or token is empty
|
|
46
|
+
*/
|
|
47
|
+
static getAgentIdFromToken(token: string): string;
|
|
12
48
|
/**
|
|
13
49
|
* Resolves the agent identity from the turn context or auth token.
|
|
14
50
|
* @param context Turn Context of the turn.
|
|
@@ -22,5 +58,16 @@ export declare class Utility {
|
|
|
22
58
|
* @returns Formatted User-Agent header string.
|
|
23
59
|
*/
|
|
24
60
|
static GetUserAgentHeader(orchestrator?: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* Gets the application name from npm_package_name environment variable or package.json.
|
|
63
|
+
* The package.json result is cached at module load time to avoid sync I/O during requests.
|
|
64
|
+
* @returns Application name or undefined if not available.
|
|
65
|
+
*/
|
|
66
|
+
static getApplicationName(): string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Resets the cached application name. Used for testing purposes.
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
static resetApplicationNameCache(): void;
|
|
25
72
|
}
|
|
26
73
|
//# sourceMappingURL=utility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAQxD;;GAEG;AACH,qBAAa,OAAO;IAIlB,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAA4C;IAE5E;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAW9B;;;;;;;;;;;;;;OAcG;WACW,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAoBtD;;;;;;;;;;;;;;OAcG;WACW,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAmBxD;;;;;OAKG;WACW,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;IASnF;;;;OAIG;WACW,kBAAkB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM;IAM/D;;;;OAIG;WACW,kBAAkB,IAAI,MAAM,GAAG,SAAS;IAYtD;;;OAGG;WACW,yBAAyB,IAAI,IAAI;CAGhD"}
|
package/dist/esm/utility.js
CHANGED
|
@@ -2,15 +2,47 @@
|
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import * as jwt from 'jsonwebtoken';
|
|
4
4
|
import os from 'os';
|
|
5
|
+
import fs from 'fs';
|
|
6
|
+
import path from 'path';
|
|
5
7
|
import { LIB_VERSION } from './version';
|
|
6
8
|
/**
|
|
7
9
|
* Utility class providing helper methods for agent runtime operations.
|
|
8
10
|
*/
|
|
9
11
|
export class Utility {
|
|
10
12
|
/**
|
|
13
|
+
* Reads the application name from package.json at module load time.
|
|
14
|
+
* This ensures file I/O happens during initialization, not during requests.
|
|
15
|
+
*
|
|
16
|
+
* Note: Uses process.cwd() which assumes the application is started from its root directory.
|
|
17
|
+
* This is a fallback mechanism - npm_package_name (checked first in getApplicationName) is
|
|
18
|
+
* the preferred source as it's reliably set by npm/pnpm when running package scripts.
|
|
19
|
+
*/
|
|
20
|
+
static initPackageName() {
|
|
21
|
+
try {
|
|
22
|
+
const packageJsonPath = path.resolve(process.cwd(), 'package.json');
|
|
23
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
24
|
+
return packageJson.name || null;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// TODO: Add debug-level logging once a logger implementation is available
|
|
28
|
+
// to help troubleshoot package.json read failures in production environments
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* **WARNING: NO SIGNATURE VERIFICATION** - This method uses jwt.decode() which does NOT
|
|
34
|
+
* verify the token signature. The token claims can be spoofed by malicious actors.
|
|
35
|
+
* This method is ONLY suitable for logging, analytics, and diagnostics purposes.
|
|
36
|
+
* Do NOT use the returned value for authorization, access control, or security decisions.
|
|
37
|
+
*
|
|
11
38
|
* Decodes the current token and retrieves the App ID (appid or azp claim).
|
|
39
|
+
*
|
|
40
|
+
* Note: Returns a default GUID ('00000000-0000-0000-0000-000000000000') for empty tokens
|
|
41
|
+
* for backward compatibility with callers that expect a valid-looking GUID.
|
|
42
|
+
* For agent identification where empty string is preferred, use {@link getAgentIdFromToken}.
|
|
43
|
+
*
|
|
12
44
|
* @param token Token to Decode
|
|
13
|
-
* @returns AppId
|
|
45
|
+
* @returns AppId, or default GUID for empty token, or empty string if decode fails
|
|
14
46
|
*/
|
|
15
47
|
static GetAppIdFromToken(token) {
|
|
16
48
|
if (!token || token.trim() === '') {
|
|
@@ -30,6 +62,38 @@ export class Utility {
|
|
|
30
62
|
return '';
|
|
31
63
|
}
|
|
32
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* **WARNING: NO SIGNATURE VERIFICATION** - This method uses jwt.decode() which does NOT
|
|
67
|
+
* verify the token signature. The token claims can be spoofed by malicious actors.
|
|
68
|
+
* This method is ONLY suitable for logging, analytics, and diagnostics purposes.
|
|
69
|
+
* Do NOT use the returned value for authorization, access control, or security decisions.
|
|
70
|
+
*
|
|
71
|
+
* Decodes the token and retrieves the best available agent identifier.
|
|
72
|
+
* Checks claims in priority order: xms_par_app_azp (agent blueprint ID) > appid > azp.
|
|
73
|
+
*
|
|
74
|
+
* Note: Returns empty string for empty/missing tokens (unlike {@link GetAppIdFromToken} which
|
|
75
|
+
* returns a default GUID). This allows callers to omit headers when no identifier is available.
|
|
76
|
+
*
|
|
77
|
+
* @param token JWT token to decode
|
|
78
|
+
* @returns Agent ID (GUID) or empty string if not found or token is empty
|
|
79
|
+
*/
|
|
80
|
+
static getAgentIdFromToken(token) {
|
|
81
|
+
if (!token || token.trim() === '') {
|
|
82
|
+
return '';
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
const decoded = jwt.decode(token);
|
|
86
|
+
if (!decoded) {
|
|
87
|
+
return '';
|
|
88
|
+
}
|
|
89
|
+
// Priority: xms_par_app_azp (agent blueprint ID) > appid > azp
|
|
90
|
+
return decoded['xms_par_app_azp'] || decoded['appid'] || decoded['azp'] || '';
|
|
91
|
+
}
|
|
92
|
+
catch (_error) {
|
|
93
|
+
// Silent error handling - return empty string on decode failure
|
|
94
|
+
return '';
|
|
95
|
+
}
|
|
96
|
+
}
|
|
33
97
|
/**
|
|
34
98
|
* Resolves the agent identity from the turn context or auth token.
|
|
35
99
|
* @param context Turn Context of the turn.
|
|
@@ -53,5 +117,31 @@ export class Utility {
|
|
|
53
117
|
const orchestratorPart = orchestrator ? `; ${orchestrator}` : '';
|
|
54
118
|
return `Agent365SDK/${LIB_VERSION} (${osType}; Node.js ${process.version}${orchestratorPart})`;
|
|
55
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Gets the application name from npm_package_name environment variable or package.json.
|
|
122
|
+
* The package.json result is cached at module load time to avoid sync I/O during requests.
|
|
123
|
+
* @returns Application name or undefined if not available.
|
|
124
|
+
*/
|
|
125
|
+
static getApplicationName() {
|
|
126
|
+
// First try npm_package_name (set automatically by npm/pnpm when running scripts)
|
|
127
|
+
// eslint-disable-next-line no-restricted-properties -- npm_package_name is set by npm at runtime, not a configurable setting
|
|
128
|
+
if (process.env.npm_package_name) {
|
|
129
|
+
// eslint-disable-next-line no-restricted-properties -- npm_package_name is set by npm at runtime, not a configurable setting
|
|
130
|
+
return process.env.npm_package_name;
|
|
131
|
+
}
|
|
132
|
+
// Fall back to cached package.json name (read at module load time)
|
|
133
|
+
return this.cachedPackageName || undefined;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Resets the cached application name. Used for testing purposes.
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
139
|
+
static resetApplicationNameCache() {
|
|
140
|
+
this.cachedPackageName = Utility.initPackageName();
|
|
141
|
+
}
|
|
56
142
|
}
|
|
143
|
+
// Cache for application name read from package.json
|
|
144
|
+
// null = checked but not found, string = found
|
|
145
|
+
// Eagerly initialized at module load time to avoid sync I/O during requests
|
|
146
|
+
Utility.cachedPackageName = Utility.initPackageName();
|
|
57
147
|
//# sourceMappingURL=utility.js.map
|
package/dist/esm/utility.js.map
CHANGED
|
@@ -1 +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;AACpC,OAAO,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC;;GAEG;AACH,MAAM,OAAO,OAAO;IAMlB;;;;;;;OAOG;IACK,MAAM,CAAC,eAAe;QAC5B,IAAI,CAAC;YACH,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;YACpE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;YAC1E,OAAO,WAAW,CAAC,IAAI,IAAI,IAAI,CAAC;QAClC,CAAC;QAAC,MAAM,CAAC;YACP,0EAA0E;YAC1E,6EAA6E;YAC7E,OAAO,I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AAE,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;IAED;;;;OAIG;IACI,MAAM,CAAC,kBAAkB,CAAC,YAAqB;QACpD,MAAM,MAAM,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;QACzB,MAAM,gBAAgB,GAAG,YAAY,CAAC,CAAC,CAAC,KAAK,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,OAAO,eAAe,WAAW,KAAK,MAAM,aAAa,OAAO,CAAC,OAAO,GAAG,gBAAgB,GAAG,CAAC;IACjG,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,kBAAkB;QAC9B,kFAAkF;QAClF,6HAA6H;QAC7H,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;YACjC,6HAA6H;YAC7H,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;QACtC,CAAC;QAED,mEAAmE;QACnE,OAAO,IAAI,CAAC,iBAAiB,IAAI,SAAS,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,yBAAyB;QACrC,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IACrD,CAAC;;AA9ID,oDAAoD;AACpD,+CAA+C;AAC/C,4EAA4E;AAC7D,yBAAiB,GAAkB,OAAO,CAAC,eAAe,EAAE,CAAC"}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "0.
|
|
1
|
+
export declare const LIB_VERSION = "0.2.0-preview.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,oBAAoB,CAAC"}
|
package/dist/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const LIB_VERSION = "0.
|
|
1
|
+
export const LIB_VERSION = "0.2.0-preview.1";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/agents-a365-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-preview.1",
|
|
4
4
|
"description": "Agent 365 Runtime SDK for AI agents built with TypeScript/Node.js",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@azure/identity": "^4.12.1",
|
|
23
|
-
"@microsoft/agents-hosting": "^1.1
|
|
23
|
+
"@microsoft/agents-hosting": "^1.3.1",
|
|
24
24
|
"jsonwebtoken": "^9.0.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|