@olane/o-core 0.3.5 → 0.3.7

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.
@@ -3,12 +3,12 @@ import { Logger } from '../utils/logger.js';
3
3
  import { oRequest } from './o-request.js';
4
4
  import { oProtocolMethods } from '@olane/o-protocol';
5
5
  import { oResponse } from './o-response.js';
6
- import crypto from 'crypto';
6
+ import { v4 as uuidv4 } from 'uuid';
7
7
  export class oConnection {
8
8
  constructor(config) {
9
9
  this.config = config;
10
10
  this.requestCounter = 0;
11
- this.id = crypto.randomUUID();
11
+ this.id = uuidv4();
12
12
  this.address = config.address;
13
13
  this.nextHopAddress = config.nextHopAddress;
14
14
  this.logger = new Logger('Connection:[' +
package/dist/node/node.js CHANGED
@@ -7,7 +7,7 @@ import { oToolErrorCodes } from '../error/enums/codes.error.js';
7
7
  import { oAgentPlan } from '../plan/agent.plan.js';
8
8
  import { oPlanContext } from '../plan/plan.context.js';
9
9
  import { oConfigurePlan } from '../plan/configure/configure.plan.js';
10
- import crypto from 'crypto';
10
+ import { v4 as uuidv4 } from 'uuid';
11
11
  // Enable default Node.js metrics
12
12
  // collectDefaultMetrics({ register: sharedRegistry });
13
13
  export class oNode extends oCoreNode {
@@ -210,7 +210,7 @@ export class oNode extends oCoreNode {
210
210
  transports: this.configureTransports(),
211
211
  listeners: (this.config.network?.listeners ||
212
212
  defaultLibp2pConfig.listeners ||
213
- []).concat(`/memory/${crypto.randomUUID()}`), // ensure we allow for local in-memory communication
213
+ []).concat(`/memory/${uuidv4()}`), // ensure we allow for local in-memory communication
214
214
  };
215
215
  // if the seed is provided, use it to generate the private key
216
216
  if (this.config.seed) {
@@ -4,7 +4,7 @@ import * as json from 'multiformats/codecs/json';
4
4
  import { sha256 } from 'multiformats/hashes/sha2';
5
5
  import { AGENT_PROMPT } from './prompts/agent.prompt.js';
6
6
  import { oToolError } from '../error/tool.error.js';
7
- import crypto from 'crypto';
7
+ import { v4 as uuidv4 } from 'uuid';
8
8
  export class oPlan {
9
9
  constructor(config) {
10
10
  this.config = config;
@@ -156,7 +156,7 @@ export class oPlan {
156
156
  pageContent: this.result?.reasoning,
157
157
  metadata: {
158
158
  address: this.caller?.toString(),
159
- id: crypto.randomUUID(),
159
+ id: uuidv4(),
160
160
  },
161
161
  },
162
162
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olane/o-core",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -38,6 +38,7 @@
38
38
  "@olane/o-protocol": "file:./packages/o-protocol",
39
39
  "@tsconfig/node20": "^20.1.6",
40
40
  "@types/jest": "^30.0.0",
41
+ "@types/uuid": "^10.0.0",
41
42
  "@typescript-eslint/eslint-plugin": "^8.34.1",
42
43
  "@typescript-eslint/parser": "^8.34.1",
43
44
  "eslint": "^9.29.0",
@@ -53,8 +54,8 @@
53
54
  "typescript": "^5.8.3"
54
55
  },
55
56
  "peerDependencies": {
56
- "@olane/o-config": "^0.3.4",
57
- "@olane/o-protocol": "^0.3.4"
57
+ "@olane/o-config": "^0.3.6",
58
+ "@olane/o-protocol": "^0.3.6"
58
59
  },
59
60
  "dependencies": {
60
61
  "chalk": "^5.4.1",