@olane/o-tool-registry 0.1.1 → 0.1.3
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 +2 -67
- package/dist/apple/apple.tool.d.ts.map +1 -1
- package/dist/apple/apple.tool.js +4 -8
- package/dist/apple/index.d.ts +0 -1
- package/dist/apple/index.js +0 -1
- package/dist/apple/notes.tool.d.ts +3 -67
- package/dist/apple/notes.tool.d.ts.map +1 -1
- package/dist/apple/notes.tool.js +8 -36
- package/dist/auth/index.d.ts +3 -3
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +3 -19
- package/dist/auth/interfaces/index.js +3 -19
- package/dist/auth/interfaces/oAuth-tokens.interface.js +1 -2
- package/dist/auth/interfaces/oAuth-user-info.interface.js +1 -2
- package/dist/auth/interfaces/oAuth.config.js +1 -2
- package/dist/auth/methods/auth.methods.js +1 -4
- package/dist/auth/oAuth.tool.js +8 -12
- package/dist/embeddings/embeddings.tool.d.ts +2 -66
- package/dist/embeddings/embeddings.tool.d.ts.map +1 -1
- package/dist/embeddings/embeddings.tool.js +4 -8
- package/dist/embeddings/huggingface-text-embeddings.tool.js +4 -9
- package/dist/embeddings/index.js +3 -19
- package/dist/embeddings/methods/text-embeddings.method.js +1 -4
- package/dist/embeddings/text-embeddings.tool.d.ts +3 -66
- package/dist/embeddings/text-embeddings.tool.d.ts.map +1 -1
- package/dist/embeddings/text-embeddings.tool.js +6 -10
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -22
- package/dist/init.js +11 -15
- package/dist/intelligence/anthropic-intelligence.tool.d.ts +3 -67
- package/dist/intelligence/anthropic-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/anthropic-intelligence.tool.js +7 -11
- package/dist/intelligence/gemini-intelligence.tool.d.ts +3 -67
- package/dist/intelligence/gemini-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/gemini-intelligence.tool.js +6 -13
- package/dist/intelligence/index.js +5 -21
- package/dist/intelligence/intelligence.tool.d.ts +2 -67
- package/dist/intelligence/intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/intelligence.tool.js +17 -21
- package/dist/intelligence/methods/intelligence.methods.js +1 -4
- package/dist/intelligence/ollama-intelligence.tool.d.ts +3 -67
- package/dist/intelligence/ollama-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/ollama-intelligence.tool.js +8 -12
- package/dist/intelligence/openai-intelligence.tool.d.ts +3 -67
- package/dist/intelligence/openai-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/openai-intelligence.tool.js +6 -14
- package/dist/intelligence/perplexity-intelligence.tool.d.ts +3 -67
- package/dist/intelligence/perplexity-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/perplexity-intelligence.tool.js +6 -11
- package/dist/mcp/index.js +2 -18
- package/dist/mcp/mcp-bridge.tool.d.ts +3 -67
- package/dist/mcp/mcp-bridge.tool.d.ts.map +1 -1
- package/dist/mcp/mcp-bridge.tool.js +18 -22
- package/dist/mcp/mcp.tool.d.ts +3 -68
- package/dist/mcp/mcp.tool.d.ts.map +1 -1
- package/dist/mcp/mcp.tool.js +6 -11
- package/dist/mcp/methods/mcp-bridge.methods.js +1 -4
- package/dist/nlp/index.js +1 -17
- package/dist/nlp/methods/nlp.methods.js +1 -4
- package/dist/nlp/ner.tool.d.ts +3 -67
- package/dist/nlp/ner.tool.d.ts.map +1 -1
- package/dist/nlp/ner.tool.js +7 -11
- package/dist/vector-store/index.js +2 -18
- package/dist/vector-store/langchain-memory.vector-store.tool.js +9 -14
- package/dist/vector-store/methods/vector-store.methods.js +1 -4
- package/dist/vector-store/vector-memory.tool.d.ts +3 -67
- package/dist/vector-store/vector-memory.tool.d.ts.map +1 -1
- package/dist/vector-store/vector-memory.tool.js +6 -10
- package/package.json +14 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.tool.d.ts","sourceRoot":"","sources":["../../src/mcp/mcp.tool.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"mcp.tool.d.ts","sourceRoot":"","sources":["../../src/mcp/mcp.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAY,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAGnE,qBAAa,OAAQ,SAAQ,YAAY;IACvC,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,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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) {
|
|
8
|
-
mcpClient;
|
|
1
|
+
import { oVirtualTool } from '@olane/o-tool';
|
|
2
|
+
import { oAddress } from '@olane/o-core';
|
|
3
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
4
|
+
export class McpTool extends oVirtualTool {
|
|
9
5
|
constructor(config) {
|
|
10
6
|
super({
|
|
11
7
|
...config,
|
|
@@ -50,7 +46,7 @@ class McpTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
|
50
46
|
// add each mcp tool to the vector store
|
|
51
47
|
const tools = await this.mcpClient.listTools();
|
|
52
48
|
await Promise.all(tools.tools.map((tool) => {
|
|
53
|
-
return this.use(new
|
|
49
|
+
return this.use(new oAddress('o://vector-store'), {
|
|
54
50
|
method: 'add_documents',
|
|
55
51
|
params: {
|
|
56
52
|
documents: [
|
|
@@ -58,7 +54,7 @@ class McpTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
|
58
54
|
pageContent: tool.description,
|
|
59
55
|
metadata: {
|
|
60
56
|
address: this.address?.toString() + '/' + tool.name,
|
|
61
|
-
id: (
|
|
57
|
+
id: uuidv4(),
|
|
62
58
|
},
|
|
63
59
|
},
|
|
64
60
|
],
|
|
@@ -85,4 +81,3 @@ class McpTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
|
85
81
|
};
|
|
86
82
|
}
|
|
87
83
|
}
|
|
88
|
-
exports.McpTool = McpTool;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MCP_BRIDGE_METHODS = void 0;
|
|
4
|
-
exports.MCP_BRIDGE_METHODS = {
|
|
1
|
+
export const MCP_BRIDGE_METHODS = {
|
|
5
2
|
add_remote_server_with_api_key: {
|
|
6
3
|
name: 'add_remote_server_with_api_key',
|
|
7
4
|
description: 'Add a MCP server that requires an API key to the bridge',
|
package/dist/nlp/index.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
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
|
+
export * from './ner.tool';
|
package/dist/nlp/ner.tool.d.ts
CHANGED
|
@@ -1,71 +1,7 @@
|
|
|
1
|
-
import { oToolConfig, ToolResult } from '@olane/o-tool';
|
|
2
|
-
import {
|
|
3
|
-
declare
|
|
4
|
-
validateToolCall(oRequest: oRequest): boolean;
|
|
5
|
-
handleProtocol(address: oAddress): Promise<void>;
|
|
6
|
-
initialize(): Promise<void>;
|
|
7
|
-
use(address: oAddress, data: {
|
|
8
|
-
[key: string]: unknown;
|
|
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
|
-
myTools(): string[];
|
|
14
|
-
myToolParams(tool: string): Record<string, any>;
|
|
15
|
-
callMyTool(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<ToolResult>;
|
|
16
|
-
index(): Promise<{
|
|
17
|
-
provider: string;
|
|
18
|
-
summary: string;
|
|
19
|
-
} | {
|
|
20
|
-
summary: string | null;
|
|
21
|
-
provider?: undefined;
|
|
22
|
-
}>;
|
|
23
|
-
_tool_index_network(request: oRequest): Promise<ToolResult>;
|
|
24
|
-
whoami(): Promise<{
|
|
25
|
-
tools: string[];
|
|
26
|
-
description: string;
|
|
27
|
-
}>;
|
|
28
|
-
findMissingParams(methodName: string, params: any): import("@olane/o-protocol").oParameter[];
|
|
29
|
-
readonly config: import("@olane/o-core").CoreConfig;
|
|
30
|
-
p2pNode: import("libp2p", { with: { "resolution-mode": "import" } }).Libp2p<import("@libp2p/interface", { with: { "resolution-mode": "import" } }).ServiceMap>;
|
|
31
|
-
logger: import("@olane/o-core").Logger;
|
|
32
|
-
networkConfig: import("@olane/o-config").Libp2pConfig;
|
|
33
|
-
address: oAddress;
|
|
34
|
-
readonly staticAddress: oAddress;
|
|
35
|
-
peerId: import("@libp2p/interface-peer-id", { with: { "resolution-mode": "import" } }).PeerId;
|
|
36
|
-
state: import("@olane/o-core").NodeState;
|
|
37
|
-
errors: Error[];
|
|
38
|
-
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
39
|
-
leaders: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
40
|
-
addressResolution: import("@olane/o-core").oAddressResolution;
|
|
41
|
-
readonly description: string;
|
|
42
|
-
dependencies: import("@olane/o-core").oDependency[];
|
|
43
|
-
methods: {
|
|
44
|
-
[key: string]: import("@olane/o-protocol").oMethod;
|
|
45
|
-
};
|
|
46
|
-
successCount: number;
|
|
47
|
-
errorCount: number;
|
|
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
|
-
handleStaticAddressTranslation(addressInput: oAddress): Promise<oAddress>;
|
|
54
|
-
translateAddress(addressWithLeaderTransports: oAddress): Promise<{
|
|
55
|
-
nextHopAddress: oAddress;
|
|
56
|
-
targetAddress: oAddress;
|
|
57
|
-
}>;
|
|
58
|
-
advertiseToNetwork(): Promise<void>;
|
|
59
|
-
connectToParent(): Promise<void>;
|
|
60
|
-
register(): Promise<void>;
|
|
61
|
-
connect(nextHopAddress: oAddress, targetAddress: oAddress): Promise<import("@olane/o-core").oConnection>;
|
|
62
|
-
teardown(): Promise<void>;
|
|
63
|
-
start(): Promise<void>;
|
|
64
|
-
stop(): Promise<void>;
|
|
65
|
-
}) & typeof oVirtualNode;
|
|
66
|
-
export declare class NERTool extends NERTool_base {
|
|
1
|
+
import { oToolConfig, oVirtualTool, ToolResult } from '@olane/o-tool';
|
|
2
|
+
import { oRequest } from '@olane/o-core';
|
|
3
|
+
export declare class NERTool extends oVirtualTool {
|
|
67
4
|
constructor(config: oToolConfig);
|
|
68
5
|
_tool_extract(request: oRequest): Promise<ToolResult>;
|
|
69
6
|
}
|
|
70
|
-
export {};
|
|
71
7
|
//# sourceMappingURL=ner.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ner.tool.d.ts","sourceRoot":"","sources":["../../src/nlp/ner.tool.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ner.tool.d.ts","sourceRoot":"","sources":["../../src/nlp/ner.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGnD,qBAAa,OAAQ,SAAQ,YAAY;gBAC3B,MAAM,EAAE,WAAW;IASzB,aAAa,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAa5D"}
|
package/dist/nlp/ner.tool.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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) {
|
|
1
|
+
import { oVirtualTool } from '@olane/o-tool';
|
|
2
|
+
import { oAddress } from '@olane/o-core';
|
|
3
|
+
import { NLP_PARAMS } from './methods/nlp.methods';
|
|
4
|
+
export class NERTool extends oVirtualTool {
|
|
8
5
|
constructor(config) {
|
|
9
6
|
super({
|
|
10
7
|
...config,
|
|
11
|
-
address: new
|
|
12
|
-
methods:
|
|
8
|
+
address: new oAddress('o://ner'),
|
|
9
|
+
methods: NLP_PARAMS,
|
|
13
10
|
description: 'Tool to extract named entities from text',
|
|
14
11
|
});
|
|
15
12
|
}
|
|
@@ -17,7 +14,7 @@ class NERTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
|
17
14
|
const params = request.params;
|
|
18
15
|
const { text } = params;
|
|
19
16
|
this.logger.debug('Extracting entities from text', text);
|
|
20
|
-
const response = await this.use(new
|
|
17
|
+
const response = await this.use(new oAddress('o://intelligence'), {
|
|
21
18
|
method: 'prompt',
|
|
22
19
|
params: {
|
|
23
20
|
prompt: `Extract named entities and their metadata from the following text: ${text}`,
|
|
@@ -26,4 +23,3 @@ class NERTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
|
26
23
|
return response.result;
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
|
-
exports.NERTool = NERTool;
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
export * from './langchain-memory.vector-store.tool';
|
|
2
|
+
export * from './vector-memory.tool';
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 {
|
|
9
|
-
vectorStore;
|
|
1
|
+
import { MemoryVectorStore } from 'langchain/vectorstores/memory';
|
|
2
|
+
import { oAddress } from '@olane/o-core';
|
|
3
|
+
import { VectorMemoryStorageTool } from './vector-memory.tool';
|
|
4
|
+
import { Document } from '@langchain/core/documents';
|
|
5
|
+
export class LangchainMemoryVectorStoreTool extends VectorMemoryStorageTool {
|
|
10
6
|
constructor(config) {
|
|
11
7
|
super({
|
|
12
8
|
...config,
|
|
@@ -15,7 +11,7 @@ class LangchainMemoryVectorStoreTool extends vector_memory_tool_1.VectorMemorySt
|
|
|
15
11
|
embeddingsTool() {
|
|
16
12
|
return {
|
|
17
13
|
embedDocuments: async (documents) => {
|
|
18
|
-
const response = await this.use(new
|
|
14
|
+
const response = await this.use(new oAddress('o://embeddings-text'), {
|
|
19
15
|
method: 'embed_documents',
|
|
20
16
|
params: {
|
|
21
17
|
documents,
|
|
@@ -27,7 +23,7 @@ class LangchainMemoryVectorStoreTool extends vector_memory_tool_1.VectorMemorySt
|
|
|
27
23
|
},
|
|
28
24
|
embedQuery: async (document) => {
|
|
29
25
|
console.log('Embedding query: ', document);
|
|
30
|
-
const response = await this.use(new
|
|
26
|
+
const response = await this.use(new oAddress('o://embeddings-text'), {
|
|
31
27
|
method: 'embed_query',
|
|
32
28
|
params: {
|
|
33
29
|
query: document,
|
|
@@ -41,11 +37,11 @@ class LangchainMemoryVectorStoreTool extends vector_memory_tool_1.VectorMemorySt
|
|
|
41
37
|
}
|
|
42
38
|
async initialize() {
|
|
43
39
|
await super.initialize();
|
|
44
|
-
this.vectorStore = new
|
|
40
|
+
this.vectorStore = new MemoryVectorStore(this.embeddingsTool());
|
|
45
41
|
}
|
|
46
42
|
async _tool_add_documents(request) {
|
|
47
43
|
const { documents } = request.params;
|
|
48
|
-
const docs = documents.map((doc) => new
|
|
44
|
+
const docs = documents.map((doc) => new Document(doc));
|
|
49
45
|
const result = await this.vectorStore.addDocuments(docs);
|
|
50
46
|
return result;
|
|
51
47
|
}
|
|
@@ -64,4 +60,3 @@ class LangchainMemoryVectorStoreTool extends vector_memory_tool_1.VectorMemorySt
|
|
|
64
60
|
return results;
|
|
65
61
|
}
|
|
66
62
|
}
|
|
67
|
-
exports.LangchainMemoryVectorStoreTool = LangchainMemoryVectorStoreTool;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VECTOR_STORE_PARAMS = void 0;
|
|
4
|
-
exports.VECTOR_STORE_PARAMS = {
|
|
1
|
+
export const VECTOR_STORE_PARAMS = {
|
|
5
2
|
add_documents: {
|
|
6
3
|
name: 'add_documents',
|
|
7
4
|
description: 'Add documents to the store',
|
|
@@ -1,75 +1,11 @@
|
|
|
1
|
-
import { ToolResult } from '@olane/o-tool';
|
|
2
|
-
import {
|
|
1
|
+
import { oVirtualTool, ToolResult } from '@olane/o-tool';
|
|
2
|
+
import { oRequest } from '@olane/o-core';
|
|
3
3
|
import { oToolConfig } from '@olane/o-tool';
|
|
4
|
-
declare
|
|
5
|
-
validateToolCall(oRequest: oRequest): boolean;
|
|
6
|
-
handleProtocol(address: oAddress): Promise<void>;
|
|
7
|
-
initialize(): Promise<void>;
|
|
8
|
-
use(address: oAddress, data: {
|
|
9
|
-
[key: string]: unknown;
|
|
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
|
-
myTools(): string[];
|
|
15
|
-
myToolParams(tool: string): Record<string, any>;
|
|
16
|
-
callMyTool(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<ToolResult>;
|
|
17
|
-
index(): Promise<{
|
|
18
|
-
provider: string;
|
|
19
|
-
summary: string;
|
|
20
|
-
} | {
|
|
21
|
-
summary: string | null;
|
|
22
|
-
provider?: undefined;
|
|
23
|
-
}>;
|
|
24
|
-
_tool_index_network(request: oRequest): Promise<ToolResult>;
|
|
25
|
-
whoami(): Promise<{
|
|
26
|
-
tools: string[];
|
|
27
|
-
description: string;
|
|
28
|
-
}>;
|
|
29
|
-
findMissingParams(methodName: string, params: any): import("@olane/o-protocol").oParameter[];
|
|
30
|
-
readonly config: import("@olane/o-core").CoreConfig;
|
|
31
|
-
p2pNode: import("libp2p", { with: { "resolution-mode": "import" } }).Libp2p<import("@libp2p/interface", { with: { "resolution-mode": "import" } }).ServiceMap>;
|
|
32
|
-
logger: import("@olane/o-core").Logger;
|
|
33
|
-
networkConfig: import("@olane/o-config").Libp2pConfig;
|
|
34
|
-
address: oAddress;
|
|
35
|
-
readonly staticAddress: oAddress;
|
|
36
|
-
peerId: import("@libp2p/interface-peer-id", { with: { "resolution-mode": "import" } }).PeerId;
|
|
37
|
-
state: import("@olane/o-core").NodeState;
|
|
38
|
-
errors: Error[];
|
|
39
|
-
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
40
|
-
leaders: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
41
|
-
addressResolution: import("@olane/o-core").oAddressResolution;
|
|
42
|
-
readonly description: string;
|
|
43
|
-
dependencies: import("@olane/o-core").oDependency[];
|
|
44
|
-
methods: {
|
|
45
|
-
[key: string]: import("@olane/o-protocol").oMethod;
|
|
46
|
-
};
|
|
47
|
-
successCount: number;
|
|
48
|
-
errorCount: number;
|
|
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
|
-
handleStaticAddressTranslation(addressInput: oAddress): Promise<oAddress>;
|
|
55
|
-
translateAddress(addressWithLeaderTransports: oAddress): Promise<{
|
|
56
|
-
nextHopAddress: oAddress;
|
|
57
|
-
targetAddress: oAddress;
|
|
58
|
-
}>;
|
|
59
|
-
advertiseToNetwork(): Promise<void>;
|
|
60
|
-
connectToParent(): Promise<void>;
|
|
61
|
-
register(): Promise<void>;
|
|
62
|
-
connect(nextHopAddress: oAddress, targetAddress: oAddress): Promise<import("@olane/o-core").oConnection>;
|
|
63
|
-
teardown(): Promise<void>;
|
|
64
|
-
start(): Promise<void>;
|
|
65
|
-
stop(): Promise<void>;
|
|
66
|
-
}) & typeof oVirtualNode;
|
|
67
|
-
export declare abstract class VectorMemoryStorageTool extends VectorMemoryStorageTool_base {
|
|
4
|
+
export declare abstract class VectorMemoryStorageTool extends oVirtualTool {
|
|
68
5
|
constructor(config: oToolConfig);
|
|
69
6
|
abstract _tool_search_similar(request: oRequest): Promise<ToolResult>;
|
|
70
7
|
abstract _tool_add_documents(request: oRequest): Promise<ToolResult>;
|
|
71
8
|
abstract _tool_delete_documents(request: oRequest): Promise<ToolResult>;
|
|
72
9
|
abstract _tool_update_documents(request: oRequest): Promise<ToolResult>;
|
|
73
10
|
}
|
|
74
|
-
export {};
|
|
75
11
|
//# sourceMappingURL=vector-memory.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector-memory.tool.d.ts","sourceRoot":"","sources":["../../src/vector-store/vector-memory.tool.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"vector-memory.tool.d.ts","sourceRoot":"","sources":["../../src/vector-store/vector-memory.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,8BAAsB,uBAAwB,SAAQ,YAAY;gBACpD,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,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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) {
|
|
1
|
+
import { oVirtualTool } from '@olane/o-tool';
|
|
2
|
+
import { oAddress } from '@olane/o-core';
|
|
3
|
+
import { VECTOR_STORE_PARAMS } from './methods/vector-store.methods';
|
|
4
|
+
export class VectorMemoryStorageTool extends oVirtualTool {
|
|
8
5
|
constructor(config) {
|
|
9
6
|
super({
|
|
10
7
|
...config,
|
|
11
|
-
address: new
|
|
12
|
-
methods:
|
|
8
|
+
address: new oAddress('o://vector-store'),
|
|
9
|
+
methods: VECTOR_STORE_PARAMS,
|
|
13
10
|
description: 'Vector store tool for storing and searching documents',
|
|
14
11
|
});
|
|
15
12
|
}
|
|
16
13
|
}
|
|
17
|
-
exports.VectorMemoryStorageTool = VectorMemoryStorageTool;
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/o-tool-registry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"main": "dist/index.js",
|
|
5
6
|
"types": "dist/index.d.ts",
|
|
6
7
|
"exports": {
|
|
7
8
|
".": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
10
11
|
}
|
|
11
12
|
},
|
|
12
13
|
"files": [
|
|
@@ -37,11 +38,11 @@
|
|
|
37
38
|
"@babel/preset-typescript": "^7.27.1",
|
|
38
39
|
"@eslint/eslintrc": "^3.3.1",
|
|
39
40
|
"@eslint/js": "^9.29.0",
|
|
40
|
-
"@olane/o-config": "^0.1.
|
|
41
|
-
"@olane/o-core": "^0.1.
|
|
42
|
-
"@olane/o-protocol": "^0.1.
|
|
43
|
-
"@olane/o-tool": "^0.1.
|
|
44
|
-
"@olane/o-tools-common": "^0.1.
|
|
41
|
+
"@olane/o-config": "^0.1.3",
|
|
42
|
+
"@olane/o-core": "^0.1.3",
|
|
43
|
+
"@olane/o-protocol": "^0.1.3",
|
|
44
|
+
"@olane/o-tool": "^0.1.3",
|
|
45
|
+
"@olane/o-tools-common": "^0.1.3",
|
|
45
46
|
"@tsconfig/node20": "^20.1.6",
|
|
46
47
|
"@types/jest": "^30.0.0",
|
|
47
48
|
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
@@ -65,11 +66,11 @@
|
|
|
65
66
|
"webpack-dev-server": "^5.2.2"
|
|
66
67
|
},
|
|
67
68
|
"peerDependencies": {
|
|
68
|
-
"@olane/o-config": "^0.1.
|
|
69
|
-
"@olane/o-core": "^0.1.
|
|
70
|
-
"@olane/o-protocol": "^0.1.
|
|
71
|
-
"@olane/o-tool": "^0.1.
|
|
72
|
-
"@olane/o-tools-common": "^0.1.
|
|
69
|
+
"@olane/o-config": "^0.1.3",
|
|
70
|
+
"@olane/o-core": "^0.1.3",
|
|
71
|
+
"@olane/o-protocol": "^0.1.3",
|
|
72
|
+
"@olane/o-tool": "^0.1.3",
|
|
73
|
+
"@olane/o-tools-common": "^0.1.3"
|
|
73
74
|
},
|
|
74
75
|
"dependencies": {
|
|
75
76
|
"@huggingface/transformers": "^3.5.2",
|