feat: upgrade from skill to lifecycle plugin (v2.0.0)

Replace prompt-based skill approach with OpenClaw lifecycle hooks
(before_agent_start, agent_end, before_compaction, before_reset).
State injection now happens automatically at the hook level,
making it model-agnostic and reliable across all providers.

- Add index.js with 5 lifecycle hooks
- Add openclaw.plugin.json manifest
- Rewrite post-install.sh to handle plugin installation
- Update README with plugin architecture docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-15 14:11:14 +10:00
co-authored by Claude Opus 4.6
parent 38c1fe875d
commit 9ab2667aa3
4 changed files with 495 additions and 190 deletions
+32
View File
@@ -0,0 +1,32 @@
{
"id": "memory-continuity",
"name": "Memory Continuity",
"description": "Preserves working state across /new, reset, compaction, and gateway restarts via a simple markdown checkpoint file.",
"version": "2.0.0",
"configSchema": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxStateLines": {
"type": "number",
"default": 50,
"description": "Max lines for CURRENT_STATE.md before auto-compress warning"
},
"archiveOnNew": {
"type": "boolean",
"default": true,
"description": "Archive CURRENT_STATE.md to session_archive/ on /new"
},
"autoExtract": {
"type": "boolean",
"default": true,
"description": "Auto-extract working state from conversation at agent_end"
}
}
},
"uiHints": {
"maxStateLines": { "label": "Max state file lines", "help": "Keep checkpoint small for fast recovery" },
"archiveOnNew": { "label": "Archive on /new", "help": "Save a snapshot before session reset" },
"autoExtract": { "label": "Auto-extract state", "help": "Automatically save working state when conversation ends" }
}
}