@olane/os 0.7.1 → 0.7.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/src/o-olane-os/config/default.config.d.ts.map +1 -1
- package/dist/src/o-olane-os/config/default.config.js +2 -0
- package/dist/src/utils/config.d.ts +1 -0
- package/dist/src/utils/config.d.ts.map +1 -1
- package/dist/src/utils/config.js +7 -0
- package/dist/test/benchmarks/benchmark.spec.js +18 -15
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.config.d.ts","sourceRoot":"","sources":["../../../../src/o-olane-os/config/default.config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,eAAO,MAAM,uBAAuB,SAAU,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"default.config.d.ts","sourceRoot":"","sources":["../../../../src/o-olane-os/config/default.config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,eAAO,MAAM,uBAAuB,SAAU,MAAM,KAAG,aAmCtD,CAAC"}
|
|
@@ -13,6 +13,7 @@ export const defaultOSInstanceConfig = (port) => {
|
|
|
13
13
|
{
|
|
14
14
|
type: NodeType.LEADER,
|
|
15
15
|
address: new oAddress('o://leader'),
|
|
16
|
+
description: 'leader for my olane os instance',
|
|
16
17
|
leader: null,
|
|
17
18
|
parent: null,
|
|
18
19
|
network: {
|
|
@@ -22,6 +23,7 @@ export const defaultOSInstanceConfig = (port) => {
|
|
|
22
23
|
{
|
|
23
24
|
type: NodeType.NODE,
|
|
24
25
|
address: new oAddress('o://node'),
|
|
26
|
+
description: 'host node for my olane os instance',
|
|
25
27
|
leader: null,
|
|
26
28
|
parent: null,
|
|
27
29
|
},
|
|
@@ -28,6 +28,7 @@ export declare class ConfigManager {
|
|
|
28
28
|
static writeConfig(config: Partial<CLIConfig>): Promise<void>;
|
|
29
29
|
static getOSConfigFromPath(path: string): Promise<OlaneOSInstanceConfig | null>;
|
|
30
30
|
static getOSConfig(name: string): Promise<OlaneOSInstanceConfig | null>;
|
|
31
|
+
static updateOSConfig(config: OlaneOSInstanceConfig): Promise<OlaneOSInstanceConfig | null>;
|
|
31
32
|
static saveOSConfig(config: OlaneOSInstanceConfig): Promise<void>;
|
|
32
33
|
static listOSInstances(): Promise<OlaneOSInstanceConfig[]>;
|
|
33
34
|
static deleteOSInstance(name: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/utils/config.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,mBAAmB,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,cAAc,CAAC,EAAE,aAAa,CAAC;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,UAAU,CAAuB;IAChD,OAAO,CAAC,MAAM,CAAC,aAAa,CAAyB;IACrD,OAAO,CAAC,MAAM,CAAC,UAAU,CAAuB;WAEnC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IASxC,MAAM,CAAC,g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AM,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,UAAU,CAAuB;IAChD,OAAO,CAAC,MAAM,CAAC,aAAa,CAAyB;IACrD,OAAO,CAAC,MAAM,CAAC,UAAU,CAAuB;WAEnC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IASxC,MAAM,CAAC,gBAAgB,IAAI,SAAS;WAMvB,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC;WAM/B,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;WAOrD,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;WAItD,mBAAmB,CAC9B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;WAO3B,WAAW,CACtB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;WAY3B,cAAc,CACzB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;WAQ3B,YAAY,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;WAQ1D,eAAe,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;WAuBnD,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAM3D"}
|
package/dist/src/utils/config.js
CHANGED
|
@@ -42,6 +42,13 @@ export class ConfigManager {
|
|
|
42
42
|
}
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
45
|
+
static async updateOSConfig(config) {
|
|
46
|
+
const c = await this.getOSConfig(config.name);
|
|
47
|
+
if (c) {
|
|
48
|
+
await this.saveOSConfig({ ...c, ...config });
|
|
49
|
+
}
|
|
50
|
+
return c;
|
|
51
|
+
}
|
|
45
52
|
static async saveOSConfig(config) {
|
|
46
53
|
const osPath = path.join(ConfigManager.instancesPath, config.name);
|
|
47
54
|
await fs.ensureDir(osPath);
|
|
@@ -3,7 +3,6 @@ import { expect } from 'chai';
|
|
|
3
3
|
import { defaultOSInstance } from '../utils/os.default.js';
|
|
4
4
|
import { OlaneOSSystemStatus } from '../../src/o-olane-os/enum/o-os.status-enum.js';
|
|
5
5
|
import { oAddress } from '@olane/o-core';
|
|
6
|
-
import { GITHUB_TEST_CASES } from './github/github.test-cases.js';
|
|
7
6
|
dotenv.config();
|
|
8
7
|
const olaneOSInstance = defaultOSInstance;
|
|
9
8
|
describe('basic-usage @initialize', async () => {
|
|
@@ -34,27 +33,31 @@ describe('o-mcp github-benchmarks', () => {
|
|
|
34
33
|
// console.log(response.result.data);
|
|
35
34
|
// }, 300_000);
|
|
36
35
|
it('should be able to test github benchmarks', async () => {
|
|
36
|
+
// const intent = `Add the MCP server https://api.githubcopilot.com/mcp/ use the headers "Authorization: Bearer ${process.env.GITHUB_API_KEY}"`;
|
|
37
|
+
const intent = 'Add the linear mcp server with command "npx -y mcp-remote https://mcp.linear.app/sse"';
|
|
37
38
|
const response = await olaneOSInstance.use(oAddress.leader(), {
|
|
38
39
|
method: 'intent',
|
|
39
40
|
params: {
|
|
40
|
-
intent:
|
|
41
|
+
intent: intent,
|
|
41
42
|
},
|
|
42
43
|
});
|
|
43
44
|
console.log('Setup MCP server response:');
|
|
44
45
|
console.log(response.result.data);
|
|
45
|
-
for (const testCase of GITHUB_TEST_CASES) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
// for (const testCase of GITHUB_TEST_CASES) {
|
|
47
|
+
// console.log(testCase.input);
|
|
48
|
+
// const handshakeResponse = await olaneOSInstance.use(oAddress.leader(), {
|
|
49
|
+
// method: 'intent',
|
|
50
|
+
// params: {
|
|
51
|
+
// intent: testCase.input,
|
|
52
|
+
// },
|
|
53
|
+
// });
|
|
54
|
+
// console.log(
|
|
55
|
+
// `Finished with ${(handshakeResponse.result.data as any).cycles} cycles`,
|
|
56
|
+
// );
|
|
57
|
+
// console.log(handshakeResponse.result.data);
|
|
58
|
+
// // const result = await testCase.output;
|
|
59
|
+
// // expect(result).to.contain(testCase.output.contains);
|
|
60
|
+
// }
|
|
58
61
|
}, 300000);
|
|
59
62
|
});
|
|
60
63
|
describe('basic-usage @stop-network', async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/os",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -58,16 +58,16 @@
|
|
|
58
58
|
"typescript": "5.4.5"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@olane/o-config": "^0.7.
|
|
62
|
-
"@olane/o-core": "^0.7.
|
|
63
|
-
"@olane/o-intelligence": "^0.7.
|
|
64
|
-
"@olane/o-
|
|
65
|
-
"@olane/o-
|
|
66
|
-
"@olane/o-
|
|
67
|
-
"@olane/o-
|
|
68
|
-
"@olane/o-tool
|
|
69
|
-
"@olane/o-
|
|
70
|
-
"@olane/o-
|
|
61
|
+
"@olane/o-config": "^0.7.1",
|
|
62
|
+
"@olane/o-core": "^0.7.1",
|
|
63
|
+
"@olane/o-intelligence": "^0.7.1",
|
|
64
|
+
"@olane/o-lane": "^0.7.1",
|
|
65
|
+
"@olane/o-leader": "^0.7.1",
|
|
66
|
+
"@olane/o-protocol": "^0.7.1",
|
|
67
|
+
"@olane/o-storage": "^0.7.1",
|
|
68
|
+
"@olane/o-tool": "^0.7.1",
|
|
69
|
+
"@olane/o-tool-registry": "^0.7.1",
|
|
70
|
+
"@olane/o-tools-common": "^0.7.1"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"chalk": "^5.4.1",
|