ByteSync
ByteSync copied to clipboard
[feature] Add automatic session invitations and prechecks
Parent epic: #300
Summary
Add automatic session invitation dispatch and target-side eligibility precheck.
Scope
- Send automatic invitations to resolved target instances.
- Include session ID, creator identity, target identity, creator public key info, protocol version, and purpose.
- Reject invitations on the target when creator trust, grant, key fingerprint, protocol, or challenge checks fail.
- Do not send session password or AES key in clear text.
Acceptance criteria
- [ ] Automatic invitations can be dispatched to target client instances.
- [ ] Target-side prechecks reject invalid or unauthorized invitations before joining.
- [ ] Rejection reasons are returned or logged in a structured way.
- [ ] Existing password exchange and AES key exchange remain unchanged after eligibility succeeds.
- [ ] Unit tests cover accepted invitation, untrusted creator, wrong target, key mismatch, and incompatible protocol.