@prmichaelsen/remember-mcp 3.0.0 → 3.13.0
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/AGENT.md +296 -250
- package/CHANGELOG.md +358 -0
- package/README.md +68 -45
- package/agent/commands/acp.clarification-create.md +382 -0
- package/agent/commands/acp.project-info.md +309 -0
- package/agent/commands/acp.project-remove.md +379 -0
- package/agent/commands/acp.project-update.md +296 -0
- package/agent/commands/acp.task-create.md +17 -9
- package/agent/commands/git.commit.md +13 -1
- package/agent/design/comment-memory-type.md +2 -2
- package/agent/design/local.collaborative-memory-sync.md +265 -0
- package/agent/design/local.content-flags.md +210 -0
- package/agent/design/local.ghost-persona-system.md +273 -0
- package/agent/design/local.group-acl-integration.md +338 -0
- package/agent/design/local.memory-acl-schema.md +352 -0
- package/agent/design/local.memory-collection-pattern-v2.md +348 -0
- package/agent/design/local.moderation-and-space-config.md +257 -0
- package/agent/design/local.v2-api-reference.md +621 -0
- package/agent/design/local.v2-migration-guide.md +191 -0
- package/agent/design/local.v2-usage-examples.md +265 -0
- package/agent/design/permissions-storage-architecture.md +11 -3
- package/agent/design/trust-escalation-prevention.md +9 -2
- package/agent/design/trust-system-implementation.md +12 -3
- package/agent/milestones/milestone-14-memory-collection-v2.md +182 -0
- package/agent/milestones/milestone-15-moderation-space-config.md +126 -0
- package/agent/progress.yaml +628 -49
- package/agent/scripts/acp.common.sh +2 -0
- package/agent/scripts/acp.install.sh +11 -1
- package/agent/scripts/acp.package-install-optimized.sh +454 -0
- package/agent/scripts/acp.package-install.sh +247 -300
- package/agent/scripts/acp.project-info.sh +218 -0
- package/agent/scripts/acp.project-remove.sh +302 -0
- package/agent/scripts/acp.project-update.sh +296 -0
- package/agent/scripts/acp.yaml-parser.sh +128 -10
- package/agent/tasks/milestone-14-memory-collection-v2/task-165-core-infrastructure-setup.md +171 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-166-update-remember-publish.md +191 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-167-update-remember-retract.md +186 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-168-implement-remember-revise.md +184 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-169-update-remember-search-space.md +179 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-170-update-remember-create-update.md +139 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-172-performance-testing-optimization.md +161 -0
- package/agent/tasks/milestone-14-memory-collection-v2/task-173-documentation-examples.md +258 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-174-add-moderation-schema-fields.md +57 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-175-create-space-config-service.md +64 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-176-wire-moderation-publish-flow.md +45 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-177-add-moderation-search-filters.md +70 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-178-create-remember-moderate-tool.md +69 -0
- package/agent/tasks/milestone-15-moderation-space-config/task-179-documentation-integration-tests.md +58 -0
- package/agent/tasks/milestone-16-ghost-system/task-187-ghost-config-firestore.md +41 -0
- package/agent/tasks/milestone-16-ghost-system/task-188-trust-filter-integration.md +44 -0
- package/agent/tasks/milestone-16-ghost-system/task-189-ghost-memory-filtering.md +43 -0
- package/agent/tasks/milestone-16-ghost-system/task-190-ghost-config-tools.md +45 -0
- package/agent/tasks/milestone-16-ghost-system/task-191-escalation-firestore.md +38 -0
- package/agent/tasks/milestone-16-ghost-system/task-192-documentation-verification.md +39 -0
- package/agent/tasks/milestone-7-trust-permissions/task-180-access-result-permission-types.md +69 -0
- package/agent/tasks/milestone-7-trust-permissions/task-181-firestore-permissions-access-logs.md +56 -0
- package/agent/tasks/milestone-7-trust-permissions/task-182-trust-enforcement-service.md +68 -0
- package/agent/tasks/milestone-7-trust-permissions/task-183-access-control-service.md +70 -0
- package/agent/tasks/milestone-7-trust-permissions/task-184-permission-tools.md +79 -0
- package/agent/tasks/milestone-7-trust-permissions/task-185-wire-trust-into-search-query.md +55 -0
- package/agent/tasks/milestone-7-trust-permissions/task-186-documentation-verification.md +56 -0
- package/agent/tasks/task-76-fix-indexnullstate-schema-bug.md +197 -0
- package/dist/collections/composite-ids.d.ts +106 -0
- package/dist/collections/core-infrastructure.spec.d.ts +11 -0
- package/dist/collections/dot-notation.d.ts +106 -0
- package/dist/collections/tracking-arrays.d.ts +176 -0
- package/dist/constants/content-types.d.ts +1 -0
- package/dist/schema/v2-collections-comments.spec.d.ts +8 -0
- package/dist/schema/v2-collections.d.ts +210 -0
- package/dist/server-factory.d.ts +15 -0
- package/dist/server-factory.js +2798 -1029
- package/dist/server.js +2526 -1012
- package/dist/services/access-control.d.ts +103 -0
- package/dist/services/access-control.spec.d.ts +2 -0
- package/dist/services/credentials-provider.d.ts +24 -0
- package/dist/services/credentials-provider.spec.d.ts +2 -0
- package/dist/services/escalation.service.d.ts +22 -0
- package/dist/services/escalation.service.spec.d.ts +2 -0
- package/dist/services/ghost-config.service.d.ts +55 -0
- package/dist/services/ghost-config.service.spec.d.ts +2 -0
- package/dist/services/space-config.service.d.ts +23 -0
- package/dist/services/space-config.service.spec.d.ts +2 -0
- package/dist/services/trust-enforcement.d.ts +83 -0
- package/dist/services/trust-enforcement.spec.d.ts +2 -0
- package/dist/services/trust-validator.d.ts +43 -0
- package/dist/services/trust-validator.spec.d.ts +2 -0
- package/dist/tools/confirm-publish-moderation.spec.d.ts +8 -0
- package/dist/tools/confirm.d.ts +8 -1
- package/dist/tools/create-memory.d.ts +2 -1
- package/dist/tools/create-memory.spec.d.ts +10 -0
- package/dist/tools/create-relationship.d.ts +2 -1
- package/dist/tools/delete-memory.d.ts +2 -1
- package/dist/tools/delete-relationship.d.ts +2 -1
- package/dist/tools/deny.d.ts +2 -1
- package/dist/tools/find-similar.d.ts +2 -1
- package/dist/tools/get-preferences.d.ts +2 -1
- package/dist/tools/ghost-config.d.ts +27 -0
- package/dist/tools/ghost-config.spec.d.ts +2 -0
- package/dist/tools/moderate.d.ts +20 -0
- package/dist/tools/moderate.spec.d.ts +5 -0
- package/dist/tools/publish.d.ts +11 -3
- package/dist/tools/query-memory.d.ts +3 -1
- package/dist/tools/query-space.d.ts +4 -1
- package/dist/tools/retract.d.ts +29 -0
- package/dist/tools/revise.d.ts +45 -0
- package/dist/tools/revise.spec.d.ts +8 -0
- package/dist/tools/search-memory.d.ts +2 -1
- package/dist/tools/search-relationship.d.ts +2 -1
- package/dist/tools/search-space.d.ts +25 -5
- package/dist/tools/search-space.spec.d.ts +9 -0
- package/dist/tools/set-preference.d.ts +2 -1
- package/dist/tools/update-memory.d.ts +2 -1
- package/dist/tools/update-relationship.d.ts +2 -1
- package/dist/types/access-result.d.ts +48 -0
- package/dist/types/access-result.spec.d.ts +2 -0
- package/dist/types/auth.d.ts +46 -0
- package/dist/types/ghost-config.d.ts +36 -0
- package/dist/types/memory.d.ts +3 -1
- package/dist/types/preferences.d.ts +1 -1
- package/dist/utils/auth-helpers.d.ts +14 -0
- package/dist/utils/auth-helpers.spec.d.ts +2 -0
- package/dist/utils/test-data-generator.d.ts +124 -0
- package/dist/utils/test-data-generator.spec.d.ts +12 -0
- package/dist/v2-performance.e2e.d.ts +17 -0
- package/dist/v2-smoke.e2e.d.ts +14 -0
- package/dist/weaviate/client.d.ts +5 -8
- package/dist/weaviate/space-schema.d.ts +2 -2
- package/docs/performance/v2-benchmarks.md +80 -0
- package/jest.e2e.config.js +14 -3
- package/package.json +1 -1
- package/scripts/.collection-recreation-state.yaml +16 -0
- package/scripts/.gitkeep +5 -0
- package/scripts/README-collection-recreation.md +224 -0
- package/scripts/README.md +51 -0
- package/scripts/backup-collections.ts +543 -0
- package/scripts/delete-collection.ts +137 -0
- package/scripts/migrate-recreate-collections.ts +578 -0
- package/scripts/migrate-v1-to-v2.ts +1094 -0
- package/scripts/package-lock.json +1113 -0
- package/scripts/package.json +27 -0
- package/src/collections/composite-ids.ts +193 -0
- package/src/collections/core-infrastructure.spec.ts +353 -0
- package/src/collections/dot-notation.ts +212 -0
- package/src/collections/tracking-arrays.ts +298 -0
- package/src/constants/content-types.ts +20 -0
- package/src/schema/v2-collections-comments.spec.ts +141 -0
- package/src/schema/v2-collections.ts +433 -0
- package/src/server-factory.ts +89 -20
- package/src/server.ts +45 -17
- package/src/services/access-control.spec.ts +383 -0
- package/src/services/access-control.ts +291 -0
- package/src/services/credentials-provider.spec.ts +22 -0
- package/src/services/credentials-provider.ts +34 -0
- package/src/services/escalation.service.spec.ts +183 -0
- package/src/services/escalation.service.ts +150 -0
- package/src/services/ghost-config.service.spec.ts +339 -0
- package/src/services/ghost-config.service.ts +219 -0
- package/src/services/space-config.service.spec.ts +102 -0
- package/src/services/space-config.service.ts +79 -0
- package/src/services/trust-enforcement.spec.ts +309 -0
- package/src/services/trust-enforcement.ts +197 -0
- package/src/services/trust-validator.spec.ts +108 -0
- package/src/services/trust-validator.ts +105 -0
- package/src/tools/confirm-publish-moderation.spec.ts +240 -0
- package/src/tools/confirm.ts +869 -135
- package/src/tools/create-memory.spec.ts +126 -0
- package/src/tools/create-memory.ts +20 -27
- package/src/tools/create-relationship.ts +17 -8
- package/src/tools/delete-memory.ts +13 -6
- package/src/tools/delete-relationship.ts +15 -6
- package/src/tools/deny.ts +8 -1
- package/src/tools/find-similar.ts +21 -8
- package/src/tools/get-preferences.ts +10 -1
- package/src/tools/ghost-config.spec.ts +180 -0
- package/src/tools/ghost-config.ts +230 -0
- package/src/tools/moderate.spec.ts +277 -0
- package/src/tools/moderate.ts +219 -0
- package/src/tools/publish.ts +99 -41
- package/src/tools/query-memory.ts +28 -6
- package/src/tools/query-space.ts +39 -4
- package/src/tools/retract.ts +292 -0
- package/src/tools/revise.spec.ts +146 -0
- package/src/tools/revise.ts +283 -0
- package/src/tools/search-memory.ts +30 -7
- package/src/tools/search-relationship.ts +11 -2
- package/src/tools/search-space.spec.ts +341 -0
- package/src/tools/search-space.ts +323 -99
- package/src/tools/set-preference.ts +10 -1
- package/src/tools/update-memory.ts +16 -5
- package/src/tools/update-relationship.ts +10 -1
- package/src/types/access-result.spec.ts +193 -0
- package/src/types/access-result.ts +62 -0
- package/src/types/auth.ts +52 -0
- package/src/types/ghost-config.ts +46 -0
- package/src/types/memory.ts +9 -1
- package/src/types/preferences.ts +2 -2
- package/src/utils/auth-helpers.spec.ts +75 -0
- package/src/utils/auth-helpers.ts +25 -0
- package/src/utils/test-data-generator.spec.ts +317 -0
- package/src/utils/test-data-generator.ts +292 -0
- package/src/utils/weaviate-filters.ts +4 -4
- package/src/v2-performance.e2e.ts +173 -0
- package/src/v2-smoke.e2e.ts +401 -0
- package/src/weaviate/client.spec.ts +5 -5
- package/src/weaviate/client.ts +51 -36
- package/src/weaviate/schema.ts +11 -256
- package/src/weaviate/space-schema.spec.ts +24 -24
- package/src/weaviate/space-schema.ts +18 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,364 @@ 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
|
+
## [3.13.0] - 2026-02-28
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
**Ghost Mode — Server-Side Resolution (M16 hardening)**
|
|
13
|
+
|
|
14
|
+
- Ghost context now resolved server-side via `AuthContext.ghostMode` instead of LLM-accessible `ghost_context` tool parameter
|
|
15
|
+
- `ServerOptions.ghostMode` added to server factory — agentbase.me passes ghost owner/accessor via mcp-auth extras, trust level resolved from Firestore at server creation
|
|
16
|
+
- `GhostModeContext` type added to `src/types/auth.ts` with `owner_user_id`, `accessor_user_id`, `accessor_trust_level`
|
|
17
|
+
- `AuthContext` extended with optional `ghostMode` field
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- `ghost_context` parameter from `remember_search_memory` and `remember_query_memory` tool schemas — trust levels are no longer LLM-controllable
|
|
22
|
+
- `GhostContext` interface from `search-memory.ts` — replaced by `GhostModeContext` in `types/auth.ts`
|
|
23
|
+
|
|
24
|
+
### Security
|
|
25
|
+
|
|
26
|
+
- Trust level escalation prevention: accessor trust is resolved from GhostConfig (Firestore) at server creation time, not from tool arguments
|
|
27
|
+
|
|
28
|
+
## [3.12.0] - 2026-02-27
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
**Ghost System (M16)**
|
|
33
|
+
|
|
34
|
+
- `remember_ghost_config` tool — manage ghost/persona settings (enable/disable, trust levels, block/unblock users)
|
|
35
|
+
- `src/services/ghost-config.service.ts` — GhostConfig Firestore CRUD (get, set, setUserTrust, blockUser, etc.)
|
|
36
|
+
- `FirestoreGhostConfigProvider` — production GhostConfigProvider implementation
|
|
37
|
+
- `src/services/escalation.service.ts` — `FirestoreEscalationStore` for persistent trust escalation tracking
|
|
38
|
+
- Ghost memory filtering — `content_type: 'ghost'` excluded from default searches (search-memory, query-memory, find-similar, search-space, query-space)
|
|
39
|
+
- `ghost_context` parameter on `remember_search_memory` and `remember_query_memory` — enables trust-filtered cross-user searches
|
|
40
|
+
- `buildTrustFilter` wired into search/query tools when ghost_context present
|
|
41
|
+
- 21 MCP tools total (was 20)
|
|
42
|
+
- 57 new tests (454 total: 453 passed, 1 skipped)
|
|
43
|
+
|
|
44
|
+
## [3.11.0] - 2026-02-27
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
**Trust & Permissions System (M7)**
|
|
49
|
+
|
|
50
|
+
- `src/types/access-result.ts` — `AccessResult` discriminated union with 6 variants: `granted`, `insufficient_trust`, `blocked`, `no_permission`, `not_found`, `deleted`
|
|
51
|
+
- `src/types/ghost-config.ts` — `GhostConfig` interface (Firestore schema for ghost/persona system), `TrustEnforcementMode` type, `DEFAULT_GHOST_CONFIG` constant
|
|
52
|
+
- `ghost` and `comment` content types added to `ContentType` union and `CONTENT_TYPES` metadata
|
|
53
|
+
- `src/services/trust-enforcement.ts` — 3-mode trust enforcement (query/prompt/hybrid), `buildTrustFilter` for Weaviate, `formatMemoryForPrompt` for 5 trust tiers, trust utilities
|
|
54
|
+
- `src/services/trust-validator.ts` — `validateTrustAssignment` and `suggestTrustLevel` for content-aware trust suggestions
|
|
55
|
+
- `src/services/access-control.ts` — `checkMemoryAccess` with discriminated union results, trust escalation (-0.1 penalty/attempt, block after 3), `resolveAccessorTrustLevel` from GhostConfig, `formatAccessResultMessage`
|
|
56
|
+
- Dependency injection: `GhostConfigProvider` and `EscalationStore` interfaces with in-memory stubs (Firestore in M16)
|
|
57
|
+
- 89 new tests (389 total: 388 passed, 1 skipped)
|
|
58
|
+
|
|
59
|
+
**Comprehensive Tool Debugging (M8 Task 69)**
|
|
60
|
+
|
|
61
|
+
- Debug logging integrated into all 18 MCP tools + Weaviate client
|
|
62
|
+
- Pattern: `debug.info` at entry, `debug.trace` for args, `debug.error` in catch blocks
|
|
63
|
+
- 13 remaining tools integrated: create-memory, search-memory, delete-memory, update-memory, find-similar, query-memory, deny, create-relationship, update-relationship, search-relationship, delete-relationship, set-preference, get-preferences
|
|
64
|
+
- 394 tests (393 passed, 1 skipped)
|
|
65
|
+
|
|
66
|
+
## [3.10.0] - 2026-02-27
|
|
67
|
+
|
|
68
|
+
### Added
|
|
69
|
+
|
|
70
|
+
**Moderation System & Per-Space Configuration (M15)**
|
|
71
|
+
|
|
72
|
+
- `remember_moderate` tool — approve, reject, or remove published memories (requires `can_moderate` permission)
|
|
73
|
+
- `moderation_status`, `moderated_by`, `moderated_at` schema fields on published memory collections
|
|
74
|
+
- `can_moderate` permission added to `GroupPermissions` type
|
|
75
|
+
- Per-space/group configuration via Firestore (`SpaceConfig` service with `require_moderation` and `default_write_mode`)
|
|
76
|
+
- Publish flow sets `moderation_status` based on space/group `require_moderation` config
|
|
77
|
+
- `moderation_filter` parameter on `remember_search_space` and `remember_query_space` tools (default: `approved`)
|
|
78
|
+
- `canModerate` and `canModerateAny` auth helper utilities
|
|
79
|
+
- 20 MCP tools total (was 19)
|
|
80
|
+
- 32 new tests (281 total: 280 passed, 1 skipped)
|
|
81
|
+
|
|
82
|
+
## [3.9.0] - 2026-02-27
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
|
|
86
|
+
**Auth Context & Credentials Provider Foundations**
|
|
87
|
+
|
|
88
|
+
- `src/types/auth.ts` — `AuthContext`, `UserCredentials`, `GroupMembership`, `GroupPermissions`, `CredentialsProvider`, `WriteMode` types
|
|
89
|
+
- `src/services/credentials-provider.ts` — `StubCredentialsProvider` with `createCredentialsProvider()` factory and singleton export
|
|
90
|
+
- 4 ACL schema fields on `PUBLISHED_MEMORY_PROPERTIES`: `write_mode`, `owner_id`, `overwrite_allowed_ids`, `last_revised_by`
|
|
91
|
+
- `authContext?: AuthContext` parameter threaded through all 19 tool handler signatures
|
|
92
|
+
- `server-factory.ts` resolves credentials per request and passes `AuthContext` to all handlers
|
|
93
|
+
- `server.ts` passes null `AuthContext` in standalone mode
|
|
94
|
+
- 3 new tests for `StubCredentialsProvider` (236 total: 235 passed, 1 skipped)
|
|
95
|
+
|
|
96
|
+
## [3.8.0] - 2026-02-27
|
|
97
|
+
|
|
98
|
+
### Changed
|
|
99
|
+
|
|
100
|
+
**V1 → V2 Collection Migration & Code Switch**
|
|
101
|
+
|
|
102
|
+
- Collection naming switched to v2 dot-notation: `Memory_{SanitizedUserId}` → `Memory_users_{userId}`, `Memory_public` → `Memory_spaces_public`
|
|
103
|
+
- Drop `sanitizeUserId()` — collection names now use literal userId
|
|
104
|
+
- Property renames across all tool files: `type` → `content_type`, `trust` → `trust_score`, `relationships` → `relationship_ids`, `memory_ids` → `related_memory_ids`, `location_gps_lat/lng` → `location_lat/lon`
|
|
105
|
+
- `createMemoryCollection()` and `ensurePublicCollection()` now use v2 schema from `v2-collections.ts`
|
|
106
|
+
- `ALL_MEMORY_PROPERTIES` updated to include both v1 and v2 property names for backward compatibility
|
|
107
|
+
|
|
108
|
+
### Added
|
|
109
|
+
|
|
110
|
+
- `scripts/migrate-v1-to-v2.ts` — CLI migration script with `--dry-run`, `--skip-backup`, `--verify-only`, `--batch-size` flags and YAML state file for resumability
|
|
111
|
+
- Schema reconciliation: 25+ missing v1 properties added to `COMMON_MEMORY_PROPERTIES` in `v2-collections.ts` (superset strategy)
|
|
112
|
+
- Migration convenience scripts in `scripts/package.json`
|
|
113
|
+
|
|
114
|
+
### Fixed
|
|
115
|
+
|
|
116
|
+
- `RelevantMemory` interface now includes `content_type` property
|
|
117
|
+
- `search-space.spec.ts` filter expectations updated for v2 property names
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## [3.7.1] - 2026-02-27
|
|
122
|
+
|
|
123
|
+
### Fixed
|
|
124
|
+
|
|
125
|
+
**v2 Schema Weaviate Cloud Compatibility**
|
|
126
|
+
|
|
127
|
+
- Remove reserved `id` property from `COMMON_MEMORY_PROPERTIES` — Weaviate reserves `id` for UUID primary key
|
|
128
|
+
- Change `vectorizer` to `vectorizers` (plural) in all schema creation functions — required by `client.collections.create()` v3 API
|
|
129
|
+
- Replace `'text' as any` data type casts with `configure.dataType.TEXT` (and corresponding typed variants) throughout schema definitions
|
|
130
|
+
- Update `jest.e2e.config.js` to ESM format matching unit test config
|
|
131
|
+
|
|
132
|
+
### Added
|
|
133
|
+
|
|
134
|
+
- `src/v2-smoke.e2e.ts` — E2E smoke test validating full v2 flow against live Weaviate (connect → create collections → publish → search → revise)
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## [3.7.0] - 2026-02-27
|
|
139
|
+
|
|
140
|
+
### Changed
|
|
141
|
+
|
|
142
|
+
**remember_revise: Added Confirmation Flow**
|
|
143
|
+
|
|
144
|
+
`remember_revise` now uses the same two-phase confirmation flow as `remember_publish` and `remember_retract`.
|
|
145
|
+
|
|
146
|
+
- **Phase 1**: `remember_revise({ memory_id })` validates the request and returns a confirmation token
|
|
147
|
+
- **Phase 2**: `remember_confirm({ token })` executes the revision, syncing content to all published copies
|
|
148
|
+
- Revision logic moved from `revise.ts` to `executeReviseMemory()` in `confirm.ts`
|
|
149
|
+
- New action type: `revise_memory` handled by `remember_confirm`
|
|
150
|
+
- Token response includes destination summary (`space_ids`, `group_ids`, `total_locations`)
|
|
151
|
+
- All existing revision behavior preserved (revision_history, revised_at, partial success)
|
|
152
|
+
|
|
153
|
+
### Added
|
|
154
|
+
|
|
155
|
+
**Documentation (Task 173)**
|
|
156
|
+
|
|
157
|
+
- `agent/design/local.v2-api-reference.md` — Complete API docs for all 6 v2 tools
|
|
158
|
+
- `agent/design/local.v2-migration-guide.md` — v1 → v2 migration guide
|
|
159
|
+
- `agent/design/local.v2-usage-examples.md` — Real-world usage patterns and examples
|
|
160
|
+
- Updated `README.md` with v2 architecture, 18 tools, v2 tool listing
|
|
161
|
+
- Updated `agent/design/local.memory-collection-pattern-v2.md` status to Implemented
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## [3.6.0] - 2026-02-27
|
|
166
|
+
|
|
167
|
+
### Added
|
|
168
|
+
|
|
169
|
+
**Memory Collection Pattern v2 - Tracking Array Initialization (Task 170)**
|
|
170
|
+
|
|
171
|
+
New memories now initialize `space_ids` and `group_ids` arrays, enabling publication tracking from the moment of creation.
|
|
172
|
+
|
|
173
|
+
- **`space_ids: []`** initialized on every new memory (managed by `remember_publish` / `remember_retract`)
|
|
174
|
+
- **`group_ids: []`** initialized on every new memory (managed by `remember_publish` / `remember_retract`)
|
|
175
|
+
- **`Memory` interface**: Added `space_ids?: string[]` and `group_ids?: string[]` fields to `src/types/memory.ts`
|
|
176
|
+
- **`remember_update_memory`**: Tracking arrays preserved via spread pattern; explicitly excluded from `UpdateMemoryArgs` to prevent direct modification
|
|
177
|
+
- **Unit Tests** ([`src/tools/create-memory.spec.ts`](src/tools/create-memory.spec.ts))
|
|
178
|
+
- 19 new tests: `createMemoryTool` schema (8) + `updateMemoryTool` schema (11)
|
|
179
|
+
- Asserts `space_ids`/`group_ids` are not user-settable via either tool's input schema
|
|
180
|
+
- Total: 198 tests passing (197 passing, 1 skipped)
|
|
181
|
+
|
|
182
|
+
## [3.5.0] - 2026-02-27
|
|
183
|
+
|
|
184
|
+
### Changed
|
|
185
|
+
|
|
186
|
+
**Memory Collection Pattern v2 - remember_search_space Updated (Task 169)**
|
|
187
|
+
|
|
188
|
+
`remember_search_space` now targets the v2 collection architecture, adds group search support, and introduces `search_type` selection.
|
|
189
|
+
|
|
190
|
+
- **Collection target**: `Memory_public` → `Memory_spaces_public` (via `getCollectionName(CollectionType.SPACES)`)
|
|
191
|
+
- **Field filter**: `spaces` property → `space_ids.containsAny()` (matches v2 published memory schema)
|
|
192
|
+
- **`spaces` parameter**: No longer required — omit to search all public memories
|
|
193
|
+
- **`groups` parameter** (new): Array of group IDs — queries `Memory_groups_{groupId}` for each
|
|
194
|
+
- **`search_type` parameter** (new): `"hybrid"` (default) | `"bm25"` (keyword) | `"semantic"` (vector)
|
|
195
|
+
- **All-public search**: When neither `spaces` nor `groups` is provided, queries all of `Memory_spaces_public`
|
|
196
|
+
- **Multi-source merge**: Results from spaces + groups combined, deduplicated by UUID, sorted by score descending
|
|
197
|
+
- **Soft-delete aware**: Added `deleted_at isNull(true)` filter to all queries (requires `indexNullState: true`)
|
|
198
|
+
- **`buildBaseFilters()` helper**: Extracted as exported pure function for testability
|
|
199
|
+
|
|
200
|
+
### Added
|
|
201
|
+
|
|
202
|
+
- **Unit Tests** ([`src/tools/search-space.spec.ts`](src/tools/search-space.spec.ts))
|
|
203
|
+
- 23 new tests: tool schema (9) + `buildBaseFilters` helper (14)
|
|
204
|
+
- Total: 179 tests passing
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## [3.4.0] - 2026-02-26
|
|
209
|
+
|
|
210
|
+
### Added
|
|
211
|
+
|
|
212
|
+
**Memory Collection Pattern v2 - remember_revise Tool (Task 168)**
|
|
213
|
+
|
|
214
|
+
Content synchronization for published memories — propagates source memory updates to all published copies.
|
|
215
|
+
|
|
216
|
+
- **`remember_revise` Tool** ([`src/tools/revise.ts`](src/tools/revise.ts))
|
|
217
|
+
- Direct action tool (no confirmation flow — content sync is non-destructive)
|
|
218
|
+
- Reads `space_ids` and `group_ids` tracking arrays from source memory
|
|
219
|
+
- Updates content in `Memory_spaces_public` (one call for all spaces)
|
|
220
|
+
- Updates content in each `Memory_groups_{groupId}` in sequence
|
|
221
|
+
- Partial success: each location reported independently, failures don't block successes
|
|
222
|
+
- Returns detailed `results` array with status per location
|
|
223
|
+
|
|
224
|
+
- **Revision History** ([`src/tools/revise.ts`](src/tools/revise.ts))
|
|
225
|
+
- Old content saved to `revision_history` field (JSON string) before overwrite
|
|
226
|
+
- Capped at 10 entries (`MAX_REVISION_HISTORY`)
|
|
227
|
+
- `revised_at` timestamp set on each updated copy
|
|
228
|
+
- `revision_count` incremented on each updated copy
|
|
229
|
+
- `parseRevisionHistory()` and `buildRevisionHistory()` exported as pure helpers
|
|
230
|
+
|
|
231
|
+
- **Server Registration**
|
|
232
|
+
- `remember_revise` tool registered in both `src/server.ts` and `src/server-factory.ts`
|
|
233
|
+
|
|
234
|
+
- **Unit Tests** ([`src/tools/revise.spec.ts`](src/tools/revise.spec.ts))
|
|
235
|
+
- 19 new tests covering `parseRevisionHistory`, `buildRevisionHistory`, and tool definition
|
|
236
|
+
- Total: 156 tests passing
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## [3.3.0] - 2026-02-26
|
|
241
|
+
|
|
242
|
+
### Added
|
|
243
|
+
|
|
244
|
+
**Memory Collection Pattern v2 - remember_retract Tool (Task 167)**
|
|
245
|
+
|
|
246
|
+
Selective retraction of published memories from specific spaces and groups, with an orphan strategy that preserves historical data.
|
|
247
|
+
|
|
248
|
+
- **`remember_retract` Tool** ([`src/tools/retract.ts`](src/tools/retract.ts))
|
|
249
|
+
- Retract a memory from specific spaces (e.g., `["cooking", "recipes"]`)
|
|
250
|
+
- Retract a memory from specific groups (e.g., `["group-123"]`)
|
|
251
|
+
- Selective retraction: retract from some destinations while remaining in others
|
|
252
|
+
- Ownership validation: users can only retract their own memories
|
|
253
|
+
- Publication validation: returns error if memory isn't published to the specified destination
|
|
254
|
+
- Two-phase confirmation flow: generates token, user confirms to execute
|
|
255
|
+
|
|
256
|
+
- **Orphan Strategy** ([`src/tools/confirm.ts`](src/tools/confirm.ts) `executeRetractMemory()`)
|
|
257
|
+
- Space memories: remain in `Memory_spaces_public` with `space_ids` array updated (orphaned if empty)
|
|
258
|
+
- Group memories: remain in `Memory_groups_{groupId}` with `group_ids` array updated (orphaned if empty)
|
|
259
|
+
- `retracted_at` timestamp set on orphaned memories
|
|
260
|
+
- Source memory tracking arrays (`space_ids`, `group_ids`) updated on success
|
|
261
|
+
- Partial success: failed retractions don't block successful ones
|
|
262
|
+
|
|
263
|
+
- **Server Registration**
|
|
264
|
+
- `remember_retract` tool registered in both `src/server.ts` and `src/server-factory.ts`
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## [3.2.0] - 2026-02-26
|
|
269
|
+
|
|
270
|
+
### Added
|
|
271
|
+
|
|
272
|
+
**Memory Collection Pattern v2 - remember_publish Tool (Task 166)**
|
|
273
|
+
|
|
274
|
+
Multi-space and multi-group publication with composite IDs and tracking arrays.
|
|
275
|
+
|
|
276
|
+
- **Multi-Space Publication** ([`src/tools/publish.ts`](src/tools/publish.ts), [`src/tools/confirm.ts`](src/tools/confirm.ts))
|
|
277
|
+
- Publish memories to multiple spaces at once (e.g., `["cooking", "recipes"]`)
|
|
278
|
+
- Publish memories to multiple groups at once (e.g., `["group-123", "group-456"]`)
|
|
279
|
+
- Dual publication: publish to both spaces and groups simultaneously
|
|
280
|
+
- Composite IDs (`{userId}.{memoryId}`) for published memories
|
|
281
|
+
- Tracking arrays (`space_ids`, `group_ids`) on source and published memories
|
|
282
|
+
- Partial success reporting with detailed results per destination
|
|
283
|
+
- Error handling for each publication destination independently
|
|
284
|
+
|
|
285
|
+
- **Tool Schema Updates**
|
|
286
|
+
- Added `groups` parameter to `remember_publish` tool
|
|
287
|
+
- Validation for group IDs (no dots allowed)
|
|
288
|
+
- Support for publishing to spaces only, groups only, or both
|
|
289
|
+
|
|
290
|
+
### Changed
|
|
291
|
+
|
|
292
|
+
- `executePublishMemory()` in confirm.ts completely rewritten for v2 architecture
|
|
293
|
+
- Publications now use composite IDs instead of random UUIDs
|
|
294
|
+
- Source memories updated with `space_ids` and `group_ids` tracking arrays
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## [3.1.0] - 2026-02-26
|
|
299
|
+
|
|
300
|
+
### Added
|
|
301
|
+
|
|
302
|
+
**Memory Collection Pattern v2 - Core Infrastructure (Task 165)**
|
|
303
|
+
|
|
304
|
+
Foundation for multi-user social features including user profiles, friend systems, P2P conversations, and group conversations.
|
|
305
|
+
|
|
306
|
+
- **Dot Notation Collections** ([`src/collections/dot-notation.ts`](src/collections/dot-notation.ts))
|
|
307
|
+
- `getCollectionName()` - Generate collection names (Memory_users_{userId}, Memory_spaces_public, Memory_groups_{groupId})
|
|
308
|
+
- `parseCollectionName()` - Parse collection metadata from names
|
|
309
|
+
- Collection type validation and ID validation (rejects dots in IDs)
|
|
310
|
+
|
|
311
|
+
- **Composite IDs** ([`src/collections/composite-ids.ts`](src/collections/composite-ids.ts))
|
|
312
|
+
- `generateCompositeId()` - Create {userId}.{memoryId} format
|
|
313
|
+
- `parseCompositeId()` - Extract components from composite IDs
|
|
314
|
+
- `validateCompositeId()` - Validate and return true on success
|
|
315
|
+
- `isCompositeId()`, `belongsToUser()` helper functions
|
|
316
|
+
|
|
317
|
+
- **Tracking Arrays** ([`src/collections/tracking-arrays.ts`](src/collections/tracking-arrays.ts))
|
|
318
|
+
- Immutable array operations for `space_ids` and `group_ids`
|
|
319
|
+
- `addToSpaceIds()`, `removeFromSpaceIds()`, `addToGroupIds()`, `removeFromGroupIds()`
|
|
320
|
+
- Publication status checking (`isPublishedToSpace`, `isPublishedToGroup`, `getPublicationLocations`)
|
|
321
|
+
- Batch operations for multiple spaces/groups
|
|
322
|
+
|
|
323
|
+
- **Weaviate Schema Definitions** ([`src/schema/v2-collections.ts`](src/schema/v2-collections.ts))
|
|
324
|
+
- Schema creation for user, space, and group collections
|
|
325
|
+
- Property lists and validation functions
|
|
326
|
+
- Collection name validation and type detection
|
|
327
|
+
|
|
328
|
+
- **Unit Tests** ([`src/collections/core-infrastructure.spec.ts`](src/collections/core-infrastructure.spec.ts))
|
|
329
|
+
- 44 tests covering all utilities
|
|
330
|
+
- 79% coverage on new collections code
|
|
331
|
+
- 97% coverage on tracking arrays
|
|
332
|
+
|
|
333
|
+
### Fixed
|
|
334
|
+
|
|
335
|
+
- Added ID validation to reject dots in user/group IDs in `getCollectionName()`
|
|
336
|
+
- Updated error message in `parseCompositeId()` to include "must be exactly 2 parts"
|
|
337
|
+
- Changed `validateCompositeId()` return type from `void` to `true`
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## [3.0.1] - 2026-02-25
|
|
342
|
+
|
|
343
|
+
### Fixed
|
|
344
|
+
|
|
345
|
+
**CRITICAL: Fixed Weaviate Schema Configuration Bug**
|
|
346
|
+
- Added `indexNullState: true` to inverted index configuration in both schema files
|
|
347
|
+
- Enables filtering on null values (required for `deleted_at IS NULL` queries)
|
|
348
|
+
- Root cause: Soft delete system (v3.0.0) added `deleted_at` field but didn't configure null state indexing
|
|
349
|
+
- Impact: All memory searches were failing with gRPC error "Nullstate must be indexed to be filterable"
|
|
350
|
+
- Modified: [`src/weaviate/schema.ts`](src/weaviate/schema.ts) - Added `invertedIndex` config
|
|
351
|
+
- Modified: [`src/weaviate/space-schema.ts`](src/weaviate/space-schema.ts) - Added `invertedIndex` config
|
|
352
|
+
|
|
353
|
+
**Migration Required**:
|
|
354
|
+
- ⚠️ Existing Weaviate collections must be recreated to apply this fix
|
|
355
|
+
- Collections created before v3.0.1 will continue to fail on null filtering
|
|
356
|
+
- Delete old collections and restart server to create new collections with correct config
|
|
357
|
+
- Alternative: Export data, delete collections, restart, re-import data
|
|
358
|
+
|
|
359
|
+
**For Users**:
|
|
360
|
+
- If you encounter "Nullstate must be indexed" error, delete your collections and restart
|
|
361
|
+
- New collections will be created automatically with correct configuration
|
|
362
|
+
- Documents created before `deleted_at` field existed are handled correctly (missing field = null)
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
8
366
|
## [3.0.0] - 2026-02-25
|
|
9
367
|
|
|
10
368
|
### ⚠️ BREAKING CHANGES
|
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ Multi-tenant memory system MCP server with vector search, relationships, and tru
|
|
|
63
63
|
|
|
64
64
|
## Features
|
|
65
65
|
|
|
66
|
-
- **
|
|
66
|
+
- **18 MCP Tools**: Complete CRUD for memories, relationships, preferences, shared spaces, and content sync
|
|
67
67
|
- **Soft Delete with Recovery**: Safe deletion with confirmation flow and recovery capability
|
|
68
68
|
- **Multi-Tenant**: Per-user isolation with secure data boundaries
|
|
69
69
|
- **Shared Spaces**: Publish memories to shared discovery spaces like "The Void"
|
|
@@ -150,39 +150,46 @@ await wrapped.start();
|
|
|
150
150
|
## Architecture
|
|
151
151
|
|
|
152
152
|
- **Weaviate**: Vector storage for memories, relationships, and shared spaces
|
|
153
|
-
- Personal collections: `
|
|
154
|
-
-
|
|
155
|
-
-
|
|
153
|
+
- Personal collections: `Memory_users_{userId}` (per-user isolation)
|
|
154
|
+
- Public space collection: `Memory_spaces_public` (all shared spaces)
|
|
155
|
+
- Group collections: `Memory_groups_{groupId}` (private groups)
|
|
156
|
+
- Composite IDs: `{userId}.{memoryId}` for published memories
|
|
157
|
+
- Tracking arrays: `space_ids[]` and `group_ids[]` track publication locations
|
|
156
158
|
- **Firestore**: Permissions, preferences, confirmation tokens
|
|
157
159
|
- User data: `users/{user_id}/preferences`, `users/{user_id}/requests`
|
|
158
160
|
- **Firebase Auth**: User authentication
|
|
159
161
|
|
|
160
|
-
###
|
|
162
|
+
### Memory Collection Pattern v2 (v3.1.0+)
|
|
161
163
|
|
|
162
|
-
|
|
164
|
+
Three-tier collection architecture with composite IDs and tracking arrays.
|
|
163
165
|
|
|
164
|
-
**
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
|
|
166
|
+
**Collections**:
|
|
167
|
+
- `Memory_users_{userId}` — Private memories with simple IDs
|
|
168
|
+
- `Memory_spaces_public` — All public space memories with composite IDs
|
|
169
|
+
- `Memory_groups_{groupId}` — Group memories with composite IDs
|
|
170
|
+
|
|
171
|
+
**Key Features**:
|
|
172
|
+
- Publish to multiple spaces and groups simultaneously
|
|
173
|
+
- Composite IDs (`{userId}.{memoryId}`) preserve source reference
|
|
174
|
+
- `remember_revise` syncs content changes to all published copies
|
|
175
|
+
- Orphan strategy keeps retracted memories for historical reference
|
|
176
|
+
- Revision history (max 10 entries) tracks content changes
|
|
169
177
|
|
|
170
178
|
**Example**:
|
|
171
179
|
```typescript
|
|
172
|
-
//
|
|
173
|
-
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
180
|
+
// Publish to spaces + groups
|
|
181
|
+
remember_publish({
|
|
182
|
+
memory_id: "my-recipe",
|
|
183
|
+
spaces: ["cooking", "recipes"],
|
|
184
|
+
groups: ["foodie-club"]
|
|
185
|
+
})
|
|
179
186
|
|
|
180
187
|
// Search across spaces
|
|
181
188
|
remember_search_space({
|
|
182
|
-
|
|
183
|
-
|
|
189
|
+
query: "pasta recipe",
|
|
190
|
+
spaces: ["cooking"],
|
|
191
|
+
search_type: "hybrid"
|
|
184
192
|
})
|
|
185
|
-
// Finds memories published to ANY of the requested spaces
|
|
186
193
|
```
|
|
187
194
|
|
|
188
195
|
## Shared Spaces
|
|
@@ -195,45 +202,56 @@ Publish memories to shared discovery spaces where other users can find them.
|
|
|
195
202
|
|
|
196
203
|
### Publishing Workflow
|
|
197
204
|
|
|
198
|
-
1. **
|
|
205
|
+
1. **Publish**: Generate confirmation token
|
|
199
206
|
```typescript
|
|
200
|
-
// Publish to
|
|
201
|
-
remember_publish({
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
207
|
+
// Publish to spaces + groups
|
|
208
|
+
remember_publish({
|
|
209
|
+
memory_id: "abc123",
|
|
210
|
+
spaces: ["the_void", "cooking"],
|
|
211
|
+
groups: ["foodie-club"]
|
|
212
|
+
})
|
|
206
213
|
// Returns: { success: true, token: "xyz789" }
|
|
207
214
|
```
|
|
208
215
|
|
|
209
|
-
2. **
|
|
216
|
+
2. **Confirm**: Execute the publication
|
|
210
217
|
```typescript
|
|
211
218
|
remember_confirm({ token: "xyz789" })
|
|
212
|
-
//
|
|
213
|
-
// success: true,
|
|
214
|
-
// space_memory_id: "new-id",
|
|
215
|
-
// spaces: ["the_void", "dogs", "cats"]
|
|
216
|
-
// }
|
|
219
|
+
// Creates composite ID copies in Memory_spaces_public and Memory_groups_{groupId}
|
|
217
220
|
```
|
|
218
221
|
|
|
219
|
-
3. **
|
|
222
|
+
3. **Revise**: Sync content changes (confirmation required)
|
|
220
223
|
```typescript
|
|
221
|
-
//
|
|
222
|
-
|
|
224
|
+
// After updating source memory, request revision
|
|
225
|
+
remember_revise({ memory_id: "abc123" })
|
|
226
|
+
// Returns: { success: true, token: "xyz789" }
|
|
223
227
|
|
|
224
|
-
|
|
228
|
+
remember_confirm({ token: "xyz789" })
|
|
229
|
+
// Updates all copies, preserves old content in revision_history
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
4. **Retract**: Remove from specific destinations
|
|
233
|
+
```typescript
|
|
234
|
+
remember_retract({ memory_id: "abc123", spaces: ["cooking"] })
|
|
235
|
+
// Orphan strategy: memory remains in collection for historical reference
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
5. **Search**: Discover shared memories
|
|
239
|
+
```typescript
|
|
225
240
|
remember_search_space({
|
|
226
|
-
query: "
|
|
227
|
-
spaces: ["
|
|
241
|
+
query: "pasta recipe",
|
|
242
|
+
spaces: ["cooking"],
|
|
243
|
+
search_type: "hybrid" // hybrid | bm25 | semantic
|
|
228
244
|
})
|
|
229
245
|
```
|
|
230
246
|
|
|
231
|
-
### Space
|
|
247
|
+
### Space & Group Tools
|
|
232
248
|
|
|
233
|
-
- `remember_publish` -
|
|
249
|
+
- `remember_publish` - Publish to spaces and/or groups (confirmation required)
|
|
250
|
+
- `remember_retract` - Retract from spaces and/or groups (confirmation required)
|
|
251
|
+
- `remember_revise` - Sync content to all published copies (confirmation required)
|
|
234
252
|
- `remember_confirm` - Confirm any pending action
|
|
235
253
|
- `remember_deny` - Cancel any pending action
|
|
236
|
-
- `remember_search_space` - Search shared spaces
|
|
254
|
+
- `remember_search_space` - Search shared spaces and groups
|
|
237
255
|
- `remember_query_space` - Ask questions about shared memories
|
|
238
256
|
|
|
239
257
|
## Safe Deletion with Confirmation
|
|
@@ -366,8 +384,13 @@ REMEMBER_MCP_DEBUG_LEVEL=TRACE npm start
|
|
|
366
384
|
|
|
367
385
|
## Documentation
|
|
368
386
|
|
|
369
|
-
See `agent/`
|
|
370
|
-
-
|
|
387
|
+
See `agent/design/` for detailed documentation:
|
|
388
|
+
- [Memory Collection Pattern v2](agent/design/local.memory-collection-pattern-v2.md) — Architecture and design rationale
|
|
389
|
+
- [v2 API Reference](agent/design/local.v2-api-reference.md) — Complete tool schemas and parameters
|
|
390
|
+
- [v2 Migration Guide](agent/design/local.v2-migration-guide.md) — Migrating from v1 to v2
|
|
391
|
+
- [v2 Usage Examples](agent/design/local.v2-usage-examples.md) — Real-world usage patterns
|
|
392
|
+
|
|
393
|
+
Additional project docs:
|
|
371
394
|
- Milestones (`agent/milestones/`)
|
|
372
395
|
- Implementation tasks (`agent/tasks/`)
|
|
373
396
|
|