palaia 2.4.dev1__tar.gz → 2.4.dev3__tar.gz
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.
- {palaia-2.4.dev1/palaia.egg-info → palaia-2.4.dev3}/PKG-INFO +50 -36
- {palaia-2.4.dev1 → palaia-2.4.dev3}/README.md +49 -35
- {palaia-2.4.dev1 → palaia-2.4.dev3}/SKILL.md +45 -5
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/SKILL.md +45 -5
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/__init__.py +1 -1
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/cli_args.py +2 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/cli_commands.py +14 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/embed_server.py +4 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/mcp/server.py +2 -1
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/search.py +4 -1
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/misc.py +18 -1
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/query.py +4 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/write.py +6 -1
- {palaia-2.4.dev1 → palaia-2.4.dev3/palaia.egg-info}/PKG-INFO +50 -36
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia.egg-info/SOURCES.txt +1 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/pyproject.toml +1 -1
- palaia-2.4.dev3/tests/test_search_cache.py +101 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_temporal_queries.py +49 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/CHANGELOG.md +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/LICENSE +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/MANIFEST.in +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/__main__.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/backends/__init__.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/backends/migrate.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/backends/postgres.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/backends/protocol.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/backends/sqlite.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/bm25.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/cli.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/cli_helpers.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/cli_nudge.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/config.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/curate.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/decay.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/doctor/__init__.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/doctor/checks.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/doctor/fixes.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/doctor/report.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/embed_client.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/embeddings.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/entry.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/enums.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/frontmatter.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/index.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/ingest.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/lock.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/locking.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/mcp/__init__.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/memo.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/metadata_index.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/migrate.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/nudge.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/packages.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/priorities.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/process_runner.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/project.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/project_lock.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/scope.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/__init__.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/admin.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/curate.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/ingest.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/memo.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/package.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/priorities.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/process.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/project.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/services/status.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/significance.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/store.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/sync.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/ui.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia/wal.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia.egg-info/dependency_links.txt +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia.egg-info/entry_points.txt +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia.egg-info/requires.txt +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/palaia.egg-info/top_level.txt +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/setup.cfg +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_agent_aliases.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_agent_flag.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_audit_fixes.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_auto_title.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_backend_migrate.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_backend_postgres.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_backend_sqlite.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_bm25.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_bounded_gc.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_capture_level.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_chain_cli.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_concurrent_writes.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_config.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_config_detection.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_cross_platform_lock.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_cross_project.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_curate.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_decay.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_detect.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_doctor.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_doctor_fix_chain.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_doctor_memos.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_doctor_staleness.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_doctor_version.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_embed_server.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_embed_server_socket.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_embeddings.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_entry_classes.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_frontmatter.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_gemini_embeddings.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_hit_decay.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_incremental_indexing.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_index.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_ingest.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_init_gatekeeper.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_init_no_agent.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_list_filters.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_locking.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_mcp_server.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_memo.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_metadata_index.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_migrate.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_multi_agent.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_nudge_tracker.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_packages.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_plugin_defaults_upgrade.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_priorities.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_process_nudge.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_process_runner.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_project.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_project_owner.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_scope.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_scope_enforcement.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_search.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_search_chain.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_significance.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_skill.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_ssrf.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_status_index_hint.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_store.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_sync.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_unicode.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_ux_improvements.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_wal.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_wal_corruption.py +0 -0
- {palaia-2.4.dev1 → palaia-2.4.dev3}/tests/test_warmup_reindex.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: palaia
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.dev3
|
|
4
4
|
Summary: Local, cloud-free memory for OpenClaw agents.
|
|
5
5
|
Author-email: byte5 GmbH <hello@byte5.de>
|
|
6
6
|
License: MIT
|
|
@@ -51,7 +51,7 @@ Dynamic: license-file
|
|
|
51
51
|
|
|
52
52
|
# Palaia — The Knowledge System for AI Agent Teams
|
|
53
53
|
|
|
54
|
-
**
|
|
54
|
+
**Your agents forget. Palaia doesn't.**
|
|
55
55
|
|
|
56
56
|
[](https://github.com/byte5ai/palaia/actions/workflows/ci.yml)
|
|
57
57
|
[](https://pypi.org/project/palaia/)
|
|
@@ -61,6 +61,54 @@ Dynamic: license-file
|
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
64
|
+
## What Palaia Does
|
|
65
|
+
|
|
66
|
+
AI agents are stateless by default. Every session starts from scratch — no memory of past decisions, no shared knowledge between agents, no context that survives a restart.
|
|
67
|
+
|
|
68
|
+
Palaia gives your agents a persistent, searchable knowledge store. They save what they learn. They find it again by meaning, not keyword. They share it across tools and sessions — automatically.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## What Palaia Is Not
|
|
73
|
+
|
|
74
|
+
- Not a chatbot or prompt manager
|
|
75
|
+
- Not a cloud service (everything runs locally)
|
|
76
|
+
- Not a vector database you manage yourself (it manages itself)
|
|
77
|
+
- Not limited to one tool — works with OpenClaw, Claude Desktop, Cursor, and any MCP client
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## What You Get
|
|
82
|
+
|
|
83
|
+
| Capability | What it means |
|
|
84
|
+
|------------|---------------|
|
|
85
|
+
| **Agents remember across sessions** | Knowledge survives restarts, tool switches, and team handoffs |
|
|
86
|
+
| **Find anything by meaning** | Hybrid BM25 + vector search across 6 embedding providers |
|
|
87
|
+
| **Zero-config local setup** | SQLite with native SIMD vector search — no separate database process |
|
|
88
|
+
| **Works everywhere via MCP** | One memory store for OpenClaw, Claude Desktop, Cursor, and more |
|
|
89
|
+
| **Multi-agent ready** | Private, team, and public scopes — agents see what they should |
|
|
90
|
+
| **Crash-safe by default** | SQLite WAL mode survives power loss, kills, OOM |
|
|
91
|
+
| **Fast** | Embed server keeps model in RAM — CLI queries ~1.5s, MCP/Plugin <500ms |
|
|
92
|
+
| **Scales when needed** | Swap to PostgreSQL + pgvector for distributed teams, no code changes |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Comparison
|
|
97
|
+
|
|
98
|
+
| Feature | Palaia | claude-mem | Mem0 | Stock Memory |
|
|
99
|
+
|---------|--------|-----------|------|--------------|
|
|
100
|
+
| Local-first | Yes | Yes | No (cloud) | Yes |
|
|
101
|
+
| Cross-tool (MCP) | Yes (any MCP client) | No (Claude Code only) | No | No |
|
|
102
|
+
| Native Vector Search | sqlite-vec / pgvector | ChromaDB (separate) | Cloud | No |
|
|
103
|
+
| Structured Types | memory/process/task | decisions/bugfixes | No | No |
|
|
104
|
+
| Multi-Agent Scopes | private/team/public | No | Per-user | No |
|
|
105
|
+
| Smart Tiering | HOT/WARM/COLD | No | No | No |
|
|
106
|
+
| Embedding Providers | 6 (configurable) | 1 (fixed) | Cloud | None |
|
|
107
|
+
| Open Source | MIT | AGPL-3.0 | Partial | N/A |
|
|
108
|
+
| Crash-safe (WAL) | Yes | Partial | N/A | No |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
64
112
|
## Install
|
|
65
113
|
|
|
66
114
|
### Recommended: Tell your agent
|
|
@@ -122,40 +170,6 @@ palaia status # Check health
|
|
|
122
170
|
|
|
123
171
|
---
|
|
124
172
|
|
|
125
|
-
## Why Palaia?
|
|
126
|
-
|
|
127
|
-
| Feature | Details |
|
|
128
|
-
|---------|---------|
|
|
129
|
-
| **Semantic Search** | Hybrid BM25 + vector embeddings. 6 providers: fastembed, sentence-transformers, Ollama, OpenAI, Gemini, BM25. |
|
|
130
|
-
| **Native Vector Search** | sqlite-vec (SIMD KNN) or pgvector (ANN/HNSW). Not Python cosine — real database-level acceleration. |
|
|
131
|
-
| **MCP Server** | `palaia-mcp` — standalone memory for Claude Desktop, Cursor, any MCP host. No OpenClaw required. |
|
|
132
|
-
| **Multi-Backend** | SQLite (default, zero-config) or PostgreSQL + pgvector for distributed teams. |
|
|
133
|
-
| **Crash-Safe** | SQLite WAL mode — survives power loss, kills, OOM. |
|
|
134
|
-
| **Auto-Capture** | OpenClaw plugin captures significant exchanges automatically. |
|
|
135
|
-
| **Structured Types** | memory, process, task — with status, priority, assignee, due date. |
|
|
136
|
-
| **Multi-Agent** | Shared store, scopes (private/team/public), agent aliases, per-agent injection priorities. |
|
|
137
|
-
| **Smart Tiering** | HOT/WARM/COLD rotation based on decay scores and access patterns. |
|
|
138
|
-
| **Embed Server** | Background process holds model in RAM. CLI queries: ~1.5s (was ~3-5s). MCP/Plugin: <500ms. |
|
|
139
|
-
| **Zero-Cloud** | Everything local. No API keys needed for core functionality. |
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## Comparison
|
|
144
|
-
|
|
145
|
-
| Feature | Palaia | claude-mem | Mem0 | Stock Memory |
|
|
146
|
-
|---------|--------|-----------|------|--------------|
|
|
147
|
-
| Local-first | Yes | Yes | No (cloud) | Yes |
|
|
148
|
-
| Cross-tool (MCP) | Yes (any MCP client) | No (Claude Code only) | No | No |
|
|
149
|
-
| Native Vector Search | sqlite-vec / pgvector | ChromaDB (separate) | Cloud | No |
|
|
150
|
-
| Structured Types | memory/process/task | decisions/bugfixes | No | No |
|
|
151
|
-
| Multi-Agent Scopes | private/team/public | No | Per-user | No |
|
|
152
|
-
| Smart Tiering | HOT/WARM/COLD | No | No | No |
|
|
153
|
-
| Embedding Providers | 6 (configurable) | 1 (fixed) | Cloud | None |
|
|
154
|
-
| Open Source | MIT | AGPL-3.0 | Partial | N/A |
|
|
155
|
-
| Crash-safe (WAL) | Yes | Partial | N/A | No |
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
173
|
## Documentation
|
|
160
174
|
|
|
161
175
|
| Document | Description |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Palaia — The Knowledge System for AI Agent Teams
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Your agents forget. Palaia doesn't.**
|
|
4
4
|
|
|
5
5
|
[](https://github.com/byte5ai/palaia/actions/workflows/ci.yml)
|
|
6
6
|
[](https://pypi.org/project/palaia/)
|
|
@@ -10,6 +10,54 @@
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## What Palaia Does
|
|
14
|
+
|
|
15
|
+
AI agents are stateless by default. Every session starts from scratch — no memory of past decisions, no shared knowledge between agents, no context that survives a restart.
|
|
16
|
+
|
|
17
|
+
Palaia gives your agents a persistent, searchable knowledge store. They save what they learn. They find it again by meaning, not keyword. They share it across tools and sessions — automatically.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What Palaia Is Not
|
|
22
|
+
|
|
23
|
+
- Not a chatbot or prompt manager
|
|
24
|
+
- Not a cloud service (everything runs locally)
|
|
25
|
+
- Not a vector database you manage yourself (it manages itself)
|
|
26
|
+
- Not limited to one tool — works with OpenClaw, Claude Desktop, Cursor, and any MCP client
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## What You Get
|
|
31
|
+
|
|
32
|
+
| Capability | What it means |
|
|
33
|
+
|------------|---------------|
|
|
34
|
+
| **Agents remember across sessions** | Knowledge survives restarts, tool switches, and team handoffs |
|
|
35
|
+
| **Find anything by meaning** | Hybrid BM25 + vector search across 6 embedding providers |
|
|
36
|
+
| **Zero-config local setup** | SQLite with native SIMD vector search — no separate database process |
|
|
37
|
+
| **Works everywhere via MCP** | One memory store for OpenClaw, Claude Desktop, Cursor, and more |
|
|
38
|
+
| **Multi-agent ready** | Private, team, and public scopes — agents see what they should |
|
|
39
|
+
| **Crash-safe by default** | SQLite WAL mode survives power loss, kills, OOM |
|
|
40
|
+
| **Fast** | Embed server keeps model in RAM — CLI queries ~1.5s, MCP/Plugin <500ms |
|
|
41
|
+
| **Scales when needed** | Swap to PostgreSQL + pgvector for distributed teams, no code changes |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Comparison
|
|
46
|
+
|
|
47
|
+
| Feature | Palaia | claude-mem | Mem0 | Stock Memory |
|
|
48
|
+
|---------|--------|-----------|------|--------------|
|
|
49
|
+
| Local-first | Yes | Yes | No (cloud) | Yes |
|
|
50
|
+
| Cross-tool (MCP) | Yes (any MCP client) | No (Claude Code only) | No | No |
|
|
51
|
+
| Native Vector Search | sqlite-vec / pgvector | ChromaDB (separate) | Cloud | No |
|
|
52
|
+
| Structured Types | memory/process/task | decisions/bugfixes | No | No |
|
|
53
|
+
| Multi-Agent Scopes | private/team/public | No | Per-user | No |
|
|
54
|
+
| Smart Tiering | HOT/WARM/COLD | No | No | No |
|
|
55
|
+
| Embedding Providers | 6 (configurable) | 1 (fixed) | Cloud | None |
|
|
56
|
+
| Open Source | MIT | AGPL-3.0 | Partial | N/A |
|
|
57
|
+
| Crash-safe (WAL) | Yes | Partial | N/A | No |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
13
61
|
## Install
|
|
14
62
|
|
|
15
63
|
### Recommended: Tell your agent
|
|
@@ -71,40 +119,6 @@ palaia status # Check health
|
|
|
71
119
|
|
|
72
120
|
---
|
|
73
121
|
|
|
74
|
-
## Why Palaia?
|
|
75
|
-
|
|
76
|
-
| Feature | Details |
|
|
77
|
-
|---------|---------|
|
|
78
|
-
| **Semantic Search** | Hybrid BM25 + vector embeddings. 6 providers: fastembed, sentence-transformers, Ollama, OpenAI, Gemini, BM25. |
|
|
79
|
-
| **Native Vector Search** | sqlite-vec (SIMD KNN) or pgvector (ANN/HNSW). Not Python cosine — real database-level acceleration. |
|
|
80
|
-
| **MCP Server** | `palaia-mcp` — standalone memory for Claude Desktop, Cursor, any MCP host. No OpenClaw required. |
|
|
81
|
-
| **Multi-Backend** | SQLite (default, zero-config) or PostgreSQL + pgvector for distributed teams. |
|
|
82
|
-
| **Crash-Safe** | SQLite WAL mode — survives power loss, kills, OOM. |
|
|
83
|
-
| **Auto-Capture** | OpenClaw plugin captures significant exchanges automatically. |
|
|
84
|
-
| **Structured Types** | memory, process, task — with status, priority, assignee, due date. |
|
|
85
|
-
| **Multi-Agent** | Shared store, scopes (private/team/public), agent aliases, per-agent injection priorities. |
|
|
86
|
-
| **Smart Tiering** | HOT/WARM/COLD rotation based on decay scores and access patterns. |
|
|
87
|
-
| **Embed Server** | Background process holds model in RAM. CLI queries: ~1.5s (was ~3-5s). MCP/Plugin: <500ms. |
|
|
88
|
-
| **Zero-Cloud** | Everything local. No API keys needed for core functionality. |
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Comparison
|
|
93
|
-
|
|
94
|
-
| Feature | Palaia | claude-mem | Mem0 | Stock Memory |
|
|
95
|
-
|---------|--------|-----------|------|--------------|
|
|
96
|
-
| Local-first | Yes | Yes | No (cloud) | Yes |
|
|
97
|
-
| Cross-tool (MCP) | Yes (any MCP client) | No (Claude Code only) | No | No |
|
|
98
|
-
| Native Vector Search | sqlite-vec / pgvector | ChromaDB (separate) | Cloud | No |
|
|
99
|
-
| Structured Types | memory/process/task | decisions/bugfixes | No | No |
|
|
100
|
-
| Multi-Agent Scopes | private/team/public | No | Per-user | No |
|
|
101
|
-
| Smart Tiering | HOT/WARM/COLD | No | No | No |
|
|
102
|
-
| Embedding Providers | 6 (configurable) | 1 (fixed) | Cloud | None |
|
|
103
|
-
| Open Source | MIT | AGPL-3.0 | Partial | N/A |
|
|
104
|
-
| Crash-safe (WAL) | Yes | Partial | N/A | No |
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
122
|
## Documentation
|
|
109
123
|
|
|
110
124
|
| Document | Description |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: palaia
|
|
3
|
-
version: "2.4.
|
|
3
|
+
version: "2.4.dev3"
|
|
4
4
|
description: >
|
|
5
5
|
Local, crash-safe persistent memory for OpenClaw agents.
|
|
6
6
|
SQLite-backed by default. Semantic search, projects, scopes, auto-capture.
|
|
@@ -25,17 +25,18 @@ metadata:
|
|
|
25
25
|
- command: "python3 -m pip install --upgrade 'palaia[fastembed]' && (npm install -g @byte5ai/palaia@latest 2>/dev/null || true) && palaia doctor --fix && palaia warmup"
|
|
26
26
|
label: "Upgrade Palaia with semantic search (pip + npm plugin) and run health checks"
|
|
27
27
|
postUpdateMessage: >
|
|
28
|
-
Palaia has been updated to v2.
|
|
29
|
-
|
|
28
|
+
Palaia has been updated to v2.4. New: session continuity (automatic briefings and
|
|
29
|
+
summaries), privacy markers, recency boost, progressive disclosure. Run `palaia doctor --fix` to upgrade.
|
|
30
30
|
plugin:
|
|
31
31
|
slot: memory
|
|
32
32
|
package: "@byte5ai/palaia"
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
# Palaia v2.
|
|
35
|
+
# Palaia v2.4 — Agent Memory Skill
|
|
36
36
|
|
|
37
37
|
Palaia is the memory system for OpenClaw agents. It gives you persistent, searchable, crash-safe memory across sessions. You don't need to understand how it works — just use the commands below.
|
|
38
38
|
|
|
39
|
+
<!-- begin:install -->
|
|
39
40
|
## First-Time Setup
|
|
40
41
|
|
|
41
42
|
When a user asks you to "set up palaia", "enable memory", or "remember things across sessions", run these steps:
|
|
@@ -136,6 +137,7 @@ npm install -g @byte5ai/palaia@latest
|
|
|
136
137
|
```
|
|
137
138
|
|
|
138
139
|
After the manual update, `palaia upgrade` will be available for future updates.
|
|
140
|
+
<!-- end:install -->
|
|
139
141
|
|
|
140
142
|
## Auto-Check (run every time this skill is loaded)
|
|
141
143
|
|
|
@@ -290,6 +292,9 @@ palaia query "what's the rate limit"
|
|
|
290
292
|
# Filter by type and status
|
|
291
293
|
palaia query "tasks" --type task --status open
|
|
292
294
|
|
|
295
|
+
# Filter by tags
|
|
296
|
+
palaia query "session-summary" --tags session-summary
|
|
297
|
+
|
|
293
298
|
# Search within a project
|
|
294
299
|
palaia query "deploy steps" --project myapp
|
|
295
300
|
|
|
@@ -324,6 +329,9 @@ palaia list
|
|
|
324
329
|
# Filter by tier, type, status
|
|
325
330
|
palaia list --tier warm --type task --status open --priority high
|
|
326
331
|
|
|
332
|
+
# Limit results
|
|
333
|
+
palaia list --type task --status open --limit 5
|
|
334
|
+
|
|
327
335
|
# Filter by project or assignee
|
|
328
336
|
palaia list --project myapp --assignee Elliot
|
|
329
337
|
```
|
|
@@ -593,7 +601,7 @@ palaia instance set Claw-Main
|
|
|
593
601
|
| Review accumulated knowledge | `palaia curate analyze` |
|
|
594
602
|
| Share knowledge | `palaia sync export` or `palaia package export` |
|
|
595
603
|
| Check for messages | `palaia memo inbox` |
|
|
596
|
-
| Start of session |
|
|
604
|
+
| Start of session | Session briefing is now automatic. Just run `palaia doctor` and check `palaia memo inbox`. |
|
|
597
605
|
|
|
598
606
|
**Do NOT manually write:** facts, decisions, or preferences that came up in the current conversation. Auto-Capture handles these.
|
|
599
607
|
|
|
@@ -632,6 +640,33 @@ palaia init --capture-level <off|minimal|normal|aggressive>
|
|
|
632
640
|
|
|
633
641
|
---
|
|
634
642
|
|
|
643
|
+
## Session Continuity (NEW in v2.4)
|
|
644
|
+
|
|
645
|
+
Session continuity gives agents automatic context restoration across sessions. These features work out of the box with the OpenClaw plugin -- no manual setup needed.
|
|
646
|
+
|
|
647
|
+
### Session Briefings
|
|
648
|
+
On session start, Palaia automatically injects a briefing with the last session summary and any open tasks. This means agents resume work without needing to manually search for context.
|
|
649
|
+
|
|
650
|
+
### Session Summaries
|
|
651
|
+
When a session ends or resets, Palaia auto-saves a summary of what happened. These are stored as entries with the `session-summary` tag and can be queried:
|
|
652
|
+
```bash
|
|
653
|
+
palaia query "session-summary" --tags session-summary
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
### Privacy Markers
|
|
657
|
+
Wrap sensitive content in `<private>...</private>` blocks to exclude it from auto-capture. Private blocks are stripped before any extraction runs.
|
|
658
|
+
|
|
659
|
+
### Recency Boost
|
|
660
|
+
Fresh memories are ranked higher in recall results. The boost factor is configurable via `recallRecencyBoost` (default `0.3`, set to `0` to disable).
|
|
661
|
+
|
|
662
|
+
### Progressive Disclosure
|
|
663
|
+
When result sets exceed 100 entries, Palaia uses compact mode to keep context manageable. Use `--limit` to control result size explicitly:
|
|
664
|
+
```bash
|
|
665
|
+
palaia list --type task --status open --limit 5
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
---
|
|
669
|
+
|
|
635
670
|
## Plugin Configuration (OpenClaw)
|
|
636
671
|
|
|
637
672
|
Set in `openclaw.json` under `plugins.entries.palaia.config`:
|
|
@@ -649,6 +684,11 @@ Set in `openclaw.json` under `plugins.entries.palaia.config`:
|
|
|
649
684
|
| `embeddingServer` | `true` | Keep embedding model loaded for fast queries |
|
|
650
685
|
| `showMemorySources` | `true` | Show memory source footnotes |
|
|
651
686
|
| `showCaptureConfirm` | `true` | Show capture confirmations |
|
|
687
|
+
| `sessionSummary` | `true` | Auto-save session summaries on end/reset |
|
|
688
|
+
| `sessionBriefing` | `true` | Load session context on session start |
|
|
689
|
+
| `sessionBriefingMaxChars` | `1500` | Max chars for session briefing injection |
|
|
690
|
+
| `captureToolObservations` | `true` | Track tool usage as session context |
|
|
691
|
+
| `recallRecencyBoost` | `0.3` | Boost factor for fresh memories (0=off) |
|
|
652
692
|
|
|
653
693
|
---
|
|
654
694
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: palaia
|
|
3
|
-
version: "2.4.
|
|
3
|
+
version: "2.4.dev3"
|
|
4
4
|
description: >
|
|
5
5
|
Local, crash-safe persistent memory for OpenClaw agents.
|
|
6
6
|
SQLite-backed by default. Semantic search, projects, scopes, auto-capture.
|
|
@@ -25,17 +25,18 @@ metadata:
|
|
|
25
25
|
- command: "python3 -m pip install --upgrade 'palaia[fastembed]' && (npm install -g @byte5ai/palaia@latest 2>/dev/null || true) && palaia doctor --fix && palaia warmup"
|
|
26
26
|
label: "Upgrade Palaia with semantic search (pip + npm plugin) and run health checks"
|
|
27
27
|
postUpdateMessage: >
|
|
28
|
-
Palaia has been updated to v2.
|
|
29
|
-
|
|
28
|
+
Palaia has been updated to v2.4. New: session continuity (automatic briefings and
|
|
29
|
+
summaries), privacy markers, recency boost, progressive disclosure. Run `palaia doctor --fix` to upgrade.
|
|
30
30
|
plugin:
|
|
31
31
|
slot: memory
|
|
32
32
|
package: "@byte5ai/palaia"
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
# Palaia v2.
|
|
35
|
+
# Palaia v2.4 — Agent Memory Skill
|
|
36
36
|
|
|
37
37
|
Palaia is the memory system for OpenClaw agents. It gives you persistent, searchable, crash-safe memory across sessions. You don't need to understand how it works — just use the commands below.
|
|
38
38
|
|
|
39
|
+
<!-- begin:install -->
|
|
39
40
|
## First-Time Setup
|
|
40
41
|
|
|
41
42
|
When a user asks you to "set up palaia", "enable memory", or "remember things across sessions", run these steps:
|
|
@@ -136,6 +137,7 @@ npm install -g @byte5ai/palaia@latest
|
|
|
136
137
|
```
|
|
137
138
|
|
|
138
139
|
After the manual update, `palaia upgrade` will be available for future updates.
|
|
140
|
+
<!-- end:install -->
|
|
139
141
|
|
|
140
142
|
## Auto-Check (run every time this skill is loaded)
|
|
141
143
|
|
|
@@ -290,6 +292,9 @@ palaia query "what's the rate limit"
|
|
|
290
292
|
# Filter by type and status
|
|
291
293
|
palaia query "tasks" --type task --status open
|
|
292
294
|
|
|
295
|
+
# Filter by tags
|
|
296
|
+
palaia query "session-summary" --tags session-summary
|
|
297
|
+
|
|
293
298
|
# Search within a project
|
|
294
299
|
palaia query "deploy steps" --project myapp
|
|
295
300
|
|
|
@@ -324,6 +329,9 @@ palaia list
|
|
|
324
329
|
# Filter by tier, type, status
|
|
325
330
|
palaia list --tier warm --type task --status open --priority high
|
|
326
331
|
|
|
332
|
+
# Limit results
|
|
333
|
+
palaia list --type task --status open --limit 5
|
|
334
|
+
|
|
327
335
|
# Filter by project or assignee
|
|
328
336
|
palaia list --project myapp --assignee Elliot
|
|
329
337
|
```
|
|
@@ -593,7 +601,7 @@ palaia instance set Claw-Main
|
|
|
593
601
|
| Review accumulated knowledge | `palaia curate analyze` |
|
|
594
602
|
| Share knowledge | `palaia sync export` or `palaia package export` |
|
|
595
603
|
| Check for messages | `palaia memo inbox` |
|
|
596
|
-
| Start of session |
|
|
604
|
+
| Start of session | Session briefing is now automatic. Just run `palaia doctor` and check `palaia memo inbox`. |
|
|
597
605
|
|
|
598
606
|
**Do NOT manually write:** facts, decisions, or preferences that came up in the current conversation. Auto-Capture handles these.
|
|
599
607
|
|
|
@@ -632,6 +640,33 @@ palaia init --capture-level <off|minimal|normal|aggressive>
|
|
|
632
640
|
|
|
633
641
|
---
|
|
634
642
|
|
|
643
|
+
## Session Continuity (NEW in v2.4)
|
|
644
|
+
|
|
645
|
+
Session continuity gives agents automatic context restoration across sessions. These features work out of the box with the OpenClaw plugin -- no manual setup needed.
|
|
646
|
+
|
|
647
|
+
### Session Briefings
|
|
648
|
+
On session start, Palaia automatically injects a briefing with the last session summary and any open tasks. This means agents resume work without needing to manually search for context.
|
|
649
|
+
|
|
650
|
+
### Session Summaries
|
|
651
|
+
When a session ends or resets, Palaia auto-saves a summary of what happened. These are stored as entries with the `session-summary` tag and can be queried:
|
|
652
|
+
```bash
|
|
653
|
+
palaia query "session-summary" --tags session-summary
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
### Privacy Markers
|
|
657
|
+
Wrap sensitive content in `<private>...</private>` blocks to exclude it from auto-capture. Private blocks are stripped before any extraction runs.
|
|
658
|
+
|
|
659
|
+
### Recency Boost
|
|
660
|
+
Fresh memories are ranked higher in recall results. The boost factor is configurable via `recallRecencyBoost` (default `0.3`, set to `0` to disable).
|
|
661
|
+
|
|
662
|
+
### Progressive Disclosure
|
|
663
|
+
When result sets exceed 100 entries, Palaia uses compact mode to keep context manageable. Use `--limit` to control result size explicitly:
|
|
664
|
+
```bash
|
|
665
|
+
palaia list --type task --status open --limit 5
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
---
|
|
669
|
+
|
|
635
670
|
## Plugin Configuration (OpenClaw)
|
|
636
671
|
|
|
637
672
|
Set in `openclaw.json` under `plugins.entries.palaia.config`:
|
|
@@ -649,6 +684,11 @@ Set in `openclaw.json` under `plugins.entries.palaia.config`:
|
|
|
649
684
|
| `embeddingServer` | `true` | Keep embedding model loaded for fast queries |
|
|
650
685
|
| `showMemorySources` | `true` | Show memory source footnotes |
|
|
651
686
|
| `showCaptureConfirm` | `true` | Show capture confirmations |
|
|
687
|
+
| `sessionSummary` | `true` | Auto-save session summaries on end/reset |
|
|
688
|
+
| `sessionBriefing` | `true` | Load session context on session start |
|
|
689
|
+
| `sessionBriefingMaxChars` | `1500` | Max chars for session briefing injection |
|
|
690
|
+
| `captureToolObservations` | `true` | Track tool usage as session context |
|
|
691
|
+
| `recallRecencyBoost` | `0.3` | Boost factor for fresh memories (0=off) |
|
|
652
692
|
|
|
653
693
|
---
|
|
654
694
|
|
|
@@ -98,6 +98,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
98
98
|
)
|
|
99
99
|
p_query.add_argument("--assignee", default=None, help="Filter by assignee")
|
|
100
100
|
p_query.add_argument("--instance", default=None, help="Filter by session identity")
|
|
101
|
+
p_query.add_argument("--tags", default=None, help="Filter by tags (comma-separated, AND logic)")
|
|
101
102
|
p_query.add_argument("--before", default=None, help="Only entries created before this ISO timestamp")
|
|
102
103
|
p_query.add_argument("--after", default=None, help="Only entries created after this ISO timestamp")
|
|
103
104
|
p_query.add_argument(
|
|
@@ -135,6 +136,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
135
136
|
p_list = sub.add_parser("list", help="List entries in a tier")
|
|
136
137
|
p_list.add_argument("--tier", default=None, choices=["hot", "warm", "cold"], help="Tier to list (default: hot)")
|
|
137
138
|
p_list.add_argument("--all", action="store_true", help="List across all tiers (hot+warm+cold)")
|
|
139
|
+
p_list.add_argument("--limit", type=int, default=None, help="Max entries to return")
|
|
138
140
|
p_list.add_argument("--project", default=None, help="Filter by project")
|
|
139
141
|
p_list.add_argument("--tag", default=None, action="append", help="Filter by tag (repeatable, AND logic)")
|
|
140
142
|
p_list.add_argument("--scope", default=None, help="Filter by scope")
|
|
@@ -58,6 +58,15 @@ def cmd_query(args):
|
|
|
58
58
|
has_embeddings = svc_result["has_embeddings"]
|
|
59
59
|
bm25_only = svc_result["bm25_only"]
|
|
60
60
|
|
|
61
|
+
# Post-filter by --tags if specified (AND logic, comma-separated)
|
|
62
|
+
tags_filter = getattr(args, "tags", None)
|
|
63
|
+
if tags_filter:
|
|
64
|
+
required_tags = [t.strip() for t in tags_filter.split(",") if t.strip()]
|
|
65
|
+
results = [
|
|
66
|
+
r for r in results
|
|
67
|
+
if all(tag in (r.get("tags") or []) for tag in required_tags)
|
|
68
|
+
]
|
|
69
|
+
|
|
61
70
|
# --- Adaptive Nudging for query (Issue #68) ---
|
|
62
71
|
query_nudge_messages = []
|
|
63
72
|
try:
|
|
@@ -234,6 +243,11 @@ def cmd_list(args):
|
|
|
234
243
|
tier_label = svc_result["tier"]
|
|
235
244
|
entries_with_tier = svc_result["entries_with_tier"]
|
|
236
245
|
|
|
246
|
+
# Apply --limit if specified
|
|
247
|
+
limit = getattr(args, "limit", None)
|
|
248
|
+
if limit is not None and limit > 0:
|
|
249
|
+
entries_with_tier = entries_with_tier[:limit]
|
|
250
|
+
|
|
237
251
|
if json_out(
|
|
238
252
|
{
|
|
239
253
|
"tier": tier_label,
|
|
@@ -242,6 +242,8 @@ class EmbedServer:
|
|
|
242
242
|
instance = params.get("instance")
|
|
243
243
|
include_cold = params.get("include_cold", False)
|
|
244
244
|
cross_project = params.get("cross_project", False)
|
|
245
|
+
before = params.get("before")
|
|
246
|
+
after = params.get("after")
|
|
245
247
|
|
|
246
248
|
engine = self._bm25_engine if self._warming_up else self.engine
|
|
247
249
|
results = engine.search(
|
|
@@ -255,6 +257,8 @@ class EmbedServer:
|
|
|
255
257
|
priority=priority,
|
|
256
258
|
assignee=assignee,
|
|
257
259
|
instance=instance,
|
|
260
|
+
before=before,
|
|
261
|
+
after=after,
|
|
258
262
|
cross_project=cross_project,
|
|
259
263
|
)
|
|
260
264
|
|
|
@@ -123,7 +123,8 @@ def create_server(root: Path, read_only: bool = False) -> FastMCP:
|
|
|
123
123
|
header_parts = [
|
|
124
124
|
f"ID: {result['id']}",
|
|
125
125
|
f"Title: {meta.get('title', 'untitled')}",
|
|
126
|
-
f"Type: {meta.get('
|
|
126
|
+
f"Type: {meta.get('type', 'memory')}",
|
|
127
|
+
f"Scope: {meta.get('scope', 'team')}",
|
|
127
128
|
f"Tier: {meta.get('tier', '?')}",
|
|
128
129
|
f"Tags: {', '.join(meta.get('tags', []))}",
|
|
129
130
|
f"Created: {meta.get('created', '?')}",
|
|
@@ -73,6 +73,7 @@ class SearchEngine:
|
|
|
73
73
|
self._provider = None
|
|
74
74
|
self._index_cache: list[tuple[str, str, dict]] | None = None
|
|
75
75
|
self._index_dirty = True
|
|
76
|
+
self._index_cache_key: tuple | None = None # (include_cold, agent) for cache validity
|
|
76
77
|
|
|
77
78
|
@property
|
|
78
79
|
def provider(self):
|
|
@@ -95,7 +96,8 @@ class SearchEngine:
|
|
|
95
96
|
Uses a cached index when available. Call invalidate_index() after
|
|
96
97
|
write/edit/gc operations to force a rebuild.
|
|
97
98
|
"""
|
|
98
|
-
|
|
99
|
+
cache_key = (include_cold, agent)
|
|
100
|
+
if not self._index_dirty and self._index_cache is not None and self._index_cache_key == cache_key:
|
|
99
101
|
# Re-index BM25 from cache (cheap — no disk reads)
|
|
100
102
|
self.bm25.index([(did, text) for did, text, _meta in self._index_cache])
|
|
101
103
|
return list(self._index_cache)
|
|
@@ -112,6 +114,7 @@ class SearchEngine:
|
|
|
112
114
|
docs_with_meta.append((doc_id, full_text, meta))
|
|
113
115
|
self.bm25.index(docs)
|
|
114
116
|
self._index_cache = docs_with_meta
|
|
117
|
+
self._index_cache_key = cache_key
|
|
115
118
|
self._index_dirty = False
|
|
116
119
|
return docs_with_meta
|
|
117
120
|
|
|
@@ -78,7 +78,17 @@ def unlock_project(root: Path, *, project: str) -> dict:
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
def get_skill_content() -> dict:
|
|
81
|
-
"""Read and return SKILL.md content.
|
|
81
|
+
"""Read and return SKILL.md content.
|
|
82
|
+
|
|
83
|
+
Strips the install/update section (between ``<!-- begin:install -->``
|
|
84
|
+
and ``<!-- end:install -->``) because ``palaia skill`` is only called
|
|
85
|
+
when palaia is already installed — the install block wastes context window.
|
|
86
|
+
ClawHub and GitHub still see the full file.
|
|
87
|
+
|
|
88
|
+
Returns dict with 'skill' or 'error'.
|
|
89
|
+
"""
|
|
90
|
+
import re
|
|
91
|
+
|
|
82
92
|
skill_path = Path(__file__).parent.parent / "SKILL.md"
|
|
83
93
|
if not skill_path.exists():
|
|
84
94
|
return {
|
|
@@ -88,6 +98,13 @@ def get_skill_content() -> dict:
|
|
|
88
98
|
)
|
|
89
99
|
}
|
|
90
100
|
content = skill_path.read_text(encoding="utf-8")
|
|
101
|
+
# Strip install section — agent already has palaia installed
|
|
102
|
+
content = re.sub(
|
|
103
|
+
r"<!-- begin:install -->.*?<!-- end:install -->\n*",
|
|
104
|
+
"",
|
|
105
|
+
content,
|
|
106
|
+
flags=re.DOTALL,
|
|
107
|
+
)
|
|
91
108
|
return {"skill": content}
|
|
92
109
|
|
|
93
110
|
|
|
@@ -80,6 +80,10 @@ def search_entries(
|
|
|
80
80
|
params["instance"] = instance
|
|
81
81
|
if cross_project:
|
|
82
82
|
params["cross_project"] = True
|
|
83
|
+
if before:
|
|
84
|
+
params["before"] = before
|
|
85
|
+
if after:
|
|
86
|
+
params["after"] = after
|
|
83
87
|
result = client.query(params, timeout=5.0)
|
|
84
88
|
chain_cfg = _config.get("embedding_chain", [])
|
|
85
89
|
bm25_only = not chain_cfg or chain_cfg == ["bm25"]
|
|
@@ -62,7 +62,8 @@ def write_entry(
|
|
|
62
62
|
instance=instance,
|
|
63
63
|
)
|
|
64
64
|
|
|
65
|
-
# Check dedup
|
|
65
|
+
# Check dedup: Store.write() returns existing ID on hash collision
|
|
66
|
+
# Compare with a fresh read to detect if this was a dedup or new write
|
|
66
67
|
entry = store.read(entry_id)
|
|
67
68
|
tier = "hot"
|
|
68
69
|
actual_scope = scope or "team"
|
|
@@ -74,6 +75,10 @@ def write_entry(
|
|
|
74
75
|
if (root / t / f"{entry_id}.md").exists():
|
|
75
76
|
tier = t
|
|
76
77
|
break
|
|
78
|
+
# If entry existed before write (non-hot tier or older timestamp),
|
|
79
|
+
# it was deduplicated. Hot + just-created = new entry.
|
|
80
|
+
if tier != "hot":
|
|
81
|
+
deduplicated = True
|
|
77
82
|
|
|
78
83
|
# --- Adaptive Nudging (Issue #68) ---
|
|
79
84
|
nudge_messages: list[str] = []
|