# TaskNotes 3.19.0

## New Features

### HTTP REST API with Natural Language Processing

TaskNotes now includes a HTTP REST API that enables external integrations and powers companion projects. The API provides full task management capabilities with intelligent natural language processing.

**Key API Features:**

- Complete CRUD operations for tasks
- Time tracking endpoints
- Task statistics and filtering
- Bearer token authentication
- CORS support for browser extensions
- Desktop-only implementation with mobile-safe architecture

**Natural Language Processing Endpoints:**

- `/api/nlp/parse` - Parse natural language into structured task data
- `/api/nlp/create` - Create tasks directly from natural language input
- Supports extraction of dates, times, priorities, tags, contexts, projects, and recurrence
- Intelligent parsing of expressions like "Review PR #123 tomorrow high priority @work"

**Companion Project Integration:**

The HTTP API enables two new companion projects:
- [tasknotes-cli](https://github.com/callumalpass/tasknotes-cli) - Command-line interface for TaskNotes task management
- [tasknotes-browser-extension](https://github.com/callumalpass/tasknotes-browser-extension) - Browser extension for quick task creation

**Configuration:**

- Enable via Settings → HTTP API tab (desktop only)
- Configurable port (default 8080) and optional authentication token
- Documentation at `/docs/HTTP_API.md` and `/docs/nlp-api.md`

### Enhanced Calendar Integration

#### Calendar Export and Context Menu System

**Task Calendar Export:**

- Add tasks to external calendars (Google, Outlook, Yahoo)
- Download ICS files
- Right-click context menu support for quick calendar actions

#### Agenda View Calendar Improvements

**ICS Integration in Agenda:**

- Calendar event cards now display in Agenda view
- Toggle calendar subscriptions visibility via FilterBar
- Always-available "Refresh calendars" button
- Normalized scheduled date handling for all-day and timed events

*Thanks @scottaltham-payroc for the feature request!*

## Bug Fixes

### Task Styling Enhancement (#355)

Added CSS class `task-card--has-projects` to task cards that contain projects.

*Thanks @mdbraber for the suggestion*

### Calendar Event Scheduling

Fixed scheduled date normalization when creating tasks from ICS events:

- All-day events: Use YYYY-MM-DD format
- Timed events: Use YYYY-MM-DDTHH:mm format
- Consistent behavior across all calendar interfaces

### File Copy Script Improvements

Enhanced copy-files script with better error handling:

- Improved default path handling
- Destination directory creation
- Better ENOENT error handling

## API Documentation

### New Documentation Files

- **HTTP_API.md** - Complete API reference with examples
- **nlp-api.md** - Natural language processing capabilities and usage

## Technical Enhancements

### Core Infrastructure

**API Service Architecture:**

- Mobile-compatible implementation using Node.js http module
- Platform detection prevents mobile loading
- Express.js alternative for lightweight operation
- Full error handling and validation

**Calendar Service Integration:**
- Extracted reusable CalendarExportService
- Unified TaskContextMenu component
- Enhanced event listener management

### Development Improvements

**Code Organization:**

- Modular component extraction for better reusability
- Consistent API response formats
- Comprehensive test coverage for new features
- TypeScript improvements for icon handling

## Migration Notes

### HTTP API Setup

For users wanting to enable the new HTTP API:

1. Navigate to Settings → HTTP API tab (desktop only)
2. Configure desired port (default 8080)
3. Optionally set authentication token for security
4. Restart Obsidian to start the API server
5. Test with: `curl http://localhost:8080/api/health`

