@olane/o-intelligence 0.6.7 → 0.6.10
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.
|
@@ -26,6 +26,7 @@ export declare class IntelligenceTool extends oVirtualTool {
|
|
|
26
26
|
}>;
|
|
27
27
|
_tool_configure(request: ConfigureRequest): Promise<ToolResult>;
|
|
28
28
|
attemptUseOlaneIntelligence(request: PromptRequest): Promise<ToolResult | null>;
|
|
29
|
+
_tool_route(request: any): Promise<ToolResult>;
|
|
29
30
|
_tool_prompt(request: PromptRequest): Promise<ToolResult>;
|
|
30
31
|
}
|
|
31
32
|
//# sourceMappingURL=intelligence.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intelligence.tool.d.ts","sourceRoot":"","sources":["../../src/intelligence.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAa,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,OAAO,CAAC,eAAe,CAAK;gBAChB,MAAM,EAAE,WAAW;IA0DzB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAmBnD,gBAAgB,IAAI,OAAO,CAAC;QAAE,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IA6DvD,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC;QAAE,MAAM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AM,EAAE,MAAM,CAAA;KAAE,CAAC;IAqEtE,kBAAkB,IAAI,OAAO,CAAC;QAClC,QAAQ,EAAE,iBAAiB,CAAC;QAC5B,OAAO,EAAE,GAAG,CAAC;KACd,CAAC;IA+BI,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC;QACxD,MAAM,EAAE,QAAQ,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,GAAG,CAAC;KACd,CAAC;IAWI,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IA4C/D,2BAA2B,CAC/B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAgCvB,WAAW,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC;IA+B9C,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;CAwBhE"}
|
|
@@ -271,7 +271,8 @@ export class IntelligenceTool extends oVirtualTool {
|
|
|
271
271
|
// forward to olane
|
|
272
272
|
if (hostingProvider === HostModelProvider.OLANE) {
|
|
273
273
|
const response = await this.use(new oAddress(options.address, [
|
|
274
|
-
multiaddr(
|
|
274
|
+
multiaddr(process.env.OLANE_ADDRESS ||
|
|
275
|
+
'/dns4/leader.olane.com/tcp/4000/tls/ws'),
|
|
275
276
|
]), {
|
|
276
277
|
method: 'completion',
|
|
277
278
|
params: {
|
|
@@ -288,6 +289,26 @@ export class IntelligenceTool extends oVirtualTool {
|
|
|
288
289
|
}
|
|
289
290
|
return null;
|
|
290
291
|
}
|
|
292
|
+
async _tool_route(request) {
|
|
293
|
+
const { provider: hostingProvider, options } = await this.getHostingProvider();
|
|
294
|
+
const { address, payload } = request.params;
|
|
295
|
+
// forward to olane sub-tool
|
|
296
|
+
if (hostingProvider === HostModelProvider.OLANE) {
|
|
297
|
+
this.logger.debug('Forwarding to olane sub-tool: ', address);
|
|
298
|
+
const response = await this.use(new oAddress(address, [
|
|
299
|
+
multiaddr(process.env.OLANE_ADDRESS ||
|
|
300
|
+
'/dns4/leader.olane.com/tcp/4000/tls/ws'),
|
|
301
|
+
]), {
|
|
302
|
+
method: payload.method,
|
|
303
|
+
params: {
|
|
304
|
+
...payload.params,
|
|
305
|
+
token: options.token,
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
return response.result.data;
|
|
309
|
+
}
|
|
310
|
+
return super._tool_route(request);
|
|
311
|
+
}
|
|
291
312
|
// we cannot wrap this tool use in a plan because it is a core dependency in all planning
|
|
292
313
|
async _tool_prompt(request) {
|
|
293
314
|
const { prompt } = request.params;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/o-intelligence",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"start:prod": "node dist/index.js",
|
|
26
26
|
"prepublishOnly": "npm run build",
|
|
27
27
|
"update:lib": "npm install @olane/o-core@latest",
|
|
28
|
+
"update:peers": "npm install @olane/o-core@latest @olane/o-config@latest @olane/o-protocol@latest @olane/o-tool@latest --save-peer",
|
|
28
29
|
"lint": "eslint src/**/*.ts"
|
|
29
30
|
},
|
|
30
31
|
"repository": {
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
"@types/jest": "^30.0.0",
|
|
42
43
|
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
43
44
|
"@typescript-eslint/parser": "^8.34.1",
|
|
45
|
+
"aegir": "^47.0.21",
|
|
44
46
|
"eslint": "^9.29.0",
|
|
45
47
|
"eslint-config-prettier": "^10.1.6",
|
|
46
48
|
"eslint-plugin-prettier": "^5.5.0",
|
|
@@ -54,10 +56,10 @@
|
|
|
54
56
|
"typescript": "5.4.5"
|
|
55
57
|
},
|
|
56
58
|
"peerDependencies": {
|
|
57
|
-
"@olane/o-config": "^0.6.
|
|
58
|
-
"@olane/o-core": "^0.6.
|
|
59
|
-
"@olane/o-protocol": "^0.6.
|
|
60
|
-
"@olane/o-tool": "^0.6.
|
|
59
|
+
"@olane/o-config": "^0.6.9",
|
|
60
|
+
"@olane/o-core": "^0.6.9",
|
|
61
|
+
"@olane/o-protocol": "^0.6.9",
|
|
62
|
+
"@olane/o-tool": "^0.6.9"
|
|
61
63
|
},
|
|
62
64
|
"dependencies": {
|
|
63
65
|
"debug": "^4.4.1",
|