@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.
Files changed (70) hide show
  1. package/dist/apple/apple.tool.d.ts +2 -67
  2. package/dist/apple/apple.tool.d.ts.map +1 -1
  3. package/dist/apple/apple.tool.js +4 -8
  4. package/dist/apple/index.d.ts +0 -1
  5. package/dist/apple/index.js +0 -1
  6. package/dist/apple/notes.tool.d.ts +3 -67
  7. package/dist/apple/notes.tool.d.ts.map +1 -1
  8. package/dist/apple/notes.tool.js +8 -36
  9. package/dist/auth/index.d.ts +3 -3
  10. package/dist/auth/index.d.ts.map +1 -1
  11. package/dist/auth/index.js +3 -19
  12. package/dist/auth/interfaces/index.js +3 -19
  13. package/dist/auth/interfaces/oAuth-tokens.interface.js +1 -2
  14. package/dist/auth/interfaces/oAuth-user-info.interface.js +1 -2
  15. package/dist/auth/interfaces/oAuth.config.js +1 -2
  16. package/dist/auth/methods/auth.methods.js +1 -4
  17. package/dist/auth/oAuth.tool.js +8 -12
  18. package/dist/embeddings/embeddings.tool.d.ts +2 -66
  19. package/dist/embeddings/embeddings.tool.d.ts.map +1 -1
  20. package/dist/embeddings/embeddings.tool.js +4 -8
  21. package/dist/embeddings/huggingface-text-embeddings.tool.js +4 -9
  22. package/dist/embeddings/index.js +3 -19
  23. package/dist/embeddings/methods/text-embeddings.method.js +1 -4
  24. package/dist/embeddings/text-embeddings.tool.d.ts +3 -66
  25. package/dist/embeddings/text-embeddings.tool.d.ts.map +1 -1
  26. package/dist/embeddings/text-embeddings.tool.js +6 -10
  27. package/dist/index.d.ts +6 -6
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +6 -22
  30. package/dist/init.js +11 -15
  31. package/dist/intelligence/anthropic-intelligence.tool.d.ts +3 -67
  32. package/dist/intelligence/anthropic-intelligence.tool.d.ts.map +1 -1
  33. package/dist/intelligence/anthropic-intelligence.tool.js +7 -11
  34. package/dist/intelligence/gemini-intelligence.tool.d.ts +3 -67
  35. package/dist/intelligence/gemini-intelligence.tool.d.ts.map +1 -1
  36. package/dist/intelligence/gemini-intelligence.tool.js +6 -13
  37. package/dist/intelligence/index.js +5 -21
  38. package/dist/intelligence/intelligence.tool.d.ts +2 -67
  39. package/dist/intelligence/intelligence.tool.d.ts.map +1 -1
  40. package/dist/intelligence/intelligence.tool.js +17 -21
  41. package/dist/intelligence/methods/intelligence.methods.js +1 -4
  42. package/dist/intelligence/ollama-intelligence.tool.d.ts +3 -67
  43. package/dist/intelligence/ollama-intelligence.tool.d.ts.map +1 -1
  44. package/dist/intelligence/ollama-intelligence.tool.js +8 -12
  45. package/dist/intelligence/openai-intelligence.tool.d.ts +3 -67
  46. package/dist/intelligence/openai-intelligence.tool.d.ts.map +1 -1
  47. package/dist/intelligence/openai-intelligence.tool.js +6 -14
  48. package/dist/intelligence/perplexity-intelligence.tool.d.ts +3 -67
  49. package/dist/intelligence/perplexity-intelligence.tool.d.ts.map +1 -1
  50. package/dist/intelligence/perplexity-intelligence.tool.js +6 -11
  51. package/dist/mcp/index.js +2 -18
  52. package/dist/mcp/mcp-bridge.tool.d.ts +3 -67
  53. package/dist/mcp/mcp-bridge.tool.d.ts.map +1 -1
  54. package/dist/mcp/mcp-bridge.tool.js +18 -22
  55. package/dist/mcp/mcp.tool.d.ts +3 -68
  56. package/dist/mcp/mcp.tool.d.ts.map +1 -1
  57. package/dist/mcp/mcp.tool.js +6 -11
  58. package/dist/mcp/methods/mcp-bridge.methods.js +1 -4
  59. package/dist/nlp/index.js +1 -17
  60. package/dist/nlp/methods/nlp.methods.js +1 -4
  61. package/dist/nlp/ner.tool.d.ts +3 -67
  62. package/dist/nlp/ner.tool.d.ts.map +1 -1
  63. package/dist/nlp/ner.tool.js +7 -11
  64. package/dist/vector-store/index.js +2 -18
  65. package/dist/vector-store/langchain-memory.vector-store.tool.js +9 -14
  66. package/dist/vector-store/methods/vector-store.methods.js +1 -4
  67. package/dist/vector-store/vector-memory.tool.d.ts +3 -67
  68. package/dist/vector-store/vector-memory.tool.d.ts.map +1 -1
  69. package/dist/vector-store/vector-memory.tool.js +6 -10
  70. package/package.json +14 -13
