@vainplex/openclaw-cortex 0.1.1 β 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.
- package/README.md +137 -20
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
Works **alongside** `memory-core` (OpenClaw's built-in memory) β doesn't replace it.
|
|
19
19
|
|
|
20
|
-
## Demo
|
|
20
|
+
## π¬ Demo
|
|
21
21
|
|
|
22
|
-
Try the interactive demo
|
|
22
|
+
Try the interactive demo β it simulates a real bilingual dev conversation and shows every Cortex feature in action:
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
25
|
git clone https://github.com/alberthild/openclaw-cortex.git
|
|
@@ -27,38 +27,155 @@ cd openclaw-cortex && npm install
|
|
|
27
27
|
npx tsx demo/demo.ts
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
### What the demo shows
|
|
31
31
|
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
+
```
|
|
37
49
|
|
|
38
50
|
<details>
|
|
39
|
-
<summary
|
|
51
|
+
<summary><b>π§΅ Thread Tracking</b> β 3 threads detected, 1 auto-closed</summary>
|
|
40
52
|
|
|
41
53
|
```
|
|
42
|
-
|
|
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>
|
|
43
74
|
|
|
44
|
-
|
|
75
|
+
<details>
|
|
76
|
+
<summary><b>π― Decision Extraction</b> β 4 decisions found across 2 languages</summary>
|
|
45
77
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
78
|
+
```
|
|
79
|
+
π― The plan is to keep backward compatibility for 2 weeks
|
|
80
|
+
Impact: medium | Who: claudia
|
|
49
81
|
|
|
50
|
-
|
|
82
|
+
π― We decided to use Auth0 as the provider
|
|
83
|
+
Impact: medium | Who: albert
|
|
51
84
|
|
|
52
|
-
|
|
85
|
+
π― Wir machen Batched DataLoader
|
|
86
|
+
Impact: medium | Who: claudia
|
|
53
87
|
|
|
54
|
-
π―
|
|
55
|
-
|
|
56
|
-
π― Wir machen Batched DataLoader [medium]
|
|
57
|
-
π― Beschlossen β warten auf Review von Alexey [high: deploy]
|
|
88
|
+
π― Beschlossen. Und wir warten auf den Review von Alexey bevor wir deployen.
|
|
89
|
+
Impact: high | Who: albert
|
|
58
90
|
```
|
|
59
91
|
|
|
92
|
+
Trigger patterns: `"the plan is"`, `"we decided"`, `"wir machen"`, `"beschlossen"`
|
|
93
|
+
|
|
60
94
|
</details>
|
|
61
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
|
+
|
|
62
179
|
## Install
|
|
63
180
|
|
|
64
181
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vainplex/openclaw-cortex",
|
|
3
|
-
"version": "0.1.
|
|
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",
|