@microsoft/agents-a365-tooling-extensions-openai 0.1.0-preview.64 → 0.1.0-preview.83
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/McpToolRegistrationService.d.ts +1 -0
- package/dist/cjs/McpToolRegistrationService.d.ts.map +1 -1
- package/dist/cjs/McpToolRegistrationService.js +4 -2
- package/dist/cjs/McpToolRegistrationService.js.map +1 -1
- package/dist/esm/McpToolRegistrationService.d.ts +1 -0
- package/dist/esm/McpToolRegistrationService.d.ts.map +1 -1
- package/dist/esm/McpToolRegistrationService.js +4 -2
- package/dist/esm/McpToolRegistrationService.js.map +1 -1
- package/package.json +5 -4
|
@@ -6,6 +6,7 @@ import { Agent } from '@openai/agents';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class McpToolRegistrationService {
|
|
8
8
|
private configService;
|
|
9
|
+
private readonly orchestratorName;
|
|
9
10
|
/**
|
|
10
11
|
* Registers MCP tool servers and updates agent options with discovered tools and server configs.
|
|
11
12
|
* Call this to enable dynamic OpenAI tool access based on the current MCP environment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpToolRegistrationService.d.ts","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,EAAE,KAAK,EAA2B,MAAM,gBAAgB,CAAC;AAEhE;;;GAGG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,aAAa,CAA+E;
|
|
1
|
+
{"version":3,"file":"McpToolRegistrationService.d.ts","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,EAAE,KAAK,EAA2B,MAAM,gBAAgB,CAAC;AAEhE;;;GAGG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,aAAa,CAA+E;IACpG,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAoB;IAGrD;;;;;;;;;OASG;IACG,qBAAqB,CACzB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,KAAK,CAAC;CAuClB"}
|
|
@@ -14,6 +14,7 @@ const agents_1 = require("@openai/agents");
|
|
|
14
14
|
class McpToolRegistrationService {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.configService = new agents_a365_tooling_1.McpToolServerConfigurationService();
|
|
17
|
+
this.orchestratorName = "OpenAI";
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Registers MCP tool servers and updates agent options with discovered tools and server configs.
|
|
@@ -35,11 +36,12 @@ class McpToolRegistrationService {
|
|
|
35
36
|
// Validate the authentication token
|
|
36
37
|
agents_a365_tooling_1.Utility.ValidateAuthToken(authToken);
|
|
37
38
|
const agenticAppId = agents_a365_runtime_1.Utility.ResolveAgentIdentity(turnContext, authToken);
|
|
38
|
-
const
|
|
39
|
+
const options = { orchestratorName: this.orchestratorName };
|
|
40
|
+
const servers = await this.configService.listToolServers(agenticAppId, authToken, options);
|
|
39
41
|
const mcpServers = [];
|
|
40
42
|
for (const server of servers) {
|
|
41
43
|
// Compose headers if values are available
|
|
42
|
-
const headers = agents_a365_tooling_1.Utility.GetToolRequestHeaders(authToken, turnContext);
|
|
44
|
+
const headers = agents_a365_tooling_1.Utility.GetToolRequestHeaders(authToken, turnContext, options);
|
|
43
45
|
// Create MCPServerStreamableHttp instance for OpenAI agents
|
|
44
46
|
const mcpServer = new agents_1.MCPServerStreamableHttp({
|
|
45
47
|
url: server.url,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpToolRegistrationService.js","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,
|
|
1
|
+
{"version":3,"file":"McpToolRegistrationService.js","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,wEAAyG;AACzG,wEAAyG;AAKzG,oBAAoB;AACpB,2CAAgE;AAEhE;;;GAGG;AACH,MAAa,0BAA0B;IAAvC;QACU,kBAAa,GAAuC,IAAI,uDAAiC,EAAE,CAAC;QACnF,qBAAgB,GAAW,QAAQ,CAAC;IA0DvD,CAAC;IAvDC;;;;;;;;;OASG;IACH,KAAK,CAAC,qBAAqB,CACzB,KAAY,EACZ,aAA4B,EAC5B,eAAuB,EACvB,WAAwB,EACxB,SAAiB;QAGjB,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,SAAS,GAAG,MAAM,kDAA4B,CAAC,mBAAmB,CAAC,aAAa,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC;QAClH,CAAC;QAED,oCAAoC;QACpC,6BAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAErC,MAAM,YAAY,GAAG,6BAAc,CAAC,oBAAoB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACjF,MAAM,OAAO,GAAgB,EAAE,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACzE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAC3F,MAAM,UAAU,GAA8B,EAAE,CAAC;QAEjD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,0CAA0C;YAC1C,MAAM,OAAO,GAA2B,6BAAO,CAAC,qBAAqB,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;YAEvG,4DAA4D;YAC5D,MAAM,SAAS,GAAG,IAAI,gCAAuB,CAAC;gBAC5C,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,IAAI,EAAE,MAAM,CAAC,aAAa;gBAC1B,WAAW,EAAE;oBACX,OAAO,EAAE,OAAO;iBACjB;aACF,CAAC,CAAC;YAEH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QAED,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC;QAC1C,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;QAErC,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA5DD,gEA4DC"}
|
|
@@ -6,6 +6,7 @@ import { Agent } from '@openai/agents';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class McpToolRegistrationService {
|
|
8
8
|
private configService;
|
|
9
|
+
private readonly orchestratorName;
|
|
9
10
|
/**
|
|
10
11
|
* Registers MCP tool servers and updates agent options with discovered tools and server configs.
|
|
11
12
|
* Call this to enable dynamic OpenAI tool access based on the current MCP environment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpToolRegistrationService.d.ts","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,EAAE,KAAK,EAA2B,MAAM,gBAAgB,CAAC;AAEhE;;;GAGG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,aAAa,CAA+E;
|
|
1
|
+
{"version":3,"file":"McpToolRegistrationService.d.ts","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,EAAE,KAAK,EAA2B,MAAM,gBAAgB,CAAC;AAEhE;;;GAGG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,aAAa,CAA+E;IACpG,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAoB;IAGrD;;;;;;;;;OASG;IACG,qBAAqB,CACzB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,KAAK,CAAC;CAuClB"}
|
|
@@ -11,6 +11,7 @@ import { MCPServerStreamableHttp } from '@openai/agents';
|
|
|
11
11
|
export class McpToolRegistrationService {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.configService = new McpToolServerConfigurationService();
|
|
14
|
+
this.orchestratorName = "OpenAI";
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Registers MCP tool servers and updates agent options with discovered tools and server configs.
|
|
@@ -32,11 +33,12 @@ export class McpToolRegistrationService {
|
|
|
32
33
|
// Validate the authentication token
|
|
33
34
|
Utility.ValidateAuthToken(authToken);
|
|
34
35
|
const agenticAppId = RuntimeUtility.ResolveAgentIdentity(turnContext, authToken);
|
|
35
|
-
const
|
|
36
|
+
const options = { orchestratorName: this.orchestratorName };
|
|
37
|
+
const servers = await this.configService.listToolServers(agenticAppId, authToken, options);
|
|
36
38
|
const mcpServers = [];
|
|
37
39
|
for (const server of servers) {
|
|
38
40
|
// Compose headers if values are available
|
|
39
|
-
const headers = Utility.GetToolRequestHeaders(authToken, turnContext);
|
|
41
|
+
const headers = Utility.GetToolRequestHeaders(authToken, turnContext, options);
|
|
40
42
|
// Create MCPServerStreamableHttp instance for OpenAI agents
|
|
41
43
|
const mcpServer = new MCPServerStreamableHttp({
|
|
42
44
|
url: server.url,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpToolRegistrationService.js","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAA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CAAC;QAEjD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,0CAA0C;YAC1C,MAAM,OAAO,GAA2B,OAAO,CAAC,qBAAqB,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;YAEvG,4DAA4D;YAC5D,MAAM,SAAS,GAAG,IAAI,uBAAuB,CAAC;gBAC5C,GAAG,EAAE,MAAM,CAAC,GAAG;gBACf,IAAI,EAAE,MAAM,CAAC,aAAa;gBAC1B,WAAW,EAAE;oBACX,OAAO,EAAE,OAAO;iBACjB;aACF,CAAC,CAAC;YAEH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QAED,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC;QAC1C,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;QAErC,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/agents-a365-tooling-extensions-openai",
|
|
3
|
-
"version": "0.1.0-preview.
|
|
3
|
+
"version": "0.1.0-preview.83",
|
|
4
4
|
"description": "Agent 365 Tooling SDK for OpenAI for AI agents built with TypeScript/Node.js",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
"directory": "packages/agents-a365-tooling-extensions-openai"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@microsoft/agents-a365-runtime": "0.1.0-preview.
|
|
24
|
-
"@microsoft/agents-a365-tooling": "0.1.0-preview.
|
|
23
|
+
"@microsoft/agents-a365-runtime": "0.1.0-preview.83",
|
|
24
|
+
"@microsoft/agents-a365-tooling": "0.1.0-preview.83",
|
|
25
25
|
"@microsoft/agents-hosting": "^1.1.0-alpha.85",
|
|
26
|
-
"@openai/agents": "^0.1.5"
|
|
26
|
+
"@openai/agents": "^0.1.5",
|
|
27
|
+
"hono": "^4.11.4"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"@eslint/js": "^9.39.1",
|