mcp-task-server 2.0.0 → 3.0.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 CHANGED
@@ -55,7 +55,7 @@ Invoke any tool with `call <tool_name>`:
55
55
 
56
56
  | Command | Description |
57
57
  |---------|-------------|
58
- | `call help` | List all 27 available tools |
58
+ | `call help` | List all 33 available tools |
59
59
  | `call list_tasks` | Show all tasks |
60
60
  | `call next_task` | Get recommended next task |
61
61
  | `call diagnose` | Check server configuration |
@@ -73,35 +73,44 @@ flowchart TB
73
73
  end
74
74
 
75
75
  subgraph MCP Task Server
76
- B[27 Tools]
76
+ B[33 Tools]
77
77
  C[Preferences Engine]
78
+ P[Project Context]
78
79
  end
79
80
 
80
81
  subgraph Your Machine
81
82
  D[~/.cursor/shared-context.json]
82
83
  E[memory_bank/tasks/]
83
- F[memory_bank/execution/progress.md]
84
+ F[memory_bank/execution/progress*.md]
85
+ G[~/.cursor/content-context.md]
84
86
  end
85
87
 
86
88
  A <-->|MCP Protocol| B
87
89
  B --> C
90
+ B --> P
88
91
  C -->|read/write| D
92
+ P -->|filter tasks| E
89
93
  B -->|read/write| E
90
94
  B -->|auto-sync| F
95
+ B -->|read/write| G
91
96
  D -->|inject into responses| A
92
97
  ```
93
98
 
94
99
  ## Features
95
100
 
96
- - **27 MCP Tools**: Comprehensive task management and coordination
101
+ - **33 MCP Tools**: Comprehensive task management and coordination
102
+ - **Multi-Project Support**: Manage tasks across multiple projects from one workspace with automatic filtering
97
103
  - **Auto Workspace Detection**: Works globally without per-project config
98
104
  - **Multi-Agent Coordination**: Support for Planner, Worker, and Judge roles
99
105
  - **Dependency Tracking**: Tasks can depend on other tasks
100
106
  - **Priority Levels**: Critical, High, Medium, Low
101
- - **Scalable Storage**: Individual task files with JSON registry and markdown summary
107
+ - **Scalable Storage**: Individual task files with JSON registry and per-project markdown summaries
102
108
  - **Prompt-Based Operations**: PRD parsing, task expansion, complexity analysis
103
109
  - **Shared Context**: Reads user preferences from `~/.cursor/shared-context.json` to personalise prompts
104
- - **Project Initialisation**: Scaffolds 22 template files across agent-kit, memory_bank (architecture, context, execution, reference), and cursor rules
110
+ - **Content Context**: Global content inventory at `~/.cursor/content-context.md` for content creators
111
+ - **Project Initialisation**: Scaffolds 27 template files across agent-kit, memory_bank, and cursor rules
112
+ - **Wellness Tracking**: Break reminder system via cursor rules, using session tracking in shared memory
113
+ - **Work Stats Integration**: Fetch activity data from stats dashboard for work/break recommendations
105
114
 
106
115
  ## Quick Start
107
116
 
@@ -118,6 +127,32 @@ call add_task({ title: "Set up development environment" })
118
127
  call next_task
119
128
  ```
120
129
 
130
+ ## Multi-Project Workflow
131
+
132
+ Manage tasks across multiple projects from a single workspace:
133
+
134
+ ```bash
135
+ # Set project context
136
+ call set_project({ project: "coach-platform" })
137
+
138
+ # All task operations now filter by project
139
+ call list_tasks # Only shows coach-platform tasks
140
+ call add_task({ title: "Add auth" }) # Creates in coach-platform
141
+
142
+ # Switch to another project
143
+ call set_project({ project: "obsidian-data-hub" })
144
+ call list_tasks # Only shows obsidian-data-hub tasks
145
+ ```
146
+
147
+ Progress files are generated per-project:
148
+
149
+ ```
150
+ memory_bank/execution/
151
+ ├── progress.md # Combined view (all projects)
152
+ ├── progress-coach-platform.md # Coach platform tasks only
153
+ └── progress-obsidian-data-hub.md # Obsidian data hub tasks only
154
+ ```
155
+
121
156
  ## Shared Context & Preferences
122
157
 
123
158
  The server reads `~/.cursor/shared-context.json` for user preferences and automatically injects them into tool responses and prompts.
@@ -138,10 +173,13 @@ flowchart LR
138
173
  Before creating or reviewing content, agents should:
139
174
 
140
175
  1. Call `show_memory` to check for user preferences
141
- 2. Look for `writing_preferences` category
176
+ 2. Look for recognised memory categories (see below)
142
177
  3. Apply discovered preferences to all content
143
178
 
144
- This is enforced by the Cursor rules in `.cursor/rules/agent-workflow.mdc` and `.cursor/rules/writing-review.mdc`.
179
+ This is enforced by the Cursor rules created by `init_project`:
180
+ - `.cursor/rules/agent-workflow.mdc` - Task management protocol
181
+ - `.cursor/rules/wellness-check.mdc` - Break reminders based on time/duration
182
+ - `.cursor/rules/shared-context-sync.mdc` - Memory sync guidance
145
183
 
146
184
  ### Memory Storage Architecture
147
185
 
@@ -165,33 +203,49 @@ flowchart TB
165
203
  D --> E --> F
166
204
  ```
167
205
 
168
- ### Syncing Cursor Memories
206
+ ### Managing Memories
169
207
 
170
- The `sync` action transfers memories from Cursor to shared context, preserving IDs:
208
+ Memories use simple sequential IDs (1, 2, 3...) managed by the server:
171
209
 
172
- ```mermaid
173
- flowchart TD
174
- A["Agent sees Cursor memory (ID: 13502615)"] --> B["update_memory(action: sync, id: 13502615)"]
175
- B --> C{ID or title exists?}
176
- C -->|Yes| D[Update existing memory]
177
- C -->|No| E[Create with Cursor ID]
178
- D --> F[Save to shared-context.json]
179
- E --> F
180
- ```
210
+ | Action | What it does |
211
+ |--------|--------------|
212
+ | `create` | Add new memory with next available ID |
213
+ | `update` | Update existing memory by ID |
214
+ | `delete` | Remove memory by ID |
215
+ | `sync` | Create or update by title match (recommended) |
216
+ | `migrate` | One-time conversion of old IDs to sequential |
217
+
218
+ ### Recognised Memory Titles
181
219
 
182
- Always include the Cursor memory ID to keep IDs consistent:
220
+ | Title (case-insensitive) | Purpose |
221
+ |--------------------------|---------|
222
+ | `identity` or `values` | User context for prompts |
223
+ | `writing preferences` | Formatting, style, avoided words |
224
+ | `workflow` or `memory bank` | Task management preferences |
225
+ | `wellness preferences` | Break reminder settings and thresholds |
226
+ | `current_project` | Active project for multi-project filtering |
227
+
228
+ The `sync` action is recommended because it matches by title, avoiding duplicates:
183
229
 
184
230
  ```bash
185
- # Sync with Cursor ID (recommended)
186
231
  call update_memory({
187
232
  action: "sync",
188
- id: "13502615", # Cursor's memory ID
189
233
  title: "Writing preferences",
190
- content: "British English, ISO dates, no emojis..."
234
+ content: "British English, no emojis..."
191
235
  })
192
- # Returns: { status: "synced_existing", memory: { id: "13502615", ... } }
236
+ # Returns: { status: "synced_new", memory: { id: "1", ... } }
237
+ ```
238
+
239
+ **Migrating from old IDs:** If you have memories with old-style IDs (like `mem_1737900000_abc123` or Cursor IDs), run migrate once:
240
+
241
+ ```bash
242
+ call update_memory({ action: "migrate" })
243
+ # Returns: { status: "migrated", changes: [{ old_id: "mem_...", new_id: "1", title: "..." }] }
244
+ # Or: { status: "already_migrated" } if already sequential
193
245
  ```
194
246
 
247
+ > **Why not Cursor IDs?** Cursor's memory system is unreliable - agents cannot always create memories, and when they can, the ID is not always accessible. Sequential IDs managed by the server are simpler and more reliable.
248
+
195
249
  ### Why Shared Context Exists
196
250
 
197
251
  Cursor's memory system has limitations that make shared context necessary:
@@ -225,14 +279,12 @@ flowchart TB
225
279
  |-------------------------|--------|----------|
226
280
  | No API access | MCP tools can't read Cursor's memory database | `~/.cursor/shared-context.json` as shared store |
227
281
  | Isolated per conversation | Memories don't persist across all contexts | Shared file accessible to all MCP servers |
228
- | No programmatic sync | Can't auto-export memories | `update_memory` sync action with Cursor ID |
229
- | Different ID systems | Cursor IDs vs generated IDs cause duplicates | Pass Cursor ID to sync to preserve consistency |
282
+ | Unreliable memory creation | Agents cannot always create Cursor memories | Server-managed sequential IDs |
230
283
 
231
284
  **Workflow:**
232
- 1. Cursor creates a memory (you see it in chat with ID like `13502615`)
233
- 2. Ask agent to sync it: `update_memory({ action: "sync", id: "13502615", title: "...", content: "..." })`
234
- 3. Memory saved to `~/.cursor/shared-context.json` with same ID
235
- 4. All MCP servers can now read it
285
+ 1. Ask the agent to sync your preferences: `update_memory({ action: "sync", title: "Writing preferences", content: "..." })`
286
+ 2. Memory saved to `~/.cursor/shared-context.json` with sequential ID
287
+ 3. All MCP servers can now read it via `show_memory`
236
288
 
237
289
  ### Where Preferences Are Used
238
290
 
@@ -241,6 +293,7 @@ flowchart TB
241
293
  | `list_tasks`, `get_task`, `add_task`, `update_task`, `next_task` | Brief hint in response |
242
294
  | `parse_prd`, `expand_task`, `research_task` | Full context in generated prompt |
243
295
  | `check_compliance` | All preferences for validation |
296
+ | Wellness cursor rule | Session tracking and break reminders |
244
297
 
245
298
  ### Compliance Checking
246
299
 
@@ -411,7 +464,7 @@ grep -r "warning\|error" ~/Library/Application\ Support/Cursor/logs/*/window*/ex
411
464
 
412
465
  Key log messages:
413
466
  - `No workspace folders found` → Empty workspace issue
414
- - `Found 27 tools` → Server connected successfully
467
+ - `Found 33 tools` → Server connected successfully
415
468
  - `Workspace: /path` → Shows detected workspace
416
469
 
417
470
  ## Configuration
@@ -423,6 +476,7 @@ Configure via environment variables:
423
476
  | `TASK_MD_PATH` | `memory_bank/execution/progress.md` | Path to markdown summary |
424
477
  | `TASK_JSON_PATH` | `memory_bank/tasks/tasks.json` | Path to JSON registry |
425
478
  | `TASK_DIR` | `memory_bank/tasks` | Directory for task files |
479
+ | `STATS_API_URL` | `https://stats-dev.reids.net.au` | Work stats dashboard API URL |
426
480
 
427
481
  ## Storage Architecture
428
482
 
@@ -469,9 +523,14 @@ Full implementation details here...
469
523
  ### Description: Create initial project structure
470
524
  ```
471
525
 
472
- ### 3. Progress Summary (`memory_bank/execution/progress.md`)
526
+ ### 3. Progress Summary
527
+
528
+ The server generates progress summaries automatically:
529
+
530
+ - `memory_bank/execution/progress.md` - Combined view of all projects
531
+ - `memory_bank/execution/progress-{project}.md` - Per-project progress files
473
532
 
474
- High-level overview auto-generated from tasks.json:
533
+ **Combined Progress** (shows all projects):
475
534
 
476
535
  ```markdown
477
536
  # Implementation Progress
@@ -545,6 +604,104 @@ call init_project({ force: true })
545
604
  | `check_compliance` | Check file/folder against user preferences from shared context | ✓ full |
546
605
  | `analyse_project` | Analyse project structure and suggest memory_bank updates | ✓ full |
547
606
 
607
+ ### Project Context Tools
608
+
609
+ | Tool | Description |
610
+ |------|-------------|
611
+ | `set_project` | Set current project context for session |
612
+ | `get_project` | Get current project and list all known projects |
613
+ | `tag_all_tasks` | Bulk tag tasks with a project name (for migration) |
614
+
615
+ ```bash
616
+ # Set project context for the session
617
+ call set_project({ project: "coach-platform" })
618
+ # Returns: { project: "coach-platform", is_new_project: false, known_projects: [...] }
619
+
620
+ # Check current project and see all projects
621
+ call get_project
622
+ # Returns: { current_project: "coach-platform", known_projects: [...], project_stats: {...} }
623
+
624
+ # Bulk tag all unassigned tasks with a project
625
+ call tag_all_tasks({ project: "coach-platform" })
626
+ # Returns: { tagged: 100, skipped: 0, message: "Tagged 100 tasks..." }
627
+
628
+ # Overwrite existing project assignments
629
+ call tag_all_tasks({ project: "new-project", overwrite: true })
630
+ ```
631
+
632
+ All task operations (`list_tasks`, `add_task`, `next_task`) automatically filter by the current project context.
633
+
634
+ ### Content Context Tools
635
+
636
+ | Tool | Description |
637
+ |------|-------------|
638
+ | `show_content_context` | Read global content context file |
639
+ | `update_content_context` | Update a section of the content context |
640
+
641
+ ```bash
642
+ # Read content context
643
+ call show_content_context
644
+ # Returns: { exists: true, path: "~/.cursor/content-context.md", content: "..." }
645
+
646
+ # Update a section
647
+ call update_content_context({ section: "Published Content", content: "- Post 1\n- Post 2" })
648
+ ```
649
+
650
+ The content context file (`~/.cursor/content-context.md`) stores content inventory, themes, and locations for content creators.
651
+
652
+ ### Work Stats Tools
653
+
654
+ | Tool | Description |
655
+ |------|-------------|
656
+ | `stats` | Fetch work activity statistics from stats dashboard |
657
+
658
+ ```bash
659
+ # Quick check - today's hours and recommendation
660
+ call stats
661
+ # Returns: { today: { hours: 3.5 }, recommendation: { status: "continue", message: "..." } }
662
+
663
+ # Detailed with costs and billing period
664
+ call stats({ detailed: true })
665
+ # Returns: Full stats including costs, period, and totals
666
+ ```
667
+
668
+ Returns data from your stats dashboard (`STATS_API_URL` env var, defaults to `stats-dev.reids.net.au`):
669
+
670
+ | Field | Description |
671
+ |-------|-------------|
672
+ | `today` | Hours, commits, pipelines for today |
673
+ | `thisWeek` | Weekly totals |
674
+ | `streak` | Current and longest streak |
675
+ | `recommendation` | continue/pause/stop with message |
676
+ | `costs` (detailed) | Usage and subscription costs |
677
+ | `period` (detailed) | Billing cycle start/end dates |
678
+ | `totals` (detailed) | Active days, estimated hours, projects |
679
+
680
+ **File Format:**
681
+
682
+ ```markdown
683
+ # Content Context
684
+
685
+ ## Current State
686
+ | Property | Value |
687
+ |----------|-------|
688
+ | Last update | 2026-02-01 |
689
+
690
+ ## Published Content
691
+ - Post 1: Title (2026-01-15)
692
+ - Post 2: Title (2026-01-20)
693
+
694
+ ## Themes Covered
695
+ - Theme A
696
+ - Theme B
697
+
698
+ ## Content Locations
699
+ | Type | Location |
700
+ |------|----------|
701
+ | Draft posts | ~/drafts |
702
+ | Published | ~/published |
703
+ ```
704
+
548
705
  ### Utility Tools
549
706
 
550
707
  | Tool | Description |
@@ -553,12 +710,12 @@ call init_project({ force: true })
553
710
  | `get_version` | Get server version and workspace detection info |
554
711
  | `diagnose` | Diagnose MCP configuration, paths, and workspace detection |
555
712
  | `show_memory` | Show shared context memories from `~/.cursor/shared-context.json` |
556
- | `update_memory` | Create, update, sync, or delete memories (sync preserves Cursor IDs) |
713
+ | `update_memory` | Create, update, sync, or delete memories (sync matches by title) |
557
714
 
