Skip to content
Sola AIR v2.0.0 • Ambient Intent Runtime / 37 Components

Your UI shouldn't wait to be asked.

Add a companion panel to an app you already have. Sola Sentinel notices when someone hesitates on a form, and the companion mounts in its own closed Shadow DOM, so your styles and ours stay apart. No rewrite of the host page.

$ npm i @sola-air-ui/core @sola-air-ui/sentinel

Companions are written in .sola and compiled once, with the Vite plugin or the sola compile command. The host page then needs only a bundler import or two script tags. Details

7.8 kB gzipped core runtime Compiles to plain DOM calls sola-air-1.5b on Hugging Face ↗ Styles and DOM isolated in a closed shadow root Used to build postbuild.dev
Sentinel · observing

Watches a form with no per-field wiring

Type into a field, then stop for a moment. The observation and the gate are the real Sentinel from @sola-air-ui/sentinel, watching this form the same way observe() would watch any of yours — no per-field wiring below. The suggestion itself is resolved locally so this page needs no API key.

Suggestion
Nothing yet — the form has not been touched.
Observer buffer flow 99.8
  • · idle

Add it to a page you already have

companion.js typescript
import { observe } from '@sola-air-ui/sentinel';
import { mountShell } from '@sola-air-ui/core';
import Companion from './Companion.sola';
 
// Mount once, in a closed shadow root.
const shell = mountShell(Companion, {}, { id: 'companion' });
 
// Watch a form that is already on the page. No per-field wiring.
observe(document.querySelector('#target-form'), {
onSuggest(prompt) {
// Send the prompt to your endpoint, then show the answer.
console.log(prompt);
}
});
mountShell() • Closed Shadow DOM Overlay

Drop an ambient companion into any existing web app.

You don't have to rewrite your portal to adopt Sola AIR. mountShell() mounts any compiled component inside a closed shadow root, so host CSS can't reach it and its CSS can't leak out. Keep its state in $persist and the same bootstrap rebuilds it on every page of a portal. On the right, it is mounting a real IntentCard next to this page's own markup.

https://ops-portal.internal/incidents/INC-0049218
Host page + #sola-home-companion
Existing Host Document

Operations Queue • Active Incidents

Inspect ticket:

In a multi-page portal, keep the shell's state in $persist and run the same mountShell() bootstrap on every page.

Sola Companion Shell

Ambient Intent Resolution
Suggested Runbook: RB-402 Drain & scale pool
Real Table (page DOM) and IntentCard (shadow root) Open Simulator →

Compiler X-Ray: the source, what the compiler emits, and the result

0 signal writes

This is what a companion is made of: a component compiles to plain DOM updates, with no virtual DOM to diff, so there is little code to add to the page. The whole core runtime is 7.8 kB gzipped.

1. Source ClusterCardDemo.sola
<script>  // The homepage's Compiler X-Ray shows this file and the compiler's real output  // for it, generated at build time. Keep the bindings direct ({rps}, {util}) so  // what the X-Ray shows is a text-node update, not a child re-mount.  let rps = $state(1420);  let util = $derived(Math.min(100, Math.round(rps / 20)));   $on('sola:compiler-rps', (e) => {    if (e && typeof e.rps === 'number') rps = e.rps;  });</script> <div class="cluster-card">  <span class="label">Cluster Throughput</span>  <span class="value">{rps} req/s</span>  <span class="trend">{util}% capacity</span>  <div class="track" aria-hidden="true">    <div class="fill" style="width: {util}%"></div>  </div></div> <style>  .cluster-card {    display: flex;    flex-direction: column;    gap: 6px;    font-family: ui-sans-serif, system-ui, sans-serif;  }  .label {    font-size: 12px;    font-weight: 600;    text-transform: uppercase;    letter-spacing: 0.04em;    color: var(--sola-text-secondary, #475569);  }  .value {    font-size: 28px;    font-weight: 800;    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;    color: var(--sola-text-primary, #0f172a);  }  .trend {    font-size: 12px;    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;    color: var(--sola-text-secondary, #475569);  }  .track {    height: 10px;    margin-top: 6px;    border-radius: 999px;    background: var(--sola-surface-2, #e2e8f0);    overflow: hidden;  }  .fill {    height: 100%;    border-radius: 999px;    background: linear-gradient(90deg, #38bdf8, #2563eb, #9333ea);    transition: width 220ms cubic-bezier(0.16, 1, 0.3, 1);  }</style>
2. Compiler output compiler v1.7.6
  2  import { createSignal, createDerived, createEffect, createIntent, createData, createPersistentSignal, onMount, onDestroy, pushContext, popContext, __flush_mounts, __flush_destroys, __untrack, bus as __solaBus } from '@sola-air-ui/core'; 64  const [rps, set_rps] = createSignal(1420); 65  const util = createDerived(() => Math.min(100, Math.round(rps() / 20))); 89  createEffect(() => { __e4.textContent = String((rps()) ?? ''); }); 98  createEffect(() => { __e7.textContent = String((util()) ?? ''); });109  createEffect(() => { __n10.setAttribute('style', String("width: " + (util()) + "%")); });

The 6 reactive lines of 121. Each createEffect rewrites one text node or attribute when the signals it reads change.

3. Mounted 7.8 kB gzipped core

The slider sends sola:compiler-rps on the event bus; the component's $on handler sets rps.

What's here

Build and try a companion

Lay one out, run the fine-tuned edge model, see it running on a page, and read how it is made.

Sola AIR Chrome extension

A Chrome extension that drops a Sola component into any page you have open, inside a closed Shadow DOM so its styles don't touch the page.

Try in Simulator

