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 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
- export { federateMessage, getFederatedMessages, updateFederatedMessages, removeNotify } from './federation.js';
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, gunInstance = null) {
19
- console.log('HoloSphere v1.1.7');
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
- // Handle different ways of providing Gun instance or options
29
- if (gunInstance && gunInstance.opt) {
30
- // If an object with 'opt' property is passed, create a new Gun instance with those options
31
- this.gun = Gun(gunInstance.opt);
32
- } else {
33
- // Use provided Gun instance or create new one with default options
34
- this.gun = gunInstance || Gun({
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holosphere",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "Holonic Geospatial Communication Infrastructure",
5
5
  "main": "holosphere.js",
6
6
  "types": "holosphere.d.ts",
package/babel.config.js DELETED
@@ -1,5 +0,0 @@
1
- module.exports = {
2
- presets: [
3
- ['@babel/preset-env', {targets: {node: 'current'}}],
4
- ],
5
- };
package/babel.config.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "presets": [
3
- [
4
- "@babel/preset-env",
5
- {
6
- "targets": {
7
- "node": "current"
8
- }
9
- }
10
- ]
11
- ]
12
- }