@olane/o-tool-registry 0.1.0 → 0.1.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.
- 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 +3 -4
- package/dist/apple/index.js +1 -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 +4 -5
- package/dist/auth/index.js +0 -1
- package/dist/auth/interfaces/index.js +0 -1
- package/dist/auth/interfaces/oAuth-tokens.interface.js +0 -1
- package/dist/auth/interfaces/oAuth-user-info.interface.js +0 -1
- package/dist/auth/interfaces/oAuth.config.js +0 -1
- package/dist/auth/methods/auth.methods.js +0 -1
- package/dist/auth/oAuth.tool.js +15 -6
- 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 +3 -4
- package/dist/embeddings/huggingface-text-embeddings.tool.d.ts.map +1 -1
- package/dist/embeddings/huggingface-text-embeddings.tool.js +1 -3
- package/dist/embeddings/index.js +0 -1
- package/dist/embeddings/methods/text-embeddings.method.js +0 -1
- 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 +3 -4
- package/dist/index.js +0 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +0 -1
- package/dist/intelligence/anthropic-intelligence.tool.d.ts +33 -67
- package/dist/intelligence/anthropic-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/anthropic-intelligence.tool.js +39 -9
- package/dist/intelligence/gemini-intelligence.tool.d.ts +18 -67
- package/dist/intelligence/gemini-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/gemini-intelligence.tool.js +24 -11
- package/dist/intelligence/index.js +0 -1
- 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 +10 -6
- package/dist/intelligence/methods/intelligence.methods.js +0 -1
- package/dist/intelligence/ollama-intelligence.tool.d.ts +24 -67
- package/dist/intelligence/ollama-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/ollama-intelligence.tool.js +34 -10
- package/dist/intelligence/openai-intelligence.tool.d.ts +18 -67
- package/dist/intelligence/openai-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/openai-intelligence.tool.js +25 -12
- package/dist/intelligence/perplexity-intelligence.tool.d.ts +18 -67
- package/dist/intelligence/perplexity-intelligence.tool.d.ts.map +1 -1
- package/dist/intelligence/perplexity-intelligence.tool.js +26 -9
- package/dist/mcp/index.js +0 -1
- 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 +17 -4
- 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 +8 -5
- package/dist/mcp/methods/mcp-bridge.methods.js +0 -1
- package/dist/nlp/index.js +0 -1
- package/dist/nlp/methods/nlp.methods.js +0 -1
- 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 +3 -4
- package/dist/vector-store/index.js +0 -1
- package/dist/vector-store/langchain-memory.vector-store.tool.d.ts.map +1 -1
- package/dist/vector-store/langchain-memory.vector-store.tool.js +0 -2
- package/dist/vector-store/methods/vector-store.methods.js +0 -1
- 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 +3 -4
- package/package.json +16 -22
- 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,76 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { oToolConfig, ToolResult } from '@olane/o-tool';
|
|
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): Promise<import("@olane/o-core").oResponse>;
|
|
10
|
-
handleStream(streamData: import("@olane/o-config/dist").IncomingStreamData): Promise<void>;
|
|
11
|
-
execute(req: oRequest, stream?: import("@olane/o-config/dist").Stream): Promise<import("@olane/o-tool").RunResult>;
|
|
12
|
-
run(request: oRequest, stream?: import("@olane/o-config/dist").Stream): Promise<import("@olane/o-tool").RunResult>;
|
|
13
|
-
myTools(): string[];
|
|
14
|
-
myToolParams(tool: string): Record<string, any>;
|
|
15
|
-
callMyTool(request: oRequest, stream?: import("@olane/o-config/dist").Stream): 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/dist").oParameter[];
|
|
29
|
-
readonly config: import("@olane/o-core").CoreConfig;
|
|
30
|
-
p2pNode: import("@olane/o-config/dist").Libp2p;
|
|
31
|
-
logger: import("@olane/o-core").Logger;
|
|
32
|
-
networkConfig: import("@olane/o-config/dist").Libp2pConfig;
|
|
33
|
-
address: oAddress;
|
|
34
|
-
readonly staticAddress: oAddress;
|
|
35
|
-
peerId: import("@olane/o-config/dist").PeerId;
|
|
36
|
-
state: import("@olane/o-core").NodeState;
|
|
37
|
-
errors: Error[];
|
|
38
|
-
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
39
|
-
leaders: import("@olane/o-config/dist").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/dist").oMethod;
|
|
45
|
-
};
|
|
46
|
-
successCount: number;
|
|
47
|
-
errorCount: number;
|
|
48
|
-
get type(): import("@olane/o-core").NodeType;
|
|
49
|
-
get transports(): string[];
|
|
50
|
-
get parent(): oAddress | null;
|
|
51
|
-
get parentTransports(): import("@olane/o-config/dist").Multiaddr[];
|
|
52
|
-
getTransports(address: oAddress): import("@olane/o-config/dist").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);
|
|
6
|
+
/**
|
|
7
|
+
* Chat completion with Anthropic
|
|
8
|
+
*/
|
|
69
9
|
_tool_completion(request: oRequest): Promise<ToolResult>;
|
|
10
|
+
/**
|
|
11
|
+
* Generate text with Anthropic (using messages endpoint)
|
|
12
|
+
*/
|
|
70
13
|
_tool_generate(request: oRequest): Promise<ToolResult>;
|
|
14
|
+
/**
|
|
15
|
+
* List available models
|
|
16
|
+
*/
|
|
71
17
|
_tool_list_models(request: oRequest): Promise<ToolResult>;
|
|
18
|
+
/**
|
|
19
|
+
* Get model information
|
|
20
|
+
*/
|
|
72
21
|
_tool_model_info(request: oRequest): Promise<ToolResult>;
|
|
22
|
+
/**
|
|
23
|
+
* Check API status
|
|
24
|
+
*/
|
|
73
25
|
_tool_status(request: oRequest): Promise<ToolResult>;
|
|
26
|
+
/**
|
|
27
|
+
* Parameter definitions for completion
|
|
28
|
+
*/
|
|
74
29
|
_params_completion(): {
|
|
75
30
|
type: string;
|
|
76
31
|
properties: {
|
|
@@ -177,6 +132,9 @@ export declare class AnthropicIntelligenceTool extends AnthropicIntelligenceTool
|
|
|
177
132
|
};
|
|
178
133
|
required: string[];
|
|
179
134
|
};
|
|
135
|
+
/**
|
|
136
|
+
* Parameter definitions for generate
|
|
137
|
+
*/
|
|
180
138
|
_params_generate(): {
|
|
181
139
|
type: string;
|
|
182
140
|
properties: {
|
|
@@ -235,10 +193,16 @@ export declare class AnthropicIntelligenceTool extends AnthropicIntelligenceTool
|
|
|
235
193
|
};
|
|
236
194
|
required: string[];
|
|
237
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Parameter definitions for list_models
|
|
198
|
+
*/
|
|
238
199
|
_params_list_models(): {
|
|
239
200
|
type: string;
|
|
240
201
|
properties: {};
|
|
241
202
|
};
|
|
203
|
+
/**
|
|
204
|
+
* Parameter definitions for model_info
|
|
205
|
+
*/
|
|
242
206
|
_params_model_info(): {
|
|
243
207
|
type: string;
|
|
244
208
|
properties: {
|
|
@@ -249,10 +213,12 @@ export declare class AnthropicIntelligenceTool extends AnthropicIntelligenceTool
|
|
|
249
213
|
};
|
|
250
214
|
};
|
|
251
215
|
};
|
|
216
|
+
/**
|
|
217
|
+
* Parameter definitions for status
|
|
218
|
+
*/
|
|
252
219
|
_params_status(): {
|
|
253
220
|
type: string;
|
|
254
221
|
properties: {};
|
|
255
222
|
};
|
|
256
223
|
}
|
|
257
|
-
export {};
|
|
258
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,
|
|
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,17 +1,21 @@
|
|
|
1
|
-
import { oAddress
|
|
2
|
-
import {
|
|
1
|
+
import { oAddress } from '@olane/o-core';
|
|
2
|
+
import { oVirtualTool } from '@olane/o-tool';
|
|
3
3
|
import { INTELLIGENCE_PARAMS } from './methods/intelligence.methods';
|
|
4
|
-
export class AnthropicIntelligenceTool extends
|
|
5
|
-
defaultModel = 'claude-opus-4-20250514';
|
|
4
|
+
export class AnthropicIntelligenceTool extends oVirtualTool {
|
|
6
5
|
constructor(config) {
|
|
7
6
|
super({
|
|
8
7
|
...config,
|
|
9
8
|
address: new oAddress('o://anthropic'),
|
|
10
9
|
description: 'Intelligence tool using Anthropic LLM suite of models',
|
|
10
|
+
// shared parameters for all tools
|
|
11
11
|
methods: INTELLIGENCE_PARAMS,
|
|
12
12
|
dependencies: [],
|
|
13
13
|
});
|
|
14
|
+
this.defaultModel = 'claude-opus-4-20250514';
|
|
14
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Chat completion with Anthropic
|
|
18
|
+
*/
|
|
15
19
|
async _tool_completion(request) {
|
|
16
20
|
try {
|
|
17
21
|
const params = request.params;
|
|
@@ -51,7 +55,7 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
51
55
|
error: `Anthropic API error: ${response.status} - ${errorText}`,
|
|
52
56
|
};
|
|
53
57
|
}
|
|
54
|
-
const result = await response.json();
|
|
58
|
+
const result = (await response.json());
|
|
55
59
|
return {
|
|
56
60
|
message: result.content[0]?.text || '',
|
|
57
61
|
model: result.model,
|
|
@@ -67,6 +71,9 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
67
71
|
};
|
|
68
72
|
}
|
|
69
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Generate text with Anthropic (using messages endpoint)
|
|
76
|
+
*/
|
|
70
77
|
async _tool_generate(request) {
|
|
71
78
|
try {
|
|
72
79
|
const params = request.params;
|
|
@@ -113,7 +120,7 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
113
120
|
error: `Anthropic API error: ${response.status} - ${errorText}`,
|
|
114
121
|
};
|
|
115
122
|
}
|
|
116
|
-
const result = await response.json();
|
|
123
|
+
const result = (await response.json());
|
|
117
124
|
return {
|
|
118
125
|
success: true,
|
|
119
126
|
response: result.content[0]?.text || '',
|
|
@@ -130,6 +137,9 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
130
137
|
};
|
|
131
138
|
}
|
|
132
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* List available models
|
|
142
|
+
*/
|
|
133
143
|
async _tool_list_models(request) {
|
|
134
144
|
try {
|
|
135
145
|
const params = request.params;
|
|
@@ -154,7 +164,7 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
154
164
|
error: `Anthropic API error: ${response.status} - ${errorText}`,
|
|
155
165
|
};
|
|
156
166
|
}
|
|
157
|
-
const result = await response.json();
|
|
167
|
+
const result = (await response.json());
|
|
158
168
|
return {
|
|
159
169
|
success: true,
|
|
160
170
|
response: result.data,
|
|
@@ -168,6 +178,9 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
168
178
|
};
|
|
169
179
|
}
|
|
170
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* Get model information
|
|
183
|
+
*/
|
|
171
184
|
async _tool_model_info(request) {
|
|
172
185
|
try {
|
|
173
186
|
const params = request.params;
|
|
@@ -192,7 +205,7 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
192
205
|
error: `Anthropic API error: ${response.status} - ${errorText}`,
|
|
193
206
|
};
|
|
194
207
|
}
|
|
195
|
-
const result = await response.json();
|
|
208
|
+
const result = (await response.json());
|
|
196
209
|
const modelInfo = result.data.find((m) => m.id === model);
|
|
197
210
|
if (!modelInfo) {
|
|
198
211
|
return {
|
|
@@ -213,6 +226,9 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
213
226
|
};
|
|
214
227
|
}
|
|
215
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Check API status
|
|
231
|
+
*/
|
|
216
232
|
async _tool_status(request) {
|
|
217
233
|
try {
|
|
218
234
|
const params = request.params;
|
|
@@ -249,6 +265,9 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
249
265
|
};
|
|
250
266
|
}
|
|
251
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Parameter definitions for completion
|
|
270
|
+
*/
|
|
252
271
|
_params_completion() {
|
|
253
272
|
return {
|
|
254
273
|
type: 'object',
|
|
@@ -359,6 +378,9 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
359
378
|
required: ['messages'],
|
|
360
379
|
};
|
|
361
380
|
}
|
|
381
|
+
/**
|
|
382
|
+
* Parameter definitions for generate
|
|
383
|
+
*/
|
|
362
384
|
_params_generate() {
|
|
363
385
|
return {
|
|
364
386
|
type: 'object',
|
|
@@ -419,12 +441,18 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
419
441
|
required: ['prompt'],
|
|
420
442
|
};
|
|
421
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
* Parameter definitions for list_models
|
|
446
|
+
*/
|
|
422
447
|
_params_list_models() {
|
|
423
448
|
return {
|
|
424
449
|
type: 'object',
|
|
425
450
|
properties: {},
|
|
426
451
|
};
|
|
427
452
|
}
|
|
453
|
+
/**
|
|
454
|
+
* Parameter definitions for model_info
|
|
455
|
+
*/
|
|
428
456
|
_params_model_info() {
|
|
429
457
|
return {
|
|
430
458
|
type: 'object',
|
|
@@ -437,6 +465,9 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
437
465
|
},
|
|
438
466
|
};
|
|
439
467
|
}
|
|
468
|
+
/**
|
|
469
|
+
* Parameter definitions for status
|
|
470
|
+
*/
|
|
440
471
|
_params_status() {
|
|
441
472
|
return {
|
|
442
473
|
type: 'object',
|
|
@@ -444,4 +475,3 @@ export class AnthropicIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
444
475
|
};
|
|
445
476
|
}
|
|
446
477
|
}
|
|
447
|
-
//# sourceMappingURL=anthropic-intelligence.tool.js.map
|
|
@@ -1,78 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { oToolConfig, ToolResult } from '@olane/o-tool';
|
|
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): Promise<import("@olane/o-core").oResponse>;
|
|
10
|
-
handleStream(streamData: import("@olane/o-config/dist").IncomingStreamData): Promise<void>;
|
|
11
|
-
execute(req: oRequest, stream?: import("@olane/o-config/dist").Stream): Promise<import("@olane/o-tool").RunResult>;
|
|
12
|
-
run(request: oRequest, stream?: import("@olane/o-config/dist").Stream): Promise<import("@olane/o-tool").RunResult>;
|
|
13
|
-
myTools(): string[];
|
|
14
|
-
myToolParams(tool: string): Record<string, any>;
|
|
15
|
-
callMyTool(request: oRequest, stream?: import("@olane/o-config/dist").Stream): 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/dist").oParameter[];
|
|
29
|
-
readonly config: import("@olane/o-core").CoreConfig;
|
|
30
|
-
p2pNode: import("@olane/o-config/dist").Libp2p;
|
|
31
|
-
logger: import("@olane/o-core").Logger;
|
|
32
|
-
networkConfig: import("@olane/o-config/dist").Libp2pConfig;
|
|
33
|
-
address: oAddress;
|
|
34
|
-
readonly staticAddress: oAddress;
|
|
35
|
-
peerId: import("@olane/o-config/dist").PeerId;
|
|
36
|
-
state: import("@olane/o-core").NodeState;
|
|
37
|
-
errors: Error[];
|
|
38
|
-
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
39
|
-
leaders: import("@olane/o-config/dist").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/dist").oMethod;
|
|
45
|
-
};
|
|
46
|
-
successCount: number;
|
|
47
|
-
errorCount: number;
|
|
48
|
-
get type(): import("@olane/o-core").NodeType;
|
|
49
|
-
get transports(): string[];
|
|
50
|
-
get parent(): oAddress | null;
|
|
51
|
-
get parentTransports(): import("@olane/o-config/dist").Multiaddr[];
|
|
52
|
-
getTransports(address: oAddress): import("@olane/o-config/dist").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;
|
|
70
7
|
constructor(config: oToolConfig);
|
|
8
|
+
/**
|
|
9
|
+
* Chat completion with Gemini
|
|
10
|
+
*/
|
|
71
11
|
_tool_completion(request: oRequest): Promise<ToolResult>;
|
|
12
|
+
/**
|
|
13
|
+
* Generate text with Gemini
|
|
14
|
+
*/
|
|
72
15
|
_tool_generate(request: oRequest): Promise<ToolResult>;
|
|
16
|
+
/**
|
|
17
|
+
* List available models
|
|
18
|
+
*/
|
|
73
19
|
_tool_list_models(request: oRequest): Promise<ToolResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Get model information
|
|
22
|
+
*/
|
|
74
23
|
_tool_model_info(request: oRequest): Promise<ToolResult>;
|
|
24
|
+
/**
|
|
25
|
+
* Check Gemini API status
|
|
26
|
+
*/
|
|
75
27
|
_tool_status(request: oRequest): Promise<ToolResult>;
|
|
76
28
|
}
|
|
77
|
-
export {};
|
|
78
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,
|
|
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,10 +1,7 @@
|
|
|
1
|
-
import { oAddress
|
|
2
|
-
import {
|
|
1
|
+
import { oAddress } from '@olane/o-core';
|
|
2
|
+
import { oVirtualTool } from '@olane/o-tool';
|
|
3
3
|
import { INTELLIGENCE_PARAMS } from './methods/intelligence.methods';
|
|
4
|
-
export class GeminiIntelligenceTool extends
|
|
5
|
-
apiKey;
|
|
6
|
-
baseUrl;
|
|
7
|
-
defaultModel;
|
|
4
|
+
export class GeminiIntelligenceTool extends oVirtualTool {
|
|
8
5
|
constructor(config) {
|
|
9
6
|
super({
|
|
10
7
|
...config,
|
|
@@ -14,6 +11,9 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
14
11
|
dependencies: [],
|
|
15
12
|
});
|
|
16
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Chat completion with Gemini
|
|
16
|
+
*/
|
|
17
17
|
async _tool_completion(request) {
|
|
18
18
|
try {
|
|
19
19
|
const params = request.params;
|
|
@@ -30,6 +30,7 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
30
30
|
error: '"messages" array is required',
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
+
// Convert messages to Gemini format
|
|
33
34
|
const contents = messages.map((msg) => ({
|
|
34
35
|
role: msg.role === 'assistant' ? 'model' : 'user',
|
|
35
36
|
parts: [{ text: msg.content }],
|
|
@@ -59,7 +60,7 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
59
60
|
error: `Gemini API error: ${response.status} - ${errorText}`,
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
|
-
const result = await response.json();
|
|
63
|
+
const result = (await response.json());
|
|
63
64
|
if (!result.candidates || result.candidates.length === 0) {
|
|
64
65
|
return {
|
|
65
66
|
success: false,
|
|
@@ -82,6 +83,9 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
82
83
|
};
|
|
83
84
|
}
|
|
84
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Generate text with Gemini
|
|
88
|
+
*/
|
|
85
89
|
async _tool_generate(request) {
|
|
86
90
|
try {
|
|
87
91
|
const params = request.params;
|
|
@@ -98,6 +102,7 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
98
102
|
error: 'Prompt is required',
|
|
99
103
|
};
|
|
100
104
|
}
|
|
105
|
+
// Combine system and user prompt
|
|
101
106
|
const fullPrompt = system ? `${system}\n\n${prompt}` : prompt;
|
|
102
107
|
const generateRequest = {
|
|
103
108
|
contents: [
|
|
@@ -128,7 +133,7 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
128
133
|
error: `Gemini API error: ${response.status} - ${errorText}`,
|
|
129
134
|
};
|
|
130
135
|
}
|
|
131
|
-
const result = await response.json();
|
|
136
|
+
const result = (await response.json());
|
|
132
137
|
if (!result.candidates || result.candidates.length === 0) {
|
|
133
138
|
return {
|
|
134
139
|
success: false,
|
|
@@ -151,6 +156,9 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
151
156
|
};
|
|
152
157
|
}
|
|
153
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* List available models
|
|
161
|
+
*/
|
|
154
162
|
async _tool_list_models(request) {
|
|
155
163
|
try {
|
|
156
164
|
if (!this.apiKey) {
|
|
@@ -172,7 +180,7 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
172
180
|
error: `Gemini API error: ${response.status} - ${errorText}`,
|
|
173
181
|
};
|
|
174
182
|
}
|
|
175
|
-
const result = await response.json();
|
|
183
|
+
const result = (await response.json());
|
|
176
184
|
return {
|
|
177
185
|
success: true,
|
|
178
186
|
models: result.models,
|
|
@@ -185,6 +193,9 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
185
193
|
};
|
|
186
194
|
}
|
|
187
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* Get model information
|
|
198
|
+
*/
|
|
188
199
|
async _tool_model_info(request) {
|
|
189
200
|
try {
|
|
190
201
|
const params = request.params;
|
|
@@ -208,7 +219,7 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
208
219
|
error: `Gemini API error: ${response.status} - ${errorText}`,
|
|
209
220
|
};
|
|
210
221
|
}
|
|
211
|
-
const result = await response.json();
|
|
222
|
+
const result = (await response.json());
|
|
212
223
|
return {
|
|
213
224
|
success: true,
|
|
214
225
|
model_info: result,
|
|
@@ -221,6 +232,9 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
221
232
|
};
|
|
222
233
|
}
|
|
223
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* Check Gemini API status
|
|
237
|
+
*/
|
|
224
238
|
async _tool_status(request) {
|
|
225
239
|
try {
|
|
226
240
|
if (!this.apiKey) {
|
|
@@ -251,4 +265,3 @@ export class GeminiIntelligenceTool extends oTool(oVirtualNode) {
|
|
|
251
265
|
}
|
|
252
266
|
}
|
|
253
267
|
}
|
|
254
|
-
//# sourceMappingURL=gemini-intelligence.tool.js.map
|
|
@@ -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
|
|
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): Promise<oResponse>;
|
|
12
|
-
handleStream(streamData: import("@olane/o-config/dist").IncomingStreamData): Promise<void>;
|
|
13
|
-
execute(req: oRequest, stream?: import("@olane/o-config/dist").Stream): Promise<import("@olane/o-tool").RunResult>;
|
|
14
|
-
run(request: oRequest, stream?: import("@olane/o-config/dist").Stream): Promise<import("@olane/o-tool").RunResult>;
|
|
15
|
-
myTools(): string[];
|
|
16
|
-
myToolParams(tool: string): Record<string, any>;
|
|
17
|
-
callMyTool(request: oRequest, stream?: import("@olane/o-config/dist").Stream): 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/dist").oParameter[];
|
|
31
|
-
readonly config: import("@olane/o-core").CoreConfig;
|
|
32
|
-
p2pNode: import("@olane/o-config/dist").Libp2p;
|
|
33
|
-
logger: import("@olane/o-core").Logger;
|
|
34
|
-
networkConfig: import("@olane/o-config/dist").Libp2pConfig;
|
|
35
|
-
address: oAddress;
|
|
36
|
-
readonly staticAddress: oAddress;
|
|
37
|
-
peerId: import("@olane/o-config/dist").PeerId;
|
|
38
|
-
state: import("@olane/o-core").NodeState;
|
|
39
|
-
errors: Error[];
|
|
40
|
-
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
41
|
-
leaders: import("@olane/o-config/dist").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/dist").oMethod;
|
|
47
|
-
};
|
|
48
|
-
successCount: number;
|
|
49
|
-
errorCount: number;
|
|
50
|
-
get type(): import("@olane/o-core").NodeType;
|
|
51
|
-
get transports(): string[];
|
|
52
|
-
get parent(): oAddress | null;
|
|
53
|
-
get parentTransports(): import("@olane/o-config/dist").Multiaddr[];
|
|
54
|
-
getTransports(address: oAddress): import("@olane/o-config/dist").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,
|
|
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"}
|