Reference
Arcane.preferences
App-scoped preference reads and atomic writes.
This focused page is derived from the mechanically checked full member inventory.
Syntax
Arcane.preferences
Member kind
Namespace
Description
App-scoped preference reads and atomic writes.
Overview
Arcane.preferences stores app-scoped user preferences. It supports individual
reads and writes plus an atomic setMany() batch; the batch accepts a plain
object with one through 32 entries and changes nothing when any entry is invalid.
Availability and security
Reads require preferences.read; mutations require preferences.write.
Preferences are for bounded settings, not secrets or large application records.
Synchronous wrapper validation can throw TypeError before setMany() sends an
RPC.
Example
const access = await globalThis.Arcane.capabilities.list();
const canReadPreferences = access.methods.includes('preferences.list');
console.log('Preference inventory admitted:', canReadPreferences);
Members
Arcane.preferences.list()— Lists sorted keys and quota use for the current application's isolated preferences. Requires preferences.read.Arcane.preferences.get()— Reads one preference. A missing key resolves with found:false,value:null. Requires preferences.read.Arcane.preferences.set()— Atomically writes one preference under the 1 MiB total quota. Requires preferences.write.Arcane.preferences.setMany()— Validates the complete bounded batch and writes it atomically; no preference changes when any entry is invalid. Requires preferences.write.Arcane.preferences.delete()— Deletes one preference; an absent key resolves with deleted:false. Requires preferences.write.