@joyjit/vikunja-mcp 0.3.1 → 0.3.3
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 +39 -0
- package/README.md +107 -55
- package/dist/services/TaskCreationService.d.ts.map +1 -1
- package/dist/services/TaskCreationService.js +12 -8
- package/dist/services/TaskCreationService.js.map +1 -1
- package/dist/tools/task-crud.d.ts.map +1 -1
- package/dist/tools/task-crud.js +2 -0
- package/dist/tools/task-crud.js.map +1 -1
- package/dist/tools/tasks/assignees/AssigneeOperationsService.d.ts +35 -1
- package/dist/tools/tasks/assignees/AssigneeOperationsService.d.ts.map +1 -1
- package/dist/tools/tasks/assignees/AssigneeOperationsService.js +63 -10
- package/dist/tools/tasks/assignees/AssigneeOperationsService.js.map +1 -1
- package/dist/tools/tasks/assignees/index.d.ts +2 -0
- package/dist/tools/tasks/assignees/index.d.ts.map +1 -1
- package/dist/tools/tasks/assignees/index.js +12 -3
- package/dist/tools/tasks/assignees/index.js.map +1 -1
- package/dist/tools/tasks/bulk/BulkOperationValidator.d.ts +1 -0
- package/dist/tools/tasks/bulk/BulkOperationValidator.d.ts.map +1 -1
- package/dist/tools/tasks/bulk/BulkOperationValidator.js +6 -0
- package/dist/tools/tasks/bulk/BulkOperationValidator.js.map +1 -1
- package/dist/tools/tasks/bulk-operations-simplified.d.ts +6 -0
- package/dist/tools/tasks/bulk-operations-simplified.d.ts.map +1 -1
- package/dist/tools/tasks/bulk-operations-simplified.js +84 -18
- package/dist/tools/tasks/bulk-operations-simplified.js.map +1 -1
- package/dist/tools/tasks/bulk-operations.d.ts +1 -1
- package/dist/tools/tasks/bulk-operations.d.ts.map +1 -1
- package/dist/tools/tasks/bulk-operations.js +2 -1
- package/dist/tools/tasks/bulk-operations.js.map +1 -1
- package/dist/tools/tasks/crud/TaskCreationService.d.ts +2 -0
- package/dist/tools/tasks/crud/TaskCreationService.d.ts.map +1 -1
- package/dist/tools/tasks/crud/TaskCreationService.js +22 -21
- package/dist/tools/tasks/crud/TaskCreationService.js.map +1 -1
- package/dist/tools/tasks/crud/TaskUpdateService.d.ts +2 -0
- package/dist/tools/tasks/crud/TaskUpdateService.d.ts.map +1 -1
- package/dist/tools/tasks/crud/TaskUpdateService.js +39 -10
- package/dist/tools/tasks/crud/TaskUpdateService.js.map +1 -1
- package/dist/tools/tasks/filtering/FilterValidator.d.ts.map +1 -1
- package/dist/tools/tasks/filtering/FilterValidator.js +42 -6
- package/dist/tools/tasks/filtering/FilterValidator.js.map +1 -1
- package/dist/tools/tasks/index.d.ts.map +1 -1
- package/dist/tools/tasks/index.js +3 -0
- package/dist/tools/tasks/index.js.map +1 -1
- package/dist/tools/tasks/labels.d.ts +42 -0
- package/dist/tools/tasks/labels.d.ts.map +1 -1
- package/dist/tools/tasks/labels.js +74 -17
- package/dist/tools/tasks/labels.js.map +1 -1
- package/dist/tools/tasks/validation.d.ts +4 -0
- package/dist/tools/tasks/validation.d.ts.map +1 -1
- package/dist/tools/tasks/validation.js +13 -0
- package/dist/tools/tasks/validation.js.map +1 -1
- package/dist/tools/templates.d.ts.map +1 -1
- package/dist/tools/templates.js +9 -3
- package/dist/tools/templates.js.map +1 -1
- package/dist/utils/filtering/ClientSideFilteringStrategy.d.ts.map +1 -1
- package/dist/utils/filtering/ClientSideFilteringStrategy.js +3 -1
- package/dist/utils/filtering/ClientSideFilteringStrategy.js.map +1 -1
- package/dist/utils/filtering/FilteringContext.d.ts +14 -8
- package/dist/utils/filtering/FilteringContext.d.ts.map +1 -1
- package/dist/utils/filtering/FilteringContext.js +15 -11
- package/dist/utils/filtering/FilteringContext.js.map +1 -1
- package/dist/utils/retry.d.ts +13 -1
- package/dist/utils/retry.d.ts.map +1 -1
- package/dist/utils/retry.js +45 -3
- package/dist/utils/retry.js.map +1 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.3.3 — 2026-09-07
|
|
6
|
+
|
|
7
|
+
### Reliability
|
|
8
|
+
|
|
9
|
+
- Add `scripts/smoke-dist.sh` — post-build gate that starts the compiled server and
|
|
10
|
+
asserts it answers a real MCP `initialize` (catches crash-on-import and stale
|
|
11
|
+
`dist/`; Vikunja #682 / #715)
|
|
12
|
+
- Add `scripts/run-mcp.sh` — launcher auto-builds when `dist/` is missing or older
|
|
13
|
+
than `src/`, smoke-tests before exec, rebuilds once on smoke failure
|
|
14
|
+
|
|
15
|
+
### Platform
|
|
16
|
+
|
|
17
|
+
- Pin MCP integration CI to Vikunja 2.5.0 (canary already green on `latest`)
|
|
18
|
+
- Describe the fork as Vikunja 2.5-ready (README, npm, MCP registry blurb)
|
|
19
|
+
- Bump nested deps (`browserslist`, `fast-uri`, `@humanfs/node`, `qs`, …) so
|
|
20
|
+
weekly `npm audit` / Security Scan stays clean
|
|
21
|
+
|
|
22
|
+
### Docs
|
|
23
|
+
|
|
24
|
+
- README: document focused task tools, build smoke gate / `run-mcp.sh`,
|
|
25
|
+
and shorten the old v0.2.0 architecture section
|
|
26
|
+
|
|
27
|
+
## 0.3.2 — 2026-08-11
|
|
28
|
+
|
|
29
|
+
### Fixes
|
|
30
|
+
|
|
31
|
+
- Serialize bulk create/update writes (default concurrency 1) and retry SQLite lock / 5xx errors (`VIKUNJA_BULK_WRITE_CONCURRENCY` to raise on Postgres)
|
|
32
|
+
- Assignees on create/assign use per-user APIs and verify persistence (Vikunja ignores the bulk assign body)
|
|
33
|
+
- Labels use additive `PUT` instead of the bulk labels route that cleared labels
|
|
34
|
+
- Task `percentDone` (0–100) on create / update / bulk
|
|
35
|
+
- Filtered task lists apply `done` / `filter` server-side before pagination (client-side fallback unchanged)
|
|
36
|
+
|
|
37
|
+
### Platform
|
|
38
|
+
|
|
39
|
+
- Bump nested dep overrides (`js-yaml`, audit pins) so npm audit stays clean
|
|
40
|
+
- README updated for fork highlights, team ops, and bulk concurrency
|
|
41
|
+
|
|
3
42
|
## 0.3.1 — 2026-07-26
|
|
4
43
|
|
|
5
44
|
### Fixes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Maintained **fork** of [`democratize-technology/vikunja-mcp`](https://github.com/democratize-technology/vikunja-mcp), published as [`@joyjit/vikunja-mcp`](https://www.npmjs.com/package/@joyjit/vikunja-mcp).
|
|
4
4
|
|
|
5
|
-
Upstream is slow to merge and release. This fork ships Vikunja **2.
|
|
5
|
+
Upstream is slow to merge and release. This fork ships Vikunja **2.5**-ready fixes on a faster cadence while still sending PRs upstream. Prefer upstream once equivalent fixes are released there.
|
|
6
6
|
|
|
7
7
|
### Fork highlights (vs upstream npm `0.2.0`)
|
|
8
8
|
|
|
@@ -11,7 +11,15 @@ Upstream is slow to merge and release. This fork ships Vikunja **2.3**-ready fix
|
|
|
11
11
|
- **bulk-update** preserves fields it was not asked to change
|
|
12
12
|
- **Task `projectId` update** actually moves the task; labels apply on create
|
|
13
13
|
- **Project partial update** keeps title / parent instead of wiping them
|
|
14
|
-
- **
|
|
14
|
+
- **Assignees stick**: create/assign use per-user APIs and verify persistence (Vikunja’s bulk assign body is ignored)
|
|
15
|
+
- **Labels stick**: set labels via additive `PUT` (Vikunja’s bulk labels route clears labels when given the wrong body shape)
|
|
16
|
+
- **`percentDone`**: create / update / bulk can set completion percentage (0–100)
|
|
17
|
+
- **Filtered lists paginate correctly**: `done` / `filter` go to the server before paging (with client-side fallback)
|
|
18
|
+
- **Bulk writes vs SQLite**: default one write at a time, retry lock/5xx; raise with `VIKUNJA_BULK_WRITE_CONCURRENCY` on Postgres
|
|
19
|
+
- **Vikunja 2.x**: `getAllTasks` uses `GET /tasks`; list responses include all items (no silent drop after 10)
|
|
20
|
+
- **Focused task tools**: smaller tools (`vikunja_task_crud`, `vikunja_task_bulk`, …) alongside the all-in-one `vikunja_tasks` (same behavior; prefer focused tools for agents)
|
|
21
|
+
- **Build smoke gate**: every `npm run build` starts `dist/` and checks a real MCP `initialize` reply so a broken build cannot ship silently
|
|
22
|
+
- **Node.js 24** + Dockerized MCP integration CI against Vikunja 2.5
|
|
15
23
|
|
|
16
24
|
A Model Context Protocol (MCP) server that enables AI assistants to interact with Vikunja task management instances. This fork treats the server as a **thin Vikunja API wrapper**: tool args are validated for shape (IDs, dates, enums), credentials are masked in logs, and DoS limits still apply — but **content policy for titles/descriptions belongs to Vikunja**, not a regex reject list in this process.
|
|
17
25
|
|
|
@@ -22,7 +30,7 @@ A Model Context Protocol (MCP) server that enables AI assistants to interact wit
|
|
|
22
30
|
- **Full task management** operations implemented
|
|
23
31
|
- **Complete project management** with CRUD operations
|
|
24
32
|
- **Label management** for organizing tasks
|
|
25
|
-
- **Team operations** for collaboration (get/update/members
|
|
33
|
+
- **Team operations** for collaboration (list/create/get/update/delete/members)
|
|
26
34
|
- **User management** with settings and search
|
|
27
35
|
- **Webhook management** for project automation
|
|
28
36
|
- **Batch import** tasks from CSV or JSON files
|
|
@@ -36,30 +44,9 @@ A Model Context Protocol (MCP) server that enables AI assistants to interact wit
|
|
|
36
44
|
- **Memory protection** with pagination limits and usage monitoring
|
|
37
45
|
- **Simplified architecture** with 90% code reduction for maintainability
|
|
38
46
|
|
|
39
|
-
##
|
|
47
|
+
## Architecture notes (since v0.2.0)
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
### Storage Architecture Refactoring (90% Code Reduction)
|
|
44
|
-
- **Before**: 33 files, 9,803 lines of over-engineered storage system
|
|
45
|
-
- **After**: 4 files, essential functionality only
|
|
46
|
-
- **Eliminated**: Complex orchestrators, health monitors, statistics tracking, migration systems
|
|
47
|
-
- **Result**: Same external API with dramatically improved maintainability
|
|
48
|
-
|
|
49
|
-
### Zod-Based Filter System (850+ Lines Removed)
|
|
50
|
-
- **Before**: Custom tokenizer, parser, and validator with security vulnerabilities
|
|
51
|
-
- **After**: Secure Zod schema validation with production-ready parsing
|
|
52
|
-
- **Enhanced**: DoS protection and comprehensive error handling
|
|
53
|
-
- **Result**: Faster parsing, better security, and enterprise-grade reliability
|
|
54
|
-
|
|
55
|
-
### Production-Ready Retry System (580+ Lines Replaced)
|
|
56
|
-
- **Before**: Custom retry logic with maintenance overhead
|
|
57
|
-
- **After**: Battle-tested opossum circuit breaker library
|
|
58
|
-
- **Features**: Circuit breaker state sharing, automatic recovery, comprehensive monitoring
|
|
59
|
-
- **Result**: Production resilience with battle-tested patterns
|
|
60
|
-
|
|
61
|
-
### Zero Breaking Changes
|
|
62
|
-
All improvements maintain **100% backward compatibility** with existing implementations while providing enhanced reliability and security.
|
|
49
|
+
The server uses a small in-memory filter store, Zod-validated filters (with DoS limits), and an opossum circuit breaker for API retries. External tool behavior stayed compatible across that cleanup.
|
|
63
50
|
|
|
64
51
|
## Requirements
|
|
65
52
|
|
|
@@ -88,7 +75,7 @@ All improvements maintain **100% backward compatibility** with existing implemen
|
|
|
88
75
|
|
|
89
76
|
Requires **Node.js 24+**. Use an API token (`tk_…`) or JWT from your Vikunja instance.
|
|
90
77
|
|
|
91
|
-
Pin a version if you want: `"args": ["-y", "@joyjit/vikunja-mcp@0.3.
|
|
78
|
+
Pin a version if you want (example): `"args": ["-y", "@joyjit/vikunja-mcp@0.3.3"]`.
|
|
92
79
|
|
|
93
80
|
### Option 2: Install from GitHub (no npm needed)
|
|
94
81
|
|
|
@@ -116,6 +103,8 @@ npm install
|
|
|
116
103
|
npm run build
|
|
117
104
|
```
|
|
118
105
|
|
|
106
|
+
`npm run build` runs a **post-build smoke check** (`scripts/smoke-dist.sh`): it starts `dist/index.js` and requires a valid MCP `initialize` reply. A crash-on-import or stale `dist/` fails the build instead of shipping a silent empty tool list.
|
|
107
|
+
|
|
119
108
|
Then configure your MCP client:
|
|
120
109
|
|
|
121
110
|
```json
|
|
@@ -133,6 +122,8 @@ Then configure your MCP client:
|
|
|
133
122
|
}
|
|
134
123
|
```
|
|
135
124
|
|
|
125
|
+
For a local checkout that should rebuild itself when `dist/` is missing or older than `src/`, use `scripts/run-mcp.sh` as the MCP `command` (see comments in that script).
|
|
126
|
+
|
|
136
127
|
## Configuration
|
|
137
128
|
|
|
138
129
|
### Logging Configuration
|
|
@@ -257,7 +248,25 @@ vikunja_auth.disconnect()
|
|
|
257
248
|
|
|
258
249
|
### Task Management Examples
|
|
259
250
|
|
|
251
|
+
Prefer the focused tools (`vikunja_task_crud`, `vikunja_task_bulk`, …) when an agent is choosing tools. The all-in-one `vikunja_tasks` tool below still works and covers the same operations.
|
|
252
|
+
|
|
260
253
|
```typescript
|
|
254
|
+
// Focused tools (recommended for agents)
|
|
255
|
+
vikunja_task_crud({ operation: "list", allProjects: true })
|
|
256
|
+
vikunja_task_crud({
|
|
257
|
+
operation: "create",
|
|
258
|
+
title: "Ship README update",
|
|
259
|
+
projectId: 1,
|
|
260
|
+
priority: 3,
|
|
261
|
+
})
|
|
262
|
+
vikunja_task_bulk({
|
|
263
|
+
operation: "bulk-update",
|
|
264
|
+
taskIds: [1, 2, 3],
|
|
265
|
+
field: "done",
|
|
266
|
+
value: true,
|
|
267
|
+
})
|
|
268
|
+
|
|
269
|
+
// All-in-one tool (same behavior via subcommand)
|
|
261
270
|
// List all tasks across all projects
|
|
262
271
|
vikunja_tasks.list({ allProjects: true })
|
|
263
272
|
|
|
@@ -297,8 +306,9 @@ vikunja_tasks.create({
|
|
|
297
306
|
description: "Update README with examples",
|
|
298
307
|
dueDate: "2024-12-31T23:59:59Z",
|
|
299
308
|
priority: 3,
|
|
300
|
-
|
|
301
|
-
|
|
309
|
+
percentDone: 25, // 0–100 (Vikunja percent_done)
|
|
310
|
+
labels: [1, 2], // Label IDs (added; does not clear existing)
|
|
311
|
+
assignees: [1, 3] // User IDs (verified after assign)
|
|
302
312
|
})
|
|
303
313
|
|
|
304
314
|
// Create a recurring task (repeats every week)
|
|
@@ -326,7 +336,8 @@ vikunja_tasks.get({ id: 123 })
|
|
|
326
336
|
vikunja_tasks.update({
|
|
327
337
|
id: 123,
|
|
328
338
|
done: true,
|
|
329
|
-
priority: 5
|
|
339
|
+
priority: 5,
|
|
340
|
+
percentDone: 100
|
|
330
341
|
})
|
|
331
342
|
|
|
332
343
|
// Move a task to another project (full-model merge; verified after update)
|
|
@@ -467,7 +478,13 @@ vikunja_tasks.bulk-update({
|
|
|
467
478
|
vikunja_tasks.bulk-update({
|
|
468
479
|
taskIds: [123, 124, 125],
|
|
469
480
|
field: "labels",
|
|
470
|
-
value: [1, 3, 5] //
|
|
481
|
+
value: [1, 3, 5] // Adds these labels (does not clear others)
|
|
482
|
+
})
|
|
483
|
+
|
|
484
|
+
vikunja_tasks.bulk-update({
|
|
485
|
+
taskIds: [123, 124, 125],
|
|
486
|
+
field: "percent_done",
|
|
487
|
+
value: 50
|
|
471
488
|
})
|
|
472
489
|
|
|
473
490
|
// Bulk delete multiple tasks (max 100)
|
|
@@ -742,6 +759,8 @@ vikunja_labels.update({
|
|
|
742
759
|
vikunja_labels.delete({ id: 1 })
|
|
743
760
|
|
|
744
761
|
// --- Label Assignment to Tasks ---
|
|
762
|
+
// Labels are ADDED (missing only). Already-present labels are a no-op.
|
|
763
|
+
// Passing an empty list does not clear labels.
|
|
745
764
|
|
|
746
765
|
// Apply multiple labels to a task
|
|
747
766
|
vikunja_tasks.apply-label({
|
|
@@ -785,11 +804,23 @@ vikunja_teams.create({
|
|
|
785
804
|
description: "Responsible for UI/UX development"
|
|
786
805
|
})
|
|
787
806
|
|
|
807
|
+
// Get a team by ID (direct API; not in node-vikunja)
|
|
808
|
+
vikunja_teams.get({ id: 1 })
|
|
809
|
+
|
|
810
|
+
// Update a team
|
|
811
|
+
vikunja_teams.update({
|
|
812
|
+
id: 1,
|
|
813
|
+
name: "Frontend & Design",
|
|
814
|
+
description: "UI/UX and design systems"
|
|
815
|
+
})
|
|
816
|
+
|
|
817
|
+
// List / add / remove / update members
|
|
818
|
+
vikunja_teams.members({ id: 1, memberSubcommand: "list" })
|
|
819
|
+
vikunja_teams.members({ id: 1, memberSubcommand: "add", userId: 42 })
|
|
820
|
+
vikunja_teams.members({ id: 1, memberSubcommand: "remove", userId: 42 })
|
|
821
|
+
|
|
788
822
|
// Delete a team
|
|
789
823
|
vikunja_teams.delete({ id: 1 })
|
|
790
|
-
|
|
791
|
-
// Note: get, update, and members operations are not yet
|
|
792
|
-
// implemented in the node-vikunja library
|
|
793
824
|
```
|
|
794
825
|
|
|
795
826
|
### User Management Examples
|
|
@@ -1044,32 +1075,54 @@ This standardized format ensures:
|
|
|
1044
1075
|
- `status` - Check authentication status
|
|
1045
1076
|
- `refresh` - Refresh authentication token
|
|
1046
1077
|
|
|
1047
|
-
### Task
|
|
1048
|
-
|
|
1078
|
+
### Focused Task Tools ✅ (preferred for agents)
|
|
1079
|
+
|
|
1080
|
+
Smaller single-purpose tools with an `operation` field. Same Vikunja behavior as the matching `vikunja_tasks` subcommands.
|
|
1081
|
+
|
|
1082
|
+
- `vikunja_task_crud` — `create`, `get`, `update`, `delete`, `list`
|
|
1083
|
+
- `vikunja_task_bulk` — `bulk-create`, `bulk-update`, `bulk-delete`
|
|
1084
|
+
- `vikunja_task_assignees` — `assign`, `unassign`, `list-assignees`
|
|
1085
|
+
- `vikunja_task_comments` — `comment`
|
|
1086
|
+
- `vikunja_task_reminders` — `add-reminder`, `remove-reminder`, `list-reminders`
|
|
1087
|
+
- `vikunja_task_labels` — `apply-label`, `remove-label`, `list-labels`
|
|
1088
|
+
- `vikunja_task_relations` — `relate`, `unrelate`, `relations`
|
|
1089
|
+
|
|
1090
|
+
Manual walkthrough: [`docs/MCP-TEST-CHECKLIST.md`](docs/MCP-TEST-CHECKLIST.md).
|
|
1091
|
+
|
|
1092
|
+
### Task Management ✅ (all-in-one)
|
|
1093
|
+
- `vikunja_tasks` - Task operations (fully implemented; prefer focused tools above when available)
|
|
1049
1094
|
- `list` - List tasks with filters
|
|
1050
1095
|
- Filter by project or get all tasks
|
|
1051
1096
|
- Support for pagination, search, sorting
|
|
1052
|
-
- Filter by completion status
|
|
1097
|
+
- Filter by completion status (`done` is folded into the server filter when possible)
|
|
1053
1098
|
- Apply saved filters with `filterId` parameter
|
|
1099
|
+
- Hybrid filtering: tries server-side first, falls back to client-side
|
|
1054
1100
|
- `create` - Create a new task
|
|
1055
1101
|
- Required: title, projectId
|
|
1056
|
-
- Optional: description, dueDate, priority, labels, assignees
|
|
1102
|
+
- Optional: description, dueDate, priority, percentDone (0–100), labels, assignees
|
|
1103
|
+
- Labels are applied additively after create; assignees use per-user assign + verify
|
|
1057
1104
|
- Validates date format (ISO 8601) and IDs
|
|
1058
1105
|
- `get` - Get task details by ID
|
|
1059
1106
|
- `update` - Update existing task
|
|
1060
1107
|
- Supports partial updates (GET + merge before POST — Vikunja replaces the full model)
|
|
1061
|
-
- Can update title, description, dueDate, priority, done status
|
|
1108
|
+
- Can update title, description, dueDate, priority, percentDone, done status
|
|
1062
1109
|
- Can move tasks between projects with `projectId` (verified after update)
|
|
1063
|
-
- Can update labels and assignees (
|
|
1110
|
+
- Can update labels (additive) and assignees (diff-based per-user APIs)
|
|
1064
1111
|
- `delete` - Delete a task by ID
|
|
1065
1112
|
- `assign` - Bulk assign users to tasks
|
|
1066
1113
|
- `unassign` - Remove users from tasks
|
|
1067
1114
|
- `comment` - List or add comments to tasks
|
|
1115
|
+
- `bulk-create` - Create multiple tasks at once
|
|
1116
|
+
- Required: projectId, tasks array (max 100)
|
|
1117
|
+
- Per task: title required; optional description, dueDate, priority, percentDone, labels, assignees, repeat
|
|
1118
|
+
- Default write concurrency is 1 (SQLite-safe); override with `VIKUNJA_BULK_WRITE_CONCURRENCY`
|
|
1119
|
+
- Retries transient lock / 5xx errors per item
|
|
1068
1120
|
- `bulk-update` - Update multiple tasks at once
|
|
1069
1121
|
- Required: taskIds array, field name, value
|
|
1070
|
-
- Supported fields: done, priority, due_date, project_id, assignees, labels
|
|
1122
|
+
- Supported fields: done, priority, due_date, percent_done, project_id, assignees, labels
|
|
1071
1123
|
- Validates field types and values
|
|
1072
1124
|
- Uses per-task fetch+merge+update (does not call Vikunja's native bulk API, which can wipe omitted fields — see #46)
|
|
1125
|
+
- Same SQLite-safe concurrency / retry behavior as bulk-create
|
|
1073
1126
|
- ⚠️ Performance: O(n) get+update calls (n = number of tasks)
|
|
1074
1127
|
- `bulk-delete` - Delete multiple tasks at once
|
|
1075
1128
|
- Required: taskIds array
|
|
@@ -1146,7 +1199,7 @@ This standardized format ensures:
|
|
|
1146
1199
|
- `delete` - Delete a label by ID
|
|
1147
1200
|
- `apply-label` - Apply one or more labels to a task
|
|
1148
1201
|
- Required: task id, labels array
|
|
1149
|
-
-
|
|
1202
|
+
- Additive: adds missing labels; already-present labels are ignored (no abort)
|
|
1150
1203
|
- `remove-label` - Remove one or more labels from a task
|
|
1151
1204
|
- Required: task id, labels array
|
|
1152
1205
|
- Supports bulk label removal
|
|
@@ -1177,16 +1230,18 @@ This standardized format ensures:
|
|
|
1177
1230
|
- Creates all tasks with labels from template
|
|
1178
1231
|
|
|
1179
1232
|
### Team Management ✅
|
|
1180
|
-
- `vikunja_teams` - Team operations (
|
|
1233
|
+
- `vikunja_teams` - Team operations (fully implemented; get/update/members use direct API calls where node-vikunja is incomplete)
|
|
1181
1234
|
- `list` - List all teams with filters
|
|
1182
1235
|
- Support for pagination and search
|
|
1183
1236
|
- `create` - Create new team
|
|
1184
1237
|
- Required: name
|
|
1185
1238
|
- Optional: description
|
|
1239
|
+
- `get` - Get team by ID
|
|
1240
|
+
- `update` - Update team name / description
|
|
1186
1241
|
- `delete` - Delete a team by ID (with fallback API support)
|
|
1187
|
-
- `
|
|
1188
|
-
|
|
1189
|
-
|
|
1242
|
+
- `members` - Manage membership
|
|
1243
|
+
- `memberSubcommand`: `list` (default), `add`, `remove`, `update`
|
|
1244
|
+
- `userId` required for add/remove/update; `admin` optional (required for update)
|
|
1190
1245
|
|
|
1191
1246
|
### User Management ✅
|
|
1192
1247
|
- `vikunja_users` - User operations (fully implemented) **[Requires JWT authentication]**
|
|
@@ -1271,17 +1326,10 @@ This standardized format ensures:
|
|
|
1271
1326
|
## Known Limitations
|
|
1272
1327
|
|
|
1273
1328
|
1. **File Attachments**: The `attach` subcommand is not implemented due to MCP protocol limitations
|
|
1274
|
-
2. **
|
|
1275
|
-
- Cannot get team by ID
|
|
1276
|
-
- Cannot update team information
|
|
1277
|
-
- Cannot delete teams
|
|
1278
|
-
- Cannot manage team members
|
|
1329
|
+
2. **Label replace / clear**: Label writes are **additive** (add missing labels). Passing `labels: []` does not clear existing labels; there is no first-class “replace all labels” helper yet
|
|
1279
1330
|
3. **Pagination**: Some endpoints may not fully support pagination parameters due to API limitations
|
|
1280
1331
|
4. **Authentication Issues**: Some Vikunja API endpoints have known authentication issues:
|
|
1281
1332
|
- **User endpoints**: May fail with token errors even with valid tokens (known Vikunja API limitation)
|
|
1282
|
-
- **Bulk operations**: May have authentication issues with certain Vikunja API versions
|
|
1283
|
-
- **Label operations**: May fail with authentication errors on some server configurations
|
|
1284
|
-
- **Assignee operations**: May fail with authentication errors when creating/updating tasks with assignees
|
|
1285
1333
|
- The server provides detailed error messages when these issues occur, suggesting workarounds
|
|
1286
1334
|
|
|
1287
1335
|
## Security & Performance Features
|
|
@@ -1324,6 +1372,10 @@ DEBUG=true
|
|
|
1324
1372
|
|
|
1325
1373
|
# Set log level (error, warn, info, debug)
|
|
1326
1374
|
LOG_LEVEL=debug
|
|
1375
|
+
|
|
1376
|
+
# Bulk create/update write concurrency (default: 1 — safe for SQLite)
|
|
1377
|
+
# Raise only if Vikunja uses a DB that tolerates parallel writers (e.g. Postgres)
|
|
1378
|
+
VIKUNJA_BULK_WRITE_CONCURRENCY=1
|
|
1327
1379
|
```
|
|
1328
1380
|
|
|
1329
1381
|
#### Security & Performance Configuration
|
|
@@ -1365,9 +1417,9 @@ For detailed rate limiting configuration, see [`docs/RATE_LIMITING.md`](docs/RAT
|
|
|
1365
1417
|
- [x] ✅ **Test coverage** - 98.91% function coverage achieved
|
|
1366
1418
|
- [x] ✅ **Architecture simplification** - 90% code reduction with enhanced maintainability
|
|
1367
1419
|
- [x] ✅ **Production-ready resilience** - Opossum circuit breaker and Zod validation
|
|
1420
|
+
- [x] ✅ **Integration tests** - Dockerized MCP tests against Vikunja 2.5 (`npm run test:mcp`)
|
|
1368
1421
|
- [ ] Add webhook subscriptions for real-time updates
|
|
1369
1422
|
- [ ] Add caching for frequently accessed data
|
|
1370
|
-
- [ ] Add integration tests with real Vikunja instance
|
|
1371
1423
|
- [ ] Implement persistent storage for saved filters (optional - in-memory works well)
|
|
1372
1424
|
|
|
1373
1425
|
## Contributing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskCreationService.d.ts","sourceRoot":"","sources":["../../src/services/TaskCreationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TaskCreationService.d.ts","sourceRoot":"","sources":["../../src/services/TaskCreationService.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAqD/D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B;;;;;;;;;OASG;IACG,UAAU,CACd,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,kBAAkB,EAC1B,UAAU,EAAE,sBAAsB,EAClC,WAAW,GAAE,OAAc,GAC1B,OAAO,CAAC,kBAAkB,CAAC;IA2D9B;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAmCvB;;;;;;;;OAQG;YACW,cAAc;IAqB5B;;;;;;;;OAQG;YACW,qBAAqB;IA8EnC;;;;;;;OAOG;YACW,qBAAqB;IAsBnC;;;;;;;OAOG;IACH,OAAO,CAAC,0BAA0B;IAmBlC;;;;;;;;;OASG;YACW,oBAAoB;IA2DlC;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;CAUxB"}
|
|
@@ -4,6 +4,8 @@ exports.TaskCreationService = void 0;
|
|
|
4
4
|
const logger_1 = require("../utils/logger");
|
|
5
5
|
const types_1 = require("../types");
|
|
6
6
|
const auth_error_handler_1 = require("../utils/auth-error-handler");
|
|
7
|
+
const labels_1 = require("../tools/tasks/labels");
|
|
8
|
+
const assignees_1 = require("../tools/tasks/assignees");
|
|
7
9
|
/**
|
|
8
10
|
* Converts TaskCreationData to a Task object compatible with node-vikunja API
|
|
9
11
|
* This ensures type safety by properly mapping fields and handling optional properties
|
|
@@ -204,10 +206,14 @@ class TaskCreationService {
|
|
|
204
206
|
.filter((id) => id !== undefined);
|
|
205
207
|
if (labelIds.length > 0 && createdTask.id) {
|
|
206
208
|
try {
|
|
207
|
-
//
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
// Uses the INDIVIDUAL endpoint rather than the bulk one. The warning below
|
|
210
|
+
// ("API token limitation") actually described a BULK failure, not a token
|
|
211
|
+
// limitation: Vikunja expects `{labels: [...]}` on that route, so `{label_ids: […]}`
|
|
212
|
+
// is discarded and the server applies an empty list while answering 201. With the
|
|
213
|
+
// individual `PUT /tasks/{id}/labels` (201) labels apply fine with an API token.
|
|
214
|
+
// The verification below is kept: checking beats assuming.
|
|
215
|
+
// The task was just created, so `currentLabelIds: []` avoids an extra read.
|
|
216
|
+
const updateResult = await (0, labels_1.addLabelsToTaskAdditive)(client, createdTask.id, labelIds, { currentLabelIds: [] });
|
|
211
217
|
// Verify the labels were actually assigned (API tokens may silently fail)
|
|
212
218
|
const labelsActuallyAssigned = await this.verifyLabelAssignment(client, createdTask.id, labelIds);
|
|
213
219
|
if (!labelsActuallyAssigned) {
|
|
@@ -218,7 +224,7 @@ class TaskCreationService {
|
|
|
218
224
|
labelNames: task.labels,
|
|
219
225
|
updateResult,
|
|
220
226
|
});
|
|
221
|
-
warnings.push(`Labels specified but not assigned
|
|
227
|
+
warnings.push(`Labels specified but not assigned. Verify the API token has the nested 'tasks_labels' permission.`);
|
|
222
228
|
}
|
|
223
229
|
else {
|
|
224
230
|
logger_1.logger.debug('Labels assigned and verified successfully', {
|
|
@@ -323,9 +329,7 @@ class TaskCreationService {
|
|
|
323
329
|
.filter((id) => id !== undefined);
|
|
324
330
|
if (userIds.length > 0 && createdTask.id) {
|
|
325
331
|
try {
|
|
326
|
-
await
|
|
327
|
-
user_ids: userIds,
|
|
328
|
-
});
|
|
332
|
+
await (0, assignees_1.addAssigneesToTaskAdditive)(client, createdTask.id, userIds, { currentAssigneeIds: [] });
|
|
329
333
|
}
|
|
330
334
|
catch (assignError) {
|
|
331
335
|
logger_1.logger.error('Failed to assign users to task', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskCreationService.js","sourceRoot":"","sources":["../../src/services/TaskCreationService.ts"],"names":[],"mappings":";;;AAAA,4CAAyC;AAEzC,oCAA+C;AAC/C,oEAAoE;
|
|
1
|
+
{"version":3,"file":"TaskCreationService.js","sourceRoot":"","sources":["../../src/services/TaskCreationService.ts"],"names":[],"mappings":";;;AAAA,4CAAyC;AAEzC,oCAA+C;AAC/C,oEAAoE;AACpE,kDAAgE;AAChE,wDAAsE;AAMtE;;;GAGG;AACH,SAAS,6BAA6B,CAAC,QAA0B;IAC/D,qFAAqF;IACrF,+EAA+E;IAC/E,MAAM,aAAa,GAAS;QAC1B,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,UAAU,EAAE,QAAQ,CAAC,UAAU;KAChC,CAAC;IAEF,oFAAoF;IACpF,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAChC,aAAa,CAAC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qDAAqD;QACrD,eAAM,CAAC,IAAI,CAAC,+CAA+C,EAAE;YAC3D,MAAM,EAAE,MAAM,IAAI,SAAS;YAC3B,SAAS;SACV,CAAC,CAAC;QACH,OAAO,wGAAwG,CAAC;IAClH,CAAC;CACF;AA1XD,kDA0XC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-crud.d.ts","sourceRoot":"","sources":["../../src/tools/task-crud.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAoF3E;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,WAAW,EACxB,aAAa,CAAC,EAAE,oBAAoB,GACnC,IAAI,
|
|
1
|
+
{"version":3,"file":"task-crud.d.ts","sourceRoot":"","sources":["../../src/tools/task-crud.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAoF3E;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,WAAW,EACxB,aAAa,CAAC,EAAE,oBAAoB,GACnC,IAAI,CAyGN"}
|
package/dist/tools/task-crud.js
CHANGED
|
@@ -84,6 +84,8 @@ function registerTaskCrudTool(server, authManager, clientFactory) {
|
|
|
84
84
|
projectId: zod_1.z.number().optional(),
|
|
85
85
|
dueDate: zod_1.z.string().optional(),
|
|
86
86
|
priority: zod_1.z.number().min(0).max(5).optional(),
|
|
87
|
+
/** Completion percentage 0–100 (Vikunja percent_done) */
|
|
88
|
+
percentDone: zod_1.z.number().min(0).max(100).optional(),
|
|
87
89
|
labels: zod_1.z.array(zod_1.z.number()).optional(),
|
|
88
90
|
assignees: zod_1.z.array(zod_1.z.number()).optional(),
|
|
89
91
|
// Recurring task fields
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-crud.js","sourceRoot":"","sources":["../../src/tools/task-crud.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA4FH,
|
|
1
|
+
{"version":3,"file":"task-crud.js","sourceRoot":"","sources":["../../src/tools/task-crud.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA4FH,oDA6GC;AAtMD,6BAAwB;AAIxB,oCAA+C;AAC/C,sCAAyE;AACzE,4CAAyC;AACzC,4CAAkD;AAGlD,8CAAiF;AACjF,mDAAoE;AACpE,0DAAmF;AACnF,8DAAoF;AAEpF;;GAEG;AACH,KAAK,UAAU,iBAAiB,CAAC,WAAwB;IACvD,MAAM,OAAO,GAAG,WAAW,CAAC,UAAU,EAAE,CAAC;IACzC,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;IAC3G,OAAO,sBAAc,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9E,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,SAAS,CACtB,IAAqB,EACrB,OAA8D;IAE9D,IAAI,CAAC;QACH,iEAAiE;QACjE,MAAM,eAAe,GAAG,MAAM,iCAAyB,CAAC,oBAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE5F,qCAAqC;QACrC,IAAI,gBAAgB,GAAG,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC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,CAAC;oBACd,wDAAwD;oBACxD,IAAI,IAAI,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;wBAC1B,MAAM,IAAI,gBAAQ,CAAC,iBAAS,CAAC,gBAAgB,EAAE,sCAAsC,CAAC,CAAC;oBACzF,CAAC;oBACD,OAAO,MAAM,IAAA,kBAAU,EAAC,IAAsB,CAAC,CAAC;gBAClD,CAAC;gBAED;oBACE,MAAM,IAAI,gBAAQ,CAChB,iBAAS,CAAC,gBAAgB,EAC1B,sBAAsB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAC/C,CAAC;YACN,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,gBAAQ,EAAE,CAAC;gBAC9B,MAAM,KAAK,CAAC;YACd,CAAC;YACD,MAAM,IAAI,gBAAQ,CAChB,iBAAS,CAAC,cAAc,EACxB,8BAA8B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACvF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -3,12 +3,41 @@
|
|
|
3
3
|
* Handles core business logic for task assignee management
|
|
4
4
|
*/
|
|
5
5
|
import type { MinimalTask, TaskWithAssignees, Assignee } from '../../../types';
|
|
6
|
+
import type { VikunjaClient } from 'node-vikunja';
|
|
7
|
+
/**
|
|
8
|
+
* Adds assignees to a task WITHOUT replacing the ones it already has.
|
|
9
|
+
*
|
|
10
|
+
* `node-vikunja`'s `bulkAssignUsersToTask` posts `{user_ids: [...]}` to
|
|
11
|
+
* `POST /tasks/{id}/assignees/bulk`, but Vikunja expects
|
|
12
|
+
* `{assignees: [{id: N}]}`. The unknown field is ignored, the server returns
|
|
13
|
+
* HTTP 201 with nobody assigned, and callers that trust 2xx report success
|
|
14
|
+
* (upstream issue #15 / node-vikunja#3).
|
|
15
|
+
*
|
|
16
|
+
* Even with a correct bulk payload, that endpoint replaces the whole set.
|
|
17
|
+
* The individual endpoint (`PUT /tasks/{id}/assignees` with `{user_id}`)
|
|
18
|
+
* actually applies and is additive — same pattern as labels.
|
|
19
|
+
*
|
|
20
|
+
* @param currentAssigneeIds IDs already on the task. Read from the server if omitted.
|
|
21
|
+
* Callers that have just CREATED the task pass `[]` and skip the read.
|
|
22
|
+
*/
|
|
23
|
+
export declare function addAssigneesToTaskAdditive(client: VikunjaClient, taskId: number, assigneeIds: number[], options?: {
|
|
24
|
+
currentAssigneeIds?: number[];
|
|
25
|
+
}): Promise<{
|
|
26
|
+
added: number[];
|
|
27
|
+
kept: number[];
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Returns requested assignee IDs that are missing from a task payload.
|
|
31
|
+
*/
|
|
32
|
+
export declare function findMissingAssigneeIds(assignees: Array<{
|
|
33
|
+
id?: number;
|
|
34
|
+
}> | undefined, requestedIds: number[]): number[];
|
|
6
35
|
/**
|
|
7
36
|
* Service for managing task assignee operations
|
|
8
37
|
*/
|
|
9
38
|
export declare const AssigneeOperationsService: {
|
|
10
39
|
/**
|
|
11
|
-
* Assign multiple users to a task
|
|
40
|
+
* Assign multiple users to a task (additive; does not clear existing assignees).
|
|
12
41
|
*/
|
|
13
42
|
assignUsersToTask(taskId: number, assigneeIds: number[]): Promise<void>;
|
|
14
43
|
/**
|
|
@@ -27,5 +56,10 @@ export declare const AssigneeOperationsService: {
|
|
|
27
56
|
* Create minimal task representation with assignees
|
|
28
57
|
*/
|
|
29
58
|
createMinimalTaskWithAssignees(task: TaskWithAssignees): MinimalTask;
|
|
59
|
+
/**
|
|
60
|
+
* Re-fetch the task and return requested IDs that did not persist.
|
|
61
|
+
* Empty result means either all stuck, or verification itself failed (fail-open).
|
|
62
|
+
*/
|
|
63
|
+
verifyAssignees(taskId: number, requestedIds: number[]): Promise<number[]>;
|
|
30
64
|
};
|
|
31
65
|
//# sourceMappingURL=AssigneeOperationsService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssigneeOperationsService.d.ts","sourceRoot":"","sources":["../../../../src/tools/tasks/assignees/AssigneeOperationsService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"AssigneeOperationsService.d.ts","sourceRoot":"","sources":["../../../../src/tools/tasks/assignees/AssigneeOperationsService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAKlD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EAAE,EACrB,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GAC9C,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAuB9C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,KAAK,CAAC;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,EAC7C,YAAY,EAAE,MAAM,EAAE,GACrB,MAAM,EAAE,CAOV;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB;IACpC;;OAEG;8BAC6B,MAAM,eAAe,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB7E;;OAEG;gCAC+B,MAAM,WAAW,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B3E;;OAEG;mCACkC,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAexE;;OAEG;2BACoB,iBAAiB,GAAG,QAAQ,EAAE;IAIrD;;OAEG;yCACkC,iBAAiB,GAAG,WAAW;IAUpE;;;OAGG;4BAC2B,MAAM,gBAAgB,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CASjF,CAAC"}
|