#memory

14 files tagged memory.

loom-sprint-scaffoldtest

Context Assembler.Test

/** * ContextAssembler tests (H4.1). * * Proves: * - Budget NEVER exceeded: table-driven over budgets {0, tiny, ex…

TS245 lines8,542 bytes
loom-sprint-scaffoldtest

Compactor.Test

/** * Compactor tests (H4.5). * * Proves: * - Compactor output records all validate against memory-record.schema.j…

TS178 lines6,156 bytes
loom-sprint-scaffoldtest

Scope Wall.Test

/** * ScopeWall tests (H4.3). * * Proves: * - Same-scope read works (constructor requires scope) * - Cross-scop…

TS266 lines8,984 bytes
loom-sprint-scaffoldtest

Helpers

/** * Test helpers for memory module tests. * * Provides: * - FakeD1: in-memory SQLite (bun:sqlite) implementing D…

TS324 lines10,577 bytes
loom-sprint-scaffoldtest

Pointer Hierarchy.Test

/** * PointerHierarchy tests (H4.4). * * Proves: * - memory_expand round-trips: put full text in fake BlobStore → …

TS188 lines6,753 bytes
loom-sprint-scaffoldtest

Promotion Engine.Test

/** * PromotionEngine tests (H4.2). * * Proves: * - Promotion fires at EXACTLY m_promote distinct traces (not m-1;…

TS212 lines9,720 bytes
loom-sprint-scaffoldtest

Semantic Index.Test

/** * SemanticIndex contract test suite. * * Shared tests run against BOTH Fts5Index (with fake D1/SQLite) and * Vec…

TS238 lines9,598 bytes
loom-sprint-scaffoldsource

Index

/** * Loop 4 — Memory Service: thin worker shell. * * Factory: pick VectorizeIndex when env.SEMANTIC binding present,…

TS259 lines8,844 bytes
loom-sprint-scaffoldsource

Pointer Hierarchy

/** * H4.4 — Pointer Hierarchy. * * topic → summary → episodic_ref (R2 key). * * memoryExpand(record_id): resolve e…

TS119 lines3,691 bytes
loom-sprint-scaffoldsource

Promotion Engine

/** * H4.2 — Promotion Engine. * * episodic → semantic: when a pattern recurs across ≥ m_promote distinct traces. * …

TS198 lines6,260 bytes
loom-sprint-scaffoldsource

Scope Wall

/** * H4.3 — Scope Wall. * * All reads/writes carry a required scope. Default read path filters to the * caller's sc…

TS117 lines3,264 bytes
loom-sprint-scaffoldsource

Semantic Index

/** * H4.6 — SemanticIndex: search abstraction with two implementations. * * VectorizeIndex — wraps Cloudflare Vecto…

TS161 lines5,866 bytes
loom-sprint-scaffoldsource

Compactor

/** * H4.5 — Compactor: summarize raw working context into semantic MemoryRecords. * * compactStage(goal_id, stage_id…

TS208 lines6,662 bytes
loom-sprint-scaffoldsource

Context Assembler

/** * H4.1 — Context Assembler. * * assembleContext({scope, goal_id, query, token_budget}): * 1. Query SemanticIndex…

TS229 lines8,047 bytes