On this page
Choose a capability
| I need to… | Use | Where |
|---|---|---|
| Scaffold, test, package, bundle, build, verify, or run an app | Node SDK API or arcane CLI | Node; explicit native provider for native targets |
| Publish central events, review bounded history, or observe DOM behavior | EventManager and arcane-event-stack/1 | Node and browser; DOM capture requires a compatible DOM |
| Build application behavior or UI | runtime modules, entities, and components | Browser and native WebViews; module-specific dependencies apply |
| Read platform state or use native OS capabilities | globalThis.Arcane | Cross-host when the method is implemented and admitted |
| Use normalized application AI | AI.js and globalThis.Arcane.ai; see Arcane.ai.chat() | Renderer runtime, native local AI, or explicitly selected cloud provider |
| Run a caller-authenticated local LLM in the browser | arcane-os/ai/browser-wasm | Browser only; secure context, WebAssembly, verified DBOPFS model bytes, WebGPU, and proved full offload; no CPU fallback |
| Run caller-authenticated Whisper or Kokoro in the browser | arcane-os/ai/browser-speech | Browser only; DBOPFS, Web Locks, Workers, and caller-owned immutable runtime/model artifacts |
| Use provider-specific Ollama fields or admitted operations | Ollama provider API (advanced) | Native Core; method and application policy may narrow Android access |
| Observe host, operation, stream, terminal, or appearance events | Arcane.events | Event-specific host matrix |
Normalized AI first
Ordinary applications start with AI.js or globalThis.Arcane.ai. The renderer module owns chat, streaming, speech, tools, structured output, and the ai-ready lifecycle. The Core namespace provides provider-neutral Arcane.ai.chat() and profile calls behind capability and provider admission.
AIProviderRuntime.js and AIRuntimeState.js normalize independent LLM, STT, and TTS lifecycle and status without selecting a fallback. ConfiguredAIChatSession.js adds bounded conversation history and defaults to Arcane.ai.chat().
For an explicit caller-authenticated browser-local text model, use arcane-os/ai/browser-wasm. It packages the Wllama engine—not model weights or speech—and never executes returned tools. For caller-owned Whisper or Kokoro, use the separate arcane-os/ai/browser-speech provider package; it ships no adapter runtime or model bytes.
Use direct Ollama APIs only when provider-native results or an explicitly admitted provider operation is intentional; renderers never connect directly to port 11434.
Choose the normalized AI surface → · Browser-WASM local AI → · Browser speech →
Complete public surfaces
Package API
200 semantic API records across 14 JavaScript package entrypoints, plus eight versioned schemas and manifest exports. The browser-WASM and browser-speech entrypoints are browser-only; seven update-check records remain explicit and on demand.
Browser runtime
86 module-directory artifacts, 15 entity modules with 35 exports, and 39 HTML components.
Arcane Core
113 callable methods, 35 namespaces, one error constructor, one value, and 14 renderer-visible events. The callables comprise 106 RPC authorities, five renderer-local helpers, and two aliases.
Normalized AI
One application-facing decision path across the AI.js renderer lifecycle, provider-neutral LLM/STT/TTS runtime and state, Arcane.ai, bounded persistent sessions, explicit document context, and caller-owned browser-WASM text or browser speech providers.
Normalized AI guide → · Browser-WASM AI → · Browser speech → · Advanced Ollama →
Every SDK and Core key has one MDN-style focused entry with an overview, operating contract, availability or platform boundary, and safe example. Automated parity tests reject undocumented additions and stale entries.
Every runtime module
Search the entire shipped module directory here, or open the full module index. Each result leads to a first-party page with exact load form, bindings, callable signatures and parameters, lifecycle, literal public events and coded failures, availability, normalization, a copyable contract example, and related Arcane surfaces.
No runtime module matches those filters.
AI.jsOwns provider-selectable chat and the one-time caller-authority browser STT/TTS configuration, lifecycle, synthesis, transcription, and playback boundary.
esm · Browser + native bridge + TWiN Cloud
AIPreferenceRuntime.jsApplies and reads non-persistent per-user AI preference overrides.
esm · Cross-host
AIPreferenceTuple.jsNormalizes and compares the six provider/model preference slots.
esm · Cross-host
AIProviderRuntime.jsProvider-neutral selection, lifecycle, routing, startup, request, streaming, cancellation, and independent LLM/STT/TTS state.
esm · Cross-host in-process runtime; registered providers remain browser, native, or cloud specific
AIResponseURLPolicy.jsExtracts and audits links from AI Markdown, rendered HTML, CSS, srcset, bare URLs, and email text.
esm · Cross-host
AIRuntimeState.jsSticky mutable LLM, speech-to-text, and text-to-speech lifecycle snapshots, intents, subscriptions, and startup-settlement barriers.
esm · Cross-host in-process state contract; actual role readiness remains provider specific
AnsiText.jsParses terminal ANSI sequences into display spans or strips them to plain text.
esm · Cross-host
ApiModelDatabase.jsFetches an injectable HTTP JSON model with parser, cache, redacted public endpoint records, and request lifecycle events.
esm · Browser / native WebView / server with fetch
AppDataScope.jsReconciles declared and native application identity and scopes OPFS/localStorage ownership fail-closed.
esm · Browser / native WebView hybrid
AppearancePreferences.jsDefines, stores, and applies color scheme, density, reduced motion, and large-text preferences.
esm · Browser / native WebView hybrid
ArcaneCommunicationBridge.jsMaps provider HTTP threads/messages/connect/disconnect endpoints to normalized communication entities.
esm · Browser / native WebView / server with fetch
ArcaneNavigationPolicy.jsCreates an HTTP(S) navigation guard with explicit secure-mode domain and CIDR policy decisions.
esm · Cross-host
ArcaneNetworkPolicy.jsValidates the Arcane domain/network deny policy and matches domain, IPv4/IPv6 CIDR, protocol, and port rules.
esm · Cross-host
AsyncBoundary.jsRuns one asynchronous operation with timeout, abort, result validation, and stable boundary errors.
esm · Cross-host
BrowserTestSuite.jsRuns a complete sequential browser test list with explicit cancellation and full-detail lifecycle events.
esm · Browser / standard Web APIs
CalculatorEngine.jsEvaluates complete arithmetic expressions, powers, constants, and common functions without `eval`.
esm · Cross-host
ChartLibrary.jsLoads the bundled uPlot classic script once and returns its global constructor.
esm · Browser / native WebView
ChatRecords.jsDetects conversation entries and projects retained state into provider-safe recurring chat context.
esm · Cross-host
CommunicationAppController.jsBinds shared inbox, conversation, settings, theme, and provider workflows into one UI controller.
esm · Browser / native WebView hybrid
CommunicationHub.jsFans out provider refresh/send operations and aggregates normalized threads/messages.
esm · Cross-host with injected providers
CommunicationPreferences.jsStores app-scoped, non-secret communication provider preferences.
esm · Browser / native WebView hybrid
CommunicationProviderRegistry.jsRegisters and queries validated provider definitions, channels, and required methods.
esm · Cross-host
ComponentContracts.jsOwns normalized configuration/value contracts and shared explicit STT activation behavior for chart, dashboard, Markdown, and voice components.
esm · Cross-host with an injected event constructor outside DOM hosts
ConfiguredAIChatSession.jsOwns complete ordinary visible recurring AI turns, one active structural continuation, context construction, provider response preservation, and atomic history commit.
esm · Native bridge by default; cross-host with injected chat
ConversationActionItems.jsNormalizes, creates, updates, remembers, selects, and formats complete conversation action items.
esm · Cross-host
ConversationClosingReport.jsDefines the closing-report tool, instruction, result normalizer, call classifier, and formatter.
esm · Cross-host
ConversationTimebox.jsOwns conversation limits, control messages, submission barriers, elapsed formatting, and delivery proof.
esm · Cross-host
CoreLocalModelCatalog.jsProjects Core local-AI status into UI-safe admitted model and speech availability catalogs.
esm · Cross-host
DataMaintenance.jsDeletes empty chats and associated/empty memory records inside the current app data scope.
esm · Browser / native WebView
DBLS.jsProvides app-scoped localStorage tables, batch reads/writes, filtering, deletion, and counts.
esm · Browser / native WebView
DBOPFS.jsProvides app-scoped OPFS tables, worker I/O, backup/restore, compression, and CRUD/batch APIs.
esm · Browser / native WebView
DBOPFSDocumentLibrary.jsApplication-defined complete document corpus bootstrap, caller-source evaluation, atomic DBOPFS generations, lexical search, and request-context construction.
esm · Browser or compatible host with an existing DBOPFS-style database adapter
DBOPFSWorker.jsSerializes OPFS sync-handle read/write requests from a MessagePort.
worker · Dedicated worker
DevelopmentWorkspace.jsProvides complete workspace inspection, context, setup task, and Node installer clients without arbitrary command execution.
esm · Native bridge
DirectoryPicker.jsWraps the provider-owned native directory chooser and normalizes selected/cancelled/error results.
esm · Native bridge
DocumentLexicalSearch.jsDependency-free deterministic document indexing, complete ranked metadata/body search, complete excerpts, and stable tie-breaking.
esm · Cross-host in-process only
DocumentNavigation.jsBinds document navigation, filtering, history, current-item reveal, and load initialization.
esm · Browser / native WebView
Errors.jsNormalizes global errors/rejections, assigns occurrence identifiers, persists a ledger, and performs bounded delivery.
esm · Browser / native WebView hybrid
GifEncoder.jsEncodes indexed frames into a bounded animated GIF using palette mapping and LZW.
esm · Cross-host
HTMLImport.jsDefines the same-origin `<html-import>` loader with open shadow root, inline script execution, and readiness/error events.
esm · Browser / native WebView
InMemoryCommunicationProvider.jsImplements deterministic in-memory thread/message/send behavior for demos and tests.
esm · Cross-host
IsolatedModelQuestionRunner.jsInspects one exact model and runs one isolated question while preserving complete results.
esm · Native bridge or injected provider
LocalAIReadiness.jsDerives selected AI requirements and returns a complete readiness/recovery report across browser, desktop, and Android modes.
esm · Browser/native hybrid
LocalAIReadinessController.jsCoordinates local-AI status component checks, ensured recovery, availability projection, and teardown.
esm · Browser/native hybrid
Mail.jsBuilds complete reports and prefers the native mail capability with an explicit HTTP transport fallback.
esm · Browser/native hybrid + cloud
MailOutbox.mjsPersists complete mail reports before delivery and normalizes idempotent enqueue, retry, reconciliation, and invalid-record maintenance.
esm · Browser/native WebView or compatible injected host with durable storage, Web Locks, and a delivery function
MailTransport.mjsSends one complete mail report to a normalized HTTP(S) endpoint with timeout and complete response handling.
esm · Browser/server with fetch + cloud
MarkdownSpeech.jsRe-exports the shared MarkdownSpeech class that removes repeated same formatting marks from streamed narration before speech segmentation.
esm · Cross-host
Marked.min.jsVendored Marked 18.0.5 Markdown lexer, parser, renderer, extension, and walk-token API.
esm · Cross-host vendor module
MD.jsRenders complete Markdown with Marked and exposes the complete rendered markup.
esm · Browser / native WebView
MemoryRecords.jsNormalizes memory content and detects meaningful stored memory.
esm · Cross-host
MessageAdvisory.jsNormalizes message content advisories and contains per-message inspection failures.
esm · Cross-host
ModelDefinition.jsParses the deterministic packaged Modelfile subset and extracts the SYSTEM prompt.
esm · Cross-host
Ollama.jsProvides the first-class Arcane Ollama client without direct access to localhost:11434.
esm · Native bridge
OllamaModelIdentifier.jsValidates and canonicalizes the syntax of Ollama model identifiers without granting model admission.
esm · Cross-host
OllamaSettings.jsDefines bounded runtime/service preference schemas and deterministic Arcane brain alias names.
esm · Cross-host
OpenMeteoWeatherProvider.jsSearches and loads Open-Meteo data into complete mutable Arcane weather entities.
esm · Browser / native WebView / server with fetch + cloud
PersistentAIChatSession.jsComposes complete configured chat with an existing ChatEntity so each user, assistant, and structural tool turn has an explicit persistence and transport policy.
esm · Browser or native WebView with the projected ChatEntity, DBOPFS, and a configured chat function or normalized Arcane.ai surface
PreferenceStore.jsLoads and updates schema-defined app preferences through native storage with a narrow browser fallback.
esm · Browser/native hybrid
PreparedSpeech.jsOwns detached ordered speech preparation, complete semantic audio reuse, and per-caller cancellation behind AI.prepareTTS.
esm · Browser or native WebView with Blob, AbortController, an injected synthesis callback, and optional ready DBOPFS
QRCode.min.jsVendored QRCode generator for DOM, canvas, SVG, and image output.
classic-script · Browser vendor script
Questionnaire.jsEvaluates whether a one-time questionnaire prompt is due without performing the prompt.
esm · Cross-host
RecordLinkIndex.jsParses record links and builds their normalized index.
esm · Cross-host
RecordPassageIndex.jsIndexes text lines, page markers, dates, rules, and excerpts for record review.
esm · Cross-host
RecordReviewStore.jsStores normalized record-review decisions through native storage or app-scoped local fallback.
esm · Browser/native hybrid
RiskSignalAnalyzer.jsMatches configured risk signals and levels against complete text.
esm · Cross-host
ScamRiskPolicy.jsCombines deterministic scam signals with optional Arcane blocked-domain evidence and safety guidance.
esm · Cross-host
ScopedOPFSCache.jsProvides a narrow exact-key JSON cache inside one app-owned OPFS namespace.
esm · Browser / native WebView
ScreenCapture.jsCaptures a display surface as image, video, or GIF with explicit lifecycle events.
esm · Browser / native WebView
SpeechPlayback.jsPreserves exact nonblank stored segment text; removes repeated formatting marks from only each outbound synthesis copy; eagerly submits complete parts to a capacity-advertising fetchTTS provider while keeping playback indexed; and retains serialized one-segment lookahead for other clients.
esm · Browser + compatible AI/native bridge
StaticDocumentCatalog.jsLoads a positive static document inventory with complete cache, search, hydration, and context content.
esm · Browser / native WebView / server with fetch
SystemAppearance.jsReads or applies native appearance, returning an explicit unsupported browser state when no bridge exists.
esm · Browser/native hybrid
SystemPlatformPresentation.jsMaps kernel names to presentation labels/classes without granting platform authority.
classic-script · Browser / native WebView classic script
SystemToolRegistry.jsRegisters validated command builders and constructs command strings without executing them.
esm · Cross-host
TerminalClient.jsMaps native terminal sessions and Arcane events into an EventTarget client.
esm · Native bridge
TerminalCommandRegistry.jsRoutes parsed command lines to injected handlers and provides definitions/completions.
esm · Cross-host
ThemeBootstrap.jsPerforms import-time Arcane theme loading and subscribes to native appearance changes.
esm · Browser/native hybrid
ThemeManager.jsLoads, applies, previews, saves, resets, and synchronizes semantic Arcane themes.
esm · Browser/native hybrid
TimeGuard.jsPersists and evaluates clock rollback and grace-period state.
esm · Browser / native WebView
ToolCallRouter.jsParses OpenAI-style tool calls and dispatches complete or streamed calls to injected handlers.
esm · Cross-host
uPlot.iife.min.jsVendored uPlot chart constructor and rendering runtime.
classic-script · Browser vendor script
uPlot.LICENSE.txtLicense companion for the bundled uPlot vendor runtime.
license · Documentation asset
uPlot.min.cssBundled uPlot presentation stylesheet.
stylesheet · Browser stylesheet
WaitForComponent.jsWaits for a component property, method, or readiness event with optional error event and bounded timeout.
esm · Cross-host EventTarget / browser component
YouTubeMedia.jsParses YouTube video/playlist locators and constructs ordinary embed URLs with opt-in privacy enhancement.
esm · Cross-host
Native, browser, cloud, and cross-host
| Label | Meaning | Normalization |
|---|---|---|
| Node | SDK control plane; not importable by a renderer. | SDK errors, CLI events, target descriptors, and receipt lifecycles are versioned. |
| Browser | Uses standard browser APIs; some surfaces also run unchanged in native WebViews. | The module or entity owns its local result contract. |
| Native | Requires an admitted Arcane method or explicit native target provider. | Bridge calls and errors are common; platform evidence can remain host-specific. |
| Cloud | Uses an explicitly configured remote provider over allowed HTTPS. | High-level AI helpers normalize selected results; no implicit cloud fallback occurs. |
| Cross-host | One application API over WebView2, WebKitGTK, Android WebView, or development HTTP. | Exact method contracts are normalized where declared; availability and authority are still checked per host. |
| Provider-native | Arcane admits and bounds the call but preserves optional provider result fields. | Use the documented helper when a smaller normalized result is required. |
The current native matrix is Microsoft NT, Linux, and Android where listed. This SDK version exposes no macOS native target or Core-host contract; browser-only behavior on macOS does not become a native Arcane capability.
CLI commands
| Group | Commands |
|---|---|
| Workspace | new, init, doctor |
| Develop and validate | dev, test, check |
| Browser release | package, verify, bundle, verify-bundle |
| Native | native-doctor, native-prepare, build, run, targets |
| Repository | repo status, repo pull, repo push |
Every command supports --output human|json|ndjson. Machine modes preserve ordered acceptance, progress, terminal result, cancellation, and nonzero failure behavior.
Behavioral and completeness testing
The reference is executable policy, not a hand-maintained symbol list. The suite compares package exports, runtime files and module/entity bindings, Core tables, and focused guides in both directions; it also verifies every component file, its parsed inline scripts, and required catalog metadata. EventManager tests cover pub/sub, immutable history, strict stacks, overflow, playback, cancellation, and DOM privacy. Optional secure:true browser-WASM hardening can add real installed-tarball Chrome proof for strict model hashing, DBOPFS admission, inference, cancellation, unload, and offline reuse; it is not an ordinary publication gate.
node ./bin/arcane-test.mjs test/reference-completeness.test.mjs
node ./bin/arcane-test.mjs test/runtime-api-behavior.test.mjs
npm run check
Protocol and host details
Application code normally calls one normalized API and lets Arcane choose the admitted host path. Expand these notes only when implementing a host, diagnosing a boundary, or reviewing security and cancellation.
How one Arcane call crosses different hosts
The renderer selects WebView2, WebKitGTK, Android WebView, development HTTP, or standalone transport in that order. Native and development hosts carry the same arcane/1 request identity and Core method semantics where the method exists. A standalone browser exposes no native authority.
Core framing, events, cancellation, and kernel boundaries
Desktop Core uses length-framed JSON RPC over host-private process channels. The development host projects calls through loopback HTTP and events through SSE. Windows and Linux hosts bind different native and kernel evidence beneath the common method policy; Android exposes a deliberately narrower generated projection. Cancellation is cooperative and method-specific, so renderer timeout does not imply rollback of a native mutation.
Central EventManager and time-travel stacks
arcane-os/event-manager is synchronous host-neutral JavaScript. Live listeners receive original arguments; optional history stores bounded, redacted, deeply frozen arcane-event-stack/1 snapshots. That format is local diagnostic data, not Core arcane/1 RPC. Review playback is safe by default; original-event replay is explicit and does not reproduce host or DOM side effects.
Normalized AI versus advanced provider APIs
Applications do not call 127.0.0.1:11434. Start with AI.js or Arcane.ai. Core binds app identity, capabilities, package-owned model policy, native admission, limits, streaming, and errors before using fixed loopback provider routes. Direct Arcane.ollama success envelopes remain provider-native. OpenAI is explicit configuration, never an automatic fallback from local failure.