@olane/o-core 0.3.3 → 0.3.5
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":"o-connection.d.ts","sourceRoot":"","sources":["../../../src/core/lib/o-connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiC,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"o-connection.d.ts","sourceRoot":"","sources":["../../../src/core/lib/o-connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiC,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAGzF,qBAAa,WAAW;IASpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IARzB,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAa;IAC3C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IACnC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAW;IAC1C,OAAO,CAAC,cAAc,CAAa;gBAGhB,MAAM,EAAE;QACvB,cAAc,EAAE,QAAQ,CAAC;QACzB,aAAa,CAAC,EAAE,QAAQ,CAAC;QACzB,OAAO,EAAE,QAAQ,CAAC;QAClB,aAAa,EAAE,UAAU,CAAC;KAC3B;IAgBG,IAAI,CAAC,MAAM,EAAE,GAAG;IAUtB,QAAQ;IAOR,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,GAAG,QAAQ;IAyB/D,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;IAqB/C,IAAI,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC;IAMpD,KAAK;CAKZ"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Uint8ArrayList, pushable, all } from '@olane/o-config';
|
|
2
2
|
import { Logger } from '../utils/logger.js';
|
|
3
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
4
3
|
import { oRequest } from './o-request.js';
|
|
5
4
|
import { oProtocolMethods } from '@olane/o-protocol';
|
|
6
5
|
import { oResponse } from './o-response.js';
|
|
6
|
+
import crypto from 'crypto';
|
|
7
7
|
export class oConnection {
|
|
8
8
|
constructor(config) {
|
|
9
9
|
this.config = config;
|
|
10
10
|
this.requestCounter = 0;
|
|
11
|
-
this.id =
|
|
11
|
+
this.id = crypto.randomUUID();
|
|
12
12
|
this.address = config.address;
|
|
13
13
|
this.nextHopAddress = config.nextHopAddress;
|
|
14
14
|
this.logger = new Logger('Connection:[' +
|
package/dist/node/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAKZ,MAAM,EACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIL,QAAQ,EAER,SAAS,EACT,QAAQ,EACR,SAAS,EACV,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/node/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAKZ,MAAM,EACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIL,QAAQ,EAER,SAAS,EACT,QAAQ,EACR,SAAS,EACV,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,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,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAyBjC,sBAAsB;IAIhB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAOhC"}
|
package/dist/node/node.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { bootstrap, createNode, defaultLibp2pConfig, multiaddr, pipe, pushable, } from '@olane/o-config';
|
|
2
2
|
import { CoreUtils, NodeState, NodeType, oAddress, oConnectionManager, oCoreNode, oRequest, } from '../core/index.js';
|
|
3
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
4
3
|
import { NextHopResolver } from '../core/lib/resolvers/next-hop.resolver.js';
|
|
5
4
|
import { NetworkActivity } from './lib/network-activity.lib.js';
|
|
6
5
|
import { oToolError } from '../error/tool.error.js';
|
|
@@ -8,6 +7,7 @@ import { oToolErrorCodes } from '../error/enums/codes.error.js';
|
|
|
8
7
|
import { oAgentPlan } from '../plan/agent.plan.js';
|
|
9
8
|
import { oPlanContext } from '../plan/plan.context.js';
|
|
10
9
|
import { oConfigurePlan } from '../plan/configure/configure.plan.js';
|
|
10
|
+
import crypto from 'crypto';
|
|
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/${
|
|
213
|
+
[]).concat(`/memory/${crypto.randomUUID()}`), // 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) {
|
package/dist/plan/o-plan.js
CHANGED
|
@@ -3,8 +3,8 @@ import { CID } from 'multiformats';
|
|
|
3
3
|
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
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
7
6
|
import { oToolError } from '../error/tool.error.js';
|
|
7
|
+
import crypto from 'crypto';
|
|
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:
|
|
159
|
+
id: crypto.randomUUID(),
|
|
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.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -38,7 +38,6 @@
|
|
|
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",
|
|
42
41
|
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
43
42
|
"@typescript-eslint/parser": "^8.34.1",
|
|
44
43
|
"eslint": "^9.29.0",
|
|
@@ -54,14 +53,13 @@
|
|
|
54
53
|
"typescript": "^5.8.3"
|
|
55
54
|
},
|
|
56
55
|
"peerDependencies": {
|
|
57
|
-
"@olane/o-config": "^0.3.
|
|
58
|
-
"@olane/o-protocol": "^0.3.
|
|
56
|
+
"@olane/o-config": "^0.3.4",
|
|
57
|
+
"@olane/o-protocol": "^0.3.4"
|
|
59
58
|
},
|
|
60
59
|
"dependencies": {
|
|
61
60
|
"chalk": "^5.4.1",
|
|
62
61
|
"debug": "^4.4.1",
|
|
63
62
|
"dotenv": "^16.5.0",
|
|
64
|
-
"multiformats": "^13.3.7"
|
|
65
|
-
"uuid": "^10.0.0"
|
|
63
|
+
"multiformats": "^13.3.7"
|
|
66
64
|
}
|
|
67
65
|
}
|