@olane/os 0.7.12-alpha.51 → 0.7.12-alpha.52

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.
@@ -1,2 +1,2 @@
1
- export {};
1
+ import 'dotenv/config';
2
2
  //# sourceMappingURL=playground.spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"playground.spec.d.ts","sourceRoot":"","sources":["../../../test/basic/playground.spec.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"playground.spec.d.ts","sourceRoot":"","sources":["../../../test/basic/playground.spec.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC"}
@@ -1,10 +1,10 @@
1
+ import 'dotenv/config';
1
2
  import { NodeState } from '@olane/o-core';
2
3
  import { expect } from 'chai';
3
- import dotenv from 'dotenv';
4
4
  import { defaultOSInstance } from '../utils/os.default.js';
5
5
  import { oNodeAddress, oNodeTransport } from '@olane/o-node';
6
6
  import { tmpNode } from '../utils/tmp.node.js';
7
- dotenv.config();
7
+ import { oLimitedTool } from '@olane/o-client-limited';
8
8
  const network = defaultOSInstance;
9
9
  const entryNode = tmpNode;
10
10
  let humanNode;
@@ -13,10 +13,18 @@ describe('playground running', async () => {
13
13
  await entryNode.start();
14
14
  expect(entryNode).to.exist;
15
15
  expect(entryNode.state).to.equal(NodeState.RUNNING);
16
- console.log('Using intelligence tool');
17
16
  const leader = new oNodeAddress('o://leader', [
18
- new oNodeTransport('/ip4/127.0.0.1/tcp/4000/ws/p2p/12D3KooWPHdsHhEdyBd9DS2zHJ1vRSyqSkZ97iT7F8ByYJ7U7bw8'),
17
+ new oNodeTransport(
18
+ // '/dns4/leader.olane.com/tcp/4000/tls/ws',
19
+ '/ip4/127.0.0.1/tcp/4000/ws/p2p/12D3KooWPHdsHhEdyBd9DS2zHJ1vRSyqSkZ97iT7F8ByYJ7U7bw8'),
19
20
  ]);
21
+ const joinedNode = new oLimitedTool({
22
+ address: new oNodeAddress('o://joined'),
23
+ leader: leader,
24
+ parent: leader,
25
+ joinToken: 'test',
26
+ });
27
+ await joinedNode.start(); // should join the network
20
28
  // humanNode = new oHumanLoginTool({
21
29
  // address: new oNodeAddress('o://human'),
22
30
  // leader: leader,
@@ -32,20 +40,32 @@ describe('playground running', async () => {
32
40
  // },
33
41
  // });
34
42
  // await humanNode.start();
35
- const response = await entryNode.useStream(leader, {
36
- method: 'intent',
37
- params: {
38
- _isStreaming: true,
39
- intent: 'Use the perplexity tool to search for the latest news on the stock market',
40
- _token: 'test',
41
- },
42
- }, {
43
- abortSignal: AbortSignal.timeout(5000),
44
- onChunk: (chunk) => {
45
- console.log('Received chunk:', JSON.stringify(chunk.result.data, null, 2));
46
- },
43
+ // const response = await entryNode.useStream(
44
+ // leader,
45
+ // {
46
+ // method: 'intent',
47
+ // params: {
48
+ // _isStreaming: true,
49
+ // intent:
50
+ // 'Use the perplexity tool to search for the latest news on the stock market',
51
+ // _token: 'test',
52
+ // },
53
+ // },
54
+ // {
55
+ // abortSignal: AbortSignal.timeout(5_000),
56
+ // onChunk: (chunk) => {
57
+ // console.log(
58
+ // 'Received chunk:',
59
+ // JSON.stringify(chunk.result.data, null, 2),
60
+ // );
61
+ // },
62
+ // },
63
+ // );
64
+ const response = await entryNode.use(new oNodeAddress('o://leader/joined', leader.transports), {
65
+ method: 'ping',
66
+ params: {},
47
67
  });
48
- // console.log('Response:', response.result.data);
68
+ console.log('Response:', response.result.data);
49
69
  await entryNode.stop();
50
70
  });
51
71
  // it('should fail when action is not approved', async () => {
@@ -1,3 +1,3 @@
1
- import { oLaneTool } from '@olane/o-lane';
2
- export declare const tmpNode: oLaneTool;
1
+ import { oLimitedTool } from '@olane/o-client-limited';
2
+ export declare const tmpNode: oLimitedTool;
3
3
  //# sourceMappingURL=tmp.node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tmp.node.d.ts","sourceRoot":"","sources":["../../../test/utils/tmp.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,eAAO,MAAM,OAAO,WAKlB,CAAC"}
1
+ {"version":3,"file":"tmp.node.d.ts","sourceRoot":"","sources":["../../../test/utils/tmp.node.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,eAAO,MAAM,OAAO,cAKlB,CAAC"}
@@ -1,6 +1,6 @@
1
- import { oLaneTool } from '@olane/o-lane';
2
1
  import { oNodeAddress } from '@olane/o-node';
3
- export const tmpNode = new oLaneTool({
2
+ import { oLimitedTool } from '@olane/o-client-limited';
3
+ export const tmpNode = new oLimitedTool({
4
4
  address: new oNodeAddress('o://tmp-node'),
5
5
  leader: null,
6
6
  parent: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olane/os",
3
- "version": "0.7.12-alpha.51",
3
+ "version": "0.7.12-alpha.52",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -57,22 +57,23 @@
57
57
  "typescript": "5.4.5"
58
58
  },
59
59
  "dependencies": {
60
- "@olane/o-config": "0.7.12-alpha.51",
61
- "@olane/o-core": "0.7.12-alpha.51",
62
- "@olane/o-intelligence": "0.7.12-alpha.51",
63
- "@olane/o-lane": "0.7.12-alpha.51",
64
- "@olane/o-leader": "0.7.12-alpha.51",
65
- "@olane/o-login": "0.7.12-alpha.51",
66
- "@olane/o-protocol": "0.7.12-alpha.51",
67
- "@olane/o-storage": "0.7.12-alpha.51",
68
- "@olane/o-tool": "0.7.12-alpha.51",
69
- "@olane/o-tool-registry": "0.7.12-alpha.51",
70
- "@olane/o-tools-common": "0.7.12-alpha.51",
60
+ "@olane/o-client-limited": "0.7.12-alpha.52",
61
+ "@olane/o-config": "0.7.12-alpha.52",
62
+ "@olane/o-core": "0.7.12-alpha.52",
63
+ "@olane/o-intelligence": "0.7.12-alpha.52",
64
+ "@olane/o-lane": "0.7.12-alpha.52",
65
+ "@olane/o-leader": "0.7.12-alpha.52",
66
+ "@olane/o-login": "0.7.12-alpha.52",
67
+ "@olane/o-protocol": "0.7.12-alpha.52",
68
+ "@olane/o-storage": "0.7.12-alpha.52",
69
+ "@olane/o-tool": "0.7.12-alpha.52",
70
+ "@olane/o-tool-registry": "0.7.12-alpha.52",
71
+ "@olane/o-tools-common": "0.7.12-alpha.52",
71
72
  "chalk": "^5.4.1",
72
73
  "debug": "^4.4.1",
73
74
  "dotenv": "^16.5.0",
74
75
  "fs-extra": "^11.3.0",
75
76
  "touch": "^3.1.1"
76
77
  },
77
- "gitHead": "b877e1e95a2bf32845ec30072eb72422fd25aba7"
78
+ "gitHead": "f916d978a6cc64c8d21881d08a79b450bc85cce1"
78
79
  }