openclaw/docs/plugins/sdk-overview
Josh Lehman 32339db16b
feat(memory): let the memory slot own the pre-compaction flush (#162177)
* feat(memory): let the memory slot own the pre-compaction flush

A memory plugin that does not store workspace files could not persist
the pre-compaction memory flush.

A flush plan resolver may return a MemoryFlushToolsPlan beside the file
plan: the memory slot owner may name persistence tools and read-only
lookup tools it owns. A tools-arm flush exposes read plus those tools after normal
tool policy, runs with the source turn's memory audience delegated to
the detached flush session (when a native provider owns the slot) and a
flushId derived from the source session incarnation that stays stable
across fallback and retry, and succeeds only after a non-error
persistence call or NO_REPLY. Post-turn maintenance copies keep
senderIsOwner false but carry the source turn's trusted owner status for
the flush audience. Sidecar resolvers cannot return a tools arm, and
plans whose lookup and persistence tools overlap are skipped with a
warning. Only a native provider's flush runs for a session that cannot
write its workspace; other resolvers are not called for such sessions.

Flush timing (enabled, soft threshold, forced transcript size, reserve
floor, context-window cap) is now resolved once in the host. The
released MemoryFlushPlan keeps its shape; a resolver may instead return
a MemoryFlushFilePlanDraft whose omitted timing fields the host fills,
and defined timing fields are deliberate overrides. The configured flush
model fills a tools-arm plan's omitted model; a file plan names its own
model, so a legacy plan without one keeps the session's model. Memory
Core's resolver returns its prompts, dated path, and configured model.

* fix(memory): keep the released flush plan resolver contract

Restore flushPlanResolver to its released MemoryFlushPlan | null return so
null-checked consumers keep compiling, and add providerFlushPlanResolver for
host-completed file drafts and tool persistence plans. The host binds the
winning resolver to its supplier as one unit across sidecar merges, so a
sidecar's resolver is never credited to the slot owner. Memory Core keeps its
released resolver unchanged.
2026-10-03 06:45:01 -07:00
..
capabilities.md perf(cloud workers): download the worker bundle while the node bootstrap installs (#164187) 2026-10-03 03:12:55 -07:00
cli-and-discovery.md fix(cli): release plugin resources when help finishes (#160181) 2026-09-30 15:28:57 -07:00
events-and-hooks.md
host-hooks.md docs(plugins): correct the rendered Control UI descriptor surfaces (#147599) 2026-09-30 16:15:58 -07:00
imports.md refactor(plugin-sdk)!: retire unused command-auth, discord, and telegram-account facades (#163366) 2026-10-02 02:09:07 -07:00
infrastructure.md refactor(telegram): normalize stored offsets through Doctor (#163418) 2026-10-03 00:34:30 -07:00
memory-and-context.md feat(memory): let the memory slot own the pre-compaction flush (#162177) 2026-10-03 06:45:01 -07:00
tools-and-commands.md fix: recognize verified team admins as channel owners (#153508) 2026-09-21 19:56:45 -07:00