1// SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
2//
3// SPDX-License-Identifier: AGPL-3.0-or-later
4
5package tasks
6
7// CreateInput is the input for the create_task tool.
8type CreateInput struct {
9 // AreaID is the area in which to create the task.
10 // Must be a valid area_id from the areas resource.
11 AreaID string `json:"area_id" jsonschema:"required"`
12 // GoalID is an optional goal to associate the task with.
13 // Must belong to the specified area.
14 GoalID *string `json:"goal_id,omitempty"`
15 // Name is the plain text task name using sentence case (max 100 characters).
16 Name string `json:"name" jsonschema:"required"`
17 // Note contains additional details using Markdown formatting.
18 Note *string `json:"note,omitempty"`
19 // Estimate is the estimated completion time in minutes (0-720, max 12 hours).
20 Estimate *int `json:"estimate,omitempty"`
21 // Priority is the task priority level.
22 Priority *string `json:"priority,omitempty"`
23 // Motivation indicates importance: must (critical), should (important), want (nice-to-have).
24 Motivation *string `json:"motivation,omitempty"`
25 // Eisenhower is the Eisenhower Matrix quadrant for prioritization.
26 // Valid: uncategorized, do-now, delegate, do-later, eliminate.
27 Eisenhower *string `json:"eisenhower,omitempty"`
28 // Status is the initial task status.
29 Status *string `json:"status,omitempty"`
30 // ScheduledOn is the scheduled date in YYYY-MM-DD format.
31 // Use get_timestamp tool first for natural language dates.
32 ScheduledOn *string `json:"scheduled_on,omitempty"`
33 // Source is the origin of the task (e.g. "home-assistant").
34 Source *string `json:"source,omitempty"`
35 // SourceID is the external ID from the source system.
36 SourceID *string `json:"source_id,omitempty"`
37}
38
39// CreateOutput is the output for the create_task tool.
40// When a task already exists (duplicate), TaskID will be empty and Message will indicate this.
41type CreateOutput struct {
42 TaskID string `json:"task_id,omitempty"` // ID of the created task (empty if duplicate)
43 Message string `json:"message"` // Human-readable result message
44 DeepLink string `json:"deep_link,omitempty"` // Lunatask deep link to the task
45}
46
47// UpdateInput is the input for the update_task tool.
48type UpdateInput struct {
49 // TaskID is the ID of the task to update.
50 TaskID string `json:"task_id" jsonschema:"required"`
51 // AreaID is the new area. Only include if moving the task.
52 AreaID *string `json:"area_id,omitempty"`
53 // GoalID is the new goal. Must belong to the task's area.
54 GoalID *string `json:"goal_id,omitempty"`
55 // Name is the new task name. Empty string clears the name.
56 Name *string `json:"name,omitempty"`
57 // Note is the new note content. Empty string clears the note.
58 Note *string `json:"note,omitempty"`
59 // Estimate is the new time estimate in minutes.
60 Estimate *int `json:"estimate,omitempty"`
61 // Priority is the new priority level.
62 Priority *string `json:"priority,omitempty"`
63 // Motivation is the new importance level. Empty string clears.
64 Motivation *string `json:"motivation,omitempty"`
65 // Eisenhower is the new Eisenhower quadrant.
66 // Valid: uncategorized, do-now, delegate, do-later, eliminate.
67 Eisenhower *string `json:"eisenhower,omitempty"`
68 // Status is the new task status. Empty string clears.
69 Status *string `json:"status,omitempty"`
70 // ScheduledOn is the new scheduled date in YYYY-MM-DD format.
71 ScheduledOn *string `json:"scheduled_on,omitempty"`
72}
73
74// UpdateOutput is the output for the update_task tool.
75type UpdateOutput struct {
76 TaskID string `json:"task_id"` // ID of the updated task
77 Message string `json:"message"` // Human-readable result message
78 DeepLink string `json:"deep_link,omitempty"` // Lunatask deep link to the task
79}
80
81// DeleteInput is the input for the delete_task tool.
82type DeleteInput struct {
83 // TaskID is the ID of the task to delete. This action cannot be undone.
84 TaskID string `json:"task_id" jsonschema:"required"`
85}
86
87// DeleteOutput is the output for the delete_task tool.
88type DeleteOutput struct {
89 Message string `json:"message"` // Human-readable result message
90}