March 27, 2026

Pluggable Capabilities and CalDAV Integration

Implemented a robust capability framework with secure credential management, dynamic tool registration, and a full CalDAV integration for calendar awareness.

The Capability Framework

Built the foundation for pluggable intelligence layers by implementing the AbstractCapability base class. This provides a standard interface for discovery, connection management, and ingestion. A key focus was security: credentials are now encrypted using Fernet with keys derived from the system’s encryption service before being persisted in the database.

Discovery is now fully dynamic. The system scans for manifest.yaml files in the capabilities directory and uses dynamic imports to instantiate concrete classes at runtime. This allows for modular expansion of the system’s intent execution layer without modifying core application logic.

CalDAV Integration

The first official capability is live. CaldavCapability supports a range of providers including Google, Apple, and self-hosted instances. Beyond simple connectivity, it implements a complex ingest() cycle that parses iCalendar data into structured facts, humanizes recurrence rules (RRULEs), and detects schedule conflicts. It also injects high-priority “schedule hints” into the WorldStateService to ensure the intelligence layer stays aware of the user’s immediate context.

Additionally, a suite of five tools was added—covering event listing, retrieval, creation, updates, and deletion—to give the system direct agency over user calendars.

Infrastructure and Thread Safety

Introduced the CapabilitySchedulerService to drive periodic data synchronization. It runs on a 15-minute loop with a per-capability exponential backoff strategy, ensuring that a failing connection (e.g., due to expired credentials or network issues) doesn’t stall the entire pipeline.

To support this dynamic behavior, the ToolLibraryService was refactored with a module-level lock and new registration methods. This enables capabilities to register their specific handlers only when an active connection is established, keeping the system’s toolset lean and accurate.

API and Verification

A new /api/capabilities blueprint provides the REST interface for managing integrations. This includes account setup with credential validation, status monitoring (tracking last sync and error counts), and disconnection logic. The framework is fully wired into the main application lifecycle, ensuring tools are re-registered on startup for previously connected accounts. The entire suite is backed by 59 new unit tests covering the API, the scheduler’s state machine, and core CalDAV parsing routines.