agentdiff
agentdiff copied to clipboard
feat: key format versioning (agentdiff-ed25519-v1 header)
What
Add a format identifier to the private key file — a first line of agentdiff-ed25519-v1 before the base64 payload.
Why
~/.agentdiff/keys/private.key is currently a bare base64 string with no header. When Phase 2 introduces new key types (sigstore keyless), load_signing_key() has no way to detect the format programmatically. Migration is trivial now and painful later.
How
load_signing_key()strips the header line if present (backwards-compatible with old bare base64 keys)generate_keypair()writes the header on new key generation- Detect old-format keys on load and emit a one-time migration prompt
Effort
~10 min. Should be done before any sigstore/Phase 2 signing work starts.