mempalace-code 1.0.0__py3-none-any.whl
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.
- mempalace/README.md +40 -0
- mempalace/__init__.py +6 -0
- mempalace/__main__.py +5 -0
- mempalace/cli.py +811 -0
- mempalace/config.py +149 -0
- mempalace/convo_miner.py +415 -0
- mempalace/dialect.py +1075 -0
- mempalace/entity_detector.py +853 -0
- mempalace/entity_registry.py +639 -0
- mempalace/export.py +378 -0
- mempalace/general_extractor.py +521 -0
- mempalace/knowledge_graph.py +410 -0
- mempalace/layers.py +515 -0
- mempalace/mcp_server.py +873 -0
- mempalace/migrate.py +153 -0
- mempalace/miner.py +1285 -0
- mempalace/normalize.py +328 -0
- mempalace/onboarding.py +489 -0
- mempalace/palace_graph.py +225 -0
- mempalace/py.typed +0 -0
- mempalace/room_detector_local.py +310 -0
- mempalace/searcher.py +305 -0
- mempalace/spellcheck.py +269 -0
- mempalace/split_mega_files.py +309 -0
- mempalace/storage.py +807 -0
- mempalace/version.py +3 -0
- mempalace_code-1.0.0.dist-info/METADATA +489 -0
- mempalace_code-1.0.0.dist-info/RECORD +32 -0
- mempalace_code-1.0.0.dist-info/WHEEL +4 -0
- mempalace_code-1.0.0.dist-info/entry_points.txt +2 -0
- mempalace_code-1.0.0.dist-info/licenses/LICENSE +192 -0
- mempalace_code-1.0.0.dist-info/licenses/NOTICE +17 -0
mempalace/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# mempalace/ — Core Package
|
|
2
|
+
|
|
3
|
+
The Python package that powers MemPalace. All modules, all logic.
|
|
4
|
+
|
|
5
|
+
## Modules
|
|
6
|
+
|
|
7
|
+
| Module | What it does |
|
|
8
|
+
|--------|-------------|
|
|
9
|
+
| `cli.py` | CLI entry point — routes to mine, search, init, compress, wake-up |
|
|
10
|
+
| `config.py` | Configuration loading — `~/.mempalace/config.json`, env vars, defaults |
|
|
11
|
+
| `normalize.py` | Converts 5 chat formats (Claude Code JSONL, Claude.ai JSON, ChatGPT JSON, Slack JSON, plain text) to standard transcript format |
|
|
12
|
+
| `miner.py` | Project file ingest — scans directories, chunks by paragraph, stores to ChromaDB |
|
|
13
|
+
| `convo_miner.py` | Conversation ingest — chunks by exchange pair (Q+A), detects rooms from content |
|
|
14
|
+
| `searcher.py` | Semantic search via ChromaDB vectors — filters by wing/room, returns verbatim + scores |
|
|
15
|
+
| `layers.py` | 4-layer memory stack: L0 (identity), L1 (critical facts), L2 (room recall), L3 (deep search) |
|
|
16
|
+
| `dialect.py` | AAAK compression — entity codes, emotion markers, 30x lossless ratio |
|
|
17
|
+
| `knowledge_graph.py` | Temporal entity-relationship graph — SQLite, time-filtered queries, fact invalidation |
|
|
18
|
+
| `palace_graph.py` | Room-based navigation graph — BFS traversal, tunnel detection across wings |
|
|
19
|
+
| `mcp_server.py` | MCP server — 19 tools, AAAK auto-teach, Palace Protocol, agent diary |
|
|
20
|
+
| `onboarding.py` | Guided first-run setup — asks about people/projects, generates AAAK bootstrap + wing config |
|
|
21
|
+
| `entity_registry.py` | Entity code registry — maps names to AAAK codes, handles ambiguous names |
|
|
22
|
+
| `entity_detector.py` | Auto-detect people and projects from file content |
|
|
23
|
+
| `general_extractor.py` | Classifies text into 5 memory types (decision, preference, milestone, problem, emotional) |
|
|
24
|
+
| `room_detector_local.py` | Maps folders to room names using 70+ patterns — no API |
|
|
25
|
+
| `spellcheck.py` | Name-aware spellcheck — won't "correct" proper nouns in your entity registry |
|
|
26
|
+
| `split_mega_files.py` | Splits concatenated transcript files into per-session files |
|
|
27
|
+
|
|
28
|
+
## Architecture
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
User → CLI → miner/convo_miner → ChromaDB (palace)
|
|
32
|
+
↕
|
|
33
|
+
knowledge_graph (SQLite)
|
|
34
|
+
↕
|
|
35
|
+
User → MCP Server → searcher → results
|
|
36
|
+
→ kg_query → entity facts
|
|
37
|
+
→ diary → agent journal
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The palace (ChromaDB) stores verbatim content. The knowledge graph (SQLite) stores structured relationships. The MCP server exposes both to any AI tool.
|
mempalace/__init__.py
ADDED