558
715
  ```bash
559
716
  # List all tools
560
717
  call help
561
- # Returns: { server, version, usage, tool_count: 27, tools: [...] }
718
+ # Returns: { server, version, usage, tool_count: 33, tools: [...] }
562
719
 
563
720
  # Get help for specific tool
564
721
  call help({ tool: "update_memory" })
@@ -581,15 +738,14 @@ call show_memory({ search: "writing" })
581
738
  # Force reload from file (clears cache)
582
739
  call show_memory({ reload: true })
583
740
 
584
- # Sync a Cursor memory (preserves Cursor ID)
741
+ # Sync a memory by title (recommended - avoids duplicates)
585
742
  call update_memory({
586
743
  action: "sync",
587
- id: "13502615", # Cursor's memory ID
588
744
  title: "Writing preferences",
589
745
  content: "British English, ISO dates, no emojis..."
590
746
  })
591
747
 
592
- # Create a new memory (generates ID)
748
+ # Create a new memory (generates sequential ID)
593
749
  call update_memory({
594
750
  action: "create",
595
751
  title: "Project conventions",
@@ -599,13 +755,16 @@ call update_memory({
599
755
  # Update an existing memory by ID
600
756
  call update_memory({
601
757
  action: "update",
602
- id: "13502615",
758
+ id: "1",
603
759
  title: "Writing preferences",
604
760
  content: "Updated content..."
605
761
  })
606
762
 
607
763
  # Delete a memory
608
- call update_memory({ action: "delete", id: "13502615" })
764
+ call update_memory({ action: "delete", id: "1" })
765
+
766
+ # Migrate old IDs to sequential (one-time)
767
+ call update_memory({ action: "migrate" })
609
768
 
610
769
  # Analyse project and get suggestions for memory_bank
611
770
  call analyse_project
@@ -667,6 +826,7 @@ After running `init_project`:
667
826
  your-project/
668
827
  ├── agent-kit/
669
828
  │ ├── AGENT_RULES.md # Role definitions and permissions
829
+ │ ├── KICKOFF.md # Session startup checklist
670
830
  │ ├── TASKS.md # Task reference (points to memory_bank)
671
831
  │ ├── HANDOFF.md # Handoff protocol reference
672
832
  │ └── SHARED_CONTEXT.md # Shared context documentation
@@ -701,10 +861,12 @@ your-project/
701
861
  │ └── ...
702
862
  └── .cursor/
703
863
  └── rules/
704
- └── agent-workflow.mdc # Cursor agent rules
864
+ ├── agent-workflow.mdc # Task management protocol
865
+ ├── wellness-check.mdc # Break reminders
866
+ └── shared-context-sync.mdc # Memory sync guidance
705
867
  ```
706
868
 
707
- The full structure includes 22 template files covering architecture, context, and execution tracking.
869
+ The full structure includes 27 template files covering architecture, context, execution tracking, and cursor rules.
708
870
 
709
871
  ## Migration from v1.x
710
872
 
@@ -789,6 +951,29 @@ npm run dev
789
951
  npm pack # Creates .tgz file for inspection
