@microsoft/agents-a365-tooling-extensions-langchain 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/McpToolRegistrationService.d.ts +21 -0
- package/dist/cjs/McpToolRegistrationService.d.ts.map +1 -0
- package/dist/cjs/McpToolRegistrationService.js +70 -0
- package/dist/cjs/McpToolRegistrationService.js.map +1 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/McpToolRegistrationService.d.ts +21 -0
- package/dist/esm/McpToolRegistrationService.d.ts.map +1 -0
- package/dist/esm/McpToolRegistrationService.js +70 -0
- package/dist/esm/McpToolRegistrationService.js.map +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -0
- package/package.json +62 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @microsoft/agents-a365-tooling-extensions-langchain
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@microsoft/agents-a365-tooling-extensions-langchain)
|
|
4
|
+
[](https://www.npmjs.com/package/@microsoft/agents-a365-tooling-extensions-langchain)
|
|
5
|
+
|
|
6
|
+
LangChain integration for the Microsoft Agent 365 Tooling SDK. This package enables seamless integration of MCP (Model Context Protocol) tool servers with LangChain agents, providing automatic tool discovery and registration as DynamicStructuredTool instances.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @microsoft/agents-a365-tooling-extensions-langchain
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
For detailed usage examples and implementation guidance, see the [Microsoft Agent 365 Tooling Documentation](https://learn.microsoft.com/microsoft-agent-365/developer/tooling?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,21 @@
|
|
|
1
|
+
import { TurnContext, Authorization } from '@microsoft/agents-hosting';
|
|
2
|
+
import { ReactAgent } from 'langchain';
|
|
3
|
+
/**
|
|
4
|
+
* Discover MCP servers and list tools formatted for the LangChain Orchestrator.
|
|
5
|
+
* Uses listToolServers to fetch server configs and getTools to enumerate tools.
|
|
6
|
+
*/
|
|
7
|
+
export declare class McpToolRegistrationService {
|
|
8
|
+
private configService;
|
|
9
|
+
/**
|
|
10
|
+
* Registers MCP tool servers and updates agent options with discovered tools and server configs.
|
|
11
|
+
* Call this to enable dynamic LangChain tool access based on the current MCP environment.
|
|
12
|
+
* @param agent The LangChain Agent instance to which MCP servers will be added.
|
|
13
|
+
* @param authorization Authorization object for token exchange.
|
|
14
|
+
* @param authHandlerName The name of the auth handler to use for token exchange.
|
|
15
|
+
* @param turnContext The TurnContext of the current request.
|
|
16
|
+
* @param authToken Optional bearer token for MCP server access.
|
|
17
|
+
* @returns The updated Agent instance with registered MCP servers.
|
|
18
|
+
*/
|
|
19
|
+
addToolServersToAgent(agent: ReactAgent, authorization: Authorization, authHandlerName: string, turnContext: TurnContext, authToken: string): Promise<ReactAgent>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=McpToolRegistrationService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpToolRegistrationService.d.ts","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,EAAe,UAAU,EAAE,MAAM,WAAW,CAAC;AAGpD;;;GAGG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,aAAa,CAA+E;IAEpG;;;;;;;;;OASG;IACG,qBAAqB,CACzB,KAAK,EAAE,UAAU,EACjB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,UAAU,CAAC;CA+CvB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.McpToolRegistrationService = void 0;
|
|
6
|
+
// Microsoft Agent 365 SDK
|
|
7
|
+
const agents_a365_tooling_1 = require("@microsoft/agents-a365-tooling");
|
|
8
|
+
const agents_a365_runtime_1 = require("@microsoft/agents-a365-runtime");
|
|
9
|
+
// LangChain SDKs
|
|
10
|
+
const langchain_1 = require("langchain");
|
|
11
|
+
const mcp_adapters_1 = require("@langchain/mcp-adapters");
|
|
12
|
+
/**
|
|
13
|
+
* Discover MCP servers and list tools formatted for the LangChain Orchestrator.
|
|
14
|
+
* Uses listToolServers to fetch server configs and getTools to enumerate tools.
|
|
15
|
+
*/
|
|
16
|
+
class McpToolRegistrationService {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.configService = new agents_a365_tooling_1.McpToolServerConfigurationService();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Registers MCP tool servers and updates agent options with discovered tools and server configs.
|
|
22
|
+
* Call this to enable dynamic LangChain tool access based on the current MCP environment.
|
|
23
|
+
* @param agent The LangChain Agent instance to which MCP servers will be added.
|
|
24
|
+
* @param authorization Authorization object for token exchange.
|
|
25
|
+
* @param authHandlerName The name of the auth handler to use for token exchange.
|
|
26
|
+
* @param turnContext The TurnContext of the current request.
|
|
27
|
+
* @param authToken Optional bearer token for MCP server access.
|
|
28
|
+
* @returns The updated Agent instance with registered MCP servers.
|
|
29
|
+
*/
|
|
30
|
+
async addToolServersToAgent(agent, authorization, authHandlerName, turnContext, authToken) {
|
|
31
|
+
if (!agent) {
|
|
32
|
+
throw new Error('Langchain Agent is Required');
|
|
33
|
+
}
|
|
34
|
+
if (!authToken) {
|
|
35
|
+
authToken = await agents_a365_runtime_1.AgenticAuthenticationService.GetAgenticUserToken(authorization, authHandlerName, turnContext);
|
|
36
|
+
}
|
|
37
|
+
// Validate the authentication token
|
|
38
|
+
agents_a365_tooling_1.Utility.ValidateAuthToken(authToken);
|
|
39
|
+
const agenticAppId = agents_a365_runtime_1.Utility.ResolveAgentIdentity(turnContext, authToken);
|
|
40
|
+
const servers = await this.configService.listToolServers(agenticAppId, authToken);
|
|
41
|
+
const mcpServers = {};
|
|
42
|
+
for (const server of servers) {
|
|
43
|
+
// Compose headers if values are available
|
|
44
|
+
const headers = {};
|
|
45
|
+
if (authToken) {
|
|
46
|
+
headers['Authorization'] = `Bearer ${authToken}`;
|
|
47
|
+
}
|
|
48
|
+
// Create Connection instance for LangChain agents
|
|
49
|
+
mcpServers[server.mcpServerName] = {
|
|
50
|
+
type: 'http',
|
|
51
|
+
url: server.url,
|
|
52
|
+
headers: headers
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const mcpClientConfig = {};
|
|
56
|
+
mcpClientConfig.mcpServers = Object.assign(mcpClientConfig.mcpServers ?? {}, mcpServers);
|
|
57
|
+
const multiServerMcpClient = new mcp_adapters_1.MultiServerMCPClient(mcpClientConfig);
|
|
58
|
+
const mcpTools = await multiServerMcpClient.getTools();
|
|
59
|
+
// Merge existing agent tools with MCP tools
|
|
60
|
+
const existingTools = agent.options.tools ?? [];
|
|
61
|
+
const allTools = [...existingTools, ...mcpTools];
|
|
62
|
+
// Create the agent with existing options and combined tools
|
|
63
|
+
return (0, langchain_1.createAgent)({
|
|
64
|
+
...agent.options,
|
|
65
|
+
tools: allTools,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.McpToolRegistrationService = McpToolRegistrationService;
|
|
70
|
+
//# sourceMappingURL=McpToolRegistrationService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpToolRegistrationService.js","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0BAA0B;AAC1B,wEAA4F;AAC5F,wEAAyG;AAKzG,iBAAiB;AACjB,yCAAoD;AACpD,0DAAyF;AAEzF;;;GAGG;AACH,MAAa,0BAA0B;IAAvC;QACU,kBAAa,GAAuC,IAAI,uDAAiC,EAAE,CAAC;IAiEtG,CAAC;IA/DC;;;;;;;;;OASG;IACH,KAAK,CAAC,qBAAqB,CACzB,KAAiB,EACjB,aAA4B,EAC5B,eAAuB,EACvB,WAAwB,EACxB,SAAiB;QAGjB,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACjD,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,C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{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./McpToolRegistrationService"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TurnContext, Authorization } from '@microsoft/agents-hosting';
|
|
2
|
+
import { ReactAgent } from 'langchain';
|
|
3
|
+
/**
|
|
4
|
+
* Discover MCP servers and list tools formatted for the LangChain Orchestrator.
|
|
5
|
+
* Uses listToolServers to fetch server configs and getTools to enumerate tools.
|
|
6
|
+
*/
|
|
7
|
+
export declare class McpToolRegistrationService {
|
|
8
|
+
private configService;
|
|
9
|
+
/**
|
|
10
|
+
* Registers MCP tool servers and updates agent options with discovered tools and server configs.
|
|
11
|
+
* Call this to enable dynamic LangChain tool access based on the current MCP environment.
|
|
12
|
+
* @param agent The LangChain Agent instance to which MCP servers will be added.
|
|
13
|
+
* @param authorization Authorization object for token exchange.
|
|
14
|
+
* @param authHandlerName The name of the auth handler to use for token exchange.
|
|
15
|
+
* @param turnContext The TurnContext of the current request.
|
|
16
|
+
* @param authToken Optional bearer token for MCP server access.
|
|
17
|
+
* @returns The updated Agent instance with registered MCP servers.
|
|
18
|
+
*/
|
|
19
|
+
addToolServersToAgent(agent: ReactAgent, authorization: Authorization, authHandlerName: string, turnContext: TurnContext, authToken: string): Promise<ReactAgent>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=McpToolRegistrationService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpToolRegistrationService.d.ts","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,EAAe,UAAU,EAAE,MAAM,WAAW,CAAC;AAGpD;;;GAGG;AACH,qBAAa,0BAA0B;IACrC,OAAO,CAAC,aAAa,CAA+E;IAEpG;;;;;;;;;OASG;IACG,qBAAqB,CACzB,KAAK,EAAE,UAAU,EACjB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,UAAU,CAAC;CA+CvB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.McpToolRegistrationService = void 0;
|
|
6
|
+
// Microsoft Agent 365 SDK
|
|
7
|
+
const agents_a365_tooling_1 = require("@microsoft/agents-a365-tooling");
|
|
8
|
+
const agents_a365_runtime_1 = require("@microsoft/agents-a365-runtime");
|
|
9
|
+
// LangChain SDKs
|
|
10
|
+
const langchain_1 = require("langchain");
|
|
11
|
+
const mcp_adapters_1 = require("@langchain/mcp-adapters");
|
|
12
|
+
/**
|
|
13
|
+
* Discover MCP servers and list tools formatted for the LangChain Orchestrator.
|
|
14
|
+
* Uses listToolServers to fetch server configs and getTools to enumerate tools.
|
|
15
|
+
*/
|
|
16
|
+
class McpToolRegistrationService {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.configService = new agents_a365_tooling_1.McpToolServerConfigurationService();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Registers MCP tool servers and updates agent options with discovered tools and server configs.
|
|
22
|
+
* Call this to enable dynamic LangChain tool access based on the current MCP environment.
|
|
23
|
+
* @param agent The LangChain Agent instance to which MCP servers will be added.
|
|
24
|
+
* @param authorization Authorization object for token exchange.
|
|
25
|
+
* @param authHandlerName The name of the auth handler to use for token exchange.
|
|
26
|
+
* @param turnContext The TurnContext of the current request.
|
|
27
|
+
* @param authToken Optional bearer token for MCP server access.
|
|
28
|
+
* @returns The updated Agent instance with registered MCP servers.
|
|
29
|
+
*/
|
|
30
|
+
async addToolServersToAgent(agent, authorization, authHandlerName, turnContext, authToken) {
|
|
31
|
+
if (!agent) {
|
|
32
|
+
throw new Error('Langchain Agent is Required');
|
|
33
|
+
}
|
|
34
|
+
if (!authToken) {
|
|
35
|
+
authToken = await agents_a365_runtime_1.AgenticAuthenticationService.GetAgenticUserToken(authorization, authHandlerName, turnContext);
|
|
36
|
+
}
|
|
37
|
+
// Validate the authentication token
|
|
38
|
+
agents_a365_tooling_1.Utility.ValidateAuthToken(authToken);
|
|
39
|
+
const agenticAppId = agents_a365_runtime_1.Utility.ResolveAgentIdentity(turnContext, authToken);
|
|
40
|
+
const servers = await this.configService.listToolServers(agenticAppId, authToken);
|
|
41
|
+
const mcpServers = {};
|
|
42
|
+
for (const server of servers) {
|
|
43
|
+
// Compose headers if values are available
|
|
44
|
+
const headers = {};
|
|
45
|
+
if (authToken) {
|
|
46
|
+
headers['Authorization'] = `Bearer ${authToken}`;
|
|
47
|
+
}
|
|
48
|
+
// Create Connection instance for LangChain agents
|
|
49
|
+
mcpServers[server.mcpServerName] = {
|
|
50
|
+
type: 'http',
|
|
51
|
+
url: server.url,
|
|
52
|
+
headers: headers
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const mcpClientConfig = {};
|
|
56
|
+
mcpClientConfig.mcpServers = Object.assign(mcpClientConfig.mcpServers ?? {}, mcpServers);
|
|
57
|
+
const multiServerMcpClient = new mcp_adapters_1.MultiServerMCPClient(mcpClientConfig);
|
|
58
|
+
const mcpTools = await multiServerMcpClient.getTools();
|
|
59
|
+
// Merge existing agent tools with MCP tools
|
|
60
|
+
const existingTools = agent.options.tools ?? [];
|
|
61
|
+
const allTools = [...existingTools, ...mcpTools];
|
|
62
|
+
// Create the agent with existing options and combined tools
|
|
63
|
+
return (0, langchain_1.createAgent)({
|
|
64
|
+
...agent.options,
|
|
65
|
+
tools: allTools,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.McpToolRegistrationService = McpToolRegistrationService;
|
|
70
|
+
//# sourceMappingURL=McpToolRegistrationService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpToolRegistrationService.js","sourceRoot":"","sources":["../../src/McpToolRegistrationService.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0BAA0B;AAC1B,wEAA4F;AAC5F,wEAAyG;AAKzG,iBAAiB;AACjB,yCAAoD;AACpD,0DAAyF;AAEzF;;;GAGG;AACH,MAAa,0BAA0B;IAAvC;QACU,kBAAa,GAAuC,IAAI,uDAAiC,EAAE,CAAC;IAiEtG,CAAC;IA/DC;;;;;;;;;OASG;IACH,KAAK,CAAC,qBAAqB,CACzB,KAAiB,EACjB,aAA4B,EAC5B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AM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,QAAQ,GAAG,CAAC,GAAG,aAAa,EAAE,GAAG,QAAQ,CAAC,CAAC;QAEjD,4DAA4D;QAC5D,OAAO,IAAA,uBAAW,EAAC;YACjB,GAAG,KAAK,CAAC,OAAO;YAChB,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;IACL,CAAC;CACF;AAlED,gEAkEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./McpToolRegistrationService"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C"}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@microsoft/agents-a365-tooling-extensions-langchain",
|
|
3
|
+
"version": "0.1.0-preview.30",
|
|
4
|
+
"description": "Agent 365 Tooling SDK for LangChain 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
|
+
"langchain"
|
|
28
|
+
],
|
|
29
|
+
"author": "Microsoft Corporation",
|
|
30
|
+
"license": "See license file",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/microsoft/Agent365-nodejs.git",
|
|
34
|
+
"directory": "packages/agents-a365-tooling-extensions-langchain"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@microsoft/agents-a365-tooling": "0.1.0-preview.30",
|
|
38
|
+
"@microsoft/agents-a365-runtime": "0.1.0-preview.30",
|
|
39
|
+
"@microsoft/agents-hosting": "*",
|
|
40
|
+
"langchain": "*",
|
|
41
|
+
"@langchain/mcp-adapters": "*"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/jest": "^29.5.14",
|
|
45
|
+
"@types/node": "^20.0.0",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
47
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
48
|
+
"eslint": "^8.0.0",
|
|
49
|
+
"jest": "^29.0.0",
|
|
50
|
+
"rimraf": "^5.0.0",
|
|
51
|
+
"ts-jest": "^29.0.0",
|
|
52
|
+
"typescript": "^5.0.0"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=18.0.0"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"dist/**/*",
|
|
59
|
+
"README.md",
|
|
60
|
+
"CHANGELOG.md"
|
|
61
|
+
]
|
|
62
|
+
}
|