Repository navigation
v0.7.0: prune per tenant
PruneEvents can now prune one tenant's events, so a storage that keeps a database per tenant can clear the old stream-only rows. Go module github.com/eadwinCode/agentic-kit/packages/go-agentenkit@v0.7.0, npm agentenkit@0.7.0 and use-agentenkit@0.7.0.
Changed (#26)
- New option:
PruneOptions.State(TS:runtime.pruneEvents({ state })) reaches the storage the same way a run's state does. Run it once per tenant. With no state, it works as before. - Where it applies:
runtime.pruneEventsandAgentCore.PruneEventsapply it. The low-levelpruneEvents(deps)andcore.PruneEventsprune with the statedepsis bound with.
Breaking (Go only)
EventPruner.Prunetakes a trailingsc ports.StorageContext, like every other storage method. A custom adapter that prunes has to add it. The kit's memory, SQLite and Postgres adapters are updated.BoundEvents.Pruner()returns a*ports.BoundPruner, with the context already attached, instead of anEventPruner.
TS has no breaking changes. The optional events.prune port now declares the ctx argument the bound storage was already passing.