@olane/o-leader 0.6.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.
- package/README.md +86 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/leader.node.d.ts +10 -0
- package/dist/src/leader.node.d.ts.map +1 -0
- package/dist/src/leader.node.js +63 -0
- package/dist/src/methods/start.method.d.ts +3 -0
- package/dist/src/methods/start.method.d.ts.map +1 -0
- package/dist/src/methods/start.method.js +21 -0
- package/dist/src/registry/index.d.ts +3 -0
- package/dist/src/registry/index.d.ts.map +1 -0
- package/dist/src/registry/index.js +2 -0
- package/dist/src/registry/interfaces/search.interface.d.ts +6 -0
- package/dist/src/registry/interfaces/search.interface.d.ts.map +1 -0
- package/dist/src/registry/interfaces/search.interface.js +1 -0
- package/dist/src/registry/methods/registry.methods.d.ts +5 -0
- package/dist/src/registry/methods/registry.methods.d.ts.map +1 -0
- package/dist/src/registry/methods/registry.methods.js +74 -0
- package/dist/src/registry/registry-memory.tool.d.ts +9 -0
- package/dist/src/registry/registry-memory.tool.d.ts.map +1 -0
- package/dist/src/registry/registry-memory.tool.js +51 -0
- package/dist/src/registry/registry.tool.d.ts +13 -0
- package/dist/src/registry/registry.tool.d.ts.map +1 -0
- package/dist/src/registry/registry.tool.js +15 -0
- package/dist/test/basic.spec.d.ts +1 -0
- package/dist/test/basic.spec.d.ts.map +1 -0
- package/dist/test/basic.spec.js +1 -0
- package/package.json +71 -0
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
TLDR; we created a forked MCP version that is faster, better, and cheaper. [Link to get started]
|
|
2
|
+
|
|
3
|
+
## What is MCP Missing?
|
|
4
|
+
|
|
5
|
+
### **Today / Problem Description**
|
|
6
|
+
|
|
7
|
+
MCP servers are built to enable LLM / AI systems to synthesize workflows from complex tasks. This means MCPs will work great if…
|
|
8
|
+
|
|
9
|
+
1. You have built your MCP well (example: *as an intention-based tool, not as an API wrapper)*
|
|
10
|
+
1. *You actively maintain* documentation to support *how* to use your services
|
|
11
|
+
2. LLM / AI understands how to synthesize plans around small workflows using the tools provided
|
|
12
|
+
2. You pay for intelligent models that can reason / do chain of thought processing.
|
|
13
|
+
|
|
14
|
+
Every LLM / AI system will need to rerun this, every time. Today it has no working memory on the workflows/plans it runs.
|
|
15
|
+
|
|
16
|
+
We asked ourselves…”why are these plans and workflows being thrown out?”
|
|
17
|
+
|
|
18
|
+
### **Olane + MCP = oMCP**
|
|
19
|
+
|
|
20
|
+
We have forked the MCP client & server to capture and re-use these workflows, reducing intelligence requirements and improving MCP completion by X%. [Link to the repo]
|
|
21
|
+
|
|
22
|
+
## How did we do this?
|
|
23
|
+
|
|
24
|
+
We centered our focus on these problems:
|
|
25
|
+
|
|
26
|
+
1. How can we enable smaller models to succeed just like bigger ones?
|
|
27
|
+
2. How can we reduce waste / reduce token usage?
|
|
28
|
+
3. How can we make AI - MCP usage more deterministic?
|
|
29
|
+
4. How can we improve the speed of MCP usage?
|
|
30
|
+
|
|
31
|
+
Like teaching a small child, we learned that by simply following the KISS model (KISS → “keep it simple stupid”), we achieved all of this and more.
|
|
32
|
+
|
|
33
|
+
> Smaller AI models need less noise and more clear instruction to succeed. In other words, “spell it out for them”
|
|
34
|
+
>
|
|
35
|
+
|
|
36
|
+
<aside>
|
|
37
|
+
💡
|
|
38
|
+
|
|
39
|
+
*Engaging / thoughtful hook? Brendon scratchpad*
|
|
40
|
+
|
|
41
|
+
How do you get the *right* context from an MCP server to complete your task?
|
|
42
|
+
|
|
43
|
+
- Do you just throw everything at it? → No, this is wasteful
|
|
44
|
+
- Do you try to condense the knowledge to cost optimize? → Maybe…but how without data loss
|
|
45
|
+
- Do you try to organize MCP usage and learn from similar use-cases? Let’s try it and see what happens…
|
|
46
|
+
</aside>
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
50
|
+

