@olane/o-tools-common 0.1.0 → 0.1.1
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/agent/agents.tool.d.ts +16 -17
- package/dist/agent/agents.tool.js +8 -5
- package/dist/agent/ai-agent.tool.d.ts +0 -1
- package/dist/agent/ai-agent.tool.js +8 -5
- package/dist/agent/base-agent.tool.d.ts +16 -17
- package/dist/agent/base-agent.tool.js +10 -7
- package/dist/agent/human-agent.tool.d.ts +0 -1
- package/dist/agent/human-agent.tool.js +8 -5
- package/dist/agent/index.d.ts +0 -1
- package/dist/agent/index.js +20 -5
- package/dist/agent/interfaces/agent.config.d.ts +0 -1
- package/dist/agent/interfaces/agent.config.js +2 -2
- package/dist/agent/methods/agent.methods.d.ts +0 -1
- package/dist/agent/methods/agent.methods.js +4 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +23 -8
- package/dist/init.d.ts +1 -2
- package/dist/init.js +19 -16
- package/dist/plan/disk-plan-storage.tool.d.ts +1 -96
- package/dist/plan/disk-plan-storage.tool.js +7 -4
- package/dist/plan/index.d.ts +0 -1
- package/dist/plan/index.js +18 -3
- package/dist/plan/memory-plan-storage.tool.d.ts +1 -96
- package/dist/plan/memory-plan-storage.tool.js +7 -4
- package/dist/plan/methods/plan.methods.d.ts +0 -1
- package/dist/plan/methods/plan.methods.js +4 -2
- package/dist/plan/plan-storage.tool.d.ts +1 -98
- package/dist/plan/plan-storage.tool.js +30 -4
- package/dist/plan/resolvers/index.d.ts +0 -1
- package/dist/plan/resolvers/index.js +17 -2
- package/dist/plan/resolvers/plan.resolver.d.ts +0 -1
- package/dist/plan/resolvers/plan.resolver.js +6 -3
- package/dist/registry/index.d.ts +0 -1
- package/dist/registry/index.js +18 -3
- package/dist/registry/interfaces/search.interface.d.ts +0 -1
- package/dist/registry/interfaces/search.interface.js +2 -2
- package/dist/registry/methods/registry.methods.d.ts +0 -1
- package/dist/registry/methods/registry.methods.js +4 -2
- package/dist/registry/registry-memory.tool.d.ts +0 -1
- package/dist/registry/registry-memory.tool.js +8 -3
- package/dist/registry/registry.tool.d.ts +14 -15
- package/dist/registry/registry.tool.js +10 -7
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +2 -1
- package/dist/search/parameters/search.parameters.d.ts +0 -1
- package/dist/search/parameters/search.parameters.js +4 -2
- package/dist/search/search.tool.d.ts +16 -17
- package/dist/search/search.tool.js +14 -8
- package/dist/setup/index.d.ts +0 -1
- package/dist/setup/index.js +18 -3
- package/dist/setup/methods/setup.method.d.ts +0 -1
- package/dist/setup/methods/setup.method.js +4 -2
- package/dist/setup/setup.tool.d.ts +16 -17
- package/dist/setup/setup.tool.js +15 -8
- package/dist/storage/delete.tool.d.ts +16 -17
- package/dist/storage/delete.tool.js +8 -5
- package/dist/storage/get.tool.d.ts +16 -17
- package/dist/storage/get.tool.js +8 -5
- package/dist/storage/has.tool.d.ts +16 -17
- package/dist/storage/has.tool.js +8 -5
- package/dist/storage/index.d.ts +0 -1
- package/dist/storage/index.js +25 -10
- package/dist/storage/interfaces/get-data.response.d.ts +0 -1
- package/dist/storage/interfaces/get-data.response.js +2 -2
- package/dist/storage/interfaces/index.d.ts +0 -1
- package/dist/storage/interfaces/index.js +17 -2
- package/dist/storage/methods/storage.methods.d.ts +0 -1
- package/dist/storage/methods/storage.methods.js +4 -2
- package/dist/storage/providers/dht-storage-provider.tool.d.ts +0 -1
- package/dist/storage/providers/dht-storage-provider.tool.js +10 -7
- package/dist/storage/providers/disk-storage-provider.tool.d.ts +25 -1
- package/dist/storage/providers/disk-storage-provider.tool.js +52 -17
- package/dist/storage/providers/encrypted-storage-provider.tool.d.ts +1 -1
- package/dist/storage/providers/encrypted-storage-provider.tool.js +64 -1
- package/dist/storage/providers/memory-storage-provider.tool.d.ts +19 -1
- package/dist/storage/providers/memory-storage-provider.tool.js +29 -7
- package/dist/storage/providers/storage-provider.tool.d.ts +16 -17
- package/dist/storage/providers/storage-provider.tool.js +11 -5
- package/dist/storage/put.tool.d.ts +16 -17
- package/dist/storage/put.tool.js +8 -5
- package/dist/storage/storage.tool.d.ts +0 -1
- package/dist/storage/storage.tool.js +15 -11
- package/dist/vault/index.d.ts +0 -1
- package/dist/vault/index.js +17 -2
- package/dist/vault/lib/encryption.d.ts +24 -1
- package/dist/vault/lib/encryption.js +47 -9
- package/dist/vault/methods/vault.methods.d.ts +0 -1
- package/dist/vault/methods/vault.methods.js +4 -2
- package/dist/vault/vault.tool.d.ts +16 -17
- package/dist/vault/vault.tool.js +12 -9
- package/package.json +11 -18
- package/dist/agent/agents.tool.d.ts.map +0 -1
- package/dist/agent/agents.tool.js.map +0 -1
- package/dist/agent/ai-agent.tool.d.ts.map +0 -1
- package/dist/agent/ai-agent.tool.js.map +0 -1
- package/dist/agent/base-agent.tool.d.ts.map +0 -1
- package/dist/agent/base-agent.tool.js.map +0 -1
- package/dist/agent/human-agent.tool.d.ts.map +0 -1
- package/dist/agent/human-agent.tool.js.map +0 -1
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/agent/index.js.map +0 -1
- package/dist/agent/interfaces/agent.config.d.ts.map +0 -1
- package/dist/agent/interfaces/agent.config.js.map +0 -1
- package/dist/agent/methods/agent.methods.d.ts.map +0 -1
- package/dist/agent/methods/agent.methods.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/init.d.ts.map +0 -1
- package/dist/init.js.map +0 -1
- package/dist/plan/disk-plan-storage.tool.d.ts.map +0 -1
- package/dist/plan/disk-plan-storage.tool.js.map +0 -1
- package/dist/plan/index.d.ts.map +0 -1
- package/dist/plan/index.js.map +0 -1
- package/dist/plan/memory-plan-storage.tool.d.ts.map +0 -1
- package/dist/plan/memory-plan-storage.tool.js.map +0 -1
- package/dist/plan/methods/plan.methods.d.ts.map +0 -1
- package/dist/plan/methods/plan.methods.js.map +0 -1
- package/dist/plan/plan-storage.tool.d.ts.map +0 -1
- package/dist/plan/plan-storage.tool.js.map +0 -1
- package/dist/plan/resolvers/index.d.ts.map +0 -1
- package/dist/plan/resolvers/index.js.map +0 -1
- package/dist/plan/resolvers/plan.resolver.d.ts.map +0 -1
- package/dist/plan/resolvers/plan.resolver.js.map +0 -1
- package/dist/registry/index.d.ts.map +0 -1
- package/dist/registry/index.js.map +0 -1
- package/dist/registry/interfaces/search.interface.d.ts.map +0 -1
- package/dist/registry/interfaces/search.interface.js.map +0 -1
- package/dist/registry/methods/registry.methods.d.ts.map +0 -1
- package/dist/registry/methods/registry.methods.js.map +0 -1
- package/dist/registry/registry-memory.tool.d.ts.map +0 -1
- package/dist/registry/registry-memory.tool.js.map +0 -1
- package/dist/registry/registry.tool.d.ts.map +0 -1
- package/dist/registry/registry.tool.js.map +0 -1
- package/dist/search/index.d.ts.map +0 -1
- package/dist/search/index.js.map +0 -1
- package/dist/search/parameters/search.parameters.d.ts.map +0 -1
- package/dist/search/parameters/search.parameters.js.map +0 -1
- package/dist/search/search.tool.d.ts.map +0 -1
- package/dist/search/search.tool.js.map +0 -1
- package/dist/setup/index.d.ts.map +0 -1
- package/dist/setup/index.js.map +0 -1
- package/dist/setup/methods/setup.method.d.ts.map +0 -1
- package/dist/setup/methods/setup.method.js.map +0 -1
- package/dist/setup/setup.tool.d.ts.map +0 -1
- package/dist/setup/setup.tool.js.map +0 -1
- package/dist/storage/delete.tool.d.ts.map +0 -1
- package/dist/storage/delete.tool.js.map +0 -1
- package/dist/storage/get.tool.d.ts.map +0 -1
- package/dist/storage/get.tool.js.map +0 -1
- package/dist/storage/has.tool.d.ts.map +0 -1
- package/dist/storage/has.tool.js.map +0 -1
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/interfaces/get-data.response.d.ts.map +0 -1
- package/dist/storage/interfaces/get-data.response.js.map +0 -1
- package/dist/storage/interfaces/index.d.ts.map +0 -1
- package/dist/storage/interfaces/index.js.map +0 -1
- package/dist/storage/methods/storage.methods.d.ts.map +0 -1
- package/dist/storage/methods/storage.methods.js.map +0 -1
- package/dist/storage/providers/dht-storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/dht-storage-provider.tool.js.map +0 -1
- package/dist/storage/providers/disk-storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/disk-storage-provider.tool.js.map +0 -1
- package/dist/storage/providers/encrypted-storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/encrypted-storage-provider.tool.js.map +0 -1
- package/dist/storage/providers/memory-storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/memory-storage-provider.tool.js.map +0 -1
- package/dist/storage/providers/storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/storage-provider.tool.js.map +0 -1
- package/dist/storage/put.tool.d.ts.map +0 -1
- package/dist/storage/put.tool.js.map +0 -1
- package/dist/storage/storage.tool.d.ts.map +0 -1
- package/dist/storage/storage.tool.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/vault/index.d.ts.map +0 -1
- package/dist/vault/index.js.map +0 -1
- package/dist/vault/lib/encryption.d.ts.map +0 -1
- package/dist/vault/lib/encryption.js.map +0 -1
- package/dist/vault/methods/vault.methods.d.ts.map +0 -1
- package/dist/vault/methods/vault.methods.js.map +0 -1
- package/dist/vault/vault.tool.d.ts.map +0 -1
- package/dist/vault/vault.tool.js.map +0 -1
|
@@ -8,13 +8,13 @@ declare const AgentsTool_base: (new (...args: any[]) => {
|
|
|
8
8
|
initialize(): Promise<void>;
|
|
9
9
|
use(address: oAddress, data: {
|
|
10
10
|
[key: string]: unknown;
|
|
11
|
-
}, config?: import("@olane/o-core").UseOptions): Promise<oResponse>;
|
|
12
|
-
handleStream(streamData: import("@
|
|
13
|
-
execute(req: oRequest, stream?: import("@
|
|
14
|
-
run(request: oRequest, stream?: import("@
|
|
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
15
|
myTools(): string[];
|
|
16
16
|
myToolParams(tool: string): Record<string, any>;
|
|
17
|
-
callMyTool(request: oRequest, stream?: import("@
|
|
17
|
+
callMyTool(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<ToolResult>;
|
|
18
18
|
index(): Promise<{
|
|
19
19
|
provider: string;
|
|
20
20
|
summary: string;
|
|
@@ -27,31 +27,31 @@ declare const AgentsTool_base: (new (...args: any[]) => {
|
|
|
27
27
|
tools: string[];
|
|
28
28
|
description: string;
|
|
29
29
|
}>;
|
|
30
|
-
findMissingParams(methodName: string, params: any): import("@olane/o-protocol
|
|
30
|
+
findMissingParams(methodName: string, params: any): import("@olane/o-protocol").oParameter[];
|
|
31
31
|
readonly config: import("@olane/o-core").CoreConfig;
|
|
32
|
-
p2pNode: import("@
|
|
32
|
+
p2pNode: import("libp2p", { with: { "resolution-mode": "import" } }).Libp2p<import("@libp2p/interface", { with: { "resolution-mode": "import" } }).ServiceMap>;
|
|
33
33
|
logger: import("@olane/o-core").Logger;
|
|
34
|
-
networkConfig: import("@olane/o-config
|
|
34
|
+
networkConfig: import("@olane/o-config").Libp2pConfig;
|
|
35
35
|
address: oAddress;
|
|
36
36
|
readonly staticAddress: oAddress;
|
|
37
|
-
peerId: import("@
|
|
37
|
+
peerId: import("@libp2p/interface-peer-id", { with: { "resolution-mode": "import" } }).PeerId;
|
|
38
38
|
state: import("@olane/o-core").NodeState;
|
|
39
39
|
errors: Error[];
|
|
40
40
|
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
41
|
-
leaders: import("@
|
|
41
|
+
leaders: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
42
42
|
addressResolution: import("@olane/o-core").oAddressResolution;
|
|
43
43
|
readonly description: string;
|
|
44
44
|
dependencies: import("@olane/o-core").oDependency[];
|
|
45
45
|
methods: {
|
|
46
|
-
[key: string]: import("@olane/o-protocol
|
|
46
|
+
[key: string]: import("@olane/o-protocol").oMethod;
|
|
47
47
|
};
|
|
48
48
|
successCount: number;
|
|
49
49
|
errorCount: number;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
getTransports(address: oAddress): import("@
|
|
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
55
|
handleStaticAddressTranslation(addressInput: oAddress): Promise<oAddress>;
|
|
56
56
|
translateAddress(addressWithLeaderTransports: oAddress): Promise<{
|
|
57
57
|
nextHopAddress: oAddress;
|
|
@@ -73,4 +73,3 @@ export declare class AgentsTool extends AgentsTool_base {
|
|
|
73
73
|
_tool_get_agent_by_id(request: oRequest): Promise<ToolResult>;
|
|
74
74
|
}
|
|
75
75
|
export {};
|
|
76
|
-
//# sourceMappingURL=agents.tool.d.ts.map
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentsTool = void 0;
|
|
4
|
+
const o_tool_1 = require("@olane/o-tool");
|
|
5
|
+
const o_core_1 = require("@olane/o-core");
|
|
6
|
+
class AgentsTool extends (0, o_tool_1.oTool)(o_core_1.oVirtualNode) {
|
|
4
7
|
roundRobinIndex = 0;
|
|
5
8
|
constructor(config) {
|
|
6
9
|
super({
|
|
7
10
|
...config,
|
|
8
|
-
address: new oAddress('o://agents'),
|
|
11
|
+
address: new o_core_1.oAddress('o://agents'),
|
|
9
12
|
});
|
|
10
13
|
}
|
|
11
14
|
async _tool_get_agents(request) {
|
|
@@ -18,4 +21,4 @@ export class AgentsTool extends oTool(oVirtualNode) {
|
|
|
18
21
|
throw new Error('Not implemented');
|
|
19
22
|
}
|
|
20
23
|
}
|
|
21
|
-
|
|
24
|
+
exports.AgentsTool = AgentsTool;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.oAIAgentTool = void 0;
|
|
4
|
+
const o_core_1 = require("@olane/o-core");
|
|
5
|
+
const base_agent_tool_1 = require("./base-agent.tool");
|
|
6
|
+
class oAIAgentTool extends base_agent_tool_1.oAgentTool {
|
|
4
7
|
constructor(config) {
|
|
5
8
|
super({
|
|
6
9
|
...config,
|
|
7
|
-
address: config.address || new oAddress('o://ai'),
|
|
10
|
+
address: config.address || new o_core_1.oAddress('o://ai'),
|
|
8
11
|
});
|
|
9
12
|
}
|
|
10
13
|
}
|
|
11
|
-
|
|
14
|
+
exports.oAIAgentTool = oAIAgentTool;
|
|
@@ -7,13 +7,13 @@ declare const oAgentTool_base: (new (...args: any[]) => {
|
|
|
7
7
|
initialize(): Promise<void>;
|
|
8
8
|
use(address: oAddress, data: {
|
|
9
9
|
[key: string]: unknown;
|
|
10
|
-
}, config?: import("@olane/o-core").UseOptions): Promise<import("@olane/o-core").oResponse>;
|
|
11
|
-
handleStream(streamData: import("@
|
|
12
|
-
execute(req: oRequest, stream?: import("@
|
|
13
|
-
run(request: oRequest, stream?: import("@
|
|
10
|
+
}, config?: import("@olane/o-core").UseOptions | undefined): Promise<import("@olane/o-core").oResponse>;
|
|
11
|
+
handleStream(streamData: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).IncomingStreamData): Promise<void>;
|
|
12
|
+
execute(req: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").RunResult>;
|
|
13
|
+
run(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<import("@olane/o-tool").RunResult>;
|
|
14
14
|
myTools(): string[];
|
|
15
15
|
myToolParams(tool: string): Record<string, any>;
|
|
16
|
-
callMyTool(request: oRequest, stream?: import("@
|
|
16
|
+
callMyTool(request: oRequest, stream?: import("@libp2p/interface", { with: { "resolution-mode": "import" } }).Stream | undefined): Promise<ToolResult>;
|
|
17
17
|
index(): Promise<{
|
|
18
18
|
provider: string;
|
|
19
19
|
summary: string;
|
|
@@ -26,31 +26,31 @@ declare const oAgentTool_base: (new (...args: any[]) => {
|
|
|
26
26
|
tools: string[];
|
|
27
27
|
description: string;
|
|
28
28
|
}>;
|
|
29
|
-
findMissingParams(methodName: string, params: any): import("@olane/o-protocol
|
|
29
|
+
findMissingParams(methodName: string, params: any): import("@olane/o-protocol").oParameter[];
|
|
30
30
|
readonly config: import("@olane/o-core").CoreConfig;
|
|
31
|
-
p2pNode: import("@
|
|
31
|
+
p2pNode: import("libp2p", { with: { "resolution-mode": "import" } }).Libp2p<import("@libp2p/interface", { with: { "resolution-mode": "import" } }).ServiceMap>;
|
|
32
32
|
logger: import("@olane/o-core").Logger;
|
|
33
|
-
networkConfig: import("@olane/o-config
|
|
33
|
+
networkConfig: import("@olane/o-config").Libp2pConfig;
|
|
34
34
|
address: oAddress;
|
|
35
35
|
readonly staticAddress: oAddress;
|
|
36
|
-
peerId: import("@
|
|
36
|
+
peerId: import("@libp2p/interface-peer-id", { with: { "resolution-mode": "import" } }).PeerId;
|
|
37
37
|
state: import("@olane/o-core").NodeState;
|
|
38
38
|
errors: Error[];
|
|
39
39
|
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
40
|
-
leaders: import("@
|
|
40
|
+
leaders: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
41
41
|
addressResolution: import("@olane/o-core").oAddressResolution;
|
|
42
42
|
readonly description: string;
|
|
43
43
|
dependencies: import("@olane/o-core").oDependency[];
|
|
44
44
|
methods: {
|
|
45
|
-
[key: string]: import("@olane/o-protocol
|
|
45
|
+
[key: string]: import("@olane/o-protocol").oMethod;
|
|
46
46
|
};
|
|
47
47
|
successCount: number;
|
|
48
48
|
errorCount: number;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
getTransports(address: oAddress): import("@
|
|
49
|
+
readonly type: import("@olane/o-core").NodeType;
|
|
50
|
+
readonly transports: string[];
|
|
51
|
+
readonly parent: oAddress | null;
|
|
52
|
+
readonly parentTransports: import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
53
|
+
getTransports(address: oAddress): import("@multiformats/multiaddr", { with: { "resolution-mode": "import" } }).Multiaddr[];
|
|
54
54
|
handleStaticAddressTranslation(addressInput: oAddress): Promise<oAddress>;
|
|
55
55
|
translateAddress(addressWithLeaderTransports: oAddress): Promise<{
|
|
56
56
|
nextHopAddress: oAddress;
|
|
@@ -72,4 +72,3 @@ export declare abstract class oAgentTool extends oAgentTool_base {
|
|
|
72
72
|
_tool_question(request: oRequest): Promise<ToolResult>;
|
|
73
73
|
}
|
|
74
74
|
export {};
|
|
75
|
-
//# sourceMappingURL=base-agent.tool.d.ts.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.oAgentTool = void 0;
|
|
4
|
+
const o_tool_1 = require("@olane/o-tool");
|
|
5
|
+
const o_core_1 = require("@olane/o-core");
|
|
6
|
+
const agent_methods_1 = require("./methods/agent.methods");
|
|
7
|
+
class oAgentTool extends (0, o_tool_1.oTool)(o_core_1.oHostNode) {
|
|
5
8
|
respond;
|
|
6
9
|
answer;
|
|
7
10
|
constructor(config) {
|
|
8
11
|
super({
|
|
9
12
|
...config,
|
|
10
|
-
address: config?.address || new oAddress('o://agent'),
|
|
11
|
-
methods: AGENT_METHODS,
|
|
13
|
+
address: config?.address || new o_core_1.oAddress('o://agent'),
|
|
14
|
+
methods: agent_methods_1.AGENT_METHODS,
|
|
12
15
|
});
|
|
13
16
|
this.respond = config.respond;
|
|
14
17
|
this.answer = config.answer;
|
|
@@ -30,4 +33,4 @@ export class oAgentTool extends oTool(oHostNode) {
|
|
|
30
33
|
};
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
|
-
|
|
36
|
+
exports.oAgentTool = oAgentTool;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.oHumanAgentTool = void 0;
|
|
4
|
+
const o_core_1 = require("@olane/o-core");
|
|
5
|
+
const base_agent_tool_1 = require("./base-agent.tool");
|
|
6
|
+
class oHumanAgentTool extends base_agent_tool_1.oAgentTool {
|
|
4
7
|
constructor(config) {
|
|
5
8
|
super({
|
|
6
9
|
...config,
|
|
7
|
-
address: config.address || new oAddress('o://human'),
|
|
10
|
+
address: config.address || new o_core_1.oAddress('o://human'),
|
|
8
11
|
});
|
|
9
12
|
}
|
|
10
13
|
}
|
|
11
|
-
|
|
14
|
+
exports.oHumanAgentTool = oHumanAgentTool;
|
package/dist/agent/index.d.ts
CHANGED
package/dist/agent/index.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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("./base-agent.tool"), exports);
|
|
18
|
+
__exportStar(require("./human-agent.tool"), exports);
|
|
19
|
+
__exportStar(require("./ai-agent.tool"), exports);
|
|
20
|
+
__exportStar(require("./agents.tool"), exports);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AGENT_METHODS = void 0;
|
|
4
|
+
exports.AGENT_METHODS = {
|
|
2
5
|
intent: {
|
|
3
6
|
name: 'intent',
|
|
4
7
|
description: 'Agent handler for resolving an intent.',
|
|
@@ -28,4 +31,3 @@ export const AGENT_METHODS = {
|
|
|
28
31
|
dependencies: [],
|
|
29
32
|
},
|
|
30
33
|
};
|
|
31
|
-
//# sourceMappingURL=agent.methods.js.map
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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("./registry"), exports);
|
|
18
|
+
__exportStar(require("./storage"), exports);
|
|
19
|
+
__exportStar(require("./agent"), exports);
|
|
20
|
+
__exportStar(require("./init"), exports);
|
|
21
|
+
__exportStar(require("./plan"), exports);
|
|
22
|
+
__exportStar(require("./setup"), exports);
|
|
23
|
+
__exportStar(require("./vault"), exports);
|
package/dist/init.d.ts
CHANGED
|
@@ -5,5 +5,4 @@ import { VaultTool } from './vault/vault.tool';
|
|
|
5
5
|
import { SearchTool } from './search/search.tool';
|
|
6
6
|
import { SetupTool } from './setup/setup.tool';
|
|
7
7
|
import { DiskPlanStorageTool } from './plan/disk-plan-storage.tool';
|
|
8
|
-
export declare const initCommonTools: (oNode: oNode) => (
|
|
9
|
-
//# sourceMappingURL=init.d.ts.map
|
|
8
|
+
export declare const initCommonTools: (oNode: oNode) => (RegistryMemoryTool | StorageTool | VaultTool | SearchTool | SetupTool | DiskPlanStorageTool)[];
|
package/dist/init.js
CHANGED
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initCommonTools = void 0;
|
|
4
|
+
const registry_memory_tool_1 = require("./registry/registry-memory.tool");
|
|
5
|
+
const o_core_1 = require("@olane/o-core");
|
|
6
|
+
const storage_1 = require("./storage");
|
|
7
|
+
const vault_tool_1 = require("./vault/vault.tool");
|
|
8
|
+
const search_tool_1 = require("./search/search.tool");
|
|
9
|
+
const setup_tool_1 = require("./setup/setup.tool");
|
|
10
|
+
const disk_plan_storage_tool_1 = require("./plan/disk-plan-storage.tool");
|
|
11
|
+
const initCommonTools = (oNode) => {
|
|
9
12
|
const params = {
|
|
10
13
|
parent: oNode.address,
|
|
11
14
|
leader: oNode.address,
|
|
12
15
|
};
|
|
13
16
|
const tools = [
|
|
14
|
-
new RegistryMemoryTool({
|
|
17
|
+
new registry_memory_tool_1.RegistryMemoryTool({
|
|
15
18
|
name: 'registry',
|
|
16
19
|
...params,
|
|
17
20
|
}),
|
|
18
|
-
new StorageTool({
|
|
21
|
+
new storage_1.StorageTool({
|
|
19
22
|
name: 'storage',
|
|
20
23
|
...params,
|
|
21
24
|
}),
|
|
22
|
-
new VaultTool({
|
|
25
|
+
new vault_tool_1.VaultTool({
|
|
23
26
|
name: 'vault',
|
|
24
27
|
...params,
|
|
25
28
|
}),
|
|
26
|
-
new SearchTool({
|
|
29
|
+
new search_tool_1.SearchTool({
|
|
27
30
|
name: 'search',
|
|
28
31
|
...params,
|
|
29
32
|
}),
|
|
30
|
-
new SetupTool({
|
|
33
|
+
new setup_tool_1.SetupTool({
|
|
31
34
|
name: 'setup',
|
|
32
35
|
...params,
|
|
33
36
|
}),
|
|
34
|
-
new DiskPlanStorageTool({
|
|
37
|
+
new disk_plan_storage_tool_1.DiskPlanStorageTool({
|
|
35
38
|
name: 'plan',
|
|
36
|
-
address: new oAddress('o://plan'),
|
|
39
|
+
address: new o_core_1.oAddress('o://plan'),
|
|
37
40
|
...params,
|
|
38
41
|
}),
|
|
39
42
|
];
|
|
@@ -42,4 +45,4 @@ export const initCommonTools = (oNode) => {
|
|
|
42
45
|
});
|
|
43
46
|
return tools;
|
|
44
47
|
};
|
|
45
|
-
|
|
48
|
+
exports.initCommonTools = initCommonTools;
|
|
@@ -1,105 +1,10 @@
|
|
|
1
1
|
import { oAddress } from '@olane/o-core';
|
|
2
2
|
import { oToolConfig } from '@olane/o-tool';
|
|
3
3
|
import { DiskStorageProvider } from '../storage';
|
|
4
|
-
declare const DiskPlanStorageTool_base:
|
|
5
|
-
new (...args: any[]): {
|
|
6
|
-
initialize(): Promise<void>;
|
|
7
|
-
validateToolCall(oRequest: import("@olane/o-core").oRequest): boolean;
|
|
8
|
-
handleProtocol(address: oAddress): Promise<void>;
|
|
9
|
-
use: ((address: oAddress, data: {
|
|
10
|
-
[key: string]: unknown;
|
|
11
|
-
}, config?: import("@olane/o-core").UseOptions) => Promise<import("@olane/o-core").oResponse>) & ((addressWithLeaderTransports: oAddress, data: {
|
|
12
|
-
method?: string;
|
|
13
|
-
params?: {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
}, config?: import("@olane/o-core").UseOptions) => Promise<import("@olane/o-core").oResponse>);
|
|
17
|
-
handleStream(streamData: import("@olane/o-config/dist").IncomingStreamData): Promise<void>;
|
|
18
|
-
execute(req: import("@olane/o-core").oRequest, stream?: import("@olane/o-config/dist").Stream): Promise<import("@olane/o-tool").RunResult>;
|
|
19
|
-
run(request: import("@olane/o-core").oRequest, stream?: import("@olane/o-config/dist").Stream): Promise<import("@olane/o-tool").RunResult>;
|
|
20
|
-
myTools: (() => string[]) & (() => string[]);
|
|
21
|
-
myToolParams(tool: string): Record<string, any>;
|
|
22
|
-
callMyTool(request: import("@olane/o-core").oRequest, stream?: import("@olane/o-config/dist").Stream): Promise<import("@olane/o-tool").ToolResult>;
|
|
23
|
-
index(): Promise<{
|
|
24
|
-
provider: string;
|
|
25
|
-
summary: string;
|
|
26
|
-
} | {
|
|
27
|
-
summary: string | null;
|
|
28
|
-
provider?: undefined;
|
|
29
|
-
}>;
|
|
30
|
-
_tool_index_network(request: import("@olane/o-core").oRequest): Promise<import("@olane/o-tool").ToolResult>;
|
|
31
|
-
whoami: (() => Promise<{
|
|
32
|
-
tools: string[];
|
|
33
|
-
description: string;
|
|
34
|
-
}>) & (() => Promise<any>);
|
|
35
|
-
findMissingParams(methodName: string, params: any): import("@olane/o-protocol/dist").oParameter[];
|
|
36
|
-
readonly config: import("@olane/o-core").CoreConfig;
|
|
37
|
-
p2pNode: import("@olane/o-config/dist").Libp2p;
|
|
38
|
-
logger: import("@olane/o-core").Logger;
|
|
39
|
-
networkConfig: import("@olane/o-config/dist").Libp2pConfig;
|
|
40
|
-
address: oAddress;
|
|
41
|
-
readonly staticAddress: oAddress;
|
|
42
|
-
peerId: import("@olane/o-config/dist").PeerId;
|
|
43
|
-
state: import("@olane/o-core").NodeState;
|
|
44
|
-
errors: Error[];
|
|
45
|
-
connectionManager: import("@olane/o-core").oConnectionManager;
|
|
46
|
-
leaders: import("@olane/o-config/dist").Multiaddr[];
|
|
47
|
-
addressResolution: import("@olane/o-core").oAddressResolution;
|
|
48
|
-
readonly description: string;
|
|
49
|
-
dependencies: import("@olane/o-core").oDependency[];
|
|
50
|
-
methods: {
|
|
51
|
-
[key: string]: import("@olane/o-protocol/dist").oMethod;
|
|
52
|
-
} & {
|
|
53
|
-
[key: string]: import("@olane/o-protocol/dist").oMethod;
|
|
54
|
-
};
|
|
55
|
-
successCount: number;
|
|
56
|
-
errorCount: number;
|
|
57
|
-
readonly type: import("@olane/o-core").NodeType;
|
|
58
|
-
readonly transports: string[];
|
|
59
|
-
readonly parent: oAddress | null;
|
|
60
|
-
readonly parentTransports: import("@olane/o-config/dist").Multiaddr[];
|
|
61
|
-
getTransports: ((address: oAddress) => import("@olane/o-config/dist").Multiaddr[]) & ((address: oAddress) => import("@olane/o-config/dist").Multiaddr[]);
|
|
62
|
-
handleStaticAddressTranslation: ((addressInput: oAddress) => Promise<oAddress>) & ((addressInput: oAddress) => Promise<oAddress>);
|
|
63
|
-
translateAddress: ((addressWithLeaderTransports: oAddress) => Promise<{
|
|
64
|
-
nextHopAddress: oAddress;
|
|
65
|
-
targetAddress: oAddress;
|
|
66
|
-
}>) & ((addressWithLeaderTransports: oAddress) => Promise<{
|
|
67
|
-
nextHopAddress: oAddress;
|
|
68
|
-
targetAddress: oAddress;
|
|
69
|
-
}>);
|
|
70
|
-
advertiseToNetwork: (() => Promise<void>) & (() => Promise<void>);
|
|
71
|
-
connectToParent: (() => Promise<void>) & (() => Promise<void>);
|
|
72
|
-
register: (() => Promise<void>) & (() => Promise<void>);
|
|
73
|
-
connect: ((nextHopAddress: oAddress, targetAddress: oAddress) => Promise<import("@olane/o-core").oConnection>) & ((nextHopAddress: oAddress, targetAddress: oAddress) => Promise<import("@olane/o-core").oConnection>);
|
|
74
|
-
teardown: (() => Promise<void>) & (() => Promise<void>);
|
|
75
|
-
start: (() => Promise<void>) & (() => Promise<void>);
|
|
76
|
-
stop: (() => Promise<void>) & (() => Promise<void>);
|
|
77
|
-
configureTransports(): any[];
|
|
78
|
-
networkActivity: import("@olane/o-core").NetworkActivity;
|
|
79
|
-
childNodes: import("@olane/o-core").oNode[];
|
|
80
|
-
childAddresses: oAddress[];
|
|
81
|
-
validate(): void;
|
|
82
|
-
_tool_handshake(handshake: import("@olane/o-core").oRequest): Promise<import("../../../../dist/plan/interfaces/plan.result").oPlanResult>;
|
|
83
|
-
applyBridgeTransports(address: oAddress, request: import("@olane/o-core").oRequest): Promise<import("@olane/o-core").oResponse>;
|
|
84
|
-
matchAgainstMethods(address: oAddress): boolean;
|
|
85
|
-
extractMethod(address: oAddress): string;
|
|
86
|
-
_tool_route(request: import("@olane/o-core").oRequest & {
|
|
87
|
-
stream: import("@olane/o-config/dist").Stream;
|
|
88
|
-
}): Promise<any>;
|
|
89
|
-
_tool_intent(request: import("@olane/o-core").oRequest): Promise<any>;
|
|
90
|
-
startChildren(): Promise<void>;
|
|
91
|
-
validateJoinRequest(request: import("@olane/o-core").oRequest): Promise<any>;
|
|
92
|
-
_tool_add_child(request: import("@olane/o-core").oRequest): Promise<any>;
|
|
93
|
-
addChildNode(node: import("@olane/o-core").oNode): void;
|
|
94
|
-
removeChildNode(node: import("@olane/o-core").oNode): void;
|
|
95
|
-
configure(): Promise<import("@olane/o-config/dist").Libp2pConfig>;
|
|
96
|
-
listenForNetworkEvents(): void;
|
|
97
|
-
};
|
|
98
|
-
} & typeof DiskStorageProvider;
|
|
4
|
+
declare const DiskPlanStorageTool_base: typeof DiskStorageProvider & (new (...args: any[]) => any);
|
|
99
5
|
export declare class DiskPlanStorageTool extends DiskPlanStorageTool_base {
|
|
100
6
|
constructor(config: oToolConfig & {
|
|
101
7
|
address: oAddress;
|
|
102
8
|
});
|
|
103
9
|
}
|
|
104
10
|
export {};
|
|
105
|
-
//# sourceMappingURL=disk-plan-storage.tool.d.ts.map
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiskPlanStorageTool = void 0;
|
|
4
|
+
const plan_storage_tool_1 = require("./plan-storage.tool");
|
|
5
|
+
const storage_1 = require("../storage");
|
|
6
|
+
class DiskPlanStorageTool extends (0, plan_storage_tool_1.oPlanStorageTool)(storage_1.DiskStorageProvider) {
|
|
4
7
|
constructor(config) {
|
|
5
8
|
super({
|
|
6
9
|
...config,
|
|
@@ -8,4 +11,4 @@ export class DiskPlanStorageTool extends oPlanStorageTool(DiskStorageProvider) {
|
|
|
8
11
|
});
|
|
9
12
|
}
|
|
10
13
|
}
|
|
11
|
-
|
|
14
|
+
exports.DiskPlanStorageTool = DiskPlanStorageTool;
|
package/dist/plan/index.d.ts
CHANGED
package/dist/plan/index.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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("./plan-storage.tool"), exports);
|
|
18
|
+
__exportStar(require("./resolvers"), exports);
|