@olane/o-tool-registry 0.1.1 → 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 +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.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.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,70 +1,5 @@
|
|
|
1
|
-
import { oToolConfig } from '@olane/o-tool';
|
|
2
|
-
|
|
3
|
-
declare const AppleTool_base: (new (...args: any[]) => {
|
|
4
|
-
validateToolCall(oRequest: import("@olane/o-core").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: import("@olane/o-core").oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").RunResult>;
|
|
12
|
-
run(request: import("@olane/o-core").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: import("@olane/o-core").oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").ToolResult>;
|
|
16
|
-
index(): Promise<{
|
|
17
|
-
provider: string;
|
|
18
|
-
summary: string;
|
|
19
|
-
} | {
|
|
20
|
-
summary: string | null;
|
|
21
|
-
provider?: undefined;
|
|
22
|
-
}>;
|
|
23
|
-
_tool_index_network(request: import("@olane/o-core").oRequest): Promise<import("@olane/o-tool").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 AppleTool extends AppleTool_base {
|
|
1
|
+
import { oToolConfig, oVirtualTool } from '@olane/o-tool';
|
|
2
|
+
export declare class AppleTool extends oVirtualTool {
|
|
67
3
|
constructor(config: oToolConfig);
|
|
68
4
|
}
|
|
69
|
-
export {};
|
|
70
5
|
//# sourceMappingURL=apple.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apple.tool.d.ts","sourceRoot":"","sources":["../../src/apple/apple.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"apple.tool.d.ts","sourceRoot":"","sources":["../../src/apple/apple.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGjE,qBAAa,SAAU,SAAQ,YAAY;gBAC7B,MAAM,EAAE,WAAW;CAOhC"}
|
package/dist/apple/apple.tool.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const o_tool_1 = require("@olane/o-tool");
|
|
5
|
-
const o_core_1 = require("@olane/o-core");
|
|
6
|
-
class AppleTool 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
|
+
export class AppleTool extends oVirtualTool {
|
|
7
4
|
constructor(config) {
|
|
8
5
|
super({
|
|
9
6
|
...config,
|
|
10
|
-
address: new
|
|
7
|
+
address: new oAddress('o://apple'),
|
|
11
8
|
description: config.description || 'Base class tool for Apple tools',
|
|
12
9
|
});
|
|
13
10
|
}
|
|
14
11
|
}
|
|
15
|
-
exports.AppleTool = AppleTool;
|
package/dist/apple/index.d.ts
CHANGED
package/dist/apple/index.js
CHANGED
|
@@ -1,69 +1,6 @@
|
|
|
1
|
-
import { oToolConfig } 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<import("@olane/o-tool").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<import("@olane/o-tool").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 NotesTool extends NotesTool_base {
|
|
1
|
+
import { oToolConfig, oVirtualTool } from '@olane/o-tool';
|
|
2
|
+
import { oRequest } from '@olane/o-core';
|
|
3
|
+
export declare class NotesTool extends oVirtualTool {
|
|
67
4
|
private jxaScriptPath;
|
|
68
5
|
constructor(config: oToolConfig);
|
|
69
6
|
private executeJxaScript;
|
|
@@ -74,5 +11,4 @@ export declare class NotesTool extends NotesTool_base {
|
|
|
74
11
|
_tool_get_folders(request: oRequest): Promise<any>;
|
|
75
12
|
_tool_create_folder(request: oRequest): Promise<any>;
|
|
76
13
|
}
|
|
77
|
-
export {};
|
|
78
14
|
//# sourceMappingURL=notes.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notes.tool.d.ts","sourceRoot":"","sources":["../../src/apple/notes.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"notes.tool.d.ts","sourceRoot":"","sources":["../../src/apple/notes.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAY,QAAQ,EAAgB,MAAM,eAAe,CAAC;AAOjE,qBAAa,SAAU,SAAQ,YAAY;IACzC,OAAO,CAAC,aAAa,CAAS;gBAElB,MAAM,EAAE,WAAW;YAWjB,gBAAgB;IA0BxB,eAAe,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IA0BhD,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IA6ClD,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IA4ClD,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAmClD,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IA0BlD,mBAAmB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;CAmC3D"}
|
package/dist/apple/notes.tool.js
CHANGED
|
@@ -1,41 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.NotesTool = void 0;
|
|
27
|
-
const o_tool_1 = require("@olane/o-tool");
|
|
28
|
-
const o_core_1 = require("@olane/o-core");
|
|
29
|
-
const child_process_1 = require("child_process");
|
|
30
|
-
const util_1 = require("util");
|
|
31
|
-
const path = __importStar(require("path"));
|
|
32
|
-
const execAsync = (0, util_1.promisify)(child_process_1.exec);
|
|
33
|
-
class NotesTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
34
|
-
jxaScriptPath;
|
|
1
|
+
import { oVirtualTool } from '@olane/o-tool';
|
|
2
|
+
import { oAddress } from '@olane/o-core';
|
|
3
|
+
import { exec } from 'child_process';
|
|
4
|
+
import { promisify } from 'util';
|
|
5
|
+
import * as path from 'path';
|
|
6
|
+
const execAsync = promisify(exec);
|
|
7
|
+
export class NotesTool extends oVirtualTool {
|
|
35
8
|
constructor(config) {
|
|
36
9
|
super({
|
|
37
10
|
...config,
|
|
38
|
-
address: new
|
|
11
|
+
address: new oAddress('o://notes'),
|
|
39
12
|
description: 'Tool to interact with Apple Notes',
|
|
40
13
|
});
|
|
41
14
|
// Set the path to the JXA script
|
|
@@ -240,4 +213,3 @@ class NotesTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
|
240
213
|
}
|
|
241
214
|
}
|
|
242
215
|
}
|
|
243
|
-
exports.NotesTool = NotesTool;
|
package/dist/auth/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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("./oAuth.tool"), exports);
|
|
18
|
-
__exportStar(require("./methods/auth.methods"), exports);
|
|
19
|
-
__exportStar(require("./interfaces"), exports);
|
|
1
|
+
export * from './oAuth.tool';
|
|
2
|
+
export * from './methods/auth.methods';
|
|
3
|
+
export * from './interfaces';
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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("./oAuth-tokens.interface"), exports);
|
|
18
|
-
__exportStar(require("./oAuth-user-info.interface"), exports);
|
|
19
|
-
__exportStar(require("./oAuth.config"), exports);
|
|
1
|
+
export * from './oAuth-tokens.interface';
|
|
2
|
+
export * from './oAuth-user-info.interface';
|
|
3
|
+
export * from './oAuth.config';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/auth/oAuth.tool.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const o_core_1 = require("@olane/o-core");
|
|
6
|
-
const auth_methods_1 = require("./methods/auth.methods");
|
|
7
|
-
class OAuthTool extends o_tool_1.oHostNodeTool {
|
|
8
|
-
oauthConfigs = new Map();
|
|
9
|
-
tokenStore = new Map();
|
|
1
|
+
import { oHostNodeTool } from '@olane/o-tool';
|
|
2
|
+
import { oAddress } from '@olane/o-core';
|
|
3
|
+
import { oauthMethods } from './methods/auth.methods';
|
|
4
|
+
export class OAuthTool extends oHostNodeTool {
|
|
10
5
|
constructor(config) {
|
|
11
6
|
super({
|
|
12
7
|
...config,
|
|
13
|
-
address: new
|
|
8
|
+
address: new oAddress('o://oauth'),
|
|
14
9
|
description: 'Generic OAuth client tool for custom OAuth provider services',
|
|
15
|
-
methods:
|
|
10
|
+
methods: oauthMethods,
|
|
16
11
|
});
|
|
12
|
+
this.oauthConfigs = new Map();
|
|
13
|
+
this.tokenStore = new Map();
|
|
17
14
|
}
|
|
18
15
|
// Tool methods
|
|
19
16
|
async _tool_configure(request) {
|
|
@@ -420,4 +417,3 @@ class OAuthTool extends o_tool_1.oHostNodeTool {
|
|
|
420
417
|
.replace(/=/g, '');
|
|
421
418
|
}
|
|
422
419
|
}
|
|
423
|
-
exports.OAuthTool = OAuthTool;
|
|
@@ -1,70 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { oVirtualTool } from '@olane/o-tool';
|
|
2
2
|
import { oToolConfig } from '@olane/o-tool';
|
|
3
|
-
declare
|
|
4
|
-
validateToolCall(oRequest: import("@olane/o-core").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: import("@olane/o-core").oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").RunResult>;
|
|
12
|
-
run(request: import("@olane/o-core").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: import("@olane/o-core").oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").ToolResult>;
|
|
16
|
-
index(): Promise<{
|
|
17
|
-
provider: string;
|
|
18
|
-
summary: string;
|
|
19
|
-
} | {
|
|
20
|
-
summary: string | null;
|
|
21
|
-
provider?: undefined;
|
|
22
|
-
}>;
|
|
23
|
-
_tool_index_network(request: import("@olane/o-core").oRequest): Promise<import("@olane/o-tool").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 EmbeddingsTool extends EmbeddingsTool_base {
|
|
3
|
+
export declare class EmbeddingsTool extends oVirtualTool {
|
|
67
4
|
constructor(config: oToolConfig);
|
|
68
5
|
}
|
|
69
|
-
export {};
|
|
70
6
|
//# sourceMappingURL=embeddings.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.tool.d.ts","sourceRoot":"","sources":["../../src/embeddings/embeddings.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"embeddings.tool.d.ts","sourceRoot":"","sources":["../../src/embeddings/embeddings.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,cAAe,SAAQ,YAAY;gBAClC,MAAM,EAAE,WAAW;CAQhC"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const o_tool_1 = require("@olane/o-tool");
|
|
5
|
-
const o_core_1 = require("@olane/o-core");
|
|
6
|
-
class EmbeddingsTool 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
|
+
export class EmbeddingsTool extends oVirtualTool {
|
|
7
4
|
constructor(config) {
|
|
8
5
|
super({
|
|
9
6
|
...config,
|
|
10
|
-
address: new
|
|
7
|
+
address: new oAddress('o://embeddings'),
|
|
11
8
|
description: config.description || 'Generic base class for embeddings tools',
|
|
12
9
|
});
|
|
13
10
|
}
|
|
14
11
|
}
|
|
15
|
-
exports.EmbeddingsTool = EmbeddingsTool;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const text_embeddings_tool_1 = require("./text-embeddings.tool");
|
|
5
|
-
const huggingface_transformers_1 = require("@langchain/community/embeddings/huggingface_transformers");
|
|
6
|
-
class HuggingfaceTextEmbeddingsTool extends text_embeddings_tool_1.TextEmbeddingsTool {
|
|
7
|
-
model;
|
|
1
|
+
import { TextEmbeddingsTool } from './text-embeddings.tool';
|
|
2
|
+
import { HuggingFaceTransformersEmbeddings } from '@langchain/community/embeddings/huggingface_transformers';
|
|
3
|
+
export class HuggingfaceTextEmbeddingsTool extends TextEmbeddingsTool {
|
|
8
4
|
async initialize() {
|
|
9
5
|
await super.initialize();
|
|
10
|
-
this.model = new
|
|
6
|
+
this.model = new HuggingFaceTransformersEmbeddings({
|
|
11
7
|
model: 'Xenova/all-MiniLM-L6-v2', // TODO: make this configurable
|
|
12
8
|
});
|
|
13
9
|
}
|
|
@@ -23,4 +19,3 @@ class HuggingfaceTextEmbeddingsTool extends text_embeddings_tool_1.TextEmbedding
|
|
|
23
19
|
return result;
|
|
24
20
|
}
|
|
25
21
|
}
|
|
26
|
-
exports.HuggingfaceTextEmbeddingsTool = HuggingfaceTextEmbeddingsTool;
|
package/dist/embeddings/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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("./huggingface-text-embeddings.tool"), exports);
|
|
18
|
-
__exportStar(require("./text-embeddings.tool"), exports);
|
|
19
|
-
__exportStar(require("./embeddings.tool"), exports);
|
|
1
|
+
export * from './huggingface-text-embeddings.tool';
|
|
2
|
+
export * from './text-embeddings.tool';
|
|
3
|
+
export * from './embeddings.tool';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TEXT_EMBEDDINGS_PARAMS = void 0;
|
|
4
|
-
exports.TEXT_EMBEDDINGS_PARAMS = {
|
|
1
|
+
export const TEXT_EMBEDDINGS_PARAMS = {
|
|
5
2
|
embed_documents: {
|
|
6
3
|
name: 'embed_documents',
|
|
7
4
|
description: 'Embed documents',
|
|
@@ -1,72 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { oVirtualTool } from '@olane/o-tool';
|
|
2
|
+
import { oRequest } from '@olane/o-core';
|
|
2
3
|
import { oToolConfig } 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 | 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<import("@olane/o-tool").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<import("@olane/o-tool").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 abstract class TextEmbeddingsTool extends TextEmbeddingsTool_base {
|
|
4
|
+
export declare abstract class TextEmbeddingsTool extends oVirtualTool {
|
|
67
5
|
constructor(config: oToolConfig);
|
|
68
6
|
abstract _tool_embed_documents(request: oRequest): Promise<number[][]>;
|
|
69
7
|
abstract _tool_embed_query(request: oRequest): Promise<number[]>;
|
|
70
8
|
}
|
|
71
|
-
export {};
|
|
72
9
|
//# sourceMappingURL=text-embeddings.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-embeddings.tool.d.ts","sourceRoot":"","sources":["../../src/embeddings/text-embeddings.tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"text-embeddings.tool.d.ts","sourceRoot":"","sources":["../../src/embeddings/text-embeddings.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAY,QAAQ,EAAgB,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,8BAAsB,kBAAmB,SAAQ,YAAY;gBAC/C,MAAM,EAAE,WAAW;IAS/B,QAAQ,CAAC,qBAAqB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;IACtE,QAAQ,CAAC,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CACjE"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
12
|
-
methods:
|
|
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;
|