@@ -1,17 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextEmbeddingsTool = void 0;
4
- const o_tool_1 = require("@olane/o-tool");
5
- const o_core_1 = require("@olane/o-core");
6
- const text_embeddings_method_1 = require("./methods/text-embeddings.method");
7
- class TextEmbeddingsTool 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 { TEXT_EMBEDDINGS_PARAMS } from './methods/text-embeddings.method';
4
+ export class TextEmbeddingsTool extends oVirtualTool {
8
5
  constructor(config) {
9
6
  super({
10
7
  ...config,
11
- address: new o_core_1.oAddress('o://embeddings-text'),
12
- methods: text_embeddings_method_1.TEXT_EMBEDDINGS_PARAMS,
8
+ address: new oAddress('o://embeddings-text'),
9
+ methods: TEXT_EMBEDDINGS_PARAMS,
13
10
  description: config.description || 'Tool to generate text embeddings',
14
11
  });
15
12
  }
16
13
  }
17
- exports.TextEmbeddingsTool = TextEmbeddingsTool;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from './intelligence';
2
- export * from './init';
3
- export * from './nlp';
4
- export * from './vector-store';
5
- export * from './mcp';
6
- export * from './auth';
1
+ export * from './intelligence/index.js';
2
+ export * from './init.js';
3
+ export * from './nlp/index.js';
4
+ export * from './vector-store/index.js';
5
+ export * from './mcp/index.js';
6
+ export * from './auth/index.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
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"}
package/dist/index.js CHANGED
@@ -1,22 +1,6 @@
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("./intelligence"), exports);
18
- __exportStar(require("./init"), exports);
19
- __exportStar(require("./nlp"), exports);
20
- __exportStar(require("./vector-store"), exports);
21
- __exportStar(require("./mcp"), exports);
22
- __exportStar(require("./auth"), exports);
1
+ export * from './intelligence/index.js';
2
+ export * from './init.js';
3
+ export * from './nlp/index.js';
4
+ export * from './vector-store/index.js';
5
+ export * from './mcp/index.js';
6
+ export * from './auth/index.js';
package/dist/init.js CHANGED
@@ -1,34 +1,31 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initRegistryTools = void 0;
4
- const ner_tool_1 = require("./nlp/ner.tool");
5
- const embeddings_1 = require("./embeddings");
6
- const vector_store_1 = require("./vector-store");
7
- const intelligence_1 = require("./intelligence");
8
- const mcp_1 = require("./mcp");
9
- const initRegistryTools = (oNode) => {
1
+ import { NERTool } from './nlp/ner.tool';
2
+ import { HuggingfaceTextEmbeddingsTool } from './embeddings';
3
+ import { LangchainMemoryVectorStoreTool } from './vector-store';
4
+ import { IntelligenceTool } from './intelligence';
5
+ import { McpBridgeTool } from './mcp';
6
+ export const initRegistryTools = (oNode) => {
10
7
  const params = {
11
8
  parent: oNode.address,
12
9
  leader: oNode.address,
13
10
  };
14
11
  const tools = [
15
- new ner_tool_1.NERTool({
12
+ new NERTool({
16
13
  name: 'ner',
17
14
  ...params,
18
15
  }),
19
- new intelligence_1.IntelligenceTool({
16
+ new IntelligenceTool({
20
17
  name: 'intelligence',
21
18
  ...params,
22
19
  }),
23
- new embeddings_1.HuggingfaceTextEmbeddingsTool({
20
+ new HuggingfaceTextEmbeddingsTool({
24
21
  name: 'embeddings-text',
25
22
  ...params,
26
23
  }),
27
- new vector_store_1.LangchainMemoryVectorStoreTool({
24
+ new LangchainMemoryVectorStoreTool({
28
25
  name: 'vector-store',
29
26
  ...params,
30
27
  }),
31
- new mcp_1.McpBridgeTool({
28
+ new McpBridgeTool({
32
29
  name: 'mcp',
33
30
  ...params,
34
31
  }),
@@ -37,4 +34,3 @@ const initRegistryTools = (oNode) => {
37
34
  oNode.addChildNode(tool);
38
35
  });
39
36
  };
40
- exports.initRegistryTools = initRegistryTools;
@@ -1,69 +1,6 @@
1
- import { oAddress, oRequest, oVirtualNode } from '@olane/o-core';
2
- import { oToolConfig, ToolResult } from '@olane/o-tool';
3
- declare const AnthropicIntelligenceTool_base: (new (...args: any[]) => {
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 AnthropicIntelligenceTool extends AnthropicIntelligenceTool_base {
1
+ import { oRequest } from '@olane/o-core';
2
+ import { oToolConfig, oVirtualTool, ToolResult } from '@olane/o-tool';
3
+ export declare class AnthropicIntelligenceTool extends oVirtualTool {
67
4
  private defaultModel;
68
5
  constructor(config: oToolConfig);
69
6
  /**
@@ -284,5 +221,4 @@ export declare class AnthropicIntelligenceTool extends AnthropicIntelligenceTool
284
221
  properties: {};
285
222
  };
286
223
  }
287
- export {};
288
224
  //# sourceMappingURL=anthropic-intelligence.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"anthropic-intelligence.tool.d.ts","sourceRoot":"","sources":["../../src/intelligence/anthropic-intelligence.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAS,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmG/D,qBAAa,yBAA0B,SAAQ,8BAAmB;IAChE,OAAO,CAAC,YAAY,CAA4B;gBAEpC,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"}
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,CAA4B;gBAEpC,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"}
@@ -1,20 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AnthropicIntelligenceTool = void 0;
4
- const o_core_1 = require("@olane/o-core");
5
- const o_tool_1 = require("@olane/o-tool");
6
- const intelligence_methods_1 = require("./methods/intelligence.methods");
7
- class AnthropicIntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
8
- defaultModel = 'claude-opus-4-20250514';
1
+ import { oAddress } from '@olane/o-core';
2
+ import { oVirtualTool } from '@olane/o-tool';
3
+ import { INTELLIGENCE_PARAMS } from './methods/intelligence.methods';
4
+ export class AnthropicIntelligenceTool extends oVirtualTool {
9
5
  constructor(config) {
10
6
  super({
11
7
  ...config,
12
- address: new o_core_1.oAddress('o://anthropic'),
8
+ address: new oAddress('o://anthropic'),
13
9
  description: 'Intelligence tool using Anthropic LLM suite of models',
14
10
  // shared parameters for all tools
15
- methods: intelligence_methods_1.INTELLIGENCE_PARAMS,
11
+ methods: INTELLIGENCE_PARAMS,
16
12
  dependencies: [],
17
13
  });
14
+ this.defaultModel = 'claude-opus-4-20250514';
18
15
  }
19
16
  /**
20
17
  * Chat completion with Anthropic
@@ -478,4 +475,3 @@ class AnthropicIntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNod
478
475
  };
479
476
  }
480
477
  }
481
- exports.AnthropicIntelligenceTool = AnthropicIntelligenceTool;
@@ -1,69 +1,6 @@
1
- import { oAddress, oRequest, oVirtualNode } from '@olane/o-core';
2
- import { oToolConfig, ToolResult } from '@olane/o-tool';
3
- declare const GeminiIntelligenceTool_base: (new (...args: any[]) => {
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 GeminiIntelligenceTool extends GeminiIntelligenceTool_base {
1
+ import { oRequest } from '@olane/o-core';
2
+ import { oToolConfig, oVirtualTool, ToolResult } from '@olane/o-tool';
3
+ export declare class GeminiIntelligenceTool extends oVirtualTool {
67
4
  private apiKey;
68
5
  private baseUrl;
69
6
  private defaultModel;
@@ -89,5 +26,4 @@ export declare class GeminiIntelligenceTool extends GeminiIntelligenceTool_base
89
26
  */
90
27
  _tool_status(request: oRequest): Promise<ToolResult>;
91
28
  }
92
- export {};
93
29
  //# sourceMappingURL=gemini-intelligence.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gemini-intelligence.tool.d.ts","sourceRoot":"","sources":["../../src/intelligence/gemini-intelligence.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAS,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiH/D,qBAAa,sBAAuB,SAAQ,2BAAmB;IAC7D,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,YAAY,CAAU;gBAElB,MAAM,EAAE,WAAW;IAU/B;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAkF9D;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAmF5D;;OAEG;IACG,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA0C/D;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA4C9D;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAiC3D"}
1
+ {"version":3,"file":"gemini-intelligence.tool.d.ts","sourceRoot":"","sources":["../../src/intelligence/gemini-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;AAiH7E,qBAAa,sBAAuB,SAAQ,YAAY;IACtD,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,YAAY,CAAU;gBAElB,MAAM,EAAE,WAAW;IAU/B;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAkF9D;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAmF5D;;OAEG;IACG,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA0C/D;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA4C9D;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAiC3D"}
@@ -1,19 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GeminiIntelligenceTool = void 0;
4
- const o_core_1 = require("@olane/o-core");
5
- const o_tool_1 = require("@olane/o-tool");
6
- const intelligence_methods_1 = require("./methods/intelligence.methods");
7
- class GeminiIntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
8
- apiKey;
9
- baseUrl;
10
- defaultModel;
1
+ import { oAddress } from '@olane/o-core';
2
+ import { oVirtualTool } from '@olane/o-tool';
3
+ import { INTELLIGENCE_PARAMS } from './methods/intelligence.methods';
4
+ export class GeminiIntelligenceTool extends oVirtualTool {
11
5
  constructor(config) {
12
6
  super({
13
7
  ...config,
14
- address: new o_core_1.oAddress('o://gemini'),
8
+ address: new oAddress('o://gemini'),
15
9
  description: 'Intelligence tool using Google Gemini suite of models',
16
- methods: intelligence_methods_1.INTELLIGENCE_PARAMS,
10
+ methods: INTELLIGENCE_PARAMS,
17
11
  dependencies: [],
18
12
  });
19
13
  }
@@ -271,4 +265,3 @@ class GeminiIntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode)
271
265
  }
272
266
  }
273
267
  }
274
- exports.GeminiIntelligenceTool = GeminiIntelligenceTool;
@@ -1,21 +1,5 @@
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("./ollama-intelligence.tool"), exports);
18
- __exportStar(require("./openai-intelligence.tool"), exports);
19
- __exportStar(require("./anthropic-intelligence.tool"), exports);
20
- __exportStar(require("./gemini-intelligence.tool"), exports);
21
- __exportStar(require("./intelligence.tool"), exports);
1
+ export * from './ollama-intelligence.tool';
2
+ export * from './openai-intelligence.tool';
3
+ export * from './anthropic-intelligence.tool';
4
+ export * from './gemini-intelligence.tool';
5
+ export * from './intelligence.tool';
@@ -1,76 +1,11 @@
1
- import { oToolConfig } from '@olane/o-tool';
2
- import { oAddress, oResponse, oVirtualNode } from '@olane/o-core';
1
+ import { oToolConfig, oVirtualTool } from '@olane/o-tool';
3
2
  import { oRequest } from '@olane/o-core';
4
3
  import { ToolResult } from '@olane/o-tool';
5
- declare const IntelligenceTool_base: (new (...args: any[]) => {
6
- validateToolCall(oRequest: oRequest): boolean;
7
- handleProtocol(address: oAddress): Promise<void>;
8
- initialize(): Promise<void>;
9
- use(address: oAddress, data: {
10
- [key: string]: unknown;
11
- }, config?: import("@olane/o-core").UseOptions | undefined): Promise<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
- myTools(): string[];
16
- myToolParams(tool: string): Record<string, any>;
17
- callMyTool(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<ToolResult>;
18
- index(): Promise<{
19
- provider: string;
20
- summary: string;
21
- } | {
22
- summary: string | null;
23
- provider?: undefined;
24
- }>;
25
- _tool_index_network(request: oRequest): Promise<ToolResult>;
26
- whoami(): Promise<{
27
- tools: string[];
28
- description: string;
29
- }>;
30
- findMissingParams(methodName: string, params: any): import("@olane/o-protocol").oParameter[];
31
- readonly config: import("@olane/o-core").CoreConfig;
32
- p2pNode: import("libp2p", { with: { "resolution-mode": "import" } }).Libp2p<import("@libp2p/interface", { with: { "resolution-mode": "import" } }).ServiceMap>;
33
- logger: import("@olane/o-core").Logger;
34
- networkConfig: import("@olane/o-config").Libp2pConfig;
35
- address: oAddress;
36
- readonly staticAddress: oAddress;
37
- peerId: import("@libp2p/interface-peer-id", { with: { "resolution-mode": "import" } }).PeerId;
38
- state: import("@olane/o-core").NodeState;
39
- errors: Error[];
40
- connectionManager: import("@olane/o-core").oConnectionManager;
41
- leaders: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
42
- addressResolution: import("@olane/o-core").oAddressResolution;
43
- readonly description: string;
44
- dependencies: import("@olane/o-core").oDependency[];
45
- methods: {
46
- [key: string]: import("@olane/o-protocol").oMethod;
47
- };
48
- successCount: number;
49
- errorCount: number;
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
- handleStaticAddressTranslation(addressInput: oAddress): Promise<oAddress>;
56
- translateAddress(addressWithLeaderTransports: oAddress): Promise<{
57
- nextHopAddress: oAddress;
58
- targetAddress: oAddress;
59
- }>;
60
- advertiseToNetwork(): Promise<void>;
61
- connectToParent(): Promise<void>;
62
- register(): Promise<void>;
63
- connect(nextHopAddress: oAddress, targetAddress: oAddress): Promise<import("@olane/o-core").oConnection>;
64
- teardown(): Promise<void>;
65
- start(): Promise<void>;
66
- stop(): Promise<void>;
67
- }) & typeof oVirtualNode;
68
- export declare class IntelligenceTool extends IntelligenceTool_base {
4
+ export declare class IntelligenceTool extends oVirtualTool {
69
5
  private roundRobinIndex;
70
6
  constructor(config: oToolConfig);
71
7
  requestMissingData(): Promise<ToolResult>;
72
8
  chooseIntelligence(request: oRequest): Promise<ToolResult>;
73
9
  _tool_prompt(request: oRequest): Promise<ToolResult>;
74
10
  }
75
- export {};
76
11
  //# sourceMappingURL=intelligence.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"intelligence.tool.d.ts","sourceRoot":"","sources":["../../src/intelligence/intelligence.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAM3C,qBAAa,gBAAiB,SAAQ,qBAAmB;IACvD,OAAO,CAAC,eAAe,CAAK;gBAChB,MAAM,EAAE,WAAW;IAkDzB,kBAAkB,IAAI,OAAO,CAAC,UAAU,CAAC;IA2BzC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAwB1D,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAkB3D"}
1
+ {"version":3,"file":"intelligence.tool.d.ts","sourceRoot":"","sources":["../../src/intelligence/intelligence.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,OAAO,CAAC,eAAe,CAAK;gBAChB,MAAM,EAAE,WAAW;IAkDzB,kBAAkB,IAAI,OAAO,CAAC,UAAU,CAAC;IA2BzC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAwB1D,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAkB3D"}
@@ -1,18 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IntelligenceTool = void 0;
4
- const o_tool_1 = require("@olane/o-tool");
5
- const o_core_1 = require("@olane/o-core");
6
- const anthropic_intelligence_tool_1 = require("./anthropic-intelligence.tool");
7
- const openai_intelligence_tool_1 = require("./openai-intelligence.tool");
8
- const ollama_intelligence_tool_1 = require("./ollama-intelligence.tool");
9
- const perplexity_intelligence_tool_1 = require("./perplexity-intelligence.tool");
10
- class IntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
11
- roundRobinIndex = 0;
1
+ import { oVirtualTool } from '@olane/o-tool';
2
+ import { oAddress } from '@olane/o-core';
3
+ import { AnthropicIntelligenceTool } from './anthropic-intelligence.tool';
4
+ import { OpenAIIntelligenceTool } from './openai-intelligence.tool';
5
+ import { OllamaIntelligenceTool } from './ollama-intelligence.tool';
6
+ import { PerplexityIntelligenceTool } from './perplexity-intelligence.tool';
7
+ export class IntelligenceTool extends oVirtualTool {
12
8
  constructor(config) {
13
9
  super({
14
10
  ...config,
15
- address: new o_core_1.oAddress('o://intelligence'),
11
+ address: new oAddress('o://intelligence'),
16
12
  description: config.description ||
17
13
  'Tool to help route LLM requests to the best intelligence tool',
18
14
  dependencies: [
@@ -28,22 +24,23 @@ class IntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
28
24
  },
29
25
  ],
30
26
  });
31
- this.addChildNode(new anthropic_intelligence_tool_1.AnthropicIntelligenceTool({
27
+ this.roundRobinIndex = 0;
28
+ this.addChildNode(new AnthropicIntelligenceTool({
32
29
  ...config,
33
30
  parent: null,
34
31
  leader: null,
35
32
  }));
36
- this.addChildNode(new openai_intelligence_tool_1.OpenAIIntelligenceTool({
33
+ this.addChildNode(new OpenAIIntelligenceTool({
37
34
  ...config,
38
35
  parent: null,
39
36
  leader: null,
40
37
  }));
41
- this.addChildNode(new ollama_intelligence_tool_1.OllamaIntelligenceTool({
38
+ this.addChildNode(new OllamaIntelligenceTool({
42
39
  ...config,
43
40
  parent: null,
44
41
  leader: null,
45
42
  }));
46
- this.addChildNode(new perplexity_intelligence_tool_1.PerplexityIntelligenceTool({
43
+ this.addChildNode(new PerplexityIntelligenceTool({
47
44
  ...config,
48
45
  parent: null,
49
46
  leader: null,
@@ -52,7 +49,7 @@ class IntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
52
49
  async requestMissingData() {
53
50
  // if the anthropic key is not in the vault, ask the human
54
51
  this.logger.info('Anthropic API key not found in vault, asking human');
55
- const humanResponse = await this.use(new o_core_1.oAddress('o://human'), {
52
+ const humanResponse = await this.use(new oAddress('o://human'), {
56
53
  method: 'question',
57
54
  params: {
58
55
  question: 'Enter the anthropic api key',
@@ -61,7 +58,7 @@ class IntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
61
58
  // process the human response
62
59
  const { answer } = humanResponse.result.data;
63
60
  this.logger.info('Human answer: ', answer);
64
- await this.use(new o_core_1.oAddress('o://memory'), {
61
+ await this.use(new oAddress('o://memory'), {
65
62
  method: 'put',
66
63
  params: {
67
64
  key: 'anthropic-api-key',
@@ -75,7 +72,7 @@ class IntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
75
72
  }
76
73
  async chooseIntelligence(request) {
77
74
  // check to see if anthropic key is in vault
78
- const response = await this.use(new o_core_1.oAddress('o://memory'), {
75
+ const response = await this.use(new oAddress('o://memory'), {
79
76
  method: 'get',
80
77
  params: {
81
78
  key: 'anthropic-api-key',
@@ -98,7 +95,7 @@ class IntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
98
95
  async _tool_prompt(request) {
99
96
  const { prompt } = request.params;
100
97
  const intelligence = await this.chooseIntelligence(request);
101
- const response = await this.use(new o_core_1.oAddress(intelligence.choice), {
98
+ const response = await this.use(new oAddress(intelligence.choice), {
102
99
  method: 'completion',
103
100
  params: {
104
101
  model: 'claude-sonnet-4-20250514',
@@ -114,4 +111,3 @@ class IntelligenceTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
114
111
  return response.result.data;
115
112
  }
116
113
  }
117
- exports.IntelligenceTool = IntelligenceTool;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INTELLIGENCE_PARAMS = void 0;
4
- exports.INTELLIGENCE_PARAMS = {
1
+ export const INTELLIGENCE_PARAMS = {
5
2
  completion: {
6
3
  name: 'completion',
7
4
  description: 'Completion',