this.me 2.8.0 → 2.8.2

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.
Files changed (44) hide show
  1. package/README.md +28 -63
  2. package/docs/Me.html +9 -9
  3. package/docs/README.md +24 -63
  4. package/docs/global.html +451 -15
  5. package/docs/index.html +23 -73
  6. package/docs/index.js.html +169 -0
  7. package/docs/module-00-Index.html +243 -0
  8. package/docs/module-CLI.html +9 -618
  9. package/docs/src_cli_ishell_shell.js.html +305 -0
  10. package/docs/{cli_main.js.html → src_cli_main.js.html} +44 -144
  11. package/docs/{me.js.html → src_me.js.html} +5 -5
  12. package/docs/this.me.png +0 -0
  13. package/index.js +6 -0
  14. package/jsdoc.json +23 -25
  15. package/package.json +3 -2
  16. package/src/cli/ascii_art/welcome.js +21 -0
  17. package/src/cli/commands.js +17 -0
  18. package/src/cli/main.js +28 -176
  19. package/src/cli/shell.js +148 -0
  20. package/src/me.js +1 -1
  21. package/docs/ThisMe.html +0 -690
  22. package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
  23. package/docs/fonts/OpenSans-Bold-webfont.svg +0 -1830
  24. package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
  25. package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  26. package/docs/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  27. package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  28. package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
  29. package/docs/fonts/OpenSans-Italic-webfont.svg +0 -1830
  30. package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
  31. package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
  32. package/docs/fonts/OpenSans-Light-webfont.svg +0 -1831
  33. package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
  34. package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  35. package/docs/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  36. package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  37. package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
  38. package/docs/fonts/OpenSans-Regular-webfont.svg +0 -1831
  39. package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
  40. package/docs/neurons_logo.png +0 -0
  41. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
  42. package/docs/scripts/prettify/lang-css.js +0 -2
  43. package/docs/scripts/prettify/prettify.js +0 -28
  44. package/docs/styles/jsdoc-default.css +0 -358
package/README.md CHANGED
@@ -1,92 +1,57 @@
1
- <img src="https://suign.github.io/neurons.me/neurons_logo.png" alt="SVG Image" width="123" height="123" style="width123px; height:123px;">
2
-
3
1
  # This.Me
2
+ <img src="./this.me.png" alt="SVG Image" style="width:89px;">
4
3
 
4
+ **This.Me** redefines digital identity management through a cryptographic lens. Each user is equipped with a unique **'Me'** identity, secured by public-private key cryptography, enabling robust autonomous identity verification and transactional security.
5
5
 
6
- **This.Me** is a digital identity representation of **Me** as it encapsulates the essence of an entity which is then passed for cryptographic guarantees.
7
-
8
- Users no longer depend on centralized authorities for **identity and data management**. They hold the keys (literally) to their identity and data.
6
+ **This.Me** goes beyond traditional security, incorporating hashing for unimpeachable data integrity and digital signatures for undeniable authenticity. Users gain unparalleled control over their digital footprint, marking a shift towards a user-centric model of data management.
9
7
 
10
- Services become more **user-centric,** providing services based on cryptographic proofs rather than centralized authorities.
8
+ In essence, **This.Me** grants users a self-sovereign digital identity, fully within their control and independent from external entities.
11
9
 
12
- Here, you don't just own your identity; you seal it with cryptographic brilliance, untouched and ungoverned by any other.
10
+ ### CLI Usage:
13
11
 
14
- ## Getting Started:
12
+ Install globally to use `this.me` as a CLI tool:
15
13
 
16
- ```bash
17
- npm i -g this.me
14
+ ```js
15
+ npm install -g this.me
18
16
  ```
19
17
 
20
- ### Require it:
18
+ Then, interact with `this.me` directly from your command line.
21
19
 
22
- ```js
23
- const me = require('this.me');
24
- ```
25
20
 
26
- ### Usage Example:
21
+ ### Usage in Node.js:
27
22
 
28
- Use it like this:
23
+ ## Installation
24
+
25
+ ```bash
26
+ npm install this.me
27
+ ```
29
28
 
30
29
  ```js
