this.me 3.1.3 → 3.1.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.
- package/README.md +165 -99
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,92 +1,136 @@
|
|
|
1
|
-
<
|
|
1
|
+
<picture>
|
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://res.cloudinary.com/dkwnxf6gm/image/upload/v1769890772/this.me.png" />
|
|
3
|
+
<img src="https://res.cloudinary.com/dkwnxf6gm/image/upload/v1761149332/this.me-removebg-preview_2_j1eoiy.png" alt=".me Logo" width="144" />
|
|
4
|
+
</picture>
|
|
2
5
|
|
|
3
6
|
# .me
|
|
4
|
-
|
|
7
|
+
|
|
5
8
|
```bash
|
|
6
9
|
npm install this.me
|
|
7
10
|
```
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## **Start .me in 20 seconds**
|
|
11
|
+
## **Start .me in 60 seconds**
|
|
11
12
|
###### Import
|
|
12
|
-
**1) Node.js**:
|
|
13
13
|
```ts
|
|
14
|
-
import
|
|
15
|
-
const me = new
|
|
14
|
+
import Me from "this.me";
|
|
15
|
+
const me = new Me();
|
|
16
16
|
```
|
|
17
|
-
**Other modules formats and runtime targets:** CommonJS (`require`), UMD (global/script), TypeScript types.
|
|
18
17
|
|
|
19
|
-
###### **Declare** Your
|
|
18
|
+
###### **Declare** Your Identity.
|
|
20
19
|
```ts
|
|
21
|
-
me
|
|
22
|
-
me.profile.age(30);
|
|
20
|
+
me["@"]("jabellae");
|
|
23
21
|
```
|
|
24
22
|
|
|
25
|
-
###### **
|
|
23
|
+
###### **Declare** Your Data.
|
|
26
24
|
```ts
|
|
27
|
-
me
|
|
28
|
-
me("
|
|
25
|
+
me.profile.name("Abella.e");
|
|
26
|
+
me.profile.bio("Building the semantic web.");
|
|
27
|
+
me.profile.pic("https://neurons.me/media/neurons-grey.png");
|
|
28
|
+
me.users.ana.name("Ana");
|
|
29
|
+
me.users.ana.bio("Designing semantic interfaces.");
|
|
30
|
+
me.users.ana.age(22);
|
|
31
|
+
me.users.pablo.name("Pablo");
|
|
32
|
+
me.users.pablo.bio("Building distributed systems.");
|
|
33
|
+
me.users.pablo.age(17);
|
|
29
34
|
```
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
###### **Use in expressions**
|
|
32
37
|
```ts
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
me.friends.ana["->"]("users.ana");
|
|
39
|
+
me.friends.pablo["->"]("users.pablo");
|
|
40
|
+
// Broadcast logic over friend pointers
|
|
41
|
+
me.friends["[i]"]["="]("is_adult", "age >= 18");
|
|
42
|
+
```
|
|
43
|
+
###### Read Your Data
|
|
44
|
+
```ts
|
|
45
|
+
me("profile.bio"); // → "Building the semantic web."
|
|
46
|
+
me("friends.ana.bio");// → "Designing semantic interfaces."
|
|
47
|
+
me("friends.pablo.name");// → "Pablo"
|
|
48
|
+
me("friends.ana.is_adult");// → true
|
|
49
|
+
me("friends.pablo.is_adult");// → false
|
|
50
|
+
me("friends[age > 18].name");// → { ana: "Ana" }
|
|
36
51
|
```
|
|
37
52
|
|
|
38
53
|
---
|
|
39
54
|
|
|
40
|
-
|
|
41
|
-
**.me** supports infinite nesting:
|
|
55
|
+
# ⟁ Infinite Semantic Trees
|
|
56
|
+
**.me** supports **infinite** nesting:
|
|
42
57
|
|
|
43
58
|
```ts
|
|
44
|
-
|
|
45
|
-
me.
|
|
46
|
-
me
|
|
47
|
-
//
|
|
59
|
+
// 1. Build your nested house
|
|
60
|
+
me.home.kitchen.lights.main.brightness(80); //sets the value to 80
|
|
61
|
+
me.home.kitchen.lights.leds.brightness(40); //sets the value to 40
|
|
62
|
+
// 2. Add "Master Control" Logic
|
|
63
|
+
me.home.kitchen.lights["="]("avg", "(main.brightness + leds.brightness) / 2"); // 80 + 40 / 2
|
|
64
|
+
me("home.kitchen.lights.avg"); // → 60
|
|
48
65
|
```
|
|
49
66
|
|
|
50
|
-
You can
|
|
67
|
+
You can **bridge** distant rooms with **Pointers**:
|
|
68
|
+
```ts
|
|
69
|
+
// Create a "Master Switch" at your root
|
|
70
|
+
me.main_switch["->"]("home.kitchen.lights.main");
|
|
71
|
+
me.main_switch.brightness(0); // Turn off the kitchen from the root
|
|
72
|
+
me("home.kitchen.lights.avg"); // → 20 (Reactive Auto-Update)
|
|
73
|
+
```
|
|
74
|
+
You can construct any conceptual universe.
|
|
75
|
+
### Run your coffee shops ☕:
|
|
76
|
+
```ts
|
|
77
|
+
// 1. Build two shops as an indexed collection
|
|
78
|
+
me.shops[1].name("Downtown");
|
|
79
|
+
me.shops[1].menu.latte.price(4.5);
|
|
80
|
+
me.shops[1].menu.espresso.price(3.0);
|
|
81
|
+
me.shops[2].name("Riverside");
|
|
82
|
+
me.shops[2].menu.latte.price(5.0);
|
|
83
|
+
me.shops[2].menu.espresso.price(3.5);
|
|
84
|
+
// 2. Broadcast combo logic to every shop (iterator [i])
|
|
85
|
+
me.shops["[i]"].menu["="]("breakfast_deal", "latte.price + espresso.price - 1.5");
|
|
86
|
+
// 3. Read by range selector
|
|
87
|
+
me("shops[1..2].menu.breakfast_deal"); // → { "1": 6.0, "2": 7.0 }
|
|
88
|
+
// 4. Filter shops by computed value
|
|
89
|
+
me("shops[menu.breakfast_deal > 6].name"); // → { "2": "Riverside" }
|
|
90
|
+
```
|
|
51
91
|
|
|
92
|
+
Or even patch ◎──▶ your **master bus** ──▶ to your **moog synth** filter ──▶◉
|
|
52
93
|
```ts
|
|
53
|
-
me.synth.moog.
|
|
54
|
-
me.
|
|
55
|
-
me("synth.moog.
|
|
56
|
-
// → "triangle"
|
|
94
|
+
me.studio.master_bus.input["->"]("studio.synth.moog.filter");
|
|
95
|
+
me.studio.master_bus.input.cutoff(1200);
|
|
96
|
+
me("studio.synth.moog.filter.cutoff"); // → 1200
|
|
57
97
|
```
|
|
58
98
|
|
|
59
99
|
---
|
|
60
100
|
|
|
61
|
-
##
|
|
62
|
-
Secrets create
|
|
63
|
-
|
|
101
|
+
## 𓂀 Secrets: Encrypted Universes
|
|
102
|
+
Secrets don't just hide data; they create **Private Sub-Dimensions** in your identity tree.
|
|
64
103
|
```ts
|
|
65
|
-
|
|
104
|
+
// 1. Declare a secret scope at any branch
|
|
105
|
+
me.wallet["_"]("vault-key-2026");
|
|
66
106
|
me.wallet.balance(500);
|
|
67
|
-
me.wallet.
|
|
107
|
+
me.wallet.note("Private savings");
|
|
68
108
|
```
|
|
69
109
|
|
|
70
|
-
Everything under
|
|
71
|
-
Secret scope roots are stealth by design:
|
|
72
|
-
|
|
110
|
+
Everything under a `["_"]` scope is **stored as an Encrypted Blob**. By design, secret roots are Stealth:
|
|
73
111
|
```ts
|
|
74
|
-
me("wallet"); // → undefined (
|
|
75
|
-
me("wallet.balance"); // → 500
|
|
76
|
-
me("wallet.transactions.list"); // → [1, 2, 3]
|
|
112
|
+
me("wallet"); // → undefined (The root is a ghost)
|
|
113
|
+
me("wallet.balance"); // → 500 (Direct path resolution works)
|
|
77
114
|
```
|
|
115
|
+
###### 𓉔 Recursive Stealth:
|
|
78
116
|
|
|
79
|
-
Secrets
|
|
117
|
+
**Secrets nest infinitely**. Each `["_"]` creates a deeper, independent cryptographic layer:
|
|
80
118
|
|
|
81
119
|
```ts
|
|
82
|
-
me.wallet["_"]("
|
|
83
|
-
me.wallet.hidden["_"]("
|
|
84
|
-
me.wallet.hidden.note("
|
|
85
|
-
|
|
86
|
-
me("wallet.hidden")
|
|
87
|
-
me("wallet.hidden.note"); // → "private"
|
|
120
|
+
me.wallet["_"]("KEY-A");
|
|
121
|
+
me.wallet.hidden["_"]("KEY-B");// Nested secret scope
|
|
122
|
+
me.wallet.hidden.note("Deep dark secret");
|
|
123
|
+
me("wallet.hidden"); // → undefined
|
|
124
|
+
me("wallet.hidden.note");// → "Deep dark secret"
|
|
88
125
|
```
|
|
89
126
|
|
|
127
|
+
## 𓉐 The Rules of the Vault:
|
|
128
|
+
**Zero-Knowledge Roots:** You can't "list" a secret directory. If you don't know the path, the data doesn't exist for you.
|
|
129
|
+
|
|
130
|
+
**Path-Based Resolution:** There is no global unlock() call. Security is woven into the Semantic Path.
|
|
131
|
+
**Atomic Encryption:** Every secret branch is a self-contained encrypted universe.
|
|
132
|
+
|
|
133
|
+
|
|
90
134
|
- **A secret belongs to a specific position in the identity tree.**
|
|
91
135
|
- Everything under that position becomes encrypted.
|
|
92
136
|
- If you declare another secret inside, it becomes a deeper encrypted scope.
|
|
@@ -94,81 +138,103 @@ me("wallet.hidden.note"); // → "private"
|
|
|
94
138
|
|
|
95
139
|
---
|
|
96
140
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
- Export → deterministic declarative identity
|
|
104
|
-
- Zero dependencies
|
|
105
|
-
- Browser & Node compatible
|
|
141
|
+
## ⟐ Why .me?
|
|
142
|
+
- **Infinite Surface:** No schemas. If you think of a path `(me.a.b.c)`, it exists. You **define your universe as you speak.**
|
|
143
|
+
- **Universal Query:** Any string is a query. No SQL, no complex APIs. Just paths and brackets `[]`.
|
|
144
|
+
- **Fractal Privacy:** Security isn't a "plugin." It's woven into the tree. You can drop a `Secret ["_"]` anywhere, and that branch becomes a private universe.
|
|
145
|
+
- **Deterministic Replay:** Every state change is a "Thought." You can export your entire identity and rebuild it exactly as it was, anywhere in the world.
|
|
146
|
+
- **Zero Baggage:** No dependencies. No bloat. Pure logic that runs in 15ms on a browser or a server.
|
|
106
147
|
|
|
107
148
|
---
|
|
108
149
|
|
|
109
|
-
|
|
150
|
+
## 𓆣 Explain Derivations
|
|
151
|
+
|
|
152
|
+
Use `me.explain(path)` to audit how a computed value was produced.
|
|
110
153
|
|
|
111
154
|
```ts
|
|
112
|
-
|
|
155
|
+
const trace = me.explain("shops.2.menu.breakfast_deal");
|
|
156
|
+
console.log(trace);
|
|
113
157
|
```
|
|
114
158
|
|
|
115
|
-
|
|
159
|
+
**Example trace:**
|
|
116
160
|
|
|
117
161
|
```json
|
|
118
162
|
{
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
163
|
+
"path": "shops.2.menu.breakfast_deal",
|
|
164
|
+
"value": 7,
|
|
165
|
+
"derivation": {
|
|
166
|
+
"expression": "latte.price + espresso.price - 1.5",
|
|
167
|
+
"inputs": [
|
|
168
|
+
{
|
|
169
|
+
"label": "latte.price",
|
|
170
|
+
"path": "shops.2.menu.latte.price",
|
|
171
|
+
"value": 5,
|
|
172
|
+
"origin": "public",
|
|
173
|
+
"masked": false
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"label": "espresso.price",
|
|
177
|
+
"path": "shops.2.menu.espresso.price",
|
|
178
|
+
"value": 3.5,
|
|
179
|
+
"origin": "public",
|
|
180
|
+
"masked": false
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"meta": {
|
|
185
|
+
"dependsOn": [
|
|
186
|
+
"shops.2.menu.latte.price",
|
|
187
|
+
"shops.2.menu.espresso.price"
|
|
188
|
+
]
|
|
189
|
+
}
|
|
126
190
|
}
|
|
127
191
|
```
|
|
128
192
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
### 🧠 Full Example
|
|
193
|
+
For runtime snapshots/debug:
|
|
132
194
|
|
|
133
195
|
```ts
|
|
134
|
-
|
|
196
|
+
me.inspect(); // thoughts + index + scopes
|
|
197
|
+
me.exportSnapshot(); // full portable state (Phase 7B)
|
|
198
|
+
```
|
|
135
199
|
|
|
136
|
-
|
|
200
|
+
# 𓃭 The Engine: Why it’s so fast?𓃭
|
|
201
|
+
While traditional databases get bogged down in heavy scans and slow joins, the **.me Kernel** doesn't "search" for data—it navigates a **Semantic Algebra.**
|
|
137
202
|
|
|
138
|
-
|
|
139
|
-
me
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
203
|
+
#### 𓎛 Incremental Intelligence (Phase 8)
|
|
204
|
+
Unlike standard reactive frameworks that re-render everything, **.me** uses an **Inverted Dependency Index.**
|
|
205
|
+
When you define a formula (=), the Kernel maps the relationship.
|
|
206
|
+
On mutation, only the affected nodes wake up.
|
|
207
|
+
**The Result**: Local updates resolve in 15ms, achieving
|
|
208
|
+
complexity (where
|
|
209
|
+
is the specific dependency chain, not the size of the tree).
|
|
143
210
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
211
|
+
#### 𓁟 Hermetic Sandbox (Phase C)
|
|
212
|
+
Security isn't a "check"; it's a grammar.
|
|
213
|
+
We replaced `eval()` with a custom **Shunting-yard + RPN evaluator.**
|
|
214
|
+
The Kernel is physically incapable of executing arbitrary code. **It only resolves math and logic** over its own validated paths.
|
|
147
215
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
216
|
+
#### Fractal Stealth (Phase 0 & 6)
|
|
217
|
+
###### Privacy is woven into the tree's geometry.
|
|
218
|
+
**Stealth Roots:** Secret scopes `("_")` are invisible to standard lookups.
|
|
219
|
+
**Deterministic Integrity:** Calculations can cross from public to secret scopes **(Phase 6)** without ever exposing the sensitive keys in the audit trail (me.explain).
|
|
220
|
+
**Zero-Latency Portability** **(Phase 7A/B)**
|
|
152
221
|
|
|
153
|
-
|
|
154
|
-
console.log(me("name.first")); // "Abella"
|
|
155
|
-
console.log(me("profile.age")); // 30
|
|
222
|
+
###### 𓂀𓈖𓂀 ⟐ Your identity is Deterministic ⟐ 𓂀𓈖𓂀
|
|
156
223
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
console.log("Access granted");
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// Export
|
|
163
|
-
console.log(JSON.stringify(me.export(), null, 2));
|
|
164
|
-
```
|
|
224
|
+
By exporting **"Thoughts"** or **"Snapshots"**, you can teleport your entire state between a **MacBook Air** in **Veracruz** and a high-end server in **London.**
|
|
225
|
+
The behavior is identical, bit-by-bit, because the logic is part of the state.
|
|
165
226
|
|
|
166
227
|
---
|
|
167
|
-
|
|
168
|
-
|
|
169
228
|
<a href="https://www.neurons.me" target="_blank">
|
|
170
|
-
<img src="https://res.cloudinary.com/dkwnxf6gm/image/upload/
|
|
229
|
+
<img src="https://res.cloudinary.com/dkwnxf6gm/image/upload/v1760901388/bc75d34cf31ad2217a3cc607f41b884c022e8a7e0dc022e2678bbba5bac1cd59-removebg-preview-removebg-preview_w6c3il.png" style="zoom:21%;" /></a>
|
|
230
|
+
|
|
171
231
|
|
|
172
232
|
##### License
|
|
173
|
-
MIT © 2025 by https://neurons.me
|
|
233
|
+
**MIT © 2025 by https://neurons.me**
|
|
234
|
+
|
|
174
235
|
See the [LICENSE](./LICENSE) file for details.
|
|
236
|
+
|
|
237
|
+
**∴ Witness our seal**
|
|
238
|
+
|
|
239
|
+
**suiGn**
|
|
240
|
+
|