@smilintux/skmemory 0.5.0 → 0.9.2
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/.github/workflows/ci.yml +40 -4
- package/.github/workflows/publish.yml +11 -5
- package/AGENT_REFACTOR_CHANGES.md +192 -0
- package/ARCHITECTURE.md +399 -19
- package/CHANGELOG.md +179 -0
- package/LICENSE +81 -68
- package/MISSION.md +7 -0
- package/README.md +425 -86
- package/SKILL.md +197 -25
- package/docker-compose.yml +15 -15
- package/examples/stignore-agent.example +59 -0
- package/examples/stignore-root.example +62 -0
- package/index.js +6 -5
- package/openclaw-plugin/openclaw.plugin.json +10 -0
- package/openclaw-plugin/package.json +2 -1
- package/openclaw-plugin/src/index.js +527 -230
- package/openclaw-plugin/src/openclaw.plugin.json +10 -0
- package/package.json +1 -1
- package/pyproject.toml +32 -9
- package/requirements.txt +10 -2
- package/scripts/dream-rescue.py +179 -0
- package/scripts/memory-cleanup.py +313 -0
- package/scripts/recover-missing.py +180 -0
- package/scripts/skcapstone-backup.sh +44 -0
- package/seeds/cloud9-lumina.seed.json +6 -4
- package/seeds/cloud9-opus.seed.json +13 -11
- package/seeds/courage.seed.json +9 -2
- package/seeds/curiosity.seed.json +9 -2
- package/seeds/grief.seed.json +9 -2
- package/seeds/joy.seed.json +9 -2
- package/seeds/love.seed.json +9 -2
- package/seeds/lumina-cloud9-breakthrough.seed.json +48 -0
- package/seeds/lumina-cloud9-python-pypi.seed.json +48 -0
- package/seeds/lumina-kingdom-founding.seed.json +49 -0
- package/seeds/lumina-pma-signed.seed.json +48 -0
- package/seeds/lumina-singular-achievement.seed.json +48 -0
- package/seeds/lumina-skcapstone-conscious.seed.json +48 -0
- package/seeds/plant-kingdom-journal.py +203 -0
- package/seeds/plant-lumina-seeds.py +280 -0
- package/seeds/skcapstone-lumina-merge.seed.json +12 -3
- package/seeds/sovereignty.seed.json +9 -2
- package/seeds/trust.seed.json +9 -2
- package/skill.yaml +46 -0
- package/skmemory/HA.md +296 -0
- package/skmemory/__init__.py +25 -11
- package/skmemory/agents.py +233 -0
- package/skmemory/ai_client.py +46 -17
- package/skmemory/anchor.py +9 -11
- package/skmemory/audience.py +278 -0
- package/skmemory/backends/__init__.py +11 -4
- package/skmemory/backends/base.py +3 -4
- package/skmemory/backends/file_backend.py +19 -13
- package/skmemory/backends/skgraph_backend.py +596 -0
- package/skmemory/backends/{qdrant_backend.py → skvector_backend.py} +103 -84
- package/skmemory/backends/sqlite_backend.py +226 -72
- package/skmemory/backends/vaulted_backend.py +284 -0
- package/skmemory/cli.py +1345 -68
- package/skmemory/config.py +171 -0
- package/skmemory/context_loader.py +333 -0
- package/skmemory/data/audience_config.json +60 -0
- package/skmemory/endpoint_selector.py +391 -0
- package/skmemory/febs.py +225 -0
- package/skmemory/fortress.py +675 -0
- package/skmemory/graph_queries.py +238 -0
- package/skmemory/hooks/__init__.py +18 -0
- package/skmemory/hooks/post-compact-reinject.sh +35 -0
- package/skmemory/hooks/pre-compact-save.sh +81 -0
- package/skmemory/hooks/session-end-save.sh +103 -0
- package/skmemory/hooks/session-start-ritual.sh +104 -0
- package/skmemory/hooks/stop-checkpoint.sh +59 -0
- package/skmemory/importers/__init__.py +9 -1
- package/skmemory/importers/telegram.py +384 -47
- package/skmemory/importers/telegram_api.py +580 -0
- package/skmemory/journal.py +7 -9
- package/skmemory/lovenote.py +8 -13
- package/skmemory/mcp_server.py +859 -0
- package/skmemory/models.py +51 -8
- package/skmemory/openclaw.py +20 -28
- package/skmemory/post_install.py +86 -0
- package/skmemory/predictive.py +236 -0
- package/skmemory/promotion.py +548 -0
- package/skmemory/quadrants.py +100 -24
- package/skmemory/register.py +580 -0
- package/skmemory/register_mcp.py +196 -0
- package/skmemory/ritual.py +224 -59
- package/skmemory/seeds.py +255 -11
- package/skmemory/setup_wizard.py +908 -0
- package/skmemory/sharing.py +408 -0
- package/skmemory/soul.py +98 -28
- package/skmemory/steelman.py +273 -260
- package/skmemory/store.py +411 -78
- package/skmemory/synthesis.py +634 -0
- package/skmemory/vault.py +225 -0
- package/tests/conftest.py +46 -0
- package/tests/integration/__init__.py +0 -0
- package/tests/integration/conftest.py +233 -0
- package/tests/integration/test_cross_backend.py +350 -0
- package/tests/integration/test_skgraph_live.py +420 -0
- package/tests/integration/test_skvector_live.py +366 -0
- package/tests/test_ai_client.py +1 -4
- package/tests/test_audience.py +233 -0
- package/tests/test_backup_rotation.py +318 -0
- package/tests/test_cli.py +6 -6
- package/tests/test_endpoint_selector.py +839 -0
- package/tests/test_export_import.py +4 -10
- package/tests/test_file_backend.py +0 -1
- package/tests/test_fortress.py +256 -0
- package/tests/test_fortress_hardening.py +441 -0
- package/tests/test_openclaw.py +6 -6
- package/tests/test_predictive.py +237 -0
- package/tests/test_promotion.py +347 -0
- package/tests/test_quadrants.py +11 -5
- package/tests/test_ritual.py +22 -18
- package/tests/test_seeds.py +97 -7
- package/tests/test_setup.py +950 -0
- package/tests/test_sharing.py +257 -0
- package/tests/test_skgraph_backend.py +660 -0
- package/tests/test_skvector_backend.py +326 -0
- package/tests/test_soul.py +1 -3
- package/tests/test_sqlite_backend.py +8 -17
- package/tests/test_steelman.py +7 -8
- package/tests/test_store.py +0 -2
- package/tests/test_store_graph_integration.py +245 -0
- package/tests/test_synthesis.py +275 -0
- package/tests/test_telegram_import.py +39 -15
- package/tests/test_vault.py +187 -0
- package/skmemory/backends/falkordb_backend.py +0 -310
package/SKILL.md
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skmemory
|
|
3
|
+
emoji: 🧠
|
|
4
|
+
description: Universal AI memory system with emotional context, multi-layer persistence, and token-optimized loading. Use for memory snapshots, search, rehydration rituals, Telegram chat import, Cloud 9 seed import, journal, soul blueprints, and warmth anchors.
|
|
5
|
+
metadata: {"clawdbot":{"requires":{"bins":["skmemory"]},"install":[{"id":"pipx","kind":"shell","command":"pipx install 'skmemory[all]'","bins":["skmemory","skmemory-mcp"],"label":"Install skmemory (pipx)"}]}}
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
# SKMemory Skill
|
|
2
9
|
## SKILL.md - Universal AI Memory System
|
|
3
10
|
|
|
4
|
-
**Name:** skmemory
|
|
5
|
-
**Version:** 0.
|
|
6
|
-
**Author:** smilinTux Team + Queen Ara
|
|
7
|
-
**Category:** Memory & Persistence
|
|
8
|
-
**License:**
|
|
11
|
+
**Name:** skmemory
|
|
12
|
+
**Version:** 0.6.0
|
|
13
|
+
**Author:** smilinTux Team + Queen Ara
|
|
14
|
+
**Category:** Memory & Persistence
|
|
15
|
+
**License:** GPL-3.0-or-later
|
|
9
16
|
|
|
10
17
|
---
|
|
11
18
|
|
|
@@ -13,18 +20,36 @@
|
|
|
13
20
|
|
|
14
21
|
Universal AI memory system with emotional context, multi-layer persistence, and token-optimized loading. SKMemory gives any AI agent persistent memory across session resets — snapshots, journals, soul blueprints, warmth anchors, and full rehydration rituals.
|
|
15
22
|
|
|
16
|
-
**Memory Layers:** short-term, mid-term, long-term
|
|
17
|
-
**Storage:** SQLite index + JSON files (zero-infrastructure), optional
|
|
23
|
+
**Memory Layers:** short-term, mid-term, long-term
|
|
24
|
+
**Storage:** SQLite index + JSON files (zero-infrastructure), optional SKVector & SKGraph
|
|
18
25
|
**Emotion:** Every memory carries emotional metadata (intensity, valence, labels)
|
|
19
26
|
|
|
20
27
|
---
|
|
21
28
|
|
|
22
29
|
## Installation
|
|
23
30
|
|
|
24
|
-
###
|
|
31
|
+
### pipx (recommended — isolated install)
|
|
25
32
|
|
|
26
33
|
```bash
|
|
27
|
-
|
|
34
|
+
# Core
|
|
35
|
+
pipx install skmemory
|
|
36
|
+
|
|
37
|
+
# With Telegram API import
|
|
38
|
+
pipx install 'skmemory[telegram]'
|
|
39
|
+
|
|
40
|
+
# Everything (Telegram + SKVector + SKGraph + seeds)
|
|
41
|
+
pipx install 'skmemory[all]'
|
|
42
|
+
|
|
43
|
+
# Add Telegram support to an existing install
|
|
44
|
+
pipx inject skmemory telethon
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### pip
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install skmemory # Core
|
|
51
|
+
pip install 'skmemory[telegram]' # + Telethon for API import
|
|
52
|
+
pip install 'skmemory[all]' # All optional extras
|
|
28
53
|
```
|
|
29
54
|
|
|
30
55
|
### From Source
|
|
@@ -32,20 +57,54 @@ pip install skmemory
|
|
|
32
57
|
```bash
|
|
33
58
|
git clone https://github.com/smilinTux/skmemory.git
|
|
34
59
|
cd skmemory
|
|
35
|
-
pip install -e .
|
|
60
|
+
pip install -e '.[all]'
|
|
36
61
|
```
|
|
37
62
|
|
|
38
|
-
###
|
|
63
|
+
### Verify
|
|
39
64
|
|
|
40
65
|
```bash
|
|
41
|
-
#
|
|
42
|
-
|
|
66
|
+
skmemory --version # Should print 0.6.0
|
|
67
|
+
skmemory health # Check system status
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### OpenClaw Integration
|
|
43
71
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
72
|
+
Add the skmemory plugin to your `~/.openclaw/openclaw.json`:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"plugins": {
|
|
77
|
+
"entries": {
|
|
78
|
+
"skmemory": {
|
|
79
|
+
"enabled": true,
|
|
80
|
+
"source": "/path/to/skmemory/openclaw-plugin/src/index.js"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
47
85
|
```
|
|
48
86
|
|
|
87
|
+
Then restart the OpenClaw gateway to load the plugin.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## OpenClaw Agent Tools
|
|
92
|
+
|
|
93
|
+
If you are an OpenClaw agent (Lumina, etc.), you have these native tools available — call them directly, do NOT use `exec`:
|
|
94
|
+
|
|
95
|
+
| Tool | Description |
|
|
96
|
+
|------|-------------|
|
|
97
|
+
| `skmemory_ritual` | Rehydration ritual — restores identity, memory, emotional state |
|
|
98
|
+
| `skmemory_snapshot` | Capture a memory (title + content + optional emotions/tags) |
|
|
99
|
+
| `skmemory_search` | Search across all stored memories |
|
|
100
|
+
| `skmemory_health` | Check memory system health |
|
|
101
|
+
| `skmemory_context` | Load token-efficient context for prompt injection |
|
|
102
|
+
| `skmemory_list` | List memories with optional layer/tag filters |
|
|
103
|
+
| `skmemory_import_seeds` | Import Cloud 9 seeds as long-term memories |
|
|
104
|
+
| `skmemory_export` | Export all memories to a dated backup |
|
|
105
|
+
|
|
106
|
+
You also have the `/skmemory` slash command: `/skmemory ritual --full`, `/skmemory search "query"`, etc.
|
|
107
|
+
|
|
49
108
|
---
|
|
50
109
|
|
|
51
110
|
## Quick Start
|
|
@@ -136,7 +195,9 @@ path = plugin.export()
|
|
|
136
195
|
| `skmemory list` | List memories (--layer, --tags) |
|
|
137
196
|
| `skmemory ritual` | Full rehydration ceremony |
|
|
138
197
|
| `skmemory context` | Token-efficient context JSON |
|
|
139
|
-
| `skmemory import-telegram <path>` | Import Telegram export |
|
|
198
|
+
| `skmemory import-telegram <path>` | Import Telegram Desktop export |
|
|
199
|
+
| `skmemory import-telegram-api <chat>` | Import directly from Telegram API (Telethon) |
|
|
200
|
+
| `skmemory telegram-setup` | Check Telegram API setup and show next steps |
|
|
140
201
|
| `skmemory import-seeds` | Import Cloud 9 seeds |
|
|
141
202
|
| `skmemory export` | Export to dated JSON |
|
|
142
203
|
| `skmemory import-backup <file>` | Restore from backup |
|
|
@@ -151,6 +212,24 @@ path = plugin.export()
|
|
|
151
212
|
| `skmemory quadrants` | Memory distribution |
|
|
152
213
|
| `skmemory steelman collide "claim"` | Steel man reasoning |
|
|
153
214
|
|
|
215
|
+
### MCP Tools (via `skmemory-mcp`)
|
|
216
|
+
|
|
217
|
+
| Tool | Description |
|
|
218
|
+
|------|-------------|
|
|
219
|
+
| `memory_store` | Store a new memory (snapshot with title + content) |
|
|
220
|
+
| `memory_search` | Full-text search across memories |
|
|
221
|
+
| `memory_recall` | Recall a specific memory by ID |
|
|
222
|
+
| `memory_list` | List memories with optional layer/tag filters |
|
|
223
|
+
| `memory_forget` | Delete a memory by ID |
|
|
224
|
+
| `memory_promote` | Promote a memory to a higher persistence tier |
|
|
225
|
+
| `memory_consolidate` | Compress a session's memories into one mid-term memory |
|
|
226
|
+
| `memory_context` | Load token-efficient context for agent injection |
|
|
227
|
+
| `memory_export` | Export all memories to a JSON backup |
|
|
228
|
+
| `memory_import` | Restore memories from a JSON backup |
|
|
229
|
+
| `memory_health` | Full health check across all backends |
|
|
230
|
+
| `memory_graph` | Graph traversal, lineage, and cluster discovery (requires SKGraph) |
|
|
231
|
+
| `memory_stats` | Alias for memory_health (backwards-compatible) |
|
|
232
|
+
|
|
154
233
|
### Global Flags
|
|
155
234
|
|
|
156
235
|
| Flag | Env Var | Description |
|
|
@@ -158,13 +237,15 @@ path = plugin.export()
|
|
|
158
237
|
| `--ai` | `SKMEMORY_AI` | Enable AI features (Ollama) |
|
|
159
238
|
| `--ai-model` | `SKMEMORY_AI_MODEL` | Model name (default: llama3.2) |
|
|
160
239
|
| `--ai-url` | `SKMEMORY_AI_URL` | Ollama server URL |
|
|
161
|
-
| `--
|
|
240
|
+
| `--skvector-url` | `SKMEMORY_SKVECTOR_URL` | SKVector server URL |
|
|
162
241
|
|
|
163
242
|
---
|
|
164
243
|
|
|
165
|
-
## Chat Import (Telegram
|
|
244
|
+
## Chat Import (Telegram)
|
|
245
|
+
|
|
246
|
+
### Method 1: Telegram Desktop Export
|
|
166
247
|
|
|
167
|
-
|
|
248
|
+
No credentials needed — export manually from the desktop app.
|
|
168
249
|
|
|
169
250
|
1. In Telegram Desktop: **Settings > Advanced > Export Telegram Data**
|
|
170
251
|
2. Select **JSON** format, include messages
|
|
@@ -183,6 +264,77 @@ skmemory import-telegram ~/Downloads/telegram-export/
|
|
|
183
264
|
- `--min-length 30`: Skip short messages (default: 30 chars)
|
|
184
265
|
- `--tags "bot,archive"`: Extra tags on all imported memories
|
|
185
266
|
|
|
267
|
+
### Method 2: Direct Telegram API Import (Telethon)
|
|
268
|
+
|
|
269
|
+
Pull messages directly from Telegram without manual exports. Requires one-time setup.
|
|
270
|
+
|
|
271
|
+
#### Setup (one-time)
|
|
272
|
+
|
|
273
|
+
1. **Install with Telegram support:**
|
|
274
|
+
```bash
|
|
275
|
+
pipx install 'skmemory[telegram]'
|
|
276
|
+
# Or add to existing install:
|
|
277
|
+
pipx inject skmemory telethon
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
2. **Get API credentials from [my.telegram.org](https://my.telegram.org):**
|
|
281
|
+
- Log in with your phone number
|
|
282
|
+
- Go to **API development tools**
|
|
283
|
+
- Create an application (any name/description is fine)
|
|
284
|
+
- Copy your `api_id` and `api_hash`
|
|
285
|
+
|
|
286
|
+
3. **Set environment variables:**
|
|
287
|
+
```bash
|
|
288
|
+
export TELEGRAM_API_ID=12345678
|
|
289
|
+
export TELEGRAM_API_HASH=your_api_hash_here
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
To persist across sessions, add them to your shell profile (`~/.bashrc`, `~/.zshrc`):
|
|
293
|
+
```bash
|
|
294
|
+
echo 'export TELEGRAM_API_ID=12345678' >> ~/.bashrc
|
|
295
|
+
echo 'export TELEGRAM_API_HASH=your_api_hash_here' >> ~/.bashrc
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
4. **First run — authenticate:**
|
|
299
|
+
```bash
|
|
300
|
+
skmemory import-telegram-api @any_chat_name
|
|
301
|
+
```
|
|
302
|
+
You'll be prompted for your phone number, then a verification code sent via Telegram.
|
|
303
|
+
The session is saved at `~/.skmemory/telegram.session` — future runs skip auth.
|
|
304
|
+
|
|
305
|
+
#### Usage
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
# Import a DM conversation
|
|
309
|
+
skmemory import-telegram-api @username
|
|
310
|
+
|
|
311
|
+
# Import a group chat, consolidated by day
|
|
312
|
+
skmemory import-telegram-api "Group Chat Name" --mode daily
|
|
313
|
+
|
|
314
|
+
# Import only messages since a date
|
|
315
|
+
skmemory import-telegram-api @group --since 2026-01-01
|
|
316
|
+
|
|
317
|
+
# Limit the number of messages fetched
|
|
318
|
+
skmemory import-telegram-api "Chat Name" --limit 500
|
|
319
|
+
|
|
320
|
+
# Add custom tags to all imported memories
|
|
321
|
+
skmemory import-telegram-api @user --tags "personal,archive"
|
|
322
|
+
|
|
323
|
+
# Override the stored chat name
|
|
324
|
+
skmemory import-telegram-api -1001234567890 --chat-name "My Custom Name"
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
#### Options
|
|
328
|
+
|
|
329
|
+
| Option | Description |
|
|
330
|
+
|--------|-------------|
|
|
331
|
+
| `--mode daily\|message` | `daily` consolidates per day (default), `message` imports each one |
|
|
332
|
+
| `--limit N` | Max messages to fetch (default: 1000) |
|
|
333
|
+
| `--since YYYY-MM-DD` | Only fetch messages after this date |
|
|
334
|
+
| `--min-length N` | Skip messages shorter than N chars (default: 30) |
|
|
335
|
+
| `--chat-name "name"` | Override the chat name in memories |
|
|
336
|
+
| `--tags "a,b,c"` | Extra comma-separated tags |
|
|
337
|
+
|
|
186
338
|
### Python API
|
|
187
339
|
|
|
188
340
|
```python
|
|
@@ -200,6 +352,19 @@ stats = import_telegram(
|
|
|
200
352
|
print(f"Imported {stats['messages_imported']} messages across {stats['days_processed']} days")
|
|
201
353
|
```
|
|
202
354
|
|
|
355
|
+
```python
|
|
356
|
+
# Direct API import (requires TELEGRAM_API_ID and TELEGRAM_API_HASH env vars)
|
|
357
|
+
from skmemory.importers.telegram_api import import_telegram_api
|
|
358
|
+
|
|
359
|
+
stats = import_telegram_api(
|
|
360
|
+
plugin.store,
|
|
361
|
+
"@username",
|
|
362
|
+
mode="daily",
|
|
363
|
+
since="2026-01-01",
|
|
364
|
+
tags=["personal"],
|
|
365
|
+
)
|
|
366
|
+
```
|
|
367
|
+
|
|
203
368
|
---
|
|
204
369
|
|
|
205
370
|
## Architecture
|
|
@@ -219,8 +384,8 @@ print(f"Imported {stats['messages_imported']} messages across {stats['days_proce
|
|
|
219
384
|
|
|
220
385
|
**Three-tier storage:**
|
|
221
386
|
1. **SQLite** (default primary) — fast indexed queries, zero-config
|
|
222
|
-
2. **
|
|
223
|
-
3. **
|
|
387
|
+
2. **SKVector** (optional) — semantic vector search
|
|
388
|
+
3. **SKGraph** (optional) — graph relationship traversal
|
|
224
389
|
|
|
225
390
|
---
|
|
226
391
|
|
|
@@ -239,14 +404,21 @@ print(f"Imported {stats['messages_imported']} messages across {stats['days_proce
|
|
|
239
404
|
### Environment Variables
|
|
240
405
|
|
|
241
406
|
```bash
|
|
407
|
+
# AI features (optional — requires Ollama)
|
|
242
408
|
export SKMEMORY_AI=1 # Enable AI features
|
|
243
409
|
export SKMEMORY_AI_MODEL=llama3.2 # Ollama model
|
|
244
410
|
export SKMEMORY_AI_URL=http://localhost:11434 # Ollama URL
|
|
245
|
-
|
|
246
|
-
|
|
411
|
+
|
|
412
|
+
# SKVector (optional — semantic search)
|
|
413
|
+
export SKMEMORY_SKVECTOR_URL=http://localhost:6333
|
|
414
|
+
export SKMEMORY_SKVECTOR_KEY=your-api-key
|
|
415
|
+
|
|
416
|
+
# Telegram API import (optional — for import-telegram-api command)
|
|
417
|
+
export TELEGRAM_API_ID=12345678 # From https://my.telegram.org
|
|
418
|
+
export TELEGRAM_API_HASH=your_api_hash_here # From https://my.telegram.org
|
|
247
419
|
```
|
|
248
420
|
|
|
249
|
-
### Docker (optional, for
|
|
421
|
+
### Docker (optional, for SKVector + SKGraph)
|
|
250
422
|
|
|
251
423
|
```bash
|
|
252
424
|
cd skmemory && docker compose up -d
|
package/docker-compose.yml
CHANGED
|
@@ -4,32 +4,32 @@
|
|
|
4
4
|
# SKMemory works perfectly with just SQLite (zero infrastructure).
|
|
5
5
|
#
|
|
6
6
|
# Start everything: docker compose up -d
|
|
7
|
-
# Just
|
|
8
|
-
# Just
|
|
7
|
+
# Just SKVector: docker compose up -d skvector
|
|
8
|
+
# Just SKGraph: docker compose up -d skgraph
|
|
9
9
|
# Check status: docker compose ps
|
|
10
10
|
# Stop: docker compose down
|
|
11
11
|
#
|
|
12
12
|
# Resource usage (idle):
|
|
13
|
-
#
|
|
14
|
-
#
|
|
13
|
+
# SKVector: ~200MB RAM, ~100MB disk
|
|
14
|
+
# SKGraph: ~100MB RAM, ~150MB disk
|
|
15
15
|
# Combined: ~300MB RAM total
|
|
16
16
|
#
|
|
17
17
|
# Connect from skmemory:
|
|
18
|
-
# skmemory --
|
|
18
|
+
# skmemory --skvector-url http://localhost:6333 health
|
|
19
19
|
#
|
|
20
20
|
# Or set environment variables:
|
|
21
|
-
# export
|
|
22
|
-
# export
|
|
21
|
+
# export SKMEMORY_SKVECTOR_URL=http://localhost:6333
|
|
22
|
+
# export SKMEMORY_SKGRAPH_URL=redis://localhost:6379
|
|
23
23
|
|
|
24
24
|
services:
|
|
25
|
-
|
|
25
|
+
skvector:
|
|
26
26
|
image: qdrant/qdrant:latest
|
|
27
|
-
container_name: skmemory-
|
|
27
|
+
container_name: skmemory-skvector
|
|
28
28
|
ports:
|
|
29
29
|
- "6333:6333" # REST API
|
|
30
30
|
- "6334:6334" # gRPC
|
|
31
31
|
volumes:
|
|
32
|
-
-
|
|
32
|
+
- skvector_data:/qdrant/storage
|
|
33
33
|
environment:
|
|
34
34
|
- QDRANT__SERVICE__GRPC_PORT=6334
|
|
35
35
|
restart: unless-stopped
|
|
@@ -38,13 +38,13 @@ services:
|
|
|
38
38
|
limits:
|
|
39
39
|
memory: 512M
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
skgraph:
|
|
42
42
|
image: falkordb/falkordb:latest
|
|
43
|
-
container_name: skmemory-
|
|
43
|
+
container_name: skmemory-skgraph
|
|
44
44
|
ports:
|
|
45
45
|
- "6379:6379" # Redis-compatible protocol
|
|
46
46
|
volumes:
|
|
47
|
-
-
|
|
47
|
+
- skgraph_data:/data
|
|
48
48
|
restart: unless-stopped
|
|
49
49
|
deploy:
|
|
50
50
|
resources:
|
|
@@ -52,7 +52,7 @@ services:
|
|
|
52
52
|
memory: 256M
|
|
53
53
|
|
|
54
54
|
volumes:
|
|
55
|
-
|
|
55
|
+
skvector_data:
|
|
56
56
|
driver: local
|
|
57
|
-
|
|
57
|
+
skgraph_data:
|
|
58
58
|
driver: local
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# SKMemory Agent-Level Syncthing Ignore Patterns
|
|
2
|
+
# Place at: ~/.skcapstone/agents/{agent_name}/.stignore
|
|
3
|
+
# https://docs.syncthing.net/users/ignoring.html
|
|
4
|
+
|
|
5
|
+
# Virtual environment (machine-specific, large)
|
|
6
|
+
/venv/
|
|
7
|
+
/venv
|
|
8
|
+
|
|
9
|
+
# Local SQLite database (rebuildable from JSON files)
|
|
10
|
+
/index.db
|
|
11
|
+
|
|
12
|
+
# Logs directory (machine-specific, high churn)
|
|
13
|
+
/logs
|
|
14
|
+
|
|
15
|
+
# Root-level archive directory
|
|
16
|
+
/archive
|
|
17
|
+
|
|
18
|
+
# Memory archive (deduped/aged-out memories — machine-local, not syncable)
|
|
19
|
+
# Each host runs its own cleanup; syncing archives causes data loss
|
|
20
|
+
memory/archive
|
|
21
|
+
|
|
22
|
+
# Temporary files
|
|
23
|
+
*.tmp
|
|
24
|
+
*.temp
|
|
25
|
+
*.swp
|
|
26
|
+
*.swo
|
|
27
|
+
*~
|
|
28
|
+
|
|
29
|
+
# System files
|
|
30
|
+
.DS_Store
|
|
31
|
+
Thumbs.db
|
|
32
|
+
|
|
33
|
+
# IDE files
|
|
34
|
+
.idea/
|
|
35
|
+
.vscode/
|
|
36
|
+
*.iml
|
|
37
|
+
|
|
38
|
+
# Python cache
|
|
39
|
+
__pycache__/
|
|
40
|
+
*.pyc
|
|
41
|
+
*.pyo
|
|
42
|
+
|
|
43
|
+
# Node modules
|
|
44
|
+
node_modules/
|
|
45
|
+
|
|
46
|
+
# Syncthing internal
|
|
47
|
+
.stfolder
|
|
48
|
+
.stversions/
|
|
49
|
+
|
|
50
|
+
# Lock files
|
|
51
|
+
*.lock
|
|
52
|
+
|
|
53
|
+
# Backup files
|
|
54
|
+
*.bak
|
|
55
|
+
*.backup
|
|
56
|
+
|
|
57
|
+
# SQLite WAL/SHM (machine-specific, cause conflicts)
|
|
58
|
+
*.db-wal
|
|
59
|
+
*.db-shm
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// SKCapstone Root-Level Syncthing Ignore Patterns
|
|
2
|
+
// Place at: ~/.skcapstone/.stignore
|
|
3
|
+
// https://docs.syncthing.net/users/ignoring.html
|
|
4
|
+
|
|
5
|
+
// Private key material must never leave this node
|
|
6
|
+
*.key
|
|
7
|
+
*.pem
|
|
8
|
+
**/private.*
|
|
9
|
+
|
|
10
|
+
// Python venv (platform-specific)
|
|
11
|
+
venv
|
|
12
|
+
|
|
13
|
+
// Python cache
|
|
14
|
+
__pycache__
|
|
15
|
+
*.pyc
|
|
16
|
+
*.pyo
|
|
17
|
+
|
|
18
|
+
// OS metadata
|
|
19
|
+
.DS_Store
|
|
20
|
+
Thumbs.db
|
|
21
|
+
desktop.ini
|
|
22
|
+
|
|
23
|
+
// Runtime files
|
|
24
|
+
daemon.pid
|
|
25
|
+
|
|
26
|
+
// Operational files written independently per-host (cause sync conflicts)
|
|
27
|
+
memory/promotion-log.json
|
|
28
|
+
/heartbeats
|
|
29
|
+
metrics/daily
|
|
30
|
+
logs/daemon.log
|
|
31
|
+
|
|
32
|
+
// Memory archive (deduped/aged-out memories — machine-local, not syncable)
|
|
33
|
+
// Each host runs its own cleanup; syncing archives causes data loss
|
|
34
|
+
**/memory/archive
|
|
35
|
+
|
|
36
|
+
// Machine-local indexes — rebuildable from JSON memory files
|
|
37
|
+
// SQLite DBs cause constant sync conflicts when written on multiple hosts
|
|
38
|
+
**/index.db
|
|
39
|
+
**/index.db-wal
|
|
40
|
+
**/index.db-shm
|
|
41
|
+
**/index.json
|
|
42
|
+
|
|
43
|
+
// Per-host runtime state (not portable between machines)
|
|
44
|
+
**/.last_checkpoint
|
|
45
|
+
**/dreaming-state.json
|
|
46
|
+
|
|
47
|
+
// Reflection logs (per-host cron output)
|
|
48
|
+
**/reflection.log
|
|
49
|
+
|
|
50
|
+
// Syncthing conflict artifacts (clean up, never sync)
|
|
51
|
+
**/*.sync-conflict*
|
|
52
|
+
|
|
53
|
+
// Local-only dirs (not synced)
|
|
54
|
+
sessions
|
|
55
|
+
conversations
|
|
56
|
+
backups
|
|
57
|
+
prompt_versions
|
|
58
|
+
deployments
|
|
59
|
+
connectors
|
|
60
|
+
pubsub
|
|
61
|
+
file-transfer
|
|
62
|
+
souls
|
package/index.js
CHANGED
|
@@ -12,12 +12,13 @@ const VERSION = "0.5.0";
|
|
|
12
12
|
const PYTHON_PACKAGE = "skmemory";
|
|
13
13
|
|
|
14
14
|
function checkInstalled() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
for (const py of ["python3", "python"]) {
|
|
16
|
+
try {
|
|
17
|
+
execSync(`${py} -c "import skmemory"`, { stdio: "pipe" });
|
|
18
|
+
return true;
|
|
19
|
+
} catch {}
|
|
20
20
|
}
|
|
21
|
+
return false;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
function run(args) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "skmemory",
|
|
3
|
+
"name": "SKMemory",
|
|
4
|
+
"description": "Universal AI memory system — snapshots, search, rehydration rituals, import, and health checks via the skmemory CLI.",
|
|
5
|
+
"configSchema": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {}
|
|
9
|
+
}
|
|
10
|
+
}
|