Sync
Opta Accounts sync covers cloud API keys, device identity, session activity, and capability checks used to gate CLI actions.
What Syncs
- API keys - via Accounts API
/api/keys. - Device identity - fingerprint-based registration via
/api/devices/register. - Capability decisions - scoped checks via
/api/capabilities/evaluate. - Session records - upserted in
accounts_sessionsand periodically touched.
Cloud Key Sync
Cloud key commands operate on the authenticated account and support provider filtering, labels, and JSON output for automation.
Device Registration
On login, the CLI computes a deterministic device fingerprint and registers the device. Existing fingerprints are reused to avoid duplicate devices after re-login.
Capability Evaluation
Runtime features can be gated by account policy using /api/capabilities/evaluate. Typical scopes include CLI chat/run permissions and account-tier checks.
If evaluation fails (network or auth), callers should assume deny and surface a recoverable reason.
Session Record Sync
The CLI upserts a cloud session row after login and periodically touches last_seen_at while active. This drives account-side activity and device visibility.