@olane/o-intelligence 0.6.11 → 0.6.12

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 +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,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,gB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O,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;IAkC9C,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;CAwBhE"}
@@ -291,11 +291,14 @@ export class IntelligenceTool extends oVirtualTool {
291
291
  }
292
292
  async _tool_route(request) {
293
293
  const { provider: hostingProvider, options } = await this.getHostingProvider();
294
- const { address, payload } = request.params;
294
+ const { address, payload, } = request.params;
295
295
  // forward to olane sub-tool
296
296
  if (hostingProvider === HostModelProvider.OLANE) {
297
297
  this.logger.debug('Forwarding to olane sub-tool: ', address);
298
- const response = await this.use(new oAddress(address, [
298
+ const destinationAddress = new oAddress(address);
299
+ const pieces = destinationAddress.paths.split(this.staticAddress.paths);
300
+ const subAddress = pieces[pieces.length - 1];
301
+ const response = await this.use(new oAddress(options.address + subAddress, [
299
302
  multiaddr(process.env.OLANE_ADDRESS ||
300
303
  '/dns4/leader.olane.com/tcp/4000/tls/ws'),
301
304
  ]), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olane/o-intelligence",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -56,10 +56,10 @@
56
56
  "typescript": "5.4.5"
57
57
  },
58
58
  "peerDependencies": {
59
- "@olane/o-config": "^0.6.10",
60
- "@olane/o-core": "^0.6.10",
61
- "@olane/o-protocol": "^0.6.10",
62
- "@olane/o-tool": "^0.6.10"
59
+ "@olane/o-config": "^0.6.11",
60
+ "@olane/o-core": "^0.6.11",
61
+ "@olane/o-protocol": "^0.6.11",
62
+ "@olane/o-tool": "^0.6.11"
63
63
  },
64
64
  "dependencies": {
65
65
  "debug": "^4.4.1",