|
|
51
|
+
|
|
52
|
+
### Breaking it down further…
|
|
53
|
+
|
|
54
|
+
We combine large model successes + failures + a little search to help give small models a helping hand in achieving their dreams.
|
|
55
|
+
|
|
56
|
+
<aside>
|
|
57
|
+
💡
|
|
58
|
+
|
|
59
|
+
We learn from past successes & failures to create few shot RL guidelines on how to best utilize the MCP server.
|
|
60
|
+
|
|
61
|
+
</aside>
|
|
62
|
+
|
|
63
|
+
**Example**:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
“Get my latest pull requests”
|
|
67
|
+
Results in the following steps:
|
|
68
|
+
|
|
69
|
+
1. Client connects to MCP server with an “intent” + “model”
|
|
70
|
+
2. The MCP server searches for past success, failure and relevant tool methods
|
|
71
|
+
3. Client receives the package and creates new "workflow" tool uses
|
|
72
|
+
4. Execute!
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### So how does this meet our goals?
|
|
76
|
+
|
|
77
|
+
1. Smaller model support → more relevant / clear context is now achieved
|
|
78
|
+
2. Reduce token usage → avoid sending irrelevant context when possible / refine tool offerings & also reduce model size requirements
|
|
79
|
+
3. More deterministic → by learning from past failures & successes, we know how to stay within the bounds of success with clear guardrails
|
|
80
|
+
4. Speed improvement → less tokens to process = more speed
|
|
81
|
+
|
|
82
|
+
### Examples
|
|
83
|
+
|
|
84
|
+
1. Github example → what models can we test / prove to how it works?
|
|
85
|
+
2. Figma example → same as above ^^
|
|
86
|
+
3. Slack / more complex examples → same as above ^
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leader.node.d.ts","sourceRoot":"","sources":["../../src/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"}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start.method.d.ts","sourceRoot":"","sources":["../../../src/methods/start.method.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,YAAY,EAAE,OAoB1B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/registry/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export const REGISTRY_PARAMS = {
|
|
2
|
+
commit: {
|
|
3
|
+
name: 'commit',
|
|
4
|
+
description: 'Commit a node to the registry',
|
|
5
|
+
dependencies: [],
|
|
6
|
+
parameters: [
|
|
7
|
+
{
|
|
8
|
+
name: 'peerId',
|
|
9
|
+
type: 'string',
|
|
10
|
+
value: 'string',
|
|
11
|
+
description: 'The peerId to commit',
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'address',
|
|
16
|
+
type: 'string',
|
|
17
|
+
value: 'string',
|
|
18
|
+
description: 'The address to commit',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'protocols',
|
|
22
|
+
type: 'array',
|
|
23
|
+
value: 'string[]',
|
|
24
|
+
description: 'The protocols to commit',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'transports',
|
|
28
|
+
type: 'array',
|
|
29
|
+
value: 'string[]',
|
|
30
|
+
description: 'The transports to commit',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'staticAddress',
|
|
34
|
+
type: 'string',
|
|
35
|
+
value: 'string',
|
|
36
|
+
description: 'The static address to commit',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
search: {
|
|
41
|
+
name: 'search',
|
|
42
|
+
description: 'Search for a node in the registry using simple query logic.',
|
|
43
|
+
dependencies: [],
|
|
44
|
+
parameters: [
|
|
45
|
+
{
|
|
46
|
+
name: 'staticAddress',
|
|
47
|
+
type: 'string',
|
|
48
|
+
value: 'string',
|
|
49
|
+
description: 'The static address to search for',
|
|
50
|
+
required: false,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'protocols',
|
|
54
|
+
type: 'array',
|
|
55
|
+
value: 'string[]',
|
|
56
|
+
description: 'The protocols to search for',
|
|
57
|
+
required: false,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'address',
|
|
61
|
+
type: 'string',
|
|
62
|
+
value: 'string',
|
|
63
|
+
description: 'The address to search for',
|
|
64
|
+
required: false,
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
find_all: {
|
|
69
|
+
name: 'find_all',
|
|
70
|
+
description: 'Find all nodes in the registry',
|
|
71
|
+
dependencies: [],
|
|
72
|
+
parameters: [],
|
|
73
|
+
},
|
|
74
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RegistryTool } from './registry.tool.js';
|
|
2
|
+
import { oRequest } from '@olane/o-core';
|
|
3
|
+
export declare class RegistryMemoryTool extends RegistryTool {
|
|
4
|
+
_tool_commit(request: oRequest): Promise<any>;
|
|
5
|
+
_tool_find_all(request: oRequest): Promise<any>;
|
|
6
|
+
_tool_search(request: oRequest): Promise<any>;
|
|
7
|
+
_tool_remove(request: oRequest): Promise<any>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=registry-memory.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-memory.tool.d.ts","sourceRoot":"","sources":["../../../src/registry/registry-memory.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,qBAAa,kBAAmB,SAAQ,YAAY;IAC5C,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAuB7C,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAI/C,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IA8B7C,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;CAOpD"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { RegistryTool } from './registry.tool.js';
|
|
2
|
+
export class RegistryMemoryTool extends RegistryTool {
|
|
3
|
+
async _tool_commit(request) {
|
|
4
|
+
const params = request.params;
|
|
5
|
+
this.logger.debug('Committing registration: ', params?.address, 'With num protocols: ', params?.protocols?.length);
|
|
6
|
+
// TODO: Implement TTL
|
|
7
|
+
this.registry.set(params.peerId, params);
|
|
8
|
+
if (params.protocols) {
|
|
9
|
+
params.protocols.forEach((protocol) => {
|
|
10
|
+
this.protocolMapping.set(protocol, [
|
|
11
|
+
...(this.protocolMapping.get(protocol) || []),
|
|
12
|
+
params.peerId,
|
|
13
|
+
]);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
success: true,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
async _tool_find_all(request) {
|
|
21
|
+
return Array.from(this.registry.values());
|
|
22
|
+
}
|
|
23
|
+
async _tool_search(request) {
|
|
24
|
+
const params = request.params;
|
|
25
|
+
// iterate over the registry and find all the nodes that match the protocols
|
|
26
|
+
let result = [];
|
|
27
|
+
if (params.protocols) {
|
|
28
|
+
result = result.concat(Array.from(this.registry.values()).filter((node) => {
|
|
29
|
+
return params.protocols?.every((protocol) => node.protocols.includes(protocol));
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
if (params.address) {
|
|
33
|
+
result = result.concat(Array.from(this.registry.values()).filter((node) => {
|
|
34
|
+
return node.address === params.address;
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
if (params.staticAddress) {
|
|
38
|
+
result = result.concat(Array.from(this.registry.values()).filter((node) => {
|
|
39
|
+
return node.staticAddress === params.staticAddress;
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
async _tool_remove(request) {
|
|
45
|
+
const params = request.params;
|
|
46
|
+
this.registry.delete(params.peerId);
|
|
47
|
+
return {
|
|
48
|
+
success: true,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { oToolConfig, oVirtualTool, ToolResult } from '@olane/o-tool';
|
|
2
|
+
import { oRegistrationParams } from '@olane/o-protocol';
|
|
3
|
+
import { oRequest } from '@olane/o-core';
|
|
4
|
+
export declare abstract class RegistryTool extends oVirtualTool {
|
|
5
|
+
protected readonly registry: Map<string, oRegistrationParams>;
|
|
6
|
+
protected readonly protocolMapping: Map<string, string[]>;
|
|
7
|
+
constructor(config: oToolConfig);
|
|
8
|
+
abstract _tool_commit(request: oRequest): Promise<ToolResult>;
|
|
9
|
+
abstract _tool_search(request: oRequest): Promise<ToolResult>;
|
|
10
|
+
abstract _tool_find_all(request: oRequest): Promise<ToolResult>;
|
|
11
|
+
abstract _tool_remove(request: oRequest): Promise<ToolResult>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=registry.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.tool.d.ts","sourceRoot":"","sources":["../../../src/registry/registry.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGnD,8BAAsB,YAAa,SAAQ,YAAY;IACrD,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAa;IAC1E,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAa;gBAE1D,MAAM,EAAE,WAAW;IAS/B,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAC7D,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAC7D,QAAQ,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAC/D,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAC9D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { oVirtualTool } from '@olane/o-tool';
|
|
2
|
+
import { oAddress } from '@olane/o-core';
|
|
3
|
+
import { REGISTRY_PARAMS } from './methods/registry.methods.js';
|
|
4
|
+
export class RegistryTool extends oVirtualTool {
|
|
5
|
+
constructor(config) {
|
|
6
|
+
super({
|
|
7
|
+
...config,
|
|
8
|
+
address: new oAddress('o://register'),
|
|
9
|
+
methods: REGISTRY_PARAMS,
|
|
10
|
+
description: 'Network registry of tools and their respective addresses',
|
|
11
|
+
});
|
|
12
|
+
this.registry = new Map();
|
|
13
|
+
this.protocolMapping = new Map();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=basic.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic.spec.d.ts","sourceRoot":"","sources":["../../test/basic.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@olane/o-leader",
|
|
3
|
+
"version": "0.6.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/src/index.js",
|
|
6
|
+
"types": "dist/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/src/index.d.ts",
|
|
10
|
+
"default": "./dist/src/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/**/*",
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "aegir test",
|
|
20
|
+
"test:node": "aegir test -t node",
|
|
21
|
+
"test:browser": "aegir test -t browser",
|
|
22
|
+
"dev": "DEBUG=o-protocol:* npx tsx src/tests/index.ts",
|
|
23
|
+
"build": "tsc",
|
|
24
|
+
"deep:clean": "rm -rf node_modules && rm package-lock.json",
|
|
25
|
+
"start:prod": "node dist/index.js",
|
|
26
|
+
"prepublishOnly": "npm run build",
|
|
27
|
+
"update:lib": "npm install @olane/o-core@latest",
|
|
28
|
+
"lint": "eslint src/**/*.ts"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/olane-labs/olane.git"
|
|
33
|
+
},
|
|
34
|
+
"author": "oLane Inc.",
|
|
35
|
+
"license": "ISC",
|
|
36
|
+
"description": "oLane leader node used as the root node for a network",
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@olane/o-config": "file:../o-config",
|
|
39
|
+
"@olane/o-core": "file:../..",
|
|
40
|
+
"@olane/o-protocol": "file:../o-protocol",
|
|
41
|
+
"@olane/o-tool": "file:../o-tool",
|
|
42
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
43
|
+
"@eslint/js": "^9.29.0",
|
|
44
|
+
"@tsconfig/node20": "^20.1.6",
|
|
45
|
+
"@types/jest": "^30.0.0",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
47
|
+
"@typescript-eslint/parser": "^8.34.1",
|
|
48
|
+
"eslint": "^9.29.0",
|
|
49
|
+
"eslint-config-prettier": "^10.1.6",
|
|
50
|
+
"eslint-plugin-prettier": "^5.5.0",
|
|
51
|
+
"globals": "^16.2.0",
|
|
52
|
+
"jest": "^30.0.0",
|
|
53
|
+
"prettier": "^3.5.3",
|
|
54
|
+
"ts-jest": "^29.4.0",
|
|
55
|
+
"ts-node": "^10.9.2",
|
|
56
|
+
"tsconfig-paths": "^4.2.0",
|
|
57
|
+
"tsx": "^4.20.3",
|
|
58
|
+
"typescript": "5.4.5"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@olane/o-config": "^0.6.1",
|
|
62
|
+
"@olane/o-core": "^0.6.1",
|
|
63
|
+
"@olane/o-protocol": "^0.6.1",
|
|
64
|
+
"@olane/o-tool": "^0.6.1",
|
|
65
|
+
"@modelcontextprotocol/sdk": "^1.13.0"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"debug": "^4.4.1",
|
|
69
|
+
"dotenv": "^16.5.0"
|
|
70
|
+
}
|
|
71
|
+
}
|