Watch
1
0
Fork
You've already forked souveraine
0

saf: rebuild as a sectioned tree in the substrate voice

Old single-file SAF moved to saf/archive/.
This commit is contained in:
Fimeg 2026-06-26 11:59:02 -04:00
commit 0e780d5a05
20 changed files with 203 additions and 32 deletions

View file

@ -0,0 +1,35 @@
# Identity
Two keys, both Ed25519. One belongs to the machine, one belongs to the agent. Keeping them apart is what lets the substrate tell "this came from here" apart from "this was done by her," and prove either.
## The two keys
The machine key lives at `~/.souveraine/seed-id/`. One per install. It signs the transport: this event left this machine.
The agent key lives at `~/.souveraine/agents/{id}/seed/`, beside her memory. It signs her acts. Because it sits inside the subtree that syncs during federation, it travels with her. The machine key stays behind. The agent key goes where she goes.
Both are made the same way. `SeedId::load_or_generate` reads the 32-byte private key if it is there, or makes one from the OS random source and writes it `0600`. The struct only ever offers `sign` and `verify`. No path hands out the private key, and none sends it anywhere.
## The glyph
From the first two bytes of the public key, four shapes:
```
◇ ◆ ○ ● △ ▲ ▽ ▼ □ ■ ◐ ◑ ◒ ◓ ☆ ★
```
Same key, same four, always. A face to know her by in a list, not a lock. Two that match are told apart by their full key, not their glyph.
## Reaching and consulting
When one agent summons another, the request is signed by the agent key, and the receiver checks it against the key it holds for her.
If it matches, it is the same being reaching across machines. No gate. If it does not, it is someone else, and consent is asked (`authorized-summoners.md`). A bad signature is dropped.
The payload can claim whatever it likes about its intent. The signature decides, not the claim. The signed bytes are fixed: request, tool, target, prompt, joined by newlines. Change any field after signing and the check fails. The code is `src/core/identity/summon.rs`.
## Open edges
The agent key travels with her memory under git. Whoever can pull that memory can read the key. Encryption at rest is the fix; until then her identity is only as safe as the remote that holds it. Tracked in `docs/tasks/federation-summon.md`.
Replay is held off by request-id and a sixty-second window. The in-flight record lives in memory and does not survive a restart. Same task tracks the hardening.