Files
openclaw/extensions/memory-core/openclaw.plugin.json
Peter Steinberger 9d9dc31275 feat(memory): session provenance, admission policy, and openclaw memory forget (#130151)
* feat(state): add memory entry origins and session tombstone tables with session-aware write provenance

Additive same-version per-agent tables (memory_entry_origins, memory_session_tombstones) declared canonically with lazy idempotent ensure; read-only agent DB access exposed through the SDK; memory-write observers and the session-memory hook record the authoring session; archived narrative transcripts classified by authoritative run identity.

* feat(memory): admission policy, entry provenance, and openclaw memory forget

memoryPolicy.excludeSessions keeps configured sources out of the dreaming pipeline with recorded exclusions; promotion writes are marker-addressable and carry per-session origins through consolidation; memory forget purges whole entries and every derived artifact (corpus lines, diary quotes, index/FTS/vec/cache, short-term state, backups), reports curated agent writes from transcripts, and tombstones purged sessions so ingestion, backfill, and transcript indexing never re-admit them.

* docs(memory): document admission policy, memory forget, and provenance boundaries

* fix(memory): open the vec probe through openNodeSqliteDatabase

Kysely guardrail forbids direct node:sqlite constructors in production; the in-memory extension probe now uses the canonical opener.

* fix(memory): resolve archived and explicit sessions in memory forget

Explicit --session selectors union live session windows, transcript archives, and exact unresolved ids so an operator-named session always purges and tombstones instead of silently no-oping after lifecycle archival; reports carry per-session resolution sources. ClawSweeper P1 on #130151.

* fix(memory): reconcile consolidation origins for every workspace agent

Shared workspaces record entry origins per source agent; consolidation now re-keys and prunes origins in each participating agent's database (membership from the authoritative dreaming workspace mapping), so a non-owner agent's later memory forget still finds the live consolidated entry. ClawSweeper re-review P1 on #130151.
2026-08-26 10:57:04 -07:00

262 lines
7.7 KiB
JSON

{
"id": "memory-core",
"doctorContract": {
"stateMigrations": true
},
"name": "OpenClaw Memory",
"cliCommands": [
{
"name": "memory",
"description": "Search, inspect, and reindex memory files",
"hasSubcommands": true
}
],
"activation": {
"onStartup": false
},
"kind": "memory",
"contracts": {
"tools": ["intent", "memory_get", "memory_search"]
},
"toolMetadata": {
"intent": {
"profiles": ["coding", "messaging"]
},
"memory_get": {
"replaySafe": true
}
},
"commandAliases": [
{
"name": "dreaming",
"kind": "runtime-slash",
"cliCommand": "memory"
}
],
"uiHints": {
"dreaming.enabled": {
"label": "Dreaming Enabled",
"help": "Run the default background memory consolidation sweep. Disable to stop the managed schedule."
},
"dreaming.frequency": {
"label": "Dreaming Frequency",
"placeholder": "0 3 * * *",
"help": "Optional cron cadence for the full dreaming sweep (light, REM, then deep)."
},
"dreaming.model": {
"label": "Dreaming Model",
"placeholder": "anthropic/claude-sonnet-4-6",
"help": "Optional provider/model override for Dream Diary narrative subagent runs. Requires plugins.entries.memory-core.subagent.allowModelOverride."
},
"dreaming.phases.deep.maxPriorEntryLossFraction": {
"label": "Maximum Prior Entry Loss",
"help": "Maximum fraction of prior MEMORY.md entries an accepted consolidation rewrite may remove."
}
},
"configSchema": {
"type": "object",
"additionalProperties": false,
"properties": {
"memoryPolicy": {
"type": "object",
"additionalProperties": false,
"properties": {
"excludeSessions": {
"type": "object",
"additionalProperties": false,
"properties": {
"hookExternalContentSources": {
"type": "array",
"items": { "type": "string" }
},
"channels": {
"type": "array",
"items": { "type": "string" }
},
"chatTypes": {
"type": "array",
"items": { "type": "string", "enum": ["direct", "group", "channel"] }
}
}
}
}
},
"dreaming": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": true
},
"frequency": {
"type": "string"
},
"model": {
"type": "string"
},
"timezone": {
"type": "string"
},
"verboseLogging": {
"type": "boolean"
},
"storage": {
"type": "object",
"additionalProperties": false,
"properties": {
"mode": {
"type": "string",
"enum": ["inline", "separate", "both"]
},
"separateReports": {
"type": "boolean"
}
}
},
"execution": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaults": {
"type": "object",
"additionalProperties": false,
"properties": {
"model": {
"type": "string"
}
}
}
}
},
"phases": {
"type": "object",
"additionalProperties": false,
"properties": {
"light": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"lookbackDays": {
"type": "integer",
"minimum": 0
},
"limit": {
"type": "integer",
"minimum": 0
},
"dedupeSimilarity": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"execution": {
"type": "object",
"additionalProperties": false,
"properties": {
"model": {
"type": "string"
}
}
}
}
},
"deep": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"limit": {
"type": "integer",
"minimum": 0
},
"minScore": {
"type": "number",
"minimum": 0,
"maximum": 1,
"default": 0.75
},
"minRecallCount": {
"type": "integer",
"minimum": 0,
"default": 3
},
"minUniqueQueries": {
"type": "integer",
"minimum": 0,
"default": 3
},
"recencyHalfLifeDays": {
"type": "integer",
"minimum": 0
},
"maxAgeDays": {
"type": "integer",
"minimum": 1
},
"maxPromotedSnippetTokens": {
"type": "integer",
"minimum": 1,
"description": "Maximum estimated token count for each short-term recall snippet promoted into MEMORY.md. Provenance metadata remains attached to the entry."
},
"maxPriorEntryLossFraction": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Maximum fraction of prior MEMORY.md entries a consolidation rewrite may remove before OpenClaw rejects it and uses append-only fallback."
},
"execution": {
"type": "object",
"additionalProperties": false,
"properties": {
"model": {
"type": "string"
}
}
}
}
},
"rem": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"lookbackDays": {
"type": "integer",
"minimum": 0
},
"limit": {
"type": "integer",
"minimum": 0
},
"minPatternStrength": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"execution": {
"type": "object",
"additionalProperties": false,
"properties": {
"model": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}