You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte-kit-vice/src/arts/README.md

338 lines
24 KiB

eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
# arts — runtime artifacts
`src/arts/` contains the runtime building blocks of the application. Each
artifact is independent, has its own README, and follows two consistent
naming conventions:
- **`Engine*`** — public methods over private state (or no state at all).
Pure factory; the locale, logger or any volatile input is passed as
argument on every call. When an artifact has a true server-authoritative
counterpart (`perm`, `cache`), the engine lives under `src/svrs/`.
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
- **`Active*`** — an `Engine*` that exposes public reactive state. Lives in a
`.svelte.ts` file because it owns `$state`. Imports must target the file
directly, not the barrel, to keep the rest of the artifact runes-free.
## ActiveEngine Contract
Root active artifacts implement the shared `ActiveEngine<TSnapshot, TError>`
contract from `$libs/active`:
```ts
interface ActiveEngine<TSnapshot, TError> {
readonly loading: boolean;
readonly lastError: TError | null;
readonly disposed: boolean;
snapshot(): TSnapshot;
clearError(): void;
onChange(listener: (snapshot: TSnapshot) => void): () => void;
dispose(): void;
}
```
Conventions:
- Use direct getters (`Auth.current`, `Cache.loading`, `Perms.lastError`),
not a module-specific `.state` object.
- Use `loading`, never `pending`, for in-flight work.
- Use `onChange()` for snapshot subscriptions. Lower-level clients may expose
their own event buses, but active roots keep this name.
- `dispose()` is idempotent, clears owned listeners/entries/resources, and
subsequent public operations throw the artifact's `XxxDisposedError`.
- Root active artifacts that create entries (`ActiveCache.entry()`,
`ActiveConnections.connection()`, etc.) own those entries and dispose them
when the root is disposed.
## Logger And Diagnostics Contract
Every artifact that emits runtime information follows the same two-layer
contract:
```ts
import type { DiagnosticEvent, Diagnostics, Logger } from '$libs/logger';
```
- Public options use `logger?: Logger`. Do not create artifact-local logger
interfaces or narrowed aliases for individual modules.
- The root logger implementation is `EngineLogger` from `$logger`; it extends the
shared `Logger` contract from `$libs/logger`.
- Artifact code defines `<Artifact>Diagnostics` in a dedicated
`diagnostics.ts` file — the canonical home for the `DiagnosticCatalog`,
`create<Artifact>Diagnostics(logger?)` and `emit<Artifact>Diagnostic(...)`.
Every artifact that emits diagnostics ships this file.
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
- Diagnostic event names live in the artifact `consts.ts` as
`*_DIAGNOSTIC_EVENTS`. Message strings are **named constants** in `consts.ts`
or `errors.ts` (or co-located in `diagnostics.ts` when only the catalog reads
them) — never inline string literals in the catalog or runtime logic.
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
- `Diagnostics<TEvent>` always exposes `{ logger, emit(event) }`. The `logger`
property is the common `Logger`, so modules that need an ad-hoc `info` or
`error` still have the full logger without inventing a second interface.
- Level routing is controlled by the logger/transports via the existing
per-level enablement map, not by module-specific severity systems.
Typical shape:
```ts
export const HTTP_DIAGNOSTIC_EVENTS = {
REQUEST: 'http.request',
NETWORK_ERROR: 'http.network_error'
} as const;
export function createHttpDiagnostics(logger?: Logger): HttpDiagnostics {
return createCatalogDiagnostics({
logger,
defaultCategory: LOGGER_CATEGORY,
catalog: HTTP_DIAGNOSTIC_LOGS
});
}
```
This gives every module the same path to Sentry, Loki, Datadog, console,
test-capture transports or any future sink: inject one `Logger`, emit typed
diagnostic events, let `logger` route.
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
## Error Contract
Errors follow the same rule: strings are centralized, and public programmer
errors are typed.
- Error messages and error names live in `errors.ts` or `consts.ts`.
- Runtime code must not throw inline string/template errors outside tests or
vendored code.
- Public programmer errors use artifact-specific classes and guards:
`SessionDisposedError`, `ConnInvalidNameError`, `UnitsUnknownUnitError`, etc.
- Expected runtime failures should be returned as tagged data/results when the
artifact already has such a contract (`http`, `connection`, `perm`, `cache`).
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
- Validation failures are data (`SiumValidationError.issues`) and diagnostics
are emitted separately when a logger is injected.
## Map
docs(arts): ethereal README + A1 drift sweep (orca/cache/adom) + honest guard Ethereal (was undocumented — the miss that prompted this pass): - new src/arts/ethereal/README.md, API drawn from the code (computePosition, the 7 middleware, autoUpdate, selectPositioningStrategy, dual JS/CSS-anchor engine, +1-frame read-phase model) - wired into src/arts/README.md Map + aliases + cross-deps; $ethereal added to the CLAUDE.md alias table; the also-missing bus/orca/prefs aliases + Map rows completed against vite.config.ts A1 drift (every fix verified against the cited code symbol, not the plan): - orca: ~13 phantom identifiers across 7 sections (priority, execution / ORCA_EXEC_*, tokenTimeoutMs, onFatal / ORCA_ON_FATAL_*, onTimeout, the whole multi-level timeout model, the transaction-port model + ORCA_TX_*, OrcaMaybePromise, OrcaCompensationContext) reconciled to the real API (parallel waves, actionTimeoutMs-only, transaction:string tag + compensate, fatal via returning OrcaFatal); added the real missing fields fanIn / parallel / compensate; glossary OrcaRun -> OrcaRunResult - cache: residual createActiveApp({cache}) -> services:{cache:defineActiveCache()}; documented the ActiveEngine contract surface (loading / lastError / disposed / snapshot / clearError / onChange / dispose); dangling demo URL -> /active/get-started/ecosystem - adom: added prefersReducedMotion / writeProperty / removeProperty; listen 1 -> 4 typed overloads; documented 12 undocumented standalone rune helpers; /test/adom -> /active/docs/adom Guard (scripts/arts-check.ts): removed the ethereal README exemption (set empty) and promoted A-index from warn to error — the net no longer passes green with a real gap. arts:check: 0 errors, 0 warnings, 22 arts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 months ago
| Artifact | Layer(s) | Purpose | Depends on |
| -------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [`langs`](./langs/README.md) | `EngineLangs`, `ActiveLangs`, `ActiveMonoLangs` | i18n: type-safe translations, BCP 47 resolution, plurals, refs, JSON round-trip | — |
| [`logger`](./logger/README.md) | `EngineLogger` | Structured logger: levels, transports, filters, vitals, dispose | — |
| [`timer`](./timer/README.md) | `EngineTimers`, `ActiveTimers` | Deterministic timer scheduler: clock injection, one-shots, intervals, cancellation, snapshots, backoff | `$libs/timers`, `$logger` (optional) |
| [`format`](./format/README.md) | `EngineFormat`, `ActiveFormat` | Localized formatting: numbers, currency, units, dates | `$logger` (currency) |
| [`adom`](./adom/README.md) | `ActiveDom` | Reactive DOM service: viewport, breakpoints, attribute writes, scroll lock, post-layout read scheduling (`measure`) | `$libs/dom`, `$reactive` |
| [`motion`](./motion/README.md) | `EngineMotion` | Animation runtime: registers + runs `--state` presets (CSS settle / JS drivers — spring / waapi / rect FLIP); the bridge BOTH UIX layers consume via `uix.motion` | `MotionDom` port (injected; `adom` satisfies it) |
feat(agent): eje agéntico — motor $agent (F1) + Aura + promoción uix.scene Materializa el eje ortogonal agéntico del ecosistema: la 8ª familia semántica `delegate` («¿quién actúa ahora?») deja de estar sin materializar. El agente es OTRO ACTOR (LLM, macro, regla, workflow) que actúa por la MISMA API pública del provider; la ruta de llamada no se bifurca, la concreción semántica depende del actor. F0 · Doctrina - docs/architecture/agent.md — la doctrina permanente (capítulo comparativo de referencias + bibliografía de seguridad, máquina estados=verbos, contrato de participación, fila §0, a11y, amenazas). - docs/process/{PLAN,TRIAGE,INFORME}-agent — plan de ejecución con todas las decisiones firmadas (D-AG.1–11 + ⚖️1/2/3), triage de 4 revisores externos, e informe autocontenido para revisión externa. F1 · Motor ($libs/actor + arts/agent, 24º arte) - EngineAgent puro (sin DOM/runes, portable a servidor): máquina D-AG.4 (suggest/review/auto · escalated con reason+timeout · returned outcome-tipado · kill switch · autorización journaled aunque sea auto), tool-loop D-AG.5 (acts secuenciales, fallos→verbos, unknown-capability acotado, idempotencia por callId, presupuestos acts/turns/wall-clock vía puerto de timers), techo de autonomía por origen no confiable (F8b). - ActiveAgent (sesión reactiva, contrato ActiveEngine) · protocolo v1 espejo AG-UI (5 categorías + dirección tipada + reservas) · ScriptedAgentTransport determinista (adapters/ fuera del barrel) · journal WAL + puerto de trazas OTel · emisor sium→JSON Schema. - Acuñación del actor (⚖️2/F6b): ActorToken opaco en $libs/actor (hoja bajo orca/agent), registro privado WeakMap — los forjados resuelven a null; costura `actor?` en TriggerOptions→SemanticSignal (runtime copia verbatim; sema no resuelve). defineActiveAgent (service-factory app-level, timers del core — cero setTimeout a pelo). F3 · Aura — primer componente del eje (ruta 9 fases 0–6) - El materializador canónico de `delegate` (reservado en scene §F6): morfo con los eventos del ciclo (offer/escalate-untilAction/return + sustain-processing stateBound) — PRIMER morfo del ecosistema que emite familia delegate; provider soma que observa un puerto estructural (sin importar $agent — degradación total); orb eidos = aurora $scene modulada por estado (§F6) con fallback CSS = render de reduced-motion; live region única atribuida (WCAG 4.1.3); cancel compone Button (asChild). Demo v2 sobre el MOTOR REAL con compuertas deterministas. Orb-size derivado de la primitiva Avatar (32/40/48). D4 · Promoción uix.scene (Aura llegó) - defineEngineScene + superficie ActiveUix/ActiveEidos/contracts; el orb prefiere el motor compartido (presupuesto de escenas global) con fallback por-superficie. Gates: arts/agent 18/18 · aura 6/6 · arts:check 24 · eidos battery + recipe 30/30 + eidos-lint aura 0 inválidos · morfo:vocabulary + esquemas · smoke aura PASS · verificado en navegador (ciclo completo + estampa delegate en DOM + aurora WebGL pintando). Los tokens de recipe base.ts + CSS generado ya entraron en HEAD vía una sesión concurrente. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3 months ago
| [`scene`](./scene/README.md) | `EngineScene` | Ambient-scene runtime: mounts WebGL/canvas-2D effects with the citizenship done once (frame loop, off-view pause, DPR cap, mandatory reduced-motion policy, context loss/restore, scene budget, teardown); effects = shared resources for the `Ambient` pack + the canonical `Aura` (promoted to `uix.scene` via `defineEngineScene`, D4) | `SceneDom` port (injected; `adom` satisfies it) |
refactor(sound): extraer el motor Web Audio de sema al art `$sound` `sema/chans/sound.ts` tenía 407 líneas de las que ~255 (≈63%) eran maquinaria Web Audio —ciclo de vida del AudioContext, síntesis, samples, desbloqueo por gesto— mezclada con doctrina perceptiva. Deuda arrastrada, con tres síntomas medidos: el import era estático, así que toda app con sema metía el sintetizador en el bundle aunque el sonido estuviera apagado (que es el default); faltaba ciudadanía que `$scene` ya resuelve; y la costura de inyección (`audioContextFactory`) llevaba ahí sin usar desde el principio. Mismo movimiento que `$motion` hizo desde eidos: el art se lleva el RUNTIME, la capa conserva sus DATOS y su doctrina. - `$sound` / `EngineSound`: UN AudioContext por documento (los navegadores los limitan y el gesto de desbloqueo es por contexto), síntesis de earcon, samples con caché y fallback a síntesis, `autoSuspend` OPT-IN —suspender con la pestaña oculta es correcto para earcons y erróneo para contenido, así que es decisión de quien compone— y aviso cuando un segundo contexto va vivo. Puertos `SoundDom` / `SoundTimers` inyectados; no importa ningún otro art ni nada de `$uix/sema`, que es la prueba objetiva del corte. - `SoundChannel`: 407 → 136 líneas. Solo doctrina: el gate de `prepare`, la política de reducción y el reparto «el canal resuelve el NIVEL, el motor aplica la ganancia». Sema no gana ni un import: recibe el motor por puerto. - `uix.sound` en standalone y attach con `ownsSound` (idioma ya shipped: `ownsMotion` / `ownsScene`), fila `sound` en la tabla ejecutable `contracts.ts`, y `defineEngineSound()` para el camino de app. - Tests nuevos: `engine-sound.test.ts` (11), `sound-port.test.ts` (guard de deriva de tipos + la regla de propiedad) y `sound-e2e.test.ts`, que recorre `emit -> cascada -> canal -> art -> grafo real`: el camino que las 16 suites previas no cubrían porque paraban en canales falsos. Sin `diagnostics.ts` ni `errors.ts`, y es decisión: espejo de `$scene`, aquí todo fallo es degradación documentada, no error de programador. Verificación: 17 suites / 198 tests · `check` en la baseline exacta (73 errores, 0 propios) · `sound.test.ts` verde SIN tocar un solo assert, que era el criterio de que el movimiento fue value-preserving. Planes: `PLAN-sound-engine.md` (completo, con el registro de la revisión adversarial E-1..E-7), `PLAN-audio-player.md` (aparcado tras el análisis del reproductor, con sus correcciones en cabecera) y `CONTINUE-sound-engine.md` (handoff). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 months ago
| [`sound`](./sound/README.md) | `EngineSound` | Web Audio runtime: ONE `AudioContext` per document (browsers cap them and the autoplay unlock gesture is per-context), earcon synthesis (oscillator pair → biquad → ADSR → AM), sample playback with cache + synth fallback, unlock-on-gesture, opt-in `autoSuspend`, second-live-context warning. Extracted from sema's `SoundChannel` (2026-07-30) — sema keeps the doctrine, the art keeps the machine; `sound.context` is public so a player / waveform / visualiser hangs its own graph off the same context | `SoundDom` + `SoundTimers` ports (injected; `adom` / `timer` satisfy them) |
docs(arts): ethereal README + A1 drift sweep (orca/cache/adom) + honest guard Ethereal (was undocumented — the miss that prompted this pass): - new src/arts/ethereal/README.md, API drawn from the code (computePosition, the 7 middleware, autoUpdate, selectPositioningStrategy, dual JS/CSS-anchor engine, +1-frame read-phase model) - wired into src/arts/README.md Map + aliases + cross-deps; $ethereal added to the CLAUDE.md alias table; the also-missing bus/orca/prefs aliases + Map rows completed against vite.config.ts A1 drift (every fix verified against the cited code symbol, not the plan): - orca: ~13 phantom identifiers across 7 sections (priority, execution / ORCA_EXEC_*, tokenTimeoutMs, onFatal / ORCA_ON_FATAL_*, onTimeout, the whole multi-level timeout model, the transaction-port model + ORCA_TX_*, OrcaMaybePromise, OrcaCompensationContext) reconciled to the real API (parallel waves, actionTimeoutMs-only, transaction:string tag + compensate, fatal via returning OrcaFatal); added the real missing fields fanIn / parallel / compensate; glossary OrcaRun -> OrcaRunResult - cache: residual createActiveApp({cache}) -> services:{cache:defineActiveCache()}; documented the ActiveEngine contract surface (loading / lastError / disposed / snapshot / clearError / onChange / dispose); dangling demo URL -> /active/get-started/ecosystem - adom: added prefersReducedMotion / writeProperty / removeProperty; listen 1 -> 4 typed overloads; documented 12 undocumented standalone rune helpers; /test/adom -> /active/docs/adom Guard (scripts/arts-check.ts): removed the ethereal README exemption (set empty) and promoted A-index from warn to error — the net no longer passes green with a real gap. arts:check: 0 errors, 0 warnings, 22 arts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 months ago
| [`ethereal`](./ethereal/README.md) | `$ethereal` (`computePosition` + middleware) | In-house positioning engine: collision-aware placement (offset/shift/flip/arrow/size/hide), `autoUpdate`, native CSS-anchor strategy — our parity-verified subset of `@floating-ui`; the JS + CSS paths BOTH UIX layers consume | `$adom` (DOM reads); no other art (`@floating-ui` = devDep parity baseline) |
| [`clipboard`](./clipboard/README.md) | `ActiveClipboard` | Clipboard write capability with injectable writer and explicit unavailable errors | browser `navigator.clipboard` or injected writer |
| [`sium`](./sium/README.md) | `EngineSium` | Validation contracts: schemas, issues, introspection, Standard Schema interop | `$langs` (optional), `$logger` (optional), `$libs/days`, `$libs/color` |
| [`storage`](./storage/README.md) | `EngineStorage`, `ActiveStorage` | Reactive sync key/value: pluggable adapters, version+migrate, TTL, validation, intra-tab + cross-tab sync, reactive keys | `$sium` (Standard Schema interop, optional) |
| [`http`](./http/README.md) | `EngineHttp` | HTTP client: tagged `HttpResult`, Standard Schema validation, retry, timeouts, hooks, SvelteKit `event.fetch` integration | `$libs/http`, `$libs/standard-schema` (type-only), `$logger` |
| [`session`](./session/README.md) | `EngineSession`, `ActiveSession` | Session lifecycle: adopt/revoke/refresh, auto-refresh, 401-rescue hook, SvelteKit SSR via `adoptServer` + cookie reader | `$storage`, `$timer`, `$http`, `$logger` (optional) |
| [`connection`](./connection/README.md) | `EngineConnections`, `ActiveConnections` | Realtime connection registry: transports, reconnect, heartbeat, request/reply, channels, session bridge | `$timer`, `$logger` (optional), `$session` bridge (optional) |
| [`auth`](./auth/README.md) | `ActiveAuth` (`EngineAuth` in `$svrs/auth`) | Authentication: password flows, CSRF, current session reflector, devices, logout, server-authoritative auth handlers | `$libs/auth`, `$http`, `$cache`, `$svrs/auth` |
| [`perm`](./perm/README.md) | `ActivePerms` (`EnginePerms` in `$svrs/perm`) | Authorization: policy runtime adapter, HTTP client/handlers, cache snapshot, `<Can />` guard | `$libs/perm`, `$libs/svrs`, `$http`, `$logger` (optional) |
| [`cache`](./cache/README.md) | `ActiveCache` (`EngineCache` in `$svrs/cache`) | Data cache: deterministic keys, policies, scopes, stale/revalidate, tags, memory/storage adapters | `$libs/cache`, `$storage` (adapter), `$logger` (optional) |
| [`color`](./color/README.md) | `$color` namespace (`uix.color`) | Isomorphic colour math: OKLCH↔sRGB, APCA, scale/scheme generation, alpha. Pure + stateless — `Engine`-grade, no class | — (zero-dep; consumed by eidos at build + runtime) |
| [`perf`](./perf/README.md) | `ActivePerf` (`uix.perf`) | Dev forced-reflow detector: Long Animation Frames → attributed `forcedStyleAndLayoutDuration` reports; opt-in, inert in prod | platform LoAF API (Chromium) — zero-dep |
| [`bus`](./bus/README.md) | `EngineBus`, `ActiveBus` | Mechanical typed event bus: typed envelopes, deterministic order, explicit error policy, re-entrancy guard, observability hooks, Svelte adapter; catalog-agnostic, injected by `active-app` | `$libs/bus` (pure contracts) |
| [`orca`](./orca/README.md) | `EngineOrca`, `ActiveOrca` | Active orchestration kernel: runs declarative actions on bus events with order, dependencies, `Result` + tokens, failure policies, timers, optional transactions, queue policies + static `validate()` | `$bus`, `$timer`, `$logger` (optional) |
| [`prefs`](./prefs/README.md) | `EnginePrefs`, `ActivePrefs` | Active preferences: resolves user intent × detected environment × effective value for a declared schema; feeds `langs` / `format` / direction; generic dimensions; optional DOM projection | — (optional DOM projection) |
feat(agent): eje agéntico — motor $agent (F1) + Aura + promoción uix.scene Materializa el eje ortogonal agéntico del ecosistema: la 8ª familia semántica `delegate` («¿quién actúa ahora?») deja de estar sin materializar. El agente es OTRO ACTOR (LLM, macro, regla, workflow) que actúa por la MISMA API pública del provider; la ruta de llamada no se bifurca, la concreción semántica depende del actor. F0 · Doctrina - docs/architecture/agent.md — la doctrina permanente (capítulo comparativo de referencias + bibliografía de seguridad, máquina estados=verbos, contrato de participación, fila §0, a11y, amenazas). - docs/process/{PLAN,TRIAGE,INFORME}-agent — plan de ejecución con todas las decisiones firmadas (D-AG.1–11 + ⚖️1/2/3), triage de 4 revisores externos, e informe autocontenido para revisión externa. F1 · Motor ($libs/actor + arts/agent, 24º arte) - EngineAgent puro (sin DOM/runes, portable a servidor): máquina D-AG.4 (suggest/review/auto · escalated con reason+timeout · returned outcome-tipado · kill switch · autorización journaled aunque sea auto), tool-loop D-AG.5 (acts secuenciales, fallos→verbos, unknown-capability acotado, idempotencia por callId, presupuestos acts/turns/wall-clock vía puerto de timers), techo de autonomía por origen no confiable (F8b). - ActiveAgent (sesión reactiva, contrato ActiveEngine) · protocolo v1 espejo AG-UI (5 categorías + dirección tipada + reservas) · ScriptedAgentTransport determinista (adapters/ fuera del barrel) · journal WAL + puerto de trazas OTel · emisor sium→JSON Schema. - Acuñación del actor (⚖️2/F6b): ActorToken opaco en $libs/actor (hoja bajo orca/agent), registro privado WeakMap — los forjados resuelven a null; costura `actor?` en TriggerOptions→SemanticSignal (runtime copia verbatim; sema no resuelve). defineActiveAgent (service-factory app-level, timers del core — cero setTimeout a pelo). F3 · Aura — primer componente del eje (ruta 9 fases 0–6) - El materializador canónico de `delegate` (reservado en scene §F6): morfo con los eventos del ciclo (offer/escalate-untilAction/return + sustain-processing stateBound) — PRIMER morfo del ecosistema que emite familia delegate; provider soma que observa un puerto estructural (sin importar $agent — degradación total); orb eidos = aurora $scene modulada por estado (§F6) con fallback CSS = render de reduced-motion; live region única atribuida (WCAG 4.1.3); cancel compone Button (asChild). Demo v2 sobre el MOTOR REAL con compuertas deterministas. Orb-size derivado de la primitiva Avatar (32/40/48). D4 · Promoción uix.scene (Aura llegó) - defineEngineScene + superficie ActiveUix/ActiveEidos/contracts; el orb prefiere el motor compartido (presupuesto de escenas global) con fallback por-superficie. Gates: arts/agent 18/18 · aura 6/6 · arts:check 24 · eidos battery + recipe 30/30 + eidos-lint aura 0 inválidos · morfo:vocabulary + esquemas · smoke aura PASS · verificado en navegador (ciclo completo + estampa delegate en DOM + aurora WebGL pintando). Los tokens de recipe base.ts + CSS generado ya entraron en HEAD vía una sesión concurrente. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3 months ago
| [`agent`](./agent/README.md) | `EngineAgent`, `ActiveAgent` | Delegation kernel (the agentic axis): run machine = the `delegate` verbs, sequential tool-loop over registered capabilities, budgets, actor minting (opaque tokens), WAL journal + OTel-shaped trace port, own v1 wire protocol (AG-UI parity) | `$libs/actor`, `$libs/standard-schema` (type-only), `$sium` (JSON-Schema projection); `AgentTransport` / timers ports (injected) |
docs(arts): ethereal README + A1 drift sweep (orca/cache/adom) + honest guard Ethereal (was undocumented — the miss that prompted this pass): - new src/arts/ethereal/README.md, API drawn from the code (computePosition, the 7 middleware, autoUpdate, selectPositioningStrategy, dual JS/CSS-anchor engine, +1-frame read-phase model) - wired into src/arts/README.md Map + aliases + cross-deps; $ethereal added to the CLAUDE.md alias table; the also-missing bus/orca/prefs aliases + Map rows completed against vite.config.ts A1 drift (every fix verified against the cited code symbol, not the plan): - orca: ~13 phantom identifiers across 7 sections (priority, execution / ORCA_EXEC_*, tokenTimeoutMs, onFatal / ORCA_ON_FATAL_*, onTimeout, the whole multi-level timeout model, the transaction-port model + ORCA_TX_*, OrcaMaybePromise, OrcaCompensationContext) reconciled to the real API (parallel waves, actionTimeoutMs-only, transaction:string tag + compensate, fatal via returning OrcaFatal); added the real missing fields fanIn / parallel / compensate; glossary OrcaRun -> OrcaRunResult - cache: residual createActiveApp({cache}) -> services:{cache:defineActiveCache()}; documented the ActiveEngine contract surface (loading / lastError / disposed / snapshot / clearError / onChange / dispose); dangling demo URL -> /active/get-started/ecosystem - adom: added prefersReducedMotion / writeProperty / removeProperty; listen 1 -> 4 typed overloads; documented 12 undocumented standalone rune helpers; /test/adom -> /active/docs/adom Guard (scripts/arts-check.ts): removed the ethereal README exemption (set empty) and promoted A-index from warn to error — the net no longer passes green with a real gap. arts:check: 0 errors, 0 warnings, 22 arts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 months ago
| [`active-app`](./active-app/README.md) | `ActiveApp` | App composition: core Logger + Bus + Timers + Orca + Prefs, plus declared services via factories | every artifact above |
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
## Composition
Most apps consume the artifacts through `active-app`:
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
```ts
import { createActiveApp } from '$active-app';
import {
defineActiveClipboard,
defineActiveDom,
defineActiveFormat,
defineActiveLangs
} from '$active-app/service-factories';
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
const App = createActiveApp({
logger: { level: LogLevel.INFO, transports: [consoleTransport()] },
services: {
langs: defineActiveLangs({ schema, defaultLocale: 'es', fallbackChain: ['en'] }),
clipboard: defineActiveClipboard(),
format: defineActiveFormat(),
dom: defineActiveDom()
}
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
});
App.langs.t('common.ok');
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
App.format.currency.format(99.5);
App.prefs.language.set('es-MX'); // propagates to langs when wired by the factory
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
```
`App` always exposes the fixed core (`logger`, `bus`, `timers`, `orca`,
`prefs`). Feature services exist only when the application declares their
slot. For translations that means `App.langs` exists when `services.langs`
is declared with `defineActiveLangs(...)`; otherwise the property is not part
of the typed surface.
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
`Sium`, `Session`, `Connections`, `Auth` and `Perms` are exposed as
**factories** because they are feature/page-scoped: App injects shared
services, but construction is explicit at the call site.
```ts
const App = createActiveApp({
services: {
sium: defineEngineSium({}),
connections: defineActiveConnections({}),
auth: defineActiveAuth({ initial: data.auth }),
perm: defineActivePerm({ endpoint: '/perm' })
}
});
applyStandardOrca(App);
```
See `active-app/README.md` for the full composition contract.
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
## Cross-artifact dependencies
```
langs logger
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
\ / | \
\ / | \
format http timer
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
\ | /|\
adom ──────────────────\ | / | connection
\ \ | / | \
\ \ | / auth perm
───────────── active-app ─ storage ─ cache
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
:
sium
```
- `langs` and `logger` are the dependency-free roots (`zero-dep` libraries).
- `format` consumes `logger` only inside `currency` (rate fetcher diagnostics).
- `sium` accepts `langs` and `logger` via injection; without them it falls back
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
to local message interpolation.
- `timer` is the deterministic scheduler consumed by `session` and `connection`.
- `http` accepts `logger` via injection (auto-wired through `active-app`) and keeps
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
shared HTTP literals/types in `$libs/http`.
- `session` consumes `storage` for persistence, `timer` for auto-refresh, and `http`
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
for 401-rescue integration.
- `connection` consumes `timer` for reconnect/heartbeat/ack timeouts and accepts the
App session bridge when composed through `active-app`.
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
- `auth` splits cleanly: `$svrs/auth` owns identity proof, CSRF and server
handlers; `$auth` owns the active client reflector. It feeds `session`,
`perm` and `cache` through ports rather than owning their state.
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
- `perm` splits cleanly: `$svrs/perm` owns the authoritative engine/HTTP
handlers, while `$perm` owns the active UI reflector and `<Can />`.
- `cache` splits cleanly: `$svrs/cache` owns the imperative engine, while
`$cache` owns the active Svelte wrapper and can consume `storage` through its
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
storage adapter.
- `adom` depends only on the pure helpers in `libs/dom` and on `libs/reactive`.
refactor(sound): extraer el motor Web Audio de sema al art `$sound` `sema/chans/sound.ts` tenía 407 líneas de las que ~255 (≈63%) eran maquinaria Web Audio —ciclo de vida del AudioContext, síntesis, samples, desbloqueo por gesto— mezclada con doctrina perceptiva. Deuda arrastrada, con tres síntomas medidos: el import era estático, así que toda app con sema metía el sintetizador en el bundle aunque el sonido estuviera apagado (que es el default); faltaba ciudadanía que `$scene` ya resuelve; y la costura de inyección (`audioContextFactory`) llevaba ahí sin usar desde el principio. Mismo movimiento que `$motion` hizo desde eidos: el art se lleva el RUNTIME, la capa conserva sus DATOS y su doctrina. - `$sound` / `EngineSound`: UN AudioContext por documento (los navegadores los limitan y el gesto de desbloqueo es por contexto), síntesis de earcon, samples con caché y fallback a síntesis, `autoSuspend` OPT-IN —suspender con la pestaña oculta es correcto para earcons y erróneo para contenido, así que es decisión de quien compone— y aviso cuando un segundo contexto va vivo. Puertos `SoundDom` / `SoundTimers` inyectados; no importa ningún otro art ni nada de `$uix/sema`, que es la prueba objetiva del corte. - `SoundChannel`: 407 → 136 líneas. Solo doctrina: el gate de `prepare`, la política de reducción y el reparto «el canal resuelve el NIVEL, el motor aplica la ganancia». Sema no gana ni un import: recibe el motor por puerto. - `uix.sound` en standalone y attach con `ownsSound` (idioma ya shipped: `ownsMotion` / `ownsScene`), fila `sound` en la tabla ejecutable `contracts.ts`, y `defineEngineSound()` para el camino de app. - Tests nuevos: `engine-sound.test.ts` (11), `sound-port.test.ts` (guard de deriva de tipos + la regla de propiedad) y `sound-e2e.test.ts`, que recorre `emit -> cascada -> canal -> art -> grafo real`: el camino que las 16 suites previas no cubrían porque paraban en canales falsos. Sin `diagnostics.ts` ni `errors.ts`, y es decisión: espejo de `$scene`, aquí todo fallo es degradación documentada, no error de programador. Verificación: 17 suites / 198 tests · `check` en la baseline exacta (73 errores, 0 propios) · `sound.test.ts` verde SIN tocar un solo assert, que era el criterio de que el movimiento fue value-preserving. Planes: `PLAN-sound-engine.md` (completo, con el registro de la revisión adversarial E-1..E-7), `PLAN-audio-player.md` (aparcado tras el análisis del reproductor, con sus correcciones en cabecera) y `CONTINUE-sound-engine.md` (handoff). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 months ago
- `sound` is the Web Audio engine, consumed by sema's `SoundChannel` (through an
injected port — sema imports no art) and by anything that needs its own audio
graph, via `uix.sound.context`. Same shape as `motion` / `ethereal`: the art
owns the RUNTIME, the layer keeps its DATA and doctrine (`SOUND_LIBRARY`,
`SOUND_TUNINGS`, the cascade). It imports no other art — `SoundDom` and
`SoundTimers` arrive injected. **One context per document is its whole reason
to exist**, so it warns when a second one goes live.
fix: address architectural audit findings + sync ecosystem docs Audit: src/audit-opus-4-6-26.md. All non-words findings remediated. Code: - E1: navigation-menu indicator data-state visible -> open (render bug; the active underline was permanently invisible). Clears the only invalid lint selector. - SO1 + E2: raw `new ResizeObserver` -> ActiveDom.observeResize in carousel-provider and the canvas-text useContainerWidth hook (+ s-text / s-text-virtual-list pass eidos.dom). iframe/popup-safe, lifecycle-tracked. - A1: defineUixServices now registers `motion`, so attach-mode app.motion is real and the active-uix fallback becomes the true edge case (test guard updated). - A2/A4: contracts.ts pins `motion` + `announce` in ActiveUixServiceContract + publicSurface; dispose() comment corrected. - SO2: carousel drops the hardcoded `transform 300ms ease-out` (the recipe already handles it via [data-dragging]); also fixed the recipe's undefined `--duration-base` token -> `--duration-slow` (it was masked by the inline). - S1: HapticChannel reduced-motion via an injected ActiveDom port (mirrors SoundChannelDom) instead of global matchMedia. - T1: 10 sites repointed `$libs/dom` -> `$adom` (sema x5 + its tests x3, active-uix value import, arts/prefs). - M2 / S2 / S3: dead code removed (button `states:['idle','loading']`, SemaRuntimeChannelId, SEMA_VALENCED_FAMILY_LIST). Docs: - Motion-as-service reflected across the ecosystem: CLAUDE.md (aliases + arch + service note), arts/README, active_architecture, soma SOMA_ARCHITECTURE, eidos README, eidos-motion.md. - X1: CLAUDE.md "5 canonical channels" (false) -> the single canonical narrative (8 book channels; Sema runs 2 + visual meta-channel, Eidos materializes 5). - X2/X3/X4: sema/README (8 families + intentRequirement/intentGuidance split), types.ts JSDoc (SEMA_INTENT_POLICY -> SEMA_FAMILY_POLICY), engine.ts cascade 6->5, alias table ($frontend out, $lang->$langs, +$clipboard). - E4: codex_audit.md HISTORICO banner. Deferred: SU2 (test-only layering, not a build violation); Words M1/T5/E3 (WIP). Verify: npm run check -> 1 pre-existing error (grafito), 0 new; sema 152/152, contracts 31/32 (1 pre-existing words), carousel 4/4, motion 22/22. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 months ago
- `motion` is the animation engine consumed by BOTH UIX layers via `uix.motion`
(soma's `Presence` + eidos wrappers), which dissolves the would-be soma→eidos
coupling. It imports no other art — the DOM dependency arrives injected via the
structural `MotionDom` port, which `adom` satisfies.
docs(arts): ethereal README + A1 drift sweep (orca/cache/adom) + honest guard Ethereal (was undocumented — the miss that prompted this pass): - new src/arts/ethereal/README.md, API drawn from the code (computePosition, the 7 middleware, autoUpdate, selectPositioningStrategy, dual JS/CSS-anchor engine, +1-frame read-phase model) - wired into src/arts/README.md Map + aliases + cross-deps; $ethereal added to the CLAUDE.md alias table; the also-missing bus/orca/prefs aliases + Map rows completed against vite.config.ts A1 drift (every fix verified against the cited code symbol, not the plan): - orca: ~13 phantom identifiers across 7 sections (priority, execution / ORCA_EXEC_*, tokenTimeoutMs, onFatal / ORCA_ON_FATAL_*, onTimeout, the whole multi-level timeout model, the transaction-port model + ORCA_TX_*, OrcaMaybePromise, OrcaCompensationContext) reconciled to the real API (parallel waves, actionTimeoutMs-only, transaction:string tag + compensate, fatal via returning OrcaFatal); added the real missing fields fanIn / parallel / compensate; glossary OrcaRun -> OrcaRunResult - cache: residual createActiveApp({cache}) -> services:{cache:defineActiveCache()}; documented the ActiveEngine contract surface (loading / lastError / disposed / snapshot / clearError / onChange / dispose); dangling demo URL -> /active/get-started/ecosystem - adom: added prefersReducedMotion / writeProperty / removeProperty; listen 1 -> 4 typed overloads; documented 12 undocumented standalone rune helpers; /test/adom -> /active/docs/adom Guard (scripts/arts-check.ts): removed the ethereal README exemption (set empty) and promoted A-index from warn to error — the net no longer passes green with a real gap. arts:check: 0 errors, 0 warnings, 22 arts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 months ago
- `ethereal` is the positioning engine consumed by BOTH UIX layers — soma's
`layers/floating` (the JS path) and eidos's `render-css` (the native
CSS-anchor path) — the same both-layers shape as `motion`. It imports no other
art; its DOM reads arrive injected via `$adom`. `@floating-ui` is a
devDep-only parity baseline, never a runtime import.
- `active-app` composes always-present roots and exposes factories for scoped
artifacts (`sium`, `session`, `connection`, `auth`, `perm`).
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
## Shared types
| Module | Type | Used by |
| --------- | ------------------------------------------------------- | ---------------------------------------------- |
| `$locale` | `LocaleSource` | `format.localeSource`, `active-app` wiring |
| `$langs` | `SupportedLocale` (`LangBase \| ${LangBase}-${string}`) | `langs`, consumers that want type-safe locales |
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
## Aliases
```js
// svelte.config.js
alias: {
$active-app: 'src/arts/active-app',
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
$adom: 'src/arts/adom',
feat(agent): eje agéntico — motor $agent (F1) + Aura + promoción uix.scene Materializa el eje ortogonal agéntico del ecosistema: la 8ª familia semántica `delegate` («¿quién actúa ahora?») deja de estar sin materializar. El agente es OTRO ACTOR (LLM, macro, regla, workflow) que actúa por la MISMA API pública del provider; la ruta de llamada no se bifurca, la concreción semántica depende del actor. F0 · Doctrina - docs/architecture/agent.md — la doctrina permanente (capítulo comparativo de referencias + bibliografía de seguridad, máquina estados=verbos, contrato de participación, fila §0, a11y, amenazas). - docs/process/{PLAN,TRIAGE,INFORME}-agent — plan de ejecución con todas las decisiones firmadas (D-AG.1–11 + ⚖️1/2/3), triage de 4 revisores externos, e informe autocontenido para revisión externa. F1 · Motor ($libs/actor + arts/agent, 24º arte) - EngineAgent puro (sin DOM/runes, portable a servidor): máquina D-AG.4 (suggest/review/auto · escalated con reason+timeout · returned outcome-tipado · kill switch · autorización journaled aunque sea auto), tool-loop D-AG.5 (acts secuenciales, fallos→verbos, unknown-capability acotado, idempotencia por callId, presupuestos acts/turns/wall-clock vía puerto de timers), techo de autonomía por origen no confiable (F8b). - ActiveAgent (sesión reactiva, contrato ActiveEngine) · protocolo v1 espejo AG-UI (5 categorías + dirección tipada + reservas) · ScriptedAgentTransport determinista (adapters/ fuera del barrel) · journal WAL + puerto de trazas OTel · emisor sium→JSON Schema. - Acuñación del actor (⚖️2/F6b): ActorToken opaco en $libs/actor (hoja bajo orca/agent), registro privado WeakMap — los forjados resuelven a null; costura `actor?` en TriggerOptions→SemanticSignal (runtime copia verbatim; sema no resuelve). defineActiveAgent (service-factory app-level, timers del core — cero setTimeout a pelo). F3 · Aura — primer componente del eje (ruta 9 fases 0–6) - El materializador canónico de `delegate` (reservado en scene §F6): morfo con los eventos del ciclo (offer/escalate-untilAction/return + sustain-processing stateBound) — PRIMER morfo del ecosistema que emite familia delegate; provider soma que observa un puerto estructural (sin importar $agent — degradación total); orb eidos = aurora $scene modulada por estado (§F6) con fallback CSS = render de reduced-motion; live region única atribuida (WCAG 4.1.3); cancel compone Button (asChild). Demo v2 sobre el MOTOR REAL con compuertas deterministas. Orb-size derivado de la primitiva Avatar (32/40/48). D4 · Promoción uix.scene (Aura llegó) - defineEngineScene + superficie ActiveUix/ActiveEidos/contracts; el orb prefiere el motor compartido (presupuesto de escenas global) con fallback por-superficie. Gates: arts/agent 18/18 · aura 6/6 · arts:check 24 · eidos battery + recipe 30/30 + eidos-lint aura 0 inválidos · morfo:vocabulary + esquemas · smoke aura PASS · verificado en navegador (ciclo completo + estampa delegate en DOM + aurora WebGL pintando). Los tokens de recipe base.ts + CSS generado ya entraron en HEAD vía una sesión concurrente. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3 months ago
$agent: 'src/arts/agent',
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
$auth: 'src/arts/auth',
docs(arts): ethereal README + A1 drift sweep (orca/cache/adom) + honest guard Ethereal (was undocumented — the miss that prompted this pass): - new src/arts/ethereal/README.md, API drawn from the code (computePosition, the 7 middleware, autoUpdate, selectPositioningStrategy, dual JS/CSS-anchor engine, +1-frame read-phase model) - wired into src/arts/README.md Map + aliases + cross-deps; $ethereal added to the CLAUDE.md alias table; the also-missing bus/orca/prefs aliases + Map rows completed against vite.config.ts A1 drift (every fix verified against the cited code symbol, not the plan): - orca: ~13 phantom identifiers across 7 sections (priority, execution / ORCA_EXEC_*, tokenTimeoutMs, onFatal / ORCA_ON_FATAL_*, onTimeout, the whole multi-level timeout model, the transaction-port model + ORCA_TX_*, OrcaMaybePromise, OrcaCompensationContext) reconciled to the real API (parallel waves, actionTimeoutMs-only, transaction:string tag + compensate, fatal via returning OrcaFatal); added the real missing fields fanIn / parallel / compensate; glossary OrcaRun -> OrcaRunResult - cache: residual createActiveApp({cache}) -> services:{cache:defineActiveCache()}; documented the ActiveEngine contract surface (loading / lastError / disposed / snapshot / clearError / onChange / dispose); dangling demo URL -> /active/get-started/ecosystem - adom: added prefersReducedMotion / writeProperty / removeProperty; listen 1 -> 4 typed overloads; documented 12 undocumented standalone rune helpers; /test/adom -> /active/docs/adom Guard (scripts/arts-check.ts): removed the ethereal README exemption (set empty) and promoted A-index from warn to error — the net no longer passes green with a real gap. arts:check: 0 errors, 0 warnings, 22 arts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 months ago
$bus: 'src/arts/bus',
$cache: 'src/arts/cache',
$clipboard: 'src/arts/clipboard',
$color: 'src/arts/color',
$connection: 'src/arts/connection',
docs(arts): ethereal README + A1 drift sweep (orca/cache/adom) + honest guard Ethereal (was undocumented — the miss that prompted this pass): - new src/arts/ethereal/README.md, API drawn from the code (computePosition, the 7 middleware, autoUpdate, selectPositioningStrategy, dual JS/CSS-anchor engine, +1-frame read-phase model) - wired into src/arts/README.md Map + aliases + cross-deps; $ethereal added to the CLAUDE.md alias table; the also-missing bus/orca/prefs aliases + Map rows completed against vite.config.ts A1 drift (every fix verified against the cited code symbol, not the plan): - orca: ~13 phantom identifiers across 7 sections (priority, execution / ORCA_EXEC_*, tokenTimeoutMs, onFatal / ORCA_ON_FATAL_*, onTimeout, the whole multi-level timeout model, the transaction-port model + ORCA_TX_*, OrcaMaybePromise, OrcaCompensationContext) reconciled to the real API (parallel waves, actionTimeoutMs-only, transaction:string tag + compensate, fatal via returning OrcaFatal); added the real missing fields fanIn / parallel / compensate; glossary OrcaRun -> OrcaRunResult - cache: residual createActiveApp({cache}) -> services:{cache:defineActiveCache()}; documented the ActiveEngine contract surface (loading / lastError / disposed / snapshot / clearError / onChange / dispose); dangling demo URL -> /active/get-started/ecosystem - adom: added prefersReducedMotion / writeProperty / removeProperty; listen 1 -> 4 typed overloads; documented 12 undocumented standalone rune helpers; /test/adom -> /active/docs/adom Guard (scripts/arts-check.ts): removed the ethereal README exemption (set empty) and promoted A-index from warn to error — the net no longer passes green with a real gap. arts:check: 0 errors, 0 warnings, 22 arts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 months ago
$ethereal: 'src/arts/ethereal',
$format: 'src/arts/format',
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
$http: 'src/arts/http',
$langs: 'src/arts/langs',
$logger: 'src/arts/logger',
fix: address architectural audit findings + sync ecosystem docs Audit: src/audit-opus-4-6-26.md. All non-words findings remediated. Code: - E1: navigation-menu indicator data-state visible -> open (render bug; the active underline was permanently invisible). Clears the only invalid lint selector. - SO1 + E2: raw `new ResizeObserver` -> ActiveDom.observeResize in carousel-provider and the canvas-text useContainerWidth hook (+ s-text / s-text-virtual-list pass eidos.dom). iframe/popup-safe, lifecycle-tracked. - A1: defineUixServices now registers `motion`, so attach-mode app.motion is real and the active-uix fallback becomes the true edge case (test guard updated). - A2/A4: contracts.ts pins `motion` + `announce` in ActiveUixServiceContract + publicSurface; dispose() comment corrected. - SO2: carousel drops the hardcoded `transform 300ms ease-out` (the recipe already handles it via [data-dragging]); also fixed the recipe's undefined `--duration-base` token -> `--duration-slow` (it was masked by the inline). - S1: HapticChannel reduced-motion via an injected ActiveDom port (mirrors SoundChannelDom) instead of global matchMedia. - T1: 10 sites repointed `$libs/dom` -> `$adom` (sema x5 + its tests x3, active-uix value import, arts/prefs). - M2 / S2 / S3: dead code removed (button `states:['idle','loading']`, SemaRuntimeChannelId, SEMA_VALENCED_FAMILY_LIST). Docs: - Motion-as-service reflected across the ecosystem: CLAUDE.md (aliases + arch + service note), arts/README, active_architecture, soma SOMA_ARCHITECTURE, eidos README, eidos-motion.md. - X1: CLAUDE.md "5 canonical channels" (false) -> the single canonical narrative (8 book channels; Sema runs 2 + visual meta-channel, Eidos materializes 5). - X2/X3/X4: sema/README (8 families + intentRequirement/intentGuidance split), types.ts JSDoc (SEMA_INTENT_POLICY -> SEMA_FAMILY_POLICY), engine.ts cascade 6->5, alias table ($frontend out, $lang->$langs, +$clipboard). - E4: codex_audit.md HISTORICO banner. Deferred: SU2 (test-only layering, not a build violation); Words M1/T5/E3 (WIP). Verify: npm run check -> 1 pre-existing error (grafito), 0 new; sema 152/152, contracts 31/32 (1 pre-existing words), carousel 4/4, motion 22/22. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 months ago
$motion: 'src/arts/motion',
docs(arts): ethereal README + A1 drift sweep (orca/cache/adom) + honest guard Ethereal (was undocumented — the miss that prompted this pass): - new src/arts/ethereal/README.md, API drawn from the code (computePosition, the 7 middleware, autoUpdate, selectPositioningStrategy, dual JS/CSS-anchor engine, +1-frame read-phase model) - wired into src/arts/README.md Map + aliases + cross-deps; $ethereal added to the CLAUDE.md alias table; the also-missing bus/orca/prefs aliases + Map rows completed against vite.config.ts A1 drift (every fix verified against the cited code symbol, not the plan): - orca: ~13 phantom identifiers across 7 sections (priority, execution / ORCA_EXEC_*, tokenTimeoutMs, onFatal / ORCA_ON_FATAL_*, onTimeout, the whole multi-level timeout model, the transaction-port model + ORCA_TX_*, OrcaMaybePromise, OrcaCompensationContext) reconciled to the real API (parallel waves, actionTimeoutMs-only, transaction:string tag + compensate, fatal via returning OrcaFatal); added the real missing fields fanIn / parallel / compensate; glossary OrcaRun -> OrcaRunResult - cache: residual createActiveApp({cache}) -> services:{cache:defineActiveCache()}; documented the ActiveEngine contract surface (loading / lastError / disposed / snapshot / clearError / onChange / dispose); dangling demo URL -> /active/get-started/ecosystem - adom: added prefersReducedMotion / writeProperty / removeProperty; listen 1 -> 4 typed overloads; documented 12 undocumented standalone rune helpers; /test/adom -> /active/docs/adom Guard (scripts/arts-check.ts): removed the ethereal README exemption (set empty) and promoted A-index from warn to error — the net no longer passes green with a real gap. arts:check: 0 errors, 0 warnings, 22 arts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 months ago
$orca: 'src/arts/orca',
$perf: 'src/arts/perf',
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
$perm: 'src/arts/perm',
docs(arts): ethereal README + A1 drift sweep (orca/cache/adom) + honest guard Ethereal (was undocumented — the miss that prompted this pass): - new src/arts/ethereal/README.md, API drawn from the code (computePosition, the 7 middleware, autoUpdate, selectPositioningStrategy, dual JS/CSS-anchor engine, +1-frame read-phase model) - wired into src/arts/README.md Map + aliases + cross-deps; $ethereal added to the CLAUDE.md alias table; the also-missing bus/orca/prefs aliases + Map rows completed against vite.config.ts A1 drift (every fix verified against the cited code symbol, not the plan): - orca: ~13 phantom identifiers across 7 sections (priority, execution / ORCA_EXEC_*, tokenTimeoutMs, onFatal / ORCA_ON_FATAL_*, onTimeout, the whole multi-level timeout model, the transaction-port model + ORCA_TX_*, OrcaMaybePromise, OrcaCompensationContext) reconciled to the real API (parallel waves, actionTimeoutMs-only, transaction:string tag + compensate, fatal via returning OrcaFatal); added the real missing fields fanIn / parallel / compensate; glossary OrcaRun -> OrcaRunResult - cache: residual createActiveApp({cache}) -> services:{cache:defineActiveCache()}; documented the ActiveEngine contract surface (loading / lastError / disposed / snapshot / clearError / onChange / dispose); dangling demo URL -> /active/get-started/ecosystem - adom: added prefersReducedMotion / writeProperty / removeProperty; listen 1 -> 4 typed overloads; documented 12 undocumented standalone rune helpers; /test/adom -> /active/docs/adom Guard (scripts/arts-check.ts): removed the ethereal README exemption (set empty) and promoted A-index from warn to error — the net no longer passes green with a real gap. arts:check: 0 errors, 0 warnings, 22 arts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 months ago
$prefs: 'src/arts/prefs',
$session: 'src/arts/session',
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
$sium: 'src/arts/sium',
refactor(sound): extraer el motor Web Audio de sema al art `$sound` `sema/chans/sound.ts` tenía 407 líneas de las que ~255 (≈63%) eran maquinaria Web Audio —ciclo de vida del AudioContext, síntesis, samples, desbloqueo por gesto— mezclada con doctrina perceptiva. Deuda arrastrada, con tres síntomas medidos: el import era estático, así que toda app con sema metía el sintetizador en el bundle aunque el sonido estuviera apagado (que es el default); faltaba ciudadanía que `$scene` ya resuelve; y la costura de inyección (`audioContextFactory`) llevaba ahí sin usar desde el principio. Mismo movimiento que `$motion` hizo desde eidos: el art se lleva el RUNTIME, la capa conserva sus DATOS y su doctrina. - `$sound` / `EngineSound`: UN AudioContext por documento (los navegadores los limitan y el gesto de desbloqueo es por contexto), síntesis de earcon, samples con caché y fallback a síntesis, `autoSuspend` OPT-IN —suspender con la pestaña oculta es correcto para earcons y erróneo para contenido, así que es decisión de quien compone— y aviso cuando un segundo contexto va vivo. Puertos `SoundDom` / `SoundTimers` inyectados; no importa ningún otro art ni nada de `$uix/sema`, que es la prueba objetiva del corte. - `SoundChannel`: 407 → 136 líneas. Solo doctrina: el gate de `prepare`, la política de reducción y el reparto «el canal resuelve el NIVEL, el motor aplica la ganancia». Sema no gana ni un import: recibe el motor por puerto. - `uix.sound` en standalone y attach con `ownsSound` (idioma ya shipped: `ownsMotion` / `ownsScene`), fila `sound` en la tabla ejecutable `contracts.ts`, y `defineEngineSound()` para el camino de app. - Tests nuevos: `engine-sound.test.ts` (11), `sound-port.test.ts` (guard de deriva de tipos + la regla de propiedad) y `sound-e2e.test.ts`, que recorre `emit -> cascada -> canal -> art -> grafo real`: el camino que las 16 suites previas no cubrían porque paraban en canales falsos. Sin `diagnostics.ts` ni `errors.ts`, y es decisión: espejo de `$scene`, aquí todo fallo es degradación documentada, no error de programador. Verificación: 17 suites / 198 tests · `check` en la baseline exacta (73 errores, 0 propios) · `sound.test.ts` verde SIN tocar un solo assert, que era el criterio de que el movimiento fue value-preserving. Planes: `PLAN-sound-engine.md` (completo, con el registro de la revisión adversarial E-1..E-7), `PLAN-audio-player.md` (aparcado tras el análisis del reproductor, con sus correcciones en cabecera) y `CONTINUE-sound-engine.md` (handoff). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 months ago
$sound: 'src/arts/sound',
$storage: 'src/arts/storage',
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
$svrs: 'src/svrs',
$timer: 'src/arts/timer',
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
$libs: 'src/libs',
$locale: 'src/libs/locale',
$reactive: 'src/libs/reactive'
}
```
## Bundle policy
Every artifact is designed to tree-shake cleanly:
- `package.json` declares `"sideEffects": ["**/*.css", "**/*.svelte"]`, so any
`.ts` / `.svelte.ts` module that the bundler does not statically reach is
dropped from the production bundle.
- All barrels use **named re-exports** (`export { a, b } from './x'`) instead
of `export *`. This lets the bundler prove which symbols are reached from
a given import and drop the rest of the source module.
- `.svelte.ts` files defer module-level state (`viewport.svelte.ts`,
`body-scroll-lock.svelte.ts`) so importing the barrel does not allocate
Svelte runes runtime for unused features.
- External adapters (`$logger/adapters/*`) and dev helpers (`$active-app/testing`,
`$sium/_examples/`) live outside the main barrel. A consumer that does
not reference them never pays for them.
A consumer that builds
`createActiveApp({ services: { langs: defineActiveLangs({ schema }) } })` and
only calls `App.langs.t(...)` should land roughly in the 40–50 KB minified range.
A consumer that wires every artifact (Sium + Storage cookies + DOM runtime +
Web Vitals) lands in the ~120 KB range. The difference is the per-feature
surface, paid only when reached.
eidos: pilot wrapper pattern + doctrinal API conventions Toggle as the eidos pilot: subdirectory layout (recipe + Svelte wrapper + types + index + README) replacing the flat CSS-only form. Pattern is documented in eidos/components/README.md and the toggle README. Shared types live in eidos/lib/types.ts. First export is `Size` (8 values xxs..xxl + full); components narrow with `Extract<Size, ...>` per the per-component-subset doctrine. No `Eidos` prefix on types — module path already conveys the layer. API doctrine: - soma stays compound (Toggle.Provider) for symmetry with multi-part - eidos exports both default + Provider so single-part components accept both `<Toggle>` (ergonomic) and `<Toggle.Provider>` (compound-style consumers) SoundChannel eager-init fixes the autoplay race: AudioContext is created + resumed synchronously on the first user gesture (capture-phase listener registered in the constructor), avoiding the previous race where the first emit() scheduled the resume in a microtask outside the gesture window. Demo page (web/routes/toggle/+page.svelte) restructured so the live preview renders ALWAYS above the tablist — Sema-tab Play buttons can fire on the real toggle. Motion preview amplifies scale ×8 visually only; doctrinal values stay in the <dl>. Conventions 7-13 added to src/docs/sema-implementation-guide.md covering: directory structure, wrapper composition, no Eidos prefix, soma compound vs eidos flat, iconOnly sr-only body, sound eager-init, docs-preview amplification. CLAUDE.md gets a session hand-off block listing where things stand and next concrete steps (migrate switch/collapsible/dialog/drawer/popover/ toast/avatar; wire topbar sound mute to masterGain; rename theme tokens to drop the success/warning/danger fallback aliases). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
## Test pages
Interactive docs now live under `web/routes/active` and `web/routes/uix`.
Older `/test/*` pages may still exist in local branches, but the canonical
artifact names are the directory names listed in the map above:
- `active-app` — full composition end-to-end
- `ecosystem` — total integration demo: auth, session, perm, cache, http, storage, sium, format, adom, timer, connection, langs and logger in one app flow
- `langs` — i18n with reactive locale switching, plurals, BCP 47
- `logger` — log levels, transports, vitals, Sentry integration
- `format` — numbers / currency / units / dates with shared locale
- `adom` — viewport, breakpoints, scroll lock, roving focus
- `sium` — login / signup / profile schemas with translated issues
- `storage` — adapters (memory / local / session / cookie), envelope versioning + migrate, raw mode, TTL, mergeDefaults, cross-tab sync
- `http` — GET/POST with Sium validation, retry + Retry-After, timeout, cancellation, lifecycle hooks, tagged `HttpResult`
- `session` — session lifecycle: adopt/revoke/refresh with generation guard + dedup, auto-refresh, tagged `RevokeResult`, permission checks, event stream
- `timer` — scheduler snapshots, intervals, cancellation and deterministic clocks
- `connection` — websocket chat and connection/channel lifecycle
- `auth` — server-authoritative auth surface: password flow, CSRF, devices, routes and security events
- `perm` — authorization checks, `<Can />`, HTTP handlers and client cache
- `cache` — cache policies, scopes, tags and active entries
Use `/active` for the current application/runtime docs and `/uix` for the UIX
component system docs.

Powered by TurnKey Linux.