Algebra of Contexts
Where the algebra of spaces (path, refinement, plural, derivation, secret audience) lives in the v4.2.1 TypeScript source, which test proves each part, and what npm this.me 4.2.1 returns. Concept: Algebra of Contexts (also Syntax: Algebra first). Theory: Digital Space Algebra, Encrypted Audiences.
Map
Outputs on npm 4.2.1
node against the npm this.me 4.2.1 dist, 2026-10-14.
ts
import ME, { parseMeUri } from "this.me";
const me = new ME();
me.profile.contact.email("abella@neurons.me");
me("profile.contact.email"); // "abella@neurons.me"
me.friends[1].age(17); me.friends[2].age(34); me.friends[3].age(21);
me("friends[age > 18].age"); // { "2": 34, "3": 21 }
me("friends[]"); // 3
me("friends[].age"); // 72
me.friends["[i]"]["="]("adult", "age >= 18");
me("friends[1].adult"); // false
me.friends[1].age(19);
me("friends[1].adult"); // true
me.explain("friends.1.adult").meta.k; // 1
me.wallet["_"]("vault-key");
me.wallet.hidden.note("private");
me("wallet"); // undefined
me("wallet.hidden.note"); // "private"
me.as(null)("wallet.hidden.note"); // undefined (guest)
me.wallet.balance(500);
me["="]("budget", "wallet.balance * 0.1");
me.explain("budget").value; // 50
me.explain("budget").derivation.inputs;
// [{ path: "wallet.balance", value: "●●●●", origin: "stealth", masked: true, … }]
parseMeUri("me://suign.neurons.me[macbook]/profile.name");
// { href: "me://suign.neurons.me[surface:macbook]/profile.name",
// handle: "suign", space: "neurons.me",
// selector: { kind: "surface", value: "surface:macbook" },
// path: "profile.name", segments: ["profile", "name"] }Test runs on 4.2.1
| Test (v4.2.1) | Runs against | Result |
|---|---|---|
tests/contracts/dsl.contract.test.mjs | npm 4.2.1 dist | Phase 6 contract suite passed |
tests/aggregate-path.test.ts | npm 4.2.1 dist | 165 passed, 0 failed |
tests/derivation-wave.test.ts | npm 4.2.1 dist | all wave cases passed |
tests/Security/derived-from-secret.test.ts | npm 4.2.1 dist | 11 passed, 0 failed |
tests/me-uri.test.ts | v4.2.1 src/me-uri.ts | passed |
tests/Security/audience-algebra.test.ts | v4.2.1 src/audience.ts | 16 passed, 0 failed (laws L1–L9 plus AND/OR cases) |
audience.ts is in the v4.2.1 source but not exported by the npm 4.2.1 package, so audiences are only reachable from source.
Derived-from-secret, the cases that matter here:
txt
✅ 5. GUARANTEE: a keyless party declaring a derivation over the secret gets nothing computed from it
✅ 6. GUARANTEE: mixing the secret with a public value (price * fuel) reveals nothing to a keyless party
✅ 8. GUARANTEE: an owner-declared derivation produces no new secret-derived values once the key is goneRelated
Algebra of Contexts (concept) · Digital Space Algebra · Proxy calls · Axioms: TypeScript validation · Kernel Core · Plurality Is Grammar · Syntax · me.explain(path)