Skip to content

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 ​

ConceptSource (v4.2.1)Test (v4.2.1)
Space ⊇ subspace: a path is a list of segmentsproxy.ts createProxy L256–303, core.ts readPath L289–393dsl.contract L37–45
Selected subspace x[pred]core-read.ts evaluateFilterPath L247–272dsl.contract L223–236
Plural x[] (count) and x[].f (sum)aggregate.ts evaluateAggregate L110–197aggregate-path.test.ts
Derivation = over members [i]derivation.ts registerDerivation L577–608derivation-wave.test.ts
Secret scope: readable audience {self}secret-context.ts resolveBranchScope L232–265, me.ts as L1581–1589axioms.test.ts A0/A2
Explain with masked secret inputsderivation.ts explain L140–251, mask L214–215dsl.contract L325–348
Deriving from a secret: no keyless leaksame plus core-write.ts postulate L983–1101derived-from-secret.test.ts L185–216
Audiences: OR / AND coalitions, minus, resealaudience.ts canonicalize L86–89, minus L101–107, sealAudience L207–226, openAudience L229–247audience-algebra.test.ts L77–207
Namespace: me://handle.space[selector]/pathme-uri.ts parseMeUri L284–332me-uri.test.ts

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 againstResult
tests/contracts/dsl.contract.test.mjsnpm 4.2.1 distPhase 6 contract suite passed
tests/aggregate-path.test.tsnpm 4.2.1 dist165 passed, 0 failed
tests/derivation-wave.test.tsnpm 4.2.1 distall wave cases passed
tests/Security/derived-from-secret.test.tsnpm 4.2.1 dist11 passed, 0 failed
tests/me-uri.test.tsv4.2.1 src/me-uri.tspassed
tests/Security/audience-algebra.test.tsv4.2.1 src/audience.ts16 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 gone

Algebra of Contexts (concept) · Digital Space Algebra · Proxy calls · Axioms: TypeScript validation · Kernel Core · Plurality Is Grammar · Syntax · me.explain(path)

Human owns meaning. Everything else asks.