Wire assembleView into executeLLM with atomic/eventual recall - #17
Open
mattapperson wants to merge 3 commits into
Open
Wire assembleView into executeLLM with atomic/eventual recall#17mattapperson wants to merge 3 commits into
mattapperson wants to merge 3 commits into
Conversation
…call modes Connect the dormant memory pipeline (allocateBudgets, recallLayers, assembleView, storeLayers) into the LLM execution path. Layers now participate in every callModel cycle: init → budget → recall → assemble → call → store. Add recallMode to MemoryLayer: atomic (default, blocks callModel) vs eventual (uses cached results, refreshes on state change). Add ProjectionPolicy config at harness and step levels.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Move init sentinel inside storage guard so layers aren't falsely marked initialized when no storage adapter is configured - Make recallLayersEventual fully non-blocking: first call returns empty and seeds cache in background, stale calls return cached value immediately - Evict cache entries when stale refresh yields empty results - Add .catch() to fire-and-forget recall promises to prevent unhandled rejections - Sort eventual layers by slot order for consistent prompt assembly - Count system messages from item log in budget allocation - Add clearRecallCache and call it in disposeLayers to prevent leaks
…tructions Merge main's `instructions` field (renamed from `system`) into the PR's memory pipeline code. Both features now coexist: assembleView builds the request items while `step.instructions` is passed through to callModel. Also fixes pre-existing type mismatch in CallModelRequestWithoutTools where ctx was typed as `undefined` but always passed.
mattapperson
force-pushed
the
feat/assemble-view-wiring
branch
from
April 1, 2026 14:18
81cc382 to
39eeda2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
executeLLM:initLayers→allocateBudgets→recallLayersAtomic+recallLayersEventual→assembleView→callModel→storeLayersrecallModetoMemoryLayer:'atomic'(default, blocks callModel) vs'eventual'(cached, refreshes on state change via store)ProjectionPolicyconfig at harness level (default) and step level (override)Changed files
execute-llm.ts— core pipeline wiring withpartitionItemshelperlayer-lifecycle.ts—recallLayersAtomic(),recallLayersEventual(),RecallCachetype, stale marking instoreLayersagent-harness.ts—projectionconfig,recallCachefield, new recall methodstypes/memory.ts—recallModeonMemoryLayertypes/step.ts—projectiononStepLLMtypes/runtime.ts—projectiononAgentConfig, new methods onAgentHarnessContractobservational-memory.ts— only built-in layer withrecallMode: 'eventual'specs/11-memory-layer-system.md— recall modes, assembly algorithm, ProjectionPolicy docsProjectionPolicysectionTest plan
execute-llm.test.tsandlayer-lifecycle.test.tsrecallLayersAtomicfilters to atomic layers onlyrecallLayersEventualreturns cached results, re-recalls on staleexecuteLLMcalls recall + store when layers presentexecuteLLMskips pipeline when no layers (existing behavior preserved)bunx biome checkcleanCallModelRequestunion error)