@joyjit/vikunja-mcp 0.3.0 → 0.3.2
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 +28 -0
- package/README.md +69 -32
- package/dist/client/VikunjaClientFactory.d.ts.map +1 -1
- package/dist/client/VikunjaClientFactory.js +3 -0
- package/dist/client/VikunjaClientFactory.js.map +1 -1
- package/dist/client/patchGetAllTasks.d.ts +11 -0
- package/dist/client/patchGetAllTasks.d.ts.map +1 -0
- package/dist/client/patchGetAllTasks.js +20 -0
- package/dist/client/patchGetAllTasks.js.map +1 -0
- 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 +23 -22
- 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/dist/utils/security.d.ts +0 -1
- package/dist/utils/security.d.ts.map +1 -1
- package/dist/utils/security.js +2 -11
- package/dist/utils/security.js.map +1 -1
- package/dist/utils/simple-response.d.ts.map +1 -1
- package/dist/utils/simple-response.js +3 -2
- package/dist/utils/simple-response.js.map +1 -1
- package/dist/utils/validation.d.ts +9 -20
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +11 -209
- package/dist/utils/validation.js.map +1 -1
- package/package.json +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.2 — 2026-08-11
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- Serialize bulk create/update writes (default concurrency 1) and retry SQLite lock / 5xx errors (`VIKUNJA_BULK_WRITE_CONCURRENCY` to raise on Postgres)
|
|
8
|
+
- Assignees on create/assign use per-user APIs and verify persistence (Vikunja ignores the bulk assign body)
|
|
9
|
+
- Labels use additive `PUT` instead of the bulk labels route that cleared labels
|
|
10
|
+
- Task `percentDone` (0–100) on create / update / bulk
|
|
11
|
+
- Filtered task lists apply `done` / `filter` server-side before pagination (client-side fallback unchanged)
|
|
12
|
+
|
|
13
|
+
### Platform
|
|
14
|
+
|
|
15
|
+
- Bump nested dep overrides (`js-yaml`, audit pins) so npm audit stays clean
|
|
16
|
+
- README updated for fork highlights, team ops, and bulk concurrency
|
|
17
|
+
|
|
18
|
+
## 0.3.1 — 2026-07-26
|
|
19
|
+
|
|
20
|
+
### Fixes
|
|
21
|
+
|
|
22
|
+
- Pass task content through to Vikunja (no local content blocklist / false rejects)
|
|
23
|
+
- Include all list items in success responses (no silent drop when more than 10)
|
|
24
|
+
- Use `GET /tasks` for getAllTasks on Vikunja 2.x (node-vikunja still called `/tasks/all`)
|
|
25
|
+
|
|
26
|
+
### Platform
|
|
27
|
+
|
|
28
|
+
- Pin nested deps (`@hono/node-server`, `fast-uri`, `brace-expansion`) so npm audit stays clean
|
|
29
|
+
- Weekly Hono override watch: open an undo PR when the MCP SDK no longer needs the pin
|
|
30
|
+
|
|
3
31
|
## 0.3.0 — 2026-07-18
|
|
4
32
|
|
|
5
33
|
Republish after npm package delete + GitHub release cleanup. First clean release with working CI publish token (bypass 2FA, empty IP allowlist).
|
package/README.md
CHANGED
|
@@ -6,13 +6,20 @@ Upstream is slow to merge and release. This fork ships Vikunja **2.3**-ready fix
|
|
|
6
6
|
|
|
7
7
|
### Fork highlights (vs upstream npm `0.2.0`)
|
|
8
8
|
|
|
9
|
+
- **Thin wrapper**: task titles/descriptions are passed through to Vikunja unchanged — no local content blocklist (words like “format” or HTML are not rejected here)
|
|
9
10
|
- **No HTML-encoding** of titles/descriptions before API calls (real HTML task bodies work)
|
|
10
11
|
- **bulk-update** preserves fields it was not asked to change
|
|
11
12
|
- **Task `projectId` update** actually moves the task; labels apply on create
|
|
12
13
|
- **Project partial update** keeps title / parent instead of wiping them
|
|
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)
|
|
13
20
|
- **Node.js 24** + Dockerized MCP integration CI against Vikunja 2.3
|
|
14
21
|
|
|
15
|
-
A Model Context Protocol (MCP) server that enables AI assistants to interact with Vikunja task management instances.
|
|
22
|
+
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.
|
|
16
23
|
|
|
17
24
|
## Features
|
|
18
25
|
|
|
@@ -21,7 +28,7 @@ A Model Context Protocol (MCP) server that enables AI assistants to interact wit
|
|
|
21
28
|
- **Full task management** operations implemented
|
|
22
29
|
- **Complete project management** with CRUD operations
|
|
23
30
|
- **Label management** for organizing tasks
|
|
24
|
-
- **Team operations** for collaboration (get/update/members
|
|
31
|
+
- **Team operations** for collaboration (list/create/get/update/delete/members)
|
|
25
32
|
- **User management** with settings and search
|
|
26
33
|
- **Webhook management** for project automation
|
|
27
34
|
- **Batch import** tasks from CSV or JSON files
|
|
@@ -48,7 +55,7 @@ This release represents a **massive architectural simplification** that eliminat
|
|
|
48
55
|
### Zod-Based Filter System (850+ Lines Removed)
|
|
49
56
|
- **Before**: Custom tokenizer, parser, and validator with security vulnerabilities
|
|
50
57
|
- **After**: Secure Zod schema validation with production-ready parsing
|
|
51
|
-
- **Enhanced**: DoS protection
|
|
58
|
+
- **Enhanced**: DoS protection and comprehensive error handling
|
|
52
59
|
- **Result**: Faster parsing, better security, and enterprise-grade reliability
|
|
53
60
|
|
|
54
61
|
### Production-Ready Retry System (580+ Lines Replaced)
|
|
@@ -87,7 +94,7 @@ All improvements maintain **100% backward compatibility** with existing implemen
|
|
|
87
94
|
|
|
88
95
|
Requires **Node.js 24+**. Use an API token (`tk_…`) or JWT from your Vikunja instance.
|
|
89
96
|
|
|
90
|
-
Pin a version if you want: `"args": ["-y", "@joyjit/vikunja-mcp@0.3.
|
|
97
|
+
Pin a version if you want (example): `"args": ["-y", "@joyjit/vikunja-mcp@0.3.2"]`.
|
|
91
98
|
|
|
92
99
|
### Option 2: Install from GitHub (no npm needed)
|
|
93
100
|
|
|
@@ -296,8 +303,9 @@ vikunja_tasks.create({
|
|
|
296
303
|
description: "Update README with examples",
|
|
297
304
|
dueDate: "2024-12-31T23:59:59Z",
|
|
298
305
|
priority: 3,
|
|
299
|
-
|
|
300
|
-
|
|
306
|
+
percentDone: 25, // 0–100 (Vikunja percent_done)
|
|
307
|
+
labels: [1, 2], // Label IDs (added; does not clear existing)
|
|
308
|
+
assignees: [1, 3] // User IDs (verified after assign)
|
|
301
309
|
})
|
|
302
310
|
|
|
303
311
|
// Create a recurring task (repeats every week)
|
|
@@ -325,7 +333,8 @@ vikunja_tasks.get({ id: 123 })
|
|
|
325
333
|
vikunja_tasks.update({
|
|
326
334
|
id: 123,
|
|
327
335
|
done: true,
|
|
328
|
-
priority: 5
|
|
336
|
+
priority: 5,
|
|
337
|
+
percentDone: 100
|
|
329
338
|
})
|
|
330
339
|
|
|
331
340
|
// Move a task to another project (full-model merge; verified after update)
|
|
@@ -466,7 +475,13 @@ vikunja_tasks.bulk-update({
|
|
|
466
475
|
vikunja_tasks.bulk-update({
|
|
467
476
|
taskIds: [123, 124, 125],
|
|
468
477
|
field: "labels",
|
|
469
|
-
value: [1, 3, 5] //
|
|
478
|
+
value: [1, 3, 5] // Adds these labels (does not clear others)
|
|
479
|
+
})
|
|
480
|
+
|
|
481
|
+
vikunja_tasks.bulk-update({
|
|
482
|
+
taskIds: [123, 124, 125],
|
|
483
|
+
field: "percent_done",
|
|
484
|
+
value: 50
|
|
470
485
|
})
|
|
471
486
|
|
|
472
487
|
// Bulk delete multiple tasks (max 100)
|
|
@@ -741,6 +756,8 @@ vikunja_labels.update({
|
|
|
741
756
|
vikunja_labels.delete({ id: 1 })
|
|
742
757
|
|
|
743
758
|
// --- Label Assignment to Tasks ---
|
|
759
|
+
// Labels are ADDED (missing only). Already-present labels are a no-op.
|
|
760
|
+
// Passing an empty list does not clear labels.
|
|
744
761
|
|
|
745
762
|
// Apply multiple labels to a task
|
|
746
763
|
vikunja_tasks.apply-label({
|
|
@@ -784,11 +801,23 @@ vikunja_teams.create({
|
|
|
784
801
|
description: "Responsible for UI/UX development"
|
|
785
802
|
})
|
|
786
803
|
|
|
804
|
+
// Get a team by ID (direct API; not in node-vikunja)
|
|
805
|
+
vikunja_teams.get({ id: 1 })
|
|
806
|
+
|
|
807
|
+
// Update a team
|
|
808
|
+
vikunja_teams.update({
|
|
809
|
+
id: 1,
|
|
810
|
+
name: "Frontend & Design",
|
|
811
|
+
description: "UI/UX and design systems"
|
|
812
|
+
})
|
|
813
|
+
|
|
814
|
+
// List / add / remove / update members
|
|
815
|
+
vikunja_teams.members({ id: 1, memberSubcommand: "list" })
|
|
816
|
+
vikunja_teams.members({ id: 1, memberSubcommand: "add", userId: 42 })
|
|
817
|
+
vikunja_teams.members({ id: 1, memberSubcommand: "remove", userId: 42 })
|
|
818
|
+
|
|
787
819
|
// Delete a team
|
|
788
820
|
vikunja_teams.delete({ id: 1 })
|
|
789
|
-
|
|
790
|
-
// Note: get, update, and members operations are not yet
|
|
791
|
-
// implemented in the node-vikunja library
|
|
792
821
|
```
|
|
793
822
|
|
|
794
823
|
### User Management Examples
|
|
@@ -1048,27 +1077,35 @@ This standardized format ensures:
|
|
|
1048
1077
|
- `list` - List tasks with filters
|
|
1049
1078
|
- Filter by project or get all tasks
|
|
1050
1079
|
- Support for pagination, search, sorting
|
|
1051
|
-
- Filter by completion status
|
|
1080
|
+
- Filter by completion status (`done` is folded into the server filter when possible)
|
|
1052
1081
|
- Apply saved filters with `filterId` parameter
|
|
1082
|
+
- Hybrid filtering: tries server-side first, falls back to client-side
|
|
1053
1083
|
- `create` - Create a new task
|
|
1054
1084
|
- Required: title, projectId
|
|
1055
|
-
- Optional: description, dueDate, priority, labels, assignees
|
|
1085
|
+
- Optional: description, dueDate, priority, percentDone (0–100), labels, assignees
|
|
1086
|
+
- Labels are applied additively after create; assignees use per-user assign + verify
|
|
1056
1087
|
- Validates date format (ISO 8601) and IDs
|
|
1057
1088
|
- `get` - Get task details by ID
|
|
1058
1089
|
- `update` - Update existing task
|
|
1059
1090
|
- Supports partial updates (GET + merge before POST — Vikunja replaces the full model)
|
|
1060
|
-
- Can update title, description, dueDate, priority, done status
|
|
1091
|
+
- Can update title, description, dueDate, priority, percentDone, done status
|
|
1061
1092
|
- Can move tasks between projects with `projectId` (verified after update)
|
|
1062
|
-
- Can update labels and assignees (
|
|
1093
|
+
- Can update labels (additive) and assignees (diff-based per-user APIs)
|
|
1063
1094
|
- `delete` - Delete a task by ID
|
|
1064
1095
|
- `assign` - Bulk assign users to tasks
|
|
1065
1096
|
- `unassign` - Remove users from tasks
|
|
1066
1097
|
- `comment` - List or add comments to tasks
|
|
1098
|
+
- `bulk-create` - Create multiple tasks at once
|
|
1099
|
+
- Required: projectId, tasks array (max 100)
|
|
1100
|
+
- Per task: title required; optional description, dueDate, priority, percentDone, labels, assignees, repeat
|
|
1101
|
+
- Default write concurrency is 1 (SQLite-safe); override with `VIKUNJA_BULK_WRITE_CONCURRENCY`
|
|
1102
|
+
- Retries transient lock / 5xx errors per item
|
|
1067
1103
|
- `bulk-update` - Update multiple tasks at once
|
|
1068
1104
|
- Required: taskIds array, field name, value
|
|
1069
|
-
- Supported fields: done, priority, due_date, project_id, assignees, labels
|
|
1105
|
+
- Supported fields: done, priority, due_date, percent_done, project_id, assignees, labels
|
|
1070
1106
|
- Validates field types and values
|
|
1071
1107
|
- Uses per-task fetch+merge+update (does not call Vikunja's native bulk API, which can wipe omitted fields — see #46)
|
|
1108
|
+
- Same SQLite-safe concurrency / retry behavior as bulk-create
|
|
1072
1109
|
- ⚠️ Performance: O(n) get+update calls (n = number of tasks)
|
|
1073
1110
|
- `bulk-delete` - Delete multiple tasks at once
|
|
1074
1111
|
- Required: taskIds array
|
|
@@ -1145,7 +1182,7 @@ This standardized format ensures:
|
|
|
1145
1182
|
- `delete` - Delete a label by ID
|
|
1146
1183
|
- `apply-label` - Apply one or more labels to a task
|
|
1147
1184
|
- Required: task id, labels array
|
|
1148
|
-
-
|
|
1185
|
+
- Additive: adds missing labels; already-present labels are ignored (no abort)
|
|
1149
1186
|
- `remove-label` - Remove one or more labels from a task
|
|
1150
1187
|
- Required: task id, labels array
|
|
1151
1188
|
- Supports bulk label removal
|
|
@@ -1176,16 +1213,18 @@ This standardized format ensures:
|
|
|
1176
1213
|
- Creates all tasks with labels from template
|
|
1177
1214
|
|
|
1178
1215
|
### Team Management ✅
|
|
1179
|
-
- `vikunja_teams` - Team operations (
|
|
1216
|
+
- `vikunja_teams` - Team operations (fully implemented; get/update/members use direct API calls where node-vikunja is incomplete)
|
|
1180
1217
|
- `list` - List all teams with filters
|
|
1181
1218
|
- Support for pagination and search
|
|
1182
1219
|
- `create` - Create new team
|
|
1183
1220
|
- Required: name
|
|
1184
1221
|
- Optional: description
|
|
1222
|
+
- `get` - Get team by ID
|
|
1223
|
+
- `update` - Update team name / description
|
|
1185
1224
|
- `delete` - Delete a team by ID (with fallback API support)
|
|
1186
|
-
- `
|
|
1187
|
-
|
|
1188
|
-
|
|
1225
|
+
- `members` - Manage membership
|
|
1226
|
+
- `memberSubcommand`: `list` (default), `add`, `remove`, `update`
|
|
1227
|
+
- `userId` required for add/remove/update; `admin` optional (required for update)
|
|
1189
1228
|
|
|
1190
1229
|
### User Management ✅
|
|
1191
1230
|
- `vikunja_users` - User operations (fully implemented) **[Requires JWT authentication]**
|
|
@@ -1270,24 +1309,18 @@ This standardized format ensures:
|
|
|
1270
1309
|
## Known Limitations
|
|
1271
1310
|
|
|
1272
1311
|
1. **File Attachments**: The `attach` subcommand is not implemented due to MCP protocol limitations
|
|
1273
|
-
2. **
|
|
1274
|
-
- Cannot get team by ID
|
|
1275
|
-
- Cannot update team information
|
|
1276
|
-
- Cannot delete teams
|
|
1277
|
-
- Cannot manage team members
|
|
1312
|
+
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
|
|
1278
1313
|
3. **Pagination**: Some endpoints may not fully support pagination parameters due to API limitations
|
|
1279
1314
|
4. **Authentication Issues**: Some Vikunja API endpoints have known authentication issues:
|
|
1280
1315
|
- **User endpoints**: May fail with token errors even with valid tokens (known Vikunja API limitation)
|
|
1281
|
-
- **Bulk operations**: May have authentication issues with certain Vikunja API versions
|
|
1282
|
-
- **Label operations**: May fail with authentication errors on some server configurations
|
|
1283
|
-
- **Assignee operations**: May fail with authentication errors when creating/updating tasks with assignees
|
|
1284
1316
|
- The server provides detailed error messages when these issues occur, suggesting workarounds
|
|
1285
1317
|
|
|
1286
1318
|
## Security & Performance Features
|
|
1287
1319
|
|
|
1288
1320
|
### Security Enhancements
|
|
1289
|
-
- **
|
|
1290
|
-
- **
|
|
1321
|
+
- **Thin content policy**: Titles and descriptions are forwarded to Vikunja as sent. This server does **not** run a content blocklist (that caused false positives on ordinary English like “format” / “information”). HTML/XSS handling is Vikunja’s responsibility at store/render time.
|
|
1322
|
+
- **Zod Schema Validation**: Type and shape checks for tool arguments (IDs, dates, enums, filter structure)
|
|
1323
|
+
- **DoS Protection**: Length/nesting limits on filters, rate limits, and payload size restrictions
|
|
1291
1324
|
- **Credential Protection**: Automatic masking of sensitive tokens and URLs in logs and error messages
|
|
1292
1325
|
- **Entity Resolution Service**: Robust label and user mapping with defensive error handling for malformed API responses
|
|
1293
1326
|
- **Rate Limiting**: Configurable request rate limits and payload size restrictions to prevent DoS attacks
|
|
@@ -1322,6 +1355,10 @@ DEBUG=true
|
|
|
1322
1355
|
|
|
1323
1356
|
# Set log level (error, warn, info, debug)
|
|
1324
1357
|
LOG_LEVEL=debug
|
|
1358
|
+
|
|
1359
|
+
# Bulk create/update write concurrency (default: 1 — safe for SQLite)
|
|
1360
|
+
# Raise only if Vikunja uses a DB that tolerates parallel writers (e.g. Postgres)
|
|
1361
|
+
VIKUNJA_BULK_WRITE_CONCURRENCY=1
|
|
1325
1362
|
```
|
|
1326
1363
|
|
|
1327
1364
|
#### Security & Performance Configuration
|
|
@@ -1363,9 +1400,9 @@ For detailed rate limiting configuration, see [`docs/RATE_LIMITING.md`](docs/RAT
|
|
|
1363
1400
|
- [x] ✅ **Test coverage** - 98.91% function coverage achieved
|
|
1364
1401
|
- [x] ✅ **Architecture simplification** - 90% code reduction with enhanced maintainability
|
|
1365
1402
|
- [x] ✅ **Production-ready resilience** - Opossum circuit breaker and Zod validation
|
|
1403
|
+
- [x] ✅ **Integration tests** - Dockerized MCP tests against Vikunja 2.3 (`npm run test:mcp`)
|
|
1366
1404
|
- [ ] Add webhook subscriptions for real-time updates
|
|
1367
1405
|
- [ ] Add caching for frequently accessed data
|
|
1368
|
-
- [ ] Add integration tests with real Vikunja instance
|
|
1369
1406
|
- [ ] Implement persistent storage for saved filters (optional - in-memory works well)
|
|
1370
1407
|
|
|
1371
1408
|
## Contributing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VikunjaClientFactory.d.ts","sourceRoot":"","sources":["../../src/client/VikunjaClientFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"VikunjaClientFactory.d.ts","sourceRoot":"","sources":["../../src/client/VikunjaClientFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAG/E;;;GAGG;AACH,qBAAa,oBAAoB;IAM7B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IANrC,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,eAAe,CAAuB;gBAG3B,WAAW,EAAE,WAAW,EACxB,kBAAkB,EAAE,wBAAwB;IAG/D;;OAEG;IACH,SAAS,IAAI,aAAa;IA2B1B;;OAEG;IACH,OAAO,IAAI,IAAI;IAMf;;OAEG;IACH,eAAe,IAAI,OAAO;CAQ3B"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.VikunjaClientFactory = void 0;
|
|
8
|
+
const patchGetAllTasks_1 = require("./patchGetAllTasks");
|
|
8
9
|
/**
|
|
9
10
|
* Factory for creating and managing Vikunja client instances
|
|
10
11
|
* Uses dependency injection instead of global state
|
|
@@ -33,6 +34,8 @@ class VikunjaClientFactory {
|
|
|
33
34
|
this.clientInstance = null;
|
|
34
35
|
}
|
|
35
36
|
this.clientInstance = new this.VikunjaClientClass(session.apiUrl, session.apiToken);
|
|
37
|
+
// Vikunja 2.x: getAllTasks must use /tasks, not /tasks/all
|
|
38
|
+
(0, patchGetAllTasks_1.patchGetAllTasksForVikunja2)(this.clientInstance);
|
|
36
39
|
this.currentApiUrl = session.apiUrl;
|
|
37
40
|
this.currentApiToken = session.apiToken;
|
|
38
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VikunjaClientFactory.js","sourceRoot":"","sources":["../../src/client/VikunjaClientFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"VikunjaClientFactory.js","sourceRoot":"","sources":["../../src/client/VikunjaClientFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,yDAAiE;AAEjE;;;GAGG;AACH,MAAa,oBAAoB;IAMZ;IACA;IANX,cAAc,GAAyB,IAAI,CAAC;IAC5C,aAAa,GAAkB,IAAI,CAAC;IACpC,eAAe,GAAkB,IAAI,CAAC;IAE9C,YACmB,WAAwB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M,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AA5DD,oDA4DC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* node-vikunja 0.4.0 calls GET /tasks/all for getAllTasks().
|
|
3
|
+
* Vikunja 2.x does not serve that path (HTTP 400, code 2004).
|
|
4
|
+
* The correct path is GET /tasks.
|
|
5
|
+
*
|
|
6
|
+
* Remove this shim once node-vikunja publishes a fix
|
|
7
|
+
* (democratize-technology/node-vikunja#4 / vikunja-mcp#40).
|
|
8
|
+
*/
|
|
9
|
+
import type { VikunjaClient } from 'node-vikunja';
|
|
10
|
+
export declare function patchGetAllTasksForVikunja2(client: VikunjaClient): void;
|
|
11
|
+
//# sourceMappingURL=patchGetAllTasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patchGetAllTasks.d.ts","sourceRoot":"","sources":["../../src/client/patchGetAllTasks.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAwB,aAAa,EAAE,MAAM,cAAc,CAAC;AAYxE,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CASvE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* node-vikunja 0.4.0 calls GET /tasks/all for getAllTasks().
|
|
4
|
+
* Vikunja 2.x does not serve that path (HTTP 400, code 2004).
|
|
5
|
+
* The correct path is GET /tasks.
|
|
6
|
+
*
|
|
7
|
+
* Remove this shim once node-vikunja publishes a fix
|
|
8
|
+
* (democratize-technology/node-vikunja#4 / vikunja-mcp#40).
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.patchGetAllTasksForVikunja2 = patchGetAllTasksForVikunja2;
|
|
12
|
+
function patchGetAllTasksForVikunja2(client) {
|
|
13
|
+
const tasks = client.tasks;
|
|
14
|
+
if (!tasks || typeof tasks.request !== 'function') {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const request = tasks.request.bind(tasks);
|
|
18
|
+
tasks.getAllTasks = (params) => request('/tasks', 'GET', undefined, params !== undefined ? { params } : {});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=patchGetAllTasks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patchGetAllTasks.js","sourceRoot":"","sources":["../../src/client/patchGetAllTasks.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAcH,kEASC;AATD,SAAgB,2BAA2B,CAAC,MAAqB;IAC/D,MAAM,KAAK,GAAG,MAAM,CAAC,KAAsD,CAAC;IAC5E,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QAClD,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,KAAK,CAAC,WAAW,GAAG,CAAC,MAAuB,EAAmB,EAAE,CAC/D,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -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":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MAAM,EAAE,WAAW,CAAC,EAAE;oBACtB,OAAO;oBACP,SAAS,EAAE,IAAI,CAAC,SAAS;oBACzB,KAAK,EAAE,WAAW,YAAY,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;iBAChF,CAAC,CAAC;gBACH,QAAQ,CAAC,IAAI,CAAC,2BAA2B,WAAW,YAAY,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;YACnH,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;OAMG;IACK,eAAe,CAAC,MAA0B,EAAE,SAA+D;QACjH,6DAA6D;QAC7D,6CAA6C;QAC7C,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,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}
|
|
@@ -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"}
|