@prmichaelsen/remember-mcp 3.20.1 → 4.0.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 +19 -0
- package/agent/milestones/milestone-23-trust-level-protection.md +122 -0
- package/agent/progress.yaml +96 -3
- package/agent/tasks/milestone-23-trust-level-protection/task-525-remove-trust-from-create-update.md +69 -0
- package/agent/tasks/milestone-23-trust-level-protection/task-526-add-request-set-trust-level-tool.md +108 -0
- package/agent/tasks/milestone-23-trust-level-protection/task-527-update-confirm-deny-secret-token.md +60 -0
- package/agent/tasks/milestone-23-trust-level-protection/task-528-update-trust-scale-references.md +73 -0
- package/agent/tasks/milestone-23-trust-level-protection/task-529-version-bump-and-release.md +87 -0
- package/dist/server-factory.js +151 -47
- package/dist/server.js +150 -42
- package/dist/services/trust-validator.d.ts +16 -14
- package/dist/tools/confirm.d.ts +1 -0
- package/dist/tools/confirm.spec.d.ts +5 -0
- package/dist/tools/create-internal-memory.d.ts +0 -7
- package/dist/tools/create-memory.d.ts +0 -7
- package/dist/tools/deny.d.ts +1 -0
- package/dist/tools/deny.spec.d.ts +5 -0
- package/dist/tools/query-memory.d.ts +2 -0
- package/dist/tools/request-set-trust-level.d.ts +32 -0
- package/dist/tools/request-set-trust-level.spec.d.ts +2 -0
- package/dist/tools/search-memory.d.ts +2 -0
- package/dist/tools/update-internal-memory.d.ts +0 -6
- package/dist/tools/update-memory.d.ts +0 -7
- package/package.json +2 -2
- package/src/server-factory.ts +6 -0
- package/src/server.ts +6 -0
- package/src/services/trust-validator.spec.ts +57 -51
- package/src/services/trust-validator.ts +28 -26
- package/src/tools/confirm.spec.ts +108 -0
- package/src/tools/confirm.ts +24 -1
- package/src/tools/create-internal-memory.ts +0 -3
- package/src/tools/create-memory.spec.ts +6 -2
- package/src/tools/create-memory.ts +1 -9
- package/src/tools/deny.spec.ts +59 -0
- package/src/tools/deny.ts +6 -1
- package/src/tools/ghost-config.ts +19 -19
- package/src/tools/publish.ts +2 -0
- package/src/tools/query-memory.ts +4 -2
- package/src/tools/request-set-trust-level.spec.ts +87 -0
- package/src/tools/request-set-trust-level.ts +109 -0
- package/src/tools/retract.ts +2 -0
- package/src/tools/revise.ts +2 -0
- package/src/tools/search-memory.ts +4 -2
- package/src/tools/update-internal-memory.ts +0 -3
- package/src/tools/update-memory.ts +0 -8
- package/src/types/memory.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,25 @@ 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
|
+
## [4.0.0] - 2026-03-20
|
|
9
|
+
|
|
10
|
+
### BREAKING CHANGES
|
|
11
|
+
- **Trust removed from create/update**: `trust` parameter removed from `remember_create_memory`, `remember_update_memory`, `remember_create_internal_memory`, `remember_update_internal_memory`. Trust now defaults to SECRET (5) on creation.
|
|
12
|
+
- **Trust scale changed**: All trust references updated from 0-1 float to 1-5 integer scale (1=PUBLIC, 2=INTERNAL, 3=CONFIDENTIAL, 4=RESTRICTED, 5=SECRET).
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- `remember_request_set_trust_level` tool — two-phase confirmation flow to change a memory's trust level (request → token → confirm)
|
|
16
|
+
- `secret_token` optional parameter on `remember_confirm` and `remember_deny` for ConfirmationGuardService support
|
|
17
|
+
- `set_trust_level` action handler in `remember_confirm` for confirming trust level changes
|
|
18
|
+
- 15 new tests: request-set-trust-level (7), confirm (3), deny (2), trust-validator (3 updated)
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- Updated `@prmichaelsen/remember-core` to 1.0.0
|
|
22
|
+
- Trust filter schemas (`trust_min`) updated to integer 1-5 range in search-memory and query-memory
|
|
23
|
+
- Ghost config tool schemas updated to 1-5 integer trust scale
|
|
24
|
+
- Local trust-validator rewritten for 1-5 integer scale
|
|
25
|
+
- 510 total tests (509 passed, 1 skipped)
|
|
26
|
+
|
|
8
27
|
## [3.20.0] - 2026-03-14
|
|
9
28
|
|
|
10
29
|
### Added
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Milestone 23: Trust Level Protection (Breaking)
|
|
2
|
+
|
|
3
|
+
**Goal**: Align remember-mcp with remember-core M80 trust level protection — remove direct trust setting, add confirmation-gated trust change flow, update trust scale to integer 1-5
|
|
4
|
+
**Duration**: 1 week
|
|
5
|
+
**Dependencies**: remember-core >= 0.72.0
|
|
6
|
+
**Status**: Not Started
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
remember-core M80 removes trust from CreateMemoryInput/UpdateMemoryInput and introduces a two-phase confirmation flow for trust level changes (`requestSetTrustLevel` → token → `confirmSetTrustLevel`). Additionally, the ConfirmationGuardService adds optional HMAC secret token challenge on confirm/deny operations.
|
|
13
|
+
|
|
14
|
+
This is a **major breaking change** for remember-mcp consumers:
|
|
15
|
+
- `trust` parameter removed from 4 MCP tool schemas (create-memory, update-memory, create-internal-memory, update-internal-memory)
|
|
16
|
+
- Trust defaults to SECRET (5) on creation
|
|
17
|
+
- Trust can only be changed via a new dedicated confirmation flow
|
|
18
|
+
- Trust scale changes from 0-1 float to 1-5 integer
|
|
19
|
+
|
|
20
|
+
**Version**: 3.x → 4.0.0
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Deliverables
|
|
25
|
+
|
|
26
|
+
### 1. Schema Changes
|
|
27
|
+
- Remove `trust` parameter from create-memory, update-memory, create-internal-memory, update-internal-memory tool schemas
|
|
28
|
+
- Update all tool descriptions referencing trust scale (0-1 → 1-5)
|
|
29
|
+
|
|
30
|
+
### 2. New MCP Tool
|
|
31
|
+
- `remember_request_set_trust_level` — request a trust level change, returns confirmation token
|
|
32
|
+
- Reuses existing confirm/deny flow for the actual change
|
|
33
|
+
|
|
34
|
+
### 3. Confirm/Deny Updates
|
|
35
|
+
- `remember_confirm` and `remember_deny` support optional `secret_token` parameter
|
|
36
|
+
- Guard-aware error messages (cooldown, backoff)
|
|
37
|
+
|
|
38
|
+
### 4. Dependency & Version
|
|
39
|
+
- remember-core bumped to >= 0.72.0
|
|
40
|
+
- remember-mcp version bumped to 4.0.0
|
|
41
|
+
- CHANGELOG updated with breaking change documentation
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Success Criteria
|
|
46
|
+
|
|
47
|
+
- [ ] `trust` parameter absent from create/update tool schemas
|
|
48
|
+
- [ ] `remember_request_set_trust_level` tool registered and functional
|
|
49
|
+
- [ ] `remember_confirm` / `remember_deny` accept optional `secret_token`
|
|
50
|
+
- [ ] All trust scale references updated to 1-5 integer
|
|
51
|
+
- [ ] remember-core >= 0.72.0 installed
|
|
52
|
+
- [ ] All existing tests updated and passing
|
|
53
|
+
- [ ] Version 4.0.0 with CHANGELOG entry
|
|
54
|
+
- [ ] TypeScript compiles without errors
|
|
55
|
+
- [ ] Build successful
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Key Files to Create
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
src/
|
|
63
|
+
├── tools/
|
|
64
|
+
│ └── request-set-trust-level.ts (new tool)
|
|
65
|
+
│ └── request-set-trust-level.spec.ts (new tests)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Key Files to Modify
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
src/
|
|
72
|
+
├── tools/
|
|
73
|
+
│ ├── create-memory.ts (remove trust param)
|
|
74
|
+
│ ├── update-memory.ts (remove trust param)
|
|
75
|
+
│ ├── create-internal-memory.ts (remove trust param)
|
|
76
|
+
│ ├── update-internal-memory.ts (remove trust param)
|
|
77
|
+
│ ├── confirm.ts (add secret_token)
|
|
78
|
+
│ ├── deny.ts (add secret_token)
|
|
79
|
+
│ └── *.spec.ts (update tests)
|
|
80
|
+
├── server.ts (register new tool)
|
|
81
|
+
├── server-factory.ts (register new tool)
|
|
82
|
+
├── services/trust-validator.ts (update to 1-5 scale)
|
|
83
|
+
├── types/memory.ts (remove trust from interfaces)
|
|
84
|
+
package.json (bump versions)
|
|
85
|
+
CHANGELOG.md (breaking change entry)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Tasks
|
|
91
|
+
|
|
92
|
+
1. [Task 525: Remove trust from create/update tools](../tasks/milestone-23-trust-level-protection/task-525-remove-trust-from-create-update.md) — Remove trust parameter from 4 MCP tool schemas and handlers
|
|
93
|
+
2. [Task 526: Add remember_request_set_trust_level tool](../tasks/milestone-23-trust-level-protection/task-526-add-request-set-trust-level-tool.md) — New two-phase trust change MCP tool
|
|
94
|
+
3. [Task 527: Update confirm/deny for secret_token](../tasks/milestone-23-trust-level-protection/task-527-update-confirm-deny-secret-token.md) — Add optional secret_token to confirm/deny tools
|
|
95
|
+
4. [Task 528: Update trust scale references](../tasks/milestone-23-trust-level-protection/task-528-update-trust-scale-references.md) — 0-1 float → 1-5 integer across codebase
|
|
96
|
+
5. [Task 529: Version bump and release](../tasks/milestone-23-trust-level-protection/task-529-version-bump-and-release.md) — Bump remember-core, version 4.0.0, CHANGELOG, tests
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Testing Requirements
|
|
101
|
+
|
|
102
|
+
- [ ] Unit tests for new request-set-trust-level tool
|
|
103
|
+
- [ ] Updated tests for create/update tools (trust param removed)
|
|
104
|
+
- [ ] Updated tests for confirm/deny (secret_token param)
|
|
105
|
+
- [ ] Trust validator tests updated for 1-5 scale
|
|
106
|
+
- [ ] All existing tests passing
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Risks and Mitigation
|
|
111
|
+
|
|
112
|
+
| Risk | Impact | Probability | Mitigation Strategy |
|
|
113
|
+
|------|--------|-------------|---------------------|
|
|
114
|
+
| remember-core 0.72.0 not yet published to npm | High | Low | Check npm registry; if not published, install from local path |
|
|
115
|
+
| Downstream consumers break on trust removal | Medium | High | Major version bump (4.0.0) signals breaking change |
|
|
116
|
+
| ConfirmationGuardService optional — unclear when to wire | Low | Medium | Keep guard optional in remember-mcp, document when to enable |
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
**Next Milestone**: TBD
|
|
121
|
+
**Blockers**: remember-core >= 0.72.0 must be available
|
|
122
|
+
**Notes**: This milestone aligns remember-mcp with remember-core's trust philosophy: trust is a sensitive setting that should require explicit user confirmation to change, not be silently set during memory creation.
|
package/agent/progress.yaml
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
project:
|
|
4
4
|
name: remember-mcp
|
|
5
|
-
version:
|
|
5
|
+
version: 4.0.0
|
|
6
6
|
started: 2026-02-11
|
|
7
7
|
status: in_progress
|
|
8
|
-
current_milestone:
|
|
9
|
-
last_updated: 2026-03-
|
|
8
|
+
current_milestone: M23
|
|
9
|
+
last_updated: 2026-03-20
|
|
10
10
|
|
|
11
11
|
milestones:
|
|
12
12
|
- id: M1
|
|
@@ -419,6 +419,22 @@ milestones:
|
|
|
419
419
|
See: agent/milestones/milestone-22-admin-debugging-tools.md
|
|
420
420
|
Design: agent/design/local.admin-debugging-tools.md
|
|
421
421
|
|
|
422
|
+
- id: M23
|
|
423
|
+
name: Trust Level Protection (Breaking)
|
|
424
|
+
status: completed
|
|
425
|
+
progress: 100%
|
|
426
|
+
started: 2026-03-20
|
|
427
|
+
completed: 2026-03-20
|
|
428
|
+
estimated_weeks: 1
|
|
429
|
+
tasks_completed: 5
|
|
430
|
+
tasks_total: 5
|
|
431
|
+
file: agent/milestones/milestone-23-trust-level-protection.md
|
|
432
|
+
notes: |
|
|
433
|
+
Align with remember-core M80 trust level protection.
|
|
434
|
+
Remove trust from create/update, add requestSetTrustLevel confirmation flow,
|
|
435
|
+
update trust scale 0-1 → 1-5, secret_token on confirm/deny.
|
|
436
|
+
Major breaking version: 3.x → 4.0.0.
|
|
437
|
+
|
|
422
438
|
tasks:
|
|
423
439
|
milestone_1:
|
|
424
440
|
- id: task-1
|
|
@@ -2556,3 +2572,80 @@ task_20_completion:
|
|
|
2556
2572
|
✅ detect_weaviate_drift (expected vs actual schema comparison per collection)
|
|
2557
2573
|
✅ 10 unit tests, 497 total tests
|
|
2558
2574
|
✅ CHANGELOG, README updated
|
|
2575
|
+
|
|
2576
|
+
milestone_23:
|
|
2577
|
+
- id: task-525
|
|
2578
|
+
name: Remove Trust from Create/Update Tools
|
|
2579
|
+
status: completed
|
|
2580
|
+
file: agent/tasks/milestone-23-trust-level-protection/task-525-remove-trust-from-create-update.md
|
|
2581
|
+
estimated_hours: 2-3
|
|
2582
|
+
started: 2026-03-20T10:00:00Z
|
|
2583
|
+
completed_date: 2026-03-20T10:30:00Z
|
|
2584
|
+
actual_hours: 0.5
|
|
2585
|
+
notes: |
|
|
2586
|
+
✅ Removed trust from create-memory, update-memory, create-internal-memory, update-internal-memory
|
|
2587
|
+
✅ Updated tool description to reference remember_request_set_trust_level
|
|
2588
|
+
✅ Updated create-memory.spec.ts (trust no longer in schema)
|
|
2589
|
+
✅ 502 tests passing
|
|
2590
|
+
|
|
2591
|
+
- id: task-526
|
|
2592
|
+
name: Add remember_request_set_trust_level Tool
|
|
2593
|
+
status: completed
|
|
2594
|
+
file: agent/tasks/milestone-23-trust-level-protection/task-526-add-request-set-trust-level-tool.md
|
|
2595
|
+
estimated_hours: 3-4
|
|
2596
|
+
dependencies: [task-525]
|
|
2597
|
+
started: 2026-03-20T10:30:00Z
|
|
2598
|
+
completed_date: 2026-03-20T11:00:00Z
|
|
2599
|
+
actual_hours: 0.5
|
|
2600
|
+
notes: |
|
|
2601
|
+
✅ Created request-set-trust-level.ts with tool and handler
|
|
2602
|
+
✅ Registered in server.ts and server-factory.ts
|
|
2603
|
+
✅ 7 tests (schema validation, valid request, invalid trust levels)
|
|
2604
|
+
✅ 510 tests passing
|
|
2605
|
+
|
|
2606
|
+
- id: task-527
|
|
2607
|
+
name: Update Confirm/Deny for Secret Token
|
|
2608
|
+
status: completed
|
|
2609
|
+
file: agent/tasks/milestone-23-trust-level-protection/task-527-update-confirm-deny-secret-token.md
|
|
2610
|
+
estimated_hours: 2-3
|
|
2611
|
+
started: 2026-03-20T10:00:00Z
|
|
2612
|
+
completed_date: 2026-03-20T10:30:00Z
|
|
2613
|
+
actual_hours: 0.5
|
|
2614
|
+
notes: |
|
|
2615
|
+
✅ Added secret_token to confirm and deny tool schemas
|
|
2616
|
+
✅ Added set_trust_level action handler in confirm tool
|
|
2617
|
+
✅ Created confirm.spec.ts (3 tests) and deny.spec.ts (2 tests)
|
|
2618
|
+
✅ 502 tests passing
|
|
2619
|
+
|
|
2620
|
+
- id: task-528
|
|
2621
|
+
name: Update Trust Scale References
|
|
2622
|
+
status: completed
|
|
2623
|
+
file: agent/tasks/milestone-23-trust-level-protection/task-528-update-trust-scale-references.md
|
|
2624
|
+
estimated_hours: 2-3
|
|
2625
|
+
dependencies: [task-525]
|
|
2626
|
+
started: 2026-03-20T10:30:00Z
|
|
2627
|
+
completed_date: 2026-03-20T11:00:00Z
|
|
2628
|
+
actual_hours: 0.5
|
|
2629
|
+
notes: |
|
|
2630
|
+
✅ trust-validator.ts rewritten for 1-5 integer scale
|
|
2631
|
+
✅ trust-validator.spec.ts updated (all tests pass)
|
|
2632
|
+
✅ search-memory, query-memory trust_min schemas updated
|
|
2633
|
+
✅ ghost-config tool descriptions and schemas updated to 1-5
|
|
2634
|
+
✅ types/memory.ts trust comment updated
|
|
2635
|
+
✅ 510 tests passing
|
|
2636
|
+
|
|
2637
|
+
- id: task-529
|
|
2638
|
+
name: Version Bump and Release
|
|
2639
|
+
status: completed
|
|
2640
|
+
file: agent/tasks/milestone-23-trust-level-protection/task-529-version-bump-and-release.md
|
|
2641
|
+
estimated_hours: 2-3
|
|
2642
|
+
dependencies: [task-525, task-526, task-527, task-528]
|
|
2643
|
+
started: 2026-03-20T11:00:00Z
|
|
2644
|
+
completed_date: 2026-03-20T11:30:00Z
|
|
2645
|
+
actual_hours: 0.5
|
|
2646
|
+
notes: |
|
|
2647
|
+
✅ remember-core updated to 1.0.0 (has requestSetTrustLevel, confirmSetTrustLevel, secret_token)
|
|
2648
|
+
✅ Removed all `as any` casts — proper types now
|
|
2649
|
+
✅ Version bumped to 4.0.0
|
|
2650
|
+
✅ CHANGELOG.md with breaking change documentation
|
|
2651
|
+
✅ 510 tests passing
|
package/agent/tasks/milestone-23-trust-level-protection/task-525-remove-trust-from-create-update.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Task 525: Remove Trust from Create/Update Tools
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M23 — Trust Level Protection](../../milestones/milestone-23-trust-level-protection.md)
|
|
4
|
+
**Status**: Not Started
|
|
5
|
+
**Estimated Time**: 2-3 hours
|
|
6
|
+
**Dependencies**: None
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Objective
|
|
11
|
+
|
|
12
|
+
Remove the `trust` parameter from all MCP tool schemas and handler interfaces that currently allow direct trust assignment on memory creation or update. Trust now defaults to SECRET (5) in remember-core and can only be changed via the confirmation flow.
|
|
13
|
+
|
|
14
|
+
## Context
|
|
15
|
+
|
|
16
|
+
remember-core M80 removed trust from `CreateMemoryInput` and `UpdateMemoryInput`. The MemoryService now hardcodes `trust_score: TrustLevel.SECRET` (5) on creation. Passing trust to core will either be ignored or error. We must remove it from the MCP layer to avoid confusion.
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
|
|
20
|
+
### 1. Update `src/tools/create-memory.ts`
|
|
21
|
+
|
|
22
|
+
- Remove `trust` from the `inputSchema.properties` object (the JSON schema exposed to MCP clients)
|
|
23
|
+
- Remove `trust` from the `CreateMemoryArgs` interface
|
|
24
|
+
- Remove `trust: args.trust` from the object passed to `memoryService.create()`
|
|
25
|
+
- Update the tool description: remove mention of "trust level (access control 0-1)"
|
|
26
|
+
- Add note in description: "Trust defaults to SECRET (level 5). Use `remember_request_set_trust_level` to change trust after creation."
|
|
27
|
+
|
|
28
|
+
### 2. Update `src/tools/update-memory.ts`
|
|
29
|
+
|
|
30
|
+
- Remove `trust` from `inputSchema.properties`
|
|
31
|
+
- Remove `trust` from the `UpdateMemoryArgs` interface
|
|
32
|
+
- Remove `trust: args.trust` from the object passed to `memoryService.update()`
|
|
33
|
+
- Update the tool description: remove mention of trust
|
|
34
|
+
|
|
35
|
+
### 3. Update `src/tools/create-internal-memory.ts`
|
|
36
|
+
|
|
37
|
+
- Remove `trust` from `inputSchema.properties`
|
|
38
|
+
- Remove `trust` from the `CreateInternalMemoryArgs` interface
|
|
39
|
+
- Remove `trust: args.trust` from the object passed to `memoryService.create()`
|
|
40
|
+
|
|
41
|
+
### 4. Update `src/tools/update-internal-memory.ts`
|
|
42
|
+
|
|
43
|
+
- Remove `trust` from `inputSchema.properties`
|
|
44
|
+
- Remove `trust` from the `UpdateInternalMemoryArgs` interface
|
|
45
|
+
- Remove `trust: args.trust` from the object passed to `memoryService.update()`
|
|
46
|
+
|
|
47
|
+
### 5. Update `src/types/memory.ts`
|
|
48
|
+
|
|
49
|
+
- If there's a local `Memory` interface with a `trust` field, keep it (read-only, memories still have trust) but ensure it's typed as `number` (1-5 integer)
|
|
50
|
+
- Remove any local input types that include `trust` for creation/update
|
|
51
|
+
|
|
52
|
+
### 6. Update Tests
|
|
53
|
+
|
|
54
|
+
- `src/tools/create-memory.spec.ts` — remove any test cases that pass `trust` to create
|
|
55
|
+
- `src/tools/update-memory.spec.ts` — remove test cases that pass `trust` to update
|
|
56
|
+
- `src/tools/internal-tools.spec.ts` — update if trust is tested there
|
|
57
|
+
- Verify no test regressions
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Verification
|
|
62
|
+
|
|
63
|
+
- [ ] `trust` not present in create-memory tool schema
|
|
64
|
+
- [ ] `trust` not present in update-memory tool schema
|
|
65
|
+
- [ ] `trust` not present in create-internal-memory tool schema
|
|
66
|
+
- [ ] `trust` not present in update-internal-memory tool schema
|
|
67
|
+
- [ ] Tool descriptions updated to reference new trust flow
|
|
68
|
+
- [ ] All tests pass
|
|
69
|
+
- [ ] TypeScript compiles without errors
|
package/agent/tasks/milestone-23-trust-level-protection/task-526-add-request-set-trust-level-tool.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Task 526: Add remember_request_set_trust_level Tool
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M23 — Trust Level Protection](../../milestones/milestone-23-trust-level-protection.md)
|
|
4
|
+
**Status**: Not Started
|
|
5
|
+
**Estimated Time**: 3-4 hours
|
|
6
|
+
**Dependencies**: [Task 525](task-525-remove-trust-from-create-update.md)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Objective
|
|
11
|
+
|
|
12
|
+
Create a new MCP tool `remember_request_set_trust_level` that initiates a two-phase confirmation flow for changing a memory's trust level. This replaces the removed direct trust setting on create/update.
|
|
13
|
+
|
|
14
|
+
## Context
|
|
15
|
+
|
|
16
|
+
remember-core M80 added `MemoryService.requestSetTrustLevel()` and `MemoryService.confirmSetTrustLevel()`. The request phase creates a confirmation token; the confirm phase (via existing `remember_confirm`) applies the trust change.
|
|
17
|
+
|
|
18
|
+
**API from remember-core:**
|
|
19
|
+
```typescript
|
|
20
|
+
// Phase 1: Request
|
|
21
|
+
interface SetTrustLevelInput {
|
|
22
|
+
memory_id: string;
|
|
23
|
+
trust_level: number; // 1-5 integer (TrustLevel enum)
|
|
24
|
+
}
|
|
25
|
+
interface SetTrustLevelRequestResult {
|
|
26
|
+
token: string;
|
|
27
|
+
memory_id: string;
|
|
28
|
+
requested_trust_level: number;
|
|
29
|
+
current_trust_level: number;
|
|
30
|
+
expires_at: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Phase 2: Confirm (via existing MemoryService.confirmSetTrustLevel(token))
|
|
34
|
+
interface SetTrustLevelConfirmResult {
|
|
35
|
+
memory_id: string;
|
|
36
|
+
previous_trust_level: number;
|
|
37
|
+
new_trust_level: number;
|
|
38
|
+
updated_at: string;
|
|
39
|
+
version: number;
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Steps
|
|
44
|
+
|
|
45
|
+
### 1. Create `src/tools/request-set-trust-level.ts`
|
|
46
|
+
|
|
47
|
+
**Tool schema:**
|
|
48
|
+
```typescript
|
|
49
|
+
{
|
|
50
|
+
name: 'remember_request_set_trust_level',
|
|
51
|
+
description: `Request a trust level change for a memory. Returns a confirmation token.
|
|
52
|
+
|
|
53
|
+
Trust levels (1-5):
|
|
54
|
+
1 = PUBLIC — anyone can see
|
|
55
|
+
2 = INTERNAL — friends/known users
|
|
56
|
+
3 = CONFIDENTIAL — trusted friends
|
|
57
|
+
4 = RESTRICTED — close/intimate contacts
|
|
58
|
+
5 = SECRET — owner only (default for new memories)
|
|
59
|
+
|
|
60
|
+
After requesting, use remember_confirm with the returned token to apply the change.
|
|
61
|
+
Lowering trust (e.g. 5→1) makes the memory MORE visible. Raising trust makes it LESS visible.`,
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {
|
|
65
|
+
memory_id: { type: 'string', description: 'ID of the memory to change trust level for' },
|
|
66
|
+
trust_level: { type: 'integer', description: 'New trust level (1-5)', minimum: 1, maximum: 5 },
|
|
67
|
+
},
|
|
68
|
+
required: ['memory_id', 'trust_level'],
|
|
69
|
+
},
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Handler:**
|
|
74
|
+
- Call `memoryService.requestSetTrustLevel({ memory_id, trust_level })`
|
|
75
|
+
- Return the `SetTrustLevelRequestResult` as JSON
|
|
76
|
+
- Include user-friendly message: "Trust level change requested. Current: {current}, Requested: {requested}. Confirm with token: {token}"
|
|
77
|
+
|
|
78
|
+
### 2. Register Tool in `src/server.ts` and `src/server-factory.ts`
|
|
79
|
+
|
|
80
|
+
- Import the handler
|
|
81
|
+
- Add to tool list and tool call handler switch
|
|
82
|
+
|
|
83
|
+
### 3. Handle Confirmation in Existing Flow
|
|
84
|
+
|
|
85
|
+
The `remember_confirm` tool already handles confirmation tokens. When the confirmed request has `action: 'set_trust_level'`, the core service calls `confirmSetTrustLevel(token)` internally. Verify this works end-to-end:
|
|
86
|
+
|
|
87
|
+
- Check if SpaceService.confirm() or MemoryService handles this action type
|
|
88
|
+
- If the existing confirm flow doesn't route to `confirmSetTrustLevel`, we need to add routing logic in the confirm handler
|
|
89
|
+
|
|
90
|
+
### 4. Create Tests `src/tools/request-set-trust-level.spec.ts`
|
|
91
|
+
|
|
92
|
+
Test cases:
|
|
93
|
+
- Successful trust level change request (returns token)
|
|
94
|
+
- Invalid trust level (0, 6, 1.5) returns error
|
|
95
|
+
- Missing memory_id returns error
|
|
96
|
+
- Missing trust_level returns error
|
|
97
|
+
- Mock memoryService.requestSetTrustLevel behavior
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Verification
|
|
102
|
+
|
|
103
|
+
- [ ] `remember_request_set_trust_level` tool registered and visible in tool list
|
|
104
|
+
- [ ] Returns confirmation token on valid request
|
|
105
|
+
- [ ] Rejects invalid trust levels
|
|
106
|
+
- [ ] Confirmation via `remember_confirm` applies the trust change
|
|
107
|
+
- [ ] Tests passing
|
|
108
|
+
- [ ] TypeScript compiles without errors
|
package/agent/tasks/milestone-23-trust-level-protection/task-527-update-confirm-deny-secret-token.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Task 527: Update Confirm/Deny for Secret Token
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M23 — Trust Level Protection](../../milestones/milestone-23-trust-level-protection.md)
|
|
4
|
+
**Status**: Not Started
|
|
5
|
+
**Estimated Time**: 2-3 hours
|
|
6
|
+
**Dependencies**: None
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Objective
|
|
11
|
+
|
|
12
|
+
Add optional `secret_token` parameter to `remember_confirm` and `remember_deny` MCP tools to support the ConfirmationGuardService's HMAC challenge when enabled.
|
|
13
|
+
|
|
14
|
+
## Context
|
|
15
|
+
|
|
16
|
+
remember-core 0.72.0 adds `ConfirmationGuardService` — a two-layer protection preventing agents from auto-confirming sensitive operations. When enabled:
|
|
17
|
+
|
|
18
|
+
1. `ConfirmInput` and `DenyInput` accept optional `secret_token`
|
|
19
|
+
2. If guard is configured on SpaceService, `secret_token` is required
|
|
20
|
+
3. Invalid secret triggers exponential backoff (cooldown)
|
|
21
|
+
4. After 5 failures, token is permanently expired
|
|
22
|
+
|
|
23
|
+
The guard is optional — when not configured, confirm/deny work as before. The MCP tools should accept `secret_token` but not require it.
|
|
24
|
+
|
|
25
|
+
## Steps
|
|
26
|
+
|
|
27
|
+
### 1. Update `src/tools/confirm.ts`
|
|
28
|
+
|
|
29
|
+
- Add `secret_token` to inputSchema properties:
|
|
30
|
+
```typescript
|
|
31
|
+
secret_token: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'HMAC secret token for guard-protected operations. Required when confirmation guard is enabled.',
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
- Pass `secret_token` to `spaceService.confirm({ token, secret_token })`
|
|
37
|
+
- Update tool description to mention secret_token is optional and only needed when guard is enabled
|
|
38
|
+
- Handle guard-specific errors: cooldown messages, backoff info, max attempts exceeded
|
|
39
|
+
|
|
40
|
+
### 2. Update `src/tools/deny.ts`
|
|
41
|
+
|
|
42
|
+
- Same changes as confirm: add `secret_token` to schema and pass through
|
|
43
|
+
- Pass `secret_token` to `spaceService.deny({ token, secret_token })`
|
|
44
|
+
|
|
45
|
+
### 3. Update Tests
|
|
46
|
+
|
|
47
|
+
- `src/tools/confirm.spec.ts` — add test for passing secret_token through
|
|
48
|
+
- `src/tools/deny.spec.ts` — add test for passing secret_token through
|
|
49
|
+
- Test that missing secret_token still works (guard not configured scenario)
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Verification
|
|
54
|
+
|
|
55
|
+
- [ ] `remember_confirm` accepts optional `secret_token` parameter
|
|
56
|
+
- [ ] `remember_deny` accepts optional `secret_token` parameter
|
|
57
|
+
- [ ] secret_token passed through to core service calls
|
|
58
|
+
- [ ] Existing confirm/deny behavior unchanged when secret_token not provided
|
|
59
|
+
- [ ] Tests passing
|
|
60
|
+
- [ ] TypeScript compiles without errors
|
package/agent/tasks/milestone-23-trust-level-protection/task-528-update-trust-scale-references.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Task 528: Update Trust Scale References
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M23 — Trust Level Protection](../../milestones/milestone-23-trust-level-protection.md)
|
|
4
|
+
**Status**: Not Started
|
|
5
|
+
**Estimated Time**: 2-3 hours
|
|
6
|
+
**Dependencies**: [Task 525](task-525-remove-trust-from-create-update.md)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Objective
|
|
11
|
+
|
|
12
|
+
Update all references to the trust scale from the legacy 0-1 float to the new 1-5 integer scale across tool descriptions, validators, types, and tests.
|
|
13
|
+
|
|
14
|
+
## Context
|
|
15
|
+
|
|
16
|
+
remember-core migrated trust from a 0-1 float to a 1-5 integer enum:
|
|
17
|
+
- 1 = PUBLIC
|
|
18
|
+
- 2 = INTERNAL
|
|
19
|
+
- 3 = CONFIDENTIAL
|
|
20
|
+
- 4 = RESTRICTED
|
|
21
|
+
- 5 = SECRET
|
|
22
|
+
|
|
23
|
+
The old scale (0 = no trust, 1 = full trust) is inverted from the new scale (1 = most visible, 5 = most restricted). All MCP tool descriptions, local validators, and types must be updated.
|
|
24
|
+
|
|
25
|
+
## Steps
|
|
26
|
+
|
|
27
|
+
### 1. Update Tool Descriptions
|
|
28
|
+
|
|
29
|
+
Search all `src/tools/*.ts` for trust references in tool descriptions. Key files:
|
|
30
|
+
- `search-memory.ts` — trust filter descriptions
|
|
31
|
+
- `query-memory.ts` — trust filter descriptions
|
|
32
|
+
- `search-by.ts` — trust filter
|
|
33
|
+
- `search-internal-memory-by.ts` — trust filter
|
|
34
|
+
- `search-space-by.ts` — trust references
|
|
35
|
+
- `get-core.ts` — trust in output descriptions
|
|
36
|
+
- `ghost-config.ts` — trust level descriptions
|
|
37
|
+
- `set-preference.ts` — trust-related preferences
|
|
38
|
+
|
|
39
|
+
Update descriptions from "0-1" to "1-5 integer" with the level names.
|
|
40
|
+
|
|
41
|
+
### 2. Update `src/services/trust-validator.ts`
|
|
42
|
+
|
|
43
|
+
This local file may still reference the 0-1 scale. Check if it's still used or if remember-core's `validateTrustAssignment` / `suggestTrustLevel` have replaced it. If local, update to 1-5 scale. If duplicated from core, remove and import from core.
|
|
44
|
+
|
|
45
|
+
### 3. Update `src/services/trust-validator.spec.ts`
|
|
46
|
+
|
|
47
|
+
Update test expectations to match 1-5 scale.
|
|
48
|
+
|
|
49
|
+
### 4. Update `src/types/memory.ts`
|
|
50
|
+
|
|
51
|
+
- Update any `trust` field type annotations or comments from "0-1" to "1-5 integer"
|
|
52
|
+
- If there are local TrustLevel constants, replace with imports from remember-core
|
|
53
|
+
|
|
54
|
+
### 5. Update Search Filter Schemas
|
|
55
|
+
|
|
56
|
+
Any tool that accepts `min_trust` or `max_trust` filters:
|
|
57
|
+
- Update `minimum`/`maximum` from 0/1 to 1/5
|
|
58
|
+
- Update descriptions to reference integer scale
|
|
59
|
+
|
|
60
|
+
### 6. Update Tests
|
|
61
|
+
|
|
62
|
+
- Update any test assertions that use 0-1 trust values to use 1-5
|
|
63
|
+
- Update test data generators if they produce trust values
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Verification
|
|
68
|
+
|
|
69
|
+
- [ ] No references to "0-1" trust scale in tool descriptions
|
|
70
|
+
- [ ] All trust filter schemas use minimum: 1, maximum: 5
|
|
71
|
+
- [ ] Trust validator uses 1-5 scale
|
|
72
|
+
- [ ] All tests pass with updated trust values
|
|
73
|
+
- [ ] TypeScript compiles without errors
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Task 529: Version Bump and Release
|
|
2
|
+
|
|
3
|
+
**Milestone**: [M23 — Trust Level Protection](../../milestones/milestone-23-trust-level-protection.md)
|
|
4
|
+
**Status**: Not Started
|
|
5
|
+
**Estimated Time**: 2-3 hours
|
|
6
|
+
**Dependencies**: [Task 525](task-525-remove-trust-from-create-update.md), [Task 526](task-526-add-request-set-trust-level-tool.md), [Task 527](task-527-update-confirm-deny-secret-token.md), [Task 528](task-528-update-trust-scale-references.md)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Objective
|
|
11
|
+
|
|
12
|
+
Update remember-core dependency to >= 0.72.0, bump remember-mcp to 4.0.0 (major breaking), update CHANGELOG, ensure all tests pass.
|
|
13
|
+
|
|
14
|
+
## Context
|
|
15
|
+
|
|
16
|
+
This is a major version bump because:
|
|
17
|
+
- `trust` parameter removed from create/update tools (breaking for any consumer passing trust)
|
|
18
|
+
- Trust scale changed from 0-1 to 1-5 (breaking for any consumer interpreting trust values)
|
|
19
|
+
- New tool added (non-breaking but part of the release)
|
|
20
|
+
|
|
21
|
+
## Steps
|
|
22
|
+
|
|
23
|
+
### 1. Update remember-core Dependency
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm i @prmichaelsen/remember-core@latest
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Verify the installed version is >= 0.72.0.
|
|
30
|
+
|
|
31
|
+
### 2. Version Bump
|
|
32
|
+
|
|
33
|
+
Update `package.json` version from current to `4.0.0`.
|
|
34
|
+
|
|
35
|
+
### 3. Update CHANGELOG.md
|
|
36
|
+
|
|
37
|
+
Add entry:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
## [4.0.0] - 2026-03-20
|
|
41
|
+
|
|
42
|
+
### BREAKING CHANGES
|
|
43
|
+
- **Trust removed from create/update**: `trust` parameter removed from `remember_create_memory`, `remember_update_memory`, `remember_create_internal_memory`, `remember_update_internal_memory`. Trust now defaults to SECRET (5) on creation.
|
|
44
|
+
- **Trust scale changed**: All trust references updated from 0-1 float to 1-5 integer scale (1=PUBLIC, 2=INTERNAL, 3=CONFIDENTIAL, 4=RESTRICTED, 5=SECRET).
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
- `remember_request_set_trust_level` tool — two-phase confirmation flow to change a memory's trust level
|
|
48
|
+
- `secret_token` optional parameter on `remember_confirm` and `remember_deny` for ConfirmationGuardService support
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
- Updated `@prmichaelsen/remember-core` to >= 0.72.0
|
|
52
|
+
- Trust filter schemas updated to integer 1-5 range
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 4. Update README.md
|
|
56
|
+
|
|
57
|
+
- Update tool count if changed
|
|
58
|
+
- Update tool listing to include `remember_request_set_trust_level`
|
|
59
|
+
- Update any trust-related documentation
|
|
60
|
+
|
|
61
|
+
### 5. Run Full Test Suite
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm test
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Fix any remaining test failures.
|
|
68
|
+
|
|
69
|
+
### 6. Build Verification
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm run build
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Ensure clean build with no TypeScript errors.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Verification
|
|
80
|
+
|
|
81
|
+
- [ ] remember-core >= 0.72.0 installed
|
|
82
|
+
- [ ] package.json version is 4.0.0
|
|
83
|
+
- [ ] CHANGELOG.md has 4.0.0 entry with breaking changes documented
|
|
84
|
+
- [ ] README.md updated
|
|
85
|
+
- [ ] All tests pass
|
|
86
|
+
- [ ] Build succeeds
|
|
87
|
+
- [ ] TypeScript compiles without errors
|