31
30
  const ThisMe = require('this.me');
31
+ // Create a new user identity
32
32
  const user = new ThisMe('John', 'Doe', '1990-01-01', 'mypassword123', '1234');
33
+ // Retrieve the user's identity object
33
34
  const identityObject = user.getIdentityObject();
34
- // identityObject can now be passed to Cleaker for hashing
35
35
  ```
36
36
 
37
- ## Understanding .ME
37
+ ## Core Principles
38
38
 
39
- ##### Structure of this.me Package:
39
+ - The `Me` class encapsulates personal information like name, last name, birthday, password, and PIN. This serves as the identity representation in our system.
40
40
 
41
- **User Data Model:** Define a class or object structure to hold the user's data.
42
- **Data Validation:** Functions to validate the input data.
43
- **Data Processing:** Preparing data for hashing (by Cleaker).
44
- **Exporting Data:** A method to export the processed data in a format that Cleaker can accept.
41
+ The `all.this` collection of packages, along with the proposed `cleaker` functionality, is an approach to create a modular system where each module (like `this.text`, `this.video`, `this.img`, etc.) (all.this family) represents a distinct data structure or class. These modules, when combined with `cleaker`, generate unique **public and private key pairs**, essentially giving each instance its cryptographic identity.
45
42
 
43
+ ### Hashing and Digital Signatures
46
44
 
45
+ **This.Me** leverages hashing to protect data integrity, with each transaction generating a unique, tamper-proof hash. Digital signatures, created using private keys, provide a layer of authenticity and non-repudiation, linking data unmistakably to its owner.
47
46
 
47
+ ## Contextual Environment
48
48
 
49
- # Setting up your Context. 👋🏻👋🏼👋🏽👋🏾👋🏿
50
- Defining the **environment** and context in which your code runs, especially when you're interacting with intelligent agents or services like **me.**
49
+ **This.Me** adapts to various environments, enabling `.me` objects to function both locally and within a network. A `.me` object authenticated on a network accesses data beyond the local scope, while unauthenticated instances are confined to local data. This dual functionality ensures seamless interoperability and heightened security.
51
50
 
52
- Having a clear declaration of the environment and the context can have a series of implications for security, interoperability, and clarity. The codebase is often vast, dynamic, and continually evolving. Given the dynamic nature of such environments, ensuring the integrity of the code and data becomes paramount. You wouldn't want an agent to execute or rely on code that has been tampered with or is different from the expected version. This is where hashing comes into play.
51
+ ## Setting up your Context. 👋🏻👋🏼👋🏽👋🏾👋🏿
53
52
 
53
+ Defining the **environment** and context in which your code runs, especially when you're interacting with intelligent agents or services like **me.**
54
54
 
55
+ Having a clear declaration of the environment and the context can have a series of implications for security, interoperability, and clarity. The codebase is often vast, dynamic, and continually evolving. Given the dynamic nature of such environments, ensuring the integrity of the code and data becomes paramount. You wouldn't want an agent to execute or rely on code that has been tampered with or is different from the expected version. This is where hashing comes into play.
55
56
 
56
- -----
57
-
58
-
59
-
60
- `.me` objects to serve as both a local identity on the user's host machine and as an identity within a larger network. When a `.me` object is authenticated on a network, it can access data not only on the local host but also from other nodes within that network. Conversely, if it's not authenticated or recognized by the network, it should only access local data. Here's how this could be structured:
61
-
62
- ### Local and Network Identity Management
63
-
64
- 1. **Local Identity**:
65
- - When a `.me` object is created, it's initially configured with access to local host resources.
66
- - Users can manage their local profile, which includes their personal settings, preferences, and local data access permissions.
67
- 2. **Network Identity**:
68
- - To access resources on the network, a `.me` object must be authenticated against the network, possibly by a central authority or a decentralized consensus mechanism.
69
- - Once authenticated, the `.me` object's hash is recognized across the network, granting the user access to network resources according to their permissions.
70
- 3. **Access Control**:
71
- - Both local and network resources use access control lists (ACLs) that are tied to the `.me` object's hash.
72
- - These ACLs determine what resources the `.me` object can access and the level of interaction permitted (read, write, execute).
73
- 4. **Data Fetching**:
74
- - When fetching data, the system checks if the `.me` object is authenticated within the network.
75
- - If authenticated, the `.me` object can retrieve data from across the network based on the established ACLs.
76
- - If not authenticated, the `.me` object is limited to retrieving data from the local host.
77
- 5. **CLI Functionality**:
78
- - The CLI tool facilitates the creation of `.me` objects, management of profiles, and authentication processes.
79
- - It could include commands to "login" to the network, "logout", or "sync" local profiles with network profiles.
80
- 6. **Data Sharing and Security**:
81
- - Data sharing across the network should be secure, with encryption mechanisms in place to protect data in transit and at rest.
82
- - The `.me` object's unique hash can be part of the encryption key, ensuring that only the intended `.me` object can decrypt and access the shared data.
83
-
84
- ### Example CLI Commands
85
-
86
- - `me init`: Initializes a new `.me` object on the local host.
87
- - `me login`: Authenticates the `.me` object against the network to access network resources.
88
- - `me logout`: De-authenticates the `.me` object from the network, reverting to local-only access.
89
- - `me sync`: Synchronizes local `.me` object data with the network profile.
90
- - `me fetch`: Retrieves data from the local host or network based on authentication status.
91
-
92
- By implementing this dual identity system, you enable a seamless transition for users between operating solely on their local device and engaging with a broader network, all while maintaining strict control over their data access rights.
57
+ `.me` objects to serve as both a local identity on the user's host machine and as an identity within a larger network. When a `.me` object is authenticated on a network, it can access data not only on the local host but also from other nodes within that network. Conversely, if it's not authenticated or recognized by the network, it should only access local data. Here's how this could be structured:
package/docs/Me.html CHANGED
@@ -62,7 +62,7 @@
62
62
  class="link user-link "
63
63
  href="https://suign.github.io/all.this/"
64
64
  >
65
- all.This @Packages
65
+ all.This @Packages
66
66
  </a>
67
67
 
68
68
  <a
@@ -97,7 +97,7 @@
97
97
 
98
98
  <nav>
99
99
 
100
- <h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Modules</h3><ul><li><a href="module-CLI.html">CLI</a></li></ul><h3>Classes</h3><ul><li><a href="Me.html">Me</a></li></ul></div>
100
+ <h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Modules</h3><ul><li><a href="module-00-Index.html">00-Index</a></li><li><a href="module-CLI.html">CLI</a></li></ul><h3>Classes</h3><ul><li><a href="Me.html">Me</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createMe">createMe</a></li><li><a href="global.html#listMeProfiles">listMeProfiles</a></li><li><a href="global.html#selectMe">selectMe</a></li><li><a href="global.html#selectProfile">selectProfile</a></li><li><a href="global.html#writeMe">writeMe</a></li></ul></div>
101
101
 
102
102
  </nav>
103
103
  </div>
@@ -151,7 +151,7 @@
151
151
 
152
152
 
153
153
  <div class="description">
154
- Create a ThisMe instance.
154
+ Create a me instance.
155
155
  </div>
156
156
 
157
157
 
@@ -351,9 +351,9 @@
351
351
 
352
352
 
353
353
  <p class="tag-source">
354
- <a href="me.js.html" class="button">View Source</a>
354
+ <a href="src_me.js.html" class="button">View Source</a>
355
355
  <span>
356
- <a href="me.js.html">me.js</a>, <a href="me.js.html#line4">line 4</a>
356
+ <a href="src_me.js.html">src/me.js</a>, <a href="src_me.js.html#line4">line 4</a>
357
357
  </span>
358
358
  </p>
359
359
 
@@ -473,9 +473,9 @@
473
473
 
474
474
 
475
475
  <p class="tag-source">
476
- <a href="me.js.html" class="button">View Source</a>
476
+ <a href="src_me.js.html" class="button">View Source</a>
477
477
  <span>
478
- <a href="me.js.html">me.js</a>, <a href="me.js.html#line36">line 36</a>
478
+ <a href="src_me.js.html">src/me.js</a>, <a href="src_me.js.html#line36">line 36</a>
479
479
  </span>
480
480
  </p>
481
481
 
@@ -595,9 +595,9 @@
595
595
 
596
596
 
597
597
  <p class="tag-source">
598
- <a href="me.js.html" class="button">View Source</a>
598
+ <a href="src_me.js.html" class="button">View Source</a>
599
599
  <span>
600
- <a href="me.js.html">me.js</a>, <a href="me.js.html#line25">line 25</a>
600
+ <a href="src_me.js.html">src/me.js</a>, <a href="src_me.js.html#line25">line 25</a>
601
601
  </span>
602
602
  </p>
603
603
 
package/docs/README.md CHANGED
@@ -1,92 +1,53 @@
1
- <img src="https://suign.github.io/neurons.me/neurons_logo.png" alt="SVG Image" width="123" height="123" style="width123px; height:123px;">
2
-
3
1
  # This.Me
2
+ <img src="./this.me.png" alt="SVG Image" style="width:89px;">
4
3
 
4
+ **This.Me** redefines digital identity management through a cryptographic lens. Each user is equipped with a unique **'Me'** identity, secured by public-private key cryptography, enabling robust autonomous identity verification and transactional security.
5
5
 
6
- **This.Me** is a digital identity representation of **Me** as it encapsulates the essence of an entity which is then passed for cryptographic guarantees.
7
-
8
- Users no longer depend on centralized authorities for **identity and data management**. They hold the keys (literally) to their identity and data.
6
+ **This.Me** goes beyond traditional security, incorporating hashing for unimpeachable data integrity and digital signatures for undeniable authenticity. Users gain unparalleled control over their digital footprint, marking a shift towards a user-centric model of data management.
9
7
 
10
- Services become more **user-centric,** providing services based on cryptographic proofs rather than centralized authorities.
8
+ In essence, **This.Me** grants users a self-sovereign digital identity, fully within their control and independent from external entities.
11
9
 
12
- Here, you don't just own your identity; you seal it with cryptographic brilliance, untouched and ungoverned by any other.
10
+ ### CLI Usage:
13
11
 
14
- ## Getting Started:
12
+ Install globally to use `this.me` as a CLI tool:
15
13
 
16
- ```bash
17
- npm i -g this.me
14
+ ```js
15
+ npm install -g this.me
18
16
  ```
