@vainplex/openclaw-cortex 0.1.0 β†’ 0.1.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.
Files changed (2) hide show
  1. package/README.md +159 -0
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -17,6 +17,165 @@
17
17
 
18
18
  Works **alongside** `memory-core` (OpenClaw's built-in memory) β€” doesn't replace it.
19
19
 
20
+ ## 🎬 Demo
21
+
22
+ Try the interactive demo β€” it simulates a real bilingual dev conversation and shows every Cortex feature in action:
23
+
24
+ ```bash
25
+ git clone https://github.com/alberthild/openclaw-cortex.git
26
+ cd openclaw-cortex && npm install
27
+ npx tsx demo/demo.ts
28
+ ```
29
+
30
+ ### What the demo shows
31
+
32
+ A 13-message conversation between a developer (Albert) and an AI assistant (Claudia) covering 3 topics in English and German. Cortex processes every message in real-time:
33
+
34
+ ```
35
+ πŸ‘€ Albert: Let's get back to the auth migration. We need to switch from JWT to OAuth2.
36
+ πŸ€– Claudia: I'll start with the token validation layer. The plan is to keep backward compatibility for 2 weeks.
37
+ πŸ‘€ Albert: Agreed. We decided to use Auth0 as the provider.
38
+ πŸ‘€ Albert: Also, jetzt zu dem Performance-Bug. Die API braucht 3 Sekunden fΓΌr simple Queries.
39
+ πŸ€– Claudia: Ich hab den Profiler laufen lassen. Das Problem ist der N+1 Query im User-Resolver.
40
+ πŸ‘€ Albert: Mist, das ist nervig. Wir brauchen das bis Freitag gefixt.
41
+ πŸ€– Claudia: Wir machen Batched DataLoader.
42
+ πŸ‘€ Albert: Beschlossen. Und wir warten auf den Review von Alexey bevor wir deployen.
43
+ πŸ€– Claudia: Auth migration is done βœ… All tests green, backward compat verified.
44
+ πŸ‘€ Albert: Nice! Perfekt gelaufen. πŸš€
45
+ πŸ‘€ Albert: Now about the Kubernetes cluster β€” we need to plan the migration from Docker Compose.
46
+ πŸ€– Claudia: I'll draft an architecture doc. Waiting for the cost estimate from Hetzner first.
47
+ πŸ‘€ Albert: Guter Fortschritt heute. Lass uns morgen mit dem K8s-Plan weitermachen.
48
+ ```
49
+
50
+ <details>
51
+ <summary><b>🧡 Thread Tracking</b> β€” 3 threads detected, 1 auto-closed</summary>
52
+
53
+ ```
54
+ Found 3 threads (2 open, 1 closed)
55
+
56
+ β—‹ 🟠 the auth migration
57
+ Status: closed ← detected "done βœ…" as closure signal
58
+ Priority: high
59
+ Mood: neutral
60
+
61
+ ● 🟑 dem Performance-Bug
62
+ Status: open
63
+ Priority: medium
64
+ Mood: neutral
65
+
66
+ ● 🟑 the Kubernetes cluster
67
+ Status: open
68
+ Priority: medium
69
+ Mood: neutral
70
+ Waiting for: cost estimate from Hetzner
71
+ ```
72
+
73
+ </details>
74
+
75
+ <details>
76
+ <summary><b>🎯 Decision Extraction</b> β€” 4 decisions found across 2 languages</summary>
77
+
78
+ ```
79
+ 🎯 The plan is to keep backward compatibility for 2 weeks
80
+ Impact: medium | Who: claudia
81
+
82
+ 🎯 We decided to use Auth0 as the provider
83
+ Impact: medium | Who: albert
84
+
85
+ 🎯 Wir machen Batched DataLoader
86
+ Impact: medium | Who: claudia
87
+
88
+ 🎯 Beschlossen. Und wir warten auf den Review von Alexey bevor wir deployen.
89
+ Impact: high | Who: albert
90
+ ```
91
+
92
+ Trigger patterns: `"the plan is"`, `"we decided"`, `"wir machen"`, `"beschlossen"`
93
+
94
+ </details>
95
+
96
+ <details>
97
+ <summary><b>πŸ”₯ Mood Detection</b> β€” session mood tracked from patterns</summary>
98
+
99
+ ```
100
+ Session mood: πŸ”₯ excited
101
+ (Detected from "Nice!", "Perfekt gelaufen", "πŸš€")
102
+ ```
103
+
104
+ Supported moods: `frustrated` 😀 Β· `excited` πŸ”₯ Β· `tense` ⚑ Β· `productive` πŸ”§ Β· `exploratory` πŸ”¬ Β· `neutral` 😐
105
+
106
+ </details>
107
+
108
+ <details>
109
+ <summary><b>πŸ“Έ Pre-Compaction Snapshot</b> β€” saves state before memory loss</summary>
110
+
111
+ ```
112
+ Success: yes
113
+ Messages snapshotted: 13
114
+ Warnings: none
115
+
116
+ Hot Snapshot (memory/reboot/hot-snapshot.md):
117
+ # Hot Snapshot β€” 2026-02-17
118
+ ## Last conversation before compaction
119
+
120
+ **Recent messages:**
121
+ - [user] Let's get back to the auth migration...
122
+ - [assistant] I'll start with the token validation layer...
123
+ - [user] Agreed. We decided to use Auth0 as the provider.
124
+ - [user] Also, jetzt zu dem Performance-Bug...
125
+ - ...
126
+ ```
127
+
128
+ </details>
129
+
130
+ <details>
131
+ <summary><b>πŸ“‹ Boot Context (BOOTSTRAP.md)</b> β€” ~786 tokens, ready for next session</summary>
132
+
133
+ ```markdown
134
+ # Context Briefing
135
+ Generated: 2026-02-17 | Local: 12:30
136
+
137
+ ## ⚑ State
138
+ Mode: Afternoon β€” execution mode
139
+ Last session mood: excited πŸ”₯
140
+
141
+ ## πŸ“– Narrative (last 24h)
142
+ **Completed:**
143
+ - βœ… the auth migration: Topic detected from albert
144
+
145
+ **Open:**
146
+ - 🟑 dem Performance-Bug: Topic detected from albert
147
+ - 🟑 the Kubernetes cluster: Topic detected from albert
148
+
149
+ **Decisions:**
150
+ - 🎯 The plan is to keep backward compatibility for 2 weeks (claudia)
151
+ - 🎯 We decided to use Auth0 as the provider (albert)
152
+ - 🎯 Wir machen Batched DataLoader (claudia)
153
+ - 🎯 Beschlossen. Warten auf Review von Alexey (albert)
154
+ ```
155
+
156
+ Total: 3,143 chars Β· ~786 tokens Β· regenerated every session start
157
+
158
+ </details>
159
+
160
+ <details>
161
+ <summary><b>πŸ“ Generated Files</b></summary>
162
+
163
+ ```
164
+ {workspace}/
165
+ β”œβ”€β”€ BOOTSTRAP.md 3,143 bytes
166
+ └── memory/reboot/
167
+ β”œβ”€β”€ threads.json 1,354 bytes
168
+ β”œβ”€β”€ decisions.json 1,619 bytes
169
+ β”œβ”€β”€ narrative.md 866 bytes
170
+ └── hot-snapshot.md 1,199 bytes
171
+ ```
172
+
173
+ All plain JSON + Markdown. No database, no external dependencies.
174
+
175
+ </details>
176
+
177
+ > πŸ“ Full raw output: [`demo/SAMPLE-OUTPUT.md`](demo/SAMPLE-OUTPUT.md)
178
+
20
179
  ## Install
21
180
 
22
181
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vainplex/openclaw-cortex",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "OpenClaw plugin: conversation intelligence β€” thread tracking, decision extraction, boot context, pre-compaction snapshots",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,7 +27,8 @@
27
27
  "openclaw": {
28
28
  "extensions": [
29
29
  "./dist/index.js"
30
- ]
30
+ ],
31
+ "id": "openclaw-cortex"
31
32
  },
32
33
  "keywords": [
33
34
  "openclaw",