Repository navigation
v0.4.0 — Identity bundle
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=...)andsoul.recall(user_id=...)filter memory and bond context per user.BondRegistrytracks 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 insoul status. MCP:soul_observe(user_id=...),soul_recall(user_id=...). - User-defined memory layers + domain isolation (#41) —
MemoryTypegraduates to open string layers. NewMemoryEntry.domainfield for namespacing (finance,legal,personal, ...).MemoryManager.layer(name)returns aLayerViewfor arbitrary layer names. Newsociallayer for relationship memory.DomainIsolationMiddlewaresandboxes a soul to a domain allow-list; reads filter, writes raiseDomainAccessError. CLI:soul remember --domain,soul recall --layer/--domain, newsoul layerscommand. Persistence stays flat for default-domain souls; nestedmemory/<layer>/<domain>/entries.jsonlayout used only when needed. - Trust chain — verifiable action history (#42) — every learning event, memory mutation, evolution step, and bond change appends a signed entry.
TrustEntrycarries the action, a payload hash (not the payload),prev_hashfor the Merkle-style chain, and an embedded public key per entry so verification works without an external registry. DefaultEd25519SignatureProviderships inruntime/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 indocs/trust-chain.md.
Rolled-in polish
- Density-driven focus (#194) —
SoulState.focusis computed from a sliding window of recent interactions instead of being a static default. Manual lock viasoul.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 viasuperseded_by.Soul.forget_one()for audited single-id deletion. New CLIs:soul supersede,soul forget --id. Fixes a stale bug wheresoul forgetreported 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.
MemoryEntrygains optionaluser_id: str | None = Noneanddomain: str = "default".- Memory layout migrates from flat to nested only when a soul uses non-default domains or non-standard layers.
trust_chain/andkeys/directories created on first signed action.- Legacy souls with
bonded_toset auto-populate a defaultBondTargeton awaken.
Breaking changes
MemoryTypeisstr-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")andSoul.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)