@microsoft/agents-a365-runtime 0.1.0-preview.54 → 0.1.0-preview.63
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/utility.d.ts +6 -0
- package/dist/cjs/utility.d.ts.map +1 -1
- package/dist/cjs/utility.js +15 -0
- package/dist/cjs/utility.js.map +1 -1
- package/dist/cjs/version.d.ts +2 -0
- package/dist/cjs/version.d.ts.map +1 -0
- package/dist/cjs/version.js +5 -0
- package/dist/cjs/version.js.map +1 -0
- package/dist/esm/utility.d.ts +6 -0
- package/dist/esm/utility.d.ts.map +1 -1
- package/dist/esm/utility.js +12 -0
- package/dist/esm/utility.js.map +1 -1
- package/dist/esm/version.d.ts +2 -0
- package/dist/esm/version.d.ts.map +1 -0
- package/dist/esm/version.js +2 -0
- package/dist/esm/version.js.map +1 -0
- package/package.json +18 -17
package/dist/cjs/utility.d.ts
CHANGED
|
@@ -16,5 +16,11 @@ export declare class Utility {
|
|
|
16
16
|
* @returns Agent identity (App ID)
|
|
17
17
|
*/
|
|
18
18
|
static ResolveAgentIdentity(context: TurnContext, authToken: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Generates a User-Agent header string containing SDK version, OS type, Node.js version, and orchestrator.
|
|
21
|
+
* @param orchestrator Optional orchestrator identifier to include in the User-Agent string.
|
|
22
|
+
* @returns Formatted User-Agent header string.
|
|
23
|
+
*/
|
|
24
|
+
static GetUserAgentHeader(orchestrator?: string): string;
|
|
19
25
|
}
|
|
20
26
|
//# 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;AAMxD;;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;IASnF;;;;OAIG;WACW,kBAAkB,CAAC,YAAY,GAAE,MAAW,GAAG,MAAM;CAKpE"}
|
package/dist/cjs/utility.js
CHANGED
|
@@ -34,9 +34,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
36
|
})();
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
37
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
41
|
exports.Utility = void 0;
|
|
39
42
|
const jwt = __importStar(require("jsonwebtoken"));
|
|
43
|
+
const os_1 = __importDefault(require("os"));
|
|
44
|
+
const version_1 = require("./version");
|
|
40
45
|
/**
|
|
41
46
|
* Utility class providing helper methods for agent runtime operations.
|
|
42
47
|
*/
|
|
@@ -77,6 +82,16 @@ class Utility {
|
|
|
77
82
|
: this.GetAppIdFromToken(authToken);
|
|
78
83
|
return agenticAppId;
|
|
79
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Generates a User-Agent header string containing SDK version, OS type, Node.js version, and orchestrator.
|
|
87
|
+
* @param orchestrator Optional orchestrator identifier to include in the User-Agent string.
|
|
88
|
+
* @returns Formatted User-Agent header string.
|
|
89
|
+
*/
|
|
90
|
+
static GetUserAgentHeader(orchestrator = '') {
|
|
91
|
+
const osType = os_1.default.type();
|
|
92
|
+
const orchestratorPart = orchestrator ? `; ${orchestrator}` : '';
|
|
93
|
+
return `Agent365SDK/${version_1.LIB_VERSION} (${osType}; Node.js ${process.version}${orchestratorPart})`;
|
|
94
|
+
}
|
|
80
95
|
}
|
|
81
96
|
exports.Utility = Utility;
|
|
82
97
|
//# sourceMappingURL=utility.js.map
|
package/dist/cjs/utility.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/utility.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGlC,kDAAoC;AACpC,4CAAoB;AAEpB,uCAAwC;AAExC;;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;IAED;;;;OAIG;IACI,MAAM,CAAC,kBAAkB,CAAC,eAAuB,EAAE;QACxD,MAAM,MAAM,GAAG,YAAE,CAAC,IAAI,EAAE,CAAC;QACzB,MAAM,gBAAgB,GAAG,YAAY,CAAC,CAAC,CAAC,KAAK,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,OAAO,eAAe,qBAAW,KAAK,MAAM,aAAa,OAAO,CAAC,OAAO,GAAG,gBAAgB,GAAG,CAAC;IACjG,CAAC;CACF;AAnDD,0BAmDC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,kBAAkB,CAAC"}
|
package/dist/esm/utility.d.ts
CHANGED
|
@@ -16,5 +16,11 @@ export declare class Utility {
|
|
|
16
16
|
* @returns Agent identity (App ID)
|
|
17
17
|
*/
|
|
18
18
|
static ResolveAgentIdentity(context: TurnContext, authToken: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Generates a User-Agent header string containing SDK version, OS type, Node.js version, and orchestrator.
|
|
21
|
+
* @param orchestrator Optional orchestrator identifier to include in the User-Agent string.
|
|
22
|
+
* @returns Formatted User-Agent header string.
|
|
23
|
+
*/
|
|
24
|
+
static GetUserAgentHeader(orchestrator?: string): string;
|
|
19
25
|
}
|
|
20
26
|
//# 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;AAMxD;;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;IASnF;;;;OAIG;WACW,kBAAkB,CAAC,YAAY,GAAE,MAAW,GAAG,MAAM;CAKpE"}
|
package/dist/esm/utility.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import * as jwt from 'jsonwebtoken';
|
|
4
|
+
import os from 'os';
|
|
5
|
+
import { LIB_VERSION } from './version';
|
|
4
6
|
/**
|
|
5
7
|
* Utility class providing helper methods for agent runtime operations.
|
|
6
8
|
*/
|
|
@@ -41,5 +43,15 @@ export class Utility {
|
|
|
41
43
|
: this.GetAppIdFromToken(authToken);
|
|
42
44
|
return agenticAppId;
|
|
43
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Generates a User-Agent header string containing SDK version, OS type, Node.js version, and orchestrator.
|
|
48
|
+
* @param orchestrator Optional orchestrator identifier to include in the User-Agent string.
|
|
49
|
+
* @returns Formatted User-Agent header string.
|
|
50
|
+
*/
|
|
51
|
+
static GetUserAgentHeader(orchestrator = '') {
|
|
52
|
+
const osType = os.type();
|
|
53
|
+
const orchestratorPart = orchestrator ? `; ${orchestrator}` : '';
|
|
54
|
+
return `Agent365SDK/${LIB_VERSION} (${osType}; Node.js ${process.version}${orchestratorPart})`;
|
|
55
|
+
}
|
|
44
56
|
}
|
|
45
57
|
//# 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;
|
|
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;AAEpB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC;;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;IAED;;;;OAIG;IACI,MAAM,CAAC,kBAAkB,CAAC,eAAuB,EAAE;QACxD,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;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/agents-a365-runtime",
|
|
3
|
-
"version": "0.1.0-preview.
|
|
3
|
+
"version": "0.1.0-preview.63",
|
|
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",
|
|
7
7
|
"types": "dist/esm/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
+
"prebuild": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
|
|
9
10
|
"build:cjs": "npx tsc --project tsconfig.cjs.json",
|
|
10
11
|
"build:esm": "npx tsc --project tsconfig.esm.json",
|
|
11
12
|
"build": "npm run build:cjs && npm run build:esm",
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
"lint:fix": "eslint src/**/*.ts --fix",
|
|
18
19
|
"prepublishOnly": "npm run clean && npm run build",
|
|
19
20
|
"ci": "npm ci",
|
|
20
|
-
"pack": "
|
|
21
|
+
"pack": "node ../../copyFiles.js . && pnpm pack --pack-destination=../"
|
|
21
22
|
},
|
|
22
23
|
"keywords": [
|
|
23
24
|
"ai",
|
|
@@ -33,23 +34,23 @@
|
|
|
33
34
|
"directory": "packages/agents-a365-runtime"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@azure/identity": "
|
|
37
|
-
"@microsoft/agents-hosting": "
|
|
38
|
-
"jsonwebtoken": "
|
|
37
|
+
"@azure/identity": "catalog:",
|
|
38
|
+
"@microsoft/agents-hosting": "catalog:",
|
|
39
|
+
"jsonwebtoken": "catalog:"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@eslint/js": "
|
|
42
|
-
"@types/jest": "
|
|
43
|
-
"@types/jsonwebtoken": "
|
|
44
|
-
"@types/node": "
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "
|
|
46
|
-
"@typescript-eslint/parser": "
|
|
47
|
-
"eslint": "
|
|
48
|
-
"jest": "
|
|
49
|
-
"rimraf": "
|
|
50
|
-
"ts-jest": "
|
|
51
|
-
"typescript": "
|
|
52
|
-
"typescript-eslint": "
|
|
42
|
+
"@eslint/js": "catalog:",
|
|
43
|
+
"@types/jest": "catalog:",
|
|
44
|
+
"@types/jsonwebtoken": "catalog:",
|
|
45
|
+
"@types/node": "catalog:",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "catalog:",
|
|
47
|
+
"@typescript-eslint/parser": "catalog:",
|
|
48
|
+
"eslint": "catalog:",
|
|
49
|
+
"jest": "catalog:",
|
|
50
|
+
"rimraf": "catalog:",
|
|
51
|
+
"ts-jest": "catalog:",
|
|
52
|
+
"typescript": "catalog:",
|
|
53
|
+
"typescript-eslint": "catalog:"
|
|
53
54
|
},
|
|
54
55
|
"engines": {
|
|
55
56
|
"node": ">=18.0.0"
|