Skip to content

v0.7.0: prune per tenant

Choose a tag to compare

@eadwinCode eadwinCode released this 30 Sep 10:16
· 48 commits to main since this release
da3fed9

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.pruneEvents and AgentCore.PruneEvents apply it. The low-level pruneEvents(deps) and core.PruneEvents prune with the state deps is bound with.

Breaking (Go only)

  • EventPruner.Prune takes a trailing sc 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 an EventPruner.

TS has no breaking changes. The optional events.prune port now declares the ctx argument the bound storage was already passing.