19
17
 
20
- ### Require it:
18
+ Then, interact with `this.me` directly from your command line.
21
19
 
22
- ```js
23
- const me = require('this.me');
24
- ```
25
20
 
26
- ### Usage Example:
21
+ ### Usage in Node.js:
27
22
 
28
- Use it like this:
23
+ ## Installation
24
+
25
+ ```bash
26
+ npm install this.me
27
+ ```
29
28
 
30
29
  ```js
31
30
  const ThisMe = require('this.me');
31
+ // Create a new user identity
32
32
  const user = new ThisMe('John', 'Doe', '1990-01-01', 'mypassword123', '1234');
33
+ // Retrieve the user's identity object
33
34
  const identityObject = user.getIdentityObject();
34
- // identityObject can now be passed to Cleaker for hashing
35
35
  ```
36
36
 
37
- ## Understanding .ME
37
+ ## Core Principles
38
38
 
39
- ##### Structure of this.me Package:
39
+ ### Hashing and Digital Signatures
40
40
 
41
- **User Data Model:** Define a class or object structure to hold the user's data.
42
- **Data Validation:** Functions to validate the input data.
43
- **Data Processing:** Preparing data for hashing (by Cleaker).
44
- **Exporting Data:** A method to export the processed data in a format that Cleaker can accept.
41
+ **This.Me** leverages hashing to protect data integrity, with each transaction generating a unique, tamper-proof hash. Digital signatures, created using private keys, provide a layer of authenticity and non-repudiation, linking data unmistakably to its owner.
45
42
 
