Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## v2.8.0 — 2026-05-12

### Changed
- **OpenClaw 2026.5.7 compatibility** — Bumped peer dependency from `>=2026.3.22` to `>=2026.5.7`.
- **ContextEngineFactory** — Factory now receives `ContextEngineFactoryContext` (`workspaceDir`, `agentDir`) from the OpenClaw runtime, enabling reliable workspace resolution without relying on `api.workspace` workarounds.
- **registerMemoryCapability** — Plugin now uses the v2026.5.7 `registerMemoryCapability` API for memory prompt guidance instead of the deprecated `registerMemoryPromptSection`. Fallback to the legacy API is preserved for hosts running older OpenClaw versions.
- **assemble() — availableTools guard** — Memory context injection is now skipped automatically on turns where no memory tools (`memory_search`, `memory_get`, `memory_write`) are available, avoiding wasted system prompt budget.
- **assemble() — citationsMode** — When OpenClaw's citations mode is active, palaia appends citation guidance to the injected memory context, prompting the agent to reference memory IDs in its reply.
- **Plugin SDK types** — `types.ts` updated to reflect the OpenClaw v2026.5.7 plugin SDK: new `ContextEngineFactoryContext`, `TranscriptRewriteReplacement/Request/Result`, `ContextEngineMaintenanceResult`, `ContextEnginePromptCacheInfo`, `MemoryPluginCapability`, additional hook names (`before_agent_reply`, `model_call_started`, `model_call_ended`), and extended optional fields on existing interfaces.

---

## v2.7.3 — 2026-04-07

### Fixed
Expand Down
10 changes: 6 additions & 4 deletions SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: palaia
version: "2.7.3"
version: "2.8.0"
description: >
Local, crash-safe persistent memory for OpenClaw agents.
SQLite-backed by default. Semantic search, projects, scopes, auto-capture.
Expand All @@ -25,9 +25,11 @@ metadata:
- command: "python3 -m pip install --upgrade 'palaia[fastembed]' && openclaw plugins install @byte5ai/palaia && palaia doctor --fix && palaia warmup"
label: "Upgrade palaia with semantic search + plugin and run health checks"
postUpdateMessage: >
palaia has been updated to v2.7.3. Fixes: ContextEngine compaction conflict
with OpenClaw, doctor phantom stale-task warnings, invisible entries with
empty scope. Run `palaia doctor --fix` to verify.
palaia v2.8.0 is now compatible with OpenClaw 2026.5.7. The OpenClaw plugin
uses the new ContextEngineFactoryContext for reliable workspace resolution
and registerMemoryCapability for memory prompt guidance. Memory injection
now skips turns where no memory tools are available, and respects
citationsMode when active. No action required — everything works as before.
plugin:
slot: memory
package: "@byte5ai/palaia"
Expand Down
48 changes: 31 additions & 17 deletions packages/openclaw-plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,45 @@ const palaiaPlugin: OpenClawPluginEntry = {
// Register agent tools (memory_search, memory_get, memory_write)
registerTools(api, config);

// Register MemoryPromptSection for guided memory tool usage (v3.0)
if (api.registerMemoryPromptSection) {
api.registerMemoryPromptSection(({ availableTools }) => {
const lines: string[] = [];
if (availableTools.has("memory_search")) {
lines.push("Use `memory_search` to find relevant memories by semantic query.");
}
if (availableTools.has("memory_get")) {
lines.push("Use `memory_get <id>` to retrieve full memory details by ID.");
}
if (availableTools.has("memory_write")) {
lines.push("Use `memory_write` for processes/SOPs and tasks only — conversation knowledge is auto-captured.");
}
return lines;
});
// Register memory prompt guidance for agents.
// Uses the v2026.5.7 registerMemoryCapability API when available;
// falls back to the deprecated registerMemoryPromptSection for older hosts.
const memoryPromptBuilder = ({ availableTools }: { availableTools: Set<string>; citationsMode?: string }) => {
const lines: string[] = [];
if (availableTools.has("memory_search")) {
lines.push("Use `memory_search` to find relevant memories by semantic query.");
}
if (availableTools.has("memory_get")) {
lines.push("Use `memory_get <id>` to retrieve full memory details by ID.");
}
if (availableTools.has("memory_write")) {
lines.push("Use `memory_write` for processes/SOPs and tasks only — conversation knowledge is auto-captured.");
}
return lines;
};

if (api.registerMemoryCapability) {
api.registerMemoryCapability("palaia", { promptBuilder: memoryPromptBuilder });
} else if (api.registerMemoryPromptSection) {
api.registerMemoryPromptSection(memoryPromptBuilder);
}

// Session lifecycle hooks are always registered (session_start, session_end,
// before_reset, llm_input, llm_output, after_tool_call).
// These work independently of the ContextEngine vs legacy hooks choice.
registerSessionHooks(api, config);

// Register ContextEngine when available, otherwise use legacy hooks
// Register ContextEngine when available, otherwise use legacy hooks.
// The factory receives ContextEngineFactoryContext (v2026.5.7+) which
// provides workspaceDir / agentDir for reliable workspace resolution.
if (api.registerContextEngine) {
api.registerContextEngine("palaia", () => createPalaiaContextEngine(api, config));
api.registerContextEngine("palaia", (ctx) => {
const effectiveWorkspace =
ctx?.workspaceDir ||
config.workspace ||
(typeof api.workspace === "string" ? api.workspace : api.workspace?.dir);
return createPalaiaContextEngine(api, { ...config, workspace: effectiveWorkspace });
});
} else {
registerHooks(api, config); // Legacy fallback
}
Expand Down
Loading
Loading