HEL-833: restore runtime factory and verify R3 memory contracts
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -208,10 +208,13 @@ def create_app(
|
||||
app.state.sharing = Sharing(store, router, models)
|
||||
app.state.persona = Persona(store, router, models, enabled=life_config.enabled)
|
||||
app.state.public = PublicView(store)
|
||||
app.state.memories = Memories(store, router, models, timezone=life_config.timezone)
|
||||
app.state.life = LifeRuntime(store, router, models, life_config, app.state.sharing, app.state.persona)
|
||||
# Preserve the original runtime factory contract. Assemble only after its
|
||||
# clock is known, before any recovery or background work can run.
|
||||
app.state.memories = Memories(store, router, models, timezone=life_config.timezone,
|
||||
clock=lambda: app.state.life.clock())
|
||||
app.state.life.memories = app.state.memories
|
||||
app.state.memories.recover()
|
||||
app.state.life = LifeRuntime(store, router, models, life_config, app.state.sharing, app.state.persona,
|
||||
memories=app.state.memories)
|
||||
life_task = asyncio.create_task(app.state.life.run())
|
||||
try:
|
||||
yield
|
||||
|
||||
Reference in New Issue
Block a user