Store tokens in the setup_tokens table with token_hash, issued_at, expires_at, consumed_at, and issued_by.
Enforce at most one active token via a partial unique index on rows where consumed_at IS NULL.
ConfigService will:
Generate tokens using cryptographically secure randomness.
Persist only a hashed representation (argon2id) along with metadata.
Emit history entries and NOTIFY events on token creation/consumption.
The CLI/API surfaces token issuance and completion flows; the process prints the token to stdout only at generation time.
During completion, the caller must supply the encryption materials (passphrase or reference to pgcrypto role). The handler verifies secrets are persisted before flipping app_profile.mode to active.