1# Vault Adoption Drafts23Draft-only browser implementation plan for `/Users/june/Downloads/peach-vault-adoption-brief.md`.45Nothing in this folder is active code. `src/drafts/**` is excluded from both6`tsconfig.json` and `vitest.config.ts`, so these files are inert until an7integration pass copies the destination-form code/tests into real source.89Drafted against current dev state, not the brief's older base:10- Browser is already v4.0.13, not v4.0.3.11- `PAIR_IDENTITY` already carries optional `vault_id` and Pro `license`.12- Sync is already ungated for non-Pro pairing attempts.13- Settings already exposes phone/tablet and desktop pairing options directly.1415## Files1617| Draft file | Purpose |18|---|---|19| `vault-createVaultFromRootKey.ts` | Phase 1 destination-form vault code for adopting an existing root key. |20| `vault-createVaultFromRootKey.test.ts` | T-A01 through T-A05. |21| `messages-CREATE_VAULT_FROM_ROOT_KEY.ts` | Phase 2 message type and handler draft. |22| `messages-CREATE_VAULT_FROM_ROOT_KEY.test.ts` | T-A06 through T-A09. |23| `chirp-adopt.ts` | Phase 3 adoption sub-protocol module. |24| `chirp-adopt.test.ts` | T-A10 through T-A15. |25| `AdoptionConsentModal.tsx` | Phase 4 source-device consent modal. |26| `AdoptionConsentModal.test.tsx` | T-A16 through T-A20. |27| `onboarding-adopt-path.tsx` | Phase 5 receiver onboarding path and `AdoptVaultView` sketch. |28| `onboarding-adopt-path.test.tsx` | T-A21 through T-A25. |29| `chirp-pair-adopt-source.ts` | Phase 6 source-side `ADOPT_REQUEST` routing. |30| `chirp-pair-adopt-source.test.ts` | T-A26 through T-A29. |31| `INTEGRATION-CONTRACT.md` | Source of truth for the later integration pass. |3233## Security Notes3435- `root_key_hex` is a crown-jewel secret. It is validated before use, copied36 only into wrapped vault storage and the in-memory unlocked-session key, and37 zeroed as bytes after creation.38- `ADOPT_GRANT` is sent only after the regular SAS gate and the source-side39 master-password re-auth gate both pass.40- The receiver creates a local password before chirp/SAS, so the source root41 key is not held while prompting for a password.42- Source persistence is two-phase: do not save the receiver as paired until43 `ADOPT_IDENTITY` arrives after the receiver has successfully created the44 adopted vault.45