@prmichaelsen/remember-mcp 2.5.1 → 2.6.1
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/CHANGELOG.md +95 -0
- package/agent/milestones/milestone-12-comment-system.md +239 -0
- package/agent/progress.yaml +83 -16
- package/agent/tasks/task-55-add-comment-fields-to-schema.md +171 -0
- package/agent/tasks/task-56-update-search-space-for-comments.md +192 -0
- package/agent/tasks/task-57-update-query-space-for-comments.md +167 -0
- package/agent/tasks/task-58-add-comment-unit-tests.md +255 -0
- package/agent/tasks/task-59-update-documentation-for-comments.md +324 -0
- package/agent/tasks/task-60-standardize-structured-logging.md +300 -0
- package/agent/tasks/task-70-draft.md +13 -0
- package/dist/server-factory.js +342 -141
- package/dist/server.js +385 -158
- package/dist/tools/query-space.d.ts +1 -0
- package/dist/tools/search-space.d.ts +1 -0
- package/package.json +1 -1
- package/src/config.ts +8 -1
- package/src/firestore/init.ts +21 -6
- package/src/services/confirmation-token.service.ts +42 -23
- package/src/tools/confirm.ts +46 -15
- package/src/tools/publish.ts +34 -9
- package/src/tools/query-space.ts +23 -6
- package/src/tools/search-space.ts +14 -1
- package/src/weaviate/client.ts +29 -7
- package/src/weaviate/schema.ts +34 -4
- package/src/weaviate/space-schema.ts +28 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,101 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.6.1] - 2026-02-16
|
|
9
|
+
|
|
10
|
+
### 🔧 Improved
|
|
11
|
+
|
|
12
|
+
- **Standardized Structured Logging**: Replaced all direct console calls with structured logger
|
|
13
|
+
- Replaced 54 console.log/error/warn calls across 8 files
|
|
14
|
+
- All logs now use structured JSON format with proper severity levels
|
|
15
|
+
- Logs respect LOG_LEVEL environment variable for filtering
|
|
16
|
+
- Better Cloud Run log aggregation and filtering
|
|
17
|
+
- Consistent context objects with relevant identifiers
|
|
18
|
+
|
|
19
|
+
### 📝 Changed
|
|
20
|
+
|
|
21
|
+
- Updated files with structured logging:
|
|
22
|
+
- `src/services/confirmation-token.service.ts` - 11 console calls replaced
|
|
23
|
+
- `src/tools/publish.ts` - 7 console calls replaced
|
|
24
|
+
- `src/tools/confirm.ts` - 11 console calls replaced
|
|
25
|
+
- `src/weaviate/client.ts` - 7 console calls replaced
|
|
26
|
+
- `src/weaviate/schema.ts` - 4 console calls replaced
|
|
27
|
+
- `src/weaviate/space-schema.ts` - 2 console calls replaced
|
|
28
|
+
- `src/firestore/init.ts` - 6 console calls replaced
|
|
29
|
+
- `src/config.ts` - 1 console call replaced
|
|
30
|
+
|
|
31
|
+
### 🎯 Benefits
|
|
32
|
+
|
|
33
|
+
- Log level filtering now works correctly (debug/info/warn/error)
|
|
34
|
+
- Structured JSON logs for cloud environments
|
|
35
|
+
- Consistent formatting across all services
|
|
36
|
+
- Better integration with Cloud Logging filters
|
|
37
|
+
- Easier to search and filter logs in production
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## [2.6.0] - 2026-02-16
|
|
42
|
+
|
|
43
|
+
### ✨ Added
|
|
44
|
+
|
|
45
|
+
- **Comment System (Phase 1)**: Threaded discussions in shared spaces
|
|
46
|
+
- Added 3 schema fields: `parent_id`, `thread_root_id`, `moderation_flags`
|
|
47
|
+
- Comments support infinite nesting (no depth limit)
|
|
48
|
+
- Per-space moderation flags (format: `"{space_id}:{flag_type}"`)
|
|
49
|
+
- Zero new tools required - reuses existing `remember_create_memory`
|
|
50
|
+
|
|
51
|
+
- **Comment Filtering**: Clean discovery experience
|
|
52
|
+
- Added `include_comments` parameter to `remember_search_space` (default: false)
|
|
53
|
+
- Added `include_comments` parameter to `remember_query_space` (default: false)
|
|
54
|
+
- Comments excluded from search by default for cleaner results
|
|
55
|
+
- Opt-in via `include_comments: true` to include discussions
|
|
56
|
+
|
|
57
|
+
### 🔧 Changed
|
|
58
|
+
|
|
59
|
+
- **Search behavior**: `remember_search_space` now excludes comments by default
|
|
60
|
+
- **Query behavior**: `remember_query_space` now excludes comments by default
|
|
61
|
+
- Tool descriptions updated to mention comment filtering
|
|
62
|
+
|
|
63
|
+
### 📚 Documentation
|
|
64
|
+
|
|
65
|
+
- Created Milestone 12: Comment System (Phase 1)
|
|
66
|
+
- Created Tasks 55-59 for comment implementation
|
|
67
|
+
- Updated design document with comment system architecture
|
|
68
|
+
|
|
69
|
+
### 🎯 Usage
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
// Create a comment
|
|
73
|
+
remember_create_memory({
|
|
74
|
+
type: "comment",
|
|
75
|
+
content: "Great post!",
|
|
76
|
+
parent_id: "memory123",
|
|
77
|
+
thread_root_id: "memory123",
|
|
78
|
+
spaces: ["the_void"]
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
// Search without comments (default)
|
|
82
|
+
remember_search_space({
|
|
83
|
+
spaces: ["the_void"],
|
|
84
|
+
query: "hiking"
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
// Search with comments (opt-in)
|
|
88
|
+
remember_search_space({
|
|
89
|
+
spaces: ["the_void"],
|
|
90
|
+
query: "hiking",
|
|
91
|
+
include_comments: true
|
|
92
|
+
})
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### ⚠️ Notes
|
|
96
|
+
|
|
97
|
+
- Backward compatible - no breaking changes
|
|
98
|
+
- Comments are opt-in for search/query
|
|
99
|
+
- Future phases will add voting, moderation tools, and notifications
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
8
103
|
## [2.4.1] - 2026-02-16
|
|
9
104
|
|
|
10
105
|
### 🐛 Fixed
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Milestone 12: Comment System (Phase 1 - Basic Comments)
|
|
2
|
+
|
|
3
|
+
**Goal**: Enable threaded discussions in shared spaces using existing content type
|
|
4
|
+
**Duration**: 1 week
|
|
5
|
+
**Dependencies**: M11 (Unified Public Collection)
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Implement basic comment functionality for shared spaces using the existing `comment` content type. This milestone requires **zero new tools** - we'll extend the Weaviate schema with 3 new fields and add an `include_comments` parameter to existing search tools.
|
|
13
|
+
|
|
14
|
+
**Key Innovation**: Reuse `remember_create_memory` with `type: "comment"` instead of creating new tools. This keeps the API surface small while enabling rich threaded discussions.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Deliverables
|
|
19
|
+
|
|
20
|
+
### 1. Schema Updates (3 new fields)
|
|
21
|
+
- Add `parent_id` field (text) - ID of parent memory or comment
|
|
22
|
+
- Add `thread_root_id` field (text) - Root memory ID for thread queries
|
|
23
|
+
- Add `moderation_flags` field (text[]) - Per-space moderation flags
|
|
24
|
+
|
|
25
|
+
### 2. Search Tool Updates (2 tools)
|
|
26
|
+
- Update `remember_search_space` - Add `include_comments` parameter (default: false)
|
|
27
|
+
- Update `remember_query_space` - Add `include_comments` parameter (default: false)
|
|
28
|
+
|
|
29
|
+
### 3. Documentation Updates
|
|
30
|
+
- Update design document with implementation details
|
|
31
|
+
- Add comment examples to README
|
|
32
|
+
- Document comment creation workflow
|
|
33
|
+
- Add API examples for threaded discussions
|
|
34
|
+
|
|
35
|
+
### 4. Testing
|
|
36
|
+
- Unit tests for comment filtering
|
|
37
|
+
- Unit tests for thread queries
|
|
38
|
+
- Integration tests for comment workflows
|
|
39
|
+
- Test infinite nesting support
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Success Criteria
|
|
44
|
+
|
|
45
|
+
- [ ] Schema has 3 new fields: `parent_id`, `thread_root_id`, `moderation_flags`
|
|
46
|
+
- [ ] Can create comments using `remember_create_memory` with `type: "comment"`
|
|
47
|
+
- [ ] Comments have `parent_id` and `thread_root_id` populated
|
|
48
|
+
- [ ] `remember_search_space` excludes comments by default
|
|
49
|
+
- [ ] `remember_search_space` includes comments when `include_comments: true`
|
|
50
|
+
- [ ] `remember_query_space` excludes comments by default
|
|
51
|
+
- [ ] `remember_query_space` includes comments when `include_comments: true`
|
|
52
|
+
- [ ] Can fetch entire thread by filtering on `thread_root_id`
|
|
53
|
+
- [ ] Comments support infinite nesting (no depth limit)
|
|
54
|
+
- [ ] Moderation flags are per-space (array field)
|
|
55
|
+
- [ ] All existing tests still passing
|
|
56
|
+
- [ ] New comment tests passing
|
|
57
|
+
- [ ] TypeScript compiles without errors
|
|
58
|
+
- [ ] Build successful
|
|
59
|
+
- [ ] Documentation updated with examples
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Key Files to Modify
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
src/
|
|
67
|
+
├── weaviate/
|
|
68
|
+
│ ├── schema.ts # Add 3 new fields to schema
|
|
69
|
+
│ └── space-schema.ts # Add 3 new fields to public collection
|
|
70
|
+
└── tools/
|
|
71
|
+
├── search-space.ts # Add include_comments parameter
|
|
72
|
+
└── query-space.ts # Add include_comments parameter
|
|
73
|
+
|
|
74
|
+
tests/
|
|
75
|
+
└── unit/
|
|
76
|
+
├── schema.test.ts # Test new fields
|
|
77
|
+
├── space-schema.test.ts # Test new fields in public collection
|
|
78
|
+
├── search-space.test.ts # Test comment filtering
|
|
79
|
+
└── query-space.test.ts # Test comment filtering
|
|
80
|
+
|
|
81
|
+
agent/
|
|
82
|
+
└── design/
|
|
83
|
+
└── comment-memory-type.md # Update with implementation notes
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Implementation Tasks
|
|
89
|
+
|
|
90
|
+
See individual task documents:
|
|
91
|
+
- Task 55: Add Comment Fields to Weaviate Schema
|
|
92
|
+
- Task 56: Update remember_search_space for Comments
|
|
93
|
+
- Task 57: Update remember_query_space for Comments
|
|
94
|
+
- Task 58: Add Comment Unit Tests
|
|
95
|
+
- Task 59: Update Documentation for Comments
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Architecture Notes
|
|
100
|
+
|
|
101
|
+
### Zero New Tools Required
|
|
102
|
+
|
|
103
|
+
**Create comment** (use existing tool):
|
|
104
|
+
```typescript
|
|
105
|
+
remember_create_memory({
|
|
106
|
+
type: "comment", // ✅ Existing content type!
|
|
107
|
+
content: "Great post!",
|
|
108
|
+
parent_id: "memory123", // ✅ New field
|
|
109
|
+
thread_root_id: "memory123", // ✅ New field
|
|
110
|
+
spaces: ["the_void"] // ✅ Inherited from parent
|
|
111
|
+
})
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Fetch thread** (use existing search):
|
|
115
|
+
```typescript
|
|
116
|
+
remember_search_space({
|
|
117
|
+
spaces: ["the_void"],
|
|
118
|
+
query: "",
|
|
119
|
+
content_type: "comment",
|
|
120
|
+
// Filter by thread_root_id in Weaviate
|
|
121
|
+
limit: 100
|
|
122
|
+
})
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Search without comments** (default behavior):
|
|
126
|
+
```typescript
|
|
127
|
+
remember_search_space({
|
|
128
|
+
spaces: ["the_void"],
|
|
129
|
+
query: "hiking trails"
|
|
130
|
+
// include_comments: false (default)
|
|
131
|
+
})
|
|
132
|
+
// Returns only memories, not comments
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Search with comments** (opt-in):
|
|
136
|
+
```typescript
|
|
137
|
+
remember_search_space({
|
|
138
|
+
spaces: ["the_void"],
|
|
139
|
+
query: "hiking trails",
|
|
140
|
+
include_comments: true // ✅ Include comments in results
|
|
141
|
+
})
|
|
142
|
+
// Returns memories + comments
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Schema Changes
|
|
146
|
+
|
|
147
|
+
**New Fields**:
|
|
148
|
+
```typescript
|
|
149
|
+
{
|
|
150
|
+
name: 'parent_id',
|
|
151
|
+
dataType: 'text' as any,
|
|
152
|
+
description: 'ID of parent memory or comment (for threading)'
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'thread_root_id',
|
|
156
|
+
dataType: 'text' as any,
|
|
157
|
+
description: 'Root memory ID for fetching entire thread'
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'moderation_flags',
|
|
161
|
+
dataType: 'text[]' as any,
|
|
162
|
+
description: 'Per-space moderation flags (e.g., ["the_void:hidden", "dogs:spam"])'
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Moderation Flags (Per-Space)
|
|
167
|
+
|
|
168
|
+
**Format**: `"{space_id}:{flag_type}"`
|
|
169
|
+
|
|
170
|
+
**Examples**:
|
|
171
|
+
- `"the_void:hidden"` - Hidden in The Void space
|
|
172
|
+
- `"dogs:spam"` - Marked as spam in Dogs space
|
|
173
|
+
- `"cats:flagged"` - Flagged for review in Cats space
|
|
174
|
+
|
|
175
|
+
**Why per-space?**: A comment might be inappropriate in one space but fine in another. Moderators manage their own spaces independently.
|
|
176
|
+
|
|
177
|
+
### Infinite Nesting Support
|
|
178
|
+
|
|
179
|
+
**No depth limit**: Comments can nest infinitely
|
|
180
|
+
- `parent_id` points to immediate parent
|
|
181
|
+
- `thread_root_id` always points to root memory
|
|
182
|
+
- UI builds tree structure from flat list
|
|
183
|
+
|
|
184
|
+
**Example**:
|
|
185
|
+
```
|
|
186
|
+
Memory (root)
|
|
187
|
+
├─ Comment 1 (parent_id: memory_id)
|
|
188
|
+
│ ├─ Comment 2 (parent_id: comment1_id)
|
|
189
|
+
│ │ └─ Comment 3 (parent_id: comment2_id)
|
|
190
|
+
│ │ └─ Comment 4 (parent_id: comment3_id)
|
|
191
|
+
│ │ └─ ... (infinite nesting)
|
|
192
|
+
│ └─ Comment 5 (parent_id: comment1_id)
|
|
193
|
+
└─ Comment 6 (parent_id: memory_id)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
All comments have `thread_root_id: memory_id` for efficient thread fetching.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Testing Strategy
|
|
201
|
+
|
|
202
|
+
1. **Unit Tests**: Schema fields, filtering logic
|
|
203
|
+
2. **Integration Tests**: Full comment workflow
|
|
204
|
+
3. **Performance Tests**: Large threads (1000+ comments)
|
|
205
|
+
4. **Edge Cases**: Infinite nesting, moderation flags
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Future Phases
|
|
210
|
+
|
|
211
|
+
**Phase 2: Engagement (v2.7.0)** - Deferred
|
|
212
|
+
- Voting system (requires ACL)
|
|
213
|
+
- Sort by popularity
|
|
214
|
+
- Vote tracking in Firestore
|
|
215
|
+
|
|
216
|
+
**Phase 3: Moderation (v2.8.0)** - Deferred
|
|
217
|
+
- Moderator tools (requires ACL)
|
|
218
|
+
- Auto-hide spam
|
|
219
|
+
- Moderator dashboard
|
|
220
|
+
|
|
221
|
+
**Phase 4: Notifications (v2.9.0)** - Deferred
|
|
222
|
+
- Notify authors of comments
|
|
223
|
+
- Email/push notifications
|
|
224
|
+
- Notification preferences
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Breaking Changes
|
|
229
|
+
|
|
230
|
+
**None** - This is a backward-compatible addition:
|
|
231
|
+
- Existing tools continue to work unchanged
|
|
232
|
+
- New fields are optional
|
|
233
|
+
- Default behavior (exclude comments) maintains current UX
|
|
234
|
+
- Opt-in via `include_comments: true`
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
**Next Milestone**: M13 - Comment Engagement (Voting & Popularity)
|
|
239
|
+
**Blockers**: None (builds on M11)
|
package/agent/progress.yaml
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
project:
|
|
4
4
|
name: remember-mcp
|
|
5
|
-
version: 2.
|
|
5
|
+
version: 2.5.1
|
|
6
6
|
started: 2026-02-11
|
|
7
7
|
status: in_progress
|
|
8
|
-
current_milestone:
|
|
8
|
+
current_milestone: M11
|
|
9
9
|
last_updated: 2026-02-16
|
|
10
10
|
|
|
11
11
|
milestones:
|
|
@@ -125,16 +125,43 @@ milestones:
|
|
|
125
125
|
|
|
126
126
|
- id: M10
|
|
127
127
|
name: Shared Spaces & Confirmation Flow
|
|
128
|
-
status:
|
|
129
|
-
progress:
|
|
128
|
+
status: completed
|
|
129
|
+
progress: 100%
|
|
130
|
+
started: 2026-02-16
|
|
131
|
+
completed: 2026-02-16
|
|
130
132
|
estimated_weeks: 2-3
|
|
131
|
-
tasks_completed:
|
|
133
|
+
tasks_completed: 10
|
|
132
134
|
tasks_total: 10
|
|
133
135
|
notes: |
|
|
134
|
-
Token-based confirmation pattern
|
|
135
|
-
5 new MCP tools for shared spaces
|
|
136
|
-
Space collections with snake_case naming
|
|
137
|
-
Firestore TTL for automatic token cleanup
|
|
136
|
+
✅ Token-based confirmation pattern implemented
|
|
137
|
+
✅ 5 new MCP tools for shared spaces (publish, confirm, deny, search_space, query_space)
|
|
138
|
+
✅ Space collections with snake_case naming (Memory_the_void)
|
|
139
|
+
✅ Firestore TTL configured for automatic token cleanup
|
|
140
|
+
✅ Confirmation token service with 5-minute expiry
|
|
141
|
+
✅ Space memory types and schema complete
|
|
142
|
+
✅ All tools integrated into server.ts and server-factory.ts
|
|
143
|
+
✅ Unit tests passing for all components
|
|
144
|
+
|
|
145
|
+
- id: M11
|
|
146
|
+
name: Unified Public Collection
|
|
147
|
+
status: completed
|
|
148
|
+
progress: 100%
|
|
149
|
+
started: 2026-02-16
|
|
150
|
+
completed: 2026-02-16
|
|
151
|
+
estimated_weeks: 1-2
|
|
152
|
+
tasks_completed: 9
|
|
153
|
+
tasks_total: 9
|
|
154
|
+
notes: |
|
|
155
|
+
✅ Multi-space architecture implemented (v2.4.0)
|
|
156
|
+
✅ SpaceMemory type updated: space_id → spaces array
|
|
157
|
+
✅ Memory_public unified collection created
|
|
158
|
+
✅ remember_publish supports spaces array parameter
|
|
159
|
+
✅ remember_search_space supports multi-space queries
|
|
160
|
+
✅ remember_query_space supports multi-space RAG
|
|
161
|
+
✅ Weaviate containsAny filter for array fields
|
|
162
|
+
✅ No memory duplication across spaces
|
|
163
|
+
✅ All tests passing with multi-space support
|
|
164
|
+
✅ Documentation updated with multi-space examples
|
|
138
165
|
|
|
139
166
|
- id: M7
|
|
140
167
|
name: Trust & Permissions
|
|
@@ -391,6 +418,41 @@ progress:
|
|
|
391
418
|
overall: 50%
|
|
392
419
|
|
|
393
420
|
recent_work:
|
|
421
|
+
- date: 2026-02-16
|
|
422
|
+
description: ACP Initialization Complete - Multi-Space Architecture Verified (v2.5.1)
|
|
423
|
+
items:
|
|
424
|
+
- ✅ ACP initialization workflow executed via @acp.init command
|
|
425
|
+
- ✅ AGENT.md confirmed up-to-date (v1.0.3)
|
|
426
|
+
- ✅ All agent documentation reviewed (29 design docs, 11 milestones, 54 tasks, 5 patterns)
|
|
427
|
+
- ✅ Project status verified: M1-M4, M10-M11 complete (100%)
|
|
428
|
+
- ✅ Version 2.5.1 confirmed (latest release with error handling fix)
|
|
429
|
+
- ✅ All unit tests passing
|
|
430
|
+
- ✅ TypeScript compiles without errors
|
|
431
|
+
- ✅ Build successful (dual export: server + factory)
|
|
432
|
+
- ✅ All 17 MCP tools implemented and working
|
|
433
|
+
- 🎉 M10 COMPLETED: Shared Spaces & Confirmation Flow
|
|
434
|
+
- ✅ Token-based confirmation system operational
|
|
435
|
+
- ✅ 5 space tools: publish, confirm, deny, search_space, query_space
|
|
436
|
+
- ✅ Confirmation token service with 5-minute expiry and comprehensive error handling
|
|
437
|
+
- ✅ Firestore request validation and diagnostic logging
|
|
438
|
+
- 🎉 M11 COMPLETED: Unified Public Collection Architecture
|
|
439
|
+
- ✅ Multi-space architecture implemented (spaces: string[] array)
|
|
440
|
+
- ✅ Memory_public unified collection replaces per-space collections
|
|
441
|
+
- ✅ Multi-space search with containsAny filter
|
|
442
|
+
- ✅ No memory duplication across spaces
|
|
443
|
+
- ✅ remember_publish supports publishing to multiple spaces
|
|
444
|
+
- ✅ remember_search_space supports multi-space queries
|
|
445
|
+
- ✅ remember_query_space supports multi-space RAG
|
|
446
|
+
- ✅ All tests updated for multi-space support
|
|
447
|
+
- ✅ Documentation updated with multi-space examples
|
|
448
|
+
- ✅ Multi-tenant architecture with per-user isolation
|
|
449
|
+
- ✅ Vector search with Weaviate + metadata with Firestore
|
|
450
|
+
- ✅ 45 content types with dynamic descriptions
|
|
451
|
+
- ✅ N-way relationships with bidirectional tracking
|
|
452
|
+
- ✅ User preferences system (6 categories)
|
|
453
|
+
- 📋 Ready for deployment testing and verification
|
|
454
|
+
- 📋 Next: Deploy v2.5.1 and test multi-space functionality
|
|
455
|
+
|
|
394
456
|
- date: 2026-02-16
|
|
395
457
|
description: ACP Initialization Complete - Project Status Verified
|
|
396
458
|
items:
|
|
@@ -681,27 +743,32 @@ recent_work:
|
|
|
681
743
|
- ✅ Build successful
|
|
682
744
|
|
|
683
745
|
next_steps:
|
|
684
|
-
-
|
|
685
|
-
- Test
|
|
746
|
+
- Deploy v2.5.1 to Cloud Run and verify multi-space functionality
|
|
747
|
+
- Test multi-space publishing workflow end-to-end
|
|
748
|
+
- Test multi-space search across multiple spaces
|
|
749
|
+
- Verify Firestore request creation with enhanced error handling
|
|
750
|
+
- Check Cloud Run logs for diagnostic output from ConfirmationTokenService
|
|
751
|
+
- Consider implementing comment system (v2.6.0) - 3 schema fields only!
|
|
686
752
|
- Start M5: Template System (15 default templates + auto-suggestion)
|
|
687
|
-
- Test complete memory + relationship + preferences system with actual Weaviate instance
|
|
688
|
-
- Consider implementing template auto-suggestion
|
|
689
|
-
- Optional: Update find-similar.ts and search-relationship.ts with v3 filters (currently working)
|
|
690
753
|
- Optional: Create integration tests (Task 6)
|
|
691
754
|
- Optional: Add development documentation (Task 7)
|
|
692
755
|
- Consider M6: Auth & Multi-Tenancy
|
|
693
756
|
|
|
694
757
|
notes:
|
|
758
|
+
- 🎉 Milestone 11 (Unified Public Collection) COMPLETED!
|
|
759
|
+
- 🎉 Milestone 10 (Shared Spaces & Confirmation Flow) COMPLETED!
|
|
695
760
|
- 🎉 Milestone 4 (User Preferences) COMPLETED!
|
|
696
761
|
- 🎉 Milestone 3 (Relationships & Graph) COMPLETED!
|
|
697
762
|
- 🎉 Milestone 2 (Core Memory System) COMPLETED!
|
|
698
763
|
- 🎉 Milestone 1 (Project Foundation) COMPLETED!
|
|
699
|
-
- ✅ All
|
|
700
|
-
- ✅ All
|
|
764
|
+
- ✅ All 29 design documents complete and comprehensive
|
|
765
|
+
- ✅ All 11 milestones defined with clear deliverables
|
|
701
766
|
- ✅ M1: 7 tasks complete (Tasks 1-5, 9 complete; Tasks 6-7 deferred)
|
|
702
767
|
- ✅ M2: 6/6 memory tools complete (100% progress)
|
|
703
768
|
- ✅ M3: 4/4 relationship tools complete (100% progress)
|
|
704
769
|
- ✅ M4: 2/2 preference tools complete (100% progress)
|
|
770
|
+
- ✅ M10: 10/10 shared space tools complete (100% progress)
|
|
771
|
+
- ✅ M11: 9/9 multi-space architecture tasks complete (100% progress)
|
|
705
772
|
- ✅ Complete memory CRUD operations (create, read, update, delete)
|
|
706
773
|
- ✅ Complete relationship CRUD operations (create, read, update, delete)
|
|
707
774
|
- ✅ Advanced search capabilities (hybrid, similarity, RAG queries)
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Task 55: Add Comment Fields to Weaviate Schema
|
|
2
|
+
|
|
3
|
+
**Milestone**: M12 (Comment System - Phase 1)
|
|
4
|
+
**Estimated Time**: 2 hours
|
|
5
|
+
**Dependencies**: M11 (Unified Public Collection)
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Objective
|
|
11
|
+
|
|
12
|
+
Add 3 new fields to the Weaviate schema to support threaded comments: `parent_id`, `thread_root_id`, and `moderation_flags`. These fields enable infinite nesting, efficient thread queries, and per-space moderation.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
### 1. Update Memory Schema ([`src/weaviate/schema.ts`](../../src/weaviate/schema.ts))
|
|
19
|
+
|
|
20
|
+
Add 3 new properties to the Memory collection schema:
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
{
|
|
24
|
+
name: 'parent_id',
|
|
25
|
+
dataType: 'text' as any,
|
|
26
|
+
description: 'ID of parent memory or comment (for threading)',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'thread_root_id',
|
|
30
|
+
dataType: 'text' as any,
|
|
31
|
+
description: 'Root memory ID for fetching entire thread',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'moderation_flags',
|
|
35
|
+
dataType: 'text[]' as any,
|
|
36
|
+
description: 'Per-space moderation flags (format: "{space_id}:{flag_type}")',
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Location**: Add after existing properties, before the closing bracket
|
|
41
|
+
|
|
42
|
+
### 2. Update Space Schema ([`src/weaviate/space-schema.ts`](../../src/weaviate/space-schema.ts))
|
|
43
|
+
|
|
44
|
+
Add the same 3 properties to the public collection schema:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
{
|
|
48
|
+
name: 'parent_id',
|
|
49
|
+
dataType: 'text' as any,
|
|
50
|
+
description: 'ID of parent memory or comment (for threading)',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'thread_root_id',
|
|
54
|
+
dataType: 'text' as any,
|
|
55
|
+
description: 'Root memory ID for fetching entire thread',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'moderation_flags',
|
|
59
|
+
dataType: 'text[]' as any,
|
|
60
|
+
description: 'Per-space moderation flags (format: "{space_id}:{flag_type}")',
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Location**: Add to `createSpaceCollection` function's properties array
|
|
65
|
+
|
|
66
|
+
### 3. Verify Schema Updates
|
|
67
|
+
|
|
68
|
+
**Check**:
|
|
69
|
+
- Both schemas have all 3 new fields
|
|
70
|
+
- Field names match exactly
|
|
71
|
+
- Data types are correct (`text` for IDs, `text[]` for flags)
|
|
72
|
+
- Descriptions are clear and consistent
|
|
73
|
+
|
|
74
|
+
### 4. Test Schema Creation
|
|
75
|
+
|
|
76
|
+
Run existing tests to ensure schema creation still works:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm test -- schema.test.ts
|
|
80
|
+
npm test -- space-schema.test.ts
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Expected**: All existing tests pass, no errors
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Verification
|
|
88
|
+
|
|
89
|
+
- [ ] `parent_id` field added to both schemas
|
|
90
|
+
- [ ] `thread_root_id` field added to both schemas
|
|
91
|
+
- [ ] `moderation_flags` field added to both schemas
|
|
92
|
+
- [ ] Field data types are correct
|
|
93
|
+
- [ ] Descriptions are clear
|
|
94
|
+
- [ ] TypeScript compiles without errors
|
|
95
|
+
- [ ] All existing schema tests passing
|
|
96
|
+
- [ ] No breaking changes to existing functionality
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Implementation Notes
|
|
101
|
+
|
|
102
|
+
### Field Purposes
|
|
103
|
+
|
|
104
|
+
**`parent_id`**:
|
|
105
|
+
- Points to immediate parent (memory or comment)
|
|
106
|
+
- Enables infinite nesting
|
|
107
|
+
- Used by UI to build tree structure
|
|
108
|
+
- Optional (null for root memories)
|
|
109
|
+
|
|
110
|
+
**`thread_root_id`**:
|
|
111
|
+
- Always points to root memory
|
|
112
|
+
- Enables efficient "get all comments in thread" queries
|
|
113
|
+
- Same as `parent_id` for direct replies to memories
|
|
114
|
+
- Optional (null for root memories)
|
|
115
|
+
|
|
116
|
+
**`moderation_flags`**:
|
|
117
|
+
- Array of strings in format `"{space_id}:{flag_type}"`
|
|
118
|
+
- Enables per-space moderation
|
|
119
|
+
- Examples: `["the_void:hidden", "dogs:spam"]`
|
|
120
|
+
- Empty array by default
|
|
121
|
+
|
|
122
|
+
### Example Comment
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
{
|
|
126
|
+
id: "comment123",
|
|
127
|
+
type: "comment",
|
|
128
|
+
content: "Great post!",
|
|
129
|
+
parent_id: "memory456", // ✅ New field
|
|
130
|
+
thread_root_id: "memory456", // ✅ New field
|
|
131
|
+
moderation_flags: [], // ✅ New field
|
|
132
|
+
spaces: ["the_void"],
|
|
133
|
+
author_id: "user789",
|
|
134
|
+
// ... other standard fields
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Example Nested Comment
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
{
|
|
142
|
+
id: "comment789",
|
|
143
|
+
type: "comment",
|
|
144
|
+
content: "I agree!",
|
|
145
|
+
parent_id: "comment123", // ✅ Points to parent comment
|
|
146
|
+
thread_root_id: "memory456", // ✅ Still points to root memory
|
|
147
|
+
moderation_flags: [],
|
|
148
|
+
spaces: ["the_void"],
|
|
149
|
+
author_id: "user999",
|
|
150
|
+
// ... other standard fields
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Files Modified
|
|
157
|
+
|
|
158
|
+
- [`src/weaviate/schema.ts`](../../src/weaviate/schema.ts) - Add 3 fields to Memory schema
|
|
159
|
+
- [`src/weaviate/space-schema.ts`](../../src/weaviate/space-schema.ts) - Add 3 fields to public collection
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Files Created
|
|
164
|
+
|
|
165
|
+
None (schema updates only)
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Next Task
|
|
170
|
+
|
|
171
|
+
Task 56: Update remember_search_space for Comments
|