memory-lucia 2.0.2 → 2.0.3

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 (4) hide show
  1. package/README.md +111 -111
  2. package/SKILL.md +121 -120
  3. package/package.json +35 -35
  4. package/CLAWHUB-FIXES.md +0 -127
package/README.md CHANGED
@@ -1,111 +1,111 @@
1
- # Memory Lucia
2
-
3
- [![npm version](https://img.shields.io/npm/v/memory-lucia.svg)](https://www.npmjs.com/package/memory-lucia)
4
- [![GitHub](https://img.shields.io/badge/github-memory--lucia-blue.svg)](https://github.com/wen521/memory-lucia-)
5
- [![License](https://img.shields.io/npm/l/memory-lucia.svg)](LICENSE)
6
-
7
- Advanced memory system for OpenClaw agents with priority analysis, learning tracking, decision recording, and skill evolution.
8
-
9
- ## 📦 Installation
10
-
11
- ```bash
12
- npm install memory-lucia
13
- ```
14
-
15
- ## 🚀 Quick Start
16
-
17
- ```javascript
18
- const MemoryAPI = require('memory-lucia');
19
-
20
- const api = new MemoryAPI('./memory.db');
21
- await api.init();
22
-
23
- // Track learning progress
24
- await api.startLearning(msgId, convId, message);
25
- await api.updateLearningProgress(learningId, { progress: 50 });
26
-
27
- // Record a decision
28
- await api.recordDecision(msgId, convId, {
29
- summary: 'Choose SQLite over PostgreSQL',
30
- context: 'For local deployment',
31
- expectedOutcome: 'Simpler setup'
32
- });
33
-
34
- // Get dashboard
35
- const dashboard = await api.getDashboard();
36
- console.log(dashboard);
37
- ```
38
-
39
- ## ✨ Features
40
-
41
- - 🎯 **Priority Analysis** - Analyze and store message priorities
42
- - 📚 **Learning Tracking** - Track learning progress and milestones
43
- - 🎯 **Decision Recording** - Record decisions with outcomes and reviews
44
- - 📈 **Skill Evolution** - Monitor skill usage and growth
45
- - 💾 **Version Management** - Automatic backups with rollback
46
- - 📊 **Dashboard** - Unified view of all memory data
47
-
48
- ## 📖 Core Modules
49
-
50
- ### 1. Priority Module
51
- Analyze and store message priorities.
52
-
53
- ```javascript
54
- const analysis = await api.analyzePriority(message);
55
- await api.storePriority(msgId, convId, analysis);
56
- const highPriority = await api.getHighPriority(10);
57
- ```
58
-
59
- ### 2. Learning Module
60
- Track learning topics and progress.
61
-
62
- ```javascript
63
- const learning = await api.startLearning(msgId, convId, message);
64
- await api.addMilestone(learning.id, { title: 'Completed Chapter 1' });
65
- const active = await api.getActiveLearning(5);
66
- ```
67
-
68
- ### 3. Decision Module
69
- Record and review decisions.
70
-
71
- ```javascript
72
- await api.recordDecision(msgId, convId, decisionData);
73
- await api.updateDecisionOutcome(decisionId, { actualOutcome: 'Success' });
74
- const pending = await api.getPendingDecisions();
75
- ```
76
-
77
- ### 4. Evolution Module
78
- Monitor skill usage.
79
-
80
- ```javascript
81
- await api.recordSkillUsage('skill-name', 'category', 'success');
82
- const topSkills = await api.getTopSkills(10);
83
- ```
84
-
85
- ## 📚 Documentation
86
-
87
- - [SKILL.md](SKILL.md) - Skill description and usage
88
- - [API Reference](references/API.md) - Complete API documentation
89
- - [Architecture](references/ARCHITECTURE.md) - System design
90
-
91
- ## 🗄️ Database
92
-
93
- SQLite backend with tables:
94
- - `memory_priorities` - Priority analysis
95
- - `memory_learning` - Learning tracking
96
- - `memory_decisions` - Decision records
97
- - `memory_evolution` - Skill usage
98
-
99
- ## 🔗 Links
100
-
101
- - **npm**: https://www.npmjs.com/package/memory-lucia
102
- - **GitHub**: https://github.com/wen521/memory-lucia-
103
- - **Issues**: https://github.com/wen521/memory-lucia-/issues
104
-
105
- ## 📋 Version
106
-
107
- Current: 2.0.2
108
-
109
- ## 📄 License
110
-
111
- MIT © Chief of Staff
1
+ # Memory Lucia
2
+
3
+ [![npm version](https://img.shields.io/npm/v/memory-lucia.svg)](https://www.npmjs.com/package/memory-lucia)
4
+ [![GitHub](https://img.shields.io/badge/github-memory--lucia-blue.svg)](https://github.com/wen521/memory-lucia-)
5
+ [![License](https://img.shields.io/npm/l/memory-lucia.svg)](LICENSE)
6
+
7
+ Advanced memory system for OpenClaw agents with priority analysis, learning tracking, decision recording, and skill evolution.
8
+
9
+ ## 📦 Installation
10
+
11
+ ```bash
12
+ npm install memory-lucia
13
+ ```
14
+
15
+ ## 🚀 Quick Start
16
+
17
+ ```javascript
18
+ const MemoryAPI = require('memory-lucia');
19
+
20
+ const api = new MemoryAPI('./memory.db');
21
+ await api.init();
22
+
23
+ // Track learning progress
24
+ await api.startLearning(msgId, convId, message);
25
+ await api.updateLearningProgress(learningId, { progress: 50 });
26
+
27
+ // Record a decision
28
+ await api.recordDecision(msgId, convId, {
29
+ summary: 'Choose SQLite over PostgreSQL',
30
+ context: 'For local deployment',
31
+ expectedOutcome: 'Simpler setup'
32
+ });
33
+
34
+ // Get dashboard
35
+ const dashboard = await api.getDashboard();
36
+ console.log(dashboard);
37
+ ```
38
+
39
+ ## ✨ Features
40
+
41
+ - 🎯 **Priority Analysis** - Analyze and store message priorities
42
+ - 📚 **Learning Tracking** - Track learning progress and milestones
43
+ - 🎯 **Decision Recording** - Record decisions with outcomes and reviews
44
+ - 📈 **Skill Evolution** - Monitor skill usage and growth
45
+ - 💾 **Version Management** - Automatic backups with rollback
46
+ - 📊 **Dashboard** - Unified view of all memory data
47
+
48
+ ## 📖 Core Modules
49
+
50
+ ### 1. Priority Module
51
+ Analyze and store message priorities.
52
+
53
+ ```javascript
54
+ const analysis = await api.analyzePriority(message);
55
+ await api.storePriority(msgId, convId, analysis);
56
+ const highPriority = await api.getHighPriority(10);
57
+ ```
58
+
59
+ ### 2. Learning Module
60
+ Track learning topics and progress.
61
+
62
+ ```javascript
63
+ const learning = await api.startLearning(msgId, convId, message);
64
+ await api.addMilestone(learning.id, { title: 'Completed Chapter 1' });
65
+ const active = await api.getActiveLearning(5);
66
+ ```
67
+
68
+ ### 3. Decision Module
69
+ Record and review decisions.
70
+
71
+ ```javascript
72
+ await api.recordDecision(msgId, convId, decisionData);
73
+ await api.updateDecisionOutcome(decisionId, { actualOutcome: 'Success' });
74
+ const pending = await api.getPendingDecisions();
75
+ ```
76
+
77
+ ### 4. Evolution Module
78
+ Monitor skill usage.
79
+
80
+ ```javascript
81
+ await api.recordSkillUsage('skill-name', 'category', 'success');
82
+ const topSkills = await api.getTopSkills(10);
83
+ ```
84
+
85
+ ## 📚 Documentation
86
+
87
+ - [SKILL.md](SKILL.md) - Skill description and usage
88
+ - [API Reference](references/API.md) - Complete API documentation
89
+ - [Architecture](references/ARCHITECTURE.md) - System design
90
+
91
+ ## 🗄️ Database
92
+
93
+ SQLite backend with tables:
94
+ - `memory_priorities` - Priority analysis
95
+ - `memory_learning` - Learning tracking
96
+ - `memory_decisions` - Decision records
97
+ - `memory_evolution` - Skill usage
98
+
99
+ ## 🔗 Links
100
+
101
+ - **npm**: https://www.npmjs.com/package/memory-lucia
102
+ - **GitHub**: https://github.com/wen521/memory-lucia-
103
+ - **Issues**: https://github.com/wen521/memory-lucia-/issues
104
+
105
+ ## 📋 Version
106
+
107
+ Current: 2.0.3
108
+
109
+ ## 📄 License
110
+
111
+ MIT © Chief of Staff
package/SKILL.md CHANGED
@@ -1,120 +1,121 @@
1
- ---
2
- name: memory-v2
3
- description: |
4
- Advanced memory system for OpenClaw agents with priority analysis,
5
- learning tracking, decision recording, and skill evolution.
6
- Use when: (1) Tracking learning progress and milestones, (2) Recording decisions with outcomes,
7
- (3) Analyzing message priorities, (4) Monitoring skill usage and growth.
8
- ---
9
-
10
- # Memory V2 Skill
11
-
12
- ## Overview
13
-
14
- Memory V2 is a comprehensive memory management system for OpenClaw agents, providing persistent storage and intelligent analysis capabilities.
15
-
16
- ## Features
17
-
18
- - **Priority Analysis**: Analyze and store message priorities with reasoning
19
- - **Learning Tracking**: Track learning progress, milestones, and completion
20
- - **Decision Recording**: Record decisions with context, outcomes, and scheduled reviews
21
- - **Skill Evolution**: Monitor skill usage patterns and growth over time
22
- - **Version Management**: Backup and rollback capabilities
23
- - **Dashboard**: Unified view of all memory data
24
-
25
- ## Installation
26
-
27
- ```bash
28
- # Install dependencies
29
- npm install sqlite3
30
-
31
- # Initialize database
32
- node scripts/init-memory.js
33
- ```
34
-
35
- ## Quick Start
36
-
37
- ```javascript
38
- const MemoryAPI = require('./api');
39
-
40
- const api = new MemoryAPI('./memory-v2.db');
41
- await api.init();
42
-
43
- // Track learning progress
44
- await api.startLearning(msgId, convId, message);
45
- await api.updateLearningProgress(learningId, { progress: 50 });
46
-
47
- // Record a decision
48
- await api.recordDecision(msgId, convId, {
49
- summary: 'Choose SQLite over PostgreSQL',
50
- context: 'For local deployment',
51
- expectedOutcome: 'Simpler setup'
52
- });
53
-
54
- // Get dashboard
55
- const dashboard = await api.getDashboard();
56
- ```
57
-
58
- ## Core Modules
59
-
60
- ### 1. Priority Module
61
- Analyze and store message priorities.
62
-
63
- ```javascript
64
- const analysis = await api.analyzePriority(message);
65
- await api.storePriority(msgId, convId, analysis);
66
- const highPriority = await api.getHighPriority(10);
67
- ```
68
-
69
- ### 2. Learning Module
70
- Track learning topics and progress.
71
-
72
- ```javascript
73
- const learning = await api.startLearning(msgId, convId, message);
74
- await api.addMilestone(learning.id, { title: 'Completed Chapter 1' });
75
- const active = await api.getActiveLearning(5);
76
- ```
77
-
78
- ### 3. Decision Module
79
- Record and review decisions.
80
-
81
- ```javascript
82
- await api.recordDecision(msgId, convId, decisionData);
83
- await api.updateDecisionOutcome(decisionId, { actualOutcome: 'Success' });
84
- const pending = await api.getPendingDecisions();
85
- ```
86
-
87
- ### 4. Evolution Module
88
- Monitor skill usage.
89
-
90
- ```javascript
91
- await api.recordSkillUsage('skill-name', 'category', 'success');
92
- const topSkills = await api.getTopSkills(10);
93
- ```
94
-
95
- ## API Reference
96
-
97
- See `references/API.md` for complete API documentation.
98
-
99
- ## Database Schema
100
-
101
- SQLite database with tables:
102
- - `memory_priorities` - Priority analysis
103
- - `memory_learning` - Learning tracking
104
- - `memory_decisions` - Decision records
105
- - `memory_evolution` - Skill usage
106
-
107
- ## Migration
108
-
109
- From V1 to V2:
110
- ```bash
111
- node migrations/v1-to-v2.js old-memory.db
112
- ```
113
-
114
- ## Version
115
-
116
- Current: 2.0.2
117
-
118
- ## License
119
-
120
- MIT
1
+ ---
2
+ name: memory-v2
3
+ version: 2.0.3
4
+ description: |
5
+ Advanced memory system for OpenClaw agents with priority analysis,
6
+ learning tracking, decision recording, and skill evolution.
7
+ Use when: (1) Tracking learning progress and milestones, (2) Recording decisions with outcomes,
8
+ (3) Analyzing message priorities, (4) Monitoring skill usage and growth.
9
+ ---
10
+
11
+ # Memory V2 Skill
12
+
13
+ ## Overview
14
+
15
+ Memory V2 is a comprehensive memory management system for OpenClaw agents, providing persistent storage and intelligent analysis capabilities.
16
+
17
+ ## Features
18
+
19
+ - **Priority Analysis**: Analyze and store message priorities with reasoning
20
+ - **Learning Tracking**: Track learning progress, milestones, and completion
21
+ - **Decision Recording**: Record decisions with context, outcomes, and scheduled reviews
22
+ - **Skill Evolution**: Monitor skill usage patterns and growth over time
23
+ - **Version Management**: Backup and rollback capabilities
24
+ - **Dashboard**: Unified view of all memory data
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ # Install dependencies
30
+ npm install sqlite3
31
+
32
+ # Initialize database
33
+ node scripts/init-memory.js
34
+ ```
35
+
36
+ ## Quick Start
37
+
38
+ ```javascript
39
+ const MemoryAPI = require('./api');
40
+
41
+ const api = new MemoryAPI('./memory-v2.db');
42
+ await api.init();
43
+
44
+ // Track learning progress
45
+ await api.startLearning(msgId, convId, message);
46
+ await api.updateLearningProgress(learningId, { progress: 50 });
47
+
48
+ // Record a decision
49
+ await api.recordDecision(msgId, convId, {
50
+ summary: 'Choose SQLite over PostgreSQL',
51
+ context: 'For local deployment',
52
+ expectedOutcome: 'Simpler setup'
53
+ });
54
+
55
+ // Get dashboard
56
+ const dashboard = await api.getDashboard();
57
+ ```
58
+
59
+ ## Core Modules
60
+
61
+ ### 1. Priority Module
62
+ Analyze and store message priorities.
63
+
64
+ ```javascript
65
+ const analysis = await api.analyzePriority(message);
66
+ await api.storePriority(msgId, convId, analysis);
67
+ const highPriority = await api.getHighPriority(10);
68
+ ```
69
+
70
+ ### 2. Learning Module
71
+ Track learning topics and progress.
72
+
73
+ ```javascript
74
+ const learning = await api.startLearning(msgId, convId, message);
75
+ await api.addMilestone(learning.id, { title: 'Completed Chapter 1' });
76
+ const active = await api.getActiveLearning(5);
77
+ ```
78
+
79
+ ### 3. Decision Module
80
+ Record and review decisions.
81
+
82
+ ```javascript
83
+ await api.recordDecision(msgId, convId, decisionData);
84
+ await api.updateDecisionOutcome(decisionId, { actualOutcome: 'Success' });
85
+ const pending = await api.getPendingDecisions();
86
+ ```
87
+
88
+ ### 4. Evolution Module
89
+ Monitor skill usage.
90
+
91
+ ```javascript
92
+ await api.recordSkillUsage('skill-name', 'category', 'success');
93
+ const topSkills = await api.getTopSkills(10);
94
+ ```
95
+
96
+ ## API Reference
97
+
98
+ See `references/API.md` for complete API documentation.
99
+
100
+ ## Database Schema
101
+
102
+ SQLite database with tables:
103
+ - `memory_priorities` - Priority analysis
104
+ - `memory_learning` - Learning tracking
105
+ - `memory_decisions` - Decision records
106
+ - `memory_evolution` - Skill usage
107
+
108
+ ## Migration
109
+
110
+ From V1 to V2:
111
+ ```bash
112
+ node migrations/v1-to-v2.js old-memory.db
113
+ ```
114
+
115
+ ## Version
116
+
117
+ Current: 2.0.2
118
+
119
+ ## License
120
+
121
+ MIT
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "memory-lucia",
3
- "version": "2.0.2",
4
- "description": "Advanced memory system for OpenClaw agents with priority analysis, learning tracking, decision recording, and skill evolution",
5
- "main": "api/index.js",
6
- "scripts": {
7
- "start": "node api/index.js",
8
- "init": "node scripts/init-memory.js",
9
- "test": "node tests/test.js",
10
- "backup": "node scripts/backup.js"
11
- },
12
- "keywords": [
13
- "openclaw",
14
- "skill",
15
- "memory",
16
- "learning",
17
- "decision",
18
- "priority",
19
- "evolution",
20
- "sqlite"
21
- ],
22
- "author": "Chief of Staff",
23
- "license": "MIT",
24
- "dependencies": {
25
- "sqlite3": "^5.1.6"
26
- },
27
- "repository": {
28
- "type": "git",
29
- "url": "https://github.com/wen521/memory-lucia-.git"
30
- },
31
- "bugs": {
32
- "url": "https://github.com/wen521/memory-lucia-/issues"
33
- },
34
- "homepage": "https://github.com/wen521/memory-lucia-#readme"
35
- }
1
+ {
2
+ "name": "memory-lucia",
3
+ "version": "2.0.3",
4
+ "description": "Advanced memory system for OpenClaw agents with priority analysis, learning tracking, decision recording, and skill evolution",
5
+ "main": "api/index.js",
6
+ "scripts": {
7
+ "start": "node api/index.js",
8
+ "init": "node scripts/init-memory.js",
9
+ "test": "node tests/test.js",
10
+ "backup": "node scripts/backup.js"
11
+ },
12
+ "keywords": [
13
+ "openclaw",
14
+ "skill",
15
+ "memory",
16
+ "learning",
17
+ "decision",
18
+ "priority",
19
+ "evolution",
20
+ "sqlite"
21
+ ],
22
+ "author": "Chief of Staff",
23
+ "license": "MIT",
24
+ "dependencies": {
25
+ "sqlite3": "^5.1.6"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/wen521/memory-lucia-.git"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/wen521/memory-lucia-/issues"
33
+ },
34
+ "homepage": "https://github.com/wen521/memory-lucia-#readme"
35
+ }
package/CLAWHUB-FIXES.md DELETED
@@ -1,127 +0,0 @@
1
- # ClawHub Audit Fixes
2
-
3
- This document summarizes the fixes applied to address ClawHub security audit feedback.
4
-
5
- ## Issues Fixed
6
-
7
- ### ✅ 1. Missing Files
8
-
9
- | File | Status | Description |
10
- |------|--------|-------------|
11
- | `database/schema.sql` | ✅ Created | Complete database schema with tables, indexes, and views |
12
- | `migrations/v1-to-v2.js` | ✅ Created | Migration script from V1 to V2 database |
13
- | `references/API.md` | ✅ Created | Complete API documentation |
14
-
15
- ### ✅ 2. Version Consistency
16
-
17
- | Location | Before | After |
18
- |----------|--------|-------|
19
- | SKILL.md | 2.0.0 | 2.0.1 |
20
- | README.md | 2.0.0 | 2.0.1 |
21
- | package.json | 2.0.1 | 2.0.1 (already correct) |
22
-
23
- ### ✅ 3. Removed Development Files
24
-
25
- Removed from repository:
26
- - `publish.bat`
27
- - `publish-with-otp.bat`
28
- - `push-final.bat`
29
- - `push-gh-cli.bat`
30
- - `push-manual.bat`
31
- - `push-to-github.bat`
32
- - `push-with-gh.bat`
33
-
34
- Updated `.gitignore` to exclude:
35
- - `*.bat` files
36
- - Publish documentation files
37
- - GitHub workflows (if not ready)
38
-
39
- ### ✅ 4. Source Verification
40
-
41
- All source URLs are valid:
42
- - **npm**: https://www.npmjs.com/package/memory-lucia
43
- - **GitHub**: https://github.com/wen521/memory-lucia-
44
- - **Issues**: https://github.com/wen521/memory-lucia-/issues
45
-
46
- ## Security Considerations Addressed
47
-
48
- ### Database Safety
49
- - ✅ Schema file (`schema.sql`) now included with proper table definitions
50
- - ✅ All views (`v_pending_decisions`, `v_skill_summary`, `v_weekly_learning_report`, `v_high_priority`) defined in schema
51
- - ✅ Database initialization script (`database/init.js`) properly references schema.sql
52
- - ✅ Migration script (`migrations/v1-to-v2.js`) included for data portability
53
-
54
- ### File System Operations
55
- - ✅ Database path is configurable (default: `./memory-v2.db`)
56
- - ✅ Backup directory created relative to working directory
57
- - ✅ No system files or critical directories accessed
58
-
59
- ### Backup Management
60
- - ✅ Backup retention configurable via `keepCount` parameter
61
- - ✅ Automatic cleanup only removes old backups, never active database
62
- - ✅ Rollback requires explicit backup path selection
63
-
64
- ## File Structure
65
-
66
- ```
67
- memory-v2-skill/
68
- ├── SKILL.md # Skill description (version 2.0.1)
69
- ├── README.md # Documentation (version 2.0.1)
70
- ├── package.json # Package metadata
71
- ├── LICENSE # MIT License
72
- ├── .gitignore # Excludes dev files
73
- ├── api/
74
- │ └── index.js # Main API module
75
- ├── database/
76
- │ ├── init.js # Database initialization
77
- │ └── schema.sql # ✅ Database schema (NEW)
78
- ├── modules/
79
- │ ├── priority.js # Priority analysis
80
- │ ├── learning.js # Learning tracking
81
- │ ├── decision.js # Decision recording
82
- │ ├── evolution.js # Skill evolution
83
- │ └── version.js # Version management
84
- ├── migrations/
85
- │ └── v1-to-v2.js # ✅ Migration script (NEW)
86
- ├── references/
87
- │ └── API.md # ✅ API documentation (NEW)
88
- └── scripts/
89
- └── init-memory.js # Setup script
90
- ```
91
-
92
- ## Pre-Publish Checklist
93
-
94
- Before publishing to ClawHub/npm:
95
-
96
- - [ ] Verify all files listed above are present
97
- - [ ] Run `npm test` to ensure tests pass
98
- - [ ] Run `node scripts/init-memory.js` to verify database initialization
99
- - [ ] Verify no `.bat` files in the package
100
- - [ ] Verify version is consistent across all files (2.0.1)
101
- - [ ] Verify GitHub repository is public and accessible
102
- - [ ] Verify npm package is published and accessible
103
-
104
- ## Testing
105
-
106
- ```bash
107
- # Install dependencies
108
- npm install
109
-
110
- # Initialize database
111
- node scripts/init-memory.js
112
-
113
- # Run tests
114
- npm test
115
- ```
116
-
117
- ## Notes for Reviewers
118
-
119
- 1. **Database Views**: All SQL views referenced in the code are defined in `database/schema.sql`
120
- 2. **Migration**: The `migrations/v1-to-v2.js` script handles data migration from V1 format
121
- 3. **API Documentation**: Complete API reference available in `references/API.md`
122
- 4. **No Executables**: All `.bat` files have been removed; only Node.js scripts remain
123
-
124
- ---
125
-
126
- Last updated: 2026-03-25
127
- Version: 2.0.1