An ssh-ed25519 recipient line is
-> ssh-ed25519 encode(SHA-256(SSH key)[:4]) rest
where SSH key is the binary encoding of the SSH public key from draft-ietf-curdle-ssh-ed25519-ed448-08, and rest are the same arguments and payload as an X25519 recipient key.
The public key for a ssh-ed25519 recipient is X25519(tweak, converted key)
On the receiving side, the recipient needs to apply X25519 with both the Ed25519 private scalar SHA-512(private key)[:32] and with tweak.
where tweak is HKDF[SSH key, "age-tool.com ssh-ed25519"]("")
and converted key is the Ed25519 public key converted to the Montgomery curve.
An X25519 recipient line is
-> X25519 encode(X25519(ephemeral secret, basepoint))
encode(encrypt[HKDF[salt, label](X25519(ephemeral secret, public key))](file key))
where ephemeral secret is random(32) and MUST be new for every new file key,
salt is X25519(ephemeral secret, basepoint) || public key,
and label is "age-tool.com X25519".