@olane/o-tools-common 0.4.1 → 0.4.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 CHANGED
@@ -6,5 +6,4 @@ export * from './plan/index.js';
6
6
  export * from './setup/index.js';
7
7
  export * from './encryption/index.js';
8
8
  export * from './leader/index.js';
9
- export * from './common/index.js';
10
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -6,4 +6,3 @@ export * from './plan/index.js';
6
6
  export * from './setup/index.js';
7
7
  export * from './encryption/index.js';
8
8
  export * from './leader/index.js';
9
- export * from './common/index.js';
@@ -1,7 +1,6 @@
1
1
  import { oRequest } from '@olane/o-core';
2
- import { oToolConfig } from '@olane/o-tool';
3
- import { oCommonNode } from '../common/index.js';
4
- export declare class oLeaderNode extends oCommonNode {
2
+ import { oServerTool, oToolConfig } from '@olane/o-tool';
3
+ export declare class oLeaderNode extends oServerTool {
5
4
  constructor(config: oToolConfig);
6
5
  validateJoinRequest(request: oRequest): Promise<any>;
7
6
  _tool_join_network(request: oRequest): Promise<any>;
@@ -1 +1 @@
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,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,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;CAwB3D"}
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,7 +1,7 @@
1
1
  import { LEADER_ADRESS, NodeType, oAddress, } from '@olane/o-core';
2
- import { oCommonNode } from '../common/index.js';
2
+ import { oServerTool } from '@olane/o-tool';
3
3
  import { START_METHOD } from './methods/start.method.js';
4
- export class oLeaderNode extends oCommonNode {
4
+ export class oLeaderNode extends oServerTool {
5
5
  constructor(config) {
6
6
  super({
7
7
  ...config,
@@ -56,5 +56,8 @@ export class oLeaderNode extends oCommonNode {
56
56
  params: {},
57
57
  });
58
58
  }
59
+ return {
60
+ message: 'Network indexed!',
61
+ };
59
62
  }
60
63
  }
@@ -1,6 +1,6 @@
1
1
  export const START_METHOD = {
2
- name: 'start',
3
- description: 'Start a task',
2
+ name: 'intent',
3
+ description: 'Resolve the intent of the task',
4
4
  dependencies: [],
5
5
  parameters: [
6
6
  {
@@ -11,7 +11,7 @@ export const START_METHOD = {
11
11
  required: true,
12
12
  },
13
13
  {
14
- name: 'userInput',
14
+ name: 'context',
15
15
  type: 'string',
16
16
  value: 'string',
17
17
  description: 'The user input to the task',
@@ -1 +1 @@
1
- {"version":3,"file":"dht-storage-provider.tool.d.ts","sourceRoot":"","sources":["../../../src/storage/providers/dht-storage-provider.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,qBAAa,kBAAmB,SAAQ,mBAAmB;gBAC7C,MAAM,EAAE,WAAW;IAQzB,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAIjD,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,eAAe,CAAC;IAItD,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAIpD,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAGxD"}
1
+ {"version":3,"file":"dht-storage-provider.tool.d.ts","sourceRoot":"","sources":["../../../src/storage/providers/dht-storage-provider.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,qBAAa,kBAAmB,SAAQ,mBAAmB;gBAC7C,MAAM,EAAE,WAAW;IASzB,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAIjD,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,eAAe,CAAC;IAItD,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAIpD,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAGxD"}
@@ -7,6 +7,7 @@ export class DhtStorageProvider extends StorageProviderTool {
7
7
  ...config,
8
8
  address: new oAddress('o://dht'),
9
9
  methods: STORAGE_PARAMS,
10
+ description: 'Distributed hash table storage provider',
10
11
  });
11
12
  }
12
13
  async _tool_put(request) {
@@ -1 +1 @@
1
- {"version":3,"file":"disk-storage-provider.tool.d.ts","sourceRoot":"","sources":["../../../src/storage/providers/disk-storage-provider.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAuB,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAIxE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAGrE,UAAU,iBAA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B,IAAI,OAAO,CAAC,IAAI,CAAC;IAQjD;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAM1C;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA0BvD;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,eAAe,CAAC;IAW5D;;;OAGG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAyB1D;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAyBxD"}
@@ -9,6 +9,7 @@ export class DiskStorageProvider extends StorageProviderTool {
9
9
  ...config,
10
10
  address: config.address || new oAddress('o://disk'),
11
11
  methods: STORAGE_PARAMS,
12
+ description: 'Disk storage provider',
12
13
  });
13
14
  // Use a default storage directory, can be overridden via config
14
15
  this.storageDir =
@@ -1 +1 @@
1
- {"version":3,"file":"memory-storage-provider.tool.d.ts","sourceRoot":"","sources":["../../../src/storage/providers/memory-storage-provider.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,qBAAa,qBAAsB,SAAQ,mBAAmB;IAC5D,OAAO,CAAC,OAAO,CAAsB;gBACzB,MAAM,EAAE,UAAU;IAS9B;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAQvD;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,eAAe,CAAC;IAa5D;;;OAGG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAQ1D;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAMxD"}
1
+ {"version":3,"file":"memory-storage-provider.tool.d.ts","sourceRoot":"","sources":["../../../src/storage/providers/memory-storage-provider.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,qBAAa,qBAAsB,SAAQ,mBAAmB;IAC5D,OAAO,CAAC,OAAO,CAAsB;gBACzB,MAAM,EAAE,UAAU;IAU9B;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAQvD;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,eAAe,CAAC;IAa5D;;;OAGG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAQ1D;;;;OAIG;IACG,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAMxD"}
@@ -7,6 +7,7 @@ export class MemoryStorageProvider extends StorageProviderTool {
7
7
  ...config,
8
8
  address: config.address || new oAddress('o://memory'),
9
9
  methods: STORAGE_PARAMS,
10
+ description: 'In-memory storage provider',
10
11
  });
11
12
  this.storage = new Map();
12
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"secure-storage-provider.tool.d.ts","sourceRoot":"","sources":["../../../src/storage/providers/secure-storage-provider.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,U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sB7D"}
@@ -8,6 +8,7 @@ export class SecureStorageProvider extends DiskStorageProvider {
8
8
  ...config,
9
9
  address: config.address || new oAddress('o://secure-storage'),
10
10
  methods: STORAGE_PARAMS,
11
+ description: 'Secure storage provider',
11
12
  });
12
13
  }
13
14
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olane/o-tools-common",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,10 +34,10 @@
34
34
  "devDependencies": {
35
35
  "@eslint/eslintrc": "^3.3.1",
36
36
  "@eslint/js": "^9.29.0",
37
- "@olane/o-config": "0.4.1",
38
- "@olane/o-core": "0.4.1",
39
- "@olane/o-protocol": "0.4.1",
40
- "@olane/o-tool": "0.4.1",
37
+ "@olane/o-config": "0.4.2",
38
+ "@olane/o-core": "0.4.2",
39
+ "@olane/o-protocol": "0.4.2",
40
+ "@olane/o-tool": "0.4.2",
41
41
  "@tsconfig/node20": "^20.1.6",
42
42
  "@types/jest": "^30.0.0",
43
43
  "@typescript-eslint/eslint-plugin": "^8.34.1",
@@ -55,10 +55,10 @@
55
55
  "typescript": "5.4.5"
56
56
  },
57
57
  "peerDependencies": {
58
- "@olane/o-config": "^0.4.1",
59
- "@olane/o-core": "^0.4.1",
60
- "@olane/o-protocol": "^0.4.1",
61
- "@olane/o-tool": "^0.4.1"
58
+ "@olane/o-config": "^0.4.2",
59
+ "@olane/o-core": "^0.4.2",
60
+ "@olane/o-protocol": "^0.4.2",
61
+ "@olane/o-tool": "^0.4.2"
62
62
  },
63
63
  "dependencies": {
64
64
  "debug": "^4.4.1",
@@ -1,6 +0,0 @@
1
- import { CoreConfig } from '@olane/o-core';
2
- import { oVirtualTool } from '@olane/o-tool';
3
- export declare class oCommonNode extends oVirtualTool {
4
- constructor(config: CoreConfig);
5
- }
6
- //# sourceMappingURL=common.node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.node.d.ts","sourceRoot":"","sources":["../../src/common/common.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,qBAAa,WAAY,SAAQ,YAAY;gBAC/B,MAAM,EAAE,UAAU;CAG/B"}
@@ -1,6 +0,0 @@
1
- import { oVirtualTool } from '@olane/o-tool';
2
- export class oCommonNode extends oVirtualTool {
3
- constructor(config) {
4
- super(config);
5
- }
6
- }
@@ -1,2 +0,0 @@
1
- export * from './common.node.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- export * from './common.node.js';