Capability first · transport second

CommunicationPreferences.js

Stores app-scoped, non-secret communication provider preferences.

SDK 0.5.18Runtime 0.8.12Protocol arcane/1
On this page

Overview

Stores app-scoped, non-secret communication provider preferences.

  • Artifact
    CommunicationPreferences.js · esm
  • Classification
    public first party
  • Availability
    Browser / native WebView hybrid
  • Normalization
    Normalized preference record; storage failures mixed.

Import and lifecycle

JavaScript
import communicationPreferences from '/arcane/modules/CommunicationPreferences.js';

load reads and save writes one non-secret preference record through Arcane.preferences when available, otherwise app-scoped localStorage.

Application-facing behavior: default CommunicationPreferences; load(), save().

Protocol and host implementation

Arcane.preferences or localStorage This detail does not widen the application-facing API or grant authority.

Exports, signatures, parameters, and results

BindingFormDeclaration or signatureParameter syntax
defaultdefault · classclass CommunicationPreferences
CallableKindExact public signatureParameter syntax
CommunicationPreferences.loadpublic-memberasync load(defaults={})defaults={}
CommunicationPreferences.savepublic-memberasync save(values={})values={}
MemberKindExact public declarationParameter syntax
CommunicationPreferences.constructorconstructorconstructor(namespace='communications')namespace='communications'
CommunicationPreferences.loadasync methodasync load(defaults={})defaults={}
CommunicationPreferences.saveasync methodasync save(values={})values={}

Parameter meanings and results

CommunicationPreferences(namespace) derives arcane.communications.<namespace>. load(defaults) merges a stored object over defaults, while save(values) returns a normalized provider map with enabled, endpoint, accountLabel, and status.

Events, side effects, and errors

Source-literal CustomEvent dispatches

No source-literal CustomEvent dispatch is part of this artifact.

Lifecycle and event flow

This artifact has no additional documented lifecycle event flow.

Direct coded failures

This artifact directly assigns no stable coded failure.

Exported Error subclasses

This artifact exports no Error subclass.

Documented failure behavior

  • native preference, app-scope, localStorage, and JSON failures propagate

Availability and capabilities

Browser / native WebView hybrid. Normalized preference record; storage failures mixed.

Normalizes native preference storage and browser fallback; it does not store provider credentials or call Core communications.

Contract example

JavaScript
import CommunicationPreferences from '/arcane/modules/CommunicationPreferences.js';

const preferences=new CommunicationPreferences('inbox');
const saved=await preferences.save({
    demo:{
        enabled:true,
        endpoint:'https://bridge.test',
        accountLabel:'Work',
        status:'Connected'
    }
});
console.log(saved.demo);