@olane/o-tool 0.4.4 → 0.5.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/dist/src/o-tool.d.ts.map +1 -1
- package/dist/src/o-tool.js +0 -4
- package/package.json +8 -4
package/dist/src/o-tool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o-tool.d.ts","sourceRoot":"","sources":["../../src/o-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EAMV,MAAM,eAAe,CAAC;AASvB;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,SAAS,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"o-tool.d.ts","sourceRoot":"","sources":["../../src/o-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EAMV,MAAM,eAAe,CAAC;AASvB;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,SAAS,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CA0U7E"}
|
package/dist/src/o-tool.js
CHANGED
|
@@ -14,7 +14,6 @@ export function oTool(Base) {
|
|
|
14
14
|
const config = args[0];
|
|
15
15
|
}
|
|
16
16
|
validateToolCall(oRequest) {
|
|
17
|
-
this.logger.debug('Validating tool call: ' + oRequest.method);
|
|
18
17
|
const method = oRequest.method;
|
|
19
18
|
if (!method) {
|
|
20
19
|
throw new Error('method parameter is required');
|
|
@@ -97,7 +96,6 @@ export function oTool(Base) {
|
|
|
97
96
|
return CoreUtils.sendResponse(response, streamData.stream);
|
|
98
97
|
}
|
|
99
98
|
async execute(req, stream) {
|
|
100
|
-
this.logger.debug('Tool handling incoming stream: ' + this.address.protocol);
|
|
101
99
|
// const protocolUsageCounter = this.p2pNode.metrics?.registerCounter(
|
|
102
100
|
// 'libp2p_protocol_custom_track',
|
|
103
101
|
// {
|
|
@@ -114,7 +112,6 @@ export function oTool(Base) {
|
|
|
114
112
|
if (request.method === oProtocolMethods.ROUTE &&
|
|
115
113
|
request.params.address === this.address.value) {
|
|
116
114
|
const { payload } = request.params;
|
|
117
|
-
this.logger.debug('Reached destination, processing payload', payload);
|
|
118
115
|
request = new oRequest({
|
|
119
116
|
id: requestConfig.id,
|
|
120
117
|
method: payload.method,
|
|
@@ -124,7 +121,6 @@ export function oTool(Base) {
|
|
|
124
121
|
...(payload.params || {}), // TODO: is this correct? this line used to be ...payload
|
|
125
122
|
},
|
|
126
123
|
});
|
|
127
|
-
this.logger.debug('Processed request: ', request);
|
|
128
124
|
}
|
|
129
125
|
const result = await this.run(request, stream);
|
|
130
126
|
return result;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/o-tool",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"test": "aegir test",
|
|
20
20
|
"test:node": "aegir test -t node",
|
|
21
|
+
"deep:clean": "rm -rf node_modules && rm package-lock.json",
|
|
21
22
|
"test:browser": "aegir test -t browser",
|
|
22
23
|
"build": "tsc",
|
|
23
24
|
"start:prod": "node dist/index.js",
|
|
@@ -34,6 +35,9 @@
|
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@eslint/eslintrc": "^3.3.1",
|
|
36
37
|
"@eslint/js": "^9.29.0",
|
|
38
|
+
"@olane/o-config": "0.5.1",
|
|
39
|
+
"@olane/o-core": "0.5.1",
|
|
40
|
+
"@olane/o-protocol": "0.5.1",
|
|
37
41
|
"@tsconfig/node20": "^20.1.6",
|
|
38
42
|
"@types/jest": "^30.0.0",
|
|
39
43
|
"@types/uuid": "^10.0.0",
|
|
@@ -53,9 +57,9 @@
|
|
|
53
57
|
"typescript": "^5.8.3"
|
|
54
58
|
},
|
|
55
59
|
"peerDependencies": {
|
|
56
|
-
"@olane/o-config": "^0.
|
|
57
|
-
"@olane/o-core": "^0.
|
|
58
|
-
"@olane/o-protocol": "^0.
|
|
60
|
+
"@olane/o-config": "^0.5.1",
|
|
61
|
+
"@olane/o-core": "^0.5.1",
|
|
62
|
+
"@olane/o-protocol": "^0.5.1"
|
|
59
63
|
},
|
|
60
64
|
"dependencies": {
|
|
61
65
|
"debug": "^4.4.1",
|