@olane/o-tool-registry 0.1.0 → 0.1.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/apple/apple.tool.d.ts +16 -16
- package/dist/apple/apple.tool.d.ts.map +1 -1
- package/dist/apple/apple.tool.js +8 -5
- package/dist/apple/index.d.ts +1 -0
- package/dist/apple/index.js +2 -1
- package/dist/apple/notes.tool.d.ts +16 -16
- package/dist/apple/notes.tool.d.ts.map +1 -1
- package/dist/apple/notes.tool.js +36 -9
- package/dist/auth/index.js +19 -4
- package/dist/auth/interfaces/index.js +19 -4
- package/dist/auth/interfaces/oAuth-tokens.interface.js +2 -2
- package/dist/auth/interfaces/oAuth-user-info.interface.js +2 -2
- package/dist/auth/interfaces/oAuth.config.js +2 -2
- package/dist/auth/methods/auth.methods.js +4 -2
- package/dist/auth/oAuth.tool.js +23 -10
- package/dist/embeddings/embeddings.tool.d.ts +16 -16
- package/dist/embeddings/embeddings.tool.d.ts.map +1 -1
- package/dist/embeddings/embeddings.tool.js +8 -5
- package/dist/embeddings/huggingface-text-embeddings.tool.d.ts.map +1 -1
- package/dist/embeddings/huggingface-text-embeddings.tool.js +9 -6
- package/dist/embeddings/index.js +19 -4
- package/dist/embeddings/methods/text-embeddings.method.js +4 -2
- package/dist/embeddings/text-embeddings.tool.d.ts +16 -16
- package/dist/embeddings/text-embeddings.tool.d.ts.map +1 -1
- package/dist/embeddings/text-embeddings.tool.js +10 -7
- package/dist/index.js +22 -7
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +15 -12
- package/dist/intelligence/anthropic-intelligence.tool.d.ts +46 -16
- package/dist/intelligence/anthropic-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/anthropic-intelligence.tool.js +45 -11
- package/dist/intelligence/gemini-intelligence.tool.d.ts +31 -16
- package/dist/intelligence/gemini-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/gemini-intelligence.tool.js +31 -11
- package/dist/intelligence/index.js +21 -6
- package/dist/intelligence/intelligence.tool.d.ts +16 -16
- package/dist/intelligence/intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/intelligence.tool.js +26 -18
- package/dist/intelligence/methods/intelligence.methods.js +4 -2
- package/dist/intelligence/ollama-intelligence.tool.d.ts +37 -16
- package/dist/intelligence/ollama-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/ollama-intelligence.tool.js +39 -11
- package/dist/intelligence/openai-intelligence.tool.d.ts +31 -16
- package/dist/intelligence/openai-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/openai-intelligence.tool.js +32 -11
- package/dist/intelligence/perplexity-intelligence.tool.d.ts +31 -16
- package/dist/intelligence/perplexity-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/perplexity-intelligence.tool.js +33 -11
- package/dist/mcp/index.js +18 -3
- package/dist/mcp/mcp-bridge.tool.d.ts +16 -16
- package/dist/mcp/mcp-bridge.tool.d.ts.map +1 -1
- package/dist/mcp/mcp-bridge.tool.js +36 -19
- package/dist/mcp/mcp.tool.d.ts +14 -14
- package/dist/mcp/mcp.tool.d.ts.map +1 -1
- package/dist/mcp/mcp.tool.js +15 -7
- package/dist/mcp/methods/mcp-bridge.methods.js +4 -2
- package/dist/nlp/index.js +17 -2
- package/dist/nlp/methods/nlp.methods.js +4 -2
- package/dist/nlp/ner.tool.d.ts +16 -16
- package/dist/nlp/ner.tool.d.ts.map +1 -1
- package/dist/nlp/ner.tool.js +11 -8
- package/dist/vector-store/index.js +18 -3
- package/dist/vector-store/langchain-memory.vector-store.tool.d.ts.map +1 -1
- package/dist/vector-store/langchain-memory.vector-store.tool.js +13 -10
- package/dist/vector-store/methods/vector-store.methods.js +4 -2
- package/dist/vector-store/vector-memory.tool.d.ts +16 -16
- package/dist/vector-store/vector-memory.tool.d.ts.map +1 -1
- package/dist/vector-store/vector-memory.tool.js +10 -7
- package/package.json +14 -21
- package/dist/apple/apple.tool.js.map +0 -1
- package/dist/apple/index.js.map +0 -1
- package/dist/apple/notes.tool.js.map +0 -1
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/interfaces/index.js.map +0 -1
- package/dist/auth/interfaces/oAuth-tokens.interface.js.map +0 -1
- package/dist/auth/interfaces/oAuth-user-info.interface.js.map +0 -1
- package/dist/auth/interfaces/oAuth.config.js.map +0 -1
- package/dist/auth/methods/auth.methods.js.map +0 -1
- package/dist/auth/oAuth.tool.js.map +0 -1
- package/dist/embeddings/embeddings.tool.js.map +0 -1
- package/dist/embeddings/huggingface-text-embeddings.tool.js.map +0 -1
- package/dist/embeddings/index.js.map +0 -1
- package/dist/embeddings/methods/text-embeddings.method.js.map +0 -1
- package/dist/embeddings/text-embeddings.tool.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/init.js.map +0 -1
- package/dist/intelligence/anthropic-intelligence.tool.js.map +0 -1
- package/dist/intelligence/gemini-intelligence.tool.js.map +0 -1
- package/dist/intelligence/index.js.map +0 -1
- package/dist/intelligence/intelligence.tool.js.map +0 -1
- package/dist/intelligence/methods/intelligence.methods.js.map +0 -1
- package/dist/intelligence/ollama-intelligence.tool.js.map +0 -1
- package/dist/intelligence/openai-intelligence.tool.js.map +0 -1
- package/dist/intelligence/perplexity-intelligence.tool.js.map +0 -1
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/mcp-bridge.tool.js.map +0 -1
- package/dist/mcp/mcp.tool.js.map +0 -1
- package/dist/mcp/methods/mcp-bridge.methods.js.map +0 -1
- package/dist/nlp/index.js.map +0 -1
- package/dist/nlp/methods/nlp.methods.js.map +0 -1
- package/dist/nlp/ner.tool.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/vector-store/index.js.map +0 -1
- package/dist/vector-store/langchain-memory.vector-store.tool.js.map +0 -1
- package/dist/vector-store/methods/vector-store.methods.js.map +0 -1
- package/dist/vector-store/vector-memory.tool.js.map +0 -1
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.McpBridgeTool = void 0;
|
|
4
|
+
const o_tool_1 = require("@olane/o-tool");
|
|
5
|
+
const o_core_1 = require("@olane/o-core");
|
|
6
|
+
const index_js_1 = require("@modelcontextprotocol/sdk/client/index.js");
|
|
7
|
+
const streamableHttp_js_1 = require("@modelcontextprotocol/sdk/client/streamableHttp.js");
|
|
8
|
+
const mcp_tool_1 = require("./mcp.tool");
|
|
9
|
+
const mcp_bridge_methods_1 = require("./methods/mcp-bridge.methods");
|
|
10
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/client/stdio.js");
|
|
11
|
+
class McpBridgeTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
9
12
|
constructor(config) {
|
|
10
13
|
super({
|
|
11
14
|
...config,
|
|
12
|
-
address: new oAddress('o://mcp'),
|
|
15
|
+
address: new o_core_1.oAddress('o://mcp'),
|
|
13
16
|
description: 'Tool to help add MCP servers to the network',
|
|
14
|
-
methods: MCP_BRIDGE_METHODS,
|
|
17
|
+
methods: mcp_bridge_methods_1.MCP_BRIDGE_METHODS,
|
|
15
18
|
});
|
|
16
19
|
}
|
|
17
20
|
async _tool_add_remote_server(request) {
|
|
18
21
|
const params = request.params;
|
|
22
|
+
// params have already been validated
|
|
19
23
|
const { mcpServerUrl } = params;
|
|
20
24
|
try {
|
|
21
25
|
this.logger.debug('Adding MCP server: ' + mcpServerUrl);
|
|
22
|
-
const transport = new StreamableHTTPClientTransport(new URL(mcpServerUrl));
|
|
23
|
-
const mcpClient = new Client({
|
|
26
|
+
const transport = new streamableHttp_js_1.StreamableHTTPClientTransport(new URL(mcpServerUrl));
|
|
27
|
+
const mcpClient = new index_js_1.Client({
|
|
24
28
|
name: 'o-node:mcp:' + this.peerId.toString(),
|
|
25
29
|
version: '1.0.0',
|
|
26
30
|
});
|
|
@@ -41,17 +45,28 @@ export class McpBridgeTool extends oTool(oVirtualNode) {
|
|
|
41
45
|
}
|
|
42
46
|
async _tool_add_remote_server_with_api_key(request) {
|
|
43
47
|
const params = request.params;
|
|
48
|
+
// params have already been validated
|
|
44
49
|
const { mcpServerUrl, apiKey } = params;
|
|
45
50
|
try {
|
|
51
|
+
// let apiKey = apiKeyInput as string;
|
|
52
|
+
// if (apiKey.indexOf('o://') > -1) {
|
|
53
|
+
// const {
|
|
54
|
+
// result: { data },
|
|
55
|
+
// }: any = await this.use(new oAddress('o://vault'), {
|
|
56
|
+
// method: 'get',
|
|
57
|
+
// params: { key: apiKeyInput },
|
|
58
|
+
// });
|
|
59
|
+
// apiKey = data.value;
|
|
60
|
+
// }
|
|
46
61
|
this.logger.debug('Adding API keyed MCP server: ' + mcpServerUrl, apiKey);
|
|
47
|
-
const transport = new StreamableHTTPClientTransport(new URL(mcpServerUrl), {
|
|
62
|
+
const transport = new streamableHttp_js_1.StreamableHTTPClientTransport(new URL(mcpServerUrl), {
|
|
48
63
|
requestInit: {
|
|
49
64
|
headers: {
|
|
50
65
|
Authorization: `Bearer ${apiKey}`,
|
|
51
66
|
},
|
|
52
67
|
},
|
|
53
68
|
});
|
|
54
|
-
const mcpClient = new Client({
|
|
69
|
+
const mcpClient = new index_js_1.Client({
|
|
55
70
|
name: 'o-node:mcp:' + this.peerId.toString(),
|
|
56
71
|
version: '1.0.0',
|
|
57
72
|
});
|
|
@@ -74,12 +89,14 @@ export class McpBridgeTool extends oTool(oVirtualNode) {
|
|
|
74
89
|
async _tool_add_local_server(request) {
|
|
75
90
|
const params = request.params;
|
|
76
91
|
this.logger.debug('Adding local MCP server: ', params);
|
|
92
|
+
// params have already been validated
|
|
77
93
|
const { command, args, name } = params;
|
|
78
|
-
|
|
94
|
+
// this.logger.debug('Adding local MCP server: ' + mcpServerUrl);
|
|
95
|
+
const transport = new stdio_js_1.StdioClientTransport({
|
|
79
96
|
command: command,
|
|
80
97
|
args: args,
|
|
81
98
|
});
|
|
82
|
-
const mcpClient = new Client({
|
|
99
|
+
const mcpClient = new index_js_1.Client({
|
|
83
100
|
name: 'o-node:mcp:' + this.peerId.toString(),
|
|
84
101
|
version: '1.0.0',
|
|
85
102
|
});
|
|
@@ -92,10 +109,10 @@ export class McpBridgeTool extends oTool(oVirtualNode) {
|
|
|
92
109
|
}
|
|
93
110
|
async createMcpTool(mcpClient, url, name) {
|
|
94
111
|
this.logger.debug('Creating MCP tool: ', name, url);
|
|
95
|
-
const mcpTool = new McpTool({
|
|
112
|
+
const mcpTool = new mcp_tool_1.McpTool({
|
|
96
113
|
name: name || 'mcp-' + Date.now(),
|
|
97
114
|
description: 'MCP server for ' + url,
|
|
98
|
-
address: new oAddress(`o://${name || `mcp-${Date.now()}`}`),
|
|
115
|
+
address: new o_core_1.oAddress(`o://${name || `mcp-${Date.now()}`}`),
|
|
99
116
|
mcpClient: mcpClient,
|
|
100
117
|
dependencies: [],
|
|
101
118
|
leader: this.config.leader,
|
|
@@ -112,4 +129,4 @@ export class McpBridgeTool extends oTool(oVirtualNode) {
|
|
|
112
129
|
return mcpTool;
|
|
113
130
|
}
|
|
114
131
|
}
|
|
115
|
-
|
|
132
|
+
exports.McpBridgeTool = McpBridgeTool;
|
package/dist/mcp/mcp.tool.d.ts
CHANGED
|
@@ -8,13 +8,13 @@ declare const McpTool_base: (new (...args: any[]) => {
|
|
|
8
8
|
initialize(): Promise<void>;
|
|
9
9
|
use(address: oAddress, data: {
|
|
10
10
|
[key: string]: unknown;
|
|
11
|
-
}, config?: import("@olane/o-core").UseOptions): Promise<import("@olane/o-core").oResponse>;
|
|
12
|
-
handleStream(streamData: import("@
|
|
13
|
-
execute(req: oRequest, stream?: import("@
|
|
14
|
-
run(request: oRequest, stream?: import("@
|
|
11
|
+
}, config?: import("@olane/o-core").UseOptions | undefined): Promise<import("@olane/o-core").oResponse>;
|
|
12
|
+
handleStream(streamData: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).IncomingStreamData): Promise<void>;
|
|
13
|
+
execute(req: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").RunResult>;
|
|
14
|
+
run(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").RunResult>;
|
|
15
15
|
myTools(): string[];
|
|
16
16
|
myToolParams(tool: string): Record<string, any>;
|
|
17
|
-
callMyTool(request: oRequest, stream?: import("@
|
|
17
|
+
callMyTool(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").ToolResult>;
|
|
18
18
|
index(): Promise<{
|
|
19
19
|
provider: string;
|
|
20
20
|
summary: string;
|
|
@@ -29,16 +29,16 @@ declare const McpTool_base: (new (...args: any[]) => {
|
|
|
29
29
|
}>;
|
|
30
30
|
findMissingParams(methodName: string, params: any): oParameter[];
|
|
31
31
|
readonly config: import("@olane/o-core").CoreConfig;
|
|
32
|
-
p2pNode: import("@
|
|
32
|
+
p2pNode: import("libp2p", { with: { "resolution-mode": "import" } }).Libp2p<import("@libp2p/interface", { with: { "resolution-mode": "import" } }).ServiceMap>;
|
|
33
33
|
logger: import("@olane/o-core").Logger;
|
|
34
|
-
networkConfig: import("@olane/o-config
|
|
34
|
+
networkConfig: import("@olane/o-config").Libp2pConfig;
|
|
35
35
|
address: oAddress;
|
|
36
36
|
readonly staticAddress: oAddress;
|
|
37
|
-
peerId: import("@
|
|
37
|
+
peerId: import("@libp2p/interface-peer-id", { with: { "resolution-mode": "import" } }).PeerId;
|
|
38
38
|
state: import("@olane/o-core").NodeState;
|
|
39
39
|
errors: Error[];
|
|
40
40
|
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
41
|
-
leaders: import("@
|
|
41
|
+
leaders: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
42
42
|
addressResolution: import("@olane/o-core").oAddressResolution;
|
|
43
43
|
readonly description: string;
|
|
44
44
|
dependencies: oDependency[];
|
|
@@ -47,11 +47,11 @@ declare const McpTool_base: (new (...args: any[]) => {
|
|
|
47
47
|
};
|
|
48
48
|
successCount: number;
|
|
49
49
|
errorCount: number;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
getTransports(address: oAddress): import("@
|
|
50
|
+
readonly type: import("@olane/o-core").NodeType;
|
|
51
|
+
readonly transports: string[];
|
|
52
|
+
readonly parent: oAddress | null;
|
|
53
|
+
readonly parentTransports: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
54
|
+
getTransports(address: oAddress): import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
55
55
|
handleStaticAddressTranslation(addressInput: oAddress): Promise<oAddress>;
|
|
56
56
|
translateAddress(addressWithLeaderTransports: oAddress): Promise<{
|
|
57
57
|
nextHopAddress: oAddress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.tool.d.ts","sourceRoot":"","sources":["../../src/mcp/mcp.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC
|
|
1
|
+
{"version":3,"file":"mcp.tool.d.ts","sourceRoot":"","sources":["../../src/mcp/mcp.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGnE,qBAAa,OAAQ,SAAQ,YAAmB;IAC9C,OAAO,CAAC,SAAS,CAAS;gBAEd,MAAM,EAAE,WAAW,GAAG;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAepE,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2B5C,KAAK;;;;;;;IA2BL,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC;CAe7B"}
|
package/dist/mcp/mcp.tool.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.McpTool = void 0;
|
|
4
|
+
const o_tool_1 = require("@olane/o-tool");
|
|
5
|
+
const o_core_1 = require("@olane/o-core");
|
|
6
|
+
const uuid_1 = require("uuid");
|
|
7
|
+
class McpTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
5
8
|
mcpClient;
|
|
6
9
|
constructor(config) {
|
|
7
10
|
super({
|
|
@@ -15,6 +18,7 @@ export class McpTool extends oTool(oVirtualNode) {
|
|
|
15
18
|
this.logger.error('Error setting up MCP tools: ', err);
|
|
16
19
|
});
|
|
17
20
|
}
|
|
21
|
+
// _tool_ functions are dynamically added to the tool based on the MCP server's methods
|
|
18
22
|
async setupTools(mcpClient) {
|
|
19
23
|
this.logger.debug('Setting up MCP tools');
|
|
20
24
|
const tools = await mcpClient.listTools();
|
|
@@ -27,6 +31,7 @@ export class McpTool extends oTool(oVirtualNode) {
|
|
|
27
31
|
parameters: tool.inputSchema,
|
|
28
32
|
dependencies: [],
|
|
29
33
|
};
|
|
34
|
+
// @ts-ignore
|
|
30
35
|
this[`_tool_${tool.name}`] = async (request) => {
|
|
31
36
|
this.logger.debug('Calling MCP tool: ' + tool.name, request);
|
|
32
37
|
const params = request.params;
|
|
@@ -39,11 +44,13 @@ export class McpTool extends oTool(oVirtualNode) {
|
|
|
39
44
|
});
|
|
40
45
|
await this.startChildren();
|
|
41
46
|
}
|
|
47
|
+
// let's customize the index functionality to ensure we capture MCP insights
|
|
42
48
|
async index() {
|
|
43
49
|
const result = await super.index();
|
|
50
|
+
// add each mcp tool to the vector store
|
|
44
51
|
const tools = await this.mcpClient.listTools();
|
|
45
52
|
await Promise.all(tools.tools.map((tool) => {
|
|
46
|
-
return this.use(new oAddress('o://vector-store'), {
|
|
53
|
+
return this.use(new o_core_1.oAddress('o://vector-store'), {
|
|
47
54
|
method: 'add_documents',
|
|
48
55
|
params: {
|
|
49
56
|
documents: [
|
|
@@ -51,7 +58,7 @@ export class McpTool extends oTool(oVirtualNode) {
|
|
|
51
58
|
pageContent: tool.description,
|
|
52
59
|
metadata: {
|
|
53
60
|
address: this.address?.toString() + '/' + tool.name,
|
|
54
|
-
id:
|
|
61
|
+
id: (0, uuid_1.v4)(),
|
|
55
62
|
},
|
|
56
63
|
},
|
|
57
64
|
],
|
|
@@ -63,6 +70,7 @@ export class McpTool extends oTool(oVirtualNode) {
|
|
|
63
70
|
return result;
|
|
64
71
|
}
|
|
65
72
|
async whoami() {
|
|
73
|
+
// do nothing
|
|
66
74
|
const tools = await this.mcpClient.listTools();
|
|
67
75
|
console.log('mcp+tools: ', tools);
|
|
68
76
|
return {
|
|
@@ -77,4 +85,4 @@ export class McpTool extends oTool(oVirtualNode) {
|
|
|
77
85
|
};
|
|
78
86
|
}
|
|
79
87
|
}
|
|
80
|
-
|
|
88
|
+
exports.McpTool = McpTool;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MCP_BRIDGE_METHODS = void 0;
|
|
4
|
+
exports.MCP_BRIDGE_METHODS = {
|
|
2
5
|
add_remote_server_with_api_key: {
|
|
3
6
|
name: 'add_remote_server_with_api_key',
|
|
4
7
|
description: 'Add a MCP server that requires an API key to the bridge',
|
|
@@ -49,4 +52,3 @@ export const MCP_BRIDGE_METHODS = {
|
|
|
49
52
|
],
|
|
50
53
|
},
|
|
51
54
|
};
|
|
52
|
-
//# sourceMappingURL=mcp-bridge.methods.js.map
|
package/dist/nlp/index.js
CHANGED
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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("./ner.tool"), exports);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NLP_PARAMS = void 0;
|
|
4
|
+
exports.NLP_PARAMS = {
|
|
2
5
|
extract: {
|
|
3
6
|
name: 'extract',
|
|
4
7
|
description: 'Extract',
|
|
@@ -13,4 +16,3 @@ export const NLP_PARAMS = {
|
|
|
13
16
|
],
|
|
14
17
|
},
|
|
15
18
|
};
|
|
16
|
-
//# sourceMappingURL=nlp.methods.js.map
|
package/dist/nlp/ner.tool.d.ts
CHANGED
|
@@ -6,13 +6,13 @@ declare const NERTool_base: (new (...args: any[]) => {
|
|
|
6
6
|
initialize(): Promise<void>;
|
|
7
7
|
use(address: oAddress, data: {
|
|
8
8
|
[key: string]: unknown;
|
|
9
|
-
}, config?: import("@olane/o-core").UseOptions): Promise<import("@olane/o-core").oResponse>;
|
|
10
|
-
handleStream(streamData: import("@
|
|
11
|
-
execute(req: oRequest, stream?: import("@
|
|
12
|
-
run(request: oRequest, stream?: import("@
|
|
9
|
+
}, config?: import("@olane/o-core").UseOptions | undefined): Promise<import("@olane/o-core").oResponse>;
|
|
10
|
+
handleStream(streamData: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).IncomingStreamData): Promise<void>;
|
|
11
|
+
execute(req: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").RunResult>;
|
|
12
|
+
run(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").RunResult>;
|
|
13
13
|
myTools(): string[];
|
|
14
14
|
myToolParams(tool: string): Record<string, any>;
|
|
15
|
-
callMyTool(request: oRequest, stream?: import("@
|
|
15
|
+
callMyTool(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<ToolResult>;
|
|
16
16
|
index(): Promise<{
|
|
17
17
|
provider: string;
|
|
18
18
|
summary: string;
|
|
@@ -25,31 +25,31 @@ declare const NERTool_base: (new (...args: any[]) => {
|
|
|
25
25
|
tools: string[];
|
|
26
26
|
description: string;
|
|
27
27
|
}>;
|
|
28
|
-
findMissingParams(methodName: string, params: any): import("@olane/o-protocol
|
|
28
|
+
findMissingParams(methodName: string, params: any): import("@olane/o-protocol").oParameter[];
|
|
29
29
|
readonly config: import("@olane/o-core").CoreConfig;
|
|
30
|
-
p2pNode: import("@
|
|
30
|
+
p2pNode: import("libp2p", { with: { "resolution-mode": "import" } }).Libp2p<import("@libp2p/interface", { with: { "resolution-mode": "import" } }).ServiceMap>;
|
|
31
31
|
logger: import("@olane/o-core").Logger;
|
|
32
|
-
networkConfig: import("@olane/o-config
|
|
32
|
+
networkConfig: import("@olane/o-config").Libp2pConfig;
|
|
33
33
|
address: oAddress;
|
|
34
34
|
readonly staticAddress: oAddress;
|
|
35
|
-
peerId: import("@
|
|
35
|
+
peerId: import("@libp2p/interface-peer-id", { with: { "resolution-mode": "import" } }).PeerId;
|
|
36
36
|
state: import("@olane/o-core").NodeState;
|
|
37
37
|
errors: Error[];
|
|
38
38
|
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
39
|
-
leaders: import("@
|
|
39
|
+
leaders: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
40
40
|
addressResolution: import("@olane/o-core").oAddressResolution;
|
|
41
41
|
readonly description: string;
|
|
42
42
|
dependencies: import("@olane/o-core").oDependency[];
|
|
43
43
|
methods: {
|
|
44
|
-
[key: string]: import("@olane/o-protocol
|
|
44
|
+
[key: string]: import("@olane/o-protocol").oMethod;
|
|
45
45
|
};
|
|
46
46
|
successCount: number;
|
|
47
47
|
errorCount: number;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
getTransports(address: oAddress): import("@
|
|
48
|
+
readonly type: import("@olane/o-core").NodeType;
|
|
49
|
+
readonly transports: string[];
|
|
50
|
+
readonly parent: oAddress | null;
|
|
51
|
+
readonly parentTransports: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
52
|
+
getTransports(address: oAddress): import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
53
53
|
handleStaticAddressTranslation(addressInput: oAddress): Promise<oAddress>;
|
|
54
54
|
translateAddress(addressWithLeaderTransports: oAddress): Promise<{
|
|
55
55
|
nextHopAddress: oAddress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ner.tool.d.ts","sourceRoot":"","sources":["../../src/nlp/ner.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC
|
|
1
|
+
{"version":3,"file":"ner.tool.d.ts","sourceRoot":"","sources":["../../src/nlp/ner.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGjE,qBAAa,OAAQ,SAAQ,YAAmB;gBAClC,MAAM,EAAE,WAAW;IASzB,aAAa,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAa5D"}
|
package/dist/nlp/ner.tool.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NERTool = void 0;
|
|
4
|
+
const o_tool_1 = require("@olane/o-tool");
|
|
5
|
+
const o_core_1 = require("@olane/o-core");
|
|
6
|
+
const nlp_methods_1 = require("./methods/nlp.methods");
|
|
7
|
+
class NERTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
5
8
|
constructor(config) {
|
|
6
9
|
super({
|
|
7
10
|
...config,
|
|
8
|
-
address: new oAddress('o://ner'),
|
|
9
|
-
methods: NLP_PARAMS,
|
|
11
|
+
address: new o_core_1.oAddress('o://ner'),
|
|
12
|
+
methods: nlp_methods_1.NLP_PARAMS,
|
|
10
13
|
description: 'Tool to extract named entities from text',
|
|
11
14
|
});
|
|
12
15
|
}
|
|
@@ -14,7 +17,7 @@ export class NERTool extends oTool(oVirtualNode) {
|
|
|
14
17
|
const params = request.params;
|
|
15
18
|
const { text } = params;
|
|
16
19
|
this.logger.debug('Extracting entities from text', text);
|
|
17
|
-
const response = await this.use(new oAddress('o://intelligence'), {
|
|
20
|
+
const response = await this.use(new o_core_1.oAddress('o://intelligence'), {
|
|
18
21
|
method: 'prompt',
|
|
19
22
|
params: {
|
|
20
23
|
prompt: `Extract named entities and their metadata from the following text: ${text}`,
|
|
@@ -23,4 +26,4 @@ export class NERTool extends oTool(oVirtualNode) {
|
|
|
23
26
|
return response.result;
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
|
-
|
|
29
|
+
exports.NERTool = NERTool;
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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("./langchain-memory.vector-store.tool"), exports);
|
|
18
|
+
__exportStar(require("./vector-memory.tool"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"langchain-memory.vector-store.tool.d.ts","sourceRoot":"","sources":["../../src/vector-store/langchain-memory.vector-store.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAI/D,qBAAa,8BAA+B,SAAQ,uBAAuB;IACzE,OAAO,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"langchain-memory.vector-store.tool.d.ts","sourceRoot":"","sources":["../../src/vector-store/langchain-memory.vector-store.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAI/D,qBAAa,8BAA+B,SAAQ,uBAAuB;IACzE,OAAO,CAAC,WAAW,CAAqB;gBAE5B,MAAM,EAAE,WAAW;IAM/B,OAAO,CAAC,cAAc;IAoChB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,mBAAmB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAOpD,sBAAsB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAIvD,sBAAsB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAIvD,oBAAoB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;CAQ5D"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LangchainMemoryVectorStoreTool = void 0;
|
|
4
|
+
const memory_1 = require("langchain/vectorstores/memory");
|
|
5
|
+
const o_core_1 = require("@olane/o-core");
|
|
6
|
+
const vector_memory_tool_1 = require("./vector-memory.tool");
|
|
7
|
+
const documents_1 = require("@langchain/core/documents");
|
|
8
|
+
class LangchainMemoryVectorStoreTool extends vector_memory_tool_1.VectorMemoryStorageTool {
|
|
6
9
|
vectorStore;
|
|
7
10
|
constructor(config) {
|
|
8
11
|
super({
|
|
@@ -12,7 +15,7 @@ export class LangchainMemoryVectorStoreTool extends VectorMemoryStorageTool {
|
|
|
12
15
|
embeddingsTool() {
|
|
13
16
|
return {
|
|
14
17
|
embedDocuments: async (documents) => {
|
|
15
|
-
const response = await this.use(new oAddress('o://embeddings-text'), {
|
|
18
|
+
const response = await this.use(new o_core_1.oAddress('o://embeddings-text'), {
|
|
16
19
|
method: 'embed_documents',
|
|
17
20
|
params: {
|
|
18
21
|
documents,
|
|
@@ -24,7 +27,7 @@ export class LangchainMemoryVectorStoreTool extends VectorMemoryStorageTool {
|
|
|
24
27
|
},
|
|
25
28
|
embedQuery: async (document) => {
|
|
26
29
|
console.log('Embedding query: ', document);
|
|
27
|
-
const response = await this.use(new oAddress('o://embeddings-text'), {
|
|
30
|
+
const response = await this.use(new o_core_1.oAddress('o://embeddings-text'), {
|
|
28
31
|
method: 'embed_query',
|
|
29
32
|
params: {
|
|
30
33
|
query: document,
|
|
@@ -38,11 +41,11 @@ export class LangchainMemoryVectorStoreTool extends VectorMemoryStorageTool {
|
|
|
38
41
|
}
|
|
39
42
|
async initialize() {
|
|
40
43
|
await super.initialize();
|
|
41
|
-
this.vectorStore = new MemoryVectorStore(this.embeddingsTool());
|
|
44
|
+
this.vectorStore = new memory_1.MemoryVectorStore(this.embeddingsTool());
|
|
42
45
|
}
|
|
43
46
|
async _tool_add_documents(request) {
|
|
44
47
|
const { documents } = request.params;
|
|
45
|
-
const docs = documents.map((doc) => new Document(doc));
|
|
48
|
+
const docs = documents.map((doc) => new documents_1.Document(doc));
|
|
46
49
|
const result = await this.vectorStore.addDocuments(docs);
|
|
47
50
|
return result;
|
|
48
51
|
}
|
|
@@ -61,4 +64,4 @@ export class LangchainMemoryVectorStoreTool extends VectorMemoryStorageTool {
|
|
|
61
64
|
return results;
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
|
-
|
|
67
|
+
exports.LangchainMemoryVectorStoreTool = LangchainMemoryVectorStoreTool;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VECTOR_STORE_PARAMS = void 0;
|
|
4
|
+
exports.VECTOR_STORE_PARAMS = {
|
|
2
5
|
add_documents: {
|
|
3
6
|
name: 'add_documents',
|
|
4
7
|
description: 'Add documents to the store',
|
|
@@ -58,4 +61,3 @@ export const VECTOR_STORE_PARAMS = {
|
|
|
58
61
|
],
|
|
59
62
|
},
|
|
60
63
|
};
|
|
61
|
-
//# sourceMappingURL=vector-store.methods.js.map
|
|
@@ -7,13 +7,13 @@ declare const VectorMemoryStorageTool_base: (new (...args: any[]) => {
|
|
|
7
7
|
initialize(): Promise<void>;
|
|
8
8
|
use(address: oAddress, data: {
|
|
9
9
|
[key: string]: unknown;
|
|
10
|
-
}, config?: import("@olane/o-core").UseOptions): Promise<import("@olane/o-core").oResponse>;
|
|
11
|
-
handleStream(streamData: import("@
|
|
12
|
-
execute(req: oRequest, stream?: import("@
|
|
13
|
-
run(request: oRequest, stream?: import("@
|
|
10
|
+
}, config?: import("@olane/o-core").UseOptions | undefined): Promise<import("@olane/o-core").oResponse>;
|
|
11
|
+
handleStream(streamData: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).IncomingStreamData): Promise<void>;
|
|
12
|
+
execute(req: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").RunResult>;
|
|
13
|
+
run(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").RunResult>;
|
|
14
14
|
myTools(): string[];
|
|
15
15
|
myToolParams(tool: string): Record<string, any>;
|
|
16
|
-
callMyTool(request: oRequest, stream?: import("@
|
|
16
|
+
callMyTool(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<ToolResult>;
|
|
17
17
|
index(): Promise<{
|
|
18
18
|
provider: string;
|
|
19
19
|
summary: string;
|
|
@@ -26,31 +26,31 @@ declare const VectorMemoryStorageTool_base: (new (...args: any[]) => {
|
|
|
26
26
|
tools: string[];
|
|
27
27
|
description: string;
|
|
28
28
|
}>;
|
|
29
|
-
findMissingParams(methodName: string, params: any): import("@olane/o-protocol
|
|
29
|
+
findMissingParams(methodName: string, params: any): import("@olane/o-protocol").oParameter[];
|
|
30
30
|
readonly config: import("@olane/o-core").CoreConfig;
|
|
31
|
-
p2pNode: import("@
|
|
31
|
+
p2pNode: import("libp2p", { with: { "resolution-mode": "import" } }).Libp2p<import("@libp2p/interface", { with: { "resolution-mode": "import" } }).ServiceMap>;
|
|
32
32
|
logger: import("@olane/o-core").Logger;
|
|
33
|
-
networkConfig: import("@olane/o-config
|
|
33
|
+
networkConfig: import("@olane/o-config").Libp2pConfig;
|
|
34
34
|
address: oAddress;
|
|
35
35
|
readonly staticAddress: oAddress;
|
|
36
|
-
peerId: import("@
|
|
36
|
+
peerId: import("@libp2p/interface-peer-id", { with: { "resolution-mode": "import" } }).PeerId;
|
|
37
37
|
state: import("@olane/o-core").NodeState;
|
|
38
38
|
errors: Error[];
|
|
39
39
|
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
40
|
-
leaders: import("@
|
|
40
|
+
leaders: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
41
41
|
addressResolution: import("@olane/o-core").oAddressResolution;
|
|
42
42
|
readonly description: string;
|
|
43
43
|
dependencies: import("@olane/o-core").oDependency[];
|
|
44
44
|
methods: {
|
|
45
|
-
[key: string]: import("@olane/o-protocol
|
|
45
|
+
[key: string]: import("@olane/o-protocol").oMethod;
|
|
46
46
|
};
|
|
47
47
|
successCount: number;
|
|
48
48
|
errorCount: number;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
getTransports(address: oAddress): import("@
|
|
49
|
+
readonly type: import("@olane/o-core").NodeType;
|
|
50
|
+
readonly transports: string[];
|
|
51
|
+
readonly parent: oAddress | null;
|
|
52
|
+
readonly parentTransports: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
53
|
+
getTransports(address: oAddress): import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
54
54
|
handleStaticAddressTranslation(addressInput: oAddress): Promise<oAddress>;
|
|
55
55
|
translateAddress(addressWithLeaderTransports: oAddress): Promise<{
|
|
56
56
|
nextHopAddress: oAddress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector-memory.tool.d.ts","sourceRoot":"","sources":["../../src/vector-store/vector-memory.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC
|
|
1
|
+
{"version":3,"file":"vector-memory.tool.d.ts","sourceRoot":"","sources":["../../src/vector-store/vector-memory.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAG5C,8BAAsB,uBAAwB,SAAQ,4BAAmB;gBAC3D,MAAM,EAAE,WAAW;IAS/B,QAAQ,CAAC,oBAAoB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IACrE,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IACpE,QAAQ,CAAC,sBAAsB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IACvE,QAAQ,CAAC,sBAAsB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CACxE"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VectorMemoryStorageTool = void 0;
|
|
4
|
+
const o_tool_1 = require("@olane/o-tool");
|
|
5
|
+
const o_core_1 = require("@olane/o-core");
|
|
6
|
+
const vector_store_methods_1 = require("./methods/vector-store.methods");
|
|
7
|
+
class VectorMemoryStorageTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
5
8
|
constructor(config) {
|
|
6
9
|
super({
|
|
7
10
|
...config,
|
|
8
|
-
address: new oAddress('o://vector-store'),
|
|
9
|
-
methods: VECTOR_STORE_PARAMS,
|
|
11
|
+
address: new o_core_1.oAddress('o://vector-store'),
|
|
12
|
+
methods: vector_store_methods_1.VECTOR_STORE_PARAMS,
|
|
10
13
|
description: 'Vector store tool for storing and searching documents',
|
|
11
14
|
});
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
|
-
|
|
17
|
+
exports.VectorMemoryStorageTool = VectorMemoryStorageTool;
|