c37f3bf
refactor(tasks)!: add task DTOs, enforce UUIDs for IDs
Click to expand commit body
Introduces `Task` and `Source` data transfer objects (DTOs) for
representing task-related data, primarily for API responses.
Validation for `CreateTaskRequest` has been updated:
- `AreaID` validation now enforces `uuid4` format if the field is present.
- `GoalID` validation now enforces `uuid4` format if the field is present.
BREAKING CHANGE: The `AreaID` and `GoalID` fields in the `CreateTaskRequest`
must now be valid UUIDv4 strings if provided. Previously, these fields
might have accepted non-UUID strings or had less strict validation.
Clients sending requests to create tasks must ensure these IDs conform to
the UUIDv4 format to avoid validation errors.
Amolith
created
97fdaf5
refactor(lunatask): introduce client for task creation
- Don't correct yourself with confirmation
- Mention priority options (it was thinking "top" = 10 even though tool desc
says -2 - 2).
- Explicitly tell it to intuit intent a bit
- Add user_provided_content block
35943c1
feat: add task priority, motivation, and status fields
Click to expand commit body
Add new fields for task priority, motivation, and status to the MCP server
configuration. Include validation for each field to ensure correct values are
provided.
- Priority: integer between -2 and 2 (inclusive).
- Motivation: string, must be one of 'must', 'should', or 'want'. Unknown is
allowed, but I don't see a reason to include that yet.
- Status: string, must be one of 'later', 'next', 'started', 'waiting', or
'completed'.
- Include further validation details for the LLM.
Amolith
created
dcd1e79
style: use switch instead of if-else for arg parsing
- Return lowercase error messages
- Add helper functions to handle closing HTTP response bodies and files instead
of just deferring and not handling errors.
Add timezone configuration and validation to ensure the configured timezone is
valid on startup and during task creation. This includes adding a new `Timezone`
field to the `Config` struct and implementing a `loadLocation` function to
validate the timezone.
This change also updates the `handleCreateTask` function to use the configured
timezone when parsing natural language dates. Additionally, the default
configuration file creation has been updated to include the `Timezone` field
with a default value of "UTC".
BREAKING CHANGE: The `Timezone` field must be set in the configuration file. If
not set, the application will fail to start.
8ad1b06
chore: improve error handling and config file creation in main.go
Click to expand commit body
Improve error handling in handleCreateTask function by logging the API response
body when an error occurs. Update the success message to include the task ID.
Modify the createDefaultConfigFile function to use os.OpenFile instead of
os.Create for better file handling.
Amolith
created
3926843
feat: add goals to areas and update task creation
Click to expand commit body
add goals to areas and update task creation logic to include goal validation
- remove unused list_areas and list_goals tools
- update create_task tool to validate goal_id against area
- update get_date_for_task tool to get_task_timestamp
- add list_areas_and_goals tool to list areas and goals
ed5c9b0
feat: add new tools for listing areas and goals
Click to expand commit body
Add new tools to the MCP server for listing areas and their IDs, and listing
goals and their IDs. Update the LunataskCreateTaskRequest struct to include
validation rules and default values for the AreaID field.
- Adds a new tool "list_areas" to the MCP server.
- Adds a new tool "list_goals" to the MCP server.
- Updates the LunataskCreateTaskRequest struct to include validation rules and
default values for the AreaID field.
f8fe125
refactor(main): enhance task creation and configuration
Click to expand commit body
- added support for goals in task creation
- introduced server configuration in config
- improved validation and error handling
- added default config generation on startup if config is missing
- updated task creation tool to include more parameters
- refactored task creation logic for better structure and readability
Amolith
created
8dcbbbf
refactor: update Config to use Area struct and validate areas