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

341 lines
25 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) |
docs(sema): la doctrina deja de mentir — deriva propia, copias podridas y dos leyes muertas Pasada de saneamiento documental tras los tres commits de sonido, con el informe de AUDIT-sema-2026-08-05 como mapa. Tres clases de defecto. 1) DERIVA QUE YO MISMO DEJE (lo mas urgente) El 05 renombre las claves silenciadoras a `commit.silent` / `emerge.silent` y el 06 las elimine del catalogo — dejando media docena de docs citando claves que ya no existen, y afirmando ademas comportamientos que ya no ocurren: - switch / toggle / toggle-group README: decian «silent-by-default (`commit.silent`)». Hoy es `commit.medium` (gain 0.1) y suenan. Corregidos con el nivel real y su razon (un tercio de una pulsacion de boton). - tooltip README + docblock del pack: decian que el tuning «resta el gain de la familia, asi que neutral emite a 0» y que «threat / fulfill siguen aflorando». Ambas cosas son falsas desde el 06: es `SILENT`, el resolver retira el canal y NADA aflora, porque no queda ganancia que subir. - toggle-group apuntaba a `LIBRO_VARIACIONES_Y_EXTENSIONES.md`, que es un stub movido; ahora apunta a book-deviations. - La nota del renombrado en D.5 decia «hoy es `commit.silent`»: una clave que vivio UN DIA. Marcada como tal, con la lista de las que siguen vivas. 2) COPIAS PODRIDAS — la ley del corpus es enlazar, no copiar, y estas dos entradas la incumplian - D.9 transcribia `SEMA_HOLDS_BY_INTENT` entera y se habia quedado atras: D.12 corrigio DOS valores el 2026-07-06 (`commit.fulfill` noticed→settled, `signal.loss` noticed→brief, ambos contra el texto del libro) y la copia siguio afirmando los viejos un mes. Sustituida por el puntero a holds.ts + el enumerado generado, con la leccion escrita en el sitio. - sema.md transcribia `SEMA_VERBS` y le faltaban DOS verbos vivos: `commit.unselect` y `handle.zoom`. Retirada; queda el puntero a verbs.ts y a vocabularies.md, que si se genera y tiene guard de frescura. 3) LEYES QUE LA PRACTICA YA HABIA DEROGADO, Y NADIE REGISTRO - El contrato `emit` publicaba `Promise<void>`; devuelve `Promise<string>` desde D.9. Corregido, y explicado que ese string es el id de la ocurrencia — el unico asidero para cerrar una senal persistente con `clear`. - channels.md fijaba «3 canales runtime» y D.8 cerraba la puerta a Announce («hoy no»). El `AnnounceChannel` existe desde el 2026-07-04: built-in, opt-in y exportado. channels.md pasa a 4 con la distincion que importa (visual/sound/haptic EXPRESAN; announce SUSTITUYE) y D.8 queda marcada PARCIALMENTE SUPERSEDED. - sema.md prescribia `{ announce: uix.announce }` — y eso NO COMPILA: las dos firmas no casan (bolsa de opciones vs posicional). Ahora ensena el adaptador de una linea que si compila, y declara que ninguna raiz cablea el canal hoy, asi que activarlo cae en el fallback que anade un SEGUNDO par de live regions. El arreglo de codigo queda sin tomar: es decision de diseno. - La cabecera de engine-sound.ts y la fila de arts/README seguian afirmando como MECANISMO que «`prefs.sound` mapea al bus ui», que la auditoria AU-4 ya habia corregido en el README del propio arte: lo garantizado por construccion es el NEGATIVO (ninguna politica de UI escribe el bus content). AMBIGUEDADES QUE NO RESUELVO PORQUE SON TUYAS, pero que dejan de estar escondidas: D.7 prohibe canonizar samples fuera de `signal` y `proof-of-human` los usa en dos eventos `commit`, aplastando la modulacion por intent que esa misma entrada existe para proteger —y el comentario del pack afirma literalmente lo contrario de lo que hace—; y D.8 declara que los packs deben respetar el `activeChannels` de la familia mientras sema.md prescribe lo contrario y el pack de dialog deja dos reglas inertes. Ambas quedan marcadas con su estado real y los dos caminos excluyentes, pendientes de tu firma. VERIFICADO: docs:check 0/616 · sonido + sema 244/244 · cero referencias vivas a las tres claves muertas (las que quedan en book-deviations son historia declarada como tal, y las de cronica no se reescriben) · prettier: los 6 docs con avisos ya estaban sucios en HEAD, no los toco. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 months ago
| [`sound`](./sound/README.md) | `EngineSound` | The sound ORCHESTRATOR (redesign 2026-07-31): ONE `AudioContext` per document, the mix (master → buses `ui`/`content` with gain/mute/refcounted duck; the guarantee is the negative — no UI policy ever writes `content`), synthesis with REGISTERED voices (calibration is the consumer's data — sema registers `'sema'`; the default voice keeps the historical sound), sample playback with cache + synth fallback, `decode` door, unlock-on-gesture, opt-in content-aware `autoSuspend`, second-live-context warning, and media citizenship: `sound.media(el)` PROVIDES the playback transport (the player's `MediaProvider` shape) plus audio focus (`mixed`/`exclusive`/`duck`), the opt-in `duckUiWhileContent` relation and the MediaSession projection of the active source. `sound.context` + `bus(...).node` are public so consumers hang their graphs 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`.
feat(sound): $sound orquestador (buses+voces+media) y player v2 F1-F3 sobre el servicio Rediseno clean-room del sonido (gate D-SR.1-12 firmado; la doctrina "la voz es del art" de PLAN-sound-engine s16.1 queda revocada): - Mezcla: master -> buses ui/content (gain/mute/duck refcount, gana la mas fuerte; politica pre-contexto). prefs de UI jamas tocan la obra. - Voces registradas: la calibracion es DATO del consumidor (sema registra 'sema'; el default conserva la calibracion historica - cero cambio audible, A/B del usuario: "suena igual"). - Ciudadania de media: sound.media(el) PROVEE el transporte (la forma exacta del puerto MediaProvider) + foco mixed/exclusive/duck PERSISTENTE (estado derivado; el ducker mas reciente retiene la palabra) + duckUiWhileContent + MediaSession de la fuente activa (play/pause/seekto + posicion, liberacion y promocion) + visibilidad content-aware + attach() opt-in (irreversible, CORS declarado). Re-registro idempotente por elemento. - diagnostics.ts con catalogo tipado (contrato de arts) y guards post-dispose (ningun camino abre un contexto huerfano). Auditoria AU-1..9 resuelta; bundle medido: 16,2 KB min / 5,6 KB gz. Player v2 (gate D-AP2.1-13 firmado) F1-F3: - F1 gaps de framework: aria-valuetext en Slider (valueText por thumb) + parte SecondaryRange con token --slider-secondary-bg (buffer/clip/capitulos) + formatDuration en $libs/days + fix del selector del pack (H-1: la regla de play/pause construia sobre provider y el stamp aterriza en play-button). - F2 morfo: 6 partes audio-only (artwork/artist/identity/transport/ rate-button/live-indicator), commit-set-rate, commit-set-time RETIRADO (D-AP2.13: el scrubber delega en el commit-set del Slider compuesto), sustain-loading cableado (H-9), teclado j/l, </> y 0-9 (con guard de modificadores para no pisar atajos del navegador). - F3 la migracion: el transporte default es uix.sound.media(el, {metadata}) (pineado con el motor real); nativeMediaProvider RETIRADO (media-provider.ts queda como contrato puro del puerto, sin shim); G-5: los commits de play/mute/rate cabalgan el evento de RESULTADO (play/pause saltando el pause de ended, volumechange con transicion de muted, ratechange); formatTime -> formatDuration; sub-providers + wrappers + exports de las 6 partes; prop metadata publica (captura al registrar, documentado). Verificacion: 45 suites / 458 tests verdes en el alcance (sound, sema, active-uix, active-app, morfo, slider, media-player, days) - check 74 = baseline de la rama, 0 propios - docs:check 0 - invariante de UN AudioContext intacta (e2e sin tocar). Planes de proceso y handoff al dia (PLAN-sound-redesign, PLAN-audio-player-v2, CONTINUE-sound-engine). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 months ago
- `sound` is the sound ORCHESTRATOR: every consumer plays through it — sema's
`SoundChannel` (through an injected port; sema registers its VOICE as data,
the way eidos registers motion presets) on the `ui` bus, media playback on
the `content` bus (delivery 2), and anything needing its own graph via
`uix.sound.context` / `bus(...).node`. Same shape as `motion` / `ethereal`:
the art owns the RUNTIME, the layer keeps its DATA and doctrine
docs(sema)!: retirar D.7 y S-07 — el orden hace imposible lo que prohibian F6 del PLAN-sound-names, y el motivo importa mas que el borrado: no se derogan por cambio de opinion, se DISUELVEN. La doctrina del autor que las origino sigue siendo cierta; lo que cambia es quien la sostiene. D.7 prohibia canonizar un sample sobre un evento cuya familia tuviera base.sound, porque sound() devolvia una firma COMPLETA y la cascada la aplicaba en replace DESPUES del intent: un fulfill perdia su +300 Hz ascendente. S-07 era el mismo defecto una capa mas abajo — el gain desnudo de los 14 afinados de escalera — y seguia ABIERTO por decision del autor. Con el nombre aplicado ANTES de los deltas de intent no queda ninguna capa posterior que pueda pisarlos. Aplastar el perfil evaluativo ya no esta prohibido: es INEXPRESABLE. Y S-07 pierde su premisa entera, porque SOUND_TUNINGS ya no existe. LO QUE SE CONSERVA, con su sitio nuevo escrito: el silencio como firma valida (SILENT), el criterio de cuando crear un pack, y los samples como recurso de producto (el catalogo los admite con nombre; la app autora los suyos por overrides.cascade, que sigue abierto a proposito). LO UNICO DE D.7 QUE HAY QUE SEGUIR SABIENDO, y por eso queda escrito en tres sitios: playSample lee EXACTAMENTE dos campos, sampleUrl y gain. No hay playbackRate ni detune. Sobre un .wav el intent solo mueve el volumen — medido, risk es indistinguible de neutral porque solo aporta roughness y la ruta de sample lo ignora. Un sample con carga evaluativa necesita UN FICHERO POR INTENT, que es lo que hace signal con ping frente a error y la verdadera razon de que fuese la excepcion. Es fisica del audio, no politica. Tocado: book-deviations §D.7 + §S-07 · sema.md §the sound catalogue (reescrita entera, con el orden y el limite del WAV) · CLAUDE.md §sema doctrine · los dos README del art · CONTINUE-sema-audit §3.0/§3.1/§3.6, que es el handoff vivo y estaba describiendo una cola que ya no existe. ⚠️ Prettier reformatea entero book-deviations.md y sema.md porque NO estaban formateados en HEAD; reaplicado a mano para que el diff sea solo lo mio. Mismo motivo por el que CLAUDE.md y arts/README.md van con 1-2 lineas en vez de 30. VERIFICADO: sema+morfo+sound 437/437 · check 75 = baseline · docs:check 0/618 · prettier limpio en los ficheros que toque. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 months ago
(`SOUNDS` — the named catalogue —, `SEMA_SOUND_VOICE`, the cascade). It
feat(sound): $sound orquestador (buses+voces+media) y player v2 F1-F3 sobre el servicio Rediseno clean-room del sonido (gate D-SR.1-12 firmado; la doctrina "la voz es del art" de PLAN-sound-engine s16.1 queda revocada): - Mezcla: master -> buses ui/content (gain/mute/duck refcount, gana la mas fuerte; politica pre-contexto). prefs de UI jamas tocan la obra. - Voces registradas: la calibracion es DATO del consumidor (sema registra 'sema'; el default conserva la calibracion historica - cero cambio audible, A/B del usuario: "suena igual"). - Ciudadania de media: sound.media(el) PROVEE el transporte (la forma exacta del puerto MediaProvider) + foco mixed/exclusive/duck PERSISTENTE (estado derivado; el ducker mas reciente retiene la palabra) + duckUiWhileContent + MediaSession de la fuente activa (play/pause/seekto + posicion, liberacion y promocion) + visibilidad content-aware + attach() opt-in (irreversible, CORS declarado). Re-registro idempotente por elemento. - diagnostics.ts con catalogo tipado (contrato de arts) y guards post-dispose (ningun camino abre un contexto huerfano). Auditoria AU-1..9 resuelta; bundle medido: 16,2 KB min / 5,6 KB gz. Player v2 (gate D-AP2.1-13 firmado) F1-F3: - F1 gaps de framework: aria-valuetext en Slider (valueText por thumb) + parte SecondaryRange con token --slider-secondary-bg (buffer/clip/capitulos) + formatDuration en $libs/days + fix del selector del pack (H-1: la regla de play/pause construia sobre provider y el stamp aterriza en play-button). - F2 morfo: 6 partes audio-only (artwork/artist/identity/transport/ rate-button/live-indicator), commit-set-rate, commit-set-time RETIRADO (D-AP2.13: el scrubber delega en el commit-set del Slider compuesto), sustain-loading cableado (H-9), teclado j/l, </> y 0-9 (con guard de modificadores para no pisar atajos del navegador). - F3 la migracion: el transporte default es uix.sound.media(el, {metadata}) (pineado con el motor real); nativeMediaProvider RETIRADO (media-provider.ts queda como contrato puro del puerto, sin shim); G-5: los commits de play/mute/rate cabalgan el evento de RESULTADO (play/pause saltando el pause de ended, volumechange con transicion de muted, ratechange); formatTime -> formatDuration; sub-providers + wrappers + exports de las 6 partes; prop metadata publica (captura al registrar, documentado). Verificacion: 45 suites / 458 tests verdes en el alcance (sound, sema, active-uix, active-app, morfo, slider, media-player, days) - check 74 = baseline de la rama, 0 propios - docs:check 0 - invariante de UN AudioContext intacta (e2e sin tocar). Planes de proceso y handoff al dia (PLAN-sound-redesign, PLAN-audio-player-v2, CONTINUE-sound-engine). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 months ago
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.