<tr><td>I18n and formats</td><td><code>$langs</code>, <code>$format</code></td><td>Text translation plus preference-driven numbers, currency, units and dates.</td></tr>
<tr><td>DOM and UI runtime</td><td><code>$adom</code>, <code>$prefs</code>, <code>$uix/eidos</code></td><td>DOM writes, global preference attrs and visual theme/mode/density.</td></tr>
The factory naming is the backbone of the framework. If a module owns pure behavior, it has
an <code>Engine</code>. If it owns reactive state for Svelte, it has an <code>Active</code>.
If it must be authoritative on the server, the engine lives in <code>$svrs</code>.
</p>
<table>
<thead>
<tr>
<th>Factory</th>
<th>Use it when</th>
<th>Examples</th>
</tr>
</thead>
<tbody>
<tr><td><code>createEngineXxx()</code></td><td>You need deterministic, non-runes runtime logic.</td><td><code>createEngineHttp</code>, <code>createEngineTimers</code>, <code>createEngineSium</code></td></tr>
<tr><td><code>createActiveXxx()</code></td><td>You need Svelte 5 reactive state and lifecycle.</td><td><code>createActiveStorage</code>, <code>createActiveConnections</code></td></tr>
<tr><td><code>$svrs/createEngineXxx()</code></td><td>The result must be server-authoritative.</td><td><code>createEngineAuth</code>, <code>createEnginePerms</code>, <code>createEngineCache</code></td></tr>
<tr><td><code>App.logger / App.bus / App.timers / App.orca / App.prefs</code></td><td>You need the fixed App core.</td><td>Always present; configured from root options, never declared as services.</td></tr>
<tr><td><code>defineActiveXxx() / defineEngineXxx()</code></td><td>You want App to declare a service in its schema and inject core deps automatically.</td><td><code>defineEngineSium({`{}`})</code>, <code>defineActiveAuth({`{...}`})</code></td></tr>
</tbody>
</table>
<h2>App composition</h2>
<p>
<code>createActiveApp()</code> gives the browser/client side a stable surface. The fixed
core is always present: <code>Logger</code>, <code>Bus</code>, <code>Timers</code>,
<code>Orca</code> and <code>Prefs</code>. Feature modules are declared explicitly in
<code>services</code>, so pages only pay for what the app composes.
<tr><td>Translate labels, messages or fallbacks.</td><td><code>$langs</code></td><td><code>$format</code> or ad-hoc dictionaries.</td></tr>
<tr><td>Format numbers, dates, currency or units.</td><td><code>$format</code></td><td><code>$langs</code>.</td></tr>
<tr><td>Persist non-secret preferences or drafts.</td><td><code>$storage</code></td><td><code>$session</code>, localStorage calls spread through pages.</td></tr>
<tr><td>Prove identity or run login/recovery flows.</td><td><code>$svrs/auth</code> plus <code>$auth</code></td><td><code>perm</code> or client-only checks.</td></tr>
<tr><td>Decide if an actor can do something.</td><td><code>$svrs/perm</code> plus <code>$perm</code></td><td><code>auth</code>, roles hard-coded in UI.</td></tr>
<tr><td>Cache data with scopes and invalidation.</td><td><code>$svrs/cache</code> or <code>$cache</code></td><td><code>$storage</code> as a query cache.</td></tr>
<tr><td>Schedule retries, refreshes or timeouts.</td><td><code>timer</code></td><td>raw <code>setTimeout</code> scattered across modules.</td></tr>
<tr><td>Open realtime sockets and channels.</td><td><code>$connection</code></td><td>custom WebSocket state in components.</td></tr>
<tr><td>Validate forms and generate issues.</td><td><code>sium</code></td><td><code>perm</code> or manual string errors.</td></tr>
</tbody>
</table>
<h2>Integration rules</h2>
<ul>
<li>Every public string used for logs, events, methods, categories or protocol names belongs in constants.</li>
<li>Modules receive the shared <code>Logger</code> contract; they do not invent local logger interfaces.</li>
<li>Diagnostics are allowed as a catalog layer, but they emit through <code>Logger</code>.</li>
<li>Server engines never trust actor, permission or private scope values sent by the browser.</li>
<li>Active clients can cache for UX, but protected data and mutations must be checked server-side.</li>
<li>Auto/manual preferences behave consistently: auto follows source changes; manual stays fixed until <code>clearX()</code>.</li>
<li><code>dispose()</code> must be real, idempotent and should reject future work where the module owns resources.</li>
</ul>
<Calloutvariant="tip"title="Working with AI agents">
<p>
If an AI is going to modify Active, send it first to
<ahref="/active/get-started/ai-agents">AI Agents</a>. That page defines the operating
The ecosystem needs three levels of tests. A module can be correct in isolation and still
fail when identity, permissions, cache and realtime state interact.
</p>
<table>
<thead>
<tr>
<th>Level</th>
<th>Targets</th>
<th>What it proves</th>
</tr>
</thead>
<tbody>
<tr><td>Unit</td><td><code>src/arts/*/test</code>, <code>src/libs/*/test</code>, <code>src/svrs/*/test</code></td><td>Each artifact obeys its own contract.</td></tr>
<tr><td>Scenario</td><td><code>/test/ecosystem</code></td><td>A realistic app story with auth, session, perm, cache, http, sium, connection and UI state together.</td></tr>