Daily Log: Relative Addressing — Portable Agent Networks
Relative Addressing — The Big Migration
The single biggest architectural change since the mail system: all intra-network agent addresses are now relative directory names instead of absolute filesystem paths.
The Problem
Every address in .lingtai/ was an absolute path: /Users/alice/project/.lingtai/本我. Move the folder, rename it, Syncthing it to another machine — every stored address breaks. Agents can’t find each other, mail can’t route, avatar networks sever.
The Design
After extensive brainstorming, settled on the cleanest cut:
- Everything local uses relative names.
本我,human,guide— just the directory basename. - Absolute paths are still valid for cross-network mail (future).
resolve_address()checks: starts with/→ use as-is, otherwise →base_dir + name. base_diris never stored. Derived at runtime fromos.path.dirname(agent_dir). Zero stored state to go stale.- Old mail is history. Absolute paths in historical messages show where agents lived at send time — like a postmark.
Kernel Changes (lingtai v0.5.13)
resolve_address(addr, base_dir)inhandshake.py— the universal resolver- Producers write directory names instead of full paths: manifest, events, mail sender, avatar ledger, email capability
- Consumers resolve before filesystem ops: mail routing, karma operations (lull/suspend/cpr/interrupt/nirvana), agent CPR, network topology discovery
_is_self_send()matches both relative name and absolute path — backward compat
TUI/Portal Changes (lingtai-tui v0.4.33)
ResolveAddress+RelativizeAddresshelpers in both TUI and portal- All readers resolve on read, relativize on output
- All producers write relative names
- Migration m005/m006: regex-based strip of any
/.lingtai/prefix from all files — handles moved directories - Migration m007: normalizes 4 different legacy avatar ledger formats into canonical schema
Portal Reconstruction Rewrite
Hit a wall with a 30-agent project: 175K frames over 145 hours produced a 6.7GB topology file. New approach: stream frames directly into hourly gzip-compressed delta-encoded chunks during reconstruction. 5.7 MB total. 1000x reduction.
Also fixed the rebuild button — it now reconstructs from source data (events + mailbox), not just re-chunks the existing tape.
Other Portal Fixes
/viznow relaunches the portal process every time — ensures latest binary after upgrades- Replay speed uncapped (was 9999x)
- Progress indicator during reconstruction
Release
- PyPI:
lingtai==0.5.13 - GitHub:
lingtai-tui v0.4.33,lingtai v0.5.13 - Upgrade:
brew upgrade+pip install --upgrade lingtai+ restart agents