43
+ ## Contextual Environment
46
44
 
45
+ **This.Me** adapts to various environments, enabling `.me` objects to function both locally and within a network. A `.me` object authenticated on a network accesses data beyond the local scope, while unauthenticated instances are confined to local data. This dual functionality ensures seamless interoperability and heightened security.
47
46
 
47
+ ## Setting up your Context. 👋🏻👋🏼👋🏽👋🏾👋🏿
48
48
 
49
- # Setting up your Context. 👋🏻👋🏼👋🏽👋🏾👋🏿
50
49
  Defining the **environment** and context in which your code runs, especially when you're interacting with intelligent agents or services like **me.**
51
50
 
52
51
  Having a clear declaration of the environment and the context can have a series of implications for security, interoperability, and clarity. The codebase is often vast, dynamic, and continually evolving. Given the dynamic nature of such environments, ensuring the integrity of the code and data becomes paramount. You wouldn't want an agent to execute or rely on code that has been tampered with or is different from the expected version. This is where hashing comes into play.
53
52
 
54
-
55
-
56
- -----
57
-
58
-
59
-
60
- `.me` objects to serve as both a local identity on the user's host machine and as an identity within a larger network. When a `.me` object is authenticated on a network, it can access data not only on the local host but also from other nodes within that network. Conversely, if it's not authenticated or recognized by the network, it should only access local data. Here's how this could be structured:
61
-
62
- ### Local and Network Identity Management
63
-
64
- 1. **Local Identity**:
65
- - When a `.me` object is created, it's initially configured with access to local host resources.
66
- - Users can manage their local profile, which includes their personal settings, preferences, and local data access permissions.
67
- 2. **Network Identity**:
68
- - To access resources on the network, a `.me` object must be authenticated against the network, possibly by a central authority or a decentralized consensus mechanism.
69
- - Once authenticated, the `.me` object's hash is recognized across the network, granting the user access to network resources according to their permissions.
70
- 3. **Access Control**:
71
- - Both local and network resources use access control lists (ACLs) that are tied to the `.me` object's hash.
72
- - These ACLs determine what resources the `.me` object can access and the level of interaction permitted (read, write, execute).
73
- 4. **Data Fetching**:
74
- - When fetching data, the system checks if the `.me` object is authenticated within the network.
75
- - If authenticated, the `.me` object can retrieve data from across the network based on the established ACLs.
76
- - If not authenticated, the `.me` object is limited to retrieving data from the local host.
77
- 5. **CLI Functionality**:
78
- - The CLI tool facilitates the creation of `.me` objects, management of profiles, and authentication processes.
79
- - It could include commands to "login" to the network, "logout", or "sync" local profiles with network profiles.
80
- 6. **Data Sharing and Security**:
81
- - Data sharing across the network should be secure, with encryption mechanisms in place to protect data in transit and at rest.
82
- - The `.me` object's unique hash can be part of the encryption key, ensuring that only the intended `.me` object can decrypt and access the shared data.
83
-
84
- ### Example CLI Commands
85
-
86
- - `me init`: Initializes a new `.me` object on the local host.
87
- - `me login`: Authenticates the `.me` object against the network to access network resources.
88
- - `me logout`: De-authenticates the `.me` object from the network, reverting to local-only access.
89
- - `me sync`: Synchronizes local `.me` object data with the network profile.
90
- - `me fetch`: Retrieves data from the local host or network based on authentication status.
91
-
92
- By implementing this dual identity system, you enable a seamless transition for users between operating solely on their local device and engaging with a broader network, all while maintaining strict control over their data access rights.
53
+ `.me` objects to serve as both a local identity on the user's host machine and as an identity within a larger network. When a `.me` object is authenticated on a network, it can access data not only on the local host but also from other nodes within that network. Conversely, if it's not authenticated or recognized by the network, it should only access local data. Here's how this could be structured: