mcp-task-server 0.3.0 → 1.1.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/README.md +146 -73
- package/dist/context.d.ts +5 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +28 -10
- package/dist/context.js.map +1 -1
- package/dist/index.js +481 -350
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,6 +49,21 @@ For explicit control, add to `.cursor/mcp.json` in your project:
|
|
|
49
49
|
|
|
50
50
|
After adding, reload Cursor: `Cmd+Shift+P` → "Developer: Reload Window"
|
|
51
51
|
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
Invoke any tool with `call <tool_name>`:
|
|
55
|
+
|
|
56
|
+
| Command | Description |
|
|
57
|
+
|---------|-------------|
|
|
58
|
+
| `call help` | List all 27 available tools |
|
|
59
|
+
| `call list_tasks` | Show all tasks |
|
|
60
|
+
| `call next_task` | Get recommended next task |
|
|
61
|
+
| `call diagnose` | Check server configuration |
|
|
62
|
+
| `call show_memory` | View shared context memories |
|
|
63
|
+
| `call init_project` | Initialise project structure |
|
|
64
|
+
|
|
65
|
+
**Why `call`?** Using just `help` may trigger Cursor's generic help. The `call` prefix ensures the MCP tool is invoked.
|
|
66
|
+
|
|
52
67
|
---
|
|
53
68
|
|
|
54
69
|
```mermaid
|
|
@@ -58,7 +73,7 @@ flowchart TB
|
|
|
58
73
|
end
|
|
59
74
|
|
|
60
75
|
subgraph MCP Task Server
|
|
61
|
-
B[
|
|
76
|
+
B[27 Tools]
|
|
62
77
|
C[Preferences Engine]
|
|
63
78
|
end
|
|
64
79
|
|
|
@@ -78,7 +93,7 @@ flowchart TB
|
|
|
78
93
|
|
|
79
94
|
## Features
|
|
80
95
|
|
|
81
|
-
- **
|
|
96
|
+
- **27 MCP Tools**: Comprehensive task management and coordination
|
|
82
97
|
- **Auto Workspace Detection**: Works globally without per-project config
|
|
83
98
|
- **Multi-Agent Coordination**: Support for Planner, Worker, and Judge roles
|
|
84
99
|
- **Dependency Tracking**: Tasks can depend on other tasks
|
|
@@ -92,13 +107,13 @@ flowchart TB
|
|
|
92
107
|
|
|
93
108
|
```bash
|
|
94
109
|
# Add to a new project and initialise
|
|
95
|
-
init_project({ project_name: "my-app" })
|
|
110
|
+
call init_project({ project_name: "my-app" })
|
|
96
111
|
|
|
97
112
|
# Add your first task
|
|
98
|
-
add_task({ title: "Set up development environment" })
|
|
113
|
+
call add_task({ title: "Set up development environment" })
|
|
99
114
|
|
|
100
115
|
# Get recommended next task
|
|
101
|
-
next_task
|
|
116
|
+
call next_task
|
|
102
117
|
```
|
|
103
118
|
|
|
104
119
|
## Shared Context & Preferences
|
|
@@ -140,30 +155,73 @@ flowchart TB
|
|
|
140
155
|
|
|
141
156
|
### Syncing Cursor Memories
|
|
142
157
|
|
|
143
|
-
The `sync` action
|
|
158
|
+
The `sync` action transfers memories from Cursor to shared context, preserving IDs:
|
|
144
159
|
|
|
145
160
|
```mermaid
|
|
146
161
|
flowchart TD
|
|
147
|
-
A[Agent sees Cursor memory] --> B["update_memory(action: sync)"]
|
|
148
|
-
B --> C{
|
|
162
|
+
A["Agent sees Cursor memory (ID: 13502615)"] --> B["update_memory(action: sync, id: 13502615)"]
|
|
163
|
+
B --> C{ID or title exists?}
|
|
149
164
|
C -->|Yes| D[Update existing memory]
|
|
150
|
-
C -->|No| E[Create
|
|
165
|
+
C -->|No| E[Create with Cursor ID]
|
|
151
166
|
D --> F[Save to shared-context.json]
|
|
152
167
|
E --> F
|
|
153
168
|
```
|
|
154
169
|
|
|
155
|
-
|
|
170
|
+
Always include the Cursor memory ID to keep IDs consistent:
|
|
156
171
|
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
update_memory({
|
|
160
|
-
action: "sync",
|
|
172
|
+
```bash
|
|
173
|
+
# Sync with Cursor ID (recommended)
|
|
174
|
+
call update_memory({
|
|
175
|
+
action: "sync",
|
|
176
|
+
id: "13502615", # Cursor's memory ID
|
|
161
177
|
title: "Writing preferences",
|
|
162
178
|
content: "British English, ISO dates, no emojis..."
|
|
163
179
|
})
|
|
164
|
-
|
|
180
|
+
# Returns: { status: "synced_existing", memory: { id: "13502615", ... } }
|
|
165
181
|
```
|
|
166
182
|
|
|
183
|
+
### Why Shared Context Exists
|
|
184
|
+
|
|
185
|
+
Cursor's memory system has limitations that make shared context necessary:
|
|
186
|
+
|
|
187
|
+
```mermaid
|
|
188
|
+
flowchart TB
|
|
189
|
+
subgraph cursor [Cursor IDE]
|
|
190
|
+
A[AI Assistant]
|
|
191
|
+
B[Internal Memory DB]
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
subgraph mcp [MCP Server]
|
|
195
|
+
C[Task Tools]
|
|
196
|
+
D[Memory Tools]
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
subgraph problem [The Problem]
|
|
200
|
+
E["AI can READ Cursor memories"]
|
|
201
|
+
F["MCP cannot ACCESS Cursor memories"]
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
A -->|can see| B
|
|
205
|
+
A -->|can call| C
|
|
206
|
+
C -.-x|no access| B
|
|
207
|
+
|
|
208
|
+
E --> G[Need bridge]
|
|
209
|
+
F --> G
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
| Cursor Memory Limitation | Impact | Solution |
|
|
213
|
+
|-------------------------|--------|----------|
|
|
214
|
+
| No API access | MCP tools can't read Cursor's memory database | `~/.cursor/shared-context.json` as shared store |
|
|
215
|
+
| Isolated per conversation | Memories don't persist across all contexts | Shared file accessible to all MCP servers |
|
|
216
|
+
| No programmatic sync | Can't auto-export memories | `update_memory` sync action with Cursor ID |
|
|
217
|
+
| Different ID systems | Cursor IDs vs generated IDs cause duplicates | Pass Cursor ID to sync to preserve consistency |
|
|
218
|
+
|
|
219
|
+
**Workflow:**
|
|
220
|
+
1. Cursor creates a memory (you see it in chat with ID like `13502615`)
|
|
221
|
+
2. Ask agent to sync it: `update_memory({ action: "sync", id: "13502615", title: "...", content: "..." })`
|
|
222
|
+
3. Memory saved to `~/.cursor/shared-context.json` with same ID
|
|
223
|
+
4. All MCP servers can now read it
|
|
224
|
+
|
|
167
225
|
### Where Preferences Are Used
|
|
168
226
|
|
|
169
227
|
| Tool Type | How Preferences Are Applied |
|
|
@@ -176,15 +234,15 @@ update_memory({
|
|
|
176
234
|
|
|
177
235
|
Validate files against your preferences:
|
|
178
236
|
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
check_compliance({ path: "README.md" })
|
|
237
|
+
```bash
|
|
238
|
+
# Review only
|
|
239
|
+
call check_compliance({ path: "README.md" })
|
|
182
240
|
|
|
183
|
-
|
|
184
|
-
check_compliance({ path: "docs/" })
|
|
241
|
+
# Review a folder
|
|
242
|
+
call check_compliance({ path: "docs/" })
|
|
185
243
|
|
|
186
|
-
|
|
187
|
-
check_compliance({ path: "README.md", fix: true })
|
|
244
|
+
# Review and fix issues
|
|
245
|
+
call check_compliance({ path: "README.md", fix: true })
|
|
188
246
|
```
|
|
189
247
|
|
|
190
248
|
See [agent-kit/SHARED_CONTEXT.md](agent-kit/SHARED_CONTEXT.md) for full setup and usage.
|
|
@@ -240,11 +298,11 @@ flowchart TD
|
|
|
240
298
|
|
|
241
299
|
### Debugging
|
|
242
300
|
|
|
243
|
-
Run `get_version` to see how the workspace was detected:
|
|
301
|
+
Run `call get_version` to see how the workspace was detected:
|
|
244
302
|
|
|
245
|
-
```
|
|
246
|
-
get_version
|
|
247
|
-
|
|
303
|
+
```bash
|
|
304
|
+
call get_version
|
|
305
|
+
# Returns: { workspace: { root: "/path/to/project", source: "found .git" } }
|
|
248
306
|
```
|
|
249
307
|
|
|
250
308
|
Possible sources:
|
|
@@ -350,15 +408,15 @@ This architecture scales well for complex projects with many tasks and subtasks.
|
|
|
350
408
|
|------|-------------|
|
|
351
409
|
| `init_project` | Initialise project with agent-kit, memory_bank, and cursor rules |
|
|
352
410
|
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
init_project
|
|
411
|
+
```bash
|
|
412
|
+
# Initialise with auto-detected project name
|
|
413
|
+
call init_project
|
|
356
414
|
|
|
357
|
-
|
|
358
|
-
init_project({ project_name: "my-app" })
|
|
415
|
+
# Initialise with custom name
|
|
416
|
+
call init_project({ project_name: "my-app" })
|
|
359
417
|
|
|
360
|
-
|
|
361
|
-
init_project({ force: true })
|
|
418
|
+
# Force overwrite existing files
|
|
419
|
+
call init_project({ force: true })
|
|
362
420
|
```
|
|
363
421
|
|
|
364
422
|
### Core Tools
|
|
@@ -406,57 +464,72 @@ init_project({ force: true })
|
|
|
406
464
|
|
|
407
465
|
| Tool | Description |
|
|
408
466
|
|------|-------------|
|
|
409
|
-
| `
|
|
467
|
+
| `help` | List all available tools with descriptions and parameters |
|
|
468
|
+
| `get_version` | Get server version and workspace detection info |
|
|
469
|
+
| `diagnose` | Diagnose MCP configuration, paths, and workspace detection |
|
|
410
470
|
| `show_memory` | Show shared context memories from `~/.cursor/shared-context.json` |
|
|
411
|
-
| `update_memory` | Create, update, sync, or delete memories
|
|
471
|
+
| `update_memory` | Create, update, sync, or delete memories (sync preserves Cursor IDs) |
|
|
412
472
|
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
473
|
+
```bash
|
|
474
|
+
# List all tools
|
|
475
|
+
call help
|
|
476
|
+
# Returns: { server, version, usage, tool_count: 27, tools: [...] }
|
|
417
477
|
|
|
418
|
-
|
|
419
|
-
|
|
478
|
+
# Get help for specific tool
|
|
479
|
+
call help({ tool: "update_memory" })
|
|
480
|
+
# Returns: { name, description, usage: "call update_memory", parameters: {...} }
|
|
420
481
|
|
|
421
|
-
|
|
422
|
-
|
|
482
|
+
# Check version and workspace
|
|
483
|
+
call get_version
|
|
484
|
+
# Returns: { version: "x.x.x", workspace: { root: "/path", source: "found .git" } }
|
|
423
485
|
|
|
424
|
-
|
|
425
|
-
|
|
486
|
+
# Diagnose configuration
|
|
487
|
+
call diagnose # Basic info
|
|
488
|
+
call diagnose({ verbose: true }) # Include env vars and file checks
|
|
426
489
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
})
|
|
490
|
+
# Show all memories
|
|
491
|
+
call show_memory
|
|
492
|
+
|
|
493
|
+
# Search for specific memories
|
|
494
|
+
call show_memory({ search: "writing" })
|
|
433
495
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
496
|
+
# Force reload from file (clears cache)
|
|
497
|
+
call show_memory({ reload: true })
|
|
498
|
+
|
|
499
|
+
# Sync a Cursor memory (preserves Cursor ID)
|
|
500
|
+
call update_memory({
|
|
501
|
+
action: "sync",
|
|
502
|
+
id: "13502615", # Cursor's memory ID
|
|
437
503
|
title: "Writing preferences",
|
|
438
504
|
content: "British English, ISO dates, no emojis..."
|
|
439
505
|
})
|
|
440
506
|
|
|
441
|
-
|
|
442
|
-
update_memory({
|
|
507
|
+
# Create a new memory (generates ID)
|
|
508
|
+
call update_memory({
|
|
509
|
+
action: "create",
|
|
510
|
+
title: "Project conventions",
|
|
511
|
+
content: "Use TypeScript strict mode."
|
|
512
|
+
})
|
|
513
|
+
|
|
514
|
+
# Update an existing memory by ID
|
|
515
|
+
call update_memory({
|
|
443
516
|
action: "update",
|
|
444
|
-
id: "
|
|
517
|
+
id: "13502615",
|
|
445
518
|
title: "Writing preferences",
|
|
446
519
|
content: "Updated content..."
|
|
447
520
|
})
|
|
448
521
|
|
|
449
|
-
|
|
450
|
-
update_memory({ action: "delete", id: "
|
|
522
|
+
# Delete a memory
|
|
523
|
+
call update_memory({ action: "delete", id: "13502615" })
|
|
451
524
|
|
|
452
|
-
|
|
453
|
-
analyse_project
|
|
525
|
+
# Analyse project and get suggestions for memory_bank
|
|
526
|
+
call analyse_project
|
|
454
527
|
|
|
455
|
-
|
|
456
|
-
analyse_project({ focus: "tech" })
|
|
457
|
-
analyse_project({ focus: "brief" })
|
|
458
|
-
analyse_project({ focus: "active" })
|
|
459
|
-
analyse_project({ focus: "architecture" })
|
|
528
|
+
# Focus on specific area
|
|
529
|
+
call analyse_project({ focus: "tech" }) # Just tech stack
|
|
530
|
+
call analyse_project({ focus: "brief" }) # Just project brief
|
|
531
|
+
call analyse_project({ focus: "active" }) # Just current focus
|
|
532
|
+
call analyse_project({ focus: "architecture" }) # Just architecture
|
|
460
533
|
```
|
|
461
534
|
|
|
462
535
|
## Multi-Agent Mode
|
|
@@ -480,21 +553,21 @@ The server supports three agent roles:
|
|
|
480
553
|
- Approves or rejects with feedback
|
|
481
554
|
- Cannot claim or modify tasks
|
|
482
555
|
|
|
483
|
-
###
|
|
556
|
+
### Example
|
|
484
557
|
|
|
485
|
-
```
|
|
486
|
-
|
|
487
|
-
add_task({ title: "Build login page" })
|
|
558
|
+
```bash
|
|
559
|
+
# Solo mode (no role required)
|
|
560
|
+
call add_task({ title: "Build login page" })
|
|
488
561
|
|
|
489
|
-
|
|
490
|
-
add_task({
|
|
562
|
+
# Multi-agent mode (explicit identification)
|
|
563
|
+
call add_task({
|
|
491
564
|
title: "Build login page",
|
|
492
565
|
description: "Create a secure login page with form validation",
|
|
493
566
|
agent_id: "planner-1",
|
|
494
567
|
role: "planner"
|
|
495
568
|
})
|
|
496
569
|
|
|
497
|
-
claim_task({
|
|
570
|
+
call claim_task({
|
|
498
571
|
task_id: "5",
|
|
499
572
|
agent_id: "worker-1",
|
|
500
573
|
role: "worker"
|
package/dist/context.d.ts
CHANGED
|
@@ -46,8 +46,12 @@ export declare function upsertMemory(memory: CursorMemory): SharedContext;
|
|
|
46
46
|
/**
|
|
47
47
|
* Add or update a memory by title (case-insensitive match)
|
|
48
48
|
* If a memory with the same title exists, updates it. Otherwise creates new.
|
|
49
|
+
*
|
|
50
|
+
* @param title - Memory title
|
|
51
|
+
* @param content - Memory content
|
|
52
|
+
* @param cursorId - Optional Cursor memory ID to use (preserves original ID from Cursor)
|
|
49
53
|
*/
|
|
50
|
-
export declare function upsertMemoryByTitle(title: string, content: string): {
|
|
54
|
+
export declare function upsertMemoryByTitle(title: string, content: string, cursorId?: string): {
|
|
51
55
|
memory: CursorMemory;
|
|
52
56
|
wasUpdated: boolean;
|
|
53
57
|
};
|
package/dist/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,YAAY,EAAE,CAAC;CACjC;AAID;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,aAAa,GAAG,IAAI,CAgBxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAKxE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAOvD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,IAAI,CAGrD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAI/C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAGtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAW9D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,aAAa,CAiBhE;AAED
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,YAAY,EAAE,CAAC;CACjC;AAID;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,aAAa,GAAG,IAAI,CAgBxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAKxE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAOvD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,IAAI,CAGrD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAI/C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAGtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAW9D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,aAAa,CAiBhE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,GAChB;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAoC/C;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,CAgB5F;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC"}
|
package/dist/context.js
CHANGED
|
@@ -101,20 +101,38 @@ export function upsertMemory(memory) {
|
|
|
101
101
|
/**
|
|
102
102
|
* Add or update a memory by title (case-insensitive match)
|
|
103
103
|
* If a memory with the same title exists, updates it. Otherwise creates new.
|
|
104
|
+
*
|
|
105
|
+
* @param title - Memory title
|
|
106
|
+
* @param content - Memory content
|
|
107
|
+
* @param cursorId - Optional Cursor memory ID to use (preserves original ID from Cursor)
|
|
104
108
|
*/
|
|
105
|
-
export function upsertMemoryByTitle(title, content) {
|
|
109
|
+
export function upsertMemoryByTitle(title, content, cursorId) {
|
|
106
110
|
let ctx = loadSharedContext() || { cursor_memories: [] };
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
// First check if we have a memory with this exact Cursor ID
|
|
112
|
+
if (cursorId) {
|
|
113
|
+
const existingByIdIndex = ctx.cursor_memories.findIndex((m) => m.id === cursorId);
|
|
114
|
+
if (existingByIdIndex >= 0) {
|
|
115
|
+
// Update existing by ID - also update title in case it changed
|
|
116
|
+
ctx.cursor_memories[existingByIdIndex].content = content;
|
|
117
|
+
ctx.cursor_memories[existingByIdIndex].title = title;
|
|
118
|
+
saveSharedContext(ctx);
|
|
119
|
+
return { memory: ctx.cursor_memories[existingByIdIndex], wasUpdated: true };
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// Fall back to case-insensitive title match
|
|
123
|
+
const existingByTitleIndex = ctx.cursor_memories.findIndex((m) => m.title.toLowerCase() === title.toLowerCase());
|
|
124
|
+
if (existingByTitleIndex >= 0) {
|
|
125
|
+
// Update existing - use provided cursorId if available, otherwise keep existing ID
|
|
126
|
+
if (cursorId) {
|
|
127
|
+
ctx.cursor_memories[existingByTitleIndex].id = cursorId;
|
|
128
|
+
}
|
|
129
|
+
ctx.cursor_memories[existingByTitleIndex].content = content;
|
|
130
|
+
ctx.cursor_memories[existingByTitleIndex].title = title;
|
|
113
131
|
saveSharedContext(ctx);
|
|
114
|
-
return { memory: ctx.cursor_memories[
|
|
132
|
+
return { memory: ctx.cursor_memories[existingByTitleIndex], wasUpdated: true };
|
|
115
133
|
}
|
|
116
|
-
// Create new
|
|
117
|
-
const memory = { id: generateMemoryId(), title, content };
|
|
134
|
+
// Create new - use cursorId if provided, otherwise generate
|
|
135
|
+
const memory = { id: cursorId || generateMemoryId(), title, content };
|
|
118
136
|
ctx.cursor_memories.push(memory);
|
|
119
137
|
saveSharedContext(ctx);
|
|
120
138
|
return { memory, wasUpdated: false };
|
package/dist/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAYxE,IAAI,aAAa,GAAyB,IAAI,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,IAAI,aAAa;QAAE,OAAO,aAAa,CAAC;IAExC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,qBAAqB,CAAC,CAAC;IAEtE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;QAC/D,OAAO,aAAa,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,4DAA4D;QAC5D,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,MAAM,GAAG,GAAG,iBAAiB,EAAE,CAAC;IAChC,OAAO,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CACtC,CAAC,CAAC,KAAK,CAAC,WAAW,EA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