@olane/o-tool-registry 0.5.1 → 0.6.2

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.
Files changed (47) hide show
  1. package/dist/src/embeddings/huggingface-text-embeddings.tool.d.ts.map +1 -1
  2. package/dist/src/embeddings/huggingface-text-embeddings.tool.js +0 -1
  3. package/dist/src/index.d.ts +0 -2
  4. package/dist/src/index.d.ts.map +1 -1
  5. package/dist/src/index.js +0 -2
  6. package/dist/src/init.d.ts.map +1 -1
  7. package/dist/src/init.js +2 -2
  8. package/dist/src/vector-store/langchain-memory.vector-store.tool.d.ts.map +1 -1
  9. package/dist/src/vector-store/langchain-memory.vector-store.tool.js +0 -2
  10. package/dist/test/methods.spec.js +1 -10
  11. package/package.json +9 -13
  12. package/dist/src/intelligence/anthropic-intelligence.tool.d.ts +0 -224
  13. package/dist/src/intelligence/anthropic-intelligence.tool.d.ts.map +0 -1
  14. package/dist/src/intelligence/anthropic-intelligence.tool.js +0 -477
  15. package/dist/src/intelligence/gemini-intelligence.tool.d.ts +0 -29
  16. package/dist/src/intelligence/gemini-intelligence.tool.d.ts.map +0 -1
  17. package/dist/src/intelligence/gemini-intelligence.tool.js +0 -267
  18. package/dist/src/intelligence/index.d.ts +0 -6
  19. package/dist/src/intelligence/index.d.ts.map +0 -1
  20. package/dist/src/intelligence/index.js +0 -5
  21. package/dist/src/intelligence/intelligence.tool.d.ts +0 -11
  22. package/dist/src/intelligence/intelligence.tool.d.ts.map +0 -1
  23. package/dist/src/intelligence/intelligence.tool.js +0 -134
  24. package/dist/src/intelligence/methods/intelligence.methods.d.ts +0 -5
  25. package/dist/src/intelligence/methods/intelligence.methods.d.ts.map +0 -1
  26. package/dist/src/intelligence/methods/intelligence.methods.js +0 -132
  27. package/dist/src/intelligence/ollama-intelligence.tool.d.ts +0 -36
  28. package/dist/src/intelligence/ollama-intelligence.tool.d.ts.map +0 -1
  29. package/dist/src/intelligence/ollama-intelligence.tool.js +0 -312
  30. package/dist/src/intelligence/openai-intelligence.tool.d.ts +0 -30
  31. package/dist/src/intelligence/openai-intelligence.tool.d.ts.map +0 -1
  32. package/dist/src/intelligence/openai-intelligence.tool.js +0 -255
  33. package/dist/src/intelligence/perplexity-intelligence.tool.d.ts +0 -28
  34. package/dist/src/intelligence/perplexity-intelligence.tool.d.ts.map +0 -1
  35. package/dist/src/intelligence/perplexity-intelligence.tool.js +0 -310
  36. package/dist/src/mcp/index.d.ts +0 -3
  37. package/dist/src/mcp/index.d.ts.map +0 -1
  38. package/dist/src/mcp/index.js +0 -2
  39. package/dist/src/mcp/mcp-bridge.tool.d.ts +0 -12
  40. package/dist/src/mcp/mcp-bridge.tool.d.ts.map +0 -1
  41. package/dist/src/mcp/mcp-bridge.tool.js +0 -107
  42. package/dist/src/mcp/mcp.tool.d.ts +0 -15
  43. package/dist/src/mcp/mcp.tool.d.ts.map +0 -1
  44. package/dist/src/mcp/mcp.tool.js +0 -85
  45. package/dist/src/mcp/methods/mcp-bridge.methods.d.ts +0 -5
  46. package/dist/src/mcp/methods/mcp-bridge.methods.d.ts.map +0 -1
  47. package/dist/src/mcp/methods/mcp-bridge.methods.js +0 -58
