holosphere 1.1.8 → 1.1.9
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/holosphere.js +24 -18
- package/package.json +1 -1
- package/babel.config.js +0 -5
- package/babel.config.json +0 -12
package/holosphere.js
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import * as h3 from 'h3-js';
|
|
2
2
|
import OpenAI from 'openai';
|
|
3
3
|
import Gun from 'gun'
|
|
4
|
-
import SEA from 'gun/sea.js'
|
|
5
4
|
import Ajv2019 from 'ajv/dist/2019.js'
|
|
6
5
|
import * as Federation from './federation.js';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* HoloSphere is a cutting-edge holonic communication infrastructure designed to facilitate
|
|
9
|
+
* the creation, validation, and sharing of information.. By leveraging advanced technologies
|
|
10
|
+
* such as H3 for geospatial indexing, OpenAI for natural language processing, and Gun for decentralized
|
|
11
|
+
* data storage, HoloSphere provides a robust platform for developers to build innovative stygmergic applications.
|
|
12
|
+
*
|
|
13
|
+
* Key Features:
|
|
14
|
+
* - Geospatial indexing using H3
|
|
15
|
+
* - Natural language processing with OpenAI
|
|
16
|
+
* - Decentralized data storage with Gun
|
|
17
|
+
* - JSON schema validation with Ajv
|
|
18
|
+
* - Federation capabilities for distributed systems
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
9
22
|
|
|
10
23
|
class HoloSphere {
|
|
11
24
|
/**
|
|
@@ -15,8 +28,8 @@ class HoloSphere {
|
|
|
15
28
|
* @param {string|null} openaikey - The OpenAI API key.
|
|
16
29
|
* @param {Gun|null} gunInstance - The Gun instance to use.
|
|
17
30
|
*/
|
|
18
|
-
constructor(appname, strict = false, openaikey = null
|
|
19
|
-
console.log('HoloSphere v1.1.
|
|
31
|
+
constructor(appname, strict = false, openaikey = null) {
|
|
32
|
+
console.log('HoloSphere v1.1.9');
|
|
20
33
|
this.appname = appname
|
|
21
34
|
this.strict = strict;
|
|
22
35
|
this.validator = new Ajv2019({
|
|
@@ -25,20 +38,13 @@ class HoloSphere {
|
|
|
25
38
|
validateSchema: true // Always validate schemas
|
|
26
39
|
});
|
|
27
40
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
peers: ['https://gun.holons.io/gun'],
|
|
36
|
-
axe: false,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Initialize SEA
|
|
41
|
-
this.sea = SEA;
|
|
41
|
+
|
|
42
|
+
// Use provided Gun instance or create new one with default options
|
|
43
|
+
this.gun = Gun({
|
|
44
|
+
peers: ['https://gun.holons.io/gun'],
|
|
45
|
+
axe: false,
|
|
46
|
+
});
|
|
47
|
+
|
|
42
48
|
|
|
43
49
|
if (openaikey != null) {
|
|
44
50
|
this.openai = new OpenAI({
|
package/package.json
CHANGED
package/babel.config.js
DELETED