Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

1.2 KB
Raw Blame

Document Model Conventions

Boundary

  • This package owns the pure, schema-versioned Room Document model shared by Web and Document Runtime: BlockNote schema, Yjs assembly and validation, reference inspection, Selection Anchor resolution, proposal application, deterministic materialization, export, and full-state fingerprinting.
  • It must not own HTTP, persistence, Room permission, React state, process startup, Jobs, Artifact lifecycle, or object storage.

Structure

  • Keep code flat while one cohesive behavior cluster remains small. Create a feature directory only when its implementation and interface-level tests move together; do not add nested export-only barrels.
  • Preserve the package entrypoint at src/index.ts once executable code is introduced. Cross-boundary callers import the package name, never a deep path.
  • Test deterministic behavior through exported interfaces with fixed Yjs/BlockNote fixtures. Do not test private helpers or reproduce the implementation to compute expected values.
  • Replacing or updating blocks may retain the IDs of their removed descendants. Check replacement ID collisions against the blocks outside the complete replaced subtrees, while keeping all replacement IDs unique.