Skip to content
Rbm3267Public

About

The ambient intent framework. Compile .sola files into zero-dependency vanilla DOM with native $intent signals that resolve AI state at the framework level.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Sola AIR Logo

Sola AIR

Ambient · Intent · Runtime
Compile .sola components to plain DOM code. With $intent, a component can offer a suggestion before the user asks.

sola-air.dev → • Changelog →

npm sola-air npm @sola-air-ui/core npm @sola-air-ui/compiler VS Code Marketplace Open VSX Registry Chrome Web Store MIT License

# 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-sola

What is Sola AIR?

Sola 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 — $intent resolves structured data from any LLM provider
  • Local data relay — $data reads 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

Why Sola AIR?

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.


Reactive Primitives

  • $state(initial) — Fine-grained reactive signal
  • $derived(expr) — Computed values with automatic dependency tracking (a () => expr function 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

Shells and Events

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.


Editor and browser tools

  • VS Code: SolaAIR.sola-vscode adds .sola syntax highlighting, snippets and bracket pairing (source in packages/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 .sola design to one self-contained HTML file. Install from Rbm3267/sola-ui-skill: claude plugin marketplace add Rbm3267/sola-ui-skill then claude plugin install sola-ui@sola-air (Claude Code). For Claude.ai, zip skills/sola-ui from that repo and upload it with code execution on. The source is skills/sola, generated by node scripts/build-skill.mjs; the Publish skill repo workflow keeps the standalone repo in sync.

Ambient Behavior Observation (Sola Sentinel)

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.


Packages

Package npm Description
sola-air npm Meta-package — install everything at once
create-sola npm Project scaffolder (npx create-sola my-app)
@sola-air-ui/core npm Reactive runtime engine (signals, effects, $persist, $intent, $data, createBus, mountShell)
@sola-air-ui/compiler npm Acorn AST compiler & sola-check static validator (.sola → JS + CSS)
@sola-air-ui/vite-plugin-sola npm Vite plugin for .sola single-file components
@sola-air-ui/ui npm 37 compiled .sola UI, shell, and ambient-intent primitives
@sola-air-ui/tokens npm CSS custom-property design tokens (spacing, radius, type scale, light/dark semantic palette)
@sola-air-ui/sentinel npm Framework-agnostic behavioral friction & ambient field observer (SolaSentinel)
@sola-air-ui/relay npm Local data proxy (PostgreSQL, MySQL, Google Sheets)
@sola-air-ui/mcp npm MCP server for AI-driven component compilation, sola-check validation, and sola://docs
@sola-air-ui/providers npm Server-side LLM adapters for $intent
@sola-air-ui/behavior npm Behavior and playbook helpers (0.x, early)

Monorepo Architecture

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

Operational Guide (By Role)

Application Developers

  • Workflow: Build frontends using .sola files. Use $state and $derived for local state, and $intent to 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.

System Administrators

  • 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.json from the directory it starts in. Each entry under connections has a name and a type (postgres, mysql or sheet) plus its connection settings.
  • Monitoring: GET /api/status lists each connection and whether it is connected. Every query is appended to sola-relay-audit.log.

Security Engineers

  • Credential Isolation: Connection settings live in sola-relay.json on 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.

License

MIT © 2026 Sola AIR Contributors

About

The ambient intent framework. Compile .sola files into zero-dependency vanilla DOM with native $intent signals that resolve AI state at the framework level.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages