diff --git a/mempalace/cli.py b/mempalace/cli.py index fb2f0ae..69cd244 100644 --- a/mempalace/cli.py +++ b/mempalace/cli.py @@ -34,6 +34,7 @@ import argparse from pathlib import Path from .config import MempalaceConfig +from .version import __version__ _MEMPALACE_PROJECT_FILES = ("mempalace.yaml", "entities.json") @@ -470,10 +471,17 @@ def cmd_compress(args): def main(): + version_label = f"MemPalace {__version__}" parser = argparse.ArgumentParser( description="MemPalace — Give your AI a memory. No API key required.", formatter_class=argparse.RawDescriptionHelpFormatter, - epilog=__doc__, + epilog=f"{version_label}\n\n{__doc__}", + ) + parser.add_argument( + "--version", + action="version", + version=version_label, + help="Show version and exit", ) parser.add_argument( "--palace", diff --git a/website/.vitepress/theme/Landing.vue b/website/.vitepress/theme/Landing.vue index a51c087..fbca862 100644 --- a/website/.vitepress/theme/Landing.vue +++ b/website/.vitepress/theme/Landing.vue @@ -453,7 +453,6 @@ onBeforeUnmount(() => { GitHub ↗ - @@ -522,7 +521,7 @@ onBeforeUnmount(() => {
with mempalace - verbatim · retrieved <50 ms + verbatim · retrieved instantly
@@ -541,10 +540,10 @@ onBeforeUnmount(() => {

- A two-thousand-year-old memory technique, reworked for a machine. - Broad categories nest time-based groupings; time-based groupings hold - verbatim drawers. A symbolic index lets the model scan thousands of - drawers in a single breath and open only the ones it needs. + An ancient memory technique, reworked for a machine. Broad categories + nest time-based groupings; time-based groupings hold verbatim drawers. + A symbolic index lets the model scan thousands of drawers in a single + pass and open only the ones it needs.

@@ -611,8 +610,8 @@ onBeforeUnmount(() => {

The content stays verbatim — always. The index above it is written - in AAAK: a dense symbolic dialect an LLM can scan at a glance. Tens of - thousands of entries, one pass, exact drawer located. + in AAAK: a dense symbolic dialect an LLM can scan at a glance. Thousands + of entries, one pass, exact drawer located.

@@ -659,8 +658,8 @@ onBeforeUnmount(() => {

- Ninety-plus percent compression on the pointer layer. One hundred percent - fidelity on the content layer. You get speed without ever losing a word. + Dense compression on the pointer layer. Full fidelity on the content + layer. You get speed without ever losing a word.

@@ -762,7 +761,7 @@ onBeforeUnmount(() => { palace created at ~/.mempalace hooks registered (stop, precompact) knowledge graph initialized -$ mempalace remember "memory is identity." +$ mempalace mine ./notes filed · W-001/R-01/D-001 diff --git a/website/guide/claude-code.md b/website/guide/claude-code.md index 25f826f..94a73e0 100644 --- a/website/guide/claude-code.md +++ b/website/guide/claude-code.md @@ -15,7 +15,7 @@ Restart Claude Code, then type `/skills` to verify "mempalace" appears. With the plugin installed, Claude Code automatically: - Starts the MemPalace MCP server on launch -- Has access to all 19 tools +- Has access to all 29 tools - Learns the AAAK dialect and memory protocol from the `mempalace_status` response - Searches the palace before answering questions about past work diff --git a/website/guide/gemini-cli.md b/website/guide/gemini-cli.md index 34fb9af..137d62c 100644 --- a/website/guide/gemini-cli.md +++ b/website/guide/gemini-cli.md @@ -40,12 +40,14 @@ You can optionally create or edit: Register MemPalace as an MCP server: ```bash -gemini mcp add mempalace /absolute/path/to/mempalace/.venv/bin/python3 \ - -m mempalace.mcp_server --scope user +gemini mcp add --scope user mempalace \ + -- /absolute/path/to/mempalace/.venv/bin/python -m mempalace.mcp_server ``` ::: warning -Use the **absolute path** to the Python binary to ensure it works from any directory. +Use the **absolute path** to the Python binary so the server starts from any +working directory. The `--` separator prevents Gemini from parsing +`-m mempalace.mcp_server` as its own flags. ::: ## Enable Auto-Saving diff --git a/website/guide/mcp-integration.md b/website/guide/mcp-integration.md index 0e00789..528fe83 100644 --- a/website/guide/mcp-integration.md +++ b/website/guide/mcp-integration.md @@ -1,6 +1,6 @@ # MCP Integration -MemPalace provides 19 tools through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/), giving any MCP-compatible AI full read/write access to your palace. +MemPalace provides 29 tools through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/), giving any MCP-compatible AI full read/write access to your palace. ## Setup @@ -24,7 +24,7 @@ claude mcp add mempalace -- python -m mempalace.mcp_server claude mcp add mempalace -- python -m mempalace.mcp_server --palace /path/to/palace ``` -Now your AI has all 19 tools available. Ask it anything: +Now your AI has all 29 tools available. Ask it anything: > *"What did we decide about auth last month?"* @@ -66,11 +66,19 @@ This protocol is what turns storage into memory — the AI knows to verify befor | `mempalace_check_duplicate` | Check before filing | | `mempalace_get_aaak_spec` | AAAK dialect reference | +### Drawers (read) + +| Tool | What | +|------|------| +| `mempalace_get_drawer` | Fetch a single drawer by ID | +| `mempalace_list_drawers` | List drawers with pagination | + ### Palace (write) | Tool | What | |------|------| | `mempalace_add_drawer` | File verbatim content | +| `mempalace_update_drawer` | Update drawer content or metadata | | `mempalace_delete_drawer` | Remove by ID | ### Knowledge Graph @@ -91,6 +99,15 @@ This protocol is what turns storage into memory — the AI knows to verify befor | `mempalace_find_tunnels` | Find rooms bridging two wings | | `mempalace_graph_stats` | Graph connectivity overview | +### Tunnels + +| Tool | What | +|------|------| +| `mempalace_create_tunnel` | Create an explicit cross-wing tunnel | +| `mempalace_list_tunnels` | List all explicit tunnels | +| `mempalace_delete_tunnel` | Delete an explicit tunnel | +| `mempalace_follow_tunnels` | Follow tunnels out from a room | + ### Agent Diary | Tool | What | @@ -98,4 +115,12 @@ This protocol is what turns storage into memory — the AI knows to verify befor | `mempalace_diary_write` | Write AAAK diary entry | | `mempalace_diary_read` | Read recent diary entries | +### System + +| Tool | What | +|------|------| +| `mempalace_hook_settings` | Get or set hook behavior | +| `mempalace_memories_filed_away` | Check whether the last checkpoint was saved | +| `mempalace_reconnect` | Force reconnect to the database | + For detailed schemas and parameters, see [MCP Tools Reference](/reference/mcp-tools). diff --git a/website/guide/openclaw.md b/website/guide/openclaw.md index b6bf421..a9ca6dc 100644 --- a/website/guide/openclaw.md +++ b/website/guide/openclaw.md @@ -27,7 +27,7 @@ Or by directly editing your OpenClaw configuration: ## How It Works -Once connected, OpenClaw agents receive all 19 tools along with the **Memory Protocol**—a strict behavioral guide indicating they should: +Once connected, OpenClaw agents receive all 29 tools along with the **Memory Protocol**—a strict behavioral guide indicating they should: 1. **Never guess**: Query `mempalace_search` or `mempalace_kg_query` before confidently answering. 2. **Keep an agent diary**: Maintain continuity between sessions by writing to `mempalace_diary_write`. 3. **Manage the Knowledge Graph**: Update declarative facts when things change using `mempalace_kg_add` and `mempalace_kg_invalidate`. diff --git a/website/reference/api-reference.md b/website/reference/api-reference.md index da77a7c..45a2875 100644 --- a/website/reference/api-reference.md +++ b/website/reference/api-reference.md @@ -108,7 +108,7 @@ Unified 4-layer interface. | Method | Parameters | Returns | Description | |--------|-----------|---------|-------------| -| `wake_up(wing=None)` | Optional wing | `str` | L0 + L1 context (~170–900 tokens) | +| `wake_up(wing=None)` | Optional wing | `str` | L0 + L1 context (~600–900 tokens) | | `recall(wing, room, n_results=10)` | Filters | `str` | L2 on-demand retrieval | | `search(query, wing, room, n_results=5)` | Query + filters | `str` | L3 deep search | | `status()` | — | `dict` | All layer status info | diff --git a/website/reference/cli.md b/website/reference/cli.md index d87b104..8ee8cad 100644 --- a/website/reference/cli.md +++ b/website/reference/cli.md @@ -89,7 +89,7 @@ mempalace split --output-dir ~/split-output/ ## `mempalace wake-up` -Show L0 + L1 wake-up context (~170–900 tokens). +Show L0 + L1 wake-up context (~600–900 tokens). ```bash mempalace wake-up diff --git a/website/reference/modules.md b/website/reference/modules.md index 2de7816..a4485f5 100644 --- a/website/reference/modules.md +++ b/website/reference/modules.md @@ -9,7 +9,7 @@ mempalace/ ├── README.md ← project documentation ├── mempalace/ ← core package │ ├── cli.py ← CLI entry point -│ ├── mcp_server.py ← MCP server (19 tools) +│ ├── mcp_server.py ← MCP server (29 tools) │ ├── knowledge_graph.py ← temporal entity graph │ ├── palace_graph.py ← room navigation graph │ ├── dialect.py ← AAAK compression @@ -56,7 +56,7 @@ Argparse-based CLI with subcommands: `init`, `mine`, `split`, `search`, `compres ### `mcp_server.py` — MCP Server -JSON-RPC over stdin/stdout. Implements the MCP protocol with 19 tools covering palace read/write, knowledge graph, navigation, and agent diary operations. Includes the Memory Protocol and AAAK Spec in status responses. +JSON-RPC over stdin/stdout. Implements the MCP protocol with 29 tools covering palace read/write, drawer CRUD, knowledge graph, navigation, tunnels, agent diary, and system operations. Includes the Memory Protocol and AAAK Spec in status responses. ### `searcher.py` — Semantic Search diff --git a/website/reference/python-api.md b/website/reference/python-api.md index 472acd9..bf56201 100644 --- a/website/reference/python-api.md +++ b/website/reference/python-api.md @@ -36,7 +36,7 @@ from mempalace.layers import MemoryStack stack = MemoryStack() # uses default paths from MempalaceConfig # Wake-up: L0 (identity) + L1 (essential story) -context = stack.wake_up(wing="myapp") # ~170-900 tokens +context = stack.wake_up(wing="myapp") # ~600-900 tokens # On-demand: L2 retrieval recall = stack.recall(wing="myapp", room="auth", n_results=10)