New router intelligence modules (26 files): alert_ingest/store, audit_store, architecture_pressure, backlog_generator/store, cost_analyzer, data_governance, dependency_scanner, drift_analyzer, incident_* (5 files), llm_enrichment, platform_priority_digest, provider_budget, release_check_runner, risk_* (6 files), signature_state_store, sofiia_auto_router, tool_governance New services: - sofiia-console: Dockerfile, adapters/, monitor/nodes/ops/voice modules, launchd, react static - memory-service: integration_endpoints, integrations, voice_endpoints, static UI - aurora-service: full app suite (analysis, job_store, orchestrator, reporting, schemas, subagents) - sofiia-supervisor: new supervisor service - aistalk-bridge-lite: Telegram bridge lite - calendar-service: CalDAV calendar service with reminders - mlx-stt-service / mlx-tts-service: Apple Silicon speech services - binance-bot-monitor: market monitor service - node-worker: STT/TTS memory providers New tools (9): agent_email, browser_tool, contract_tool, observability_tool, oncall_tool, pr_reviewer_tool, repo_tool, safe_code_executor, secure_vault New crews: agromatrix_crew (10 modules: depth_classifier, doc_facts, doc_focus, farm_state, light_reply, llm_factory, memory_manager, proactivity, reflection_engine, session_context, style_adapter, telemetry) Tests: 85+ test files for all new modules Made-with: Cursor
4.0 KiB
4.0 KiB
Calendar Tool - Documentation
Overview
Calendar Tool provides unified calendar management for Sofiia agent via CalDAV protocol. Currently supports Radicale server, extensible to Google Calendar, iCloud, etc.
Architecture
┌─────────────┐ CalDAV ┌─────────────┐
│ Sofiia │ ──────────────► │ Radicale │
│ Agent │ ◄────────────── │ Server │
└─────────────┘ └─────────────┘
│
▼
┌─────────────────────────┐
│ Calendar Service │
│ (FastAPI) │
├─────────────────────────┤
│ • /v1/calendar/* │
│ • /v1/tools/calendar │
│ • Reminder Worker │
└─────────────────────────┘
Configuration
Environment Variables
# Radicale Server URL
RADICALE_URL=https://caldav.daarion.space
# Database
DATABASE_URL=sqlite:///./calendar.db
API Endpoints
Connection Management
Connect Radicale Account
POST /v1/calendar/connect/radicale
{
"workspace_id": "ws1",
"user_id": "user1",
"username": "calendar_user",
"password": "secure_password"
}
List Accounts
GET /v1/calendar/accounts?workspace_id=ws1&user_id=user1
Calendar Operations
List Calendars
GET /v1/calendar/calendars?account_id=acc_1
List Events
GET /v1/calendar/events?account_id=acc_1&time_min=2024-01-01&time_max=2024-12-31
Create Event
POST /v1/calendar/events?account_id=acc_1
{
"title": "Meeting with Team",
"start": "2024-01-15T10:00:00",
"end": "2024-01-15T11:00:00",
"timezone": "Europe/Kiev",
"location": "Conference Room A",
"description": "Weekly sync",
"attendees": ["team@example.com"]
}
Update Event
PATCH /v1/calendar/events/{uid}?account_id=acc_1
{
"title": "Updated Title",
"description": "New description"
}
Delete Event
DELETE /v1/calendar/events/{uid}?account_id=acc_1
Reminders
Set Reminder
POST /v1/calendar/reminders?account_id=acc_1
{
"event_uid": "evt-123",
"remind_at": "2024-01-15T09:00:00",
"channel": "inapp" # inapp, telegram, email
}
Unified Tool Endpoint
For Sofiia agent, use the unified /v1/tools/calendar endpoint:
POST /v1/tools/calendar
{
"action": "create_event",
"workspace_id": "ws1",
"user_id": "user1",
"account_id": "acc_1",
"params": {
"title": "Doctor Appointment",
"start": "2024-02-01T14:00:00",
"end": "2024-02-01T14:30:00",
"timezone": "Europe/Kiev"
}
}
Available Actions
| Action | Description | Required Params |
|---|---|---|
connect |
Connect Radicale account | username, password |
list_calendars |
List calendars | account_id |
list_events |
List events | account_id, calendar_id (optional) |
get_event |
Get single event | account_id, uid |
create_event |
Create event | account_id, title, start, end |
update_event |
Update event | account_id, uid |
delete_event |
Delete event | account_id, uid |
set_reminder |
Set reminder | account_id, event_uid, remind_at |
Deployment
Docker Compose
cd ops
docker-compose -f docker-compose.calendar.yml up -d
This starts:
- Radicale CalDAV server on port 5232
- Caddy reverse proxy with TLS on port 8443
Local Development
cd services/calendar-service
pip install -r requirements.txt
uvicorn main:app --reload --port 8001
Testing
cd services/calendar-service
pytest tests/ -v
Security Notes
- Passwords are stored in plaintext (in production, use encryption)
- Caddy handles TLS termination
- Radicale uses HTTP Basic Auth
- No external API dependencies (self-hosted)