@byte5ai/palaia 2.3.6 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # @byte5ai/palaia
2
2
 
3
- **Palaia memory backend for OpenClaw.**
3
+ **palaia memory backend for OpenClaw.**
4
4
 
5
- Replace OpenClaw's built-in `memory-core` with Palaia — local, cloud-free, WAL-backed agent memory with tier routing and semantic search.
5
+ Replace OpenClaw's built-in `memory-core` with palaia — local, cloud-free, WAL-backed agent memory with tier routing and semantic search.
6
6
 
7
7
  ## Installation
8
8
 
9
9
  ```bash
10
- # Install Palaia (Python CLI)
10
+ # Install palaia (Python CLI)
11
11
  pip install palaia
12
12
 
13
13
  # Install the OpenClaw plugin
@@ -59,7 +59,7 @@ All options are optional — sensible defaults are used:
59
59
 
60
60
  ### `memory_search` (always available)
61
61
 
62
- Semantically search Palaia memory:
62
+ Semantically search palaia memory:
63
63
 
64
64
  ```
65
65
  memory_search({ query: "deployment process", maxResults: 5, tier: "all" })
@@ -122,7 +122,7 @@ OpenClaw Agent
122
122
 
123
123
  ```bash
124
124
  # Clone the repo
125
- git clone https://github.com/iret77/palaia.git
125
+ git clone https://github.com/byte5ai/palaia.git
126
126
  cd palaia/packages/openclaw-plugin
127
127
 
128
128
  # Install deps
package/index.ts CHANGED
@@ -1,19 +1,23 @@
1
1
  /**
2
- * @byte5ai/palaia — Palaia Memory Backend for OpenClaw
2
+ * @byte5ai/palaia — palaia Memory Backend for OpenClaw
3
3
  *
4
4
  * Plugin entry point. Loaded by OpenClaw via jiti (no build step needed).
5
5
  *
6
6
  * Registers:
7
- * - memory_search: Semantic search over Palaia memory
8
- * - memory_get: Read a specific memory entry
9
- * - memory_write: Write new entries (optional, opt-in)
10
- * - before_prompt_build: Query-based contextual recall (opt-in, Issue #65)
11
- * - agent_end: Auto-capture of significant exchanges (opt-in, Issue #64)
12
- * - palaia-recovery: WAL replay on startup
7
+ * - Tools: memory_search, memory_get, memory_write
8
+ * - MemoryPromptSection: Guided tool usage hints
9
+ * - Session hooks (always): session_start, session_end, before_reset,
10
+ * llm_input, llm_output, after_tool_call, subagent_spawning, subagent_ended
11
+ * - ContextEngine (modern) OR legacy hooks (before_prompt_build, agent_end,
12
+ * message_received, message_sending)
13
13
  *
14
- * Phase 1.5: ContextEngine adapter support. When the host provides
15
- * api.registerContextEngine, palaia registers as a ContextEngine.
16
- * Otherwise, falls back to legacy hook-based integration.
14
+ * v3.0 Features:
15
+ * - Session continuity: Auto-briefing on session start / LLM switch
16
+ * - Session summaries: Auto-saved on session end / reset
17
+ * - Tool observations: Tracked via after_tool_call
18
+ * - Progressive disclosure: Compact mode for large memory stores
19
+ * - Privacy markers: <private> blocks excluded from capture
20
+ * - Recency boost: Fresh memories ranked higher
17
21
  *
18
22
  * Activation:
19
23
  * plugins: { slots: { memory: "palaia" } }
@@ -22,21 +26,20 @@
22
26
  import { resolveConfig, type PalaiaPluginConfig } from "./src/config.js";
23
27
  import { registerTools } from "./src/tools.js";
24
28
  import { registerHooks } from "./src/hooks/index.js";
29
+ import { registerSessionHooks } from "./src/hooks/session.js";
25
30
  import { createPalaiaContextEngine } from "./src/context-engine.js";
26
31
  import type { OpenClawPluginApi, OpenClawPluginEntry } from "./src/types.js";
27
32
 
28
33
  // Plugin entry point compatible with OpenClaw plugin-sdk definePluginEntry
29
34
  const palaiaPlugin: OpenClawPluginEntry = {
30
35
  id: "palaia",
31
- name: "Palaia Memory",
32
- async register(api: OpenClawPluginApi) {
33
- // Issue #66: Plugin config is currently resolved GLOBALLY via api.getConfig("palaia").
36
+ name: "palaia Memory",
37
+ register(api: OpenClawPluginApi) {
38
+ // Issue #66: Plugin config is resolved GLOBALLY via api.pluginConfig.
34
39
  // OpenClaw does NOT provide per-agent config resolution — all agents share the same
35
- // plugin config from openclaw.json → plugins.config.palaia.
36
- // A per-agent resolver would require an OpenClaw upstream change where api.getConfig()
37
- // accepts an agentId parameter or automatically scopes to the current agent context.
38
- // See: https://github.com/iret77/palaia/issues/66
39
- const rawConfig = api.getConfig?.("palaia") as
40
+ // plugin config from openclaw.json → plugins.entries.palaia.config.
41
+ // See: https://github.com/byte5ai/palaia/issues/66
42
+ const rawConfig = api.pluginConfig as
40
43
  | Partial<PalaiaPluginConfig>
41
44
  | undefined;
42
45
  const config = resolveConfig(rawConfig);
@@ -51,9 +54,31 @@ const palaiaPlugin: OpenClawPluginEntry = {
51
54
  // Register agent tools (memory_search, memory_get, memory_write)
52
55
  registerTools(api, config);
53
56
 
57
+ // Register MemoryPromptSection for guided memory tool usage (v3.0)
58
+ if (api.registerMemoryPromptSection) {
59
+ api.registerMemoryPromptSection(({ availableTools }) => {
60
+ const lines: string[] = [];
61
+ if (availableTools.has("memory_search")) {
62
+ lines.push("Use `memory_search` to find relevant memories by semantic query.");
63
+ }
64
+ if (availableTools.has("memory_get")) {
65
+ lines.push("Use `memory_get <id>` to retrieve full memory details by ID.");
66
+ }
67
+ if (availableTools.has("memory_write")) {
68
+ lines.push("Use `memory_write` for processes/SOPs and tasks only — conversation knowledge is auto-captured.");
69
+ }
70
+ return lines;
71
+ });
72
+ }
73
+
74
+ // Session lifecycle hooks are always registered (session_start, session_end,
75
+ // before_reset, llm_input, llm_output, after_tool_call).
76
+ // These work independently of the ContextEngine vs legacy hooks choice.
77
+ registerSessionHooks(api, config);
78
+
54
79
  // Register ContextEngine when available, otherwise use legacy hooks
55
80
  if (api.registerContextEngine) {
56
- api.registerContextEngine("palaia", createPalaiaContextEngine(api, config));
81
+ api.registerContextEngine("palaia", () => createPalaiaContextEngine(api, config));
57
82
  } else {
58
83
  registerHooks(api, config); // Legacy fallback
59
84
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "palaia",
3
- "name": "Palaia Memory",
3
+ "name": "palaia Memory",
4
4
  "kind": "memory",
5
5
  "skills": ["./skill"],
6
6
  "configSchema": {
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "workspace": {
14
14
  "type": "string",
15
- "description": "Palaia workspace path (default: agent workspace)"
15
+ "description": "palaia workspace path (default: agent workspace)"
16
16
  },
17
17
  "tier": {
18
18
  "type": "string",
@@ -106,7 +106,7 @@
106
106
  },
107
107
  "uiHints": {
108
108
  "binaryPath": {
109
- "label": "Palaia Binary Path",
109
+ "label": "palaia Binary Path",
110
110
  "placeholder": "auto-detect"
111
111
  },
112
112
  "workspace": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@byte5ai/palaia",
3
- "version": "2.3.6",
4
- "description": "Palaia memory backend for OpenClaw",
3
+ "version": "2.7.1",
4
+ "description": "palaia memory backend for OpenClaw",
5
5
  "main": "index.ts",
6
6
  "openclaw": {
7
7
  "extensions": [
@@ -25,7 +25,7 @@
25
25
  "license": "MIT",
26
26
  "repository": {
27
27
  "type": "git",
28
- "url": "https://github.com/iret77/palaia.git",
28
+ "url": "https://github.com/byte5ai/palaia.git",
29
29
  "directory": "packages/openclaw-plugin"
30
30
  },
31
31
  "peerDependencies": {