Sola Design Studio

Arrange 22 of the 37 @sola-air-ui/ui components on a grid, edit their props, and export the result as a .sola file you can mount as a companion. Arc can draft a layout from one sentence.

Launch Studio

sola-air-1.5b

Model

A 1.5B model on Hugging Face that writes .sola components and runs locally. 986 MB, about 13 seconds per component on a 2 GB GPU, and 17 of 20 benchmark components mount and render (the base model managed 2).

Written in Sola

A three-step tour: a counter, a task list and an incident feed, each shown as its .sola source, the code the compiler writes, and the running result.

Take the tour
$persist • $on • $lastEvent

State that outlives the page. Events that never get dropped.

A drawer or chat panel on a multi-page site loses its state on every full page load. $persist keeps a value in storage and syncs it across tabs. Events go through a separate bus, because a signal ignores a write that equals its current value and an event must not.

BusDemo.sola the file running on the right
<script>
  // $persist is a $state that is kept in sessionStorage and synced across tabs.
  let asks = $persist('home.demo.asks', 0);

  // The latest payload of an event, as a reactive value.
  let last = $lastEvent('sola:ask');

  // Runs on every 'sola:ask', including repeats of the same question.
  $on('sola:ask', () => { asks = asks + 1; });
</script>

<div class="demo">
  <p class="row"><span>Questions asked</span> <strong id="demo-count">{asks}</strong></p>
  <p class="row"><span>Latest question</span> <strong id="demo-last">{last?.text ?? 'nothing yet'}</strong></p>
</div>

<style>
  .demo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; display: grid; gap: 10px; }
  .row { margin: 0; display: flex; justify-content: space-between; gap: 16px; color: #475569; }
  .row strong { color: #0f172a; }
  :global(.dark) .row, :global(.dark) .note { color: #94a3b8; }
  :global(.dark) .row strong, :global(.dark) .pill { color: #f8fafc; }
</style>
  • Emit the same question twice and the count goes up twice. Nothing is deduplicated.
  • Remount the component: the count survives, because it is a $persist, but "latest question" resets, because events are not stored unless you make them sticky.
  • Reload the page, or open it in a second tab: the count is kept for this tab and mirrored to the other.
  • Emitted from this page: 0
$data • Live data

Read live data as a signal.

$data asks the Sola Relay for rows from PostgreSQL, MySQL or a Google Sheet and gives your markup a signal with loading, data and error. The relay runs on your machine or network, so database credentials stay out of the browser.

DataSheetDemo.sola the file running on the right
<script>
  // Rows from a Google Sheet through the Sola Relay, fetched again every 15 seconds.
  // Each row is an object keyed by the sheet's header row.
  let rows = $data("sheet://demo-finance", { refresh: "15s" });
</script>

<div class="panel">
  {#if rows().loading}
    <p class="note">Loading…</p>
  {/if}
  {#if rows().error}
    <p class="error">{rows().error}</p>
  {/if}
  {#if rows().data && rows().data.length}
    <table>
      <thead><tr><th>Month</th><th>MRR</th></tr></thead>
      <tbody>
        {#each rows().data as row}
          <tr><td>{row.month}</td><td>${row.mrr}</td></tr>
        {/each}
      </tbody>
    </table>
    <p class="note">Fetched at {rows().data[0].updatedAt} UTC</p>
  {/if}
  <button id="data-refetch" onclick={() => rows.refetch()}>Fetch again</button>
</div>

<style>
  .panel { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; display: grid; gap: 10px; color: #0f172a; }
  table { width: 100%; border-collapse: collapse; }
  th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
  th { font-weight: 600; color: #475569; }
  .note { margin: 0; font-size: 12px; color: #475569; }
  .error { margin: 0; color: #b91c1c; }
  button { justify-self: start; font: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); background: transparent; color: inherit; cursor: pointer; }
  :global(.dark) .panel { color: #f8fafc; }
  :global(.dark) th, :global(.dark) .note { color: #94a3b8; }
  :global(.dark) .error { color: #f87171; }
</style>

Sample rows from a demo endpoint on this site, fetched with the real $data and refreshed every 15 seconds. In your app the same line reaches your own Sola Relay.

@sola-air-ui/ui • Component library

37 components you can install today.

Buttons, date pickers, tables, gauges and more. Every widget below is a real compiled .sola component mounted directly into the page.

Sola Design System Inspector
Compiled @sola-air-ui/ui Primitives Live .sola DOM
Palette:
⌘K
Save:
⌘S
Signal Resistance Slider 74%
Sola AIR Output
<script>
  import DataCard from '@sola-air-ui/ui/data-card';
  import GaugeCard from '@sola-air-ui/ui/gauge-card';
  import Button from '@sola-air-ui/ui/button';

  let count = $state(12);
  let load = $derived(Math.min(100, count * 6));
</script>

<DataCard title="Signals Emitted" value={String(count)} trend="+8.4%" />
<GaugeCard title="Cluster Load" value={load + '%'} percentage={load} color="sky" />
<Button label="Trigger Signal" variant="primary" onClick={() => count++} />
37 components install from npm. The catalog also lists previews built for this site.
@sola-air-ui/ui • 37 components

Components that fit inside a companion

Cards, dials, gauges and triage tables from @sola-air-ui/ui. They compile to plain DOM calls with scoped styles and no virtual DOM, and they mount inside a shadow-root companion or straight into your own pages. Drag the rotary ring, hover the waterfall bars, or trigger a mitigation playbook.

TactileDialCard.sola Compiled .sola
FlowWaterfall.sola Compiled .sola
IncidentTriageMatrix.sola Compiled .sola