@olane/os 0.7.12 → 0.7.13-alpha.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OlaneOSSystemStatus } from './enum/o-os.status-enum.js';
|
|
2
|
-
import
|
|
2
|
+
import touch from 'touch';
|
|
3
3
|
import { readFile } from 'fs/promises';
|
|
4
4
|
import { oLeaderNode } from '@olane/o-leader';
|
|
5
5
|
import { oAddress, oObject } from '@olane/o-core';
|
|
@@ -2,6 +2,7 @@ import 'dotenv/config';
|
|
|
2
2
|
import { NodeState } from '@olane/o-core';
|
|
3
3
|
import { expect } from 'chai';
|
|
4
4
|
import { defaultOSInstance } from '../utils/os.default.js';
|
|
5
|
+
import { oNodeAddress, oNodeTransport } from '@olane/o-node';
|
|
5
6
|
const network = defaultOSInstance;
|
|
6
7
|
// const entryNode = tmpNode;
|
|
7
8
|
let humanNode;
|
|
@@ -11,12 +12,11 @@ describe('playground running', async () => {
|
|
|
11
12
|
const entryNode = network.entryNode();
|
|
12
13
|
expect(entryNode).to.exist;
|
|
13
14
|
expect(entryNode.state).to.equal(NodeState.RUNNING);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// ]);
|
|
15
|
+
const leader = new oNodeAddress('o://leader', [
|
|
16
|
+
new oNodeTransport(
|
|
17
|
+
// '/dns4/leader.olane.com/tcp/4000/tls/ws',
|
|
18
|
+
'/ip4/127.0.0.1/tcp/4000/ws/p2p/12D3KooWPHdsHhEdyBd9DS2zHJ1vRSyqSkZ97iT7F8ByYJ7U7bw8'),
|
|
19
|
+
]);
|
|
20
20
|
// const joinedNode = new oLimitedTool({
|
|
21
21
|
// address: new oNodeAddress('o://joined'),
|
|
22
22
|
// leader: leader,
|
|
@@ -40,13 +40,10 @@ describe('playground running', async () => {
|
|
|
40
40
|
// });
|
|
41
41
|
// await humanNode.start();
|
|
42
42
|
console.log('Using entry node:', entryNode.address.toString());
|
|
43
|
-
const response = await entryNode.useStream(
|
|
44
|
-
method: '
|
|
43
|
+
const response = await entryNode.useStream(new oNodeAddress('o://intelligence'), {
|
|
44
|
+
method: 'prompt',
|
|
45
45
|
params: {
|
|
46
|
-
|
|
47
|
-
intent: 'what is the weather in tokyo?',
|
|
48
|
-
// 'Use o://intelligence to generate the expo react native code for a new table view with example data populated',
|
|
49
|
-
_token: 'test',
|
|
46
|
+
prompt: 'hi',
|
|
50
47
|
},
|
|
51
48
|
}, {
|
|
52
49
|
abortSignal: AbortSignal.timeout(5000),
|
|
@@ -55,6 +52,29 @@ describe('playground running', async () => {
|
|
|
55
52
|
},
|
|
56
53
|
});
|
|
57
54
|
console.log('Response:', JSON.stringify(response, null, 2));
|
|
55
|
+
// console.log('Using entry node:', entryNode.address.toString());
|
|
56
|
+
// const response = await entryNode.useStream(
|
|
57
|
+
// entryNode.address,
|
|
58
|
+
// {
|
|
59
|
+
// method: 'intent',
|
|
60
|
+
// params: {
|
|
61
|
+
// _isStreaming: true,
|
|
62
|
+
// intent: 'what is the weather in tokyo?',
|
|
63
|
+
// // 'Use o://intelligence to generate the expo react native code for a new table view with example data populated',
|
|
64
|
+
// _token: 'test',
|
|
65
|
+
// },
|
|
66
|
+
// },
|
|
67
|
+
// {
|
|
68
|
+
// abortSignal: AbortSignal.timeout(5_000),
|
|
69
|
+
// onChunk: (chunk) => {
|
|
70
|
+
// console.log(
|
|
71
|
+
// 'Received chunk:',
|
|
72
|
+
// JSON.stringify(chunk.result.data, null, 2),
|
|
73
|
+
// );
|
|
74
|
+
// },
|
|
75
|
+
// },
|
|
76
|
+
// );
|
|
77
|
+
// console.log('Response:', JSON.stringify(response, null, 2));
|
|
58
78
|
// const response = await entryNode.use(
|
|
59
79
|
// new oNodeAddress('o://leader/joined', leader.transports),
|
|
60
80
|
// {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/os",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.13-alpha.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -58,23 +58,23 @@
|
|
|
58
58
|
"typescript": "5.4.5"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@olane/o-client-limited": "0.7.
|
|
62
|
-
"@olane/o-config": "0.7.
|
|
63
|
-
"@olane/o-core": "0.7.
|
|
64
|
-
"@olane/o-intelligence": "0.7.
|
|
65
|
-
"@olane/o-lane": "0.7.
|
|
66
|
-
"@olane/o-leader": "0.7.
|
|
67
|
-
"@olane/o-login": "0.7.
|
|
68
|
-
"@olane/o-protocol": "0.7.
|
|
69
|
-
"@olane/o-storage": "0.7.
|
|
70
|
-
"@olane/o-tool": "0.7.
|
|
71
|
-
"@olane/o-tool-registry": "0.7.
|
|
72
|
-
"@olane/o-tools-common": "0.7.
|
|
61
|
+
"@olane/o-client-limited": "0.7.13-alpha.1",
|
|
62
|
+
"@olane/o-config": "0.7.13-alpha.1",
|
|
63
|
+
"@olane/o-core": "0.7.13-alpha.1",
|
|
64
|
+
"@olane/o-intelligence": "0.7.13-alpha.1",
|
|
65
|
+
"@olane/o-lane": "0.7.13-alpha.1",
|
|
66
|
+
"@olane/o-leader": "0.7.13-alpha.1",
|
|
67
|
+
"@olane/o-login": "0.7.13-alpha.1",
|
|
68
|
+
"@olane/o-protocol": "0.7.13-alpha.1",
|
|
69
|
+
"@olane/o-storage": "0.7.13-alpha.1",
|
|
70
|
+
"@olane/o-tool": "0.7.13-alpha.1",
|
|
71
|
+
"@olane/o-tool-registry": "0.7.13-alpha.1",
|
|
72
|
+
"@olane/o-tools-common": "0.7.13-alpha.1",
|
|
73
73
|
"chalk": "^5.4.1",
|
|
74
74
|
"debug": "^4.4.1",
|
|
75
75
|
"dotenv": "^16.5.0",
|
|
76
76
|
"fs-extra": "^11.3.0",
|
|
77
77
|
"touch": "^3.1.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "7abba2239f85eb07a87401528b6df96e72449fe0"
|
|
80
80
|
}
|