@olane/o-tools-common 0.5.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -5
- package/dist/init.d.ts +3 -4
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +2 -7
- package/dist/plan/disk-plan-storage.tool.d.ts +1 -1
- package/dist/plan/disk-plan-storage.tool.d.ts.map +1 -1
- package/dist/plan/disk-plan-storage.tool.js +1 -1
- package/dist/plan/encrypted-plan-storage.tool.d.ts +1 -1
- package/dist/plan/encrypted-plan-storage.tool.d.ts.map +1 -1
- package/dist/plan/encrypted-plan-storage.tool.js +1 -1
- package/dist/plan/memory-plan-storage.tool.d.ts +1 -1
- package/dist/plan/memory-plan-storage.tool.d.ts.map +1 -1
- package/dist/plan/memory-plan-storage.tool.js +1 -1
- package/package.json +8 -10
- package/dist/agent/agents.tool.d.ts +0 -10
- package/dist/agent/agents.tool.d.ts.map +0 -1
- package/dist/agent/agents.tool.js +0 -20
- package/dist/agent/ai-agent.tool.d.ts +0 -6
- package/dist/agent/ai-agent.tool.d.ts.map +0 -1
- package/dist/agent/ai-agent.tool.js +0 -10
- package/dist/agent/base-agent.tool.d.ts +0 -11
- package/dist/agent/base-agent.tool.d.ts.map +0 -1
- package/dist/agent/base-agent.tool.js +0 -30
- package/dist/agent/human-agent.tool.d.ts +0 -6
- package/dist/agent/human-agent.tool.d.ts.map +0 -1
- package/dist/agent/human-agent.tool.js +0 -10
- package/dist/agent/index.d.ts +0 -5
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/agent/index.js +0 -4
- package/dist/agent/interfaces/agent.config.d.ts +0 -6
- package/dist/agent/interfaces/agent.config.d.ts.map +0 -1
- package/dist/agent/interfaces/agent.config.js +0 -1
- package/dist/agent/methods/agent.methods.d.ts +0 -5
- package/dist/agent/methods/agent.methods.d.ts.map +0 -1
- package/dist/agent/methods/agent.methods.js +0 -30
- package/dist/leader/index.d.ts +0 -2
- package/dist/leader/index.d.ts.map +0 -1
- package/dist/leader/index.js +0 -1
- package/dist/leader/leader.node.d.ts +0 -10
- package/dist/leader/leader.node.d.ts.map +0 -1
- package/dist/leader/leader.node.js +0 -63
- package/dist/leader/methods/start.method.d.ts +0 -3
- package/dist/leader/methods/start.method.d.ts.map +0 -1
- package/dist/leader/methods/start.method.js +0 -21
- package/dist/plan/methods/plan.methods.d.ts +0 -5
- package/dist/plan/methods/plan.methods.d.ts.map +0 -1
- package/dist/plan/methods/plan.methods.js +0 -8
- package/dist/registry/index.d.ts +0 -3
- package/dist/registry/index.d.ts.map +0 -1
- package/dist/registry/index.js +0 -2
- package/dist/registry/interfaces/search.interface.d.ts +0 -6
- package/dist/registry/interfaces/search.interface.d.ts.map +0 -1
- package/dist/registry/interfaces/search.interface.js +0 -1
- package/dist/registry/methods/registry.methods.d.ts +0 -5
- package/dist/registry/methods/registry.methods.d.ts.map +0 -1
- package/dist/registry/methods/registry.methods.js +0 -74
- package/dist/registry/registry-memory.tool.d.ts +0 -9
- package/dist/registry/registry-memory.tool.d.ts.map +0 -1
- package/dist/registry/registry-memory.tool.js +0 -51
- package/dist/registry/registry.tool.d.ts +0 -13
- package/dist/registry/registry.tool.d.ts.map +0 -1
- package/dist/registry/registry.tool.js +0 -15
- package/dist/setup/index.d.ts +0 -3
- package/dist/setup/index.d.ts.map +0 -1
- package/dist/setup/index.js +0 -2
- package/dist/setup/methods/setup.method.d.ts +0 -5
- package/dist/setup/methods/setup.method.d.ts.map +0 -1
- package/dist/setup/methods/setup.method.js +0 -16
- package/dist/setup/setup.tool.d.ts +0 -11
- package/dist/setup/setup.tool.d.ts.map +0 -1
- package/dist/setup/setup.tool.js +0 -52
- package/dist/storage/index.d.ts +0 -7
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js +0 -6
- package/dist/storage/interfaces/get-data.response.d.ts +0 -4
- package/dist/storage/interfaces/get-data.response.d.ts.map +0 -1
- package/dist/storage/interfaces/get-data.response.js +0 -1
- package/dist/storage/interfaces/index.d.ts +0 -2
- package/dist/storage/interfaces/index.d.ts.map +0 -1
- package/dist/storage/interfaces/index.js +0 -1
- package/dist/storage/methods/storage.methods.d.ts +0 -5
- package/dist/storage/methods/storage.methods.d.ts.map +0 -1
- package/dist/storage/methods/storage.methods.js +0 -65
- package/dist/storage/providers/dht-storage-provider.tool.d.ts +0 -12
- package/dist/storage/providers/dht-storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/dht-storage-provider.tool.js +0 -25
- package/dist/storage/providers/disk-storage-provider.tool.d.ts +0 -45
- package/dist/storage/providers/disk-storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/disk-storage-provider.tool.js +0 -134
- package/dist/storage/providers/encrypted-storage-provider.tool.d.ts +0 -1
- package/dist/storage/providers/encrypted-storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/encrypted-storage-provider.tool.js +0 -63
- package/dist/storage/providers/memory-storage-provider.tool.d.ts +0 -32
- package/dist/storage/providers/memory-storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/memory-storage-provider.tool.js +0 -65
- package/dist/storage/providers/secure-storage-provider.tool.d.ts +0 -25
- package/dist/storage/providers/secure-storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/secure-storage-provider.tool.js +0 -72
- package/dist/storage/providers/storage-provider.tool.d.ts +0 -11
- package/dist/storage/providers/storage-provider.tool.d.ts.map +0 -1
- package/dist/storage/providers/storage-provider.tool.js +0 -24
- package/dist/storage/storage.tool.d.ts +0 -12
- package/dist/storage/storage.tool.d.ts.map +0 -1
- package/dist/storage/storage.tool.js +0 -41
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
export * from './registry/index.js';
|
|
2
|
-
export * from './storage/index.js';
|
|
3
|
-
export * from './agent/index.js';
|
|
4
1
|
export * from './init.js';
|
|
5
2
|
export * from './plan/index.js';
|
|
6
|
-
export * from './setup/index.js';
|
|
7
3
|
export * from './encryption/index.js';
|
|
8
|
-
export * from './leader/index.js';
|
|
9
4
|
export * from './web/index.js';
|
|
10
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
export * from './registry/index.js';
|
|
2
|
-
export * from './storage/index.js';
|
|
3
|
-
export * from './agent/index.js';
|
|
4
1
|
export * from './init.js';
|
|
5
2
|
export * from './plan/index.js';
|
|
6
|
-
export * from './setup/index.js';
|
|
7
3
|
export * from './encryption/index.js';
|
|
8
|
-
export * from './leader/index.js';
|
|
9
4
|
export * from './web/index.js';
|
package/dist/init.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { RegistryMemoryTool } from '
|
|
2
|
-
import { StorageTool } from '
|
|
1
|
+
import { RegistryMemoryTool } from '@olane/o-leader';
|
|
2
|
+
import { StorageTool } from '@olane/o-storage';
|
|
3
3
|
import { SearchTool } from './search/search.tool.js';
|
|
4
|
-
import { SetupTool } from './setup/setup.tool.js';
|
|
5
4
|
import { EncryptionTool } from './encryption/encryption.tool.js';
|
|
6
5
|
import { EncryptedPlanStorageTool } from './plan/encrypted-plan-storage.tool.js';
|
|
7
6
|
import { oVirtualTool } from '@olane/o-tool';
|
|
8
|
-
export declare const initCommonTools: (oNode: oVirtualTool) => (
|
|
7
|
+
export declare const initCommonTools: (oNode: oVirtualTool) => (SearchTool | EncryptionTool | EncryptedPlanStorageTool | RegistryMemoryTool | StorageTool)[];
|
|
9
8
|
//# sourceMappingURL=init.d.ts.map
|
package/dist/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAO,MAAM,eAAe,UAAW,YAAY,kGAgClD,CAAC"}
|
package/dist/init.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { RegistryMemoryTool } from '
|
|
1
|
+
import { RegistryMemoryTool } from '@olane/o-leader';
|
|
2
2
|
import { oAddress } from '@olane/o-core';
|
|
3
|
-
import { StorageTool } from '
|
|
3
|
+
import { StorageTool } from '@olane/o-storage';
|
|
4
4
|
import { SearchTool } from './search/search.tool.js';
|
|
5
|
-
import { SetupTool } from './setup/setup.tool.js';
|
|
6
5
|
import { EncryptionTool } from './encryption/encryption.tool.js';
|
|
7
6
|
import { EncryptedPlanStorageTool } from './plan/encrypted-plan-storage.tool.js';
|
|
8
7
|
export const initCommonTools = (oNode) => {
|
|
@@ -27,10 +26,6 @@ export const initCommonTools = (oNode) => {
|
|
|
27
26
|
name: 'search',
|
|
28
27
|
...params,
|
|
29
28
|
}),
|
|
30
|
-
new SetupTool({
|
|
31
|
-
name: 'setup',
|
|
32
|
-
...params,
|
|
33
|
-
}),
|
|
34
29
|
new EncryptedPlanStorageTool({
|
|
35
30
|
name: 'plan',
|
|
36
31
|
address: new oAddress('o://plan'),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { oAddress } from '@olane/o-core';
|
|
2
2
|
import { oToolConfig } from '@olane/o-tool';
|
|
3
|
-
import { DiskStorageProvider } from '
|
|
3
|
+
import { DiskStorageProvider } from '@olane/o-storage';
|
|
4
4
|
declare const DiskPlanStorageTool_base: typeof DiskStorageProvider & (new (...args: any[]) => any);
|
|
5
5
|
export declare class DiskPlanStorageTool extends DiskPlanStorageTool_base {
|
|
6
6
|
constructor(config: oToolConfig & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disk-plan-storage.tool.d.ts","sourceRoot":"","sources":["../../src/plan/disk-plan-storage.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"disk-plan-storage.tool.d.ts","sourceRoot":"","sources":["../../src/plan/disk-plan-storage.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;;AAMvD,qBAAa,mBAAoB,SAAQ,wBAAqC;gBAChE,MAAM,EAAE,WAAW,GAAG;QAAE,OAAO,EAAE,QAAQ,CAAA;KAAE;CAMxD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { oPlanStorageTool } from './plan-storage.tool.js';
|
|
2
|
-
import { DiskStorageProvider } from '
|
|
2
|
+
import { DiskStorageProvider } from '@olane/o-storage';
|
|
3
3
|
export class DiskPlanStorageTool extends oPlanStorageTool(DiskStorageProvider) {
|
|
4
4
|
constructor(config) {
|
|
5
5
|
super({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { oAddress } from '@olane/o-core';
|
|
2
2
|
import { oToolConfig } from '@olane/o-tool';
|
|
3
|
-
import { SecureStorageProvider } from '
|
|
3
|
+
import { SecureStorageProvider } from '@olane/o-storage';
|
|
4
4
|
declare const EncryptedPlanStorageTool_base: typeof SecureStorageProvider & (new (...args: any[]) => any);
|
|
5
5
|
export declare class EncryptedPlanStorageTool extends EncryptedPlanStorageTool_base {
|
|
6
6
|
constructor(config: oToolConfig & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encrypted-plan-storage.tool.d.ts","sourceRoot":"","sources":["../../src/plan/encrypted-plan-storage.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"encrypted-plan-storage.tool.d.ts","sourceRoot":"","sources":["../../src/plan/encrypted-plan-storage.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;;AAMzD,qBAAa,wBAAyB,SAAQ,6BAE7C;gBACa,MAAM,EAAE,WAAW,GAAG;QAAE,OAAO,EAAE,QAAQ,CAAA;KAAE;CAMxD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { oPlanStorageTool } from './plan-storage.tool.js';
|
|
2
|
-
import { SecureStorageProvider } from '
|
|
2
|
+
import { SecureStorageProvider } from '@olane/o-storage';
|
|
3
3
|
export class EncryptedPlanStorageTool extends oPlanStorageTool(SecureStorageProvider) {
|
|
4
4
|
constructor(config) {
|
|
5
5
|
super({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { oAddress } from '@olane/o-core';
|
|
2
|
-
import { MemoryStorageProvider } from '
|
|
2
|
+
import { MemoryStorageProvider } from '@olane/o-storage';
|
|
3
3
|
import { oToolConfig } from '@olane/o-tool';
|
|
4
4
|
declare const MemoryPlanStorageTool_base: typeof MemoryStorageProvider & (new (...args: any[]) => any);
|
|
5
5
|
export declare class MemoryPlanStorageTool extends MemoryPlanStorageTool_base {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-plan-storage.tool.d.ts","sourceRoot":"","sources":["../../src/plan/memory-plan-storage.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"memory-plan-storage.tool.d.ts","sourceRoot":"","sources":["../../src/plan/memory-plan-storage.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;;AAM5C,qBAAa,qBAAsB,SAAQ,0BAE1C;gBACa,MAAM,EAAE,WAAW,GAAG;QAAE,OAAO,EAAE,QAAQ,CAAA;KAAE;CAMxD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { oPlanStorageTool } from './plan-storage.tool.js';
|
|
2
|
-
import { MemoryStorageProvider } from '
|
|
2
|
+
import { MemoryStorageProvider } from '@olane/o-storage';
|
|
3
3
|
export class MemoryPlanStorageTool extends oPlanStorageTool(MemoryStorageProvider) {
|
|
4
4
|
constructor(config) {
|
|
5
5
|
super({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/o-tools-common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,14 +31,10 @@
|
|
|
31
31
|
},
|
|
32
32
|
"author": "oLane Inc.",
|
|
33
33
|
"license": "ISC",
|
|
34
|
-
"description": "oLane
|
|
34
|
+
"description": "oLane common tools for most tool nodes",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@eslint/eslintrc": "^3.3.1",
|
|
37
37
|
"@eslint/js": "^9.29.0",
|
|
38
|
-
"@olane/o-config": "0.5.1",
|
|
39
|
-
"@olane/o-core": "0.5.1",
|
|
40
|
-
"@olane/o-protocol": "0.5.1",
|
|
41
|
-
"@olane/o-tool": "0.5.1",
|
|
42
38
|
"@tsconfig/node20": "^20.1.6",
|
|
43
39
|
"@types/jest": "^30.0.0",
|
|
44
40
|
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
@@ -56,10 +52,12 @@
|
|
|
56
52
|
"typescript": "5.4.5"
|
|
57
53
|
},
|
|
58
54
|
"peerDependencies": {
|
|
59
|
-
"@olane/o-config": "^0.
|
|
60
|
-
"@olane/o-core": "^0.
|
|
61
|
-
"@olane/o-
|
|
62
|
-
"@olane/o-
|
|
55
|
+
"@olane/o-config": "^0.6.2",
|
|
56
|
+
"@olane/o-core": "^0.6.2",
|
|
57
|
+
"@olane/o-leader": "^0.6.1",
|
|
58
|
+
"@olane/o-protocol": "^0.6.2",
|
|
59
|
+
"@olane/o-storage": "^0.6.1",
|
|
60
|
+
"@olane/o-tool": "^0.6.2"
|
|
63
61
|
},
|
|
64
62
|
"dependencies": {
|
|
65
63
|
"debug": "^4.4.1",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { oToolConfig, oVirtualTool, ToolResult } from '@olane/o-tool';
|
|
2
|
-
import { oRequest } from '@olane/o-core';
|
|
3
|
-
export declare class AgentsTool extends oVirtualTool {
|
|
4
|
-
private roundRobinIndex;
|
|
5
|
-
constructor(config: oToolConfig);
|
|
6
|
-
_tool_get_agents(request: oRequest): Promise<ToolResult>;
|
|
7
|
-
_tool_get_agent(request: oRequest): Promise<ToolResult>;
|
|
8
|
-
_tool_get_agent_by_id(request: oRequest): Promise<ToolResult>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=agents.tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agents.tool.d.ts","sourceRoot":"","sources":["../../src/agent/agents.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEnD,qBAAa,UAAW,SAAQ,YAAY;IAC1C,OAAO,CAAC,eAAe,CAAK;gBAEhB,MAAM,EAAE,WAAW;IAOzB,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAIxD,eAAe,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAIvD,qBAAqB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAGpE"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { oVirtualTool } from '@olane/o-tool';
|
|
2
|
-
import { oAddress } from '@olane/o-core';
|
|
3
|
-
export class AgentsTool extends oVirtualTool {
|
|
4
|
-
constructor(config) {
|
|
5
|
-
super({
|
|
6
|
-
...config,
|
|
7
|
-
address: new oAddress('o://agents'),
|
|
8
|
-
});
|
|
9
|
-
this.roundRobinIndex = 0;
|
|
10
|
-
}
|
|
11
|
-
async _tool_get_agents(request) {
|
|
12
|
-
throw new Error('Not implemented');
|
|
13
|
-
}
|
|
14
|
-
async _tool_get_agent(request) {
|
|
15
|
-
throw new Error('Not implemented');
|
|
16
|
-
}
|
|
17
|
-
async _tool_get_agent_by_id(request) {
|
|
18
|
-
throw new Error('Not implemented');
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent.tool.d.ts","sourceRoot":"","sources":["../../src/agent/ai-agent.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,qBAAa,YAAa,SAAQ,UAAU;gBAC9B,MAAM,EAAE,YAAY;CAMjC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { oVirtualTool, ToolResult } from '@olane/o-tool';
|
|
2
|
-
import { oRequest } from '@olane/o-core';
|
|
3
|
-
import { oAgentConfig } from './interfaces/agent.config.js';
|
|
4
|
-
export declare abstract class oAgentTool extends oVirtualTool {
|
|
5
|
-
protected respond: (intent: string) => Promise<string>;
|
|
6
|
-
protected answer: (intent: string) => Promise<string>;
|
|
7
|
-
constructor(config: oAgentConfig);
|
|
8
|
-
_tool_intent(request: oRequest): Promise<ToolResult>;
|
|
9
|
-
_tool_question(request: oRequest): Promise<ToolResult>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=base-agent.tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-agent.tool.d.ts","sourceRoot":"","sources":["../../src/agent/base-agent.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,8BAAsB,UAAW,SAAQ,YAAY;IACnD,SAAS,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD,SAAS,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;gBAE1C,MAAM,EAAE,YAAY;IAU1B,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAWpD,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAU7D"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { oVirtualTool } from '@olane/o-tool';
|
|
2
|
-
import { oAddress } from '@olane/o-core';
|
|
3
|
-
import { AGENT_METHODS } from './methods/agent.methods.js';
|
|
4
|
-
export class oAgentTool extends oVirtualTool {
|
|
5
|
-
constructor(config) {
|
|
6
|
-
super({
|
|
7
|
-
...config,
|
|
8
|
-
address: config?.address || new oAddress('o://agent'),
|
|
9
|
-
methods: AGENT_METHODS,
|
|
10
|
-
});
|
|
11
|
-
this.respond = config.respond;
|
|
12
|
-
this.answer = config.answer;
|
|
13
|
-
}
|
|
14
|
-
async _tool_intent(request) {
|
|
15
|
-
const { intent, context } = request.params;
|
|
16
|
-
const response = await this.respond(intent);
|
|
17
|
-
return {
|
|
18
|
-
success: true,
|
|
19
|
-
resolution: response,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
async _tool_question(request) {
|
|
23
|
-
const { question } = request.params;
|
|
24
|
-
const response = await this.answer(question);
|
|
25
|
-
return {
|
|
26
|
-
success: true,
|
|
27
|
-
answer: response,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"human-agent.tool.d.ts","sourceRoot":"","sources":["../../src/agent/human-agent.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,qBAAa,eAAgB,SAAQ,UAAU;gBACjC,MAAM,EAAE,YAAY;CAMjC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { oAddress } from '@olane/o-core';
|
|
2
|
-
import { oAgentTool } from './base-agent.tool.js';
|
|
3
|
-
export class oHumanAgentTool extends oAgentTool {
|
|
4
|
-
constructor(config) {
|
|
5
|
-
super({
|
|
6
|
-
...config,
|
|
7
|
-
address: config.address || new oAddress('o://human'),
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
}
|
package/dist/agent/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
package/dist/agent/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.config.d.ts","sourceRoot":"","sources":["../../../src/agent/interfaces/agent.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.methods.d.ts","sourceRoot":"","sources":["../../../src/agent/methods/agent.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,aAAa,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CA6BnD,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export const AGENT_METHODS = {
|
|
2
|
-
intent: {
|
|
3
|
-
name: 'intent',
|
|
4
|
-
description: 'Agent handler for resolving an intent.',
|
|
5
|
-
parameters: [
|
|
6
|
-
{
|
|
7
|
-
name: 'intent',
|
|
8
|
-
type: 'string',
|
|
9
|
-
value: 'string',
|
|
10
|
-
description: 'The intent to resolve.',
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
dependencies: [],
|
|
15
|
-
},
|
|
16
|
-
question_answer: {
|
|
17
|
-
name: 'question_answer',
|
|
18
|
-
description: 'Agent handler for answering a question.',
|
|
19
|
-
parameters: [
|
|
20
|
-
{
|
|
21
|
-
name: 'question',
|
|
22
|
-
type: 'string',
|
|
23
|
-
value: 'string',
|
|
24
|
-
description: 'The question to answer.',
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
dependencies: [],
|
|
29
|
-
},
|
|
30
|
-
};
|
package/dist/leader/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/leader/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
package/dist/leader/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './leader.node.js';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { oRequest } from '@olane/o-core';
|
|
2
|
-
import { oServerTool, oToolConfig } from '@olane/o-tool';
|
|
3
|
-
export declare class oLeaderNode extends oServerTool {
|
|
4
|
-
constructor(config: oToolConfig);
|
|
5
|
-
validateJoinRequest(request: oRequest): Promise<any>;
|
|
6
|
-
_tool_join_network(request: oRequest): Promise<any>;
|
|
7
|
-
_tool_save_plan(request: oRequest): Promise<any>;
|
|
8
|
-
_tool_index_network(request: oRequest): Promise<any>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=leader.node.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"leader.node.d.ts","sourceRoot":"","sources":["../../src/leader/leader.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,QAAQ,EAET,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGzD,qBAAa,WAAY,SAAQ,WAAW;gBAC9B,MAAM,EAAE,WAAW;IAWzB,mBAAmB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAIpD,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAuBnD,eAAe,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAUhD,mBAAmB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;CA2B3D"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { LEADER_ADRESS, NodeType, oAddress, } from '@olane/o-core';
|
|
2
|
-
import { oServerTool } from '@olane/o-tool';
|
|
3
|
-
import { START_METHOD } from './methods/start.method.js';
|
|
4
|
-
export class oLeaderNode extends oServerTool {
|
|
5
|
-
constructor(config) {
|
|
6
|
-
super({
|
|
7
|
-
...config,
|
|
8
|
-
address: new oAddress(LEADER_ADRESS),
|
|
9
|
-
type: NodeType.LEADER,
|
|
10
|
-
methods: {
|
|
11
|
-
start: START_METHOD,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
async validateJoinRequest(request) {
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
async _tool_join_network(request) {
|
|
19
|
-
const { caller, parent, transports } = request.params;
|
|
20
|
-
this.logger.debug('Joining network: ' + caller);
|
|
21
|
-
if (!caller || !parent || !transports) {
|
|
22
|
-
throw new Error('Invalid parameters provided, cannot join network');
|
|
23
|
-
}
|
|
24
|
-
await this.validateJoinRequest(request);
|
|
25
|
-
await this.use(new oAddress(parent), {
|
|
26
|
-
method: 'add_child',
|
|
27
|
-
params: {
|
|
28
|
-
address: caller,
|
|
29
|
-
transports: transports,
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
return {
|
|
33
|
-
message: 'Network joined!',
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
async _tool_save_plan(request) {
|
|
37
|
-
const { plan } = request.params;
|
|
38
|
-
this.logger.debug('Adding plan to network: ' + plan);
|
|
39
|
-
if (!this.config.networkName) {
|
|
40
|
-
this.logger.warn('No network name provided, cannot update config');
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
async _tool_index_network(request) {
|
|
45
|
-
// paginate through all the registered nodes and index them
|
|
46
|
-
const nodes = await this.use(new oAddress('o://leader/register'), {
|
|
47
|
-
method: 'find_all',
|
|
48
|
-
params: {},
|
|
49
|
-
});
|
|
50
|
-
const nodesArray = nodes.result.data;
|
|
51
|
-
for (let i = 0; i < nodesArray.length; i++) {
|
|
52
|
-
// first let's get the node's tools
|
|
53
|
-
const node = nodesArray[i];
|
|
54
|
-
const { result } = await this.use(new oAddress(node.address), {
|
|
55
|
-
method: 'index_network',
|
|
56
|
-
params: {},
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
message: 'Network indexed!',
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start.method.d.ts","sourceRoot":"","sources":["../../../src/leader/methods/start.method.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,YAAY,EAAE,OAoB1B,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const START_METHOD = {
|
|
2
|
-
name: 'intent',
|
|
3
|
-
description: 'Resolve the intent of the task',
|
|
4
|
-
dependencies: [],
|
|
5
|
-
parameters: [
|
|
6
|
-
{
|
|
7
|
-
name: 'intent',
|
|
8
|
-
type: 'string',
|
|
9
|
-
value: 'string',
|
|
10
|
-
description: 'The intent of the task',
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
name: 'context',
|
|
15
|
-
type: 'string',
|
|
16
|
-
value: 'string',
|
|
17
|
-
description: 'The user input to the task',
|
|
18
|
-
required: false,
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plan.methods.d.ts","sourceRoot":"","sources":["../../../src/plan/methods/plan.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAOhD,CAAC"}
|
package/dist/registry/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC"}
|
package/dist/registry/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.interface.d.ts","sourceRoot":"","sources":["../../../src/registry/interfaces/search.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.methods.d.ts","sourceRoot":"","sources":["../../../src/registry/methods/registry.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,eAAe,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAyErD,CAAC"}
|