@@ -1 +1 @@
1
- {"version":3,"file":"huggingface-text-embeddings.tool.d.ts","sourceRoot":"","sources":["../../../src/embeddings/huggingface-text-embeddings.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG/D,qBAAa,6BAA8B,SAAQ,kBAAkB;IACnE,OAAO,CAAC,KAAK,CAAqC;IAE5C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAO3B,qBAAqB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;IAM7D,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAM9D"}
1
+ {"version":3,"file":"huggingface-text-embeddings.tool.d.ts","sourceRoot":"","sources":["../../../src/embeddings/huggingface-text-embeddings.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG/D,qBAAa,6BAA8B,SAAQ,kBAAkB;IACnE,OAAO,CAAC,KAAK,CAAqC;IAE5C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAO3B,qBAAqB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;IAM7D,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAK9D"}
@@ -14,7 +14,6 @@ export class HuggingfaceTextEmbeddingsTool extends TextEmbeddingsTool {
14
14
  }
15
15
  async _tool_embed_query(request) {
16
16
  const { query } = request.params;
17
- console.log('Embedding query: ', request.params);
18
17
  const result = await this.model.embedQuery(query);
19
18
  return result;
20
19
  }
@@ -1,7 +1,5 @@
1
- export * from './intelligence/index.js';
2
1
  export * from './init.js';
3
2
  export * from './nlp/index.js';
4
3
  export * from './vector-store/index.js';
5
- export * from './mcp/index.js';
6
4
  export * from './auth/index.js';
7
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC"}
package/dist/src/index.js CHANGED
@@ -1,6 +1,4 @@
1
- export * from './intelligence/index.js';
2
1
  export * from './init.js';
3
2
  export * from './nlp/index.js';
4
3
  export * from './vector-store/index.js';
5
- export * from './mcp/index.js';
6
4
  export * from './auth/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/init.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAO,MAAM,iBAAiB,UAAW,YAAY,KAAG,IA8BvD,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/init.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAI7C,eAAO,MAAM,iBAAiB,UAAW,YAAY,KAAG,IA8BvD,CAAC"}
package/dist/src/init.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { NERTool } from './nlp/ner.tool.js';
2
2
  import { HuggingfaceTextEmbeddingsTool } from './embeddings/index.js';
3
3
  import { LangchainMemoryVectorStoreTool } from './vector-store/index.js';
4
- import { IntelligenceTool } from './intelligence/index.js';
5
- import { McpBridgeTool } from './mcp/index.js';
4
+ import { IntelligenceTool } from '@olane/o-intelligence';
5
+ import { McpBridgeTool } from '@olane/o-mcp';
6
6
  export const initRegistryTools = (oNode) => {
7
7
  const params = {
8
8
  parent: oNode.address,
@@ -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,yBAAyB,CAAC;AAKlE,qBAAa,8BAA+B,SAAQ,uBAAuB;IACzE,OAAO,CAAC,WAAW,CAAqB;gBAE5B,MAAM,EAAE,WAAW;IAO/B,OAAO,CAAC,cAAc;IAwBhB,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
+ {"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,yBAAyB,CAAC;AAKlE,qBAAa,8BAA+B,SAAQ,uBAAuB;IACzE,OAAO,CAAC,WAAW,CAAqB;gBAE5B,MAAM,EAAE,WAAW;IAO/B,OAAO,CAAC,cAAc;IAuBhB,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;CAO5D"}
@@ -22,7 +22,6 @@ export class LangchainMemoryVectorStoreTool extends VectorMemoryStorageTool {
22
22
  return response.result.data;
23
23
  },
24
24
  embedQuery: async (document) => {
25
- console.log('Embedding query: ', document);
26
25
  const response = await this.use(new oAddress('o://embeddings-text'), {
27
26
  method: 'embed_query',
28
27
  params: {
@@ -51,7 +50,6 @@ export class LangchainMemoryVectorStoreTool extends VectorMemoryStorageTool {
51
50
  }
52
51
  async _tool_search_similar(request) {
53
52
  const params = request.params;
54
- console.log('Search similar params: ', params);
55
53
  const query = params.query;
56
54
  const limit = params.limit;
57
55
  const results = await this.vectorStore.similaritySearch(query, limit);
@@ -1,10 +1,9 @@
1
1
  import { expect } from 'chai';
2
2
  import { OAuthTool } from '../src/auth/oAuth.tool.js';
3
3
  import { EmbeddingsTool } from '../src/embeddings/embeddings.tool.js';
4
- import { IntelligenceTool } from '../src/intelligence/intelligence.tool.js';
5
- import { McpBridgeTool } from '../src/mcp/mcp-bridge.tool.js';
6
4
  import { NERTool } from '../src/nlp/ner.tool.js';
7
5
  import { LangchainMemoryVectorStoreTool } from '../src/vector-store/index.js';
6
+ import { IntelligenceTool } from '@olane/o-intelligence';
8
7
  function checkMethods(tool, methods) {
9
8
  const tools = tool.myTools();
10
9
  for (const tool of tools) {
@@ -36,14 +35,6 @@ describe('registry tool metadata tests', () => {
36
35
  });
37
36
  checkMethods(intelligenceTool, intelligenceTool.methods);
38
37
  });
39
- it('should verify mcp method metadata is present', async () => {
40
- const mcpTool = new McpBridgeTool({
41
- description: 'MCP tool',
42
- leader: null,
43
- parent: null,
44
- });
45
- checkMethods(mcpTool, mcpTool.methods);
46
- });
47
38
  it('should verify nlp method metadata is present', async () => {
48
39
  const nlpTool = new NERTool({
49
40
  description: 'NLP tool',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olane/o-tool-registry",
3
- "version": "0.5.1",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -33,15 +33,10 @@
33
33
  },
34
34
  "author": "oLane Inc.",
35
35
  "license": "ISC",
36
- "description": "oLane Core",
36
+ "description": "oLane server tool registry",
37
37
  "devDependencies": {
38
38
  "@eslint/eslintrc": "^3.3.1",
39
39
  "@eslint/js": "^9.29.0",
40
- "@olane/o-config": "0.5.1",
41
- "@olane/o-core": "0.5.1",
42
- "@olane/o-protocol": "0.5.1",
43
- "@olane/o-tool": "0.5.1",
44
- "@olane/o-tools-common": "0.5.1",
45
40
  "@tsconfig/node20": "^20.1.6",
46
41
  "@types/jest": "^30.0.0",
47
42
  "@typescript-eslint/eslint-plugin": "^8.34.1",
@@ -59,17 +54,18 @@
59
54
  "typescript": "5.4.5"
60
55
  },
61
56
  "peerDependencies": {
62
- "@olane/o-config": "^0.5.1",
63
- "@olane/o-core": "^0.5.1",
64
- "@olane/o-protocol": "^0.5.1",
65
- "@olane/o-tool": "^0.5.1",
66
- "@olane/o-tools-common": "^0.5.1"
57
+ "@olane/o-config": "^0.6.2",
58
+ "@olane/o-core": "^0.6.2",
59
+ "@olane/o-intelligence": "^0.6.1",
60
+ "@olane/o-mcp": "^0.6.1",
61
+ "@olane/o-protocol": "^0.6.2",
62
+ "@olane/o-tool": "^0.6.2",
63
+ "@olane/o-tools-common": "^0.6.2"
67
64
  },
68
65
  "dependencies": {
69
66
  "@huggingface/transformers": "^3.5.2",
70
67
  "@langchain/community": "^0.3.47",
71
68
  "@langchain/core": "^0.3.61",
72
- "@modelcontextprotocol/sdk": "^1.13.0",
73
69
  "debug": "^4.4.1",
74
70
  "dotenv": "^16.5.0",
75
71
  "langchain": "^0.3.29"
@@ -1,224 +0,0 @@
1
- import { oRequest } from '@olane/o-core';
2
- import { oToolConfig, oVirtualTool, ToolResult } from '@olane/o-tool';
3
- export declare class AnthropicIntelligenceTool extends oVirtualTool {
4
- private defaultModel;
5
- constructor(config: oToolConfig);
6
- /**
7
- * Chat completion with Anthropic
8
- */
9
- _tool_completion(request: oRequest): Promise<ToolResult>;
10
- /**
11
- * Generate text with Anthropic (using messages endpoint)
12
- */
13
- _tool_generate(request: oRequest): Promise<ToolResult>;
14
- /**
15
- * List available models
16
- */
17
- _tool_list_models(request: oRequest): Promise<ToolResult>;
18
- /**
19
- * Get model information
20
- */
21
- _tool_model_info(request: oRequest): Promise<ToolResult>;
22
- /**
23
- * Check API status
24
- */
25
- _tool_status(request: oRequest): Promise<ToolResult>;
26
- /**
27
- * Parameter definitions for completion
28
- */
29
- _params_completion(): {
30
- type: string;
31
- properties: {
32
- model: {
33
- type: string;
34
- description: string;
35
- default: string;
36
- };
37
- messages: {
38
- type: string;
39
- description: string;
40
- items: {
41
- type: string;
42
- properties: {
43
- role: {
44
- type: string;
45
- enum: string[];
46
- description: string;
47
- };
48
- content: {
49
- oneOf: ({
50
- type: string;
51
- description: string;
52
- items?: undefined;
53
- } | {
54
- type: string;
55
- description: string;
56
- items: {
57
- type: string;
58
- properties: {
59
- type: {
60
- type: string;
61
- enum: string[];
62
- };
63
- text: {
64
- type: string;
65
- };
66
- source: {
67
- type: string;
68
- properties: {
69
- type: {
70
- type: string;
71
- enum: string[];
72
- };
73
- media_type: {
74
- type: string;
75
- };
76
- data: {
77
- type: string;
78
- };
79
- };
80
- };
81
- };
82
- };
83
- })[];
84
- };
85
- };
86
- required: string[];
87
- };
88
- };
89
- system: {
90
- type: string;
91
- description: string;
92
- };
93
- max_tokens: {
94
- type: string;
95
- description: string;
96
- default: number;
97
- };
98
- temperature: {
99
- type: string;
100
- description: string;
101
- minimum: number;
102
- maximum: number;
103
- };
104
- top_p: {
105
- type: string;
106
- description: string;
107
- minimum: number;
108
- maximum: number;
109
- };
110
- top_k: {
111
- type: string;
112
- description: string;
113
- minimum: number;
114
- };
115
- stop_sequences: {
116
- type: string;
117
- description: string;
118
- items: {
119
- type: string;
120
- };
121
- };
122
- metadata: {
123
- type: string;
124
- description: string;
125
- properties: {
126
- user_id: {
127
- type: string;
128
- description: string;
129
- };
130
- };
131
- };
132
- };
133
- required: string[];
134
- };
135
- /**
136
- * Parameter definitions for generate
137
- */
138
- _params_generate(): {
139
- type: string;
140
- properties: {
141
- model: {
142
- type: string;
143
- description: string;
144
- default: string;
145
- };
146
- prompt: {
147
- type: string;
148
- description: string;
149
- };
150
- system: {
151
- type: string;
152
- description: string;
153
- };
154
- max_tokens: {
155
- type: string;
156
- description: string;
157
- default: number;
158
- };
159
- temperature: {
160
- type: string;
161
- description: string;
162
- minimum: number;
163
- maximum: number;
164
- };
165
- top_p: {
166
- type: string;
167
- description: string;
168
- minimum: number;
169
- maximum: number;
170
- };
171
- top_k: {
172
- type: string;
173
- description: string;
174
- minimum: number;
175
- };
176
- stop_sequences: {
177
- type: string;
178
- description: string;
179
- items: {
180
- type: string;
181
- };
182
- };
183
- metadata: {
184
- type: string;
185
- description: string;
186
- properties: {
187
- user_id: {
188
- type: string;
189
- description: string;
190
- };
191
- };
192
- };
193
- };
194
- required: string[];
195
- };
196
- /**
197
- * Parameter definitions for list_models
198
- */
199
- _params_list_models(): {
200
- type: string;
201
- properties: {};
202
- };
203
- /**
204
- * Parameter definitions for model_info
205
- */
206
- _params_model_info(): {
207
- type: string;
208
- properties: {
209
- model: {
210
- type: string;
211
- description: string;
212
- default: string;
213
- };
214
- };
215
- };
216
- /**
217
- * Parameter definitions for status
218
- */
219
- _params_status(): {
220
- type: string;
221
- properties: {};
222
- };
223
- }
224
- //# sourceMappingURL=anthropic-intelligence.tool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"anthropic-intelligence.tool.d.ts","sourceRoot":"","sources":["../../../src/intelligence/anthropic-intelligence.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAgB,MAAM,eAAe,CAAC;AACjE,OAAO,EAAS,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAmG7E,qBAAa,yBAA0B,SAAQ,YAAY;IACzD,OAAO,CAAC,YAAY,CAA8B;gBAEtC,MAAM,EAAE,WAAW;IAW/B;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAqE9D;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA+E5D;;OAEG;IACG,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA4C/D;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAoD9D;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAwC1D;;OAEG;IACH,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+GlB;;OAEG;IACH,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6DhB;;OAEG;IACH,mBAAmB;;;;IAOnB;;OAEG;IACH,kBAAkB;;;;;;;;;;IAalB;;OAEG;IACH,cAAc;;;;CAMf"}