openclaw/src/agents/pi-embedded-runner
Radek Paclt e0b1561e16 feat(memory): add lifecycle hooks and vector memory plugin
Add plugin lifecycle hooks infrastructure:
- before_agent_start: inject context before agent loop
- agent_end: analyze conversation after completion
- 13 hook types total (message, tool, session, gateway hooks)

Memory plugin implementation:
- LanceDB vector storage with OpenAI embeddings
- kind: "memory" to integrate with upstream slot system
- Auto-recall: injects <relevant-memories> when context found
- Auto-capture: stores preferences, decisions, entities
- Rule-based capture filtering with 0.95 similarity dedup
- Tools: memory_recall, memory_store, memory_forget
- CLI: clawdbot ltm list|search|stats

Plugin infrastructure:
- api.on() method for hook registration
- Global hook runner singleton for cross-module access
- Priority ordering and error catching

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 06:59:03 +00:00
..
run feat(memory): add lifecycle hooks and vector memory plugin 2026-01-18 06:59:03 +00:00
abort.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
compact.ts refactor: add hook guards and test helpers 2026-01-18 06:15:24 +00:00
extensions.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
extra-params.ts fix: align ZAI thinking toggles 2026-01-16 22:26:43 +00:00
google.test.ts fix(google): scrub tool schemas for gemini 2026-01-16 06:57:54 +00:00
google.ts chore: run format and fix sandbox browser timeouts 2026-01-16 09:18:58 +00:00
history.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
lanes.ts refactor(src): split oversized modules 2026-01-14 01:17:56 +00:00
logger.ts refactor(src): split oversized modules 2026-01-14 01:17:56 +00:00
model.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
run.ts feat: add /exec session overrides 2026-01-18 06:12:54 +00:00
runs.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
sandbox-info.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
session-manager-cache.ts refactor(src): split oversized modules 2026-01-14 01:17:56 +00:00
session-manager-init.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
system-prompt.ts feat: refine subagents + add chat.inject 2026-01-15 23:44:31 +00:00
tool-split.ts chore: migrate to oxlint and oxfmt 2026-01-14 15:02:19 +00:00
types.ts fix: reset sessions after role ordering conflicts 2026-01-16 09:04:04 +00:00
utils.ts feat: notify on exec exit 2026-01-17 05:43:34 +00:00