@microsoft/agents-a365-runtime 0.1.0-preview.54 → 0.1.0-preview.64
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/LICENSE.md +21 -0
- 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 +24 -24
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Microsoft
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
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;A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,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,MAA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E,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,24 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/agents-a365-runtime",
|
|
3
|
-
"version": "0.1.0-preview.
|
|
3
|
+
"version": "0.1.0-preview.64",
|
|
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
|
-
"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": "cp ../../CHANGELOG.md . && cp ../../LICENSE.md . && npm pack --pack-destination=../"
|
|
21
|
-
},
|
|
22
8
|
"keywords": [
|
|
23
9
|
"ai",
|
|
24
10
|
"agents",
|
|
@@ -34,20 +20,20 @@
|
|
|
34
20
|
},
|
|
35
21
|
"dependencies": {
|
|
36
22
|
"@azure/identity": "^4.12.1",
|
|
37
|
-
"@microsoft/agents-hosting": "
|
|
38
|
-
"jsonwebtoken": "^9.0.
|
|
23
|
+
"@microsoft/agents-hosting": "^1.1.0-alpha.85",
|
|
24
|
+
"jsonwebtoken": "^9.0.3"
|
|
39
25
|
},
|
|
40
26
|
"devDependencies": {
|
|
41
27
|
"@eslint/js": "^9.39.1",
|
|
42
|
-
"@types/jest": "
|
|
28
|
+
"@types/jest": "^30.0.0",
|
|
43
29
|
"@types/jsonwebtoken": "^9.0.10",
|
|
44
|
-
"@types/node": "^20.
|
|
30
|
+
"@types/node": "^20.17.0",
|
|
45
31
|
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
46
32
|
"@typescript-eslint/parser": "^8.47.0",
|
|
47
33
|
"eslint": "^9.39.1",
|
|
48
|
-
"jest": "
|
|
49
|
-
"rimraf": "^
|
|
50
|
-
"ts-jest": "
|
|
34
|
+
"jest": "^30.2.0",
|
|
35
|
+
"rimraf": "^6.0.0",
|
|
36
|
+
"ts-jest": "^29.4.5",
|
|
51
37
|
"typescript": "^5.9.3",
|
|
52
38
|
"typescript-eslint": "^8.47.0"
|
|
53
39
|
},
|
|
@@ -59,5 +45,19 @@
|
|
|
59
45
|
"README.md",
|
|
60
46
|
"CHANGELOG.md",
|
|
61
47
|
"LICENSE.md"
|
|
62
|
-
]
|
|
63
|
-
|
|
48
|
+
],
|
|
49
|
+
"scripts": {
|
|
50
|
+
"prebuild": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
|
|
51
|
+
"build:cjs": "npx tsc --project tsconfig.cjs.json",
|
|
52
|
+
"build:esm": "npx tsc --project tsconfig.esm.json",
|
|
53
|
+
"build": "npm run build:cjs && npm run build:esm",
|
|
54
|
+
"build:watch": "npx tsc --watch",
|
|
55
|
+
"clean": "npx rimraf dist",
|
|
56
|
+
"test": "jest --passWithNoTests",
|
|
57
|
+
"test:watch": "jest --watch",
|
|
58
|
+
"lint": "eslint src/**/*.ts",
|
|
59
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
60
|
+
"ci": "npm ci",
|
|
61
|
+
"pack": "node ../../copyFiles.js . && pnpm pack --pack-destination=../"
|
|
62
|
+
}
|
|
63
|
+
}
|