Skip to content

v0.4.0 — Identity bundle

Choose a tag to compare

@prakashUXtech prakashUXtech released this 29 Apr 18:17
· 3 commits to main since this release
f5c0538

The identity bundle release. Multi-user souls, user-defined memory layers + domain isolation, and a verifiable Ed25519-signed trust chain. Plus rolled-in polish: density-driven focus, memory update primitives, and a wiki rebuild.

Identity bundle

  • Multi-user soul support (#46) — soul.observe(user_id=...) and soul.recall(user_id=...) filter memory and bond context per user. BondRegistry tracks per-user relationship strength. Lazy creation of per-user bonds keeps single-user souls free of overhead. CLI: soul observe --user, soul recall --user, per-user bonds in soul status. MCP: soul_observe(user_id=...), soul_recall(user_id=...).
  • User-defined memory layers + domain isolation (#41) — MemoryType graduates to open string layers. New MemoryEntry.domain field for namespacing (finance, legal, personal, ...). MemoryManager.layer(name) returns a LayerView for arbitrary layer names. New social layer for relationship memory. DomainIsolationMiddleware sandboxes a soul to a domain allow-list; reads filter, writes raise DomainAccessError. CLI: soul remember --domain, soul recall --layer/--domain, new soul layers command. Persistence stays flat for default-domain souls; nested memory/<layer>/<domain>/entries.json layout used only when needed.
  • Trust chain — verifiable action history (#42) — every learning event, memory mutation, evolution step, and bond change appends a signed entry. TrustEntry carries the action, a payload hash (not the payload), prev_hash for the Merkle-style chain, and an embedded public key per entry so verification works without an external registry. Default Ed25519SignatureProvider ships in runtime/crypto/. Soul.verify_chain() is bound to the loaded keystore's public key — shared souls (include_keys=False) cannot be impersonated by chain replacement. New CLIs: soul verify, soul audit. Full threat model in docs/trust-chain.md.

Rolled-in polish

  • Density-driven focus (#194) — SoulState.focus is computed from a sliding window of recent interactions instead of being a static default. Manual lock via soul.feel(focus="<level>"); feel(focus="auto") clears the lock. Soul.recompute_focus(now) for read-time freshness.
  • Memory update primitives (#193) — Soul.supersede() writes a new memory and links the old via superseded_by. Soul.forget_one() for audited single-id deletion. New CLIs: soul supersede, soul forget --id. Fixes a stale bug where soul forget reported 0 memories on successful deletion.
  • Wiki rebuild (#186) — fresh wiki regeneration covering 328 articles.

Schema migrations

Existing .soul files load cleanly. Migration is automatic on awaken.

  • MemoryEntry gains optional user_id: str | None = None and domain: str = "default".
  • Memory layout migrates from flat to nested only when a soul uses non-default domains or non-standard layers.
  • trust_chain/ and keys/ directories created on first signed action.
  • Legacy souls with bonded_to set auto-populate a default BondTarget on awaken.

Breaking changes

  • MemoryType is str-typed at the spec layer. Runtime StrEnum still compares equal to its string values, so most code is unaffected.
  • Soul.observe(*, user_id=None, domain="default") and Soul.recall(*, user_id=None, layer=None, domain=None, ...) add keyword-only filters. Default behavior unchanged when filters are omitted.
  • Soul.export(*, include_keys=False) defaults to excluding the private signing key. Sharing a soul preserves verifiability without giving away signing power.

Tests

2551 passing. New: 11 multi-user, 46 memory layers, 79 trust chain, 4 pubkey-binding (added in security review).

Closes

  • #46 (multi-user soul support)
  • #41 (memory layers + domain isolation)
  • #42 (trust chain)
  • #183 (0.4.0 release tracker)

What's next

  • v0.4.1 — Trust chain hardening + audit polish (#206)
  • v0.4.2-onwards — Intelligence bundle (#184): #160 evals, #142 soul optimize, #108 graph traversal