790
952
  ```
791
953
 
954
+ ### Testing Local Changes
955
+
956
+ To test changes without publishing, create a per-project MCP config that points to your local build:
957
+
958
+ ```json
959
+ // .cursor/mcp.json (in this project)
960
+ {
961
+ "mcpServers": {
962
+ "task-server": {
963
+ "command": "node",
964
+ "args": ["/Users/andy/Projects/tools/mcp-task-server/dist/index.js"]
965
+ }
966
+ }
967
+ }
968
+ ```
969
+
970
+ This overrides the global config only for this workspace. Other projects continue using the npm version.
971
+
972
+ After making changes:
973
+ 1. Run `npm run build`
974
+ 2. Reload Cursor (`Cmd+Shift+P` → "Developer: Reload Window")
975
+ 3. Test with `call help` to verify tools are available
976
+
792
977
  ## License
793
978
 
794
979
  MIT
package/dist/config.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Config } from "./types.js";
2
+ export declare const STATS_API_URL: string;
2
3
  export interface WorkspaceDetection {
3
4
  root: string;
4
5
  source: string;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,IAAI,kBAAkB,CA8BxD;AAKD;;GAEG;AACH,wBAAgB,YAAY,IAAI,kBAAkB,CAKjD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAmBlC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAKxE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGtE"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGpC,eAAO,MAAM,aAAa,QAAgE,CAAC;AAE3F,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,IAAI,kBAAkB,CA8BxD;AAKD;;GAEG;AACH,wBAAgB,YAAY,IAAI,kBAAkB,CAKjD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAmBlC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAKxE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGtE"}
package/dist/config.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { existsSync } from "fs";
2
2
  import { dirname, join } from "path";
3
+ // Stats Dashboard API URL
4
+ export const STATS_API_URL = process.env.STATS_API_URL || "https://stats-dev.reids.net.au";
3
5
  /**
4
6
  * Detect the workspace root using multiple strategies
5
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAQrC;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB;IACjC,uBAAuB;IACvB,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;QAC/B,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC5E,CAAC;IAED,kEAAkE;IAClE,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5D,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YACb,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,4BAA4B,EAAE,CAAC;QA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I;KAC9B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,YAAoB;IAC9D,IAAI,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,OAAO,GAAG,MAAM,CAAC,aAAa,IAAI,YAAY,EAAE,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAc,EAAE,MAAc;IAC5D,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACzC,OAAO,WAAW,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,SAAS,QAAQ,MAAM,CAAC,CAAC;AACxE,CAAC"}
package/dist/context.d.ts CHANGED
@@ -31,6 +31,10 @@ export declare function getUserIdentity(): string | null;
31
31
  * Get workflow preferences from shared context
32
32
  */
33
33
  export declare function getWorkflowPreferences(): string | null;
34
+ /**
35
+ * Get wellness preferences from shared context
36
+ */
37
+ export declare function getWellnessPreferences(): string | null;
34
38
  /**
35
39
  * Clear the cached context (useful for testing or reloading)
36
40
  */
@@ -45,13 +49,12 @@ export declare function saveSharedContext(context: SharedContext): void;
45
49
  export declare function upsertMemory(memory: CursorMemory): SharedContext;
46
50
  /**
47
51
  * Add or update a memory by title (case-insensitive match)
48
- * If a memory with the same title exists, updates it. Otherwise creates new.
52
+ * If a memory with the same title exists, updates it. Otherwise creates new with sequential ID.
49
53
  *
50
54
  * @param title - Memory title
51
55
  * @param content - Memory content
52
- * @param cursorId - Optional Cursor memory ID to use (preserves original ID from Cursor)
53
56
  */
54
- export declare function upsertMemoryByTitle(title: string, content: string, cursorId?: string): {
57
+ export declare function upsertMemoryByTitle(title: string, content: string): {
55
58
  memory: CursorMemory;
56
59
  wasUpdated: boolean;
57
60
  };
@@ -63,7 +66,25 @@ export declare function deleteMemory(id: string): {
63
66
  context: SharedContext | null;
64
67
  };
65
68
  /**
66
- * Generate a unique ID for a new memory
69
+ * Generate a sequential ID for a new memory
67
70
  */
68
71
  export declare function generateMemoryId(): string;
72
+ /**
73
+ * Check if memories are already using sequential IDs (1, 2, 3...)
74
+ */
75
+ export declare function isAlreadyMigrated(): boolean;
76
+ /**
77
+ * Migrate all memories to sequential IDs (1, 2, 3...)
78
+ * Returns mapping of old IDs to new IDs
79
+ */
80
+ export declare function migrateMemories(): {
81
+ migrated: boolean;
82
+ alreadyMigrated: boolean;
83
+ changes: Array<{
84
+ old_id: string;
85
+ new_id: string;
86
+ title: string;
87
+ }>;
88
+ total: number;
89
+ };
69
90
  //# sourceMappingURL=context.d.ts.map
@@ -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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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;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAqB/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,CAWzC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAe3C;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,OAAO,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClE,KAAK,EAAE,MAAM,CAAC;CACf,CA4BA"}
package/dist/context.js CHANGED
@@ -61,6 +61,13 @@ export function getWorkflowPreferences() {
61
61
  const memory = getMemoryByTitle("workflow") || getMemoryByTitle("memory bank");
62
62
  return memory?.content || null;
63
63
  }
64
+ /**
65
+ * Get wellness preferences from shared context
66
+ */
67
+ export function getWellnessPreferences() {
68
+ const memory = getMemoryByTitle("wellness preferences");
69
+ return memory?.content || null;
70
+ }
64
71
  /**
65
72
  * Clear the cached context (useful for testing or reloading)
66
73
  */
@@ -100,39 +107,24 @@ export function upsertMemory(memory) {
100
107
  }
101
108
  /**
102
109
  * Add or update a memory by title (case-insensitive match)
103
- * If a memory with the same title exists, updates it. Otherwise creates new.
110
+ * If a memory with the same title exists, updates it. Otherwise creates new with sequential ID.
104
111
  *
105
112
  * @param title - Memory title
106
113
  * @param content - Memory content
107
- * @param cursorId - Optional Cursor memory ID to use (preserves original ID from Cursor)
108
114
  */
109
- export function upsertMemoryByTitle(title, content, cursorId) {
115
+ export function upsertMemoryByTitle(title, content) {
110
116
  let ctx = loadSharedContext() || { cursor_memories: [] };
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;
117
+ // Case-insensitive title match
118
+ const existingIndex = ctx.cursor_memories.findIndex((m) => m.title.toLowerCase() === title.toLowerCase());
119
+ if (existingIndex >= 0) {
120
+ // Update existing - keep ID, update content and title
121
+ ctx.cursor_memories[existingIndex].content = content;
122
+ ctx.cursor_memories[existingIndex].title = title;
131
123
  saveSharedContext(ctx);
132
- return { memory: ctx.cursor_memories[existingByTitleIndex], wasUpdated: true };
124
+ return { memory: ctx.cursor_memories[existingIndex], wasUpdated: true };
133
125
  }
134
- // Create new - use cursorId if provided, otherwise generate
135
- const memory = { id: cursorId || generateMemoryId(), title, content };
126
+ // Create new with sequential ID
127
+ const memory = { id: generateMemoryId(), title, content };
136
128
  ctx.cursor_memories.push(memory);
137
129
  saveSharedContext(ctx);
138
130
  return { memory, wasUpdated: false };
@@ -154,9 +146,65 @@ export function deleteMemory(id) {
154
146
  return { deleted: false, context: ctx };
155
147
  }
156
148
  /**
157
- * Generate a unique ID for a new memory
149
+ * Generate a sequential ID for a new memory
158
150
  */
159
151
  export function generateMemoryId() {
160
- return `mem_${Date.now()}_${Math.random().toString(36).substring(2, 8)}`;
152
+ const ctx = loadSharedContext();
153
+ if (!ctx?.cursor_memories?.length)
154
+ return "1";
155
+ // Find highest numeric ID
156
+ const maxId = ctx.cursor_memories.reduce((max, m) => {
157
+ const num = parseInt(m.id, 10);
158
+ return !isNaN(num) && num > max ? num : max;
159
+ }, 0);
160
+ return String(maxId + 1);
161
+ }
162
+ /**
163
+ * Check if memories are already using sequential IDs (1, 2, 3...)
164
+ */
165
+ export function isAlreadyMigrated() {
166
+ const ctx = loadSharedContext();
167
+ if (!ctx?.cursor_memories?.length)
168
+ return true; // No memories = nothing to migrate
169
+ const ids = ctx.cursor_memories.map((m) => m.id).sort((a, b) => {
170
+ const numA = parseInt(a, 10);
171
+ const numB = parseInt(b, 10);
172
+ return numA - numB;
173
+ });
174
+ // Check if IDs are sequential starting from 1
175
+ for (let i = 0; i < ids.length; i++) {
176
+ if (ids[i] !== String(i + 1))
177
+ return false;
178
+ }
179
+ return true;
180
+ }
181
+ /**
182
+ * Migrate all memories to sequential IDs (1, 2, 3...)
183
+ * Returns mapping of old IDs to new IDs
184
+ */
185
+ export function migrateMemories() {
186
+ if (isAlreadyMigrated()) {
187
+ const ctx = loadSharedContext();
188
+ return {
189
+ migrated: false,
190
+ alreadyMigrated: true,
191
+ changes: [],
192
+ total: ctx?.cursor_memories?.length || 0
193
+ };
194
+ }
195
+ const ctx = loadSharedContext();
196
+ if (!ctx?.cursor_memories?.length) {
197
+ return { migrated: false, alreadyMigrated: true, changes: [], total: 0 };
198
+ }
199
+ const changes = [];
200
+ ctx.cursor_memories.forEach((memory, index) => {
201
+ const newId = String(index + 1);
202
+ if (memory.id !== newId) {
203
+ changes.push({ old_id: memory.id, new_id: newId, title: memory.title });
204
+ memory.id = newId;
205
+ }
206
+ });
207
+ saveSharedContext(ctx);
208
+ return { migrated: true, alreadyMigrated: false, changes, total: ctx.cursor_memories.length };
161
209
  }
162
210
  //# sourceMappingURL=context.js.map