Browser helpers
The SDK ships a small set of browser-oriented exports for applications that run in the browser (web apps, extensions, PWAs). This guide covers what those exports actually are — and, just as important, what they are not.
What the SDK exports for browsers
| Export | Subpath | Purpose |
|---|---|---|
WebSDKService | main | Browser-facing helper service composed by AtomicMemorySDK |
ExtensionSettings schema | /settings | Public schema for webapp-synced capture rules and privacy settings |
DeveloperSettings schema | /settings | Public schema for extension-only debug / testing settings |
isCapturePaused(pausedUntil) | /consent | Pure function: returns true when the given ISO timestamp is in the future |
IndexedDBStorageAdapter | /storage | Browser-native IndexedDB adapter for the storage subsystem |
That's the whole public browser surface.
Settings schemas
ExtensionSettings is the shape of user preferences that are synced from the web app — capture rules, domain allowlists, privacy flags. DeveloperSettings is for extension-only flags that never leave the client. Both are validated with zod schemas exported from the /settings subpath:
import {
ExtensionSettings,
DeveloperSettings,
} from '@atomicmemory/atomicmemory-sdk/settings';
const parsed = ExtensionSettings.parse(rawJson);
Use these schemas at the boundaries where settings enter your app: on load from storage, on receipt from the sync service. Let the schemas be the validation gate; don't reinvent them.
The consent helper
import { isCapturePaused } from '@atomicmemory/atomicmemory-sdk/consent';
if (isCapturePaused(settings.pausedUntil)) {
showPausedUI();
}
Twenty lines, one function. The SDK's capture gate already consults pause state — this helper exists so your UI can reflect it without reimplementing the check.
Chrome extension storage
The SDK does not ship a ChromeStorageAdapter. If you want to back storage with chrome.storage.local, write a custom adapter — see the "Writing a custom adapter" section of Storage adapters. The interface is eight methods and the implementation is straightforward.
What this guide deliberately does not cover
This page describes the SDK's public contract for browser consumers. It does not prescribe:
- How to structure a Chrome extension (offscreen documents, manifest v3, background workers)
- Where to instantiate
AtomicMemorySDKin your extension's architecture - How to route messages between content scripts and background pages
- Consumption patterns specific to any particular product
Those are application-architecture concerns. The SDK gives you the exports; you make the architectural calls that fit your product.
Next
- Storage adapters — the interface you implement for Chrome-extension storage
- Consent and gating — how capture and injection gates consume the settings schemas above