Ambient · Intent · Runtime
Compile .sola components to plain DOM code. With $intent, a component can offer a suggestion before the user asks.
# Install everything at once
npm install sola-air
# Or install individual packages
npm install @sola-air-ui/core @sola-air-ui/compiler @sola-air-ui/vite-plugin-solaSola AIR is a compiler-first JavaScript framework. AI suggestions are a reactive value, like any other piece of state. Write .sola files with familiar syntax, and the compiler turns them into plain DOM instructions. There is no virtual DOM and no framework runtime beyond the small core.
<script>
let count = $state(0);
let doubled = $derived(count * 2);
let dashboard = $intent("Show MRR trend for Q3");
let customerData = $data("postgres-primary:customers", { refresh: "30s" });
</script>
<div>
<h1>Count: {count}</h1>
<p>Doubled: {doubled}</p>
<input bind:value={count} />
{#if count > 10}
<p>High engagement detected.</p>
{/if}
</div>
<style>
h1 { color: #0ea5e9; font-weight: 800; }
</style>The compiler transforms this into a self-contained ES module with:
- Signals-based reactivity — Fine-grained DOM updates, zero diffing
- Scoped styles — Auto-hashed CSS selectors per component
- Native AI resolution —
$intentresolves structured data from any LLM provider - Local data relay —
$datareads from PostgreSQL, MySQL or a Google Sheet through the Sola Relay, which runs on your machine or network, so database credentials stay out of the browser
| Feature | Sola AIR | React | Svelte | Vue |
|---|---|---|---|---|
| Virtual DOM Overhead | None (Direct DOM) | Yes | No | Yes |
| Built-in AI Intent Primitive | $intent |
❌ | ❌ | ❌ |
| Secure On-Prem Data Signals | $data (Sola Relay) |
❌ | ❌ | ❌ |
| Scoped Styles | Native AST | CSS Modules | Native | Scoped |
| Compiler Architecture | Acorn AST Transformer | Babel / SWC | Custom | Template |
The core runtime is about 7.8 kB gzipped. scripts/core-size.mjs measures it, and a test checks that AGENTS.md states the same number.
$state(initial)— Fine-grained reactive signal$derived(expr)— Computed values with automatic dependency tracking (a() => exprfunction also works)$effect(() => fn)— Side effects with automatic cleanup$intent(prompt, options)— Signal that asks an LLM provider for structured UI and data. Options:debounceMs(wait for the prompt to settle),trigger: 'manual'with.run(input)(ask only when told to),transport(your own fetch-compatible function)$data(source, options)— Signal of{ loading, data, error }fed by the Sola Relay$persist(key, initial, options)— Like$state, but kept in storage and synced across tabs, so it survives page loads$on(type, fn)— Run a function for every event of a type on the bus; unsubscribes when the component is destroyed$lastEvent(type)— The latest payload of an event type, as a reactive value
mountShell(component, props, { id, shadow, css }) mounts a compiled component into a host element on document.body, inside a closed Shadow DOM by default, so host-page CSS cannot leak in or out. Pair it with $persist and the same bootstrap on every page rebuilds the shell in the state the user left it.
createBus / configureBus carry events between components, the page and other tabs. Events are not state: a repeated payload is still delivered. Types that cross the page boundary need an explicit allowlist and a validator. See the docs for the full configuration.
- VS Code:
SolaAIR.sola-vscodeadds.solasyntax highlighting, snippets and bracket pairing (source inpackages/vscode-extension). - Chrome extension: pick elements on any page and get matching Sola component code in a side panel (source in
packages/sola-extension). - Claude skill (and Gemini context): teaches an assistant the syntax and the real component props, and renders a
.soladesign to one self-contained HTML file. Install from Rbm3267/sola-ui-skill:claude plugin marketplace add Rbm3267/sola-ui-skillthenclaude plugin install sola-ui@sola-air(Claude Code). For Claude.ai, zipskills/sola-uifrom that repo and upload it with code execution on. The source isskills/sola, generated bynode scripts/build-skill.mjs; thePublish skill repoworkflow keeps the standalone repo in sync.
SolaSentinel observes real user behavior — clicks, field focus, revisits, typed content — and turns it into two things: a real computed friction score (flowIndex), and, paired with $intent, proactive next-step suggestions.
import { createSentinel } from '@sola-air-ui/core';
const sentinel = createSentinel('checkout-form');
sentinel.onFriction((event) => console.log(event.message)); // e.g. rage-click bursts
field.onfocus = () => sentinel.recordFieldFocus('short_description');
field.onblur = () => sentinel.recordFieldBlur('short_description', field.value);
// The poll decides *when* the observed behavior is worth interrupting the user
// for. trigger: 'manual' keeps createIntent from asking on its own; run() asks.
const suggestion = createIntent('', { trigger: 'manual' });
setInterval(() => {
if (sentinel.checkSignificance()) suggestion.run(sentinel.buildPrompt());
}, 400);Render the result with <AmbientSuggestion suggestion={suggestion} /> (@sola-air-ui/ui/ambient-suggestion) — a small, dismissible, non-blocking suggestion that renders model output as text, never innerHTML. A full working example — real Gemini call, real browser-verified, no mocked data — lives in examples/ambient-poc.
flowIndex (0–100) is computed from actual signal density: recent friction events weighted by severity and recency, how often the user backtracks between fields, and how erratic their pacing is — not a fixed decrement per event.
sola-air/
├── packages/
│ ├── compiler/ # Custom Acorn AST compiler (.sola -> JS + CSS)
│ ├── core/ # Reactive runtime engine (signals, effects, $intent, $data)
│ ├── ui/ # Standard component library (.sola files)
│ ├── relay/ # Local data proxy (PostgreSQL, MySQL, Google Sheets)
│ ├── providers/ # Server-side LLM adapters for $intent
│ ├── sentinel/ # Form-hesitation observer that builds a prompt
│ ├── behavior/ # Behavior and playbook helpers
│ ├── tokens/ # Design tokens (CSS variables)
│ ├── sola-mcp/ # MCP server for AI-driven component generation
│ ├── sola-air/ # Meta-package (installs the full Sola AIR stack)
│ ├── vite-plugin-sola/ # Vite plugin for .sola SFC compilation
│ ├── create-sola/ # Project scaffolding CLI
│ ├── vscode-extension/ # VS Code language support for .sola
│ └── sola-extension/ # Chrome extension (side panel code generator)
├── skills/
│ └── sola/ # Claude and Gemini skill (generated; published as Rbm3267/sola-ui-skill)
├── examples/
│ └── ambient-poc/ # Standalone Sola Sentinel + $intent ambient-suggestion demo
├── scripts/ # Release, skill-generation and size-check scripts
├── e2e/ # Playwright browser tests
├── brand/ # Official brand kit, logos, and favicons
└── app/ # Marketing site & interactive playground
- Workflow: Build frontends using
.solafiles. Use$stateand$derivedfor local state, and$intentto bind AI capability. - Data Binding:
$data('connection:table')names a connection configured in the relay and a table in it, for example$data('postgres-primary:customers'). The component never sees a connection string. - Credentials: Never put credentials in component code. They belong in the relay's config on the machine that runs it.
- Deployment: Run the Sola Relay on your machine or a server close to the databases.
npm install -g @sola-air-ui/relay sola-relay --port 4040
- Connections: The relay reads
sola-relay.jsonfrom the directory it starts in. Each entry underconnectionshas a name and atype(postgres,mysqlorsheet) plus its connection settings. - Monitoring:
GET /api/statuslists each connection and whether it is connected. Every query is appended tosola-relay-audit.log.
- Credential Isolation: Connection settings live in
sola-relay.jsonon the relay's host and are never sent to the browser. - Read-only queries: SQL connectors accept a single read-only
SELECT; anything else is rejected. Give the relay a read-only database role as well. - Exposure: The relay has no authentication of its own. Keep it on a trusted machine or network, or put your own auth in front of it.
MIT © 2026 Sola AIR Contributors
