Skip to main content

entity-stream-queries

Querying electric agent runtime entity streams and manifest state with @durable-streams/state/db queryOnce and useLiveQuery. Use when reading built-in entity collections like manifests, wakes, child_status, inbox, runs, or shared state from runtime code, tests, examples, or CLI code. Prefer direct typed queries over one-off read helpers.

Datos de origen

Repositorio
electric-sql/electric
Última actividad en el origen
3 de junio de 2026 a las 14:31
Idioma detectado de SKILL.md
inglés
Estrellas
10.393
Forks
393

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Explorador de archivos
3 archivos

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
entity-stream-queries
description
Querying electric agent runtime entity streams and manifest state with @durable-streams/state/db queryOnce and useLiveQuery. Use when reading built-in entity collections like manifests, wakes, child_status, inbox, runs, or shared state from runtime code, tests, examples, or CLI code. Prefer direct typed queries over one-off read helpers.
Read `packages/state/skills/stream-db/SKILL.md` first for StreamDB and query basics. # Electric Agent Runtime Entity Stream Queries Use direct typed queries against `db.collections.*`. Principles: - Prefer `queryOnce(...)` for one-shot reads and `useLiveQuery(...)` or shared live query collections for reactive UI. - Do not add exported convenience read helpers for obvious queries. The query itself is already the API. - Keep code helpers only for real invariants: - manifest key builders - typed event/write helpers - shared product-facing projections such as the entity timeline query - In runtime, tests, examples, and CLI code, favor direct queries over raw `toArray` scans when the read is naturally query-shaped. - Do not cast around `db.collections.*`. The row types come from the schema. Read these references as needed: - `references/collections.md` for the built-in entity collections and manifest row kinds - `references/common-queries.md` for common query patterns When writing to entity or shared-state streams, use the typed event helpers/server APIs. Do not hand-build stream event envelopes.
Ver en GitHub