mcp-sunsama 0.10.2 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # mcp-sunsama
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 763b5b4: feat: add update-task-stream tool for task stream/channel assignment
8
+
9
+ Add new `update-task-stream` tool that allows updating the stream/channel assignment for existing Sunsama tasks. This tool provides the ability to:
10
+
11
+ - Assign tasks to one or more streams/channels
12
+ - Clear stream assignments by providing an empty array
13
+ - Set a recommended stream ID for the task
14
+ - Control response payload size with limitResponsePayload option
15
+
16
+ The tool follows the established patterns for parameter validation, error handling, and response formatting. Includes comprehensive test coverage and updated documentation.
17
+
18
+ - cde6e75: Add update-task-text tool for updating task titles/text
19
+
20
+ Implement new `update-task-text` MCP tool that allows updating the text/title of tasks using the Sunsama API. This tool follows the established patterns for task mutation operations and includes:
21
+
22
+ - Zod schema validation with comprehensive parameter documentation
23
+ - Support for optional recommended stream ID and response payload limiting
24
+ - Full test coverage with edge case validation
25
+ - Updated API documentation and README
26
+
27
+ ## 0.11.0
28
+
29
+ ### Minor Changes
30
+
31
+ - 9d0d694: feat: add update-task-due-date tool for setting and clearing task due dates
32
+
33
+ - Adds new `update-task-due-date` tool to set or clear task due dates using ISO datetime format or null
34
+ - Includes comprehensive parameter validation with Zod schema for taskId, dueDate, and limitResponsePayload
35
+ - Supports both setting due dates with ISO datetime strings and clearing due dates with null values
36
+ - Adds extensive test coverage with 11 test cases covering valid inputs, error cases, and edge conditions
37
+ - Updates API documentation and README with complete tool information
38
+ - Follows established patterns for dual transport support (stdio/httpStream) and response optimization
39
+
3
40
  ## 0.10.2
4
41
 
5
42
  ### Patch Changes
package/CLAUDE.md CHANGED
@@ -130,7 +130,7 @@ Optional:
130
130
  ### Task Operations
131
131
  Full CRUD support:
132
132
  - **Read**: `get-tasks-by-day`, `get-tasks-backlog`, `get-archived-tasks`, `get-task-by-id`, `get-streams`
133
- - **Write**: `create-task`, `update-task-complete`, `update-task-planned-time`, `update-task-notes`, `update-task-snooze-date`, `update-task-backlog`, `delete-task`
133
+ - **Write**: `create-task`, `update-task-complete`, `update-task-planned-time`, `update-task-notes`, `update-task-snooze-date`, `update-task-backlog`, `update-task-stream`, `delete-task`
134
134
 
135
135
  Task read operations support response trimming. `get-tasks-by-day` includes completion filtering. `get-archived-tasks` includes enhanced pagination with hasMore flag for LLM decision-making.
136
136
 
package/README.md CHANGED
@@ -96,6 +96,9 @@ Add this configuration to your Claude Desktop MCP settings:
96
96
  - `update-task-complete` - Mark tasks as complete
97
97
  - `update-task-planned-time` - Update the planned time (time estimate) for tasks
98
98
  - `update-task-notes` - Update task notes content (requires either `html` or `markdown` parameter, mutually exclusive)
99
+ - `update-task-due-date` - Update the due date for tasks (set or clear due dates)
100
+ - `update-task-text` - Update the text/title of tasks
101
+ - `update-task-stream` - Update the stream/channel assignment for tasks
99
102
  - `update-task-snooze-date` - Reschedule tasks to different dates
100
103
  - `update-task-backlog` - Move tasks to the backlog
101
104
  - `delete-task` - Delete tasks permanently
package/bun.lock CHANGED
@@ -7,7 +7,7 @@
7
7
  "@types/papaparse": "^5.3.16",
8
8
  "fastmcp": "3.3.1",
9
9
  "papaparse": "^5.5.3",
10
- "sunsama-api": "0.8.1",
10
+ "sunsama-api": "0.10.0",
11
11
  "zod": "3.24.4",
12
12
  },
13
13
  "devDependencies": {
@@ -430,7 +430,7 @@
430
430
 
431
431
  "strtok3": ["strtok3@10.3.1", "", { "dependencies": { "@tokenizer/token": "^0.3.0" } }, "sha512-3JWEZM6mfix/GCJBBUrkA8p2Id2pBkyTkVCJKto55w080QBKZ+8R171fGrbiSp+yMO/u6F8/yUh7K4V9K+YCnw=="],
432
432
 
433
- "sunsama-api": ["sunsama-api@0.8.1", "", { "dependencies": { "graphql": "^16.11.0", "graphql-tag": "^2.12.6", "marked": "^14.1.3", "tough-cookie": "^5.1.2", "tslib": "^2.8.1", "turndown": "^7.2.0", "yjs": "^13.6.27", "zod": "^3.25.64" } }, "sha512-CcLyMwrUnpQi9GmRrNqgqb0A7f2Ba5qxaI1uJdAivcqZQRNfg+g5V9RFzh64mGrN/7M3v+Meiv+Ev6AsiSAz3A=="],
433
+ "sunsama-api": ["sunsama-api@0.10.0", "", { "dependencies": { "graphql": "^16.11.0", "graphql-tag": "^2.12.6", "marked": "^14.1.3", "tough-cookie": "^5.1.2", "tslib": "^2.8.1", "turndown": "^7.2.0", "yjs": "^13.6.27", "zod": "^3.25.64" } }, "sha512-PgWQdR0FKlgVuW8ZQVZfrEcxUS6BlYxneP3s7hR5/0CZqHI49cJ6Kvn6k8TMpTxGYZhhuOK0scZFwo+z3vQydw=="],
434
434
 
435
435
  "term-size": ["term-size@2.2.1", "", {}, "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg=="],
436
436
 
@@ -0,0 +1,112 @@
1
+ # Product Requirement Document: update-task-stream Tool
2
+
3
+ ## Overview
4
+ Implement a new MCP tool `update-task-stream` that allows updating the stream/channel assignment for existing Sunsama tasks.
5
+
6
+ ## Research Findings
7
+
8
+ ### Current Sunsama API Analysis
9
+ - Tasks have two stream-related fields:
10
+ - `streamIds`: Array of stream IDs that the task is assigned to
11
+ - `recommendedStreamId`: A single recommended stream ID for the task
12
+ - Existing mutations in sunsama-api library do not include an `updateTaskStream` mutation
13
+ - Tasks can be created with stream assignments using the `createTask` mutation with `streamIds` option
14
+ - Streams are accessible via `getStreamsByGroupId()` method
15
+
16
+ ### Implementation Decision
17
+ Since the sunsama-api library does not expose an `updateTaskStream` mutation, we need to:
18
+ 1. Create a new GraphQL mutation following the existing pattern
19
+ 2. Add the mutation to our local queries/mutations
20
+ 3. Implement the client method to handle stream updates
21
+ 4. Follow the same patterns as other update tools (text, notes, due date, etc.)
22
+
23
+ ## Requirements
24
+
25
+ ### Tool Name
26
+ `update-task-stream`
27
+
28
+ ### Description
29
+ "Update the stream/channel assignment for a task"
30
+
31
+ ### Parameters
32
+ - `taskId` (required): The ID of the task to update
33
+ - `streamIds` (required): Array of stream IDs to assign to the task
34
+ - `recommendedStreamId` (optional): Recommended stream ID for the task
35
+ - `limitResponsePayload` (optional): Whether to limit response size (defaults to true)
36
+
37
+ ### Implementation Strategy
38
+
39
+ #### 1. GraphQL Mutation
40
+ Create a new mutation following the pattern of other update mutations:
41
+ ```graphql
42
+ mutation updateTaskStream($input: UpdateTaskStreamInput!) {
43
+ updateTaskStream(input: $input) {
44
+ ...UpdateTaskPayload
45
+ __typename
46
+ }
47
+ }
48
+ ```
49
+
50
+ #### 2. Client Method
51
+ Add a new method `updateTaskStream` to the SunsamaClient class that:
52
+ - Validates taskId and streamIds parameters
53
+ - Calls the GraphQL mutation
54
+ - Returns the standard update result format
55
+
56
+ #### 3. MCP Tool Implementation
57
+ Follow the standard tool pattern:
58
+ - Zod schema for parameter validation
59
+ - Client resolution via `getSunsamaClient()`
60
+ - Error handling and logging
61
+ - JSON response format
62
+
63
+ ### Validation Rules
64
+ - `taskId`: Required string, minimum length 1
65
+ - `streamIds`: Required array of strings, minimum 0 items (allows clearing streams)
66
+ - `recommendedStreamId`: Optional string or null
67
+ - `limitResponsePayload`: Optional boolean, defaults to true
68
+
69
+ ### Response Format
70
+ JSON object with:
71
+ - `success`: Boolean indicating operation success
72
+ - `taskId`: The ID of the updated task
73
+ - `streamIds`: The new stream IDs assigned
74
+ - `recommendedStreamId`: The new recommended stream ID (if provided)
75
+ - `updatedFields`: Partial task object with updated fields (if not limited)
76
+
77
+ ### Integration Points
78
+
79
+ #### Schema Addition
80
+ Add `updateTaskStreamSchema` to `src/schemas.ts` with proper validation.
81
+
82
+ #### Tool Registration
83
+ Add tool to `src/main.ts` following existing patterns with:
84
+ - Parameter extraction and validation
85
+ - Client resolution
86
+ - API call execution
87
+ - Response formatting
88
+ - Error handling and logging
89
+
90
+ #### Documentation Updates
91
+ - Update API documentation resource in main.ts
92
+ - Update README.md with new tool information
93
+ - Add comprehensive test coverage
94
+
95
+ ### Testing Requirements
96
+ - Schema validation tests for all parameter combinations
97
+ - Edge cases: empty streamIds array, null recommendedStreamId
98
+ - Invalid parameter formats
99
+ - Required parameter validation
100
+
101
+ ### Migration Considerations
102
+ - This is a new tool, no backward compatibility concerns
103
+ - Follows established patterns for easy adoption
104
+ - No breaking changes to existing functionality
105
+
106
+ ## Success Criteria
107
+ 1. Tool successfully updates task stream assignments
108
+ 2. Proper validation of all parameters
109
+ 3. Consistent error handling and logging
110
+ 4. Comprehensive test coverage
111
+ 5. Documentation properly updated
112
+ 6. Follows existing code patterns and conventions
package/dist/main.js CHANGED
@@ -3,7 +3,7 @@ import { FastMCP } from "fastmcp";
3
3
  import { httpStreamAuthenticator } from "./auth/http.js";
4
4
  import { initializeStdioAuth } from "./auth/stdio.js";
5
5
  import { getTransportConfig } from "./config/transport.js";
6
- import { createTaskSchema, deleteTaskSchema, getArchivedTasksSchema, getStreamsSchema, getTaskByIdSchema, getTasksBacklogSchema, getTasksByDaySchema, getUserSchema, updateTaskBacklogSchema, updateTaskCompleteSchema, updateTaskNotesSchema, updateTaskPlannedTimeSchema, updateTaskSnoozeDateSchema } from "./schemas.js";
6
+ import { createTaskSchema, deleteTaskSchema, getArchivedTasksSchema, getStreamsSchema, getTaskByIdSchema, getTasksBacklogSchema, getTasksByDaySchema, getUserSchema, updateTaskBacklogSchema, updateTaskCompleteSchema, updateTaskDueDateSchema, updateTaskNotesSchema, updateTaskPlannedTimeSchema, updateTaskSnoozeDateSchema, updateTaskStreamSchema, updateTaskTextSchema } from "./schemas.js";
7
7
  import { getSunsamaClient } from "./utils/client-resolver.js";
8
8
  import { filterTasksByCompletion } from "./utils/task-filters.js";
9
9
  import { trimTasksForResponse } from "./utils/task-trimmer.js";
@@ -16,7 +16,7 @@ if (transportConfig.transportType === "stdio") {
16
16
  }
17
17
  const server = new FastMCP({
18
18
  name: "Sunsama API Server",
19
- version: "0.10.2",
19
+ version: "0.12.0",
20
20
  instructions: `
21
21
  This MCP server provides access to the Sunsama API for task and project management.
22
22
 
@@ -24,7 +24,7 @@ Available tools:
24
24
  - Authentication: login, logout, check authentication status
25
25
  - User operations: get current user information
26
26
  - Task operations: get tasks by day, get backlog tasks, get archived tasks, get task by ID
27
- - Task mutations: create tasks, mark complete, delete tasks, reschedule tasks, update planned time, update task notes
27
+ - Task mutations: create tasks, mark complete, delete tasks, reschedule tasks, update planned time, update task notes, update task due date, update task text, update task stream assignment
28
28
  - Stream operations: get streams/channels for the user's group
29
29
 
30
30
  Authentication is required for all operations. You can either:
@@ -625,6 +625,192 @@ server.addTool({
625
625
  }
626
626
  }
627
627
  });
628
+ server.addTool({
629
+ name: "update-task-due-date",
630
+ description: "Update the due date for a task",
631
+ parameters: updateTaskDueDateSchema,
632
+ execute: async (args, { session, log }) => {
633
+ try {
634
+ // Extract parameters
635
+ const { taskId, dueDate, limitResponsePayload } = args;
636
+ log.info("Updating task due date", {
637
+ taskId: taskId,
638
+ dueDate: dueDate,
639
+ limitResponsePayload: limitResponsePayload
640
+ });
641
+ // Get the appropriate client based on transport type
642
+ const sunsamaClient = getSunsamaClient(session);
643
+ // Call sunsamaClient.updateTaskDueDate(taskId, dueDate, limitResponsePayload)
644
+ const result = await sunsamaClient.updateTaskDueDate(taskId, dueDate, limitResponsePayload);
645
+ log.info("Successfully updated task due date", {
646
+ taskId: taskId,
647
+ dueDate: dueDate,
648
+ success: result.success
649
+ });
650
+ return {
651
+ content: [
652
+ {
653
+ type: "text",
654
+ text: JSON.stringify({
655
+ success: result.success,
656
+ taskId: taskId,
657
+ dueDate: dueDate,
658
+ dueDateUpdated: true,
659
+ updatedFields: result.updatedFields
660
+ })
661
+ }
662
+ ]
663
+ };
664
+ }
665
+ catch (error) {
666
+ log.error("Failed to update task due date", {
667
+ taskId: args.taskId,
668
+ dueDate: args.dueDate,
669
+ error: error instanceof Error ? error.message : 'Unknown error'
670
+ });
671
+ throw new Error(`Failed to update task due date: ${error instanceof Error ? error.message : 'Unknown error'}`);
672
+ }
673
+ }
674
+ });
675
+ server.addTool({
676
+ name: "update-task-text",
677
+ description: "Update the text/title of a task",
678
+ parameters: updateTaskTextSchema,
679
+ execute: async (args, { session, log }) => {
680
+ try {
681
+ // Extract parameters
682
+ const { taskId, text, recommendedStreamId, limitResponsePayload } = args;
683
+ log.info("Updating task text", {
684
+ taskId: taskId,
685
+ text: text,
686
+ recommendedStreamId: recommendedStreamId,
687
+ limitResponsePayload: limitResponsePayload
688
+ });
689
+ // Get the appropriate client based on transport type
690
+ const sunsamaClient = getSunsamaClient(session);
691
+ // Build options object
692
+ const options = {};
693
+ if (recommendedStreamId !== undefined)
694
+ options.recommendedStreamId = recommendedStreamId;
695
+ if (limitResponsePayload !== undefined)
696
+ options.limitResponsePayload = limitResponsePayload;
697
+ // Call sunsamaClient.updateTaskText(taskId, text, options)
698
+ const result = await sunsamaClient.updateTaskText(taskId, text, options);
699
+ log.info("Successfully updated task text", {
700
+ taskId: taskId,
701
+ text: text,
702
+ success: result.success
703
+ });
704
+ return {
705
+ content: [
706
+ {
707
+ type: "text",
708
+ text: JSON.stringify({
709
+ success: result.success,
710
+ taskId: taskId,
711
+ text: text,
712
+ textUpdated: true,
713
+ updatedFields: result.updatedFields
714
+ })
715
+ }
716
+ ]
717
+ };
718
+ }
719
+ catch (error) {
720
+ log.error("Failed to update task text", {
721
+ taskId: args.taskId,
722
+ text: args.text,
723
+ error: error instanceof Error ? error.message : 'Unknown error'
724
+ });
725
+ throw new Error(`Failed to update task text: ${error instanceof Error ? error.message : 'Unknown error'}`);
726
+ }
727
+ }
728
+ });
729
+ server.addTool({
730
+ name: "update-task-stream",
731
+ description: "Update the stream/channel assignment for a task",
732
+ parameters: updateTaskStreamSchema,
733
+ execute: async (args, { session, log }) => {
734
+ try {
735
+ // Extract parameters
736
+ const { taskId, streamIds, recommendedStreamId, limitResponsePayload } = args;
737
+ log.info("Updating task stream assignment", {
738
+ taskId: taskId,
739
+ streamIds: streamIds,
740
+ recommendedStreamId: recommendedStreamId,
741
+ limitResponsePayload: limitResponsePayload
742
+ });
743
+ // Get the appropriate client based on transport type
744
+ const sunsamaClient = getSunsamaClient(session);
745
+ // Since updateTaskStream doesn't exist in the upstream library, we'll make a direct GraphQL request
746
+ const updateTaskStreamMutation = `
747
+ mutation updateTaskStream($input: UpdateTaskStreamInput!) {
748
+ updateTaskStream(input: $input) {
749
+ success
750
+ updatedTask {
751
+ _id
752
+ streamIds
753
+ recommendedStreamId
754
+ }
755
+ updatedFields {
756
+ _id
757
+ streamIds
758
+ recommendedStreamId
759
+ }
760
+ }
761
+ }
762
+ `;
763
+ const variables = {
764
+ input: {
765
+ taskId,
766
+ streamIds,
767
+ recommendedStreamId: recommendedStreamId || null,
768
+ limitResponsePayload: limitResponsePayload ?? true,
769
+ },
770
+ };
771
+ // Make the GraphQL request using the client's graphqlRequest method
772
+ const response = await sunsamaClient.graphqlRequest({
773
+ operationName: 'updateTaskStream',
774
+ variables,
775
+ query: updateTaskStreamMutation,
776
+ });
777
+ if (!response.data) {
778
+ throw new Error('No response data received');
779
+ }
780
+ const result = response.data.updateTaskStream;
781
+ log.info("Successfully updated task stream assignment", {
782
+ taskId: taskId,
783
+ streamIds: streamIds,
784
+ recommendedStreamId: recommendedStreamId,
785
+ success: result.success
786
+ });
787
+ return {
788
+ content: [
789
+ {
790
+ type: "text",
791
+ text: JSON.stringify({
792
+ success: result.success,
793
+ taskId: taskId,
794
+ streamIds: streamIds,
795
+ recommendedStreamId: recommendedStreamId,
796
+ streamUpdated: true,
797
+ updatedFields: result.updatedFields
798
+ })
799
+ }
800
+ ]
801
+ };
802
+ }
803
+ catch (error) {
804
+ log.error("Failed to update task stream assignment", {
805
+ taskId: args.taskId,
806
+ streamIds: args.streamIds,
807
+ recommendedStreamId: args.recommendedStreamId,
808
+ error: error instanceof Error ? error.message : 'Unknown error'
809
+ });
810
+ throw new Error(`Failed to update task stream assignment: ${error instanceof Error ? error.message : 'Unknown error'}`);
811
+ }
812
+ }
813
+ });
628
814
  // Stream Operations
629
815
  server.addTool({
630
816
  name: "get-streams",
@@ -728,7 +914,7 @@ Uses HTTP Basic Auth headers (per-request authentication):
728
914
  - \`streamIds\` (optional): Array of stream IDs to associate with task
729
915
  - \`timeEstimate\` (optional): Time estimate in minutes
730
916
  - \`dueDate\` (optional): Due date string (ISO format)
731
- - \`snoozeUntil\` (optional): Snooze until date string (ISO format)
917
+ - \`snoozeUntil\` (optional): Snooze until date string (ISO format) - the date the task is scheduled for
732
918
  - \`private\` (optional): Whether the task is private
733
919
  - \`taskId\` (optional): Custom task ID
734
920
  - Returns: JSON with task creation result
@@ -764,6 +950,29 @@ Uses HTTP Basic Auth headers (per-request authentication):
764
950
  - Returns: JSON with update result
765
951
  - Note: Exactly one of \`html\` or \`markdown\` must be provided (mutually exclusive)
766
952
 
953
+ - **update-task-due-date**: Update the due date for a task
954
+ - Parameters:
955
+ - \`taskId\` (required): The ID of the task to update due date for
956
+ - \`dueDate\` (required): Due date in ISO format (YYYY-MM-DDTHH:mm:ssZ) or null to clear the due date
957
+ - \`limitResponsePayload\` (optional): Whether to limit response size
958
+ - Returns: JSON with update result
959
+
960
+ - **update-task-text**: Update the text/title of a task
961
+ - Parameters:
962
+ - \`taskId\` (required): The ID of the task to update
963
+ - \`text\` (required): The new text/title for the task
964
+ - \`recommendedStreamId\` (optional): Recommended stream ID
965
+ - \`limitResponsePayload\` (optional): Whether to limit response size
966
+ - Returns: JSON with update result
967
+
968
+ - **update-task-stream**: Update the stream/channel assignment for a task
969
+ - Parameters:
970
+ - \`taskId\` (required): The ID of the task to update stream assignment for
971
+ - \`streamIds\` (required): Array of stream IDs to assign to the task (empty array clears all streams)
972
+ - \`recommendedStreamId\` (optional): Recommended stream ID for the task
973
+ - \`limitResponsePayload\` (optional): Whether to limit response size
974
+ - Returns: JSON with update result
975
+
767
976
  ### Stream Operations
768
977
  - **get-streams**: Get streams for the user's group
769
978
  - Parameters: none
package/dist/schemas.d.ts CHANGED
@@ -171,6 +171,51 @@ export declare const updateTaskNotesSchema: z.ZodEffects<z.ZodObject<{
171
171
  html?: string | undefined;
172
172
  markdown?: string | undefined;
173
173
  }>;
174
+ export declare const updateTaskDueDateSchema: z.ZodObject<{
175
+ taskId: z.ZodString;
176
+ dueDate: z.ZodUnion<[z.ZodString, z.ZodNull]>;
177
+ limitResponsePayload: z.ZodOptional<z.ZodBoolean>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ taskId: string;
180
+ dueDate: string | null;
181
+ limitResponsePayload?: boolean | undefined;
182
+ }, {
183
+ taskId: string;
184
+ dueDate: string | null;
185
+ limitResponsePayload?: boolean | undefined;
186
+ }>;
187
+ export declare const updateTaskTextSchema: z.ZodObject<{
188
+ taskId: z.ZodString;
189
+ text: z.ZodString;
190
+ recommendedStreamId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
191
+ limitResponsePayload: z.ZodOptional<z.ZodBoolean>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ taskId: string;
194
+ text: string;
195
+ limitResponsePayload?: boolean | undefined;
196
+ recommendedStreamId?: string | null | undefined;
197
+ }, {
198
+ taskId: string;
199
+ text: string;
200
+ limitResponsePayload?: boolean | undefined;
201
+ recommendedStreamId?: string | null | undefined;
202
+ }>;
203
+ export declare const updateTaskStreamSchema: z.ZodObject<{
204
+ taskId: z.ZodString;
205
+ streamIds: z.ZodArray<z.ZodString, "many">;
206
+ recommendedStreamId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
207
+ limitResponsePayload: z.ZodOptional<z.ZodBoolean>;
208
+ }, "strip", z.ZodTypeAny, {
209
+ taskId: string;
210
+ streamIds: string[];
211
+ limitResponsePayload?: boolean | undefined;
212
+ recommendedStreamId?: string | null | undefined;
213
+ }, {
214
+ taskId: string;
215
+ streamIds: string[];
216
+ limitResponsePayload?: boolean | undefined;
217
+ recommendedStreamId?: string | null | undefined;
218
+ }>;
174
219
  /**
175
220
  * Response Type Schemas (for validation and documentation)
176
221
  */
@@ -606,6 +651,9 @@ export type DeleteTaskInput = z.infer<typeof deleteTaskSchema>;
606
651
  export type UpdateTaskSnoozeDateInput = z.infer<typeof updateTaskSnoozeDateSchema>;
607
652
  export type UpdateTaskPlannedTimeInput = z.infer<typeof updateTaskPlannedTimeSchema>;
608
653
  export type UpdateTaskNotesInput = z.infer<typeof updateTaskNotesSchema>;
654
+ export type UpdateTaskDueDateInput = z.infer<typeof updateTaskDueDateSchema>;
655
+ export type UpdateTaskTextInput = z.infer<typeof updateTaskTextSchema>;
656
+ export type UpdateTaskStreamInput = z.infer<typeof updateTaskStreamSchema>;
609
657
  export type User = z.infer<typeof userSchema>;
610
658
  export type Task = z.infer<typeof taskSchema>;
611
659
  export type Stream = z.infer<typeof streamSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,eAAO,MAAM,gBAAgB,wCAO3B,CAAC;AAEH;;GAEG;AAGH,eAAO,MAAM,sBAAsB,+CAA6C,CAAC;AAGjF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAGH,eAAO,MAAM,qBAAqB,gDAAe,CAAC;AAGlD,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AAGH,eAAO,MAAM,iBAAiB;;;;;;EAE5B,CAAC;AAEH;;GAEG;AAGH,eAAO,MAAM,aAAa,gDAAe,CAAC;AAE1C;;GAEG;AAGH,eAAO,MAAM,gBAAgB,gDAAe,CAAC;AAE7C;;GAEG;AAGH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS3B,CAAC;AAGH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAInC,CAAC;AAGH,eAAO,MAAM,gBAAgB;;;;;;;;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I,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAC9C,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
package/dist/schemas.js CHANGED
@@ -53,7 +53,7 @@ export const createTaskSchema = z.object({
53
53
  streamIds: z.array(z.string()).optional().describe("Array of stream IDs to associate with the task"),
54
54
  timeEstimate: z.number().int().positive().optional().describe("Time estimate in minutes"),
55
55
  dueDate: z.string().optional().describe("Due date string (ISO format)"),
56
- snoozeUntil: z.string().optional().describe("Snooze until date string (ISO format)"),
56
+ snoozeUntil: z.string().optional().describe("Snooze until date string (ISO format) - the date the task is scheduled for"),
57
57
  private: z.boolean().optional().describe("Whether the task is private"),
58
58
  taskId: z.string().optional().describe("Custom task ID (auto-generated if not provided)"),
59
59
  });
@@ -103,6 +103,29 @@ export const updateTaskNotesSchema = z.object({
103
103
  message: "Exactly one of 'html' or 'markdown' must be provided",
104
104
  path: [], // This will show the error at the root level
105
105
  });
106
+ // Update task due date parameters
107
+ export const updateTaskDueDateSchema = z.object({
108
+ taskId: z.string().min(1, "Task ID is required").describe("The ID of the task to update due date for"),
109
+ dueDate: z.union([
110
+ z.string().datetime("Must be a valid ISO date-time string"),
111
+ z.null()
112
+ ]).describe("Due date in ISO format (YYYY-MM-DDTHH:mm:ssZ) or null to clear the due date"),
113
+ limitResponsePayload: z.boolean().optional().describe("Whether to limit the response payload size"),
114
+ });
115
+ // Update task text parameters
116
+ export const updateTaskTextSchema = z.object({
117
+ taskId: z.string().min(1, "Task ID is required").describe("The ID of the task to update"),
118
+ text: z.string().min(1, "Task text is required").describe("The new text/title for the task"),
119
+ recommendedStreamId: z.string().nullable().optional().describe("Recommended stream ID (optional)"),
120
+ limitResponsePayload: z.boolean().optional().describe("Whether to limit the response payload size"),
121
+ });
122
+ // Update task stream parameters
123
+ export const updateTaskStreamSchema = z.object({
124
+ taskId: z.string().min(1, "Task ID is required").describe("The ID of the task to update stream assignment for"),
125
+ streamIds: z.array(z.string()).describe("Array of stream IDs to assign to the task (empty array clears all streams)"),
126
+ recommendedStreamId: z.string().nullable().optional().describe("Recommended stream ID for the task"),
127
+ limitResponsePayload: z.boolean().optional().describe("Whether to limit the response payload size"),
128
+ });
106
129
  /**
107
130
  * Response Type Schemas (for validation and documentation)
108
131
  */