feat(curator): bind curators to memory engines
Closes archie-core-1786637499636 (bind curators to memory engines). curator.Registrar gets MemoryEngines, a MemoryEngineSource (Get(name) (domainmemory.MemoryEngine, bool)) mirroring domain/memory.Registry.Get's exact signature so the real registry satisfies it with no adapter. Registration enforces presence the same way Tools/Skills already do: a curator declaring Manifest.MemoryEngine with no MemoryEngineSource on the host is rejected at Register, and filter() clears MemoryEngines from a curator's view when it declared no engine. A curator with a declared name that turns out not to exist in the registry is not this layer's problem -- Get(name) at call time returns false, same as ToolBuilder.Build with an undeclared tool. Resolution is by name at call time, not a value pre-fetched at Bind: a curator calls MemoryEngines.Get(its own Manifest().MemoryEngine) itself, the identical trust model ToolBuilder.Build(ctx, declared) already uses -- the curator is trusted to pass its own declared identifier, not handed something pre-scoped to it. Swapping the configured engine (a different name resolving through the same registry) changes where a curator's memories land with no change to the curator itself, since nothing about the curator's own code names a concrete engine. setupCurators wires b.memEngines (*domainmemory.Registry, set by setupMemoryAll which Run() calls first) straight in -- it already satisfies MemoryEngineSource. A curator declaring no memory engine remains valid (existing behavior, now also covered by the "nothing declared" and "no source" table cases) and is only ever affected by a memory operation it never has the means to attempt, since MemoryEngines is nil in its view.
This commit is contained in:
1 parent
d11fb949a3
commit
49a37118d4
4 files changed
+95
-6
No files matched your search
@@ -825,6 +825,11 @@ func (b *boot) setupCurators(ctx context.Context) {
|
||||
log := b.log
|
||||
b.curatorRegistry = curator.NewRegistry(curator.Registrar{
|
||||
Events: curatorEventSink{b.bus},
|
||||
// b.memEngines (*domainmemory.Registry) satisfies
|
||||
// curator.MemoryEngineSource's Get(name) signature directly, no
|
||||
// adapter needed. Set by setupMemoryAll, which Run() calls before
|
||||
// setupCurators.
|
||||
MemoryEngines: b.memEngines,
|
||||
})
|
||||
// The runtime owns the per-curator loops (archie-core-89x): one
|
||||
// goroutine per curator, wake nudges, per-pass budgets, panic
|
||||
|
||||
Reference in new issue
Block a user